- (window.webpackJsonp = window.webpackJsonp || []).push([
- [0], Array(26).concat([function(e, t, n) {
- "use strict";
- e.exports = n(510)
- }, function(e, t, n) {
- e.exports = n(446)()
- }, , function(e, t, n) {
- "use strict";
- t.__esModule = !0, t.connect = t.connectAdvanced = t.Provider = void 0;
- var r = a(n(498)),
- i = a(n(166)),
- n = a(n(494));
- function a(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
- t.Provider = r.default, t.connectAdvanced = i.default, t.connect = n.default
- }, , function(e, t, n) {
- var Ui;
- (Ui = n(161)(e)).exports = function() {
- "use strict";
- var t;
- function c() {
- return t.apply(null, arguments)
- }
- function e(e) {
- t = e
- }
- function i(e) {
- return Object.prototype.toString.call(e) === "[object Array]"
- }
- function a(e) {
- return e instanceof Date || Object.prototype.toString.call(e) === "[object Date]"
- }
- function n(e, t) {
- var n = [],
- r;
- for (r = 0; r < e.length; ++r) {
- n.push(t(e[r], r))
- }
- return n
- }
- function s(e, t) {
- return Object.prototype.hasOwnProperty.call(e, t)
- }
- function o(e, t) {
- for (var n in t) {
- if (s(t, n)) {
- e[n] = t[n]
- }
- }
- if (s(t, "toString")) {
- e.toString = t.toString
- }
- if (s(t, "valueOf")) {
- e.valueOf = t.valueOf
- }
- return e
- }
- function l(e, t, n, r) {
- return Tt(e, t, n, r, true).utc()
- }
- function r() {
- return {
- empty: false,
- unusedTokens: [],
- unusedInput: [],
- overflow: -2,
- charsLeftOver: 0,
- nullInput: false,
- invalidMonth: null,
- invalidFormat: false,
- userInvalidated: false,
- iso: false
- }
- }
- function u(e) {
- if (e._pf == null) {
- e._pf = r()
- }
- return e._pf
- }
- function d(e) {
- if (e._isValid == null) {
- var t = u(e);
- e._isValid = !isNaN(e._d.getTime()) && t.overflow < 0 && !t.empty && !t.invalidMonth && !t.invalidWeekday && !t.nullInput && !t.invalidFormat && !t.userInvalidated;
- if (e._strict) {
- e._isValid = e._isValid && t.charsLeftOver === 0 && t.unusedTokens.length === 0 && t.bigHour === undefined
- }
- }
- return e._isValid
- }
- function p(e) {
- var t = l(NaN);
- if (e != null) {
- o(u(t), e)
- } else {
- u(t).userInvalidated = true
- }
- return t
- }
- function m(e) {
- return e === void 0
- }
- var f = c.momentProperties = [];
- function h(e, t) {
- var n, r, i;
- if (!m(t._isAMomentObject)) {
- e._isAMomentObject = t._isAMomentObject
- }
- if (!m(t._i)) {
- e._i = t._i
- }
- if (!m(t._f)) {
- e._f = t._f
- }
- if (!m(t._l)) {
- e._l = t._l
- }
- if (!m(t._strict)) {
- e._strict = t._strict
- }
- if (!m(t._tzm)) {
- e._tzm = t._tzm
- }
- if (!m(t._isUTC)) {
- e._isUTC = t._isUTC
- }
- if (!m(t._offset)) {
- e._offset = t._offset
- }
- if (!m(t._pf)) {
- e._pf = u(t)
- }
- if (!m(t._locale)) {
- e._locale = t._locale
- }
- if (f.length > 0) {
- for (n in f) {
- r = f[n];
- i = t[r];
- if (!m(i)) {
- e[r] = i
- }
- }
- }
- return e
- }
- var g = false;
- function _(e) {
- h(this, e);
- this._d = new Date(e._d != null ? e._d.getTime() : NaN);
- if (g === false) {
- g = true;
- c.updateOffset(this);
- g = false
- }
- }
- function y(e) {
- return e instanceof _ || e != null && e._isAMomentObject != null
- }
- function b(e) {
- if (e < 0) {
- return Math.ceil(e)
- } else {
- return Math.floor(e)
- }
- }
- function v(e) {
- var t = +e,
- n = 0;
- if (t !== 0 && isFinite(t)) {
- n = b(t)
- }
- return n
- }
- function S(e, t, n) {
- var r = Math.min(e.length, t.length),
- i = Math.abs(e.length - t.length),
- a = 0,
- o;
- for (o = 0; o < r; o++) {
- if (n && e[o] !== t[o] || !n && v(e[o]) !== v(t[o])) {
- a++
- }
- }
- return a + i
- }
- function x() {}
- var E = {},
- w;
- function C(e) {
- return e ? e.toLowerCase().replace("_", "-") : e
- }
- function T(e) {
- var t = 0,
- n, r, i, a;
- while (t < e.length) {
- a = C(e[t]).split("-");
- n = a.length;
- r = C(e[t + 1]);
- r = r ? r.split("-") : null;
- while (n > 0) {
- i = O(a.slice(0, n).join("-"));
- if (i) {
- return i
- }
- if (r && r.length >= n && S(a, r, true) >= n - 1) {
- break
- }
- n--
- }
- t++
- }
- return null
- }
- function O(e) {
- var t = null;
- if (!E[e] && typeof Ui !== "undefined" && Ui && Ui.exports) {
- try {
- t = w._abbr;
- ! function e() {
- var t = new Error('Cannot find module "undefined"');
- t.code = "MODULE_NOT_FOUND";
- throw t
- }();
- M(t)
- } catch (e) {}
- }
- return E[e]
- }
- function M(e, t) {
- var n;
- if (e) {
- if (m(t)) {
- n = N(e)
- } else {
- n = A(e, t)
- }
- if (n) {
- w = n
- }
- }
- return w._abbr
- }
- function A(e, t) {
- if (t !== null) {
- t.abbr = e;
- E[e] = E[e] || new x;
- E[e].set(t);
- M(e);
- return E[e]
- } else {
- delete E[e];
- return null
- }
- }
- function N(e) {
- var t;
- if (e && e._locale && e._locale._abbr) {
- e = e._locale._abbr
- }
- if (!e) {
- return w
- }
- if (!i(e)) {
- t = O(e);
- if (t) {
- return t
- }
- e = [e]
- }
- return T(e)
- }
- var D = {};
- function P(e, t) {
- var n = e.toLowerCase();
- D[n] = D[n + "s"] = D[t] = e
- }
- function k(e) {
- return typeof e === "string" ? D[e] || D[e.toLowerCase()] : undefined
- }
- function R(e) {
- var t = {},
- n, r;
- for (r in e) {
- if (s(e, r)) {
- n = k(r);
- if (n) {
- t[n] = e[r]
- }
- }
- }
- return t
- }
- function L(e) {
- return e instanceof Function || Object.prototype.toString.call(e) === "[object Function]"
- }
- function I(t, n) {
- return function(e) {
- if (e != null) {
- B(this, t, e);
- c.updateOffset(this, n);
- return this
- } else {
- return F(this, t)
- }
- }
- }
- function F(e, t) {
- return e.isValid() ? e._d["get" + (e._isUTC ? "UTC" : "") + t]() : NaN
- }
- function B(e, t, n) {
- if (e.isValid()) {
- e._d["set" + (e._isUTC ? "UTC" : "") + t](n)
- }
- }
- function G(e, t) {
- var n;
- if (typeof e === "object") {
- for (n in e) {
- this.set(n, e[n])
- }
- } else {
- e = k(e);
- if (L(this[e])) {
- return this[e](t)
- }
- }
- return this
- }
- function U(e, t, n) {
- var r = "" + Math.abs(e),
- i = t - r.length,
- a = e >= 0;
- return (a ? n ? "+" : "" : "-") + Math.pow(10, Math.max(0, i)).toString().substr(1) + r
- }
- var j = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
- V = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
- z = {},
- H = {};
- function q(e, t, n, r) {
- var i = r;
- if (typeof r === "string") {
- i = function() {
- return this[r]()
- }
- }
- if (e) {
- H[e] = i
- }
- if (t) {
- H[t[0]] = function() {
- return U(i.apply(this, arguments), t[1], t[2])
- }
- }
- if (n) {
- H[n] = function() {
- return this.localeData().ordinal(i.apply(this, arguments), e)
- }
- }
- }
- function W(e) {
- if (e.match(/\[[\s\S]/)) {
- return e.replace(/^\[|\]$/g, "")
- }
- return e.replace(/\\/g, "")
- }
- function K(n) {
- var r = n.match(j),
- i, a;
- for (i = 0, a = r.length; i < a; i++) {
- if (H[r[i]]) {
- r[i] = H[r[i]]
- } else {
- r[i] = W(r[i])
- }
- }
- return function(e) {
- var t = "";
- for (i = 0; i < a; i++) {
- t += r[i] instanceof Function ? r[i].call(e, n) : r[i]
- }
- return t
- }
- }
- function $(e, t) {
- if (!e.isValid()) {
- return e.localeData().invalidDate()
- }
- t = Y(t, e.localeData());
- z[t] = z[t] || K(t);
- return z[t](e)
- }
- function Y(e, t) {
- var n = 5;
- function r(e) {
- return t.longDateFormat(e) || e
- }
- V.lastIndex = 0;
- while (n >= 0 && V.test(e)) {
- e = e.replace(V, r);
- V.lastIndex = 0;
- n -= 1
- }
- return e
- }
- var X = /\d/,
- Q = /\d\d/,
- Z = /\d{3}/,
- J = /\d{4}/,
- ee = /[+-]?\d{6}/,
- te = /\d\d?/,
- ne = /\d\d\d\d?/,
- re = /\d\d\d\d\d\d?/,
- ie = /\d{1,3}/,
- ae = /\d{1,4}/,
- oe = /[+-]?\d{1,6}/,
- se = /\d+/,
- le = /[+-]?\d+/,
- ce = /Z|[+-]\d\d:?\d\d/gi,
- ue = /Z|[+-]\d\d(?::?\d\d)?/gi,
- de = /[+-]?\d+(\.\d{1,3})?/,
- pe = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,
- me = {};
- function fe(e, n, r) {
- me[e] = L(n) ? n : function(e, t) {
- return e && r ? r : n
- }
- }
- function he(e, t) {
- if (!s(me, e)) {
- return new RegExp(ge(e))
- }
- return me[e](t._strict, t._locale)
- }
- function ge(e) {
- return _e(e.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(e, t, n, r, i) {
- return t || n || r || i
- }))
- }
- function _e(e) {
- return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")
- }
- var ye = {};
- function be(e, n) {
- var t, r = n;
- if (typeof e === "string") {
- e = [e]
- }
- if (typeof n === "number") {
- r = function(e, t) {
- t[n] = v(e)
- }
- }
- for (t = 0; t < e.length; t++) {
- ye[e[t]] = r
- }
- }
- function ve(e, i) {
- be(e, function(e, t, n, r) {
- n._w = n._w || {};
- i(e, n._w, n, r)
- })
- }
- function Se(e, t, n) {
- if (t != null && s(ye, e)) {
- ye[e](t, n._a, n, e)
- }
- }
- var xe = 0,
- Ee = 1,
- we = 2,
- Ce = 3,
- Te = 4,
- Oe = 5,
- Me = 6,
- Ae = 7,
- Ne = 8;
- function De(e, t) {
- return new Date(Date.UTC(e, t + 1, 0)).getUTCDate()
- }
- q("M", ["MM", 2], "Mo", function() {
- return this.month() + 1
- }), q("MMM", 0, 0, function(e) {
- return this.localeData().monthsShort(this, e)
- }), q("MMMM", 0, 0, function(e) {
- return this.localeData().months(this, e)
- }), P("month", "M"), fe("M", te), fe("MM", te, Q), fe("MMM", function(e, t) {
- return t.monthsShortRegex(e)
- }), fe("MMMM", function(e, t) {
- return t.monthsRegex(e)
- }), be(["M", "MM"], function(e, t) {
- t[Ee] = v(e) - 1
- }), be(["MMM", "MMMM"], function(e, t, n, r) {
- var i = n._locale.monthsParse(e, r, n._strict);
- if (i != null) {
- t[Ee] = i
- } else {
- u(n).invalidMonth = e
- }
- });
- var Pe = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,
- ke = "January_February_March_April_May_June_July_August_September_October_November_December".split("_");
- function Re(e, t) {
- return i(this._months) ? this._months[e.month()] : this._months[Pe.test(t) ? "format" : "standalone"][e.month()]
- }
- var Le = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");
- function Ie(e, t) {
- return i(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[Pe.test(t) ? "format" : "standalone"][e.month()]
- }
- function Fe(e, t, n) {
- var r, i, a;
- if (!this._monthsParse) {
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = []
- }
- for (r = 0; r < 12; r++) {
- i = l([2e3, r]);
- if (n && !this._longMonthsParse[r]) {
- this._longMonthsParse[r] = new RegExp("^" + this.months(i, "").replace(".", "") + "$", "i");
- this._shortMonthsParse[r] = new RegExp("^" + this.monthsShort(i, "").replace(".", "") + "$", "i")
- }
- if (!n && !this._monthsParse[r]) {
- a = "^" + this.months(i, "") + "|^" + this.monthsShort(i, "");
- this._monthsParse[r] = new RegExp(a.replace(".", ""), "i")
- }
- if (n && t === "MMMM" && this._longMonthsParse[r].test(e)) {
- return r
- } else if (n && t === "MMM" && this._shortMonthsParse[r].test(e)) {
- return r
- } else if (!n && this._monthsParse[r].test(e)) {
- return r
- }
- }
- }
- function Be(e, t) {
- var n;
- if (!e.isValid()) {
- return e
- }
- if (typeof t === "string") {
- t = e.localeData().monthsParse(t);
- if (typeof t !== "number") {
- return e
- }
- }
- n = Math.min(e.date(), De(e.year(), t));
- e._d["set" + (e._isUTC ? "UTC" : "") + "Month"](t, n);
- return e
- }
- function Ge(e) {
- if (e != null) {
- Be(this, e);
- c.updateOffset(this, true);
- return this
- } else {
- return F(this, "Month")
- }
- }
- function Ue() {
- return De(this.year(), this.month())
- }
- var je = pe;
- function Ve(e) {
- if (this._monthsParseExact) {
- if (!s(this, "_monthsRegex")) {
- qe.call(this)
- }
- if (e) {
- return this._monthsShortStrictRegex
- } else {
- return this._monthsShortRegex
- }
- } else {
- return this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex
- }
- }
- var ze = pe;
- function He(e) {
- if (this._monthsParseExact) {
- if (!s(this, "_monthsRegex")) {
- qe.call(this)
- }
- if (e) {
- return this._monthsStrictRegex
- } else {
- return this._monthsRegex
- }
- } else {
- return this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex
- }
- }
- function qe() {
- function e(e, t) {
- return t.length - e.length
- }
- var t = [],
- n = [],
- r = [],
- i, a;
- for (i = 0; i < 12; i++) {
- a = l([2e3, i]);
- t.push(this.monthsShort(a, ""));
- n.push(this.months(a, ""));
- r.push(this.months(a, ""));
- r.push(this.monthsShort(a, ""))
- }
- t.sort(e);
- n.sort(e);
- r.sort(e);
- for (i = 0; i < 12; i++) {
- t[i] = _e(t[i]);
- n[i] = _e(n[i]);
- r[i] = _e(r[i])
- }
- this._monthsRegex = new RegExp("^(" + r.join("|") + ")", "i");
- this._monthsShortRegex = this._monthsRegex;
- this._monthsStrictRegex = new RegExp("^(" + n.join("|") + ")$", "i");
- this._monthsShortStrictRegex = new RegExp("^(" + t.join("|") + ")$", "i")
- }
- function We(e) {
- var t;
- var n = e._a;
- if (n && u(e).overflow === -2) {
- t = n[Ee] < 0 || n[Ee] > 11 ? Ee : n[we] < 1 || n[we] > De(n[xe], n[Ee]) ? we : n[Ce] < 0 || n[Ce] > 24 || n[Ce] === 24 && (n[Te] !== 0 || n[Oe] !== 0 || n[Me] !== 0) ? Ce : n[Te] < 0 || n[Te] > 59 ? Te : n[Oe] < 0 || n[Oe] > 59 ? Oe : n[Me] < 0 || n[Me] > 999 ? Me : -1;
- if (u(e)._overflowDayOfYear && (t < xe || t > we)) {
- t = we
- }
- if (u(e)._overflowWeeks && t === -1) {
- t = Ae
- }
- if (u(e)._overflowWeekday && t === -1) {
- t = Ne
- }
- u(e).overflow = t
- }
- return e
- }
- function Ke(e) {
- if (c.suppressDeprecationWarnings === false && typeof console !== "undefined" && console.warn) {
- console.warn("Deprecation warning: " + e)
- }
- }
- function $e(e, t) {
- var n = true;
- return o(function() {
- if (n) {
- Ke(e + "\nArguments: " + Array.prototype.slice.call(arguments).join(", ") + "\n" + (new Error).stack);
- n = false
- }
- return t.apply(this, arguments)
- }, t)
- }
- var Ye = {};
- function Xe(e, t) {
- if (!Ye[e]) {
- Ke(t);
- Ye[e] = true
- }
- }
- var Qe = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,
- Ze = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,
- Je = /Z|[+-]\d\d(?::?\d\d)?/,
- et = [
- ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
- ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
- ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
- ["GGGG-[W]WW", /\d{4}-W\d\d/, c.suppressDeprecationWarnings = false],
- ["YYYY-DDD", /\d{4}-\d{3}/],
- ["YYYY-MM", /\d{4}-\d\d/, false],
- ["YYYYYYMMDD", /[+-]\d{10}/],
- ["YYYYMMDD", /\d{8}/],
- ["GGGG[W]WWE", /\d{4}W\d{3}/],
- ["GGGG[W]WW", /\d{4}W\d{2}/, false],
- ["YYYYDDD", /\d{7}/]
- ],
- tt = [
- ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
- ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
- ["HH:mm:ss", /\d\d:\d\d:\d\d/],
- ["HH:mm", /\d\d:\d\d/],
- ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
- ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
- ["HHmmss", /\d\d\d\d\d\d/],
- ["HHmm", /\d\d\d\d/],
- ["HH", /\d\d/]
- ],
- nt = /^\/?Date\((\-?\d+)/i;
- function rt(e) {
- var t, n, r = e._i,
- i = Qe.exec(r) || Ze.exec(r),
- a, o, s, l;
- if (i) {
- u(e).iso = true;
- for (t = 0, n = et.length; t < n; t++) {
- if (et[t][1].exec(i[1])) {
- o = et[t][0];
- a = et[t][2] !== false;
- break
- }
- }
- if (o == null) {
- e._isValid = false;
- return
- }
- if (i[3]) {
- for (t = 0, n = tt.length; t < n; t++) {
- if (tt[t][1].exec(i[3])) {
- s = (i[2] || " ") + tt[t][0];
- break
- }
- }
- if (s == null) {
- e._isValid = false;
- return
- }
- }
- if (!a && s != null) {
- e._isValid = false;
- return
- }
- if (i[4]) {
- if (Je.exec(i[4])) {
- l = "Z"
- } else {
- e._isValid = false;
- return
- }
- }
- e._f = o + (s || "") + (l || "");
- bt(e)
- } else {
- e._isValid = false
- }
- }
- function it(e) {
- var t = nt.exec(e._i);
- if (t !== null) {
- e._d = new Date(+t[1]);
- return
- }
- rt(e);
- if (e._isValid === false) {
- delete e._isValid;
- c.createFromInputFallback(e)
- }
- }
- function at(e, t, n, r, i, a, o) {
- var s = new Date(e, t, n, r, i, a, o);
- if (e < 100 && e >= 0 && isFinite(s.getFullYear())) {
- s.setFullYear(e)
- }
- return s
- }
- function ot(e) {
- var t = new Date(Date.UTC.apply(null, arguments));
- if (e < 100 && e >= 0 && isFinite(t.getUTCFullYear())) {
- t.setUTCFullYear(e)
- }
- return t
- }
- function st(e) {
- return lt(e) ? 366 : 365
- }
- function lt(e) {
- return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0
- }
- c.createFromInputFallback = $e("moment construction falls back to js Date. This is " + "discouraged and will be removed in upcoming major " + "release. Please refer to " + "https://github.com/moment/moment/issues/1407 for more info.", function(e) {
- e._d = new Date(e._i + (e._useUTC ? " UTC" : ""))
- }), q("Y", 0, 0, function() {
- var e = this.year();
- return e <= 9999 ? "" + e : "+" + e
- }), q(0, ["YY", 2], 0, function() {
- return this.year() % 100
- }), q(0, ["YYYY", 4], 0, "year"), q(0, ["YYYYY", 5], 0, "year"), q(0, ["YYYYYY", 6, true], 0, "year"), P("year", "y"), fe("Y", le), fe("YY", te, Q), fe("YYYY", ae, J), fe("YYYYY", oe, ee), fe("YYYYYY", oe, ee), be(["YYYYY", "YYYYYY"], xe), be("YYYY", function(e, t) {
- t[xe] = e.length === 2 ? c.parseTwoDigitYear(e) : v(e)
- }), be("YY", function(e, t) {
- t[xe] = c.parseTwoDigitYear(e)
- }), be("Y", function(e, t) {
- t[xe] = parseInt(e, 10)
- }), c.parseTwoDigitYear = function(e) {
- return v(e) + (v(e) > 68 ? 1900 : 2e3)
- };
- var ct = I("FullYear", false);
- function ut() {
- return lt(this.year())
- }
- function dt(e, t, n) {
- var r = 7 + t - n,
- i = (7 + ot(e, 0, r).getUTCDay() - t) % 7;
- return -i + r - 1
- }
- function pt(e, t, n, r, i) {
- var a = (7 + n - r) % 7,
- o = dt(e, r, i),
- s = 1 + 7 * (t - 1) + a + o,
- l, c;
- if (s <= 0) {
- l = e - 1;
- c = st(l) + s
- } else if (s > st(e)) {
- l = e + 1;
- c = s - st(e)
- } else {
- l = e;
- c = s
- }
- return {
- year: l,
- dayOfYear: c
- }
- }
- function mt(e, t, n) {
- var r = dt(e.year(), t, n),
- i = Math.floor((e.dayOfYear() - r - 1) / 7) + 1,
- a, o;
- if (i < 1) {
- o = e.year() - 1;
- a = i + ft(o, t, n)
- } else if (i > ft(e.year(), t, n)) {
- a = i - ft(e.year(), t, n);
- o = e.year() + 1
- } else {
- o = e.year();
- a = i
- }
- return {
- week: a,
- year: o
- }
- }
- function ft(e, t, n) {
- var r = dt(e, t, n),
- i = dt(e + 1, t, n);
- return (st(e) - r + i) / 7
- }
- function ht(e, t, n) {
- if (e != null) {
- return e
- }
- if (t != null) {
- return t
- }
- return n
- }
- function gt(e) {
- var t = new Date(c.now());
- if (e._useUTC) {
- return [t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()]
- }
- return [t.getFullYear(), t.getMonth(), t.getDate()]
- }
- function _t(e) {
- var t, n, r = [],
- i, a;
- if (e._d) {
- return
- }
- i = gt(e);
- if (e._w && e._a[we] == null && e._a[Ee] == null) {
- yt(e)
- }
- if (e._dayOfYear) {
- a = ht(e._a[xe], i[xe]);
- if (e._dayOfYear > st(a)) {
- u(e)._overflowDayOfYear = true
- }
- n = ot(a, 0, e._dayOfYear);
- e._a[Ee] = n.getUTCMonth();
- e._a[we] = n.getUTCDate()
- }
- for (t = 0; t < 3 && e._a[t] == null; ++t) {
- e._a[t] = r[t] = i[t]
- }
- for (; t < 7; t++) {
- e._a[t] = r[t] = e._a[t] == null ? t === 2 ? 1 : 0 : e._a[t]
- }
- if (e._a[Ce] === 24 && e._a[Te] === 0 && e._a[Oe] === 0 && e._a[Me] === 0) {
- e._nextDay = true;
- e._a[Ce] = 0
- }
- e._d = (e._useUTC ? ot : at).apply(null, r);
- if (e._tzm != null) {
- e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm)
- }
- if (e._nextDay) {
- e._a[Ce] = 24
- }
- }
- function yt(e) {
- var t, n, r, i, a, o, s, l;
- t = e._w;
- if (t.GG != null || t.W != null || t.E != null) {
- a = 1;
- o = 4;
- n = ht(t.GG, e._a[xe], mt(Ot(), 1, 4).year);
- r = ht(t.W, 1);
- i = ht(t.E, 1);
- if (i < 1 || i > 7) {
- l = true
- }
- } else {
- a = e._locale._week.dow;
- o = e._locale._week.doy;
- n = ht(t.gg, e._a[xe], mt(Ot(), a, o).year);
- r = ht(t.w, 1);
- if (t.d != null) {
- i = t.d;
- if (i < 0 || i > 6) {
- l = true
- }
- } else if (t.e != null) {
- i = t.e + a;
- if (t.e < 0 || t.e > 6) {
- l = true
- }
- } else {
- i = a
- }
- }
- if (r < 1 || r > ft(n, a, o)) {
- u(e)._overflowWeeks = true
- } else if (l != null) {
- u(e)._overflowWeekday = true
- } else {
- s = pt(n, r, i, a, o);
- e._a[xe] = s.year;
- e._dayOfYear = s.dayOfYear
- }
- }
- function bt(e) {
- if (e._f === c.ISO_8601) {
- rt(e);
- return
- }
- e._a = [];
- u(e).empty = true;
- var t = "" + e._i,
- n, r, i, a, o, s = t.length,
- l = 0;
- i = Y(e._f, e._locale).match(j) || [];
- for (n = 0; n < i.length; n++) {
- a = i[n];
- r = (t.match(he(a, e)) || [])[0];
- if (r) {
- o = t.substr(0, t.indexOf(r));
- if (o.length > 0) {
- u(e).unusedInput.push(o)
- }
- t = t.slice(t.indexOf(r) + r.length);
- l += r.length
- }
- if (H[a]) {
- if (r) {
- u(e).empty = false
- } else {
- u(e).unusedTokens.push(a)
- }
- Se(a, r, e)
- } else if (e._strict && !r) {
- u(e).unusedTokens.push(a)
- }
- }
- u(e).charsLeftOver = s - l;
- if (t.length > 0) {
- u(e).unusedInput.push(t)
- }
- if (u(e).bigHour === true && e._a[Ce] <= 12 && e._a[Ce] > 0) {
- u(e).bigHour = undefined
- }
- e._a[Ce] = vt(e._locale, e._a[Ce], e._meridiem);
- _t(e);
- We(e)
- }
- function vt(e, t, n) {
- var r;
- if (n == null) {
- return t
- }
- if (e.meridiemHour != null) {
- return e.meridiemHour(t, n)
- } else if (e.isPM != null) {
- r = e.isPM(n);
- if (r && t < 12) {
- t += 12
- }
- if (!r && t === 12) {
- t = 0
- }
- return t
- } else {
- return t
- }
- }
- function St(e) {
- var t, n, r, i, a;
- if (e._f.length === 0) {
- u(e).invalidFormat = true;
- e._d = new Date(NaN);
- return
- }
- for (i = 0; i < e._f.length; i++) {
- a = 0;
- t = h({}, e);
- if (e._useUTC != null) {
- t._useUTC = e._useUTC
- }
- t._f = e._f[i];
- bt(t);
- if (!d(t)) {
- continue
- }
- a += u(t).charsLeftOver;
- a += u(t).unusedTokens.length * 10;
- u(t).score = a;
- if (r == null || a < r) {
- r = a;
- n = t
- }
- }
- o(e, n || t)
- }
- function xt(e) {
- if (e._d) {
- return
- }
- var t = R(e._i);
- e._a = n([t.year, t.month, t.day || t.date, t.hour, t.minute, t.second, t.millisecond], function(e) {
- return e && parseInt(e, 10)
- });
- _t(e)
- }
- function Et(e) {
- var t = new _(We(wt(e)));
- if (t._nextDay) {
- t.add(1, "d");
- t._nextDay = undefined
- }
- return t
- }
- function wt(e) {
- var t = e._i,
- n = e._f;
- e._locale = e._locale || N(e._l);
- if (t === null || n === undefined && t === "") {
- return p({
- nullInput: true
- })
- }
- if (typeof t === "string") {
- e._i = t = e._locale.preparse(t)
- }
- if (y(t)) {
- return new _(We(t))
- } else if (i(n)) {
- St(e)
- } else if (n) {
- bt(e)
- } else if (a(t)) {
- e._d = t
- } else {
- Ct(e)
- }
- if (!d(e)) {
- e._d = null
- }
- return e
- }
- function Ct(e) {
- var t = e._i;
- if (t === undefined) {
- e._d = new Date(c.now())
- } else if (a(t)) {
- e._d = new Date(+t)
- } else if (typeof t === "string") {
- it(e)
- } else if (i(t)) {
- e._a = n(t.slice(0), function(e) {
- return parseInt(e, 10)
- });
- _t(e)
- } else if (typeof t === "object") {
- xt(e)
- } else if (typeof t === "number") {
- e._d = new Date(t)
- } else {
- c.createFromInputFallback(e)
- }
- }
- function Tt(e, t, n, r, i) {
- var a = {};
- if (typeof n === "boolean") {
- r = n;
- n = undefined
- }
- a._isAMomentObject = true;
- a._useUTC = a._isUTC = i;
- a._l = n;
- a._i = e;
- a._f = t;
- a._strict = r;
- return Et(a)
- }
- function Ot(e, t, n, r) {
- return Tt(e, t, n, r, false)
- }
- c.ISO_8601 = function() {};
- var Mt = $e("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548", function() {
- var e = Ot.apply(null, arguments);
- if (this.isValid() && e.isValid()) {
- return e < this ? this : e
- } else {
- return p()
- }
- }),
- At = $e("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548", function() {
- var e = Ot.apply(null, arguments);
- if (this.isValid() && e.isValid()) {
- return e > this ? this : e
- } else {
- return p()
- }
- });
- function Nt(e, t) {
- var n, r;
- if (t.length === 1 && i(t[0])) {
- t = t[0]
- }
- if (!t.length) {
- return Ot()
- }
- n = t[0];
- for (r = 1; r < t.length; ++r) {
- if (!t[r].isValid() || t[r][e](n)) {
- n = t[r]
- }
- }
- return n
- }
- function Dt() {
- var e;
- return Nt("isBefore", [].slice.call(arguments, 0))
- }
- function Pt() {
- var e;
- return Nt("isAfter", [].slice.call(arguments, 0))
- }
- var kt = function() {
- return Date.now ? Date.now() : +new Date
- };
- function Rt(e) {
- var t = R(e),
- n = t.year || 0,
- r = t.quarter || 0,
- i = t.month || 0,
- a = t.week || 0,
- o = t.day || 0,
- s = t.hour || 0,
- l = t.minute || 0,
- c = t.second || 0,
- u = t.millisecond || 0;
- this._milliseconds = +u + c * 1e3 + l * 6e4 + s * 36e5;
- this._days = +o + a * 7;
- this._months = +i + r * 3 + n * 12;
- this._data = {};
- this._locale = N();
- this._bubble()
- }
- function Lt(e) {
- return e instanceof Rt
- }
- function It(e, n) {
- q(e, 0, 0, function() {
- var e = this.utcOffset();
- var t = "+";
- if (e < 0) {
- e = -e;
- t = "-"
- }
- return t + U(~~(e / 60), 2) + n + U(~~e % 60, 2)
- })
- }
- It("Z", ":"), It("ZZ", ""), fe("Z", ue), fe("ZZ", ue), be(["Z", "ZZ"], function(e, t, n) {
- n._useUTC = true;
- n._tzm = Bt(ue, e)
- });
- var Ft = /([\+\-]|\d\d)/gi;
- function Bt(e, t) {
- var n = (t || "").match(e) || [];
- var r = n[n.length - 1] || [];
- var i = (r + "").match(Ft) || ["-", 0, 0];
- var a = +(i[1] * 60) + v(i[2]);
- return i[0] === "+" ? a : -a
- }
- function Gt(e, t) {
- var n, r;
- if (t._isUTC) {
- n = t.clone();
- r = (y(e) || a(e) ? +e : +Ot(e)) - +n;
- n._d.setTime(+n._d + r);
- c.updateOffset(n, false);
- return n
- } else {
- return Ot(e).local()
- }
- }
- function Ut(e) {
- return -Math.round(e._d.getTimezoneOffset() / 15) * 15
- }
- function jt(e, t) {
- var n = this._offset || 0,
- r;
- if (!this.isValid()) {
- return e != null ? this : NaN
- }
- if (e != null) {
- if (typeof e === "string") {
- e = Bt(ue, e)
- } else if (Math.abs(e) < 16) {
- e = e * 60
- }
- if (!this._isUTC && t) {
- r = Ut(this)
- }
- this._offset = e;
- this._isUTC = true;
- if (r != null) {
- this.add(r, "m")
- }
- if (n !== e) {
- if (!t || this._changeInProgress) {
- on(this, en(e - n, "m"), 1, false)
- } else if (!this._changeInProgress) {
- this._changeInProgress = true;
- c.updateOffset(this, true);
- this._changeInProgress = null
- }
- }
- return this
- } else {
- return this._isUTC ? n : Ut(this)
- }
- }
- function Vt(e, t) {
- if (e != null) {
- if (typeof e !== "string") {
- e = -e
- }
- this.utcOffset(e, t);
- return this
- } else {
- return -this.utcOffset()
- }
- }
- function zt(e) {
- return this.utcOffset(0, e)
- }
- function Ht(e) {
- if (this._isUTC) {
- this.utcOffset(0, e);
- this._isUTC = false;
- if (e) {
- this.subtract(Ut(this), "m")
- }
- }
- return this
- }
- function qt() {
- if (this._tzm) {
- this.utcOffset(this._tzm)
- } else if (typeof this._i === "string") {
- this.utcOffset(Bt(ce, this._i))
- }
- return this
- }
- function Wt(e) {
- if (!this.isValid()) {
- return false
- }
- e = e ? Ot(e).utcOffset() : 0;
- return (this.utcOffset() - e) % 60 === 0
- }
- function Kt() {
- return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset()
- }
- function $t() {
- if (!m(this._isDSTShifted)) {
- return this._isDSTShifted
- }
- var e = {};
- h(e, this);
- e = wt(e);
- if (e._a) {
- var t = e._isUTC ? l(e._a) : Ot(e._a);
- this._isDSTShifted = this.isValid() && S(e._a, t.toArray()) > 0
- } else {
- this._isDSTShifted = false
- }
- return this._isDSTShifted
- }
- function Yt() {
- return this.isValid() ? !this._isUTC : false
- }
- function Xt() {
- return this.isValid() ? this._isUTC : false
- }
- function Qt() {
- return this.isValid() ? this._isUTC && this._offset === 0 : false
- }
- c.updateOffset = function() {};
- var Zt = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,
- Jt = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;
- function en(e, t) {
- var n = e,
- r = null,
- i, a, o;
- if (Lt(e)) {
- n = {
- ms: e._milliseconds,
- d: e._days,
- M: e._months
- }
- } else if (typeof e === "number") {
- n = {};
- if (t) {
- n[t] = e
- } else {
- n.milliseconds = e
- }
- } else if (!!(r = Zt.exec(e))) {
- i = r[1] === "-" ? -1 : 1;
- n = {
- y: 0,
- d: v(r[we]) * i,
- h: v(r[Ce]) * i,
- m: v(r[Te]) * i,
- s: v(r[Oe]) * i,
- ms: v(r[Me]) * i
- }
- } else if (!!(r = Jt.exec(e))) {
- i = r[1] === "-" ? -1 : 1;
- n = {
- y: tn(r[2], i),
- M: tn(r[3], i),
- d: tn(r[4], i),
- h: tn(r[5], i),
- m: tn(r[6], i),
- s: tn(r[7], i),
- w: tn(r[8], i)
- }
- } else if (n == null) {
- n = {}
- } else if (typeof n === "object" && ("from" in n || "to" in n)) {
- o = rn(Ot(n.from), Ot(n.to));
- n = {};
- n.ms = o.milliseconds;
- n.M = o.months
- }
- a = new Rt(n);
- if (Lt(e) && s(e, "_locale")) {
- a._locale = e._locale
- }
- return a
- }
- function tn(e, t) {
- var n = e && parseFloat(e.replace(",", "."));
- return (isNaN(n) ? 0 : n) * t
- }
- function nn(e, t) {
- var n = {
- milliseconds: 0,
- months: 0
- };
- n.months = t.month() - e.month() + (t.year() - e.year()) * 12;
- if (e.clone().add(n.months, "M").isAfter(t)) {
- --n.months
- }
- n.milliseconds = +t - +e.clone().add(n.months, "M");
- return n
- }
- function rn(e, t) {
- var n;
- if (!(e.isValid() && t.isValid())) {
- return {
- milliseconds: 0,
- months: 0
- }
- }
- t = Gt(t, e);
- if (e.isBefore(t)) {
- n = nn(e, t)
- } else {
- n = nn(t, e);
- n.milliseconds = -n.milliseconds;
- n.months = -n.months
- }
- return n
- }
- function an(i, a) {
- return function(e, t) {
- var n, r;
- if (t !== null && !isNaN(+t)) {
- Xe(a, "moment()." + a + "(period, number) is deprecated. Please use moment()." + a + "(number, period).");
- r = e;
- e = t;
- t = r
- }
- e = typeof e === "string" ? +e : e;
- n = en(e, t);
- on(this, n, i);
- return this
- }
- }
- function on(e, t, n, r) {
- var i = t._milliseconds,
- a = t._days,
- o = t._months;
- if (!e.isValid()) {
- return
- }
- r = r == null ? true : r;
- if (i) {
- e._d.setTime(+e._d + i * n)
- }
- if (a) {
- B(e, "Date", F(e, "Date") + a * n)
- }
- if (o) {
- Be(e, F(e, "Month") + o * n)
- }
- if (r) {
- c.updateOffset(e, a || o)
- }
- }
- en.fn = Rt.prototype;
- var sn = an(1, "add"),
- ln = an(-1, "subtract");
- function cn(e, t) {
- var n = e || Ot(),
- r = Gt(n, this).startOf("day"),
- i = this.diff(r, "days", true),
- a = i < -6 ? "sameElse" : i < -1 ? "lastWeek" : i < 0 ? "lastDay" : i < 1 ? "sameDay" : i < 2 ? "nextDay" : i < 7 ? "nextWeek" : "sameElse";
- var o = t && (L(t[a]) ? t[a]() : t[a]);
- return this.format(o || this.localeData().calendar(a, this, Ot(n)))
- }
- function un() {
- return new _(this)
- }
- function dn(e, t) {
- var n = y(e) ? e : Ot(e);
- if (!(this.isValid() && n.isValid())) {
- return false
- }
- t = k(!m(t) ? t : "millisecond");
- if (t === "millisecond") {
- return +this > +n
- } else {
- return +n < +this.clone().startOf(t)
- }
- }
- function pn(e, t) {
- var n = y(e) ? e : Ot(e);
- if (!(this.isValid() && n.isValid())) {
- return false
- }
- t = k(!m(t) ? t : "millisecond");
- if (t === "millisecond") {
- return +this < +n
- } else {
- return +this.clone().endOf(t) < +n
- }
- }
- function mn(e, t, n) {
- return this.isAfter(e, n) && this.isBefore(t, n)
- }
- function fn(e, t) {
- var n = y(e) ? e : Ot(e),
- r;
- if (!(this.isValid() && n.isValid())) {
- return false
- }
- t = k(t || "millisecond");
- if (t === "millisecond") {
- return +this === +n
- } else {
- r = +n;
- return +this.clone().startOf(t) <= r && r <= +this.clone().endOf(t)
- }
- }
- function hn(e, t) {
- return this.isSame(e, t) || this.isAfter(e, t)
- }
- function gn(e, t) {
- return this.isSame(e, t) || this.isBefore(e, t)
- }
- function _n(e, t, n) {
- var r, i, a, o;
- if (!this.isValid()) {
- return NaN
- }
- r = Gt(e, this);
- if (!r.isValid()) {
- return NaN
- }
- i = (r.utcOffset() - this.utcOffset()) * 6e4;
- t = k(t);
- if (t === "year" || t === "month" || t === "quarter") {
- o = yn(this, r);
- if (t === "quarter") {
- o = o / 3
- } else if (t === "year") {
- o = o / 12
- }
- } else {
- a = this - r;
- o = t === "second" ? a / 1e3 : t === "minute" ? a / 6e4 : t === "hour" ? a / 36e5 : t === "day" ? (a - i) / 864e5 : t === "week" ? (a - i) / 6048e5 : a
- }
- return n ? o : b(o)
- }
- function yn(e, t) {
- var n = (t.year() - e.year()) * 12 + (t.month() - e.month()),
- r = e.clone().add(n, "months"),
- i, a;
- if (t - r < 0) {
- i = e.clone().add(n - 1, "months");
- a = (t - r) / (r - i)
- } else {
- i = e.clone().add(n + 1, "months");
- a = (t - r) / (i - r)
- }
- return -(n + a)
- }
- function bn() {
- return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")
- }
- function vn() {
- var e = this.clone().utc();
- if (0 < e.year() && e.year() <= 9999) {
- if (L(Date.prototype.toISOString)) {
- return this.toDate().toISOString()
- } else {
- return $(e, "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")
- }
- } else {
- return $(e, "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")
- }
- }
- function Sn(e) {
- var t = $(this, e || c.defaultFormat);
- return this.localeData().postformat(t)
- }
- function xn(e, t) {
- if (this.isValid() && (y(e) && e.isValid() || Ot(e).isValid())) {
- return en({
- to: this,
- from: e
- }).locale(this.locale()).humanize(!t)
- } else {
- return this.localeData().invalidDate()
- }
- }
- function En(e) {
- return this.from(Ot(), e)
- }
- function wn(e, t) {
- if (this.isValid() && (y(e) && e.isValid() || Ot(e).isValid())) {
- return en({
- from: this,
- to: e
- }).locale(this.locale()).humanize(!t)
- } else {
- return this.localeData().invalidDate()
- }
- }
- function Cn(e) {
- return this.to(Ot(), e)
- }
- function Tn(e) {
- var t;
- if (e === undefined) {
- return this._locale._abbr
- } else {
- t = N(e);
- if (t != null) {
- this._locale = t
- }
- return this
- }
- }
- c.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
- var On = $e("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(e) {
- if (e === undefined) {
- return this.localeData()
- } else {
- return this.locale(e)
- }
- });
- function Mn() {
- return this._locale
- }
- function An(e) {
- e = k(e);
- switch (e) {
- case "year":
- this.month(0);
- case "quarter":
- case "month":
- this.date(1);
- case "week":
- case "isoWeek":
- case "day":
- this.hours(0);
- case "hour":
- this.minutes(0);
- case "minute":
- this.seconds(0);
- case "second":
- this.milliseconds(0)
- }
- if (e === "week") {
- this.weekday(0)
- }
- if (e === "isoWeek") {
- this.isoWeekday(1)
- }
- if (e === "quarter") {
- this.month(Math.floor(this.month() / 3) * 3)
- }
- return this
- }
- function Nn(e) {
- e = k(e);
- if (e === undefined || e === "millisecond") {
- return this
- }
- return this.startOf(e).add(1, e === "isoWeek" ? "week" : e).subtract(1, "ms")
- }
- function Dn() {
- return +this._d - (this._offset || 0) * 6e4
- }
- function Pn() {
- return Math.floor(+this / 1e3)
- }
- function kn() {
- return this._offset ? new Date(+this) : this._d
- }
- function Rn() {
- var e = this;
- return [e.year(), e.month(), e.date(), e.hour(), e.minute(), e.second(), e.millisecond()]
- }
- function Ln() {
- var e = this;
- return {
- years: e.year(),
- months: e.month(),
- date: e.date(),
- hours: e.hours(),
- minutes: e.minutes(),
- seconds: e.seconds(),
- milliseconds: e.milliseconds()
- }
- }
- function In() {
- return this.isValid() ? this.toISOString() : "null"
- }
- function Fn() {
- return d(this)
- }
- function Bn() {
- return o({}, u(this))
- }
- function Gn() {
- return u(this).overflow
- }
- function Un() {
- return {
- input: this._i,
- format: this._f,
- locale: this._locale,
- isUTC: this._isUTC,
- strict: this._strict
- }
- }
- function jn(e, t) {
- q(0, [e, e.length], 0, t)
- }
- function Vn(e) {
- return Wn.call(this, e, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy)
- }
- function zn(e) {
- return Wn.call(this, e, this.isoWeek(), this.isoWeekday(), 1, 4)
- }
- function Hn() {
- return ft(this.year(), 1, 4)
- }
- function qn() {
- var e = this.localeData()._week;
- return ft(this.year(), e.dow, e.doy)
- }
- function Wn(e, t, n, r, i) {
- var a;
- if (e == null) {
- return mt(this, r, i).year
- } else {
- a = ft(e, r, i);
- if (t > a) {
- t = a
- }
- return Kn.call(this, e, t, n, r, i)
- }
- }
- function Kn(e, t, n, r, i) {
- var a = pt(e, t, n, r, i),
- o = ot(a.year, 0, a.dayOfYear);
- this.year(o.getUTCFullYear());
- this.month(o.getUTCMonth());
- this.date(o.getUTCDate());
- return this
- }
- function $n(e) {
- return e == null ? Math.ceil((this.month() + 1) / 3) : this.month((e - 1) * 3 + this.month() % 3)
- }
- function Yn(e) {
- return mt(e, this._week.dow, this._week.doy).week
- }
- q(0, ["gg", 2], 0, function() {
- return this.weekYear() % 100
- }), q(0, ["GG", 2], 0, function() {
- return this.isoWeekYear() % 100
- }), jn("gggg", "weekYear"), jn("ggggg", "weekYear"), jn("GGGG", "isoWeekYear"), jn("GGGGG", "isoWeekYear"), P("weekYear", "gg"), P("isoWeekYear", "GG"), fe("G", le), fe("g", le), fe("GG", te, Q), fe("gg", te, Q), fe("GGGG", ae, J), fe("gggg", ae, J), fe("GGGGG", oe, ee), fe("ggggg", oe, ee), ve(["gggg", "ggggg", "GGGG", "GGGGG"], function(e, t, n, r) {
- t[r.substr(0, 2)] = v(e)
- }), ve(["gg", "GG"], function(e, t, n, r) {
- t[r] = c.parseTwoDigitYear(e)
- }), q("Q", 0, "Qo", "quarter"), P("quarter", "Q"), fe("Q", X), be("Q", function(e, t) {
- t[Ee] = (v(e) - 1) * 3
- }), q("w", ["ww", 2], "wo", "week"), q("W", ["WW", 2], "Wo", "isoWeek"), P("week", "w"), P("isoWeek", "W"), fe("w", te), fe("ww", te, Q), fe("W", te), fe("WW", te, Q), ve(["w", "ww", "W", "WW"], function(e, t, n, r) {
- t[r.substr(0, 1)] = v(e)
- });
- var Xn = {
- dow: 0,
- doy: 6
- };
- function Qn() {
- return this._week.dow
- }
- function Zn() {
- return this._week.doy
- }
- function Jn(e) {
- var t = this.localeData().week(this);
- return e == null ? t : this.add((e - t) * 7, "d")
- }
- function er(e) {
- var t = mt(this, 1, 4).week;
- return e == null ? t : this.add((e - t) * 7, "d")
- }
- q("D", ["DD", 2], "Do", "date"), P("date", "D"), fe("D", te), fe("DD", te, Q), fe("Do", function(e, t) {
- return e ? t._ordinalParse : t._ordinalParseLenient
- }), be(["D", "DD"], we), be("Do", function(e, t) {
- t[we] = v(e.match(te)[0], 10)
- });
- var tr = I("Date", true);
- function nr(e, t) {
- if (typeof e !== "string") {
- return e
- }
- if (!isNaN(e)) {
- return parseInt(e, 10)
- }
- e = t.weekdaysParse(e);
- if (typeof e === "number") {
- return e
- }
- return null
- }
- q("d", 0, "do", "day"), q("dd", 0, 0, function(e) {
- return this.localeData().weekdaysMin(this, e)
- }), q("ddd", 0, 0, function(e) {
- return this.localeData().weekdaysShort(this, e)
- }), q("dddd", 0, 0, function(e) {
- return this.localeData().weekdays(this, e)
- }), q("e", 0, 0, "weekday"), q("E", 0, 0, "isoWeekday"), P("day", "d"), P("weekday", "e"), P("isoWeekday", "E"), fe("d", te), fe("e", te), fe("E", te), fe("dd", pe), fe("ddd", pe), fe("dddd", pe), ve(["dd", "ddd", "dddd"], function(e, t, n, r) {
- var i = n._locale.weekdaysParse(e, r, n._strict);
- if (i != null) {
- t.d = i
- } else {
- u(n).invalidWeekday = e
- }
- }), ve(["d", "e", "E"], function(e, t, n, r) {
- t[r] = v(e)
- });
- var rr = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");
- function ir(e, t) {
- return i(this._weekdays) ? this._weekdays[e.day()] : this._weekdays[this._weekdays.isFormat.test(t) ? "format" : "standalone"][e.day()]
- }
- var ar = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");
- function or(e) {
- return this._weekdaysShort[e.day()]
- }
- var sr = "Su_Mo_Tu_We_Th_Fr_Sa".split("_");
- function lr(e) {
- return this._weekdaysMin[e.day()]
- }
- function cr(e, t, n) {
- var r, i, a;
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._minWeekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._fullWeekdaysParse = []
- }
- for (r = 0; r < 7; r++) {
- i = Ot([2e3, 1]).day(r);
- if (n && !this._fullWeekdaysParse[r]) {
- this._fullWeekdaysParse[r] = new RegExp("^" + this.weekdays(i, "").replace(".", ".?") + "$", "i");
- this._shortWeekdaysParse[r] = new RegExp("^" + this.weekdaysShort(i, "").replace(".", ".?") + "$", "i");
- this._minWeekdaysParse[r] = new RegExp("^" + this.weekdaysMin(i, "").replace(".", ".?") + "$", "i")
- }
- if (!this._weekdaysParse[r]) {
- a = "^" + this.weekdays(i, "") + "|^" + this.weekdaysShort(i, "") + "|^" + this.weekdaysMin(i, "");
- this._weekdaysParse[r] = new RegExp(a.replace(".", ""), "i")
- }
- if (n && t === "dddd" && this._fullWeekdaysParse[r].test(e)) {
- return r
- } else if (n && t === "ddd" && this._shortWeekdaysParse[r].test(e)) {
- return r
- } else if (n && t === "dd" && this._minWeekdaysParse[r].test(e)) {
- return r
- } else if (!n && this._weekdaysParse[r].test(e)) {
- return r
- }
- }
- }
- function ur(e) {
- if (!this.isValid()) {
- return e != null ? this : NaN
- }
- var t = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
- if (e != null) {
- e = nr(e, this.localeData());
- return this.add(e - t, "d")
- } else {
- return t
- }
- }
- function dr(e) {
- if (!this.isValid()) {
- return e != null ? this : NaN
- }
- var t = (this.day() + 7 - this.localeData()._week.dow) % 7;
- return e == null ? t : this.add(e - t, "d")
- }
- function pr(e) {
- if (!this.isValid()) {
- return e != null ? this : NaN
- }
- return e == null ? this.day() || 7 : this.day(this.day() % 7 ? e : e - 7)
- }
- function mr(e) {
- var t = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1;
- return e == null ? t : this.add(e - t, "d")
- }
- function fr() {
- return this.hours() % 12 || 12
- }
- function hr(e, t) {
- q(e, 0, 0, function() {
- return this.localeData().meridiem(this.hours(), this.minutes(), t)
- })
- }
- function gr(e, t) {
- return t._meridiemParse
- }
- function _r(e) {
- return (e + "").toLowerCase().charAt(0) === "p"
- }
- q("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), P("dayOfYear", "DDD"), fe("DDD", ie), fe("DDDD", Z), be(["DDD", "DDDD"], function(e, t, n) {
- n._dayOfYear = v(e)
- }), q("H", ["HH", 2], 0, "hour"), q("h", ["hh", 2], 0, fr), q("hmm", 0, 0, function() {
- return "" + fr.apply(this) + U(this.minutes(), 2)
- }), q("hmmss", 0, 0, function() {
- return "" + fr.apply(this) + U(this.minutes(), 2) + U(this.seconds(), 2)
- }), q("Hmm", 0, 0, function() {
- return "" + this.hours() + U(this.minutes(), 2)
- }), q("Hmmss", 0, 0, function() {
- return "" + this.hours() + U(this.minutes(), 2) + U(this.seconds(), 2)
- }), hr("a", true), hr("A", false), P("hour", "h"), fe("a", gr), fe("A", gr), fe("H", te), fe("h", te), fe("HH", te, Q), fe("hh", te, Q), fe("hmm", ne), fe("hmmss", re), fe("Hmm", ne), fe("Hmmss", re), be(["H", "HH"], Ce), be(["a", "A"], function(e, t, n) {
- n._isPm = n._locale.isPM(e);
- n._meridiem = e
- }), be(["h", "hh"], function(e, t, n) {
- t[Ce] = v(e);
- u(n).bigHour = true
- }), be("hmm", function(e, t, n) {
- var r = e.length - 2;
- t[Ce] = v(e.substr(0, r));
- t[Te] = v(e.substr(r));
- u(n).bigHour = true
- }), be("hmmss", function(e, t, n) {
- var r = e.length - 4;
- var i = e.length - 2;
- t[Ce] = v(e.substr(0, r));
- t[Te] = v(e.substr(r, 2));
- t[Oe] = v(e.substr(i));
- u(n).bigHour = true
- }), be("Hmm", function(e, t, n) {
- var r = e.length - 2;
- t[Ce] = v(e.substr(0, r));
- t[Te] = v(e.substr(r))
- }), be("Hmmss", function(e, t, n) {
- var r = e.length - 4;
- var i = e.length - 2;
- t[Ce] = v(e.substr(0, r));
- t[Te] = v(e.substr(r, 2));
- t[Oe] = v(e.substr(i))
- });
- var yr = /[ap]\.?m?\.?/i;
- function br(e, t, n) {
- if (e > 11) {
- return n ? "pm" : "PM"
- } else {
- return n ? "am" : "AM"
- }
- }
- var vr = I("Hours", true);
- q("m", ["mm", 2], 0, "minute"), P("minute", "m"), fe("m", te), fe("mm", te, Q), be(["m", "mm"], Te);
- var Sr = I("Minutes", false);
- q("s", ["ss", 2], 0, "second"), P("second", "s"), fe("s", te), fe("ss", te, Q), be(["s", "ss"], Oe);
- var xr = I("Seconds", false),
- Er;
- for (q("S", 0, 0, function() {
- return ~~(this.millisecond() / 100)
- }), q(0, ["SS", 2], 0, function() {
- return ~~(this.millisecond() / 10)
- }), q(0, ["SSS", 3], 0, "millisecond"), q(0, ["SSSS", 4], 0, function() {
- return this.millisecond() * 10
- }), q(0, ["SSSSS", 5], 0, function() {
- return this.millisecond() * 100
- }), q(0, ["SSSSSS", 6], 0, function() {
- return this.millisecond() * 1e3
- }), q(0, ["SSSSSSS", 7], 0, function() {
- return this.millisecond() * 1e4
- }), q(0, ["SSSSSSSS", 8], 0, function() {
- return this.millisecond() * 1e5
- }), q(0, ["SSSSSSSSS", 9], 0, function() {
- return this.millisecond() * 1e6
- }), P("millisecond", "ms"), fe("S", ie, X), fe("SS", ie, Q), fe("SSS", ie, Z), Er = "SSSS"; Er.length <= 9; Er += "S") {
- fe(Er, se)
- }
- function wr(e, t) {
- t[Me] = v(("0." + e) * 1e3)
- }
- for (Er = "S"; Er.length <= 9; Er += "S") {
- be(Er, wr)
- }
- var Cr = I("Milliseconds", false);
- function Tr() {
- return this._isUTC ? "UTC" : ""
- }
- function Or() {
- return this._isUTC ? "Coordinated Universal Time" : ""
- }
- q("z", 0, 0, "zoneAbbr"), q("zz", 0, 0, "zoneName");
- var Mr = _.prototype;
- Mr.add = sn, Mr.calendar = cn, Mr.clone = un, Mr.diff = _n, Mr.endOf = Nn, Mr.format = Sn, Mr.from = xn, Mr.fromNow = En, Mr.to = wn, Mr.toNow = Cn, Mr.get = G, Mr.invalidAt = Gn, Mr.isAfter = dn, Mr.isBefore = pn, Mr.isBetween = mn, Mr.isSame = fn, Mr.isSameOrAfter = hn, Mr.isSameOrBefore = gn, Mr.isValid = Fn, Mr.lang = On, Mr.locale = Tn, Mr.localeData = Mn, Mr.max = At, Mr.min = Mt, Mr.parsingFlags = Bn, Mr.set = G, Mr.startOf = An, Mr.subtract = ln, Mr.toArray = Rn, Mr.toObject = Ln, Mr.toDate = kn, Mr.toISOString = vn, Mr.toJSON = In, Mr.toString = bn, Mr.unix = Pn, Mr.valueOf = Dn, Mr.creationData = Un, Mr.year = ct, Mr.isLeapYear = ut, Mr.weekYear = Vn, Mr.isoWeekYear = zn, Mr.quarter = Mr.quarters = $n, Mr.month = Ge, Mr.daysInMonth = Ue, Mr.week = Mr.weeks = Jn, Mr.isoWeek = Mr.isoWeeks = er, Mr.weeksInYear = qn, Mr.isoWeeksInYear = Hn, Mr.date = tr, Mr.day = Mr.days = ur, Mr.weekday = dr, Mr.isoWeekday = pr, Mr.dayOfYear = mr, Mr.hour = Mr.hours = vr, Mr.minute = Mr.minutes = Sr, Mr.second = Mr.seconds = xr, Mr.millisecond = Mr.milliseconds = Cr, Mr.utcOffset = jt, Mr.utc = zt, Mr.local = Ht, Mr.parseZone = qt, Mr.hasAlignedHourOffset = Wt, Mr.isDST = Kt, Mr.isDSTShifted = $t, Mr.isLocal = Yt, Mr.isUtcOffset = Xt, Mr.isUtc = Qt, Mr.isUTC = Qt, Mr.zoneAbbr = Tr, Mr.zoneName = Or, Mr.dates = $e("dates accessor is deprecated. Use date instead.", tr), Mr.months = $e("months accessor is deprecated. Use month instead", Ge), Mr.years = $e("years accessor is deprecated. Use year instead", ct), Mr.zone = $e("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779", Vt);
- var Ar = Mr,
- Nr;
- function Dr(e) {
- return Ot(1e3 * e)
- }
- function Pr() {
- return Ot.apply(null, arguments).parseZone()
- }
- function kr(e, t, n) {
- var r = this._calendar[e];
- return L(r) ? r.call(t, n) : r
- }
- var Rr = {
- LTS: "h:mm:ss A",
- LT: "h:mm A",
- L: "MM/DD/YYYY",
- LL: "MMMM D, YYYY",
- LLL: "MMMM D, YYYY h:mm A",
- LLLL: "dddd, MMMM D, YYYY h:mm A"
- };
- function Lr(e) {
- var t = this._longDateFormat[e],
- n = this._longDateFormat[e.toUpperCase()];
- if (t || !n) {
- return t
- }
- this._longDateFormat[e] = n.replace(/MMMM|MM|DD|dddd/g, function(e) {
- return e.slice(1)
- });
- return this._longDateFormat[e]
- }
- var Ir = "Invalid date";
- function Fr() {
- return this._invalidDate
- }
- var Br = "%d",
- Gr = /\d{1,2}/;
- function Ur(e) {
- return this._ordinal.replace("%d", e)
- }
- function jr(e) {
- return e
- }
- var Vr = {
- future: "in %s",
- past: "%s ago",
- s: "a few seconds",
- m: "a minute",
- mm: "%d minutes",
- h: "an hour",
- hh: "%d hours",
- d: "a day",
- dd: "%d days",
- M: "a month",
- MM: "%d months",
- y: "a year",
- yy: "%d years"
- };
- function zr(e, t, n, r) {
- var i = this._relativeTime[n];
- return L(i) ? i(e, t, n, r) : i.replace(/%d/i, e)
- }
- function Hr(e, t) {
- var n = this._relativeTime[e > 0 ? "future" : "past"];
- return L(n) ? n(t) : n.replace(/%s/i, t)
- }
- function qr(e) {
- var t, n;
- for (n in e) {
- t = e[n];
- if (L(t)) {
- this[n] = t
- } else {
- this["_" + n] = t
- }
- }
- this._ordinalParseLenient = new RegExp(this._ordinalParse.source + "|" + /\d{1,2}/.source)
- }
- var Wr = x.prototype;
- function Kr(e, t, n, r) {
- var i = N();
- var a = l().set(r, t);
- return i[n](a, e)
- }
- function $r(e, t, n, r, i) {
- if (typeof e === "number") {
- t = e;
- e = undefined
- }
- e = e || "";
- if (t != null) {
- return Kr(e, t, n, i)
- }
- var a;
- var o = [];
- for (a = 0; a < r; a++) {
- o[a] = Kr(e, a, n, i)
- }
- return o
- }
- function Yr(e, t) {
- return $r(e, t, "months", 12, "month")
- }
- function Xr(e, t) {
- return $r(e, t, "monthsShort", 12, "month")
- }
- function Qr(e, t) {
- return $r(e, t, "weekdays", 7, "day")
- }
- function Zr(e, t) {
- return $r(e, t, "weekdaysShort", 7, "day")
- }
- function Jr(e, t) {
- return $r(e, t, "weekdaysMin", 7, "day")
- }
- Wr._calendar = {
- sameDay: "[Today at] LT",
- nextDay: "[Tomorrow at] LT",
- nextWeek: "dddd [at] LT",
- lastDay: "[Yesterday at] LT",
- lastWeek: "[Last] dddd [at] LT",
- sameElse: "L"
- }, Wr.calendar = kr, Wr._longDateFormat = Rr, Wr.longDateFormat = Lr, Wr._invalidDate = Ir, Wr.invalidDate = Fr, Wr._ordinal = Br, Wr.ordinal = Ur, Wr._ordinalParse = Gr, Wr.preparse = jr, Wr.postformat = jr, Wr._relativeTime = Vr, Wr.relativeTime = zr, Wr.pastFuture = Hr, Wr.set = qr, Wr.months = Re, Wr._months = ke, Wr.monthsShort = Ie, Wr._monthsShort = Le, Wr.monthsParse = Fe, Wr._monthsRegex = ze, Wr.monthsRegex = He, Wr._monthsShortRegex = je, Wr.monthsShortRegex = Ve, Wr.week = Yn, Wr._week = Xn, Wr.firstDayOfYear = Zn, Wr.firstDayOfWeek = Qn, Wr.weekdays = ir, Wr._weekdays = rr, Wr.weekdaysMin = lr, Wr._weekdaysMin = sr, Wr.weekdaysShort = or, Wr._weekdaysShort = ar, Wr.weekdaysParse = cr, Wr.isPM = _r, Wr._meridiemParse = yr, Wr.meridiem = br, M("en", {
- ordinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal: function(e) {
- var t = e % 10,
- n = v(e % 100 / 10) === 1 ? "th" : t === 1 ? "st" : t === 2 ? "nd" : t === 3 ? "rd" : "th";
- return e + n
- }
- }), c.lang = $e("moment.lang is deprecated. Use moment.locale instead.", M), c.langData = $e("moment.langData is deprecated. Use moment.localeData instead.", N);
- var ei = Math.abs;
- function ti() {
- var e = this._data;
- return this._milliseconds = ei(this._milliseconds), this._days = ei(this._days), this._months = ei(this._months), e.milliseconds = ei(e.milliseconds), e.seconds = ei(e.seconds), e.minutes = ei(e.minutes), e.hours = ei(e.hours), e.months = ei(e.months), e.years = ei(e.years), this
- }
- function ni(e, t, n, r) {
- var i = en(t, n);
- e._milliseconds += r * i._milliseconds;
- e._days += r * i._days;
- e._months += r * i._months;
- return e._bubble()
- }
- function ri(e, t) {
- return ni(this, e, t, 1)
- }
- function ii(e, t) {
- return ni(this, e, t, -1)
- }
- function ai(e) {
- if (e < 0) {
- return Math.floor(e)
- } else {
- return Math.ceil(e)
- }
- }
- function oi() {
- var e = this._milliseconds,
- t = this._days,
- n = this._months,
- r = this._data;
- if (!(0 <= e && 0 <= t && 0 <= n || e <= 0 && t <= 0 && n <= 0)) e += 864e5 * ai(li(n) + t), n = t = 0;
- return r.milliseconds = e % 1e3, e = b(e / 1e3), r.seconds = e % 60, e = b(e / 60), r.minutes = e % 60, e = b(e / 60), r.hours = e % 24, t += b(e / 24), e = b(si(t)), n += e, t -= ai(li(e)), e = b(n / 12), n %= 12, r.days = t, r.months = n, r.years = e, this
- }
- function si(e) {
- return e * 4800 / 146097
- }
- function li(e) {
- return e * 146097 / 4800
- }
- function ci(e) {
- var t, n, r = this._milliseconds;
- if ("month" === (e = k(e)) || "year" === e) return n = this._months + si(t = this._days + r / 864e5), "month" === e ? n : n / 12
- }
- function ui() {
- return this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * v(this._months / 12)
- }
- function di(e) {
- return function() {
- return this.as(e)
- }
- }
- var pi = di("ms"),
- mi = di("s"),
- fi = di("m"),
- hi = di("h"),
- gi = di("d"),
- _i = di("w"),
- yi = di("M"),
- bi = di("y");
- function vi(e) {
- return this[(e = k(e)) + "s"]()
- }
- function Si(e) {
- return function() {
- return this._data[e]
- }
- }
- var xi = Si("milliseconds"),
- Ei = Si("seconds"),
- wi = Si("minutes"),
- Ci = Si("hours"),
- Ti = Si("days"),
- Oi = Si("months"),
- Mi = Si("years");
- function Ai() {
- return b(this.days() / 7)
- }
- var Ni = Math.round,
- Di = {
- s: 45,
- m: 45,
- h: 22,
- d: 26,
- M: 11
- };
- function Pi(e, t, n, r, i) {
- return i.relativeTime(t || 1, !!n, e, r)
- }
- function ki(e, t, n) {
- var r = en(e).abs(),
- i = Ni(r.as("s")),
- a = Ni(r.as("m")),
- o = Ni(r.as("h")),
- s = Ni(r.as("d")),
- l = Ni(r.as("M")),
- r = Ni(r.as("y")),
- r = (i < Di.s ? ["s", i] : a <= 1 && ["m"]) || a < Di.m && ["mm", a] || o <= 1 && ["h"] || o < Di.h && ["hh", o] || s <= 1 && ["d"] || s < Di.d && ["dd", s] || l <= 1 && ["M"] || l < Di.M && ["MM", l] || r <= 1 && ["y"] || ["yy", r];
- return r[2] = t, r[3] = 0 < +e, r[4] = n,
- function(e, t, n, r, i) {
- return i.relativeTime(t || 1, !!n, e, r)
- }.apply(null, r)
- }
- function Ri(e, t) {
- return void 0 !== Di[e] ? void 0 !== t ? (Di[e] = t, !0) : Di[e] : 0
- }
- function Li(e) {
- var t = this.localeData(),
- n = function(e, t, n) {
- var r = en(e).abs(),
- i = Ni(r.as("s")),
- a = Ni(r.as("m")),
- o = Ni(r.as("h")),
- s = Ni(r.as("d")),
- l = Ni(r.as("M")),
- r = Ni(r.as("y")),
- r = (i < Di.s ? ["s", i] : a <= 1 && ["m"]) || a < Di.m && ["mm", a] || o <= 1 && ["h"] || o < Di.h && ["hh", o] || s <= 1 && ["d"] || s < Di.d && ["dd", s] || l <= 1 && ["M"] || l < Di.M && ["MM", l] || r <= 1 && ["y"] || ["yy", r];
- return r[2] = t, r[3] = 0 < +e, r[4] = n,
- function(e, t, n, r, i) {
- return i.relativeTime(t || 1, !!n, e, r)
- }.apply(null, r)
- }(this, !e, t);
- if (e) n = t.pastFuture(+this, n);
- return t.postformat(n)
- }
- var Ii = Math.abs;
- function Fi() {
- var e = Ii(this._milliseconds) / 1e3;
- var t = Ii(this._days);
- var n = Ii(this._months);
- var r, i, a;
- r = b(e / 60);
- i = b(r / 60);
- e %= 60;
- r %= 60;
- a = b(n / 12);
- n %= 12;
- var o = a;
- var s = n;
- var l = t;
- var c = i;
- var u = r;
- var d = e;
- var p = this.asSeconds();
- if (!p) {
- return "P0D"
- }
- return (p < 0 ? "-" : "") + "P" + (o ? o + "Y" : "") + (s ? s + "M" : "") + (l ? l + "D" : "") + (c || u || d ? "T" : "") + (c ? c + "H" : "") + (u ? u + "M" : "") + (d ? d + "S" : "")
- }
- var Bi = Rt.prototype,
- Gi;
- return Bi.abs = function() {
- var e = this._data;
- return this._milliseconds = ei(this._milliseconds), this._days = ei(this._days), this._months = ei(this._months), e.milliseconds = ei(e.milliseconds), e.seconds = ei(e.seconds), e.minutes = ei(e.minutes), e.hours = ei(e.hours), e.months = ei(e.months), e.years = ei(e.years), this
- }, Bi.add = function(e, t) {
- return ni(this, e, t, 1)
- }, Bi.subtract = function(e, t) {
- return ni(this, e, t, -1)
- }, Bi.as = function(e) {
- var t, n, r = this._milliseconds; {
- if ("month" === (e = k(e)) || "year" === e) return n = this._months + si(t = this._days + r / 864e5), "month" === e ? n : n / 12;
- switch (t = this._days + Math.round(li(this._months)), e) {
- case "week":
- return t / 7 + r / 6048e5;
- case "day":
- return t + r / 864e5;
- case "hour":
- return 24 * t + r / 36e5;
- case "minute":
- return 1440 * t + r / 6e4;
- case "second":
- return 86400 * t + r / 1e3;
- case "millisecond":
- return Math.floor(864e5 * t) + r;
- default:
- throw Error("Unknown unit " + e)
- }
- }
- }, Bi.asMilliseconds = pi, Bi.asSeconds = mi, Bi.asMinutes = fi, Bi.asHours = hi, Bi.asDays = gi, Bi.asWeeks = _i, Bi.asMonths = yi, Bi.asYears = bi, Bi.valueOf = function() {
- return this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * v(this._months / 12)
- }, Bi._bubble = function() {
- var e = this._milliseconds,
- t = this._days,
- n = this._months,
- r = this._data;
- 0 <= e && 0 <= t && 0 <= n || e <= 0 && t <= 0 && n <= 0 || (e += 864e5 * ai(li(n) + t), n = t = 0);
- return r.milliseconds = e % 1e3, e = b(e / 1e3), r.seconds = e % 60, e = b(e / 60), r.minutes = e % 60, e = b(e / 60), r.hours = e % 24, t += b(e / 24), e = b(si(t)), n += e, t -= ai(li(e)), e = b(n / 12), n %= 12, r.days = t, r.months = n, r.years = e, this
- }, Bi.get = function(e) {
- return this[(e = k(e)) + "s"]()
- }, Bi.milliseconds = xi, Bi.seconds = Ei, Bi.minutes = wi, Bi.hours = Ci, Bi.days = Ti, Bi.weeks = function() {
- return b(this.days() / 7)
- }, Bi.months = Oi, Bi.years = Mi, Bi.humanize = function(e) {
- var t = this.localeData(),
- n = function(e, t, n) {
- var r = en(e).abs(),
- i = Ni(r.as("s")),
- a = Ni(r.as("m")),
- o = Ni(r.as("h")),
- s = Ni(r.as("d")),
- l = Ni(r.as("M")),
- r = Ni(r.as("y")),
- r = (i < Di.s ? ["s", i] : a <= 1 && ["m"]) || a < Di.m && ["mm", a] || o <= 1 && ["h"] || o < Di.h && ["hh", o] || s <= 1 && ["d"] || s < Di.d && ["dd", s] || l <= 1 && ["M"] || l < Di.M && ["MM", l] || r <= 1 && ["y"] || ["yy", r];
- return r[2] = t, r[3] = 0 < +e, r[4] = n,
- function(e, t, n, r, i) {
- return i.relativeTime(t || 1, !!n, e, r)
- }.apply(null, r)
- }(this, !e, t);
- e && (n = t.pastFuture(+this, n));
- return t.postformat(n)
- }, Bi.toISOString = Fi, Bi.toString = Fi, Bi.toJSON = Fi, Bi.locale = Tn, Bi.localeData = Mn, Bi.toIsoString = $e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", Fi), Bi.lang = On, q("X", 0, 0, "unix"), q("x", 0, 0, "valueOf"), fe("x", le), fe("X", /[+-]?\d+(\.\d{1,3})?/), be("X", function(e, t, n) {
- n._d = new Date(1e3 * parseFloat(e, 10))
- }), be("x", function(e, t, n) {
- n._d = new Date(v(e))
- }), c.version = "2.11.2",
- function(e) {
- t = e
- }(Ot), c.fn = Ar, c.min = function() {
- return Nt("isBefore", [].slice.call(arguments, 0))
- }, c.max = function() {
- return Nt("isAfter", [].slice.call(arguments, 0))
- }, c.now = function() {
- return Date.now ? Date.now() : +new Date
- }, c.utc = l, c.unix = function(e) {
- return Ot(1e3 * e)
- }, c.months = function(e, t) {
- return $r(e, t, "months", 12, "month")
- }, c.isDate = a, c.locale = M, c.invalid = p, c.duration = en, c.isMoment = y, c.weekdays = function(e, t) {
- return $r(e, t, "weekdays", 7, "day")
- }, c.parseZone = function() {
- return Ot.apply(null, arguments).parseZone()
- }, c.localeData = N, c.isDuration = Lt, c.monthsShort = function(e, t) {
- return $r(e, t, "monthsShort", 12, "month")
- }, c.weekdaysMin = function(e, t) {
- return $r(e, t, "weekdaysMin", 7, "day")
- }, c.defineLocale = A, c.weekdaysShort = function(e, t) {
- return $r(e, t, "weekdaysShort", 7, "day")
- }, c.normalizeUnits = k, c.relativeTimeThreshold = function(e, t) {
- return void 0 !== Di[e] ? void 0 !== t ? (Di[e] = t, !0) : Di[e] : 0
- }, c.prototype = Ar, c
- }()
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0, t.createMemoryHistory = t.hashHistory = t.browserHistory = t.applyRouterMiddleware = t.formatPattern = t.useRouterHistory = t.match = t.routerShape = t.locationShape = t.RouterContext = t.createRoutes = t.Route = t.Redirect = t.IndexRoute = t.IndexRedirect = t.withRouter = t.IndexLink = t.Link = t.Router = void 0;
- var r = n(48);
- Object.defineProperty(t, "createRoutes", {
- enumerable: !0,
- get: function() {
- return r.createRoutes
- }
- });
- var i = n(67);
- Object.defineProperty(t, "locationShape", {
- enumerable: !0,
- get: function() {
- return i.locationShape
- }
- }), Object.defineProperty(t, "routerShape", {
- enumerable: !0,
- get: function() {
- return i.routerShape
- }
- });
- var a = n(57);
- Object.defineProperty(t, "formatPattern", {
- enumerable: !0,
- get: function() {
- return a.formatPattern
- }
- });
- var o = v(n(472)),
- s = v(n(153)),
- l = v(n(464)),
- c = v(n(463)),
- u = v(n(462)),
- d = v(n(461)),
- p = v(n(152)),
- m = v(n(460)),
- f = v(n(100)),
- h = v(n(459)),
- g = v(n(148)),
- _ = v(n(455)),
- y = v(n(454)),
- b = v(n(451)),
- n = v(n(151));
- function v(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
- t.Router = o.default, t.Link = s.default, t.IndexLink = l.default, t.withRouter = c.default, t.IndexRedirect = u.default, t.IndexRoute = d.default, t.Redirect = p.default, t.Route = m.default, t.RouterContext = f.default, t.match = h.default, t.useRouterHistory = g.default, t.applyRouterMiddleware = _.default, t.browserHistory = y.default, t.hashHistory = b.default, t.createMemoryHistory = n.default
- }, , , , function(e, t, n) {
- "use strict";
- Object.defineProperty(t, "__esModule", {
- value: !0
- });
- var r, i = n(506),
- n = (r = i) && r.__esModule ? r : {
- default: r
- };
- t.default = n.default, e.exports = t.default
- }, , , function(e, t, n) {
- "use strict";
- e.exports = function(e, t, n, r, i, a, o, s) {
- var l, c, u;
- if (!e) throw void 0 === t ? u = Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.") : (l = [n, r, i, a, o, s], c = 0, (u = Error(t.replace(/%s/g, function() {
- return l[c++]
- }))).name = "Invariant Violation"), u.framesToPop = 1, u
- }
- }, , function(e, t, n) {
- "use strict";
- e.exports = function() {}
- }, function(e, t, n) {
- e.exports = n(474)()
- }, , function(e, t, n) {
- "use strict";
- var r = n(26),
- i = n(471);
- if (void 0 === r) throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");
- n = (new r.Component).updater;
- e.exports = i(r.Component, r.isValidElement, n)
- }, function(e, t, n) {
- "use strict";
- e.exports = function() {}
- }, , function(e, t, n) {
- "use strict";
- t.__esModule = !0, t.createPath = t.parsePath = t.getQueryStringValueFromPath = t.stripQueryStringValueFromPath = t.addQueryStringValueToPath = void 0;
- var r, i = n(45);
- r = i;
- t.addQueryStringValueToPath = function(e, t, n) {
- var r = a(e),
- i = r.search,
- e = r.hash;
- return o({
- pathname: r.pathname,
- search: i + (~i.indexOf("?") ? "&" : "?") + t + "=" + n,
- hash: e
- })
- }, t.stripQueryStringValueFromPath = function(e, t) {
- var n = a(e),
- e = n.hash;
- return o({
- pathname: n.pathname,
- search: n.search.replace(RegExp("([?&])" + t + "=[a-zA-Z0-9]+(&?)"), function(e, t, n) {
- return "?" === t ? t : n
- }),
- hash: e
- })
- }, t.getQueryStringValueFromPath = function(e, t) {
- t = a(e).search.match(RegExp("[?&]" + t + "=([a-zA-Z0-9]+)"));
- return t && t[1]
- };
- var a = t.parsePath = function(e) {
- var t = null == (r = (n = e).match(/^(https?:)?\/\/[^\/]*/)) ? n : n.substring(r[0].length),
- e = "",
- n = "",
- r = t.indexOf("#"); - 1 != r && (n = t.substring(r), t = t.substring(0, r));
- r = t.indexOf("?");
- return -1 != r && (e = t.substring(r), t = t.substring(0, r)), "" === t && (t = "/"), {
- pathname: t,
- search: e,
- hash: n
- }
- },
- o = t.createPath = function(e) {
- if (null == e || "string" == typeof e) return e;
- var t = e.search,
- n = e.hash,
- e = (e.basename || "") + e.pathname;
- return t && "?" !== t && (e += t), n && (e += n), e
- }
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0;
- var r = Object.assign || function(e) {
- for (var t = 1; t < arguments.length; t++) {
- var n, r = arguments[t];
- for (n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
- }
- return e
- };
- t.isReactChildren = l, t.createRouteFromReactElement = c, t.createRoutesFromReactChildren = u, t.createRoutes = function(e) {
- l(e) ? e = u(e) : e && !Array.isArray(e) && (e = [e]);
- return e
- };
- var i, a = n(26),
- o = (i = a) && i.__esModule ? i : {
- default: i
- };
- function s(e) {
- return null == e || o.default.isValidElement(e)
- }
- function l(e) {
- return s(e) || Array.isArray(e) && e.every(s)
- }
- function c(e) {
- var t = r({}, e.type.defaultProps, e.props);
- return t.children && ((e = u(t.children, t)).length && (t.childRoutes = e), delete t.children), t
- }
- function u(e, n) {
- var r = [];
- return o.default.Children.forEach(e, function(e) {
- var t;
- o.default.isValidElement(e) && (e.type.createRouteFromReactElement ? (t = e.type.createRouteFromReactElement(e, n)) && r.push(t) : r.push(c(e)))
- }), r
- }
- }, function(e, t, n) {
- "use strict";
- (function e() {
- if ("undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE) try {
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)
- } catch (e) {
- console.error(e)
- }
- })(), e.exports = n(509)
- }, , , function(e, t, n) {
- "use strict";
- t.__esModule = !0, t.extractPath = a, t.parsePath = function(e) {
- var t = a(e),
- n = "",
- r = "";
- e = t.indexOf("#"); - 1 != e && (r = t.substring(e), t = t.substring(0, e));
- e = t.indexOf("?"); - 1 != e && (n = t.substring(e), t = t.substring(0, e));
- "" === t && (t = "/");
- return {
- pathname: t,
- search: n,
- hash: r
- }
- };
- var r, i = n(41);
- r = i;
- function a(e) {
- var t = e.match(/^https?:\/\/[^\/]*/);
- return null == t ? e : e.substring(t[0].length)
- }
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0;
- var r, i = n(41);
- r = i;
- t.default = function(e, t) {
- return function() {
- return e.apply(this, arguments)
- }
- }, e.exports = t.default
- }, , function(e, t, n) {
- "use strict";
- t.__esModule = !0, t.locationsAreEqual = t.statesAreEqual = t.createLocation = t.createQuery = void 0;
- var i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
- return typeof e
- } : function(e) {
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
- },
- r = Object.assign || function(e) {
- for (var t = 1; t < arguments.length; t++) {
- var n, r = arguments[t];
- for (n in r) Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n])
- }
- return e
- },
- a = l(n(39)),
- o = (l(n(45)), n(47)),
- s = n(76);
- function l(e) {
- return e && e.__esModule ? e : {
- default: e
- }
- }
- function c(e) {
- return "[object Date]" === Object.prototype.toString.call(e)
- }
- t.createQuery = function(e) {
- return r(Object.create(null), e)
- }, t.createLocation = function(e, t, n) {
- e = 0 < arguments.length && void 0 !== e ? e : "/", t = 1 < arguments.length && void 0 !== t ? t : s.POP, n = 2 < arguments.length && void 0 !== n ? n : null, e = "string" == typeof e ? (0, o.parsePath)(e) : e;
- return {
- pathname: e.pathname || "/",
- search: e.search || "",
- hash: e.hash || "",
- state: e.state,
- action: t,
- key: n
- }
- };
- var u = t.statesAreEqual = function n(t, r) {
- if (t === r) return !0;
- var e = void 0 === t ? "undefined" : i(t);
- if (e !== (void 0 === r ? "undefined" : i(r))) return !1;
- if ("function" === e && (0, a.default)(!1), "object" !== e) return !1;
- if (c(t) && c(r) && (0, a.default)(!1), Array.isArray(t)) return Array.isArray(r) && t.length === r.length && t.every(function(e, t) {
- return n(e, r[t])
- });
- e = Object.keys(t);
- return e.length === Object.keys(r).length && e.every(function(e) {
- return n(t[e], r[e])
- })
- };
- t.locationsAreEqual = function(e, t) {
- return e.key === t.key && e.pathname === t.pathname && e.search === t.search && e.hash === t.hash && u(e.state, t.state)
- }
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0, t.default = function(e, t) {
- if (~t.indexOf("deprecated")) {
- if (o[t]) return;
- o[t] = !0
- }
- t = "[react-router] " + t;
- for (var n = arguments.length, r = Array(2 < n ? n - 2 : 0), i = 2; i < n; i++) r[i - 2] = arguments[i];
- a.default.apply(void 0, [e, t].concat(r))
- }, t._resetWarned = function() {
- o = {}
- };
- var r, i = n(45),
- a = (r = i) && r.__esModule ? r : {
- default: r
- };
- var o = {}
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0, t.compilePattern = _, t.matchPattern = o, t.getParamNames = function(e) {
- return _(e).paramNames
- }, t.getParams = function(e, t) {
- t = o(e, t);
- if (!t) return null;
- var n = t.paramValues,
- r = {};
- return t.paramNames.forEach(function(e, t) {
- r[e] = n[t]
- }), r
- }, t.formatPattern = function(e, t) {
- t = t || {};
- for (var n = _(e).tokens, r = 0, i = "", a = 0, o = [], s = void 0, l = void 0, c = void 0, u = 0, d = n.length; u < d; ++u)
- if ("*" === (s = n[u]) || "**" === s) null != (c = Array.isArray(t.splat) ? t.splat[a++] : t.splat) || 0 < r || (0, g.default)(!1), null != c && (i += encodeURI(c));
- else if ("(" === s) o[r] = "", r += 1;
- else if (")" === s) {
- var p = o.pop();
- --r ? o[r - 1] += p : i += p
- } else if ("\\(" === s) i += "(";
- else if ("\\)" === s) i += ")";
- else if (":" == s[0])
- if (l = s.substring(1), null != (c = t[l]) || 0 < r || (0, g.default)(!1), null == c) {
- if (r) {
- o[r - 1] = "";
- for (var p = n.indexOf(s), m = n.slice(p, n.length), f = -1, h = 0; h < m.length; h++)
- if (")" == m[h]) {
- f = h;
- break
- }
- 0 < f || (0, g.default)(!1), u = p + f - 1
- }
- } else r ? o[r - 1] += encodeURIComponent(c) : i += encodeURIComponent(c);
- else r ? o[r - 1] += s : i += s;
- return r <= 0 || (0, g.default)(!1), i.replace(/\/+/g, "/")
- };
- var r, i = n(39),
- g = (r = i) && r.__esModule ? r : {
- default: r
- };
- function s(e) {
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
- }
- var a = Object.create(null);
- function _(e) {
- return a[e] || (a[e] = function(e) {
- for (var t, n = "", r = [], i = [], a = 0, o = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)|\\\(|\\\)/g; t = o.exec(e);) t.index !== a && (i.push(e.slice(a, t.index)), n += s(e.slice(a, t.index))), t[1] ? (n += "([^/]+)", r.push(t[1])) : "**" === t[0] ? (n += "(.*)", r.push("splat")) : "*" === t[0] ? (n += "(.*?)", r.push("splat")) : "(" === t[0] ? n += "(?:" : ")" === t[0] ? n += ")?" : "\\(" === t[0] ? n += "\\(" : "\\)" === t[0] && (n += "\\)"), i.push(t[0]), a = o.lastIndex;
- return a !== e.length && (i.push(e.slice(a, e.length)), n += s(e.slice(a, e.length))), {
- pattern: e,
- regexpSource: n,
- paramNames: r,
- tokens: i
- }
- }(e)), a[e]
- }
- function o(e, t) {
- "/" != e[0] && (e = "/" + e);
- var n = _(e),
- r = n.regexpSource,
- i = n.paramNames,
- n = n.tokens;
- "/" != e[0 | e.length - 1] && (r += "/?"), "*" === n[n.length - 1] && (r += "$");
- n = t.match(RegExp("^" + r, "i"));
- if (null == n) return null;
- r = n[0], t = t.substr(r.length);
- if (t) {
- if ("/" != r[0 | r.length - 1]) return null;
- t = "/" + t
- }
- return {
- remainingPathname: t,
- paramNames: i,
- paramValues: n.slice(1).map(function(e) {
- return e && decodeURIComponent(e)
- })
- }
- }
- }, function(e, t, n) {
- "use strict";
- t.__esModule = !0;
- t.PUSH = "PUSH";
- var r = "REPLACE";
- t.REPLACE = r;
- t.POP = "POP", t.default = {
- PUSH: "PUSH",
- REPLACE: r,
- POP: "POP"
- }
- }, function(e, t, n) {
- e.exports = n(398)()
- }, function(E, w, C) {
- var T;
- ! function(a) {
- "use strict";
- var r, s, e, t, n, i = {
- version: "0.4.11"
- };
- function o(e) {
- this.owner = e
- }
- function l(e) {
- var t = this.internal = new c(this);
- t.loadConfig(e), t.beforeInit(e), t.init(), t.afterInit(e),
- function t(n, r, i) {
- Object.keys(n).forEach(function(e) {
- r[e] = n[e].bind(i), 0 < Object.keys(n[e]).length && t(n[e], r[e], i)
- })
- }(r, this, this)
- }
- function c(e) {
- var t = this;
- t.d3 = a.d3 || C(86), t.api = e, t.config = t.getDefaultConfig(), t.data = {}, t.cache = {}, t.axes = {}
- }
- function u(e) {
- o.call(this, e)
- }
- i.generate = function(e) {
- return new l(e)
- }, i.chart = {
- fn: l.prototype,
- internal: {
- fn: c.prototype,
- axis: {
- fn: u.prototype
- }
- }
- }, r = i.chart.fn, (s = i.chart.internal.fn).beforeInit = function() {}, s.afterInit = function() {}, s.init = function() {
- var e = this,
- t = e.config;
- if (e.initParams(), t.data_url) e.convertUrlToData(t.data_url, t.data_mimeType, t.data_headers, t.data_keys, e.initWithData);
- else if (t.data_json) e.initWithData(e.convertJsonToData(t.data_json, t.data_keys));
- else if (t.data_rows) e.initWithData(e.convertRowsToData(t.data_rows));
- else {
- if (!t.data_columns) throw Error("url or json or rows or columns is required.");
- e.initWithData(e.convertColumnsToData(t.data_columns))
- }
- }, s.initParams = function() {
- var e = this,
- t = e.d3,
- n = e.config;
- e.clipId = "c3-" + +new Date + "-clip", e.clipIdForXAxis = e.clipId + "-xaxis", e.clipIdForYAxis = e.clipId + "-yaxis", e.clipIdForGrid = e.clipId + "-grid", e.clipIdForSubchart = e.clipId + "-subchart", e.clipPath = e.getClipPath(e.clipId), e.clipPathForXAxis = e.getClipPath(e.clipIdForXAxis), e.clipPathForYAxis = e.getClipPath(e.clipIdForYAxis), e.clipPathForGrid = e.getClipPath(e.clipIdForGrid), e.clipPathForSubchart = e.getClipPath(e.clipIdForSubchart), e.dragStart = null, e.dragging = !1, e.flowing = !1, e.cancelClick = !1, e.mouseover = !1, e.transiting = !1, e.color = e.generateColor(), e.levelColor = e.generateLevelColor(), e.dataTimeFormat = n.data_xLocaltime ? t.time.format : t.time.format.utc, e.axisTimeFormat = n.axis_x_localtime ? t.time.format : t.time.format.utc, e.defaultAxisTimeFormat = e.axisTimeFormat.multi([
- [".%L", function(e) {
- return e.getMilliseconds()
- }],
- [":%S", function(e) {
- return e.getSeconds()
- }],
- ["%I:%M", function(e) {
- return e.getMinutes()
- }],
- ["%I %p", function(e) {
- return e.getHours()
- }],
- ["%-m/%-d", function(e) {
- return e.getDay() && 1 != e.getDate()
- }],
- ["%-m/%-d", function(e) {
- return 1 != e.getDate()
- }],
- ["%-m/%-d", function(e) {
- return e.getMonth()
- }],
- ["%Y/%-m/%-d", function() {
- return !0
- }]
- ]), e.hiddenTargetIds = [], e.hiddenLegendIds = [], e.focusedTargetIds = [], e.defocusedTargetIds = [], e.xOrient = n.axis_rotated ? "left" : "bottom", e.yOrient = n.axis_rotated ? n.axis_y_inner ? "top" : "bottom" : n.axis_y_inner ? "right" : "left", e.y2Orient = n.axis_rotated ? n.axis_y2_inner ? "bottom" : "top" : n.axis_y2_inner ? "left" : "right", e.subXOrient = n.axis_rotated ? "left" : "bottom", e.isLegendRight = "right" === n.legend_position, e.isLegendInset = "inset" === n.legend_position, e.isLegendTop = "top-left" === n.legend_inset_anchor || "top-right" === n.legend_inset_anchor, e.isLegendLeft = "top-left" === n.legend_inset_anchor || "bottom-left" === n.legend_inset_anchor, e.legendStep = 0, e.legendItemWidth = 0, e.legendItemHeight = 0, e.currentMaxTickWidths = {
- x: 0,
- y: 0,
- y2: 0
- }, e.rotated_padding_left = 30, e.rotated_padding_right = n.axis_rotated && !n.axis_x_show ? 0 : 30, e.rotated_padding_top = 5, e.withoutFadeIn = {}, e.intervalForObserveInserted = void 0, e.axes.subx = t.selectAll([])
- }, s.initChartElements = function() {
- this.initBar && this.initBar(), this.initLine && this.initLine(), this.initArc && this.initArc(), this.initGauge && this.initGauge(), this.initText && this.initText()
- }, s.initWithData = function(e) {
- var t = this,
- n = t.d3,
- r = t.config,
- i = !0;
- t.axis = new u(t), t.initPie && t.initPie(), t.initBrush && t.initBrush(), t.initZoom && t.initZoom(), t.selectChart = r.bindto ? "function" == typeof r.bindto.node ? r.bindto : n.select(r.bindto) : n.selectAll([]), t.selectChart.empty() && (t.selectChart = n.select(document.createElement("div")).style("opacity", 0), t.observeInserted(t.selectChart), i = !1), t.selectChart.html("").classed("c3", !0), t.data.xs = {}, t.data.targets = t.convertDataToTargets(e), r.data_filter && (t.data.targets = t.data.targets.filter(r.data_filter)), r.data_hide && t.addHiddenTargetIds(!0 === r.data_hide ? t.mapToIds(t.data.targets) : r.data_hide), r.legend_hide && t.addHiddenLegendIds(!0 === r.legend_hide ? t.mapToIds(t.data.targets) : r.legend_hide), t.hasType("gauge") && (r.legend_show = !1), t.updateSizes(), t.updateScales(), t.x.domain(n.extent(t.getXDomain(t.data.targets))), t.y.domain(t.getYDomain(t.data.targets, "y")), t.y2.domain(t.getYDomain(t.data.targets, "y2")), t.subX.domain(t.x.domain()), t.subY.domain(t.y.domain()), t.subY2.domain(t.y2.domain()), t.orgXDomain = t.x.domain(), t.brush && t.brush.scale(t.subX), r.zoom_enabled && t.zoom.scale(t.x), t.svg = t.selectChart.append("svg").style("overflow", "hidden").on("mouseenter", function() {
- return r.onmouseover.call(t)
- }).on("mouseleave", function() {
- return r.onmouseout.call(t)
- }), t.config.svg_classname && t.svg.attr("class", t.config.svg_classname), n = t.svg.append("defs"), t.clipChart = t.appendClip(n, t.clipId), t.clipXAxis = t.appendClip(n, t.clipIdForXAxis), t.clipYAxis = t.appendClip(n, t.clipIdForYAxis), t.clipGrid = t.appendClip(n, t.clipIdForGrid), t.clipSubchart = t.appendClip(n, t.clipIdForSubchart), t.updateSvgSize(), n = t.main = t.svg.append("g").attr("transform", t.getTranslate("main")), t.initSubchart && t.initSubchart(), t.initTooltip && t.initTooltip(), t.initLegend && t.initLegend(), t.initTitle && t.initTitle(), n.append("text").attr("class", G.text + " " + G.empty).attr("text-anchor", "middle").attr("dominant-baseline", "middle"), t.initRegion(), t.initGrid(), n.append("g").attr("clip-path", t.clipPath).attr("class", G.chart), r.grid_lines_front && t.initGridLines(), t.initEventRect(), t.initChartElements(), n.insert("rect", r.zoom_privileged ? null : "g." + G.regions).attr("class", G.zoomRect).attr("width", t.width).attr("height", t.height).style("opacity", 0).on("dblclick.zoom", null), r.axis_x_extent && t.brush.extent(t.getDefaultExtent()), t.axis.init(), t.updateTargets(t.data.targets), i && (t.updateDimension(), t.config.oninit.call(t), t.redraw({
- withTransition: !1,
- withTransform: !0,
- withUpdateXDomain: !0,
- withUpdateOrgXDomain: !0,
- withTransitionForAxis: !1
- })), t.bindResize(), t.api.element = t.selectChart.node()
- }, s.smoothLines = function(e, t) {
- var a = this;
- "grid" === t && e.each(function() {
- var e = a.d3.select(this),
- t = e.attr("x1"),
- n = e.attr("x2"),
- r = e.attr("y1"),
- i = e.attr("y2");
- e.attr({
- x1: Math.ceil(t),
- x2: Math.ceil(n),
- y1: Math.ceil(r),
- y2: Math.ceil(i)
- })
- })
- }, s.updateSizes = function() {
- var e = this,
- t = e.config,
- n = e.legend ? e.getLegendHeight() : 0,
- r = e.legend ? e.getLegendWidth() : 0,
- i = e.isLegendRight || e.isLegendInset ? 0 : n,
- a = e.hasArcType(),
- o = t.axis_rotated || a ? 0 : e.getHorizontalAxisHeight("x"),
- s = t.subchart_show && !a ? t.subchart_size_height + o : 0;
- e.currentWidth = e.getCurrentWidth(), e.currentHeight = e.getCurrentHeight(), e.margin = t.axis_rotated ? {
- top: e.getHorizontalAxisHeight("y2") + e.getCurrentPaddingTop(),
- right: a ? 0 : e.getCurrentPaddingRight(),
- bottom: e.getHorizontalAxisHeight("y") + i + e.getCurrentPaddingBottom(),
- left: s + (a ? 0 : e.getCurrentPaddingLeft())
- } : {
- top: 4 + e.getCurrentPaddingTop(),
- right: a ? 0 : e.getCurrentPaddingRight(),
- bottom: o + s + i + e.getCurrentPaddingBottom(),
- left: a ? 0 : e.getCurrentPaddingLeft()
- }, e.margin2 = t.axis_rotated ? {
- top: e.margin.top,
- right: NaN,
- bottom: 20 + i,
- left: e.rotated_padding_left
- } : {
- top: e.currentHeight - s - i,
- right: NaN,
- bottom: o + i,
- left: e.margin.left
- }, e.margin3 = {
- top: 0,
- right: NaN,
- bottom: 0,
- left: 0
- }, e.updateSizeForLegend && e.updateSizeForLegend(n, r), e.width = e.currentWidth - e.margin.left - e.margin.right, e.height = e.currentHeight - e.margin.top - e.margin.bottom, e.width < 0 && (e.width = 0), e.height < 0 && (e.height = 0), e.width2 = t.axis_rotated ? e.margin.left - e.rotated_padding_left - e.rotated_padding_right : e.width, e.height2 = t.axis_rotated ? e.height : e.currentHeight - e.margin2.top - e.margin2.bottom, e.width2 < 0 && (e.width2 = 0), e.height2 < 0 && (e.height2 = 0), e.arcWidth = e.width - (e.isLegendRight ? r + 10 : 0), e.arcHeight = e.height - (e.isLegendRight ? 0 : 10), e.hasType("gauge") && !t.gauge_fullCircle && (e.arcHeight += e.height - e.getGaugeLabelHeight()), e.updateRadius && e.updateRadius(), e.isLegendRight && a && (e.margin3.left = e.arcWidth / 2 + 1.1 * e.radiusExpanded)
- }, s.updateTargets = function(e) {
- var t = this;
- t.updateTargetsForText(e), t.updateTargetsForBar(e), t.updateTargetsForLine(e), t.hasArcType() && t.updateTargetsForArc && t.updateTargetsForArc(e), t.updateTargetsForSubchart && t.updateTargetsForSubchart(e), t.showTargets()
- }, s.showTargets = function() {
- var t = this;
- t.svg.selectAll("." + G.target).filter(function(e) {
- return t.isTargetToShow(e.id)
- }).transition().duration(t.config.transition_duration).style("opacity", 1)
- }, s.redraw = function(e, t) {
- var n, r, i, a, o, s, l, c, u, d, p, m, f, h = this,
- g = h.main,
- _ = h.d3,
- y = h.config,
- b = h.getShapeIndices(h.isAreaType),
- v = h.getShapeIndices(h.isBarType),
- S = h.getShapeIndices(h.isLineType),
- x = h.hasArcType(),
- E = h.filterTargetsToShow(h.data.targets),
- w = h.xv.bind(h),
- C = U(e = e || {}, "withY", !0),
- T = U(e, "withSubchart", !0),
- O = U(e, "withTransition", !0),
- M = U(e, "withTransform", !1),
- A = U(e, "withUpdateXDomain", !1),
- N = U(e, "withUpdateOrgXDomain", !1),
- D = U(e, "withTrimXDomain", !0),
- P = U(e, "withUpdateXAxis", A),
- k = U(e, "withLegend", !1),
- R = U(e, "withEventRect", !0),
- L = U(e, "withDimension", !0),
- I = U(e, "withTransitionForExit", O),
- F = U(e, "withTransitionForAxis", O),
- B = O ? y.transition_duration : 0,
- I = I ? B : 0;
- if (t = t || h.axis.generateTransitions(F ? B : 0), k && y.legend_show ? h.updateLegend(h.mapToIds(h.data.targets), e, t) : L && h.updateDimension(!0), h.isCategorized() && 0 === E.length && h.x.domain([0, h.axes.x.selectAll(".tick").size()]), E.length ? (h.updateXDomain(E, A, N, D), y.axis_x_tick_values || (c = h.axis.updateXAxisTickValues(E))) : (h.xAxis.tickValues([]), h.subXAxis.tickValues([])), y.zoom_rescale && !e.flow && (p = h.x.orgDomain()), h.y.domain(h.getYDomain(E, "y", p)), h.y2.domain(h.getYDomain(E, "y2", p)), !y.axis_y_tick_values && y.axis_y_tick_count && h.yAxis.tickValues(h.axis.generateTickValues(h.y.domain(), y.axis_y_tick_count)), !y.axis_y2_tick_values && y.axis_y2_tick_count && h.y2Axis.tickValues(h.axis.generateTickValues(h.y2.domain(), y.axis_y2_tick_count)), h.axis.redraw(t, x), h.axis.updateLabels(O), (A || P) && E.length)
- if (y.axis_x_tick_culling && c) {
- for (u = 1; u < c.length; u++)
- if (c.length / u < y.axis_x_tick_culling_max) {
- d = u;
- break
- }
- h.svg.selectAll("." + G.axisX + " .tick text").each(function(e) {
- e = c.indexOf(e);
- 0 <= e && _.select(this).style("display", e % d ? "none" : "block")
- })
- } else h.svg.selectAll("." + G.axisX + " .tick text").style("display", "block");
- n = h.generateDrawArea ? h.generateDrawArea(b, !1) : void 0, r = h.generateDrawBar ? h.generateDrawBar(v) : void 0, i = h.generateDrawLine ? h.generateDrawLine(S, !1) : void 0, a = h.generateXYForText(b, v, S, !0), o = h.generateXYForText(b, v, S, !1), C && (h.subY.domain(h.getYDomain(E, "y")), h.subY2.domain(h.getYDomain(E, "y2"))), h.updateXgridFocus(), g.select("text." + G.text + "." + G.empty).attr("x", h.width / 2).attr("y", h.height / 2).text(y.data_empty_label_text).transition().style("opacity", E.length ? 0 : 1), h.updateGrid(B), h.updateRegion(B), h.updateBar(I), h.updateLine(I), h.updateArea(I), h.updateCircle(), h.hasDataLabel() && h.updateText(I), h.redrawTitle && h.redrawTitle(), h.redrawArc && h.redrawArc(B, I, M), h.redrawSubchart && h.redrawSubchart(T, t, B, I, b, v, S), g.selectAll("." + G.selectedCircles).filter(h.isBarType.bind(h)).selectAll("circle").remove(), y.interaction_enabled && !e.flow && R && (h.redrawEventRect(), h.updateZoom && h.updateZoom()), h.updateCircleY(), m = (h.config.axis_rotated ? h.circleY : h.circleX).bind(h), f = (h.config.axis_rotated ? h.circleX : h.circleY).bind(h), e.flow && (l = h.generateFlow({
- targets: E,
- flow: e.flow,
- duration: e.flow.duration,
- drawBar: r,
- drawLine: i,
- drawArea: n,
- cx: m,
- cy: f,
- xv: w,
- xForText: a,
- yForText: o
- })), (B || l) && h.isTabVisible() ? _.transition().duration(B).each(function() {
- var t = [];
- [h.redrawBar(r, !0), h.redrawLine(i, !0), h.redrawArea(n, !0), h.redrawCircle(m, f, !0), h.redrawText(a, o, e.flow, !0), h.redrawRegion(!0), h.redrawGrid(!0)].forEach(function(e) {
- e.forEach(function(e) {
- t.push(e)
- })
- }), s = h.generateWait(), t.forEach(function(e) {
- s.add(e)
- })
- }).call(s, function() {
- l && l(), y.onrendered && y.onrendered.call(h)
- }) : (h.redrawBar(r), h.redrawLine(i), h.redrawArea(n), h.redrawCircle(m, f), h.redrawText(a, o, e.flow), h.redrawRegion(), h.redrawGrid(), y.onrendered && y.onrendered.call(h)), h.mapToIds(h.data.targets).forEach(function(e) {
- h.withoutFadeIn[e] = !0
- })
- }, s.updateAndRedraw = function(e) {
- var t, n = this,
- r = n.config;
- (e = e || {}).withTransition = U(e, "withTransition", !0), e.withTransform = U(e, "withTransform", !1), e.withLegend = U(e, "withLegend", !1), e.withUpdateXDomain = !0, e.withUpdateOrgXDomain = !0, e.withTransitionForExit = !1, e.withTransitionForTransform = U(e, "withTransitionForTransform", e.withTransition), n.updateSizes(), e.withLegend && r.legend_show || (t = n.axis.generateTransitions(e.withTransitionForAxis ? r.transition_duration : 0), n.updateScales(), n.updateSvgSize(), n.transformAll(e.withTransitionForTransform, t)), n.redraw(e, t)
- }, s.redrawWithoutRescale = function() {
- this.redraw({
- withY: !1,
- withSubchart: !1,
- withEventRect: !1,
- withTransitionForAxis: !1
- })
- }, s.isTimeSeries = function() {
- return "timeseries" === this.config.axis_x_type
- }, s.isCategorized = function() {
- return !!~this.config.axis_x_type.indexOf("categor")
- }, s.isCustomX = function() {
- var e = this.config;
- return !this.isTimeSeries() && (e.data_x || y(e.data_xs))
- }, s.isTimeSeriesY = function() {
- return "timeseries" === this.config.axis_y_type
- }, s.getTranslate = function(e) {
- var t, n, r = this,
- i = r.config;
- return "main" === e ? (t = f(r.margin.left), n = f(r.margin.top)) : "context" === e ? (t = f(r.margin2.left), n = f(r.margin2.top)) : "legend" === e ? (t = r.margin3.left, n = r.margin3.top) : "x" === e ? (t = 0, n = i.axis_rotated ? 0 : r.height) : "y" === e ? (t = 0, n = i.axis_rotated ? r.height : 0) : "y2" === e ? (t = i.axis_rotated ? 0 : r.width, n = i.axis_rotated ? 1 : 0) : "subx" === e ? (t = 0, n = i.axis_rotated ? 0 : r.height2) : "arc" === e && (t = r.arcWidth / 2, n = r.arcHeight / 2), "translate(" + t + "," + n + ")"
- }, s.initialOpacity = function(e) {
- return null !== e.value && this.withoutFadeIn[e.id] ? 1 : 0
- }, s.initialOpacityForCircle = function(e) {
- return null !== e.value && this.withoutFadeIn[e.id] ? this.opacityForCircle(e) : 0
- }, s.opacityForCircle = function(e) {
- var t = this.config.point_show ? 1 : 0;
- return _(e.value) ? this.isScatterType(e) ? .5 : t : 0
- }, s.opacityForText = function() {
- return this.hasDataLabel() ? 1 : 0
- }, s.xx = function(e) {
- return e ? this.x(e.x) : null
- }, s.xv = function(e) {
- var t = this,
- n = e.value;
- return t.isTimeSeries() ? n = t.parseDate(e.value) : t.isCategorized() && "string" == typeof e.value && (n = t.config.axis_x_categories.indexOf(e.value)), Math.ceil(t.x(n))
- }, s.yv = function(e) {
- return Math.ceil((e.axis && "y2" === e.axis ? this.y2 : this.y)(e.value))
- }, s.subxx = function(e) {
- return e ? this.subX(e.x) : null
- }, s.transformMain = function(e, t) {
- var n, r, i, a = this;
- t && t.axisX ? n = t.axisX : (n = a.main.select("." + G.axisX), e && (n = n.transition())), t && t.axisY ? r = t.axisY : (r = a.main.select("." + G.axisY), e && (r = r.transition())), t && t.axisY2 ? i = t.axisY2 : (i = a.main.select("." + G.axisY2), e && (i = i.transition())), (e ? a.main.transition() : a.main).attr("transform", a.getTranslate("main")), n.attr("transform", a.getTranslate("x")), r.attr("transform", a.getTranslate("y")), i.attr("transform", a.getTranslate("y2")), a.main.select("." + G.chartArcs).attr("transform", a.getTranslate("arc"))
- }, s.transformAll = function(e, t) {
- var n = this;
- n.transformMain(e, t), n.config.subchart_show && n.transformContext(e, t), n.legend && n.transformLegend(e)
- }, s.updateSvgSize = function() {
- var e = this,
- t = e.svg.select(".c3-brush .background");
- e.svg.attr("width", e.currentWidth).attr("height", e.currentHeight), e.svg.selectAll(["#" + e.clipId, "#" + e.clipIdForGrid]).select("rect").attr("width", e.width).attr("height", e.height), e.svg.select("#" + e.clipIdForXAxis).select("rect").attr("x", e.getXAxisClipX.bind(e)).attr("y", e.getXAxisClipY.bind(e)).attr("width", e.getXAxisClipWidth.bind(e)).attr("height", e.getXAxisClipHeight.bind(e)), e.svg.select("#" + e.clipIdForYAxis).select("rect").attr("x", e.getYAxisClipX.bind(e)).attr("y", e.getYAxisClipY.bind(e)).attr("width", e.getYAxisClipWidth.bind(e)).attr("height", e.getYAxisClipHeight.bind(e)), e.svg.select("#" + e.clipIdForSubchart).select("rect").attr("width", e.width).attr("height", t.size() ? t.attr("height") : 0), e.svg.select("." + G.zoomRect).attr("width", e.width).attr("height", e.height), e.selectChart.style("max-height", e.currentHeight + "px")
- }, s.updateDimension = function(e) {
- var t = this;
- e || (t.config.axis_rotated ? (t.axes.x.call(t.xAxis), t.axes.subx.call(t.subXAxis)) : (t.axes.y.call(t.yAxis), t.axes.y2.call(t.y2Axis))), t.updateSizes(), t.updateScales(), t.updateSvgSize(), t.transformAll(!1)
- }, s.observeInserted = function(t) {
- var n, r = this;
- "undefined" != typeof MutationObserver ? (n = new MutationObserver(function(e) {
- e.forEach(function(e) {
- "childList" === e.type && e.previousSibling && (n.disconnect(), r.intervalForObserveInserted = a.setInterval(function() {
- t.node().parentNode && (a.clearInterval(r.intervalForObserveInserted), r.updateDimension(), r.brush && r.brush.update(), r.config.oninit.call(r), r.redraw({
- withTransform: !0,
- withUpdateXDomain: !0,
- withUpdateOrgXDomain: !0,
- withTransition: !1,
- withTransitionForTransform: !1,
- withLegend: !0
- }), t.transition().style("opacity", 1))
- }, 10))
- })
- })).observe(t.node(), {
- attributes: !0,
- childList: !0,
- characterData: !0
- }) : a.console.error("MutationObserver not defined.")
- }, s.bindResize = function() {
- var e, t = this,
- n = t.config;
- t.resizeFunction = t.generateResize(), t.resizeFunction.add(function() {
- n.onresize.call(t)
- }), n.resize_auto && t.resizeFunction.add(function() {
- void 0 !== t.resizeTimeout && a.clearTimeout(t.resizeTimeout), t.resizeTimeout = a.setTimeout(function() {
- delete t.resizeTimeout, t.api.flush()
- }, 100)
- }), t.resizeFunction.add(function() {
- n.onresized.call(t)
- }), a.attachEvent ? a.attachEvent("onresize", t.resizeFunction) : a.addEventListener ? a.addEventListener("resize", t.resizeFunction, !1) : ((e = a.onresize) ? e.add && e.remove || (e = t.generateResize()).add(a.onresize) : e = t.generateResize(), e.add(t.resizeFunction), a.onresize = e)
- }, s.generateResize = function() {
- var n = [];
- function e() {
- n.forEach(function(e) {
- e()
- })
- }
- return e.add = function(e) {
- n.push(e)
- }, e.remove = function(e) {
- for (var t = 0; t < n.length; t++)
- if (n[t] === e) {
- n.splice(t, 1);
- break
- }
- }, e
- }, s.endall = function(e, t) {
- var n = 0;
- e.each(function() {
- ++n
- }).each("end", function() {
- --n || t.apply(this, arguments)
- })
- }, s.generateWait = function() {
- function e(e, n) {
- var r = setInterval(function() {
- var t = 0;
- i.forEach(function(e) {
- if (e.empty()) t += 1;
- else try {
- e.transition()
- } catch (e) {
- t += 1
- }
- }), t === i.length && (clearInterval(r), n && n())
- }, 10)
- }
- var i = [];
- return e.add = function(e) {
- i.push(e)
- }, e
- }, s.parseDate = function(e) {
- var t;
- return e instanceof Date ? t = e : "string" == typeof e ? t = this.dataTimeFormat(this.config.data_xFormat).parse(e) : "number" != typeof e || isNaN(e) || (t = new Date(+e)), t && !isNaN(+t) || a.console.error("Failed to parse x '" + e + "' to Date object"), t
- }, s.isTabVisible = function() {
- var e;
- return void 0 !== document.hidden ? e = "hidden" : void 0 !== document.mozHidden ? e = "mozHidden" : void 0 !== document.msHidden ? e = "msHidden" : void 0 !== document.webkitHidden && (e = "webkitHidden"), !document[e]
- }, s.getDefaultConfig = function() {
- var t = {
- bindto: "#chart",
- svg_classname: void 0,
- size_width: void 0,
- size_height: void 0,
- padding_left: void 0,
- padding_right: void 0,
- padding_top: void 0,
- padding_bottom: void 0,
- resize_auto: !0,
- zoom_enabled: !1,
- zoom_extent: void 0,
- zoom_privileged: !1,
- zoom_rescale: !1,
- zoom_onzoom: function() {},
- zoom_onzoomstart: function() {},
- zoom_onzoomend: function() {},
- zoom_x_min: void 0,
- zoom_x_max: void 0,
- interaction_brighten: !0,
- interaction_enabled: !0,
- onmouseover: function() {},
- onmouseout: function() {},
- onresize: function() {},
- onresized: function() {},
- oninit: function() {},
- onrendered: function() {},
- transition_duration: 350,
- data_x: void 0,
- data_xs: {},
- data_xFormat: "%Y-%m-%d",
- data_xLocaltime: !0,
- data_xSort: !0,
- data_idConverter: function(e) {
- return e
- },
- data_names: {},
- data_classes: {},
- data_groups: [],
- data_axes: {},
- data_type: void 0,
- data_types: {},
- data_labels: {},
- data_order: "desc",
- data_regions: {},
- data_color: void 0,
- data_colors: {},
- data_hide: !1,
- data_filter: void 0,
- data_selection_enabled: !1,
- data_selection_grouped: !1,
- data_selection_isselectable: function() {
- return !0
- },
- data_selection_multiple: !0,
- data_selection_draggable: !1,
- data_onclick: function() {},
- data_onmouseover: function() {},
- data_onmouseout: function() {},
- data_onselected: function() {},
- data_onunselected: function() {},
- data_url: void 0,
- data_headers: void 0,
- data_json: void 0,
- data_rows: void 0,
- data_columns: void 0,
- data_mimeType: void 0,
- data_keys: void 0,
- data_empty_label_text: "",
- subchart_show: !1,
- subchart_size_height: 60,
- subchart_axis_x_show: !0,
- subchart_onbrush: function() {},
- color_pattern: [],
- color_threshold: {},
- legend_show: !0,
- legend_hide: !1,
- legend_position: "bottom",
- legend_inset_anchor: "top-left",
- legend_inset_x: 10,
- legend_inset_y: 0,
- legend_inset_step: void 0,
- legend_item_onclick: void 0,
- legend_item_onmouseover: void 0,
- legend_item_onmouseout: void 0,
- legend_equally: !1,
- legend_padding: 0,
- legend_item_tile_width: 10,
- legend_item_tile_height: 10,
- axis_rotated: !1,
- axis_x_show: !0,
- axis_x_type: "indexed",
- axis_x_localtime: !0,
- axis_x_categories: [],
- axis_x_tick_centered: !1,
- axis_x_tick_format: void 0,
- axis_x_tick_culling: {},
- axis_x_tick_culling_max: 10,
- axis_x_tick_count: void 0,
- axis_x_tick_fit: !0,
- axis_x_tick_values: null,
- axis_x_tick_rotate: 0,
- axis_x_tick_outer: !0,
- axis_x_tick_multiline: !0,
- axis_x_tick_width: null,
- axis_x_max: void 0,
- axis_x_min: void 0,
- axis_x_padding: {},
- axis_x_height: void 0,
- axis_x_extent: void 0,
- axis_x_label: {},
- axis_y_show: !0,
- axis_y_type: void 0,
- axis_y_max: void 0,
- axis_y_min: void 0,
- axis_y_inverted: !1,
- axis_y_center: void 0,
- axis_y_inner: void 0,
- axis_y_label: {},
- axis_y_tick_format: void 0,
- axis_y_tick_outer: !0,
- axis_y_tick_values: null,
- axis_y_tick_rotate: 0,
- axis_y_tick_count: void 0,
- axis_y_tick_time_value: void 0,
- axis_y_tick_time_interval: void 0,
- axis_y_padding: {},
- axis_y_default: void 0,
- axis_y2_show: !1,
- axis_y2_max: void 0,
- axis_y2_min: void 0,
- axis_y2_inverted: !1,
- axis_y2_center: void 0,
- axis_y2_inner: void 0,
- axis_y2_label: {},
- axis_y2_tick_format: void 0,
- axis_y2_tick_outer: !0,
- axis_y2_tick_values: null,
- axis_y2_tick_count: void 0,
- axis_y2_padding: {},
- axis_y2_default: void 0,
- grid_x_show: !1,
- grid_x_type: "tick",
- grid_x_lines: [],
- grid_y_show: !1,
- grid_y_lines: [],
- grid_y_ticks: 10,
- grid_focus_show: !0,
- grid_lines_front: !0,
- point_show: !0,
- point_r: 2.5,
- point_sensitivity: 10,
- point_focus_expand_enabled: !0,
- point_focus_expand_r: void 0,
- point_select_r: void 0,
- line_connectNull: !1,
- line_step_type: "step",
- bar_width: void 0,
- bar_width_ratio: .6,
- bar_width_max: void 0,
- bar_zerobased: !0,
- area_zerobased: !0,
- area_above: !1,
- pie_label_show: !0,
- pie_label_format: void 0,
- pie_label_threshold: .05,
- pie_label_ratio: void 0,
- pie_expand: {},
- pie_expand_duration: 50,
- gauge_fullCircle: !1,
- gauge_label_show: !0,
- gauge_label_format: void 0,
- gauge_min: 0,
- gauge_max: 100,
- gauge_startingAngle: -1 * Math.PI / 2,
- gauge_units: void 0,
- gauge_width: void 0,
- gauge_expand: {},
- gauge_expand_duration: 50,
- donut_label_show: !0,
- donut_label_format: void 0,
- donut_label_threshold: .05,
- donut_label_ratio: void 0,
- donut_width: void 0,
- donut_title: "",
- donut_expand: {},
- donut_expand_duration: 50,
- spline_interpolation_type: "cardinal",
- regions: [],
- tooltip_show: !0,
- tooltip_grouped: !0,
- tooltip_format_title: void 0,
- tooltip_format_name: void 0,
- tooltip_format_value: void 0,
- tooltip_position: void 0,
- tooltip_contents: function(e, t, n, r) {
- return this.getTooltipContent ? this.getTooltipContent(e, t, n, r) : ""
- },
- tooltip_init_show: !1,
- tooltip_init_x: 0,
- tooltip_init_position: {
- top: "0px",
- left: "50px"
- },
- tooltip_onshow: function() {},
- tooltip_onhide: function() {},
- title_text: void 0,
- title_padding: {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0
- },
- title_position: "top-center"
- };
- return Object.keys(this.additionalConfig).forEach(function(e) {
- t[e] = this.additionalConfig[e]
- }, this), t
- }, s.additionalConfig = {}, s.loadConfig = function(t) {
- var n, r, i, a = this.config;
- Object.keys(a).forEach(function(e) {
- n = t, r = e.split("_"), i = function e() {
- var t = r.shift();
- return t && n && "object" == typeof n && t in n ? (n = n[t], e()) : t ? void 0 : n
- }(), D(i) && (a[e] = i)
- })
- }, s.getScale = function(e, t, n) {
- return (n ? this.d3.time.scale() : this.d3.scale.linear()).range([e, t])
- }, s.getX = function(e, t, n, r) {
- var i, a = this.getScale(e, t, this.isTimeSeries()),
- o = n ? a.domain(n) : a,
- a = this.isCategorized() ? (r = r || function() {
- return 0
- }, function(e, t) {
- e = o(e) + r(e);
- return t ? e : Math.ceil(e)
- }) : function(e, t) {
- e = o(e);
- return t ? e : Math.ceil(e)
- };
- for (i in o) a[i] = o[i];
- return a.orgDomain = function() {
- return o.domain()
- }, this.isCategorized() && (a.domain = function(e) {
- return arguments.length ? (o.domain(e), a) : [(e = this.orgDomain())[0], e[1] + 1]
- }), a
- }, s.getY = function(e, t, n) {
- t = this.getScale(e, t, this.isTimeSeriesY());
- return n && t.domain(n), t
- }, s.getYScale = function(e) {
- return "y2" === this.axis.getId(e) ? this.y2 : this.y
- }, s.getSubYScale = function(e) {
- return "y2" === this.axis.getId(e) ? this.subY2 : this.subY
- }, s.updateScales = function() {
- var t = this,
- e = t.config,
- n = !t.x;
- t.xMin = e.axis_rotated ? 1 : 0, t.xMax = e.axis_rotated ? t.height : t.width, t.yMin = e.axis_rotated ? 0 : t.height, t.yMax = e.axis_rotated ? t.width : 1, t.subXMin = t.xMin, t.subXMax = t.xMax, t.subYMin = e.axis_rotated ? 0 : t.height2, t.subYMax = e.axis_rotated ? t.width2 : 1, t.x = t.getX(t.xMin, t.xMax, n ? void 0 : t.x.orgDomain(), function() {
- return t.xAxis.tickOffset()
- }), t.y = t.getY(t.yMin, t.yMax, n ? e.axis_y_default : t.y.domain()), t.y2 = t.getY(t.yMin, t.yMax, n ? e.axis_y2_default : t.y2.domain()), t.subX = t.getX(t.xMin, t.xMax, t.orgXDomain, function(e) {
- return e % 1 ? 0 : t.subXAxis.tickOffset()
- }), t.subY = t.getY(t.subYMin, t.subYMax, n ? e.axis_y_default : t.subY.domain()), t.subY2 = t.getY(t.subYMin, t.subYMax, n ? e.axis_y2_default : t.subY2.domain()), t.xAxisTickFormat = t.axis.getXAxisTickFormat(), t.xAxisTickValues = t.axis.getXAxisTickValues(), t.yAxisTickValues = t.axis.getYAxisTickValues(), t.y2AxisTickValues = t.axis.getY2AxisTickValues(), t.xAxis = t.axis.getXAxis(t.x, t.xOrient, t.xAxisTickFormat, t.xAxisTickValues, e.axis_x_tick_outer), t.subXAxis = t.axis.getXAxis(t.subX, t.subXOrient, t.xAxisTickFormat, t.xAxisTickValues, e.axis_x_tick_outer), t.yAxis = t.axis.getYAxis(t.y, t.yOrient, e.axis_y_tick_format, t.yAxisTickValues, e.axis_y_tick_outer), t.y2Axis = t.axis.getYAxis(t.y2, t.y2Orient, e.axis_y2_tick_format, t.y2AxisTickValues, e.axis_y2_tick_outer), n || (t.brush && t.brush.scale(t.subX), e.zoom_enabled && t.zoom.scale(t.x)), t.updateArc && t.updateArc()
- }, s.getYDomainMin = function(e) {
- var t, n, r, i, a, o, s = this,
- l = s.config,
- c = s.mapToIds(e),
- u = s.getValuesAsIdKeyed(e);
- if (0 < l.data_groups.length)
- for (o = s.hasNegativeValueInTargets(e), t = 0; t < l.data_groups.length; t++)
- if (0 !== (i = l.data_groups[t].filter(function(e) {
- return !!~c.indexOf(e)
- })).length)
- for (r = i[0], o && u[r] && u[r].forEach(function(e, t) {
- u[r][t] = e < 0 ? e : 0
- }), n = 1; n < i.length; n++) u[a = i[n]] && u[a].forEach(function(e, t) {
- s.axis.getId(a) !== s.axis.getId(r) || !u[r] || o && 0 < +e || (u[r][t] += +e)
- });
- return s.d3.min(Object.keys(u).map(function(e) {
- return s.d3.min(u[e])
- }))
- }, s.getYDomainMax = function(e) {
- var t, n, r, i, a, o, s = this,
- l = s.config,
- c = s.mapToIds(e),
- u = s.getValuesAsIdKeyed(e);
- if (0 < l.data_groups.length)
- for (o = s.hasPositiveValueInTargets(e), t = 0; t < l.data_groups.length; t++)
- if (0 !== (i = l.data_groups[t].filter(function(e) {
- return !!~c.indexOf(e)
- })).length)
- for (r = i[0], o && u[r] && u[r].forEach(function(e, t) {
- u[r][t] = 0 < e ? e : 0
- }), n = 1; n < i.length; n++) u[a = i[n]] && u[a].forEach(function(e, t) {
- s.axis.getId(a) !== s.axis.getId(r) || !u[r] || o && +e < 0 || (u[r][t] += +e)
- });
- return s.d3.max(Object.keys(u).map(function(e) {
- return s.d3.max(u[e])
- }))
- }, s.getYDomain = function(e, t, n) {
- var r, i = this,
- a = i.config,
- o = e.filter(function(e) {
- return i.axis.getId(e.id) === t
- }),
- s = n ? i.filterByXDomain(o, n) : o,
- l = "y2" === t ? a.axis_y2_min : a.axis_y_min,
- c = "y2" === t ? a.axis_y2_max : a.axis_y_max,
- u = i.getYDomainMin(s),
- d = i.getYDomainMax(s),
- p = "y2" === t ? a.axis_y2_center : a.axis_y_center,
- m = i.hasType("bar", s) && a.bar_zerobased || i.hasType("area", s) && a.area_zerobased,
- f = "y2" === t ? a.axis_y2_inverted : a.axis_y_inverted,
- h = i.hasDataLabel() && a.axis_rotated,
- g = i.hasDataLabel() && !a.axis_rotated,
- u = _(l) ? l : !_(c) || u < c ? u : c - 10,
- d = _(c) ? c : !_(l) || l < d ? d : l + 10;
- return 0 === s.length ? ("y2" === t ? i.y2 : i.y).domain() : (isNaN(u) && (u = 0), isNaN(d) && (d = u), u === d && (u < 0 ? d = 0 : u = 0), e = 0 <= u && 0 <= d, n = u <= 0 && d <= 0, (_(l) && e || _(c) && n) && (m = !1), m && (e && (u = 0), n && (d = 0)), l = s = .1 * (o = Math.abs(d - u)), void 0 !== p && (d = p + (c = Math.max(Math.abs(u), Math.abs(d))), u = p - c), h ? (r = i.getDataLabelLength(u, d, "width"), h = P(i.y.range()), l += (h = [r[0] / h, r[1] / h])[1] / (1 - h[0] - h[1]) * o, s += h[0] / (1 - h[0] - h[1]) * o) : g && (r = i.getDataLabelLength(u, d, "height"), l += i.axis.convertPixelsToAxisPadding(r[1], o), s += i.axis.convertPixelsToAxisPadding(r[0], o)), "y" === t && y(a.axis_y_padding) && (l = i.axis.getPadding(a.axis_y_padding, "top", l, o), s = i.axis.getPadding(a.axis_y_padding, "bottom", s, o)), "y2" === t && y(a.axis_y2_padding) && (l = i.axis.getPadding(a.axis_y2_padding, "top", l, o), s = i.axis.getPadding(a.axis_y2_padding, "bottom", s, o)), m && (e && (s = u), n && (l = -d)), l = [u - s, d + l], f ? l.reverse() : l)
- }, s.getXDomainMin = function(e) {
- var t = this,
- n = t.config;
- return D(n.axis_x_min) ? t.isTimeSeries() ? this.parseDate(n.axis_x_min) : n.axis_x_min : t.d3.min(e, function(e) {
- return t.d3.min(e.values, function(e) {
- return e.x
- })
- })
- }, s.getXDomainMax = function(e) {
- var t = this,
- n = t.config;
- return D(n.axis_x_max) ? t.isTimeSeries() ? this.parseDate(n.axis_x_max) : n.axis_x_max : t.d3.max(e, function(e) {
- return t.d3.max(e.values, function(e) {
- return e.x
- })
- })
- }, s.getXDomainPadding = function(e) {
- var t, n, r = this.config,
- i = e[1] - e[0],
- i = this.isCategorized() ? 0 : this.hasType("bar") ? 1 < (e = this.getMaxDataCount()) ? i / (e - 1) / 2 : .5 : .01 * i;
- return "object" == typeof r.axis_x_padding && y(r.axis_x_padding) ? (t = _(r.axis_x_padding.left) ? r.axis_x_padding.left : i, n = _(r.axis_x_padding.right) ? r.axis_x_padding.right : i) : t = n = "number" == typeof r.axis_x_padding ? r.axis_x_padding : i, {
- left: t,
- right: n
- }
- }, s.getXDomain = function(e) {
- var t = this,
- n = [t.getXDomainMin(e), t.getXDomainMax(e)],
- r = n[0],
- i = n[1],
- a = t.getXDomainPadding(n),
- e = 0,
- n = 0;
- return r - i != 0 || t.isCategorized() || (i = t.isTimeSeries() ? (r = new Date(.5 * r.getTime()), new Date(1.5 * i.getTime())) : (r = 0 === r ? 1 : .5 * r, 0 === i ? -1 : 1.5 * i)), !r && 0 !== r || (e = t.isTimeSeries() ? new Date(r.getTime() - a.left) : r - a.left), !i && 0 !== i || (n = t.isTimeSeries() ? new Date(i.getTime() + a.right) : i + a.right), [e, n]
- }, s.updateXDomain = function(e, t, n, r, i) {
- var a = this,
- o = a.config;
- return n && (a.x.domain(i || a.d3.extent(a.getXDomain(e))), a.orgXDomain = a.x.domain(), o.zoom_enabled && a.zoom.scale(a.x).updateScaleExtent(), a.subX.domain(a.x.domain()), a.brush && a.brush.scale(a.subX)), t && (a.x.domain(i || (!a.brush || a.brush.empty() ? a.orgXDomain : a.brush.extent())), o.zoom_enabled && a.zoom.scale(a.x).updateScaleExtent()), r && a.x.domain(a.trimXDomain(a.x.orgDomain())), a.x.domain()
- }, s.trimXDomain = function(e) {
- var t = this.getZoomDomain(),
- n = t[0],
- t = t[1];
- return e[0] <= n && (e[1] = n - e[0] + +e[1], e[0] = n), t <= e[1] && (e[0] = +e[0] - (e[1] - t), e[1] = t), e
- }, s.isX = function(e) {
- var t = this.config;
- return t.data_x && e === t.data_x || y(t.data_xs) && g(t.data_xs, e)
- }, s.isNotX = function(e) {
- return !this.isX(e)
- }, s.getXKey = function(e) {
- var t = this.config;
- return t.data_x || (y(t.data_xs) ? t.data_xs[e] : null)
- }, s.getXValuesOfXKey = function(t, e) {
- var n, r = this;
- return (e && y(e) ? r.mapToIds(e) : []).forEach(function(e) {
- r.getXKey(e) === t && (n = r.data.xs[e])
- }), n
- }, s.getIndexByX = function(e) {
- e = this.filterByX(this.data.targets, e);
- return e.length ? e[0].index : null
- }, s.getXValue = function(e, t) {
- return e in this.data.xs && this.data.xs[e] && _(this.data.xs[e][t]) ? this.data.xs[e][t] : t
- }, s.getOtherTargetXs = function() {
- var e = Object.keys(this.data.xs);
- return e.length ? this.data.xs[e[0]] : null
- }, s.getOtherTargetX = function(e) {
- var t = this.getOtherTargetXs();
- return t && e < t.length ? t[e] : null
- }, s.addXs = function(t) {
- var n = this;
- Object.keys(t).forEach(function(e) {
- n.config.data_xs[e] = t[e]
- })
- }, s.hasMultipleX = function(t) {
- return 1 < this.d3.set(Object.keys(t).map(function(e) {
- return t[e]
- })).size()
- }, s.isMultipleX = function() {
- return y(this.config.data_xs) || !this.config.data_xSort || this.hasType("scatter")
- }, s.addName = function(e) {
- var t;
- return e && (e.name = void 0 !== (t = this.config.data_names[e.id]) ? t : e.id), e
- }, s.getValueOnIndex = function(e, t) {
- e = e.filter(function(e) {
- return e.index === t
- });
- return e.length ? e[0] : null
- }, s.updateTargetX = function(e, r) {
- var i = this;
- e.forEach(function(n) {
- n.values.forEach(function(e, t) {
- e.x = i.generateTargetX(r[t], n.id, t)
- }), i.data.xs[n.id] = r
- })
- }, s.updateTargetXs = function(e, t) {
- var n = this;
- e.forEach(function(e) {
- t[e.id] && n.updateTargetX([e], t[e.id])
- })
- }, s.generateTargetX = function(e, t, n) {
- var r = this,
- n = r.isTimeSeries() ? r.parseDate(e || r.getXValue(t, n)) : r.isCustomX() && !r.isCategorized() ? _(e) ? +e : r.getXValue(t, n) : n;
- return n
- }, s.cloneTarget = function(e) {
- return {
- id: e.id,
- id_org: e.id_org,
- values: e.values.map(function(e) {
- return {
- x: e.x,
- value: e.value,
- id: e.id
- }
- })
- }
- }, s.updateXs = function() {
- var t = this;
- t.data.targets.length && (t.xs = [], t.data.targets[0].values.forEach(function(e) {
- t.xs[e.index] = e.x
- }))
- }, s.getPrevX = function(e) {
- e = this.xs[e - 1];
- return void 0 !== e ? e : null
- }, s.getNextX = function(e) {
- e = this.xs[e + 1];
- return void 0 !== e ? e : null
- }, s.getMaxDataCount = function() {
- return this.d3.max(this.data.targets, function(e) {
- return e.values.length
- })
- }, s.getMaxDataCountTarget = function(e) {
- var t, n = e.length,
- r = 0;
- return 1 < n ? e.forEach(function(e) {
- r < e.values.length && (r = (t = e).values.length)
- }) : t = n ? e[0] : null, t
- }, s.getEdgeX = function(e) {
- return e.length ? [this.d3.min(e, function(e) {
- return e.values[0].x
- }), this.d3.max(e, function(e) {
- return e.values[e.values.length - 1].x
- })] : [0, 0]
- }, s.mapToIds = function(e) {
- return e.map(function(e) {
- return e.id
- })
- }, s.mapToTargetIds = function(e) {
- return e ? [].concat(e) : this.mapToIds(this.data.targets)
- }, s.hasTarget = function(e, t) {
- for (var n = this.mapToIds(e), r = 0; r < n.length; r++)
- if (n[r] === t) return !0;
- return !1
- }, s.isTargetToShow = function(e) {
- return !~this.hiddenTargetIds.indexOf(e)
- }, s.isLegendToShow = function(e) {
- return !~this.hiddenLegendIds.indexOf(e)
- }, s.filterTargetsToShow = function(e) {
- var t = this;
- return e.filter(function(e) {
- return t.isTargetToShow(e.id)
- })
- }, s.mapTargetsToUniqueXs = function(e) {
- e = this.d3.set(this.d3.merge(e.map(function(e) {
- return e.values.map(function(e) {
- return +e.x
- })
- }))).values();
- return (e = this.isTimeSeries() ? e.map(function(e) {
- return new Date(+e)
- }) : e.map(function(e) {
- return +e
- })).sort(function(e, t) {
- return e < t ? -1 : t < e ? 1 : t <= e ? 0 : NaN
- })
- }, s.addHiddenTargetIds = function(e) {
- this.hiddenTargetIds = this.hiddenTargetIds.concat(e)
- }, s.removeHiddenTargetIds = function(t) {
- this.hiddenTargetIds = this.hiddenTargetIds.filter(function(e) {
- return !~t.indexOf(e)
- })
- }, s.addHiddenLegendIds = function(e) {
- this.hiddenLegendIds = this.hiddenLegendIds.concat(e)
- }, s.removeHiddenLegendIds = function(t) {
- this.hiddenLegendIds = this.hiddenLegendIds.filter(function(e) {
- return !~t.indexOf(e)
- })
- }, s.getValuesAsIdKeyed = function(e) {
- var n = {};
- return e.forEach(function(t) {
- n[t.id] = [], t.values.forEach(function(e) {
- n[t.id].push(e.value)
- })
- }), n
- }, s.checkValueInTargets = function(e, t) {
- for (var n, r, i = Object.keys(e), a = 0; a < i.length; a++)
- for (r = e[i[a]].values, n = 0; n < r.length; n++)
- if (t(r[n].value)) return !0;
- return !1
- }, s.hasNegativeValueInTargets = function(e) {
- return this.checkValueInTargets(e, function(e) {
- return e < 0
- })
- }, s.hasPositiveValueInTargets = function(e) {
- return this.checkValueInTargets(e, function(e) {
- return 0 < e
- })
- }, s.isOrderDesc = function() {
- var e = this.config;
- return "string" == typeof e.data_order && "desc" == e.data_order.toLowerCase()
- }, s.isOrderAsc = function() {
- var e = this.config;
- return "string" == typeof e.data_order && "asc" == e.data_order.toLowerCase()
- }, s.orderTargets = function(e) {
- var t = this.config,
- r = this.isOrderAsc(),
- n = this.isOrderDesc();
- return r || n ? e.sort(function(e, t) {
- var n = function(e, t) {
- return e + Math.abs(t.value)
- },
- e = e.values.reduce(n, 0),
- n = t.values.reduce(n, 0);
- return r ? n - e : e - n
- }) : d(t.data_order) && e.sort(t.data_order), e
- }, s.filterByX = function(e, t) {
- return this.d3.merge(e.map(function(e) {
- return e.values
- })).filter(function(e) {
- return e.x - t == 0
- })
- }, s.filterRemoveNull = function(e) {
- return e.filter(function(e) {
- return _(e.value)
- })
- }, s.filterByXDomain = function(e, t) {
- return e.map(function(e) {
- return {
- id: e.id,
- id_org: e.id_org,
- values: e.values.filter(function(e) {
- return t[0] <= e.x && e.x <= t[1]
- })
- }
- })
- }, s.hasDataLabel = function() {
- var e = this.config;
- return !("boolean" != typeof e.data_labels || !e.data_labels) || !("object" != typeof e.data_labels || !y(e.data_labels))
- }, s.getDataLabelLength = function(e, t, n) {
- var r = this,
- i = [0, 0];
- return r.selectChart.select("svg").selectAll(".dummy").data([e, t]).enter().append("text").text(function(e) {
- return r.dataLabelFormat(e.id)(e)
- }).each(function(e, t) {
- i[t] = 1.3 * this.getBoundingClientRect()[n]
- }).remove(), i
- }, s.isNoneArc = function(e) {
- return this.hasTarget(this.data.targets, e.id)
- }, s.isArc = function(e) {
- return "data" in e && this.hasTarget(this.data.targets, e.data.id)
- }, s.findSameXOfValues = function(e, t) {
- for (var n = e[t].x, r = [], i = t - 1; 0 <= i && n === e[i].x; i--) r.push(e[i]);
- for (i = t; i < e.length && n === e[i].x; i++) r.push(e[i]);
- return r
- }, s.findClosestFromTargets = function(e, t) {
- var n = this,
- e = e.map(function(e) {
- return n.findClosest(e.values, t)
- });
- return n.findClosest(e, t)
- }, s.findClosest = function(e, n) {
- var r, i = this,
- a = i.config.point_sensitivity;
- return e.filter(function(e) {
- return e && i.isBarType(e.id)
- }).forEach(function(e) {
- var t = i.main.select("." + G.bars + i.getTargetSelectorSuffix(e.id) + " ." + G.bar + "-" + e.index).node();
- !r && i.isWithinBar(t) && (r = e)
- }), e.filter(function(e) {
- return e && !i.isBarType(e.id)
- }).forEach(function(e) {
- var t = i.dist(e, n);
- t < a && (a = t, r = e)
- }), r
- }, s.dist = function(e, t) {
- var n = this.config,
- r = n.axis_rotated ? 1 : 0,
- i = n.axis_rotated ? 0 : 1,
- n = this.circleY(e, e.index),
- e = this.x(e.x);
- return Math.sqrt(Math.pow(e - t[r], 2) + Math.pow(n - t[i], 2))
- }, s.convertValuesToStep = function(e) {
- var t, n = [].concat(e);
- if (!this.isCategorized()) return e;
- for (t = e.length + 1; 0 < t; t--) n[t] = n[t - 1];
- return n[0] = {
- x: n[0].x - 1,
- value: n[0].value,
- id: n[0].id
- }, n[e.length + 1] = {
- x: n[e.length].x + 1,
- value: n[e.length].value,
- id: n[e.length].id
- }, n
- }, s.updateDataAttributes = function(e, t) {
- var n = this.config["data_" + e];
- return void 0 === t || (Object.keys(t).forEach(function(e) {
- n[e] = t[e]
- }), this.redraw({
- withLegend: !0
- })), n
- }, s.convertUrlToData = function(e, t, n, r, i) {
- var a = this,
- o = t || "csv",
- s = a.d3.xhr(e);
- n && Object.keys(n).forEach(function(e) {
- s.header(e, n[e])
- }), s.get(function(e, t) {
- if (!t) throw Error(e.responseURL + " " + e.status + " (" + e.statusText + ")");
- t = "json" === o ? a.convertJsonToData(JSON.parse(t.response), r) : "tsv" === o ? a.convertTsvToData(t.response) : a.convertCsvToData(t.response), i.call(a, t)
- })
- }, s.convertXsvToData = function(e, t) {
- var n, r = t.parseRows(e);
- return 1 === r.length ? (n = [{}], r[0].forEach(function(e) {
- n[0][e] = null
- })) : n = t.parse(e), n
- }, s.convertCsvToData = function(e) {
- return this.convertXsvToData(e, this.d3.csv)
- }, s.convertTsvToData = function(e) {
- return this.convertXsvToData(e, this.d3.tsv)
- }, s.convertJsonToData = function(t, e) {
- var r, i = this,
- a = [],
- e = e ? (e.x ? (r = e.value.concat(e.x), i.config.data_x = e.x) : r = e.value, a.push(r), t.forEach(function(t) {
- var n = [];
- r.forEach(function(e) {
- e = i.findValueInJson(t, e);
- S(e) && (e = null), n.push(e)
- }), a.push(n)
- }), i.convertRowsToData(a)) : (Object.keys(t).forEach(function(e) {
- a.push([e].concat(t[e]))
- }), i.convertColumnsToData(a));
- return e
- }, s.findValueInJson = function(e, t) {
- for (var n = (t = (t = t.replace(/\[(\w+)\]/g, ".$1")).replace(/^\./, "")).split("."), r = 0; r < n.length; ++r) {
- var i = n[r];
- if (!(i in e)) return;
- e = e[i]
- }
- return e
- }, s.convertRowsToData = function(e) {
- for (var t, n = e[0], r = {}, i = [], a = 1; a < e.length; a++) {
- for (r = {}, t = 0; t < e[a].length; t++) {
- if (S(e[a][t])) throw Error("Source data is missing a component at (" + a + "," + t + ")!");
- r[n[t]] = e[a][t]
- }
- i.push(r)
- }
- return i
- }, s.convertColumnsToData = function(e) {
- for (var t, n, r = [], i = 0; i < e.length; i++)
- for (n = e[i][0], t = 1; t < e[i].length; t++) {
- if (S(r[t - 1]) && (r[t - 1] = {}), S(e[i][t])) throw Error("Source data is missing a component at (" + i + "," + t + ")!");
- r[t - 1][n] = e[i][t]
- }
- return r