PageSourceSearch

https://cryptoqctools.com/wp-content/themes/crypton1te-theme/js/amcharts/amcharts.js?ver=3.21.12

js cryptoqctools.com collected 2026-10-05 23:19:32 UTC 369,478 bytes, 8,031 lines download raw bytes

1(function() {
2    var d;
3    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");
4    d.Class = function(a) {
5        var b = function() {
6            arguments[0] !== d.inheriting && (this.events = {}, this.construct.apply(this, arguments))
7        };
8        a.inherits ? (b.prototype = new a.inherits(d.inheriting), b.base = a.inherits.prototype, delete a.inherits) : (b.prototype.createEvents = function() {
9            for (var a = 0; a < arguments.length; a++) this.events[arguments[a]] = []
10        }, b.prototype.listenTo = function(a, b, c) {
11            this.removeListener(a, b, c);
12            a.events[b].push({
13                handler: c,
14                scope: this
15            })
16        }, b.prototype.addListener = function(a, b, c) {
17            this.removeListener(this, a, b);
18            a && this.events[a] && this.events[a].push({
19                handler: b,
20                scope: c
21            })
22        }, b.prototype.removeListener = function(a, b, c) {
23            if (a && a.events && (a = a.events[b]))
24                for (b = a.length - 1; 0 <= b; b--) a[b].handler === c && a.splice(b, 1)
25        }, b.prototype.fire = function(a) {
26            for (var b = this.events[a.type], c = 0; c < b.length; c++) {
27                var d = b[c];
28                d.handler.call(d.scope, a)
29            }
30        });
31        for (var c in a) b.prototype[c] = a[c];
32        return b
33    };
34    d.addChart = function(a) {
35        window.requestAnimationFrame ? d.animationRequested || (d.animationRequested = !0, window.requestAnimationFrame(d.update)) : d.updateInt || (d.updateInt = setInterval(function() {
36            d.update()
37        }, Math.round(1E3 / d.updateRate)));
38        d.charts.push(a)
39    };
40    d.removeChart = function(a) {
41        for (var b = d.charts, c = b.length - 1; 0 <= c; c--) b[c] == a && b.splice(c, 1);
42        0 === b.length && (d.requestAnimation && (window.cancelAnimationFrame(d.requestAnimation), d.animationRequested = !1), d.updateInt && (clearInterval(d.updateInt), d.updateInt = NaN))
43    };
44    d.isModern = !0;
45    d.getIEVersion = function() {
46        var a = 0,
47            b, c;
48        "Microsoft Internet Explorer" == navigator.appName && (b = navigator.userAgent, c = /MSIE ([0-9]{1,}[.0-9]{0,})/, null !== c.exec(b) && (a = parseFloat(RegExp.$1)));
49        return a
50    };
51    d.applyLang = function(a, b) {
52        var c = d.translations;
53        b.dayNames = d.extend({}, d.dayNames);
54        b.shortDayNames = d.extend({}, d.shortDayNames);
55        b.monthNames = d.extend({}, d.monthNames);
56        b.shortMonthNames = d.extend({}, d.shortMonthNames);
57        b.amString = "am";
58        b.pmString = "pm";
59        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));
60        d.amString = b.amString;
61        d.pmString = b.pmString
62    };
63    d.IEversion = d.getIEVersion();
64    9 > d.IEversion && 0 < d.IEversion && (d.isModern = !1, d.isIE = !0);
65    d.dx = 0;
66    d.dy = 0;
67    if (document.addEventListener || window.opera) d.isNN = !0, d.isIE = !1, d.dx = .5, d.dy = .5;
68    document.attachEvent && (d.isNN = !1, d.isIE = !0, d.isModern || (d.dx = 0, d.dy = 0));
69    window.chrome && (d.chrome = !0);
70    d.handleMouseUp = function(a) {
71        for (var b = d.charts, c = 0; c < b.length; c++) {
72            var e = b[c];
73            e && e.handleReleaseOutside && e.handleReleaseOutside(a)
74        }
75    };
76    d.handleMouseMove = function(a) {
77        for (var b = d.charts, c = 0; c < b.length; c++) {
78            var e = b[c];
79            e && e.handleMouseMove && e.handleMouseMove(a)
80        }
81    };
82    d.handleWheel = function(a) {
83        for (var b = d.charts, c = 0; c < b.length; c++) {
84            var e = b[c];
85            if (e && e.mouseIsOver) {
86                (e.mouseWheelScrollEnabled || e.mouseWheelZoomEnabled) && e.handleWheel && (e.handleMouseMove(a), e.handleWheel(a));
87                break
88            }
89        }
90    };
91    d.resetMouseOver = function() {
92        for (var a = d.charts, b = 0; b < a.length; b++) {
93            var c = a[b];
94            c && (c.mouseIsOver = !1)
95        }
96    };
97    d.ready = function(a) {
98        d.onReadyArray.push(a)
99    };
100    d.handleLoad = function() {
101        d.isReady = !0;
102        for (var a = d.onReadyArray, b = 0; b < a.length; b++) {
103            var c = a[b];
104            isNaN(d.processDelay) ? c() : setTimeout(c, d.processDelay * b)
105        }
106        d.onReadyArray = []
107    };
108    d.addInitHandler = function(a, b) {
109        d.initHandlers.push({
110            method: a,
111            types: b
112        })
113    };
114    d.callInitHandler = function(a) {
115        var b = d.initHandlers;
116        if (d.initHandlers)
117            for (var c = 0; c < b.length; c++) {
118                var e = b[c];
119                e.types ? d.isInArray(e.types, a.type) && e.method(a) : e.method(a)
120            }
121    };
122    d.getUniqueId = function() {
123        d.uid++;
124        return "AmChartsEl-" + d.uid
125    };
126    d.isNN && (document.addEventListener("mousemove", d.handleMouseMove), document.addEventListener("mouseup", d.handleMouseUp, !0), window.addEventListener("load", d.handleLoad, !0));
127    d.isIE && (document.attachEvent("onmousemove", d.handleMouseMove), document.attachEvent("onmouseup", d.handleMouseUp), window.attachEvent("onload", d.handleLoad));
128    d.addWheelListeners = function() {
129        d.wheelIsListened || (d.isNN && (window.addEventListener("DOMMouseScroll", d.handleWheel, !0), document.addEventListener("mousewheel", d.handleWheel, !0)), d.isIE && document.attachEvent("onmousewheel", d.handleWheel));
130        d.wheelIsListened = !0
131    };
132    d.clear = function() {
133        var a = d.charts;
134        if (a)
135            for (var b = a.length - 1; 0 <= b; b--) a[b].clear();
136        d.updateInt && clearInterval(d.updateInt);
137        d.requestAnimation && window.cancelAnimationFrame(d.requestAnimation);
138        d.charts = [];
139        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));
140        d.isIE && (document.detachEvent("onmousemove", d.handleMouseMove), document.detachEvent("onmouseup", d.handleMouseUp), window.detachEvent("onload", d.handleLoad))
141    };
142    d.makeChart = function(a, b, c) {
143        var e = b.type,
144            g = b.theme;
145        d.isString(g) && (g = d.themes[g], b.theme = g);
146        var f;
147        switch (e) {
148            case "serial":
149                f = new d.AmSerialChart(g);
150                break;
151            case "xy":
152                f = new d.AmXYChart(g);
153                break;
154            case "pie":
155                f = new d.AmPieChart(g);
156                break;
157            case "radar":
158                f = new d.AmRadarChart(g);
159                break;
160            case "gauge":
161                f = new d.AmAngularGauge(g);
162                break;
163            case "funnel":
164                f = new d.AmFunnelChart(g);
165                break;
166            case "map":
167                f = new d.AmMap(g);
168                break;
169            case "stock":
170                f = new d.AmStockChart(g);
171                break;
172            case "gantt":
173                f = new d.AmGanttChart(g)
174        }
175        d.extend(f, b);
176        d.isReady ? isNaN(c) ? f.write(a) : setTimeout(function() {
177            d.realWrite(f, a)
178        }, c) : d.ready(function() {
179            isNaN(c) ? f.write(a) : setTimeout(function() {
180                d.realWrite(f, a)
181            }, c)
182        });
183        return f
184    };
185    d.realWrite = function(a, b) {
186        a.write(b)
187    };
188    d.updateCount = 0;
189    d.validateAt = Math.round(d.updateRate / 10);
190    d.update = function() {
191        var a = d.charts;
192        d.updateCount++;
193        var b = !1;
194        d.updateCount == d.validateAt && (b = !0, d.updateCount = 0);
195        if (a)
196            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());
197        window.requestAnimationFrame && (d.requestAnimation = window.requestAnimationFrame(d.update))
198    };
199    "complete" == document.readyState && d.handleLoad()
200})();
201(function() {
202    var d = window.AmCharts;
203    d.toBoolean = function(a, b) {
204        if (void 0 === a) return b;
205        switch (String(a).toLowerCase()) {
206            case "true":
207            case "yes":
208            case "1":
209                return !0;
210            case "false":
211            case "no":
212            case "0":
213            case null:
214                return !1;
215            default:
216                return !!a
217        }
218    };
219    d.removeFromArray = function(a, b) {
220        var c;
221        if (void 0 !== b && void 0 !== a)
222            for (c = a.length - 1; 0 <= c; c--) a[c] == b && a.splice(c, 1)
223    };
224    d.getPath = function() {
225        var a = document.getElementsByTagName("script");
226        if (a)
227            for (var b = 0; b < a.length; b++) {
228                var c = a[b].src;
229                if (-1 !== c.search(/\/(amcharts|ammap)\.js/)) return c.replace(/\/(amcharts|ammap)\.js.*/, "/")
230            }
231    };
232    d.normalizeUrl = function(a) {
233        return "" !== a && -1 === a.search(/\/$/) ? a + "/" : a
234    };
235    d.isAbsolute = function(a) {
236        return 0 === a.search(/^http[s]?:|^\//)
237    };
238    d.isInArray = function(a, b) {
239        for (var c = 0; c < a.length; c++)
240            if (a[c] == b) return !0;
241        return !1
242    };
243    d.getDecimals = function(a) {
244        var b = 0;
245        isNaN(a) || (a = String(a), -1 != a.indexOf("e-") ? b = Number(a.split("-")[1]) : -1 != a.indexOf(".") && (b = a.split(".")[1].length));
246        return b
247    };
248    d.wordwrap = function(a, b, c, e) {
249        var g, f, h, k;
250        a += "";
251        if (1 > b) return a;
252        g = -1;
253        for (a = (k = a.split(/\r\n|\n|\r/)).length; ++g < a; k[g] += h) {
254            h = k[g];
255            for (k[g] = ""; h.length > b; k[g] += d.trim(h.slice(0, f)) + ((h = h.slice(f)).length ? c : "")) f = 2 == e || (f = h.slice(0, b + 1).match(/\S*(\s)?$/))[1] ? b : f.input.length - f[0].length || 1 == e && b || f.input.length + (f = h.slice(b).match(/^\S*/))[0].length;
256            h = d.trim(h)
257        }
258        return k.join(c)
259    };
260    d.trim = function(a) {
261        return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
262    };
263    d.wrappedText = function(a, b, c, e, g, f, h, k) {
264        var l = d.text(a, b, c, e, g, f, h);
265        if (l) {
266            var m = l.getBBox();
267            if (m.width > k) {
268                var n = "\n";
269                d.isModern || (n = "<br>");
270                k = Math.floor(k / (m.width / b.length));
271                2 < k && (k -= 2);
272                b = d.wordwrap(b, k, n, !0);
273                l.remove();
274                l = d.text(a, b, c, e, g, f, h)
275            }
276        }
277        return l
278    };
279    d.getStyle = function(a, b) {
280        var c = "";
281        if (document.defaultView && document.defaultView.getComputedStyle) try {
282            c = document.defaultView.getComputedStyle(a, "").getPropertyValue(b)
283        } catch (e) {} else a.currentStyle && (b = b.replace(/\-(\w)/g, function(a, b) {
284            return b.toUpperCase()
285        }), c = a.currentStyle[b]);
286        return c
287    };
288    d.removePx = function(a) {
289        if (void 0 !== a) return Number(a.substring(0, a.length - 2))
290    };
291    d.getURL = function(a, b) {
292        if (a)
293            if ("_self" != b && b)
294                if ("_top" == b && window.top) window.top.location.href = a;
295                else if ("_parent" == b && window.parent) window.parent.location.href = a;
296        else if ("_blank" == b) window.open(a);
297        else {
298            var c = document.getElementsByName(b)[0];
299            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)
300        } else window.location.href = a
301    };
302    d.ifArray = function(a) {
303        return a && "object" == typeof a && 0 < a.length ? !0 : !1
304    };
305    d.callMethod = function(a, b) {
306        var c;
307        for (c = 0; c < b.length; c++) {
308            var e = b[c];
309            if (e) {
310                if (e[a]) e[a]();
311                var d = e.length;
312                if (0 < d) {
313                    var f;
314                    for (f = 0; f < d; f++) {
315                        var h = e[f];
316                        if (h && h[a]) h[a]()
317                    }
318                }
319            }
320        }
321    };
322    d.toNumber = function(a) {
323        return "number" == typeof a ? a : Number(String(a).replace(/[^0-9\-.]+/g, ""))
324    };
325    d.toColor = function(a) {
326        if ("" !== a && void 0 !== a)
327            if (-1 != a.indexOf(",")) {
328                a = a.split(",");
329                var b;
330                for (b = 0; b < a.length; b++) {
331                    var c = a[b].substring(a[b].length - 6, a[b].length);
332                    a[b] = "#" + c
333                }
334            } else a = a.substring(a.length - 6, a.length), a = "#" + a;
335        return a
336    };
337    d.toCoordinate = function(a, b, c) {
338        var e;
339        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));
340        return e
341    };
342    d.fitToBounds = function(a, b, c) {
343        a < b && (a = b);
344        a > c && (a = c);
345        return a
346    };
347    d.isDefined = function(a) {
348        return void 0 === a ? !1 : !0
349    };
350    d.stripNumbers = function(a) {
351        return a.replace(/[0-9]+/g, "")
352    };
353    d.roundTo = function(a, b) {
354        if (0 > b) return a;
355        var c = Math.pow(10, b);
356        return Math.round(a * c) / c
357    };
358    d.toFixed = function(a, b) {
359        var c = !1;
360        0 > a && (c = !0, a = Math.abs(a));
361        var e = String(Math.round(a * Math.pow(10, b)));
362        if (0 < b) {
363            var d = e.length;
364            if (d < b) {
365                var f;
366                for (f = 0; f < b - d; f++) e = "0" + e
367            }
368            d = e.substring(0, e.length - b);
369            "" === d && (d = 0);
370            e = d + "." + e.substring(e.length - b, e.length);
371            return c ? "-" + e : e
372        }
373        return String(e)
374    };
375    d.formatDuration = function(a, b, c, e, g, f) {
376        var h = d.intervals,
377            k = f.decimalSeparator;
378        if (a >= h[b].contains) {
379            var l = a - Math.floor(a / h[b].contains) * h[b].contains;
380            "ss" == b ? (l = d.formatNumber(l, f), 1 == l.split(k)[0].length && (l = "0" + l)) : l = d.roundTo(l, f.precision);
381            ("mm" == b || "hh" == b) && 10 > l && (l = "0" + l);
382            c = l + "" + e[b] + "" + c;
383            a = Math.floor(a / h[b].contains);
384            b = h[b].nextInterval;
385            return d.formatDuration(a, b, c, e, g, f)
386        }
387        "ss" == b && (a = d.formatNumber(a, f), 1 == a.split(k)[0].length && (a = "0" + a));
388        "mm" == b && (a = d.roundTo(a, f.precision));
389        ("mm" == b || "hh" == b) && 10 > a && (a = "0" + a);
390        c = a + "" + e[b] + "" + c;
391        if (h[g].count > h[b].count)
392            for (a = h[b].count; a < h[g].count; a++) b = h[b].nextInterval, "ss" == b || "mm" == b || "hh" == b ? c = "00" + e[b] + "" + c : "DD" == b && (c = "0" + e[b] + "" + c);
393        ":" == c.charAt(c.length - 1) && (c = c.substring(0, c.length - 1));
394        return c
395    };
396    d.formatNumber = function(a, b, c, e, g) {
397        a = d.roundTo(a, b.precision);
398        isNaN(c) && (c = b.precision);
399        var f = b.decimalSeparator;
400        b = b.thousandsSeparator;
401        void 0 == f && (f = ",");
402        void 0 == b && (b = " ");
403        var h;
404        h = 0 > a ? "-" : "";
405        a = Math.abs(a);
406        var k = String(a),
407            l = !1; - 1 != k.indexOf("e") && (l = !0);
408        0 <= c && !l && (k = d.toFixed(a, c));
409        var m = "";
410        if (l) m = k;
411        else {
412            var k = k.split("."),
413                l = String(k[0]),
414                n;
415            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);
416            void 0 !== k[1] && (m = m + f + k[1]);
417            void 0 !== c && 0 < c && "0" != m && (m = d.addZeroes(m, f, c))
418        }
419        m = h + m;
420        "" === h && !0 === e && 0 !== a && (m = "+" + m);
421        !0 === g && (m += "%");
422        return m
423    };
424    d.addZeroes = function(a, b, c) {
425        a = a.split(b);
426        void 0 === a[1] && 0 < c && (a[1] = "0");
427        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]
428    };
429    d.scientificToNormal = function(a) {
430        var b;
431        a = String(a).split("e");
432        var c;
433        if ("-" == a[1].substr(0, 1)) {
434            b = "0.";
435            for (c = 0; c < Math.abs(Number(a[1])) - 1; c++) b += "0";
436            b += a[0].split(".").join("")
437        } else {
438            var e = 0;
439            b = a[0].split(".");
440            b[1] && (e = b[1].length);
441            b = a[0].split(".").join("");
442            for (c = 0; c < Math.abs(Number(a[1])) - e; c++) b += "0"
443        }
444        return b
445    };
446    d.toScientific = function(a, b) {
447        if (0 === a) return "0";
448        var c = Math.floor(Math.log(Math.abs(a)) * Math.LOG10E),
449            e = String(e).split(".").join(b);
450        return String(e) + "e" + c
451    };
452    d.randomColor = function() {
453        return "#" + ("00000" + (16777216 * Math.random() << 0).toString(16)).substr(-6)
454    };
455    d.hitTest = function(a, b, c) {
456        var e = !1,
457            g = a.x,
458            f = a.x + a.width,
459            h = a.y,
460            k = a.y + a.height,
461            l = d.isInRectangle;
462        e || (e = l(g, h, b));
463        e || (e = l(g, k, b));
464        e || (e = l(f, h, b));
465        e || (e = l(f, k, b));
466        e || !0 === c || (e = d.hitTest(b, a, !0));
467        return e
468    };
469    d.isInRectangle = function(a, b, c) {
470        return a >= c.x - 5 && a <= c.x + c.width + 5 && b >= c.y - 5 && b <= c.y + c.height + 5 ? !0 : !1
471    };
472    d.isPercents = function(a) {
473        if (-1 != String(a).indexOf("%")) return !0
474    };
475    d.formatValue = function(a, b, c, e, g, f, h, k) {
476        if (b) {
477            void 0 === g && (g = "");
478            var l;
479            for (l = 0; l < c.length; l++) {
480                var m = c[l],
481                    n = b[m];
482                void 0 !== n && (n = f ? d.addPrefix(n, k, h, e) : d.formatNumber(n, e), a = a.replace(new RegExp("\\[\\[" + g + "" + m + "\\]\\]", "g"), n))
483            }
484        }
485        return a
486    };
487    d.formatDataContextValue = function(a, b) {
488        if (a) {
489            var c = a.match(/\[\[.*?\]\]/g),
490                e;
491            for (e = 0; e < c.length; e++) {
492                var d = c[e],
493                    d = d.substr(2, d.length - 4);
494                void 0 !== b[d] && (a = a.replace(new RegExp("\\[\\[" + d + "\\]\\]", "g"), b[d]))
495            }
496        }
497        return a
498    };
499    d.massReplace = function(a, b) {
500        for (var c in b)
501            if (b.hasOwnProperty(c)) {
502                var e = b[c];
503                void 0 === e && (e = "");
504                a = a.replace(c, e)
505            }
506        return a
507    };
508    d.cleanFromEmpty = function(a) {
509        return a.replace(/\[\[[^\]]*\]\]/g, "")
510    };
511    d.addPrefix = function(a, b, c, e, g) {
512        var f = d.formatNumber(a, e),
513            h = "",
514            k, l, m;
515        if (0 === a) return "0";
516        0 > a && (h = "-");
517        a = Math.abs(a);
518        if (1 < a)
519            for (k = b.length - 1; - 1 < k; k--) {
520                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, {
521                        precision: -1,
522                        decimalSeparator: e.decimalSeparator,
523                        thousandsSeparator: e.thousandsSeparator
524                    }
524), !g || l == c)) {
525                    f = h + "" + m + "" + b[k].prefix;
526                    break
527                }
528            } else
529                for (k = 0; k < c.length; k++)
530                    if (a <= c[k].number) {
531                        l = a / c[k].number;
532                        m = Math.abs(Math.floor(Math.log(l) * Math.LOG10E));
533                        l = d.roundTo(l, m);
534                        f = h + "" + l + "" + c[k].prefix;
535                        break
536                    }
537        return f
538    };
539    d.remove = function(a) {
540        a && a.remove()
541    };
542    d.getEffect = function(a) {
543        ">" == a && (a = "easeOutSine");
544        "<" == a && (a = "easeInSine");
545        "elastic" == a && (a = "easeOutElastic");
546        return a
547    };
548    d.getObjById = function(a, b) {
549        var c, e;
550        for (e = 0; e < a.length; e++) {
551            var d = a[e];
552            if (d.id == b) {
553                c = d;
554                break
555            }
556        }
557        return c
558    };
559    d.applyTheme = function(a, b, c) {
560        b || (b = d.theme);
561        try {
562            b = JSON.parse(JSON.stringify(b))
563        } catch (e) {}
564        b && b[c] && d.extend(a, b[c])
565    };
566    d.isString = function(a) {
567        return "string" == typeof a ? !0 : !1
568    };
569    d.extend = function(a, b, c) {
570        var e;
571        a || (a = {});
572        for (e in b) c ? a.hasOwnProperty(e) || (a[e] = b[e]) : a[e] = b[e];
573        return a
574    };
575    d.copyProperties = function(a, b) {
576        for (var c in a) a.hasOwnProperty(c) && "events" != c && void 0 !== a[c] && "function" != typeof a[c] && "cname" != c && (b[c] = a[c])
577    };
578    d.processObject = function(a, b, c, e) {
579        if (!1 === a instanceof b && (a = e ? d.extend(new b(c), a) : d.extend(a, new b(c), !0), a.listeners))
580            for (var g in a.listeners) b = a.listeners[g], a.addListener(b.event, b.method);
581        return a
582    };
583    d.fixNewLines = function(a) {
584        var b = RegExp("\\n", "g");
585        a && (a = a.replace(b, "<br />"));
586        return a
587    };
588    d.fixBrakes = function(a) {
589        if (d.isModern) {
590            var b = RegExp("<br>", "g");
591            a && (a = a.replace(b, "\n"))
592        } else a = d.fixNewLines(a);
593        return a
594    };
595    d.deleteObject = function(a, b) {
596        if (a) {
597            if (void 0 === b || null === b) b = 20;
598            if (0 !== b)
599                if ("[object Array]" === Object.prototype.toString.call(a))
600                    for (var c = 0; c < a.length; c++) d.deleteObject(a[c], b - 1), a[c] = null;
601                else if (a && !a.tagName) try {
602                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))
603            } catch (e) {}
604        }
605    };
606    d.bounce = function(a, b, c, e, d) {
607        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
608    };
609    d.easeInOutQuad = function(a, b, c, e, d) {
610        b /= d / 2;
611        if (1 > b) return e / 2 * b * b + c;
612        b--;
613        return -e / 2 * (b * (b - 2) - 1) + c
614    };
615    d.easeInSine = function(a, b, c, e, d) {
616        return -e * Math.cos(b / d * (Math.PI / 2)) + e + c
617    };
618    d.easeOutSine = function(a, b, c, e, d) {
619        return e * Math.sin(b / d * (Math.PI / 2)) + c
620    };
621    d.easeOutElastic = function(a, b, c, e, d) {
622        a = 1.70158;
623        var f = 0,
624            h = e;
625        if (0 === b) return c;
626        if (1 == (b /= d)) return c + e;
627        f || (f = .3 * d);
628        h < Math.abs(e) ? (h = e, a = f / 4) : a = f / (2 * Math.PI) * Math.asin(e / h);
629        return h * Math.pow(2, -10 * b) * Math.sin(2 * (b * d - a) * Math.PI / f) + e + c
630    };
631    d.fixStepE = function(a) {
632        a = a.toExponential(0).split("e");
633        var b = Number(a[1]);
634        9 == Number(a[0]) && b++;
635        return d.generateNumber(1, b)
636    };
637    d.generateNumber = function(a, b) {
638        var c = "",
639            e;
640        e = 0 > b ? Math.abs(b) - 1 : Math.abs(b);
641        var d;
642        for (d = 0; d < e; d++) c += "0";
643        return 0 > b ? Number("0." + c + String(a)) : Number(String(a) + c)
644    };
645    d.setCN = function(a, b, c, e) {
646        if (a.addClassNames && b && (b = b.node) && c) {
647            var d = b.getAttribute("class");
648            a = a.classNamePrefix + "-";
649            e && (a = "");
650            d ? b.setAttribute("class", d + " " + a + c) : b.setAttribute("class", a + c)
651        }
652    };
653    d.removeCN = function(a, b, c) {
654        b && (b = b.node) && c && (b = b.classList) && b.remove(a.classNamePrefix + "-" + c)
655    };
656    d.parseDefs = function(a, b) {
657        for (var c in a) {
658            var e = typeof a[c];
659            if (0 < a[c].length && "object" == e)
660                for (var g = 0; g < a[c].length; g++) e = document.createElementNS(d.SVG_NS, c), b.appendChild(e), d.parseDefs(a[c][g], e);
661            else "object" == e ? (e = document.createElementNS(d.SVG_NS, c), b.appendChild(e), d.parseDefs(a[c], e)) : b.setAttribute(c, a[c])
662        }
663    }
664})();
665(function() {
666    var d = window.AmCharts;
667    d.AxisBase = d.Class({
668        construct: function(a) {
669            this.createEvents("clickItem", "rollOverItem", "rollOutItem", "rollOverGuide", "rollOutGuide", "clickGuide");
670            this.titleDY = this.y = this.x = this.dy = this.dx = 0;
671            this.axisThickness = 1;
672            this.axisColor = "#000000";
673            this.axisAlpha = 1;
674            this.gridCount = this.tickLength = 5;
675            this.gridAlpha = .15;
676            this.gridThickness = 1;
677            this.gridColor = "#000000";
678            this.dashLength = 0;
679            this.labelFrequency = 1;
680            this.showLastLabel = this.showFirstLabel = !0;
681            this.fillColor = "#FFFFFF";
682            this.fillAlpha = 0;
683            this.labelsEnabled = !0;
684            this.labelRotation = 0;
685            this.autoGridCount = !0;
686            this.offset = 0;
687            this.guides = [];
688            this.visible = !0;
689            this.counter = 0;
690            this.guides = [];
691            this.ignoreAxisWidth = this.inside = !1;
692            this.minHorizontalGap = 75;
693            this.minVerticalGap = 35;
694            this.titleBold = !0;
695            this.minorGridEnabled = !1;
696            this.minorGridAlpha = .07;
697            this.autoWrap = !1;
698            this.titleAlign = "middle";
699            this.labelOffset = 0;
700            this.bcn = "axis-";
701            this.centerLabels = !1;
702            this.firstDayOfWeek = 1;
703            this.centerLabelOnFullPeriod = this.markPeriodChange = this.boldPeriodBeginning = !0;
704            this.titleWidth = 0;
705            this.periods = [{
706                period: "fff",
707                count: 1
708            }, {
709                period: "fff",
710                count: 5
711            }, {
712                period: "fff",
713                count: 10
714            }, {
715                period: "fff",
716                count: 50
717            }, {
718                period: "fff",
719                count: 100
720            }, {
721                period: "fff",
722                count: 500
723            }, {
724                period: "ss",
725                count: 1
726            }, {
727                period: "ss",
728                count: 5
729            }, {
730                period: "ss",
731                count: 10
732            }, {
733                period: "ss",
734                count: 30
735            }, {
736                period: "mm",
737                count: 1
738            }, {
739                period: "mm",
740                count: 5
741            }, {
742                period: "mm",
743                count: 10
744            }, {
745                period: "mm",
746                count: 30
747            }, {
748                period: "hh",
749                count: 1
750            }, {
751                period: "hh",
752                count: 3
753            }, {
754                period: "hh",
755                count: 6
756            }, {
757                period: "hh",
758                count: 12
759            }, {
760                period: "DD",
761                count: 1
762            }, {
763                period: "DD",
764                count: 2
765            }, {
766                period: "DD",
767                count: 3
768            }, {
769                period: "DD",
770                count: 4
771            }, {
772                period: "DD",
773                count: 5
774            }, {
775                period: "WW",
776                count: 1
777            }, {
778                period: "MM",
779                count: 1
780            }, {
781                period: "MM",
782                count: 2
783            }, {
784                period: "MM",
785                count: 3
786            }, {
787                period: "MM",
788                count: 6
789            }, {
790                period: "YYYY",
791                count: 1
792            }, {
793                period: "YYYY",
794                count: 2
795            }, {
796                period: "YYYY",
797                count: 5
798            }, {
799                period: "YYYY",
800                count: 10
801            }, {
802                period: "YYYY",
803                count: 50
804            }, {
805                period: "YYYY",
806                count: 100
807            }];
808            this.dateFormats = [{
809                period: "fff",
810                format: "NN:SS.QQQ"
811            }, {
812                period: "ss",
813                format: "JJ:NN:SS"
814            }, {
815                period: "mm",
816                format: "JJ:NN"
817            }, {
818                period: "hh",
819                format: "JJ:NN"
820            }, {
821                period: "DD",
822                format: "MMM DD"
823            }, {
824                period: "WW",
825                format: "MMM DD"
826            }, {
827                period: "MM",
828                format: "MMM"
829            }, {
830                period: "YYYY",
831                format: "YYYY"
832            }];
833            this.nextPeriod = {
834                fff: "ss",
835                ss: "mm",
836                mm: "hh",
837                hh: "DD",
838                DD: "MM",
839                MM: "YYYY"
840            };
841            d.applyTheme(this, a, "AxisBase")
842        },
843        zoom: function(a, b) {
844            this.start = a;
845            this.end = b;
846            this.dataChanged = !0;
847            this.draw()
848        },
849        fixAxisPosition: function() {
850            var a = this.position;
851            "H" == this.orientation ? ("left" == a && (a = "bottom"), "right" == a && (a = "top")) : ("bottom" == a && (a = "left"), "top" == a && (a = "right"));
852            this.position = a
853        },
854        init: function() {
855            this.createBalloon()
856        },
857        draw: function() {
858            var a = this.chart;
859            this.prevBY = this.prevBX = NaN;
860            this.allLabels = [];
861            this.counter = 0;
862            this.destroy();
863            this.fixAxisPosition();
864            this.setBalloonBounds();
865            this.labels = [];
866            var b = a.container,
867                c = b.set();
868            a.gridSet.push(c);
869            this.set = c;
870            b = b.set();
871            a.axesLabelsSet.push(b);
872            this.labelsSet = b;
873            this.axisLine = new this.axisRenderer(this);
874            this.autoGridCount ? ("V" == this.orientation ? (a = this.height / this.minVerticalGap, 3 > a && (a = 3)) : a = this.width / this.minHorizontalGap, this.gridCountR = Math.max(a, 1)) : this.gridCountR = this.gridCount;
875            this.axisWidth = this.axisLine.axisWidth;
876            this.addTitle()
877        },
878        setOrientation: function(a) {
879            this.orientation = a ? "H" : "V"
880        },
881        addTitle: function() {
882            var a = this.title;
883            this.titleLabel = null;
884            if (a) {
885                var b = this.chart,
886                    c = this.titleColor;
887                void 0 === c && (c = b.color);
888                var e = this.titleFontSize;
889                isNaN(e) && (e = b.fontSize + 1);
890                a = d.text(b.container, a, c, b.fontFamily, e, this.titleAlign, this.titleBold);
891                d.setCN(b, a, this.bcn + "title");
892                this.titleLabel = a
893            }
894        },
895        positionTitle: function() {
896            var a = this.titleLabel;
897            if (a) {
898                var b, c, e = this.labelsSet,
899                    g = {};
900                0 < e.length() ? g = e.getBBox() : (g.x = 0, g.y = 0, g.width = this.width, g.height = this.height, d.VML && (g.y += this.y, g.x += this.x));
901                e.push(a);
902                var e = g.x,
903                    f = g.y;
904                d.VML && (f -= this.y, e -= this.x);
905                var h = g.width,
906                    g = g.height,
907                    k = this.width,
908                    l = this.height,
909                    m = 0,
910                    n = a.getBBox().height / 2,
911                    q = this.inside,
912                    p = this.titleAlign;
913                switch (this.position) {
914                    case "top":
915                        b = "left" == p ? -1 : "right" == p ? k : k / 2;
916                        c = f - 10 - n;
917                        break;
918                    case "bottom":
919                        b = "left" == p ? -1 : "right" == p ? k : k / 2;
920                        c = f + g + 10 + n;
921                        break;
922                    case "left":
923                        b = e - 10 - n;
924                        q && (b -= 5);
925                        m = -90;
926                        c = ("left" == p ? l + 1 : "right" == p ? -1 : l / 2) + this.titleDY;
927                        this.titleWidth = n + 10;
928                        break;
929                    case "right":
930                        b = e + h + 10 + n, q && (b += 7), c = ("left" == p ? l + 2 : "right" == p ? -2 : l / 2) + this.titleDY, this.titleWidth = n + 10, m = -90
931                }
932                this.marginsChanged ? (a.translate(b, c), this.tx = b, this.ty = c) : a.translate(this.tx, this.ty);
933                this.marginsChanged = !1;
934                isNaN(this.titleRotation) || (m = this.titleRotation);
935                0 !== m && a.rotate(m)
936            }
937        },
938        pushAxisItem: function(a, b) {
939            var c = this,
940                e = a.graphics();
941            0 < e.length() && (b ? c.labelsSet.push(e) : c.set.push(e));
942            if (e = a.getLabel()) c.labelsSet.push(e), e.click(function(b) {
943                c.handleMouse(b, a, "clickItem")
944            }).touchend(function(b) {
945                c.handleMouse(b, a, "clickItem")
946            }).mouseover(function(b) {
947                c.handleMouse(b, a, "rollOverItem")
948            }).mouseout(function(b) {
949                c.handleMouse(b, a, "rollOutItem")
950            })
951        },
952        handleMouse: function(a, b, c) {
953            this.fire({
954                type: c,
955                value: b.value,
956                serialDataItem: b.serialDataItem,
957                axis: this,
958                target: b.label,
959                chart: this.chart,
960                event: a
961            })
962        },
963        addGuide: function(a) {
964            for (var b = this.guides, c = !1, e = b.length, g = 0; g < b.length; g++) b[g] == a && (c = !0, e = g);
965            a = d.processObject(a, d.Guide, this.theme);
966            a.id || (a.id = "guideAuto" + e + "_" + (new Date).getTime());
967            c || b.push(a)
968        },
969        removeGuide: function(a) {
970            var b = this.guides,
971                c;
972            for (c = 0; c < b.length; c++) b[c] == a && b.splice(c, 1)
973        },
974        handleGuideOver: function(a) {
975            clearTimeout(this.chart.hoverInt);
976            var b = {
977                x: 0,
978                y: 0,
979                width: 0,
980                height: 0
981            };
982            a.graphics && (b = a.graphics.getBBox());
983            var c = this.x + b.x + b.width / 2,
984                b = this.y + b.y + b.height / 2,
985                e = a.fillColor;
986            void 0 === e && (e = a.lineColor);
987            this.chart.showBalloon(a.balloonText, e, !0, c, b);
988            this.fire({
989                type: "rollOverGuide",
990                guide: a,
991                chart: this.chart
992            })
993        },
994        handleGuideOut: function(a) {
995            this.chart.hideBalloon();
996            this.fire({
997                type: "rollOutGuide",
998                guide: a,
999                chart: this.chart
1000            })
1001        },
1002        handleGuideClick: function(a) {
1003            this.chart.hideBalloon();
1004            this.fire({
1005                type: "clickGuide",
1006                guide: a,
1007                chart: this.chart
1008            })
1009        },
1010        addEventListeners: function(a, b) {
1011            var c = this;
1012            a.mouseover(function() {
1013                c.handleGuideOver(b)
1014            });
1015            a.mouseup(function() {
1016                c.handleGuideClick(b)
1017            });
1018            a.touchstart(function() {
1019                c.handleGuideOver(b)
1020            });
1021            a.mouseout(function() {
1022                c.handleGuideOut(b)
1023            })
1024        },
1025        getBBox: function() {
1026            var a;
1027            this.labelsSet && (a = this.labelsSet.getBBox());
1028            a ? d.VML || (a = {
1029                x: a.x + this.x,
1030                y: a.y + this.y,
1031                width: a.width,
1032                height: a.height
1033            }) : a = {
1034                x: 0,
1035                y: 0,
1036                width: 0,
1037                height: 0
1038            };
1039            return a
1040        },
1041        destroy: function() {
1042            d.remove(this.set);
1043            d.remove(this.labelsSet);
1044            var a = this.axisLine;
1045            a && d.remove(a.axisSet);
1046            d.remove(this.grid0)
1047        },
1048        chooseMinorFrequency: function(a) {
1049            for (var b = 10; 0 < b; b--)
1050                if (a / b == Math.round(a / b)) return a / b
1051        },
1052        parseDatesDraw: function() {
1053            var a, b = this.chart,
1054                c = this.showFirstLabel,
1055                e = this.showLastLabel,
1056                g, f = "",
1057                h = d.extractPeriod(this.minPeriod),
1058                k = d.getPeriodDuration(h.period, h.count),
1059                l, m, n, q, p, t = this.firstDayOfWeek,
1060                r = this.boldPeriodBeginning;
1061            a = this.minorGridEnabled;
1062            var w, z = this.gridAlpha,
1063                x, u = this.choosePeriod(0),
1064                A = u.period,
1065                u = u.count,
1066                y = d.getPeriodDuration(A, u);
1067            y < k && (A = h.period, u = h.count, y = k);
1068            h = A;
1069            "WW" == h && (h = "DD");
1070            this.stepWidth = this.getStepWidth(this.timeDifference);
1071            var B = Math.ceil(this.timeDifference / y) + 5,
1072                D = l = d.resetDateToMin(new Date(this.startTime - y), A, u, t).getTime();
1073            if (h == A && 1 == u && this.centerLabelOnFullPeriod || this.autoWrap || this.centerLabels) n = y * this.stepWidth, this.autoWrap && !this.centerLabels && (n = -n);
1074            this.cellWidth = k * this.stepWidth;
1075            q = Math.round(l / y);
1076            k = -1;
1077            q / 2 == Math.round(q / 2) && (k = -2, l -= y);
1078            q = this.firstTime;
1079            var C = 0,
1080                I = 0;
1081            a && 1 < u && (w = this.chooseMinorFrequency(u), x = d.getPeriodDuration(A, w), "DD" == A && (x += d.getPeriodDuration("hh")), "fff" == A && (x = 1));
1082            if (0 < this.gridCountR)
1083                for (B - 5 - k > this.autoRotateCount && !isNaN(this.autoRotateAngle) && (this.labelRotationR = this.autoRotateAngle), a = k; a <= B; a++) {
1084                    p = q + y * (a + Math.floor((D - q) / y)) - C;
1085                    "DD" == A && (p += 36E5);
1086                    p = d.resetDateToMin(new Date(p), A, u, t).getTime();
1087                    "MM" == A && (g = (p - l) / y, 1.5 <= (p - l) / y && (p = p - (g - 1) * y + d.getPeriodDuration("DD", 3), p = d.resetDateToMin(new Date(p), A, 1).getTime(), C += y));
1088                    g = (p - this.startTime) * this.stepWidth;
1089                    if ("radar" == b.type) {
1090                        if (g = this.axisWidth - g, 0 > g || g > this.axisWidth) continue
1091                    } else this.rotate ? "date" == this.type && "middle" == this.gridPosition && (I = -y * this.stepWidth / 2) : "date" == this.type && (g = this.axisWidth - g);
1092                    f = !1;
1093                    this.nextPeriod[h] && (f = this.checkPeriodChange(this.nextPeriod[h], 1, p, l, h));
1094                    l = !1;
1095                    f && this.markPeriodChange ? (f = this.dateFormatsObject[this.nextPeriod[h]], this.twoLineMode && (f = this.dateFormatsObject[h] + "\n" + f, f = d.fixBrakes(f)), l = !0) : f = this.dateFormatsObject[h];
1096                    r || (l = !1);
1097                    this.currentDateFormat = f;
1098                    f = d.formatDate(new Date(p), f, b);
1099                    if (a == k && !c || a == B && !e) f = " ";
1100                    this.labelFunction && (f = this.labelFunction(f, new Date(p), this, A, u, m).toString());
1101                    this.boldLabels && (l = !0);
1102                    m = new this.axisItemRenderer(this, g, f, !1, n, I, !1, l);
1103                    this.pushAxisItem(m);
1104                    m = l = p;
1105                    if (!isNaN(w))
1106                        for (g = 1; g < u; g += w) this.gridAlpha = this.minorGridAlpha, f = p + x * g, f = d.resetDateToMin(new Date(f), A, w, t).getTime(), f = new this.axisItemRenderer(this, (f - this.startTime) * this.stepWidth, void 0, void 0, void 0, void 0, void 0, void 0, void 0, !0), this.pushAxisItem(f);
1107                    this.gridAlpha = z
1108                }
1109        },
1110        choosePeriod: function(a) {
1111            var b = d.getPeriodDuration(this.periods[a].period, this.periods[a].count),
1112                c = this.periods;
1113            return this.timeDifference < b && 0 < a ? c[a - 1] : Math.ceil(this.timeDifference / b) <= this.gridCountR ? c[a] : a + 1 < c.length ? this.choosePeriod(a + 1) : c[a]
1114        },
1115        getStepWidth: function(a) {
1116            var b;
1117            this.startOnAxis ? (b = this.axisWidth / (a - 1), 1 == a && (b = this.axisWidth)) : b = this.axisWidth / a;
1118            return b
1119        },
1120        timeZoom: function(a, b) {
1121            this.startTime = a;
1122            this.endTime = b
1123        },
1124        minDuration: function() {
1125            var a = d.extractPeriod(this.minPeriod);
1126            return d.getPeriodDuration(a.period, a.count)
1127        },
1128        checkPeriodChange: function(a, b, c, e, g) {
1129            c = new Date(c);
1130            var f = new Date(e),
1131                h = this.firstDayOfWeek;
1132            e = b;
1133            "DD" == a && (b = 1);
1134            c = d.resetDateToMin(c, a, b, h).getTime();
1135            b = d.resetDateToMin(f, a, b, h).getTime();
1136            return "DD" == a && "hh" != g && c - b < d.getPeriodDuration(a, e) - d.getPeriodDuration("hh", 1) ? !1 : c != b ? !0 : !1
1137        },
1138        generateDFObject: function() {
1139            this.dateFormatsObject = {};
1140            var a;
1141            for (a = 0; a < this.dateFormats.length; a++) {
1142                var b = this.dateFormats[a];
1143                this.dateFormatsObject[b.period] = b.format
1144            }
1145        },
1146        hideBalloon: function() {
1147            this.balloon && this.balloon.hide && this.balloon.hide();
1148            this.prevBY = this.prevBX = NaN
1149        },
1150        formatBalloonText: function(a) {
1151            return a
1152        },
1153        showBalloon: function(a, b, c, e) {
1154            var d = this.offset;
1155            switch (this.position) {
1156                case "bottom":
1157                    b = this.height + d;
1158                    break;
1159                case "top":
1160                    b = -d;
1161                    break;
1162                case "left":
1163                    a = -d;
1164                    break;
1165                case "right":
1166                    a = this.width + d
1167            }
1168            c || (c = this.currentDateFormat);
1169            if ("V" == this.orientation) {
1170                if (0 > b || b > this.height) return;
1171                if (isNaN(b)) {
1172                    this.hideBalloon();
1173                    return
1174                }
1175                b = this.adjustBalloonCoordinate(b, e);
1176                e = this.coordinateToValue(b)
1177            } else {
1178                if (0 > a || a > this.width) return;
1179                if (isNaN(a)) {
1180                    this.hideBalloon();
1181                    return
1182                }
1183                a = this.adjustBalloonCoordinate(a, e);
1184                e = this.coordinateToValue(a)
1185            }
1186            var f;
1187            if (d = this.chart.chartCursor) f = d.index;
1188            if (this.balloon && void 0 !== e && this.balloon.enabled) {
1189                if (this.balloonTextFunction) {
1190                    if ("date" == this.type || !0 === this.parseDates) e = new Date(e);
1191                    e = this.balloonTextFunction(e)
1192                } else this.balloonText ? e = this.formatBalloonText(this.balloonText, f, c) : isNaN(e) || (e = this.formatValue(e, c));
1193                if (a != this.prevBX || b != this.prevBY) this.balloon.setPosition(a, b), this.prevBX = a, this.prevBY = b, e && this.balloon.showBalloon(e)
1194            }
1195        },
1196        adjustBalloonCoordinate: function(a) {
1197            return a
1198        },
1199        createBalloon: function() {
1200            var a = this.chart,
1201                b = a.chartCursor;
1202            b && (b = b.cursorPosition, "mouse" != b && (this.stickBalloonToCategory = !0), "start" == b && (this.stickBalloonToStart = !0), "ValueAxis" == this.cname && (this.stickBalloonToCategory = !1));
1203            this.balloon && (this.balloon.destroy && this.balloon.destroy(), d.extend(this.balloon, a.balloon, !0))
1204        },
1205        setBalloonBounds: function() {
1206            var a = this.balloon;
1207            if (a) {
1208                var b = this.chart;
1209                a.cornerRadius = 0;
1210                a.shadowAlpha = 0;
1211                a.borderThickness = 1;
1212                a.borderAlpha = 1;
1213                a.adjustBorderColor = !1;
1214                a.showBullet = !1;
1215                this.balloon = a;
1216                a.chart = b;
1217                a.mainSet = b.plotBalloonsSet;
1218                a.pointerWidth = this.tickLength;
1219                if (this.parseDates || "date" == this.type) a.pointerWidth = 0;
1220                a.className = this.id;
1221                b = "V";
1222                "V" == this.orientation && (b = "H");
1223                this.stickBalloonToCategory || (a.animationDuration = 0);
1224                var c, e, d, f, h = this.inside,
1225                    k = this.width,
1226                    l = this.height;
1227                switch (this.position) {
1228                    case "bottom":
1229                        c = 0;
1230                        e = k;
1231                        h ? (d = 0, f = l) : (d = l, f = l + 1E3);
1232                        break;
1233                    case "top":
1234                        c = 0;
1235                        e = k;
1236                        h ? (d = 0, f = l) : (d = -1E3, f = 0);
1237                        break;
1238                    case "left":
1239                        d = 0;
1240                        f = l;
1241                        h ? (c = 0, e = k) : (c = -1E3, e = 0);
1242                        break;
1243                    case "right":
1244                        d = 0, f = l, h ? (c = 0, e = k) : (c = k, e = k + 1E3)
1245                }
1246                a.drop || (a.pointerOrientation = b);
1247                a.setBounds(c, d, e, f)
1248            }
1249        }
1250    })
1251})();
1252(function() {
1253    var d = window.AmCharts;
1254    d.ValueAxis = d.Class({
1255        inherits: d.AxisBase,
1256        construct: function(a) {
1257            this.cname = "ValueAxis";
1258            this.createEvents("axisChanged", "logarithmicAxisFailed", "axisZoomed", "axisIntZoomed");
1259            d.ValueAxis.base.construct.call(this, a);
1260            this.dataChanged = !0;
1261            this.stackType = "none";
1262            this.position = "left";
1263            this.unitPosition = "right";
1264            this.includeAllValues = this.recalculateToPercents = this.includeHidden = this.includeGuidesInMinMax = this.integersOnly = !1;
1265            this.durationUnits = {
1266                DD: "d. ",
1267                hh: ":",
1268                mm: ":",
1269                ss: ""
1270            };
1271            this.scrollbar = !1;
1272            this.baseValue = 0;
1273            this.radarCategoriesEnabled = !0;
1274            this.axisFrequency = 1;
1275            this.gridType = "polygons";
1276            this.useScientificNotation = !1;
1277            this.axisTitleOffset = 10;
1278            this.pointPosition = "axis";
1279            this.minMaxMultiplier = 1;
1280            this.logGridLimit = 2;
1281            this.totalTextOffset = this.treatZeroAs = 0;
1282            this.minPeriod = "ss";
1283            this.relativeStart = 0;
1284            this.relativeEnd = 1;
1285            d.applyTheme(this, a, this.cname)
1286        },
1287        updateData: function() {
1288            0 >= this.gridCountR && (this.gridCountR = 1);
1289            this.totals = [];
1290            this.data = this.chart.chartData;
1291            var a = this.chart;
1292            "xy" != a.type && (this.stackGraphs("smoothedLine"), this.stackGraphs("line"), this.stackGraphs("column"), this.stackGraphs("step"));
1293            this.recalculateToPercents && this.recalculate();
1294            if (this.synchronizationMultiplier && this.synchronizeWith) d.isString(this.synchronizeWith) && (this.synchronizeWith = a.getValueAxisById(this.synchronizeWith)), this.synchronizeWith && (this.synchronizeWithAxis(this.synchronizeWith), this.foundGraphs = !0);
1295            else if (this.foundGraphs = !1, this.getMinMax(), 0 === this.start && this.end == this.data.length - 1 && isNaN(this.minZoom) && isNaN(this.maxZoom) || isNaN(this.fullMin) && isNaN(this.fullMax)) this.fullMin = this.min, this.fullMax = this.max, "date" != this.type && this.strictMinMax && (isNaN(this.minimum) || (this.fullMin = this.minimum), isNaN(this.maximum) || (this.fullMax = this.maximum)), this.logarithmic && (this.fullMin = this.logMin, 0 === this.fullMin && (this.fullMin = this.treatZeroAs)), "date" == this.type && (this.minimumDate || (this.fullMin = this.minRR), this.maximumDate || (this.fullMax = this.maxRR), this.strictMinMax && (this.minimumDate && (this.fullMin = this.minimumDate.getTime()), this.maximumDate && (this.fullMax = this.maximumDate.getTime())))
1296        },
1297        draw: function() {
1298            d.ValueAxis.base.draw.call(this);
1299            var a = this.chart,
1300                b = this.set;
1301            this.labelRotationR = this.labelRotation;
1302            d.setCN(a, this.set, "value-axis value-axis-" + this.id);
1303            d.setCN(a, this.labelsSet, "value-axis value-axis-" + this.id);
1304            d.setCN(a, this.axisLine.axisSet, "value-axis value-axis-" + this.id);
1305            var c = this.type;
1306            "duration" == c && (this.duration = "ss");
1307            !0 === this.dataChanged && (this.updateData(), this.dataChanged = !1);
1308            "date" == c && (this.logarithmic = !1, this.min = this.minRR, this.max = this.maxRR, this.reversed = !1, this.getDateMinMax());
1309            if (this.logarithmic) {
1310                var e = this.treatZeroAs,
1311                    g = this.getExtremes(0, this.data.length - 1).min;
1312                !isNaN(this.minimum) && this.minimum < g && (g = this.minimum);
1313                this.logMin = g;
1314                this.minReal < g && (this.minReal = g);
1315                isNaN(this.minReal) && (this.minReal = g);
1316                0 < e && 0 === g && (this.minReal = g = e);
1317                if (0 >= g || 0 >= this.minimum) {
1318                    this.fire({
1319                        type: "logarithmicAxisFailed",
1320                        chart: a
1321                    });
1322                    return
1323                }
1324            }
1325            this.grid0 = null;
1326            var f, h, k = a.dx,
1327                l = a.dy,
1328                e = !1,
1329                g = this.logarithmic;
1330            if (isNaN(this.min) || isNaN(this.max) || !this.foundGraphs || Infinity == this.min || -Infinity == this.max) e = !0;
1331            else {
1332                "date" == this.type && this.min == this.max && (this.max += this.minDuration(), this.min -= this.minDuration());
1333                var m = this.labelFrequency,
1334                    n = this.showFirstLabel,
1335                    q = this.showLastLabel,
1336                    p = 1,
1337                    t = 0;
1338                this.minCalc = this.min;
1339                this.maxCalc = this.max;
1340                if (this.strictMinMax && (isNaN(this.minimum) || (this.min = this.minimum), isNaN(this.maximum) || (this.max = this.maximum), this.min == this.max)) return;
1341                isNaN(this.minZoom) || (this.minReal = this.min = this.minZoom);
1342                isNaN(this.maxZoom) || (this.max = this.maxZoom);
1343                if (this.logarithmic) {
1344                    h = this.fullMin;
1345                    var r = this.fullMax;
1346                    isNaN(this.minimum) || (h = this.minimum);
1347                    isNaN(this.maximum) || (r = this.maximum);
1348                    var r = Math.log(r) * Math.LOG10E - Math.log(h) * Math.LOG10E,
1349                        w = Math.log(this.max) / Math.LN10 - Math.log(h) * Math.LOG10E;
1350                    this.relativeStart = d.roundTo((Math.log(this.minReal) / Math.LN10 - Math.log(h) * Math.LOG10E) / r, 5);
1351                    this.relativeEnd = d.roundTo(w / r, 5)
1352                } else this.relativeStart = d.roundTo(d.fitToBounds((this.min - this.fullMin) / (this.fullMax - this.fullMin), 0, 1), 5), this.relativeEnd = d.roundTo(d.fitToBounds((this.max - this.fullMin) / (this.fullMax - this.fullMin), 0, 1), 5);
1353                var r = Math.round((this.maxCalc - this.minCalc) / this.step) + 1,
1354                    z;
1355                !0 === g ? (z = Math.log(this.max) * Math.LOG10E - Math.log(this.minReal) * Math.LOG10E, this.stepWidth = this.axisWidth / z, z > this.logGridLimit && (r = Math.ceil(Math.log(this.max) * Math.LOG10E) + 1, t = Math.round(Math.log(this.minReal) * Math.LOG10E), r > this.gridCountR && (p = Math.ceil(r / this.gridCountR)))) : this.stepWidth = this.axisWidth / (this.max - this.min);
1356                var x = 0;
1357                1 > this.step && -1 < this.step && (x = d.getDecimals(this.step));
1358                this.integersOnly && (x = 0);
1359                x > this.maxDecCount && (x = this.maxDecCount);
1360                w = this.precision;
1361                isNaN(w) || (x = w);
1362                isNaN(this.maxZoom) && (this.max = d.roundTo(this.max, this.maxDecCount), this.min = d.roundTo(this.min, this.maxDecCount));
1363                h = {};
1364                h.precision = x;
1365                h.decimalSeparator = a.nf.decimalSeparator;
1366                h.thousandsSeparator = a.nf.thousandsSeparator;
1367                this.numberFormatter = h;
1368                var u;
1369                this.exponential = !1;
1370                for (h = t; h < r; h += p) {
1371                    var A = d.roundTo(this.step * h + this.min, x); - 1 != String(A).indexOf("e") && (this.exponential = !0)
1372                }
1373                this.duration && (this.maxInterval = d.getMaxInterval(this.max, this.duration));
1374                var x = this.step,
1375                    y, A = this.minorGridAlpha;
1376                this.minorGridEnabled && (y = this.getMinorGridStep(x, this.stepWidth * x));
1377                if (this.autoGridCount || 0 !== this.gridCount)
1378                    if ("date" == c) this.generateDFObject(), this.timeDifference = this.max - this.min, this.maxTime = this.lastTime = this.max, this.startTime = this.firstTime = this.min, this.parseDatesDraw();
1379                    else
1380                        for (r >= this.autoRotateCount && !isNaN(this.autoRotateAngle) && (this.labelRotationR = this.autoRotateAngle), c = this.minCalc, g && (r++, c = this.maxCalc - r * x), this.gridCountReal = r, h = this.startCount = t; h < r; h += p)
1381                            if (t = x * h + c, t = d.roundTo(t, this.maxDecCount + 1), !this.integersOnly || Math.round(t) == t)
1382                                if (isNaN(w) || Number(d.toFixed(t, w)) == t) {
1383                                    if (!0 === g)
1384                                        if (z > this.logGridLimit) {
1385                                            if (t = Math.pow(10, h), t > this.max) continue
1386                                        } else if (0 >= t && (t = c + x * h + x / 2, 0 >= t)) continue;
1387                                    u = this.formatValue(t, !1, h);
1388                                    Math.round(h / m) != h / m && (u = void 0);
1389                                    if (0 === h && !n || h == r - 1 && !q) u = " ";
1390                                    f = this.getCoordinate(t);
1391                                    var B;
1392                                    this.rotate && this.autoWrap && (B = this.stepWidth * x - 10);
1393                                    u = new this.axisItemRenderer(this, f, u, void 0, B, void 0, void 0, this.boldLabels);
1394                                    this.pushAxisItem(u);
1395                                    if (t == this.baseValue && "radar" != a.t
1395ype) {
1396                                        var D, C, I = this.width,
1397                                            H = this.height;
1398                                        "H" == this.orientation ? 0 <= f && f <= I + 1 && (D = [f, f, f + k], C = [H, 0, l]) : 0 <= f && f <= H + 1 && (D = [0, I, I + k], C = [f, f, f + l]);
1399                                        D && (f = d.fitToBounds(2 * this.gridAlpha, 0, 1), isNaN(this.zeroGridAlpha) || (f = this.zeroGridAlpha), f = d.line(a.container, D, C, this.gridColor, f, 1, this.dashLength), f.translate(this.x, this.y), this.grid0 = f, a.axesSet.push(f), f.toBack(), d.setCN(a, f, this.bcn + "zero-grid-" + this.id), d.setCN(a, f, this.bcn + "zero-grid"))
1400                                    }
1401                                    if (!isNaN(y) && 0 < A && h < r - 1) {
1402                                        f = x / y;
1403                                        g && (y = x * (h + p) + this.minCalc, y = d.roundTo(y, this.maxDecCount + 1), z > this.logGridLimit && (y = Math.pow(10, h + p)), f = 9, y = (y - t) / f);
1404                                        I = this.gridAlpha;
1405                                        this.gridAlpha = this.minorGridAlpha;
1406                                        for (H = 1; H < f; H++) {
1407                                            var Q = this.getCoordinate(t + y * H),
1408                                                Q = new this.axisItemRenderer(this, Q, "", !1, 0, 0, !1, !1, 0, !0);
1409                                            this.pushAxisItem(Q)
1410                                        }
1411                                        this.gridAlpha = I
1412                                    }
1413                                }
1414                z = this.guides;
1415                B = z.length;
1416                if (0 < B) {
1417                    D = this.fillAlpha;
1418                    for (h = this.fillAlpha = 0; h < B; h++) C = z[h], k = NaN, y = C.above, isNaN(C.toValue) || (k = this.getCoordinate(C.toValue), u = new this.axisItemRenderer(this, k, "", !0, NaN, NaN, C), this.pushAxisItem(u, y)), l = NaN, isNaN(C.value) || (l = this.getCoordinate(C.value), u = new this.axisItemRenderer(this, l, C.label, !0, NaN, (k - l) / 2, C), this.pushAxisItem(u, y)), isNaN(k) && (l -= 3, k = l + 3), u && (m = u.label) && this.addEventListeners(m, C), isNaN(k - l) || 0 > l && 0 > k || (k = new this.guideFillRenderer(this, l, k, C), this.pushAxisItem(k, y), y = k.graphics(), C.graphics = y, this.addEventListeners(y, C));
1419                    this.fillAlpha = D
1420                }
1421                u = this.baseValue;
1422                this.min > this.baseValue && this.max > this.baseValue && (u = this.min);
1423                this.min < this.baseValue && this.max < this.baseValue && (u = this.max);
1424                g && u < this.minReal && (u = this.minReal);
1425                this.baseCoord = this.getCoordinate(u, !0);
1426                u = {
1427                    type: "axisChanged",
1428                    target: this,
1429                    chart: a
1430                };
1431                u.min = g ? this.minReal : this.min;
1432                u.max = this.max;
1433                this.fire(u);
1434                this.axisCreated = !0
1435            }
1436            g = this.axisLine.set;
1437            u = this.labelsSet;
1438            b.translate(this.x, this.y);
1439            u.translate(this.x, this.y);
1440            this.positionTitle();
1441            "radar" != a.type && g.toFront();
1442            !this.visible || e ? (b.hide(), g.hide(), u.hide()) : (b.show(), g.show(), u.show());
1443            this.axisY = this.y;
1444            this.axisX = this.x
1445        },
1446        getDateMinMax: function() {
1447            this.minimumDate && (this.minimumDate instanceof Date || (this.minimumDate = d.getDate(this.minimumDate, this.chart.dataDateFormat, "fff")), this.min = this.minimumDate.getTime());
1448            this.maximumDate && (this.maximumDate instanceof Date || (this.maximumDate = d.getDate(this.maximumDate, this.chart.dataDateFormat, "fff")), this.max = this.maximumDate.getTime())
1449        },
1450        formatValue: function(a, b, c) {
1451            var e = this.exponential,
1452                g = this.logarithmic,
1453                f = this.numberFormatter,
1454                h = this.chart;
1455            if (f) return !0 === this.logarithmic && (e = -1 != String(a).indexOf("e") ? !0 : !1), this.useScientificNotation && (e = !0), this.usePrefixes && (e = !1), e ? (c = -1 
1455== String(a).indexOf("e") ? a.toExponential(15) : String(a), e = c.split("e"), c = Number(e[0]), e = Number(e[1]), c = d.roundTo(c, 14), b || isNaN(this.precision) || (c = d.roundTo(c, this.precision)), 10 == c && (c = 1, e += 1), c = c + "e" + e, 0 === a && (c = "0"), 1 == a && (c = "1")) : (g && (e = String(a).split("."), e[1] ? (f.precision = e[1].length, 0 > c && (f.precision = Math.abs(c)), b && 1 < a && (f.precision = 0), b || isNaN(this.precision) || (f.precision = this.precision)) : f.precision = -1), c = this.usePrefixes ? d.addPrefix(a, h.prefixesOfBigNumbers, h.prefixesOfSmallNumbers, f, !b) : d.formatNumber(a, f, f.precision)), this.duration && (b && (f.precision = 0), c = d.formatDuration(a, this.duration, "", this.durationUnits, this.maxInterval, f)), "date" == this.type && (c = d.formatDate(new Date(a), this.currentDateFormat, h)), this.recalculateToPercents ? c += "%" : (b = this.unit) && (c = "left" == this.unitPosition ? b + c : c + b), this.labelFunction && (c = "date" == this.type ? this.labelFunction(c, new Date(a), this).toString() : this.labelFunction(a, c, this).toString()), c
1456        },
1457        getMinorGridStep: function(a, b) {
1458            var c = [5, 4, 2];
1459            60 > b && c.shift();
1460            for (var e = Math.floor(Math.log(Math.abs(a)) * Math.LOG10E), d = 0; d < c.length; d++) {
1461                var f = a / c[d],
1462                    h = Math.floor(Math.log(Math.abs(f)) * Math.LOG10E);
1463                if (!(1 < Math.abs(e - h)))
1464                    if (1 > a) {
1465                        if (h = Math.pow(10, -h) * f, h == Math.round(h)) return f
1466                    } else if (f == Math.round(f)) return f
1467            }
1468            return 1
1469        },
1470        stackGraphs: function(a) {
1471            var b = this.stackType;
1472            "stacked" == b && (b = "regular");
1473            "line" == b && (b = "none");
1474            "100% stacked" == b && (b = "100%");
1475            this.stackType = b;
1476            var c = [],
1477                e = [],
1478                g = [],
1479                f = [],
1480                h, k = this.chart.graphs,
1481                l, m, n, q, p, t = this.baseValue,
1482                r = !1;
1483            if ("line" == a || "step" == a || "smoothedLine" == a) r = !0;
1484            if (r && ("regular" == b || "100%" == b))
1485                for (q = 0; q < k.length; q++) n = k[q], n.stackGraph = null, n.hidden || (m = n.type, n.chart == this.chart && n.valueAxis == this && a == m && n.stackable && (l && (n.stackGraph = l), l = n));
1486            n = this.start - 10;
1487            l = this.end + 10;
1488            q = this.data.length - 1;
1489            n = d.fitToBounds(n, 0, q);
1490            l = d.fitToBounds(l, 0, q);
1491            for (p = n; p <= l; p++) {
1492                var w = 0;
1493                for (q = 0; q < k.length; q++)
1494                    if (n = k[q], n.hidden) n.newStack && (g[p] = NaN, e[p] = NaN);
1495                    else if (m = n.type, n.chart == this.chart && n.valueAxis == this && a == m && n.stackable)
1496                    if (m = this.data[p].axes[this.id].graphs[n.id], h = m.values.value, isNaN(h)) n.newStack && (g[p] = NaN, e[p] = NaN);
1497                    else {
1498                        var z = d.getDecimals(h);
1499                        w < z && (w = z);
1500                        isNaN(f[p]) ? f[p] = Math.abs(h) : f[p] += Math.abs(h);
1501                        f[p] = d.roundTo(f[p], w);
1502                        z = n.fillToGraph;
1503                        r && z && (z = this.data[p].axes[this.id].graphs[z.id]) && (m.values.open = z.values.value);
1504                        "regular" == b && (r && (isNaN(c[p]) ? (c[p] = h, m.values.close = h, m.values.open = this.baseValue) : (isNaN(h) ? m.values.close = c[p] : m.values.close = h + c[p], m.values.open = c[p], c[p] = m.values.close)), "column" == a && (n.newStack && (g[p] = NaN, e[p] = NaN), m.values.close = h, 0 > h ? (m.values.close = h, isNaN(e[p]) ? m.values.open = t : (m.values.close += e[p], m.values.open = e[p]), e[p] = m.values.close) : (m.values.close = h, isNaN(g[p]) ? m.values.open = t : (m.values.close += g[p], m.values.open = g[p]), g[p] = m.values.close)))
1505                    }
1506            }
1507            for (p = this.start; p <= this.end; p++)
1508                for (q = 0; q < k.length; q++)(n = k[q], n.hidden) ? n.newStack && (g[p] = NaN, e[p] = NaN) : (m = n.type, n.chart == this.chart && n.valueAxis == this && a == m && n.stackable && (m = this.data[p].axes[this.id].graphs[n.id], h = m.values.value, isNaN(h) || (c = h / f[p] * 100, m.values.percents = c, m.values.total = f[p], n.newStack && (g[p] = NaN, e[p] = NaN), "100%" == b && (isNaN(e[p]) && (e[p] = 0), isNaN(g[p]) && (g[p] = 0), 0 > c ? (m.values.close = d.fitToBounds(c + e[p], -100, 100), m.values.open = e[p], e[p] = m.values.close) : (m.values.close = d.fitToBounds(c + g[p], -100, 100), m.values.open = g[p], g[p] = m.values.close)))))
1509        },
1510        recalculate: function() {
1511            var a = this.chart,
1512                b = a.graphs,
1513                c;
1514            for (c = 0; c < b.length; c++) {
1515                var e = b[c];
1516                if (e.valueAxis == this) {
1517                    var g = "value";
1518                    if ("candlestick" == e.type || "ohlc" == e.type) g = "open";
1519                    var f, h, k = this.end + 2,
1520                        k = d.fitToBounds(this.end + 1, 0, this.data.length - 1),
1521                        l = this.start;
1522                    0 < l && l--;
1523                    var m;
1524                    h = this.start;
1525                    e.compareFromStart && (h = 0);
1526                    if (!isNaN(a.startTime) && (m = a.categoryAxis)) {
1527                        var n = m.minDuration(),
1528                            n = new Date(a.startTime + n / 2),
1529                            q = d.resetDateToMin(new Date(a.startTime), m.minPeriod).getTime();
1530                        d.resetDateToMin(new Date(n), m.minPeriod).getTime() > q && h++
1531                    }
1532                    if (m = a.recalculateFromDate) m = d.getDate(m, a.dataDateFormat, "fff"), h = a.getClosestIndex(a.chartData, "time", m.getTime(), !0, 0, a.chartData.length), k = a.chartData.length - 1;
1533                    for (m = h; m <= k && (h = this.data[m].axes[this.id].graphs[e.id], f = h.values[g], e.recalculateValue && (f = h.dataContext[e.valueField + e.re
1533calculateValue]), isNaN(f)); m++);
1534                    this.recBaseValue = f;
1535                    for (g = l; g <= k; g++) {
1536                        h = this.data[g].axes[this.id].graphs[e.id];
1537                        h.percents = {};
1538                        var l = h.values,
1539                            p;
1540                        for (p in l) h.percents[p] = "percents" != p ? l[p] / f * 100 - 100 : l[p]
1541                    }
1542                }
1543            }
1544        },
1545        getMinMax: function() {
1546            var a = !1,
1547                b = this.chart,
1548                c = b.graphs,
1549                e;
1550            for (e = 0; e < c.length; e++) {
1551                var g = c[e].type;
1552                ("line" == g || "step" == g || "smoothedLine" == g) && this.expandMinMax && (a = !0)
1553            }
1554            a && (0 < this.start && this.start--, this.end < this.data.length - 1 && this.end++);
1555            "serial" == b.type && (!0 !== b.categoryAxis.parseDates || a || this.end < this.data.length - 1 && this.end++);
1556            this.includeAllValues && (this.start = 0, this.end = this.data.length - 1);
1557            a = this.minMaxMultiplier;
1558            b = this.getExtremes(this.start, this.end);
1559            this.min = b.min;
1560            this.max = b.max;
1561            this.minRR = this.min;
1562            this.maxRR = this.max;
1563            a = (this.max - this.min) * (a - 1);
1564            this.min -= a;
1565            this.max += a;
1566            a = this.guides.length;
1567            if (this.includeGuidesInMinMax && 0 < a)
1568                for (b = 0; b < a; b++) c = this.guides[b], c.toValue < this.min && (this.min = c.toValue), c.value < this.min && (this.min = c.value), c.toValue > this.max && (this.max = c.toValue), c.value > this.max && (this.max = c.value);
1569            isNaN(this.minimum) || (this.min = this.minimum);
1570            isNaN(this.maximum) || (this.max = this.maximum);
1571            "date" == this.type && this.getDateMinMax();
1572            this.min > this.max && (a = this.max, this.max = this.min, this.min = a);
1573            isNaN(this.minZoom) || (this.min = this.minZoom);
1574            isNaN(this.maxZoom) || (this.max = this.maxZoom);
1575            this.minCalc = this.min;
1576            this.maxCalc = this.max;
1577            this.minReal = this.min;
1578            this.maxReal = this.max;
1579            0 === this.min && 0 === this.max && (this.max = 9);
1580            this.min > this.max && (this.min = this.max - 1);
1581            a = this.min;
1582            b = this.max;
1583            c = this.max - this.min;
1584            e = 0 === c ? Math.pow(10, Math.floor(Math.log(Math.abs(this.max)) * Math.LOG10E)) / 10 : Math.pow(10, Math.floor(Math.log(Math.abs(c)) * Math.LOG10E)) / 10;
1585            isNaN(this.maximum) && (this.max = Math.ceil(this.max / e) * e + e);
1586            isNaN(this.minimum) && (this.min = Math.floor(this.min / e) * e - e);
1587            0 > this.min && 0 <= a && (this.min = 0);
1588            0 < this.max && 0 >= b && (this.max = 0);
1589            "100%" == this.stackType && (this.min = 0 > this.min ? -100 : 0, this.max = 0 > this.max ? 0 : 100);
1590            c = this.max - this.min;
1591            e = Math.pow(10, Math.floor(Math.log(Math.abs(c)) * Math.LOG10E)) / 10;
1592            this.step = Math.ceil(c / this.gridCountR / e) * e;
1593            c = Math.pow(10, Math.floor(Math.log(Math.abs(this.step)) * Math.LOG10E));
1594            c = d.fixStepE(c);
1595            e = Math.ceil(this.step / c);
1596            5 < e && (e = 10);
1597            5 >= e && 2 < e && (e = 5);
1598            this.step = Math.ceil(this.step / (c * e)) * c * e;
1599            isNaN(this.setStep) || (this.step = this.setStep);
1600            1 > c ? (this.maxDecCount = Math.abs(Math.log(Math.abs(c)) * Math.LOG10E), this.maxDecCount = Math.round(this.maxDecCount), this.step = d.roundTo(this.step, this.maxDecCount + 1)) : this.maxDecCount = 0;
1601            this.min = this.step * Math.floor(this.min / this.step);
1602            this.max = this.step * Math.ceil(this.max / this.step);
1603            0 > this.min && 0 <= a && (this.min = 0);
1604            0 < this.max && 0 >= b && (this.max = 0);
1605            1 < this.minReal && 1 < this.max - this.minReal && (this.minReal = Math.floor(this.minReal));
1606            c = Math.pow(10, Math.floor(Math.log(Math.abs(this.minReal)) * Math.LOG10E));
1607            0 === this.min && (this.minReal = c);
1608            0 === this.min && 1 < this.minReal && (this.minReal = 1);
1609            0 < this.min && 0 < this.minReal - this.step && (this.minReal = this.min + this.step < this.minReal ? this.min + this.step : this.min);
1610            this.logarithmic && (2 < Math.log(b) * Math.LOG10E - Math.log(a) * Math.LOG10E ? (this.minReal = this.min = Math.pow(10, Math.floor(Math.log(Math.abs(a)
1610) * Math.LOG10E)), this.maxReal = this.max = Math.pow(10, Math.ceil(Math.log(Math.abs(b)) * Math.LOG10E))) : (a = Math.pow(10, Math.floor(Math.log(Math.abs(a)) * Math.LOG10E)) / 10, Math.pow(10, Math.floor(Math.log(Math.abs(this.min)) * Math.LOG10E)) / 10 < a && (this.minReal = this.min = 10 * a)))
1611        },
1612        getExtremes: function(a, b) {
1613            var c, e, d;
1614            for (d = a; d <= b; d++) {
1615                var f = this.data[d].axes[this.id].graphs,
1616                    h;
1617                for (h in f)
1618                    if (f.hasOwnProperty(h)) {
1619                        var k = this.chart.graphsById[h];
1620                        if (k.includeInMinMax && (!k.hidden || this.includeHidden)) {
1621                            isNaN(c) && (c = Infinity);
1622                            isNaN(e) && (e = -Infinity);
1623                            this.foundGraphs = !0;
1624                            k = f[h].values;
1625                            this.recalculateToPercents && (k = f[h].percents);
1626                            var l;
1627                            if (this.minMaxField) l = k[this.minMaxField], l < c && (c = l), l > e && (e = l);
1628                            else
1629                                for (var m in k) k.hasOwnProperty(m) && "percents" != m && "total" != m && "error" != m && (l = k[m], l < c && (c = l), l > e && (e = l))
1630                        }
1631                    }
1632            }
1633            return {
1634                min: c,
1635                max: e
1636            }
1637        },
1638        zoomOut: function(a) {
1639            this.maxZoom = this.minZoom = NaN;
1640            this.zoomToRelativeValues(0, 1, a)
1641        },
1642        zoomToRelativeValues: function(a, b, c) {
1643            if (this.reversed) {
1644                var e = a;
1645                a = 1 - b;
1646                b = 1 - e
1647            }
1648            var d = this.fullMax,
1649                e = this.fullMin,
1650                f = e + (d - e) * a,
1651                h = e + (d - e) * b;
1652            0 <= this.minimum && 0 > f && (f = 0);
1653            this.logarithmic && (isNaN(this.minimum) || (e = this.minimum), isNaN(this.maximum) || (d = this.maximum), d = Math.log(d) * Math.LOG10E - Math.log(e) * Math.LOG10E, f = Math.pow(10, d * a + Math.log(e) * Math.LOG10E), h = Math.pow(10, d * b + Math.log(e) * Math.LOG10E));
1654            return this.zoomToValues(f, h, c)
1655        },
1656        zoomToValues: function(a, b, c) {
1657            if (b < a) {
1658                var e = b;
1659                b = a;
1660                a = e
1661            }
1662            var g = this.fullMax,
1663                e = this.fullMin;
1664            this.relativeStart = d.roundTo((a - e) / (g - e), 9);
1665            this.relativeEnd = d.roundTo((b - e) / (g - e), 9);
1666            if (this.logarithmic) {
1667                isNaN(this.minimum) || (e = this.minimum);
1668                isNaN(this.maximum) || (g = this.maximum);
1669                var g = Math.log(g) * Math.LOG10E - Math.log(e) * Math.LOG10E,
1670                    f = Math.log(b) / Math.LN10 -
1671                    Math.log(e) * Math.LOG10E;
1672                this.relativeStart = d.roundTo((Math.log(a) / Math.LN10 - Math.log(e) * Math.LOG10E) / g, 9);
1673                this.relativeEnd = d.roundTo(f / g, 9)
1674            }
1675            if (this.minZoom != a || this.maxZoom != b) return this.minZoom = a, this.maxZoom = b, e = {
1676                type: "axisZoomed"
1677            }, e.chart = this.chart, e.valueAxis = this, e.startValue = a, e.endValue = b, e.relativeStart = this.relativeStart, e.relativeEnd = this.relativeEnd, this.prevStartValue == a && this.prevEndValue == b || this.fire(e), this.prevStartValue = a, this.prevEndValue = b, c || (a = {}, d.copyProperties(e, a), a.type = "axisIntZoomed", this.fire(a)), 0 === this.relativeStart && 1 == this.relativeEnd && (this.maxZoom = this.minZoom = NaN), !0
1678        },
1679        coordinateToValue: function(a) {
1680            if (isNaN(a)) return NaN;
1681            var b = this.axisWidth,
1682                c = this.stepWidth,
1683                e = this.reversed,
1684                d = this.rotate,
1685                f = this.min,
1686                h = this.minReal;
1687            return !0 === this.logarithmic ? Math.pow(10, (d ? !0 === e ? (b - a) / c : a / c : !0 === e ? a / c : (b - a) / c) + Math.log(h) * Math.LOG10E) : !0 === e ? d ? f - (a - b) / c : a / c + f : d ? a / c + f : f - (a - b) / c
1688        },
1689        getCoordinate: function(a, b) {
1690            if (isNaN(a)) return NaN;
1691            var c = this.rotate,
1692                e = this.reversed,
1693                d = this.axisWidth,
1694                f = this.stepWidth,
1695                h = this.min,
1696                k = this.minReal;
1697            !0 === this.logarithmic ? (0 === a && (a = this.treatZeroAs), h = Math.log(a) * Math.LOG10E - Math.log(k) * Math.LOG10E, c = c ? !0 === e ? d - f * h : f * h : !0 === e ? f * h : d - f * h) : c = !0 === e ? c ? d - f * (a - h) : f * (a - h) : c ? f * (a - h) : d - f * (a - h);
1698            1E7 < Math.abs(c) && (c = c / Math.abs(c) * 1E7);
1699            b || (c = Math.round(c));
1700            return c
1701        },
1702        synchronizeWithAxis: function(a) {
1703            this.synchronizeWith = a;
1704            this.listenTo(this.synchronizeWith, "axisChanged", this.handleSynchronization)
1705        },
1706        handleSynchronization: function() {
1707            if (this.synchronizeWith) {
1708                d.isString(this.synchronizeWith) && (this.synchronizeWith = this.chart.getValueAxisById(this.synchronizeWith));
1709                var a = this.synchronizeWith,
1710                    b = a.min,
1711                    c = a.max,
1712                    a = a.step,
1713                    e = this.synchronizationMultiplier;
1714                e && (this.min = b * e, this.max = c * e, this.step = a * e, b = Math.abs(Math.log(Math.abs(Math.pow(10, Math.floor(Math.log(Math.abs(this.step)) * Math.LOG10E)))) * Math.LOG10E), this.maxDecCount = b = Math.round(b), this.draw())
1715            }
1716        }
1717    })
1718})();
1719(function() {
1720    var d = window.AmCharts;
1721    d.RecAxis = d.Class({
1722        construct: function(a) {
1723            var b = a.chart,
1724                c = a.axisThickness,
1725                e = a.axisColor,
1726                g = a.axisAlpha,
1727                f = a.offset,
1728                h = a.dx,
1729                k = a.dy,
1730                l = a.x,
1731                m = a.y,
1732                n = a.height,
1733                q = a.width,
1734                p = b.container;
1735            "H" == a.orientation ? (e = d.line(p, [0, q], [0, 0], e, g, c), this.axisWidth = a.width, "bottom" == a.position ? (k = c / 2 + f + n + m - 1, c = l) : (k = -c / 2 - f + m + k, c = h + l)) : (this.axisWidth = a.height, "right" == a.position ? (e = d.line(p, [0, 0, -h], [0, n, n - k], e, g, c), k = m + k, c = c / 2 + f + h + q + l - 1) : (e = d.line(p, [0, 0], [0, n], e, g, c), k = m, c = -c / 2 - f + l));
1736            e.translate(c, k);
1737            c = b.container.set();
1738            c.push(e);
1739            b.axesSet.push(c);
1740            d.setCN(b, e, a.bcn + "line");
1741            this.axisSet = c;
1742            this.set = e
1743        }
1744    })
1745})();
1746(function() {
1747    var d = window.AmCharts;
1748    d.RecItem = d.Class({
1749        construct: function(a, b, c, e, g, f, h, k, l, m, n, q) {
1750            b = Math.round(b);
1751            var p = a.chart;
1752            this.value = c;
1753            void 0 == c && (c = "");
1754            l || (l = 0);
1755            void 0 == e && (e = !0);
1756            var t = p.fontFamily,
1757                r = a.fontSize;
1758            void 0 == r && (r = p.fontSize);
1759            var w = a.color;
1760            void 0 == w && (w = p.color);
1761            void 0 !== n && (w = n);
1762            var z = a.chart.container,
1763                x = z.set();
1764            this.set = x;
1765            var u = a.axisThickness,
1766                A = a.axisColor,
1767                y = a.axisAlpha,
1768                B = a.tickLength,
1769                D = a.gridAlpha,
1770                C = a.gridThickness,
1771                I = a.gridColor,
1772                H = a.dashLength,
1773                Q = a.fillColor,
1774                M = a.fillAlpha,
1775                P = a.labelsEnabled;
1776            n = a.labelRotationR;
1777            var ia = a.counter,
1778                J = a.inside,
1779                aa = a.labelOffset,
1780                ma = a.dx,
1781                na = a.dy,
1782                Pa = a.orientation,
1783                Z = a.position,
1784                da = a.previousCoord,
1785                X = a.height,
1786                xa = a.width,
1787                ea = a.offset,
1788                fa, Ba;
1789            h ? (void 0 !== h.id && (q = p.classNamePrefix + "-guide-" + h.id), P = !0, isNaN(h.tickLength) || (B = h.tickLength), void 0 != h.lineColor && (I = h.lineColor), void 0 != h.color && (w = h.color), isNaN(h.lineAlpha) || (D = h.lineAlpha), isNaN(h.dashLength) || (H = h.dashLength), isNaN(h.lineThickness) || (C = h.lineThickness), !0 === h.inside && (J = !0, 0 < ea && (ea = 0)), isNaN(h.labelRotation) || (n = h.labelRotation), isNaN(h.fontSize) || (r = h.fontSize), h.position && (Z = h.position), void 0 !== h.boldLabel && (k = h.boldLabel), isNaN(h.labelOffset) || (aa = h.labelOffset)) : "" === c && (B = 0);
1790            m && !isNaN(a.minorTickLength) && (B = a.minorTickLength);
1791            var ga = "start";
1792            0 < g && (ga = "middle");
1793            a.centerLabels && (ga = "middle");
1794            var V = n * Math.PI / 180,
1795                Y, Da, G = 0,
1796                v = 0,
1797                oa = 0,
1798                ha = Y = 0,
1799                Qa = 0;
1800            "V" == Pa && (n = 0);
1801            var ca;
1802            P && "" !== c && (ca = a.autoWrap && 0 === n ? d.wrappedText(z, c, w, t, r, ga, k, Math.abs(g), 0) : d.text(z, c, w, t, r, ga, k), ga = ca.getBBox(), ha = ga.width, Qa = ga.height);
1803            if ("H" == Pa) {
1804                if (0 <= b && b <= xa + 1 && (0 < B && 0 < y && b + l <= xa + 1 && (fa = d.line(z, [b + l, b + l], [0, B], A, y, C), x.push(fa)), 0 < D && (Ba = d.line(z, [b, b + ma, b + ma], [X, X + na, na], I, D, C, H), x.push(Ba))), v = 0, G = b, h && 90 == n && J && (G -= r), !1 === e ? (ga = "start", v = "bottom" == Z ? J ? v + B : v - B : J ? v - B : v + B, G += 3, 0 < g && (G += g / 2 - 3, ga = "middle"), 0 < n && (ga = "middle")) : ga = "middle", 1 == ia && 0 < M && !h && !m && da < xa && (e = d.fitToBounds(b, 0, xa), da = d.fitToBounds(da, 0, xa), Y = e - da, 0 < Y && (Da = d.rect(z, Y, a.height, Q, M), Da.translate(e - Y + ma, na), x.push(Da))), "bottom" == Z ? (v += X + r / 2 + ea, J ? (0 < n ? (v = X - ha / 2 * Math.sin(V) - B - 3, a.centerRotatedLabels || (G += ha / 2 * Math.cos(V) - 4 + 2)) : 0 > n ? (v = X + ha * Math.sin(V) - B - 3 + 2, G += -ha * Math.cos(V) - Qa * Math.sin(V) - 4) : v -= B + r + 3 + 3, v -= aa) : (0 < n ? (v = X + ha / 2 * Math.sin(V) + B + 3, a.centerRotatedLabels || (G -= ha / 2 * Math.cos(V))) : 0 > n ? (v = X + B + 3 - ha / 2 * Math.sin(V) + 2, G += ha / 2 * Math.cos(V)) : v += B + u + 3 + 3, v += aa)) : (v += na + r / 2 - ea, G += ma, J ? (0 < n ? (v = ha / 2 * Math.sin(V) + B + 3, a.centerRotatedLabels || (G -= ha / 2 * Math.cos(V))) : v += B + 3, v += aa) : (0 < n ? (v = -(ha / 2) * Math.sin(V) - B - 6, a.centerRotatedLabels || (G += ha / 2 * Math.cos(V))) : v -= B +
1805                        r + 3 + u + 3, v -= aa)), "bottom" == Z ? Y = (J ? X - B - 1 : X + u - 1) + ea : (oa = ma, Y = (J ? na : na - B - u + 1) - ea), f && (G += f), r = G, 0 < n && (r += ha / 2 * Math.cos(V)), ca && (f = 0, J && (f = ha / 2 * Math.cos(V)), r + f > xa + 2 || 0 > r)) ca.remove(), ca = null
1806            } else {
1807                0 <= b && b <= X + 1 && (0 < B && 0 < y && b + l <= X + 1 && (fa = d.line(z, [0, B + 1], [b + l, b + l], A, y, C), x.push(fa)), 0 < D && (Ba = d.line(z, [0, ma, xa + ma], [b, b + na, b + na], I, D, 
1807C, H), x.push(Ba)));
1808                ga = "end";
1809                if (!0 === J && "left" == Z || !1 === J && "right" == Z) ga = "start";
1810                v = b - Qa / 2 + 2;
1811                1 == ia && 0 < M && !h && !m && (e = d.fitToBounds(b, 0, X), da = d.fitToBounds(da, 0, X), V = e - da, Da = d.polygon(z, [0, a.width, a.width, 0], [0, 0, V, V], Q, M), Da.translate(ma, e - V + na), x.push(Da));
1812                v += r / 2;
1813                "right" == Z ? (G += ma + xa + ea, v += na, J ? (f || (v -= r / 2 + 3), G = G - (B + 4) - aa) : (G += B + 4 + u, v -= 2, G += aa)) : J ? (G += B + 4 - ea, f || (v -= r / 2 + 3), h && (G += ma, v += na), G += aa) : (G += -B - u - 4 - 2 - ea, v -= 2, G -= aa);
1814                fa && ("right" == Z ? (oa += ma + ea + xa - 1, Y += na, oa = J ? oa - u : oa + u) : (oa -= ea, J || (oa -= B + u)));
1815                f && (v += f);
1816                J = -3;
1817                "right" == Z && (J += na);
1818                ca && (v > X + 1 || v < J - r / 10) && (ca.remove(), ca = null)
1819            }
1820            fa && (fa.translate(oa, Y), d.setCN(p, fa, a.bcn + "tick"), d.setCN(p, fa, q, !0), h && d.setCN(p, fa, "guide"));
1821            !1 === a.visible && (fa && fa.remove(), ca && (ca.remove(), ca = null));
1822            ca && (ca.attr({
1823                "text-anchor": ga
1824            }), ca.translate(G, v, NaN, !0), 0 !== n && ca.rotate(-n, a.chart.backgroundColor), a.allLabels.push(ca), this.label = ca, d.setCN(p, ca, a.bcn + "label"), d.setCN(p, ca, q, !0), h && d.setCN(p, ca, "guide"));
1825            Ba && (d.setCN(p, Ba, a.bcn + "grid"), d.setCN(p, Ba, q, !0), h && d.setCN(p, Ba, "guide"));
1826            Da && (d.setCN(p, Da, a.bcn + "fill"), d.setCN(p, Da, q, !0));
1827            m ? Ba && d.setCN(p, Ba, a.bcn + "grid-minor") : (a.counter = 0 === ia ? 1 : 0, a.previousCoord = b);
1828            0 === this.set.node.childNodes.length && this.set.remove()
1829        },
1830        graphics: function() {
1831            return this.set
1832        },
1833        getLabel: function() {
1834            return this.label
1835        }
1836    })
1837})();
1838(function() {
1839    var d = window.AmCharts;
1840    d.RecFill = d.Class({
1841        construct: function(a, b, c, e) {
1842            var g = a.dx,
1843                f = a.dy,
1844                h = a.orientation,
1845                k = 0;
1846            if (c < b) {
1847                var l = b;
1848                b = c;
1849                c = l
1850            }
1851            var m = e.fillAlpha;
1852            isNaN(m) && (m = 0);
1853            var l = a.chart.container,
1854                n = e.fillColor;
1855            "V" == h ? (b = d.fitToBounds(b, 0, a.height), c = d.fitToBounds(c, 0, a.height)) : (b = d.fitToBounds(b, 0, a.width), c = d.fitToBounds(c, 0, a.width));
1856            c -= b;
1857            isNaN(c) && (c = 4, k = 2, m = 0);
1858            0 > c && "object" == typeof n && (n = n.join(",").split(",").reverse());
1859            "V" == h ? (h = d.rect(l, a.width, c, n, m), h.translate(g, b - k + f)) : (h = d.rect(l, c, a.height, n, m), h.translate(b - k + g, f));
1860            d.setCN(a.chart, h, "guide-fill");
1861            e.id && d.setCN(a.chart, h, "guide-fill-" + e.id);
1862            this.set = l.set([h])
1863        },
1864        graphics: function() {
1865            return this.set
1866        },
1867        getLabel: function() {}
1868    })
1869})();
1870(function() {
1871    var d = window.AmCharts;
1872    d.AmChart = d.Class({
1873        construct: function(a) {
1874            this.svgIcons = this.tapToActivate = !0;
1875            this.theme = a;
1876            this.classNamePrefix = "amcharts";
1877            this.addClassNames = !1;
1878            this.version = "3.21.13";
1879            d.addChart(this);
1880            this.createEvents("buildStarted", "dataUpdated", "init", "rendered", "drawn", "failed", "resized", "animationFinished");
1881            this.height = this.width = "100%";
1882            this.dataChanged = !0;
1883            this.chartCreated = !1;
1884            this.previousWidth = this.previousHeight = 0;
1885            this.backgroundColor = "#FFFFFF";
1886            this.borderAlpha = this.backgroundAlpha = 0;
1887            this.color = this.borderColor = "#000000";
1888            this.fontFamily = "Verdana";
1889            this.fontSize = 11;
1890            this.usePrefixes = !1;
1891            this.autoResize = !0;
1892            this.autoDisplay = !1;
1893            this.addCodeCredits = this.accessible = !0;
1894            this.touchStartTime = this.touchClickDuration = 0;
1895            this.precision = -1;
1896            this.percentPrecision = 2;
1897            this.decimalSeparator = ".";
1898            this.thousandsSeparator = ",";
1899            this.labels = [];
1900            this.allLabels = [];
1901            this.titles = [];
1902            this.marginRight = this.marginLeft = this.autoMarginOffset = 0;
1903            this.timeOuts = [];
1904            this.creditsPosition = "top-left";
1905            var b = document.createElement("div"),
1906                c = b.style;
1907            c.overflow = "hidden";
1908            c.position = "relative";
1909            c.textAlign = "left";
1910            this.chartDiv = b;
1911            b = document.createElement("div");
1912            c = b.style;
1913            c.overflow = "hidden";
1914            c.position = "relative";
1915            c.textAlign = "left";
1916            this.legendDiv = b;
1917            this.titleHeight = 0;
1918            this.hideBalloonTime = 150;
1919            this.handDrawScatter = 2;
1920            this.cssScale = this.handDrawThickness = 1;
1921            this.cssAngle = 0;
1922            this.prefixesOfBigNumbers = [{
1923                number: 1E3,
1924                prefix: "k"
1925            }, {
1926                number: 1E6,
1927                prefix: "M"
1928            }, {
1929                number: 1E9,
1930                prefix: "G"
1931            }, {
1932                number: 1E12,
1933                prefix: "T"
1934            }, {
1935                number: 1E15,
1936                prefix: "P"
1937            }, {
1938                number: 1E18,
1939                prefix: "E"
1940            }, {
1941                number: 1E21,
1942                prefix: "Z"
1943            }, {
1944                number: 1E24,
1945                prefix: "Y"
1946            }];
1947            this.prefixesOfSmallNumbers = [{
1948                number: 1E-24,
1949                prefix: "y"
1950            }, {
1951                number: 1E-21,
1952                prefix: "z"
1953            }, {
1954                number: 1E-18,
1955                prefix: "a"
1956            }, {
1957                number: 1E-15,
1958                prefix: "f"
1959            }, {
1960                number: 1E-12,
1961                prefix: "p"
1962            }, {
1963                number: 1E-9,
1964                prefix: "n"
1965            }, {
1966                number: 1E-6,
1967                prefix: "\u03bc"
1968            }, {
1969                number: .001,
1970                prefix: "m"
1971            }];
1972            this.panEventsEnabled = !0;
1973            this.product = "amcharts";
1974            this.animations = [];
1975            this.balloon = new d.AmBalloon(this.theme);
1976            this.balloon.chart = this;
1977            this.processTimeout = 0;
1978            this.processCount = 1E3;
1979            this.animatable = [];
1980            this.langObj = {};
1981            d.applyTheme(this, a, "AmChart")
1982        },
1983        drawChart: function() {
1984            0 < this.realWidth && 0 < this.realHeight && (this.drawBackground(), this.redrawLabels(), this.drawTitles(), this.brr(), this.renderFix(), this.chartDiv && (this.boundingRect = this.chartDiv.getBoundingClientRect()))
1985        },
1986        makeAccessible: function(a, b, c) {
1987            this.accessible && a && (c && a.setAttr("role", c), a.setAttr("aria-label", b))
1988        },
1989        drawBackground: function() {
1990            d.remove(this.background);
1991            var a = this.container,
1992                b = this.backgroundColor,
1993                c = this.backgroundAlpha,
1994                e = this.set;
1995            d.isModern || 0 !== c || (c = .001);
1996            var g = this.updateWidth();
1997            this.realWidth = g;
1998            var f = this.updateHeight();
1999            this.realHeight = f;
2000            b = d.polygon(a, [0, g - 1, g - 1, 0], [0, 0, f - 1, f - 1], b, c, 1, this.borderColor, this.borderAlpha);
2001            d.setCN(this, b, "bg");
2002            this.background = b;
2003            e.push(b);
2004            if (b = this.backgroundImage) a = a.image(b, 0, 0, g, f), d.setCN(this, b, "bg-image"), this.bgImg = a, e.push(a)
2005        },
2006        drawTitles: function(a) {
2007            var b = this.titles;
2008            this.titleHeight = 0;
2009            if (d.ifArray(b)) {
2010                var c = 20,
2011                    e;
2012                for (e = 0; e < b.length; e++) {
2013                    var g = b[e],
2014                        g = d.processObject(g, d.Title, this.theme);
2015                    if (!1 !== g.enabled) {
2016                        var f = g.color;
2017                        void 0 === f && (f = this.color);
2018                        var h = g.size;
2019                        isNaN(h) && (h = this.fontSize + 2);
2020                        isNaN(g.alpha);
2021                        var k = this.marginLeft,
2022                            l = !0;
2023                        void 0 !== g.bold && (l = g.bold);
2024                        f = d.wrappedText(this.container, g.text, f, this.fontFamily, h, "middle", l, this.realWidth - 35 - this.marginRight - k);
2025                        f.translate(k + (this.realWidth - this.marginRight - k) / 2, c);
2026                        f.node.style.pointerEvents = "none";
2027                        g.sprite = f;
2028                        void 0 !== g.tabIndex && f.setAttr("tabindex", g.tabIndex);
2029                        d.setCN(this, f, "title");
2030                        g.id && d.setCN(this, f, "title-" + g.id);
2031                        f.attr({
2032                            opacity: g.alpha
2033                        });
2034                        c += f.getBBox().height +
2035                            5;
2036                        a ? f.remove() : this.freeLabelsSet.push(f)
2037                    }
2038                }
2039                this.titleHeight = c - 10
2040            }
2041        },
2042        write: function(a) {
2043            var b = this;
2044            if (b.listeners)
2045                for (var c = 0; c < b.listeners.length; c++) {
2046                    var e = b.listeners[c];
2047                    b.addListener(e.event, e.method)
2048                }
2049            b.fire({
2050                type: "buildStarted",
2051                chart: b
2052            });
2053            b.afterWriteTO && clearTimeout(b.afterWriteTO);
2054            0 < b.processTimeout ? b.afterWriteTO = setTimeout(function() {
2055                b.afterWrite.call(b, a)
2056            }, b.processTimeout) : b.afterWrite(a)
2057        },
2058        afterWrite: function(a) {
2059            var b;
2060            if (b = "object" != typeof a ? document.getElementById(a) : a) {
2061                for (; b.firstChild;) b.removeChild(b.firstChild);
2062                this.div = b;
2063                b.style.overflow = "hidden";
2064                b.style.textAlign = "left";
2065                a = this.chartDiv;
2066                var c = this.legendDiv,
2067                    e = this.legend,
2068                    g = c.style,
2069                    f = a.style;
2070                this.measure();
2071                this.previousHeight = this.divRealHeight;
2072                this.previousWidth = this.divRealWidth;
2073                var h, k = document.createElement("div");
2074                h = k.style;
2075                h.position = "relative";
2076                this.containerDiv = k;
2077                k.className = this.classNamePrefix + "-main-div";
2078                a.className = this.classNamePrefix + "-chart-div";
2079                b.appendChild(k);
2080                (b = this.exportConfig) && d.AmExport && !this.AmExport && (this.AmExport = new d.AmExport(this, b));
2081                this.amExport && d.AmExport && (this.AmExport = d.extend(this.amExport, new d.AmExport(this), !0));
2082                this.AmExport && this.AmExport.init && this.AmExport.init();
2083                if (e) {
2084                    e = this.addLegend(e, e.divId);
2085                    if (e.enabled) switch (g.left = null, g.top = null, g.right = null, f.left = null, f.right = null, f.top = null, g.position = "relative", f.position = "relative", h.width = "100%", h.height = "100%", e.position) {
2086                        case "bottom":
2087                            k.appendChild(a);
2088                            k.appendChild(c);
2089                            break;
2090                        case "top":
2091                            k.appendChild(c);
2092                            k.appendChild(a);
2093                            break;
2094                        case "absolute":
2095                            g.position = "absolute";
2096                            f.position = "absolute";
2097                            void 0 !== e.left && (g.left = e.left + "px");
2098                            void 0 !== e.right && (g.right = e.right + "px");
2099                            void 0 !== e.top && (g.top = e.top + "px");
2100                            void 0 !== e.bottom && (g.bottom = e.bottom + "px");
2101                            e.marginLeft = 0;
2102                            e.marginRight = 0;
2103                            k.appendChild(a);
2104                            k.appendChild(c);
2105                            break;
2106                        case "right":
2107                            g.position = "relative";
2108                            f.position = "absolute";
2109                            k.appendChild(a);
2110                            k.appendChild(c);
2111                            break;
2112                        case "left":
2113                            g.position = "absolute";
2114                            f.position = "relative";
2115                            k.appendChild(a);
2116                            k.appendChild(c);
2117                            break;
2118                        case "outside":
2119                            k.appendChild(a)
2120                    } else k.appendChild(a);
2121                    this.prevLegendPosition = e.position
2122                } else k.appendChild(a);
2123                this.listenersAdded || (this.addListeners(), this.listenersAdded = !0);
2124                (this.mouseWheelScrollEnabled || this.mouseWheelZoomEnabled) && d.addWheelListeners();
2125                this.initChart()
2126            }
2127        },
2128        createLabelsSet: function() {
2129            d.remove(this.labelsSet);
2130            this.labelsSet = this.container.set();
2131            this.freeLabelsSet.push(this.labelsSet)
2132        },
2133        initChart: function() {
2134            this.balloon = d.processObject(this.balloon, d.AmBalloon, this.theme);
2135            window.AmCharts_path && (this.path = window.AmCharts_path);
2136            void 0 === this.path && (this.path = d.getPath());
2137            void 0 === this.path && (this.path = "amcharts/");
2138            this.path = d.normalizeUrl(this.path);
2139            void 0 === this.pathToImages && (this.pathToImages = this.path + "images/");
2140            this.initHC || (d.callInitHandler(this), this.initHC = !0);
2141            d.applyLang(this.language, this);
2142            var a = this.numberFormatter;
2143            a && (isNaN(a.precision) || (this.precision = a.precision), void 0 !== a.thousandsSeparator && (this.thousandsSeparator = a.thousandsSeparator), void 0 !== a.decimalSeparator && (this.decimalSeparator = a.decimalSeparator));
2144            (a = this.percentFormatter) && !isNaN(a.precision) && (this.percentPrecision = a.precision);
2145            this.nf = {
2146                precision: this.precision,
2147                thousandsSeparator: this.thousandsSeparator,
2148                decimalSeparator: this.decimalSeparator
2149            };
2150            this.pf = {
2151                precision: this.percentPrecision,
2152                thousandsSeparator: this.thousandsSeparator,
2153                decimalSeparator: this.decimalSeparator
2154            };
2155            this.destroy();
2156            (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);
2157            this.container = a;
2158            this.extension = ".png";
2159            this.svgIcons && d.SVG && (this.extension = ".svg");
2160            this.checkDisplay();
2161            this.checkTransform(this.div);
2162            a.chart = this;
2163            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({
2164                type: "failed",
2165                chart: this
2166            })
2167        },
2168        premeasure: function() {
2169            var a = this.div;
2170            if (a) {
2171                try {
2172                    this.boundingRect = this.chartDiv.getBoundingClientRect()
2173                } catch (e) {}
2174                var b = a.offsetWidth,
2175                    c = a.offsetHeight;
2176                a.clientHeight && (b = a.clientWidth, c = a.clientHeight);
2177                if (b != this.mw || c != this.mh) this.mw = b, this.mh = c, this.measure()
2178            }
2179        },
2180        measure: function() {
2181            var a = this.div;
2182            if (a) {
2183                var b = this.chartDiv,
2184                    c = a.offsetWidth,
2185                    e = a.offsetHeight,
2186                    g = this.container;
2187                a.clientHeight && (c = a.clientWidth, e = a.clientHeight);
2188                var e = Math.round(e),
2189                    c = Math.round(c),
2190                    a = Math.round(d.toCoordinate(this.width, c)),
2191                    f = Math.round(d.toCoordinate(this.height, e));
2192                (c != this.previousWidth || e != this.previousHeight) && 0 < a && 0 < f && (b.style.width = a + "px", b.style.height = f + "px", b.style.padding = 0, g && g.setSize(a, f), this.balloon = d.processObject(this.balloon, d.AmBalloon, this.theme));
2193                this.balloon && this.balloon.setBounds && this.balloon.setBounds(2, 2, a - 2, f);
2194                this.updateWidth();
2195                this.balloon.chart = this;
2196                this.realWidth = a;
2197                this.realHeight = f;
2198                this.divRealWidth = c;
2199                this.divRealHeight = e
2200            }
2201        },
2202        checkDisplay: function() {
2203            if (this.autoDisplay && this.container) {
2204                var a = d.rect(this.container, 10, 10),
2205                    b = a.getBBox();
2206                0 === b.width && 0 === b.height && (this.divRealHeight = this.divRealWidth = this.realHeight = this.realWidth = 0, this.previousWidth = this.previousHeight = NaN);
2207                a.remove()
2208            }
2209        },
2210        checkTransform: function(a) {
2211            if (this.autoTransform && window.getComputedStyle && a) {
2212                if (a.style) {
2213                    var b = window.getComputedStyle(a, null);
2214                    if (b && (b = b.getPropertyValue("-webkit-transform") || b.getPropertyValue("-moz-transform") || b.getPropertyValue("-ms-transform") || b.getPropertyValue("-o-transform") || b.getPropertyValue("transform")) && "none" !== b) {
2215                        var c = b.split("(")[1].split(")")[0].split(","),
2216                            b = c[0],
2217                            c = c[1],
2218                            b = Math.sqrt(b * b + c * c);
2219                        isNaN(b) || (this.cssScale *= b)
2220                    }
2221                }
2222                a.parentNode && this.checkTransform(a.parentNode)
2223            }
2224        },
2225        destroy: function() {
2226            this.chartDiv.innerHTML = "";
2227            this.clearTimeOuts();
2228            this.legend && this.legend.destroy()
2229        },
2230        clearTimeOuts: function() {
2231            var a = this.timeOuts;
2232            if (a) {
2233                var b;
2234                for (b = 0; b < a.length; b++) clearTimeout(a[b])
2235            }
2236            this.timeOuts = []
2237        },
2238        clear: function(a) {
2239            try {
2240                document.removeEventListener("touchstart", this.docfn1, !0), document.removeEventListener("touchend", this.docfn2, !0)
2241            } catch (b) {}
2242            d.callMethod("clear", [this.chartScrollbar, this.scrollbarV, this.scrollbarH, this.chartCursor]);
2243            this.chartCursor = this.scrollbarH = this.scrollbarV = this.chartScrollbar = null;
2244            this.clearTimeOuts();
2245            this.container && (this.container.remove(this.chartDiv), this.container.remove(this.legendDiv));
2246            a || d.removeChart(this);
2247            if (a = this.div)
2248                for (; a.firstChild;) a.removeChild(a.firstChild);
2249            this.legend && this.legend.destroy();
2250            this.AmExport && this.AmExport.clear && this.AmExport.clear()
2251        },
2252        setMouseCursor: function(a) {
2253            "auto" == a && d.isNN && (a = "default");
2254            this.chartDiv.style.cursor = a;
2255            this.legendDiv.style.cursor = a
2256        },
2257        redrawLabels: function() {
2258            this.labels = [];
2259            var a = this.allLabels;
2260            this.createLabelsSet();
2261            var b;
2262            for (b = 0; b < a.length; b++) this.drawLabel(a[b])
2263        },
2264        drawLabel: function(a) {
2265            var b = this;
2266            if (b.container && !1 !== a.enabled) {
2267                a = d.processObject(a, d.Label, b.theme);
2268                var c = a.y,
2269                    e = a.text,
2270                    g = a.align,
2271                    f = a.size,
2272                    h = a.color,
2273                    k = a.rotation,
2274                    l = a.alpha,
2275                    m = a.bold,
2276                    n = d.toCoordinate(a.x, b.realWidth),
2277                    c = d.toCoordinate(c, b.realHeight);
2278                n || (n = 0);
2279                c || (c = 0);
2280                void 0 === h && (h = b.color);
2281                isNaN(f) && (f = b.fontSize);
2282                g || (g = "start");
2283                "left" == g && (g = "start");
2284                "right" == g && (g = "end");
2285                "center" == g && (g = "middle", k ? c = b.realHeight - c + c / 2 : n = b.realWidth / 2 - n);
2286                void 0 === l && (l = 1);
2287                void 0 === k && (k = 0);
2288                c += f / 2;
2289                e = d.text(b.container, e, h, b.fontFamily, f, g, m, l);
2290                e.translate(n, c);
2291                void 0 !== a.tabIndex && e.setAttr("tabindex", a.tabIndex);
2292                d.setCN(b, e, "label");
2293                a.id && d.setCN(b, e, "label-" + a.id);
2294                0 !== k && e.rotate(k);
2295                a.url ? (e.setAttr("cursor", "pointer"), e.click(function() {
2296                    d.getURL(a.url, b.urlTarget)
2297                })) : e.node.style.pointerEvents = "none";
2298                b.labelsSet.push(e);
2299                b.labels.push(e)
2300            }
2301        },
2302        addLabel: function(a, b, c, e, d, f, h, k, l, m) {
2303            a = {
2304                x: a,
2305                y: b,
2306                text: c,
2307                align: e,
2308                size: d,
2309                color: f,
2310                alpha: k,
2311                rotation: h,
2312                bold: l,
2313                url: m,
2314                enabled: !0
2315            };
2316            this.container && this.drawLabel(a);
2317            this.allLabels.push(a)
2318        },
2319        clearLabels: function() {
2320            var a = this.labels,
2321                b;
2322            for (b = a.length - 1; 0 <= b; b--) a[b].remove();
2323            this.labels = [];
2324            this.allLabels = []
2325        },
2326        updateHeight: function() {
2327            var a = this.divRealHeight,
2328                b = this.legend;
2329            if (b) {
2330                var c = this.legendDiv.offsetHeight,
2331                    b = b.position;
2332                if ("top" == b || "bottom" == b) {
2333                    a -= c;
2334                    if (0 > a || isNaN(a)) a = 0;
2335                    this.chartDiv.style.height = a + "px"
2336                }
2337            }
2338            return a
2339        },
2340        updateWidth: function() {
2341            var a = this.divRealWidth,
2342                b = this.divRealHeight,
2343                c = this.legend;
2344            if (c) {
2345                var e = this.legendDiv,
2346                    d = e.offsetWidth;
2347                isNaN(c.width) || (d = c.width);
2348                c.ieW && (d = c.ieW);
2349                var f = e.offsetHeight,
2350                    e = e.style,
2351                    h = this.chartDiv.style,
2352                    k = c.position;
2353                if (("right" == k || "left" == k) && void 0 === c.divId) {
2354                    a -= d;
2355                    if (0 > a || isNaN(a)) a = 0;
2356                    h.width = a + "px";
2357                    this.balloon && this.balloon.setBounds && this.balloon.setBounds(2, 2, a - 2, this.realHeight);
2358                    "left" == k ? (h.left = d + "px", e.left = "0p
2358x") : (h.left = "0px", e.left = a + "px");
2359                    b > f && (e.top = (b - f) / 2 + "px")
2360                }
2361            }
2362            return a
2363        },
2364        getTitleHeight: function() {
2365            this.drawTitles(!0);
2366            return this.titleHeight
2367        },
2368        addTitle: function(a, b, c, e, d) {
2369            isNaN(b) && (b = this.fontSize + 2);
2370            a = {
2371                text: a,
2372                size: b,
2373                color: c,
2374                alpha: e,
2375                bold: d,
2376                enabled: !0
2377            };
2378            this.titles.push(a);
2379            return a
2380        },
2381        handleWheel: function(a) {
2382            var b = 0;
2383            a || (a = window.event);
2384            a.wheelDelta ? b = a.wheelDelta / 120 : a.detail && (b = -a.detail / 3);
2385            b && this.handleWheelReal(b, a.shiftKey);
2386            a.preventDefault && a.preventDefault()
2387        },
2388        handleWheelReal: function() {},
2389        handleDocTouchStart: function() {
2390            this.handleMouseMove();
2391            this.tmx = this.mouseX;
2392            this.tmy = this.mouseY;
2393            this.touchStartTime = (new Date).getTime()
2394        },
2395        handleDocTouchEnd: function() {
2396            -.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())
2397        },
2398        resetTouchStyle: function() {
2399            this.panEventsEnabled && this.chartDiv && (this.chartDiv.style.msTouchAction = "auto", this.chartDiv.style.touchAction = "auto")
2400        },
2401        checkTouchDuration: function(a) {
2402            var b = this,
2403                c = (new Date).getTime();
2404            if (a)
2405                if (a.touches) b.isTouchEvent = !0;
2406                else if (!b.isTouchEvent) return !0;
2407            if (c - b.touchStartTime > b.touchClickDuration) return !0;
2408            setTimeout(function() {
2409                b.resetTouchDuration()
2410            }, 300)
2411        },
2412        resetTouchDuration: function() {
2413            this.isTouchEvent = !1
2414        },
2415        checkTouchMoved: function() {
2416            if (4 < Math.abs(this.mouseX - this.tmx) || 4 < Math.abs(this.mouseY - this.tmy)) return !0
2417        },
2418        addListeners: function() {
2419            var a = this,
2420                b = a.chartDiv;
2421            document.addEventListener ? ("ontouchstart" in document.documentElement && (b.addEventListener("touchstart", function(b) {
2422                a.handleTouchStart.call(a, b)
2423            }, !0), b.addEventListener("touchmove", function(b) {
2424                a.handleMouseMove.call(a, b)
2425            }, !0), b.addEventListener("touchend", function(b) {
2426                a.handleTouchEnd.call(a, b)
2427            }, !0), a.docfn1 = function(b) {
2428                a.handleDocTouchStart.call(a, b)
2429            }, a.docfn2 = function(b) {
2430                a.handleDocTouchEnd.call(a, b)
2431            }, document.addEventListener("touchstart", a.docfn1, !0), document.addEventListener("touchend", a.docfn2, !0)), b.addEventListener("mousedown", function(b) {
2432                a.mouseIsOver = !0;
2433                a.handleMouseMove.call(a, b);
2434                a.handleMouseDown.call(a, b);
2435                a.handleDocTouchStart.call(a, b)
2436            }, !0), b.addEventListener("mouseover", function(b) {
2437                a.handleMouseOver.call(a, b)
2438            }, !0), b.addEventListener("mouseout", function(b) {
2439                a.handleMouseOut.call(a, b)
2440            }, !0), b.addEventListener("mouseup", function(b) {
2441                a.handleDocTouchEnd.call(a, b)
2442            }, !0)) : (b.attachEvent("onmousedown", function(b) {
2443                a.handleMouseDown.call(a, b)
2444            }), b.attachEvent("onmouseover", function(b) {
2445                a.handleMouseOver.call(a, b)
2446            }), b.attachEvent("onmouseout", function(b) {
2447                a.handleMouseOut.call(a, b)
2448            }))
2449        },
2450        dispDUpd: function() {
2451            this.skipEvents || (this.dispatchDataUpdated && (this.dispatchDataUpdated = !1, this.fire({
2452                type: "dataUpdated",
2453                chart: this
2454            })), this.chartCreated || (this.chartCreated = !0, this.fire({
2455                type: "init",
2456                chart: this
2457            })), this.chartRendered || (this.fire({
2458                type: "rendered",
2459                chart: this
2460            }), this.chartRendered = !0), this.fire({
2461                type: "drawn",
2462                chart: this
2463            }));
2464            this.skipEvents = !1
2465        },
2466        validateSize: function() {
2467            var a = this;
2468            a.premeasure();
2469            a.checkDisplay();
2470            a.cssScale = 1;
2471            a.cssAngle = 0;
2472            a.checkTransform(a.div);
2473            if (a.divRealWidth != a.previousWidth || a.divRealHeight != a.previousHeight) {
2474                var b = a.legend;
2475                if (0 < a.realWidth && 0 < a.realHeight) {
2476                    a.sizeChanged = !0;
2477                    if (b) {
2478                        a.legendInitTO && clearTimeout(a.legendInitTO);
2479                        var c = setTimeout(function() {
2480                            b.invalidateSize()
2481                        }, 10);
2482                        a.timeOuts.push(c);
2483                        a.legendInitTO = c
2484                    }
2485                    a.marginsUpdated = !1;
2486                    clearTimeout(a.initTO);
2487                    c = setTimeout(function() {
2488                        a.initChart()
2489                    }, 10);
2490                    a.timeOuts.push(c);
2491                    a.initTO = c
2492                }
2493                a.renderFix();
2494                b && b.renderFix && b.renderFix();
2495                a.positionCred();
2496                clearTimeout(a.resizedTO);
2497                a.resizedTO = setTimeout(function() {
2498                    a.fire({
2499                        type: "resized",
2500                        chart: a
2501                    })
2502                }, 10);
2503                a.previousHeight = a.divRealHeight;
2504                a.previousWidth = a.divRealWidth
2505            }
2506        },
2507        invalidateSize: function() {
2508            this.previousHeight = this.previousWidth = NaN;
2509            this.invalidateSizeReal()
2510        },
2511        invalidateSizeReal: function() {
2512            var a = this;
2513            a.marginsUpdated = !1;
2514            clearTimeout(a.validateTO);
2515            var b = setTimeout(function() {
2516                a.validateSize()
2517            }, 5);
2518            a.timeOuts.push(b);
2519            a.validateTO = b
2520        },
2521        validateData: function(a) {
2522            this.chartCreated && (this.dataChanged = !0, this.marginsUpdated = !1, this.initChart(a))
2523        },
2524        validateNow: function(a, b) {
2525            this.initTO && clearTimeout(this.initTO);
2526            a && (this.dataChanged = !0, this.marginsUpdated = !1);
2527            this.skipEvents = b;
2528            this.chartRendered = !1;
2529            var c = this.legend;
2530            c && c.position != this.prevLegendPosition && (this.previousWidth = this.mw = 0, c.invalidateSize && (c.invalidateSize(), this.validateSize()));
2531            this.write(this.div)
2532        },
2533        showItem: function(a) {
2534            a.hidden = !1;
2535            this.initChart()
2536        },
2537        hideItem: function(a) {
2538            a.hidden = !0;
2539            this.initChart()
2540        },
2541        hideBalloon: function() {
2542            var a = this;
2543            clearTimeout(a.hoverInt);
2544            clearTimeout(a.balloonTO);
2545            a.hoverInt = setTimeout(function() {
2546                a.hideBalloonReal.call(a)
2547            }, a.hideBalloonTime)
2548        },
2549        cleanChart: function() {},
2550        hideBalloonReal: function() {
2551            var a = this.balloon;
2552            a && a.hide && a.hide()
2553        },
2554        showBalloon: function(a, b, c, e, d) {
2555            var f = this;
2556            clearTimeout(f.balloonTO);
2557            clearTimeout(f.hoverInt);
2558            f.balloonTO = setTimeout(function() {
2559                f.showBalloonReal.call(f, a, b, c, e, d)
2560            }, 1)
2561        },
2562        showBalloonReal: function(a, b, c, e, d) {
2563            this.handleMouseMove();
2564            var f = this.balloon;
2565            f.enabled && (f.followCursor(!1), f.changeColor(b), !c || f.fixedPosition ? (f.setPosition(e, d), isNaN(e) || isNaN(d) ? f.followCursor(!0) : f.followCursor(!1)) : f.followCursor(!0), a && f.showBalloon(a))
2566        },
2567        handleMouseOver: function() {
2568            this.outTO && clearTimeout(this.outTO);
2569            d.resetMouseOver();
2570            this.mouseIsOver = !0
2571        },
2572        handleMouseOut: function() {
2573            var a = this;
2574            d.resetMouseOver();
2575            a.outTO && clearTimeout(a.outTO);
2576            a.outTO = setTimeout(function() {
2577                a.handleMouseOutReal()
2578            }, 10)
2579        },
2580        handleMouseOutReal: function() {
2581            this.mouseIsOver = !1
2582        },
2583        handleMouseMove: function(a) {
2584            a || (a = window.event);
2585            this.mouse2Y = this.mouse2X = NaN;
2586            var b, c, e, d;
2587            if (a) {
2588                if (a.touches) {
2589                    var f = a.touches.item(1);
2590                    f && this.panEventsEnabled && this.boundingRect && (e = f.clientX - this.boundingRect.left, d = f.clientY - this.boundingRect.top);
2591                    a = a.touches.item(0);
2592                    if (!a) return
2593                } else this.wasTouched = !1;
2594                this.boundingRect && a.clientX && (b = a.clientX - this.boundingRect.left, c = a.clientY - this.boundingRect.top);
2595                isNaN(e) ? this.mouseX = b : (this.mouseX = Math.min(b, e), this.mouse2X = Math.max(b, e));
2596                isNaN(d) ? this.mouseY = c : (this.mouseY = Math.min(c, d), this.mouse2Y = Math.max(c, d));
2597                this.autoTransform && (this.mouseX /= this.cssScale, this.mouseY /= this.cssScale)
2598            }
2599        },
2600        handleTouchStart: function(a) {
2601            this.hideBalloonReal();
2602            a && (a.touches && this.tapToActivate && !this.tapped || !this.panRequired) || (this.handleMouseMove(a), this.handleMouseDown(a))
2603        },
2604        handleTouchEnd: function(a) {
2605            this.wasTouched = !0;
2606            this.handleMouseMove(a);
2607            d.resetMouseOver();
2608            this.handleReleaseOutside(a)
2609        },
2610        handleReleaseOutside: function() {
2611            this.handleDocTouchEnd.call(this)
2612        },
2613        handleMouseDown: function(a) {
2614            d.resetMouseOver();
2615            this.mouseIsOver = !0;
2616            a && a.preventDefault && (this.panEventsEnabled ? a.preventDefault() : a.touches || a.preventDefault())
2617        },
2618        addLegend: function(a, b) {
2619            a = d.processObject(a, d.AmLegend, this.theme);
2620            a.divId = b;
2621            a.ieW = 0;
2622            var c;
2623            c = "object" != typeof b && b ? document.getElementById(b) : b;
2624            this.legend = a;
2625            a.chart = this;
2626            c ? (a.div = c, a.position = "outside", a.autoMargins = !1) : a.div = this.legendDiv;
2627            return a
2628        },
2629        removeLegend: function() {
2630            this.legend = void 0;
2631            this.previousWidth = 0;
2632            this.legendDiv.innerHTML = ""
2633        },
2634        handleResize: function() {
2635            (d.isPercents(this.width) || d.isPercents(this.height)) && this.invalidateSizeReal();
2636            this.renderFix()
2637        },
2638        renderFix: function() {
2639            if (!d.VML) {
2640                var a = this.container;
2641                a && a.renderFix()
2642            }
2643        },
2644        getSVG: function() {
2645            if (d.hasSVG) return this.container
2646        },
2647        animate: function(a, b, c, e, g, f, h) {
2648            a["an_" + b] && d.removeFromArray(this.animations, a["an_" + b]);
2649            c = {
2650                obj: a,
2651                frame: 0,
2652                attribute: b,
2653                from: c,
2654                to: e,
2655                time: g,
2656                effect: f,
2657                suffix: h
2658            };
2659            a["an_" + b] = c;
2660            this.animations.push(c);
2661            return c
2662        },
2663        setLegendData: function(a) {
2664            var b = this.legend;
2665            b && b.setData(a)
2666        },
2667        stopAnim: function(a) {
2668            d.removeFromArray(this.animations, a)
2669        },
2670        updateAnimations: function() {
2671            var a;
2672            this.container && this.container.update();
2673            if (this.animations)
2674                for (a = this.animations.length - 1; 0 <= a; a--) {
2675                    var b = this.animations[a],
2676                        c = d.updateRate * b.time,
2677                        e = b.frame + 1,
2678                        g = b.obj,
2679                        f = b.attribute;
2680                    if (e <= c) {
2681                        b.frame++;
2682                        var h = Number(b.from),
2683                            k = Number(b.to) - h,
2684                            c = d[b.effect](0, e, h, k, c);
2685                        0 === k ? (this.animations.splice(a, 1), g.node.style[f] = Number(b.to) + b.suffix) : g.node.style[f] = c + b.suffix
2686                    } else g.node.style[f] = Number(b.to) + b.suffix, g.animationFinished = !0, this.animations.splice(a, 1)
2687                }
2688        },
2689        update: function() {
2690            this.updateAnimations();
2691            var a = this.animatable;
2692            if (0 < a.length) {
2693                for (var b = !0, c = a.length - 1; 0 <= c; c--) {
2694                    var e = a[c];
2695                    e && (e.animationFinished ? a.splice(c, 1) : b = !1)
2696                }
2697                b && (this.fire({
2698                    type: "animationFinished",
2699                    chart: this
2700                }), this.animatable = [])
2701            }
2702        },
2703        inIframe: function() {
2704            try {
2705                return window.self !== window.top
2706            } catch (a) {
2707                return !0
2708            }
2709        },
2710        brr: function() {
2711            if (!this.hideCredits) {
2712                var a = "amcharts.com",
2713                    b = window.location.hostname.split("."),
2714                    c;
2715                2 <= b.length && (c = b[b.length - 2] + "." + b[b.length - 1]);
2716                this.amLink && (b = this.amLink.parentNode) && b.removeChild(this.amLink);
2717                if (c != a || !0 === this.inIframe()) {
2718                    c = a = "http://www." + a;
2719                    var b = "JavaScript charts",
2720                        e = "JS chart by amCharts";
2721                    "ammap" == this.product && (c = a + "/javascript-maps/", b = "Interactive JavaScript maps", e = "JS map by amCharts");
2722                    a = document.createElement("a");
2723                    e = document.createTextNode(e);
2724                    a.setAttribute("href", c);
2725                    a.setAttribute("title", b);
2726                    this.urlTarget && a.setAttribute("target", this.urlTarget);
2727                    a.appendChild(e);
2728                    this.chartDiv.appendChild(a);
2729                    this.amLink = a;
2730                    a = a.style;
2731                    a.position = "absolute";
2732                    a.textDecoration = "none";
2733                    a.color = this.color;
2734                    a.fontFamily = this.fontFamily;
2735                    a.fontSize = "11px";
2736                    a.opacity = .7;
2737                    a.display = "block";
2738                    this.positionCred()
2739                }
2740            }
2741        },
2742        positionCred: function() {
2743            var a = this.amLink;
2744            if (a) {
2745                var b = this.creditsPosition,
2746                    c = a.style,
2747                    e = a.offsetWidth,
2748                    a = a.offsetHeight,
2749                    d = 0,
2750                    f = 0,
2751                    h = this.realWidth,
2752                    k = this.realHeight,
2753                    l = this.type;
2754                if ("serial" == l || "xy" == l || "gantt" == l) d = this.marginLeftReal, f = this.marginTopReal, h = d + this.plotAreaWidth, k = f + this.plotAreaHeight;
2755                var l = 5 + d,
2756                    m = f + 5;
2757                "bottom-left" == b && (l = 5 + d, m = k - a - 3);
2758                "bottom-right" == b && (l = h - e - 5, m = k - a - 3);
2759                "top-right" == b && (l = h - e - 5, m = f + 5);
2760                c.left = l + "px";
2761                c.top = m + "px"
2762            }
2763        }
2764    });
2765    d.Slice = d.Class({
2766        construct: function() {}
2767    });
2768    d.SerialDataItem = d.Class({
2769        construct: function() {}
2770    });
2771    d.GraphDataItem = d.Class({
2772        construct: function() {}
2773    });
2774    d.Guide = d.Class({
2775        construct: function(a) {
2776            this.cname = "Guide";
2777            d.applyTheme(this, a, this.cname)
2778        }
2779    });
2780    d.Title = d.Class({
2781        construct: function(a) {
2782            this.cname = "Title";
2783            d.applyTheme(this, a, this.cname)
2784        }
2785    });
2786    d.Label = d.Class({
2787        construct: function(a) {
2788            this.cname = "Label";
2789            d.applyTheme(this, a, this.cname)
2790        }
2791    })
2792})();
2793(function() {
2794    var d = window.AmCharts;
2795    d.AmGraph = d.Class({
2796        construct: function(a) {
2797            this.cname = "AmGraph";
2798            this.createEvents("rollOverGraphItem", "rollOutGraphItem", "clickGraphItem", "doubleClickGraphItem", "rightClickGraphItem", "clickGraph", "rollOverGraph", "rollOutGraph");
2799            this.type = "line";
2800            this.stackable = !0;
2801            this.columnCount = 1;
2802            this.columnIndex = 0;
2803            this.centerCustomBullets = this.showBalloon = !0;
2804            this.maxBulletSize = 50;
2805            this.minBulletSize = 4;
2806            this.balloonText = "[[value]]";
2807            this.hidden = this.scrollbar = this.animationPlayed = !1;
2808            this.pointPosition = "middle";
2809            this.depthCount = 1;
2810            this.includeInMinMax = !0;
2811            this.negativeBase = 0;
2812            this.visibleInLegend = !0;
2813            this.showAllValueLabels = !1;
2814            this.showBulletsAt = this.showBalloonAt = "close";
2815            this.lineThickness = 1;
2816            this.dashLength = 0;
2817            this.connect = !0;
2818            this.lineAlpha = 1;
2819            this.bullet = "none";
2820            this.bulletBorderThickness = 2;
2821            this.bulletBorderAlpha = 0;
2822            this.bulletAlpha = 1;
2823            this.bulletSize = 8;
2824            this.cornerRadiusTop = this.hideBulletsCount = this.bulletOffset = 0;
2825            this.cursorBulletAlpha = 1;
2826            this.gradientOrientation = "vertical";
2827            this.dy = this.dx = 0;
2828            this.periodValue = "";
2829            this.clustered = !0;
2830            this.periodSpan = 1;
2831            this.accessibleLabel = "[[title]] [[category]] [[value]]";
2832            this.accessibleSkipText = "Press enter to skip [[title]]";
2833            this.y = this.x = 0;
2834            this.switchable = !0;
2835            this.minDistance = .8;
2836            this.tcc = 1;
2837            this.labelRotation = 0;
2838            this.labelAnchor = "auto";
2839            this.labelOffset = 3;
2840            this.bcn = "graph-";
2841            this.dateFormat = "MMM DD, YYYY";
2842            this.noRounding = !0;
2843            d.applyTheme(this, a, this.cname)
2844        },
2845        init: function() {
2846            this.createBalloon()
2847        },
2848        draw: function() {
2849            var a = this.chart;
2850            a.isRolledOverBullet = !1;
2851            var b = a.type;
2852            if (a.drawGraphs) {
2853                isNaN(this.precision) || (this.numberFormatter ? this.numberFormatter.precision = this.precision : this.numberFormatter = {
2854                    precision: this.precision,
2855                    decimalSeparator: a.decimalSeparator,
2856                    thousandsSeparator: a.thousandsSeparator
2857                });
2858                var c = a.container;
2859                this.container = c;
2860                this.destroy();
2861                var e = c.set();
2862                this.set = e;
2863                e.translate(this.x, this.y);
2864                var g = c.set();
2865                this.bulletSet = g;
2866                g.translate(this.x, this.y);
2867                this.behindColumns ? (a.graphsBehindSet.push(e), a.bulletBehindSet.push(g)) : (a.graphsSet.push(e), a.bulletSet.push(g));
2868                var f = this.bulletAxis;
2869                d.isString(f) && (this.bulletAxis = a.getValueAxisById(f));
2870                c = c.set();
2871                d.remove(this.columnsSet);
2872                this.columnsSet = c;
2873                d.setCN(a, e, "graph-" + this.type);
2874                d.setCN(a, e, "graph-" + this.id);
2875                d.setCN(a, g, "graph-" + this.type);
2876                d.setCN(a, g, "graph-" + this.id);
2877                this.columnsArray = [];
2878                this.ownColumns = [];
2879                this.allBullets = [];
2880                this.animationArray = [];
2881                g = this.labelPosition;
2882                g || (f = this.valueAxis.stackType, g = "top", "column" == this.type && (a.rotate && (g = "right"), "100%" == f || "regular" == f) && (g = "middle"), this.labelPosition = g);
2883                d.ifArray(this.data) && (a = !1, "xy" == b ? this.xAxis.axisCreated && this.yAxis.axisCreated && (a = !0) : this.valueAxis.axisCreated && (a = !0), !this.hidden && a && this.createGraph());
2884                e.push(c)
2885            }
2886        },
2887        createGraph: function() {
2888            var a = this,
2889                b = a.chart;
2890            a.startAlpha = b.startAlpha;
2891            a.seqAn = b.sequencedAnimation;
2892            a.baseCoord = a.valueAxis.baseCoord;
2893            void 0 === a.fillAlphas && (a.fillAlphas = 0);
2894            a.bulletColorR = a.bulletColor;
2895            void 0 === a.bulletColorR && (a.bulletColorR = a.lineColorR, a.bulletColorNegative = a.negativeLineColor);
2896            void 0 === a.bulletAlpha && (a.bulletAlpha = a.lineAlpha);
2897            if ("step" == c || d.VML) a.noRounding = !1;
2898            var c = b.type;
2899            "gantt" == c && (c = "serial");
2900            clearTimeout(a.playedTO);
2901            if (!isNaN(a.valueAxis.min) && !isNaN(a.valueAxis.max)) {
2902                switch (c) {
2903                    case "serial":
2904                        a.categoryAxis && (a.createSerialGraph(), "candlestick" == a.type && 1 > a.valueAxis.minMaxMultiplier && a.positiveClip(a.set));
2905                        break;
2906                    case "radar":
2907                        a.createRadarGraph();
2908                        break;
2909                    case "xy":
2910                        a.createXYGraph()
2911                }
2912                a.playedTO = setTimeout(function() {
2913                    a.setAnimationPlayed.call(a)
2914                }, 500 * a.chart.startDuration)
2915            }
2916        },
2917        setAnimationPlayed: function() {
2918            this.animationPlayed = !0
2919        },
2920        createXYGraph: function() {
2921            var a = [],
2922                b = [],
2923                c = this.xAxis,
2924                e = this.yAxis;
2925            this.pmh = e.height;
2926            this.pmw = c.width;
2927            this.pmy = this.pmx = 0;
2928            var d;
2929            for (d = this.start; d <= this.end; d++) {
2930                var f = this.data[d].axes[c.id].graphs[this.id],
2931                    h = f.values,
2932                    k = h.x,
2933                    l = h.y,
2934                    h = c.getCoordinate(k, this.noRounding),
2935                    m = e.getCoordinate(l, this.noRounding);
2936                if (!isNaN(k) && !isNaN(l) && (a.push(h), b.push(m), f.x = h, f.y = m, k = this.createBullet(f, h, m, d), l = this.labelText)) {
2937                    var l = this.createLabel(f, l),
2938                        n = 0;
2939                    k && (n = k.size);
2940                    this.positionLabel(f, h, m, l, n)
2941                }
2942            }
2943            this.drawLineGraph(a, b);
2944            this.launchAnimation()
2945        },
2946        createRadarGraph: function() {
2947            var a = this.valueAxis.stackType,
2948                b = [],
2949                c = [],
2950                e = [],
2951                d = [],
2952                f, h, k, l, m;
2953            for (m = this.start; m <= this.end; m++) {
2954                var n = this.data[m].axes[this.valueAxis.id].graphs[this.id],
2955                    q, p;
2956                "none" == a || "3d" == a ? q = n.values.value : (q = n.values.close, p = n.values.open);
2957                if (isNaN(q)) this.connect || (this.drawLineGraph(b, c, e, d), b = [], c = [], e = [], d = []);
2958                else {
2959                    var t = this.valueAxis.getCoordinate(q, this.noRounding) - this.height,
2960                        t = t * this.valueAxis.rMultiplier,
2961                        r = -360 / (this.end - this.start + 1) * m;
2962                    "middle" == this.valueAxis.pointPosition && (r -= 180 / (this.end - this.start + 1));
2963                    q = t * Math.sin(r / 180 * Math.PI);
2964                    t *= Math.cos(r / 180 * Math.PI);
2965                    b.push(q);
2966                    c.push(t);
2967                    if (!isNaN(p)) {
2968                        var w = this.valueAxis.getCoordinate(p, this.noRounding) - this.height,
2969                            w = w * this.valueAxis.rMultiplier,
2970                            z = w * Math.sin(r / 180 * Math.PI),
2971                            r = w * Math.cos(r / 180 * Math.PI);
2972                        e.push(z);
2973                        d.push(r);
2974                        isNaN(k) && (k = z);
2975                        isNaN(l) && (l = r)
2976                    }
2977                    r = this.createBullet(n, q, t, m);
2978                    n.x = q;
2979                    n.y = t;
2980                    if (z = this.labelText) z = this.createLabel(n, z), w = 0, r && (w = r.size), this.positionLabel(n, q, t, z, w);
2981                    isNaN(f) && (f = q);
2982                    isNaN(h) && (h = t)
2983                }
2984            }
2985            b.push(f);
2986            c.push(h);
2987            isNaN(k) || (e.push(k), d.push(l));
2988            this.drawLineGraph(b, c, e, d);
2989            this.launchAnimation()
2990        },
2991        positionLabel: function(a, b, c, e, d) {
2992            if (e) {
2993                var f = this.chart,
2994                    h = this.valueAxis,
2995                    k = "middle",
2996                    l = !1,
2997                    m = this.labelPosition,
2998                    n = e.getBBox(),
2999                    q = this.chart.rotate,
3000                    p = a.isNegative,
3001                    t = this.fontSize;
3002                void 0 === t && (t = this.chart.fontSize);
3003                c -= n.height / 2 - t / 2 - 1;
3004                void 0 !== a.labelIsNegative && (p = a.labelIsNegative);
3005                switch (m) {
3006                    case "right":
3007                        m = q ? p ? "left" : "right" : "right";
3008                        break;
3009                    case "top":
3010                        m = q ? "top" : p ? "bottom" : "top";
3011                        break;
3012                    case "bottom":
3013                        m = q ? "bottom" : p ? "top" : "bottom";
3014                        break;
3015                    case "left":
3016                        m = q ? p ? "right" : "left" : "left"
3017                }
3018                var t = a.columnGraphics,
3019                    r = 0,
3020                    w = 0;
3021                t && (r = t.x, w = t.y);
3022                var z = this.labelOffset;
3023                switch (m) {
3024                    case "right":
3025                        k = "start";
3026                        b += d / 2 + z;
3027                        break;
3028                    case "top":
3029                        c = h.reversed ? c + (d / 2 + n.height / 2 + z) : c - (d / 2 + n.height / 2 + z);
3030                        break;
3031                    case "bottom":
3032                        c = h.reversed ? c - (d / 2 + n.height / 2 + z) : c + (d / 2 + n.height / 2 + z);
3033                        break;
3034                    case "left":
3035                        k = "end";
3036                        b -= d / 2 + z;
3037                        break;
3038                    case "inside":
3039                        "column" == this.type && (l = !0, q ? p ? (k = "end", b = r - 3 -
3040                            z) : (k = "start", b = r + 3 + z) : c = p ? w + 7 + z : w - 10 - z);
3041                        break;
3042                    case "middle":
3043                        "column" == this.type && (l = !0, q ? b -= (b - r) / 2 + z - 3 : c -= (c - w) / 2 + z - 3)
3044                }
3045                "auto" != this.labelAnchor && (k = this.labelAnchor);
3046                e.attr({
3047                    "text-anchor": k
3048                });
3049                this.labelRotation && e.rotate(this.labelRotation);
3050                e.translate(b, c);
3051                !this.showAllValueLabels && t && l && (n = e.getBBox(), n.height > a.columnHeight || n.width > a.columnWidth) && (e.remove(), e = null);
3052                if (e && "radar" != f.type)
3053                    if (q) {
3054                        if (0 > c || c > this.height) e.remove(), e = null;
3055                        !this.showAllValueLabels && e && (0 > b || b > this.width) && (e.remove(), e = null)
3056                    } else {
3057                        if (0 > b || b > this.width) e.remove(), e = null;
3058                        !this.showAllValueLabels && e && (0 > c || c > this.height) && (e.remove(), e = null)
3059                    }
3060                e && this.allBullets.push(e);
3061                return e
3062            }
3063        },
3064        getGradRotation: function() {
3065            var a = 270;
3066            "horizontal" == this.gradientOrientation && (a = 0);
3067            return this.gradientRotation = a
3068        },
3069        createSerialGraph: function() {
3070            this.dashLengthSwitched = this.fillColorsSwitched = this.lineColorSwitched = void 0;
3071            var a = this.chart,
3072                b = this.id,
3073                c = this.index,
3074                e = this.data,
3075                g = this.chart.container,
3076                f = this.valueAxis,
3077                h = this.type,
3078                k = this.columnWidthReal,
3079                l = this.showBulletsAt;
3080            isNaN(this.columnWidth) || (k = this.columnWidth);
3081            isNaN(k) && (k = .8);
3082            var m = this.useNegativeColorIfDown,
3083                n = this.width,
3084                q = this.height,
3085                p = this.y,
3086                t = this.rotate,
3087                r = this.columnCount,
3088                w = d.toCoordinate(this.cornerRadiusTop, k / 2),
3089                z = this.connect,
3090                x = [],
3091                u = [],
3092                A, y, B, D, C = this.chart.graphs.length,
3093                I, H = this.dx / this.tcc,
3094                Q = this.dy / this.tcc,
3095                M = f.stackType,
3096                P = this.start,
3097                ia = this.end,
3098                J = this.scrollbar,
3099                aa = "graph-column-";
3100            J && (aa = "scrollbar-graph-column-");
3101            var ma = this.categoryAxis,
3102                na = this.baseCoord,
3103                Pa = this.negativeBase,
3104                Z = this.columnIndex,
3105                da = this.lineThickness,
3106                X = this.lineAlpha,
3107                xa = this.lineColorR,
3108                ea = this.dashLength,
3109                fa = this.set,
3110                Ba, ga = this.getGradRotation(),
3111                V = this.chart.columnSpacing,
3112                Y = ma.cellWidth,
3113                Da = (Y * k - r) / r;
3114            V > Da && (V = Da);
3115            var G, v, oa, ha = q,
3116                Qa = n,
3117                ca = 0,
3118                tb = 0,
3119                ub = 0,
3120                vb = 0,
3121                lb = 0,
3122                mb = 0,
3123                wb = this.fillColorsR,
3124                Ra = this.negativeFillColors,
3125                Ja = this.negativeLineColor,
3126                bb = this.fillAlphas,
3127                cb = this.negativeFillAlphas;
3128            "object" == typeof bb && (bb = bb[0]);
3129            "object" == typeof cb && (cb = cb[0]);
3130            var xb = this.noRounding;
3131            "step" == h && (xb = !1);
3132            var nb = f.getCoordinate(f.min);
3133            f.logarithmic && (nb = f.getCoordinate(f.minReal));
3134            this.minCoord = nb;
3135            this.resetBullet && (this.bullet = "none");
3136            if (!(J || "line" != h && "smoothedLine" != h && "step" != h || (1 == e.length && "step" != h && "none" == this.bullet && (this.bullet = "round", this.resetBullet = !0), !Ra && void 0 == Ja || m))) {
3137                var Ua = Pa;
3138                Ua > f.max && (Ua = f.max);
3139                Ua < f.min && (Ua = f.min);
3140                f.logarithmic && (Ua = f.minReal);
3141                var Ka = f.getCoordinate(Ua) + .5,
3142                    Mb = f.getCoordinate(f.max);
3143                t ? (ha = q, Qa = Math.abs(Mb - Ka), ub = q, vb = Math.abs(nb - Ka), mb = tb = 0, f.reversed ? (ca = 0, lb = Ka) : (ca = Ka, lb = 0)) : (Qa = n, ha = Math.abs(Mb - Ka), vb = n, ub = Math.abs(nb - Ka), lb = ca = 0, f.reversed ? (mb = p, tb = Ka) : mb = Ka)
3144            }
3145            var La = Math.round;
3146            this.pmx = La(ca);
3147            this.pmy = La(tb);
3148            this.pmh = La(ha);
3149            this.pmw = La(Qa);
3150            this.nmx = La(lb);
3151            this.nmy = La(mb);
3152            this.nmh = La(ub);
3153            this.nmw = La(vb);
3154            d.isModern || (this.nmy = this.nmx = 0, this.nmh = this.height);
3155            this.clustered || (r = 1);
3156            k = "column" == h ? (Y * k - V * (r - 1)) / r : Y * k;
3157            1 > k && (k = 1);
3158            var Nb = this.fixedColumnWidth;
3159            isNaN(Nb) || (k = Nb);
3160            var L;
3161            if ("line" == h || "step" == h || "smoothedLine" == h) {
3162                if (0 < P) {
3163                    for (L = P - 1; - 1 < L; L--)
3164                        if (G = e[L], v = G.axes[f.id].graphs[b], oa = v.values.value, !isNaN(oa)) {
3165                            P = L;
3166                            break
3167                        }
3168                    if (this.lineColorField)
3169                        for (L = P; - 1 < L; L--)
3170                            if (G = e[L], v = G.axes[f.id].graphs[b], v.lineColor) {
3171                                this.lineColorSwitched = v.lineColor;
3172                                void 0 === this.bulletColor && (this.bulletColorSwitched = this.lineColorSwitched);
3173                                break
3174                            }
3175                    if (this.fillColorsField)
3176                        for (L = P; - 1 < L; L--)
3177                            if (G = e[L], v = G.axes[f.id].graphs[b], v.fillColors) {
3178                                this.fillColorsSwitched = v.fillColors;
3179                                break
3180                            }
3181                    if (this.dashLengthField)
3182                        for (L = P; - 1 < L; L--)
3183                            if (G = e[L], v = G.axes[f.id].graphs[b], !isNaN(v.dashLength)) {
3184                                this.dashLengthSwitched = v.dashLength;
3185                                break
3186                            }
3187                }
3188                if (ia < e.length - 1)
3189                    for (L = ia + 1; L < e.length; L++)
3190                        if (G = e[L], v = G.axes[f.id].graphs[b], oa = v.values.value, !isNaN(oa)) {
3191                            ia = L;
3192                            break
3193                        }
3194            }
3195            ia < e.length - 1 && ia++;
3196            var T = [],
3197                U = [],
3198                Ma = !1;
3199            if ("line" == h || "step" == h || "smoothedLine" == h)
3200                if (this.stackable && "regular" == M || "100%" == M || this.fillToGraph) Ma = !0;
3201            var Ob = this.noStepRisers,
3202                db = -1E3,
3203                eb = -1E3,
3204                ob = this.minDistance,
3205                Sa = !0,
3206                Va = !1;
3207            for (L = P; L <= ia; L++) {
3208                G = e[L];
3209                v = G.axes[f.id].graphs[b];
3210                v.index = L;
3211                var fb, Ta = NaN;
3212                if (m && void 0 == this.openField)
3213                    for (var yb = L + 1; yb < e.length && (!e[yb] || !(fb = e[L + 1].axes[f.id].graphs[b]) || !fb.values || (Ta = fb.values.value, isNaN(Ta))); yb++);
3214                var S, R, K, ba, ja = NaN,
3215                    E = NaN,
3216                    F = NaN,
3217                    O = NaN,
3218                    N = NaN,
3219                    qa = NaN,
3220                    ra = NaN,
3221                    sa = NaN,
3222                    ta = NaN,
3223                    ya = NaN,
3224                    Ea = NaN,
3225                    ka = NaN,
3226                    la = NaN,
3227                    W = NaN,
3228                    zb = NaN,
3229                    Ab = NaN,
3230                    ua = NaN,
3231                    va = void 0,
3232                    Na = wb,
3233                    Wa = bb,
3234                    Ha = xa,
3235                    Ca, za, Bb = this.proCandlesticks,
3236                    pb = this.topRadius,
3237                    Fa = q - 1,
3238                    pa = n - 1,
3239                    gb = this.pattern;
3240                void 0 != v.pattern && (gb = v.pattern);
3241                isNaN(v.alpha) || (Wa = v.alpha);
3242                isNaN(v.dashLength) || (ea = v.dashLength);
3243                var Ia = v.values;
3244                f.recalculateToPercents && (Ia = v.percents);
3245                "none" == M && (Z = isNaN(v.columnIndex) ? this.columnIndex : v.columnIndex);
3246                if (Ia) {
3247                    W = this.stackable && "none" != M && "3d" != M ? Ia.close : Ia.value;
3248                    if ("candlestick" == h || "ohlc" == h) W = Ia.close, Ab = Ia.low, ra = f.getCoordinate(Ab), zb = Ia.high, ta = f.getCoordinate(zb);
3249                    ua = Ia.open;
3250                    F = f.getCoordinate(W, xb);
3251                    isNaN(ua) || (N = f.getCoordinate(ua, xb), m && "regular" != M && "100%" != M && (Ta = ua, ua = N = NaN));
3252                    m && (void 0 == this.openField ? fb && (fb.isNegative = Ta < W ? !0 : !1, isNaN(Ta) && (v.isNegative = !Sa)) : v.isNegative = Ta > W ? !0 : !1);
3253                    if (!J) switch (this.showBalloonAt) {
3254                        case "close":
3255                            v.y = F;
3256                            break;
3257                        case "open":
3258                            v.y = N;
3259                            break;
3260                        case "high":
3261                            v.y = ta;
3262                            break;
3263                        case "low":
3264                            v.y = ra
3265                    }
3266                    var ja = G.x[ma.id],
3267                        Xa = this.periodSpan - 1;
3268                    "step" != h || isNaN(G.cellWidth) || (Y = G.cellWidth);
3269                    var wa = Math.floor(Y / 2) + Math.floor(Xa * Y / 2),
3270                        Ga = wa,
3271                        qb = 0;
3272                    "left" == this.stepDirection && (qb = (2 * Y + Xa * Y) / 2, ja -= qb);
3273                    "center" == this.stepDirection && (qb = Y / 2, ja -= qb);
3274                    "start" == this.pointPosition && (ja -= Y / 2 + Math.floor(Xa * Y / 2), wa = 0, Ga = Math.floor(Y) + Math.floor(Xa * Y));
3275                    "end" == this.pointPosition && (ja += Y / 2 + Math.floor(Xa * Y / 2), wa = Math.floor(Y) + Math.floor(Xa * Y), Ga = 0);
3276                    if (Ob) {
3277                        var Cb = this.columnWidth;
3278                        isNaN(Cb) || (wa *= Cb, Ga *= Cb)
3279                    }
3280                    J || (v.x = ja); - 1E5 > ja && (ja = -1E5);
3281                    ja > n + 1E5 && (ja = n + 1E5);
3282                    t ? (E = F, O = N, N = F = ja, isNaN(ua) && !this.fillToGraph && (O = na), qa = ra, sa = ta) : (O = E = ja, isNaN(ua) && !this.fillToGraph && (N = na));
3283                    if (!Bb && W < ua || Bb && W < Ba) v.isNegative = !0, Ra && (Na = Ra), cb && (Wa = cb), void 0 != Ja && (Ha = Ja);
3284                    Va = !1;
3285                    isNaN(W) || (m ? W > Ta ? (Sa && (Va = !0), Sa = !1) : (Sa || (Va = !0), Sa = !0) : v.isNegative = W < Pa ? !0 : !1, Ba = W);
3286                    var Pb = !1;
3287                    J && a.chartScrollbar.ignoreCustomColors && (Pb = !0);
3288                    Pb || (void 0 != v.color && (Na = v.color), v.fillColors && (Na = v.fillColors));
3289                    F = d.fitToBounds(F, -3E4, 3E4);
3290                    switch (h) {
3291                        case "line":
3292                            if (isNaN(W)) z || (this.drawLineGraph(x, u, T, U), x = [], u = [], T = [], U = []);
3293                            else {
3294                                if (Math.abs(E - db) >= ob || Math.abs(F - eb) >= ob) x.push(E), u.push(F), db = E, eb = F;
3295                                ya = E;
3296                                Ea = F;
3297                                ka = E;
3298                                la = F;
3299                                !Ma || isNaN(N) || isNaN(O) || (T.push(O), U.push(N));
3300                                if (Va || void 0 != v.lineColor && v.lineColor != this.lineColorSwitched || void 0 != v.fillColors && v.fillColors != this.fillColorsSwitched || !isNaN(v.dashLength)) this.drawLineGraph(x, u, T, U), x = [E], u = [F], T = [], U = [], !Ma || isNaN(N) || isNaN(O) || (T.push(O), U.push(N)), m ? (Sa ? (this.lineColorSwitched = xa, this.fillColorsSwitched = wb) : (this.lineColorSwitched = Ja, this.fillColorsSwitched = Ra), void 0 === this.bulletColor && (this.bulletColorSwitched = xa)) : (this.lineColorSwitched = v.lineColor, this.fillColorsSwitched = v.fillColors, void 0 === this.bulletColor && (this.bulletColorSwitched = this.lineColorSwitched)), this.dashLengthSwitched = v.dashLength;
3301                                v.gap && (this.drawLineGraph(x, u, T, U), x = [], u = [], T = [], U = [], eb = db = -1E3)
3302                            }
3303                            break;
3304                        case "smoothedLine":
3305                            if (isNaN(W)) z || (this.drawSmoothedGraph(x, u, T, U), x = [], u = [], T = [], U = []);
3306                            else {
3307                                if (Math.abs(E -
3308                                        db) >= ob || Math.abs(F - eb) >= ob) x.push(E), u.push(F), db = E, eb = F;
3309                                ya = E;
3310                                Ea = F;
3311                                ka = E;
3312                                la = F;
3313                                !Ma || isNaN(N) || isNaN(O) || (T.push(O), U.push(N));
3314                                if (Va || void 0 != v.lineColor && v.lineColor != this.lineColorSwitched || void 0 != v.fillColors && v.fillColors != this.fillColorsSwitched || !isNaN(v.dashLength)) this.drawSmoothedGraph(x, u, T, U), x = [E], u = [F], T = [], U = [], !Ma || isNaN(N) || isNaN(O) || (T.push(O), U.push(N)), this.lineColorSwitched = v.lineColor, this.fillColorsSwitched = v.fillColors, this.dashLengthSwitched = v.dashLength;
3315                                v.gap && (this.drawSmoothedGraph(x, u, T, U), x = [], u = [], T = [], U = [])
3316                            }
3317                            break;
3318                        case "step":
3319                            if (!isNaN(W)) {
3320                                t ? (isNaN(A) || (x.push(A), u.push(F - wa)), u.push(F - wa), x.push(E), u.push(F + Ga), x.push(E), !Ma || isNaN(N) || isNaN(O) || (isNaN(B) || (T.push(B), U.push(N - wa)), T.push(O), U.push(N - wa), T.push(O), U.push(N + Ga))) : (isNaN(y) || (u.push(y), x.push(E - wa)), x.push(E - wa), u.push(F), x.push(E + Ga), u.push(F), !Ma || isNaN(N) || isNaN(O) || (isNaN(D) || (T.push(O - wa), U.push(D)), T.push(O - wa), U.push(N), T.push(O + Ga), U.push(N)));
3321                                A = E;
3322                                y = F;
3323                                B = O;
3324                                D = N;
3325                                ya = E;
3326                                Ea = F;
3327                                ka = E;
3328                                la = F;
3329                                if (Va || void 0 != v.lineColor || void 0 != v.fillColors || !isNaN(v.dashLength)) {
3330                                    var Db = x[x.length - 2],
3331                                        dc = u[u.length - 2];
3332                                    x.pop();
3333                                    u.pop();
3334                                    T.pop
3334();
3335                                    U.pop();
3336                                    this.drawLineGraph(x, u, T, U);
3337                                    x = [Db];
3338                                    u = [dc];
3339                                    T = [];
3340                                    U = [];
3341                                    Ma && (T = [Db, Db + wa + Ga], U = [D, D]);
3342                                    t ? (u.push(F + Ga), x.push(E)) : (x.push(E + Ga), u.push(F));
3343                                    this.lineColorSwitched = v.lineColor;
3344                                    this.fillColorsSwitched = v.fillColors;
3345                                    this.dashLengthSwitched = v.dashLength;
3346                                    m && (Sa ? (this.lineColorSwitched = xa, this.fillColorsSwitched = wb) : (this.lineColorSwitched = Ja, this.fillColorsSwitched = Ra))
3347                                }
3348                                if (Ob || v.gap) A = y = NaN, this.drawLineGraph(x, u, T, U), x = [], u = [], T = [], U = []
3349                            } else if (!z) {
3350                                if (1 >= this.periodSpan || 1 < this.periodSpan && E - A > wa + Ga) A = y = NaN;
3351                                this.drawLineGraph(x, u, T, U);
3352                                x = [];
3353                                u = [];
3354                                T = [];
3355                                U = []
3356                            }
3357                            break;
3358                        case "column":
3359                            Ca = Ha;
3360                            void 0 != v.lineColor && (Ca = v.lineColor);
3361                            if (!isNaN(W)) {
3362                                m || (v.isNegative = W < Pa ? !0 : !1);
3363                                v.isNegative && (Ra && (Na = Ra), void 0 != Ja && (Ca = Ja));
3364                                var Qb = f.min,
3365                                    Rb = f.max,
3366                                    rb = ua;
3367                                isNaN(rb) && (rb = Pa);
3368                                if (!(W < Qb && rb < Qb || W > Rb && rb > Rb)) {
3369                                    var Aa;
3370                                    if (t) {
3371                                        "3d" == M ? (R = F - (r / 2 - this.depthCount + 1) * (k + V) + V / 2 + Q * Z, S = O + H * Z, Aa = Z) : (R = Math.floor(F - (r / 2 - Z) * (k + V) + V / 2), S = O, Aa = 0);
3372                                        K = k;
3373                                        ya = E;
3374                                        Ea = R + k / 2;
3375                                        ka = E;
3376                                        la = R + k / 2;
3377                                        R + K > q + Aa * Q && (K = q - R + Aa * Q);
3378                                        R < Aa * Q && (K += R, R = Aa * Q);
3379                                        ba = E - O;
3380                                        var ec = S;
3381                                        S = d.fitToBounds(S, 0, n);
3382                                        ba += ec - S;
3383                                        ba = d.fitToBounds(ba, -S, n - S + H * Z);
3384                                        v.labelIsNegative = 0 > ba ? !0 : !1;
3385                                        0 === ba && 1 / W === 1 / -0 && (v.labelIsNegative = !0);
3386                                        isNaN(G.percentWidthValue) || (K = this.height * G.percentWidthValue / 100, R = ja - K / 2, Ea = R + K / 2);
3387                                        K = d.roundTo(K, 2);
3388                                        ba = d.roundTo(ba, 2);
3389                                        R < q && 0 < K && (va = new d.Cuboid(g, ba, K, H - a.d3x, Q - a.d3y, Na, Wa, da, Ca, X, ga, w, t, ea, gb, pb, aa), v.columnWidth = Math.abs(ba), v.columnHeight = Math.abs(K))
3390                                    } else {
3391                                        "3d" == M ? (S = E - (r / 2 - this.depthCount + 1) * (k + V) + V / 2 + H * Z, R = N + Q * Z, Aa = Z) : (S = E - (r / 2 - Z) * (k + V) + V / 2, R = N, Aa = 0);
3392                                        K = k;
3393                                        ya = S + k / 2;
3394                                        Ea = F;
3395                                        ka = S + k / 2;
3396                                        la = F;
3397                                        S + K > n + Aa * H && (K = n - S + Aa * H);
3398                                        S < Aa * H && (K += S - Aa * H, S = Aa * H);
3399                                        ba = F - N;
3400                                        v.labelIsNegative = 0 < ba ? !0 : !1;
3401                                        0 === ba && 1 / W !== 1 / Math.abs(W) && (v.labelIsNegative = !0);
3402                                        var fc = R;
3403                                        R = d.fitToBounds(R, this.dy, q);
3404                                        ba += fc - R;
3405                                        ba = d.fitToBounds(ba, -R + Q * Aa, q - R);
3406                                        isNaN(G.percentWidthValue) || (K = this.width * G.percentWidthValue / 100, S = ja - K / 2, ya = S + K / 2);
3407                                        K = d.roundTo(K, 2);
3408                                        ba = d.roundTo(ba, 2);
3409                                        S < n + Z * H && 0 < K && (this.showOnAxis && (R -= Q / 2), va = new d.Cuboid(g, K, ba, H - a.d3x, Q - a.d3y, Na, Wa, da, Ca, this.lineAlpha, ga, w, t, ea, gb, pb, aa), v.columnHeight = Math.abs(ba), v.columnWidth = Math.abs(K))
3410                                    }
3411                                }
3412                                if (va) {
3413                                    za = va.set;
3414                                    d.setCN(a, va.set, "graph-" + this.type);
3415                                    d.setCN(a, va.set, "graph-" + this.id);
3416                                    v.className && d.setCN(a, va.set, v.className, !0);
3417                                    v.columnGraphics = za;
3418                                    S = d.roundTo(S, 2);
3419                                    R = d.roundTo(R, 2);
3420                                    za.translate(S, R);
3421                                    (v.url || this.showHandOnHover) && za.setAttr("cursor", "pointer");
3422                                    if (!J) {
3423                                        "none" == M && (I = t ? (this.end + 1 - L) * C - c : C * L + c);
3424                                        "3d" == M && (t ? (I = (this.end + 1 - L) * C - c - 1E3 * this.depthCount, ya += H * Z, ka += H * Z, v.y += H * Z) : (I = (C - c) * (L + 1) + 1E3 * this.depthCount, Ea += Q * Z, la += Q * Z, v.y += Q * Z));
3425                                        if ("regular" == M || "100%" == M) I = t ? 0 < Ia.value ? (this.end + 1 - L) * C + c + 1E3 * this.depthCount : (this.end + 1 - L) * C - c + 1E3 * this.depthCount : 0 < Ia.value ? C * L + c : C * L - c;
3426                                        this.columnsArray.push({
3427                                            column: va,
3428                                            depth: I
3429                                        });
3430                                        v.x = t ? R + K / 2 : S + K / 2;
3431                                        this.ownColumns.push(va);
3432                                        this.animateColumns(va, L, E, O, F, N);
3433                                        this.addListeners(za, v);
3434                                        void 0 !== this.tabIndex && za.setAttr("tabindex", this.tabIndex)
3435                                    }
3436                                    this.columnsSet.push(za)
3437                                }
3438                            }
3439                            break;
3440                        case "candlestick":
3441                            if (!isNaN(ua) && !isNaN(W)) {
3442                                var Ya, hb;
3443                                Ca = Ha;
3444                                void 0 != v.lineColor && (Ca = v.lineColor);
3445                                ya = E;
3446                                la = Ea = F;
3447                                ka = E;
3448                                if (t) {
3449                                    "open" == l && (ka = O);
3450                                    "high" == l && (ka = sa);
3451                                    "low" == l && (ka = qa);
3452                                    E = d.fitToBounds(E, 0, pa);
3453                                    O = d.fitToBounds(O, 0, pa);
3454                                    qa = d.fitToBounds(qa, 0, pa);
3455                                    sa = d.fitToBounds(sa, 0, pa);
3456                                    if (0 === E && 0 === O && 0 === qa && 0 === sa) continue;
3457                                    if (E == pa && O == pa && qa == pa && sa == pa) continue;
3458                                    R = F - k / 2;
3459                                    S = O;
3460                                    K = k;
3461                                    R + K > q && (K = q - R);
3462                                    0 > R && (K += R, R = 0);
3463                                    if (R < q && 0 < K) {
3464                                        var Eb, Fb;
3465                                        W > ua ? (Eb = [E, sa], Fb = [O, qa]) : (Eb = [O, sa], Fb = [E, qa]);
3466                                        !isNaN(sa) && !isNaN(qa) && F < q && 0 < F && (Ya = d.line(g, Eb, [F, F], Ca, X, da), hb = d.line(g, Fb, [F, F], Ca, X, da));
3467                                        ba = E - O;
3468                                        va = new d.Cuboid(g, ba, K, H, Q, Na, bb, da, Ca, X, ga, w, t, ea, gb, pb, aa)
3469                                    }
3470                                } else {
3471                                    "open" == l && (la = N);
3472                                    "high" == l && (la = ta);
3473                                    "low" == l && (la = ra);
3474                                    F = d.fitToBounds(F, 0, Fa);
3475                                    N = d.fitToBounds(N, 0, Fa);
3476                                    ra = d.fitToBounds(ra, 0, Fa);
3477                                    ta = d.fitToBounds(ta, 0, Fa);
3478                                    if (0 === F && 0 === N && 0 === ra && 0 === ta) continue;
3479                                    if (F == Fa && N == Fa && ra == Fa && ta == Fa) continue;
3480                                    S = E - k / 2;
3481                                    R = N + da / 2;
3482                                    K = k;
3483                                    S + K > n && (K = n - S);
3484                                    0 > S && (K += S, S = 0);
3485                                    ba = F - N;
3486                                    if (S < n && 0 < K) {
3487                                        Bb && W >= ua && (Wa = 0);
3488                                        var va = new d.Cuboid(g, K, ba, H, Q, Na, Wa, da, Ca, X, ga, w, t, ea, gb, pb, aa),
3489                                            Gb, Hb;
3490                                        W > ua ? (Gb = [F, ta], Hb = [N, ra]) : (Gb = [N, ta], Hb = [F, ra]);
3491                                        !isNaN(ta) && !isNaN(ra) && E < n && 0 < E && (Ya = d.line(g, [E, E], Gb, Ca, X, da), hb = d.line(g, [E, E], Hb, Ca, X, da), d.setCN(a, Ya, this.bcn + "line-high"), v.className && d.setCN(a, Ya, v.className, !0), d.setCN(a, hb, this.bcn + "line-low"), v.className && d.setCN(a, hb, v.className, !0))
3492                                    }
3493                                }
3494                                va && (za = va.set, v.columnGraphics = za, fa.push(za), za.translate(S, R - da / 2), (v.url || this.showHandOnHover) && za.setAttr("cursor", "pointer"), Ya && (fa.push(Ya), fa.push(hb)), J || (v.x = t ? R + K / 2 : S + K / 2, this.animateColumns(va, L, E, O, F, N), this.addListeners(za, v), void 0 !== this.tabIndex && za.setAttr("tabindex", this.tabIndex)))
3495                            }
3496                            break;
3497                        case "ohlc":
3498                            if (!(isNaN(ua) || isNaN(zb) || isNaN(Ab) || isNaN(W))) {
3499                                var Sb = g.set();
3500                                fa.push(Sb);
3501                                W < ua && (v.isNegative = !0, void 0 != Ja && (Ha = Ja));
3502                                void 0 != v.lineColor && (Ha = v.lineColor);
3503                                var Za, $a, ab;
3504                                if (t) {
3505                                    la = F;
3506                                    ka = E;
3507                                    "open" == l && (ka = O);
3508                                    "high" == l && (ka = sa);
3509                                    "low" == l && (ka = qa);
3510                                    qa = d.fitToBounds(qa, 0, pa);
3511                                    sa = d.fitToBounds(sa, 0, pa);
3512                                    if (0 === E && 0 === O && 0 === qa && 0 === sa) continue;
3513                                    if (E == pa && O == pa && qa == pa && sa == pa) continue;
3514                                    var Ib = F -
3515                                        k / 2,
3516                                        Ib = d.fitToBounds(Ib, 0, q),
3517                                        Tb = d.fitToBounds(F, 0, q),
3518                                        Jb = F + k / 2,
3519                                        Jb = d.fitToBounds(Jb, 0, q);
3520                                    0 <= O && O <= pa && ($a = d.line(g, [O, O], [Ib, Tb], Ha, X, da, ea));
3521                                    0 < F && F < q && (Za = d.line(g, [qa, sa], [F, F], Ha, X, da, ea));
3522                                    0 <= E && E <= pa && (ab = d.line(g, [E, E], [Tb, Jb], Ha, X, da, ea))
3523                                } else {
3524                                    la = F;
3525                                    "open" == l && (la = N);
3526                                    "high" == l && (la = ta);
3527                                    "low" == l && (la = ra);
3528                                    var ka = E,
3529                                        ra = d.fitToBounds(ra, 0, Fa),
3530                                        ta = d.fitToBounds(ta, 0, Fa),
3531                                        Kb = E - k / 2,
3532                                        Kb = d.fitToBounds(Kb, 0, n),
3533                                        Ub = d.fitToBounds(E, 0, n),
3534                                        Lb = E + k / 2,
3535                                        Lb = d.fitToBounds(Lb, 0, n);
3536                                    0 <= N && N <= Fa && ($a = d.line(g, [Kb, Ub], [N, N], Ha, X, da, ea));
3537                                    0 < E && E < n && (Za = d.line(g, [E, E], [ra, ta], Ha, X, da, ea));
3538                                    0 <= F && F <= Fa && (ab = d.line(g, [Ub, Lb], [F, F], Ha, X, da, ea))
3539                                }
3540                                fa.push($a);
3541                                fa.push(Za);
3542                                fa.push(ab);
3543                                d.setCN(a, $a, this.bcn + "stroke-open");
3544                                d.setCN(a, ab, this.bcn + "stroke-close");
3545                                d.setCN(a, Za, this.bcn + "stroke");
3546                                v.className && d.setCN(a, Sb, v.className, !0);
3547                                Za && this.addListeners(Za, v);
3548                                ab && this.addListeners(ab, v);
3549                                $a && this.addListeners($a, v);
3550                                ya = E;
3551                                Ea = F
3552                            }
3553                    }
3554                    if (!J && !isNaN(W)) {
3555                        var Vb = this.hideBulletsCount;
3556                        if (this.end - this.start <= Vb || 0 === Vb) {
3557                            var Wb = this.createBullet(v, ka, la, L),
3558                                Xb = this.labelText;
3559                            if (Xb && !isNaN(ya) && !isNaN(ya)) {
3560                                var gc = this.createLabel(v, Xb),
3561                                    Yb = 0;
3562                                Wb && (Yb = Wb.size);
3563                                this.positionLabel(v, ya, Ea, gc, Yb)
3564                            }
3565                            if ("regular" == M || "100%" == M) {
3566                                var Zb = f.totalText;
3567                                if (Zb) {
3568                                    var Oa = this.createLabel(v, Zb, f.totalTextColor);
3569                                    d.setCN(a, Oa, this.bcn + "label-total");
3570                                    this.allBullets.push(Oa);
3571                                    if (Oa) {
3572                                        var $b = Oa.getBBox(),
3573                                            ac = $b.width,
3574                                            bc = $b.height,
3575                                            ib, jb, sb = f.totalTextOffset,
3576                                            cc = f.totals[L];
3577                                        cc && cc.remove();
3578                                        var kb = 0;
3579                                        "column" != h && (kb = this.bulletSize);
3580                                        t ? (jb = Ea, ib = 0 > W ? E - ac / 2 - 2 - kb - sb : E + ac / 2 + 3 + kb +
3581                                            sb) : (ib = ya, jb = 0 > W ? F + bc / 2 + kb + sb : F - bc / 2 - 3 - kb - sb);
3582                                        Oa.translate(ib, jb);
3583                                        f.totals[L] = Oa;
3584                                        t ? (0 > jb || jb > q) && Oa.remove() : (0 > ib || ib > n) && Oa.remove()
3585                                    }
3586                                }
3587                            }
3588                        }
3589                    }
3590                }
3591            }
3592            this.lastDataItem = v;
3593            if ("line" == h || "step" == h || "smoothedLine" == h) "smoothedLine" == h ? this.drawSmoothedGraph(x, u, T, U) : this.drawLineGraph(x, u, T, U), J || this.launchAnimation();
3594            this.bulletsHidden && this.hideBullets();
3595            this.customBulletsHidden && this.hideCustomBullets()
3596        },
3597        animateColumns: function(a, b) {
3598            var c = this,
3599                e = c.chart.startDuration;
3600            0 < e && !c.animationPlayed && (c.seqAn ? (a.set.hide(), c.animationArray.push(a), e = setTimeout(function() {
3601                c.animate.call(c)
3602            }, e / (c.end - c.start + 1) * (b - c.start) * 1E3), c.timeOuts.push(e)) : c.animate(a), c.chart.animatable.push(a))
3603        },
3604        createLabel: function(a, b, c) {
3605            var e = this.chart,
3606                g = a.labelColor;
3607            g || (g = this.color);
3608            g || (g = e.color);
3609            c && (g = c);
3610            c = this.fontSize;
3611            void 0 === c && (this.fontSize = c = e.fontSize);
3612            var f = this.labelFunction;
3613            b = e.formatString(b, a);
3614            b = d.cleanFromEmpty(b);
3615            f && (b = f(a, b));
3616            if (void 0 !== b && "" !== b) return a = d.text(this.container, b, g, e.fontFamily, c), a.node.style.pointerEvents = "none", d.setCN(e, a, this.bcn + "label"), this.bulletSet.push(a), a
3617        },
3618        positiveClip: function(a) {
3619            a.clipRect(this.pmx, this.pmy, this.pmw, this.pmh)
3620        },
3621        negativeClip: function(a) {
3622            a.clipRect(this.nmx, this.nmy, this.nmw, this.nmh)
3623        },
3624        drawLineGraph: function(a, b, c, e) {
3625            var g = this;
3626            if (1 < a.length) {
3627                var f = g.noRounding,
3628                    h = g.set,
3629                    k = g.chart,
3630                    l = g.container,
3631                    m = l.set(),
3632                    n = l.set();
3633                h.push(n);
3634                h.push(m);
3635                var q = g.lineAlpha,
3636                    p = g.lineThickness,
3637                    h = g.fillAlphas,
3638                    t = g.lineColorR,
3639                    r = g.negativeLineAlpha;
3640                isNaN(r) && (r = q);
3641                var w = g.lineColorSwitched;
3642                w && (t = w);
3643                var w = g.fillColorsR,
3644                    z = g.fillColorsSwitched;
3645                z && (w = z);
3646                var x = g.dashLength;
3647                (z = g.dashLengthSwitched) && (x = z);
3648                var z = g.negativeLineColor,
3649                    u = g.negativeFillColors,
3650                    A = g.negativeFillAlphas,
3651                    y = g.baseCoord;
3652                0 !== g.negativeBase && (y = g.valueAxis.getCoordinate(g.negativeBase, f), y > g.height && (y = g.height), 0 > y && (y = 0));
3653                q = d.line(l, a, b, t, q, p, x, !1, !1, f);
3654                q.node.setAttribute("stroke-linejoin", "round");
3655                d.setCN(k, q, g.bcn + "stroke");
3656                m.push(q);
3657                m.click(function(a) {
3658                    g.handleGraphEvent(a, "clickGraph")
3659                }).mouseover(function(a) {
3660                    g.handleGraphEvent(a, "rollOverGraph")
3661                }).mouseout(function(a) {
3662                    g.handleGraphEvent(a, "rollOutGraph")
3663                }).touchmove(function(a) {
3664                    g.chart.handleMouseMove(a)
3665                }).touchend(function(a) {
3666                    g.chart.handleTouchEnd(a)
3667                });
3668                void 0 === z || g.useNegativeColorIfDown || (p = d.line(l, a, b, z, r, p, x, !1, !1, f), p.node.setAttribute("stroke-linejoin", "round"), d.setCN(k, p, g.bcn + "stroke"), d.setCN(k, p, g.bcn + "stroke-negative"), n.push(p));
3669                if (0 < h || 0 < A)
3670                    if (p = a.join(";").split(";"), r = b.join(";").split(";"), q = k.type, "serial" == q || "radar" == q ? 0 < c.length ? (c.reverse(), e.reverse(), p = a.concat(c), r = b.concat(e)) : "radar" == q ? (r.push(0), p.push(0)) : g.rotate ? (r.push(r[r.length - 1]), p.push(y), r.push(r[0]), p.push(y), r.push(r[0]), p.push(p[0])) : (p.push(p[p.length - 1]), r.push(y), p.push(p[0]), r.push(y), p.push(a[0]), r.push(r[0])) : "xy" == q && (b = g.fillToAxis) && (d.isString(b) && (b = k.getValueAxisById(b)), "H" == b.orientation ? (y = "top" == b.position ? 0 : b.height, p.push(p[p.length - 1]), r.push(y), p.push(p[0]), r.push(y), p.push(a[0]), r.push(r[0])) : (y = "left" == b.position ? 0 : b.width, r.push(r[r.length - 1]), p.push(y), r.push(r[0]), p.push(y), r.push(r[0]), p.push(p[0]))), a = g.gradientRotation, 0 < h && (b = d.polygon(l, p, r, w, h, 1, "#000", 0, a, f), b.pattern(g.pattern, NaN, k.path), d.setCN(k, b, g.bcn + "fill"), m.push(b), b.toBack()), u || void 0 !== z) isNaN(A) && (A = h), u || (u = z), f = d.polygon(l, p, r, u, A, 1, "#000", 0, a, f), d.setCN(k, f, g.bcn + "fill"), d.setCN(k, f, g.bcn + "fill-negative"), f.pattern(g.pattern, NaN, k.path), n.push(f), f.toBack(), n.click(function(a) {
3671                        g.handleGraphEvent(a, "clickGraph")
3672                    }).mouseover(function(a) {
3673                        g.handleGraphEvent(a, "rollOverGraph")
3674                    }).mouseout(function(a) {
3675                        g.handleGraphEvent(a, "rollOutGraph")
3676                    }).touchmove(function(a) {
3677                        g.chart.handleMouseMove(a)
3678                    }).touchend(function(a) {
3679                        g.chart.handleTouchEnd(a)
3680                    });
3681                g.applyMask(n, m)
3682            }
3683        },
3684        applyMask: function(a, b) {
3685            var c = a.length();
3686            "serial" != this.chart.type || this.scrollbar || (this.positiveClip(b), 0 < c && this.negativeClip(a))
3687        },
3688        drawSmoothedGraph: function(a, b, c, e) {
3689            if (1 < a.length) {
3690                var g = this.set,
3691                    f = this.chart,
3692                    h = this.container,
3693                    k = h.set(),
3694                    l = h.set();
3695                g.push(l);
3696                g.push(k);
3697                var m = this.lineAlpha,
3698                    n = this.lineThickness,
3699                    g = this.dashLength,
3700                    q = this.fillAlphas,
3701                    p = this.lineColorR,
3702                    t = this.fillColorsR,
3703                    r = this.negativeLineColor,
3704                    w = this.negativeFillColors,
3705                    z = this.negativeFillAlphas,
3706                    x = this.baseCoord,
3707                    u = this.lineColorSwitched;
3708                u && (p = u);
3709                (u = this.fillColorsSwitched) && (t = u);
3710                var A = this.negativeLineAlpha;
3711                isNaN(A) && (A = m);
3712                u = this.getGradRotation();
3713                m = new d.Bezier(h, a, b, p, m, n, t, 0, g, void 0, u);
3714                d.setCN(f, m, this.bcn + "stroke");
3715                k.push(m.path);
3716                void 0 !== r && (n = new d.Bezier(h, a, b, r, A, n, t, 0, g, void 0, u), d.setCN(f, n, this.bcn + "stroke"), d.setCN(f, n, this.bcn + "stroke-negative"), l.push(n.path));
3717                0 < q && (n = a.join(";").split(";"), m = b.join(";").split(";"), p = "", 0 < c.length ? (c.push("M"), e.push("M"), c.reverse(), e.reverse(), n = a.concat(c), m = b.concat(e)) : (this.rotate ? (p += " L" + x + "," + b[b.length - 1], p += " L" + x + "," + b[0]) : (p += " L" + a[a.length - 1] + "," + x, p += " L" + a[0] + "," + x), p += " L" + a[0] + "," + b[0]), a = new d.Bezier(h, n, m, NaN, 0, 0, t, q, g, p, u), d.setCN(f, a, this.bcn + "fill"), a.path.pattern(this.pattern, NaN, f.path), k.push(a.path), w || void 0 !== r) && (z || (z = q), w || (w = r), h = new d.Bezier(h, n, m, NaN, 0, 0, w, z, g, p, u), h.path.pattern(this.pattern, NaN, f.path), d.setCN(f, h, this.bcn + "fill"), d.setCN(f, h, this.bcn + "fill-negative"), l.push(h.path));
3718                this.applyMask(l, k)
3719            }
3720        },
3721        launchAnimation: function() {
3722            var a = this,
3723                b = a.chart.startDuration;
3724            if (0 < b && !a.animationPlayed) {
3725                var c = a.set,
3726                    e = a.bulletSet;
3727                d.VML || (c.attr({
3728                    opacity: a.startAlpha
3729                }), e.attr({
3730                    opacity: a.startAlpha
3731                }));
3732                c.hide();
3733                e.hide();
3734                a.seqAn ? (b = setTimeout(function() {
3735                    a.animateGraphs.call(a)
3736                }, a.index * b * 1E3), a.timeOuts.push(b)) : a.animateGraphs()
3737            }
3738        },
3739        animateGraphs: function() {
3740            var a = this.chart,
3741                b = this.set,
3742                c = this.bulletSet,
3743                e = this.x,
3744                d = this.y;
3745            b.show();
3746            c.show();
3747            var f = a.startDuration,
3748                h = a.startEffect;
3749            b && (this.rotate ? (b.translate(-1E3, d), c.translate(-1E3, d)) : (b.translate(e, -1E3), c.translate(e, -1E3)), b.animate({
3750                opacity: 1,
3751                translate: e + "," + d
3752            }, f, h), c.animate({
3753                opacity: 1,
3754                translate: e + "," + d
3755            }, f, h), a.animatable.push(b))
3756        },
3757        animate: function(a) {
3758            var b = this.chart,
3759                c = this.animationArray;
3760            !a && 0 < c.length && (a = c[0], c.shift());
3761            c = d[d.getEffect(b.startEffect)];
3762            b = b.startDuration;
3763            a && (this.rotate ? a.animateWidth(b, c) : a.animateHeight(b, c), a.set.show())
3764        },
3765        legendKeyColor: function() {
3766            var a = this.legendColor,
3767                b = this.lineAlpha;
3768            void 0 === a && (a = this.lineColorR, 0 === b && (b = this.fillColorsR) && (a = "object" == typeof b ? b[0] : b));
3769            return a
3770        },
3771        legendKeyAlpha: function() {
3772            var a = this.legendAlpha;
3773            void 0 === a && (a = this.lineAlpha, this.fillAlphas > a && (a = this.fillAlphas), 0 === a && (a = this.bulletAlpha), 0 === a && (a = 1));
3774            return a
3775        },
3776        createBullet: function(a, b, c) {
3777            if (!isNaN(b) && !isNaN(c) && ("none" != this.bullet || this.customBullet || a.bullet || a.customBullet)) {
3778                var e = this.chart,
3779                    g = this.container,
3780                    f = this.bulletOffset,
3781                    h = this.bulletSize;
3782                isNaN(a.bulletSize) || (h = a.bulletSize);
3783                var k = a.values.value,
3784                    l = this.maxValue,
3785                    m = this.minValue,
3786                    n = this.maxBulletSize,
3787                    q = this.minBulletSize;
3788                isNaN(l) || (isNaN(k) || (h = (k - m) / (l - m) * (n - q) + q), m == l && (h = n
3788));
3789                l = h;
3790                this.bulletAxis && (h = a.values.error, isNaN(h) || (k = h), h = this.bulletAxis.stepWidth * k);
3791                h < this.minBulletSize && (h = this.minBulletSize);
3792                this.rotate ? b = a.isNegative ? b - f : b + f : c = a.isNegative ? c + f : c - f;
3793                q = this.bulletColorR;
3794                a.lineColor && void 0 === this.bulletColor && (this.bulletColorSwitched = a.lineColor);
3795                this.bulletColorSwitched && (q = this.bulletColorSwitched);
3796                a.isNegative && void 0 !== this.bulletColorNegative && (q = this.bulletColorNegative);
3797                void 0 !== a.color && (q = a.color);
3798                var p;
3799                "xy" == e.type && this.valueField && (p = this.pattern, a.pattern && (p = a.pattern));
3800                f = this.bullet;
3801                a.bullet && (f = a.bullet);
3802                var k = this.bulletBorderThickness,
3803                    m = this.bulletBorderColorR,
3804                    n = this.bulletBorderAlpha,
3805                    t = this.bulletAlpha;
3806                m || (m = q);
3807                this.useLineColorForBulletBorder && (m = this.lineColorR, a.isNegative && this.negativeLineColor && (m = this.negativeLineColor), this.lineColorSwitched && (m = this.lineColorSwitched));
3808                var r = a.alpha;
3809                isNaN(r) || (t = r);
3810                p = d.bullet(g, f, h, q, t, k, m, n, l, 0, p, e.path);
3811                l = this.customBullet;
3812                a.customBullet && (l = a.customBullet);
3813                l && (p && p.remove(), "function" == typeof l ? (l = new l, l.chart = e, a.bulletConfig && (l.availableSpace = c, l.graph = this, l.graphDataItem = a, l.bulletY = c, a.bulletConfig.minCoord = this.minCoord - c, l.bulletConfig = a.bulletConfig), l.write(g), p && l.showBullet && l.set.push(p), a.customBulletGraphics = l.cset, p = l.set) : (p = g.set(), l = g.image(l, 0, 0, h, h), p.push(l), this.centerCustomBullets && l.translate(-h / 2, -h / 2)));
3814                if (p) {
3815                    (a.url || this.showHandOnHover) && p.setAttr("cursor", "pointer");
3816                    if ("serial" == e.type || "gantt" == e.type)
3817                        if (-.5 > b || b > this.width || c < -h / 2 || c > this.height) p.remove(), p = null;
3818                    p && (this.bulletSet.push(p), p.translate(b, c), this.addListeners(p, a), this.allBullets.push(p));
3819                    a.bx = b;
3820                    a.by = c;
3821                    d.setCN(e, p, this.bcn + "bullet");
3822                    a.className && d.setCN(e, p, a.className, !0)
3823                }
3824                if (p) {
3825                    p.size = h || 0;
3826                    if (e = this.bulletHitAreaSize) g = d.circle(g, e, "#FFFFFF", .001, 0), g.translate(b, c), a.hitBullet = g, this.bulletSet.push(g), this.addListeners(g, a);
3827                    a.bulletGraphics = p;
3828                    void 0 !== this.tabIndex && p.setAttr("tabindex", this.tabIndex)
3829                } else p = {
3830                    size: 0
3831                };
3832                p.graphDataItem = a;
3833                return p
3834            }
3835        },
3836        showBullets: function() {
3837            var a = this.allBullets,
3838                b;
3839            this.bulletsHidden = !1;
3840            for (b = 0; b < a.length; b++) a[b].show()
3841        },
3842        hideBullets: function() {
3843            var a = this.allBullets,
3844                b;
3845            this.bulletsHidden = !0;
3846            for (b = 0; b < a.length; b++) a[b].hide()
3847        },
3848        showCustomBullets: function() {
3849            var a = this.allBullets,
3850                b;
3851            this.customBulletsHidden = !1;
3852            for (b = 0; b < a.length; b++) {
3853                var c = a[b].graphDataItem;
3854                c && c.customBulletGraphics && c.customBulletGraphics.show()
3855            }
3856        },
3857        hideCustomBullets: function() {
3858            var a = this.allBullets,
3859                b;
3860            this.customBulletsHidden = !0;
3861            for (b = 0; b < a.length; b++) {
3862                var c = a[b].graphDataItem;
3863                c && c.customBulletGraphics && c.customBulletGraphics.hide()
3864            }
3865        },
3866        addListeners: function(a, b) {
3867            var c = this;
3868            a.mouseover(function(a) {
3869                c.handleRollOver(b, a)
3870            }).mouseout(function(a) {
3871                c.handleRollOut(b, a)
3872            }).touchend(function(a) {
3873                c.handleRollOver(b, a);
3874                c.chart.panEventsEnabled && c.handleClick(b, a)
3875            }).touchstart(function(a) {
3876                c.handleRollOver(b, a)
3877            }).click(function(a) {
3878                c.handleClick(b, a)
3879            }).dblclick(function(a) {
3880                c.handleDoubleClick(b, a)
3881            }).contextmenu(function(a) {
3882                c.handleRightClick(b, a)
3883            });
3884            var e = c.chart;
3885            if (e.accessible && c.accessibleLabel) {
3886                var d = e.formatString(c.accessibleLabel, b);
3887                e.makeAccessible(a, d)
3888            }
3889        },
3890        handleRollOver: function(a, b) {
3891            this.handleGraphEvent(b, "rollOverGraph");
3892            if (a) {
3893                var c = this.chart;
3894                a.bulletConfig && (c.isRolledOverBullet = !0);
3895                var e = {
3896                    type: "rollOverGraphItem",
3897                    item: a,
3898                    index: a.index,
3899                    graph: this,
3900                    target: this,
3901                    chart: this.chart,
3902                    event: b
3903                };
3904                this.fire(e);
3905                c.fire(e);
3906                clearTimeout(c.hoverInt);
3907                (c = c.chartCursor) && c.valueBalloonsEnabled || this.showGraphBalloon(a, "V", !0)
3908            }
3909        },
3910        handleRollOut: function(a, b) {
3911            var c = this.chart;
3912            if (a) {
3913                var e = {
3914                    type: "rollOutGraphItem",
3915                    item: a,
3916                    index: a.index,
3917                    graph: this,
3918                    target: this,
3919                    chart: this.chart,
3920                    event: b
3921                };
3922                this.fire(e);
3923                c.fire(e);
3924                c.isRolledOverBullet = !1
3925            }
3926            this.handleGraphEvent(b, "rollOutGraph");
3927            (c = c.chartCursor) && c.valueBalloonsEnabled || this.hideBalloon()
3928        },
3929        handleClick: function(a, b) {
3930            if (!this.chart.checkTouchMoved() && this.chart.checkTouchDuration(b)) {
3931                if (a) {
3932                    var c = {
3933                        type: "clickGraphItem",
3934                        item: a,
3935                        index: a.index,
3936                        graph: this,
3937                        target: this,
3938                        chart: this.chart,
3939                        event: b
3940                    };
3941                    this.fire(c);
3942                    this.chart.fire(c);
3943                    d.getURL(a.url, this.urlTarget)
3944                }
3945                this.handleGraphEvent(b, "clickGraph")
3946            }
3947        },
3948        handleGraphEvent: function(a, b) {
3949            var c = {
3950                type: b,
3951                graph: this,
3952                target: this,
3953                chart: this.chart,
3954                event: a
3955            };
3956            this.fire(c);
3957            this.chart.fire(c)
3958        },
3959        handleRightClick: function(a, b) {
3960            if (a) {
3961                var c = {
3962                    type: "rightClickGraphItem",
3963                    item: a,
3964                    index: a.index,
3965                    graph: this,
3966                    target: this,
3967                    chart: this.chart,
3968                    event: b
3969                };
3970                this.fire(c);
3971                this.chart.fire(c)
3972            }
3973        },
3974        handleDoubleClick: function(a, b) {
3975            if (a) {
3976                var c = {
3977                    type: "doubleClickGraphItem",
3978                    item: a,
3979                    index: a.index,
3980                    graph: this,
3981                    target: this,
3982                    chart: this.chart,
3983                    event: b
3984                };
3985                this.fire(c);
3986                this.chart.fire(c)
3987            }
3988        },
3989        zoom: function(a, b) {
3990            this.start = a;
3991            this.end = b;
3992            this.draw()
3993        },
3994        changeOpacity: function(a) {
3995            var b = this.set;
3996            b && b.setAttr("opacity", a);
3997            if (b = this.ownColumns) {
3998                var c;
3999                for (c = 0; c < b.length; c++) {
4000                    var e = b[c].set;
4001                    e && e.setAttr("opacity", a)
4002                }
4003            }(b = this.bulletSet) && b.setAttr("opacity", a)
4004        },
4005        destroy: function() {
4006            d.remove(this.set);
4007            d.remove(this.bulletSet);
4008            var a = this.timeOuts;
4009            if (a) {
4010                var b;
4011                for (b = 0; b < a.length; b++) clearTimeout(a[b])
4012            }
4013            this.timeOuts = []
4014        },
4015        createBalloon: function() {
4016            var a = this.chart;
4017            this.balloon ? this.balloon.destroy && this.balloon.destroy() : this.balloon = {};
4018            var b = this.balloon;
4019            d.extend(b, a.balloon, !0);
4020            b.chart = a;
4021            b.mainSet = a.plotBalloonsSet;
4022            b.className = this.id
4023        },
4024        hideBalloon: function() {
4025            var a = this,
4026                b = a.chart;
4027            b.chartCursor ? b.chartCursor.valueBalloonsEnabled || b.hideBalloon() : b.hideBalloon();
4028            clearTimeout(a.hoverInt);
4029            a.hoverInt = setTimeout(function() {
4030                a.hideBalloonReal.call(a)
4031            }, b.hideBalloonTime)
4032        },
4033        hideBalloonReal: function() {
4034            this.balloon && this.balloon.hide();
4035            this.fixBulletSize()
4036        },
4037        fixBulletSize: function() {
4038            if (d.isModern) {
4039                var a = this.resizedDItem;
4040                if (a) {
4041                    var b = a.bulletGraphics;
4042                    if (b && !b.doNotScale) {
4043                        b.translate(a.bx, a.by, 1);
4044                        var c = this.bulletAlpha;
4045                        isNaN(a.alpha) || (c = a.alpha);
4046                        b.setAttr("fill-opacity", c);
4047                        b.setAttr("stroke-opacity", this.bulletBorderAlpha)
4048                    }
4049                }
4050                this.resizedDItem = null
4051            }
4052        },
4053        showGraphBalloon: function(a, b, c, e, g) {
4054            if (a) {
4055                var f = this.chart,
4056                    h = this.balloon,
4057                    k = 0,
4058                    l = 0,
4059                    m = f.chartCursor,
4060                    n = !0;
4061                m ? m.valueBalloonsEnabled || (h = f.balloon, k = this.x, l = this.y, n = !1) : (h = f.balloon, k = this.x, l = this.y, n = !1);
4062                clearTimeout(this.hoverInt);
4063                if (f.chartCursor && (this.currentDataItem = a, "serial" == f.type && f.isRolledOverBullet && f.chartCursor.valueBalloonsEnabled)) {
4064                    this.hideBalloonReal();
4065                    return
4066                }
4067                this.resizeBullet(a, e, g);
4068                if (h && h.enabled && this.showBalloon && !this.hidden) {
4069                    var m = f.formatString(this.balloonText, a, !0),
4070                        q = this.balloonFunction;
4071                    q && (m = q(a, a.graph));
4072                    m && (m = d.cleanFromEmpty(m));
4073                    m && "" !== m ? (e = f.getBalloonColor(this, a), h.drop || (h.pointerOrientation = b), b = a.x, g = a.y, f.rotate && (b = a.y, g = a.x), b += k, g += l, isNaN(b) || isNaN(g) ? this.hideBalloonReal() : (a = this.width, q = this.height, n && h.setBounds(k, l, a + k, q + l), h.changeColor(e), h.setPosition(b, g), h.fixPrevious(), h.fixedPosition && (c = !1), !c && "radar" != f.type && (b < k - .5 || b > a + k || g < l - .5 || g > q + l) ? (h.showBalloon(m), h.hide(0)) : (h.followCursor(c), h.showBalloon(m)))) : (this.hideBalloonReal(), h.hide(), this.resizeBullet(a, e, g))
4074                } else this.hideBalloonReal()
4075            }
4076        },
4077        resizeBullet: function(a, b, c) {
4078            this.fixBulletSize();
4079            if (a && d.isModern && (1 != b || !isNaN(c))) {
4080                var e = a.bulletGraphics;
4081                e && !e.doNotScale && (e.translate(a.bx, a.by, b), isNaN(c) || (e.setAttr("fill-opacity", c), e.setAttr("stroke-opacity", c)), this.resizedDItem = a)
4082            }
4083        }
4084    })
4085})();
4086(function() {
4087    var d = window.AmCharts;
4088    d.ChartCursor = d.Class({
4089        construct: function(a) {
4090            this.cname = "ChartCursor";
4091            this.createEvents("changed", "zoomed", "onHideCursor", "onShowCursor", "draw", "selected", "moved", "panning", "zoomStarted");
4092            this.enabled = !0;
4093            this.cursorAlpha = 1;
4094            this.selectionAlpha = .2;
4095            this.cursorColor = "#CC0000";
4096            this.categoryBalloonAlpha = 1;
4097            this.color = "#FFFFFF";
4098            this.type = "cursor";
4099            this.zoomed = !1;
4100            this.zoomable = !0;
4101            this.pan = !1;
4102            this.categoryBalloonDateFormat = "MMM DD, YYYY";
4103            this.categoryBalloonText = "[[category]]";
4104            this.categoryBalloonEnabled = this.valueBalloonsEnabled = !0;
4105            this.rolledOver = !1;
4106            this.cursorPosition = "middle";
4107            this.bulletsEnabled = this.skipZoomDispatch = !1;
4108            this.bulletSize = 8;
4109            this.selectWithoutZooming = this.oneBalloonOnly = !1;
4110            this.graphBulletSize = 1.7;
4111            this.animationDuration = .3;
4112            this.zooming = !1;
4113            this.adjustment = 0;
4114            this.avoidBalloonOverlapping = !0;
4115            this.leaveCursor = !1;
4116            this.leaveAfterTouch = !0;
4117            this.valueZoomable = !1;
4118            this.balloonPointerOrientation = "horizontal";
4119            this.hLineEnabled = this.vLineEnabled = !0;
4120            this.vZoomEnabled = this.hZoomEnabled = !1;
4121            d.applyTheme(this, a, this.cname)
4122        },
4123        draw: function() {
4124            this.destroy();
4125            var a = this.chart;
4126            a.panRequired = !0;
4127            var b = a.container;
4128            this.rotate = a.rotate;
4129            this.container = b;
4130            this.prevLineHeight = this.prevLineWidth = NaN;
4131            b = b.set();
4132            b.translate(this.x, this.y);
4133            this.set = b;
4134            a.cursorSet.push(b);
4135            this.createElements();
4136            d.isString(this.limitToGraph) && (this.limitToGraph = d.getObjById(a.graphs, this.limitToGraph), this.fullWidth = !1, this.cursorPosition = "middle");
4137            this.pointer = this.balloonPointerOrientation.substr(0, 1).toUpperCase();
4138            this.isHidden = !1;
4139            this.hideLines();
4140            this.valueLineAxis || (this.valueLineAxis = a.valueAxes[0])
4141        },
4142        createElements: function() {
4143            var a = this,
4144                b = a.chart,
4145                c = b.dx,
4146                e = b.dy,
4147                g = a.width,
4148                f = a.height,
4149                h, k, l = a.cursorAlpha,
4150                m = a.valueLineAlpha;
4151            a.rotate ? (h = m, k = l) : (k = m, h = l);
4152            "xy" == b.type && (k = l, void 0 !== m && (k = m), h = l);
4153            a.vvLine = d.line(a.container, [c, 0, 0], [e, 0, f], a.cursorColor, h, 1);
4154            d.setCN(b, a.vvLine, "cursor-line");
4155            d.setCN(b, a.vvLine, "cursor-line-vertical");
4156            a.hhLine = d.line(a.container, [0, g, g + c], [0, 0, e], a.cursorColor, k, 1);
4157            d.setCN(b, a.hhLine, "cursor-line");
4158            d.setCN(b, a.hhLine, "cursor-line-horizontal");
4159            a.vLine = a.rotate ? a.vvLine : a.hhLine;
4160            a.set.push(a.vvLine);
4161            a.set.push(a.hhLine);
4162            a.set.node.style.pointerEvents = "none";
4163            a.fullLines = a.container.set();
4164            b = b.cursorLineSet;
4165            b.push(a.fullLines);
4166            b.translate(a.x, a.y);
4167            b.clipRect(-1, -1, g + 2, f + 2);
4168            void 0 !== a.tabIndex && (b.setAttr("tabindex", a.tabIndex), b
4168.keyup(function(b) {
4169                a.handleKeys(b)
4170            }).focus(function(b) {
4171                a.showCursor()
4172            }).blur(function(b) {
4173                a.hideCursor()
4174            }));
4175            a.set.clipRect(0, 0, g, f)
4176        },
4177        handleKeys: function(a) {
4178            var b = this.prevIndex,
4179                c = this.chart;
4180            if (c) {
4181                var e = c.chartData;
4182                e && (isNaN(b) && (b = e.length - 1), 37 != a.keyCode && 40 != a.keyCode || b--, 39 != a.keyCode && 38 != a.keyCode || b++, b = d.fitToBounds(b, c.startIndex, c.endIndex), (a = this.chart.chartData[b]) && this.setPosition(a.x.categoryAxis), this.prevIndex = b)
4183            }
4184        },
4185        update: function() {
4186            var a = this.chart;
4187            if (a) {
4188                var b = a.mouseX - this.x,
4189                    c = a.mouseY - this.y;
4190                this.mouseX = b;
4191                this.mouseY = c;
4192                this.mouse2X = a.mouse2X - this.x;
4193                this.mouse2Y = a.mouse2Y - this.y;
4194                var e;
4195                if (a.chartData && 0 < a.chartData.length) {
4196                    this.mouseIsOver() ? (this.hideGraphBalloons = !1, this.rolledOver = e = !0, this.updateDrawing(), this.vvLine && isNaN(this.fx) && (a.rotate || !this.limitToGraph) && this.vvLine.translate(b, 0), !this.hhLine || !isNaN(this.fy) || a.rotate && this.limitToGraph || this.hhLine.translate(0, c), isNaN(this.mouse2X) ? this.dispatchMovedEvent(b, c) : e = !1) : this.forceShow || this.hideCursor();
4197                    if (this.zooming) {
4198                        if (!isNaN(this.mouse2X)) {
4199                            isNaN(this.mouse2X0) || this.dispatchPanEvent();
4200                            return
4201                        }
4202                        if (this.pan) {
4203                            this.dispatchPanEvent();
4204                            return
4205                        }(this.hZoomEnabled || this.vZoomEnabled) && this.zooming && this.updateSelection()
4206                    }
4207                    e && this.showCursor()
4208                }
4209            }
4210        },
4211        updateDrawing: function() {
4212            this.drawing && this.chart.setMouseCursor("crosshair");
4213            if (this.drawingNow && (d.remove(this.drawingLine), 1 < Math.abs(this.drawStartX - this.mouseX) || 1 < Math.abs(this.drawStartY - this.mouseY))) {
4214                var a = this.chart,
4215                    b = a.marginTop,
4216                    a = a.marginLeft;
4217                this.drawingLine = d.line(this.container, [this.drawStartX + a, this.mouseX + a], [this.drawStartY + b, this.mouseY + b], this.cursorColor, 1, 1)
4218            }
4219        },
4220        fixWidth: function(a) {
4221            if (this.fullWidth && this.prevLineWidth != a) {
4222                var b = this.vvLine,
4223                    c = 0;
4224                b && (b.remove(), c = b.x);
4225                b = this.container.set();
4226                b.translate(c, 0);
4227                c = d.rect(this.container, a, this.height, this.cursorColor, this.cursorAlpha, this.cursorAlpha, this.cursorColor);
4228                d.setCN(this.chart, c, "cursor-fill");
4229                c.translate(-a / 2 - 1, 0);
4230                b.push(c);
4231                this.vvLine = b;
4232                this.fullLines.push(b);
4233                this.prevLineWidth = a
4234            }
4235        },
4236        fixHeight: function(a) {
4237            if (this.fullWidth && this.prevLineHeight != a) {
4238                var b = this.hhLine,
4239                    c = 0;
4240                b && (b.remove(), c = b.y);
4241                b = this.container.set();
4242                b.translate(0, c);
4243                c = d.rect(this.container, this.width, a, this.cursorColor, this.cursorAlpha);
4244                c.translate(0, -a / 2);
4245                b.push(c);
4246                this.fullLines.push(b);
4247                this.hhLine = b;
4248                this.prevLineHeight = a
4249            }
4250        },
4251        fixVLine: function(a, b) {
4252            if (!isNaN(a) && this.vvLine) {
4253                if (isNaN(this.prevLineX)) {
4254                    var c = 0,
4255                        e = this.mouseX;
4256                    if (this.limitToGraph) {
4257                        var d = this.chart.categoryAxis;
4258                        d && (this.chart.rotate || (c = "bottom" == d.position ? this.height : -this.height), e = a)
4259                    }
4260                    this.vvLine.translate(e, c)
4261                } else this.prevLineX != a && this.vvLine.translate(this.prevLineX, this.prevLineY);
4262                this.fx = a;
4263                this.prevLineX != a && (c = this.animationDuration, this.zooming && (c = 0), this.vvLine.stop(), this.vvLine.animate({
4264                    translate: a + "," + b
4265                }, c, "easeOutSine"), this.prevLineX = a, this.prevLineY = b)
4266            }
4267        },
4268        fixHLine: function(a, b) {
4269            if (!isNaN(a) && this.hhLine) {
4270                if (isNaN(this.prevLineY)) {
4271                    var c = 0,
4272                        e = this.mouseY;
4273                    if (this.limitToGraph) {
4274                        var d = this.chart.categoryAxis;
4275                        d && (this.chart.rotate && (c = "right" == d.position ? this.width : -this.width), e = a)
4276                    }
4277                    this.hhLine.translate(c, e)
4278                } else this.prevLineY != a && this.hhLine.translate(this.prevLineX, this.prevLineY);
4279                this.fy = a;
4280                this.prevLineY != a && (c = this.animationDuration, this.zooming && (c = 0), this.hhLine.stop(), this.hhLine.animate({
4281                    translate: b + "," + a
4282                }, c, "easeOutSine"), this.prevLineY = a, this.prevLineX = b)
4283            }
4284        },
4285        hideCursor: function(a) {
4286            this.forceShow = !1;
4287            this.chart.wasTouched && this.leaveAfterTouch || this.isHidden || this.leaveCursor || (this.hideCursorReal(), a ? this.chart.handleCursorHide() : this.fire({
4288                target: this,
4289                chart: this.chart,
4290                type: "onHideCursor"
4291            }), this.chart.setMouseCursor("auto"))
4292        },
4293        hideCursorReal: function() {
4294            this.hideLines();
4295            this.isHidden = !0;
4296            this.index = this.prevLineY = this.prevLineX = this.mouseY0 = this.mouseX0 = this.fy = this.fx = NaN
4297        },
4298        hideLines: function() {
4299            this.vvLine && this.vvLine.hide();
4300            this.hhLine && this.hhLine.hide();
4301            this.fullLines && this.fullLines.hide();
4302            this.isHidden = !0;
4303            this.chart.handleCursorHide()
4304        },
4305        showCursor: function(a) {
4306            !this.drawing && this.enabled && (this.vLineEnabled && this.vvLine && this.vvLine.show(), this.hLineEnabled && this.hhLine && this.hhLine.show(), this.isHidden = !1, this.updateFullLine(), a || this.fire({
4307                target: this,
4308                chart: this.chart,
4309                type: "onShowCursor"
4310            }), this.pan && this.chart.setMouseCursor("move"))
4311        },
4312        updateFullLine: function() {
4313            this.zooming && this.fullWidth && this.selection && (this.rotate ? 0 < this.selection.height && this.hhLine.hide() : 0 < this.selection.width && this.vvLine.hide())
4314        },
4315        updateSelection: function() {
4316            if (!this.pan && this.enabled) {
4317                var a = this.mouseX,
4318                    b = this.mouseY;
4319                isNaN(this.fx) || (a = this.fx);
4320                isNaN(this.fy) || (b = this.fy);
4321                this.clearSelection();
4322                var c = this.mouseX0,
4323                    e = this.mouseY0,
4324                    g = this.width,
4325                    f = this.height,
4326                    a = d.fitToBounds(a, 0, g),
4327                    b = d.fitToBounds(b, 0, f),
4328                    h;
4329                a < c && (h = a, a = c, c = h);
4330                b < e && (h = b, b = e, e = h);
4331                this.hZoomEnabled ? g = a - c : c = 0;
4332                this.vZoomEnabled ? f = b - e : e = 0;
4333                isNaN(this.mouse2X) && 0 < Math.abs(g) && 0 < Math.abs(f) && (a = this.chart, b = d.rect(this.container, g, f, this.cursorColor, this.selectionAlpha), d.setCN(a, b, "cursor-selection"), b.width = g, b.height = f, b.translate(c, e), this.set.push(b), this.selection = b);
4334                this.updateFullLine()
4335            }
4336        },
4337        mouseIsOver: function() {
4338            var a = this.mouseX,
4339                b = this.mouseY;
4340            if (this.justReleased) return this.justReleased = !1, !0;
4341            if (this.mouseIsDown) return !0;
4342            if (!this.chart.mouseIsOver) return this.handleMouseOut(), !1;
4343            if (0 < a && a < this.width && 0 < b && b < this.height) return !0;
4344            this.handleMouseOut();
4345            return !1
4346        },
4347        fixPosition: function() {
4348            this.prevY = this.prevX = NaN
4349        },
4350        handleMouseDown: function() {
4351            this.update();
4352            if (this.mouseIsOver())
4353                if (this.mouseIsDown = !0, this.mouseX0 = this.mouseX, this.mouseY0 = this.mouseY, this.mouse2X0 = this.mouse2X, this.mouse2Y0 = this.mouse2Y, this.drawing) this.drawStartY = this.mouseY, this.drawStartX = this.mouseX, this.drawingNow = !0;
4354                else if (this.dispatchMovedEvent(this.mouseX, this.mouseY), !this.pan && isNaN(this.mouse2X0) && (isNaN(this.fx) || (this.mouseX0 = this.fx), isNaN(this.fy) || (this.mouseY0 = this.fy)), this.hZoomEnabled || this.vZoomEnabled) {
4355                this.zooming = !0;
4356                var a = {
4357                    chart: this.chart,
4358                    target: this,
4359                    type: "zoomStarted"
4360                };
4361                a.x = this.mouseX / this.width;
4362                a.y = this.mouseY / this.height;
4363                this.index0 = a.index = this.index;
4364                this.timestamp0 = this.timestamp;
4365                this.fire(a)
4366            }
4367        },
4368        registerInitialMouse: function() {},
4369        handleReleaseOutside: function() {
4370            this.mouseIsDown = !1;
4371            if (this.drawingNow) {
4372                this.drawingNow = !1;
4373                d.remove(this.drawingLine);
4374                var a = this.drawStartX,
4375                    b = this.drawStartY,
4376                    c = this.mouseX,
4377                    e = this.mouseY,
4378                    g = this.chart;
4379                (2 < Math.abs(a - c) || 2 < Math.abs(b - e)) && this.fire({
4380                    type: "draw",
4381                    target: this,
4382                    chart: g,
4383                    initialX: a,
4384                    initialY: b,
4385                    finalX: c,
4386                    finalY: e
4387                })
4388            }
4389            this.zooming && (this.zooming = !1, this.selectWithoutZooming ? this.dispatchZoomEvent("selected") : (this.hZoomEnabled || this.vZoomEnabled) && this.dispatchZoomEvent("zoomed"), this.rolledOver && this.dispatchMovedEvent(this.mouseX, this.mouseY));
4390            this.mouse2Y0 = this.mouse2X0 = this.mouseY0 = this.mouseX0 = NaN
4391        },
4392        dispatchZoomEvent: function(a) {
4393            if (!this.pan) {
4394                var b = this.selection;
4395                if (b && 3 < Math.abs(b.width) && 3 < Math.abs(b.height)) {
4396                    var c = Math.min(this.index, this.index0),
4397                        e = Math.max(this.index, this.index0),
4398                        d = c,
4399                        f = e,
4400                        h = this.chart,
4401                        k = h.chartData,
4402                        l = h.categoryAxis;
4403                    l && l.parseDates && !l.equalSpacing && (d = k[c] ? k[c].time : Math.min(this.timestamp0, this.timestamp), f = k[e] ? h.getEndTime(k[e].time) : Math.max(this.timestamp0, this.timestamp));
4404                    var b = {
4405                            type: a,
4406                            chart: this.chart,
4407                            target: this,
4408                            end: f,
4409                            start: d,
4410                            startIndex: c,
4411                            endIndex: e,
4412                            selectionHeight: b.height,
4413                            selectionWidth: b.width,
4414                            selectionY: b.y,
4415                            selectionX: b.x
4416                        },
4417                        m;
4418                    this.hZoomEnabled && 4 < Math.abs(this.mouseX0 - this.mouseX) && (b.startX = this.mouseX0 / this.width, b.endX = this.mouseX / this.width, m = !0);
4419                    this.vZoomEnabled && 4 < Math.abs(this.mouseY0 - this.mouseY) && (b.startY = 1 - this.mouseY0 / this.height, b.endY = 1 - this.mouseY / this.height, m = !0);
4420                    m && (this.prevY = this.prevX = NaN, this.fire(b), "selected" != a && this.clearSelection());
4421                    this.hideCursor()
4422                }
4423            }
4424        },
4425        dispatchMovedEvent: function(a, b, c, e) {
4426            a = Math.round(a);
4427            b = Math.round(b);
4428            if (!this.isHidden && (a != this.prevX || b != this.prevY || "changed" == c)) {
4429                c || (c = "moved");
4430                var d = this.fx,
4431                    f = this.fy;
4432                isNaN(d) && (d = a);
4433                isNaN(f) && (f = b);
4434                var h = !1;
4435                this.zooming && this.pan && (h = !0);
4436                h = {
4437                    hidden: this.isHidden,
4438                    type: c,
4439                    chart: this.chart,
4440                    target: this,
4441                    x: a,
4442                    y: b,
4443                    finalX: d,
4444                    finalY: f,
4445                    zooming: this.zooming,
4446                    panning: h,
4447                    mostCloseGraph: this.mostCloseGraph,
4448                    index: this.index,
4449                    skip: e,
4450                    hideBalloons: this.hideGraphBalloons
4451                };
4452                this.prevIndex = this.index;
4453                this.rotate ? (h.position = b, h.finalPosition = f) : (h.position = a, h.finalPosition = d);
4454                this.prevX = a;
4455                this.prevY = b;
4456                e ? this.chart.handleCursorMove(h) : (this.fire(h), "changed" == c && this.chart.fire(h))
4457            }
4458        },
4459        dispatchPanEvent: function() {
4460            if (this.mouseIsDown) {
4461                var a = d.roundTo((this.mouseX - this.mouseX0) / this.width, 3),
4462                    b = d.roundTo((this.mouseY - this.mouseY0) / this.height, 3),
4463                    c = d.roundTo((this.mouse2X - this.mouse2X0) / this.width, 3),
4464                    e = d.roundTo((this.mouse2Y - this.mouse2Y0) / this.height, 2),
4465                    g = !1;
4466                0 !== Math.abs(a) && 0 !== Math.abs(b) && (g = !0);
4467                if (this.prevDeltaX == a || this.prevDeltaY == b) g = !1;
4468                isNaN(c) || isNaN(e) || (0 !== Math.abs(c) && 0 !== Math.abs(e) && (g = !0), this.prevDelta2X != c && this.prevDelta2Y != e) || (g = !1);
4469                g && (this.hideLines(), this.fire({
4470                    type: "panning",
4471                    chart: this.chart,
4472                    target: this,
4473                    deltaX: a,
4474                    deltaY: b,
4475                    delta2X: c,
4476                    delta2Y: e,
4477                    index: this.index
4478                }), this.prevDeltaX = a, this.prevDeltaY = b, this.prevDelta2X = c, this.prevDelta2Y = e)
4479            }
4480        },
4481        clearSelection: function() {
4482            var a = this.selection;
4483            a && (a.width = 0, a.height = 0, a.remove())
4484        },
4485        destroy: function() {
4486            this.clear();
4487            d.remove(this.selection);
4488            this.selection = null;
4489            clearTimeout(this.syncTO);
4490            d.remove(this.set)
4491        },
4492        clear: function() {},
4493        setTimestamp: function(a) {
4494            this.timestamp = a
4495        },
4496        setIndex: function(a, b) {
4497            a != this.index && (this.index = a, b || this.isHidden || this.dispatchMovedEvent(this.mouseX, this.mouseY, "changed"))
4498        },
4499        handleMouseOut: function() {
4500            this.enabled && this.rolledOver && (this.leaveCursor || this.setIndex(void 0), this.forceShow = !1, this.hideCursor(), this.rolledOver = !1)
4501        },
4502        showCursorAt: function(a) {
4503            var b = this.chart.categoryAxis;
4504            b && this.setPosition(b.categoryToCoordinate(a), a)
4505        },
4506        setPosition: function(a, b) {
4507            var c = this.chart,
4508                e = c.categoryAxis;
4509            if (e) {
4510                var d, f;
4511                void 0 === b && (b = e.coordinateToValue(a));
4512                e.showBalloonAt(b, a);
4513                this.forceShow = !0;
4514                e.stickBalloonToCategory ? c.rotate ? this.fixHLine(a, 0) : this.fixVLine(a, 0) : (this.showCursor(), c.rotate ? this.hhLine.translate(0, a) : this.vvLine.translate(a, 0));
4515                c.rotate ? d = a : f = a;
4516                c.rotate ? (this.vvLine && this.vvLine.hide(), this.hhLine && this.hhLine.show()) : (this.hhLine && this.hhLine.hide(), this.vvLine && this.vvLine.show());
4517                this.updateFullLine();
4518                this.isHidden = !1;
4519                this.dispatchMovedEvent(f, d, "moved", !0)
4520            }
4521        },
4522        enableDrawing: function(a) {
4523            this.enabled = !a;
4524            this.hideCursor();
4525            this.drawing = a
4526        },
4527        syncWithCursor: function(a, b) {
4528            clearTimeout(this.syncTO);
4529            a && (a.isHidden ? this.hideCursor(!0) : this.syncWithCursorReal(a, b))
4530        },
4531        isZooming: function(a) {
4532            this.zooming = a
4533        },
4534        syncWithCursorReal: function(a, b) {
4535            var c = a.vvLine,
4536                e = a.hhLine;
4537            this.index = a.index;
4538            this.forceShow = !0;
4539            this.zooming && this.pan || this.showCursor(!0);
4540            this.hideGraphBalloons = b;
4541            this.justReleased = a.justReleased;
4542            this.zooming = a.zooming;
4543            this.index0 = a.index0;
4544            this.mouseX0 = a.mouseX0;
4545            this.mouseY0 = a.mouseY0;
4546            this.mouse2X0 = a.mouse2X0;
4547            this.mouse2Y0 = a.mouse2Y0;
4548            this.timestamp0 = a.timestamp0;
4549            this.prevDeltaX = a.prevDeltaX;
4550            this.prevDeltaY = a.prevDeltaY;
4551            this.prevDelta2X = a.prevDelta2X;
4552            this.prevDelta2Y = a.prevDelta2Y;
4553            this.fx = a.fx;
4554            this.fy = a.fy;
4555            a.zooming && this.updateSelection();
4556            var d = a.mouseX,
4557                f = a.mouseY;
4558            this.rotate ? (d = NaN, this.vvLine && this.vvLine.hide(), this.hhLine && e && (isNaN(a.fy) ? this.hhLine.translate(0, a.mouseY) : this.fixHLine(a.fy, 0))) : (f = NaN, this.hhLine && this.hhLine.hide(), this.vvLine && c && (isNaN(a.fx) ? this.vvLine.translate(a.mouseX, 0) : this.fixVLine(a.fx, 0)));
4559            this.dispatchMovedEvent(d, f, "moved", !0)
4560        }
4561    })
4562})();
4563(function() {
4564    var d = window.AmCharts;
4565    d.SimpleChartScrollbar = d.Class({
4566        construct: function(a) {
4567            this.createEvents("zoomed", "zoomStarted", "zoomEnded");
4568            this.backgroundColor = "#D4D4D4";
4569            this.backgroundAlpha = 1;
4570            this.selectedBackgroundColor = "#EFEFEF";
4571            this.scrollDuration = this.selectedBackgroundAlpha = 1;
4572            this.resizeEnabled = !0;
4573            this.hideResizeGrips = !1;
4574            this.scrollbarHeight = 20;
4575            this.updateOnReleaseOnly = !1;
4576            9 > document.documentMode && (this.updateOnReleaseOnly = !0);
4577            this.dragIconHeight = this.dragIconWidth = 35;
4578            this.dragIcon = "dragIconRoundBig";
4579            this.dragCursorHover = "cursor: move; cursor: grab; cursor: -moz-grab; cursor: -webkit-grab;";
4580            this.dragCursorDown = "cursor: move; cursor: grab; cursor: -moz-grabbing; cursor: -webkit-grabbing;";
4581            this.vResizeCursor = "ns-resize";
4582            this.hResizeCursor = "ew-resize";
4583            this.enabled = !0;
4584            this.percentStart = this.offset = 0;
4585            this.percentEnd = 1;
4586            d.applyTheme(this, a, "SimpleChartScrollbar")
4587        },
4588        getPercents: function() {
4589            var a = this.getDBox(),
4590                b = a.x,
4591                c = a.y,
4592                e = a.width,
4593                a = a.height;
4594            this.rotate ? (b = 1 - c / this.height, c = 1 - (c + a) / this.height) : (c = b / this.width, b = (b + e) / this.width);
4595            this.percentStart = c;
4596            this.percentEnd = b
4597        },
4598        draw: function() {
4599            var a = this;
4600            a.destroy();
4601            if (a.enabled) {
4602                var b = a.chart.container,
4603                    c = a.rotate,
4604                    e = a.chart;
4605                e.panRequired = !0;
4606                var g = b.set();
4607                a.set = g;
4608                c ? d.setCN(e, g, "scrollbar-vertical") : d.setCN(e, g, "scrollbar-horizontal");
4609                e.scrollbarsSet.push(g);
4610                var f, h;
4611                c ? (f = a.scrollbarHeight, h = e.plotAreaHeight) : (h = a.scrollbarHeight, f = e.plotAreaWidth);
4612                a.width = f;
4613                if ((a.height = h) && f) {
4614                    var k = d.rect(b, f, h, a.backgroundColor, a.backgroundAlpha, 1, a.backgroundColor, a.backgroundAlpha);
4615                    d.setCN(e, k, "scrollbar-bg");
4616                    a.bg = k;
4617                    g.push(k);
4618                    k = d.rect(b, f, h, "#000", .005);
4619                    g.push(k);
4620                    a.invisibleBg = k;
4621                    k.click(function() {
4622                        a.handleBgClick()
4623                    }).mouseover(function() {
4624                        a.handleMouseOver()
4625                    }).mouseout(function() {
4626                        a.handleMouseOut()
4627                    }).touchend(function() {
4628                        a.handleBgClick()
4629                    });
4630                    k = d.rect(b, f, h, a.selectedBackgroundColor, a.selectedBackgroundAlpha);
4631                    d.setCN(e, k, "scrollbar-bg-selected");
4632                    a.selectedBG = k;
4633                    g.push(k);
4634                    f = d.rect(b, f, h, "#000", .005);
4635                    a.dragger = f;
4636                    g.push(f);
4637                    f.mousedown(function(b) {
4638                        a.handleDragStart(b)
4639                    }).mouseup(function() {
4640                        a.handleDragStop()
4641                    }).mouseover(function() {
4642                        a.handleDraggerOver()
4643                    }).mouseout(function() {
4644                        a.handleMouseOut()
4645                    }).touchstart(function(b) {
4646                        a.handleDragStart(b)
4647                    }).touchend(function() {
4648                        a.handleDragStop()
4649                    });
4650                    h = e.pathToImages;
4651                    var l, k = a.dragIcon.replace(/\.[a-z]*$/i, "");
4652                    d.isAbsolute(k) && (h = "");
4653                    c ? (l = h + k + "H" + e.extension, h = a.dragIconWidth, c = a.dragIconHeight) : (l = h + k + e.extension, c = a.dragIconWidth, h = a.dragIconHeight);
4654                    k = b.image(l, 0, 0, c, h);
4655                    d.setCN(e, k, "scrollbar-grip-left");
4656                    l = b.image(l, 0, 0, c, h);
4657                    d.setCN(e, l, "scrollbar-grip-right");
4658                    var m = 10,
4659                        n = 20;
4660                    e.panEventsEnabled && (m = 25, n = a.scrollbarHeight);
4661                    var q = d.rect(b, m, n, "#000", .005),
4662                        p = d.rect(b, m, n, "#000", .005);
4663                    p.translate(-(m - c) / 2, -(n - h) / 2);
4664                    q.translate(-(m - c) / 2, -(n - h) / 2);
4665                    c = b.set([k, p]);
4666                    b = b.set([l, q]);
4667                    a.iconLeft = c;
4668                    g.push(a.iconLeft);
4669                    a.iconRight = b;
4670                    g.push(b);
4671                    a.updateGripCursor(!1);
4672                    e.makeAccessible(c, a.accessibleLabel);
4673                    e.makeAccessible(b, a.accessibleLabel);
4674                    e.makeAccessible(f, a.accessibleLabel);
4675                    c.setAttr("role", "menuitem");
4676                    b.setAttr("role", "menuitem");
4677                    f.setAttr("role", "menuitem");
4678                    void 0 !== a.tabIndex && (c.setAttr("tabindex", a.tabIndex), c.keyup(function(b) {
4679                        a.handleKeys(b, 1, 0)
4680                    }));
4681                    void 0 !== a.tabIndex && (f.setAttr("tabindex", a.tabIndex), f.keyup(function(b) {
4682                        a.handleKeys(b, 1, 1)
4683                    }));
4684                    void 0 !== a.tabIndex && (b.setAttr("tabindex", a.tabIndex), b.keyup(function(b) {
4685                        a.handleKeys(b, 0, 1)
4686                    }));
4687                    c.mousedown(function() {
4688                        a.leftDragStart()
4689                    }).mouseup(function() {
4690                        a.leftDragStop()
4691                    }).mouseover(function() {
4692                        a.iconRollOver()
4693                    }).mouseout(function() {
4694                        a.iconRollOut()
4695                    }).touchstart(function() {
4696                        a.leftDragStart()
4697                    }).touchend(function() {
4698                        a.leftDragStop()
4699                    });
4700                    b.mousedown(function() {
4701                        a.rightDragStart()
4702                    }).mouseup(function() {
4703                        a.rightDragStop()
4704                    }).mouseover(function() {
4705                        a.iconRollOver()
4706                    }).mouseout(function() {
4707                        a.iconRollOut()
4708                    }).touchstart(function() {
4709                        a.rightDragStart()
4710                    }).touchend(function() {
4711                        a.rightDragStop()
4712                    });
4713                    d.ifArray(e.chartData) ? g.show() : g.hide();
4714                    a.hideDragIcons();
4715                    a.clipDragger(!1)
4716                }
4717                g.translate(a.x, a.y);
4718                g.node.style.msTouchAction = "none";
4719                g.node.style.touchAction = "none"
4720            }
4721        },
4722        handleKeys: function(a, b, c) {
4723            this.getPercents();
4724            var e = this.percentStart,
4725                d = this.percentEnd;
4726            if (this.rotate) var f = d,
4727                d = e,
4728                e = f;
4729            if (37 == a.keyCode || 40 == a.keyCode) e -= .02 * b, d -= .02 * c;
4730            if (39 == a.keyCode || 38 == a.keyCode) e += .02 * b, d += .02 * c;
4731            this.rotate && (a = d, d = e, e = a);
4732            isNaN(d) || isNaN(e) || this.percentZoom(e, d, !0)
4733        },
4734        updateScrollbarSize: function(a, b) {
4735            if (!isNaN(a) && !isNaN(b)) {
4736                a = Math.round(a);
4737                b = Math.round(b);
4738                var c = this.dragger,
4739                    e, d, f, h, k;
4740                this.rotate ? (e = 0, d = a, f = this.width + 1, h = b - a, c.setAttr("height", b - a), c.setAttr("y", d)) : (e = a, d = 0, f = b - a, h = this.height + 1, k = b - a, c.setAttr("x", e), c.setAttr("width", k
4740));
4741                this.clipAndUpdate(e, d, f, h)
4742            }
4743        },
4744        update: function() {
4745            var a, b = !1,
4746                c, e, d = this.x,
4747                f = this.y,
4748                h = this.dragger,
4749                k = this.getDBox();
4750            if (k) {
4751                c = k.x + d;
4752                e = k.y + f;
4753                var l = k.width,
4754                    k = k.height,
4755                    m = this.rotate,
4756                    n = this.chart,
4757                    q = this.width,
4758                    p = this.height,
4759                    t = n.mouseX,
4760                    n = n.mouseY;
4761                a = this.initialMouse;
4762                this.forceClip && this.clipDragger(!0);
4763                if (this.dragging) {
4764                    var r = this.initialCoord;
4765                    if (m) a = r + (n - a), 0 > a && (a = 0), r = p - k, a > r && (a = r), h.setAttr("y", a);
4766                    else {
4767                        a = r + (t - a);
4768                        0 > a && (a = 0);
4769                        r = q - l;
4770                        if (a > r || isNaN(a)) a = r;
4771                        h.setAttr("x", a)
4772                    }
4773                    this.clipDragger(!0)
4774                }
4775                if (this.resizingRight) {
4776                    if (m)
4777                        if (a = n - e, !isNaN(this.maxHeight) && a > this.maxHeight && (a = this.maxHeight), a + e > p + f && (a = p - e + f), 0 > a) this.resizingRight = !1, b = this.resizingLeft = !0;
4778                        else {
4779                            if (0 === a || isNaN(a)) a = .1;
4780                            h.setAttr("height", a)
4781                        }
4782                    else if (a = t - c, !isNaN(this.maxWidth) && a > this.maxWidth && (a = this.maxWidth), a + c > q + d && (a = q - c + d), 0 > a) this.resizingRight = !1, b = this.resizingLeft = !0;
4783                    else {
4784                        if (0 === a || isNaN(a)) a = .1;
4785                        h.setAttr("width", a)
4786                    }
4787                    this.clipDragger(!0)
4788                }
4789                if (this.resizingLeft) {
4790                    if (m)
4791                        if (c = e, e = n, e < f && (e = f), isNaN(e) && (e = f), e > p + f && (e = p + f), a = !0 === b ? c - e : k + c - e, !isNaN(this.maxHeight) && a > this.maxHeight && (a = this.maxHeight, e = c), 0 > a) this.resizingRight = !0, this.resizingLeft = !1, h.setAttr("y", c + k - f);
4792                        else {
4793                            if (0 === a || isNaN(a)) a = .1;
4794                            h.setAttr("y", e - f);
4795                            h.setAttr("height", a)
4796                        }
4797                    else if (e = t, e < d && (e = d), isNaN(e) && (e = d), e > q + d && (e = q + d), a = !0 === b ? c - e : l + c - e, !isNaN(this.maxWidth) && a > this.maxWidth && (a = this.maxWidth, e = c), 0 > a) this.resizingRight = !0, this.resizingLeft = !1, h.setAttr("x", c + l - d);
4798                    else {
4799                        if (0 === a || isNaN(a)) a = .1;
4800                        h.setAttr("x", e - d);
4801                        h.setAttr("width", a)
4802                    }
4803                    this.clipDragger(!0)
4804                }
4805            }
4806        },
4807        stopForceClip: function() {
4808            this.animating = this.forceClip = !1
4809        },
4810        clipDragger: function(a) {
4811            var b = this.getDBox();
4812            if (b) {
4813                var c = b.x,
4814                    e = b.y,
4815                    d = b.width,
4816                    b = b.height,
4817                    f = !1;
4818                if (this.rotate) {
4819                    if (c = 0, d = this.width + 1, this.clipY != e || this.clipH != b) f = !0
4820                } else if (e = 0, b = this.height + 1, this.clipX != c || this.clipW != d) f = !0;
4821                f && this.clipAndUpdate(c, e, d, b);
4822                a && (this.updateOnReleaseOnly || this.dispatchScrollbarEvent())
4823            }
4824        },
4825        maskGraphs: function() {},
4826        clipAndUpdate: function(a, b, c, d) {
4827            this.clipX = a;
4828            this.clipY = b;
4829            this.clipW = c;
4830            this.clipH = d;
4831            this.selectedBG.setAttr("width", c);
4832            this.selectedBG.setAttr("height", d);
4833            this.selectedBG.translate(a, b);
4834            this.updateDragIconPositions();
4835            this.maskGraphs(a, b, c, d)
4836        },
4837        dispatchScrollbarEvent: function() {
4838            if (this.skipEvent) this.skipEvent = !1;
4839            else {
4840                var a = this.chart;
4841                a.hideBalloon();
4842                var b = this.getDBox(),
4843                    c = b.x,
4844                    d = b.y,
4845                    g = b.width,
4846                    b = b.height;
4847                this.getPercents();
4848                this.rotate ? (c = d, g = this.height / b) : g = this.width / g;
4849                a = {
4850                    type: "zoomed",
4851                    position: c,
4852                    chart: a,
4853                    target: this,
4854                    multiplier: g,
4855                    relativeStart: this.percentStart,
4856                    relativeEnd: this.percentEnd
4857                };
4858                if (this.percentStart != this.prevPercentStart || this.percentEnd != this.prevPercentEnd || this.prevMultiplier != g) this.fire(a), this.prevPercentStart = this.percentStart, this.prevPercentEnd = this.percentEnd, this.prevMultiplier = g
4859            }
4860        },
4861        updateDragIconPositions: function() {
4862            var a = this.getDBox(),
4863                b = a.x,
4864                c = a.y,
4865                d = this.iconLeft,
4866                g = this.iconRight,
4867                f, h, k = this.scrollbarHeight;
4868            this.rotate ? (f = this.dragIconWidth, h = this.dragIconHeight, d.translate((k - h) / 2, c - f / 2), g.translate((k - h) / 2, c + a.height - f / 2)) : (f = this.dragIconHeight, h = this.dragIconWidth, d.translate(b - h / 2, (k - f) / 2), g.translate(b - h / 2 + a.width, (k - f) / 2))
4869        },
4870        showDragIcons: function() {
4871            this.resizeEnabled && (this.iconLeft.show(), this.iconRight.show())
4872        },
4873        hideDragIcons: function() {
4874            if (!this.resizingLeft && !this.resizingRight && !this.dragging) {
4875                if (this.hideResizeGrips || !this.resizeEnabled) this.iconLeft.hide(), this.iconRight.hide();
4876                this.removeCursors()
4877            }
4878        },
4879        removeCursors: function() {
4880            this.chart.setMouseCursor("auto")
4881        },
4882        fireZoomEvent: function(a) {
4883            this.fire({
4884                type: a,
4885                chart: this.chart,
4886                target: this
4887            })
4888        },
4889        percentZoom: function(a, b, c) {
4890            a = d.fitToBounds(a, 0, b);
4891            b = d.fitToBounds(b, a, 1);
4892            if (this.dragger && this.enabled) {
4893                this.dragger.stop();
4894                isNaN(a) && (a = 0);
4895                isNaN(b) && (b = 1);
4896                var e, g;
4897                this.rotate ? (e = this.height, b = e - e * b, g = e - e * a) : (e = this.width, g = e * b, b = e * a);
4898                this.updateScrollbarSize(b, g);
4899                this.clipDragger(!1);
4900                this.getPercents();
4901                c && this.dispatchScrollbarEvent()
4902            }
4903        },
4904        destroy: function() {
4905            this.clear();
4906            d.remove(this.set);
4907            d.remove(this.iconRight);
4908            d.remove(this.iconLeft)
4909        },
4910        clear: function() {},
4911        handleDragStart: function() {
4912            if (this.enabled) {
4913                this.fireZoomEvent("zoomStarted");
4914                var a = this.chart;
4915                this.dragger.stop();
4916                this.removeCursors();
4917                d.isModern && (this.dragger.node.style.cssText = this.dragCursorDown);
4918                this.dragging = !0;
4919                var b = this.getDBox();
4920                this.rotate ? (this.initialCoord = b.y, this.initialMouse = a.mouseY) : (this.initialCoord = b.x, this.initialMouse = a.mouseX)
4921            }
4922        },
4923        handleDragStop: function() {
4924            this.updateOnReleaseOnly && (this.update(), this.skipEvent = !1, this.dispatchScrollbarEvent());
4925            this.dragging = !1;
4926            this.mouseIsOver && this.removeCursors();
4927            d.isModern && (this.dragger.node.style.cssText = this.dragCursorHover);
4928            this.update();
4929            this.fireZoomEvent("zoomEnded")
4930        },
4931        handleDraggerOver: function() {
4932            this.handleMouseOver();
4933            d.isModern && (this.dragger.node.style.cssText = this.dragCursorHover)
4934        },
4935        leftDragStart: function() {
4936            this.fireZoomEvent("zoomStarted");
4937            this.dragger.stop();
4938            this.resizingLeft = !0;
4939            this.updateGripCursor(!0)
4940        },
4941        updateGripCursor: function(a) {
4942            d.isModern && (a = this.rotate ? a ? this.vResizeCursorDown : this.vResizeCursorHover : a ? this.hResizeCursorDown : this.hResizeCursorHover) && (this.iconRight && (this.iconRight.node.style.cssText = a), this.iconLeft && (this.iconLeft.node.style.cssText = a))
4943        },
4944        leftDragStop: function() {
4945            this.resizingLeft && (this.resizingLeft = !1, this.mouseIsOver || this.removeCursors(), this.updateOnRelease(), this.fireZoomEvent("zoomEnded"));
4946            this.updateGripCursor(!1)
4947        },
4948        rightDragStart: function() {
4949            this.fireZoomEvent("zoomStarted");
4950            this.dragger.stop();
4951            this.resizingRight = !0;
4952            this.updateGripCursor(!0)
4953        },
4954        rightDragStop: function() {
4955            this.resizingRight && (this.resizingRight = !1, this.mouseIsOver || this.removeCursors(), this.updateOnRelease(), this.fireZoomEvent("zoomEnded"));
4956            this.updateGripCursor(!1)
4957        },
4958        iconRollOut: function() {
4959            this.removeCursors()
4960        },
4961        iconRollOver: function() {
4962            this.rotate ? this.vResizeCursor && this.chart.setMouseCursor(this.vResizeCursor) : this.hResizeCursor && this.chart.setMouseCursor(this.hResizeCursor);
4963            this.handleMouseOver()
4964        },
4965        getDBox: function() {
4966            if (this.dragger) return this.dragger.getBBox()
4967        },
4968        handleBgClick: function() {
4969            var a = this;
4970            if (!a.resizingRight && !a.resizingLeft) {
4971                a.zooming = !0;
4972                var b, c, e = a.scrollDuration,
4973                    g = a.dragger;
4974                b = a.getDBox();
4975                var f = b.height,
4976                    h = b.width;
4977                c = a.chart;
4978                var k = a.y,
4979                    l = a.x,
4980                    m = a.rotate;
4981                m ? (b = "y", c = c.mouseY - f / 2 - k, c = d.fitToBounds(c, 0, a.height - f)) : (b = "x", c = c.mouseX - h / 2 - l, c = d.fitToBounds(c, 0, a.width - h));
4982                a.updateOnReleaseOnly ? (a.skipEvent = !1, g.setAttr(b, c), a.dispatchScrollbarEvent(), a.clipDragger()) : (a.animating = !0, c = Math.round(c), m ? g.animate({
4983                    y: c
4984                }, e, ">") : g.animate({
4985                    x: c
4986                }, e, ">"), a.forceClip = !0, clearTimeout(a.forceTO), a.forceTO = setTimeout(function() {
4987                    a.stopForceClip.call(a)
4988                }, 5E3 * e))
4989            }
4990        },
4991        updateOnRelease: function() {
4992            this.updateOnReleaseOnly && (this.update(), this.skipEvent = !1, this.dispatchScrollbarEvent())
4993        },
4994        handleReleaseOutside: function() {
4995            if (this.set) {
4996                if (this.resizingLeft || this.resizingRight || this.dragging) this.dragging = this.resizingRight = this.resizingLeft = !1, this.updateOnRelease(), this.removeCursors();
4997                this.animating = this.mouseIsOver = !1;
4998                this.hideDragIcons();
4999                this.update()
5000            }
5001        },
5002        handleMouseOver: function() {
5003            this.mouseIsOver = !0;
5004            this.showDragIcons()
5005        },
5006        handleMouseOut: function() {
5007            this.mouseIsOver = !1;
5008            this.hideDragIcons();
5009            this.removeCursors()
5010        }
5011    })
5012})();
5013(function() {
5014    var d = window.AmCharts;
5015    d.ChartScrollbar = d.Class({
5016        inherits: d.SimpleChartScrollbar,
5017        construct: function(a) {
5018            this.cname = "ChartScrollbar";
5019            d.ChartScrollbar.base.construct.call(this, a);
5020            this.graphLineColor = "#BBBBBB";
5021            this.graphLineAlpha = 0;
5022            this.graphFillColor = "#BBBBBB";
5023            this.graphFillAlpha = 1;
5024            this.selectedGraphLineColor = "#888888";
5025            this.selectedGraphLineAlpha = 0;
5026            this.selectedGraphFillColor = "#888888";
5027            this.selectedGraphFillAlpha = 1;
5028            this.gridCount = 0;
5029            this.gridColor = "#FFFFFF";
5030            this.gridAlpha = .7;
5031            this.skipEvent = this.autoGridCount = !1;
5032            this.color = "#FFFFFF";
5033            this.scrollbarCreated = !1;
5034            this.oppositeAxis = !0;
5035            this.accessibleLabel = "Zoom chart using cursor arrows";
5036            d.applyTheme(this, a, this.cname)
5037        },
5038        init: function() {
5039            var a = this.categoryAxis,
5040                b = this.chart,
5041                c = this.gridAxis;
5042            a || ("CategoryAxis" == this.gridAxis.cname ? (this.catScrollbar = !0, a = new d.CategoryAxis, a.id = "scrollbar") : (a = new d.ValueAxis, a.data = b.chartData, a.id = c.id, a.type = c.type, a.maximumDate = c.maximumDate, a.minimumDate = c.minimumDate, a.minPeriod = c.minPeriod, a.minMaxField = c.minMaxField), this.categoryAxis = a);
5043            a.chart = b;
5044            var e = b.categoryAxis;
5045            e && (a.firstDayOfWeek = e.firstDayOfWeek);
5046            a.dateFormats = c.dateFormats;
5047            a.markPeriodChange = c.markPeriodChange;
5048            a.boldPeriodBeginning = c.boldPeriodBeginning;
5049            a.labelFunction = c.labelFunction;
5050            a.axisItemRenderer = d.RecItem;
5051            a.axisRenderer = d.RecAxis;
5052            a.guideFillRenderer = d.RecFill;
5053            a.inside = !0;
5054            a.fontSize = this.fontSize;
5055            a.tickLength = 0;
5056            a.axisAlpha = 0;
5057            d.isString(this.graph) && (this.graph = d.getObjById(b.graphs, this.graph));
5058            (a = this.graph) && this.catScrollbar && (c = this.valueAxis, c || (this.valueAxis = c = new d.ValueAxis, c.visible = !1, c.scrollbar = !0, c.axisItemRenderer = d.RecItem, c.axisRenderer = d.RecAxis, c.guideFillRenderer = d.RecFill, c.labelsEnabled = !1, c.chart = b), b = this.unselectedGraph, b || (b = new d.AmGraph, b.scrollbar = !0, this.unselectedGraph = b, b.negativeBase = a.negativeBase, b.noStepRisers = a.noStepRisers), b = this.selectedGraph, b || (b = new d.AmGraph, b.scrollbar = !0, this.selectedGraph = b, b.negativeBase = a.negativeBase, b.noStepRisers = a.noStepRisers));
5059            this.scrollbarCreated = !0
5060        },
5061        draw: function() {
5062            var a = this;
5063            d.ChartScrollbar.base.draw.call(a);
5064            if (a.enabled) {
5065                a.scrollbarCreated || a.init();
5066                var b = a.chart,
5067                    c = b.chartData,
5068                    e = a.categoryAxis,
5069                    g = a.rotate,
5070                    f = a.x,
5071                    h = a.y,
5072                    k = a.width,
5073                    l = a.height,
5074                    m = a.gridAxis,
5075                    n = a.set;
5076                e.setOrientation(!g);
5077                e.parseDates = m.parseDates;
5078                "ValueAxis" == a.categoryAxis.cname && (e.rotate = !g);
5079                e.equalSpacing = m.equalSpacing;
5080                e.minPeriod = m.minPeriod;
5081                e.startOnAxis = m.startOnAxis;
5082                e.width = k - 1;
5083                e.height = l;
5084                e.gridCount = a.gridCount;
5085                e.gridColor = a.gridColor;
5086                e.gridAlpha = a.gridAlpha;
5087                e.color = a.color;
5088                e.tickLength = 0;
5089                e.axisAlpha = 0;
5090                e.autoGridCount = a.autoGridCount;
5091                e.parseDates && !e.equalSpacing && e.timeZoom(b.firstTime, b.lastTime);
5092                e.minimum = a.gridAxis.fullMin;
5093                e.maximum = a.gridAxis.fullMax;
5094                e.strictMinMax = !0;
5095                e.zoom(0, c.length - 1);
5096                if ((m = a.graph) && a.catScrollbar) {
5097                    var q = a.valueAxis,
5098                        p = m.valueAxis;
5099                    q.id = p.id;
5100                    q.rotate = g;
5101                    q.setOrientation(g);
5102                    q.width = k;
5103                    q.height = l;
5104                    q.dataProvider = c;
5105                    q.reversed = p.reversed;
5106                    q.logarithmic = p.logarithmic;
5107                    q.gridAlpha = 0;
5108                    q.axisAlpha = 0;
5109                    n.push(q.set);
5110                    g ? (q.y = h, q.x = 0) : (q.x = f, q.y = 0);
5111                    var f = Infinity,
5112                        h = -Infinity,
5113                        t;
5114                    for (t = 0; t < c.length; t++) {
5115                        var r = c[t].axes[p.id].graphs[m.id].values,
5116                            w;
5117                        for (w in r)
5118                            if (r.hasOwnProperty(w) && "percents" != w && "total" != w) {
5119                                var z = r[w];
5120                                z < f && (f = z);
5121                                z > h && (h = z)
5122                            }
5123                    }
5124                    Infinity != f && (q.minimum = f); - Infinity != h && (q.maximum = h + .1 * (h - f));
5125                    f == h && (--q.minimum, q.maximum += 1);
5126                    void 0 !== a.minimum && (q.minimum = a.minimum);
5127                    void 0 !== a.maximum && (q.maximum = a.maximum);
5128                    q.zoom(0, c.length - 1);
5129                    w = a.unselectedGraph;
5130                    w.id = m.id;
5131                    w.bcn = "scrollbar-graph-";
5132                    w.rotate = g;
5133                    w.chart = b;
5134                    w.data = c;
5135                    w.valueAxis = q;
5136                    w.chart = m.chart;
5137                    w.categoryAxis = a.categoryAxis;
5138                    w.periodSpan = m.periodSpan;
5139                    w.valueField = m.valueField;
5140                    w.openField = m.openField;
5141                    w.closeField = m.closeField;
5142                    w.highField = m.highField;
5143                    w.lowField = m.lowField;
5144                    w.lineAlpha = a.graphLineAlpha;
5145                    w.lineColorR = a.graphLineColor;
5146                    w.fillAlphas = a.graphFillAlpha;
5147                    w.fillColorsR = a.graphFillColor;
5148                    w.connect = m.connect;
5149                    w.hidden = m.hidden;
5150                    w.width = k;
5151                    w.height = l;
5152                    w.pointPosition = m.pointPosition;
5153                    w.stepDirection = m.stepDirection;
5154                    w.periodSpan = m.periodSpan;
5155                    p = a.selectedGraph;
5156                    p.id = m.id;
5157                    p.bcn = w.bcn + "selected-";
5158                    p.rotate = g;
5159                    p.chart = b;
5160                    p.data = c;
5161                    p.valueAxis = q;
5162                    p.chart = m.chart;
5163                    p.categoryAxis = e;
5164                    p.periodSpan = m.periodSpan;
5165                    p.valueField = m.valueField;
5166                    p.openField = m.openField;
5167                    p.closeField = m.closeField;
5168                    p.highField = m.highField;
5169                    p.lowField = m.lowField;
5170                    p.lineAlpha = a.selectedGraphLineAlpha;
5171                    p.lineColorR = a.selectedGraphLineColor;
5172                    p.fillAlphas = a.selectedGraphFillAlpha;
5173                    p.fillColorsR = a.selectedGraphFillColor;
5174                    p.connect = m.connect;
5175                    p.hidden = m.hidden;
5176                    p.width = k;
5177                    p.height = l;
5178                    p.pointPosition = m.pointPosition;
5179                    p.stepDirection = m.stepDirection;
5180                    p.periodSpan = m.periodSpan;
5181                    b = a.graphType;
5182                    b || (b = m.type);
5183                    w.type = b;
5184                    p.type = b;
5185                    c = c.length - 1;
5186                    w.zoom(0, c);
5187                    p.zoom(0, c);
5188                    p.set.click(function() {
5189                        a.handleBackgroundClick()
5190                    }).mouseover(function() {
5191                        a.handleMouseOver()
5192                    }).mouseout(function() {
5193                        a.handleMouseOut()
5194                    });
5195                    w.set.click(function() {
5196                        a.handleBackgroundClick()
5197                    }).mouseover(function() {
5198                        a.handleMouseOver()
5199                    }).mouseout(function() {
5200                        a.handleMouseOut()
5201                    });
5202                    n.push(w.set);
5203                    n.push(p.set)
5204                }
5205                n.push(e.set);
5206                n.push(e.labelsSet);
5207                a.bg.toBack();
5208                a.invisibleBg.toFront();
5209                a.dragger.toFront();
5210                a.iconLeft.toFront();
5211                a.iconRight.toFront()
5212            }
5213        },
5214        timeZoom: function(a, b, c) {
5215            this.startTime = a;
5216            this.endTime = b;
5217            this.timeDifference = b - a;
5218            this.skipEvent = !d.toBoolean(c);
5219            this.zoomScrollbar();
5220            this.dispatchScrollbarEvent()
5221        },
5222        zoom: function(a, b) {
5223            this.start = a;
5224            this.end = b;
5225            this.skipEvent = !0;
5226            this.zoomScrollbar()
5227        },
5228        dispatchScrollbarEvent: function() {
5229            if (this.categoryAxis && "ValueAxis" == this.categoryAxis.cname) d.ChartScrollbar.base.dispatchScrollbarEvent.call(this);
5230            else if (this.skipEvent) this.skipEvent = !1;
5231            else {
5232                var a = this.chart.chartData,
5233                    b, c, e = this.dragger.getBBox();
5234                b = e.x;
5235                var g = e.y,
5236                    f = e.width,
5237                    e = e.height,
5238                    h = this.chart;
5239                this.rotate ? (b = g, c = e) : c = f;
5240                f = {
5241                    type: "zoomed",
5242                    target: this
5243                };
5244                f.chart = h;
5245                var k = this.categoryAxis,
5246                    l = this.stepWidth,
5247                    g = h.minSelectedTime,
5248                    e = h.maxSelectedTime,
5249                    m = !1;
5250                if (k.parseDates && !k.equalSpacing) {
5251                    if (a = h.lastTime, h = h.firstTime, k = Math.round(b / l) + h, b = this.dragging ? k + this.timeDifference : Math.round((b + c) / l) + h, k > b && (k = b), 0 < g && b - k < g && (b = Math.round(k + (b - k) / 2), m = Math.round(g / 2), k = b - m, b += m, m = !0), 0 < e && b - k > e && (b = Math.round(k + (b - k) / 2), m = Math.round(e / 2), k = b - m, b += m, m = !0), b > a && (b = a), b - g < k && (k = b - g), k < h && (k = h), k + g > b && (b = k + g), k != this.startTime || b != this.endTime) this.startTime = k, this.endTime = b, f.start = k, f.end = b, f.startDate = new Date(k), f.endDate = new Date(b), this.fire(f)
5252                } else {
5253                    k.startOnAxis || (b += l / 2);
5254                    c -= this.stepWidth / 2;
5255                    g = k.xToIndex(b);
5256                    b = k.getCoordinate(g) - this.stepWidth / 2;
5257                    b = k.xToIndex(b + c);
5258                    if (g != this.start || this.end != b) k.startOnAxis && (this.resizingRight && g == b && b++, this.resizingLeft && g == b && (0 < g ? g-- : b = 1)), this.start = g, this.end = this.dragging ? this.start + this.difference : b, f.start = this.start, f.end = this.end, k.parseDates && (a[this.start] && (f.startDate = new Date(a[this.start].time)), a[this.end] && (f.endDate = new Date(a[this.end].time))), this.fire(f);
5259                    this.percentStart = g;
5260                    this.percentEnd = b
5261                }
5262                m && this.zoomScrollbar(!0)
5263            }
5264        },
5265        zoomScrollbar: function(a) {
5266            if ((!(this.dragging || this.resizingLeft || this.resizingRight || this.animating) || a) && this.dragger && this.enabled) {
5267                var b, c, d = this.chart;
5268                a = d.chartData;
5269                var g = this.categoryAxis;
5270                g.parseDates && !g.equalSpacing ? (a = g.stepWidth, c = d.firstTime, b = a * (this.startTime - c), c = a * (this.endTime -
5271                    c)) : (a[this.start] && (b = a[this.start].x[g.id]), a[this.end] && (c = a[this.end].x[g.id]), a = g.stepWidth, g.startOnAxis || (d = a / 2, b -= d, c += d));
5272                this.stepWidth = a;
5273                isNaN(b) || isNaN(c) || this.updateScrollbarSize(b, c)
5274            }
5275        },
5276        maskGraphs: function(a, b, c, d) {
5277            var g = this.selectedGraph;
5278            g && g.set.clipRect(a, b, c, d)
5279        },
5280        handleDragStart: function() {
5281            d.ChartScrollbar.base.handleDragStart.call(this);
5282            this.difference = this.end - this.start;
5283            this.timeDifference = this.endTime - this.startTime;
5284            0 > this.timeDifference && (this.timeDifference = 0)
5285        },
5286        handleBackgroundClick: function() {
5287            d.ChartScrollbar.base.handleBackgroundClick.call(this);
5288            this.dragging || (this.difference = this.end - this.start, this.timeDifference = this.endTime - this.startTime, 0 > this.timeDifference && (this.timeDifference = 0))
5289        }
5290    })
5291})();
5292(function() {
5293    var d = window.AmCharts;
5294    d.AmBalloon = d.Class({
5295        construct: function(a) {
5296            this.cname = "AmBalloon";
5297            this.enabled = !0;
5298            this.fillColor = "#FFFFFF";
5299            this.fillAlpha = .8;
5300            this.borderThickness = 2;
5301            this.borderColor = "#FFFFFF";
5302            this.borderAlpha = 1;
5303            this.cornerRadius = 0;
5304            this.maxWidth = 220;
5305            this.horizontalPadding = 8;
5306            this.verticalPadding = 4;
5307            this.pointerWidth = 6;
5308            this.pointerOrientation = "V";
5309            this.color = "#000000";
5310            this.adjustBorderColor = !0;
5311            this.show = this.follow = this.showBullet = !1;
5312            this.bulletSize = 3;
5313            this.shadowAlpha = .4;
5314            this.shadowColor = "#000000";
5315            this.fadeOutDuration = this.animationDuration = .3;
5316            this.fixedPosition = !0;
5317            this.offsetY = 6;
5318            this.offsetX = 1;
5319            this.textAlign = "center";
5320            this.disableMouseEvents = !0;
5321            this.deltaSignX = this.deltaSignY = 1;
5322            d.isModern || (this.offsetY *= 1.5);
5323            this.sdy = this.sdx = 0;
5324            d.applyTheme(this, a, this.cname)
5325        },
5326        draw: function() {
5327            var a = this.pointToX,
5328                b = this.pointToY;
5329            d.isModern || (this.drop = !1);
5330            var c = this.chart;
5331            d.VML && (this.fadeOutDuration = 0);
5332            this.xAnim && c.stopAnim(this.xAnim);
5333            this.yAnim && c.stopAnim(this.yAnim);
5334            this.sdy = this.sdx = 0;
5335            if (!isNaN(a)) {
5336                var e = this.follow,
5337                    g = c.container,
5338                    f = this.set;
5339                d.remove(f);
5340                this.removeDiv();
5341                f = g.set();
5342                f.node.style.pointerEvents = "none";
5343                this.set = f;
5344                this.mainSet ? (this.mainSet.push(this.set), this.sdx = this.mainSet.x, this.sdy = this.mainSet.y) : c.balloonsSet.push(f);
5345                if (this.show) {
5346                    var h = this.l,
5347                        k = this.t,
5348                        l = this.r,
5349                        m = this.b,
5350                        n = this.balloonColor,
5351                        q = this.fillColor,
5352                        p = this.borderColor,
5353                        t = q;
5354                    void 0 != n && (this.adjustBorderColor ? t = p = n : q = n);
5355                    var r = this.horizontalPadding,
5356                        w = this.verticalPadding,
5357                        z = this.pointerWidth,
5358                        x = this.pointerOrientation,
5359                        u = this.cornerRadius,
5360                        A = c.fontFamily,
5361                        y = this.fontSize;
5362                    void 0 == y && (y = c.fontSize);
5363                    var n = document.createElement("div"),
5364                        B = c.classNamePrefix;
5365                    n.className = B + "-balloon-div";
5366                    this.className && (n.className = n.className + " " + B + "-balloon-div-" + this.className);
5367                    B = n.style;
5368                    this.disableMouseEvents && (B.pointerEvents = "none");
5369                    B.position = "absolute";
5370                    var D = this.minWidth,
5371                        C = document.createElement("div");
5372                    n.appendChild(C);
5373                    var I = C.style;
5374                    isNaN(D) || (I.minWidth = D - 2 * r + "px");
5375                    I.textAlign = this.textAlign;
5376                    I.maxWidth = this.maxWidth + "px";
5377                    I.fontSize = y + "px";
5378                    I.color = this.color;
5379                    I.fontFamily = A;
5380                    C.innerHTML = this.text;
5381                    c.chartDiv.appendChild(n);
5382                    this.textDiv = n;
5383                    var I = n.offsetWidth,
5384                        H = n.offsetHeight;
5385                    n.clientHeight && (I = n.clientWidth, H = n.clientHeight);
5386                    A = H + 2 * w;
5387                    C = I + 2 * r;
5388                    !isNaN(D) && C < D && (C = D);
5389                    window.opera && (A += 2);
5390                    var Q = !1,
5391                        y = this.offsetY;
5392                    c.handDrawn && (y += c.handDrawScatter + 2);
5393                    "H" != x ? (D = a - C / 2, b < k + A + 10 && "down" != x ? (Q = !0, e && (b += y), y = b + z, this.deltaSignY = -1) : (e && (b -= y), y = b - A - z, this.deltaSignY = 1)) : (2 * z > A && (z = A / 2), y = b - A / 2, a < h + (l - h) / 2 ? (D = a + z, this.deltaSignX = -1) : (D = a - C - z, this.deltaSignX = 1));
5394                    y + A >= m && (y = m - A);
5395                    y < k && (y = k);
5396                    D < h && (D = h);
5397                    D + C > l && (D = l - C);
5398                    var k = y + w,
5399                        m = D + r,
5400                        M = this.shadowAlpha,
5401                        P = this.shadowColor,
5402                        r = this.borderThickness,
5403                        ia = this.bulletSize,
5404                        J, w = this.fillAlpha,
5405                        aa = this.borderAlpha;
5406                    this.showBullet && (J = d.circle(g, ia, t, w), f.push(J));
5407                    this.drop ? (h = C / 1.6, l = 0, "V" == x && (x = "down"), "H" == x && (x = "left"), "down" == x && (D = a + 1, y = b - h - h / 3), "up" == x && (l = 180, D = a + 1, y = b + h + h / 3), "left" == x && (l = 270, D = a + h + h / 3 + 2, y = b), "right" == x && (l = 90, D = a - h - h / 3 + 2, y = b), k = y - H / 2 + 1, m = D - I / 2 - 1, q = d.drop(g, h, l, q, w, r, p, aa)) : 0 < u || 0 === z ? (0 < M && (a = d.rect(g, C, A, q, 0, r + 1, P, M, u), d.isModern ? a.translate(1, 1) : a.translate(4, 4), f.push(a)), q = d.rect(g, C, A, q, w, r, p, aa, u)) : (t = [], u = [], "H" != x ? (h = a - D, h > C - z && (h = C - z), h < z && (h = z), t = [0, h - z, a - D, h + z, C, C, 0, 0], u = Q ? [0, 0, b - y, 0, 0, A, A, 0] : [A, A, b - y, A, A, 0, 0, A]) : (x = b - y, x > A - z && (x = A - z), x < z && (x = z), u = [0, x - z, b - y, x + z, A, A, 0, 0], t = a < h + (l - h) / 2 ? [0, 0, D < a ? 0 : a - D, 0, 0, C, C, 0] : [C, C, D + C > a ? C : a - D, C, C, 0, 0, C]), 0 < M && (a = d.polygon(g, t, u, q, 0, r, P, M), a.translate(1, 1), f.push(a)), q = d.polygon(g, t, u, q, w, r, p, aa));
5408                    this.bg = q;
5409                    f.push(q);
5410                    q.toFront();
5411                    d.setCN(c, q, "balloon-bg");
5412                    this.className && d.setCN(c, q, "balloon-bg-" + this.className);
5413                    g = 1 * this.deltaSignX;
5414                    m += this.sdx;
5415                    k += this.sdy;
5416                    B.left = m + "px";
5417                    B.top = k + "px";
5418                    f.translate(D - g, y, 1, !0);
5419                    q = q.getBBox();
5420                    this.bottom = y + A + 1;
5421                    this.yPos = q.y + y;
5422                    J && J.translate(this.pointToX - D + g, b - y);
5423                    b = this.animationDuration;
5424                    0 < this.animationDuration && !e && !isNaN(this.prevX) && (f.translate(this.prevX, this.prevY, NaN, !0), f.animate({
5425                        translate: D - g + "," + y
5426                    }, b, "easeOutSine"), n && (B.left = this.prevTX + "px", B.top = this.prevTY + "px", this.xAnim = c.animate({
5427                        node: n
5428                    }, "left", this.prevTX, m, b, "easeOutSine", "px"), this.yAnim = c.animate({
5429                        node: n
5430                    }, "top", this.prevTY, k, b, "easeOutSine", "px")));
5431                    this.prevX = D - g;
5432                    this.prevY = y;
5433                    this.prevTX = m;
5434                    this.prevTY = k
5435                }
5436            }
5437        },
5438        fixPrevious: function() {
5439            this.rPrevX = this.prevX;
5440            this.rPrevY = this.prevY;
5441            this.rPrevTX = this.prevTX;
5442            this.rPrevTY = this.prevTY
5443        },
5444        restorePrevious: function() {
5445            this.prevX = this.rPrevX;
5446            this.prevY = this.rPrevY;
5447            this.prevTX = this.rPrevTX;
5448            this.prevTY = this.rPrevTY
5449        },
5450        followMouse: function() {
5451            if (this.follow && this.show) {
5452                var a = this.chart.mouseX - this.offsetX * this.deltaSignX - this.sdx,
5453                    b = this.chart.mouseY - this.sdy;
5454                this.pointToX = a;
5455                this.pointToY = b;
5456                if (a != this.previousX || b != this.previousY)
5457                    if (this.previousX = a, this.previousY = b, 0 === this.cornerRadius) this.draw();
5458                    else {
5459                        var c = this.set;
5460                        if (c) {
5461                            var d = c.getBBox(),
5462                                a = a - d.width / 2,
5463                                g = b - d.height - 10;
5464                            a < this.l && (a = this.l);
5465                            a > this.r - d.width && (a = this.r - d.width);
5466                            g < this.t && (g = b + 10);
5467                            c.translate(a, g);
5468                            b = this.textDiv.style;
5469                            b.left = a + this.horizontalPadding + "px";
5470                            b.top = g + this.verticalPadding + "px"
5471                        }
5472                    }
5473            }
5474        },
5475        changeColor: function(a) {
5476            this.balloonColor = a
5477        },
5478        setBounds: function(a, b, c, d) {
5479            this.l = a;
5480            this.t = b;
5481            this.r = c;
5482            this.b = d;
5483            this.destroyTO && clearTimeout(this.destroyTO)
5484        },
5485        showBalloon: function(a) {
5486            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
5487        },
5488        hide: function(a) {
5489            var b = this;
5490            b.text = void 0;
5491            isNaN(a) && (a = b.fadeOutDuration);
5492            var c = b.chart;
5493            if (0 < a && !b.isHiding) {
5494                b.isHiding = !0;
5495                b.destroyTO && clearTimeout(b.destroyTO);
5496                b.destroyTO = setTimeout(function() {
5497                    b.destroy.call(b)
5498                }, 1E3 * a);
5499                b.follow = !1;
5500                b.show = !1;
5501                var d = b.set;
5502                d && (d.setAttr("opacity", b.fillAlpha), b.fadeAnim1 = d.animate({
5503                    opacity: 0
5504                }, a, "easeInSine"));
5505                b.textDiv && (b.fadeAnim2 = c.animate({
5506                    node: b.textDiv
5507                }, "opacity", 1, 0, a, "easeInSine", ""))
5508            } else b.show = !1, b.follow = !1, b.destroy()
5509        },
5510        setPosition: function(a, b) {
5511            if (a != this.pointToX || b != this.pointToY) this.previousX = this.pointToX, this.previousY = this.pointToY, this.pointToX = a, this.pointToY = b, this.positionChanged = !0
5512        },
5513        followCursor: function(a) {
5514            var b = this;
5515            b.follow = a;
5516            clearInterval(b.interval);
5517            var c = b.chart.mouseX - b.sdx,
5518                d = b.chart.mouseY - b.sdy;
5519            !isNaN(c) && a && (b.pointToX = c - b.offsetX * b.deltaSignX, b.pointToY = d, b.followMouse(), b.interval = setInterval(function() {
5520                b.followMouse.call(b)
5521            }, 40))
5522        },
5523        removeDiv: function() {
5524            if (this.textDiv) {
5525                var a = this.textDiv.parentNode;
5526                a && a.removeChild(this.textDiv)
5527            }
5528        },
5529        destroy: function() {
5530            clearInterval(this.interval);
5531            d.remove(this.set);
5532            this.removeDiv();
5533            this.set = null
5534        }
5535    })
5536})();
5537(function() {
5538    var d = window.AmCharts;
5539    d.AmCoordinateChart = d.Class({
5540        inherits: d.AmChart,
5541        construct: function(a) {
5542            d.AmCoordinateChart.base.construct.call(this, a);
5543            this.theme = a;
5544            this.createEvents("rollOverGraphItem", "rollOutGraphItem", "clickGraphItem", "doubleClickGraphItem", "rightClickGraphItem", "clickGraph", "rollOverGraph", "rollOutGraph");
5545            this.startAlpha = 1;
5546            this.startDuration = 0;
5547            this.startEffect = "elastic";
5548            this.sequencedAnimation = !0;
5549            this.colors = "#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");
5550            this.balloonDateFormat = "MMM DD, YYYY";
5551            this.valueAxes = [];
5552            this.graphs = [];
5553            this.guides = [];
5554            this.gridAboveGraphs = !1;
5555            d.applyTheme(this, a, "AmCoordinateChart")
5556        },
5557        initChart: function() {
5558            d.AmCoordinateChart.base.initChart.call(this);
5559            this.drawGraphs = !0;
5560            var a = this.categoryAxis;
5561            a && (this.categoryAxis = d.processObject(a, d.CategoryAxis, this.theme));
5562            this.processValueAxes();
5563            this.createValueAxes();
5564            this.processGraphs();
5565            this.processGuides();
5566            d.VML && (this.startAlpha = 1);
5567            this.setLegendData(this.graphs);
5568            this.gridAboveGraphs && (this.gridSet.toFront(), this.bulletSet.toFront(), this.balloonsSet.toFront())
5569        },
5570        createValueAxes: function() {
5571            if (0 === this.valueAxes.length) {
5572                var a = new d.ValueAxis;
5573                this.addValueAxis(a)
5574            }
5575        },
5576        parseData: function() {
5577            this.processValueAxes();
5578            this.processGraphs()
5579        },
5580        parseSerialData: function(a) {
5581            this.chartData = [];
5582            if (a)
5583                if (0 < this.processTimeout) {
5584                    1 > this.processCount && (this.processCount = 1);
5585                    var b = a.length / this.processCount;
5586                    this.parseCount = Math.ceil(b) - 1;
5587                    for (var c = 0; c < b; c++) this.delayParseSerialData(a, c)
5588                } else this.parseCount = 0, this.parsePartSerialData(a, 0, a.length, 0);
5589            else this.onDataUpdated()
5590        },
5591        delayParseSerialData: function(a, b) {
5592            var c = this,
5593                d = c.processCount;
5594            setTimeout(function() {
5595                c.parsePartSerialData.call(c, a, b * d, (b + 1) * d, b)
5596            }, c.processTimeout)
5597        },
5598        parsePartSerialData: function(a, b, c, e) {
5599            c > a.length && (c = a.length);
5600            var g = this.graphs,
5601                f = {},
5602                h = this.seriesIdField;
5603            h || (h = this.categoryField);
5604            var k = !1,
5605                l, m = this.categoryAxis,
5606                n, q, p;
5607            m && (k = m.parseDates, n = m.forceShowField, p = m.classNameField, q = m.labelColorField, l = m.categoryFunction);
5608            var t, r, w = {},
5609                z;
5610            k && (t = d.extractPeriod(m.minPeriod), r = t.period, t = t.count, z = d.getPeriodDuration(r, t));
5611            var x = {};
5612            this.lookupTable = x;
5613            var u, A = this.dataDateFormat,
5614                y = {};
5615            for (u = b; u < c; u++) {
5616                var B = {},
5617                    D = a[u];
5618                b = D[this.categoryField];
5619                B.dataContext = D;
5620                B.category = l ? l(b, D, m) : String(b);
5621                n && (B.forceShow = D[n]);
5622                p && (B.className = D[p]);
5623                q && (B.labelColor = D[q]);
5624                x[D[h]] = B;
5625                if (k && (m.categoryFunction ? b = m.categoryFunction(b, D, m) : (!A || b instanceof Date || (b = b.toString() + " |"), b = d.getDate(b, A, m.minPeriod)), b = d.resetDateToMin(b, r, t, m.firstDayOfWeek), B.category = b, B.time = b.getTime(), isNaN(B.time))) continue;
5626                var C = this.valueAxes;
5627                B.axes = {};
5628                B.x = {};
5629                var I;
5630                for (I = 0; I < C.length; I++) {
5631                    var H = C[I].id;
5632                    B.axes[H] = {};
5633                    B.axes[H].graphs = {};
5634                    var Q;
5635                    for (Q = 0; Q < g.length; Q++) {
5636                        b = g[Q];
5637                        var M = b.id,
5638                            P = 1.1;
5639                        isNaN(b.gapPeriod) || (P = b.gapPeriod);
5640                        var ia = b.periodValue;
5641                        if (b.valueAxis.id == H) {
5642                            B.axes[H].graphs[M] = {};
5643                            var J = {};
5644                            J.index = u;
5645                            var aa = D;
5646                            b.dataProvider && (aa = f);
5647                            J.values = this.processValues(aa, b, ia);
5648                            if (!b.connect || b.forceGap && !isNaN(b.gapPeriod))
5649                                if (y && y[M] && 0 < P && B.time - w[M] >= z * P && (y[M].gap = !0), b.forceGap) {
5650                                    var P = 0,
5651                                        ma;
5652                                    for (ma in J.values) P++;
5653                                    0 < P && (w[M] = B.time, y[M] = J)
5654                                } else w[M] = B.time, y[M] = J;
5655                            this.processFields(b, J, aa);
5656                            J.category = B.category;
5657                            J.serialDataItem = B;
5658                            J.graph = b;
5659                            B.axes[H].graphs[M] = J
5660                        }
5661                    }
5662                }
5663                this.chartData[u] = B
5664            }
5665            if (this.parseCount == e) {
5666                for (a = 0; a < g.length; a++) b = g[a], b.dataProvider && this.parseGraphData(b);
5667                this.dataChanged = !1;
5668                this.dispatchDataUpdated = !0;
5669                this.onDataUpdated()
5670            }
5671        },
5672        processValues: function(a, b, c) {
5673            var e = {},
5674                g, f = !1;
5675            "candlestick" != b.type && "ohlc" != b.type || "" === c || (f = !0);
5676            for (var h = "value error open close low high".split(" "), k = 0; k < h.length; k++) {
5677                var l = h[k];
5678                "value" != l && "error" != l && f && (c = l.charAt(0).toUpperCase() + l.slice(1));
5679                var m = a[b[l + "Field"] + c];
5680                null !== m && (g = Number(m), isNaN(g) || (e[l] = g), "date" == b.valueAxis.type && void 0 !== m && (g = d.getDate(m, b.chart.dataDateFormat), e[l] = g.getTime()))
5681            }
5682            return e
5683        },
5684        parseGraphData: function(a) {
5685            var b = a.dataProvider,
5686                c = a.seriesIdField;
5687            c || (c = this.seriesIdField);
5688            c || (c = this.categoryField);
5689            var d;
5690            for (d = 0; d < b.length; d++) {
5691                var g = b[d],
5692                    f = this.lookupTable[String(g[c])],
5693                    h = a.valueAxis.id;
5694                f && (h = f.axes[h].graphs[a.id], h.serialDataItem = f, h.values = this.processValues(g, a, a.peri
5694odValue), this.processFields(a, h, g))
5695            }
5696        },
5697        addValueAxis: function(a) {
5698            a.chart = this;
5699            this.valueAxes.push(a);
5700            this.validateData()
5701        },
5702        removeValueAxesAndGraphs: function() {
5703            var a = this.valueAxes,
5704                b;
5705            for (b = a.length - 1; - 1 < b; b--) this.removeValueAxis(a[b])
5706        },
5707        removeValueAxis: function(a) {
5708            var b = this.graphs,
5709                c;
5710            for (c = b.length - 1; 0 <= c; c--) {
5711                var d = b[c];
5712                d && d.valueAxis == a && this.removeGraph(d)
5713            }
5714            b = this.valueAxes;
5715            for (c = b.length - 1; 0 <= c; c--) b[c] == a && b.splice(c, 1);
5716            this.validateData()
5717        },
5718        addGraph: function(a) {
5719            this.graphs.push(a);
5720            this.chooseGraphColor(a, this.graphs.length - 1);
5721            this.validateData()
5722        },
5723        removeGraph: function(a) {
5724            var b = this.graphs,
5725                c;
5726            for (c = b.length - 1; 0 <= c; c--) b[c] == a && (b.splice(c, 1), a.destroy());
5727            this.validateData()
5728        },
5729        handleValueAxisZoom: function() {},
5730        processValueAxes: function() {
5731            var a = this.valueAxes,
5732                b;
5733            for (b = 0; b < a.length; b++) {
5734                var c = a[b],
5735                    c = d.processObject(c, d.ValueAxis, this.theme);
5736                a[b] = c;
5737                c.chart = this;
5738                c.init();
5739                this.listenTo(c, "axisIntZoomed", this.handleValueAxisZoom);
5740                c.id || (c.id = "valueAxisAuto" + b + "_" + (new Date).getTime());
5741                void 0 === c.usePrefixes && (c.usePrefixes = this.usePrefixes)
5742            }
5743        },
5744        processGuides: function() {
5745            var a = this.guides,
5746                b = this.categoryAxis;
5747            if (a)
5748                for (var c = 0; c < a.length; c++) {
5749                    var e = a[c];
5750                    (void 0 !== e.category || void 0 !== e.date) && b && b.addGuide(e);
5751                    e.id || (e.id = "guideAuto" + c + "_" + (new Date).getTime());
5752                    var g = e.valueAxis;
5753                    g ? (d.isString(g) && (g = this.getValueAxisById(g)), g ? g.addGuide(e) : this.valueAxes[0].addGuide(e)) : isNaN(e.value) || this.valueAxes[0].addGuide(e)
5754                }
5755        },
5756        processGraphs: function() {
5757            var a = this.graphs,
5758                b;
5759            this.graphsById = {};
5760            for (b = 0; b < a.length; b++) {
5761                var c = a[b],
5762                    c = d.processObject(c, d.AmGraph, this.theme);
5763                a[b] = c;
5764                this.chooseGraphColor(c, b);
5765                c.chart = this;
5766                c.init();
5767                d.isString(c.valueAxis) && (c.valueAxis = this.getValueAxisById(c.valueAxis));
5768                c.valueAxis || (c.valueAxis = this.valueAxes[0]);
5769                c.id || (c.id = "graphAuto" + b + "_" + (new Date).getTime());
5770                this.graphsById[c.id] = c
5771            }
5772        },
5773        formatString: function(a, b, c) {
5774            var e = b.graph,
5775                g = e.valueAxis;
5776            if (g.duration && g.maxInterval && b.values.value) {
5777                var f = g.numberFormatter;
5778                f || (f = chart.nf);
5779                g = d.formatDuration(b.values.value, g.duration, "", g.durationUnits, g.maxInterval, f);
5780                a = a.split("[[value]]").join(g)
5781            }
5782            a = d.massReplace(a, {
5783                "[[title]]": e.title,
5784                "[[description]]": b.description
5785            });
5786            a = c ? d.fixNewLines(a) : d.fixBrakes(a);
5787            return a = d.cleanFromEmpty(a)
5788        },
5789        getBalloonColor: function(a, b, c) {
5790            var e = a.lineColor,
5791                g = a.balloonColor;
5792            c && (g = e);
5793            c = a.fillColorsR;
5794            "object" == typeof c ? e = c[0] : void 0 !== c && (e = c);
5795            b.isNegative && (c = a.negativeLineColor, a = a.negativeFillColors, "object" == typeof a ? c = a[0] : void 0 !== a && (c = a), void 0 !== c && (e = c));
5796            void 0 !== b.color && (e = b.color);
5797            void 0 !== b.lineColor && (e = b.lineColor);
5798            b = b.fillColors;
5799            void 0 !== b && (e = b, d.ifArray(b) && (e = b[0]));
5800            void 0 === g && (g = e);
5801            return g
5802        },
5803        getGraphById: function(a) {
5804            return d.getObjById(this.graphs, a)
5805        },
5806        getValueAxisById: function(a) {
5807            return d.getObjById(this.valueAxes, a)
5808        },
5809        processFields: function(a, b, c) {
5810            if (a.itemColors) {
5811                var e = a.itemColors,
5812                    g = b.index;
5813                b.color = g < e.length ? e[g] : d.randomColor()
5814            }
5815            e = "lineColor color alpha fillColors description bullet customBullet bulletSize bulletConfig url labelColor dashLength pattern gap className columnIndex".split(" ");
5816            for (g = 0; g < e.length; g++) {
5817                var f = e[g],
5818                    h = a[f + "Field"];
5819                h && (h = c[h], d.isDefined(h) && (b[f] = h))
5820            }
5821            b.dataContext = c
5822        },
5823        chooseGraphColor: function(a, b) {
5824            if (a.lineColor) a.lineColorR = a.lineColor;
5825            else {
5826                var c;
5827                c = this.colors.length > b ? this.colors[b] : a.lineColorR ? a.lineColorR : d.randomColor();
5828                a.lineColorR = c
5829            }
5830            a.fillColorsR = a.fillColors ? a.fillColors : a.lineColorR;
5831            a.bulletBorderColorR = a.bulletBorderColor ? a.bulletBorderColor : a.useLineColorForBulletBorder ? a.lineColorR : a.bulletColor;
5832            a.bulletColorR = a.bulletColor ? a.bulletColor : a.lineColorR;
5833            if (c = this.patterns) a.pattern = c[b]
5834        },
5835        handleLegendEvent: function(a) {
5836            var b = a.type;
5837            if (a = a.dataItem) {
5838                var c = a.hidden,
5839                    d = a.showBalloon;
5840                switch (b) {
5841                    case "clickMarker":
5842                        this.textClickEnabled && (d ? this.hideGraphsBalloon(a) : this.showGraphsBalloon(a));
5843                        break;
5844                    case "clickLabel":
5845                        d ? this.hideGraphsBalloon(a) : this.showGraphsBalloon(a);
5846                        break;
5847                    case "rollOverItem":
5848                        c || this.highlightGraph(a);
5849                        break;
5850                    case "rollOutItem":
5851                        c || this.unhighlightGraph();
5852                        break;
5853                    case "hideItem":
5854                        this.hideGraph(a);
5855                        break;
5856                    case "showItem":
5857                        this.showGraph(a)
5858                }
5859            }
5860        },
5861        highlightGraph: function(a) {
5862            var b = this.graphs;
5863            if (b) {
5864                var c, d = .2;
5865                this.legend && (d = this.legend.rollOverGraphAlpha);
5866                if (1 != d)
5867                    for (c = 0; c < b.length; c++) {
5868                        var g = b[c];
5869                        g != a && g.changeOpacity(d)
5870                    }
5871            }
5872        },
5873        unhighlightGraph: function() {
5874            var a;
5875            this.legend && (a = this.legend.rollOverGraphAlpha);
5876            if (1 != a) {
5877                a = this.graphs;
5878                var b;
5879                for (b = 0; b < a.length; b++) a[b].changeOpacity(1)
5880            }
5881        },
5882        showGraph: function(a) {
5883            a.switchable && (a.hidden = !1, this.dataChanged = !0, "xy" != this.type && (this.marginsUpdated = !1), this.chartCreated && this.initChart())
5884        },
5885        hideGraph: function(a) {
5886            a.switchable && (this.dataChanged = !0, "xy" != this.type && (this.marginsUpdated = !1), a.hidden = !0, this.chartCreated && this.initChart())
5887        },
5888        hideGraphsBalloon: function(a) {
5889            a.showBalloon = !1;
5890            this.updateLegend()
5891        },
5892        showGraphsBalloon: function(a) {
5893            a.showBalloon = !0;
5894            this.updateLegend()
5895        },
5896        updateLegend: function() {
5897            this.legend && this.legend.invalidateSize()
5898        },
5899        resetAnimation: function() {
5900            this.animatable = [];
5901            var a = this.graphs;
5902            if (a) {
5903                var b;
5904                for (b = 0; b < a.length; b++) a[b].animationPlayed = !1
5905            }
5906        },
5907        animateAgain: function() {
5908            this.resetAnimation();
5909            this.validateNow()
5910        }
5911    })
5912})();
5913(function() {
5914    var d = window.AmCharts;
5915    d.TrendLine = d.Class({
5916        construct: function(a) {
5917            this.cname = "TrendLine";
5918            this.createEvents("click", "rollOver", "rollOut");
5919            this.isProtected = !1;
5920            this.dashLength = 0;
5921            this.lineColor = "#00CC00";
5922            this.lineThickness = this.lineAlpha = 1;
5923            d.applyTheme(this, a, this.cname)
5924        },
5925        draw: function() {
5926            var a = this;
5927            a.destroy();
5928            var b = a.chart,
5929                c = b.container,
5930                e, g, f, h, k = a.categoryAxis,
5931                l = a.initialDate,
5932                m = a.initialCategory,
5933                n = a.finalDate,
5934                q = a.finalCategory,
5935                p = a.valueAxis,
5936                t = a.valueAxisX,
5937                r = a.initialXValue,
5938                w = a.finalXValue,
5939                z = a.initialValue,
5940                x = a.finalValue,
5941                u = p.recalculateToPercents,
5942                A = b.dataDateFormat;
5943            k && (l && (l = d.getDate(l, A, "fff"), a.initialDate = l, e = k.dateToCoordinate(l)), m && (e = k.categoryToCoordinate(m)), n && (n = d.getDate(n, A, "fff"), a.finalDate = n, g = k.dateToCoordinate(n)), q && (g = k.categoryToCoordinate(q)));
5944            t && !u && (isNaN(r) || (e = t.getCoordinate(r)), isNaN(w) || (g = t.getCoordinate(w)));
5945            p && !u && (isNaN(z) || (f = p.getCoordinate(z)), isNaN(x) || (h = p.getCoordinate(x)));
5946            if (!(isNaN(e) || isNaN(g) || isNaN(f) || isNaN(f))) {
5947                b.rotate ? (k = [f, h], h = [e, g]) : (k = [e, g], h 
5947= [f, h]);
5948                f = d.line(c, k, h, a.lineColor, a.lineAlpha, a.lineThickness, a.dashLength);
5949                e = k;
5950                g = h;
5951                n = k[1] - k[0];
5952                q = h[1] - h[0];
5953                0 === n && (n = .01);
5954                0 === q && (q = .01);
5955                l = n / Math.abs(n);
5956                m = q / Math.abs(q);
5957                q = 90 * Math.PI / 180 - Math.asin(n / (n * q / Math.abs(n * q) * Math.sqrt(Math.pow(n, 2) + Math.pow(q, 2))));
5958                n = Math.abs(5 * Math.cos(q));
5959                q = Math.abs(5 * Math.sin(q));
5960                e.push(k[1] - l * q, k[0] - l * q);
5961                g.push(h[1] + m * n, h[0] + m * n);
5962                h = d.polygon(c, e, g, "#ffffff", .005, 0);
5963                c = c.set([h, f]);
5964                c.translate(b.marginLeftReal, b.marginTopReal);
5965                b.trendLinesSet.push(c);
5966                d.setCN(b, f, "trend-line");
5967                d.setCN(b, f, "trend-line-" + a.id);
5968                a.line = f;
5969                a.set = c;
5970                if (f = a.initialImage) f = d.processObject(f, d.Image, a.theme), f.chart = b, f.draw(), f.translate(e[0] + f.offsetX, g[0] + f.offsetY), c.push(f.set);
5971                if (f = a.finalImage) f = d.processObject(f, d.Image, a.theme), f.chart = b, f.draw(), f.translate(e[1] + f.offsetX, g[1] + f.offsetY), c.push(f.set);
5972                c.mouseup(function() {
5973                    a.handleLineClick()
5974                }).mouseover(function() {
5975                    a.handleLineOver()
5976                }).mouseout(function() {
5977                    a.handleLineOut()
5978                });
5979                c.touchend && c.touchend(function() {
5980                    a.handleLineClick()
5981                });
5982                c.clipRect(0, 0, b.plotAreaWidth, b.plotAreaHeight)
5983            }
5984        },
5985        handleLineClick: function() {
5986            this.fire({
5987                type: "click",
5988                trendLine: this,
5989                chart: this.chart
5990            })
5991        },
5992        handleLineOver: function() {
5993            var a = this.rollOverColor;
5994            void 0 !== a && this.line.attr({
5995                stroke: a
5996            });
5997            this.balloonText && (clearTimeout(this.chart.hoverInt), a = this.line.getBBox(), this.chart.showBalloon(this.balloonText, this.lineColor, !0, this.x + a.x + a.width / 2, this.y + a.y + a.height / 2));
5998            this.fire({
5999                type: "rollOver",
6000                trendLine: this,
6001                chart: this.chart
6002            })
6003        },
6004        handleLineOut: function() {
6005            this.line.attr({
6006                stroke: this.lineColor
6007            });
6008            this.balloonText && this.chart.hideBalloon();
6009            this.fire({
6010                type: "rollOut",
6011                trendLine: this,
6012                chart: this.chart
6013            })
6014        },
6015        destroy: function() {
6016            d.remove(this.set)
6017        }
6018    })
6019})();
6020(function() {
6021    var d = window.AmCharts;
6022    d.Image = d.Class({
6023        construct: function(a) {
6024            this.cname = "Image";
6025            this.height = this.width = 20;
6026            this.rotation = this.offsetY = this.offsetX = 0;
6027            this.balloonColor = this.color = "#000000";
6028            this.opacity = 1;
6029            d.applyTheme(this, a, this.cname)
6030        },
6031        draw: function() {
6032            var a = this;
6033            a.set && a.set.remove();
6034            var b = a.chart.container;
6035            a.set = b.set();
6036            var c, d;
6037            a.url ? (c = b.image(a.url, 0, 0, a.width, a.height), d = 1) : a.svgPath && (c = b.path(a.svgPath), c.setAttr("fill", a.color), c.setAttr("stroke", a.outlineColor), b = c.getBBox(), d = Math.min(a.width / b.width, a.height / b.height));
6038            c && (c.setAttr("opacity", a.opacity), a.set.rotate(a.rotation), c.translate(-a.width / 2, -a.height / 2, d), a.balloonText && c.mouseover(function() {
6039                a.chart.showBalloon(a.balloonText, a.balloonColor, !0)
6040            }).mouseout(function() {
6041                a.chart.hideBalloon()
6042            }).touchend(function() {
6043                a.chart.hideBalloon()
6044            }).touchstart(function() {
6045                a.chart.showBalloon(a.balloonText, a.balloonColor, !0)
6046            }), a.set.push(c))
6047        },
6048        translate: function(a, b) {
6049            this.set && this.set.translate(a, b)
6050        }
6051    })
6052})();
6053(function() {
6054    var d = window.AmCharts;
6055    d.circle = function(a, b, c, e, g, f, h, k, l) {
6056        0 >= b && (b = .001);
6057        if (void 0 == g || 0 === g) g = .01;
6058        void 0 === f && (f = "#000000");
6059        void 0 === h && (h = 0);
6060        e = {
6061            fill: c,
6062            stroke: f,
6063            "fill-opacity": e,
6064            "stroke-width": g,
6065            "stroke-opacity": h
6066        };
6067        a = isNaN(l) ? a.circle(0, 0, b).attr(e) : a.ellipse(0, 0, b, l).attr(e);
6068        k && a.gradient("radialGradient", [c, d.adjustLuminosity(c, -.6)]);
6069        return a
6070    };
6071    d.text = function(a, b, c, e, g, f, h, k) {
6072        f || (f = "middle");
6073        "right" == f && (f = "end");
6074        "left" == f && (f = "start");
6075        isNaN(k) && (k = 1);
6076        void 0 !== b && (b = String(b), d.isIE && !d.isModern && (b = b.replace("&amp;", "&"), b = b.replace("&", "&amp;")));
6077        c = {
6078            fill: c,
6079            "font-family": e,
6080            "font-size": g + "px",
6081            opacity: k
6082        };
6083        !0 === h && (c["font-weight"] = "bold");
6084        c["text-anchor"] = f;
6085        return a.text(b, c)
6086    };
6087    d.polygon = function(a, b, c, e, g, f, h, k, l, m, n) {
6088        isNaN(f) && (f = .01);
6089        isNaN(k) && (k = g);
6090        var q = e,
6091            p = !1;
6092        "object" == typeof q && 1 < q.length && (p = !0, q = q[0]);
6093        void 0 === h && (h = q);
6094        g = {
6095            fill: q,
6096            stroke: h,
6097            "fill-opacity": g,
6098            "stroke-width": f,
6099            "stroke-opacity": k
6100        };
6101        void 0 !== n && 0 < n && (g["stroke-dasharray"] = n);
6102        n = d.dx;
6103        f = d.dy;
6104        a.handDrawn && (c = d.makeHD(b, c, a.handDrawScatter), b = c[0], c = c[1]);
6105        h = Math.round;
6106        m && (h = Number);
6107        k = "M" + (h(b[0]) + n) + "," + (h(c[0]) + f);
6108        for (q = 1; q < b.length; q++) m && (b[q] = d.roundTo(b[q], 5), c[q] = d.roundTo(c[q], 5)), k += " L" + (h(b[q]) + n) + "," + (h(c[q]) + f);
6109        a = a.path(k + " Z").attr(g);
6110        p && a.gradient("linearGradient", e, l);
6111        return a
6112    };
6113    d.rect = function(a, b, c, e, g, f, h, k, l, m, n) {
6114        if (isNaN(b) || isNaN(c)) return a.set();
6115        isNaN(f) && (f = 0);
6116        void 0 === l && (l = 0);
6117        void 0 === m && (m = 270);
6118        isNaN(g) && (g = 0);
6119        var q = e,
6120            p = !1;
6121        "object" == typeof q && (q = q[0], p = !0);
6122        void 0 === h && (h = q);
6123        void 0 === k && (k = g);
6124        b = Math.round(b);
6125        c = Math.round(c);
6126        var t = 0,
6127            r = 0;
6128        0 > b && (b = Math.abs(b), t = -b);
6129        0 > c && (c = Math.abs(c), r = -c);
6130        t += d.dx;
6131        r += d.dy;
6132        g = {
6133            fill: q,
6134            stroke: h,
6135            "fill-opacity": g,
6136            "stroke-opacity": k
6137        };
6138        void 0 !== n && 0 < n && (g["stroke-dasharray"] = n);
6139        a = a.rect(t, r, b, c, l, f).attr(g);
6140        p && a.gradient("linearGradient", e, m);
6141        return a
6142    };
6143    d.bullet = function(a, b, c, e, g, f, h, k, l, m, n, q, p) {
6144        var t;
6145        "circle" == b && (b = "round");
6146        switch (b) {
6147            case "round":
6148                t = d.circle(a, c / 2, e, g, f, h, k);
6149                break;
6150            case "square":
6151                t = d.polygon(a, [-c / 2, c / 2, c / 2, -c / 2], [c / 2, c / 2, -c / 2, -c / 2], e, g, f, h, k, m - 180, void 0, p);
6152                break;
6153            case "rectangle":
6154                t = d.polygon(a, [-c, c, c, -c], [c / 2, c / 2, -c / 2, -c / 2], e, g, f, h, k, m - 180, void 0, p);
6155                break;
6156            case "diamond":
6157                t = d.polygon(a, [-c / 2, 0, c / 2, 0], [0, -c / 2, 0, c / 2], e, g, f, h, k);
6158                break;
6159            case "triangleUp":
6160                t = d.triangle(a, c, 0, e, g, f, h, k);
6161                break;
6162            case "triangleDown":
6163                t = d.triangle(a, c, 180, e, g, f, h, k);
6164                break;
6165            case "triangleLeft":
6166                t = d.triangle(a, c, 270, e, g, f, h, k);
6167                break;
6168            case "triangleRight":
6169                t = d.triangle(a, c, 90, e, g, f, h, k);
6170                break;
6171            case "bubble":
6172                t = d.circle(a, c / 2, e, g, f, h, k, !0);
6173                break;
6174            case "line":
6175                t = d.line(a, [-c / 2, c / 2], [0, 0], e, g, f, h, k);
6176                break;
6177            case "yError":
6178                t = a.set();
6179                t.push(d.line(a, [0, 0], [-c / 2, c / 2], e, g, f));
6180                t.push(d.line(a, [-l, l], [-c / 2, -c / 2], e, g, f));
6181                t.push(d.line(a, [-l, l], [c / 2, c / 2], e, g, f));
6182                break;
6183            case "xError":
6184                t = a.set(), t.push(d.line(a, [-c / 2, c / 2], [0, 0], e, g, f)), t.push(d.line(a, [-c / 2, -c / 2], [-l, l], e, g, f)), t.push(d.line(a, [c / 2, c / 2], [-l, l], e, g, f))
6185        }
6186        t && t.pattern(n, NaN, q);
6187        return t
6188    };
6189    d.triangle = function(a, b, c, d, g, f, h, k) {
6190        if (void 0 === f || 0 === f) f = 1;
6191        void 0 === h && (h = "#000");
6192        void 0 === k && (k = 0);
6193        d = {
6194            fill: d,
6195            stroke: h,
6196            "fill-opacity": g,
6197            "stroke-width": f,
6198            "stroke-opacity": k
6199        };
6200        b /= 2;
6201        var l;
6202        0 === c && (l = " M" + -b + "," + b + " L0," + -b + " L" + b + "," + b + " Z");
6203        180 == c && (l = " M" + -b + "," + -b + " L0," + b + " L" + b + "," + -b + " Z");
6204        90 == c && (l = " M" + -b + "," + -b + " L" + b + ",0 L" + -b + "," + b + " Z");
6205        270 == c && (l = " M" + -b + ",0 L" + b + "," + b + " L" + b + "," + -b + " Z");
6206        return a.path(l).attr(d)
6207    };
6208    d.line = function(a, b, c, e, g, f, h, k, l, m, n) {
6209        if (a.handDrawn && !n) return d.handDrawnLine(a, b, c, e, g, f, h, k, l, m, n);
6210        f = {
6211            fill: "none",
6212            "stroke-width": f
6213        };
6214        void 0 !== h && 0 < h && (f["stroke-dasharray"] = h);
6215        isNaN(g) || (f["stroke-opacity"] = g);
6216        e && (f.stroke = e);
6217        e = Math.round;
6218        m && (e = Number, b[0] = d.roundTo(b[0], 5), c[0] = d.roundTo(c[0], 5));
6219        m = d.dx;
6220        g = d.dy;
6221        h = "M" + (e(b[0]) + m) + "," + (e(c[0]) + g);
6222        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]) + g);
6223        if (d.VML) return a.path(h, void 0, !0).attr(f);
6224        l && (h += " M0,0 L0,0");
6225        return a.path(h).attr(f)
6226    };
6227    d.makeHD = function(a, b, c) {
6228        for (var d = [], g = [], f = 1; f < a.length; f++)
6229            for (var h = Number(a[f - 1]), k = Number(b[f - 1]), l = Number(a[f]), m = Number(b[f]), n = Math.round(Math.sqrt(Math.pow(l -
6230                    h, 2) + Math.pow(m - k, 2)) / 50) + 1, l = (l - h) / n, m = (m - k) / n, q = 0; q <= n; q++) {
6231                var p = k + q * m + Math.random() * c;
6232                d.push(h + q * l + Math.random() * c);
6233                g.push(p)
6234            }
6235        return [d, g]
6236    };
6237    d.handDrawnLine = function(a, b, c, e, g, f, h, k, l, m) {
6238        var n, q = a.set();
6239        for (n = 1; n < b.length; n++)
6240            for (var p = [b[n - 1], b[n]], t = [c[n - 1], c[n]], t = d.makeHD(p, t, a.handDrawScatter), p = t[0], t = t[1], r = 1; r < p.length; r++) q.push(d.line(a, [p[r - 1], p[r]], [t[r - 1], t[r]], e, g, f + Math.random() * a.handDrawThickness - a.handDrawThickness / 2, h, k, l, m, !0));
6241        return q
6242    };
6243    d.doNothing = function(a) {
6244        return a
6245    };
6246    d.drop = function(a, b, c, d, g, f, h, k) {
6247        var l = 1 / 180 * Math.PI,
6248            m = c - 20,
6249            n = Math.sin(m * l) * b,
6250            q = Math.cos(m * l) * b,
6251            p = Math.sin((m + 40) * l) * b,
6252            t = Math.cos((m + 40) * l) * b,
6253            r = .8 * b,
6254            w = -b / 3,
6255            z = b / 3;
6256        0 === c && (w = -w, z = 0);
6257        180 == c && (z = 0);
6258        90 == c && (w = 0);
6259        270 == c && (w = 0, z = -z);
6260        c = {
6261            fill: d,
6262            stroke: h,
6263            "stroke-width": f,
6264            "stroke-opacity": k,
6265            "fill-opacity": g
6266        };
6267        b = "M" + n + "," + q + " A" + b + "," + b + ",0,1,1," + p + "," + t + (" A" + r + "," + r + ",0,0,0," + (Math.sin((m + 20) * l) * b + z) + "," + (Math.cos((m + 20) * l) * b + w));
6268        b += " A" + r + "," + r + ",0,0,0," + n + "," + q;
6269        return a.path(b, void 0, void 0, "1000,1000").attr(c)
6270    };
6271    d.wedge = function(a, b, c, e, g, f, h, k, l, m, n, q, p, t) {
6272        var r = Math.round;
6273        f = r(f);
6274        h = r(h);
6275        k = r(k);
6276        var w = r(h / f * k),
6277            z = d.VML,
6278            x = 359.5 + f / 100;
6279        359.94 < x && (x = 359.94);
6280        g >= x && (g = x);
6281        var u = 1 / 180 * Math.PI,
6282            x = b + Math.sin(e * u) * k,
6283            A = c - Math.cos(e * u) * w,
6284            y = b + Math.sin(e * u) * f,
6285            B = c - Math.cos(e * u) * h,
6286            D = b + Math.sin((e + g) * u) * f,
6287            C = c - Math.cos((e + g) * u) * h,
6288            I = b + Math.sin((e + g) * u) * k,
6289            u = c - Math.cos((e + g) * u) * w,
6290            H = {
6291                fill: d.adjustLuminosity(m.fill, -.2),
6292                "stroke-opacity": 0,
6293                "fill-opacity": m["fill-opacity"]
6294            },
6295            Q = 0;
6296        180 < Math.abs(g) && (Q = 1);
6297        e = a.set();
6298        var M;
6299        z && (x = r(10 * x), y = r(10 * y), D = r(10 * D), I = r(10 * I), A = r(10 * A), B = r(10 * B), C = r(10 * C), u = r(10 * u), b = r(10 * b), l = r(10 * l), c = r(10 * c), f *= 10, h *= 10, k *= 10, w *= 10, 1 > Math.abs(g) && 1 >= Math.abs(D - y) && 1 >= Math.abs(C - B) && (M = !0));
6300        g = "";
6301        var P;
6302        q && (H["fill-opacity"] = 0, H["stroke-opacity"] = m["stroke-opacity"] / 2, H.stroke = m.stroke);
6303        if (0 < l) {
6304            P = " M" + x + "," + (A + l) + " L" + y + "," + (B + l);
6305            z ? (M || (P += " A" + (b - f) + "," + (l + c - h) + "," + (b + f) + "," + (l + c + h) + "," + y + "," + (B + l) + "," + D + "," + (C + l)), P += " L" + I + "," + (u + l), 0 < k && (M || (P += " B" + (b - k) + "," + (l + c - w) + "," + (b + k) + "," + (l + c + w) + "," + I + "," + (l + u) +
6306                "," + x + "," + (l + A)))) : (P += " A" + f + "," + h + ",0," + Q + ",1," + D + "," + (C + l) + " L" + I + "," + (u + l), 0 < k && (P += " A" + k + "," + w + ",0," + Q + ",0," + x + "," + (A + l)));
6307            P += " Z";
6308            var ia = l;
6309            z && (ia /= 10);
6310            for (var J = 0; J < ia; J += 10) {
6311                var aa = a.path(P, void 0, void 0, "1000,1000").attr(H);
6312                e.push(aa);
6313                aa.translate(0, -J)
6314            }
6315            P = a.path(" M" + x + "," + A + " L" + x + "," + (A + l) + " L" + y + "," + (B + l) + " L" + y + "," + B + " L" + x + "," + A + " Z", void 0, void 0, "1000,1000").attr(H);
6316            l = a.path(" M" + D + "," + C + " L" + D + "," + (C + l) + " L" + I + "," + (u + l) + " L" + I + "," + u + " L" + D + "," + C + " Z", void 0, void 0, "1000,1000").attr(H);
6317            e.push(P);
6318            e.push(l)
6319        }
6320        z ? (M || (g = " A" + r(b - f) + "," + r(c - h) + "," + r(b + f) + "," + r(c + h) + "," + r(y) + "," + r(B) + "," + r(D) + "," + r(C)), h = " M" + r(x) + "," + r(A) + " L" + r(y) + "," + r(B) + g + " L" + r(I) + "," + r(u)) : h = " M" + x + "," + A + " L" + y + "," + B + (" A" + f + "," + h + ",0," + Q + ",1," + D + "," + C) + " L" + I + "," + u;
6321        0 < k && (z ? M || (h += " B" + (b - k) + "," + (c - w) + "," + (b + k) + "," + (c + w) + "," + I + "," + u + "," + x + "," + A) : h += " A" + k + "," + w + ",0," + Q + ",0," + x + "," + A);
6322        a.handDrawn && (k = d.line(a, [x, y], [A, B], m.stroke, m.thickness * Math.random() * a.handDrawThickness, m["stroke-opacity"]), e.push(k));
6323        a = a.path(h +
6324            " Z", void 0, void 0, "1000,1000").attr(m);
6325        if (n) {
6326            k = [];
6327            for (w = 0; w < n.length; w++) k.push(d.adjustLuminosity(m.fill, n[w]));
6328            "radial" != t || d.isModern || (k = []);
6329            0 < k.length && a.gradient(t + "Gradient", k)
6330        }
6331        d.isModern && "radial" == t && a.grad && (a.grad.setAttribute("gradientUnits", "userSpaceOnUse"), a.grad.setAttribute("r", f), a.grad.setAttribute("cx", b), a.grad.setAttribute("cy", c));
6332        a.pattern(q, NaN, p);
6333        e.wedge = a;
6334        e.push(a);
6335        return e
6336    };
6337    d.rgb2hex = function(a) {
6338        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) : ""
6339    };
6340    d.adjustLuminosity = function(a, b) {
6341        a && -1 != a.indexOf("rgb") && (a = d.rgb2hex(a));
6342        a = String(a).replace(/[^0-9a-f]/gi, "");
6343        6 > a.length && (a = String(a[0]) + String(a[0]) + String(a[1]) + String(a[1]) + String(a[2]) + String(a[2]));
6344        b = b || 0;
6345        var c = "#",
6346            e, g;
6347        for (g = 0; 3 > g; g++) e = parseInt(a.substr(2 * g, 2), 16), e = Math.round(Math.min(Math.max(0, e + e * b), 255)).toString(16), c += ("00" +
6348            e).substr(e.length);
6349        return c
6350    }
6351})();
6352(function() {
6353    var d = window.AmCharts;
6354    d.Bezier = d.Class({
6355        construct: function(a, b, c, e, g, f, h, k, l, m, n) {
6356            var q = a.chart,
6357                p = d.bezierX,
6358                t = d.bezierY;
6359            isNaN(q.bezierX) || (p = q.bezierX);
6360            isNaN(q.bezierY) || (t = q.bezierY);
6361            isNaN(p) && (q.rotate ? (p = 20, t = 4) : (t = 20, p = 4));
6362            var r, w;
6363            "object" == typeof h && 1 < h.length && (w = !0, r = h, h = h[0]);
6364            "object" == typeof k && (k = k[0]);
6365            0 === k && (h = "none");
6366            f = {
6367                fill: h,
6368                "fill-opacity": k,
6369                "stroke-width": f
6370            };
6371            void 0 !== l && 0 < l && (f["stroke-dasharray"] = l);
6372            isNaN(g) || (f["stroke-opacity"] = g);
6373            e && (f.stroke = e);
6374            e = "M" + Math.round(b[0]) +
6375                "," + Math.round(c[0]) + " ";
6376            g = [];
6377            for (l = 0; l < b.length; l++) isNaN(b[l]) || isNaN(c[l]) ? (e += this.drawSegment(g, p, t), l < b.length - 1 && (e += "L" + b[l + 1] + "," + c[l + 1] + " "), g = []) : g.push({
6378                x: Number(b[l]),
6379                y: Number(c[l])
6380            });
6381            e += this.drawSegment(g, p, t);
6382            m && (e += m);
6383            this.path = a.path(e).attr(f);
6384            this.node = this.path.node;
6385            w && this.path.gradient("linearGradient", r, n)
6386        },
6387        drawSegment: function(a, b, c) {
6388            var d = "";
6389            if (2 < a.length)
6390                for (var g = 0; g < a.length - 1; g++) {
6391                    var f = [],
6392                        h = a[g - 1],
6393                        k = a[g],
6394                        l = a[g + 1],
6395                        m = a[g + 2];
6396                    0 === g ? (f.push({
6397                        x: k.x,
6398                        y: k.y
6399                    }), f.push({
6400                        x: k.x,
6401                        y: k.y
6402                    }), f.push({
6403                        x: l.x,
6404                        y: l.y
6405                    }), f.push({
6406                        x: m.x,
6407                        y: m.y
6408                    })) : g >= a.length - 2 ? (f.push({
6409                        x: h.x,
6410                        y: h.y
6411                    }), f.push({
6412                        x: k.x,
6413                        y: k.y
6414                    }), f.push({
6415                        x: l.x,
6416                        y: l.y
6417                    }), f.push({
6418                        x: l.x,
6419                        y: l.y
6420                    })) : (f.push({
6421                        x: h.x,
6422                        y: h.y
6423                    }), f.push({
6424                        x: k.x,
6425                        y: k.y
6426                    }), f.push({
6427                        x: l.x,
6428                        y: l.y
6429                    }), f.push({
6430                        x: m.x,
6431                        y: m.y
6432                    }));
6433                    h = [];
6434                    k = Math.round;
6435                    h.push({
6436                        x: k(f[1].x),
6437                        y: k(f[1].y)
6438                    });
6439                    h.push({
6440                        x: k((-f[0].x + b * f[1].x + f[2].x) / b),
6441                        y: k((-f[0].y + c * f[1].y + f[2].y) / c)
6442                    });
6443                    h.push({
6444                        x: k((f[1].x + b * f[2].x - f[3].x) / b),
6445                        y: k((f[1].y + c * f[2].y - f[3].y) / c)
6446                    });
6447                    h.push({
6448                        x: k(f[2].x),
6449                        y: k(f[2].y)
6450                    });
6451                    d += "C" + h[1].x + "," + h[1].y + "," +
6452                        h[2].x + "," + h[2].y + "," + h[3].x + "," + h[3].y + " "
6453                } else 1 < a.length && (d += "L" + a[1].x + "," + a[1].y);
6454            return d
6455        }
6456    })
6457})();
6458(function() {
6459    var d = window.AmCharts;
6460    d.AmDraw = d.Class({
6461        construct: function(a, b, c, e) {
6462            d.SVG_NS = "http://www.w3.org/2000/svg";
6463            d.SVG_XLINK = "http://www.w3.org/1999/xlink";
6464            d.hasSVG = !!document.createElementNS && !!document.createElementNS(d.SVG_NS, "svg").createSVGRect;
6465            1 > b && (b = 10);
6466            1 > c && (c = 10);
6467            this.div = a;
6468            this.width = b;
6469            this.height = c;
6470            this.rBin = document.createElement("div");
6471            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))
6472        },
6473        createSvgElement: function(a) {
6474            return document.createElementNS(d.SVG_NS, a)
6475        },
6476        circle: function(a, b, c, e) {
6477            var g = new d.AmDObject("circle", this);
6478            g.attr({
6479                r: c,
6480                cx: a,
6481                cy: b
6482            });
6483            this.addToContainer(g.node, e);
6484            return g
6485        },
6486        ellipse: function(a, b, c, e, g) {
6487            var f = new d.AmDObject("ellipse", this);
6488            f.attr({
6489                rx: c,
6490                ry: e,
6491                cx: a,
6492                cy: b
6493            });
6494            this.addToContainer(f.node, g);
6495            return f
6496        },
6497        setSize: function(a, b) {
6498            0 < a && 0 < b && (this.container.style.width = a + "px", this.container.style.height = b + "px")
6499        },
6500        rect: function(a, b, c, e, g, f, h) {
6501            var k = new d.AmDObject("rect", this);
6502            d.VML && (g = Math.round(100 * g / Math.min(c, e)), c += 2 * f, e += 2 * f, k.bw = f, k.node.style.marginLeft = -f, k.node.style.marginTop = -f);
6503            1 > c && (c = 1);
6504            1 > e && (e = 1);
6505            k.attr({
6506                x: a,
6507                y: b,
6508                width: c,
6509                height: e,
6510                rx: g,
6511                ry: g,
6512                "stroke-width": f
6513            });
6514            this.addToContainer(k.node, h);
6515            return k
6516        },
6517        image: function(a, b, c, e, g, f) {
6518            var h = new d.AmDObject("image", this);
6519            h.attr({
6520                x: b,
6521                y: c,
6522                width: e,
6523                height: g
6524            });
6525            this.R.path(h, a);
6526            this.addToContainer(h.node, f);
6527            return h
6528        },
6529        addToContainer: function(a, b) {
6530            b || (b = this.container);
6531            b.appendChild(a)
6532        },
6533        text: function(a, b, c) {
6534            return this.R.text(a, b, c)
6535        },
6536        path: function(a, b, c, e) {
6537            var g = new d.AmDObject("path", this);
6538            e || (e = "100,100");
6539            g.attr({
6540                cs: e
6541            });
6542            c ? g.attr({
6543                dd: a
6544            }) : g.attr({
6545                d: a
6546            });
6547            this.addToContainer(g.node, b);
6548            return g
6549        },
6550        set: function(a) {
6551            return this.R.set(a)
6552        },
6553        remove: function(a) {
6554            if (a) {
6555                var b = this.rBin;
6556                b.appendChild(a);
6557                b.innerHTML = ""
6558            }
6559        },
6560        renderFix: function() {
6561            var a = this.container,
6562                b = a.style;
6563            b.top = "0px";
6564            b.left = "0px";
6565            try {
6566                var c = a.getBoundingClientRect(),
6567                    d = c.left - Math.round(c.left),
6568                    g = c.top - Math.round(c.top);
6569                d && (b.left = d + "px");
6570                g && (b.top = g + "px")
6571            } catch (f) {}
6572        },
6573        update: function() {
6574            this.R.update()
6575        },
6576        addDefs: function(a) {
6577            if (d.hasSVG) {
6578                var b = this.createSvgElement("desc"),
6579                    c = this.container;
6580                c.setAttribute("version", "1.1");
6581                c.style.position = "absolute";
6582                this.setSize(this.width, this.height);
6583                if (a.accessibleTitle) {
6584                    var e = this.createSvgElement("text");
6585                    c.appendChild(e);
6586                    e.innerHTML = a.accessibleTitle;
6587                    e.style.opacity = 0
6588                }
6589                d.rtl && (c.setAttribute("direction", "rtl"), c.style.left = "auto", c.style.right = "0px");
6590                a && (a.addCodeCredits && b.appendChild(document.createTextNode("JavaScript chart by amCharts " + a.version)), a.accessibleDescription && (b.innerHTML = "", b.appendChild(document.createTextNode(a.accessibleDescription))), c.appendChild(b), a.defs && (b = this.createSvgElement("defs"), c.appendChild(b), d.parseDefs(a.defs, b), this.defs = b))
6591            }
6592        }
6593    })
6594})();
6595(function() {
6596    var d = window.AmCharts;
6597    d.AmDObject = d.Class({
6598        construct: function(a, b) {
6599            this.D = b;
6600            this.R = b.R;
6601            this.node = this.R.create(this, a);
6602            this.y = this.x = 0;
6603            this.scale = 1
6604        },
6605        attr: function(a) {
6606            this.R.attr(this, a);
6607            return this
6608        },
6609        getAttr: function(a) {
6610            return this.node.getAttribute(a)
6611        },
6612        setAttr: function(a, b) {
6613            this.R.setAttr(this, a, b);
6614            return this
6615        },
6616        clipRect: function(a, b, c, d) {
6617            this.R.clipRect(this, a, b, c, d)
6618        },
6619        translate: function(a, b, c, d) {
6620            d || (a = Math.round(a), b = Math.round(b));
6621            this.R.move(this, a, b, c);
6622            this.x = a;
6623            this.y = b;
6624            this.scale = c;
6625            this.angle && this.rotate(this.angle)
6626        },
6627        rotate: function(a, b) {
6628            this.R.rotate(this, a, b);
6629            this.angle = a
6630        },
6631        animate: function(a, b, c) {
6632            for (var e in a)
6633                if (a.hasOwnProperty(e)) {
6634                    var g = e,
6635                        f = a[e];
6636                    c = d.getEffect(c);
6637                    this.R.animate(this, g, f, b, c)
6638                }
6639        },
6640        push: function(a) {
6641            if (a) {
6642                var b = this.node;
6643                b.appendChild(a.node);
6644                var c = a.clipPath;
6645                c && b.appendChild(c);
6646                (a = a.grad) && b.appendChild(a)
6647            }
6648        },
6649        text: function(a) {
6650            this.R.setText(this, a)
6651        },
6652        remove: function() {
6653            this.stop();
6654            this.R.remove(this)
6655        },
6656        clear: function() {
6657            var a = this.node;
6658            if (a.hasChildNodes())
6659                for (; 1 <= a.childNodes.length;) a.removeChild(a.firstChild)
6660        },
6661        hide: function() {
6662            this.setAttr("visibility", "hidden")
6663        },
6664        show: function() {
6665            this.setAttr("visibility", "visible")
6666        },
6667        getBBox: function() {
6668            return this.R.getBBox(this)
6669        },
6670        toFront: function() {
6671            var a = this.node;
6672            if (a) {
6673                this.prevNextNode = a.nextSibling;
6674                var b = a.parentNode;
6675                b && b.appendChild(a)
6676            }
6677        },
6678        toPrevious: function() {
6679            var a = this.node;
6680            a && this.prevNextNode && (a = a.parentNode) && a.insertBefore(this.prevNextNode, null)
6681        },
6682        toBack: function() {
6683            var a = this.node;
6684            if (a) {
6685                this.prevNextNode = a.nextSibling;
6686                var b = a.parentNode;
6687                if (b) {
6688                    var c = b.firstChild;
6689                    c && b.insertBefore(a, c)
6690                }
6691            }
6692        },
6693        mouseover: function(a) {
6694            this.R.addListener(this, "mouseover", a);
6695            return this
6696        },
6697        mouseout: function(a) {
6698            this.R.addListener(this, "mouseout", a);
6699            return this
6700        },
6701        click: function(a) {
6702            this.R.addListener(this, "click", a);
6703            return this
6704        },
6705        dblclick: function(a) {
6706            this.R.addListener(this, "dblclick", a);
6707            return this
6708        },
6709        mousedown: function(a) {
6710            this.R.addListener(this, "mousedown", a);
6711            return this
6712        },
6713        mouseup: function(a) {
6714            this.R.addListener(this, "mouseup", a);
6715            return this
6716        },
6717        touchmove: function(a) {
6718            this.R.addListener(this, "touchmove", a);
6719            return this
6720        },
6721        touchstart: function(a) {
6722            this.R.addListener(this, "touchstart", a);
6723            return this
6724        },
6725        touchend: function(a) {
6726            this.R.addListener(this, "touchend", a);
6727            return this
6728        },
6729        keyup: function(a) {
6730            this.R.addListener(this, "keyup", a);
6731            return this
6732        },
6733        focus: function(a) {
6734            this.R.addListener(this, "focus", a);
6735            return this
6736        },
6737        blur: function(a) {
6738            this.R.addListener(this, "blur", a);
6739            return this
6740        },
6741        contextmenu: function(a) {
6742            this.node.addEventListener ? this.node.addEventListener("contextmenu", a, !0) : this.R.addListener(this, "contextmenu", a);
6743            return this
6744        },
6745        stop: function() {
6746            d.removeFromArray(this.R.animations, this.an_translate);
6747            d.removeFromArray(this.R.animations, this.an_y);
6748            d.removeFromArray(this.R.animations, this.an_x)
6749        },
6750        length: function() {
6751            return this.node.childNodes.length
6752        },
6753        gradient: function(a, b, c) {
6754            this.R.gradient(this, a, b, c)
6755        },
6756        pattern: function(a, b, c) {
6757            a && this.R.pattern(this, a, b, c)
6758        }
6759    })
6760})();
6761(function() {
6762    var d = window.AmCharts;
6763    d.VMLRenderer = d.Class({
6764        construct: function(a, b) {
6765            this.chart = b;
6766            this.D = a;
6767            this.cNames = {
6768                circle: "oval",
6769                ellipse: "oval",
6770                rect: "roundrect",
6771                path: "shape"
6772            };
6773            this.styleMap = {
6774                x: "left",
6775                y: "top",
6776                width: "width",
6777                height: "height",
6778                "font-family": "fontFamily",
6779                "font-size": "fontSize",
6780                visibility: "visibility"
6781            }
6782        },
6783        create: function(a, b) {
6784            var c;
6785            if ("group" == b) c = document.createElement("div"), a.type = "div";
6786            else if ("text" == b) c = document.createElement("div"), a.type = "text";
6787            else if ("image" == b) c = document.createElement("img"), a.type = "image";
6788            else {
6789                a.type = "shape";
6790                a.shapeType = this.cNames[b];
6791                c = document.createElement("amvml:" + this.cNames[b]);
6792                var d = document.createElement("amvml:stroke");
6793                c.appendChild(d);
6794                a.stroke = d;
6795                var g = document.createElement("amvml:fill");
6796                c.appendChild(g);
6797                a.fill = g;
6798                g.className = "amvml";
6799                d.className = "amvml";
6800                c.className = "amvml"
6801            }
6802            c.style.position = "absolute";
6803            c.style.top = 0;
6804            c.style.left = 0;
6805            return c
6806        },
6807        path: function(a, b) {
6808            a.node.setAttribute("src", b)
6809        },
6810        setAttr: function(a, b, c) {
6811            if (void 0 !== c) {
6812                var e;
6813                8 === document.documentMode && (e = !0);
6814                var g = a.node,
6815                    f = a.type,
6816                    h = g.style;
6817                "r" == b && (h.width = 2 * c, h.height = 2 * c);
6818                "oval" == a.shapeType && ("rx" == b && (h.width = 2 * c), "ry" == b && (h.height = 2 * c));
6819                "roundrect" == a.shapeType && ("width" != b && "height" != b || --c);
6820                "cursor" == b && (h.cursor = c);
6821                "cx" == b && (h.left = c - d.removePx(h.width) / 2);
6822                "cy" == b && (h.top = c - d.removePx(h.height) / 2);
6823                var k = this.styleMap[b];
6824                "width" == k && 0 > c && (c = 0);
6825                void 0 !== k && (h[k] = c);
6826                "text" == f && ("text-anchor" == b && (a.anchor = c, k = g.clientWidth, "end" == c && (h.marginLeft = -k + "px"), "middle" == c && (h.marginLeft = -(k / 2) +
6827                    "px", h.textAlign = "center"), "start" == c && (h.marginLeft = "0px")), "fill" == b && (h.color = c), "font-weight" == b && (h.fontWeight = c));
6828                if (h = a.children)
6829                    for (k = 0; k < h.length; k++) h[k].setAttr(b, c);
6830                if ("shape" == f) {
6831                    "cs" == b && (g.style.width = "100px", g.style.height = "100px", g.setAttribute("coordsize", c));
6832                    "d" == b && g.setAttribute("path", this.svgPathToVml(c));
6833                    "dd" == b && g.setAttribute("path", c);
6834                    f = a.stroke;
6835                    a = a.fill;
6836                    "stroke" == b && (e ? f.color = c : f.setAttribute("color", c));
6837                    "stroke-width" == b && (e ? f.weight = c : f.setAttribute("weight", c));
6838                    "stroke-opacity" == b && (e ? f.opacity = c : f.setAttribute("opacity", c));
6839                    "stroke-dasharray" == b && (h = "solid", 0 < c && 3 > c && (h = "dot"), 3 <= c && 6 >= c && (h = "dash"), 6 < c && (h = "longdash"), e ? f.dashstyle = h : f.setAttribute("dashstyle", h));
6840                    if ("fill-opacity" == b || "opacity" == b) 0 === c ? e ? a.on = !1 : a.setAttribute("on", !1) : e ? a.opacity = c : a.setAttribute("opacity", c);
6841                    "fill" == b && (e ? a.color = c : a.setAttribute("color", c));
6842                    "rx" == b && (e ? g.arcSize = c + "%" : g.setAttribute("arcsize", c + "%"))
6843                }
6844            }
6845        },
6846        attr: function(a, b) {
6847            for (var c in b) b.hasOwnProperty(c) && this.setAttr(a, c, b[c])
6848        },
6849        text: function(a, b, c) {
6850            var e = new d.AmDObject("text", this.D),
6851                g = e.node;
6852            g.style.whiteSpace = "pre";
6853            g.innerHTML = a;
6854            this.D.addToContainer(g, c);
6855            this.attr(e, b);
6856            return e
6857        },
6858        getBBox: function(a) {
6859            return this.getBox(a.node)
6860        },
6861        getBox: function(a) {
6862            var b = a.offsetLeft,
6863                c = a.offsetTop,
6864                d = a.offsetWidth,
6865                g = a.offsetHeight,
6866                f;
6867            if (a.hasChildNodes()) {
6868                var h, k, l;
6869                for (l = 0; l < a.childNodes.length; l++) {
6870                    f = this.getBox(a.childNodes[l]);
6871                    var m = f.x;
6872                    isNaN(m) || (isNaN(h) ? h = m : m < h && (h = m));
6873                    var n = f.y;
6874                    isNaN(n) || (isNaN(k) ? k = n : n < k && (k = n));
6875                    m = f.width + m;
6876                    isNaN(m) || (d = Math.max(d, m));
6877                    f = f.height + n;
6878                    isNaN(f) || (g = Math.max(g, f))
6879                }
6880                0 > h && (b += h);
6881                0 > k && (c += k)
6882            }
6883            return {
6884                x: b,
6885                y: c,
6886                width: d,
6887                height: g
6888            }
6889        },
6890        setText: function(a, b) {
6891            var c = a.node;
6892            c && (c.innerHTML = b);
6893            this.setAttr(a, "text-anchor", a.anchor)
6894        },
6895        addListener: function(a, b, c) {
6896            a.node["on" + b] = c
6897        },
6898        move: function(a, b, c) {
6899            var e = a.node,
6900                g = e.style;
6901            "text" == a.type && (c -= d.removePx(g.fontSize) / 2 - 1);
6902            "oval" == a.shapeType && (b -= d.removePx(g.width) / 2, c -= d.removePx(g.height) / 2);
6903            a = a.bw;
6904            isNaN(a) || (b -= a, c -= a);
6905            isNaN(b) || isNaN(c) || (e.style.left = b + "px", e.style.top = c + "px")
6906        },
6907        svgPathToVml: function(a) {
6908            var b = a.split(" ");
6909            a = "";
6910            var c, d = Math.round,
6911                g;
6912            for (g = 0; g < b.length; g++) {
6913                var f = b[g],
6914                    h = f.substring(0, 1),
6915                    f = f.substring(1),
6916                    k = f.split(","),
6917                    l = d(k[0]) + "," + d(k[1]);
6918                "M" == h && (a += " m " + l);
6919                "L" == h && (a += " l " + l);
6920                "Z" == h && (a += " x e");
6921                if ("Q" == h) {
6922                    var m = c.length,
6923                        n = c[m - 1],
6924                        q = k[0],
6925                        p = k[1],
6926                        l = k[2],
6927                        t = k[3];
6928                    c = d(c[m - 2] / 3 + 2 / 3 * q);
6929                    n = d(n / 3 + 2 / 3 * p);
6930                    q = d(2 / 3 * q + l / 3);
6931                    p = d(2 / 3 * p + t / 3);
6932                    a += " c " + c + "," + n + "," + q + "," + p + "," + l + "," + t
6933                }
6934                "C" == h && (a += " c " + k[0] + "," + k[1] + "," + k[2] + "," + k[3] + "," + k[4] + "," + k[5]);
6935                "A" == h && (a += " wa " +
6936                    f);
6937                "B" == h && (a += " at " + f);
6938                c = k
6939            }
6940            return a
6941        },
6942        animate: function(a, b, c, d, g) {
6943            var f = a.node,
6944                h = this.chart;
6945            a.animationFinished = !1;
6946            if ("translate" == b) {
6947                b = c.split(",");
6948                c = b[1];
6949                var k = f.offsetTop;
6950                h.animate(a, "left", f.offsetLeft, b[0], d, g, "px");
6951                h.animate(a, "top", k, c, d, g, "px")
6952            }
6953        },
6954        clipRect: function(a, b, c, d, g) {
6955            a = a.node;
6956            0 === b && 0 === c ? (a.style.width = d + "px", a.style.height = g + "px", a.style.overflow = "hidden") : a.style.clip = "rect(" + c + "px " + (b + d) + "px " + (c + g) + "px " + b + "px)"
6957        },
6958        rotate: function(a, b, c) {
6959            if (0 !== Number(b)) {
6960                var e = a.node;
6961                a = e.style;
6962                c || (c = this.getBGColor(e.parentNode));
6963                a.backgroundColor = c;
6964                a.paddingLeft = 1;
6965                c = b * Math.PI / 180;
6966                var g = Math.cos(c),
6967                    f = Math.sin(c),
6968                    h = d.removePx(a.left),
6969                    k = d.removePx(a.top),
6970                    l = e.offsetWidth,
6971                    e = e.offsetHeight;
6972                b /= Math.abs(b);
6973                a.left = h + l / 2 - l / 2 * Math.cos(c) - b * e / 2 * Math.sin(c) + 3;
6974                a.top = k - b * l / 2 * Math.sin(c) + b * e / 2 * Math.sin(c);
6975                a.cssText = a.cssText + "; filter:progid:DXImageTransform.Microsoft.Matrix(M11='" + g + "', M12='" + -f + "', M21='" + f + "', M22='" + g + "', sizingmethod='auto expand');"
6976            }
6977        },
6978        getBGColor: function(a) {
6979            var b = "#FFFFFF";
6980            if (a.style) {
6981                var c = a.style.backgroundColor;
6982                "" !== c ? b = c : a.parentNode && (b = this.getBGColor(a.parentNode))
6983            }
6984            return b
6985        },
6986        set: function(a) {
6987            var b = new d.AmDObject("group", this.D);
6988            this.D.container.appendChild(b.node);
6989            if (a) {
6990                var c;
6991                for (c = 0; c < a.length; c++) b.push(a[c])
6992            }
6993            return b
6994        },
6995        gradient: function(a, b, c, d) {
6996            var g = "";
6997            "radialGradient" == b && (b = "gradientradial", c.reverse());
6998            "linearGradient" == b && (b = "gradient");
6999            var f;
7000            for (f = 0; f < c.length; f++) g += Math.round(100 * f / (c.length - 1)) + "% " + c[f], f < c.length - 1 && (g += ",");
7001            a = a.fill;
7002            90 == d ? d = 0 : 270 == d ? d = 180 : 180 == d ? d = 90 : 0 === d && (d = 270);
7003            8 === document.documentMode ? (a.type = b, a.angle = d) : (a.setAttribute("type", b), a.setAttribute("angle", d));
7004            g && (a.colors.value = g)
7005        },
7006        remove: function(a) {
7007            a.clipPath && this.D.remove(a.clipPath);
7008            this.D.remove(a.node)
7009        },
7010        disableSelection: function(a) {
7011            a.onselectstart = function() {
7012                return !1
7013            };
7014            a.style.cursor = "default"
7015        },
7016        pattern: function(a, b, c, e) {
7017            c = a.node;
7018            a = a.fill;
7019            var g = "none";
7020            b.color && (g = b.color);
7021            c.fillColor = g;
7022            b = b.url;
7023            d.isAbsolute(b) || (b = e + b);
7024            8 === document.documentMode ? (a.type = "tile", a.src = b) : (a.setAttribute("type", "tile"), a.setAttribute("src", b))
7025        },
7026        update: function() {}
7027    })
7028})();
7029(function() {
7030    var d = window.AmCharts;
7031    d.SVGRenderer = d.Class({
7032        construct: function(a) {
7033            this.D = a;
7034            this.animations = []
7035        },
7036        create: function(a, b) {
7037            return document.createElementNS(d.SVG_NS, b)
7038        },
7039        attr: function(a, b) {
7040            for (var c in b) b.hasOwnProperty(c) && this.setAttr(a, c, b[c])
7041        },
7042        setAttr: function(a, b, c) {
7043            void 0 !== c && a.node.setAttribute(b, c)
7044        },
7045        animate: function(a, b, c, e, g) {
7046            a.animationFinished = !1;
7047            var f = a.node;
7048            a["an_" + b] && d.removeFromArray(this.animations, a["an_" + b]);
7049            "translate" == b ? (f = (f = f.getAttribute("transform")) ? String(f).substring(10, f.length - 1) : "0,0", f = f.split(", ").join(" "), f = f.split(" ").join(","), 0 === f && (f = "0,0")) : f = Number(f.getAttribute(b));
7050            c = {
7051                obj: a,
7052                frame: 0,
7053                attribute: b,
7054                from: f,
7055                to: c,
7056                time: e,
7057                effect: g
7058            };
7059            this.animations.push(c);
7060            a["an_" + b] = c
7061        },
7062        update: function() {
7063            var a, b = this.animations;
7064            for (a = b.length - 1; 0 <= a; a--) {
7065                var c = b[a],
7066                    e = c.time * d.updateRate,
7067                    g = c.frame + 1,
7068                    f = c.obj,
7069                    h = c.attribute,
7070                    k, l, m;
7071                if (g <= e) {
7072                    c.frame++;
7073                    if ("translate" == h) {
7074                        k = c.from.split(",");
7075                        h = Number(k[0]);
7076                        k = Number(k[1]);
7077                        isNaN(k) && (k = 0);
7078                        l = c.to.split(",");
7079                        m = Number(l[0]);
7080                        l = Number(l[1]);
7081                        m = 0 === m - h ? m : Math.round(d[c.effect](0, g, h, m - h, e));
7082                        c = 0 === l - k ? l : Math.round(d[c.effect](0, g, k, l - k, e));
7083                        h = "transform";
7084                        if (isNaN(m) || isNaN(c)) continue;
7085                        c = "translate(" + m + "," + c + ")"
7086                    } else l = Number(c.from), k = Number(c.to), m = k - l, c = d[c.effect](0, g, l, m, e), isNaN(c) && (c = k), 0 === m && this.animations.splice(a, 1);
7087                    this.setAttr(f, h, c)
7088                } else "translate" == h ? (l = c.to.split(","), m = Number(l[0]), l = Number(l[1]), f.translate(m, l)) : (k = Number(c.to), this.setAttr(f, h, k)), f.animationFinished = !0, this.animations.splice(a, 1)
7089            }
7090        },
7091        getBBox: function(a) {
7092            if (a = a.node) try {
7093                return a.getBBox()
7094            } catch (b) {}
7095            return {
7096                width: 0,
7097                height: 0,
7098                x: 0,
7099                y: 0
7100            }
7101        },
7102        path: function(a, b) {
7103            a.node.setAttributeNS(d.SVG_XLINK, "xlink:href", b)
7104        },
7105        clipRect: function(a, b, c, e, g) {
7106            var f = a.node,
7107                h = a.clipPath;
7108            h && this.D.remove(h);
7109            var k = f.parentNode;
7110            k && (f = document.createElementNS(d.SVG_NS, "clipPath"), h = d.getUniqueId(), f.setAttribute("id", h), this.D.rect(b, c, e, g, 0, 0, f), k.appendChild(f), b = "#", d.baseHref && !d.isIE && (b = this.removeTarget(window.location.href) + b), this.setAttr(a, "clip-path", "url(" + b + h + ")"), this.clipPathC++, a.clipPath = f)
7111        },
7112        text: function(a, b, c) {
7113            var e = new d.AmDObject("text", this.D);
7114            a = String(a).split("\n");
7115            var g = d.removePx(b["font-size"]),
7116                f;
7117            for (f = 0; f < a.length; f++) {
7118                var h = this.create(null, "tspan");
7119                h.appendChild(document.createTextNode(a[f]));
7120                h.setAttribute("y", (g + 2) * f + Math.round(g / 2));
7121                h.setAttribute("x", 0);
7122                e.node.appendChild(h)
7123            }
7124            e.node.setAttribute("y", Math.round(g / 2));
7125            this.attr(e, b);
7126            this.D.addToContainer(e.node, c);
7127            return e
7128        },
7129        setText: function(a, b) {
7130            var c = a.node;
7131            c && (c.removeChild(c.firstChild), c.appendChild(document.createTextNode(b)))
7132        },
7133        move: function(a, b, c, d) {
7134            isNaN(b) && (b = 0);
7135            isNaN(c) && (c = 0);
7136            b = "translate(" + b + "," + c + ")";
7137            d && (b = b + " scale(" + d + ")");
7138            this.setAttr(a, "transform", b)
7139        },
7140        rotate: function(a, b) {
7141            var c = a.node.getAttribute("transform"),
7142                d = "rotate(" + b + ")";
7143            c && (d = c + " " + d);
7144            this.setAttr(a, "transform", d)
7145        },
7146        set: function(a) {
7147            var b = new d.AmDObject("g", this.D);
7148            this.D.container.appendChild(b.node);
7149            if (a) {
7150                var c;
7151                for (c = 0; c < a.length; c++) b.push(a[c])
7152            }
7153            return b
7154        },
7155        addListener: function(a, b, c) {
7156            a.node["on" + b] = c
7157        },
7158        gradient: function(a, b, c, e) {
7159            var g = a.node,
7160                f = a.grad;
7161            f && this.D.remove(f);
7162            b = document.createElementNS(d.SVG_NS, b);
7163            f = d.getUniqueId();
7164            b.setAttribute("id", f);
7165            if (!isNaN(e)) {
7166                var h = 0,
7167                    k = 0,
7168                    l = 0,
7169                    m = 0;
7170                90 == e ? l = 100 : 270 == e ? m = 100 : 180 == e ? h = 100 : 0 === e && (k = 100);
7171                b.setAttribute("x1", h + "%");
7172                b.setAttribute("x2", k + "%");
7173                b.setAttribute("y1", l + "%");
7174                b.setAttribute("y2", m + "%")
7175            }
7176            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);
7177            g.parentNode.appendChild(b);
7178            c = "#";
7179            d.baseHref && !d.isIE && (c = this.removeTarget(window.location.href) + c);
7180            g.setAttribute("fill", "url(" + c + f + ")");
7181            a.grad = b
7182        },
7183        removeTarget: function(a) {
7184            return a.split("#")[0]
7185        },
7186        pattern: function(a, b, c, e) {
7187            var g = a.node;
7188            isNaN(c) && (c = 1);
7189            var f = a.patternNode;
7190            f && this.D.remove(f);
7191            var f = document.createElementNS(d.SVG_NS, "pattern"),
7192                h = d.getUniqueId(),
7193                k = b;
7194            b.url && (k = b.url);
7195            d.isAbsolute(k) || -1 != k.indexOf("data:image") || (k = e + k);
7196            e = Number(b.width);
7197            isNaN(e) && (e = 4);
7198            var l = Number(b.height);
7199            isNaN(l) && (l = 4);
7200            e /= c;
7201            l /= c;
7202            c = b.x;
7203            isNaN(c) && (c = 0);
7204            var m = -Math.random() * Number(b.randomX);
7205            isNaN(m) || (c = m);
7206            m = b.y;
7207            isNaN(m) && (m = 0);
7208            var n = -Math.random() * Number(b.randomY);
7209            isNaN(n) || (m = n);
7210            f.setAttribute("id", h);
7211            f.setAttribute("width", e);
7212            f.setAttribute("height", l);
7213            f.setAttribute("patternUnits", "userSpaceOnUse");
7214            f.setAttribute("xlink:href", k);
7215            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), f.appendChild(n));
7216            this.D.image(k, 0, 0, e, l, f).translate(c, m);
7217            k = "#";
7218            d.baseHref && !d.isIE && (k = this.removeTarget(window.location.href) + k);
7219            g.setAttribute("fill", "url(" + k + h + ")");
7220            a.patternNode = f;
7221            g.parentNode.appendChild(f)
7222        },
7223        remove: function(a) {
7224            a.clipPath && this.D.remove(a.clipPath);
7225            a.grad && this.D.remove(a.grad);
7226            a.patternNode && this.D.remove(a.patternNode);
7227            this.D.remove(a.node)
7228        }
7229    })
7230})();
7231(function() {
7232    var d = window.AmCharts;
7233    d.AmLegend = d.Class({
7234        construct: function(a) {
7235            this.enabled = !0;
7236            this.cname = "AmLegend";
7237            this.createEvents("rollOverMarker", "rollOverItem", "rollOutMarker", "rollOutItem", "showItem", "hideItem", "clickMarker", "clickLabel");
7238            this.position = "bottom";
7239            this.borderColor = this.color = "#000000";
7240            this.borderAlpha = 0;
7241            this.markerLabelGap = 5;
7242            this.verticalGap = 10;
7243            this.align = "left";
7244            this.horizontalGap = 0;
7245            this.spacing = 10;
7246            this.markerDisabledColor = "#AAB3B3";
7247            this.markerType = "square";
7248            this.markerSize = 16;
7249            this.markerBorderThickness = this.markerBorderAlpha = 1;
7250            this.marginBottom = this.marginTop = 0;
7251            this.marginLeft = this.marginRight = 20;
7252            this.autoMargins = !0;
7253            this.valueWidth = 50;
7254            this.switchable = !0;
7255            this.switchType = "x";
7256            this.switchColor = "#FFFFFF";
7257            this.rollOverColor = "#CC0000";
7258            this.reversedOrder = !1;
7259            this.labelText = "[[title]]";
7260            this.valueText = "[[value]]";
7261            this.accessibleLabel = "[[title]]";
7262            this.useMarkerColorForLabels = !1;
7263            this.rollOverGraphAlpha = 1;
7264            this.textClickEnabled = !1;
7265            this.equalWidths = !0;
7266            this.backgroundColor = "#FFFFFF";
7267            this.backgroundAlpha = 0;
7268            this.useGraphSettings = !1;
7269            this.showEntries = !0;
7270            this.labelDx = 0;
7271            d.applyTheme(this, a, this.cname)
7272        },
7273        setData: function(a) {
7274            this.legendData = a;
7275            this.invalidateSize()
7276        },
7277        invalidateSize: function() {
7278            this.destroy();
7279            this.entries = [];
7280            this.valueLabels = [];
7281            var a = this.legendData;
7282            this.enabled && (d.ifArray(a) || d.ifArray(this.data)) && this.drawLegend()
7283        },
7284        drawLegend: function() {
7285            var a = this.chart,
7286                b = this.position,
7287                c = this.width,
7288                e = a.divRealWidth,
7289                g = a.divRealHeight,
7290                f = this.div,
7291                h = this.legendData;
7292            this.data && (h = this.combineLegend ? this.legendData.concat(this.data) : this.data);
7293            isNaN(this.fontSize) && (this.fontSize = a.fontSize);
7294            this.maxColumnsReal = this.maxColumns;
7295            if ("right" == b || "left" == b) this.maxColumnsReal = 1, this.autoMargins && (this.marginLeft = this.marginRight = 10);
7296            else if (this.autoMargins) {
7297                this.marginRight = a.marginRight;
7298                this.marginLeft = a.marginLeft;
7299                var k = a.autoMarginOffset;
7300                "bottom" == b ? (this.marginBottom = k, this.marginTop = 0) : (this.marginTop = k, this.marginBottom = 0)
7301            }
7302            c = void 0 !== c ? d.toCoordinate(c, e) : "right" != b && "left" != b ? a.realWidth : 0 < this.ieW ? this.ieW : a.realWidth;
7303            "outside" == b ? (c = f.offsetWidth, g = f.offsetHeight, f.clientHeight && (c = f.clientWidth, g = f.clientHeight)) : (isNaN(c) || (f.style.width = c + "px"), f.className = "amChartsLegend " + a.classNamePrefix + "-legend-div");
7304            this.divWidth = c;
7305            (b = this.container) ? (b.container.innerHTML = "", f.appendChild(b.container), b.width = c, b.height = g, b.setSize(c, g), b.addDefs(a)) : b = new d.AmDraw(f, c, g, a);
7306            this.container = b;
7307            this.lx = 0;
7308            this.ly = 8;
7309            g = this.markerSize;
7310            g > this.fontSize && (this.ly = g / 2 - 1);
7311            0 < g && (this.lx += g + this.markerLabelGap);
7312            this.titleWidth = 0;
7313            if (g = this.title) g = d.text(this.container, g, this.color, a.fontFamily, this.fontSize, "start", !0), d.setCN(a, g, "legend-title"), g.translate(this.marginLeft, this.marginTop + this.verticalGap + this.ly + 1), a = g.getBBox(), this.titleWidth = a.width + 15, this.titleHeight = a.height + 6;
7314            this.index = this.maxLabelWidth = 0;
7315            if (this.showEntries) {
7316                for (a = 0; a < h.length; a++) this.createEntry(h[a]);
7317                for (a = this.index = 0; a < h.length; a++) this.createValue(h[a])
7318            }
7319            this.arrangeEntries();
7320            this.updateValues()
7321        },
7322        arrangeEntries: function() {
7323            var a = this.position,
7324                b = this.marginLeft +
7325                this.titleWidth,
7326                c = this.marginRight,
7327                e = this.marginTop,
7328                g = this.marginBottom,
7329                f = this.horizontalGap,
7330                h = this.div,
7331                k = this.divWidth,
7332                l = this.maxColumnsReal,
7333                m = this.verticalGap,
7334                n = this.spacing,
7335                q = k - c - b,
7336                p = 0,
7337                t = 0,
7338                r = this.container;
7339            this.set && this.set.remove();
7340            var w = r.set();
7341            this.set = w;
7342            var z = r.set();
7343            w.push(z);
7344            var x = this.entries,
7345                u, A;
7346            for (A = 0; A < x.length; A++) {
7347                u = x[A].getBBox();
7348                var y = u.width;
7349                y > p && (p = y);
7350                u = u.height;
7351                u > t && (t = u)
7352            }
7353            var y = t = 0,
7354                B = f,
7355                D = 0,
7356                C = 0;
7357            for (A = 0; A < x.length; A++) {
7358                var I = x[A];
7359                this.reversedOrder && (I = x[x.length - A - 1]);
7360                u = I.getBBox();
7361                var H;
7362                this.equalWidths ? H = y * (p + n + this.markerLabelGap) : (H = B, B = B + u.width + f + n);
7363                H + u.width > q && 0 < A && 0 !== y && (t++, H = y = 0, B = H + u.width + f + n, D = D + C + m, C = 0);
7364                u.height > C && (C = u.height);
7365                I.translate(H, D);
7366                y++;
7367                !isNaN(l) && y >= l && (y = 0, t++, D = D + C + m, B = f, C = 0);
7368                z.push(I)
7369            }
7370            u = z.getBBox();
7371            l = u.height + 2 * m - 1;
7372            "left" == a || "right" == a ? (n = u.width + 2 * f, k = n + b + c, h.style.width = k + "px", this.ieW = k) : n = k - b - c - 1;
7373            c = d.polygon(this.container, [0, n, n, 0], [0, 0, l, l], this.backgroundColor, this.backgroundAlpha, 1, this.borderColor, this.borderAlpha);
7374            d.setCN(this.chart, c, "legend-bg");
7375            w.push(c);
7376            w.translate(b, e);
7377            c.toBack();
7378            b = f;
7379            if ("top" == a || "bottom" == a || "absolute" == a || "outside" == a) "center" == this.align ? b = f + (n - u.width) / 2 : "right" == this.align && (b = f + n - u.width);
7380            z.translate(b, m + 1);
7381            this.titleHeight > l && (l = this.titleHeight);
7382            e = l + e + g + 1;
7383            0 > e && (e = 0);
7384            "absolute" != a && "outside" != a && e > this.chart.divRealHeight && (h.style.top = "0px");
7385            h.style.height = Math.round(e) + "px";
7386            r.setSize(this.divWidth, e)
7387        },
7388        createEntry: function(a) {
7389            if (!1 !== a.visibleInLegend && !a.hideFromLegend) {
7390                var b = this,
7391                    c = b.chart,
7392                    e = b.useGraphSettings,
7393                    g = a.markerType;
7394                g && (e = !1);
7395                a.legendEntryWidth = b.markerSize;
7396                g || (g = b.markerType);
7397                var f = a.color,
7398                    h = a.alpha;
7399                a.legendKeyColor && (f = a.legendKeyColor());
7400                a.legendKeyAlpha && (h = a.legendKeyAlpha());
7401                var k;
7402                !0 === a.hidden && (k = f = b.markerDisabledColor);
7403                var l = a.pattern,
7404                    m, n = a.customMarker;
7405                n || (n = b.customMarker);
7406                var q = b.container,
7407                    p = b.markerSize,
7408                    t = 0,
7409                    r = 0,
7410                    w = p / 2;
7411                if (e) {
7412                    e = a.type;
7413                    b.switchType = void 0;
7414                    if ("line" == e || "step" == e || "smoothedLine" == e || "ohlc" == e) m = q.set(), a.hidden || (f = a.lineColorR, k = a.bulletBorderColorR), t = d.line(q, [0, 2 * p], [p / 2, p / 2], f, a.lineAlpha, a.lineThickness, a.dashLength), d.setCN(c, t, "graph-stroke"), m.push(t), a.bullet && (a.hidden || (f = a.bulletColorR), t = d.bullet(q, a.bullet, a.bulletSize, f, a.bulletAlpha, a.bulletBorderThickness, k, a.bulletBorderAlpha)) && (d.setCN(c, t, "graph-bullet"), t.translate(p + 1, p / 2), m.push(t)), w = 0, t = p, r = p / 3;
7415                    else {
7416                        a.getGradRotation && (m = a.getGradRotation(), 0 === m && (m = 180));
7417                        t = a.fillColorsR;
7418                        !0 === a.hidden && (t = f);
7419                        if (m = b.createMarker("rectangle", t, a.fillAlphas, a.lineThickness, f, a.lineAlpha, m, l, a.dashLength)) w = p, m.translate(w, p / 2);
7420                        t = p
7421                    }
7422                    d.setCN(c, m, "graph-" + e);
7423                    d.setCN(c, m, "graph-" + a.id)
7424                } else if (n) m = q.image(n, 0, 0, p, p);
7425                else {
7426                    var z;
7427                    isNaN(b.gradientRotation) || (z = 180 + b.gradientRotation);
7428                    (m = b.createMarker(g, f, h, void 0, void 0, void 0, z, l)) && m.translate(p / 2, p / 2)
7429                }
7430                d.setCN(c, m, "legend-marker");
7431                b.addListeners(m, a);
7432                q = q.set([m]);
7433                b.switchable && a.switchable && q.setAttr("cursor", "pointer");
7434                void 0 !== a.id && d.setCN(c, q, "legend-item-" + a.id);
7435                d.setCN(c, q, a.className, !0);
7436                k = b.switchType;
7437                var x;
7438                k && "none" != k && 0 < p && ("x" == k ? (x = b.createX(), x.translate(p / 2, p / 2)) : x = b.createV(), x.dItem = a, !0 !== a.hidden ? "x" == k ? x.hide() : x.show() : "x" != k && x.hide(), b.switchable || x.hide(), b.addListeners(x, a), a.legendSwitch = x, q.push(x), d.setCN(c, x, "legend-switch"));
7439                k = b.color;
7440                a.showBalloon && b.textClickEnabled && void 0 !== b.selectedColor && (k = b.selectedColor);
7441                b.useMarkerColorForLabels && !l && (k = f);
7442                !0 === a.hidden && (k = b.markerDisabledColor);
7443                f = d.massReplace(b.labelText, {
7444                    "[[title]]": a.title
7445                });
7446                void 0 !== b.tabIndex && (q.setAttr("tabindex", b.tabIndex), q.setAttr("role", "menuitem"), q.keyup(function(c) {
7447                    13 == c.keyCode && b.clickMarker(a, c)
7448                }));
7449                c.accessible && b.accessibleLabel && (l = d.massReplace(b.accessibleLabel, {
7450                    "[[title]]": a.title
7451                }), c.makeAccessible(q, l));
7452                l = b.fontSize;
7453                m && (p <= l && (p = p / 2 + b.ly - l / 2 + (l + 2 - p) / 2 - r, m.translate(w, p), x && x.translate(x.x, p)), a.legendEntryWidth = m.getBBox().width);
7454                var u;
7455                f && (f = d.fixBrakes(f), a.legendTextReal = f, u = b.labelWidth, u = isNaN(u) ? d.text(b.container, f, k, c.fontFamily, l, "start") : d.wrappedText(b.container, f, k, c.fontFamily, l, "start", !1, u, 0), d.setCN(c, u, "legend-label"), u.translate(b.lx + t, b.ly), q.push(u), b.labelDx = t, c = u.getBBox().width, b.maxLabelWidth < c && (b.maxLabelWidth = c));
7456                b.entries[b.index] = q;
7457                a.legendEntry = b.entries[b.index];
7458                a.legendMarker = m;
7459                a.legendLabel = u;
7460                b.index++
7461            }
7462        },
7463        addListeners: function(a, b) {
7464            var c = this;
7465            a && a.mouseover(function(a) {
7466                c.rollOverMarker(b, a)
7467            }).mouseout(function(a) {
7468                c.rollOutMarker(b, a)
7469            }).click(function(a) {
7470                c.clickMarker(b, a)
7471            })
7472        },
7473        rollOverMarker: function(a, b) {
7474            this.switchable && this.dispatch("rollOverMarker", a, b);
7475            this.dispatch("rollOverItem", a, b)
7476        },
7477        rollOutMarker: function(a, b) {
7478            this.switchable && this.dispatch("rollOutMarker", a, b);
7479            this.dispatch("rollOutItem", a, b)
7480        },
7481        clickMarker: function(a, b) {
7482            this.switchable && (!0 === a.hidden ? this.dispatch("showItem", a, b) : this.dispatch("hideItem", a, b));
7483            this.dispatch("clickMarker", a, b)
7484        },
7485        rollOverLabel: function(a, b) {
7486            a.hidden || this.textClickEnabled && a.legendLabel && a.legendLabel.attr({
7487                fill: this.rollOverColor
7488            });
7489            this.dispatch("rollOverItem", a, b)
7490        },
7491        rollOutLabel: function(a, b) {
7492            if (!a.hidden && this.textClickEnabled && a.legendLabel) {
7493                var c = this.color;
7494                void 0 !== this.selectedColor && a.showBalloon && (c = this.selectedColor);
7495                this.useMarkerColorForLabels && (c = a.lineColor, void 0 === c && (c = a.color));
7496                a.legendLabel.attr({
7497                    fill: c
7498                })
7499            }
7500            this.dispatch("rollOutItem", a, b)
7501        },
7502        clickLabel: function(a, b) {
7503            this.textClickEnabled ? a.hidden || this.dispatch("clickLabel", a, b) : this.switchable && (!0 === a.hidden ? this.dispatch("showItem", a, b) : this.dispatch("hideItem", a, b))
7504        },
7505        dispatch: function(a, b, c) {
7506            a = {
7507                type: a,
7508                dataItem: b,
7509                target: this,
7510                event: c,
7511                chart: this.chart
7512            };
7513            this.chart && this.chart.handleLegendEvent(a);
7514            this.fire(a)
7515        },
7516        createValue: function(a) {
7517            var b = this,
7518                c = b.fontSize,
7519                e = b.chart;
7520            if (!1 !== a.visibleInLegend && !a.hideFromLegend) {
7521                var g = b.maxLabelWidth,
7522                    f = 0;
7523                b.forceWidth && (g = b.labelWidth);
7524                b.equalWidths || (b.valueAlign = "left");
7525                f = {
7526                    x: 0,
7527                    y: 0,
7528                    width: 0,
7529                    height: 0
7530                };
7531                a.legendLabel && (f = a.legendLabel.getBBox());
7532                "left" == b.valueAlign && (g = f.width);
7533                var f = f.height,
7534                    h = g,
7535                    k = b.markerSize;
7536                k < c + 7 && (k = c + 7, d.VML && (k += 3));
7537                if (b.valueText && 0 < b.valueWidth) {
7538                    var l = b.color;
7539                    b.useMarkerColorForValues && (l = a.color, a.legendKeyColor && (l = a.legendKeyColor
7539()));
7540                    !0 === a.hidden && (l = b.markerDisabledColor);
7541                    var m = b.valueText,
7542                        g = g + b.lx + b.labelDx + b.markerLabelGap + b.valueWidth,
7543                        n = "end";
7544                    "left" == b.valueAlign && (g -= b.valueWidth, n = "start");
7545                    c = d.text(b.container, m, l, b.chart.fontFamily, c, n);
7546                    d.setCN(e, c, "legend-value");
7547                    c.translate(g, b.ly);
7548                    b.entries[b.index].push(c);
7549                    h += b.valueWidth + 2 * b.markerLabelGap;
7550                    c.dItem = a;
7551                    b.valueLabels.push(c);
7552                    k < f + 5 && (k = f + 5)
7553                }
7554                b.index++;
7555                e = b.container.rect(a.legendEntryWidth, 0, h, k, 0, 0).attr({
7556                    stroke: "none",
7557                    fill: "#fff",
7558                    "fill-opacity": .005
7559                });
7560                e.dItem = a;
7561                b.entries[b.index -
7562                    1].push(e);
7563                e.mouseover(function(c) {
7564                    b.rollOverLabel(a, c)
7565                }).mouseout(function(c) {
7566                    b.rollOutLabel(a, c)
7567                }).click(function(c) {
7568                    b.clickLabel(a, c)
7569                })
7570            }
7571        },
7572        createV: function() {
7573            var a = this.markerSize;
7574            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)
7575        },
7576        createX: function() {
7577            var a = (this.markerSize - 4) / 2,
7578                b = {
7579                    stroke: this.switchColor,
7580                    "stroke-width": 3
7581                },
7582                c = this.container,
7583                e = d.line(c, [-a, a], [-a, a]).attr(b),
7584                a = d.line(c, [-a, a], [a, -a]).attr(b);
7585            return this.container.set([e, a])
7586        },
7587        createMarker: function(a, b, c, e, g, f, h, k, l) {
7588            var m = this.markerSize,
7589                n = this.container;
7590            g || (g = this.markerBorderColor);
7591            g || (g = b);
7592            isNaN(e) && (e = this.markerBorderThickness);
7593            isNaN(f) && (f = this.markerBorderAlpha);
7594            return d.bullet(n, a, m, b, c, e, g, f, m, h, k, this.chart.path, l)
7595        },
7596        validateNow: function() {
7597            this.invalidateSize()
7598        },
7599        updateValues: function() {
7600            var a = this.valueLabels,
7601                b = this.chart,
7602                c, e = this.data;
7603            if (a)
7604                for (c = 0; c < a.length; c++) {
7605                    var g = a[c],
7606                        f = g.dItem;
7607                    f.periodDataItem = void 0;
7608                    f.periodPercentDataItem = void 0;
7609                    var h = " ";
7610                    if (e) f.value ? g.text(f.value) : g.text("");
7611                    else {
7612                        var k = null;
7613                        if (void 0 !== f.type) {
7614                            var k = f.currentDataItem,
7615                                l = this.periodValueText;
7616                            f.legendPeriodValueText && (l = f.legendPeriodValueText);
7617                            f.legendPeriodValueTextR && (l = f.legendPeriodValueTextR);
7618                            k ? (h = this.valueText, f.legendValueText && (h = f.legendValueText), f.legendValueTextR && (h = f.legendValueTextR), h = b.formatString(h, k)) : l && b.formatPeriodString && (l = d.massReplace(l, {
7619                                "[[title]]": f.title
7620                            }), h = b.formatPeriodString(l, f))
7621                        } else h = b.formatString(this.valueText, f);
7622                        l = f;
7623                        k && (l = k);
7624                        var m = this.valueFunction;
7625                        m && (h = m(l, h, b.periodDataItem));
7626                        var n;
7627                        this.useMarkerColorForLabels && !k && f.lastDataItem && (k = f.lastDataItem);
7628                        k ? n = b.getBalloonColor(f, k) : f.legendKeyColor && (n = f.legendKeyColor
7628());
7629                        f.legendColorFunction && (n = f.legendColorFunction(l, h, f.periodDataItem, f.periodPercentDataItem));
7630                        g.text(h);
7631                        if (!f.pattern && (this.useMarkerColorForValues && g.setAttr("fill", n), this.useMarkerColorForLabels)) {
7632                            if (g = f.legendMarker) g.setAttr("fill", n), g.setAttr("stroke", n);
7633                            (g = f.legendLabel) && (f.hidden ? g.setAttr("fill", this.markerDisabledColor) : g.setAttr("fill", n))
7634                        }
7635                    }
7636                }
7637        },
7638        renderFix: function() {
7639            if (!d.VML && this.enabled) {
7640                var a = this.container;
7641                a && a.renderFix()
7642            }
7643        },
7644        destroy: function() {
7645            this.div.innerHTML = "";
7646            d.remove(this.set)
7647        }
7648    })
7649})();
7650(function() {
7651    var d = window.AmCharts;
7652    d.formatMilliseconds = function(a, b) {
7653        if (-1 != a.indexOf("fff")) {
7654            var c = b.getMilliseconds(),
7655                d = String(c);
7656            10 > c && (d = "00" + c);
7657            10 <= c && 100 > c && (d = "0" + c);
7658            a = a.replace(/fff/g, d)
7659        }
7660        return a
7661    };
7662    d.extractPeriod = function(a) {
7663        var b = d.stripNumbers(a),
7664            c = 1;
7665        b != a && (c = Number(a.slice(0, a.indexOf(b))));
7666        return {
7667            period: b,
7668            count: c
7669        }
7670    };
7671    d.getDate = function(a, b, c) {
7672        return a instanceof Date ? d.newDate(a, c) : b && isNaN(a) ? d.stringToDate(a, b) : new Date(a)
7673    };
7674    d.daysInMonth = function(a) {
7675        return (new Date(a.getYear(), a.getMonth() +
7676            1, 0)).getDate()
7677    };
7678    d.newDate = function(a, b) {
7679        return b && -1 == b.indexOf("fff") ? new Date(a) : new Date(a.getFullYear(), a.getMonth(), a.getDate(), a.getHours(), a.getMinutes(), a.getSeconds(), a.getMilliseconds())
7680    };
7681    d.resetDateToMin = function(a, b, c, e) {
7682        void 0 === e && (e = 1);
7683        var g, f, h, k, l, m, n;
7684        d.useUTC ? (g = a.getUTCFullYear(), f = a.getUTCMonth(), h = a.getUTCDate(), k = a.getUTCHours(), l = a.getUTCMinutes(), m = a.getUTCSeconds(), n = a.getUTCMilliseconds(), a = a.getUTCDay()) : (g = a.getFullYear(), f = a.getMonth(), h = a.getDate(), k = a.getHours(), l = a.getMinutes(), m = a.getSeconds(), n = a.getMilliseconds(), a = a.getDay());
7685        switch (b) {
7686            case "YYYY":
7687                g = Math.floor(g / c) * c;
7688                f = 0;
7689                h = 1;
7690                n = m = l = k = 0;
7691                break;
7692            case "MM":
7693                f = Math.floor(f / c) * c;
7694                h = 1;
7695                n = m = l = k = 0;
7696                break;
7697            case "WW":
7698                h = a >= e ? h - a + e : h - (7 + a) + e;
7699                n = m = l = k = 0;
7700                break;
7701            case "DD":
7702                n = m = l = k = 0;
7703                break;
7704            case "hh":
7705                k = Math.floor(k / c) * c;
7706                n = m = l = 0;
7707                break;
7708            case "mm":
7709                l = Math.floor(l / c) * c;
7710                n = m = 0;
7711                break;
7712            case "ss":
7713                m = Math.floor(m / c) * c;
7714                n = 0;
7715                break;
7716            case "fff":
7717                n = Math.floor(n / c) * c
7718        }
7719        d.useUTC ? (a = new Date, a.setUTCFullYear(g, f, h), a.setUTCHours(k, l, m, n)) : a = new Date(g, f, h, k, l, m, n);
7720        return a
7721    };
7722    d.getPeriodDuration = function(a, b) {
7723        void 0 === b && (b = 1);
7724        var c;
7725        switch (a) {
7726            case "YYYY":
7727                c = 316224E5;
7728                break;
7729            case "MM":
7730                c = 26784E5;
7731                break;
7732            case "WW":
7733                c = 6048E5;
7734                break;
7735            case "DD":
7736                c = 864E5;
7737                break;
7738            case "hh":
7739                c = 36E5;
7740                break;
7741            case "mm":
7742                c = 6E4;
7743                break;
7744            case "ss":
7745                c = 1E3;
7746                break;
7747            case "fff":
7748                c = 1
7749        }
7750        return c * b
7751    };
7752    d.intervals = {
7753        s: {
7754            nextInterval: "ss",
7755            contains: 1E3
7756        },
7757        ss: {
7758            nextInterval: "mm",
7759            contains: 60,
7760            count: 0
7761        },
7762        mm: {
7763            nextInterval: "hh",
7764            contains: 60,
7765            count: 1
7766        },
7767        hh: {
7768            nextInterval: "DD",
7769            contains: 24,
7770            count: 2
7771        },
7772        DD: {
7773            nextInterval: "",
7774            contains: Infinity,
7775            count: 3
7776        }
7777    };
7778    d.getMaxInterval = function(a, b) {
7779        var c = d.intervals;
7780        return a >= c[b].contains ? (a = Math.round(a / c[b].contains), b = c[b].nextInterval, d.getMaxInterval(a, b)) : "ss" == b ? c[b].nextInterval : b
7781    };
7782    d.dayNames = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");
7783    d.shortDayNames = "Sun Mon Tue Wed Thu Fri Sat".split(" ");
7784    d.monthNames = "January February March April May June July August September October November December".split(" ");
7785    d.shortMonthNames = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");
7786    d.getWeekNumber = function(a) {
7787        a = new Date(a);
7788        a.setHours(0, 0, 0);
7789        a.setDate(a.getDate() + 4 - (a.getDay() || 7));
7790        var b = new Date(a.getFullYear(), 0, 1);
7791        return Math.ceil(((a - b) / 864E5 + 1) / 7)
7792    };
7793    d.stringToDate = function(a, b) {
7794        var c = {},
7795            e = [{
7796                pattern: "YYYY",
7797                period: "year"
7798            }, {
7799                pattern: "YY",
7800                period: "year"
7801            }, {
7802                pattern: "MM",
7803                period: "month"
7804            }, {
7805                pattern: "M",
7806                period: "month"
7807            }, {
7808                pattern: "DD",
7809                period: "date"
7810            }, {
7811                pattern: "D",
7812                period: "date"
7813            }, {
7814                pattern: "JJ",
7815                period: "hours"
7816            }, {
7817                pattern: "J",
7818                period: "hours"
7819            }, {
7820                pattern: "HH",
7821                period: "hours"
7822            }, {
7823                pattern: "H",
7824                period: "hours"
7825            }, {
7826                pattern: "KK",
7827                period: "hours"
7828            }, {
7829                pattern: "K",
7830                period: "hours"
7831            }, {
7832                pattern: "LL",
7833                period: "hours"
7834            }, {
7835                pattern: "L",
7836                period: "hours"
7837            }, {
7838                pattern: "NN",
7839                period: "minutes"
7840            }, {
7841                pattern: "N",
7842                period: "minutes"
7843            }, {
7844                pattern: "SS",
7845                period: "seconds"
7846            }, {
7847                pattern: "S",
7848                period: "seconds"
7849            }, {
7850                pattern: "QQQ",
7851                period: "milliseconds"
7852            }, {
7853                pattern: "QQ",
7854                period: "milliseconds"
7855            }, {
7856                pattern: "Q",
7857                period: "milliseconds"
7858            }],
7859            g = !0,
7860            f = b.indexOf("AA"); - 1 != f && (a.substr(f, 2), "pm" == a.toLowerCase && (g = !1));
7861        var f = b,
7862            h, k, l;
7863        for (l = 0; l < e.length; l++) k = e[l].period, c[k] = 0, "date" == k && (c[k] = 1);
7864        for (l = 0; l < e.length; l++)
7865            if (h = e[l].pattern, k = e[l].period, -1 != b.indexOf(h)) {
7866                var m = d.getFromDateString(h, a, f);
7867                b = b.replace(h, "");
7868                if ("KK" == h || "K" == h || "LL" == h || "L" == h) g || (m += 12);
7869                c[k] = m
7870            }
7871        d.useUTC ? (e = new Date, e.setUTCFullYear(c.year, c.month, c.date), e.setUTCHours(c.hours, c.minutes, c.seconds, c.milliseconds)) : e = new Date(c.year, c.month, c.date, c.hours, c.minutes, c.seconds, c.milliseconds);
7872        return e
7873    };
7874    d.getFromDateString = function(a, b, c) {
7875        if (void 0 !== b) return c = c.indexOf(a), b = String(b), b = b.substr(c, a.length), "0" == b.charAt(0) && (b = b.substr(1, b.length - 1)), b = Number(b), isNaN(b) && (b = 0), -1 != a.indexOf("M") && b--, b
7876    };
7877    d.formatDate = function(a, b, c) {
7878        c || (c = d);
7879        var e, g, f, h, k, l, m, n, q = d.getWeekNumber(a);
7880        d.useUTC ? (e = a.getUTCFullYear(), g = a.getUTCMonth(), f = a.getUTCDate(), h = a.getUTCDay(), k = a.getUTCHours(), l = a.getUTCMinutes(), m = a.getUTCSeconds(), n = a.getUTCMilliseconds()) : (e = a.getFullYear(), g = a.getMonth(), f = a.getDate(), h = a.getDay(), k = a.getHours(), l = a.getMinutes(), m = a.getSeconds(), n = a.getMilliseconds());
7881        var p = String(e).substr(2, 2),
7882            t = "0" + h;
7883        b = b.replace(/W/g, q);
7884        q = k;
7885        24 == q && (q = 0);
7886        var r = q;
7887        10 > r && (r = "0" + r);
7888        b = b.replace(/JJ/g, r);
7889        b = b.replace(/J/g, q);
7890        r = k;
7891        0 === r && (r = 24, -1 != b.indexOf("H") && (f--, 0 === f && (e = new Date(a), e.setDate(e.getDate() - 1), g = e.getMonth(), f = e.getDate(), e = e.getFullYear())));
7892        a = g + 1;
7893        9 > g && (a = "0" + a);
7894        q = f;
7895        10 > f && (q = "0" + f);
7896        var w = r;
7897        10 > w && (w = "0" + w);
7898        b = b.replace(/HH/g, w);
7899        b = b.replace(/H/g, r);
7900        r = k;
7901        11 < r && (r -= 12);
7902        w = r;
7903        10 > w && (w = "0" + w);
7904        b = b.replace(/KK/g, w);
7905        b = b.replace(/K/g, r);
7906        r = k;
7907        0 === r && (r = 12);
7908        12 < r && (r -= 12);
7909        w = r;
7910        10 > w && (w = "0" + w);
7911        b = b.replace(/LL/g, w);
7912        b = b.replace(/L/g, r);
7913        r = l;
7914        10 > r && (r = "0" + r);
7915        b = b.replace(/NN/g, r);
7916        b = b.replace(/N/g, l);
7917        l = m;
7918        10 > l && (l = "0" + l);
7919        b = b.replace(/SS/g, l);
7920        b = b.replace(/S/g, m);
7921        m = n;
7922        10 > m ? m = "00" + m : 100 > m && (m = "0" + m);
7923        l = n;
7924        10 > l && (l = "00" + l);
7925        b = b.replace(/A/g, "@A@");
7926        b = b.replace(/QQQ/g, m);
7927        b = b.replace(/QQ/g, l);
7928        b = b.replace(/Q/g, n);
7929        b = b.replace(/YYYY/g, "@IIII@");
7930        b = b.replace(/YY/g, "@II@");
7931        b = b.replace(/MMMM/g, "@XXXX@");
7932        b = b.replace(/MMM/g, "@XXX@");
7933        b = b.replace(/MM/g, "@XX@");
7934        b = b.replace(/M/g, "@X@");
7935        b = b.replace(/DD/g, "@RR@");
7936        b = b.replace(/D/g, "@R@");
7937        b = b.replace(/EEEE/g, "@PPPP@");
7938        b = b.replace(/EEE/g, "@PPP@");
7939        b = b.replace(/EE/g, "@PP@");
7940        b = b.replace(/E/g, "@P@");
7941        b = b.replace(/@IIII@/g, e);
7942        b = b.replace(/@II@/g, p);
7943        b = b.replace(/@XXXX@/g, c.monthNames[g]);
7944        b = b.replace(/@XXX@/g, c.shortMonthNames[g]);
7945        b = b.replace(/@XX@/g, a);
7946        b = b.replace(/@X@/g, g + 1);
7947        b = b.replace(/@RR@/g, q);
7948        b = b.replace(/@R@/g, f);
7949        b = b.replace(/@PPPP@/g, c.dayNames[h]);
7950        b = b.replace(/@PPP@/g, c.shortDayNames[h]);
7951        b = b.replace(/@PP@/g, t);
7952        b = b.replace(/@P@/g, h);
7953        return b = 12 > k ? b.replace(/@A@/g, c.amString) : b.replace(/@A@/g, c.pmString)
7954    };
7955    d.changeDate = function(a, b, c, e, g) {
7956        if (d.useUTC) return d.changeUTCDate(a, b, c, e, g);
7957        var f = -1;
7958        void 0 === e && (e = !0);
7959        void 0 === g && (g = !1);
7960        !0 === e && (f = 1);
7961        switch (b) {
7962            case "YYYY":
7963                a.setFullYear(a.getFullYear() + c * f);
7964                e || g || a.setDate(a.getDate() + 1);
7965                break;
7966            case "MM":
7967                b = a.getMonth();
7968                var h = a.getFullYear();
7969                a.setMonth(a.getMonth() + c * f);
7970                h == a.getFullYear() && a.getMonth() > b + c * f && a.setDate(a.getDate() - 1);
7971                e || g || a.setDate(a.getDate() + 1);
7972                break;
7973            case "DD":
7974                a.setDate(a.getDate() + c * f);
7975                break;
7976            case "WW":
7977                a.setDate(a.getDate() + c * f * 7);
7978                break;
7979            case "hh":
7980                a.setHours(a.getHours() +
7981                    c * f);
7982                break;
7983            case "mm":
7984                a.setMinutes(a.getMinutes() + c * f);
7985                break;
7986            case "ss":
7987                a.setSeconds(a.getSeconds() + c * f);
7988                break;
7989            case "fff":
7990                a.setMilliseconds(a.getMilliseconds() + c * f)
7991        }
7992        return a
7993    };
7994    d.changeUTCDate = function(a, b, c, d, g) {
7995        var f = -1;
7996        void 0 === d && (d = !0);
7997        void 0 === g && (g = !1);
7998        !0 === d && (f = 1);
7999        switch (b) {
8000            case "YYYY":
8001                a.setUTCFullYear(a.getUTCFullYear() + c * f);
8002                d || g || a.setUTCDate(a.getUTCDate() + 1);
8003                break;
8004            case "MM":
8005                b = a.getUTCMonth();
8006                a.setUTCMonth(a.getUTCMonth() + c * f);
8007                a.getUTCMonth() > b + c * f && a.setUTCDate(a.getUTCDate() - 1);
8008                d || g || a.setUTCDate(a.getUTCDate() +
8009                    1);
8010                break;
8011            case "DD":
8012                a.setUTCDate(a.getUTCDate() + c * f);
8013                break;
8014            case "WW":
8015                a.setUTCDate(a.getUTCDate() + c * f * 7);
8016                break;
8017            case "hh":
8018                a.setUTCHours(a.getUTCHours() + c * f);
8019                break;
8020            case "mm":
8021                a.setUTCMinutes(a.getUTCMinutes() + c * f);
8022                break;
8023            case "ss":
8024                a.setUTCSeconds(a.getUTCSeconds() + c * f);
8025                break;
8026            case "fff":
8027                a.setUTCMilliseconds(a.getUTCMilliseconds() + c * f)
8028        }
8029        return a
8030    }
8031})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.