http://git-wip-us.apache.org/repos/asf/spark/blob/7fe0f3f2/core/src/main/resources/org/apache/spark/ui/static/vis.min.js
----------------------------------------------------------------------
diff --git a/core/src/main/resources/org/apache/spark/ui/static/vis.min.js 
b/core/src/main/resources/org/apache/spark/ui/static/vis.min.js
new file mode 100644
index 0000000..4af2c81
--- /dev/null
+++ b/core/src/main/resources/org/apache/spark/ui/static/vis.min.js
@@ -0,0 +1,39 @@
+/**
+ * vis.js
+ * https://github.com/almende/vis
+ *
+ * A dynamic, browser-based visualization library.
+ *
+ * @version 3.9.0
+ * @date    2015-01-16
+ *
+ * @license
+ * Copyright (C) 2011-2014 Almende B.V, http://almende.com
+ *
+ * Vis.js is dual licensed under both
+ *
+ * * The Apache 2.0 License
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * and
+ *
+ * * The MIT License
+ *   http://opensource.org/licenses/MIT
+ *
+ * Vis.js may be distributed under either license.
+ */
+"use strict";!function(t,e){"object"==typeof exports&&"object"==typeof 
module?module.exports=e():"function"==typeof 
define&&define.amd?define(e):"object"==typeof 
exports?exports.vis=e():t.vis=e()}(this,function(){return function(t){function 
e(s){if(i[s])return i[s].exports;var o=i[s]={exports:{},id:s,loaded:!1};return 
t[s].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return 
e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){e.util=i(1),e.DOMutil=i(2),e.DataSet=i(3),e.DataView=i(4),e.Queue=i(5),e.Graph3d=i(6),e.graph3d={Camera:i(7),Filter:i(8),Point2d:i(9),Point3d:i(10),Slider:i(11),StepNumber:i(12)},e.Timeline=i(13),e.Graph2d=i(14),e.timeline={DateUtil:i(15),DataStep:i(16),Range:i(17),stack:i(18),TimeStep:i(19),components:{items:{Item:i(31),BackgroundItem:i(32),BoxItem:i(33),PointItem:i(34),RangeItem:i(35)},Component:i(20),CurrentTime:i(21),CustomTime:i(22),DataAxis:i(23),GraphGroup:i(24),Group:i(25),BackgroundGroup:i(26),ItemSet:i(27),Legend:i(28),LineGraph:i(29),TimeAxis:i(
 
30)}},e.Network=i(36),e.network={Edge:i(37),Groups:i(38),Images:i(39),Node:i(40),Popup:i(41),dotparser:i(42),gephiParser:i(43)},e.Graph=function(){throw
 new Error("Graph is renamed to Network. Please create a graph as new 
vis.Network(...)")},e.moment=i(44),e.hammer=i(45),e.Hammer=i(45)},function(t,e,i){var
 s=i(44);e.isNumber=function(t){return t instanceof Number||"number"==typeof 
t},e.isString=function(t){return t instanceof String||"string"==typeof 
t},e.isDate=function(t){if(t instanceof Date)return!0;if(e.isString(t)){var 
i=o.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.isDataTable=function(t){return"undefined"!=typeof
 google&&google.visualization&&google.visualization.DataTable&&t instanceof 
google.visualization.DataTable},e.randomUUID=function(){var t=function(){return 
Math.floor(65536*Math.random()).toString(16)};return 
t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},e.extend=function(t){for(var 
e=1,i=arguments.length;i>e;e++){var s=arguments[e];for(var
  o in s)s.hasOwnProperty(o)&&(t[o]=s[o])}return 
t},e.selectiveExtend=function(t,e){if(!Array.isArray(t))throw new Error("Array 
with property names expected as first argument");for(var 
i=2;i<arguments.length;i++)for(var s=arguments[i],o=0;o<t.length;o++){var 
n=t[o];s.hasOwnProperty(n)&&(e[n]=s[n])}return 
e},e.selectiveDeepExtend=function(t,i,s){if(Array.isArray(s))throw new 
TypeError("Arrays are not supported by deepExtend");for(var 
o=2;o<arguments.length;o++)for(var n=arguments[o],r=0;r<t.length;r++){var 
a=t[r];if(n.hasOwnProperty(a))if(s[a]&&s[a].constructor===Object)void 
0===i[a]&&(i[a]={}),i[a].constructor===Object?e.deepExtend(i[a],s[a]):i[a]=s[a];else{if(Array.isArray(s[a]))throw
 new TypeError("Arrays are not supported by deepExtend");i[a]=s[a]}}return 
i},e.selectiveNotDeepExtend=function(t,i,s){if(Array.isArray(s))throw new 
TypeError("Arrays are not supported by deepExtend");for(var o in 
s)if(s.hasOwnProperty(o)&&-1==t.indexOf(o))if(s[o]&&s[o].constructor===Object)void
 0===i[o
 
]&&(i[o]={}),i[o].constructor===Object?e.deepExtend(i[o],s[o]):i[o]=s[o];else{if(Array.isArray(s[o]))throw
 new TypeError("Arrays are not supported by deepExtend");i[o]=s[o]}return 
i},e.deepExtend=function(t,i){if(Array.isArray(i))throw new TypeError("Arrays 
are not supported by deepExtend");for(var s in 
i)if(i.hasOwnProperty(s))if(i[s]&&i[s].constructor===Object)void 
0===t[s]&&(t[s]={}),t[s].constructor===Object?e.deepExtend(t[s],i[s]):t[s]=i[s];else{if(Array.isArray(i[s]))throw
 new TypeError("Arrays are not supported by deepExtend");t[s]=i[s]}return 
t},e.equalArray=function(t,e){if(t.length!=e.length)return!1;for(var 
i=0,s=t.length;s>i;i++)if(t[i]!=e[i])return!1;return!0},e.convert=function(t,i){var
 n;if(void 0===t)return void 0;if(null===t)return null;if(!i)return 
t;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a 
string");switch(i){case"boolean":case"Boolean":return 
Boolean(t);case"number":case"Number":return 
Number(t.valueOf());case"string":case"Stri
 ng":return String(t);case"Date":if(e.isNumber(t))return new Date(t);if(t 
instanceof Date)return new Date(t.valueOf());if(s.isMoment(t))return new 
Date(t.valueOf());if(e.isString(t))return n=o.exec(t),n?new 
Date(Number(n[1])):s(t).toDate();throw new Error("Cannot convert object of type 
"+e.getType(t)+" to type Date");case"Moment":if(e.isNumber(t))return s(t);if(t 
instanceof Date)return s(t.valueOf());if(s.isMoment(t))return 
s(t);if(e.isString(t))return n=o.exec(t),s(n?Number(n[1]):t);throw new 
Error("Cannot convert object of type "+e.getType(t)+" to type 
Date");case"ISODate":if(e.isNumber(t))return new Date(t);if(t instanceof 
Date)return t.toISOString();if(s.isMoment(t))return 
t.toDate().toISOString();if(e.isString(t))return n=o.exec(t),n?new 
Date(Number(n[1])).toISOString():new Date(t).toISOString();throw new 
Error("Cannot convert object of type "+e.getType(t)+" to type 
ISODate");case"ASPDate":if(e.isNumber(t))return"/Date("+t+")/";if(t instanceof 
Date)return"/Date("+t.valueOf()+")/
 ";if(e.isString(t)){n=o.exec(t);var r;return r=n?new 
Date(Number(n[1])).valueOf():new Date(t).valueOf(),"/Date("+r+")/"}throw new 
Error("Cannot convert object of type "+e.getType(t)+" to type 
ASPDate");default:throw new Error('Unknown type "'+i+'"')}};var 
o=/^\/?Date\((\-?\d+)/i;e.getType=function(t){var e=typeof 
t;return"object"==e?null==t?"null":t instanceof Boolean?"Boolean":t instanceof 
Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t 
instanceof 
Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":e},e.getAbsoluteLeft=function(t){return
 t.getBoundingClientRect().left},e.getAbsoluteTop=function(t){return 
t.getBoundingClientRect().top},e.addClassName=function(t,e){var 
i=t.className.split(" ");-1==i.indexOf(e)&&(i.push(e),t.className=i.join(" 
"))},e.removeClassName=function(t,e){var i=t.className.split(" 
"),s=i.indexOf(e);-1!=s&&(i.splice(s,1),t.className=i.join(" 
"))},e.forEach=function(t,e){var i,s;if(Array.isArray(t))for(i=
 0,s=t.length;s>i;i++)e(t[i],i,t);else for(i in 
t)t.hasOwnProperty(i)&&e(t[i],i,t)},e.toArray=function(t){var e=[];for(var i in 
t)t.hasOwnProperty(i)&&e.push(t[i]);return 
e},e.updateProperty=function(t,e,i){return 
t[e]!==i?(t[e]=i,!0):!1},e.addEventListener=function(t,e,i,s){t.addEventListener?(void
 
0===s&&(s=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,s)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,s){t.removeEventListener?(void
 
0===s&&(s=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,s)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var
 e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 
0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.option={},e.option.asBoolean=function(t,e){return"function"==t
 ypeof 
t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof
 
t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof
 
t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof
 
t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof
 t&&(t=t()),t||e||null},e.hexToRGB=function(t){var 
e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,s){return 
e+e+i+i+s+s});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return 
i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var
 i;if(e.isString(t)){if(e.isValidRGB(t)){var 
s=t.substr(4).substr(0,t.length-5).split(",");t=e.RGBToHex(s[0],s[1],s[2])}if(e.isValidHex(t)){var
 o=e.hexToHSV(t),n={h:o.h,s:.45*o.s,v:Math.min(1,1.05*o.
 
v)},r={h:o.h,s:Math.min(1,1.25*o.v),v:.6*o.v},a=e.HSVToHex(r.h,r.h,r.v),h=e.HSVToHex(n.h,n.s,n.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else
 
i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else
 
i={},i.background=t.background||"white",i.border=t.border||i.background,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||i.background,i.highlight.border=t.highlight&&t.highlight.border||i.border),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||i.background,i.hover.border=t.hover&&t.hover.border||i.border);return
 i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var 
s=Math.min(t,Math.min(e,i)),o=Math.max(t,Math.max(e,i));if(s==o)return{h:0,s:0,v:s};var
 n=t==s?e-i:i==s?t-e:i-t,r=t==s?3:i==s?1:5,a=60*(r-n/(o-s))/360,h=(o-s
 )/o,d=o;return{h:a,s:h,v:d}};var n={split:function(t){var e={};return 
t.split(";").forEach(function(t){if(""!=t.trim()){var 
i=t.split(":"),s=i[0].trim(),o=i[1].trim();e[s]=o}}),e},join:function(t){return 
Object.keys(t).map(function(e){return e+": "+t[e]}).join("; 
")}};e.addCssText=function(t,i){var 
s=n.split(t.style.cssText),o=n.split(i),r=e.extend(s,o);t.style.cssText=n.join(r)},e.removeCssText=function(t,e){var
 i=n.split(t.style.cssText),s=n.split(e);for(var o in 
s)s.hasOwnProperty(o)&&delete 
i[o];t.style.cssText=n.join(i)},e.HSVToRGB=function(t,e,i){var 
s,o,n,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case
 0:s=i,o=l,n=h;break;case 1:s=d,o=i,n=h;break;case 2:s=h,o=i,n=l;break;case 
3:s=h,o=d,n=i;break;case 4:s=l,o=h,n=i;break;case 
5:s=i,o=h,n=d}return{r:Math.floor(255*s),g:Math.floor(255*o),b:Math.floor(255*n)}},e.HSVToHex=function(t,i,s){var
 o=e.HSVToRGB(t,i,s);return e.RGBToHex(o.r,o.g,o.b)},e.hexToHSV=function(t){var 
i=e.hexToRGB(t);return e.RGBT
 oHSV(i.r,i.g,i.b)},e.isValidHex=function(t){var 
e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return 
e},e.isValidRGB=function(t){t=t.replace(" ","");var 
e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return 
e},e.selectiveBridgeObject=function(t,i){if("object"==typeof i){for(var 
s=Object.create(i),o=0;o<t.length;o++)i.hasOwnProperty(t[o])&&"object"==typeof 
i[t[o]]&&(s[t[o]]=e.bridgeObject(i[t[o]]));return s}return 
null},e.bridgeObject=function(t){if("object"==typeof t){var 
i=Object.create(t);for(var s in t)t.hasOwnProperty(s)&&"object"==typeof 
t[s]&&(i[s]=e.bridgeObject(t[s]));return i}return 
null},e.mergeOptions=function(t,e,i){if(void 0!==e[i])if("boolean"==typeof 
e[i])t[i].enabled=e[i];else{t[i].enabled=!0;for(var s in 
e[i])e[i].hasOwnProperty(s)&&(t[i][s]=e[i][s])}},e.binarySearchCustom=function(t,e,i,s){for(var
 o=1e4,n=0,r=0,a=t.length-1;a>=r&&o>n;){var h=Math.floor((r+a)/2),d=t[h],l=void 
0===s?d[i]:d[i][s],c=e(l);if(0==c)return 
h;-1==c?r=h+1:a=h-1,n++}return-1},e.binarySear
 chValue=function(t,e,i,s){for(var 
o,n,r,a,h=1e4,d=0,l=0,c=t.length-1;c>=l&&h>d;){if(a=Math.floor(.5*(c+l)),o=t[Math.max(0,a-1)][i],n=t[a][i],r=t[Math.min(t.length-1,a+1)][i],n==e)return
 
a;if(e>o&&n>e)return"before"==s?Math.max(0,a-1):a;if(e>n&&r>e)return"before"==s?a:Math.min(t.length-1,a+1);e>n?l=a+1:c=a-1,d++}return-1},e.easeInOutQuad=function(t,e,i,s){var
 o=i-e;return 
t/=s/2,1>t?o/2*t*t+e:(t--,-o/2*(t*(t-2)-1)+e)},e.easingFunctions={linear:function(t){return
 t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return 
t*(2-t)},easeInOutQuad:function(t){return.5>t?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return
 
t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return
 t*t*t*t},easeOutQuart:function(t){return 1- 
--t*t*t*t},easeInOutQuart:function(t){return.5>t?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return
 t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInO
 
utQuint:function(t){return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t}}},function(t,e){e.prepareElements=function(t){for(var
 e in 
t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var
 e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var 
i=0;i<t[e].redundant.length;i++)t[e].redundant[i].parentNode.removeChild(t[e].redundant[i]);t[e].redundant=[]}},e.getSVGElement=function(t,e,i){var
 s;return 
e.hasOwnProperty(t)?e[t].redundant.length>0?(s=e[t].redundant[0],e[t].redundant.shift()):(s=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(s)):(s=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(s)),e[t].used.push(s),s},e.getDOMElement=function(t,e,i,s){var
 o;return 
e.hasOwnProperty(t)?e[t].redundant.length>0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElement(t),void
 
0!==s?i.insertBefore(o,s):i.appendChild(o)):(o=document.createElement(t),e[t]={used:[],redundant:[
 ]},void 
0!==s?i.insertBefore(o,s):i.appendChild(o)),e[t].used.push(o),o},e.drawPoint=function(t,i,s,o,n){var
 
r;return"circle"==s.options.drawPoints.style?(r=e.getSVGElement("circle",o,n),r.setAttributeNS(null,"cx",t),r.setAttributeNS(null,"cy",i),r.setAttributeNS(null,"r",.5*s.options.drawPoints.size)):(r=e.getSVGElement("rect",o,n),r.setAttributeNS(null,"x",t-.5*s.options.drawPoints.size),r.setAttributeNS(null,"y",i-.5*s.options.drawPoints.size),r.setAttributeNS(null,"width",s.options.drawPoints.size),r.setAttributeNS(null,"height",s.options.drawPoints.size)),void
 
0!==s.options.drawPoints.styles&&r.setAttributeNS(null,"style",s.group.options.drawPoints.styles),r.setAttributeNS(null,"class",s.className+"
 point"),r},e.drawBar=function(t,i,s,o,n,r,a){if(0!=o){0>o&&(o*=-1,i-=o);var 
h=e.getSVGElement("rect",r,a);h.setAttributeNS(null,"x",t-.5*s),h.setAttributeNS(null,"y",i),h.setAttributeNS(null,"width",s),h.setAttributeNS(null,"height",o),h.setAttributeNS(null,"class",n)}}},function(t,
 e,i){function 
s(t,e){if(!t||Array.isArray(t)||o.isDataTable(t)||(e=t,t=null),this._options=e||{},this._data={},this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var
 i in this._options.type)if(this._options.type.hasOwnProperty(i)){var 
s=this._options.type[i];this._type[i]="Date"==s||"ISODate"==s||"ASPDate"==s?"Date":s}if(this._options.convert)throw
 new Error('Option "convert" is deprecated. Use "type" 
instead.');this._subscribers={},t&&this.add(t),this.setOptions(e)}var 
o=i(1),n=i(5);s.prototype.setOptions=function(t){t&&void 
0!==t.queue&&(t.queue===!1?this._queue&&(this._queue.destroy(),delete 
this._queue):(this._queue||(this._queue=n.extend(this,{replace:["add","update","remove"]})),"object"==typeof
 t.queue&&this._queue.setOptions(t.queue)))},s.prototype.on=function(t,e){var 
i=this._subscribers[t];i||(i=[],this._subscribers[t]=i),i.push({callback:e})},s.prototype.subscribe=s.prototype.on,s.prototype.off=function(t,e){var
 i=this._subscribers[t];i&&(this.
 _subscribers[t]=i.filter(function(t){return 
t.callback!=e}))},s.prototype.unsubscribe=s.prototype.off,s.prototype._trigger=function(t,e,i){if("*"==t)throw
 new Error("Cannot trigger event *");var s=[];t in 
this._subscribers&&(s=s.concat(this._subscribers[t])),"*"in 
this._subscribers&&(s=s.concat(this._subscribers["*"]));for(var 
o=0;o<s.length;o++){var 
n=s[o];n.callback&&n.callback(t,e,i||null)}},s.prototype.add=function(t,e){var 
i,s=[],n=this;if(Array.isArray(t))for(var 
r=0,a=t.length;a>r;r++)i=n._addItem(t[r]),s.push(i);else 
if(o.isDataTable(t))for(var 
h=this._getColumnNames(t),d=0,l=t.getNumberOfRows();l>d;d++){for(var 
c={},p=0,u=h.length;u>p;p++){var 
m=h[p];c[m]=t.getValue(d,p)}i=n._addItem(c),s.push(i)}else{if(!(t instanceof 
Object))throw new Error("Unknown dataType");i=n._addItem(t),s.push(i)}return 
s.length&&this._trigger("add",{items:s},e),s},s.prototype.update=function(t,e){var
 i=[],s=[],n=[],r=this,a=r._fieldId,h=function(t){var 
e=t[a];r._data[e]?(e=r._updateItem(t),s.push(e
 ),n.push(t)):(e=r._addItem(t),i.push(e))};if(Array.isArray(t))for(var 
d=0,l=t.length;l>d;d++)h(t[d]);else if(o.isDataTable(t))for(var 
c=this._getColumnNames(t),p=0,u=t.getNumberOfRows();u>p;p++){for(var 
m={},f=0,g=c.length;g>f;f++){var v=c[f];m[v]=t.getValue(p,f)}h(m)}else{if(!(t 
instanceof Object))throw new Error("Unknown dataType");h(t)}return 
i.length&&this._trigger("add",{items:i},e),s.length&&this._trigger("update",{items:s,data:n},e),i.concat(s)},s.prototype.get=function(){var
 
t,e,i,s,n=this,r=o.getType(arguments[0]);"String"==r||"Number"==r?(t=arguments[0],i=arguments[1],s=arguments[2]):"Array"==r?(e=arguments[0],i=arguments[1],s=arguments[2]):(i=arguments[0],s=arguments[1]);var
 a;if(i&&i.returnType){var 
h=["DataTable","Array","Object"];if(a=-1==h.indexOf(i.returnType)?"Array":i.returnType,s&&a!=o.getType(s))throw
 new Error('Type of parameter "data" ('+o.getType(s)+") does not correspond 
with specified options.type 
("+i.type+")");if("DataTable"==a&&!o.isDataTable(s))throw new
  Error('Parameter "data" must be a DataTable when options.type is 
"DataTable"')}else a=s&&"DataTable"==o.getType(s)?"DataTable":"Array";var 
d,l,c,p,u=i&&i.type||this._options.type,m=i&&i.filter,f=[];if(void 
0!=t)d=n._getItem(t,u),m&&!m(d)&&(d=null);else if(void 
0!=e)for(c=0,p=e.length;p>c;c++)d=n._getItem(e[c],u),(!m||m(d))&&f.push(d);else 
for(l in 
this._data)this._data.hasOwnProperty(l)&&(d=n._getItem(l,u),(!m||m(d))&&f.push(d));if(i&&i.order&&void
 0==t&&this._sort(f,i.order),i&&i.fields){var g=i.fields;if(void 
0!=t)d=this._filterFields(d,g);else 
for(c=0,p=f.length;p>c;c++)f[c]=this._filterFields(f[c],g)}if("DataTable"==a){var
 v=this._getColumnNames(s);if(void 0!=t)n._appendRow(s,v,d);else 
for(c=0;c<f.length;c++)n._appendRow(s,v,f[c]);return s}if("Object"==a){var 
y={};for(c=0;c<f.length;c++)y[f[c].id]=f[c];return y}if(void 0!=t)return 
d;if(s){for(c=0,p=f.length;p>c;c++)s.push(f[c]);return s}return 
f},s.prototype.getIds=function(t){var 
e,i,s,o,n,r=this._data,a=t&&t.filter,h=t&&t.ord
 er,d=t&&t.type||this._options.type,l=[];if(a)if(h){n=[];for(s in 
r)r.hasOwnProperty(s)&&(o=this._getItem(s,d),a(o)&&n.push(o));for(this._sort(n,h),e=0,i=n.length;i>e;e++)l[e]=n[e][this._fieldId]}else
 for(s in 
r)r.hasOwnProperty(s)&&(o=this._getItem(s,d),a(o)&&l.push(o[this._fieldId]));else
 if(h){n=[];for(s in 
r)r.hasOwnProperty(s)&&n.push(r[s]);for(this._sort(n,h),e=0,i=n.length;i>e;e++)l[e]=n[e][this._fieldId]}else
 for(s in r)r.hasOwnProperty(s)&&(o=r[s],l.push(o[this._fieldId]));return 
l},s.prototype.getDataSet=function(){return 
this},s.prototype.forEach=function(t,e){var 
i,s,o=e&&e.filter,n=e&&e.type||this._options.type,r=this._data;if(e&&e.order)for(var
 a=this.get(e),h=0,d=a.length;d>h;h++)i=a[h],s=i[this._fieldId],t(i,s);else 
for(s in 
r)r.hasOwnProperty(s)&&(i=this._getItem(s,n),(!o||o(i))&&t(i,s))},s.prototype.map=function(t,e){var
 i,s=e&&e.filter,o=e&&e.type||this._options.type,n=[],r=this._data;for(var a in 
r)r.hasOwnProperty(a)&&(i=this._getItem(a,o),(!s||s(i))&&n.push(t(i,
 a)));return 
e&&e.order&&this._sort(n,e.order),n},s.prototype._filterFields=function(t,e){var
 i={};for(var s in t)t.hasOwnProperty(s)&&-1!=e.indexOf(s)&&(i[s]=t[s]);return 
i},s.prototype._sort=function(t,e){if(o.isString(e)){var 
i=e;t.sort(function(t,e){var s=t[i],o=e[i];return 
s>o?1:o>s?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must 
be a function or a string");t.sort(e)}},s.prototype.remove=function(t,e){var 
i,s,o,n=[];if(Array.isArray(t))for(i=0,s=t.length;s>i;i++)o=this._remove(t[i]),null!=o&&n.push(o);else
 o=this._remove(t),null!=o&&n.push(o);return 
n.length&&this._trigger("remove",{items:n},e),n},s.prototype._remove=function(t){if(o.isNumber(t)||o.isString(t)){if(this._data[t])return
 delete this._data[t],t}else if(t instanceof Object){var 
e=t[this._fieldId];if(e&&this._data[e])return delete this._data[e],e}return 
null},s.prototype.clear=function(t){var e=Object.keys(this._data);return 
this._data={},this._trigger("remove",{items:e},t),e},s.prototype.max=funct
 ion(t){var e=this._data,i=null,s=null;for(var o in 
e)if(e.hasOwnProperty(o)){var 
n=e[o],r=n[t];null!=r&&(!i||r>s)&&(i=n,s=r)}return 
i},s.prototype.min=function(t){var e=this._data,i=null,s=null;for(var o in 
e)if(e.hasOwnProperty(o)){var 
n=e[o],r=n[t];null!=r&&(!i||s>r)&&(i=n,s=r)}return 
i},s.prototype.distinct=function(t){var 
e,i=this._data,s=[],n=this._options.type&&this._options.type[t]||null,r=0;for(var
 a in i)if(i.hasOwnProperty(a)){var 
h=i[a],d=h[t],l=!1;for(e=0;r>e;e++)if(s[e]==d){l=!0;break}l||void 
0===d||(s[r]=d,r++)}if(n)for(e=0;e<s.length;e++)s[e]=o.convert(s[e],n);return 
s},s.prototype._addItem=function(t){var e=t[this._fieldId];if(void 
0!=e){if(this._data[e])throw new Error("Cannot add item: item with id "+e+" 
already exists")}else e=o.randomUUID(),t[this._fieldId]=e;var i={};for(var s in 
t)if(t.hasOwnProperty(s)){var n=this._type[s];i[s]=o.convert(t[s],n)}return 
this._data[e]=i,e},s.prototype._getItem=function(t,e){var 
i,s,n=this._data[t];if(!n)return null;var r={};if(e
 )for(i in n)n.hasOwnProperty(i)&&(s=n[i],r[i]=o.convert(s,e[i]));else for(i in 
n)n.hasOwnProperty(i)&&(s=n[i],r[i]=s);return 
r},s.prototype._updateItem=function(t){var e=t[this._fieldId];if(void 
0==e)throw new Error("Cannot update item: item has no id (item: 
"+JSON.stringify(t)+")");var i=this._data[e];if(!i)throw new Error("Cannot 
update item: no item with id "+e+" found");for(var s in 
t)if(t.hasOwnProperty(s)){var n=this._type[s];i[s]=o.convert(t[s],n)}return 
e},s.prototype._getColumnNames=function(t){for(var 
e=[],i=0,s=t.getNumberOfColumns();s>i;i++)e[i]=t.getColumnId(i)||t.getColumnLabel(i);return
 e},s.prototype._appendRow=function(t,e,i){for(var 
s=t.addRow(),o=0,n=e.length;n>o;o++){var 
r=e[o];t.setValue(s,o,i[r])}},t.exports=s},function(t,e,i){function 
s(t,e){this._data=null,this._ids={},this._options=e||{},this._fieldId="id",this._subscribers={};var
 
i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var
 o=i(1),n=i(3);s.prototype.setData=function(t){
 var 
e,i,s;if(this._data){this._data.unsubscribe&&this._data.unsubscribe("*",this.listener),e=[];for(var
 o in 
this._ids)this._ids.hasOwnProperty(o)&&e.push(o);this._ids={},this._trigger("remove",{items:e})}if(this._data=t,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",e=this._data.getIds({filter:this._options&&this._options.filter}),i=0,s=e.length;s>i;i++)o=e[i],this._ids[o]=!0;this._trigger("add",{items:e}),this._data.on&&this._data.on("*",this.listener)}},s.prototype.get=function(){var
 
t,e,i,s=this,n=o.getType(arguments[0]);"String"==n||"Number"==n||"Array"==n?(t=arguments[0],e=arguments[1],i=arguments[2]):(e=arguments[0],i=arguments[1]);var
 
r=o.extend({},this._options,e);this._options.filter&&e&&e.filter&&(r.filter=function(t){return
 s._options.filter(t)&&e.filter(t)});var a=[];return void 
0!=t&&a.push(t),a.push(r),a.push(i),this._data&&this._data.get.apply(this._data,a)},s.prototype.getIds=function(t){var
 e;if
 (this._data){var i,s=this._options.filter;i=t&&t.filter?s?function(e){return 
s(e)&&t.filter(e)}:t.filter:s,e=this._data.getIds({filter:i,order:t&&t.order})}else
 e=[];return e},s.prototype.getDataSet=function(){for(var t=this;t instanceof 
s;)t=t._data;return t||null},s.prototype._onEvent=function(t,e,i){var 
s,o,n,r,a=e&&e.items,h=this._data,d=[],l=[],c=[];if(a&&h){switch(t){case"add":for(s=0,o=a.length;o>s;s++)n=a[s],r=this.get(n),r&&(this._ids[n]=!0,d.push(n));break;case"update":for(s=0,o=a.length;o>s;s++)n=a[s],r=this.get(n),r?this._ids[n]?l.push(n):(this._ids[n]=!0,d.push(n)):this._ids[n]&&(delete
 
this._ids[n],c.push(n));break;case"remove":for(s=0,o=a.length;o>s;s++)n=a[s],this._ids[n]&&(delete
 
this._ids[n],c.push(n))}d.length&&this._trigger("add",{items:d},i),l.length&&this._trigger("update",{items:l},i),c.length&&this._trigger("remove",{items:c},i)}},s.prototype.on=n.prototype.on,s.prototype.off=n.prototype.off,s.prototype._trigger=n.prototype._trigger,s.prototype.subscribe=s.pr
 
ototype.on,s.prototype.unsubscribe=s.prototype.off,t.exports=s},function(t){function
 
e(t){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(t)}e.prototype.setOptions=function(t){t&&"undefined"!=typeof
 t.delay&&(this.delay=t.delay),t&&"undefined"!=typeof 
t.max&&(this.max=t.max),this._flushIfNeeded()},e.extend=function(t,i){var s=new 
e(i);if(void 0!==t.flush)throw new Error("Target object already has a property 
flush");t.flush=function(){s.flush()};var o=[{name:"flush",original:void 
0}];if(i&&i.replace)for(var n=0;n<i.replace.length;n++){var 
r=i.replace[n];o.push({name:r,original:t[r]}),s.replace(t,r)}return 
s._extended={object:t,methods:o},s},e.prototype.destroy=function(){if(this.flush(),this._extended){for(var
 t=this._extended.object,e=this._extended.methods,i=0;i<e.length;i++){var 
s=e[i];s.original?t[s.name]=s.original:delete 
t[s.name]}this._extended=null}},e.prototype.replace=function(t,e){var 
i=this,s=t[e];if(!s)throw new Error("M
 ethod "+e+" undefined");t[e]=function(){for(var 
t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.queue({args:t,fn:s,context:this})}},e.prototype.queue=function(t){this._queue.push("function"==typeof
 
t?{fn:t}:t),this._flushIfNeeded()},e.prototype._flushIfNeeded=function(){if(this._queue.length>this.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof
 this.delay){var 
t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},e.prototype.flush=function(){for(;this._queue.length>0;){var
 
t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=e},function(t,e,i){function
 s(t,e,i){if(!(this instanceof s))throw new SyntaxError("Constructor must be 
called with the new 
operator");this.containerElement=t,this.width="400px",this.height="400px",this.margin=10,this.defaultXCenter="55%",this.defaultYCenter="50%",this.xLabel="x",this.yLabel="y",this.zLabel="z";var
 o=function(t){return t};this.xValueLabel=o,this.yValueLabel=o,this.zValueLab
 
el=o,this.filterLabel="time",this.legendLabel="value",this.style=s.STYLE.DOT,this.showPerspective=!0,this.showGrid=!0,this.keepAspectRatio=!0,this.showShadow=!1,this.showGrayBottom=!1,this.showTooltip=!1,this.verticalRatio=.5,this.animationInterval=1e3,this.animationPreload=!1,this.camera=new
 p,this.eye=new 
l(0,0,-1),this.dataTable=null,this.dataPoints=null,this.colX=void 
0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.colFilter=void 
0,this.xMin=0,this.xStep=void 0,this.xMax=1,this.yMin=0,this.yStep=void 
0,this.yMax=1,this.zMin=0,this.zStep=void 
0,this.zMax=1,this.valueMin=0,this.valueMax=1,this.xBarWidth=1,this.yBarWidth=1,this.colorAxis="#4D4D4D",this.colorGrid="#D3D3D3",this.colorDot="#7DC1FF",this.colorDotBorder="#3267D2",this.create(),this.setOptions(i),e&&this.setData(e)}function
 o(t){return"clientX"in 
t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function 
n(t){return"clientY"in 
t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}var r=i
 
(56),a=i(3),h=i(4),d=i(1),l=i(10),c=i(9),p=i(7),u=i(8),m=i(11),f=i(12);r(s.prototype),s.prototype._setScale=function(){this.scale=new
 
l(1/(this.xMax-this.xMin),1/(this.yMax-this.yMin),1/(this.zMax-this.zMin)),this.keepAspectRatio&&(this.scale.x<this.scale.y?this.scale.y=this.scale.x:this.scale.x=this.scale.y),this.scale.z*=this.verticalRatio,this.scale.value=1/(this.valueMax-this.valueMin);var
 
t=(this.xMax+this.xMin)/2*this.scale.x,e=(this.yMax+this.yMin)/2*this.scale.y,i=(this.zMax+this.zMin)/2*this.scale.z;this.camera.setArmLocation(t,e,i)},s.prototype._convert3Dto2D=function(t){var
 e=this._convertPointToTranslation(t);return 
this._convertTranslationToScreen(e)},s.prototype._convertPointToTranslation=function(t){var
 
e=t.x*this.scale.x,i=t.y*this.scale.y,s=t.z*this.scale.z,o=this.camera.getCameraLocation().x,n=this.camera.getCameraLocation().y,r=this.camera.getCameraLocation().z,a=Math.sin(this.camera.getCameraRotation().x),h=Math.cos(this.camera.getCameraRotation().x),d=Math.sin(t
 
his.camera.getCameraRotation().y),c=Math.cos(this.camera.getCameraRotation().y),p=Math.sin(this.camera.getCameraRotation().z),u=Math.cos(this.camera.getCameraRotation().z),m=c*(p*(i-n)+u*(e-o))-d*(s-r),f=a*(c*(s-r)+d*(p*(i-n)+u*(e-o)))+h*(u*(i-n)-p*(e-o)),g=h*(c*(s-r)+d*(p*(i-n)+u*(e-o)))-a*(u*(i-n)-p*(e-o));return
 new l(m,f,g)},s.prototype._convertTranslationToScreen=function(t){var 
e,i,s=this.eye.x,o=this.eye.y,n=this.eye.z,r=t.x,a=t.y,h=t.z;return 
this.showPerspective?(e=(r-s)*(n/h),i=(a-o)*(n/h)):(e=r*-(n/this.camera.getArmLength()),i=a*-(n/this.camera.getArmLength())),new
 
c(this.xcenter+e*this.frame.canvas.clientWidth,this.ycenter-i*this.frame.canvas.clientWidth)},s.prototype._setBackgroundColor=function(t){var
 e="white",i="gray",s=1;if("string"==typeof t)e=t,i="none",s=0;else 
if("object"==typeof t)void 0!==t.fill&&(e=t.fill),void 
0!==t.stroke&&(i=t.stroke),void 0!==t.strokeWidth&&(s=t.strokeWidth);else 
if(void 0!==t)throw"Unsupported type of backgroundColor";this.frame.style.b
 
ackgroundColor=e,this.frame.style.borderColor=i,this.frame.style.borderWidth=s+"px",this.frame.style.borderStyle="solid"},s.STYLE={BAR:0,BARCOLOR:1,BARSIZE:2,DOT:3,DOTLINE:4,DOTCOLOR:5,DOTSIZE:6,GRID:7,LINE:8,SURFACE:9},s.prototype._getStyleNumber=function(t){switch(t){case"dot":return
 s.STYLE.DOT;case"dot-line":return s.STYLE.DOTLINE;case"dot-color":return 
s.STYLE.DOTCOLOR;case"dot-size":return s.STYLE.DOTSIZE;case"line":return 
s.STYLE.LINE;case"grid":return s.STYLE.GRID;case"surface":return 
s.STYLE.SURFACE;case"bar":return s.STYLE.BAR;case"bar-color":return 
s.STYLE.BARCOLOR;case"bar-size":return 
s.STYLE.BARSIZE}return-1},s.prototype._determineColumnIndexes=function(t){if(this.style===s.STYLE.DOT||this.style===s.STYLE.DOTLINE||this.style===s.STYLE.LINE||this.style===s.STYLE.GRID||this.style===s.STYLE.SURFACE||this.style===s.STYLE.BAR)this.colX=0,this.colY=1,this.colZ=2,this.colValue=void
 
0,t.getNumberOfColumns()>3&&(this.colFilter=3);else{if(this.style!==s.STYLE.DOTCOLOR&&this.styl
 
e!==s.STYLE.DOTSIZE&&this.style!==s.STYLE.BARCOLOR&&this.style!==s.STYLE.BARSIZE)throw'Unknown
 style 
"'+this.style+'"';this.colX=0,this.colY=1,this.colZ=2,this.colValue=3,t.getNumberOfColumns()>4&&(this.colFilter=4)}},s.prototype.getNumberOfRows=function(t){return
 t.length},s.prototype.getNumberOfColumns=function(t){var e=0;for(var i in 
t[0])t[0].hasOwnProperty(i)&&e++;return 
e},s.prototype.getDistinctValues=function(t,e){for(var 
i=[],s=0;s<t.length;s++)-1==i.indexOf(t[s][e])&&i.push(t[s][e]);return 
i},s.prototype.getColumnRange=function(t,e){for(var 
i={min:t[0][e],max:t[0][e]},s=0;s<t.length;s++)i.min>t[s][e]&&(i.min=t[s][e]),i.max<t[s][e]&&(i.max=t[s][e]);return
 i},s.prototype._dataInitialize=function(t){var 
e=this;if(this.dataSet&&this.dataSet.off("*",this._onChange),void 
0!==t){Array.isArray(t)&&(t=new a(t));var i;if(!(t instanceof a||t instanceof 
h))throw new Error("Array, DataSet, or DataView 
expected");if(i=t.get(),0!=i.length){this.dataSet=t,this.dataTable=i,this._onChange=f
 
unction(){e.setData(e.dataSet)},this.dataSet.on("*",this._onChange),this.colX="x",this.colY="y",this.colZ="z",this.colValue="style",this.colFilter="filter",i[0].hasOwnProperty("filter")&&void
 0===this.dataFilter&&(this.dataFilter=new 
u(t,this.colFilter,this),this.dataFilter.setOnLoadCallback(function(){e.redraw()}));var
 
o=this.style==s.STYLE.BAR||this.style==s.STYLE.BARCOLOR||this.style==s.STYLE.BARSIZE;if(o){if(void
 0!==this.defaultXBarWidth)this.xBarWidth=this.defaultXBarWidth;else{var 
n=this.getDistinctValues(i,this.colX);this.xBarWidth=n[1]-n[0]||1}if(void 
0!==this.defaultYBarWidth)this.yBarWidth=this.defaultYBarWidth;else{var 
r=this.getDistinctValues(i,this.colY);this.yBarWidth=r[1]-r[0]||1}}var 
d=this.getColumnRange(i,this.colX);o&&(d.min-=this.xBarWidth/2,d.max+=this.xBarWidth/2),this.xMin=void
 0!==this.defaultXMin?this.defaultXMin:d.min,this.xMax=void 
0!==this.defaultXMax?this.defaultXMax:d.max,this.xMax<=this.xMin&&(this.xMax=this.xMin+1),this.xStep=void
 0!==this.defaultXSt
 ep?this.defaultXStep:(this.xMax-this.xMin)/5;var 
l=this.getColumnRange(i,this.colY);o&&(l.min-=this.yBarWidth/2,l.max+=this.yBarWidth/2),this.yMin=void
 0!==this.defaultYMin?this.defaultYMin:l.min,this.yMax=void 
0!==this.defaultYMax?this.defaultYMax:l.max,this.yMax<=this.yMin&&(this.yMax=this.yMin+1),this.yStep=void
 0!==this.defaultYStep?this.defaultYStep:(this.yMax-this.yMin)/5;
+var c=this.getColumnRange(i,this.colZ);if(this.zMin=void 
0!==this.defaultZMin?this.defaultZMin:c.min,this.zMax=void 
0!==this.defaultZMax?this.defaultZMax:c.max,this.zMax<=this.zMin&&(this.zMax=this.zMin+1),this.zStep=void
 0!==this.defaultZStep?this.defaultZStep:(this.zMax-this.zMin)/5,void 
0!==this.colValue){var 
p=this.getColumnRange(i,this.colValue);this.valueMin=void 
0!==this.defaultValueMin?this.defaultValueMin:p.min,this.valueMax=void 
0!==this.defaultValueMax?this.defaultValueMax:p.max,this.valueMax<=this.valueMin&&(this.valueMax=this.valueMin+1)}this._setScale()}}},s.prototype._getDataPoints=function(t){var
 
e,i,o,n,r,a,h=[];if(this.style===s.STYLE.GRID||this.style===s.STYLE.SURFACE){var
 
d=[],c=[];for(o=0;o<this.getNumberOfRows(t);o++)e=t[o][this.colX]||0,i=t[o][this.colY]||0,-1===d.indexOf(e)&&d.push(e),-1===c.indexOf(i)&&c.push(i);var
 p=function(t,e){return t-e};d.sort(p),c.sort(p);var 
u=[];for(o=0;o<t.length;o++){e=t[o][this.colX]||0,i=t[o][this.colY]||0,n=t[o][this.colZ]||0;
 var m=d.indexOf(e),f=c.indexOf(i);void 0===u[m]&&(u[m]=[]);var g=new 
l;g.x=e,g.y=i,g.z=n,r={},r.point=g,r.trans=void 0,r.screen=void 0,r.bottom=new 
l(e,i,this.zMin),u[m][f]=r,h.push(r)}for(e=0;e<u.length;e++)for(i=0;i<u[e].length;i++)u[e][i]&&(u[e][i].pointRight=e<u.length-1?u[e+1][i]:void
 0,u[e][i].pointTop=i<u[e].length-1?u[e][i+1]:void 
0,u[e][i].pointCross=e<u.length-1&&i<u[e].length-1?u[e+1][i+1]:void 0)}else 
for(o=0;o<t.length;o++)a=new 
l,a.x=t[o][this.colX]||0,a.y=t[o][this.colY]||0,a.z=t[o][this.colZ]||0,void 
0!==this.colValue&&(a.value=t[o][this.colValue]||0),r={},r.point=a,r.bottom=new 
l(a.x,a.y,this.zMin),r.trans=void 0,r.screen=void 0,h.push(r);return 
h},s.prototype.create=function(){for(;this.containerElement.hasChildNodes();)this.containerElement.removeChild(this.containerElement.firstChild);this.frame=document.createElement("div"),this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.canvas=document.createElement("canvas"),this.frame.canvas
 .style.position="relative",this.frame.appendChild(this.frame.canvas);var 
t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error:
 your browser does not support HTML 
canvas",this.frame.canvas.appendChild(t),this.frame.filter=document.createElement("div"),this.frame.filter.style.position="absolute",this.frame.filter.style.bottom="0px",this.frame.filter.style.left="0px",this.frame.filter.style.width="100%",this.frame.appendChild(this.frame.filter);var
 
e=this,i=function(t){e._onMouseDown(t)},s=function(t){e._onTouchStart(t)},o=function(t){e._onWheel(t)},n=function(t){e._onTooltip(t)};d.addEventListener(this.frame.canvas,"keydown",onkeydown),d.addEventListener(this.frame.canvas,"mousedown",i),d.addEventListener(this.frame.canvas,"touchstart",s),d.addEventListener(this.frame.canvas,"mousewheel",o),d.addEventListener(this.frame.canvas,"mousemove",n),this.containerElement.appendChild(this.frame)},s.prototype.setSize=function(t,
 
e){this.frame.style.width=t,this.frame.style.height=e,this._resizeCanvas()},s.prototype._resizeCanvas=function(){this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=this.frame.canvas.clientWidth,this.frame.canvas.height=this.frame.canvas.clientHeight,this.frame.filter.style.width=this.frame.canvas.clientWidth-20+"px"},s.prototype.animationStart=function(){if(!this.frame.filter||!this.frame.filter.slider)throw"No
 animation 
available";this.frame.filter.slider.play()},s.prototype.animationStop=function(){this.frame.filter&&this.frame.filter.slider&&this.frame.filter.slider.stop()},s.prototype._resizeCenter=function(){this.xcenter="%"===this.defaultXCenter.charAt(this.defaultXCenter.length-1)?parseFloat(this.defaultXCenter)/100*this.frame.canvas.clientWidth:parseFloat(this.defaultXCenter),this.ycenter="%"===this.defaultYCenter.charAt(this.defaultYCenter.length-1)?parseFloat(this.defaultYCenter)/100*(this.frame.canvas.clientHeight-this.frame
 
.filter.clientHeight):parseFloat(this.defaultYCenter)},s.prototype.setCameraPosition=function(t){void
 0!==t&&(void 0!==t.horizontal&&void 
0!==t.vertical&&this.camera.setArmRotation(t.horizontal,t.vertical),void 
0!==t.distance&&this.camera.setArmLength(t.distance),this.redraw())},s.prototype.getCameraPosition=function(){var
 t=this.camera.getArmRotation();return 
t.distance=this.camera.getArmLength(),t},s.prototype._readData=function(t){this._dataInitialize(t,this.style),this.dataPoints=this.dataFilter?this.dataFilter._getDataPoints():this._getDataPoints(this.dataTable),this._redrawFilter()},s.prototype.setData=function(t){this._readData(t),this.redraw(),this.animationAutoStart&&this.dataFilter&&this.animationStart()},s.prototype.setOptions=function(t){var
 e=void 0;if(this.animationStop(),void 0!==t){if(void 
0!==t.width&&(this.width=t.width),void 
0!==t.height&&(this.height=t.height),void 
0!==t.xCenter&&(this.defaultXCenter=t.xCenter),void 
0!==t.yCenter&&(this.defaultYCenter=t.yCenter),
 void 0!==t.filterLabel&&(this.filterLabel=t.filterLabel),void 
0!==t.legendLabel&&(this.legendLabel=t.legendLabel),void 
0!==t.xLabel&&(this.xLabel=t.xLabel),void 
0!==t.yLabel&&(this.yLabel=t.yLabel),void 
0!==t.zLabel&&(this.zLabel=t.zLabel),void 
0!==t.xValueLabel&&(this.xValueLabel=t.xValueLabel),void 
0!==t.yValueLabel&&(this.yValueLabel=t.yValueLabel),void 
0!==t.zValueLabel&&(this.zValueLabel=t.zValueLabel),void 0!==t.style){var 
i=this._getStyleNumber(t.style);-1!==i&&(this.style=i)}void 
0!==t.showGrid&&(this.showGrid=t.showGrid),void 
0!==t.showPerspective&&(this.showPerspective=t.showPerspective),void 
0!==t.showShadow&&(this.showShadow=t.showShadow),void 
0!==t.tooltip&&(this.showTooltip=t.tooltip),void 
0!==t.showAnimationControls&&(this.showAnimationControls=t.showAnimationControls),void
 0!==t.keepAspectRatio&&(this.keepAspectRatio=t.keepAspectRatio),void 
0!==t.verticalRatio&&(this.verticalRatio=t.verticalRatio),void 
0!==t.animationInterval&&(this.animationInterval=t.animationInter
 val),void 
0!==t.animationPreload&&(this.animationPreload=t.animationPreload),void 
0!==t.animationAutoStart&&(this.animationAutoStart=t.animationAutoStart),void 
0!==t.xBarWidth&&(this.defaultXBarWidth=t.xBarWidth),void 
0!==t.yBarWidth&&(this.defaultYBarWidth=t.yBarWidth),void 
0!==t.xMin&&(this.defaultXMin=t.xMin),void 
0!==t.xStep&&(this.defaultXStep=t.xStep),void 
0!==t.xMax&&(this.defaultXMax=t.xMax),void 
0!==t.yMin&&(this.defaultYMin=t.yMin),void 
0!==t.yStep&&(this.defaultYStep=t.yStep),void 
0!==t.yMax&&(this.defaultYMax=t.yMax),void 
0!==t.zMin&&(this.defaultZMin=t.zMin),void 
0!==t.zStep&&(this.defaultZStep=t.zStep),void 
0!==t.zMax&&(this.defaultZMax=t.zMax),void 
0!==t.valueMin&&(this.defaultValueMin=t.valueMin),void 
0!==t.valueMax&&(this.defaultValueMax=t.valueMax),void 
0!==t.cameraPosition&&(e=t.cameraPosition),void 
0!==e?(this.camera.setArmRotation(e.horizontal,e.vertical),this.camera.setArmLength(e.distance)):(this.camera.setArmRotation(1,.5),this.camera.setArmLength(1.7))}this.
 
_setBackgroundColor(t&&t.backgroundColor),this.setSize(this.width,this.height),this.dataTable&&this.setData(this.dataTable),this.animationAutoStart&&this.dataFilter&&this.animationStart()},s.prototype.redraw=function(){if(void
 0===this.dataPoints)throw"Error: graph data not 
initialized";this._resizeCanvas(),this._resizeCenter(),this._redrawSlider(),this._redrawClear(),this._redrawAxis(),this.style===s.STYLE.GRID||this.style===s.STYLE.SURFACE?this._redrawDataGrid():this.style===s.STYLE.LINE?this._redrawDataLine():this.style===s.STYLE.BAR||this.style===s.STYLE.BARCOLOR||this.style===s.STYLE.BARSIZE?this._redrawDataBar():this._redrawDataDot(),this._redrawInfo(),this._redrawLegend()},s.prototype._redrawClear=function(){var
 
t=this.frame.canvas,e=t.getContext("2d");e.clearRect(0,0,t.width,t.height)},s.prototype._redrawLegend=function(){var
 t;if(this.style===s.STYLE.DOTCOLOR||this.style===s.STYLE.DOTSIZE){var 
e,i,o=.02*this.frame.clientWidth;this.style===s.STYLE.DOTSIZE?(e=o/2,i=o/2+2*o):(
 e=20,i=20);var 
n=Math.max(.25*this.frame.clientHeight,100),r=this.margin,a=this.frame.clientWidth-this.margin,h=a-i,d=r+n}var
 l=this.frame.canvas,c=l.getContext("2d");if(c.lineWidth=1,c.font="14px 
arial",this.style===s.STYLE.DOTCOLOR){var p=0,u=n;for(t=p;u>t;t++){var 
m=(t-p)/(u-p),g=240*m,v=this._hsv2rgb(g,1,1);c.strokeStyle=v,c.beginPath(),c.moveTo(h,r+t),c.lineTo(a,r+t),c.stroke()}c.strokeStyle=this.colorAxis,c.strokeRect(h,r,i,n)}if(this.style===s.STYLE.DOTSIZE&&(c.strokeStyle=this.colorAxis,c.fillStyle=this.colorDot,c.beginPath(),c.moveTo(h,r),c.lineTo(a,r),c.lineTo(a-i+e,d),c.lineTo(h,d),c.closePath(),c.fill(),c.stroke()),this.style===s.STYLE.DOTCOLOR||this.style===s.STYLE.DOTSIZE){var
 y=5,b=new 
f(this.valueMin,this.valueMax,(this.valueMax-this.valueMin)/5,!0);for(b.start(),b.getCurrent()<this.valueMin&&b.next();!b.end();)t=d-(b.getCurrent()-this.valueMin)/(this.valueMax-this.valueMin)*n,c.beginPath(),c.moveTo(h-y,t),c.lineTo(h,t),c.stroke(),c.textAlign="right",c.textBaseline="
 
middle",c.fillStyle=this.colorAxis,c.fillText(b.getCurrent(),h-2*y,t),b.next();c.textAlign="right",c.textBaseline="top";var
 
_=this.legendLabel;c.fillText(_,a,d+this.margin)}},s.prototype._redrawFilter=function(){if(this.frame.filter.innerHTML="",this.dataFilter){var
 t={visible:this.showAnimationControls},e=new 
m(this.frame.filter,t);this.frame.filter.slider=e,this.frame.filter.style.padding="10px",e.setValues(this.dataFilter.values),e.setPlayInterval(this.animationInterval);var
 i=this,s=function(){var 
t=e.getIndex();i.dataFilter.selectValue(t),i.dataPoints=i.dataFilter._getDataPoints(),i.redraw()};e.setOnChangeCallback(s)}else
 this.frame.filter.slider=void 0},s.prototype._redrawSlider=function(){void 
0!==this.frame.filter.slider&&this.frame.filter.slider.redraw()},s.prototype._redrawInfo=function(){if(this.dataFilter){var
 t=this.frame.canvas,e=t.getContext("2d");e.font="14px 
arial",e.lineStyle="gray",e.fillStyle="gray",e.textAlign="left",e.textBaseline="top";var
 i=this.margin,s=this
 .margin;e.fillText(this.dataFilter.getLabel()+": 
"+this.dataFilter.getSelectedValue(),i,s)}},s.prototype._redrawAxis=function(){var
 
t,e,i,s,o,n,r,a,h,d,c,p,u,m=this.frame.canvas,g=m.getContext("2d");g.font=24/this.camera.getArmLength()+"px
 arial";var 
v=.025/this.scale.x,y=.025/this.scale.y,b=5/this.camera.getArmLength(),_=this.camera.getArmRotation().horizontal;for(g.lineWidth=1,s=void
 0===this.defaultXStep,i=new 
f(this.xMin,this.xMax,this.xStep,s),i.start(),i.getCurrent()<this.xMin&&i.next();!i.end();){var
 x=i.getCurrent();this.showGrid?(t=this._convert3Dto2D(new 
l(x,this.yMin,this.zMin)),e=this._convert3Dto2D(new 
l(x,this.yMax,this.zMin)),g.strokeStyle=this.colorGrid,g.beginPath(),g.moveTo(t.x,t.y),g.lineTo(e.x,e.y),g.stroke()):(t=this._convert3Dto2D(new
 l(x,this.yMin,this.zMin)),e=this._convert3Dto2D(new 
l(x,this.yMin+v,this.zMin)),g.strokeStyle=this.colorAxis,g.beginPath(),g.moveTo(t.x,t.y),g.lineTo(e.x,e.y),g.stroke(),t=this._convert3Dto2D(new
 l(x,this.yMax,this.zMin)),e=this._
 convert3Dto2D(new 
l(x,this.yMax-v,this.zMin)),g.strokeStyle=this.colorAxis,g.beginPath(),g.moveTo(t.x,t.y),g.lineTo(e.x,e.y),g.stroke()),r=Math.cos(_)>0?this.yMin:this.yMax,o=this._convert3Dto2D(new
 
l(x,r,this.zMin)),Math.cos(2*_)>0?(g.textAlign="center",g.textBaseline="top",o.y+=b):Math.sin(2*_)<0?(g.textAlign="right",g.textBaseline="middle"):(g.textAlign="left",g.textBaseline="middle"),g.fillStyle=this.colorAxis,g.fillText("
  "+this.xValueLabel(i.getCurrent())+"  
",o.x,o.y),i.next()}for(g.lineWidth=1,s=void 0===this.defaultYStep,i=new 
f(this.yMin,this.yMax,this.yStep,s),i.start(),i.getCurrent()<this.yMin&&i.next();!i.end();)this.showGrid?(t=this._convert3Dto2D(new
 l(this.xMin,i.getCurrent(),this.zMin)),e=this._convert3Dto2D(new 
l(this.xMax,i.getCurrent(),this.zMin)),g.strokeStyle=this.colorGrid,g.beginPath(),g.moveTo(t.x,t.y),g.lineTo(e.x,e.y),g.stroke()):(t=this._convert3Dto2D(new
 l(this.xMin,i.getCurrent(),this.zMin)),e=this._convert3Dto2D(new 
l(this.xMin+y,i.getCurrent(),this.z
 
Min)),g.strokeStyle=this.colorAxis,g.beginPath(),g.moveTo(t.x,t.y),g.lineTo(e.x,e.y),g.stroke(),t=this._convert3Dto2D(new
 l(this.xMax,i.getCurrent(),this.zMin)),e=this._convert3Dto2D(new 
l(this.xMax-y,i.getCurrent(),this.zMin)),g.strokeStyle=this.colorAxis,g.beginPath(),g.moveTo(t.x,t.y),g.lineTo(e.x,e.y),g.stroke()),n=Math.sin(_)>0?this.xMin:this.xMax,o=this._convert3Dto2D(new
 
l(n,i.getCurrent(),this.zMin)),Math.cos(2*_)<0?(g.textAlign="center",g.textBaseline="top",o.y+=b):Math.sin(2*_)>0?(g.textAlign="right",g.textBaseline="middle"):(g.textAlign="left",g.textBaseline="middle"),g.fillStyle=this.colorAxis,g.fillText("
  "+this.yValueLabel(i.getCurrent())+"  
",o.x,o.y),i.next();for(g.lineWidth=1,s=void 0===this.defaultZStep,i=new 
f(this.zMin,this.zMax,this.zStep,s),i.start(),i.getCurrent()<this.zMin&&i.next(),n=Math.cos(_)>0?this.xMin:this.xMax,r=Math.sin(_)<0?this.yMin:this.yMax;!i.end();)t=this._convert3Dto2D(new
 l(n,r,i.getCurrent())),g.strokeStyle=this.colorAxis,g.beginPath(),g.mo
 
veTo(t.x,t.y),g.lineTo(t.x-b,t.y),g.stroke(),g.textAlign="right",g.textBaseline="middle",g.fillStyle=this.colorAxis,g.fillText(this.zValueLabel(i.getCurrent())+"
 ",t.x-5,t.y),i.next();g.lineWidth=1,t=this._convert3Dto2D(new 
l(n,r,this.zMin)),e=this._convert3Dto2D(new 
l(n,r,this.zMax)),g.strokeStyle=this.colorAxis,g.beginPath(),g.moveTo(t.x,t.y),g.lineTo(e.x,e.y),g.stroke(),g.lineWidth=1,p=this._convert3Dto2D(new
 l(this.xMin,this.yMin,this.zMin)),u=this._convert3Dto2D(new 
l(this.xMax,this.yMin,this.zMin)),g.strokeStyle=this.colorAxis,g.beginPath(),g.moveTo(p.x,p.y),g.lineTo(u.x,u.y),g.stroke(),p=this._convert3Dto2D(new
 l(this.xMin,this.yMax,this.zMin)),u=this._convert3Dto2D(new 
l(this.xMax,this.yMax,this.zMin)),g.strokeStyle=this.colorAxis,g.beginPath(),g.moveTo(p.x,p.y),g.lineTo(u.x,u.y),g.stroke(),g.lineWidth=1,t=this._convert3Dto2D(new
 l(this.xMin,this.yMin,this.zMin)),e=this._convert3Dto2D(new 
l(this.xMin,this.yMax,this.zMin)),g.strokeStyle=this.colorAxis,g.beginPath(),g.moveTo(t
 .x,t.y),g.lineTo(e.x,e.y),g.stroke(),t=this._convert3Dto2D(new 
l(this.xMax,this.yMin,this.zMin)),e=this._convert3Dto2D(new 
l(this.xMax,this.yMax,this.zMin)),g.strokeStyle=this.colorAxis,g.beginPath(),g.moveTo(t.x,t.y),g.lineTo(e.x,e.y),g.stroke();var
 
w=this.xLabel;w.length>0&&(c=.1/this.scale.y,n=(this.xMin+this.xMax)/2,r=Math.cos(_)>0?this.yMin-c:this.yMax+c,o=this._convert3Dto2D(new
 
l(n,r,this.zMin)),Math.cos(2*_)>0?(g.textAlign="center",g.textBaseline="top"):Math.sin(2*_)<0?(g.textAlign="right",g.textBaseline="middle"):(g.textAlign="left",g.textBaseline="middle"),g.fillStyle=this.colorAxis,g.fillText(w,o.x,o.y));var
 
S=this.yLabel;S.length>0&&(d=.1/this.scale.x,n=Math.sin(_)>0?this.xMin-d:this.xMax+d,r=(this.yMin+this.yMax)/2,o=this._convert3Dto2D(new
 
l(n,r,this.zMin)),Math.cos(2*_)<0?(g.textAlign="center",g.textBaseline="top"):Math.sin(2*_)>0?(g.textAlign="right",g.textBaseline="middle"):(g.textAlign="left",g.textBaseline="middle"),g.fillStyle=this.colorAxis,g.fillText(S,o.x,o.y)
 );var 
M=this.zLabel;M.length>0&&(h=30,n=Math.cos(_)>0?this.xMin:this.xMax,r=Math.sin(_)<0?this.yMin:this.yMax,a=(this.zMin+this.zMax)/2,o=this._convert3Dto2D(new
 
l(n,r,a)),g.textAlign="right",g.textBaseline="middle",g.fillStyle=this.colorAxis,g.fillText(M,o.x-h,o.y))},s.prototype._hsv2rgb=function(t,e,i){var
 s,o,n,r,a,h;switch(r=i*e,a=Math.floor(t/60),h=r*(1-Math.abs(t/60%2-1)),a){case 
0:s=r,o=h,n=0;break;case 1:s=h,o=r,n=0;break;case 2:s=0,o=r,n=h;break;case 
3:s=0,o=h,n=r;break;case 4:s=h,o=0,n=r;break;case 
5:s=r,o=0,n=h;break;default:s=0,o=0,n=0}return"RGB("+parseInt(255*s)+","+parseInt(255*o)+","+parseInt(255*n)+")"},s.prototype._redrawDataGrid=function(){var
 t,e,i,o,n,r,a,h,d,c,p,u,m,f=this.frame.canvas,g=f.getContext("2d");if(!(void 
0===this.dataPoints||this.dataPoints.length<=0)){for(n=0;n<this.dataPoints.length;n++){var
 
v=this._convertPointToTranslation(this.dataPoints[n].point),y=this._convertTranslationToScreen(v);this.dataPoints[n].trans=v,this.dataPoints[n].screen=y;var
 b
 
=this._convertPointToTranslation(this.dataPoints[n].bottom);this.dataPoints[n].dist=this.showPerspective?b.length():-b.z}var
 _=function(t,e){return 
e.dist-t.dist};if(this.dataPoints.sort(_),this.style===s.STYLE.SURFACE){for(n=0;n<this.dataPoints.length;n++)if(t=this.dataPoints[n],e=this.dataPoints[n].pointRight,i=this.dataPoints[n].pointTop,o=this.dataPoints[n].pointCross,void
 0!==t&&void 0!==e&&void 0!==i&&void 
0!==o){if(this.showGrayBottom||this.showShadow){var 
x=l.subtract(o.trans,t.trans),w=l.subtract(i.trans,e.trans),S=l.crossProduct(x,w),M=S.length();r=S.z>0}else
 
r=!0;r?(m=(t.point.z+e.point.z+i.point.z+o.point.z)/4,c=240*(1-(m-this.zMin)*this.scale.z/this.verticalRatio),p=1,this.showShadow?(u=Math.min(1+S.x/M/2,1),a=this._hsv2rgb(c,p,u),h=a):(u=1,a=this._hsv2rgb(c,p,u),h=this.colorAxis)):(a="gray",h=this.colorAxis),d=.5,g.lineWidth=d,g.fillStyle=a,g.strokeStyle=h,g.beginPath(),g.moveTo(t.screen.x,t.screen.y),g.lineTo(e.screen.x,e.screen.y),g.lineTo(o.screen.x,o.screen.y),g.li
 neTo(i.screen.x,i.screen.y),g.closePath(),g.fill(),g.stroke()}}else 
for(n=0;n<this.dataPoints.length;n++)t=this.dataPoints[n],e=this.dataPoints[n].pointRight,i=this.dataPoints[n].pointTop,void
 
0!==t&&(d=this.showPerspective?2/-t.trans.z:2*-(this.eye.z/this.camera.getArmLength())),void
 0!==t&&void 
0!==e&&(m=(t.point.z+e.point.z)/2,c=240*(1-(m-this.zMin)*this.scale.z/this.verticalRatio),g.lineWidth=d,g.strokeStyle=this._hsv2rgb(c,1,1),g.beginPath(),g.moveTo(t.screen.x,t.screen.y),g.lineTo(e.screen.x,e.screen.y),g.stroke()),void
 0!==t&&void 
0!==i&&(m=(t.point.z+i.point.z)/2,c=240*(1-(m-this.zMin)*this.scale.z/this.verticalRatio),g.lineWidth=d,g.strokeStyle=this._hsv2rgb(c,1,1),g.beginPath(),g.moveTo(t.screen.x,t.screen.y),g.lineTo(i.screen.x,i.screen.y),g.stroke())}},s.prototype._redrawDataDot=function(){var
 t,e=this.frame.canvas,i=e.getContext("2d");if(!(void 
0===this.dataPoints||this.dataPoints.length<=0)){for(t=0;t<this.dataPoints.length;t++){var
 o=this._convertPointToTranslation(th
 
is.dataPoints[t].point),n=this._convertTranslationToScreen(o);this.dataPoints[t].trans=o,this.dataPoints[t].screen=n;var
 
r=this._convertPointToTranslation(this.dataPoints[t].bottom);this.dataPoints[t].dist=this.showPerspective?r.length():-r.z}var
 a=function(t,e){return e.dist-t.dist};this.dataPoints.sort(a);var 
h=.02*this.frame.clientWidth;for(t=0;t<this.dataPoints.length;t++){var 
d=this.dataPoints[t];if(this.style===s.STYLE.DOTLINE){var 
l=this._convert3Dto2D(d.bottom);i.lineWidth=1,i.strokeStyle=this.colorGrid,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(d.screen.x,d.screen.y),i.stroke()}var
 
c;c=this.style===s.STYLE.DOTSIZE?h/2+2*h*(d.point.value-this.valueMin)/(this.valueMax-this.valueMin):h;var
 
p;p=this.showPerspective?c/-d.trans.z:c*-(this.eye.z/this.camera.getArmLength()),0>p&&(p=0);var
 
u,m,f;this.style===s.STYLE.DOTCOLOR?(u=240*(1-(d.point.value-this.valueMin)*this.scale.value),m=this._hsv2rgb(u,1,1),f=this._hsv2rgb(u,1,.8)):this.style===s.STYLE.DOTSIZE?(m=this.colorDot,f=this.col
 
orDotBorder):(u=240*(1-(d.point.z-this.zMin)*this.scale.z/this.verticalRatio),m=this._hsv2rgb(u,1,1),f=this._hsv2rgb(u,1,.8)),i.lineWidth=1,i.strokeStyle=f,i.fillStyle=m,i.beginPath(),i.arc(d.screen.x,d.screen.y,p,0,2*Math.PI,!0),i.fill(),i.stroke()}}},s.prototype._redrawDataBar=function(){var
 t,e,i,o,n=this.frame.canvas,r=n.getContext("2d");if(!(void 
0===this.dataPoints||this.dataPoints.length<=0)){for(t=0;t<this.dataPoints.length;t++){var
 
a=this._convertPointToTranslation(this.dataPoints[t].point),h=this._convertTranslationToScreen(a);this.dataPoints[t].trans=a,this.dataPoints[t].screen=h;var
 
d=this._convertPointToTranslation(this.dataPoints[t].bottom);this.dataPoints[t].dist=this.showPerspective?d.length():-d.z}var
 c=function(t,e){return e.dist-t.dist};this.dataPoints.sort(c);var 
p=this.xBarWidth/2,u=this.yBarWidth/2;for(t=0;t<this.dataPoints.length;t++){var 
m,f,g,v=this.dataPoints[t];this.style===s.STYLE.BARCOLOR?(m=240*(1-(v.point.value-this.valueMin)*this.scale.value),f=this._
 
hsv2rgb(m,1,1),g=this._hsv2rgb(m,1,.8)):this.style===s.STYLE.BARSIZE?(f=this.colorDot,g=this.colorDotBorder):(m=240*(1-(v.point.z-this.zMin)*this.scale.z/this.verticalRatio),f=this._hsv2rgb(m,1,1),g=this._hsv2rgb(m,1,.8)),this.style===s.STYLE.BARSIZE&&(p=this.xBarWidth/2*((v.point.value-this.valueMin)/(this.valueMax-this.valueMin)*.8+.2),u=this.yBarWidth/2*((v.point.value-this.valueMin)/(this.valueMax-this.valueMin)*.8+.2));var
 y=this,b=v.point,_=[{point:new l(b.x-p,b.y-u,b.z)},{point:new 
l(b.x+p,b.y-u,b.z)},{point:new l(b.x+p,b.y+u,b.z)},{point:new 
l(b.x-p,b.y+u,b.z)}],x=[{point:new l(b.x-p,b.y-u,this.zMin)},{point:new 
l(b.x+p,b.y-u,this.zMin)},{point:new l(b.x+p,b.y+u,this.zMin)},{point:new 
l(b.x-p,b.y+u,this.zMin)}];_.forEach(function(t){t.screen=y._convert3Dto2D(t.point)}),x.forEach(function(t){t.screen=y._convert3Dto2D(t.point)});var
 
w=[{corners:_,center:l.avg(x[0].point,x[2].point)},{corners:[_[0],_[1],x[1],x[0]],center:l.avg(x[1].point,x[0].point)},{corners:[_[1],_[2],x[2],x[
 
1]],center:l.avg(x[2].point,x[1].point)},{corners:[_[2],_[3],x[3],x[2]],center:l.avg(x[3].point,x[2].point)},{corners:[_[3],_[0],x[0],x[3]],center:l.avg(x[0].point,x[3].point)}];for(v.surfaces=w,e=0;e<w.length;e++){i=w[e];var
 
S=this._convertPointToTranslation(i.center);i.dist=this.showPerspective?S.length():-S.z}for(w.sort(function(t,e){var
 i=e.dist-t.dist;return 
i?i:t.corners===_?1:e.corners===_?-1:0}),r.lineWidth=1,r.strokeStyle=g,r.fillStyle=f,e=2;e<w.length;e++)i=w[e],o=i.corners,r.beginPath(),r.moveTo(o[3].screen.x,o[3].screen.y),r.lineTo(o[0].screen.x,o[0].screen.y),r.lineTo(o[1].screen.x,o[1].screen.y),r.lineTo(o[2].screen.x,o[2].screen.y),r.lineTo(o[3].screen.x,o[3].screen.y),r.fill(),r.stroke()}}},s.prototype._redrawDataLine=function(){var
 t,e,i=this.frame.canvas,s=i.getContext("2d");if(!(void 
0===this.dataPoints||this.dataPoints.length<=0)){for(e=0;e<this.dataPoints.length;e++){var
 
o=this._convertPointToTranslation(this.dataPoints[e].point),n=this._convertTranslationToScre
 
en(o);this.dataPoints[e].trans=o,this.dataPoints[e].screen=n}for(this.dataPoints.length>0&&(t=this.dataPoints[0],s.lineWidth=1,s.strokeStyle="blue",s.beginPath(),s.moveTo(t.screen.x,t.screen.y)),e=1;e<this.dataPoints.length;e++)t=this.dataPoints[e],s.lineTo(t.screen.x,t.screen.y);this.dataPoints.length>0&&s.stroke()}},s.prototype._onMouseDown=function(t){if(t=t||window.event,this.leftButtonDown&&this._onMouseUp(t),this.leftButtonDown=t.which?1===t.which:1===t.button,this.leftButtonDown||this.touchDown){this.startMouseX=o(t),this.startMouseY=n(t),this.startStart=new
 Date(this.start),this.startEnd=new 
Date(this.end),this.startArmRotation=this.camera.getArmRotation(),this.frame.style.cursor="move";var
 
e=this;this.onmousemove=function(t){e._onMouseMove(t)},this.onmouseup=function(t){e._onMouseUp(t)},d.addEventListener(document,"mousemove",e.onmousemove),d.addEventListener(document,"mouseup",e.onmouseup),d.preventDefault(t)}},s.prototype._onMouseMove=function(t){t=t||window.event;var
 e=p
 
arseFloat(o(t))-this.startMouseX,i=parseFloat(n(t))-this.startMouseY,s=this.startArmRotation.horizontal+e/200,r=this.startArmRotation.vertical+i/200,a=4,h=Math.sin(a/360*2*Math.PI);Math.abs(Math.sin(s))<h&&(s=Math.round(s/Math.PI)*Math.PI-.001),Math.abs(Math.cos(s))<h&&(s=(Math.round(s/Math.PI-.5)+.5)*Math.PI-.001),Math.abs(Math.sin(r))<h&&(r=Math.round(r/Math.PI)*Math.PI),Math.abs(Math.cos(r))<h&&(r=(Math.round(r/Math.PI-.5)+.5)*Math.PI),this.camera.setArmRotation(s,r),this.redraw();var
 
l=this.getCameraPosition();this.emit("cameraPositionChange",l),d.preventDefault(t)},s.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",this.leftButtonDown=!1,d.removeEventListener(document,"mousemove",this.onmousemove),d.removeEventListener(document,"mouseup",this.onmouseup),d.preventDefault(t)},s.prototype._onTooltip=function(t){var
 
e=300,i=this.frame.getBoundingClientRect(),s=o(t)-i.left,r=n(t)-i.top;if(this.showTooltip){if(this.tooltipTimeout&&clearTimeout(this.tooltipTimeout),this
 .leftButtonDown)return void 
this._hideTooltip();if(this.tooltip&&this.tooltip.dataPoint){var 
a=this._dataPointFromXY(s,r);a!==this.tooltip.dataPoint&&(a?this._showTooltip(a):this._hideTooltip())}else{var
 h=this;this.tooltipTimeout=setTimeout(function(){h.tooltipTimeout=null;var 
t=h._dataPointFromXY(s,r);t&&h._showTooltip(t)},e)}}},s.prototype._onTouchStart=function(t){this.touchDown=!0;var
 
e=this;this.ontouchmove=function(t){e._onTouchMove(t)},this.ontouchend=function(t){e._onTouchEnd(t)},d.addEventListener(document,"touchmove",e.ontouchmove),d.addEventListener(document,"touchend",e.ontouchend),this._onMouseDown(t)},s.prototype._onTouchMove=function(t){this._onMouseMove(t)},s.prototype._onTouchEnd=function(t){this.touchDown=!1,d.removeEventListener(document,"touchmove",this.ontouchmove),d.removeEventListener(document,"touchend",this.ontouchend),this._onMouseUp(t)},s.prototype._onWheel=function(t){t||(t=window.event);var
 e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3
 ),e){var 
i=this.camera.getArmLength(),s=i*(1-e/10);this.camera.setArmLength(s),this.redraw(),this._hideTooltip()}var
 
o=this.getCameraPosition();this.emit("cameraPositionChange",o),d.preventDefault(t)},s.prototype._insideTriangle=function(t,e){function
 i(t){return t>0?1:0>t?-1:0}var 
s=e[0],o=e[1],n=e[2],r=i((o.x-s.x)*(t.y-s.y)-(o.y-s.y)*(t.x-s.x)),a=i((n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x)),h=i((s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x));return!(0!=r&&0!=a&&r!=a||0!=a&&0!=h&&a!=h||0!=r&&0!=h&&r!=h)},s.prototype._dataPointFromXY=function(t,e){var
 i,o=100,n=null,r=null,a=null,h=new 
c(t,e);if(this.style===s.STYLE.BAR||this.style===s.STYLE.BARCOLOR||this.style===s.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){n=this.dataPoints[i];var
 d=n.surfaces;if(d)for(var l=d.length-1;l>=0;l--){var 
p=d[l],u=p.corners,m=[u[0].screen,u[1].screen,u[2].screen],f=[u[2].screen,u[3].screen,u[0].screen];if(this._insideTriangle(h,m)||this._insideTriangle(h,f))return
 n}}else for(i=0;i<this.dataPoints.le
 ngth;i++){n=this.dataPoints[i];var g=n.screen;if(g){var 
v=Math.abs(t-g.x),y=Math.abs(e-g.y),b=Math.sqrt(v*v+y*y);(null===a||a>b)&&o>b&&(a=b,r=n)}}return
 r},s.prototype._showTooltip=function(t){var 
e,i,s;this.tooltip?(e=this.tooltip.dom.content,i=this.tooltip.dom.line,s=this.tooltip.dom.dot):(e=document.createElement("div"),e.style.position="absolute",e.style.padding="10px",e.style.border="1px
 solid 
#4d4d4d",e.style.color="#1a1a1a",e.style.background="rgba(255,255,255,0.7)",e.style.borderRadius="2px",e.style.boxShadow="5px
 5px 10px 
rgba(128,128,128,0.5)",i=document.createElement("div"),i.style.position="absolute",i.style.height="40px",i.style.width="0",i.style.borderLeft="1px
 solid 
#4d4d4d",s=document.createElement("div"),s.style.position="absolute",s.style.height="0",s.style.width="0",s.style.border="5px
 solid 
#4d4d4d",s.style.borderRadius="5px",this.tooltip={dataPoint:null,dom:{content:e,line:i,dot:s}}),this._hideTooltip(),this.tooltip.dataPoint=t,e.innerHTML="function"==typeof
 thi
 
s.showTooltip?this.showTooltip(t.point):"<table><tr><td>x:</td><td>"+t.point.x+"</td></tr><tr><td>y:</td><td>"+t.point.y+"</td></tr><tr><td>z:</td><td>"+t.point.z+"</td></tr></table>",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(s);var
 
o=e.offsetWidth,n=e.offsetHeight,r=i.offsetHeight,a=s.offsetWidth,h=s.offsetHeight,d=t.screen.x-o/2;d=Math.min(Math.max(d,10),this.frame.clientWidth-10-o),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-r+"px",e.style.left=d+"px",e.style.top=t.screen.y-r-n+"px",s.style.left=t.screen.x-a/2+"px",s.style.top=t.screen.y-h/2+"px"},s.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var
 t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var 
e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},t.exports=s},function(t,e,i){function
 s(){this.armLocation=new 
o,this.armRotation={},this.armRotation.horizontal=0,this.armRotation.vertical=0
 ,this.armLength=1.7,this.cameraLocation=new o,this.cameraRotation=new 
o(.5*Math.PI,0,0),this.calculateCameraOrientation()}var 
o=i(10);s.prototype.setArmLocation=function(t,e,i){this.armLocation.x=t,this.armLocation.y=e,this.armLocation.z=i,this.calculateCameraOrientation()},s.prototype.setArmRotation=function(t,e){void
 0!==t&&(this.armRotation.horizontal=t),void 
0!==e&&(this.armRotation.vertical=e,this.armRotation.vertical<0&&(this.armRotation.vertical=0),this.armRotation.vertical>.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),(void
 0!==t||void 
0!==e)&&this.calculateCameraOrientation()},s.prototype.getArmRotation=function(){var
 t={};return 
t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},s.prototype.setArmLength=function(t){void
 
0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.calculateCameraOrientation())},s.prototype.getArmLength=function(){return
 this.armLength},s.prototype.getCameraLo
 cation=function(){return 
this.cameraLocation},s.prototype.getCameraRotation=function(){return 
this.cameraRotation},s.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal},t.exports=s},function(t,e,i){function
 s(t,e,i){this.data=t,this.column=e,this.graph=i,this.index=void 
0,this.value=void 
0,this.values=i.getDistinctValues(t.get(),this.column),this.values.sort(function(t,e){return
 
t>e?1:e>t?-1:0}),this.values.length>0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void
 0,i.animationPr
 eload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var 
o=i(4);s.prototype.isLoaded=function(){return 
this.loaded},s.prototype.getLoadedProgress=function(){for(var 
t=this.values.length,e=0;this.dataPoints[e];)e++;return 
Math.round(e/t*100)},s.prototype.getLabel=function(){return 
this.graph.filterLabel},s.prototype.getColumn=function(){return 
this.column},s.prototype.getSelectedValue=function(){return void 
0===this.index?void 
0:this.values[this.index]},s.prototype.getValues=function(){return 
this.values},s.prototype.getValue=function(t){if(t>=this.values.length)throw"Error:
 index out of range";return 
this.values[t]},s.prototype._getDataPoints=function(t){if(void 
0===t&&(t=this.index),void 0===t)return[];var 
e;if(this.dataPoints[t])e=this.dataPoints[t];else{var 
i={};i.column=this.column,i.value=this.values[t];var s=new 
o(this.data,{filter:function(t){return 
t[i.column]==i.value}}).get();e=this.graph._getDataPoints(s),this.dataPoints[t]=e}return
 e},s.prototype.setOnLoadCallba
 
ck=function(t){this.onLoadCallback=t},s.prototype.selectValue=function(t){if(t>=this.values.length)throw"Error:
 index out of 
range";this.index=t,this.value=this.values[t]},s.prototype.loadInBackground=function(t){void
 0===t&&(t=0);var 
e=this.graph.frame;if(t<this.values.length){{this._getDataPoints(t)}void 
0===e.progress&&(e.progress=document.createElement("DIV"),e.progress.style.position="absolute",e.progress.style.color="gray",e.appendChild(e.progress));var
 i=this.getLoadedProgress();e.progress.innerHTML="Loading animation... 
"+i+"%",e.progress.style.bottom="60px",e.progress.style.left="10px";var 
s=this;setTimeout(function(){s.loadInBackground(t+1)},10),this.loaded=!1}else 
this.loaded=!0,void 0!==e.progress&&(e.removeChild(e.progress),e.progress=void 
0),this.onLoadCallback&&this.onLoadCallback()},t.exports=s},function(t){function
 e(t,e){this.x=void 0!==t?t:0,this.y=void 
0!==e?e:0}t.exports=e},function(t){function e(t,e,i){this.x=void 
0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!=
 =i?i:0}e.subtract=function(t,i){var s=new e;return 
s.x=t.x-i.x,s.y=t.y-i.y,s.z=t.z-i.z,s},e.add=function(t,i){var s=new e;
+return s.x=t.x+i.x,s.y=t.y+i.y,s.z=t.z+i.z,s},e.avg=function(t,i){return new 
e((t.x+i.x)/2,(t.y+i.y)/2,(t.z+i.z)/2)},e.crossProduct=function(t,i){var s=new 
e;return 
s.x=t.y*i.z-t.z*i.y,s.y=t.z*i.x-t.x*i.z,s.z=t.x*i.y-t.y*i.x,s},e.prototype.length=function(){return
 
Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=e},function(t,e,i){function
 s(t,e){if(void 0===t)throw"Error: No container element 
defined";if(this.container=t,this.visible=e&&void 
0!=e.visible?e.visible:!0,this.visible){this.frame=document.createElement("DIV"),this.frame.style.width="100%",this.frame.style.position="relative",this.container.appendChild(this.frame),this.frame.prev=document.createElement("INPUT"),this.frame.prev.type="BUTTON",this.frame.prev.value="Prev",this.frame.appendChild(this.frame.prev),this.frame.play=document.createElement("INPUT"),this.frame.play.type="BUTTON",this.frame.play.value="Play",this.frame.appendChild(this.frame.play),this.frame.next=document.createElement("INPUT"),this.f
 
rame.next.type="BUTTON",this.frame.next.value="Next",this.frame.appendChild(this.frame.next),this.frame.bar=document.createElement("INPUT"),this.frame.bar.type="BUTTON",this.frame.bar.style.position="absolute",this.frame.bar.style.border="1px
 solid 
red",this.frame.bar.style.width="100px",this.frame.bar.style.height="6px",this.frame.bar.style.borderRadius="2px",this.frame.bar.style.MozBorderRadius="2px",this.frame.bar.style.border="1px
 solid 
#7F7F7F",this.frame.bar.style.backgroundColor="#E5E5E5",this.frame.appendChild(this.frame.bar),this.frame.slide=document.createElement("INPUT"),this.frame.slide.type="BUTTON",this.frame.slide.style.margin="0px",this.frame.slide.value="
 
",this.frame.slide.style.position="relative",this.frame.slide.style.left="-100px",this.frame.appendChild(this.frame.slide);var
 
i=this;this.frame.slide.onmousedown=function(t){i._onMouseDown(t)},this.frame.prev.onclick=function(t){i.prev(t)},this.frame.play.onclick=function(t){i.togglePlay(t)},this.frame.next.onclic
 k=function(t){i.next(t)}}this.onChangeCallback=void 
0,this.values=[],this.index=void 0,this.playTimeout=void 
0,this.playInterval=1e3,this.playLoop=!0}var 
o=i(1);s.prototype.prev=function(){var 
t=this.getIndex();t>0&&(t--,this.setIndex(t))},s.prototype.next=function(){var 
t=this.getIndex();t<this.values.length-1&&(t++,this.setIndex(t))},s.prototype.playNext=function(){var
 t=new 
Date,e=this.getIndex();e<this.values.length-1?(e++,this.setIndex(e)):this.playLoop&&(e=0,this.setIndex(e));var
 i=new 
Date,s=i-t,o=Math.max(this.playInterval-s,0),n=this;this.playTimeout=setTimeout(function(){n.playNext()},o)},s.prototype.togglePlay=function(){void
 
0===this.playTimeout?this.play():this.stop()},s.prototype.play=function(){this.playTimeout||(this.playNext(),this.frame&&(this.frame.play.value="Stop"))},s.prototype.stop=function(){clearInterval(this.playTimeout),this.playTimeout=void
 
0,this.frame&&(this.frame.play.value="Play")},s.prototype.setOnChangeCallback=function(t){this.onChangeCallback=t},s
 
.prototype.setPlayInterval=function(t){this.playInterval=t},s.prototype.getPlayInterval=function(){return
 
this.playInterval},s.prototype.setPlayLoop=function(t){this.playLoop=t},s.prototype.onChange=function(){void
 
0!==this.onChangeCallback&&this.onChangeCallback()},s.prototype.redraw=function(){if(this.frame){this.frame.bar.style.top=this.frame.clientHeight/2-this.frame.bar.offsetHeight/2+"px",this.frame.bar.style.width=this.frame.clientWidth-this.frame.prev.clientWidth-this.frame.play.clientWidth-this.frame.next.clientWidth-30+"px";var
 
t=this.indexToLeft(this.index);this.frame.slide.style.left=t+"px"}},s.prototype.setValues=function(t){this.values=t,this.values.length>0?this.setIndex(0):this.index=void
 0},s.prototype.setIndex=function(t){if(!(t<this.values.length))throw"Error: 
index out of 
range";this.index=t,this.redraw(),this.onChange()},s.prototype.getIndex=function(){return
 this.index},s.prototype.get=function(){return 
this.values[this.index]},s.prototype._onMouseDown=function
 (t){var 
e=t.which?1===t.which:1===t.button;if(e){this.startClientX=t.clientX,this.startSlideX=parseFloat(this.frame.slide.style.left),this.frame.style.cursor="move";var
 
i=this;this.onmousemove=function(t){i._onMouseMove(t)},this.onmouseup=function(t){i._onMouseUp(t)},o.addEventListener(document,"mousemove",this.onmousemove),o.addEventListener(document,"mouseup",this.onmouseup),o.preventDefault(t)}},s.prototype.leftToIndex=function(t){var
 
e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,i=t-3,s=Math.round(i/e*(this.values.length-1));return
 
0>s&&(s=0),s>this.values.length-1&&(s=this.values.length-1),s},s.prototype.indexToLeft=function(t){var
 
e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,i=t/(this.values.length-1)*e,s=i+3;return
 s},s.prototype._onMouseMove=function(t){var 
e=t.clientX-this.startClientX,i=this.startSlideX+e,s=this.leftToIndex(i);this.setIndex(s),o.preventDefault()},s.prototype._onMouseUp=function(){this.frame.style.curso
 
r="auto",o.removeEventListener(document,"mousemove",this.onmousemove),o.removeEventListener(document,"mouseup",this.onmouseup),o.preventDefault()},t.exports=s},function(t){function
 
e(t,e,i,s){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,s)}e.prototype.setRange=function(t,e,i,s){this._start=t?t:0,this._end=e?e:0,this.setStep(i,s)},e.prototype.setStep=function(t,i){void
 0===t||0>=t||(void 
0!==i&&(this.prettyStep=i),this._step=this.prettyStep===!0?e.calculatePrettyStep(t):t)},e.calculatePrettyStep=function(t){var
 e=function(t){return 
Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),s=2*Math.pow(10,Math.round(e(t/2))),o=5*Math.pow(10,Math.round(e(t/5))),n=i;return
 
Math.abs(s-t)<=Math.abs(n-t)&&(n=s),Math.abs(o-t)<=Math.abs(n-t)&&(n=o),0>=n&&(n=1),n},e.prototype.getCurrent=function(){return
 
parseFloat(this._current.toPrecision(this.precision))},e.prototype.getStep=function(){return
 this._step},e.prototype.start=funct
 
ion(){this._current=this._start-this._start%this._step},e.prototype.next=function(){this._current+=this._step},e.prototype.end=function(){return
 this._current>this._end},t.exports=e},function(t,e,i){function 
s(t,e,i,r){if(!(this instanceof s))throw new SyntaxError("Constructor must be 
called with the new operator");if(!(Array.isArray(i)||i instanceof n)&&i 
instanceof Object){var h=r;r=i,i=h}var 
u=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:"bottom",width:null,height:null,maxHeight:null,minHeight:null},this.options=o.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{snap:null,toScreen:u._toScreen.bind(u),toGlobalScreen:u._toGlobalScreen.bind(u),toTime:u._toTime.bind(u),toGlobalTime:u._toGlobalTime.bind(u)}},this.range=new
 a(this.body),this.components.push(this.range),this.body.range=this.rang
 e,this.timeAxis=new 
d(this.body),this.components.push(this.timeAxis),this.body.util.snap=this.timeAxis.snap.bind(this.timeAxis),this.currentTime=new
 l(this.body),this.components.push(this.currentTime),this.customTime=new 
c(this.body),this.components.push(this.customTime),this.itemSet=new 
p(this.body),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,r&&this.setOptions(r),i&&this.setGroups(i),e?this.setItems(e):this.redraw()}var
 
o=(i(56),i(45),i(1)),n=i(3),r=i(4),a=i(17),h=i(46),d=i(30),l=i(21),c=i(22),p=i(27);s.prototype=new
 h,s.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?t 
instanceof n||t instanceof r?t:new 
n(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e),i)if(void
 0!=this.options.start||void 0!=this.options.end){if(void 
0==this.options.start||void 0==this.options.end)var s=this._getDataRange();var 
o=void 0!=this.options.start?this.options.start:s.start,a=void 
0!=this.options.end?this
 .options.end:s.end;this.setWindow(o,a,{animate:!1})}else 
this.fit({animate:!1})},s.prototype.setGroups=function(t){var e;e=t?t 
instanceof n||t instanceof r?t:new 
n(t):null,this.groupsData=e,this.itemSet.setGroups(e)},s.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},s.prototype.getSelection=function(){return
 
this.itemSet&&this.itemSet.getSelection()||[]},s.prototype.focus=function(t,e){if(this.itemsData&&void
 0!=t){var 
i=Array.isArray(t)?t:[t],s=this.itemsData.getDataSet().get(i,{type:{start:"Date",end:"Date"}}),o=null,n=null;if(s.forEach(function(t){var
 e=t.start.valueOf(),i="end"in 
t?t.end.valueOf():t.start.valueOf();(null===o||o>e)&&(o=e),(null===n||i>n)&&(n=i)}),null!==o&&null!==n){var
 r=(o+n)/2,a=Math.max(this.range.end-this.range.start,1.1*(n-o)),h=e&&void 
0!==e.animate?e.animate:!0;this.range.setRange(r-a/2,r+a/2,h)}}},s.prototype.getItemRange=function(){var
 t=this.itemsData.getDataSet(),e=null,i=null;if(t){var s=t.
 min("start");e=s?o.convert(s.start,"Date").valueOf():null;var 
n=t.max("start");n&&(i=o.convert(n.start,"Date").valueOf());var 
r=t.max("end");r&&(i=null==i?o.convert(r.end,"Date").valueOf():Math.max(i,o.convert(r.end,"Date").valueOf()))}return{min:null!=e?new
 Date(e):null,max:null!=i?new 
Date(i):null}},t.exports=s},function(t,e,i){function 
s(t,e,i,s){if(!(Array.isArray(i)||i instanceof n)&&i instanceof Object){var 
r=s;s=i,i=r}var 
h=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:"bottom",width:null,height:null,maxHeight:null,minHeight:null},this.options=o.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{snap:null,toScreen:h._toScreen.bind(h),toGlobalScreen:h._toGlobalScreen.bind(h),toTime:h._toTime.bind(h),toGlobalTime:h._toGlobalTime.bind(h)}},this.range=new
 a(this.body),this.components.push(th
 is.range),this.body.range=this.range,this.timeAxis=new 
d(this.body),this.components.push(this.timeAxis),this.body.util.snap=this.timeAxis.snap.bind(this.timeAxis),this.currentTime=new
 l(this.body),this.components.push(this.currentTime),this.customTime=new 
c(this.body),this.components.push(this.customTime),this.linegraph=new 
p(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,s&&this.setOptions(s),i&&this.setGroups(i),e?this.setItems(e):this.redraw()}var
 
o=(i(56),i(45),i(1)),n=i(3),r=i(4),a=i(17),h=i(46),d=i(30),l=i(21),c=i(22),p=i(29);s.prototype=new
 h,s.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?t 
instanceof n||t instanceof r?t:new 
n(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.linegraph&&this.linegraph.setItems(e),i)if(void
 0!=this.options.start||void 0!=this.options.end){var s=void 
0!=this.options.start?this.options.start:null,o=void 
0!=this.options.end?this.options.end:null;this.setWindow(s,o,{anima
 te:!1})}else this.fit({animate:!1})},s.prototype.setGroups=function(t){var 
e;e=t?t instanceof n||t instanceof r?t:new 
n(t):null,this.groupsData=e,this.linegraph.setGroups(e)},s.prototype.getLegend=function(t,e,i){return
 void 0===e&&(e=15),void 0===i&&(i=15),void 
0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,i):"cannot 
find group:"+t},s.prototype.isGroupVisible=function(t){return void 
0!==this.linegraph.groups[t]?this.linegraph.groups[t].visible&&(void 
0===this.linegraph.options.groups.visibility[t]||1==this.linegraph.options.groups.visibility[t]):!1},s.prototype.getItemRange=function(){var
 t=null,e=null;for(var i in 
this.linegraph.groups)if(this.linegraph.groups.hasOwnProperty(i)&&1==this.linegraph.groups[i].visible)for(var
 s=0;s<this.linegraph.groups[i].itemsData.length;s++){var 
n=this.linegraph.groups[i].itemsData[s],r=o.convert(n.x,"Date").valueOf();t=null==t?r:t>r?r:t,e=null==e?r:r>e?r:e}return{min:null!=t?new
 Date(t):null,max:null!=e?new Date(e):null}},t.exp
 orts=s},function(t,e,i){var 
s=i(44);e.convertHiddenOptions=function(t,e){if(t.hiddenDates=[],e&&1==Array.isArray(e)){for(var
 i=0;i<e.length;i++)if(void 0===e[i].repeat){var 
o={};o.start=s(e[i].start).toDate().valueOf(),o.end=s(e[i].end).toDate().valueOf(),t.hiddenDates.push(o)}t.hiddenDates.sort(function(t,e){return
 t.start-e.start})}},e.updateHiddenDates=function(t,i){if(i&&void 
0!==t.domProps.centerContainer.width){e.convertHiddenOptions(t,i);for(var 
o=s(t.range.start),n=s(t.range.end),r=t.range.end-t.range.start,a=r/t.domProps.centerContainer.width,h=0;h<i.length;h++)if(void
 0!==i[h].repeat){var d=s(i[h].start),l=s(i[h].end);if("Invalid 
Date"==d._d)throw new Error("Supplied start date is not valid: 
"+i[h].start);if("Invalid Date"==l._d)throw new Error("Supplied end date is not 
valid: "+i[h].end);var c=l-d;if(c>=4*a){var 
p=0,u=n.clone();switch(i[h].repeat){case"daily":d.day()!=l.day()&&(p=1),d.dayOfYear(o.dayOfYear()),d.year(o.year()),d.subtract(7,"days"),l.dayOfYear(o.dayOfYear()
 
),l.year(o.year()),l.subtract(7-p,"days"),u.add(1,"weeks");break;case"weekly":var
 
m=l.diff(d,"days"),f=d.day();d.date(o.date()),d.month(o.month()),d.year(o.year()),l=d.clone(),d.day(f),l.day(f),l.add(m,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),u.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(p=1),d.month(o.month()),d.year(o.year()),d.subtract(1,"months"),l.month(o.month()),l.year(o.year()),l.subtract(1,"months"),l.add(p,"months"),u.add(1,"months");break;case"yearly":d.year()!=l.year()&&(p=1),d.year(o.year()),d.subtract(1,"years"),l.year(o.year()),l.subtract(1,"years"),l.add(p,"years"),u.add(1,"years");break;default:return
 void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, 
yearly. 
Given:",i[h].repeat)}for(;u>d;)switch(t.hiddenDates.push({start:d.valueOf(),end:l.valueOf()}),i[h].repeat){case"daily":d.add(1,"days"),l.add(1,"days");break;case"weekly":d.add(1,"weeks"),l.add(1,"weeks");break;case"monthly":d.add(1,"months"),l.add(1,"months");br
 eak;case"yearly":d.add(1,"y"),l.add(1,"y");break;default:return void 
console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. 
Given:",i[h].repeat)}t.hiddenDates.push({start:d.valueOf(),end:l.valueOf()})}}e.removeDuplicates(t);var
 
g=e.isHidden(t.range.start,t.hiddenDates),v=e.isHidden(t.range.end,t.hiddenDates),y=t.range.start,b=t.range.end;1==g.hidden&&(y=1==t.range.startToFront?g.startDate-1:g.endDate+1),1==v.hidden&&(b=1==t.range.endToFront?v.startDate-1:v.endDate+1),(1==g.hidden||1==v.hidden)&&t.range._applyRange(y,b)}},e.removeDuplicates=function(t){for(var
 e=t.hiddenDates,i=[],s=0;s<e.length;s++)for(var 
o=0;o<e.length;o++)s!=o&&1!=e[o].remove&&1!=e[s].remove&&(e[o].start>=e[s].start&&e[o].end<=e[s].end?e[o].remove=!0:e[o].start>=e[s].start&&e[o].start<=e[s].end?(e[s].end=e[o].end,e[o].remove=!0):e[o].end>=e[s].start&&e[o].end<=e[s].end&&(e[s].start=e[o].start,e[o].remove=!0));for(var
 s=0;s<e.length;s++)e[s].remove!==!0&&i.push(e[s]);t.hiddenDates=i,t.hidde
 nDates.sort(function(t,e){return 
t.start-e.start})},e.printDates=function(t){for(var 
e=0;e<t.length;e++)console.log(e,new Date(t[e].start),new 
Date(t[e].end),t[e].start,t[e].end,t[e].remove)},e.stepOverHiddenDates=function(t,e){for(var
 i=!1,o=t.current.valueOf(),n=0;n<t.hiddenDates.length;n++){var 
r=t.hiddenDates[n].start,a=t.hiddenDates[n].end;if(o>=r&&a>o){i=!0;break}}if(1==i&&o<t._end.valueOf()&&o!=e){var
 
h=s(e),d=s(a);h.year()!=d.year()?t.switchedYear=!0:h.month()!=d.month()?t.switchedMonth=!0:h.dayOfYear()!=d.dayOfYear()&&(t.switchedDay=!0),t.current=d.toDate()}},e.toScreen=function(t,i,s){if(0==t.body.hiddenDates.length){var
 o=t.range.conversion(s);return(i.valueOf()-o.offset)*o.scale}var 
n=e.isHidden(i,t.body.hiddenDates);1==n.hidden&&(i=n.startDate);var 
r=e.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end);i=e.correctTimeForHidden(t.body.hiddenDates,t.range,i);var
 
o=t.range.conversion(s,r);return(i.valueOf()-o.offset)*o.scale},e.toTime=function(t,i,s){if
 (0==t.body.hiddenDates.length){var o=t.range.conversion(s);return new 
Date(i/o.scale+o.offset)}var 
n=e.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end),r=t.range.end-t.range.start-n,a=r*i/s,h=e.getAccumulatedHiddenDuration(t.body.hiddenDates,t.range,a),d=new
 Date(h+a+t.range.start);return 
d},e.getHiddenDurationBetween=function(t,e,i){for(var 
s=0,o=0;o<t.length;o++){var n=t[o].start,r=t[o].end;n>=e&&i>r&&(s+=r-n)}return 
s},e.correctTimeForHidden=function(t,i,o){return 
o=s(o).toDate().valueOf(),o-=e.getHiddenDurationBefore(t,i,o)},e.getHiddenDurationBefore=function(t,e,i){var
 o=0;i=s(i).toDate().valueOf();for(var n=0;n<t.length;n++){var 
r=t[n].start,a=t[n].end;r>=e.start&&a<e.end&&i>=a&&(o+=a-r)}return 
o},e.getAccumulatedHiddenDuration=function(t,e,i){for(var 
s=0,o=0,n=e.start,r=0;r<t.length;r++){var 
a=t[r].start,h=t[r].end;if(a>=e.start&&h<e.end){if(o+=a-n,n=h,o>=i)break;s+=h-a}}return
 s},e.snapAwayFromHidden=function(t,i,s,o){var n=e.isHidden(i,t);return 1==n.h
 
idden?0>s?1==o?n.startDate-(n.endDate-i)-1:n.startDate-1:1==o?n.endDate+(i-n.startDate)+1:n.endDate+1:i},e.isHidden=function(t,e){for(var
 i=0;i<e.length;i++){var 
s=e[i].start,o=e[i].end;if(t>=s&&o>t)return{hidden:!0,startDate:s,endDate:o}}return{hidden:!1,startDate:s,endDate:o}}},function(t){function
 
e(t,e,i,s,o,n){this.current=0,this.autoScale=!0,this.stepIndex=0,this.step=1,this.scale=1,this.marginStart,this.marginEnd,this.deadSpace=0,this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.alignZeros=n,this.setRange(t,e,i,s,o)}e.prototype.setRange=function(t,e,i,s,o){this._start=void
 0===o.min?t:o.min,this._end=void 
0===o.max?e:o.max,this._start==this._end&&(this._start-=.75,this._end+=1),1==this.autoScale&&this.setMinimumStep(i,s),this.setFirst(o)},e.prototype.setMinimumStep=function(t,e){var
 
i=this._end-this._start,s=1.2*i,o=t*(s/e),n=Math.round(Math.log(s)/Math.LN10),r=-1,a=Math.pow(10,n),h=0;0>n&&(h=n);for(var
 d=!1,l=h;Math.abs(l)<=Math.abs(n);l++){a=Math.pow(10,l);for(va
 r c=0;c<this.minorSteps.length;c++){var 
p=a*this.minorSteps[c];if(p>=o){d=!0,r=c;break}}if(1==d)break}this.stepIndex=r,this.scale=a,this.step=a*this.minorSteps[r]},e.prototype.setFirst=function(t){void
 0===t&&(t={});var e=void 
0===t.min?this._start-2*this.scale*this.minorSteps[this.stepIndex]:t.min,i=void 
0===t.max?this._end+this.scale*this.minorSteps[this.stepIndex]:t.max;this.marginEnd=void
 0===t.max?this.roundToMinor(i):t.max,this.marginStart=void 
0===t.min?this.roundToMinor(e):t.min,1==this.alignZeros&&(this.marginEnd-this.marginStart)%this.step!=0&&(this.marginEnd+=this.marginEnd%this.step),this.deadSpace=this.roundToMinor(i)-i+this.roundToMinor(e)-e,this.marginRange=this.marginEnd-this.marginStart,this.current=this.marginEnd},e.prototype.roundToMinor=function(t){var
 e=t-t%(this.scale*this.minorSteps[this.stepIndex]);return 
t%(this.scale*this.minorSteps[this.stepIndex])>.5*this.scale*this.minorSteps[this.stepIndex]?e+this.scale*this.minorSteps[this.stepIndex]:e},e.prototype.has
 Next=function(){return 
this.current>=this.marginStart},e.prototype.next=function(){var 
t=this.current;this.current-=this.step,this.current==t&&(this.current=this._end)},e.prototype.previous=function(){this.current+=this.step,this.marginEnd+=this.step,this.marginRange=this.marginEnd-this.marginStart},e.prototype.getCurrent=function(t){var
 
e=Math.abs(this.current)<this.step/2?0:this.current,i=""+Number(e).toPrecision(5);if(void
 0===t||isNaN(Number(t))){if(-1!=i.indexOf(",")||-1!=i.indexOf("."))for(var 
s=i.length-1;s>0;s--){if("0"!=i[s]){if("."==i[s]||","==i[s]){i=i.slice(0,s);break}break}i=i.slice(0,s)}}else{var
 
o="",n=i.indexOf("e");if(-1!=n&&(o=i.slice(n),i=i.slice(0,n)),n=Math.max(i.indexOf(","),i.indexOf(".")),-1===n?(0!==t&&(i+="."),n=i.length+t):0!==t&&(n+=t+1),n>i.length)for(var
 r=n-i.length;r>0;r--)i+="0";else i=i.slice(0,n);i+=o}return 
i},e.prototype.snap=function(){},e.prototype.isMajor=function(){return 
this.current%(this.scale*this.majorSteps[this.stepIndex])==0},t.exports
 =e},function(t,e,i){function s(t,e){var 
i=a().hours(0).minutes(0).seconds(0).milliseconds(0);this.start=i.clone().add(-3,"days").valueOf(),this.end=i.clone().add(4,"days").valueOf(),this.body=t,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={start:null,end:null,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10},this.options=r.extend({},this.defaultOptions),this.props={touch:{}},this.animateTimer=null,this.body.emitter.on("panstart",this._onDragStart.bind(this)),this.body.emitter.on("panmove",this._onDrag.bind(this)),this.body.emitter.on("panend",this._onDragEnd.bind(this)),this.body.emitter.on("press",this._onHold.bind(this)),this.body.emitter.on("mousewheel",this._onMouseWheel.bind(this)),this.body.emitter.on("touch",this._onTouch.bind(this)),this.body.emitter.on("pinch",this._onPinch.bind(this)),this.setOptions(e)}function
 o(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Un
 known direction "'+t+'". Choose "horizontal" or "vertical".')}function 
n(t,e){return{x:t.x-r.getAbsoluteLeft(e),y:t.y-r.getAbsoluteTop(e)}}var 
r=i(1),a=(i(47),i(44)),h=i(20),d=i(15);s.prototype=new 
h,s.prototype.setOptions=function(t){if(t){var 
e=["direction","min","max","zoomMin","zoomMax","moveable","zoomable","activate","hiddenDates"];r.selectiveExtend(e,this.options,t),("start"in
 t||"end"in 
t)&&this.setRange(t.start,t.end)}},s.prototype.setRange=function(t,e,i,s){s!==!0&&(s=!1);var
 o=void 0!=t?r.convert(t,"Date").valueOf():null,n=void 
0!=e?r.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),i){var 
a=this,h=this.start,l=this.end,c="number"==typeof i?i:500,p=(new 
Date).valueOf(),u=!1,m=function(){if(!a.props.touch.dragging){var t=(new 
Date).valueOf(),e=t-p,i=e>c,g=i||null===o?o:r.easeInOutQuad(e,h,o,c),v=i||null===n?n:r.easeInOutQuad(e,l,n,c);f=a._applyRange(g,v),d.updateHiddenDates(a.body,a.options.hiddenDates),u=u||f,f&&a.body.emitter.emit("rangechange",{start:new
 Date
 (a.start),end:new 
Date(a.end),byUser:s}),i?u&&a.body.emitter.emit("rangechanged",{start:new 
Date(a.start),end:new 
Date(a.end),byUser:s}):a.animateTimer=setTimeout(m,20)}};return m()}var 
f=this._applyRange(o,n);if(d.updateHiddenDates(this.body,this.options.hiddenDates),f){var
 g={start:new Date(this.start),end:new 
Date(this.end),byUser:s};this.body.emitter.emit("rangechange",g),this.body.emitter.emit("rangechanged",g)}},s.prototype._cancelAnimation=function(){this.animateTimer&&(clearTimeout(this.animateTimer),this.animateTimer=null)},s.prototype._applyRange=function(t,e){var
 
i,s=null!=t?r.convert(t,"Date").valueOf():this.start,o=null!=e?r.convert(e,"Date").valueOf():this.end,n=null!=this.options.max?r.convert(this.options.max,"Date").valueOf():null,a=null!=this.options.min?r.convert(this.options.min,"Date").valueOf():null;if(isNaN(s)||null===s)throw
 new Error('Invalid start "'+t+'"');if(isNaN(o)||null===o)throw new 
Error('Invalid end "'+e+'"');if(s>o&&(o=s),null!==a&&a>s&&(i=a-s,s+=i
 
,o+=i,null!=n&&o>n&&(o=n)),null!==n&&o>n&&(i=o-n,s-=i,o-=i,null!=a&&a>s&&(s=a)),null!==this.options.zoomMin){var
 
h=parseFloat(this.options.zoomMin);0>h&&(h=0),h>o-s&&(this.end-this.start===h?(s=this.start,o=this.end):(i=h-(o-s),s-=i/2,o+=i/2))}if(null!==this.options.zoomMax){var
 
d=parseFloat(this.options.zoomMax);0>d&&(d=0),o-s>d&&(this.end-this.start===d?(s=this.start,o=this.end):(i=o-s-d,s+=i/2,o-=i/2))}var
 l=this.start!=s||this.end!=o;return 
s>=this.start&&s<=this.end||o>=this.start&&o<=this.end||this.start>=s&&this.start<=o||this.end>=s&&this.end<=o||this.body.emitter.emit("checkRangedItems"),this.start=s,this.end=o,l},s.prototype.getRange=function(){return{start:this.start,end:this.end}},s.prototype.conversion=function(t,e){return
 s.conversion(this.start,this.end,t,e)},s.conversion=function(t,e,i,s){return 
void 
0===s&&(s=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-s)}:{offset:0,scale:1}},s.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.mo
 
veable&&this.props.touch.allowDragging&&(this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"),t.preventDefault())},s.prototype._onDrag=function(t){if(this.options.moveable&&

<TRUNCATED>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to