Skip to content

Instantly share code, notes, and snippets.

@egeucak
Created April 16, 2017 16:15
Show Gist options
  • Save egeucak/6b3445eeb3e0eb877bf95cebd005f485 to your computer and use it in GitHub Desktop.
Save egeucak/6b3445eeb3e0eb877bf95cebd005f485 to your computer and use it in GitHub Desktop.
/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ ! function(a, b) {
"object" == typeof module && "object" == typeof module.exports ? module.exports = a.document ? b(a, !0) : function(a) {
if (!a.document) throw new Error("jQuery requires a window with a document");
return b(a)
} : b(a)
}("undefined" != typeof window ? window : this, function(a, b) {
var c = [],
d = c.slice,
e = c.concat,
f = c.push,
g = c.indexOf,
h = {},
i = h.toString,
j = h.hasOwnProperty,
k = {},
l = a.document,
m = "2.1.3",
n = function(a, b) {
return new n.fn.init(a, b)
},
o = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
p = /^-ms-/,
q = /-([\da-z])/gi,
r = function(a, b) {
return b.toUpperCase()
};
n.fn = n.prototype = {
jquery: m,
constructor: n,
selector: "",
length: 0,
toArray: function() {
return d.call(this)
},
get: function(a) {
return null != a ? 0 > a ? this[a + this.length] : this[a] : d.call(this)
},
pushStack: function(a) {
var b = n.merge(this.constructor(), a);
return b.prevObject = this, b.context = this.context, b
},
each: function(a, b) {
return n.each(this, a, b)
},
map: function(a) {
return this.pushStack(n.map(this, function(b, c) {
return a.call(b, c, b)
}))
},
slice: function() {
return this.pushStack(d.apply(this, arguments))
},
first: function() {
return this.eq(0)
},
last: function() {
return this.eq(-1)
},
eq: function(a) {
var b = this.length,
c = +a + (0 > a ? b : 0);
return this.pushStack(c >= 0 && b > c ? [this[c]] : [])
},
end: function() {
return this.prevObject || this.constructor(null)
},
push: f,
sort: c.sort,
splice: c.splice
}, n.extend = n.fn.extend = function() {
var a, b, c, d, e, f, g = arguments[0] || {},
h = 1,
i = arguments.length,
j = !1;
for ("boolean" == typeof g && (j = g, g = arguments[h] || {}, h++), "object" == typeof g || n.isFunction(g) || (g = {}), h === i && (g = this, h--); i > h; h++)
if (null != (a = arguments[h]))
for (b in a) c = g[b], d = a[b], g !== d && (j && d && (n.isPlainObject(d) || (e = n.isArray(d))) ? (e ? (e = !1, f = c && n.isArray(c) ? c : []) : f = c && n.isPlainObject(c) ? c : {}, g[b] = n.extend(j, f, d)) : void 0 !== d && (g[b] = d));
return g
}, n.extend({
expando: "jQuery" + (m + Math.random()).replace(/\D/g, ""),
isReady: !0,
error: function(a) {
throw new Error(a)
},
noop: function() {},
isFunction: function(a) {
return "function" === n.type(a)
},
isArray: Array.isArray,
isWindow: function(a) {
return null != a && a === a.window
},
isNumeric: function(a) {
return !n.isArray(a) && a - parseFloat(a) + 1 >= 0
},
isPlainObject: function(a) {
return "object" !== n.type(a) || a.nodeType || n.isWindow(a) ? !1 : a.constructor && !j.call(a.constructor.prototype, "isPrototypeOf") ? !1 : !0
},
isEmptyObject: function(a) {
var b;
for (b in a) return !1;
return !0
},
type: function(a) {
return null == a ? a + "" : "object" == typeof a || "function" == typeof a ? h[i.call(a)] || "object" : typeof a
},
globalEval: function(a) {
var b, c = eval;
a = n.trim(a), a && (1 === a.indexOf("use strict") ? (b = l.createElement("script"), b.text = a, l.head.appendChild(b).parentNode.removeChild(b)) : c(a))
},
camelCase: function(a) {
return a.replace(p, "ms-").replace(q, r)
},
nodeName: function(a, b) {
return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase()
},
each: function(a, b, c) {
var d, e = 0,
f = a.length,
g = s(a);
if (c) {
if (g) {
for (; f > e; e++)
if (d = b.apply(a[e], c), d === !1) break
} else
for (e in a)
if (d = b.apply(a[e], c), d === !1) break
} else if (g) {
for (; f > e; e++)
if (d = b.call(a[e], e, a[e]), d === !1) break
} else
for (e in a)
if (d = b.call(a[e], e, a[e]), d === !1) break; return a
},
trim: function(a) {
return null == a ? "" : (a + "").replace(o, "")
},
makeArray: function(a, b) {
var c = b || [];
return null != a && (s(Object(a)) ? n.merge(c, "string" == typeof a ? [a] : a) : f.call(c, a)), c
},
inArray: function(a, b, c) {
return null == b ? -1 : g.call(b, a, c)
},
merge: function(a, b) {
for (var c = +b.length, d = 0, e = a.length; c > d; d++) a[e++] = b[d];
return a.length = e, a
},
grep: function(a, b, c) {
for (var d, e = [], f = 0, g = a.length, h = !c; g > f; f++) d = !b(a[f], f), d !== h && e.push(a[f]);
return e
},
map: function(a, b, c) {
var d, f = 0,
g = a.length,
h = s(a),
i = [];
if (h)
for (; g > f; f++) d = b(a[f], f, c), null != d && i.push(d);
else
for (f in a) d = b(a[f], f, c), null != d && i.push(d);
return e.apply([], i)
},
guid: 1,
proxy: function(a, b) {
var c, e, f;
return "string" == typeof b && (c = a[b], b = a, a = c), n.isFunction(a) ? (e = d.call(arguments, 2), f = function() {
return a.apply(b || this, e.concat(d.call(arguments)))
}, f.guid = a.guid = a.guid || n.guid++, f) : void 0
},
now: Date.now,
support: k
}), n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(a, b) {
h["[object " + b + "]"] = b.toLowerCase()
});
function s(a) {
var b = a.length,
c = n.type(a);
return "function" === c || n.isWindow(a) ? !1 : 1 === a.nodeType && b ? !0 : "array" === c || 0 === b || "number" == typeof b && b > 0 && b - 1 in a
}
var t = function(a) {
var b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u = "sizzle" + 1 * new Date,
v = a.document,
w = 0,
x = 0,
y = hb(),
z = hb(),
A = hb(),
B = function(a, b) {
return a === b && (l = !0), 0
},
C = 1 << 31,
D = {}.hasOwnProperty,
E = [],
F = E.pop,
G = E.push,
H = E.push,
I = E.slice,
J = function(a, b) {
for (var c = 0, d = a.length; d > c; c++)
if (a[c] === b) return c;
return -1
},
K = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
L = "[\\x20\\t\\r\\n\\f]",
M = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
N = M.replace("w", "w#"),
O = "\\[" + L + "*(" + M + ")(?:" + L + "*([*^$|!~]?=)" + L + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + N + "))|)" + L + "*\\]",
P = ":(" + M + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + O + ")*)|.*)\\)|)",
Q = new RegExp(L + "+", "g"),
R = new RegExp("^" + L + "+|((?:^|[^\\\\])(?:\\\\.)*)" + L + "+$", "g"),
S = new RegExp("^" + L + "*," + L + "*"),
T = new RegExp("^" + L + "*([>+~]|" + L + ")" + L + "*"),
U = new RegExp("=" + L + "*([^\\]'\"]*?)" + L + "*\\]", "g"),
V = new RegExp(P),
W = new RegExp("^" + N + "$"),
X = {
ID: new RegExp("^#(" + M + ")"),
CLASS: new RegExp("^\\.(" + M + ")"),
TAG: new RegExp("^(" + M.replace("w", "w*") + ")"),
ATTR: new RegExp("^" + O),
PSEUDO: new RegExp("^" + P),
CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + L + "*(even|odd|(([+-]|)(\\d*)n|)" + L + "*(?:([+-]|)" + L + "*(\\d+)|))" + L + "*\\)|)", "i"),
bool: new RegExp("^(?:" + K + ")$", "i"),
needsContext: new RegExp("^" + L + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + L + "*((?:-\\d)?\\d*)" + L + "*\\)|)(?=[^-]|$)", "i")
},
Y = /^(?:input|select|textarea|button)$/i,
Z = /^h\d$/i,
$ = /^[^{]+\{\s*\[native \w/,
_ = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
ab = /[+~]/,
bb = /'|\\/g,
cb = new RegExp("\\\\([\\da-f]{1,6}" + L + "?|(" + L + ")|.)", "ig"),
db = function(a, b, c) {
var d = "0x" + b - 65536;
return d !== d || c ? b : 0 > d ? String.fromCharCode(d + 65536) : String.fromCharCode(d >> 10 | 55296, 1023 & d | 56320)
},
eb = function() {
m()
};
try {
H.apply(E = I.call(v.childNodes), v.childNodes), E[v.childNodes.length].nodeType
} catch (fb) {
H = {
apply: E.length ? function(a, b) {
G.apply(a, I.call(b))
} : function(a, b) {
var c = a.length,
d = 0;
while (a[c++] = b[d++]);
a.length = c - 1
}
}
}
function gb(a, b, d, e) {
var f, h, j, k, l, o, r, s, w, x;
if ((b ? b.ownerDocument || b : v) !== n && m(b), b = b || n, d = d || [], k = b.nodeType, "string" != typeof a || !a || 1 !== k && 9 !== k && 11 !== k) return d;
if (!e && p) {
if (11 !== k && (f = _.exec(a)))
if (j = f[1]) {
if (9 === k) {
if (h = b.getElementById(j), !h || !h.parentNode) return d;
if (h.id === j) return d.push(h), d
} else if (b.ownerDocument && (h = b.ownerDocument.getElementById(j)) && t(b, h) && h.id === j) return d.push(h), d
} else {
if (f[2]) return H.apply(d, b.getElementsByTagName(a)), d;
if ((j = f[3]) && c.getElementsByClassName) return H.apply(d, b.getElementsByClassName(j)), d
}
if (c.qsa && (!q || !q.test(a))) {
if (s = r = u, w = b, x = 1 !== k && a, 1 === k && "object" !== b.nodeName.toLowerCase()) {
o = g(a), (r = b.getAttribute("id")) ? s = r.replace(bb, "\\$&") : b.setAttribute("id", s), s = "[id='" + s + "'] ", l = o.length;
while (l--) o[l] = s + rb(o[l]);
w = ab.test(a) && pb(b.parentNode) || b, x = o.join(",")
}
if (x) try {
return H.apply(d, w.querySelectorAll(x)), d
} catch (y) {} finally {
r || b.removeAttribute("id")
}
}
}
return i(a.replace(R, "$1"), b, d, e)
}
function hb() {
var a = [];
function b(c, e) {
return a.push(c + " ") > d.cacheLength && delete b[a.shift()], b[c + " "] = e
}
return b
}
function ib(a) {
return a[u] = !0, a
}
function jb(a) {
var b = n.createElement("div");
try {
return !!a(b)
} catch (c) {
return !1
} finally {
b.parentNode && b.parentNode.removeChild(b), b = null
}
}
function kb(a, b) {
var c = a.split("|"),
e = a.length;
while (e--) d.attrHandle[c[e]] = b
}
function lb(a, b) {
var c = b && a,
d = c && 1 === a.nodeType && 1 === b.nodeType && (~b.sourceIndex || C) - (~a.sourceIndex || C);
if (d) return d;
if (c)
while (c = c.nextSibling)
if (c === b) return -1;
return a ? 1 : -1
}
function mb(a) {
return function(b) {
var c = b.nodeName.toLowerCase();
return "input" === c && b.type === a
}
}
function nb(a) {
return function(b) {
var c = b.nodeName.toLowerCase();
return ("input" === c || "button" === c) && b.type === a
}
}
function ob(a) {
return ib(function(b) {
return b = +b, ib(function(c, d) {
var e, f = a([], c.length, b),
g = f.length;
while (g--) c[e = f[g]] && (c[e] = !(d[e] = c[e]))
})
})
}
function pb(a) {
return a && "undefined" != typeof a.getElementsByTagName && a
}
c = gb.support = {}, f = gb.isXML = function(a) {
var b = a && (a.ownerDocument || a).documentElement;
return b ? "HTML" !== b.nodeName : !1
}, m = gb.setDocument = function(a) {
var b, e, g = a ? a.ownerDocument || a : v;
return g !== n && 9 === g.nodeType && g.documentElement ? (n = g, o = g.documentElement, e = g.defaultView, e && e !== e.top && (e.addEventListener ? e.addEventListener("unload", eb, !1) : e.attachEvent && e.attachEvent("onunload", eb)), p = !f(g), c.attributes = jb(function(a) {
return a.className = "i", !a.getAttribute("className")
}), c.getElementsByTagName = jb(function(a) {
return a.appendChild(g.createComment("")), !a.getElementsByTagName("*").length
}), c.getElementsByClassName = $.test(g.getElementsByClassName), c.getById = jb(function(a) {
return o.appendChild(a).id = u, !g.getElementsByName || !g.getElementsByName(u).length
}), c.getById ? (d.find.ID = function(a, b) {
if ("undefined" != typeof b.getElementById && p) {
var c = b.getElementById(a);
return c && c.parentNode ? [c] : []
}
}, d.filter.ID = function(a) {
var b = a.replace(cb, db);
return function(a) {
return a.getAttribute("id") === b
}
}) : (delete d.find.ID, d.filter.ID = function(a) {
var b = a.replace(cb, db);
return function(a) {
var c = "undefined" != typeof a.getAttributeNode && a.getAttributeNode("id");
return c && c.value === b
}
}), d.find.TAG = c.getElementsByTagName ? function(a, b) {
return "undefined" != typeof b.getElementsByTagName ? b.getElementsByTagName(a) : c.qsa ? b.querySelectorAll(a) : void 0
} : function(a, b) {
var c, d = [],
e = 0,
f = b.getElementsByTagName(a);
if ("*" === a) {
while (c = f[e++]) 1 === c.nodeType && d.push(c);
return d
}
return f
}, d.find.CLASS = c.getElementsByClassName && function(a, b) {
return p ? b.getElementsByClassName(a) : void 0
}, r = [], q = [], (c.qsa = $.test(g.querySelectorAll)) && (jb(function(a) {
o.appendChild(a).innerHTML = "<a id='" + u + "'></a><select id='" + u + "-\f]' msallowcapture=''><option selected=''></option></select>", a.querySelectorAll("[msallowcapture^='']").length && q.push("[*^$]=" + L + "*(?:''|\"\")"), a.querySelectorAll("[selected]").length || q.push("\\[" + L + "*(?:value|" + K + ")"), a.querySelectorAll("[id~=" + u + "-]").length || q.push("~="), a.querySelectorAll(":checked").length || q.push(":checked"), a.querySelectorAll("a#" + u + "+*").length || q.push(".#.+[+~]")
}), jb(function(a) {
var b = g.createElement("input");
b.setAttribute("type", "hidden"), a.appendChild(b).setAttribute("name", "D"), a.querySelectorAll("[name=d]").length && q.push("name" + L + "*[*^$|!~]?="), a.querySelectorAll(":enabled").length || q.push(":enabled", ":disabled"), a.querySelectorAll("*,:x"), q.push(",.*:")
})), (c.matchesSelector = $.test(s = o.matches || o.webkitMatchesSelector || o.mozMatchesSelector || o.oMatchesSelector || o.msMatchesSelector)) && jb(function(a) {
c.disconnectedMatch = s.call(a, "div"), s.call(a, "[s!='']:x"), r.push("!=", P)
}), q = q.length && new RegExp(q.join("|")), r = r.length && new RegExp(r.join("|")), b = $.test(o.compareDocumentPosition), t = b || $.test(o.contains) ? function(a, b) {
var c = 9 === a.nodeType ? a.documentElement : a,
d = b && b.parentNode;
return a === d || !(!d || 1 !== d.nodeType || !(c.contains ? c.contains(d) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(d)))
} : function(a, b) {
if (b)
while (b = b.parentNode)
if (b === a) return !0;
return !1
}, B = b ? function(a, b) {
if (a === b) return l = !0, 0;
var d = !a.compareDocumentPosition - !b.compareDocumentPosition;
return d ? d : (d = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1, 1 & d || !c.sortDetached && b.compareDocumentPosition(a) === d ? a === g || a.ownerDocument === v && t(v, a) ? -1 : b === g || b.ownerDocument === v && t(v, b) ? 1 : k ? J(k, a) - J(k, b) : 0 : 4 & d ? -1 : 1)
} : function(a, b) {
if (a === b) return l = !0, 0;
var c, d = 0,
e = a.parentNode,
f = b.parentNode,
h = [a],
i = [b];
if (!e || !f) return a === g ? -1 : b === g ? 1 : e ? -1 : f ? 1 : k ? J(k, a) - J(k, b) : 0;
if (e === f) return lb(a, b);
c = a;
while (c = c.parentNode) h.unshift(c);
c = b;
while (c = c.parentNode) i.unshift(c);
while (h[d] === i[d]) d++;
return d ? lb(h[d], i[d]) : h[d] === v ? -1 : i[d] === v ? 1 : 0
}, g) : n
}, gb.matches = function(a, b) {
return gb(a, null, null, b)
}, gb.matchesSelector = function(a, b) {
if ((a.ownerDocument || a) !== n && m(a), b = b.replace(U, "='$1']"), !(!c.matchesSelector || !p || r && r.test(b) || q && q.test(b))) try {
var d = s.call(a, b);
if (d || c.disconnectedMatch || a.document && 11 !== a.document.nodeType) return d
} catch (e) {}
return gb(b, n, null, [a]).length > 0
}, gb.contains = function(a, b) {
return (a.ownerDocument || a) !== n && m(a), t(a, b)
}, gb.attr = function(a, b) {
(a.ownerDocument || a) !== n && m(a);
var e = d.attrHandle[b.toLowerCase()],
f = e && D.call(d.attrHandle, b.toLowerCase()) ? e(a, b, !p) : void 0;
return void 0 !== f ? f : c.attributes || !p ? a.getAttribute(b) : (f = a.getAttributeNode(b)) && f.specified ? f.value : null
}, gb.error = function(a) {
throw new Error("Syntax error, unrecognized expression: " + a)
}, gb.uniqueSort = function(a) {
var b, d = [],
e = 0,
f = 0;
if (l = !c.detectDuplicates, k = !c.sortStable && a.slice(0), a.sort(B), l) {
while (b = a[f++]) b === a[f] && (e = d.push(f));
while (e--) a.splice(d[e], 1)
}
return k = null, a
}, e = gb.getText = function(a) {
var b, c = "",
d = 0,
f = a.nodeType;
if (f) {
if (1 === f || 9 === f || 11 === f) {
if ("string" == typeof a.textContent) return a.textContent;
for (a = a.firstChild; a; a = a.nextSibling) c += e(a)
} else if (3 === f || 4 === f) return a.nodeValue
} else
while (b = a[d++]) c += e(b);
return c
}, d = gb.selectors = {
cacheLength: 50,
createPseudo: ib,
match: X,
attrHandle: {},
find: {},
relative: {
">": {
dir: "parentNode",
first: !0
},
" ": {
dir: "parentNode"
},
"+": {
dir: "previousSibling",
first: !0
},
"~": {
dir: "previousSibling"
}
},
preFilter: {
ATTR: function(a) {
return a[1] = a[1].replace(cb, db), a[3] = (a[3] || a[4] || a[5] || "").replace(cb, db), "~=" === a[2] && (a[3] = " " + a[3] + " "), a.slice(0, 4)
},
CHILD: function(a) {
return a[1] = a[1].toLowerCase(), "nth" === a[1].slice(0, 3) ? (a[3] || gb.error(a[0]), a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ("even" === a[3] || "odd" === a[3])), a[5] = +(a[7] + a[8] || "odd" === a[3])) : a[3] && gb.error(a[0]), a
},
PSEUDO: function(a) {
var b, c = !a[6] && a[2];
return X.CHILD.test(a[0]) ? null : (a[3] ? a[2] = a[4] || a[5] || "" : c && V.test(c) && (b = g(c, !0)) && (b = c.indexOf(")", c.length - b) - c.length) && (a[0] = a[0].slice(0, b), a[2] = c.slice(0, b)), a.slice(0, 3))
}
},
filter: {
TAG: function(a) {
var b = a.replace(cb, db).toLowerCase();
return "*" === a ? function() {
return !0
} : function(a) {
return a.nodeName && a.nodeName.toLowerCase() === b
}
},
CLASS: function(a) {
var b = y[a + " "];
return b || (b = new RegExp("(^|" + L + ")" + a + "(" + L + "|$)")) && y(a, function(a) {
return b.test("string" == typeof a.className && a.className || "undefined" != typeof a.getAttribute && a.getAttribute("class") || "")
})
},
ATTR: function(a, b, c) {
return function(d) {
var e = gb.attr(d, a);
return null == e ? "!=" === b : b ? (e += "", "=" === b ? e === c : "!=" === b ? e !== c : "^=" === b ? c && 0 === e.indexOf(c) : "*=" === b ? c && e.indexOf(c) > -1 : "$=" === b ? c && e.slice(-c.length) === c : "~=" === b ? (" " + e.replace(Q, " ") + " ").indexOf(c) > -1 : "|=" === b ? e === c || e.slice(0, c.length + 1) === c + "-" : !1) : !0
}
},
CHILD: function(a, b, c, d, e) {
var f = "nth" !== a.slice(0, 3),
g = "last" !== a.slice(-4),
h = "of-type" === b;
return 1 === d && 0 === e ? function(a) {
return !!a.parentNode
} : function(b, c, i) {
var j, k, l, m, n, o, p = f !== g ? "nextSibling" : "previousSibling",
q = b.parentNode,
r = h && b.nodeName.toLowerCase(),
s = !i && !h;
if (q) {
if (f) {
while (p) {
l = b;
while (l = l[p])
if (h ? l.nodeName.toLowerCase() === r : 1 === l.nodeType) return !1;
o = p = "only" === a && !o && "nextSibling"
}
return !0
}
if (o = [g ? q.firstChild : q.lastChild], g && s) {
k = q[u] || (q[u] = {}), j = k[a] || [], n = j[0] === w && j[1], m = j[0] === w && j[2], l = n && q.childNodes[n];
while (l = ++n && l && l[p] || (m = n = 0) || o.pop())
if (1 === l.nodeType && ++m && l === b) {
k[a] = [w, n, m];
break
}
} else if (s && (j = (b[u] || (b[u] = {}))[a]) && j[0] === w) m = j[1];
else
while (l = ++n && l && l[p] || (m = n = 0) || o.pop())
if ((h ? l.nodeName.toLowerCase() === r : 1 === l.nodeType) && ++m && (s && ((l[u] || (l[u] = {}))[a] = [w, m]), l === b)) break; return m -= e, m === d || m % d === 0 && m / d >= 0
}
}
},
PSEUDO: function(a, b) {
var c, e = d.pseudos[a] || d.setFilters[a.toLowerCase()] || gb.error("unsupported pseudo: " + a);
return e[u] ? e(b) : e.length > 1 ? (c = [a, a, "", b], d.setFilters.hasOwnProperty(a.toLowerCase()) ? ib(function(a, c) {
var d, f = e(a, b),
g = f.length;
while (g--) d = J(a, f[g]), a[d] = !(c[d] = f[g])
}) : function(a) {
return e(a, 0, c)
}) : e
}
},
pseudos: {
not: ib(function(a) {
var b = [],
c = [],
d = h(a.replace(R, "$1"));
return d[u] ? ib(function(a, b, c, e) {
var f, g = d(a, null, e, []),
h = a.length;
while (h--)(f = g[h]) && (a[h] = !(b[h] = f))
}) : function(a, e, f) {
return b[0] = a, d(b, null, f, c), b[0] = null, !c.pop()
}
}),
has: ib(function(a) {
return function(b) {
return gb(a, b).length > 0
}
}),
contains: ib(function(a) {
return a = a.replace(cb, db),
function(b) {
return (b.textContent || b.innerText || e(b)).indexOf(a) > -1
}
}),
lang: ib(function(a) {
return W.test(a || "") || gb.error("unsupported lang: " + a), a = a.replace(cb, db).toLowerCase(),
function(b) {
var c;
do
if (c = p ? b.lang : b.getAttribute("xml:lang") || b.getAttribute("lang")) return c = c.toLowerCase(), c === a || 0 === c.indexOf(a + "-");
while ((b = b.parentNode) && 1 === b.nodeType);
return !1
}
}),
target: function(b) {
var c = a.location && a.location.hash;
return c && c.slice(1) === b.id
},
root: function(a) {
return a === o
},
focus: function(a) {
return a === n.activeElement && (!n.hasFocus || n.hasFocus()) && !!(a.type || a.href || ~a.tabIndex)
},
enabled: function(a) {
return a.disabled === !1
},
disabled: function(a) {
return a.disabled === !0
},
checked: function(a) {
var b = a.nodeName.toLowerCase();
return "input" === b && !!a.checked || "option" === b && !!a.selected
},
selected: function(a) {
return a.parentNode && a.parentNode.selectedIndex, a.selected === !0
},
empty: function(a) {
for (a = a.firstChild; a; a = a.nextSibling)
if (a.nodeType < 6) return !1;
return !0
},
parent: function(a) {
return !d.pseudos.empty(a)
},
header: function(a) {
return Z.test(a.nodeName)
},
input: function(a) {
return Y.test(a.nodeName)
},
button: function(a) {
var b = a.nodeName.toLowerCase();
return "input" === b && "button" === a.type || "button" === b
},
text: function(a) {
var b;
return "input" === a.nodeName.toLowerCase() && "text" === a.type && (null == (b = a.getAttribute("type")) || "text" === b.toLowerCase())
},
first: ob(function() {
return [0]
}),
last: ob(function(a, b) {
return [b - 1]
}),
eq: ob(function(a, b, c) {
return [0 > c ? c + b : c]
}),
even: ob(function(a, b) {
for (var c = 0; b > c; c += 2) a.push(c);
return a
}),
odd: ob(function(a, b) {
for (var c = 1; b > c; c += 2) a.push(c);
return a
}),
lt: ob(function(a, b, c) {
for (var d = 0 > c ? c + b : c; --d >= 0;) a.push(d);
return a
}),
gt: ob(function(a, b, c) {
for (var d = 0 > c ? c + b : c; ++d < b;) a.push(d);
return a
})
}
}, d.pseudos.nth = d.pseudos.eq;
for (b in {
radio: !0,
checkbox: !0,
file: !0,
password: !0,
image: !0
}) d.pseudos[b] = mb(b);
for (b in {
submit: !0,
reset: !0
}) d.pseudos[b] = nb(b);
function qb() {}
qb.prototype = d.filters = d.pseudos, d.setFilters = new qb, g = gb.tokenize = function(a, b) {
var c, e, f, g, h, i, j, k = z[a + " "];
if (k) return b ? 0 : k.slice(0);
h = a, i = [], j = d.preFilter;
while (h) {
(!c || (e = S.exec(h))) && (e && (h = h.slice(e[0].length) || h), i.push(f = [])), c = !1, (e = T.exec(h)) && (c = e.shift(), f.push({
value: c,
type: e[0].replace(R, " ")
}), h = h.slice(c.length));
for (g in d.filter) !(e = X[g].exec(h)) || j[g] && !(e = j[g](e)) || (c = e.shift(), f.push({
value: c,
type: g,
matches: e
}), h = h.slice(c.length));
if (!c) break
}
return b ? h.length : h ? gb.error(a) : z(a, i).slice(0)
};
function rb(a) {
for (var b = 0, c = a.length, d = ""; c > b; b++) d += a[b].value;
return d
}
function sb(a, b, c) {
var d = b.dir,
e = c && "parentNode" === d,
f = x++;
return b.first ? function(b, c, f) {
while (b = b[d])
if (1 === b.nodeType || e) return a(b, c, f)
} : function(b, c, g) {
var h, i, j = [w, f];
if (g) {
while (b = b[d])
if ((1 === b.nodeType || e) && a(b, c, g)) return !0
} else
while (b = b[d])
if (1 === b.nodeType || e) {
if (i = b[u] || (b[u] = {}), (h = i[d]) && h[0] === w && h[1] === f) return j[2] = h[2];
if (i[d] = j, j[2] = a(b, c, g)) return !0
}
}
}
function tb(a) {
return a.length > 1 ? function(b, c, d) {
var e = a.length;
while (e--)
if (!a[e](b, c, d)) return !1;
return !0
} : a[0]
}
function ub(a, b, c) {
for (var d = 0, e = b.length; e > d; d++) gb(a, b[d], c);
return c
}
function vb(a, b, c, d, e) {
for (var f, g = [], h = 0, i = a.length, j = null != b; i > h; h++)(f = a[h]) && (!c || c(f, d, e)) && (g.push(f), j && b.push(h));
return g
}
function wb(a, b, c, d, e, f) {
return d && !d[u] && (d = wb(d)), e && !e[u] && (e = wb(e, f)), ib(function(f, g, h, i) {
var j, k, l, m = [],
n = [],
o = g.length,
p = f || ub(b || "*", h.nodeType ? [h] : h, []),
q = !a || !f && b ? p : vb(p, m, a, h, i),
r = c ? e || (f ? a : o || d) ? [] : g : q;
if (c && c(q, r, h, i), d) {
j = vb(r, n), d(j, [], h, i), k = j.length;
while (k--)(l = j[k]) && (r[n[k]] = !(q[n[k]] = l))
}
if (f) {
if (e || a) {
if (e) {
j = [], k = r.length;
while (k--)(l = r[k]) && j.push(q[k] = l);
e(null, r = [], j, i)
}
k = r.length;
while (k--)(l = r[k]) && (j = e ? J(f, l) : m[k]) > -1 && (f[j] = !(g[j] = l))
}
} else r = vb(r === g ? r.splice(o, r.length) : r), e ? e(null, g, r, i) : H.apply(g, r)
})
}
function xb(a) {
for (var b, c, e, f = a.length, g = d.relative[a[0].type], h = g || d.relative[" "], i = g ? 1 : 0, k = sb(function(a) {
return a === b
}, h, !0), l = sb(function(a) {
return J(b, a) > -1
}, h, !0), m = [function(a, c, d) {
var e = !g && (d || c !== j) || ((b = c).nodeType ? k(a, c, d) : l(a, c, d));
return b = null, e
}]; f > i; i++)
if (c = d.relative[a[i].type]) m = [sb(tb(m), c)];
else {
if (c = d.filter[a[i].type].apply(null, a[i].matches), c[u]) {
for (e = ++i; f > e; e++)
if (d.relative[a[e].type]) break;
return wb(i > 1 && tb(m), i > 1 && rb(a.slice(0, i - 1).concat({
value: " " === a[i - 2].type ? "*" : ""
})).replace(R, "$1"), c, e > i && xb(a.slice(i, e)), f > e && xb(a = a.slice(e)), f > e && rb(a))
}
m.push(c)
}
return tb(m)
}
function yb(a, b) {
var c = b.length > 0,
e = a.length > 0,
f = function(f, g, h, i, k) {
var l, m, o, p = 0,
q = "0",
r = f && [],
s = [],
t = j,
u = f || e && d.find.TAG("*", k),
v = w += null == t ? 1 : Math.random() || .1,
x = u.length;
for (k && (j = g !== n && g); q !== x && null != (l = u[q]); q++) {
if (e && l) {
m = 0;
while (o = a[m++])
if (o(l, g, h)) {
i.push(l);
break
}
k && (w = v)
}
c && ((l = !o && l) && p--, f && r.push(l))
}
if (p += q, c && q !== p) {
m = 0;
while (o = b[m++]) o(r, s, g, h);
if (f) {
if (p > 0)
while (q--) r[q] || s[q] || (s[q] = F.call(i));
s = vb(s)
}
H.apply(i, s), k && !f && s.length > 0 && p + b.length > 1 && gb.uniqueSort(i)
}
return k && (w = v, j = t), r
};
return c ? ib(f) : f
}
return h = gb.compile = function(a, b) {
var c, d = [],
e = [],
f = A[a + " "];
if (!f) {
b || (b = g(a)), c = b.length;
while (c--) f = xb(b[c]), f[u] ? d.push(f) : e.push(f);
f = A(a, yb(e, d)), f.selector = a
}
return f
}, i = gb.select = function(a, b, e, f) {
var i, j, k, l, m, n = "function" == typeof a && a,
o = !f && g(a = n.selector || a);
if (e = e || [], 1 === o.length) {
if (j = o[0] = o[0].slice(0), j.length > 2 && "ID" === (k = j[0]).type && c.getById && 9 === b.nodeType && p && d.relative[j[1].type]) {
if (b = (d.find.ID(k.matches[0].replace(cb, db), b) || [])[0], !b) return e;
n && (b = b.parentNode), a = a.slice(j.shift().value.length)
}
i = X.needsContext.test(a) ? 0 : j.length;
while (i--) {
if (k = j[i], d.relative[l = k.type]) break;
if ((m = d.find[l]) && (f = m(k.matches[0].replace(cb, db), ab.test(j[0].type) && pb(b.parentNode) || b))) {
if (j.splice(i, 1), a = f.length && rb(j), !a) return H.apply(e, f), e;
break
}
}
}
return (n || h(a, o))(f, b, !p, e, ab.test(a) && pb(b.parentNode) || b), e
}, c.sortStable = u.split("").sort(B).join("") === u, c.detectDuplicates = !!l, m(), c.sortDetached = jb(function(a) {
return 1 & a.compareDocumentPosition(n.createElement("div"))
}), jb(function(a) {
return a.innerHTML = "<a href='#'></a>", "#" === a.firstChild.getAttribute("href")
}) || kb("type|href|height|width", function(a, b, c) {
return c ? void 0 : a.getAttribute(b, "type" === b.toLowerCase() ? 1 : 2)
}), c.attributes && jb(function(a) {
return a.innerHTML = "<input/>", a.firstChild.setAttribute("value", ""), "" === a.firstChild.getAttribute("value")
}) || kb("value", function(a, b, c) {
return c || "input" !== a.nodeName.toLowerCase() ? void 0 : a.defaultValue
}), jb(function(a) {
return null == a.getAttribute("disabled")
}) || kb(K, function(a, b, c) {
var d;
return c ? void 0 : a[b] === !0 ? b.toLowerCase() : (d = a.getAttributeNode(b)) && d.specified ? d.value : null
}), gb
}(a);
n.find = t, n.expr = t.selectors, n.expr[":"] = n.expr.pseudos, n.unique = t.uniqueSort, n.text = t.getText, n.isXMLDoc = t.isXML, n.contains = t.contains;
var u = n.expr.match.needsContext,
v = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
w = /^.[^:#\[\.,]*$/;
function x(a, b, c) {
if (n.isFunction(b)) return n.grep(a, function(a, d) {
return !!b.call(a, d, a) !== c
});
if (b.nodeType) return n.grep(a, function(a) {
return a === b !== c
});
if ("string" == typeof b) {
if (w.test(b)) return n.filter(b, a, c);
b = n.filter(b, a)
}
return n.grep(a, function(a) {
return g.call(b, a) >= 0 !== c
})
}
n.filter = function(a, b, c) {
var d = b[0];
return c && (a = ":not(" + a + ")"), 1 === b.length && 1 === d.nodeType ? n.find.matchesSelector(d, a) ? [d] : [] : n.find.matches(a, n.grep(b, function(a) {
return 1 === a.nodeType
}))
}, n.fn.extend({
find: function(a) {
var b, c = this.length,
d = [],
e = this;
if ("string" != typeof a) return this.pushStack(n(a).filter(function() {
for (b = 0; c > b; b++)
if (n.contains(e[b], this)) return !0
}));
for (b = 0; c > b; b++) n.find(a, e[b], d);
return d = this.pushStack(c > 1 ? n.unique(d) : d), d.selector = this.selector ? this.selector + " " + a : a, d
},
filter: function(a) {
return this.pushStack(x(this, a || [], !1))
},
not: function(a) {
return this.pushStack(x(this, a || [], !0))
},
is: function(a) {
return !!x(this, "string" == typeof a && u.test(a) ? n(a) : a || [], !1).length
}
});
var y, z = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
A = n.fn.init = function(a, b) {
var c, d;
if (!a) return this;
if ("string" == typeof a) {
if (c = "<" === a[0] && ">" === a[a.length - 1] && a.length >= 3 ? [null, a, null] : z.exec(a), !c || !c[1] && b) return !b || b.jquery ? (b || y).find(a) : this.constructor(b).find(a);
if (c[1]) {
if (b = b instanceof n ? b[0] : b, n.merge(this, n.parseHTML(c[1], b && b.nodeType ? b.ownerDocument || b : l, !0)), v.test(c[1]) && n.isPlainObject(b))
for (c in b) n.isFunction(this[c]) ? this[c](b[c]) : this.attr(c, b[c]);
return this
}
return d = l.getElementById(c[2]), d && d.parentNode && (this.length = 1, this[0] = d), this.context = l, this.selector = a, this
}
return a.nodeType ? (this.context = this[0] = a, this.length = 1, this) : n.isFunction(a) ? "undefined" != typeof y.ready ? y.ready(a) : a(n) : (void 0 !== a.selector && (this.selector = a.selector, this.context = a.context), n.makeArray(a, this))
};
A.prototype = n.fn, y = n(l);
var B = /^(?:parents|prev(?:Until|All))/,
C = {
children: !0,
contents: !0,
next: !0,
prev: !0
};
n.extend({
dir: function(a, b, c) {
var d = [],
e = void 0 !== c;
while ((a = a[b]) && 9 !== a.nodeType)
if (1 === a.nodeType) {
if (e && n(a).is(c)) break;
d.push(a)
}
return d
},
sibling: function(a, b) {
for (var c = []; a; a = a.nextSibling) 1 === a.nodeType && a !== b && c.push(a);
return c
}
}), n.fn.extend({
has: function(a) {
var b = n(a, this),
c = b.length;
return this.filter(function() {
for (var a = 0; c > a; a++)
if (n.contains(this, b[a])) return !0
})
},
closest: function(a, b) {
for (var c, d = 0, e = this.length, f = [], g = u.test(a) || "string" != typeof a ? n(a, b || this.context) : 0; e > d; d++)
for (c = this[d]; c && c !== b; c = c.parentNode)
if (c.nodeType < 11 && (g ? g.index(c) > -1 : 1 === c.nodeType && n.find.matchesSelector(c, a))) {
f.push(c);
break
}
return this.pushStack(f.length > 1 ? n.unique(f) : f)
},
index: function(a) {
return a ? "string" == typeof a ? g.call(n(a), this[0]) : g.call(this, a.jquery ? a[0] : a) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
},
add: function(a, b) {
return this.pushStack(n.unique(n.merge(this.get(), n(a, b))))
},
addBack: function(a) {
return this.add(null == a ? this.prevObject : this.prevObject.filter(a))
}
});
function D(a, b) {
while ((a = a[b]) && 1 !== a.nodeType);
return a
}
n.each({
parent: function(a) {
var b = a.parentNode;
return b && 11 !== b.nodeType ? b : null
},
parents: function(a) {
return n.dir(a, "parentNode")
},
parentsUntil: function(a, b, c) {
return n.dir(a, "parentNode", c)
},
next: function(a) {
return D(a, "nextSibling")
},
prev: function(a) {
return D(a, "previousSibling")
},
nextAll: function(a) {
return n.dir(a, "nextSibling")
},
prevAll: function(a) {
return n.dir(a, "previousSibling")
},
nextUntil: function(a, b, c) {
return n.dir(a, "nextSibling", c)
},
prevUntil: function(a, b, c) {
return n.dir(a, "previousSibling", c)
},
siblings: function(a) {
return n.sibling((a.parentNode || {}).firstChild, a)
},
children: function(a) {
return n.sibling(a.firstChild)
},
contents: function(a) {
return a.contentDocument || n.merge([], a.childNodes)
}
}, function(a, b) {
n.fn[a] = function(c, d) {
var e = n.map(this, b, c);
return "Until" !== a.slice(-5) && (d = c), d && "string" == typeof d && (e = n.filter(d, e)), this.length > 1 && (C[a] || n.unique(e), B.test(a) && e.reverse()), this.pushStack(e)
}
});
var E = /\S+/g,
F = {};
function G(a) {
var b = F[a] = {};
return n.each(a.match(E) || [], function(a, c) {
b[c] = !0
}), b
}
n.Callbacks = function(a) {
a = "string" == typeof a ? F[a] || G(a) : n.extend({}, a);
var b, c, d, e, f, g, h = [],
i = !a.once && [],
j = function(l) {
for (b = a.memory && l, c = !0, g = e || 0, e = 0, f = h.length, d = !0; h && f > g; g++)
if (h[g].apply(l[0], l[1]) === !1 && a.stopOnFalse) {
b = !1;
break
}
d = !1, h && (i ? i.length && j(i.shift()) : b ? h = [] : k.disable())
},
k = {
add: function() {
if (h) {
var c = h.length;
! function g(b) {
n.each(b, function(b, c) {
var d = n.type(c);
"function" === d ? a.unique && k.has(c) || h.push(c) : c && c.length && "string" !== d && g(c)
})
}(arguments), d ? f = h.length : b && (e = c, j(b))
}
return this
},
remove: function() {
return h && n.each(arguments, function(a, b) {
var c;
while ((c = n.inArray(b, h, c)) > -1) h.splice(c, 1), d && (f >= c && f--, g >= c && g--)
}), this
},
has: function(a) {
return a ? n.inArray(a, h) > -1 : !(!h || !h.length)
},
empty: function() {
return h = [], f = 0, this
},
disable: function() {
return h = i = b = void 0, this
},
disabled: function() {
return !h
},
lock: function() {
return i = void 0, b || k.disable(), this
},
locked: function() {
return !i
},
fireWith: function(a, b) {
return !h || c && !i || (b = b || [], b = [a, b.slice ? b.slice() : b], d ? i.push(b) : j(b)), this
},
fire: function() {
return k.fireWith(this, arguments), this
},
fired: function() {
return !!c
}
};
return k
}, n.extend({
Deferred: function(a) {
var b = [
["resolve", "done", n.Callbacks("once memory"), "resolved"],
["reject", "fail", n.Callbacks("once memory"), "rejected"],
["notify", "progress", n.Callbacks("memory")]
],
c = "pending",
d = {
state: function() {
return c
},
always: function() {
return e.done(arguments).fail(arguments), this
},
then: function() {
var a = arguments;
return n.Deferred(function(c) {
n.each(b, function(b, f) {
var g = n.isFunction(a[b]) && a[b];
e[f[1]](function() {
var a = g && g.apply(this, arguments);
a && n.isFunction(a.promise) ? a.promise().done(c.resolve).fail(c.reject).progress(c.notify) : c[f[0] + "With"](this === d ? c.promise() : this, g ? [a] : arguments)
})
}), a = null
}).promise()
},
promise: function(a) {
return null != a ? n.extend(a, d) : d
}
},
e = {};
return d.pipe = d.then, n.each(b, function(a, f) {
var g = f[2],
h = f[3];
d[f[1]] = g.add, h && g.add(function() {
c = h
}, b[1 ^ a][2].disable, b[2][2].lock), e[f[0]] = function() {
return e[f[0] + "With"](this === e ? d : this, arguments), this
}, e[f[0] + "With"] = g.fireWith
}), d.promise(e), a && a.call(e, e), e
},
when: function(a) {
var b = 0,
c = d.call(arguments),
e = c.length,
f = 1 !== e || a && n.isFunction(a.promise) ? e : 0,
g = 1 === f ? a : n.Deferred(),
h = function(a, b, c) {
return function(e) {
b[a] = this, c[a] = arguments.length > 1 ? d.call(arguments) : e, c === i ? g.notifyWith(b, c) : --f || g.resolveWith(b, c)
}
},
i, j, k;
if (e > 1)
for (i = new Array(e), j = new Array(e), k = new Array(e); e > b; b++) c[b] && n.isFunction(c[b].promise) ? c[b].promise().done(h(b, k, c)).fail(g.reject).progress(h(b, j, i)) : --f;
return f || g.resolveWith(k, c), g.promise()
}
});
var H;
n.fn.ready = function(a) {
return n.ready.promise().done(a), this
}, n.extend({
isReady: !1,
readyWait: 1,
holdReady: function(a) {
a ? n.readyWait++ : n.ready(!0)
},
ready: function(a) {
(a === !0 ? --n.readyWait : n.isReady) || (n.isReady = !0, a !== !0 && --n.readyWait > 0 || (H.resolveWith(l, [n]), n.fn.triggerHandler && (n(l).triggerHandler("ready"), n(l).off("ready"))))
}
});
function I() {
l.removeEventListener("DOMContentLoaded", I, !1), a.removeEventListener("load", I, !1), n.ready()
}
n.ready.promise = function(b) {
return H || (H = n.Deferred(), "complete" === l.readyState ? setTimeout(n.ready) : (l.addEventListener("DOMContentLoaded", I, !1), a.addEventListener("load", I, !1))), H.promise(b)
}, n.ready.promise();
var J = n.access = function(a, b, c, d, e, f, g) {
var h = 0,
i = a.length,
j = null == c;
if ("object" === n.type(c)) {
e = !0;
for (h in c) n.access(a, b, h, c[h], !0, f, g)
} else if (void 0 !== d && (e = !0, n.isFunction(d) || (g = !0), j && (g ? (b.call(a, d), b = null) : (j = b, b = function(a, b, c) {
return j.call(n(a), c)
})), b))
for (; i > h; h++) b(a[h], c, g ? d : d.call(a[h], h, b(a[h], c)));
return e ? a : j ? b.call(a) : i ? b(a[0], c) : f
};
n.acceptData = function(a) {
return 1 === a.nodeType || 9 === a.nodeType || !+a.nodeType
};
function K() {
Object.defineProperty(this.cache = {}, 0, {
get: function() {
return {}
}
}), this.expando = n.expando + K.uid++
}
K.uid = 1, K.accepts = n.acceptData, K.prototype = {
key: function(a) {
if (!K.accepts(a)) return 0;
var b = {},
c = a[this.expando];
if (!c) {
c = K.uid++;
try {
b[this.expando] = {
value: c
}, Object.defineProperties(a, b)
} catch (d) {
b[this.expando] = c, n.extend(a, b)
}
}
return this.cache[c] || (this.cache[c] = {}), c
},
set: function(a, b, c) {
var d, e = this.key(a),
f = this.cache[e];
if ("string" == typeof b) f[b] = c;
else if (n.isEmptyObject(f)) n.extend(this.cache[e], b);
else
for (d in b) f[d] = b[d];
return f
},
get: function(a, b) {
var c = this.cache[this.key(a)];
return void 0 === b ? c : c[b]
},
access: function(a, b, c) {
var d;
return void 0 === b || b && "string" == typeof b && void 0 === c ? (d = this.get(a, b), void 0 !== d ? d : this.get(a, n.camelCase(b))) : (this.set(a, b, c), void 0 !== c ? c : b)
},
remove: function(a, b) {
var c, d, e, f = this.key(a),
g = this.cache[f];
if (void 0 === b) this.cache[f] = {};
else {
n.isArray(b) ? d = b.concat(b.map(n.camelCase)) : (e = n.camelCase(b), b in g ? d = [b, e] : (d = e, d = d in g ? [d] : d.match(E) || [])), c = d.length;
while (c--) delete g[d[c]]
}
},
hasData: function(a) {
return !n.isEmptyObject(this.cache[a[this.expando]] || {})
},
discard: function(a) {
a[this.expando] && delete this.cache[a[this.expando]]
}
};
var L = new K,
M = new K,
N = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
O = /([A-Z])/g;
function P(a, b, c) {
var d;
if (void 0 === c && 1 === a.nodeType)
if (d = "data-" + b.replace(O, "-$1").toLowerCase(), c = a.getAttribute(d), "string" == typeof c) {
try {
c = "true" === c ? !0 : "false" === c ? !1 : "null" === c ? null : +c + "" === c ? +c : N.test(c) ? n.parseJSON(c) : c
} catch (e) {}
M.set(a, b, c)
} else c = void 0;
return c
}
n.extend({
hasData: function(a) {
return M.hasData(a) || L.hasData(a)
},
data: function(a, b, c) {
return M.access(a, b, c)
},
removeData: function(a, b) {
M.remove(a, b)
},
_data: function(a, b, c) {
return L.access(a, b, c)
},
_removeData: function(a, b) {
L.remove(a, b)
}
}), n.fn.extend({
data: function(a, b) {
var c, d, e, f = this[0],
g = f && f.attributes;
if (void 0 === a) {
if (this.length && (e = M.get(f), 1 === f.nodeType && !L.get(f, "hasDataAttrs"))) {
c = g.length;
while (c--) g[c] && (d = g[c].name, 0 === d.indexOf("data-") && (d = n.camelCase(d.slice(5)), P(f, d, e[d])));
L.set(f, "hasDataAttrs", !0)
}
return e
}
return "object" == typeof a ? this.each(function() {
M.set(this, a)
}) : J(this, function(b) {
var c, d = n.camelCase(a);
if (f && void 0 === b) {
if (c = M.get(f, a), void 0 !== c) return c;
if (c = M.get(f, d), void 0 !== c) return c;
if (c = P(f, d, void 0), void 0 !== c) return c
} else this.each(function() {
var c = M.get(this, d);
M.set(this, d, b), -1 !== a.indexOf("-") && void 0 !== c && M.set(this, a, b)
})
}, null, b, arguments.length > 1, null, !0)
},
removeData: function(a) {
return this.each(function() {
M.remove(this, a)
})
}
}), n.extend({
queue: function(a, b, c) {
var d;
return a ? (b = (b || "fx") + "queue", d = L.get(a, b), c && (!d || n.isArray(c) ? d = L.access(a, b, n.makeArray(c)) : d.push(c)), d || []) : void 0
},
dequeue: function(a, b) {
b = b || "fx";
var c = n.queue(a, b),
d = c.length,
e = c.shift(),
f = n._queueHooks(a, b),
g = function() {
n.dequeue(a, b)
};
"inprogress" === e && (e = c.shift(), d--), e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire()
},
_queueHooks: function(a, b) {
var c = b + "queueHooks";
return L.get(a, c) || L.access(a, c, {
empty: n.Callbacks("once memory").add(function() {
L.remove(a, [b + "queue", c])
})
})
}
}), n.fn.extend({
queue: function(a, b) {
var c = 2;
return "string" != typeof a && (b = a, a = "fx", c--), arguments.length < c ? n.queue(this[0], a) : void 0 === b ? this : this.each(function() {
var c = n.queue(this, a, b);
n._queueHooks(this, a), "fx" === a && "inprogress" !== c[0] && n.dequeue(this, a)
})
},
dequeue: function(a) {
return this.each(function() {
n.dequeue(this, a)
})
},
clearQueue: function(a) {
return this.queue(a || "fx", [])
},
promise: function(a, b) {
var c, d = 1,
e = n.Deferred(),
f = this,
g = this.length,
h = function() {
--d || e.resolveWith(f, [f])
};
"string" != typeof a && (b = a, a = void 0), a = a || "fx";
while (g--) c = L.get(f[g], a + "queueHooks"), c && c.empty && (d++, c.empty.add(h));
return h(), e.promise(b)
}
});
var Q = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
R = ["Top", "Right", "Bottom", "Left"],
S = function(a, b) {
return a = b || a, "none" === n.css(a, "display") || !n.contains(a.ownerDocument, a)
},
T = /^(?:checkbox|radio)$/i;
! function() {
var a = l.createDocumentFragment(),
b = a.appendChild(l.createElement("div")),
c = l.createElement("input");
c.setAttribute("type", "radio"), c.setAttribute("checked", "checked"), c.setAttribute("name", "t"), b.appendChild(c), k.checkClone = b.cloneNode(!0).cloneNode(!0).lastChild.checked, b.innerHTML = "<textarea>x</textarea>", k.noCloneChecked = !!b.cloneNode(!0).lastChild.defaultValue
}();
var U = "undefined";
k.focusinBubbles = "onfocusin" in a;
var V = /^key/,
W = /^(?:mouse|pointer|contextmenu)|click/,
X = /^(?:focusinfocus|focusoutblur)$/,
Y = /^([^.]*)(?:\.(.+)|)$/;
function Z() {
return !0
}
function $() {
return !1
}
function _() {
try {
return l.activeElement
} catch (a) {}
}
n.event = {
global: {},
add: function(a, b, c, d, e) {
var f, g, h, i, j, k, l, m, o, p, q, r = L.get(a);
if (r) {
c.handler && (f = c, c = f.handler, e = f.selector), c.guid || (c.guid = n.guid++), (i = r.events) || (i = r.events = {}), (g = r.handle) || (g = r.handle = function(b) {
return typeof n !== U && n.event.triggered !== b.type ? n.event.dispatch.apply(a, arguments) : void 0
}), b = (b || "").match(E) || [""], j = b.length;
while (j--) h = Y.exec(b[j]) || [], o = q = h[1], p = (h[2] || "").split(".").sort(), o && (l = n.event.special[o] || {}, o = (e ? l.delegateType : l.bindType) || o, l = n.event.special[o] || {}, k = n.extend({
type: o,
origType: q,
data: d,
handler: c,
guid: c.guid,
selector: e,
needsContext: e && n.expr.match.needsContext.test(e),
namespace: p.join(".")
}, f), (m = i[o]) || (m = i[o] = [], m.delegateCount = 0, l.setup && l.setup.call(a, d, p, g) !== !1 || a.addEventListener && a.addEventListener(o, g, !1)), l.add && (l.add.call(a, k), k.handler.guid || (k.handler.guid = c.guid)), e ? m.splice(m.delegateCount++, 0, k) : m.push(k), n.event.global[o] = !0)
}
},
remove: function(a, b, c, d, e) {
var f, g, h, i, j, k, l, m, o, p, q, r = L.hasData(a) && L.get(a);
if (r && (i = r.events)) {
b = (b || "").match(E) || [""], j = b.length;
while (j--)
if (h = Y.exec(b[j]) || [], o = q = h[1], p = (h[2] || "").split(".").sort(), o) {
l = n.event.special[o] || {}, o = (d ? l.delegateType : l.bindType) || o, m = i[o] || [], h = h[2] && new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)"), g = f = m.length;
while (f--) k = m[f], !e && q !== k.origType || c && c.guid !== k.guid || h && !h.test(k.namespace) || d && d !== k.selector && ("**" !== d || !k.selector) || (m.splice(f, 1), k.selector && m.delegateCount--, l.remove && l.remove.call(a, k));
g && !m.length && (l.teardown && l.teardown.call(a, p, r.handle) !== !1 || n.removeEvent(a, o, r.handle), delete i[o])
} else
for (o in i) n.event.remove(a, o + b[j], c, d, !0);
n.isEmptyObject(i) && (delete r.handle, L.remove(a, "events"))
}
},
trigger: function(b, c, d, e) {
var f, g, h, i, k, m, o, p = [d || l],
q = j.call(b, "type") ? b.type : b,
r = j.call(b, "namespace") ? b.namespace.split(".") : [];
if (g = h = d = d || l, 3 !== d.nodeType && 8 !== d.nodeType && !X.test(q + n.event.triggered) && (q.indexOf(".") >= 0 && (r = q.split("."), q = r.shift(), r.sort()), k = q.indexOf(":") < 0 && "on" + q, b = b[n.expando] ? b : new n.Event(q, "object" == typeof b && b), b.isTrigger = e ? 2 : 3, b.namespace = r.join("."), b.namespace_re = b.namespace ? new RegExp("(^|\\.)" + r.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, b.result = void 0, b.target || (b.target = d), c = null == c ? [b] : n.makeArray(c, [b]), o = n.event.special[q] || {}, e || !o.trigger || o.trigger.apply(d, c) !== !1)) {
if (!e && !o.noBubble && !n.isWindow(d)) {
for (i = o.delegateType || q, X.test(i + q) || (g = g.parentNode); g; g = g.parentNode) p.push(g), h = g;
h === (d.ownerDocument || l) && p.push(h.defaultView || h.parentWindow || a)
}
f = 0;
while ((g = p[f++]) && !b.isPropagationStopped()) b.type = f > 1 ? i : o.bindType || q, m = (L.get(g, "events") || {})[b.type] && L.get(g, "handle"), m && m.apply(g, c), m = k && g[k], m && m.apply && n.acceptData(g) && (b.result = m.apply(g, c), b.result === !1 && b.preventDefault());
return b.type = q, e || b.isDefaultPrevented() || o._default && o._default.apply(p.pop(), c) !== !1 || !n.acceptData(d) || k && n.isFunction(d[q]) && !n.isWindow(d) && (h = d[k], h && (d[k] = null), n.event.triggered = q, d[q](), n.event.triggered = void 0, h && (d[k] = h)), b.result
}
},
dispatch: function(a) {
a = n.event.fix(a);
var b, c, e, f, g, h = [],
i = d.call(arguments),
j = (L.get(this, "events") || {})[a.type] || [],
k = n.event.special[a.type] || {};
if (i[0] = a, a.delegateTarget = this, !k.preDispatch || k.preDispatch.call(this, a) !== !1) {
h = n.event.handlers.call(this, a, j), b = 0;
while ((f = h[b++]) && !a.isPropagationStopped()) {
a.currentTarget = f.elem, c = 0;
while ((g = f.handlers[c++]) && !a.isImmediatePropagationStopped())(!a.namespace_re || a.namespace_re.test(g.namespace)) && (a.handleObj = g, a.data = g.data, e = ((n.event.special[g.origType] || {}).handle || g.handler).apply(f.elem, i), void 0 !== e && (a.result = e) === !1 && (a.preventDefault(), a.stopPropagation()))
}
return k.postDispatch && k.postDispatch.call(this, a), a.result
}
},
handlers: function(a, b) {
var c, d, e, f, g = [],
h = b.delegateCount,
i = a.target;
if (h && i.nodeType && (!a.button || "click" !== a.type))
for (; i !== this; i = i.parentNode || this)
if (i.disabled !== !0 || "click" !== a.type) {
for (d = [], c = 0; h > c; c++) f = b[c], e = f.selector + " ", void 0 === d[e] && (d[e] = f.needsContext ? n(e, this).index(i) >= 0 : n.find(e, this, null, [i]).length), d[e] && d.push(f);
d.length && g.push({
elem: i,
handlers: d
})
}
return h < b.length && g.push({
elem: this,
handlers: b.slice(h)
}), g
},
props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function(a, b) {
return null == a.which && (a.which = null != b.charCode ? b.charCode : b.keyCode), a
}
},
mouseHooks: {
props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function(a, b) {
var c, d, e, f = b.button;
return null == a.pageX && null != b.clientX && (c = a.target.ownerDocument || l, d = c.documentElement, e = c.body, a.pageX = b.clientX + (d && d.scrollLeft || e && e.scrollLeft || 0) - (d && d.clientLeft || e && e.clientLeft || 0), a.pageY = b.clientY + (d && d.scrollTop || e && e.scrollTop || 0) - (d && d.clientTop || e && e.clientTop || 0)), a.which || void 0 === f || (a.which = 1 & f ? 1 : 2 & f ? 3 : 4 & f ? 2 : 0), a
}
},
fix: function(a) {
if (a[n.expando]) return a;
var b, c, d, e = a.type,
f = a,
g = this.fixHooks[e];
g || (this.fixHooks[e] = g = W.test(e) ? this.mouseHooks : V.test(e) ? this.keyHooks : {}), d = g.props ? this.props.concat(g.props) : this.props, a = new n.Event(f), b = d.length;
while (b--) c = d[b], a[c] = f[c];
return a.target || (a.target = l), 3 === a.target.nodeType && (a.target = a.target.parentNode), g.filter ? g.filter(a, f) : a
},
special: {
load: {
noBubble: !0
},
focus: {
trigger: function() {
return this !== _() && this.focus ? (this.focus(), !1) : void 0
},
delegateType: "focusin"
},
blur: {
trigger: function() {
return this === _() && this.blur ? (this.blur(), !1) : void 0
},
delegateType: "focusout"
},
click: {
trigger: function() {
return "checkbox" === this.type && this.click && n.nodeName(this, "input") ? (this.click(), !1) : void 0
},
_default: function(a) {
return n.nodeName(a.target, "a")
}
},
beforeunload: {
postDispatch: function(a) {
void 0 !== a.result && a.originalEvent && (a.originalEvent.returnValue = a.result)
}
}
},
simulate: function(a, b, c, d) {
var e = n.extend(new n.Event, c, {
type: a,
isSimulated: !0,
originalEvent: {}
});
d ? n.event.trigger(e, null, b) : n.event.dispatch.call(b, e), e.isDefaultPrevented() && c.preventDefault()
}
}, n.removeEvent = function(a, b, c) {
a.removeEventListener && a.removeEventListener(b, c, !1)
}, n.Event = function(a, b) {
return this instanceof n.Event ? (a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || void 0 === a.defaultPrevented && a.returnValue === !1 ? Z : $) : this.type = a, b && n.extend(this, b), this.timeStamp = a && a.timeStamp || n.now(), void(this[n.expando] = !0)) : new n.Event(a, b)
}, n.Event.prototype = {
isDefaultPrevented: $,
isPropagationStopped: $,
isImmediatePropagationStopped: $,
preventDefault: function() {
var a = this.originalEvent;
this.isDefaultPrevented = Z, a && a.preventDefault && a.preventDefault()
},
stopPropagation: function() {
var a = this.originalEvent;
this.isPropagationStopped = Z, a && a.stopPropagation && a.stopPropagation()
},
stopImmediatePropagation: function() {
var a = this.originalEvent;
this.isImmediatePropagationStopped = Z, a && a.stopImmediatePropagation && a.stopImmediatePropagation(), this.stopPropagation()
}
}, n.each({
mouseenter: "mouseover",
mouseleave: "mouseout",
pointerenter: "pointerover",
pointerleave: "pointerout"
}, function(a, b) {
n.event.special[a] = {
delegateType: b,
bindType: b,
handle: function(a) {
var c, d = this,
e = a.relatedTarget,
f = a.handleObj;
return (!e || e !== d && !n.contains(d, e)) && (a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b), c
}
}
}), k.focusinBubbles || n.each({
focus: "focusin",
blur: "focusout"
}, function(a, b) {
var c = function(a) {
n.event.simulate(b, a.target, n.event.fix(a), !0)
};
n.event.special[b] = {
setup: function() {
var d = this.ownerDocument || this,
e = L.access(d, b);
e || d.addEventListener(a, c, !0), L.access(d, b, (e || 0) + 1)
},
teardown: function() {
var d = this.ownerDocument || this,
e = L.access(d, b) - 1;
e ? L.access(d, b, e) : (d.removeEventListener(a, c, !0), L.remove(d, b))
}
}
}), n.fn.extend({
on: function(a, b, c, d, e) {
var f, g;
if ("object" == typeof a) {
"string" != typeof b && (c = c || b, b = void 0);
for (g in a) this.on(g, b, c, a[g], e);
return this
}
if (null == c && null == d ? (d = b, c = b = void 0) : null == d && ("string" == typeof b ? (d = c, c = void 0) : (d = c, c = b, b = void 0)), d === !1) d = $;
else if (!d) return this;
return 1 === e && (f = d, d = function(a) {
return n().off(a), f.apply(this, arguments)
}, d.guid = f.guid || (f.guid = n.guid++)), this.each(function() {
n.event.add(this, a, d, c, b)
})
},
one: function(a, b, c, d) {
return this.on(a, b, c, d, 1)
},
off: function(a, b, c) {
var d, e;
if (a && a.preventDefault && a.handleObj) return d = a.handleObj, n(a.delegateTarget).off(d.namespace ? d.origType + "." + d.namespace : d.origType, d.selector, d.handler), this;
if ("object" == typeof a) {
for (e in a) this.off(e, b, a[e]);
return this
}
return (b === !1 || "function" == typeof b) && (c = b, b = void 0), c === !1 && (c = $), this.each(function() {
n.event.remove(this, a, c, b)
})
},
trigger: function(a, b) {
return this.each(function() {
n.event.trigger(a, b, this)
})
},
triggerHandler: function(a, b) {
var c = this[0];
return c ? n.event.trigger(a, b, c, !0) : void 0
}
});
var ab = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
bb = /<([\w:]+)/,
cb = /<|&#?\w+;/,
db = /<(?:script|style|link)/i,
eb = /checked\s*(?:[^=]|=\s*.checked.)/i,
fb = /^$|\/(?:java|ecma)script/i,
gb = /^true\/(.*)/,
hb = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
ib = {
option: [1, "<select multiple='multiple'>", "</select>"],
thead: [1, "<table>", "</table>"],
col: [2, "<table><colgroup>", "</colgroup></table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
_default: [0, "", ""]
};
ib.optgroup = ib.option, ib.tbody = ib.tfoot = ib.colgroup = ib.caption = ib.thead, ib.th = ib.td;
function jb(a, b) {
return n.nodeName(a, "table") && n.nodeName(11 !== b.nodeType ? b : b.firstChild, "tr") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a
}
function kb(a) {
return a.type = (null !== a.getAttribute("type")) + "/" + a.type, a
}
function lb(a) {
var b = gb.exec(a.type);
return b ? a.type = b[1] : a.removeAttribute("type"), a
}
function mb(a, b) {
for (var c = 0, d = a.length; d > c; c++) L.set(a[c], "globalEval", !b || L.get(b[c], "globalEval"))
}
function nb(a, b) {
var c, d, e, f, g, h, i, j;
if (1 === b.nodeType) {
if (L.hasData(a) && (f = L.access(a), g = L.set(b, f), j = f.events)) {
delete g.handle, g.events = {};
for (e in j)
for (c = 0, d = j[e].length; d > c; c++) n.event.add(b, e, j[e][c])
}
M.hasData(a) && (h = M.access(a), i = n.extend({}, h), M.set(b, i))
}
}
function ob(a, b) {
var c = a.getElementsByTagName ? a.getElementsByTagName(b || "*") : a.querySelectorAll ? a.querySelectorAll(b || "*") : [];
return void 0 === b || b && n.nodeName(a, b) ? n.merge([a], c) : c
}
function pb(a, b) {
var c = b.nodeName.toLowerCase();
"input" === c && T.test(a.type) ? b.checked = a.checked : ("input" === c || "textarea" === c) && (b.defaultValue = a.defaultValue)
}
n.extend({
clone: function(a, b, c) {
var d, e, f, g, h = a.cloneNode(!0),
i = n.contains(a.ownerDocument, a);
if (!(k.noCloneChecked || 1 !== a.nodeType && 11 !== a.nodeType || n.isXMLDoc(a)))
for (g = ob(h), f = ob(a), d = 0, e = f.length; e > d; d++) pb(f[d], g[d]);
if (b)
if (c)
for (f = f || ob(a), g = g || ob(h), d = 0, e = f.length; e > d; d++) nb(f[d], g[d]);
else nb(a, h);
return g = ob(h, "script"), g.length > 0 && mb(g, !i && ob(a, "script")), h
},
buildFragment: function(a, b, c, d) {
for (var e, f, g, h, i, j, k = b.createDocumentFragment(), l = [], m = 0, o = a.length; o > m; m++)
if (e = a[m], e || 0 === e)
if ("object" === n.type(e)) n.merge(l, e.nodeType ? [e] : e);
else if (cb.test(e)) {
f = f || k.appendChild(b.createElement("div")), g = (bb.exec(e) || ["", ""])[1].toLowerCase(), h = ib[g] || ib._default, f.innerHTML = h[1] + e.replace(ab, "<$1></$2>") + h[2], j = h[0];
while (j--) f = f.lastChild;
n.merge(l, f.childNodes), f = k.firstChild, f.textContent = ""
} else l.push(b.createTextNode(e));
k.textContent = "", m = 0;
while (e = l[m++])
if ((!d || -1 === n.inArray(e, d)) && (i = n.contains(e.ownerDocument, e), f = ob(k.appendChild(e), "script"), i && mb(f), c)) {
j = 0;
while (e = f[j++]) fb.test(e.type || "") && c.push(e)
}
return k
},
cleanData: function(a) {
for (var b, c, d, e, f = n.event.special, g = 0; void 0 !== (c = a[g]); g++) {
if (n.acceptData(c) && (e = c[L.expando], e && (b = L.cache[e]))) {
if (b.events)
for (d in b.events) f[d] ? n.event.remove(c, d) : n.removeEvent(c, d, b.handle);
L.cache[e] && delete L.cache[e]
}
delete M.cache[c[M.expando]]
}
}
}), n.fn.extend({
text: function(a) {
return J(this, function(a) {
return void 0 === a ? n.text(this) : this.empty().each(function() {
(1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) && (this.textContent = a)
})
}, null, a, arguments.length)
},
append: function() {
return this.domManip(arguments, function(a) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var b = jb(this, a);
b.appendChild(a)
}
})
},
prepend: function() {
return this.domManip(arguments, function(a) {
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
var b = jb(this, a);
b.insertBefore(a, b.firstChild)
}
})
},
before: function() {
return this.domManip(arguments, function(a) {
this.parentNode && this.parentNode.insertBefore(a, this)
})
},
after: function() {
return this.domManip(arguments, function(a) {
this.parentNode && this.parentNode.insertBefore(a, this.nextSibling)
})
},
remove: function(a, b) {
for (var c, d = a ? n.filter(a, this) : this, e = 0; null != (c = d[e]); e++) b || 1 !== c.nodeType || n.cleanData(ob(c)), c.parentNode && (b && n.contains(c.ownerDocument, c) && mb(ob(c, "script")), c.parentNode.removeChild(c));
return this
},
empty: function() {
for (var a, b = 0; null != (a = this[b]); b++) 1 === a.nodeType && (n.cleanData(ob(a, !1)), a.textContent = "");
return this
},
clone: function(a, b) {
return a = null == a ? !1 : a, b = null == b ? a : b, this.map(function() {
return n.clone(this, a, b)
})
},
html: function(a) {
return J(this, function(a) {
var b = this[0] || {},
c = 0,
d = this.length;
if (void 0 === a && 1 === b.nodeType) return b.innerHTML;
if ("string" == typeof a && !db.test(a) && !ib[(bb.exec(a) || ["", ""])[1].toLowerCase()]) {
a = a.replace(ab, "<$1></$2>");
try {
for (; d > c; c++) b = this[c] || {}, 1 === b.nodeType && (n.cleanData(ob(b, !1)), b.innerHTML = a);
b = 0
} catch (e) {}
}
b && this.empty().append(a)
}, null, a, arguments.length)
},
replaceWith: function() {
var a = arguments[0];
return this.domManip(arguments, function(b) {
a = this.parentNode, n.cleanData(ob(this)), a && a.replaceChild(b, this)
}), a && (a.length || a.nodeType) ? this : this.remove()
},
detach: function(a) {
return this.remove(a, !0)
},
domManip: function(a, b) {
a = e.apply([], a);
var c, d, f, g, h, i, j = 0,
l = this.length,
m = this,
o = l - 1,
p = a[0],
q = n.isFunction(p);
if (q || l > 1 && "string" == typeof p && !k.checkClone && eb.test(p)) return this.each(function(c) {
var d = m.eq(c);
q && (a[0] = p.call(this, c, d.html())), d.domManip(a, b)
});
if (l && (c = n.buildFragment(a, this[0].ownerDocument, !1, this), d = c.firstChild, 1 === c.childNodes.length && (c = d), d)) {
for (f = n.map(ob(c, "script"), kb), g = f.length; l > j; j++) h = c, j !== o && (h = n.clone(h, !0, !0), g && n.merge(f, ob(h, "script"))), b.call(this[j], h, j);
if (g)
for (i = f[f.length - 1].ownerDocument, n.map(f, lb), j = 0; g > j; j++) h = f[j], fb.test(h.type || "") && !L.access(h, "globalEval") && n.contains(i, h) && (h.src ? n._evalUrl && n._evalUrl(h.src) : n.globalEval(h.textContent.replace(hb, "")))
}
return this
}
}), n.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function(a, b) {
n.fn[a] = function(a) {
for (var c, d = [], e = n(a), g = e.length - 1, h = 0; g >= h; h++) c = h === g ? this : this.clone(!0), n(e[h])[b](c), f.apply(d, c.get());
return this.pushStack(d)
}
});
var qb, rb = {};
function sb(b, c) {
var d, e = n(c.createElement(b)).appendTo(c.body),
f = a.getDefaultComputedStyle && (d = a.getDefaultComputedStyle(e[0])) ? d.display : n.css(e[0], "display");
return e.detach(), f
}
function tb(a) {
var b = l,
c = rb[a];
return c || (c = sb(a, b), "none" !== c && c || (qb = (qb || n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement), b = qb[0].contentDocument, b.write(), b.close(), c = sb(a, b), qb.detach()), rb[a] = c), c
}
var ub = /^margin/,
vb = new RegExp("^(" + Q + ")(?!px)[a-z%]+$", "i"),
wb = function(b) {
return b.ownerDocument.defaultView.opener ? b.ownerDocument.defaultView.getComputedStyle(b, null) : a.getComputedStyle(b, null)
};
function xb(a, b, c) {
var d, e, f, g, h = a.style;
return c = c || wb(a), c && (g = c.getPropertyValue(b) || c[b]), c && ("" !== g || n.contains(a.ownerDocument, a) || (g = n.style(a, b)), vb.test(g) && ub.test(b) && (d = h.width, e = h.minWidth, f = h.maxWidth, h.minWidth = h.maxWidth = h.width = g, g = c.width, h.width = d, h.minWidth = e, h.maxWidth = f)), void 0 !== g ? g + "" : g
}
function yb(a, b) {
return {
get: function() {
return a() ? void delete this.get : (this.get = b).apply(this, arguments)
}
}
}! function() {
var b, c, d = l.documentElement,
e = l.createElement("div"),
f = l.createElement("div");
if (f.style) {
f.style.backgroundClip = "content-box", f.cloneNode(!0).style.backgroundClip = "", k.clearCloneStyle = "content-box" === f.style.backgroundClip, e.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute", e.appendChild(f);
function g() {
f.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute", f.innerHTML = "", d.appendChild(e);
var g = a.getComputedStyle(f, null);
b = "1%" !== g.top, c = "4px" === g.width, d.removeChild(e)
}
a.getComputedStyle && n.extend(k, {
pixelPosition: function() {
return g(), b
},
boxSizingReliable: function() {
return null == c && g(), c
},
reliableMarginRight: function() {
var b, c = f.appendChild(l.createElement("div"));
return c.style.cssText = f.style.cssText = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0", c.style.marginRight = c.style.width = "0", f.style.width = "1px", d.appendChild(e), b = !parseFloat(a.getComputedStyle(c, null).marginRight), d.removeChild(e), f.removeChild(c), b
}
})
}
}(), n.swap = function(a, b, c, d) {
var e, f, g = {};
for (f in b) g[f] = a.style[f], a.style[f] = b[f];
e = c.apply(a, d || []);
for (f in b) a.style[f] = g[f];
return e
};
var zb = /^(none|table(?!-c[ea]).+)/,
Ab = new RegExp("^(" + Q + ")(.*)$", "i"),
Bb = new RegExp("^([+-])=(" + Q + ")", "i"),
Cb = {
position: "absolute",
visibility: "hidden",
display: "block"
},
Db = {
letterSpacing: "0",
fontWeight: "400"
},
Eb = ["Webkit", "O", "Moz", "ms"];
function Fb(a, b) {
if (b in a) return b;
var c = b[0].toUpperCase() + b.slice(1),
d = b,
e = Eb.length;
while (e--)
if (b = Eb[e] + c, b in a) return b;
return d
}
function Gb(a, b, c) {
var d = Ab.exec(b);
return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || "px") : b
}
function Hb(a, b, c, d, e) {
for (var f = c === (d ? "border" : "content") ? 4 : "width" === b ? 1 : 0, g = 0; 4 > f; f += 2) "margin" === c && (g += n.css(a, c + R[f], !0, e)), d ? ("content" === c && (g -= n.css(a, "padding" + R[f], !0, e)), "margin" !== c && (g -= n.css(a, "border" + R[f] + "Width", !0, e))) : (g += n.css(a, "padding" + R[f], !0, e), "padding" !== c && (g += n.css(a, "border" + R[f] + "Width", !0, e)));
return g
}
function Ib(a, b, c) {
var d = !0,
e = "width" === b ? a.offsetWidth : a.offsetHeight,
f = wb(a),
g = "border-box" === n.css(a, "boxSizing", !1, f);
if (0 >= e || null == e) {
if (e = xb(a, b, f), (0 > e || null == e) && (e = a.style[b]), vb.test(e)) return e;
d = g && (k.boxSizingReliable() || e === a.style[b]), e = parseFloat(e) || 0
}
return e + Hb(a, b, c || (g ? "border" : "content"), d, f) + "px"
}
function Jb(a, b) {
for (var c, d, e, f = [], g = 0, h = a.length; h > g; g++) d = a[g], d.style && (f[g] = L.get(d, "olddisplay"), c = d.style.display, b ? (f[g] || "none" !== c || (d.style.display = ""), "" === d.style.display && S(d) && (f[g] = L.access(d, "olddisplay", tb(d.nodeName)))) : (e = S(d), "none" === c && e || L.set(d, "olddisplay", e ? c : n.css(d, "display"))));
for (g = 0; h > g; g++) d = a[g], d.style && (b && "none" !== d.style.display && "" !== d.style.display || (d.style.display = b ? f[g] || "" : "none"));
return a
}
n.extend({
cssHooks: {
opacity: {
get: function(a, b) {
if (b) {
var c = xb(a, "opacity");
return "" === c ? "1" : c
}
}
}
},
cssNumber: {
columnCount: !0,
fillOpacity: !0,
flexGrow: !0,
flexShrink: !0,
fontWeight: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
widows: !0,
zIndex: !0,
zoom: !0
},
cssProps: {
"float": "cssFloat"
},
style: function(a, b, c, d) {
if (a && 3 !== a.nodeType && 8 !== a.nodeType && a.style) {
var e, f, g, h = n.camelCase(b),
i = a.style;
return b = n.cssProps[h] || (n.cssProps[h] = Fb(i, h)), g = n.cssHooks[b] || n.cssHooks[h], void 0 === c ? g && "get" in g && void 0 !== (e = g.get(a, !1, d)) ? e : i[b] : (f = typeof c, "string" === f && (e = Bb.exec(c)) && (c = (e[1] + 1) * e[2] + parseFloat(n.css(a, b)), f = "number"), null != c && c === c && ("number" !== f || n.cssNumber[h] || (c += "px"), k.clearCloneStyle || "" !== c || 0 !== b.indexOf("background") || (i[b] = "inherit"), g && "set" in g && void 0 === (c = g.set(a, c, d)) || (i[b] = c)), void 0)
}
},
css: function(a, b, c, d) {
var e, f, g, h = n.camelCase(b);
return b = n.cssProps[h] || (n.cssProps[h] = Fb(a.style, h)), g = n.cssHooks[b] || n.cssHooks[h], g && "get" in g && (e = g.get(a, !0, c)), void 0 === e && (e = xb(a, b, d)), "normal" === e && b in Db && (e = Db[b]), "" === c || c ? (f = parseFloat(e), c === !0 || n.isNumeric(f) ? f || 0 : e) : e
}
}), n.each(["height", "width"], function(a, b) {
n.cssHooks[b] = {
get: function(a, c, d) {
return c ? zb.test(n.css(a, "display")) && 0 === a.offsetWidth ? n.swap(a, Cb, function() {
return Ib(a, b, d)
}) : Ib(a, b, d) : void 0
},
set: function(a, c, d) {
var e = d && wb(a);
return Gb(a, c, d ? Hb(a, b, d, "border-box" === n.css(a, "boxSizing", !1, e), e) : 0)
}
}
}), n.cssHooks.marginRight = yb(k.reliableMarginRight, function(a, b) {
return b ? n.swap(a, {
display: "inline-block"
}, xb, [a, "marginRight"]) : void 0
}), n.each({
margin: "",
padding: "",
border: "Width"
}, function(a, b) {
n.cssHooks[a + b] = {
expand: function(c) {
for (var d = 0, e = {}, f = "string" == typeof c ? c.split(" ") : [c]; 4 > d; d++) e[a + R[d] + b] = f[d] || f[d - 2] || f[0];
return e
}
}, ub.test(a) || (n.cssHooks[a + b].set = Gb)
}), n.fn.extend({
css: function(a, b) {
return J(this, function(a, b, c) {
var d, e, f = {},
g = 0;
if (n.isArray(b)) {
for (d = wb(a), e = b.length; e > g; g++) f[b[g]] = n.css(a, b[g], !1, d);
return f
}
return void 0 !== c ? n.style(a, b, c) : n.css(a, b)
}, a, b, arguments.length > 1)
},
show: function() {
return Jb(this, !0)
},
hide: function() {
return Jb(this)
},
toggle: function(a) {
return "boolean" == typeof a ? a ? this.show() : this.hide() : this.each(function() {
S(this) ? n(this).show() : n(this).hide()
})
}
});
function Kb(a, b, c, d, e) {
return new Kb.prototype.init(a, b, c, d, e)
}
n.Tween = Kb, Kb.prototype = {
constructor: Kb,
init: function(a, b, c, d, e, f) {
this.elem = a, this.prop = c, this.easing = e || "swing", this.options = b, this.start = this.now = this.cur(), this.end = d, this.unit = f || (n.cssNumber[c] ? "" : "px")
},
cur: function() {
var a = Kb.propHooks[this.prop];
return a && a.get ? a.get(this) : Kb.propHooks._default.get(this)
},
run: function(a) {
var b, c = Kb.propHooks[this.prop];
return this.pos = b = this.options.duration ? n.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration) : a, this.now = (this.end - this.start) * b + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), c && c.set ? c.set(this) : Kb.propHooks._default.set(this), this
}
}, Kb.prototype.init.prototype = Kb.prototype, Kb.propHooks = {
_default: {
get: function(a) {
var b;
return null == a.elem[a.prop] || a.elem.style && null != a.elem.style[a.prop] ? (b = n.css(a.elem, a.prop, ""), b && "auto" !== b ? b : 0) : a.elem[a.prop]
},
set: function(a) {
n.fx.step[a.prop] ? n.fx.step[a.prop](a) : a.elem.style && (null != a.elem.style[n.cssProps[a.prop]] || n.cssHooks[a.prop]) ? n.style(a.elem, a.prop, a.now + a.unit) : a.elem[a.prop] = a.now
}
}
}, Kb.propHooks.scrollTop = Kb.propHooks.scrollLeft = {
set: function(a) {
a.elem.nodeType && a.elem.parentNode && (a.elem[a.prop] = a.now)
}
}, n.easing = {
linear: function(a) {
return a
},
swing: function(a) {
return .5 - Math.cos(a * Math.PI) / 2
}
}, n.fx = Kb.prototype.init, n.fx.step = {};
var Lb, Mb, Nb = /^(?:toggle|show|hide)$/,
Ob = new RegExp("^(?:([+-])=|)(" + Q + ")([a-z%]*)$", "i"),
Pb = /queueHooks$/,
Qb = [Vb],
Rb = {
"*": [function(a, b) {
var c = this.createTween(a, b),
d = c.cur(),
e = Ob.exec(b),
f = e && e[3] || (n.cssNumber[a] ? "" : "px"),
g = (n.cssNumber[a] || "px" !== f && +d) && Ob.exec(n.css(c.elem, a)),
h = 1,
i = 20;
if (g && g[3] !== f) {
f = f || g[3], e = e || [], g = +d || 1;
do h = h || ".5", g /= h, n.style(c.elem, a, g + f); while (h !== (h = c.cur() / d) && 1 !== h && --i)
}
return e && (g = c.start = +g || +d || 0, c.unit = f, c.end = e[1] ? g + (e[1] + 1) * e[2] : +e[2]), c
}]
};
function Sb() {
return setTimeout(function() {
Lb = void 0
}), Lb = n.now()
}
function Tb(a, b) {
var c, d = 0,
e = {
height: a
};
for (b = b ? 1 : 0; 4 > d; d += 2 - b) c = R[d], e["margin" + c] = e["padding" + c] = a;
return b && (e.opacity = e.width = a), e
}
function Ub(a, b, c) {
for (var d, e = (Rb[b] || []).concat(Rb["*"]), f = 0, g = e.length; g > f; f++)
if (d = e[f].call(c, b, a)) return d
}
function Vb(a, b, c) {
var d, e, f, g, h, i, j, k, l = this,
m = {},
o = a.style,
p = a.nodeType && S(a),
q = L.get(a, "fxshow");
c.queue || (h = n._queueHooks(a, "fx"), null == h.unqueued && (h.unqueued = 0, i = h.empty.fire, h.empty.fire = function() {
h.unqueued || i()
}), h.unqueued++, l.always(function() {
l.always(function() {
h.unqueued--, n.queue(a, "fx").length || h.empty.fire()
})
})), 1 === a.nodeType && ("height" in b || "width" in b) && (c.overflow = [o.overflow, o.overflowX, o.overflowY], j = n.css(a, "display"), k = "none" === j ? L.get(a, "olddisplay") || tb(a.nodeName) : j, "inline" === k && "none" === n.css(a, "float") && (o.display = "inline-block")), c.overflow && (o.overflow = "hidden", l.always(function() {
o.overflow = c.overflow[0], o.overflowX = c.overflow[1], o.overflowY = c.overflow[2]
}));
for (d in b)
if (e = b[d], Nb.exec(e)) {
if (delete b[d], f = f || "toggle" === e, e === (p ? "hide" : "show")) {
if ("show" !== e || !q || void 0 === q[d]) continue;
p = !0
}
m[d] = q && q[d] || n.style(a, d)
} else j = void 0;
if (n.isEmptyObject(m)) "inline" === ("none" === j ? tb(a.nodeName) : j) && (o.display = j);
else {
q ? "hidden" in q && (p = q.hidden) : q = L.access(a, "fxshow", {}), f && (q.hidden = !p), p ? n(a).show() : l.done(function() {
n(a).hide()
}), l.done(function() {
var b;
L.remove(a, "fxshow");
for (b in m) n.style(a, b, m[b])
});
for (d in m) g = Ub(p ? q[d] : 0, d, l), d in q || (q[d] = g.start, p && (g.end = g.start, g.start = "width" === d || "height" === d ? 1 : 0))
}
}
function Wb(a, b) {
var c, d, e, f, g;
for (c in a)
if (d = n.camelCase(c), e = b[d], f = a[c], n.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = n.cssHooks[d], g && "expand" in g) {
f = g.expand(f), delete a[d];
for (c in f) c in a || (a[c] = f[c], b[c] = e)
} else b[d] = e
}
function Xb(a, b, c) {
var d, e, f = 0,
g = Qb.length,
h = n.Deferred().always(function() {
delete i.elem
}),
i = function() {
if (e) return !1;
for (var b = Lb || Sb(), c = Math.max(0, j.startTime + j.duration - b), d = c / j.duration || 0, f = 1 - d, g = 0, i = j.tweens.length; i > g; g++) j.tweens[g].run(f);
return h.notifyWith(a, [j, f, c]), 1 > f && i ? c : (h.resolveWith(a, [j]), !1)
},
j = h.promise({
elem: a,
props: n.extend({}, b),
opts: n.extend(!0, {
specialEasing: {}
}, c),
originalProperties: b,
originalOptions: c,
startTime: Lb || Sb(),
duration: c.duration,
tweens: [],
createTween: function(b, c) {
var d = n.Tween(a, j.opts, b, c, j.opts.specialEasing[b] || j.opts.easing);
return j.tweens.push(d), d
},
stop: function(b) {
var c = 0,
d = b ? j.tweens.length : 0;
if (e) return this;
for (e = !0; d > c; c++) j.tweens[c].run(1);
return b ? h.resolveWith(a, [j, b]) : h.rejectWith(a, [j, b]), this
}
}),
k = j.props;
for (Wb(k, j.opts.specialEasing); g > f; f++)
if (d = Qb[f].call(j, a, k, j.opts)) return d;
return n.map(k, Ub, j), n.isFunction(j.opts.start) && j.opts.start.call(a, j), n.fx.timer(n.extend(i, {
elem: a,
anim: j,
queue: j.opts.queue
})), j.progress(j.opts.progress).done(j.opts.done, j.opts.complete).fail(j.opts.fail).always(j.opts.always)
}
n.Animation = n.extend(Xb, {
tweener: function(a, b) {
n.isFunction(a) ? (b = a, a = ["*"]) : a = a.split(" ");
for (var c, d = 0, e = a.length; e > d; d++) c = a[d], Rb[c] = Rb[c] || [], Rb[c].unshift(b)
},
prefilter: function(a, b) {
b ? Qb.unshift(a) : Qb.push(a)
}
}), n.speed = function(a, b, c) {
var d = a && "object" == typeof a ? n.extend({}, a) : {
complete: c || !c && b || n.isFunction(a) && a,
duration: a,
easing: c && b || b && !n.isFunction(b) && b
};
return d.duration = n.fx.off ? 0 : "number" == typeof d.duration ? d.duration : d.duration in n.fx.speeds ? n.fx.speeds[d.duration] : n.fx.speeds._default, (null == d.queue || d.queue === !0) && (d.queue = "fx"), d.old = d.complete, d.complete = function() {
n.isFunction(d.old) && d.old.call(this), d.queue && n.dequeue(this, d.queue)
}, d
}, n.fn.extend({
fadeTo: function(a, b, c, d) {
return this.filter(S).css("opacity", 0).show().end().animate({
opacity: b
}, a, c, d)
},
animate: function(a, b, c, d) {
var e = n.isEmptyObject(a),
f = n.speed(b, c, d),
g = function() {
var b = Xb(this, n.extend({}, a), f);
(e || L.get(this, "finish")) && b.stop(!0)
};
return g.finish = g, e || f.queue === !1 ? this.each(g) : this.queue(f.queue, g)
},
stop: function(a, b, c) {
var d = function(a) {
var b = a.stop;
delete a.stop, b(c)
};
return "string" != typeof a && (c = b, b = a, a = void 0), b && a !== !1 && this.queue(a || "fx", []), this.each(function() {
var b = !0,
e = null != a && a + "queueHooks",
f = n.timers,
g = L.get(this);
if (e) g[e] && g[e].stop && d(g[e]);
else
for (e in g) g[e] && g[e].stop && Pb.test(e) && d(g[e]);
for (e = f.length; e--;) f[e].elem !== this || null != a && f[e].queue !== a || (f[e].anim.stop(c), b = !1, f.splice(e, 1));
(b || !c) && n.dequeue(this, a)
})
},
finish: function(a) {
return a !== !1 && (a = a || "fx"), this.each(function() {
var b, c = L.get(this),
d = c[a + "queue"],
e = c[a + "queueHooks"],
f = n.timers,
g = d ? d.length : 0;
for (c.finish = !0, n.queue(this, a, []), e && e.stop && e.stop.call(this, !0), b = f.length; b--;) f[b].elem === this && f[b].queue === a && (f[b].anim.stop(!0), f.splice(b, 1));
for (b = 0; g > b; b++) d[b] && d[b].finish && d[b].finish.call(this);
delete c.finish
})
}
}), n.each(["toggle", "show", "hide"], function(a, b) {
var c = n.fn[b];
n.fn[b] = function(a, d, e) {
return null == a || "boolean" == typeof a ? c.apply(this, arguments) : this.animate(Tb(b, !0), a, d, e)
}
}), n.each({
slideDown: Tb("show"),
slideUp: Tb("hide"),
slideToggle: Tb("toggle"),
fadeIn: {
opacity: "show"
},
fadeOut: {
opacity: "hide"
},
fadeToggle: {
opacity: "toggle"
}
}, function(a, b) {
n.fn[a] = function(a, c, d) {
return this.animate(b, a, c, d)
}
}), n.timers = [], n.fx.tick = function() {
var a, b = 0,
c = n.timers;
for (Lb = n.now(); b < c.length; b++) a = c[b], a() || c[b] !== a || c.splice(b--, 1);
c.length || n.fx.stop(), Lb = void 0
}, n.fx.timer = function(a) {
n.timers.push(a), a() ? n.fx.start() : n.timers.pop()
}, n.fx.interval = 13, n.fx.start = function() {
Mb || (Mb = setInterval(n.fx.tick, n.fx.interval))
}, n.fx.stop = function() {
clearInterval(Mb), Mb = null
}, n.fx.speeds = {
slow: 600,
fast: 200,
_default: 400
}, n.fn.delay = function(a, b) {
return a = n.fx ? n.fx.speeds[a] || a : a, b = b || "fx", this.queue(b, function(b, c) {
var d = setTimeout(b, a);
c.stop = function() {
clearTimeout(d)
}
})
},
function() {
var a = l.createElement("input"),
b = l.createElement("select"),
c = b.appendChild(l.createElement("option"));
a.type = "checkbox", k.checkOn = "" !== a.value, k.optSelected = c.selected, b.disabled = !0, k.optDisabled = !c.disabled, a = l.createElement("input"), a.value = "t", a.type = "radio", k.radioValue = "t" === a.value
}();
var Yb, Zb, $b = n.expr.attrHandle;
n.fn.extend({
attr: function(a, b) {
return J(this, n.attr, a, b, arguments.length > 1)
},
removeAttr: function(a) {
return this.each(function() {
n.removeAttr(this, a)
})
}
}), n.extend({
attr: function(a, b, c) {
var d, e, f = a.nodeType;
if (a && 3 !== f && 8 !== f && 2 !== f) return typeof a.getAttribute === U ? n.prop(a, b, c) : (1 === f && n.isXMLDoc(a) || (b = b.toLowerCase(), d = n.attrHooks[b] || (n.expr.match.bool.test(b) ? Zb : Yb)), void 0 === c ? d && "get" in d && null !== (e = d.get(a, b)) ? e : (e = n.find.attr(a, b), null == e ? void 0 : e) : null !== c ? d && "set" in d && void 0 !== (e = d.set(a, c, b)) ? e : (a.setAttribute(b, c + ""), c) : void n.removeAttr(a, b))
},
removeAttr: function(a, b) {
var c, d, e = 0,
f = b && b.match(E);
if (f && 1 === a.nodeType)
while (c = f[e++]) d = n.propFix[c] || c, n.expr.match.bool.test(c) && (a[d] = !1), a.removeAttribute(c)
},
attrHooks: {
type: {
set: function(a, b) {
if (!k.radioValue && "radio" === b && n.nodeName(a, "input")) {
var c = a.value;
return a.setAttribute("type", b), c && (a.value = c), b
}
}
}
}
}), Zb = {
set: function(a, b, c) {
return b === !1 ? n.removeAttr(a, c) : a.setAttribute(c, c), c
}
}, n.each(n.expr.match.bool.source.match(/\w+/g), function(a, b) {
var c = $b[b] || n.find.attr;
$b[b] = function(a, b, d) {
var e, f;
return d || (f = $b[b], $b[b] = e, e = null != c(a, b, d) ? b.toLowerCase() : null, $b[b] = f), e
}
});
var _b = /^(?:input|select|textarea|button)$/i;
n.fn.extend({
prop: function(a, b) {
return J(this, n.prop, a, b, arguments.length > 1)
},
removeProp: function(a) {
return this.each(function() {
delete this[n.propFix[a] || a]
})
}
}), n.extend({
propFix: {
"for": "htmlFor",
"class": "className"
},
prop: function(a, b, c) {
var d, e, f, g = a.nodeType;
if (a && 3 !== g && 8 !== g && 2 !== g) return f = 1 !== g || !n.isXMLDoc(a), f && (b = n.propFix[b] || b, e = n.propHooks[b]), void 0 !== c ? e && "set" in e && void 0 !== (d = e.set(a, c, b)) ? d : a[b] = c : e && "get" in e && null !== (d = e.get(a, b)) ? d : a[b]
},
propHooks: {
tabIndex: {
get: function(a) {
return a.hasAttribute("tabindex") || _b.test(a.nodeName) || a.href ? a.tabIndex : -1
}
}
}
}), k.optSelected || (n.propHooks.selected = {
get: function(a) {
var b = a.parentNode;
return b && b.parentNode && b.parentNode.selectedIndex, null
}
}), n.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
n.propFix[this.toLowerCase()] = this
});
var ac = /[\t\r\n\f]/g;
n.fn.extend({
addClass: function(a) {
var b, c, d, e, f, g, h = "string" == typeof a && a,
i = 0,
j = this.length;
if (n.isFunction(a)) return this.each(function(b) {
n(this).addClass(a.call(this, b, this.className))
});
if (h)
for (b = (a || "").match(E) || []; j > i; i++)
if (c = this[i], d = 1 === c.nodeType && (c.className ? (" " + c.className + " ").replace(ac, " ") : " ")) {
f = 0;
while (e = b[f++]) d.indexOf(" " + e + " ") < 0 && (d += e + " ");
g = n.trim(d), c.className !== g && (c.className = g)
}
return this
},
removeClass: function(a) {
var b, c, d, e, f, g, h = 0 === arguments.length || "string" == typeof a && a,
i = 0,
j = this.length;
if (n.isFunction(a)) return this.each(function(b) {
n(this).removeClass(a.call(this, b, this.className))
});
if (h)
for (b = (a || "").match(E) || []; j > i; i++)
if (c = this[i], d = 1 === c.nodeType && (c.className ? (" " + c.className + " ").replace(ac, " ") : "")) {
f = 0;
while (e = b[f++])
while (d.indexOf(" " + e + " ") >= 0) d = d.replace(" " + e + " ", " ");
g = a ? n.trim(d) : "", c.className !== g && (c.className = g)
}
return this
},
toggleClass: function(a, b) {
var c = typeof a;
return "boolean" == typeof b && "string" === c ? b ? this.addClass(a) : this.removeClass(a) : this.each(n.isFunction(a) ? function(c) {
n(this).toggleClass(a.call(this, c, this.className, b), b)
} : function() {
if ("string" === c) {
var b, d = 0,
e = n(this),
f = a.match(E) || [];
while (b = f[d++]) e.hasClass(b) ? e.removeClass(b) : e.addClass(b)
} else(c === U || "boolean" === c) && (this.className && L.set(this, "__className__", this.className), this.className = this.className || a === !1 ? "" : L.get(this, "__className__") || "")
})
},
hasClass: function(a) {
for (var b = " " + a + " ", c = 0, d = this.length; d > c; c++)
if (1 === this[c].nodeType && (" " + this[c].className + " ").replace(ac, " ").indexOf(b) >= 0) return !0;
return !1
}
});
var bc = /\r/g;
n.fn.extend({
val: function(a) {
var b, c, d, e = this[0]; {
if (arguments.length) return d = n.isFunction(a), this.each(function(c) {
var e;
1 === this.nodeType && (e = d ? a.call(this, c, n(this).val()) : a, null == e ? e = "" : "number" == typeof e ? e += "" : n.isArray(e) && (e = n.map(e, function(a) {
return null == a ? "" : a + ""
})), b = n.valHooks[this.type] || n.valHooks[this.nodeName.toLowerCase()], b && "set" in b && void 0 !== b.set(this, e, "value") || (this.value = e))
});
if (e) return b = n.valHooks[e.type] || n.valHooks[e.nodeName.toLowerCase()], b && "get" in b && void 0 !== (c = b.get(e, "value")) ? c : (c = e.value, "string" == typeof c ? c.replace(bc, "") : null == c ? "" : c)
}
}
}), n.extend({
valHooks: {
option: {
get: function(a) {
var b = n.find.attr(a, "value");
return null != b ? b : n.trim(n.text(a))
}
},
select: {
get: function(a) {
for (var b, c, d = a.options, e = a.selectedIndex, f = "select-one" === a.type || 0 > e, g = f ? null : [], h = f ? e + 1 : d.length, i = 0 > e ? h : f ? e : 0; h > i; i++)
if (c = d[i], !(!c.selected && i !== e || (k.optDisabled ? c.disabled : null !== c.getAttribute("disabled")) || c.parentNode.disabled && n.nodeName(c.parentNode, "optgroup"))) {
if (b = n(c).val(), f) return b;
g.push(b)
}
return g
},
set: function(a, b) {
var c, d, e = a.options,
f = n.makeArray(b),
g = e.length;
while (g--) d = e[g], (d.selected = n.inArray(d.value, f) >= 0) && (c = !0);
return c || (a.selectedIndex = -1), f
}
}
}
}), n.each(["radio", "checkbox"], function() {
n.valHooks[this] = {
set: function(a, b) {
return n.isArray(b) ? a.checked = n.inArray(n(a).val(), b) >= 0 : void 0
}
}, k.checkOn || (n.valHooks[this].get = function(a) {
return null === a.getAttribute("value") ? "on" : a.value
})
}), n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(a, b) {
n.fn[b] = function(a, c) {
return arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b)
}
}), n.fn.extend({
hover: function(a, b) {
return this.mouseenter(a).mouseleave(b || a)
},
bind: function(a, b, c) {
return this.on(a, null, b, c)
},
unbind: function(a, b) {
return this.off(a, null, b)
},
delegate: function(a, b, c, d) {
return this.on(b, a, c, d)
},
undelegate: function(a, b, c) {
return 1 === arguments.length ? this.off(a, "**") : this.off(b, a || "**", c)
}
});
var cc = n.now(),
dc = /\?/;
n.parseJSON = function(a) {
return JSON.parse(a + "")
}, n.parseXML = function(a) {
var b, c;
if (!a || "string" != typeof a) return null;
try {
c = new DOMParser, b = c.parseFromString(a, "text/xml")
} catch (d) {
b = void 0
}
return (!b || b.getElementsByTagName("parsererror").length) && n.error("Invalid XML: " + a), b
};
var ec = /#.*$/,
fc = /([?&])_=[^&]*/,
gc = /^(.*?):[ \t]*([^\r\n]*)$/gm,
hc = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
ic = /^(?:GET|HEAD)$/,
jc = /^\/\//,
kc = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
lc = {},
mc = {},
nc = "*/".concat("*"),
oc = a.location.href,
pc = kc.exec(oc.toLowerCase()) || [];
function qc(a) {
return function(b, c) {
"string" != typeof b && (c = b, b = "*");
var d, e = 0,
f = b.toLowerCase().match(E) || [];
if (n.isFunction(c))
while (d = f[e++]) "+" === d[0] ? (d = d.slice(1) || "*", (a[d] = a[d] || []).unshift(c)) : (a[d] = a[d] || []).push(c)
}
}
function rc(a, b, c, d) {
var e = {},
f = a === mc;
function g(h) {
var i;
return e[h] = !0, n.each(a[h] || [], function(a, h) {
var j = h(b, c, d);
return "string" != typeof j || f || e[j] ? f ? !(i = j) : void 0 : (b.dataTypes.unshift(j), g(j), !1)
}), i
}
return g(b.dataTypes[0]) || !e["*"] && g("*")
}
function sc(a, b) {
var c, d, e = n.ajaxSettings.flatOptions || {};
for (c in b) void 0 !== b[c] && ((e[c] ? a : d || (d = {}))[c] = b[c]);
return d && n.extend(!0, a, d), a
}
function tc(a, b, c) {
var d, e, f, g, h = a.contents,
i = a.dataTypes;
while ("*" === i[0]) i.shift(), void 0 === d && (d = a.mimeType || b.getResponseHeader("Content-Type"));
if (d)
for (e in h)
if (h[e] && h[e].test(d)) {
i.unshift(e);
break
}
if (i[0] in c) f = i[0];
else {
for (e in c) {
if (!i[0] || a.converters[e + " " + i[0]]) {
f = e;
break
}
g || (g = e)
}
f = f || g
}
return f ? (f !== i[0] && i.unshift(f), c[f]) : void 0
}
function uc(a, b, c, d) {
var e, f, g, h, i, j = {},
k = a.dataTypes.slice();
if (k[1])
for (g in a.converters) j[g.toLowerCase()] = a.converters[g];
f = k.shift();
while (f)
if (a.responseFields[f] && (c[a.responseFields[f]] = b), !i && d && a.dataFilter && (b = a.dataFilter(b, a.dataType)), i = f, f = k.shift())
if ("*" === f) f = i;
else if ("*" !== i && i !== f) {
if (g = j[i + " " + f] || j["* " + f], !g)
for (e in j)
if (h = e.split(" "), h[1] === f && (g = j[i + " " + h[0]] || j["* " + h[0]])) {
g === !0 ? g = j[e] : j[e] !== !0 && (f = h[0], k.unshift(h[1]));
break
}
if (g !== !0)
if (g && a["throws"]) b = g(b);
else try {
b = g(b)
} catch (l) {
return {
state: "parsererror",
error: g ? l : "No conversion from " + i + " to " + f
}
}
}
return {
state: "success",
data: b
}
}
n.extend({
active: 0,
lastModified: {},
etag: {},
ajaxSettings: {
url: oc,
type: "GET",
isLocal: hc.test(pc[1]),
global: !0,
processData: !0,
async: !0,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
accepts: {
"*": nc,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},
contents: {
xml: /xml/,
html: /html/,
json: /json/
},
responseFields: {
xml: "responseXML",
text: "responseText",
json: "responseJSON"
},
converters: {
"* text": String,
"text html": !0,
"text json": n.parseJSON,
"text xml": n.parseXML
},
flatOptions: {
url: !0,
context: !0
}
},
ajaxSetup: function(a, b) {
return b ? sc(sc(a, n.ajaxSettings), b) : sc(n.ajaxSettings, a)
},
ajaxPrefilter: qc(lc),
ajaxTransport: qc(mc),
ajax: function(a, b) {
"object" == typeof a && (b = a, a = void 0), b = b || {};
var c, d, e, f, g, h, i, j, k = n.ajaxSetup({}, b),
l = k.context || k,
m = k.context && (l.nodeType || l.jquery) ? n(l) : n.event,
o = n.Deferred(),
p = n.Callbacks("once memory"),
q = k.statusCode || {},
r = {},
s = {},
t = 0,
u = "canceled",
v = {
readyState: 0,
getResponseHeader: function(a) {
var b;
if (2 === t) {
if (!f) {
f = {};
while (b = gc.exec(e)) f[b[1].toLowerCase()] = b[2]
}
b = f[a.toLowerCase()]
}
return null == b ? null : b
},
getAllResponseHeaders: function() {
return 2 === t ? e : null
},
setRequestHeader: function(a, b) {
var c = a.toLowerCase();
return t || (a = s[c] = s[c] || a, r[a] = b), this
},
overrideMimeType: function(a) {
return t || (k.mimeType = a), this
},
statusCode: function(a) {
var b;
if (a)
if (2 > t)
for (b in a) q[b] = [q[b], a[b]];
else v.always(a[v.status]);
return this
},
abort: function(a) {
var b = a || u;
return c && c.abort(b), x(0, b), this
}
};
if (o.promise(v).complete = p.add, v.success = v.done, v.error = v.fail, k.url = ((a || k.url || oc) + "").replace(ec, "").replace(jc, pc[1] + "//"), k.type = b.method || b.type || k.method || k.type, k.dataTypes = n.trim(k.dataType || "*").toLowerCase().match(E) || [""], null == k.crossDomain && (h = kc.exec(k.url.toLowerCase()), k.crossDomain = !(!h || h[1] === pc[1] && h[2] === pc[2] && (h[3] || ("http:" === h[1] ? "80" : "443")) === (pc[3] || ("http:" === pc[1] ? "80" : "443")))), k.data && k.processData && "string" != typeof k.data && (k.data = n.param(k.data, k.traditional)), rc(lc, k, b, v), 2 === t) return v;
i = n.event && k.global, i && 0 === n.active++ && n.event.trigger("ajaxStart"), k.type = k.type.toUpperCase(), k.hasContent = !ic.test(k.type), d = k.url, k.hasContent || (k.data && (d = k.url += (dc.test(d) ? "&" : "?") + k.data, delete k.data), k.cache === !1 && (k.url = fc.test(d) ? d.replace(fc, "$1_=" + cc++) : d + (dc.test(d) ? "&" : "?") + "_=" + cc++)), k.ifModified && (n.lastModified[d] && v.setRequestHeader("If-Modified-Since", n.lastModified[d]), n.etag[d] && v.setRequestHeader("If-None-Match", n.etag[d])), (k.data && k.hasContent && k.contentType !== !1 || b.contentType) && v.setRequestHeader("Content-Type", k.contentType), v.setRequestHeader("Accept", k.dataTypes[0] && k.accepts[k.dataTypes[0]] ? k.accepts[k.dataTypes[0]] + ("*" !== k.dataTypes[0] ? ", " + nc + "; q=0.01" : "") : k.accepts["*"]);
for (j in k.headers) v.setRequestHeader(j, k.headers[j]);
if (k.beforeSend && (k.beforeSend.call(l, v, k) === !1 || 2 === t)) return v.abort();
u = "abort";
for (j in {
success: 1,
error: 1,
complete: 1
}) v[j](k[j]);
if (c = rc(mc, k, b, v)) {
v.readyState = 1, i && m.trigger("ajaxSend", [v, k]), k.async && k.timeout > 0 && (g = setTimeout(function() {
v.abort("timeout")
}, k.timeout));
try {
t = 1, c.send(r, x)
} catch (w) {
if (!(2 > t)) throw w;
x(-1, w)
}
} else x(-1, "No Transport");
function x(a, b, f, h) {
var j, r, s, u, w, x = b;
2 !== t && (t = 2, g && clearTimeout(g), c = void 0, e = h || "", v.readyState = a > 0 ? 4 : 0, j = a >= 200 && 300 > a || 304 === a, f && (u = tc(k, v, f)), u = uc(k, u, v, j), j ? (k.ifModified && (w = v.getResponseHeader("Last-Modified"), w && (n.lastModified[d] = w), w = v.getResponseHeader("etag"), w && (n.etag[d] = w)), 204 === a || "HEAD" === k.type ? x = "nocontent" : 304 === a ? x = "notmodified" : (x = u.state, r = u.data, s = u.error, j = !s)) : (s = x, (a || !x) && (x = "error", 0 > a && (a = 0))), v.status = a, v.statusText = (b || x) + "", j ? o.resolveWith(l, [r, x, v]) : o.rejectWith(l, [v, x, s]), v.statusCode(q), q = void 0, i && m.trigger(j ? "ajaxSuccess" : "ajaxError", [v, k, j ? r : s]), p.fireWith(l, [v, x]), i && (m.trigger("ajaxComplete", [v, k]), --n.active || n.event.trigger("ajaxStop")))
}
return v
},
getJSON: function(a, b, c) {
return n.get(a, b, c, "json")
},
getScript: function(a, b) {
return n.get(a, void 0, b, "script")
}
}), n.each(["get", "post"], function(a, b) {
n[b] = function(a, c, d, e) {
return n.isFunction(c) && (e = e || d, d = c, c = void 0), n.ajax({
url: a,
type: b,
dataType: e,
data: c,
success: d
})
}
}), n._evalUrl = function(a) {
return n.ajax({
url: a,
type: "GET",
dataType: "script",
async: !1,
global: !1,
"throws": !0
})
}, n.fn.extend({
wrapAll: function(a) {
var b;
return n.isFunction(a) ? this.each(function(b) {
n(this).wrapAll(a.call(this, b))
}) : (this[0] && (b = n(a, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && b.insertBefore(this[0]), b.map(function() {
var a = this;
while (a.firstElementChild) a = a.firstElementChild;
return a
}).append(this)), this)
},
wrapInner: function(a) {
return this.each(n.isFunction(a) ? function(b) {
n(this).wrapInner(a.call(this, b))
} : function() {
var b = n(this),
c = b.contents();
c.length ? c.wrapAll(a) : b.append(a)
})
},
wrap: function(a) {
var b = n.isFunction(a);
return this.each(function(c) {
n(this).wrapAll(b ? a.call(this, c) : a)
})
},
unwrap: function() {
return this.parent().each(function() {
n.nodeName(this, "body") || n(this).replaceWith(this.childNodes)
}).end()
}
}), n.expr.filters.hidden = function(a) {
return a.offsetWidth <= 0 && a.offsetHeight <= 0
}, n.expr.filters.visible = function(a) {
return !n.expr.filters.hidden(a)
};
var vc = /%20/g,
wc = /\[\]$/,
xc = /\r?\n/g,
yc = /^(?:submit|button|image|reset|file)$/i,
zc = /^(?:input|select|textarea|keygen)/i;
function Ac(a, b, c, d) {
var e;
if (n.isArray(b)) n.each(b, function(b, e) {
c || wc.test(a) ? d(a, e) : Ac(a + "[" + ("object" == typeof e ? b : "") + "]", e, c, d)
});
else if (c || "object" !== n.type(b)) d(a, b);
else
for (e in b) Ac(a + "[" + e + "]", b[e], c, d)
}
n.param = function(a, b) {
var c, d = [],
e = function(a, b) {
b = n.isFunction(b) ? b() : null == b ? "" : b, d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
};
if (void 0 === b && (b = n.ajaxSettings && n.ajaxSettings.traditional), n.isArray(a) || a.jquery && !n.isPlainObject(a)) n.each(a, function() {
e(this.name, this.value)
});
else
for (c in a) Ac(c, a[c], b, e);
return d.join("&").replace(vc, "+")
}, n.fn.extend({
serialize: function() {
return n.param(this.serializeArray())
},
serializeArray: function() {
return this.map(function() {
var a = n.prop(this, "elements");
return a ? n.makeArray(a) : this
}).filter(function() {
var a = this.type;
return this.name && !n(this).is(":disabled") && zc.test(this.nodeName) && !yc.test(a) && (this.checked || !T.test(a))
}).map(function(a, b) {
var c = n(this).val();
return null == c ? null : n.isArray(c) ? n.map(c, function(a) {
return {
name: b.name,
value: a.replace(xc, "\r\n")
}
}) : {
name: b.name,
value: c.replace(xc, "\r\n")
}
}).get()
}
}), n.ajaxSettings.xhr = function() {
try {
return new XMLHttpRequest
} catch (a) {}
};
var Bc = 0,
Cc = {},
Dc = {
0: 200,
1223: 204
},
Ec = n.ajaxSettings.xhr();
a.attachEvent && a.attachEvent("onunload", function() {
for (var a in Cc) Cc[a]()
}), k.cors = !!Ec && "withCredentials" in Ec, k.ajax = Ec = !!Ec, n.ajaxTransport(function(a) {
var b;
return k.cors || Ec && !a.crossDomain ? {
send: function(c, d) {
var e, f = a.xhr(),
g = ++Bc;
if (f.open(a.type, a.url, a.async, a.username, a.password), a.xhrFields)
for (e in a.xhrFields) f[e] = a.xhrFields[e];
a.mimeType && f.overrideMimeType && f.overrideMimeType(a.mimeType), a.crossDomain || c["X-Requested-With"] || (c["X-Requested-With"] = "XMLHttpRequest");
for (e in c) f.setRequestHeader(e, c[e]);
b = function(a) {
return function() {
b && (delete Cc[g], b = f.onload = f.onerror = null, "abort" === a ? f.abort() : "error" === a ? d(f.status, f.statusText) : d(Dc[f.status] || f.status, f.statusText, "string" == typeof f.responseText ? {
text: f.responseText
} : void 0, f.getAllResponseHeaders()))
}
}, f.onload = b(), f.onerror = b("error"), b = Cc[g] = b("abort");
try {
f.send(a.hasContent && a.data || null)
} catch (h) {
if (b) throw h
}
},
abort: function() {
b && b()
}
} : void 0
}), n.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /(?:java|ecma)script/
},
converters: {
"text script": function(a) {
return n.globalEval(a), a
}
}
}), n.ajaxPrefilter("script", function(a) {
void 0 === a.cache && (a.cache = !1), a.crossDomain && (a.type = "GET")
}), n.ajaxTransport("script", function(a) {
if (a.crossDomain) {
var b, c;
return {
send: function(d, e) {
b = n("<script>").prop({
async: !0,
charset: a.scriptCharset,
src: a.url
}).on("load error", c = function(a) {
b.remove(), c = null, a && e("error" === a.type ? 404 : 200, a.type)
}), l.head.appendChild(b[0])
},
abort: function() {
c && c()
}
}
}
});
var Fc = [],
Gc = /(=)\?(?=&|$)|\?\?/;
n.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
var a = Fc.pop() || n.expando + "_" + cc++;
return this[a] = !0, a
}
}), n.ajaxPrefilter("json jsonp", function(b, c, d) {
var e, f, g, h = b.jsonp !== !1 && (Gc.test(b.url) ? "url" : "string" == typeof b.data && !(b.contentType || "").indexOf("application/x-www-form-urlencoded") && Gc.test(b.data) && "data");
return h || "jsonp" === b.dataTypes[0] ? (e = b.jsonpCallback = n.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback, h ? b[h] = b[h].replace(Gc, "$1" + e) : b.jsonp !== !1 && (b.url += (dc.test(b.url) ? "&" : "?") + b.jsonp + "=" + e), b.converters["script json"] = function() {
return g || n.error(e + " was not called"), g[0]
}, b.dataTypes[0] = "json", f = a[e], a[e] = function() {
g = arguments
}, d.always(function() {
a[e] = f, b[e] && (b.jsonpCallback = c.jsonpCallback, Fc.push(e)), g && n.isFunction(f) && f(g[0]), g = f = void 0
}), "script") : void 0
}), n.parseHTML = function(a, b, c) {
if (!a || "string" != typeof a) return null;
"boolean" == typeof b && (c = b, b = !1), b = b || l;
var d = v.exec(a),
e = !c && [];
return d ? [b.createElement(d[1])] : (d = n.buildFragment([a], b, e), e && e.length && n(e).remove(), n.merge([], d.childNodes))
};
var Hc = n.fn.load;
n.fn.load = function(a, b, c) {
if ("string" != typeof a && Hc) return Hc.apply(this, arguments);
var d, e, f, g = this,
h = a.indexOf(" ");
return h >= 0 && (d = n.trim(a.slice(h)), a = a.slice(0, h)), n.isFunction(b) ? (c = b, b = void 0) : b && "object" == typeof b && (e = "POST"), g.length > 0 && n.ajax({
url: a,
type: e,
dataType: "html",
data: b
}).done(function(a) {
f = arguments, g.html(d ? n("<div>").append(n.parseHTML(a)).find(d) : a)
}).complete(c && function(a, b) {
g.each(c, f || [a.responseText, b, a])
}), this
}, n.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(a, b) {
n.fn[b] = function(a) {
return this.on(b, a)
}
}), n.expr.filters.animated = function(a) {
return n.grep(n.timers, function(b) {
return a === b.elem
}).length
};
var Ic = a.document.documentElement;
function Jc(a) {
return n.isWindow(a) ? a : 9 === a.nodeType && a.defaultView
}
n.offset = {
setOffset: function(a, b, c) {
var d, e, f, g, h, i, j, k = n.css(a, "position"),
l = n(a),
m = {};
"static" === k && (a.style.position = "relative"), h = l.offset(), f = n.css(a, "top"), i = n.css(a, "left"), j = ("absolute" === k || "fixed" === k) && (f + i).indexOf("auto") > -1, j ? (d = l.position(), g = d.top, e = d.left) : (g = parseFloat(f) || 0, e = parseFloat(i) || 0), n.isFunction(b) && (b = b.call(a, c, h)), null != b.top && (m.top = b.top - h.top + g), null != b.left && (m.left = b.left - h.left + e), "using" in b ? b.using.call(a, m) : l.css(m)
}
}, n.fn.extend({
offset: function(a) {
if (arguments.length) return void 0 === a ? this : this.each(function(b) {
n.offset.setOffset(this, a, b)
});
var b, c, d = this[0],
e = {
top: 0,
left: 0
},
f = d && d.ownerDocument;
if (f) return b = f.documentElement, n.contains(b, d) ? (typeof d.getBoundingClientRect !== U && (e = d.getBoundingClientRect()), c = Jc(f), {
top: e.top + c.pageYOffset - b.clientTop,
left: e.left + c.pageXOffset - b.clientLeft
}) : e
},
position: function() {
if (this[0]) {
var a, b, c = this[0],
d = {
top: 0,
left: 0
};
return "fixed" === n.css(c, "position") ? b = c.getBoundingClientRect() : (a = this.offsetParent(), b = this.offset(), n.nodeName(a[0], "html") || (d = a.offset()), d.top += n.css(a[0], "borderTopWidth", !0), d.left += n.css(a[0], "borderLeftWidth", !0)), {
top: b.top - d.top - n.css(c, "marginTop", !0),
left: b.left - d.left - n.css(c, "marginLeft", !0)
}
}
},
offsetParent: function() {
return this.map(function() {
var a = this.offsetParent || Ic;
while (a && !n.nodeName(a, "html") && "static" === n.css(a, "position")) a = a.offsetParent;
return a || Ic
})
}
}), n.each({
scrollLeft: "pageXOffset",
scrollTop: "pageYOffset"
}, function(b, c) {
var d = "pageYOffset" === c;
n.fn[b] = function(e) {
return J(this, function(b, e, f) {
var g = Jc(b);
return void 0 === f ? g ? g[c] : b[e] : void(g ? g.scrollTo(d ? a.pageXOffset : f, d ? f : a.pageYOffset) : b[e] = f)
}, b, e, arguments.length, null)
}
}), n.each(["top", "left"], function(a, b) {
n.cssHooks[b] = yb(k.pixelPosition, function(a, c) {
return c ? (c = xb(a, b), vb.test(c) ? n(a).position()[b] + "px" : c) : void 0
})
}), n.each({
Height: "height",
Width: "width"
}, function(a, b) {
n.each({
padding: "inner" + a,
content: b,
"": "outer" + a
}, function(c, d) {
n.fn[d] = function(d, e) {
var f = arguments.length && (c || "boolean" != typeof d),
g = c || (d === !0 || e === !0 ? "margin" : "border");
return J(this, function(b, c, d) {
var e;
return n.isWindow(b) ? b.document.documentElement["client" + a] : 9 === b.nodeType ? (e = b.documentElement, Math.max(b.body["scroll" + a], e["scroll" + a], b.body["offset" + a], e["offset" + a], e["client" + a])) : void 0 === d ? n.css(b, c, g) : n.style(b, c, d, g)
}, b, f ? d : void 0, f, null)
}
})
}), n.fn.size = function() {
return this.length
}, n.fn.andSelf = n.fn.addBack, "function" == typeof define && define.amd && define("jquery", [], function() {
return n
});
var Kc = a.jQuery,
Lc = a.$;
return n.noConflict = function(b) {
return a.$ === n && (a.$ = Lc), b && a.jQuery === n && (a.jQuery = Kc), n
}, typeof b === U && (a.jQuery = a.$ = n), n
});
//# sourceMappingURL=jquery.min.map
// Underscore.js 1.8.3
// http://underscorejs.org
// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Underscore may be freely distributed under the MIT license.
(function() {
function n(n) {
function t(t, r, e, u, i, o) {
for (; i >= 0 && o > i; i += n) {
var a = u ? u[i] : i;
e = r(e, t[a], a, t)
}
return e
}
return function(r, e, u, i) {
e = b(e, i, 4);
var o = !k(r) && m.keys(r),
a = (o || r).length,
c = n > 0 ? 0 : a - 1;
return arguments.length < 3 && (u = r[o ? o[c] : c], c += n), t(r, e, u, o, c, a)
}
}
function t(n) {
return function(t, r, e) {
r = x(r, e);
for (var u = O(t), i = n > 0 ? 0 : u - 1; i >= 0 && u > i; i += n)
if (r(t[i], i, t)) return i;
return -1
}
}
function r(n, t, r) {
return function(e, u, i) {
var o = 0,
a = O(e);
if ("number" == typeof i) n > 0 ? o = i >= 0 ? i : Math.max(i + a, o) : a = i >= 0 ? Math.min(i + 1, a) : i + a + 1;
else if (r && i && a) return i = r(e, u), e[i] === u ? i : -1;
if (u !== u) return i = t(l.call(e, o, a), m.isNaN), i >= 0 ? i + o : -1;
for (i = n > 0 ? o : a - 1; i >= 0 && a > i; i += n)
if (e[i] === u) return i;
return -1
}
}
function e(n, t) {
var r = I.length,
e = n.constructor,
u = m.isFunction(e) && e.prototype || a,
i = "constructor";
for (m.has(n, i) && !m.contains(t, i) && t.push(i); r--;) i = I[r], i in n && n[i] !== u[i] && !m.contains(t, i) && t.push(i)
}
var u = this,
i = u._,
o = Array.prototype,
a = Object.prototype,
c = Function.prototype,
f = o.push,
l = o.slice,
s = a.toString,
p = a.hasOwnProperty,
h = Array.isArray,
v = Object.keys,
g = c.bind,
y = Object.create,
d = function() {},
m = function(n) {
return n instanceof m ? n : this instanceof m ? void(this._wrapped = n) : new m(n)
};
"undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = m), exports._ = m) : u._ = m, m.VERSION = "1.8.3";
var b = function(n, t, r) {
if (t === void 0) return n;
switch (null == r ? 3 : r) {
case 1:
return function(r) {
return n.call(t, r)
};
case 2:
return function(r, e) {
return n.call(t, r, e)
};
case 3:
return function(r, e, u) {
return n.call(t, r, e, u)
};
case 4:
return function(r, e, u, i) {
return n.call(t, r, e, u, i)
}
}
return function() {
return n.apply(t, arguments)
}
},
x = function(n, t, r) {
return null == n ? m.identity : m.isFunction(n) ? b(n, t, r) : m.isObject(n) ? m.matcher(n) : m.property(n)
};
m.iteratee = function(n, t) {
return x(n, t, 1 / 0)
};
var _ = function(n, t) {
return function(r) {
var e = arguments.length;
if (2 > e || null == r) return r;
for (var u = 1; e > u; u++)
for (var i = arguments[u], o = n(i), a = o.length, c = 0; a > c; c++) {
var f = o[c];
t && r[f] !== void 0 || (r[f] = i[f])
}
return r
}
},
j = function(n) {
if (!m.isObject(n)) return {};
if (y) return y(n);
d.prototype = n;
var t = new d;
return d.prototype = null, t
},
w = function(n) {
return function(t) {
return null == t ? void 0 : t[n]
}
},
A = Math.pow(2, 53) - 1,
O = w("length"),
k = function(n) {
var t = O(n);
return "number" == typeof t && t >= 0 && A >= t
};
m.each = m.forEach = function(n, t, r) {
t = b(t, r);
var e, u;
if (k(n))
for (e = 0, u = n.length; u > e; e++) t(n[e], e, n);
else {
var i = m.keys(n);
for (e = 0, u = i.length; u > e; e++) t(n[i[e]], i[e], n)
}
return n
}, m.map = m.collect = function(n, t, r) {
t = x(t, r);
for (var e = !k(n) && m.keys(n), u = (e || n).length, i = Array(u), o = 0; u > o; o++) {
var a = e ? e[o] : o;
i[o] = t(n[a], a, n)
}
return i
}, m.reduce = m.foldl = m.inject = n(1), m.reduceRight = m.foldr = n(-1), m.find = m.detect = function(n, t, r) {
var e;
return e = k(n) ? m.findIndex(n, t, r) : m.findKey(n, t, r), e !== void 0 && e !== -1 ? n[e] : void 0
}, m.filter = m.select = function(n, t, r) {
var e = [];
return t = x(t, r), m.each(n, function(n, r, u) {
t(n, r, u) && e.push(n)
}), e
}, m.reject = function(n, t, r) {
return m.filter(n, m.negate(x(t)), r)
}, m.every = m.all = function(n, t, r) {
t = x(t, r);
for (var e = !k(n) && m.keys(n), u = (e || n).length, i = 0; u > i; i++) {
var o = e ? e[i] : i;
if (!t(n[o], o, n)) return !1
}
return !0
}, m.some = m.any = function(n, t, r) {
t = x(t, r);
for (var e = !k(n) && m.keys(n), u = (e || n).length, i = 0; u > i; i++) {
var o = e ? e[i] : i;
if (t(n[o], o, n)) return !0
}
return !1
}, m.contains = m.includes = m.include = function(n, t, r, e) {
return k(n) || (n = m.values(n)), ("number" != typeof r || e) && (r = 0), m.indexOf(n, t, r) >= 0
}, m.invoke = function(n, t) {
var r = l.call(arguments, 2),
e = m.isFunction(t);
return m.map(n, function(n) {
var u = e ? t : n[t];
return null == u ? u : u.apply(n, r)
})
}, m.pluck = function(n, t) {
return m.map(n, m.property(t))
}, m.where = function(n, t) {
return m.filter(n, m.matcher(t))
}, m.findWhere = function(n, t) {
return m.find(n, m.matcher(t))
}, m.max = function(n, t, r) {
var e, u, i = -1 / 0,
o = -1 / 0;
if (null == t && null != n) {
n = k(n) ? n : m.values(n);
for (var a = 0, c = n.length; c > a; a++) e = n[a], e > i && (i = e)
} else t = x(t, r), m.each(n, function(n, r, e) {
u = t(n, r, e), (u > o || u === -1 / 0 && i === -1 / 0) && (i = n, o = u)
});
return i
}, m.min = function(n, t, r) {
var e, u, i = 1 / 0,
o = 1 / 0;
if (null == t && null != n) {
n = k(n) ? n : m.values(n);
for (var a = 0, c = n.length; c > a; a++) e = n[a], i > e && (i = e)
} else t = x(t, r), m.each(n, function(n, r, e) {
u = t(n, r, e), (o > u || 1 / 0 === u && 1 / 0 === i) && (i = n, o = u)
});
return i
}, m.shuffle = function(n) {
for (var t, r = k(n) ? n : m.values(n), e = r.length, u = Array(e), i = 0; e > i; i++) t = m.random(0, i), t !== i && (u[i] = u[t]), u[t] = r[i];
return u
}, m.sample = function(n, t, r) {
return null == t || r ? (k(n) || (n = m.values(n)), n[m.random(n.length - 1)]) : m.shuffle(n).slice(0, Math.max(0, t))
}, m.sortBy = function(n, t, r) {
return t = x(t, r), m.pluck(m.map(n, function(n, r, e) {
return {
value: n,
index: r,
criteria: t(n, r, e)
}
}).sort(function(n, t) {
var r = n.criteria,
e = t.criteria;
if (r !== e) {
if (r > e || r === void 0) return 1;
if (e > r || e === void 0) return -1
}
return n.index - t.index
}), "value")
};
var F = function(n) {
return function(t, r, e) {
var u = {};
return r = x(r, e), m.each(t, function(e, i) {
var o = r(e, i, t);
n(u, e, o)
}), u
}
};
m.groupBy = F(function(n, t, r) {
m.has(n, r) ? n[r].push(t) : n[r] = [t]
}), m.indexBy = F(function(n, t, r) {
n[r] = t
}), m.countBy = F(function(n, t, r) {
m.has(n, r) ? n[r]++ : n[r] = 1
}), m.toArray = function(n) {
return n ? m.isArray(n) ? l.call(n) : k(n) ? m.map(n, m.identity) : m.values(n) : []
}, m.size = function(n) {
return null == n ? 0 : k(n) ? n.length : m.keys(n).length
}, m.partition = function(n, t, r) {
t = x(t, r);
var e = [],
u = [];
return m.each(n, function(n, r, i) {
(t(n, r, i) ? e : u).push(n)
}), [e, u]
}, m.first = m.head = m.take = function(n, t, r) {
return null == n ? void 0 : null == t || r ? n[0] : m.initial(n, n.length - t)
}, m.initial = function(n, t, r) {
return l.call(n, 0, Math.max(0, n.length - (null == t || r ? 1 : t)))
}, m.last = function(n, t, r) {
return null == n ? void 0 : null == t || r ? n[n.length - 1] : m.rest(n, Math.max(0, n.length - t))
}, m.rest = m.tail = m.drop = function(n, t, r) {
return l.call(n, null == t || r ? 1 : t)
}, m.compact = function(n) {
return m.filter(n, m.identity)
};
var S = function(n, t, r, e) {
for (var u = [], i = 0, o = e || 0, a = O(n); a > o; o++) {
var c = n[o];
if (k(c) && (m.isArray(c) || m.isArguments(c))) {
t || (c = S(c, t, r));
var f = 0,
l = c.length;
for (u.length += l; l > f;) u[i++] = c[f++]
} else r || (u[i++] = c)
}
return u
};
m.flatten = function(n, t) {
return S(n, t, !1)
}, m.without = function(n) {
return m.difference(n, l.call(arguments, 1))
}, m.uniq = m.unique = function(n, t, r, e) {
m.isBoolean(t) || (e = r, r = t, t = !1), null != r && (r = x(r, e));
for (var u = [], i = [], o = 0, a = O(n); a > o; o++) {
var c = n[o],
f = r ? r(c, o, n) : c;
t ? (o && i === f || u.push(c), i = f) : r ? m.contains(i, f) || (i.push(f), u.push(c)) : m.contains(u, c) || u.push(c)
}
return u
}, m.union = function() {
return m.uniq(S(arguments, !0, !0))
}, m.intersection = function(n) {
for (var t = [], r = arguments.length, e = 0, u = O(n); u > e; e++) {
var i = n[e];
if (!m.contains(t, i)) {
for (var o = 1; r > o && m.contains(arguments[o], i); o++);
o === r && t.push(i)
}
}
return t
}, m.difference = function(n) {
var t = S(arguments, !0, !0, 1);
return m.filter(n, function(n) {
return !m.contains(t, n)
})
}, m.zip = function() {
return m.unzip(arguments)
}, m.unzip = function(n) {
for (var t = n && m.max(n, O).length || 0, r = Array(t), e = 0; t > e; e++) r[e] = m.pluck(n, e);
return r
}, m.object = function(n, t) {
for (var r = {}, e = 0, u = O(n); u > e; e++) t ? r[n[e]] = t[e] : r[n[e][0]] = n[e][1];
return r
}, m.findIndex = t(1), m.findLastIndex = t(-1), m.sortedIndex = function(n, t, r, e) {
r = x(r, e, 1);
for (var u = r(t), i = 0, o = O(n); o > i;) {
var a = Math.floor((i + o) / 2);
r(n[a]) < u ? i = a + 1 : o = a
}
return i
}, m.indexOf = r(1, m.findIndex, m.sortedIndex), m.lastIndexOf = r(-1, m.findLastIndex), m.range = function(n, t, r) {
null == t && (t = n || 0, n = 0), r = r || 1;
for (var e = Math.max(Math.ceil((t - n) / r), 0), u = Array(e), i = 0; e > i; i++, n += r) u[i] = n;
return u
};
var E = function(n, t, r, e, u) {
if (!(e instanceof t)) return n.apply(r, u);
var i = j(n.prototype),
o = n.apply(i, u);
return m.isObject(o) ? o : i
};
m.bind = function(n, t) {
if (g && n.bind === g) return g.apply(n, l.call(arguments, 1));
if (!m.isFunction(n)) throw new TypeError("Bind must be called on a function");
var r = l.call(arguments, 2),
e = function() {
return E(n, e, t, this, r.concat(l.call(arguments)))
};
return e
}, m.partial = function(n) {
var t = l.call(arguments, 1),
r = function() {
for (var e = 0, u = t.length, i = Array(u), o = 0; u > o; o++) i[o] = t[o] === m ? arguments[e++] : t[o];
for (; e < arguments.length;) i.push(arguments[e++]);
return E(n, r, this, this, i)
};
return r
}, m.bindAll = function(n) {
var t, r, e = arguments.length;
if (1 >= e) throw new Error("bindAll must be passed function names");
for (t = 1; e > t; t++) r = arguments[t], n[r] = m.bind(n[r], n);
return n
}, m.memoize = function(n, t) {
var r = function(e) {
var u = r.cache,
i = "" + (t ? t.apply(this, arguments) : e);
return m.has(u, i) || (u[i] = n.apply(this, arguments)), u[i]
};
return r.cache = {}, r
}, m.delay = function(n, t) {
var r = l.call(arguments, 2);
return setTimeout(function() {
return n.apply(null, r)
}, t)
}, m.defer = m.partial(m.delay, m, 1), m.throttle = function(n, t, r) {
var e, u, i, o = null,
a = 0;
r || (r = {});
var c = function() {
a = r.leading === !1 ? 0 : m.now(), o = null, i = n.apply(e, u), o || (e = u = null)
};
return function() {
var f = m.now();
a || r.leading !== !1 || (a = f);
var l = t - (f - a);
return e = this, u = arguments, 0 >= l || l > t ? (o && (clearTimeout(o), o = null), a = f, i = n.apply(e, u), o || (e = u = null)) : o || r.trailing === !1 || (o = setTimeout(c, l)), i
}
}, m.debounce = function(n, t, r) {
var e, u, i, o, a, c = function() {
var f = m.now() - o;
t > f && f >= 0 ? e = setTimeout(c, t - f) : (e = null, r || (a = n.apply(i, u), e || (i = u = null)))
};
return function() {
i = this, u = arguments, o = m.now();
var f = r && !e;
return e || (e = setTimeout(c, t)), f && (a = n.apply(i, u), i = u = null), a
}
}, m.wrap = function(n, t) {
return m.partial(t, n)
}, m.negate = function(n) {
return function() {
return !n.apply(this, arguments)
}
}, m.compose = function() {
var n = arguments,
t = n.length - 1;
return function() {
for (var r = t, e = n[t].apply(this, arguments); r--;) e = n[r].call(this, e);
return e
}
}, m.after = function(n, t) {
return function() {
return --n < 1 ? t.apply(this, arguments) : void 0
}
}, m.before = function(n, t) {
var r;
return function() {
return --n > 0 && (r = t.apply(this, arguments)), 1 >= n && (t = null), r
}
}, m.once = m.partial(m.before, 2);
var M = !{
toString: null
}.propertyIsEnumerable("toString"),
I = ["valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"];
m.keys = function(n) {
if (!m.isObject(n)) return [];
if (v) return v(n);
var t = [];
for (var r in n) m.has(n, r) && t.push(r);
return M && e(n, t), t
}, m.allKeys = function(n) {
if (!m.isObject(n)) return [];
var t = [];
for (var r in n) t.push(r);
return M && e(n, t), t
}, m.values = function(n) {
for (var t = m.keys(n), r = t.length, e = Array(r), u = 0; r > u; u++) e[u] = n[t[u]];
return e
}, m.mapObject = function(n, t, r) {
t = x(t, r);
for (var e, u = m.keys(n), i = u.length, o = {}, a = 0; i > a; a++) e = u[a], o[e] = t(n[e], e, n);
return o
}, m.pairs = function(n) {
for (var t = m.keys(n), r = t.length, e = Array(r), u = 0; r > u; u++) e[u] = [t[u], n[t[u]]];
return e
}, m.invert = function(n) {
for (var t = {}, r = m.keys(n), e = 0, u = r.length; u > e; e++) t[n[r[e]]] = r[e];
return t
}, m.functions = m.methods = function(n) {
var t = [];
for (var r in n) m.isFunction(n[r]) && t.push(r);
return t.sort()
}, m.extend = _(m.allKeys), m.extendOwn = m.assign = _(m.keys), m.findKey = function(n, t, r) {
t = x(t, r);
for (var e, u = m.keys(n), i = 0, o = u.length; o > i; i++)
if (e = u[i], t(n[e], e, n)) return e
}, m.pick = function(n, t, r) {
var e, u, i = {},
o = n;
if (null == o) return i;
m.isFunction(t) ? (u = m.allKeys(o), e = b(t, r)) : (u = S(arguments, !1, !1, 1), e = function(n, t, r) {
return t in r
}, o = Object(o));
for (var a = 0, c = u.length; c > a; a++) {
var f = u[a],
l = o[f];
e(l, f, o) && (i[f] = l)
}
return i
}, m.omit = function(n, t, r) {
if (m.isFunction(t)) t = m.negate(t);
else {
var e = m.map(S(arguments, !1, !1, 1), String);
t = function(n, t) {
return !m.contains(e, t)
}
}
return m.pick(n, t, r)
}, m.defaults = _(m.allKeys, !0), m.create = function(n, t) {
var r = j(n);
return t && m.extendOwn(r, t), r
}, m.clone = function(n) {
return m.isObject(n) ? m.isArray(n) ? n.slice() : m.extend({}, n) : n
}, m.tap = function(n, t) {
return t(n), n
}, m.isMatch = function(n, t) {
var r = m.keys(t),
e = r.length;
if (null == n) return !e;
for (var u = Object(n), i = 0; e > i; i++) {
var o = r[i];
if (t[o] !== u[o] || !(o in u)) return !1
}
return !0
};
var N = function(n, t, r, e) {
if (n === t) return 0 !== n || 1 / n === 1 / t;
if (null == n || null == t) return n === t;
n instanceof m && (n = n._wrapped), t instanceof m && (t = t._wrapped);
var u = s.call(n);
if (u !== s.call(t)) return !1;
switch (u) {
case "[object RegExp]":
case "[object String]":
return "" + n == "" + t;
case "[object Number]":
return +n !== +n ? +t !== +t : 0 === +n ? 1 / +n === 1 / t : +n === +t;
case "[object Date]":
case "[object Boolean]":
return +n === +t
}
var i = "[object Array]" === u;
if (!i) {
if ("object" != typeof n || "object" != typeof t) return !1;
var o = n.constructor,
a = t.constructor;
if (o !== a && !(m.isFunction(o) && o instanceof o && m.isFunction(a) && a instanceof a) && "constructor" in n && "constructor" in t) return !1
}
r = r || [], e = e || [];
for (var c = r.length; c--;)
if (r[c] === n) return e[c] === t;
if (r.push(n), e.push(t), i) {
if (c = n.length, c !== t.length) return !1;
for (; c--;)
if (!N(n[c], t[c], r, e)) return !1
} else {
var f, l = m.keys(n);
if (c = l.length, m.keys(t).length !== c) return !1;
for (; c--;)
if (f = l[c], !m.has(t, f) || !N(n[f], t[f], r, e)) return !1
}
return r.pop(), e.pop(), !0
};
m.isEqual = function(n, t) {
return N(n, t)
}, m.isEmpty = function(n) {
return null == n ? !0 : k(n) && (m.isArray(n) || m.isString(n) || m.isArguments(n)) ? 0 === n.length : 0 === m.keys(n).length
}, m.isElement = function(n) {
return !(!n || 1 !== n.nodeType)
}, m.isArray = h || function(n) {
return "[object Array]" === s.call(n)
}, m.isObject = function(n) {
var t = typeof n;
return "function" === t || "object" === t && !!n
}, m.each(["Arguments", "Function", "String", "Number", "Date", "RegExp", "Error"], function(n) {
m["is" + n] = function(t) {
return s.call(t) === "[object " + n + "]"
}
}), m.isArguments(arguments) || (m.isArguments = function(n) {
return m.has(n, "callee")
}), "function" != typeof /./ && "object" != typeof Int8Array && (m.isFunction = function(n) {
return "function" == typeof n || !1
}), m.isFinite = function(n) {
return isFinite(n) && !isNaN(parseFloat(n))
}, m.isNaN = function(n) {
return m.isNumber(n) && n !== +n
}, m.isBoolean = function(n) {
return n === !0 || n === !1 || "[object Boolean]" === s.call(n)
}, m.isNull = function(n) {
return null === n
}, m.isUndefined = function(n) {
return n === void 0
}, m.has = function(n, t) {
return null != n && p.call(n, t)
}, m.noConflict = function() {
return u._ = i, this
}, m.identity = function(n) {
return n
}, m.constant = function(n) {
return function() {
return n
}
}, m.noop = function() {}, m.property = w, m.propertyOf = function(n) {
return null == n ? function() {} : function(t) {
return n[t]
}
}, m.matcher = m.matches = function(n) {
return n = m.extendOwn({}, n),
function(t) {
return m.isMatch(t, n)
}
}, m.times = function(n, t, r) {
var e = Array(Math.max(0, n));
t = b(t, r, 1);
for (var u = 0; n > u; u++) e[u] = t(u);
return e
}, m.random = function(n, t) {
return null == t && (t = n, n = 0), n + Math.floor(Math.random() * (t - n + 1))
}, m.now = Date.now || function() {
return (new Date).getTime()
};
var B = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#x27;",
"`": "&#x60;"
},
T = m.invert(B),
R = function(n) {
var t = function(t) {
return n[t]
},
r = "(?:" + m.keys(n).join("|") + ")",
e = RegExp(r),
u = RegExp(r, "g");
return function(n) {
return n = null == n ? "" : "" + n, e.test(n) ? n.replace(u, t) : n
}
};
m.escape = R(B), m.unescape = R(T), m.result = function(n, t, r) {
var e = null == n ? void 0 : n[t];
return e === void 0 && (e = r), m.isFunction(e) ? e.call(n) : e
};
var q = 0;
m.uniqueId = function(n) {
var t = ++q + "";
return n ? n + t : t
}, m.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g
};
var K = /(.)^/,
z = {
"'": "'",
"\\": "\\",
"\r": "r",
"\n": "n",
"\u2028": "u2028",
"\u2029": "u2029"
},
D = /\\|'|\r|\n|\u2028|\u2029/g,
L = function(n) {
return "\\" + z[n]
};
m.template = function(n, t, r) {
!t && r && (t = r), t = m.defaults({}, t, m.templateSettings);
var e = RegExp([(t.escape || K).source, (t.interpolate || K).source, (t.evaluate || K).source].join("|") + "|$", "g"),
u = 0,
i = "__p+='";
n.replace(e, function(t, r, e, o, a) {
return i += n.slice(u, a).replace(D, L), u = a + t.length, r ? i += "'+\n((__t=(" + r + "))==null?'':_.escape(__t))+\n'" : e ? i += "'+\n((__t=(" + e + "))==null?'':__t)+\n'" : o && (i += "';\n" + o + "\n__p+='"), t
}), i += "';\n", t.variable || (i = "with(obj||{}){\n" + i + "}\n"), i = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + i + "return __p;\n";
try {
var o = new Function(t.variable || "obj", "_", i)
} catch (a) {
throw a.source = i, a
}
var c = function(n) {
return o.call(this, n, m)
},
f = t.variable || "obj";
return c.source = "function(" + f + "){\n" + i + "}", c
}, m.chain = function(n) {
var t = m(n);
return t._chain = !0, t
};
var P = function(n, t) {
return n._chain ? m(t).chain() : t
};
m.mixin = function(n) {
m.each(m.functions(n), function(t) {
var r = m[t] = n[t];
m.prototype[t] = function() {
var n = [this._wrapped];
return f.apply(n, arguments), P(this, r.apply(m, n))
}
})
}, m.mixin(m), m.each(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function(n) {
var t = o[n];
m.prototype[n] = function() {
var r = this._wrapped;
return t.apply(r, arguments), "shift" !== n && "splice" !== n || 0 !== r.length || delete r[0], P(this, r)
}
}), m.each(["concat", "join", "slice"], function(n) {
var t = o[n];
m.prototype[n] = function() {
return P(this, t.apply(this._wrapped, arguments))
}
}), m.prototype.value = function() {
return this._wrapped
}, m.prototype.valueOf = m.prototype.toJSON = m.prototype.value, m.prototype.toString = function() {
return "" + this._wrapped
}, "function" == typeof define && define.amd && define("underscore", [], function() {
return m
})
}).call(this);
//# sourceMappingURL=underscore-min.map
(function(t) {
var e = typeof self == "object" && self.self == self && self || typeof global == "object" && global.global == global && global;
if (typeof define === "function" && define.amd) {
define(["underscore", "jquery", "exports"], function(i, r, s) {
e.Backbone = t(e, s, i, r)
})
} else if (typeof exports !== "undefined") {
var i = require("underscore"),
r;
try {
r = require("jquery")
} catch (s) {}
t(e, exports, i, r)
} else {
e.Backbone = t(e, {}, e._, e.jQuery || e.Zepto || e.ender || e.$)
}
})(function(t, e, i, r) {
var s = t.Backbone;
var n = [].slice;
e.VERSION = "1.2.1";
e.$ = r;
e.noConflict = function() {
t.Backbone = s;
return this
};
e.emulateHTTP = false;
e.emulateJSON = false;
var a = function(t, e, r) {
switch (t) {
case 1:
return function() {
return i[e](this[r])
};
case 2:
return function(t) {
return i[e](this[r], t)
};
case 3:
return function(t, s) {
return i[e](this[r], t, s)
};
case 4:
return function(t, s, n) {
return i[e](this[r], t, s, n)
};
default:
return function() {
var t = n.call(arguments);
t.unshift(this[r]);
return i[e].apply(i, t)
}
}
};
var o = function(t, e, r) {
i.each(e, function(e, s) {
if (i[s]) t.prototype[s] = a(e, s, r)
})
};
var h = e.Events = {};
var u = /\s+/;
var l = function(t, e, r, s, n) {
var a = 0,
o;
if (r && typeof r === "object") {
if (s !== void 0 && "context" in n && n.context === void 0) n.context = s;
for (o = i.keys(r); a < o.length; a++) {
e = t(e, o[a], r[o[a]], n)
}
} else if (r && u.test(r)) {
for (o = r.split(u); a < o.length; a++) {
e = t(e, o[a], s, n)
}
} else {
e = t(e, r, s, n)
}
return e
};
h.on = function(t, e, i) {
return c(this, t, e, i)
};
var c = function(t, e, i, r, s) {
t._events = l(f, t._events || {}, e, i, {
context: r,
ctx: t,
listening: s
});
if (s) {
var n = t._listeners || (t._listeners = {});
n[s.id] = s
}
return t
};
h.listenTo = function(t, e, r) {
if (!t) return this;
var s = t._listenId || (t._listenId = i.uniqueId("l"));
var n = this._listeningTo || (this._listeningTo = {});
var a = n[s];
if (!a) {
var o = this._listenId || (this._listenId = i.uniqueId("l"));
a = n[s] = {
obj: t,
objId: s,
id: o,
listeningTo: n,
count: 0
}
}
c(t, e, r, this, a);
return this
};
var f = function(t, e, i, r) {
if (i) {
var s = t[e] || (t[e] = []);
var n = r.context,
a = r.ctx,
o = r.listening;
if (o) o.count++;
s.push({
callback: i,
context: n,
ctx: n || a,
listening: o
})
}
return t
};
h.off = function(t, e, i) {
if (!this._events) return this;
this._events = l(d, this._events, t, e, {
context: i,
listeners: this._listeners
});
return this
};
h.stopListening = function(t, e, r) {
var s = this._listeningTo;
if (!s) return this;
var n = t ? [t._listenId] : i.keys(s);
for (var a = 0; a < n.length; a++) {
var o = s[n[a]];
if (!o) break;
o.obj.off(e, r, this)
}
if (i.isEmpty(s)) this._listeningTo = void 0;
return this
};
var d = function(t, e, r, s) {
if (!t) return;
var n = 0,
a;
var o = s.context,
h = s.listeners;
if (!e && !r && !o) {
var u = i.keys(h);
for (; n < u.length; n++) {
a = h[u[n]];
delete h[a.id];
delete a.listeningTo[a.objId]
}
return
}
var l = e ? [e] : i.keys(t);
for (; n < l.length; n++) {
e = l[n];
var c = t[e];
if (!c) break;
var f = [];
for (var d = 0; d < c.length; d++) {
var v = c[d];
if (r && r !== v.callback && r !== v.callback._callback || o && o !== v.context) {
f.push(v)
} else {
a = v.listening;
if (a && --a.count === 0) {
delete h[a.id];
delete a.listeningTo[a.objId]
}
}
}
if (f.length) {
t[e] = f
} else {
delete t[e]
}
}
if (i.size(t)) return t
};
h.once = function(t, e, r) {
var s = l(v, {}, t, e, i.bind(this.off, this));
return this.on(s, void 0, r)
};
h.listenToOnce = function(t, e, r) {
var s = l(v, {}, e, r, i.bind(this.stopListening, this, t));
return this.listenTo(t, s)
};
var v = function(t, e, r, s) {
if (r) {
var n = t[e] = i.once(function() {
s(e, n);
r.apply(this, arguments)
});
n._callback = r
}
return t
};
h.trigger = function(t) {
if (!this._events) return this;
var e = Math.max(0, arguments.length - 1);
var i = Array(e);
for (var r = 0; r < e; r++) i[r] = arguments[r + 1];
l(g, this._events, t, void 0, i);
return this
};
var g = function(t, e, i, r) {
if (t) {
var s = t[e];
var n = t.all;
if (s && n) n = n.slice();
if (s) p(s, r);
if (n) p(n, [e].concat(r))
}
return t
};
var p = function(t, e) {
var i, r = -1,
s = t.length,
n = e[0],
a = e[1],
o = e[2];
switch (e.length) {
case 0:
while (++r < s)(i = t[r]).callback.call(i.ctx);
return;
case 1:
while (++r < s)(i = t[r]).callback.call(i.ctx, n);
return;
case 2:
while (++r < s)(i = t[r]).callback.call(i.ctx, n, a);
return;
case 3:
while (++r < s)(i = t[r]).callback.call(i.ctx, n, a, o);
return;
default:
while (++r < s)(i = t[r]).callback.apply(i.ctx, e);
return
}
};
h.bind = h.on;
h.unbind = h.off;
i.extend(e, h);
var m = e.Model = function(t, e) {
var r = t || {};
e || (e = {});
this.cid = i.uniqueId(this.cidPrefix);
this.attributes = {};
if (e.collection) this.collection = e.collection;
if (e.parse) r = this.parse(r, e) || {};
r = i.defaults({}, r, i.result(this, "defaults"));
this.set(r, e);
this.changed = {};
this.initialize.apply(this, arguments)
};
i.extend(m.prototype, h, {
changed: null,
validationError: null,
idAttribute: "id",
cidPrefix: "c",
initialize: function() {},
toJSON: function(t) {
return i.clone(this.attributes)
},
sync: function() {
return e.sync.apply(this, arguments)
},
get: function(t) {
return this.attributes[t]
},
escape: function(t) {
return i.escape(this.get(t))
},
has: function(t) {
return this.get(t) != null
},
matches: function(t) {
return !!i.iteratee(t, this)(this.attributes)
},
set: function(t, e, r) {
if (t == null) return this;
var s;
if (typeof t === "object") {
s = t;
r = e
} else {
(s = {})[t] = e
}
r || (r = {});
if (!this._validate(s, r)) return false;
var n = r.unset;
var a = r.silent;
var o = [];
var h = this._changing;
this._changing = true;
if (!h) {
this._previousAttributes = i.clone(this.attributes);
this.changed = {}
}
var u = this.attributes;
var l = this.changed;
var c = this._previousAttributes;
if (this.idAttribute in s) this.id = s[this.idAttribute];
for (var f in s) {
e = s[f];
if (!i.isEqual(u[f], e)) o.push(f);
if (!i.isEqual(c[f], e)) {
l[f] = e
} else {
delete l[f]
}
n ? delete u[f] : u[f] = e
}
if (!a) {
if (o.length) this._pending = r;
for (var d = 0; d < o.length; d++) {
this.trigger("change:" + o[d], this, u[o[d]], r)
}
}
if (h) return this;
if (!a) {
while (this._pending) {
r = this._pending;
this._pending = false;
this.trigger("change", this, r)
}
}
this._pending = false;
this._changing = false;
return this
},
unset: function(t, e) {
return this.set(t, void 0, i.extend({}, e, {
unset: true
}))
},
clear: function(t) {
var e = {};
for (var r in this.attributes) e[r] = void 0;
return this.set(e, i.extend({}, t, {
unset: true
}))
},
hasChanged: function(t) {
if (t == null) return !i.isEmpty(this.changed);
return i.has(this.changed, t)
},
changedAttributes: function(t) {
if (!t) return this.hasChanged() ? i.clone(this.changed) : false;
var e = this._changing ? this._previousAttributes : this.attributes;
var r = {};
for (var s in t) {
var n = t[s];
if (i.isEqual(e[s], n)) continue;
r[s] = n
}
return i.size(r) ? r : false
},
previous: function(t) {
if (t == null || !this._previousAttributes) return null;
return this._previousAttributes[t]
},
previousAttributes: function() {
return i.clone(this._previousAttributes)
},
fetch: function(t) {
t = i.extend({
parse: true
}, t);
var e = this;
var r = t.success;
t.success = function(i) {
var s = t.parse ? e.parse(i, t) : i;
if (!e.set(s, t)) return false;
if (r) r.call(t.context, e, i, t);
e.trigger("sync", e, i, t)
};
q(this, t);
return this.sync("read", this, t)
},
save: function(t, e, r) {
var s;
if (t == null || typeof t === "object") {
s = t;
r = e
} else {
(s = {})[t] = e
}
r = i.extend({
validate: true,
parse: true
}, r);
var n = r.wait;
if (s && !n) {
if (!this.set(s, r)) return false
} else {
if (!this._validate(s, r)) return false
}
var a = this;
var o = r.success;
var h = this.attributes;
r.success = function(t) {
a.attributes = h;
var e = r.parse ? a.parse(t, r) : t;
if (n) e = i.extend({}, s, e);
if (e && !a.set(e, r)) return false;
if (o) o.call(r.context, a, t, r);
a.trigger("sync", a, t, r)
};
q(this, r);
if (s && n) this.attributes = i.extend({}, h, s);
var u = this.isNew() ? "create" : r.patch ? "patch" : "update";
if (u === "patch" && !r.attrs) r.attrs = s;
var l = this.sync(u, this, r);
this.attributes = h;
return l
},
destroy: function(t) {
t = t ? i.clone(t) : {};
var e = this;
var r = t.success;
var s = t.wait;
var n = function() {
e.stopListening();
e.trigger("destroy", e, e.collection, t)
};
t.success = function(i) {
if (s) n();
if (r) r.call(t.context, e, i, t);
if (!e.isNew()) e.trigger("sync", e, i, t)
};
var a = false;
if (this.isNew()) {
i.defer(t.success)
} else {
q(this, t);
a = this.sync("delete", this, t)
}
if (!s) n();
return a
},
url: function() {
var t = i.result(this, "urlRoot") || i.result(this.collection, "url") || M();
if (this.isNew()) return t;
var e = this.get(this.idAttribute);
return t.replace(/[^\/]$/, "$&/") + encodeURIComponent(e)
},
parse: function(t, e) {
return t
},
clone: function() {
return new this.constructor(this.attributes)
},
isNew: function() {
return !this.has(this.idAttribute)
},
isValid: function(t) {
return this._validate({}, i.defaults({
validate: true
}, t))
},
_validate: function(t, e) {
if (!e.validate || !this.validate) return true;
t = i.extend({}, this.attributes, t);
var r = this.validationError = this.validate(t, e) || null;
if (!r) return true;
this.trigger("invalid", this, r, i.extend(e, {
validationError: r
}));
return false
}
});
var _ = {
keys: 1,
values: 1,
pairs: 1,
invert: 1,
pick: 0,
omit: 0,
chain: 1,
isEmpty: 1
};
o(m, _, "attributes");
var y = e.Collection = function(t, e) {
e || (e = {});
if (e.model) this.model = e.model;
if (e.comparator !== void 0) this.comparator = e.comparator;
this._reset();
this.initialize.apply(this, arguments);
if (t) this.reset(t, i.extend({
silent: true
}, e))
};
var b = {
add: true,
remove: true,
merge: true
};
var x = {
add: true,
remove: false
};
i.extend(y.prototype, h, {
model: m,
initialize: function() {},
toJSON: function(t) {
return this.map(function(e) {
return e.toJSON(t)
})
},
sync: function() {
return e.sync.apply(this, arguments)
},
add: function(t, e) {
return this.set(t, i.extend({
merge: false
}, e, x))
},
remove: function(t, e) {
e = i.extend({}, e);
var r = !i.isArray(t);
t = r ? [t] : i.clone(t);
var s = this._removeModels(t, e);
if (!e.silent && s) this.trigger("update", this, e);
return r ? s[0] : s
},
set: function(t, e) {
e = i.defaults({}, e, b);
if (e.parse && !this._isModel(t)) t = this.parse(t, e);
var r = !i.isArray(t);
t = r ? t ? [t] : [] : t.slice();
var s, n, a, o, h;
var u = e.at;
if (u != null) u = +u;
if (u < 0) u += this.length + 1;
var l = this.comparator && u == null && e.sort !== false;
var c = i.isString(this.comparator) ? this.comparator : null;
var f = [],
d = [],
v = {};
var g = e.add,
p = e.merge,
m = e.remove;
var _ = !l && g && m ? [] : false;
var y = false;
for (var x = 0; x < t.length; x++) {
a = t[x];
if (o = this.get(a)) {
if (m) v[o.cid] = true;
if (p && a !== o) {
a = this._isModel(a) ? a.attributes : a;
if (e.parse) a = o.parse(a, e);
o.set(a, e);
if (l && !h && o.hasChanged(c)) h = true
}
t[x] = o
} else if (g) {
n = t[x] = this._prepareModel(a, e);
if (!n) continue;
f.push(n);
this._addReference(n, e)
}
n = o || n;
if (!n) continue;
s = this.modelId(n.attributes);
if (_ && (n.isNew() || !v[s])) {
_.push(n);
y = y || !this.models[x] || n.cid !== this.models[x].cid
}
v[s] = true
}
if (m) {
for (var x = 0; x < this.length; x++) {
if (!v[(n = this.models[x]).cid]) d.push(n)
}
if (d.length) this._removeModels(d, e)
}
if (f.length || y) {
if (l) h = true;
this.length += f.length;
if (u != null) {
for (var x = 0; x < f.length; x++) {
this.models.splice(u + x, 0, f[x])
}
} else {
if (_) this.models.length = 0;
var w = _ || f;
for (var x = 0; x < w.length; x++) {
this.models.push(w[x])
}
}
}
if (h) this.sort({
silent: true
});
if (!e.silent) {
var E = u != null ? i.clone(e) : e;
for (var x = 0; x < f.length; x++) {
if (u != null) E.index = u + x;
(n = f[x]).trigger("add", n, this, E)
}
if (h || y) this.trigger("sort", this, e);
if (f.length || d.length) this.trigger("update", this, e)
}
return r ? t[0] : t
},
reset: function(t, e) {
e = e ? i.clone(e) : {};
for (var r = 0; r < this.models.length; r++) {
this._removeReference(this.models[r], e)
}
e.previousModels = this.models;
this._reset();
t = this.add(t, i.extend({
silent: true
}, e));
if (!e.silent) this.trigger("reset", this, e);
return t
},
push: function(t, e) {
return this.add(t, i.extend({
at: this.length
}, e))
},
pop: function(t) {
var e = this.at(this.length - 1);
return this.remove(e, t)
},
unshift: function(t, e) {
return this.add(t, i.extend({
at: 0
}, e))
},
shift: function(t) {
var e = this.at(0);
return this.remove(e, t)
},
slice: function() {
return n.apply(this.models, arguments)
},
get: function(t) {
if (t == null) return void 0;
var e = this.modelId(this._isModel(t) ? t.attributes : t);
return this._byId[t] || this._byId[e] || this._byId[t.cid]
},
at: function(t) {
if (t < 0) t += this.length;
return this.models[t]
},
where: function(t, e) {
var r = i.matches(t);
return this[e ? "find" : "filter"](function(t) {
return r(t.attributes)
})
},
findWhere: function(t) {
return this.where(t, true)
},
sort: function(t) {
if (!this.comparator) throw new Error("Cannot sort a set without a comparator");
t || (t = {});
if (i.isString(this.comparator) || this.comparator.length === 1) {
this.models = this.sortBy(this.comparator, this)
} else {
this.models.sort(i.bind(this.comparator, this))
}
if (!t.silent) this.trigger("sort", this, t);
return this
},
pluck: function(t) {
return i.invoke(this.models, "get", t)
},
fetch: function(t) {
t = i.extend({
parse: true
}, t);
var e = t.success;
var r = this;
t.success = function(i) {
var s = t.reset ? "reset" : "set";
r[s](i, t);
if (e) e.call(t.context, r, i, t);
r.trigger("sync", r, i, t)
};
q(this, t);
return this.sync("read", this, t)
},
create: function(t, e) {
e = e ? i.clone(e) : {};
var r = e.wait;
t = this._prepareModel(t, e);
if (!t) return false;
if (!r) this.add(t, e);
var s = this;
var n = e.success;
e.success = function(t, e, i) {
if (r) s.add(t, i);
if (n) n.call(i.context, t, e, i)
};
t.save(null, e);
return t
},
parse: function(t, e) {
return t
},
clone: function() {
return new this.constructor(this.models, {
model: this.model,
comparator: this.comparator
})
},
modelId: function(t) {
return t[this.model.prototype.idAttribute || "id"]
},
_reset: function() {
this.length = 0;
this.models = [];
this._byId = {}
},
_prepareModel: function(t, e) {
if (this._isModel(t)) {
if (!t.collection) t.collection = this;
return t
}
e = e ? i.clone(e) : {};
e.collection = this;
var r = new this.model(t, e);
if (!r.validationError) return r;
this.trigger("invalid", this, r.validationError, e);
return false
},
_removeModels: function(t, e) {
var i = [];
for (var r = 0; r < t.length; r++) {
var s = this.get(t[r]);
if (!s) continue;
var n = this.indexOf(s);
this.models.splice(n, 1);
this.length--;
if (!e.silent) {
e.index = n;
s.trigger("remove", s, this, e)
}
i.push(s);
this._removeReference(s, e)
}
return i.length ? i : false
},
_isModel: function(t) {
return t instanceof m
},
_addReference: function(t, e) {
this._byId[t.cid] = t;
var i = this.modelId(t.attributes);
if (i != null) this._byId[i] = t;
t.on("all", this._onModelEvent, this)
},
_removeReference: function(t, e) {
delete this._byId[t.cid];
var i = this.modelId(t.attributes);
if (i != null) delete this._byId[i];
if (this === t.collection) delete t.collection;
t.off("all", this._onModelEvent, this)
},
_onModelEvent: function(t, e, i, r) {
if ((t === "add" || t === "remove") && i !== this) return;
if (t === "destroy") this.remove(e, r);
if (t === "change") {
var s = this.modelId(e.previousAttributes());
var n = this.modelId(e.attributes);
if (s !== n) {
if (s != null) delete this._byId[s];
if (n != null) this._byId[n] = e
}
}
this.trigger.apply(this, arguments)
}
});
var w = {
forEach: 3,
each: 3,
map: 3,
collect: 3,
reduce: 4,
foldl: 4,
inject: 4,
reduceRight: 4,
foldr: 4,
find: 3,
detect: 3,
filter: 3,
select: 3,
reject: 3,
every: 3,
all: 3,
some: 3,
any: 3,
include: 2,
contains: 2,
invoke: 0,
max: 3,
min: 3,
toArray: 1,
size: 1,
first: 3,
head: 3,
take: 3,
initial: 3,
rest: 3,
tail: 3,
drop: 3,
last: 3,
without: 0,
difference: 0,
indexOf: 3,
shuffle: 1,
lastIndexOf: 3,
isEmpty: 1,
chain: 1,
sample: 3,
partition: 3
};
o(y, w, "models");
var E = ["groupBy", "countBy", "sortBy", "indexBy"];
i.each(E, function(t) {
if (!i[t]) return;
y.prototype[t] = function(e, r) {
var s = i.isFunction(e) ? e : function(t) {
return t.get(e)
};
return i[t](this.models, s, r)
}
});
var k = e.View = function(t) {
this.cid = i.uniqueId("view");
i.extend(this, i.pick(t, I));
this._ensureElement();
this.initialize.apply(this, arguments)
};
var S = /^(\S+)\s*(.*)$/;
var I = ["model", "collection", "el", "id", "attributes", "className", "tagName", "events"];
i.extend(k.prototype, h, {
tagName: "div",
$: function(t) {
return this.$el.find(t)
},
initialize: function() {},
render: function() {
return this
},
remove: function() {
this._removeElement();
this.stopListening();
return this
},
_removeElement: function() {
this.$el.remove()
},
setElement: function(t) {
this.undelegateEvents();
this._setElement(t);
this.delegateEvents();
return this
},
_setElement: function(t) {
this.$el = t instanceof e.$ ? t : e.$(t);
this.el = this.$el[0]
},
delegateEvents: function(t) {
t || (t = i.result(this, "events"));
if (!t) return this;
this.undelegateEvents();
for (var e in t) {
var r = t[e];
if (!i.isFunction(r)) r = this[r];
if (!r) continue;
var s = e.match(S);
this.delegate(s[1], s[2], i.bind(r, this))
}
return this
},
delegate: function(t, e, i) {
this.$el.on(t + ".delegateEvents" + this.cid, e, i);
return this
},
undelegateEvents: function() {
if (this.$el) this.$el.off(".delegateEvents" + this.cid);
return this
},
undelegate: function(t, e, i) {
this.$el.off(t + ".delegateEvents" + this.cid, e, i);
return this
},
_createElement: function(t) {
return document.createElement(t)
},
_ensureElement: function() {
if (!this.el) {
var t = i.extend({}, i.result(this, "attributes"));
if (this.id) t.id = i.result(this, "id");
if (this.className) t["class"] = i.result(this, "className");
this.setElement(this._createElement(i.result(this, "tagName")));
this._setAttributes(t)
} else {
this.setElement(i.result(this, "el"))
}
},
_setAttributes: function(t) {
this.$el.attr(t)
}
});
e.sync = function(t, r, s) {
var n = T[t];
i.defaults(s || (s = {}), {
emulateHTTP: e.emulateHTTP,
emulateJSON: e.emulateJSON
});
var a = {
type: n,
dataType: "json"
};
if (!s.url) {
a.url = i.result(r, "url") || M()
}
if (s.data == null && r && (t === "create" || t === "update" || t === "patch")) {
a.contentType = "application/json";
a.data = JSON.stringify(s.attrs || r.toJSON(s))
}
if (s.emulateJSON) {
a.contentType = "application/x-www-form-urlencoded";
a.data = a.data ? {
model: a.data
} : {}
}
if (s.emulateHTTP && (n === "PUT" || n === "DELETE" || n === "PATCH")) {
a.type = "POST";
if (s.emulateJSON) a.data._method = n;
var o = s.beforeSend;
s.beforeSend = function(t) {
t.setRequestHeader("X-HTTP-Method-Override", n);
if (o) return o.apply(this, arguments)
}
}
if (a.type !== "GET" && !s.emulateJSON) {
a.processData = false
}
var h = s.error;
s.error = function(t, e, i) {
s.textStatus = e;
s.errorThrown = i;
if (h) h.call(s.context, t, e, i)
};
var u = s.xhr = e.ajax(i.extend(a, s));
r.trigger("request", r, u, s);
return u
};
var T = {
create: "POST",
update: "PUT",
patch: "PATCH",
"delete": "DELETE",
read: "GET"
};
e.ajax = function() {
return e.$.ajax.apply(e.$, arguments)
};
var P = e.Router = function(t) {
t || (t = {});
if (t.routes) this.routes = t.routes;
this._bindRoutes();
this.initialize.apply(this, arguments)
};
var H = /\((.*?)\)/g;
var $ = /(\(\?)?:\w+/g;
var A = /\*\w+/g;
var C = /[\-{}\[\]+?.,\\\^$|#\s]/g;
i.extend(P.prototype, h, {
initialize: function() {},
route: function(t, r, s) {
if (!i.isRegExp(t)) t = this._routeToRegExp(t);
if (i.isFunction(r)) {
s = r;
r = ""
}
if (!s) s = this[r];
var n = this;
e.history.route(t, function(i) {
var a = n._extractParameters(t, i);
if (n.execute(s, a, r) !== false) {
n.trigger.apply(n, ["route:" + r].concat(a));
n.trigger("route", r, a);
e.history.trigger("route", n, r, a)
}
});
return this
},
execute: function(t, e, i) {
if (t) t.apply(this, e)
},
navigate: function(t, i) {
e.history.navigate(t, i);
return this
},
_bindRoutes: function() {
if (!this.routes) return;
this.routes = i.result(this, "routes");
var t, e = i.keys(this.routes);
while ((t = e.pop()) != null) {
this.route(t, this.routes[t])
}
},
_routeToRegExp: function(t) {
t = t.replace(C, "\\$&").replace(H, "(?:$1)?").replace($, function(t, e) {
return e ? t : "([^/?]+)"
}).replace(A, "([^?]*?)");
return new RegExp("^" + t + "(?:\\?([\\s\\S]*))?$")
},
_extractParameters: function(t, e) {
var r = t.exec(e).slice(1);
return i.map(r, function(t, e) {
if (e === r.length - 1) return t || null;
return t ? decodeURIComponent(t) : null
})
}
});
var N = e.History = function() {
this.handlers = [];
i.bindAll(this, "checkUrl");
if (typeof window !== "undefined") {
this.location = window.location;
this.history = window.history
}
};
var R = /^[#\/]|\s+$/g;
var j = /^\/+|\/+$/g;
var O = /#.*$/;
N.started = false;
i.extend(N.prototype, h, {
interval: 50,
atRoot: function() {
var t = this.location.pathname.replace(/[^\/]$/, "$&/");
return t === this.root && !this.getSearch()
},
matchRoot: function() {
var t = this.decodeFragment(this.location.pathname);
var e = t.slice(0, this.root.length - 1) + "/";
return e === this.root
},
decodeFragment: function(t) {
return decodeURI(t.replace(/%25/g, "%2525"))
},
getSearch: function() {
var t = this.location.href.replace(/#.*/, "").match(/\?.+/);
return t ? t[0] : ""
},
getHash: function(t) {
var e = (t || this).location.href.match(/#(.*)$/);
return e ? e[1] : ""
},
getPath: function() {
var t = this.decodeFragment(this.location.pathname + this.getSearch()).slice(this.root.length - 1);
return t.charAt(0) === "/" ? t.slice(1) : t
},
getFragment: function(t) {
if (t == null) {
if (this._usePushState || !this._wantsHashChange) {
t = this.getPath()
} else {
t = this.getHash()
}
}
return t.replace(R, "")
},
start: function(t) {
if (N.started) throw new Error("Backbone.history has already been started");
N.started = true;
this.options = i.extend({
root: "/"
}, this.options, t);
this.root = this.options.root;
this._wantsHashChange = this.options.hashChange !== false;
this._hasHashChange = "onhashchange" in window;
this._useHashChange = this._wantsHashChange && this._hasHashChange;
this._wantsPushState = !!this.options.pushState;
this._hasPushState = !!(this.history && this.history.pushState);
this._usePushState = this._wantsPushState && this._hasPushState;
this.fragment = this.getFragment();
this.root = ("/" + this.root + "/").replace(j, "/");
if (this._wantsHashChange && this._wantsPushState) {
if (!this._hasPushState && !this.atRoot()) {
var e = this.root.slice(0, -1) || "/";
this.location.replace(e + "#" + this.getPath());
return true
} else if (this._hasPushState && this.atRoot()) {
this.navigate(this.getHash(), {
replace: true
})
}
}
if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {
this.iframe = document.createElement("iframe");
this.iframe.src = "javascript:0";
this.iframe.style.display = "none";
this.iframe.tabIndex = -1;
var r = document.body;
var s = r.insertBefore(this.iframe, r.firstChild).contentWindow;
s.document.open();
s.document.close();
s.location.hash = "#" + this.fragment
}
var n = window.addEventListener || function(t, e) {
return attachEvent("on" + t, e)
};
if (this._usePushState) {
n("popstate", this.checkUrl, false)
} else if (this._useHashChange && !this.iframe) {
n("hashchange", this.checkUrl, false)
} else if (this._wantsHashChange) {
this._checkUrlInterval = setInterval(this.checkUrl, this.interval)
}
if (!this.options.silent) return this.loadUrl()
},
stop: function() {
var t = window.removeEventListener || function(t, e) {
return detachEvent("on" + t, e)
};
if (this._usePushState) {
t("popstate", this.checkUrl, false)
} else if (this._useHashChange && !this.iframe) {
t("hashchange", this.checkUrl, false)
}
if (this.iframe) {
document.body.removeChild(this.iframe);
this.iframe = null
}
if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
N.started = false
},
route: function(t, e) {
this.handlers.unshift({
route: t,
callback: e
})
},
checkUrl: function(t) {
var e = this.getFragment();
if (e === this.fragment && this.iframe) {
e = this.getHash(this.iframe.contentWindow)
}
if (e === this.fragment) return false;
if (this.iframe) this.navigate(e);
this.loadUrl()
},
loadUrl: function(t) {
if (!this.matchRoot()) return false;
t = this.fragment = this.getFragment(t);
return i.any(this.handlers, function(e) {
if (e.route.test(t)) {
e.callback(t);
return true
}
})
},
navigate: function(t, e) {
if (!N.started) return false;
if (!e || e === true) e = {
trigger: !!e
};
t = this.getFragment(t || "");
var i = this.root;
if (t === "" || t.charAt(0) === "?") {
i = i.slice(0, -1) || "/"
}
var r = i + t;
t = this.decodeFragment(t.replace(O, ""));
if (this.fragment === t) return;
this.fragment = t;
if (this._usePushState) {
this.history[e.replace ? "replaceState" : "pushState"]({}, document.title, r)
} else if (this._wantsHashChange) {
this._updateHash(this.location, t, e.replace);
if (this.iframe && t !== this.getHash(this.iframe.contentWindow)) {
var s = this.iframe.contentWindow;
if (!e.replace) {
s.document.open();
s.document.close()
}
this._updateHash(s.location, t, e.replace)
}
} else {
return this.location.assign(r)
}
if (e.trigger) return this.loadUrl(t)
},
_updateHash: function(t, e, i) {
if (i) {
var r = t.href.replace(/(javascript:|#).*$/, "");
t.replace(r + "#" + e)
} else {
t.hash = "#" + e
}
}
});
e.history = new N;
var U = function(t, e) {
var r = this;
var s;
if (t && i.has(t, "constructor")) {
s = t.constructor
} else {
s = function() {
return r.apply(this, arguments)
}
}
i.extend(s, r, e);
var n = function() {
this.constructor = s
};
n.prototype = r.prototype;
s.prototype = new n;
if (t) i.extend(s.prototype, t);
s.__super__ = r.prototype;
return s
};
m.extend = y.extend = P.extend = k.extend = N.extend = U;
var M = function() {
throw new Error('A "url" property or function must be specified')
};
var q = function(t, e) {
var i = e.error;
e.error = function(r) {
if (i) i.call(e.context, t, r, e);
t.trigger("error", t, r, e)
}
};
return e
});
//# sourceMappingURL=backbone-min.map
(function() {
var d;
window.AmCharts ? d = window.AmCharts : (d = {}, window.AmCharts = d, d.themes = {}, d.maps = {}, d.inheriting = {}, d.charts = [], d.onReadyArray = [], d.useUTC = !1, d.updateRate = 60, d.uid = 0, d.lang = {}, d.translations = {}, d.mapTranslations = {}, d.windows = {}, d.initHandlers = [], d.amString = "am", d.pmString = "pm");
d.Class = function(a) {
var b = function() {
arguments[0] !== d.inheriting && (this.events = {}, this.construct.apply(this, arguments))
};
a.inherits ? (b.prototype = new a.inherits(d.inheriting), b.base = a.inherits.prototype, delete a.inherits) :
(b.prototype.createEvents = function() {
for (var a = 0; a < arguments.length; a++) this.events[arguments[a]] = []
}, b.prototype.listenTo = function(a, b, c) {
this.removeListener(a, b, c);
a.events[b].push({
handler: c,
scope: this
})
}, b.prototype.addListener = function(a, b, c) {
this.removeListener(this, a, b);
a && this.events[a] && this.events[a].push({
handler: b,
scope: c
})
}, b.prototype.removeListener = function(a, b, c) {
if (a && a.events && (a = a.events[b]))
for (b = a.length - 1; 0 <= b; b--) a[b].handler === c && a.splice(b, 1)
}, b.prototype.fire = function(a) {
for (var b =
this.events[a.type], c = 0; c < b.length; c++) {
var d = b[c];
d.handler.call(d.scope, a)
}
});
for (var c in a) b.prototype[c] = a[c];
return b
};
d.addChart = function(a) {
window.requestAnimationFrame ? d.animationRequested || (d.animationRequested = !0, window.requestAnimationFrame(d.update)) : d.updateInt || (d.updateInt = setInterval(function() {
d.update()
}, Math.round(1E3 / d.updateRate)));
d.charts.push(a)
};
d.removeChart = function(a) {
for (var b = d.charts, c = b.length - 1; 0 <= c; c--) b[c] == a && b.splice(c, 1);
0 === b.length && (d.requestAnimation && (window.cancelAnimationFrame(d.requestAnimation),
d.animationRequested = !1), d.updateInt && (clearInterval(d.updateInt), d.updateInt = NaN))
};
d.isModern = !0;
d.getIEVersion = function() {
var a = 0,
b, c;
"Microsoft Internet Explorer" == navigator.appName && (b = navigator.userAgent, c = /MSIE ([0-9]{1,}[.0-9]{0,})/, null !== c.exec(b) && (a = parseFloat(RegExp.$1)));
return a
};
d.applyLang = function(a, b) {
var c = d.translations;
b.dayNames = d.extend({}, d.dayNames);
b.shortDayNames = d.extend({}, d.shortDayNames);
b.monthNames = d.extend({}, d.monthNames);
b.shortMonthNames = d.extend({}, d.shortMonthNames);
b.amString = "am";
b.pmString = "pm";
c && (c = c[a]) && (d.lang = c, b.langObj = c, c.monthNames && (b.dayNames = d.extend({}, c.dayNames), b.shortDayNames = d.extend({}, c.shortDayNames), b.monthNames = d.extend({}, c.monthNames), b.shortMonthNames = d.extend({}, c.shortMonthNames)), c.am && (b.amString = c.am), c.pm && (b.pmString = c.pm));
d.amString = b.amString;
d.pmString = b.pmString
};
d.IEversion = d.getIEVersion();
9 > d.IEversion && 0 < d.IEversion && (d.isModern = !1, d.isIE = !0);
d.dx = 0;
d.dy = 0;
if (document.addEventListener || window.opera) d.isNN = !0, d.isIE = !1, d.dx = .5, d.dy = .5;
document.attachEvent && (d.isNN = !1, d.isIE = !0, d.isModern || (d.dx = 0, d.dy = 0));
window.chrome && (d.chrome = !0);
d.handleMouseUp = function(a) {
for (var b = d.charts, c = 0; c < b.length; c++) {
var e = b[c];
e && e.handleReleaseOutside && e.handleReleaseOutside(a)
}
};
d.handleMouseMove = function(a) {
for (var b = d.charts, c = 0; c < b.length; c++) {
var e = b[c];
e && e.handleMouseMove && e.handleMouseMove(a)
}
};
d.handleWheel = function(a) {
for (var b = d.charts, c = 0; c < b.length; c++) {
var e = b[c];
if (e && e.mouseIsOver) {
(e.mouseWheelScrollEnabled ||
e.mouseWheelZoomEnabled) && e.handleWheel && e.handleWheel(a);
break
}
}
};
d.resetMouseOver = function() {
for (var a = d.charts, b = 0; b < a.length; b++) {
var c = a[b];
c && (c.mouseIsOver = !1)
}
};
d.ready = function(a) {
d.onReadyArray.push(a)
};
d.handleLoad = function() {
d.isReady = !0;
for (var a = d.onReadyArray, b = 0; b < a.length; b++) {
var c = a[b];
isNaN(d.processDelay) ? c() : setTimeout(c, d.processDelay * b)
}
};
d.addInitHandler = function(a, b) {
d.initHandlers.push({
method: a,
types: b
})
};
d.callInitHandler = function(a) {
var b = d.initHandlers;
if (d.initHandlers)
for (var c =
0; c < b.length; c++) {
var e = b[c];
e.types ? d.isInArray(e.types, a.type) && e.method(a) : e.method(a)
}
};
d.getUniqueId = function() {
d.uid++;
return "AmChartsEl-" + d.uid
};
d.isNN && (document.addEventListener("mousemove", d.handleMouseMove), document.addEventListener("mouseup", d.handleMouseUp, !0), window.addEventListener("load", d.handleLoad, !0));
d.isIE && (document.attachEvent("onmousemove", d.handleMouseMove), document.attachEvent("onmouseup", d.handleMouseUp), window.attachEvent("onload", d.handleLoad));
d.addWheelListeners = function() {
d.wheelIsListened ||
(d.isNN && (window.addEventListener("DOMMouseScroll", d.handleWheel, !0), document.addEventListener("mousewheel", d.handleWheel, !0)), d.isIE && document.attachEvent("onmousewheel", d.handleWheel));
d.wheelIsListened = !0
};
d.clear = function() {
var a = d.charts;
if (a)
for (var b = a.length - 1; 0 <= b; b--) a[b].clear();
d.updateInt && clearInterval(d.updateInt);
d.requestAnimation && window.cancelAnimationFrame(d.requestAnimation);
d.charts = [];
d.isNN && (document.removeEventListener("mousemove", d.handleMouseMove, !0), document.removeEventListener("mouseup",
d.handleMouseUp, !0), window.removeEventListener("load", d.handleLoad, !0), window.removeEventListener("DOMMouseScroll", d.handleWheel, !0), document.removeEventListener("mousewheel", d.handleWheel, !0));
d.isIE && (document.detachEvent("onmousemove", d.handleMouseMove), document.detachEvent("onmouseup", d.handleMouseUp), window.detachEvent("onload", d.handleLoad))
};
d.makeChart = function(a, b, c) {
var e = b.type,
f = b.theme;
d.isString(f) && (f = d.themes[f], b.theme = f);
var g;
switch (e) {
case "serial":
g = new d.AmSerialChart(f);
break;
case "xy":
g = new d.AmXYChart(f);
break;
case "pie":
g = new d.AmPieChart(f);
break;
case "radar":
g = new d.AmRadarChart(f);
break;
case "gauge":
g = new d.AmAngularGauge(f);
break;
case "funnel":
g = new d.AmFunnelChart(f);
break;
case "map":
g = new d.AmMap(f);
break;
case "stock":
g = new d.AmStockChart(f);
break;
case "gantt":
g = new d.AmGanttChart(f)
}
d.extend(g, b);
d.isReady ? isNaN(c) ? g.write(a) : setTimeout(function() {
d.realWrite(g, a)
}, c) : d.ready(function() {
isNaN(c) ? g.write(a) : setTimeout(function() {
d.realWrite(g, a)
}, c)
});
return g
};
d.realWrite = function(a, b) {
a.write(b)
};
d.updateCount = 0;
d.validateAt = Math.round(d.updateRate / 10);
d.update = function() {
var a = d.charts;
d.updateCount++;
var b = !1;
d.updateCount == d.validateAt && (b = !0, d.updateCount = 0);
if (a)
for (var c = a.length - 1; 0 <= c; c--) a[c].update && a[c].update(), b && (a[c].autoResize ? a[c].validateSize && a[c].validateSize() : a[c].premeasure && a[c].premeasure());
window.requestAnimationFrame && (d.requestAnimation = window.requestAnimationFrame(d.update))
};
"complete" == document.readyState && d.handleLoad()
})();
(function() {
var d = window.AmCharts;
d.toBoolean = function(a, b) {
if (void 0 === a) return b;
switch (String(a).toLowerCase()) {
case "true":
case "yes":
case "1":
return !0;
case "false":
case "no":
case "0":
case null:
return !1;
default:
return !!a
}
};
d.removeFromArray = function(a, b) {
var c;
if (void 0 !== b && void 0 !== a)
for (c = a.length - 1; 0 <= c; c--) a[c] == b && a.splice(c, 1)
};
d.getPath = function() {
var a = document.getElementsByTagName("script");
if (a)
for (var b = 0; b < a.length; b++) {
var c = a[b].src;
if (-1 !== c.search(/\/(amcharts|ammap)\.js/)) return c.replace(/\/(amcharts|ammap)\.js.*/,
"/")
}
};
d.normalizeUrl = function(a) {
return "" !== a && -1 === a.search(/\/$/) ? a + "/" : a
};
d.isAbsolute = function(a) {
return 0 === a.search(/^http[s]?:|^\//)
};
d.isInArray = function(a, b) {
for (var c = 0; c < a.length; c++)
if (a[c] == b) return !0;
return !1
};
d.getDecimals = function(a) {
var b = 0;
isNaN(a) || (a = String(a), -1 != a.indexOf("e-") ? b = Number(a.split("-")[1]) : -1 != a.indexOf(".") && (b = a.split(".")[1].length));
return b
};
d.wordwrap = function(a, b, c, e) {
var f, g, h, k;
a += "";
if (1 > b) return a;
f = -1;
for (a = (k = a.split(/\r\n|\n|\r/)).length; ++f < a; k[f] +=
h) {
h = k[f];
for (k[f] = ""; h.length > b; k[f] += d.trim(h.slice(0, g)) + ((h = h.slice(g)).length ? c : "")) g = 2 == e || (g = h.slice(0, b + 1).match(/\S*(\s)?$/))[1] ? b : g.input.length - g[0].length || 1 == e && b || g.input.length + (g = h.slice(b).match(/^\S*/))[0].length;
h = d.trim(h)
}
return k.join(c)
};
d.trim = function(a) {
return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
};
d.wrappedText = function(a, b, c, e, f, g, h, k) {
var l = d.text(a, b, c, e, f, g, h);
if (l) {
var m = l.getBBox();
if (m.width > k) {
var n = "\n";
d.isModern || (n = "<br>");
k = Math.floor(k / (m.width /
b.length));
2 < k && (k -= 2);
b = d.wordwrap(b, k, n, !0);
l.remove();
l = d.text(a, b, c, e, f, g, h)
}
}
return l
};
d.getStyle = function(a, b) {
var c = "";
if (document.defaultView && document.defaultView.getComputedStyle) try {
c = document.defaultView.getComputedStyle(a, "").getPropertyValue(b)
} catch (e) {} else a.currentStyle && (b = b.replace(/\-(\w)/g, function(a, b) {
return b.toUpperCase()
}), c = a.currentStyle[b]);
return c
};
d.removePx = function(a) {
if (void 0 !== a) return Number(a.substring(0, a.length - 2))
};
d.getURL = function(a, b) {
if (a)
if ("_self" !=
b && b)
if ("_top" == b && window.top) window.top.location.href = a;
else if ("_parent" == b && window.parent) window.parent.location.href = a;
else if ("_blank" == b) window.open(a);
else {
var c = document.getElementsByName(b)[0];
c ? c.src = a : (c = d.windows[b]) ? c.opener && !c.opener.closed ? c.location.href = a : d.windows[b] = window.open(a) : d.windows[b] = window.open(a)
} else window.location.href = a
};
d.ifArray = function(a) {
return a && "object" == typeof a && 0 < a.length ? !0 : !1
};
d.callMethod = function(a, b) {
var c;
for (c = 0; c < b.length; c++) {
var e = b[c];
if (e) {
if (e[a]) e[a]();
var d = e.length;
if (0 < d) {
var g;
for (g = 0; g < d; g++) {
var h = e[g];
if (h && h[a]) h[a]()
}
}
}
}
};
d.toNumber = function(a) {
return "number" == typeof a ? a : Number(String(a).replace(/[^0-9\-.]+/g, ""))
};
d.toColor = function(a) {
if ("" !== a && void 0 !== a)
if (-1 != a.indexOf(",")) {
a = a.split(",");
var b;
for (b = 0; b < a.length; b++) {
var c = a[b].substring(a[b].length - 6, a[b].length);
a[b] = "#" + c
}
} else a = a.substring(a.length - 6, a.length), a = "#" + a;
return a
};
d.toCoordinate = function(a, b, c) {
var e;
void 0 !== a && (a = String(a), c && c < b && (b = c), e = Number(a), -1 != a.indexOf("!") &&
(e = b - Number(a.substr(1))), -1 != a.indexOf("%") && (e = b * Number(a.substr(0, a.length - 1)) / 100));
return e
};
d.fitToBounds = function(a, b, c) {
a < b && (a = b);
a > c && (a = c);
return a
};
d.isDefined = function(a) {
return void 0 === a ? !1 : !0
};
d.stripNumbers = function(a) {
return a.replace(/[0-9]+/g, "")
};
d.roundTo = function(a, b) {
if (0 > b) return a;
var c = Math.pow(10, b);
return Math.round(a * c) / c
};
d.toFixed = function(a, b) {
var c = String(Math.round(a * Math.pow(10, b)));
if (0 < b) {
var e = c.length;
if (e < b) {
var d;
for (d = 0; d < b - e; d++) c = "0" + c
}
e = c.substring(0,
c.length - b);
"" === e && (e = 0);
return e + "." + c.substring(c.length - b, c.length)
}
return String(c)
};
d.formatDuration = function(a, b, c, e, f, g) {
var h = d.intervals,
k = g.decimalSeparator;
if (a >= h[b].contains) {
var l = a - Math.floor(a / h[b].contains) * h[b].contains;
"ss" == b ? (l = d.formatNumber(l, g), 1 == l.split(k)[0].length && (l = "0" + l)) : l = d.roundTo(l, g.precision);
("mm" == b || "hh" == b) && 10 > l && (l = "0" + l);
c = l + "" + e[b] + "" + c;
a = Math.floor(a / h[b].contains);
b = h[b].nextInterval;
return d.formatDuration(a, b, c, e, f, g)
}
"ss" == b && (a = d.formatNumber(a,
g), 1 == a.split(k)[0].length && (a = "0" + a));
("mm" == b || "hh" == b) && 10 > a && (a = "0" + a);
c = a + "" + e[b] + "" + c;
if (h[f].count > h[b].count)
for (a = h[b].count; a < h[f].count; a++) b = h[b].nextInterval, "ss" == b || "mm" == b || "hh" == b ? c = "00" + e[b] + "" + c : "DD" == b && (c = "0" + e[b] + "" + c);
":" == c.charAt(c.length - 1) && (c = c.substring(0, c.length - 1));
return c
};
d.formatNumber = function(a, b, c, e, f) {
a = d.roundTo(a, b.precision);
isNaN(c) && (c = b.precision);
var g = b.decimalSeparator;
b = b.thousandsSeparator;
var h;
h = 0 > a ? "-" : "";
a = Math.abs(a);
var k = String(a),
l = !1; - 1 !=
k.indexOf("e") && (l = !0);
0 <= c && !l && (k = d.toFixed(a, c));
var m = "";
if (l) m = k;
else {
var k = k.split("."),
l = String(k[0]),
n;
for (n = l.length; 0 <= n; n -= 3) m = n != l.length ? 0 !== n ? l.substring(n - 3, n) + b + m : l.substring(n - 3, n) + m : l.substring(n - 3, n);
void 0 !== k[1] && (m = m + g + k[1]);
void 0 !== c && 0 < c && "0" != m && (m = d.addZeroes(m, g, c))
}
m = h + m;
"" === h && !0 === e && 0 !== a && (m = "+" + m);
!0 === f && (m += "%");
return m
};
d.addZeroes = function(a, b, c) {
a = a.split(b);
void 0 === a[1] && 0 < c && (a[1] = "0");
return a[1].length < c ? (a[1] += "0", d.addZeroes(a[0] + b + a[1], b, c)) : void 0 !==
a[1] ? a[0] + b + a[1] : a[0]
};
d.scientificToNormal = function(a) {
var b;
a = String(a).split("e");
var c;
if ("-" == a[1].substr(0, 1)) {
b = "0.";
for (c = 0; c < Math.abs(Number(a[1])) - 1; c++) b += "0";
b += a[0].split(".").join("")
} else {
var e = 0;
b = a[0].split(".");
b[1] && (e = b[1].length);
b = a[0].split(".").join("");
for (c = 0; c < Math.abs(Number(a[1])) - e; c++) b += "0"
}
return b
};
d.toScientific = function(a, b) {
if (0 === a) return "0";
var c = Math.floor(Math.log(Math.abs(a)) * Math.LOG10E),
e = String(e).split(".").join(b);
return String(e) + "e" + c
};
d.randomColor =
function() {
return "#" + ("00000" + (16777216 * Math.random() << 0).toString(16)).substr(-6)
};
d.hitTest = function(a, b, c) {
var e = !1,
f = a.x,
g = a.x + a.width,
h = a.y,
k = a.y + a.height,
l = d.isInRectangle;
e || (e = l(f, h, b));
e || (e = l(f, k, b));
e || (e = l(g, h, b));
e || (e = l(g, k, b));
e || !0 === c || (e = d.hitTest(b, a, !0));
return e
};
d.isInRectangle = function(a, b, c) {
return a >= c.x - 5 && a <= c.x + c.width + 5 && b >= c.y - 5 && b <= c.y + c.height + 5 ? !0 : !1
};
d.isPercents = function(a) {
if (-1 != String(a).indexOf("%")) return !0
};
d.formatValue = function(a, b, c, e, f, g, h, k) {
if (b) {
void 0 ===
f && (f = "");
var l;
for (l = 0; l < c.length; l++) {
var m = c[l],
n = b[m];
void 0 !== n && (n = g ? d.addPrefix(n, k, h, e) : d.formatNumber(n, e), a = a.replace(new RegExp("\\[\\[" + f + "" + m + "\\]\\]", "g"), n))
}
}
return a
};
d.formatDataContextValue = function(a, b) {
if (a) {
var c = a.match(/\[\[.*?\]\]/g),
e;
for (e = 0; e < c.length; e++) {
var d = c[e],
d = d.substr(2, d.length - 4);
void 0 !== b[d] && (a = a.replace(new RegExp("\\[\\[" + d + "\\]\\]", "g"), b[d]))
}
}
return a
};
d.massReplace = function(a, b) {
for (var c in b)
if (b.hasOwnProperty(c)) {
var e = b[c];
void 0 === e && (e = "");
a =
a.replace(c, e)
}
return a
};
d.cleanFromEmpty = function(a) {
return a.replace(/\[\[[^\]]*\]\]/g, "")
};
d.addPrefix = function(a, b, c, e, f) {
var g = d.formatNumber(a, e),
h = "",
k, l, m;
if (0 === a) return "0";
0 > a && (h = "-");
a = Math.abs(a);
if (1 < a)
for (k = b.length - 1; - 1 < k; k--) {
if (a >= b[k].number && (l = a / b[k].number, m = Number(e.precision), 1 > m && (m = 1), c = d.roundTo(l, m), m = d.formatNumber(c, {
precision: -1,
decimalSeparator: e.decimalSeparator,
thousandsSeparator: e.thousandsSeparator
}), !f || l == c)) {
g = h + "" + m + "" + b[k].prefix;
break
}
} else
for (k = 0; k < c.length; k++)
if (a <=
c[k].number) {
l = a / c[k].number;
m = Math.abs(Math.floor(Math.log(l) * Math.LOG10E));
l = d.roundTo(l, m);
g = h + "" + l + "" + c[k].prefix;
break
}
return g
};
d.remove = function(a) {
a && a.remove()
};
d.getEffect = function(a) {
">" == a && (a = "easeOutSine");
"<" == a && (a = "easeInSine");
"elastic" == a && (a = "easeOutElastic");
return a
};
d.getObjById = function(a, b) {
var c, e;
for (e = 0; e < a.length; e++) {
var d = a[e];
if (d.id == b) {
c = d;
break
}
}
return c
};
d.applyTheme = function(a, b, c) {
b || (b = d.theme);
try {
b = JSON.parse(JSON.stringify(b))
} catch (e) {}
b && b[c] && d.extend(a,
b[c])
};
d.isString = function(a) {
return "string" == typeof a ? !0 : !1
};
d.extend = function(a, b, c) {
var e;
a || (a = {});
for (e in b) c ? a.hasOwnProperty(e) || (a[e] = b[e]) : a[e] = b[e];
return a
};
d.copyProperties = function(a, b) {
for (var c in a) a.hasOwnProperty(c) && "events" != c && void 0 !== a[c] && "function" != typeof a[c] && "cname" != c && (b[c] = a[c])
};
d.processObject = function(a, b, c, e) {
if (!1 === a instanceof b && (a = e ? d.extend(new b(c), a) : d.extend(a, new b(c), !0), a.listeners))
for (var f in a.listeners) b = a.listeners[f], a.addListener(b.event, b.method);
return a
};
d.fixNewLines = function(a) {
var b = RegExp("\\n", "g");
a && (a = a.replace(b, "<br />"));
return a
};
d.fixBrakes = function(a) {
if (d.isModern) {
var b = RegExp("<br>", "g");
a && (a = a.replace(b, "\n"))
} else a = d.fixNewLines(a);
return a
};
d.deleteObject = function(a, b) {
if (a) {
if (void 0 === b || null === b) b = 20;
if (0 !== b)
if ("[object Array]" === Object.prototype.toString.call(a))
for (var c = 0; c < a.length; c++) d.deleteObject(a[c], b - 1), a[c] = null;
else if (a && !a.tagName) try {
for (c in a.theme = null, a) a[c] && ("object" == typeof a[c] && d.deleteObject(a[c],
b - 1), "function" != typeof a[c] && (a[c] = null))
} catch (e) {}
}
};
d.bounce = function(a, b, c, e, d) {
return (b /= d) < 1 / 2.75 ? 7.5625 * e * b * b + c : b < 2 / 2.75 ? e * (7.5625 * (b -= 1.5 / 2.75) * b + .75) + c : b < 2.5 / 2.75 ? e * (7.5625 * (b -= 2.25 / 2.75) * b + .9375) + c : e * (7.5625 * (b -= 2.625 / 2.75) * b + .984375) + c
};
d.easeInOutQuad = function(a, b, c, e, d) {
b /= d / 2;
if (1 > b) return e / 2 * b * b + c;
b--;
return -e / 2 * (b * (b - 2) - 1) + c
};
d.easeInSine = function(a, b, c, e, d) {
return -e * Math.cos(b / d * (Math.PI / 2)) + e + c
};
d.easeOutSine = function(a, b, c, e, d) {
return e * Math.sin(b / d * (Math.PI / 2)) + c
};
d.easeOutElastic =
function(a, b, c, e, d) {
a = 1.70158;
var g = 0,
h = e;
if (0 === b) return c;
if (1 == (b /= d)) return c + e;
g || (g = .3 * d);
h < Math.abs(e) ? (h = e, a = g / 4) : a = g / (2 * Math.PI) * Math.asin(e / h);
return h * Math.pow(2, -10 * b) * Math.sin(2 * (b * d - a) * Math.PI / g) + e + c
};
d.fixStepE = function(a) {
a = a.toExponential(0).split("e");
var b = Number(a[1]);
9 == Number(a[0]) && b++;
return d.generateNumber(1, b)
};
d.generateNumber = function(a, b) {
var c = "",
e;
e = 0 > b ? Math.abs(b) - 1 : Math.abs(b);
var d;
for (d = 0; d < e; d++) c += "0";
return 0 > b ? Number("0." + c + String(a)) : Number(String(a) + c)
};
d.setCN =
function(a, b, c, e) {
if (a.addClassNames && b && (b = b.node) && c) {
var d = b.getAttribute("class");
a = a.classNamePrefix + "-";
e && (a = "");
d ? b.setAttribute("class", d + " " + a + c) : b.setAttribute("class", a + c)
}
};
d.removeCN = function(a, b, c) {
b && (b = b.node) && c && (b = b.classList) && b.remove(a.classNamePrefix + "-" + c)
};
d.parseDefs = function(a, b) {
for (var c in a) {
var e = typeof a[c];
if (0 < a[c].length && "object" == e)
for (var f = 0; f < a[c].length; f++) e = document.createElementNS(d.SVG_NS, c), b.appendChild(e), d.parseDefs(a[c][f], e);
else "object" == e ? (e =
document.createElementNS(d.SVG_NS, c), b.appendChild(e), d.parseDefs(a[c], e)) : b.setAttribute(c, a[c])
}
}
})();
(function() {
var d = window.AmCharts;
d.AmDraw = d.Class({
construct: function(a, b, c, e) {
d.SVG_NS = "http://www.w3.org/2000/svg";
d.SVG_XLINK = "http://www.w3.org/1999/xlink";
d.hasSVG = !!document.createElementNS && !!document.createElementNS(d.SVG_NS, "svg").createSVGRect;
1 > b && (b = 10);
1 > c && (c = 10);
this.div = a;
this.width = b;
this.height = c;
this.rBin = document.createElement("div");
d.hasSVG ? (d.SVG = !0, b = this.createSvgElement("svg"), a.appendChild(b), this.container = b, this.addDefs(e), this.R = new d.SVGRenderer(this)) : d.isIE && d.VMLRenderer &&
(d.VML = !0, d.vmlStyleSheet || (document.namespaces.add("amvml", "urn:schemas-microsoft-com:vml"), 31 > document.styleSheets.length ? (b = document.createStyleSheet(), b.addRule(".amvml", "behavior:url(#default#VML); display:inline-block; antialias:true"), d.vmlStyleSheet = b) : document.styleSheets[0].addRule(".amvml", "behavior:url(#default#VML); display:inline-block; antialias:true")), this.container = a, this.R = new d.VMLRenderer(this, e), this.R.disableSelection(a))
},
createSvgElement: function(a) {
return document.createElementNS(d.SVG_NS,
a)
},
circle: function(a, b, c, e) {
var f = new d.AmDObject("circle", this);
f.attr({
r: c,
cx: a,
cy: b
});
this.addToContainer(f.node, e);
return f
},
ellipse: function(a, b, c, e, f) {
var g = new d.AmDObject("ellipse", this);
g.attr({
rx: c,
ry: e,
cx: a,
cy: b
});
this.addToContainer(g.node, f);
return g
},
setSize: function(a, b) {
0 < a && 0 < b && (this.container.style.width = a + "px", this.container.style.height = b + "px")
},
rect: function(a, b, c, e, f, g, h) {
var k = new d.AmDObject("rect", this);
d.VML && (f = Math.round(100 * f / Math.min(c, e)), c += 2 * g, e += 2 * g, k.bw = g, k.node.style.marginLeft = -g, k.node.style.marginTop = -g);
1 > c && (c = 1);
1 > e && (e = 1);
k.attr({
x: a,
y: b,
width: c,
height: e,
rx: f,
ry: f,
"stroke-width": g
});
this.addToContainer(k.node, h);
return k
},
image: function(a, b, c, e, f, g) {
var h = new d.AmDObject("image", this);
h.attr({
x: b,
y: c,
width: e,
height: f
});
this.R.path(h, a);
this.addToContainer(h.node, g);
return h
},
addToContainer: function(a, b) {
b || (b = this.container);
b.appendChild(a)
},
text: function(a, b, c) {
return this.R.text(a, b, c)
},
path: function(a, b, c, e) {
var f = new d.AmDObject("path", this);
e || (e = "100,100");
f.attr({
cs: e
});
c ? f.attr({
dd: a
}) : f.attr({
d: a
});
this.addToContainer(f.node, b);
return f
},
set: function(a) {
return this.R.set(a)
},
remove: function(a) {
if (a) {
var b = this.rBin;
b.appendChild(a);
b.innerHTML = ""
}
},
renderFix: function() {
var a = this.container,
b = a.style;
b.top = "0px";
b.left = "0px";
try {
var c = a.getBoundingClientRect(),
e = c.left - Math.round(c.left),
d = c.top - Math.round(c.top);
e && (b.left = e + "px");
d && (b.top = d + "px")
} catch (g) {}
},
update: function() {
this.R.update()
},
addDefs: function(a) {
if (d.hasSVG) {
var b = this.createSvgElement("desc"),
c = this.container;
c.setAttribute("version", "1.1");
c.style.position = "absolute";
this.setSize(this.width, this.height);
if (a.accessibleTitle) {
var e = this.createSvgElement("text");
c.appendChild(e);
e.innerHTML = a.accessibleTitle;
e.style.opacity = 0
}
d.rtl && (c.setAttribute("direction", "rtl"), c.style.left = "auto", c.style.right = "0px");
a && (a.addCodeCredits && b.appendChild(document.createTextNode("JavaScript chart by amCharts " + a.version)), c.appendChild(b), a.defs && (b = this.createSvgElement("defs"), c.appendChild(b), d.parseDefs(a.defs,
b), this.defs = b))
}
}
})
})();
(function() {
var d = window.AmCharts;
d.AmDObject = d.Class({
construct: function(a, b) {
this.D = b;
this.R = b.R;
this.node = this.R.create(this, a);
this.y = this.x = 0;
this.scale = 1
},
attr: function(a) {
this.R.attr(this, a);
return this
},
getAttr: function(a) {
return this.node.getAttribute(a)
},
setAttr: function(a, b) {
this.R.setAttr(this, a, b);
return this
},
clipRect: function(a, b, c, e) {
this.R.clipRect(this, a, b, c, e)
},
translate: function(a, b, c, e) {
e || (a = Math.round(a), b = Math.round(b));
this.R.move(this, a, b, c);
this.x = a;
this.y = b;
this.scale =
c;
this.angle && this.rotate(this.angle)
},
rotate: function(a, b) {
this.R.rotate(this, a, b);
this.angle = a
},
animate: function(a, b, c) {
for (var e in a)
if (a.hasOwnProperty(e)) {
var f = e,
g = a[e];
c = d.getEffect(c);
this.R.animate(this, f, g, b, c)
}
},
push: function(a) {
if (a) {
var b = this.node;
b.appendChild(a.node);
var c = a.clipPath;
c && b.appendChild(c);
(a = a.grad) && b.appendChild(a)
}
},
text: function(a) {
this.R.setText(this, a)
},
remove: function() {
this.stop();
this.R.remove(this)
},
clear: function() {
var a = this.node;
if (a.hasChildNodes())
for (; 1 <=
a.childNodes.length;) a.removeChild(a.firstChild)
},
hide: function() {
this.setAttr("visibility", "hidden")
},
show: function() {
this.setAttr("visibility", "visible")
},
getBBox: function() {
return this.R.getBBox(this)
},
toFront: function() {
var a = this.node;
if (a) {
this.prevNextNode = a.nextSibling;
var b = a.parentNode;
b && b.appendChild(a)
}
},
toPrevious: function() {
var a = this.node;
a && this.prevNextNode && (a = a.parentNode) && a.insertBefore(this.prevNextNode, null)
},
toBack: function() {
var a = this.node;
if (a) {
this.prevNextNode = a.nextSibling;
var b = a.parentNode;
if (b) {
var c = b.firstChild;
c && b.insertBefore(a, c)
}
}
},
mouseover: function(a) {
this.R.addListener(this, "mouseover", a);
return this
},
mouseout: function(a) {
this.R.addListener(this, "mouseout", a);
return this
},
click: function(a) {
this.R.addListener(this, "click", a);
return this
},
dblclick: function(a) {
this.R.addListener(this, "dblclick", a);
return this
},
mousedown: function(a) {
this.R.addListener(this, "mousedown", a);
return this
},
mouseup: function(a) {
this.R.addListener(this, "mouseup", a);
return this
},
touchmove: function(a) {
this.R.addListener(this,
"touchmove", a);
return this
},
touchstart: function(a) {
this.R.addListener(this, "touchstart", a);
return this
},
touchend: function(a) {
this.R.addListener(this, "touchend", a);
return this
},
keyup: function(a) {
this.R.addListener(this, "keyup", a);
return this
},
focus: function(a) {
this.R.addListener(this, "focus", a);
return this
},
blur: function(a) {
this.R.addListener(this, "blur", a);
return this
},
contextmenu: function(a) {
this.node.addEventListener ? this.node.addEventListener("contextmenu", a, !0) : this.R.addListener(this, "contextmenu",
a);
return this
},
stop: function() {
d.removeFromArray(this.R.animations, this.an_translate);
d.removeFromArray(this.R.animations, this.an_y);
d.removeFromArray(this.R.animations, this.an_x)
},
length: function() {
return this.node.childNodes.length
},
gradient: function(a, b, c) {
this.R.gradient(this, a, b, c)
},
pattern: function(a, b, c) {
a && this.R.pattern(this, a, b, c)
}
})
})();
(function() {
var d = window.AmCharts;
d.SVGRenderer = d.Class({
construct: function(a) {
this.D = a;
this.animations = []
},
create: function(a, b) {
return document.createElementNS(d.SVG_NS, b)
},
attr: function(a, b) {
for (var c in b) b.hasOwnProperty(c) && this.setAttr(a, c, b[c])
},
setAttr: function(a, b, c) {
void 0 !== c && a.node.setAttribute(b, c)
},
animate: function(a, b, c, e, f) {
a.animationFinished = !1;
var g = a.node;
a["an_" + b] && d.removeFromArray(this.animations, a["an_" + b]);
"translate" == b ? (g = (g = g.getAttribute("transform")) ? String(g).substring(10,
g.length - 1) : "0,0", g = g.split(", ").join(" "), g = g.split(" ").join(","), 0 === g && (g = "0,0")) : g = Number(g.getAttribute(b));
c = {
obj: a,
frame: 0,
attribute: b,
from: g,
to: c,
time: e,
effect: f
};
this.animations.push(c);
a["an_" + b] = c
},
update: function() {
var a, b = this.animations;
for (a = b.length - 1; 0 <= a; a--) {
var c = b[a],
e = c.time * d.updateRate,
f = c.frame + 1,
g = c.obj,
h = c.attribute,
k, l, m;
if (f <= e) {
c.frame++;
if ("translate" == h) {
k = c.from.split(",");
h = Number(k[0]);
k = Number(k[1]);
isNaN(k) && (k = 0);
l = c.to.split(",");
m = Number(l[0]);
l = Number(l[1]);
m = 0 === m - h ? m : Math.round(d[c.effect](0, f, h, m - h, e));
c = 0 === l - k ? l : Math.round(d[c.effect](0, f, k, l - k, e));
h = "transform";
if (isNaN(m) || isNaN(c)) continue;
c = "translate(" + m + "," + c + ")"
} else l = Number(c.from), k = Number(c.to), m = k - l, c = d[c.effect](0, f, l, m, e), isNaN(c) && (c = k), 0 === m && this.animations.splice(a, 1);
this.setAttr(g, h, c)
} else "translate" == h ? (l = c.to.split(","), m = Number(l[0]), l = Number(l[1]), g.translate(m, l)) : (k = Number(c.to), this.setAttr(g, h, k)), g.animationFinished = !0, this.animations.splice(a, 1)
}
},
getBBox: function(a) {
if (a =
a.node) try {
return a.getBBox()
} catch (b) {}
return {
width: 0,
height: 0,
x: 0,
y: 0
}
},
path: function(a, b) {
a.node.setAttributeNS(d.SVG_XLINK, "xlink:href", b)
},
clipRect: function(a, b, c, e, f) {
var g = a.node,
h = a.clipPath;
h && this.D.remove(h);
var k = g.parentNode;
k && (g = document.createElementNS(d.SVG_NS, "clipPath"), h = d.getUniqueId(), g.setAttribute("id", h), this.D.rect(b, c, e, f, 0, 0, g), k.appendChild(g), b = "#", d.baseHref && !d.isIE && (b = this.removeTarget(window.location.href) + b), this.setAttr(a, "clip-path", "url(" + b + h + ")"), this.clipPathC++,
a.clipPath = g)
},
text: function(a, b, c) {
var e = new d.AmDObject("text", this.D);
a = String(a).split("\n");
var f = d.removePx(b["font-size"]),
g;
for (g = 0; g < a.length; g++) {
var h = this.create(null, "tspan");
h.appendChild(document.createTextNode(a[g]));
h.setAttribute("y", (f + 2) * g + Math.round(f / 2));
h.setAttribute("x", 0);
e.node.appendChild(h)
}
e.node.setAttribute("y", Math.round(f / 2));
this.attr(e, b);
this.D.addToContainer(e.node, c);
return e
},
setText: function(a, b) {
var c = a.node;
c && (c.removeChild(c.firstChild), c.appendChild(document.createTextNode(b)))
},
move: function(a, b, c, e) {
isNaN(b) && (b = 0);
isNaN(c) && (c = 0);
b = "translate(" + b + "," + c + ")";
e && (b = b + " scale(" + e + ")");
this.setAttr(a, "transform", b)
},
rotate: function(a, b) {
var c = a.node.getAttribute("transform"),
e = "rotate(" + b + ")";
c && (e = c + " " + e);
this.setAttr(a, "transform", e)
},
set: function(a) {
var b = new d.AmDObject("g", this.D);
this.D.container.appendChild(b.node);
if (a) {
var c;
for (c = 0; c < a.length; c++) b.push(a[c])
}
return b
},
addListener: function(a, b, c) {
a.node["on" + b] = c
},
gradient: function(a, b, c, e) {
var f = a.node,
g = a.grad;
g && this.D.remove(g);
b = document.createElementNS(d.SVG_NS, b);
g = d.getUniqueId();
b.setAttribute("id", g);
if (!isNaN(e)) {
var h = 0,
k = 0,
l = 0,
m = 0;
90 == e ? l = 100 : 270 == e ? m = 100 : 180 == e ? h = 100 : 0 === e && (k = 100);
b.setAttribute("x1", h + "%");
b.setAttribute("x2", k + "%");
b.setAttribute("y1", l + "%");
b.setAttribute("y2", m + "%")
}
for (e = 0; e < c.length; e++) h = document.createElementNS(d.SVG_NS, "stop"), k = 100 * e / (c.length - 1), 0 === e && (k = 0), h.setAttribute("offset", k + "%"), h.setAttribute("stop-color", c[e]), b.appendChild(h);
f.parentNode.appendChild(b);
c = "#";
d.baseHref && !d.isIE && (c = this.removeTarget(window.location.href) + c);
f.setAttribute("fill", "url(" + c + g + ")");
a.grad = b
},
removeTarget: function(a) {
return a.split("#")[0]
},
pattern: function(a, b, c, e) {
var f = a.node;
isNaN(c) && (c = 1);
var g = a.patternNode;
g && this.D.remove(g);
var g = document.createElementNS(d.SVG_NS, "pattern"),
h = d.getUniqueId(),
k = b;
b.url && (k = b.url);
d.isAbsolute(k) || -1 != k.indexOf("data:image") || (k = e + k);
e = Number(b.width);
isNaN(e) && (e = 4);
var l = Number(b.height);
isNaN(l) && (l = 4);
e /= c;
l /= c;
c = b.x;
isNaN(c) &&
(c = 0);
var m = -Math.random() * Number(b.randomX);
isNaN(m) || (c = m);
m = b.y;
isNaN(m) && (m = 0);
var n = -Math.random() * Number(b.randomY);
isNaN(n) || (m = n);
g.setAttribute("id", h);
g.setAttribute("width", e);
g.setAttribute("height", l);
g.setAttribute("patternUnits", "userSpaceOnUse");
g.setAttribute("xlink:href", k);
b.color && (n = document.createElementNS(d.SVG_NS, "rect"), n.setAttributeNS(null, "height", e), n.setAttributeNS(null, "width", l), n.setAttributeNS(null, "fill", b.color), g.appendChild(n));
this.D.image(k, 0, 0, e, l, g).translate(c,
m);
k = "#";
d.baseHref && !d.isIE && (k = this.removeTarget(window.location.href) + k);
f.setAttribute("fill", "url(" + k + h + ")");
a.patternNode = g;
f.parentNode.appendChild(g)
},
remove: function(a) {
a.clipPath && this.D.remove(a.clipPath);
a.grad && this.D.remove(a.grad);
a.patternNode && this.D.remove(a.patternNode);
this.D.remove(a.node)
}
})
})();
(function() {
var d = window.AmCharts;
d.AmChart = d.Class({
construct: function(a) {
this.svgIcons = this.tapToActivate = !0;
this.theme = a;
this.classNamePrefix = "amcharts";
this.addClassNames = !1;
this.version = "3.21.0";
d.addChart(this);
this.createEvents("buildStarted", "dataUpdated", "init", "rendered", "drawn", "failed", "resized", "animationFinished");
this.height = this.width = "100%";
this.dataChanged = !0;
this.chartCreated = !1;
this.previousWidth = this.previousHeight = 0;
this.backgroundColor = "#FFFFFF";
this.borderAlpha = this.backgroundAlpha =
0;
this.color = this.borderColor = "#000000";
this.fontFamily = "Verdana";
this.fontSize = 11;
this.usePrefixes = !1;
this.autoResize = !0;
this.autoDisplay = !1;
this.addCodeCredits = this.accessible = !0;
this.touchStartTime = this.touchClickDuration = 0;
this.precision = -1;
this.percentPrecision = 2;
this.decimalSeparator = ".";
this.thousandsSeparator = ",";
this.labels = [];
this.allLabels = [];
this.titles = [];
this.marginRight = this.marginLeft = this.autoMarginOffset = 0;
this.timeOuts = [];
this.creditsPosition = "top-left";
var b = document.createElement("div"),
c = b.style;
c.overflow = "hidden";
c.position = "relative";
c.textAlign = "left";
this.chartDiv = b;
b = document.createElement("div");
c = b.style;
c.overflow = "hidden";
c.position = "relative";
c.textAlign = "left";
this.legendDiv = b;
this.titleHeight = 0;
this.hideBalloonTime = 150;
this.handDrawScatter = 2;
this.cssScale = this.handDrawThickness = 1;
this.cssAngle = 0;
this.prefixesOfBigNumbers = [{
number: 1E3,
prefix: "k"
}, {
number: 1E6,
prefix: "M"
}, {
number: 1E9,
prefix: "G"
}, {
number: 1E12,
prefix: "T"
}, {
number: 1E15,
prefix: "P"
}, {
number: 1E18,
prefix: "E"
}, {
number: 1E21,
prefix: "Z"
}, {
number: 1E24,
prefix: "Y"
}];
this.prefixesOfSmallNumbers = [{
number: 1E-24,
prefix: "y"
}, {
number: 1E-21,
prefix: "z"
}, {
number: 1E-18,
prefix: "a"
}, {
number: 1E-15,
prefix: "f"
}, {
number: 1E-12,
prefix: "p"
}, {
number: 1E-9,
prefix: "n"
}, {
number: 1E-6,
prefix: "\u03bc"
}, {
number: .001,
prefix: "m"
}];
this.panEventsEnabled = !0;
this.product = "amcharts";
this.animations = [];
this.balloon = new d.AmBalloon(this.theme);
this.balloon.chart = this;
this.processTimeout = 0;
this.processCount = 1E3;
this.animatable = [];
this.langObj = {};
d.applyTheme(this, a, "AmChart")
},
drawChart: function() {
0 < this.realWidth && 0 < this.realHeight && (this.drawBackground(), this.redrawLabels(), this.drawTitles(), this.brr(), this.renderFix(), this.chartDiv && (this.boundingRect = this.chartDiv.getBoundingClientRect()))
},
makeAccessible: function(a, b, c) {
this.accessible && a && (c && a.setAttr("role", c), a.setAttr("aria-label", b))
},
drawBackground: function() {
d.remove(this.background);
var a = this.container,
b = this.backgroundColor,
c = this.backgroundAlpha,
e = this.set;
d.isModern || 0 !==
c || (c = .001);
var f = this.updateWidth();
this.realWidth = f;
var g = this.updateHeight();
this.realHeight = g;
b = d.polygon(a, [0, f - 1, f - 1, 0], [0, 0, g - 1, g - 1], b, c, 1, this.borderColor, this.borderAlpha);
d.setCN(this, b, "bg");
this.background = b;
e.push(b);
if (b = this.backgroundImage) a = a.image(b, 0, 0, f, g), d.setCN(this, b, "bg-image"), this.bgImg = a, e.push(a)
},
drawTitles: function(a) {
var b = this.titles;
this.titleHeight = 0;
if (d.ifArray(b)) {
var c = 20,
e;
for (e = 0; e < b.length; e++) {
var f = b[e],
f = d.processObject(f, d.Title, this.theme);
if (!1 !== f.enabled) {
var g =
f.color;
void 0 === g && (g = this.color);
var h = f.size;
isNaN(h) && (h = this.fontSize + 2);
isNaN(f.alpha);
var k = this.marginLeft,
l = !0;
void 0 !== f.bold && (l = f.bold);
g = d.wrappedText(this.container, f.text, g, this.fontFamily, h, "middle", l, this.realWidth - 35);
g.translate(k + (this.realWidth - this.marginRight - k) / 2, c);
g.node.style.pointerEvents = "none";
f.sprite = g;
void 0 !== f.tabIndex && g.setAttr("tabindex", f.tabIndex);
d.setCN(this, g, "title");
f.id && d.setCN(this, g, "title-" + f.id);
g.attr({
opacity: f.alpha
});
c += g.getBBox().height + 5;
a ?
g.remove() : this.freeLabelsSet.push(g)
}
}
this.titleHeight = c - 10
}
},
write: function(a) {
var b = this;
if (b.listeners)
for (var c = 0; c < b.listeners.length; c++) {
var e = b.listeners[c];
b.addListener(e.event, e.method)
}
b.fire({
type: "buildStarted",
chart: b
});
b.afterWriteTO && clearTimeout(b.afterWriteTO);
0 < b.processTimeout ? b.afterWriteTO = setTimeout(function() {
b.afterWrite.call(b, a)
}, b.processTimeout) : b.afterWrite(a)
},
afterWrite: function(a) {
var b;
if (b = "object" != typeof a ? document.getElementById(a) : a) {
for (; b.firstChild;) b.removeChild(b.firstChild);
this.div = b;
b.style.overflow = "hidden";
b.style.textAlign = "left";
a = this.chartDiv;
var c = this.legendDiv,
e = this.legend,
f = c.style,
g = a.style;
this.measure();
this.previousHeight = this.divRealHeight;
this.previousWidth = this.divRealWidth;
var h, k = document.createElement("div");
h = k.style;
h.position = "relative";
this.containerDiv = k;
k.className = this.classNamePrefix + "-main-div";
a.className = this.classNamePrefix + "-chart-div";
b.appendChild(k);
(b = this.exportConfig) && d.AmExport && !this.AmExport && (this.AmExport = new d.AmExport(this,
b));
this.amExport && d.AmExport && (this.AmExport = d.extend(this.amExport, new d.AmExport(this), !0));
this.AmExport && this.AmExport.init && this.AmExport.init();
if (e) {
e = this.addLegend(e, e.divId);
if (e.enabled) switch (f.left = null, f.top = null, f.right = null, g.left = null, g.right = null, g.top = null, f.position = "relative", g.position = "relative", h.width = "100%", h.height = "100%", e.position) {
case "bottom":
k.appendChild(a);
k.appendChild(c);
break;
case "top":
k.appendChild(c);
k.appendChild(a);
break;
case "absolute":
f.position = "absolute";
g.position = "absolute";
void 0 !== e.left && (f.left = e.left + "px");
void 0 !== e.right && (f.right = e.right + "px");
void 0 !== e.top && (f.top = e.top + "px");
void 0 !== e.bottom && (f.bottom = e.bottom + "px");
e.marginLeft = 0;
e.marginRight = 0;
k.appendChild(a);
k.appendChild(c);
break;
case "right":
f.position = "relative";
g.position = "absolute";
k.appendChild(a);
k.appendChild(c);
break;
case "left":
f.position = "absolute";
g.position = "relative";
k.appendChild(a);
k.appendChild(c);
break;
case "outside":
k.appendChild(a)
} else k.appendChild(a);
this.prevLegendPosition =
e.position
} else k.appendChild(a);
this.listenersAdded || (this.addListeners(), this.listenersAdded = !0);
(this.mouseWheelScrollEnabled || this.mouseWheelZoomEnabled) && d.addWheelListeners();
this.initChart()
}
},
createLabelsSet: function() {
d.remove(this.labelsSet);
this.labelsSet = this.container.set();
this.freeLabelsSet.push(this.labelsSet)
},
initChart: function() {
this.balloon = d.processObject(this.balloon, d.AmBalloon, this.theme);
window.AmCharts_path && (this.path = window.AmCharts_path);
void 0 === this.path && (this.path =
d.getPath());
void 0 === this.path && (this.path = "amcharts/");
this.path = d.normalizeUrl(this.path);
void 0 === this.pathToImages && (this.pathToImages = this.path + "images/");
this.initHC || (d.callInitHandler(this), this.initHC = !0);
d.applyLang(this.language, this);
var a = this.numberFormatter;
a && (isNaN(a.precision) || (this.precision = a.precision), void 0 !== a.thousandsSeparator && (this.thousandsSeparator = a.thousandsSeparator), void 0 !== a.decimalSeparator && (this.decimalSeparator = a.decimalSeparator));
(a = this.percentFormatter) &&
!isNaN(a.precision) && (this.percentPrecision = a.precision);
this.nf = {
precision: this.precision,
thousandsSeparator: this.thousandsSeparator,
decimalSeparator: this.decimalSeparator
};
this.pf = {
precision: this.percentPrecision,
thousandsSeparator: this.thousandsSeparator,
decimalSeparator: this.decimalSeparator
};
this.destroy();
(a = this.container) ? (a.container.innerHTML = "", a.width = this.realWidth, a.height = this.realHeight, a.addDefs(this), this.chartDiv.appendChild(a.container)) : a = new d.AmDraw(this.chartDiv, this.realWidth,
this.realHeight, this);
this.container = a;
this.extension = ".png";
this.svgIcons && d.SVG && (this.extension = ".svg");
this.checkDisplay();
this.checkTransform(this.div);
a.chart = this;
d.VML || d.SVG ? (a.handDrawn = this.handDrawn, a.handDrawScatter = this.handDrawScatter, a.handDrawThickness = this.handDrawThickness, d.remove(this.set), this.set = a.set(), d.remove(this.gridSet), this.gridSet = a.set(), d.remove(this.cursorLineSet), this.cursorLineSet = a.set(), d.remove(this.graphsBehindSet), this.graphsBehindSet = a.set(), d.remove(this.bulletBehindSet),
this.bulletBehindSet = a.set(), d.remove(this.columnSet), this.columnSet = a.set(), d.remove(this.graphsSet), this.graphsSet = a.set(), d.remove(this.trendLinesSet), this.trendLinesSet = a.set(), d.remove(this.axesSet), this.axesSet = a.set(), d.remove(this.cursorSet), this.cursorSet = a.set(), d.remove(this.scrollbarsSet), this.scrollbarsSet = a.set(), d.remove(this.bulletSet), this.bulletSet = a.set(), d.remove(this.freeLabelsSet), this.freeLabelsSet = a.set(), d.remove(this.axesLabelsSet), this.axesLabelsSet = a.set(), d.remove(this.balloonsSet),
this.balloonsSet = a.set(), d.remove(this.plotBalloonsSet), this.plotBalloonsSet = a.set(), d.remove(this.zoomButtonSet), this.zoomButtonSet = a.set(), d.remove(this.zbSet), this.zbSet = null, d.remove(this.linkSet), this.linkSet = a.set()) : this.fire({
type: "failed",
chart: this
})
},
premeasure: function() {
var a = this.div;
if (a) {
try {
this.boundingRect = this.chartDiv.getBoundingClientRect()
} catch (e) {}
var b = a.offsetWidth,
c = a.offsetHeight;
a.clientHeight && (b = a.clientWidth, c = a.clientHeight);
if (b != this.mw || c != this.mh) this.mw = b, this.mh =
c, this.measure()
}
},
measure: function() {
var a = this.div;
if (a) {
var b = this.chartDiv,
c = a.offsetWidth,
e = a.offsetHeight,
f = this.container;
a.clientHeight && (c = a.clientWidth, e = a.clientHeight);
var e = Math.round(e),
c = Math.round(c),
a = Math.round(d.toCoordinate(this.width, c)),
g = Math.round(d.toCoordinate(this.height, e));
(c != this.previousWidth || e != this.previousHeight) && 0 < a && 0 < g && (b.style.width = a + "px", b.style.height = g + "px", b.style.padding = 0, f && f.setSize(a, g), this.balloon = d.processObject(this.balloon, d.AmBalloon, this.theme));
this.balloon && this.balloon.setBounds && this.balloon.setBounds(2, 2, a - 2, g);
this.updateWidth();
this.balloon.chart = this;
this.realWidth = a;
this.realHeight = g;
this.divRealWidth = c;
this.divRealHeight = e
}
},
checkDisplay: function() {
if (this.autoDisplay && this.container) {
var a = d.rect(this.container, 10, 10),
b = a.getBBox();
0 === b.width && 0 === b.height && (this.divRealHeight = this.divRealWidth = this.realHeight = this.realWidth = 0, this.previousWidth = this.previousHeight = NaN);
a.remove()
}
},
checkTransform: function(a) {
if (this.autoTransform &&
window.getComputedStyle && a) {
if (a.style) {
var b = window.getComputedStyle(a, null);
if (b && (b = b.getPropertyValue("-webkit-transform") || b.getPropertyValue("-moz-transform") || b.getPropertyValue("-ms-transform") || b.getPropertyValue("-o-transform") || b.getPropertyValue("transform")) && "none" !== b) {
var c = b.split("(")[1].split(")")[0].split(","),
b = c[0],
c = c[1],
b = Math.sqrt(b * b + c * c);
isNaN(b) || (this.cssScale *= b)
}
}
a.parentNode && this.checkTransform(a.parentNode)
}
},
destroy: function() {
this.chartDiv.innerHTML = "";
this.clearTimeOuts();
this.legend && this.legend.destroy()
},
clearTimeOuts: function() {
var a = this.timeOuts;
if (a) {
var b;
for (b = 0; b < a.length; b++) clearTimeout(a[b])
}
this.timeOuts = []
},
clear: function(a) {
try {
document.removeEventListener("touchstart", this.docfn1, !0), document.removeEventListener("touchend", this.docfn2, !0)
} catch (b) {}
d.callMethod("clear", [this.chartScrollbar, this.scrollbarV, this.scrollbarH, this.chartCursor]);
this.chartCursor = this.scrollbarH = this.scrollbarV = this.chartScrollbar = null;
this.clearTimeOuts();
this.container &&
(this.container.remove(this.chartDiv), this.container.remove(this.legendDiv));
a || d.removeChart(this);
if (a = this.div)
for (; a.firstChild;) a.removeChild(a.firstChild);
this.legend && this.legend.destroy();
this.AmExport && this.AmExport.clear && this.AmExport.clear()
},
setMouseCursor: function(a) {
"auto" == a && d.isNN && (a = "default");
this.chartDiv.style.cursor = a;
this.legendDiv.style.cursor = a
},
redrawLabels: function() {
this.labels = [];
var a = this.allLabels;
this.createLabelsSet();
var b;
for (b = 0; b < a.length; b++) this.drawLabel(a[b])
},
drawLabel: function(a) {
var b = this;
if (b.container && !1 !== a.enabled) {
a = d.processObject(a, d.Label, b.theme);
var c = a.y,
e = a.text,
f = a.align,
g = a.size,
h = a.color,
k = a.rotation,
l = a.alpha,
m = a.bold,
n = d.toCoordinate(a.x, b.realWidth),
c = d.toCoordinate(c, b.realHeight);
n || (n = 0);
c || (c = 0);
void 0 === h && (h = b.color);
isNaN(g) && (g = b.fontSize);
f || (f = "start");
"left" == f && (f = "start");
"right" == f && (f = "end");
"center" == f && (f = "middle", k ? c = b.realHeight - c + c / 2 : n = b.realWidth / 2 - n);
void 0 === l && (l = 1);
void 0 === k && (k = 0);
c += g / 2;
e = d.text(b.container,
e, h, b.fontFamily, g, f, m, l);
e.translate(n, c);
void 0 !== a.tabIndex && e.setAttr("tabindex", a.tabIndex);
d.setCN(b, e, "label");
a.id && d.setCN(b, e, "label-" + a.id);
0 !== k && e.rotate(k);
a.url ? (e.setAttr("cursor", "pointer"), e.click(function() {
d.getURL(a.url, b.urlTarget)
})) : e.node.style.pointerEvents = "none";
b.labelsSet.push(e);
b.labels.push(e)
}
},
addLabel: function(a, b, c, e, d, g, h, k, l, m) {
a = {
x: a,
y: b,
text: c,
align: e,
size: d,
color: g,
alpha: k,
rotation: h,
bold: l,
url: m,
enabled: !0
};
this.container && this.drawLabel(a);
this.allLabels.push(a)
},
clearLabels: function() {
var a = this.labels,
b;
for (b = a.length - 1; 0 <= b; b--) a[b].remove();
this.labels = [];
this.allLabels = []
},
updateHeight: function() {
var a = this.divRealHeight,
b = this.legend;
if (b) {
var c = this.legendDiv.offsetHeight,
b = b.position;
if ("top" == b || "bottom" == b) {
a -= c;
if (0 > a || isNaN(a)) a = 0;
this.chartDiv.style.height = a + "px"
}
}
return a
},
updateWidth: function() {
var a = this.divRealWidth,
b = this.divRealHeight,
c = this.legend;
if (c) {
var e = this.legendDiv,
d = e.offsetWidth;
isNaN(c.width) || (d = c.width);
c.ieW && (d = c.ieW);
var g =
e.offsetHeight,
e = e.style,
h = this.chartDiv.style,
k = c.position;
if (("right" == k || "left" == k) && void 0 === c.divId) {
a -= d;
if (0 > a || isNaN(a)) a = 0;
h.width = a + "px";
this.balloon && this.balloon.setBounds && this.balloon.setBounds(2, 2, a - 2, this.realHeight);
"left" == k ? (h.left = d + "px", e.left = "0px") : (h.left = "0px", e.left = a + "px");
b > g && (e.top = (b - g) / 2 + "px")
}
}
return a
},
getTitleHeight: function() {
this.drawTitles(!0);
return this.titleHeight
},
addTitle: function(a, b, c, e, d) {
isNaN(b) && (b = this.fontSize + 2);
a = {
text: a,
size: b,
color: c,
alpha: e,
bold: d,
enabled: !0
};
this.titles.push(a);
return a
},
handleWheel: function(a) {
var b = 0;
a || (a = window.event);
a.wheelDelta ? b = a.wheelDelta / 120 : a.detail && (b = -a.detail / 3);
b && this.handleWheelReal(b, a.shiftKey);
a.preventDefault && a.preventDefault()
},
handleWheelReal: function() {},
handleDocTouchStart: function() {
this.handleMouseMove();
this.tmx = this.mouseX;
this.tmy = this.mouseY;
this.touchStartTime = (new Date).getTime()
},
handleDocTouchEnd: function() {
-.5 < this.tmx && this.tmx < this.divRealWidth + 1 && 0 < this.tmy && this.tmy < this.divRealHeight ?
(this.handleMouseMove(), 4 > Math.abs(this.mouseX - this.tmx) && 4 > Math.abs(this.mouseY - this.tmy) ? (this.tapped = !0, this.panRequired && this.panEventsEnabled && this.chartDiv && (this.chartDiv.style.msTouchAction = "none", this.chartDiv.style.touchAction = "none")) : this.mouseIsOver || this.resetTouchStyle()) : (this.tapped = !1, this.resetTouchStyle())
},
resetTouchStyle: function() {
this.panEventsEnabled && this.chartDiv && (this.chartDiv.style.msTouchAction = "auto", this.chartDiv.style.touchAction = "auto")
},
checkTouchDuration: function(a) {
var b =
this,
c = (new Date).getTime();
if (a)
if (a.touches) b.isTouchEvent = !0;
else if (!b.isTouchEvent) return !0;
if (c - b.touchStartTime > b.touchClickDuration) return !0;
setTimeout(function() {
b.resetTouchDuration()
}, 300)
},
resetTouchDuration: function() {
this.isTouchEvent = !1
},
checkTouchMoved: function() {
if (4 < Math.abs(this.mouseX - this.tmx) || 4 < Math.abs(this.mouseY - this.tmy)) return !0
},
addListeners: function() {
var a = this,
b = a.chartDiv;
document.addEventListener ? ("ontouchstart" in document.documentElement && (b.addEventListener("touchstart",
function(b) {
a.handleTouchStart.call(a, b)
}, !0), b.addEventListener("touchmove", function(b) {
a.handleMouseMove.call(a, b)
}, !0), b.addEventListener("touchend", function(b) {
a.handleTouchEnd.call(a, b)
}, !0), a.docfn1 = function(b) {
a.handleDocTouchStart.call(a, b)
}, a.docfn2 = function(b) {
a.handleDocTouchEnd.call(a, b)
}, document.addEventListener("touchstart", a.docfn1, !0), document.addEventListener("touchend", a.docfn2, !0)), b.addEventListener("mousedown", function(b) {
a.mouseIsOver = !0;
a.handleMouseMove.call(a, b);
a.handleMouseDown.call(a,
b);
a.handleDocTouchStart.call(a, b)
}, !0), b.addEventListener("mouseover", function(b) {
a.handleMouseOver.call(a, b)
}, !0), b.addEventListener("mouseout", function(b) {
a.handleMouseOut.call(a, b)
}, !0), b.addEventListener("mouseup", function(b) {
a.handleDocTouchEnd.call(a, b)
}, !0)) : (b.attachEvent("onmousedown", function(b) {
a.handleMouseDown.call(a, b)
}), b.attachEvent("onmouseover", function(b) {
a.handleMouseOver.call(a, b)
}), b.attachEvent("onmouseout", function(b) {
a.handleMouseOut.call(a, b)
}))
},
dispDUpd: function() {
this.skipEvents ||
(this.dispatchDataUpdated && (this.dispatchDataUpdated = !1, this.fire({
type: "dataUpdated",
chart: this
})), this.chartCreated || (this.chartCreated = !0, this.fire({
type: "init",
chart: this
})), this.chartRendered || (this.fire({
type: "rendered",
chart: this
}), this.chartRendered = !0), this.fire({
type: "drawn",
chart: this
}));
this.skipEvents = !1
},
validateSize: function() {
var a = this;
a.premeasure();
a.checkDisplay();
a.cssScale = 1;
a.cssAngle = 0;
a.checkTransform(a.div);
if (a.divRealWidth != a.previousWidth || a.divRealHeight != a.previousHeight) {
var b =
a.legend;
if (0 < a.realWidth && 0 < a.realHeight) {
a.sizeChanged = !0;
if (b) {
a.legendInitTO && clearTimeout(a.legendInitTO);
var c = setTimeout(function() {
b.invalidateSize()
}, 10);
a.timeOuts.push(c);
a.legendInitTO = c
}
a.marginsUpdated = !1;
clearTimeout(a.initTO);
c = setTimeout(function() {
a.initChart()
}, 10);
a.timeOuts.push(c);
a.initTO = c
}
a.renderFix();
b && b.renderFix && b.renderFix();
clearTimeout(a.resizedTO);
a.resizedTO = setTimeout(function() {
a.fire({
type: "resized",
chart: a
})
}, 10);
a.previousHeight = a.divRealHeight;
a.previousWidth =
a.divRealWidth
}
},
invalidateSize: function() {
this.previousHeight = this.previousWidth = NaN;
this.invalidateSizeReal()
},
invalidateSizeReal: function() {
var a = this;
a.marginsUpdated = !1;
clearTimeout(a.validateTO);
var b = setTimeout(function() {
a.validateSize()
}, 5);
a.timeOuts.push(b);
a.validateTO = b
},
validateData: function(a) {
this.chartCreated && (this.dataChanged = !0, this.marginsUpdated = !1, this.initChart(a))
},
validateNow: function(a, b) {
this.initTO && clearTimeout(this.initTO);
a && (this.dataChanged = !0, this.marginsUpdated = !1);
this.skipEvents = b;
this.chartRendered = !1;
var c = this.legend;
c && c.position != this.prevLegendPosition && (this.previousWidth = this.mw = 0, c.invalidateSize && (c.invalidateSize(), this.validateSize()));
this.write(this.div)
},
showItem: function(a) {
a.hidden = !1;
this.initChart()
},
hideItem: function(a) {
a.hidden = !0;
this.initChart()
},
hideBalloon: function() {
var a = this;
clearTimeout(a.hoverInt);
clearTimeout(a.balloonTO);
a.hoverInt = setTimeout(function() {
a.hideBalloonReal.call(a)
}, a.hideBalloonTime)
},
cleanChart: function() {},
hideBalloonReal: function() {
var a = this.balloon;
a && a.hide && a.hide()
},
showBalloon: function(a, b, c, e, d) {
var g = this;
clearTimeout(g.balloonTO);
clearTimeout(g.hoverInt);
g.balloonTO = setTimeout(function() {
g.showBalloonReal.call(g, a, b, c, e, d)
}, 1)
},
showBalloonReal: function(a, b, c, e, d) {
this.handleMouseMove();
var g = this.balloon;
g.enabled && (g.followCursor(!1), g.changeColor(b), !c || g.fixedPosition ? (g.setPosition(e, d), isNaN(e) || isNaN(d) ? g.followCursor(!0) : g.followCursor(!1)) : g.followCursor(!0), a && g.showBalloon(a))
},
handleMouseOver: function() {
this.outTO && clearTimeout(this.outTO);
d.resetMouseOver();
this.mouseIsOver = !0
},
handleMouseOut: function() {
var a = this;
d.resetMouseOver();
a.outTO && clearTimeout(a.outTO);
a.outTO = setTimeout(function() {
a.handleMouseOutReal()
}, 10)
},
handleMouseOutReal: function() {
this.mouseIsOver = !1
},
handleMouseMove: function(a) {
a || (a = window.event);
this.mouse2Y = this.mouse2X = NaN;
var b, c, e, d;
if (a) {
if (a.touches) {
var g = a.touches.item(1);
g && this.panEventsEnabled && this.boundingRect && (e = g.clientX - this.boundingRect.left,
d = g.clientY - this.boundingRect.top);
a = a.touches.item(0);
if (!a) return
} else this.wasTouched = !1;
this.boundingRect && a.clientX && (b = a.clientX - this.boundingRect.left, c = a.clientY - this.boundingRect.top);
isNaN(e) ? this.mouseX = b : (this.mouseX = Math.min(b, e), this.mouse2X = Math.max(b, e));
isNaN(d) ? this.mouseY = c : (this.mouseY = Math.min(c, d), this.mouse2Y = Math.max(c, d));
this.autoTransform && (this.mouseX /= this.cssScale, this.mouseY /= this.cssScale)
}
},
handleTouchStart: function(a) {
this.hideBalloonReal();
a && (a.touches && this.tapToActivate &&
!this.tapped || !this.panRequired) || (this.handleMouseMove(a), this.handleMouseDown(a))
},
handleTouchEnd: function(a) {
this.wasTouched = !0;
this.handleMouseMove(a);
d.resetMouseOver();
this.handleReleaseOutside(a)
},
handleReleaseOutside: function() {
this.handleDocTouchEnd.call(this)
},
handleMouseDown: function(a) {
d.resetMouseOver();
this.mouseIsOver = !0;
a && a.preventDefault && (this.panEventsEnabled ? a.preventDefault() : a.touches || a.preventDefault())
},
addLegend: function(a, b) {
a = d.processObject(a, d.AmLegend, this.theme);
a.divId =
b;
a.ieW = 0;
var c;
c = "object" != typeof b && b ? document.getElementById(b) : b;
this.legend = a;
a.chart = this;
c ? (a.div = c, a.position = "outside", a.autoMargins = !1) : a.div = this.legendDiv;
return a
},
removeLegend: function() {
this.legend = void 0;
this.previousWidth = 0;
this.legendDiv.innerHTML = ""
},
handleResize: function() {
(d.isPercents(this.width) || d.isPercents(this.height)) && this.invalidateSizeReal();
this.renderFix()
},
renderFix: function() {
if (!d.VML) {
var a = this.container;
a && a.renderFix()
}
},
getSVG: function() {
if (d.hasSVG) return this.container
},
animate: function(a, b, c, e, f, g, h) {
a["an_" + b] && d.removeFromArray(this.animations, a["an_" + b]);
c = {
obj: a,
frame: 0,
attribute: b,
from: c,
to: e,
time: f,
effect: g,
suffix: h
};
a["an_" + b] = c;
this.animations.push(c);
return c
},
setLegendData: function(a) {
var b = this.legend;
b && b.setData(a)
},
stopAnim: function(a) {
d.removeFromArray(this.animations, a)
},
updateAnimations: function() {
var a;
this.container && this.container.update();
if (this.animations)
for (a = this.animations.length - 1; 0 <= a; a--) {
var b = this.animations[a],
c = d.updateRate * b.time,
e = b.frame + 1,
f = b.obj,
g = b.attribute;
if (e <= c) {
b.frame++;
var h = Number(b.from),
k = Number(b.to) - h,
c = d[b.effect](0, e, h, k, c);
0 === k ? (this.animations.splice(a, 1), f.node.style[g] = Number(b.to) + b.suffix) : f.node.style[g] = c + b.suffix
} else f.node.style[g] = Number(b.to) + b.suffix, f.animationFinished = !0, this.animations.splice(a, 1)
}
},
update: function() {
this.updateAnimations();
var a = this.animatable;
if (0 < a.length) {
for (var b = !0, c = a.length - 1; 0 <= c; c--) {
var e = a[c];
e && (e.animationFinished ? a.splice(c, 1) : b = !1)
}
b && (this.fire({
type: "animationFinished",
chart: this
}), this.animatable = [])
}
},
inIframe: function() {
try {
return window.self !== window.top
} catch (a) {
return !0
}
},
brr: function() {
if (!this.hideCredits) {
var a = "amcharts.com",
b = window.location.hostname.split("."),
c;
2 <= b.length && (c = b[b.length - 2] + "." + b[b.length - 1]);
this.amLink && (b = this.amLink.parentNode) && b.removeChild(this.amLink);
b = this.creditsPosition;
if (c != a || !0 === this.inIframe()) {
var a = "http://www." + a,
e = c = 0,
d = this.realWidth,
g = this.realHeight,
h = this.type;
if ("serial" == h || "xy" == h || "gantt" == h) c = this.marginLeftReal,
e = this.marginTopReal, d = c + this.plotAreaWidth, g = e + this.plotAreaHeight;
var h = a + "/javascript-charts/",
k = "JavaScript charts",
l = "JS chart by amCharts";
"ammap" == this.product && (h = a + "/javascript-maps/", k = "Interactive JavaScript maps", l = "JS map by amCharts");
a = document.createElement("a");
l = document.createTextNode(l);
a.setAttribute("href", h);
a.setAttribute("title", k);
this.urlTarget && a.setAttribute("target", this.urlTarget);
a.appendChild(l);
this.chartDiv.appendChild(a);
this.amLink = a;
h = a.style;
h.position = "absolute";
h.textDecoration = "none";
h.color = this.color;
h.fontFamily = this.fontFamily;
h.fontSize = "11px";
h.opacity = .7;
h.display = "block";
var k = a.offsetWidth,
a = a.offsetHeight,
l = 5 + c,
m = e + 5;
"bottom-left" == b && (l = 5 + c, m = g - a - 3);
"bottom-right" == b && (l = d - k - 5, m = g - a - 3);
"top-right" == b && (l = d - k - 5, m = e + 5);
h.left = l + "px";
h.top = m + "px"
}
}
}
});
d.Slice = d.Class({
construct: function() {}
});
d.SerialDataItem = d.Class({
construct: function() {}
});
d.GraphDataItem = d.Class({
construct: function() {}
});
d.Guide = d.Class({
construct: function(a) {
this.cname = "Guide";
d.applyTheme(this, a, this.cname)
}
});
d.Title = d.Class({
construct: function(a) {
this.cname = "Title";
d.applyTheme(this, a, this.cname)
}
});
d.Label = d.Class({
construct: function(a) {
this.cname = "Label";
d.applyTheme(this, a, this.cname)
}
})
})();
(function() {
var d = window.AmCharts;
d.AmBalloon = d.Class({
construct: function(a) {
this.cname = "AmBalloon";
this.enabled = !0;
this.fillColor = "#FFFFFF";
this.fillAlpha = .8;
this.borderThickness = 2;
this.borderColor = "#FFFFFF";
this.borderAlpha = 1;
this.cornerRadius = 0;
this.maxWidth = 220;
this.horizontalPadding = 8;
this.verticalPadding = 4;
this.pointerWidth = 6;
this.pointerOrientation = "V";
this.color = "#000000";
this.adjustBorderColor = !0;
this.show = this.follow = this.showBullet = !1;
this.bulletSize = 3;
this.shadowAlpha = .4;
this.shadowColor =
"#000000";
this.fadeOutDuration = this.animationDuration = .3;
this.fixedPosition = !0;
this.offsetY = 6;
this.offsetX = 1;
this.textAlign = "center";
this.disableMouseEvents = !0;
this.deltaSignX = this.deltaSignY = 1;
d.isModern || (this.offsetY *= 1.5);
this.sdy = this.sdx = 0;
d.applyTheme(this, a, this.cname)
},
draw: function() {
var a = this.pointToX,
b = this.pointToY;
d.isModern || (this.drop = !1);
var c = this.chart;
d.VML && (this.fadeOutDuration = 0);
this.xAnim && c.stopAnim(this.xAnim);
this.yAnim && c.stopAnim(this.yAnim);
this.sdy = this.sdx = 0;
if (!isNaN(a)) {
var e =
this.follow,
f = c.container,
g = this.set;
d.remove(g);
this.removeDiv();
g = f.set();
g.node.style.pointerEvents = "none";
this.set = g;
this.mainSet ? (this.mainSet.push(this.set), this.sdx = this.mainSet.x, this.sdy = this.mainSet.y) : c.balloonsSet.push(g);
if (this.show) {
var h = this.l,
k = this.t,
l = this.r,
m = this.b,
n = this.balloonColor,
p = this.fillColor,
t = this.borderColor,
r = p;
void 0 != n && (this.adjustBorderColor ? r = t = n : p = n);
var q = this.horizontalPadding,
y = this.verticalPadding,
B = this.pointerWidth,
u = this.pointerOrientation,
w = this.cornerRadius,
v = c.fontFamily,
A = this.fontSize;
void 0 == A && (A = c.fontSize);
var n = document.createElement("div"),
C = c.classNamePrefix;
n.className = C + "-balloon-div";
this.className && (n.className = n.className + " " + C + "-balloon-div-" + this.className);
C = n.style;
this.disableMouseEvents && (C.pointerEvents = "none");
C.position = "absolute";
var x = this.minWidth,
z = "";
isNaN(x) || (z = "min-width:" + (x - 2 * q) + "px; ");
n.innerHTML = '<div style="text-align:' + this.textAlign + "; " + z + "max-width:" + this.maxWidth + "px; font-size:" + A + "px; color:" + this.color + "; font-family:" +
v + '">' + this.text + "</div>";
c.chartDiv.appendChild(n);
this.textDiv = n;
var F = n.offsetWidth,
E = n.offsetHeight;
n.clientHeight && (F = n.clientWidth, E = n.clientHeight);
v = E + 2 * y;
z = F + 2 * q;
!isNaN(x) && z < x && (z = x);
window.opera && (v += 2);
var H = !1,
A = this.offsetY;
c.handDrawn && (A += c.handDrawScatter + 2);
"H" != u ? (x = a - z / 2, b < k + v + 10 && "down" != u ? (H = !0, e && (b += A), A = b + B, this.deltaSignY = -1) : (e && (b -= A), A = b - v - B, this.deltaSignY = 1)) : (2 * B > v && (B = v / 2), A = b - v / 2, a < h + (l - h) / 2 ? (x = a + B, this.deltaSignX = -1) : (x = a - z - B, this.deltaSignX = 1));
A + v >= m && (A = m - v);
A < k && (A = k);
x < h && (x = h);
x + z > l && (x = l - z);
var k = A + y,
m = x + q,
G = this.shadowAlpha,
D = this.shadowColor,
q = this.borderThickness,
K = this.bulletSize,
J, y = this.fillAlpha,
L = this.borderAlpha;
this.showBullet && (J = d.circle(f, K, r, y), g.push(J));
this.drop ? (h = z / 1.6, l = 0, "V" == u && (u = "down"), "H" == u && (u = "left"), "down" == u && (x = a + 1, A = b - h - h / 3), "up" == u && (l = 180, x = a + 1, A = b + h + h / 3), "left" == u && (l = 270, x = a + h + h / 3 + 2, A = b), "right" == u && (l = 90, x = a - h - h / 3 + 2, A = b), k = A - E / 2 + 1, m = x - F / 2 - 1, p = d.drop(f, h, l, p, y, q, t, L)) : 0 < w || 0 === B ? (0 < G && (a = d.rect(f, z, v, p, 0, q + 1, D,
G, w), d.isModern ? a.translate(1, 1) : a.translate(4, 4), g.push(a)), p = d.rect(f, z, v, p, y, q, t, L, w)) : (r = [], w = [], "H" != u ? (h = a - x, h > z - B && (h = z - B), h < B && (h = B), r = [0, h - B, a - x, h + B, z, z, 0, 0], w = H ? [0, 0, b - A, 0, 0, v, v, 0] : [v, v, b - A, v, v, 0, 0, v]) : (u = b - A, u > v - B && (u = v - B), u < B && (u = B), w = [0, u - B, b - A, u + B, v, v, 0, 0], r = a < h + (l - h) / 2 ? [0, 0, x < a ? 0 : a - x, 0, 0, z, z, 0] : [z, z, x + z > a ? z : a - x, z, z, 0, 0, z]), 0 < G && (a = d.polygon(f, r, w, p, 0, q, D, G), a.translate(1, 1), g.push(a)), p = d.polygon(f, r, w, p, y, q, t, L));
this.bg = p;
g.push(p);
p.toFront();
d.setCN(c, p, "balloon-bg");
this.className &&
d.setCN(c, p, "balloon-bg-" + this.className);
f = 1 * this.deltaSignX;
m += this.sdx;
k += this.sdy;
C.left = m + "px";
C.top = k + "px";
g.translate(x - f, A, 1, !0);
p = p.getBBox();
this.bottom = A + v + 1;
this.yPos = p.y + A;
J && J.translate(this.pointToX - x + f, b - A);
b = this.animationDuration;
0 < this.animationDuration && !e && !isNaN(this.prevX) && (g.translate(this.prevX, this.prevY, NaN, !0), g.animate({
translate: x - f + "," + A
}, b, "easeOutSine"), n && (C.left = this.prevTX + "px", C.top = this.prevTY + "px", this.xAnim = c.animate({
node: n
}, "left", this.prevTX, m, b, "easeOutSine",
"px"), this.yAnim = c.animate({
node: n
}, "top", this.prevTY, k, b, "easeOutSine", "px")));
this.prevX = x - f;
this.prevY = A;
this.prevTX = m;
this.prevTY = k
}
}
},
fixPrevious: function() {
this.rPrevX = this.prevX;
this.rPrevY = this.prevY;
this.rPrevTX = this.prevTX;
this.rPrevTY = this.prevTY
},
restorePrevious: function() {
this.prevX = this.rPrevX;
this.prevY = this.rPrevY;
this.prevTX = this.rPrevTX;
this.prevTY = this.rPrevTY
},
followMouse: function() {
if (this.follow && this.show) {
var a = this.chart.mouseX - this.offsetX * this.deltaSignX - this.sdx,
b = this.chart.mouseY -
this.sdy;
this.pointToX = a;
this.pointToY = b;
if (a != this.previousX || b != this.previousY)
if (this.previousX = a, this.previousY = b, 0 === this.cornerRadius) this.draw();
else {
var c = this.set;
if (c) {
var e = c.getBBox(),
a = a - e.width / 2,
d = b - e.height - 10;
a < this.l && (a = this.l);
a > this.r - e.width && (a = this.r - e.width);
d < this.t && (d = b + 10);
c.translate(a, d);
b = this.textDiv.style;
b.left = a + this.horizontalPadding + "px";
b.top = d + this.verticalPadding + "px"
}
}
}
},
changeColor: function(a) {
this.balloonColor = a
},
setBounds: function(a, b, c, e) {
this.l = a;
this.t =
b;
this.r = c;
this.b = e;
this.destroyTO && clearTimeout(this.destroyTO)
},
showBalloon: function(a) {
if (this.text != a || this.positionChanged) this.text = a, this.isHiding = !1, this.show = !0, this.destroyTO && clearTimeout(this.destroyTO), a = this.chart, this.fadeAnim1 && a.stopAnim(this.fadeAnim1), this.fadeAnim2 && a.stopAnim(this.fadeAnim2), this.draw(), this.positionChanged = !1
},
hide: function(a) {
var b = this;
b.text = void 0;
isNaN(a) && (a = b.fadeOutDuration);
var c = b.chart;
if (0 < a && !b.isHiding) {
b.isHiding = !0;
b.destroyTO && clearTimeout(b.destroyTO);
b.destroyTO = setTimeout(function() {
b.destroy.call(b)
}, 1E3 * a);
b.follow = !1;
b.show = !1;
var e = b.set;
e && (e.setAttr("opacity", b.fillAlpha), b.fadeAnim1 = e.animate({
opacity: 0
}, a, "easeInSine"));
b.textDiv && (b.fadeAnim2 = c.animate({
node: b.textDiv
}, "opacity", 1, 0, a, "easeInSine", ""))
} else b.show = !1, b.follow = !1, b.destroy()
},
setPosition: function(a, b) {
if (a != this.pointToX || b != this.pointToY) this.previousX = this.pointToX, this.previousY = this.pointToY, this.pointToX = a, this.pointToY = b, this.positionChanged = !0
},
followCursor: function(a) {
var b =
this;
b.follow = a;
clearInterval(b.interval);
var c = b.chart.mouseX - b.sdx,
e = b.chart.mouseY - b.sdy;
!isNaN(c) && a && (b.pointToX = c - b.offsetX * b.deltaSignX, b.pointToY = e, b.followMouse(), b.interval = setInterval(function() {
b.followMouse.call(b)
}, 40))
},
removeDiv: function() {
if (this.textDiv) {
var a = this.textDiv.parentNode;
a && a.removeChild(this.textDiv)
}
},
destroy: function() {
clearInterval(this.interval);
d.remove(this.set);
this.removeDiv();
this.set = null
}
})
})();
(function() {
var d = window.AmCharts;
d.circle = function(a, b, c, e, f, g, h, k, l) {
0 >= b && (b = .001);
if (void 0 == f || 0 === f) f = .01;
void 0 === g && (g = "#000000");
void 0 === h && (h = 0);
e = {
fill: c,
stroke: g,
"fill-opacity": e,
"stroke-width": f,
"stroke-opacity": h
};
a = isNaN(l) ? a.circle(0, 0, b).attr(e) : a.ellipse(0, 0, b, l).attr(e);
k && a.gradient("radialGradient", [c, d.adjustLuminosity(c, -.6)]);
return a
};
d.text = function(a, b, c, e, f, g, h, k) {
g || (g = "middle");
"right" == g && (g = "end");
"left" == g && (g = "start");
isNaN(k) && (k = 1);
void 0 !== b && (b = String(b), d.isIE &&
!d.isModern && (b = b.replace("&amp;", "&"), b = b.replace("&", "&amp;")));
c = {
fill: c,
"font-family": e,
"font-size": f + "px",
opacity: k
};
!0 === h && (c["font-weight"] = "bold");
c["text-anchor"] = g;
return a.text(b, c)
};
d.polygon = function(a, b, c, e, f, g, h, k, l, m, n) {
isNaN(g) && (g = .01);
isNaN(k) && (k = f);
var p = e,
t = !1;
"object" == typeof p && 1 < p.length && (t = !0, p = p[0]);
void 0 === h && (h = p);
f = {
fill: p,
stroke: h,
"fill-opacity": f,
"stroke-width": g,
"stroke-opacity": k
};
void 0 !== n && 0 < n && (f["stroke-dasharray"] = n);
n = d.dx;
g = d.dy;
a.handDrawn && (c = d.makeHD(b,
c, a.handDrawScatter), b = c[0], c = c[1]);
h = Math.round;
m && (b[r] = d.roundTo(b[r], 5), c[r] = d.roundTo(c[r], 5), h = Number);
k = "M" + (h(b[0]) + n) + "," + (h(c[0]) + g);
for (var r = 1; r < b.length; r++) m && (b[r] = d.roundTo(b[r], 5), c[r] = d.roundTo(c[r], 5)), k += " L" + (h(b[r]) + n) + "," + (h(c[r]) + g);
a = a.path(k + " Z").attr(f);
t && a.gradient("linearGradient", e, l);
return a
};
d.rect = function(a, b, c, e, f, g, h, k, l, m, n) {
if (isNaN(b) || isNaN(c)) return a.set();
isNaN(g) && (g = 0);
void 0 === l && (l = 0);
void 0 === m && (m = 270);
isNaN(f) && (f = 0);
var p = e,
t = !1;
"object" == typeof p &&
(p = p[0], t = !0);
void 0 === h && (h = p);
void 0 === k && (k = f);
b = Math.round(b);
c = Math.round(c);
var r = 0,
q = 0;
0 > b && (b = Math.abs(b), r = -b);
0 > c && (c = Math.abs(c), q = -c);
r += d.dx;
q += d.dy;
f = {
fill: p,
stroke: h,
"fill-opacity": f,
"stroke-opacity": k
};
void 0 !== n && 0 < n && (f["stroke-dasharray"] = n);
a = a.rect(r, q, b, c, l, g).attr(f);
t && a.gradient("linearGradient", e, m);
return a
};
d.bullet = function(a, b, c, e, f, g, h, k, l, m, n, p, t) {
var r;
"circle" == b && (b = "round");
switch (b) {
case "round":
r = d.circle(a, c / 2, e, f, g, h, k);
break;
case "square":
r = d.polygon(a, [-c /
2, c / 2, c / 2, -c / 2
], [c / 2, c / 2, -c / 2, -c / 2], e, f, g, h, k, m - 180, void 0, t);
break;
case "rectangle":
r = d.polygon(a, [-c, c, c, -c], [c / 2, c / 2, -c / 2, -c / 2], e, f, g, h, k, m - 180, void 0, t);
break;
case "diamond":
r = d.polygon(a, [-c / 2, 0, c / 2, 0], [0, -c / 2, 0, c / 2], e, f, g, h, k);
break;
case "triangleUp":
r = d.triangle(a, c, 0, e, f, g, h, k);
break;
case "triangleDown":
r = d.triangle(a, c, 180, e, f, g, h, k);
break;
case "triangleLeft":
r = d.triangle(a, c, 270, e, f, g, h, k);
break;
case "triangleRight":
r = d.triangle(a, c, 90, e, f, g, h, k);
break;
case "bubble":
r = d.circle(a, c / 2, e, f,
g, h, k, !0);
break;
case "line":
r = d.line(a, [-c / 2, c / 2], [0, 0], e, f, g, h, k);
break;
case "yError":
r = a.set();
r.push(d.line(a, [0, 0], [-c / 2, c / 2], e, f, g));
r.push(d.line(a, [-l, l], [-c / 2, -c / 2], e, f, g));
r.push(d.line(a, [-l, l], [c / 2, c / 2], e, f, g));
break;
case "xError":
r = a.set(), r.push(d.line(a, [-c / 2, c / 2], [0, 0], e, f, g)), r.push(d.line(a, [-c / 2, -c / 2], [-l, l], e, f, g)), r.push(d.line(a, [c / 2, c / 2], [-l, l], e, f, g))
}
r && r.pattern(n, NaN, p);
return r
};
d.triangle = function(a, b, c, e, d, g, h, k) {
if (void 0 === g || 0 === g) g = 1;
void 0 === h && (h = "#000");
void 0 ===
k && (k = 0);
e = {
fill: e,
stroke: h,
"fill-opacity": d,
"stroke-width": g,
"stroke-opacity": k
};
b /= 2;
var l;
0 === c && (l = " M" + -b + "," + b + " L0," + -b + " L" + b + "," + b + " Z");
180 == c && (l = " M" + -b + "," + -b + " L0," + b + " L" + b + "," + -b + " Z");
90 == c && (l = " M" + -b + "," + -b + " L" + b + ",0 L" + -b + "," + b + " Z");
270 == c && (l = " M" + -b + ",0 L" + b + "," + b + " L" + b + "," + -b + " Z");
return a.path(l).attr(e)
};
d.line = function(a, b, c, e, f, g, h, k, l, m, n) {
if (a.handDrawn && !n) return d.handDrawnLine(a, b, c, e, f, g, h, k, l, m, n);
g = {
fill: "none",
"stroke-width": g
};
void 0 !== h && 0 < h && (g["stroke-dasharray"] =
h);
isNaN(f) || (g["stroke-opacity"] = f);
e && (g.stroke = e);
e = Math.round;
m && (e = Number, b[0] = d.roundTo(b[0], 5), c[0] = d.roundTo(c[0], 5));
m = d.dx;
f = d.dy;
h = "M" + (e(b[0]) + m) + "," + (e(c[0]) + f);
for (k = 1; k < b.length; k++) b[k] = d.roundTo(b[k], 5), c[k] = d.roundTo(c[k], 5), h += " L" + (e(b[k]) + m) + "," + (e(c[k]) + f);
if (d.VML) return a.path(h, void 0, !0).attr(g);
l && (h += " M0,0 L0,0");
return a.path(h).attr(g)
};
d.makeHD = function(a, b, c) {
for (var e = [], d = [], g = 1; g < a.length; g++)
for (var h = Number(a[g - 1]), k = Number(b[g - 1]), l = Number(a[g]), m = Number(b[g]),
n = Math.round(Math.sqrt(Math.pow(l - h, 2) + Math.pow(m - k, 2)) / 50) + 1, l = (l - h) / n, m = (m - k) / n, p = 0; p <= n; p++) {
var t = k + p * m + Math.random() * c;
e.push(h + p * l + Math.random() * c);
d.push(t)
}
return [e, d]
};
d.handDrawnLine = function(a, b, c, e, f, g, h, k, l, m) {
var n, p = a.set();
for (n = 1; n < b.length; n++)
for (var t = [b[n - 1], b[n]], r = [c[n - 1], c[n]], r = d.makeHD(t, r, a.handDrawScatter), t = r[0], r = r[1], q = 1; q < t.length; q++) p.push(d.line(a, [t[q - 1], t[q]], [r[q - 1], r[q]], e, f, g + Math.random() * a.handDrawThickness - a.handDrawThickness / 2, h, k, l, m, !0));
return p
};
d.doNothing =
function(a) {
return a
};
d.drop = function(a, b, c, e, d, g, h, k) {
var l = 1 / 180 * Math.PI,
m = c - 20,
n = Math.sin(m * l) * b,
p = Math.cos(m * l) * b,
t = Math.sin((m + 40) * l) * b,
r = Math.cos((m + 40) * l) * b,
q = .8 * b,
y = -b / 3,
B = b / 3;
0 === c && (y = -y, B = 0);
180 == c && (B = 0);
90 == c && (y = 0);
270 == c && (y = 0, B = -B);
c = {
fill: e,
stroke: h,
"stroke-width": g,
"stroke-opacity": k,
"fill-opacity": d
};
b = "M" + n + "," + p + " A" + b + "," + b + ",0,1,1," + t + "," + r + (" A" + q + "," + q + ",0,0,0," + (Math.sin((m + 20) * l) * b + B) + "," + (Math.cos((m + 20) * l) * b + y));
b += " A" + q + "," + q + ",0,0,0," + n + "," + p;
return a.path(b, void 0,
void 0, "1000,1000").attr(c)
};
d.wedge = function(a, b, c, e, f, g, h, k, l, m, n, p, t, r) {
var q = Math.round;
g = q(g);
h = q(h);
k = q(k);
var y = q(h / g * k),
B = d.VML,
u = 359.5 + g / 100;
359.94 < u && (u = 359.94);
f >= u && (f = u);
var w = 1 / 180 * Math.PI,
u = b + Math.sin(e * w) * k,
v = c - Math.cos(e * w) * y,
A = b + Math.sin(e * w) * g,
C = c - Math.cos(e * w) * h,
x = b + Math.sin((e + f) * w) * g,
z = c - Math.cos((e + f) * w) * h,
F = b + Math.sin((e + f) * w) * k,
w = c - Math.cos((e + f) * w) * y,
E = {
fill: d.adjustLuminosity(m.fill, -.2),
"stroke-opacity": 0,
"fill-opacity": m["fill-opacity"]
},
H = 0;
180 < Math.abs(f) && (H = 1);
e = a.set();
var G;
B && (u = q(10 * u), A = q(10 * A), x = q(10 * x), F = q(10 * F), v = q(10 * v), C = q(10 * C), z = q(10 * z), w = q(10 * w), b = q(10 * b), l = q(10 * l), c = q(10 * c), g *= 10, h *= 10, k *= 10, y *= 10, 1 > Math.abs(f) && 1 >= Math.abs(x - A) && 1 >= Math.abs(z - C) && (G = !0));
f = "";
var D;
p && (E["fill-opacity"] = 0, E["stroke-opacity"] = m["stroke-opacity"] / 2, E.stroke = m.stroke);
if (0 < l) {
D = " M" + u + "," + (v + l) + " L" + A + "," + (C + l);
B ? (G || (D += " A" + (b - g) + "," + (l + c - h) + "," + (b + g) + "," + (l + c + h) + "," + A + "," + (C + l) + "," + x + "," + (z + l)), D += " L" + F + "," + (w + l), 0 < k && (G || (D += " B" + (b - k) + "," + (l + c - y) + "," + (b + k) + "," +
(l + c + y) + "," + F + "," + (l + w) + "," + u + "," + (l + v)))) : (D += " A" + g + "," + h + ",0," + H + ",1," + x + "," + (z + l) + " L" + F + "," + (w + l), 0 < k && (D += " A" + k + "," + y + ",0," + H + ",0," + u + "," + (v + l)));
D += " Z";
var K = l;
B && (K /= 10);
for (var J = 0; J < K; J += 10) {
var L = a.path(D, void 0, void 0, "1000,1000").attr(E);
e.push(L);
L.translate(0, -J)
}
D = a.path(" M" + u + "," + v + " L" + u + "," + (v + l) + " L" + A + "," + (C + l) + " L" + A + "," + C + " L" + u + "," + v + " Z", void 0, void 0, "1000,1000").attr(E);
l = a.path(" M" + x + "," + z + " L" + x + "," + (z + l) + " L" + F + "," + (w + l) + " L" + F + "," + w + " L" + x + "," + z + " Z", void 0, void 0,
"1000,1000").attr(E);
e.push(D);
e.push(l)
}
B ? (G || (f = " A" + q(b - g) + "," + q(c - h) + "," + q(b + g) + "," + q(c + h) + "," + q(A) + "," + q(C) + "," + q(x) + "," + q(z)), h = " M" + q(u) + "," + q(v) + " L" + q(A) + "," + q(C) + f + " L" + q(F) + "," + q(w)) : h = " M" + u + "," + v + " L" + A + "," + C + (" A" + g + "," + h + ",0," + H + ",1," + x + "," + z) + " L" + F + "," + w;
0 < k && (B ? G || (h += " B" + (b - k) + "," + (c - y) + "," + (b + k) + "," + (c + y) + "," + F + "," + w + "," + u + "," + v) : h += " A" + k + "," + y + ",0," + H + ",0," + u + "," + v);
a.handDrawn && (k = d.line(a, [u, A], [v, C], m.stroke, m.thickness * Math.random() * a.handDrawThickness, m["stroke-opacity"]),
e.push(k));
a = a.path(h + " Z", void 0, void 0, "1000,1000").attr(m);
if (n) {
k = [];
for (y = 0; y < n.length; y++) k.push(d.adjustLuminosity(m.fill, n[y]));
"radial" != r || d.isModern || (k = []);
0 < k.length && a.gradient(r + "Gradient", k)
}
d.isModern && "radial" == r && a.grad && (a.grad.setAttribute("gradientUnits", "userSpaceOnUse"), a.grad.setAttribute("r", g), a.grad.setAttribute("cx", b), a.grad.setAttribute("cy", c));
a.pattern(p, NaN, t);
e.wedge = a;
e.push(a);
return e
};
d.rgb2hex = function(a) {
return (a = a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i)) &&
4 === a.length ? "#" + ("0" + parseInt(a[1], 10).toString(16)).slice(-2) + ("0" + parseInt(a[2], 10).toString(16)).slice(-2) + ("0" + parseInt(a[3], 10).toString(16)).slice(-2) : ""
};
d.adjustLuminosity = function(a, b) {
a && -1 != a.indexOf("rgb") && (a = d.rgb2hex(a));
a = String(a).replace(/[^0-9a-f]/gi, "");
6 > a.length && (a = String(a[0]) + String(a[0]) + String(a[1]) + String(a[1]) + String(a[2]) + String(a[2]));
b = b || 0;
var c = "#",
e, f;
for (f = 0; 3 > f; f++) e = parseInt(a.substr(2 * f, 2), 16), e = Math.round(Math.min(Math.max(0, e + e * b), 255)).toString(16), c += ("00" +
e).substr(e.length);
return c
}
})();
(function() {
var d = window.AmCharts;
d.AmLegend = d.Class({
construct: function(a) {
this.enabled = !0;
this.cname = "AmLegend";
this.createEvents("rollOverMarker", "rollOverItem", "rollOutMarker", "rollOutItem", "showItem", "hideItem", "clickMarker", "clickLabel");
this.position = "bottom";
this.borderColor = this.color = "#000000";
this.borderAlpha = 0;
this.markerLabelGap = 5;
this.verticalGap = 10;
this.align = "left";
this.horizontalGap = 0;
this.spacing = 10;
this.markerDisabledColor = "#AAB3B3";
this.markerType = "square";
this.markerSize = 16;
this.markerBorderThickness =
this.markerBorderAlpha = 1;
this.marginBottom = this.marginTop = 0;
this.marginLeft = this.marginRight = 20;
this.autoMargins = !0;
this.valueWidth = 50;
this.switchable = !0;
this.switchType = "x";
this.switchColor = "#FFFFFF";
this.rollOverColor = "#CC0000";
this.reversedOrder = !1;
this.labelText = "[[title]]";
this.valueText = "[[value]]";
this.accessibleLabel = "[[title]]";
this.useMarkerColorForLabels = !1;
this.rollOverGraphAlpha = 1;
this.textClickEnabled = !1;
this.equalWidths = !0;
this.backgroundColor = "#FFFFFF";
this.backgroundAlpha = 0;
this.useGraphSettings = !1;
this.showEntries = !0;
this.labelDx = 0;
d.applyTheme(this, a, this.cname)
},
setData: function(a) {
this.legendData = a;
this.invalidateSize()
},
invalidateSize: function() {
this.destroy();
this.entries = [];
this.valueLabels = [];
var a = this.legendData;
this.enabled && (d.ifArray(a) || d.ifArray(this.data)) && this.drawLegend()
},
drawLegend: function() {
var a = this.chart,
b = this.position,
c = this.width,
e = a.divRealWidth,
f = a.divRealHeight,
g = this.div,
h = this.legendData;
this.data && (h = this.combineLegend ? this.legendData.concat(this.data) :
this.data);
isNaN(this.fontSize) && (this.fontSize = a.fontSize);
this.maxColumnsReal = this.maxColumns;
if ("right" == b || "left" == b) this.maxColumnsReal = 1, this.autoMargins && (this.marginLeft = this.marginRight = 10);
else if (this.autoMargins) {
this.marginRight = a.marginRight;
this.marginLeft = a.marginLeft;
var k = a.autoMarginOffset;
"bottom" == b ? (this.marginBottom = k, this.marginTop = 0) : (this.marginTop = k, this.marginBottom = 0)
}
c = void 0 !== c ? d.toCoordinate(c, e) : "right" != b && "left" != b ? a.realWidth : 0 < this.ieW ? this.ieW : a.realWidth;
"outside" ==
b ? (c = g.offsetWidth, f = g.offsetHeight, g.clientHeight && (c = g.clientWidth, f = g.clientHeight)) : (isNaN(c) || (g.style.width = c + "px"), g.className = "amChartsLegend " + a.classNamePrefix + "-legend-div");
this.divWidth = c;
(b = this.container) ? (b.container.innerHTML = "", g.appendChild(b.container), b.width = c, b.height = f, b.setSize(c, f), b.addDefs(a)) : b = new d.AmDraw(g, c, f, a);
this.container = b;
this.lx = 0;
this.ly = 8;
f = this.markerSize;
f > this.fontSize && (this.ly = f / 2 - 1);
0 < f && (this.lx += f + this.markerLabelGap);
this.titleWidth = 0;
if (f = this.title) f =
d.text(this.container, f, this.color, a.fontFamily, this.fontSize, "start", !0), d.setCN(a, f, "legend-title"), f.translate(this.marginLeft, this.marginTop + this.verticalGap + this.ly + 1), a = f.getBBox(), this.titleWidth = a.width + 15, this.titleHeight = a.height + 6;
this.index = this.maxLabelWidth = 0;
if (this.showEntries) {
for (a = 0; a < h.length; a++) this.createEntry(h[a]);
for (a = this.index = 0; a < h.length; a++) this.createValue(h[a])
}
this.arrangeEntries();
this.updateValues()
},
arrangeEntries: function() {
var a = this.position,
b = this.marginLeft +
this.titleWidth,
c = this.marginRight,
e = this.marginTop,
f = this.marginBottom,
g = this.horizontalGap,
h = this.div,
k = this.divWidth,
l = this.maxColumnsReal,
m = this.verticalGap,
n = this.spacing,
p = k - c - b,
t = 0,
r = 0,
q = this.container;
this.set && this.set.remove();
var y = q.set();
this.set = y;
var B = q.set();
y.push(B);
var u = this.entries,
w, v;
for (v = 0; v < u.length; v++) {
w = u[v].getBBox();
var A = w.width;
A > t && (t = A);
w = w.height;
w > r && (r = w)
}
var A = r = 0,
C = g,
x = 0,
z = 0;
for (v = 0; v < u.length; v++) {
var F = u[v];
this.reversedOrder && (F = u[u.length - v - 1]);
w = F.getBBox();
var E;
this.equalWidths ? E = A * (t + n + this.markerLabelGap) : (E = C, C = C + w.width + g + n);
E + w.width > p && 0 < v && 0 !== A && (r++, E = A = 0, C = E + w.width + g + n, x = x + z + m, z = 0);
w.height > z && (z = w.height);
F.translate(E, x);
A++;
!isNaN(l) && A >= l && (A = 0, r++, x = x + z + m, C = g, z = 0);
B.push(F)
}
w = B.getBBox();
l = w.height + 2 * m - 1;
"left" == a || "right" == a ? (n = w.width + 2 * g, k = n + b + c, h.style.width = k + "px", this.ieW = k) : n = k - b - c - 1;
c = d.polygon(this.container, [0, n, n, 0], [0, 0, l, l], this.backgroundColor, this.backgroundAlpha, 1, this.borderColor, this.borderAlpha);
d.setCN(this.chart,
c, "legend-bg");
y.push(c);
y.translate(b, e);
c.toBack();
b = g;
if ("top" == a || "bottom" == a || "absolute" == a || "outside" == a) "center" == this.align ? b = g + (n - w.width) / 2 : "right" == this.align && (b = g + n - w.width);
B.translate(b, m + 1);
this.titleHeight > l && (l = this.titleHeight);
e = l + e + f + 1;
0 > e && (e = 0);
"absolute" != a && "outside" != a && e > this.chart.divRealHeight && (h.style.top = "0px");
h.style.height = Math.round(e) + "px";
q.setSize(this.divWidth, e)
},
createEntry: function(a) {
if (!1 !== a.visibleInLegend && !a.hideFromLegend) {
var b = this,
c = b.chart,
e = b.useGraphSettings,
f = a.markerType;
f && (e = !1);
a.legendEntryWidth = b.markerSize;
f || (f = b.markerType);
var g = a.color,
h = a.alpha;
a.legendKeyColor && (g = a.legendKeyColor());
a.legendKeyAlpha && (h = a.legendKeyAlpha());
var k;
!0 === a.hidden && (k = g = b.markerDisabledColor);
var l = a.pattern,
m, n = a.customMarker;
n || (n = b.customMarker);
var p = b.container,
t = b.markerSize,
r = 0,
q = 0,
y = t / 2;
if (e) {
e = a.type;
b.switchType = void 0;
if ("line" == e || "step" == e || "smoothedLine" == e || "ohlc" == e) m = p.set(), a.hidden || (g = a.lineColorR, k = a.bulletBorderColorR), r = d.line(p, [0, 2 *
t
], [t / 2, t / 2], g, a.lineAlpha, a.lineThickness, a.dashLength), d.setCN(c, r, "graph-stroke"), m.push(r), a.bullet && (a.hidden || (g = a.bulletColorR), r = d.bullet(p, a.bullet, a.bulletSize, g, a.bulletAlpha, a.bulletBorderThickness, k, a.bulletBorderAlpha)) && (d.setCN(c, r, "graph-bullet"), r.translate(t + 1, t / 2), m.push(r)), y = 0, r = t, q = t / 3;
else {
a.getGradRotation && (m = a.getGradRotation(), 0 === m && (m = 180));
r = a.fillColorsR;
!0 === a.hidden && (r = g);
if (m = b.createMarker("rectangle", r, a.fillAlphas, a.lineThickness, g, a.lineAlpha, m, l, a.dashLength)) y =
t, m.translate(y, t / 2);
r = t
}
d.setCN(c, m, "graph-" + e);
d.setCN(c, m, "graph-" + a.id)
} else if (n) m = p.image(n, 0, 0, t, t);
else {
var B;
isNaN(b.gradientRotation) || (B = 180 + b.gradientRotation);
(m = b.createMarker(f, g, h, void 0, void 0, void 0, B, l)) && m.translate(t / 2, t / 2)
}
d.setCN(c, m, "legend-marker");
b.addListeners(m, a);
p = p.set([m]);
b.switchable && a.switchable && p.setAttr("cursor", "pointer");
void 0 !== a.id && d.setCN(c, p, "legend-item-" + a.id);
d.setCN(c, p, a.className, !0);
k = b.switchType;
var u;
k && "none" != k && 0 < t && ("x" == k ? (u = b.createX(),
u.translate(t / 2, t / 2)) : u = b.createV(), u.dItem = a, !0 !== a.hidden ? "x" == k ? u.hide() : u.show() : "x" != k && u.hide(), b.switchable || u.hide(), b.addListeners(u, a), a.legendSwitch = u, p.push(u), d.setCN(c, u, "legend-switch"));
k = b.color;
a.showBalloon && b.textClickEnabled && void 0 !== b.selectedColor && (k = b.selectedColor);
b.useMarkerColorForLabels && !l && (k = g);
!0 === a.hidden && (k = b.markerDisabledColor);
g = d.massReplace(b.labelText, {
"[[title]]": a.title
});
void 0 !== b.tabIndex && (p.setAttr("tabindex", b.tabIndex), p.setAttr("role", "menuitem"),
p.keyup(function(c) {
13 == c.keyCode && b.clickMarker(a, c)
}));
c.accessible && b.accessibleLabel && (l = d.massReplace(b.accessibleLabel, {
"[[title]]": a.title
}), c.makeAccessible(p, l));
l = b.fontSize;
m && (t <= l && (t = t / 2 + b.ly - l / 2 + (l + 2 - t) / 2 - q, m.translate(y, t), u && u.translate(u.x, t)), a.legendEntryWidth = m.getBBox().width);
var w;
g && (g = d.fixBrakes(g), a.legendTextReal = g, w = b.labelWidth, w = isNaN(w) ? d.text(b.container, g, k, c.fontFamily, l, "start") : d.wrappedText(b.container, g, k, c.fontFamily, l, "start", !1, w, 0), d.setCN(c, w, "legend-label"),
w.translate(b.lx + r, b.ly), p.push(w), b.labelDx = r, c = w.getBBox().width, b.maxLabelWidth < c && (b.maxLabelWidth = c));
b.entries[b.index] = p;
a.legendEntry = b.entries[b.index];
a.legendMarker = m;
a.legendLabel = w;
b.index++
}
},
addListeners: function(a, b) {
var c = this;
a && a.mouseover(function(a) {
c.rollOverMarker(b, a)
}).mouseout(function(a) {
c.rollOutMarker(b, a)
}).click(function(a) {
c.clickMarker(b, a)
})
},
rollOverMarker: function(a, b) {
this.switchable && this.dispatch("rollOverMarker", a, b);
this.dispatch("rollOverItem", a, b)
},
rollOutMarker: function(a,
b) {
this.switchable && this.dispatch("rollOutMarker", a, b);
this.dispatch("rollOutItem", a, b)
},
clickMarker: function(a, b) {
this.switchable && (!0 === a.hidden ? this.dispatch("showItem", a, b) : this.dispatch("hideItem", a, b));
this.dispatch("clickMarker", a, b)
},
rollOverLabel: function(a, b) {
a.hidden || this.textClickEnabled && a.legendLabel && a.legendLabel.attr({
fill: this.rollOverColor
});
this.dispatch("rollOverItem", a, b)
},
rollOutLabel: function(a, b) {
if (!a.hidden && this.textClickEnabled && a.legendLabel) {
var c = this.color;
void 0 !==
this.selectedColor && a.showBalloon && (c = this.selectedColor);
this.useMarkerColorForLabels && (c = a.lineColor, void 0 === c && (c = a.color));
a.legendLabel.attr({
fill: c
})
}
this.dispatch("rollOutItem", a, b)
},
clickLabel: function(a, b) {
this.textClickEnabled ? a.hidden || this.dispatch("clickLabel", a, b) : this.switchable && (!0 === a.hidden ? this.dispatch("showItem", a, b) : this.dispatch("hideItem", a, b))
},
dispatch: function(a, b, c) {
a = {
type: a,
dataItem: b,
target: this,
event: c,
chart: this.chart
};
this.chart && this.chart.handleLegendEvent(a);
this.fire(a)
},
createValue: function(a) {
var b = this,
c = b.fontSize,
e = b.chart;
if (!1 !== a.visibleInLegend && !a.hideFromLegend) {
var f = b.maxLabelWidth;
b.forceWidth && (f = b.labelWidth);
b.equalWidths || (b.valueAlign = "left");
"left" == b.valueAlign && a.legendLabel && (f = a.legendLabel.getBBox().width);
var g = f;
if (b.valueText && 0 < b.valueWidth) {
var h = b.color;
b.useMarkerColorForValues && (h = a.color, a.legendKeyColor && (h = a.legendKeyColor()));
!0 === a.hidden && (h = b.markerDisabledColor);
var k = b.valueText,
f = f + b.lx + b.labelDx + b.markerLabelGap +
b.valueWidth,
l = "end";
"left" == b.valueAlign && (f -= b.valueWidth, l = "start");
h = d.text(b.container, k, h, b.chart.fontFamily, c, l);
d.setCN(e, h, "legend-value");
h.translate(f, b.ly);
b.entries[b.index].push(h);
g += b.valueWidth + 2 * b.markerLabelGap;
h.dItem = a;
b.valueLabels.push(h)
}
b.index++;
e = b.markerSize;
e < c + 7 && (e = c + 7, d.VML && (e += 3));
c = b.container.rect(a.legendEntryWidth, 0, g, e, 0, 0).attr({
stroke: "none",
fill: "#fff",
"fill-opacity": .005
});
c.dItem = a;
b.entries[b.index - 1].push(c);
c.mouseover(function(c) {
b.rollOverLabel(a, c)
}).mouseout(function(c) {
b.rollOutLabel(a,
c)
}).click(function(c) {
b.clickLabel(a, c)
})
}
},
createV: function() {
var a = this.markerSize;
return d.polygon(this.container, [a / 5, a / 2, a - a / 5, a / 2], [a / 3, a - a / 5, a / 5, a / 1.7], this.switchColor)
},
createX: function() {
var a = (this.markerSize - 4) / 2,
b = {
stroke: this.switchColor,
"stroke-width": 3
},
c = this.container,
e = d.line(c, [-a, a], [-a, a]).attr(b),
a = d.line(c, [-a, a], [a, -a]).attr(b);
return this.container.set([e, a])
},
createMarker: function(a, b, c, e, f, g, h, k, l) {
var m = this.markerSize,
n = this.container;
f || (f = this.markerBorderColor);
f ||
(f = b);
isNaN(e) && (e = this.markerBorderThickness);
isNaN(g) && (g = this.markerBorderAlpha);
return d.bullet(n, a, m, b, c, e, f, g, m, h, k, this.chart.path, l)
},
validateNow: function() {
this.invalidateSize()
},
updateValues: function() {
var a = this.valueLabels,
b = this.chart,
c, e = this.data;
if (a)
for (c = 0; c < a.length; c++) {
var f = a[c],
g = f.dItem;
g.periodDataItem = void 0;
g.periodPercentDataItem = void 0;
var h = " ";
if (e) g.value ? f.text(g.value) : f.text("");
else {
var k = null;
if (void 0 !== g.type) {
var k = g.currentDataItem,
l = this.periodValueText;
g.legendPeriodValueText &&
(l = g.legendPeriodValueText);
g.legendPeriodValueTextR && (l = g.legendPeriodValueTextR);
k ? (h = this.valueText, g.legendValueText && (h = g.legendValueText), h = b.formatString(h, k)) : l && b.formatPeriodString && (l = d.massReplace(l, {
"[[title]]": g.title
}), h = b.formatPeriodString(l, g))
} else h = b.formatString(this.valueText, g);
l = g;
k && (l = k);
var m = this.valueFunction;
m && (h = m(l, h, b.periodDataItem));
var n;
this.useMarkerColorForLabels && !k && g.lastDataItem && (k = g.lastDataItem);
k ? n = b.getBalloonColor(g, k) : g.legendKeyColor && (n = g.legendKeyColor());
g.legendColorFunction && (n = g.legendColorFunction(l, h, g.periodDataItem, g.periodPercentDataItem));
f.text(h);
if (!g.pattern && (this.useMarkerColorForValues && f.setAttr("fill", n), this.useMarkerColorForLabels)) {
if (f = g.legendMarker) f.setAttr("fill", n), f.setAttr("stroke", n);
(g = g.legendLabel) && g.setAttr("fill", n)
}
}
}
},
renderFix: function() {
if (!d.VML && this.enabled) {
var a = this.container;
a && a.renderFix()
}
},
destroy: function() {
this.div.innerHTML = "";
d.remove(this.set)
}
})
})();
(function() {
var d = window.AmCharts;
d.AmMap = d.Class({
inherits: d.AmChart,
construct: function(a) {
this.cname = "AmMap";
this.type = "map";
this.theme = a;
this.svgNotSupported = "This browser doesn't support SVG. Use Chrome, Firefox, Internet Explorer 9 or later.";
this.createEvents("rollOverMapObject", "rollOutMapObject", "clickMapObject", "mouseDownMapObject", "selectedObjectChanged", "homeButtonClicked", "zoomCompleted", "dragCompleted", "positionChanged", "writeDevInfo", "click", "descriptionClosed");
this.zoomDuration = .6;
this.zoomControl = new d.ZoomControl(a);
this.fitMapToContainer = !0;
this.mouseWheelZoomEnabled = this.backgroundZoomsToTop = !1;
this.allowClickOnSelectedObject = this.useHandCursorOnClickableOjects = this.showBalloonOnSelectedObject = !0;
this.showObjectsAfterZoom = this.wheelBusy = !1;
this.zoomOnDoubleClick = this.useObjectColorForBalloon = !0;
this.allowMultipleDescriptionWindows = !1;
this.dragMap = this.centerMap = this.linesAboveImages = !0;
this.colorSteps = 5;
this.forceNormalize = !1;
this.showAreasInList = !0;
this.showLinesInList =
this.showImagesInList = !1;
this.areasProcessor = new d.AreasProcessor(this);
this.areasSettings = new d.AreasSettings(a);
this.imagesProcessor = new d.ImagesProcessor(this);
this.imagesSettings = new d.ImagesSettings(a);
this.linesProcessor = new d.LinesProcessor(this);
this.linesSettings = new d.LinesSettings(a);
this.initialTouchZoom = 1;
this.showDescriptionOnHover = !1;
d.AmMap.base.construct.call(this, a);
this.creditsPosition = "bottom-left";
this.product = "ammap";
this.areasClasses = {};
this.updatableImages = [];
d.applyTheme(this,
a, this.cname)
},
initChart: function() {
this.zoomInstantly = !0;
var a = this.container;
this.panRequired = !0;
if (this.sizeChanged && d.hasSVG && this.chartCreated) {
this.updatableImages = [];
this.freeLabelsSet && this.freeLabelsSet.remove();
this.freeLabelsSet = a.set();
this.container.setSize(this.realWidth, this.realHeight);
this.resizeMap();
this.drawBackground();
this.redrawLabels();
this.drawTitles();
this.processObjects(!0);
this.rescaleObjects();
this.zoomControl.init(this, a);
this.drawBg();
var b = this.smallMap;
b && b.init(this,
a);
(b = this.valueLegend) && b.init(this, a);
this.sizeChanged = !1;
this.zoomToLongLat(this.zLevelTemp, this.zLongTemp, this.zLatTemp, !0);
this.previousWidth = this.realWidth;
this.previousHeight = this.realHeight;
this.updateSmallMap();
this.linkSet.toFront();
this.zoomControl.update && this.zoomControl.update()
} else(d.AmMap.base.initChart.call(this), d.hasSVG) ? (this.dataChanged && (this.parseData(), this.dispatchDataUpdated = !0, this.dataChanged = !1, a = this.legend) && (a.position = "absolute", a.invalidateSize()), this.createDescriptionsDiv(),
this.svgAreas = [], this.svgAreasById = {}, this.drawChart()) : (this.chartDiv.style.textAlign = "", this.chartDiv.setAttribute("class", "ammapAlert"), this.chartDiv.innerHTML = this.svgNotSupported, this.fire({
type: "failed",
chart: this
}))
},
storeTemp: function() {
if (d.hasSVG && 0 < this.realWidth && 0 < this.realHeight) {
var a = this.mapContainer.getBBox();
0 < a.width && 0 < a.height && (a = this.zoomLongitude(), isNaN(a) || (this.zLongTemp = a), a = this.zoomLatitude(), isNaN(a) || (this.zLatTemp = a), a = this.zoomLevel(), isNaN(a) || (this.zLevelTemp =
a))
}
},
invalidateSize: function() {
this.storeTemp();
d.AmMap.base.invalidateSize.call(this)
},
validateSize: function() {
this.storeTemp();
d.AmMap.base.validateSize.call(this)
},
handleWheelReal: function(a) {
if (!this.wheelBusy) {
this.stopAnimation();
var b = this.zoomLevel(),
c = this.zoomControl,
e = c.zoomFactor;
this.wheelBusy = !0;
a = d.fitToBounds(0 < a ? b * e : b / e, c.minZoomLevel, c.maxZoomLevel);
e = this.mouseX / this.mapWidth;
c = this.mouseY / this.mapHeight;
e = (this.zoomX() - e) * (a / b) + e;
b = (this.zoomY() - c) * (a / b) + c;
this.zoomTo(a, e, b)
}
},
addLegend: function(a, b) {
a.position = "absolute";
a.autoMargins = !1;
a.valueWidth = 0;
a.switchable = !1;
d.AmMap.base.addLegend.call(this, a, b);
void 0 === a.enabled && (a.enabled = !0);
return a
},
handleLegendEvent: function() {},
createDescriptionsDiv: function() {
if (!this.descriptionsDiv) {
var a = document.createElement("div"),
b = a.style;
b.position = "absolute";
b.left = "0px";
b.top = "0px";
this.descriptionsDiv = a
}
this.containerDiv.appendChild(this.descriptionsDiv)
},
drawChart: function() {
d.AmMap.base.drawChart.call(this);
var a = this.dataProvider;
this.dataProvider = a = d.extend(a, new d.MapData, !0);
this.areasSettings = d.processObject(this.areasSettings, d.AreasSettings, this.theme);
this.imagesSettings = d.processObject(this.imagesSettings, d.ImagesSettings, this.theme);
this.linesSettings = d.processObject(this.linesSettings, d.LinesSettings, this.theme);
var b = this.container;
this.mapContainer && this.mapContainer.remove();
this.mapContainer = b.set();
this.graphsSet.push(this.mapContainer);
var c;
a.map && (c = d.maps[a.map]);
a.mapVar && (c = a.mapVar);
c ? (this.svgData = c.svg,
this.getBounds(), this.buildEverything()) : (a = a.mapURL) && this.loadXml(a);
this.balloonsSet.toFront()
},
drawBg: function() {
var a = this;
a.background.click(function() {
a.handleBackgroundClick()
});
a.background.mouseover(function() {
a.rollOutMapObject(a.previouslyHovered)
})
},
buildEverything: function() {
if (0 < this.realWidth && 0 < this.realHeight) {
var a = this.container,
b = this.dataProvider;
this.projection || (this.projection = b.projection, this.projection || (this.projection = "equirectangular"));
this.updatableImages = [];
var c =
this.projection;
c && (this.projectionFunction = d[c]);
this.projectionFunction || (this.projectionFunction = d.equirectangular);
this.dpProjectionFunction = d[b.projection];
this.dpProjectionFunction || (this.dpProjectionFunction = d.equirectangular);
this.zoomControl = d.processObject(this.zoomControl, d.ZoomControl, this.theme);
this.zoomControl.init(this, a);
this.drawBg();
this.buildSVGMap();
this.projectionFunction && c != b.projection || this.forceNormalize ? (this.normalizeMap(), this.changeProjection()) : this.fixMapPosition();
if (c = this.smallMap) c = d.processObject(c, d.SmallMap, this.theme), c.init(this, a), this.smallMap = c;
isNaN(b.zoomX) && isNaN(b.zoomY) && isNaN(b.zoomLatitude) && isNaN(b.zoomLongitude) && (this.centerMap ? (c = this.xyToCoordinates(this.mapWidth / 2, this.mapHeight / 2), b.zoomLongitudeC = c.longitude, b.zoomLatitudeC = c.latitude) : (b.zoomX = 0, b.zoomY = 0), this.zoomInstantly = !0);
this.selectObject(this.dataProvider);
this.processAreas();
if (b = this.valueLegend) this.valueLegend = b = d.processObject(b, d.ValueLegend, this.theme), b.init(this,
a);
this.objectList && (a = this.objectList = d.processObject(this.objectList, d.ObjectList)) && (this.clearObjectList(), a.init(this));
this.dispDUpd();
this.updateSmallMap();
this.linkSet.toFront()
} else this.cleanChart()
},
hideGroup: function(a) {
this.showHideGroup(a, !1)
},
showGroup: function(a) {
this.showHideGroup(a, !0)
},
showHideGroup: function(a, b) {
this.showHideReal(this.imagesProcessor.allObjects, a, b);
this.showHideReal(this.areasProcessor.allObjects, a, b);
this.showHideReal(this.linesProcessor.allObjects, a, b)
},
showHideReal: function(a,
b, c) {
var e;
for (e = 0; e < a.length; e++) {
var d = a[e];
if (d.groupId == b) {
var g = d.displayObject;
g && (c ? (d.hidden = !1, g.show()) : (d.hidden = !0, g.hide()))
}
}
},
makeObjectAccessible: function(a) {
if (a.accessibleLabel) {
var b = this.formatString(a.accessibleLabel, a);
a.displayObject && this.makeAccessible(a.displayObject, b, "menuitem")
}
},
update: function() {
if (d.hasSVG) {
d.AmMap.base.update.call(this);
this.zoomControl && this.zoomControl.update && this.zoomControl.update();
for (var a = 0, b = this.updatableImages.length; a < b; a++) this.updatableImages[a].update()
}
},
animateMap: function() {
var a = this;
a.totalFrames = a.zoomDuration * d.updateRate;
a.totalFrames += 1;
a.frame = 0;
a.tweenPercent = 0;
a.balloon.hide(0);
setTimeout(function() {
a.updateSize.call(a)
}, 1E3 / d.updateRate)
},
updateSize: function() {
var a = this,
b = a.totalFrames;
a.preventHover = !0;
a.frame <= b ? (a.frame++, b = d.easeOutSine(0, a.frame, 0, 1, b), 1 <= b ? (b = 1, a.preventHover = !1, a.wheelBusy = !1) : window.requestAnimationFrame ? window.requestAnimationFrame(function() {
a.updateSize.call(a)
}) : setTimeout(function() {
a.updateSize.call(a)
},
1E3 / d.updateRate), .8 < b && (a.preventHover = !1)) : (b = 1, a.preventHover = !1, a.wheelBusy = !1);
a.tweenPercent = b;
a.rescaleMapAndObjects()
},
rescaleMapAndObjects: function() {
var a = this.initialScale,
b = this.initialX,
c = this.initialY,
e = this.tweenPercent,
a = a + (this.finalScale - a) * e;
this.mapContainer.translate(b + (this.finalX - b) * e, c + (this.finalY - c) * e, a, !0);
if (this.areasSettings.adjustOutlineThickness) {
for (var b = this.svgAreas, d = 0; d < b.length; d++)(c = b[d]) && c.setAttr("stroke-width", this.areasSettings.outlineThickness / a / this.mapScale);
if (b = this.dataProvider.areas)
for (d = 0; d < b.length; d++) {
var c = b[d],
g = c.displayObject;
g && g.setAttr("stroke-width", c.outlineThicknessReal / a / this.mapScale)
}
}
this.rescaleObjects();
this.positionChanged();
this.updateSmallMap();
1 == e && this.fire({
type: "zoomCompleted",
chart: this
})
},
updateSmallMap: function() {
this.smallMap && this.smallMap.update()
},
rescaleObjects: function() {
var a = this.mapContainer.scale,
b = this.imagesProcessor.objectsToResize,
c;
for (c = 0; c < b.length; c++) {
var d = b[c].image,
f = b[c].scale,
g = b[c].mapImage;
isNaN(g.selectedScaleReal) || g != this.selectedObject || (g.tempScale = f, f *= g.selectedScaleReal);
d.translate(d.x, d.y, f / a, !0)
}
b = this.imagesProcessor.labelsToReposition;
for (c = 0; c < b.length; c++) d = b[c], d.imageLabel && this.imagesProcessor.positionLabel(d.imageLabel, d, d.labelPositionReal);
b = this.linesProcessor;
if (d = b.linesToResize)
for (c = 0; c < d.length; c++) f = d[c], f.line.setAttr("stroke-width", f.thickness / a);
b = b.objectsToResize;
for (c = 0; c < b.length; c++) d = b[c], d.translate(d.x, d.y, 1 / a, !0)
},
handleTouchEnd: function(a) {
this.initialDistance =
NaN;
this.mouseIsDown = this.isDragging = !1;
d.AmMap.base.handleTouchEnd.call(this, a)
},
handleMouseDown: function(a) {
d.resetMouseOver();
this.mouseIsDown = this.mouseIsOver = !0;
this.balloon.hide(0);
a && this.mouseIsOver && a.preventDefault && this.panEventsEnabled && a.preventDefault();
if (this.chartCreated && !this.preventHover && (this.initialTouchZoom = this.zoomLevel(), this.dragMap && (this.stopAnimation(), this.mapContainerClickX = this.mapContainer.x, this.mapContainerClickY = this.mapContainer.y), a || (a = window.event), a.shiftKey &&
!0 === this.developerMode && this.getDevInfo(), a && a.touches)) {
var b = this.mouseX,
c = this.mouseY,
e = a.touches.item(1);
e && this.panEventsEnabled && this.boundingRect && (a = e.clientX - this.boundingRect.left, e = e.clientY - this.boundingRect.top, this.middleXP = (b + (a - b) / 2) / this.realWidth, this.middleYP = (c + (e - c) / 2) / this.realHeight, this.initialDistance = Math.sqrt(Math.pow(a - b, 2) + Math.pow(e - c, 2)))
}
},
stopDrag: function() {
this.isDragging = !1
},
handleReleaseOutside: function() {
if (d.isModern) {
var a = this;
d.AmMap.base.handleReleaseOutside.call(a);
a.mouseIsDown = !1;
setTimeout(function() {
a.resetPinch.call(a)
}, 100);
if (!a.preventHover) {
a.stopDrag();
var b = a.zoomControl;
b && b.draggerUp && b.draggerUp();
a.mapWasDragged = !1;
var b = a.mapContainer,
c = a.mapContainerClickX,
e = a.mapContainerClickY;
isNaN(c) || isNaN(e) || !(3 < Math.abs(b.x - c) || 3 < Math.abs(b.y - e)) || (a.mapWasDragged = !0, b = {
type: "dragCompleted",
zoomX: a.zoomX(),
zoomY: a.zoomY(),
zoomLevel: a.zoomLevel(),
chart: a
}, a.fire(b));
(a.mouseIsOver && !a.mapWasDragged && !a.skipClick || a.wasTouched && 3 > Math.abs(a.mouseX - a.tmx) &&
3 > Math.abs(a.mouseY - a.tmy)) && a.fire({
type: "click",
x: a.mouseX,
y: a.mouseY,
chart: a
});
a.mapContainerClickX = NaN;
a.mapContainerClickY = NaN;
a.objectWasClicked = !1;
a.zoomOnDoubleClick && a.mouseIsOver && (b = (new Date).getTime(), 200 > b - a.previousClickTime && 40 < b - a.previousClickTime && a.doDoubleClickZoom(), a.previousClickTime = b)
}
a.wasTouched = !1
}
},
resetPinch: function() {
this.mapWasPinched = !1
},
handleMouseMove: function(a) {
var b = this;
d.AmMap.base.handleMouseMove.call(b, a);
if (!a || !a.touches || !b.tapToActivate || b.tapped) {
b.panEventsEnabled &&
b.mouseIsOver && a && a.preventDefault && a.preventDefault();
var c = b.previuosMouseX,
e = b.previuosMouseY,
f = b.mouseX,
g = b.mouseY,
h = b.zoomControl;
isNaN(c) && (c = f);
isNaN(e) && (e = g);
b.mouse2X = NaN;
b.mouse2Y = NaN;
a && a.touches && (a = a.touches.item(1)) && b.panEventsEnabled && b.boundingRect && (b.mouse2X = a.clientX - b.boundingRect.left, b.mouse2Y = a.clientY - b.boundingRect.top);
if (a = b.mapContainer) {
var k = b.mouse2X,
l = b.mouse2Y;
b.pinchTO && clearTimeout(b.pinchTO);
b.pinchTO = setTimeout(function() {
b.resetPinch.call(b)
}, 1E3);
var m = b.realHeight,
n = b.realWidth,
p = b.mapWidth,
t = b.mapHeight;
b.mouseIsDown && b.dragMap && (3 < Math.abs(b.previuosMouseX - b.mouseX) || 3 < Math.abs(b.previuosMouseY - b.mouseY)) && (b.isDragging = !0);
if (!isNaN(k)) {
b.stopDrag();
var r = Math.sqrt(Math.pow(k - f, 2) + Math.pow(l - g, 2)),
q = b.initialDistance;
isNaN(q) && (q = Math.sqrt(Math.pow(k - f, 2) + Math.pow(l - g, 2)));
if (!isNaN(q)) {
var k = b.initialTouchZoom * r / q,
k = d.fitToBounds(k, h.minZoomLevel, h.maxZoomLevel),
h = b.zoomLevel(),
q = b.middleXP,
l = b.middleYP,
r = m / t,
y = n / p,
q = (b.zoomX() - q * y) * (k / h) + q * y,
l = (b.zoomY() -
l * r) * (k / h) + l * r;.1 < Math.abs(k - h) && (b.zoomTo(k, q, l, !0), b.mapWasPinched = !0, clearTimeout(b.pinchTO))
}
}
k = a.scale;
b.isDragging && (b.balloon.hide(0), b.positionChanged(), c = a.x + (f - c), e = a.y + (g - e), b.preventDragOut && (t = -t * k + m / 2 - b.diffY * b.mapScale * k, m = m / 2 - b.diffY * b.mapScale * k, c = d.fitToBounds(c, -p * k + n / 2, n / 2), e = d.fitToBounds(e, t, m)), isNaN(c) || isNaN(e) || (a.translate(c, e, k, !0), b.updateSmallMap()));
b.previuosMouseX = f;
b.previuosMouseY = g
}
}
},
selectObject: function(a, b) {
var c = this;
a || (a = c.dataProvider);
a.isOver = !1;
var e =
a.linkToObject;
d.isString(e) && (e = c.getObjectById(e));
a.useTargetsZoomValues && e && (a.zoomX = e.zoomX, a.zoomY = e.zoomY, a.zoomLatitude = e.zoomLatitude, a.zoomLongitude = e.zoomLongitude, a.zoomLevel = e.zoomLevel);
var f = c.selectedObject;
f && c.returnInitialColor(f);
c.selectedObject = a;
var g = !1,
h, k;
"MapArea" == a.objectType && (a.autoZoomReal && (g = !0), h = c.areasSettings.selectedOutlineColor, k = c.areasSettings.selectedOutlineThickness);
if (e && !g && (d.isString(e) && (e = c.getObjectById(e)), isNaN(a.zoomLevel) && isNaN(a.zoomX) && isNaN(a.zoomY))) {
if (c.extendMapData(e)) return;
c.selectObject(e);
return
}
c.allowMultipleDescriptionWindows || c.closeAllDescriptions();
clearTimeout(c.selectedObjectTimeOut);
clearTimeout(c.processObjectsTimeOut);
e = c.zoomDuration;
!g && isNaN(a.zoomLevel) && isNaN(a.zoomX) && isNaN(a.zoomY) ? (c.showDescriptionAndGetUrl(), b || c.processObjects()) : (c.selectedObjectTimeOut = setTimeout(function() {
c.showDescriptionAndGetUrl.call(c)
}, 1E3 * e + 200), c.showObjectsAfterZoom) ? b || (c.processObjectsTimeOut = setTimeout(function() {
c.processObjects.call(c)
}, 1E3 * e + 200)) : b || c.processObjects();
e = a.displayObject;
g = a.selectedColorReal;
if ("MapImage" == a.objectType) {
h = c.imagesSettings.selectedOutlineColor;
k = c.imagesSettings.selectedOutlineThickness;
var e = a.image,
l = a.selectedScaleReal;
if (!isNaN(l) && 1 != l) {
var m = a.scale;
isNaN(a.tempScale) || (m = a.tempScale);
isNaN(m) && (m = 1);
a.tempScale = m;
var n = a.displayObject;
n.translate(n.x, n.y, m * l, !0)
}
}
if (e) {
if (d.removeCN(c, e, "selected-object"), d.setCN(c, e, "selected-object"), a.bringForwardOnHover && a.displayObject.toFront(), c.outlinesToFront(), !a.preserveOriginalAttributes) {
e.setAttr("stroke",
a.outlineColorReal);
void 0 !== g && e.setAttr("fill", g);
void 0 !== h && e.setAttr("stroke", h);
void 0 !== k && e.setAttr("stroke-width", k);
"MapLine" == a.objectType && ((l = a.lineSvg) && l.setAttr("stroke", g), l = a.arrowSvg) && (l.setAttr("fill", g), l.setAttr("stroke", g));
if (l = a.imageLabel) m = a.selectedLabelColorReal, void 0 !== m && l.setAttr("fill", m);
a.selectable || (e.setAttr("cursor", "default"), l && l.setAttr("cursor", "default"))
}
} else c.returnInitialColorReal(a);
if (e = a.groupId)
for (l = a.groupArray, l || (l = c.getGroupById(e), a.groupArray =
l), m = 0; m < l.length; m++)
if (n = l[m], n.isOver = !1, e = n.displayObject, "MapImage" == n.objectType && (e = n.image), e) {
var p = n.selectedColorReal;
void 0 !== p && e.setAttr("fill", p);
void 0 !== h && e.setAttr("stroke", h);
void 0 !== k && e.setAttr("stroke-width", k);
"MapLine" == n.objectType && ((e = n.lineSvg) && e.setAttr("stroke", g), e = n.arrowSvg) && (e.setAttr("fill", g), e.setAttr("stroke", g))
}
c.rescaleObjects();
c.zoomToSelectedObject();
f != a && c.fire({
type: "selectedObjectChanged",
chart: c
})
},
returnInitialColor: function(a, b) {
this.returnInitialColorReal(a);
b && (a.isFirst = !1);
if (this.selectedObject.bringForwardOnHover) {
var c = this.selectedObject.displayObject;
c && c.toFront()
}
if (c = a.groupId) {
var c = this.getGroupById(c),
d;
for (d = 0; d < c.length; d++) this.returnInitialColorReal(c[d]), b && (c[d].isFirst = !1)
}
this.outlinesToFront()
},
outlinesToFront: function() {
if (this.outlines)
for (var a = 0; a < this.outlines.length; a++) this.outlines[a].toFront()
},
closeAllDescriptions: function() {
this.descriptionsDiv.innerHTML = ""
},
fireClosed: function() {
this.fire({
type: "descriptionClosed",
chart: this
})
},
returnInitialColorReal: function(a) {
a.isOver = !1;
var b = a.displayObject;
if (b) {
d.removeCN(this, b, "selected-object");
b.toPrevious();
if ("MapImage" == a.objectType) {
var c = a.tempScale;
isNaN(c) || b.translate(b.x, b.y, c, !0);
a.tempScale = NaN;
b = a.image
}
c = a.colorReal;
if ("MapLine" == a.objectType) {
var e = a.lineSvg;
e && e.setAttr("stroke", c);
if (e = a.arrowSvg) {
var f = a.arrowColor;
void 0 === f && (f = c);
e.setAttr("fill", f);
e.setAttr("stroke", f)
}
}
var e = a.alphaReal,
f = a.outlineAlphaReal,
g = a.outlineThicknessReal,
h = a.outlineColorReal;
if (a.showAsSelected) {
var c = a.selectedColorReal,
k, l;
"MapImage" == a.objectType && (k = this.imagesSettings.selectedOutlineColor, l = this.imagesSettings.selectedOutlineThickness);
"MapArea" == a.objectType && (k = this.areasSettings.selectedOutlineColor, l = this.areasSettings.selectedOutlineThickness);
void 0 !== k && (h = k);
void 0 !== l && (g = l)
}
"bubble" == a.type && (c = void 0);
void 0 !== c && b.setAttr("fill", c);
if (k = a.image) k.setAttr("fill", c), k.setAttr("stroke", h), k.setAttr("stroke-width", g), k.setAttr("fill-opacity", e), k.setAttr("stroke-opacity",
f);
"MapArea" == a.objectType && (c = 1, this.areasSettings.adjustOutlineThickness && (c = this.zoomLevel() * this.mapScale), b.setAttr("stroke", h), b.setAttr("stroke-width", g / c), b.setAttr("fill-opacity", e), b.setAttr("stroke-opacity", f));
(c = a.pattern) && b.pattern(c, this.mapScale, this.path);
(b = a.imageLabel) && !a.labelInactive && (a.showAsSelected && void 0 !== a.selectedLabelColor ? b.setAttr("fill", a.selectedLabelColor) : b.setAttr("fill", a.labelColorReal))
}
},
zoomToRectangle: function(a, b, c, e) {
var f = this.realWidth,
g = this.realHeight,
h = this.mapSet.scale,
k = this.zoomControl,
f = d.fitToBounds(c / f > e / g ? .8 * f / (c * h) : .8 * g / (e * h), k.minZoomLevel, k.maxZoomLevel);
this.zoomToMapXY(f, (a + c / 2) * h, (b + e / 2) * h)
},
zoomToLatLongRectangle: function(a, b, c, e) {
var f = this.dataProvider,
g = this.zoomControl,
h = Math.abs(c - a),
k = Math.abs(b - e),
l = Math.abs(f.rightLongitude - f.leftLongitude),
f = Math.abs(f.topLatitude - f.bottomLatitude),
g = d.fitToBounds(h / l > k / f ? .8 * l / h : .8 * f / k, g.minZoomLevel, g.maxZoomLevel);
this.zoomToLongLat(g, a + (c - a) / 2, e + (b - e) / 2)
},
getGroupById: function(a) {
var b = [];
this.getGroup(this.imagesProcessor.allObjects, a, b);
this.getGroup(this.linesProcessor.allObjects, a, b);
this.getGroup(this.areasProcessor.allObjects, a, b);
return b
},
zoomToGroup: function(a) {
a = "object" == typeof a ? a : this.getGroupById(a);
var b, c, d, f, g;
for (g = 0; g < a.length; g++) {
var h = a[g].displayObject;
if (h) {
var k = h.getBBox(),
h = k.y,
l = k.y + k.height,
m = k.x,
k = k.x + k.width;
if (h < b || isNaN(b)) b = h;
if (l > f || isNaN(f)) f = l;
if (m < c || isNaN(c)) c = m;
if (k > d || isNaN(d)) d = k
}
}
c += this.diffX;
d += this.diffX;
f += this.diffY;
b += this.diffY;
this.zoomToRectangle(c, b, d - c, f - b)
},
getGroup: function(a, b, c) {
if (a) {
var d;
for (d = 0; d < a.length; d++) {
var f = a[d];
f.groupId == b && c.push(f)
}
}
},
zoomToStageXY: function(a, b, c, e) {
if (!this.objectWasClicked) {
var f = this.zoomControl;
a = d.fitToBounds(a, f.minZoomLevel, f.maxZoomLevel);
var f = this.zoomLevel(),
g = this.mapSet.getBBox();
b = this.xyToCoordinates((b - this.mapContainer.x) / f - g.x * this.mapScale, (c - this.mapContainer.y) / f - g.y * this.mapScale);
this.zoomToLongLat(a, b.longitude, b.latitude, e)
}
},
zoomToLongLat: function(a, b, c,
d) {
b = this.coordinatesToXY(b, c);
this.zoomToMapXY(a, b.x, b.y, d)
},
zoomToMapXY: function(a, b, c, d) {
var f = this.mapWidth,
g = this.mapHeight;
this.zoomTo(a, -(b / f) * a + this.realWidth / f / 2, -(c / g) * a + this.realHeight / g / 2, d)
},
zoomToObject: function(a) {
if (a) {
var b = a.zoomLatitude,
c = a.zoomLongitude;
isNaN(a.zoomLatitudeC) || (b = a.zoomLatitudeC);
isNaN(a.zoomLongitudeC) || (c = a.zoomLongitudeC);
var e = a.zoomLevel,
f = this.zoomInstantly,
g = a.zoomX,
h = a.zoomY,
k = this.realWidth,
l = this.realHeight;
isNaN(e) || (isNaN(b) || isNaN(c) ? this.zoomTo(e,
g, h, f) : this.zoomToLongLat(e, c, b, f));
this.zoomInstantly = !1;
"MapImage" == a.objectType && isNaN(a.zoomX) && isNaN(a.zoomY) && isNaN(a.zoomLatitude) && isNaN(a.zoomLongitude) && !isNaN(a.latitude) && !isNaN(a.longitude) && this.zoomToLongLat(a.zoomLevel, a.longitude, a.latitude);
"MapArea" == a.objectType && (f = a.displayObject.getBBox(), g = this.mapScale, b = (f.x + this.diffX) * g, c = (f.y + this.diffY) * g, e = f.width * g, f = f.height * g, k = a.autoZoomReal && isNaN(a.zoomLevel) ? e / k > f / l ? .8 * k / e : .8 * l / f : a.zoomLevel, l = this.zoomControl, k = d.fitToBounds(k,
l.minZoomLevel, l.maxZoomLevel), isNaN(a.zoomX) && isNaN(a.zoomY) && isNaN(a.zoomLatitude) && isNaN(a.zoomLongitude) && this.zoomToMapXY(k, b + e / 2, c + f / 2));
this.zoomControl.update()
}
},
zoomToSelectedObject: function() {
this.zoomToObject(this.selectedObject)
},
zoomTo: function(a, b, c, e) {
var f = this.zoomControl;
a = d.fitToBounds(a, f.minZoomLevel, f.maxZoomLevel);
f = this.zoomLevel();
isNaN(b) && (b = this.realWidth / this.mapWidth, b = (this.zoomX() - .5 * b) * (a / f) + .5 * b);
isNaN(c) && (c = this.realHeight / this.mapHeight, c = (this.zoomY() - .5 * c) *
(a / f) + .5 * c);
this.stopAnimation();
isNaN(a) || (f = this.mapContainer, this.initialX = f.x, this.initialY = f.y, this.initialScale = f.scale, this.finalX = this.mapWidth * b, this.finalY = this.mapHeight * c, this.finalScale = a, this.finalX != this.initialX || this.finalY != this.initialY || this.finalScale != this.initialScale ? e ? (this.tweenPercent = 1, this.rescaleMapAndObjects(), this.wheelBusy = !1) : this.animateMap() : this.wheelBusy = !1)
},
loadXml: function(a) {
var b;
window.XMLHttpRequest && (b = new XMLHttpRequest);
b.overrideMimeType && b.overrideMimeType("text/xml");
b.open("GET", a, !1);
b.send();
this.parseXMLObject(b.responseXML);
this.svgData && this.buildEverything()
},
stopAnimation: function() {
this.frame = this.totalFrames
},
processObjects: function(a) {
var b = this.selectedObject;
if (0 < b.images.length || 0 < b.areas.length || 0 < b.lines.length || b == this.dataProvider || a) {
a = this.container;
var c = this.stageImagesContainer;
c && c.remove();
this.stageImagesContainer = c = a.set();
this.trendLinesSet.push(c);
var d = this.stageLinesContainer;
d && d.remove();
this.stageLinesContainer = d = a.set();
this.trendLinesSet.push(d);
var f = this.mapImagesContainer;
f && f.remove();
this.mapImagesContainer = f = a.set();
this.mapContainer.push(f);
var g = this.mapLinesContainer;
g && g.remove();
this.mapLinesContainer = g = a.set();
this.mapContainer.push(g);
this.linesAboveImages ? (f.toFront(), c.toFront(), g.toFront(), d.toFront()) : (g.toFront(), d.toFront(), f.toFront(), c.toFront());
b && (this.imagesProcessor.reset(), this.linesProcessor.reset(), this.linesAboveImages ? (this.imagesProcessor.process(b), this.linesProcessor.process(b)) : (this.linesProcessor.process(b),
this.imagesProcessor.process(b)));
this.rescaleObjects()
}
},
processAreas: function() {
this.areasProcessor.process(this.dataProvider)
},
buildSVGMap: function() {
d.remove(this.mapSet);
var a = this.svgData.g.path,
b = this.container,
c = b.set();
this.svgAreas = [];
this.svgAreasById = {};
void 0 === a.length && (a = [a]);
var e;
for (e = 0; e < a.length; e++) {
var f = a[e],
g = f.d,
h = f.title;
f.titleTr && (h = f.titleTr);
var k = b.path(g);
k.id = f.id;
if (this.areasSettings.preserveOriginalAttributes) {
k.customAttr = {};
for (var l in f) "d" != l && "id" != l && "title" !=
l && (k.customAttr[l] = f[l])
}
f.outline && (k.outline = !0);
k.path = g;
this.svgAreasById[f.id] = {
area: k,
title: h,
className: f["class"]
};
this.svgAreas.push(k);
c.push(k)
}
this.mapSet = c;
this.mapContainer.push(c);
this.resizeMap()
},
centerAlign: function() {},
setProjection: function(a) {
this.projection = a;
this.chartCreated = !1;
this.buildEverything()
},
addObjectEventListeners: function(a, b) {
var c = this;
a.mousedown(function(a) {
c.mouseDownMapObject(b, a)
}).mouseup(function(a) {
c.clickMapObject(b, a)
}).mouseover(function(a) {
c.balloonX =
NaN;
c.rollOverMapObject(b, !0, a)
}).mouseout(function(a) {
c.balloonX = NaN;
c.rollOutMapObject(b, a)
}).touchend(function(a) {
4 > Math.abs(c.mouseX - c.tmx) && 4 > Math.abs(c.mouseY - c.tmy) && (c.tapped = !0);
c.tapToActivate && !c.tapped || c.mapWasDragged || c.mapWasPinched || (c.balloonX = NaN, c.rollOverMapObject(b, !0, a), c.clickMapObject(b, a))
}).touchstart(function(a) {
c.tmx = c.mouseX;
c.tmy = c.mouseY;
c.mouseDownMapObject(b, a)
}).keyup(function(a) {
13 == a.keyCode && c.clickMapObject(b, a)
})
},
checkIfSelected: function(a) {
var b = this.selectedObject;
if (b == a) return !0;
if (b = b.groupId) {
var b = this.getGroupById(b),
c;
for (c = 0; c < b.length; c++)
if (b[c] == a) return !0
}
return !1
},
clearMap: function() {
this.chartDiv.innerHTML = "";
this.clearObjectList()
},
clearObjectList: function() {
var a = this.objectList;
a && a.div && (a.div.innerHTML = "")
},
checkIfLast: function(a) {
if (a) {
var b = a.parentNode;
if (b && b.lastChild == a) return !0
}
return !1
},
showAsRolledOver: function(a) {
var b = a.displayObject;
if (!a.showAsSelected && b && !a.isOver) {
b.node.onmouseout = function() {};
b.node.onmouseover = function() {};
b.node.onclick = function() {};
!a.isFirst && a.bringForwardOnHover && (b.toFront(), a.isFirst = !0);
var c = a.rollOverColorReal,
e;
a.preserveOriginalAttributes && (c = void 0);
"bubble" == a.type && (c = void 0);
void 0 == c && (isNaN(a.rollOverBrightnessReal) || (c = d.adjustLuminosity(a.colorReal, a.rollOverBrightnessReal / 100)));
if (void 0 != c)
if ("MapImage" == a.objectType)(e = a.image) && e.setAttr("fill", c);
else if ("MapLine" == a.objectType) {
if ((e = a.lineSvg) && e.setAttr("stroke", c), e = a.arrowSvg) e.setAttr("fill", c), e.setAttr("stroke", c)
} else b.setAttr("fill",
c);
(c = a.imageLabel) && !a.labelInactive && (e = a.labelRollOverColorReal, void 0 != e && c.setAttr("fill", e));
c = a.rollOverOutlineColorReal;
void 0 != c && ("MapImage" == a.objectType ? (e = a.image) && e.setAttr("stroke", c) : b.setAttr("stroke", c));
"MapImage" == a.objectType ? (c = this.imagesSettings.rollOverOutlineThickness, (e = a.image) && (isNaN(c) || e.setAttr("stroke-width", c))) : (c = this.areasSettings.rollOverOutlineThickness, isNaN(c) || b.setAttr("stroke-width", c));
if ("MapArea" == a.objectType) {
c = this.areasSettings;
e = a.rollOverAlphaReal;
isNaN(e) || b.setAttr("fill-opacity", e);
e = c.rollOverOutlineAlpha;
isNaN(e) || b.setAttr("stroke-opacity", e);
e = 1;
this.areasSettings.adjustOutlineThickness && (e = this.zoomLevel() * this.mapScale);
var f = c.rollOverOutlineThickness;
isNaN(f) || b.setAttr("stroke-width", f / e);
(c = c.rollOverPattern) && b.pattern(c, this.mapScale, this.path)
}
"MapImage" == a.objectType && (c = a.rollOverScaleReal, isNaN(c) || 1 == c || (e = b.scale, isNaN(e) && (e = 1), a.tempScale = e, b.translate(b.x, b.y, e * c, !0)));
this.useHandCursorOnClickableOjects && this.checkIfClickable(a) &&
b.setAttr("cursor", "pointer");
a.mouseEnabled && this.addObjectEventListeners(b, a);
a.isOver = !0
}
this.outlinesToFront()
},
rollOverMapObject: function(a, b, c) {
if (this.chartCreated) {
this.handleMouseMove();
var d = this.previouslyHovered;
d && d != a ? (!1 === this.checkIfSelected(d) && (this.returnInitialColor(d, !0), this.previouslyHovered = null), this.balloon.hide(0)) : clearTimeout(this.hoverInt);
if (!this.preventHover) {
if (!1 === this.checkIfSelected(a)) {
if (d = a.groupId) {
var d = this.getGroupById(d),
f;
for (f = 0; f < d.length; f++) d[f] !=
a && this.showAsRolledOver(d[f])
}
this.showAsRolledOver(a)
} else(d = a.displayObject) && (this.allowClickOnSelectedObject ? d.setAttr("cursor", "pointer") : d.setAttr("cursor", "default"));
this.showDescriptionOnHover ? this.showDescription(a) : !this.showBalloonOnSelectedObject && this.checkIfSelected(a) || !1 === b || (f = this.balloon, this.balloon.fixedPosition = !1, b = a.colorReal, d = "", void 0 !== b && this.useObjectColorForBalloon || (b = f.fillColor), (f = a.balloonTextReal) && (d = this.formatString(f, a)), this.balloonLabelFunction && (d = this.balloonLabelFunction(a,
this)), d && "" !== d && this.showBalloon(d, b, !1, this.balloonX, this.balloonY));
this.fire({
type: "rollOverMapObject",
mapObject: a,
chart: this,
event: c
});
this.previouslyHovered = a
}
}
},
longitudeToX: function(a) {
return (this.longitudeToCoordinate(a) + this.diffX * this.mapScale) * this.zoomLevel() + this.mapContainer.x
},
latitudeToY: function(a) {
return (this.latitudeToCoordinate(a) + this.diffY * this.mapScale) * this.zoomLevel() + this.mapContainer.y
},
latitudeToStageY: function(a) {
return this.latitudeToCoordinate(a) * this.zoomLevel() +
this.mapContainer.y + this.diffY * this.mapScale
},
longitudeToStageX: function(a) {
return this.longitudeToCoordinate(a) * this.zoomLevel() + this.mapContainer.x + this.diffX * this.mapScale
},
stageXToLongitude: function(a) {
a = (a - this.mapContainer.x) / this.zoomLevel();
return this.coordinateToLongitude(a)
},
stageYToLatitude: function(a) {
a = (a - this.mapContainer.y) / this.zoomLevel();
return this.coordinateToLatitude(a)
},
rollOutMapObject: function(a, b) {
this.hideBalloon();
a && this.chartCreated && a.isOver && (this.checkIfSelected(a) ||
this.returnInitialColor(a), this.fire({
type: "rollOutMapObject",
mapObject: a,
chart: this,
event: b
}))
},
formatString: function(a, b) {
var c = this.nf,
e = this.pf,
f = b.title;
b.titleTr && (f = b.titleTr);
void 0 == f && (f = "");
var g = b.value,
g = isNaN(g) ? "" : d.formatNumber(g, c),
c = b.percents,
c = isNaN(c) ? "" : d.formatNumber(c, e),
e = b.description;
void 0 == e && (e = "");
var h = b.customData;
void 0 == h && (h = "");
return a = d.massReplace(a, {
"[[title]]": f,
"[[value]]": g,
"[[percent]]": c,
"[[description]]": e,
"[[customData]]": h
})
},
mouseDownMapObject: function(a,
b) {
this.fire({
type: "mouseDownMapObject",
mapObject: a,
chart: this,
event: b
})
},
clickMapObject: function(a, b) {
var c = this;
b && (b.touches || isNaN(a.zoomLevel) && isNaN(a.zoomX) && isNaN(a.zoomY) || c.hideBalloon());
if (c.chartCreated && !c.preventHover && c.checkTouchDuration(b) && !c.mapWasDragged && c.checkIfClickable(a) && !c.mapWasPinched) {
c.selectObject(a);
var d = c.zoomLevel(),
f = c.mapSet.getBBox(),
d = c.xyToCoordinates((c.mouseX - c.mapContainer.x) / d - f.x * c.mapScale, (c.mouseY - c.mapContainer.y) / d - f.y * c.mapScale);
c.clickLatitude =
d.latitude;
c.clickLongitude = d.longitude;
b && b.touches && setTimeout(function() {
c.showBalloonAfterZoom.call(c)
}, 1E3 * c.zoomDuration);
c.fire({
type: "clickMapObject",
mapObject: a,
chart: c,
event: b
});
c.objectWasClicked = !0
}
},
showBalloonAfterZoom: function() {
var a = this.clickLongitude,
b = this.clickLatitude,
c = this.selectedObject;
"MapImage" != c.objectType || isNaN(c.longitude) || (a = c.longitude, b = c.latitude);
a = this.coordinatesToStageXY(a, b);
this.balloonX = a.x;
this.balloonY = a.y;
this.rollOverMapObject(this.selectedObject, !0)
},
checkIfClickable: function(a) {
var b = this.allowClickOnSelectedObject;
return this.selectedObject == a && b ? !0 : this.selectedObject != a || b ? !0 === a.selectable || "MapArea" == a.objectType && a.autoZoomReal || a.url || a.linkToObject || 0 < a.images.length || 0 < a.lines.length || !isNaN(a.zoomLevel) || !isNaN(a.zoomX) || !isNaN(a.zoomY) || a.description ? !0 : !1 : !1
},
resizeMap: function() {
var a = this.mapSet;
if (a) {
var b = 1,
c = a.getBBox(),
d = this.realWidth,
f = this.realHeight,
g = c.width,
c = c.height;
0 < g && 0 < c && (this.fitMapToContainer && (b = g / d > c / f ? d / g :
f / c), a.translate(0, 0, b, !0), this.mapScale = b, this.mapHeight = c * b, this.mapWidth = g * b)
}
},
zoomIn: function() {
var a = this.zoomLevel() * this.zoomControl.zoomFactor;
this.zoomTo(a)
},
zoomOut: function() {
var a = this.zoomLevel() / this.zoomControl.zoomFactor;
this.zoomTo(a)
},
moveLeft: function() {
var a = this.zoomX() + this.zoomControl.panStepSize;
this.zoomTo(this.zoomLevel(), a, this.zoomY())
},
moveRight: function() {
var a = this.zoomX() - this.zoomControl.panStepSize;
this.zoomTo(this.zoomLevel(), a, this.zoomY())
},
moveUp: function() {
var a =
this.zoomY() + this.zoomControl.panStepSize;
this.zoomTo(this.zoomLevel(), this.zoomX(), a)
},
moveDown: function() {
var a = this.zoomY() - this.zoomControl.panStepSize;
this.zoomTo(this.zoomLevel(), this.zoomX(), a)
},
zoomX: function() {
return this.mapSet ? Math.round(1E4 * this.mapContainer.x / this.mapWidth) / 1E4 : NaN
},
zoomY: function() {
return this.mapSet ? Math.round(1E4 * this.mapContainer.y / this.mapHeight) / 1E4 : NaN
},
goHome: function() {
this.selectObject(this.dataProvider);
this.fire({
type: "homeButtonClicked",
chart: this
})
},
zoomLevel: function() {
return Math.round(1E5 *
this.mapContainer.scale) / 1E5
},
showDescriptionAndGetUrl: function() {
var a = this.selectedObject;
if (a) {
this.showDescription();
var b = a.url;
if (b) d.getURL(b, a.urlTarget);
else if (b = a.linkToObject) {
if (d.isString(b)) {
var c = this.getObjectById(b);
if (c) {
this.selectObject(c);
return
}
}
b && a.passZoomValuesToTarget && (b.zoomLatitude = this.zoomLatitude(), b.zoomLongitude = this.zoomLongitude(), b.zoomLevel = this.zoomLevel());
this.extendMapData(b) || this.selectObject(b)
}
}
},
extendMapData: function(a) {
var b = a.objectType;
if ("MapImage" !=
b && "MapArea" != b && "MapLine" != b) return d.extend(a, new d.MapData, !0), this.dataProvider = a, this.zoomInstantly = !0, this.validateData(), !0
},
showDescription: function(a) {
a || (a = this.selectedObject);
this.allowMultipleDescriptionWindows || this.closeAllDescriptions();
if (a.description) {
var b = a.descriptionWindow;
b && b.close();
b = new d.DescriptionWindow;
a.descriptionWindow = b;
var c = a.descriptionWindowWidth,
e = a.descriptionWindowHeight,
f = a.descriptionWindowLeft,
g = a.descriptionWindowTop,
h = a.descriptionWindowRight,
k = a.descriptionWindowBottom;
isNaN(h) || (f = this.realWidth - h);
isNaN(k) || (g = this.realHeight - k);
var l = a.descriptionWindowX;
isNaN(l) || (f = l);
l = a.descriptionWindowY;
isNaN(l) || (g = l);
isNaN(f) && (f = this.mouseX, f = f > this.realWidth / 2 ? f - c - 20 : f + 20);
isNaN(g) && (g = this.mouseY);
b.maxHeight = e;
l = a.title;
a.titleTr && (l = a.titleTr);
b.show(this, this.descriptionsDiv, a.description, l);
a = b.div.style;
a.position = "absolute";
a.width = c + "px";
a.maxHeight = e + "px";
isNaN(k) || (g -= b.div.offsetHeight);
isNaN(h) || (f -= b.div.offsetWidth);
a.left = f + "px";
a.top = g + "px"
}
},
parseXMLObject: function(a) {
var b = {
root: {}
};
this.parseXMLNode(b, "root", a);
this.svgData = b.root.svg;
this.getBounds()
},
getBounds: function() {
var a = this.dataProvider;
try {
var b = this.svgData.defs["amcharts:ammap"];
a.leftLongitude = Number(b.leftLongitude);
a.rightLongitude = Number(b.rightLongitude);
a.topLatitude = Number(b.topLatitude);
a.bottomLatitude = Number(b.bottomLatitude);
a.projection = b.projection;
var c = b.wrappedLongitudes;
c && (a.rightLongitude += 360);
a.wrappedLongitudes = c
} catch (d) {}
},
recalcLongitude: function(a) {
return this.dataProvider.wrappedLongitudes ?
a < this.dataProvider.leftLongitude ? Number(a) + 360 : a : a
},
latitudeToCoordinate: function(a) {
var b, c = this.dataProvider;
if (this.mapSet) {
b = c.topLatitude;
var d = c.bottomLatitude;
"mercator" == c.projection && (a = this.mercatorLatitudeToCoordinate(a), b = this.mercatorLatitudeToCoordinate(b), d = this.mercatorLatitudeToCoordinate(d));
b = (a - b) / (d - b) * this.mapHeight
}
return b
},
longitudeToCoordinate: function(a) {
a = this.recalcLongitude(a);
var b, c = this.dataProvider;
this.mapSet && (b = c.leftLongitude, b = (a - b) / (c.rightLongitude - b) * this.mapWidth);
return b
},
mercatorLatitudeToCoordinate: function(a) {
89.5 < a && (a = 89.5); - 89.5 > a && (a = -89.5);
a = d.degreesToRadians(a);
return d.radiansToDegrees(.5 * Math.log((1 + Math.sin(a)) / (1 - Math.sin(a))) / 2)
},
zoomLatitude: function() {
if (this.mapContainer) {
var a = this.mapSet.getBBox(),
b = (-this.mapContainer.x + this.previousWidth / 2) / this.zoomLevel() - a.x * this.mapScale,
a = (-this.mapContainer.y + this.previousHeight / 2) / this.zoomLevel() - a.y * this.mapScale;
return this.xyToCoordinates(b, a).latitude
}
},
zoomLongitude: function() {
if (this.mapContainer) {
var a =
this.mapSet.getBBox(),
b = (-this.mapContainer.x + this.previousWidth / 2) / this.zoomLevel() - a.x * this.mapScale,
a = (-this.mapContainer.y + this.previousHeight / 2) / this.zoomLevel() - a.y * this.mapScale;
return this.xyToCoordinates(b, a).longitude
}
},
getAreaCenterLatitude: function(a) {
a = a.displayObject.getBBox();
var b = this.mapScale,
c = this.mapSet.getBBox();
return this.xyToCoordinates((a.x + a.width / 2 + this.diffX) * b - c.x * b, (a.y + a.height / 2 + this.diffY) * b - c.y * b).latitude
},
getAreaCenterLongitude: function(a) {
a = a.displayObject.getBBox();
var b = this.mapScale,
c = this.mapSet.getBBox();
return this.xyToCoordinates((a.x + a.width / 2 + this.diffX) * b - c.x * b, (a.y + a.height / 2 + this.diffY) * b - c.y * b).longitude
},
milesToPixels: function(a) {
var b = this.dataProvider;
return this.mapWidth / (b.rightLongitude - b.leftLongitude) * a / 69.172
},
kilometersToPixels: function(a) {
var b = this.dataProvider;
return this.mapWidth / (b.rightLongitude - b.leftLongitude) * a / 111.325
},
handleBackgroundClick: function() {
if (this.backgroundZoomsToTop && !this.mapWasDragged) {
var a = this.dataProvider;
if (this.checkIfClickable(a)) this.clickMapObject(a);
else {
var b = a.zoomX,
c = a.zoomY,
d = a.zoomLongitude,
f = a.zoomLatitude,
a = a.zoomLevel;
isNaN(b) || isNaN(c) || this.zoomTo(a, b, c);
isNaN(d) || isNaN(f) || this.zoomToLongLat(a, d, f, !0)
}
}
},
parseXMLNode: function(a, b, c, d) {
void 0 === d && (d = "");
var f, g, h;
if (c) {
var k = c.childNodes.length;
for (f = 0; f < k; f++) {
g = c.childNodes[f];
var l = g.nodeName,
m = g.nodeValue ? this.trim(g.nodeValue) : "",
n = !1;
g.attributes && 0 < g.attributes.length && (n = !0);
if (0 !== g.childNodes.length || "" !== m || !1 !== n)
if (3 ==
g.nodeType || 4 == g.nodeType) {
if ("" !== m) {
g = 0;
for (h in a[b]) a[b].hasOwnProperty(h) && g++;
g ? a[b]["#text"] = m : a[b] = m
}
} else if (1 == g.nodeType) {
var p;
void 0 !== a[b][l] ? void 0 === a[b][l].length ? (p = a[b][l], a[b][l] = [], a[b][l].push(p), a[b][l].push({}), p = a[b][l][1]) : "object" == typeof a[b][l] && (a[b][l].push({}), p = a[b][l][a[b][l].length - 1]) : (a[b][l] = {}, p = a[b][l]);
if (g.attributes && g.attributes.length)
for (m = 0; m < g.attributes.length; m++) p[g.attributes[m].name] = g.attributes[m].value;
void 0 !== a[b][l].length ? this.parseXMLNode(a[b][l],
a[b][l].length - 1, g, d + " ") : this.parseXMLNode(a[b], l, g, d + " ")
}
}
g = 0;
c = "";
for (h in a[b]) "#text" == h ? c = a[b][h] : g++;
0 === g && void 0 === a[b].length && (a[b] = c)
}
},
doDoubleClickZoom: function() {
if (!this.mapWasDragged) {
var a = this.zoomLevel() * this.zoomControl.zoomFactor;
this.zoomToStageXY(a, this.mouseX, this.mouseY)
}
},
getDevInfo: function() {
var a = this.zoomLevel(),
b = this.mapSet.getBBox(),
b = this.xyToCoordinates((this.mouseX - this.mapContainer.x) / a - b.x * this.mapScale, (this.mouseY - this.mapContainer.y) / a - b.y * this.mapScale),
a = {
chart: this,
type: "writeDevInfo",
zoomLevel: a,
zoomX: this.zoomX(),
zoomY: this.zoomY(),
zoomLatitude: this.zoomLatitude(),
zoomLongitude: this.zoomLongitude(),
latitude: b.latitude,
longitude: b.longitude,
left: this.mouseX,
top: this.mouseY,
right: this.realWidth - this.mouseX,
bottom: this.realHeight - this.mouseY,
percentLeft: Math.round(this.mouseX / this.realWidth * 100) + "%",
percentTop: Math.round(this.mouseY / this.realHeight * 100) + "%",
percentRight: Math.round((this.realWidth - this.mouseX) / this.realWidth * 100) + "%",
percentBottom: Math.round((this.realHeight -
this.mouseY) / this.realHeight * 100) + "%"
},
b = "zoomLevel:" + a.zoomLevel + ", zoomLongitude:" + a.zoomLongitude + ", zoomLatitude:" + a.zoomLatitude + "\n",
b = b + ("zoomX:" + a.zoomX + ", zoomY:" + a.zoomY + "\n"),
b = b + ("latitude:" + a.latitude + ", longitude:" + a.longitude + "\n"),
b = b + ("left:" + a.left + ", top:" + a.top + "\n"),
b = b + ("right:" + a.right + ", bottom:" + a.bottom + "\n"),
b = b + ("left:" + a.percentLeft + ", top:" + a.percentTop + "\n"),
b = b + ("right:" + a.percentRight + ", bottom:" + a.percentBottom + "\n");
a.str = b;
this.fire(a);
return a
},
getXY: function(a,
b, c) {
void 0 !== a && (-1 != String(a).indexOf("%") ? (a = Number(a.split("%").join("")), c && (a = 100 - a), a = Number(a) * b / 100) : c && (a = b - a));
return a
},
getObjectById: function(a) {
var b = this.dataProvider;
if (b.areas) {
var c = this.getObject(a, b.areas);
if (c) return c
}
if (c = this.getObject(a, b.images)) return c;
if (a = this.getObject(a, b.lines)) return a
},
getObject: function(a, b) {
if (b) {
var c;
for (c = 0; c < b.length; c++) {
var d = b[c];
if (d.id == a) return d;
if (d.areas) {
var f = this.getObject(a, d.areas);
if (f) return f
}
if (f = this.getObject(a, d.images)) return f;
if (d = this.getObject(a, d.lines)) return d
}
}
},
parseData: function() {
var a = this.dataProvider;
this.processObject(a.areas, a, "area");
this.processObject(a.images, a, "image");
this.processObject(a.lines, a, "line")
},
processObject: function(a, b, c) {
if (a) {
var e;
for (e = 0; e < a.length; e++) {
var f = a[e];
f.parentObject = b;
"area" == c && d.extend(f, new d.MapArea(this.theme), !0);
"image" == c && (f = d.extend(f, new d.MapImage(this.theme), !0));
"line" == c && (f = d.extend(f, new d.MapLine(this.theme), !0));
a[e] = f;
f.areas && this.processObject(f.areas,
f, "area");
f.images && this.processObject(f.images, f, "image");
f.lines && this.processObject(f.lines, f, "line")
}
}
},
positionChanged: function() {
var a = {
type: "positionChanged",
zoomX: this.zoomX(),
zoomY: this.zoomY(),
zoomLevel: this.zoomLevel(),
chart: this
};
this.fire(a)
},
getX: function(a, b) {
return this.getXY(a, this.realWidth, b)
},
getY: function(a, b) {
return this.getXY(a, this.realHeight, b)
},
trim: function(a) {
if (a) {
var b;
for (b = 0; b < a.length; b++)
if (-1 === " \n\r\t\f\x0B\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000".indexOf(a.charAt(b))) {
a =
a.substring(b);
break
}
for (b = a.length - 1; 0 <= b; b--)
if (-1 === " \n\r\t\f\x0B\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000".indexOf(a.charAt(b))) {
a = a.substring(0, b + 1);
break
}
return -1 === " \n\r\t\f\x0B\u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000".indexOf(a.charAt(0)) ? a : ""
}
},
destroy: function() {
d.AmMap.base.destroy.call(this)
},
x2c: function(a) {
var b = this.dataProvider.leftLongitude;
return Math.round(this.unscaledMapWidth *
(a - b) / (this.dataProvider.rightLongitude - b) * 100) / 100
},
y2c: function(a) {
var b = this.dataProvider.topLatitude;
return Math.round(this.unscaledMapHeight * (a - b) / (this.dataProvider.bottomLatitude - b) * 100) / 100
},
normalize: function(a) {
if (!a.pathsArray) {
var b;
if (a.normalized) b = a.normalized;
else {
var c = d.normalizePath(a.node);
b = a.node.getAttribute("d");
a.normalized = b;
c.maxX > this.maxMapX && (this.maxMapX = c.maxX);
c.minX < this.minMapX && (this.minMapX = c.minX);
c.maxY > this.maxMapY && (this.maxMapY = c.maxY);
c.minY < this.minMapY &&
(this.minMapY = c.minY)
}
a.node.setAttribute("d", b)
}
},
redraw: function(a) {
var b = a.normalized,
b = b.split(" Z").join(""),
b = b.split("M");
a.pathsArray = [];
for (var c = 0; c < b.length; c++) {
var d = b[c];
if (d) {
for (var d = d.split("L"), f = [], g = 0; g < d.length; g++)
if (d[g]) {
var h = d[g].split(" "),
h = this.xyToCoordinates(Number(h[1]), Number(h[2]), this.dpProjectionFunction, this.sourceMapWidth, this.sourceMapHeight);
f.push([h.longitude, h.latitude])
}
a.pathsArray.push(f)
}
}
b = "";
for (c = 0; c < a.pathsArray.length; c++) b += this.redrawArea(a.pathsArray[c]);
a.node.setAttribute("d", b);
a.path = b
},
redrawArea: function(a) {
for (var b = !1, c = "", e = 0; e < a.length; e++) {
var f = a[e][0],
g = a[e][1],
h = d.degreesToRadians(a[e][0]),
k = d.degreesToRadians(a[e][1]),
k = this.projectionFunction(h, k),
h = d.roundTo(this.x2c(d.radiansToDegrees(k[0])), 3),
k = d.roundTo(this.y2c(d.radiansToDegrees(k[1])), 3);
h < this.minMapXX && (this.minMapXX = h, this.leftLongLat = {
longitude: f,
latitude: g
});
h > this.maxMapXX && (this.maxMapXX = h, this.rightLongLat = {
longitude: f,
latitude: g
});
k < this.minMapYY && (this.minMapYY = k,
this.topLongLat = {
longitude: f,
latitude: g
});
k > this.maxMapYY && (this.maxMapYY = k, this.bottomLongLat = {
longitude: f,
latitude: g
});
b ? c += " L " : (c += " M ", b = !0);
c += h + " " + k
}
return c + " Z "
},
normalizeMap: function() {
var a = d.degreesToRadians(this.dataProvider.leftLongitude),
b = d.degreesToRadians(this.dataProvider.rightLongitude),
c = d.degreesToRadians(this.dataProvider.topLatitude),
e = d.degreesToRadians(this.dataProvider.bottomLatitude),
f = a + (b - a) / 2,
g = c + (e - c) / 2,
h = this.dpProjectionFunction(f, c)[1],
k = this.dpProjectionFunction(f,
e)[1],
l = this.dpProjectionFunction(a, g)[0],
m = this.dpProjectionFunction(b, g)[0],
c = d.equirectangular(f, c),
e = d.equirectangular(f, e),
h = (c[1] - e[1]) / (h - k),
a = d.equirectangular(a, g),
b = d.equirectangular(b, g),
l = (a[0] - b[0]) / (l - m);
this.minMapX = Infinity;
this.maxMapX = -Infinity;
this.minMapY = Infinity;
this.maxMapY = -Infinity;
for (m = 0; m < this.svgAreas.length; m++) this.normalize(this.svgAreas[m]);
if (this.dataProvider.wrappedLongitudes)
for (m = 0; m < this.svgAreas.length; m++) this.svgAreas[m].translate(-this.minMapX, -this.minMapY);
this.sourceMapHeight = Math.abs(this.maxMapY - this.minMapY);
this.sourceMapWidth = Math.abs(this.maxMapX - this.minMapX);
this.unscaledMapWidth = this.sourceMapWidth * l;
this.unscaledMapHeight = this.sourceMapHeight * h;
this.diffY = this.diffX = 0
},
fixMapPosition: function() {
var a = d.degreesToRadians(this.dataProvider.leftLongitude),
b = d.degreesToRadians(this.dataProvider.rightLongitude),
c = d.degreesToRadians(this.dataProvider.topLatitude),
e = d.degreesToRadians(this.dataProvider.bottomLatitude),
f = a + (b - a) / 2,
g = c + (e - c) / 2,
h = this.dpProjectionFunction(f,
c)[1],
k = this.dpProjectionFunction(f, e)[1],
l = this.dpProjectionFunction(a, g)[0],
m = this.dpProjectionFunction(b, g)[0];
this.sourceMapHeight = this.mapHeight / this.mapScale;
this.sourceMapWidth = this.mapWidth / this.mapScale;
this.unscaledMapWidth = (a - b) / (l - m) * this.sourceMapWidth;
this.unscaledMapHeight = (c - e) / (h - k) * this.sourceMapHeight;
b = this.coordinatesToXY(d.radiansToDegrees(f), d.radiansToDegrees(c));
a = this.coordinatesToXY(d.radiansToDegrees(a), d.radiansToDegrees(g));
c = g = Infinity;
for (e = 0; e < this.svgAreas.length; e++) f =
this.svgAreas[e].getBBox(), f.y < g && (g = f.y), f.x < c && (c = f.x);
this.diffY = b.y / this.mapScale - g;
this.diffX = a.x / this.mapScale - c;
for (e = 0; e < this.svgAreas.length; e++) this.svgAreas[e].translate(this.diffX, this.diffY)
},
changeProjection: function() {
this.minMapXX = Infinity;
this.maxMapXX = -Infinity;
this.minMapYY = Infinity;
this.maxMapYY = -Infinity;
this.projectionChanged = !1;
for (var a = 0; a < this.svgAreas.length; a++) this.redraw(this.svgAreas[a]);
this.projectionChanged = !0;
this.resizeMap()
},
coordinatesToXY: function(a, b) {
var c,
e;
c = !1;
this.dataProvider && (c = this.dataProvider.wrappedLongitudes) && (a = this.recalcLongitude(a));
this.projectionFunction ? (e = this.projectionFunction(d.degreesToRadians(a), d.degreesToRadians(b)), c = this.mapScale * d.roundTo(this.x2c(d.radiansToDegrees(e[0])), 3), e = this.mapScale * d.roundTo(this.y2c(d.radiansToDegrees(e[1])), 3)) : (c = this.longitudeToCoordinate(a), e = this.latitudeToCoordinate(b));
return {
x: c,
y: e
}
},
coordinatesToStageXY: function(a, b) {
var c = this.coordinatesToXY(a, b),
d = c.x * this.zoomLevel() + this.mapContainer.x,
c = c.y * this.zoomLevel() + this.mapContainer.y;
return {
x: d,
y: c
}
},
stageXYToCoordinates: function(a, b) {
var c = this.mapSet.getBBox(),
d = (a - this.mapContainer.x) / this.zoomLevel() - c.x * this.mapScale,
c = (b - this.mapContainer.y) / this.zoomLevel() - c.y * this.mapScale;
return this.xyToCoordinates(d, c)
},
xyToCoordinates: function(a, b, c, e, f) {
var g;
isNaN(e) && (e = this.mapWidth);
isNaN(f) && (f = this.mapHeight);
c || (c = this.projectionFunction);
if (g = c.invert) {
var h = this.dataProvider.leftLongitude,
k = this.dataProvider.rightLongitude,
l = this.dataProvider.topLatitude,
m = this.dataProvider.bottomLatitude,
n = h + (k - h) / 2,
p = l + (m - l) / 2,
l = d.radiansToDegrees(c(d.degreesToRadians(n), d.degreesToRadians(l))[1]),
m = d.radiansToDegrees(c(d.degreesToRadians(n), d.degreesToRadians(m))[1]),
h = d.radiansToDegrees(c(d.degreesToRadians(h), d.degreesToRadians(p))[0]),
k = d.radiansToDegrees(c(d.degreesToRadians(k), d.degreesToRadians(p))[0]);
this.projectionChanged && (l = d.radiansToDegrees(c(d.degreesToRadians(this.topLongLat.longitude), d.degreesToRadians(this.topLongLat.latitude))[1]), m = d.radiansToDegrees(c(d.degreesToRadians(this.bottomLongLat.longitude),
d.degreesToRadians(this.bottomLongLat.latitude))[1]), h = d.radiansToDegrees(c(d.degreesToRadians(this.leftLongLat.longitude), d.degreesToRadians(this.leftLongLat.latitude))[0]), k = d.radiansToDegrees(c(d.degreesToRadians(this.rightLongLat.longitude), d.degreesToRadians(this.rightLongLat.latitude))[0]));
a = d.degreesToRadians(a / e * (k - h) + h);
b = d.degreesToRadians(b / f * (m - l) + l);
b = g(a, b);
g = d.radiansToDegrees(b[0]);
b = d.radiansToDegrees(b[1])
} else g = this.coordinateToLongitude(a), b = this.coordinateToLatitude(b);
return {
longitude: d.roundTo(g,
4),
latitude: d.roundTo(b, 4)
}
},
coordinateToLatitude: function(a, b) {
var c;
void 0 === b && (b = this.mapHeight);
if (this.mapSet) {
var e = this.dataProvider,
f = e.bottomLatitude;
c = e.topLatitude;
"mercator" == e.projection ? (e = this.mercatorLatitudeToCoordinate(f), c = this.mercatorLatitudeToCoordinate(c), c = 2 * d.degreesToRadians(a * (e - c) / b + c), c = d.radiansToDegrees(2 * Math.atan(Math.exp(c)) - .5 * Math.PI)) : c = a / b * (f - c) + c
}
return Math.round(1E6 * c) / 1E6
},
coordinateToLongitude: function(a, b) {
var c, d = this.dataProvider;
void 0 === b && (b = this.mapWidth);
this.mapSet && (c = a / b * (d.rightLongitude - d.leftLongitude) + d.leftLongitude);
return Math.round(1E6 * c) / 1E6
}
})
})();
(function() {
var d = window.AmCharts;
d.ZoomControl = d.Class({
construct: function(a) {
this.cname = "ZoomControl";
this.panStepSize = .1;
this.zoomFactor = 2;
this.maxZoomLevel = 64;
this.minZoomLevel = 1;
this.panControlEnabled = !1;
this.zoomControlEnabled = !0;
this.buttonRollOverColor = "#DADADA";
this.buttonFillColor = "#FFFFFF";
this.buttonFillAlpha = 1;
this.buttonBorderColor = "#000000";
this.buttonBorderAlpha = .1;
this.buttonIconAlpha = this.buttonBorderThickness = 1;
this.gridColor = this.buttonIconColor = "#000000";
this.homeIconFile = "homeIcon.gif";
this.gridBackgroundColor = "#000000";
this.draggerAlpha = this.gridAlpha = this.gridBackgroundAlpha = 0;
this.draggerSize = this.buttonSize = 31;
this.iconSize = 11;
this.homeButtonEnabled = !0;
this.buttonCornerRadius = 2;
this.gridHeight = 5;
this.roundButtons = !0;
this.top = this.left = 10;
d.applyTheme(this, a, this.cname)
},
init: function(a, b) {
var c = this;
c.chart = a;
d.remove(c.set);
var e = b.set();
d.setCN(a, e, "zoom-control");
var f = c.buttonSize,
g = c.zoomControlEnabled,
h = c.panControlEnabled,
k = c.buttonFillColor,
l = c.buttonFillAlpha,
m = c.buttonBorderThickness,
n = c.buttonBorderColor,
p = c.buttonBorderAlpha,
t = c.buttonCornerRadius,
r = c.buttonRollOverColor,
q = c.gridHeight,
y = c.zoomFactor,
B = c.minZoomLevel,
u = c.maxZoomLevel,
w = c.buttonIconAlpha,
v = c.buttonIconColor,
A = c.roundButtons,
C = a.svgIcons,
x = a.getX(c.left),
z = a.getY(c.top);
isNaN(c.right) || (x = a.getX(c.right, !0), x = h ? x - 3 * f : x - f);
isNaN(c.bottom) || (z = a.getY(c.bottom, !0), g && (z -= q + 3 * f), z = h ? z - 3 * f : c.homeButtonEnabled ? z - .5 * f : z + f);
e.translate(x, z);
c.previousDY = NaN;
var F, x = f / 4 - 1;
if (g) {
F = b.set();
d.setCN(a, F, "zoom-control-zoom");
e.push(F);
c.set = e;
c.zoomSet = F;
5 < q && (g = d.rect(b, f + 6, q + 2 * f + 6, c.gridBackgroundColor, c.gridBackgroundAlpha, 0, "#000000", 0, 4), d.setCN(a, g, "zoom-bg"), g.translate(-3, -3), g.mouseup(function() {
c.handleBgUp()
}).touchend(function() {
c.handleBgUp()
}), F.push(g));
var E = f;
A && (E = f / 1.5);
c.draggerSize = E;
var H = Math.log(u / B) / Math.log(y) + 1;
1E3 < H && (H = 1E3);
var g = q / H,
G, D = b.set();
D.translate((f - E) / 2 + 1, 1, NaN, !0);
F.push(D);
for (G = 1; G < H; G++) z = f + G * g, z = d.line(b, [1, E - 2], [z, z], c.gridColor, c.gridAlpha, 1), d.setCN(a, z, "zoom-grid"), D.push(z);
z = new d.SimpleButton;
z.setDownHandler(c.draggerDown, c);
z.setClickHandler(c.draggerUp, c);
z.init(b, E, g, k, l, m, n, p, t, r);
d.setCN(a, z.set, "zoom-dragger");
F.push(z.set);
z.set.setAttr("opacity", c.draggerAlpha);
c.dragger = z.set;
c.previousY = NaN;
z = new d.SimpleButton;
C ? (E = b.set(), H = d.line(b, [-x, x], [0, 0], v, w, 1), G = d.line(b, [0, 0], [-x, x], v, w, 1), E.push(H), E.push(G), z.svgIcon = E) : z.setIcon(a.pathToImages + "plus.gif", c.iconSize);
z.setClickHandler(a.zoomIn, a);
z.init(b, f, f, k, l, m, n, p, t, r, w, v, A);
d.setCN(a, z.set, "zoom-in");
F.push(z.set);
z = new d.SimpleButton;
C ? z.svgIcon = d.line(b, [-x, x], [0, 0], v, w, 1) : z.setIcon(a.pathToImages + "minus.gif", c.iconSize);
z.setClickHandler(a.zoomOut, a);
z.init(b, f, f, k, l, m, n, p, t, r, w, v, A);
z.set.translate(0, q + f);
d.setCN(a, z.set, "zoom-out");
F.push(z.set);
q -= g;
u = Math.log(u / 100) / Math.log(y);
c.realStepSize = q / (u - Math.log(B / 100) / Math.log(y));
c.realGridHeight = q;
c.stepMax = u
}
h && (h = b.set(), d.setCN(a, h, "zoom-control-pan"), e.push(h), F && F.translate(f, 4 * f), y = new d.SimpleButton, C ? y.svgIcon = d.line(b, [x / 5, -x + x / 5,
x / 5
], [-x, 0, x], v, w, 1) : y.setIcon(a.pathToImages + "panLeft.gif", c.iconSize), y.setClickHandler(a.moveLeft, a), y.init(b, f, f, k, l, m, n, p, t, r, w, v, A), y.set.translate(0, f), d.setCN(a, y.set, "pan-left"), h.push(y.set), y = new d.SimpleButton, C ? y.svgIcon = d.line(b, [-x / 5, x - x / 5, -x / 5], [-x, 0, x], v, w, 1) : y.setIcon(a.pathToImages + "panRight.gif", c.iconSize), y.setClickHandler(a.moveRight, a), y.init(b, f, f, k, l, m, n, p, t, r, w, v, A), y.set.translate(2 * f, f), d.setCN(a, y.set, "pan-right"), h.push(y.set), y = new d.SimpleButton, C ? y.svgIcon = d.line(b, [-x, 0, x], [x / 5, -x + x / 5, x / 5], v, w, 1) : y.setIcon(a.pathToImages + "panUp.gif", c.iconSize), y.setClickHandler(a.moveUp, a), y.init(b, f, f, k, l, m, n, p, t, r, w, v, A), y.set.translate(f, 0), d.setCN(a, y.set, "pan-up"), h.push(y.set), y = new d.SimpleButton, C ? y.svgIcon = d.line(b, [-x, 0, x], [-x / 5, x - x / 5, -x / 5], v, w, 1) : y.setIcon(a.pathToImages + "panDown.gif", c.iconSize), y.setClickHandler(a.moveDown, a), y.init(b, f, f, k, l, m, n, p, t, r, w, v, A), y.set.translate(f, 2 * f), d.setCN(a, y.set, "pan-down"), h.push(y.set), e.push(h));
c.homeButtonEnabled && (h = new d.SimpleButton,
C ? h.svgIcon = d.polygon(b, [-x, 0, x, x - 1, x - 1, 2, 2, -2, -2, -x + 1, -x + 1], [0, -x, 0, 0, x - 1, x - 1, 2, 2, x - 1, x - 1, 0], v, w, 1, v, w) : h.setIcon(a.pathToImages + c.homeIconFile, c.iconSize), h.setClickHandler(a.goHome, a), c.panControlEnabled && (p = l = 0), h.init(b, f, f, k, l, m, n, p, t, r, w, v, A), c.panControlEnabled ? h.set.translate(f, f) : F && F.translate(0, 1.5 * f), d.setCN(a, h.set, "pan-home"), e.push(h.set));
c.update()
},
draggerDown: function() {
this.chart.stopDrag();
this.isDragging = !0
},
draggerUp: function() {
this.isDragging = !1
},
handleBgUp: function() {
var a =
this.chart;
a.zoomTo(100 * Math.pow(this.zoomFactor, this.stepMax - (a.mouseY - this.zoomSet.y - this.set.y - this.buttonSize - this.realStepSize / 2) / this.realStepSize))
},
update: function() {
var a;
a = this.zoomFactor;
var b = this.realStepSize,
c = this.stepMax,
e = this.dragger,
f = this.buttonSize,
g, h = this.chart;
h && (this.isDragging ? (h.stopDrag(), g = e.y + (h.mouseY - this.previousY), g = d.fitToBounds(g, f, this.realGridHeight + f), h.zoomTo(100 * Math.pow(a, c - (g - f) / b), NaN, NaN, !0)) : (a = Math.log(h.zoomLevel() / 100) / Math.log(a), g = (c - a) * b + f), this.previousY =
h.mouseY, this.previousDY != g && e && (e.translate((this.buttonSize - this.draggerSize) / 2, g), this.previousDY = g))
}
})
})();
(function() {
var d = window.AmCharts;
d.SimpleButton = d.Class({
construct: function() {},
init: function(a, b, c, e, f, g, h, k, l, m, n, p, t) {
var r = this;
r.rollOverColor = m;
r.color = e;
r.container = a;
m = a.set();
r.set = m;
t ? (b /= 2, e = d.circle(a, b, e, f, g, h, k), e.translate(b, b)) : e = d.rect(a, b, c, e, f, g, h, k, l);
m.push(e);
f = r.iconPath;
var q;
f && (q = r.iconSize, g = (b - q) / 2, t && (g = (2 * b - q) / 2), q = a.image(f, g, (c - q) / 2, q, q));
r.svgIcon && (q = r.svgIcon, t ? q.translate(b, b) : q.translate(b / 2, b / 2));
m.setAttr("cursor", "pointer");
q && (m.push(q), q.setAttr("opacity",
n), q.node.style.pointerEvents = "none");
e.mousedown(function() {
r.handleDown()
}).touchstart(function() {
r.handleDown()
}).mouseup(function() {
r.handleUp()
}).touchend(function() {
r.handleUp()
}).mouseover(function() {
r.handleOver()
}).mouseout(function() {
r.handleOut()
});
r.bg = e
},
setIcon: function(a, b) {
this.iconPath = a;
this.iconSize = b
},
setClickHandler: function(a, b) {
this.clickHandler = a;
this.scope = b
},
setDownHandler: function(a, b) {
this.downHandler = a;
this.scope = b
},
handleUp: function() {
var a = this.clickHandler;
a && a.call(this.scope)
},
handleDown: function() {
var a = this.downHandler;
a && a.call(this.scope)
},
handleOver: function() {
this.container.chart.skipClick = !0;
this.bg.setAttr("fill", this.rollOverColor)
},
handleOut: function() {
this.container.chart.skipClick = !1;
this.bg.setAttr("fill", this.color)
}
})
})();
(function() {
var d = window.AmCharts;
d.SmallMap = d.Class({
construct: function(a) {
this.cname = "SmallMap";
this.mapColor = "#e6e6e6";
this.rectangleColor = "#FFFFFF";
this.top = this.right = 10;
this.minimizeButtonWidth = 23;
this.backgroundColor = "#9A9A9A";
this.backgroundAlpha = 1;
this.borderColor = "#FFFFFF";
this.iconColor = "#000000";
this.borderThickness = 3;
this.borderAlpha = 1;
this.size = .2;
this.enabled = !0;
d.applyTheme(this, a, this.cname)
},
init: function(a, b) {
var c = this;
if (c.enabled) {
c.chart = a;
c.container = b;
c.width = a.realWidth *
c.size;
c.height = a.realHeight * c.size;
d.remove(c.mapSet);
d.remove(c.allSet);
d.remove(c.set);
var e = b.set();
c.set = e;
d.setCN(a, e, "small-map");
var f = b.set();
c.allSet = f;
e.push(f);
c.buildSVGMap();
var g = c.borderThickness,
h = c.borderColor,
k = d.rect(b, c.width + g, c.height + g, c.backgroundColor, c.backgroundAlpha, g, h, c.borderAlpha);
d.setCN(a, k, "small-map-bg");
k.translate(-g / 2, -g / 2);
f.push(k);
k.toBack();
var l, m, k = c.minimizeButtonWidth,
n = new d.SimpleButton,
p = k / 2;
a.svgIcons ? n.svgIcon = d.line(b, [-p / 2, 0, p / 2], [-p / 4, p / 4, -p /
4
], c.iconColor, 1, 1) : n.setIcon(a.pathToImages + "arrowDown.gif", k);
n.setClickHandler(c.minimize, c);
n.init(b, k, k, h, 1, 1, h, 1);
d.setCN(a, n.set, "small-map-down");
n = n.set;
c.downButtonSet = n;
e.push(n);
var t = new d.SimpleButton;
a.svgIcons ? t.svgIcon = d.line(b, [-p / 2, 0, p / 2], [p / 4, -p / 4, p / 4], c.iconColor, 1, 1) : t.setIcon(a.pathToImages + "arrowUp.gif", k);
t.setClickHandler(c.maximize, c);
t.init(b, k, k, h, 1, 1, h, 1);
d.setCN(a, t.set, "small-map-up");
h = t.set;
c.upButtonSet = h;
h.hide();
e.push(h);
var r, q;
isNaN(c.top) || (l = a.getY(c.top) +
g, q = 0);
isNaN(c.bottom) || (l = a.getY(c.bottom, !0) - c.height - g, q = c.height - k + g / 2);
isNaN(c.left) || (m = a.getX(c.left) + g, r = -g / 2);
isNaN(c.right) || (m = a.getX(c.right, !0) - c.width - g, r = c.width - k + g / 2);
g = b.set();
g.clipRect(1, 1, c.width, c.height);
f.push(g);
c.rectangleC = g;
e.translate(m, l);
n.translate(r, q);
h.translate(r, q);
f.mouseup(function() {
c.handleMouseUp()
});
c.drawRectangle()
} else d.remove(c.allSet), d.remove(c.downButtonSet), d.remove(c.upButtonSet)
},
minimize: function() {
this.downButtonSet.hide();
this.upButtonSet.show();
this.allSet.hide()
},
maximize: function() {
this.downButtonSet.show();
this.upButtonSet.hide();
this.allSet.show()
},
buildSVGMap: function() {
var a = this.chart,
b = {
fill: this.mapColor,
stroke: this.mapColor,
"stroke-opacity": 1
},
c = this.container,
e = c.set();
d.setCN(a, e, "small-map-image");
var f;
for (f = 0; f < a.svgAreas.length; f++) {
var g = c.path(a.svgAreas[f].path).attr(b);
e.push(g)
}
this.allSet.push(e);
b = e.getBBox();
c = this.size * a.mapScale;
f = -b.x * c;
var g = -b.y * c,
h = 0,
k = 0;
a.centerMap && (h = (this.width - b.width * c) / 2, k = (this.height -
b.height * c) / 2);
this.mapWidth = b.width * c;
this.mapHeight = b.height * c;
f += h;
g += k;
this.dx = h;
this.dy = k;
e.translate(f, g, c);
this.mapSet = e;
this.mapX = f;
this.mapY = g
},
update: function() {
var a = this.chart;
if (a) {
var b = a.zoomLevel(),
c = this.width,
d = this.height,
f = c / (a.realWidth * b),
g = a.mapContainer.getBBox(),
c = c / b,
d = d / b,
h = this.rectangle;
h.translate(-(a.mapContainer.x + g.x * b) * f + this.dx, -(a.mapContainer.y + g.y * b) * f + this.dy);
0 < c && 0 < d && (h.setAttr("width", Math.ceil(c + 1)), h.setAttr("height", Math.ceil(d + 1)));
this.rWidth = c;
this.rHeight =
d
}
},
drawRectangle: function() {
var a = this.rectangle;
d.remove(a);
a = d.rect(this.container, 10, 10, "#000", 0, 1, this.rectangleColor, 1);
d.setCN(this.chart, a, "small-map-rectangle");
this.rectangleC.push(a);
this.rectangle = a
},
handleMouseUp: function() {
var a = this.chart,
b = a.zoomLevel();
a.zoomToMapXY(b, (a.mouseX - this.set.x - this.mapX) / this.size + a.diffX * a.mapScale, (a.mouseY - this.set.y - this.mapY) / this.size + a.diffY * a.mapScale)
}
})
})();
(function() {
var d = window.AmCharts;
d.AreasProcessor = d.Class({
construct: function(a) {
this.chart = a
},
process: function(a) {
this.updateAllAreas();
this.allObjects = [];
a = a.areas;
var b = this.chart;
b.outlines = [];
var c = a.length,
d, f, g = 0,
h = !1,
k = !1,
l = 0;
for (d = 0; d < c; d++)
if (f = a[d], f = f.value, !isNaN(f)) {
if (!1 === h || h < f) h = f;
if (!1 === k || k > f) k = f;
g += Math.abs(f);
l++
}
this.minValue = k;
this.maxValue = h;
isNaN(b.minValue) || (this.minValue = b.minValue);
isNaN(b.maxValue) || (this.maxValue = b.maxValue);
b.maxValueReal = h;
b.minValueReal = k;
for (d =
0; d < c; d++) f = a[d], isNaN(f.value) ? f.percents = void 0 : (f.percents = (f.value - k) / g * 100, k == h && (f.percents = 100));
for (d = 0; d < c; d++) f = a[d], this.createArea(f);
b.outlinesToFront()
},
updateAllAreas: function() {
var a = this.chart,
b = a.areasSettings,
c = b.unlistedAreasColor,
e = b.unlistedAreasAlpha,
f = b.unlistedAreasOutlineColor,
g = b.unlistedAreasOutlineAlpha,
h = a.svgAreas,
k = a.dataProvider,
l = k.areas,
m = {},
n;
for (n = 0; n < l.length; n++) m[l[n].id] = l[n];
for (n = 0; n < h.length; n++) {
l = h[n];
if (b.preserveOriginalAttributes) {
if (l.customAttr)
for (var p in l.customAttr) l.setAttr(p,
l.customAttr[p])
} else {
void 0 != c && l.setAttr("fill", c);
isNaN(e) || l.setAttr("fill-opacity", e);
void 0 != f && l.setAttr("stroke", f);
isNaN(g) || l.setAttr("stroke-opacity", g);
var t = b.outlineThickness;
b.adjustOutlineThickness && (t = t / a.zoomLevel() / a.mapScale);
l.setAttr("stroke-width", t)
}
d.setCN(a, l, "map-area-unlisted");
k.getAreasFromMap && !m[l.id] && (t = new d.MapArea(a.theme), t.parentObject = k, t.id = l.id, t.outline = l.outline, k.areas.push(t))
}
},
createArea: function(a) {
var b = this.chart,
c = b.svgAreasById[a.id],
e = b.areasSettings;
if (c && c.className) {
var f = b.areasClasses[c.className];
f && (e = d.processObject(f, d.AreasSettings, b.theme))
}
var g = e.color,
h = e.alpha,
k = e.outlineThickness,
l = e.rollOverColor,
m = e.selectedColor,
n = e.rollOverAlpha,
p = e.rollOverBrightness,
t = e.outlineColor,
r = e.outlineAlpha,
q = e.balloonText,
y = e.selectable,
B = e.pattern,
u = e.rollOverOutlineColor,
w = e.bringForwardOnHover,
v = e.preserveOriginalAttributes;
this.allObjects.push(a);
a.chart = b;
a.baseSettings = e;
a.autoZoomReal = void 0 == a.autoZoom ? e.autoZoom : a.autoZoom;
f = a.color;
void 0 ==
f && (f = g);
var A = a.alpha;
isNaN(A) && (A = h);
h = a.rollOverAlpha;
isNaN(h) && (h = n);
isNaN(h) && (h = A);
n = a.rollOverColor;
void 0 == n && (n = l);
l = a.pattern;
void 0 == l && (l = B);
B = a.selectedColor;
void 0 == B && (B = m);
m = a.balloonText;
void 0 === m && (m = q);
void 0 == e.colorSolid || isNaN(a.value) || (q = Math.floor((a.value - this.minValue) / ((this.maxValue - this.minValue) / b.colorSteps)), q == b.colorSteps && q--, q *= 1 / (b.colorSteps - 1), this.maxValue == this.minValue && (q = 1), a.colorReal = d.getColorFade(f, e.colorSolid, q));
void 0 != a.color && (a.colorReal = a.color);
void 0 == a.selectable && (a.selectable = y);
void 0 == a.colorReal && (a.colorReal = g);
g = a.outlineColor;
void 0 == g && (g = t);
t = a.outlineAlpha;
isNaN(t) && (t = r);
r = a.outlineThickness;
isNaN(r) && (r = k);
k = a.rollOverOutlineColor;
void 0 == k && (k = u);
u = a.rollOverBrightness;
void 0 == u && (u = p);
void 0 == a.bringForwardOnHover && (a.bringForwardOnHover = w);
void 0 == a.preserveOriginalAttributes && (a.preserveOriginalAttributes = v);
isNaN(e.selectedBrightness) || (B = d.adjustLuminosity(a.colorReal, e.selectedBrightness / 100));
a.alphaReal = A;
a.rollOverColorReal =
n;
a.rollOverAlphaReal = h;
a.balloonTextReal = m;
a.selectedColorReal = B;
a.outlineColorReal = g;
a.outlineAlphaReal = t;
a.rollOverOutlineColorReal = k;
a.outlineThicknessReal = r;
a.patternReal = l;
a.rollOverBrightnessReal = u;
a.accessibleLabel || (a.accessibleLabel = e.accessibleLabel);
d.processDescriptionWindow(e, a);
if (c && (p = c.area, w = c.title, a.enTitle = c.title, w && !a.title && (a.title = w), (c = b.language) ? (w = d.mapTranslations) && (c = w[c]) && c[a.enTitle] && (a.titleTr = c[a.enTitle]) : a.titleTr = void 0, p)) {
c = a.tabIndex;
void 0 === c && (c = e.tabIndex);
void 0 !== c && p.setAttr("tabindex", c);
a.displayObject = p;
a.outline && (A = 0, a.alphaReal = 0, a.rollOverAlphaReal = 0, a.mouseEnabled = !1, b.outlines.push(p), p.node.setAttribute("pointer-events", "none"));
a.mouseEnabled && b.addObjectEventListeners(p, a);
var C;
void 0 != f && (C = f);
void 0 != a.colorReal && (C = a.showAsSelected || b.selectedObject == a ? a.selectedColorReal : a.colorReal);
p.node.setAttribute("class", "");
d.setCN(b, p, "map-area");
d.setCN(b, p, "map-area-" + p.id);
e.adjustOutlineThickness && (r = r / b.zoomLevel() / b.mapScale);
a.preserveOriginalAttributes ||
(p.setAttr("fill", C), p.setAttr("stroke", g), p.setAttr("stroke-opacity", t), p.setAttr("stroke-width", r), p.setAttr("fill-opacity", A));
b.makeObjectAccessible(a);
l && p.pattern(l, b.mapScale, b.path);
a.hidden && p.hide()
}
}
})
})();
(function() {
var d = window.AmCharts;
d.AreasSettings = d.Class({
construct: function(a) {
this.cname = "AreasSettings";
this.alpha = 1;
this.autoZoom = !1;
this.balloonText = "[[title]]";
this.color = "#FFCC00";
this.colorSolid = "#990000";
this.unlistedAreasAlpha = 1;
this.unlistedAreasColor = "#DDDDDD";
this.outlineColor = "#FFFFFF";
this.outlineThickness = this.outlineAlpha = 1;
this.selectedColor = this.rollOverOutlineColor = "#CC0000";
this.unlistedAreasOutlineColor = "#FFFFFF";
this.unlistedAreasOutlineAlpha = 1;
this.descriptionWindowWidth =
250;
this.bringForwardOnHover = this.adjustOutlineThickness = !0;
this.accessibleLabel = "[[title]] [[value]] [[description]]";
d.applyTheme(this, a, this.cname)
}
})
})();
(function() {
var d = window.AmCharts;
d.ImagesProcessor = d.Class({
construct: function(a) {
this.chart = a;
this.reset()
},
process: function(a) {
var b = a.images,
c;
for (c = 0; c < b.length; c++) {
var d = b[c];
this.createImage(d, c);
d.parentArray = b
}
this.counter = c;
a.parentObject && a.remainVisible && this.process(a.parentObject)
},
createImage: function(a, b) {
a = d.processObject(a, d.MapImage);
a.arrays = [];
isNaN(b) && (this.counter++, b = this.counter);
var c = this.chart,
e = c.container,
f = c.mapImagesContainer,
g = c.stageImagesContainer,
h = c.imagesSettings;
a.remove && a.remove();
var k = h.color,
l = h.alpha,
m = h.rollOverColor,
n = h.rollOverOutlineColor,
p = h.selectedColor,
t = h.balloonText,
r = h.outlineColor,
q = h.outlineAlpha,
y = h.outlineThickness,
B = h.selectedScale,
u = h.rollOverScale,
w = h.selectable,
v = h.labelPosition,
A = h.labelColor,
C = h.labelFontSize,
x = h.bringForwardOnHover,
z = h.labelRollOverColor,
F = h.rollOverBrightness,
E = h.selectedLabelColor;
a.index = b;
a.chart = c;
a.baseSettings = c.imagesSettings;
var H = e.set();
a.displayObject = H;
var G = a.color;
void 0 == G && (G = k);
k = a.alpha;
isNaN(k) &&
(k = l);
void 0 == a.bringForwardOnHover && (a.bringForwardOnHover = x);
l = a.outlineAlpha;
isNaN(l) && (l = q);
q = a.rollOverColor;
void 0 == q && (q = m);
m = a.selectedColor;
void 0 == m && (m = p);
p = a.balloonText;
void 0 === p && (p = t);
t = a.outlineColor;
void 0 == t && (t = r);
a.outlineColorReal = t;
r = a.outlineThickness;
isNaN(r) && (r = y);
(y = a.labelPosition) || (y = v);
v = a.labelColor;
void 0 == v && (v = A);
A = a.labelRollOverColor;
void 0 == A && (A = z);
z = a.selectedLabelColor;
void 0 == z && (z = E);
E = a.labelFontSize;
isNaN(E) && (E = C);
C = a.selectedScale;
isNaN(C) && (C = B);
B =
a.rollOverScale;
isNaN(B) && (B = u);
u = a.rollOverBrightness;
void 0 == u && (u = F);
void 0 == a.selectable && (a.selectable = w);
a.colorReal = G;
isNaN(h.selectedBrightness) || (m = d.adjustLuminosity(a.colorReal, h.selectedBrightness / 100));
a.alphaReal = k;
a.rollOverColorReal = q;
a.balloonTextReal = p;
a.selectedColorReal = m;
a.labelColorReal = v;
a.labelRollOverColorReal = A;
a.selectedLabelColorReal = z;
a.labelFontSizeReal = E;
a.labelPositionReal = y;
a.selectedScaleReal = C;
a.rollOverScaleReal = B;
a.rollOverOutlineColorReal = n;
a.rollOverBrightnessReal =
u;
a.accessibleLabel || (a.accessibleLabel = h.accessibleLabel);
d.processDescriptionWindow(h, a);
a.centeredReal = void 0 == a.centered ? h.centered : a.centered;
n = a.type;
u = a.imageURL;
B = a.svgPath;
C = a.width;
E = a.height;
w = a.scale;
isNaN(a.percentWidth) || (C = a.percentWidth / 100 * c.realWidth);
isNaN(a.percentHeight) || (E = a.percentHeight / 100 * c.realHeight);
var D;
u || n || B || (n = "circle", C = 1, l = k = 0);
q = F = 0;
h = a.selectedColorReal;
if (n) {
isNaN(C) && (C = 10);
isNaN(E) && (E = 10);
"kilometers" == a.widthAndHeightUnits && (C = c.kilometersToPixels(a.width),
E = c.kilometersToPixels(a.height));
"miles" == a.widthAndHeightUnits && (C = c.milesToPixels(a.width), E = c.milesToPixels(a.height));
if ("circle" == n || "bubble" == n) E = C;
D = this.createPredefinedImage(G, t, r, n, C, E);
q = F = 0;
a.centeredReal ? (isNaN(a.right) || (F = C * w), isNaN(a.bottom) || (q = E * w)) : (F = C * w / 2, q = E * w / 2);
D.translate(F, q, w, !0)
} else u ? (isNaN(C) && (C = 10), isNaN(E) && (E = 10), D = e.image(u, 0, 0, C, E), D.node.setAttribute("preserveAspectRatio", "none"), D.setAttr("opacity", k), a.centeredReal && (F = isNaN(a.right) ? -C / 2 : C / 2, q = isNaN(a.bottom) ?
-E / 2 : E / 2, D.translate(F, q, NaN, !0))) : B && (D = e.path(B), u = D.getBBox(), a.centeredReal ? (F = -u.x * w - u.width * w / 2, isNaN(a.right) || (F = -F), q = -u.y * w - u.height * w / 2, isNaN(a.bottom) || (q = -q)) : F = q = 0, D.translate(F, q, w, !0), D.x = F, D.y = q);
D && (H.push(D), a.image = D, D.setAttr("stroke-opacity", l), D.setAttr("stroke-width", r), D.setAttr("stroke", t), D.setAttr("fill-opacity", k), "bubble" != n && D.setAttr("fill", G), d.setCN(c, D, "map-image"), void 0 != a.id && d.setCN(c, D, "map-image-" + a.id));
G = a.labelColorReal;
!a.showAsSelected && c.selectedObject !=
a || void 0 == h || (D.setAttr("fill", h), G = a.selectedLabelColorReal);
D = null;
void 0 !== a.label && (D = d.text(e, a.label, G, c.fontFamily, a.labelFontSizeReal, a.labelAlign), d.setCN(c, D, "map-image-label"), void 0 !== a.id && d.setCN(c, D, "map-image-label-" + a.id), G = a.labelBackgroundAlpha, (k = a.labelBackgroundColor) && 0 < G && (l = D.getBBox(), e = d.rect(e, l.width + 16, l.height + 10, k, G), d.setCN(c, e, "map-image-label-background"), void 0 != a.id && d.setCN(c, e, "map-image-label-background-" + a.id), H.push(e), a.labelBG = e), a.imageLabel = D, H.push(D),
d.setCN(c, H, "map-image-container"), void 0 != a.id && d.setCN(c, H, "map-image-container-" + a.id), this.labelsToReposition.push(a), a.arrays.push({
arr: this.labelsToReposition,
el: a
}));
e = isNaN(a.latitude) || isNaN(a.longitude) ? !0 : !1;
a.lineId && (D = this.chart.getObjectById(a.lineId)) && 0 < D.longitudes.length && (e = !1);
e ? g.push(H) : f.push(H);
H && (H.rotation = a.rotation, isNaN(a.rotation) || H.rotate(a.rotation), a.arrays.push({
arr: this.allSvgObjects,
el: H
}), this.allSvgObjects.push(H));
this.allObjects.push(a);
c.makeObjectAccessible(a);
f = a.tabIndex;
void 0 === f && (f = c.imagesSettings.tabIndex);
void 0 !== f && H.setAttr("tabindex", f);
a.arrays.push({
arr: this.allObjects,
el: a
});
isNaN(a.longitude) || isNaN(a.latitude) || !a.fixedSize || (a.objToResize = {
image: H,
mapImage: a,
scale: 1
}, this.objectsToResize.push(a.objToResize), a.arrays.push({
arr: this.objectsToResize,
el: a.objToResize
}));
this.updateSizeAndPosition(a);
a.mouseEnabled && c.addObjectEventListeners(H, a);
a.hidden && H.hide();
d.removeFromArray(c.updatableImages, a);
a.animateAlongLine && (c.updatableImages.push(a),
a.delayAnimateAlong());
return a
},
updateSizeAndPosition: function(a) {
var b = this.chart,
c = a.displayObject,
e = b.getX(a.left),
f = b.getY(a.top),
g, h = a.image.getBBox();
isNaN(a.right) || (e = b.getX(a.right, !0) - h.width * a.scale);
isNaN(a.bottom) || (f = b.getY(a.bottom, !0) - h.height * a.scale);
var k = a.longitude,
l = a.latitude,
m = a.positionOnLine,
h = a.imageLabel,
n = this.chart.zoomLevel(),
p, t;
a.lineId && (a.line = this.chart.getObjectById(a.lineId));
if (a.line && a.line.getCoordinates) {
a.line.chart = b;
var r = a.line.getCoordinates(m, a.lineSegment);
r && (k = b.coordinateToLongitude(r.x), l = b.coordinateToLatitude(r.y), p = r.x, t = r.y, a.animateAngle && (g = d.radiansToDegrees(r.angle)))
}
isNaN(g) || c.rotate(g + a.extraAngle);
if (!isNaN(e) && !isNaN(f)) c.translate(e, f, NaN, !0);
else if (!isNaN(l) && !isNaN(k))
if (f = b.coordinatesToXY(k, l), e = f.x, f = f.y, isNaN(p) || (e = p), isNaN(t) || (f = t), a.fixedSize) {
p = a.positionScale;
isNaN(p) ? p = 0 : (--p, p *= 1 - 2 * Math.abs(m - .5));
if (m = a.objectToResize) m.scale = 1 + p;
c.translate(e, f, 1 / n + p, !0)
} else c.translate(e, f, NaN, !0);
this.positionLabel(h, a, a.labelPositionReal)
},
positionLabel: function(a, b, c) {
if (a) {
var d = b.image,
f = 0,
g = 0,
h = 0,
k = 0;
d && (k = d.getBBox(), g = d.y + k.y, f = d.x + k.x, h = k.width, k = k.height, b.svgPath && (h *= b.scale, k *= b.scale));
var d = a.getBBox(),
l = d.width,
m = d.height;
"right" == c && (f += h + l / 2 + 5, g += k / 2 - 2);
"left" == c && (f += -l / 2 - 5, g += k / 2 - 2);
"top" == c && (g -= m / 2 + 3, f += h / 2);
"bottom" == c && (g += k + m / 2, f += h / 2);
"middle" == c && (f += h / 2, g += k / 2);
a.translate(f + b.labelShiftX, g + b.labelShiftY, NaN, !0);
a = b.labelFontSizeReal;
b.labelBG && b.labelBG.translate(f - d.width / 2 + b.labelShiftX - 9, g - a / 2 + b.labelShiftY -
4, NaN, !0)
}
},
createPredefinedImage: function(a, b, c, e, f, g) {
var h = this.chart.container,
k;
switch (e) {
case "circle":
k = d.circle(h, f / 2, a, 1, c, b, 1);
break;
case "rectangle":
k = d.polygon(h, [-f / 2, f / 2, f / 2, -f / 2], [g / 2, g / 2, -g / 2, -g / 2], a, 1, c, b, 1, 0, !0);
break;
case "bubble":
k = d.circle(h, f / 2, a, 1, c, b, 1, !0);
break;
case "hexagon":
f /= Math.sqrt(3), k = d.polygon(h, [.866 * f, 0 * f, -.866 * f, -.866 * f, 0 * f, .866 * f], [.5 * f, 1 * f, .5 * f, -.5 * f, -1 * f, -.5 * f], a, 1, c, b, 1)
}
return k
},
reset: function() {
this.objectsToResize = [];
this.allSvgObjects = [];
this.allObjects = [];
this.allLabels = [];
this.labelsToReposition = []
}
})
})();
(function() {
var d = window.AmCharts;
d.ImagesSettings = d.Class({
construct: function(a) {
this.cname = "ImagesSettings";
this.balloonText = "[[title]]";
this.alpha = 1;
this.borderAlpha = 0;
this.borderThickness = 1;
this.labelPosition = "right";
this.labelColor = "#000000";
this.labelFontSize = 11;
this.color = "#000000";
this.labelRollOverColor = "#00CC00";
this.centered = !0;
this.rollOverScale = this.selectedScale = 1;
this.descriptionWindowWidth = 250;
this.bringForwardOnHover = !0;
this.outlineColor = "transparent";
this.adjustAnimationSpeed = !1;
this.baseAnimationDistance = 500;
this.pauseDuration = 0;
this.easingFunction = d.easeInOutQuad;
this.animationDuration = 3;
this.positionScale = 1;
this.accessibleLabel = "[[title]] [[description]]";
d.applyTheme(this, a, this.cname)
}
})
})();
(function() {
var d = window.AmCharts;
d.LinesProcessor = d.Class({
construct: function(a) {
this.chart = a;
this.reset()
},
process: function(a) {
var b = a.lines,
c;
for (c = 0; c < b.length; c++) {
var d = b[c];
this.createLine(d, c);
d.parentArray = b
}
this.counter = c;
a.parentObject && a.remainVisible && this.process(a.parentObject)
},
createLine: function(a, b) {
a = d.processObject(a, d.MapLine);
isNaN(b) && (this.counter++, b = this.counter);
a.index = b;
a.remove && a.remove();
var c = this.chart,
e = c.linesSettings,
f = this.objectsToResize,
g = c.mapLinesContainer,
h = c.stageLinesContainer,
k = e.thickness,
l = e.dashLength,
m = e.arrow,
n = e.arrowSize,
p = e.arrowColor,
t = e.arrowAlpha,
r = e.color,
q = e.alpha,
y = e.rollOverColor,
B = e.selectedColor,
u = e.rollOverAlpha,
w = e.balloonText,
v = e.bringForwardOnHover,
A = e.arc,
C = e.rollOverBrightness,
x = c.container;
a.chart = c;
a.baseSettings = e;
var z = x.set();
a.displayObject = z;
var F = a.tabIndex;
void 0 === F && (F = e.tabIndex);
void 0 !== F && z.setAttr("tabindex", F);
this.allSvgObjects.push(z);
a.arrays.push({
arr: this.allSvgObjects,
el: z
});
this.allObjects.push(a);
a.arrays.push({
arr: this.allObjects,
el: a
});
a.mouseEnabled && c.addObjectEventListeners(z, a);
if (a.remainVisible || c.selectedObject == a.parentObject) {
F = a.thickness;
isNaN(F) && (F = k);
k = a.dashLength;
isNaN(k) && (k = l);
l = a.color;
void 0 == l && (l = r);
r = a.alpha;
isNaN(r) && (r = q);
q = a.rollOverAlpha;
isNaN(q) && (q = u);
isNaN(q) && (q = r);
u = a.rollOverColor;
void 0 == u && (u = y);
y = a.selectedColor;
void 0 == y && (y = B);
B = a.balloonText;
void 0 === B && (B = w);
w = a.arc;
isNaN(w) && (w = A);
A = a.arrow;
if (!A || "none" == A && "none" != m) A = m;
m = a.arrowColor;
void 0 == m &&
(m = p);
void 0 == m && (m = l);
p = a.arrowAlpha;
isNaN(p) && (p = t);
isNaN(p) && (p = r);
t = a.arrowSize;
isNaN(t) && (t = n);
n = a.rollOverBrightness;
void 0 == n && (n = C);
a.colorReal = l;
a.arrowColor = m;
isNaN(e.selectedBrightness) || (y = d.adjustLuminosity(a.colorReal, e.selectedBrightness / 100));
a.alphaReal = r;
a.rollOverColorReal = u;
a.rollOverAlphaReal = q;
a.balloonTextReal = B;
a.selectedColorReal = y;
a.thicknessReal = F;
a.rollOverBrightnessReal = n;
a.accessibleLabel || (a.accessibleLabel = e.accessibleLabel);
void 0 === a.shiftArrow && (a.shiftArrow = e.shiftArrow);
void 0 == a.bringForwardOnHover && (a.bringForwardOnHover = v);
d.processDescriptionWindow(e, a);
v = this.processCoordinates(a.x, c.realWidth);
C = this.processCoordinates(a.y, c.realHeight);
n = a.longitudes;
e = a.latitudes;
q = n.length;
if (0 < q)
for (v = [], C = [], u = 0; u < q; u++) B = c.coordinatesToXY(n[u], e[u]), v.push(B.x), C.push(B.y);
if (0 < v.length) {
a.segments = v.length;
d.dx = 0;
d.dy = 0;
var E, H, G, q = 10 * (1 - Math.abs(w));
10 <= q && (q = NaN);
1 > q && (q = 1);
a.arcRadius = [];
a.distances = [];
n = c.mapContainer.scale;
if (isNaN(q)) {
for (q = 0; q < v.length - 1; q++) H =
Math.sqrt(Math.pow(v[q + 1] - v[q], 2) + Math.pow(C[q + 1] - C[q], 2)), a.distances[q] = H;
q = d.line(x, v, C, l, 1, F / n, k, !1, !1, !0);
l = d.line(x, v, C, l, .001, 5 / n, k, !1, !1, !0);
q.setAttr("stroke-linecap", "round")
} else {
u = 1;
0 > w && (u = 0);
B = {
fill: "none",
stroke: l,
"stroke-opacity": 1,
"stroke-width": F / n,
"fill-opacity": 0,
"stroke-linecap": "round"
};
void 0 !== k && 0 < k && (B["stroke-dasharray"] = k);
for (var k = "", D = 0; D < v.length - 1; D++) {
var K = v[D],
J = v[D + 1],
L = C[D],
O = C[D + 1];
H = Math.sqrt(Math.pow(J - K, 2) + Math.pow(O - L, 2));
G = H / 2 * q;
E = 270 + 180 * Math.acos(H / 2 /
G) / Math.PI;
isNaN(E) && (E = 270);
if (K < J) {
var P = K,
K = J,
J = P,
P = L,
L = O,
O = P;
E = -E
}
0 < w && (E = -E);
k += "M" + K + "," + L + "A" + G + "," + G + ",0,0," + u + "," + J + "," + O;
a.arcRadius[D] = G;
a.distances[D] = H
}
q = x.path(k).attr(B);
l = x.path(k).attr({
"fill-opacity": 0,
stroke: l,
"stroke-width": 5 / n,
"stroke-opacity": .001,
fill: "none"
})
}
d.setCN(c, q, "map-line");
void 0 != a.id && d.setCN(c, q, "map-line-" + a.id);
d.dx = .5;
d.dy = .5;
z.push(q);
z.push(l);
q.setAttr("opacity", r);
if ("none" != A) {
var I, M, N;
if ("end" == A || "both" == A) u = v[v.length - 1], D = C[C.length - 1], 1 < v.length ?
(B = v[v.length - 2], I = C[C.length - 2]) : (B = u, I = D), I = 180 * Math.atan((D - I) / (u - B)) / Math.PI, isNaN(E) || (I += E), M = u, N = D, I = 0 > u - B ? I - 90 : I + 90;
r = [-t / 2 - .5, -.5, t / 2 - .5];
k = [t, -.5, t];
a.shiftArrow && "middle" != A && (k = [0, 1.2 * -t, 0]);
"both" == A && (t = d.polygon(x, r, k, m, p, 1, m, p, void 0, !0), z.push(t), t.translate(M, N, 1 / n, !0), isNaN(I) || t.rotate(I), d.setCN(c, q, "map-line-arrow"), void 0 != a.id && d.setCN(c, q, "map-line-arrow-" + a.id), a.fixedSize && f.push(t));
if ("start" == A || "both" == A) t = v[0], N = C[0], 1 < v.length ? (u = v[1], M = C[1]) : (u = t, M = N), I = 180 * Math.atan((N -
M) / (t - u)) / Math.PI, isNaN(E) || (I -= E), M = t, I = 0 > t - u ? I - 90 : I + 90;
"middle" == A && (u = v[v.length - 1], D = C[C.length - 1], 1 < v.length ? (B = v[v.length - 2], I = C[C.length - 2]) : (B = u, I = D), M = B + (u - B) / 2, N = I + (D - I) / 2, I = 180 * Math.atan((D - I) / (u - B)) / Math.PI, isNaN(E) || (E = H / 2, G -= Math.sqrt(G * G - E * E), 0 > w && (G = -G), E = Math.sin(I / 180 * Math.PI), -1 == E && (E = 1), M -= E * G, N += Math.cos(I / 180 * Math.PI) * G), I = 0 > u - B ? I - 90 : I + 90);
t = d.polygon(x, r, k, m, p, 1, m, p, void 0, !0);
d.setCN(c, q, "map-line-arrow");
void 0 != a.id && d.setCN(c, q, "map-line-arrow-" + a.id);
z.push(t);
t.translate(M,
N, 1 / n, !0);
isNaN(I) || t.rotate(I);
a.fixedSize && (f.push(t), a.arrays.push({
arr: f,
el: t
}));
a.arrowSvg = t
}
a.fixedSize && q && (f = {
line: q,
thickness: F
}, this.linesToResize.push(f), a.arrays.push({
arr: this.linesToResize,
el: f
}), f = {
line: l,
thickness: 5
}, this.linesToResize.push(f), a.arrays.push({
arr: this.linesToResize,
el: f
}));
a.lineSvg = q;
a.showAsSelected && !isNaN(y) && q.setAttr("stroke", y);
0 < e.length ? g.push(z) : h.push(z);
a.hidden && z.hide();
c.makeObjectAccessible(a)
}
}
},
processCoordinates: function(a, b) {
var c = [],
d;
for (d = 0; d <
a.length; d++) {
var f = a[d],
g = Number(f);
isNaN(g) && (g = Number(f.replace("%", "")) * b / 100);
isNaN(g) || c.push(g)
}
return c
},
reset: function() {
this.objectsToResize = [];
this.allSvgObjects = [];
this.allObjects = [];
this.linesToResize = []
}
})
})();
(function() {
var d = window.AmCharts;
d.LinesSettings = d.Class({
construct: function(a) {
this.cname = "LinesSettings";
this.balloonText = "[[title]]";
this.thickness = 1;
this.dashLength = 0;
this.arrowSize = 10;
this.arrowAlpha = 1;
this.arrow = "none";
this.color = "#990000";
this.descriptionWindowWidth = 250;
this.bringForwardOnHover = !0;
d.applyTheme(this, a, this.cname)
}
})
})();
(function() {
var d = window.AmCharts;
d.MapObject = d.Class({
construct: function(a) {
this.fixedSize = this.mouseEnabled = !0;
this.images = [];
this.lines = [];
this.areas = [];
this.remainVisible = !0;
this.passZoomValuesToTarget = !1;
this.objectType = this.cname;
d.applyTheme(this, a, "MapObject");
this.arrays = []
},
deleteObject: function() {
this.remove();
this.parentArray && d.removeFromArray(this.parentArray, this);
if (this.arrays)
for (var a = 0; a < this.arrays.length; a++) d.removeFromArray(this.arrays[a].arr, this.arrays[a].el);
this.arrays = []
}
})
})();
(function() {
var d = window.AmCharts;
d.MapArea = d.Class({
inherits: d.MapObject,
construct: function(a) {
this.cname = "MapArea";
d.MapArea.base.construct.call(this, a);
d.applyTheme(this, a, this.cname)
},
validate: function() {
this.chart.areasProcessor.createArea(this)
}
})
})();
(function() {
var d = window.AmCharts;
d.MapLine = d.Class({
inherits: d.MapObject,
construct: function(a) {
this.cname = "MapLine";
this.longitudes = [];
this.latitudes = [];
this.x = [];
this.y = [];
this.segments = 0;
this.arrow = "none";
d.MapLine.base.construct.call(this, a);
d.applyTheme(this, a, this.cname)
},
validate: function() {
this.chart.linesProcessor.createLine(this)
},
remove: function() {
var a = this.displayObject;
a && a.remove()
},
getCoordinates: function(a, b) {
isNaN(b) && (b = 0);
isNaN(this.arc) || this.isValid || (this.isValid = !0, this.validate());
if (!isNaN(a)) {
var c, e, f, g, h, k;
if (1 < this.longitudes.length) {
e = this.chart.coordinatesToXY(this.longitudes[b], this.latitudes[b]);
var l = this.chart.coordinatesToXY(this.longitudes[b + 1], this.latitudes[b + 1]);
c = e.x;
f = l.x;
e = e.y;
g = l.y
} else 1 < this.x.length && (c = this.x[b], f = this.x[b + 1], e = this.y[b], g = this.y[b + 1]);
l = Math.sqrt(Math.pow(f - c, 2) + Math.pow(g - e, 2));
c < f && !isNaN(this.arc) && 0 !== this.arc && (a = 1 - a);
h = c + (f - c) * a;
k = e + (g - e) * a;
var m = Math.atan2(g - e, f - c);
if (!isNaN(this.arc) && 0 !== this.arc && this.arcRadius) {
var n = 0;
c <
f && (n = c, c = f, f = n, n = e, e = g, g = n, n = Math.PI);
k = this.arcRadius[b];
0 > this.arc && (l = -l);
h = c + (f - c) / 2 + Math.sqrt(k * k - l / 2 * (l / 2)) * (e - g) / l;
var p = e + (g - e) / 2 + Math.sqrt(k * k - l / 2 * (l / 2)) * (f - c) / l;
c = 180 * Math.atan2(e - p, c - h) / Math.PI;
f = 180 * Math.atan2(g - p, f - h) / Math.PI;
180 < f - c && (f -= 360);
m = d.degreesToRadians(c + (f - c) * a);
h += k * Math.cos(m);
k = p + k * Math.sin(m);
m = 0 < this.arc ? m + Math.PI / 2 : m - Math.PI / 2;
m += n
}
this.distance = l;
return {
x: h,
y: k,
angle: m
}
}
},
fixToStage: function() {
if (0 < this.latitudes.length) {
this.y = [];
for (var a = 0; a < this.latitudes.length; a++) {
var b =
this.chart.coordinatesToStageXY(this.longitudes[a], this.latitudes[a]);
this.y.push(b.y);
this.x.push(b.x)
}
this.latitudes = [];
this.longitudes = []
}
this.validate()
},
fixToMap: function() {
if (0 < this.y.length) {
this.latitudes = [];
for (var a = 0; a < this.y.length; a++) {
var b = this.chart.stageXYToCoordinates(this.x[a], this.y[a]);
this.latitudes.push(b.latitude);
this.longitudes.push(b.longitude)
}
this.y = [];
this.x = []
}
this.validate()
}
})
})();
(function() {
var d = window.AmCharts;
d.MapImage = d.Class({
inherits: d.MapObject,
construct: function(a) {
this.cname = "MapImage";
this.scale = 1;
this.widthAndHeightUnits = "pixels";
this.labelShiftY = this.labelShiftX = 0;
this.positionOnLine = .5;
this.direction = 1;
this.lineSegment = this.extraAngle = 0;
this.animateAngle = !0;
this.createEvents("animationStart", "animationEnd");
d.MapImage.base.construct.call(this, a);
d.applyTheme(this, a, this.cname);
this.delayCounter = 0
},
validate: function() {
this.chart.imagesProcessor.createImage(this)
},
updatePosition: function() {
this.chart.imagesProcessor.updateSizeAndPosition(this)
},
remove: function() {
var a = this.displayObject;
a && a.remove();
(a = this.imageLabel) && a.remove()
},
animateTo: function(a, b, c, d) {
isNaN(c) || (this.animationDuration = c);
d && (this.easingFunction = d);
this.finalX = a;
this.finalY = b;
isNaN(this.longitude) || (this.initialX = this.longitude);
isNaN(this.left) || (this.initialX = this.left);
isNaN(this.right) || (this.initialX = this.right);
isNaN(this.latitude) || (this.initialY = this.latitude);
isNaN(this.top) ||
(this.initialY = this.top);
isNaN(this.bottom) || (this.initialY = this.bottom);
this.animatingAlong = !1;
this.animate()
},
animateAlong: function(a, b, c) {
1 == this.positionOnLine && this.flipDirection && (this.direction = -1, this.extraAngle = 180);
isNaN(b) || (this.animationDuration = b);
c && (this.easingFunction = c);
a && (this.line = this.chart.getObjectById(a));
this.animateAlongLine = this.line;
this.animatingAlong = !0;
this.animate()
},
animate: function() {
var a = this.chart.imagesSettings,
b = this.animationDuration;
isNaN(b) && (b = a.animationDuration);
this.totalFrames = b * d.updateRate;
b = 1;
this.line && a.adjustAnimationSpeed && (this.line.distances && (b = this.line.distances[this.lineSegment] * this.chart.zoomLevel(), b = Math.abs(b / a.baseAnimationDistance)), this.totalFrames = Math.round(b * this.totalFrames));
this.frame = 0;
this.fire({
type: "animationStart",
chart: this.chart,
image: this,
lineSegment: this.lineSegment,
direction: this.direction
})
},
update: function() {
var a = this.totalFrames;
this.frame++;
this.delayCounter--;
0 === this.delayCounter && this.animateAlong();
if (!(0 < this.delayCounter))
if (this.frame <=
a) {
this.updatePosition();
var b = this.chart.imagesSettings,
c = this.easingFunction;
c || (c = b.easingFunction);
a = c(0, this.frame, 0, 1, a); - 1 == this.direction && (a = 1 - a);
this.animatingAlong ? this.positionOnLine = a : (b = this.initialX + (this.finalX - this.initialX) * a, isNaN(this.longitude) || (this.longitude = b), isNaN(this.left) || (this.left = b), isNaN(this.right) || (this.right = b), a = this.initialY + (this.finalY - this.initialY) * a, isNaN(this.latitude) || (this.latitude = a), isNaN(this.top) || (this.top = a), isNaN(this.bottom) || (this.bottom =
a))
} else this.frame == a + 1 && (this.fire({
type: "animationEnd",
chart: this.chart,
image: this,
lineSegment: this.lineSegment,
direction: this.direction
}), this.line && this.animatingAlong && (1 == this.direction ? this.lineSegment < this.line.segments - 2 ? (this.lineSegment++, this.delayAnimateAlong(), this.positionOnLine = 0) : this.flipDirection ? (this.direction = -1, this.extraAngle = 180, this.delayAnimateAlong()) : this.loop && (this.delayAnimateAlong(), this.lineSegment = 0) : 0 < this.lineSegment ? (this.lineSegment--, this.delayAnimateAlong(),
this.positionOnLine = 0) : this.loop && this.flipDirection ? (this.direction = 1, this.extraAngle = 0, this.delayAnimateAlong()) : this.loop && this.delayAnimateAlong()))
},
delayAnimateAlong: function() {
this.animateAlongLine && (this.delayCounter = this.chart.imagesSettings.pauseDuration * d.updateRate)
},
fixToStage: function() {
if (!isNaN(this.longitude)) {
var a = this.chart.coordinatesToStageXY(this.longitude, this.latitude);
this.left = a.x;
this.top = a.y;
this.latitude = this.longitude = void 0
}
this.validate()
},
fixToMap: function() {
if (!isNaN(this.left)) {
var a =
this.chart.stageXYToCoordinates(this.left, this.top);
this.longitude = a.longitude;
this.latitude = a.latitude;
this.top = this.left = void 0
}
this.validate()
}
})
})();
(function() {
var d = window.AmCharts;
d.degreesToRadians = function(a) {
return a / 180 * Math.PI
};
d.radiansToDegrees = function(a) {
return a / Math.PI * 180
};
d.getColorFade = function(a, b, c) {
var e = d.hex2RGB(b);
b = e[0];
var f = e[1],
e = e[2],
g = d.hex2RGB(a);
a = g[0];
var h = g[1],
g = g[2];
a += Math.round((b - a) * c);
h += Math.round((f - h) * c);
g += Math.round((e - g) * c);
return "rgb(" + a + "," + h + "," + g + ")"
};
d.hex2RGB = function(a) {
return [parseInt(a.substring(1, 3), 16), parseInt(a.substring(3, 5), 16), parseInt(a.substring(5, 7), 16)]
};
d.processDescriptionWindow =
function(a, b) {
isNaN(b.descriptionWindowX) && (b.descriptionWindowX = a.descriptionWindowX);
isNaN(b.descriptionWindowY) && (b.descriptionWindowY = a.descriptionWindowY);
isNaN(b.descriptionWindowLeft) && (b.descriptionWindowLeft = a.descriptionWindowLeft);
isNaN(b.descriptionWindowRight) && (b.descriptionWindowRight = a.descriptionWindowRight);
isNaN(b.descriptionWindowTop) && (b.descriptionWindowTop = a.descriptionWindowTop);
isNaN(b.descriptionWindowBottom) && (b.descriptionWindowBottom = a.descriptionWindowBottom);
isNaN(b.descriptionWindowWidth) &&
(b.descriptionWindowWidth = a.descriptionWindowWidth);
isNaN(b.descriptionWindowHeight) && (b.descriptionWindowHeight = a.descriptionWindowHeight)
};
d.normalizePath = function(a) {
for (var b = "", c = d.parsePath(a.getAttribute("d")), e, f, g = Infinity, h = -Infinity, k = Infinity, l = -Infinity, m = 0; m < c.length; m++) {
var n = c[m],
p = n.letter,
t = n.x,
n = n.y;
"h" == p && (p = "L", t += e, n = f);
"H" == p && (p = "L", n = f);
"v" == p && (p = "L", t = e, n += f);
"V" == p && (p = "L", t = e);
if ("m" === p || "l" === p) p = p.toUpperCase(), t += e, n += f;
t = d.roundTo(t, 3);
n = d.roundTo(n, 3);
e = t;
f = n;
t > h && (h = t);
t < g && (g = t);
n > l && (l = n);
n < k && (k = n);
b = "z" == p.toLowerCase() ? b + "Z " : b + (p + " " + t + " " + n + " ")
}
a.setAttribute("d", b);
return {
minX: g,
maxX: h,
minY: k,
maxY: l
}
};
d.mercatorLatitudeToRadians = function(a) {
return Math.log(Math.tan(Math.PI / 4 + d.degreesToRadians(a) / 2))
};
d.parsePath = function(a) {
a = a.match(/([MmLlHhVvZz]{1}[0-9.,\-\s]*)/g);
for (var b = [], c = 0; c < a.length; c++) {
var d = a[c].match(/([MmLlHhVvZz]{1})|([0-9.\-]+)/g),
f = {
letter: d[0]
};
switch (d[0]) {
case "Z":
case "Z":
case "z":
break;
case "V":
case "v":
f.y = Number(d[1]);
break;
case "H":
case "h":
f.x = Number(d[1]);
break;
default:
f.x = Number(d[1]), f.y = Number(d[2])
}
b.push(f)
}
return b
};
d.acos = function(a) {
return 1 < a ? 0 : -1 > a ? Math.PI : Math.acos(a)
};
d.asin = function(a) {
return 1 < a ? Math.PI / 2 : -1 > a ? -Math.PI / 2 : Math.asin(a)
};
d.sinci = function(a) {
return a ? a / Math.sin(a) : 1
};
d.asqrt = function(a) {
return 0 < a ? Math.sqrt(a) : 0
};
d.winkel3 = function(a, b) {
var c = d.aitoff(a, b);
return [(c[0] + a / Math.PI * 2) / 2, (c[1] + b) / 2]
};
d.winkel3.invert = function(a, b) {
var c = a,
e = b,
f = 25,
g = Math.PI / 2;
do var h = Math.cos(e),
k = Math.sin(e),
l = Math.sin(2 * e),
m = k * k,
n = h * h,
p = Math.sin(c),
t = Math.cos(c / 2),
r = Math.sin(c / 2),
q = r * r,
y = 1 - n * t * t,
B = y ? d.acos(h * t) * Math.sqrt(u = 1 / y) : u = 0,
u, y = .5 * (2 * B * h * r + c / g) - a,
w = .5 * (B * k + e) - b,
v = .5 * u * (n * q + B * h * t * m) + .5 / g,
A = u * (p * l / 4 - B * k * r),
k = .125 * u * (l * r - B * k * n * p),
m = .5 * u * (m * t + B * q * h) + .5,
h = A * k - m * v,
A = (w * A - y * m) / h,
y = (y * k - w * v) / h,
c = c - A,
e = e - y; while ((1E-6 < Math.abs(A) || 1E-6 < Math.abs(y)) && 0 < --f);
return [c, e]
};
d.aitoff = function(a, b) {
var c = Math.cos(b),
e = d.sinci(d.acos(c * Math.cos(a /= 2)));
return [2 * c * Math.sin(a) * e, Math.sin(b) * e]
};
d.orthographic =
function(a, b) {
return [Math.cos(b) * Math.sin(a), Math.sin(b)]
};
d.equirectangular = function(a, b) {
return [a, b]
};
d.equirectangular.invert = function(a, b) {
return [a, b]
};
d.eckert5 = function(a, b) {
var c = Math.PI;
return [a * (1 + Math.cos(b)) / Math.sqrt(2 + c), 2 * b / Math.sqrt(2 + c)]
};
d.eckert5.invert = function(a, b) {
var c = Math.sqrt(2 + Math.PI),
d = b * c / 2;
return [c * a / (1 + Math.cos(d)), d]
};
d.eckert6 = function(a, b) {
for (var c = Math.PI, d = (1 + c / 2) * Math.sin(b), f = 0, g = Infinity; 10 > f && 1E-5 < Math.abs(g); f++) b -= g = (b + Math.sin(b) - d) / (1 + Math.cos(b));
d = Math.sqrt(2 +
c);
return [a * (1 + Math.cos(b)) / d, 2 * b / d]
};
d.eckert6.invert = function(a, b) {
var c = 1 + Math.PI / 2,
e = Math.sqrt(c / 2);
return [2 * a * e / (1 + Math.cos(b *= e)), d.asin((b + Math.sin(b)) / c)]
};
d.mercator = function(a, b) {
b >= Math.PI / 2 - .02 && (b = Math.PI / 2 - .02);
b <= -Math.PI / 2 + .02 && (b = -Math.PI / 2 + .02);
return [a, Math.log(Math.tan(Math.PI / 4 + b / 2))]
};
d.mercator.invert = function(a, b) {
return [a, 2 * Math.atan(Math.exp(b)) - Math.PI / 2]
};
d.miller = function(a, b) {
return [a, 1.25 * Math.log(Math.tan(Math.PI / 4 + .4 * b))]
};
d.miller.invert = function(a, b) {
return [a, 2.5 *
Math.atan(Math.exp(.8 * b)) - .625 * Math.PI
]
};
d.eckert3 = function(a, b) {
var c = Math.PI,
d = Math.sqrt(c * (4 + c));
return [2 / d * a * (1 + Math.sqrt(1 - 4 * b * b / (c * c))), 4 / d * b]
};
d.eckert3.invert = function(a, b) {
var c = Math.PI,
e = Math.sqrt(c * (4 + c)) / 2;
return [a * e / (1 + d.asqrt(1 - b * b * (4 + c) / (4 * c))), b * e / 2]
}
})();
(function() {
var d = window.AmCharts;
d.MapData = d.Class({
inherits: d.MapObject,
construct: function() {
this.cname = "MapData";
d.MapData.base.construct.call(this);
this.projection = "mercator";
this.topLatitude = 90;
this.bottomLatitude = -90;
this.leftLongitude = -180;
this.rightLongitude = 180;
this.zoomLevel = 1;
this.getAreasFromMap = !1
}
})
})();
(function() {
var d = window.AmCharts;
d.DescriptionWindow = d.Class({
construct: function() {},
show: function(a, b, c, d) {
var f = this;
f.chart = a;
var g = document.createElement("div");
g.style.position = "absolute";
var h = a.classNamePrefix + "-description-";
g.className = "ammapDescriptionWindow " + h + "div";
f.div = g;
b.appendChild(g);
var k = ".gif";
a.svgIcons && (k = ".svg");
var l = document.createElement("img");
l.className = "ammapDescriptionWindowCloseButton " + h + "close-img";
l.src = a.pathToImages + "xIcon" + k;
l.style.cssFloat = "right";
l.style.cursor =
"pointer";
l.onclick = function() {
f.close()
};
l.onmouseover = function() {
l.src = a.pathToImages + "xIconH" + k
};
l.onmouseout = function() {
l.src = a.pathToImages + "xIcon" + k
};
g.appendChild(l);
b = document.createElement("div");
b.className = "ammapDescriptionTitle " + h + "title-div";
b.onmousedown = function() {
f.div.style.zIndex = 1E3
};
g.appendChild(b);
b.innerHTML = d;
d = b.offsetHeight;
b = document.createElement("div");
b.className = "ammapDescriptionText " + h + "text-div";
b.style.maxHeight = f.maxHeight - d - 20 + "px";
g.appendChild(b);
b.innerHTML =
c
},
close: function() {
try {
this.div.parentNode.removeChild(this.div), this.chart.fireClosed()
} catch (a) {}
}
})
})();
(function() {
var d = window.AmCharts;
d.ValueLegend = d.Class({
construct: function(a) {
this.cname = "ValueLegend";
this.enabled = !0;
this.showAsGradient = !1;
this.minValue = 0;
this.height = 12;
this.width = 200;
this.bottom = this.left = 10;
this.borderColor = "#FFFFFF";
this.borderAlpha = this.borderThickness = 1;
this.color = "#000000";
this.fontSize = 11;
d.applyTheme(this, a, this.cname)
},
init: function(a, b) {
if (this.enabled) {
var c = a.areasSettings.color,
e = a.areasSettings.colorSolid,
f = a.colorSteps;
d.remove(this.set);
var g = b.set();
this.set =
g;
d.setCN(a, g, "value-legend");
var h = 0,
k = this.minValue,
l = this.fontSize,
m = a.fontFamily,
n = this.color,
p = {
precision: a.precision,
decimalSeparator: a.decimalSeparator,
thousandsSeparator: a.thousandsSeparator
};
void 0 == k && (k = d.formatNumber(a.minValueReal, p));
void 0 !== k && (h = d.text(b, k, n, m, l, "left"), h.translate(0, l / 2 - 1), d.setCN(a, h, "value-legend-min-label"), g.push(h), h = h.getBBox().height);
k = this.maxValue;
void 0 === k && (k = d.formatNumber(a.maxValueReal, p));
void 0 !== k && (h = d.text(b, k, n, m, l, "right"), h.translate(this.width,
l / 2 - 1), d.setCN(a, h, "value-legend-max-label"), g.push(h), h = h.getBBox().height);
if (this.showAsGradient) c = d.rect(b, this.width, this.height, [c, e], 1, this.borderThickness, this.borderColor, 1, 0, 0), d.setCN(a, c, "value-legend-gradient"), c.translate(0, h), g.push(c);
else
for (l = this.width / f, m = 0; m < f; m++) n = d.getColorFade(c, e, 1 * m / (f - 1)), n = d.rect(b, l, this.height, n, 1, this.borderThickness, this.borderColor, 1), d.setCN(a, n, "value-legend-color"), d.setCN(a, n, "value-legend-color-" + m), n.translate(l * m, h), g.push(n);
e = c = 0;
f = g.getBBox();
h = a.getY(this.bottom, !0);
l = a.getY(this.top);
m = a.getX(this.right, !0);
n = a.getX(this.left);
isNaN(l) || (c = l);
isNaN(h) || (c = h - f.height);
isNaN(n) || (e = n);
isNaN(m) || (e = m - f.width);
g.translate(e, c)
} else d.remove(this.set)
}
})
})();
(function() {
var d = window.AmCharts;
d.ObjectList = d.Class({
construct: function(a) {
this.divId = a
},
init: function(a) {
this.chart = a;
var b = this.divId;
this.container && (b = this.container);
this.div = "object" != typeof b ? document.getElementById(b) : b;
b = document.createElement("div");
b.className = "ammapObjectList " + a.classNamePrefix + "-object-list-div";
this.div.appendChild(b);
this.addObjects(a.dataProvider, b)
},
addObjects: function(a, b) {
var c = this.chart,
d = document.createElement("ul");
d.className = c.classNamePrefix + "-object-list-ul";
var f;
if (a.areas)
for (f = 0; f < a.areas.length; f++) {
var g = a.areas[f];
void 0 === g.showInList && (g.showInList = c.showAreasInList);
this.addObject(g, d)
}
if (a.images)
for (f = 0; f < a.images.length; f++) g = a.images[f], void 0 === g.showInList && (g.showInList = c.showImagesInList), this.addObject(g, d);
if (a.lines)
for (f = 0; f < a.lines.length; f++) g = a.lines[f], void 0 === g.showInList && (g.showInList = c.showLinesInList), this.addObject(g, d);
0 < d.childNodes.length && b.appendChild(d)
},
addObject: function(a, b) {
var c = this;
if (a.showInList && void 0 !==
a.title) {
var d = c.chart,
f = document.createElement("li");
f.className = d.classNamePrefix + "-object-list-li";
var g = a.titleTr;
g || (g = a.title);
var g = document.createTextNode(g),
h = document.createElement("a");
h.className = d.classNamePrefix + "-object-list-a";
h.appendChild(g);
f.appendChild(h);
b.appendChild(f);
this.addObjects(a, f);
h.onmouseover = function() {
c.chart.rollOverMapObject(a, !1)
};
h.onmouseout = function() {
c.chart.rollOutMapObject(a)
};
h.onclick = function() {
c.chart.clickMapObject(a)
}
}
}
})
})();
// (c) ammap.com | SVG (in JSON format) map of Turkey - Low
// areas: {id:"TR-01"},{id:"TR-02"},{id:"TR-03"},{id:"TR-04"},{id:"TR-68"},{id:"TR-05"},{id:"TR-06"},{id:"TR-07"},{id:"TR-75"},{id:"TR-08"},{id:"TR-09"},{id:"TR-10"},{id:"TR-74"},{id:"TR-72"},{id:"TR-69"},{id:"TR-11"},{id:"TR-12"},{id:"TR-13"},{id:"TR-14"},{id:"TR-15"},{id:"TR-16"},{id:"TR-17"},{id:"TR-18"},{id:"TR-19"},{id:"TR-20"},{id:"TR-21"},{id:"TR-81"},{id:"TR-22"},{id:"TR-23"},{id:"TR-24"},{id:"TR-25"},{id:"TR-26"},{id:"TR-27"},{id:"TR-28"},{id:"TR-29"},{id:"TR-30"},{id:"TR-31"},{id:"TR-33"},{id:"TR-36"},{id:"TR-32"},{id:"TR-34"},{id:"TR-35"},{id:"TR-46"},{id:"TR-78"},{id:"TR-70"},{id:"TR-36"},{id:"TR-37"},{id:"TR-38"},{id:"TR-79"},{id:"TR-71"},{id:"TR-39"},{id:"TR-40"},{id:"TR-41"},{id:"TR-42"},{id:"TR-43"},{id:"TR-44"},{id:"TR-45"},{id:"TR-47"},{id:"TR-48"},{id:"TR-49"},{id:"TR-50"},{id:"TR-51"},{id:"TR-52"},{id:"TR-80"},{id:"TR-53"},{id:"TR-54"},{id:"TR-55"},{id:"TR-63"},{id:"TR-56"},{id:"TR-57"},{id:"TR-73"},{id:"TR-58"},{id:"TR-59"},{id:"TR-60"},{id:"TR-61"},{id:"TR-62"},{id:"TR-64"},{id:"TR-65"},{id:"TR-77"},{id:"TR-66"},{id:"TR-67"}
AmCharts.maps.turkeyLow = {
"svg": {
"defs": {
"amcharts:ammap": {
"projection": "mercator",
"leftLongitude": "25.663689",
"topLatitude": "42.099732",
"rightLongitude": "44.819611",
"bottomLatitude": "35.805510"
}
},
"g": {
"path": [{
"id": "TR-01",
"title": "Adana",
"selectedColor": "#CC0000",
"fill": "#CC0000",
"d": "M445.07,206.98l-3.09,8.85l-2.93,3.51l3.24,1.66l-2.8,3.97l2.49,5.4l-1.16,3.6l-2.89,2.9l0,0l-5.49,2.81l-2.15,3.22l-1.29,4.13l-0.47,4.38l2.33,10.57l-1.24,9.1l0,0l-2.23,2.65l0.25,2.58l0,0l-8.98,8.59l-4.99,-0.04l-1.64,1.05l-0.84,1.74l0.91,-0.42l0.01,1.18l0.04,-1.49l1.01,-0.55l0.12,1.52l1.81,-0.22l-0.21,-0.74l1.08,0.75l-3.2,2.23l-0.78,3.14l-2.95,2.12l-5.13,-1.28l-3.83,2.67l-13.85,-8.74l-4.12,-0.62l0,0l2.14,-1.06l0.16,-0.96l2.74,0.23l0.02,-1.1l0.69,0.67l1.29,-1.71l2.84,0.73l0.81,-1.54l-0.68,-6.76l-1.35,-6l-3.01,-1.78l-1.69,-0.01l-0.92,-2.32l-2.19,-1.27l0.02,-1.54l2.02,-1.89l-0.08,-1.23l-6.09,-7.11l-0.7,-3.67l0,0l2.63,-2.09l-0.76,-1.45l1,-1.36l1.56,-7.07l5.05,0.61l3.29,-5l4.54,-2.7l0,0l5.44,1.9l1.32,-0.34l1.27,1.69l7.13,0.43l1.23,-2.07l1.29,-9.35l3.28,-1.42l4.36,-4.7l6.58,-2.48l2.52,-6.52l3.65,-4.99l5.12,-1.5L445.07,206.98z"
}, {
"id": "TR-02",
"title": "Adıyaman",
"d": "M557.34,211.25L560.65,210.16L562.28,213.06L560.51,217.44L558.17,219.93L558.17,219.93L555.13,220.54L553.85,221.67L552.53,225.31L550.31,226.26L551.07,226.96L550.5,230.03L548.37,230L547.13,231.21L549.63,231.16L549.68,233.75L547.98,234.29L547.76,235.72L546.51,236.56L543.84,237.09L545.26,239.12L536.98,240.81L530.27,246.67L528.2,247.75L521.34,248.27L520.25,249.99L518.28,249.65L517.42,251.74L513.61,249.68L513.61,249.68L507.98,247.29L500.39,247.03L498.7,245.18L494.37,246.53L492.58,245.69L492.58,245.69L491.16,242.02L487.24,241.6L486.56,239.64L487.9,237.67L488.17,234.54L490.73,231.87L490.58,227.29L493.86,225.42L495.32,222.79L495.32,222.79L496.18,223.72L495.74,225.54L498.9,224.82L499.94,227.31L501.98,226.18L506.37,227.12L511.05,226.22L515.06,222.49L514.35,219.18L513,217.35L513.39,216.26L520.59,213.52L522.23,211.24L523.65,210.7L527.74,210.43L533.63,213.31L534.34,214.44L536.39,214.83L543.31,219.58L551.77,216.19L552.22,214.81z"
}, {
"id": "TR-03",
"title": "Afyonkarahisar",
"d": "M197.93,155.58L201.16,156.17L203.21,161.1L206.07,162.46L209.29,165.73L211.01,161.7L219.13,162.58L220.1,160.57L217.09,158.56L216.86,157.4L219.32,157.21L222.53,158.57L223.09,156.97L225.05,156.63L226.24,153.52L227.64,152.6L231.5,155.27L235.07,154.26L239.56,158.44L240.17,161.3L243.67,162.28L245.44,164.99L245.44,164.99L246.6,167.25L251.9,168.16L252.46,169.08L246.51,170.29L247.3,171.78L246.8,177.3L243.41,183.6L243.85,185.37L246.08,187.39L233.78,195.4L232.57,199.15L232.57,199.15L231.28,199.36L229.41,196.4L226.87,194.4L221.3,195.28L218.19,198.31L214.49,199.98L211.4,205.32L205.47,209.07L200.02,210.43L193.19,217.98L189.17,219.83L186.04,223.81L186.24,227.34L184.09,231.67L184.09,231.67L184.09,231.67L184.09,231.67L176.29,231.34L176.29,231.34L168.61,226.97L167.25,223.92L167.58,221.08L172.81,216.2L174.84,212.93L179.23,212.71L181.13,209.61L183.89,207.36L181.44,200.62L178.8,199.52L177.66,197.74L175.9,197.54L174.53,195.98L172.89,195.96L170.82,194.56L170.82,194.56L175.51,188.43L177.06,187.54L176.06,183.52L179.99,180.14L180.59,177.56L180.59,177.56L182.67,176.97L185.3,173.47L188.15,172.29L190.61,168.38L190.13,161.23L193.48,159.04L196.21,158.92z"
}, {
"id": "TR-04",
"title": "Ağrı",
"d": "M696.57,119.95L720.27,114.16L727.69,115.34L727.69,115.34L730.8,116.17L733.68,119.58L734.22,126.6L736.63,126.38L738.27,123.8L739.98,123.35L743.35,125.98L750.5,126.65L754.1,129.36L760.44,129.36L764.7,130.7L768.46,130.24L773.84,132.57L777.67,132.1L777.67,132.1L777.93,135.97L775.62,138.34L776.36,141.68L775.29,143.37L775.7,146.38L770.23,148.58L767.8,146.27L764.15,147.28L761.07,146.53L759.66,148.28L759.66,148.28L752.85,149.36L749.84,154.23L746.59,157.1L743.35,156.69L739.05,154.42L733.83,148.81L728.43,148.44L723.74,149.83L723.57,157.8L719.51,161.08L716.36,166.67L716.36,166.67L714.13,167.41L713.88,170.23L708.62,172.56L703.87,171.89L703.87,171.89L703.66,165.45L704.47,161.45L700.32,152.3L699.77,148.89L696.33,148.95L694.78,144.89L691.28,141.28L691.28,141.28L692.8,138.45L696.19,135.78L696.86,134.29L693.92,131.22L688.58,128.44L686.67,124.1L687.86,122.87z"
}, {
"id": "TR-68",
"title": "Aksaray",
"d": "M339.42,165.56L340.54,166.54L342.7,165.59L343.48,166.68L345.95,166.34L347.52,169.37L347.5,171.72L351.81,176.04L354.06,176.89L356.71,176.37L356.71,176.37L357.78,177.33L357.57,181.22L356.05,184.03L356.43,186.63L360.96,189.05L363.89,193.54L364.33,197.28L365.93,198.82L365.93,198.82L362.83,200.63L362.04,206.44L358.67,211.42L356.57,213.02L352.19,214.12L348.83,217.44L348.83,217.44L322.76,223.62L319.88,220.41L318.14,216.56L314.1,213.63L313.65,209.27L311.55,205.72L314.54,196.16L317.66,192.72L318.96,188.78L324.27,187.06L324.27,187.06L328.23,186.97L334.99,184.3L337.63,178.64L336.35,174.43L338.05,171.82L338.23,168.38z"
}, {
"id": "TR-05",
"title": "Amasya",
"d": "M390.29,56.95L395.39,57.58L397.04,59.66L402.46,58.75L405.21,60.2L406.65,59.15L407.21,60.39L408.58,59.37L410.16,63.18L413.21,64.71L412.87,66.4L413.67,67.45L417.98,67.62L419.47,69.06L424.55,67.85L431.46,70.68L433.12,65.71L434.37,65.27L435.35,63.17L440.88,65.21L441.17,66.3L439.52,68.21L444.23,70.11L444.23,70.11L444.73,71.88L448.1,73.67L444.85,76.59L445.09,79.04L444,81.05L438.38,81.49L438.66,82.76L441.34,83.2L439.3,84.88L438.42,87.08L432.98,89.57L431.82,91.2L428,89.79L428.09,88.85L426.44,87.98L420.85,88.27L419.78,91.36L417.24,92.98L417.07,94.69L414.6,96.36L409.83,97.44L405.06,100.49L405.06,100.49L402.34,100.98L402.34,100.98L404.72,96.97L402.68,95.46L404.02,92.64L403.37,90.73L405.29,89.93L405.3,88.22L406.91,87.09L407.49,85.03L405.08,80.8L400.5,79.71L400.68,76.02L394.94,75.61L390.97,76.75L387.11,73.81L386.73,70.42L389.7,64.86L387.15,61.6L390.26,59.16z"
}, {
"id": "TR-06",
"title": "Ankara",
"d": "M284.94,76.9L288.86,76.63L296.2,80.95L301.08,82.14L301.74,83.7L300.79,87.28L304.55,87.31L309.93,89.46L314.51,97.01L316.84,95.86L318.42,93.37L321.02,93.86L322.2,95.35L325.63,94.94L332.2,96.08L333,97.12L333,97.12L330.53,97.61L330.6,99.05L328.52,101.1L329.07,101.76L327.93,104.09L328.62,105.38L327.77,109.79L328.87,111.44L326.48,113.73L319.79,116.09L317.33,122.83L316.03,123.23L316.45,126.79L313.27,132.11L318.91,136.95L319.65,143.87L319.15,146.34L320.71,147.08L320.71,147.08L322.79,150.29L321.69,151.39L324.27,152.98L327.07,157.98L330.04,159.16L334.42,162.97L334.65,164.32L338.72,164.58L339.42,165.56L339.42,165.56L338.23,168.38L338.05,171.82L336.35,174.43L337.63,178.64L334.99,184.3L328.23,186.97L324.27,187.06L324.27,187.06L319.79,180.15L318.51,172.87L318.83,166.91L313,163.26L310.73,160.42L309.9,155.46L312.84,153.86L312.16,152.34L309.03,153.36L305.45,156.69L304.25,155.84L304.6,151.93L303.91,151.25L297.7,152.99L296.49,154.83L295.72,159.26L292.97,160.63L292.61,164.61L289.22,166.69L285.18,164.8L282.86,168.21L281.57,168.72L278.99,168.41L275.49,165.78L272.98,166.9L271.92,165.66L268.77,170.03L264.67,169.61L262.77,167.73L259.23,160.73L258.16,160.27L258.16,160.27L258.5,157.76L264.7,150.97L264.57,149.89L261.8,148.74L262.56,147.24L261.51,145.73L262.18,141.66L260.5,141.06L260.88,139.67L259,137.72L257.61,132.14L254.96,128.44L256.6,123.84L257.83,122.76L255.82,123.08L256.69,121.89L256.13,121.29L253.91,121.63L252.5,120.41L251.2,118.54L251.08,116.61L249.35,115.82L250.01,113.93L247.99,114.38L248.38,112.11L246.42,113.7L242.93,112.93L241.52,113.89L239.79,112.62L237.25,114.07L236.68,113.04L238.32,112.51L236.83,111.58L234.7,112.47L231.72,111.58L228.67,112.45L225.38,111.11L224.67,112.16L221.66,112.54L221.25,113.53L218.08,113.43L214.64,111.62L213.59,106.88L213.59,106.88L217.68,104.37L226.1,94.96L230.41,95.62L237.74,94.35L238.73,95.03L239.38,97.53L245.66,98.3L251.93,97.02L258.04,97.25L261.01,94.86L263.86,94.36L267.26,94.85L269.07,96.73L271.99,96.38L272.88,94.49L270.48,91.01L271.7,87.19L273.76,85.72L281.6,83.25L281.72,81.95L280.2,80.13L280.38,78.55L281.67,77.48z"
}, {
"id": "TR-07",
"title": "Antalya",
"d": "M234.84,249.39l3.26,3.2l8.94,2.08l2.8,-0.4l3.47,-2.07l1.72,0.1l1.06,2.91l2.15,2.11l2.3,6.9l4.26,5.95l7.46,3.44l1.44,1.74l0.85,4.4l4.95,3.32l0,0l-0.87,5.4l0.5,1.84l6.02,6.21l0,0l3.47,10.46l-2.32,6.31l0.76,2.27L285.2,319l0,0l-3.06,-0.45l-7.74,-6.25l-5.6,-9.47l-5.93,-6.3l-1.35,0.55l-1.15,-1.47l-7.73,-2.37l-1.41,-1.69l-3.13,-0.64l-4.68,-3.32l-6.83,-2.53l-0.04,-0.9l-2.36,-1.44l-13.37,-2.48l-10.1,0.54l-2.56,-1.96l-2.74,1.43l-2.33,3.03l-0.82,9.07l1.48,1.55l-3.51,6.36l0.07,1.36l-1.21,0.36l-0.16,1.79l2.17,3.3l-2.61,1.09l0.87,1.77l-3.31,3.43l0.18,-3.03l-1.82,0.07l-3.52,-2.28l-3.88,0.03l-1.51,0.66l-0.01,1.45l-0.5,-0.3l-1.02,1.62l-2.4,-1.47l-0.27,1.11l-2.66,1.91l-2.29,-0.88l-1.87,1.96l-1.88,0l-1.67,1.63l1.25,-0.23l-2.17,1.57l-0.75,-0.38l0.92,-0.69l-2.29,-0.27l-1.85,1.36L164,315.5l0.81,-0.24l-0.2,-1.11l-2.54,0.46l1.98,-0.94l-9.06,-0.98l0.19,-1.78l-1.14,-0.28l-0.86,0.09l-0.61,1.69l-3.63,-3.28l0,0l1.99,-1.36l-0.12,-3.42l0.88,-0.38l-0.46,-2.36l3.11,-1.68l5.13,-0.3l2.29,-2.03l2.16,-3.75l3.88,-2.45l1.29,-3.22l-0.02,-6.16l2.39,-4.18l-0.53,-2.24l-1.6,-1.35l0,0l3.61,-3.28l-0.72,-3.76l0.98,-1.82l4.4,-3.96l3.25,-1.15l6.59,-5l5.73,-0.38l7.07,4.3l12.51,0.42l1.54,-0.98l3.17,-6.5l-1.13,-1.58l0,0l2.65,0.05l3.58,2.99l4.11,-3.11L234.84,249.39z"
}, {
"id": "TR-75",
"title": "Ardahan",
"d": "M704.38,27.79L707.6,29.14L710.1,28.75L708.69,33.61L710.64,34.96L711.33,33.56L712.7,33.38L712.7,34.58L715.52,36.14L717.71,40.28L720.81,41.25L722.51,43.39L725.63,44.15L725.61,45L722.16,46.94L724.91,47.02L726.51,51.22L731.34,49.75L735.41,51.22L736.51,54.08L735.37,55.44L736.36,57.07L736.27,59.11L738.41,60.01L738.41,60.01L736.75,61.72L732.43,62.12L730.56,63.2L724.09,62.81L721.04,64.08L718.98,63.05L716.69,65.56L713.02,67.48L712.6,69.4L708.28,74.13L707.75,77.56L704.05,77.75L702.72,79.12L702.72,79.12L700.98,78.73L698.46,73.47L691.4,71.83L688.54,66.18L688.54,66.18L691.06,63.97L691.88,61.56L689.95,59.85L688.61,56.75L690.53,55.29L691.32,52.08L696.42,49.48L700.1,45.27L698.52,41.55L696.47,39.82L696.71,36.76L696.71,36.76L696.71,34.92L699.17,32.92L699.34,29.82L700.36,28.72z"
}, {
"id": "TR-08",
"title": "Artvin",
"d": "M674.73,32.21L677.24,33.73L682.91,32.6L684.05,33.9L687.26,33.79L689.13,35.21L692.06,35.24L694.06,36.79L696.71,36.76L696.71,36.76L696.47,39.82L698.52,41.55L700.1,45.27L696.42,49.48L691.32,52.08L690.53,55.29L688.61,56.75L689.95,59.85L691.88,61.56L691.06,63.97L688.54,66.18L688.54,66.18L685.17,63.02L675.98,62.71L670.66,67.75L671.17,73.27L668.54,75.84L668.11,78.89L666.47,80.37L664.79,80.44L664.38,77.37L663.55,77.02L656.05,80.23L650.74,84.12L649.17,83.82L648.54,81.61L648.48,77.92L650.08,76.99L650.05,76.17L647.7,73.66L640.26,70.37L640.26,70.37L643.9,65.41L644.71,62.32L649.46,56.91L652.17,55.15L646.44,47.44L646.24,44.59L644.93,42.31L644.93,42.31L650.67,39.98L656.78,32.36L660.35,34.12L663.58,33.67L663.52,34.88L666.65,35.57L668.17,37.12L670.68,35.56L672.55,33z"
}, {
"id": "TR-09",
"title": "Aydın",
"d": "M122.71,217.11l2.78,1.23l1.6,1.78l4.54,0.83l-1.47,2.83l-3.01,0.33l0.47,5.59l1.39,2.07l4.44,2.83l-2.42,3.04l-0.77,3.4l-6.33,5.29l-0.46,4.15l-0.72,0.47l0,0l-1.34,0.24l-5.47,-3.93l-9.13,-0.37l-0.67,-2.07l-5.33,4.28l-7.36,-0.58l-5,0.87l-2.98,-2.65l-2.62,0.16l-4.28,-1.81l-3.01,0.48l-2.59,1.97l-0.68,3.81l0,0l-1.55,0.56l-0.92,1.81l-1.07,-0.37l-0.08,1.79l-1.59,-0.69l-1.63,1.04l-2.25,-0.95l1.47,-2.57l-0.08,-3.53l-1.09,-0.76l-0.31,-3.01l-1,0.02l2.13,-2.22l-3.96,-2.27l-4.97,-1.47l1.11,-1.58l2.76,0.46l5.61,-2.25l1.47,-4.37l-1.34,-1.63l1.3,-2.9l0,0l3.31,1.46l0.79,2.37l2.82,-2.22l0.7,-4.28l3.48,-2.26l2.73,-0.09l5.31,2.74l11.81,-3.62l10.18,-0.95l1.94,-1.47l0.69,-1.72l3.05,-0.98l3.43,1.75l1.2,-2.21l0,0L122.71,217.11z"
}, {
"id": "TR-10",
"title": "Balıkesir",
"d": "M39.86,147.5l1.65,0.23l-1.93,1l1.22,0.38l0.52,1.29l1.32,-0.5l-0.22,0.8l-2.77,0.36l-0.31,-2.83l-0.76,-0.34L39.86,147.5zM80.89,87.59l1.28,0.81l-0.73,1.33l1.24,0.13l0.11,1.09l-3.68,-0.91l0.2,-1.05L80.38,89l-0.36,-1.45L80.89,87.59zM86.4,86.63l1,-0.06l0.31,1.09l3.08,-0.53l7.17,2.02l-0.63,1.69l-4.97,3.2l2.3,1.88l7.69,-2.01l0,0l1.98,3.08l0.03,2.14l-3.13,5.41l1.91,1.66l0.08,4.18l1.39,1.84l0.46,2.84l1.89,1.73l-0.04,3.27l1.63,2.37l1.62,1.12l3.78,0.27l2.06,2.51l4.63,2.66l2.71,-0.74l1.55,-1.63l1.41,0.34l0.64,5.77l1.42,-0.05l0.91,2.28l8.3,0.92l0,0l0.19,1.58l-2.87,3.04l0.91,6.6l-6.14,7.04l-7.27,1.33l1.6,4.04l0,0l-3.51,-0.37l-7.12,3.9l-4.3,-0.8l-2.78,2.41l-1.84,0.28l-4.29,-6.25l-4.53,-3.46l-1.32,-3.7l-1.35,-1.35l-4.29,2.89l-3.52,-3.59l-6.36,1.04l-4.66,-3.72l-2.49,1.53l0,0l0,0l0,0l-6.55,1.61l-3.18,-0.94l-3.6,1.1l-3.16,3.6l-6.95,2.23l-2.64,3.66l0,0l-1.92,-4.84l-4.57,-1.04l1.77,-2.43l0.17,1.03l-1.03,0.31l1.67,0.94l-0.36,-1.23l1.63,-1.79l4.29,-2.98l-0.28,-2.17l2.29,-0.37l0.11,-1.95l2.96,-0.41l0.93,-3.65l-1.08,-1.6l-1.93,-0.18l-1.75,1.49l-2.57,-0.72l-5.45,0.87l0,0l0.28,-3l2.56,-3.56l4.38,-0.99l3.29,-2.38l3.8,0.43l3.54,1.88l2.91,-0.23l6.42,1.77l3.4,-3.37l4.99,-2.95L77,125l0.67,-5.49l-2.53,-4.3l0.12,-3.36l-3.36,-3.08l2.79,-4.33l3.07,-2.2l0.54,-1.89l-0.71,-1.58l0,0l3.77,-1.48l1.89,1.1l3.35,0.1l5.02,-3.63l-2.39,-1.44l-1.07,0.89l-2.06,-2.5l0.12,-1.13l-2.53,-1.23l-0.14,-1.58L86.4,86.63zM77.31,86.43l0.78,0.46l-1.16,1.06l0.47,0.74l-1.95,1.06l0.34,-2.85l0.82,-0.93L77.31,86.43zM81.7,79l4.26,1.79l-5.54,3.19l-3.25,-1.2L77.3,80L81.7,79z"
}, {
"id": "TR-74",
"title": "Bartın",
"d": "M292.27,14.25L292.88,16.38L294.42,17.48L293.57,19.77L294.56,21.24L297.13,21.19L299.45,20.03L300.94,20.8L297.73,29L297.73,29L295.69,29.39L294.6,31.33L288.91,33.75L288.54,35.04L290.3,39.94L288.98,43.04L286.87,41.52L284.53,42.84L282.1,41.83L278.24,44.63L272.94,43.21L272.94,43.21L274.5,39.9L274.5,37.53L272.6,35.3L272.62,32.42L269.8,31.98L267.39,28.08L267.39,28.08L273.68,21.37L275.88,21.32L277.89,19.7L279.1,20.28L282.6,16.87L285.6,16.31L285.88,15.47L289.75,15.3z"
}, {
"id": "TR-72",
"title": "Batman",
"d": "M654.42,191.45L659.86,194.75L658.99,200.29L660.7,206.22L662.74,208.7L662.74,208.7L659.49,215.09L652.91,217.81L647.77,222.77L647.27,224.78L656.76,232.02L658.02,234.27L663.07,235.95L665.39,235.47L667.57,236.94L667.57,236.94L667.57,236.94L667.57,236.94L667.57,236.94L667.57,236.94L665.41,238.81L659.39,239.37L655.09,243.12L648.76,246.22L637.34,247.21L634.03,235.86L634.03,235.86L636.12,232.76L633.21,231.49L634.01,228.64L638.49,222.16L640.8,215.63L643.38,212.99L640.94,211.14L641.21,204.34L645.57,196.02L649.21,194.84L649.21,194.84L652.34,194.28z"
}, {
"id": "TR-69",
"title": "Bayburt",
"d": "M617.08,85.55L615.5,91.26L616.31,94.09L613.6,102.14L615.13,103.69L621.57,103.74L621.71,106.16L619.85,108.79L612.11,113.41L606.67,113.15L606.67,113.15L591.33,112.6L588.26,114.21L585.04,117.37L585.04,117.37L581.27,113.48L585.72,107.78L588.67,100.67L588.45,93.6L589.68,90.07L604.06,87.62L604.06,87.62L612.78,86.68L612.78,86.68z"
}, {
"id": "TR-11",
"title": "Bilecik",
"d": "M177.6,87.16L180.34,92.21L181.38,92.5L182.86,90.94L184.54,93.87L186.67,95.27L189.07,95.74L193.24,94.3L195.19,95.42L198.54,93.88L200.29,95.69L202.25,95.55L202.25,95.55L206.93,107.27L206.93,107.27L203.61,108.48L198.14,114.03L195.99,115.12L195.13,116.88L192.69,118.64L190.88,122.48L184.4,123.66L181.04,127.83L179.88,131.68L179.88,131.68L173.8,131.43L172.25,130.65L168.78,127.68L167.08,122.02L167.08,122.02L170.79,118.58L168.45,116.04L168.25,114.7L169.47,113.48L168.79,107.5L171.22,105.92L170.78,102.53L172.31,100.88L172.96,95.31L174.77,93.37L174.42,89.08z"
}, {
"id": "TR-12",
"title": "Bingöl",
"d": "M609.82,140.96L616.98,140.4L619.88,141.4L619.88,141.4L618.99,143.53L620.51,144.88L623.19,145.39L636.51,143.82L641.53,148.57L641.53,148.57L639.8,150.83L639.67,153.77L643.49,160.41L646.99,162.41L647.56,164.37L646.88,165.92L642.31,167.85L639.65,171.02L638.88,176.6L639.46,182.77L639.46,182.77L632.05,185.27L629.45,189.23L626.84,190.58L620.8,187.61L620.06,190.39L618.87,191.09L615.06,188.55L611.65,188.25L609.01,191.06L608.88,194L607.96,194.96L603.78,195.85L603.78,195.85L598.75,185.88L601.11,184.09L602.29,181.93L606.37,181.72L607.41,180.93L606.84,179.04L603.08,176.34L601.89,172.98L602.16,170.87L601.29,170.08L603.23,166.69L603.16,163.82L605.99,160.42L606.04,158.43L604.78,157.68L601.48,159.39L596.83,160.15L592.79,162.92L588.86,162.88L588.86,162.88L590.85,155.66L593.48,153.38L592.29,149.13L599.85,149.65z"
}, {
"id": "TR-13",
"title": "Bitlis",
"d": "M716.36,166.67L719.49,169.22L720.52,171.61L725.62,173.91L725.81,175.36L723.6,178.54L717.93,181.92L713.89,185.67L707.42,195.34L707.06,201.49L702.41,204.7L702.42,205.91L704.08,207.17L704.49,209.58L702.63,219.71L702.63,219.71L701.96,220.87L699.71,221.77L700.05,222.73L698.67,223.98L697.99,222.68L694.93,221.64L684.73,210.08L680.52,209.97L677.1,212.05L675.53,212.09L674.62,211.74L674.48,210.48L670.03,211.28L668.31,210.67L667.06,208.72L662.74,208.7L662.74,208.7L660.7,206.22L658.99,200.29L659.86,194.75L654.42,191.45L654.42,191.45L654.68,190.56L657.71,189.09L665.56,189.51L672.64,191.17L673.79,188.4L679.61,183.12L679.29,179.68L681.5,178.63L682.32,175.71L683.78,174.06L693.77,171.02L703.87,171.89L703.87,171.89L708.62,172.56L713.88,170.23L714.13,167.41z"
}, {
"id": "TR-14",
"title": "Bolu",
"d": "M270.92,55.58L275.94,56.29L275.94,56.29L278.01,63.18L278.06,66.6L282.81,66.48L285.9,71.19L284.94,76.9L284.94,76.9L281.67,77.48L280.38,78.55L280.2,80.13L281.72,81.95L281.6,83.25L273.76,85.72L271.7,87.19L270.48,91.01L272.88,94.49L271.99,96.38L269.07,96.73L267.26,94.85L263.86,94.36L261.01,94.86L258.04,97.25L251.93,97.02L245.66,98.3L239.38,97.53L238.73,95.03L237.74,94.35L230.41,95.62L226.1,94.96L217.68,104.37L213.59,106.88L213.59,106.88L211.59,106.07L206.93,107.27L206.93,107.27L202.25,95.55L202.25,95.55L203.05,93.73L202.76,87.7L209.49,87.95L215.16,86.75L217.48,84.5L215.62,81L217.09,78.56L217.09,78.56L223.7,79.44L228.29,78.75L231.24,74.22L232.5,70.24L238.79,67.45L239.75,59.9L239.75,59.9L244.46,58.1L252.1,58.06L255.34,59.59z"
}, {
"id": "TR-15",
"title": "Burdur",
"d": "M184.09,231.67L189.03,232.19L196.49,229.46L197.77,231.13L196.91,233.87L197.59,235.22L201.19,235.89L204.81,235.37L210.28,238.33L211.03,243.5L214.28,246.85L214.78,250.17L216.32,250.55L216.32,250.55L217.45,252.13L214.27,258.63L212.74,259.61L200.23,259.19L193.16,254.89L187.43,255.26L180.84,260.27L177.59,261.42L173.19,265.39L172.21,267.2L172.93,270.97L169.32,274.25L169.32,274.25L165.88,272.99L161.42,274.84L158.42,282.12L157.35,281.85L156.85,283.23L154.14,282.41L155.3,279.79L153,279.77L152.07,278.65L152.07,278.65L153.95,274.3L152.54,271.99L152.9,270.6L157.08,267.88L157.66,262.48L159.15,259.09L165.27,252.73L164.46,251.05L159.93,248.43L159.7,247.31L161.26,245.1L159.88,241.43L160.61,240.39L163.71,239.46L167.77,240.43L166.99,237.69L167.52,236.92L173.48,234.92L176.29,231.34L176.29,231.34z"
}, {
"id": "TR-16",
"title": "Bursa",
"d": "M119.51,84.47l-1.24,2.96l-0.24,-3L119.51,84.47zM156.01,84.99l4.47,0.88l10.38,-3.28l7.23,1.88l0,0l-0.49,2.69l0,0l-3.18,1.92l0.35,4.29l-1.81,1.94l-0.65,5.57l-1.53,1.66l0.44,3.39l-2.43,1.58l0.69,5.98l-1.22,1.22l0.2,1.34l2.34,2.54l-3.71,3.44l0,0l-5.11,0.31l-1.75,-1.57l-3.66,-1.28l-1.53,6.22l-4.36,3.88l-0.77,2.53l-2.89,2.14l-1.02,1.84l-8.42,-0.23l0,0l-8.3,-0.92l-0.91,-2.28l-1.42,0.05l-0.64,-5.77l-1.41,-0.34l-1.55,1.63l-2.71,0.74l-4.63,-2.66l-2.06,-2.51l-3.78,-0.27l-1.62,-1.12l-1.63,-2.37l0.04,-3.27l-1.89,-1.73l-0.46,-2.84l-1.39,-1.84l-0.08,-4.18l-1.91,-1.66l3.13,-5.41l-0.03,-2.14l-1.98,-3.08l0,0l15.35,-0.33L124,95.5l5.36,-1.77l7.6,2.06l3.25,-0.43l1.59,-2.95l2.46,-0.26l-2.93,-2.9l-2.28,-0.07l-2.29,1.08l0,0l0.63,-5.44l8.85,1.83l4.93,-1.76L156.01,84.99z"
}, {
"id": "TR-17",
"title": "Çanakkale",
"d": "M16.34,123.48l0.87,2.2l-1.06,0.68l-3.83,-1.96l0.01,-0.81L16.34,123.48zM11.69,102.27l1.14,1.08l-0.39,3.61l1.88,-0.72l-0.74,1.62l-10.49,2.16L0,108.23l0.26,-1.51l4.7,-3.04L11.69,102.27zM67.96,90.72l1.09,2.1l-1.19,0.65l0.91,1.54l4.66,2.66l4.17,1.11l0,0l0.71,1.58l-0.54,1.89l-3.07,2.2l-2.79,4.33l3.36,3.08l-0.12,3.36l2.53,4.3L77,125l-0.98,1.49l-4.99,2.95l-3.4,3.37l-6.42,-1.77l-2.91,0.23l-3.54,-1.88l-3.8,-0.43l-3.29,2.38l-4.38,0.99l-2.56,3.56l-0.28,3l0,0l-6.91,1.55l-4.05,1.55l-0.36,0.86l-3.35,-0.31l-1.94,1.28l-0.72,-0.6l-3.62,1.09l-2.68,-1.01l1.4,-6.12l1.34,-1.1l0.96,-2.66l-0.92,-5.46l0.98,-3.33l-1.15,-1.15l1.82,-8.17l0.74,-0.78l2.93,0.41l2.08,-0.87l1.86,-4.38l1.83,-1.01l-0.21,-4.25l5.18,-1.47l1.68,-2.94l1.39,-0.15l6.25,-6.6l6.49,-0.21l2.02,1.3l3.3,-0.49L59,91.13l2.68,-0.48l2.1,0.92l3.33,-2.14L67.96,90.72zM46.42,74.15l5.96,-0.28l3.1,1.05l-3.32,7.79l0.05,2.95l0,0l-9.46,4.83l-0.03,1.85l-2.46,0.98l-0.36,2.04l-1.76,2.33l-3.11,1.64l-3.69,3.75l-2.74,0.94l0.91,3.26l-3.6,3.19l-4.96,2.17l4.06,-8.13l0.42,-2.65l-2.14,-2.47l0.77,-0.8l-1.21,-0.79l4.64,-2.43l5.13,-4.13l6.26,-3.37l3.61,-0.21l2.17,-2.76l0.95,0.67l2.74,-2.02l-1.19,-3.83l-3.76,0.52l0,0L46.42,74.15z"
}, {
"id": "TR-18",
"title": "Çankırı",
"d": "M300.98,51.79L303.9,52.51L306.71,56.98L311.1,56.62L317.32,59.55L323.4,56.26L325.81,58.69L327.56,59.01L334.18,57.41L339.1,55.11L339.22,57.01L336.47,62.04L336.59,63.65L340.59,68.37L348.16,70.47L348.16,70.47L347.32,75.77L351.17,79.12L349.94,81.82L350.59,84.47L349.76,86.36L351.25,88.01L351.54,91.63L348.2,97.29L346.17,99.27L343.21,100.41L343.21,100.41L338.7,99.97L336.66,97.82L333,97.12L333,97.12L332.2,96.08L325.63,94.94L322.2,95.35L321.02,93.86L318.42,93.37L316.84,95.86L314.51,97.01L309.93,89.46L304.55,87.31L300.79,87.28L301.74,83.7L301.08,82.14L296.2,80.95L288.86,76.63L284.94,76.9L284.94,76.9L285.9,71.19L282.81,66.48L278.06,66.6L278.01,63.18L275.94,56.29L275.94,56.29L285.44,58.23L286.85,60.47L289.6,57.93L294.31,59.77L295.34,55.47L294.31,52.91L298.62,52.86L300.03,51.6z"
}, {
"id": "TR-19",
"title": "Çorum",
"d": "M384.07,43.11L383.93,45.57L386.69,51.46L384.6,55.17L386.48,56.51L390.29,56.95L390.29,56.95L390.26,59.16L387.15,61.6L389.7,64.86L386.73,70.42L387.11,73.81L390.97,76.75L394.94,75.61L400.68,76.02L400.5,79.71L405.08,80.8L407.49,85.03L406.91,87.09L405.3,88.22L405.29,89.93L403.37,90.73L404.02,92.64L402.68,95.46L404.72,96.97L402.34,100.98L402.34,100.98L398.8,102.05L396.66,104.65L394.23,102.76L393.05,103.17L395.22,106.66L393.16,108.42L395.18,111.96L394.29,113.42L383.65,114.21L383.34,111.88L382.49,111.34L378.89,115.16L373.67,115.46L370.92,116.67L368.27,116.09L366.54,114.31L364.83,113.91L360.98,116.65L359.84,118.54L354.87,117.92L351.28,119L350.88,117.2L350.88,117.2L351.16,116.3L348.44,111.97L348.99,109.45L347.98,106.92L348.65,104.62L344.71,103.25L343.21,100.41L343.21,100.41L346.17,99.27L348.2,97.29L351.54,91.63L351.25,88.01L349.76,86.36L350.59,84.47L349.94,81.82L351.17,79.12L347.32,75.77L348.16,70.47L348.16,70.47L354.63,68.83L357.87,61.24L360.26,60.05L358.86,56.53L356.67,55.52L353.92,55.88L353.53,50.25L358.04,46.67L358.31,44.39L360.88,44.92L361.13,46.49L363.59,44.28L363.59,44.28L365.63,43.25L368.96,45.25L370.19,48.07L372.57,49.63L375.14,49.76L377.81,47.63L380.7,47.57z"
}, {
"id": "TR-20",
"title": "Denizli",
"d": "M170.82,194.56L172.89,195.96L174.53,195.98L175.9,197.54L177.66,197.74L178.8,199.52L181.44,200.62L183.89,207.36L181.13,209.61L179.23,212.71L174.84,212.93L172.81,216.2L167.58,221.08L167.25,223.92L168.61,226.97L176.29,231.34L176.29,231.34L173.48,234.92L167.52,236.92L166.99,237.69L167.77,240.43L163.71,239.46L160.61,240.39L159.88,241.43L161.26,245.1L159.7,247.31L159.93,248.43L164.46,251.05L165.27,252.73L159.15,259.09L157.66,262.48L157.08,267.88L152.9,270.6L152.54,271.99L153.95,274.3L152.07,278.65L152.07,278.65L149.8,280.16L146.04,280.73L143.14,279.56L141.98,276.35L142.07,272.58L139.15,268.39L138.77,264.79L134.68,265.4L132.12,264.52L130.33,260.91L127.05,258.94L127.18,256.14L125.57,254L123.45,253.69L122.74,250.96L122.74,250.96L123.46,250.49L123.92,246.35L130.26,241.05L131.02,237.65L133.45,234.61L129.01,231.78L127.62,229.71L127.15,224.12L130.16,223.78L131.63,220.95L127.09,220.12L125.49,218.34L122.71,217.11L122.71,217.11L127.3,214.42L128.74,210.94L131.19,208.91L131.19,208.91L145.12,209.02L146.49,212.41L147.04,209.93L148.24,209.59L147.92,208.21L151.37,204.25L162.97,206.8L164.26,205.11L163.88,199.27z"
}, {
"id": "TR-21",
"title": "Diyarbakır",
"d": "M639.46,182.77L641.71,184.48L644.44,183.25L644,186.32L645.07,190.63L647.08,192.21L648.94,191.84L649.21,194.84L649.21,194.84L645.57,196.02L641.21,204.34L640.94,211.14L643.38,212.99L640.8,215.63L638.49,222.16L634.01,228.64L633.21,231.49L636.12,232.76L634.03,235.86L634.03,235.86L633,238.14L629.28,239.11L620.86,236.67L620.25,239.15L621.14,242.46L620.39,243.84L611.57,241.6L611.01,243.5L604.32,246.13L602.33,245.95L597.6,243.1L591.97,245.77L589.58,245.71L589.58,245.71L586.62,242.18L586.12,232.01L584.39,227.63L580.88,228.5L578.36,231.25L575.58,228.11L569.86,227.11L566.55,223.25L558.17,219.93L558.17,219.93L560.51,217.44L562.28,213.06L560.65,210.16L557.34,211.25L557.34,211.25L555.81,210.37L557.13,209.03L557.66,205.37L557.66,205.37L564.28,203.27L566.11,204.41L568.31,203.88L570.94,206.66L572.81,207.16L574.19,203.13L579.41,203.5L584.73,200.95L587.82,202.36L589.47,197.83L591.14,196.66L600.16,196.65L603.78,195.85L603.78,195.85L607.96,194.96L608.88,194L609.01,191.06L611.65,188.25L615.06,188.55L618.87,191.09L620.06,190.39L620.8,187.61L626.84,190.58L629.45,189.23L632.05,185.27z"
}, {
"id": "TR-81",
"title": "Düzce",
"d": "M233.31,54.23L234.99,60.09L237.51,60.59L239.75,59.9L239.75,59.9L238.79,67.45L232.5,70.24L231.24,74.22L228.29,78.75L223.7,79.44L217.09,78.56L217.09,78.56L218.48,75.76L214.63,73.82L214.29,72.72L214.76,70.74L216.7,68.96L215.26,66.81L212.75,66.98L212.23,65.99L213.68,63.88L216.31,63.41L219.22,61.08L221.27,58.23L219.69,56.84L219.69,56.84z"
}, {
"id": "TR-22",
"title": "Edirne",
"d": "M53.8,5.66L53.52,15.1L54.99,18.26L53.44,21.65L53.83,24.46L51.38,27.75L52.37,28.67L54.06,26.81L55.21,27.9L53.03,30.73L53.41,32.2L51.14,36.11L52.28,40.45L51.05,42.86L52.39,44.01L52.39,44.01L53.17,48.89L50.78,53.06L46.69,57.12L42.36,57.78L41.5,58.83L43.56,60.73L42.46,68.99L46.42,74.15L46.42,74.15L43.42,80.24L43.42,80.24L38.99,80.63L35.85,83.04L32.61,81.73L30.84,82.64L29.3,82.14L26.29,83.09L19.77,83.14L16.57,81.23L15.21,75.57L19,74.77L19.77,72L22.78,69.45L22.36,68.16L23.08,68.07L23.08,66.81L24.12,67.26L24.63,65.46L25.89,66.56L25.69,64.56L28.62,63.82L27.25,61.62L28.96,59.7L27.3,58.55L26.69,56.82L27.61,54.86L26.36,54.67L27.75,52.96L26.49,51.25L27.18,50.68L27.18,46.96L30.37,47.05L35.26,42.31L38,43.14L39.9,41.71L38.37,27.41L35.74,26.67L34.04,24.93L34.38,24.11L29.46,22.49L27.42,20.39L28.95,15.93L36.13,15.59L37.82,12.89L37.04,9.92L39.65,6.97L44.97,8.16L46.47,6.41L48.7,7.54L49.83,6.37z"
}, {
"id": "TR-23",
"title": "Elazığ",
"d": "M588.86,162.88L592.79,162.92L596.83,160.15L601.48,159.39L604.78,157.68L606.04,158.43L605.99,160.42L603.16,163.82L603.23,166.69L601.29,170.08L602.16,170.87L601.89,172.98L603.08,176.34L606.84,179.04L607.41,180.93L606.37,181.72L602.29,181.93L601.11,184.09L598.75,185.88L603.78,195.85L603.78,195.85L600.16,196.65L591.14,196.66L589.47,197.83L587.82,202.36L584.73,200.95L579.41,203.5L574.19,203.13L572.81,207.16L570.94,206.66L568.31,203.88L566.11,204.41L564.28,203.27L557.66,205.37L557.66,205.37L555.86,202.79L549.77,204.1L546.73,202.06L543.79,197.8L538.17,198.86L528.58,195.83L525.55,192.99L525.11,188.28L527.4,185.11L529.39,184.07L529.55,181.54L531.11,181.73L532.2,180.8L535.89,181.9L536.75,181.2L534.36,173.32L535.39,172.28L535.17,170.24L538.46,166.66L538.46,166.66L539.98,167.54L541.22,166.77L541.22,166.77L542.6,168.13L542.91,169.88L540.98,173.19L541.54,174.56L545.56,175.9L549.88,173.64L562.21,175.71L564.13,177.77L566.92,178.74L567.66,180.46L569.34,179.66L571.54,180.82L572.48,180.51L573.36,178.04L579.35,177.96L582.86,177L584.59,177.7L585.29,174.7L587.24,172.68L588.57,167.7L586.93,165.23z"
}, {
"id": "TR-24",
"title": "Erzincan",
"d": "M541.32,110.96L550.75,111.89L550.75,111.89L553.86,114.38L560.81,116.19L560.7,118.52L563.63,118.78L570.2,121.94L578.75,121.12L585.04,117.37L585.04,117.37L588.26,114.21L591.33,112.6L606.67,113.15L606.67,113.15L603.5,115.87L603.12,119.17L609.3,118.93L610.28,120.1L615.83,122.25L616.59,124.96L615.07,127.44L615.2,128.89L621.36,132.02L621.82,133.16L620.73,136.49L623.32,139.34L622.62,140.55L619.88,141.4L619.88,141.4L616.98,140.4L609.82,140.96L609.82,140.96L606.77,137.91L600.84,136.78L595.87,138.62L594.12,137.45L586.36,135.51L584.56,136.24L582.93,141.62L581.26,142.76L572.46,141.5L566.45,143.31L558.94,142.16L550.58,146.13L545.85,149.93L545.52,151.59L546.54,154.58L544.34,156.13L541.2,156.79L540.41,157.87L541.62,158.94L540.31,161.41L541.22,166.77L541.22,166.77L539.98,167.54L538.46,166.66L538.46,166.66L534.58,162.67L531.35,162.78L528.74,161.14L525.7,162.86L523.2,160.87L523.2,160.87L526.23,154.93L523.15,149.67L525.94,148.97L526.51,147.18L523.61,145.45L522.29,141.96L524.17,138.09L523.32,132.98L525.05,127.64L529.6,124.28L525.46,120.83L525.33,118.57L527.86,116.38L532.58,116.86L535.79,114.04L540.06,113.57z"
}, {
"id": "TR-25",
"title": "Erzurum",
"d": "M640.26,70.37L647.7,73.66L650.05,76.17L650.08,76.99L648.48,77.92L648.54,81.61L649.17,83.82L650.74,84.12L656.05,80.23L663.55,77.02L664.38,77.37L664.79,80.44L666.47,80.37L668.11,78.89L668.54,75.84L671.17,73.27L670.66,67.75L675.98,62.71L685.17,63.02L688.54,66.18L688.54,66.18L691.4,71.83L698.46,73.47L700.98,78.73L702.72,79.12L702.72,79.12L702.87,80.51L698.63,83.91L696.36,87.27L695.23,91.24L696.3,93.38L695.4,94.9L693.67,95.78L689.8,95.39L682.49,97.1L680.32,99.58L680.63,101.05L685.69,104.99L686.22,106.34L689.06,106.62L691.92,108.86L693.07,112.34L697.86,114.51L698.55,116.78L696.57,119.95L696.57,119.95L687.86,122.87L686.67,124.1L688.58,128.44L693.92,131.22L696.86,134.29L696.19,135.78L692.8,138.45L691.28,141.28L691.28,141.28L684.6,146.34L683.62,151.03L678.69,152.22L678.59,154.44L674.49,157.26L666.94,159.28L659.87,159.47L658.91,154.59L651.99,149.76L644.02,149.52L641.53,148.57L641.53,148.57L636.51,143.82L623.19,145.39L620.51,144.88L618.99,143.53L619.88,141.4L619.88,141.4L622.62,140.55L623.32,139.34L620.73,136.49L621.82,133.16L621.36,132.02L615.2,128.89L615.07,127.44L616.59,124.96L615.83,122.25L610.28,120.1L609.3,118.93L603.12,119.17L603.5,115.87L606.67,113.15L606.67,113.15L612.11,113.41L619.85,108.79L621.71,106.16L621.57,103.74L615.13,103.69L613.6,102.14L616.31,94.09L615.5,91.26L617.08,85.55L617.08,85.55L627.88,80.52L635.55,73.29z"
}, {
"id": "TR-26",
"title": "EskiÅŸehir",
"d": "M213.59,106.88L214.64,111.62L218.08,113.43L221.25,113.53L221.66,112.54L224.67,112.16L225.38,111.11L228.67,112.45L231.72,111.58L234.7,112.47L236.83,111.58L238.32,112.51L236.68,113.04L237.25,114.07L239.79,112.62L241.52,113.89L242.93,112.93L246.42,113.7L248.38,112.11L247.99,114.38L250.01,113.93L249.35,115.82L251.08,116.61L251.2,118.54L252.5,120.41L253.91,121.63L256.13,121.29L256.69,121.89L255.82,123.08L257.83,122.76L256.6,123.84L254.96,128.44L257.61,132.14L259,137.72L260.88,139.67L260.5,141.06L262.18,141.66L261.51,145.73L262.56,147.24L261.8,148.74L264.57,149.89L264.7,150.97L258.5,157.76L258.16,160.27L258.16,160.27L257.39,161.14L254.85,161.3L253.08,163.97L245.44,164.99L245.44,164.99L243.67,162.28L240.17,161.3L239.56,158.44L235.07,154.26L231.5,155.27L227.64,152.6L226.24,153.52L225.05,156.63L223.09,156.97L222.53,158.57L219.32,157.21L216.86,157.4L217.09,158.56L220.1,160.57L219.13,162.58L211.01,161.7L209.29,165.73L206.07,162.46L203.21,161.1L201.16,156.17L197.93,155.58L197.93,155.58L195.47,155.21L195.23,152.28L193.14,150.58L194.06,148.55L193.32,144.91L194.45,143.04L193.56,138.69L188.98,136.25L186.13,133.58L187.4,132.03L186.75,131.23L182.28,132.26L179.88,131.68L179.88,131.68L181.04,127.83L184.4,123.66L190.88,122.48L192.69,118.64L195.13,116.88L195.99,115.12L198.14,114.03L203.61,108.48L206.93,107.27L206.93,107.27L211.59,106.07z"
}, {
"id": "TR-27",
"title": "Gaziantep",
"d": "M492.58,245.69L494.37,246.53L498.7,245.18L500.39,247.03L507.98,247.29L513.61,249.68L513.61,249.68L512.75,250.73L511.64,250.01L508.99,250.36L504.88,255.14L505.41,256.09L504.33,256.58L503.46,259.32L505.19,261.56L503.54,261.29L503.25,262.31L505.07,265.75L504.43,269.41L506.62,270.83L509.19,270.23L508.71,273.72L510.33,274.93L510.24,276.86L511.98,279.16L511.21,281.61L511.21,281.61L507.68,282.29L501.14,285.87L495.97,285.88L491.9,288.34L491.9,288.34L490.38,285.16L488.43,284.3L484.54,284.73L483.05,284.08L482.18,280.26L481.08,279.13L473.67,277.27L472.42,273.1L470.51,272.66L468.96,273.09L466.36,276.33L462.3,278.22L460.06,283.35L460.06,283.35L454.77,281.61L454.77,281.61L452.48,278.18L447.97,276.8L446.37,273.65L446.37,273.65L455.6,262.69L455.6,262.69L458.12,262.32L458.76,260.65L461.15,259.78L464.79,255.98L467.51,257.25L470.6,260.72L473.51,261.01L478.21,254.94L488.12,253.86L487.88,251.58L490.31,251.36z"
}, {
"id": "TR-28",
"title": "Giresun",
"d": "M558.77,56.74L558.71,74.1L558.71,74.1L553.62,76.2L550.26,75.86L545.97,78.35L541.05,86.42L550.42,90.59L552.08,92.63L551.43,99.21L549.59,101.84L548.23,101.37L547.13,102.18L547.64,106.14L550.67,110L550.75,111.89L550.75,111.89L541.32,110.96L541.32,110.96L535.52,110.62L532.77,109.33L531.45,105.55L528.88,107.35L527.94,106.35L526.27,107.22L523.03,105.05L518.79,104.23L516.53,100.27L516.32,93.75L517.2,89.82L512.66,87.89L512.66,87.89L512.93,84.23L511.48,81.84L512.42,80.05L510.03,78.67L508.45,74.7L510.62,72.94L510.02,70.56L513.06,66.13L514.07,62.84L514.07,62.84L517.94,64.16L521.71,63.83L524.79,65.78L526.2,64.96L527.76,65.69L532.04,65.32L535.92,62.29L538.44,63.71L539.64,63.5L543.68,60.31L546.1,60.18L548.65,58.42L552.22,59.04z"
}, {
"id": "TR-29",
"title": "Gümüşhane",
"d": "M558.71,74.1L561.29,75.55L567.27,76.88L569.6,79.47L571.18,79.79L571.71,81.74L574.4,81.55L576.94,83.85L581.26,83.67L583.41,81.31L583.85,77.35L586.1,77.15L586.69,78.77L585.87,82.01L590.4,83.81L591.34,85.7L594.57,84.27L594.01,83.16L591.18,81.88L591.17,80.45L594.19,80.01L596.38,81.59L595.91,83.53L598.09,85.16L600.53,84.57L604.06,87.62L604.06,87.62L589.68,90.07L588.45,93.6L588.67,100.67L585.72,107.78L581.27,113.48L585.04,117.37L585.04,117.37L578.75,121.12L570.2,121.94L563.63,118.78L560.7,118.52L560.81,116.19L553.86,114.38L550.75,111.89L550.75,111.89L550.67,110L547.64,106.14L547.13,102.18L548.23,101.37L549.59,101.84L551.43,99.21L552.08,92.63L550.42,90.59L541.05,86.42L545.97,78.35L550.26,75.86L553.62,76.2z"
}, {
"id": "TR-30",
"title": "Hakkâri",
"d": "M736.31,232.72L741.01,233.76L748.63,231.57L754.4,232.12L759.56,230.83L762.33,232.22L763.59,234.76L769.15,235.28L771.13,233.78L774.89,234.06L776.8,233.05L776.8,233.05L781.07,232.58L783.83,235.23L784.18,236.64L781.73,239.69L783.64,241.82L782.25,249.81L784.52,250.77L785.41,252.97L788.06,253.49L788.74,255.36L791.38,257.06L791.89,258.9L789.6,261.13L790.67,265.5L789.58,264.19L786.09,264.18L784.54,263.02L777.65,269.1L772.57,270.7L773.32,271.73L771.83,272.95L771.4,274.64L768.59,273.06L767.59,270.02L765.82,267.97L767.49,264.71L769.56,264.36L769.29,260.23L767.66,258.34L763.42,256.24L759.28,256.57L759.02,255.92L757.97,257.51L756.44,257.82L754.78,261.33L752.02,261.45L751.25,262.94L750.2,261.14L745.5,260.78L743.46,261.61L740.33,259.54L737.94,260.35L731.25,255.96L731.25,255.96L731,248.34L729.08,244.58L735.01,237.93z"
}, {
"id": "TR-31",
"title": "Hatay",
"d": "M429.62,271.1L433.5,270.32L440.19,273.41L443.28,272.94L446.37,273.65L446.37,273.65L447.97,276.8L452.48,278.18L454.77,281.61L454.77,281.61L455.14,283.2L452.66,286.07L453.28,288.01L451.13,290.6L451.77,294.27L449.83,299.44L450.73,302.65L451.62,304.14L452.37,304.04L452.41,307.53L452.7,306.85L454.58,306.92L454.52,308.93L456.12,309.12L455.49,310.21L456.14,311.57L454.83,312.45L453.19,311.96L452.99,313.14L448.18,311.82L446.69,314.04L443.14,313.07L443.82,314.33L442.52,315.65L443.52,319.96L442.91,323.69L441.31,324.71L439.44,323.59L439.35,326.57L437.77,326.08L435.49,326.86L433.69,333.9L432.1,331.17L427.37,330.18L427.59,327.3L423.88,327.84L426.51,323.46L423.09,316.16L418.29,308.89L418.25,307.71L421.3,305.22L423.51,301.47L426.37,300.04L428.95,296.83L435.25,293.71L436.13,291.28L435.21,286.02L435.75,283.84L432.12,278.81L427.64,276.32L427.64,276.32L427.39,273.74z"
}, {
"id": "TR-33",
"title": "Mersin",
"d": "M378.11,248.9l0.7,3.67l6.09,7.11l0.08,1.23l-2.02,1.89l-0.02,1.54l2.19,1.27l0.92,2.32l1.69,0.01l3.01,1.78l1.35,6l0.68,6.76l-0.81,1.54l-2.84,-0.73l-1.29,1.71l-0.69,-0.67l-0.02,1.1l-2.74,-0.23l-0.16,0.96l-2.14,1.06l0,0l-1.6,-2.51l-4.33,-1.97l-4.51,0.05l-3.77,2.1l-5.46,5.34l-6.61,4.43l-4.18,5.66l-3.63,2.86l-0.24,4.66l-1.18,1.3l-1.48,-0.01l-1.95,3.22l-1.12,-2.77l-2.84,-1.52l-1.12,2.05l-1.06,0.1l-0.76,2.2l-4.13,2.97l-0.57,2.03l-1.49,-3.08l-2.29,0.95l-1.27,2.51l-3.9,-1.63l-2.78,1.54l-1.96,-1.33l-2.3,1.17l-6.1,-0.38l-2.83,3.48l-1.23,-1.25l-4.23,-0.49l-3.1,1.54l-2.91,2.87l-5.66,-1.4l-4.3,-2.87l0,0l1.84,-3.45l-0.76,-2.27l2.32,-6.31l-3.47,-10.46l0,0l4.68,0.11l8.81,3.31l5.4,0.89l5.63,-1.92l3.95,-3.63l-2.68,-3.21l-3.1,-1.9l-2.14,-3.46l0.55,-4.46l-1.53,-3.28l2.91,-1.21l1.91,1.67l3.16,-3.04l6.49,-1.42l3.28,0.23l2.76,-1.25l3.38,1.87l7.03,-4.1l0,0l7.89,-1.09l7.9,-2.78l1.48,-1.34l-0.22,-3l6.72,-2.06l7.58,-4.07l-1.54,-2.77l1.06,-2.14l0,0l3.35,-0.08L378.11,248.9z"
}, {
"id": "TR-76",
"title": "Iğdır",
"d": "M743.81,108.2L746.35,110.61L748.58,110.46L754.3,113.71L765.99,113.31L769.53,112.36L775.46,114.96L780.93,120.1L780.92,121.09L782.67,122.61L782.74,124.43L786.9,126.15L786.57,127.23L788.96,128.79L789.1,130.21L791.36,131.96L791.21,133.3L792,133.65L791.53,134.98L787.66,130.47L785.68,130.24L783.56,126.67L777.67,132.1L777.67,132.1L773.84,132.57L768.46,130.24L764.7,130.7L760.44,129.36L754.1,129.36L750.5,126.65L743.35,125.98L739.98,123.35L738.27,123.8L736.63,126.38L734.22,126.6L733.68,119.58L730.8,116.17L727.69,115.34L727.69,115.34L731.95,108.42L736.49,109.26L743.79,108.14L743.79,108.14z"
}, {
"id": "TR-32",
"title": "Isparta",
"d": "M184.09,231.67L186.24,227.34L186.04,223.81L189.17,219.83L193.19,217.98L200.02,210.43L205.47,209.07L211.4,205.32L214.49,199.98L218.19,198.31L221.3,195.28L226.87,194.4L229.41,196.4L231.28,199.36L232.57,199.15L232.57,199.15L233.47,202.22L236.06,205.52L241.24,209.86L244.22,210.93L245.23,213.75L244.93,217.84L241.92,220.06L241.41,222.74L238.19,225.18L237.81,228.32L239.69,232.85L239.66,234.78L239.4,235.56L236.07,236.75L235.02,238.42L236.14,244.18L234.84,249.39L234.84,249.39L226.65,250.48L222.54,253.59L218.96,250.6L216.32,250.55L216.32,250.55L214.78,250.17L214.28,246.85L211.03,243.5L210.28,238.33L204.81,235.37L201.19,235.89L197.59,235.22L196.91,233.87L197.77,231.13L196.49,229.46L189.03,232.19z"
}, {
"id": "TR-34",
"title": "Istanbul",
"d": "M149.16,48.24l13.17,3.21l0.97,-0.56l9.4,2.24l3.93,-0.05l0,0l0.09,2.6l-2.37,3.93l-1.63,0.55l-4.18,-0.92l-2.36,3.82l-3.88,-1l-3.13,0.58l-7.01,8.76l0,0l-1.03,-0.72l-2.56,0.6l1.22,-2.52l-5.9,-2.58l-1.44,-2.14L138.81,62l-0.64,-2.35l1.87,-1.48l0.64,-2.98l1.15,-0.78L140.88,53l0.69,-1.95l3.24,-2.5L149.16,48.24zM103.83,29.47l3.97,4.12l14.47,7.7l2.63,0.46l11.03,5.02l5.3,0.2l1.37,0.79l-0.02,1.47l-3.03,3.02l1.39,1.77l-3.64,6.48l-5.6,1.74l-0.73,0.96l-2.9,-1.3l-5.83,1.08l-1.03,-0.66l-0.32,-2.42l-0.93,-0.04l-1,1.8l-5.09,-3.12l-7.7,-1.98l-6.57,1.16l-3.11,1.77l0,0l-0.9,-1.97l0.17,-2.87l1.74,-3.51l-0.02,-2.43l2.39,-4.07L103.01,29l0,0L103.83,29.47z"
}, {
"id": "TR-35",
"title": "İzmir",
"d": "M42.91,192.53l1.13,0.69l0.46,3.64l-1.94,-1.1L42.91,192.53zM71.64,148.32l0.77,4.68l2.23,2.26l-0.6,4.13l3.03,8.11l-0.59,3.21l-1.56,1.55l-4.57,1.92l-2.06,-0.59l-5.27,2.76l0.34,1.32l-2.18,3.18l3.98,5.4l0.24,5.04l1.94,1.36l4.41,-0.34l1.85,0.98l1.11,2.37l2.9,-0.35l1.48,2.35l1.64,-0.26l1.55,1.51l2.78,0.34l2.03,4.02l2.69,0.08l0.8,1.34l1.13,-1.56l-0.45,-3.05l1.9,-0.41l1.43,1.19l4.04,-0.95l4.04,1.84l1.09,1.56l3.71,0.65l2.94,2.64l5.28,1.78l-0.42,3.66l2.47,2.96l0,0l-1.2,2.21l-3.43,-1.75l-3.05,0.98l-0.69,1.72l-1.94,1.47l-10.18,0.95l-11.81,3.62l-5.31,-2.74l-2.73,0.09l-3.48,2.26l-0.7,4.28l-2.82,2.22l-0.79,-2.37l-3.31,-1.46l0,0l0.27,-2.32l-1.33,-2.13l-4.55,-0.41l-6.23,-4.58l-3.15,0.51l-1.71,1.71l-1.71,-6.53l-2.41,-0.93l0.97,-1.29l-1.33,-1.17L40,210.47l-0.36,3.21l-0.74,-0.07l0.36,1.51l-0.9,0.38l-0.96,-2.05l-0.43,1.34l-1.18,-0.62l-0.61,-2.83l-5.19,-2.15l0.08,-1.89l-1.09,1.72l-1.22,0.08l-1.98,-1.97l-2.44,-0.34l0.14,-1.26l1.63,0.2l0.35,-1.67l0.92,0.15l-0.83,-2.56l3.64,3.16l0.51,-2.33l0.74,1.5l3.33,-2.79l-1.31,-2.71l1.63,1.44l1.09,-1.46l-3.38,-2.59l-1.78,1.57l0.81,-2.39l-2.12,-4.05l-0.29,-3.67l0.31,-0.98l2.33,-1.08l4.37,1.55l1.99,4.75l2.29,1.48l0.62,3.34l-2.21,-0.1l0.71,0.97l-0.87,1.37l1.37,0.46l2.42,5.6l1.19,-0.43l-1.16,-3.91l1.19,-1.94h1.26l1.23,3.29l1.49,0.61l9.19,-3.05l2.63,0.87l2.33,-2.31l1.12,0.02l-0.46,-1.34l-1.94,0.95l-1.39,-0.95l-5.21,1.57l-2.8,-3.52l-0.03,-1.62l-2.22,-1.17l0.7,-0.97l-3.74,-2.11l0.38,-1.29l-1.32,-0.34l0.83,-1.25l-1.01,-1.54l0.39,-2.25l3.69,-1.06l0.31,1.01l0.82,-0.55l1.58,0.99l0.5,-1.7l1.33,0.07l-1.9,-3.15l0.86,0.39l1.23,-0.98l0.25,1.65l1.03,-0.12l-0.17,-2.13l3.86,-1.18l-1.06,-1.34l0.84,-0.98l-0.56,-1.36l-1.36,1.5l-2.38,-1.47l-3.59,1.1l-2.74,-1.81l-0.06,-4.26l3.63,-2.31l-2.06,-3.42l-2.92,-1.31l0,0l2.64,-3.66l6.95,-2.23l3.16,-3.6l3.6,-1.1l3.18,0.94L71.64,148.32z"
}, {
"id": "TR-46",
"title": "KahramanmaraÅŸ",
"d": "M460.16,192.18L469.64,190.13L476.5,191.42L480.91,191.05L481.98,191.92L481.98,191.92L479.98,195.05L480.02,196.97L485.78,200.16L489.14,199.81L493.45,203.2L497.15,203.9L496.54,208.48L499.89,208.96L499.97,211.28L497.93,214.49L493.22,218.63L493.85,221.86L495.32,222.79L495.32,222.79L493.86,225.42L490.58,227.29L490.73,231.87L488.17,234.54L487.9,237.67L486.56,239.64L487.24,241.6L491.16,242.02L492.58,245.69L492.58,245.69L490.31,251.36L487.88,251.58L488.12,253.86L478.21,254.94L473.51,261.01L470.6,260.72L467.51,257.25L464.79,255.98L461.15,259.78L458.76,260.65L458.12,262.32L455.6,262.69L455.6,262.69L456.03,260.09L454.37,256.82L455.57,254.19L455.21,253.22L448.37,253.13L442.89,254.86L442.05,254.09L438.44,254.18L436.77,239.23L437.92,236.88L437.92,236.88L440.81,233.98L441.98,230.38L439.49,224.97L442.29,221L439.05,219.33L441.98,215.83L445.07,206.98L445.07,206.98L456.67,202.08L458.26,195.2z"
}, {
"id": "TR-78",
"title": "Karabük",
"d": "M297.73,29L297.7,30.25L298.97,31.16L301.65,29.83L302.82,30.82L304.13,30.16L305.66,30.65L305.46,33.6L307.34,34.7L307.8,36.83L307.62,39.76L306.44,41.88L303.68,42.31L301.29,44.75L300.25,47.68L300.98,51.79L300.98,51.79L300.03,51.6L298.62,52.86L294.31,52.91L295.34,55.47L294.31,59.77L289.6,57.93L286.85,60.47L285.44,58.23L275.94,56.29L275.94,56.29L270.92,55.58L270.92,55.58L269.21,50.8L270.91,45L272.94,43.21L272.94,43.21L278.24,44.63L282.1,41.83L284.53,42.84L286.87,41.52L288.98,43.04L290.3,39.94L288.54,35.04L288.91,33.75L294.6,31.33L295.69,29.39z"
}, {
"id": "TR-70",
"title": "Karaman",
"d": "M279.5,283.06L288.63,281.43L292.85,279.53L295.5,276.85L296.78,272.09L295.96,270.63L291.92,268.35L290.92,262.84L292.29,261.02L295.26,261.13L297.37,254.84L301.43,251.29L303.8,247.85L308.12,245.57L312,245.19L316.58,248.55L325.75,245.4L326.44,255.73L333.28,265.19L335.66,271.71L335.66,271.71L328.62,275.81L325.24,273.94L322.48,275.19L319.2,274.96L312.7,276.38L309.54,279.43L307.63,277.75L304.71,278.96L306.24,282.24L305.69,286.7L307.83,290.16L310.93,292.06L313.62,295.26L309.66,298.89L304.03,300.81L298.63,299.93L289.82,296.61L285.14,296.5L285.14,296.5L279.13,290.3L278.63,288.46z"
}, {
"id": "TR-36",
"title": "Kars",
"d": "M740.2,61.19L744.76,64.37L744.91,69.07L747.7,75.23L747.62,78.72L746.53,79.45L744.48,84.38L743.44,84.68L743.71,86.29L742.78,86L743.06,87L739.88,88.35L739.45,89.32L742.44,92.25L741.26,96.4L743.36,100.36L745.02,101.1L745.09,102.79L743.84,102.88L746.41,106.25L744.17,106.72L743.79,108.14L743.79,108.14L736.49,109.26L731.95,108.42L727.69,115.34L727.69,115.34L720.27,114.16L696.57,119.95L696.57,119.95L698.55,116.78L697.86,114.51L693.07,112.34L691.92,108.86L689.06,106.62L686.22,106.34L685.69,104.99L680.63,101.05L680.32,99.58L682.49,97.1L689.8,95.39L693.67,95.78L695.4,94.9L696.3,93.38L695.23,91.24L696.36,87.27L698.63,83.91L702.87,80.51L702.72,79.12L702.72,79.12L704.05,77.75L707.75,77.56L708.28,74.13L712.6,69.4L713.02,67.48L716.69,65.56L718.98,63.05L721.04,64.08L724.09,62.81L730.56,63.2L732.43,62.12L736.75,61.72L738.41,60.01L738.41,60.01z"
}, {
"id": "TR-37",
"title": "Kastamonu",
"d": "M319.17,4.97L335.77,7.29L346.93,6.92L354.58,8.59L354.58,8.59L354.59,10.24L356.4,11.86L357,14.56L355.82,17.47L360.73,17.7L362.31,21.14L367.17,22.17L369.6,24.07L368.16,29.65L364.58,32.7L365.51,35.62L362.57,41.58L363.59,44.28L363.59,44.28L361.13,46.49L360.88,44.92L358.31,44.39L358.04,46.67L353.53,50.25L353.92,55.88L356.67,55.52L358.86,56.53L360.26,60.05L357.87,61.24L354.63,68.83L348.16,70.47L348.16,70.47L340.59,68.37L336.59,63.65L336.47,62.04L339.22,57.01L339.1,55.11L334.18,57.41L327.56,59.01L325.81,58.69L323.4,56.26L317.32,59.55L311.1,56.62L306.71,56.98L303.9,52.51L300.98,51.79L300.98,51.79L300.25,47.68L301.29,44.75L303.68,42.31L306.44,41.88L307.62,39.76L307.8,36.83L307.34,34.7L305.46,33.6L305.66,30.65L304.13,30.16L302.82,30.82L301.65,29.83L298.97,31.16L297.7,30.25L297.73,29L297.73,29L300.94,20.8L299.45,20.03L297.13,21.19L294.56,21.24L293.57,19.77L294.42,17.48L292.88,16.38L292.27,14.25L292.27,14.25L298.63,13.2L315.66,5.34z"
}, {
"id": "TR-38",
"title": "Kayseri",
"d": "M419.76,153.07L426.92,156.17L427.95,158.78L429.87,159.9L431.66,162.59L435.82,162.71L442.4,161.03L451.5,161.68L457.36,160.76L461.5,162.5L464.15,164.74L466.12,170.08L463.01,173.02L461.02,176.74L460.4,181.73L456.75,184.97L460.16,192.18L460.16,192.18L458.26,195.2L456.67,202.08L445.07,206.98L445.07,206.98L438.6,200.49L433.48,202L429.83,206.98L427.31,213.51L420.73,215.98L416.38,220.68L413.1,222.09L411.81,231.44L410.58,233.51L403.45,233.08L402.18,231.39L400.86,231.73L395.42,229.83L395.42,229.83L397.26,224.03L396.96,214.19L394.56,212.46L388.9,211.92L387.68,207.24L384.37,204.79L382.32,201.71L382.32,201.71L383.29,198.93L388.26,196.7L392.93,190L389.08,180.88L385.74,179.03L388.71,172.08L389.32,167.73L389.32,167.73L393.47,166.06L393.75,169.57L394.57,170.15L399.86,168.09L405.63,163.92L404.22,160.24L405.31,158.57L415.59,157.19L417.65,156.13z"
}, {
"id": "TR-79",
"title": "Kilis",
"d": "M460.06,283.35L462.3,278.22L466.36,276.33L468.96,273.09L470.51,272.66L472.42,273.1L473.67,277.27L481.08,279.13L482.18,280.26L483.05,284.08L484.54,284.73L488.43,284.3L490.38,285.16L491.9,288.34L491.9,288.34L489.1,289.79L488.33,291.76L480.38,289.8L477.64,289.63L475.4,290.67L474.57,289.52L473.2,289.74L472.19,291.66L469.56,290.01L469.31,289L470.72,287.25L470.28,286.4L468.55,286.18L468.12,285.12L465.43,283.98z"
}, {
"id": "TR-71",
"title": "Kırıkkale",
"d": "M320.71,147.08L319.15,146.34L319.65,143.87L318.91,136.95L313.27,132.11L316.45,126.79L316.03,123.23L317.33,122.83L319.79,116.09L326.48,113.73L328.87,111.44L327.77,109.79L328.62,105.38L327.93,104.09L329.07,101.76L328.52,101.1L330.6,99.05L330.53,97.61L333,97.12L333,97.12L336.66,97.82L338.7,99.97L343.21,100.41L343.21,100.41L344.71,103.25L348.65,104.62L347.98,106.92L348.99,109.45L348.44,111.97L351.16,116.3L350.88,117.2L350.88,117.2L347.48,118.52L349.15,120.63L349.86,125.12L349.86,125.12L348.82,126.39L345.83,126.5L343.88,131.22L335.24,139.23L331.99,140.45L325.61,145.41z"
}, {
"id": "TR-39",
"title": "Kırklareli",
"d": "M65.51,0.31L67.29,0.43L69.07,2.54L70.31,2.65L71.46,5.52L74.69,8.09L76.36,8.08L78.5,11.11L79.06,9.29L80.72,9.11L81.02,8.09L83.07,8.3L84.16,7.07L89.81,8.73L89.13,6.6L90.46,5.69L90.65,6.31L90.81,5.52L92.95,7.36L95.64,6.4L97.64,6.94L98.86,12.3L96.42,12.11L95.82,15.36L98.39,21.01L100.86,24.08L100.16,24.76L100.66,26.19L102.52,28.39L102.52,28.39L100.87,28.25L100.5,29.58L92.09,34.57L88.55,34.96L82.2,37.29L80.04,39.15L78.38,45.54L75.51,48.5L72.34,49.65L67.51,45.88L66.41,42.87L64.66,41.57L57.68,42.54L54.63,41.94L52.39,44.01L52.39,44.01L51.05,42.86L52.28,40.45L51.14,36.11L53.41,32.2L53.03,30.73L55.21,27.9L54.06,26.81L52.37,28.67L51.38,27.75L53.83,24.46L53.44,21.65L54.99,18.26L53.52,15.1L53.8,5.66L53.8,5.66L54.44,3.71L56.24,2.68L56.19,1.3L58.01,0.66L63.53,2.51L63.5,1.29z"
}, {
"id": "TR-40",
"title": "Kırşehir",
"d": "M349.86,125.12L352.84,125.12L354.51,128.93L361.92,132.75L363.6,135.99L368.63,136.9L369.32,137.92L367.05,140.72L371.29,142.92L372.88,145.74L372.88,145.74L368.18,151.01L369.36,153.31L374.28,153.83L368.4,161.35L368.31,163.96L370.08,165.88L366.65,165.95L363.5,168.98L360.5,176.55L359.13,176.44L356.44,173.81L356.71,176.37L356.71,176.37L354.06,176.89L351.81,176.04L347.5,171.72L347.52,169.37L345.95,166.34L343.48,166.68L342.7,165.59L340.54,166.54L339.42,165.56L339.42,165.56L338.72,164.58L334.65,164.32L334.42,162.97L330.04,159.16L327.07,157.98L324.27,152.98L321.69,151.39L322.79,150.29L320.71,147.08L320.71,147.08L325.61,145.41L331.99,140.45L335.24,139.23L343.88,131.22L345.83,126.5L348.82,126.39z"
}, {
"id": "TR-41",
"title": "Kocaeli",
"d": "M191.5,49.87l3.16,1.28l0,0l-1.55,1.07l-2.76,4.8l0.53,1.56l-0.6,1.37l2.95,6.37l-1.4,2.56l-3.1,1.26l0.76,5.31l-3.21,1.38l-2.18,5.36l-6,2.29l0,0l-7.23,-1.88l-10.38,3.28l-4.47,-0.88l0,0l0.78,-1.69l-0.12,-5.87l0,0l2.46,-2.48l2.07,2.92l10.17,-2.33l4.4,0.82l0.96,-1.5l-1.04,-1.04l-5.47,1.1l-2.18,-1.69l-4.7,-0.6l-1.8,0.9l-3.35,-0.73l-4.24,1.47l-1.45,-0.45l-0.34,-2.44l0,0l7.01,-8.76l3.13,-0.58l3.88,1l2.36,-3.82l4.18,0.92l1.63,-0.55l2.37,-3.93l-0.09,-2.6l0,0l9.93,-0.18l1.85,-0.77l0.24,-1.46l1.55,-1.17L191.5,49.87z"
}, {
"id": "TR-42",
"title": "Konya",
"d": "M258.16,160.27L259.23,160.73L262.77,167.73L264.67,169.61L268.77,170.03L271.92,165.66L272.98,166.9L275.49,165.78L278.99,168.41L281.57,168.72L282.86,168.21L285.18,164.8L289.22,166.69L292.61,164.61L292.97,160.63L295.72,159.26L296.49,154.83L297.7,152.99L303.91,151.25L304.6,151.93L304.25,155.84L305.45,156.69L309.03,153.36L312.16,152.34L312.84,153.86L309.9,155.46L310.73,160.42L313,163.26L318.83,166.91L318.51,172.87L319.79,180.15L324.27,187.06L324.27,187.06L318.96,188.78L317.66,192.72L314.54,196.16L311.55,205.72L313.65,209.27L314.1,213.63L318.14,216.56L319.88,220.41L322.76,223.62L348.83,217.44L348.83,217.44L352.12,223L355.97,225.17L361.33,233.01L362.61,236.62L362.34,238.58L358.27,243.56L361.31,244.99L360.32,248.19L364.07,249.02L366.53,252.46L366.53,252.46L365.46,254.6L367.01,257.36L359.42,261.43L352.7,263.5L352.92,266.5L351.45,267.84L343.55,270.62L335.66,271.71L335.66,271.71L333.28,265.19L326.44,255.73L325.75,245.4L316.58,248.55L312,245.19L308.12,245.57L303.8,247.85L301.43,251.29L297.37,254.84L295.26,261.13L292.29,261.02L290.92,262.84L291.92,268.35L295.96,270.63L296.78,272.09L295.5,276.85L292.85,279.53L288.63,281.43L279.5,283.06L279.5,283.06L274.55,279.74L273.7,275.34L272.27,273.6L264.8,270.16L260.54,264.21L258.24,257.31L256.09,255.2L255.03,252.29L253.31,252.19L249.84,254.26L247.04,254.67L238.1,252.59L234.84,249.39L234.84,249.39L236.14,244.18L235.02,238.42L236.07,236.75L239.4,235.56L239.66,234.78L239.69,232.85L237.81,228.32L238.19,225.18L241.41,222.74L241.92,220.06L244.93,217.84L245.23,213.75L244.22,210.93L241.24,209.86L236.06,205.52L233.47,202.22L232.57,199.15L232.57,199.15L233.78,195.4L246.08,187.39L243.85,185.37L243.41,183.6L246.8,177.3L247.3,171.78L246.51,170.29L252.46,169.08L251.9,168.16L246.6,167.25L245.44,164.99L245.44,164.99L253.08,163.97L254.85,161.3L257.39,161.14z"
}, {
"id": "TR-43",
"title": "Kütahya",
"d": "M137.59,135.87L146.01,136.1L147.02,134.25L149.91,132.11L150.68,129.58L155.03,125.7L156.57,119.48L160.22,120.76L161.97,122.33L167.08,122.02L167.08,122.02L168.78,127.68L172.25,130.65L173.8,131.43L179.88,131.68L179.88,131.68L182.28,132.26L186.75,131.23L187.4,132.03L186.13,133.58L188.98,136.25L193.56,138.69L194.45,143.04L193.32,144.91L194.06,148.55L193.14,150.58L195.23,152.28L195.47,155.21L197.93,155.58L197.93,155.58L196.21,158.92L193.48,159.04L190.13,161.23L190.61,168.38L188.15,172.29L185.3,173.47L182.67,176.97L180.59,177.56L180.59,177.56L178.17,176.67L176.29,172.83L166.92,171.69L162.71,172.12L154.13,175.04L150.52,178.49L146.33,177L141.4,177.54L141.4,177.54L136.76,174.08L135.23,170.2L136.45,168.56L136.34,166.27L127.73,164.68L125.54,162.86L124,159.51L124,159.51L122.4,155.48L129.67,154.14L135.81,147.1L134.9,140.5L137.78,137.45z"
}, {
"id": "TR-44",
"title": "Malatya",
"d": "M523.2,160.87L525.7,162.86L528.74,161.14L531.35,162.78L534.58,162.67L538.46,166.66L538.46,166.66L535.17,170.24L535.39,172.28L534.36,173.32L536.75,181.2L535.89,181.9L532.2,180.8L531.11,181.73L529.55,181.54L529.39,184.07L527.4,185.11L525.11,188.28L525.55,192.99L528.58,195.83L538.17,198.86L543.79,197.8L546.73,202.06L549.77,204.1L555.86,202.79L557.66,205.37L557.66,205.37L557.13,209.03L555.81,210.37L557.34,211.25L557.34,211.25L552.22,214.81L551.77,216.19L543.31,219.58L536.39,214.83L534.34,214.44L533.63,213.31L527.74,210.43L523.65,210.7L522.23,211.24L520.59,213.52L513.39,216.26L513,217.35L514.35,219.18L515.06,222.49L511.05,226.22L506.37,227.12L501.98,226.18L499.94,227.31L498.9,224.82L495.74,225.54L496.18,223.72L495.32,222.79L495.32,222.79L493.85,221.86L493.22,218.63L497.93,214.49L499.97,211.28L499.89,208.96L496.54,208.48L497.15,203.9L493.45,203.2L489.14,199.81L485.78,200.16L480.02,196.97L479.98,195.05L481.98,191.92L481.98,191.92L484.36,189.84L485.77,184.9L492.12,181.57L488.13,176.41L490.54,172.14L488.29,167.94L488.65,167L500.58,168.93L501.66,167.38L500.15,164.46L501.41,163.02L507.17,164.25L516.82,164.11L520.72,161.37z"
}, {
"id": "TR-45",
"title": "Manisa",
"d": "M71.64,148.32L74.13,146.79L78.79,150.5L85.14,149.47L88.67,153.06L92.96,150.17L94.31,151.53L95.63,155.23L100.15,158.69L104.44,164.94L106.29,164.66L109.07,162.25L113.37,163.04L120.49,159.14L124,159.51L124,159.51L125.54,162.86L127.73,164.68L136.34,166.27L136.45,168.56L135.23,170.2L136.76,174.08L141.4,177.54L141.4,177.54L138.9,183.02L135.33,185.08L132.71,185.28L131.66,186.64L129.74,198.64L126.98,203.18L131.19,208.91L131.19,208.91L128.74,210.94L127.3,214.42L122.71,217.11L122.71,217.11L117.75,215L117.75,215L115.28,212.04L115.7,208.38L110.42,206.6L107.48,203.96L103.76,203.31L102.68,201.75L98.64,199.91L94.6,200.86L93.17,199.67L91.27,200.08L91.71,203.13L90.59,204.69L89.79,203.36L87.1,203.28L85.07,199.25L82.29,198.92L80.74,197.4L79.1,197.66L77.62,195.31L74.72,195.66L73.61,193.29L71.75,192.31L67.34,192.65L65.4,191.28L65.16,186.24L61.18,180.83L63.36,177.65L63.02,176.34L68.29,173.58L70.35,174.17L74.92,172.25L76.48,170.7L77.07,167.49L74.04,159.38L74.64,155.25L72.41,152.99z"
}, {
"id": "TR-47",
"title": "Mardin",
"d": "M634.03,235.86L637.34,247.21L648.76,246.22L655.09,243.12L659.39,239.37L665.41,238.81L667.57,236.94L667.57,236.94L668.06,240.06L670.78,243.17L669.04,244.8L668.57,246.73L665.74,247.77L659.65,248.15L658.81,249.7L657.51,260.33L658,261.41L659.93,260.74L661.03,264.23L660.66,266.96L660.66,266.96L654.77,268.85L645.05,268.83L642.96,269.7L640.79,268.02L630.27,266.13L627.21,267.39L624.39,266.36L614.82,271.37L609.71,272.18L607.57,274.75L602.34,277.59L602.34,277.59L601.78,275.28L599.6,273.68L598.93,269.15L596.73,265.73L596.56,263.97L594.98,264.13L593.27,262.42L592.84,259.11L590.25,252.83L590.04,250.13L591.25,248.48L589.58,245.71L589.58,245.71L591.97,245.77L597.6,243.1L602.33,245.95L604.32,246.13L611.01,243.5L611.57,241.6L620.39,243.84L621.14,242.46L620.25,239.15L620.86,236.67L629.28,239.11L633,238.14z"
}, {
"id": "TR-48",
"title": "MuÄŸla",
"d": "M72.29,251.37l0.68,-3.81l2.59,-1.97l3.01,-0.48l4.28,1.81l2.62,-0.16l2.98,2.65l5,-0.87l7.36,0.58l5.33,-4.28l0.67,2.07l9.13,0.37l5.47,3.93l1.34,-0.24l0,0l0.72,2.73l2.12,0.31l1.61,2.14l-0.14,2.8l3.28,1.97l1.79,3.61l2.56,0.88l4.09,-0.61l0.38,3.59l2.92,4.19l-0.08,3.78l1.15,3.21l2.9,1.17l3.75,-0.58l2.28,-1.51l0,0l0.93,1.12l2.3,0.02l-1.17,2.62l2.71,0.82l0.51,-1.38l1.07,0.27l3,-7.28l4.46,-1.85l3.44,1.26l0,0l1.6,1.35l0.53,2.24l-2.39,4.18l0.02,6.16l-1.29,3.22l-3.88,2.45l-2.16,3.75l-2.29,2.03l-5.13,0.3l-3.11,1.68l0.46,2.36l-0.88,0.38l0.12,3.42l-1.99,1.36l0,0l-1.79,-1.77l-2.45,-0.65l-1.05,-0.9l0.36,-0.92l-1.95,-0.55l1.3,-1.41l-0.24,-2.38l-0.96,-0.66l0.97,-1.21l0.01,-2.19l-1.38,-0.36l-0.22,-0.91l-1.53,0.51v0.87l-1.66,-0.28l1.39,-0.86l-0.17,-2.97l1.46,0.26l0.07,-1.61l1,0.59l-0.55,0.74l1.13,-0.27l0.26,-1.11l-1.05,-1.52l-1.72,-0.29l-1.46,-1.74l-0.98,0.3l-2.76,-2.36l-1.31,2.92l-1.41,0.16l0.17,1.32l-0.75,0.44l0.68,1.31l0.45,-0.62l1.16,0.43l-2.48,2.62l-0.91,-1.94l1.1,-0.56l-1.39,-1.11l-0.99,0.43l0.46,-0.96l-0.79,-0.92l-2.54,-0.89l-2.24,0.66l-0.9,-1.59l-1.24,1l0.26,-1.3l-0.69,-0.34l1.07,-1.06l-0.84,-0.46l0.7,-0.7l-1.82,-1.94l-1.51,-0.7l-0.57,2.3l-0.71,-0.75l-0.75,0.43l-0.03,-1.53l-1.6,0.28l-0.2,-3.28l-3.13,1.61l0.33,0.77l1.61,-0.11l-1,2.39l-3.66,-1.48v1.05l-1.6,-0.01l-0.37,-1.06l1.94,-0.43l-1.85,-1.32l-1.31,2.35l2.85,3.84l-2.13,-0.06l-1.29,2.07l-2.49,0.32l-2.47,4.73l-1.27,-0.17l-2,1.66l-0.45,-0.76l-1.17,1.37l-0.83,-2.71l3.99,0.15l1.37,-2.03l-0.57,-0.86l-1.17,0.28l0.73,-1.22l-1.21,-0.83l-0.68,1.09l-2.44,-0.49l3.65,-2.18l1.76,-0.35l0.16,1.07l1.15,-0.95l-1.78,-1.34l1.88,-2.38l-2,0.08l-0.79,1.6l-4.55,0.53l-0.86,0.87l-8.33,-1.02l-1.7,1.89l-0.55,3.22L79,289.2l-3.99,1.57l-4.76,-1.64l-0.04,-1.25l2.42,-0.2l0.41,-1.88l7.35,-0.74l1.36,-2.4l2.54,1.29l4.83,-1.39l9.37,0.65l0.48,-2.03l-2.19,0.03l0.78,-0.38l-0.96,-0.55l2.34,-1.06l-0.19,-1.19l-1.46,-0.46l1.17,-0.25l-0.88,-0.84l3.06,-0.79l2.63,0.83l0.12,1.01l-0.17,-2.11l1.81,-0.22l0.41,-2.25l1.41,0.5l-0.14,-0.77l3.49,-1.35l-0.24,-1.12l-9.22,0.89l0.59,0.93l-0.68,0.23l-0.38,-0.87l-4.66,-0.18l-1.28,0.8l-2.27,-0.64l-5.46,2l-3.03,-0.7l-1.95,1.25L79,273.31l-0.38,0.98l-1.92,-0.94l-1.54,0.33l-2.42,-2.65l-0.44,0.95l-0.69,-0.62l-0.84,1.61l0.22,-1.5l-2.13,0.68l-1.13,3.04l-1.65,-0.4l-1.55,-4.91l2.8,-2.77l-1.59,-0.02l-0.07,-0.89l0.84,-0.57l1.6,1.24l0.47,-2.23l0.88,1.47l0.83,-1.3l1.04,0.56l-0.06,1.31l1.75,-0.43l1.67,2.45l2.73,-2.43l1.79,-0.41L77.65,265l-0.44,-2.03l1.56,-1l0.75,0.62l-0.53,1.09l0.61,-0.23l-0.63,-1.67l1.57,-3.32l-2.34,0.11l-1.42,2.58l-0.96,-0.53l1.08,-1.04l-0.62,-1.13l-2.18,1.48l1.67,-3.68L74.79,255l-1.25,2.24l-2.26,-1.06l-0.25,-1.72l2.03,-1.3L72.29,251.37z"
}, {
"id": "TR-49",
"title": "MuÅŸ",
"d": "M691.28,141.28L694.78,144.89L696.33,148.95L699.77,148.89L700.32,152.3L704.47,161.45L703.66,165.45L703.87,171.89L703.87,171.89L693.77,171.02L683.78,174.06L682.32,175.71L681.5,178.63L679.29,179.68L679.61,183.12L673.79,188.4L672.64,191.17L665.56,189.51L657.71,189.09L654.68,190.56L654.42,191.45L654.42,191.45L652.34,194.28L649.21,194.84L649.21,194.84L648.94,191.84L647.08,192.21L645.07,190.63L644,186.32L644.44,183.25L641.71,184.48L639.46,182.77L639.46,182.77L638.88,176.6L639.65,171.02L642.31,167.85L646.88,165.92L647.56,164.37L646.99,162.41L643.49,160.41L639.67,153.77L639.8,150.83L641.53,148.57L641.53,148.57L644.02,149.52L651.99,149.76L658.91,154.59L659.87,159.47L666.94,159.28L674.49,157.26L678.59,154.44L678.69,152.22L683.62,151.03L684.6,146.34z"
}, {
"id": "TR-50",
"title": "NevÅŸehir",
"d": "M372.88,145.74L373.46,147.39L376.65,148.82L382.01,149.65L385.78,152.7L386.49,155.07L385.78,157.16L387.45,160.82L387.38,164.21L389.32,167.73L389.32,167.73L388.71,172.08L385.74,179.03L389.08,180.88L392.93,190L388.26,196.7L383.29,198.93L382.32,201.71L382.32,201.71L376.96,201.44L373.5,203.99L371.7,204.06L367.72,202.25L365.93,198.82L365.93,198.82L364.33,197.28L363.89,193.54L360.96,189.05L356.43,186.63L356.05,184.03L357.57,181.22L357.78,177.33L356.71,176.37L356.71,176.37L356.44,173.81L359.13,176.44L360.5,176.55L363.5,168.98L366.65,165.95L370.08,165.88L368.31,163.96L368.4,161.35L374.28,153.83L369.36,153.31L368.18,151.01z"
}, {
"id": "TR-51",
"title": "NiÄŸde",
"d": "M365.93,198.82L367.72,202.25L371.7,204.06L373.5,203.99L376.96,201.44L382.32,201.71L382.32,201.71L384.37,204.79L387.68,207.24L388.9,211.92L394.56,212.46L396.96,214.19L397.26,224.03L395.42,229.83L395.42,229.83L390.89,232.54L387.6,237.54L382.55,236.93L380.99,243.99L379.98,245.35L380.74,246.81L378.11,248.9L378.11,248.9L369.88,252.37L366.53,252.46L366.53,252.46L364.07,249.02L360.32,248.19L361.31,244.99L358.27,243.56L362.34,238.58L362.61,236.62L361.33,233.01L355.97,225.17L352.12,223L348.83,217.44L348.83,217.44L352.19,214.12L356.57,213.02L358.67,211.42L362.04,206.44L362.83,200.63z"
}, {
"id": "TR-52",
"title": "Ordu",
"d": "M476.94,52.92L480.82,52.9L481,54.08L485.16,55.22L491.04,59.63L493.89,58.22L496.93,53.42L497.78,54.55L501.27,54.46L500.88,57.47L502.09,59.34L504.62,60.11L505.02,61.51L514.07,62.84L514.07,62.84L513.06,66.13L510.02,70.56L510.62,72.94L508.45,74.7L510.03,78.67L512.42,80.05L511.48,81.84L512.93,84.23L512.66,87.89L512.66,87.89L510.71,89.46L507.7,89.79L507.09,91.95L503.39,95.43L501.35,94.07L499.7,95.44L495.43,94.63L495.43,94.63L496.33,92.57L493.7,91.03L495.6,88.12L495.24,87.22L490.42,85.85L484.18,85.94L477.42,79.75L475.73,79.11L475.43,77.98L472.96,76.94L468.9,78.27L466.63,76.63L464.28,76.73L463.44,75.69L463.38,73L458.57,71.41L458.31,69.97L456.44,68.78L456.44,68.78L456.7,67.38L461.59,64.7L462.76,62.79L466.7,62.59L467.97,61.63L469.79,59.46L469.2,57.04L470.93,55.39L474.06,55.52L475.71,52.93L475.71,52.93z"
}, {
"id": "TR-80",
"title": "Osmaniye",
"d": "M437.92,236.88L436.77,239.23L438.44,254.18L442.05,254.09L442.89,254.86L448.37,253.13L455.21,253.22L455.57,254.19L454.37,256.82L456.03,260.09L455.6,262.69L455.6,262.69L446.37,273.65L446.37,273.65L443.28,272.94L440.19,273.41L433.5,270.32L429.62,271.1L429.62,271.1L430.87,262L428.53,251.42L429,247.04L430.29,242.91L432.44,239.69z"
}, {
"id": "TR-53",
"title": "Rize",
"d": "M644.93,42.31L646.24,44.59L646.44,47.44L652.17,55.15L649.46,56.91L644.71,62.32L643.9,65.41L640.26,70.37L640.26,70.37L635.55,73.29L627.88,80.52L617.08,85.55L617.08,85.55L612.78,86.68L612.78,86.68L611.3,82.42L613.98,77.61L610.77,72.69L611.77,68.26L609.7,66.23L609.42,63.31L605.85,62.07L605.85,62.07L608.54,59.44L613.31,58.56L614.99,59.38L622.18,56.23L625.9,52.07L628.91,50.89L631.31,51.2L636.34,49.13z"
}, {
"id": "TR-54",
"title": "Sakarya",
"d": "M205.1,53.76L210.56,56.1L219.69,56.84L219.69,56.84L221.27,58.23L219.22,61.08L216.31,63.41L213.68,63.88L212.23,65.99L212.75,66.98L215.26,66.81L216.7,68.96L214.76,70.74L214.29,72.72L214.63,73.82L218.48,75.76L217.09,78.56L217.09,78.56L215.62,81L217.48,84.5L215.16,86.75L209.49,87.95L202.76,87.7L203.05,93.73L202.25,95.55L202.25,95.55L200.29,95.69L198.54,93.88L195.19,95.42L193.24,94.3L189.07,95.74L186.67,95.27L184.54,93.87L182.86,90.94L181.38,92.5L180.34,92.21L177.6,87.16L177.6,87.16L178.09,84.47L178.09,84.47L184.09,82.17L186.27,76.82L189.48,75.44L188.72,70.13L191.83,68.87L193.23,66.31L190.28,59.94L190.88,58.58L190.35,57.01L193.12,52.21L194.66,51.14L194.66,51.14z"
}, {
"id": "TR-55",
"title": "Samsun",
"d": "M426.16,20.5l4.05,3.2l1.87,2.83l0.87,9.14l4.28,5.6l4.18,2.36l0.26,1.67l1.89,1.69l2.68,0.45l3.68,-1.68l4.47,-6.23l0.98,1.14l7.86,1.49l5.22,3.07l1.28,1.48l0.39,3.89l5.57,2.34l0,0l-1.65,2.59l-3.13,-0.13l-1.72,1.65l0.59,2.41l-1.82,2.17l-1.27,0.97l-3.94,0.19l-1.17,1.92l-4.89,2.67l-0.26,1.41l0,0l-1.94,-1.5l-2.53,0.09l-3.43,1.41l-1.58,-0.31l-2.73,1.64l0,0l-4.72,-1.91l1.65,-1.91l-0.29,-1.1l-5.52,-2.03l-0.98,2.09l-1.26,0.45l-1.65,4.96l-6.92,-2.83l-5.08,1.21l-1.49,-1.45l-4.31,-0.17l-0.8,-1.05l0.34,-1.69l-3.05,-1.53l-1.58,-3.81l-1.37,1.02l-0.56,-1.24l-1.44,1.05l-2.75,-1.45l-5.42,0.91l-1.64,-2.08l-5.1,-0.63l0,0l-3.81,-0.44l-1.88,-1.34l2.08,-3.71l-2.75,-5.89l0.14,-2.45l0,0l6.97,-3.81l0.91,3.49l2.11,1.44l0.15,2.05l4.8,1.92l2,-0.65l1.22,-1.87l-0.56,-3.73l1.76,-0.38l3.31,1.38L406,36.12l-4.32,-2.11l-1.34,-4.27l1.92,-3.96l1.78,-1.53l0,0l3.47,1.8l4.38,-0.13L426.16,20.5z"
}, {
"id": "TR-63",
"title": "Şanlıurfa",
"d": "M558.17,219.93L566.55,223.25L569.86,227.11L575.58,228.11L578.36,231.25L580.88,228.5L584.39,227.63L586.12,232.01L586.62,242.18L589.58,245.71L589.58,245.71L591.25,248.48L590.04,250.13L590.25,252.83L592.84,259.11L593.27,262.42L594.98,264.13L596.56,263.97L596.73,265.73L598.93,269.15L599.6,273.68L601.78,275.28L602.34,277.59L602.34,277.59L600.22,279.28L595.41,280.38L594.06,281.86L585.31,285.5L560.14,290.01L552.37,287.91L540.61,288L532.87,280.98L526.05,277.99L520.16,276.89L511.66,280.18L511.21,281.61L511.21,281.61L511.98,279.16L510.24,276.86L510.33,274.93L508.71,273.72L509.19,270.23L506.62,270.83L504.43,269.41L505.07,265.75L503.25,262.31L503.54,261.29L505.19,261.56L503.46,259.32L504.33,256.58L505.41,256.09L504.88,255.14L508.99,250.36L511.64,250.01L512.75,250.73L513.61,249.68L513.61,249.68L517.42,251.74L518.28,249.65L520.25,249.99L521.34,248.27L528.2,247.75L530.27,246.67L536.98,240.81L545.26,239.12L543.84,237.09L546.51,236.56L547.76,235.72L547.98,234.29L549.68,233.75L549.63,231.16L547.13,231.21L548.37,230L550.5,230.03L551.07,226.96L550.31,226.26L552.53,225.31L553.85,221.67L555.13,220.54z"
}, {
"id": "TR-56",
"title": "Siirt",
"d": "M662.74,208.7L667.06,208.72L668.31,210.67L670.03,211.28L674.48,210.48L674.62,211.74L675.53,212.09L677.1,212.05L680.52,209.97L684.73,210.08L694.93,221.64L697.99,222.68L698.67,223.98L700.05,222.73L699.71,221.77L701.96,220.87L702.63,219.71L702.63,219.71L705.6,223.48L707.46,224.43L709.4,229.38L711.1,230.69L711.1,230.69L711.34,238.27L705.98,236.31L701.18,236.05L696.6,233.55L694.92,234.11L688.09,240.4L685.61,241.46L682.26,241.42L680.52,240.07L677.56,241.35L674.47,240.11L671.06,240.43L667.57,236.94L667.57,236.94L665.39,235.47L663.07,235.95L658.02,234.27L656.76,232.02L647.27,224.78L647.77,222.77L652.91,217.81L659.49,215.09z"
}, {
"id": "TR-57",
"title": "Sinop",
"d": "M384.3,0.67L386.65,0.78L388.17,2.63L387.91,3.61L389.38,4.45L393.93,3.68L394.65,5.14L392.1,4.59L390.06,7.59L389.84,10.2L391.44,13.74L394.48,16.69L394.51,18.5L397.45,21.53L404.04,24.25L404.04,24.25L402.27,25.78L400.35,29.74L401.68,34.01L406,36.12L406.74,42.94L403.42,41.56L401.67,41.95L402.23,45.67L401.01,47.55L399.01,48.2L394.21,46.28L394.06,44.23L391.95,42.79L391.04,39.31L384.07,43.11L384.07,43.11L380.7,47.57L377.81,47.63L375.14,49.76L372.57,49.63L370.19,48.07L368.96,45.25L365.63,43.25L363.59,44.28L363.59,44.28L362.57,41.58L365.51,35.62L364.58,32.7L368.16,29.65L369.6,24.07L367.17,22.17L362.31,21.14L360.73,17.7L355.82,17.47L357,14.56L356.4,11.86L354.59,10.24L354.58,8.59L354.58,8.59L359.27,8.83L364.95,7.13L367.16,8.69L377.08,8.61L382.12,4.68L383.91,1.72L383.72,0.53z"
}, {
"id": "TR-73",
"title": "Şırnak",
"d": "M711.1,230.69L715.72,232.06L719.02,234.64L728.5,236.24L730.85,235.73L733.72,232.57L736.31,232.72L736.31,232.72L735.01,237.93L729.08,244.58L731,248.34L731.25,255.96L731.25,255.96L730.35,255.9L729.41,257.22L726.56,255.03L721.6,253.56L717.77,254.61L715.05,256.76L709.96,255.11L709.59,253.76L708.19,253.18L705.48,256.68L703.86,256.83L704.19,257.99L700.92,261.63L699.48,265.23L694.89,265.65L690.06,267.52L688.68,263.38L689.55,260.81L687.14,258.28L683.91,258.39L684.76,256.74L684.15,256.4L676.88,263.48L666.89,266.26L660.66,266.96L660.66,266.96L661.03,264.23L659.93,260.74L658,261.41L657.51,260.33L658.81,249.7L659.65,248.15L665.74,247.77L668.57,246.73L669.04,244.8L670.78,243.17L668.06,240.06L667.57,236.94L667.57,236.94L667.57,236.94L667.57,236.94L671.06,240.43L674.47,240.11L677.56,241.35L680.52,240.07L682.26,241.42L685.61,241.46L688.09,240.4L694.92,234.11L696.6,233.55L701.18,236.05L705.98,236.31L711.34,238.27z"
}, {
"id": "TR-58",
"title": "Sivas",
"d": "M512.66,87.89L517.2,89.82L516.32,93.75L516.53,100.27L518.79,104.23L523.03,105.05L526.27,107.22L527.94,106.35L528.88,107.35L531.45,105.55L532.77,109.33L535.52,110.62L541.32,110.96L541.32,110.96L540.06,113.57L535.79,114.04L532.58,116.86L527.86,116.38L525.33,118.57L525.46,120.83L529.6,124.28L525.05,127.64L523.32,132.98L524.17,138.09L522.29,141.96L523.61,145.45L526.51,147.18L525.94,148.97L523.15,149.67L526.23,154.93L523.2,160.87L523.2,160.87L520.72,161.37L516.82,164.11L507.17,164.25L501.41,163.02L500.15,164.46L501.66,167.38L500.58,168.93L488.65,167L488.29,167.94L490.54,172.14L488.13,176.41L492.12,181.57L485.77,184.9L484.36,189.84L481.98,191.92L481.98,191.92L480.91,191.05L476.5,191.42L469.64,190.13L460.16,192.18L460.16,192.18L456.75,184.97L460.4,181.73L461.02,176.74L463.01,173.02L466.12,170.08L464.15,164.74L461.5,162.5L457.36,160.76L451.5,161.68L442.4,161.03L435.82,162.71L431.66,162.59L429.87,159.9L427.95,158.78L426.92,156.17L419.76,153.07L419.76,153.07L423.31,148.09L424.1,141.35L427.3,140.1L429.81,141.28L431.78,140.94L436.07,136.56L435.3,131.07L431.8,126.9L432.42,122.28L428.96,120.91L428.77,117.75L428.77,117.75L431.54,119.92L433.1,120.09L433.91,117.27L435.79,116.29L448.94,116.6L453.46,114.98L454.91,112.99L455.66,107.29L457.28,106.71L458.91,103.59L460.83,102.62L470.26,102.42L472.15,103.73L478.24,103.27L480.11,104.34L482.63,104.3L483.91,105.59L485.72,105.46L486.09,103.13L491.5,100.9L490.89,99.61L493.63,97.53L495.43,94.63L495.43,94.63L499.7,95.44L501.35,94.07L503.39,95.43L507.09,91.95L507.7,89.79L510.71,89.46z"
}, {
"id": "TR-59",
"title": "TekirdaÄŸ",
"d": "M52.39,44.01L54.63,41.94L57.68,42.54L64.66,41.57L66.41,42.87L67.51,45.88L72.34,49.65L75.51,48.5L78.38,45.54L80.04,39.15L82.2,37.29L88.55,34.96L92.09,34.57L100.5,29.58L100.87,28.25L102.52,28.39L102.52,28.39L103.01,29L103.01,29L99.86,44.65L97.47,48.72L97.49,51.15L95.74,54.66L95.58,57.53L96.47,59.49L96.47,59.49L94.92,62.8L91.57,62.71L86.49,60.02L76.48,62.25L74.69,65.68L74.09,69.27L69.49,73.59L67.58,77.44L62.61,81.12L57.04,82.69L54.94,84.99L52.22,85.67L52.22,85.67L52.17,82.72L55.49,74.92L52.38,73.87L46.42,74.15L46.42,74.15L42.46,68.99L43.56,60.73L41.5,58.83L42.36,57.78L46.69,57.12L50.78,53.06L53.17,48.89z"
}, {
"id": "TR-60",
"title": "Tokat",
"d": "M444.23,70.11L446.96,68.47L448.54,68.78L451.98,67.37L454.5,67.28L456.44,68.78L456.44,68.78L458.31,69.97L458.57,71.41L463.38,73L463.44,75.69L464.28,76.73L466.63,76.63L468.9,78.27L472.96,76.94L475.43,77.98L475.73,79.11L477.42,79.75L484.18,85.94L490.42,85.85L495.24,87.22L495.6,88.12L493.7,91.03L496.33,92.57L495.43,94.63L495.43,94.63L493.63,97.53L490.89,99.61L491.5,100.9L486.09,103.13L485.72,105.46L483.91,105.59L482.63,104.3L480.11,104.34L478.24,103.27L472.15,103.73L470.26,102.42L460.83,102.62L458.91,103.59L457.28,106.71L455.66,107.29L454.91,112.99L453.46,114.98L448.94,116.6L435.79,116.29L433.91,117.27L433.1,120.09L431.54,119.92L428.77,117.75L428.77,117.75L427.23,116.27L426.44,109.95L418.82,109.67L414.42,110.62L412.92,109.6L408.4,109.01L408.26,105.9L405.52,103.63L405.06,100.49L405.06,100.49L409.83,97.44L414.6,96.36L417.07,94.69L417.24,92.98L419.78,91.36L420.85,88.27L426.44,87.98L428.09,88.85L428,89.79L431.82,91.2L432.98,89.57L438.42,87.08L439.3,84.88L441.34,83.2L438.66,82.76L438.38,81.49L444,81.05L445.09,79.04L444.85,76.59L448.1,73.67L444.73,71.88z"
}, {
"id": "TR-61",
"title": "Trabzon",
"d": "M569.31,55.3L571.55,55.86L574.95,59.53L578.09,61.01L581.15,60.24L585.64,61.66L587.43,63.34L594.34,63.13L597.75,65.59L602.27,64.74L605.85,62.07L605.85,62.07L609.42,63.31L609.7,66.23L611.77,68.26L610.77,72.69L613.98,77.61L611.3,82.42L612.78,86.68L612.78,86.68L604.06,87.62L604.06,87.62L600.53,84.57L598.09,85.16L595.91,83.53L596.38,81.59L594.19,80.01L591.17,80.45L591.18,81.88L594.01,83.16L594.57,84.27L591.34,85.7L590.4,83.81L585.87,82.01L586.69,78.77L586.1,77.15L583.85,77.35L583.41,81.31L581.26,83.67L576.94,83.85L574.4,81.55L571.71,81.74L571.18,79.79L569.6,79.47L567.27,76.88L561.29,75.55L558.71,74.1L558.71,74.1L558.77,56.74L558.77,56.74L562.92,58.15L568.68,54.96z"
}, {
"id": "TR-62",
"title": "Tunceli",
"d": "M541.22,166.77L540.31,161.41L541.62,158.94L540.41,157.87L541.2,156.79L544.34,156.13L546.54,154.58L545.52,151.59L545.85,149.93L550.58,146.13L558.94,142.16L566.45,143.31L572.46,141.5L581.26,142.76L582.93,141.62L584.56,136.24L586.36,135.51L594.12,137.45L595.87,138.62L600.84,136.78L606.77,137.91L609.82,140.96L609.82,140.96L599.85,149.65L592.29,149.13L593.48,153.38L590.85,155.66L588.86,162.88L588.86,162.88L586.93,165.23L588.57,167.7L587.24,172.68L585.29,174.7L584.59,177.7L582.86,177L579.35,177.96L573.36,178.04L572.48,180.51L571.54,180.82L569.34,179.66L567.66,180.46L566.92,178.74L564.13,177.77L562.21,175.71L549.88,173.64L545.56,175.9L541.54,174.56L540.98,173.19L542.91,169.88L542.6,168.13z"
}, {
"id": "TR-64",
"title": "UÅŸak",
"d": "M141.4,177.54L146.33,177L150.52,178.49L154.13,175.04L162.71,172.12L166.92,171.69L176.29,172.83L178.17,176.67L180.59,177.56L180.59,177.56L179.99,180.14L176.06,183.52L177.06,187.54L175.51,188.43L170.82,194.56L170.82,194.56L163.88,199.27L164.26,205.11L162.97,206.8L151.37,204.25L147.92,208.21L148.24,209.59L147.04,209.93L146.49,212.41L145.12,209.02L131.19,208.91L131.19,208.91L126.98,203.18L129.74,198.64L131.66,186.64L132.71,185.28L135.33,185.08L138.9,183.02z"
}, {
"id": "TR-65",
"title": "Van",
"d": "M759.68,148.95L761.35,150.84L761.54,152.77L762.49,153.18L761.73,154.85L762.22,157.51L765.08,159.04L767.02,161.36L767.47,163.39L766.17,164.56L766.95,167.28L765.28,168.83L766.43,171.06L766.06,171.88L767.25,172.8L766.93,174.21L768.39,176.26L770.62,176.89L771.19,178.54L768.96,183.47L769.82,185.43L769.37,186.98L771.51,188.66L770.99,193.23L771.65,195.57L770.73,197.6L771.39,199.52L770.72,200.37L771.46,201.49L773.09,201.34L773.92,202.22L776.73,200.79L777.33,202.17L779.34,203.07L778.71,205.01L774.77,207.81L774.34,213.28L772.66,213.98L773.36,215.52L771.77,215.75L770.93,218.85L768.25,222.92L768.66,224.04L767.47,226.87L769.26,227.94L771.46,227.47L774.37,228.2L774.62,230.39L775.87,231.57L776.83,231.1L776.8,233.05L776.8,233.05L774.89,234.06L771.13,233.78L769.15,235.28L763.59,234.76L762.33,232.22L759.56,230.83L754.4,232.12L748.63,231.57L741.01,233.76L736.31,232.72L736.31,232.72L733.72,232.57L730.85,235.73L728.5,236.24L719.02,234.64L715.72,232.06L711.1,230.69L711.1,230.69L709.4,229.38L707.46,224.43L705.6,223.48L702.63,219.71L702.63,219.71L704.49,209.58L704.08,207.17L702.42,205.91L702.41,204.7L707.06,201.49L707.42,195.34L713.89,185.67L717.93,181.92L723.6,178.54L725.81,175.36L725.62,173.91L720.52,171.61L719.49,169.22L716.36,166.67L716.36,166.67L719.51,161.08L723.57,157.8L723.74,149.83L728.43,148.44L733.83,148.81L739.05,154.42L743.35,156.69L746.59,157.1L749.84,154.23L752.85,149.36L759.66,148.28L759.66,148.28z"
}, {
"id": "TR-77",
"title": "Yalova",
"d": "M155.46,77.77L156.68,77.44L156.68,77.44L156.8,83.3L156.01,84.99L156.01,84.99L151.17,84.9L146.24,86.66L137.39,84.83L136.76,90.27L136.76,90.27L128.85,87.05L128.83,86.07L137.58,80.2L149.26,79.41L152.12,78.6L153.58,77.09z"
}, {
"id": "TR-66",
"title": "Yozgat",
"d": "M405.06,100.49L405.52,103.63L408.26,105.9L408.4,109.01L412.92,109.6L414.42,110.62L418.82,109.67L426.44,109.95L427.23,116.27L428.77,117.75L428.77,117.75L428.96,120.91L432.42,122.28L431.8,126.9L435.3,131.07L436.07,136.56L431.78,140.94L429.81,141.28L427.3,140.1L424.1,141.35L423.31,148.09L419.76,153.07L419.76,153.07L417.65,156.13L415.59,157.19L405.31,158.57L404.22,160.24L405.63,163.92L399.86,168.09L394.57,170.15L393.75,169.57L393.47,166.06L389.32,167.73L389.32,167.73L387.38,164.21L387.45,160.82L385.78,157.16L386.49,155.07L385.78,152.7L382.01,149.65L376.65,148.82L373.46,147.39L372.88,145.74L372.88,145.74L371.29,142.92L367.05,140.72L369.32,137.92L368.63,136.9L363.6,135.99L361.92,132.75L354.51,128.93L352.84,125.12L349.86,125.12L349.86,125.12L349.15,120.63L347.48,118.52L350.88,117.2L350.88,117.2L351.28,119L354.87,117.92L359.84,118.54L360.98,116.65L364.83,113.91L366.54,114.31L368.27,116.09L370.92,116.67L373.67,115.46L378.89,115.16L382.49,111.34L383.34,111.88L383.65,114.21L394.29,113.42L395.18,111.96L393.16,108.42L395.22,106.66L393.05,103.17L394.23,102.76L396.66,104.65L398.8,102.05L402.34,100.98L402.34,100.98z"
}, {
"id": "TR-67",
"title": "Zonguldak",
"d": "M267.39,28.08L269.8,31.98L272.62,32.42L272.6,35.3L274.5,37.53L274.5,39.9L272.94,43.21L272.94,43.21L270.91,45L269.21,50.8L270.92,55.58L270.92,55.58L255.34,59.59L252.1,58.06L244.46,58.1L239.75,59.9L239.75,59.9L237.51,60.59L234.99,60.09L233.31,54.23L233.31,54.23L237.46,49.31L238.01,45.76L236.84,44.81L237.1,43.56L245.94,40.08L256.54,32.94L262.14,30.7L263.96,28.99z"
}]
}
}
};
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 1.3.8
*
*/
(function(e) {
e.fn.extend({
slimScroll: function(f) {
var a = e.extend({
width: "auto",
height: "250px",
size: "7px",
color: "#000",
position: "right",
distance: "1px",
start: "top",
opacity: .4,
alwaysVisible: !1,
disableFadeOut: !1,
railVisible: !1,
railColor: "#333",
railOpacity: .2,
railDraggable: !0,
railClass: "slimScrollRail",
barClass: "slimScrollBar",
wrapperClass: "slimScrollDiv",
allowPageScroll: !1,
wheelStep: 20,
touchScrollStep: 200,
borderRadius: "7px",
railBorderRadius: "7px"
}, f);
this.each(function() {
function v(d) {
if (r) {
d = d || window.event;
var c = 0;
d.wheelDelta && (c = -d.wheelDelta / 120);
d.detail && (c = d.detail / 3);
e(d.target || d.srcTarget || d.srcElement).closest("." + a.wrapperClass).is(b.parent()) && n(c, !0);
d.preventDefault && !k && d.preventDefault();
k || (d.returnValue = !1)
}
}
function n(d, g, e) {
k = !1;
var f = b.outerHeight() - c.outerHeight();
g && (g = parseInt(c.css("top")) + d * parseInt(a.wheelStep) / 100 * c.outerHeight(), g = Math.min(Math.max(g, 0), f), g = 0 < d ? Math.ceil(g) : Math.floor(g), c.css({
top: g + "px"
}));
l = parseInt(c.css("top")) / (b.outerHeight() - c.outerHeight());
g =
l * (b[0].scrollHeight - b.outerHeight());
e && (g = d, d = g / b[0].scrollHeight * b.outerHeight(), d = Math.min(Math.max(d, 0), f), c.css({
top: d + "px"
}));
b.scrollTop(g);
b.trigger("slimscrolling", ~~g);
w();
p()
}
function x() {
u = Math.max(b.outerHeight() / b[0].scrollHeight * b.outerHeight(), 30);
c.css({
height: u + "px"
});
var a = u == b.outerHeight() ? "none" : "block";
c.css({
display: a
})
}
function w() {
x();
clearTimeout(B);
l == ~~l ? (k = a.allowPageScroll, C != l && b.trigger("slimscroll", 0 == ~~l ? "top" : "bottom")) : k = !1;
C = l;
u >= b.outerHeight() ? k = !0 : (c.stop(!0, !0).fadeIn("fast"), a.railVisible && m.stop(!0, !0).fadeIn("fast"))
}
function p() {
a.alwaysVisible || (B = setTimeout(function() {
a.disableFadeOut && r || y || z || (c.fadeOut("slow"), m.fadeOut("slow"))
}, 1E3))
}
var r, y, z, B, A, u, l, C, k = !1,
b = e(this);
if (b.parent().hasClass(a.wrapperClass)) {
var q = b.scrollTop(),
c = b.siblings("." + a.barClass),
m = b.siblings("." + a.railClass);
x();
if (e.isPlainObject(f)) {
if ("height" in f && "auto" == f.height) {
b.parent().css("height", "auto");
b.css("height", "auto");
var h = b.parent().parent().height();
b.parent().css("height",
h);
b.css("height", h)
} else "height" in f && (h = f.height, b.parent().css("height", h), b.css("height", h));
if ("scrollTo" in f) q = parseInt(a.scrollTo);
else if ("scrollBy" in f) q += parseInt(a.scrollBy);
else if ("destroy" in f) {
c.remove();
m.remove();
b.unwrap();
return
}
n(q, !1, !0)
}
} else if (!(e.isPlainObject(f) && "destroy" in f)) {
a.height = "auto" == a.height ? b.parent().height() : a.height;
q = e("<div></div>").addClass(a.wrapperClass).css({
position: "relative",
overflow: "hidden",
width: a.width,
height: a.height
});
b.css({
overflow: "hidden",
width: a.width,
height: a.height
});
var m = e("<div></div>").addClass(a.railClass).css({
width: a.size,
height: "100%",
position: "absolute",
top: 0,
display: a.alwaysVisible && a.railVisible ? "block" : "none",
"border-radius": a.railBorderRadius,
background: a.railColor,
opacity: a.railOpacity,
zIndex: 90
}),
c = e("<div></div>").addClass(a.barClass).css({
background: a.color,
width: a.size,
position: "absolute",
top: 0,
opacity: a.opacity,
display: a.alwaysVisible ? "block" : "none",
"border-radius": a.borderRadius,
BorderRadius: a.borderRadius,
MozBorderRadius: a.borderRadius,
WebkitBorderRadius: a.borderRadius,
zIndex: 99
}),
h = "right" == a.position ? {
right: a.distance
} : {
left: a.distance
};
m.css(h);
c.css(h);
b.wrap(q);
b.parent().append(c);
b.parent().append(m);
a.railDraggable && c.bind("mousedown", function(a) {
var b = e(document);
z = !0;
t = parseFloat(c.css("top"));
pageY = a.pageY;
b.bind("mousemove.slimscroll", function(a) {
currTop = t + a.pageY - pageY;
c.css("top", currTop);
n(0, c.position().top, !1)
});
b.bind("mouseup.slimscroll", function(a) {
z = !1;
p();
b.unbind(".slimscroll")
});
return !1
}).bind("selectstart.slimscroll",
function(a) {
a.stopPropagation();
a.preventDefault();
return !1
});
m.hover(function() {
w()
}, function() {
p()
});
c.hover(function() {
y = !0
}, function() {
y = !1
});
b.hover(function() {
r = !0;
w();
p()
}, function() {
r = !1;
p()
});
b.bind("touchstart", function(a, b) {
a.originalEvent.touches.length && (A = a.originalEvent.touches[0].pageY)
});
b.bind("touchmove", function(b) {
k || b.originalEvent.preventDefault();
b.originalEvent.touches.length && (n((A - b.originalEvent.touches[0].pageY) / a.touchScrollStep, !0), A = b.originalEvent.touches[0].pageY)
});
x();
"bottom" === a.start ? (c.css({
top: b.outerHeight() - c.outerHeight()
}), n(0, !0)) : "top" !== a.start && (n(e(a.start).position().top, null, !0), a.alwaysVisible || c.hide());
window.addEventListener ? (this.addEventListener("DOMMouseScroll", v, !1), this.addEventListener("mousewheel", v, !1)) : document.attachEvent("onmousewheel", v)
}
});
return this
}
});
e.fn.extend({
slimscroll: e.fn.slimScroll
})
})(jQuery);
var Config = function() {
var t = {
topCityPlates: [34, 35, 6, 16, 1, 7, 21]
};
return t.apiBaseUrl = "//static-referandum.ntv.com.tr/election/", t.apiCdnBaseUrl = "//cdn.referandum.ntv.com.tr/election/", t.yesPID = 28, t.noPID = 29, t.parties = [], t.parties[t.yesPID] = {
id: t.yesPID,
title: "EVET",
class: "yes",
color: "#d91a2d"
}, t.parties[t.noPID] = {
id: t.noPID,
title: "HAYIR",
class: "no",
color: "#286ca3"
}, t.parties[1] = {
id: 1,
title: "AK PARTİ",
class: "akp",
color: "#fbb402"
}, t.parties[2] = {
id: 2,
title: "CHP",
class: "chp",
color: "#da261d"
}, t.parties[3] = {
id: 3,
title: "MHP",
class: "mhp",
color: "#3498db"
}, t.parties[4] = {
id: 4,
title: "HDP",
class: "hdp",
color: "#4fc449"
}, t.parties[0] = {
id: 0,
title: "DİĞER",
class: "other",
color: "#666666"
}, t.services = {
cities: {
delay: 2e4,
delayEmpty: 1e4,
url: "GetCitiesResult"
},
generalResult: {
delay: 2e4,
delayEmpty: 1e4,
url: "GetGeneralResult"
},
news: {
delay: 1e4,
delayEmpty: 2e3,
url: "GetNews/{{page}}"
},
district: {
delay: 2e4,
delayEmpty: 1e4,
url: "GetDistrictResult/{{plate}}"
}
}, t.elections = {
e201704: {
title: "16 Nisan 2017 Referandumu",
slug: "2017"
},
e201511: {
title: "1 Kasım 2015 Seçimleri",
slug: "20152"
},
e201506: {
title: "7 Haziran 2015 Referandumu",
slug: "20151"
},
e201404: {
title: "10 Ağustos 2014 C.Başkanlığı",
slug: "2014"
},
e201009: {
title: "12 Eylül 2010 Referandumu",
slug: "2010"
}
}, t.currentElection = t.elections.e201704, t.pastElection = t.elections.e201511, t.dataPublishDate = new Date(2017, 3, 15, 12, 0, 0, 0), t.apiVersion = 1, t.lastUpdateDate = null, t.selectedCity = null, t.getPartyById = function(e) {
return t.parties[e] ? t.parties[e] : t.parties[0]
}, t.checkApiVersion = function(e) {
e > t.apiVersion && (t.apiVersion = e, EventManager.trigger("versionchange", e))
}, t
}(),
Mapper = function() {
var t = {};
return t.checkPublishDate = function() {
var t = new Date;
return Config.dataPublishDate.getTime() > t.getTime()
}, t.map = function(e, a) {
var o = Array.isArray(e) ? [] : {},
i = Array.isArray(e),
l = i ? e : [e];
return _.each(l, function(e) {
if ("CityModel" == a) {
var i = [];
_.each(e.pv, function(e) {
var e = {
id: e.pi,
title: e.pn,
class: Config.getPartyById(e.pi).class,
perc: FormatUtils.parseFloat(e.pvp),
count: e.vc
};
t.checkPublishDate() && (e.perc = 0, e.count = 0), i.push(e)
}), o.push({
id: e.pn,
locationId: e.li,
name: e.ln,
slug: FormatUtils.slugify(e.ln),
totalBoxCount: e.tbc,
totalVoterCount: e.tvc,
openedBoxCount: e.obc,
openedBoxPer: FormatUtils.parseFloat(e.obp),
usedVoteCount: e.uvc,
acceptedVoteCount: e.avc,
plate: e.pn,
votes: i,
state: 0 == i[0].perc && 0 == i[1].perc ? 0 : 1,
participationRate: FormatUtils.parseFloat(e.uvp)
})
}
if ("DistrictModel" == a) {
var i = [];
_.each(e.pv, function(e) {
var e = {
id: e.pi,
title: e.pn,
class: Config.getPartyById(e.pi).class,
perc: FormatUtils.parseFloat(e.pvp),
count: e.vc
};
t.checkPublishDate() && (e.perc = 0, e.count = 0), i.push(e)
}), o.push({
id: e.li,
locationId: e.li,
name: e.ln,
slug: FormatUtils.slugify(e.ln),
totalBoxCount: e.tbc,
totalVoterCount: e.tvc,
openedBoxCount: e.obc,
openedBoxPer: FormatUtils.parseFloat(e.obp),
usedVoteCount: e.uvc,
acceptedVoteCount: e.avc,
votes: i,
participationRate: FormatUtils.parseFloat(e.uvp)
})
}
if ("ResultModel" == a) {
var i = [],
l = _.find(e.data, function(t) {
return "TÜRKİYE" === t.ln
});
_.each(l.pv, function(e) {
var e = {
title: e.pn,
class: Config.getPartyById(e.pi).class,
perc: FormatUtils.parseFloat(e.pvp),
count: e.vc
};
t.checkPublishDate() && (e.perc = 0, e.count = 0), i.push(e)
}), o = {
name: l.ln,
acceptedVoteCount: l.avc,
usedVoteCount: l.uvc,
totalBoxCount: l.tbc,
openedBoxCount: l.obc,
updateDate: e.updateDate,
openedBoxPer: FormatUtils.parseFloat(l.obp),
votes: i,
diffVote: Math.abs(i[0].count - i[1].count),
totalVoterCount: l.tvc,
participationRate: FormatUtils.parseFloat(l.uvp),
state: 0 == i[0].perc && 0 == i[1].perc ? 0 : 1
}, Config.lastUpdateDate = e.updateDate
}
if ("NewsModel" == a) {
var s = "news";
switch (e.type) {
case "Video":
s = "video-play";
break;
case "News":
s = "news";
break;
case "Photo":
s = "photo-gallery"
}
o.push({
title: e.title,
mainArt: e.mainArt,
link: e.link,
type: e.type,
typeClass: s,
publishDate: e.publishDate
})
}
}), o
}, t
}();
var CalcUtils = function() {
var e = {};
return e.comparePercent = function(e, t) {
return 0 == e ? 0 : e > t ? 100 : Math.floor(e / t * 100)
}, e.getMostVotedPartyColor = function(e) {
for (var t = {
perc: 0
}, r = 0; r < e.length; r++) e[r].perc > t.perc && (t = e[r]);
return 0 == t.perc ? "#e7e7e7" : Config.parties[t.id].color
}, e.getMostVotedParty = function(e) {
for (var t = {
perc: 0,
class: "empty"
}, r = 0; r < e.length; r++) e[r].perc > t.perc && (t = e[r]);
return t
}, e
}(),
TemplateUtils = function() {
var e = {};
return e.templateLoader = {
load: function(e, t) {
var r = [];
$.each(e, function(e, t) {
window[t] ? r.push($.get("app/Templates/" + t + ".html", function(e) {
window[t].prototype.template = _.template(e)
}, "html")) : console.log(t + " not found")
}), $.when.apply(null, r).done(t)
}
}, e
}(),
SvgUtils = function() {
var e = {},
t = document.createElementNS("http://www.w3.org/2000/svg", "filter");
t.setAttribute("id", "dropshadow"), t.setAttribute("x", "0"), t.setAttribute("y", "0");
var r = document.createElementNS("http://www.w3.org/2000/svg", "feGaussianBlur");
r.setAttribute("in", "SourceAlpha"), r.setAttribute("stdDeviation", "0.5");
var n = document.createElementNS("http://www.w3.org/2000/svg", "feOffset");
n.setAttribute("dx", "0"), n.setAttribute("dy", "1"), n.setAttribute("result", "offsetblur");
var o = document.createElementNS("http://www.w3.org/2000/svg", "feComponentTransfer"),
a = document.createElementNS("http://www.w3.org/2000/svg", "feFuncA");
a.setAttribute("type", "linear"), a.setAttribute("slope", "0.4"), o.appendChild(a);
var s = document.createElementNS("http://www.w3.org/2000/svg", "feMerge"),
l = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode");
return s.appendChild(l), l = document.createElementNS("http://www.w3.org/2000/svg", "feMergeNode"), l.setAttribute("in", "SourceGraphic"), s.appendChild(l), t.appendChild(r), t.appendChild(n), t.appendChild(o), t.appendChild(s), e.changeColor = function(e, r) {
var n = r.getSVGDocument().querySelectorAll(".cls-1"),
o = r.getSVGDocument().querySelector("defs");
for (o.appendChild(t), i = 0; i < n.length; i++) n[i].setAttribute("style", "fill:" + e + ";fill-rule:evenodd;"), n[i].setAttribute("filter", "url(#dropshadow)")
}, e
}(),
FormatUtils = function() {
var e = {};
return e.formatNumber = function(e) {
return e ? e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".") : "0"
}, e.roundNumber = function(e, t) {
var r = Math.pow(10, t || 0);
return Math.round(e * r) / r
}, e.floorNumber = function(e) {
return e ? Math.round(10 * e) / 10 : "0"
}, e.toCamelCase = function(t) {
var r = t.split(" "),
n = 0,
i = "";
for (n = 0; n < r.length; n++) i += r[n].charAt(0).toUpperCase() + e.toLowerCase(r[n].slice(1)) + " ";
return i
}, e.toLowerCase = function(e) {
var t = {
"İ": "i",
I: "ı",
"Åž": "ÅŸ",
"Äž": "ÄŸ",
"Ü": "ü",
"Ö": "ö",
"Ç": "ç"
};
return e = e.replace(/(([İIŞĞÜÇÖ]))/g, function(e) {
return t[e]
}), e.toLowerCase()
}, e.toUpperCase = function(e) {
var t = {
i: "İ",
"ı": "I",
"ÅŸ": "Åž",
"ÄŸ": "Äž",
"ü": "Ü",
"ö": "Ö",
"ç": "Ç"
};
return e = e.replace(/(([iışğüçö]))/g, function(e) {
return t[e]
}), e.toUpperCase()
}, e.toLowerCaseGlobal = function(e) {
var t = {
"İ": "i",
I: "i",
"Åž": "s",
"Äž": "g",
"Ü": "u",
"Ö": "o",
"Ç": "c"
};
return e = e.replace(/(([İIŞĞÜÇÖ]))/g, function(e) {
return t[e]
}), e.toLowerCase()
}, e.getEven = function(e) {
return parseInt(e)
}, e.getOdd = function(e) {
return parseFloat(e).toFixed(2).toString().split(".")[1]
}, e.padNumber = function(e, t) {
for (var r = e + ""; r.length < t;) r = "0" + r;
return r
}, e.isFloat = function(e) {
return !0
}, e.slugify = function(t) {
return t = e.toLowerCaseGlobal(t), t.toString().replace(/\s+/g, "-").replace(/\-\-+/g, "-").replace(/^-+/, "").replace(/-+$/, "")
}, e.getTime = function(e) {
if (!e) return "";
var t = e.split("T"),
r = t[1].split(":");
return r[0] + ":" + r[1]
}, e.parseFloat = function(e) {
return null == e || "" == e ? 0 : parseFloat(e.replace(",", ".")).toFixed(2)
}, e.compareDates = function(e, t) {
if (!e) return !0;
if (!t) return !1;
var r = new Date(e),
n = new Date(t);
return r.getTime() < n.getTime()
}, e
}(),
AnimateUtils = function() {
var e = {};
return e.animateMe = function(e) {
$(e).find(".animated").each(function() {
var e = this,
t = $(e).data("animate");
if ("style" == t.type && t.params.forEach(function(t) {
$(e)[t.prop](t.value)
}), "numeric" == t.type) {
if (0 == t.params.goal) return void $(this).text(t.params.scheme.replace("%VAL%", "0"));
var r = t.params.goal < 1e3 ? 0 : t.params.goal - 1e3;
$(this).prop("Counter", r).animate({
Counter: t.params.goal
}, {
duration: 1e3,
easing: "swing",
step: function(e) {
var r = t.params.format ? FormatUtils.formatNumber(Math.ceil(e)) : e >= 100 ? e : e.toFixed(2);
$(this).text(t.params.scheme.replace("%VAL%", r))
}
})
}
})
}, e.timer = 0, e.seconds = 0, e.restartCountdown = function(t) {
e.timer = t - 1, $(".timer-icon").css("display", "none"), $(".timer-icon-fake").css("display", "inline-block"), setTimeout(function() {
$(".timer-icon-fake").css("display", "none"), $(".timer-icon").css("display", "inline-block")
}, 500)
}, e.startCountdown = function(t, r) {
e.timer = t;
var n = "...";
setInterval(function() {
n = e.timer < 0 ? "..." : FormatUtils.padNumber(e.timer, 2) + " sn ", r.textContent = n, --e.timer
}, 1e3)
}, e
}(),
UrlUtils = function() {
var e = {};
return e.changePage = function(e, t) {
Backbone.history.navigate(e, {
trigger: !0
}), t && $("html, body").animate({
scrollTop: $("#" + t).offset().top - 10
})
}, e.getServiceUrl = function(e, t, r, n, i) {
r = r || !0, n = n || !1, i = i || !1;
var o = e.url,
a = n ? Config.apiCdnBaseUrl : Config.apiBaseUrl,
s = Config.currentElection.slug;
if (t) {
s = t.election ? t.election.slug : s;
for (var l in t) o = o.replace("{{" + l + "}}", t[l])
}
return a + s + "/" + o + (r ? ".json" : "") + (i ? "?v=" + Config.apiVersion : "")
}, e
}(),
CookieUtils = function() {
var e = {};
return e.create = function(e, t, r) {
var n = "";
if (r) {
var i = new Date;
i.setTime(i.getTime() + 24 * r * 60 * 60 * 1e3), n = "; expires=" + i.toUTCString()
}
document.cookie = e + "=" + t + n + "; path=/"
}, e.read = function(e) {
for (var t = e + "=", r = document.cookie.split(";"), n = 0; n < r.length; n++) {
for (var i = r[n];
" " == i.charAt(0);) i = i.substring(1, i.length);
if (0 == i.indexOf(t)) return i.substring(t.length, i.length)
}
return null
}, e.delete = function(t) {
e.create(t, "", -1)
}, e
}(),
ShareUtils = function() {
var e = {};
return e.sendFacebook = function() {
this.slug = Backbone.history.getFragment(), this.isCity = "" != this.slug && "turkiye" != this.slug, this.isLive = !!Config.selectedCity && Config.selectedCity.attributes.openedBoxCount > 0, FB.ui({
method: "feed",
name: e.getTitle(),
link: "http://referandum.ntv.com.tr/#" + this.slug,
picture: "http://cdn1.referandum.ntv.com.tr/Assets/dist/img/referandum.jpg",
description: e.getDescription()
})
}, e.sendTwitter = function() {
this.slug = Backbone.history.getFragment(), this.isCity = "" != this.slug && "turkiye" != this.slug, this.isLive = !!Config.selectedCity && Config.selectedCity.attributes.openedBoxCount > 0;
var t = "https://twitter.com/intent/tweet?text=" + encodeURIComponent(e.getTitle()) + "&url=http://referandum.ntv.com.tr&via=ntv";
window.open(t, "_blank")
}, e.sendWhatsapp = function() {
if (this.slug = Backbone.history.getFragment(), this.isCity = "" != this.slug && "turkiye" != this.slug, this.isLive = !!Config.selectedCity && Config.selectedCity.attributes.openedBoxCount > 0, /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
var t = e.getTitle(),
r = "http://referandum.ntv.com.tr/#" + this.slug,
n = encodeURIComponent(t) + " - " + encodeURIComponent(r),
i = "whatsapp://send?text=" + n;
window.location.href = i
} else console.log("Please use an Mobile Device to Share this Article")
}, e.getDescription = function() {
if (this.isCity) {
var e = Config.selectedCity.attributes.obp,
t = Config.selectedCity.attributes.votes[0].perc,
r = Config.selectedCity.attributes.votes[1].perc;
return this.isLive ? e + " ili " + FormatUtils.getTime(Config.lastUpdateDate) + " itibarı ile Evet : " + t + "% Hayır : " + r + "% - Türkiye Geneli Canlı Refereandum Sonuçları NTV Referandum Sayfasında Anlık Takip Edin!" : "2017 " + e + " canlı referandum sonuçları, 2017 Türkiye Geneli İllere göre ve ilçelere göre referandum seçim sonuçları NTV ile sizlerle!"
}
return "2017 Türkiye geneli canlı referandum sonuçları, anlık il il ve ilçelere göre referandum seçim sonuçlarından NTV ile haberdar olun!"
}, e.getTitle = function() {
if (this.isCity) {
var e = Config.selectedCity.attributes.obp,
t = Config.selectedCity.attributes.votes[0].perc,
r = Config.selectedCity.attributes.votes[1].perc;
return this.isLive ? e + " ili " + FormatUtils.getTime(Config.lastUpdateDate) + " itibarı ile Evet: yüzde " + t + " Hayır: yüzde " + r + " - Tüm Sonuçları Canlı Takip Edin!" : e + " Canlı Referandum Sonuçları - " + e + " Evet Hayır Oy Oranları"
}
return "Türkiye Geneli Canlı Referandum Sonuçları - İllere Göre Evet Hayır Oy Oranları"
}, e
}(),
Logger = function() {
var e = {};
return e.log = function(e) {}, e.info = function() {}, e.error = function() {}, e
}(),
EventManager = _.extend({}, Backbone.Events);
window.CityModel = Backbone.Model.extend({
defaults: {
id: 0,
name: "",
totalBoxCount: 0,
totalVoterCount: 0,
openedBoxCount: 0,
usedVoteCount: 0,
acceptedVoteCount: 0,
plate: 0,
votes: {}
},
modelType: "CityModel",
idAttribute: "plate",
cid: "plate"
});
window.DistrictModel = Backbone.Model.extend({
defaults: {
id: 0,
name: "",
totalBoxCount: 0,
totalVoterCount: 0,
openedBoxCount: 0,
usedVoteCount: 0,
acceptedVoteCount: 0,
votes: {}
},
modelType: "DistrictModel",
idAttribute: "id",
cid: "id"
});
window.NewsModel = Backbone.Model.extend({
defaults: {
title: "",
mainArt: "",
link: "",
type: "",
publishDate: ""
},
modelType: "NewsModel",
idAttribute: "title",
cid: "title"
});
var ResultModel = Backbone.Model.extend({
mapType: "ResultModel",
vars: {
delay: Config.services.generalResult.delay,
delayEmpty: Config.services.generalResult.delayEmpty,
repeat: !1
},
defaults: {
totalVote: 0,
totalBox: 0,
openedBox: 0,
openedBoxPer: 0,
diffVote: 0,
updateDate: "",
state: 0,
votes: [{
title: "EVET",
class: "yes",
perc: 0,
count: 0
}, {
title: "HAYIR",
class: "no",
perc: 0,
count: 0
}],
tempVotes: [{
p: 0
}, {
p: 0
}]
},
initialize: function() {
var e = this;
EventManager.on("versionchange", function(t) {
e.urlRoot = UrlUtils.getServiceUrl(Config.services.generalResult)
})
},
loaddata: function() {
this.fetch({
success: this.onsuccesshandler,
error: this.onerrorhandler
})
},
onsuccesshandler: function(e) {
e.vars.repeat && AnimateUtils.restartCountdown((0 == e.vars.state ? e.vars.delayEmpty : e.vars.delay) / 1e3)
},
onerrorhandler: function(e) {
Logger.error("Error on fetch ", e.urlRoot);
setTimeout(function() {
e.loaddata()
}, e.vars.delayEmpty)
},
parse: function(e) {
var t = Mapper.map(e, this.mapType);
Config.checkApiVersion(e.apiVersion);
var a = this;
return a.vars.repeat && setTimeout(function() {
a.loaddata()
}, 0 == t.state ? this.vars.delayEmpty : this.vars.delay), FormatUtils.compareDates(e.updateDate, this.vars.lastUpdate) ? (Logger.info("Date is old. Not renewed!", a.mapType, e.updateDate, this.vars.lastUpdate), this.vars.tempData) : (this.vars.lastUpdate = e.updateDate, this.vars.tempData = t, this.vars.state = t.state, t)
},
urlRoot: UrlUtils.getServiceUrl(Config.services.generalResult)
});
window.CitiesCollection = Backbone.Collection.extend({
model: CityModel,
vars: {
delay: Config.services.cities.delay,
delayEmpty: Config.services.cities.delayEmpty,
repeat: !1,
lastUpdate: null
},
mapType: "CityModel",
initialize: function() {
var e = this;
EventManager.on("versionchange", function(t) {
e.url = UrlUtils.getServiceUrl(Config.services.cities)
})
},
loaddata: function() {
this.fetch({
error: this.onerrorhandler
})
},
onerrorhandler: function(e) {
Logger.error("Error on fetch ", e.urlRoot);
setTimeout(function() {
e.loaddata()
}, e.vars.delayEmpty)
},
parse: function(e) {
var t = Mapper.map(e.data, this.mapType),
a = t.length > 0 ? t[0].state : 0,
i = this;
return i.vars.repeat && setTimeout(function() {
i.loaddata()
}, 0 == a ? this.vars.delayEmpty : this.vars.delay), FormatUtils.compareDates(e.updateDate, this.vars.lastUpdate) ? (Logger.info("Date is old. Not renewed!", i.mapType, e.updateDate, this.vars.lastUpdate), this.vars.tempData) : (this.vars.lastUpdate = e.updateDate, this.vars.tempData = t, t)
},
url: UrlUtils.getServiceUrl(Config.services.cities)
});
var DistrictsCollection = Backbone.Collection.extend({
vars: {
plate: 1,
delay: Config.services.cities.delay,
delayEmpty: Config.services.cities.delayEmpty,
repeat: !1
},
timer: null,
request: null,
model: DistrictModel,
mapType: "DistrictModel",
initialize: function() {},
loaddata: function() {
Logger.info("---------loaddata!", this.vars.plate, this.timer), this.request = this.fetch({
error: this.onerrorhandler
})
},
onerrorhandler: function(t, e) {
if (Logger.error("Error on fetch ", t, e), "abort" == e.statusText) return void Logger.info("ABORTED!");
this.timer = setTimeout(function() {
t.loaddata()
}, t.vars.delayEmpty)
},
cleartimer: function() {
clearTimeout(this.timer), this.timer = null
},
loadcity: function(t, e) {
this.cleartimer(), this.request && this.request.abort(), this.remove(this.models), this.vars.plate = t, this.vars.lastUpdate = null, this.vars.tempData = null, this.url = UrlUtils.getServiceUrl(Config.services.district, {
plate: this.vars.plate,
election: e
}), this.loaddata()
},
parse: function(t) {
var e = Mapper.map(t.data, this.mapType);
Config.checkApiVersion(t.apiVersion);
var a = e.length > 0 ? e[0].state : 0,
i = this;
return i.vars.repeat && (this.cleartimer(), this.timer = setTimeout(function() {
i.loaddata()
}, 0 == a ? this.vars.delayEmpty : this.vars.delay)), t.data.length, FormatUtils.compareDates(t.updateDate, this.vars.lastUpdate) ? (Logger.info("Date is old. Not renewed!", "currentplate:", i.vars.plate, i.mapType, this.vars.tempData, t.updateDate, this.vars.lastUpdate, t), this.vars.tempData) : (this.vars.lastUpdate = t.updateDate, this.vars.tempData = e, e)
},
url: UrlUtils.getServiceUrl(Config.services.district, {
plate: 1
})
});
var NewsCollection = Backbone.Collection.extend({
vars: {
page: 1
},
model: NewsModel,
mapType: "NewsModel",
initialize: function() {},
loadpage: function(e) {
this.vars.page = e, this.url = UrlUtils.getServiceUrl(Config.services.news, {
page: this.vars.page
}), this.fetch({
add: !0
})
},
parse: function(e) {
return Mapper.map(e.data, this.mapType)
},
url: UrlUtils.getServiceUrl(Config.services.news, {
page: 1
})
});
window.ChartBarView = Backbone.View.extend({
defaults: {
tempVotes: [{
perc: 0,
count: 0
}, {
perc: 0,
count: 0
}]
},
el: ".referandum-result",
template: _.template($("#ref-result-template").html()),
initialize: function() {
this.render(), this.listenTo(this.model, "change", this.render)
},
render: function() {
return $(this.el).html(this.template(this.model, tempVotes = this.defaults.tempVotes)), AnimateUtils.animateMe(this.el), this.defaults.tempVotes = this.model.get("votes"), this
}
});
window.CityBoxesView = Backbone.View.extend({
vars: {
cities: [],
cityPlates: [],
init: !1,
closeLimit: 7
},
el: ".city-boxes",
template: _.template($("#ref-city-boxes-template").html()),
initialize: function() {
null != CookieUtils.read("selectedCity") && Config.topCityPlates.unshift(parseInt(CookieUtils.read("selectedCity"))), this.render(), this.listenTo(this.collection, "sync", this.updateview)
},
updateview: function() {
this.vars.init || (this.rendercities(), this.renderselecter(), this.vars.init = !0)
},
rendercities: function() {
var e = this,
t = Config.topCityPlates.reverse(),
i = 0;
_.each(t, function(t) {
var s = e.collection.findWhere({
plate: t
});
null != s && e.addcity(s, {
prepend: !(i + 1 > e.vars.closeLimit),
useClose: i + 1 > e.vars.closeLimit
}), i++
})
},
renderselecter: function() {
var e = this;
$(e.el).find("#city-list-box").html(""), $(e.el).find("#city-list-box").append("<option>İl Seç</option>"), _.each(this.collection.toJSON(), function(t) {
$(e.el).find(".select__city-list").append('<option value="' + t.plate + '">' + FormatUtils.toCamelCase(t.name) + "</option>")
})
},
addcity: function(e, t) {
if (t = t || {
prepend: !0,
useClose: !1
}, Config.topCityPlates.indexOf(e.get("plate")) > -1) {
e.attributes.useClose = t.useClose;
var i = new CityBoxItemView({
model: e
});
if (this.vars.cities.push(i), this.vars.cityPlates.push(e.get("plate")), t.prepend) $(this.el).find(".container").prepend(i.render().el);
else {
var s = i.render().el;
$(s).toggleClass("city-boxes__item city-boxes__item-2"), $(this.el).find(".city-boxes__selection-item").before(s), $(this.el).find(".city-boxes__selection-item").css("display", "none")
}
}
},
deletecity: function(e) {
CookieUtils.delete("selectedCity"), this.vars.cityPlates.splice(this.vars.cityPlates.lastIndexOf(e.model.get("plate")), 1), this.vars.cities.splice(this.vars.cities.lastIndexOf(e.model.get("plate")), 1), e.destroy()
},
selectcity: function(e) {
Config.topCityPlates.indexOf(e) < 0 && (Config.topCityPlates.push(e), this.vars.selectedPlate = e), this.addcity(this.collection.findWhere({
plate: e
}), {
prepend: !1,
useClose: !0
}), CookieUtils.create("selectedCity", e, 1)
},
events: {
"click .button__add-city": "oncityselected",
"click .button__delete-city": "oncitydelete"
},
oncitydelete: function(e) {
var t = _.find(this.vars.cities.reverse(), function(t) {
return t.model.get("plate") == $(e.currentTarget).data("plate")
});
this.deletecity(t), $(this.el).find(".city-boxes__selection-item").css("display", "block")
},
oncityselected: function() {
var e = $(this.el).find(".select__city-list").val();
if (!(e < 1)) {
var t = parseInt(e);
this.selectcity(t)
}
},
render: function() {
return $(this.el).html(this.template({
cityList: this.collection.toJSON()
})), this
}
});
window.CityBoxItemView = Backbone.View.extend({
defaults: {
tempVotes: [{
p: 0
}, {
p: 0
}]
},
vars: {
useClose: !1
},
className: "city-boxes__item col-sm-8 col-md-4",
template: _.template($("#ref-citybox-item").html()),
initialize: function(e) {
this.vars.useClose = e.useClose, this.listenTo(this.model, "change", this.render)
},
events: {},
render: function() {
var e = CalcUtils.getMostVotedParty(this.model.get("votes"));
return $(this.el).html(this.template(this.model, tempVotes = this.defaults.tempVotes, useClose = this.model.attributes.useClose, mostVotedParty = e)), this
},
destroy: function() {
this.$el.removeData().unbind(), this.remove(), this.undelegateEvents()
}
});
window.HeaderView = Backbone.View.extend({
el: ".header-section",
template: _.template($("#ref-header-template").html()),
initialize: function() {
this.render()
},
render: function() {
return $(this.el).html(this.template()), this
}
});
window.MapAreaView = Backbone.View.extend({
vars: {
initdistricts: !1,
selectedcityslug: null,
startupdistrict: null,
citydetailview: null,
generalresultview: null,
oldresultsview: null
},
el: ".referandum-map-area",
template: _.template($("#ref-map-area-template").html()),
models: {},
collections: {},
initialize: function(t) {
this.render(), this.models.generalresult = t.models.generalResult, this.models.oldgeneralresult = t.models.oldGeneralResult, this.collections.citiescollection = t.collections.citiesCollection, this.collections.oldcitiescollection = t.collections.oldCitiesCollection, this.collections.districtscollection = new DistrictsCollection, this.collections.districtscollection.vars = {
delay: Config.services.district.delay,
delayEmpty: Config.services.district.delayEmpty,
repeat: !0
}, this.collections.olddistrictscollection = new DistrictsCollection, new MapDetailView({
collection: this.collections.citiescollection
}), this.vars.generalresultview = new MapAreaGeneralView({
model: this.models.generalresult
}), this.vars.citydetailview = new MapCityDetailView({
model: this.vars.selectedcitymodel,
collection: this.collections.districtscollection
}), this.vars.oldresultsview = new MapAreaOldResultsView({
model: this.models.oldgeneralresult
}), this.listenToOnce(this.collections.citiescollection, "sync", this.oncitiesload), this.listenTo(this.collections.districtscollection, "sync", this.ondistrictsload), this.listenTo(this.models.generalresult, "change", this.onresultchange), this.listenTo(this.vars.oldresultsview, "electionchanged", this.onelectionchanged)
},
showcitydetail: function(t, e) {
$(this.el).find(".city-info-div-area").css("display", "block"), $(this.el).find(".city-map-area").css("display", "none"), $(this.el).find(".go-homepage-link").css("display", "inline-block"), this.vars.selectedcityslug = t, null != e ? this.selectdistrictbyslug(e) : this.selectcitybyslug(t)
},
showmapdetail: function() {
this.vars.generalresultview.changemodel(this.models.generalresult), this.vars.oldresultsview.changemodel(this.models.oldgeneralresult), this.collections.districtscollection.cleartimer(), $(this.el).find(".city-map-area").css("display", "block"), $(this.el).find(".city-info-div-area").css("display", "none"), $(this.el).find(".go-homepage-link").css("display", "none"), $(this.el).find("#city-list-box").val("-1"), $(this.el).find("#district-list-box").html('<option value="-1">İlçe Seç</option>')
},
selectcitybyslug: function(t) {
var e = this.getbyslug(t, this.collections.citiescollection),
i = this;
if (!e) return void this.listenToOnce(this.collections.citiescollection, "sync", function(e) {
i.selectcitybyslug(t)
});
this.collections.districtscollection.loadcity(parseInt(e.get("plate"))), this.vars.selectedcitymodel = e, this.vars.citydetailview.changemodel(e, this.collections.districtscollection), this.vars.generalresultview.changemodel(e), this.changeviewmodel(this.vars.oldresultsview, this.collections.oldcitiescollection, t), Config.selectedCity = e, this.vars.initdistricts = !1, $(this.el).find("#city-list-box").val(e.get("slug")), $(this.el).find("#district-list-box").html('<option value="-1">Yükleniyor...</option>'), $(this.el).find("#district-list-box").prop("disabled", "disabled"), this.vars.startupdistrict && (this.selectdistrictbyslug(this.vars.startupdistrict), this.vars.startupdistrict = null)
},
selectdistrictbyslug: function(t) {
var e = this.getbyslug(t, this.collections.districtscollection),
i = this;
if (!e) return this.vars.selectedcitymodel ? void this.listenToOnce(this.collections.districtscollection, "sync", function(e) {
i.selectdistrictbyslug(t)
}) : (this.vars.startupdistrict = t, void this.selectcitybyslug(this.vars.selectedcityslug));
e.set("plate", this.vars.selectedcitymodel.get("plate"), {
silent: !0
}), this.vars.citydetailview.changemodel(e), this.vars.generalresultview.changemodel(e), this.changeviewmodel(this.vars.oldresultsview, this.collections.olddistrictscollection, t), $(this.el).find("#district-list-box").val(e.get("slug"))
},
changeviewmodel: function(t, e, i) {
0 == e.length ? this.listenToOnce(e, "sync", function(l) {
t.changemodel(this.getbyslug(i, e))
}) : t.changemodel(this.getbyslug(i, e))
},
onresultchange: function(t) {
if ($(this.el).find("#title_0").html(FormatUtils.toUpperCase(t.get("votes")[0].title)), $(this.el).find("#title_1").html(FormatUtils.toUpperCase(t.get("votes")[1].title)), 0 == t.get("state")) {
var e = new Date;
$(".update-date").html(FormatUtils.padNumber(e.getHours(), 2) + ":" + FormatUtils.padNumber(e.getMinutes(), 2))
} else $(".update-date").html(FormatUtils.getTime(t.get("updateDate")))
},
getcitybyplate: function(t) {
return this.collections.citiescollection.findWhere({
plate: t
})
},
getbyslug: function(t, e) {
return e.findWhere({
slug: t
})
},
oncitiesload: function() {
this.renderselecter()
},
ondistrictsload: function() {
this.vars.initdistricts || (this.renderdistrictselecter(), this.vars.initdistricts = !0)
},
oncityselected: function(t) {
var e = $(t.currentTarget).val();
if ("-1" == e) return void UrlUtils.changePage("turkiye");
UrlUtils.changePage(e)
},
ondistrictselected: function(t) {
var e = $(t.currentTarget).val();
if ("-1" == e) return void UrlUtils.changePage(this.vars.selectedcityslug);
UrlUtils.changePage(this.vars.selectedcityslug + "/" + e)
},
onelectionchanged: function() {
Logger.log("electionchanged"), this.collections.oldcitiescollection.url = UrlUtils.getServiceUrl(Config.services.cities, {
election: Config.pastElection
}, !0, !0), this.collections.oldcitiescollection.vars.lastUpdate = null, this.collections.oldcitiescollection.loaddata(), this.models.oldgeneralresult.url = UrlUtils.getServiceUrl(Config.services.generalResult, {
election: Config.pastElection
}, !0, !0), this.models.oldgeneralresult.vars.lastUpdate = null, this.models.oldgeneralresult.loaddata()
},
events: {
"change #city-list-box": "oncityselected",
"change #district-list-box": "ondistrictselected"
},
renderselecter: function() {
var t = this;
$(t.el).find("#city-list-box").html(""), $(t.el).find("#city-list-box").append('<option value="-1">İl Seç</option>');
var e = !0;
_.each(this.collections.citiescollection.toJSON(), function(i, l) {
l > 80 && e && ($(t.el).find("#city-list-box").append("<option disabled>──────────</option>"), e = !1), $(t.el).find("#city-list-box").append('<option value="' + i.slug + '">' + FormatUtils.toCamelCase(i.name) + "</option>")
})
},
renderdistrictselecter: function() {
var t = this;
$(t.el).find("#district-list-box").html(""), $(this.el).find("#district-list-box").prop("disabled", ""), $(t.el).find("#district-list-box").append('<option value="-1">İlçe Seç</option>'), _.each(this.collections.districtscollection.toJSON(), function(e) {
$(t.el).find("#district-list-box").append('<option value="' + e.slug + '">' + FormatUtils.toCamelCase(e.name) + "</option>")
})
},
render: function() {
return $(this.el).html(this.template()), this
}
});
window.MapAreaGeneralView = Backbone.View.extend({
el: ".partial-general-result",
template: _.template($("#ref-map-area-general-template").html()),
changemodel: function(e) {
this.model = e, this.render(), this.listenTo(this.model, "change", this.render)
},
initialize: function() {
this.render(), this.listenTo(this.model, "change", this.render)
},
render: function() {
return $(this.el).html(this.template(this.model)), AnimateUtils.animateMe(this.el), this
}
});
window.MapAreaOldResultsView = Backbone.View.extend({
el: ".partial-old-results",
template: _.template($("#ref-map-old-results-template").html()),
changemodel: function(e) {
this.model, this.model = e, this.render(), this.listenTo(this.model, "change", this.render), this.listenTo(this.model, "sync", this.onsync)
},
onsync: function(e) {
this.model || (this.model = e), this.render()
},
initialize: function() {
this.render()
},
onelectionselected: function(e) {
var t = $(e.currentTarget).val();
for (item in Config.elections)
if (Config.elections[item].slug == t) return Config.pastElection = Config.elections[item], void this.trigger("electionchanged")
},
events: {
"change #election-list-box": "onelectionselected"
},
render: function() {
if (this.model) return $(this.el).html(this.template(this.model)), this
}
});
window.MapCityDetailView = Backbone.View.extend({
defaults: {
tempVotes: [{
perc: 0
}, {
perc: 0
}]
},
vars: {
selectedDistrict: null,
waitLoadedCity: !0
},
el: ".city-info-div-area",
template: _.template($("#ref-map-city-detail-template").html()),
changemodel: function(t, i) {
Logger.log("change model", t.get("plate")), this.model = t, this.districts = i, this.defaults.tempVotes = [{
perc: 0
}, {
perc: 0
}], this.vars.selectedDistrict = null, this.vars.waitLoadedCity = !0, this.stopListening(), this.listenTo(this.model, "change", this.oncitychange), this.listenTo(this.districts, "change", this.renderdistricts), this.listenToOnce(this.districts, "sync", this.ondistrictssync), this.render(), $(this.el).find(".ac-container").html("<span style='padding: 16px;display: inline-block;'>Yükleniyor...</span>")
},
initialize: function() {
$(window).resize(function() {
$(window).width() > 991 ? $(".ac-container").slimScroll({
height: "auto",
size: "8px",
alwaysVisible: !0,
color: "#364755",
opacity: 1,
distance: 0,
allowPageScroll: !0
}) : $(".ac-container").slimScroll({
destroy: !0,
height: "auto"
})
})
},
ondistrictselected: function(t) {
var i = $(t.currentTarget);
1 == i.data("clicked") && i.removeAttr("checked"), i.data("clicked", !i.data("clicked"));
var e = i.data("id");
this.vars.selectedDistrict = e
},
ondistrictssync: function(t) {
this.renderdistricts(t)
},
oncitychange: function(t) {
this.render(t)
},
events: {
"click .district-detail-button": "ondistrictselected"
},
renderdistricts: function() {
$(this.el).find(".ac-container").html(""), Logger.log("Render Districts! plate:", this.model.get("plate"), this.districts.models.length);
var t = this,
i = 0,
e = _.template($("#ref-map-district-item").html());
_.each(this.districts.toJSON(), function(s) {
$(t.el).find(".ac-container").append(e(s, id = i, selected = s.id == t.vars.selectedDistrict)), i++
})
},
render: function() {
return $(this.el).html(this.template(this.model, tempVotes = this.defaults.tempVotes)), AnimateUtils.animateMe(this.el), this.defaults.tempVotes = this.model.get("votes"), this.renderdistricts(), $(function() {
$(window).width() > 991 ? $(".ac-container").slimScroll({
height: "auto",
size: "8px",
alwaysVisible: !0,
color: "#364755",
opacity: 1,
distance: 0,
allowPageScroll: !0
}) : $(".ac-container").slimScroll({
destroy: !0,
height: "auto"
})
}), this
}
});
window.MapDetailView = Backbone.View.extend({
vars: {
map: null,
initmap: !1
},
initialize: function() {
this.listenTo(this.collection, "sync", this.oncitiesload), this.listenTo(this.collection, "change", this.oncitieschange)
},
selectcitybyplate: function(t) {
var e = this.getcitybyplate(parseInt(t));
Logger.info("--selectcitybyplate", t, e, this.collection), e && UrlUtils.changePage(e.get("slug"))
},
getcitybyplate: function(t) {
return this.collection.findWhere({
plate: t
})
},
oncitiesload: function() {
this.vars.initmap || (this.initmap(), this.vars.initmap = !0)
},
oncitieschange: function(t) {
if (this.vars.map) {
var e = this.vars.map.getObjectById("TR-" + FormatUtils.padNumber(t.get("plate"), 2));
e.customData = this.getballoontext(t.get("votes")), e.color != CalcUtils.getMostVotedPartyColor(t.get("votes")) && (e.color = CalcUtils.getMostVotedPartyColor(t.get("votes")), e.colorReal = e.color, e.selectedColor = e.color, e.chart && e.validate())
}
},
onmapclick: function(t) {
var e = t.mapObject.id.split("-")[1];
this.selectcitybyplate(FormatUtils.padNumber(parseInt(e), 1))
},
getballoontext: function(t) {
return "<div class='vote-result-info'><div class='vote-result-info__text vote-yes'>" + t[0].title + " <strong>%" + t[0].perc + "</strong></div><div class='vote-result-info__text vote-no'>" + t[1].title + " <strong>%" + t[1].perc + "</strong></div></div><div class='vote-result-percent'><div class='vote_result_percent_info vote-yes' style='width:" + t[0].perc + "%;'></div><div class='vote_result_percent_info vote-no' style='width:" + t[1].perc + "%;'></div></div>"
},
initmap: function() {
var t = [],
e = this;
_.each(this.collection.models, function(o) {
t.push({
title: o.get("name"),
id: "TR-" + FormatUtils.padNumber(o.get("plate"), 2),
color: CalcUtils.getMostVotedPartyColor(o.get("votes")),
customData: e.getballoontext(o.get("votes"))
})
}), this.vars.map = AmCharts.makeChart("cityMap", {
type: "map",
dragMap: !1,
zoomOnDoubleClick: !1,
autoZoom: !1,
balloon: {
adjustBorderColor: !0,
borderAlpha: 1,
borderThickness: 1,
fillColor: "#ffffff",
fillAlpha: 1,
pointerWidth: 15,
horizontalPadding: 0,
verticalPadding: 0,
fadeOutDuration: 0,
textAlign: "left"
},
zoomControl: {
zoomControlEnabled: !1,
zoomOnDoubleClick: !1,
homeButtonEnabled: !1
},
dataProvider: {
map: "turkeyLow",
getAreasFromMap: !0,
zoomLevel: 1,
areas: t
},
areasSettings: {
selectable: !0,
autoZoom: !1,
rollOverColor: "#ffffff",
rollOverOutlineColor: "#999",
color: "#bfbfbf",
selectedColor: "#fff",
outlineThickness: 1.2,
balloonText: "<div class='amcharts-balloon'><h6 class='amcharts-balloon__title'>[[title]] </h6><div class='amcharts-balloon__content'>[[customData]]</div></div>"
}
}), this.vars.map.addListener("clickMapObject", function(t) {
var o = t.mapObject;
o.showAsSelected = !1, t.chart.returnInitialColor(o), setTimeout(function() {
e.vars.map.balloon.hide()
}, 800), e.onmapclick(t)
})
},
render: function() {
return this
}
});
window.NewsView = Backbone.View.extend({
vars: {
init: !1,
page: 1,
pagelimit: 8
},
el: ".referandum-news",
template: _.template($("#ref-news-template").html()),
initialize: function() {
this.render(), this.listenTo(this.collection, "add", this.addnews), this.listenTo(this.collection, "sync", this.updateview)
},
updateview: function() {
this.collection.models.length < this.vars.pagelimit ? $(this.el).find(".show-more-news-button").css("display", "none") : ($(this.el).find(".show-more-news-button").html("Daha Fazla Yükle"), $(this.el).find(".show-more-news-button").data("loadstate", 0))
},
addnews: function(e) {
$(this.el).find(".news-items").append(new NewsItemView({
model: e
}).render().el)
},
events: {
"click .show-more-news-button": "onshowmore"
},
onshowmore: function(e) {
e.preventDefault(), 0 == $(e.currentTarget).data("loadstate") && (this.vars.page += 1, this.collection.loadpage(this.vars.page), $(e.currentTarget).data("loadstate", 1), $(e.currentTarget).html("Yükleniyor..."))
},
rendernews: function() {
var e = this;
_.each(this.collection.models, function(t) {
e.addnews(t)
})
},
render: function() {
return $(this.el).html(this.template()), this
}
});
window.NewsItemView = Backbone.View.extend({
template: _.template($("#ref-news-item-template").html()),
initialize: function() {
this.listenTo(this.model, "change", this.render)
},
render: function() {
return $(this.el).html(this.template(this.model)), this
}
});
window.TopTenView = Backbone.View.extend({
vars: {
init: !1,
listCount: 10,
listTop: [],
listBottom: [],
title: {
listTop: "",
listBottom: ""
},
temp: {}
},
el: ".referandum-top10",
template: _.template($("#ref-top-ten-template").html()),
initialize: function() {
this.listenTo(this.collection, "sync", this.updateview)
},
updateview: function() {
if (!this.vars.init) {
var t = _.filter(this.collection.models, function(t) {
return 0 != t.attributes.votes[0].perc && 0 != t.attributes.votes[1].perc
}),
i = _.sortBy(t, function(t) {
return t.attributes.votes[0].perc
});
this.vars.listBottom = _.toArray(i).slice(0, 10), this.vars.listTop = _.toArray(i.reverse()).slice(0, 10), this.vars.listTop.length > 0 && (this.vars.title.listTop = this.vars.listTop[0].attributes.votes[0].title, this.vars.title.listBottom = this.vars.listBottom[0].attributes.votes[1].title), this.vars.temp.listBottom == this.vars.listBottom && this.vars.temp.listTop == this.vars.listTop || this.render(), this.vars.temp.listBottom = this.vars.listBottom, this.vars.temp.listTop = this.vars.listTop
}
},
render: function() {
return $(this.el).html(this.template({
listTop: this.vars.listTop,
listBottom: this.vars.listBottom,
title: this.vars.title
})), this
}
});
window.Router = Backbone.Router.extend({
routes: {
"": "home",
turkiye: "home",
":cityslug": "city",
":cityslug/:districtslug": "city"
},
initialize: function() {
var e = new ResultModel;
e.vars = {
delay: Config.services.generalResult.delay,
delayEmpty: Config.services.generalResult.delayEmpty,
repeat: !0
}, e.loaddata(), this.generalBarView = new ChartBarView({
model: e
});
var i = new CitiesCollection;
i.vars = {
delay: Config.services.cities.delay,
delayEmpty: Config.services.cities.delayEmpty,
repeat: !0
}, i.loaddata(), this.cityBoxesView = new CityBoxesView({
collection: i
}), this.topTenView = new TopTenView({
collection: i
});
var t = new ResultModel;
t.url = UrlUtils.getServiceUrl(Config.services.generalResult, {
election: Config.pastElection
}, !0, !0), t.loaddata();
var o = new CitiesCollection;
o.url = UrlUtils.getServiceUrl(Config.services.cities, {
election: Config.pastElection
}, !0, !0), o.loaddata();
var l = new NewsCollection;
l.fetch(), this.newsView = new NewsView({
collection: l
}), this.mapView = new MapAreaView({
models: {
generalResult: e,
oldGeneralResult: t
},
collections: {
citiesCollection: i,
oldCitiesCollection: o
}
}), this.bind("route", this.pageview), AnimateUtils.startCountdown(20, document.querySelector("#countdown-item")), setTimeout(function() {
location.reload()
}, 3e5)
},
pageview: function() {
var e = Backbone.history.getFragment();
ga("send", "pageview", {
page: "/" + e
}), ga("genel.send", "pageview", {
page: "/" + e
})
},
home: function() {
this.mapView.showmapdetail()
},
city: function(e, i) {
this.mapView.showcitydetail(e, i)
}
}), TemplateUtils.templateLoader.load([], function() {
app = new Router, Backbone.history.start()
}), $(function() {
var e = $(".fixed-bottom-social-share");
$(e.find(".trigger-btn")).on("click", function() {
e.hasClass("opened") ? e.removeClass("opened") : e.addClass("opened")
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment