From 2ed30f46cf1973febe1c3f166301e1795b0f136b Mon Sep 17 00:00:00 2001
From: kaze0617 <1515097306@qq.com>
Date: Mon, 26 Apr 2021 19:58:07 +0800
Subject: [PATCH] update
---
README.md | 2 +-
js/APlayer.min.js | 1544 ++
js/Valine.min.js | 20 +-
js/botui.js | 3997 ------
js/jquery.fancybox.min.js | 1537 --
js/lib.min.js | 27157 +++++++++++++++++++-----------------
js/sakura-app.js | 57 +-
7 files changed, 15663 insertions(+), 18651 deletions(-)
create mode 100644 js/APlayer.min.js
delete mode 100644 js/botui.js
delete mode 100644 js/jquery.fancybox.min.js
diff --git a/README.md b/README.md
index 0671615..872d687 100644
--- a/README.md
+++ b/README.md
@@ -1 +1 @@
-## 博客的CDN
+# cdn
\ No newline at end of file
diff --git a/js/APlayer.min.js b/js/APlayer.min.js
new file mode 100644
index 0000000..e56e23e
--- /dev/null
+++ b/js/APlayer.min.js
@@ -0,0 +1,1544 @@
+! function (e, t) {
+ "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define("APlayer", [], t) : "object" == typeof exports ? exports.APlayer = t() : e.APlayer = t()
+}(window, function () {
+ return function (e) {
+ var t = {};
+
+ function n(i) {
+ if (t[i]) return t[i].exports;
+ var a = t[i] = {
+ i: i,
+ l: !1,
+ exports: {}
+ };
+ return e[i].call(a.exports, a, a.exports, n), a.l = !0, a.exports
+ }
+ return n.m = e, n.c = t, n.d = function (e, t, i) {
+ n.o(e, t) || Object.defineProperty(e, t, {
+ configurable: !1,
+ enumerable: !0,
+ get: i
+ })
+ }, n.r = function (e) {
+ Object.defineProperty(e, "__esModule", {
+ value: !0
+ })
+ }, n.n = function (e) {
+ var t = e && e.__esModule ? function () {
+ return e.default
+ } : function () {
+ return e
+ };
+ return n.d(t, "a", t), t
+ }, n.o = function (e, t) {
+ return Object.prototype.hasOwnProperty.call(e, t)
+ }, n.p = "/", n(n.s = 41)
+ }([function (e, t, n) {
+ "use strict";
+ Object.defineProperty(t, "__esModule", {
+ value: !0
+ });
+ var i = /mobile/i.test(window.navigator.userAgent),
+ a = {
+ secondToTime: function (e) {
+ var t = Math.floor(e / 3600),
+ n = Math.floor((e - 3600 * t) / 60),
+ i = Math.floor(e - 3600 * t - 60 * n);
+ return (t > 0 ? [t, n, i] : [n, i]).map(function (e) {
+ return e < 10 ? "0" + e : "" + e
+ }).join(":")
+ },
+ getElementViewLeft: function (e) {
+ var t = e.offsetLeft,
+ n = e.offsetParent,
+ i = document.body.scrollLeft + document.documentElement.scrollLeft;
+ if (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement)
+ for (; null !== n && n !== e;) t += n.offsetLeft, n = n.offsetParent;
+ else
+ for (; null !== n;) t += n.offsetLeft, n = n.offsetParent;
+ return t - i
+ },
+ getElementViewTop: function (e, t) {
+ for (var n, i = e.offsetTop, a = e.offsetParent; null !== a;) i += a.offsetTop, a = a.offsetParent;
+ return n = document.body.scrollTop + document.documentElement.scrollTop, t ? i : i - n
+ },
+ isMobile: i,
+ storage: {
+ set: function (e, t) {
+ localStorage.setItem(e, t)
+ },
+ get: function (e) {
+ return localStorage.getItem(e)
+ }
+ },
+ nameMap: {
+ dragStart: i ? "touchstart" : "mousedown",
+ dragMove: i ? "touchmove" : "mousemove",
+ dragEnd: i ? "touchend" : "mouseup"
+ },
+ randomOrder: function (e) {
+ return function (e) {
+ for (var t = e.length - 1; t >= 0; t--) {
+ var n = Math.floor(Math.random() * (t + 1)),
+ i = e[n];
+ e[n] = e[t], e[t] = i
+ }
+ return e
+ }([].concat(function (e) {
+ if (Array.isArray(e)) {
+ for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
+ return n
+ }
+ return Array.from(e)
+ }(Array(e))).map(function (e, t) {
+ return t
+ }))
+ }
+ };
+ t.default = a
+ }, function (e, t, n) {
+ var i = n(2);
+ e.exports = function (e) {
+ "use strict";
+ e = e || {};
+ var t = "",
+ n = i.$each,
+ a = e.audio,
+ r = (e.$value, e.$index, i.$escape),
+ o = e.theme,
+ s = e.index;
+ return n(a, function (e, n) {
+ t += '\n
', n.innerHTML.indexOf(t) > 0
- }("\n", "
"),
- ts = u("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),
- ns = u("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),
- rs = u("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),
- is = [/"([^"]*)"+/.source, /'([^']*)'+/.source, /([^\s"'=<>`]+)/.source],
- os = new RegExp("^\\s*" + /([^\s"'<>\/=]+)/.source + "(?:\\s*(" + /(?:=)/.source + ")\\s*(?:" + is.join("|") + "))?"),
- as = "[a-zA-Z_][\\w\\-\\.]*",
- ss = new RegExp("^<((?:" + as + "\\:)?" + as + ")"),
- cs = /^\s*(\/?)>/,
- us = new RegExp("^<\\/((?:" + as + "\\:)?" + as + ")[^>]*>"),
- ls = /^]+>/i,
- fs = /^"
- }, {
- b: "?",
+ },
+ e.QSM = {
+ cN: "string",
+ b: '"',
+ e: '"',
+ i: "\\n",
+ c: [e.BE]
+ },
+ e.PWM = {
+ b: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
+ },
+ e.C = function (n, t, r) {
+ var a = e.inherit({
+ cN: "comment",
+ b: n,
+ e: t,
+ c: []
+ }, r || {});
+ return a.c.push(e.PWM),
+ a.c.push({
+ cN: "doctag",
+ b: "(?:TODO|FIXME|NOTE|BUG|XXX):",
+ r: 0
+ }),
+ a
+ },
+ e.CLCM = e.C("//", "$"),
+ e.CBCM = e.C("/\\*", "\\*/"),
+ e.HCM = e.C("#", "$"),
+ e.NM = {
+ cN: "number",
+ b: e.NR,
+ r: 0
+ },
+ e.CNM = {
+ cN: "number",
+ b: e.CNR,
+ r: 0
+ },
+ e.BNM = {
+ cN: "number",
+ b: e.BNR,
+ r: 0
+ },
+ e.CSSNM = {
+ cN: "number",
+ b: e.NR + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",
+ r: 0
+ },
+ e.RM = {
+ cN: "regexp",
+ b: /\//,
+ e: /\/[gimuy]*/,
+ i: /\n/,
+ c: [e.BE, {
+ b: /\[/,
+ e: /\]/,
+ r: 0,
+ c: [e.BE]
+ }]
+ },
+ e.TM = {
+ cN: "title",
+ b: e.IR,
+ r: 0
+ },
+ e.UTM = {
+ cN: "title",
+ b: e.UIR,
+ r: 0
+ },
+ e.METHOD_GUARD = {
+ b: "\\.\\s*" + e.UIR,
+ r: 0
+ },
+ e
+});
+hljs.registerLanguage("cs", function (e) {
+ var i = {
+ keyword: "abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long nameof object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",
+ literal: "null false true"
+ },
+ t = {
+ cN: "string",
+ b: '@"',
+ e: '"',
+ c: [{
+ b: '""'
+ }]
+ },
+ r = e.inherit(t, {
+ i: /\n/
+ }),
+ a = {
+ cN: "subst",
+ b: "{",
+ e: "}",
+ k: i
+ },
+ c = e.inherit(a, {
+ i: /\n/
+ }),
+ n = {
+ cN: "string",
+ b: /\$"/,
+ e: '"',
+ i: /\n/,
+ c: [{
+ b: "{{"
+ }, {
+ b: "}}"
+ }, e.BE, c]
+ },
+ s = {
+ cN: "string",
+ b: /\$@"/,
+ e: '"',
+ c: [{
+ b: "{{"
+ }, {
+ b: "}}"
+ }, {
+ b: '""'
+ }, a]
+ },
+ o = e.inherit(s, {
+ i: /\n/,
+ c: [{
+ b: "{{"
+ }, {
+ b: "}}"
+ }, {
+ b: '""'
+ }, c]
+ });
+ a.c = [s, n, t, e.ASM, e.QSM, e.CNM, e.CBCM],
+ c.c = [o, n, r, e.ASM, e.QSM, e.CNM, e.inherit(e.CBCM, {
+ i: /\n/
+ })];
+ var l = {
+ v: [s, n, t, e.ASM, e.QSM]
+ },
+ b = e.IR + "(<" + e.IR + "(\\s*,\\s*" + e.IR + ")*>)?(\\[\\])?";
+ return {
+ aliases: ["csharp"],
+ k: i,
+ i: /::/,
+ c: [e.C("///", "$", {
+ rB: !0,
+ c: [{
+ cN: "doctag",
+ v: [{
+ b: "///",
+ r: 0
+ }, {
+ b: ""
+ }, {
+ b: "?",
e: ">"
}]
}]
@@ -5246,76 +5476,74 @@ hljs.registerLanguage("cs", function(e) {
}]
}
});
-hljs.registerLanguage("json", function(e) {
+hljs.registerLanguage("json", function (e) {
var i = {
- literal: "true false null"
- }
- , n = [e.QSM, e.CNM]
- , r = {
- e: ",",
- eW: !0,
- eE: !0,
- c: n,
- k: i
- }
- , t = {
- b: "{",
- e: "}",
- c: [{
- cN: "attr",
- b: /"/,
- e: /"/,
- c: [e.BE],
- i: "\\n"
- }, e.inherit(r, {
- b: /:/
- })],
- i: "\\S"
- }
- , c = {
- b: "\\[",
- e: "\\]",
- c: [e.inherit(r)],
- i: "\\S"
- };
- return n.splice(n.length, 0, t, c),
- {
+ literal: "true false null"
+ },
+ n = [e.QSM, e.CNM],
+ r = {
+ e: ",",
+ eW: !0,
+ eE: !0,
+ c: n,
+ k: i
+ },
+ t = {
+ b: "{",
+ e: "}",
+ c: [{
+ cN: "attr",
+ b: /"/,
+ e: /"/,
+ c: [e.BE],
+ i: "\\n"
+ }, e.inherit(r, {
+ b: /:/
+ })],
+ i: "\\S"
+ },
+ c = {
+ b: "\\[",
+ e: "\\]",
+ c: [e.inherit(r)],
+ i: "\\S"
+ };
+ return n.splice(n.length, 0, t, c), {
c: n,
k: i,
i: "\\S"
}
});
-hljs.registerLanguage("swift", function(e) {
+hljs.registerLanguage("swift", function (e) {
var i = {
- keyword: "__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",
- literal: "true false nil",
- built_in: "abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"
- }
- , t = {
- cN: "type",
- b: "\\b[A-Z][\\wÀ-ʸ']*",
- r: 0
- }
- , n = e.C("/\\*", "\\*/", {
- c: ["self"]
- })
- , r = {
- cN: "subst",
- b: /\\\(/,
- e: "\\)",
- k: i,
- c: []
- }
- , a = {
- cN: "number",
- b: "\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",
- r: 0
- }
- , o = e.inherit(e.QSM, {
- c: [r, e.BE]
- });
- return r.c = [a],
- {
+ keyword: "__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",
+ literal: "true false nil",
+ built_in: "abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"
+ },
+ t = {
+ cN: "type",
+ b: "\\b[A-Z][\\wÀ-ʸ']*",
+ r: 0
+ },
+ n = e.C("/\\*", "\\*/", {
+ c: ["self"]
+ }),
+ r = {
+ cN: "subst",
+ b: /\\\(/,
+ e: "\\)",
+ k: i,
+ c: []
+ },
+ a = {
+ cN: "number",
+ b: "\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",
+ r: 0
+ },
+ o = e.inherit(e.QSM, {
+ c: [r, e.BE]
+ });
+ return r.c = [a], {
k: i,
c: [o, e.CLCM, n, t, a, {
cN: "function",
@@ -5358,7 +5586,7 @@ hljs.registerLanguage("swift", function(e) {
}]
}
});
-hljs.registerLanguage("tex", function(c) {
+hljs.registerLanguage("tex", function (c) {
var e = {
cN: "tag",
b: /\\/,
@@ -5411,32 +5639,32 @@ hljs.registerLanguage("tex", function(c) {
})]
}
});
-hljs.registerLanguage("php", function(e) {
+hljs.registerLanguage("php", function (e) {
var c = {
- b: "\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"
- }
- , i = {
- cN: "meta",
- b: /<\?(php)?|\?>/
- }
- , t = {
- cN: "string",
- c: [e.BE, i],
- v: [{
- b: 'b"',
- e: '"'
- }, {
- b: "b'",
- e: "'"
- }, e.inherit(e.ASM, {
- i: null
- }), e.inherit(e.QSM, {
- i: null
- })]
- }
- , a = {
- v: [e.BNM, e.CNM]
- };
+ b: "\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"
+ },
+ i = {
+ cN: "meta",
+ b: /<\?(php)?|\?>/
+ },
+ t = {
+ cN: "string",
+ c: [e.BE, i],
+ v: [{
+ b: 'b"',
+ e: '"'
+ }, {
+ b: "b'",
+ e: "'"
+ }, e.inherit(e.ASM, {
+ i: null
+ }), e.inherit(e.QSM, {
+ i: null
+ })]
+ },
+ a = {
+ v: [e.BNM, e.CNM]
+ };
return {
aliases: ["php3", "php4", "php5", "php6"],
cI: !0,
@@ -5505,7 +5733,7 @@ hljs.registerLanguage("php", function(e) {
}, t, a]
}
});
-hljs.registerLanguage("r", function(e) {
+hljs.registerLanguage("r", function (e) {
var r = "([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";
return {
c: [e.HCM, {
@@ -5553,151 +5781,150 @@ hljs.registerLanguage("r", function(e) {
}]
}
});
-hljs.registerLanguage("perl", function(e) {
- var t = "getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when"
- , r = {
- cN: "subst",
- b: "[$@]\\{",
- e: "\\}",
- k: t
- }
- , s = {
- b: "->{",
- e: "}"
- }
- , n = {
- v: [{
- b: /\$\d/
- }, {
- b: /[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/
- }, {
- b: /[\$%@][^\s\w{]/,
- r: 0
- }]
- }
- , i = [e.BE, r, n]
- , o = [n, e.HCM, e.C("^\\=\\w", "\\=cut", {
- eW: !0
- }), s, {
- cN: "string",
- c: i,
- v: [{
- b: "q[qwxr]?\\s*\\(",
- e: "\\)",
- r: 5
- }, {
- b: "q[qwxr]?\\s*\\[",
- e: "\\]",
- r: 5
- }, {
- b: "q[qwxr]?\\s*\\{",
+hljs.registerLanguage("perl", function (e) {
+ var t = "getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",
+ r = {
+ cN: "subst",
+ b: "[$@]\\{",
e: "\\}",
- r: 5
- }, {
- b: "q[qwxr]?\\s*\\|",
- e: "\\|",
- r: 5
- }, {
- b: "q[qwxr]?\\s*\\<",
- e: "\\>",
- r: 5
- }, {
- b: "qw\\s+q",
- e: "q",
- r: 5
- }, {
- b: "'",
- e: "'",
- c: [e.BE]
+ k: t
+ },
+ s = {
+ b: "->{",
+ e: "}"
+ },
+ n = {
+ v: [{
+ b: /\$\d/
+ }, {
+ b: /[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/
+ }, {
+ b: /[\$%@][^\s\w{]/,
+ r: 0
+ }]
+ },
+ i = [e.BE, r, n],
+ o = [n, e.HCM, e.C("^\\=\\w", "\\=cut", {
+ eW: !0
+ }), s, {
+ cN: "string",
+ c: i,
+ v: [{
+ b: "q[qwxr]?\\s*\\(",
+ e: "\\)",
+ r: 5
+ }, {
+ b: "q[qwxr]?\\s*\\[",
+ e: "\\]",
+ r: 5
+ }, {
+ b: "q[qwxr]?\\s*\\{",
+ e: "\\}",
+ r: 5
+ }, {
+ b: "q[qwxr]?\\s*\\|",
+ e: "\\|",
+ r: 5
+ }, {
+ b: "q[qwxr]?\\s*\\<",
+ e: "\\>",
+ r: 5
+ }, {
+ b: "qw\\s+q",
+ e: "q",
+ r: 5
+ }, {
+ b: "'",
+ e: "'",
+ c: [e.BE]
+ }, {
+ b: '"',
+ e: '"'
+ }, {
+ b: "`",
+ e: "`",
+ c: [e.BE]
+ }, {
+ b: "{\\w+}",
+ c: [],
+ r: 0
+ }, {
+ b: "-?\\w+\\s*\\=\\>",
+ c: [],
+ r: 0
+ }]
}, {
- b: '"',
- e: '"'
+ cN: "number",
+ b: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",
+ r: 0
}, {
- b: "`",
- e: "`",
- c: [e.BE]
+ b: "(\\/\\/|" + e.RSR + "|\\b(split|return|print|reverse|grep)\\b)\\s*",
+ k: "split return print reverse grep",
+ r: 0,
+ c: [e.HCM, {
+ cN: "regexp",
+ b: "(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",
+ r: 10
+ }, {
+ cN: "regexp",
+ b: "(m|qr)?/",
+ e: "/[a-z]*",
+ c: [e.BE],
+ r: 0
+ }]
}, {
- b: "{\\w+}",
- c: [],
- r: 0
+ cN: "function",
+ bK: "sub",
+ e: "(\\s*\\(.*?\\))?[;{]",
+ eE: !0,
+ r: 5,
+ c: [e.TM]
}, {
- b: "-?\\w+\\s*\\=\\>",
- c: [],
+ b: "-\\w\\b",
r: 0
- }]
- }, {
- cN: "number",
- b: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",
- r: 0
- }, {
- b: "(\\/\\/|" + e.RSR + "|\\b(split|return|print|reverse|grep)\\b)\\s*",
- k: "split return print reverse grep",
- r: 0,
- c: [e.HCM, {
- cN: "regexp",
- b: "(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",
- r: 10
}, {
- cN: "regexp",
- b: "(m|qr)?/",
- e: "/[a-z]*",
- c: [e.BE],
- r: 0
- }]
- }, {
- cN: "function",
- bK: "sub",
- e: "(\\s*\\(.*?\\))?[;{]",
- eE: !0,
- r: 5,
- c: [e.TM]
- }, {
- b: "-\\w\\b",
- r: 0
- }, {
- b: "^__DATA__$",
- e: "^__END__$",
- sL: "mojolicious",
- c: [{
- b: "^@@.*",
- e: "$",
- cN: "comment"
- }]
- }];
+ b: "^__DATA__$",
+ e: "^__END__$",
+ sL: "mojolicious",
+ c: [{
+ b: "^@@.*",
+ e: "$",
+ cN: "comment"
+ }]
+ }];
return r.c = o,
- s.c = o,
- {
- aliases: ["pl", "pm"],
- l: /[\w\.]+/,
- k: t,
- c: o
- }
+ s.c = o, {
+ aliases: ["pl", "pm"],
+ l: /[\w\.]+/,
+ k: t,
+ c: o
+ }
});
-hljs.registerLanguage("bash", function(e) {
+hljs.registerLanguage("bash", function (e) {
var t = {
- cN: "variable",
- v: [{
- b: /\$[\w\d#@][\w\d_]*/
- }, {
- b: /\$\{(.*?)}/
- }]
- }
- , s = {
- cN: "string",
- b: /"/,
- e: /"/,
- c: [e.BE, t, {
cN: "variable",
- b: /\$\(/,
- e: /\)/,
- c: [e.BE]
- }]
- }
- , a = {
- cN: "string",
- b: /'/,
- e: /'/
- };
+ v: [{
+ b: /\$[\w\d#@][\w\d_]*/
+ }, {
+ b: /\$\{(.*?)}/
+ }]
+ },
+ s = {
+ cN: "string",
+ b: /"/,
+ e: /"/,
+ c: [e.BE, t, {
+ cN: "variable",
+ b: /\$\(/,
+ e: /\)/,
+ c: [e.BE]
+ }]
+ },
+ a = {
+ cN: "string",
+ b: /'/,
+ e: /'/
+ };
return {
aliases: ["sh", "zsh"],
l: /\b-?[a-z\._]+\b/,
@@ -5722,16 +5949,16 @@ hljs.registerLanguage("bash", function(e) {
}, e.HCM, s, a, t]
}
});
-hljs.registerLanguage("scss", function(e) {
- var t = "[a-zA-Z-][a-zA-Z0-9_-]*"
- , i = {
- cN: "variable",
- b: "(\\$" + t + ")\\b"
- }
- , r = {
- cN: "number",
- b: "#[0-9A-Fa-f]+"
- };
+hljs.registerLanguage("scss", function (e) {
+ var t = "[a-zA-Z-][a-zA-Z0-9_-]*",
+ i = {
+ cN: "variable",
+ b: "(\\$" + t + ")\\b"
+ },
+ r = {
+ cN: "number",
+ b: "#[0-9A-Fa-f]+"
+ };
({
cN: "attribute",
b: "[A-Z\\_\\.\\-]+",
@@ -5795,42 +6022,42 @@ hljs.registerLanguage("scss", function(e) {
}]
}
});
-hljs.registerLanguage("css", function(e) {
- var c = "[a-zA-Z-][a-zA-Z0-9_-]*"
- , t = {
- b: /[A-Z\_\.\-]+\s*:/,
- rB: !0,
- e: ";",
- eW: !0,
- c: [{
- cN: "attribute",
- b: /\S/,
- e: ":",
- eE: !0,
- starts: {
- eW: !0,
+hljs.registerLanguage("css", function (e) {
+ var c = "[a-zA-Z-][a-zA-Z0-9_-]*",
+ t = {
+ b: /[A-Z\_\.\-]+\s*:/,
+ rB: !0,
+ e: ";",
+ eW: !0,
+ c: [{
+ cN: "attribute",
+ b: /\S/,
+ e: ":",
eE: !0,
- c: [{
- b: /[\w-]+\(/,
- rB: !0,
+ starts: {
+ eW: !0,
+ eE: !0,
c: [{
- cN: "built_in",
- b: /[\w-]+/
+ b: /[\w-]+\(/,
+ rB: !0,
+ c: [{
+ cN: "built_in",
+ b: /[\w-]+/
+ }, {
+ b: /\(/,
+ e: /\)/,
+ c: [e.ASM, e.QSM]
+ }]
+ }, e.CSSNM, e.QSM, e.ASM, e.CBCM, {
+ cN: "number",
+ b: "#[0-9A-Fa-f]+"
}, {
- b: /\(/,
- e: /\)/,
- c: [e.ASM, e.QSM]
+ cN: "meta",
+ b: "!important"
}]
- }, e.CSSNM, e.QSM, e.ASM, e.CBCM, {
- cN: "number",
- b: "#[0-9A-Fa-f]+"
- }, {
- cN: "meta",
- b: "!important"
- }]
- }
- }]
- };
+ }
+ }]
+ };
return {
cI: !0,
i: /[=\/|'\$]/,
@@ -5878,34 +6105,34 @@ hljs.registerLanguage("css", function(e) {
}]
}
});
-hljs.registerLanguage("xml", function(s) {
- var e = "[A-Za-z0-9\\._:-]+"
- , t = {
- eW: !0,
- i: /,
- r: 0,
- c: [{
- cN: "attr",
- b: e,
- r: 0
- }, {
- b: /=\s*/,
+hljs.registerLanguage("xml", function (s) {
+ var e = "[A-Za-z0-9\\._:-]+",
+ t = {
+ eW: !0,
+ i: /,
r: 0,
c: [{
- cN: "string",
- endsParent: !0,
- v: [{
- b: /"/,
- e: /"/
- }, {
- b: /'/,
- e: /'/
- }, {
- b: /[^\s"'=<>`]+/
+ cN: "attr",
+ b: e,
+ r: 0
+ }, {
+ b: /=\s*/,
+ r: 0,
+ c: [{
+ cN: "string",
+ endsParent: !0,
+ v: [{
+ b: /"/,
+ e: /"/
+ }, {
+ b: /'/,
+ e: /'/
+ }, {
+ b: /[^\s"'=<>`]+/
+ }]
}]
}]
- }]
- };
+ };
return {
aliases: ["html", "xhtml", "rss", "atom", "xjb", "xsd", "xsl", "plist"],
cI: !0,
@@ -5981,67 +6208,67 @@ hljs.registerLanguage("xml", function(s) {
}]
}
});
-hljs.registerLanguage("nginx", function(e) {
+hljs.registerLanguage("nginx", function (e) {
var r = {
- cN: "variable",
- v: [{
- b: /\$\d+/
- }, {
- b: /\$\{/,
- e: /}/
- }, {
- b: "[\\$\\@]" + e.UIR
- }]
- }
- , b = {
- eW: !0,
- l: "[a-z/_]+",
- k: {
- literal: "on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"
- },
- r: 0,
- i: "=>",
- c: [e.HCM, {
- cN: "string",
- c: [e.BE, r],
+ cN: "variable",
v: [{
- b: /"/,
- e: /"/
+ b: /\$\d+/
}, {
- b: /'/,
- e: /'/
+ b: /\$\{/,
+ e: /}/
+ }, {
+ b: "[\\$\\@]" + e.UIR
}]
- }, {
- b: "([a-z]+):/",
- e: "\\s",
+ },
+ b = {
eW: !0,
- eE: !0,
- c: [r]
- }, {
- cN: "regexp",
- c: [e.BE, r],
- v: [{
- b: "\\s\\^",
- e: "\\s|{|;",
- rE: !0
+ l: "[a-z/_]+",
+ k: {
+ literal: "on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"
+ },
+ r: 0,
+ i: "=>",
+ c: [e.HCM, {
+ cN: "string",
+ c: [e.BE, r],
+ v: [{
+ b: /"/,
+ e: /"/
+ }, {
+ b: /'/,
+ e: /'/
+ }]
+ }, {
+ b: "([a-z]+):/",
+ e: "\\s",
+ eW: !0,
+ eE: !0,
+ c: [r]
}, {
- b: "~\\*?\\s+",
- e: "\\s|{|;",
- rE: !0
+ cN: "regexp",
+ c: [e.BE, r],
+ v: [{
+ b: "\\s\\^",
+ e: "\\s|{|;",
+ rE: !0
+ }, {
+ b: "~\\*?\\s+",
+ e: "\\s|{|;",
+ rE: !0
+ }, {
+ b: "\\*(\\.[a-z\\-]+)+"
+ }, {
+ b: "([a-z\\-]+\\.)+\\*"
+ }]
}, {
- b: "\\*(\\.[a-z\\-]+)+"
+ cN: "number",
+ b: "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"
}, {
- b: "([a-z\\-]+\\.)+\\*"
- }]
- }, {
- cN: "number",
- b: "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"
- }, {
- cN: "number",
- b: "\\b\\d+[kKmMgGdshdwy]*\\b",
- r: 0
- }, r]
- };
+ cN: "number",
+ b: "\\b\\d+[kKmMgGdshdwy]*\\b",
+ r: 0
+ }, r]
+ };
return {
aliases: ["nginxconf"],
c: [e.HCM, {
@@ -6067,85 +6294,85 @@ hljs.registerLanguage("nginx", function(e) {
i: "[^\\s\\}]"
}
});
-hljs.registerLanguage("coffeescript", function(e) {
+hljs.registerLanguage("coffeescript", function (e) {
var c = {
- keyword: "in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not",
- literal: "true false null undefined yes no on off",
- built_in: "npm require console print module global window document"
- }
- , n = "[A-Za-z$_][0-9A-Za-z$_]*"
- , r = {
- cN: "subst",
- b: /#\{/,
- e: /}/,
- k: c
- }
- , i = [e.BNM, e.inherit(e.CNM, {
- starts: {
- e: "(\\s*/)?",
- r: 0
- }
- }), {
- cN: "string",
- v: [{
- b: /'''/,
- e: /'''/,
- c: [e.BE]
- }, {
- b: /'/,
- e: /'/,
- c: [e.BE]
- }, {
- b: /"""/,
- e: /"""/,
- c: [e.BE, r]
- }, {
- b: /"/,
- e: /"/,
- c: [e.BE, r]
- }]
- }, {
- cN: "regexp",
- v: [{
- b: "///",
- e: "///",
- c: [r, e.HCM]
+ keyword: "in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not",
+ literal: "true false null undefined yes no on off",
+ built_in: "npm require console print module global window document"
+ },
+ n = "[A-Za-z$_][0-9A-Za-z$_]*",
+ r = {
+ cN: "subst",
+ b: /#\{/,
+ e: /}/,
+ k: c
+ },
+ i = [e.BNM, e.inherit(e.CNM, {
+ starts: {
+ e: "(\\s*/)?",
+ r: 0
+ }
+ }), {
+ cN: "string",
+ v: [{
+ b: /'''/,
+ e: /'''/,
+ c: [e.BE]
+ }, {
+ b: /'/,
+ e: /'/,
+ c: [e.BE]
+ }, {
+ b: /"""/,
+ e: /"""/,
+ c: [e.BE, r]
+ }, {
+ b: /"/,
+ e: /"/,
+ c: [e.BE, r]
+ }]
}, {
- b: "//[gim]*",
- r: 0
+ cN: "regexp",
+ v: [{
+ b: "///",
+ e: "///",
+ c: [r, e.HCM]
+ }, {
+ b: "//[gim]*",
+ r: 0
+ }, {
+ b: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/
+ }]
}, {
- b: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/
- }]
- }, {
- b: "@" + n
- }, {
- sL: "javascript",
- eB: !0,
- eE: !0,
- v: [{
- b: "```",
- e: "```"
+ b: "@" + n
}, {
- b: "`",
- e: "`"
- }]
- }];
+ sL: "javascript",
+ eB: !0,
+ eE: !0,
+ v: [{
+ b: "```",
+ e: "```"
+ }, {
+ b: "`",
+ e: "`"
+ }]
+ }];
r.c = i;
var s = e.inherit(e.TM, {
- b: n
- })
- , t = "(\\(.*\\))?\\s*\\B[-=]>"
- , o = {
- cN: "params",
- b: "\\([^\\(]",
- rB: !0,
- c: [{
- b: /\(/,
- e: /\)/,
- k: c,
- c: ["self"].concat(i)
- }]
- };
+ b: n
+ }),
+ t = "(\\(.*\\))?\\s*\\B[-=]>",
+ o = {
+ cN: "params",
+ b: "\\([^\\(]",
+ rB: !0,
+ c: [{
+ b: /\(/,
+ e: /\)/,
+ k: c,
+ c: ["self"].concat(i)
+ }]
+ };
return {
aliases: ["coffee", "cson", "iced"],
k: c,
@@ -6186,114 +6413,113 @@ hljs.registerLanguage("coffeescript", function(e) {
}])
}
});
-hljs.registerLanguage("python", function(e) {
+hljs.registerLanguage("python", function (e) {
var r = {
- keyword: "and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",
- built_in: "Ellipsis NotImplemented"
- }
- , b = {
- cN: "meta",
- b: /^(>>>|\.\.\.) /
- }
- , c = {
- cN: "subst",
- b: /\{/,
- e: /\}/,
- k: r,
- i: /#/
- }
- , a = {
- cN: "string",
- c: [e.BE],
- v: [{
- b: /(u|b)?r?'''/,
- e: /'''/,
- c: [b],
- r: 10
- }, {
- b: /(u|b)?r?"""/,
- e: /"""/,
- c: [b],
- r: 10
- }, {
- b: /(fr|rf|f)'''/,
- e: /'''/,
- c: [b, c]
- }, {
- b: /(fr|rf|f)"""/,
- e: /"""/,
- c: [b, c]
- }, {
- b: /(u|r|ur)'/,
- e: /'/,
- r: 10
- }, {
- b: /(u|r|ur)"/,
- e: /"/,
- r: 10
- }, {
- b: /(b|br)'/,
- e: /'/
- }, {
- b: /(b|br)"/,
- e: /"/
- }, {
- b: /(fr|rf|f)'/,
- e: /'/,
- c: [c]
- }, {
- b: /(fr|rf|f)"/,
- e: /"/,
- c: [c]
- }, e.ASM, e.QSM]
- }
- , s = {
- cN: "number",
- r: 0,
- v: [{
- b: e.BNR + "[lLjJ]?"
- }, {
- b: "\\b(0o[0-7]+)[lLjJ]?"
- }, {
- b: e.CNR + "[lLjJ]?"
- }]
- }
- , i = {
- cN: "params",
- b: /\(/,
- e: /\)/,
- c: ["self", b, s, a]
- };
- return c.c = [a, s, b],
- {
- aliases: ["py", "gyp"],
- k: r,
- i: /(<\/|->|\?)|=>/,
- c: [b, s, a, e.HCM, {
+ keyword: "and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",
+ built_in: "Ellipsis NotImplemented"
+ },
+ b = {
+ cN: "meta",
+ b: /^(>>>|\.\.\.) /
+ },
+ c = {
+ cN: "subst",
+ b: /\{/,
+ e: /\}/,
+ k: r,
+ i: /#/
+ },
+ a = {
+ cN: "string",
+ c: [e.BE],
v: [{
- cN: "function",
- bK: "def"
+ b: /(u|b)?r?'''/,
+ e: /'''/,
+ c: [b],
+ r: 10
}, {
- cN: "class",
- bK: "class"
- }],
- e: /:/,
- i: /[${=;\n,]/,
- c: [e.UTM, i, {
- b: /->/,
- eW: !0,
- k: "None"
- }]
- }, {
- cN: "meta",
- b: /^[\t ]*@/,
+ b: /(u|b)?r?"""/,
+ e: /"""/,
+ c: [b],
+ r: 10
+ }, {
+ b: /(fr|rf|f)'''/,
+ e: /'''/,
+ c: [b, c]
+ }, {
+ b: /(fr|rf|f)"""/,
+ e: /"""/,
+ c: [b, c]
+ }, {
+ b: /(u|r|ur)'/,
+ e: /'/,
+ r: 10
+ }, {
+ b: /(u|r|ur)"/,
+ e: /"/,
+ r: 10
+ }, {
+ b: /(b|br)'/,
+ e: /'/
+ }, {
+ b: /(b|br)"/,
+ e: /"/
+ }, {
+ b: /(fr|rf|f)'/,
+ e: /'/,
+ c: [c]
+ }, {
+ b: /(fr|rf|f)"/,
+ e: /"/,
+ c: [c]
+ }, e.ASM, e.QSM]
+ },
+ s = {
+ cN: "number",
+ r: 0,
+ v: [{
+ b: e.BNR + "[lLjJ]?"
+ }, {
+ b: "\\b(0o[0-7]+)[lLjJ]?"
+ }, {
+ b: e.CNR + "[lLjJ]?"
+ }]
+ },
+ i = {
+ cN: "params",
+ b: /\(/,
+ e: /\)/,
+ c: ["self", b, s, a]
+ };
+ return c.c = [a, s, b], {
+ aliases: ["py", "gyp"],
+ k: r,
+ i: /(<\/|->|\?)|=>/,
+ c: [b, s, a, e.HCM, {
+ v: [{
+ cN: "function",
+ bK: "def"
+ }, {
+ cN: "class",
+ bK: "class"
+ }],
+ e: /:/,
+ i: /[${=;\n,]/,
+ c: [e.UTM, i, {
+ b: /->/,
+ eW: !0,
+ k: "None"
+ }]
+ }, {
+ cN: "meta",
+ b: /^[\t ]*@/,
e: /$/
}, {
b: /\b(print|exec)\(/
}]
}
});
-hljs.registerLanguage("shell", function(s) {
+hljs.registerLanguage("shell", function (s) {
return {
aliases: ["console"],
c: [{
@@ -6306,18 +6532,18 @@ hljs.registerLanguage("shell", function(s) {
}]
}
});
-hljs.registerLanguage("objectivec", function(e) {
+hljs.registerLanguage("objectivec", function (e) {
var t = {
- cN: "built_in",
- b: "\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"
- }
- , _ = {
- keyword: "int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",
- literal: "false true FALSE TRUE nil YES NO NULL",
- built_in: "BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"
- }
- , i = /[a-zA-Z@][a-zA-Z0-9_]*/
- , n = "@interface @class @protocol @implementation";
+ cN: "built_in",
+ b: "\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"
+ },
+ _ = {
+ keyword: "int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",
+ literal: "false true FALSE TRUE nil YES NO NULL",
+ built_in: "BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"
+ },
+ i = /[a-zA-Z@][a-zA-Z0-9_]*/,
+ n = "@interface @class @protocol @implementation";
return {
aliases: ["mm", "objc", "obj-c"],
k: _,
@@ -6363,7 +6589,7 @@ hljs.registerLanguage("objectivec", function(e) {
}]
}
});
-hljs.registerLanguage("sql", function(e) {
+hljs.registerLanguage("sql", function (e) {
var t = e.C("--", "$");
return {
cI: !0,
@@ -6401,7 +6627,7 @@ hljs.registerLanguage("sql", function(e) {
}, e.CBCM, t]
}
});
-hljs.registerLanguage("apache", function(e) {
+hljs.registerLanguage("apache", function (e) {
var r = {
cN: "number",
b: "[\\$%]\\d+"
@@ -6441,7 +6667,7 @@ hljs.registerLanguage("apache", function(e) {
i: /\S/
}
});
-hljs.registerLanguage("django", function(e) {
+hljs.registerLanguage("django", function (e) {
var t = {
b: /\|[A-Za-z]+:?/,
k: {
@@ -6478,7 +6704,7 @@ hljs.registerLanguage("django", function(e) {
}]
}
});
-hljs.registerLanguage("markdown", function(e) {
+hljs.registerLanguage("markdown", function (e) {
return {
aliases: ["md", "mkdown", "mkd"],
c: [{
@@ -6569,7 +6795,7 @@ hljs.registerLanguage("markdown", function(e) {
}]
}
});
-hljs.registerLanguage("stata", function(e) {
+hljs.registerLanguage("stata", function (e) {
return {
aliases: ["do", "ado"],
cI: !0,
@@ -6595,37 +6821,37 @@ hljs.registerLanguage("stata", function(e) {
}, e.C("^[ ]*\\*.*$", !1), e.CLCM, e.CBCM]
}
});
-hljs.registerLanguage("javascript", function(e) {
- var r = "[A-Za-z$_][0-9A-Za-z$_]*"
- , t = {
- keyword: "in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",
- literal: "true false null undefined NaN Infinity",
- built_in: "eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"
- }
- , a = {
- cN: "number",
- v: [{
- b: "\\b(0[bB][01]+)"
- }, {
- b: "\\b(0[oO][0-7]+)"
- }, {
- b: e.CNR
- }],
- r: 0
- }
- , n = {
- cN: "subst",
- b: "\\$\\{",
- e: "\\}",
- k: t,
- c: []
- }
- , c = {
- cN: "string",
- b: "`",
- e: "`",
- c: [e.BE, n]
- };
+hljs.registerLanguage("javascript", function (e) {
+ var r = "[A-Za-z$_][0-9A-Za-z$_]*",
+ t = {
+ keyword: "in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",
+ literal: "true false null undefined NaN Infinity",
+ built_in: "eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"
+ },
+ a = {
+ cN: "number",
+ v: [{
+ b: "\\b(0[bB][01]+)"
+ }, {
+ b: "\\b(0[oO][0-7]+)"
+ }, {
+ b: e.CNR
+ }],
+ r: 0
+ },
+ n = {
+ cN: "subst",
+ b: "\\$\\{",
+ e: "\\}",
+ k: t,
+ c: []
+ },
+ c = {
+ cN: "string",
+ b: "`",
+ e: "`",
+ c: [e.BE, n]
+ };
n.c = [e.ASM, e.QSM, c, a, e.RM];
var s = n.c.concat([e.CBCM, e.CLCM]);
return {
@@ -6728,16 +6954,16 @@ hljs.registerLanguage("javascript", function(e) {
i: /#(?!!)/
}
});
-hljs.registerLanguage("java", function(e) {
- var a = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*"
- , t = a + "(<" + a + "(\\s*,\\s*" + a + ")*>)?"
- , r = "false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do"
- , s = "\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?"
- , c = {
- cN: "number",
- b: s,
- r: 0
- };
+hljs.registerLanguage("java", function (e) {
+ var a = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",
+ t = a + "(<" + a + "(\\s*,\\s*" + a + ")*>)?",
+ r = "false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",
+ s = "\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",
+ c = {
+ cN: "number",
+ b: s,
+ r: 0
+ };
return {
aliases: ["jsp"],
k: r,
@@ -6790,65 +7016,65 @@ hljs.registerLanguage("java", function(e) {
}]
}
});
-hljs.registerLanguage("cpp", function(t) {
+hljs.registerLanguage("cpp", function (t) {
var e = {
- cN: "keyword",
- b: "\\b[a-z\\d_]*_t\\b"
- }
- , r = {
- cN: "string",
- v: [{
- b: '(u8?|U)?L?"',
- e: '"',
- i: "\\n",
- c: [t.BE]
- }, {
- b: '(u8?|U)?R"',
- e: '"',
- c: [t.BE]
- }, {
- b: "'\\\\?.",
- e: "'",
- i: "."
- }]
- }
- , s = {
- cN: "number",
- v: [{
- b: "\\b(0b[01']+)"
- }, {
- b: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"
- }, {
- b: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"
- }],
- r: 0
- }
- , i = {
- cN: "meta",
- b: /#\s*[a-z]+\b/,
- e: /$/,
- k: {
- "meta-keyword": "if else elif endif define undef warning error line pragma ifdef ifndef include"
+ cN: "keyword",
+ b: "\\b[a-z\\d_]*_t\\b"
},
- c: [{
- b: /\\\n/,
+ r = {
+ cN: "string",
+ v: [{
+ b: '(u8?|U)?L?"',
+ e: '"',
+ i: "\\n",
+ c: [t.BE]
+ }, {
+ b: '(u8?|U)?R"',
+ e: '"',
+ c: [t.BE]
+ }, {
+ b: "'\\\\?.",
+ e: "'",
+ i: "."
+ }]
+ },
+ s = {
+ cN: "number",
+ v: [{
+ b: "\\b(0b[01']+)"
+ }, {
+ b: "(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"
+ }, {
+ b: "(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"
+ }],
r: 0
- }, t.inherit(r, {
- cN: "meta-string"
- }), {
- cN: "meta-string",
- b: /<[^\n>]*>/,
+ },
+ i = {
+ cN: "meta",
+ b: /#\s*[a-z]+\b/,
e: /$/,
- i: "\\n"
- }, t.CLCM, t.CBCM]
- }
- , a = t.IR + "\\s*\\("
- , c = {
- keyword: "int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",
- built_in: "std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",
- literal: "true false nullptr NULL"
- }
- , n = [e, t.CLCM, t.CBCM, s, r];
+ k: {
+ "meta-keyword": "if else elif endif define undef warning error line pragma ifdef ifndef include"
+ },
+ c: [{
+ b: /\\\n/,
+ r: 0
+ }, t.inherit(r, {
+ cN: "meta-string"
+ }), {
+ cN: "meta-string",
+ b: /<[^\n>]*>/,
+ e: /$/,
+ i: "\\n"
+ }, t.CLCM, t.CBCM]
+ },
+ a = t.IR + "\\s*\\(",
+ c = {
+ keyword: "int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",
+ built_in: "std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",
+ literal: "true false nullptr NULL"
+ },
+ n = [e, t.CLCM, t.CBCM, s, r];
return {
aliases: ["c", "cc", "h", "c++", "h++", "hpp"],
k: c,
@@ -6919,7 +7145,7 @@ hljs.registerLanguage("cpp", function(t) {
}
}
});
-hljs.registerLanguage("http", function(e) {
+hljs.registerLanguage("http", function (e) {
var t = "HTTP/[0-9\\.]+";
return {
aliases: ["https"],
@@ -6966,56 +7192,56 @@ hljs.registerLanguage("http", function(e) {
}]
}
});
-hljs.registerLanguage("makefile", function(e) {
+hljs.registerLanguage("makefile", function (e) {
var i = {
- cN: "variable",
- v: [{
- b: "\\$\\(" + e.UIR + "\\)",
- c: [e.BE]
- }, {
- b: /\$[@%\^\+\*]/
- }]
- }
- , r = {
- cN: "string",
- b: /"/,
- e: /"/,
- c: [e.BE, i]
- }
- , a = {
- cN: "variable",
- b: /\$\([\w-]+\s/,
- e: /\)/,
- k: {
- built_in: "subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"
+ cN: "variable",
+ v: [{
+ b: "\\$\\(" + e.UIR + "\\)",
+ c: [e.BE]
+ }, {
+ b: /\$[@%\^\+\*]/
+ }]
},
- c: [i]
- }
- , n = {
- b: "^" + e.UIR + "\\s*[:+?]?=",
- i: "\\n",
- rB: !0,
- c: [{
- b: "^" + e.UIR,
- e: "[:+?]?=",
- eE: !0
- }]
- }
- , t = {
- cN: "meta",
- b: /^\.PHONY:/,
- e: /$/,
- k: {
- "meta-keyword": ".PHONY"
+ r = {
+ cN: "string",
+ b: /"/,
+ e: /"/,
+ c: [e.BE, i]
},
- l: /[\.\w]+/
- }
- , l = {
- cN: "section",
- b: /^[^\s]+:/,
- e: /$/,
- c: [i]
- };
+ a = {
+ cN: "variable",
+ b: /\$\([\w-]+\s/,
+ e: /\)/,
+ k: {
+ built_in: "subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"
+ },
+ c: [i]
+ },
+ n = {
+ b: "^" + e.UIR + "\\s*[:+?]?=",
+ i: "\\n",
+ rB: !0,
+ c: [{
+ b: "^" + e.UIR,
+ e: "[:+?]?=",
+ eE: !0
+ }]
+ },
+ t = {
+ cN: "meta",
+ b: /^\.PHONY:/,
+ e: /$/,
+ k: {
+ "meta-keyword": ".PHONY"
+ },
+ l: /[\.\w]+/
+ },
+ l = {
+ cN: "section",
+ b: /^[^\s]+:/,
+ e: /$/,
+ c: [i]
+ };
return {
aliases: ["mk", "mak"],
k: "define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath",
@@ -7023,7 +7249,7 @@ hljs.registerLanguage("makefile", function(e) {
c: [e.HCM, i, r, a, n, t, l]
}
});
-hljs.registerLanguage("ini", function(e) {
+hljs.registerLanguage("ini", function (e) {
var b = {
cN: "string",
c: [e.BE],
@@ -7080,7 +7306,7 @@ hljs.registerLanguage("ini", function(e) {
}]
}
});
-hljs.registerLanguage("diff", function(e) {
+hljs.registerLanguage("diff", function (e) {
return {
aliases: ["patch"],
c: [{
@@ -7129,7 +7355,7 @@ hljs.registerLanguage("diff", function(e) {
}]
}
});
-hljs.registerLanguage("go", function(e) {
+hljs.registerLanguage("go", function (e) {
var t = {
keyword: "break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",
literal: "true false iota nil",
@@ -7171,171 +7397,171 @@ hljs.registerLanguage("go", function(e) {
}]
}
});
-hljs.registerLanguage("ruby", function(e) {
- var b = "[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?"
- , r = {
- keyword: "and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",
- literal: "true false nil"
- }
- , c = {
- cN: "doctag",
- b: "@[A-Za-z]+"
- }
- , a = {
- b: "#<",
- e: ">"
- }
- , s = [e.C("#", "$", {
- c: [c]
- }), e.C("^\\=begin", "^\\=end", {
- c: [c],
- r: 10
- }), e.C("^__END__", "\\n$")]
- , n = {
- cN: "subst",
- b: "#\\{",
- e: "}",
- k: r
- }
- , t = {
- cN: "string",
- c: [e.BE, n],
- v: [{
- b: /'/,
- e: /'/
- }, {
- b: /"/,
- e: /"/
- }, {
- b: /`/,
- e: /`/
- }, {
- b: "%[qQwWx]?\\(",
- e: "\\)"
+hljs.registerLanguage("ruby", function (e) {
+ var b = "[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",
+ r = {
+ keyword: "and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",
+ literal: "true false nil"
+ },
+ c = {
+ cN: "doctag",
+ b: "@[A-Za-z]+"
+ },
+ a = {
+ b: "#<",
+ e: ">"
+ },
+ s = [e.C("#", "$", {
+ c: [c]
+ }), e.C("^\\=begin", "^\\=end", {
+ c: [c],
+ r: 10
+ }), e.C("^__END__", "\\n$")],
+ n = {
+ cN: "subst",
+ b: "#\\{",
+ e: "}",
+ k: r
+ },
+ t = {
+ cN: "string",
+ c: [e.BE, n],
+ v: [{
+ b: /'/,
+ e: /'/
+ }, {
+ b: /"/,
+ e: /"/
+ }, {
+ b: /`/,
+ e: /`/
+ }, {
+ b: "%[qQwWx]?\\(",
+ e: "\\)"
+ }, {
+ b: "%[qQwWx]?\\[",
+ e: "\\]"
+ }, {
+ b: "%[qQwWx]?{",
+ e: "}"
+ }, {
+ b: "%[qQwWx]?<",
+ e: ">"
+ }, {
+ b: "%[qQwWx]?/",
+ e: "/"
+ }, {
+ b: "%[qQwWx]?%",
+ e: "%"
+ }, {
+ b: "%[qQwWx]?-",
+ e: "-"
+ }, {
+ b: "%[qQwWx]?\\|",
+ e: "\\|"
+ }, {
+ b: /\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/
+ }, {
+ b: /<<(-?)\w+$/,
+ e: /^\s*\w+$/
+ }]
+ },
+ i = {
+ cN: "params",
+ b: "\\(",
+ e: "\\)",
+ endsParent: !0,
+ k: r
+ },
+ d = [t, a, {
+ cN: "class",
+ bK: "class module",
+ e: "$|;",
+ i: /=/,
+ c: [e.inherit(e.TM, {
+ b: "[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"
+ }), {
+ b: "<\\s*",
+ c: [{
+ b: "(" + e.IR + "::)?" + e.IR
+ }]
+ }].concat(s)
}, {
- b: "%[qQwWx]?\\[",
- e: "\\]"
+ cN: "function",
+ bK: "def",
+ e: "$|;",
+ c: [e.inherit(e.TM, {
+ b: b
+ }), i].concat(s)
}, {
- b: "%[qQwWx]?{",
- e: "}"
+ b: e.IR + "::"
}, {
- b: "%[qQwWx]?<",
- e: ">"
+ cN: "symbol",
+ b: e.UIR + "(\\!|\\?)?:",
+ r: 0
}, {
- b: "%[qQwWx]?/",
- e: "/"
+ cN: "symbol",
+ b: ":(?!\\s)",
+ c: [t, {
+ b: b
+ }],
+ r: 0
}, {
- b: "%[qQwWx]?%",
- e: "%"
+ cN: "number",
+ b: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",
+ r: 0
}, {
- b: "%[qQwWx]?-",
- e: "-"
+ b: "(\\$\\W)|((\\$|\\@\\@?)(\\w+))"
}, {
- b: "%[qQwWx]?\\|",
- e: "\\|"
+ cN: "params",
+ b: /\|/,
+ e: /\|/,
+ k: r
}, {
- b: /\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/
+ b: "(" + e.RSR + "|unless)\\s*",
+ k: "unless",
+ c: [a, {
+ cN: "regexp",
+ c: [e.BE, n],
+ i: /\n/,
+ v: [{
+ b: "/",
+ e: "/[a-z]*"
+ }, {
+ b: "%r{",
+ e: "}[a-z]*"
+ }, {
+ b: "%r\\(",
+ e: "\\)[a-z]*"
+ }, {
+ b: "%r!",
+ e: "![a-z]*"
+ }, {
+ b: "%r\\[",
+ e: "\\][a-z]*"
+ }]
+ }].concat(s),
+ r: 0
+ }].concat(s);
+ n.c = d,
+ i.c = d;
+ var l = "[>?]>",
+ o = "[\\w#]+\\(\\w+\\):\\d+:\\d+>",
+ u = "(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",
+ w = [{
+ b: /^\s*=>/,
+ starts: {
+ e: "$",
+ c: d
+ }
}, {
- b: /<<(-?)\w+$/,
- e: /^\s*\w+$/
- }]
- }
- , i = {
- cN: "params",
- b: "\\(",
- e: "\\)",
- endsParent: !0,
- k: r
- }
- , d = [t, a, {
- cN: "class",
- bK: "class module",
- e: "$|;",
- i: /=/,
- c: [e.inherit(e.TM, {
- b: "[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"
- }), {
- b: "<\\s*",
- c: [{
- b: "(" + e.IR + "::)?" + e.IR
- }]
- }].concat(s)
- }, {
- cN: "function",
- bK: "def",
- e: "$|;",
- c: [e.inherit(e.TM, {
- b: b
- }), i].concat(s)
- }, {
- b: e.IR + "::"
- }, {
- cN: "symbol",
- b: e.UIR + "(\\!|\\?)?:",
- r: 0
- }, {
- cN: "symbol",
- b: ":(?!\\s)",
- c: [t, {
- b: b
- }],
- r: 0
- }, {
- cN: "number",
- b: "(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",
- r: 0
- }, {
- b: "(\\$\\W)|((\\$|\\@\\@?)(\\w+))"
- }, {
- cN: "params",
- b: /\|/,
- e: /\|/,
- k: r
- }, {
- b: "(" + e.RSR + "|unless)\\s*",
- k: "unless",
- c: [a, {
- cN: "regexp",
- c: [e.BE, n],
- i: /\n/,
- v: [{
- b: "/",
- e: "/[a-z]*"
- }, {
- b: "%r{",
- e: "}[a-z]*"
- }, {
- b: "%r\\(",
- e: "\\)[a-z]*"
- }, {
- b: "%r!",
- e: "![a-z]*"
- }, {
- b: "%r\\[",
- e: "\\][a-z]*"
- }]
- }].concat(s),
- r: 0
- }].concat(s);
- n.c = d,
- i.c = d;
- var l = "[>?]>"
- , o = "[\\w#]+\\(\\w+\\):\\d+:\\d+>"
- , u = "(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>"
- , w = [{
- b: /^\s*=>/,
- starts: {
- e: "$",
- c: d
- }
- }, {
- cN: "meta",
- b: "^(" + l + "|" + o + "|" + u + ")",
- starts: {
- e: "$",
- c: d
- }
- }];
+ cN: "meta",
+ b: "^(" + l + "|" + o + "|" + u + ")",
+ starts: {
+ e: "$",
+ c: d
+ }
+ }];
return {
aliases: ["rb", "gemspec", "podspec", "thor", "irb"],
k: r,
@@ -7345,19 +7571,22 @@ hljs.registerLanguage("ruby", function(e) {
});
/*! line-number */
-!function(n, e) {
+! function (n, e) {
"use strict";
+
function t() {
var n = e.createElement("style");
n.type = "text/css",
- n.innerHTML = h(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}", [f, m, j]),
- e.getElementsByTagName("head")[0].appendChild(n)
+ n.innerHTML = h(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}", [f, m, j]),
+ e.getElementsByTagName("head")[0].appendChild(n)
}
+
function r(t) {
- "complete" === e.readyState ? l(t) : n.addEventListener("DOMContentLoaded", function() {
+ "complete" === e.readyState ? l(t) : n.addEventListener("DOMContentLoaded", function () {
l(t)
})
}
+
function l(t) {
try {
var r = e.querySelectorAll("code.hljs");
@@ -7367,28 +7596,31 @@ hljs.registerLanguage("ruby", function(e) {
n.console.error("LineNumbers error: ", o)
}
}
+
function i(n, e) {
if ("object" == typeof n) {
e = e || {
singleLine: !1
};
var t = e.singleLine ? 0 : 1;
- u(function() {
+ u(function () {
s(n),
- n.innerHTML = o(n.innerHTML, t)
+ n.innerHTML = o(n.innerHTML, t)
})
}
}
+
function o(n, e) {
var t = c(n);
if ("" === t[t.length - 1].trim() && t.pop(),
- t.length > e) {
+ t.length > e) {
for (var r = "", l = 0, i = t.length; l < i; l++)
r += h('
{6}
', [v, g, m, j, p, l + 1, t[l].length > 0 ? t[l] : " "]);
return h('
', [f, r])
}
return n
}
+
function s(n) {
var e = n.childNodes;
for (var t in e)
@@ -7397,6 +7629,7 @@ hljs.registerLanguage("ruby", function(e) {
d(r.textContent) > 0 && (r.childNodes.length > 0 ? s(r) : a(r.parentNode))
}
}
+
function a(n) {
var e = n.className;
if (/hljs-/.test(e)) {
@@ -7405,70 +7638,81 @@ hljs.registerLanguage("ruby", function(e) {
n.innerHTML = l.trim()
}
}
+
function c(n) {
return 0 === n.length ? [] : n.split(L)
}
+
function d(n) {
return (n.trim().match(L) || []).length
}
+
function u(e) {
n.setTimeout(e, 0)
}
+
function h(n, e) {
- return n.replace(/\{(\d+)\}/g, function(n, t) {
+ return n.replace(/\{(\d+)\}/g, function (n, t) {
return e[t] ? e[t] : n
})
}
- var f = "hljs-ln"
- , g = "hljs-ln-line"
- , p = "hljs-ln-code"
- , v = "hljs-ln-numbers"
- , m = "hljs-ln-n"
- , j = "data-line-number"
- , L = /\r\n|\r|\n/g;
+ var f = "hljs-ln",
+ g = "hljs-ln-line",
+ p = "hljs-ln-code",
+ v = "hljs-ln-numbers",
+ m = "hljs-ln-n",
+ j = "data-line-number",
+ L = /\r\n|\r|\n/g;
n.hljs ? (n.hljs.initLineNumbersOnLoad = r,
- n.hljs.lineNumbersBlock = i,
- t()) : n.console.error("highlight.js not detected!")
+ n.hljs.lineNumbersBlock = i,
+ t()) : n.console.error("highlight.js not detected!")
}(window, document);
-!function(n, e) {
+! function (n, e) {
"function" == typeof define && define.amd ? define(e) : "object" == typeof exports ? module.exports = e() : n.NProgress = e()
-}(this, function() {
+}(this, function () {
function n(n, e, t) {
return e > n ? e : n > t ? t : n
}
+
function e(n) {
return 100 * (-1 + n)
}
+
function t(n, t, r) {
var i;
return i = "translate3d" === c.positionUsing ? {
- transform: "translate3d(" + e(n) + "%,0,0)"
- } : "translate" === c.positionUsing ? {
- transform: "translate(" + e(n) + "%,0)"
- } : {
- "margin-left": e(n) + "%"
- },
- i.transition = "all " + t + "ms " + r,
- i
+ transform: "translate3d(" + e(n) + "%,0,0)"
+ } : "translate" === c.positionUsing ? {
+ transform: "translate(" + e(n) + "%,0)"
+ } : {
+ "margin-left": e(n) + "%"
+ },
+ i.transition = "all " + t + "ms " + r,
+ i
}
+
function r(n, e) {
var t = "string" == typeof n ? n : o(n);
return t.indexOf(" " + e + " ") >= 0
}
+
function i(n, e) {
- var t = o(n)
- , i = t + e;
+ var t = o(n),
+ i = t + e;
r(t, e) || (n.className = i.substring(1))
}
+
function s(n, e) {
var t, i = o(n);
r(n, e) && (t = i.replace(" " + e + " ", " "),
- n.className = t.substring(1, t.length - 1))
+ n.className = t.substring(1, t.length - 1))
}
+
function o(n) {
return (" " + (n.className || "") + " ").replace(/\s+/gi, " ")
}
+
function a(n) {
n && n.parentNode && n.parentNode.removeChild(n)
}
@@ -7488,175 +7732,169 @@ hljs.registerLanguage("ruby", function(e) {
parent: "body",
template: '
'
};
- u.configure = function(n) {
- var e, t;
- for (e in n)
- t = n[e],
- void 0 !== t && n.hasOwnProperty(e) && (c[e] = t);
- return this
- }
- ,
- u.status = null,
- u.set = function(e) {
- var r = u.isStarted();
- e = n(e, c.minimum, 1),
- u.status = 1 === e ? null : e;
- var i = u.render(!r)
- , s = i.querySelector(c.barSelector)
- , o = c.speed
- , a = c.easing;
- return i.offsetWidth,
- l(function(n) {
- "" === c.positionUsing && (c.positionUsing = u.getPositioningCSS()),
- f(s, t(e, o, a)),
- 1 === e ? (f(i, {
- transition: "none",
- opacity: 1
- }),
- i.offsetWidth,
- setTimeout(function() {
- f(i, {
- transition: "all " + o + "ms linear",
- opacity: 0
+ u.configure = function (n) {
+ var e, t;
+ for (e in n)
+ t = n[e],
+ void 0 !== t && n.hasOwnProperty(e) && (c[e] = t);
+ return this
+ },
+ u.status = null,
+ u.set = function (e) {
+ var r = u.isStarted();
+ e = n(e, c.minimum, 1),
+ u.status = 1 === e ? null : e;
+ var i = u.render(!r),
+ s = i.querySelector(c.barSelector),
+ o = c.speed,
+ a = c.easing;
+ return i.offsetWidth,
+ l(function (n) {
+ "" === c.positionUsing && (c.positionUsing = u.getPositioningCSS()),
+ f(s, t(e, o, a)),
+ 1 === e ? (f(i, {
+ transition: "none",
+ opacity: 1
+ }),
+ i.offsetWidth,
+ setTimeout(function () {
+ f(i, {
+ transition: "all " + o + "ms linear",
+ opacity: 0
+ }),
+ setTimeout(function () {
+ u.remove(),
+ n()
+ }, o)
+ }, o)) : setTimeout(n, o)
}),
- setTimeout(function() {
- u.remove(),
- n()
- }, o)
- }, o)) : setTimeout(n, o)
- }),
- this
- }
- ,
- u.isStarted = function() {
- return "number" == typeof u.status
- }
- ,
- u.start = function() {
- u.status || u.set(0);
- var n = function() {
- setTimeout(function() {
- u.status && (u.trickle(),
- n())
- }, c.trickleSpeed)
+ this
+ },
+ u.isStarted = function () {
+ return "number" == typeof u.status
+ },
+ u.start = function () {
+ u.status || u.set(0);
+ var n = function () {
+ setTimeout(function () {
+ u.status && (u.trickle(),
+ n())
+ }, c.trickleSpeed)
+ };
+ return c.trickle && n(),
+ this
+ },
+ u.done = function (n) {
+ return n || u.status ? u.inc(.3 + .5 * Math.random()).set(1) : this
+ },
+ u.inc = function (e) {
+ var t = u.status;
+ return t ? ("number" != typeof e && (e = (1 - t) * n(Math.random() * t, .1, .95)),
+ t = n(t + e, 0, .994),
+ u.set(t)) : u.start()
+ },
+ u.trickle = function () {
+ return u.inc(Math.random() * c.trickleRate)
+ },
+ function () {
+ var n = 0,
+ e = 0;
+ u.promise = function (t) {
+ return t && "resolved" !== t.state() ? (0 === e && u.start(),
+ n++,
+ e++,
+ t.always(function () {
+ e--,
+ 0 === e ? (n = 0,
+ u.done()) : u.set((n - e) / n)
+ }),
+ this) : this
+ }
+ }(),
+ u.render = function (n) {
+ if (u.isRendered())
+ return document.getElementById("nprogress");
+ i(document.documentElement, "nprogress-busy");
+ var t = document.createElement("div");
+ t.id = "nprogress",
+ t.innerHTML = c.template;
+ var r, s = t.querySelector(c.barSelector),
+ o = n ? "-100" : e(u.status || 0),
+ l = document.querySelector(c.parent);
+ return f(s, {
+ transition: "all 0 linear",
+ transform: "translate3d(" + o + "%,0,0)"
+ }),
+ c.showSpinner || (r = t.querySelector(c.spinnerSelector),
+ r && a(r)),
+ l != document.body && i(l, "nprogress-custom-parent"),
+ l.appendChild(t),
+ t
+ },
+ u.remove = function () {
+ s(document.documentElement, "nprogress-busy"),
+ s(document.querySelector(c.parent), "nprogress-custom-parent");
+ var n = document.getElementById("nprogress");
+ n && a(n)
+ },
+ u.isRendered = function () {
+ return !!document.getElementById("nprogress")
+ },
+ u.getPositioningCSS = function () {
+ var n = document.body.style,
+ e = "WebkitTransform" in n ? "Webkit" : "MozTransform" in n ? "Moz" : "msTransform" in n ? "ms" : "OTransform" in n ? "O" : "";
+ return e + "Perspective" in n ? "translate3d" : e + "Transform" in n ? "translate" : "margin"
};
- return c.trickle && n(),
- this
- }
- ,
- u.done = function(n) {
- return n || u.status ? u.inc(.3 + .5 * Math.random()).set(1) : this
- }
- ,
- u.inc = function(e) {
- var t = u.status;
- return t ? ("number" != typeof e && (e = (1 - t) * n(Math.random() * t, .1, .95)),
- t = n(t + e, 0, .994),
- u.set(t)) : u.start()
- }
- ,
- u.trickle = function() {
- return u.inc(Math.random() * c.trickleRate)
- }
- ,
- function() {
- var n = 0
- , e = 0;
- u.promise = function(t) {
- return t && "resolved" !== t.state() ? (0 === e && u.start(),
- n++,
- e++,
- t.always(function() {
- e--,
- 0 === e ? (n = 0,
- u.done()) : u.set((n - e) / n)
- }),
- this) : this
- }
- }(),
- u.render = function(n) {
- if (u.isRendered())
- return document.getElementById("nprogress");
- i(document.documentElement, "nprogress-busy");
- var t = document.createElement("div");
- t.id = "nprogress",
- t.innerHTML = c.template;
- var r, s = t.querySelector(c.barSelector), o = n ? "-100" : e(u.status || 0), l = document.querySelector(c.parent);
- return f(s, {
- transition: "all 0 linear",
- transform: "translate3d(" + o + "%,0,0)"
- }),
- c.showSpinner || (r = t.querySelector(c.spinnerSelector),
- r && a(r)),
- l != document.body && i(l, "nprogress-custom-parent"),
- l.appendChild(t),
- t
- }
- ,
- u.remove = function() {
- s(document.documentElement, "nprogress-busy"),
- s(document.querySelector(c.parent), "nprogress-custom-parent");
- var n = document.getElementById("nprogress");
- n && a(n)
- }
- ,
- u.isRendered = function() {
- return !!document.getElementById("nprogress")
- }
- ,
- u.getPositioningCSS = function() {
- var n = document.body.style
- , e = "WebkitTransform"in n ? "Webkit" : "MozTransform"in n ? "Moz" : "msTransform"in n ? "ms" : "OTransform"in n ? "O" : "";
- return e + "Perspective"in n ? "translate3d" : e + "Transform"in n ? "translate" : "margin"
- }
- ;
- var l = function() {
- function n() {
- var t = e.shift();
- t && t(n)
- }
- var e = [];
- return function(t) {
- e.push(t),
- 1 == e.length && n()
- }
- }()
- , f = function() {
- function n(n) {
- return n.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function(n, e) {
- return e.toUpperCase()
- })
- }
- function e(n) {
- var e = document.body.style;
- if (n in e)
- return n;
- for (var t, r = i.length, s = n.charAt(0).toUpperCase() + n.slice(1); r--; )
- if (t = i[r] + s,
- t in e)
- return t;
- return n
- }
- function t(t) {
- return t = n(t),
- s[t] || (s[t] = e(t))
- }
- function r(n, e, r) {
- e = t(e),
- n.style[e] = r
- }
- var i = ["Webkit", "O", "Moz", "ms"]
- , s = {};
- return function(n, e) {
- var t, i, s = arguments;
- if (2 == s.length)
- for (t in e)
- i = e[t],
- void 0 !== i && e.hasOwnProperty(t) && r(n, t, i);
- else
- r(n, s[1], s[2])
- }
- }();
+ var l = function () {
+ function n() {
+ var t = e.shift();
+ t && t(n)
+ }
+ var e = [];
+ return function (t) {
+ e.push(t),
+ 1 == e.length && n()
+ }
+ }(),
+ f = function () {
+ function n(n) {
+ return n.replace(/^-ms-/, "ms-").replace(/-([\da-z])/gi, function (n, e) {
+ return e.toUpperCase()
+ })
+ }
+
+ function e(n) {
+ var e = document.body.style;
+ if (n in e)
+ return n;
+ for (var t, r = i.length, s = n.charAt(0).toUpperCase() + n.slice(1); r--;)
+ if (t = i[r] + s,
+ t in e)
+ return t;
+ return n
+ }
+
+ function t(t) {
+ return t = n(t),
+ s[t] || (s[t] = e(t))
+ }
+
+ function r(n, e, r) {
+ e = t(e),
+ n.style[e] = r
+ }
+ var i = ["Webkit", "O", "Moz", "ms"],
+ s = {};
+ return function (n, e) {
+ var t, i, s = arguments;
+ if (2 == s.length)
+ for (t in e)
+ i = e[t],
+ void 0 !== i && e.hasOwnProperty(t) && r(n, t, i);
+ else
+ r(n, s[1], s[2])
+ }
+ }();
return u
});
@@ -7669,10 +7907,10 @@ hljs.registerLanguage("ruby", function(e) {
exports["POWERMODE"] = factory();
else
root["POWERMODE"] = factory();
-}
-)(this, function() {
- return (function(modules) {
+})(this, function () {
+ return (function (modules) {
var installedModules = {};
+
function __webpack_require__(moduleId) {
if (installedModules[moduleId])
return installedModules[moduleId].exports;
@@ -7689,14 +7927,13 @@ hljs.registerLanguage("ruby", function(e) {
__webpack_require__.c = installedModules;
__webpack_require__.p = "";
return __webpack_require__(0);
- }
- )([(function(module, exports, __webpack_require__) {
+ })([(function (module, exports, __webpack_require__) {
'use strict';
var canvas = document.createElement('canvas');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
canvas.style.cssText = 'position:fixed;top:0;left:0;pointer-events:none;z-index:999999';
- window.addEventListener('resize', function() {
+ window.addEventListener('resize', function () {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
});
@@ -7706,9 +7943,11 @@ hljs.registerLanguage("ruby", function(e) {
var particlePointer = 0;
var rendering = false;
POWERMODE.shake = true;
+
function getRandom(min, max) {
return Math.random() * (max - min) + min;
}
+
function getColor(el) {
if (POWERMODE.colorful) {
var u = getRandom(0, 360);
@@ -7717,6 +7956,7 @@ hljs.registerLanguage("ruby", function(e) {
return window.getComputedStyle(el).color;
}
}
+
function getCaret() {
var el = document.activeElement;
var bcr;
@@ -7749,6 +7989,7 @@ hljs.registerLanguage("ruby", function(e) {
color: 'transparent'
};
}
+
function createParticle(x, y, color) {
return {
x: x,
@@ -7761,6 +8002,7 @@ hljs.registerLanguage("ruby", function(e) {
}
};
}
+
function POWERMODE() {
{
var caret = getCaret();
@@ -7769,15 +8011,14 @@ hljs.registerLanguage("ruby", function(e) {
particles[particlePointer] = createParticle(caret.x, caret.y, caret.color);
particlePointer = (particlePointer + 1) % 500;
}
- }
- {
+ } {
if (POWERMODE.shake) {
var intensity = 1 + 2 * Math.random();
var x = intensity * (Math.random() > 0.5 ? -1 : 1);
var y = intensity * (Math.random() > 0.5 ? -1 : 1);
document.body.style.marginLeft = x + 'px';
document.body.style.marginTop = y + 'px';
- setTimeout(function() {
+ setTimeout(function () {
document.body.style.marginLeft = '';
document.body.style.marginTop = '';
}, 75);
@@ -7786,8 +8027,9 @@ hljs.registerLanguage("ruby", function(e) {
if (!rendering) {
requestAnimationFrame(loop);
}
- }
- ;POWERMODE.colorful = false;
+ };
+ POWERMODE.colorful = false;
+
function loop() {
rendering = true;
context.clearRect(0, 0, canvas.width, canvas.height);
@@ -7813,11 +8055,11 @@ hljs.registerLanguage("ruby", function(e) {
}
}
module.exports = POWERMODE;
- }
- ), (function(module, exports) {
- (function() {
+ }), (function (module, exports) {
+ (function () {
var properties = ['direction', 'boxSizing', 'width', 'height', 'overflowX', 'overflowY', 'borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth', 'borderStyle', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'fontStyle', 'fontVariant', 'fontWeight', 'fontStretch', 'fontSize', 'fontSizeAdjust', 'lineHeight', 'fontFamily', 'textAlign', 'textTransform', 'textIndent', 'textDecoration', 'letterSpacing', 'wordSpacing', 'tabSize', 'MozTabSize'];
var isFirefox = window.mozInnerScreenX != null;
+
function getCaretCoordinates(element, position, options) {
var debug = options && options.debug || false;
if (debug) {
@@ -7837,7 +8079,7 @@ hljs.registerLanguage("ruby", function(e) {
style.position = 'absolute';
if (!debug)
style.visibility = 'hidden';
- properties.forEach(function(prop) {
+ properties.forEach(function (prop) {
style[prop] = computed[prop];
});
if (isFirefox) {
@@ -7869,96 +8111,94 @@ hljs.registerLanguage("ruby", function(e) {
window.getCaretCoordinates = getCaretCoordinates;
}
}());
- }
- )])
+ })])
});
-!function(t, e) {
+! function (t, e) {
"object" == typeof exports ? module.exports = e(t) : "function" == typeof define && define.amd ? define([], e(t)) : t.LazyLoad = e(t)
-}("undefined" != typeof global ? global : this.window || this.global, function(t) {
+}("undefined" != typeof global ? global : this.window || this.global, function (t) {
"use strict";
+
function e(t, e) {
this.settings = r(s, e || {}),
- this.images = t || document.querySelectorAll(this.settings.selector),
- this.observer = null,
- this.init()
+ this.images = t || document.querySelectorAll(this.settings.selector),
+ this.observer = null,
+ this.init()
}
const s = {
- src: "data-src",
- srcset: "data-srcset",
- selector: ".lazyload"
- }
- , r = function() {
- let t = {}
- , e = !1
- , s = 0
- , o = arguments.length;
- "[object Boolean]" === Object.prototype.toString.call(arguments[0]) && (e = arguments[0],
- s++);
- for (; s < o; s++)
- !function(s) {
- for (let o in s)
- Object.prototype.hasOwnProperty.call(s, o) && (e && "[object Object]" === Object.prototype.toString.call(s[o]) ? t[o] = r(!0, t[o], s[o]) : t[o] = s[o])
- }(arguments[s]);
- return t
- };
+ src: "data-src",
+ srcset: "data-srcset",
+ selector: ".lazyload"
+ },
+ r = function () {
+ let t = {},
+ e = !1,
+ s = 0,
+ o = arguments.length;
+ "[object Boolean]" === Object.prototype.toString.call(arguments[0]) && (e = arguments[0],
+ s++);
+ for (; s < o; s++)
+ ! function (s) {
+ for (let o in s)
+ Object.prototype.hasOwnProperty.call(s, o) && (e && "[object Object]" === Object.prototype.toString.call(s[o]) ? t[o] = r(!0, t[o], s[o]) : t[o] = s[o])
+ }(arguments[s]);
+ return t
+ };
if (e.prototype = {
- init: function() {
- if (!t.IntersectionObserver)
- return void this.loadImages();
- let e = this
- , s = {
- root: null,
- rootMargin: "0px",
- threshold: [0]
- };
- this.observer = new IntersectionObserver(function(t) {
- t.forEach(function(t) {
- if (t.intersectionRatio > 0) {
- e.observer.unobserve(t.target);
- let s = t.target.getAttribute(e.settings.src)
- , r = t.target.getAttribute(e.settings.srcset);
- "img" === t.target.tagName.toLowerCase() ? (s && (t.target.src = s),
- r && (t.target.srcset = r)) : t.target.style.backgroundImage = "url(" + s + ")"
- }
+ init: function () {
+ if (!t.IntersectionObserver)
+ return void this.loadImages();
+ let e = this,
+ s = {
+ root: null,
+ rootMargin: "0px",
+ threshold: [0]
+ };
+ this.observer = new IntersectionObserver(function (t) {
+ t.forEach(function (t) {
+ if (t.intersectionRatio > 0) {
+ e.observer.unobserve(t.target);
+ let s = t.target.getAttribute(e.settings.src),
+ r = t.target.getAttribute(e.settings.srcset);
+ "img" === t.target.tagName.toLowerCase() ? (s && (t.target.src = s),
+ r && (t.target.srcset = r)) : t.target.style.backgroundImage = "url(" + s + ")"
+ }
+ })
+ }, s),
+ this.images.forEach(function (t) {
+ e.observer.observe(t)
+ })
+ },
+ loadAndDestroy: function () {
+ this.settings && (this.loadImages(),
+ this.destroy())
+ },
+ loadImages: function () {
+ if (!this.settings)
+ return;
+ let t = this;
+ this.images.forEach(function (e) {
+ let s = e.getAttribute(t.settings.src),
+ r = e.getAttribute(t.settings.srcset);
+ "img" === e.tagName.toLowerCase() ? (s && (e.src = s),
+ r && (e.srcset = r)) : e.style.backgroundImage = "url(" + s + ")"
})
+ },
+ destroy: function () {
+ this.settings && (this.observer.disconnect(),
+ this.settings = null)
}
- ,s),
- this.images.forEach(function(t) {
- e.observer.observe(t)
- })
- },
- loadAndDestroy: function() {
- this.settings && (this.loadImages(),
- this.destroy())
},
- loadImages: function() {
- if (!this.settings)
- return;
- let t = this;
- this.images.forEach(function(e) {
- let s = e.getAttribute(t.settings.src)
- , r = e.getAttribute(t.settings.srcset);
- "img" === e.tagName.toLowerCase() ? (s && (e.src = s),
- r && (e.srcset = r)) : e.style.backgroundImage = "url(" + s + ")"
- })
+ t.lazyload = function (t, s) {
+ return new e(t, s)
},
- destroy: function() {
- this.settings && (this.observer.disconnect(),
- this.settings = null)
- }
- },
- t.lazyload = function(t, s) {
- return new e(t,s)
- }
- ,
- t.jQuery) {
+ t.jQuery) {
const s = t.jQuery;
- s.fn.lazyload = function(t) {
+ s.fn.lazyload = function (t) {
return t = t || {},
- t.attribute = t.attribute || "data-src",
- new e(s.makeArray(this),t),
- this
+ t.attribute = t.attribute || "data-src",
+ new e(s.makeArray(this), t),
+ this
}
}
return e
@@ -7970,103 +8210,111 @@ hljs.registerLanguage("ruby", function(e) {
* MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
*/
var _get = function t(e, i, n) {
- null === e && (e = Function.prototype);
- var s = Object.getOwnPropertyDescriptor(e, i);
- if (void 0 === s) {
- var o = Object.getPrototypeOf(e);
- return null === o ? void 0 : t(o, i, n)
- }
- if ("value"in s)
- return s.value;
- var a = s.get;
- if (void 0 !== a)
- return a.call(n)
-}
- , _createClass = function() {
- function t(t, e) {
- for (var i = 0; i < e.length; i++) {
- var n = e[i];
- n.enumerable = n.enumerable || !1,
- n.configurable = !0,
- "value"in n && (n.writable = !0),
- Object.defineProperty(t, n.key, n)
+ null === e && (e = Function.prototype);
+ var s = Object.getOwnPropertyDescriptor(e, i);
+ if (void 0 === s) {
+ var o = Object.getPrototypeOf(e);
+ return null === o ? void 0 : t(o, i, n)
+ }
+ if ("value" in s)
+ return s.value;
+ var a = s.get;
+ if (void 0 !== a)
+ return a.call(n)
+ },
+ _createClass = function () {
+ function t(t, e) {
+ for (var i = 0; i < e.length; i++) {
+ var n = e[i];
+ n.enumerable = n.enumerable || !1,
+ n.configurable = !0,
+ "value" in n && (n.writable = !0),
+ Object.defineProperty(t, n.key, n)
+ }
}
- }
- return function(e, i, n) {
- return i && t(e.prototype, i),
- n && t(e, n),
- e
- }
-}();
+ return function (e, i, n) {
+ return i && t(e.prototype, i),
+ n && t(e, n),
+ e
+ }
+ }();
+
function _possibleConstructorReturn(t, e) {
if (!t)
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return !e || "object" != typeof e && "function" != typeof e ? t : e
}
+
function _inherits(t, e) {
if ("function" != typeof e && null !== e)
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
t.prototype = Object.create(e && e.prototype, {
- constructor: {
- value: t,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }),
- e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
+ constructor: {
+ value: t,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0
+ }
+ }),
+ e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
}
+
function _classCallCheck(t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function")
}
-window.cash = function() {
- var t = document
- , e = window
- , i = Array.prototype
- , n = i.slice
- , s = i.filter
- , o = i.push
- , a = function() {}
- , r = function(t) {
- return "function" == typeof t && t.call
- }
- , l = function(t) {
- return "string" == typeof t
- }
- , h = /^#[\w-]*$/
- , d = /^\.[\w-]*$/
- , u = /<.+>/
- , c = /^\w+$/;
+window.cash = function () {
+ var t = document,
+ e = window,
+ i = Array.prototype,
+ n = i.slice,
+ s = i.filter,
+ o = i.push,
+ a = function () {},
+ r = function (t) {
+ return "function" == typeof t && t.call
+ },
+ l = function (t) {
+ return "string" == typeof t
+ },
+ h = /^#[\w-]*$/,
+ d = /^\.[\w-]*$/,
+ u = /<.+>/,
+ c = /^\w+$/;
+
function p(e, i) {
i = i || t;
var n = d.test(e) ? i.getElementsByClassName(e.slice(1)) : c.test(e) ? i.getElementsByTagName(e) : i.querySelectorAll(e);
return n
}
var v;
+
function f(e) {
if (!v) {
var i = (v = t.implementation.createHTMLDocument(null)).createElement("base");
i.href = t.location.href,
- v.head.appendChild(i)
+ v.head.appendChild(i)
}
return v.body.innerHTML = e,
- v.body.childNodes
+ v.body.childNodes
}
+
function m(e) {
"loading" !== t.readyState ? e() : t.addEventListener("DOMContentLoaded", e)
}
+
function g(i, n) {
if (!i)
return this;
if (i.cash && i !== e)
return i;
- var s, o = i, a = 0;
+ var s, o = i,
+ a = 0;
if (l(i))
o = h.test(i) ? t.getElementById(i.slice(1)) : u.test(i) ? f(i) : p(i, n);
else if (r(i))
return m(i),
- this;
+ this;
if (!o)
return this;
if (o.nodeType || o === e)
@@ -8077,8 +8325,9 @@ window.cash = function() {
this[a] = o[a];
return this
}
+
function _(t, e) {
- return new g(t,e)
+ return new g(t, e)
}
var y = _.fn = _.prototype = g.prototype = {
cash: !0,
@@ -8089,87 +8338,93 @@ window.cash = function() {
init: g
};
Object.defineProperty(y, "constructor", {
- value: _
- }),
- _.parseHTML = f,
- _.noop = a,
- _.isFunction = r,
- _.isString = l,
- _.extend = y.extend = function(t) {
- t = t || {};
- var e = n.call(arguments)
- , i = e.length
- , s = 1;
- for (1 === e.length && (t = this,
- s = 0); s < i; s++)
- if (e[s])
- for (var o in e[s])
- e[s].hasOwnProperty(o) && (t[o] = e[s][o]);
- return t
- }
- ;
+ value: _
+ }),
+ _.parseHTML = f,
+ _.noop = a,
+ _.isFunction = r,
+ _.isString = l,
+ _.extend = y.extend = function (t) {
+ t = t || {};
+ var e = n.call(arguments),
+ i = e.length,
+ s = 1;
+ for (1 === e.length && (t = this,
+ s = 0); s < i; s++)
+ if (e[s])
+ for (var o in e[s])
+ e[s].hasOwnProperty(o) && (t[o] = e[s][o]);
+ return t
+ };
+
function k(t, e) {
for (var i = t.length, n = 0; n < i && !1 !== e.call(t[n], t[n], n, t); n++)
- ;
+ ;
}
+
function b(t, e) {
var i = t && (t.matches || t.webkitMatchesSelector || t.mozMatchesSelector || t.msMatchesSelector || t.oMatchesSelector);
return !!i && i.call(t, e)
}
+
function w(t) {
- return l(t) ? b : t.cash ? function(e) {
- return t.is(e)
- }
- : function(t, e) {
- return t === e
- }
+ return l(t) ? b : t.cash ? function (e) {
+ return t.is(e)
+ } :
+ function (t, e) {
+ return t === e
+ }
}
+
function C(t) {
- return _(n.call(t).filter(function(t, e, i) {
+ return _(n.call(t).filter(function (t, e, i) {
return i.indexOf(t) === e
}))
}
_.extend({
- merge: function(t, e) {
+ merge: function (t, e) {
for (var i = +e.length, n = t.length, s = 0; s < i; n++,
- s++)
+ s++)
t[n] = e[s];
return t.length = n,
- t
+ t
},
each: k,
matches: b,
unique: C,
isArray: Array.isArray,
- isNumeric: function(t) {
+ isNumeric: function (t) {
return !isNaN(parseFloat(t)) && isFinite(t)
}
});
var E = _.uid = "_cash" + Date.now();
+
function M(t) {
return t[E] = t[E] || {}
}
+
function x(t, e, i) {
return M(t)[e] = i
}
+
function L(t, e) {
var i = M(t);
return void 0 === i[e] && (i[e] = t.dataset ? t.dataset[e] : _(t).attr("data-" + e)),
- i[e]
+ i[e]
}
y.extend({
- data: function(t, e) {
+ data: function (t, e) {
if (l(t))
- return void 0 === e ? L(this[0], t) : this.each(function(i) {
+ return void 0 === e ? L(this[0], t) : this.each(function (i) {
return x(i, t, e)
});
for (var i in t)
this.data(i, t[i]);
return this
},
- removeData: function(t) {
- return this.each(function(e) {
- return function(t, e) {
+ removeData: function (t) {
+ return this.each(function (e) {
+ return function (t, e) {
var i = M(t);
i ? delete i[e] : t.dataset ? delete t.dataset[e] : _(t).removeAttr("data-" + name)
}(e, t)
@@ -8177,196 +8432,201 @@ window.cash = function() {
}
});
var T = /\S+/g;
+
function O(t) {
return l(t) && t.match(T)
}
+
function $(t, e) {
- return t.classList ? t.classList.contains(e) : new RegExp("(^| )" + e + "( |$)","gi").test(t.className)
+ return t.classList ? t.classList.contains(e) : new RegExp("(^| )" + e + "( |$)", "gi").test(t.className)
}
+
function D(t, e, i) {
t.classList ? t.classList.add(e) : i.indexOf(" " + e + " ") && (t.className += " " + e)
}
+
function B(t, e) {
t.classList ? t.classList.remove(e) : t.className = t.className.replace(e, "")
}
y.extend({
- addClass: function(t) {
- var e = O(t);
- return e ? this.each(function(t) {
- var i = " " + t.className + " ";
- k(e, function(e) {
- D(t, e, i)
- })
- }) : this
- },
- attr: function(t, e) {
- if (t) {
+ addClass: function (t) {
+ var e = O(t);
+ return e ? this.each(function (t) {
+ var i = " " + t.className + " ";
+ k(e, function (e) {
+ D(t, e, i)
+ })
+ }) : this
+ },
+ attr: function (t, e) {
+ if (t) {
+ if (l(t))
+ return void 0 === e ? this[0] ? this[0].getAttribute ? this[0].getAttribute(t) : this[0][t] : void 0 : this.each(function (i) {
+ i.setAttribute ? i.setAttribute(t, e) : i[t] = e
+ });
+ for (var i in t)
+ this.attr(i, t[i]);
+ return this
+ }
+ },
+ hasClass: function (t) {
+ var e = !1,
+ i = O(t);
+ return i && i.length && this.each(function (t) {
+ return !(e = $(t, i[0]))
+ }),
+ e
+ },
+ prop: function (t, e) {
if (l(t))
- return void 0 === e ? this[0] ? this[0].getAttribute ? this[0].getAttribute(t) : this[0][t] : void 0 : this.each(function(i) {
- i.setAttribute ? i.setAttribute(t, e) : i[t] = e
+ return void 0 === e ? this[0][t] : this.each(function (i) {
+ i[t] = e
});
for (var i in t)
- this.attr(i, t[i]);
+ this.prop(i, t[i]);
return this
- }
- },
- hasClass: function(t) {
- var e = !1
- , i = O(t);
- return i && i.length && this.each(function(t) {
- return !(e = $(t, i[0]))
- }),
- e
- },
- prop: function(t, e) {
- if (l(t))
- return void 0 === e ? this[0][t] : this.each(function(i) {
- i[t] = e
- });
- for (var i in t)
- this.prop(i, t[i]);
- return this
- },
- removeAttr: function(t) {
- return this.each(function(e) {
- e.removeAttribute ? e.removeAttribute(t) : delete e[t]
- })
- },
- removeClass: function(t) {
- if (!arguments.length)
- return this.attr("class", "");
- var e = O(t);
- return e ? this.each(function(t) {
- k(e, function(e) {
- B(t, e)
+ },
+ removeAttr: function (t) {
+ return this.each(function (e) {
+ e.removeAttribute ? e.removeAttribute(t) : delete e[t]
})
- }) : this
- },
- removeProp: function(t) {
- return this.each(function(e) {
- delete e[t]
- })
- },
- toggleClass: function(t, e) {
- if (void 0 !== e)
- return this[e ? "addClass" : "removeClass"](t);
- var i = O(t);
- return i ? this.each(function(t) {
- var e = " " + t.className + " ";
- k(i, function(i) {
- $(t, i) ? B(t, i) : D(t, i, e)
+ },
+ removeClass: function (t) {
+ if (!arguments.length)
+ return this.attr("class", "");
+ var e = O(t);
+ return e ? this.each(function (t) {
+ k(e, function (e) {
+ B(t, e)
+ })
+ }) : this
+ },
+ removeProp: function (t) {
+ return this.each(function (e) {
+ delete e[t]
})
- }) : this
- }
- }),
- y.extend({
- add: function(t, e) {
- return C(_.merge(this, _(t, e)))
- },
- each: function(t) {
- return k(this, t),
- this
- },
- eq: function(t) {
- return _(this.get(t))
- },
- filter: function(t) {
- if (!t)
- return this;
- var e = r(t) ? t : w(t);
- return _(s.call(this, function(i) {
- return e(i, t)
- }))
- },
- first: function() {
- return this.eq(0)
- },
- get: function(t) {
- return void 0 === t ? n.call(this) : t < 0 ? this[t + this.length] : this[t]
- },
- index: function(t) {
- var e = t ? _(t)[0] : this[0]
- , i = t ? this : _(e).parent().children();
- return n.call(i).indexOf(e)
- },
- last: function() {
- return this.eq(-1)
- }
- });
- var I = function() {
- var t = /(?:^\w|[A-Z]|\b\w)/g
- , e = /[\s-_]+/g;
- return function(i) {
- return i.replace(t, function(t, e) {
- return t[0 === e ? "toLowerCase" : "toUpperCase"]()
- }).replace(e, "")
- }
- }()
- , S = function() {
- var t = {}
- , e = document
- , i = e.createElement("div")
- , n = i.style;
- return function(e) {
- if (e = I(e),
- t[e])
- return t[e];
- var i = e.charAt(0).toUpperCase() + e.slice(1)
- , s = (e + " " + ["webkit", "moz", "ms", "o"].join(i + " ") + i).split(" ");
- return k(s, function(i) {
- if (i in n)
- return t[i] = e = t[e] = i,
- !1
- }),
- t[e]
- }
- }();
- _.prefixedProp = S,
- _.camelCase = I,
- y.extend({
- css: function(t, i) {
- if (l(t))
- return t = S(t),
- arguments.length > 1 ? this.each(function(e) {
- return e.style[t] = i
- }) : e.getComputedStyle(this[0])[t];
- for (var n in t)
- this.css(n, t[n]);
- return this
- }
- });
- function A(t, i) {
- return parseInt(e.getComputedStyle(t[0], null)[i], 10) || 0
- }
- k(["Width", "Height"], function(t) {
+ },
+ toggleClass: function (t, e) {
+ if (void 0 !== e)
+ return this[e ? "addClass" : "removeClass"](t);
+ var i = O(t);
+ return i ? this.each(function (t) {
+ var e = " " + t.className + " ";
+ k(i, function (i) {
+ $(t, i) ? B(t, i) : D(t, i, e)
+ })
+ }) : this
+ }
+ }),
+ y.extend({
+ add: function (t, e) {
+ return C(_.merge(this, _(t, e)))
+ },
+ each: function (t) {
+ return k(this, t),
+ this
+ },
+ eq: function (t) {
+ return _(this.get(t))
+ },
+ filter: function (t) {
+ if (!t)
+ return this;
+ var e = r(t) ? t : w(t);
+ return _(s.call(this, function (i) {
+ return e(i, t)
+ }))
+ },
+ first: function () {
+ return this.eq(0)
+ },
+ get: function (t) {
+ return void 0 === t ? n.call(this) : t < 0 ? this[t + this.length] : this[t]
+ },
+ index: function (t) {
+ var e = t ? _(t)[0] : this[0],
+ i = t ? this : _(e).parent().children();
+ return n.call(i).indexOf(e)
+ },
+ last: function () {
+ return this.eq(-1)
+ }
+ });
+ var I = function () {
+ var t = /(?:^\w|[A-Z]|\b\w)/g,
+ e = /[\s-_]+/g;
+ return function (i) {
+ return i.replace(t, function (t, e) {
+ return t[0 === e ? "toLowerCase" : "toUpperCase"]()
+ }).replace(e, "")
+ }
+ }(),
+ S = function () {
+ var t = {},
+ e = document,
+ i = e.createElement("div"),
+ n = i.style;
+ return function (e) {
+ if (e = I(e),
+ t[e])
+ return t[e];
+ var i = e.charAt(0).toUpperCase() + e.slice(1),
+ s = (e + " " + ["webkit", "moz", "ms", "o"].join(i + " ") + i).split(" ");
+ return k(s, function (i) {
+ if (i in n)
+ return t[i] = e = t[e] = i,
+ !1
+ }),
+ t[e]
+ }
+ }();
+ _.prefixedProp = S,
+ _.camelCase = I,
+ y.extend({
+ css: function (t, i) {
+ if (l(t))
+ return t = S(t),
+ arguments.length > 1 ? this.each(function (e) {
+ return e.style[t] = i
+ }) : e.getComputedStyle(this[0])[t];
+ for (var n in t)
+ this.css(n, t[n]);
+ return this
+ }
+ });
+
+ function A(t, i) {
+ return parseInt(e.getComputedStyle(t[0], null)[i], 10) || 0
+ }
+ k(["Width", "Height"], function (t) {
var e = t.toLowerCase();
- y[e] = function() {
- return this[0].getBoundingClientRect()[e]
- }
- ,
- y["inner" + t] = function() {
- return this[0]["client" + t]
- }
- ,
- y["outer" + t] = function(e) {
- return this[0]["offset" + t] + (e ? A(this, "margin" + ("Width" === t ? "Left" : "Top")) + A(this, "margin" + ("Width" === t ? "Right" : "Bottom")) : 0)
- }
+ y[e] = function () {
+ return this[0].getBoundingClientRect()[e]
+ },
+ y["inner" + t] = function () {
+ return this[0]["client" + t]
+ },
+ y["outer" + t] = function (e) {
+ return this[0]["offset" + t] + (e ? A(this, "margin" + ("Width" === t ? "Left" : "Top")) + A(this, "margin" + ("Width" === t ? "Right" : "Bottom")) : 0)
+ }
});
+
function R(t, e, i) {
- var n, s = L(t, "_cashEvents"), o = s && s[e];
+ var n, s = L(t, "_cashEvents"),
+ o = s && s[e];
o && (i ? (t.removeEventListener(e, i),
- (n = o.indexOf(i)) >= 0 && o.splice(n, 1)) : (k(o, function(i) {
- t.removeEventListener(e, i)
- }),
- o = []))
+ (n = o.indexOf(i)) >= 0 && o.splice(n, 1)) : (k(o, function (i) {
+ t.removeEventListener(e, i)
+ }),
+ o = []))
}
y.extend({
- off: function(t, e) {
- return this.each(function(i) {
+ off: function (t, e) {
+ return this.each(function (i) {
return R(i, t, e)
})
},
- on: function(t, e, i, n) {
+ on: function (t, e, i, n) {
var s;
if (!l(t)) {
for (var o in t)
@@ -8374,6971 +8634,7027 @@ window.cash = function() {
return this
}
return r(e) && (i = e,
- e = null),
- "ready" === t ? (m(i),
- this) : (e && (s = i,
- i = function(t) {
- for (var i = t.target; !b(i, e); ) {
- if (i === this || null === i)
- return i = !1;
- i = i.parentNode
- }
- i && s.call(i, t)
- }
- ),
- this.each(function(e) {
- var s = i;
- n && (s = function() {
- i.apply(this, arguments),
- R(e, t, s)
- }
- ),
- function(t, e, i) {
- var n = L(t, "_cashEvents") || x(t, "_cashEvents", {});
- n[e] = n[e] || [],
- n[e].push(i),
- t.addEventListener(e, i)
- }(e, t, s)
- }))
+ e = null),
+ "ready" === t ? (m(i),
+ this) : (e && (s = i,
+ i = function (t) {
+ for (var i = t.target; !b(i, e);) {
+ if (i === this || null === i)
+ return i = !1;
+ i = i.parentNode
+ }
+ i && s.call(i, t)
+ }
+ ),
+ this.each(function (e) {
+ var s = i;
+ n && (s = function () {
+ i.apply(this, arguments),
+ R(e, t, s)
+ }),
+ function (t, e, i) {
+ var n = L(t, "_cashEvents") || x(t, "_cashEvents", {});
+ n[e] = n[e] || [],
+ n[e].push(i),
+ t.addEventListener(e, i)
+ }(e, t, s)
+ }))
},
- one: function(t, e, i) {
+ one: function (t, e, i) {
return this.on(t, e, i, !0)
},
ready: m,
- trigger: function(t, e) {
+ trigger: function (t, e) {
if (document.createEvent) {
var i = document.createEvent("HTMLEvents");
return i.initEvent(t, !0, !1),
- i = this.extend(i, e),
- this.each(function(t) {
- return t.dispatchEvent(i)
- })
+ i = this.extend(i, e),
+ this.each(function (t) {
+ return t.dispatchEvent(i)
+ })
}
}
});
+
function H(t, e) {
return "&" + encodeURIComponent(t) + "=" + encodeURIComponent(e).replace(/%20/g, "+")
}
+
function P(t) {
var e = t.type;
if (!e)
return null;
switch (e.toLowerCase()) {
- case "select-one":
- return function(t) {
- var e = t.selectedIndex;
- return e >= 0 ? t.options[e].value : null
- }(t);
- case "select-multiple":
- return function(t) {
- var e = [];
- return k(t.options, function(t) {
- t.selected && e.push(t.value)
- }),
- e.length ? e : null
- }(t);
- case "radio":
- case "checkbox":
- return t.checked ? t.value : null;
- default:
- return t.value ? t.value : null
+ case "select-one":
+ return function (t) {
+ var e = t.selectedIndex;
+ return e >= 0 ? t.options[e].value : null
+ }(t);
+ case "select-multiple":
+ return function (t) {
+ var e = [];
+ return k(t.options, function (t) {
+ t.selected && e.push(t.value)
+ }),
+ e.length ? e : null
+ }(t);
+ case "radio":
+ case "checkbox":
+ return t.checked ? t.value : null;
+ default:
+ return t.value ? t.value : null
}
}
y.extend({
- serialize: function() {
+ serialize: function () {
var t = "";
- return k(this[0].elements || this, function(e) {
- if (!e.disabled && "FIELDSET" !== e.tagName) {
- var i = e.name;
- switch (e.type.toLowerCase()) {
- case "file":
- case "reset":
- case "submit":
- case "button":
- break;
- case "select-multiple":
- var n = P(e);
- null !== n && k(n, function(e) {
- t += H(i, e)
- });
- break;
- default:
- var s = P(e);
- null !== s && (t += H(i, s))
+ return k(this[0].elements || this, function (e) {
+ if (!e.disabled && "FIELDSET" !== e.tagName) {
+ var i = e.name;
+ switch (e.type.toLowerCase()) {
+ case "file":
+ case "reset":
+ case "submit":
+ case "button":
+ break;
+ case "select-multiple":
+ var n = P(e);
+ null !== n && k(n, function (e) {
+ t += H(i, e)
+ });
+ break;
+ default:
+ var s = P(e);
+ null !== s && (t += H(i, s))
+ }
}
- }
- }),
- t.substr(1)
+ }),
+ t.substr(1)
},
- val: function(t) {
- return void 0 === t ? P(this[0]) : this.each(function(e) {
+ val: function (t) {
+ return void 0 === t ? P(this[0]) : this.each(function (e) {
return e.value = t
})
}
});
+
function W(t, e, i) {
var n = l(e);
- n || !e.length ? k(t, n ? function(t) {
- return t.insertAdjacentHTML(i ? "afterbegin" : "beforeend", e)
- }
- : function(t, n) {
- return function(t, e, i) {
- if (i) {
- var n = t.childNodes[0];
- t.insertBefore(e, n)
- } else
- t.appendChild(e)
- }(t, 0 === n ? e : e.cloneNode(!0), i)
- }
- ) : k(e, function(e) {
+ n || !e.length ? k(t, n ? function (t) {
+ return t.insertAdjacentHTML(i ? "afterbegin" : "beforeend", e)
+ } :
+ function (t, n) {
+ return function (t, e, i) {
+ if (i) {
+ var n = t.childNodes[0];
+ t.insertBefore(e, n)
+ } else
+ t.appendChild(e)
+ }(t, 0 === n ? e : e.cloneNode(!0), i)
+ }
+ ) : k(e, function (e) {
return W(t, e, i)
})
}
y.extend({
- after: function(t) {
+ after: function (t) {
return _(t).insertAfter(this),
- this
+ this
},
- append: function(t) {
+ append: function (t) {
return W(this, t),
- this
+ this
},
- appendTo: function(t) {
+ appendTo: function (t) {
return W(_(t), this),
- this
+ this
},
- before: function(t) {
+ before: function (t) {
return _(t).insertBefore(this),
- this
+ this
},
- clone: function() {
- return _(this.map(function(t) {
+ clone: function () {
+ return _(this.map(function (t) {
return t.cloneNode(!0)
}))
},
- empty: function() {
+ empty: function () {
return this.html(""),
- this
+ this
},
- html: function(t) {
+ html: function (t) {
if (void 0 === t)
return this[0].innerHTML;
var e = t.nodeType ? t[0].outerHTML : t;
- return this.each(function(t) {
+ return this.each(function (t) {
return t.innerHTML = e
})
},
- insertAfter: function(t) {
+ insertAfter: function (t) {
var e = this;
- return _(t).each(function(t, i) {
- var n = t.parentNode
- , s = t.nextSibling;
- e.each(function(t) {
- n.insertBefore(0 === i ? t : t.cloneNode(!0), s)
- })
- }),
- this
+ return _(t).each(function (t, i) {
+ var n = t.parentNode,
+ s = t.nextSibling;
+ e.each(function (t) {
+ n.insertBefore(0 === i ? t : t.cloneNode(!0), s)
+ })
+ }),
+ this
},
- insertBefore: function(t) {
+ insertBefore: function (t) {
var e = this;
- return _(t).each(function(t, i) {
- var n = t.parentNode;
- e.each(function(e) {
- n.insertBefore(0 === i ? e : e.cloneNode(!0), t)
- })
- }),
- this
+ return _(t).each(function (t, i) {
+ var n = t.parentNode;
+ e.each(function (e) {
+ n.insertBefore(0 === i ? e : e.cloneNode(!0), t)
+ })
+ }),
+ this
},
- prepend: function(t) {
+ prepend: function (t) {
return W(this, t, !0),
- this
+ this
},
- prependTo: function(t) {
+ prependTo: function (t) {
return W(_(t), this, !0),
- this
+ this
},
- remove: function() {
- return this.each(function(t) {
+ remove: function () {
+ return this.each(function (t) {
if (t.parentNode)
return t.parentNode.removeChild(t)
})
},
- text: function(t) {
- return void 0 === t ? this[0].textContent : this.each(function(e) {
+ text: function (t) {
+ return void 0 === t ? this[0].textContent : this.each(function (e) {
return e.textContent = t
})
}
});
var j = t.documentElement;
return y.extend({
- position: function() {
- var t = this[0];
- return {
- left: t.offsetLeft,
- top: t.offsetTop
- }
- },
- offset: function() {
- var t = this[0].getBoundingClientRect();
- return {
- top: t.top + e.pageYOffset - j.clientTop,
- left: t.left + e.pageXOffset - j.clientLeft
- }
- },
- offsetParent: function() {
- return _(this[0].offsetParent)
- }
- }),
- y.extend({
- children: function(t) {
- var e = [];
- return this.each(function(t) {
- o.apply(e, t.children)
- }),
- e = C(e),
- t ? e.filter(function(e) {
- return b(e, t)
- }) : e
- },
- closest: function(t) {
- return !t || this.length < 1 ? _() : this.is(t) ? this.filter(t) : this.parent().closest(t)
- },
- is: function(t) {
- if (!t)
- return !1;
- var e = !1
- , i = w(t);
- return this.each(function(n) {
- return !(e = i(n, t))
- }),
- e
- },
- find: function(t) {
- if (!t || t.nodeType)
- return _(t && this.has(t).length ? t : null);
- var e = [];
- return this.each(function(i) {
- o.apply(e, p(t, i))
- }),
- C(e)
- },
- has: function(t) {
- var e = l(t) ? function(e) {
- return 0 !== p(t, e).length
+ position: function () {
+ var t = this[0];
+ return {
+ left: t.offsetLeft,
+ top: t.offsetTop
+ }
+ },
+ offset: function () {
+ var t = this[0].getBoundingClientRect();
+ return {
+ top: t.top + e.pageYOffset - j.clientTop,
+ left: t.left + e.pageXOffset - j.clientLeft
+ }
+ },
+ offsetParent: function () {
+ return _(this[0].offsetParent)
}
- : function(e) {
- return e.contains(t)
+ }),
+ y.extend({
+ children: function (t) {
+ var e = [];
+ return this.each(function (t) {
+ o.apply(e, t.children)
+ }),
+ e = C(e),
+ t ? e.filter(function (e) {
+ return b(e, t)
+ }) : e
+ },
+ closest: function (t) {
+ return !t || this.length < 1 ? _() : this.is(t) ? this.filter(t) : this.parent().closest(t)
+ },
+ is: function (t) {
+ if (!t)
+ return !1;
+ var e = !1,
+ i = w(t);
+ return this.each(function (n) {
+ return !(e = i(n, t))
+ }),
+ e
+ },
+ find: function (t) {
+ if (!t || t.nodeType)
+ return _(t && this.has(t).length ? t : null);
+ var e = [];
+ return this.each(function (i) {
+ o.apply(e, p(t, i))
+ }),
+ C(e)
+ },
+ has: function (t) {
+ var e = l(t) ? function (e) {
+ return 0 !== p(t, e).length
+ } :
+ function (e) {
+ return e.contains(t)
+ };
+ return this.filter(e)
+ },
+ next: function () {
+ return _(this[0].nextElementSibling)
+ },
+ not: function (t) {
+ if (!t)
+ return this;
+ var e = w(t);
+ return this.filter(function (i) {
+ return !e(i, t)
+ })
+ },
+ parent: function () {
+ var t = [];
+ return this.each(function (e) {
+ e && e.parentNode && t.push(e.parentNode)
+ }),
+ C(t)
+ },
+ parents: function (e) {
+ var i, n = [];
+ return this.each(function (s) {
+ for (i = s; i && i.parentNode && i !== t.body.parentNode;)
+ i = i.parentNode,
+ (!e || e && b(i, e)) && n.push(i)
+ }),
+ C(n)
+ },
+ prev: function () {
+ return _(this[0].previousElementSibling)
+ },
+ siblings: function (t) {
+ var e = this.parent().children(t),
+ i = this[0];
+ return e.filter(function (t) {
+ return t !== i
+ })
}
- ;
- return this.filter(e)
- },
- next: function() {
- return _(this[0].nextElementSibling)
- },
- not: function(t) {
- if (!t)
- return this;
- var e = w(t);
- return this.filter(function(i) {
- return !e(i, t)
- })
- },
- parent: function() {
- var t = [];
- return this.each(function(e) {
- e && e.parentNode && t.push(e.parentNode)
- }),
- C(t)
- },
- parents: function(e) {
- var i, n = [];
- return this.each(function(s) {
- for (i = s; i && i.parentNode && i !== t.body.parentNode; )
- i = i.parentNode,
- (!e || e && b(i, e)) && n.push(i)
- }),
- C(n)
- },
- prev: function() {
- return _(this[0].previousElementSibling)
- },
- siblings: function(t) {
- var e = this.parent().children(t)
- , i = this[0];
- return e.filter(function(t) {
- return t !== i
- })
- }
- }),
- _
+ }),
+ _
}();
-var Component = function() {
+var Component = function () {
function t(e, i, n) {
_classCallCheck(this, t),
- i instanceof Element || console.error(Error(i + " is not an HTML Element"));
+ i instanceof Element || console.error(Error(i + " is not an HTML Element"));
var s = e.getInstance(i);
s && s.destroy(),
- this.el = i,
- this.$el = cash(i)
+ this.el = i,
+ this.$el = cash(i)
}
return _createClass(t, null, [{
- key: "init",
- value: function(t, e, i) {
- var n = null;
- if (e instanceof Element)
- n = new t(e,i);
- else if (e.jquery || e instanceof NodeList) {
- for (var s = [], o = 0; o < e.length; o++)
- s.push(new t(e[o],i));
- n = s
+ key: "init",
+ value: function (t, e, i) {
+ var n = null;
+ if (e instanceof Element)
+ n = new t(e, i);
+ else if (e.jquery || e instanceof NodeList) {
+ for (var s = [], o = 0; o < e.length; o++)
+ s.push(new t(e[o], i));
+ n = s
+ }
+ return n
}
- return n
- }
- }]),
- t
+ }]),
+ t
}();
-!function(t) {
+! function (t) {
t.Package ? M = {} : t.M = {},
- M.jQueryLoaded = !!t.jQuery
+ M.jQueryLoaded = !!t.jQuery
}(window),
-"function" == typeof define && define.amd ? define("M", [], function() {
- return M
-}) : "undefined" == typeof exports || exports.nodeType || ("undefined" != typeof module && !module.nodeType && module.exports && (exports = module.exports = M),
-exports.default = M),
-M.keys = {
- TAB: 9,
- ENTER: 13,
- ESC: 27,
- ARROW_UP: 38,
- ARROW_DOWN: 40
-},
-M.tabPressed = !1;
-var docHandleKeydown = function(t) {
- t.which === M.keys.TAB && (M.tabPressed = !0)
-}
- , docHandleKeyup = function(t) {
- t.which === M.keys.TAB && (M.tabPressed = !1)
-};
+"function" == typeof define && define.amd ? define("M", [], function () {
+ return M
+ }) : "undefined" == typeof exports || exports.nodeType || ("undefined" != typeof module && !module.nodeType && module.exports && (exports = module.exports = M),
+ exports.default = M),
+ M.keys = {
+ TAB: 9,
+ ENTER: 13,
+ ESC: 27,
+ ARROW_UP: 38,
+ ARROW_DOWN: 40
+ },
+ M.tabPressed = !1;
+var docHandleKeydown = function (t) {
+ t.which === M.keys.TAB && (M.tabPressed = !0)
+ },
+ docHandleKeyup = function (t) {
+ t.which === M.keys.TAB && (M.tabPressed = !1)
+ };
document.addEventListener("keydown", docHandleKeydown),
-document.addEventListener("keyup", docHandleKeyup),
-M.initializeJqueryWrapper = function(t, e, i) {
- jQuery.fn[e] = function(n) {
- if (t.prototype[n]) {
- var s = Array.prototype.slice.call(arguments, 1);
- if ("get" === n.slice(0, 3)) {
- var o = this.first()[0][i];
- return o[n].apply(o, s)
+ document.addEventListener("keyup", docHandleKeyup),
+ M.initializeJqueryWrapper = function (t, e, i) {
+ jQuery.fn[e] = function (n) {
+ if (t.prototype[n]) {
+ var s = Array.prototype.slice.call(arguments, 1);
+ if ("get" === n.slice(0, 3)) {
+ var o = this.first()[0][i];
+ return o[n].apply(o, s)
+ }
+ return this.each(function () {
+ var t = this[i];
+ t[n].apply(t, s)
+ })
}
- return this.each(function() {
- var t = this[i];
- t[n].apply(t, s)
- })
+ if ("object" == typeof n || !n)
+ return t.init(this, arguments[0]),
+ this;
+ jQuery.error("Method " + n + " does not exist on jQuery." + e)
}
- if ("object" == typeof n || !n)
- return t.init(this, arguments[0]),
- this;
- jQuery.error("Method " + n + " does not exist on jQuery." + e)
- }
-}
-,
-M.objectSelectorString = function(t) {
- return ((t.prop("tagName") || "") + (t.attr("id") || "") + (t.attr("class") || "")).replace(/\s/g, "")
-}
-,
-M.guid = function() {
- function t() {
- return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1)
- }
- return function() {
- return t() + t() + "-" + t() + "-" + t() + "-" + t() + "-" + t() + t() + t()
- }
-}(),
-M.escapeHash = function(t) {
- return t.replace(/(:|\.|\[|\]|,|=)/g, "\\$1")
-}
-,
-M.elementOrParentIsFixed = function(t) {
- var e = $(t)
- , i = !1;
- return e.add(e.parents()).each(function() {
- if ("fixed" === $(this).css("position"))
- return i = !0,
- !1
- }),
- i
-}
-,
-M.checkWithinContainer = function(t, e, i) {
- var n = {
- top: !1,
- right: !1,
- bottom: !1,
- left: !1
- }
- , s = t.getBoundingClientRect()
- , o = t.scrollLeft
- , a = t.scrollTop
- , r = e.left - o
- , l = e.top - a;
- return (r < s.left + i || r < i) && (n.left = !0),
- (r + e.width > s.right - i || r + e.width > window.innerWidth - i) && (n.right = !0),
- (l < s.top + i || l < i) && (n.top = !0),
- (l + e.height > s.bottom - i || l + e.height > window.innerHeight - i) && (n.bottom = !0),
- n
-}
-,
-M.checkPossibleAlignments = function(t, e, i, n) {
- var s = {
- top: !0,
- right: !0,
- bottom: !0,
- left: !0,
- spaceOnTop: null,
- spaceOnRight: null,
- spaceOnBottom: null,
- spaceOnLeft: null
- }
- , o = "visible" === getComputedStyle(e).overflow
- , a = e.getBoundingClientRect()
- , r = t.getBoundingClientRect()
- , l = e.scrollLeft
- , h = e.scrollTop
- , d = i.left - l
- , u = i.top - h;
- return s.spaceOnRight = o ? window.innerWidth - (r.left + i.width) : e.offsetWidth - (d + i.width),
- (!o && d + i.width > e.offsetWidth || o && r.left + i.width > window.innerWidth) && (s.left = !1),
- s.spaceOnLeft = o ? r.right - i.width : d - i.width + r.width,
- (!o && d - i.width + r.width < 0 || o && r.right - i.width < 0) && (s.right = !1),
- s.spaceOnBottom = o ? window.innerHeight - (r.top + i.height + n) : a.height - (u + i.height + n),
- (!o && u + i.height + n > a.height || o && r.top + i.height + n > window.innerHeight) && (s.top = !1),
- s.spaceOnTop = o ? r.bottom - (i.height + n) : u - (i.height + n),
- (!o && u - i.height - n < 0 || o && r.bottom - i.height - n < 0) && (s.bottom = !1),
- s
-}
-,
-M.getOverflowParent = function(t) {
- return null == t ? null : t === document.body || "visible" !== getComputedStyle(t).overflow ? t : M.getOverflowParent(t.parentElement)
-}
-,
-M.getIdFromTrigger = function(t) {
- var e = t.getAttribute("data-target");
- return e || (e = (e = t.getAttribute("href")) ? e.slice(1) : ""),
- e
-}
-,
-M.getDocumentScrollTop = function() {
- return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0
-}
-,
-M.getDocumentScrollLeft = function() {
- return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0
-}
-;
-var getTime = Date.now || function() {
+ },
+ M.objectSelectorString = function (t) {
+ return ((t.prop("tagName") || "") + (t.attr("id") || "") + (t.attr("class") || "")).replace(/\s/g, "")
+ },
+ M.guid = function () {
+ function t() {
+ return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1)
+ }
+ return function () {
+ return t() + t() + "-" + t() + "-" + t() + "-" + t() + "-" + t() + t() + t()
+ }
+ }(),
+ M.escapeHash = function (t) {
+ return t.replace(/(:|\.|\[|\]|,|=)/g, "\\$1")
+ },
+ M.elementOrParentIsFixed = function (t) {
+ var e = $(t),
+ i = !1;
+ return e.add(e.parents()).each(function () {
+ if ("fixed" === $(this).css("position"))
+ return i = !0,
+ !1
+ }),
+ i
+ },
+ M.checkWithinContainer = function (t, e, i) {
+ var n = {
+ top: !1,
+ right: !1,
+ bottom: !1,
+ left: !1
+ },
+ s = t.getBoundingClientRect(),
+ o = t.scrollLeft,
+ a = t.scrollTop,
+ r = e.left - o,
+ l = e.top - a;
+ return (r < s.left + i || r < i) && (n.left = !0),
+ (r + e.width > s.right - i || r + e.width > window.innerWidth - i) && (n.right = !0),
+ (l < s.top + i || l < i) && (n.top = !0),
+ (l + e.height > s.bottom - i || l + e.height > window.innerHeight - i) && (n.bottom = !0),
+ n
+ },
+ M.checkPossibleAlignments = function (t, e, i, n) {
+ var s = {
+ top: !0,
+ right: !0,
+ bottom: !0,
+ left: !0,
+ spaceOnTop: null,
+ spaceOnRight: null,
+ spaceOnBottom: null,
+ spaceOnLeft: null
+ },
+ o = "visible" === getComputedStyle(e).overflow,
+ a = e.getBoundingClientRect(),
+ r = t.getBoundingClientRect(),
+ l = e.scrollLeft,
+ h = e.scrollTop,
+ d = i.left - l,
+ u = i.top - h;
+ return s.spaceOnRight = o ? window.innerWidth - (r.left + i.width) : e.offsetWidth - (d + i.width),
+ (!o && d + i.width > e.offsetWidth || o && r.left + i.width > window.innerWidth) && (s.left = !1),
+ s.spaceOnLeft = o ? r.right - i.width : d - i.width + r.width,
+ (!o && d - i.width + r.width < 0 || o && r.right - i.width < 0) && (s.right = !1),
+ s.spaceOnBottom = o ? window.innerHeight - (r.top + i.height + n) : a.height - (u + i.height + n),
+ (!o && u + i.height + n > a.height || o && r.top + i.height + n > window.innerHeight) && (s.top = !1),
+ s.spaceOnTop = o ? r.bottom - (i.height + n) : u - (i.height + n),
+ (!o && u - i.height - n < 0 || o && r.bottom - i.height - n < 0) && (s.bottom = !1),
+ s
+ },
+ M.getOverflowParent = function (t) {
+ return null == t ? null : t === document.body || "visible" !== getComputedStyle(t).overflow ? t : M.getOverflowParent(t.parentElement)
+ },
+ M.getIdFromTrigger = function (t) {
+ var e = t.getAttribute("data-target");
+ return e || (e = (e = t.getAttribute("href")) ? e.slice(1) : ""),
+ e
+ },
+ M.getDocumentScrollTop = function () {
+ return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0
+ },
+ M.getDocumentScrollLeft = function () {
+ return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0
+ };
+var getTime = Date.now || function () {
return (new Date).getTime()
-}
-;
-M.throttle = function(t, e, i) {
- var n = void 0
- , s = void 0
- , o = void 0
- , a = null
- , r = 0;
+};
+M.throttle = function (t, e, i) {
+ var n = void 0,
+ s = void 0,
+ o = void 0,
+ a = null,
+ r = 0;
i || (i = {});
- var l = function() {
+ var l = function () {
r = !1 === i.leading ? 0 : getTime(),
- a = null,
- o = t.apply(n, s),
- n = s = null
+ a = null,
+ o = t.apply(n, s),
+ n = s = null
};
- return function() {
+ return function () {
var h = getTime();
r || !1 !== i.leading || (r = h);
var d = e - (h - r);
return n = this,
- s = arguments,
- d <= 0 ? (clearTimeout(a),
- a = null,
- r = h,
- o = t.apply(n, s),
- n = s = null) : a || !1 === i.trailing || (a = setTimeout(l, d)),
- o
+ s = arguments,
+ d <= 0 ? (clearTimeout(a),
+ a = null,
+ r = h,
+ o = t.apply(n, s),
+ n = s = null) : a || !1 === i.trailing || (a = setTimeout(l, d)),
+ o
}
-}
-;
+};
var $jscomp = {
scope: {}
};
-$jscomp.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function(t, e, i) {
- if (i.get || i.set)
- throw new TypeError("ES3 does not support getters and setters.");
- t != Array.prototype && t != Object.prototype && (t[e] = i.value)
-}
-,
-$jscomp.getGlobal = function(t) {
- return "undefined" != typeof window && window === t ? t : "undefined" != typeof global && null != global ? global : t
-}
-,
-$jscomp.global = $jscomp.getGlobal(this),
-$jscomp.SYMBOL_PREFIX = "jscomp_symbol_",
-$jscomp.initSymbol = function() {
- $jscomp.initSymbol = function() {}
- ,
- $jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol)
-}
-,
-$jscomp.symbolCounter_ = 0,
-$jscomp.Symbol = function(t) {
- return $jscomp.SYMBOL_PREFIX + (t || "") + $jscomp.symbolCounter_++
-}
-,
-$jscomp.initSymbolIterator = function() {
- $jscomp.initSymbol();
- var t = $jscomp.global.Symbol.iterator;
- t || (t = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("iterator")),
- "function" != typeof Array.prototype[t] && $jscomp.defineProperty(Array.prototype, t, {
- configurable: !0,
- writable: !0,
- value: function() {
- return $jscomp.arrayIterator(this)
- }
- }),
- $jscomp.initSymbolIterator = function() {}
-}
-,
-$jscomp.arrayIterator = function(t) {
- var e = 0;
- return $jscomp.iteratorPrototype(function() {
- return e < t.length ? {
- done: !1,
- value: t[e++]
- } : {
- done: !0
- }
- })
-}
-,
-$jscomp.iteratorPrototype = function(t) {
- return $jscomp.initSymbolIterator(),
- (t = {
- next: t
- })[$jscomp.global.Symbol.iterator] = function() {
- return this
- }
- ,
- t
-}
-,
-$jscomp.array = $jscomp.array || {},
-$jscomp.iteratorFromArray = function(t, e) {
- $jscomp.initSymbolIterator(),
- t instanceof String && (t += "");
- var i = 0
- , n = {
- next: function() {
- if (i < t.length) {
- var s = i++;
- return {
- value: e(s, t[s]),
- done: !1
+$jscomp.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function (t, e, i) {
+ if (i.get || i.set)
+ throw new TypeError("ES3 does not support getters and setters.");
+ t != Array.prototype && t != Object.prototype && (t[e] = i.value)
+ },
+ $jscomp.getGlobal = function (t) {
+ return "undefined" != typeof window && window === t ? t : "undefined" != typeof global && null != global ? global : t
+ },
+ $jscomp.global = $jscomp.getGlobal(this),
+ $jscomp.SYMBOL_PREFIX = "jscomp_symbol_",
+ $jscomp.initSymbol = function () {
+ $jscomp.initSymbol = function () {},
+ $jscomp.global.Symbol || ($jscomp.global.Symbol = $jscomp.Symbol)
+ },
+ $jscomp.symbolCounter_ = 0,
+ $jscomp.Symbol = function (t) {
+ return $jscomp.SYMBOL_PREFIX + (t || "") + $jscomp.symbolCounter_++
+ },
+ $jscomp.initSymbolIterator = function () {
+ $jscomp.initSymbol();
+ var t = $jscomp.global.Symbol.iterator;
+ t || (t = $jscomp.global.Symbol.iterator = $jscomp.global.Symbol("iterator")),
+ "function" != typeof Array.prototype[t] && $jscomp.defineProperty(Array.prototype, t, {
+ configurable: !0,
+ writable: !0,
+ value: function () {
+ return $jscomp.arrayIterator(this)
}
+ }),
+ $jscomp.initSymbolIterator = function () {}
+ },
+ $jscomp.arrayIterator = function (t) {
+ var e = 0;
+ return $jscomp.iteratorPrototype(function () {
+ return e < t.length ? {
+ done: !1,
+ value: t[e++]
+ } : {
+ done: !0
}
- return n.next = function() {
- return {
- done: !0,
- value: void 0
+ })
+ },
+ $jscomp.iteratorPrototype = function (t) {
+ return $jscomp.initSymbolIterator(),
+ (t = {
+ next: t
+ })[$jscomp.global.Symbol.iterator] = function () {
+ return this
+ },
+ t
+ },
+ $jscomp.array = $jscomp.array || {},
+ $jscomp.iteratorFromArray = function (t, e) {
+ $jscomp.initSymbolIterator(),
+ t instanceof String && (t += "");
+ var i = 0,
+ n = {
+ next: function () {
+ if (i < t.length) {
+ var s = i++;
+ return {
+ value: e(s, t[s]),
+ done: !1
+ }
+ }
+ return n.next = function () {
+ return {
+ done: !0,
+ value: void 0
+ }
+ },
+ n.next()
}
- }
- ,
- n.next()
+ };
+ return n[Symbol.iterator] = function () {
+ return n
+ },
+ n
+ },
+ $jscomp.polyfill = function (t, e, i, n) {
+ if (e) {
+ for (i = $jscomp.global,
+ t = t.split("."),
+ n = 0; n < t.length - 1; n++) {
+ var s = t[n];
+ s in i || (i[s] = {}),
+ i = i[s]
+ }
+ (e = e(n = i[t = t[t.length - 1]])) != n && null != e && $jscomp.defineProperty(i, t, {
+ configurable: !0,
+ writable: !0,
+ value: e
+ })
}
- };
- return n[Symbol.iterator] = function() {
- return n
- }
- ,
- n
-}
-,
-$jscomp.polyfill = function(t, e, i, n) {
- if (e) {
- for (i = $jscomp.global,
- t = t.split("."),
- n = 0; n < t.length - 1; n++) {
- var s = t[n];
- s in i || (i[s] = {}),
- i = i[s]
+ },
+ $jscomp.polyfill("Array.prototype.keys", function (t) {
+ return t || function () {
+ return $jscomp.iteratorFromArray(this, function (t) {
+ return t
+ })
}
- (e = e(n = i[t = t[t.length - 1]])) != n && null != e && $jscomp.defineProperty(i, t, {
- configurable: !0,
- writable: !0,
- value: e
- })
- }
-}
-,
-$jscomp.polyfill("Array.prototype.keys", function(t) {
- return t || function() {
- return $jscomp.iteratorFromArray(this, function(t) {
- return t
- })
- }
-}, "es6-impl", "es3");
+ }, "es6-impl", "es3");
var $jscomp$this = this;
-M.anime = function() {
- function t(t) {
- if (!O.col(t))
- try {
- return document.querySelectorAll(t)
- } catch (t) {}
- }
- function e(t, e) {
- for (var i = t.length, n = 2 <= arguments.length ? arguments[1] : void 0, s = [], o = 0; o < i; o++)
- if (o in t) {
- var a = t[o];
- e.call(n, a, o, t) && s.push(a)
- }
- return s
- }
- function i(t) {
- return t.reduce(function(t, e) {
- return t.concat(O.arr(e) ? i(e) : e)
- }, [])
- }
- function n(e) {
- return O.arr(e) ? e : (O.str(e) && (e = t(e) || e),
- e instanceof NodeList || e instanceof HTMLCollection ? [].slice.call(e) : [e])
- }
- function s(t, e) {
- return t.some(function(t) {
- return t === e
- })
- }
- function o(t) {
- var e, i = {};
- for (e in t)
- i[e] = t[e];
- return i
- }
- function a(t, e) {
- var i, n = o(t);
- for (i in t)
- n[i] = e.hasOwnProperty(i) ? e[i] : t[i];
- return n
- }
- function r(t, e) {
- var i, n = o(t);
- for (i in e)
- n[i] = O.und(t[i]) ? e[i] : t[i];
- return n
- }
- function l(t) {
- if (t = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t))
- return t[2]
- }
- function h(t, e) {
- return O.fnc(t) ? t(e.target, e.id, e.total) : t
- }
- function d(t, e) {
- if (e in t.style)
- return getComputedStyle(t).getPropertyValue(e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0"
- }
- function u(t, e) {
- return O.dom(t) && s(T, e) ? "transform" : O.dom(t) && (t.getAttribute(e) || O.svg(t) && t[e]) ? "attribute" : O.dom(t) && "transform" !== e && d(t, e) ? "css" : null != t[e] ? "object" : void 0
- }
- function c(t, i) {
- switch (u(t, i)) {
- case "transform":
- return function(t, i) {
- var n = function(t) {
- return -1 < t.indexOf("translate") || "perspective" === t ? "px" : -1 < t.indexOf("rotate") || -1 < t.indexOf("skew") ? "deg" : void 0
- }(i)
- , n = -1 < i.indexOf("scale") ? 1 : 0 + n;
- if (!(t = t.style.transform))
- return n;
- for (var s = [], o = [], a = [], r = /(\w+)\((.+?)\)/g; s = r.exec(t); )
- o.push(s[1]),
- a.push(s[2]);
- return (t = e(a, function(t, e) {
- return o[e] === i
- })).length ? t[0] : n
- }(t, i);
- case "css":
- return d(t, i);
- case "attribute":
- return t.getAttribute(i)
- }
- return t[i] || 0
- }
- function p(t, e) {
- var i = /^(\*=|\+=|-=)/.exec(t);
- if (!i)
- return t;
- var n = l(t) || 0;
- switch (e = parseFloat(e),
- t = parseFloat(t.replace(i[0], "")),
- i[0][0]) {
- case "+":
- return e + t + n;
- case "-":
- return e - t + n;
- case "*":
- return e * t + n
- }
- }
- function v(t, e) {
- return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2))
- }
- function f(t) {
- t = t.points;
- for (var e, i = 0, n = 0; n < t.numberOfItems; n++) {
- var s = t.getItem(n);
- 0 < n && (i += v(e, s)),
- e = s
- }
- return i
- }
- function m(t) {
- if (t.getTotalLength)
- return t.getTotalLength();
- switch (t.tagName.toLowerCase()) {
- case "circle":
- return 2 * Math.PI * t.getAttribute("r");
- case "rect":
- return 2 * t.getAttribute("width") + 2 * t.getAttribute("height");
- case "line":
- return v({
- x: t.getAttribute("x1"),
- y: t.getAttribute("y1")
- }, {
- x: t.getAttribute("x2"),
- y: t.getAttribute("y2")
- });
- case "polyline":
- return f(t);
- case "polygon":
- var e = t.points;
- return f(t) + v(e.getItem(e.numberOfItems - 1), e.getItem(0))
- }
- }
- function g(t, e) {
- function i(i) {
- return i = void 0 === i ? 0 : i,
- t.el.getPointAtLength(1 <= e + i ? e + i : 0)
+M.anime = function () {
+ function t(t) {
+ if (!O.col(t))
+ try {
+ return document.querySelectorAll(t)
+ } catch (t) {}
}
- var n = i()
- , s = i(-1)
- , o = i(1);
- switch (t.property) {
- case "x":
- return n.x;
- case "y":
- return n.y;
- case "angle":
- return 180 * Math.atan2(o.y - s.y, o.x - s.x) / Math.PI
+
+ function e(t, e) {
+ for (var i = t.length, n = 2 <= arguments.length ? arguments[1] : void 0, s = [], o = 0; o < i; o++)
+ if (o in t) {
+ var a = t[o];
+ e.call(n, a, o, t) && s.push(a)
+ }
+ return s
}
- }
- function _(t, e) {
- var i, n = /-?\d*\.?\d+/g;
- if (i = O.pth(t) ? t.totalLength : t,
- O.col(i))
- if (O.rgb(i)) {
- var s = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(i);
- i = s ? "rgba(" + s[1] + ",1)" : i
- } else
- i = O.hex(i) ? function(t) {
- t = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function(t, e, i, n) {
- return e + e + i + i + n + n
- });
- var e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
- t = parseInt(e[1], 16);
- var i = parseInt(e[2], 16)
- , e = parseInt(e[3], 16);
- return "rgba(" + t + "," + i + "," + e + ",1)"
- }(i) : O.hsl(i) ? function(t) {
- function e(t, e, i) {
- return 0 > i && (i += 1),
- 1 < i && --i,
- i < 1 / 6 ? t + 6 * (e - t) * i : .5 > i ? e : i < 2 / 3 ? t + (e - t) * (2 / 3 - i) * 6 : t
- }
- var i = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);
- t = parseInt(i[1]) / 360;
- var n = parseInt(i[2]) / 100
- , s = parseInt(i[3]) / 100
- , i = i[4] || 1;
- if (0 == n)
- s = n = t = s;
- else {
- var o = .5 > s ? s * (1 + n) : s + n - s * n
- , a = 2 * s - o
- , s = e(a, o, t + 1 / 3)
- , n = e(a, o, t);
- t = e(a, o, t - 1 / 3)
- }
- return "rgba(" + 255 * s + "," + 255 * n + "," + 255 * t + "," + i + ")"
- }(i) : void 0;
- else
- s = (s = l(i)) ? i.substr(0, i.length - s.length) : i,
- i = e && !/\s/g.test(i) ? s + e : s;
- return {
- original: i += "",
- numbers: i.match(n) ? i.match(n).map(Number) : [0],
- strings: O.str(t) || e ? i.split(n) : []
+
+ function i(t) {
+ return t.reduce(function (t, e) {
+ return t.concat(O.arr(e) ? i(e) : e)
+ }, [])
}
- }
- function y(t) {
- return e(t = t ? i(O.arr(t) ? t.map(n) : n(t)) : [], function(t, e, i) {
- return i.indexOf(t) === e
- })
- }
- function k(t, e) {
- var i = o(e);
- if (O.arr(t)) {
- var s = t.length;
- 2 !== s || O.obj(t[0]) ? O.fnc(e.duration) || (i.duration = e.duration / s) : t = {
- value: t
- }
+
+ function n(e) {
+ return O.arr(e) ? e : (O.str(e) && (e = t(e) || e),
+ e instanceof NodeList || e instanceof HTMLCollection ? [].slice.call(e) : [e])
}
- return n(t).map(function(t, i) {
- return i = i ? 0 : e.delay,
- t = O.obj(t) && !O.pth(t) ? t : {
- value: t
- },
- O.und(t.delay) && (t.delay = i),
- t
- }).map(function(t) {
- return r(t, i)
- })
- }
- function b(t, e) {
- var i;
- return t.tweens.map(function(n) {
- var s = (n = function(t, e) {
- var i, n = {};
- for (i in t) {
- var s = h(t[i], e);
- O.arr(s) && (s = s.map(function(t) {
- return h(t, e)
- }),
- 1 === s.length && (s = s[0])),
- n[i] = s
- }
- return n.duration = parseFloat(n.duration),
- n.delay = parseFloat(n.delay),
- n
- }(n, e)).value
- , o = c(e.target, t.name)
- , a = i ? i.to.original : o
- , a = O.arr(s) ? s[0] : a
- , r = p(O.arr(s) ? s[1] : s, a)
- , o = l(r) || l(a) || l(o);
- return n.from = _(a, o),
- n.to = _(r, o),
- n.start = i ? i.end : t.offset,
- n.end = n.start + n.delay + n.duration,
- n.easing = function(t) {
- return O.arr(t) ? $.apply(this, t) : D[t]
- }(n.easing),
- n.elasticity = (1e3 - Math.min(Math.max(n.elasticity, 1), 999)) / 1e3,
- n.isPath = O.pth(s),
- n.isColor = O.col(n.from.original),
- n.isColor && (n.round = 1),
- i = n
- })
- }
- function w(t, e, i, n) {
- var s = "delay" === t;
- return e.length ? (s ? Math.min : Math.max).apply(Math, e.map(function(e) {
- return e[t]
- })) : s ? n.delay : i.offset + n.delay + n.duration
- }
- function C(t) {
- var n, s = a(x, t), o = a(L, t), l = function(t) {
- var e = y(t);
- return e.map(function(t, i) {
- return {
- target: t,
- id: i,
- total: e.length
- }
- })
- }(t.targets), h = [], d = r(s, o);
- for (n in t)
- d.hasOwnProperty(n) || "targets" === n || h.push({
- name: n,
- offset: d.offset,
- tweens: k(t[n], o)
- });
- c = h,
- t = e(i(l.map(function(t) {
- return c.map(function(e) {
- var i = u(t.target, e.name);
- if (i) {
- var n = b(e, t);
- e = {
- type: i,
- property: e.name,
- animatable: t,
- tweens: n,
- duration: n[n.length - 1].end,
- delay: n[0].delay
- }
- } else
- e = void 0;
- return e
+
+ function s(t, e) {
+ return t.some(function (t) {
+ return t === e
})
- })), function(t) {
- return !O.und(t)
- });
- var c;
- return r(s, {
- children: [],
- animatables: l,
- animations: t,
- duration: w("duration", t, s, o),
- delay: w("delay", t, s, o)
- })
- }
- function E(t) {
- function i() {
- return window.Promise && new Promise(function(t) {
- return c = t
- }
- )
- }
- function n(t) {
- return v.reversed ? v.duration - t : t
- }
- function s(t) {
- for (var i = 0, n = {}, s = v.animations, o = s.length; i < o; ) {
- var a = s[i]
- , r = a.animatable
- , l = a.tweens
- , h = l.length - 1
- , u = l[h];
- h && (u = e(l, function(e) {
- return t < e.end
- })[0] || u);
- for (var l = Math.min(Math.max(t - u.start - u.delay, 0), u.duration) / u.duration, c = isNaN(l) ? 1 : u.easing(l, u.elasticity), l = u.to.strings, p = u.round, h = [], f = void 0, f = u.to.numbers.length, m = 0; m < f; m++) {
- var _ = void 0
- , _ = u.to.numbers[m]
- , y = u.from.numbers[m]
- , _ = u.isPath ? g(u.value, c * _) : y + c * (_ - y);
- p && (u.isColor && 2 < m || (_ = Math.round(_ * p) / p)),
- h.push(_)
- }
- if (u = l.length)
- for (f = l[0],
- c = 0; c < u; c++)
- p = l[c + 1],
- m = h[c],
- isNaN(m) || (f = p ? f + (m + p) : f + (m + " "));
- else
- f = h[0];
- B[a.type](r.target, a.property, f, n, r.id),
- a.currentValue = f,
- i++
- }
- if (i = Object.keys(n).length)
- for (s = 0; s < i; s++)
- M || (M = d(document.body, "transform") ? "transform" : "-webkit-transform"),
- v.animatables[s].target.style[M] = n[s].join(" ");
- v.currentTime = t,
- v.progress = t / v.duration * 100
}
+
function o(t) {
- v[t] && v[t](v)
- }
- function a() {
- v.remaining && !0 !== v.remaining && v.remaining--
- }
- function r(t) {
- var e = v.duration
- , r = v.offset
- , d = r + v.delay
- , f = v.currentTime
- , m = v.reversed
- , g = n(t);
- if (v.children.length) {
- var _ = v.children
- , y = _.length;
- if (g >= v.currentTime)
- for (var k = 0; k < y; k++)
- _[k].seek(g);
- else
- for (; y--; )
- _[y].seek(g)
- }
- (g >= d || !e) && (v.began || (v.began = !0,
- o("begin")),
- o("run")),
- g > r && g < e ? s(g) : (g <= r && 0 !== f && (s(0),
- m && a()),
- (g >= e && f !== e || !e) && (s(e),
- m || a())),
- o("update"),
- t >= e && (v.remaining ? (h = l,
- "alternate" === v.direction && (v.reversed = !v.reversed)) : (v.pause(),
- v.completed || (v.completed = !0,
- o("complete"),
- "Promise"in window && (c(),
- p = i()))),
- u = 0)
- }
- t = void 0 === t ? {} : t;
- var l, h, u = 0, c = null, p = i(), v = C(t);
- return v.reset = function() {
- var t = v.direction
- , e = v.loop;
- for (v.currentTime = 0,
- v.progress = 0,
- v.paused = !0,
- v.began = !1,
- v.completed = !1,
- v.reversed = "reverse" === t,
- v.remaining = "alternate" === t && 1 === e ? 2 : e,
- s(0),
- t = v.children.length; t--; )
- v.children[t].reset()
- }
- ,
- v.tick = function(t) {
- l = t,
- h || (h = l),
- r((u + l - h) * E.speed)
+ var e, i = {};
+ for (e in t)
+ i[e] = t[e];
+ return i
}
- ,
- v.seek = function(t) {
- r(n(t))
+
+ function a(t, e) {
+ var i, n = o(t);
+ for (i in t)
+ n[i] = e.hasOwnProperty(i) ? e[i] : t[i];
+ return n
}
- ,
- v.pause = function() {
- var t = I.indexOf(v);
- -1 < t && I.splice(t, 1),
- v.paused = !0
+
+ function r(t, e) {
+ var i, n = o(t);
+ for (i in e)
+ n[i] = O.und(t[i]) ? e[i] : t[i];
+ return n
}
- ,
- v.play = function() {
- v.paused && (v.paused = !1,
- h = 0,
- u = n(v.currentTime),
- I.push(v),
- S || A())
+
+ function l(t) {
+ if (t = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t))
+ return t[2]
}
- ,
- v.reverse = function() {
- v.reversed = !v.reversed,
- h = 0,
- u = n(v.currentTime)
+
+ function h(t, e) {
+ return O.fnc(t) ? t(e.target, e.id, e.total) : t
}
- ,
- v.restart = function() {
- v.pause(),
- v.reset(),
- v.play()
+
+ function d(t, e) {
+ if (e in t.style)
+ return getComputedStyle(t).getPropertyValue(e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0"
}
- ,
- v.finished = p,
- v.reset(),
- v.autoplay && v.play(),
- v
- }
- var M, x = {
- update: void 0,
- begin: void 0,
- run: void 0,
- complete: void 0,
- loop: 1,
- direction: "normal",
- autoplay: !0,
- offset: 0
- }, L = {
- duration: 1e3,
- delay: 0,
- easing: "easeOutElastic",
- elasticity: 500,
- round: 0
- }, T = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "), O = {
- arr: function(t) {
- return Array.isArray(t)
- },
- obj: function(t) {
- return -1 < Object.prototype.toString.call(t).indexOf("Object")
- },
- pth: function(t) {
- return O.obj(t) && t.hasOwnProperty("totalLength")
- },
- svg: function(t) {
- return t instanceof SVGElement
- },
- dom: function(t) {
- return t.nodeType || O.svg(t)
- },
- str: function(t) {
- return "string" == typeof t
- },
- fnc: function(t) {
- return "function" == typeof t
- },
- und: function(t) {
- return void 0 === t
- },
- hex: function(t) {
- return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)
- },
- rgb: function(t) {
- return /^rgb/.test(t)
- },
- hsl: function(t) {
- return /^hsl/.test(t)
- },
- col: function(t) {
- return O.hex(t) || O.rgb(t) || O.hsl(t)
+
+ function u(t, e) {
+ return O.dom(t) && s(T, e) ? "transform" : O.dom(t) && (t.getAttribute(e) || O.svg(t) && t[e]) ? "attribute" : O.dom(t) && "transform" !== e && d(t, e) ? "css" : null != t[e] ? "object" : void 0
}
- }, $ = function() {
- function t(t, e, i) {
- return (((1 - 3 * i + 3 * e) * t + (3 * i - 6 * e)) * t + 3 * e) * t
+
+ function c(t, i) {
+ switch (u(t, i)) {
+ case "transform":
+ return function (t, i) {
+ var n = function (t) {
+ return -1 < t.indexOf("translate") || "perspective" === t ? "px" : -1 < t.indexOf("rotate") || -1 < t.indexOf("skew") ? "deg" : void 0
+ }(i),
+ n = -1 < i.indexOf("scale") ? 1 : 0 + n;
+ if (!(t = t.style.transform))
+ return n;
+ for (var s = [], o = [], a = [], r = /(\w+)\((.+?)\)/g; s = r.exec(t);)
+ o.push(s[1]),
+ a.push(s[2]);
+ return (t = e(a, function (t, e) {
+ return o[e] === i
+ })).length ? t[0] : n
+ }(t, i);
+ case "css":
+ return d(t, i);
+ case "attribute":
+ return t.getAttribute(i)
+ }
+ return t[i] || 0
}
- return function(e, i, n, s) {
- if (0 <= e && 1 >= e && 0 <= n && 1 >= n) {
- var o = new Float32Array(11);
- if (e !== i || n !== s)
- for (var a = 0; 11 > a; ++a)
- o[a] = t(.1 * a, e, n);
- return function(a) {
- if (e === i && n === s)
- return a;
- if (0 === a)
- return 0;
- if (1 === a)
- return 1;
- for (var r = 0, l = 1; 10 !== l && o[l] <= a; ++l)
- r += .1;
- var l = r + (a - o[--l]) / (o[l + 1] - o[l]) * .1
- , h = 3 * (1 - 3 * n + 3 * e) * l * l + 2 * (3 * n - 6 * e) * l + 3 * e;
- if (.001 <= h) {
- for (r = 0; 4 > r && 0 != (h = 3 * (1 - 3 * n + 3 * e) * l * l + 2 * (3 * n - 6 * e) * l + 3 * e); ++r)
- var d = t(l, e, n) - a
- , l = l - d / h;
- a = l
- } else if (0 === h)
- a = l;
- else {
- var l = r
- , r = r + .1
- , u = 0;
- do {
- 0 < (h = t(d = l + (r - l) / 2, e, n) - a) ? r = d : l = d
- } while (1e-7 < Math.abs(h) && 10 > ++u);a = d
- }
- return t(a, i, s)
- }
+
+ function p(t, e) {
+ var i = /^(\*=|\+=|-=)/.exec(t);
+ if (!i)
+ return t;
+ var n = l(t) || 0;
+ switch (e = parseFloat(e),
+ t = parseFloat(t.replace(i[0], "")),
+ i[0][0]) {
+ case "+":
+ return e + t + n;
+ case "-":
+ return e - t + n;
+ case "*":
+ return e * t + n
}
}
- }(), D = function() {
- function t(t, e) {
- return 0 === t || 1 === t ? t : -Math.pow(2, 10 * (t - 1)) * Math.sin(2 * (t - 1 - e / (2 * Math.PI) * Math.asin(1)) * Math.PI / e)
+
+ function v(t, e) {
+ return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2))
}
- var e, i = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "), n = {
- In: [[.55, .085, .68, .53], [.55, .055, .675, .19], [.895, .03, .685, .22], [.755, .05, .855, .06], [.47, 0, .745, .715], [.95, .05, .795, .035], [.6, .04, .98, .335], [.6, -.28, .735, .045], t],
- Out: [[.25, .46, .45, .94], [.215, .61, .355, 1], [.165, .84, .44, 1], [.23, 1, .32, 1], [.39, .575, .565, 1], [.19, 1, .22, 1], [.075, .82, .165, 1], [.175, .885, .32, 1.275], function(e, i) {
- return 1 - t(1 - e, i)
- }
- ],
- InOut: [[.455, .03, .515, .955], [.645, .045, .355, 1], [.77, 0, .175, 1], [.86, 0, .07, 1], [.445, .05, .55, .95], [1, 0, 0, 1], [.785, .135, .15, .86], [.68, -.55, .265, 1.55], function(e, i) {
- return .5 > e ? t(2 * e, i) / 2 : 1 - t(-2 * e + 2, i) / 2
+
+ function f(t) {
+ t = t.points;
+ for (var e, i = 0, n = 0; n < t.numberOfItems; n++) {
+ var s = t.getItem(n);
+ 0 < n && (i += v(e, s)),
+ e = s
}
- ]
- }, s = {
- linear: $(.25, .25, .75, .75)
- }, o = {};
- for (e in n)
- o.type = e,
- n[o.type].forEach(function(t) {
- return function(e, n) {
- s["ease" + t.type + i[n]] = O.fnc(e) ? e : $.apply($jscomp$this, e)
- }
- }(o)),
- o = {
- type: o.type
- };
- return s
- }(), B = {
- css: function(t, e, i) {
- return t.style[e] = i
- },
- attribute: function(t, e, i) {
- return t.setAttribute(e, i)
- },
- object: function(t, e, i) {
- return t[e] = i
- },
- transform: function(t, e, i, n, s) {
- n[s] || (n[s] = []),
- n[s].push(e + "(" + i + ")")
+ return i
}
- }, I = [], S = 0, A = function() {
- function t() {
- S = requestAnimationFrame(e)
+
+ function m(t) {
+ if (t.getTotalLength)
+ return t.getTotalLength();
+ switch (t.tagName.toLowerCase()) {
+ case "circle":
+ return 2 * Math.PI * t.getAttribute("r");
+ case "rect":
+ return 2 * t.getAttribute("width") + 2 * t.getAttribute("height");
+ case "line":
+ return v({
+ x: t.getAttribute("x1"),
+ y: t.getAttribute("y1")
+ }, {
+ x: t.getAttribute("x2"),
+ y: t.getAttribute("y2")
+ });
+ case "polyline":
+ return f(t);
+ case "polygon":
+ var e = t.points;
+ return f(t) + v(e.getItem(e.numberOfItems - 1), e.getItem(0))
+ }
}
- function e(e) {
- var i = I.length;
- if (i) {
- for (var n = 0; n < i; )
- I[n] && I[n].tick(e),
- n++;
- t()
- } else
- cancelAnimationFrame(S),
- S = 0
+
+ function g(t, e) {
+ function i(i) {
+ return i = void 0 === i ? 0 : i,
+ t.el.getPointAtLength(1 <= e + i ? e + i : 0)
+ }
+ var n = i(),
+ s = i(-1),
+ o = i(1);
+ switch (t.property) {
+ case "x":
+ return n.x;
+ case "y":
+ return n.y;
+ case "angle":
+ return 180 * Math.atan2(o.y - s.y, o.x - s.x) / Math.PI
+ }
}
- return t
- }();
- return E.version = "2.2.0",
- E.speed = 1,
- E.running = I,
- E.remove = function(t) {
- t = y(t);
- for (var e = I.length; e--; )
- for (var i = I[e], n = i.animations, o = n.length; o--; )
- s(t, n[o].animatable.target) && (n.splice(o, 1),
- n.length || i.pause())
- }
- ,
- E.getValue = c,
- E.path = function(e, i) {
- var n = O.str(e) ? t(e)[0] : e
- , s = i || 100;
- return function(t) {
+
+ function _(t, e) {
+ var i, n = /-?\d*\.?\d+/g;
+ if (i = O.pth(t) ? t.totalLength : t,
+ O.col(i))
+ if (O.rgb(i)) {
+ var s = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(i);
+ i = s ? "rgba(" + s[1] + ",1)" : i
+ } else
+ i = O.hex(i) ? function (t) {
+ t = t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (t, e, i, n) {
+ return e + e + i + i + n + n
+ });
+ var e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
+ t = parseInt(e[1], 16);
+ var i = parseInt(e[2], 16),
+ e = parseInt(e[3], 16);
+ return "rgba(" + t + "," + i + "," + e + ",1)"
+ }(i) : O.hsl(i) ? function (t) {
+ function e(t, e, i) {
+ return 0 > i && (i += 1),
+ 1 < i && --i,
+ i < 1 / 6 ? t + 6 * (e - t) * i : .5 > i ? e : i < 2 / 3 ? t + (e - t) * (2 / 3 - i) * 6 : t
+ }
+ var i = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);
+ t = parseInt(i[1]) / 360;
+ var n = parseInt(i[2]) / 100,
+ s = parseInt(i[3]) / 100,
+ i = i[4] || 1;
+ if (0 == n)
+ s = n = t = s;
+ else {
+ var o = .5 > s ? s * (1 + n) : s + n - s * n,
+ a = 2 * s - o,
+ s = e(a, o, t + 1 / 3),
+ n = e(a, o, t);
+ t = e(a, o, t - 1 / 3)
+ }
+ return "rgba(" + 255 * s + "," + 255 * n + "," + 255 * t + "," + i + ")"
+ }(i) : void 0;
+ else
+ s = (s = l(i)) ? i.substr(0, i.length - s.length) : i,
+ i = e && !/\s/g.test(i) ? s + e : s;
return {
- el: n,
- property: t,
- totalLength: m(n) * (s / 100)
+ original: i += "",
+ numbers: i.match(n) ? i.match(n).map(Number) : [0],
+ strings: O.str(t) || e ? i.split(n) : []
}
}
- }
- ,
- E.setDashoffset = function(t) {
- var e = m(t);
- return t.setAttribute("stroke-dasharray", e),
- e
- }
- ,
- E.bezier = $,
- E.easings = D,
- E.timeline = function(t) {
- var e = E(t);
- return e.pause(),
- e.duration = 0,
- e.add = function(i) {
- return e.children.forEach(function(t) {
- t.began = !0,
- t.completed = !0
- }),
- n(i).forEach(function(i) {
- var n = r(i, a(L, t || {}));
- n.targets = n.targets || t.targets,
- i = e.duration;
- var s = n.offset;
- n.autoplay = !1,
- n.direction = e.direction,
- n.offset = O.und(s) ? i : p(s, i),
- e.began = !0,
- e.completed = !0,
- e.seek(n.offset),
- (n = E(n)).began = !0,
- n.completed = !0,
- n.duration > i && (e.duration = n.duration),
- e.children.push(n)
- }),
- e.seek(0),
- e.reset(),
- e.autoplay && e.restart(),
- e
- }
- ,
- e
- }
- ,
- E.random = function(t, e) {
- return Math.floor(Math.random() * (e - t + 1)) + t
- }
- ,
- E
-}(),
-function(t, e) {
- "use strict";
- var i = {
- accordion: !0,
- onOpenStart: void 0,
- onOpenEnd: void 0,
- onCloseStart: void 0,
- onCloseEnd: void 0,
- inDuration: 300,
- outDuration: 300
- }
- , n = function(n) {
- _inherits(s, Component);
- function s(e, i) {
- _classCallCheck(this, s);
- var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
- n.el.M_Collapsible = n,
- n.options = t.extend({}, s.defaults, i),
- n._setupEventHandlers();
- var o = n.$el.children("li.active").children(".collapsible-body");
- return n.options.accordion ? o.first().css("display", "block") : o.css("display", "block"),
- n
+
+ function y(t) {
+ return e(t = t ? i(O.arr(t) ? t.map(n) : n(t)) : [], function (t, e, i) {
+ return i.indexOf(t) === e
+ })
}
- return _createClass(s, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this.el.M_Collapsible = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleCollapsibleClickBound = this._handleCollapsibleClick.bind(this),
- this.el.addEventListener("click", this._handleCollapsibleClickBound)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.el.removeEventListener("click", this._handleCollapsibleClickBound)
- }
- }, {
- key: "_handleCollapsibleClick",
- value: function(e) {
- var i = t(e.target).closest(".collapsible-header");
- if (e.target && i.length) {
- var n = i.closest(".collapsible");
- if (n[0] === this.el) {
- var s = i.closest("li")
- , o = n.children("li")
- , a = s[0].classList.contains("active")
- , r = o.index(s);
- a ? this.close(r) : this.open(r)
- }
+
+ function k(t, e) {
+ var i = o(e);
+ if (O.arr(t)) {
+ var s = t.length;
+ 2 !== s || O.obj(t[0]) ? O.fnc(e.duration) || (i.duration = e.duration / s) : t = {
+ value: t
}
}
- }, {
- key: "_animateIn",
- value: function(t) {
- var i = this
- , n = this.$el.children("li").eq(t);
- if (n.length) {
- var s = n.children(".collapsible-body");
- e.remove(s[0]),
- s.css({
- display: "block",
- overflow: "hidden",
- height: 0,
- paddingTop: "",
- paddingBottom: ""
- });
- var o = s.css("padding-top")
- , a = s.css("padding-bottom")
- , r = s[0].scrollHeight;
- s.css({
- paddingTop: 0,
- paddingBottom: 0
- }),
- e({
- targets: s[0],
- height: r,
- paddingTop: o,
- paddingBottom: a,
- duration: this.options.inDuration,
- easing: "easeInOutCubic",
- complete: function(t) {
- s.css({
- overflow: "",
- paddingTop: "",
- paddingBottom: "",
- height: ""
- }),
- "function" == typeof i.options.onOpenEnd && i.options.onOpenEnd.call(i, n[0])
+ return n(t).map(function (t, i) {
+ return i = i ? 0 : e.delay,
+ t = O.obj(t) && !O.pth(t) ? t : {
+ value: t
+ },
+ O.und(t.delay) && (t.delay = i),
+ t
+ }).map(function (t) {
+ return r(t, i)
+ })
+ }
+
+ function b(t, e) {
+ var i;
+ return t.tweens.map(function (n) {
+ var s = (n = function (t, e) {
+ var i, n = {};
+ for (i in t) {
+ var s = h(t[i], e);
+ O.arr(s) && (s = s.map(function (t) {
+ return h(t, e)
+ }),
+ 1 === s.length && (s = s[0])),
+ n[i] = s
}
- })
- }
- }
- }, {
- key: "_animateOut",
- value: function(t) {
- var i = this
- , n = this.$el.children("li").eq(t);
- if (n.length) {
- var s = n.children(".collapsible-body");
- e.remove(s[0]),
- s.css("overflow", "hidden"),
- e({
- targets: s[0],
- height: 0,
- paddingTop: 0,
- paddingBottom: 0,
- duration: this.options.outDuration,
- easing: "easeInOutCubic",
- complete: function() {
- s.css({
- height: "",
- overflow: "",
- padding: "",
- display: ""
- }),
- "function" == typeof i.options.onCloseEnd && i.options.onCloseEnd.call(i, n[0])
+ return n.duration = parseFloat(n.duration),
+ n.delay = parseFloat(n.delay),
+ n
+ }(n, e)).value,
+ o = c(e.target, t.name),
+ a = i ? i.to.original : o,
+ a = O.arr(s) ? s[0] : a,
+ r = p(O.arr(s) ? s[1] : s, a),
+ o = l(r) || l(a) || l(o);
+ return n.from = _(a, o),
+ n.to = _(r, o),
+ n.start = i ? i.end : t.offset,
+ n.end = n.start + n.delay + n.duration,
+ n.easing = function (t) {
+ return O.arr(t) ? $.apply(this, t) : D[t]
+ }(n.easing),
+ n.elasticity = (1e3 - Math.min(Math.max(n.elasticity, 1), 999)) / 1e3,
+ n.isPath = O.pth(s),
+ n.isColor = O.col(n.from.original),
+ n.isColor && (n.round = 1),
+ i = n
+ })
+ }
+
+ function w(t, e, i, n) {
+ var s = "delay" === t;
+ return e.length ? (s ? Math.min : Math.max).apply(Math, e.map(function (e) {
+ return e[t]
+ })) : s ? n.delay : i.offset + n.delay + n.duration
+ }
+
+ function C(t) {
+ var n, s = a(x, t),
+ o = a(L, t),
+ l = function (t) {
+ var e = y(t);
+ return e.map(function (t, i) {
+ return {
+ target: t,
+ id: i,
+ total: e.length
}
})
- }
+ }(t.targets),
+ h = [],
+ d = r(s, o);
+ for (n in t)
+ d.hasOwnProperty(n) || "targets" === n || h.push({
+ name: n,
+ offset: d.offset,
+ tweens: k(t[n], o)
+ });
+ c = h,
+ t = e(i(l.map(function (t) {
+ return c.map(function (e) {
+ var i = u(t.target, e.name);
+ if (i) {
+ var n = b(e, t);
+ e = {
+ type: i,
+ property: e.name,
+ animatable: t,
+ tweens: n,
+ duration: n[n.length - 1].end,
+ delay: n[0].delay
+ }
+ } else
+ e = void 0;
+ return e
+ })
+ })), function (t) {
+ return !O.und(t)
+ });
+ var c;
+ return r(s, {
+ children: [],
+ animatables: l,
+ animations: t,
+ duration: w("duration", t, s, o),
+ delay: w("delay", t, s, o)
+ })
+ }
+
+ function E(t) {
+ function i() {
+ return window.Promise && new Promise(function (t) {
+ return c = t
+ })
}
- }, {
- key: "open",
- value: function(e) {
- var i = this
- , n = this.$el.children("li").eq(e);
- if (n.length && !n[0].classList.contains("active")) {
- if ("function" == typeof this.options.onOpenStart && this.options.onOpenStart.call(this, n[0]),
- this.options.accordion) {
- var s = this.$el.children("li");
- this.$el.children("li.active").each(function(e) {
- var n = s.index(t(e));
- i.close(n)
- })
+
+ function n(t) {
+ return v.reversed ? v.duration - t : t
+ }
+
+ function s(t) {
+ for (var i = 0, n = {}, s = v.animations, o = s.length; i < o;) {
+ var a = s[i],
+ r = a.animatable,
+ l = a.tweens,
+ h = l.length - 1,
+ u = l[h];
+ h && (u = e(l, function (e) {
+ return t < e.end
+ })[0] || u);
+ for (var l = Math.min(Math.max(t - u.start - u.delay, 0), u.duration) / u.duration, c = isNaN(l) ? 1 : u.easing(l, u.elasticity), l = u.to.strings, p = u.round, h = [], f = void 0, f = u.to.numbers.length, m = 0; m < f; m++) {
+ var _ = void 0,
+ _ = u.to.numbers[m],
+ y = u.from.numbers[m],
+ _ = u.isPath ? g(u.value, c * _) : y + c * (_ - y);
+ p && (u.isColor && 2 < m || (_ = Math.round(_ * p) / p)),
+ h.push(_)
}
- n[0].classList.add("active"),
- this._animateIn(e)
+ if (u = l.length)
+ for (f = l[0],
+ c = 0; c < u; c++)
+ p = l[c + 1],
+ m = h[c],
+ isNaN(m) || (f = p ? f + (m + p) : f + (m + " "));
+ else
+ f = h[0];
+ B[a.type](r.target, a.property, f, n, r.id),
+ a.currentValue = f,
+ i++
}
+ if (i = Object.keys(n).length)
+ for (s = 0; s < i; s++)
+ M || (M = d(document.body, "transform") ? "transform" : "-webkit-transform"),
+ v.animatables[s].target.style[M] = n[s].join(" ");
+ v.currentTime = t,
+ v.progress = t / v.duration * 100
}
- }, {
- key: "close",
- value: function(t) {
- var e = this.$el.children("li").eq(t);
- e.length && e[0].classList.contains("active") && ("function" == typeof this.options.onCloseStart && this.options.onCloseStart.call(this, e[0]),
- e[0].classList.remove("active"),
- this._animateOut(t))
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Collapsible
- }
- }, {
- key: "defaults",
- get: function() {
- return i
+
+ function o(t) {
+ v[t] && v[t](v)
}
- }]),
- s
- }();
- M.Collapsible = n,
- M.jQueryLoaded && M.initializeJqueryWrapper(n, "collapsible", "M_Collapsible")
-}(cash, M.anime),
-function(t, e) {
- "use strict";
- var i = {
- alignment: "left",
- constrainWidth: !0,
- coverTrigger: !0,
- closeOnClick: !0,
- hover: !1,
- inDuration: 150,
- outDuration: 250,
- onOpenStart: null,
- onOpenEnd: null,
- onCloseStart: null,
- onCloseEnd: null
- }
- , n = function(n) {
- _inherits(s, Component);
- function s(e, i) {
- _classCallCheck(this, s);
- var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
- return n.el.M_Dropdown = n,
- s._dropdowns.push(n),
- n.id = M.getIdFromTrigger(e),
- n.dropdownEl = document.getElementById(n.id),
- n.$dropdownEl = t(n.dropdownEl),
- n.options = t.extend({}, s.defaults, i),
- n.isOpen = !1,
- n.focusedIndex = -1,
- n.filterQuery = [],
- n.$el.after(n.dropdownEl),
- n._makeDropdownFocusable(),
- n._resetFilterQueryBound = n._resetFilterQuery.bind(n),
- n._handleDocumentClickBound = n._handleDocumentClick.bind(n),
- n._handleDropdownKeydownBound = n._handleDropdownKeydown.bind(n),
- n._handleTriggerKeydownBound = n._handleTriggerKeydown.bind(n),
- n._setupEventHandlers(),
- n
- }
- return _createClass(s, [{
- key: "destroy",
- value: function() {
- this._resetDropdownStyles(),
- this._removeEventHandlers(),
- s._dropdowns.splice(s._dropdowns.indexOf(this), 1),
- this.el.M_Dropdown = void 0
+
+ function a() {
+ v.remaining && !0 !== v.remaining && v.remaining--
}
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this.el.addEventListener("keydown", this._handleTriggerKeydownBound),
- this.options.hover ? (this._handleMouseEnterBound = this._handleMouseEnter.bind(this),
- this.el.addEventListener("mouseenter", this._handleMouseEnterBound),
- this._handleMouseLeaveBound = this._handleMouseLeave.bind(this),
- this.el.addEventListener("mouseleave", this._handleMouseLeaveBound),
- this.dropdownEl.addEventListener("mouseleave", this._handleMouseLeaveBound)) : (this._handleClickBound = this._handleClick.bind(this),
- this.el.addEventListener("click", this._handleClickBound))
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.el.removeEventListener("keydown", this._handleTriggerKeydownBound),
- this.options.hover ? (this.el.removeEventHandlers("mouseenter", this._handleMouseEnterBound),
- this.el.removeEventHandlers("mouseleave", this._handleMouseLeaveBound),
- this.dropdownEl.removeEventHandlers("mouseleave", this._handleMouseLeaveBound)) : this.el.removeEventListener("click", this._handleClickBound)
- }
- }, {
- key: "_setupTemporaryEventHandlers",
- value: function() {
- document.body.addEventListener("click", this._handleDocumentClickBound, !0),
- this.dropdownEl.addEventListener("keydown", this._handleDropdownKeydownBound)
- }
- }, {
- key: "_removeTemporaryEventHandlers",
- value: function() {
- document.body.removeEventListener("click", this._handleDocumentClickBound, !0),
- this.dropdownEl.removeEventListener("keydown", this._handleDropdownKeydownBound)
- }
- }, {
- key: "_handleClick",
- value: function(t) {
- t.preventDefault(),
- this.open()
- }
- }, {
- key: "_handleMouseEnter",
- value: function() {
- this.open()
- }
- }, {
- key: "_handleMouseLeave",
- value: function(e) {
- var i = e.toElement || e.relatedTarget
- , n = !!t(i).closest(".dropdown-content").length
- , s = !1
- , o = t(i).closest(".dropdown-trigger");
- o.length && o[0].M_Dropdown && o[0].M_Dropdown.isOpen && (s = !0),
- s || n || this.close()
- }
- }, {
- key: "_handleDocumentClick",
- value: function(e) {
- var i = this
- , n = t(e.target);
- this.options.closeOnClick && n.closest(".dropdown-content").length ? setTimeout(function() {
- i.close()
- }, 0) : n.closest(".dropdown-trigger").length ? setTimeout(function() {
- i.close()
- }, 0) : n.closest(".dropdown-content").length || setTimeout(function() {
- i.close()
- }, 0)
- }
- }, {
- key: "_handleTriggerKeydown",
- value: function(t) {
- t.which !== M.keys.ARROW_DOWN && t.which !== M.keys.ENTER || this.isOpen || (t.preventDefault(),
- this.open())
- }
- }, {
- key: "_handleDropdownKeydown",
- value: function(e) {
- if (e.which === M.keys.TAB)
- e.preventDefault(),
- this.close();
- else if (e.which !== M.keys.ARROW_DOWN && e.which !== M.keys.ARROW_UP || !this.isOpen)
- if (e.which === M.keys.ENTER && this.isOpen) {
- var i = this.dropdownEl.children[this.focusedIndex]
- , n = t(i).find("a, button").first();
- n.length ? n[0].click() : i.click()
- } else
- e.which === M.keys.ESC && this.isOpen && (e.preventDefault(),
- this.close());
- else {
- e.preventDefault();
- var s = e.which === M.keys.ARROW_DOWN ? 1 : -1;
- this.focusedIndex = Math.max(Math.min(this.focusedIndex + s, this.dropdownEl.children.length - 1), 0),
- this._focusFocusedItem()
- }
- var o = String.fromCharCode(e.which).toLowerCase();
- if (o && -1 === [9, 13, 27, 38, 40].indexOf(e.which)) {
- this.filterQuery.push(o);
- var a = this.filterQuery.join("")
- , r = t(this.dropdownEl).find("li").filter(function(e) {
- return 0 === t(e).text().toLowerCase().indexOf(a)
- })[0];
- r && (this.focusedIndex = t(r).index(),
- this._focusFocusedItem())
+
+ function r(t) {
+ var e = v.duration,
+ r = v.offset,
+ d = r + v.delay,
+ f = v.currentTime,
+ m = v.reversed,
+ g = n(t);
+ if (v.children.length) {
+ var _ = v.children,
+ y = _.length;
+ if (g >= v.currentTime)
+ for (var k = 0; k < y; k++)
+ _[k].seek(g);
+ else
+ for (; y--;)
+ _[y].seek(g)
}
- this.filterTimeout = setTimeout(this._resetFilterQueryBound, 1e3)
- }
- }, {
- key: "_resetFilterQuery",
- value: function() {
- this.filterQuery = []
- }
- }, {
- key: "_resetDropdownStyles",
- value: function() {
- this.$dropdownEl.css({
- display: "",
- width: "",
- height: "",
- left: "",
- top: "",
- "transform-origin": "",
- transform: "",
- opacity: ""
- })
- }
- }, {
- key: "_makeDropdownFocusable",
- value: function() {
- -1 === this.dropdownEl.tabIndex && (this.dropdownEl.tabIndex = 0),
- t(this.dropdownEl).children().attr("tabindex", 0)
- }
- }, {
- key: "_focusFocusedItem",
- value: function() {
- this.focusedIndex >= 0 && this.focusedIndex < this.dropdownEl.children.length && this.dropdownEl.children[this.focusedIndex].focus()
- }
- }, {
- key: "_getDropdownPosition",
- value: function() {
- this.el.offsetParent.getBoundingClientRect();
- var t = {
- left: this.el.offsetLeft,
- top: this.el.offsetTop,
- width: this.el.offsetWidth,
- height: this.el.offsetHeight
+ (g >= d || !e) && (v.began || (v.began = !0,
+ o("begin")),
+ o("run")),
+ g > r && g < e ? s(g) : (g <= r && 0 !== f && (s(0),
+ m && a()),
+ (g >= e && f !== e || !e) && (s(e),
+ m || a())),
+ o("update"),
+ t >= e && (v.remaining ? (h = l,
+ "alternate" === v.direction && (v.reversed = !v.reversed)) : (v.pause(),
+ v.completed || (v.completed = !0,
+ o("complete"),
+ "Promise" in window && (c(),
+ p = i()))),
+ u = 0)
+ }
+ t = void 0 === t ? {} : t;
+ var l, h, u = 0,
+ c = null,
+ p = i(),
+ v = C(t);
+ return v.reset = function () {
+ var t = v.direction,
+ e = v.loop;
+ for (v.currentTime = 0,
+ v.progress = 0,
+ v.paused = !0,
+ v.began = !1,
+ v.completed = !1,
+ v.reversed = "reverse" === t,
+ v.remaining = "alternate" === t && 1 === e ? 2 : e,
+ s(0),
+ t = v.children.length; t--;)
+ v.children[t].reset()
+ },
+ v.tick = function (t) {
+ l = t,
+ h || (h = l),
+ r((u + l - h) * E.speed)
+ },
+ v.seek = function (t) {
+ r(n(t))
+ },
+ v.pause = function () {
+ var t = I.indexOf(v); -
+ 1 < t && I.splice(t, 1),
+ v.paused = !0
+ },
+ v.play = function () {
+ v.paused && (v.paused = !1,
+ h = 0,
+ u = n(v.currentTime),
+ I.push(v),
+ S || A())
+ },
+ v.reverse = function () {
+ v.reversed = !v.reversed,
+ h = 0,
+ u = n(v.currentTime)
+ },
+ v.restart = function () {
+ v.pause(),
+ v.reset(),
+ v.play()
+ },
+ v.finished = p,
+ v.reset(),
+ v.autoplay && v.play(),
+ v
+ }
+ var M, x = {
+ update: void 0,
+ begin: void 0,
+ run: void 0,
+ complete: void 0,
+ loop: 1,
+ direction: "normal",
+ autoplay: !0,
+ offset: 0
+ },
+ L = {
+ duration: 1e3,
+ delay: 0,
+ easing: "easeOutElastic",
+ elasticity: 500,
+ round: 0
+ },
+ T = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),
+ O = {
+ arr: function (t) {
+ return Array.isArray(t)
+ },
+ obj: function (t) {
+ return -1 < Object.prototype.toString.call(t).indexOf("Object")
+ },
+ pth: function (t) {
+ return O.obj(t) && t.hasOwnProperty("totalLength")
+ },
+ svg: function (t) {
+ return t instanceof SVGElement
+ },
+ dom: function (t) {
+ return t.nodeType || O.svg(t)
+ },
+ str: function (t) {
+ return "string" == typeof t
+ },
+ fnc: function (t) {
+ return "function" == typeof t
+ },
+ und: function (t) {
+ return void 0 === t
+ },
+ hex: function (t) {
+ return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)
+ },
+ rgb: function (t) {
+ return /^rgb/.test(t)
+ },
+ hsl: function (t) {
+ return /^hsl/.test(t)
+ },
+ col: function (t) {
+ return O.hex(t) || O.rgb(t) || O.hsl(t)
}
- , e = (this.dropdownEl.offsetLeft,
- this.dropdownEl.offsetTop,
- this.dropdownEl.offsetWidth,
- this.dropdownEl.offsetHeight,
- this.el.getBoundingClientRect())
- , i = this.dropdownEl.getBoundingClientRect()
- , n = i.height
- , s = i.width
- , o = t.left
- , a = t.top
- , r = {
- left: o,
- top: a,
- height: n,
- width: s
+ },
+ $ = function () {
+ function t(t, e, i) {
+ return (((1 - 3 * i + 3 * e) * t + (3 * i - 6 * e)) * t + 3 * e) * t
}
- , l = this.dropdownEl.offsetParent
- , h = M.checkPossibleAlignments(this.el, l, r, this.options.coverTrigger ? 0 : e.height)
- , d = "top"
- , u = this.options.alignment;
- if (a += this.options.coverTrigger ? 0 : e.height,
- h.top || (h.bottom ? d = "bottom" : h.spaceOnTop > h.spaceOnBottom ? (d = "bottom",
- n += h.spaceOnTop,
- a -= h.spaceOnTop) : n += h.spaceOnBottom),
- !h[u]) {
- var c = "left" === u ? "right" : "left";
- h[c] ? u = c : h.spaceOnLeft > h.spaceOnRight ? (u = "right",
- s += h.spaceOnLeft,
- o -= h.spaceOnLeft) : (u = "left",
- s += h.spaceOnRight)
+ return function (e, i, n, s) {
+ if (0 <= e && 1 >= e && 0 <= n && 1 >= n) {
+ var o = new Float32Array(11);
+ if (e !== i || n !== s)
+ for (var a = 0; 11 > a; ++a)
+ o[a] = t(.1 * a, e, n);
+ return function (a) {
+ if (e === i && n === s)
+ return a;
+ if (0 === a)
+ return 0;
+ if (1 === a)
+ return 1;
+ for (var r = 0, l = 1; 10 !== l && o[l] <= a; ++l)
+ r += .1;
+ var l = r + (a - o[--l]) / (o[l + 1] - o[l]) * .1,
+ h = 3 * (1 - 3 * n + 3 * e) * l * l + 2 * (3 * n - 6 * e) * l + 3 * e;
+ if (.001 <= h) {
+ for (r = 0; 4 > r && 0 != (h = 3 * (1 - 3 * n + 3 * e) * l * l + 2 * (3 * n - 6 * e) * l + 3 * e); ++r)
+ var d = t(l, e, n) - a,
+ l = l - d / h;
+ a = l
+ } else if (0 === h)
+ a = l;
+ else {
+ var l = r,
+ r = r + .1,
+ u = 0;
+ do {
+ 0 < (h = t(d = l + (r - l) / 2, e, n) - a) ? r = d : l = d
+ } while (1e-7 < Math.abs(h) && 10 > ++u);
+ a = d
+ }
+ return t(a, i, s)
+ }
+ }
}
- return "bottom" === d && (a = a - i.height + (this.options.coverTrigger ? e.height : 0)),
- "right" === u && (o = o - i.width + e.width),
- {
- x: o,
- y: a,
- verticalAlignment: d,
- horizontalAlignment: u,
- height: n,
- width: s
+ }(),
+ D = function () {
+ function t(t, e) {
+ return 0 === t || 1 === t ? t : -Math.pow(2, 10 * (t - 1)) * Math.sin(2 * (t - 1 - e / (2 * Math.PI) * Math.asin(1)) * Math.PI / e)
}
- }
- }, {
- key: "_animateIn",
- value: function(t) {
- var i = this;
- this.dropdownEl.style.left = t.x + "px",
- this.dropdownEl.style.top = t.y + "px",
- this.dropdownEl.style.height = t.height + "px",
- this.dropdownEl.style.width = t.width + "px",
- this.dropdownEl.style.transformOrigin = ("left" === t.horizontalAlignment ? "0" : "100%") + " " + ("top" === t.verticalAlignment ? "0" : "100%"),
- e.remove(this.dropdownEl),
- e({
- targets: this.dropdownEl,
- opacity: {
- value: [0, 1],
- easing: "easeOutQuad"
+ var e, i = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),
+ n = {
+ In: [
+ [.55, .085, .68, .53],
+ [.55, .055, .675, .19],
+ [.895, .03, .685, .22],
+ [.755, .05, .855, .06],
+ [.47, 0, .745, .715],
+ [.95, .05, .795, .035],
+ [.6, .04, .98, .335],
+ [.6, -.28, .735, .045], t
+ ],
+ Out: [
+ [.25, .46, .45, .94],
+ [.215, .61, .355, 1],
+ [.165, .84, .44, 1],
+ [.23, 1, .32, 1],
+ [.39, .575, .565, 1],
+ [.19, 1, .22, 1],
+ [.075, .82, .165, 1],
+ [.175, .885, .32, 1.275],
+ function (e, i) {
+ return 1 - t(1 - e, i)
+ }
+ ],
+ InOut: [
+ [.455, .03, .515, .955],
+ [.645, .045, .355, 1],
+ [.77, 0, .175, 1],
+ [.86, 0, .07, 1],
+ [.445, .05, .55, .95],
+ [1, 0, 0, 1],
+ [.785, .135, .15, .86],
+ [.68, -.55, .265, 1.55],
+ function (e, i) {
+ return .5 > e ? t(2 * e, i) / 2 : 1 - t(-2 * e + 2, i) / 2
+ }
+ ]
},
- scaleX: [.3, 1],
- scaleY: [.3, 1],
- duration: this.options.inDuration,
- easing: "easeOutQuint",
- complete: function(t) {
- if (i.dropdownEl.focus(),
- "function" == typeof i.options.onOpenEnd) {
- var e = t.animatables[0].target;
- i.options.onOpenEnd.call(e, i.el)
- }
- }
- })
- }
- }, {
- key: "_animateOut",
- value: function() {
- var t = this;
- e.remove(this.dropdownEl),
- e({
- targets: this.dropdownEl,
- opacity: {
- value: 0,
- easing: "easeOutQuint"
+ s = {
+ linear: $(.25, .25, .75, .75)
},
- scaleX: .3,
- scaleY: .3,
- duration: this.options.outDuration,
- easing: "easeOutQuint",
- complete: function(e) {
- if (t._resetDropdownStyles(),
- "function" == typeof t.options.onCloseEnd) {
- e.animatables[0].target;
- t.options.onCloseEnd.call(t, t.el)
+ o = {};
+ for (e in n)
+ o.type = e,
+ n[o.type].forEach(function (t) {
+ return function (e, n) {
+ s["ease" + t.type + i[n]] = O.fnc(e) ? e : $.apply($jscomp$this, e)
}
- }
- })
- }
- }, {
- key: "open",
- value: function() {
- if (!this.isOpen) {
- this.isOpen = !0,
- "function" == typeof this.options.onOpenStart && this.options.onOpenStart.call(this, this.el),
- this._resetDropdownStyles(),
- this.dropdownEl.style.display = "block";
- var t = this.options.constrainWidth ? this.el.getBoundingClientRect().width : this.dropdownEl.getBoundingClientRect().width;
- this.dropdownEl.style.width = t + "px";
- var e = this._getDropdownPosition();
- this._animateIn(e),
- this._setupTemporaryEventHandlers()
- }
- }
- }, {
- key: "close",
- value: function() {
- this.isOpen && (this.isOpen = !1,
- this.focusedIndex = -1,
- "function" == typeof this.options.onCloseStart && this.options.onCloseStart.call(this, this.el),
- this._animateOut(),
- this._removeTemporaryEventHandlers(),
- this.el.focus())
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Dropdown
- }
- }, {
- key: "defaults",
- get: function() {
- return i
- }
- }]),
- s
- }();
- n._dropdowns = [],
- window.M.Dropdown = n,
- M.jQueryLoaded && M.initializeJqueryWrapper(n, "dropdown", "M_Dropdown")
-}(cash, M.anime),
-function(t, e) {
- "use strict";
- var i = {
- opacity: .5,
- inDuration: 250,
- outDuration: 250,
- onOpenStart: null,
- onOpenEnd: null,
- onCloseStart: null,
- onCloseEnd: null,
- dismissible: !0,
- startingTop: "4%",
- endingTop: "10%"
- }
- , n = function(n) {
- _inherits(s, Component);
- function s(e, i) {
- _classCallCheck(this, s);
- var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
- return n.el.M_Modal = n,
- n.options = t.extend({}, s.defaults, i),
- n.isOpen = !1,
- n.id = n.$el.attr("id"),
- n._openingTrigger = void 0,
- n.$overlay = t('
'),
- s._increment++,
- s._count++,
- n.$overlay[0].style.zIndex = 1e3 + 2 * s._increment,
- n.el.style.zIndex = 1e3 + 2 * s._increment + 1,
- n._setupEventHandlers(),
- n
- }
- return _createClass(s, [{
- key: "destroy",
- value: function() {
- s._count--,
- this._removeEventHandlers(),
- this.el.removeAttribute("style"),
- this.$overlay.remove(),
- this.el.M_Modal = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleOverlayClickBound = this._handleOverlayClick.bind(this),
- this._handleModalCloseClickBound = this._handleModalCloseClick.bind(this),
- 1 === s._count && document.body.addEventListener("click", this._handleTriggerClick),
- this.$overlay[0].addEventListener("click", this._handleOverlayClickBound),
- this.el.addEventListener("click", this._handleModalCloseClickBound)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- 0 === s._count && document.body.removeEventListener("click", this._handleTriggerClick),
- this.$overlay[0].removeEventListener("click", this._handleOverlayClickBound),
- this.el.removeEventListener("click", this._handleModalCloseClickBound)
- }
- }, {
- key: "_handleTriggerClick",
- value: function(e) {
- var i = t(e.target).closest(".modal-trigger");
- if (i.length) {
- var n = M.getIdFromTrigger(i[0])
- , s = document.getElementById(n).M_Modal;
- s && s.open(i),
- e.preventDefault()
+ }(o)),
+ o = {
+ type: o.type
+ };
+ return s
+ }(),
+ B = {
+ css: function (t, e, i) {
+ return t.style[e] = i
+ },
+ attribute: function (t, e, i) {
+ return t.setAttribute(e, i)
+ },
+ object: function (t, e, i) {
+ return t[e] = i
+ },
+ transform: function (t, e, i, n, s) {
+ n[s] || (n[s] = []),
+ n[s].push(e + "(" + i + ")")
}
- }
- }, {
- key: "_handleOverlayClick",
- value: function() {
- this.options.dismissible && this.close()
- }
- }, {
- key: "_handleModalCloseClick",
- value: function(e) {
- t(e.target).closest(".modal-close").length && this.close()
- }
- }, {
- key: "_handleKeydown",
- value: function(t) {
- 27 === t.keyCode && this.options.dismissible && this.close()
- }
- }, {
- key: "_animateIn",
- value: function() {
- var i = this;
- t.extend(this.el.style, {
- display: "block",
- opacity: 0
- }),
- t.extend(this.$overlay[0].style, {
- display: "block",
- opacity: 0
- }),
- e({
- targets: this.$overlay[0],
- opacity: this.options.opacity,
- duration: this.options.inDuration,
- easing: "easeOutQuad"
- });
- var n = {
- targets: this.el,
- duration: this.options.inDuration,
- easing: "easeOutCubic",
- complete: function() {
- "function" == typeof i.options.onOpenEnd && i.options.onOpenEnd.call(i, i.el, i._openingTrigger)
- }
- };
- this.el.classList.contains("bottom-sheet") ? (t.extend(n, {
- bottom: 0,
- opacity: 1
- }),
- e(n)) : (t.extend(n, {
- top: [this.options.startingTop, this.options.endingTop],
- opacity: 1,
- scaleX: [.8, 1],
- scaleY: [.8, 1]
- }),
- e(n))
- }
- }, {
- key: "_animateOut",
- value: function() {
- var i = this;
- e({
- targets: this.$overlay[0],
- opacity: 0,
- duration: this.options.outDuration,
- easing: "easeOutQuart"
- });
- var n = {
- targets: this.el,
- duration: this.options.outDuration,
- easing: "easeOutCubic",
- complete: function() {
- i.el.style.display = "none",
- i.$overlay.remove(),
- "function" == typeof i.options.onCloseEnd && i.options.onCloseEnd.call(i, i.el)
- }
- };
- this.el.classList.contains("bottom-sheet") ? (t.extend(n, {
- bottom: "-100%",
- opacity: 0
- }),
- e(n)) : (t.extend(n, {
- top: [this.options.endingTop, this.options.startingTop],
- opacity: 0,
- scaleX: .8,
- scaleY: .8
- }),
- e(n))
- }
- }, {
- key: "open",
- value: function(t) {
- if (!this.isOpen) {
- this.isOpen = !0,
- "function" == typeof this.options.onOpenStart && this.options.onOpenStart.call(this, this.el, this._openingTrigger);
- return document.body.style.overflow = "hidden",
- this.el.classList.add("open"),
- this.el.insertAdjacentElement("afterend", this.$overlay[0]),
- this._openingTrigger = t ? t[0] : void 0,
- this.options.dismissible && (this._handleKeydownBound = this._handleKeydown.bind(this),
- document.addEventListener("keydown", this._handleKeydownBound)),
- e.remove(this.el),
- e.remove(this.$overlay[0]),
- this._animateIn(),
- this
+ },
+ I = [],
+ S = 0,
+ A = function () {
+ function t() {
+ S = requestAnimationFrame(e)
}
- }
- }, {
- key: "close",
- value: function() {
- if (this.isOpen)
- return this.isOpen = !1,
- "function" == typeof this.options.onCloseStart && this.options.onCloseStart.call(this, this.el),
- this.el.classList.remove("open"),
- document.body.style.overflow = "",
- this.options.dismissible && document.removeEventListener("keydown", this._handleKeydownBound),
- e.remove(this.el),
- e.remove(this.$overlay[0]),
- this._animateOut(),
- this
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Modal
- }
- }, {
- key: "defaults",
- get: function() {
- return i
- }
- }]),
- s
- }();
- n._increment = 0,
- n._count = 0,
- M.Modal = n,
- M.jQueryLoaded && M.initializeJqueryWrapper(n, "modal", "M_Modal")
-}(cash, M.anime),
-function(t, e) {
- "use strict";
- var i = {
- inDuration: 275,
- outDuration: 200,
- onOpenStart: null,
- onOpenEnd: null,
- onCloseStart: null,
- onCloseEnd: null
- }
- , n = function(n) {
- _inherits(s, Component);
- function s(e, i) {
- _classCallCheck(this, s);
- var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
- return n.el.M_Materialbox = n,
- n.options = t.extend({}, s.defaults, i),
- n.overlayActive = !1,
- n.doneAnimating = !0,
- n.placeholder = t("
").addClass("material-placeholder"),
- n.originalWidth = 0,
- n.originalHeight = 0,
- n.originInlineStyles = n.$el.attr("style"),
- n.caption = n.el.getAttribute("data-caption") || "",
- n.$el.before(n.placeholder),
- n.placeholder.append(n.$el),
- n._setupEventHandlers(),
- n
- }
- return _createClass(s, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this.el.M_Materialbox = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleMaterialboxClickBound = this._handleMaterialboxClick.bind(this),
- this.el.addEventListener("click", this._handleMaterialboxClickBound)
- }
- }, {
- key: "removeEventHandlers",
- value: function() {
- this.el.removeEventListener("click", this._handleMaterialboxClickBound)
- }
- }, {
- key: "_handleMaterialboxClick",
- value: function(t) {
- !1 === this.doneAnimating || this.overlayActive && this.doneAnimating ? this.close() : this.open()
- }
- }, {
- key: "_handleWindowScroll",
- value: function() {
- this.overlayActive && this.close()
- }
- }, {
- key: "_handleWindowResize",
- value: function() {
- this.overlayActive && this.close()
- }
- }, {
- key: "_handleWindowEscape",
- value: function(t) {
- 27 === t.keyCode && this.doneAnimating && this.overlayActive && this.close()
- }
- }, {
- key: "_makeAncestorsOverflowVisible",
- value: function() {
- this.ancestorsChanged = t();
- for (var e = this.placeholder[0].parentNode; null !== e && !t(e).is(document); ) {
- var i = t(e);
- "visible" !== i.css("overflow") && (i.css("overflow", "visible"),
- void 0 === this.ancestorsChanged ? this.ancestorsChanged = i : this.ancestorsChanged = this.ancestorsChanged.add(i)),
- e = e.parentNode
+
+ function e(e) {
+ var i = I.length;
+ if (i) {
+ for (var n = 0; n < i;)
+ I[n] && I[n].tick(e),
+ n++;
+ t()
+ } else
+ cancelAnimationFrame(S),
+ S = 0
}
- }
- }, {
- key: "_animateImageIn",
- value: function() {
- var t = this
- , i = {
- targets: this.el,
- height: this.newHeight,
- width: this.newWidth,
- left: M.getDocumentScrollLeft() + this.windowWidth / 2 - this.placeholder.offset().left - this.newWidth / 2,
- top: M.getDocumentScrollTop() + this.windowHeight / 2 - this.placeholder.offset().top - this.newHeight / 2,
- duration: this.options.inDuration,
- easing: "easeOutQuad",
- complete: function() {
- t.doneAnimating = !0,
- "function" == typeof t.options.onOpenEnd && t.options.onOpenEnd.call(t, t.el)
- }
- };
- this.$el.hasClass("responsive-img") ? (i.maxWidth = this.newWidth,
- i.width = [this.originalWidth, i.width]) : (i.left = [i.left, 0],
- i.top = [i.top, 0]),
- e(i)
- }
- }, {
- key: "_animateImageOut",
- value: function() {
- var t = this
- , i = {
- targets: this.el,
- width: this.originalWidth,
- height: this.originalHeight,
- left: 0,
- top: 0,
- duration: this.options.outDuration,
- easing: "easeOutQuad",
- complete: function() {
- t.placeholder.css({
- height: "",
- width: "",
- position: "",
- top: "",
- left: ""
- }),
- t.$el.removeAttr("style"),
- t.$el.attr("style", t.originInlineStyles),
- t.$el.removeClass("active"),
- t.doneAnimating = !0,
- t.ancestorsChanged.length && t.ancestorsChanged.css("overflow", ""),
- "function" == typeof t.options.onCloseEnd && t.options.onCloseEnd.call(t, t.el)
- }
- };
- e(i)
- }
- }, {
- key: "_updateVars",
- value: function() {
- this.windowWidth = window.innerWidth,
- this.windowHeight = window.innerHeight,
- this.caption = this.el.getAttribute("data-caption") || ""
- }
- }, {
- key: "open",
- value: function() {
- var i = this;
- this._updateVars(),
- this.originalWidth = this.el.getBoundingClientRect().width,
- this.originalHeight = this.el.getBoundingClientRect().height,
- this.doneAnimating = !1,
- this.$el.addClass("active"),
- this.overlayActive = !0,
- "function" == typeof this.options.onOpenStart && this.options.onOpenStart.call(this, this.el),
- this.placeholder.css({
- width: this.placeholder[0].getBoundingClientRect().width + "px",
- height: this.placeholder[0].getBoundingClientRect().height + "px",
- position: "relative",
- top: 0,
- left: 0
- }),
- this._makeAncestorsOverflowVisible(),
- this.$el.css({
- position: "absolute",
- "z-index": 1e3,
- "will-change": "left, top, width, height"
- }),
- this.$overlay = t('
').css({
- opacity: 0
- }).one("click", function() {
- i.doneAnimating && i.close()
- }),
- this.$el.before(this.$overlay);
- var n = this.$overlay[0].getBoundingClientRect();
- this.$overlay.css({
- width: this.windowWidth + "px",
- height: this.windowHeight + "px",
- left: -1 * n.left + "px",
- top: -1 * n.top + "px"
- }),
- e.remove(this.el),
- e.remove(this.$overlay[0]),
- "" !== this.caption && e.remove(this.$photoCaption[0]),
- e({
- targets: this.$overlay[0],
- opacity: 1,
- duration: this.options.inDuration,
- easing: "easeOutQuad"
- }),
- "" !== this.caption && (this.$photoCaption = t('
'),
- this.$photoCaption.text(this.caption),
- t("body").append(this.$photoCaption),
- this.$photoCaption.css({
- display: "inline"
- }),
- e({
- targets: this.$photoCaption[0],
- opacity: 1,
- duration: this.options.inDuration,
- easing: "easeOutQuad"
- }));
- var s = 0
- , o = this.originalWidth / this.windowWidth
- , a = this.originalHeight / this.windowHeight;
- this.newWidth = 0,
- this.newHeight = 0,
- o > a ? (s = this.originalHeight / this.originalWidth,
- this.newWidth = .9 * this.windowWidth,
- this.newHeight = .9 * this.windowWidth * s) : (s = this.originalWidth / this.originalHeight,
- this.newWidth = .9 * this.windowHeight * s,
- this.newHeight = .9 * this.windowHeight),
- this._animateImageIn(),
- this._handleWindowScrollBound = this._handleWindowScroll.bind(this),
- this._handleWindowResizeBound = this._handleWindowResize.bind(this),
- this._handleWindowEscapeBound = this._handleWindowEscape.bind(this),
- window.addEventListener("scroll", this._handleWindowScrollBound),
- window.addEventListener("resize", this._handleWindowResizeBound),
- window.addEventListener("keyup", this._handleWindowEscapeBound)
- }
- }, {
- key: "close",
- value: function() {
- var t = this;
- this._updateVars(),
- this.doneAnimating = !1,
- "function" == typeof this.options.onCloseStart && this.options.onCloseStart.call(this, this.el),
- e.remove(this.el),
- e.remove(this.$overlay[0]),
- "" !== this.caption && e.remove(this.$photoCaption[0]),
- window.removeEventListener("scroll", this._handleWindowScrollBound),
- window.removeEventListener("resize", this._handleWindowResizeBound),
- window.removeEventListener("keyup", this._handleWindowEscapeBound),
- e({
- targets: this.$overlay[0],
- opacity: 0,
- duration: this.options.outDuration,
- easing: "easeOutQuad",
- complete: function() {
- t.overlayActive = !1,
- t.$overlay.remove()
- }
- }),
- this._animateImageOut(),
- "" !== this.caption && e({
- targets: this.$photoCaption[0],
- opacity: 0,
- duration: this.options.outDuration,
- easing: "easeOutQuad",
- complete: function() {
- t.$photoCaption.remove()
+ return t
+ }();
+ return E.version = "2.2.0",
+ E.speed = 1,
+ E.running = I,
+ E.remove = function (t) {
+ t = y(t);
+ for (var e = I.length; e--;)
+ for (var i = I[e], n = i.animations, o = n.length; o--;)
+ s(t, n[o].animatable.target) && (n.splice(o, 1),
+ n.length || i.pause())
+ },
+ E.getValue = c,
+ E.path = function (e, i) {
+ var n = O.str(e) ? t(e)[0] : e,
+ s = i || 100;
+ return function (t) {
+ return {
+ el: n,
+ property: t,
+ totalLength: m(n) * (s / 100)
}
- })
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Materialbox
- }
- }, {
- key: "defaults",
- get: function() {
- return i
- }
- }]),
- s
- }();
- M.Materialbox = n,
- M.jQueryLoaded && M.initializeJqueryWrapper(n, "materialbox", "M_Materialbox")
-}(cash, M.anime),
-function(t) {
- "use strict";
- var e = {
- responsiveThreshold: 0
- }
- , i = function(i) {
- _inherits(n, Component);
- function n(e, i) {
- _classCallCheck(this, n);
- var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
- return s.el.M_Parallax = s,
- s.options = t.extend({}, n.defaults, i),
- s.$img = s.$el.find("img").first(),
- s._enabled = window.innerWidth > s.options.responsiveThreshold,
- s._updateParallax(),
- s._setupEventHandlers(),
- s._setupStyles(),
- n._parallaxes.push(s),
- s
- }
- return _createClass(n, [{
- key: "destroy",
- value: function() {
- n._parallaxes.splice(n._parallaxes.indexOf(this), 1),
- this.$img[0].style.transform = "",
- this._removeEventHandlers(),
- this.$el[0].M_Parallax = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleImageLoadBound = this._handleImageLoad.bind(this),
- this.$img[0].addEventListener("load", this._handleImageLoadBound),
- 0 === n._parallaxes.length && (n._handleScrollThrottled = M.throttle(n._handleScroll, 5),
- window.addEventListener("scroll", n._handleScrollThrottled),
- n._handleWindowResizeThrottled = M.throttle(n._handleWindowResize, 5),
- window.addEventListener("resize", n._handleWindowResizeThrottled))
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.$img[0].removeEventListener("load", this._handleImageLoadBound),
- 0 === n._parallaxes.length && (window.removeEventListener("scroll", n._handleScrollThrottled),
- window.removeEventListener("resize", n._handleWindowResizeThrottled))
- }
- }, {
- key: "_setupStyles",
- value: function() {
- this.$img[0].style.opacity = 1
- }
- }, {
- key: "_handleImageLoad",
- value: function() {
- this._updateParallax(),
- this.$img.each(function() {
- this.complete && t(this).trigger("load")
- })
- }
- }, {
- key: "_updateParallax",
- value: function() {
- var t = this.$el.height() > 0 ? this.el.parentNode.offsetHeight : 500
- , e = this.$img[0].offsetHeight - t
- , i = this.$el.offset().top + t
- , n = this.$el.offset().top
- , s = M.getDocumentScrollTop()
- , o = window.innerHeight
- , a = e * ((s + o - n) / (t + o));
- this._enabled ? i > s && n < s + o && (this.$img[0].style.transform = "translate3D(-50%, " + a + "px, 0)") : this.$img[0].style.transform = ""
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Parallax
- }
- }, {
- key: "_handleScroll",
- value: function() {
- for (var t = 0; t < n._parallaxes.length; t++) {
- var e = n._parallaxes[t];
- e._updateParallax.call(e)
}
- }
- }, {
- key: "_handleWindowResize",
- value: function() {
- for (var t = 0; t < n._parallaxes.length; t++) {
- var e = n._parallaxes[t];
- e._enabled = window.innerWidth > e.options.responsiveThreshold
+ },
+ E.setDashoffset = function (t) {
+ var e = m(t);
+ return t.setAttribute("stroke-dasharray", e),
+ e
+ },
+ E.bezier = $,
+ E.easings = D,
+ E.timeline = function (t) {
+ var e = E(t);
+ return e.pause(),
+ e.duration = 0,
+ e.add = function (i) {
+ return e.children.forEach(function (t) {
+ t.began = !0,
+ t.completed = !0
+ }),
+ n(i).forEach(function (i) {
+ var n = r(i, a(L, t || {}));
+ n.targets = n.targets || t.targets,
+ i = e.duration;
+ var s = n.offset;
+ n.autoplay = !1,
+ n.direction = e.direction,
+ n.offset = O.und(s) ? i : p(s, i),
+ e.began = !0,
+ e.completed = !0,
+ e.seek(n.offset),
+ (n = E(n)).began = !0,
+ n.completed = !0,
+ n.duration > i && (e.duration = n.duration),
+ e.children.push(n)
+ }),
+ e.seek(0),
+ e.reset(),
+ e.autoplay && e.restart(),
+ e
+ },
+ e
+ },
+ E.random = function (t, e) {
+ return Math.floor(Math.random() * (e - t + 1)) + t
+ },
+ E
+ }(),
+ function (t, e) {
+ "use strict";
+ var i = {
+ accordion: !0,
+ onOpenStart: void 0,
+ onOpenEnd: void 0,
+ onCloseStart: void 0,
+ onCloseEnd: void 0,
+ inDuration: 300,
+ outDuration: 300
+ },
+ n = function (n) {
+ _inherits(s, Component);
+
+ function s(e, i) {
+ _classCallCheck(this, s);
+ var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
+ n.el.M_Collapsible = n,
+ n.options = t.extend({}, s.defaults, i),
+ n._setupEventHandlers();
+ var o = n.$el.children("li.active").children(".collapsible-body");
+ return n.options.accordion ? o.first().css("display", "block") : o.css("display", "block"),
+ n
}
- }
- }, {
- key: "defaults",
- get: function() {
- return e
- }
- }]),
- n
- }();
- i._parallaxes = [],
- M.Parallax = i,
- M.jQueryLoaded && M.initializeJqueryWrapper(i, "parallax", "M_Parallax")
-}(cash),
-function(t, e) {
- "use strict";
- var i = {
- duration: 300,
- onShow: null,
- swipeable: !1,
- responsiveThreshold: 1 / 0
- }
- , n = function(n) {
- _inherits(s, Component);
- function s(e, i) {
- _classCallCheck(this, s);
- var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
- return n.el.M_Tabs = n,
- n.options = t.extend({}, s.defaults, i),
- n.$tabLinks = n.$el.children("li.tab").children("a"),
- n.index = 0,
- n._setTabsAndTabWidth(),
- n._setupActiveTabLink(),
- n._createIndicator(),
- n.options.swipeable ? n._setupSwipeableTabs() : n._setupNormalTabs(),
- n._setupEventHandlers(),
- n
- }
- return _createClass(s, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this._indicator.parentNode.removeChild(this._indicator),
- this.options.swipeable ? this._teardownSwipeableTabs() : this._teardownNormalTabs(),
- this.$el[0].M_Tabs = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleWindowResizeBound = this._handleWindowResize.bind(this),
- window.addEventListener("resize", this._handleWindowResizeBound),
- this._handleTabClickBound = this._handleTabClick.bind(this),
- this.el.addEventListener("click", this._handleTabClickBound)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- window.removeEventListener("resize", this._handleWindowResizeBound),
- this.el.removeEventListener("click", this._handleTabClickBound)
- }
- }, {
- key: "_handleWindowResize",
- value: function() {
- this._setTabsAndTabWidth(),
- 0 !== this.tabWidth && 0 !== this.tabsWidth && (this._indicator.style.left = this._calcLeftPos(this.$activeTabLink) + "px",
- this._indicator.style.right = this._calcRightPos(this.$activeTabLink) + "px")
- }
- }, {
- key: "_handleTabClick",
- value: function(e) {
- var i = this
- , n = t(e.target).closest("li.tab")
- , s = t(e.target).closest("a");
- if (s.length && s.parent().hasClass("tab"))
- if (n.hasClass("disabled"))
- e.preventDefault();
- else if (!s.attr("target")) {
- this._setTabsAndTabWidth(),
- this.$activeTabLink.removeClass("active");
- var o = this.$content;
- this.$activeTabLink = s,
- this.$content = t(M.escapeHash(s[0].hash)),
- this.$tabLinks = this.$el.children("li.tab").children("a"),
- this.$activeTabLink.addClass("active");
- var a = this.index;
- this.index = Math.max(this.$tabLinks.index(s), 0),
- this.options.swipeable ? this._tabsCarousel && this._tabsCarousel.set(this.index, function() {
- "function" == typeof i.options.onShow && i.options.onShow.call(i, i.$content[0])
- }) : this.$content.length && (this.$content[0].style.display = "block",
- this.$content.addClass("active"),
- "function" == typeof this.options.onShow && this.options.onShow.call(this, this.$content[0]),
- o.length && !o.is(this.$content) && (o[0].style.display = "none",
- o.removeClass("active"))),
- this._animateIndicator(a),
- e.preventDefault()
- }
- }
- }, {
- key: "_createIndicator",
- value: function() {
- var t = this
- , e = document.createElement("li");
- e.classList.add("indicator"),
- this.el.appendChild(e),
- this._indicator = e,
- setTimeout(function() {
- t._indicator.style.left = t._calcLeftPos(t.$activeTabLink) + "px",
- t._indicator.style.right = t._calcRightPos(t.$activeTabLink) + "px"
- }, 0)
- }
- }, {
- key: "_setupActiveTabLink",
- value: function() {
- this.$activeTabLink = t(this.$tabLinks.filter('[href="' + location.hash + '"]')),
- 0 === this.$activeTabLink.length && (this.$activeTabLink = this.$el.children("li.tab").children("a.active").first()),
- 0 === this.$activeTabLink.length && (this.$activeTabLink = this.$el.children("li.tab").children("a").first()),
- this.$tabLinks.removeClass("active"),
- this.$activeTabLink[0].classList.add("active"),
- this.index = Math.max(this.$tabLinks.index(this.$activeTabLink), 0),
- this.$activeTabLink.length && (this.$content = t(M.escapeHash(this.$activeTabLink[0].hash)),
- this.$content.addClass("active"))
- }
- }, {
- key: "_setupSwipeableTabs",
- value: function() {
- var e = this;
- window.innerWidth > this.options.responsiveThreshold && (this.options.swipeable = !1);
- var i = t();
- this.$tabLinks.each(function(e) {
- var n = t(M.escapeHash(e.hash));
- n.addClass("carousel-item"),
- i = i.add(n)
- });
- var n = t('
');
- i.first().before(n),
- n.append(i),
- i[0].style.display = "",
- this._tabsCarousel = M.Carousel.init(n[0], {
- fullWidth: !0,
- noWrap: !0,
- onCycleTo: function(i) {
- var n = e.index;
- e.index = t(i).index(),
- e.$activeTabLink.removeClass("active"),
- e.$activeTabLink = e.$tabLinks.eq(e.index),
- e.$activeTabLink.addClass("active"),
- e._animateIndicator(n),
- "function" == typeof e.options.onShow && e.options.onShow.call(e, e.$content[0])
- }
- })
- }
- }, {
- key: "_teardownSwipeableTabs",
- value: function() {
- var t = this._tabsCarousel.$el;
- this._tabsCarousel.destroy(),
- t.after(t.children()),
- t.remove()
- }
- }, {
- key: "_setupNormalTabs",
- value: function() {
- this.$tabLinks.not(this.$activeTabLink).each(function(e) {
- if (e.hash) {
- var i = t(M.escapeHash(e.hash));
- i.length && (i[0].style.display = "none")
- }
- })
- }
- }, {
- key: "_teardownNormalTabs",
- value: function() {
- this.$tabLinks.each(function(e) {
- if (e.hash) {
- var i = t(M.escapeHash(e.hash));
- i.length && (i[0].style.display = "")
- }
- })
- }
- }, {
- key: "_setTabsAndTabWidth",
- value: function() {
- this.tabsWidth = this.$el.width(),
- this.tabWidth = Math.max(this.tabsWidth, this.el.scrollWidth) / this.$tabLinks.length
- }
- }, {
- key: "_calcRightPos",
- value: function(t) {
- return Math.ceil(this.tabsWidth - t.position().left - t[0].getBoundingClientRect().width)
- }
- }, {
- key: "_calcLeftPos",
- value: function(t) {
- return Math.floor(t.position().left)
- }
- }, {
- key: "updateTabIndicator",
- value: function() {
- this._animateIndicator(this.index)
- }
- }, {
- key: "_animateIndicator",
- value: function(t) {
- var i = 0
- , n = 0;
- this.index - t >= 0 ? i = 90 : n = 90;
- var s = {
- targets: this._indicator,
- left: {
- value: this._calcLeftPos(this.$activeTabLink),
- delay: i
- },
- right: {
- value: this._calcRightPos(this.$activeTabLink),
- delay: n
- },
- duration: this.options.duration,
- easing: "easeOutQuad"
- };
- e.remove(this._indicator),
- e(s)
- }
- }, {
- key: "select",
- value: function(t) {
- var e = this.$tabLinks.filter('[href="#' + t + '"]');
- e.length && e.trigger("click")
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Tabs
- }
- }, {
- key: "defaults",
- get: function() {
- return i
- }
- }]),
- s
- }();
- window.M.Tabs = n,
- M.jQueryLoaded && M.initializeJqueryWrapper(n, "tabs", "M_Tabs")
-}(cash, M.anime),
-function(t, e) {
- "use strict";
- var i = {
- exitDelay: 200,
- enterDelay: 0,
- html: null,
- margin: 5,
- inDuration: 250,
- outDuration: 200,
- position: "bottom",
- transitionMovement: 10
- }
- , n = function(n) {
- _inherits(s, Component);
- function s(e, i) {
- _classCallCheck(this, s);
- var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
- return n.el.M_Tooltip = n,
- n.options = t.extend({}, s.defaults, i),
- n.isOpen = !1,
- n.isHovered = !1,
- n._appendTooltipEl(),
- n._setupEventHandlers(),
- n
- }
- return _createClass(s, [{
- key: "destroy",
- value: function() {
- t(this.tooltipEl).remove(),
- this._removeEventHandlers(),
- this.$el[0].M_Tooltip = void 0
- }
- }, {
- key: "_appendTooltipEl",
- value: function() {
- var t = document.createElement("div");
- t.classList.add("material-tooltip"),
- this.tooltipEl = t;
- var e = document.createElement("div");
- e.classList.add("tooltip-content"),
- e.innerHTML = this.options.html,
- t.appendChild(e),
- document.body.appendChild(t)
- }
- }, {
- key: "_updateTooltipContent",
- value: function() {
- this.tooltipEl.querySelector(".tooltip-content").innerHTML = this.options.html
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this.handleMouseEnterBound = this._handleMouseEnter.bind(this),
- this.handleMouseLeaveBound = this._handleMouseLeave.bind(this),
- this.$el[0].addEventListener("mouseenter", this.handleMouseEnterBound),
- this.$el[0].addEventListener("mouseleave", this.handleMouseLeaveBound)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.$el[0].removeEventListener("mouseenter", this.handleMouseEnterBound),
- this.$el[0].removeEventListener("mouseleave", this.handleMouseLeaveBound)
- }
- }, {
- key: "open",
- value: function() {
- this.isOpen || (this.isOpen = !0,
- this.options = t.extend({}, this.options, this._getAttributeOptions()),
- this._updateTooltipContent(),
- this._setEnterDelayTimeout())
- }
- }, {
- key: "close",
- value: function() {
- this.isOpen && (this.isOpen = !1,
- this._setExitDelayTimeout())
- }
- }, {
- key: "_setExitDelayTimeout",
- value: function() {
- var t = this;
- clearTimeout(this._exitDelayTimeout),
- this._exitDelayTimeout = setTimeout(function() {
- t.isHovered || t._animateOut()
- }, this.options.exitDelay)
- }
- }, {
- key: "_setEnterDelayTimeout",
- value: function() {
- var t = this;
- clearTimeout(this._enterDelayTimeout),
- this._enterDelayTimeout = setTimeout(function() {
- t.isHovered && t._animateIn()
- }, this.options.enterDelay)
- }
- }, {
- key: "_positionTooltip",
- value: function() {
- var e = this.$el[0]
- , i = this.tooltipEl
- , n = e.offsetHeight
- , s = e.offsetWidth
- , o = i.offsetHeight
- , a = i.offsetWidth
- , r = void 0
- , l = this.options.margin
- , h = void 0
- , d = void 0;
- this.xMovement = 0,
- this.yMovement = 0,
- h = e.getBoundingClientRect().top + M.getDocumentScrollTop(),
- d = e.getBoundingClientRect().left + M.getDocumentScrollLeft(),
- "top" === this.options.position ? (h += -o - l,
- d += s / 2 - a / 2,
- this.yMovement = -this.options.transitionMovement) : "right" === this.options.position ? (h += n / 2 - o / 2,
- d += s + l,
- this.xMovement = this.options.transitionMovement) : "left" === this.options.position ? (h += n / 2 - o / 2,
- d += -a - l,
- this.xMovement = -this.options.transitionMovement) : (h += n + l,
- d += s / 2 - a / 2,
- this.yMovement = this.options.transitionMovement),
- r = this._repositionWithinScreen(d, h, a, o),
- t(i).css({
- top: r.y + "px",
- left: r.x + "px"
- })
- }
- }, {
- key: "_repositionWithinScreen",
- value: function(t, e, i, n) {
- var s = M.getDocumentScrollLeft()
- , o = M.getDocumentScrollTop()
- , a = t - s
- , r = e - o
- , l = {
- left: a,
- top: r,
- width: i,
- height: n
- }
- , h = this.options.margin + this.options.transitionMovement
- , d = M.checkWithinContainer(document.body, l, h);
- return d.left ? a = h : d.right && (a -= a + i - window.innerWidth),
- d.top ? r = h : d.bottom && (r -= r + n - window.innerHeight),
- {
- x: a + s,
- y: r + o
- }
- }
- }, {
- key: "_animateIn",
- value: function() {
- this._positionTooltip(),
- this.tooltipEl.style.visibility = "visible",
- e.remove(this.tooltipEl),
- e({
- targets: this.tooltipEl,
- opacity: 1,
- translateX: this.xMovement,
- translateY: this.yMovement,
- duration: this.options.inDuration,
- easing: "easeOutCubic"
- })
- }
- }, {
- key: "_animateOut",
- value: function() {
- e.remove(this.tooltipEl),
- e({
- targets: this.tooltipEl,
- opacity: 0,
- translateX: 0,
- translateY: 0,
- duration: this.options.outDuration,
- easing: "easeOutCubic"
- })
- }
- }, {
- key: "_handleMouseEnter",
- value: function() {
- this.isHovered = !0,
- this.open()
- }
- }, {
- key: "_handleMouseLeave",
- value: function() {
- this.isHovered = !1,
- this.close()
- }
- }, {
- key: "_getAttributeOptions",
- value: function() {
- var t = {}
- , e = this.$el[0].getAttribute("data-tooltip")
- , i = this.$el[0].getAttribute("data-position");
- return e && (t.html = e),
- i && (t.position = i),
- t
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Tooltip
- }
- }, {
- key: "defaults",
- get: function() {
- return i
- }
- }]),
- s
- }();
- M.Tooltip = n,
- M.jQueryLoaded && M.initializeJqueryWrapper(n, "tooltip", "M_Tooltip")
-}(cash, M.anime),
-function(t) {
- "use strict";
- var e = e || {}
- , i = document.querySelectorAll.bind(document);
- function n(t) {
- var e = "";
- for (var i in t)
- t.hasOwnProperty(i) && (e += i + ":" + t[i] + ";");
- return e
- }
- var s = {
- duration: 750,
- show: function(t, e) {
- if (2 === t.button)
- return !1;
- var i = e || this
- , o = document.createElement("div");
- o.className = "waves-ripple",
- i.appendChild(o);
- var a = function(t) {
- var e, i, n = {
- top: 0,
- left: 0
- }, s = t && t.ownerDocument;
- return e = s.documentElement,
- void 0 !== t.getBoundingClientRect && (n = t.getBoundingClientRect()),
- i = function(t) {
- return null !== (e = t) && e === e.window ? t : 9 === t.nodeType && t.defaultView;
- var e
- }(s),
- {
- top: n.top + i.pageYOffset - e.clientTop,
- left: n.left + i.pageXOffset - e.clientLeft
- }
- }(i)
- , r = t.pageY - a.top
- , l = t.pageX - a.left
- , h = "scale(" + i.clientWidth / 100 * 10 + ")";
- "touches"in t && (r = t.touches[0].pageY - a.top,
- l = t.touches[0].pageX - a.left),
- o.setAttribute("data-hold", Date.now()),
- o.setAttribute("data-scale", h),
- o.setAttribute("data-x", l),
- o.setAttribute("data-y", r);
- var d = {
- top: r + "px",
- left: l + "px"
- };
- o.className = o.className + " waves-notransition",
- o.setAttribute("style", n(d)),
- o.className = o.className.replace("waves-notransition", ""),
- d["-webkit-transform"] = h,
- d["-moz-transform"] = h,
- d["-ms-transform"] = h,
- d["-o-transform"] = h,
- d.transform = h,
- d.opacity = "1",
- d["-webkit-transition-duration"] = s.duration + "ms",
- d["-moz-transition-duration"] = s.duration + "ms",
- d["-o-transition-duration"] = s.duration + "ms",
- d["transition-duration"] = s.duration + "ms",
- d["-webkit-transition-timing-function"] = "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
- d["-moz-transition-timing-function"] = "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
- d["-o-transition-timing-function"] = "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
- d["transition-timing-function"] = "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
- o.setAttribute("style", n(d))
- },
- hide: function(t) {
- o.touchup(t);
- var e = this
- , i = (e.clientWidth,
- null)
- , a = e.getElementsByClassName("waves-ripple");
- if (!(a.length > 0))
- return !1;
- var r = (i = a[a.length - 1]).getAttribute("data-x")
- , l = i.getAttribute("data-y")
- , h = i.getAttribute("data-scale")
- , d = 350 - (Date.now() - Number(i.getAttribute("data-hold")));
- d < 0 && (d = 0),
- setTimeout(function() {
- var t = {
- top: l + "px",
- left: r + "px",
- opacity: "0",
- "-webkit-transition-duration": s.duration + "ms",
- "-moz-transition-duration": s.duration + "ms",
- "-o-transition-duration": s.duration + "ms",
- "transition-duration": s.duration + "ms",
- "-webkit-transform": h,
- "-moz-transform": h,
- "-ms-transform": h,
- "-o-transform": h,
- transform: h
- };
- i.setAttribute("style", n(t)),
- setTimeout(function() {
- try {
- e.removeChild(i)
- } catch (t) {
- return !1
- }
- }, s.duration)
- }, d)
- },
- wrapInput: function(t) {
- for (var e = 0; e < t.length; e++) {
- var i = t[e];
- if ("input" === i.tagName.toLowerCase()) {
- var n = i.parentNode;
- if ("i" === n.tagName.toLowerCase() && -1 !== n.className.indexOf("waves-effect"))
- continue;
- var s = document.createElement("i");
- s.className = i.className + " waves-input-wrapper";
- var o = i.getAttribute("style");
- o || (o = ""),
- s.setAttribute("style", o),
- i.className = "waves-button-input",
- i.removeAttribute("style"),
- n.replaceChild(s, i),
- s.appendChild(i)
- }
- }
- }
- }
- , o = {
- touches: 0,
- allowEvent: function(t) {
- var e = !0;
- return "touchstart" === t.type ? o.touches += 1 : "touchend" === t.type || "touchcancel" === t.type ? setTimeout(function() {
- o.touches > 0 && (o.touches -= 1)
- }, 500) : "mousedown" === t.type && o.touches > 0 && (e = !1),
- e
- },
- touchup: function(t) {
- o.allowEvent(t)
- }
- };
- function a(e) {
- var i = function(t) {
- if (!1 === o.allowEvent(t))
- return null;
- for (var e = null, i = t.target || t.srcElement; null !== i.parentNode; ) {
- if (!(i instanceof SVGElement) && -1 !== i.className.indexOf("waves-effect")) {
- e = i;
- break
- }
- i = i.parentNode
- }
- return e
- }(e);
- null !== i && (s.show(e, i),
- "ontouchstart"in t && (i.addEventListener("touchend", s.hide, !1),
- i.addEventListener("touchcancel", s.hide, !1)),
- i.addEventListener("mouseup", s.hide, !1),
- i.addEventListener("mouseleave", s.hide, !1),
- i.addEventListener("dragend", s.hide, !1))
- }
- e.displayEffect = function(e) {
- "duration"in (e = e || {}) && (s.duration = e.duration),
- s.wrapInput(i(".waves-effect")),
- "ontouchstart"in t && document.body.addEventListener("touchstart", a, !1),
- document.body.addEventListener("mousedown", a, !1)
- }
- ,
- e.attach = function(e) {
- "input" === e.tagName.toLowerCase() && (s.wrapInput([e]),
- e = e.parentNode),
- "ontouchstart"in t && e.addEventListener("touchstart", a, !1),
- e.addEventListener("mousedown", a, !1)
- }
- ,
- t.Waves = e,
- document.addEventListener("DOMContentLoaded", function() {
- e.displayEffect()
- }, !1)
-}(window),
-function(t, e) {
- "use strict";
- var i = {
- html: "",
- displayLength: 4e3,
- inDuration: 300,
- outDuration: 375,
- classes: "",
- completeCallback: null,
- activationPercent: .8
- }
- , n = function() {
- function n(e) {
- _classCallCheck(this, n),
- this.options = t.extend({}, n.defaults, e),
- this.message = this.options.html,
- this.panning = !1,
- this.timeRemaining = this.options.displayLength,
- 0 === n._toasts.length && n._createContainer(),
- n._toasts.push(this);
- var i = this._createToast();
- i.M_Toast = this,
- this.el = i,
- this._animateIn(),
- this._setTimer()
- }
- return _createClass(n, [{
- key: "_createToast",
- value: function() {
- var e = document.createElement("div");
- return e.classList.add("toast"),
- this.options.classes.length && t(e).addClass(this.options.classes),
- ("object" == typeof HTMLElement ? this.message instanceof HTMLElement : this.message && "object" == typeof this.message && null !== this.message && 1 === this.message.nodeType && "string" == typeof this.message.nodeName) ? e.appendChild(this.message) : this.message.jquery ? t(e).append(this.message[0]) : e.innerHTML = this.message,
- n._container.appendChild(e),
- e
- }
- }, {
- key: "_animateIn",
- value: function() {
- e({
- targets: this.el,
- top: 0,
- opacity: 1,
- duration: 300,
- easing: "easeOutCubic"
- })
- }
- }, {
- key: "_setTimer",
- value: function() {
- var t = this;
- this.timeRemaining !== 1 / 0 && (this.counterInterval = setInterval(function() {
- t.panning || (t.timeRemaining -= 20),
- t.timeRemaining <= 0 && t.dismiss()
- }, 20))
- }
- }, {
- key: "dismiss",
- value: function() {
- var t = this;
- window.clearInterval(this.counterInterval);
- var i = this.el.offsetWidth * this.options.activationPercent;
- this.wasSwiped && (this.el.style.transition = "transform .05s, opacity .05s",
- this.el.style.transform = "translateX(" + i + "px)",
- this.el.style.opacity = 0),
- e({
- targets: this.el,
- opacity: 0,
- marginTop: -40,
- duration: this.options.outDuration,
- easing: "easeOutExpo",
- complete: function() {
- "function" == typeof t.options.completeCallback && t.options.completeCallback(),
- t.el.parentNode.removeChild(t.el),
- n._toasts.splice(n._toasts.indexOf(t), 1),
- 0 === n._toasts.length && n._removeContainer()
- }
- })
- }
- }], [{
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Toast
- }
- }, {
- key: "_createContainer",
- value: function() {
- var t = document.createElement("div");
- t.setAttribute("id", "toast-container"),
- t.addEventListener("touchstart", n._onDragStart),
- t.addEventListener("touchmove", n._onDragMove),
- t.addEventListener("touchend", n._onDragEnd),
- t.addEventListener("mousedown", n._onDragStart),
- document.addEventListener("mousemove", n._onDragMove),
- document.addEventListener("mouseup", n._onDragEnd),
- document.body.appendChild(t),
- n._container = t
- }
- }, {
- key: "_removeContainer",
- value: function() {
- document.removeEventListener("mousemove", n._onDragMove),
- document.removeEventListener("mouseup", n._onDragEnd),
- n._container.parentNode.removeChild(n._container),
- n._container = null
- }
- }, {
- key: "_onDragStart",
- value: function(e) {
- if (e.target && t(e.target).closest(".toast").length) {
- var i = t(e.target).closest(".toast")[0].M_Toast;
- i.panning = !0,
- n._draggedToast = i,
- i.el.classList.add("panning"),
- i.el.style.transition = "",
- i.startingXPos = n._xPos(e),
- i.time = Date.now(),
- i.xPos = n._xPos(e)
- }
- }
- }, {
- key: "_onDragMove",
- value: function(t) {
- if (n._draggedToast) {
- t.preventDefault();
- var e = n._draggedToast;
- e.deltaX = Math.abs(e.xPos - n._xPos(t)),
- e.xPos = n._xPos(t),
- e.velocityX = e.deltaX / (Date.now() - e.time),
- e.time = Date.now();
- var i = e.xPos - e.startingXPos
- , s = e.el.offsetWidth * e.options.activationPercent;
- e.el.style.transform = "translateX(" + i + "px)",
- e.el.style.opacity = 1 - Math.abs(i / s)
- }
- }
- }, {
- key: "_onDragEnd",
- value: function() {
- if (n._draggedToast) {
- var t = n._draggedToast;
- t.panning = !1,
- t.el.classList.remove("panning");
- var e = t.xPos - t.startingXPos
- , i = t.el.offsetWidth * t.options.activationPercent;
- Math.abs(e) > i || t.velocityX > 1 ? (t.wasSwiped = !0,
- t.dismiss()) : (t.el.style.transition = "transform .2s, opacity .2s",
- t.el.style.transform = "",
- t.el.style.opacity = ""),
- n._draggedToast = null
- }
- }
- }, {
- key: "_xPos",
- value: function(t) {
- return t.targetTouches && t.targetTouches.length >= 1 ? t.targetTouches[0].clientX : t.clientX
- }
- }, {
- key: "dismissAll",
- value: function() {
- for (var t in n._toasts)
- n._toasts[t].dismiss()
- }
- }, {
- key: "defaults",
- get: function() {
- return i
- }
- }]),
- n
- }();
- n._toasts = [],
- n._container = null,
- n._draggedToast = null,
- M.Toast = n,
- M.toast = function(t) {
- return new n(t)
- }
-}(cash, M.anime),
-function(t, e) {
- "use strict";
- var i = {
- edge: "left",
- draggable: !0,
- inDuration: 250,
- outDuration: 200,
- onOpenStart: null,
- onOpenEnd: null,
- onCloseStart: null,
- onCloseEnd: null
- }
- , n = function(n) {
- _inherits(s, Component);
- function s(e, i) {
- _classCallCheck(this, s);
- var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
- return n.el.M_Sidenav = n,
- n.id = n.$el.attr("id"),
- n.options = t.extend({}, s.defaults, i),
- n.isOpen = !1,
- n.isFixed = n.el.classList.contains("sidenav-fixed"),
- n.isDragged = !1,
- n._createOverlay(),
- n._createDragTarget(),
- n._setupEventHandlers(),
- n._setupClasses(),
- n._setupFixed(),
- s._sidenavs.push(n),
- n
- }
- return _createClass(s, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this._overlay.parentNode.removeChild(this._overlay),
- this.dragTarget.parentNode.removeChild(this.dragTarget),
- this.el.M_Sidenav = void 0;
- var t = s._sidenavs.indexOf(this);
- t >= 0 && s._sidenavs.splice(t, 1)
- }
- }, {
- key: "_createOverlay",
- value: function() {
- var t = document.createElement("div");
- this._closeBound = this.close.bind(this),
- t.classList.add("sidenav-overlay"),
- t.addEventListener("click", this._closeBound),
- document.body.appendChild(t),
- this._overlay = t
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- 0 === s._sidenavs.length && document.body.addEventListener("click", this._handleTriggerClick),
- this._handleDragTargetDragBound = this._handleDragTargetDrag.bind(this),
- this._handleDragTargetReleaseBound = this._handleDragTargetRelease.bind(this),
- this._handleCloseDragBound = this._handleCloseDrag.bind(this),
- this._handleCloseReleaseBound = this._handleCloseRelease.bind(this),
- this._handleCloseTriggerClickBound = this._handleCloseTriggerClick.bind(this),
- this.dragTarget.addEventListener("touchmove", this._handleDragTargetDragBound),
- this.dragTarget.addEventListener("touchend", this._handleDragTargetReleaseBound),
- this._overlay.addEventListener("touchmove", this._handleCloseDragBound),
- this._overlay.addEventListener("touchend", this._handleCloseReleaseBound),
- this.el.addEventListener("touchmove", this._handleCloseDragBound),
- this.el.addEventListener("touchend", this._handleCloseReleaseBound),
- this.el.addEventListener("click", this._handleCloseTriggerClickBound),
- this.isFixed && (this._handleWindowResizeBound = this._handleWindowResize.bind(this),
- window.addEventListener("resize", this._handleWindowResizeBound))
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- 1 === s._sidenavs.length && document.body.removeEventListener("click", this._handleTriggerClick),
- this.dragTarget.removeEventListener("touchmove", this._handleDragTargetDragBound),
- this.dragTarget.removeEventListener("touchend", this._handleDragTargetReleaseBound),
- this._overlay.removeEventListener("touchmove", this._handleCloseDragBound),
- this._overlay.removeEventListener("touchend", this._handleCloseReleaseBound),
- this.el.removeEventListener("touchmove", this._handleCloseDragBound),
- this.el.removeEventListener("touchend", this._handleCloseReleaseBound),
- this.el.removeEventListener("click", this._handleCloseTriggerClickBound),
- this.isFixed && window.removeEventListener("resize", this._handleWindowResizeBound)
- }
- }, {
- key: "_handleTriggerClick",
- value: function(e) {
- var i = t(e.target).closest(".sidenav-trigger");
- if (e.target && i.length) {
- var n = M.getIdFromTrigger(i[0])
- , s = document.getElementById(n).M_Sidenav;
- s && s.open(i),
- e.preventDefault()
- }
- }
- }, {
- key: "_startDrag",
- value: function(t) {
- var i = t.targetTouches[0].clientX;
- this.isDragged = !0,
- this._startingXpos = i,
- this._xPos = this._startingXpos,
- this._time = Date.now(),
- this._width = this.el.getBoundingClientRect().width,
- this._overlay.style.display = "block",
- e.remove(this.el),
- e.remove(this._overlay)
- }
- }, {
- key: "_dragMoveUpdate",
- value: function(t) {
- var e = t.targetTouches[0].clientX;
- this.deltaX = Math.abs(this._xPos - e),
- this._xPos = e,
- this.velocityX = this.deltaX / (Date.now() - this._time),
- this._time = Date.now()
- }
- }, {
- key: "_handleDragTargetDrag",
- value: function(t) {
- this.isDragged || this._startDrag(t),
- this._dragMoveUpdate(t);
- var e = this._xPos - this._startingXpos
- , i = e > 0 ? "right" : "left";
- e = Math.min(this._width, Math.abs(e)),
- this.options.edge === i && (e = 0);
- var n = e
- , s = "translateX(-100%)";
- "right" === this.options.edge && (s = "translateX(100%)",
- n = -n),
- this.percentOpen = Math.min(1, e / this._width),
- this.el.style.transform = s + " translateX(" + n + "px)",
- this._overlay.style.opacity = this.percentOpen
- }
- }, {
- key: "_handleDragTargetRelease",
- value: function() {
- this.isDragged && (this.percentOpen > .5 ? this.open() : this._animateOut(),
- this.isDragged = !1)
- }
- }, {
- key: "_handleCloseDrag",
- value: function(t) {
- if (this.isOpen) {
- this.isDragged || this._startDrag(t),
- this._dragMoveUpdate(t);
- var e = this._xPos - this._startingXpos
- , i = e > 0 ? "right" : "left";
- e = Math.min(this._width, Math.abs(e)),
- this.options.edge !== i && (e = 0);
- var n = -e;
- "right" === this.options.edge && (n = -n),
- this.percentOpen = Math.min(1, 1 - e / this._width),
- this.el.style.transform = "translateX(" + n + "px)",
- this._overlay.style.opacity = this.percentOpen
- }
- }
- }, {
- key: "_handleCloseRelease",
- value: function() {
- this.isOpen && this.isDragged && (this.percentOpen > .5 ? this._animateIn() : this.close(),
- this.isDragged = !1)
- }
- }, {
- key: "_handleCloseTriggerClick",
- value: function(e) {
- t(e.target).closest(".sidenav-close").length && this.close()
- }
- }, {
- key: "_handleWindowResize",
- value: function() {
- window.innerWidth > 992 ? this.open() : this.close()
- }
- }, {
- key: "_setupClasses",
- value: function() {
- "right" === this.options.edge && (this.el.classList.add("right-aligned"),
- this.dragTarget.classList.add("right-aligned"))
- }
- }, {
- key: "_removeClasses",
- value: function() {
- this.el.classList.remove("right-aligned"),
- this.dragTarget.classList.remove("right-aligned")
- }
- }, {
- key: "_setupFixed",
- value: function() {
- this.isFixed && window.innerWidth > 992 && this.open()
- }
- }, {
- key: "_createDragTarget",
- value: function() {
- var t = document.createElement("div");
- t.classList.add("drag-target"),
- document.body.appendChild(t),
- this.dragTarget = t
- }
- }, {
- key: "_preventBodyScrolling",
- value: function() {
- document.body.style.overflow = "hidden"
- }
- }, {
- key: "_enableBodyScrolling",
- value: function() {
- document.body.style.overflow = ""
- }
- }, {
- key: "open",
- value: function() {
- !0 !== this.isOpen && (this.isOpen = !0,
- "function" == typeof this.options.onOpenStart && this.options.onOpenStart.call(this, this.el),
- this.isFixed && window.innerWidth > 992 ? (e.remove(this.el),
- e({
- targets: this.el,
- translateX: 0,
- duration: 0,
- easing: "easeOutQuad"
- }),
- this._enableBodyScrolling(),
- this._overlay.style.display = "none") : (this._preventBodyScrolling(),
- this.isDragged && 1 == this.percentOpen || this._animateIn()))
- }
- }, {
- key: "close",
- value: function() {
- if (!1 !== this.isOpen)
- if (this.isOpen = !1,
- "function" == typeof this.options.onCloseStart && this.options.onCloseStart.call(this, this.el),
- this.isFixed && window.innerWidth > 992) {
- var t = "left" === this.options.edge ? "-105%" : "105%";
- this.el.style.transform = "translateX(" + t + ")"
- } else
- this._enableBodyScrolling(),
- this.isDragged && 0 == this.percentOpen ? this._overlay.style.display = "none" : this._animateOut()
- }
- }, {
- key: "_animateIn",
- value: function() {
- this._animateSidenavIn(),
- this._animateOverlayIn()
- }
- }, {
- key: "_animateSidenavIn",
- value: function() {
- var t = this
- , i = "left" === this.options.edge ? -1 : 1;
- this.isDragged && (i = "left" === this.options.edge ? i + this.percentOpen : i - this.percentOpen),
- e.remove(this.el),
- e({
- targets: this.el,
- translateX: [100 * i + "%", 0],
- duration: this.options.inDuration,
- easing: "easeOutQuad",
- complete: function() {
- "function" == typeof t.options.onOpenEnd && t.options.onOpenEnd.call(t, t.el)
- }
- })
- }
- }, {
- key: "_animateOverlayIn",
- value: function() {
- var i = 0;
- this.isDragged ? i = this.percentOpen : t(this._overlay).css({
- display: "block"
- }),
- e.remove(this._overlay),
- e({
- targets: this._overlay,
- opacity: [i, 1],
- duration: this.options.inDuration,
- easing: "easeOutQuad"
- })
- }
- }, {
- key: "_animateOut",
- value: function() {
- this._animateSidenavOut(),
- this._animateOverlayOut()
- }
- }, {
- key: "_animateSidenavOut",
- value: function() {
- var t = this
- , i = "left" === this.options.edge ? -1 : 1
- , n = 0;
- this.isDragged && (n = "left" === this.options.edge ? i + this.percentOpen : i - this.percentOpen),
- e.remove(this.el),
- e({
- targets: this.el,
- translateX: [100 * n + "%", 105 * i + "%"],
- duration: this.options.outDuration,
- easing: "easeOutQuad",
- complete: function() {
- "function" == typeof t.options.onCloseEnd && t.options.onCloseEnd.call(t, t.el)
- }
- })
- }
- }, {
- key: "_animateOverlayOut",
- value: function() {
- var i = this;
- e.remove(this._overlay),
- e({
- targets: this._overlay,
- opacity: 0,
- duration: this.options.outDuration,
- easing: "easeOutQuad",
- complete: function() {
- t(i._overlay).css("display", "none")
- }
- })
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Sidenav
- }
- }, {
- key: "defaults",
- get: function() {
- return i
- }
- }]),
- s
- }();
- n._sidenavs = [],
- window.M.Sidenav = n,
- M.jQueryLoaded && M.initializeJqueryWrapper(n, "sidenav", "M_Sidenav")
-}(cash, M.anime),
-function(t, e) {
- "use strict";
- var i = {
- throttle: 100,
- scrollOffset: 200,
- activeClass: "active",
- getActiveElement: function(t) {
- return 'a[href="#' + t + '"]'
- }
- }
- , n = function(n) {
- _inherits(s, Component);
- function s(e, i) {
- _classCallCheck(this, s);
- var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
- return n.el.M_ScrollSpy = n,
- n.options = t.extend({}, s.defaults, i),
- s._elements.push(n),
- s._count++,
- s._increment++,
- n.tickId = -1,
- n.id = s._increment,
- n._setupEventHandlers(),
- n._handleWindowScroll(),
- n
- }
- return _createClass(s, [{
- key: "destroy",
- value: function() {
- s._elements.splice(s._elements.indexOf(this), 1),
- s._elementsInView.splice(s._elementsInView.indexOf(this), 1),
- s._visibleElements.splice(s._visibleElements.indexOf(this.$el), 1),
- s._count--,
- this._removeEventHandlers(),
- t(this.options.getActiveElement(this.$el.attr("id"))).removeClass(this.options.activeClass),
- this.el.M_ScrollSpy = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- var t = M.throttle(this._handleWindowScroll, 200);
- this._handleThrottledResizeBound = t.bind(this),
- this._handleWindowScrollBound = this._handleWindowScroll.bind(this),
- 1 === s._count && (window.addEventListener("scroll", this._handleWindowScrollBound),
- window.addEventListener("resize", this._handleThrottledResizeBound),
- document.body.addEventListener("click", this._handleTriggerClick))
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- 0 === s._count && (window.removeEventListener("scroll", this._handleWindowScrollBound),
- window.removeEventListener("resize", this._handleThrottledResizeBound),
- document.body.removeEventListener("click", this._handleTriggerClick))
- }
- }, {
- key: "_handleTriggerClick",
- value: function(i) {
- for (var n = t(i.target), o = s._elements.length - 1; o >= 0; o--) {
- var a = s._elements[o];
- if (n.is('a[href="#' + a.$el.attr("id") + '"]')) {
- i.preventDefault();
- var r = a.$el.offset().top + 1;
- e({
- targets: [document.documentElement, document.body],
- scrollTop: r - a.options.scrollOffset,
- duration: 400,
- easing: "easeOutCubic"
- });
- break
- }
- }
- }
- }, {
- key: "_handleWindowScroll",
- value: function() {
- s._ticks++;
- for (var t = M.getDocumentScrollTop(), e = M.getDocumentScrollLeft(), i = e + window.innerWidth, n = t + window.innerHeight, o = s._findElements(t, i, n, e), a = 0; a < o.length; a++) {
- var r = o[a];
- r.tickId < 0 && r._enter(),
- r.tickId = s._ticks
- }
- for (var l = 0; l < s._elementsInView.length; l++) {
- var h = s._elementsInView[l]
- , d = h.tickId;
- d >= 0 && d !== s._ticks && (h._exit(),
- h.tickId = -1)
- }
- s._elementsInView = o
- }
- }, {
- key: "_enter",
- value: function() {
- s._visibleElements = s._visibleElements.filter(function(t) {
- return 0 != t.height()
- }),
- s._visibleElements[0] ? (t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),
- s._visibleElements[0][0].M_ScrollSpy && this.id < s._visibleElements[0][0].M_ScrollSpy.id ? s._visibleElements.unshift(this.$el) : s._visibleElements.push(this.$el)) : s._visibleElements.push(this.$el),
- t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).addClass(this.options.activeClass)
- }
- }, {
- key: "_exit",
- value: function() {
- var e = this;
- s._visibleElements = s._visibleElements.filter(function(t) {
- return 0 != t.height()
- }),
- s._visibleElements[0] && (t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),
- s._visibleElements = s._visibleElements.filter(function(t) {
- return t.attr("id") != e.$el.attr("id")
- }),
- s._visibleElements[0] && t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).addClass(this.options.activeClass))
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_ScrollSpy
- }
- }, {
- key: "_findElements",
- value: function(t, e, i, n) {
- for (var o = [], a = 0; a < s._elements.length; a++) {
- var r = s._elements[a]
- , l = t + r.options.scrollOffset || 200;
- if (r.$el.height() > 0) {
- var h = r.$el.offset().top
- , d = r.$el.offset().left
- , u = d + r.$el.width()
- , c = h + r.$el.height();
- !(d > e || u < n || h > i || c < l) && o.push(r)
- }
- }
- return o
- }
- }, {
- key: "defaults",
- get: function() {
- return i
- }
- }]),
- s
- }();
- n._elements = [],
- n._elementsInView = [],
- n._visibleElements = [],
- n._count = 0,
- n._increment = 0,
- n._ticks = 0,
- M.ScrollSpy = n,
- M.jQueryLoaded && M.initializeJqueryWrapper(n, "scrollSpy", "M_ScrollSpy")
-}(cash, M.anime),
-function(t) {
- "use strict";
- var e = {
- data: {},
- limit: 1 / 0,
- onAutocomplete: null,
- minLength: 1,
- sortFunction: function(t, e, i) {
- return t.indexOf(i) - e.indexOf(i)
- }
- }
- , i = function(i) {
- _inherits(n, Component);
- function n(e, i) {
- _classCallCheck(this, n);
- var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
- return s.el.M_Autocomplete = s,
- s.options = t.extend({}, n.defaults, i),
- s.isOpen = !1,
- s.count = 0,
- s.activeIndex = -1,
- s.oldVal,
- s.$inputField = s.$el.closest(".input-field"),
- s.$active = t(),
- s._setupDropdown(),
- s._setupEventHandlers(),
- s
- }
- return _createClass(n, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this._removeDropdown(),
- this.el.M_Autocomplete = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleInputBlurBound = this._handleInputBlur.bind(this),
- this._handleInputKeyupAndFocusBound = this._handleInputKeyupAndFocus.bind(this),
- this._handleInputKeydownBound = this._handleInputKeydown.bind(this),
- this._handleContainerMousedownAndTouchstartBound = this._handleContainerMousedownAndTouchstart.bind(this),
- this.el.addEventListener("blur", this._handleInputBlurBound),
- this.el.addEventListener("keyup", this._handleInputKeyupAndFocusBound),
- this.el.addEventListener("focus", this._handleInputKeyupAndFocusBound),
- this.el.addEventListener("keydown", this._handleInputKeydownBound),
- this.container.addEventListener("mousedown", this._handleContainerMousedownAndTouchstartBound),
- void 0 !== window.ontouchstart && this.container.addEventListener("touchstart", this._handleContainerMousedownAndTouchstartBound)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.el.removeEventListener("blur", this._handleInputBlurBound),
- this.el.removeEventListener("keyup", this._handleInputKeyupAndFocusBound),
- this.el.removeEventListener("focus", this._handleInputKeyupAndFocusBound),
- this.el.removeEventListener("keydown", this._handleInputKeydownBound),
- this.container.removeEventListener("mousedown", this._handleContainerMousedownAndTouchstartBound),
- void 0 !== window.ontouchstart && this.container.removeEventListener("touchstart", this._handleContainerMousedownAndTouchstartBound)
- }
- }, {
- key: "_setupDropdown",
- value: function() {
- this.container = document.createElement("ul"),
- t(this.container).addClass("autocomplete-content dropdown-content"),
- this.$inputField.append(this.container)
- }
- }, {
- key: "_removeDropdown",
- value: function() {
- this.container.parentNode.removeChild(this.container)
- }
- }, {
- key: "_handleInputBlur",
- value: function() {
- this._removeAutocomplete()
- }
- }, {
- key: "_handleInputKeyupAndFocus",
- value: function(t) {
- "keyup" === t.type && (n._keydown = !1),
- this.count = 0;
- var e = this.el.value.toLowerCase();
- 13 !== t.keyCode && 38 !== t.keyCode && 40 !== t.keyCode && (this.oldVal !== e && (this._removeAutocomplete(),
- e.length >= this.options.minLength && (this.isOpen = !0,
- this._renderDropdown(this.options.data, e))),
- this.oldVal = e)
- }
- }, {
- key: "_handleInputKeydown",
- value: function(e) {
- n._keydown = !0;
- var i = e.keyCode
- , s = void 0
- , o = t(this.container).children("li").length;
- 13 === i && this.activeIndex >= 0 ? (s = t(this.container).children("li").eq(this.activeIndex)).length && (this.selectOption(s),
- e.preventDefault()) : 38 !== i && 40 !== i || (e.preventDefault(),
- 38 === i && this.activeIndex > 0 && this.activeIndex--,
- 40 === i && this.activeIndex < o - 1 && this.activeIndex++,
- this.$active.removeClass("active"),
- this.activeIndex >= 0 && (this.$active = t(this.container).children("li").eq(this.activeIndex),
- this.$active.addClass("active")))
- }
- }, {
- key: "_handleContainerMousedownAndTouchstart",
- value: function(e) {
- var i = t(e.target).closest("li");
- this.selectOption(i)
- }
- }, {
- key: "_highlight",
- value: function(t, e) {
- var i = e.find("img")
- , n = e.text().toLowerCase().indexOf("" + t.toLowerCase())
- , s = n + t.length - 1
- , o = e.text().slice(0, n)
- , a = e.text().slice(n, s + 1)
- , r = e.text().slice(s + 1);
- e.html("
" + o + "" + a + " " + r + " "),
- i.length && e.prepend(i)
- }
- }, {
- key: "_resetCurrentElement",
- value: function() {
- this.activeIndex = -1,
- this.$active.removeClass("active")
- }
- }, {
- key: "_removeAutocomplete",
- value: function() {
- t(this.container).empty(),
- this._resetCurrentElement(),
- this.oldVal = null,
- this.isOpen = !1
- }
- }, {
- key: "selectOption",
- value: function(t) {
- var e = t.text().trim();
- this.el.value = e,
- this.$el.trigger("change"),
- this._removeAutocomplete(),
- "function" == typeof this.options.onAutocomplete && this.options.onAutocomplete.call(this, e)
- }
- }, {
- key: "_renderDropdown",
- value: function(e, i) {
- var n = this;
- this._removeAutocomplete();
- var s = [];
- for (var o in e)
- if (e.hasOwnProperty(o) && -1 !== o.toLowerCase().indexOf(i)) {
- if (this.count >= this.options.limit)
- break;
- var a = {
- data: e[o],
- key: o
- };
- s.push(a),
- this.count++
- }
- s.sort(function(t, e) {
- return n.options.sortFunction(t.key.toLowerCase(), e.key.toLowerCase(), i.toLowerCase())
- });
- for (var r = 0; r < s.length; r++) {
- var l = s[r]
- , h = t("
");
- l.data ? h.append('
' + l.key + " ") : h.append("
" + l.key + " "),
- t(this.container).append(h),
- this._highlight(i, h)
+ return _createClass(s, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this.el.M_Collapsible = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleCollapsibleClickBound = this._handleCollapsibleClick.bind(this),
+ this.el.addEventListener("click", this._handleCollapsibleClickBound)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.el.removeEventListener("click", this._handleCollapsibleClickBound)
+ }
+ }, {
+ key: "_handleCollapsibleClick",
+ value: function (e) {
+ var i = t(e.target).closest(".collapsible-header");
+ if (e.target && i.length) {
+ var n = i.closest(".collapsible");
+ if (n[0] === this.el) {
+ var s = i.closest("li"),
+ o = n.children("li"),
+ a = s[0].classList.contains("active"),
+ r = o.index(s);
+ a ? this.close(r) : this.open(r)
+ }
+ }
+ }
+ }, {
+ key: "_animateIn",
+ value: function (t) {
+ var i = this,
+ n = this.$el.children("li").eq(t);
+ if (n.length) {
+ var s = n.children(".collapsible-body");
+ e.remove(s[0]),
+ s.css({
+ display: "block",
+ overflow: "hidden",
+ height: 0,
+ paddingTop: "",
+ paddingBottom: ""
+ });
+ var o = s.css("padding-top"),
+ a = s.css("padding-bottom"),
+ r = s[0].scrollHeight;
+ s.css({
+ paddingTop: 0,
+ paddingBottom: 0
+ }),
+ e({
+ targets: s[0],
+ height: r,
+ paddingTop: o,
+ paddingBottom: a,
+ duration: this.options.inDuration,
+ easing: "easeInOutCubic",
+ complete: function (t) {
+ s.css({
+ overflow: "",
+ paddingTop: "",
+ paddingBottom: "",
+ height: ""
+ }),
+ "function" == typeof i.options.onOpenEnd && i.options.onOpenEnd.call(i, n[0])
+ }
+ })
+ }
+ }
+ }, {
+ key: "_animateOut",
+ value: function (t) {
+ var i = this,
+ n = this.$el.children("li").eq(t);
+ if (n.length) {
+ var s = n.children(".collapsible-body");
+ e.remove(s[0]),
+ s.css("overflow", "hidden"),
+ e({
+ targets: s[0],
+ height: 0,
+ paddingTop: 0,
+ paddingBottom: 0,
+ duration: this.options.outDuration,
+ easing: "easeInOutCubic",
+ complete: function () {
+ s.css({
+ height: "",
+ overflow: "",
+ padding: "",
+ display: ""
+ }),
+ "function" == typeof i.options.onCloseEnd && i.options.onCloseEnd.call(i, n[0])
+ }
+ })
+ }
+ }
+ }, {
+ key: "open",
+ value: function (e) {
+ var i = this,
+ n = this.$el.children("li").eq(e);
+ if (n.length && !n[0].classList.contains("active")) {
+ if ("function" == typeof this.options.onOpenStart && this.options.onOpenStart.call(this, n[0]),
+ this.options.accordion) {
+ var s = this.$el.children("li");
+ this.$el.children("li.active").each(function (e) {
+ var n = s.index(t(e));
+ i.close(n)
+ })
+ }
+ n[0].classList.add("active"),
+ this._animateIn(e)
+ }
+ }
+ }, {
+ key: "close",
+ value: function (t) {
+ var e = this.$el.children("li").eq(t);
+ e.length && e[0].classList.contains("active") && ("function" == typeof this.options.onCloseStart && this.options.onCloseStart.call(this, e[0]),
+ e[0].classList.remove("active"),
+ this._animateOut(t))
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Collapsible
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ s
+ }();
+ M.Collapsible = n,
+ M.jQueryLoaded && M.initializeJqueryWrapper(n, "collapsible", "M_Collapsible")
+ }(cash, M.anime),
+ function (t, e) {
+ "use strict";
+ var i = {
+ alignment: "left",
+ constrainWidth: !0,
+ coverTrigger: !0,
+ closeOnClick: !0,
+ hover: !1,
+ inDuration: 150,
+ outDuration: 250,
+ onOpenStart: null,
+ onOpenEnd: null,
+ onCloseStart: null,
+ onCloseEnd: null
+ },
+ n = function (n) {
+ _inherits(s, Component);
+
+ function s(e, i) {
+ _classCallCheck(this, s);
+ var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
+ return n.el.M_Dropdown = n,
+ s._dropdowns.push(n),
+ n.id = M.getIdFromTrigger(e),
+ n.dropdownEl = document.getElementById(n.id),
+ n.$dropdownEl = t(n.dropdownEl),
+ n.options = t.extend({}, s.defaults, i),
+ n.isOpen = !1,
+ n.focusedIndex = -1,
+ n.filterQuery = [],
+ n.$el.after(n.dropdownEl),
+ n._makeDropdownFocusable(),
+ n._resetFilterQueryBound = n._resetFilterQuery.bind(n),
+ n._handleDocumentClickBound = n._handleDocumentClick.bind(n),
+ n._handleDropdownKeydownBound = n._handleDropdownKeydown.bind(n),
+ n._handleTriggerKeydownBound = n._handleTriggerKeydown.bind(n),
+ n._setupEventHandlers(),
+ n
}
- }
- }, {
- key: "updateData",
- value: function(t) {
- var e = this.el.value.toLowerCase();
- this.options.data = t,
- this.isOpen && this._renderDropdown(t, e)
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Autocomplete
- }
- }, {
- key: "defaults",
- get: function() {
- return e
- }
- }]),
- n
- }();
- i._keydown = !1,
- M.Autocomplete = i,
- M.jQueryLoaded && M.initializeJqueryWrapper(i, "autocomplete", "M_Autocomplete")
-}(cash),
-function(t) {
- M.updateTextFields = function() {
- t("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea").each(function(e, i) {
- var n = t(this);
- e.value.length > 0 || t(e).is(":focus") || e.autofocus || null !== n.attr("placeholder") ? n.siblings("label").addClass("active") : e.validity ? n.siblings("label").toggleClass("active", !0 === e.validity.badInput) : n.siblings("label").removeClass("active")
- })
- }
- ,
- M.validate_field = function(t) {
- var e = null !== t.attr("data-length")
- , i = parseInt(t.attr("data-length"))
- , n = t[0].value.length;
- 0 !== n || !1 !== t[0].validity.badInput || t.is(":required") ? t.hasClass("validate") && (t.is(":valid") && e && n <= i || t.is(":valid") && !e ? (t.removeClass("invalid"),
- t.addClass("valid")) : (t.removeClass("valid"),
- t.addClass("invalid"))) : t.hasClass("validate") && (t.removeClass("valid"),
- t.removeClass("invalid"))
- }
- ,
- M.textareaAutoResize = function(e) {
- e instanceof Element && (e = t(e));
- var i = t(".hiddendiv").first();
- i.length || (i = t('
'),
- t("body").append(i));
- var n = e.css("font-family")
- , s = e.css("font-size")
- , o = e.css("line-height")
- , a = e.css("padding-top")
- , r = e.css("padding-right")
- , l = e.css("padding-bottom")
- , h = e.css("padding-left");
- s && i.css("font-size", s),
- n && i.css("font-family", n),
- o && i.css("line-height", o),
- a && i.css("padding-top", a),
- r && i.css("padding-right", r),
- l && i.css("padding-bottom", l),
- h && i.css("padding-left", h),
- e.data("original-height") || e.data("original-height", e.height()),
- "off" === e.attr("wrap") && i.css("overflow-wrap", "normal").css("white-space", "pre"),
- i.text(e[0].value + "\n");
- var d = i.html().replace(/\n/g, "
");
- i.html(d),
- "hidden" !== e.css("display") ? i.css("width", e.width() + "px") : i.css("width", t(window).width() / 2 + "px"),
- e.data("original-height") <= i.innerHeight() ? e.css("height", i.innerHeight() + "px") : e[0].value.length < e.data("previous-length") && e.css("height", e.data("original-height") + "px"),
- e.data("previous-length", e[0].value.length)
- }
- ,
- t(document).ready(function() {
- var e = "input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea";
- t(document).on("change", e, function() {
- 0 === this.value.length && null === t(this).attr("placeholder") || t(this).siblings("label").addClass("active"),
- M.validate_field(t(this))
- }),
- t(document).ready(function() {
- M.updateTextFields()
- }),
- t(document).on("reset", function(i) {
- var n = t(i.target);
- n.is("form") && (n.find(e).removeClass("valid").removeClass("invalid"),
- n.find(e).each(function(e) {
- this.value.length && t(this).siblings("label").removeClass("active")
- }),
- setTimeout(function() {
- n.find("select").each(function() {
- if (this.M_Select) {
- var e = t(this).find("option[selected]").text();
- t(this).siblings("input.select-dropdown")[0].value = e
- }
- })
- }, 0))
- }),
- document.addEventListener("focus", function(i) {
- t(i.target).is(e) && t(i.target).siblings("label, .prefix").addClass("active")
- }, !0),
- document.addEventListener("blur", function(i) {
- var n = t(i.target);
- if (n.is(e)) {
- var s = ".prefix";
- 0 === n[0].value.length && !0 !== n[0].validity.badInput && null === n.attr("placeholder") && (s += ", label"),
- n.siblings(s).removeClass("active"),
- M.validate_field(n)
- }
- }, !0);
- t(document).on("keyup", "input[type=radio], input[type=checkbox]", function(e) {
- if (e.which !== M.keys.TAB)
- ;
- else {
- t(this).addClass("tabbed");
- t(this).one("blur", function(e) {
- t(this).removeClass("tabbed")
- })
- }
- });
- var i = ".materialize-textarea";
- t(i).each(function() {
- var e = t(this);
- e.data("original-height", e.height()),
- e.data("previous-length", this.value.length),
- M.textareaAutoResize(e)
- }),
- t(document).on("keyup", i, function() {
- M.textareaAutoResize(t(this))
- }),
- t(document).on("keydown", i, function() {
- M.textareaAutoResize(t(this))
- }),
- t(document).on("change", '.file-field input[type="file"]', function() {
- for (var e = t(this).closest(".file-field").find("input.file-path"), i = t(this)[0].files, n = [], s = 0; s < i.length; s++)
- n.push(i[s].name);
- e[0].value = n.join(", "),
- e.trigger("change")
- })
- })
-}(cash),
-function(t, e) {
- "use strict";
- var i = {
- indicators: !0,
- height: 400,
- duration: 500,
- interval: 6e3
- }
- , n = function(n) {
- _inherits(s, Component);
- function s(i, n) {
- _classCallCheck(this, s);
- var o = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, i, n));
- return o.el.M_Slider = o,
- o.options = t.extend({}, s.defaults, n),
- o.$slider = o.$el.find(".slides"),
- o.$slides = o.$slider.children("li"),
- o.activeIndex = o.$slider.find(".active").index(),
- -1 != o.activeIndex && (o.$active = o.$slides.eq(o.activeIndex)),
- o._setSliderHeight(),
- o.$slides.find(".caption").each(function(t) {
- o._animateCaptionIn(t, 0)
- }),
- o.$slides.find("img").each(function(e) {
- var i = "data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
- t(e).attr("src") !== i && (t(e).css("background-image", 'url("' + t(e).attr("src") + '")'),
- t(e).attr("src", i))
- }),
- o._setupIndicators(),
- o.$active ? o.$active.css("display", "block") : (o.$slides.first().addClass("active"),
- e({
- targets: o.$slides.first()[0],
- opacity: 1,
- duration: o.options.duration,
- easing: "easeOutQuad"
- }),
- o.activeIndex = 0,
- o.$active = o.$slides.eq(o.activeIndex),
- o.options.indicators && o.$indicators.eq(o.activeIndex).addClass("active")),
- o.$active.find("img").each(function(t) {
- e({
- targets: o.$active.find(".caption")[0],
- opacity: 1,
- translateX: 0,
- translateY: 0,
- duration: o.options.duration,
- easing: "easeOutQuad"
- })
- }),
- o._setupEventHandlers(),
- o.start(),
- o
- }
- return _createClass(s, [{
- key: "destroy",
- value: function() {
- this.pause(),
- this._removeIndicators(),
- this._removeEventHandlers(),
- this.el.M_Slider = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- var t = this;
- this._handleIntervalBound = this._handleInterval.bind(this),
- this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this),
- this.options.indicators && this.$indicators.each(function(e) {
- e.addEventListener("click", t._handleIndicatorClickBound)
- })
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- var t = this;
- this.options.indicators && this.$indicators.each(function(e) {
- e.removeEventListener("click", t._handleIndicatorClickBound)
- })
- }
- }, {
- key: "_handleIndicatorClick",
- value: function(e) {
- var i = t(e.target).index();
- this.set(i)
- }
- }, {
- key: "_handleInterval",
- value: function() {
- var t = this.$slider.find(".active").index();
- this.$slides.length === t + 1 ? t = 0 : t += 1,
- this.set(t)
- }
- }, {
- key: "_animateCaptionIn",
- value: function(i, n) {
- var s = {
- targets: i,
- opacity: 0,
- duration: n,
- easing: "easeOutQuad"
- };
- t(i).hasClass("center-align") ? s.translateY = -100 : t(i).hasClass("right-align") ? s.translateX = 100 : t(i).hasClass("left-align") && (s.translateX = -100),
- e(s)
- }
- }, {
- key: "_setSliderHeight",
- value: function() {
- this.$el.hasClass("fullscreen") || (this.options.indicators ? this.$el.css("height", this.options.height + 40 + "px") : this.$el.css("height", this.options.height + "px"),
- this.$slider.css("height", this.options.height + "px"))
- }
- }, {
- key: "_setupIndicators",
- value: function() {
- var e = this;
- this.options.indicators && (this.$indicators = t('
'),
- this.$slides.each(function(i, n) {
- var s = t('
');
- e.$indicators.append(s[0])
- }),
- this.$el.append(this.$indicators[0]),
- this.$indicators = this.$indicators.children("li.indicator-item"))
- }
- }, {
- key: "_removeIndicators",
- value: function() {
- this.$el.find("ul.indicators").remove()
- }
- }, {
- key: "set",
- value: function(t) {
- var i = this;
- if (t >= this.$slides.length ? t = 0 : t < 0 && (t = this.$slides.length - 1),
- this.activeIndex != t) {
- this.$active = this.$slides.eq(this.activeIndex);
- var n = this.$active.find(".caption");
- this.$active.removeClass("active"),
- e({
- targets: this.$active[0],
- opacity: 0,
- duration: this.options.duration,
- easing: "easeOutQuad",
- complete: function() {
- i.$slides.not(".active").each(function(t) {
+ return _createClass(s, [{
+ key: "destroy",
+ value: function () {
+ this._resetDropdownStyles(),
+ this._removeEventHandlers(),
+ s._dropdowns.splice(s._dropdowns.indexOf(this), 1),
+ this.el.M_Dropdown = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this.el.addEventListener("keydown", this._handleTriggerKeydownBound),
+ this.options.hover ? (this._handleMouseEnterBound = this._handleMouseEnter.bind(this),
+ this.el.addEventListener("mouseenter", this._handleMouseEnterBound),
+ this._handleMouseLeaveBound = this._handleMouseLeave.bind(this),
+ this.el.addEventListener("mouseleave", this._handleMouseLeaveBound),
+ this.dropdownEl.addEventListener("mouseleave", this._handleMouseLeaveBound)) : (this._handleClickBound = this._handleClick.bind(this),
+ this.el.addEventListener("click", this._handleClickBound))
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.el.removeEventListener("keydown", this._handleTriggerKeydownBound),
+ this.options.hover ? (this.el.removeEventHandlers("mouseenter", this._handleMouseEnterBound),
+ this.el.removeEventHandlers("mouseleave", this._handleMouseLeaveBound),
+ this.dropdownEl.removeEventHandlers("mouseleave", this._handleMouseLeaveBound)) : this.el.removeEventListener("click", this._handleClickBound)
+ }
+ }, {
+ key: "_setupTemporaryEventHandlers",
+ value: function () {
+ document.body.addEventListener("click", this._handleDocumentClickBound, !0),
+ this.dropdownEl.addEventListener("keydown", this._handleDropdownKeydownBound)
+ }
+ }, {
+ key: "_removeTemporaryEventHandlers",
+ value: function () {
+ document.body.removeEventListener("click", this._handleDocumentClickBound, !0),
+ this.dropdownEl.removeEventListener("keydown", this._handleDropdownKeydownBound)
+ }
+ }, {
+ key: "_handleClick",
+ value: function (t) {
+ t.preventDefault(),
+ this.open()
+ }
+ }, {
+ key: "_handleMouseEnter",
+ value: function () {
+ this.open()
+ }
+ }, {
+ key: "_handleMouseLeave",
+ value: function (e) {
+ var i = e.toElement || e.relatedTarget,
+ n = !!t(i).closest(".dropdown-content").length,
+ s = !1,
+ o = t(i).closest(".dropdown-trigger");
+ o.length && o[0].M_Dropdown && o[0].M_Dropdown.isOpen && (s = !0),
+ s || n || this.close()
+ }
+ }, {
+ key: "_handleDocumentClick",
+ value: function (e) {
+ var i = this,
+ n = t(e.target);
+ this.options.closeOnClick && n.closest(".dropdown-content").length ? setTimeout(function () {
+ i.close()
+ }, 0) : n.closest(".dropdown-trigger").length ? setTimeout(function () {
+ i.close()
+ }, 0) : n.closest(".dropdown-content").length || setTimeout(function () {
+ i.close()
+ }, 0)
+ }
+ }, {
+ key: "_handleTriggerKeydown",
+ value: function (t) {
+ t.which !== M.keys.ARROW_DOWN && t.which !== M.keys.ENTER || this.isOpen || (t.preventDefault(),
+ this.open())
+ }
+ }, {
+ key: "_handleDropdownKeydown",
+ value: function (e) {
+ if (e.which === M.keys.TAB)
+ e.preventDefault(),
+ this.close();
+ else if (e.which !== M.keys.ARROW_DOWN && e.which !== M.keys.ARROW_UP || !this.isOpen)
+ if (e.which === M.keys.ENTER && this.isOpen) {
+ var i = this.dropdownEl.children[this.focusedIndex],
+ n = t(i).find("a, button").first();
+ n.length ? n[0].click() : i.click()
+ } else
+ e.which === M.keys.ESC && this.isOpen && (e.preventDefault(),
+ this.close());
+ else {
+ e.preventDefault();
+ var s = e.which === M.keys.ARROW_DOWN ? 1 : -1;
+ this.focusedIndex = Math.max(Math.min(this.focusedIndex + s, this.dropdownEl.children.length - 1), 0),
+ this._focusFocusedItem()
+ }
+ var o = String.fromCharCode(e.which).toLowerCase();
+ if (o && -1 === [9, 13, 27, 38, 40].indexOf(e.which)) {
+ this.filterQuery.push(o);
+ var a = this.filterQuery.join(""),
+ r = t(this.dropdownEl).find("li").filter(function (e) {
+ return 0 === t(e).text().toLowerCase().indexOf(a)
+ })[0];
+ r && (this.focusedIndex = t(r).index(),
+ this._focusFocusedItem())
+ }
+ this.filterTimeout = setTimeout(this._resetFilterQueryBound, 1e3)
+ }
+ }, {
+ key: "_resetFilterQuery",
+ value: function () {
+ this.filterQuery = []
+ }
+ }, {
+ key: "_resetDropdownStyles",
+ value: function () {
+ this.$dropdownEl.css({
+ display: "",
+ width: "",
+ height: "",
+ left: "",
+ top: "",
+ "transform-origin": "",
+ transform: "",
+ opacity: ""
+ })
+ }
+ }, {
+ key: "_makeDropdownFocusable",
+ value: function () {
+ -1 === this.dropdownEl.tabIndex && (this.dropdownEl.tabIndex = 0),
+ t(this.dropdownEl).children().attr("tabindex", 0)
+ }
+ }, {
+ key: "_focusFocusedItem",
+ value: function () {
+ this.focusedIndex >= 0 && this.focusedIndex < this.dropdownEl.children.length && this.dropdownEl.children[this.focusedIndex].focus()
+ }
+ }, {
+ key: "_getDropdownPosition",
+ value: function () {
+ this.el.offsetParent.getBoundingClientRect();
+ var t = {
+ left: this.el.offsetLeft,
+ top: this.el.offsetTop,
+ width: this.el.offsetWidth,
+ height: this.el.offsetHeight
+ },
+ e = (this.dropdownEl.offsetLeft,
+ this.dropdownEl.offsetTop,
+ this.dropdownEl.offsetWidth,
+ this.dropdownEl.offsetHeight,
+ this.el.getBoundingClientRect()),
+ i = this.dropdownEl.getBoundingClientRect(),
+ n = i.height,
+ s = i.width,
+ o = t.left,
+ a = t.top,
+ r = {
+ left: o,
+ top: a,
+ height: n,
+ width: s
+ },
+ l = this.dropdownEl.offsetParent,
+ h = M.checkPossibleAlignments(this.el, l, r, this.options.coverTrigger ? 0 : e.height),
+ d = "top",
+ u = this.options.alignment;
+ if (a += this.options.coverTrigger ? 0 : e.height,
+ h.top || (h.bottom ? d = "bottom" : h.spaceOnTop > h.spaceOnBottom ? (d = "bottom",
+ n += h.spaceOnTop,
+ a -= h.spaceOnTop) : n += h.spaceOnBottom),
+ !h[u]) {
+ var c = "left" === u ? "right" : "left";
+ h[c] ? u = c : h.spaceOnLeft > h.spaceOnRight ? (u = "right",
+ s += h.spaceOnLeft,
+ o -= h.spaceOnLeft) : (u = "left",
+ s += h.spaceOnRight)
+ }
+ return "bottom" === d && (a = a - i.height + (this.options.coverTrigger ? e.height : 0)),
+ "right" === u && (o = o - i.width + e.width), {
+ x: o,
+ y: a,
+ verticalAlignment: d,
+ horizontalAlignment: u,
+ height: n,
+ width: s
+ }
+ }
+ }, {
+ key: "_animateIn",
+ value: function (t) {
+ var i = this;
+ this.dropdownEl.style.left = t.x + "px",
+ this.dropdownEl.style.top = t.y + "px",
+ this.dropdownEl.style.height = t.height + "px",
+ this.dropdownEl.style.width = t.width + "px",
+ this.dropdownEl.style.transformOrigin = ("left" === t.horizontalAlignment ? "0" : "100%") + " " + ("top" === t.verticalAlignment ? "0" : "100%"),
+ e.remove(this.dropdownEl),
e({
- targets: t,
- opacity: 0,
- translateX: 0,
- translateY: 0,
- duration: 0,
- easing: "easeOutQuad"
+ targets: this.dropdownEl,
+ opacity: {
+ value: [0, 1],
+ easing: "easeOutQuad"
+ },
+ scaleX: [.3, 1],
+ scaleY: [.3, 1],
+ duration: this.options.inDuration,
+ easing: "easeOutQuint",
+ complete: function (t) {
+ if (i.dropdownEl.focus(),
+ "function" == typeof i.options.onOpenEnd) {
+ var e = t.animatables[0].target;
+ i.options.onOpenEnd.call(e, i.el)
+ }
+ }
})
- })
}
- }),
- this._animateCaptionIn(n[0], this.options.duration),
- this.options.indicators && (this.$indicators.eq(this.activeIndex).removeClass("active"),
- this.$indicators.eq(t).addClass("active")),
- e({
- targets: this.$slides.eq(t)[0],
- opacity: 1,
- duration: this.options.duration,
- easing: "easeOutQuad"
- }),
- e({
- targets: this.$slides.eq(t).find(".caption")[0],
- opacity: 1,
- translateX: 0,
- translateY: 0,
- duration: this.options.duration,
- delay: this.options.duration,
- easing: "easeOutQuad"
- }),
- this.$slides.eq(t).addClass("active"),
- this.activeIndex = t,
- this.start()
- }
- }
- }, {
- key: "pause",
- value: function() {
- clearInterval(this.interval)
- }
- }, {
- key: "start",
- value: function() {
- clearInterval(this.interval),
- this.interval = setInterval(this._handleIntervalBound, this.options.duration + this.options.interval)
- }
- }, {
- key: "next",
- value: function() {
- var t = this.activeIndex + 1;
- t >= this.$slides.length ? t = 0 : t < 0 && (t = this.$slides.length - 1),
- this.set(t)
- }
- }, {
- key: "prev",
- value: function() {
- var t = this.activeIndex - 1;
- t >= this.$slides.length ? t = 0 : t < 0 && (t = this.$slides.length - 1),
- this.set(t)
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Slider
- }
- }, {
- key: "defaults",
- get: function() {
- return i
- }
- }]),
- s
- }();
- M.Slider = n,
- M.jQueryLoaded && M.initializeJqueryWrapper(n, "slider", "M_Slider")
-}(cash, M.anime),
-function(t, e) {
- t(document).on("click", ".card", function(i) {
- if (t(this).children(".card-reveal").length) {
- var n = t(i.target).closest(".card");
- void 0 === n.data("initialOverflow") && n.data("initialOverflow", void 0 === n.css("overflow") ? "" : n.css("overflow"));
- var s = t(this).find(".card-reveal");
- t(i.target).is(t(".card-reveal .card-title")) || t(i.target).is(t(".card-reveal .card-title i")) ? e({
- targets: s[0],
- translateY: 0,
- duration: 225,
- easing: "easeInOutQuad",
- complete: function(e) {
- var i = e.animatables[0].target;
- t(i).css({
- display: "none"
- }),
- n.css("overflow", n.data("initialOverflow"))
- }
- }) : (t(i.target).is(t(".card .activator")) || t(i.target).is(t(".card .activator i"))) && (n.css("overflow", "hidden"),
- s.css({
- display: "block"
- }),
- e({
- targets: s[0],
- translateY: "-100%",
- duration: 300,
- easing: "easeInOutQuad"
- }))
- }
- })
-}(cash, M.anime),
-function(t) {
- "use strict";
- var e = {
- data: [],
- placeholder: "",
- secondaryPlaceholder: "",
- autocompleteOptions: {},
- limit: 1 / 0,
- onChipAdd: null,
- onChipSelect: null,
- onChipDelete: null
- }
- , i = function(i) {
- _inherits(n, Component);
- function n(e, i) {
- _classCallCheck(this, n);
- var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
- return s.el.M_Chips = s,
- s.options = t.extend({}, n.defaults, i),
- s.$el.addClass("chips input-field"),
- s.chipsData = [],
- s.$chips = t(),
- s._setupInput(),
- s.hasAutocomplete = Object.keys(s.options.autocompleteOptions).length > 0,
- s.$input.attr("id") || s.$input.attr("id", M.guid()),
- s.options.data.length && (s.chipsData = s.options.data,
- s._renderChips(s.chipsData)),
- s.hasAutocomplete && s._setupAutocomplete(),
- s._setPlaceholder(),
- s._setupLabel(),
- s._setupEventHandlers(),
- s
- }
- return _createClass(n, [{
- key: "getData",
- value: function() {
- return this.chipsData
- }
- }, {
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this.$chips.remove(),
- this.el.M_Chips = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleChipClickBound = this._handleChipClick.bind(this),
- this._handleInputKeydownBound = this._handleInputKeydown.bind(this),
- this._handleInputFocusBound = this._handleInputFocus.bind(this),
- this._handleInputBlurBound = this._handleInputBlur.bind(this),
- this.el.addEventListener("click", this._handleChipClickBound),
- document.addEventListener("keydown", n._handleChipsKeydown),
- document.addEventListener("keyup", n._handleChipsKeyup),
- this.el.addEventListener("blur", n._handleChipsBlur, !0),
- this.$input[0].addEventListener("focus", this._handleInputFocusBound),
- this.$input[0].addEventListener("blur", this._handleInputBlurBound),
- this.$input[0].addEventListener("keydown", this._handleInputKeydownBound)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.el.removeEventListener("click", this._handleChipClickBound),
- document.removeEventListener("keydown", n._handleChipsKeydown),
- document.removeEventListener("keyup", n._handleChipsKeyup),
- this.el.removeEventListener("blur", n._handleChipsBlur, !0),
- this.$input[0].removeEventListener("focus", this._handleInputFocusBound),
- this.$input[0].removeEventListener("blur", this._handleInputBlurBound),
- this.$input[0].removeEventListener("keydown", this._handleInputKeydownBound)
- }
- }, {
- key: "_handleChipClick",
- value: function(e) {
- var i = t(e.target).closest(".chip")
- , n = t(e.target).is(".close");
- if (i.length) {
- var s = i.index();
- n ? (this.deleteChip(s),
- this.$input[0].focus()) : this.selectChip(s)
- } else
- this.$input[0].focus()
- }
- }, {
- key: "_handleInputFocus",
- value: function() {
- this.$el.addClass("focus")
- }
- }, {
- key: "_handleInputBlur",
- value: function() {
- this.$el.removeClass("focus")
- }
- }, {
- key: "_handleInputKeydown",
- value: function(t) {
- if (n._keydown = !0,
- 13 === t.keyCode) {
- if (this.hasAutocomplete && this.autocomplete && this.autocomplete.isOpen)
- return;
- t.preventDefault(),
- this.addChip({
- tag: this.$input[0].value
- }),
- this.$input[0].value = ""
- } else
- 8 !== t.keyCode && 37 !== t.keyCode || "" !== this.$input[0].value || !this.chipsData.length || (t.preventDefault(),
- this.selectChip(this.chipsData.length - 1))
- }
- }, {
- key: "_renderChip",
- value: function(e) {
- if (e.tag) {
- var i = document.createElement("div")
- , n = document.createElement("i");
- if (i.classList.add("chip"),
- i.textContent = e.tag,
- i.setAttribute("tabindex", 0),
- t(n).addClass("material-icons close"),
- n.textContent = "close",
- e.image) {
- var s = document.createElement("img");
- s.setAttribute("src", e.image),
- i.insertBefore(s, i.firstChild)
- }
- return i.appendChild(n),
- i
- }
- }
- }, {
- key: "_renderChips",
- value: function() {
- this.$chips.remove();
- for (var t = 0; t < this.chipsData.length; t++) {
- var e = this._renderChip(this.chipsData[t]);
- this.$el.append(e),
- this.$chips.add(e)
- }
- this.$el.append(this.$input[0])
- }
- }, {
- key: "_setupAutocomplete",
- value: function() {
- var t = this;
- this.options.autocompleteOptions.onAutocomplete = function(e) {
- t.addChip({
- tag: e
- }),
- t.$input[0].value = "",
- t.$input[0].focus()
- }
- ,
- this.autocomplete = M.Autocomplete.init(this.$input, this.options.autocompleteOptions)[0]
- }
- }, {
- key: "_setupInput",
- value: function() {
- this.$input = this.$el.find("input"),
- this.$input.length || (this.$input = t("
"),
- this.$el.append(this.$input)),
- this.$input.addClass("input")
- }
- }, {
- key: "_setupLabel",
- value: function() {
- this.$label = this.$el.find("label"),
- this.$label.length && this.$label.setAttribute("for", this.$input.attr("id"))
- }
- }, {
- key: "_setPlaceholder",
- value: function() {
- void 0 !== this.chipsData && !this.chipsData.length && this.options.placeholder ? t(this.$input).prop("placeholder", this.options.placeholder) : (void 0 === this.chipsData || this.chipsData.length) && this.options.secondaryPlaceholder && t(this.$input).prop("placeholder", this.options.secondaryPlaceholder)
- }
- }, {
- key: "_isValid",
- value: function(t) {
- if (t.hasOwnProperty("tag") && "" !== t.tag) {
- for (var e = !1, i = 0; i < this.chipsData.length; i++)
- if (this.chipsData[i].tag === t.tag) {
- e = !0;
- break
+ }, {
+ key: "_animateOut",
+ value: function () {
+ var t = this;
+ e.remove(this.dropdownEl),
+ e({
+ targets: this.dropdownEl,
+ opacity: {
+ value: 0,
+ easing: "easeOutQuint"
+ },
+ scaleX: .3,
+ scaleY: .3,
+ duration: this.options.outDuration,
+ easing: "easeOutQuint",
+ complete: function (e) {
+ if (t._resetDropdownStyles(),
+ "function" == typeof t.options.onCloseEnd) {
+ e.animatables[0].target;
+ t.options.onCloseEnd.call(t, t.el)
+ }
+ }
+ })
}
- return !e
- }
- return !1
- }
- }, {
- key: "addChip",
- value: function(e) {
- if (this._isValid(e) && !(this.chipsData.length >= this.options.limit)) {
- var i = this._renderChip(e);
- this.$chips.add(i),
- this.chipsData.push(e),
- t(this.$input).before(i),
- this._setPlaceholder(),
- "function" == typeof this.options.onChipAdd && this.options.onChipAdd.call(this, this.$el, i)
- }
- }
- }, {
- key: "deleteChip",
- value: function(e) {
- var i = this.$chips.eq(e);
- this.$chips.eq(e).remove(),
- this.$chips = this.$chips.filter(function(e) {
- return t(e).index() >= 0
- }),
- this.chipsData.splice(e, 1),
- this._setPlaceholder(),
- "function" == typeof this.options.onChipDelete && this.options.onChipDelete.call(this, this.$el, i[0])
- }
- }, {
- key: "selectChip",
- value: function(t) {
- var e = this.$chips.eq(t);
- this._selectedChip = e,
- e[0].focus(),
- "function" == typeof this.options.onChipSelect && this.options.onChipSelect.call(this, this.$el, e[0])
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Chips
- }
- }, {
- key: "_handleChipsKeydown",
- value: function(e) {
- n._keydown = !0;
- var i = t(e.target).closest(".chips")
- , s = e.target && i.length;
- if (!t(e.target).is("input, textarea") && s) {
- var o = i[0].M_Chips;
- if (8 === e.keyCode || 46 === e.keyCode) {
- e.preventDefault();
- var a = o.chipsData.length;
- if (o._selectedChip) {
- var r = o._selectedChip.index();
- o.deleteChip(r),
- o._selectedChip = null,
- a = r - 1
- }
- o.chipsData.length && o.selectChip(a)
- } else if (37 === e.keyCode) {
- if (o._selectedChip) {
- var l = o._selectedChip.index() - 1;
- if (l < 0)
- return;
- o.selectChip(l)
- }
- } else if (39 === e.keyCode && o._selectedChip) {
- var h = o._selectedChip.index() + 1;
- h >= o.chipsData.length ? o.$input[0].focus() : o.selectChip(h)
- }
- }
- }
- }, {
- key: "_handleChipsKeyup",
- value: function(t) {
- n._keydown = !1
- }
- }, {
- key: "_handleChipsBlur",
- value: function(e) {
- if (!n._keydown) {
- t(e.target).closest(".chips")[0].M_Chips._selectedChip = null
- }
- }
- }, {
- key: "defaults",
- get: function() {
- return e
- }
- }]),
- n
- }();
- i._keydown = !1,
- M.Chips = i,
- M.jQueryLoaded && M.initializeJqueryWrapper(i, "chips", "M_Chips"),
- t(document).ready(function() {
- t(document.body).on("click", ".chip .close", function() {
- var e = t(this).closest(".chips");
- e.length && e[0].M_Chips || t(this).closest(".chip").remove()
- })
- })
-}(cash),
-function(t) {
- "use strict";
- var e = {
- top: 0,
- bottom: 1 / 0,
- offset: 0,
- onPositionChange: null
- }
- , i = function(i) {
- _inherits(n, Component);
- function n(e, i) {
- _classCallCheck(this, n);
- var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
- return s.el.M_Pushpin = s,
- s.options = t.extend({}, n.defaults, i),
- s.originalOffset = s.el.offsetTop,
- n._pushpins.push(s),
- s._setupEventHandlers(),
- s._updatePosition(),
- s
- }
- return _createClass(n, [{
- key: "destroy",
- value: function() {
- this.el.style.top = null,
- this._removePinClasses(),
- this._removeEventHandlers();
- var t = n._pushpins.indexOf(this);
- n._pushpins.splice(t, 1)
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- document.addEventListener("scroll", n._updateElements)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- document.removeEventListener("scroll", n._updateElements)
- }
- }, {
- key: "_updatePosition",
- value: function() {
- var t = M.getDocumentScrollTop() + this.options.offset;
- this.options.top <= t && this.options.bottom >= t && !this.el.classList.contains("pinned") && (this._removePinClasses(),
- this.el.style.top = this.options.offset + "px",
- this.el.classList.add("pinned"),
- "function" == typeof this.options.onPositionChange && this.options.onPositionChange.call(this, "pinned")),
- t < this.options.top && !this.el.classList.contains("pin-top") && (this._removePinClasses(),
- this.el.style.top = 0,
- this.el.classList.add("pin-top"),
- "function" == typeof this.options.onPositionChange && this.options.onPositionChange.call(this, "pin-top")),
- t > this.options.bottom && !this.el.classList.contains("pin-bottom") && (this._removePinClasses(),
- this.el.classList.add("pin-bottom"),
- this.el.style.top = this.options.bottom - this.originalOffset + "px",
- "function" == typeof this.options.onPositionChange && this.options.onPositionChange.call(this, "pin-bottom"))
- }
- }, {
- key: "_removePinClasses",
- value: function() {
- this.el.classList.remove("pin-top", "pinned", "pin-bottom")
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Pushpin
- }
- }, {
- key: "_updateElements",
- value: function() {
- for (var t in n._pushpins) {
- n._pushpins[t]._updatePosition()
- }
- }
- }, {
- key: "defaults",
- get: function() {
- return e
- }
- }]),
- n
- }();
- i._pushpins = [],
- M.Pushpin = i,
- M.jQueryLoaded && M.initializeJqueryWrapper(i, "pushpin", "M_Pushpin")
-}(cash),
-function(t, e) {
- "use strict";
- var i = {
- direction: "top",
- hoverEnabled: !0,
- toolbarEnabled: !1
- };
- t.fn.reverse = [].reverse;
- var n = function(n) {
- _inherits(s, Component);
- function s(e, i) {
- _classCallCheck(this, s);
- var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
- return n.el.M_FloatingActionButton = n,
- n.options = t.extend({}, s.defaults, i),
- n.isOpen = !1,
- n.$anchor = n.$el.children("a").first(),
- n.$menu = n.$el.children("ul").first(),
- n.$floatingBtns = n.$el.find("ul .btn-floating"),
- n.$floatingBtnsReverse = n.$el.find("ul .btn-floating").reverse(),
- n.offsetY = 0,
- n.offsetX = 0,
- "top" === n.options.direction ? (n.$el.addClass("direction-top"),
- n.offsetY = 40) : "right" === n.options.direction ? (n.$el.addClass("direction-right"),
- n.offsetX = -40) : "bottom" === n.options.direction ? (n.$el.addClass("direction-bottom"),
- n.offsetY = -40) : (n.$el.addClass("direction-left"),
- n.offsetX = 40),
- n._setupEventHandlers(),
- n
- }
- return _createClass(s, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this.el.M_FloatingActionButton = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleFABClickBound = this._handleFABClick.bind(this),
- this._handleOpenBound = this.open.bind(this),
- this._handleCloseBound = this.close.bind(this),
- this.options.hoverEnabled && !this.options.toolbarEnabled ? (this.el.addEventListener("mouseenter", this._handleOpenBound),
- this.el.addEventListener("mouseleave", this._handleCloseBound)) : this.el.addEventListener("click", this._handleFABClickBound)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.options.hoverEnabled && !this.options.toolbarEnabled ? (this.el.removeEventListener("mouseenter", this._handleOpenBound),
- this.el.removeEventListener("mouseleave", this._handleCloseBound)) : this.el.removeEventListener("click", this._handleFABClickBound)
- }
- }, {
- key: "_handleFABClick",
- value: function() {
- this.isOpen ? this.close() : this.open()
- }
- }, {
- key: "_handleDocumentClick",
- value: function(e) {
- t(e.target).closest(this.$menu).length || this.close()
- }
- }, {
- key: "open",
- value: function() {
- this.isOpen || (this.options.toolbarEnabled ? this._animateInToolbar() : this._animateInFAB(),
- this.isOpen = !0)
- }
- }, {
- key: "close",
- value: function() {
- this.isOpen && (this.options.toolbarEnabled ? (window.removeEventListener("scroll", this._handleCloseBound, !0),
- document.body.removeEventListener("click", this._handleDocumentClickBound, !0),
- this._animateOutToolbar()) : this._animateOutFAB(),
- this.isOpen = !1)
- }
- }, {
- key: "_animateInFAB",
- value: function() {
- var t = this;
- this.$el.addClass("active");
- var i = 0;
- this.$floatingBtnsReverse.each(function(n) {
- e({
- targets: n,
- opacity: 1,
- scale: [.4, 1],
- translateY: [t.offsetY, 0],
- translateX: [t.offsetX, 0],
- duration: 275,
- delay: i,
- easing: "easeInOutQuad"
- }),
- i += 40
- })
- }
- }, {
- key: "_animateOutFAB",
- value: function() {
- var t = this;
- this.$floatingBtnsReverse.each(function(i) {
- e.remove(i),
- e({
- targets: i,
- opacity: 0,
- scale: .4,
- translateY: t.offsetY,
- translateX: t.offsetX,
- duration: 175,
- easing: "easeOutQuad",
- complete: function() {
- t.$el.removeClass("active")
+ }, {
+ key: "open",
+ value: function () {
+ if (!this.isOpen) {
+ this.isOpen = !0,
+ "function" == typeof this.options.onOpenStart && this.options.onOpenStart.call(this, this.el),
+ this._resetDropdownStyles(),
+ this.dropdownEl.style.display = "block";
+ var t = this.options.constrainWidth ? this.el.getBoundingClientRect().width : this.dropdownEl.getBoundingClientRect().width;
+ this.dropdownEl.style.width = t + "px";
+ var e = this._getDropdownPosition();
+ this._animateIn(e),
+ this._setupTemporaryEventHandlers()
+ }
}
- })
- })
- }
- }, {
- key: "_animateInToolbar",
- value: function() {
- var e = this
- , i = void 0
- , n = window.innerWidth
- , s = window.innerHeight
- , o = this.el.getBoundingClientRect()
- , a = t('
')
- , r = this.$anchor.css("background-color");
- this.$anchor.append(a),
- this.offsetX = o.left - n / 2 + o.width / 2,
- this.offsetY = s - o.bottom,
- i = n / a[0].clientWidth,
- this.btnBottom = o.bottom,
- this.btnLeft = o.left,
- this.btnWidth = o.width,
- this.$el.addClass("active"),
- this.$el.css({
- "text-align": "center",
- width: "100%",
- bottom: 0,
- left: 0,
- transform: "translateX(" + this.offsetX + "px)",
- transition: "none"
- }),
- this.$anchor.css({
- transform: "translateY(" + -this.offsetY + "px)",
- transition: "none"
- }),
- a.css({
- "background-color": r
- }),
- setTimeout(function() {
- e.$el.css({
- transform: "",
- transition: "transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"
- }),
- e.$anchor.css({
- overflow: "visible",
- transform: "",
- transition: "transform .2s"
- }),
- setTimeout(function() {
- e.$el.css({
- overflow: "hidden",
- "background-color": r
- }),
- a.css({
- transform: "scale(" + i + ")",
- transition: "transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"
- }),
- e.$menu.children("li").children("a").css({
- opacity: 1
- }),
- e._handleDocumentClickBound = e._handleDocumentClick.bind(e),
- window.addEventListener("scroll", e._handleCloseBound, !0),
- document.body.addEventListener("click", e._handleDocumentClickBound, !0)
- }, 100)
- }, 0)
- }
- }, {
- key: "_animateOutToolbar",
- value: function() {
- var t = this
- , e = window.innerWidth
- , i = window.innerHeight
- , n = this.$el.find(".fab-backdrop")
- , s = anchor.css("background-color");
- this.offsetX = this.btnLeft - e / 2 + this.btnWidth / 2,
- this.offsetY = i - this.btnBottom,
- this.$el.removeClass("active"),
- this.$el.css({
- "background-color": "transparent",
- transition: "none"
- }),
- this.$anchor.css({
- transition: "none"
- }),
- n.css({
- transform: "scale(0)",
- "background-color": s
- }),
- this.$menu.children("li").children("a").css({
- opacity: ""
- }),
- setTimeout(function() {
- n.remove(),
- t.$el.css({
- "text-align": "",
- width: "",
- bottom: "",
- left: "",
- overflow: "",
- "background-color": "",
- transform: "translate3d(" + -t.offsetX + "px,0,0)"
- }),
- t.$anchor.css({
- overflow: "",
- transform: "translate3d(0," + t.offsetY + "px,0)"
- }),
- setTimeout(function() {
- t.$el.css({
- transform: "translate3d(0,0,0)",
- transition: "transform .2s"
- }),
- t.$anchor.css({
- transform: "translate3d(0,0,0)",
- transition: "transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"
- })
- }, 20)
- }, 200)
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_FloatingActionButton
- }
- }, {
- key: "defaults",
- get: function() {
- return i
- }
- }]),
- s
- }();
- M.FloatingActionButton = n,
- M.jQueryLoaded && M.initializeJqueryWrapper(n, "floatingActionButton", "M_FloatingActionButton")
-}(cash, M.anime),
-function(t) {
- "use strict";
- var e = {
- format: "mmm dd, yyyy",
- parse: null,
- defaultDate: null,
- setDefaultDate: !1,
- disableWeekends: !1,
- disableDayFn: null,
- firstDay: 0,
- minDate: null,
- maxDate: null,
- yearRange: 10,
- minYear: 0,
- maxYear: 9999,
- minMonth: void 0,
- maxMonth: void 0,
- startRange: null,
- endRange: null,
- isRTL: !1,
- showMonthAfterYear: !1,
- showDaysInNextAndPreviousMonths: !1,
- container: null,
- i18n: {
- clear: "Clear",
- today: "Today",
- done: "Ok",
- previousMonth: "?",
- nextMonth: "?",
- months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
- monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
- weekdaysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
- weekdays: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
- weekdaysAbbrev: ["S", "M", "T", "W", "T", "F", "S"]
- },
- events: [],
- onSelect: null,
- onOpen: null,
- onClose: null,
- onDraw: null
- }
- , i = function(i) {
- _inherits(n, Component);
- function n(e, i) {
- _classCallCheck(this, n);
- var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
- s.el.M_Datepicker = s,
- s.options = t.extend({}, n.defaults, i),
- s.options.minDate && s.options.minDate.setHours(0, 0, 0, 0),
- s.options.maxDate && s.options.maxDate.setHours(0, 0, 0, 0),
- s.id = M.guid(),
- s._setupVariables(),
- s._insertHTMLIntoDOM(),
- s._setupModal(),
- s._setupEventHandlers(),
- s.options.defaultDate || (s.options.defaultDate = new Date(Date.parse(s.el.value)),
- s.options.setDefaultDate = !0);
- var o = s.options.defaultDate;
- return n._isDate(o) ? s.options.setDefaultDate ? s.setDate(o, !0) : s.gotoDate(o) : s.gotoDate(new Date),
- s.isOpen = !1,
- s
- }
- return _createClass(n, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this.modal.destroy(),
- t(this.modalEl).remove(),
- this.el.M_Datepicker = void 0
- }
- }, {
- key: "_insertHTMLIntoDOM",
- value: function() {
- this.clearBtn.innerHTML = this.options.i18n.clear,
- this.todayBtn.innerHTML = this.options.i18n.today,
- this.doneBtn.innerHTML = this.options.i18n.done;
- var t = document.querySelector(this.options.container);
- this.options.container && t ? this.$modalEl.appendTo(t) : this.$modalEl.insertBefore(this.el)
- }
- }, {
- key: "_setupModal",
- value: function() {
- var t = this;
- this.modalEl.id = "modal-" + this.id,
- this.modal = M.Modal.init(this.modalEl, {
- onCloseEnd: function() {
- t.isOpen = !1
- }
- })
- }
- }, {
- key: "toString",
- value: function(t) {
- var e = this;
- if (t = t || this.options.format,
- !n._isDate(this.date))
- return "";
- return t.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(function(t) {
- return e.formats[t] ? e.formats[t]() : t
- }).join("")
- }
- }, {
- key: "setDate",
- value: function(t, e) {
- if (!t)
- return this.date = null,
- this._renderDateDisplay(),
- this.draw();
- if ("string" == typeof t && (t = new Date(Date.parse(t))),
- n._isDate(t)) {
- var i = this.options.minDate
- , s = this.options.maxDate;
- n._isDate(i) && t < i ? t = i : n._isDate(s) && t > s && (t = s),
- this.date = new Date(t.getTime()),
- this._renderDateDisplay(),
- n._setToStartOfDay(this.date),
- this.gotoDate(this.date),
- e || "function" != typeof this.options.onSelect || this.options.onSelect.call(this, this.date)
- }
- }
- }, {
- key: "setInputValue",
- value: function() {
- this.el.value = this.toString(),
- this.$el.trigger("change", {
- firedBy: this
- })
- }
- }, {
- key: "_renderDateDisplay",
- value: function() {
- var t = n._isDate(this.date) ? this.date : new Date
- , e = this.options.i18n
- , i = e.weekdaysShort[t.getDay()]
- , s = e.monthsShort[t.getMonth()]
- , o = t.getDate();
- this.yearTextEl.innerHTML = t.getFullYear(),
- this.dateTextEl.innerHTML = i + ", " + s + " " + o
- }
- }, {
- key: "gotoDate",
- value: function(t) {
- var e = !0;
- if (n._isDate(t)) {
- if (this.calendars) {
- var i = new Date(this.calendars[0].year,this.calendars[0].month,1)
- , s = new Date(this.calendars[this.calendars.length - 1].year,this.calendars[this.calendars.length - 1].month,1)
- , o = t.getTime();
- s.setMonth(s.getMonth() + 1),
- s.setDate(s.getDate() - 1),
- e = o < i.getTime() || s.getTime() < o
- }
- e && (this.calendars = [{
- month: t.getMonth(),
- year: t.getFullYear()
- }]),
- this.adjustCalendars()
- }
- }
- }, {
- key: "adjustCalendars",
- value: function() {
- this.calendars[0] = this.adjustCalendar(this.calendars[0]),
- this.draw()
- }
- }, {
- key: "adjustCalendar",
- value: function(t) {
- return t.month < 0 && (t.year -= Math.ceil(Math.abs(t.month) / 12),
- t.month += 12),
- t.month > 11 && (t.year += Math.floor(Math.abs(t.month) / 12),
- t.month -= 12),
- t
- }
- }, {
- key: "nextMonth",
- value: function() {
- this.calendars[0].month++,
- this.adjustCalendars()
- }
- }, {
- key: "prevMonth",
- value: function() {
- this.calendars[0].month--,
- this.adjustCalendars()
- }
- }, {
- key: "render",
- value: function(t, e, i) {
- var s = this.options
- , o = new Date
- , a = n._getDaysInMonth(t, e)
- , r = new Date(t,e,1).getDay()
- , l = []
- , h = [];
- n._setToStartOfDay(o),
- s.firstDay > 0 && (r -= s.firstDay) < 0 && (r += 7);
- for (var d = 0 === e ? 11 : e - 1, u = 11 === e ? 0 : e + 1, c = 0 === e ? t - 1 : t, p = 11 === e ? t + 1 : t, v = n._getDaysInMonth(c, d), f = a + r, m = f; m > 7; )
- m -= 7;
- f += 7 - m;
- for (var g = !1, _ = 0, y = 0; _ < f; _++) {
- var k = new Date(t,e,_ - r + 1)
- , b = !!n._isDate(this.date) && n._compareDates(k, this.date)
- , w = n._compareDates(k, o)
- , C = -1 !== s.events.indexOf(k.toDateString())
- , E = _ < r || _ >= a + r
- , M = _ - r + 1
- , x = e
- , L = t
- , T = s.startRange && n._compareDates(s.startRange, k)
- , O = s.endRange && n._compareDates(s.endRange, k)
- , $ = s.startRange && s.endRange && s.startRange < k && k < s.endRange
- , D = s.minDate && k < s.minDate || s.maxDate && k > s.maxDate || s.disableWeekends && n._isWeekend(k) || s.disableDayFn && s.disableDayFn(k);
- E && (_ < r ? (M = v + M,
- x = d,
- L = c) : (M -= a,
- x = u,
- L = p));
- var B = {
- day: M,
- month: x,
- year: L,
- hasEvent: C,
- isSelected: b,
- isToday: w,
- isDisabled: D,
- isEmpty: E,
- isStartRange: T,
- isEndRange: O,
- isInRange: $,
- showDaysInNextAndPreviousMonths: s.showDaysInNextAndPreviousMonths
- };
- h.push(this.renderDay(B)),
- 7 == ++y && (l.push(this.renderRow(h, s.isRTL, g)),
- h = [],
- y = 0,
- g = !1)
+ }, {
+ key: "close",
+ value: function () {
+ this.isOpen && (this.isOpen = !1,
+ this.focusedIndex = -1,
+ "function" == typeof this.options.onCloseStart && this.options.onCloseStart.call(this, this.el),
+ this._animateOut(),
+ this._removeTemporaryEventHandlers(),
+ this.el.focus())
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Dropdown
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ s
+ }();
+ n._dropdowns = [],
+ window.M.Dropdown = n,
+ M.jQueryLoaded && M.initializeJqueryWrapper(n, "dropdown", "M_Dropdown")
+ }(cash, M.anime),
+ function (t, e) {
+ "use strict";
+ var i = {
+ opacity: .5,
+ inDuration: 250,
+ outDuration: 250,
+ onOpenStart: null,
+ onOpenEnd: null,
+ onCloseStart: null,
+ onCloseEnd: null,
+ dismissible: !0,
+ startingTop: "4%",
+ endingTop: "10%"
+ },
+ n = function (n) {
+ _inherits(s, Component);
+
+ function s(e, i) {
+ _classCallCheck(this, s);
+ var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
+ return n.el.M_Modal = n,
+ n.options = t.extend({}, s.defaults, i),
+ n.isOpen = !1,
+ n.id = n.$el.attr("id"),
+ n._openingTrigger = void 0,
+ n.$overlay = t('
'),
+ s._increment++,
+ s._count++,
+ n.$overlay[0].style.zIndex = 1e3 + 2 * s._increment,
+ n.el.style.zIndex = 1e3 + 2 * s._increment + 1,
+ n._setupEventHandlers(),
+ n
}
- return this.renderTable(s, l, i)
- }
- }, {
- key: "renderDay",
- value: function(t) {
- var e = []
- , i = "false";
- if (t.isEmpty) {
- if (!t.showDaysInNextAndPreviousMonths)
- return '
';
- e.push("is-outside-current-month"),
- e.push("is-selection-disabled")
+ return _createClass(s, [{
+ key: "destroy",
+ value: function () {
+ s._count--,
+ this._removeEventHandlers(),
+ this.el.removeAttribute("style"),
+ this.$overlay.remove(),
+ this.el.M_Modal = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleOverlayClickBound = this._handleOverlayClick.bind(this),
+ this._handleModalCloseClickBound = this._handleModalCloseClick.bind(this),
+ 1 === s._count && document.body.addEventListener("click", this._handleTriggerClick),
+ this.$overlay[0].addEventListener("click", this._handleOverlayClickBound),
+ this.el.addEventListener("click", this._handleModalCloseClickBound)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ 0 === s._count && document.body.removeEventListener("click", this._handleTriggerClick),
+ this.$overlay[0].removeEventListener("click", this._handleOverlayClickBound),
+ this.el.removeEventListener("click", this._handleModalCloseClickBound)
+ }
+ }, {
+ key: "_handleTriggerClick",
+ value: function (e) {
+ var i = t(e.target).closest(".modal-trigger");
+ if (i.length) {
+ var n = M.getIdFromTrigger(i[0]),
+ s = document.getElementById(n).M_Modal;
+ s && s.open(i),
+ e.preventDefault()
+ }
+ }
+ }, {
+ key: "_handleOverlayClick",
+ value: function () {
+ this.options.dismissible && this.close()
+ }
+ }, {
+ key: "_handleModalCloseClick",
+ value: function (e) {
+ t(e.target).closest(".modal-close").length && this.close()
+ }
+ }, {
+ key: "_handleKeydown",
+ value: function (t) {
+ 27 === t.keyCode && this.options.dismissible && this.close()
+ }
+ }, {
+ key: "_animateIn",
+ value: function () {
+ var i = this;
+ t.extend(this.el.style, {
+ display: "block",
+ opacity: 0
+ }),
+ t.extend(this.$overlay[0].style, {
+ display: "block",
+ opacity: 0
+ }),
+ e({
+ targets: this.$overlay[0],
+ opacity: this.options.opacity,
+ duration: this.options.inDuration,
+ easing: "easeOutQuad"
+ });
+ var n = {
+ targets: this.el,
+ duration: this.options.inDuration,
+ easing: "easeOutCubic",
+ complete: function () {
+ "function" == typeof i.options.onOpenEnd && i.options.onOpenEnd.call(i, i.el, i._openingTrigger)
+ }
+ };
+ this.el.classList.contains("bottom-sheet") ? (t.extend(n, {
+ bottom: 0,
+ opacity: 1
+ }),
+ e(n)) : (t.extend(n, {
+ top: [this.options.startingTop, this.options.endingTop],
+ opacity: 1,
+ scaleX: [.8, 1],
+ scaleY: [.8, 1]
+ }),
+ e(n))
+ }
+ }, {
+ key: "_animateOut",
+ value: function () {
+ var i = this;
+ e({
+ targets: this.$overlay[0],
+ opacity: 0,
+ duration: this.options.outDuration,
+ easing: "easeOutQuart"
+ });
+ var n = {
+ targets: this.el,
+ duration: this.options.outDuration,
+ easing: "easeOutCubic",
+ complete: function () {
+ i.el.style.display = "none",
+ i.$overlay.remove(),
+ "function" == typeof i.options.onCloseEnd && i.options.onCloseEnd.call(i, i.el)
+ }
+ };
+ this.el.classList.contains("bottom-sheet") ? (t.extend(n, {
+ bottom: "-100%",
+ opacity: 0
+ }),
+ e(n)) : (t.extend(n, {
+ top: [this.options.endingTop, this.options.startingTop],
+ opacity: 0,
+ scaleX: .8,
+ scaleY: .8
+ }),
+ e(n))
+ }
+ }, {
+ key: "open",
+ value: function (t) {
+ if (!this.isOpen) {
+ this.isOpen = !0,
+ "function" == typeof this.options.onOpenStart && this.options.onOpenStart.call(this, this.el, this._openingTrigger);
+ return document.body.style.overflow = "hidden",
+ this.el.classList.add("open"),
+ this.el.insertAdjacentElement("afterend", this.$overlay[0]),
+ this._openingTrigger = t ? t[0] : void 0,
+ this.options.dismissible && (this._handleKeydownBound = this._handleKeydown.bind(this),
+ document.addEventListener("keydown", this._handleKeydownBound)),
+ e.remove(this.el),
+ e.remove(this.$overlay[0]),
+ this._animateIn(),
+ this
+ }
+ }
+ }, {
+ key: "close",
+ value: function () {
+ if (this.isOpen)
+ return this.isOpen = !1,
+ "function" == typeof this.options.onCloseStart && this.options.onCloseStart.call(this, this.el),
+ this.el.classList.remove("open"),
+ document.body.style.overflow = "",
+ this.options.dismissible && document.removeEventListener("keydown", this._handleKeydownBound),
+ e.remove(this.el),
+ e.remove(this.$overlay[0]),
+ this._animateOut(),
+ this
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Modal
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ s
+ }();
+ n._increment = 0,
+ n._count = 0,
+ M.Modal = n,
+ M.jQueryLoaded && M.initializeJqueryWrapper(n, "modal", "M_Modal")
+ }(cash, M.anime),
+ function (t, e) {
+ "use strict";
+ var i = {
+ inDuration: 275,
+ outDuration: 200,
+ onOpenStart: null,
+ onOpenEnd: null,
+ onCloseStart: null,
+ onCloseEnd: null
+ },
+ n = function (n) {
+ _inherits(s, Component);
+
+ function s(e, i) {
+ _classCallCheck(this, s);
+ var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
+ return n.el.M_Materialbox = n,
+ n.options = t.extend({}, s.defaults, i),
+ n.overlayActive = !1,
+ n.doneAnimating = !0,
+ n.placeholder = t("
").addClass("material-placeholder"),
+ n.originalWidth = 0,
+ n.originalHeight = 0,
+ n.originInlineStyles = n.$el.attr("style"),
+ n.caption = n.el.getAttribute("data-caption") || "",
+ n.$el.before(n.placeholder),
+ n.placeholder.append(n.$el),
+ n._setupEventHandlers(),
+ n
}
- return t.isDisabled && e.push("is-disabled"),
- t.isToday && e.push("is-today"),
- t.isSelected && (e.push("is-selected"),
- i = "true"),
- t.hasEvent && e.push("has-event"),
- t.isInRange && e.push("is-inrange"),
- t.isStartRange && e.push("is-startrange"),
- t.isEndRange && e.push("is-endrange"),
- '
' + t.day + " "
- }
- }, {
- key: "renderRow",
- value: function(t, e, i) {
- return '
' + (e ? t.reverse() : t).join("") + " "
- }
- }, {
- key: "renderTable",
- value: function(t, e, i) {
- return '
' + this.renderHead(t) + this.renderBody(e) + "
"
- }
- }, {
- key: "renderHead",
- value: function(t) {
- var e = void 0
- , i = [];
- for (e = 0; e < 7; e++)
- i.push('
' + this.renderDayName(t, e, !0) + " ");
- return "
" + (t.isRTL ? i.reverse() : i).join("") + " "
- }
- }, {
- key: "renderBody",
- value: function(t) {
- return "
" + t.join("") + " "
- }
- }, {
- key: "renderTitle",
- value: function(e, i, n, s, o, a) {
- var r = void 0
- , l = void 0
- , h = void 0
- , d = this.options
- , u = n === d.minYear
- , c = n === d.maxYear
- , p = '
'
- , v = void 0
- , f = void 0
- , m = !0
- , g = !0;
- for (h = [],
- r = 0; r < 12; r++)
- h.push('
d.maxMonth ? 'disabled="disabled"' : "") + ">" + d.i18n.months[r] + " ");
- for (v = '
' + h.join("") + " ",
- t.isArray(d.yearRange) ? (r = d.yearRange[0],
- l = d.yearRange[1] + 1) : (r = n - d.yearRange,
- l = 1 + n + d.yearRange),
- h = []; r < l && r <= d.maxYear; r++)
- r >= d.minYear && h.push('
" + r + " ");
- f = '
' + h.join("") + " ";
- p += '
',
- p += '
',
- d.showMonthAfterYear ? p += f + v : p += v + f,
- p += "
",
- u && (0 === s || d.minMonth >= s) && (m = !1),
- c && (11 === s || d.maxMonth <= s) && (g = !1);
- return (p += '
') + "
"
- }
- }, {
- key: "draw",
- value: function(t) {
- if (this.isOpen || t) {
- var e = this.options
- , i = e.minYear
- , n = e.maxYear
- , s = e.minMonth
- , o = e.maxMonth
- , a = ""
- , r = void 0;
- this._y <= i && (this._y = i,
- !isNaN(s) && this._m < s && (this._m = s)),
- this._y >= n && (this._y = n,
- !isNaN(o) && this._m > o && (this._m = o)),
- r = "pika-title-" + Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 2);
- for (var l = 0; l < 1; l++)
- this._renderDateDisplay(),
- a += this.renderTitle(this, l, this.calendars[l].year, this.calendars[l].month, this.calendars[0].year, r) + this.render(this.calendars[l].year, this.calendars[l].month, r);
- this.calendarEl.innerHTML = a;
- var h = this.calendarEl.querySelector(".pika-select-year")
- , d = this.calendarEl.querySelector(".pika-select-month");
- M.Select.init(h, {
- classes: "select-year"
- }),
- M.Select.init(d, {
- classes: "select-month"
- }),
- h.addEventListener("change", this._handleYearChange.bind(this)),
- d.addEventListener("change", this._handleMonthChange.bind(this)),
- "function" == typeof this.options.onDraw && this.options.onDraw(this)
+ return _createClass(s, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this.el.M_Materialbox = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleMaterialboxClickBound = this._handleMaterialboxClick.bind(this),
+ this.el.addEventListener("click", this._handleMaterialboxClickBound)
+ }
+ }, {
+ key: "removeEventHandlers",
+ value: function () {
+ this.el.removeEventListener("click", this._handleMaterialboxClickBound)
+ }
+ }, {
+ key: "_handleMaterialboxClick",
+ value: function (t) {
+ !1 === this.doneAnimating || this.overlayActive && this.doneAnimating ? this.close() : this.open()
+ }
+ }, {
+ key: "_handleWindowScroll",
+ value: function () {
+ this.overlayActive && this.close()
+ }
+ }, {
+ key: "_handleWindowResize",
+ value: function () {
+ this.overlayActive && this.close()
+ }
+ }, {
+ key: "_handleWindowEscape",
+ value: function (t) {
+ 27 === t.keyCode && this.doneAnimating && this.overlayActive && this.close()
+ }
+ }, {
+ key: "_makeAncestorsOverflowVisible",
+ value: function () {
+ this.ancestorsChanged = t();
+ for (var e = this.placeholder[0].parentNode; null !== e && !t(e).is(document);) {
+ var i = t(e);
+ "visible" !== i.css("overflow") && (i.css("overflow", "visible"),
+ void 0 === this.ancestorsChanged ? this.ancestorsChanged = i : this.ancestorsChanged = this.ancestorsChanged.add(i)),
+ e = e.parentNode
+ }
+ }
+ }, {
+ key: "_animateImageIn",
+ value: function () {
+ var t = this,
+ i = {
+ targets: this.el,
+ height: this.newHeight,
+ width: this.newWidth,
+ left: M.getDocumentScrollLeft() + this.windowWidth / 2 - this.placeholder.offset().left - this.newWidth / 2,
+ top: M.getDocumentScrollTop() + this.windowHeight / 2 - this.placeholder.offset().top - this.newHeight / 2,
+ duration: this.options.inDuration,
+ easing: "easeOutQuad",
+ complete: function () {
+ t.doneAnimating = !0,
+ "function" == typeof t.options.onOpenEnd && t.options.onOpenEnd.call(t, t.el)
+ }
+ };
+ this.$el.hasClass("responsive-img") ? (i.maxWidth = this.newWidth,
+ i.width = [this.originalWidth, i.width]) : (i.left = [i.left, 0],
+ i.top = [i.top, 0]),
+ e(i)
+ }
+ }, {
+ key: "_animateImageOut",
+ value: function () {
+ var t = this,
+ i = {
+ targets: this.el,
+ width: this.originalWidth,
+ height: this.originalHeight,
+ left: 0,
+ top: 0,
+ duration: this.options.outDuration,
+ easing: "easeOutQuad",
+ complete: function () {
+ t.placeholder.css({
+ height: "",
+ width: "",
+ position: "",
+ top: "",
+ left: ""
+ }),
+ t.$el.removeAttr("style"),
+ t.$el.attr("style", t.originInlineStyles),
+ t.$el.removeClass("active"),
+ t.doneAnimating = !0,
+ t.ancestorsChanged.length && t.ancestorsChanged.css("overflow", ""),
+ "function" == typeof t.options.onCloseEnd && t.options.onCloseEnd.call(t, t.el)
+ }
+ };
+ e(i)
+ }
+ }, {
+ key: "_updateVars",
+ value: function () {
+ this.windowWidth = window.innerWidth,
+ this.windowHeight = window.innerHeight,
+ this.caption = this.el.getAttribute("data-caption") || ""
+ }
+ }, {
+ key: "open",
+ value: function () {
+ var i = this;
+ this._updateVars(),
+ this.originalWidth = this.el.getBoundingClientRect().width,
+ this.originalHeight = this.el.getBoundingClientRect().height,
+ this.doneAnimating = !1,
+ this.$el.addClass("active"),
+ this.overlayActive = !0,
+ "function" == typeof this.options.onOpenStart && this.options.onOpenStart.call(this, this.el),
+ this.placeholder.css({
+ width: this.placeholder[0].getBoundingClientRect().width + "px",
+ height: this.placeholder[0].getBoundingClientRect().height + "px",
+ position: "relative",
+ top: 0,
+ left: 0
+ }),
+ this._makeAncestorsOverflowVisible(),
+ this.$el.css({
+ position: "absolute",
+ "z-index": 1e3,
+ "will-change": "left, top, width, height"
+ }),
+ this.$overlay = t('
').css({
+ opacity: 0
+ }).one("click", function () {
+ i.doneAnimating && i.close()
+ }),
+ this.$el.before(this.$overlay);
+ var n = this.$overlay[0].getBoundingClientRect();
+ this.$overlay.css({
+ width: this.windowWidth + "px",
+ height: this.windowHeight + "px",
+ left: -1 * n.left + "px",
+ top: -1 * n.top + "px"
+ }),
+ e.remove(this.el),
+ e.remove(this.$overlay[0]),
+ "" !== this.caption && e.remove(this.$photoCaption[0]),
+ e({
+ targets: this.$overlay[0],
+ opacity: 1,
+ duration: this.options.inDuration,
+ easing: "easeOutQuad"
+ }),
+ "" !== this.caption && (this.$photoCaption = t('
'),
+ this.$photoCaption.text(this.caption),
+ t("body").append(this.$photoCaption),
+ this.$photoCaption.css({
+ display: "inline"
+ }),
+ e({
+ targets: this.$photoCaption[0],
+ opacity: 1,
+ duration: this.options.inDuration,
+ easing: "easeOutQuad"
+ }));
+ var s = 0,
+ o = this.originalWidth / this.windowWidth,
+ a = this.originalHeight / this.windowHeight;
+ this.newWidth = 0,
+ this.newHeight = 0,
+ o > a ? (s = this.originalHeight / this.originalWidth,
+ this.newWidth = .9 * this.windowWidth,
+ this.newHeight = .9 * this.windowWidth * s) : (s = this.originalWidth / this.originalHeight,
+ this.newWidth = .9 * this.windowHeight * s,
+ this.newHeight = .9 * this.windowHeight),
+ this._animateImageIn(),
+ this._handleWindowScrollBound = this._handleWindowScroll.bind(this),
+ this._handleWindowResizeBound = this._handleWindowResize.bind(this),
+ this._handleWindowEscapeBound = this._handleWindowEscape.bind(this),
+ window.addEventListener("scroll", this._handleWindowScrollBound),
+ window.addEventListener("resize", this._handleWindowResizeBound),
+ window.addEventListener("keyup", this._handleWindowEscapeBound)
+ }
+ }, {
+ key: "close",
+ value: function () {
+ var t = this;
+ this._updateVars(),
+ this.doneAnimating = !1,
+ "function" == typeof this.options.onCloseStart && this.options.onCloseStart.call(this, this.el),
+ e.remove(this.el),
+ e.remove(this.$overlay[0]),
+ "" !== this.caption && e.remove(this.$photoCaption[0]),
+ window.removeEventListener("scroll", this._handleWindowScrollBound),
+ window.removeEventListener("resize", this._handleWindowResizeBound),
+ window.removeEventListener("keyup", this._handleWindowEscapeBound),
+ e({
+ targets: this.$overlay[0],
+ opacity: 0,
+ duration: this.options.outDuration,
+ easing: "easeOutQuad",
+ complete: function () {
+ t.overlayActive = !1,
+ t.$overlay.remove()
+ }
+ }),
+ this._animateImageOut(),
+ "" !== this.caption && e({
+ targets: this.$photoCaption[0],
+ opacity: 0,
+ duration: this.options.outDuration,
+ easing: "easeOutQuad",
+ complete: function () {
+ t.$photoCaption.remove()
+ }
+ })
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Materialbox
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ s
+ }();
+ M.Materialbox = n,
+ M.jQueryLoaded && M.initializeJqueryWrapper(n, "materialbox", "M_Materialbox")
+ }(cash, M.anime),
+ function (t) {
+ "use strict";
+ var e = {
+ responsiveThreshold: 0
+ },
+ i = function (i) {
+ _inherits(n, Component);
+
+ function n(e, i) {
+ _classCallCheck(this, n);
+ var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
+ return s.el.M_Parallax = s,
+ s.options = t.extend({}, n.defaults, i),
+ s.$img = s.$el.find("img").first(),
+ s._enabled = window.innerWidth > s.options.responsiveThreshold,
+ s._updateParallax(),
+ s._setupEventHandlers(),
+ s._setupStyles(),
+ n._parallaxes.push(s),
+ s
}
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleInputKeydownBound = this._handleInputKeydown.bind(this),
- this._handleInputClickBound = this._handleInputClick.bind(this),
- this._handleInputChangeBound = this._handleInputChange.bind(this),
- this._handleCalendarClickBound = this._handleCalendarClick.bind(this),
- this._finishSelectionBound = this._finishSelection.bind(this),
- this._handleTodayClickBound = this._handleTodayClick.bind(this),
- this._handleClearClickBound = this._handleClearClick.bind(this),
- this._handleMonthChange = this._handleMonthChange.bind(this),
- this.el.addEventListener("click", this._handleInputClickBound),
- this.el.addEventListener("keydown", this._handleInputKeydownBound),
- this.el.addEventListener("change", this._handleInputChangeBound),
- this.calendarEl.addEventListener("click", this._handleCalendarClickBound),
- this.doneBtn.addEventListener("click", this._finishSelectionBound),
- this.todayBtn.addEventListener("click", this._handleTodayClickBound),
- this.clearBtn.addEventListener("click", this._handleClearClickBound)
- }
- }, {
- key: "_setupVariables",
- value: function() {
- var e = this;
- this.$modalEl = t(n._template),
- this.modalEl = this.$modalEl[0],
- this.calendarEl = this.modalEl.querySelector(".pika-single"),
- this.yearTextEl = this.modalEl.querySelector(".year-text"),
- this.dateTextEl = this.modalEl.querySelector(".date-text"),
- this.clearBtn = this.modalEl.querySelector(".datepicker-clear"),
- this.todayBtn = this.modalEl.querySelector(".datepicker-today"),
- this.doneBtn = this.modalEl.querySelector(".datepicker-done"),
- this.formats = {
- dd: function() {
- return e.date.getDate()
- },
- ddd: function() {
- return e.options.i18n.weekdaysShort[e.date.getDay()]
- },
- dddd: function() {
- return e.options.i18n.weekdays[e.date.getDay()]
- },
- mm: function() {
- return e.date.getMonth() + 1
- },
- mmm: function() {
- return e.options.i18n.monthsShort[e.date.getMonth()]
- },
- mmmm: function() {
- return e.options.i18n.monthsShort[e.date.getMonth()]
- },
- yy: function() {
- return e.date.getFullYear().slice(2)
- },
- yyyy: function() {
- return e.date.getFullYear()
- }
+ return _createClass(n, [{
+ key: "destroy",
+ value: function () {
+ n._parallaxes.splice(n._parallaxes.indexOf(this), 1),
+ this.$img[0].style.transform = "",
+ this._removeEventHandlers(),
+ this.$el[0].M_Parallax = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleImageLoadBound = this._handleImageLoad.bind(this),
+ this.$img[0].addEventListener("load", this._handleImageLoadBound),
+ 0 === n._parallaxes.length && (n._handleScrollThrottled = M.throttle(n._handleScroll, 5),
+ window.addEventListener("scroll", n._handleScrollThrottled),
+ n._handleWindowResizeThrottled = M.throttle(n._handleWindowResize, 5),
+ window.addEventListener("resize", n._handleWindowResizeThrottled))
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.$img[0].removeEventListener("load", this._handleImageLoadBound),
+ 0 === n._parallaxes.length && (window.removeEventListener("scroll", n._handleScrollThrottled),
+ window.removeEventListener("resize", n._handleWindowResizeThrottled))
+ }
+ }, {
+ key: "_setupStyles",
+ value: function () {
+ this.$img[0].style.opacity = 1
+ }
+ }, {
+ key: "_handleImageLoad",
+ value: function () {
+ this._updateParallax(),
+ this.$img.each(function () {
+ this.complete && t(this).trigger("load")
+ })
+ }
+ }, {
+ key: "_updateParallax",
+ value: function () {
+ var t = this.$el.height() > 0 ? this.el.parentNode.offsetHeight : 500,
+ e = this.$img[0].offsetHeight - t,
+ i = this.$el.offset().top + t,
+ n = this.$el.offset().top,
+ s = M.getDocumentScrollTop(),
+ o = window.innerHeight,
+ a = e * ((s + o - n) / (t + o));
+ this._enabled ? i > s && n < s + o && (this.$img[0].style.transform = "translate3D(-50%, " + a + "px, 0)") : this.$img[0].style.transform = ""
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Parallax
+ }
+ }, {
+ key: "_handleScroll",
+ value: function () {
+ for (var t = 0; t < n._parallaxes.length; t++) {
+ var e = n._parallaxes[t];
+ e._updateParallax.call(e)
+ }
+ }
+ }, {
+ key: "_handleWindowResize",
+ value: function () {
+ for (var t = 0; t < n._parallaxes.length; t++) {
+ var e = n._parallaxes[t];
+ e._enabled = window.innerWidth > e.options.responsiveThreshold
+ }
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return e
+ }
+ }]),
+ n
+ }();
+ i._parallaxes = [],
+ M.Parallax = i,
+ M.jQueryLoaded && M.initializeJqueryWrapper(i, "parallax", "M_Parallax")
+ }(cash),
+ function (t, e) {
+ "use strict";
+ var i = {
+ duration: 300,
+ onShow: null,
+ swipeable: !1,
+ responsiveThreshold: 1 / 0
+ },
+ n = function (n) {
+ _inherits(s, Component);
+
+ function s(e, i) {
+ _classCallCheck(this, s);
+ var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
+ return n.el.M_Tabs = n,
+ n.options = t.extend({}, s.defaults, i),
+ n.$tabLinks = n.$el.children("li.tab").children("a"),
+ n.index = 0,
+ n._setTabsAndTabWidth(),
+ n._setupActiveTabLink(),
+ n._createIndicator(),
+ n.options.swipeable ? n._setupSwipeableTabs() : n._setupNormalTabs(),
+ n._setupEventHandlers(),
+ n
}
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.el.removeEventListener("click", this._handleInputClickBound),
- this.el.removeEventListener("keydown", this._handleInputKeydownBound),
- this.el.removeEventListener("change", this._handleInputChangeBound),
- this.calendarEl.removeEventListener("click", this._handleCalendarClickBound)
- }
- }, {
- key: "_handleInputClick",
- value: function() {
- this.open()
- }
- }, {
- key: "_handleInputKeydown",
- value: function(t) {
- t.which === M.keys.ENTER && (t.preventDefault(),
- this.open())
- }
- }, {
- key: "_handleCalendarClick",
- value: function(e) {
- if (this.isOpen) {
- var i = t(e.target);
- i.hasClass("is-disabled") || (!i.hasClass("datepicker-day-button") || i.hasClass("is-empty") || i.parent().hasClass("is-disabled") ? i.closest(".month-prev").length ? this.prevMonth() : i.closest(".month-next").length && this.nextMonth() : this.setDate(new Date(e.target.getAttribute("data-pika-year"),e.target.getAttribute("data-pika-month"),e.target.getAttribute("data-pika-day"))))
+ return _createClass(s, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this._indicator.parentNode.removeChild(this._indicator),
+ this.options.swipeable ? this._teardownSwipeableTabs() : this._teardownNormalTabs(),
+ this.$el[0].M_Tabs = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleWindowResizeBound = this._handleWindowResize.bind(this),
+ window.addEventListener("resize", this._handleWindowResizeBound),
+ this._handleTabClickBound = this._handleTabClick.bind(this),
+ this.el.addEventListener("click", this._handleTabClickBound)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ window.removeEventListener("resize", this._handleWindowResizeBound),
+ this.el.removeEventListener("click", this._handleTabClickBound)
+ }
+ }, {
+ key: "_handleWindowResize",
+ value: function () {
+ this._setTabsAndTabWidth(),
+ 0 !== this.tabWidth && 0 !== this.tabsWidth && (this._indicator.style.left = this._calcLeftPos(this.$activeTabLink) + "px",
+ this._indicator.style.right = this._calcRightPos(this.$activeTabLink) + "px")
+ }
+ }, {
+ key: "_handleTabClick",
+ value: function (e) {
+ var i = this,
+ n = t(e.target).closest("li.tab"),
+ s = t(e.target).closest("a");
+ if (s.length && s.parent().hasClass("tab"))
+ if (n.hasClass("disabled"))
+ e.preventDefault();
+ else if (!s.attr("target")) {
+ this._setTabsAndTabWidth(),
+ this.$activeTabLink.removeClass("active");
+ var o = this.$content;
+ this.$activeTabLink = s,
+ this.$content = t(M.escapeHash(s[0].hash)),
+ this.$tabLinks = this.$el.children("li.tab").children("a"),
+ this.$activeTabLink.addClass("active");
+ var a = this.index;
+ this.index = Math.max(this.$tabLinks.index(s), 0),
+ this.options.swipeable ? this._tabsCarousel && this._tabsCarousel.set(this.index, function () {
+ "function" == typeof i.options.onShow && i.options.onShow.call(i, i.$content[0])
+ }) : this.$content.length && (this.$content[0].style.display = "block",
+ this.$content.addClass("active"),
+ "function" == typeof this.options.onShow && this.options.onShow.call(this, this.$content[0]),
+ o.length && !o.is(this.$content) && (o[0].style.display = "none",
+ o.removeClass("active"))),
+ this._animateIndicator(a),
+ e.preventDefault()
+ }
+ }
+ }, {
+ key: "_createIndicator",
+ value: function () {
+ var t = this,
+ e = document.createElement("li");
+ e.classList.add("indicator"),
+ this.el.appendChild(e),
+ this._indicator = e,
+ setTimeout(function () {
+ t._indicator.style.left = t._calcLeftPos(t.$activeTabLink) + "px",
+ t._indicator.style.right = t._calcRightPos(t.$activeTabLink) + "px"
+ }, 0)
+ }
+ }, {
+ key: "_setupActiveTabLink",
+ value: function () {
+ this.$activeTabLink = t(this.$tabLinks.filter('[href="' + location.hash + '"]')),
+ 0 === this.$activeTabLink.length && (this.$activeTabLink = this.$el.children("li.tab").children("a.active").first()),
+ 0 === this.$activeTabLink.length && (this.$activeTabLink = this.$el.children("li.tab").children("a").first()),
+ this.$tabLinks.removeClass("active"),
+ this.$activeTabLink[0].classList.add("active"),
+ this.index = Math.max(this.$tabLinks.index(this.$activeTabLink), 0),
+ this.$activeTabLink.length && (this.$content = t(M.escapeHash(this.$activeTabLink[0].hash)),
+ this.$content.addClass("active"))
+ }
+ }, {
+ key: "_setupSwipeableTabs",
+ value: function () {
+ var e = this;
+ window.innerWidth > this.options.responsiveThreshold && (this.options.swipeable = !1);
+ var i = t();
+ this.$tabLinks.each(function (e) {
+ var n = t(M.escapeHash(e.hash));
+ n.addClass("carousel-item"),
+ i = i.add(n)
+ });
+ var n = t('
');
+ i.first().before(n),
+ n.append(i),
+ i[0].style.display = "",
+ this._tabsCarousel = M.Carousel.init(n[0], {
+ fullWidth: !0,
+ noWrap: !0,
+ onCycleTo: function (i) {
+ var n = e.index;
+ e.index = t(i).index(),
+ e.$activeTabLink.removeClass("active"),
+ e.$activeTabLink = e.$tabLinks.eq(e.index),
+ e.$activeTabLink.addClass("active"),
+ e._animateIndicator(n),
+ "function" == typeof e.options.onShow && e.options.onShow.call(e, e.$content[0])
+ }
+ })
+ }
+ }, {
+ key: "_teardownSwipeableTabs",
+ value: function () {
+ var t = this._tabsCarousel.$el;
+ this._tabsCarousel.destroy(),
+ t.after(t.children()),
+ t.remove()
+ }
+ }, {
+ key: "_setupNormalTabs",
+ value: function () {
+ this.$tabLinks.not(this.$activeTabLink).each(function (e) {
+ if (e.hash) {
+ var i = t(M.escapeHash(e.hash));
+ i.length && (i[0].style.display = "none")
+ }
+ })
+ }
+ }, {
+ key: "_teardownNormalTabs",
+ value: function () {
+ this.$tabLinks.each(function (e) {
+ if (e.hash) {
+ var i = t(M.escapeHash(e.hash));
+ i.length && (i[0].style.display = "")
+ }
+ })
+ }
+ }, {
+ key: "_setTabsAndTabWidth",
+ value: function () {
+ this.tabsWidth = this.$el.width(),
+ this.tabWidth = Math.max(this.tabsWidth, this.el.scrollWidth) / this.$tabLinks.length
+ }
+ }, {
+ key: "_calcRightPos",
+ value: function (t) {
+ return Math.ceil(this.tabsWidth - t.position().left - t[0].getBoundingClientRect().width)
+ }
+ }, {
+ key: "_calcLeftPos",
+ value: function (t) {
+ return Math.floor(t.position().left)
+ }
+ }, {
+ key: "updateTabIndicator",
+ value: function () {
+ this._animateIndicator(this.index)
+ }
+ }, {
+ key: "_animateIndicator",
+ value: function (t) {
+ var i = 0,
+ n = 0;
+ this.index - t >= 0 ? i = 90 : n = 90;
+ var s = {
+ targets: this._indicator,
+ left: {
+ value: this._calcLeftPos(this.$activeTabLink),
+ delay: i
+ },
+ right: {
+ value: this._calcRightPos(this.$activeTabLink),
+ delay: n
+ },
+ duration: this.options.duration,
+ easing: "easeOutQuad"
+ };
+ e.remove(this._indicator),
+ e(s)
+ }
+ }, {
+ key: "select",
+ value: function (t) {
+ var e = this.$tabLinks.filter('[href="#' + t + '"]');
+ e.length && e.trigger("click")
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Tabs
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ s
+ }();
+ window.M.Tabs = n,
+ M.jQueryLoaded && M.initializeJqueryWrapper(n, "tabs", "M_Tabs")
+ }(cash, M.anime),
+ function (t, e) {
+ "use strict";
+ var i = {
+ exitDelay: 200,
+ enterDelay: 0,
+ html: null,
+ margin: 5,
+ inDuration: 250,
+ outDuration: 200,
+ position: "bottom",
+ transitionMovement: 10
+ },
+ n = function (n) {
+ _inherits(s, Component);
+
+ function s(e, i) {
+ _classCallCheck(this, s);
+ var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
+ return n.el.M_Tooltip = n,
+ n.options = t.extend({}, s.defaults, i),
+ n.isOpen = !1,
+ n.isHovered = !1,
+ n._appendTooltipEl(),
+ n._setupEventHandlers(),
+ n
}
- }
- }, {
- key: "_handleTodayClick",
- value: function() {
- this.date = new Date,
- this.setInputValue(),
- this.close()
- }
- }, {
- key: "_handleClearClick",
- value: function() {
- this.date = null,
- this.setInputValue(),
- this.close()
- }
- }, {
- key: "_handleMonthChange",
- value: function(t) {
- this.gotoMonth(t.target.value)
- }
- }, {
- key: "_handleYearChange",
- value: function(t) {
- this.gotoYear(t.target.value)
- }
- }, {
- key: "gotoMonth",
- value: function(t) {
- isNaN(t) || (this.calendars[0].month = parseInt(t, 10),
- this.adjustCalendars())
- }
- }, {
- key: "gotoYear",
- value: function(t) {
- isNaN(t) || (this.calendars[0].year = parseInt(t, 10),
- this.adjustCalendars())
- }
- }, {
- key: "_handleInputChange",
- value: function(t) {
- var e = void 0;
- t.firedBy !== this && (e = this.options.parse ? this.options.parse(this.el.value, this.options.format) : new Date(Date.parse(this.el.value)),
- n._isDate(e) && this.setDate(e))
- }
- }, {
- key: "renderDayName",
- value: function(t, e, i) {
- for (e += t.firstDay; e >= 7; )
- e -= 7;
- return i ? t.i18n.weekdaysAbbrev[e] : t.i18n.weekdays[e]
- }
- }, {
- key: "_finishSelection",
- value: function() {
- this.setInputValue(),
- this.close()
- }
- }, {
- key: "open",
- value: function() {
- if (!this.isOpen)
- return this.isOpen = !0,
- "function" == typeof this.options.onOpen && this.options.onOpen.call(this),
- this.draw(),
- this.modal.open(),
- this
- }
- }, {
- key: "close",
- value: function() {
- if (this.isOpen)
- return this.isOpen = !1,
- "function" == typeof this.options.onClose && this.options.onClose.call(this),
- this.modal.close(),
- this
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
- }
- }, {
- key: "_isDate",
- value: function(t) {
- return /Date/.test(Object.prototype.toString.call(t)) && !isNaN(t.getTime())
- }
- }, {
- key: "_isWeekend",
- value: function(t) {
- var e = t.getDay();
- return 0 === e || 6 === e
- }
- }, {
- key: "_setToStartOfDay",
- value: function(t) {
- n._isDate(t) && t.setHours(0, 0, 0, 0)
- }
- }, {
- key: "_getDaysInMonth",
- value: function(t, e) {
- return [31, n._isLeapYear(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][e]
- }
- }, {
- key: "_isLeapYear",
- value: function(t) {
- return t % 4 == 0 && t % 100 != 0 || t % 400 == 0
- }
- }, {
- key: "_compareDates",
- value: function(t, e) {
- return t.getTime() === e.getTime()
- }
- }, {
- key: "_setToStartOfDay",
- value: function(t) {
- n._isDate(t) && t.setHours(0, 0, 0, 0)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Datepicker
- }
- }, {
- key: "defaults",
- get: function() {
- return e
- }
- }]),
- n
- }();
- i._template = ['
"].join(""),
- M.Datepicker = i,
- M.jQueryLoaded && M.initializeJqueryWrapper(i, "datepicker", "M_Datepicker")
-}(cash),
-function(t) {
- "use strict";
- var e = {
- dialRadius: 135,
- outerRadius: 105,
- innerRadius: 70,
- tickRadius: 20,
- duration: 350,
- container: null,
- defaultTime: "now",
- fromnow: 0,
- doneText: "Ok",
- clearText: "Clear",
- cancelText: "Cancel",
- autoClose: !1,
- twelveHour: !0,
- vibrate: !0
- }
- , i = function(i) {
- _inherits(n, Component);
- function n(e, i) {
- _classCallCheck(this, n);
- var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
- return s.el.M_Timepicker = s,
- s.options = t.extend({}, n.defaults, i),
- s.id = M.guid(),
- s._insertHTMLIntoDOM(),
- s._setupModal(),
- s._setupVariables(),
- s._setupEventHandlers(),
- s._clockSetup(),
- s._pickerSetup(),
- s
+ return _createClass(s, [{
+ key: "destroy",
+ value: function () {
+ t(this.tooltipEl).remove(),
+ this._removeEventHandlers(),
+ this.$el[0].M_Tooltip = void 0
+ }
+ }, {
+ key: "_appendTooltipEl",
+ value: function () {
+ var t = document.createElement("div");
+ t.classList.add("material-tooltip"),
+ this.tooltipEl = t;
+ var e = document.createElement("div");
+ e.classList.add("tooltip-content"),
+ e.innerHTML = this.options.html,
+ t.appendChild(e),
+ document.body.appendChild(t)
+ }
+ }, {
+ key: "_updateTooltipContent",
+ value: function () {
+ this.tooltipEl.querySelector(".tooltip-content").innerHTML = this.options.html
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this.handleMouseEnterBound = this._handleMouseEnter.bind(this),
+ this.handleMouseLeaveBound = this._handleMouseLeave.bind(this),
+ this.$el[0].addEventListener("mouseenter", this.handleMouseEnterBound),
+ this.$el[0].addEventListener("mouseleave", this.handleMouseLeaveBound)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.$el[0].removeEventListener("mouseenter", this.handleMouseEnterBound),
+ this.$el[0].removeEventListener("mouseleave", this.handleMouseLeaveBound)
+ }
+ }, {
+ key: "open",
+ value: function () {
+ this.isOpen || (this.isOpen = !0,
+ this.options = t.extend({}, this.options, this._getAttributeOptions()),
+ this._updateTooltipContent(),
+ this._setEnterDelayTimeout())
+ }
+ }, {
+ key: "close",
+ value: function () {
+ this.isOpen && (this.isOpen = !1,
+ this._setExitDelayTimeout())
+ }
+ }, {
+ key: "_setExitDelayTimeout",
+ value: function () {
+ var t = this;
+ clearTimeout(this._exitDelayTimeout),
+ this._exitDelayTimeout = setTimeout(function () {
+ t.isHovered || t._animateOut()
+ }, this.options.exitDelay)
+ }
+ }, {
+ key: "_setEnterDelayTimeout",
+ value: function () {
+ var t = this;
+ clearTimeout(this._enterDelayTimeout),
+ this._enterDelayTimeout = setTimeout(function () {
+ t.isHovered && t._animateIn()
+ }, this.options.enterDelay)
+ }
+ }, {
+ key: "_positionTooltip",
+ value: function () {
+ var e = this.$el[0],
+ i = this.tooltipEl,
+ n = e.offsetHeight,
+ s = e.offsetWidth,
+ o = i.offsetHeight,
+ a = i.offsetWidth,
+ r = void 0,
+ l = this.options.margin,
+ h = void 0,
+ d = void 0;
+ this.xMovement = 0,
+ this.yMovement = 0,
+ h = e.getBoundingClientRect().top + M.getDocumentScrollTop(),
+ d = e.getBoundingClientRect().left + M.getDocumentScrollLeft(),
+ "top" === this.options.position ? (h += -o - l,
+ d += s / 2 - a / 2,
+ this.yMovement = -this.options.transitionMovement) : "right" === this.options.position ? (h += n / 2 - o / 2,
+ d += s + l,
+ this.xMovement = this.options.transitionMovement) : "left" === this.options.position ? (h += n / 2 - o / 2,
+ d += -a - l,
+ this.xMovement = -this.options.transitionMovement) : (h += n + l,
+ d += s / 2 - a / 2,
+ this.yMovement = this.options.transitionMovement),
+ r = this._repositionWithinScreen(d, h, a, o),
+ t(i).css({
+ top: r.y + "px",
+ left: r.x + "px"
+ })
+ }
+ }, {
+ key: "_repositionWithinScreen",
+ value: function (t, e, i, n) {
+ var s = M.getDocumentScrollLeft(),
+ o = M.getDocumentScrollTop(),
+ a = t - s,
+ r = e - o,
+ l = {
+ left: a,
+ top: r,
+ width: i,
+ height: n
+ },
+ h = this.options.margin + this.options.transitionMovement,
+ d = M.checkWithinContainer(document.body, l, h);
+ return d.left ? a = h : d.right && (a -= a + i - window.innerWidth),
+ d.top ? r = h : d.bottom && (r -= r + n - window.innerHeight), {
+ x: a + s,
+ y: r + o
+ }
+ }
+ }, {
+ key: "_animateIn",
+ value: function () {
+ this._positionTooltip(),
+ this.tooltipEl.style.visibility = "visible",
+ e.remove(this.tooltipEl),
+ e({
+ targets: this.tooltipEl,
+ opacity: 1,
+ translateX: this.xMovement,
+ translateY: this.yMovement,
+ duration: this.options.inDuration,
+ easing: "easeOutCubic"
+ })
+ }
+ }, {
+ key: "_animateOut",
+ value: function () {
+ e.remove(this.tooltipEl),
+ e({
+ targets: this.tooltipEl,
+ opacity: 0,
+ translateX: 0,
+ translateY: 0,
+ duration: this.options.outDuration,
+ easing: "easeOutCubic"
+ })
+ }
+ }, {
+ key: "_handleMouseEnter",
+ value: function () {
+ this.isHovered = !0,
+ this.open()
+ }
+ }, {
+ key: "_handleMouseLeave",
+ value: function () {
+ this.isHovered = !1,
+ this.close()
+ }
+ }, {
+ key: "_getAttributeOptions",
+ value: function () {
+ var t = {},
+ e = this.$el[0].getAttribute("data-tooltip"),
+ i = this.$el[0].getAttribute("data-position");
+ return e && (t.html = e),
+ i && (t.position = i),
+ t
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Tooltip
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ s
+ }();
+ M.Tooltip = n,
+ M.jQueryLoaded && M.initializeJqueryWrapper(n, "tooltip", "M_Tooltip")
+ }(cash, M.anime),
+ function (t) {
+ "use strict";
+ var e = e || {},
+ i = document.querySelectorAll.bind(document);
+
+ function n(t) {
+ var e = "";
+ for (var i in t)
+ t.hasOwnProperty(i) && (e += i + ":" + t[i] + ";");
+ return e
}
- return _createClass(n, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this.modal.destroy(),
- t(this.modalEl).remove(),
- this.el.M_Timepicker = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleInputKeydownBound = this._handleInputKeydown.bind(this),
- this._handleInputClickBound = this._handleInputClick.bind(this),
- this._handleClockClickStartBound = this._handleClockClickStart.bind(this),
- this._handleDocumentClickMoveBound = this._handleDocumentClickMove.bind(this),
- this._handleDocumentClickEndBound = this._handleDocumentClickEnd.bind(this),
- this.el.addEventListener("click", this._handleInputClickBound),
- this.el.addEventListener("keydown", this._handleInputKeydownBound),
- this.plate.addEventListener("mousedown", this._handleClockClickStartBound),
- this.plate.addEventListener("touchstart", this._handleClockClickStartBound),
- t(this.spanHours).on("click", this.showView.bind(this, "hours")),
- t(this.spanMinutes).on("click", this.showView.bind(this, "minutes"))
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.el.removeEventListener("click", this._handleInputClickBound),
- this.el.removeEventListener("keydown", this._handleInputKeydownBound)
- }
- }, {
- key: "_handleInputClick",
- value: function() {
- this.open()
- }
- }, {
- key: "_handleInputKeydown",
- value: function(t) {
- t.which === M.keys.ENTER && (t.preventDefault(),
- this.open())
- }
- }, {
- key: "_handleClockClickStart",
- value: function(t) {
- t.preventDefault();
- var e = this.plate.getBoundingClientRect()
- , i = e.left
- , s = e.top;
- this.x0 = i + this.options.dialRadius,
- this.y0 = s + this.options.dialRadius,
- this.moved = !1;
- var o = n._Pos(t);
- this.dx = o.x - this.x0,
- this.dy = o.y - this.y0,
- this.setHand(this.dx, this.dy, !1),
- document.addEventListener("mousemove", this._handleDocumentClickMoveBound),
- document.addEventListener("touchmove", this._handleDocumentClickMoveBound),
- document.addEventListener("mouseup", this._handleDocumentClickEndBound),
- document.addEventListener("touchend", this._handleDocumentClickEndBound)
- }
- }, {
- key: "_handleDocumentClickMove",
- value: function(t) {
- t.preventDefault();
- var e = n._Pos(t)
- , i = e.x - this.x0
- , s = e.y - this.y0;
- this.moved = !0,
- this.setHand(i, s, !1, !0)
- }
- }, {
- key: "_handleDocumentClickEnd",
- value: function(t) {
- t.preventDefault(),
- document.removeEventListener("mouseup", this._handleDocumentClickEndBound),
- document.removeEventListener("touchend", this._handleDocumentClickEndBound);
- var e = n._Pos(t)
- , i = e.x - this.x0
- , s = e.y - this.y0;
- this.moved && i === this.dx && s === this.dy && this.setHand(i, s),
- "hours" === this.currentView ? this.showView("minutes", this.options.duration / 2) : this.options.autoClose && (this.minutesView.addClass("timepicker-dial-out"),
- setTimeout(function() {
- this.done()
- }, this.options.duration / 2)),
- document.removeEventListener("mousemove", this._handleDocumentClickMoveBound),
- document.removeEventListener("touchmove", this._handleDocumentClickMoveBound)
- }
- }, {
- key: "_insertHTMLIntoDOM",
- value: function() {
- this.$modalEl = t(n._template),
- this.modalEl = this.$modalEl[0],
- this.modalEl.id = "modal-" + this.id;
- var e = document.querySelector(this.options.container);
- this.options.container && e ? this.$modalEl.appendTo(e) : this.$modalEl.insertBefore(this.el)
- }
- }, {
- key: "_setupModal",
- value: function() {
- var t = this;
- this.modal = M.Modal.init(this.modalEl, {
- onCloseEnd: function() {
- t.isOpen = !1
- }
- })
- }
- }, {
- key: "_setupVariables",
- value: function() {
- this.currentView = "hours",
- this.vibrate = navigator.vibrate ? "vibrate" : navigator.webkitVibrate ? "webkitVibrate" : null,
- this._canvas = this.modalEl.querySelector(".timepicker-canvas"),
- this.plate = this.modalEl.querySelector(".timepicker-plate"),
- this.hoursView = this.modalEl.querySelector(".timepicker-hours"),
- this.minutesView = this.modalEl.querySelector(".timepicker-minutes"),
- this.spanHours = this.modalEl.querySelector(".timepicker-span-hours"),
- this.spanMinutes = this.modalEl.querySelector(".timepicker-span-minutes"),
- this.spanAmPm = this.modalEl.querySelector(".timepicker-span-am-pm"),
- this.footer = this.modalEl.querySelector(".timepicker-footer"),
- this.amOrPm = "PM"
- }
- }, {
- key: "_pickerSetup",
- value: function() {
- t('
' + this.options.clearText + " ").appendTo(this.footer).on("click", this.clear.bind(this));
- var e = t('
');
- t('
' + this.options.cancelText + " ").appendTo(e).on("click", this.close.bind(this)),
- t('
' + this.options.doneText + " ").appendTo(e).on("click", this.done.bind(this)),
- e.appendTo(this.footer)
- }
- }, {
- key: "_clockSetup",
- value: function() {
- this.options.twelveHour && (this.$amBtn = t('
AM
'),
- this.$pmBtn = t('
PM
'),
- this.$amBtn.on("click", this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),
- this.$pmBtn.on("click", this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),
- this._buildHoursView(),
- this._buildMinutesView(),
- this._buildSVGClock()
- }
- }, {
- key: "_buildSVGClock",
- value: function() {
- var t = this.options.dialRadius
- , e = this.options.tickRadius
- , i = 2 * t
- , s = n._createSVGEl("svg");
- s.setAttribute("class", "timepicker-svg"),
- s.setAttribute("width", i),
- s.setAttribute("height", i);
- var o = n._createSVGEl("g");
- o.setAttribute("transform", "translate(" + t + "," + t + ")");
- var a = n._createSVGEl("circle");
- a.setAttribute("class", "timepicker-canvas-bearing"),
- a.setAttribute("cx", 0),
- a.setAttribute("cy", 0),
- a.setAttribute("r", 4);
- var r = n._createSVGEl("line");
- r.setAttribute("x1", 0),
- r.setAttribute("y1", 0);
- var l = n._createSVGEl("circle");
- l.setAttribute("class", "timepicker-canvas-bg"),
- l.setAttribute("r", e),
- o.appendChild(r),
- o.appendChild(l),
- o.appendChild(a),
- s.appendChild(o),
- this._canvas.appendChild(s),
- this.hand = r,
- this.bg = l,
- this.bearing = a,
- this.g = o
- }
- }, {
- key: "_buildHoursView",
- value: function() {
- var e = t('
');
- if (this.options.twelveHour)
- for (var i = 1; i < 13; i += 1) {
- var n = e.clone()
- , s = i / 6 * Math.PI
- , o = this.options.outerRadius;
- n.css({
- left: this.options.dialRadius + Math.sin(s) * o - this.options.tickRadius + "px",
- top: this.options.dialRadius - Math.cos(s) * o - this.options.tickRadius + "px"
- }),
- n.html(0 === i ? "00" : i),
- this.hoursView.appendChild(n[0])
- }
- else
- for (var a = 0; a < 24; a += 1) {
- var r = e.clone()
- , l = a / 6 * Math.PI
- , h = a > 0 && a < 13 ? this.options.innerRadius : this.options.outerRadius;
- r.css({
- left: this.options.dialRadius + Math.sin(l) * h - this.options.tickRadius + "px",
- top: this.options.dialRadius - Math.cos(l) * h - this.options.tickRadius + "px"
- }),
- r.html(0 === a ? "00" : a),
- this.hoursView.appendChild(r[0])
+ var s = {
+ duration: 750,
+ show: function (t, e) {
+ if (2 === t.button)
+ return !1;
+ var i = e || this,
+ o = document.createElement("div");
+ o.className = "waves-ripple",
+ i.appendChild(o);
+ var a = function (t) {
+ var e, i, n = {
+ top: 0,
+ left: 0
+ },
+ s = t && t.ownerDocument;
+ return e = s.documentElement,
+ void 0 !== t.getBoundingClientRect && (n = t.getBoundingClientRect()),
+ i = function (t) {
+ return null !== (e = t) && e === e.window ? t : 9 === t.nodeType && t.defaultView;
+ var e
+ }(s), {
+ top: n.top + i.pageYOffset - e.clientTop,
+ left: n.left + i.pageXOffset - e.clientLeft
+ }
+ }(i),
+ r = t.pageY - a.top,
+ l = t.pageX - a.left,
+ h = "scale(" + i.clientWidth / 100 * 10 + ")";
+ "touches" in t && (r = t.touches[0].pageY - a.top,
+ l = t.touches[0].pageX - a.left),
+ o.setAttribute("data-hold", Date.now()),
+ o.setAttribute("data-scale", h),
+ o.setAttribute("data-x", l),
+ o.setAttribute("data-y", r);
+ var d = {
+ top: r + "px",
+ left: l + "px"
+ };
+ o.className = o.className + " waves-notransition",
+ o.setAttribute("style", n(d)),
+ o.className = o.className.replace("waves-notransition", ""),
+ d["-webkit-transform"] = h,
+ d["-moz-transform"] = h,
+ d["-ms-transform"] = h,
+ d["-o-transform"] = h,
+ d.transform = h,
+ d.opacity = "1",
+ d["-webkit-transition-duration"] = s.duration + "ms",
+ d["-moz-transition-duration"] = s.duration + "ms",
+ d["-o-transition-duration"] = s.duration + "ms",
+ d["transition-duration"] = s.duration + "ms",
+ d["-webkit-transition-timing-function"] = "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
+ d["-moz-transition-timing-function"] = "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
+ d["-o-transition-timing-function"] = "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
+ d["transition-timing-function"] = "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
+ o.setAttribute("style", n(d))
+ },
+ hide: function (t) {
+ o.touchup(t);
+ var e = this,
+ i = (e.clientWidth,
+ null),
+ a = e.getElementsByClassName("waves-ripple");
+ if (!(a.length > 0))
+ return !1;
+ var r = (i = a[a.length - 1]).getAttribute("data-x"),
+ l = i.getAttribute("data-y"),
+ h = i.getAttribute("data-scale"),
+ d = 350 - (Date.now() - Number(i.getAttribute("data-hold")));
+ d < 0 && (d = 0),
+ setTimeout(function () {
+ var t = {
+ top: l + "px",
+ left: r + "px",
+ opacity: "0",
+ "-webkit-transition-duration": s.duration + "ms",
+ "-moz-transition-duration": s.duration + "ms",
+ "-o-transition-duration": s.duration + "ms",
+ "transition-duration": s.duration + "ms",
+ "-webkit-transform": h,
+ "-moz-transform": h,
+ "-ms-transform": h,
+ "-o-transform": h,
+ transform: h
+ };
+ i.setAttribute("style", n(t)),
+ setTimeout(function () {
+ try {
+ e.removeChild(i)
+ } catch (t) {
+ return !1
+ }
+ }, s.duration)
+ }, d)
+ },
+ wrapInput: function (t) {
+ for (var e = 0; e < t.length; e++) {
+ var i = t[e];
+ if ("input" === i.tagName.toLowerCase()) {
+ var n = i.parentNode;
+ if ("i" === n.tagName.toLowerCase() && -1 !== n.className.indexOf("waves-effect"))
+ continue;
+ var s = document.createElement("i");
+ s.className = i.className + " waves-input-wrapper";
+ var o = i.getAttribute("style");
+ o || (o = ""),
+ s.setAttribute("style", o),
+ i.className = "waves-button-input",
+ i.removeAttribute("style"),
+ n.replaceChild(s, i),
+ s.appendChild(i)
+ }
}
- }
- }, {
- key: "_buildMinutesView",
- value: function() {
- for (var e = t('
'), i = 0; i < 60; i += 5) {
- var s = e.clone()
- , o = i / 30 * Math.PI;
- s.css({
- left: this.options.dialRadius + Math.sin(o) * this.options.outerRadius - this.options.tickRadius + "px",
- top: this.options.dialRadius - Math.cos(o) * this.options.outerRadius - this.options.tickRadius + "px"
- }),
- s.html(n._addLeadingZero(i)),
- this.minutesView.appendChild(s[0])
}
- }
- }, {
- key: "_handleAmPmClick",
- value: function(e) {
- var i = t(e.target);
- this.amOrPm = i.hasClass("am-btn") ? "AM" : "PM",
- this._updateAmPmView()
- }
- }, {
- key: "_updateAmPmView",
- value: function() {
- this.options.twelveHour && (this.$amBtn.toggleClass("text-primary", "AM" === this.amOrPm),
- this.$pmBtn.toggleClass("text-primary", "PM" === this.amOrPm))
- }
- }, {
- key: "_updateTimeFromInput",
- value: function() {
- var t = ((this.el.value || this.options.defaultTime || "") + "").split(":");
- if (this.options.twelveHour && void 0 !== t[1] && (t[1].toUpperCase().indexOf("AM") > 0 ? this.amOrPm = "AM" : this.amOrPm = "PM",
- t[1] = t[1].replace("AM", "").replace("PM", "")),
- "now" === t[0]) {
- var e = new Date(+new Date + this.options.fromnow);
- t = [e.getHours(), e.getMinutes()],
- this.options.twelveHour && (this.amOrPm = t[0] >= 12 && t[0] < 24 ? "PM" : "AM")
+ },
+ o = {
+ touches: 0,
+ allowEvent: function (t) {
+ var e = !0;
+ return "touchstart" === t.type ? o.touches += 1 : "touchend" === t.type || "touchcancel" === t.type ? setTimeout(function () {
+ o.touches > 0 && (o.touches -= 1)
+ }, 500) : "mousedown" === t.type && o.touches > 0 && (e = !1),
+ e
+ },
+ touchup: function (t) {
+ o.allowEvent(t)
}
- this.hours = +t[0] || 0,
- this.minutes = +t[1] || 0,
- this.spanHours.innerHTML = this.hours,
- this.spanMinutes.innerHTML = n._addLeadingZero(this.minutes),
- this._updateAmPmView()
- }
- }, {
- key: "showView",
- value: function(e, i) {
- "minutes" === e && t(this.hoursView).css("visibility");
- var n = "hours" === e
- , s = n ? this.hoursView : this.minutesView
- , o = n ? this.minutesView : this.hoursView;
- this.currentView = e,
- t(this.spanHours).toggleClass("text-primary", n),
- t(this.spanMinutes).toggleClass("text-primary", !n),
- o.classList.add("timepicker-dial-out"),
- t(s).css("visibility", "visible").removeClass("timepicker-dial-out"),
- this.resetClock(i),
- clearTimeout(this.toggleViewTimer),
- this.toggleViewTimer = setTimeout(function() {
- t(o).css("visibility", "hidden")
- }, this.options.duration)
- }
- }, {
- key: "resetClock",
- value: function(e) {
- var i = this.currentView
- , n = this[i]
- , s = "hours" === i
- , o = n * (Math.PI / (s ? 6 : 30))
- , a = s && n > 0 && n < 13 ? this.options.innerRadius : this.options.outerRadius
- , r = Math.sin(o) * a
- , l = -Math.cos(o) * a
- , h = this;
- e ? (t(this.canvas).addClass("timepicker-canvas-out"),
- setTimeout(function() {
- t(h.canvas).removeClass("timepicker-canvas-out"),
- h.setHand(r, l)
- }, e)) : this.setHand(r, l)
- }
- }, {
- key: "setHand",
- value: function(t, e, i) {
- var s = this
- , o = Math.atan2(t, -e)
- , a = "hours" === this.currentView
- , r = Math.PI / (a || i ? 6 : 30)
- , l = Math.sqrt(t * t + e * e)
- , h = a && l < (this.options.outerRadius + this.options.innerRadius) / 2
- , d = h ? this.options.innerRadius : this.options.outerRadius;
- this.options.twelveHour && (d = this.options.outerRadius),
- o < 0 && (o = 2 * Math.PI + o);
- var u = Math.round(o / r);
- o = u * r,
- this.options.twelveHour ? a ? 0 === u && (u = 12) : (i && (u *= 5),
- 60 === u && (u = 0)) : a ? (12 === u && (u = 0),
- u = h ? 0 === u ? 12 : u : 0 === u ? 0 : u + 12) : (i && (u *= 5),
- 60 === u && (u = 0)),
- this[this.currentView] !== u && this.vibrate && this.options.vibrate && (this.vibrateTimer || (navigator[this.vibrate](10),
- this.vibrateTimer = setTimeout(function() {
- s.vibrateTimer = null
- }, 100))),
- this[this.currentView] = u,
- a ? this.spanHours.innerHTML = u : this.spanMinutes.innerHTML = n._addLeadingZero(u);
- var c = Math.sin(o) * (d - this.options.tickRadius)
- , p = -Math.cos(o) * (d - this.options.tickRadius)
- , v = Math.sin(o) * d
- , f = -Math.cos(o) * d;
- this.hand.setAttribute("x2", c),
- this.hand.setAttribute("y2", p),
- this.bg.setAttribute("cx", v),
- this.bg.setAttribute("cy", f)
- }
- }, {
- key: "open",
- value: function() {
- this.isOpen || (this.isOpen = !0,
- this._updateTimeFromInput(),
- this.showView("hours"),
- this.modal.open())
- }
- }, {
- key: "close",
- value: function() {
- this.isOpen && (this.isOpen = !1,
- this.modal.close())
- }
- }, {
- key: "done",
- value: function(t, e) {
- var i = this.el.value
- , s = e ? "" : n._addLeadingZero(this.hours) + ":" + n._addLeadingZero(this.minutes);
- this.time = s,
- !e && this.options.twelveHour && (s = s + " " + this.amOrPm),
- this.el.value = s,
- s !== i && this.$el.trigger("change"),
- this.close(),
- this.el.focus()
- }
- }, {
- key: "clear",
- value: function() {
- this.done(null, !0)
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
- }
- }, {
- key: "_addLeadingZero",
- value: function(t) {
- return (t < 10 ? "0" : "") + t
- }
- }, {
- key: "_createSVGEl",
- value: function(t) {
- return document.createElementNS("http://www.w3.org/2000/svg", t)
- }
- }, {
- key: "_Pos",
- value: function(t) {
- return t.targetTouches && t.targetTouches.length >= 1 ? {
- x: t.targetTouches[0].clientX,
- y: t.targetTouches[0].clientY
- } : {
- x: t.clientX,
- y: t.clientY
+ };
+
+ function a(e) {
+ var i = function (t) {
+ if (!1 === o.allowEvent(t))
+ return null;
+ for (var e = null, i = t.target || t.srcElement; null !== i.parentNode;) {
+ if (!(i instanceof SVGElement) && -1 !== i.className.indexOf("waves-effect")) {
+ e = i;
+ break
+ }
+ i = i.parentNode
}
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Timepicker
- }
- }, {
- key: "defaults",
- get: function() {
return e
- }
- }]),
- n
- }();
- i._template = ['
', '
', '
', '
', '
', ' ', ":", ' ', "
", '
", "
", "
", '
", "
", "
"].join(""),
- M.Timepicker = i,
- M.jQueryLoaded && M.initializeJqueryWrapper(i, "timepicker", "M_Timepicker")
-}(cash),
-function(t) {
- "use strict";
- var e = {}
- , i = function(i) {
- _inherits(n, Component);
- function n(e, i) {
- _classCallCheck(this, n);
- var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
- return s.el.M_CharacterCounter = s,
- s.options = t.extend({}, n.defaults, i),
- s.isInvalid = !1,
- s.isValidLength = !1,
- s._setupCounter(),
- s._setupEventHandlers(),
- s
- }
- return _createClass(n, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this.el.CharacterCounter = void 0,
- this._removeCounter()
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleUpdateCounterBound = this.updateCounter.bind(this),
- this.el.addEventListener("focus", this._handleUpdateCounterBound, !0),
- this.el.addEventListener("input", this._handleUpdateCounterBound, !0)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.el.removeEventListener("focus", this._handleUpdateCounterBound, !0),
- this.el.removeEventListener("input", this._handleUpdateCounterBound, !0)
- }
- }, {
- key: "_setupCounter",
- value: function() {
- this.counterEl = document.createElement("span"),
- t(this.counterEl).addClass("character-counter").css({
- float: "right",
- "font-size": "12px",
- height: 1
- }),
- this.$el.parent().append(this.counterEl)
- }
- }, {
- key: "_removeCounter",
- value: function() {
- t(this.counterEl).remove()
- }
- }, {
- key: "updateCounter",
- value: function() {
- var e = +this.$el.attr("data-length")
- , i = this.el.value.length;
- this.isValidLength = i <= e;
- var n = i;
- e && (n += "/" + e,
- this._validateInput()),
- t(this.counterEl).html(n)
- }
- }, {
- key: "_validateInput",
- value: function() {
- this.isValidLength && this.isInvalid ? (this.isInvalid = !1,
- this.$el.removeClass("invalid")) : this.isValidLength || this.isInvalid || (this.isInvalid = !0,
- this.$el.removeClass("valid"),
- this.$el.addClass("invalid"))
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_CharacterCounter
- }
- }, {
- key: "defaults",
- get: function() {
- return e
- }
- }]),
- n
- }();
- M.CharacterCounter = i,
- M.jQueryLoaded && M.initializeJqueryWrapper(i, "characterCounter", "M_CharacterCounter")
-}(cash),
-function(t) {
- "use strict";
- var e = {
- duration: 200,
- dist: -100,
- shift: 0,
- padding: 0,
- fullWidth: !1,
- indicators: !1,
- noWrap: !1,
- onCycleTo: null
- }
- , i = function(i) {
- _inherits(n, Component);
- function n(e, i) {
- _classCallCheck(this, n);
- var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
- return s.el.M_Carousel = s,
- s.options = t.extend({}, n.defaults, i),
- s.hasMultipleSlides = s.$el.find(".carousel-item").length > 1,
- s.showIndicators = s.options.indicators && s.hasMultipleSlides,
- s.noWrap = s.options.noWrap || !s.hasMultipleSlides,
- s.pressed = !1,
- s.dragged = !1,
- s.offset = s.target = 0,
- s.images = [],
- s.itemWidth = s.$el.find(".carousel-item").first().innerWidth(),
- s.itemHeight = s.$el.find(".carousel-item").first().innerHeight(),
- s.dim = 2 * s.itemWidth + s.options.padding || 1,
- s._autoScrollBound = s._autoScroll.bind(s),
- s._trackBound = s._track.bind(s),
- s.options.fullWidth && (s.options.dist = 0,
- s._setCarouselHeight(),
- s.showIndicators && s.$el.find(".carousel-fixed-item").addClass("with-indicators")),
- s.$indicators = t('
'),
- s.$el.find(".carousel-item").each(function(e, i) {
- if (s.images.push(e),
- s.showIndicators) {
- var n = t('
');
- 0 === i && n[0].classList.add("active"),
- s.$indicators.append(n)
+ }(e);
+ null !== i && (s.show(e, i),
+ "ontouchstart" in t && (i.addEventListener("touchend", s.hide, !1),
+ i.addEventListener("touchcancel", s.hide, !1)),
+ i.addEventListener("mouseup", s.hide, !1),
+ i.addEventListener("mouseleave", s.hide, !1),
+ i.addEventListener("dragend", s.hide, !1))
+ }
+ e.displayEffect = function (e) {
+ "duration" in (e = e || {}) && (s.duration = e.duration),
+ s.wrapInput(i(".waves-effect")),
+ "ontouchstart" in t && document.body.addEventListener("touchstart", a, !1),
+ document.body.addEventListener("mousedown", a, !1)
+ },
+ e.attach = function (e) {
+ "input" === e.tagName.toLowerCase() && (s.wrapInput([e]),
+ e = e.parentNode),
+ "ontouchstart" in t && e.addEventListener("touchstart", a, !1),
+ e.addEventListener("mousedown", a, !1)
+ },
+ t.Waves = e,
+ document.addEventListener("DOMContentLoaded", function () {
+ e.displayEffect()
+ }, !1)
+ }(window),
+ function (t, e) {
+ "use strict";
+ var i = {
+ html: "",
+ displayLength: 4e3,
+ inDuration: 300,
+ outDuration: 375,
+ classes: "",
+ completeCallback: null,
+ activationPercent: .8
+ },
+ n = function () {
+ function n(e) {
+ _classCallCheck(this, n),
+ this.options = t.extend({}, n.defaults, e),
+ this.message = this.options.html,
+ this.panning = !1,
+ this.timeRemaining = this.options.displayLength,
+ 0 === n._toasts.length && n._createContainer(),
+ n._toasts.push(this);
+ var i = this._createToast();
+ i.M_Toast = this,
+ this.el = i,
+ this._animateIn(),
+ this._setTimer()
}
- }),
- s.showIndicators && s.$el.append(s.$indicators),
- s.count = s.images.length,
- s.xform = "transform",
- ["webkit", "Moz", "O", "ms"].every(function(t) {
- var e = t + "Transform";
- return void 0 === document.body.style[e] || (s.xform = e,
- !1)
- }),
- s._setupEventHandlers(),
- s._scroll(s.offset),
- s
- }
- return _createClass(n, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this.el.M_Carousel = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- var t = this;
- this._handleCarouselTapBound = this._handleCarouselTap.bind(this),
- this._handleCarouselDragBound = this._handleCarouselDrag.bind(this),
- this._handleCarouselReleaseBound = this._handleCarouselRelease.bind(this),
- this._handleCarouselClickBound = this._handleCarouselClick.bind(this),
- void 0 !== window.ontouchstart && (this.el.addEventListener("touchstart", this._handleCarouselTapBound),
- this.el.addEventListener("touchmove", this._handleCarouselDragBound),
- this.el.addEventListener("touchend", this._handleCarouselReleaseBound)),
- this.el.addEventListener("mousedown", this._handleCarouselTapBound),
- this.el.addEventListener("mousemove", this._handleCarouselDragBound),
- this.el.addEventListener("mouseup", this._handleCarouselReleaseBound),
- this.el.addEventListener("mouseleave", this._handleCarouselReleaseBound),
- this.el.addEventListener("click", this._handleCarouselClickBound),
- this.showIndicators && this.$indicators && (this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this),
- this.$indicators.find(".indicator-item").each(function(e, i) {
- e.addEventListener("click", t._handleIndicatorClickBound)
- }));
- var e = M.throttle(this._handleResize, 200);
- this._handleThrottledResizeBound = e.bind(this),
- window.addEventListener("resize", this._handleThrottledResizeBound)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- var t = this;
- void 0 !== window.ontouchstart && (this.el.removeEventListener("touchstart", this._handleCarouselTapBound),
- this.el.removeEventListener("touchmove", this._handleCarouselDragBound),
- this.el.removeEventListener("touchend", this._handleCarouselReleaseBound)),
- this.el.removeEventListener("mousedown", this._handleCarouselTapBound),
- this.el.removeEventListener("mousemove", this._handleCarouselDragBound),
- this.el.removeEventListener("mouseup", this._handleCarouselReleaseBound),
- this.el.removeEventListener("mouseleave", this._handleCarouselReleaseBound),
- this.el.removeEventListener("click", this._handleCarouselClickBound),
- this.showIndicators && this.$indicators && this.$indicators.find(".indicator-item").each(function(e, i) {
- e.removeEventListener("click", t._handleIndicatorClickBound)
- }),
- window.removeEventListener("resize", this._handleThrottledResizeBound)
- }
- }, {
- key: "_handleCarouselTap",
- value: function(e) {
- "mousedown" === e.type && t(e.target).is("img") && e.preventDefault(),
- this.pressed = !0,
- this.dragged = !1,
- this.verticalDragged = !1,
- this.reference = this._xpos(e),
- this.referenceY = this._ypos(e),
- this.velocity = this.amplitude = 0,
- this.frame = this.offset,
- this.timestamp = Date.now(),
- clearInterval(this.ticker),
- this.ticker = setInterval(this._trackBound, 100)
- }
- }, {
- key: "_handleCarouselDrag",
- value: function(t) {
- var e = void 0
- , i = void 0
- , n = void 0;
- if (this.pressed)
- if (e = this._xpos(t),
- i = this._ypos(t),
- n = this.reference - e,
- Math.abs(this.referenceY - i) < 30 && !this.verticalDragged)
- (n > 2 || n < -2) && (this.dragged = !0,
- this.reference = e,
- this._scroll(this.offset + n));
- else {
- if (this.dragged)
- return t.preventDefault(),
- t.stopPropagation(),
- !1;
- this.verticalDragged = !0
- }
- if (this.dragged)
- return t.preventDefault(),
- t.stopPropagation(),
- !1
- }
- }, {
- key: "_handleCarouselRelease",
- value: function(t) {
- if (this.pressed)
- return this.pressed = !1,
- clearInterval(this.ticker),
- this.target = this.offset,
- (this.velocity > 10 || this.velocity < -10) && (this.amplitude = .9 * this.velocity,
- this.target = this.offset + this.amplitude),
- this.target = Math.round(this.target / this.dim) * this.dim,
- this.noWrap && (this.target >= this.dim * (this.count - 1) ? this.target = this.dim * (this.count - 1) : this.target < 0 && (this.target = 0)),
- this.amplitude = this.target - this.offset,
- this.timestamp = Date.now(),
- requestAnimationFrame(this._autoScrollBound),
- this.dragged && (t.preventDefault(),
- t.stopPropagation()),
- !1
- }
- }, {
- key: "_handleCarouselClick",
- value: function(e) {
- if (this.dragged)
- return e.preventDefault(),
- e.stopPropagation(),
- !1;
- if (!this.options.fullWidth) {
- var i = t(e.target).closest(".carousel-item").index();
- 0 !== this._wrap(this.center) - i && (e.preventDefault(),
- e.stopPropagation()),
- this._cycleTo(i)
+ return _createClass(n, [{
+ key: "_createToast",
+ value: function () {
+ var e = document.createElement("div");
+ return e.classList.add("toast"),
+ this.options.classes.length && t(e).addClass(this.options.classes),
+ ("object" == typeof HTMLElement ? this.message instanceof HTMLElement : this.message && "object" == typeof this.message && null !== this.message && 1 === this.message.nodeType && "string" == typeof this.message.nodeName) ? e.appendChild(this.message) : this.message.jquery ? t(e).append(this.message[0]) : e.innerHTML = this.message,
+ n._container.appendChild(e),
+ e
+ }
+ }, {
+ key: "_animateIn",
+ value: function () {
+ e({
+ targets: this.el,
+ top: 0,
+ opacity: 1,
+ duration: 300,
+ easing: "easeOutCubic"
+ })
+ }
+ }, {
+ key: "_setTimer",
+ value: function () {
+ var t = this;
+ this.timeRemaining !== 1 / 0 && (this.counterInterval = setInterval(function () {
+ t.panning || (t.timeRemaining -= 20),
+ t.timeRemaining <= 0 && t.dismiss()
+ }, 20))
+ }
+ }, {
+ key: "dismiss",
+ value: function () {
+ var t = this;
+ window.clearInterval(this.counterInterval);
+ var i = this.el.offsetWidth * this.options.activationPercent;
+ this.wasSwiped && (this.el.style.transition = "transform .05s, opacity .05s",
+ this.el.style.transform = "translateX(" + i + "px)",
+ this.el.style.opacity = 0),
+ e({
+ targets: this.el,
+ opacity: 0,
+ marginTop: -40,
+ duration: this.options.outDuration,
+ easing: "easeOutExpo",
+ complete: function () {
+ "function" == typeof t.options.completeCallback && t.options.completeCallback(),
+ t.el.parentNode.removeChild(t.el),
+ n._toasts.splice(n._toasts.indexOf(t), 1),
+ 0 === n._toasts.length && n._removeContainer()
+ }
+ })
+ }
+ }], [{
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Toast
+ }
+ }, {
+ key: "_createContainer",
+ value: function () {
+ var t = document.createElement("div");
+ t.setAttribute("id", "toast-container"),
+ t.addEventListener("touchstart", n._onDragStart),
+ t.addEventListener("touchmove", n._onDragMove),
+ t.addEventListener("touchend", n._onDragEnd),
+ t.addEventListener("mousedown", n._onDragStart),
+ document.addEventListener("mousemove", n._onDragMove),
+ document.addEventListener("mouseup", n._onDragEnd),
+ document.body.appendChild(t),
+ n._container = t
+ }
+ }, {
+ key: "_removeContainer",
+ value: function () {
+ document.removeEventListener("mousemove", n._onDragMove),
+ document.removeEventListener("mouseup", n._onDragEnd),
+ n._container.parentNode.removeChild(n._container),
+ n._container = null
+ }
+ }, {
+ key: "_onDragStart",
+ value: function (e) {
+ if (e.target && t(e.target).closest(".toast").length) {
+ var i = t(e.target).closest(".toast")[0].M_Toast;
+ i.panning = !0,
+ n._draggedToast = i,
+ i.el.classList.add("panning"),
+ i.el.style.transition = "",
+ i.startingXPos = n._xPos(e),
+ i.time = Date.now(),
+ i.xPos = n._xPos(e)
+ }
+ }
+ }, {
+ key: "_onDragMove",
+ value: function (t) {
+ if (n._draggedToast) {
+ t.preventDefault();
+ var e = n._draggedToast;
+ e.deltaX = Math.abs(e.xPos - n._xPos(t)),
+ e.xPos = n._xPos(t),
+ e.velocityX = e.deltaX / (Date.now() - e.time),
+ e.time = Date.now();
+ var i = e.xPos - e.startingXPos,
+ s = e.el.offsetWidth * e.options.activationPercent;
+ e.el.style.transform = "translateX(" + i + "px)",
+ e.el.style.opacity = 1 - Math.abs(i / s)
+ }
+ }
+ }, {
+ key: "_onDragEnd",
+ value: function () {
+ if (n._draggedToast) {
+ var t = n._draggedToast;
+ t.panning = !1,
+ t.el.classList.remove("panning");
+ var e = t.xPos - t.startingXPos,
+ i = t.el.offsetWidth * t.options.activationPercent;
+ Math.abs(e) > i || t.velocityX > 1 ? (t.wasSwiped = !0,
+ t.dismiss()) : (t.el.style.transition = "transform .2s, opacity .2s",
+ t.el.style.transform = "",
+ t.el.style.opacity = ""),
+ n._draggedToast = null
+ }
+ }
+ }, {
+ key: "_xPos",
+ value: function (t) {
+ return t.targetTouches && t.targetTouches.length >= 1 ? t.targetTouches[0].clientX : t.clientX
+ }
+ }, {
+ key: "dismissAll",
+ value: function () {
+ for (var t in n._toasts)
+ n._toasts[t].dismiss()
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ n
+ }();
+ n._toasts = [],
+ n._container = null,
+ n._draggedToast = null,
+ M.Toast = n,
+ M.toast = function (t) {
+ return new n(t)
+ }
+ }(cash, M.anime),
+ function (t, e) {
+ "use strict";
+ var i = {
+ edge: "left",
+ draggable: !0,
+ inDuration: 250,
+ outDuration: 200,
+ onOpenStart: null,
+ onOpenEnd: null,
+ onCloseStart: null,
+ onCloseEnd: null
+ },
+ n = function (n) {
+ _inherits(s, Component);
+
+ function s(e, i) {
+ _classCallCheck(this, s);
+ var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
+ return n.el.M_Sidenav = n,
+ n.id = n.$el.attr("id"),
+ n.options = t.extend({}, s.defaults, i),
+ n.isOpen = !1,
+ n.isFixed = n.el.classList.contains("sidenav-fixed"),
+ n.isDragged = !1,
+ n._createOverlay(),
+ n._createDragTarget(),
+ n._setupEventHandlers(),
+ n._setupClasses(),
+ n._setupFixed(),
+ s._sidenavs.push(n),
+ n
}
- }
- }, {
- key: "_handleIndicatorClick",
- value: function(e) {
- e.stopPropagation();
- var i = t(e.target).closest(".indicator-item");
- i.length && this._cycleTo(i.index())
- }
- }, {
- key: "_handleResize",
- value: function(t) {
- this.options.fullWidth ? (this.itemWidth = this.$el.find(".carousel-item").first().innerWidth(),
- this.imageHeight = this.$el.find(".carousel-item.active").height(),
- this.dim = 2 * this.itemWidth + this.options.padding,
- this.offset = 2 * this.center * this.itemWidth,
- this.target = this.offset,
- this._setCarouselHeight(!0)) : this._scroll()
- }
- }, {
- key: "_setCarouselHeight",
- value: function(t) {
- var e = this
- , i = this.$el.find(".carousel-item.active").length ? this.$el.find(".carousel-item.active").first() : this.$el.find(".carousel-item").first()
- , n = i.find("img").first();
- if (n.length)
- if (n[0].complete) {
- var s = n.height();
- if (s > 0)
- this.$el.css("height", s + "px");
- else {
- var o = n[0].naturalWidth
- , a = n[0].naturalHeight
- , r = this.$el.width() / o * a;
- this.$el.css("height", r + "px")
+ return _createClass(s, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this._overlay.parentNode.removeChild(this._overlay),
+ this.dragTarget.parentNode.removeChild(this.dragTarget),
+ this.el.M_Sidenav = void 0;
+ var t = s._sidenavs.indexOf(this);
+ t >= 0 && s._sidenavs.splice(t, 1)
+ }
+ }, {
+ key: "_createOverlay",
+ value: function () {
+ var t = document.createElement("div");
+ this._closeBound = this.close.bind(this),
+ t.classList.add("sidenav-overlay"),
+ t.addEventListener("click", this._closeBound),
+ document.body.appendChild(t),
+ this._overlay = t
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ 0 === s._sidenavs.length && document.body.addEventListener("click", this._handleTriggerClick),
+ this._handleDragTargetDragBound = this._handleDragTargetDrag.bind(this),
+ this._handleDragTargetReleaseBound = this._handleDragTargetRelease.bind(this),
+ this._handleCloseDragBound = this._handleCloseDrag.bind(this),
+ this._handleCloseReleaseBound = this._handleCloseRelease.bind(this),
+ this._handleCloseTriggerClickBound = this._handleCloseTriggerClick.bind(this),
+ this.dragTarget.addEventListener("touchmove", this._handleDragTargetDragBound),
+ this.dragTarget.addEventListener("touchend", this._handleDragTargetReleaseBound),
+ this._overlay.addEventListener("touchmove", this._handleCloseDragBound),
+ this._overlay.addEventListener("touchend", this._handleCloseReleaseBound),
+ this.el.addEventListener("touchmove", this._handleCloseDragBound),
+ this.el.addEventListener("touchend", this._handleCloseReleaseBound),
+ this.el.addEventListener("click", this._handleCloseTriggerClickBound),
+ this.isFixed && (this._handleWindowResizeBound = this._handleWindowResize.bind(this),
+ window.addEventListener("resize", this._handleWindowResizeBound))
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ 1 === s._sidenavs.length && document.body.removeEventListener("click", this._handleTriggerClick),
+ this.dragTarget.removeEventListener("touchmove", this._handleDragTargetDragBound),
+ this.dragTarget.removeEventListener("touchend", this._handleDragTargetReleaseBound),
+ this._overlay.removeEventListener("touchmove", this._handleCloseDragBound),
+ this._overlay.removeEventListener("touchend", this._handleCloseReleaseBound),
+ this.el.removeEventListener("touchmove", this._handleCloseDragBound),
+ this.el.removeEventListener("touchend", this._handleCloseReleaseBound),
+ this.el.removeEventListener("click", this._handleCloseTriggerClickBound),
+ this.isFixed && window.removeEventListener("resize", this._handleWindowResizeBound)
+ }
+ }, {
+ key: "_handleTriggerClick",
+ value: function (e) {
+ var i = t(e.target).closest(".sidenav-trigger");
+ if (e.target && i.length) {
+ var n = M.getIdFromTrigger(i[0]),
+ s = document.getElementById(n).M_Sidenav;
+ s && s.open(i),
+ e.preventDefault()
+ }
+ }
+ }, {
+ key: "_startDrag",
+ value: function (t) {
+ var i = t.targetTouches[0].clientX;
+ this.isDragged = !0,
+ this._startingXpos = i,
+ this._xPos = this._startingXpos,
+ this._time = Date.now(),
+ this._width = this.el.getBoundingClientRect().width,
+ this._overlay.style.display = "block",
+ e.remove(this.el),
+ e.remove(this._overlay)
+ }
+ }, {
+ key: "_dragMoveUpdate",
+ value: function (t) {
+ var e = t.targetTouches[0].clientX;
+ this.deltaX = Math.abs(this._xPos - e),
+ this._xPos = e,
+ this.velocityX = this.deltaX / (Date.now() - this._time),
+ this._time = Date.now()
+ }
+ }, {
+ key: "_handleDragTargetDrag",
+ value: function (t) {
+ this.isDragged || this._startDrag(t),
+ this._dragMoveUpdate(t);
+ var e = this._xPos - this._startingXpos,
+ i = e > 0 ? "right" : "left";
+ e = Math.min(this._width, Math.abs(e)),
+ this.options.edge === i && (e = 0);
+ var n = e,
+ s = "translateX(-100%)";
+ "right" === this.options.edge && (s = "translateX(100%)",
+ n = -n),
+ this.percentOpen = Math.min(1, e / this._width),
+ this.el.style.transform = s + " translateX(" + n + "px)",
+ this._overlay.style.opacity = this.percentOpen
+ }
+ }, {
+ key: "_handleDragTargetRelease",
+ value: function () {
+ this.isDragged && (this.percentOpen > .5 ? this.open() : this._animateOut(),
+ this.isDragged = !1)
+ }
+ }, {
+ key: "_handleCloseDrag",
+ value: function (t) {
+ if (this.isOpen) {
+ this.isDragged || this._startDrag(t),
+ this._dragMoveUpdate(t);
+ var e = this._xPos - this._startingXpos,
+ i = e > 0 ? "right" : "left";
+ e = Math.min(this._width, Math.abs(e)),
+ this.options.edge !== i && (e = 0);
+ var n = -e;
+ "right" === this.options.edge && (n = -n),
+ this.percentOpen = Math.min(1, 1 - e / this._width),
+ this.el.style.transform = "translateX(" + n + "px)",
+ this._overlay.style.opacity = this.percentOpen
+ }
+ }
+ }, {
+ key: "_handleCloseRelease",
+ value: function () {
+ this.isOpen && this.isDragged && (this.percentOpen > .5 ? this._animateIn() : this.close(),
+ this.isDragged = !1)
+ }
+ }, {
+ key: "_handleCloseTriggerClick",
+ value: function (e) {
+ t(e.target).closest(".sidenav-close").length && this.close()
+ }
+ }, {
+ key: "_handleWindowResize",
+ value: function () {
+ window.innerWidth > 992 ? this.open() : this.close()
+ }
+ }, {
+ key: "_setupClasses",
+ value: function () {
+ "right" === this.options.edge && (this.el.classList.add("right-aligned"),
+ this.dragTarget.classList.add("right-aligned"))
+ }
+ }, {
+ key: "_removeClasses",
+ value: function () {
+ this.el.classList.remove("right-aligned"),
+ this.dragTarget.classList.remove("right-aligned")
+ }
+ }, {
+ key: "_setupFixed",
+ value: function () {
+ this.isFixed && window.innerWidth > 992 && this.open()
}
- } else
- n.one("load", function(t, i) {
- e.$el.css("height", t.offsetHeight + "px")
- });
- else if (!t) {
- var l = i.height();
- this.$el.css("height", l + "px")
- }
- }
- }, {
- key: "_xpos",
- value: function(t) {
- return t.targetTouches && t.targetTouches.length >= 1 ? t.targetTouches[0].clientX : t.clientX
- }
- }, {
- key: "_ypos",
- value: function(t) {
- return t.targetTouches && t.targetTouches.length >= 1 ? t.targetTouches[0].clientY : t.clientY
- }
- }, {
- key: "_wrap",
- value: function(t) {
- return t >= this.count ? t % this.count : t < 0 ? this._wrap(this.count + t % this.count) : t
- }
- }, {
- key: "_track",
- value: function() {
- var t = void 0
- , e = void 0
- , i = void 0
- , n = void 0;
- e = (t = Date.now()) - this.timestamp,
- this.timestamp = t,
- i = this.offset - this.frame,
- this.frame = this.offset,
- n = 1e3 * i / (1 + e),
- this.velocity = .8 * n + .2 * this.velocity
- }
- }, {
- key: "_autoScroll",
- value: function() {
- var t = void 0
- , e = void 0;
- this.amplitude && (t = Date.now() - this.timestamp,
- (e = this.amplitude * Math.exp(-t / this.options.duration)) > 2 || e < -2 ? (this._scroll(this.target - e),
- requestAnimationFrame(this._autoScrollBound)) : this._scroll(this.target))
- }
- }, {
- key: "_scroll",
- value: function(e) {
- var i = this;
- this.$el.hasClass("scrolling") || this.el.classList.add("scrolling"),
- null != this.scrollingTimeout && window.clearTimeout(this.scrollingTimeout),
- this.scrollingTimeout = window.setTimeout(function() {
- i.$el.removeClass("scrolling")
- }, this.options.duration);
- var n = void 0
- , s = void 0
- , o = void 0
- , a = void 0
- , r = void 0
- , l = void 0
- , h = void 0
- , d = void 0
- , u = void 0
- , c = this.center;
- if (this.offset = "number" == typeof e ? e : this.offset,
- this.center = Math.floor((this.offset + this.dim / 2) / this.dim),
- r = -(a = (o = this.offset - this.center * this.dim) < 0 ? 1 : -1) * o * 2 / this.dim,
- s = this.count >> 1,
- this.options.fullWidth ? h = "translateX(0)" : (h = "translateX(" + (this.el.clientWidth - this.itemWidth) / 2 + "px) ",
- h += "translateY(" + (this.el.clientHeight - this.itemHeight) / 2 + "px)"),
- this.showIndicators) {
- var p = this.center % this.count
- , v = this.$indicators.find(".indicator-item.active");
- v.index() !== p && (v.removeClass("active"),
- this.$indicators.find(".indicator-item").eq(p)[0].classList.add("active"))
+ }, {
+ key: "_createDragTarget",
+ value: function () {
+ var t = document.createElement("div");
+ t.classList.add("drag-target"),
+ document.body.appendChild(t),
+ this.dragTarget = t
+ }
+ }, {
+ key: "_preventBodyScrolling",
+ value: function () {
+ document.body.style.overflow = "hidden"
+ }
+ }, {
+ key: "_enableBodyScrolling",
+ value: function () {
+ document.body.style.overflow = ""
+ }
+ }, {
+ key: "open",
+ value: function () {
+ !0 !== this.isOpen && (this.isOpen = !0,
+ "function" == typeof this.options.onOpenStart && this.options.onOpenStart.call(this, this.el),
+ this.isFixed && window.innerWidth > 992 ? (e.remove(this.el),
+ e({
+ targets: this.el,
+ translateX: 0,
+ duration: 0,
+ easing: "easeOutQuad"
+ }),
+ this._enableBodyScrolling(),
+ this._overlay.style.display = "none") : (this._preventBodyScrolling(),
+ this.isDragged && 1 == this.percentOpen || this._animateIn()))
+ }
+ }, {
+ key: "close",
+ value: function () {
+ if (!1 !== this.isOpen)
+ if (this.isOpen = !1,
+ "function" == typeof this.options.onCloseStart && this.options.onCloseStart.call(this, this.el),
+ this.isFixed && window.innerWidth > 992) {
+ var t = "left" === this.options.edge ? "-105%" : "105%";
+ this.el.style.transform = "translateX(" + t + ")"
+ } else
+ this._enableBodyScrolling(),
+ this.isDragged && 0 == this.percentOpen ? this._overlay.style.display = "none" : this._animateOut()
+ }
+ }, {
+ key: "_animateIn",
+ value: function () {
+ this._animateSidenavIn(),
+ this._animateOverlayIn()
+ }
+ }, {
+ key: "_animateSidenavIn",
+ value: function () {
+ var t = this,
+ i = "left" === this.options.edge ? -1 : 1;
+ this.isDragged && (i = "left" === this.options.edge ? i + this.percentOpen : i - this.percentOpen),
+ e.remove(this.el),
+ e({
+ targets: this.el,
+ translateX: [100 * i + "%", 0],
+ duration: this.options.inDuration,
+ easing: "easeOutQuad",
+ complete: function () {
+ "function" == typeof t.options.onOpenEnd && t.options.onOpenEnd.call(t, t.el)
+ }
+ })
+ }
+ }, {
+ key: "_animateOverlayIn",
+ value: function () {
+ var i = 0;
+ this.isDragged ? i = this.percentOpen : t(this._overlay).css({
+ display: "block"
+ }),
+ e.remove(this._overlay),
+ e({
+ targets: this._overlay,
+ opacity: [i, 1],
+ duration: this.options.inDuration,
+ easing: "easeOutQuad"
+ })
+ }
+ }, {
+ key: "_animateOut",
+ value: function () {
+ this._animateSidenavOut(),
+ this._animateOverlayOut()
+ }
+ }, {
+ key: "_animateSidenavOut",
+ value: function () {
+ var t = this,
+ i = "left" === this.options.edge ? -1 : 1,
+ n = 0;
+ this.isDragged && (n = "left" === this.options.edge ? i + this.percentOpen : i - this.percentOpen),
+ e.remove(this.el),
+ e({
+ targets: this.el,
+ translateX: [100 * n + "%", 105 * i + "%"],
+ duration: this.options.outDuration,
+ easing: "easeOutQuad",
+ complete: function () {
+ "function" == typeof t.options.onCloseEnd && t.options.onCloseEnd.call(t, t.el)
+ }
+ })
+ }
+ }, {
+ key: "_animateOverlayOut",
+ value: function () {
+ var i = this;
+ e.remove(this._overlay),
+ e({
+ targets: this._overlay,
+ opacity: 0,
+ duration: this.options.outDuration,
+ easing: "easeOutQuad",
+ complete: function () {
+ t(i._overlay).css("display", "none")
+ }
+ })
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Sidenav
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ s
+ }();
+ n._sidenavs = [],
+ window.M.Sidenav = n,
+ M.jQueryLoaded && M.initializeJqueryWrapper(n, "sidenav", "M_Sidenav")
+ }(cash, M.anime),
+ function (t, e) {
+ "use strict";
+ var i = {
+ throttle: 100,
+ scrollOffset: 200,
+ activeClass: "active",
+ getActiveElement: function (t) {
+ return 'a[href="#' + t + '"]'
}
- for ((!this.noWrap || this.center >= 0 && this.center < this.count) && (l = this.images[this._wrap(this.center)],
- t(l).hasClass("active") || (this.$el.find(".carousel-item").removeClass("active"),
- l.classList.add("active")),
- l.style[this.xform] = h + " translateX(" + -o / 2 + "px) translateX(" + a * this.options.shift * r * n + "px) translateZ(" + this.options.dist * r + "px)",
- l.style.zIndex = 0,
- u = this.options.fullWidth ? 1 : 1 - .2 * r,
- l.style.opacity = u,
- l.style.visibility = "visible"),
- n = 1; n <= s; ++n)
- this.options.fullWidth ? (d = this.options.dist,
- u = n === s && o < 0 ? 1 - r : 1) : (d = this.options.dist * (2 * n + r * a),
- u = 1 - .2 * (2 * n + r * a)),
- (!this.noWrap || this.center + n < this.count) && ((l = this.images[this._wrap(this.center + n)]).style[this.xform] = h + " translateX(" + (this.options.shift + (this.dim * n - o) / 2) + "px) translateZ(" + d + "px)",
- l.style.zIndex = -n,
- l.style.opacity = u,
- l.style.visibility = "visible"),
- this.options.fullWidth ? (d = this.options.dist,
- u = n === s && o > 0 ? 1 - r : 1) : (d = this.options.dist * (2 * n - r * a),
- u = 1 - .2 * (2 * n - r * a)),
- (!this.noWrap || this.center - n >= 0) && ((l = this.images[this._wrap(this.center - n)]).style[this.xform] = h + " translateX(" + (-this.options.shift + (-this.dim * n - o) / 2) + "px) translateZ(" + d + "px)",
- l.style.zIndex = -n,
- l.style.opacity = u,
- l.style.visibility = "visible");
- (!this.noWrap || this.center >= 0 && this.center < this.count) && ((l = this.images[this._wrap(this.center)]).style[this.xform] = h + " translateX(" + -o / 2 + "px) translateX(" + a * this.options.shift * r + "px) translateZ(" + this.options.dist * r + "px)",
- l.style.zIndex = 0,
- u = this.options.fullWidth ? 1 : 1 - .2 * r,
- l.style.opacity = u,
- l.style.visibility = "visible");
- var f = this.$el.find(".carousel-item").eq(this._wrap(this.center));
- c !== this.center && "function" == typeof this.options.onCycleTo && this.options.onCycleTo.call(this, f[0], this.dragged),
- "function" == typeof this.oneTimeCallback && (this.oneTimeCallback.call(this, f[0], this.dragged),
- this.oneTimeCallback = null)
- }
- }, {
- key: "_cycleTo",
- value: function(t, e) {
- var i = this.center % this.count - t;
- this.noWrap || (i < 0 ? Math.abs(i + this.count) < Math.abs(i) && (i += this.count) : i > 0 && Math.abs(i - this.count) < i && (i -= this.count)),
- this.target = this.dim * Math.round(this.offset / this.dim),
- i < 0 ? this.target += this.dim * Math.abs(i) : i > 0 && (this.target -= this.dim * i),
- "function" == typeof e && (this.oneTimeCallback = e),
- this.offset !== this.target && (this.amplitude = this.target - this.offset,
- this.timestamp = Date.now(),
- requestAnimationFrame(this._autoScrollBound))
- }
- }, {
- key: "next",
- value: function(t) {
- (void 0 === t || isNaN(t)) && (t = 1);
- var e = this.center + t;
- if (e > this.count || e < 0) {
- if (this.noWrap)
- return;
- e = this._wrap(e)
+ },
+ n = function (n) {
+ _inherits(s, Component);
+
+ function s(e, i) {
+ _classCallCheck(this, s);
+ var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
+ return n.el.M_ScrollSpy = n,
+ n.options = t.extend({}, s.defaults, i),
+ s._elements.push(n),
+ s._count++,
+ s._increment++,
+ n.tickId = -1,
+ n.id = s._increment,
+ n._setupEventHandlers(),
+ n._handleWindowScroll(),
+ n
}
- this._cycleTo(e)
- }
- }, {
- key: "prev",
- value: function(t) {
- (void 0 === t || isNaN(t)) && (t = 1);
- var e = this.center - t;
- if (e > this.count || e < 0) {
- if (this.noWrap)
- return;
- e = this._wrap(e)
+ return _createClass(s, [{
+ key: "destroy",
+ value: function () {
+ s._elements.splice(s._elements.indexOf(this), 1),
+ s._elementsInView.splice(s._elementsInView.indexOf(this), 1),
+ s._visibleElements.splice(s._visibleElements.indexOf(this.$el), 1),
+ s._count--,
+ this._removeEventHandlers(),
+ t(this.options.getActiveElement(this.$el.attr("id"))).removeClass(this.options.activeClass),
+ this.el.M_ScrollSpy = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ var t = M.throttle(this._handleWindowScroll, 200);
+ this._handleThrottledResizeBound = t.bind(this),
+ this._handleWindowScrollBound = this._handleWindowScroll.bind(this),
+ 1 === s._count && (window.addEventListener("scroll", this._handleWindowScrollBound),
+ window.addEventListener("resize", this._handleThrottledResizeBound),
+ document.body.addEventListener("click", this._handleTriggerClick))
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ 0 === s._count && (window.removeEventListener("scroll", this._handleWindowScrollBound),
+ window.removeEventListener("resize", this._handleThrottledResizeBound),
+ document.body.removeEventListener("click", this._handleTriggerClick))
+ }
+ }, {
+ key: "_handleTriggerClick",
+ value: function (i) {
+ for (var n = t(i.target), o = s._elements.length - 1; o >= 0; o--) {
+ var a = s._elements[o];
+ if (n.is('a[href="#' + a.$el.attr("id") + '"]')) {
+ i.preventDefault();
+ var r = a.$el.offset().top + 1;
+ e({
+ targets: [document.documentElement, document.body],
+ scrollTop: r - a.options.scrollOffset,
+ duration: 400,
+ easing: "easeOutCubic"
+ });
+ break
+ }
+ }
+ }
+ }, {
+ key: "_handleWindowScroll",
+ value: function () {
+ s._ticks++;
+ for (var t = M.getDocumentScrollTop(), e = M.getDocumentScrollLeft(), i = e + window.innerWidth, n = t + window.innerHeight, o = s._findElements(t, i, n, e), a = 0; a < o.length; a++) {
+ var r = o[a];
+ r.tickId < 0 && r._enter(),
+ r.tickId = s._ticks
+ }
+ for (var l = 0; l < s._elementsInView.length; l++) {
+ var h = s._elementsInView[l],
+ d = h.tickId;
+ d >= 0 && d !== s._ticks && (h._exit(),
+ h.tickId = -1)
+ }
+ s._elementsInView = o
+ }
+ }, {
+ key: "_enter",
+ value: function () {
+ s._visibleElements = s._visibleElements.filter(function (t) {
+ return 0 != t.height()
+ }),
+ s._visibleElements[0] ? (t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),
+ s._visibleElements[0][0].M_ScrollSpy && this.id < s._visibleElements[0][0].M_ScrollSpy.id ? s._visibleElements.unshift(this.$el) : s._visibleElements.push(this.$el)) : s._visibleElements.push(this.$el),
+ t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).addClass(this.options.activeClass)
+ }
+ }, {
+ key: "_exit",
+ value: function () {
+ var e = this;
+ s._visibleElements = s._visibleElements.filter(function (t) {
+ return 0 != t.height()
+ }),
+ s._visibleElements[0] && (t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).removeClass(this.options.activeClass),
+ s._visibleElements = s._visibleElements.filter(function (t) {
+ return t.attr("id") != e.$el.attr("id")
+ }),
+ s._visibleElements[0] && t(this.options.getActiveElement(s._visibleElements[0].attr("id"))).addClass(this.options.activeClass))
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_ScrollSpy
+ }
+ }, {
+ key: "_findElements",
+ value: function (t, e, i, n) {
+ for (var o = [], a = 0; a < s._elements.length; a++) {
+ var r = s._elements[a],
+ l = t + r.options.scrollOffset || 200;
+ if (r.$el.height() > 0) {
+ var h = r.$el.offset().top,
+ d = r.$el.offset().left,
+ u = d + r.$el.width(),
+ c = h + r.$el.height();
+ !(d > e || u < n || h > i || c < l) && o.push(r)
+ }
+ }
+ return o
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ s
+ }();
+ n._elements = [],
+ n._elementsInView = [],
+ n._visibleElements = [],
+ n._count = 0,
+ n._increment = 0,
+ n._ticks = 0,
+ M.ScrollSpy = n,
+ M.jQueryLoaded && M.initializeJqueryWrapper(n, "scrollSpy", "M_ScrollSpy")
+ }(cash, M.anime),
+ function (t) {
+ "use strict";
+ var e = {
+ data: {},
+ limit: 1 / 0,
+ onAutocomplete: null,
+ minLength: 1,
+ sortFunction: function (t, e, i) {
+ return t.indexOf(i) - e.indexOf(i)
}
- this._cycleTo(e)
- }
- }, {
- key: "set",
- value: function(t, e) {
- if ((void 0 === t || isNaN(t)) && (t = 0),
- t > this.count || t < 0) {
- if (this.noWrap)
- return;
- t = this._wrap(t)
+ },
+ i = function (i) {
+ _inherits(n, Component);
+
+ function n(e, i) {
+ _classCallCheck(this, n);
+ var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
+ return s.el.M_Autocomplete = s,
+ s.options = t.extend({}, n.defaults, i),
+ s.isOpen = !1,
+ s.count = 0,
+ s.activeIndex = -1,
+ s.oldVal,
+ s.$inputField = s.$el.closest(".input-field"),
+ s.$active = t(),
+ s._setupDropdown(),
+ s._setupEventHandlers(),
+ s
}
- this._cycleTo(t, e)
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Carousel
- }
- }, {
- key: "defaults",
- get: function() {
- return e
- }
- }]),
- n
- }();
- M.Carousel = i,
- M.jQueryLoaded && M.initializeJqueryWrapper(i, "carousel", "M_Carousel")
-}(cash),
-function(t) {
- "use strict";
- var e = {
- onOpen: void 0,
- onClose: void 0
- }
- , i = function(i) {
- _inherits(n, Component);
- function n(e, i) {
- _classCallCheck(this, n);
- var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
- return s.el.M_FeatureDiscovery = s,
- s.options = t.extend({}, n.defaults, i),
- s.isOpen = !1,
- s.$origin = t("#" + s.$el.attr("data-target")),
- s._setup(),
- s._calculatePositioning(),
- s._setupEventHandlers(),
- s
- }
- return _createClass(n, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this.el.FeatureDiscovery = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleDocumentClickBound = this._handleDocumentClick.bind(this),
- this._handleTargetClickBound = this._handleTargetClick.bind(this),
- this._handleOriginClickBound = this._handleOriginClick.bind(this),
- this.el.addEventListener("click", this._handleTargetClickBound),
- this.originEl.addEventListener("click", this._handleOriginClickBound);
- var t = M.throttle(this._handleResize, 200);
- this._handleThrottledResizeBound = t.bind(this),
- window.addEventListener("resize", this._handleThrottledResizeBound)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.el.removeEventListener("click", this._handleTargetClickBound),
- this.originEl.removeEventListener("click", this._handleOriginClickBound),
- window.removeEventListener("resize", this._handleThrottledResizeBound)
- }
- }, {
- key: "_handleTargetClick",
- value: function(t) {
- this.open()
- }
- }, {
- key: "_handleOriginClick",
- value: function(t) {
- this.close()
- }
- }, {
- key: "_handleResize",
- value: function(t) {
- this._calculatePositioning()
- }
- }, {
- key: "_handleDocumentClick",
- value: function(e) {
- t(e.target).closest(".tap-target-wrapper").length || (this.close(),
- e.preventDefault(),
- e.stopPropagation())
- }
- }, {
- key: "_setup",
- value: function() {
- this.wrapper = this.$el.parent()[0],
- this.waveEl = t(this.wrapper).find(".tap-target-wave")[0],
- this.originEl = t(this.wrapper).find(".tap-target-origin")[0],
- this.contentEl = this.$el.find(".tap-target-content")[0],
- t(this.wrapper).hasClass(".tap-target-wrapper") || (this.wrapper = document.createElement("div"),
- this.wrapper.classList.add("tap-target-wrapper"),
- this.$el.before(t(this.wrapper)),
- this.wrapper.append(this.el)),
- this.contentEl || (this.contentEl = document.createElement("div"),
- this.contentEl.classList.add("tap-target-content"),
- this.$el.append(this.contentEl)),
- this.waveEl || (this.waveEl = document.createElement("div"),
- this.waveEl.classList.add("tap-target-wave"),
- this.originEl || (this.originEl = this.$origin.clone(!0, !0),
- this.originEl.addClass("tap-target-origin"),
- this.originEl.removeAttr("id"),
- this.originEl.removeAttr("style"),
- this.originEl = this.originEl[0],
- this.waveEl.append(this.originEl)),
- this.wrapper.append(this.waveEl))
- }
- }, {
- key: "_calculatePositioning",
- value: function() {
- var e = "fixed" === this.$origin.css("position");
- if (!e)
- for (var i = this.$origin.parents(), n = 0; n < i.length && !(e = "fixed" == t(i[n]).css("position")); n++)
- ;
- var s = this.$origin.outerWidth()
- , o = this.$origin.outerHeight()
- , a = e ? this.$origin.offset().top - M.getDocumentScrollTop() : this.$origin.offset().top
- , r = e ? this.$origin.offset().left - M.getDocumentScrollLeft() : this.$origin.offset().left
- , l = window.innerWidth
- , h = window.innerHeight
- , d = l / 2
- , u = h / 2
- , c = r <= d
- , p = r > d
- , v = a <= u
- , f = a > u
- , m = r >= .25 * l && r <= .75 * l
- , g = this.$el.outerWidth()
- , _ = this.$el.outerHeight()
- , y = a + o / 2 - _ / 2
- , k = r + s / 2 - g / 2
- , b = e ? "fixed" : "absolute"
- , w = m ? g : g / 2 + s
- , C = _ / 2
- , E = v ? _ / 2 : 0
- , x = c && !m ? g / 2 - s : 0
- , L = s
- , T = f ? "bottom" : "top"
- , O = 2 * s
- , $ = O
- , D = _ / 2 - $ / 2
- , B = g / 2 - O / 2
- , I = {};
- I.top = v ? y + "px" : "",
- I.right = p ? l - k - g + "px" : "",
- I.bottom = f ? h - y - _ + "px" : "",
- I.left = c ? k + "px" : "",
- I.position = b,
- t(this.wrapper).css(I),
- t(this.contentEl).css({
- width: w + "px",
- height: C + "px",
- top: E + "px",
- right: "0px",
- bottom: "0px",
- left: x + "px",
- padding: L + "px",
- verticalAlign: T
- }),
- t(this.waveEl).css({
- top: D + "px",
- left: B + "px",
- width: O + "px",
- height: $ + "px"
+ return _createClass(n, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this._removeDropdown(),
+ this.el.M_Autocomplete = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleInputBlurBound = this._handleInputBlur.bind(this),
+ this._handleInputKeyupAndFocusBound = this._handleInputKeyupAndFocus.bind(this),
+ this._handleInputKeydownBound = this._handleInputKeydown.bind(this),
+ this._handleContainerMousedownAndTouchstartBound = this._handleContainerMousedownAndTouchstart.bind(this),
+ this.el.addEventListener("blur", this._handleInputBlurBound),
+ this.el.addEventListener("keyup", this._handleInputKeyupAndFocusBound),
+ this.el.addEventListener("focus", this._handleInputKeyupAndFocusBound),
+ this.el.addEventListener("keydown", this._handleInputKeydownBound),
+ this.container.addEventListener("mousedown", this._handleContainerMousedownAndTouchstartBound),
+ void 0 !== window.ontouchstart && this.container.addEventListener("touchstart", this._handleContainerMousedownAndTouchstartBound)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.el.removeEventListener("blur", this._handleInputBlurBound),
+ this.el.removeEventListener("keyup", this._handleInputKeyupAndFocusBound),
+ this.el.removeEventListener("focus", this._handleInputKeyupAndFocusBound),
+ this.el.removeEventListener("keydown", this._handleInputKeydownBound),
+ this.container.removeEventListener("mousedown", this._handleContainerMousedownAndTouchstartBound),
+ void 0 !== window.ontouchstart && this.container.removeEventListener("touchstart", this._handleContainerMousedownAndTouchstartBound)
+ }
+ }, {
+ key: "_setupDropdown",
+ value: function () {
+ this.container = document.createElement("ul"),
+ t(this.container).addClass("autocomplete-content dropdown-content"),
+ this.$inputField.append(this.container)
+ }
+ }, {
+ key: "_removeDropdown",
+ value: function () {
+ this.container.parentNode.removeChild(this.container)
+ }
+ }, {
+ key: "_handleInputBlur",
+ value: function () {
+ this._removeAutocomplete()
+ }
+ }, {
+ key: "_handleInputKeyupAndFocus",
+ value: function (t) {
+ "keyup" === t.type && (n._keydown = !1),
+ this.count = 0;
+ var e = this.el.value.toLowerCase();
+ 13 !== t.keyCode && 38 !== t.keyCode && 40 !== t.keyCode && (this.oldVal !== e && (this._removeAutocomplete(),
+ e.length >= this.options.minLength && (this.isOpen = !0,
+ this._renderDropdown(this.options.data, e))),
+ this.oldVal = e)
+ }
+ }, {
+ key: "_handleInputKeydown",
+ value: function (e) {
+ n._keydown = !0;
+ var i = e.keyCode,
+ s = void 0,
+ o = t(this.container).children("li").length;
+ 13 === i && this.activeIndex >= 0 ? (s = t(this.container).children("li").eq(this.activeIndex)).length && (this.selectOption(s),
+ e.preventDefault()) : 38 !== i && 40 !== i || (e.preventDefault(),
+ 38 === i && this.activeIndex > 0 && this.activeIndex--,
+ 40 === i && this.activeIndex < o - 1 && this.activeIndex++,
+ this.$active.removeClass("active"),
+ this.activeIndex >= 0 && (this.$active = t(this.container).children("li").eq(this.activeIndex),
+ this.$active.addClass("active")))
+ }
+ }, {
+ key: "_handleContainerMousedownAndTouchstart",
+ value: function (e) {
+ var i = t(e.target).closest("li");
+ this.selectOption(i)
+ }
+ }, {
+ key: "_highlight",
+ value: function (t, e) {
+ var i = e.find("img"),
+ n = e.text().toLowerCase().indexOf("" + t.toLowerCase()),
+ s = n + t.length - 1,
+ o = e.text().slice(0, n),
+ a = e.text().slice(n, s + 1),
+ r = e.text().slice(s + 1);
+ e.html("
" + o + "" + a + " " + r + " "),
+ i.length && e.prepend(i)
+ }
+ }, {
+ key: "_resetCurrentElement",
+ value: function () {
+ this.activeIndex = -1,
+ this.$active.removeClass("active")
+ }
+ }, {
+ key: "_removeAutocomplete",
+ value: function () {
+ t(this.container).empty(),
+ this._resetCurrentElement(),
+ this.oldVal = null,
+ this.isOpen = !1
+ }
+ }, {
+ key: "selectOption",
+ value: function (t) {
+ var e = t.text().trim();
+ this.el.value = e,
+ this.$el.trigger("change"),
+ this._removeAutocomplete(),
+ "function" == typeof this.options.onAutocomplete && this.options.onAutocomplete.call(this, e)
+ }
+ }, {
+ key: "_renderDropdown",
+ value: function (e, i) {
+ var n = this;
+ this._removeAutocomplete();
+ var s = [];
+ for (var o in e)
+ if (e.hasOwnProperty(o) && -1 !== o.toLowerCase().indexOf(i)) {
+ if (this.count >= this.options.limit)
+ break;
+ var a = {
+ data: e[o],
+ key: o
+ };
+ s.push(a),
+ this.count++
+ }
+ s.sort(function (t, e) {
+ return n.options.sortFunction(t.key.toLowerCase(), e.key.toLowerCase(), i.toLowerCase())
+ });
+ for (var r = 0; r < s.length; r++) {
+ var l = s[r],
+ h = t("
");
+ l.data ? h.append('
' + l.key + " ") : h.append("
" + l.key + " "),
+ t(this.container).append(h),
+ this._highlight(i, h)
+ }
+ }
+ }, {
+ key: "updateData",
+ value: function (t) {
+ var e = this.el.value.toLowerCase();
+ this.options.data = t,
+ this.isOpen && this._renderDropdown(t, e)
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Autocomplete
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return e
+ }
+ }]),
+ n
+ }();
+ i._keydown = !1,
+ M.Autocomplete = i,
+ M.jQueryLoaded && M.initializeJqueryWrapper(i, "autocomplete", "M_Autocomplete")
+ }(cash),
+ function (t) {
+ M.updateTextFields = function () {
+ t("input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea").each(function (e, i) {
+ var n = t(this);
+ e.value.length > 0 || t(e).is(":focus") || e.autofocus || null !== n.attr("placeholder") ? n.siblings("label").addClass("active") : e.validity ? n.siblings("label").toggleClass("active", !0 === e.validity.badInput) : n.siblings("label").removeClass("active")
})
+ },
+ M.validate_field = function (t) {
+ var e = null !== t.attr("data-length"),
+ i = parseInt(t.attr("data-length")),
+ n = t[0].value.length;
+ 0 !== n || !1 !== t[0].validity.badInput || t.is(":required") ? t.hasClass("validate") && (t.is(":valid") && e && n <= i || t.is(":valid") && !e ? (t.removeClass("invalid"),
+ t.addClass("valid")) : (t.removeClass("valid"),
+ t.addClass("invalid"))) : t.hasClass("validate") && (t.removeClass("valid"),
+ t.removeClass("invalid"))
+ },
+ M.textareaAutoResize = function (e) {
+ e instanceof Element && (e = t(e));
+ var i = t(".hiddendiv").first();
+ i.length || (i = t('
'),
+ t("body").append(i));
+ var n = e.css("font-family"),
+ s = e.css("font-size"),
+ o = e.css("line-height"),
+ a = e.css("padding-top"),
+ r = e.css("padding-right"),
+ l = e.css("padding-bottom"),
+ h = e.css("padding-left");
+ s && i.css("font-size", s),
+ n && i.css("font-family", n),
+ o && i.css("line-height", o),
+ a && i.css("padding-top", a),
+ r && i.css("padding-right", r),
+ l && i.css("padding-bottom", l),
+ h && i.css("padding-left", h),
+ e.data("original-height") || e.data("original-height", e.height()),
+ "off" === e.attr("wrap") && i.css("overflow-wrap", "normal").css("white-space", "pre"),
+ i.text(e[0].value + "\n");
+ var d = i.html().replace(/\n/g, "
");
+ i.html(d),
+ "hidden" !== e.css("display") ? i.css("width", e.width() + "px") : i.css("width", t(window).width() / 2 + "px"),
+ e.data("original-height") <= i.innerHeight() ? e.css("height", i.innerHeight() + "px") : e[0].value.length < e.data("previous-length") && e.css("height", e.data("original-height") + "px"),
+ e.data("previous-length", e[0].value.length)
+ },
+ t(document).ready(function () {
+ var e = "input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea";
+ t(document).on("change", e, function () {
+ 0 === this.value.length && null === t(this).attr("placeholder") || t(this).siblings("label").addClass("active"),
+ M.validate_field(t(this))
+ }),
+ t(document).ready(function () {
+ M.updateTextFields()
+ }),
+ t(document).on("reset", function (i) {
+ var n = t(i.target);
+ n.is("form") && (n.find(e).removeClass("valid").removeClass("invalid"),
+ n.find(e).each(function (e) {
+ this.value.length && t(this).siblings("label").removeClass("active")
+ }),
+ setTimeout(function () {
+ n.find("select").each(function () {
+ if (this.M_Select) {
+ var e = t(this).find("option[selected]").text();
+ t(this).siblings("input.select-dropdown")[0].value = e
+ }
+ })
+ }, 0))
+ }),
+ document.addEventListener("focus", function (i) {
+ t(i.target).is(e) && t(i.target).siblings("label, .prefix").addClass("active")
+ }, !0),
+ document.addEventListener("blur", function (i) {
+ var n = t(i.target);
+ if (n.is(e)) {
+ var s = ".prefix";
+ 0 === n[0].value.length && !0 !== n[0].validity.badInput && null === n.attr("placeholder") && (s += ", label"),
+ n.siblings(s).removeClass("active"),
+ M.validate_field(n)
+ }
+ }, !0);
+ t(document).on("keyup", "input[type=radio], input[type=checkbox]", function (e) {
+ if (e.which !== M.keys.TAB)
+ ;
+ else {
+ t(this).addClass("tabbed");
+ t(this).one("blur", function (e) {
+ t(this).removeClass("tabbed")
+ })
+ }
+ });
+ var i = ".materialize-textarea";
+ t(i).each(function () {
+ var e = t(this);
+ e.data("original-height", e.height()),
+ e.data("previous-length", this.value.length),
+ M.textareaAutoResize(e)
+ }),
+ t(document).on("keyup", i, function () {
+ M.textareaAutoResize(t(this))
+ }),
+ t(document).on("keydown", i, function () {
+ M.textareaAutoResize(t(this))
+ }),
+ t(document).on("change", '.file-field input[type="file"]', function () {
+ for (var e = t(this).closest(".file-field").find("input.file-path"), i = t(this)[0].files, n = [], s = 0; s < i.length; s++)
+ n.push(i[s].name);
+ e[0].value = n.join(", "),
+ e.trigger("change")
+ })
+ })
+ }(cash),
+ function (t, e) {
+ "use strict";
+ var i = {
+ indicators: !0,
+ height: 400,
+ duration: 500,
+ interval: 6e3
+ },
+ n = function (n) {
+ _inherits(s, Component);
+
+ function s(i, n) {
+ _classCallCheck(this, s);
+ var o = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, i, n));
+ return o.el.M_Slider = o,
+ o.options = t.extend({}, s.defaults, n),
+ o.$slider = o.$el.find(".slides"),
+ o.$slides = o.$slider.children("li"),
+ o.activeIndex = o.$slider.find(".active").index(),
+ -1 != o.activeIndex && (o.$active = o.$slides.eq(o.activeIndex)),
+ o._setSliderHeight(),
+ o.$slides.find(".caption").each(function (t) {
+ o._animateCaptionIn(t, 0)
+ }),
+ o.$slides.find("img").each(function (e) {
+ var i = "data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
+ t(e).attr("src") !== i && (t(e).css("background-image", 'url("' + t(e).attr("src") + '")'),
+ t(e).attr("src", i))
+ }),
+ o._setupIndicators(),
+ o.$active ? o.$active.css("display", "block") : (o.$slides.first().addClass("active"),
+ e({
+ targets: o.$slides.first()[0],
+ opacity: 1,
+ duration: o.options.duration,
+ easing: "easeOutQuad"
+ }),
+ o.activeIndex = 0,
+ o.$active = o.$slides.eq(o.activeIndex),
+ o.options.indicators && o.$indicators.eq(o.activeIndex).addClass("active")),
+ o.$active.find("img").each(function (t) {
+ e({
+ targets: o.$active.find(".caption")[0],
+ opacity: 1,
+ translateX: 0,
+ translateY: 0,
+ duration: o.options.duration,
+ easing: "easeOutQuad"
+ })
+ }),
+ o._setupEventHandlers(),
+ o.start(),
+ o
+ }
+ return _createClass(s, [{
+ key: "destroy",
+ value: function () {
+ this.pause(),
+ this._removeIndicators(),
+ this._removeEventHandlers(),
+ this.el.M_Slider = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ var t = this;
+ this._handleIntervalBound = this._handleInterval.bind(this),
+ this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this),
+ this.options.indicators && this.$indicators.each(function (e) {
+ e.addEventListener("click", t._handleIndicatorClickBound)
+ })
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ var t = this;
+ this.options.indicators && this.$indicators.each(function (e) {
+ e.removeEventListener("click", t._handleIndicatorClickBound)
+ })
+ }
+ }, {
+ key: "_handleIndicatorClick",
+ value: function (e) {
+ var i = t(e.target).index();
+ this.set(i)
+ }
+ }, {
+ key: "_handleInterval",
+ value: function () {
+ var t = this.$slider.find(".active").index();
+ this.$slides.length === t + 1 ? t = 0 : t += 1,
+ this.set(t)
+ }
+ }, {
+ key: "_animateCaptionIn",
+ value: function (i, n) {
+ var s = {
+ targets: i,
+ opacity: 0,
+ duration: n,
+ easing: "easeOutQuad"
+ };
+ t(i).hasClass("center-align") ? s.translateY = -100 : t(i).hasClass("right-align") ? s.translateX = 100 : t(i).hasClass("left-align") && (s.translateX = -100),
+ e(s)
+ }
+ }, {
+ key: "_setSliderHeight",
+ value: function () {
+ this.$el.hasClass("fullscreen") || (this.options.indicators ? this.$el.css("height", this.options.height + 40 + "px") : this.$el.css("height", this.options.height + "px"),
+ this.$slider.css("height", this.options.height + "px"))
+ }
+ }, {
+ key: "_setupIndicators",
+ value: function () {
+ var e = this;
+ this.options.indicators && (this.$indicators = t('
'),
+ this.$slides.each(function (i, n) {
+ var s = t('
');
+ e.$indicators.append(s[0])
+ }),
+ this.$el.append(this.$indicators[0]),
+ this.$indicators = this.$indicators.children("li.indicator-item"))
+ }
+ }, {
+ key: "_removeIndicators",
+ value: function () {
+ this.$el.find("ul.indicators").remove()
+ }
+ }, {
+ key: "set",
+ value: function (t) {
+ var i = this;
+ if (t >= this.$slides.length ? t = 0 : t < 0 && (t = this.$slides.length - 1),
+ this.activeIndex != t) {
+ this.$active = this.$slides.eq(this.activeIndex);
+ var n = this.$active.find(".caption");
+ this.$active.removeClass("active"),
+ e({
+ targets: this.$active[0],
+ opacity: 0,
+ duration: this.options.duration,
+ easing: "easeOutQuad",
+ complete: function () {
+ i.$slides.not(".active").each(function (t) {
+ e({
+ targets: t,
+ opacity: 0,
+ translateX: 0,
+ translateY: 0,
+ duration: 0,
+ easing: "easeOutQuad"
+ })
+ })
+ }
+ }),
+ this._animateCaptionIn(n[0], this.options.duration),
+ this.options.indicators && (this.$indicators.eq(this.activeIndex).removeClass("active"),
+ this.$indicators.eq(t).addClass("active")),
+ e({
+ targets: this.$slides.eq(t)[0],
+ opacity: 1,
+ duration: this.options.duration,
+ easing: "easeOutQuad"
+ }),
+ e({
+ targets: this.$slides.eq(t).find(".caption")[0],
+ opacity: 1,
+ translateX: 0,
+ translateY: 0,
+ duration: this.options.duration,
+ delay: this.options.duration,
+ easing: "easeOutQuad"
+ }),
+ this.$slides.eq(t).addClass("active"),
+ this.activeIndex = t,
+ this.start()
+ }
+ }
+ }, {
+ key: "pause",
+ value: function () {
+ clearInterval(this.interval)
+ }
+ }, {
+ key: "start",
+ value: function () {
+ clearInterval(this.interval),
+ this.interval = setInterval(this._handleIntervalBound, this.options.duration + this.options.interval)
+ }
+ }, {
+ key: "next",
+ value: function () {
+ var t = this.activeIndex + 1;
+ t >= this.$slides.length ? t = 0 : t < 0 && (t = this.$slides.length - 1),
+ this.set(t)
+ }
+ }, {
+ key: "prev",
+ value: function () {
+ var t = this.activeIndex - 1;
+ t >= this.$slides.length ? t = 0 : t < 0 && (t = this.$slides.length - 1),
+ this.set(t)
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Slider
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ s
+ }();
+ M.Slider = n,
+ M.jQueryLoaded && M.initializeJqueryWrapper(n, "slider", "M_Slider")
+ }(cash, M.anime),
+ function (t, e) {
+ t(document).on("click", ".card", function (i) {
+ if (t(this).children(".card-reveal").length) {
+ var n = t(i.target).closest(".card");
+ void 0 === n.data("initialOverflow") && n.data("initialOverflow", void 0 === n.css("overflow") ? "" : n.css("overflow"));
+ var s = t(this).find(".card-reveal");
+ t(i.target).is(t(".card-reveal .card-title")) || t(i.target).is(t(".card-reveal .card-title i")) ? e({
+ targets: s[0],
+ translateY: 0,
+ duration: 225,
+ easing: "easeInOutQuad",
+ complete: function (e) {
+ var i = e.animatables[0].target;
+ t(i).css({
+ display: "none"
+ }),
+ n.css("overflow", n.data("initialOverflow"))
+ }
+ }) : (t(i.target).is(t(".card .activator")) || t(i.target).is(t(".card .activator i"))) && (n.css("overflow", "hidden"),
+ s.css({
+ display: "block"
+ }),
+ e({
+ targets: s[0],
+ translateY: "-100%",
+ duration: 300,
+ easing: "easeInOutQuad"
+ }))
}
- }, {
- key: "open",
- value: function() {
- this.isOpen || ("function" == typeof this.options.onOpen && this.options.onOpen.call(this, this.$origin[0]),
- this.isOpen = !0,
- this.wrapper.classList.add("open"),
- document.body.addEventListener("click", this._handleDocumentClickBound, !0),
- document.body.addEventListener("touchend", this._handleDocumentClickBound))
- }
- }, {
- key: "close",
- value: function() {
- this.isOpen && ("function" == typeof this.options.onClose && this.options.onClose.call(this, this.$origin[0]),
- this.isOpen = !1,
- this.wrapper.classList.remove("open"),
- document.body.removeEventListener("click", this._handleDocumentClickBound, !0),
- document.body.removeEventListener("touchend", this._handleDocumentClickBound))
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_FeatureDiscovery
- }
- }, {
- key: "defaults",
- get: function() {
- return e
- }
- }]),
- n
- }();
- M.FeatureDiscovery = i,
- M.jQueryLoaded && M.initializeJqueryWrapper(i, "featureDiscovery", "M_FeatureDiscovery")
-}(cash),
-function(t) {
- "use strict";
- var e = {
- classes: ""
- }
- , i = function(i) {
- _inherits(n, Component);
- function n(e, i) {
- _classCallCheck(this, n);
- var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
- return s.el.M_Select = s,
- s.options = t.extend({}, n.defaults, i),
- s.isMultiple = s.$el.prop("multiple"),
- s._keysSelected = {},
- s._valueDict = {},
- s._setupDropdown(),
- s._setupEventHandlers(),
- s
- }
- return _createClass(n, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this._removeDropdown(),
- this.el.M_Select = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- var e = this;
- this._handleSelectChangeBound = this._handleSelectChange.bind(this),
- this._handleOptionClickBound = this._handleOptionClick.bind(this),
- this._handleInputClickBound = this._handleInputClick.bind(this),
- t(this.dropdownOptions).find("li:not(.optgroup)").each(function(t) {
- t.addEventListener("click", e._handleOptionClickBound)
- }),
- this.el.addEventListener("change", this._handleSelectChangeBound),
- this.input.addEventListener("click", this._handleInputClickBound)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- var e = this;
- t(this.dropdownOptions).find("li:not(.optgroup)").each(function(t) {
- t.removeEventListener("click", e._handleOptionClickBound)
- }),
- this.el.removeEventListener("change", this._handleSelectChangeBound),
- this.input.removeEventListener("click", this._handleInputClickBound),
- this.input.removeEventListener("focus", this._handleInputFocusBound)
- }
- }, {
- key: "_handleSelectChange",
- value: function(t) {
- this._setValueToInput()
- }
- }, {
- key: "_handleOptionClick",
- value: function(e) {
- e.preventDefault();
- var i = t(e.target).closest("li")[0]
- , n = i.id;
- if (!t(i).hasClass("disabled") && !t(i).hasClass("optgroup") && n.length) {
- var s = !0;
- if (this.isMultiple) {
- var o = t(this.dropdownOptions).find("li.disabled.selected");
- o.length && (o.removeClass("selected"),
- o.find('input[type="checkbox"]').prop("checked", !1),
- this._toggleEntryFromArray(o[0].id));
- var a = t(i).find('input[type="checkbox"]');
- a.prop("checked", !a.prop("checked")),
- s = this._toggleEntryFromArray(n)
- } else
- t(this.dropdownOptions).find("li").removeClass("active"),
- t(i).toggleClass("active"),
- this.input.value = i.textContent;
- this._activateOption(t(this.dropdownOptions), i),
- t(this._valueDict[n].el).prop("selected", s),
- this.$el.trigger("change")
+ })
+ }(cash, M.anime),
+ function (t) {
+ "use strict";
+ var e = {
+ data: [],
+ placeholder: "",
+ secondaryPlaceholder: "",
+ autocompleteOptions: {},
+ limit: 1 / 0,
+ onChipAdd: null,
+ onChipSelect: null,
+ onChipDelete: null
+ },
+ i = function (i) {
+ _inherits(n, Component);
+
+ function n(e, i) {
+ _classCallCheck(this, n);
+ var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
+ return s.el.M_Chips = s,
+ s.options = t.extend({}, n.defaults, i),
+ s.$el.addClass("chips input-field"),
+ s.chipsData = [],
+ s.$chips = t(),
+ s._setupInput(),
+ s.hasAutocomplete = Object.keys(s.options.autocompleteOptions).length > 0,
+ s.$input.attr("id") || s.$input.attr("id", M.guid()),
+ s.options.data.length && (s.chipsData = s.options.data,
+ s._renderChips(s.chipsData)),
+ s.hasAutocomplete && s._setupAutocomplete(),
+ s._setPlaceholder(),
+ s._setupLabel(),
+ s._setupEventHandlers(),
+ s
}
- e.stopPropagation()
- }
- }, {
- key: "_handleInputClick",
- value: function() {
- this.dropdown && this.dropdown.isOpen && (this._setValueToInput(),
- this._setSelectedStates())
- }
- }, {
- key: "_setupDropdown",
- value: function() {
- var e = this;
- this.wrapper = document.createElement("div"),
- t(this.wrapper).addClass("select-wrapper " + this.options.classes),
- this.$el.before(t(this.wrapper)),
- this.wrapper.appendChild(this.el),
- this.el.disabled && this.wrapper.classList.add("disabled"),
- this.$selectOptions = this.$el.children("option, optgroup"),
- this.dropdownOptions = document.createElement("ul"),
- this.dropdownOptions.id = "select-options-" + M.guid(),
- t(this.dropdownOptions).addClass("dropdown-content select-dropdown " + (this.isMultiple ? "multiple-select-dropdown" : "")),
- this.$selectOptions.length && this.$selectOptions.each(function(i) {
- if (t(i).is("option")) {
- var n = void 0;
- n = e.isMultiple ? e._appendOptionWithIcon(e.$el, i, "multiple") : e._appendOptionWithIcon(e.$el, i),
- e._addOptionToValueDict(i, n)
- } else if (t(i).is("optgroup")) {
- var s = t(i).children("option");
- t(e.dropdownOptions).append(t('
' + i.getAttribute("label") + " ")[0]),
- s.each(function(t) {
- var i = e._appendOptionWithIcon(e.$el, t, "optgroup-option");
- e._addOptionToValueDict(t, i)
+ return _createClass(n, [{
+ key: "getData",
+ value: function () {
+ return this.chipsData
+ }
+ }, {
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this.$chips.remove(),
+ this.el.M_Chips = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleChipClickBound = this._handleChipClick.bind(this),
+ this._handleInputKeydownBound = this._handleInputKeydown.bind(this),
+ this._handleInputFocusBound = this._handleInputFocus.bind(this),
+ this._handleInputBlurBound = this._handleInputBlur.bind(this),
+ this.el.addEventListener("click", this._handleChipClickBound),
+ document.addEventListener("keydown", n._handleChipsKeydown),
+ document.addEventListener("keyup", n._handleChipsKeyup),
+ this.el.addEventListener("blur", n._handleChipsBlur, !0),
+ this.$input[0].addEventListener("focus", this._handleInputFocusBound),
+ this.$input[0].addEventListener("blur", this._handleInputBlurBound),
+ this.$input[0].addEventListener("keydown", this._handleInputKeydownBound)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.el.removeEventListener("click", this._handleChipClickBound),
+ document.removeEventListener("keydown", n._handleChipsKeydown),
+ document.removeEventListener("keyup", n._handleChipsKeyup),
+ this.el.removeEventListener("blur", n._handleChipsBlur, !0),
+ this.$input[0].removeEventListener("focus", this._handleInputFocusBound),
+ this.$input[0].removeEventListener("blur", this._handleInputBlurBound),
+ this.$input[0].removeEventListener("keydown", this._handleInputKeydownBound)
+ }
+ }, {
+ key: "_handleChipClick",
+ value: function (e) {
+ var i = t(e.target).closest(".chip"),
+ n = t(e.target).is(".close");
+ if (i.length) {
+ var s = i.index();
+ n ? (this.deleteChip(s),
+ this.$input[0].focus()) : this.selectChip(s)
+ } else
+ this.$input[0].focus()
+ }
+ }, {
+ key: "_handleInputFocus",
+ value: function () {
+ this.$el.addClass("focus")
+ }
+ }, {
+ key: "_handleInputBlur",
+ value: function () {
+ this.$el.removeClass("focus")
+ }
+ }, {
+ key: "_handleInputKeydown",
+ value: function (t) {
+ if (n._keydown = !0,
+ 13 === t.keyCode) {
+ if (this.hasAutocomplete && this.autocomplete && this.autocomplete.isOpen)
+ return;
+ t.preventDefault(),
+ this.addChip({
+ tag: this.$input[0].value
+ }),
+ this.$input[0].value = ""
+ } else
+ 8 !== t.keyCode && 37 !== t.keyCode || "" !== this.$input[0].value || !this.chipsData.length || (t.preventDefault(),
+ this.selectChip(this.chipsData.length - 1))
+ }
+ }, {
+ key: "_renderChip",
+ value: function (e) {
+ if (e.tag) {
+ var i = document.createElement("div"),
+ n = document.createElement("i");
+ if (i.classList.add("chip"),
+ i.textContent = e.tag,
+ i.setAttribute("tabindex", 0),
+ t(n).addClass("material-icons close"),
+ n.textContent = "close",
+ e.image) {
+ var s = document.createElement("img");
+ s.setAttribute("src", e.image),
+ i.insertBefore(s, i.firstChild)
+ }
+ return i.appendChild(n),
+ i
+ }
+ }
+ }, {
+ key: "_renderChips",
+ value: function () {
+ this.$chips.remove();
+ for (var t = 0; t < this.chipsData.length; t++) {
+ var e = this._renderChip(this.chipsData[t]);
+ this.$el.append(e),
+ this.$chips.add(e)
+ }
+ this.$el.append(this.$input[0])
+ }
+ }, {
+ key: "_setupAutocomplete",
+ value: function () {
+ var t = this;
+ this.options.autocompleteOptions.onAutocomplete = function (e) {
+ t.addChip({
+ tag: e
+ }),
+ t.$input[0].value = "",
+ t.$input[0].focus()
+ },
+ this.autocomplete = M.Autocomplete.init(this.$input, this.options.autocompleteOptions)[0]
+ }
+ }, {
+ key: "_setupInput",
+ value: function () {
+ this.$input = this.$el.find("input"),
+ this.$input.length || (this.$input = t("
"),
+ this.$el.append(this.$input)),
+ this.$input.addClass("input")
+ }
+ }, {
+ key: "_setupLabel",
+ value: function () {
+ this.$label = this.$el.find("label"),
+ this.$label.length && this.$label.setAttribute("for", this.$input.attr("id"))
+ }
+ }, {
+ key: "_setPlaceholder",
+ value: function () {
+ void 0 !== this.chipsData && !this.chipsData.length && this.options.placeholder ? t(this.$input).prop("placeholder", this.options.placeholder) : (void 0 === this.chipsData || this.chipsData.length) && this.options.secondaryPlaceholder && t(this.$input).prop("placeholder", this.options.secondaryPlaceholder)
+ }
+ }, {
+ key: "_isValid",
+ value: function (t) {
+ if (t.hasOwnProperty("tag") && "" !== t.tag) {
+ for (var e = !1, i = 0; i < this.chipsData.length; i++)
+ if (this.chipsData[i].tag === t.tag) {
+ e = !0;
+ break
+ }
+ return !e
+ }
+ return !1
+ }
+ }, {
+ key: "addChip",
+ value: function (e) {
+ if (this._isValid(e) && !(this.chipsData.length >= this.options.limit)) {
+ var i = this._renderChip(e);
+ this.$chips.add(i),
+ this.chipsData.push(e),
+ t(this.$input).before(i),
+ this._setPlaceholder(),
+ "function" == typeof this.options.onChipAdd && this.options.onChipAdd.call(this, this.$el, i)
+ }
+ }
+ }, {
+ key: "deleteChip",
+ value: function (e) {
+ var i = this.$chips.eq(e);
+ this.$chips.eq(e).remove(),
+ this.$chips = this.$chips.filter(function (e) {
+ return t(e).index() >= 0
+ }),
+ this.chipsData.splice(e, 1),
+ this._setPlaceholder(),
+ "function" == typeof this.options.onChipDelete && this.options.onChipDelete.call(this, this.$el, i[0])
+ }
+ }, {
+ key: "selectChip",
+ value: function (t) {
+ var e = this.$chips.eq(t);
+ this._selectedChip = e,
+ e[0].focus(),
+ "function" == typeof this.options.onChipSelect && this.options.onChipSelect.call(this, this.$el, e[0])
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Chips
+ }
+ }, {
+ key: "_handleChipsKeydown",
+ value: function (e) {
+ n._keydown = !0;
+ var i = t(e.target).closest(".chips"),
+ s = e.target && i.length;
+ if (!t(e.target).is("input, textarea") && s) {
+ var o = i[0].M_Chips;
+ if (8 === e.keyCode || 46 === e.keyCode) {
+ e.preventDefault();
+ var a = o.chipsData.length;
+ if (o._selectedChip) {
+ var r = o._selectedChip.index();
+ o.deleteChip(r),
+ o._selectedChip = null,
+ a = r - 1
+ }
+ o.chipsData.length && o.selectChip(a)
+ } else if (37 === e.keyCode) {
+ if (o._selectedChip) {
+ var l = o._selectedChip.index() - 1;
+ if (l < 0)
+ return;
+ o.selectChip(l)
+ }
+ } else if (39 === e.keyCode && o._selectedChip) {
+ var h = o._selectedChip.index() + 1;
+ h >= o.chipsData.length ? o.$input[0].focus() : o.selectChip(h)
+ }
+ }
+ }
+ }, {
+ key: "_handleChipsKeyup",
+ value: function (t) {
+ n._keydown = !1
+ }
+ }, {
+ key: "_handleChipsBlur",
+ value: function (e) {
+ if (!n._keydown) {
+ t(e.target).closest(".chips")[0].M_Chips._selectedChip = null
+ }
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return e
+ }
+ }]),
+ n
+ }();
+ i._keydown = !1,
+ M.Chips = i,
+ M.jQueryLoaded && M.initializeJqueryWrapper(i, "chips", "M_Chips"),
+ t(document).ready(function () {
+ t(document.body).on("click", ".chip .close", function () {
+ var e = t(this).closest(".chips");
+ e.length && e[0].M_Chips || t(this).closest(".chip").remove()
+ })
+ })
+ }(cash),
+ function (t) {
+ "use strict";
+ var e = {
+ top: 0,
+ bottom: 1 / 0,
+ offset: 0,
+ onPositionChange: null
+ },
+ i = function (i) {
+ _inherits(n, Component);
+
+ function n(e, i) {
+ _classCallCheck(this, n);
+ var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
+ return s.el.M_Pushpin = s,
+ s.options = t.extend({}, n.defaults, i),
+ s.originalOffset = s.el.offsetTop,
+ n._pushpins.push(s),
+ s._setupEventHandlers(),
+ s._updatePosition(),
+ s
+ }
+ return _createClass(n, [{
+ key: "destroy",
+ value: function () {
+ this.el.style.top = null,
+ this._removePinClasses(),
+ this._removeEventHandlers();
+ var t = n._pushpins.indexOf(this);
+ n._pushpins.splice(t, 1)
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ document.addEventListener("scroll", n._updateElements)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ document.removeEventListener("scroll", n._updateElements)
+ }
+ }, {
+ key: "_updatePosition",
+ value: function () {
+ var t = M.getDocumentScrollTop() + this.options.offset;
+ this.options.top <= t && this.options.bottom >= t && !this.el.classList.contains("pinned") && (this._removePinClasses(),
+ this.el.style.top = this.options.offset + "px",
+ this.el.classList.add("pinned"),
+ "function" == typeof this.options.onPositionChange && this.options.onPositionChange.call(this, "pinned")),
+ t < this.options.top && !this.el.classList.contains("pin-top") && (this._removePinClasses(),
+ this.el.style.top = 0,
+ this.el.classList.add("pin-top"),
+ "function" == typeof this.options.onPositionChange && this.options.onPositionChange.call(this, "pin-top")),
+ t > this.options.bottom && !this.el.classList.contains("pin-bottom") && (this._removePinClasses(),
+ this.el.classList.add("pin-bottom"),
+ this.el.style.top = this.options.bottom - this.originalOffset + "px",
+ "function" == typeof this.options.onPositionChange && this.options.onPositionChange.call(this, "pin-bottom"))
+ }
+ }, {
+ key: "_removePinClasses",
+ value: function () {
+ this.el.classList.remove("pin-top", "pinned", "pin-bottom")
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Pushpin
+ }
+ }, {
+ key: "_updateElements",
+ value: function () {
+ for (var t in n._pushpins) {
+ n._pushpins[t]._updatePosition()
+ }
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return e
+ }
+ }]),
+ n
+ }();
+ i._pushpins = [],
+ M.Pushpin = i,
+ M.jQueryLoaded && M.initializeJqueryWrapper(i, "pushpin", "M_Pushpin")
+ }(cash),
+ function (t, e) {
+ "use strict";
+ var i = {
+ direction: "top",
+ hoverEnabled: !0,
+ toolbarEnabled: !1
+ };
+ t.fn.reverse = [].reverse;
+ var n = function (n) {
+ _inherits(s, Component);
+
+ function s(e, i) {
+ _classCallCheck(this, s);
+ var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
+ return n.el.M_FloatingActionButton = n,
+ n.options = t.extend({}, s.defaults, i),
+ n.isOpen = !1,
+ n.$anchor = n.$el.children("a").first(),
+ n.$menu = n.$el.children("ul").first(),
+ n.$floatingBtns = n.$el.find("ul .btn-floating"),
+ n.$floatingBtnsReverse = n.$el.find("ul .btn-floating").reverse(),
+ n.offsetY = 0,
+ n.offsetX = 0,
+ "top" === n.options.direction ? (n.$el.addClass("direction-top"),
+ n.offsetY = 40) : "right" === n.options.direction ? (n.$el.addClass("direction-right"),
+ n.offsetX = -40) : "bottom" === n.options.direction ? (n.$el.addClass("direction-bottom"),
+ n.offsetY = -40) : (n.$el.addClass("direction-left"),
+ n.offsetX = 40),
+ n._setupEventHandlers(),
+ n
+ }
+ return _createClass(s, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this.el.M_FloatingActionButton = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleFABClickBound = this._handleFABClick.bind(this),
+ this._handleOpenBound = this.open.bind(this),
+ this._handleCloseBound = this.close.bind(this),
+ this.options.hoverEnabled && !this.options.toolbarEnabled ? (this.el.addEventListener("mouseenter", this._handleOpenBound),
+ this.el.addEventListener("mouseleave", this._handleCloseBound)) : this.el.addEventListener("click", this._handleFABClickBound)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.options.hoverEnabled && !this.options.toolbarEnabled ? (this.el.removeEventListener("mouseenter", this._handleOpenBound),
+ this.el.removeEventListener("mouseleave", this._handleCloseBound)) : this.el.removeEventListener("click", this._handleFABClickBound)
+ }
+ }, {
+ key: "_handleFABClick",
+ value: function () {
+ this.isOpen ? this.close() : this.open()
+ }
+ }, {
+ key: "_handleDocumentClick",
+ value: function (e) {
+ t(e.target).closest(this.$menu).length || this.close()
+ }
+ }, {
+ key: "open",
+ value: function () {
+ this.isOpen || (this.options.toolbarEnabled ? this._animateInToolbar() : this._animateInFAB(),
+ this.isOpen = !0)
+ }
+ }, {
+ key: "close",
+ value: function () {
+ this.isOpen && (this.options.toolbarEnabled ? (window.removeEventListener("scroll", this._handleCloseBound, !0),
+ document.body.removeEventListener("click", this._handleDocumentClickBound, !0),
+ this._animateOutToolbar()) : this._animateOutFAB(),
+ this.isOpen = !1)
+ }
+ }, {
+ key: "_animateInFAB",
+ value: function () {
+ var t = this;
+ this.$el.addClass("active");
+ var i = 0;
+ this.$floatingBtnsReverse.each(function (n) {
+ e({
+ targets: n,
+ opacity: 1,
+ scale: [.4, 1],
+ translateY: [t.offsetY, 0],
+ translateX: [t.offsetX, 0],
+ duration: 275,
+ delay: i,
+ easing: "easeInOutQuad"
+ }),
+ i += 40
})
}
- }),
- this.$el.after(this.dropdownOptions),
- this.input = document.createElement("input"),
- t(this.input).addClass("select-dropdown dropdown-trigger"),
- this.input.setAttribute("type", "text"),
- this.input.setAttribute("readonly", "true"),
- this.input.setAttribute("data-target", this.dropdownOptions.id),
- this.el.disabled && t(this.input).prop("disabled", "true"),
- this.$el.before(this.input),
- this._setValueToInput();
- var i = t('
');
- if (this.$el.before(i[0]),
- !this.el.disabled) {
- var n = {};
- this.isMultiple && (n.closeOnClick = !1),
- this.dropdown = M.Dropdown.init(this.input, n)
- }
- this._setSelectedStates()
- }
- }, {
- key: "_addOptionToValueDict",
- value: function(t, e) {
- var i = Object.keys(this._valueDict).length
- , n = this.dropdownOptions.id + i
- , s = {};
- e.id = n,
- s.el = t,
- s.optionEl = e,
- this._valueDict[n] = s
- }
- }, {
- key: "_removeDropdown",
- value: function() {
- t(this.wrapper).find(".caret").remove(),
- t(this.input).remove(),
- t(this.dropdownOptions).remove(),
- t(this.wrapper).before(this.$el),
- t(this.wrapper).remove()
- }
- }, {
- key: "_appendOptionWithIcon",
- value: function(e, i, n) {
- var s = i.disabled ? "disabled " : ""
- , o = "optgroup-option" === n ? "optgroup-option " : ""
- , a = this.isMultiple ? '
' + i.innerHTML + " " : i.innerHTML
- , r = t("
")
- , l = t("
");
- l.html(a),
- r.addClass(s + " " + o),
- r.append(l);
- var h = i.getAttribute("data-icon");
- i.getAttribute("class");
- if (h) {
- var d = t('
');
- r.prepend(d)
- }
- return t(this.dropdownOptions).append(r[0]),
- r[0]
- }
- }, {
- key: "_toggleEntryFromArray",
- value: function(e) {
- var i = !this._keysSelected.hasOwnProperty(e);
- return i ? this._keysSelected[e] = !0 : delete this._keysSelected[e],
- t(this._valueDict[e].optionEl).toggleClass("active"),
- t(this._valueDict[e].el).prop("selected", i),
- i
- }
- }, {
- key: "_setValueToInput",
- value: function() {
- var e = "";
- if (this.$el.find("option").each(function(i) {
- if (t(i).prop("selected")) {
- var n = t(i).text();
- e += "" === e ? n : ", " + n
+ }, {
+ key: "_animateOutFAB",
+ value: function () {
+ var t = this;
+ this.$floatingBtnsReverse.each(function (i) {
+ e.remove(i),
+ e({
+ targets: i,
+ opacity: 0,
+ scale: .4,
+ translateY: t.offsetY,
+ translateX: t.offsetX,
+ duration: 175,
+ easing: "easeOutQuad",
+ complete: function () {
+ t.$el.removeClass("active")
+ }
+ })
+ })
}
- }),
- "" === e) {
- var i = this.$el.find("option:disabled").eq(0);
- i.length && (e = i.text())
+ }, {
+ key: "_animateInToolbar",
+ value: function () {
+ var e = this,
+ i = void 0,
+ n = window.innerWidth,
+ s = window.innerHeight,
+ o = this.el.getBoundingClientRect(),
+ a = t('
'),
+ r = this.$anchor.css("background-color");
+ this.$anchor.append(a),
+ this.offsetX = o.left - n / 2 + o.width / 2,
+ this.offsetY = s - o.bottom,
+ i = n / a[0].clientWidth,
+ this.btnBottom = o.bottom,
+ this.btnLeft = o.left,
+ this.btnWidth = o.width,
+ this.$el.addClass("active"),
+ this.$el.css({
+ "text-align": "center",
+ width: "100%",
+ bottom: 0,
+ left: 0,
+ transform: "translateX(" + this.offsetX + "px)",
+ transition: "none"
+ }),
+ this.$anchor.css({
+ transform: "translateY(" + -this.offsetY + "px)",
+ transition: "none"
+ }),
+ a.css({
+ "background-color": r
+ }),
+ setTimeout(function () {
+ e.$el.css({
+ transform: "",
+ transition: "transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s"
+ }),
+ e.$anchor.css({
+ overflow: "visible",
+ transform: "",
+ transition: "transform .2s"
+ }),
+ setTimeout(function () {
+ e.$el.css({
+ overflow: "hidden",
+ "background-color": r
+ }),
+ a.css({
+ transform: "scale(" + i + ")",
+ transition: "transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"
+ }),
+ e.$menu.children("li").children("a").css({
+ opacity: 1
+ }),
+ e._handleDocumentClickBound = e._handleDocumentClick.bind(e),
+ window.addEventListener("scroll", e._handleCloseBound, !0),
+ document.body.addEventListener("click", e._handleDocumentClickBound, !0)
+ }, 100)
+ }, 0)
+ }
+ }, {
+ key: "_animateOutToolbar",
+ value: function () {
+ var t = this,
+ e = window.innerWidth,
+ i = window.innerHeight,
+ n = this.$el.find(".fab-backdrop"),
+ s = anchor.css("background-color");
+ this.offsetX = this.btnLeft - e / 2 + this.btnWidth / 2,
+ this.offsetY = i - this.btnBottom,
+ this.$el.removeClass("active"),
+ this.$el.css({
+ "background-color": "transparent",
+ transition: "none"
+ }),
+ this.$anchor.css({
+ transition: "none"
+ }),
+ n.css({
+ transform: "scale(0)",
+ "background-color": s
+ }),
+ this.$menu.children("li").children("a").css({
+ opacity: ""
+ }),
+ setTimeout(function () {
+ n.remove(),
+ t.$el.css({
+ "text-align": "",
+ width: "",
+ bottom: "",
+ left: "",
+ overflow: "",
+ "background-color": "",
+ transform: "translate3d(" + -t.offsetX + "px,0,0)"
+ }),
+ t.$anchor.css({
+ overflow: "",
+ transform: "translate3d(0," + t.offsetY + "px,0)"
+ }),
+ setTimeout(function () {
+ t.$el.css({
+ transform: "translate3d(0,0,0)",
+ transition: "transform .2s"
+ }),
+ t.$anchor.css({
+ transform: "translate3d(0,0,0)",
+ transition: "transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)"
+ })
+ }, 20)
+ }, 200)
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_FloatingActionButton
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ s
+ }();
+ M.FloatingActionButton = n,
+ M.jQueryLoaded && M.initializeJqueryWrapper(n, "floatingActionButton", "M_FloatingActionButton")
+ }(cash, M.anime),
+ function (t) {
+ "use strict";
+ var e = {
+ format: "mmm dd, yyyy",
+ parse: null,
+ defaultDate: null,
+ setDefaultDate: !1,
+ disableWeekends: !1,
+ disableDayFn: null,
+ firstDay: 0,
+ minDate: null,
+ maxDate: null,
+ yearRange: 10,
+ minYear: 0,
+ maxYear: 9999,
+ minMonth: void 0,
+ maxMonth: void 0,
+ startRange: null,
+ endRange: null,
+ isRTL: !1,
+ showMonthAfterYear: !1,
+ showDaysInNextAndPreviousMonths: !1,
+ container: null,
+ i18n: {
+ clear: "Clear",
+ today: "Today",
+ done: "Ok",
+ previousMonth: "?",
+ nextMonth: "?",
+ months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
+ monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
+ weekdaysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
+ weekdays: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
+ weekdaysAbbrev: ["S", "M", "T", "W", "T", "F", "S"]
+ },
+ events: [],
+ onSelect: null,
+ onOpen: null,
+ onClose: null,
+ onDraw: null
+ },
+ i = function (i) {
+ _inherits(n, Component);
+
+ function n(e, i) {
+ _classCallCheck(this, n);
+ var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
+ s.el.M_Datepicker = s,
+ s.options = t.extend({}, n.defaults, i),
+ s.options.minDate && s.options.minDate.setHours(0, 0, 0, 0),
+ s.options.maxDate && s.options.maxDate.setHours(0, 0, 0, 0),
+ s.id = M.guid(),
+ s._setupVariables(),
+ s._insertHTMLIntoDOM(),
+ s._setupModal(),
+ s._setupEventHandlers(),
+ s.options.defaultDate || (s.options.defaultDate = new Date(Date.parse(s.el.value)),
+ s.options.setDefaultDate = !0);
+ var o = s.options.defaultDate;
+ return n._isDate(o) ? s.options.setDefaultDate ? s.setDate(o, !0) : s.gotoDate(o) : s.gotoDate(new Date),
+ s.isOpen = !1,
+ s
+ }
+ return _createClass(n, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this.modal.destroy(),
+ t(this.modalEl).remove(),
+ this.el.M_Datepicker = void 0
+ }
+ }, {
+ key: "_insertHTMLIntoDOM",
+ value: function () {
+ this.clearBtn.innerHTML = this.options.i18n.clear,
+ this.todayBtn.innerHTML = this.options.i18n.today,
+ this.doneBtn.innerHTML = this.options.i18n.done;
+ var t = document.querySelector(this.options.container);
+ this.options.container && t ? this.$modalEl.appendTo(t) : this.$modalEl.insertBefore(this.el)
+ }
+ }, {
+ key: "_setupModal",
+ value: function () {
+ var t = this;
+ this.modalEl.id = "modal-" + this.id,
+ this.modal = M.Modal.init(this.modalEl, {
+ onCloseEnd: function () {
+ t.isOpen = !1
+ }
+ })
+ }
+ }, {
+ key: "toString",
+ value: function (t) {
+ var e = this;
+ if (t = t || this.options.format,
+ !n._isDate(this.date))
+ return "";
+ return t.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(function (t) {
+ return e.formats[t] ? e.formats[t]() : t
+ }).join("")
+ }
+ }, {
+ key: "setDate",
+ value: function (t, e) {
+ if (!t)
+ return this.date = null,
+ this._renderDateDisplay(),
+ this.draw();
+ if ("string" == typeof t && (t = new Date(Date.parse(t))),
+ n._isDate(t)) {
+ var i = this.options.minDate,
+ s = this.options.maxDate;
+ n._isDate(i) && t < i ? t = i : n._isDate(s) && t > s && (t = s),
+ this.date = new Date(t.getTime()),
+ this._renderDateDisplay(),
+ n._setToStartOfDay(this.date),
+ this.gotoDate(this.date),
+ e || "function" != typeof this.options.onSelect || this.options.onSelect.call(this, this.date)
+ }
+ }
+ }, {
+ key: "setInputValue",
+ value: function () {
+ this.el.value = this.toString(),
+ this.$el.trigger("change", {
+ firedBy: this
+ })
+ }
+ }, {
+ key: "_renderDateDisplay",
+ value: function () {
+ var t = n._isDate(this.date) ? this.date : new Date,
+ e = this.options.i18n,
+ i = e.weekdaysShort[t.getDay()],
+ s = e.monthsShort[t.getMonth()],
+ o = t.getDate();
+ this.yearTextEl.innerHTML = t.getFullYear(),
+ this.dateTextEl.innerHTML = i + ", " + s + " " + o
+ }
+ }, {
+ key: "gotoDate",
+ value: function (t) {
+ var e = !0;
+ if (n._isDate(t)) {
+ if (this.calendars) {
+ var i = new Date(this.calendars[0].year, this.calendars[0].month, 1),
+ s = new Date(this.calendars[this.calendars.length - 1].year, this.calendars[this.calendars.length - 1].month, 1),
+ o = t.getTime();
+ s.setMonth(s.getMonth() + 1),
+ s.setDate(s.getDate() - 1),
+ e = o < i.getTime() || s.getTime() < o
+ }
+ e && (this.calendars = [{
+ month: t.getMonth(),
+ year: t.getFullYear()
+ }]),
+ this.adjustCalendars()
+ }
+ }
+ }, {
+ key: "adjustCalendars",
+ value: function () {
+ this.calendars[0] = this.adjustCalendar(this.calendars[0]),
+ this.draw()
+ }
+ }, {
+ key: "adjustCalendar",
+ value: function (t) {
+ return t.month < 0 && (t.year -= Math.ceil(Math.abs(t.month) / 12),
+ t.month += 12),
+ t.month > 11 && (t.year += Math.floor(Math.abs(t.month) / 12),
+ t.month -= 12),
+ t
+ }
+ }, {
+ key: "nextMonth",
+ value: function () {
+ this.calendars[0].month++,
+ this.adjustCalendars()
+ }
+ }, {
+ key: "prevMonth",
+ value: function () {
+ this.calendars[0].month--,
+ this.adjustCalendars()
+ }
+ }, {
+ key: "render",
+ value: function (t, e, i) {
+ var s = this.options,
+ o = new Date,
+ a = n._getDaysInMonth(t, e),
+ r = new Date(t, e, 1).getDay(),
+ l = [],
+ h = [];
+ n._setToStartOfDay(o),
+ s.firstDay > 0 && (r -= s.firstDay) < 0 && (r += 7);
+ for (var d = 0 === e ? 11 : e - 1, u = 11 === e ? 0 : e + 1, c = 0 === e ? t - 1 : t, p = 11 === e ? t + 1 : t, v = n._getDaysInMonth(c, d), f = a + r, m = f; m > 7;)
+ m -= 7;
+ f += 7 - m;
+ for (var g = !1, _ = 0, y = 0; _ < f; _++) {
+ var k = new Date(t, e, _ - r + 1),
+ b = !!n._isDate(this.date) && n._compareDates(k, this.date),
+ w = n._compareDates(k, o),
+ C = -1 !== s.events.indexOf(k.toDateString()),
+ E = _ < r || _ >= a + r,
+ M = _ - r + 1,
+ x = e,
+ L = t,
+ T = s.startRange && n._compareDates(s.startRange, k),
+ O = s.endRange && n._compareDates(s.endRange, k),
+ $ = s.startRange && s.endRange && s.startRange < k && k < s.endRange,
+ D = s.minDate && k < s.minDate || s.maxDate && k > s.maxDate || s.disableWeekends && n._isWeekend(k) || s.disableDayFn && s.disableDayFn(k);
+ E && (_ < r ? (M = v + M,
+ x = d,
+ L = c) : (M -= a,
+ x = u,
+ L = p));
+ var B = {
+ day: M,
+ month: x,
+ year: L,
+ hasEvent: C,
+ isSelected: b,
+ isToday: w,
+ isDisabled: D,
+ isEmpty: E,
+ isStartRange: T,
+ isEndRange: O,
+ isInRange: $,
+ showDaysInNextAndPreviousMonths: s.showDaysInNextAndPreviousMonths
+ };
+ h.push(this.renderDay(B)),
+ 7 == ++y && (l.push(this.renderRow(h, s.isRTL, g)),
+ h = [],
+ y = 0,
+ g = !1)
+ }
+ return this.renderTable(s, l, i)
+ }
+ }, {
+ key: "renderDay",
+ value: function (t) {
+ var e = [],
+ i = "false";
+ if (t.isEmpty) {
+ if (!t.showDaysInNextAndPreviousMonths)
+ return '
';
+ e.push("is-outside-current-month"),
+ e.push("is-selection-disabled")
+ }
+ return t.isDisabled && e.push("is-disabled"),
+ t.isToday && e.push("is-today"),
+ t.isSelected && (e.push("is-selected"),
+ i = "true"),
+ t.hasEvent && e.push("has-event"),
+ t.isInRange && e.push("is-inrange"),
+ t.isStartRange && e.push("is-startrange"),
+ t.isEndRange && e.push("is-endrange"),
+ '
' + t.day + " "
+ }
+ }, {
+ key: "renderRow",
+ value: function (t, e, i) {
+ return '
' + (e ? t.reverse() : t).join("") + " "
+ }
+ }, {
+ key: "renderTable",
+ value: function (t, e, i) {
+ return '
' + this.renderHead(t) + this.renderBody(e) + "
"
+ }
+ }, {
+ key: "renderHead",
+ value: function (t) {
+ var e = void 0,
+ i = [];
+ for (e = 0; e < 7; e++)
+ i.push('
' + this.renderDayName(t, e, !0) + " ");
+ return "
" + (t.isRTL ? i.reverse() : i).join("") + " "
+ }
+ }, {
+ key: "renderBody",
+ value: function (t) {
+ return "
" + t.join("") + " "
+ }
+ }, {
+ key: "renderTitle",
+ value: function (e, i, n, s, o, a) {
+ var r = void 0,
+ l = void 0,
+ h = void 0,
+ d = this.options,
+ u = n === d.minYear,
+ c = n === d.maxYear,
+ p = '
',
+ v = void 0,
+ f = void 0,
+ m = !0,
+ g = !0;
+ for (h = [],
+ r = 0; r < 12; r++)
+ h.push('
d.maxMonth ? 'disabled="disabled"' : "") + ">" + d.i18n.months[r] + " ");
+ for (v = '
' + h.join("") + " ",
+ t.isArray(d.yearRange) ? (r = d.yearRange[0],
+ l = d.yearRange[1] + 1) : (r = n - d.yearRange,
+ l = 1 + n + d.yearRange),
+ h = []; r < l && r <= d.maxYear; r++)
+ r >= d.minYear && h.push('
" + r + " ");
+ f = '
' + h.join("") + " ";
+ p += '
',
+ p += '
',
+ d.showMonthAfterYear ? p += f + v : p += v + f,
+ p += "
",
+ u && (0 === s || d.minMonth >= s) && (m = !1),
+ c && (11 === s || d.maxMonth <= s) && (g = !1);
+ return (p += '
') + "
"
+ }
+ }, {
+ key: "draw",
+ value: function (t) {
+ if (this.isOpen || t) {
+ var e = this.options,
+ i = e.minYear,
+ n = e.maxYear,
+ s = e.minMonth,
+ o = e.maxMonth,
+ a = "",
+ r = void 0;
+ this._y <= i && (this._y = i,
+ !isNaN(s) && this._m < s && (this._m = s)),
+ this._y >= n && (this._y = n,
+ !isNaN(o) && this._m > o && (this._m = o)),
+ r = "pika-title-" + Math.random().toString(36).replace(/[^a-z]+/g, "").substr(0, 2);
+ for (var l = 0; l < 1; l++)
+ this._renderDateDisplay(),
+ a += this.renderTitle(this, l, this.calendars[l].year, this.calendars[l].month, this.calendars[0].year, r) + this.render(this.calendars[l].year, this.calendars[l].month, r);
+ this.calendarEl.innerHTML = a;
+ var h = this.calendarEl.querySelector(".pika-select-year"),
+ d = this.calendarEl.querySelector(".pika-select-month");
+ M.Select.init(h, {
+ classes: "select-year"
+ }),
+ M.Select.init(d, {
+ classes: "select-month"
+ }),
+ h.addEventListener("change", this._handleYearChange.bind(this)),
+ d.addEventListener("change", this._handleMonthChange.bind(this)),
+ "function" == typeof this.options.onDraw && this.options.onDraw(this)
+ }
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleInputKeydownBound = this._handleInputKeydown.bind(this),
+ this._handleInputClickBound = this._handleInputClick.bind(this),
+ this._handleInputChangeBound = this._handleInputChange.bind(this),
+ this._handleCalendarClickBound = this._handleCalendarClick.bind(this),
+ this._finishSelectionBound = this._finishSelection.bind(this),
+ this._handleTodayClickBound = this._handleTodayClick.bind(this),
+ this._handleClearClickBound = this._handleClearClick.bind(this),
+ this._handleMonthChange = this._handleMonthChange.bind(this),
+ this.el.addEventListener("click", this._handleInputClickBound),
+ this.el.addEventListener("keydown", this._handleInputKeydownBound),
+ this.el.addEventListener("change", this._handleInputChangeBound),
+ this.calendarEl.addEventListener("click", this._handleCalendarClickBound),
+ this.doneBtn.addEventListener("click", this._finishSelectionBound),
+ this.todayBtn.addEventListener("click", this._handleTodayClickBound),
+ this.clearBtn.addEventListener("click", this._handleClearClickBound)
+ }
+ }, {
+ key: "_setupVariables",
+ value: function () {
+ var e = this;
+ this.$modalEl = t(n._template),
+ this.modalEl = this.$modalEl[0],
+ this.calendarEl = this.modalEl.querySelector(".pika-single"),
+ this.yearTextEl = this.modalEl.querySelector(".year-text"),
+ this.dateTextEl = this.modalEl.querySelector(".date-text"),
+ this.clearBtn = this.modalEl.querySelector(".datepicker-clear"),
+ this.todayBtn = this.modalEl.querySelector(".datepicker-today"),
+ this.doneBtn = this.modalEl.querySelector(".datepicker-done"),
+ this.formats = {
+ dd: function () {
+ return e.date.getDate()
+ },
+ ddd: function () {
+ return e.options.i18n.weekdaysShort[e.date.getDay()]
+ },
+ dddd: function () {
+ return e.options.i18n.weekdays[e.date.getDay()]
+ },
+ mm: function () {
+ return e.date.getMonth() + 1
+ },
+ mmm: function () {
+ return e.options.i18n.monthsShort[e.date.getMonth()]
+ },
+ mmmm: function () {
+ return e.options.i18n.monthsShort[e.date.getMonth()]
+ },
+ yy: function () {
+ return e.date.getFullYear().slice(2)
+ },
+ yyyy: function () {
+ return e.date.getFullYear()
+ }
+ }
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.el.removeEventListener("click", this._handleInputClickBound),
+ this.el.removeEventListener("keydown", this._handleInputKeydownBound),
+ this.el.removeEventListener("change", this._handleInputChangeBound),
+ this.calendarEl.removeEventListener("click", this._handleCalendarClickBound)
+ }
+ }, {
+ key: "_handleInputClick",
+ value: function () {
+ this.open()
+ }
+ }, {
+ key: "_handleInputKeydown",
+ value: function (t) {
+ t.which === M.keys.ENTER && (t.preventDefault(),
+ this.open())
+ }
+ }, {
+ key: "_handleCalendarClick",
+ value: function (e) {
+ if (this.isOpen) {
+ var i = t(e.target);
+ i.hasClass("is-disabled") || (!i.hasClass("datepicker-day-button") || i.hasClass("is-empty") || i.parent().hasClass("is-disabled") ? i.closest(".month-prev").length ? this.prevMonth() : i.closest(".month-next").length && this.nextMonth() : this.setDate(new Date(e.target.getAttribute("data-pika-year"), e.target.getAttribute("data-pika-month"), e.target.getAttribute("data-pika-day"))))
+ }
+ }
+ }, {
+ key: "_handleTodayClick",
+ value: function () {
+ this.date = new Date,
+ this.setInputValue(),
+ this.close()
+ }
+ }, {
+ key: "_handleClearClick",
+ value: function () {
+ this.date = null,
+ this.setInputValue(),
+ this.close()
+ }
+ }, {
+ key: "_handleMonthChange",
+ value: function (t) {
+ this.gotoMonth(t.target.value)
+ }
+ }, {
+ key: "_handleYearChange",
+ value: function (t) {
+ this.gotoYear(t.target.value)
+ }
+ }, {
+ key: "gotoMonth",
+ value: function (t) {
+ isNaN(t) || (this.calendars[0].month = parseInt(t, 10),
+ this.adjustCalendars())
+ }
+ }, {
+ key: "gotoYear",
+ value: function (t) {
+ isNaN(t) || (this.calendars[0].year = parseInt(t, 10),
+ this.adjustCalendars())
+ }
+ }, {
+ key: "_handleInputChange",
+ value: function (t) {
+ var e = void 0;
+ t.firedBy !== this && (e = this.options.parse ? this.options.parse(this.el.value, this.options.format) : new Date(Date.parse(this.el.value)),
+ n._isDate(e) && this.setDate(e))
+ }
+ }, {
+ key: "renderDayName",
+ value: function (t, e, i) {
+ for (e += t.firstDay; e >= 7;)
+ e -= 7;
+ return i ? t.i18n.weekdaysAbbrev[e] : t.i18n.weekdays[e]
+ }
+ }, {
+ key: "_finishSelection",
+ value: function () {
+ this.setInputValue(),
+ this.close()
+ }
+ }, {
+ key: "open",
+ value: function () {
+ if (!this.isOpen)
+ return this.isOpen = !0,
+ "function" == typeof this.options.onOpen && this.options.onOpen.call(this),
+ this.draw(),
+ this.modal.open(),
+ this
+ }
+ }, {
+ key: "close",
+ value: function () {
+ if (this.isOpen)
+ return this.isOpen = !1,
+ "function" == typeof this.options.onClose && this.options.onClose.call(this),
+ this.modal.close(),
+ this
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "_isDate",
+ value: function (t) {
+ return /Date/.test(Object.prototype.toString.call(t)) && !isNaN(t.getTime())
+ }
+ }, {
+ key: "_isWeekend",
+ value: function (t) {
+ var e = t.getDay();
+ return 0 === e || 6 === e
+ }
+ }, {
+ key: "_setToStartOfDay",
+ value: function (t) {
+ n._isDate(t) && t.setHours(0, 0, 0, 0)
+ }
+ }, {
+ key: "_getDaysInMonth",
+ value: function (t, e) {
+ return [31, n._isLeapYear(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][e]
+ }
+ }, {
+ key: "_isLeapYear",
+ value: function (t) {
+ return t % 4 == 0 && t % 100 != 0 || t % 400 == 0
+ }
+ }, {
+ key: "_compareDates",
+ value: function (t, e) {
+ return t.getTime() === e.getTime()
+ }
+ }, {
+ key: "_setToStartOfDay",
+ value: function (t) {
+ n._isDate(t) && t.setHours(0, 0, 0, 0)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Datepicker
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return e
+ }
+ }]),
+ n
+ }();
+ i._template = ['
"].join(""),
+ M.Datepicker = i,
+ M.jQueryLoaded && M.initializeJqueryWrapper(i, "datepicker", "M_Datepicker")
+ }(cash),
+ function (t) {
+ "use strict";
+ var e = {
+ dialRadius: 135,
+ outerRadius: 105,
+ innerRadius: 70,
+ tickRadius: 20,
+ duration: 350,
+ container: null,
+ defaultTime: "now",
+ fromnow: 0,
+ doneText: "Ok",
+ clearText: "Clear",
+ cancelText: "Cancel",
+ autoClose: !1,
+ twelveHour: !0,
+ vibrate: !0
+ },
+ i = function (i) {
+ _inherits(n, Component);
+
+ function n(e, i) {
+ _classCallCheck(this, n);
+ var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
+ return s.el.M_Timepicker = s,
+ s.options = t.extend({}, n.defaults, i),
+ s.id = M.guid(),
+ s._insertHTMLIntoDOM(),
+ s._setupModal(),
+ s._setupVariables(),
+ s._setupEventHandlers(),
+ s._clockSetup(),
+ s._pickerSetup(),
+ s
}
- this.input.value = e
- }
- }, {
- key: "_setSelectedStates",
- value: function() {
- this._keysSelected = {};
- for (var e in this._valueDict) {
- var i = this._valueDict[e];
- t(i.el).prop("selected") ? (t(i.optionEl).find('input[type="checkbox"]').prop("checked", !0),
- this._activateOption(t(this.dropdownOptions), t(i.optionEl)),
- this._keysSelected[e] = !0) : (t(i.optionEl).find('input[type="checkbox"]').prop("checked", !1),
- t(i.optionEl).removeClass("selected"))
+ return _createClass(n, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this.modal.destroy(),
+ t(this.modalEl).remove(),
+ this.el.M_Timepicker = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleInputKeydownBound = this._handleInputKeydown.bind(this),
+ this._handleInputClickBound = this._handleInputClick.bind(this),
+ this._handleClockClickStartBound = this._handleClockClickStart.bind(this),
+ this._handleDocumentClickMoveBound = this._handleDocumentClickMove.bind(this),
+ this._handleDocumentClickEndBound = this._handleDocumentClickEnd.bind(this),
+ this.el.addEventListener("click", this._handleInputClickBound),
+ this.el.addEventListener("keydown", this._handleInputKeydownBound),
+ this.plate.addEventListener("mousedown", this._handleClockClickStartBound),
+ this.plate.addEventListener("touchstart", this._handleClockClickStartBound),
+ t(this.spanHours).on("click", this.showView.bind(this, "hours")),
+ t(this.spanMinutes).on("click", this.showView.bind(this, "minutes"))
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.el.removeEventListener("click", this._handleInputClickBound),
+ this.el.removeEventListener("keydown", this._handleInputKeydownBound)
+ }
+ }, {
+ key: "_handleInputClick",
+ value: function () {
+ this.open()
+ }
+ }, {
+ key: "_handleInputKeydown",
+ value: function (t) {
+ t.which === M.keys.ENTER && (t.preventDefault(),
+ this.open())
+ }
+ }, {
+ key: "_handleClockClickStart",
+ value: function (t) {
+ t.preventDefault();
+ var e = this.plate.getBoundingClientRect(),
+ i = e.left,
+ s = e.top;
+ this.x0 = i + this.options.dialRadius,
+ this.y0 = s + this.options.dialRadius,
+ this.moved = !1;
+ var o = n._Pos(t);
+ this.dx = o.x - this.x0,
+ this.dy = o.y - this.y0,
+ this.setHand(this.dx, this.dy, !1),
+ document.addEventListener("mousemove", this._handleDocumentClickMoveBound),
+ document.addEventListener("touchmove", this._handleDocumentClickMoveBound),
+ document.addEventListener("mouseup", this._handleDocumentClickEndBound),
+ document.addEventListener("touchend", this._handleDocumentClickEndBound)
+ }
+ }, {
+ key: "_handleDocumentClickMove",
+ value: function (t) {
+ t.preventDefault();
+ var e = n._Pos(t),
+ i = e.x - this.x0,
+ s = e.y - this.y0;
+ this.moved = !0,
+ this.setHand(i, s, !1, !0)
+ }
+ }, {
+ key: "_handleDocumentClickEnd",
+ value: function (t) {
+ t.preventDefault(),
+ document.removeEventListener("mouseup", this._handleDocumentClickEndBound),
+ document.removeEventListener("touchend", this._handleDocumentClickEndBound);
+ var e = n._Pos(t),
+ i = e.x - this.x0,
+ s = e.y - this.y0;
+ this.moved && i === this.dx && s === this.dy && this.setHand(i, s),
+ "hours" === this.currentView ? this.showView("minutes", this.options.duration / 2) : this.options.autoClose && (this.minutesView.addClass("timepicker-dial-out"),
+ setTimeout(function () {
+ this.done()
+ }, this.options.duration / 2)),
+ document.removeEventListener("mousemove", this._handleDocumentClickMoveBound),
+ document.removeEventListener("touchmove", this._handleDocumentClickMoveBound)
+ }
+ }, {
+ key: "_insertHTMLIntoDOM",
+ value: function () {
+ this.$modalEl = t(n._template),
+ this.modalEl = this.$modalEl[0],
+ this.modalEl.id = "modal-" + this.id;
+ var e = document.querySelector(this.options.container);
+ this.options.container && e ? this.$modalEl.appendTo(e) : this.$modalEl.insertBefore(this.el)
+ }
+ }, {
+ key: "_setupModal",
+ value: function () {
+ var t = this;
+ this.modal = M.Modal.init(this.modalEl, {
+ onCloseEnd: function () {
+ t.isOpen = !1
+ }
+ })
+ }
+ }, {
+ key: "_setupVariables",
+ value: function () {
+ this.currentView = "hours",
+ this.vibrate = navigator.vibrate ? "vibrate" : navigator.webkitVibrate ? "webkitVibrate" : null,
+ this._canvas = this.modalEl.querySelector(".timepicker-canvas"),
+ this.plate = this.modalEl.querySelector(".timepicker-plate"),
+ this.hoursView = this.modalEl.querySelector(".timepicker-hours"),
+ this.minutesView = this.modalEl.querySelector(".timepicker-minutes"),
+ this.spanHours = this.modalEl.querySelector(".timepicker-span-hours"),
+ this.spanMinutes = this.modalEl.querySelector(".timepicker-span-minutes"),
+ this.spanAmPm = this.modalEl.querySelector(".timepicker-span-am-pm"),
+ this.footer = this.modalEl.querySelector(".timepicker-footer"),
+ this.amOrPm = "PM"
+ }
+ }, {
+ key: "_pickerSetup",
+ value: function () {
+ t('
' + this.options.clearText + " ").appendTo(this.footer).on("click", this.clear.bind(this));
+ var e = t('
');
+ t('
' + this.options.cancelText + " ").appendTo(e).on("click", this.close.bind(this)),
+ t('
' + this.options.doneText + " ").appendTo(e).on("click", this.done.bind(this)),
+ e.appendTo(this.footer)
+ }
+ }, {
+ key: "_clockSetup",
+ value: function () {
+ this.options.twelveHour && (this.$amBtn = t('
AM
'),
+ this.$pmBtn = t('
PM
'),
+ this.$amBtn.on("click", this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),
+ this.$pmBtn.on("click", this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),
+ this._buildHoursView(),
+ this._buildMinutesView(),
+ this._buildSVGClock()
+ }
+ }, {
+ key: "_buildSVGClock",
+ value: function () {
+ var t = this.options.dialRadius,
+ e = this.options.tickRadius,
+ i = 2 * t,
+ s = n._createSVGEl("svg");
+ s.setAttribute("class", "timepicker-svg"),
+ s.setAttribute("width", i),
+ s.setAttribute("height", i);
+ var o = n._createSVGEl("g");
+ o.setAttribute("transform", "translate(" + t + "," + t + ")");
+ var a = n._createSVGEl("circle");
+ a.setAttribute("class", "timepicker-canvas-bearing"),
+ a.setAttribute("cx", 0),
+ a.setAttribute("cy", 0),
+ a.setAttribute("r", 4);
+ var r = n._createSVGEl("line");
+ r.setAttribute("x1", 0),
+ r.setAttribute("y1", 0);
+ var l = n._createSVGEl("circle");
+ l.setAttribute("class", "timepicker-canvas-bg"),
+ l.setAttribute("r", e),
+ o.appendChild(r),
+ o.appendChild(l),
+ o.appendChild(a),
+ s.appendChild(o),
+ this._canvas.appendChild(s),
+ this.hand = r,
+ this.bg = l,
+ this.bearing = a,
+ this.g = o
+ }
+ }, {
+ key: "_buildHoursView",
+ value: function () {
+ var e = t('
');
+ if (this.options.twelveHour)
+ for (var i = 1; i < 13; i += 1) {
+ var n = e.clone(),
+ s = i / 6 * Math.PI,
+ o = this.options.outerRadius;
+ n.css({
+ left: this.options.dialRadius + Math.sin(s) * o - this.options.tickRadius + "px",
+ top: this.options.dialRadius - Math.cos(s) * o - this.options.tickRadius + "px"
+ }),
+ n.html(0 === i ? "00" : i),
+ this.hoursView.appendChild(n[0])
+ }
+ else
+ for (var a = 0; a < 24; a += 1) {
+ var r = e.clone(),
+ l = a / 6 * Math.PI,
+ h = a > 0 && a < 13 ? this.options.innerRadius : this.options.outerRadius;
+ r.css({
+ left: this.options.dialRadius + Math.sin(l) * h - this.options.tickRadius + "px",
+ top: this.options.dialRadius - Math.cos(l) * h - this.options.tickRadius + "px"
+ }),
+ r.html(0 === a ? "00" : a),
+ this.hoursView.appendChild(r[0])
+ }
+ }
+ }, {
+ key: "_buildMinutesView",
+ value: function () {
+ for (var e = t('
'), i = 0; i < 60; i += 5) {
+ var s = e.clone(),
+ o = i / 30 * Math.PI;
+ s.css({
+ left: this.options.dialRadius + Math.sin(o) * this.options.outerRadius - this.options.tickRadius + "px",
+ top: this.options.dialRadius - Math.cos(o) * this.options.outerRadius - this.options.tickRadius + "px"
+ }),
+ s.html(n._addLeadingZero(i)),
+ this.minutesView.appendChild(s[0])
+ }
+ }
+ }, {
+ key: "_handleAmPmClick",
+ value: function (e) {
+ var i = t(e.target);
+ this.amOrPm = i.hasClass("am-btn") ? "AM" : "PM",
+ this._updateAmPmView()
+ }
+ }, {
+ key: "_updateAmPmView",
+ value: function () {
+ this.options.twelveHour && (this.$amBtn.toggleClass("text-primary", "AM" === this.amOrPm),
+ this.$pmBtn.toggleClass("text-primary", "PM" === this.amOrPm))
+ }
+ }, {
+ key: "_updateTimeFromInput",
+ value: function () {
+ var t = ((this.el.value || this.options.defaultTime || "") + "").split(":");
+ if (this.options.twelveHour && void 0 !== t[1] && (t[1].toUpperCase().indexOf("AM") > 0 ? this.amOrPm = "AM" : this.amOrPm = "PM",
+ t[1] = t[1].replace("AM", "").replace("PM", "")),
+ "now" === t[0]) {
+ var e = new Date(+new Date + this.options.fromnow);
+ t = [e.getHours(), e.getMinutes()],
+ this.options.twelveHour && (this.amOrPm = t[0] >= 12 && t[0] < 24 ? "PM" : "AM")
+ }
+ this.hours = +t[0] || 0,
+ this.minutes = +t[1] || 0,
+ this.spanHours.innerHTML = this.hours,
+ this.spanMinutes.innerHTML = n._addLeadingZero(this.minutes),
+ this._updateAmPmView()
+ }
+ }, {
+ key: "showView",
+ value: function (e, i) {
+ "minutes" === e && t(this.hoursView).css("visibility");
+ var n = "hours" === e,
+ s = n ? this.hoursView : this.minutesView,
+ o = n ? this.minutesView : this.hoursView;
+ this.currentView = e,
+ t(this.spanHours).toggleClass("text-primary", n),
+ t(this.spanMinutes).toggleClass("text-primary", !n),
+ o.classList.add("timepicker-dial-out"),
+ t(s).css("visibility", "visible").removeClass("timepicker-dial-out"),
+ this.resetClock(i),
+ clearTimeout(this.toggleViewTimer),
+ this.toggleViewTimer = setTimeout(function () {
+ t(o).css("visibility", "hidden")
+ }, this.options.duration)
+ }
+ }, {
+ key: "resetClock",
+ value: function (e) {
+ var i = this.currentView,
+ n = this[i],
+ s = "hours" === i,
+ o = n * (Math.PI / (s ? 6 : 30)),
+ a = s && n > 0 && n < 13 ? this.options.innerRadius : this.options.outerRadius,
+ r = Math.sin(o) * a,
+ l = -Math.cos(o) * a,
+ h = this;
+ e ? (t(this.canvas).addClass("timepicker-canvas-out"),
+ setTimeout(function () {
+ t(h.canvas).removeClass("timepicker-canvas-out"),
+ h.setHand(r, l)
+ }, e)) : this.setHand(r, l)
+ }
+ }, {
+ key: "setHand",
+ value: function (t, e, i) {
+ var s = this,
+ o = Math.atan2(t, -e),
+ a = "hours" === this.currentView,
+ r = Math.PI / (a || i ? 6 : 30),
+ l = Math.sqrt(t * t + e * e),
+ h = a && l < (this.options.outerRadius + this.options.innerRadius) / 2,
+ d = h ? this.options.innerRadius : this.options.outerRadius;
+ this.options.twelveHour && (d = this.options.outerRadius),
+ o < 0 && (o = 2 * Math.PI + o);
+ var u = Math.round(o / r);
+ o = u * r,
+ this.options.twelveHour ? a ? 0 === u && (u = 12) : (i && (u *= 5),
+ 60 === u && (u = 0)) : a ? (12 === u && (u = 0),
+ u = h ? 0 === u ? 12 : u : 0 === u ? 0 : u + 12) : (i && (u *= 5),
+ 60 === u && (u = 0)),
+ this[this.currentView] !== u && this.vibrate && this.options.vibrate && (this.vibrateTimer || (navigator[this.vibrate](10),
+ this.vibrateTimer = setTimeout(function () {
+ s.vibrateTimer = null
+ }, 100))),
+ this[this.currentView] = u,
+ a ? this.spanHours.innerHTML = u : this.spanMinutes.innerHTML = n._addLeadingZero(u);
+ var c = Math.sin(o) * (d - this.options.tickRadius),
+ p = -Math.cos(o) * (d - this.options.tickRadius),
+ v = Math.sin(o) * d,
+ f = -Math.cos(o) * d;
+ this.hand.setAttribute("x2", c),
+ this.hand.setAttribute("y2", p),
+ this.bg.setAttribute("cx", v),
+ this.bg.setAttribute("cy", f)
+ }
+ }, {
+ key: "open",
+ value: function () {
+ this.isOpen || (this.isOpen = !0,
+ this._updateTimeFromInput(),
+ this.showView("hours"),
+ this.modal.open())
+ }
+ }, {
+ key: "close",
+ value: function () {
+ this.isOpen && (this.isOpen = !1,
+ this.modal.close())
+ }
+ }, {
+ key: "done",
+ value: function (t, e) {
+ var i = this.el.value,
+ s = e ? "" : n._addLeadingZero(this.hours) + ":" + n._addLeadingZero(this.minutes);
+ this.time = s,
+ !e && this.options.twelveHour && (s = s + " " + this.amOrPm),
+ this.el.value = s,
+ s !== i && this.$el.trigger("change"),
+ this.close(),
+ this.el.focus()
+ }
+ }, {
+ key: "clear",
+ value: function () {
+ this.done(null, !0)
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "_addLeadingZero",
+ value: function (t) {
+ return (t < 10 ? "0" : "") + t
+ }
+ }, {
+ key: "_createSVGEl",
+ value: function (t) {
+ return document.createElementNS("http://www.w3.org/2000/svg", t)
+ }
+ }, {
+ key: "_Pos",
+ value: function (t) {
+ return t.targetTouches && t.targetTouches.length >= 1 ? {
+ x: t.targetTouches[0].clientX,
+ y: t.targetTouches[0].clientY
+ } : {
+ x: t.clientX,
+ y: t.clientY
+ }
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Timepicker
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return e
+ }
+ }]),
+ n
+ }();
+ i._template = ['
', '
', '
', '
', '
', ' ', ":", ' ', "
", '
", "
", "
", '
", "
", "
"].join(""),
+ M.Timepicker = i,
+ M.jQueryLoaded && M.initializeJqueryWrapper(i, "timepicker", "M_Timepicker")
+ }(cash),
+ function (t) {
+ "use strict";
+ var e = {},
+ i = function (i) {
+ _inherits(n, Component);
+
+ function n(e, i) {
+ _classCallCheck(this, n);
+ var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
+ return s.el.M_CharacterCounter = s,
+ s.options = t.extend({}, n.defaults, i),
+ s.isInvalid = !1,
+ s.isValidLength = !1,
+ s._setupCounter(),
+ s._setupEventHandlers(),
+ s
}
- }
- }, {
- key: "_activateOption",
- value: function(e, i) {
- if (i) {
- this.isMultiple || e.find("li.selected").removeClass("selected");
- t(i).addClass("selected")
+ return _createClass(n, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this.el.CharacterCounter = void 0,
+ this._removeCounter()
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleUpdateCounterBound = this.updateCounter.bind(this),
+ this.el.addEventListener("focus", this._handleUpdateCounterBound, !0),
+ this.el.addEventListener("input", this._handleUpdateCounterBound, !0)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.el.removeEventListener("focus", this._handleUpdateCounterBound, !0),
+ this.el.removeEventListener("input", this._handleUpdateCounterBound, !0)
+ }
+ }, {
+ key: "_setupCounter",
+ value: function () {
+ this.counterEl = document.createElement("span"),
+ t(this.counterEl).addClass("character-counter").css({
+ float: "right",
+ "font-size": "12px",
+ height: 1
+ }),
+ this.$el.parent().append(this.counterEl)
+ }
+ }, {
+ key: "_removeCounter",
+ value: function () {
+ t(this.counterEl).remove()
+ }
+ }, {
+ key: "updateCounter",
+ value: function () {
+ var e = +this.$el.attr("data-length"),
+ i = this.el.value.length;
+ this.isValidLength = i <= e;
+ var n = i;
+ e && (n += "/" + e,
+ this._validateInput()),
+ t(this.counterEl).html(n)
+ }
+ }, {
+ key: "_validateInput",
+ value: function () {
+ this.isValidLength && this.isInvalid ? (this.isInvalid = !1,
+ this.$el.removeClass("invalid")) : this.isValidLength || this.isInvalid || (this.isInvalid = !0,
+ this.$el.removeClass("valid"),
+ this.$el.addClass("invalid"))
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_CharacterCounter
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return e
+ }
+ }]),
+ n
+ }();
+ M.CharacterCounter = i,
+ M.jQueryLoaded && M.initializeJqueryWrapper(i, "characterCounter", "M_CharacterCounter")
+ }(cash),
+ function (t) {
+ "use strict";
+ var e = {
+ duration: 200,
+ dist: -100,
+ shift: 0,
+ padding: 0,
+ fullWidth: !1,
+ indicators: !1,
+ noWrap: !1,
+ onCycleTo: null
+ },
+ i = function (i) {
+ _inherits(n, Component);
+
+ function n(e, i) {
+ _classCallCheck(this, n);
+ var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
+ return s.el.M_Carousel = s,
+ s.options = t.extend({}, n.defaults, i),
+ s.hasMultipleSlides = s.$el.find(".carousel-item").length > 1,
+ s.showIndicators = s.options.indicators && s.hasMultipleSlides,
+ s.noWrap = s.options.noWrap || !s.hasMultipleSlides,
+ s.pressed = !1,
+ s.dragged = !1,
+ s.offset = s.target = 0,
+ s.images = [],
+ s.itemWidth = s.$el.find(".carousel-item").first().innerWidth(),
+ s.itemHeight = s.$el.find(".carousel-item").first().innerHeight(),
+ s.dim = 2 * s.itemWidth + s.options.padding || 1,
+ s._autoScrollBound = s._autoScroll.bind(s),
+ s._trackBound = s._track.bind(s),
+ s.options.fullWidth && (s.options.dist = 0,
+ s._setCarouselHeight(),
+ s.showIndicators && s.$el.find(".carousel-fixed-item").addClass("with-indicators")),
+ s.$indicators = t('
'),
+ s.$el.find(".carousel-item").each(function (e, i) {
+ if (s.images.push(e),
+ s.showIndicators) {
+ var n = t('
');
+ 0 === i && n[0].classList.add("active"),
+ s.$indicators.append(n)
+ }
+ }),
+ s.showIndicators && s.$el.append(s.$indicators),
+ s.count = s.images.length,
+ s.xform = "transform",
+ ["webkit", "Moz", "O", "ms"].every(function (t) {
+ var e = t + "Transform";
+ return void 0 === document.body.style[e] || (s.xform = e,
+ !1)
+ }),
+ s._setupEventHandlers(),
+ s._scroll(s.offset),
+ s
}
- }
- }, {
- key: "getSelectedValues",
- value: function() {
- var t = [];
- for (var e in this._keysSelected)
- t.push(this._valueDict[e].el.value);
- return t
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Select
- }
- }, {
- key: "defaults",
- get: function() {
- return e
- }
- }]),
- n
- }();
- M.Select = i,
- M.jQueryLoaded && M.initializeJqueryWrapper(i, "select", "M_Select")
-}(cash),
-function(t, e) {
- "use strict";
- var i = {}
- , n = function(n) {
- _inherits(s, Component);
- function s(e, i) {
- _classCallCheck(this, s);
- var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
- return n.el.M_Range = n,
- n.options = t.extend({}, s.defaults, i),
- n._mousedown = !1,
- n._setupThumb(),
- n._setupEventHandlers(),
- n
- }
- return _createClass(s, [{
- key: "destroy",
- value: function() {
- this._removeEventHandlers(),
- this._removeThumb(),
- this.el.M_Range = void 0
- }
- }, {
- key: "_setupEventHandlers",
- value: function() {
- this._handleRangeChangeBound = this._handleRangeChange.bind(this),
- this._handleRangeFocusBound = this._handleRangeFocus.bind(this),
- this._handleRangeMousedownTouchstartBound = this._handleRangeMousedownTouchstart.bind(this),
- this._handleRangeInputMousemoveTouchmoveBound = this._handleRangeInputMousemoveTouchmove.bind(this),
- this._handleRangeMouseupTouchendBound = this._handleRangeMouseupTouchend.bind(this),
- this._handleRangeBlurMouseoutTouchleaveBound = this._handleRangeBlurMouseoutTouchleave.bind(this),
- this.el.addEventListener("change", this._handleRangeChangeBound),
- this.el.addEventListener("focus", this._handleRangeFocusBound),
- this.el.addEventListener("mousedown", this._handleRangeMousedownTouchstartBound),
- this.el.addEventListener("touchstart", this._handleRangeMousedownTouchstartBound),
- this.el.addEventListener("input", this._handleRangeInputMousemoveTouchmoveBound),
- this.el.addEventListener("mousemove", this._handleRangeInputMousemoveTouchmoveBound),
- this.el.addEventListener("touchmove", this._handleRangeInputMousemoveTouchmoveBound),
- this.el.addEventListener("mouseup", this._handleRangeMouseupTouchendBound),
- this.el.addEventListener("touchend", this._handleRangeMouseupTouchendBound),
- this.el.addEventListener("blur", this._handleRangeBlurMouseoutTouchleaveBound),
- this.el.addEventListener("mouseout", this._handleRangeBlurMouseoutTouchleaveBound),
- this.el.addEventListener("touchleave", this._handleRangeBlurMouseoutTouchleaveBound)
- }
- }, {
- key: "_removeEventHandlers",
- value: function() {
- this.el.removeEventListener("change", this._handleRangeChangeBound),
- this.el.removeEventListener("focus", this._handleRangeFocusBound),
- this.el.removeEventListener("mousedown", this._handleRangeMousedownTouchstartBound),
- this.el.removeEventListener("touchstart", this._handleRangeMousedownTouchstartBound),
- this.el.removeEventListener("input", this._handleRangeInputMousemoveTouchmoveBound),
- this.el.removeEventListener("mousemove", this._handleRangeInputMousemoveTouchmoveBound),
- this.el.removeEventListener("touchmove", this._handleRangeInputMousemoveTouchmoveBound),
- this.el.removeEventListener("mouseup", this._handleRangeMouseupTouchendBound),
- this.el.removeEventListener("touchend", this._handleRangeMouseupTouchendBound),
- this.el.removeEventListener("blur", this._handleRangeBlurMouseoutTouchleaveBound),
- this.el.removeEventListener("mouseout", this._handleRangeBlurMouseoutTouchleaveBound),
- this.el.removeEventListener("touchleave", this._handleRangeBlurMouseoutTouchleaveBound)
- }
- }, {
- key: "_handleRangeChange",
- value: function() {
- t(this.value).html(this.$el.val()),
- t(this.thumb).hasClass("active") || this._showRangeBubble();
- var e = this._calcRangeOffset();
- t(this.thumb).addClass("active").css("left", e + "px")
- }
- }, {
- key: "_handleRangeFocus",
- value: function() {
- M.tabPressed && this.$el.addClass("focused")
- }
- }, {
- key: "_handleRangeMousedownTouchstart",
- value: function(e) {
- if (t(this.value).html(this.$el.val()),
- this._mousedown = !0,
- this.$el.addClass("active"),
- t(this.thumb).hasClass("active") || this._showRangeBubble(),
- "input" !== e.type) {
- var i = this._calcRangeOffset();
- t(this.thumb).addClass("active").css("left", i + "px")
+ return _createClass(n, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this.el.M_Carousel = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ var t = this;
+ this._handleCarouselTapBound = this._handleCarouselTap.bind(this),
+ this._handleCarouselDragBound = this._handleCarouselDrag.bind(this),
+ this._handleCarouselReleaseBound = this._handleCarouselRelease.bind(this),
+ this._handleCarouselClickBound = this._handleCarouselClick.bind(this),
+ void 0 !== window.ontouchstart && (this.el.addEventListener("touchstart", this._handleCarouselTapBound),
+ this.el.addEventListener("touchmove", this._handleCarouselDragBound),
+ this.el.addEventListener("touchend", this._handleCarouselReleaseBound)),
+ this.el.addEventListener("mousedown", this._handleCarouselTapBound),
+ this.el.addEventListener("mousemove", this._handleCarouselDragBound),
+ this.el.addEventListener("mouseup", this._handleCarouselReleaseBound),
+ this.el.addEventListener("mouseleave", this._handleCarouselReleaseBound),
+ this.el.addEventListener("click", this._handleCarouselClickBound),
+ this.showIndicators && this.$indicators && (this._handleIndicatorClickBound = this._handleIndicatorClick.bind(this),
+ this.$indicators.find(".indicator-item").each(function (e, i) {
+ e.addEventListener("click", t._handleIndicatorClickBound)
+ }));
+ var e = M.throttle(this._handleResize, 200);
+ this._handleThrottledResizeBound = e.bind(this),
+ window.addEventListener("resize", this._handleThrottledResizeBound)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ var t = this;
+ void 0 !== window.ontouchstart && (this.el.removeEventListener("touchstart", this._handleCarouselTapBound),
+ this.el.removeEventListener("touchmove", this._handleCarouselDragBound),
+ this.el.removeEventListener("touchend", this._handleCarouselReleaseBound)),
+ this.el.removeEventListener("mousedown", this._handleCarouselTapBound),
+ this.el.removeEventListener("mousemove", this._handleCarouselDragBound),
+ this.el.removeEventListener("mouseup", this._handleCarouselReleaseBound),
+ this.el.removeEventListener("mouseleave", this._handleCarouselReleaseBound),
+ this.el.removeEventListener("click", this._handleCarouselClickBound),
+ this.showIndicators && this.$indicators && this.$indicators.find(".indicator-item").each(function (e, i) {
+ e.removeEventListener("click", t._handleIndicatorClickBound)
+ }),
+ window.removeEventListener("resize", this._handleThrottledResizeBound)
+ }
+ }, {
+ key: "_handleCarouselTap",
+ value: function (e) {
+ "mousedown" === e.type && t(e.target).is("img") && e.preventDefault(),
+ this.pressed = !0,
+ this.dragged = !1,
+ this.verticalDragged = !1,
+ this.reference = this._xpos(e),
+ this.referenceY = this._ypos(e),
+ this.velocity = this.amplitude = 0,
+ this.frame = this.offset,
+ this.timestamp = Date.now(),
+ clearInterval(this.ticker),
+ this.ticker = setInterval(this._trackBound, 100)
+ }
+ }, {
+ key: "_handleCarouselDrag",
+ value: function (t) {
+ var e = void 0,
+ i = void 0,
+ n = void 0;
+ if (this.pressed)
+ if (e = this._xpos(t),
+ i = this._ypos(t),
+ n = this.reference - e,
+ Math.abs(this.referenceY - i) < 30 && !this.verticalDragged)
+ (n > 2 || n < -2) && (this.dragged = !0,
+ this.reference = e,
+ this._scroll(this.offset + n));
+ else {
+ if (this.dragged)
+ return t.preventDefault(),
+ t.stopPropagation(),
+ !1;
+ this.verticalDragged = !0
+ }
+ if (this.dragged)
+ return t.preventDefault(),
+ t.stopPropagation(),
+ !1
+ }
+ }, {
+ key: "_handleCarouselRelease",
+ value: function (t) {
+ if (this.pressed)
+ return this.pressed = !1,
+ clearInterval(this.ticker),
+ this.target = this.offset,
+ (this.velocity > 10 || this.velocity < -10) && (this.amplitude = .9 * this.velocity,
+ this.target = this.offset + this.amplitude),
+ this.target = Math.round(this.target / this.dim) * this.dim,
+ this.noWrap && (this.target >= this.dim * (this.count - 1) ? this.target = this.dim * (this.count - 1) : this.target < 0 && (this.target = 0)),
+ this.amplitude = this.target - this.offset,
+ this.timestamp = Date.now(),
+ requestAnimationFrame(this._autoScrollBound),
+ this.dragged && (t.preventDefault(),
+ t.stopPropagation()),
+ !1
+ }
+ }, {
+ key: "_handleCarouselClick",
+ value: function (e) {
+ if (this.dragged)
+ return e.preventDefault(),
+ e.stopPropagation(),
+ !1;
+ if (!this.options.fullWidth) {
+ var i = t(e.target).closest(".carousel-item").index();
+ 0 !== this._wrap(this.center) - i && (e.preventDefault(),
+ e.stopPropagation()),
+ this._cycleTo(i)
+ }
+ }
+ }, {
+ key: "_handleIndicatorClick",
+ value: function (e) {
+ e.stopPropagation();
+ var i = t(e.target).closest(".indicator-item");
+ i.length && this._cycleTo(i.index())
+ }
+ }, {
+ key: "_handleResize",
+ value: function (t) {
+ this.options.fullWidth ? (this.itemWidth = this.$el.find(".carousel-item").first().innerWidth(),
+ this.imageHeight = this.$el.find(".carousel-item.active").height(),
+ this.dim = 2 * this.itemWidth + this.options.padding,
+ this.offset = 2 * this.center * this.itemWidth,
+ this.target = this.offset,
+ this._setCarouselHeight(!0)) : this._scroll()
+ }
+ }, {
+ key: "_setCarouselHeight",
+ value: function (t) {
+ var e = this,
+ i = this.$el.find(".carousel-item.active").length ? this.$el.find(".carousel-item.active").first() : this.$el.find(".carousel-item").first(),
+ n = i.find("img").first();
+ if (n.length)
+ if (n[0].complete) {
+ var s = n.height();
+ if (s > 0)
+ this.$el.css("height", s + "px");
+ else {
+ var o = n[0].naturalWidth,
+ a = n[0].naturalHeight,
+ r = this.$el.width() / o * a;
+ this.$el.css("height", r + "px")
+ }
+ } else
+ n.one("load", function (t, i) {
+ e.$el.css("height", t.offsetHeight + "px")
+ });
+ else if (!t) {
+ var l = i.height();
+ this.$el.css("height", l + "px")
+ }
+ }
+ }, {
+ key: "_xpos",
+ value: function (t) {
+ return t.targetTouches && t.targetTouches.length >= 1 ? t.targetTouches[0].clientX : t.clientX
+ }
+ }, {
+ key: "_ypos",
+ value: function (t) {
+ return t.targetTouches && t.targetTouches.length >= 1 ? t.targetTouches[0].clientY : t.clientY
+ }
+ }, {
+ key: "_wrap",
+ value: function (t) {
+ return t >= this.count ? t % this.count : t < 0 ? this._wrap(this.count + t % this.count) : t
+ }
+ }, {
+ key: "_track",
+ value: function () {
+ var t = void 0,
+ e = void 0,
+ i = void 0,
+ n = void 0;
+ e = (t = Date.now()) - this.timestamp,
+ this.timestamp = t,
+ i = this.offset - this.frame,
+ this.frame = this.offset,
+ n = 1e3 * i / (1 + e),
+ this.velocity = .8 * n + .2 * this.velocity
+ }
+ }, {
+ key: "_autoScroll",
+ value: function () {
+ var t = void 0,
+ e = void 0;
+ this.amplitude && (t = Date.now() - this.timestamp,
+ (e = this.amplitude * Math.exp(-t / this.options.duration)) > 2 || e < -2 ? (this._scroll(this.target - e),
+ requestAnimationFrame(this._autoScrollBound)) : this._scroll(this.target))
+ }
+ }, {
+ key: "_scroll",
+ value: function (e) {
+ var i = this;
+ this.$el.hasClass("scrolling") || this.el.classList.add("scrolling"),
+ null != this.scrollingTimeout && window.clearTimeout(this.scrollingTimeout),
+ this.scrollingTimeout = window.setTimeout(function () {
+ i.$el.removeClass("scrolling")
+ }, this.options.duration);
+ var n = void 0,
+ s = void 0,
+ o = void 0,
+ a = void 0,
+ r = void 0,
+ l = void 0,
+ h = void 0,
+ d = void 0,
+ u = void 0,
+ c = this.center;
+ if (this.offset = "number" == typeof e ? e : this.offset,
+ this.center = Math.floor((this.offset + this.dim / 2) / this.dim),
+ r = -(a = (o = this.offset - this.center * this.dim) < 0 ? 1 : -1) * o * 2 / this.dim,
+ s = this.count >> 1,
+ this.options.fullWidth ? h = "translateX(0)" : (h = "translateX(" + (this.el.clientWidth - this.itemWidth) / 2 + "px) ",
+ h += "translateY(" + (this.el.clientHeight - this.itemHeight) / 2 + "px)"),
+ this.showIndicators) {
+ var p = this.center % this.count,
+ v = this.$indicators.find(".indicator-item.active");
+ v.index() !== p && (v.removeClass("active"),
+ this.$indicators.find(".indicator-item").eq(p)[0].classList.add("active"))
+ }
+ for ((!this.noWrap || this.center >= 0 && this.center < this.count) && (l = this.images[this._wrap(this.center)],
+ t(l).hasClass("active") || (this.$el.find(".carousel-item").removeClass("active"),
+ l.classList.add("active")),
+ l.style[this.xform] = h + " translateX(" + -o / 2 + "px) translateX(" + a * this.options.shift * r * n + "px) translateZ(" + this.options.dist * r + "px)",
+ l.style.zIndex = 0,
+ u = this.options.fullWidth ? 1 : 1 - .2 * r,
+ l.style.opacity = u,
+ l.style.visibility = "visible"),
+ n = 1; n <= s; ++n)
+ this.options.fullWidth ? (d = this.options.dist,
+ u = n === s && o < 0 ? 1 - r : 1) : (d = this.options.dist * (2 * n + r * a),
+ u = 1 - .2 * (2 * n + r * a)),
+ (!this.noWrap || this.center + n < this.count) && ((l = this.images[this._wrap(this.center + n)]).style[this.xform] = h + " translateX(" + (this.options.shift + (this.dim * n - o) / 2) + "px) translateZ(" + d + "px)",
+ l.style.zIndex = -n,
+ l.style.opacity = u,
+ l.style.visibility = "visible"),
+ this.options.fullWidth ? (d = this.options.dist,
+ u = n === s && o > 0 ? 1 - r : 1) : (d = this.options.dist * (2 * n - r * a),
+ u = 1 - .2 * (2 * n - r * a)),
+ (!this.noWrap || this.center - n >= 0) && ((l = this.images[this._wrap(this.center - n)]).style[this.xform] = h + " translateX(" + (-this.options.shift + (-this.dim * n - o) / 2) + "px) translateZ(" + d + "px)",
+ l.style.zIndex = -n,
+ l.style.opacity = u,
+ l.style.visibility = "visible");
+ (!this.noWrap || this.center >= 0 && this.center < this.count) && ((l = this.images[this._wrap(this.center)]).style[this.xform] = h + " translateX(" + -o / 2 + "px) translateX(" + a * this.options.shift * r + "px) translateZ(" + this.options.dist * r + "px)",
+ l.style.zIndex = 0,
+ u = this.options.fullWidth ? 1 : 1 - .2 * r,
+ l.style.opacity = u,
+ l.style.visibility = "visible");
+ var f = this.$el.find(".carousel-item").eq(this._wrap(this.center));
+ c !== this.center && "function" == typeof this.options.onCycleTo && this.options.onCycleTo.call(this, f[0], this.dragged),
+ "function" == typeof this.oneTimeCallback && (this.oneTimeCallback.call(this, f[0], this.dragged),
+ this.oneTimeCallback = null)
+ }
+ }, {
+ key: "_cycleTo",
+ value: function (t, e) {
+ var i = this.center % this.count - t;
+ this.noWrap || (i < 0 ? Math.abs(i + this.count) < Math.abs(i) && (i += this.count) : i > 0 && Math.abs(i - this.count) < i && (i -= this.count)),
+ this.target = this.dim * Math.round(this.offset / this.dim),
+ i < 0 ? this.target += this.dim * Math.abs(i) : i > 0 && (this.target -= this.dim * i),
+ "function" == typeof e && (this.oneTimeCallback = e),
+ this.offset !== this.target && (this.amplitude = this.target - this.offset,
+ this.timestamp = Date.now(),
+ requestAnimationFrame(this._autoScrollBound))
+ }
+ }, {
+ key: "next",
+ value: function (t) {
+ (void 0 === t || isNaN(t)) && (t = 1);
+ var e = this.center + t;
+ if (e > this.count || e < 0) {
+ if (this.noWrap)
+ return;
+ e = this._wrap(e)
+ }
+ this._cycleTo(e)
+ }
+ }, {
+ key: "prev",
+ value: function (t) {
+ (void 0 === t || isNaN(t)) && (t = 1);
+ var e = this.center - t;
+ if (e > this.count || e < 0) {
+ if (this.noWrap)
+ return;
+ e = this._wrap(e)
+ }
+ this._cycleTo(e)
+ }
+ }, {
+ key: "set",
+ value: function (t, e) {
+ if ((void 0 === t || isNaN(t)) && (t = 0),
+ t > this.count || t < 0) {
+ if (this.noWrap)
+ return;
+ t = this._wrap(t)
+ }
+ this._cycleTo(t, e)
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Carousel
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return e
+ }
+ }]),
+ n
+ }();
+ M.Carousel = i,
+ M.jQueryLoaded && M.initializeJqueryWrapper(i, "carousel", "M_Carousel")
+ }(cash),
+ function (t) {
+ "use strict";
+ var e = {
+ onOpen: void 0,
+ onClose: void 0
+ },
+ i = function (i) {
+ _inherits(n, Component);
+
+ function n(e, i) {
+ _classCallCheck(this, n);
+ var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
+ return s.el.M_FeatureDiscovery = s,
+ s.options = t.extend({}, n.defaults, i),
+ s.isOpen = !1,
+ s.$origin = t("#" + s.$el.attr("data-target")),
+ s._setup(),
+ s._calculatePositioning(),
+ s._setupEventHandlers(),
+ s
}
- }
- }, {
- key: "_handleRangeInputMousemoveTouchmove",
- value: function() {
- if (this._mousedown) {
- t(this.thumb).hasClass("active") || this._showRangeBubble();
- var e = this._calcRangeOffset();
- t(this.thumb).addClass("active").css("left", e + "px"),
- t(this.value).html(this.$el.val())
+ return _createClass(n, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this.el.FeatureDiscovery = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleDocumentClickBound = this._handleDocumentClick.bind(this),
+ this._handleTargetClickBound = this._handleTargetClick.bind(this),
+ this._handleOriginClickBound = this._handleOriginClick.bind(this),
+ this.el.addEventListener("click", this._handleTargetClickBound),
+ this.originEl.addEventListener("click", this._handleOriginClickBound);
+ var t = M.throttle(this._handleResize, 200);
+ this._handleThrottledResizeBound = t.bind(this),
+ window.addEventListener("resize", this._handleThrottledResizeBound)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.el.removeEventListener("click", this._handleTargetClickBound),
+ this.originEl.removeEventListener("click", this._handleOriginClickBound),
+ window.removeEventListener("resize", this._handleThrottledResizeBound)
+ }
+ }, {
+ key: "_handleTargetClick",
+ value: function (t) {
+ this.open()
+ }
+ }, {
+ key: "_handleOriginClick",
+ value: function (t) {
+ this.close()
+ }
+ }, {
+ key: "_handleResize",
+ value: function (t) {
+ this._calculatePositioning()
+ }
+ }, {
+ key: "_handleDocumentClick",
+ value: function (e) {
+ t(e.target).closest(".tap-target-wrapper").length || (this.close(),
+ e.preventDefault(),
+ e.stopPropagation())
+ }
+ }, {
+ key: "_setup",
+ value: function () {
+ this.wrapper = this.$el.parent()[0],
+ this.waveEl = t(this.wrapper).find(".tap-target-wave")[0],
+ this.originEl = t(this.wrapper).find(".tap-target-origin")[0],
+ this.contentEl = this.$el.find(".tap-target-content")[0],
+ t(this.wrapper).hasClass(".tap-target-wrapper") || (this.wrapper = document.createElement("div"),
+ this.wrapper.classList.add("tap-target-wrapper"),
+ this.$el.before(t(this.wrapper)),
+ this.wrapper.append(this.el)),
+ this.contentEl || (this.contentEl = document.createElement("div"),
+ this.contentEl.classList.add("tap-target-content"),
+ this.$el.append(this.contentEl)),
+ this.waveEl || (this.waveEl = document.createElement("div"),
+ this.waveEl.classList.add("tap-target-wave"),
+ this.originEl || (this.originEl = this.$origin.clone(!0, !0),
+ this.originEl.addClass("tap-target-origin"),
+ this.originEl.removeAttr("id"),
+ this.originEl.removeAttr("style"),
+ this.originEl = this.originEl[0],
+ this.waveEl.append(this.originEl)),
+ this.wrapper.append(this.waveEl))
+ }
+ }, {
+ key: "_calculatePositioning",
+ value: function () {
+ var e = "fixed" === this.$origin.css("position");
+ if (!e)
+ for (var i = this.$origin.parents(), n = 0; n < i.length && !(e = "fixed" == t(i[n]).css("position")); n++)
+ ;
+ var s = this.$origin.outerWidth(),
+ o = this.$origin.outerHeight(),
+ a = e ? this.$origin.offset().top - M.getDocumentScrollTop() : this.$origin.offset().top,
+ r = e ? this.$origin.offset().left - M.getDocumentScrollLeft() : this.$origin.offset().left,
+ l = window.innerWidth,
+ h = window.innerHeight,
+ d = l / 2,
+ u = h / 2,
+ c = r <= d,
+ p = r > d,
+ v = a <= u,
+ f = a > u,
+ m = r >= .25 * l && r <= .75 * l,
+ g = this.$el.outerWidth(),
+ _ = this.$el.outerHeight(),
+ y = a + o / 2 - _ / 2,
+ k = r + s / 2 - g / 2,
+ b = e ? "fixed" : "absolute",
+ w = m ? g : g / 2 + s,
+ C = _ / 2,
+ E = v ? _ / 2 : 0,
+ x = c && !m ? g / 2 - s : 0,
+ L = s,
+ T = f ? "bottom" : "top",
+ O = 2 * s,
+ $ = O,
+ D = _ / 2 - $ / 2,
+ B = g / 2 - O / 2,
+ I = {};
+ I.top = v ? y + "px" : "",
+ I.right = p ? l - k - g + "px" : "",
+ I.bottom = f ? h - y - _ + "px" : "",
+ I.left = c ? k + "px" : "",
+ I.position = b,
+ t(this.wrapper).css(I),
+ t(this.contentEl).css({
+ width: w + "px",
+ height: C + "px",
+ top: E + "px",
+ right: "0px",
+ bottom: "0px",
+ left: x + "px",
+ padding: L + "px",
+ verticalAlign: T
+ }),
+ t(this.waveEl).css({
+ top: D + "px",
+ left: B + "px",
+ width: O + "px",
+ height: $ + "px"
+ })
+ }
+ }, {
+ key: "open",
+ value: function () {
+ this.isOpen || ("function" == typeof this.options.onOpen && this.options.onOpen.call(this, this.$origin[0]),
+ this.isOpen = !0,
+ this.wrapper.classList.add("open"),
+ document.body.addEventListener("click", this._handleDocumentClickBound, !0),
+ document.body.addEventListener("touchend", this._handleDocumentClickBound))
+ }
+ }, {
+ key: "close",
+ value: function () {
+ this.isOpen && ("function" == typeof this.options.onClose && this.options.onClose.call(this, this.$origin[0]),
+ this.isOpen = !1,
+ this.wrapper.classList.remove("open"),
+ document.body.removeEventListener("click", this._handleDocumentClickBound, !0),
+ document.body.removeEventListener("touchend", this._handleDocumentClickBound))
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_FeatureDiscovery
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return e
+ }
+ }]),
+ n
+ }();
+ M.FeatureDiscovery = i,
+ M.jQueryLoaded && M.initializeJqueryWrapper(i, "featureDiscovery", "M_FeatureDiscovery")
+ }(cash),
+ function (t) {
+ "use strict";
+ var e = {
+ classes: ""
+ },
+ i = function (i) {
+ _inherits(n, Component);
+
+ function n(e, i) {
+ _classCallCheck(this, n);
+ var s = _possibleConstructorReturn(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, n, e, i));
+ return s.el.M_Select = s,
+ s.options = t.extend({}, n.defaults, i),
+ s.isMultiple = s.$el.prop("multiple"),
+ s._keysSelected = {},
+ s._valueDict = {},
+ s._setupDropdown(),
+ s._setupEventHandlers(),
+ s
}
- }
- }, {
- key: "_handleRangeMouseupTouchend",
- value: function() {
- this._mousedown = !1,
- this.$el.removeClass("active")
- }
- }, {
- key: "_handleRangeBlurMouseoutTouchleave",
- value: function() {
- if (!this._mousedown) {
- this.$el.removeClass("focused");
- var i = 7 + parseInt(this.$el.css("padding-left")) + "px";
- t(this.thumb).hasClass("active") && (e.remove(this.thumb),
- e({
- targets: this.thumb,
- height: 0,
- width: 0,
- top: 10,
- easing: "easeOutQuad",
- marginLeft: i,
- duration: 100
- })),
- t(this.thumb).removeClass("active")
+ return _createClass(n, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this._removeDropdown(),
+ this.el.M_Select = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ var e = this;
+ this._handleSelectChangeBound = this._handleSelectChange.bind(this),
+ this._handleOptionClickBound = this._handleOptionClick.bind(this),
+ this._handleInputClickBound = this._handleInputClick.bind(this),
+ t(this.dropdownOptions).find("li:not(.optgroup)").each(function (t) {
+ t.addEventListener("click", e._handleOptionClickBound)
+ }),
+ this.el.addEventListener("change", this._handleSelectChangeBound),
+ this.input.addEventListener("click", this._handleInputClickBound)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ var e = this;
+ t(this.dropdownOptions).find("li:not(.optgroup)").each(function (t) {
+ t.removeEventListener("click", e._handleOptionClickBound)
+ }),
+ this.el.removeEventListener("change", this._handleSelectChangeBound),
+ this.input.removeEventListener("click", this._handleInputClickBound),
+ this.input.removeEventListener("focus", this._handleInputFocusBound)
+ }
+ }, {
+ key: "_handleSelectChange",
+ value: function (t) {
+ this._setValueToInput()
+ }
+ }, {
+ key: "_handleOptionClick",
+ value: function (e) {
+ e.preventDefault();
+ var i = t(e.target).closest("li")[0],
+ n = i.id;
+ if (!t(i).hasClass("disabled") && !t(i).hasClass("optgroup") && n.length) {
+ var s = !0;
+ if (this.isMultiple) {
+ var o = t(this.dropdownOptions).find("li.disabled.selected");
+ o.length && (o.removeClass("selected"),
+ o.find('input[type="checkbox"]').prop("checked", !1),
+ this._toggleEntryFromArray(o[0].id));
+ var a = t(i).find('input[type="checkbox"]');
+ a.prop("checked", !a.prop("checked")),
+ s = this._toggleEntryFromArray(n)
+ } else
+ t(this.dropdownOptions).find("li").removeClass("active"),
+ t(i).toggleClass("active"),
+ this.input.value = i.textContent;
+ this._activateOption(t(this.dropdownOptions), i),
+ t(this._valueDict[n].el).prop("selected", s),
+ this.$el.trigger("change")
+ }
+ e.stopPropagation()
+ }
+ }, {
+ key: "_handleInputClick",
+ value: function () {
+ this.dropdown && this.dropdown.isOpen && (this._setValueToInput(),
+ this._setSelectedStates())
+ }
+ }, {
+ key: "_setupDropdown",
+ value: function () {
+ var e = this;
+ this.wrapper = document.createElement("div"),
+ t(this.wrapper).addClass("select-wrapper " + this.options.classes),
+ this.$el.before(t(this.wrapper)),
+ this.wrapper.appendChild(this.el),
+ this.el.disabled && this.wrapper.classList.add("disabled"),
+ this.$selectOptions = this.$el.children("option, optgroup"),
+ this.dropdownOptions = document.createElement("ul"),
+ this.dropdownOptions.id = "select-options-" + M.guid(),
+ t(this.dropdownOptions).addClass("dropdown-content select-dropdown " + (this.isMultiple ? "multiple-select-dropdown" : "")),
+ this.$selectOptions.length && this.$selectOptions.each(function (i) {
+ if (t(i).is("option")) {
+ var n = void 0;
+ n = e.isMultiple ? e._appendOptionWithIcon(e.$el, i, "multiple") : e._appendOptionWithIcon(e.$el, i),
+ e._addOptionToValueDict(i, n)
+ } else if (t(i).is("optgroup")) {
+ var s = t(i).children("option");
+ t(e.dropdownOptions).append(t('
' + i.getAttribute("label") + " ")[0]),
+ s.each(function (t) {
+ var i = e._appendOptionWithIcon(e.$el, t, "optgroup-option");
+ e._addOptionToValueDict(t, i)
+ })
+ }
+ }),
+ this.$el.after(this.dropdownOptions),
+ this.input = document.createElement("input"),
+ t(this.input).addClass("select-dropdown dropdown-trigger"),
+ this.input.setAttribute("type", "text"),
+ this.input.setAttribute("readonly", "true"),
+ this.input.setAttribute("data-target", this.dropdownOptions.id),
+ this.el.disabled && t(this.input).prop("disabled", "true"),
+ this.$el.before(this.input),
+ this._setValueToInput();
+ var i = t('
');
+ if (this.$el.before(i[0]),
+ !this.el.disabled) {
+ var n = {};
+ this.isMultiple && (n.closeOnClick = !1),
+ this.dropdown = M.Dropdown.init(this.input, n)
+ }
+ this._setSelectedStates()
+ }
+ }, {
+ key: "_addOptionToValueDict",
+ value: function (t, e) {
+ var i = Object.keys(this._valueDict).length,
+ n = this.dropdownOptions.id + i,
+ s = {};
+ e.id = n,
+ s.el = t,
+ s.optionEl = e,
+ this._valueDict[n] = s
+ }
+ }, {
+ key: "_removeDropdown",
+ value: function () {
+ t(this.wrapper).find(".caret").remove(),
+ t(this.input).remove(),
+ t(this.dropdownOptions).remove(),
+ t(this.wrapper).before(this.$el),
+ t(this.wrapper).remove()
+ }
+ }, {
+ key: "_appendOptionWithIcon",
+ value: function (e, i, n) {
+ var s = i.disabled ? "disabled " : "",
+ o = "optgroup-option" === n ? "optgroup-option " : "",
+ a = this.isMultiple ? '
' + i.innerHTML + " " : i.innerHTML,
+ r = t("
"),
+ l = t("
");
+ l.html(a),
+ r.addClass(s + " " + o),
+ r.append(l);
+ var h = i.getAttribute("data-icon");
+ i.getAttribute("class");
+ if (h) {
+ var d = t('
');
+ r.prepend(d)
+ }
+ return t(this.dropdownOptions).append(r[0]),
+ r[0]
+ }
+ }, {
+ key: "_toggleEntryFromArray",
+ value: function (e) {
+ var i = !this._keysSelected.hasOwnProperty(e);
+ return i ? this._keysSelected[e] = !0 : delete this._keysSelected[e],
+ t(this._valueDict[e].optionEl).toggleClass("active"),
+ t(this._valueDict[e].el).prop("selected", i),
+ i
+ }
+ }, {
+ key: "_setValueToInput",
+ value: function () {
+ var e = "";
+ if (this.$el.find("option").each(function (i) {
+ if (t(i).prop("selected")) {
+ var n = t(i).text();
+ e += "" === e ? n : ", " + n
+ }
+ }),
+ "" === e) {
+ var i = this.$el.find("option:disabled").eq(0);
+ i.length && (e = i.text())
+ }
+ this.input.value = e
+ }
+ }, {
+ key: "_setSelectedStates",
+ value: function () {
+ this._keysSelected = {};
+ for (var e in this._valueDict) {
+ var i = this._valueDict[e];
+ t(i.el).prop("selected") ? (t(i.optionEl).find('input[type="checkbox"]').prop("checked", !0),
+ this._activateOption(t(this.dropdownOptions), t(i.optionEl)),
+ this._keysSelected[e] = !0) : (t(i.optionEl).find('input[type="checkbox"]').prop("checked", !1),
+ t(i.optionEl).removeClass("selected"))
+ }
+ }
+ }, {
+ key: "_activateOption",
+ value: function (e, i) {
+ if (i) {
+ this.isMultiple || e.find("li.selected").removeClass("selected");
+ t(i).addClass("selected")
+ }
+ }
+ }, {
+ key: "getSelectedValues",
+ value: function () {
+ var t = [];
+ for (var e in this._keysSelected)
+ t.push(this._valueDict[e].el.value);
+ return t
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(n.__proto__ || Object.getPrototypeOf(n), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Select
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return e
+ }
+ }]),
+ n
+ }();
+ M.Select = i,
+ M.jQueryLoaded && M.initializeJqueryWrapper(i, "select", "M_Select")
+ }(cash),
+ function (t, e) {
+ "use strict";
+ var i = {},
+ n = function (n) {
+ _inherits(s, Component);
+
+ function s(e, i) {
+ _classCallCheck(this, s);
+ var n = _possibleConstructorReturn(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this, s, e, i));
+ return n.el.M_Range = n,
+ n.options = t.extend({}, s.defaults, i),
+ n._mousedown = !1,
+ n._setupThumb(),
+ n._setupEventHandlers(),
+ n
}
- }
- }, {
- key: "_setupThumb",
- value: function() {
- this.thumb = document.createElement("span"),
- this.value = document.createElement("span"),
- t(this.thumb).addClass("thumb"),
- t(this.value).addClass("value"),
- t(this.thumb).append(this.value),
- this.$el.after(this.thumb)
- }
- }, {
- key: "_removeThumb",
- value: function() {
- t(this.thumb).remove()
- }
- }, {
- key: "_showRangeBubble",
- value: function() {
- var i = -7 + parseInt(t(this.thumb).parent().css("padding-left")) + "px";
- e.remove(this.thumb),
- e({
- targets: this.thumb,
- height: 30,
- width: 30,
- top: -30,
- marginLeft: i,
- duration: 300,
- easing: "easeOutQuint"
- })
- }
- }, {
- key: "_calcRangeOffset",
- value: function() {
- var t = this.$el.width() - 15
- , e = parseFloat(this.$el.attr("max"))
- , i = parseFloat(this.$el.attr("min"));
- return (parseFloat(this.$el.val()) - i) / (e - i) * t
- }
- }], [{
- key: "init",
- value: function(t, e) {
- return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
- }
- }, {
- key: "getInstance",
- value: function(t) {
- return (t.jquery ? t[0] : t).M_Range
- }
- }, {
- key: "defaults",
- get: function() {
- return i
- }
- }]),
- s
- }();
- M.Range = n,
- M.jQueryLoaded && M.initializeJqueryWrapper(n, "range", "M_Range"),
- n.init(t("input[type=range]"))
-}(cash, M.anime);
+ return _createClass(s, [{
+ key: "destroy",
+ value: function () {
+ this._removeEventHandlers(),
+ this._removeThumb(),
+ this.el.M_Range = void 0
+ }
+ }, {
+ key: "_setupEventHandlers",
+ value: function () {
+ this._handleRangeChangeBound = this._handleRangeChange.bind(this),
+ this._handleRangeFocusBound = this._handleRangeFocus.bind(this),
+ this._handleRangeMousedownTouchstartBound = this._handleRangeMousedownTouchstart.bind(this),
+ this._handleRangeInputMousemoveTouchmoveBound = this._handleRangeInputMousemoveTouchmove.bind(this),
+ this._handleRangeMouseupTouchendBound = this._handleRangeMouseupTouchend.bind(this),
+ this._handleRangeBlurMouseoutTouchleaveBound = this._handleRangeBlurMouseoutTouchleave.bind(this),
+ this.el.addEventListener("change", this._handleRangeChangeBound),
+ this.el.addEventListener("focus", this._handleRangeFocusBound),
+ this.el.addEventListener("mousedown", this._handleRangeMousedownTouchstartBound),
+ this.el.addEventListener("touchstart", this._handleRangeMousedownTouchstartBound),
+ this.el.addEventListener("input", this._handleRangeInputMousemoveTouchmoveBound),
+ this.el.addEventListener("mousemove", this._handleRangeInputMousemoveTouchmoveBound),
+ this.el.addEventListener("touchmove", this._handleRangeInputMousemoveTouchmoveBound),
+ this.el.addEventListener("mouseup", this._handleRangeMouseupTouchendBound),
+ this.el.addEventListener("touchend", this._handleRangeMouseupTouchendBound),
+ this.el.addEventListener("blur", this._handleRangeBlurMouseoutTouchleaveBound),
+ this.el.addEventListener("mouseout", this._handleRangeBlurMouseoutTouchleaveBound),
+ this.el.addEventListener("touchleave", this._handleRangeBlurMouseoutTouchleaveBound)
+ }
+ }, {
+ key: "_removeEventHandlers",
+ value: function () {
+ this.el.removeEventListener("change", this._handleRangeChangeBound),
+ this.el.removeEventListener("focus", this._handleRangeFocusBound),
+ this.el.removeEventListener("mousedown", this._handleRangeMousedownTouchstartBound),
+ this.el.removeEventListener("touchstart", this._handleRangeMousedownTouchstartBound),
+ this.el.removeEventListener("input", this._handleRangeInputMousemoveTouchmoveBound),
+ this.el.removeEventListener("mousemove", this._handleRangeInputMousemoveTouchmoveBound),
+ this.el.removeEventListener("touchmove", this._handleRangeInputMousemoveTouchmoveBound),
+ this.el.removeEventListener("mouseup", this._handleRangeMouseupTouchendBound),
+ this.el.removeEventListener("touchend", this._handleRangeMouseupTouchendBound),
+ this.el.removeEventListener("blur", this._handleRangeBlurMouseoutTouchleaveBound),
+ this.el.removeEventListener("mouseout", this._handleRangeBlurMouseoutTouchleaveBound),
+ this.el.removeEventListener("touchleave", this._handleRangeBlurMouseoutTouchleaveBound)
+ }
+ }, {
+ key: "_handleRangeChange",
+ value: function () {
+ t(this.value).html(this.$el.val()),
+ t(this.thumb).hasClass("active") || this._showRangeBubble();
+ var e = this._calcRangeOffset();
+ t(this.thumb).addClass("active").css("left", e + "px")
+ }
+ }, {
+ key: "_handleRangeFocus",
+ value: function () {
+ M.tabPressed && this.$el.addClass("focused")
+ }
+ }, {
+ key: "_handleRangeMousedownTouchstart",
+ value: function (e) {
+ if (t(this.value).html(this.$el.val()),
+ this._mousedown = !0,
+ this.$el.addClass("active"),
+ t(this.thumb).hasClass("active") || this._showRangeBubble(),
+ "input" !== e.type) {
+ var i = this._calcRangeOffset();
+ t(this.thumb).addClass("active").css("left", i + "px")
+ }
+ }
+ }, {
+ key: "_handleRangeInputMousemoveTouchmove",
+ value: function () {
+ if (this._mousedown) {
+ t(this.thumb).hasClass("active") || this._showRangeBubble();
+ var e = this._calcRangeOffset();
+ t(this.thumb).addClass("active").css("left", e + "px"),
+ t(this.value).html(this.$el.val())
+ }
+ }
+ }, {
+ key: "_handleRangeMouseupTouchend",
+ value: function () {
+ this._mousedown = !1,
+ this.$el.removeClass("active")
+ }
+ }, {
+ key: "_handleRangeBlurMouseoutTouchleave",
+ value: function () {
+ if (!this._mousedown) {
+ this.$el.removeClass("focused");
+ var i = 7 + parseInt(this.$el.css("padding-left")) + "px";
+ t(this.thumb).hasClass("active") && (e.remove(this.thumb),
+ e({
+ targets: this.thumb,
+ height: 0,
+ width: 0,
+ top: 10,
+ easing: "easeOutQuad",
+ marginLeft: i,
+ duration: 100
+ })),
+ t(this.thumb).removeClass("active")
+ }
+ }
+ }, {
+ key: "_setupThumb",
+ value: function () {
+ this.thumb = document.createElement("span"),
+ this.value = document.createElement("span"),
+ t(this.thumb).addClass("thumb"),
+ t(this.value).addClass("value"),
+ t(this.thumb).append(this.value),
+ this.$el.after(this.thumb)
+ }
+ }, {
+ key: "_removeThumb",
+ value: function () {
+ t(this.thumb).remove()
+ }
+ }, {
+ key: "_showRangeBubble",
+ value: function () {
+ var i = -7 + parseInt(t(this.thumb).parent().css("padding-left")) + "px";
+ e.remove(this.thumb),
+ e({
+ targets: this.thumb,
+ height: 30,
+ width: 30,
+ top: -30,
+ marginLeft: i,
+ duration: 300,
+ easing: "easeOutQuint"
+ })
+ }
+ }, {
+ key: "_calcRangeOffset",
+ value: function () {
+ var t = this.$el.width() - 15,
+ e = parseFloat(this.$el.attr("max")),
+ i = parseFloat(this.$el.attr("min"));
+ return (parseFloat(this.$el.val()) - i) / (e - i) * t
+ }
+ }], [{
+ key: "init",
+ value: function (t, e) {
+ return _get(s.__proto__ || Object.getPrototypeOf(s), "init", this).call(this, this, t, e)
+ }
+ }, {
+ key: "getInstance",
+ value: function (t) {
+ return (t.jquery ? t[0] : t).M_Range
+ }
+ }, {
+ key: "defaults",
+ get: function () {
+ return i
+ }
+ }]),
+ s
+ }();
+ M.Range = n,
+ M.jQueryLoaded && M.initializeJqueryWrapper(n, "range", "M_Range"),
+ n.init(t("input[type=range]"))
+ }(cash, M.anime);
+
function get_gravatar(email, size) {
- var MD5 = function(s) {
+ var MD5 = function (s) {
function L(k, d) {
return (k << d) | (k >>> (32 - d))
}
+
function K(G, k) {
var I, d, F, H, x;
F = (G & 2147483648);
@@ -15359,34 +15675,43 @@ function get_gravatar(email, size) {
return (x ^ F ^ H)
}
}
+
function r(d, F, k) {
return (d & F) | ((~d) & k)
}
+
function q(d, F, k) {
return (d & k) | (F & (~k))
}
+
function p(d, F, k) {
return (d ^ F ^ k)
}
+
function n(d, F, k) {
return (F ^ (d | (~k)))
}
+
function u(G, F, aa, Z, k, H, I) {
G = K(G, K(K(r(F, aa, Z), k), I));
return K(L(G, H), F)
}
+
function f(G, F, aa, Z, k, H, I) {
G = K(G, K(K(q(F, aa, Z), k), I));
return K(L(G, H), F)
}
+
function D(G, F, aa, Z, k, H, I) {
G = K(G, K(K(p(F, aa, Z), k), I));
return K(L(G, H), F)
}
+
function t(G, F, aa, Z, k, H, I) {
G = K(G, K(K(n(F, aa, Z), k), I));
return K(L(G, H), F)
}
+
function e(G) {
var Z;
var F = G.length;
@@ -15409,8 +15734,11 @@ function get_gravatar(email, size) {
aa[I - 1] = F >>> 29;
return aa
}
+
function B(x) {
- var k = "", F = "", G, d;
+ var k = "",
+ F = "",
+ G, d;
for (d = 0; d <= 3; d++) {
G = (x >>> (d * 8)) & 255;
F = "0" + G.toString(16);
@@ -15418,6 +15746,7 @@ function get_gravatar(email, size) {
}
return k
}
+
function J(k) {
k = k.replace(/rn/g, "n");
var d = "";
@@ -15440,22 +15769,22 @@ function get_gravatar(email, size) {
}
var C = Array();
var P, h, E, v, g, Y, X, W, V;
- var S = 7
- , Q = 12
- , N = 17
- , M = 22;
- var A = 5
- , z = 9
- , y = 14
- , w = 20;
- var o = 4
- , m = 11
- , l = 16
- , j = 23;
- var U = 6
- , T = 10
- , R = 15
- , O = 21;
+ var S = 7,
+ Q = 12,
+ N = 17,
+ M = 22;
+ var A = 5,
+ z = 9,
+ y = 14,
+ w = 20;
+ var o = 4,
+ m = 11,
+ l = 16,
+ j = 23;
+ var U = 6,
+ T = 10,
+ R = 15,
+ O = 21;
s = J(s);
C = e(s);
Y = 1732584193;
@@ -15541,11 +15870,11 @@ function get_gravatar(email, size) {
};
var size = size || 80;
return 'https://gravatar.shino.cc/avatar/' + MD5(email) + '.jpg?s=' + size + '&d=mm';
-}
-!function(e) {
+}! function (e) {
"use strict";
- var n = function(n, t, o) {
- var l, r = e.document, i = r.createElement("link");
+ var n = function (n, t, o) {
+ var l, r = e.document,
+ i = r.createElement("link");
if (t)
l = t;
else {
@@ -15554,81 +15883,427 @@ function get_gravatar(email, size) {
}
var d = r.styleSheets;
i.rel = "stylesheet",
- i.href = n,
- i.media = "only x",
- l.parentNode.insertBefore(i, t ? l : l.nextSibling);
- var f = function(e) {
- for (var n = i.href, t = d.length; t--; )
+ i.href = n,
+ i.media = "only x",
+ l.parentNode.insertBefore(i, t ? l : l.nextSibling);
+ var f = function (e) {
+ for (var n = i.href, t = d.length; t--;)
if (d[t].href === n)
return e();
- setTimeout(function() {
+ setTimeout(function () {
f(e)
})
};
return i.onloadcssdefined = f,
- f(function() {
- i.media = o || "all"
- }),
- i
+ f(function () {
+ i.media = o || "all"
+ }),
+ i
};
"undefined" != typeof module ? module.exports = n : e.loadCSS = n
}("undefined" != typeof global ? global : this);
// tocbot
-!function(e){function t(o){if(n[o])return n[o].exports;var l=n[o]={i:o,l:!1,exports:{}};return e[o].call(l.exports,l,l.exports,t),l.l=!0,l.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){(function(o){var l,r,i;!function(n,o){r=[],l=o(n),void 0!==(i="function"==typeof l?l.apply(t,r):l)&&(e.exports=i)}(void 0!==o?o:this.window||this.global,function(e){"use strict";function t(){for(var e={},t=0;t
e.fixedSidebarOffset?-1===n.className.indexOf(e.positionFixedClass)&&(n.className+=h+e.positionFixedClass):n.className=n.className.split(h+e.positionFixedClass).join("")}function i(t){if(e.scrollContainer&&document.querySelector(e.scrollContainer))var n=document.querySelector(e.scrollContainer).scrollTop;else var n=document.documentElement.scrollTop||f.scrollTop;e.positionFixedSelector&&r();var o,l=t;if(m&&null!==document.querySelector(e.tocSelector)&&l.length>0){d.call(l,function(t,r){if(t.offsetTop>n+e.headingsOffset+10){return o=l[0===r?r:r-1],!0}if(r===l.length-1)return o=l[l.length-1],!0});var i=document.querySelector(e.tocSelector).querySelectorAll("."+e.linkClass);u.call(i,function(t){t.className=t.className.split(h+e.activeLinkClass).join("")});var c=document.querySelector(e.tocSelector).querySelectorAll("."+e.listItemClass);u.call(c,function(t){t.className=t.className.split(h+e.activeListItemClass).join("")});var a=document.querySelector(e.tocSelector).querySelector("."+e.linkClass+".node-name--"+o.nodeName+'[href="#'+o.id+'"]');-1===a.className.indexOf(e.activeLinkClass)&&(a.className+=h+e.activeLinkClass);var p=a.parentNode;p&&-1===p.className.indexOf(e.activeListItemClass)&&(p.className+=h+e.activeListItemClass);var C=document.querySelector(e.tocSelector).querySelectorAll("."+e.listClass+"."+e.collapsibleClass);u.call(C,function(t){-1===t.className.indexOf(e.isCollapsedClass)&&(t.className+=h+e.isCollapsedClass)}),a.nextSibling&&-1!==a.nextSibling.className.indexOf(e.isCollapsedClass)&&(a.nextSibling.className=a.nextSibling.className.split(h+e.isCollapsedClass).join("")),s(a.parentNode.parentNode)}}function s(t){return-1!==t.className.indexOf(e.collapsibleClass)&&-1!==t.className.indexOf(e.isCollapsedClass)?(t.className=t.className.split(h+e.isCollapsedClass).join(""),s(t.parentNode.parentNode)):t}function c(t){var n=t.target||t.srcElement;"string"==typeof n.className&&-1!==n.className.indexOf(e.linkClass)&&(m=!1)}function a(){m=!0}var u=[].forEach,d=[].some,f=document.body,m=!0,h=" ";return{enableTocAnimation:a,disableTocAnimation:c,render:n,updateToc:i}}},function(e,t){e.exports=function(e){function t(e){return e[e.length-1]}function n(e){return+e.nodeName.split("H").join("")}function o(t){var o={id:t.id,children:[],nodeName:t.nodeName,headingLevel:n(t),textContent:t.textContent.trim()};return e.includeHtml&&(o.childNodes=t.childNodes),o}function l(l,r){for(var i=o(l),s=n(l),c=r,a=t(c),u=a?a.headingLevel:0,d=s-u;d>0;)a=t(c),a&&void 0!==a.children&&(c=a.children),d--;return s>=e.collapseDepth&&(i.isCollapsed=!0),c.push(i),c}function r(t,n){var o=n;e.ignoreSelector&&(o=n.split(",").map(function(t){return t.trim()+":not("+e.ignoreSelector+")"}));try{return document.querySelector(t).querySelectorAll(o)}catch(e){return console.warn("Element not found: "+t),null}}function i(e){return s.call(e,function(e,t){return l(o(t),e.nest),e},{nest:[]})}var s=[].reduce;return{nestHeadingsArray:i,selectHeadings:r}}},function(e,t){function n(e){function t(e){return"a"===e.tagName.toLowerCase()&&(e.hash.length>0||"#"===e.href.charAt(e.href.length-1))&&(n(e.href)===s||n(e.href)+"#"===s)}function n(e){return e.slice(0,e.lastIndexOf("#"))}function l(e){var t=document.getElementById(e.substring(1));t&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())}!function(){document.documentElement.style}();var r=e.duration,i=e.offset,s=location.hash?n(location.href):location.href;!function(){function n(n){!t(n.target)||n.target.className.indexOf("no-smooth-scroll")>-1||"#"===n.target.href.charAt(n.target.href.length-2)&&"!"===n.target.href.charAt(n.target.href.length-1)||-1===n.target.className.indexOf(e.linkClass)||o(n.target.hash,{duration:r,offset:i,callback:function(){l(n.target.hash)}})}document.body.addEventListener("click",n,!1)}()}function o(e,t){function n(e){i=e-r,window.scrollTo(0,c.easing(i,s,u,d)),i e.fixedSidebarOffset ? -1 === n.className.indexOf(e.positionFixedClass) && (n.className += h + e.positionFixedClass) : n.className = n.className.split(h + e.positionFixedClass).join("")
+ }
+
+ function i(t) {
+ if (e.scrollContainer && document.querySelector(e.scrollContainer)) var n = document.querySelector(e.scrollContainer).scrollTop;
+ else var n = document.documentElement.scrollTop || f.scrollTop;
+ e.positionFixedSelector && r();
+ var o, l = t;
+ if (m && null !== document.querySelector(e.tocSelector) && l.length > 0) {
+ d.call(l, function (t, r) {
+ if (t.offsetTop > n + e.headingsOffset + 10) {
+ return o = l[0 === r ? r : r - 1], !0
+ }
+ if (r === l.length - 1) return o = l[l.length - 1], !0
+ });
+ var i = document.querySelector(e.tocSelector).querySelectorAll("." + e.linkClass);
+ u.call(i, function (t) {
+ t.className = t.className.split(h + e.activeLinkClass).join("")
+ });
+ var c = document.querySelector(e.tocSelector).querySelectorAll("." + e.listItemClass);
+ u.call(c, function (t) {
+ t.className = t.className.split(h + e.activeListItemClass).join("")
+ });
+ var a = document.querySelector(e.tocSelector).querySelector("." + e.linkClass + ".node-name--" + o.nodeName + '[href="#' + o.id + '"]'); - 1 === a.className.indexOf(e.activeLinkClass) && (a.className += h + e.activeLinkClass);
+ var p = a.parentNode;
+ p && -1 === p.className.indexOf(e.activeListItemClass) && (p.className += h + e.activeListItemClass);
+ var C = document.querySelector(e.tocSelector).querySelectorAll("." + e.listClass + "." + e.collapsibleClass);
+ u.call(C, function (t) {
+ -1 === t.className.indexOf(e.isCollapsedClass) && (t.className += h + e.isCollapsedClass)
+ }), a.nextSibling && -1 !== a.nextSibling.className.indexOf(e.isCollapsedClass) && (a.nextSibling.className = a.nextSibling.className.split(h + e.isCollapsedClass).join("")), s(a.parentNode.parentNode)
+ }
+ }
+
+ function s(t) {
+ return -1 !== t.className.indexOf(e.collapsibleClass) && -1 !== t.className.indexOf(e.isCollapsedClass) ? (t.className = t.className.split(h + e.isCollapsedClass).join(""), s(t.parentNode.parentNode)) : t
+ }
+
+ function c(t) {
+ var n = t.target || t.srcElement;
+ "string" == typeof n.className && -1 !== n.className.indexOf(e.linkClass) && (m = !1)
+ }
+
+ function a() {
+ m = !0
+ }
+ var u = [].forEach,
+ d = [].some,
+ f = document.body,
+ m = !0,
+ h = " ";
+ return {
+ enableTocAnimation: a,
+ disableTocAnimation: c,
+ render: n,
+ updateToc: i
+ }
+ }
+}, function (e, t) {
+ e.exports = function (e) {
+ function t(e) {
+ return e[e.length - 1]
+ }
+
+ function n(e) {
+ return +e.nodeName.split("H").join("")
+ }
+
+ function o(t) {
+ var o = {
+ id: t.id,
+ children: [],
+ nodeName: t.nodeName,
+ headingLevel: n(t),
+ textContent: t.textContent.trim()
+ };
+ return e.includeHtml && (o.childNodes = t.childNodes), o
+ }
+
+ function l(l, r) {
+ for (var i = o(l), s = n(l), c = r, a = t(c), u = a ? a.headingLevel : 0, d = s - u; d > 0;) a = t(c), a && void 0 !== a.children && (c = a.children), d--;
+ return s >= e.collapseDepth && (i.isCollapsed = !0), c.push(i), c
+ }
+
+ function r(t, n) {
+ var o = n;
+ e.ignoreSelector && (o = n.split(",").map(function (t) {
+ return t.trim() + ":not(" + e.ignoreSelector + ")"
+ }));
+ try {
+ return document.querySelector(t).querySelectorAll(o)
+ } catch (e) {
+ return console.warn("Element not found: " + t), null
+ }
+ }
+
+ function i(e) {
+ return s.call(e, function (e, t) {
+ return l(o(t), e.nest), e
+ }, {
+ nest: []
+ })
+ }
+ var s = [].reduce;
+ return {
+ nestHeadingsArray: i,
+ selectHeadings: r
+ }
+ }
+}, function (e, t) {
+ function n(e) {
+ function t(e) {
+ return "a" === e.tagName.toLowerCase() && (e.hash.length > 0 || "#" === e.href.charAt(e.href.length - 1)) && (n(e.href) === s || n(e.href) + "#" === s)
+ }
+
+ function n(e) {
+ return e.slice(0, e.lastIndexOf("#"))
+ }
+
+ function l(e) {
+ var t = document.getElementById(e.substring(1));
+ t && (/^(?:a|select|input|button|textarea)$/i.test(t.tagName) || (t.tabIndex = -1), t.focus())
+ }! function () {
+ document.documentElement.style
+ }();
+ var r = e.duration,
+ i = e.offset,
+ s = location.hash ? n(location.href) : location.href;
+ ! function () {
+ function n(n) {
+ !t(n.target) || n.target.className.indexOf("no-smooth-scroll") > -1 || "#" === n.target.href.charAt(n.target.href.length - 2) && "!" === n.target.href.charAt(n.target.href.length - 1) || -1 === n.target.className.indexOf(e.linkClass) || o(n.target.hash, {
+ duration: r,
+ offset: i,
+ callback: function () {
+ l(n.target.hash)
+ }
+ })
+ }
+ document.body.addEventListener("click", n, !1)
+ }()
+ }
+
+ function o(e, t) {
+ function n(e) {
+ i = e - r, window.scrollTo(0, c.easing(i, s, u, d)), i < d ? requestAnimationFrame(n) : o()
+ }
+
+ function o() {
+ window.scrollTo(0, s + u), "function" == typeof c.callback && c.callback()
+ }
+
+ function l(e, t, n, o) {
+ return (e /= o / 2) < 1 ? n / 2 * e * e + t : (e--, -n / 2 * (e * (e - 2) - 1) + t)
+ }
+ var r, i, s = window.pageYOffset,
+ c = {
+ duration: t.duration,
+ offset: t.offset || 0,
+ callback: t.callback,
+ easing: t.easing || l
+ },
+ a = document.querySelector('[id="' + decodeURI(e).split("#").join("") + '"]'),
+ u = "string" == typeof e ? c.offset + (e ? a && a.getBoundingClientRect().top || 0 : -(document.documentElement.scrollTop || document.body.scrollTop)) : e,
+ d = "function" == typeof c.duration ? c.duration(u) : c.duration;
+ requestAnimationFrame(function (e) {
+ r = e, n(e)
+ })
+ }
+ t.initSmoothScrolling = n
+}]);
function social_share() {
var QRCode;
- !function() {
+ ! function () {
function t(t) {
this.mode = s.MODE_8BIT_BYTE,
- this.data = t,
- this.parsedData = [];
+ this.data = t,
+ this.parsedData = [];
for (var e = 0, r = this.data.length; e < r; e++) {
- var i = []
- , n = this.data.charCodeAt(e);
+ var i = [],
+ n = this.data.charCodeAt(e);
n > 65536 ? (i[0] = 240 | (1835008 & n) >>> 18,
- i[1] = 128 | (258048 & n) >>> 12,
- i[2] = 128 | (4032 & n) >>> 6,
- i[3] = 128 | 63 & n) : n > 2048 ? (i[0] = 224 | (61440 & n) >>> 12,
- i[1] = 128 | (4032 & n) >>> 6,
- i[2] = 128 | 63 & n) : n > 128 ? (i[0] = 192 | (1984 & n) >>> 6,
- i[1] = 128 | 63 & n) : i[0] = n,
- this.parsedData.push(i)
+ i[1] = 128 | (258048 & n) >>> 12,
+ i[2] = 128 | (4032 & n) >>> 6,
+ i[3] = 128 | 63 & n) : n > 2048 ? (i[0] = 224 | (61440 & n) >>> 12,
+ i[1] = 128 | (4032 & n) >>> 6,
+ i[2] = 128 | 63 & n) : n > 128 ? (i[0] = 192 | (1984 & n) >>> 6,
+ i[1] = 128 | 63 & n) : i[0] = n,
+ this.parsedData.push(i)
}
this.parsedData = Array.prototype.concat.apply([], this.parsedData),
- this.parsedData.length != this.data.length && (this.parsedData.unshift(191),
- this.parsedData.unshift(187),
- this.parsedData.unshift(239))
+ this.parsedData.length != this.data.length && (this.parsedData.unshift(191),
+ this.parsedData.unshift(187),
+ this.parsedData.unshift(239))
}
+
function e(t, e) {
this.typeNumber = t,
- this.errorCorrectLevel = e,
- this.modules = null,
- this.moduleCount = 0,
- this.dataCache = null,
- this.dataList = []
+ this.errorCorrectLevel = e,
+ this.modules = null,
+ this.moduleCount = 0,
+ this.dataCache = null,
+ this.dataList = []
}
+
function r(t, e) {
if (void 0 == t.length)
throw new Error(t.length + "/" + e);
- for (var r = 0; r < t.length && 0 == t[r]; )
+ for (var r = 0; r < t.length && 0 == t[r];)
r++;
this.num = new Array(t.length - r + e);
for (var i = 0; i < t.length - r; i++)
this.num[i] = t[i + r]
}
+
function i(t, e) {
this.totalCount = t,
- this.dataCount = e
+ this.dataCount = e
}
+
function n() {
this.buffer = [],
- this.length = 0
+ this.length = 0
}
+
function o() {
- var t = !1
- , e = navigator.userAgent;
+ var t = !1,
+ e = navigator.userAgent;
if (/android/i.test(e)) {
t = !0;
var r = e.toString().match(/android ([0-9]\.[0-9])/i);
@@ -15636,24 +16311,25 @@ function social_share() {
}
return t
}
+
function a(t, e) {
- for (var r = 1, i = function(t) {
- var e = encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g, "a");
- return e.length + (e.length != t ? 3 : 0)
- }(t), n = 0, o = d.length; n <= o; n++) {
+ for (var r = 1, i = function (t) {
+ var e = encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g, "a");
+ return e.length + (e.length != t ? 3 : 0)
+ }(t), n = 0, o = d.length; n <= o; n++) {
var a = 0;
switch (e) {
- case h.L:
- a = d[n][0];
- break;
- case h.M:
- a = d[n][1];
- break;
- case h.Q:
- a = d[n][2];
- break;
- case h.H:
- a = d[n][3]
+ case h.L:
+ a = d[n][0];
+ break;
+ case h.M:
+ a = d[n][1];
+ break;
+ case h.Q:
+ a = d[n][2];
+ break;
+ case h.H:
+ a = d[n][3]
}
if (i <= a)
break;
@@ -15664,786 +16340,1014 @@ function social_share() {
return r
}
t.prototype = {
- getLength: function(t) {
- return this.parsedData.length
- },
- write: function(t) {
- for (var e = 0, r = this.parsedData.length; e < r; e++)
- t.put(this.parsedData[e], 8)
- }
- },
- e.prototype = {
- addData: function(e) {
- var r = new t(e);
- this.dataList.push(r),
- this.dataCache = null
- },
- isDark: function(t, e) {
- if (t < 0 || this.moduleCount <= t || e < 0 || this.moduleCount <= e)
- throw new Error(t + "," + e);
- return this.modules[t][e]
- },
- getModuleCount: function() {
- return this.moduleCount
- },
- make: function() {
- this.makeImpl(!1, this.getBestMaskPattern())
- },
- makeImpl: function(t, r) {
- this.moduleCount = 4 * this.typeNumber + 17,
- this.modules = new Array(this.moduleCount);
- for (var i = 0; i < this.moduleCount; i++) {
- this.modules[i] = new Array(this.moduleCount);
- for (var n = 0; n < this.moduleCount; n++)
- this.modules[i][n] = null
- }
- this.setupPositionProbePattern(0, 0),
- this.setupPositionProbePattern(this.moduleCount - 7, 0),
- this.setupPositionProbePattern(0, this.moduleCount - 7),
- this.setupPositionAdjustPattern(),
- this.setupTimingPattern(),
- this.setupTypeInfo(t, r),
- this.typeNumber >= 7 && this.setupTypeNumber(t),
- null == this.dataCache && (this.dataCache = e.createData(this.typeNumber, this.errorCorrectLevel, this.dataList)),
- this.mapData(this.dataCache, r)
- },
- setupPositionProbePattern: function(t, e) {
- for (var r = -1; r <= 7; r++)
- if (!(t + r <= -1 || this.moduleCount <= t + r))
- for (var i = -1; i <= 7; i++)
- e + i <= -1 || this.moduleCount <= e + i || (this.modules[t + r][e + i] = 0 <= r && r <= 6 && (0 == i || 6 == i) || 0 <= i && i <= 6 && (0 == r || 6 == r) || 2 <= r && r <= 4 && 2 <= i && i <= 4)
- },
- getBestMaskPattern: function() {
- for (var t = 0, e = 0, r = 0; r < 8; r++) {
- this.makeImpl(!0, r);
- var i = u.getLostPoint(this);
- (0 == r || t > i) && (t = i,
- e = r)
+ getLength: function (t) {
+ return this.parsedData.length
+ },
+ write: function (t) {
+ for (var e = 0, r = this.parsedData.length; e < r; e++)
+ t.put(this.parsedData[e], 8)
}
- return e
},
- createMovieClip: function(t, e, r) {
- var i = t.createEmptyMovieClip(e, r);
- this.make();
- for (var n = 0; n < this.modules.length; n++)
- for (var o = 1 * n, a = 0; a < this.modules[n].length; a++) {
- var s = 1 * a;
- this.modules[n][a] && (i.beginFill(0, 100),
- i.moveTo(s, o),
- i.lineTo(s + 1, o),
- i.lineTo(s + 1, o + 1),
- i.lineTo(s, o + 1),
- i.endFill())
+ e.prototype = {
+ addData: function (e) {
+ var r = new t(e);
+ this.dataList.push(r),
+ this.dataCache = null
+ },
+ isDark: function (t, e) {
+ if (t < 0 || this.moduleCount <= t || e < 0 || this.moduleCount <= e)
+ throw new Error(t + "," + e);
+ return this.modules[t][e]
+ },
+ getModuleCount: function () {
+ return this.moduleCount
+ },
+ make: function () {
+ this.makeImpl(!1, this.getBestMaskPattern())
+ },
+ makeImpl: function (t, r) {
+ this.moduleCount = 4 * this.typeNumber + 17,
+ this.modules = new Array(this.moduleCount);
+ for (var i = 0; i < this.moduleCount; i++) {
+ this.modules[i] = new Array(this.moduleCount);
+ for (var n = 0; n < this.moduleCount; n++)
+ this.modules[i][n] = null
}
- return i
- },
- setupTimingPattern: function() {
- for (var t = 8; t < this.moduleCount - 8; t++)
- null == this.modules[t][6] && (this.modules[t][6] = t % 2 == 0);
- for (var e = 8; e < this.moduleCount - 8; e++)
- null == this.modules[6][e] && (this.modules[6][e] = e % 2 == 0)
- },
- setupPositionAdjustPattern: function() {
- for (var t = u.getPatternPosition(this.typeNumber), e = 0; e < t.length; e++)
- for (var r = 0; r < t.length; r++) {
- var i = t[e]
- , n = t[r];
- if (null == this.modules[i][n])
- for (var o = -2; o <= 2; o++)
- for (var a = -2; a <= 2; a++)
- this.modules[i + o][n + a] = -2 == o || 2 == o || -2 == a || 2 == a || 0 == o && 0 == a
+ this.setupPositionProbePattern(0, 0),
+ this.setupPositionProbePattern(this.moduleCount - 7, 0),
+ this.setupPositionProbePattern(0, this.moduleCount - 7),
+ this.setupPositionAdjustPattern(),
+ this.setupTimingPattern(),
+ this.setupTypeInfo(t, r),
+ this.typeNumber >= 7 && this.setupTypeNumber(t),
+ null == this.dataCache && (this.dataCache = e.createData(this.typeNumber, this.errorCorrectLevel, this.dataList)),
+ this.mapData(this.dataCache, r)
+ },
+ setupPositionProbePattern: function (t, e) {
+ for (var r = -1; r <= 7; r++)
+ if (!(t + r <= -1 || this.moduleCount <= t + r))
+ for (var i = -1; i <= 7; i++)
+ e + i <= -1 || this.moduleCount <= e + i || (this.modules[t + r][e + i] = 0 <= r && r <= 6 && (0 == i || 6 == i) || 0 <= i && i <= 6 && (0 == r || 6 == r) || 2 <= r && r <= 4 && 2 <= i && i <= 4)
+ },
+ getBestMaskPattern: function () {
+ for (var t = 0, e = 0, r = 0; r < 8; r++) {
+ this.makeImpl(!0, r);
+ var i = u.getLostPoint(this);
+ (0 == r || t > i) && (t = i,
+ e = r)
}
- },
- setupTypeNumber: function(t) {
- for (var e = u.getBCHTypeNumber(this.typeNumber), r = 0; r < 18; r++) {
- i = !t && 1 == (e >> r & 1);
- this.modules[Math.floor(r / 3)][r % 3 + this.moduleCount - 8 - 3] = i
- }
- for (r = 0; r < 18; r++) {
- var i = !t && 1 == (e >> r & 1);
- this.modules[r % 3 + this.moduleCount - 8 - 3][Math.floor(r / 3)] = i
- }
- },
- setupTypeInfo: function(t, e) {
- for (var r = this.errorCorrectLevel << 3 | e, i = u.getBCHTypeInfo(r), n = 0; n < 15; n++) {
- o = !t && 1 == (i >> n & 1);
- n < 6 ? this.modules[n][8] = o : n < 8 ? this.modules[n + 1][8] = o : this.modules[this.moduleCount - 15 + n][8] = o
- }
- for (n = 0; n < 15; n++) {
- var o = !t && 1 == (i >> n & 1);
- n < 8 ? this.modules[8][this.moduleCount - n - 1] = o : n < 9 ? this.modules[8][15 - n - 1 + 1] = o : this.modules[8][15 - n - 1] = o
- }
- this.modules[this.moduleCount - 8][8] = !t
- },
- mapData: function(t, e) {
- for (var r = -1, i = this.moduleCount - 1, n = 7, o = 0, a = this.moduleCount - 1; a > 0; a -= 2)
- for (6 == a && a--; ; ) {
- for (var s = 0; s < 2; s++)
- if (null == this.modules[i][a - s]) {
- var h = !1;
- o < t.length && (h = 1 == (t[o] >>> n & 1));
- u.getMask(e, i, a - s) && (h = !h),
- this.modules[i][a - s] = h,
- -1 == --n && (o++,
- n = 7)
- }
- if ((i += r) < 0 || this.moduleCount <= i) {
- i -= r,
- r = -r;
- break
+ return e
+ },
+ createMovieClip: function (t, e, r) {
+ var i = t.createEmptyMovieClip(e, r);
+ this.make();
+ for (var n = 0; n < this.modules.length; n++)
+ for (var o = 1 * n, a = 0; a < this.modules[n].length; a++) {
+ var s = 1 * a;
+ this.modules[n][a] && (i.beginFill(0, 100),
+ i.moveTo(s, o),
+ i.lineTo(s + 1, o),
+ i.lineTo(s + 1, o + 1),
+ i.lineTo(s, o + 1),
+ i.endFill())
}
+ return i
+ },
+ setupTimingPattern: function () {
+ for (var t = 8; t < this.moduleCount - 8; t++)
+ null == this.modules[t][6] && (this.modules[t][6] = t % 2 == 0);
+ for (var e = 8; e < this.moduleCount - 8; e++)
+ null == this.modules[6][e] && (this.modules[6][e] = e % 2 == 0)
+ },
+ setupPositionAdjustPattern: function () {
+ for (var t = u.getPatternPosition(this.typeNumber), e = 0; e < t.length; e++)
+ for (var r = 0; r < t.length; r++) {
+ var i = t[e],
+ n = t[r];
+ if (null == this.modules[i][n])
+ for (var o = -2; o <= 2; o++)
+ for (var a = -2; a <= 2; a++)
+ this.modules[i + o][n + a] = -2 == o || 2 == o || -2 == a || 2 == a || 0 == o && 0 == a
+ }
+ },
+ setupTypeNumber: function (t) {
+ for (var e = u.getBCHTypeNumber(this.typeNumber), r = 0; r < 18; r++) {
+ i = !t && 1 == (e >> r & 1);
+ this.modules[Math.floor(r / 3)][r % 3 + this.moduleCount - 8 - 3] = i
}
- }
- },
- e.PAD0 = 236,
- e.PAD1 = 17,
- e.createData = function(t, r, o) {
- for (var a = i.getRSBlocks(t, r), s = new n, h = 0; h < o.length; h++) {
- var l = o[h];
- s.put(l.mode, 4),
- s.put(l.getLength(), u.getLengthInBits(l.mode, t)),
- l.write(s)
- }
- for (var c = 0, h = 0; h < a.length; h++)
- c += a[h].dataCount;
- if (s.getLengthInBits() > 8 * c)
- throw new Error("code length overflow. (" + s.getLengthInBits() + ">" + 8 * c + ")");
- for (s.getLengthInBits() + 4 <= 8 * c && s.put(0, 4); s.getLengthInBits() % 8 != 0; )
- s.putBit(!1);
- for (; ; ) {
- if (s.getLengthInBits() >= 8 * c)
- break;
- if (s.put(e.PAD0, 8),
- s.getLengthInBits() >= 8 * c)
- break;
- s.put(e.PAD1, 8)
- }
- return e.createBytes(s, a)
- }
- ,
- e.createBytes = function(t, e) {
- for (var i = 0, n = 0, o = 0, a = new Array(e.length), s = new Array(e.length), h = 0; h < e.length; h++) {
- var l = e[h].dataCount
- , c = e[h].totalCount - l;
- n = Math.max(n, l),
- o = Math.max(o, c),
- a[h] = new Array(l);
- for (m = 0; m < a[h].length; m++)
- a[h][m] = 255 & t.buffer[m + i];
- i += l;
- var f = u.getErrorCorrectPolynomial(c)
- , d = new r(a[h],f.getLength() - 1).mod(f);
- s[h] = new Array(f.getLength() - 1);
- for (m = 0; m < s[h].length; m++) {
- var g = m + d.getLength() - s[h].length;
- s[h][m] = g >= 0 ? d.get(g) : 0
- }
- }
- for (var p = 0, m = 0; m < e.length; m++)
- p += e[m].totalCount;
- for (var v = new Array(p), w = 0, m = 0; m < n; m++)
- for (h = 0; h < e.length; h++)
- m < a[h].length && (v[w++] = a[h][m]);
- for (m = 0; m < o; m++)
- for (h = 0; h < e.length; h++)
- m < s[h].length && (v[w++] = s[h][m]);
- return v
- }
- ;
- for (var s = {
- MODE_NUMBER: 1,
- MODE_ALPHA_NUM: 2,
- MODE_8BIT_BYTE: 4,
- MODE_KANJI: 8
- }, h = {
- L: 1,
- M: 0,
- Q: 3,
- H: 2
- }, l = {
- PATTERN000: 0,
- PATTERN001: 1,
- PATTERN010: 2,
- PATTERN011: 3,
- PATTERN100: 4,
- PATTERN101: 5,
- PATTERN110: 6,
- PATTERN111: 7
- }, u = {
- PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]],
- G15: 1335,
- G18: 7973,
- G15_MASK: 21522,
- getBCHTypeInfo: function(t) {
- for (var e = t << 10; u.getBCHDigit(e) - u.getBCHDigit(u.G15) >= 0; )
- e ^= u.G15 << u.getBCHDigit(e) - u.getBCHDigit(u.G15);
- return (t << 10 | e) ^ u.G15_MASK
- },
- getBCHTypeNumber: function(t) {
- for (var e = t << 12; u.getBCHDigit(e) - u.getBCHDigit(u.G18) >= 0; )
- e ^= u.G18 << u.getBCHDigit(e) - u.getBCHDigit(u.G18);
- return t << 12 | e
- },
- getBCHDigit: function(t) {
- for (var e = 0; 0 != t; )
- e++,
- t >>>= 1;
- return e
- },
- getPatternPosition: function(t) {
- return u.PATTERN_POSITION_TABLE[t - 1]
- },
- getMask: function(t, e, r) {
- switch (t) {
- case l.PATTERN000:
- return (e + r) % 2 == 0;
- case l.PATTERN001:
- return e % 2 == 0;
- case l.PATTERN010:
- return r % 3 == 0;
- case l.PATTERN011:
- return (e + r) % 3 == 0;
- case l.PATTERN100:
- return (Math.floor(e / 2) + Math.floor(r / 3)) % 2 == 0;
- case l.PATTERN101:
- return e * r % 2 + e * r % 3 == 0;
- case l.PATTERN110:
- return (e * r % 2 + e * r % 3) % 2 == 0;
- case l.PATTERN111:
- return (e * r % 3 + (e + r) % 2) % 2 == 0;
- default:
- throw new Error("bad maskPattern:" + t)
- }
- },
- getErrorCorrectPolynomial: function(t) {
- for (var e = new r([1],0), i = 0; i < t; i++)
- e = e.multiply(new r([1, c.gexp(i)],0));
- return e
- },
- getLengthInBits: function(t, e) {
- if (1 <= e && e < 10)
- switch (t) {
- case s.MODE_NUMBER:
- return 10;
- case s.MODE_ALPHA_NUM:
- return 9;
- case s.MODE_8BIT_BYTE:
- case s.MODE_KANJI:
- return 8;
- default:
- throw new Error("mode:" + t)
- }
- else if (e < 27)
- switch (t) {
- case s.MODE_NUMBER:
- return 12;
- case s.MODE_ALPHA_NUM:
- return 11;
- case s.MODE_8BIT_BYTE:
- return 16;
- case s.MODE_KANJI:
- return 10;
- default:
- throw new Error("mode:" + t)
+ for (r = 0; r < 18; r++) {
+ var i = !t && 1 == (e >> r & 1);
+ this.modules[r % 3 + this.moduleCount - 8 - 3][Math.floor(r / 3)] = i
}
- else {
- if (!(e < 41))
- throw new Error("type:" + e);
- switch (t) {
- case s.MODE_NUMBER:
- return 14;
- case s.MODE_ALPHA_NUM:
- return 13;
- case s.MODE_8BIT_BYTE:
- return 16;
- case s.MODE_KANJI:
- return 12;
- default:
- throw new Error("mode:" + t)
+ },
+ setupTypeInfo: function (t, e) {
+ for (var r = this.errorCorrectLevel << 3 | e, i = u.getBCHTypeInfo(r), n = 0; n < 15; n++) {
+ o = !t && 1 == (i >> n & 1);
+ n < 6 ? this.modules[n][8] = o : n < 8 ? this.modules[n + 1][8] = o : this.modules[this.moduleCount - 15 + n][8] = o
}
+ for (n = 0; n < 15; n++) {
+ var o = !t && 1 == (i >> n & 1);
+ n < 8 ? this.modules[8][this.moduleCount - n - 1] = o : n < 9 ? this.modules[8][15 - n - 1 + 1] = o : this.modules[8][15 - n - 1] = o
+ }
+ this.modules[this.moduleCount - 8][8] = !t
+ },
+ mapData: function (t, e) {
+ for (var r = -1, i = this.moduleCount - 1, n = 7, o = 0, a = this.moduleCount - 1; a > 0; a -= 2)
+ for (6 == a && a--;;) {
+ for (var s = 0; s < 2; s++)
+ if (null == this.modules[i][a - s]) {
+ var h = !1;
+ o < t.length && (h = 1 == (t[o] >>> n & 1));
+ u.getMask(e, i, a - s) && (h = !h),
+ this.modules[i][a - s] = h,
+ -1 == --n && (o++,
+ n = 7)
+ }
+ if ((i += r) < 0 || this.moduleCount <= i) {
+ i -= r,
+ r = -r;
+ break
+ }
+ }
+ }
+ },
+ e.PAD0 = 236,
+ e.PAD1 = 17,
+ e.createData = function (t, r, o) {
+ for (var a = i.getRSBlocks(t, r), s = new n, h = 0; h < o.length; h++) {
+ var l = o[h];
+ s.put(l.mode, 4),
+ s.put(l.getLength(), u.getLengthInBits(l.mode, t)),
+ l.write(s)
}
+ for (var c = 0, h = 0; h < a.length; h++)
+ c += a[h].dataCount;
+ if (s.getLengthInBits() > 8 * c)
+ throw new Error("code length overflow. (" + s.getLengthInBits() + ">" + 8 * c + ")");
+ for (s.getLengthInBits() + 4 <= 8 * c && s.put(0, 4); s.getLengthInBits() % 8 != 0;)
+ s.putBit(!1);
+ for (;;) {
+ if (s.getLengthInBits() >= 8 * c)
+ break;
+ if (s.put(e.PAD0, 8),
+ s.getLengthInBits() >= 8 * c)
+ break;
+ s.put(e.PAD1, 8)
+ }
+ return e.createBytes(s, a)
},
- getLostPoint: function(t) {
- for (var e = t.getModuleCount(), r = 0, i = 0; i < e; i++)
- for (u = 0; u < e; u++) {
- for (var n = 0, o = t.isDark(i, u), a = -1; a <= 1; a++)
- if (!(i + a < 0 || e <= i + a))
- for (var s = -1; s <= 1; s++)
- u + s < 0 || e <= u + s || 0 == a && 0 == s || o == t.isDark(i + a, u + s) && n++;
- n > 5 && (r += 3 + n - 5)
+ e.createBytes = function (t, e) {
+ for (var i = 0, n = 0, o = 0, a = new Array(e.length), s = new Array(e.length), h = 0; h < e.length; h++) {
+ var l = e[h].dataCount,
+ c = e[h].totalCount - l;
+ n = Math.max(n, l),
+ o = Math.max(o, c),
+ a[h] = new Array(l);
+ for (m = 0; m < a[h].length; m++)
+ a[h][m] = 255 & t.buffer[m + i];
+ i += l;
+ var f = u.getErrorCorrectPolynomial(c),
+ d = new r(a[h], f.getLength() - 1).mod(f);
+ s[h] = new Array(f.getLength() - 1);
+ for (m = 0; m < s[h].length; m++) {
+ var g = m + d.getLength() - s[h].length;
+ s[h][m] = g >= 0 ? d.get(g) : 0
+ }
+ }
+ for (var p = 0, m = 0; m < e.length; m++)
+ p += e[m].totalCount;
+ for (var v = new Array(p), w = 0, m = 0; m < n; m++)
+ for (h = 0; h < e.length; h++)
+ m < a[h].length && (v[w++] = a[h][m]);
+ for (m = 0; m < o; m++)
+ for (h = 0; h < e.length; h++)
+ m < s[h].length && (v[w++] = s[h][m]);
+ return v
+ };
+ for (var s = {
+ MODE_NUMBER: 1,
+ MODE_ALPHA_NUM: 2,
+ MODE_8BIT_BYTE: 4,
+ MODE_KANJI: 8
+ }, h = {
+ L: 1,
+ M: 0,
+ Q: 3,
+ H: 2
+ }, l = {
+ PATTERN000: 0,
+ PATTERN001: 1,
+ PATTERN010: 2,
+ PATTERN011: 3,
+ PATTERN100: 4,
+ PATTERN101: 5,
+ PATTERN110: 6,
+ PATTERN111: 7
+ }, u = {
+ PATTERN_POSITION_TABLE: [
+ [],
+ [6, 18],
+ [6, 22],
+ [6, 26],
+ [6, 30],
+ [6, 34],
+ [6, 22, 38],
+ [6, 24, 42],
+ [6, 26, 46],
+ [6, 28, 50],
+ [6, 30, 54],
+ [6, 32, 58],
+ [6, 34, 62],
+ [6, 26, 46, 66],
+ [6, 26, 48, 70],
+ [6, 26, 50, 74],
+ [6, 30, 54, 78],
+ [6, 30, 56, 82],
+ [6, 30, 58, 86],
+ [6, 34, 62, 90],
+ [6, 28, 50, 72, 94],
+ [6, 26, 50, 74, 98],
+ [6, 30, 54, 78, 102],
+ [6, 28, 54, 80, 106],
+ [6, 32, 58, 84, 110],
+ [6, 30, 58, 86, 114],
+ [6, 34, 62, 90, 118],
+ [6, 26, 50, 74, 98, 122],
+ [6, 30, 54, 78, 102, 126],
+ [6, 26, 52, 78, 104, 130],
+ [6, 30, 56, 82, 108, 134],
+ [6, 34, 60, 86, 112, 138],
+ [6, 30, 58, 86, 114, 142],
+ [6, 34, 62, 90, 118, 146],
+ [6, 30, 54, 78, 102, 126, 150],
+ [6, 24, 50, 76, 102, 128, 154],
+ [6, 28, 54, 80, 106, 132, 158],
+ [6, 32, 58, 84, 110, 136, 162],
+ [6, 26, 54, 82, 110, 138, 166],
+ [6, 30, 58, 86, 114, 142, 170]
+ ],
+ G15: 1335,
+ G18: 7973,
+ G15_MASK: 21522,
+ getBCHTypeInfo: function (t) {
+ for (var e = t << 10; u.getBCHDigit(e) - u.getBCHDigit(u.G15) >= 0;)
+ e ^= u.G15 << u.getBCHDigit(e) - u.getBCHDigit(u.G15);
+ return (t << 10 | e) ^ u.G15_MASK
+ },
+ getBCHTypeNumber: function (t) {
+ for (var e = t << 12; u.getBCHDigit(e) - u.getBCHDigit(u.G18) >= 0;)
+ e ^= u.G18 << u.getBCHDigit(e) - u.getBCHDigit(u.G18);
+ return t << 12 | e
+ },
+ getBCHDigit: function (t) {
+ for (var e = 0; 0 != t;)
+ e++,
+ t >>>= 1;
+ return e
+ },
+ getPatternPosition: function (t) {
+ return u.PATTERN_POSITION_TABLE[t - 1]
+ },
+ getMask: function (t, e, r) {
+ switch (t) {
+ case l.PATTERN000:
+ return (e + r) % 2 == 0;
+ case l.PATTERN001:
+ return e % 2 == 0;
+ case l.PATTERN010:
+ return r % 3 == 0;
+ case l.PATTERN011:
+ return (e + r) % 3 == 0;
+ case l.PATTERN100:
+ return (Math.floor(e / 2) + Math.floor(r / 3)) % 2 == 0;
+ case l.PATTERN101:
+ return e * r % 2 + e * r % 3 == 0;
+ case l.PATTERN110:
+ return (e * r % 2 + e * r % 3) % 2 == 0;
+ case l.PATTERN111:
+ return (e * r % 3 + (e + r) % 2) % 2 == 0;
+ default:
+ throw new Error("bad maskPattern:" + t)
}
- for (i = 0; i < e - 1; i++)
- for (u = 0; u < e - 1; u++) {
- var h = 0;
- t.isDark(i, u) && h++,
- t.isDark(i + 1, u) && h++,
- t.isDark(i, u + 1) && h++,
- t.isDark(i + 1, u + 1) && h++,
- 0 != h && 4 != h || (r += 3)
+ },
+ getErrorCorrectPolynomial: function (t) {
+ for (var e = new r([1], 0), i = 0; i < t; i++)
+ e = e.multiply(new r([1, c.gexp(i)], 0));
+ return e
+ },
+ getLengthInBits: function (t, e) {
+ if (1 <= e && e < 10)
+ switch (t) {
+ case s.MODE_NUMBER:
+ return 10;
+ case s.MODE_ALPHA_NUM:
+ return 9;
+ case s.MODE_8BIT_BYTE:
+ case s.MODE_KANJI:
+ return 8;
+ default:
+ throw new Error("mode:" + t)
+ }
+ else if (e < 27)
+ switch (t) {
+ case s.MODE_NUMBER:
+ return 12;
+ case s.MODE_ALPHA_NUM:
+ return 11;
+ case s.MODE_8BIT_BYTE:
+ return 16;
+ case s.MODE_KANJI:
+ return 10;
+ default:
+ throw new Error("mode:" + t)
+ }
+ else {
+ if (!(e < 41))
+ throw new Error("type:" + e);
+ switch (t) {
+ case s.MODE_NUMBER:
+ return 14;
+ case s.MODE_ALPHA_NUM:
+ return 13;
+ case s.MODE_8BIT_BYTE:
+ return 16;
+ case s.MODE_KANJI:
+ return 12;
+ default:
+ throw new Error("mode:" + t)
+ }
}
- for (i = 0; i < e; i++)
- for (u = 0; u < e - 6; u++)
- t.isDark(i, u) && !t.isDark(i, u + 1) && t.isDark(i, u + 2) && t.isDark(i, u + 3) && t.isDark(i, u + 4) && !t.isDark(i, u + 5) && t.isDark(i, u + 6) && (r += 40);
- for (u = 0; u < e; u++)
- for (i = 0; i < e - 6; i++)
- t.isDark(i, u) && !t.isDark(i + 1, u) && t.isDark(i + 2, u) && t.isDark(i + 3, u) && t.isDark(i + 4, u) && !t.isDark(i + 5, u) && t.isDark(i + 6, u) && (r += 40);
- for (var l = 0, u = 0; u < e; u++)
+ },
+ getLostPoint: function (t) {
+ for (var e = t.getModuleCount(), r = 0, i = 0; i < e; i++)
+ for (u = 0; u < e; u++) {
+ for (var n = 0, o = t.isDark(i, u), a = -1; a <= 1; a++)
+ if (!(i + a < 0 || e <= i + a))
+ for (var s = -1; s <= 1; s++)
+ u + s < 0 || e <= u + s || 0 == a && 0 == s || o == t.isDark(i + a, u + s) && n++;
+ n > 5 && (r += 3 + n - 5)
+ }
+ for (i = 0; i < e - 1; i++)
+ for (u = 0; u < e - 1; u++) {
+ var h = 0;
+ t.isDark(i, u) && h++,
+ t.isDark(i + 1, u) && h++,
+ t.isDark(i, u + 1) && h++,
+ t.isDark(i + 1, u + 1) && h++,
+ 0 != h && 4 != h || (r += 3)
+ }
for (i = 0; i < e; i++)
- t.isDark(i, u) && l++;
- return r += 10 * (Math.abs(100 * l / e / e - 50) / 5)
- }
- }, c = {
- glog: function(t) {
- if (t < 1)
- throw new Error("glog(" + t + ")");
- return c.LOG_TABLE[t]
- },
- gexp: function(t) {
- for (; t < 0; )
- t += 255;
- for (; t >= 256; )
- t -= 255;
- return c.EXP_TABLE[t]
- },
- EXP_TABLE: new Array(256),
- LOG_TABLE: new Array(256)
- }, f = 0; f < 8; f++)
+ for (u = 0; u < e - 6; u++)
+ t.isDark(i, u) && !t.isDark(i, u + 1) && t.isDark(i, u + 2) && t.isDark(i, u + 3) && t.isDark(i, u + 4) && !t.isDark(i, u + 5) && t.isDark(i, u + 6) && (r += 40);
+ for (u = 0; u < e; u++)
+ for (i = 0; i < e - 6; i++)
+ t.isDark(i, u) && !t.isDark(i + 1, u) && t.isDark(i + 2, u) && t.isDark(i + 3, u) && t.isDark(i + 4, u) && !t.isDark(i + 5, u) && t.isDark(i + 6, u) && (r += 40);
+ for (var l = 0, u = 0; u < e; u++)
+ for (i = 0; i < e; i++)
+ t.isDark(i, u) && l++;
+ return r += 10 * (Math.abs(100 * l / e / e - 50) / 5)
+ }
+ }, c = {
+ glog: function (t) {
+ if (t < 1)
+ throw new Error("glog(" + t + ")");
+ return c.LOG_TABLE[t]
+ },
+ gexp: function (t) {
+ for (; t < 0;)
+ t += 255;
+ for (; t >= 256;)
+ t -= 255;
+ return c.EXP_TABLE[t]
+ },
+ EXP_TABLE: new Array(256),
+ LOG_TABLE: new Array(256)
+ }, f = 0; f < 8; f++)
c.EXP_TABLE[f] = 1 << f;
for (f = 8; f < 256; f++)
c.EXP_TABLE[f] = c.EXP_TABLE[f - 4] ^ c.EXP_TABLE[f - 5] ^ c.EXP_TABLE[f - 6] ^ c.EXP_TABLE[f - 8];
for (f = 0; f < 255; f++)
c.LOG_TABLE[c.EXP_TABLE[f]] = f;
r.prototype = {
- get: function(t) {
- return this.num[t]
- },
- getLength: function() {
- return this.num.length
- },
- multiply: function(t) {
- for (var e = new Array(this.getLength() + t.getLength() - 1), i = 0; i < this.getLength(); i++)
- for (var n = 0; n < t.getLength(); n++)
- e[i + n] ^= c.gexp(c.glog(this.get(i)) + c.glog(t.get(n)));
- return new r(e,0)
- },
- mod: function(t) {
- if (this.getLength() - t.getLength() < 0)
- return this;
- for (var e = c.glog(this.get(0)) - c.glog(t.get(0)), i = new Array(this.getLength()), n = 0; n < this.getLength(); n++)
- i[n] = this.get(n);
- for (n = 0; n < t.getLength(); n++)
- i[n] ^= c.gexp(c.glog(t.get(n)) + e);
- return new r(i,0).mod(t)
- }
- },
- i.RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]],
- i.getRSBlocks = function(t, e) {
- var r = i.getRsBlockTable(t, e);
- if (void 0 == r)
- throw new Error("bad rs block @ typeNumber:" + t + "/errorCorrectLevel:" + e);
- for (var n = r.length / 3, o = [], a = 0; a < n; a++)
- for (var s = r[3 * a + 0], h = r[3 * a + 1], l = r[3 * a + 2], u = 0; u < s; u++)
- o.push(new i(h,l));
- return o
- }
- ,
- i.getRsBlockTable = function(t, e) {
- switch (e) {
- case h.L:
- return i.RS_BLOCK_TABLE[4 * (t - 1) + 0];
- case h.M:
- return i.RS_BLOCK_TABLE[4 * (t - 1) + 1];
- case h.Q:
- return i.RS_BLOCK_TABLE[4 * (t - 1) + 2];
- case h.H:
- return i.RS_BLOCK_TABLE[4 * (t - 1) + 3];
- default:
- return
- }
- }
- ,
- n.prototype = {
- get: function(t) {
- var e = Math.floor(t / 8);
- return 1 == (this.buffer[e] >>> 7 - t % 8 & 1)
+ get: function (t) {
+ return this.num[t]
+ },
+ getLength: function () {
+ return this.num.length
+ },
+ multiply: function (t) {
+ for (var e = new Array(this.getLength() + t.getLength() - 1), i = 0; i < this.getLength(); i++)
+ for (var n = 0; n < t.getLength(); n++)
+ e[i + n] ^= c.gexp(c.glog(this.get(i)) + c.glog(t.get(n)));
+ return new r(e, 0)
+ },
+ mod: function (t) {
+ if (this.getLength() - t.getLength() < 0)
+ return this;
+ for (var e = c.glog(this.get(0)) - c.glog(t.get(0)), i = new Array(this.getLength()), n = 0; n < this.getLength(); n++)
+ i[n] = this.get(n);
+ for (n = 0; n < t.getLength(); n++)
+ i[n] ^= c.gexp(c.glog(t.get(n)) + e);
+ return new r(i, 0).mod(t)
+ }
},
- put: function(t, e) {
- for (var r = 0; r < e; r++)
- this.putBit(1 == (t >>> e - r - 1 & 1))
+ i.RS_BLOCK_TABLE = [
+ [1, 26, 19],
+ [1, 26, 16],
+ [1, 26, 13],
+ [1, 26, 9],
+ [1, 44, 34],
+ [1, 44, 28],
+ [1, 44, 22],
+ [1, 44, 16],
+ [1, 70, 55],
+ [1, 70, 44],
+ [2, 35, 17],
+ [2, 35, 13],
+ [1, 100, 80],
+ [2, 50, 32],
+ [2, 50, 24],
+ [4, 25, 9],
+ [1, 134, 108],
+ [2, 67, 43],
+ [2, 33, 15, 2, 34, 16],
+ [2, 33, 11, 2, 34, 12],
+ [2, 86, 68],
+ [4, 43, 27],
+ [4, 43, 19],
+ [4, 43, 15],
+ [2, 98, 78],
+ [4, 49, 31],
+ [2, 32, 14, 4, 33, 15],
+ [4, 39, 13, 1, 40, 14],
+ [2, 121, 97],
+ [2, 60, 38, 2, 61, 39],
+ [4, 40, 18, 2, 41, 19],
+ [4, 40, 14, 2, 41, 15],
+ [2, 146, 116],
+ [3, 58, 36, 2, 59, 37],
+ [4, 36, 16, 4, 37, 17],
+ [4, 36, 12, 4, 37, 13],
+ [2, 86, 68, 2, 87, 69],
+ [4, 69, 43, 1, 70, 44],
+ [6, 43, 19, 2, 44, 20],
+ [6, 43, 15, 2, 44, 16],
+ [4, 101, 81],
+ [1, 80, 50, 4, 81, 51],
+ [4, 50, 22, 4, 51, 23],
+ [3, 36, 12, 8, 37, 13],
+ [2, 116, 92, 2, 117, 93],
+ [6, 58, 36, 2, 59, 37],
+ [4, 46, 20, 6, 47, 21],
+ [7, 42, 14, 4, 43, 15],
+ [4, 133, 107],
+ [8, 59, 37, 1, 60, 38],
+ [8, 44, 20, 4, 45, 21],
+ [12, 33, 11, 4, 34, 12],
+ [3, 145, 115, 1, 146, 116],
+ [4, 64, 40, 5, 65, 41],
+ [11, 36, 16, 5, 37, 17],
+ [11, 36, 12, 5, 37, 13],
+ [5, 109, 87, 1, 110, 88],
+ [5, 65, 41, 5, 66, 42],
+ [5, 54, 24, 7, 55, 25],
+ [11, 36, 12],
+ [5, 122, 98, 1, 123, 99],
+ [7, 73, 45, 3, 74, 46],
+ [15, 43, 19, 2, 44, 20],
+ [3, 45, 15, 13, 46, 16],
+ [1, 135, 107, 5, 136, 108],
+ [10, 74, 46, 1, 75, 47],
+ [1, 50, 22, 15, 51, 23],
+ [2, 42, 14, 17, 43, 15],
+ [5, 150, 120, 1, 151, 121],
+ [9, 69, 43, 4, 70, 44],
+ [17, 50, 22, 1, 51, 23],
+ [2, 42, 14, 19, 43, 15],
+ [3, 141, 113, 4, 142, 114],
+ [3, 70, 44, 11, 71, 45],
+ [17, 47, 21, 4, 48, 22],
+ [9, 39, 13, 16, 40, 14],
+ [3, 135, 107, 5, 136, 108],
+ [3, 67, 41, 13, 68, 42],
+ [15, 54, 24, 5, 55, 25],
+ [15, 43, 15, 10, 44, 16],
+ [4, 144, 116, 4, 145, 117],
+ [17, 68, 42],
+ [17, 50, 22, 6, 51, 23],
+ [19, 46, 16, 6, 47, 17],
+ [2, 139, 111, 7, 140, 112],
+ [17, 74, 46],
+ [7, 54, 24, 16, 55, 25],
+ [34, 37, 13],
+ [4, 151, 121, 5, 152, 122],
+ [4, 75, 47, 14, 76, 48],
+ [11, 54, 24, 14, 55, 25],
+ [16, 45, 15, 14, 46, 16],
+ [6, 147, 117, 4, 148, 118],
+ [6, 73, 45, 14, 74, 46],
+ [11, 54, 24, 16, 55, 25],
+ [30, 46, 16, 2, 47, 17],
+ [8, 132, 106, 4, 133, 107],
+ [8, 75, 47, 13, 76, 48],
+ [7, 54, 24, 22, 55, 25],
+ [22, 45, 15, 13, 46, 16],
+ [10, 142, 114, 2, 143, 115],
+ [19, 74, 46, 4, 75, 47],
+ [28, 50, 22, 6, 51, 23],
+ [33, 46, 16, 4, 47, 17],
+ [8, 152, 122, 4, 153, 123],
+ [22, 73, 45, 3, 74, 46],
+ [8, 53, 23, 26, 54, 24],
+ [12, 45, 15, 28, 46, 16],
+ [3, 147, 117, 10, 148, 118],
+ [3, 73, 45, 23, 74, 46],
+ [4, 54, 24, 31, 55, 25],
+ [11, 45, 15, 31, 46, 16],
+ [7, 146, 116, 7, 147, 117],
+ [21, 73, 45, 7, 74, 46],
+ [1, 53, 23, 37, 54, 24],
+ [19, 45, 15, 26, 46, 16],
+ [5, 145, 115, 10, 146, 116],
+ [19, 75, 47, 10, 76, 48],
+ [15, 54, 24, 25, 55, 25],
+ [23, 45, 15, 25, 46, 16],
+ [13, 145, 115, 3, 146, 116],
+ [2, 74, 46, 29, 75, 47],
+ [42, 54, 24, 1, 55, 25],
+ [23, 45, 15, 28, 46, 16],
+ [17, 145, 115],
+ [10, 74, 46, 23, 75, 47],
+ [10, 54, 24, 35, 55, 25],
+ [19, 45, 15, 35, 46, 16],
+ [17, 145, 115, 1, 146, 116],
+ [14, 74, 46, 21, 75, 47],
+ [29, 54, 24, 19, 55, 25],
+ [11, 45, 15, 46, 46, 16],
+ [13, 145, 115, 6, 146, 116],
+ [14, 74, 46, 23, 75, 47],
+ [44, 54, 24, 7, 55, 25],
+ [59, 46, 16, 1, 47, 17],
+ [12, 151, 121, 7, 152, 122],
+ [12, 75, 47, 26, 76, 48],
+ [39, 54, 24, 14, 55, 25],
+ [22, 45, 15, 41, 46, 16],
+ [6, 151, 121, 14, 152, 122],
+ [6, 75, 47, 34, 76, 48],
+ [46, 54, 24, 10, 55, 25],
+ [2, 45, 15, 64, 46, 16],
+ [17, 152, 122, 4, 153, 123],
+ [29, 74, 46, 14, 75, 47],
+ [49, 54, 24, 10, 55, 25],
+ [24, 45, 15, 46, 46, 16],
+ [4, 152, 122, 18, 153, 123],
+ [13, 74, 46, 32, 75, 47],
+ [48, 54, 24, 14, 55, 25],
+ [42, 45, 15, 32, 46, 16],
+ [20, 147, 117, 4, 148, 118],
+ [40, 75, 47, 7, 76, 48],
+ [43, 54, 24, 22, 55, 25],
+ [10, 45, 15, 67, 46, 16],
+ [19, 148, 118, 6, 149, 119],
+ [18, 75, 47, 31, 76, 48],
+ [34, 54, 24, 34, 55, 25],
+ [20, 45, 15, 61, 46, 16]
+ ],
+ i.getRSBlocks = function (t, e) {
+ var r = i.getRsBlockTable(t, e);
+ if (void 0 == r)
+ throw new Error("bad rs block @ typeNumber:" + t + "/errorCorrectLevel:" + e);
+ for (var n = r.length / 3, o = [], a = 0; a < n; a++)
+ for (var s = r[3 * a + 0], h = r[3 * a + 1], l = r[3 * a + 2], u = 0; u < s; u++)
+ o.push(new i(h, l));
+ return o
},
- getLengthInBits: function() {
- return this.length
+ i.getRsBlockTable = function (t, e) {
+ switch (e) {
+ case h.L:
+ return i.RS_BLOCK_TABLE[4 * (t - 1) + 0];
+ case h.M:
+ return i.RS_BLOCK_TABLE[4 * (t - 1) + 1];
+ case h.Q:
+ return i.RS_BLOCK_TABLE[4 * (t - 1) + 2];
+ case h.H:
+ return i.RS_BLOCK_TABLE[4 * (t - 1) + 3];
+ default:
+ return
+ }
},
- putBit: function(t) {
- var e = Math.floor(this.length / 8);
- this.buffer.length <= e && this.buffer.push(0),
- t && (this.buffer[e] |= 128 >>> this.length % 8),
- this.length++
- }
- };
- var d = [[17, 14, 11, 7], [32, 26, 20, 14], [53, 42, 32, 24], [78, 62, 46, 34], [106, 84, 60, 44], [134, 106, 74, 58], [154, 122, 86, 64], [192, 152, 108, 84], [230, 180, 130, 98], [271, 213, 151, 119], [321, 251, 177, 137], [367, 287, 203, 155], [425, 331, 241, 177], [458, 362, 258, 194], [520, 412, 292, 220], [586, 450, 322, 250], [644, 504, 364, 280], [718, 560, 394, 310], [792, 624, 442, 338], [858, 666, 482, 382], [929, 711, 509, 403], [1003, 779, 565, 439], [1091, 857, 611, 461], [1171, 911, 661, 511], [1273, 997, 715, 535], [1367, 1059, 751, 593], [1465, 1125, 805, 625], [1528, 1190, 868, 658], [1628, 1264, 908, 698], [1732, 1370, 982, 742], [1840, 1452, 1030, 790], [1952, 1538, 1112, 842], [2068, 1628, 1168, 898], [2188, 1722, 1228, 958], [2303, 1809, 1283, 983], [2431, 1911, 1351, 1051], [2563, 1989, 1423, 1093], [2699, 2099, 1499, 1139], [2809, 2213, 1579, 1219], [2953, 2331, 1663, 1273]]
- , g = function() {
- var t = function(t, e) {
- this._el = t,
- this._htOption = e
- };
- return t.prototype.draw = function(t) {
- function e(t, e) {
- var r = document.createElementNS("http://www.w3.org/2000/svg", t);
- for (var i in e)
- e.hasOwnProperty(i) && r.setAttribute(i, e[i]);
- return r
+ n.prototype = {
+ get: function (t) {
+ var e = Math.floor(t / 8);
+ return 1 == (this.buffer[e] >>> 7 - t % 8 & 1)
+ },
+ put: function (t, e) {
+ for (var r = 0; r < e; r++)
+ this.putBit(1 == (t >>> e - r - 1 & 1))
+ },
+ getLengthInBits: function () {
+ return this.length
+ },
+ putBit: function (t) {
+ var e = Math.floor(this.length / 8);
+ this.buffer.length <= e && this.buffer.push(0),
+ t && (this.buffer[e] |= 128 >>> this.length % 8),
+ this.length++
}
- var r = this._htOption
- , i = this._el
- , n = t.getModuleCount();
- Math.floor(r.width / n),
- Math.floor(r.height / n);
- this.clear();
- var o = e("svg", {
- viewBox: "0 0 " + String(n) + " " + String(n),
- width: "100%",
- height: "100%",
- fill: r.colorLight
- });
- o.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"),
- i.appendChild(o),
- o.appendChild(e("rect", {
- fill: r.colorLight,
- width: "100%",
- height: "100%"
- })),
- o.appendChild(e("rect", {
- fill: r.colorDark,
- width: "1",
- height: "1",
- id: "template"
- }));
- for (var a = 0; a < n; a++)
- for (var s = 0; s < n; s++)
- if (t.isDark(a, s)) {
- var h = e("use", {
- x: String(s),
- y: String(a)
- });
- h.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template"),
- o.appendChild(h)
- }
- }
- ,
- t.prototype.clear = function() {
- for (; this._el.hasChildNodes(); )
- this._el.removeChild(this._el.lastChild)
- }
- ,
- t
- }()
- , p = "svg" === document.documentElement.tagName.toLowerCase() ? g : "undefined" == typeof CanvasRenderingContext2D ? function() {
- var t = function(t, e) {
- this._el = t,
- this._htOption = e
};
- return t.prototype.draw = function(t) {
- for (var e = this._htOption, r = this._el, i = t.getModuleCount(), n = Math.floor(e.width / i), o = Math.floor(e.height / i), a = [''], s = 0; s < i; s++) {
- a.push("");
- for (var h = 0; h < i; h++)
- a.push(' ');
- a.push(" ")
- }
- a.push("
"),
- r.innerHTML = a.join("");
- var l = r.childNodes[0]
- , u = (e.width - l.offsetWidth) / 2
- , c = (e.height - l.offsetHeight) / 2;
- u > 0 && c > 0 && (l.style.margin = c + "px " + u + "px")
- }
- ,
- t.prototype.clear = function() {
- this._el.innerHTML = ""
- }
- ,
- t
- }() : function() {
- function t() {
- this._elImage.src = this._elCanvas.toDataURL("image/png"),
- this._elImage.style.display = "block",
- this._elCanvas.style.display = "none"
- }
- if (this._android && this._android <= 2.1) {
- var e = 1 / window.devicePixelRatio
- , r = CanvasRenderingContext2D.prototype.drawImage;
- CanvasRenderingContext2D.prototype.drawImage = function(t, i, n, o, a, s, h, l, u) {
- if ("nodeName"in t && /img/i.test(t.nodeName))
- for (var c = arguments.length - 1; c >= 1; c--)
- arguments[c] = arguments[c] * e;
- else
- void 0 === l && (arguments[1] *= e,
- arguments[2] *= e,
- arguments[3] *= e,
- arguments[4] *= e);
- r.apply(this, arguments)
+ var d = [
+ [17, 14, 11, 7],
+ [32, 26, 20, 14],
+ [53, 42, 32, 24],
+ [78, 62, 46, 34],
+ [106, 84, 60, 44],
+ [134, 106, 74, 58],
+ [154, 122, 86, 64],
+ [192, 152, 108, 84],
+ [230, 180, 130, 98],
+ [271, 213, 151, 119],
+ [321, 251, 177, 137],
+ [367, 287, 203, 155],
+ [425, 331, 241, 177],
+ [458, 362, 258, 194],
+ [520, 412, 292, 220],
+ [586, 450, 322, 250],
+ [644, 504, 364, 280],
+ [718, 560, 394, 310],
+ [792, 624, 442, 338],
+ [858, 666, 482, 382],
+ [929, 711, 509, 403],
+ [1003, 779, 565, 439],
+ [1091, 857, 611, 461],
+ [1171, 911, 661, 511],
+ [1273, 997, 715, 535],
+ [1367, 1059, 751, 593],
+ [1465, 1125, 805, 625],
+ [1528, 1190, 868, 658],
+ [1628, 1264, 908, 698],
+ [1732, 1370, 982, 742],
+ [1840, 1452, 1030, 790],
+ [1952, 1538, 1112, 842],
+ [2068, 1628, 1168, 898],
+ [2188, 1722, 1228, 958],
+ [2303, 1809, 1283, 983],
+ [2431, 1911, 1351, 1051],
+ [2563, 1989, 1423, 1093],
+ [2699, 2099, 1499, 1139],
+ [2809, 2213, 1579, 1219],
+ [2953, 2331, 1663, 1273]
+ ],
+ g = function () {
+ var t = function (t, e) {
+ this._el = t,
+ this._htOption = e
+ };
+ return t.prototype.draw = function (t) {
+ function e(t, e) {
+ var r = document.createElementNS("http://www.w3.org/2000/svg", t);
+ for (var i in e)
+ e.hasOwnProperty(i) && r.setAttribute(i, e[i]);
+ return r
+ }
+ var r = this._htOption,
+ i = this._el,
+ n = t.getModuleCount();
+ Math.floor(r.width / n),
+ Math.floor(r.height / n);
+ this.clear();
+ var o = e("svg", {
+ viewBox: "0 0 " + String(n) + " " + String(n),
+ width: "100%",
+ height: "100%",
+ fill: r.colorLight
+ });
+ o.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"),
+ i.appendChild(o),
+ o.appendChild(e("rect", {
+ fill: r.colorLight,
+ width: "100%",
+ height: "100%"
+ })),
+ o.appendChild(e("rect", {
+ fill: r.colorDark,
+ width: "1",
+ height: "1",
+ id: "template"
+ }));
+ for (var a = 0; a < n; a++)
+ for (var s = 0; s < n; s++)
+ if (t.isDark(a, s)) {
+ var h = e("use", {
+ x: String(s),
+ y: String(a)
+ });
+ h.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template"),
+ o.appendChild(h)
+ }
+ },
+ t.prototype.clear = function () {
+ for (; this._el.hasChildNodes();)
+ this._el.removeChild(this._el.lastChild)
+ },
+ t
+ }(),
+ p = "svg" === document.documentElement.tagName.toLowerCase() ? g : "undefined" == typeof CanvasRenderingContext2D ? function () {
+ var t = function (t, e) {
+ this._el = t,
+ this._htOption = e
+ };
+ return t.prototype.draw = function (t) {
+ for (var e = this._htOption, r = this._el, i = t.getModuleCount(), n = Math.floor(e.width / i), o = Math.floor(e.height / i), a = [''], s = 0; s < i; s++) {
+ a.push("");
+ for (var h = 0; h < i; h++)
+ a.push(' ');
+ a.push(" ")
+ }
+ a.push("
"),
+ r.innerHTML = a.join("");
+ var l = r.childNodes[0],
+ u = (e.width - l.offsetWidth) / 2,
+ c = (e.height - l.offsetHeight) / 2;
+ u > 0 && c > 0 && (l.style.margin = c + "px " + u + "px")
+ },
+ t.prototype.clear = function () {
+ this._el.innerHTML = ""
+ },
+ t
+ }() : function () {
+ function t() {
+ this._elImage.src = this._elCanvas.toDataURL("image/png"),
+ this._elImage.style.display = "block",
+ this._elCanvas.style.display = "none"
}
- }
- var i = function(t, e) {
- this._bIsPainted = !1,
- this._android = o(),
- this._htOption = e,
- this._elCanvas = document.createElement("canvas"),
- this._elCanvas.width = e.width,
- this._elCanvas.height = e.height,
- t.appendChild(this._elCanvas),
- this._el = t,
- this._oContext = this._elCanvas.getContext("2d"),
- this._bIsPainted = !1,
- this._elImage = document.createElement("img"),
- this._elImage.alt = "Scan me!",
- this._elImage.style.display = "none",
- this._el.appendChild(this._elImage),
- this._bSupportDataURI = null
- };
- return i.prototype.draw = function(t) {
- var e = this._elImage
- , r = this._oContext
- , i = this._htOption
- , n = t.getModuleCount()
- , o = i.width / n
- , a = i.height / n
- , s = Math.round(o)
- , h = Math.round(a);
- e.style.display = "none",
- this.clear();
- for (var l = 0; l < n; l++)
- for (var u = 0; u < n; u++) {
- var c = t.isDark(l, u)
- , f = u * o
- , d = l * a;
- r.strokeStyle = c ? i.colorDark : i.colorLight,
- r.lineWidth = 1,
- r.fillStyle = c ? i.colorDark : i.colorLight,
- r.fillRect(f, d, o, a),
- r.strokeRect(Math.floor(f) + .5, Math.floor(d) + .5, s, h),
- r.strokeRect(Math.ceil(f) - .5, Math.ceil(d) - .5, s, h)
- }
- this._bIsPainted = !0
- }
- ,
- i.prototype.makeImage = function() {
- this._bIsPainted && function(t, e) {
- var r = this;
- if (r._fFail = e,
- r._fSuccess = t,
- null === r._bSupportDataURI) {
- var i = document.createElement("img")
- , n = function() {
- r._bSupportDataURI = !1,
- r._fFail && r._fFail.call(r)
- };
- return i.onabort = n,
- i.onerror = n,
- i.onload = function() {
- r._bSupportDataURI = !0,
- r._fSuccess && r._fSuccess.call(r)
- }
- ,
- void (i.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")
+ if (this._android && this._android <= 2.1) {
+ var e = 1 / window.devicePixelRatio,
+ r = CanvasRenderingContext2D.prototype.drawImage;
+ CanvasRenderingContext2D.prototype.drawImage = function (t, i, n, o, a, s, h, l, u) {
+ if ("nodeName" in t && /img/i.test(t.nodeName))
+ for (var c = arguments.length - 1; c >= 1; c--)
+ arguments[c] = arguments[c] * e;
+ else
+ void 0 === l && (arguments[1] *= e,
+ arguments[2] *= e,
+ arguments[3] *= e,
+ arguments[4] *= e);
+ r.apply(this, arguments)
}
- !0 === r._bSupportDataURI && r._fSuccess ? r._fSuccess.call(r) : !1 === r._bSupportDataURI && r._fFail && r._fFail.call(r)
}
- .call(this, t)
- }
- ,
- i.prototype.isPainted = function() {
- return this._bIsPainted
- }
- ,
- i.prototype.clear = function() {
- this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height),
- this._bIsPainted = !1
- }
- ,
- i.prototype.round = function(t) {
- return t ? Math.floor(1e3 * t) / 1e3 : t
- }
- ,
- i
- }();
- (QRCode = function(t, e) {
+ var i = function (t, e) {
+ this._bIsPainted = !1,
+ this._android = o(),
+ this._htOption = e,
+ this._elCanvas = document.createElement("canvas"),
+ this._elCanvas.width = e.width,
+ this._elCanvas.height = e.height,
+ t.appendChild(this._elCanvas),
+ this._el = t,
+ this._oContext = this._elCanvas.getContext("2d"),
+ this._bIsPainted = !1,
+ this._elImage = document.createElement("img"),
+ this._elImage.alt = "Scan me!",
+ this._elImage.style.display = "none",
+ this._el.appendChild(this._elImage),
+ this._bSupportDataURI = null
+ };
+ return i.prototype.draw = function (t) {
+ var e = this._elImage,
+ r = this._oContext,
+ i = this._htOption,
+ n = t.getModuleCount(),
+ o = i.width / n,
+ a = i.height / n,
+ s = Math.round(o),
+ h = Math.round(a);
+ e.style.display = "none",
+ this.clear();
+ for (var l = 0; l < n; l++)
+ for (var u = 0; u < n; u++) {
+ var c = t.isDark(l, u),
+ f = u * o,
+ d = l * a;
+ r.strokeStyle = c ? i.colorDark : i.colorLight,
+ r.lineWidth = 1,
+ r.fillStyle = c ? i.colorDark : i.colorLight,
+ r.fillRect(f, d, o, a),
+ r.strokeRect(Math.floor(f) + .5, Math.floor(d) + .5, s, h),
+ r.strokeRect(Math.ceil(f) - .5, Math.ceil(d) - .5, s, h)
+ }
+ this._bIsPainted = !0
+ },
+ i.prototype.makeImage = function () {
+ this._bIsPainted && function (t, e) {
+ var r = this;
+ if (r._fFail = e,
+ r._fSuccess = t,
+ null === r._bSupportDataURI) {
+ var i = document.createElement("img"),
+ n = function () {
+ r._bSupportDataURI = !1,
+ r._fFail && r._fFail.call(r)
+ };
+ return i.onabort = n,
+ i.onerror = n,
+ i.onload = function () {
+ r._bSupportDataURI = !0,
+ r._fSuccess && r._fSuccess.call(r)
+ },
+ void(i.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")
+ }!0 === r._bSupportDataURI && r._fSuccess ? r._fSuccess.call(r) : !1 === r._bSupportDataURI && r._fFail && r._fFail.call(r)
+ }
+ .call(this, t)
+ },
+ i.prototype.isPainted = function () {
+ return this._bIsPainted
+ },
+ i.prototype.clear = function () {
+ this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height),
+ this._bIsPainted = !1
+ },
+ i.prototype.round = function (t) {
+ return t ? Math.floor(1e3 * t) / 1e3 : t
+ },
+ i
+ }();
+ (QRCode = function (t, e) {
if (this._htOption = {
- width: 256,
- height: 256,
- typeNumber: 4,
- colorDark: "#000000",
- colorLight: "#ffffff",
- correctLevel: h.H
- },
- "string" == typeof e && (e = {
- text: e
- }),
- e)
+ width: 256,
+ height: 256,
+ typeNumber: 4,
+ colorDark: "#000000",
+ colorLight: "#ffffff",
+ correctLevel: h.H
+ },
+ "string" == typeof e && (e = {
+ text: e
+ }),
+ e)
for (var r in e)
this._htOption[r] = e[r];
"string" == typeof t && (t = document.getElementById(t)),
- this._htOption.useSVG && (p = g),
- this._android = o(),
- this._el = t,
- this._oQRCode = null,
- this._oDrawing = new p(this._el,this._htOption),
- this._htOption.text && this.makeCode(this._htOption.text)
- }
- ).prototype.makeCode = function(t) {
- this._oQRCode = new e(a(t, this._htOption.correctLevel),this._htOption.correctLevel),
- this._oQRCode.addData(t),
- this._oQRCode.make(),
- this._el.title = t,
- this._oDrawing.draw(this._oQRCode),
- this.makeImage()
- }
- ,
- QRCode.prototype.makeImage = function() {
- "function" == typeof this._oDrawing.makeImage && (!this._android || this._android >= 3) && this._oDrawing.makeImage()
- }
- ,
- QRCode.prototype.clear = function() {
- this._oDrawing.clear()
- }
- ,
- QRCode.CorrectLevel = h
+ this._htOption.useSVG && (p = g),
+ this._android = o(),
+ this._el = t,
+ this._oQRCode = null,
+ this._oDrawing = new p(this._el, this._htOption),
+ this._htOption.text && this.makeCode(this._htOption.text)
+ }).prototype.makeCode = function (t) {
+ this._oQRCode = new e(a(t, this._htOption.correctLevel), this._htOption.correctLevel),
+ this._oQRCode.addData(t),
+ this._oQRCode.make(),
+ this._el.title = t,
+ this._oDrawing.draw(this._oQRCode),
+ this.makeImage()
+ },
+ QRCode.prototype.makeImage = function () {
+ "function" == typeof this._oDrawing.makeImage && (!this._android || this._android >= 3) && this._oDrawing.makeImage()
+ },
+ QRCode.prototype.clear = function () {
+ this._oDrawing.clear()
+ },
+ QRCode.CorrectLevel = h
}(),
- function(t, e, r) {
+ function (t, e, r) {
function i(t, e) {
- var i = function() {
+ var i = function () {
var t = arguments;
if (u)
return u.apply(null, t);
var e = {};
- return h(t, function(t) {
- h(t, function(t, r) {
- e[r] = t
- })
- }),
- t[0] = e
- }({}, v, e || {}, function(t) {
+ return h(t, function (t) {
+ h(t, function (t, r) {
+ e[r] = t
+ })
+ }),
+ t[0] = e
+ }({}, v, e || {}, function (t) {
if (t.dataset)
return JSON.parse(JSON.stringify(t.dataset));
var e = {};
if (t.hasAttributes())
- return h(t.attributes, function(t) {
- var r = t.name;
- if (0 !== r.indexOf("data-"))
- return !0;
- r = r.replace(/^data-/i, "").replace(/-(\w)/g, function(t, e) {
- return e.toUpperCase()
+ return h(t.attributes, function (t) {
+ var r = t.name;
+ if (0 !== r.indexOf("data-"))
+ return !0;
+ r = r.replace(/^data-/i, "").replace(/-(\w)/g, function (t, e) {
+ return e.toUpperCase()
+ }),
+ e[r] = t.value
}),
- e[r] = t.value
- }),
- e;
+ e;
return {}
}(t));
- i.imageSelector && (i.image = n(i.imageSelector).map(function(t) {
- return t.src
- }).join("||")),
- function(t, e) {
- if (e && "string" == typeof e) {
- var r = " ";
- h((t.className + " " + e).split(/\s+/), function(t) {
- r.indexOf(" " + t + " ") < 0 && (r += t + " ")
- }),
- t.className = r.slice(1, -1)
- }
- }(t, "share-component social-share"),
- function(t, e) {
- var i = function(t) {
- t.mobileSites.length || (t.mobileSites = t.sites);
- var e = (f ? t.mobileSites : t.sites).slice(0)
- , r = t.disabled;
- "string" == typeof e && (e = e.split(/\s*,\s*/));
- "string" == typeof r && (r = r.split(/\s*,\s*/));
- c && r.push("wechat");
- return r.length && h(r, function(t) {
- e.splice(function(t, e, r) {
- var i;
- if (e) {
- if (l)
- return l.call(e, t, r);
- for (i = e.length,
- r = r ? r < 0 ? Math.max(0, i + r) : r : 0; r < i; r++)
- if (r in e && e[r] === t)
- return r
- }
- return -1
- }(t, e), 1)
- }),
- e
- }(e)
- , n = "prepend" == e.mode;
- h(n ? i.reverse() : i, function(i) {
- var o = function(t, e) {
- e.summary || (e.summary = e.description);
- return w[t].replace(/\{\{(\w)(\w*)\}\}/g, function(i, n, o) {
- var a = t + n + o.toLowerCase();
- return o = (n + o).toLowerCase(),
- encodeURIComponent((e[a] === r ? e[o] : e[a]) || "")
+ i.imageSelector && (i.image = n(i.imageSelector).map(function (t) {
+ return t.src
+ }).join("||")),
+ function (t, e) {
+ if (e && "string" == typeof e) {
+ var r = " ";
+ h((t.className + " " + e).split(/\s+/), function (t) {
+ r.indexOf(" " + t + " ") < 0 && (r += t + " ")
+ }),
+ t.className = r.slice(1, -1)
+ }
+ }(t, "share-component social-share"),
+ function (t, e) {
+ var i = function (t) {
+ t.mobileSites.length || (t.mobileSites = t.sites);
+ var e = (f ? t.mobileSites : t.sites).slice(0),
+ r = t.disabled;
+ "string" == typeof e && (e = e.split(/\s*,\s*/));
+ "string" == typeof r && (r = r.split(/\s*,\s*/));
+ c && r.push("wechat");
+ return r.length && h(r, function (t) {
+ e.splice(function (t, e, r) {
+ var i;
+ if (e) {
+ if (l)
+ return l.call(e, t, r);
+ for (i = e.length,
+ r = r ? r < 0 ? Math.max(0, i + r) : r : 0; r < i; r++)
+ if (r in e && e[r] === t)
+ return r
+ }
+ return -1
+ }(t, e), 1)
+ }),
+ e
+ }(e),
+ n = "prepend" == e.mode;
+ h(n ? i.reverse() : i, function (i) {
+ var o = function (t, e) {
+ e.summary || (e.summary = e.description);
+ return w[t].replace(/\{\{(\w)(\w*)\}\}/g, function (i, n, o) {
+ var a = t + n + o.toLowerCase();
+ return o = (n + o).toLowerCase(),
+ encodeURIComponent((e[a] === r ? e[o] : e[a]) || "")
+ })
+ }(i, e),
+ h = e.initialized ? a(t, "icon-" + i) : s(' ');
+ if (!h.length)
+ return !0;
+ h[0].href = o,
+ "wechat" === i ? h[0].tabindex = -1 : h[0].target = "_blank",
+ e.initialized || (n ? t.insertBefore(h[0], t.firstChild) : t.appendChild(h[0]))
+ })
+ }(t, i),
+ function (t, e) {
+ var r = a(t, "icon-wechat", "a");
+ if (0 === r.length)
+ return !1;
+ var i = s('' + e.wechatQrcodeTitle + '
' + e.wechatQrcodeHelper + "
"),
+ n = a(i[0], "qrcode", "div");
+ r[0].appendChild(i[0]),
+ new QRCode(n[0], {
+ text: e.url,
+ width: e.wechatQrcodeSize,
+ height: e.wechatQrcodeSize
})
- }(i, e)
- , h = e.initialized ? a(t, "icon-" + i) : s(' ');
- if (!h.length)
- return !0;
- h[0].href = o,
- "wechat" === i ? h[0].tabindex = -1 : h[0].target = "_blank",
- e.initialized || (n ? t.insertBefore(h[0], t.firstChild) : t.appendChild(h[0]))
- })
- }(t, i),
- function(t, e) {
- var r = a(t, "icon-wechat", "a");
- if (0 === r.length)
- return !1;
- var i = s('' + e.wechatQrcodeTitle + '
' + e.wechatQrcodeHelper + "
")
- , n = a(i[0], "qrcode", "div");
- r[0].appendChild(i[0]),
- new QRCode(n[0],{
- text: e.url,
- width: e.wechatQrcodeSize,
- height: e.wechatQrcodeSize
- })
- }(t, i),
- t.initialized = !0
+ }(t, i),
+ t.initialized = !0
}
+
function n(r) {
- return (e.querySelectorAll || t.jQuery || t.Zepto || function(t) {
+ return (e.querySelectorAll || t.jQuery || t.Zepto || function (t) {
var r = [];
- return h(t.split(/\s*,\s*/), function(i) {
- var n = i.match(/([#.])(\w+)/);
- if (null === n)
- throw Error("Supports only simple single #ID or .CLASS selector.");
- if (n[1]) {
- var o = e.getElementById(n[2]);
- o && r.push(o)
- }
- r = r.concat(a(t))
- }),
- r
- }
- ).call(e, r)
+ return h(t.split(/\s*,\s*/), function (i) {
+ var n = i.match(/([#.])(\w+)/);
+ if (null === n)
+ throw Error("Supports only simple single #ID or .CLASS selector.");
+ if (n[1]) {
+ var o = e.getElementById(n[2]);
+ o && r.push(o)
+ }
+ r = r.concat(a(t))
+ }),
+ r
+ }).call(e, r)
}
+
function o(t) {
return (e.getElementsByName(t)[0] || 0).content
}
+
function a(t, e, r) {
if (t.getElementsByClassName)
return t.getElementsByClassName(e);
- var i = []
- , n = t.getElementsByTagName(r || "*");
+ var i = [],
+ n = t.getElementsByTagName(r || "*");
return e = " " + e + " ",
- h(n, function(t) {
- (" " + (t.className || "") + " ").indexOf(e) >= 0 && i.push(t)
- }),
- i
+ h(n, function (t) {
+ (" " + (t.className || "") + " ").indexOf(e) >= 0 && i.push(t)
+ }),
+ i
}
+
function s(t) {
var r = e.createElement("div");
return r.innerHTML = t,
- r.childNodes
+ r.childNodes
}
+
function h(t, e) {
var i = t.length;
if (i === r) {
@@ -16452,65 +17356,64 @@ function social_share() {
break
} else
for (var o = 0; o < i && !1 !== e.call(t[o], t[o], o); o++)
- ;
- }
- var l = Array.prototype.indexOf
- , u = Object.assign
- , c = /MicroMessenger/i.test(navigator.userAgent)
- , f = e.documentElement.clientWidth <= 768
- , d = (e.images[0] || 0).src || ""
- , g = o("site") || o("Site") || e.title
- , p = o("title") || o("Title") || e.title
- , m = o("description") || o("Description") || ""
- , v = {
- url: location.href,
- origin: location.origin,
- source: g,
- title: p,
- description: m,
- image: d,
- imageSelector: r,
- weiboKey: "",
- wechatQrcodeTitle: "微信扫一扫:分享",
- wechatQrcodeHelper: "微信里点“发现”,扫一下
二维码便可将本文分享至朋友圈。
",
- wechatQrcodeSize: 100,
- sites: ["weibo", "qq", "wechat", "tencent", "douban", "qzone", "linkedin", "diandian", "facebook", "twitter", "google"],
- mobileSites: [],
- disabled: [],
- initialized: !1
- }
- , w = {
- qzone: "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}",
- qq: 'http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}&summary="{{SUMMARY}}"',
- tencent: "http://share.v.t.qq.com/index.php?c=share&a=index&title={{TITLE}}&url={{URL}}&pic={{IMAGE}}",
- weibo: "http://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}",
- wechat: "javascript:",
- douban: "http://shuo.douban.com/!service/share?href={{URL}}&name={{TITLE}}&text={{DESCRIPTION}}&image={{IMAGE}}&starid=0&aid=0&style=11",
- diandian: "http://www.diandian.com/share?lo={{URL}}&ti={{TITLE}}&type=link",
- linkedin: "http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin",
- facebook: "https://www.facebook.com/sharer/sharer.php?u={{URL}}",
- twitter: "https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{ORIGIN}}",
- google: "https://plus.google.com/share?url={{URL}}"
- };
- t.socialShare = function(t, e) {
- (t = "string" == typeof t ? n(t) : t).length === r && (t = [t]),
- h(t, function(t) {
- t.initialized || i(t, e)
- })
+ ;
}
- ,
- function(r) {
- var i = "addEventListener"
- , n = e[i] ? "" : "on";
- ~e.readyState.indexOf("m") ? r() : "load DOMContentLoaded readystatechange".replace(/\w+/g, function(o, a) {
- (a ? e : t)[n ? "attachEvent" : i](n + o, function() {
- r && (a < 6 || ~e.readyState.indexOf("m")) && (r(),
- r = 0)
- }, !1)
+ var l = Array.prototype.indexOf,
+ u = Object.assign,
+ c = /MicroMessenger/i.test(navigator.userAgent),
+ f = e.documentElement.clientWidth <= 768,
+ d = (e.images[0] || 0).src || "",
+ g = o("site") || o("Site") || e.title,
+ p = o("title") || o("Title") || e.title,
+ m = o("description") || o("Description") || "",
+ v = {
+ url: location.href,
+ origin: location.origin,
+ source: g,
+ title: p,
+ description: m,
+ image: d,
+ imageSelector: r,
+ weiboKey: "",
+ wechatQrcodeTitle: "微信扫一扫:分享",
+ wechatQrcodeHelper: "微信里点“发现”,扫一下
二维码便可将本文分享至朋友圈。
",
+ wechatQrcodeSize: 100,
+ sites: ["weibo", "qq", "wechat", "tencent", "douban", "qzone", "linkedin", "diandian", "facebook", "twitter", "google"],
+ mobileSites: [],
+ disabled: [],
+ initialized: !1
+ },
+ w = {
+ qzone: "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}",
+ qq: 'http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}&summary="{{SUMMARY}}"',
+ tencent: "http://share.v.t.qq.com/index.php?c=share&a=index&title={{TITLE}}&url={{URL}}&pic={{IMAGE}}",
+ weibo: "http://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}",
+ wechat: "javascript:",
+ douban: "http://shuo.douban.com/!service/share?href={{URL}}&name={{TITLE}}&text={{DESCRIPTION}}&image={{IMAGE}}&starid=0&aid=0&style=11",
+ diandian: "http://www.diandian.com/share?lo={{URL}}&ti={{TITLE}}&type=link",
+ linkedin: "http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin",
+ facebook: "https://www.facebook.com/sharer/sharer.php?u={{URL}}",
+ twitter: "https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{ORIGIN}}",
+ google: "https://plus.google.com/share?url={{URL}}"
+ };
+ t.socialShare = function (t, e) {
+ (t = "string" == typeof t ? n(t) : t).length === r && (t = [t]),
+ h(t, function (t) {
+ t.initialized || i(t, e)
+ })
+ },
+ function (r) {
+ var i = "addEventListener",
+ n = e[i] ? "" : "on";
+ ~e.readyState.indexOf("m") ? r() : "load DOMContentLoaded readystatechange".replace(/\w+/g, function (o, a) {
+ (a ? e : t)[n ? "attachEvent" : i](n + o, function () {
+ r && (a < 6 || ~e.readyState.indexOf("m")) && (r(),
+ r = 0)
+ }, !1)
+ })
+ }(function () {
+ socialShare(".social-share, .share-component")
})
- }(function() {
- socialShare(".social-share, .share-component")
- })
}(window, document);
}
/*!
@@ -16520,103 +17423,106 @@ function social_share() {
* @url https://github.com/feimosi/baguetteBox.js
*/
-var baguetteBox = function() {
+var baguetteBox = function () {
function t(t, n) {
H.transforms = f(),
- H.svg = g(),
- e(),
- j = document.querySelectorAll(t),
- [].forEach.call(j, function(t) {
- n && n.filter && (A = n.filter);
- var e = t.getElementsByTagName("a");
- e = [].filter.call(e, function(t) {
- return A.test(t.href)
- });
- var o = D.length;
- D.push(e),
- D[o].options = n,
- [].forEach.call(D[o], function(t, e) {
- m(t, "click", function(t) {
- t.preventDefault ? t.preventDefault() : t.returnValue = !1,
- i(o),
- a(e)
- })
+ H.svg = g(),
+ e(),
+ j = document.querySelectorAll(t),
+ [].forEach.call(j, function (t) {
+ n && n.filter && (A = n.filter);
+ var e = t.getElementsByTagName("a");
+ e = [].filter.call(e, function (t) {
+ return A.test(t.href)
+ });
+ var o = D.length;
+ D.push(e),
+ D[o].options = n,
+ [].forEach.call(D[o], function (t, e) {
+ m(t, "click", function (t) {
+ t.preventDefault ? t.preventDefault() : t.returnValue = !1,
+ i(o),
+ a(e)
+ })
+ })
})
- })
}
+
function e() {
return (b = v("baguetteBox-overlay")) ? (k = v("baguetteBox-slider"),
- w = v("previous-button"),
- C = v("next-button"),
- T = v("close-button"),
- void 0) : (b = y("div"),
- b.id = "baguetteBox-overlay",
- document.getElementsByTagName("body")[0].appendChild(b),
- k = y("div"),
- k.id = "baguetteBox-slider",
- b.appendChild(k),
- w = y("button"),
- w.id = "previous-button",
- w.innerHTML = H.svg ? E : "<",
- b.appendChild(w),
- C = y("button"),
- C.id = "next-button",
- C.innerHTML = H.svg ? x : ">",
- b.appendChild(C),
- T = y("button"),
- T.id = "close-button",
- T.innerHTML = H.svg ? B : "X",
- b.appendChild(T),
- w.className = C.className = T.className = "baguetteBox-button",
- n(),
- void 0)
+ w = v("previous-button"),
+ C = v("next-button"),
+ T = v("close-button"),
+ void 0) : (b = y("div"),
+ b.id = "baguetteBox-overlay",
+ document.getElementsByTagName("body")[0].appendChild(b),
+ k = y("div"),
+ k.id = "baguetteBox-slider",
+ b.appendChild(k),
+ w = y("button"),
+ w.id = "previous-button",
+ w.innerHTML = H.svg ? E : "<",
+ b.appendChild(w),
+ C = y("button"),
+ C.id = "next-button",
+ C.innerHTML = H.svg ? x : ">",
+ b.appendChild(C),
+ T = y("button"),
+ T.id = "close-button",
+ T.innerHTML = H.svg ? B : "X",
+ b.appendChild(T),
+ w.className = C.className = T.className = "baguetteBox-button",
+ n(),
+ void 0)
}
+
function n() {
- m(b, "click", function(t) {
- t.target && "IMG" !== t.target.nodeName && "FIGCAPTION" !== t.target.nodeName && r()
- }),
- m(w, "click", function(t) {
- t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0,
- c()
- }),
- m(C, "click", function(t) {
- t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0,
- u()
- }),
- m(T, "click", function(t) {
- t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0,
- r()
- }),
- m(b, "touchstart", function(t) {
- N = t.changedTouches[0].pageX
- }),
- m(b, "touchmove", function(t) {
- S || (t.preventDefault ? t.preventDefault() : t.returnValue = !1,
- touch = t.touches[0] || t.changedTouches[0],
- touch.pageX - N > 40 ? (S = !0,
- c()) : touch.pageX - N < -40 && (S = !0,
- u()))
- }),
- m(b, "touchend", function() {
- S = !1
- }),
- m(document, "keydown", function(t) {
- switch (t.keyCode) {
- case 37:
- c();
- break;
- case 39:
- u();
- break;
- case 27:
- r()
- }
- })
+ m(b, "click", function (t) {
+ t.target && "IMG" !== t.target.nodeName && "FIGCAPTION" !== t.target.nodeName && r()
+ }),
+ m(w, "click", function (t) {
+ t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0,
+ c()
+ }),
+ m(C, "click", function (t) {
+ t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0,
+ u()
+ }),
+ m(T, "click", function (t) {
+ t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0,
+ r()
+ }),
+ m(b, "touchstart", function (t) {
+ N = t.changedTouches[0].pageX
+ }),
+ m(b, "touchmove", function (t) {
+ S || (t.preventDefault ? t.preventDefault() : t.returnValue = !1,
+ touch = t.touches[0] || t.changedTouches[0],
+ touch.pageX - N > 40 ? (S = !0,
+ c()) : touch.pageX - N < -40 && (S = !0,
+ u()))
+ }),
+ m(b, "touchend", function () {
+ S = !1
+ }),
+ m(document, "keydown", function (t) {
+ switch (t.keyCode) {
+ case 37:
+ c();
+ break;
+ case 39:
+ u();
+ break;
+ case 27:
+ r()
+ }
+ })
}
+
function i(t) {
if (M !== t) {
for (M = t,
- o(D[t].options); k.firstChild; )
+ o(D[t].options); k.firstChild;)
k.removeChild(k.firstChild);
X.length = 0;
for (var e, n = 0; n < D[t].length; n++)
@@ -16627,174 +17533,198 @@ var baguetteBox = function() {
k.appendChild(X[n])
}
}
+
function o(t) {
t || (t = {});
for (var e in P)
I[e] = P[e],
"undefined" != typeof t[e] && (I[e] = t[e]);
k.style.transition = k.style.webkitTransition = "fadeIn" === I.animation ? "opacity .4s ease" : "slideIn" === I.animation ? "" : "none",
- "auto" === I.buttons && ("ontouchstart"in window || 1 === D[M].length) && (I.buttons = !1),
- w.style.display = C.style.display = I.buttons ? "" : "none"
+ "auto" === I.buttons && ("ontouchstart" in window || 1 === D[M].length) && (I.buttons = !1),
+ w.style.display = C.style.display = I.buttons ? "" : "none"
}
+
function a(t) {
"block" !== b.style.display && (L = t,
- s(L, function() {
- p(L),
- h(L)
- }),
- d(),
- b.style.display = "block",
- setTimeout(function() {
- b.className = "visible",
- I.afterShow && I.afterShow()
- }, 50),
- I.onChange && I.onChange(L, X.length))
+ s(L, function () {
+ p(L),
+ h(L)
+ }),
+ d(),
+ b.style.display = "block",
+ setTimeout(function () {
+ b.className = "visible",
+ I.afterShow && I.afterShow()
+ }, 50),
+ I.onChange && I.onChange(L, X.length))
}
+
function r() {
"none" !== b.style.display && (b.className = "",
- setTimeout(function() {
- b.style.display = "none",
- I.afterHide && I.afterHide()
- }, 500))
+ setTimeout(function () {
+ b.style.display = "none",
+ I.afterHide && I.afterHide()
+ }, 500))
}
+
function s(t, e) {
var n = X[t];
if ("undefined" != typeof n) {
if (n.getElementsByTagName("img")[0])
return e && e(),
- void 0;
+ void 0;
imageElement = D[M][t],
- imageCaption = "function" == typeof I.captions ? I.captions.call(D[M], imageElement) : imageElement.getAttribute("data-caption") || imageElement.title,
- imageSrc = l(imageElement);
- var i = y("figure")
- , o = y("img")
- , a = y("figcaption");
+ imageCaption = "function" == typeof I.captions ? I.captions.call(D[M], imageElement) : imageElement.getAttribute("data-caption") || imageElement.title,
+ imageSrc = l(imageElement);
+ var i = y("figure"),
+ o = y("img"),
+ a = y("figcaption");
n.appendChild(i),
- i.innerHTML = '',
- o.onload = function() {
- var n = document.querySelector("#baguette-img-" + t + " .spinner");
- i.removeChild(n),
- !I.async && e && e()
- }
- ,
- o.setAttribute("src", imageSrc),
- i.appendChild(o),
- I.captions && imageCaption && (a.innerHTML = imageCaption,
- i.appendChild(a)),
- I.async && e && e()
+ i.innerHTML = '',
+ o.onload = function () {
+ var n = document.querySelector("#baguette-img-" + t + " .spinner");
+ i.removeChild(n),
+ !I.async && e && e()
+ },
+ o.setAttribute("src", imageSrc),
+ i.appendChild(o),
+ I.captions && imageCaption && (a.innerHTML = imageCaption,
+ i.appendChild(a)),
+ I.async && e && e()
}
}
+
function l(t) {
var e = imageElement.href;
if (t.dataset) {
var n = [];
for (var i in t.dataset)
"at-" !== i.substring(0, 3) || isNaN(i.substring(3)) || (n[i.replace("at-", "")] = t.dataset[i]);
- keys = Object.keys(n).sort(function(t, e) {
+ keys = Object.keys(n).sort(function (t, e) {
return parseInt(t) < parseInt(e) ? -1 : 1
});
- for (var o = window.innerWidth * window.devicePixelRatio, a = 0; a < keys.length - 1 && keys[a] < o; )
+ for (var o = window.innerWidth * window.devicePixelRatio, a = 0; a < keys.length - 1 && keys[a] < o;)
a++;
e = n[keys[a]] || e
}
return e
}
+
function u() {
var t;
return L <= X.length - 2 ? (L++,
- d(),
- p(L),
- t = !0) : I.animation && (k.className = "bounce-from-right",
- setTimeout(function() {
- k.className = ""
- }, 400),
- t = !1),
- I.onChange && I.onChange(L, X.length),
- t
+ d(),
+ p(L),
+ t = !0) : I.animation && (k.className = "bounce-from-right",
+ setTimeout(function () {
+ k.className = ""
+ }, 400),
+ t = !1),
+ I.onChange && I.onChange(L, X.length),
+ t
}
+
function c() {
var t;
return L >= 1 ? (L--,
- d(),
- h(L),
- t = !0) : I.animation && (k.className = "bounce-from-left",
- setTimeout(function() {
- k.className = ""
- }, 400),
- t = !1),
- I.onChange && I.onChange(L, X.length),
- t
+ d(),
+ h(L),
+ t = !0) : I.animation && (k.className = "bounce-from-left",
+ setTimeout(function () {
+ k.className = ""
+ }, 400),
+ t = !1),
+ I.onChange && I.onChange(L, X.length),
+ t
}
+
function d() {
var t = 100 * -L + "%";
"fadeIn" === I.animation ? (k.style.opacity = 0,
- setTimeout(function() {
- H.transforms ? k.style.transform = k.style.webkitTransform = "translate3d(" + t + ",0,0)" : k.style.left = t,
- k.style.opacity = 1
- }, 400)) : H.transforms ? k.style.transform = k.style.webkitTransform = "translate3d(" + t + ",0,0)" : k.style.left = t
+ setTimeout(function () {
+ H.transforms ? k.style.transform = k.style.webkitTransform = "translate3d(" + t + ",0,0)" : k.style.left = t,
+ k.style.opacity = 1
+ }, 400)) : H.transforms ? k.style.transform = k.style.webkitTransform = "translate3d(" + t + ",0,0)" : k.style.left = t
}
+
function f() {
var t = y("div");
return "undefined" != typeof t.style.perspective || "undefined" != typeof t.style.webkitPerspective
}
+
function g() {
var t = y("div");
return t.innerHTML = " ",
- "http://www.w3.org/2000/svg" == (t.firstChild && t.firstChild.namespaceURI)
+ "http://www.w3.org/2000/svg" == (t.firstChild && t.firstChild.namespaceURI)
}
+
function p(t) {
- t - L >= I.preload || s(t + 1, function() {
+ t - L >= I.preload || s(t + 1, function () {
p(t + 1)
})
}
+
function h(t) {
- L - t >= I.preload || s(t - 1, function() {
+ L - t >= I.preload || s(t - 1, function () {
h(t - 1)
})
}
+
function m(t, e, n) {
t.addEventListener ? t.addEventListener(e, n, !1) : t.attachEvent("on" + e, n)
}
+
function v(t) {
return document.getElementById(t)
}
+
function y(t) {
return document.createElement(t)
}
- var b, k, w, C, T, N, E = ' ', x = ' ', B = ' ', I = {}, P = {
- captions: !0,
- buttons: "auto",
- async: !1,
- preload: 2,
- animation: "slideIn",
- afterShow: null,
- afterHide: null,
- onChange: null
- }, H = {}, L = 0, M = -1, S = !1, A = /.+\.(gif|jpe?g|png|webp)/i, j = [], D = [], X = [];
- return [].forEach || (Array.prototype.forEach = function(t, e) {
- for (var n = 0; n < this.length; n++)
- t.call(e, this[n], n, this)
- }
- ),
- [].filter || (Array.prototype.filter = function(t, e, n, i, o) {
- for (n = this,
- i = [],
- o = 0; o < n.length; o++)
- t.call(e, n[o], o, n) && i.push(n[o]);
- return i
- }
- ),
- {
- run: t,
- showNext: u,
- showPrevious: c
- }
+ var b, k, w, C, T, N, E = ' ',
+ x = ' ',
+ B = ' ',
+ I = {},
+ P = {
+ captions: !0,
+ buttons: "auto",
+ async: !1,
+ preload: 2,
+ animation: "slideIn",
+ afterShow: null,
+ afterHide: null,
+ onChange: null
+ },
+ H = {},
+ L = 0,
+ M = -1,
+ S = !1,
+ A = /.+\.(gif|jpe?g|png|webp)/i,
+ j = [],
+ D = [],
+ X = [];
+ return [].forEach || (Array.prototype.forEach = function (t, e) {
+ for (var n = 0; n < this.length; n++)
+ t.call(e, this[n], n, this)
+ }),
+ [].filter || (Array.prototype.filter = function (t, e, n, i, o) {
+ for (n = this,
+ i = [],
+ o = 0; o < n.length; o++)
+ t.call(e, n[o], o, n) && i.push(n[o]);
+ return i
+ }), {
+ run: t,
+ showNext: u,
+ showPrevious: c
+ }
}();
-var MD5 = function(s) {
+var MD5 = function (s) {
function L(k, d) {
return (k << d) | (k >>> (32 - d))
}
+
function K(G, k) {
var I, d, F, H, x;
F = (G & 2147483648);
@@ -16815,34 +17745,43 @@ var MD5 = function(s) {
return (x ^ F ^ H)
}
}
+
function r(d, F, k) {
return (d & F) | ((~d) & k)
}
+
function q(d, F, k) {
return (d & k) | (F & (~k))
}
+
function p(d, F, k) {
return (d ^ F ^ k)
}
+
function n(d, F, k) {
return (F ^ (d | (~k)))
}
+
function u(G, F, aa, Z, k, H, I) {
G = K(G, K(K(r(F, aa, Z), k), I));
return K(L(G, H), F)
}
+
function f(G, F, aa, Z, k, H, I) {
G = K(G, K(K(q(F, aa, Z), k), I));
return K(L(G, H), F)
}
+
function D(G, F, aa, Z, k, H, I) {
G = K(G, K(K(p(F, aa, Z), k), I));
return K(L(G, H), F)
}
+
function t(G, F, aa, Z, k, H, I) {
G = K(G, K(K(n(F, aa, Z), k), I));
return K(L(G, H), F)
}
+
function e(G) {
var Z;
var F = G.length;
@@ -16865,8 +17804,11 @@ var MD5 = function(s) {
aa[I - 1] = F >>> 29;
return aa
}
+
function B(x) {
- var k = "", F = "", G, d;
+ var k = "",
+ F = "",
+ G, d;
for (d = 0; d <= 3; d++) {
G = (x >>> (d * 8)) & 255;
F = "0" + G.toString(16);
@@ -16874,6 +17816,7 @@ var MD5 = function(s) {
}
return k
}
+
function J(k) {
k = k.replace(/rn/g, "n");
var d = "";
@@ -16896,22 +17839,22 @@ var MD5 = function(s) {
}
var C = Array();
var P, h, E, v, g, Y, X, W, V;
- var S = 7
- , Q = 12
- , N = 17
- , M = 22;
- var A = 5
- , z = 9
- , y = 14
- , w = 20;
- var o = 4
- , m = 11
- , l = 16
- , j = 23;
- var U = 6
- , T = 10
- , R = 15
- , O = 21;
+ var S = 7,
+ Q = 12,
+ N = 17,
+ M = 22;
+ var A = 5,
+ z = 9,
+ y = 14,
+ w = 20;
+ var o = 4,
+ m = 11,
+ l = 16,
+ j = 23;
+ var U = 6,
+ T = 10,
+ R = 15,
+ O = 21;
s = J(s);
C = e(s);
Y = 1732584193;
@@ -16994,4 +17937,4 @@ var MD5 = function(s) {
}
var i = B(Y) + B(X) + B(W) + B(V);
return i.toLowerCase()
-};
+};
\ No newline at end of file
diff --git a/js/sakura-app.js b/js/sakura-app.js
index eaa7f60..2a2e79a 100644
--- a/js/sakura-app.js
+++ b/js/sakura-app.js
@@ -1814,4 +1814,59 @@ $(document).ready(function () {
// }
// if (document.body.clientWidth > 860) {
// aplayerF();
-// }
\ No newline at end of file
+// }
+
+function switchNightMode() {
+ $('').appendTo($("body")), setTimeout(
+ function () {
+ var DarkMode = document.cookie.replace(/(?:(?:^|.*;\s*)DarkMode\s*\=\s*([^;]*).*$)|^.*$/, "$1") ||
+ '0';
+ (DarkMode == '0') ? ($("html").addClass("DarkMode"), document.cookie = "DarkMode=1;path=/", console
+ .log('夜间模式开启'), $('#modeicon').attr("xlink:href", "#icon-sun")) : ($("html").removeClass(
+ "DarkMode"), document.cookie = "DarkMode=0;path=/", console.log('夜间模式关闭'), $('#modeicon')
+ .attr("xlink:href", "#icon-_moon")), setTimeout(function () {
+ $(".Cuteen_DarkSky").fadeOut(1e3, function () {
+ $(this).remove()
+ })
+ }, 2e3)
+ }), 50
+}
+
+function checkNightMode() {
+ if ($("html").hasClass("n-f")) {
+ $("html").removeClass("day");
+ $("html").addClass("DarkMode");
+ $('#modeicon').attr("xlink:href", "#icon-sun")
+ return;
+ }
+ if ($("html").hasClass("d-f")) {
+ $("html").removeClass("DarkMode");
+ $("html").addClass("day");
+ $('#modeicon').attr("xlink:href", "#icon-_moon")
+
+ return;
+ }
+ if (document.cookie.replace(/(?:(?:^|.*;\s*)DarkMode\s*\=\s*([^;]*).*$)|^.*$/, "$1") === '') {
+ if (new Date().getHours() >= 23 || new Date().getHours() < 7) {
+ $("html").addClass("DarkMode");
+ document.cookie = "DarkMode=1;path=/";
+ console.log('夜间模式开启');
+ $('#modeicon').attr("xlink:href", "#icon-sun")
+ } else {
+ $("html").removeClass("DarkMode");
+ document.cookie = "DarkMode=0;path=/";
+ console.log('夜间模式关闭');
+ $('#modeicon').attr("xlink:href", "#icon-_moon")
+ }
+ } else {
+ var DarkMode = document.cookie.replace(/(?:(?:^|.*;\s*)DarkMode\s*\=\s*([^;]*).*$)|^.*$/, "$1") || '0';
+ if (DarkMode == '0') {
+ $("html").removeClass("DarkMode");
+ $('#modeicon').attr("xlink:href", "#icon-_moon")
+ } else if (DarkMode == '1') {
+ $("html").addClass("DarkMode");
+ $('#modeicon').attr("xlink:href", "#icon-sun")
+ }
+ }
+}
+checkNightMode();
\ No newline at end of file