Files
web/web_timeline/static/lib/vis-timeline/vis-timeline-graph2d.min.js
2022-08-02 14:35:04 +02:00

61 lines
444 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* vis-timeline and vis-graph2d
* https://visjs.github.io/vis-timeline/
*
* Create a fully customizable, interactive timeline with items and ranges.
*
* @version 7.3.4
* @date 2020-03-18T17:05:04.052Z
*
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
*
* @license
* vis.js is dual licensed under both
*
* 1. The Apache 2.0 License
* http://www.apache.org/licenses/LICENSE-2.0
*
* and
*
* 2. The MIT License
* http://opensource.org/licenses/MIT
*
* vis.js may be distributed under either license.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).vis=t.vis||{})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function n(t,e){return t(e={exports:{}},e.exports),e.exports}function o(t){return t&&t.default||t}var r=n((function(t,e){t.exports=function(){var e,n;function o(){return e.apply(null,arguments)}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function s(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function a(t){return void 0===t}function l(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function h(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function u(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function c(t,e){for(var i in e)d(e,i)&&(t[i]=e[i]);return d(e,"toString")&&(t.toString=e.toString),d(e,"valueOf")&&(t.valueOf=e.valueOf),t}function p(t,e,i,n){return De(t,e,i,n,!0).utc()}function m(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function f(t){if(null==t._isValid){var e=m(t),i=n.call(e.parsedDateParts,(function(t){return null!=t})),o=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(o=o&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return o;t._isValid=o}return t._isValid}function v(t){var e=p(NaN);return null!=t?c(m(e),t):m(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;n<i;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var g=o.momentProperties=[];function y(t,e){var i,n,o;if(a(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),a(e._i)||(t._i=e._i),a(e._f)||(t._f=e._f),a(e._l)||(t._l=e._l),a(e._strict)||(t._strict=e._strict),a(e._tzm)||(t._tzm=e._tzm),a(e._isUTC)||(t._isUTC=e._isUTC),a(e._offset)||(t._offset=e._offset),a(e._pf)||(t._pf=m(e)),a(e._locale)||(t._locale=e._locale),g.length>0)for(i=0;i<g.length;i++)a(o=e[n=g[i]])||(t[n]=o);return t}var b=!1;function _(t){y(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,o.updateOffset(this),b=!1)}function w(t){return t instanceof _||null!=t&&null!=t._isAMomentObject}function k(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function x(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=k(e)),i}function D(t,e,i){var n,o=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),s=0;for(n=0;n<o;n++)(i&&t[n]!==e[n]||!i&&x(t[n])!==x(e[n]))&&s++;return s+r}function S(t){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function M(t,e){var i=!0;return c((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,t),i){for(var n,r=[],s=0;s<arguments.length;s++){if(n="","object"==typeof arguments[s]){for(var a in n+="\n["+s+"] ",arguments[0])n+=a+": "+arguments[0][a]+", ";n=n.slice(0,-2)}else n=arguments[s];r.push(n)}S(t+"\nArguments: "+Array.prototype.slice.call(r).join("")+"\n"+(new Error).stack),i=!1}return e.apply(this,arguments)}),e)}var T,C={};function O(t,e){null!=o.deprecationHandler&&o.deprecationHandler(t,e),C[t]||(S(e),C[t]=!0)}function E(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function P(t,e){var i,n=c({},t);for(i in e)d(e,i)&&(s(t[i])&&s(e[i])?(n[i]={},c(n[i],t[i]),c(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);for(i in t)d(t,i)&&!d(e,i)&&s(t[i])&&(n[i]=c({},n[i]));return n}function L(t){null!=t&&this.set(t)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,T=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)d(t,e)&&i.push(e);return i};var I={};function A(t,e){var i=t.toLowerCase();I[i]=I[i+"s"]=I[e]=t}function N(t){return"string"==typeof t?I[t]||I[t.toLowerCase()]:void 0}function Y(t){var e,i,n={};for(i in t)d(t,i)&&(e=N(i))&&(n[e]=t[i]);return n}var R={};function j(t,e){R[t]=e}function F(t,e,i){var n=""+Math.abs(t),o=e-n.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}var H=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,G={},W={};function V(t,e,i,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),t&&(W[t]=o),e&&(W[e[0]]=function(){return F(o.apply(this,arguments),e[1],e[2])}),i&&(W[i]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function B(t,e){return t.isValid()?(e=U(e,t.localeData()),G[e]=G[e]||function(t){var e,i,n,o=t.match(H);for(e=0,i=o.length;e<i;e++)W[o[e]]?o[e]=W[o[e]]:o[e]=(n=o[e]).match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"");return function(e){var n,r="";for(n=0;n<i;n++)r+=E(o[n])?o[n].call(e,t):o[n];return r}}(e),G[e](t)):t.localeData().invalidDate()}function U(t,e){var i=5;function n(t){return e.longDateFormat(t)||t}for(z.lastIndex=0;i>=0&&z.test(t);)t=t.replace(z,n),z.lastIndex=0,i-=1;return t}var X=/\d/,q=/\d\d/,Z=/\d{3}/,K=/\d{4}/,$=/[+-]?\d{6}/,J=/\d\d?/,Q=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,it=/\d{1,4}/,nt=/[+-]?\d{1,6}/,ot=/\d+/,rt=/[+-]?\d+/,st=/Z|[+-]\d\d:?\d\d/gi,at=/Z|[+-]\d\d(?::?\d\d)?/gi,lt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ht={};function ut(t,e,i){ht[t]=E(e)?e:function(t,n){return t&&i?i:e}}function dt(t,e){return d(ht,t)?ht[t](e._strict,e._locale):new RegExp(ct(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,i,n,o){return e||i||n||o}))))}function ct(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pt={};function mt(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),l(e)&&(n=function(t,i){i[e]=x(t)}),i=0;i<t.length;i++)pt[t[i]]=n}function ft(t,e){mt(t,(function(t,i,n,o){n._w=n._w||{},e(t,n._w,n,o)}))}function vt(t,e,i){null!=e&&d(pt,t)&&pt[t](e,i._a,i,t)}function gt(t){return yt(t)?366:365}function yt(t){return t%4==0&&t%100!=0||t%400==0}V("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),V(0,["YY",2],0,(function(){return this.year()%100})),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),A("year","y"),j("year",1),ut("Y",rt),ut("YY",J,q),ut("YYYY",it,K),ut("YYYYY",nt,$),ut("YYYYYY",nt,$),mt(["YYYYY","YYYYYY"],0),mt("YYYY",(function(t,e){e[0]=2===t.length?o.parseTwoDigitYear(t):x(t)})),mt("YY",(function(t,e){e[0]=o.parseTwoDigitYear(t)})),mt("Y",(function(t,e){e[0]=parseInt(t,10)})),o.parseTwoDigitYear=function(t){return x(t)+(x(t)>68?1900:2e3)};var bt,_t=wt("FullYear",!0);function wt(t,e){return function(i){return null!=i?(xt(this,t,i),o.updateOffset(this,e),this):kt(this,t)}}function kt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function xt(t,e,i){t.isValid()&&!isNaN(i)&&("FullYear"===e&&yt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),Dt(i,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](i))}function Dt(t,e){if(isNaN(t)||isNaN(e))return NaN;var i,n=(e%(i=12)+i)%i;return t+=(e-n)/12,1===n?yt(t)?29:28:31-n%7%2}bt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},V("M",["MM",2],"Mo",(function(){return this.month()+1})),V("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),V("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),A("month","M"),j("month",8),ut("M",J),ut("MM",J,q),ut("MMM",(function(t,e){return e.monthsShortRegex(t)})),ut("MMMM",(function(t,e){return e.monthsRegex(t)})),mt(["M","MM"],(function(t,e){e[1]=x(t)-1})),mt(["MMM","MMMM"],(function(t,e,i,n){var o=i._locale.monthsParse(t,n,i._strict);null!=o?e[1]=o:m(i).invalidMonth=t}));var St=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Mt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ct(t,e,i){var n,o,r,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)r=p([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(r,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(o=bt.call(this._shortMonthsParse,s))?o:null:-1!==(o=bt.call(this._longMonthsParse,s))?o:null:"MMM"===e?-1!==(o=bt.call(this._shortMonthsParse,s))||-1!==(o=bt.call(this._longMonthsParse,s))?o:null:-1!==(o=bt.call(this._longMonthsParse,s))||-1!==(o=bt.call(this._shortMonthsParse,s))?o:null}function Ot(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=x(e);else if(!l(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),Dt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function Et(t){return null!=t?(Ot(this,t),o.updateOffset(this,!0),this):kt(this,"Month")}var Pt=lt,Lt=lt;function It(){function t(t,e){return e.length-t.length}var e,i,n=[],o=[],r=[];for(e=0;e<12;e++)i=p([2e3,e]),n.push(this.monthsShort(i,"")),o.push(this.months(i,"")),r.push(this.months(i,"")),r.push(this.monthsShort(i,""));for(n.sort(t),o.sort(t),r.sort(t),e=0;e<12;e++)n[e]=ct(n[e]),o[e]=ct(o[e]);for(e=0;e<24;e++)r[e]=ct(r[e]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function At(t,e,i,n,o,r,s){var a;return t<100&&t>=0?(a=new Date(t+400,e,i,n,o,r,s),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,i,n,o,r,s),a}function Nt(t){var e;if(t<100&&t>=0){var i=Array.prototype.slice.call(arguments);i[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Yt(t,e,i){var n=7+e-i;return-(7+Nt(t,0,n).getUTCDay()-e)%7+n-1}function Rt(t,e,i,n,o){var r,s,a=1+7*(e-1)+(7+i-n)%7+Yt(t,n,o);return a<=0?s=gt(r=t-1)+a:a>gt(t)?(r=t+1,s=a-gt(t)):(r=t,s=a),{year:r,dayOfYear:s}}function jt(t,e,i){var n,o,r=Yt(t.year(),e,i),s=Math.floor((t.dayOfYear()-r-1)/7)+1;return s<1?n=s+Ft(o=t.year()-1,e,i):s>Ft(t.year(),e,i)?(n=s-Ft(t.year(),e,i),o=t.year()+1):(o=t.year(),n=s),{week:n,year:o}}function Ft(t,e,i){var n=Yt(t,e,i),o=Yt(t+1,e,i);return(gt(t)-n+o)/7}function Ht(t,e){return t.slice(e,7).concat(t.slice(0,e))}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),j("week",5),j("isoWeek",5),ut("w",J),ut("ww",J,q),ut("W",J),ut("WW",J,q),ft(["w","ww","W","WW"],(function(t,e,i,n){e[n.substr(0,1)]=x(t)})),V("d",0,"do","day"),V("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),V("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),V("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),j("day",11),j("weekday",11),j("isoWeekday",11),ut("d",J),ut("e",J),ut("E",J),ut("dd",(function(t,e){return e.weekdaysMinRegex(t)})),ut("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),ut("dddd",(function(t,e){return e.weekdaysRegex(t)})),ft(["dd","ddd","dddd"],(function(t,e,i,n){var o=i._locale.weekdaysParse(t,n,i._strict);null!=o?e.d=o:m(i).invalidWeekday=t})),ft(["d","e","E"],(function(t,e,i,n){e[n]=x(t)}));var zt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Gt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Wt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Vt(t,e,i){var n,o,r,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)r=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(r,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(o=bt.call(this._weekdaysParse,s))?o:null:"ddd"===e?-1!==(o=bt.call(this._shortWeekdaysParse,s))?o:null:-1!==(o=bt.call(this._minWeekdaysParse,s))?o:null:"dddd"===e?-1!==(o=bt.call(this._weekdaysParse,s))||-1!==(o=bt.call(this._shortWeekdaysParse,s))||-1!==(o=bt.call(this._minWeekdaysParse,s))?o:null:"ddd"===e?-1!==(o=bt.call(this._shortWeekdaysParse,s))||-1!==(o=bt.call(this._weekdaysParse,s))||-1!==(o=bt.call(this._minWeekdaysParse,s))?o:null:-1!==(o=bt.call(this._minWeekdaysParse,s))||-1!==(o=bt.call(this._weekdaysParse,s))||-1!==(o=bt.call(this._shortWeekdaysParse,s))?o:null}var Bt=lt,Ut=lt,Xt=lt;function qt(){function t(t,e){return e.length-t.length}var e,i,n,o,r,s=[],a=[],l=[],h=[];for(e=0;e<7;e++)i=p([2e3,1]).day(e),n=this.weekdaysMin(i,""),o=this.weekdaysShort(i,""),r=this.weekdays(i,""),s.push(n),a.push(o),l.push(r),h.push(n),h.push(o),h.push(r);for(s.sort(t),a.sort(t),l.sort(t),h.sort(t),e=0;e<7;e++)a[e]=ct(a[e]),l[e]=ct(l[e]),h[e]=ct(h[e]);this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Zt(){return this.hours()%12||12}function Kt(t,e){V(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function $t(t,e){return e._meridiemParse}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Zt),V("k",["kk",2],0,(function(){return this.hours()||24})),V("hmm",0,0,(function(){return""+Zt.apply(this)+F(this.minutes(),2)})),V("hmmss",0,0,(function(){return""+Zt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),V("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),V("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),Kt("a",!0),Kt("A",!1),A("hour","h"),j("hour",13),ut("a",$t),ut("A",$t),ut("H",J),ut("h",J),ut("k",J),ut("HH",J,q),ut("hh",J,q),ut("kk",J,q),ut("hmm",Q),ut("hmmss",tt),ut("Hmm",Q),ut("Hmmss",tt),mt(["H","HH"],3),mt(["k","kk"],(function(t,e,i){var n=x(t);e[3]=24===n?0:n})),mt(["a","A"],(function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t})),mt(["h","hh"],(function(t,e,i){e[3]=x(t),m(i).bigHour=!0})),mt("hmm",(function(t,e,i){var n=t.length-2;e[3]=x(t.substr(0,n)),e[4]=x(t.substr(n)),m(i).bigHour=!0})),mt("hmmss",(function(t,e,i){var n=t.length-4,o=t.length-2;e[3]=x(t.substr(0,n)),e[4]=x(t.substr(n,2)),e[5]=x(t.substr(o)),m(i).bigHour=!0})),mt("Hmm",(function(t,e,i){var n=t.length-2;e[3]=x(t.substr(0,n)),e[4]=x(t.substr(n))})),mt("Hmmss",(function(t,e,i){var n=t.length-4,o=t.length-2;e[3]=x(t.substr(0,n)),e[4]=x(t.substr(n,2)),e[5]=x(t.substr(o))}));var Jt,Qt=wt("Hours",!0),te={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Mt,monthsShort:Tt,week:{dow:0,doy:6},weekdays:zt,weekdaysMin:Wt,weekdaysShort:Gt,meridiemParse:/[ap]\.?m?\.?/i},ee={},ie={};function ne(t){return t?t.toLowerCase().replace("_","-"):t}function oe(e){var n=null;if(!ee[e]&&t&&t.exports)try{n=Jt._abbr,i(),re(n)}catch(t){}return ee[e]}function re(t,e){var i;return t&&((i=a(e)?ae(t):se(t,e))?Jt=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Jt._abbr}function se(t,e){if(null!==e){var i,n=te;if(e.abbr=t,null!=ee[t])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ee[t]._config;else if(null!=e.parentLocale)if(null!=ee[e.parentLocale])n=ee[e.parentLocale]._config;else{if(null==(i=oe(e.parentLocale)))return ie[e.parentLocale]||(ie[e.parentLocale]=[]),ie[e.parentLocale].push({name:t,config:e}),null;n=i._config}return ee[t]=new L(P(n,e)),ie[t]&&ie[t].forEach((function(t){se(t.name,t.config)})),re(t),ee[t]}return delete ee[t],null}function ae(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Jt;if(!r(t)){if(e=oe(t))return e;t=[t]}return function(t){for(var e,i,n,o,r=0;r<t.length;){for(e=(o=ne(t[r]).split("-")).length,i=(i=ne(t[r+1]))?i.split("-"):null;e>0;){if(n=oe(o.slice(0,e).join("-")))return n;if(i&&i.length>=e&&D(o,i,!0)>=e-1)break;e--}r++}return Jt}(t)}function le(t){var e,i=t._a;return i&&-2===m(t).overflow&&(e=i[1]<0||i[1]>11?1:i[2]<1||i[2]>Dt(i[0],i[1])?2:i[3]<0||i[3]>24||24===i[3]&&(0!==i[4]||0!==i[5]||0!==i[6])?3:i[4]<0||i[4]>59?4:i[5]<0||i[5]>59?5:i[6]<0||i[6]>999?6:-1,m(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),m(t)._overflowWeeks&&-1===e&&(e=7),m(t)._overflowWeekday&&-1===e&&(e=8),m(t).overflow=e),t}function he(t,e,i){return null!=t?t:null!=e?e:i}function ue(t){var e,i,n,r,s,a=[];if(!t._d){for(n=function(t){var e=new Date(o.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,i,n,o,r,s,a,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)r=1,s=4,i=he(e.GG,t._a[0],jt(Se(),1,4).year),n=he(e.W,1),((o=he(e.E,1))<1||o>7)&&(l=!0);else{r=t._locale._week.dow,s=t._locale._week.doy;var h=jt(Se(),r,s);i=he(e.gg,t._a[0],h.year),n=he(e.w,h.week),null!=e.d?((o=e.d)<0||o>6)&&(l=!0):null!=e.e?(o=e.e+r,(e.e<0||e.e>6)&&(l=!0)):o=r}n<1||n>Ft(i,r,s)?m(t)._overflowWeeks=!0:null!=l?m(t)._overflowWeekday=!0:(a=Rt(i,n,o,r,s),t._a[0]=a.year,t._dayOfYear=a.dayOfYear)}(t),null!=t._dayOfYear&&(s=he(t._a[0],n[0]),(t._dayOfYear>gt(s)||0===t._dayOfYear)&&(m(t)._overflowDayOfYear=!0),i=Nt(s,0,t._dayOfYear),t._a[1]=i.getUTCMonth(),t._a[2]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=a[e]=n[e];for(;e<7;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Nt:At).apply(null,a),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==r&&(m(t).weekdayMismatch=!0)}}var de=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pe=/Z|[+-]\d\d(?::?\d\d)?/,me=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],fe=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ve=/^\/?Date\((\-?\d+)/i;function ge(t){var e,i,n,o,r,s,a=t._i,l=de.exec(a)||ce.exec(a);if(l){for(m(t).iso=!0,e=0,i=me.length;e<i;e++)if(me[e][1].exec(l[1])){o=me[e][0],n=!1!==me[e][2];break}if(null==o)return void(t._isValid=!1);if(l[3]){for(e=0,i=fe.length;e<i;e++)if(fe[e][1].exec(l[3])){r=(l[2]||" ")+fe[e][0];break}if(null==r)return void(t._isValid=!1)}if(!n&&null!=r)return void(t._isValid=!1);if(l[4]){if(!pe.exec(l[4]))return void(t._isValid=!1);s="Z"}t._f=o+(r||"")+(s||""),ke(t)}else t._isValid=!1}var ye=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function be(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}var _e={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function we(t){var e,i,n,o,r,s,a,l=ye.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){var h=(e=l[4],i=l[3],n=l[2],o=l[5],r=l[6],s=l[7],a=[be(e),Tt.indexOf(i),parseInt(n,10),parseInt(o,10),parseInt(r,10)],s&&a.push(parseInt(s,10)),a);if(!function(t,e,i){return!t||Gt.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(m(i).weekdayMismatch=!0,i._isValid=!1,!1)}(l[1],h,t))return;t._a=h,t._tzm=function(t,e,i){if(t)return _e[t];if(e)return 0;var n=parseInt(i,10),o=n%100;return(n-o)/100*60+o}(l[8],l[9],l[10]),t._d=Nt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),m(t).rfc2822=!0}else t._isValid=!1}function ke(t){if(t._f!==o.ISO_8601)if(t._f!==o.RFC_2822){t._a=[],m(t).empty=!0;var e,i,n,r,s,a=""+t._i,l=a.length,h=0;for(n=U(t._f,t._locale).match(H)||[],e=0;e<n.length;e++)r=n[e],(i=(a.match(dt(r,t))||[])[0])&&((s=a.substr(0,a.indexOf(i))).length>0&&m(t).unusedInput.push(s),a=a.slice(a.indexOf(i)+i.length),h+=i.length),W[r]?(i?m(t).empty=!1:m(t).unusedTokens.push(r),vt(r,i,t)):t._strict&&!i&&m(t).unusedTokens.push(r);m(t).charsLeftOver=l-h,a.length>0&&m(t).unusedInput.push(a),t._a[3]<=12&&!0===m(t).bigHour&&t._a[3]>0&&(m(t).bigHour=void 0),m(t).parsedDateParts=t._a.slice(0),m(t).meridiem=t._meridiem,t._a[3]=function(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),ue(t),le(t)}else we(t);else ge(t)}function xe(t){var e=t._i,i=t._f;return t._locale=t._locale||ae(t._l),null===e||void 0===i&&""===e?v({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),w(e)?new _(le(e)):(h(e)?t._d=e:r(i)?function(t){var e,i,n,o,r;if(0===t._f.length)return m(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;o<t._f.length;o++)r=0,e=y({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[o],ke(e),f(e)&&(r+=m(e).charsLeftOver,r+=10*m(e).unusedTokens.length,m(e).score=r,(null==n||r<n)&&(n=r,i=e));c(t,i||e)}(t):i?ke(t):function(t){var e=t._i;a(e)?t._d=new Date(o.now()):h(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=ve.exec(t._i);null===e?(ge(t),!1===t._isValid&&(delete t._isValid,we(t),!1===t._isValid&&(delete t._isValid,o.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):r(e)?(t._a=u(e.slice(0),(function(t){return parseInt(t,10)})),ue(t)):s(e)?function(t){if(!t._d){var e=Y(t._i);t._a=u([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),ue(t)}}(t):l(e)?t._d=new Date(e):o.createFromInputFallback(t)}(t),f(t)||(t._d=null),t))}function De(t,e,i,n,o){var a,l={};return!0!==i&&!1!==i||(n=i,i=void 0),(s(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||r(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=i,l._i=t,l._f=e,l._strict=n,(a=new _(le(xe(l))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function Se(t,e,i,n){return De(t,e,i,n,!1)}o.createFromInputFallback=M("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var Me=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Se.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:v()})),Te=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Se.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:v()}));function Ce(t,e){var i,n;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return Se();for(i=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](i)||(i=e[n]);return i}var Oe=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ee(t){var e=Y(t),i=e.year||0,n=e.quarter||0,o=e.month||0,r=e.week||e.isoWeek||0,s=e.day||0,a=e.hour||0,l=e.minute||0,h=e.second||0,u=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===bt.call(Oe,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var i=!1,n=0;n<Oe.length;++n)if(t[Oe[n]]){if(i)return!1;parseFloat(t[Oe[n]])!==x(t[Oe[n]])&&(i=!0)}return!0}(e),this._milliseconds=+u+1e3*h+6e4*l+1e3*a*60*60,this._days=+s+7*r,this._months=+o+3*n+12*i,this._data={},this._locale=ae(),this._bubble()}function Pe(t){return t instanceof Ee}function Le(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ie(t,e){V(t,0,0,(function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+F(~~(t/60),2)+e+F(~~t%60,2)}))}Ie("Z",":"),Ie("ZZ",""),ut("Z",at),ut("ZZ",at),mt(["Z","ZZ"],(function(t,e,i){i._useUTC=!0,i._tzm=Ne(at,t)}));var Ae=/([\+\-]|\d\d)/gi;function Ne(t,e){var i=(e||"").match(t);if(null===i)return null;var n=((i[i.length-1]||[])+"").match(Ae)||["-",0,0],o=60*n[1]+x(n[2]);return 0===o?0:"+"===n[0]?o:-o}function Ye(t,e){var i,n;return e._isUTC?(i=e.clone(),n=(w(t)||h(t)?t.valueOf():Se(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+n),o.updateOffset(i,!1),i):Se(t).local()}function Re(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function je(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Fe=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,He=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ze(t,e){var i,n,o,r,s,a,h=t,u=null;return Pe(t)?h={ms:t._milliseconds,d:t._days,M:t._months}:l(t)?(h={},e?h[e]=t:h.milliseconds=t):(u=Fe.exec(t))?(i="-"===u[1]?-1:1,h={y:0,d:x(u[2])*i,h:x(u[3])*i,m:x(u[4])*i,s:x(u[5])*i,ms:x(Le(1e3*u[6]))*i}):(u=He.exec(t))?(i="-"===u[1]?-1:1,h={y:Ge(u[2],i),M:Ge(u[3],i),w:Ge(u[4],i),d:Ge(u[5],i),h:Ge(u[6],i),m:Ge(u[7],i),s:Ge(u[8],i)}):null==h?h={}:"object"==typeof h&&("from"in h||"to"in h)&&(r=Se(h.from),s=Se(h.to),o=r.isValid()&&s.isValid()?(s=Ye(s,r),r.isBefore(s)?a=We(r,s):((a=We(s,r)).milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0},(h={}).ms=o.milliseconds,h.M=o.months),n=new Ee(h),Pe(t)&&d(t,"_locale")&&(n._locale=t._locale),n}function Ge(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function We(t,e){var i={};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Ve(t,e){return function(i,n){var o;return null===n||isNaN(+n)||(O(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=i,i=n,n=o),Be(this,ze(i="string"==typeof i?+i:i,n),t),this}}function Be(t,e,i,n){var r=e._milliseconds,s=Le(e._days),a=Le(e._months);t.isValid()&&(n=null==n||n,a&&Ot(t,kt(t,"Month")+a*i),s&&xt(t,"Date",kt(t,"Date")+s*i),r&&t._d.setTime(t._d.valueOf()+r*i),n&&o.updateOffset(t,s||a))}ze.fn=Ee.prototype,ze.invalid=function(){return ze(NaN)};var Ue=Ve(1,"add"),Xe=Ve(-1,"subtract");function qe(t,e){var i=12*(e.year()-t.year())+(e.month()-t.month()),n=t.clone().add(i,"months");return-(i+(e-n<0?(e-n)/(n-t.clone().add(i-1,"months")):(e-n)/(t.clone().add(i+1,"months")-n)))||0}function Ze(t){var e;return void 0===t?this._locale._abbr:(null!=(e=ae(t))&&(this._locale=e),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ke=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function $e(){return this._locale}function Je(t,e){return(t%e+e)%e}function Qe(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-126227808e5:new Date(t,e,i).valueOf()}function ti(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-126227808e5:Date.UTC(t,e,i)}function ei(t,e){V(0,[t,t.length],0,e)}function ii(t,e,i,n,o){var r;return null==t?jt(this,n,o).year:(e>(r=Ft(t,n,o))&&(e=r),ni.call(this,t,e,i,n,o))}function ni(t,e,i,n,o){var r=Rt(t,e,i,n,o),s=Nt(r.year,0,r.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}V(0,["gg",2],0,(function(){return this.weekYear()%100})),V(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ei("gggg","weekYear"),ei("ggggg","weekYear"),ei("GGGG","isoWeekYear"),ei("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),j("weekYear",1),j("isoWeekYear",1),ut("G",rt),ut("g",rt),ut("GG",J,q),ut("gg",J,q),ut("GGGG",it,K),ut("gggg",it,K),ut("GGGGG",nt,$),ut("ggggg",nt,$),ft(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,i,n){e[n.substr(0,2)]=x(t)})),ft(["gg","GG"],(function(t,e,i,n){e[n]=o.parseTwoDigitYear(t)})),V("Q",0,"Qo","quarter"),A("quarter","Q"),j("quarter",7),ut("Q",X),mt("Q",(function(t,e){e[1]=3*(x(t)-1)})),V("D",["DD",2],"Do","date"),A("date","D"),j("date",9),ut("D",J),ut("DD",J,q),ut("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),mt(["D","DD"],2),mt("Do",(function(t,e){e[2]=x(t.match(J)[0])}));var oi=wt("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),j("dayOfYear",4),ut("DDD",et),ut("DDDD",Z),mt(["DDD","DDDD"],(function(t,e,i){i._dayOfYear=x(t)})),V("m",["mm",2],0,"minute"),A("minute","m"),j("minute",14),ut("m",J),ut("mm",J,q),mt(["m","mm"],4);var ri=wt("Minutes",!1);V("s",["ss",2],0,"second"),A("second","s"),j("second",15),ut("s",J),ut("ss",J,q),mt(["s","ss"],5);var si,ai=wt("Seconds",!1);for(V("S",0,0,(function(){return~~(this.millisecond()/100)})),V(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),V(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),V(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),V(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),V(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),V(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),A("millisecond","ms"),j("millisecond",16),ut("S",et,X),ut("SS",et,q),ut("SSS",et,Z),si="SSSS";si.length<=9;si+="S")ut(si,ot);function li(t,e){e[6]=x(1e3*("0."+t))}for(si="S";si.length<=9;si+="S")mt(si,li);var hi=wt("Milliseconds",!1);V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var ui=_.prototype;function di(t){return t}ui.add=Ue,ui.calendar=function(t,e){var i=t||Se(),n=Ye(i,this).startOf("day"),r=o.calendarFormat(this,n)||"sameElse",s=e&&(E(e[r])?e[r].call(this,i):e[r]);return this.format(s||this.localeData().calendar(r,this,Se(i)))},ui.clone=function(){return new _(this)},ui.diff=function(t,e,i){var n,o,r;if(!this.isValid())return NaN;if(!(n=Ye(t,this)).isValid())return NaN;switch(o=6e4*(n.utcOffset()-this.utcOffset()),e=N(e)){case"year":r=qe(this,n)/12;break;case"month":r=qe(this,n);break;case"quarter":r=qe(this,n)/3;break;case"second":r=(this-n)/1e3;break;case"minute":r=(this-n)/6e4;break;case"hour":r=(this-n)/36e5;break;case"day":r=(this-n-o)/864e5;break;case"week":r=(this-n-o)/6048e5;break;default:r=this-n}return i?r:k(r)},ui.endOf=function(t){var e;if(void 0===(t=N(t))||"millisecond"===t||!this.isValid())return this;var i=this._isUTC?ti:Qe;switch(t){case"year":e=i(this.year()+1,0,1)-1;break;case"quarter":e=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=i(this.year(),this.month()+1,1)-1;break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-Je(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-Je(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-Je(e,1e3)-1}return this._d.setTime(e),o.updateOffset(this,!0),this},ui.format=function(t){t||(t=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var e=B(this,t);return this.localeData().postformat(e)},ui.from=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||Se(t).isValid())?ze({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ui.fromNow=function(t){return this.from(Se(),t)},ui.to=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||Se(t).isValid())?ze({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ui.toNow=function(t){return this.to(Se(),t)},ui.get=function(t){return E(this[t=N(t)])?this[t]():this},ui.invalidAt=function(){return m(this).overflow},ui.isAfter=function(t,e){var i=w(t)?t:Se(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=N(e)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},ui.isBefore=function(t,e){var i=w(t)?t:Se(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=N(e)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},ui.isBetween=function(t,e,i,n){var o=w(t)?t:Se(t),r=w(e)?e:Se(e);return!!(this.isValid()&&o.isValid()&&r.isValid())&&("("===(n=n||"()")[0]?this.isAfter(o,i):!this.isBefore(o,i))&&(")"===n[1]?this.isBefore(r,i):!this.isAfter(r,i))},ui.isSame=function(t,e){var i,n=w(t)?t:Se(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=N(e)||"millisecond")?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},ui.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},ui.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},ui.isValid=function(){return f(this)},ui.lang=Ke,ui.locale=Ze,ui.localeData=$e,ui.max=Te,ui.min=Me,ui.parsingFlags=function(){return c({},m(this))},ui.set=function(t,e){if("object"==typeof t)for(var i=function(t){var e=[];for(var i in t)e.push({unit:i,priority:R[i]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=Y(t)),n=0;n<i.length;n++)this[i[n].unit](t[i[n].unit]);else if(E(this[t=N(t)]))return this[t](e);return this},ui.startOf=function(t){var e;if(void 0===(t=N(t))||"millisecond"===t||!this.isValid())return this;var i=this._isUTC?ti:Qe;switch(t){case"year":e=i(this.year(),0,1);break;case"quarter":e=i(this.year(),this.month()-this.month()%3,1);break;case"month":e=i(this.year(),this.month(),1);break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=i(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Je(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=Je(e,6e4);break;case"second":e=this._d.valueOf(),e-=Je(e,1e3)}return this._d.setTime(e),o.updateOffset(this,!0),this},ui.subtract=Xe,ui.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},ui.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},ui.toDate=function(){return new Date(this.valueOf())},ui.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,i=e?this.clone().utc():this;return i.year()<0||i.year()>9999?B(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",B(i,"Z")):B(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ui.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var i="["+t+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=e+'[")]';return this.format(i+n+"-MM-DD[T]HH:mm:ss.SSS"+o)},ui.toJSON=function(){return this.isValid()?this.toISOString():null},ui.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ui.unix=function(){return Math.floor(this.valueOf()/1e3)},ui.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ui.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ui.year=_t,ui.isLeapYear=function(){return yt(this.year())},ui.weekYear=function(t){return ii.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ui.isoWeekYear=function(t){return ii.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},ui.quarter=ui.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},ui.month=Et,ui.daysInMonth=function(){return Dt(this.year(),this.month())},ui.week=ui.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},ui.isoWeek=ui.isoWeeks=function(t){var e=jt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},ui.weeksInYear=function(){var t=this.localeData()._week;return Ft(this.year(),t.dow,t.doy)},ui.isoWeeksInYear=function(){return Ft(this.year(),1,4)},ui.date=oi,ui.day=ui.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},ui.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},ui.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},ui.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},ui.hour=ui.hours=Qt,ui.minute=ui.minutes=ri,ui.second=ui.seconds=ai,ui.millisecond=ui.milliseconds=hi,ui.utcOffset=function(t,e,i){var n,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Ne(at,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&e&&(n=Re(this)),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==t&&(!e||this._changeInProgress?Be(this,ze(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:Re(this)},ui.utc=function(t){return this.utcOffset(0,t)},ui.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Re(this),"m")),this},ui.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ne(st,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},ui.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Se(t).utcOffset():0,(this.utcOffset()-t)%60==0)},ui.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ui.isLocal=function(){return!!this.isValid()&&!this._isUTC},ui.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ui.isUtc=je,ui.isUTC=je,ui.zoneAbbr=function(){return this._isUTC?"UTC":""},ui.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ui.dates=M("dates accessor is deprecated. Use date instead.",oi),ui.months=M("months accessor is deprecated. Use month instead",Et),ui.years=M("years accessor is deprecated. Use year instead",_t),ui.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),ui.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var t={};if(y(t,this),(t=xe(t))._a){var e=t._isUTC?p(t._a):Se(t._a);this._isDSTShifted=this.isValid()&&D(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var ci=L.prototype;function pi(t,e,i,n){var o=ae(),r=p().set(n,e);return o[i](r,t)}function mi(t,e,i){if(l(t)&&(e=t,t=void 0),t=t||"",null!=e)return pi(t,e,i,"month");var n,o=[];for(n=0;n<12;n++)o[n]=pi(t,n,i,"month");return o}function fi(t,e,i,n){"boolean"==typeof t?(l(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,l(e)&&(i=e,e=void 0),e=e||"");var o,r=ae(),s=t?r._week.dow:0;if(null!=i)return pi(e,(i+s)%7,n,"day");var a=[];for(o=0;o<7;o++)a[o]=pi(e,(o+s)%7,n,"day");return a}ci.calendar=function(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return E(n)?n.call(e,i):n},ci.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},ci.invalidDate=function(){return this._invalidDate},ci.ordinal=function(t){return this._ordinal.replace("%d",t)},ci.preparse=di,ci.postformat=di,ci.relativeTime=function(t,e,i,n){var o=this._relativeTime[i];return E(o)?o(t,e,i,n):o.replace(/%d/i,t)},ci.pastFuture=function(t,e){var i=this._relativeTime[t>0?"future":"past"];return E(i)?i(e):i.replace(/%s/i,e)},ci.set=function(t){var e,i;for(i in t)E(e=t[i])?this[i]=e:this["_"+i]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},ci.months=function(t,e){return t?r(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||St).test(e)?"format":"standalone"][t.month()]:r(this._months)?this._months:this._months.standalone},ci.monthsShort=function(t,e){return t?r(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[St.test(e)?"format":"standalone"][t.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},ci.monthsParse=function(t,e,i){var n,o,r;if(this._monthsParseExact)return Ct.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=p([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(r="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},ci.monthsRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||It.call(this),t?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Lt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},ci.monthsShortRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||It.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Pt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},ci.week=function(t){return jt(t,this._week.dow,this._week.doy).week},ci.firstDayOfYear=function(){return this._week.doy},ci.firstDayOfWeek=function(){return this._week.dow},ci.weekdays=function(t,e){var i=r(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ht(i,this._week.dow):t?i[t.day()]:i},ci.weekdaysMin=function(t){return!0===t?Ht(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},ci.weekdaysShort=function(t){return!0===t?Ht(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},ci.weekdaysParse=function(t,e,i){var n,o,r;if(this._weekdaysParseExact)return Vt.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=p([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}},ci.weekdaysRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Bt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},ci.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ut),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},ci.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Xt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},ci.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},ci.meridiem=function(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"},re("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===x(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),o.lang=M("moment.lang is deprecated. Use moment.locale instead.",re),o.langData=M("moment.langData is deprecated. Use moment.localeData instead.",ae);var vi=Math.abs;function gi(t,e,i,n){var o=ze(e,i);return t._milliseconds+=n*o._milliseconds,t._days+=n*o._days,t._months+=n*o._months,t._bubble()}function yi(t){return t<0?Math.floor(t):Math.ceil(t)}function bi(t){return 4800*t/146097}function _i(t){return 146097*t/4800}function wi(t){return function(){return this.as(t)}}var ki=wi("ms"),xi=wi("s"),Di=wi("m"),Si=wi("h"),Mi=wi("d"),Ti=wi("w"),Ci=wi("M"),Oi=wi("Q"),Ei=wi("y");function Pi(t){return function(){return this.isValid()?this._data[t]:NaN}}var Li=Pi("milliseconds"),Ii=Pi("seconds"),Ai=Pi("minutes"),Ni=Pi("hours"),Yi=Pi("days"),Ri=Pi("months"),ji=Pi("years"),Fi=Math.round,Hi={ss:44,s:45,m:45,h:22,d:26,M:11};function zi(t,e,i,n,o){return o.relativeTime(e||1,!!i,t,n)}function Gi(t,e,i){var n=ze(t).abs(),o=Fi(n.as("s")),r=Fi(n.as("m")),s=Fi(n.as("h")),a=Fi(n.as("d")),l=Fi(n.as("M")),h=Fi(n.as("y")),u=o<=Hi.ss&&["s",o]||o<Hi.s&&["ss",o]||r<=1&&["m"]||r<Hi.m&&["mm",r]||s<=1&&["h"]||s<Hi.h&&["hh",s]||a<=1&&["d"]||a<Hi.d&&["dd",a]||l<=1&&["M"]||l<Hi.M&&["MM",l]||h<=1&&["y"]||["yy",h];return u[2]=e,u[3]=+t>0,u[4]=i,zi.apply(null,u)}var Wi=Math.abs;function Vi(t){return(t>0)-(t<0)||+t}function Bi(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i=Wi(this._milliseconds)/1e3,n=Wi(this._days),o=Wi(this._months);t=k(i/60),e=k(t/60),i%=60,t%=60;var r=k(o/12),s=o%=12,a=n,l=e,h=t,u=i?i.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var c=d<0?"-":"",p=Vi(this._months)!==Vi(d)?"-":"",m=Vi(this._days)!==Vi(d)?"-":"",f=Vi(this._milliseconds)!==Vi(d)?"-":"";return c+"P"+(r?p+r+"Y":"")+(s?p+s+"M":"")+(a?m+a+"D":"")+(l||h||u?"T":"")+(l?f+l+"H":"")+(h?f+h+"M":"")+(u?f+u+"S":"")}var Ui=Ee.prototype;return Ui.isValid=function(){return this._isValid},Ui.abs=function(){var t=this._data;return this._milliseconds=vi(this._milliseconds),this._days=vi(this._days),this._months=vi(this._months),t.milliseconds=vi(t.milliseconds),t.seconds=vi(t.seconds),t.minutes=vi(t.minutes),t.hours=vi(t.hours),t.months=vi(t.months),t.years=vi(t.years),this},Ui.add=function(t,e){return gi(this,t,e,1)},Ui.subtract=function(t,e){return gi(this,t,e,-1)},Ui.as=function(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=N(t))||"quarter"===t||"year"===t)switch(e=this._days+n/864e5,i=this._months+bi(e),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(_i(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},Ui.asMilliseconds=ki,Ui.asSeconds=xi,Ui.asMinutes=Di,Ui.asHours=Si,Ui.asDays=Mi,Ui.asWeeks=Ti,Ui.asMonths=Ci,Ui.asQuarters=Oi,Ui.asYears=Ei,Ui.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12):NaN},Ui._bubble=function(){var t,e,i,n,o,r=this._milliseconds,s=this._days,a=this._months,l=this._data;return r>=0&&s>=0&&a>=0||r<=0&&s<=0&&a<=0||(r+=864e5*yi(_i(a)+s),s=0,a=0),l.milliseconds=r%1e3,t=k(r/1e3),l.seconds=t%60,e=k(t/60),l.minutes=e%60,i=k(e/60),l.hours=i%24,s+=k(i/24),o=k(bi(s)),a+=o,s-=yi(_i(o)),n=k(a/12),a%=12,l.days=s,l.months=a,l.years=n,this},Ui.clone=function(){return ze(this)},Ui.get=function(t){return t=N(t),this.isValid()?this[t+"s"]():NaN},Ui.milliseconds=Li,Ui.seconds=Ii,Ui.minutes=Ai,Ui.hours=Ni,Ui.days=Yi,Ui.weeks=function(){return k(this.days()/7)},Ui.months=Ri,Ui.years=ji,Ui.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),i=Gi(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)},Ui.toISOString=Bi,Ui.toString=Bi,Ui.toJSON=Bi,Ui.locale=Ze,Ui.localeData=$e,Ui.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Bi),Ui.lang=Ke,V("X",0,0,"unix"),V("x",0,0,"valueOf"),ut("x",rt),ut("X",/[+-]?\d+(\.\d{1,3})?/),mt("X",(function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))})),mt("x",(function(t,e,i){i._d=new Date(x(t))})),o.version="2.24.0",e=Se,o.fn=ui,o.min=function(){var t=[].slice.call(arguments,0);return Ce("isBefore",t)},o.max=function(){var t=[].slice.call(arguments,0);return Ce("isAfter",t)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=p,o.unix=function(t){return Se(1e3*t)},o.months=function(t,e){return mi(t,e,"months")},o.isDate=h,o.locale=re,o.invalid=v,o.duration=ze,o.isMoment=w,o.weekdays=function(t,e,i){return fi(t,e,i,"weekdays")},o.parseZone=function(){return Se.apply(null,arguments).parseZone()},o.localeData=ae,o.isDuration=Pe,o.monthsShort=function(t,e){return mi(t,e,"monthsShort")},o.weekdaysMin=function(t,e,i){return fi(t,e,i,"weekdaysMin")},o.defineLocale=se,o.updateLocale=function(t,e){if(null!=e){var i,n,o=te;null!=(n=oe(t))&&(o=n._config),(i=new L(e=P(o,e))).parentLocale=ee[t],ee[t]=i,re(t)}else null!=ee[t]&&(null!=ee[t].parentLocale?ee[t]=ee[t].parentLocale:null!=ee[t]&&delete ee[t]);return ee[t]},o.locales=function(){return T(ee)},o.weekdaysShort=function(t,e,i){return fi(t,e,i,"weekdaysShort")},o.normalizeUnits=N,o.relativeTimeRounding=function(t){return void 0===t?Fi:"function"==typeof t&&(Fi=t,!0)},o.relativeTimeThreshold=function(t,e){return void 0!==Hi[t]&&(void 0===e?Hi[t]:(Hi[t]=e,"s"===t&&(Hi.ss=e-1),!0))},o.calendarFormat=function(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},o.prototype=ui,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}()})),s=(n((function(t,e){(function(t){function e(t,e,i,n){var o={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[t+" Tage",t+" Tagen"],M:["ein Monat","einem Monat"],MM:[t+" Monate",t+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[t+" Jahre",t+" Jahren"]};return e?o[i][0]:o[i][1]}t.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(r)})),n((function(t,e){(function(t){var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],o=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;t.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(t,n){return t?/-MMM-/.test(n)?i[t.month()]:e[t.month()]:e},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})(r)})),n((function(t,e){(function(t){t.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourdhui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(t,e){switch(e){case"D":return t+(1===t?"er":"");default:case"M":case"Q":case"DDD":case"d":return t+(1===t?"er":"e");case"w":case"W":return t+(1===t?"re":"e")}},week:{dow:1,doy:4}})})(r)})),n((function(t,e){(function(t){t.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(t){return(/^[0-9].+$/.test(t)?"tra":"in")+" "+t},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})})(r)})),n((function(t,e){(function(t){t.defineLocale("ja",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(t){return"午後"===t},meridiem:function(t,e,i){return t<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(t){return t.week()<this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(t){return this.week()<t.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";default:return t}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})})(r)})),n((function(t,e){(function(t){var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),i="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),n=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],o=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;t.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(t,n){return t?/-MMM-/.test(n)?i[t.month()]:e[t.month()]:e},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}})})(r)})),n((function(t,e){(function(t){var e="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),i="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");function n(t){return t%10<5&&t%10>1&&~~(t/10)%10!=1}function o(t,e,i){var o=t+" ";switch(i){case"ss":return o+(n(t)?"sekundy":"sekund");case"m":return e?"minuta":"minutę";case"mm":return o+(n(t)?"minuty":"minut");case"h":return e?"godzina":"godzinę";case"hh":return o+(n(t)?"godziny":"godzin");case"MM":return o+(n(t)?"miesiące":"miesięcy");case"yy":return o+(n(t)?"lata":"lat")}}t.defineLocale("pl",{months:function(t,n){return t?""===n?"("+i[t.month()]+"|"+e[t.month()]+")":/D MMMM/.test(n)?i[t.month()]:e[t.month()]:e},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:o,m:o,mm:o,h:o,hh:o,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:o,y:"rok",yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})})(r)})),n((function(t,e){(function(t){function e(t,e,i){var n,o;return"m"===i?e?"минута":"минуту":t+" "+(n=+t,o={ss:e?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:e?"минута_минуты_минут":"минуту_минуты_минут",hh:асасаасов",dd:ень_дня_дней",MM:есяц_месяцаесяцев",yy:"год_годает"}[i].split("_"),n%10==1&&n%100!=11?o[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?o[1]:o[2])}var i=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];t.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:оскресенье_понедельник_вторник_средаетверг_пятница_суббота".split("_"),format:оскресенье_понедельник_вторник_средуетверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:с_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:с_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:e,m:e,mm:e,h:"час",hh:e,d:"день",dd:e,M:"месяц",MM:e,y:"год",yy:e},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(t){return/^(дня|вечера)$/.test(t)},meridiem:function(t,e,i){return t<4?"ночи":t<12?"утра":t<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":return t+"-й";case"D":return t+"-го";case"w":case"W":return t+"-я";default:return t}},week:{dow:1,doy:4}})})(r)})),n((function(t,e){(function(t){function e(t,e,i){var n,o;return"m"===i?e?"хвилина":"хвилину":"h"===i?e?"година":"годину":t+" "+(n=+t,o={ss:e?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:e?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:e?"година_години_годин":"годину_години_годин",dd:ень_дні_днів",MM:ісяць_місяціісяців",yy:"рік_роки_років"}[i].split("_"),n%10==1&&n%100!=11?o[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?o[1]:o[2])}function i(t){return function(){return t+"о"+(11===this.hours()?"б":"")+"] LT"}}t.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_веровт_лист_груд".split("_"),weekdays:function(t,e){var i={nominative:еділя_понеділок_вівторок_середаетвер_пятниця_субота".split("_"),accusative:еділю_понеділок_вівторок_середуетвер_пятницю_суботу".split("_"),genitive:еділі_понеділкаівторка_середи_четверга_пятниці_суботи".split("_")};return!0===t?i.nominative.slice(1,7).concat(i.nominative.slice(0,1)):t?i[/(\[[ВвУу]\]) ?dddd/.test(e)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(e)?"genitive":"nominative"][t.day()]:i.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:e,m:e,mm:e,h:"годину",hh:e,d:"день",dd:e,M:"місяць",MM:e,y:"рік",yy:e},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(t){return/^(дня|вечора)$/.test(t)},meridiem:function(t,e,i){return t<4?"ночі":t<12?"ранку":t<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":case"w":case"W":return t+"-й";case"D":return t+"-го";default:return t}},week:{dow:1,doy:7}})})(r)})),function(t){return t&&t.Math==Math&&t}),a=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof e&&e)||Function("return this")(),l=function(t){try{return!!t()}catch(t){return!0}},h=!l((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,c={f:d&&!u.call({1:2},1)?function(t){var e=d(this,t);return!!e&&e.enumerable}:u},p=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},m={}.toString,f=function(t){return m.call(t).slice(8,-1)},v="".split,g=l((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==f(t)?v.call(t,""):Object(t)}:Object,y=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},b=function(t){return g(y(t))},_=function(t){return"object"==typeof t?null!==t:"function"==typeof t},w=function(t,e){if(!_(t))return t;var i,n;if(e&&"function"==typeof(i=t.toString)&&!_(n=i.call(t)))return n;if("function"==typeof(i=t.valueOf)&&!_(n=i.call(t)))return n;if(!e&&"function"==typeof(i=t.toString)&&!_(n=i.call(t)))return n;throw TypeError("Can't convert object to primitive value")},k={}.hasOwnProperty,x=function(t,e){return k.call(t,e)},D=a.document,S=_(D)&&_(D.createElement),M=function(t){return S?D.createElement(t):{}},T=!h&&!l((function(){return 7!=Object.defineProperty(M("div"),"a",{get:function(){return 7}}).a})),C=Object.getOwnPropertyDescriptor,O={f:h?C:function(t,e){if(t=b(t),e=w(e,!0),T)try{return C(t,e)}catch(t){}if(x(t,e))return p(!c.f.call(t,e),t[e])}},E=/#|\.prototype\./,P=function(t,e){var i=I[L(t)];return i==N||i!=A&&("function"==typeof e?l(e):!!e)},L=P.normalize=function(t){return String(t).replace(E,".").toLowerCase()},I=P.data={},A=P.NATIVE="N",N=P.POLYFILL="P",Y=P,R={},j=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},F=function(t,e,i){if(j(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,o){return t.call(e,i,n,o)}}return function(){return t.apply(e,arguments)}},H=function(t){if(!_(t))throw TypeError(String(t)+" is not an object");return t},z=Object.defineProperty,G={f:h?z:function(t,e,i){if(H(t),e=w(e,!0),H(i),T)try{return z(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},W=h?function(t,e,i){return G.f(t,e,p(1,i))}:function(t,e,i){return t[e]=i,t},V=O.f,B=function(t){var e=function(e,i,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,i)}return new t(e,i,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e},U=function(t,e){var i,n,o,r,s,l,h,u,d=t.target,c=t.global,p=t.stat,m=t.proto,f=c?a:p?a[d]:(a[d]||{}).prototype,v=c?R:R[d]||(R[d]={}),g=v.prototype;for(o in e)i=!Y(c?o:d+(p?".":"#")+o,t.forced)&&f&&x(f,o),s=v[o],i&&(l=t.noTargetGet?(u=V(f,o))&&u.value:f[o]),r=i&&l?l:e[o],i&&typeof s==typeof r||(h=t.bind&&i?F(r,a):t.wrap&&i?B(r):m&&"function"==typeof r?F(Function.call,r):r,(t.sham||r&&r.sham||s&&s.sham)&&W(h,"sham",!0),v[o]=h,m&&(x(R,n=d+"Prototype")||W(R,n,{}),R[n][o]=r,t.real&&g&&!g[o]&&W(g,o,r)))};U({target:"Object",stat:!0,forced:!h,sham:!h},{defineProperty:G.f});var X=n((function(t){var e=R.Object,i=t.exports=function(t,i,n){return e.defineProperty(t,i,n)};e.defineProperty.sham&&(i.sham=!0)})),q=X,Z=Math.ceil,K=Math.floor,$=function(t){return isNaN(t=+t)?0:(t>0?K:Z)(t)},J=Math.min,Q=function(t){return t>0?J($(t),9007199254740991):0},tt=Math.max,et=Math.min,it=function(t,e){var i=$(t);return i<0?tt(i+e,0):et(i,e)},nt=function(t){return function(e,i,n){var o,r=b(e),s=Q(r.length),a=it(n,s);if(t&&i!=i){for(;s>a;)if((o=r[a++])!=o)return!0}else for(;s>a;a++)if((t||a in r)&&r[a]===i)return t||a||0;return!t&&-1}},ot={includes:nt(!0),indexOf:nt(!1)},rt={},st=ot.indexOf,at=function(t,e){var i,n=b(t),o=0,r=[];for(i in n)!x(rt,i)&&x(n,i)&&r.push(i);for(;e.length>o;)x(n,i=e[o++])&&(~st(r,i)||r.push(i));return r},lt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ht=Object.keys||function(t){return at(t,lt)},ut=h?Object.defineProperties:function(t,e){H(t);for(var i,n=ht(e),o=n.length,r=0;o>r;)G.f(t,i=n[r++],e[i]);return t};U({target:"Object",stat:!0,forced:!h,sham:!h},{defineProperties:ut});var dt=n((function(t){var e=R.Object,i=t.exports=function(t,i){return e.defineProperties(t,i)};e.defineProperties.sham&&(i.sham=!0)})),ct=function(t){return"function"==typeof t?t:void 0},pt=function(t,e){return arguments.length<2?ct(R[t])||ct(a[t]):R[t]&&R[t][e]||a[t]&&a[t][e]},mt=lt.concat("length","prototype"),ft={f:Object.getOwnPropertyNames||function(t){return at(t,mt)}},vt={f:Object.getOwnPropertySymbols},gt=pt("Reflect","ownKeys")||function(t){var e=ft.f(H(t)),i=vt.f;return i?e.concat(i(t)):e},yt=function(t,e,i){var n=w(e);n in t?G.f(t,n,p(0,i)):t[n]=i};U({target:"Object",stat:!0,sham:!h},{getOwnPropertyDescriptors:function(t){for(var e,i,n=b(t),o=O.f,r=gt(n),s={},a=0;r.length>a;)void 0!==(i=o(n,e=r[a++]))&&yt(s,e,i);return s}});var bt=R.Object.getOwnPropertyDescriptors,_t=O.f,wt=l((function(){_t(1)}));U({target:"Object",stat:!0,forced:!h||wt,sham:!h},{getOwnPropertyDescriptor:function(t,e){return _t(b(t),e)}});var kt,xt=n((function(t){var e=R.Object,i=t.exports=function(t,i){return e.getOwnPropertyDescriptor(t,i)};e.getOwnPropertyDescriptor.sham&&(i.sham=!0)})),Dt=!!Object.getOwnPropertySymbols&&!l((function(){return!String(Symbol())})),St=Dt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Mt=Array.isArray||function(t){return"Array"==f(t)},Tt=function(t){return Object(y(t))},Ct=pt("document","documentElement"),Ot=a["__core-js_shared__"]||function(t,e){try{W(a,t,e)}catch(i){a[t]=e}return e}("__core-js_shared__",{}),Et=n((function(t){(t.exports=function(t,e){return Ot[t]||(Ot[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.4",mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),Pt=0,Lt=Math.random(),It=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++Pt+Lt).toString(36)},At=Et("keys"),Nt=function(t){return At[t]||(At[t]=It(t))},Yt=Nt("IE_PROTO"),Rt=function(){},jt=function(t){return"<script>"+t+"<\/script>"},Ft=function(){try{kt=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;Ft=kt?function(t){t.write(jt("")),t.close();var e=t.parentWindow.Object;return t=null,e}(kt):((e=M("iframe")).style.display="none",Ct.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(jt("document.F=Object")),t.close(),t.F);for(var i=lt.length;i--;)delete Ft.prototype[lt[i]];return Ft()};rt[Yt]=!0;var Ht=Object.create||function(t,e){var i;return null!==t?(Rt.prototype=H(t),i=new Rt,Rt.prototype=null,i[Yt]=t):i=Ft(),void 0===e?i:ut(i,e)},zt=ft.f,Gt={}.toString,Wt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Vt={f:function(t){return Wt&&"[object Window]"==Gt.call(t)?function(t){try{return zt(t)}catch(t){return Wt.slice()}}(t):zt(b(t))}},Bt=function(t,e,i,n){n&&n.enumerable?t[e]=i:W(t,e,i)},Ut=Et("wks"),Xt=a.Symbol,qt=St?Xt:Xt&&Xt.withoutSetter||It,Zt=function(t){return x(Ut,t)||(Dt&&x(Xt,t)?Ut[t]=Xt[t]:Ut[t]=qt("Symbol."+t)),Ut[t]},Kt={f:Zt},$t=G.f,Jt=function(t){var e=R.Symbol||(R.Symbol={});x(e,t)||$t(e,t,{value:Kt.f(t)})},Qt={};Qt[Zt("toStringTag")]="z";var te="[object z]"===String(Qt),ee=Zt("toStringTag"),ie="Arguments"==f(function(){return arguments}()),ne=te?f:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),ee))?i:ie?f(e):"Object"==(n=f(e))&&"function"==typeof e.callee?"Arguments":n},oe=te?{}.toString:function(){return"[object "+ne(this)+"]"},re=G.f,se=Zt("toStringTag"),ae=function(t,e,i,n){if(t){var o=i?t:t.prototype;x(o,se)||re(o,se,{configurable:!0,value:e}),n&&!te&&W(o,"toString",oe)}},le=Function.toString;"function"!=typeof Ot.inspectSource&&(Ot.inspectSource=function(t){return le.call(t)});var he,ue,de,ce=Ot.inspectSource,pe=a.WeakMap,me="function"==typeof pe&&/native code/.test(ce(pe)),fe=a.WeakMap;if(me){var ve=new fe,ge=ve.get,ye=ve.has,be=ve.set;he=function(t,e){return be.call(ve,t,e),e},ue=function(t){return ge.call(ve,t)||{}},de=function(t){return ye.call(ve,t)}}else{var _e=Nt("state");rt[_e]=!0,he=function(t,e){return W(t,_e,e),e},ue=function(t){return x(t,_e)?t[_e]:{}},de=function(t){return x(t,_e)}}var we={set:he,get:ue,has:de,enforce:function(t){return de(t)?ue(t):he(t,{})},getterFor:function(t){return function(e){var i;if(!_(e)||(i=ue(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}},ke=Zt("species"),xe=function(t,e){var i;return Mt(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!Mt(i.prototype)?_(i)&&null===(i=i[ke])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===e?0:e)},De=[].push,Se=function(t){var e=1==t,i=2==t,n=3==t,o=4==t,r=6==t,s=5==t||r;return function(a,l,h,u){for(var d,c,p=Tt(a),m=g(p),f=F(l,h,3),v=Q(m.length),y=0,b=u||xe,_=e?b(a,v):i?b(a,0):void 0;v>y;y++)if((s||y in m)&&(c=f(d=m[y],y,p),t))if(e)_[y]=c;else if(c)switch(t){case 3:return!0;case 5:return d;case 6:return y;case 2:De.call(_,d)}else if(o)return!1;return r?-1:n||o?o:_}},Me={forEach:Se(0),map:Se(1),filter:Se(2),some:Se(3),every:Se(4),find:Se(5),findIndex:Se(6)},Te=Me.forEach,Ce=Nt("hidden"),Oe=Zt("toPrimitive"),Ee=we.set,Pe=we.getterFor("Symbol"),Le=Object.prototype,Ie=a.Symbol,Ae=pt("JSON","stringify"),Ne=O.f,Ye=G.f,Re=Vt.f,je=c.f,Fe=Et("symbols"),He=Et("op-symbols"),ze=Et("string-to-symbol-registry"),Ge=Et("symbol-to-string-registry"),We=Et("wks"),Ve=a.QObject,Be=!Ve||!Ve.prototype||!Ve.prototype.findChild,Ue=h&&l((function(){return 7!=Ht(Ye({},"a",{get:function(){return Ye(this,"a",{value:7}).a}})).a}))?function(t,e,i){var n=Ne(Le,e);n&&delete Le[e],Ye(t,e,i),n&&t!==Le&&Ye(Le,e,n)}:Ye,Xe=function(t,e){var i=Fe[t]=Ht(Ie.prototype);return Ee(i,{type:"Symbol",tag:t,description:e}),h||(i.description=e),i},qe=St?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Ie},Ze=function(t,e,i){t===Le&&Ze(He,e,i),H(t);var n=w(e,!0);return H(i),x(Fe,n)?(i.enumerable?(x(t,Ce)&&t[Ce][n]&&(t[Ce][n]=!1),i=Ht(i,{enumerable:p(0,!1)})):(x(t,Ce)||Ye(t,Ce,p(1,{})),t[Ce][n]=!0),Ue(t,n,i)):Ye(t,n,i)},Ke=function(t,e){H(t);var i=b(e),n=ht(i).concat(ti(i));return Te(n,(function(e){h&&!$e.call(i,e)||Ze(t,e,i[e])})),t},$e=function(t){var e=w(t,!0),i=je.call(this,e);return!(this===Le&&x(Fe,e)&&!x(He,e))&&(!(i||!x(this,e)||!x(Fe,e)||x(this,Ce)&&this[Ce][e])||i)},Je=function(t,e){var i=b(t),n=w(e,!0);if(i!==Le||!x(Fe,n)||x(He,n)){var o=Ne(i,n);return!o||!x(Fe,n)||x(i,Ce)&&i[Ce][n]||(o.enumerable=!0),o}},Qe=function(t){var e=Re(b(t)),i=[];return Te(e,(function(t){x(Fe,t)||x(rt,t)||i.push(t)})),i},ti=function(t){var e=t===Le,i=Re(e?He:b(t)),n=[];return Te(i,(function(t){!x(Fe,t)||e&&!x(Le,t)||n.push(Fe[t])})),n};if(Dt||(Bt((Ie=function(){if(this instanceof Ie)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=It(t),i=function(t){this===Le&&i.call(He,t),x(this,Ce)&&x(this[Ce],e)&&(this[Ce][e]=!1),Ue(this,e,p(1,t))};return h&&Be&&Ue(Le,e,{configurable:!0,set:i}),Xe(e,t)}).prototype,"toString",(function(){return Pe(this).tag})),Bt(Ie,"withoutSetter",(function(t){return Xe(It(t),t)})),c.f=$e,G.f=Ze,O.f=Je,ft.f=Vt.f=Qe,vt.f=ti,Kt.f=function(t){return Xe(Zt(t),t)},h&&Ye(Ie.prototype,"description",{configurable:!0,get:function(){return Pe(this).description}})),U({global:!0,wrap:!0,forced:!Dt,sham:!Dt},{Symbol:Ie}),Te(ht(We),(function(t){Jt(t)})),U({target:"Symbol",stat:!0,forced:!Dt},{for:function(t){var e=String(t);if(x(ze,e))return ze[e];var i=Ie(e);return ze[e]=i,Ge[i]=e,i},keyFor:function(t){if(!qe(t))throw TypeError(t+" is not a symbol");if(x(Ge,t))return Ge[t]},useSetter:function(){Be=!0},useSimple:function(){Be=!1}}),U({target:"Object",stat:!0,forced:!Dt,sham:!h},{create:function(t,e){return void 0===e?Ht(t):Ke(Ht(t),e)},defineProperty:Ze,defineProperties:Ke,getOwnPropertyDescriptor:Je}),U({target:"Object",stat:!0,forced:!Dt},{getOwnPropertyNames:Qe,getOwnPropertySymbols:ti}),U({target:"Object",stat:!0,forced:l((function(){vt.f(1)}))},{getOwnPropertySymbols:function(t){return vt.f(Tt(t))}}),Ae){var ei=!Dt||l((function(){var t=Ie();return"[null]"!=Ae([t])||"{}"!=Ae({a:t})||"{}"!=Ae(Object(t))}));U({target:"JSON",stat:!0,forced:ei},{stringify:function(t,e,i){for(var n,o=[t],r=1;arguments.length>r;)o.push(arguments[r++]);if(n=e,(_(e)||void 0!==t)&&!qe(t))return Mt(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!qe(e))return e}),o[1]=e,Ae.apply(null,o)}})}Ie.prototype[Oe]||W(Ie.prototype,Oe,Ie.prototype.valueOf),ae(Ie,"Symbol"),rt[Ce]=!0;var ii,ni,oi,ri=R.Object.getOwnPropertySymbols,si={},ai=!l((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),li=Nt("IE_PROTO"),hi=Object.prototype,ui=ai?Object.getPrototypeOf:function(t){return t=Tt(t),x(t,li)?t[li]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?hi:null},di=(Zt("iterator"),!1);[].keys&&("next"in(oi=[].keys())?(ni=ui(ui(oi)))!==Object.prototype&&(ii=ni):di=!0),null==ii&&(ii={});var ci={IteratorPrototype:ii,BUGGY_SAFARI_ITERATORS:di},pi=ci.IteratorPrototype,mi=function(){return this},fi=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),e=i instanceof Array}catch(t){}return function(i,n){return H(i),function(t){if(!_(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(i,n):i.__proto__=n,i}}():void 0),vi=ci.IteratorPrototype,gi=ci.BUGGY_SAFARI_ITERATORS,yi=Zt("iterator"),bi=function(){return this},_i=function(t,e,i,n,o,r,s){!function(t,e,i){var n=e+" Iterator";t.prototype=Ht(pi,{next:p(1,i)}),ae(t,n,!1,!0),si[n]=mi}(i,e,n);var a,l,h,u=function(t){if(t===o&&v)return v;if(!gi&&t in m)return m[t];switch(t){case"keys":case"values":case"entries":return function(){return new i(this,t)}}return function(){return new i(this)}},d=e+" Iterator",c=!1,m=t.prototype,f=m[yi]||m["@@iterator"]||o&&m[o],v=!gi&&f||u(o),g="Array"==e&&m.entries||f;if(g&&(a=ui(g.call(new t)),vi!==Object.prototype&&a.next&&(ae(a,d,!0,!0),si[d]=bi)),"values"==o&&f&&"values"!==f.name&&(c=!0,v=function(){return f.call(this)}),s&&m[yi]!==v&&W(m,yi,v),si[e]=v,o)if(l={values:u("values"),keys:r?v:u("keys"),entries:u("entries")},s)for(h in l)!gi&&!c&&h in m||Bt(m,h,l[h]);else U({target:e,proto:!0,forced:gi||c},l);return l},wi=we.set,ki=we.getterFor("Array Iterator");_i(Array,"Array",(function(t,e){wi(this,{type:"Array Iterator",target:b(t),index:0,kind:e})}),(function(){var t=ki(this),e=t.target,i=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");si.Arguments=si.Array;var xi=Zt("toStringTag");for(var Di in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Si=a[Di],Mi=Si&&Si.prototype;Mi&&ne(Mi)!==xi&&W(Mi,xi,Di),si[Di]=si.Array}var Ti=function(t){return function(e,i){var n,o,r=String(y(e)),s=$(i),a=r.length;return s<0||s>=a?t?"":void 0:(n=r.charCodeAt(s))<55296||n>56319||s+1===a||(o=r.charCodeAt(s+1))<56320||o>57343?t?r.charAt(s):n:t?r.slice(s,s+2):o-56320+(n-55296<<10)+65536}},Ci={codeAt:Ti(!1),charAt:Ti(!0)}.charAt,Oi=we.set,Ei=we.getterFor("String Iterator");_i(String,"String",(function(t){Oi(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=Ei(this),i=e.string,n=e.index;return n>=i.length?{value:void 0,done:!0}:(t=Ci(i,n),e.index+=t.length,{value:t,done:!1})}));var Pi=Zt("iterator"),Li=function(t){if(null!=t)return t[Pi]||t["@@iterator"]||si[ne(t)]},Ii=function(t){var e=Li(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return H(e.call(t))};U({target:"Object",stat:!0,sham:!h},{create:Ht});var Ai=R.Object,Ni=function(t,e){return Ai.create(t,e)},Yi=Ni,Ri=X;var ji=function(t,e,i){return e in t?Ri(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},Fi=l((function(){ht(1)}));U({target:"Object",stat:!0,forced:Fi},{keys:function(t){return ht(Tt(t))}});var Hi,zi=R.Object.keys,Gi="\t\n\v\f\r    \u2028\u2029\ufeff",Wi="["+Gi+"]",Vi=RegExp("^"+Wi+Wi+"*"),Bi=RegExp(Wi+Wi+"*$"),Ui=function(t){return function(e){var i=String(y(e));return 1&t&&(i=i.replace(Vi,"")),2&t&&(i=i.replace(Bi,"")),i}},Xi={start:Ui(1),end:Ui(2),trim:Ui(3)},qi=Xi.trim;U({target:"String",proto:!0,forced:(Hi="trim",l((function(){return!!Gi[Hi]()||"…"!="…"[Hi]()||Gi[Hi].name!==Hi})))},{trim:function(){return qi(this)}});var Zi=function(t){return R[t+"Prototype"]},Ki=Zi("String").trim,$i=String.prototype,Ji=function(t){var e=t.trim;return"string"==typeof t||t===$i||t instanceof String&&e===$i.trim?Ki:e},Qi=function(t,e){var i=[][t];return!!i&&l((function(){i.call(null,e||function(){throw 1},1)}))},tn=Object.defineProperty,en={},nn=function(t){throw t},on=function(t,e){if(x(en,t))return en[t];e||(e={});var i=[][t],n=!!x(e,"ACCESSORS")&&e.ACCESSORS,o=x(e,0)?e[0]:nn,r=x(e,1)?e[1]:void 0;return en[t]=!!i&&!l((function(){if(n&&!h)return!0;var t={length:-1};n?tn(t,1,{enumerable:!0,get:nn}):t[1]=1,i.call(t,o,r)}))},rn=Me.forEach,sn=Qi("forEach"),an=on("forEach"),ln=sn&&an?[].forEach:function(t){return rn(this,t,arguments.length>1?arguments[1]:void 0)};U({target:"Array",proto:!0,forced:[].forEach!=ln},{forEach:ln});var hn,un,dn=Zi("Array").forEach,cn=Array.prototype,pn={DOMTokenList:!0,NodeList:!0},mn=function(t){var e=t.forEach;return t===cn||t instanceof Array&&e===cn.forEach||pn.hasOwnProperty(ne(t))?dn:e},fn=pt("navigator","userAgent")||"",vn=a.process,gn=vn&&vn.versions,yn=gn&&gn.v8;yn?un=(hn=yn.split("."))[0]+hn[1]:fn&&(!(hn=fn.match(/Edge\/(\d+)/))||hn[1]>=74)&&(hn=fn.match(/Chrome\/(\d+)/))&&(un=hn[1]);var bn=un&&+un,_n=Zt("species"),wn=function(t){return bn>=51||!l((function(){var e=[];return(e.constructor={})[_n]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},kn=Me.map,xn=wn("map"),Dn=on("map");U({target:"Array",proto:!0,forced:!xn||!Dn},{map:function(t){return kn(this,t,arguments.length>1?arguments[1]:void 0)}});var Sn=Zi("Array").map,Mn=Array.prototype,Tn=function(t){var e=t.map;return t===Mn||t instanceof Array&&e===Mn.map?Sn:e},Cn=Xi.trim,On=a.parseInt,En=/^[+-]?0[Xx]/,Pn=8!==On(Gi+"08")||22!==On(Gi+"0x16")?function(t,e){var i=Cn(String(t));return On(i,e>>>0||(En.test(i)?16:10))}:On;U({global:!0,forced:parseInt!=Pn},{parseInt:Pn});var Ln=R.parseInt,In=c.f,An=function(t){return function(e){for(var i,n=b(e),o=ht(n),r=o.length,s=0,a=[];r>s;)i=o[s++],h&&!In.call(n,i)||a.push(t?[i,n[i]]:n[i]);return a}},Nn={entries:An(!0),values:An(!1)}.values;U({target:"Object",stat:!0},{values:function(t){return Nn(t)}});var Yn=R.Object.values,Rn=Me.filter,jn=wn("filter"),Fn=on("filter");U({target:"Array",proto:!0,forced:!jn||!Fn},{filter:function(t){return Rn(this,t,arguments.length>1?arguments[1]:void 0)}});var Hn=Zi("Array").filter,zn=Array.prototype,Gn=function(t){var e=t.filter;return t===zn||t instanceof Array&&e===zn.filter?Hn:e},Wn=Zt("isConcatSpreadable"),Vn=bn>=51||!l((function(){var t=[];return t[Wn]=!1,t.concat()[0]!==t})),Bn=wn("concat"),Un=function(t){if(!_(t))return!1;var e=t[Wn];return void 0!==e?!!e:Mt(t)};U({target:"Array",proto:!0,forced:!Vn||!Bn},{concat:function(t){var e,i,n,o,r,s=Tt(this),a=xe(s,0),l=0;for(e=-1,n=arguments.length;e<n;e++)if(r=-1===e?s:arguments[e],Un(r)){if(l+(o=Q(r.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(i=0;i<o;i++,l++)i in r&&yt(a,l,r[i])}else{if(l>=9007199254740991)throw TypeError("Maximum allowed index exceeded");yt(a,l++,r)}return a.length=l,a}});var Xn=Zi("Array").concat,qn=Array.prototype,Zn=function(t){var e=t.concat;return t===qn||t instanceof Array&&e===qn.concat?Xn:e};U({target:"Array",stat:!0},{isArray:Mt});var Kn=R.Array.isArray,$n=Kn;var Jn=function(t){if($n(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}},Qn=function(t,e,i,n){try{return n?e(H(i)[0],i[1]):e(i)}catch(e){var o=t.return;throw void 0!==o&&H(o.call(t)),e}},to=Zt("iterator"),eo=Array.prototype,io=function(t){return void 0!==t&&(si.Array===t||eo[to]===t)},no=Zt("iterator"),oo=!1;try{var ro=0,so={next:function(){return{done:!!ro++}},return:function(){oo=!0}};so[no]=function(){return this},Array.from(so,(function(){throw 2}))}catch(t){}var ao=!function(t,e){if(!e&&!oo)return!1;var i=!1;try{var n={};n[no]=function(){return{next:function(){return{done:i=!0}}}},t(n)}catch(t){}return i}((function(t){Array.from(t)}));U({target:"Array",stat:!0,forced:ao},{from:function(t){var e,i,n,o,r,s,a=Tt(t),l="function"==typeof this?this:Array,h=arguments.length,u=h>1?arguments[1]:void 0,d=void 0!==u,c=Li(a),p=0;if(d&&(u=F(u,h>2?arguments[2]:void 0,2)),null==c||l==Array&&io(c))for(i=new l(e=Q(a.length));e>p;p++)s=d?u(a[p],p):a[p],yt(i,p,s);else for(r=(o=c.call(a)).next,i=new l;!(n=r.call(o)).done;p++)s=d?Qn(o,u,[n.value,p],!0):n.value,yt(i,p,s);return i.length=p,i}});var lo=R.Array.from,ho=Zt("iterator"),uo=function(t){var e=Object(t);return void 0!==e[ho]||"@@iterator"in e||si.hasOwnProperty(ne(e))};var co=function(t){if(uo(Object(t))||"[object Arguments]"===Object.prototype.toString.call(t))return lo(t)};var po=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var mo=function(t){return Jn(t)||co(t)||po()},fo=wn("slice"),vo=on("slice",{ACCESSORS:!0,0:0,1:2}),go=Zt("species"),yo=[].slice,bo=Math.max;U({target:"Array",proto:!0,forced:!fo||!vo},{slice:function(t,e){var i,n,o,r=b(this),s=Q(r.length),a=it(t,s),l=it(void 0===e?s:e,s);if(Mt(r)&&("function"!=typeof(i=r.constructor)||i!==Array&&!Mt(i.prototype)?_(i)&&null===(i=i[go])&&(i=void 0):i=void 0,i===Array||void 0===i))return yo.call(r,a,l);for(n=new(void 0===i?Array:i)(bo(l-a,0)),o=0;a<l;a++,o++)a in r&&yt(n,o,r[a]);return n.length=o,n}});var _o=Zi("Array").slice,wo=Array.prototype,ko=function(t){var e=t.slice;return t===wo||t instanceof Array&&e===wo.slice?_o:e},xo=l((function(){ui(1)}));U({target:"Object",stat:!0,forced:xo,sham:!ai},{getPrototypeOf:function(t){return ui(Tt(t))}});var Do=R.Object.getPrototypeOf,So=Do,Mo=ot.indexOf,To=[].indexOf,Co=!!To&&1/[1].indexOf(1,-0)<0,Oo=Qi("indexOf"),Eo=on("indexOf",{ACCESSORS:!0,1:0});U({target:"Array",proto:!0,forced:Co||!Oo||!Eo},{indexOf:function(t){return Co?To.apply(this,arguments)||0:Mo(this,t,arguments.length>1?arguments[1]:void 0)}});var Po=Zi("Array").indexOf,Lo=Array.prototype,Io=function(t){var e=t.indexOf;return t===Lo||t instanceof Array&&e===Lo.indexOf?Po:e},Ao=Kn,No=Object.assign,Yo=Object.defineProperty,Ro=!No||l((function(){if(h&&1!==No({b:1},No(Yo({},"a",{enumerable:!0,get:function(){Yo(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},i=Symbol();return t[i]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=No({},t)[i]||"abcdefghijklmnopqrst"!=ht(No({},e)).join("")}))?function(t,e){for(var i=Tt(t),n=arguments.length,o=1,r=vt.f,s=c.f;n>o;)for(var a,l=g(arguments[o++]),u=r?ht(l).concat(r(l)):ht(l),d=u.length,p=0;d>p;)a=u[p++],h&&!s.call(l,a)||(i[a]=l[a]);return i}:No;U({target:"Object",stat:!0,forced:Object.assign!==Ro},{assign:Ro});var jo=R.Object.assign;Jt("iterator");var Fo=Kt.f("iterator"),Ho=Fo,zo=Object.freeze({__proto__:null});Jt("asyncIterator");var Go=Object.freeze({__proto__:null});Jt("hasInstance"),Jt("isConcatSpreadable"),Jt("match"),Jt("matchAll"),Jt("replace"),Jt("search"),Jt("species"),Jt("split"),Jt("toPrimitive"),Jt("toStringTag"),Jt("unscopables"),ae(Math,"Math",!0),ae(a.JSON,"JSON",!0),o(zo),o(Go);var Wo=R.Symbol;Jt("asyncDispose"),Jt("dispose"),Jt("observable"),Jt("patternMatch"),Jt("replaceAll");var Vo=Wo,Bo=n((function(t){function e(i){return t.exports=e="function"==typeof Vo&&"symbol"==typeof Ho?function(t){return typeof t}:function(t){return t&&"function"==typeof Vo&&t.constructor===Vo&&t!==Vo.prototype?"symbol":typeof t},e(i)}t.exports=e}));var Uo=function(t){if($n(t))return t};var Xo=function(t,e){if(uo(Object(t))||"[object Arguments]"===Object.prototype.toString.call(t)){var i=[],n=!0,o=!1,r=void 0;try{for(var s,a=Ii(t);!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){o=!0,r=t}finally{try{n||null==a.return||a.return()}finally{if(o)throw r}}return i}};var qo=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var Zo=function(t,e){return Uo(t)||Xo(t,e)||qo()};U({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}});var Ko=R.Date.now;function $o(t,e){var i=zi(t);if(ri){var n=ri(t);e&&(n=Gn(n).call(n,(function(e){return xt(t,e).enumerable}))),i.push.apply(i,n)}return i}function Jo(t){var e=function(){for(var t=Qo(),e=t(" "),i=t(" "),n=t(" "),o=0;o<arguments.length;o++)(e-=t(o<0||arguments.length<=o?void 0:arguments[o]))<0&&(e+=1),(i-=t(o<0||arguments.length<=o?void 0:arguments[o]))<0&&(i+=1),(n-=t(o<0||arguments.length<=o?void 0:arguments[o]))<0&&(n+=1);return[e,i,n]}(t),i=Zo(e,3),n=i[0],o=i[1],r=i[2],s=1,a=function(){var t=2091639*n+2.3283064365386963e-10*s;return n=o,o=r,r=t-(s=0|t)};return a.uint32=function(){return 4294967296*a()},a.fract53=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.algorithm="Alea",a.seed=t,a.version="0.9",a}function Qo(){var t=4022871197;return function(e){for(var i=e.toString(),n=0;n<i.length;n++){var o=.02519603282416938*(t+=i.charCodeAt(n));o-=t=o>>>0,t=(o*=t)>>>0,t+=4294967296*(o-=t)}return 2.3283064365386963e-10*(t>>>0)}}var tr=/^\/?Date\((-?\d+)/i,er=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ir=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,nr=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,or=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function rr(t){return t instanceof Number||"number"==typeof t}function sr(t){return t instanceof String||"string"==typeof t}function ar(t){return"object"===Bo(t)&&null!==t}function lr(t,e,i,n){var o=!1;!0===n&&(o=null===e[i]&&void 0!==t[i]),o?delete t[i]:t[i]=e[i]}var hr=jo;function ur(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)||!0===i)if("object"===Bo(e[o])&&null!==e[o]&&So(e[o])===Object.prototype)void 0===t[o]?t[o]=ur({},e[o],i):"object"===Bo(t[o])&&null!==t[o]&&So(t[o])===Object.prototype?ur(t[o],e[o],i):lr(t,e,o,n);else if(Ao(e[o])){var r;t[o]=ko(r=e[o]).call(r)}else lr(t,e,o,n);return t}function dr(t){var e=Bo(t);return"object"===e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Ao(t)?"Array":t instanceof Date?"Date":"Object":"number"===e?"Number":"boolean"===e?"Boolean":"string"===e?"String":void 0===e?"undefined":e}var cr=Yn;var pr={asBoolean:function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},asNumber:function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},asString:function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},asSize:function(t,e){return"function"==typeof t&&(t=t()),sr(t)?t:rr(t)?t+"px":e||null},asElement:function(t,e){return"function"==typeof t&&(t=t()),t||e||null}};function mr(t){var e;switch(t.length){case 3:case 4:return(e=ir.exec(t))?{r:Ln(e[1]+e[1],16),g:Ln(e[2]+e[2],16),b:Ln(e[3]+e[3],16)}:null;case 6:case 7:return(e=er.exec(t))?{r:Ln(e[1],16),g:Ln(e[2],16),b:Ln(e[3],16)}:null;default:return null}}function fr(t,e,i){var n;return"#"+ko(n=((1<<24)+(t<<16)+(e<<8)+i).toString(16)).call(n,1)}function vr(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,Math.min(e,i)),o=Math.max(t,Math.max(e,i));return n===o?{h:0,s:0,v:n}:{h:60*((t===n?3:i===n?1:5)-(t===n?e-i:i===n?t-e:i-t)/(o-n))/360,s:(o-n)/o,v:o}}var gr=function(t){var e,i={};return mn(e=t.split(";")).call(e,(function(t){if(""!=Ji(t).call(t)){var e,n,o=t.split(":"),r=Ji(e=o[0]).call(e),s=Ji(n=o[1]).call(n);i[r]=s}})),i},yr=function(t){var e;return Tn(e=zi(t)).call(e,(function(e){return e+": "+t[e]})).join("; ")};function br(t,e,i){var n,o,r,s=Math.floor(6*t),a=6*t-s,l=i*(1-e),h=i*(1-a*e),u=i*(1-(1-a)*e);switch(s%6){case 0:n=i,o=u,r=l;break;case 1:n=h,o=i,r=l;break;case 2:n=l,o=i,r=u;break;case 3:n=l,o=h,r=i;break;case 4:n=u,o=l,r=i;break;case 5:n=i,o=l,r=h}return{r:Math.floor(255*n),g:Math.floor(255*o),b:Math.floor(255*r)}}function _r(t,e,i){var n=br(t,e,i);return fr(n.r,n.g,n.b)}function wr(t){var e=mr(t);if(!e)throw new TypeError("'".concat(t,"' is not a valid color."));return vr(e.r,e.g,e.b)}function kr(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function xr(t){return nr.test(t)}function Dr(t){if(null===t||"object"!==Bo(t))return null;if(t instanceof Element)return t;var e=Yi(t);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&"object"==Bo(t[i])&&(e[i]=Dr(t[i]));return e}var Sr=Object.freeze({__proto__:null,Alea:
/**
* vis-util
* https://github.com/visjs/vis-util
*
* utilitie collection for visjs
*
* @version 4.0.0
* @date 2020-02-29T15:35:13.178Z
*
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
*
* @license
* vis.js is dual licensed under both
*
* 1. The Apache 2.0 License
* http://www.apache.org/licenses/LICENSE-2.0
*
* and
*
* 2. The MIT License
* http://opensource.org/licenses/MIT
*
* vis.js may be distributed under either license.
*/
function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return Jo(e.length?e:[Ko()])},HSVToHex:_r,HSVToRGB:br,RGBToHSV:vr,RGBToHex:fr,addClassName:function(t,e){var i=t.className.split(" "),n=e.split(" ");i=Zn(i).call(i,Gn(n).call(n,(function(t){return Io(i).call(i,t)<0}))),t.className=i.join(" ")},addCssText:function(t,e){var i=function(t){for(var e=1;e<arguments.length;e++){var i,n=null!=arguments[e]?arguments[e]:{};if(e%2)mn(i=$o(Object(n),!0)).call(i,(function(e){ji(t,e,n[e])}));else if(bt)dt(t,bt(n));else{var o;mn(o=$o(Object(n))).call(o,(function(e){q(t,e,xt(n,e))}))}}return t}({},gr(t.style.cssText),{},gr(e));t.style.cssText=yr(i)},addEventListener:function(t,e,i,n){var o;t.addEventListener?(void 0===n&&(n=!1),"mousewheel"===e&&Io(o=navigator.userAgent).call(o,"Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,n)):t.attachEvent("on"+e,i)},binarySearchCustom:function(t,e,i,n){for(var o=0,r=0,s=t.length-1;r<=s&&o<1e4;){var a=Math.floor((r+s)/2),l=t[a],h=e(void 0===n?l[i]:l[i][n]);if(0==h)return a;-1==h?r=a+1:s=a-1,o++}return-1},binarySearchValue:function(t,e,i,n,o){var r,s,a,l,h=0,u=0,d=t.length-1;for(o=null!=o?o:function(t,e){return t==e?0:t<e?-1:1};u<=d&&h<1e4;){if(l=Math.floor(.5*(d+u)),r=t[Math.max(0,l-1)][i],s=t[l][i],a=t[Math.min(t.length-1,l+1)][i],0==o(s,e))return l;if(o(r,e)<0&&o(s,e)>0)return"before"==n?Math.max(0,l-1):l;if(o(s,e)<0&&o(a,e)>0)return"before"==n?l:Math.min(t.length-1,l+1);o(s,e)<0?u=l+1:d=l-1,h++}return-1},bridgeObject:Dr,copyAndExtendArray:function(t,e){var i;return Zn(i=[]).call(i,mo(t),[e])},copyArray:function(t){return ko(t).call(t)},deepExtend:ur,easingFunctions:{linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?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 t<.5?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},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},equalArray:function(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!=e[i])return!1;return!0},extend:hr,fillIfDefined:function t(e,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var o in e)if(void 0!==i[o])if(null===i[o]||"object"!==Bo(i[o]))lr(e,i,o,n);else{var r=e[o],s=i[o];ar(r)&&ar(s)&&t(r,s,n)}},forEach:function(t,e){if(Ao(t))for(var i=t.length,n=0;n<i;n++)e(t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e(t[o],o,t)},getAbsoluteLeft:function(t){return t.getBoundingClientRect().left},getAbsoluteRight:function(t){return t.getBoundingClientRect().right},getAbsoluteTop:function(t){return t.getBoundingClientRect().top},getScrollBarWidth:function(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;return i==n&&(n=e.clientWidth),document.body.removeChild(e),i-n},getTarget:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,e=null;return t&&(t.target?e=t.target:t.srcElement&&(e=t.srcElement)),e instanceof Element&&(null==e.nodeType||3!=e.nodeType||(e=e.parentNode)instanceof Element)?e:null},getType:dr,hasParent:function(t,e){for(var i=t;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}return!1},hexToHSV:wr,hexToRGB:mr,insertSort:function(t,e){for(var i=0;i<t.length;i++){var n=t[i],o=void 0;for(o=i;o>0&&e(n,t[o-1])<0;o--)t[o]=t[o-1];t[o]=n}return t},isDate:function(t){if(t instanceof Date)return!0;if(sr(t)){if(tr.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},isNumber:rr,isObject:ar,isString:sr,isValidHex:kr,isValidRGB:xr,isValidRGBA:function(t){return or.test(t)},mergeOptions:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=function(t){return null!=t},r=function(t){return null!==t&&"object"===Bo(t)},s=function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0};if(!r(t))throw new Error("Parameter mergeTarget must be an object");if(!r(e))throw new Error("Parameter options must be an object");if(!o(i))throw new Error("Parameter option must have a value");if(!r(n))throw new Error("Parameter globalOptions must be an object");var a=function(t,e,i){r(t[i])||(t[i]={});var n=e[i],o=t[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])},l=e[i],h=r(n)&&!s(n),u=h?n[i]:void 0,d=u?u.enabled:void 0;if(void 0!==l){if("boolean"==typeof l)return r(t[i])||(t[i]={}),void(t[i].enabled=l);if(null===l&&!r(t[i])){if(!o(u))return;t[i]=Yi(u)}if(r(l)){var c=!0;void 0!==l.enabled?c=l.enabled:void 0!==d&&(c=u.enabled),a(t,e,i),t[i].enabled=c}}},option:pr,overrideOpacity:function(t,e){if(-1!==Io(t).call(t,"rgba"))return t;if(-1!==Io(t).call(t,"rgb")){var i=t.substr(Io(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}var n=mr(t);return null==n?t:"rgba("+n.r+","+n.g+","+n.b+","+e+")"},parseColor:function(t,e){if(sr(t)){var i=t;if(xr(i)){var n,o=Tn(n=i.substr(4).substr(0,i.length-5).split(",")).call(n,(function(t){return Ln(t)}));i=fr(o[0],o[1],o[2])}if(!0===kr(i)){var r=wr(i),s={h:r.h,s:.8*r.s,v:Math.min(1,1.02*r.v)},a={h:r.h,s:Math.min(1,1.25*r.s),v:.8*r.v},l=_r(a.h,a.s,a.v),h=_r(s.h,s.s,s.v);return{background:i,border:l,highlight:{background:h,border:l},hover:{background:h,border:l}}}return{background:i,border:i,highlight:{background:i,border:i},hover:{background:i,border:i}}}return e?{background:t.background||e.background,border:t.border||e.border,highlight:sr(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||e.highlight.background,border:t.highlight&&t.highlight.border||e.highlight.border},hover:sr(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||e.hover.border,background:t.hover&&t.hover.background||e.hover.background}}:{background:t.background||void 0,border:t.border||void 0,highlight:sr(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||void 0,border:t.highlight&&t.highlight.border||void 0},hover:sr(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||void 0,background:t.hover&&t.hover.background||void 0}}},preventDefault:function(t){t||(t=window.event),t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},recursiveDOMDelete:function t(e){if(e)for(;!0===e.hasChildNodes();){var i=e.firstChild;i&&(t(i),e.removeChild(i))}},removeClassName:function(t,e){var i=t.className.split(" "),n=e.split(" ");i=Gn(i).call(i,(function(t){return Io(n).call(n,t)<0})),t.className=i.join(" ")},removeCssText:function(t,e){var i=gr(t.style.cssText),n=gr(e);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&delete i[o];t.style.cssText=yr(i)},removeEventListener:function(t,e,i,n){var o;t.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===e&&Io(o=navigator.userAgent).call(o,"Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,n)):t.detachEvent("on"+e,i)},selectiveBridgeObject:function(t,e){if(null!==e&&"object"===Bo(e)){for(var i=Yi(e),n=0;n<t.length;n++)Object.prototype.hasOwnProperty.call(e,t[n])&&"object"==Bo(e[t[n]])&&(i[t[n]]=Dr(e[t[n]]));return i}return null},selectiveDeepExtend:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Ao(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o=0;o<t.length;o++){var r=t[o];if(Object.prototype.hasOwnProperty.call(i,r))if(i[r]&&i[r].constructor===Object)void 0===e[r]&&(e[r]={}),e[r].constructor===Object?ur(e[r],i[r],!1,n):lr(e,i,r,n);else{if(Ao(i[r]))throw new TypeError("Arrays are not supported by deepExtend");lr(e,i,r,n)}}return e},selectiveExtend:function(t,e){if(!Ao(t))throw new Error("Array with property names expected as first argument");for(var i=arguments.length,n=new Array(i>2?i-2:0),o=2;o<i;o++)n[o-2]=arguments[o];for(var r=0,s=n;r<s.length;r++)for(var a=s[r],l=0;l<t.length;l++){var h=t[l];a&&Object.prototype.hasOwnProperty.call(a,h)&&(e[h]=a[h])}return e},selectiveNotDeepExtend:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Ao(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&-1===Io(t).call(t,o))if(i[o]&&i[o].constructor===Object)void 0===e[o]&&(e[o]={}),e[o].constructor===Object?ur(e[o],i[o]):lr(e,i,o,n);else if(Ao(i[o])){e[o]=[];for(var r=0;r<i[o].length;r++)e[o].push(i[o][r])}else lr(e,i,o,n);return e},throttle:function(t){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){e=!1,t()})))}},toArray:cr,topMost:function(t,e){var i;Ao(e)||(e=[e]);var n=!0,o=!1,r=void 0;try{for(var s,a=Ii(t);!(n=(s=a.next()).done);n=!0){var l=s.value;if(l){i=l[e[0]];for(var h=1;h<e.length;h++)i&&(i=i[e[h]]);if(void 0!==i)break}}}catch(t){o=!0,r=t}finally{try{n||null==a.return||a.return()}finally{if(o)throw r}}return i},updateProperty:function(t,e,i){return t[e]!==i&&(t[e]=i,!0)}});function Mr(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])}function Tr(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=[]}}function Cr(t){Mr(t),Tr(t),Mr(t)}function Or(t,e,i){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(n)):(n=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(n)),e[t].used.push(n),n}function Er(t,e,i,n){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!==n?i.insertBefore(o,n):i.appendChild(o)):(o=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==n?i.insertBefore(o,n):i.appendChild(o)),e[t].used.push(o),o}function Pr(t,e,i,n,o,r){var s;if("circle"==i.style?((s=Or("circle",n,o)).setAttributeNS(null,"cx",t),s.setAttributeNS(null,"cy",e),s.setAttributeNS(null,"r",.5*i.size)):((s=Or("rect",n,o)).setAttributeNS(null,"x",t-.5*i.size),s.setAttributeNS(null,"y",e-.5*i.size),s.setAttributeNS(null,"width",i.size),s.setAttributeNS(null,"height",i.size)),void 0!==i.styles&&s.setAttributeNS(null,"style",i.styles),s.setAttributeNS(null,"class",i.className+" vis-point"),r){var a=Or("text",n,o);r.xOffset&&(t+=r.xOffset),r.yOffset&&(e+=r.yOffset),r.content&&(a.textContent=r.content),r.className&&a.setAttributeNS(null,"class",r.className+" vis-label"),a.setAttributeNS(null,"x",t),a.setAttributeNS(null,"y",e)}return s}function Lr(t,e,i,n,o,r,s,a){if(0!=n){n<0&&(e-=n*=-1);var l=Or("rect",r,s);l.setAttributeNS(null,"x",t-.5*i),l.setAttributeNS(null,"y",e),l.setAttributeNS(null,"width",i),l.setAttributeNS(null,"height",n),l.setAttributeNS(null,"class",o),a&&l.setAttributeNS(null,"style",a)}}function Ir(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch(t){return"en"}}var Ar=Object.freeze({__proto__:null,prepareElements:Mr,cleanupElements:Tr,resetElements:Cr,getSVGElement:Or,getDOMElement:Er,drawPoint:Pr,drawBar:Lr,getNavigatorLanguage:Ir});var Nr=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},Yr=Zi("Array").entries,Rr=Array.prototype,jr={DOMTokenList:!0,NodeList:!0},Fr=function(t){var e=t.entries;return t===Rr||t instanceof Array&&e===Rr.entries||jr.hasOwnProperty(ne(t))?Yr:e},Hr=pt("JSON","stringify"),zr=/[\uD800-\uDFFF]/g,Gr=/^[\uD800-\uDBFF]$/,Wr=/^[\uDC00-\uDFFF]$/,Vr=function(t,e,i){var n=i.charAt(e-1),o=i.charAt(e+1);return Gr.test(t)&&!Wr.test(o)||Wr.test(t)&&!Gr.test(n)?"\\u"+t.charCodeAt(0).toString(16):t},Br=l((function(){return'"\\udf06\\ud834"'!==Hr("\udf06\ud834")||'"\\udead"'!==Hr("\udead")}));Hr&&U({target:"JSON",stat:!0,forced:Br},{stringify:function(t,e,i){var n=Hr.apply(null,arguments);return"string"==typeof n?n.replace(zr,Vr):n}}),R.JSON||(R.JSON={stringify:JSON.stringify});var Ur=function(t,e,i){return R.JSON.stringify.apply(null,arguments)},Xr=Zi("Array").values,qr=Array.prototype,Zr={DOMTokenList:!0,NodeList:!0},Kr=function(t){var e=t.values;return t===qr||t instanceof Array&&e===qr.values||Zr.hasOwnProperty(ne(t))?Xr:e},$r=Zi("Array").keys,Jr=Array.prototype,Qr={DOMTokenList:!0,NodeList:!0},ts=function(t){var e=t.keys;return t===Jr||t instanceof Array&&e===Jr.keys||Qr.hasOwnProperty(ne(t))?$r:e},es=Me.some,is=Qi("some"),ns=on("some");U({target:"Array",proto:!0,forced:!is||!ns},{some:function(t){return es(this,t,arguments.length>1?arguments[1]:void 0)}});var os=Zi("Array").some,rs=Array.prototype,ss=function(t){var e=t.some;return t===rs||t instanceof Array&&e===rs.some?os:e};var as=function(t,e){return!e||"object"!==Bo(e)&&"function"!=typeof e?Nr(t):e},ls=Do;U({target:"Object",stat:!0},{setPrototypeOf:fi});var hs=R.Object.setPrototypeOf,us=n((function(t){function e(i){return t.exports=e=hs?ls:function(t){return t.__proto__||ls(t)},e(i)}t.exports=e})),ds=Ni,cs=n((function(t){function e(i,n){return t.exports=e=hs||function(t,e){return t.__proto__=e,t},e(i,n)}t.exports=e}));var ps=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=ds(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cs(t,e)},ms=[],fs=ms.sort,vs=l((function(){ms.sort(void 0)})),gs=l((function(){ms.sort(null)})),ys=Qi("sort");U({target:"Array",proto:!0,forced:vs||!gs||!ys},{sort:function(t){return void 0===t?fs.call(Tt(this)):fs.call(Tt(this),j(t))}});var bs=Zi("Array").sort,_s=Array.prototype,ws=function(t){var e=t.sort;return t===_s||t instanceof Array&&e===_s.sort?bs:e},ks=!l((function(){return Object.isExtensible(Object.preventExtensions({}))})),xs=n((function(t){var e=G.f,i=It("meta"),n=0,o=Object.isExtensible||function(){return!0},r=function(t){e(t,i,{value:{objectID:"O"+ ++n,weakData:{}}})},s=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!_(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!x(t,i)){if(!o(t))return"F";if(!e)return"E";r(t)}return t[i].objectID},getWeakData:function(t,e){if(!x(t,i)){if(!o(t))return!0;if(!e)return!1;r(t)}return t[i].weakData},onFreeze:function(t){return ks&&s.REQUIRED&&o(t)&&!x(t,i)&&r(t),t}};rt[i]=!0})),Ds=(xs.REQUIRED,xs.fastKey,xs.getWeakData,xs.onFreeze,n((function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,i,n,o,r){var s,a,l,h,u,d,c,p=F(i,n,o?2:1);if(r)s=t;else{if("function"!=typeof(a=Li(t)))throw TypeError("Target is not iterable");if(io(a)){for(l=0,h=Q(t.length);h>l;l++)if((u=o?p(H(c=t[l])[0],c[1]):p(t[l]))&&u instanceof e)return u;return new e(!1)}s=a.call(t)}for(d=s.next;!(c=d.call(s)).done;)if("object"==typeof(u=Qn(s,p,c.value,o))&&u&&u instanceof e)return u;return new e(!1)}).stop=function(t){return new e(!0,t)}}))),Ss=function(t,e,i){if(!(t instanceof e))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return t},Ms=G.f,Ts=Me.forEach,Cs=we.set,Os=we.getterFor,Es=function(t,e,i){var n,o=-1!==t.indexOf("Map"),r=-1!==t.indexOf("Weak"),s=o?"set":"add",u=a[t],d=u&&u.prototype,c={};if(h&&"function"==typeof u&&(r||d.forEach&&!l((function(){(new u).entries().next()})))){n=e((function(e,i){Cs(Ss(e,n,t),{type:t,collection:new u}),null!=i&&Ds(i,e[s],e,o)}));var p=Os(t);Ts(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;t in d&&(!r||"clear"!=t)&&W(n.prototype,t,(function(i,n){var o=p(this).collection;if(!e&&r&&!_(i))return"get"==t&&void 0;var s=o[t](0===i?0:i,n);return e?this:s}))})),r||Ms(n.prototype,"size",{configurable:!0,get:function(){return p(this).collection.size}})}else n=i.getConstructor(e,t,o,s),xs.REQUIRED=!0;return ae(n,t,!1,!0),c[t]=n,U({global:!0,forced:!0},c),r||i.setStrong(n,t,o),n},Ps=function(t,e,i){for(var n in e)i&&i.unsafe&&t[n]?t[n]=e[n]:Bt(t,n,e[n],i);return t},Ls=Zt("species"),Is=G.f,As=xs.fastKey,Ns=we.set,Ys=we.getterFor,Rs={getConstructor:function(t,e,i,n){var o=t((function(t,r){Ss(t,o,e),Ns(t,{type:e,index:Ht(null),first:void 0,last:void 0,size:0}),h||(t.size=0),null!=r&&Ds(r,t[n],t,i)})),r=Ys(e),s=function(t,e,i){var n,o,s=r(t),l=a(t,e);return l?l.value=i:(s.last=l={index:o=As(e,!0),key:e,value:i,previous:n=s.last,next:void 0,removed:!1},s.first||(s.first=l),n&&(n.next=l),h?s.size++:t.size++,"F"!==o&&(s.index[o]=l)),t},a=function(t,e){var i,n=r(t),o=As(e);if("F"!==o)return n.index[o];for(i=n.first;i;i=i.next)if(i.key==e)return i};return Ps(o.prototype,{clear:function(){for(var t=r(this),e=t.index,i=t.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete e[i.index],i=i.next;t.first=t.last=void 0,h?t.size=0:this.size=0},delete:function(t){var e=r(this),i=a(this,t);if(i){var n=i.next,o=i.previous;delete e.index[i.index],i.removed=!0,o&&(o.next=n),n&&(n.previous=o),e.first==i&&(e.first=n),e.last==i&&(e.last=o),h?e.size--:this.size--}return!!i},forEach:function(t){for(var e,i=r(this),n=F(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:i.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!a(this,t)}}),Ps(o.prototype,i?{get:function(t){var e=a(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),h&&Is(o.prototype,"size",{get:function(){return r(this).size}}),o},setStrong:function(t,e,i){var n=e+" Iterator",o=Ys(e),r=Ys(n);_i(t,e,(function(t,e){Ns(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=r(this),e=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?"keys"==e?{value:i.key,done:!1}:"values"==e?{value:i.value,done:!1}:{value:[i.key,i.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),i?"entries":"values",!i,!0),function(t){var e=pt(t),i=G.f;h&&e&&!e[Ls]&&i(e,Ls,{configurable:!0,get:function(){return this}})}(e)}},js=(Es("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Rs),R.Set),Fs=(Es("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),Rs),R.Map),Hs=n((function(t){var e=function(t){var e=Object.prototype,i=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function a(t,e,i,n){var o=e&&e.prototype instanceof u?e:u,r=Object.create(o.prototype),s=new k(n||[]);return r._invoke=function(t,e,i){var n="suspendedStart";return function(o,r){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw r;return D()}for(i.method=o,i.arg=r;;){var s=i.delegate;if(s){var a=b(s,i);if(a){if(a===h)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var u=l(t,e,i);if("normal"===u.type){if(n=i.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(n="completed",i.method="throw",i.arg=u.arg)}}}(t,i,s),r}function l(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=a;var h={};function u(){}function d(){}function c(){}var p={};p[o]=function(){return this};var m=Object.getPrototypeOf,f=m&&m(m(x([])));f&&f!==e&&i.call(f,o)&&(p=f);var v=c.prototype=u.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function y(t,e){var n;this._invoke=function(o,r){function s(){return new e((function(n,s){!function n(o,r,s,a){var h=l(t[o],t,r);if("throw"!==h.type){var u=h.arg,d=u.value;return d&&"object"==typeof d&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(d).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,a)}))}a(h.arg)}(o,r,n,s)}))}return n=n?n.then(s,s):s()}}function b(t,e){var i=t.iterator[e.method];if(void 0===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=l(i,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:D}}function D(){return{value:void 0,done:!0}}return d.prototype=v.constructor=c,c.constructor=d,c[s]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},g(y.prototype),y.prototype[r]=function(){return this},t.AsyncIterator=y,t.async=function(e,i,n,o,r){void 0===r&&(r=Promise);var s=new y(a(e,i,n,o),r);return t.isGeneratorFunction(i)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},g(v),v[s]="Generator",v[o]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){for(;e.length;){var n=e.pop();if(n in t)return i.value=n,i.done=!1,i}return i.done=!0,i}},t.values=x,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(i,n){return s.type="throw",s.arg=t,e.next=i,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o],s=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var a=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(a&&l){if(this.prev<r.catchLoc)return n(r.catchLoc,!0);if(this.prev<r.finallyLoc)return n(r.finallyLoc)}else if(a){if(this.prev<r.catchLoc)return n(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return n(r.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=t,s.arg=e,r?(this.method="next",this.next=r.finallyLoc,h):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),w(i),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var o=n.arg;w(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:x(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),h}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}})),zs=Fo,Gs=wn("splice"),Ws=on("splice",{ACCESSORS:!0,0:0,1:2}),Vs=Math.max,Bs=Math.min;U({target:"Array",proto:!0,forced:!Gs||!Ws},{splice:function(t,e){var i,n,o,r,s,a,l=Tt(this),h=Q(l.length),u=it(t,h),d=arguments.length;if(0===d?i=n=0:1===d?(i=0,n=h-u):(i=d-2,n=Bs(Vs($(e),0),h-u)),h+i-n>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(o=xe(l,n),r=0;r<n;r++)(s=u+r)in l&&yt(o,r,l[s]);if(o.length=n,i<n){for(r=u;r<h-n;r++)a=r+i,(s=r+n)in l?l[a]=l[s]:delete l[a];for(r=h;r>h-n+i;r--)delete l[r-1]}else if(i>n)for(r=h-n;r>u;r--)a=r+i-1,(s=r+n-1)in l?l[a]=l[s]:delete l[a];for(r=0;r<i;r++)l[r+u]=arguments[r+2];return l.length=h-n+i,o}});var Us=Zi("Array").splice,Xs=Array.prototype,qs=function(t){var e=t.splice;return t===Xs||t instanceof Array&&e===Xs.splice?Us:e},Zs=[].slice,Ks=/MSIE .\./.test(fn),$s=function(t){return function(e,i){var n=arguments.length>2,o=n?Zs.call(arguments,2):void 0;return t(n?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,i)}};U({global:!0,bind:!0,forced:Ks},{setTimeout:$s(a.setTimeout),setInterval:$s(a.setInterval)});var Js=R.setTimeout,Qs=function(t,e,i,n,o,r,s,a){for(var l,h=o,u=0,d=!!s&&F(s,a,3);u<n;){if(u in i){if(l=d?d(i[u],u,e):i[u],r>0&&Mt(l))h=Qs(t,e,l,Q(l.length),h,r-1)-1;else{if(h>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[h]=l}h++}u++}return h},ta=Qs;U({target:"Array",proto:!0},{flatMap:function(t){var e,i=Tt(this),n=Q(i.length);return j(t),(e=xe(i,0)).length=ta(e,i,i,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}});var ea=Zi("Array").flatMap,ia=Array.prototype,na=function(t){var e=t.flatMap;return t===ia||t instanceof Array&&e===ia.flatMap?ea:e},oa=function(t){return function(e,i,n,o){j(i);var r=Tt(e),s=g(r),a=Q(r.length),l=t?a-1:0,h=t?-1:1;if(n<2)for(;;){if(l in s){o=s[l],l+=h;break}if(l+=h,t?l<0:a<=l)throw TypeError("Reduce of empty array with no initial value")}for(;t?l>=0:a>l;l+=h)l in s&&(o=i(o,s[l],l,r));return o}},ra={left:oa(!1),right:oa(!0)}.left,sa=Qi("reduce"),aa=on("reduce",{1:0});U({target:"Array",proto:!0,forced:!sa||!aa},{reduce:function(t){return ra(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var la=Zi("Array").reduce,ha=Array.prototype,ua=function(t){var e=t.reduce;return t===ha||t instanceof Array&&e===ha.reduce?la:e},da=[].slice,ca={},pa=function(t,e,i){if(!(e in ca)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";ca[e]=Function("C,a","return new C("+n.join(",")+")")}return ca[e](t,i)},ma=Function.bind||function(t){var e=j(this),i=da.call(arguments,1),n=function(){var o=i.concat(da.call(arguments));return this instanceof n?pa(e,o.length,o):e.apply(t,o)};return _(e.prototype)&&(n.prototype=e.prototype),n};U({target:"Function",proto:!0},{bind:ma});var fa=Zi("Function").bind,va=Function.prototype,ga=function(t){var e=t.bind;return t===va||t instanceof Function&&e===va.bind?fa:e};var ya=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function ba(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Ri(t,n.key,n)}}var _a=function(t,e,i){return e&&ba(t.prototype,e),i&&ba(t,i),t};function wa(t,e){var i=zi(t);if(ri){var n=ri(t);e&&(n=Gn(n).call(n,(function(e){return xt(t,e).enumerable}))),i.push.apply(i,n)}return i}function ka(t){return new Da(t)}var xa=function(){function t(e,i,n){var o,r,s;ya(this,t),this._source=e,this._transformers=i,this._target=n,this._listeners={add:ga(o=this._add).call(o,this),remove:ga(r=this._remove).call(r,this),update:ga(s=this._update).call(s,this)}}return _a(t,[{key:"all",value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:"start",value:function(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}},{key:"stop",value:function(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}},{key:"_transformItems",value:function(t){var e;return ua(e=this._transformers).call(e,(function(t,e){return e(t)}),t)}},{key:"_add",value:function(t,e){null!=e&&this._target.add(this._transformItems(this._source.get(e.items)))}},{key:"_update",value:function(t,e){null!=e&&this._target.update(this._transformItems(this._source.get(e.items)))}},{key:"_remove",value:function(t,e){null!=e&&this._target.remove(this._transformItems(e.oldData))}}]),t}(),Da=function(){function t(e){ya(this,t),this._source=e,this._transformers=[]}return _a(t,[{key:"filter",value:function(t){return this._transformers.push((function(e){return Gn(e).call(e,t)})),this}},{key:"map",value:function(t){return this._transformers.push((function(e){return Tn(e).call(e,t)})),this}},{key:"flatMap",value:function(t){return this._transformers.push((function(e){return na(e).call(e,t)})),this}},{key:"to",value:function(t){return new xa(this._source,this._transformers,t)}}]),t}();for(var Sa=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var e,i,n="undefined"!=typeof crypto&&crypto.getRandomValues&&ga(e=crypto.getRandomValues).call(e,crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&ga(i=msCrypto.getRandomValues).call(i,msCrypto);if(n){var o=new Uint8Array(16);t.exports=function(){return n(o),o}}else{var r=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),r[e]=t>>>((3&e)<<3)&255;return r}}})),Ma=[],Ta=0;Ta<256;++Ta)Ma[Ta]=(Ta+256).toString(16).substr(1);var Ca=function(t,e){var i=e||0,n=Ma;return[n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]]].join("")};var Oa=function(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||Sa)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var r=0;r<16;++r)e[n+r]=o[r];return e||Ca(o)},Ea=/^\/?Date\((-?\d+)/i;function Pa(t){return r.isMoment(t)}function La(t,e){var i;if(void 0!==t){if(null===t)return null;if(!e)return t;if("string"!=typeof e&&!(e instanceof String))throw new Error("Type must be a string");switch(e){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return sr(t)&&!isNaN(Date.parse(t))?r(t).valueOf():Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(rr(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(Pa(t))return new Date(t.valueOf());if(sr(t))return(i=Ea.exec(t))?new Date(Number(i[1])):r(new Date(t)).toDate();throw new Error("Cannot convert object of type "+dr(t)+" to type Date");case"Moment":if(rr(t))return r(t);if(t instanceof Date)return r(t.valueOf());if(Pa(t))return r(t);if(sr(t))return i=Ea.exec(t),r(i?Number(i[1]):t);throw new Error("Cannot convert object of type "+dr(t)+" to type Date");case"ISODate":if(rr(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(Pa(t))return t.toDate().toISOString();if(sr(t))return(i=Ea.exec(t))?new Date(Number(i[1])).toISOString():r(t).format();throw new Error("Cannot convert object of type "+dr(t)+" to type ISODate");case"ASPDate":if(rr(t))return"/Date("+t+")/";if(t instanceof Date||Pa(t))return"/Date("+t.valueOf()+")/";if(sr(t))return"/Date("+((i=Ea.exec(t))?new Date(Number(i[1])).valueOf():new Date(t).valueOf())+")/";throw new Error("Cannot convert object of type "+dr(t)+" to type ASPDate");default:throw new Error("Unknown type ".concat(e))}}}function Ia(t){return"string"==typeof t||"number"==typeof t}var Aa=function(){function t(e){ya(this,t),this._queue=[],this._timeout=null,this._extended=null,this.delay=null,this.max=1/0,this.setOptions(e)}return _a(t,[{key:"setOptions",value:function(t){t&&void 0!==t.delay&&(this.delay=t.delay),t&&void 0!==t.max&&(this.max=t.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var t=this._extended.object,e=this._extended.methods,i=0;i<e.length;i++){var n=e[i];n.original?t[n.name]=n.original:delete t[n.name]}this._extended=null}}},{key:"replace",value:function(t,e){var i=this,n=t[e];if(!n)throw new Error("Method "+e+" undefined");t[e]=function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];i.queue({args:e,fn:n,context:this})}}},{key:"queue",value:function(t){"function"==typeof t?this._queue.push({fn:t}):this._queue.push(t),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var t=this;this._queue.length>this.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=Js((function(){t.flush()}),this.delay))}},{key:"flush",value:function(){var t,e;mn(t=qs(e=this._queue).call(e,0)).call(t,(function(t){t.fn.apply(t.context||t.fn,t.args||[])}))}}],[{key:"extend",value:function(e,i){var n=new t(i);if(void 0!==e.flush)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var o=[{name:"flush",original:void 0}];if(i&&i.replace)for(var r=0;r<i.replace.length;r++){var s=i.replace[r];o.push({name:s,original:e[s]}),n.replace(e,s)}return n._extended={object:e,methods:o},n}}]),t}(),Na=function(){function t(){ya(this,t),this._subscribers={"*":[],add:[],remove:[],update:[]},this.subscribe=t.prototype.on,this.unsubscribe=t.prototype.off}return _a(t,[{key:"_trigger",value:function(t,e,i){var n,o;if("*"===t)throw new Error("Cannot trigger event *");mn(n=Zn(o=[]).call(o,mo(this._subscribers[t]),mo(this._subscribers["*"]))).call(n,(function(n){n(t,e,null!=i?i:null)}))}},{key:"on",value:function(t,e){"function"==typeof e&&this._subscribers[t].push(e)}},{key:"off",value:function(t,e){var i;this._subscribers[t]=Gn(i=this._subscribers[t]).call(i,(function(t){return t!==e}))}}]),t}(),Ya=function(){function t(e){ya(this,t),this._pairs=e}return _a(t,[{key:zs,value:Hs.mark((function t(){var e,i,n,o,r,s,a,l;return Hs.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=!0,i=!1,n=void 0,t.prev=3,o=Ii(this._pairs);case 5:if(e=(r=o.next()).done){t.next=12;break}return s=Zo(r.value,2),a=s[0],l=s[1],t.next=9,[a,l];case 9:e=!0,t.next=5;break;case 12:t.next=18;break;case 14:t.prev=14,t.t0=t.catch(3),i=!0,n=t.t0;case 18:t.prev=18,t.prev=19,e||null==o.return||o.return();case 21:if(t.prev=21,!i){t.next=24;break}throw n;case 24:return t.finish(21);case 25:return t.finish(18);case 26:case"end":return t.stop()}}),t,this,[[3,14,18,26],[19,,21,25]])}))},{key:"entries",value:Hs.mark((function t(){var e,i,n,o,r,s,a,l;return Hs.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=!0,i=!1,n=void 0,t.prev=3,o=Ii(this._pairs);case 5:if(e=(r=o.next()).done){t.next=12;break}return s=Zo(r.value,2),a=s[0],l=s[1],t.next=9,[a,l];case 9:e=!0,t.next=5;break;case 12:t.next=18;break;case 14:t.prev=14,t.t0=t.catch(3),i=!0,n=t.t0;case 18:t.prev=18,t.prev=19,e||null==o.return||o.return();case 21:if(t.prev=21,!i){t.next=24;break}throw n;case 24:return t.finish(21);case 25:return t.finish(18);case 26:case"end":return t.stop()}}),t,this,[[3,14,18,26],[19,,21,25]])}))},{key:"keys",value:Hs.mark((function t(){var e,i,n,o,r,s,a;return Hs.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=!0,i=!1,n=void 0,t.prev=3,o=Ii(this._pairs);case 5:if(e=(r=o.next()).done){t.next=12;break}return s=Zo(r.value,1),a=s[0],t.next=9,a;case 9:e=!0,t.next=5;break;case 12:t.next=18;break;case 14:t.prev=14,t.t0=t.catch(3),i=!0,n=t.t0;case 18:t.prev=18,t.prev=19,e||null==o.return||o.return();case 21:if(t.prev=21,!i){t.next=24;break}throw n;case 24:return t.finish(21);case 25:return t.finish(18);case 26:case"end":return t.stop()}}),t,this,[[3,14,18,26],[19,,21,25]])}))},{key:"values",value:Hs.mark((function t(){var e,i,n,o,r,s,a;return Hs.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=!0,i=!1,n=void 0,t.prev=3,o=Ii(this._pairs);case 5:if(e=(r=o.next()).done){t.next=12;break}return s=Zo(r.value,2),a=s[1],t.next=9,a;case 9:e=!0,t.next=5;break;case 12:t.next=18;break;case 14:t.prev=14,t.t0=t.catch(3),i=!0,n=t.t0;case 18:t.prev=18,t.prev=19,e||null==o.return||o.return();case 21:if(t.prev=21,!i){t.next=24;break}throw n;case 24:return t.finish(21);case 25:return t.finish(18);case 26:case"end":return t.stop()}}),t,this,[[3,14,18,26],[19,,21,25]])}))},{key:"toIdArray",value:function(){var t;return Tn(t=mo(this._pairs)).call(t,(function(t){return t[0]}))}},{key:"toItemArray",value:function(){var t;return Tn(t=mo(this._pairs)).call(t,(function(t){return t[1]}))}},{key:"toEntryArray",value:function(){return mo(this._pairs)}},{key:"toObjectMap",value:function(){var t=Yi(null),e=!0,i=!1,n=void 0;try{for(var o,r=Ii(this._pairs);!(e=(o=r.next()).done);e=!0){var s=Zo(o.value,2),a=s[0],l=s[1];t[a]=l}}catch(t){i=!0,n=t}finally{try{e||null==r.return||r.return()}finally{if(i)throw n}}return t}},{key:"toMap",value:function(){return new Fs(this._pairs)}},{key:"toIdSet",value:function(){return new js(this.toIdArray())}},{key:"toItemSet",value:function(){return new js(this.toItemArray())}},{key:"cache",value:function(){return new t(mo(this._pairs))}},{key:"distinct",value:function(t){var e=new js,i=!0,n=!1,o=void 0;try{for(var r,s=Ii(this._pairs);!(i=(r=s.next()).done);i=!0){var a=Zo(r.value,2),l=a[0],h=a[1];e.add(t(h,l))}}catch(t){n=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(n)throw o}}return e}},{key:"filter",value:function(e){var i=this._pairs;return new t(ji({},zs,Hs.mark((function t(){var n,o,r,s,a,l,h,u;return Hs.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=!0,o=!1,r=void 0,t.prev=3,s=Ii(i);case 5:if(n=(a=s.next()).done){t.next=13;break}if(l=Zo(a.value,2),h=l[0],u=l[1],!e(u,h)){t.next=10;break}return t.next=10,[h,u];case 10:n=!0,t.next=5;break;case 13:t.next=19;break;case 15:t.prev=15,t.t0=t.catch(3),o=!0,r=t.t0;case 19:t.prev=19,t.prev=20,n||null==s.return||s.return();case 22:if(t.prev=22,!o){t.next=25;break}throw r;case 25:return t.finish(22);case 26:return t.finish(19);case 27:case"end":return t.stop()}}),t,null,[[3,15,19,27],[20,,22,26]])}))))}},{key:"forEach",value:function(t){var e=!0,i=!1,n=void 0;try{for(var o,r=Ii(this._pairs);!(e=(o=r.next()).done);e=!0){var s=Zo(o.value,2),a=s[0];t(s[1],a)}}catch(t){i=!0,n=t}finally{try{e||null==r.return||r.return()}finally{if(i)throw n}}}},{key:"map",value:function(e){var i=this._pairs;return new t(ji({},zs,Hs.mark((function t(){var n,o,r,s,a,l,h,u;return Hs.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=!0,o=!1,r=void 0,t.prev=3,s=Ii(i);case 5:if(n=(a=s.next()).done){t.next=12;break}return l=Zo(a.value,2),h=l[0],u=l[1],t.next=9,[h,e(u,h)];case 9:n=!0,t.next=5;break;case 12:t.next=18;break;case 14:t.prev=14,t.t0=t.catch(3),o=!0,r=t.t0;case 18:t.prev=18,t.prev=19,n||null==s.return||s.return();case 21:if(t.prev=21,!o){t.next=24;break}throw r;case 24:return t.finish(21);case 25:return t.finish(18);case 26:case"end":return t.stop()}}),t,null,[[3,14,18,26],[19,,21,25]])}))))}},{key:"max",value:function(t){var e=Ii(this._pairs),i=e.next();if(i.done)return null;for(var n=i.value[1],o=t(i.value[1],i.value[0]);!(i=e.next()).done;){var r=Zo(i.value,2),s=r[0],a=r[1],l=t(a,s);l>o&&(o=l,n=a)}return n}},{key:"min",value:function(t){var e=Ii(this._pairs),i=e.next();if(i.done)return null;for(var n=i.value[1],o=t(i.value[1],i.value[0]);!(i=e.next()).done;){var r=Zo(i.value,2),s=r[0],a=r[1],l=t(a,s);l<o&&(o=l,n=a)}return n}},{key:"reduce",value:function(t,e){var i=!0,n=!1,o=void 0;try{for(var r,s=Ii(this._pairs);!(i=(r=s.next()).done);i=!0){var a=Zo(r.value,2),l=a[0];e=t(e,a[1],l)}}catch(t){n=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(n)throw o}}return e}},{key:"sort",value:function(e){var i=this;return new t(ji({},zs,(function(){var t;return Ii(ws(t=mo(i._pairs)).call(t,(function(t,i){var n=Zo(t,2),o=n[0],r=n[1],s=Zo(i,2),a=s[0],l=s[1];return e(r,l,o,a)})))})))}}]),t}(),Ra=function(){console.warn("Type coercion has been deprecated. Please, use data pipes instead. See https://visjs.github.io/vis-data/data/datapipe.html#TypeCoercion for more details with working migration example.")},ja=function(t){function e(t,i){var n;if(ya(this,e),n=as(this,us(e).call(this)),t&&!Ao(t)&&(i=t,t=[]),n._options=i||{},n._data=new Fs,n.length=0,n._idProp=n._options.fieldId||"id",n._type={},n._options.type){Ra();for(var o=zi(n._options.type),r=0,s=o.length;r<s;r++){var a=o[r],l=n._options.type[a];n._type[a]="Date"==l||"ISODate"==l||"ASPDate"==l?"Date":l}}return t&&t.length&&n.add(t),n.setOptions(i),n}return ps(e,t),_a(e,[{key:"setOptions",value:function(t){t&&void 0!==t.queue&&(!1===t.queue?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=Aa.extend(this,{replace:["add","update","remove"]})),t.queue&&"object"===Bo(t.queue)&&this._queue.setOptions(t.queue)))}},{key:"add",value:function(t,e){var i,n=this,o=[];if(Ao(t)){var r=Tn(t).call(t,(function(t){return t[n._idProp]}));if(ss(r).call(r,(function(t){return n._data.has(t)})))throw new Error("A duplicate id was found in the parameter array.");for(var s=0,a=t.length;s<a;s++)i=this._addItem(t[s]),o.push(i)}else{if(!t||"object"!==Bo(t))throw new Error("Unknown dataType");i=this._addItem(t),o.push(i)}return o.length&&this._trigger("add",{items:o},e),o}},{key:"update",value:function(t,e){var i=this,n=[],o=[],r=[],s=[],a=this._idProp,l=function(t){var e=t[a];if(null!=e&&i._data.has(e)){var l=t,h=jo({},i._data.get(e)),u=i._updateItem(l);o.push(u),s.push(l),r.push(h)}else{var d=i._addItem(t);n.push(d)}};if(Ao(t))for(var h=0,u=t.length;h<u;h++)t[h]&&"object"===Bo(t[h])?l(t[h]):console.warn("Ignoring input item, which is not an object at index "+h);else{if(!t||"object"!==Bo(t))throw new Error("Unknown dataType");l(t)}if(n.length&&this._trigger("add",{items:n},e),o.length){var d={items:o,oldData:r,data:s};this._trigger("update",d,e)}return Zn(n).call(n,o)}},{key:"updateOnly",value:function(t,e){var i,n=this;Ao(t)||(t=[t]);var o=Tn(i=Tn(t).call(t,(function(t){var e=n._data.get(t[n._idProp]);if(null==e)throw new Error("Updating non-existent items is not allowed.");return{oldData:e,update:t}}))).call(i,(function(t){var e=t.oldData,i=t.update,o=e[n._idProp],r=ur(ur({},e),i);return n._data.set(o,r),{id:o,oldData:e,updatedData:r}}));if(o.length){var r={items:Tn(o).call(o,(function(t){return t.id})),oldData:Tn(o).call(o,(function(t){return t.oldData})),data:Tn(o).call(o,(function(t){return t.updatedData}))};return this._trigger("update",r,e),r.items}return[]}},{key:"get",value:function(t,e){var i=void 0,n=void 0,o=void 0;Ia(t)?(i=t,o=e):Ao(t)?(n=t,o=e):o=t;var r=o&&"Object"===o.returnType?"Object":"Array",s=o&&o.type||this._options.type,a=o&&Gn(o),l=[],h=null,u=null,d=null;if(null!=i)(h=this._getItem(i,s))&&a&&!a(h)&&(h=null);else if(null!=n)for(var c=0,p=n.length;c<p;c++)null==(h=this._getItem(n[c],s))||a&&!a(h)||l.push(h);else for(var m,f=0,v=(u=mo(ts(m=this._data).call(m))).length;f<v;f++)d=u[f],null==(h=this._getItem(d,s))||a&&!a(h)||l.push(h);if(o&&o.order&&null==i&&this._sort(l,o.order),o&&o.fields){var g=o.fields;if(null!=i&&null!=h)h=this._filterFields(h,g);else for(var y=0,b=l.length;y<b;y++)l[y]=this._filterFields(l[y],g)}if("Object"==r){for(var _={},w=0,k=l.length;w<k;w++){var x=l[w];_[x[this._idProp]]=x}return _}return null!=i?h:l}},{key:"getIds",value:function(t){var e,i,n=this._data,o=t&&Gn(t),r=t&&t.order,s=t&&t.type||this._options.type,a=mo(ts(n).call(n)),l=[];if(o)if(r){i=[];for(var h=0,u=a.length;h<u;h++){var d=a[h];o(e=this._getItem(d,s))&&i.push(e)}this._sort(i,r);for(var c=0,p=i.length;c<p;c++)l.push(i[c][this._idProp])}else for(var m=0,f=a.length;m<f;m++){var v=a[m];o(e=this._getItem(v,s))&&l.push(e[this._idProp])}else if(r){i=[];for(var g=0,y=a.length;g<y;g++){var b=a[g];i.push(n.get(b))}this._sort(i,r);for(var _=0,w=i.length;_<w;_++)l.push(i[_][this._idProp])}else for(var k=0,x=a.length;k<x;k++){var D=a[k];e=n.get(D),l.push(e[this._idProp])}return l}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(t,e){var i=e&&Gn(e),n=e&&e.type||this._options.type,o=this._data,r=mo(ts(o).call(o));if(e&&e.order)for(var s=this.get(e),a=0,l=s.length;a<l;a++){var h=s[a];t(h,h[this._idProp])}else for(var u=0,d=r.length;u<d;u++){var c=r[u],p=this._getItem(c,n);i&&!i(p)||t(p,c)}}},{key:"map",value:function(t,e){for(var i=e&&Gn(e),n=e&&e.type||this._options.type,o=[],r=this._data,s=mo(ts(r).call(r)),a=0,l=s.length;a<l;a++){var h=s[a],u=this._getItem(h,n);i&&!i(u)||o.push(t(u,h))}return e&&e.order&&this._sort(o,e.order),o}},{key:"_filterFields",value:function(t,e){var i;return t?ua(i=Ao(e)?e:zi(e)).call(i,(function(e,i){return e[i]=t[i],e}),{}):t}},{key:"_sort",value:function(t,e){if("string"==typeof e){var i=e;ws(t).call(t,(function(t,e){var n=t[i],o=e[i];return n>o?1:n<o?-1:0}))}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");ws(t).call(t,e)}}},{key:"remove",value:function(t,e){for(var i=[],n=[],o=Ao(t)?t:[t],r=0,s=o.length;r<s;r++){var a=this._remove(o[r]);if(a){var l=a[this._idProp];null!=l&&(i.push(l),n.push(a))}}return i.length&&this._trigger("remove",{items:i,oldData:n},e),i}},{key:"_remove",value:function(t){var e;if(Ia(t)?e=t:t&&"object"===Bo(t)&&(e=t[this._idProp]),null!=e&&this._data.has(e)){var i=this._data.get(e)||null;return this._data.delete(e),--this.length,i}return null}},{key:"clear",value:function(t){for(var e,i=mo(ts(e=this._data).call(e)),n=[],o=0,r=i.length;o<r;o++)n.push(this._data.get(i[o]));return this._data.clear(),this.length=0,this._trigger("remove",{items:i,oldData:n},t),i}},{key:"max",value:function(t){var e=null,i=null,n=!0,o=!1,r=void 0;try{for(var s,a=Ii(Kr(l=this._data).call(l));!(n=(s=a.next()).done);n=!0){var l,h=s.value,u=h[t];"number"==typeof u&&(null==i||u>i)&&(e=h,i=u)}}catch(t){o=!0,r=t}finally{try{n||null==a.return||a.return()}finally{if(o)throw r}}return e||null}},{key:"min",value:function(t){var e=null,i=null,n=!0,o=!1,r=void 0;try{for(var s,a=Ii(Kr(l=this._data).call(l));!(n=(s=a.next()).done);n=!0){var l,h=s.value,u=h[t];"number"==typeof u&&(null==i||u<i)&&(e=h,i=u)}}catch(t){o=!0,r=t}finally{try{n||null==a.return||a.return()}finally{if(o)throw r}}return e||null}},{key:"distinct",value:function(t){for(var e=this._data,i=mo(ts(e).call(e)),n=[],o=this._options.type&&this._options.type[t]||null,r=0,s=0,a=i.length;s<a;s++){for(var l=i[s],h=e.get(l)[t],u=!1,d=0;d<r;d++)if(n[d]==h){u=!0;break}u||void 0===h||(n[r]=h,r++)}if(o)for(var c=0,p=n.length;c<p;c++)n[c]=La(n[c],o);return n}},{key:"_addItem",value:function(t){var e=t[this._idProp];if(null!=e){if(this._data.has(e))throw new Error("Cannot add item: item with id "+e+" already exists")}else e=Oa(),t[this._idProp]=e;for(var i={},n=zi(t),o=0,r=n.length;o<r;o++){var s=n[o],a=this._type[s];i[s]=La(t[s],a)}return this._data.set(e,i),++this.length,e}},{key:"_getItem",value:function(t,e){var i,n=this._data.get(t);if(!n)return null;var o=zi(n);if(e){Ra(),i={};for(var r=0,s=o.length;r<s;r++){var a=o[r],l=n[a];i[a]=La(l,e[a])}}else i=function(t){for(var e=1;e<arguments.length;e++){var i,n=null!=arguments[e]?arguments[e]:{};if(e%2)mn(i=wa(Object(n),!0)).call(i,(function(e){ji(t,e,n[e])}));else if(bt)dt(t,bt(n));else{var o;mn(o=wa(Object(n))).call(o,(function(e){q(t,e,xt(n,e))}))}}return t}({},n);return null==i[this._idProp]&&(i[this._idProp]=n.id),i}},{key:"_updateItem",value:function(t){var e=t[this._idProp];if(null==e)throw new Error("Cannot update item: item has no id (item: "+Ur(t)+")");var i=this._data.get(e);if(!i)throw new Error("Cannot update item: no item with id "+e+" found");for(var n=zi(t),o=0,r=n.length;o<r;o++){var s=n[o],a=this._type[s];i[s]=La(t[s],a)}return e}},{key:"stream",value:function(t){if(t){var e=this._data;return new Ya(ji({},zs,Hs.mark((function i(){var n,o,r,s,a,l,h;return Hs.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:n=!0,o=!1,r=void 0,i.prev=3,s=Ii(t);case 5:if(n=(a=s.next()).done){i.next=14;break}if(l=a.value,null==(h=e.get(l))){i.next=11;break}return i.next=11,[l,h];case 11:n=!0,i.next=5;break;case 14:i.next=20;break;case 16:i.prev=16,i.t0=i.catch(3),o=!0,r=i.t0;case 20:i.prev=20,i.prev=21,n||null==s.return||s.return();case 23:if(i.prev=23,!o){i.next=26;break}throw r;case 26:return i.finish(23);case 27:return i.finish(20);case 28:case"end":return i.stop()}}),i,null,[[3,16,20,28],[21,,23,27]])}))))}var i;return new Ya(ji({},zs,ga(i=Fr(this._data)).call(i,this._data)))}}]),e}(Na),Fa=function(t){function e(t,i){var n,o;return ya(this,e),(o=as(this,us(e).call(this))).length=0,o._ids=new js,o._options=i||{},o._listener=ga(n=o._onEvent).call(n,Nr(o)),o.setData(t),o}return ps(e,t),_a(e,[{key:"setData",value:function(t){if(this._data){this._data.off&&this._data.off("*",this._listener);var e=this._data.getIds({filter:Gn(this._options)}),i=this._data.get(e);this._ids.clear(),this.length=0,this._trigger("remove",{items:e,oldData:i})}if(null!=t){this._data=t;for(var n=this._data.getIds({filter:Gn(this._options)}),o=0,r=n.length;o<r;o++){var s=n[o];this._ids.add(s)}this.length=n.length,this._trigger("add",{items:n})}else this._data=new ja;this._data.on&&this._data.on("*",this._listener)}},{key:"refresh",value:function(){for(var t=this._data.getIds({filter:Gn(this._options)}),e=mo(this._ids),i={},n=[],o=[],r=[],s=0,a=t.length;s<a;s++){var l=t[s];i[l]=!0,this._ids.has(l)||(n.push(l),this._ids.add(l))}for(var h=0,u=e.length;h<u;h++){var d=e[h],c=this._data.get(d);null==c?console.error("If you see this, report it please."):i[d]||(o.push(d),r.push(c),this._ids.delete(d))}this.length+=n.length-o.length,n.length&&this._trigger("add",{items:n}),o.length&&this._trigger("remove",{items:o,oldData:r})}},{key:"get",value:function(t,e){if(null==this._data)return null;var i,n=null;Ia(t)||Ao(t)?(n=t,i=e):i=t;var o=jo({},this._options,i),r=Gn(this._options),s=i&&Gn(i);return r&&s&&(o.filter=function(t){return r(t)&&s(t)}),null==n?this._data.get(o):this._data.get(n,o)}},{key:"getIds",value:function(t){if(this._data.length){var e,i=Gn(this._options),n=null!=t?Gn(t):null;return e=n?i?function(t){return i(t)&&n(t)}:n:i,this._data.getIds({filter:e,order:t&&t.order})}return[]}},{key:"forEach",value:function(t,e){if(this._data){var i,n,o=Gn(this._options),r=e&&Gn(e);n=r?o?function(t){return o(t)&&r(t)}:r:o,mn(i=this._data).call(i,t,{filter:n,order:e&&e.order})}}},{key:"map",value:function(t,e){if(this._data){var i,n,o=Gn(this._options),r=e&&Gn(e);return n=r?o?function(t){return o(t)&&r(t)}:r:o,Tn(i=this._data).call(i,t,{filter:n,order:e&&e.order})}return[]}},{key:"getDataSet",value:function(){return this._data.getDataSet()}},{key:"stream",value:function(t){var e;return this._data.stream(t||ji({},zs,ga(e=ts(this._ids)).call(e,this._ids)))}},{key:"dispose",value:function(){var t;(null===(t=this._data)||void 0===t?void 0:t.off)&&this._data.off("*",this._listener);var e="This data view has already been disposed of.";q(this,"_data",{get:function(){throw new Error(e)},set:function(){throw new Error(e)},configurable:!1})}},{key:"_onEvent",value:function(t,e,i){if(e&&e.items&&this._data){var n=e.items,o=[],r=[],s=[],a=[],l=[],h=[];switch(t){case"add":for(var u=0,d=n.length;u<d;u++){var c=n[u];this.get(c)&&(this._ids.add(c),o.push(c))}break;case"update":for(var p=0,m=n.length;p<m;p++){var f=n[p];this.get(f)?this._ids.has(f)?(r.push(f),l.push(e.data[p]),a.push(e.oldData[p])):(this._ids.add(f),o.push(f)):this._ids.has(f)&&(this._ids.delete(f),s.push(f),h.push(e.oldData[p]))}break;case"remove":for(var v=0,g=n.length;v<g;v++){var y=n[v];this._ids.has(y)&&(this._ids.delete(y),s.push(y),h.push(e.oldData[v]))}}this.length+=o.length-s.length,o.length&&this._trigger("add",{items:o},i),r.length&&this._trigger("update",{items:r,oldData:a,data:l},i),s.length&&this._trigger("remove",{items:s,oldData:h},i)}}}]),e}(Na),Ha="undefined"!=typeof window&&window.moment||r;function za(t,e){var i=zi(t);if(ri){var n=ri(t);e&&(n=Gn(n).call(n,(function(e){return xt(t,e).enumerable}))),i.push.apply(i,n)}return i}var Ga=/^\/?Date\((-?\d+)/i;function Wa(t,e){var i;if(void 0!==t){if(null===t)return null;if(!e)return t;if("string"!=typeof e&&!(e instanceof String))throw new Error("Type must be a string");switch(e){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return sr(t)&&!isNaN(Date.parse(t))?r(t).valueOf():Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(rr(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(r.isMoment(t))return new Date(t.valueOf());if(sr(t))return(i=Ga.exec(t))?new Date(Number(i[1])):r(new Date(t)).toDate();throw new Error("Cannot convert object of type "+dr(t)+" to type Date");case"Moment":if(rr(t))return r(t);if(t instanceof Date)return r(t.valueOf());if(r.isMoment(t))return r(t);if(sr(t))return i=Ga.exec(t),r(i?Number(i[1]):t);throw new Error("Cannot convert object of type "+dr(t)+" to type Date");case"ISODate":if(rr(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(r.isMoment(t))return t.toDate().toISOString();if(sr(t))return(i=Ga.exec(t))?new Date(Number(i[1])).toISOString():r(t).format();throw new Error("Cannot convert object of type "+dr(t)+" to type ISODate");case"ASPDate":if(rr(t))return"/Date("+t+")/";if(t instanceof Date||r.isMoment(t))return"/Date("+t.valueOf()+")/";if(sr(t))return"/Date("+((i=Ga.exec(t))?new Date(Number(i[1])).valueOf():new Date(t).valueOf())+")/";throw new Error("Cannot convert object of type "+dr(t)+" to type ASPDate");default:throw new Error("Unknown type ".concat(e))}}}function Va(t){var e,i,n,o,r,s,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{start:"Date",end:"Date"},l=t._idProp,h=new ja({fieldId:l}),u=Tn(e=ka(t)).call(e,(function(t){var e;return ua(e=zi(t)).call(e,(function(e,i){return e[i]=Wa(t[i],a[i]),e}),{})})).to(h);return u.all().start(),{add:function(){var e;return(e=t.getDataSet()).add.apply(e,arguments)},remove:function(){var e;return(e=t.getDataSet()).remove.apply(e,arguments)},update:function(){var e;return(e=t.getDataSet()).update.apply(e,arguments)},updateOnly:function(){var e;return(e=t.getDataSet()).updateOnly.apply(e,arguments)},forEach:ga(i=mn(h)).call(i,h),get:ga(n=h.get).call(n,h),getIds:ga(o=h.getIds).call(o,h),off:ga(r=h.off).call(r,h),on:ga(s=h.on).call(s,h),get length(){return h.length},idProp:l,type:a,rawDS:t,coercedDS:h,dispose:function(){return u.stop()}}}var Ba=function(t){for(var e=1;e<arguments.length;e++){var i,n=null!=arguments[e]?arguments[e]:{};if(e%2)mn(i=za(Object(n),!0)).call(i,(function(e){ji(t,e,n[e])}));else if(bt)dt(t,bt(n));else{var o;mn(o=za(Object(n))).call(o,(function(e){q(t,e,xt(n,e))}))}}return t}({},Sr,{convert:Wa}),Ua=Xi.trim,Xa=a.parseFloat,qa=1/Xa(Gi+"-0")!=-1/0?function(t){var e=Ua(String(t)),i=Xa(e);return 0===i&&"-"==e.charAt(0)?-0:i}:Xa;U({global:!0,forced:parseFloat!=qa},{parseFloat:qa});var Za=R.parseFloat,Ka=function(){function t(e,i){ya(this,t),this.options=null,this.props=null}return _a(t,[{key:"setOptions",value:function(t){t&&Ba.extend(this.options,t)}},{key:"redraw",value:function(){return!1}},{key:"destroy",value:function(){}},{key:"_isResized",value:function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t}}]),t}();U({target:"String",proto:!0},{repeat:"".repeat||function(t){var e=String(y(this)),i="",n=$(t);if(n<0||n==1/0)throw RangeError("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(i+=e);return i}});var $a=Zi("String").repeat,Ja=String.prototype,Qa=function(t){var e=t.repeat;return"string"==typeof t||t===Ja||t instanceof String&&e===Ja.repeat?$a:e};function tl(t,e,i){if(i&&!Ao(i))return tl(t,e,[i]);if(e.hiddenDates=[],i&&1==Ao(i)){for(var n,o=0;o<i.length;o++)if(void 0===Qa(i[o])){var r={};r.start=t(i[o].start).toDate().valueOf(),r.end=t(i[o].end).toDate().valueOf(),e.hiddenDates.push(r)}ws(n=e.hiddenDates).call(n,(function(t,e){return t.start-e.start}))}}function el(t,e,i){if(i&&!Ao(i))return el(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){tl(t,e,i);for(var n=t(e.range.start),o=t(e.range.end),r=(e.range.end-e.range.start)/e.domProps.centerContainer.width,s=0;s<i.length;s++)if(void 0!==Qa(i[s])){var a=t(i[s].start),l=t(i[s].end);if("Invalid Date"==a._d)throw new Error("Supplied start date is not valid: ".concat(i[s].start));if("Invalid Date"==l._d)throw new Error("Supplied end date is not valid: ".concat(i[s].end));if(l-a>=4*r){var h=0,u=o.clone();switch(Qa(i[s])){case"daily":a.day()!=l.day()&&(h=1),a.dayOfYear(n.dayOfYear()),a.year(n.year()),a.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-h,"days"),u.add(1,"weeks");break;case"weekly":var d=l.diff(a,"days"),c=a.day();a.date(n.date()),a.month(n.month()),a.year(n.year()),l=a.clone(),a.day(c),l.day(c),l.add(d,"days"),a.subtract(1,"weeks"),l.subtract(1,"weeks"),u.add(1,"weeks");break;case"monthly":a.month()!=l.month()&&(h=1),a.month(n.month()),a.year(n.year()),a.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(h,"months"),u.add(1,"months");break;case"yearly":a.year()!=l.year()&&(h=1),a.year(n.year()),a.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(h,"years"),u.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",Qa(i[s]))}for(;a<u;)switch(e.hiddenDates.push({start:a.valueOf(),end:l.valueOf()}),Qa(i[s])){case"daily":a.add(1,"days"),l.add(1,"days");break;case"weekly":a.add(1,"weeks"),l.add(1,"weeks");break;case"monthly":a.add(1,"months"),l.add(1,"months");break;case"yearly":a.add(1,"y"),l.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",Qa(i[s]))}e.hiddenDates.push({start:a.valueOf(),end:l.valueOf()})}}il(e);var p=cl(e.range.start,e.hiddenDates),m=cl(e.range.end,e.hiddenDates),f=e.range.start,v=e.range.end;1==p.hidden&&(f=1==e.range.startToFront?p.startDate-1:p.endDate+1),1==m.hidden&&(v=1==e.range.endToFront?m.startDate-1:m.endDate+1),1!=p.hidden&&1!=m.hidden||e.range._applyRange(f,v)}}function il(t){for(var e,i=t.hiddenDates,n=[],o=0;o<i.length;o++)for(var r=0;r<i.length;r++)o!=r&&1!=i[r].remove&&1!=i[o].remove&&(i[r].start>=i[o].start&&i[r].end<=i[o].end?i[r].remove=!0:i[r].start>=i[o].start&&i[r].start<=i[o].end?(i[o].end=i[r].end,i[r].remove=!0):i[r].end>=i[o].start&&i[r].end<=i[o].end&&(i[o].start=i[r].start,i[r].remove=!0));for(o=0;o<i.length;o++)!0!==i[o].remove&&n.push(i[o]);t.hiddenDates=n,ws(e=t.hiddenDates).call(e,(function(t,e){return t.start-e.start}))}function nl(t,e,i){for(var n=!1,o=e.current.valueOf(),r=0;r<e.hiddenDates.length;r++){var s=e.hiddenDates[r].start,a=e.hiddenDates[r].end;if(o>=s&&o<a){n=!0;break}}if(1==n&&o<e._end.valueOf()&&o!=i){var l=t(i),h=t(a);l.year()!=h.year()?e.switchedYear=!0:l.month()!=h.month()?e.switchedMonth=!0:l.dayOfYear()!=h.dayOfYear()&&(e.switchedDay=!0),e.current=h}}function ol(t,e,i){var n;if(0==t.body.hiddenDates.length)return n=t.range.conversion(i),(e.valueOf()-n.offset)*n.scale;var o=cl(e,t.body.hiddenDates);1==o.hidden&&(e=o.startDate);var r=sl(t.body.hiddenDates,t.range.start,t.range.end);if(e<t.range.start){n=t.range.conversion(i,r);var s=al(t.body.hiddenDates,e,n.offset);return e=t.options.moment(e).toDate().valueOf(),e+=s,-(n.offset-e.valueOf())*n.scale}if(e>t.range.end){var a={start:t.range.start,end:e};return e=ll(t.options.moment,t.body.hiddenDates,a,e),n=t.range.conversion(i,r),(e.valueOf()-n.offset)*n.scale}return e=ll(t.options.moment,t.body.hiddenDates,t.range,e),n=t.range.conversion(i,r),(e.valueOf()-n.offset)*n.scale}function rl(t,e,i){if(0==t.body.hiddenDates.length){var n=t.range.conversion(i);return new Date(e/n.scale+n.offset)}var o=sl(t.body.hiddenDates,t.range.start,t.range.end),r=(t.range.end-t.range.start-o)*e/i,s=ul(t.body.hiddenDates,t.range,r);return new Date(s+r+t.range.start)}function sl(t,e,i){for(var n=0,o=0;o<t.length;o++){var r=t[o].start,s=t[o].end;r>=e&&s<i&&(n+=s-r)}return n}function al(t,e,i){for(var n=0,o=0;o<t.length;o++){var r=t[o].start,s=t[o].end;r>=e&&s<=i&&(n+=s-r)}return n}function ll(t,e,i,n){return n=t(n).toDate().valueOf(),n-=hl(t,e,i,n)}function hl(t,e,i,n){var o=0;n=t(n).toDate().valueOf();for(var r=0;r<e.length;r++){var s=e[r].start,a=e[r].end;s>=i.start&&a<i.end&&n>=a&&(o+=a-s)}return o}function ul(t,e,i){for(var n=0,o=0,r=e.start,s=0;s<t.length;s++){var a=t[s].start,l=t[s].end;if(a>=e.start&&l<e.end){if(o+=a-r,r=l,o>=i)break;n+=l-a}}return n}function dl(t,e,i,n){var o=cl(e,t);return 1==o.hidden?i<0?1==n?o.startDate-(o.endDate-e)-1:o.startDate-1:1==n?o.endDate+(e-o.startDate)+1:o.endDate+1:e}function cl(t,e){for(var i=0;i<e.length;i++){var n=e[i].start,o=e[i].end;if(t>=n&&t<o)return{hidden:!0,startDate:n,endDate:o}}return{hidden:!1,startDate:n,endDate:o}}var pl=Object.freeze({__proto__:null,convertHiddenOptions:tl,updateHiddenDates:el,removeDuplicates:il,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)},stepOverHiddenDates:nl,toScreen:ol,toTime:rl,getHiddenDurationBetween:sl,getHiddenDurationBeforeStart:al,correctTimeForHidden:ll,getHiddenDurationBefore:hl,getAccumulatedHiddenDuration:ul,snapAwayFromHidden:dl,getIsHidden:cl}),ml=function(t){function e(t,i){var n,o,r,s,a,l,h,u;ya(this,e),u=as(this,us(e).call(this));var d=Ha().hours(0).minutes(0).seconds(0).milliseconds(0),c=d.clone().add(-3,"days").valueOf(),p=d.clone().add(3,"days").valueOf();return u.millisecondsPerPixelCache=void 0,void 0===i?(u.start=c,u.end=p):(u.start=i.start||c,u.end=i.end||p),u.rolling=!1,u.body=t,u.deltaDifference=0,u.scaleOffset=0,u.startToFront=!1,u.endToFront=!0,u.defaultOptions={rtl:!1,start:null,end:null,moment:Ha,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},u.options=Ba.extend({},u.defaultOptions),u.props={touch:{}},u.animationTimer=null,u.body.emitter.on("panstart",ga(n=u._onDragStart).call(n,Nr(u))),u.body.emitter.on("panmove",ga(o=u._onDrag).call(o,Nr(u))),u.body.emitter.on("panend",ga(r=u._onDragEnd).call(r,Nr(u))),u.body.emitter.on("mousewheel",ga(s=u._onMouseWheel).call(s,Nr(u))),u.body.emitter.on("touch",ga(a=u._onTouch).call(a,Nr(u))),u.body.emitter.on("pinch",ga(l=u._onPinch).call(l,Nr(u))),u.body.dom.rollingModeBtn.addEventListener("click",ga(h=u.startRolling).call(h,Nr(u))),u.setOptions(i),u}return ps(e,t),_a(e,[{key:"setOptions",value:function(t){if(t){Ba.selectiveExtend(["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","zoomFriction","rtl","showCurrentTime","rollingMode","horizontalScroll"],this.options,t),t.rollingMode&&t.rollingMode.follow&&this.startRolling(),("start"in t||"end"in t)&&this.setRange(t.start,t.end)}}},{key:"startRolling",value:function(){var t=this;!function e(){t.stopRolling(),t.rolling=!0;var i=t.end-t.start,n=Ba.convert(new Date,"Date").valueOf(),o=t.options.rollingMode&&t.options.rollingMode.offset||.5,r=n-i*o,s=n+i*(1-o);t.setRange(r,s,{animation:!1}),(i=1/t.conversion(t.body.domProps.center.width).scale/10)<30&&(i=30),i>1e3&&(i=1e3),t.body.dom.rollingModeBtn.style.visibility="hidden",t.currentTimeTimer=Js(e,i)}()}},{key:"stopRolling",value:function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")}},{key:"setRange",value:function(t,e,i,n,o){i||(i={}),!0!==i.byUser&&(i.byUser=!1);var r=this,s=null!=t?Ba.convert(t,"Date").valueOf():null,a=null!=e?Ba.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,i.animation){var l,h=this.start,u=this.end,d="object"===Bo(i.animation)&&"duration"in i.animation?i.animation.duration:500,c="object"===Bo(i.animation)&&"easingFunction"in i.animation?i.animation.easingFunction:"easeInOutQuad",p=Ba.easingFunctions[c];if(!p)throw new Error(Zn(l="Unknown easing function ".concat(Ur(c),". Choose from: ")).call(l,zi(Ba.easingFunctions).join(", ")));var m=Ko(),f=!1;return function t(){if(!r.props.touch.dragging){var e=Ko()-m,l=p(e/d),c=e>d,g=c||null===s?s:h+(s-h)*l,y=c||null===a?a:u+(a-u)*l;v=r._applyRange(g,y),el(r.options.moment,r.body,r.options.hiddenDates),f=f||v;var b={start:new Date(r.start),end:new Date(r.end),byUser:i.byUser,event:i.event};if(o&&o(l,v,c),v&&r.body.emitter.emit("rangechange",b),c){if(f&&(r.body.emitter.emit("rangechanged",b),n))return n()}else r.animationTimer=Js(t,20)}}()}var v=this._applyRange(s,a);if(el(this.options.moment,this.body,this.options.hiddenDates),v){var g={start:new Date(this.start),end:new Date(this.end),byUser:i.byUser,event:i.event};if(this.body.emitter.emit("rangechange",g),clearTimeout(r.timeoutID),r.timeoutID=Js((function(){r.body.emitter.emit("rangechanged",g)}),200),n)return n()}}},{key:"getMillisecondsPerPixel",value:function(){return void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}},{key:"_cancelAnimation",value:function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)}},{key:"_applyRange",value:function(t,e){var i,n=null!=t?Ba.convert(t,"Date").valueOf():this.start,o=null!=e?Ba.convert(e,"Date").valueOf():this.end,r=null!=this.options.max?Ba.convert(this.options.max,"Date").valueOf():null,s=null!=this.options.min?Ba.convert(this.options.min,"Date").valueOf():null;if(isNaN(n)||null===n)throw new Error('Invalid start "'.concat(t,'"'));if(isNaN(o)||null===o)throw new Error('Invalid end "'.concat(e,'"'));if(o<n&&(o=n),null!==s&&n<s&&(n+=i=s-n,o+=i,null!=r&&o>r&&(o=r)),null!==r&&o>r&&(n-=i=o-r,o-=i,null!=s&&n<s&&(n=s)),null!==this.options.zoomMin){var a=Za(this.options.zoomMin);if(a<0&&(a=0),o-n<a){this.end-this.start===a&&n>=this.start-.5&&o<=this.end?(n=this.start,o=this.end):(n-=(i=a-(o-n))/2,o+=i/2)}}if(null!==this.options.zoomMax){var l=Za(this.options.zoomMax);l<0&&(l=0),o-n>l&&(this.end-this.start===l&&n<this.start&&o>this.end?(n=this.start,o=this.end):(n+=(i=o-n-l)/2,o-=i/2))}var h=this.start!=n||this.end!=o;return n>=this.start&&n<=this.end||o>=this.start&&o<=this.end||this.start>=n&&this.start<=o||this.end>=n&&this.end<=o||this.body.emitter.emit("checkRangedItems"),this.start=n,this.end=o,h}},{key:"getRange",value:function(){return{start:this.start,end:this.end}}},{key:"conversion",value:function(t,i){return e.conversion(this.start,this.end,t,i)}},{key:"_onDragStart",value:function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.stopRolling(),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"))}},{key:"_onDrag",value:function(t){if(t&&this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;fl(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var n=this.props.touch.end-this.props.touch.start;n-=sl(this.body.hiddenDates,this.start,this.end);var o,r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;o=this.options.rtl?i/r*n:-i/r*n;var s=this.props.touch.start+o,a=this.props.touch.end+o,l=dl(this.body.hiddenDates,s,this.previousDelta-i,!0),h=dl(this.body.hiddenDates,a,this.previousDelta-i,!0);if(l!=s||h!=a)return this.deltaDifference+=i,this.props.touch.start=l,this.props.touch.end=h,void this._onDrag(t);this.previousDelta=i,this._applyRange(s,a);var u=new Date(this.start),d=new Date(this.end);this.body.emitter.emit("rangechange",{start:u,end:d,byUser:!0,event:t}),this.body.emitter.emit("panmove")}}},{key:"_onDragEnd",value:function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:t}))}},{key:"_onMouseWheel",value:function(t){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail?e=-t.detail/3:t.deltaY&&(e=-t.deltaY/3),!(this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){var i,n,o=this.options.zoomFriction||5;if(i=e<0?1-e/o:1/(1+e/o),this.rolling){var r=this.options.rollingMode&&this.options.rollingMode.offset||.5;n=this.start+(this.end-this.start)*r}else{var s=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);n=this._pointerToDate(s)}this.zoom(i,n,e,t),t.preventDefault()}}},{key:"_onTouch",value:function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.props.touch.centerDate=null,this.scaleOffset=0,this.deltaDifference=0,Ba.preventDefault(t)}},{key:"_onPinch",value:function(t){if(this.options.zoomable&&this.options.moveable){Ba.preventDefault(t),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center),this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)),this.stopRolling();var e=1/(t.scale+this.scaleOffset),i=this.props.touch.centerDate,n=sl(this.body.hiddenDates,this.start,this.end),o=hl(this.options.moment,this.body.hiddenDates,this,i),r=n-o,s=i-o+(this.props.touch.start-(i-o))*e,a=i+r+(this.props.touch.end-(i+r))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;var l=dl(this.body.hiddenDates,s,1-e,!0),h=dl(this.body.hiddenDates,a,e-1,!0);l==s&&h==a||(this.props.touch.start=l,this.props.touch.end=h,this.scaleOffset=1-t.scale,s=l,a=h);var u={animation:!1,byUser:!0,event:t};this.setRange(s,a,u),this.startToFront=!1,this.endToFront=!0}}},{key:"_isInsideRange",value:function(t){var e=t.center?t.center.x:t.clientX,i=this.body.dom.centerContainer.getBoundingClientRect(),n=this.options.rtl?e-i.left:i.right-e,o=this.body.util.toTime(n);return o>=this.start&&o<=this.end}},{key:"_pointerToDate",value:function(t){var e,i=this.options.direction;if(fl(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var n=this.body.domProps.center.height;return e=this.conversion(n),t.y/e.scale+e.offset}},{key:"getPointer",value:function(t,e){var i=e.getBoundingClientRect();return this.options.rtl?{x:i.right-t.x,y:t.y-i.top}:{x:t.x-i.left,y:t.y-i.top}}},{key:"zoom",value:function(t,e,i,n){null==e&&(e=(this.start+this.end)/2);var o=sl(this.body.hiddenDates,this.start,this.end),r=hl(this.options.moment,this.body.hiddenDates,this,e),s=o-r,a=e-r+(this.start-(e-r))*t,l=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);var h=dl(this.body.hiddenDates,a,i,!0),u=dl(this.body.hiddenDates,l,-i,!0);h==a&&u==l||(a=h,l=u);var d={animation:!1,byUser:!0,event:n};this.setRange(a,l,d),this.startToFront=!1,this.endToFront=!0}},{key:"move",value:function(t){var e=this.end-this.start,i=this.start+e*t,n=this.end+e*t;this.start=i,this.end=n}},{key:"moveTo",value:function(t){var e=(this.start+this.end)/2-t,i=this.start-e,n=this.end-e;this.setRange(i,n,{animation:!1,byUser:!0,event:null})}}],[{key:"conversion",value:function(t,e,i,n){return void 0===n&&(n=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-n)}:{offset:0,scale:1}}}]),e}(Ka);function fl(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'.concat(t,'". Choose "horizontal" or "vertical".'))}var vl=R.setInterval,gl=n((function(t){function e(t){if(t)return function(t){for(var i in e.prototype)t[i]=e.prototype[i];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((i=n[o])===e||i.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),i=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(i){n=0;for(var o=(i=i.slice(0)).length;n<o;++n)i[n].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}})),yl=n((function(t,e){var i;t.exports=(i=null,function t(e,n){var o=n||{preventDefault:!1};if(e.Manager){var r=e,s=function(e,i){var n=Object.create(o);return i&&r.assign(n,i),t(new r(e,n),n)};return r.assign(s,r),s.Manager=function(e,i){var n=Object.create(o);return i&&r.assign(n,i),t(new r.Manager(e,n),n)},s}var a=Object.create(e),l=e.element;function h(t){return t.match(/[^ ]+/g)}function u(t){if("hammer.input"!==t.type){if(t.srcEvent._handled||(t.srcEvent._handled={}),t.srcEvent._handled[t.type])return;t.srcEvent._handled[t.type]=!0}var e=!1;t.stopPropagation=function(){e=!0};var n=t.srcEvent.stopPropagation.bind(t.srcEvent);"function"==typeof n&&(t.srcEvent.stopPropagation=function(){n(),t.stopPropagation()}),t.firstTarget=i;for(var o=i;o&&!e;){var r=o.hammer;if(r)for(var s,a=0;a<r.length;a++)if(s=r[a]._handlers[t.type])for(var l=0;l<s.length&&!e;l++)s[l](t);o=o.parentNode}}return l.hammer||(l.hammer=[]),l.hammer.push(a),e.on("hammer.input",(function(t){!0!==o.preventDefault&&o.preventDefault!==t.pointerType||t.preventDefault(),t.isFirst&&(i=t.target)})),a._handlers={},a.on=function(t,i){return h(t).forEach((function(t){var n=a._handlers[t];n||(a._handlers[t]=n=[],e.on(t,u)),n.push(i)})),a},a.off=function(t,i){return h(t).forEach((function(t){var n=a._handlers[t];n&&((n=i?n.filter((function(t){return t!==i})):[]).length>0?a._handlers[t]=n:(e.off(t,u),delete a._handlers[t]))})),a},a.emit=function(t,n){i=n.target,e.emit(t,n)},a.destroy=function(){var t=e.element.hammer,i=t.indexOf(a);-1!==i&&t.splice(i,1),t.length||delete e.element.hammer,a._handlers={},e.destroy()},a})}));
/*! Hammer.JS - v2.0.17-rc - 2019-12-16
* http://naver.github.io/egjs
*
* Forked By Naver egjs
* Copyright (c) hammerjs
* Licensed under the MIT license */
function bl(){return(bl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function _l(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function wl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var kl,xl="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}:Object.assign,Dl=["","webkit","Moz","MS","ms","o"],Sl="undefined"==typeof document?{style:{}}:document.createElement("div"),Ml=Math.round,Tl=Math.abs,Cl=Date.now;function Ol(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),r=0;r<Dl.length;){if((n=(i=Dl[r])?i+o:e)in t)return n;r++}}kl="undefined"==typeof window?{}:window;var El=Ol(Sl.style,"touchAction"),Pl=void 0!==El;var Ll=function(){if(!Pl)return!1;var t={},e=kl.CSS&&kl.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){return t[i]=!e||kl.CSS.supports("touch-action",i)})),t}(),Il="ontouchstart"in kl,Al=void 0!==Ol(kl,"PointerEvent"),Nl=Il&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Yl=["x","y"],Rl=["clientX","clientY"];function jl(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function Fl(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function Hl(t,e){return t.indexOf(e)>-1}var zl=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){"compute"===t&&(t=this.compute()),Pl&&this.manager.element.style&&Ll[t]&&(this.manager.element.style[El]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return jl(this.manager.recognizers,(function(e){Fl(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(Hl(t,"none"))return"none";var e=Hl(t,"pan-x"),i=Hl(t,"pan-y");return e&&i?"none":e||i?e?"pan-x":"pan-y":Hl(t,"manipulation")?"manipulation":"auto"}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var n=this.actions,o=Hl(n,"none")&&!Ll.none,r=Hl(n,"pan-y")&&!Ll["pan-y"],s=Hl(n,"pan-x")&&!Ll["pan-x"];if(o){var a=1===t.pointers.length,l=t.distance<2,h=t.deltaTime<250;if(a&&l&&h)return}if(!s||!r)return o||r&&6&i||s&&24&i?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Gl(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Wl(t){var e=t.length;if(1===e)return{x:Ml(t[0].clientX),y:Ml(t[0].clientY)};for(var i=0,n=0,o=0;o<e;)i+=t[o].clientX,n+=t[o].clientY,o++;return{x:Ml(i/e),y:Ml(n/e)}}function Vl(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:Ml(t.pointers[i].clientX),clientY:Ml(t.pointers[i].clientY)},i++;return{timeStamp:Cl(),pointers:e,center:Wl(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Bl(t,e,i){i||(i=Yl);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function Ul(t,e,i){i||(i=Yl);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function Xl(t,e){return t===e?1:Tl(t)>=Tl(e)?t<0?2:4:e<0?8:16}function ql(t,e,i){return{x:e/t||0,y:i/t||0}}function Zl(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=Vl(e)),o>1&&!i.firstMultiple?i.firstMultiple=Vl(e):1===o&&(i.firstMultiple=!1);var r=i.firstInput,s=i.firstMultiple,a=s?s.center:r.center,l=e.center=Wl(n);e.timeStamp=Cl(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=Ul(a,l),e.distance=Bl(a,l),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};1!==e.eventType&&4!==r.eventType||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}(i,e),e.offsetDirection=Xl(e.deltaX,e.deltaY);var h,u,d=ql(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=Tl(d.x)>Tl(d.y)?d.x:d.y,e.scale=s?(h=s.pointers,Bl((u=n)[0],u[1],Rl)/Bl(h[0],h[1],Rl)):1,e.rotation=s?function(t,e){return Ul(e[1],e[0],Rl)+Ul(t[1],t[0],Rl)}(s.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,o,r,s=t.lastInterval||e,a=e.timeStamp-s.timeStamp;if(8!==e.eventType&&(a>25||void 0===s.velocity)){var l=e.deltaX-s.deltaX,h=e.deltaY-s.deltaY,u=ql(a,l,h);n=u.x,o=u.y,i=Tl(u.x)>Tl(u.y)?u.x:u.y,r=Xl(l,h),t.lastInterval=e}else i=s.velocity,n=s.velocityX,o=s.velocityY,r=s.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=r}(i,e);var c,p=t.element,m=e.srcEvent;Gl(c=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=c),e.target=p}function Kl(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,r=1&e&&n-o==0,s=12&e&&n-o==0;i.isFirst=!!r,i.isFinal=!!s,r&&(t.session={}),i.eventType=e,Zl(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function $l(t){return t.trim().split(/\s+/g)}function Jl(t,e,i){jl($l(e),(function(e){t.addEventListener(e,i,!1)}))}function Ql(t,e,i){jl($l(e),(function(e){t.removeEventListener(e,i,!1)}))}function th(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var eh=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){Fl(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Jl(this.element,this.evEl,this.domHandler),this.evTarget&&Jl(this.target,this.evTarget,this.domHandler),this.evWin&&Jl(th(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Ql(this.element,this.evEl,this.domHandler),this.evTarget&&Ql(this.target,this.evTarget,this.domHandler),this.evWin&&Ql(th(this.element),this.evWin,this.domHandler)},t}();function ih(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}var nh={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},oh={2:"touch",3:"pen",4:"mouse",5:"kinect"},rh="pointerdown",sh="pointermove pointerup pointercancel";kl.MSPointerEvent&&!kl.PointerEvent&&(rh="MSPointerDown",sh="MSPointerMove MSPointerUp MSPointerCancel");var ah=function(t){function e(){var i,n=e.prototype;return n.evEl=rh,n.evWin=sh,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return _l(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=nh[n],r=oh[t.pointerType]||t.pointerType,s="touch"===r,a=ih(e,t.pointerId,"pointerId");1&o&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):12&o&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(a,1))},e}(eh);function lh(t){return Array.prototype.slice.call(t,0)}function hh(t,e,i){for(var n=[],o=[],r=0;r<t.length;){var s=e?t[r][e]:t[r];ih(o,s)<0&&n.push(t[r]),o[r]=s,r++}return i&&(n=e?n.sort((function(t,i){return t[e]>i[e]})):n.sort()),n}var uh={touchstart:1,touchmove:2,touchend:4,touchcancel:8},dh=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return _l(e,t),e.prototype.handler=function(t){var e=uh[t.type],i=ch.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:"touch",srcEvent:t})},e}(eh);function ch(t,e){var i,n,o=lh(t.touches),r=this.targetIds;if(3&e&&1===o.length)return r[o[0].identifier]=!0,[o,o];var s=lh(t.changedTouches),a=[],l=this.target;if(n=o.filter((function(t){return Gl(t.target,l)})),1===e)for(i=0;i<n.length;)r[n[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),12&e&&delete r[s[i].identifier],i++;return a.length?[hh(n.concat(a),"identifier",!0),a]:void 0}var ph={mousedown:1,mousemove:2,mouseup:4},mh=function(t){function e(){var i,n=e.prototype;return n.evEl="mousedown",n.evWin="mousemove mouseup",(i=t.apply(this,arguments)||this).pressed=!1,i}return _l(e,t),e.prototype.handler=function(t){var e=ph[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))},e}(eh);function fh(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(i);setTimeout((function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)}),2500)}}function vh(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,fh.call(this,e)):12&t&&fh.call(this,e)}function gh(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],r=Math.abs(e-o.x),s=Math.abs(i-o.y);if(r<=25&&s<=25)return!0}return!1}var yh=function(){return function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).handler=function(t,e,i){var o="touch"===i.pointerType,r="mouse"===i.pointerType;if(!(r&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(o)vh.call(wl(wl(n)),e,i);else if(r&&gh.call(wl(wl(n)),i))return;n.callback(t,e,i)}},n.touch=new dh(n.manager,n.handler),n.mouse=new mh(n.manager,n.handler),n.primaryTouch=null,n.lastTouches=[],n}return _l(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(eh)}();function bh(t,e,i){return!!Array.isArray(t)&&(jl(t,i[e],i),!0)}var _h=1;function wh(t,e){var i=e.manager;return i?i.get(t):t}function kh(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var xh=function(){function t(t){void 0===t&&(t={}),this.options=bl({enable:!0},t),this.id=_h++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return xl(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(bh(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=wh(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return bh(t,"dropRecognizeWith",this)||(t=wh(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(bh(t,"requireFailure",this))return this;var e=this.requireFail;return-1===ih(e,t=wh(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(bh(t,"dropRequireFailure",this))return this;t=wh(t,this);var e=ih(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+kh(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+kh(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=32},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=xl({},t);if(!Fl(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Dh=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,bl({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e))||this).pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}_l(e,t);var i=e.prototype;return i.getTouchAction=function(){return["manipulation"]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=t.deltaTime<i.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(o&&r&&n){if(4!==t.eventType)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||Bl(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&s?this.count+=1:this.count=1,this._input=t,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.interval),2):8}return 32},i.failTimeout=function(){var t=this;return this._timer=setTimeout((function(){t.state=32}),this.options.interval),32},i.reset=function(){clearTimeout(this._timer)},i.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(xh),Sh=function(t){function e(e){return void 0===e&&(e={}),t.call(this,bl({pointers:1},e))||this}_l(e,t);var i=e.prototype;return i.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},i.process=function(t){var e=this.state,i=t.eventType,n=6&e,o=this.attrTest(t);return n&&(8&i||!o)?16|e:n||o?4&i?8|e:2&e?4|e:2:32},e}(xh);function Mh(t){return 16===t?"down":8===t?"up":2===t?"left":4===t?"right":""}var Th=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,bl({event:"pan",threshold:10,pointers:1,direction:30},e))||this).pX=null,i.pY=null,i}_l(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push("pan-y"),24&t&&e.push("pan-x"),e},i.directionTest=function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,r=t.deltaX,s=t.deltaY;return o&e.direction||(6&e.direction?(o=0===r?1:r<0?2:4,i=r!==this.pX,n=Math.abs(t.deltaX)):(o=0===s?1:s<0?8:16,i=s!==this.pY,n=Math.abs(t.deltaY))),t.direction=o,i&&n>e.threshold&&o&e.direction},i.attrTest=function(t){return Sh.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=Mh(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(Sh),Ch=function(t){function e(e){return void 0===e&&(e={}),t.call(this,bl({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e))||this}_l(e,t);var i=e.prototype;return i.getTouchAction=function(){return Th.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,n=this.options.direction;return 30&n?i=e.overallVelocity:6&n?i=e.overallVelocityX:24&n&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&Tl(i)>this.options.velocity&&4&e.eventType},i.emit=function(t){var e=Mh(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(Sh),Oh=function(t){function e(e){return void 0===e&&(e={}),t.call(this,bl({event:"pinch",threshold:0,pointers:2},e))||this}_l(e,t);var i=e.prototype;return i.getTouchAction=function(){return["none"]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}(Sh),Eh=function(t){function e(e){return void 0===e&&(e={}),t.call(this,bl({event:"rotate",threshold:0,pointers:2},e))||this}_l(e,t);var i=e.prototype;return i.getTouchAction=function(){return["none"]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(Sh),Ph=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,bl({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}_l(e,t);var i=e.prototype;return i.getTouchAction=function(){return["auto"]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=t.deltaTime>i.time;if(this._input=t,!o||!n||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(4&t.eventType)return 8;return 32},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Cl(),this.manager.emit(this.options.event,this._input)))},e}(xh),Lh={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ih=[[Eh,{enable:!1}],[Oh,{enable:!1},["rotate"]],[Ch,{direction:6}],[Th,{direction:6},["swipe"]],[Dh],[Dh,{event:"doubletap",taps:2},["tap"]],[Ph]];function Ah(t,e){var i,n=t.element;n.style&&(jl(t.options.cssProps,(function(o,r){i=Ol(n.style,r),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var Nh=function(){function t(t,e){var i,n=this;this.options=xl({},Lh,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(Al?ah:Nl?dh:Il?yh:mh))(i,Kl),this.touchAction=new zl(this,this.options.touchAction),Ah(this,!0),jl(this.options.recognizers,(function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return xl(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var n=this.recognizers,o=e.curRecognizer;(!o||o&&8&o.state)&&(e.curRecognizer=null,o=null);for(var r=0;r<n.length;)i=n[r],2===e.stopped||o&&i!==o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t),!o&&14&i.state&&(e.curRecognizer=i,o=i),r++}},e.get=function(t){if(t instanceof xh)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event===t)return e[i];return null},e.add=function(t){if(bh(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},e.remove=function(t){if(bh(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,n=ih(i,e);-1!==n&&(i.splice(n,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var i=this.handlers;return jl($l(t),(function(t){i[t]=i[t]||[],i[t].push(e)})),this},e.off=function(t,e){if(void 0===t)return this;var i=this.handlers;return jl($l(t),(function(t){e?i[t]&&i[t].splice(ih(i[t],e),1):delete i[t]})),this},e.emit=function(t,e){this.options.domEvents&&function(t,e){var i=document.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e,e.target.dispatchEvent(i)}(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](e),n++}},e.destroy=function(){this.element&&Ah(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),Yh={touchstart:1,touchmove:2,touchend:4,touchcancel:8},Rh=function(t){function e(){var i,n=e.prototype;return n.evTarget="touchstart",n.evWin="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).started=!1,i}return _l(e,t),e.prototype.handler=function(t){var e=Yh[t.type];if(1===e&&(this.started=!0),this.started){var i=jh.call(this,t,e);12&e&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:"touch",srcEvent:t})}},e}(eh);function jh(t,e){var i=lh(t.touches),n=lh(t.changedTouches);return 12&e&&(i=hh(i.concat(n),"identifier",!0)),[i,n]}function Fh(t,e,i){var n="DEPRECATED METHOD: "+e+"\n"+i+" AT \n";return function(){var e=new Error("get-stack-trace"),i=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,n,i),t.apply(this,arguments)}}var Hh=Fh((function(t,e,i){for(var n=Object.keys(e),o=0;o<n.length;)(!i||i&&void 0===t[n[o]])&&(t[n[o]]=e[n[o]]),o++;return t}),"extend","Use `assign`."),zh=Fh((function(t,e){return Hh(t,e,!0)}),"merge","Use `assign`.");function Gh(t,e,i){var n,o=e.prototype;(n=t.prototype=Object.create(o)).constructor=t,n._super=o,i&&xl(n,i)}function Wh(t,e){return function(){return t.apply(e,arguments)}}var Vh,Bh=function(){var t=function(t,e){return void 0===e&&(e={}),new Nh(t,bl({recognizers:Ih.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=30,t.DIRECTION_DOWN=16,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=24,t.DIRECTION_NONE=1,t.DIRECTION_DOWN=16,t.INPUT_START=1,t.INPUT_MOVE=2,t.INPUT_END=4,t.INPUT_CANCEL=8,t.STATE_POSSIBLE=1,t.STATE_BEGAN=2,t.STATE_CHANGED=4,t.STATE_ENDED=8,t.STATE_RECOGNIZED=8,t.STATE_CANCELLED=16,t.STATE_FAILED=32,t.Manager=Nh,t.Input=eh,t.TouchAction=zl,t.TouchInput=dh,t.MouseInput=mh,t.PointerEventInput=ah,t.TouchMouseInput=yh,t.SingleTouchInput=Rh,t.Recognizer=xh,t.AttrRecognizer=Sh,t.Tap=Dh,t.Pan=Th,t.Swipe=Ch,t.Pinch=Oh,t.Rotate=Eh,t.Press=Ph,t.on=Jl,t.off=Ql,t.each=jl,t.merge=zh,t.extend=Hh,t.bindFn=Wh,t.assign=xl,t.inherit=Gh,t.bindFn=Wh,t.prefixed=Ol,t.toArray=lh,t.inArray=ih,t.uniqueArray=hh,t.splitStr=$l,t.boolOrFn=Fl,t.hasParent=Gl,t.addEventListeners=Jl,t.removeEventListeners=Ql,t.defaults=xl({},Lh,{preset:Ih}),t}();"undefined"!=typeof window?Vh=yl(window.Hammer||Bh,{preventDefault:"mouse"}):Vh=function(){return{on:t=function(){},off:t,destroy:t,emit:t,get:function(e){return{set:t}}};var t};var Uh=Vh;function Xh(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}var qh=function(){function t(e,i,n,o,r){ya(this,t),this.moment=r&&r.moment||Ha,this.options=r||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale="day",this.step=1,this.setRange(e,i,n),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,Ao(o)?this.hiddenDates=o:this.hiddenDates=null!=o?[o]:[],this.format=t.FORMAT}return _a(t,[{key:"setMoment",value:function(t){this.moment=t,this.current=this.moment(this.current.valueOf()),this._start=this.moment(this._start.valueOf()),this._end=this.moment(this._end.valueOf())}},{key:"setFormat",value:function(e){var i=Ba.deepExtend({},t.FORMAT);this.format=Ba.deepExtend(i,e)}},{key:"setRange",value:function(t,e,i){if(!(t instanceof Date&&e instanceof Date))throw"No legal start or end date in method setRange";this._start=null!=t?this.moment(t.valueOf()):Ko(),this._end=null!=e?this.moment(e.valueOf()):Ko(),this.autoScale&&this.setMinimumStep(i)}},{key:"start",value:function(){this.current=this._start.clone(),this.roundToMinor()}},{key:"roundToMinor",value:function(){switch("week"==this.scale&&this.current.weekday(0),this.scale){case"year":this.current.year(this.step*Math.floor(this.current.year()/this.step)),this.current.month(0);case"month":this.current.date(1);case"week":case"day":case"weekday":this.current.hours(0);case"hour":this.current.minutes(0);case"minute":this.current.seconds(0);case"second":this.current.milliseconds(0)}if(1!=this.step){var t=this.current.clone();switch(this.scale){case"millisecond":this.current.subtract(this.current.milliseconds()%this.step,"milliseconds");break;case"second":this.current.subtract(this.current.seconds()%this.step,"seconds");break;case"minute":this.current.subtract(this.current.minutes()%this.step,"minutes");break;case"hour":this.current.subtract(this.current.hours()%this.step,"hours");break;case"weekday":case"day":this.current.subtract((this.current.date()-1)%this.step,"day");break;case"week":this.current.subtract(this.current.week()%this.step,"week");break;case"month":this.current.subtract(this.current.month()%this.step,"month");break;case"year":this.current.subtract(this.current.year()%this.step,"year")}t.isSame(this.current)||(this.current=this.moment(dl(this.hiddenDates,this.current.valueOf(),-1,!0)))}}},{key:"hasNext",value:function(){return this.current.valueOf()<=this._end.valueOf()}},{key:"next",value:function(){var t=this.current.valueOf();switch(this.scale){case"millisecond":this.current.add(this.step,"millisecond");break;case"second":this.current.add(this.step,"second");break;case"minute":this.current.add(this.step,"minute");break;case"hour":this.current.add(this.step,"hour"),this.current.month()<6?this.current.subtract(this.current.hours()%this.step,"hour"):this.current.hours()%this.step!=0&&this.current.add(this.step-this.current.hours()%this.step,"hour");break;case"weekday":case"day":this.current.add(this.step,"day");break;case"week":if(0!==this.current.weekday())this.current.weekday(0),this.current.add(this.step,"week");else if(!1===this.options.showMajorLabels)this.current.add(this.step,"week");else{var e=this.current.clone();e.add(1,"week"),e.isSame(this.current,"month")?this.current.add(this.step,"week"):(this.current.add(this.step,"week"),this.current.date(1))}break;case"month":this.current.add(this.step,"month");break;case"year":this.current.add(this.step,"year")}if(1!=this.step)switch(this.scale){case"millisecond":this.current.milliseconds()>0&&this.current.milliseconds()<this.step&&this.current.milliseconds(0);break;case"second":this.current.seconds()>0&&this.current.seconds()<this.step&&this.current.seconds(0);break;case"minute":this.current.minutes()>0&&this.current.minutes()<this.step&&this.current.minutes(0);break;case"hour":this.current.hours()>0&&this.current.hours()<this.step&&this.current.hours(0);break;case"weekday":case"day":this.current.date()<this.step+1&&this.current.date(1);break;case"week":this.current.week()<this.step&&this.current.week(1);break;case"month":this.current.month()<this.step&&this.current.month(0)}this.current.valueOf()==t&&(this.current=this._end.clone()),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,nl(this.moment,this,t)}},{key:"getCurrent",value:function(){return this.current.clone()}},{key:"setScale",value:function(t){t&&"string"==typeof t.scale&&(this.scale=t.scale,this.step=t.step>0?t.step:1,this.autoScale=!1)}},{key:"setAutoScale",value:function(t){this.autoScale=t}},{key:"setMinimumStep",value:function(t){if(null!=t){31104e9>t&&(this.scale="year",this.step=1e3),15552e9>t&&(this.scale="year",this.step=500),31104e8>t&&(this.scale="year",this.step=100),15552e8>t&&(this.scale="year",this.step=50),31104e7>t&&(this.scale="year",this.step=10),15552e7>t&&(this.scale="year",this.step=5),31104e6>t&&(this.scale="year",this.step=1),7776e6>t&&(this.scale="month",this.step=3),2592e6>t&&(this.scale="month",this.step=1),6048e5>t&&this.options.showWeekScale&&(this.scale="week",this.step=1),1728e5>t&&(this.scale="day",this.step=2),864e5>t&&(this.scale="day",this.step=1),432e5>t&&(this.scale="weekday",this.step=1),144e5>t&&(this.scale="hour",this.step=4),36e5>t&&(this.scale="hour",this.step=1),9e5>t&&(this.scale="minute",this.step=15),6e5>t&&(this.scale="minute",this.step=10),3e5>t&&(this.scale="minute",this.step=5),6e4>t&&(this.scale="minute",this.step=1),15e3>t&&(this.scale="second",this.step=15),1e4>t&&(this.scale="second",this.step=10),5e3>t&&(this.scale="second",this.step=5),1e3>t&&(this.scale="second",this.step=1),200>t&&(this.scale="millisecond",this.step=200),100>t&&(this.scale="millisecond",this.step=100),50>t&&(this.scale="millisecond",this.step=50),10>t&&(this.scale="millisecond",this.step=10),5>t&&(this.scale="millisecond",this.step=5),1>t&&(this.scale="millisecond",this.step=1)}}},{key:"isMajor",value:function(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":case"week":return 1==t.date();case"month":return 0==t.month();case"year":default:return!1}}},{key:"getLabelMinor",value:function(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.minorLabels)return this.format.minorLabels(t,this.scale,this.step);var e=this.format.minorLabels[this.scale];switch(this.scale){case"week":if(1===t.date()&&0!==t.weekday())return"";default:return e&&e.length>0?this.moment(t).format(e):""}}},{key:"getLabelMajor",value:function(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.majorLabels)return this.format.majorLabels(t,this.scale,this.step);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""}},{key:"getClassName",value:function(){var t,e=this.moment,i=this.moment(this.current),n=i.locale?i.locale("en"):i.lang("en"),o=this.step,r=[];function s(t){return t/o%2==0?" vis-even":" vis-odd"}function a(t){return t.isSame(Ko(),"day")?" vis-today":t.isSame(e().add(1,"day"),"day")?" vis-tomorrow":t.isSame(e().add(-1,"day"),"day")?" vis-yesterday":""}function l(t){return t.isSame(Ko(),"week")?" vis-current-week":""}function h(t){return t.isSame(Ko(),"month")?" vis-current-month":""}switch(this.scale){case"millisecond":r.push(a(n)),r.push(s(n.milliseconds()));break;case"second":r.push(a(n)),r.push(s(n.seconds()));break;case"minute":r.push(a(n)),r.push(s(n.minutes()));break;case"hour":r.push(Zn(t="vis-h".concat(n.hours())).call(t,4==this.step?"-h"+(n.hours()+4):"")),r.push(a(n)),r.push(s(n.hours()));break;case"weekday":r.push("vis-".concat(n.format("dddd").toLowerCase())),r.push(a(n)),r.push(l(n)),r.push(s(n.date()));break;case"day":r.push("vis-day".concat(n.date())),r.push("vis-".concat(n.format("MMMM").toLowerCase())),r.push(a(n)),r.push(h(n)),r.push(this.step<=2?a(n):""),r.push(this.step<=2?"vis-".concat(n.format("dddd").toLowerCase()):""),r.push(s(n.date()-1));break;case"week":r.push("vis-week".concat(n.format("w"))),r.push(l(n)),r.push(s(n.week()));break;case"month":r.push("vis-".concat(n.format("MMMM").toLowerCase())),r.push(h(n)),r.push(s(n.month()));break;case"year":r.push("vis-year".concat(n.year())),r.push(function(t){return t.isSame(Ko(),"year")?" vis-current-year":""}(n)),r.push(s(n.year()))}return Gn(r).call(r,String).join(" ")}}],[{key:"snap",value:function(t,e,i){var n=Ha(t);if("year"==e){var o=n.year()+Math.round(n.month()/12);n.year(Math.round(o/i)*i),n.month(0),n.date(0),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("month"==e)n.date()>15?(n.date(1),n.add(1,"month")):n.date(1),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0);else if("week"==e)n.weekday()>2?(n.weekday(0),n.add(1,"week")):n.weekday(0),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:n.hours(24*Math.round(n.hours()/24));break;default:n.hours(12*Math.round(n.hours()/12))}n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:n.hours(12*Math.round(n.hours()/12));break;default:n.hours(6*Math.round(n.hours()/6))}n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("hour"==e){switch(i){case 4:n.minutes(60*Math.round(n.minutes()/60));break;default:n.minutes(30*Math.round(n.minutes()/30))}n.seconds(0),n.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:n.minutes(5*Math.round(n.minutes()/5)),n.seconds(0);break;case 5:n.seconds(60*Math.round(n.seconds()/60));break;default:n.seconds(30*Math.round(n.seconds()/30))}n.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:n.seconds(5*Math.round(n.seconds()/5)),n.milliseconds(0);break;case 5:n.milliseconds(1e3*Math.round(n.milliseconds()/1e3));break;default:n.milliseconds(500*Math.round(n.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;n.milliseconds(Math.round(n.milliseconds()/r)*r)}return n}}]),t}();qh.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}};var Zh=function(t){function e(t,i){var n;return ya(this,e),(n=as(this,us(e).call(this))).dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},n.props={range:{start:0,end:0,minimumStep:0},lineTop:0},n.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:qh.FORMAT,moment:Ha,timeAxis:null},n.options=Ba.extend({},n.defaultOptions),n.body=t,n._create(),n.setOptions(i),n}return ps(e,t),_a(e,[{key:"setOptions",value:function(t){t&&(Ba.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),Ba.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"===Bo(t.orientation)&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof Ha.locale?Ha.locale(t.locale):Ha.lang(t.locale)))}},{key:"_create",value:function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"}},{key:"destroy",value:function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null}},{key:"redraw",value:function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,n="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,o=e.parentNode!==n;this._calculateCharSize();var r=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,s=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=r?t.minorCharHeight:0,t.majorLabelHeight=s?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,l=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height="".concat(this.props.height,"px"),this._repaintLabels(),a?n.insertBefore(e,a):n.appendChild(e),l?this.body.dom.backgroundVertical.insertBefore(i,l):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||o}},{key:"_repaintLabels",value:function(){var t=this.options.orientation.axis,e=Ba.convert(this.body.range.start,"Number"),i=Ba.convert(this.body.range.end,"Number"),n=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),o=n-hl(this.options.moment,this.body.hiddenDates,this.body.range,n);o-=this.body.util.toTime(0).valueOf();var r=new qh(new Date(e),new Date(i),o,this.body.hiddenDates,this.options);r.setMoment(this.options.moment),this.options.format&&r.setFormat(this.options.format),this.options.timeAxis&&r.setScale(this.options.timeAxis),this.step=r;var s,a,l,h,u,d,c=this.dom;c.redundant.lines=c.lines,c.redundant.majorTexts=c.majorTexts,c.redundant.minorTexts=c.minorTexts,c.lines=[],c.majorTexts=[],c.minorTexts=[];var p,m,f,v=0,g=void 0,y=0;for(r.start(),a=r.getCurrent(),h=this.body.util.toScreen(a);r.hasNext()&&y<1e3;){switch(y++,u=r.isMajor(),f=r.getClassName(),s=a,l=h,r.next(),a=r.getCurrent(),p=v,v=(h=this.body.util.toScreen(a))-l,r.scale){case"week":d=!0;break;default:d=v>=.4*p}if(this.options.showMinorLabels&&d){var b=this._repaintMinorText(l,r.getLabelMinor(s),t,f);b.style.width="".concat(v,"px")}u&&this.options.showMajorLabels?(l>0&&(null==g&&(g=l),b=this._repaintMajorText(l,r.getLabelMajor(s),t,f)),m=this._repaintMajorLine(l,v,t,f)):d?m=this._repaintMinorLine(l,v,t,f):m&&(m.style.width="".concat(Ln(m.style.width)+v,"px"))}if(1e3!==y||Kh||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(1e3," lines.")),Kh=!0),this.options.showMajorLabels){var _=this.body.util.toTime(0),w=r.getLabelMajor(_),k=w.length*(this.props.majorCharWidth||10)+10;(null==g||k<g)&&this._repaintMajorText(0,w,t,f)}mn(Ba).call(Ba,this.dom.redundant,(function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}}))}},{key:"_repaintMinorText",value:function(t,e,i,n){var o=this.dom.redundant.minorTexts.shift();if(!o){var r=document.createTextNode("");(o=document.createElement("div")).appendChild(r),this.dom.foreground.appendChild(o)}this.dom.minorTexts.push(o),o.innerHTML=e;var s="top"==i?this.props.majorLabelHeight:0;return this._setXY(o,t,s),o.className="vis-text vis-minor ".concat(n),o}},{key:"_repaintMajorText",value:function(t,e,i,n){var o=this.dom.redundant.majorTexts.shift();if(!o){var r=document.createElement("div");(o=document.createElement("div")).appendChild(r),this.dom.foreground.appendChild(o)}o.childNodes[0].innerHTML=e,o.className="vis-text vis-major ".concat(n);var s="top"==i?0:this.props.minorLabelHeight;return this._setXY(o,t,s),this.dom.majorTexts.push(o),o}},{key:"_setXY",value:function(t,e,i){var n,o=this.options.rtl?-1*e:e;t.style.transform=Zn(n="translate(".concat(o,"px, ")).call(n,i,"px)")}},{key:"_repaintMinorLine",value:function(t,e,i,n){var o,r=this.dom.redundant.lines.shift();r||(r=document.createElement("div"),this.dom.background.appendChild(r)),this.dom.lines.push(r);var s=this.props;r.style.width="".concat(e,"px"),r.style.height="".concat(s.minorLineHeight,"px");var a="top"==i?s.majorLabelHeight:this.body.domProps.top.height,l=t-s.minorLineWidth/2;return this._setXY(r,l,a),r.className=Zn(o="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-minor ")).call(o,n),r}},{key:"_repaintMajorLine",value:function(t,e,i,n){var o,r=this.dom.redundant.lines.shift();r||(r=document.createElement("div"),this.dom.background.appendChild(r)),this.dom.lines.push(r);var s=this.props;r.style.width="".concat(e,"px"),r.style.height="".concat(s.majorLineHeight,"px");var a="top"==i?0:this.body.domProps.top.height,l=t-s.majorLineWidth/2;return this._setXY(r,l,a),r.className=Zn(o="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-major ")).call(o,n),r}},{key:"_calculateCharSize",value:function(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth}}]),e}(Ka),Kh=!1,$h=n((function(t,e){t.exports=function(t){var e,i=t&&t.preventDefault||!1,n=t&&t.container||window,o={},r={keydown:{},keyup:{}},s={};for(e=97;e<=122;e++)s[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)s[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)s[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)s["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)s["num"+e]={code:96+e,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(t){h(t,"keydown")},l=function(t){h(t,"keyup")},h=function(t,e){if(void 0!==r[e][t.keyCode]){for(var n=r[e][t.keyCode],o=0;o<n.length;o++)(void 0===n[o].shift||1==n[o].shift&&1==t.shiftKey||0==n[o].shift&&0==t.shiftKey)&&n[o].fn(t);1==i&&t.preventDefault()}};return o.bind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===s[t])throw new Error("unsupported key: "+t);void 0===r[i][s[t].code]&&(r[i][s[t].code]=[]),r[i][s[t].code].push({fn:e,shift:s[t].shift})},o.bindAll=function(t,e){for(var i in void 0===e&&(e="keydown"),s)s.hasOwnProperty(i)&&o.bind(i,t,e)},o.getKey=function(t){for(var e in s)if(s.hasOwnProperty(e)){if(1==t.shiftKey&&1==s[e].shift&&t.keyCode==s[e].code)return e;if(0==t.shiftKey&&0==s[e].shift&&t.keyCode==s[e].code)return e;if(t.keyCode==s[e].code&&"shift"==e)return e}return"unknown key, currently not supported"},o.unbind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===s[t])throw new Error("unsupported key: "+t);if(void 0!==e){var n=[],o=r[i][s[t].code];if(void 0!==o)for(var a=0;a<o.length;a++)o[a].fn==e&&o[a].shift==s[t].shift||n.push(r[i][s[t].code][a]);r[i][s[t].code]=n}else r[i][s[t].code]=[]},o.reset=function(){r={keydown:{},keyup:{}}},o.destroy=function(){r={keydown:{},keyup:{}},n.removeEventListener("keydown",a,!0),n.removeEventListener("keyup",l,!0)},n.addEventListener("keydown",a,!0),n.addEventListener("keyup",l,!0),o}}));function Jh(t){var e,i;this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=Uh(this.dom.overlay),this.hammer.on("tap",ga(e=this._onTapOverlay).call(e,this));var n=this,o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];mn(o).call(o,(function(t){n.hammer.on(t,(function(t){t.stopPropagation()}))})),document&&document.body&&(this.onClick=function(e){(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||n.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=$h(),this.escListener=ga(i=this.deactivate).call(i,this)}gl(Jh.prototype),Jh.current=null,Jh.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=null,this.hammer.destroy(),this.hammer=null},Jh.prototype.activate=function(){var t;Jh.current&&Jh.current.deactivate(),Jh.current=this,this.active=!0,this.dom.overlay.style.display="none",Ba.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),ga(t=this.keycharm).call(t,"esc",this.escListener)},Jh.prototype.deactivate=function(){Jh.current===this&&(Jh.current=null),this.active=!1,this.dom.overlay.style.display="",Ba.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},Jh.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()};var Qh={current:"current",time:"time",deleteSelected:"Delete selected"},tu={current:"attuale",time:"tempo",deleteSelected:"Cancella la selezione"},eu={current:"huidige",time:"tijd",deleteSelected:"Selectie verwijderen"},iu={current:"Aktuelle",time:"Zeit",deleteSelected:"Lösche Auswahl"},nu={current:"actuel",time:"heure",deleteSelected:"Effacer la selection"},ou={current:"corriente",time:"hora",deleteSelected:"Eliminar selección"},ru={current:"поточний",time:"час",deleteSelected:"Видалити обране"},su={current:"текущее",time:"время",deleteSelected:"Удалить выбранное"},au={current:"aktualny",time:"czas",deleteSelected:"Usuń wybrane"},lu={current:"現在",time:"時刻",deleteSelected:"選択されたものを削除"},hu={en:Qh,en_EN:Qh,en_US:Qh,it:tu,it_IT:tu,it_CH:tu,nl:eu,nl_NL:eu,nl_BE:eu,de:iu,de_DE:iu,fr:nu,fr_FR:nu,fr_CA:nu,fr_BE:nu,es:ou,es_ES:ou,uk:ru,uk_UA:ru,ru:su,ru_RU:su,pl:au,pl_PL:au,ja:lu,ja_JP:lu},uu=function(t){function e(t,i){var n,o;ya(this,e),(o=as(this,us(e).call(this))).body=t,o.defaultOptions={moment:Ha,locales:hu,locale:"en",id:void 0,title:void 0},o.options=Ba.extend({},o.defaultOptions),o.setOptions(i),o.options.locales=Ba.extend({},hu,o.options.locales);var r=o.defaultOptions.locales[o.defaultOptions.locale];return mn(n=zi(o.options.locales)).call(n,(function(t){o.options.locales[t]=Ba.extend({},r,o.options.locales[t])})),i&&null!=i.time?o.customTime=i.time:o.customTime=new Date,o.eventParams={},o._create(),o}return ps(e,t),_a(e,[{key:"setOptions",value:function(t){t&&Ba.selectiveExtend(["moment","locale","locales","id","title","rtl","snap"],this.options,t)}},{key:"_create",value:function(){var t,e,i,n=document.createElement("div");n["custom-time"]=this,n.className="vis-custom-time ".concat(this.options.id||""),n.style.position="absolute",n.style.top="0px",n.style.height="100%",this.bar=n;var o=document.createElement("div");function r(t){this.body.range._onMouseWheel(t)}o.style.position="relative",o.style.top="0px",this.options.rtl?o.style.right="-10px":o.style.left="-10px",o.style.height="100%",o.style.width="20px",o.addEventListener?(o.addEventListener("mousewheel",ga(r).call(r,this),!1),o.addEventListener("DOMMouseScroll",ga(r).call(r,this),!1)):o.attachEvent("onmousewheel",ga(r).call(r,this)),n.appendChild(o),this.hammer=new Uh(o),this.hammer.on("panstart",ga(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",ga(e=this._onDrag).call(e,this)),this.hammer.on("panend",ga(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:Uh.DIRECTION_ALL})}},{key:"destroy",value:function(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}},{key:"redraw",value:function(){var t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar));var e=this.body.util.toScreen(this.customTime),i=this.options.locales[this.options.locale];i||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),i=this.options.locales.en);var n,o=this.options.title;void 0===o?o=(o=Zn(n="".concat(i.time,": ")).call(n,this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss"))).charAt(0).toUpperCase()+o.substring(1):"function"==typeof o&&(o=o.call(this,this.customTime));return this.options.rtl?this.bar.style.right="".concat(e,"px"):this.bar.style.left="".concat(e,"px"),this.bar.title=o,!1}},{key:"hide",value:function(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}},{key:"setCustomTime",value:function(t){this.customTime=Ba.convert(t,"Date"),this.redraw()}},{key:"getCustomTime",value:function(){return new Date(this.customTime.valueOf())}},{key:"setCustomMarker",value:function(t,e){var i,n,o=document.createElement("div");(o.className="vis-custom-time-marker",o.innerHTML=t,o.style.position="absolute",e)&&(o.setAttribute("contenteditable","true"),o.addEventListener("pointerdown",(function(){o.focus()})),o.addEventListener("input",ga(i=this._onMarkerChange).call(i,this)),o.title=t,o.addEventListener("blur",ga(n=function(t){this.title!=t.target.innerHTML&&(this._onMarkerChanged(t),this.title=t.target.innerHTML)}).call(n,this)));this.bar.appendChild(o)}},{key:"setCustomTitle",value:function(t){this.options.title=t}},{key:"_onDragStart",value:function(t){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,t.stopPropagation()}},{key:"_onDrag",value:function(t){if(this.eventParams.dragging){var e=this.options.rtl?-1*t.deltaX:t.deltaX,i=this.body.util.toScreen(this.eventParams.customTime)+e,n=this.body.util.toTime(i),o=this.body.util.getScale(),r=this.body.util.getStep(),s=this.options.snap,a=s?s(n,o,r):n;this.setCustomTime(a),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation()}}},{key:"_onDragEnd",value:function(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation())}},{key:"_onMarkerChange",value:function(t){this.body.emitter.emit("markerchange",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}},{key:"_onMarkerChanged",value:function(t){this.body.emitter.emit("markerchanged",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}}],[{key:"customTimeFromTarget",value:function(t){for(var e=t.target;e;){if(e.hasOwnProperty("custom-time"))return e["custom-time"];e=e.parentNode}return null}}]),e}(Ka),du=function(){function t(){ya(this,t)}return _a(t,[{key:"_create",value:function(t){var e,i,n,o=this;this.dom={},this.dom.container=t,this.dom.container.style.position="relative",this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.rollingModeBtn=document.createElement("div"),this.dom.loadingScreen=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.rollingModeBtn.className="vis-rolling-mode-btn",this.dom.loadingScreen.className="vis-loading-screen",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on("rangechange",(function(){!0===o.initialDrawDone&&o._redraw()})),this.on("rangechanged",(function(){o.initialRangeChangeDone||(o.initialRangeChangeDone=!0)})),this.on("touch",ga(e=this._onTouch).call(e,this)),this.on("panmove",ga(i=this._onDrag).call(i,this));var r=this;this._origRedraw=ga(n=this._redraw).call(n,this),this._redraw=Ba.throttle(this._origRedraw),this.on("_change",(function(t){r.itemSet&&r.itemSet.initialItemSetDrawn&&t&&1==t.queue?r._redraw():r._origRedraw()})),this.hammer=new Uh(this.dom.root);var s=this.hammer.get("pinch").set({enable:!0});s&&function(t){t.getTouchAction=function(){return["pan-y"]}}(s),this.hammer.get("pan").set({threshold:5,direction:Uh.DIRECTION_ALL}),this.listeners={};var a,l,h=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];function u(t){this.isActive()&&this.emit("mousewheel",t);var e=0,i=0;if("detail"in t&&(i=-1*t.detail),"wheelDelta"in t&&(i=t.wheelDelta),"wheelDeltaY"in t&&(i=t.wheelDeltaY),"wheelDeltaX"in t&&(e=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=-1*i,i=0),"deltaY"in t&&(i=-1*t.deltaY),"deltaX"in t&&(e=t.deltaX),t.deltaMode&&(1===t.deltaMode?(e*=40,i*=40):(e*=40,i*=800)),this.options.preferZoom){if(!this.options.zoomKey||t[this.options.zoomKey])return}else if(this.options.zoomKey&&t[this.options.zoomKey])return;if(this.options.verticalScroll||this.options.horizontalScroll)if(this.options.verticalScroll&&Math.abs(i)>=Math.abs(e)){var n=this.props.scrollTop,o=n+i;if(this.isActive())this._setScrollTop(o)!==n&&(this._redraw(),this.emit("scroll",t),t.preventDefault())}else if(this.options.horizontalScroll){var r=(Math.abs(e)>=Math.abs(i)?e:i)/120*(this.range.end-this.range.start)/20,s=this.range.start+r,a=this.range.end+r,l={animation:!1,byUser:!0,event:t};this.range.setRange(s,a,l),t.preventDefault()}}mn(h).call(h,(function(t){var e=function(e){r.isActive()&&r.emit(t,e)};r.hammer.on(t,e),r.listeners[t]=e})),Xh(this.hammer,(function(t){r.emit("touch",t)})),a=this.hammer,(l=function(t){r.emit("release",t)}).inputHandler=function(t){t.isFinal&&l(t)},a.on("hammer.input",l.inputHandler);var d="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";function c(t){if(r.options.verticalScroll)if(r._isProgramaticallyScrolled)r._isProgramaticallyScrolled=!1;else if(t.preventDefault(),r.isActive()){var e=-t.target.scrollTop;r._setScrollTop(e),r._redraw(),r.emit("scrollSide",t)}}this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(d,ga(u).call(u,this),!1),this.dom.top.addEventListener(d,ga(u).call(u,this),!1),this.dom.bottom.addEventListener(d,ga(u).call(u,this),!1),this.dom.left.parentNode.addEventListener("scroll",ga(c).call(c,this)),this.dom.right.parentNode.addEventListener("scroll",ga(c).call(c,this));var p=!1;function m(t){var e;if(t.preventDefault&&(r.emit("dragover",r.getEventProperties(t)),t.preventDefault()),Io(e=t.target.className).call(e,"timeline")>-1&&!p)return t.dataTransfer.dropEffect="move",p=!0,!1}function f(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();try{var e=JSON.parse(t.dataTransfer.getData("text"));if(!e||!e.content)return}catch(t){return!1}return p=!1,t.center={x:t.clientX,y:t.clientY},"item"!==e.target?r.itemSet._onAddItem(t):r.itemSet._onDropObjectOnItem(t),r.emit("drop",r.getEventProperties(t)),!1}if(this.dom.center.addEventListener("dragover",ga(m).call(m,this),!1),this.dom.center.addEventListener("drop",ga(f).call(f,this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root),t.appendChild(this.dom.loadingScreen)}},{key:"setOptions",value:function(t){var e;if(t){if(Ba.selectiveExtend(["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","preferZoom","rtl","zoomKey","horizontalScroll","verticalScroll","longSelectPressTime"],this.options,t),this.dom.rollingModeBtn.style.visibility="hidden",this.options.rtl&&(this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className="vis-panel vis-right vis-vertical-scroll":this.dom.leftContainer.className="vis-panel vis-left vis-vertical-scroll"),"object"!==Bo(this.options.orientation)&&(this.options.orientation={item:void 0,axis:void 0}),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"===Bo(t.orientation)&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var i=this.timeAxis2=new Zh(this.body);i.setOptions=function(t){var e=t?Ba.extend({},t):{};e.orientation="top",Zh.prototype.setOptions.call(i,e)},this.components.push(i)}}else if(this.timeAxis2){var n,o,r=Io(n=this.components).call(n,this.timeAxis2);if(-1!==r)qs(o=this.components).call(o,r,1);this.timeAxis2.destroy(),this.timeAxis2=null}"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&tl(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new Jh(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(mn(e=this.components).call(e,(function(e){return e.setOptions(t)})),"configure"in t){var s;this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var a=Ba.deepExtend({},this.options);mn(s=this.components).call(s,(function(t){Ba.deepExtend(a,t.options)})),this.configurator.setModuleOptions({global:a})}this._redraw()}},{key:"isActive",value:function(){return!this.activator||this.activator.active}},{key:"destroy",value:function(){var t;for(var e in this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator),this.listeners)this.listeners.hasOwnProperty(e)&&delete this.listeners[e];this.listeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,mn(t=this.components).call(t,(function(t){return t.destroy()})),this.body=null}},{key:"setCustomTime",value:function(t,e){var i,n=Gn(i=this.customTimes).call(i,(function(t){return e===t.options.id}));if(0===n.length)throw new Error("No custom time bar found with id ".concat(Ur(e)));n.length>0&&n[0].setCustomTime(t)}},{key:"getCustomTime",value:function(t){var e,i=Gn(e=this.customTimes).call(e,(function(e){return e.options.id===t}));if(0===i.length)throw new Error("No custom time bar found with id ".concat(Ur(t)));return i[0].getCustomTime()}},{key:"setCustomTimeMarker",value:function(t,e,i){var n,o=Gn(n=this.customTimes).call(n,(function(t){return t.options.id===e}));if(0===o.length)throw new Error("No custom time bar found with id ".concat(Ur(e)));o.length>0&&o[0].setCustomMarker(t,i)}},{key:"setCustomTimeTitle",value:function(t,e){var i,n=Gn(i=this.customTimes).call(i,(function(t){return t.options.id===e}));if(0===n.length)throw new Error("No custom time bar found with id ".concat(Ur(e)));if(n.length>0)return n[0].setCustomTitle(t)}},{key:"getEventProperties",value:function(t){return{event:t}}},{key:"addCustomTime",value:function(t,e){var i,n=void 0!==t?Ba.convert(t,"Date"):new Date;if(ss(i=this.customTimes).call(i,(function(t){return t.options.id===e})))throw new Error("A custom time with id ".concat(Ur(e)," already exists"));var o=new uu(this.body,Ba.extend({},this.options,{time:n,id:e,snap:this.itemSet.options.snap}));return this.customTimes.push(o),this.components.push(o),this._redraw(),e}},{key:"removeCustomTime",value:function(t){var e,i=this,n=Gn(e=this.customTimes).call(e,(function(e){return e.options.id===t}));if(0===n.length)throw new Error("No custom time bar found with id ".concat(Ur(t)));mn(n).call(n,(function(t){var e,n,o,r;qs(e=i.customTimes).call(e,Io(n=i.customTimes).call(n,t),1),qs(o=i.components).call(o,Io(r=i.components).call(r,t),1),t.destroy()}))}},{key:"getVisibleItems",value:function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}},{key:"getVisibleGroups",value:function(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}},{key:"fit",value:function(t,e){var i=this.getDataRange();if(null!==i.min||null!==i.max){var n=i.max-i.min,o=new Date(i.min.valueOf()-.01*n),r=new Date(i.max.valueOf()+.01*n),s=!t||void 0===t.animation||t.animation;this.range.setRange(o,r,{animation:s},e)}}},{key:"getDataRange",value:function(){throw new Error("Cannot invoke abstract method getDataRange")}},{key:"setWindow",value:function(t,e,i,n){var o,r;"function"==typeof arguments[2]&&(n=arguments[2],i={}),1==arguments.length?(o=void 0===(r=arguments[0]).animation||r.animation,this.range.setRange(r.start,r.end,{animation:o})):2==arguments.length&&"function"==typeof arguments[1]?(r=arguments[0],n=arguments[1],o=void 0===r.animation||r.animation,this.range.setRange(r.start,r.end,{animation:o},n)):(o=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:o},n))}},{key:"moveTo",value:function(t,e,i){"function"==typeof arguments[1]&&(i=arguments[1],e={});var n=this.range.end-this.range.start,o=Ba.convert(t,"Date").valueOf(),r=o-n/2,s=o+n/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(r,s,{animation:a},i)}},{key:"getWindow",value:function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}}},{key:"zoomIn",value:function(t,e,i){if(!(!t||t<0||t>1)){"function"==typeof arguments[1]&&(i=arguments[1],e={});var n=this.getWindow(),o=n.start.valueOf(),r=n.end.valueOf(),s=r-o,a=s/(1+t),l=(s-a)/2,h=o+l,u=r-l;this.setWindow(h,u,e,i)}}},{key:"zoomOut",value:function(t,e,i){if(!(!t||t<0||t>1)){"function"==typeof arguments[1]&&(i=arguments[1],e={});var n=this.getWindow(),o=n.start.valueOf(),r=n.end.valueOf(),s=r-o,a=o-s*t/2,l=r+s*t/2;this.setWindow(a,l,e,i)}}},{key:"redraw",value:function(){this._redraw()}},{key:"_redraw",value:function(){var t;this.redrawCount++;var e=this.dom;if(e&&e.container&&0!=e.root.offsetWidth){var i=!1,n=this.options,o=this.props;el(this.options.moment,this.body,this.options.hiddenDates),"top"==n.orientation?(Ba.addClassName(e.root,"vis-top"),Ba.removeClassName(e.root,"vis-bottom")):(Ba.removeClassName(e.root,"vis-top"),Ba.addClassName(e.root,"vis-bottom")),n.rtl?(Ba.addClassName(e.root,"vis-rtl"),Ba.removeClassName(e.root,"vis-ltr")):(Ba.addClassName(e.root,"vis-ltr"),Ba.removeClassName(e.root,"vis-rtl")),e.root.style.maxHeight=Ba.option.asSize(n.maxHeight,""),e.root.style.minHeight=Ba.option.asSize(n.minHeight,""),e.root.style.width=Ba.option.asSize(n.width,"");var r=e.root.offsetWidth;o.border.left=1,o.border.right=1,o.border.top=1,o.border.bottom=1,o.center.height=e.center.offsetHeight,o.left.height=e.left.offsetHeight,o.right.height=e.right.offsetHeight,o.top.height=e.top.clientHeight||-o.border.top,o.bottom.height=e.bottom.clientHeight||-o.border.bottom;var s=Math.max(o.left.height,o.center.height,o.right.height),a=o.top.height+s+o.bottom.height+o.border.top+o.border.bottom;e.root.style.height=Ba.option.asSize(n.height,"".concat(a,"px")),o.root.height=e.root.offsetHeight,o.background.height=o.root.height;var l=o.root.height-o.top.height-o.bottom.height;o.centerContainer.height=l,o.leftContainer.height=l,o.rightContainer.height=o.leftContainer.height,o.root.width=r,o.background.width=o.root.width,this.initialDrawDone||(o.scrollbarWidth=Ba.getScrollBarWidth());var h=e.leftContainer.clientWidth,u=e.rightContainer.clientWidth;n.verticalScroll?n.rtl?(o.left.width=h||-o.border.left,o.right.width=u+o.scrollbarWidth||-o.border.right):(o.left.width=h+o.scrollbarWidth||-o.border.left,o.right.width=u||-o.border.right):(o.left.width=h||-o.border.left,o.right.width=u||-o.border.right),this._setDOM();var d=this._updateScrollTop();"top"!=n.orientation.item&&(d+=Math.max(o.centerContainer.height-o.center.height-o.border.top-o.border.bottom,0)),e.center.style.transform="translateY(".concat(d,"px)");var c=0==o.scrollTop?"hidden":"",p=o.scrollTop==o.scrollTopMin?"hidden":"";e.shadowTop.style.visibility=c,e.shadowBottom.style.visibility=p,e.shadowTopLeft.style.visibility=c,e.shadowBottomLeft.style.visibility=p,e.shadowTopRight.style.visibility=c,e.shadowBottomRight.style.visibility=p,n.verticalScroll&&(e.rightContainer.className="vis-panel vis-right vis-vertical-scroll",e.leftContainer.className="vis-panel vis-left vis-vertical-scroll",e.shadowTopRight.style.visibility="hidden",e.shadowBottomRight.style.visibility="hidden",e.shadowTopLeft.style.visibility="hidden",e.shadowBottomLeft.style.visibility="hidden",e.left.style.top="0px",e.right.style.top="0px"),(!n.verticalScroll||o.center.height<o.centerContainer.height)&&(e.left.style.top="".concat(d,"px"),e.right.style.top="".concat(d,"px"),e.rightContainer.className=e.rightContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),e.leftContainer.className=e.leftContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),o.left.width=h||-o.border.left,o.right.width=u||-o.border.right,this._setDOM());var m=o.center.height>o.centerContainer.height;this.hammer.get("pan").set({direction:m?Uh.DIRECTION_ALL:Uh.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),mn(t=this.components).call(t,(function(t){i=t.redraw()||i}));if(i){if(this.redrawCount<5)return void this.body.emitter.emit("_change");console.log("WARNING: infinite loop in redraw?")}else this.redrawCount=0;this.body.emitter.emit("changed")}}},{key:"_setDOM",value:function(){var t=this.props,e=this.dom;t.leftContainer.width=t.left.width,t.rightContainer.width=t.right.width;var i=t.root.width-t.left.width-t.right.width;t.center.width=i,t.centerContainer.width=i,t.top.width=i,t.bottom.width=i,e.background.style.height="".concat(t.background.height,"px"),e.backgroundVertical.style.height="".concat(t.background.height,"px"),e.backgroundHorizontal.style.height="".concat(t.centerContainer.height,"px"),e.centerContainer.style.height="".concat(t.centerContainer.height,"px"),e.leftContainer.style.height="".concat(t.leftContainer.height,"px"),e.rightContainer.style.height="".concat(t.rightContainer.height,"px"),e.background.style.width="".concat(t.background.width,"px"),e.backgroundVertical.style.width="".concat(t.centerContainer.width,"px"),e.backgroundHorizontal.style.width="".concat(t.background.width,"px"),e.centerContainer.style.width="".concat(t.center.width,"px"),e.top.style.width="".concat(t.top.width,"px"),e.bottom.style.width="".concat(t.bottom.width,"px"),e.background.style.left="0",e.background.style.top="0",e.backgroundVertical.style.left="".concat(t.left.width+t.border.left,"px"),e.backgroundVertical.style.top="0",e.backgroundHorizontal.style.left="0",e.backgroundHorizontal.style.top="".concat(t.top.height,"px"),e.centerContainer.style.left="".concat(t.left.width,"px"),e.centerContainer.style.top="".concat(t.top.height,"px"),e.leftContainer.style.left="0",e.leftContainer.style.top="".concat(t.top.height,"px"),e.rightContainer.style.left="".concat(t.left.width+t.center.width,"px"),e.rightContainer.style.top="".concat(t.top.height,"px"),e.top.style.left="".concat(t.left.width,"px"),e.top.style.top="0",e.bottom.style.left="".concat(t.left.width,"px"),e.bottom.style.top="".concat(t.top.height+t.centerContainer.height,"px"),e.center.style.left="0",e.left.style.left="0",e.right.style.left="0"}},{key:"setCurrentTime",value:function(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)}},{key:"getCurrentTime",value:function(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()}},{key:"_toTime",value:function(t){return rl(this,t,this.props.center.width)}},{key:"_toGlobalTime",value:function(t){return rl(this,t,this.props.root.width)}},{key:"_toScreen",value:function(t){return ol(this,t,this.props.center.width)}},{key:"_toGlobalScreen",value:function(t){return ol(this,t,this.props.root.width)}},{key:"_initAutoResize",value:function(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()}},{key:"_startAutoResize",value:function(){var t=this;this._stopAutoResize(),this._onResize=function(){if(1==t.options.autoResize){if(t.dom.root){var e=t.dom.root.offsetHeight,i=t.dom.root.offsetWidth;i==t.props.lastWidth&&e==t.props.lastHeight||(t.props.lastWidth=i,t.props.lastHeight=e,t.props.scrollbarWidth=Ba.getScrollBarWidth(),t.body.emitter.emit("_change"))}}else t._stopAutoResize()},Ba.addEventListener(window,"resize",this._onResize),t.dom.root&&(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight),this.watchTimer=vl(this._onResize,1e3)}},{key:"_stopAutoResize",value:function(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(Ba.removeEventListener(window,"resize",this._onResize),this._onResize=null)}},{key:"_onTouch",value:function(t){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}},{key:"_onPinch",value:function(t){this.touch.allowDragging=!1}},{key:"_onDrag",value:function(t){if(t&&this.touch.allowDragging){var e=t.deltaY,i=this._getScrollTop(),n=this._setScrollTop(this.touch.initialScrollTop+e);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),n!=i&&this.emit("verticalDrag")}}},{key:"_setScrollTop",value:function(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop}},{key:"_updateScrollTop",value:function(){var t=Math.min(this.props.centerContainer.height-this.props.center.height,0);return t!=this.props.scrollTopMin&&("top"!=this.options.orientation.item&&(this.props.scrollTop+=t-this.props.scrollTopMin),this.props.scrollTopMin=t),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop<t&&(this.props.scrollTop=t),this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),this._isProgramaticallyScrolled=!0,this.props.scrollTop}},{key:"_getScrollTop",value:function(){return this.props.scrollTop}},{key:"_createConfigurator",value:function(){throw new Error("Cannot invoke abstract method _createConfigurator")}}]),t}();gl(du.prototype);var cu=function(t){function e(t,i){var n,o;ya(this,e),(o=as(this,us(e).call(this))).body=t,o.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:Ha,locales:hu,locale:"en"},o.options=Ba.extend({},o.defaultOptions),o.setOptions(i),o.options.locales=Ba.extend({},hu,o.options.locales);var r=o.defaultOptions.locales[o.defaultOptions.locale];return mn(n=zi(o.options.locales)).call(n,(function(t){o.options.locales[t]=Ba.extend({},r,o.options.locales[t])})),o.offset=0,o._create(),o}return ps(e,t),_a(e,[{key:"_create",value:function(){var t=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t}},{key:"destroy",value:function(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}},{key:"setOptions",value:function(t){t&&Ba.selectiveExtend(["rtl","showCurrentTime","alignCurrentTime","moment","locale","locales"],this.options,t)}},{key:"redraw",value:function(){if(this.options.showCurrentTime){var t,e,i=this.body.dom.backgroundVertical;this.bar.parentNode!=i&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),i.appendChild(this.bar),this.start());var n=this.options.moment(Ko()+this.offset);this.options.alignCurrentTime&&(n=n.startOf(this.options.alignCurrentTime));var o=this.body.util.toScreen(n),r=this.options.locales[this.options.locale];r||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),r=this.options.locales.en);var s=Zn(t=Zn(e="".concat(r.current," ")).call(e,r.time,": ")).call(t,n.format("dddd, MMMM Do YYYY, H:mm:ss"));s=s.charAt(0).toUpperCase()+s.substring(1),this.options.rtl?this.bar.style.transform="translateX(".concat(-1*o,"px)"):this.bar.style.transform="translateX(".concat(o,"px)"),this.bar.title=s}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}},{key:"start",value:function(){var t=this;!function e(){t.stop();var i=1/t.body.range.conversion(t.body.domProps.center.width).scale/10;i<30&&(i=30),i>1e3&&(i=1e3),t.redraw(),t.body.emitter.emit("currentTimeTick"),t.currentTimeTimer=Js(e,i)}()}},{key:"stop",value:function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}},{key:"setCurrentTime",value:function(t){var e=Ba.convert(t,"Date").valueOf(),i=Ko();this.offset=e-i,this.redraw()}},{key:"getCurrentTime",value:function(){return new Date(Ko()+this.offset)}}]),e}(Ka),pu=Me.find,mu=!0,fu=on("find");"find"in[]&&Array(1).find((function(){mu=!1})),U({target:"Array",proto:!0,forced:mu||!fu},{find:function(t){return pu(this,t,arguments.length>1?arguments[1]:void 0)}});var vu=Zi("Array").find,gu=Array.prototype,yu=function(t){var e=t.find;return t===gu||t instanceof Array&&e===gu.find?vu:e},bu="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),_u=new Uint8Array(16);function wu(){if(!bu)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bu(_u)}for(var ku=[],xu=0;xu<256;++xu)ku[xu]=(xu+256).toString(16).substr(1);function Du(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||wu)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var r=0;r<16;++r)e[n+r]=o[r];return e||function(t,e){var i=e||0,n=ku;return[n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]]].join("")}(o)}var Su=ot.includes,Mu=on("indexOf",{ACCESSORS:!0,1:0});U({target:"Array",proto:!0,forced:!Mu},{includes:function(t){return Su(this,t,arguments.length>1?arguments[1]:void 0)}});var Tu=Zi("Array").includes,Cu=Zt("match"),Ou=function(t){if(function(t){var e;return _(t)&&(void 0!==(e=t[Cu])?!!e:"RegExp"==f(t))}(t))throw TypeError("The method doesn't accept regular expressions");return t},Eu=Zt("match");U({target:"String",proto:!0,forced:!function(t){var e=/./;try{"/./"[t](e)}catch(i){try{return e[Eu]=!1,"/./"[t](e)}catch(t){}}return!1}("includes")},{includes:function(t){return!!~String(y(this)).indexOf(Ou(t),arguments.length>1?arguments[1]:void 0)}});var Pu=Zi("String").includes,Lu=Array.prototype,Iu=String.prototype,Au=function(t){var e=t.includes;return t===Lu||t instanceof Array&&e===Lu.includes?Tu:"string"==typeof t||t===Iu||t instanceof String&&e===Iu.includes?Pu:e};function Nu(t){ws(t).call(t,(function(t,e){return t.data.start-e.data.start}))}function Yu(t){ws(t).call(t,(function(t,e){return("end"in t.data?t.data.end:t.data.start)-("end"in e.data?e.data.end:e.data.start)}))}function Ru(t,e,i,n){if(i)for(var o=0;o<t.length;o++)t[o].top=null;for(o=0;o<t.length;o++){var r=t[o];if(r.stack&&null===r.top){r.top=e.axis;var s=!1;do{for(var a=null,l=0,h=t.length;l<h;l++){var u=t[l];if(s=n()||!1)return!0;if(null!==u.top&&u!==r&&u.stack&&Gu(r,u,e.item,u.options.rtl)){a=u;break}}null!=a&&(r.top=a.top+a.height+e.item.vertical)}while(a)}}return s}function ju(t,e,i){for(var n=0;n<t.length;n++)t[n].top=null;var o=i.height;for(n=0;n<t.length;n++){var r=t[n];if(r.stack&&null===r.top){r.top=r.baseTop;do{for(var s=null,a=0,l=t.length;a<l;a++){var h=t[a];if(null!==h.top&&h!==r&&Gu(r,h,e.item,h.options.rtl)){s=h;break}}null!=s&&(r.top=s.top+s.height+e.item.vertical),r.top+r.height>o&&(o=r.top+r.height)}while(s)}}i.height=o-i.top+.5*e.item.vertical}function Fu(t,e,i,n){for(var o=0;o<t.length;o++)if(null==t[o].data.subgroup)t[o].top=e.item.vertical;else if(void 0!==t[o].data.subgroup&&n){var r=0;for(var s in i)i.hasOwnProperty(s)&&1==i[s].visible&&i[s].index<i[t[o].data.subgroup].index&&(r+=i[s].height,i[t[o].data.subgroup].top=r);t[o].top=r+.5*e.item.vertical}n||Hu(t,e,i)}function Hu(t,e,i){for(var n in i)if(i.hasOwnProperty(n)){i[n].top=0;do{var o=null;for(var r in i)if(null!==i[r].top&&r!==n&&i[n].index>i[r].index&&Wu(i[n],i[r])){o=i[r];break}null!=o&&(i[n].top=o.top+o.height)}while(o)}for(var s=0;s<t.length;s++)void 0!==t[s].data.subgroup&&(t[s].top=i[t[s].data.subgroup].top+.5*e.item.vertical)}function zu(t,e,i){var n=!1,o=[];for(var r in i)i[r].hasOwnProperty("index")?o[i[r].index]=r:o.push(r);for(var s=0;s<o.length;s++)if(r=o[s],i.hasOwnProperty(r)){for(var a in n=n||i[r].stack,i[r].top=0,i)i[a].visible&&i[r].index>i[a].index&&(i[r].top+=i[a].height);for(var l=t[r],h=0;h<l.length;h++)void 0!==l[h].data.subgroup&&(l[h].top=i[l[h].data.subgroup].top+.5*e.item.vertical,i[r].stack&&(l[h].baseTop=l[h].top));n&&i[r].stack&&ju(t[r],e,i[r])}}function Gu(t,e,i,n){return n?t.right-i.horizontal+.001<e.right+e.width&&t.right+t.width+i.horizontal-.001>e.right&&t.top-i.vertical+.001<e.top+e.height&&t.top+t.height+i.vertical-.001>e.top:t.left-i.horizontal+.001<e.left+e.width&&t.left+t.width+i.horizontal-.001>e.left&&t.top-i.vertical+.001<e.top+e.height&&t.top+t.height+i.vertical-.001>e.top}function Wu(t,e){var i=t.start<e.end&&t.end>e.start,n=t.top<e.top+e.height&&t.top+t.height>e.top;return i&&n}var Vu=Object.freeze({__proto__:null,orderByStart:Nu,orderByEnd:Yu,stack:Ru,substack:ju,nostack:Fu,stackSubgroups:Hu,stackSubgroupsWithInnerStack:zu,collision:Gu,collisionByTimes:Wu}),Bu="__background__",Uu=function(){function t(e,i,n){var o=this;if(ya(this,t),this.groupId=e,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=i&&i.subgroupOrder,this.itemSet=n,this.isVisible=null,this.stackDirty=!0,this._disposeCallbacks=[],i&&i.nestedGroups&&(this.nestedGroups=i.nestedGroups,0==i.showNested?this.showNested=!1:this.showNested=!0),i&&i.subgroupStack)if("boolean"==typeof i.subgroupStack)this.doInnerStack=i.subgroupStack,this.subgroupStackAll=i.subgroupStack;else for(var r in i.subgroupStack)this.subgroupStack[r]=i.subgroupStack[r],this.doInnerStack=this.doInnerStack||i.subgroupStack[r];i&&i.heightMode?this.heightMode=i.heightMode:this.heightMode=n.options.groupHeightMode,this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var s=function(){o.checkRangedItems=!0};this.itemSet.body.emitter.on("checkRangedItems",s),this._disposeCallbacks.push((function(){o.itemSet.body.emitter.off("checkRangedItems",s)})),this._create(),this.setData(i)}return _a(t,[{key:"_create",value:function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",i["vis-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.style.position="absolute",this.dom.marker.innerHTML="",this.dom.background.appendChild(this.dom.marker)}},{key:"setData",value:function(t){if(!this.itemSet.groupTouchParams.isDragging){var e,i,n;if(t&&t.subgroupVisibility)for(var o in t.subgroupVisibility)this.subgroupVisibility[o]=t.subgroupVisibility[o];if(this.itemSet.options&&this.itemSet.options.groupTemplate)e=(i=ga(n=this.itemSet.options.groupTemplate).call(n,this))(t,this.dom.inner);else e=t&&t.content;if(e instanceof Element){for(;this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else e instanceof Object&&e.isReactComponent||(e instanceof Object?i(t,this.dom.inner):this.dom.inner.innerHTML=null!=e?e:this.groupId||"");this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?Ba.removeClassName(this.dom.inner,"vis-hidden"):Ba.addClassName(this.dom.inner,"vis-hidden"),t&&t.nestedGroups?(this.nestedGroups&&this.nestedGroups==t.nestedGroups||(this.nestedGroups=t.nestedGroups),void 0===t.showNested&&void 0!==this.showNested||(0==t.showNested?this.showNested=!1:this.showNested=!0),Ba.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(Ba.removeClassName(this.dom.label,"collapsed"),Ba.addClassName(this.dom.label,"expanded")):(Ba.removeClassName(this.dom.label,"expanded"),Ba.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,Ba.removeClassName(this.dom.label,"collapsed"),Ba.removeClassName(this.dom.label,"expanded"),Ba.removeClassName(this.dom.label,"vis-nesting-group")),t&&(t.treeLevel||t.nestedInGroup)?(Ba.addClassName(this.dom.label,"vis-nested-group"),t.treeLevel?Ba.addClassName(this.dom.label,"vis-group-level-"+t.treeLevel):Ba.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):Ba.addClassName(this.dom.label,"vis-group-level-0");var r=t&&t.className||null;r!=this.className&&(this.className&&(Ba.removeClassName(this.dom.label,this.className),Ba.removeClassName(this.dom.foreground,this.className),Ba.removeClassName(this.dom.background,this.className),Ba.removeClassName(this.dom.axis,this.className)),Ba.addClassName(this.dom.label,r),Ba.addClassName(this.dom.foreground,r),Ba.addClassName(this.dom.background,r),Ba.addClassName(this.dom.axis,r),this.className=r),this.style&&(Ba.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(Ba.addCssText(this.dom.label,t.style),this.style=t.style)}}},{key:"getLabelWidth",value:function(){return this.props.label.width}},{key:"_didMarkerHeightChange",value:function(){var t=this.dom.marker.clientHeight;if(t!=this.lastMarkerHeight){this.lastMarkerHeight=t;var e={},i=0;if(mn(Ba).call(Ba,this.items,(function(t,n){if(t.dirty=!0,t.displayed){e[n]=t.redraw(!0),i=e[n].length}})),i>0)for(var n=function(t){mn(Ba).call(Ba,e,(function(e){e[t]()}))},o=0;o<i;o++)n(o);return!0}return!1}},{key:"_calculateGroupSizeAndPosition",value:function(){var t=this.dom.foreground,e=t.offsetTop,i=t.offsetLeft,n=t.offsetWidth;this.top=e,this.right=i,this.width=n}},{key:"_shouldBailItemsRedraw",value:function(){var t=this,e=this.itemSet.options.onTimeout,i={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:e&&e.timeoutMs,userBailFunction:e&&e.callback,shouldBailStackItems:this.shouldBailStackItems},n=null;if(!this.itemSet.initialDrawDone){if(i.shouldBailStackItems)return!0;Math.abs(Ko()-new Date(i.relativeBailingTime))>i.bailTimeMs&&(i.userBailFunction&&null==this.itemSet.userContinueNotBail?i.userBailFunction((function(e){t.itemSet.userContinueNotBail=e,n=!e})):n=0==t.itemSet.userContinueNotBail)}return n}},{key:"_redrawItems",value:function(t,e,i,n){var o=this;if(t||this.stackDirty||this.isVisible&&!e){var r,s,a,l,h,u,d={byEnd:Gn(r=this.orderedItems.byEnd).call(r,(function(t){return!t.isCluster})),byStart:Gn(s=this.orderedItems.byStart).call(s,(function(t){return!t.isCluster}))},c={byEnd:mo(new js(Gn(a=Tn(l=this.orderedItems.byEnd).call(l,(function(t){return t.cluster}))).call(a,(function(t){return!!t})))),byStart:mo(new js(Gn(h=Tn(u=this.orderedItems.byStart).call(u,(function(t){return t.cluster}))).call(h,(function(t){return!!t}))))},p=function(){var t,e,i,r=o._updateItemsInRange(d,Gn(t=o.visibleItems).call(t,(function(t){return!t.isCluster})),n),s=o._updateClustersInRange(c,Gn(e=o.visibleItems).call(e,(function(t){return t.isCluster})),n);return Zn(i=[]).call(i,mo(r),mo(s))},m=function(t){var e={},i=function(i){var n,r=Gn(n=o.visibleItems).call(n,(function(t){return t.data.subgroup===i}));e[i]=t?ws(r).call(r,(function(e,i){return t(e.data,i.data)})):r};for(var n in o.subgroups)i(n);return e};if("function"==typeof this.itemSet.options.order){var f=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups){zu(m(this.itemSet.options.order),i,this.subgroups),this.visibleItems=p(),this._updateSubGroupHeights(i)}else{var v,g,y,b;this.visibleItems=p(),this._updateSubGroupHeights(i);var _=ws(v=Gn(g=ko(y=this.visibleItems).call(y)).call(g,(function(t){return t.isCluster||!t.isCluster&&!t.cluster}))).call(v,(function(t,e){return f.itemSet.options.order(t.data,e.data)}));this.shouldBailStackItems=Ru(_,i,!0,ga(b=this._shouldBailItemsRedraw).call(b,this))}}else{var w;if(this.visibleItems=p(),this._updateSubGroupHeights(i),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups)zu(m(),i,this.subgroups);else this.shouldBailStackItems=Ru(this.visibleItems,i,!0,ga(w=this._shouldBailItemsRedraw).call(w,this));else Fu(this.visibleItems,i,this.subgroups,this.itemSet.options.stackSubgroups)}for(var k=0;k<this.visibleItems.length;k++)this.visibleItems[k].repositionX(),void 0!==this.subgroupVisibility[this.visibleItems[k].data.subgroup]&&(this.subgroupVisibility[this.visibleItems[k].data.subgroup]||this.visibleItems[k].hide());this.itemSet.options.cluster&&mn(Ba).call(Ba,this.items,(function(t){t.cluster&&t.displayed&&t.hide()})),this.shouldBailStackItems&&this.itemSet.body.emitter.emit("destroyTimeline"),this.stackDirty=!1}}},{key:"_didResize",value:function(t,e){t=Ba.updateProperty(this,"height",e)||t;var i=this.dom.inner.clientWidth,n=this.dom.inner.clientHeight;return t=Ba.updateProperty(this.props.label,"width",i)||t,t=Ba.updateProperty(this.props.label,"height",n)||t}},{key:"_applyGroupHeight",value:function(t){this.dom.background.style.height="".concat(t,"px"),this.dom.foreground.style.height="".concat(t,"px"),this.dom.label.style.height="".concat(t,"px")}},{key:"_updateItemsVerticalPosition",value:function(t){for(var e=0,i=this.visibleItems.length;e<i;e++){var n=this.visibleItems[e];n.repositionY(t),this.isVisible||this.groupId==Bu||n.displayed&&n.hide()}}},{key:"redraw",value:function(t,e,i,n){var o,r,s,a,l,h,u,d=this,c=!1,p=this.isVisible,m=[function(){i=d._didMarkerHeightChange.call(d)||i},ga(o=this._updateSubGroupHeights).call(o,this,e),ga(r=this._calculateGroupSizeAndPosition).call(r,this),function(){var i;d.isVisible=ga(i=d._isGroupVisible).call(i,d)(t,e)},function(){var n;ga(n=d._redrawItems).call(n,d)(i,p,e,t)},ga(s=this._updateSubgroupsSizes).call(s,this),function(){var t;h=ga(t=d._calculateHeight).call(t,d)(e)},ga(a=this._calculateGroupSizeAndPosition).call(a,this),function(){var t;c=ga(t=d._didResize).call(t,d)(c,h)},function(){var t;ga(t=d._applyGroupHeight).call(t,d)(h)},function(){var t;ga(t=d._updateItemsVerticalPosition).call(t,d)(e)},ga(l=function(){return!d.isVisible&&d.height&&(c=!1),c}).call(l,this)];return n?m:(mn(m).call(m,(function(t){u=t()})),u)}},{key:"_updateSubGroupHeights",value:function(t){var e=this;if(zi(this.subgroups).length>0){var i=this;this._resetSubgroups(),mn(Ba).call(Ba,this.visibleItems,(function(n){void 0!==n.data.subgroup&&(i.subgroups[n.data.subgroup].height=Math.max(i.subgroups[n.data.subgroup].height,n.height+t.item.vertical),i.subgroups[n.data.subgroup].visible=void 0===e.subgroupVisibility[n.data.subgroup]||Boolean(e.subgroupVisibility[n.data.subgroup]))}))}}},{key:"_isGroupVisible",value:function(t,e){return this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop}},{key:"_calculateHeight",value:function(t){var e,i;if((i="fixed"===this.heightMode?Ba.toArray(this.items):this.visibleItems).length>0){var n=i[0].top,o=i[0].top+i[0].height;if(mn(Ba).call(Ba,i,(function(t){n=Math.min(n,t.top),o=Math.max(o,t.top+t.height)})),n>t.axis){var r=n-t.axis;o-=r,mn(Ba).call(Ba,i,(function(t){t.top-=r}))}e=Math.ceil(o+t.item.vertical/2),"fitItems"!==this.heightMode&&(e=Math.max(e,this.props.label.height))}else e=this.props.label.height;return e}},{key:"show",value:function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)}},{key:"hide",value:function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var n=this.dom.axis;n.parentNode&&n.parentNode.removeChild(n)}},{key:"add",value:function(t){var e;if(this.items[t.id]=t,t.setParent(this),this.stackDirty=!0,void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups()),!Au(e=this.visibleItems).call(e,t)){var i=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,i)}}},{key:"_addToSubgroup",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.data.subgroup;null!=e&&void 0===this.subgroups[e]&&(this.subgroups[e]={height:0,top:0,start:t.data.start,end:t.data.end||t.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[e]||!1},this.subgroupIndex++),new Date(t.data.start)<new Date(this.subgroups[e].start)&&(this.subgroups[e].start=t.data.start);var i=t.data.end||t.data.start;new Date(i)>new Date(this.subgroups[e].end)&&(this.subgroups[e].end=i),this.subgroups[e].items.push(t)}},{key:"_updateSubgroupsSizes",value:function(){var t=this;if(t.subgroups){var e=function(e){var i,n=t.subgroups[e].items[0].data.end||t.subgroups[e].items[0].data.start,o=t.subgroups[e].items[0].data.start,r=n-1;mn(i=t.subgroups[e].items).call(i,(function(t){new Date(t.data.start)<new Date(o)&&(o=t.data.start);var e=t.data.end||t.data.start;new Date(e)>new Date(r)&&(r=e)})),t.subgroups[e].start=o,t.subgroups[e].end=new Date(r-1)};for(var i in t.subgroups)e(i)}}},{key:"orderSubgroups",value:function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});ws(t).call(t,(function(t,e){return t.sortField-e.sortField}))}else if("function"==typeof this.subgroupOrderer){for(var i in this.subgroups)t.push(this.subgroups[i].items[0].data);ws(t).call(t,this.subgroupOrderer)}if(t.length>0)for(var n=0;n<t.length;n++)this.subgroups[t[n].subgroup].index=n}}},{key:"_resetSubgroups",value:function(){for(var t in this.subgroups)this.subgroups.hasOwnProperty(t)&&(this.subgroups[t].visible=!1,this.subgroups[t].height=0)}},{key:"remove",value:function(t){var e,i;delete this.items[t.id],t.setParent(null),this.stackDirty=!0;var n=Io(e=this.visibleItems).call(e,t);-1!=n&&qs(i=this.visibleItems).call(i,n,1),void 0!==t.data.subgroup&&(this._removeFromSubgroup(t),this.orderSubgroups())}},{key:"_removeFromSubgroup",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.data.subgroup;if(null!=e){var i=this.subgroups[e];if(i){var n,o,r=Io(n=i.items).call(n,t);if(r>=0)qs(o=i.items).call(o,r,1),i.items.length?this._updateSubgroupsSizes():delete this.subgroups[e]}}}},{key:"removeFromDataSet",value:function(t){this.itemSet.removeItem(t.id)}},{key:"order",value:function(){for(var t=Ba.toArray(this.items),e=[],i=[],n=0;n<t.length;n++)void 0!==t[n].data.end&&i.push(t[n]),e.push(t[n]);this.orderedItems={byStart:e,byEnd:i},Nu(this.orderedItems.byStart),Yu(this.orderedItems.byEnd)}},{key:"_updateItemsInRange",value:function(t,e,i){var n=[],o={};if(!this.isVisible&&this.groupId!=Bu){for(var r=0;r<e.length;r++){var s=e[r];s.displayed&&s.hide()}return n}var a=(i.end-i.start)/4,l=i.start-a,h=i.end+a;if(e.length>0)for(var u=0;u<e.length;u++)this._checkIfVisibleWithReference(e[u],n,o,i);var d=Ba.binarySearchCustom(t.byStart,(function(t){return t<l?-1:t<=h?0:1}),"data","start");if(this._traceVisible(d,t.byStart,n,o,(function(t){return t.data.start<l||t.data.start>h})),1==this.checkRangedItems){this.checkRangedItems=!1;for(var c=0;c<t.byEnd.length;c++)this._checkIfVisibleWithReference(t.byEnd[c],n,o,i)}else{var p=Ba.binarySearchCustom(t.byEnd,(function(t){return t<l?-1:0}),"data","end");this._traceVisible(p,t.byEnd,n,o,(function(t){return t.data.end<l||t.data.start>h}))}for(var m={},f=0,v=0;v<n.length;v++){var g=n[v];if(!g.displayed){m[v]=g.redraw(!0),f=m[v].length}}if(f>0)for(var y=function(t){mn(Ba).call(Ba,m,(function(e){e[t]()}))},b=0;b<f;b++)y(b);for(var _=0;_<n.length;_++)n[_].repositionX();return n}},{key:"_traceVisible",value:function(t,e,i,n,o){if(-1!=t){for(var r=t;r>=0;r--){var s=e[r];if(o(s))break;s.isCluster&&!s.hasItems()||s.cluster||void 0===n[s.id]&&(n[s.id]=!0,i.push(s))}for(var a=t+1;a<e.length;a++){var l=e[a];if(o(l))break;l.isCluster&&!l.hasItems()||l.cluster||void 0===n[l.id]&&(n[l.id]=!0,i.push(l))}}}},{key:"_checkIfVisible",value:function(t,e,i){t.isVisible(i)?(t.displayed||t.show(),t.repositionX(),e.push(t)):t.displayed&&t.hide()}},{key:"_checkIfVisibleWithReference",value:function(t,e,i,n){t.isVisible(n)?void 0===i[t.id]&&(i[t.id]=!0,e.push(t)):t.displayed&&t.hide()}},{key:"_updateClustersInRange",value:function(t,e,i){var n=[],o={};if(e.length>0)for(var r=0;r<e.length;r++)this._checkIfVisibleWithReference(e[r],n,o,i);for(var s=0;s<t.byStart.length;s++)this._checkIfVisibleWithReference(t.byStart[s],n,o,i);for(var a=0;a<t.byEnd.length;a++)this._checkIfVisibleWithReference(t.byEnd[a],n,o,i);for(var l={},h=0,u=0;u<n.length;u++){var d=n[u];if(!d.displayed){l[u]=d.redraw(!0),h=l[u].length}}if(h>0)for(var c=0;c<h;c++)mn(Ba).call(Ba,l,(function(t){t[c]()}));for(var p=0;p<n.length;p++)n[p].repositionX();return n}},{key:"changeSubgroup",value:function(t,e,i){this._removeFromSubgroup(t,e),this._addToSubgroup(t,i),this.orderSubgroups()}},{key:"dispose",value:function(){var t;for(this.hide();t=this._disposeCallbacks.pop();)t()}}]),t}(),Xu=function(t){function e(t,i,n){var o;return ya(this,e),(o=as(this,us(e).call(this,t,i,n))).width=0,o.height=0,o.top=0,o.left=0,o}return ps(e,t),_a(e,[{key:"redraw",value:function(t,e,i){this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,t),this.width=this.dom.background.offsetWidth,this.dom.background.style.height="0";for(var n=0,o=this.visibleItems.length;n<o;n++){this.visibleItems[n].repositionY(e)}return!1}},{key:"show",value:function(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)}}]),e}(Uu),qu=function(){function t(e,i,n){var o,r=this;ya(this,t),this.id=null,this.parent=null,this.data=e,this.dom=null,this.conversion=i||{},this.defaultOptions={locales:hu,locale:"en"},this.options=Ba.extend({},this.defaultOptions,n),this.options.locales=Ba.extend({},hu,this.options.locales);var s=this.defaultOptions.locales[this.defaultOptions.locale];mn(o=zi(this.options.locales)).call(o,(function(t){r.options.locales[t]=Ba.extend({},s,r.options.locales[t])})),this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.selectable=n&&n.selectable||!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.setSelectability(e),this.editable=null,this._updateEditStatus()}return _a(t,[{key:"select",value:function(){this.selectable&&(this.selected=!0,this.dirty=!0,this.displayed&&this.redraw())}},{key:"unselect",value:function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()}},{key:"setData",value:function(t){null!=t.group&&this.data.group!=t.group&&null!=this.parent&&this.parent.itemSet._moveToGroup(this,t.group),this.setSelectability(t),this.parent&&(this.parent.stackDirty=!0),null!=t.subgroup&&this.data.subgroup!=t.subgroup&&null!=this.parent&&this.parent.changeSubgroup(this,this.data.subgroup,t.subgroup),this.data=t,this._updateEditStatus(),this.dirty=!0,this.displayed&&this.redraw()}},{key:"setSelectability",value:function(t){t&&(this.selectable=void 0===t.selectable||Boolean(t.selectable))}},{key:"setParent",value:function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t}},{key:"isVisible",value:function(t){return!1}},{key:"show",value:function(){return!1}},{key:"hide",value:function(){return!1}},{key:"redraw",value:function(){}},{key:"repositionX",value:function(){}},{key:"repositionY",value:function(){}},{key:"_repaintDragCenter",value:function(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){var t,e,i=this,n=document.createElement("div");n.className="vis-drag-center",n.dragCenterItem=this,this.hammerDragCenter=new Uh(n),this.hammerDragCenter.on("tap",(function(t){i.parent.itemSet.body.emitter.emit("click",{event:t,item:i.id})})),this.hammerDragCenter.on("doubletap",(function(t){t.stopPropagation(),i.parent.itemSet._onUpdateItem(i),i.parent.itemSet.body.emitter.emit("doubleClick",{event:t,item:i.id})})),this.hammerDragCenter.on("panstart",(function(t){t.stopPropagation(),i.parent.itemSet._onDragStart(t)})),this.hammerDragCenter.on("panmove",ga(t=i.parent.itemSet._onDrag).call(t,i.parent.itemSet)),this.hammerDragCenter.on("panend",ga(e=i.parent.itemSet._onDragEnd).call(e,i.parent.itemSet)),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(n,this.dom.dragLeft):this.dom.box.appendChild(n):this.dom.point&&this.dom.point.appendChild(n),this.dom.dragCenter=n}else!this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null,this.hammerDragCenter&&(this.hammerDragCenter.destroy(),this.hammerDragCenter=null))}},{key:"_repaintDeleteButton",value:function(t){var e=(this.options.editable.overrideItems||null==this.editable)&&this.options.editable.remove||!this.options.editable.overrideItems&&null!=this.editable&&this.editable.remove;if(this.selected&&e&&!this.dom.deleteButton){var i=this,n=document.createElement("div");this.options.rtl?n.className="vis-delete-rtl":n.className="vis-delete";var o=this.options.locales[this.options.locale];o||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),o=this.options.locales.en),n.title=o.deleteSelected,this.hammerDeleteButton=new Uh(n).on("tap",(function(t){t.stopPropagation(),i.parent.removeFromDataSet(i)})),t.appendChild(n),this.dom.deleteButton=n}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null,this.hammerDeleteButton&&(this.hammerDeleteButton.destroy(),this.hammerDeleteButton=null))}},{key:"_repaintOnItemUpdateTimeTooltip",value:function(t){if(this.options.tooltipOnItemUpdateTime){var e=(this.options.editable.updateTime||!0===this.data.editable)&&!1!==this.data.editable;if(this.selected&&e&&!this.dom.onItemUpdateTimeTooltip){var i=document.createElement("div");i.className="vis-onUpdateTime-tooltip",t.appendChild(i),this.dom.onItemUpdateTimeTooltip=i}else!this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?"visible":"hidden",this.dom.onItemUpdateTimeTooltip.style.transform="translateX(-50%)",this.dom.onItemUpdateTimeTooltip.style.left="50%";var n,o,r=this.parent.itemSet.body.domProps.scrollTop;if(("top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height)+this.parent.top-50<-r?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top="".concat(this.height+2,"px")):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom="".concat(this.height+2,"px")),this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template)n=ga(o=this.options.tooltipOnItemUpdateTime.template).call(o,this)(this.data);else n="start: ".concat(Ha(this.data.start).format("MM/DD/YYYY hh:mm")),this.data.end&&(n+="<br> end: ".concat(Ha(this.data.end).format("MM/DD/YYYY hh:mm")));this.dom.onItemUpdateTimeTooltip.innerHTML=n}}}},{key:"_getItemData",value:function(){return this.parent.itemSet.itemsData.get(this.id)}},{key:"_updateContents",value:function(t){var e,i,n,o,r,s,a=this._getItemData(),l=(this.dom.box||this.dom.point).getElementsByClassName("vis-item-visible-frame")[0];this.options.visibleFrameTemplate?n=(o=ga(r=this.options.visibleFrameTemplate).call(r,this))(a,l):n="";if(l)if(n instanceof Object&&!(n instanceof Element))o(a,l);else if(this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(n)){if(n instanceof Element)l.innerHTML="",l.appendChild(n);else if(null!=n)l.innerHTML=n;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '.concat(this.id));this.itemVisibleFrameContent=n}this.options.template?e=(i=ga(s=this.options.template).call(s,this))(a,t,this.data):e=this.data.content;if(e instanceof Object&&!(e instanceof Element))i(a,t);else if(this._contentToString(this.content)!==this._contentToString(e)){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(null!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '.concat(this.id));this.content=e}}},{key:"_updateDataAttributes",value:function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Ao(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=zi(this.data)}var i=!0,n=!1,o=void 0;try{for(var r,s=Ii(e);!(i=(r=s.next()).done);i=!0){var a=r.value,l=this.data[a];null!=l?t.setAttribute("data-".concat(a),l):t.removeAttribute("data-".concat(a))}}catch(t){n=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(n)throw o}}}}},{key:"_updateStyle",value:function(t){this.style&&(Ba.removeCssText(t,this.style),this.style=null),this.data.style&&(Ba.addCssText(t,this.data.style),this.style=this.data.style)}},{key:"_contentToString",value:function(t){return"string"==typeof t?t:t&&"outerHTML"in t?t.outerHTML:t}},{key:"_updateEditStatus",value:function(){this.options&&("boolean"==typeof this.options.editable?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:"object"===Bo(this.options.editable)&&(this.editable={},Ba.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.options.editable))),this.options&&this.options.editable&&!0===this.options.editable.overrideItems||this.data&&("boolean"==typeof this.data.editable?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:"object"===Bo(this.data.editable)&&(this.editable={},Ba.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.data.editable)))}},{key:"getWidthLeft",value:function(){return 0}},{key:"getWidthRight",value:function(){return 0}},{key:"getTitle",value:function(){var t;return this.options.tooltip&&this.options.tooltip.template?ga(t=this.options.tooltip.template).call(t,this)(this._getItemData(),this.data):this.data.title}}]),t}();qu.prototype.stack=!0;var Zu=function(t){function e(t,i,n){var o;if(ya(this,e),(o=as(this,us(e).call(this,t,i,n))).props={dot:{width:0,height:0},line:{width:0,height:0}},t&&null==t.start)throw new Error('Property "start" missing in item '.concat(t));return o}return ps(e,t),_a(e,[{key:"isVisible",value:function(t){if(this.cluster)return!1;var e,i=this.data.align||this.options.align,n=this.width*t.getMillisecondsPerPixel();return e="right"==i?this.data.start.getTime()>t.start&&this.data.start.getTime()-n<t.end:"left"==i?this.data.start.getTime()+n>t.start&&this.data.start.getTime()<t.end:this.data.start.getTime()+n/2>t.start&&this.data.start.getTime()-n/2<t.end,e}},{key:"_createDomElement",value:function(){this.dom||(this.dom={},this.dom.box=document.createElement("DIV"),this.dom.content=document.createElement("DIV"),this.dom.content.className="vis-item-content",this.dom.box.appendChild(this.dom.content),this.dom.line=document.createElement("DIV"),this.dom.line.className="vis-line",this.dom.dot=document.createElement("DIV"),this.dom.dot.className="vis-dot",this.dom.box["vis-item"]=this,this.dirty=!0)}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}if(!this.dom.line.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var i=this.parent.dom.axis;if(!e)throw new Error("Cannot redraw item: parent has no axis container element");i.appendChild(this.dom.dot)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className="vis-item vis-box".concat(e),this.dom.line.className="vis-item vis-line".concat(e),this.dom.dot.className="vis-item vis-dot".concat(e)}}},{key:"_getDomComponentsSizes",value:function(){return{previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},dot:{height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},line:{width:this.dom.line.offsetWidth},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}}}},{key:"_updateDomComponentsSizes",value:function(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.props.dot.height=t.dot.height,this.props.dot.width=t.dot.width,this.props.line.width=t.line.width,this.width=t.box.width,this.height=t.box.height,this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left,this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.box)}},{key:"redraw",value:function(t){var e,i,n,o,r,s,a=this,l=[ga(e=this._createDomElement).call(e,this),ga(i=this._appendDomElement).call(i,this),ga(n=this._updateDirtyDomComponents).call(n,this),function(){a.dirty&&(r=a._getDomComponentsSizes())},function(){var t;a.dirty&&ga(t=a._updateDomComponentsSizes).call(t,a)(r)},ga(o=this._repaintDomAdditionals).call(o,this)];return t?l:(mn(l).call(l,(function(t){s=t()})),s)}},{key:"show",value:function(t){if(!this.displayed)return this.redraw(t)}},{key:"hide",value:function(){if(this.displayed){var t=this.dom;t.box.remove?t.box.remove():t.box.parentNode&&t.box.parentNode.removeChild(t.box),t.line.remove?t.line.remove():t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.remove?t.dot.remove():t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot),this.displayed=!1}}},{key:"repositionXY",value:function(){var t=this.options.rtl,e=function(t,e,i){var n,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e||void 0!==i){var r=o?-1*e:e;t.style.transform=void 0!==i?void 0!==e?Zn(n="translate(".concat(r,"px, ")).call(n,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(r,"px)")}};e(this.dom.box,this.boxX,this.boxY,t),e(this.dom.dot,this.dotX,this.dotY,t),e(this.dom.line,this.lineX,this.lineY,t)}},{key:"repositionX",value:function(){var t=this.conversion.toScreen(this.data.start),e=void 0===this.data.align?this.options.align:this.data.align,i=this.props.line.width,n=this.props.dot.width;"right"==e?(this.boxX=t-this.width,this.lineX=t-i,this.dotX=t-i/2-n/2):"left"==e?(this.boxX=t,this.lineX=t,this.dotX=t+i/2-n/2):(this.boxX=t-this.width/2,this.lineX=this.options.rtl?t-i:t-i/2,this.dotX=t-n/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}},{key:"repositionY",value:function(){var t=this.options.orientation.item,e=this.dom.line.style;if("top"==t){var i=this.parent.top+this.top+1;this.boxY=this.top||0,e.height="".concat(i,"px"),e.bottom="",e.top="0"}else{var n=this.parent.itemSet.props.height-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0),e.height="".concat(n,"px"),e.top="",e.bottom="0"}this.dotY=-this.props.dot.height/2,this.repositionXY()}},{key:"getWidthLeft",value:function(){return this.width/2}},{key:"getWidthRight",value:function(){return this.width/2}}]),e}(qu),Ku=function(t){function e(t,i,n){var o;if(ya(this,e),(o=as(this,us(e).call(this,t,i,n))).props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},t&&null==t.start)throw new Error('Property "start" missing in item '.concat(t));return o}return ps(e,t),_a(e,[{key:"isVisible",value:function(t){if(this.cluster)return!1;var e=this.width*t.getMillisecondsPerPixel();return this.data.start.getTime()+e>t.start&&this.data.start<t.end}},{key:"_createDomElement",value:function(){this.dom||(this.dom={},this.dom.point=document.createElement("div"),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.point.appendChild(this.dom.content),this.dom.dot=document.createElement("div"),this.dom.point.appendChild(this.dom.dot),this.dom.point["vis-item"]=this,this.dirty=!0)}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.point.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.point)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);var t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.point.className="vis-item vis-point".concat(e),this.dom.dot.className="vis-item vis-dot".concat(e)}}},{key:"_getDomComponentsSizes",value:function(){return{dot:{width:this.dom.dot.offsetWidth,height:this.dom.dot.offsetHeight},content:{width:this.dom.content.offsetWidth,height:this.dom.content.offsetHeight},point:{width:this.dom.point.offsetWidth,height:this.dom.point.offsetHeight}}}},{key:"_updateDomComponentsSizes",value:function(t){this.props.dot.width=t.dot.width,this.props.dot.height=t.dot.height,this.props.content.height=t.content.height,this.options.rtl?this.dom.content.style.marginRight="".concat(2*this.props.dot.width,"px"):this.dom.content.style.marginLeft="".concat(2*this.props.dot.width,"px"),this.width=t.point.width,this.height=t.point.height,this.dom.dot.style.top="".concat((this.height-this.props.dot.height)/2,"px");var e=this.props.dot.width,i=this.options.rtl?e/2*-1:e/2;this.dom.dot.style.transform="translateX(".concat(i,"px"),this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.point),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.point)}},{key:"redraw",value:function(t){var e,i,n,o,r,s,a=this,l=[ga(e=this._createDomElement).call(e,this),ga(i=this._appendDomElement).call(i,this),ga(n=this._updateDirtyDomComponents).call(n,this),function(){a.dirty&&(r=a._getDomComponentsSizes())},function(){var t;a.dirty&&ga(t=a._updateDomComponentsSizes).call(t,a)(r)},ga(o=this._repaintDomAdditionals).call(o,this)];return t?l:(mn(l).call(l,(function(t){s=t()})),s)}},{key:"repositionXY",value:function(){var t=this.options.rtl,e=function(t,e,i){var n,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e||void 0!==i){var r=o?-1*e:e;t.style.transform=void 0!==i?void 0!==e?Zn(n="translate(".concat(r,"px, ")).call(n,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(r,"px)")}};e(this.dom.point,this.pointX,this.pointY,t)}},{key:"show",value:function(t){if(!this.displayed)return this.redraw(t)}},{key:"hide",value:function(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)}},{key:"repositionX",value:function(){var t=this.conversion.toScreen(this.data.start);this.pointX=t,this.options.rtl?this.right=t-this.props.dot.width:this.left=t-this.props.dot.width,this.repositionXY()}},{key:"repositionY",value:function(){var t=this.options.orientation.item;this.pointY="top"==t?this.top:this.parent.height-this.top-this.height,this.repositionXY()}},{key:"getWidthLeft",value:function(){return this.props.dot.width}},{key:"getWidthRight",value:function(){return this.props.dot.width}}]),e}(qu),$u=function(t){function e(t,i,n){var o;if(ya(this,e),(o=as(this,us(e).call(this,t,i,n))).props={content:{width:0}},o.overflow=!1,t){if(null==t.start)throw new Error('Property "start" missing in item '.concat(t.id));if(null==t.end)throw new Error('Property "end" missing in item '.concat(t.id))}return o}return ps(e,t),_a(e,[{key:"isVisible",value:function(t){return!this.cluster&&(this.data.start<t.end&&this.data.end>t.start)}},{key:"_createDomElement",value:function(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement("div"),this.dom.visibleFrame.className="vis-item-visible-frame",this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dom.box["vis-item"]=this,this.dirty=!0)}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className=this.baseClassName+e,this.dom.content.style.maxWidth="none"}}},{key:"_getDomComponentsSizes",value:function(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.frame).overflow,this.whiteSpace="nowrap"!==window.getComputedStyle(this.dom.content).whiteSpace,{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}}},{key:"_updateDomComponentsSizes",value:function(t){this.props.content.width=t.content.width,this.height=t.box.height,this.dom.content.style.maxWidth="",this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()}},{key:"redraw",value:function(t){var e,i,n,o,r,s,a=this,l=[ga(e=this._createDomElement).call(e,this),ga(i=this._appendDomElement).call(i,this),ga(n=this._updateDirtyDomComponents).call(n,this),function(){var t;a.dirty&&(r=ga(t=a._getDomComponentsSizes).call(t,a)())},function(){var t;a.dirty&&ga(t=a._updateDomComponentsSizes).call(t,a)(r)},ga(o=this._repaintDomAdditionals).call(o,this)];return t?l:(mn(l).call(l,(function(t){s=t()})),s)}},{key:"show",value:function(t){if(!this.displayed)return this.redraw(t)}},{key:"hide",value:function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}}},{key:"repositionX",value:function(t){var e,i,n=this.parent.width,o=this.conversion.toScreen(this.data.start),r=this.conversion.toScreen(this.data.end),s=void 0===this.data.align?this.options.align:this.data.align;!1===this.data.limitSize||void 0!==t&&!0!==t||(o<-n&&(o=-n),r>2*n&&(r=2*n));var a=Math.max(Math.round(1e3*(r-o))/1e3,1);switch(this.overflow?(this.options.rtl?this.right=o:this.left=o,this.width=a+this.props.content.width,i=this.props.content.width):(this.options.rtl?this.right=o:this.left=o,this.width=a,i=Math.min(r-o,this.props.content.width)),this.options.rtl?this.dom.box.style.transform="translateX(".concat(-1*this.right,"px)"):this.dom.box.style.transform="translateX(".concat(this.left,"px)"),this.dom.box.style.width="".concat(a,"px"),this.whiteSpace&&(this.height=this.dom.box.offsetHeight),s){case"left":this.dom.content.style.transform="translateX(0)";break;case"right":if(this.options.rtl){var l=-1*Math.max(a-i,0);this.dom.content.style.transform="translateX(".concat(l,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max(a-i,0),"px)");break;case"center":if(this.options.rtl){var h=-1*Math.max((a-i)/2,0);this.dom.content.style.transform="translateX(".concat(h,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max((a-i)/2,0),"px)");break;default:if(e=this.overflow?r>0?Math.max(-o,0):-i:o<0?-o:0,this.options.rtl){var u=-1*e;this.dom.content.style.transform="translateX(".concat(u,"px)")}else this.dom.content.style.transform="translateX(".concat(e,"px)")}}},{key:"repositionY",value:function(){var t=this.options.orientation.item,e=this.dom.box;e.style.top="".concat("top"==t?this.top:this.parent.height-this.top-this.height,"px")}},{key:"_repaintDragLeft",value:function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragLeft||(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)}},{key:"_repaintDragRight",value:function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragRight||(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)}}]),e}(qu);$u.prototype.baseClassName="vis-item vis-range";var Ju=function(t){function e(t,i,n){var o;if(ya(this,e),(o=as(this,us(e).call(this,t,i,n))).props={content:{width:0}},o.overflow=!1,t){if(null==t.start)throw new Error('Property "start" missing in item '.concat(t.id));if(null==t.end)throw new Error('Property "end" missing in item '.concat(t.id))}return o}return ps(e,t),_a(e,[{key:"isVisible",value:function(t){return this.data.start<t.end&&this.data.end>t.start}},{key:"_createDomElement",value:function(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dirty=!0)}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.box)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");this.dom.box.className=this.baseClassName+t}}},{key:"_getDomComponentsSizes",value:function(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.content).overflow,{content:{width:this.dom.content.offsetWidth}}}},{key:"_updateDomComponentsSizes",value:function(t){this.props.content.width=t.content.width,this.height=0,this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){}},{key:"redraw",value:function(t){var e,i,n,o,r,s,a=this,l=[ga(e=this._createDomElement).call(e,this),ga(i=this._appendDomElement).call(i,this),ga(n=this._updateDirtyDomComponents).call(n,this),function(){var t;a.dirty&&(r=ga(t=a._getDomComponentsSizes).call(t,a)())},function(){var t;a.dirty&&ga(t=a._updateDomComponentsSizes).call(t,a)(r)},ga(o=this._repaintDomAdditionals).call(o,this)];return t?l:(mn(l).call(l,(function(t){s=t()})),s)}},{key:"repositionY",value:function(t){var e,i=this.options.orientation.item;if(void 0!==this.data.subgroup){var n=this.data.subgroup;this.dom.box.style.height="".concat(this.parent.subgroups[n].height,"px"),this.dom.box.style.top="".concat("top"==i?this.parent.top+this.parent.subgroups[n].top:this.parent.top+this.parent.height-this.parent.subgroups[n].top-this.parent.subgroups[n].height,"px"),this.dom.box.style.bottom=""}else this.parent instanceof Xu?(e=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom="bottom"==i?"0":"",this.dom.box.style.top="top"==i?"0":""):(e=this.parent.height,this.dom.box.style.top="".concat(this.parent.top,"px"),this.dom.box.style.bottom="");this.dom.box.style.height="".concat(e,"px")}}]),e}(qu);Ju.prototype.baseClassName="vis-item vis-background",Ju.prototype.stack=!1,Ju.prototype.show=$u.prototype.show,Ju.prototype.hide=$u.prototype.hide,Ju.prototype.repositionX=$u.prototype.repositionX;var Qu=function(){function t(e,i){ya(this,t),this.container=e,this.overflowMethod=i||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return _a(t,[{key:"setPosition",value:function(t,e){this.x=Ln(t),this.y=Ln(e)}},{key:"setText",value:function(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=t}},{key:"show",value:function(t){if(void 0===t&&(t=!0),!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,r=0,s=0;if("flip"==this.overflowMethod||"none"==this.overflowMethod){var a=!1,l=!0;"flip"==this.overflowMethod&&(this.y-e<this.padding&&(l=!1),this.x+i>o-this.padding&&(a=!0)),r=a?this.x-i:this.x,s=l?this.y-e:this.y}else(s=this.y-e)+e+this.padding>n&&(s=n-e-this.padding),s<this.padding&&(s=this.padding),(r=this.x)+i+this.padding>o&&(r=o-i-this.padding),r<this.padding&&(r=this.padding);this.frame.style.left=r+"px",this.frame.style.top=s+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),t}(),td=Me.every,ed=Qi("every"),id=on("every");U({target:"Array",proto:!0,forced:!ed||!id},{every:function(t){return td(this,t,arguments.length>1?arguments[1]:void 0)}});var nd=Zi("Array").every,od=Array.prototype,rd=function(t){var e=t.every;return t===od||t instanceof Array&&e===od.every?nd:e},sd=function(t){function e(t,i,n){var o;ya(this,e);var r=jo({},{fitOnDoubleClick:!0},n,{editable:!1});if((o=as(this,us(e).call(this,t,i,r))).props={content:{width:0,height:0}},!t||null==t.uiItems)throw new Error('Property "uiItems" missing in item '+t.id);return o.id=Du(),o.group=t.group,o._setupRange(),o.emitter=o.data.eventEmitter,o.range=o.data.range,o.attached=!1,o.isCluster=!0,o.data.isCluster=!0,o}return ps(e,t),_a(e,[{key:"hasItems",value:function(){return this.data.uiItems&&this.data.uiItems.length&&this.attached}},{key:"setUiItems",value:function(t){this.detach(),this.data.uiItems=t,this._setupRange(),this.attach()}},{key:"isVisible",value:function(t){var e=this.data.end?this.data.end-this.data.start:0,i=this.width*t.getMillisecondsPerPixel(),n=Math.max(e,this.data.start.getTime()+i);return this.data.start<t.end&&n>t.start&&this.hasItems()}},{key:"getData",value:function(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}},{key:"redraw",value:function(t){var e,i,n,o,r,s,a,l,h=[ga(e=this._createDomElement).call(e,this),ga(i=this._appendDomElement).call(i,this),ga(n=this._updateDirtyDomComponents).call(n,this),ga(o=function(){this.dirty&&(a=this._getDomComponentsSizes())}).call(o,this),ga(r=function(){var t;this.dirty&&ga(t=this._updateDomComponentsSizes).call(t,this)(a)}).call(r,this),ga(s=this._repaintDomAdditionals).call(s,this)];return t?h:(mn(h).call(h,(function(t){l=t()})),l)}},{key:"show",value:function(){this.displayed||this.redraw()}},{key:"hide",value:function(){if(this.displayed){var t=this.dom;t.box.parentNode&&t.box.parentNode.removeChild(t.box),this.options.showStipes&&(t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot)),this.displayed=!1}}},{key:"repositionX",value:function(){var t=this.conversion.toScreen(this.data.start),e=this.data.end?this.conversion.toScreen(this.data.end):0;if(e)this.repositionXWithRanges(t,e);else{var i=void 0===this.data.align?this.options.align:this.data.align;this.repositionXWithoutRanges(t,i)}this.options.showStipes&&(this.dom.line.style.display=this._isStipeVisible()?"block":"none",this.dom.dot.style.display=this._isStipeVisible()?"block":"none",this._isStipeVisible()&&this.repositionStype(t,e))}},{key:"repositionStype",value:function(t,e){this.dom.line.style.display="block",this.dom.dot.style.display="block";var i=this.dom.line.offsetWidth,n=this.dom.dot.offsetWidth;if(e){var o=i+t+(e-t)/2,r=o-n/2,s=this.options.rtl?-1*o:o,a=this.options.rtl?-1*r:r;this.dom.line.style.transform="translateX(".concat(s,"px)"),this.dom.dot.style.transform="translateX(".concat(a,"px)")}else{var l=this.options.rtl?-1*t:t,h=this.options.rtl?-1*(t-n/2):t-n/2;this.dom.line.style.transform="translateX(".concat(l,"px)"),this.dom.dot.style.transform="translateX(".concat(h,"px)")}}},{key:"repositionXWithoutRanges",value:function(t,e){"right"==e?this.options.rtl?(this.right=t-this.width,this.dom.box.style.right=this.right+"px"):(this.left=t-this.width,this.dom.box.style.left=this.left+"px"):"left"==e?this.options.rtl?(this.right=t,this.dom.box.style.right=this.right+"px"):(this.left=t,this.dom.box.style.left=this.left+"px"):this.options.rtl?(this.right=t-this.width/2,this.dom.box.style.right=this.right+"px"):(this.left=t-this.width/2,this.dom.box.style.left=this.left+"px")}},{key:"repositionXWithRanges",value:function(t,e){var i=Math.round(Math.max(e-t+.5,1));this.options.rtl?this.right=t:this.left=t,this.width=Math.max(i,this.minWidth||0),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=i+"px"}},{key:"repositionY",value:function(){var t=this.options.orientation.item,e=this.dom.box;if(e.style.top="top"==t?(this.top||0)+"px":(this.parent.height-this.top-this.height||0)+"px",this.options.showStipes){if("top"==t)this.dom.line.style.top="0",this.dom.line.style.height=this.parent.top+this.top+1+"px",this.dom.line.style.bottom="";else{var i=this.parent.itemSet.props.height,n=i-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=i-n+"px",this.dom.line.style.bottom="0"}this.dom.dot.style.top=-this.dom.dot.offsetHeight/2+"px"}}},{key:"getWidthLeft",value:function(){return this.width/2}},{key:"getWidthRight",value:function(){return this.width/2}},{key:"move",value:function(){this.repositionX(),this.repositionY()}},{key:"attach",value:function(){var t,e=!0,i=!1,n=void 0;try{for(var o,r=Ii(this.data.uiItems);!(e=(o=r.next()).done);e=!0){o.value.cluster=this}}catch(t){i=!0,n=t}finally{try{e||null==r.return||r.return()}finally{if(i)throw n}}this.data.items=Tn(t=this.data.uiItems).call(t,(function(t){return t.data})),this.attached=!0,this.dirty=!0}},{key:"detach",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.hasItems()){var e=!0,i=!1,n=void 0;try{for(var o,r=Ii(this.data.uiItems);!(e=(o=r.next()).done);e=!0){var s=o.value;delete s.cluster}}catch(t){i=!0,n=t}finally{try{e||null==r.return||r.return()}finally{if(i)throw n}}this.attached=!1,t&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}},{key:"_onDoubleClick",value:function(){this._fit()}},{key:"_setupRange",value:function(){var t,e,i,n=Tn(t=this.data.uiItems).call(t,(function(t){return{start:t.data.start.valueOf(),end:t.data.end?t.data.end.valueOf():t.data.start.valueOf()}}));this.data.min=Math.min.apply(Math,mo(Tn(n).call(n,(function(t){return Math.min(t.start,t.end||t.start)})))),this.data.max=Math.max.apply(Math,mo(Tn(n).call(n,(function(t){return Math.max(t.start,t.end||t.start)}))));var o=Tn(e=this.data.uiItems).call(e,(function(t){return t.center})),r=ua(o).call(o,(function(t,e){return t+e}),0)/this.data.uiItems.length;ss(i=this.data.uiItems).call(i,(function(t){return t.data.end}))?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(r),this.data.end=null)}},{key:"_getUiItems",value:function(){var t,e=this;return this.data.uiItems&&this.data.uiItems.length?Gn(t=this.data.uiItems).call(t,(function(t){return t.cluster===e})):[]}},{key:"_createDomElement",value:function(){if(!this.dom){var t;if(this.dom={},this.dom.box=document.createElement("DIV"),this.dom.content=document.createElement("DIV"),this.dom.content.className="vis-item-content",this.dom.box.appendChild(this.dom.content),this.options.showStipes&&(this.dom.line=document.createElement("DIV"),this.dom.line.className="vis-cluster-line",this.dom.line.style.display="none",this.dom.dot=document.createElement("DIV"),this.dom.dot.className="vis-cluster-dot",this.dom.dot.style.display="none"),this.options.fitOnDoubleClick)this.dom.box.ondblclick=ga(t=e.prototype._onDoubleClick).call(t,this);this.dom.box["vis-item"]=this,this.dirty=!0}}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}var e=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var i=this.parent.dom.axis;if(!e)throw new Error("Cannot redraw item: parent has no axis container element");i.appendChild(this.dom.dot)}}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var t=this.baseClassName+" "+(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+" vis-readonly";this.dom.box.className="vis-item "+t,this.options.showStipes&&(this.dom.line.className="vis-item vis-cluster-line "+(this.selected?" vis-selected":""),this.dom.dot.className="vis-item vis-cluster-dot "+(this.selected?" vis-selected":"")),this.data.end&&(this.dom.content.style.maxWidth="none")}}},{key:"_getDomComponentsSizes",value:function(){var t={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};return this.options.showStipes&&(t.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},t.line={width:this.dom.line.offsetWidth}),t}},{key:"_updateDomComponentsSizes",value:function(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.data.end?this.minWidth=t.box.width:this.width=t.box.width,this.height=t.box.height,this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left,this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}},{key:"_isStipeVisible",value:function(){return this.minWidth>=this.width||!this.data.end}},{key:"_getFitRange",value:function(){var t=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-t,fitEnd:this.data.max+t}}},{key:"_fit",value:function(){if(this.emitter){var t=this._getFitRange(),e=t.fitStart,i=t.fitEnd,n={start:new Date(e),end:new Date(i),animation:!0};this.emitter.emit("fit",n)}}},{key:"_getItemData",value:function(){return this.data}}]),e}(qu);sd.prototype.baseClassName="vis-item vis-range vis-cluster";var ad="__ungrouped__",ld=function(){function t(e){ya(this,t),this.itemSet=e,this.groups={},this.cache={},this.cache[-1]=[]}return _a(t,[{key:"createClusterItem",value:function(t,e,i){return new sd(t,e,i)}},{key:"setItems",value:function(t,e){this.items=t||[],this.dataChanged=!0,this.applyOnChangedLevel=!1,e&&e.applyOnChangedLevel&&(this.applyOnChangedLevel=e.applyOnChangedLevel)}},{key:"updateData",value:function(){this.dataChanged=!0,this.applyOnChangedLevel=!1}},{key:"getClusters",value:function(t,e,i){var n="boolean"==typeof i?{}:i,o=n.maxItems,r=n.clusterCriteria;r||(r=function(){return!0}),o=o||1;var s=-1,a=0;if(e>0){if(e>=1)return[];s=Math.abs(Math.round(Math.log(100/e)/Math.log(2))),a=Math.abs(Math.pow(2,s))}if(this.dataChanged){var l=s!=this.cacheLevel;(!this.applyOnChangedLevel||l)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=s;var h=this.cache[s];if(!h){for(var u in h=[],this.groups)if(this.groups.hasOwnProperty(u))for(var d=this.groups[u],c=d.length,p=0;p<c;){for(var m=d[p],f=1,v=p-1;v>=0&&m.center-d[v].center<a/2;)!d[v].cluster&&r(m.data,d[v].data)&&f++,v--;for(var g=p+1;g<d.length&&d[g].center-m.center<a/2;)r(m.data,d[g].data)&&f++,g++;for(var y=h.length-1;y>=0&&m.center-h[y].center<a;)m.group==h[y].group&&r(m.data,h[y].data)&&f++,y--;if(f>o){for(var b=f-o+1,_=[],w=p;_.length<b&&w<d.length;)r(d[w].data,d[w].data)&&_.push(d[w]),w++;var k=this.itemSet.getGroupId(m.data),x=this.itemSet.groups[k]||this.itemSet.groups[ad],D=this._getClusterForItems(_,x,t,i);h.push(D),p+=b}else delete m.cluster,p+=1}this.cache[s]=h}return h}},{key:"_filterData",value:function(){var t={};this.groups=t;for(var e=0,i=Yn(this.items);e<i.length;e++){var n=i[e],o=n.parent?n.parent.groupId:"",r=t[o];r||(r=[],t[o]=r),r.push(n),n.data.start&&(n.data.end?n.center=(n.data.start.valueOf()+n.data.end.valueOf())/2:n.center=n.data.start.valueOf())}for(var s in t){var a;if(t.hasOwnProperty(s))ws(a=t[s]).call(a,(function(t,e){return t.center-e.center}))}this.dataChanged=!1}},{key:"_getClusterForItems",value:function(t,e,i,n){var o,r,s=Tn(o=i||[]).call(o,(function(t){var e;return{cluster:t,itemsIds:new js(Tn(e=t.data.uiItems).call(e,(function(t){return t.id})))}}));if(s.length){var a=!0,l=!1,h=void 0;try{for(var u,d=function(){var e=u.value;if(e.itemsIds.size===t.length&&rd(t).call(t,(function(t){return e.itemsIds.has(t.id)})))return r=e.cluster,"break"},c=Ii(s);!(a=(u=c.next()).done);a=!0){if("break"===d())break}}catch(t){l=!0,h=t}finally{try{a||null==c.return||c.return()}finally{if(l)throw h}}}if(r)return r.setUiItems(t),r.group!==e&&(r.group&&r.group.remove(r),e&&(e.add(r),r.group=e)),r;var p=n.titleTemplate||"",m={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},f=p.replace(/{count}/,t.length),v='<div title="'+f+'">'+t.length+"</div>",g=jo({},n,this.itemSet.options),y={content:v,title:f,group:e,uiItems:t,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return r=this.createClusterItem(y,m,g),e&&(e.add(r),r.group=e),r.attach(),r}},{key:"_dropLevelsCache",value:function(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}}]),t}(),hd="__background__",ud=function(t){function e(t,i){var n;ya(this,e),(n=as(this,us(e).call(this))).body=t,n.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap:function(t,e,i){var n=e.order;e.order=t.order,t.order=n},groupOrder:"order",selectable:!0,multiselect:!1,longSelectPressTime:251,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:qh.snap,onDropObjectOnItem:function(t,e,i){i(e)},onAdd:function(t,e){e(t)},onUpdate:function(t,e){e(t)},onMove:function(t,e){e(t)},onRemove:function(t,e){e(t)},onMoving:function(t,e){e(t)},onAddGroup:function(t,e){e(t)},onMoveGroup:function(t,e){e(t)},onRemoveGroup:function(t,e){e(t)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:500},tooltipOnItemUpdateTime:!1},n.options=Ba.extend({},n.defaultOptions),n.options.rtl=i.rtl,n.options.onTimeout=i.onTimeout,n.conversion={toScreen:t.util.toScreen,toTime:t.util.toTime},n.dom={},n.props={},n.hammer=null;var o=Nr(n);return n.itemsData=null,n.groupsData=null,n.itemsSettingTime=null,n.initialItemSetDrawn=!1,n.userContinueNotBail=null,n.sequentialSelection=!1,n.itemListeners={add:function(t,e,i){o._onAdd(e.items),o.options.cluster&&o.clusterGenerator.setItems(o.items,{applyOnChangedLevel:!1}),o.redraw()},update:function(t,e,i){o._onUpdate(e.items),o.options.cluster&&o.clusterGenerator.setItems(o.items,{applyOnChangedLevel:!1}),o.redraw()},remove:function(t,e,i){o._onRemove(e.items),o.options.cluster&&o.clusterGenerator.setItems(o.items,{applyOnChangedLevel:!1}),o.redraw()}},n.groupListeners={add:function(t,e,i){if(o._onAddGroups(e.items),o.groupsData&&o.groupsData.length>0){var n,r=o.groupsData.getDataSet();mn(n=r.get()).call(n,(function(t){if(t.nestedGroups){var e;0!=t.showNested&&(t.showNested=!0);var n=[];mn(e=t.nestedGroups).call(e,(function(e){var i=r.get(e);i&&(i.nestedInGroup=t.id,0==t.showNested&&(i.visible=!1),n=Zn(n).call(n,i))})),r.update(n,i)}}))}},update:function(t,e,i){o._onUpdateGroups(e.items)},remove:function(t,e,i){o._onRemoveGroups(e.items)}},n.items={},n.groups={},n.groupIds=[],n.selection=[],n.popup=null,n.popupTimer=null,n.touchParams={},n.groupTouchParams={group:null,isDragging:!1},n._create(),n.setOptions(i),n.clusters=[],n}return ps(e,t),_a(e,[{key:"_create",value:function(){var t,e,i,n,o,r,s,a,l,h,u,d,c,p,m,f=this,v=document.createElement("div");v.className="vis-itemset",v["vis-itemset"]=this,this.dom.frame=v;var g=document.createElement("div");g.className="vis-background",v.appendChild(g),this.dom.background=g;var y=document.createElement("div");y.className="vis-foreground",v.appendChild(y),this.dom.foreground=y;var b=document.createElement("div");b.className="vis-axis",this.dom.axis=b;var _=document.createElement("div");_.className="vis-labelset",this.dom.labelSet=_,this._updateUngrouped();var w=new Xu(hd,null,this);w.show(),this.groups[hd]=w,this.hammer=new Uh(this.body.dom.centerContainer),this.hammer.on("hammer.input",(function(t){t.isFirst&&f._onTouch(t)})),this.hammer.on("panstart",ga(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",ga(e=this._onDrag).call(e,this)),this.hammer.on("panend",ga(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:Uh.ALL}),this.hammer.on("tap",ga(n=this._onSelectItem).call(n,this)),this.hammer.on("press",ga(o=this._onMultiSelectItem).call(o,this)),this.hammer.on("doubletap",ga(r=this._onAddItem).call(r,this)),this.options.rtl?this.groupHammer=new Uh(this.body.dom.rightContainer):this.groupHammer=new Uh(this.body.dom.leftContainer),this.groupHammer.on("tap",ga(s=this._onGroupClick).call(s,this)),this.groupHammer.on("panstart",ga(a=this._onGroupDragStart).call(a,this)),this.groupHammer.on("panmove",ga(l=this._onGroupDrag).call(l,this)),this.groupHammer.on("panend",ga(h=this._onGroupDragEnd).call(h,this)),this.groupHammer.get("pan").set({threshold:5,direction:Uh.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",ga(u=this._onMouseOver).call(u,this)),this.body.dom.centerContainer.addEventListener("mouseout",ga(d=this._onMouseOut).call(d,this)),this.body.dom.centerContainer.addEventListener("mousemove",ga(c=this._onMouseMove).call(c,this)),this.body.dom.centerContainer.addEventListener("contextmenu",ga(p=this._onDragEnd).call(p,this)),this.body.dom.centerContainer.addEventListener("mousewheel",ga(m=this._onMouseWheel).call(m,this)),this.show()}},{key:"setOptions",value:function(t){var e=this;if(t){var i,n;Ba.selectiveExtend(["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","sequentialSelection","multiselectPerGroup","longSelectPressTime","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime","groupHeightMode","onTimeout"],this.options,t),"itemsAlwaysDraggable"in t&&("boolean"==typeof t.itemsAlwaysDraggable?(this.options.itemsAlwaysDraggable.item=t.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):"object"===Bo(t.itemsAlwaysDraggable)&&(Ba.selectiveExtend(["item","range"],this.options.itemsAlwaysDraggable,t.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),"sequentialSelection"in t&&"boolean"==typeof t.sequentialSelection&&(this.options.sequentialSelection=t.sequentialSelection),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.item="top"===t.orientation?"top":"bottom":"object"===Bo(t.orientation)&&"item"in t.orientation&&(this.options.orientation.item=t.orientation.item)),"margin"in t&&("number"==typeof t.margin?(this.options.margin.axis=t.margin,this.options.margin.item.horizontal=t.margin,this.options.margin.item.vertical=t.margin):"object"===Bo(t.margin)&&(Ba.selectiveExtend(["axis"],this.options.margin,t.margin),"item"in t.margin&&("number"==typeof t.margin.item?(this.options.margin.item.horizontal=t.margin.item,this.options.margin.item.vertical=t.margin.item):"object"===Bo(t.margin.item)&&Ba.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),mn(i=["locale","locales"]).call(i,(function(i){i in t&&(e.options[i]=t[i])})),"editable"in t&&("boolean"==typeof t.editable?(this.options.editable.updateTime=t.editable,this.options.editable.updateGroup=t.editable,this.options.editable.add=t.editable,this.options.editable.remove=t.editable,this.options.editable.overrideItems=!1):"object"===Bo(t.editable)&&Ba.selectiveExtend(["updateTime","updateGroup","add","remove","overrideItems"],this.options.editable,t.editable)),"groupEditable"in t&&("boolean"==typeof t.groupEditable?(this.options.groupEditable.order=t.groupEditable,this.options.groupEditable.add=t.groupEditable,this.options.groupEditable.remove=t.groupEditable):"object"===Bo(t.groupEditable)&&Ba.selectiveExtend(["order","add","remove"],this.options.groupEditable,t.groupEditable));mn(n=["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"]).call(n,(function(i){var n=t[i];if(n){var o;if("function"!=typeof n)throw new Error(Zn(o="option ".concat(i," must be a function ")).call(o,i,"(item, callback)"));e.options[i]=n}})),t.cluster?(jo(this.options,{cluster:t.cluster}),this.clusterGenerator||(this.clusterGenerator=new ld(this)),this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.clusterGenerator?(this._detachAllClusters(),this.clusters=[],this.clusterGenerator=null,this.options.cluster=void 0,this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.markDirty()}}},{key:"markDirty",value:function(t){this.groupIds=[],t&&(t.refreshItems&&mn(Ba).call(Ba,this.items,(function(t){t.dirty=!0,t.displayed&&t.redraw()})),t.restackGroups&&mn(Ba).call(Ba,this.groups,(function(t,e){e!==hd&&(t.stackDirty=!0)})))}},{key:"destroy",value:function(){this.clearPopupTimer(),this.hide(),this.setItems(null),this.setGroups(null),this.hammer&&this.hammer.destroy(),this.groupHammer&&this.groupHammer.destroy(),this.hammer=null,this.body=null,this.conversion=null}},{key:"hide",value:function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}},{key:"show",value:function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))}},{key:"setPopupTimer",value:function(t){if(this.clearPopupTimer(),t){var e=this.options.tooltip.delay||"number"==typeof this.options.tooltip.delay?this.options.tooltip.delay:500;this.popupTimer=Js((function(){t.show()}),e)}}},{key:"clearPopupTimer",value:function(){null!=this.popupTimer&&(clearTimeout(this.popupTimer),this.popupTimer=null)}},{key:"setSelection",value:function(t){var e;null==t&&(t=[]),Ao(t)||(t=[t]);var i=Gn(e=this.selection).call(e,(function(e){return-1===Io(t).call(t,e)})),n=!0,o=!1,r=void 0;try{for(var s,a=Ii(i);!(n=(s=a.next()).done);n=!0){var l=s.value,h=this.getItemById(l);h&&h.unselect()}}catch(t){o=!0,r=t}finally{try{n||null==a.return||a.return()}finally{if(o)throw r}}this.selection=mo(t);var u=!0,d=!1,c=void 0;try{for(var p,m=Ii(t);!(u=(p=m.next()).done);u=!0){var f=p.value,v=this.getItemById(f);v&&v.select()}}catch(t){d=!0,c=t}finally{try{u||null==m.return||m.return()}finally{if(d)throw c}}}},{key:"getSelection",value:function(){var t;return Zn(t=this.selection).call(t,[])}},{key:"getVisibleItems",value:function(){var t,e,i=this.body.range.getRange();this.options.rtl?(t=this.body.util.toScreen(i.start),e=this.body.util.toScreen(i.end)):(e=this.body.util.toScreen(i.start),t=this.body.util.toScreen(i.end));var n=[];for(var o in this.groups)if(this.groups.hasOwnProperty(o)){var r=this.groups[o],s=r.isVisible?r.visibleItems:[],a=!0,l=!1,h=void 0;try{for(var u,d=Ii(s);!(a=(u=d.next()).done);a=!0){var c=u.value;this.options.rtl?c.right<e&&c.right+c.width>t&&n.push(c.id):c.left<t&&c.left+c.width>e&&n.push(c.id)}}catch(t){l=!0,h=t}finally{try{a||null==d.return||d.return()}finally{if(l)throw h}}}return n}},{key:"getVisibleGroups",value:function(){var t=[];for(var e in this.groups){if(this.groups.hasOwnProperty(e))this.groups[e].isVisible&&t.push(e)}return t}},{key:"getItemById",value:function(t){var e;return this.items[t]||yu(e=this.clusters).call(e,(function(e){return e.id===t}))}},{key:"_deselect",value:function(t){for(var e=this.selection,i=0,n=e.length;i<n;i++)if(e[i]==t){qs(e).call(e,i,1);break}}},{key:"redraw",value:function(){var t=this,e=this.options.margin,i=this.body.range,n=Ba.option.asSize,o=this.options,r=o.orientation.item,s=!1,a=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,a.className="vis-itemset",this.options.cluster&&this._clusterItems(),s=this._orderGroups()||s;var l=i.end-i.start,h=l!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,u=i.start!=this.lastRangeStart,d=o.stack!=this.lastStack,c=o.stackSubgroups!=this.lastStackSubgroups,p=h||u||d||c;this.lastVisibleInterval=l,this.lastRangeStart=i.start,this.lastStack=o.stack,this.lastStackSubgroups=o.stackSubgroups,this.props.lastWidth=this.props.width;var m=this._firstGroup(),f={item:e.item,axis:e.axis},v={item:e.item,axis:e.item.vertical/2},g=0,y=e.axis+e.item.vertical;this.groups[hd].redraw(i,v,p);var b={},_=0;return mn(Ba).call(Ba,this.groups,(function(t,e){if(e!==hd){var n=t==m?f:v;b[e]=t.redraw(i,n,p,!0),_=b[e].length}})),_>0&&function(){for(var e={},i=function(t){mn(Ba).call(Ba,b,(function(i,n){e[n]=i[t]()}))},n=0;n<_;n++)i(n);mn(Ba).call(Ba,t.groups,(function(t,i){if(i!==hd){var n=e[i];s=n||s,g+=t.height}})),g=Math.max(g,y)}(),g=Math.max(g,y),a.style.height=n(g),this.props.width=a.offsetWidth,this.props.height=g,this.dom.axis.style.top=n("top"==r?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right="0":this.dom.axis.style.left="0",this.hammer.get("press").set({time:this.options.longSelectPressTime}),this.initialItemSetDrawn=!0,s=this._isResized()||s}},{key:"_firstGroup",value:function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups.__ungrouped__||null}},{key:"_updateUngrouped",value:function(){var t,e,i=this.groups.__ungrouped__;if(this.groupsData){if(i)for(e in i.dispose(),delete this.groups.__ungrouped__,this.items)if(this.items.hasOwnProperty(e)){(t=this.items[e]).parent&&t.parent.remove(t);var n=this.getGroupId(t.data),o=this.groups[n];o&&o.add(t)||t.hide()}}else if(!i){for(e in i=new Uu(null,null,this),this.groups.__ungrouped__=i,this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}}},{key:"getLabelSet",value:function(){return this.dom.labelSet}},{key:"setItems",value:function(t){this.itemsSettingTime=new Date;var e,i=this,n=this.itemsData;if(t){if(!(t instanceof ja||t instanceof Fa))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=Va(t)}else this.itemsData=null;if(n&&(mn(Ba).call(Ba,this.itemListeners,(function(t,e){n.off(e,t)})),n.dispose(),e=n.getIds(),this._onRemove(e)),this.itemsData){var o=this.id;mn(Ba).call(Ba,this.itemListeners,(function(t,e){i.itemsData.on(e,t,o)})),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})}},{key:"getItems",value:function(){return null!=this.itemsData?this.itemsData.rawDS:null}},{key:"setGroups",value:function(t){var e,i=this;if(this.groupsData&&(mn(Ba).call(Ba,this.groupListeners,(function(t,e){i.groupsData.off(e,t)})),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof ja||t instanceof Fa))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var n,o=this.groupsData;this.groupsData instanceof Fa&&(o=this.groupsData.getDataSet()),mn(n=o.get()).call(n,(function(t){var e;t.nestedGroups&&mn(e=t.nestedGroups).call(e,(function(e){var i=o.get(e);i.nestedInGroup=t.id,0==t.showNested&&(i.visible=!1),o.update(i)}))}));var r=this.id;mn(Ba).call(Ba,this.groupListeners,(function(t,e){i.groupsData.on(e,t,r)})),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems(),this.markDirty({refreshItems:!0,restackGroups:!0})),this.body.emitter.emit("_change",{queue:!0})}},{key:"getGroups",value:function(){return this.groupsData}},{key:"removeItem",value:function(t){var e=this,i=this.itemsData.get(t);i&&this.options.onRemove(i,(function(i){i&&e.itemsData.remove(t)}))}},{key:"_getType",value:function(t){return t.type||this.options.type||(t.end?"range":"box")}},{key:"getGroupId",value:function(t){return"background"==this._getType(t)&&null==t.group?hd:this.groupsData?t.group:"__ungrouped__"}},{key:"_onUpdate",value:function(t){var i=this,n=this;mn(t).call(t,(function(t){var o,r=n.itemsData.get(t),s=n.items[t],a=r?n._getType(r):null,l=e.types[a];if(s&&(l&&s instanceof l?n._updateItem(s,r):(o=s.selected,n._removeItem(s),s=null)),!s&&r){if(!l)throw new TypeError('Unknown item type "'.concat(a,'"'));(s=new l(r,n.conversion,n.options)).id=t,n._addItem(s),o&&(i.selection.push(t),s.select())}})),this._order(),this.options.cluster&&(this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this._clusterItems()),this.body.emitter.emit("_change",{queue:!0})}},{key:"_onRemove",value:function(t){var e=0,i=this;mn(t).call(t,(function(t){var n=i.items[t];n&&(e++,i._removeItem(n))})),e&&(this._order(),this.body.emitter.emit("_change",{queue:!0}))}},{key:"_order",value:function(){mn(Ba).call(Ba,this.groups,(function(t){t.order()}))}},{key:"_onUpdateGroups",value:function(t){this._onAddGroups(t)}},{key:"_onAddGroups",value:function(t){var e=this;mn(t).call(t,(function(t){var i=e.groupsData.get(t),n=e.groups[t];if(n)n.setData(i);else{if("__ungrouped__"==t||t==hd)throw new Error("Illegal group id. ".concat(t," is a reserved id."));var o=Yi(e.options);for(var r in Ba.extend(o,{height:null}),n=new Uu(t,i,e),e.groups[t]=n,e.items)if(e.items.hasOwnProperty(r)){var s=e.items[r];s.data.group==t&&n.add(s)}n.order(),n.show()}})),this.body.emitter.emit("_change",{queue:!0})}},{key:"_onRemoveGroups",value:function(t){var e=this;mn(t).call(t,(function(t){var i=e.groups[t];i&&(i.dispose(),delete e.groups[t])})),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems()),this.markDirty({restackGroups:!!this.options.cluster}),this.body.emitter.emit("_change",{queue:!0})}},{key:"_orderGroups",value:function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder});t=this._orderNestedGroups(t);var e=!Ba.equalArray(t,this.groupIds);if(e){var i=this.groups;mn(t).call(t,(function(t){i[t].hide()})),mn(t).call(t,(function(t){i[t].show()})),this.groupIds=t}return e}return!1}},{key:"_orderNestedGroups",value:function(t){var e=this;return function t(e,i){var n=[];return mn(i).call(i,(function(i){if(n.push(i),e.groupsData.get(i).nestedGroups){var o,r=Tn(o=e.groupsData.get({filter:function(t){return t.nestedInGroup==i},order:e.options.groupOrder})).call(o,(function(t){return t.id}));n=Zn(n).call(n,t(e,r))}})),n}(this,Gn(t).call(t,(function(t){return!e.groupsData.get(t).nestedInGroup})))}},{key:"_addItem",value:function(t){this.items[t.id]=t;var e=this.getGroupId(t.data),i=this.groups[e];i?i&&i.data&&i.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1,i&&i.add(t)}},{key:"_updateItem",value:function(t,e){t.setData(e);var i=this.getGroupId(t.data),n=this.groups[i];n?n&&n.data&&n.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1}},{key:"_removeItem",value:function(t){var e,i;t.hide(),delete this.items[t.id];var n=Io(e=this.selection).call(e,t.id);-1!=n&&qs(i=this.selection).call(i,n,1),t.parent&&t.parent.remove(t),null!=this.popup&&this.popup.hide()}},{key:"_constructByEndArray",value:function(t){for(var e=[],i=0;i<t.length;i++)t[i]instanceof $u&&e.push(t[i]);return e}},{key:"_onTouch",value:function(t){this.touchParams.item=this.itemFromTarget(t),this.touchParams.dragLeftItem=t.target.dragLeftItem||!1,this.touchParams.dragRightItem=t.target.dragRightItem||!1,this.touchParams.itemProps=null}},{key:"_getGroupIndex",value:function(t){for(var e=0;e<this.groupIds.length;e++)if(t==this.groupIds[e])return e}},{key:"_onDragStart",value:function(t){var e=this;if(!this.touchParams.itemIsDragging){var i,n=this.touchParams.item||null,o=this;if(n&&(n.selected||this.options.itemsAlwaysDraggable.item)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;if(null!=n.editable&&!n.editable.updateTime&&!n.editable.updateGroup&&!this.options.editable.overrideItems)return;var r=this.touchParams.dragLeftItem,s=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=n,r)i={item:r,initialX:t.center.x,dragLeft:!0,data:this._cloneItemData(n.data)},this.touchParams.itemProps=[i];else if(s)i={item:s,initialX:t.center.x,dragRight:!0,data:this._cloneItemData(n.data)},this.touchParams.itemProps=[i];else if(this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey))this._onDragStartAddItem(t);else{this.groupIds.length<1&&this.redraw();var a=this._getGroupIndex(n.data.group),l=this.options.itemsAlwaysDraggable.item&&!n.selected?[n.id]:this.getSelection();this.touchParams.itemProps=Tn(l).call(l,(function(i){var n=o.items[i],r=o._getGroupIndex(n.data.group);return{item:n,initialX:t.center.x,groupOffset:a-r,data:e._cloneItemData(n.data)}}))}t.stopPropagation()}else this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey)&&this._onDragStartAddItem(t)}}},{key:"_onDragStartAddItem",value:function(t){var e=this.options.snap||null,i=this.dom.frame.getBoundingClientRect(),n=this.options.rtl?i.right-t.center.x+10:t.center.x-i.left-10,o=this.body.util.toTime(n),r=this.body.util.getScale(),s=this.body.util.getStep(),a=e?e(o,r,s):o,l={type:"range",start:a,end:a,content:"new item"},h=Du();l[this.itemsData.idProp]=h;var u=this.groupFromTarget(t);u&&(l.group=u.groupId);var d=new $u(l,this.conversion,this.options);d.id=h,d.data=this._cloneItemData(l),this._addItem(d),this.touchParams.selectedItem=d;var c={item:d,initialX:t.center.x,data:d.data};this.options.rtl?c.dragLeft=!0:c.dragRight=!0,this.touchParams.itemProps=[c],t.stopPropagation()}},{key:"_onDrag",value:function(t){var e=this;if(null!=this.popup&&this.options.showTooltips&&!this.popup.hidden){var i=this.body.dom.centerContainer,n=i.getBoundingClientRect();this.popup.setPosition(t.center.x-n.left+i.offsetLeft,t.center.y-n.top+i.offsetTop),this.popup.show()}if(this.touchParams.itemProps){var o;t.stopPropagation();var r=this,s=this.options.snap||null,a=this.body.dom.root.offsetLeft,l=this.options.rtl?a+this.body.domProps.right.width:a+this.body.domProps.left.width,h=this.body.util.getScale(),u=this.body.util.getStep(),d=this.touchParams.selectedItem,c=(this.options.editable.overrideItems||null==d.editable)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&null!=d.editable&&d.editable.updateGroup,p=null;if(c&&d&&null!=d.data.group){var m=r.groupFromTarget(t);m&&(p=this._getGroupIndex(m.groupId))}mn(o=this.touchParams.itemProps).call(o,(function(i){var n,o,a,m,f,v=r.body.util.toTime(t.center.x-l),g=r.body.util.toTime(i.initialX-l);n=e.options.rtl?-(v-g):v-g;var y=e._cloneItemData(i.item.data);if(null==i.item.editable||i.item.editable.updateTime||i.item.editable.updateGroup||r.options.editable.overrideItems){if((e.options.editable.overrideItems||null==d.editable)&&e.options.editable.updateTime||!e.options.editable.overrideItems&&null!=d.editable&&d.editable.updateTime)if(i.dragLeft)e.options.rtl?null!=y.end&&(a=Ba.convert(i.data.end,"Date"),f=new Date(a.valueOf()+n),y.end=s?s(f,h,u):f):null!=y.start&&(o=Ba.convert(i.data.start,"Date"),m=new Date(o.valueOf()+n),y.start=s?s(m,h,u):m);else if(i.dragRight)e.options.rtl?null!=y.start&&(o=Ba.convert(i.data.start,"Date"),m=new Date(o.valueOf()+n),y.start=s?s(m,h,u):m):null!=y.end&&(a=Ba.convert(i.data.end,"Date"),f=new Date(a.valueOf()+n),y.end=s?s(f,h,u):f);else if(null!=y.start)if(o=Ba.convert(i.data.start,"Date").valueOf(),m=new Date(o+n),null!=y.end){var b=(a=Ba.convert(i.data.end,"Date")).valueOf()-o.valueOf();y.start=s?s(m,h,u):m,y.end=new Date(y.start.valueOf()+b)}else y.start=s?s(m,h,u):m;if(c&&!i.dragLeft&&!i.dragRight&&null!=p&&null!=y.group){var _=p-i.groupOffset;_=Math.max(0,_),_=Math.min(r.groupIds.length-1,_),y.group=r.groupIds[_]}y=e._cloneItemData(y),r.options.onMoving(y,(function(t){t&&i.item.setData(e._cloneItemData(t,"Date"))}))}})),this.body.emitter.emit("_change")}}},{key:"_moveToGroup",value:function(t,e){var i=this.groups[e];if(i&&i.groupId!=t.data.group){var n=t.parent;n.remove(t),n.order(),t.data.group=i.groupId,i.add(t),i.order()}}},{key:"_onDragEnd",value:function(t){var e=this;if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){t.stopPropagation();var i=this,n=this.touchParams.itemProps;this.touchParams.itemProps=null,mn(n).call(n,(function(t){var n=t.item.id;if(null!=i.itemsData.get(n)){var o=e._cloneItemData(t.item.data);i.options.onMove(o,(function(o){o?(o[e.itemsData.idProp]=n,e.itemsData.update(o)):(t.item.setData(t.data),i.body.emitter.emit("_change"))}))}else i.options.onAdd(t.item.data,(function(e){i._removeItem(t.item),e&&i.itemsData.add(e),i.body.emitter.emit("_change")}))}))}}},{key:"_onGroupClick",value:function(t){var e=this,i=this.groupFromTarget(t);Js((function(){e.toggleGroupShowNested(i)}),1)}},{key:"toggleGroupShowNested",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(t&&t.nestedGroups){var n=this.groupsData.getDataSet();t.showNested=null!=i?!!i:!t.showNested;var o=n.get(t.groupId);o.showNested=t.showNested;for(var r=t.nestedGroups,s=r;s.length>0;){var a=s;s=[];for(var l=0;l<a.length;l++){var h=n.get(a[l]);h.nestedGroups&&(s=Zn(s).call(s,h.nestedGroups))}s.length>0&&(r=Zn(r).call(r,s))}var u=Tn(e=n.get(r)).call(e,(function(t){return null==t.visible&&(t.visible=!0),t.visible=!!o.showNested,t}));n.update(Zn(u).call(u,o)),o.showNested?(Ba.removeClassName(t.dom.label,"collapsed"),Ba.addClassName(t.dom.label,"expanded")):(Ba.removeClassName(t.dom.label,"expanded"),Ba.addClassName(t.dom.label,"collapsed"))}}},{key:"toggleGroupDragClassName",value:function(t){t.dom.label.classList.toggle("vis-group-is-dragging"),t.dom.foreground.classList.toggle("vis-group-is-dragging")}},{key:"_onGroupDragStart",value:function(t){this.groupTouchParams.isDragging||this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(t),this.groupTouchParams.group&&(t.stopPropagation(),this.groupTouchParams.isDragging=!0,this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))}},{key:"_onGroupDrag",value:function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this.groupsData;this.groupsData instanceof Fa&&(e=this.groupsData.getDataSet());var i=this.groupFromTarget(t);if(i&&i.height!=this.groupTouchParams.group.height){var n=i.top<this.groupTouchParams.group.top,o=t.center?t.center.y:t.clientY,r=i.dom.foreground.getBoundingClientRect(),s=this.groupTouchParams.group.height;if(n){if(r.top+s<o)return}else{var a=i.height;if(r.top+a-s>o)return}}if(i&&i!=this.groupTouchParams.group){var l=e.get(i.groupId),h=e.get(this.groupTouchParams.group.groupId);h&&l&&(this.options.groupOrderSwap(h,l,e),e.update(h),e.update(l));var u=e.getIds({order:this.options.groupOrder});if(!Ba.equalArray(u,this.groupTouchParams.originalOrder))for(var d=this.groupTouchParams.originalOrder,c=this.groupTouchParams.group.groupId,p=Math.min(d.length,u.length),m=0,f=0,v=0;m<p;){for(;m+f<p&&m+v<p&&u[m+f]==d[m+v];)m++;if(m+f>=p)break;if(u[m+f]==c)f=1;else if(d[m+v]==c)v=1;else{var g=Io(u).call(u,d[m+v]),y=e.get(u[m+f]),b=e.get(d[m+v]);this.options.groupOrderSwap(y,b,e),e.update(y),e.update(b);var _=u[m+f];u[m+f]=d[m+v],u[g]=_,m++}}}}}},{key:"_onGroupDragEnd",value:function(t){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,n=e.groupsData.getDataSet(),o=Ba.extend({},n.get(i));e.options.onMoveGroup(o,(function(t){if(t)t[n._idProp]=i,n.update(t);else{var o=n.getIds({order:e.options.groupOrder});if(!Ba.equalArray(o,e.groupTouchParams.originalOrder))for(var r=e.groupTouchParams.originalOrder,s=Math.min(r.length,o.length),a=0;a<s;){for(;a<s&&o[a]==r[a];)a++;if(a>=s)break;var l=Io(o).call(o,r[a]),h=n.get(o[a]),u=n.get(r[a]);e.options.groupOrderSwap(h,u,n),n.update(h),n.update(u);var d=o[a];o[a]=r[a],o[l]=d,a++}}})),e.body.emitter.emit("groupDragged",{groupId:i}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}},{key:"_onSelectItem",value:function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)this._onMultiSelectItem(t);else{var n=this.getSelection(),o=this.itemFromTarget(t),r=o&&o.selectable?[o.id]:[];this.setSelection(r);var s=this.getSelection();(s.length>0||n.length>0)&&this.body.emitter.emit("select",{items:s,event:t})}}}},{key:"_onMouseOver",value:function(t){var e=this.itemFromTarget(t);if(e&&e!==this.itemFromRelatedTarget(t)){var i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new Qu(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);var n=this.body.dom.centerContainer,o=n.getBoundingClientRect();this.popup.setPosition(t.clientX-o.left+n.offsetLeft,t.clientY-o.top+n.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}}},{key:"_onMouseOut",value:function(t){var e=this.itemFromTarget(t);e&&(e!==this.itemFromRelatedTarget(t)&&(this.clearPopupTimer(),null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t})))}},{key:"_onMouseMove",value:function(t){if(this.itemFromTarget(t)&&(null!=this.popupTimer&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){var e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.clientX-i.left+e.offsetLeft,t.clientY-i.top+e.offsetTop),this.popup.show()}}},{key:"_onMouseWheel",value:function(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)}},{key:"_onUpdateItem",value:function(t){if(this.options.selectable&&(this.options.editable.updateTime||this.options.editable.updateGroup)){var e=this;if(t){var i=e.itemsData.get(t.id);this.options.onUpdate(i,(function(t){t&&e.itemsData.update(t)}))}}}},{key:"_onDropObjectOnItem",value:function(t){var e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)}},{key:"_onAddItem",value:function(t){if(this.options.selectable&&this.options.editable.add){var e,i,n=this,o=this.options.snap||null,r=this.dom.frame.getBoundingClientRect(),s=this.options.rtl?r.right-t.center.x:t.center.x-r.left,a=this.body.util.toTime(s),l=this.body.util.getScale(),h=this.body.util.getStep();"drop"==t.type?((i=JSON.parse(t.dataTransfer.getData("text"))).content=i.content?i.content:"new item",i.start=i.start?i.start:o?o(a,l,h):a,i.type=i.type||"box",i[this.itemsData.idProp]=i.id||Du(),"range"!=i.type||i.end||(e=this.body.util.toTime(s+this.props.width/5),i.end=o?o(e,l,h):e)):((i={start:o?o(a,l,h):a,content:"new item"})[this.itemsData.idProp]=Du(),"range"===this.options.type&&(e=this.body.util.toTime(s+this.props.width/5),i.end=o?o(e,l,h):e));var u=this.groupFromTarget(t);u&&(i.group=u.groupId),i=this._cloneItemData(i),this.options.onAdd(i,(function(e){e&&(n.itemsData.add(e),"drop"==t.type&&n.setSelection([e.id]))}))}}},{key:"_onMultiSelectItem",value:function(t){var i=this;if(this.options.selectable){var n=this.itemFromTarget(t);if(n){var o=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||!1||this.options.sequentialSelection)&&this.options.multiselect){var r=this.itemsData.get(n.id).group,s=void 0;this.options.multiselectPerGroup&&o.length>0&&(s=this.itemsData.get(o[0]).group),this.options.multiselectPerGroup&&null!=s&&s!=r||o.push(n.id);var a=e._getItemRange(this.itemsData.get(o));if(!this.options.multiselectPerGroup||s==r)for(var l in o=[],this.items)if(this.items.hasOwnProperty(l)){var h=this.items[l],u=h.data.start,d=void 0!==h.data.end?h.data.end:u;!(u>=a.min&&d<=a.max)||this.options.multiselectPerGroup&&s!=this.itemsData.get(h.id).group||h instanceof Ju||o.push(h.id)}}else{var c=Io(o).call(o,n.id);-1==c?o.push(n.id):qs(o).call(o,c,1)}var p=Gn(o).call(o,(function(t){return i.getItemById(t).selectable}));this.setSelection(p),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}}},{key:"itemFromElement",value:function(t){for(var e=t;e;){if(e.hasOwnProperty("vis-item"))return e["vis-item"];e=e.parentNode}return null}},{key:"itemFromTarget",value:function(t){return this.itemFromElement(t.target)}},{key:"itemFromRelatedTarget",value:function(t){return this.itemFromElement(t.relatedTarget)}},{key:"groupFromTarget",value:function(t){var e=t.center?t.center.y:t.clientY,i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(var n=0;n<i.length;n++){var o=i[n],r=this.groups[o],s=r.dom.foreground,a=s.getBoundingClientRect();if(e>=a.top&&e<a.top+s.offsetHeight)return r;if("top"===this.options.orientation.item){if(n===this.groupIds.length-1&&e>a.top)return r}else if(0===n&&e<a.top+s.offset)return r}return null}},{key:"_cloneItemData",value:function(t,e){var i=Ba.extend({},t);return e||(e=this.itemsData.type),null!=i.start&&(i.start=Ba.convert(i.start,e&&e.start||"Date")),null!=i.end&&(i.end=Ba.convert(i.end,e&&e.end||"Date")),i}},{key:"_clusterItems",value:function(){if(this.options.cluster){var t=this.body.range.conversion(this.body.domProps.center.width).scale,e=this.clusterGenerator.getClusters(this.clusters,t,this.options.cluster);if(this.clusters!=e){if(this._detachAllClusters(),e){var i=!0,n=!1,o=void 0;try{for(var r,s=Ii(e);!(i=(r=s.next()).done);i=!0){r.value.attach()}}catch(t){n=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(n)throw o}}this.clusters=e}this._updateClusters(e)}}}},{key:"_detachAllClusters",value:function(){if(this.options.cluster&&this.clusters&&this.clusters.length){var t=!0,e=!1,i=void 0;try{for(var n,o=Ii(this.clusters);!(t=(n=o.next()).done);t=!0){n.value.detach()}}catch(t){e=!0,i=t}finally{try{t||null==o.return||o.return()}finally{if(e)throw i}}}}},{key:"_updateClusters",value:function(t){if(this.clusters&&this.clusters.length){var e,i=new js(Tn(t).call(t,(function(t){return t.id}))),n=Gn(e=this.clusters).call(e,(function(t){return!i.has(t.id)})),o=!1,r=!0,s=!1,a=void 0;try{for(var l,h=Ii(n);!(r=(l=h.next()).done);r=!0){var u,d,c=l.value,p=Io(u=this.selection).call(u,c.id);if(-1!==p)c.unselect(),qs(d=this.selection).call(d,p,1),o=!0}}catch(t){s=!0,a=t}finally{try{r||null==h.return||h.return()}finally{if(s)throw a}}if(o){var m=this.getSelection();this.body.emitter.emit("select",{items:m,event:event})}}this.clusters=t||[]}}],[{key:"_getItemRange",value:function(t){var e=null,i=null;return mn(t).call(t,(function(t){(null==i||t.start<i)&&(i=t.start),null!=t.end?(null==e||t.end>e)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)})),{min:i,max:e}}},{key:"itemSetFromTarget",value:function(t){for(var e=t.target;e;){if(e.hasOwnProperty("vis-itemset"))return e["vis-itemset"];e=e.parentNode}return null}}]),e}(Ka);ud.types={background:Ju,box:Zu,range:$u,point:Ku},ud.prototype._onAdd=ud.prototype._onUpdate;var dd,cd=!1,pd="background: #FFeeee; color: #dd0000",md=function(){function t(){ya(this,t)}return _a(t,null,[{key:"validate",value:function(e,i,n){cd=!1,dd=i;var o=i;return void 0!==n&&(o=i[n]),t.parse(e,o,[]),cd}},{key:"parse",value:function(e,i,n){for(var o in e)e.hasOwnProperty(o)&&t.check(o,e,i,n)}},{key:"check",value:function(e,i,n,o){if(void 0!==n[e]||void 0!==n.__any__){var r=e,s=!0;void 0===n[e]&&void 0!==n.__any__&&(r="__any__",s="object"===t.getType(i[e]));var a=n[r];s&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,n,r,a,o)}else t.getSuggestion(e,n,o)}},{key:"checkFields",value:function(e,i,n,o,r,s){var a=function(i){console.log("%c"+i+t.printLocation(s,e),pd)},l=t.getType(i[e]),h=r[l];void 0!==h?"array"===t.getType(h)&&-1===Io(h).call(h,i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(h)+' not "'+i[e]+'". '),cd=!0):"object"===l&&"__any__"!==o&&(s=Ba.copyAndExtendArray(s,e),t.parse(i[e],n[o],s)):void 0===r.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print(zi(r))+". Received ["+l+'] "'+i[e]+'"'),cd=!0)}},{key:"getType",value:function(t){var e=Bo(t);return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Ao(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}},{key:"getSuggestion",value:function(e,i,n){var o,r=t.findInOptions(e,i,n,!1),s=t.findInOptions(e,dd,[],!0);o=void 0!==r.indexMatch?" in "+t.printLocation(r.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+r.indexMatch+'"?\n\n':s.distance<=4&&r.distance>s.distance?" in "+t.printLocation(r.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):r.distance<=8?'. Did you mean "'+r.closestMatch+'"?'+t.printLocation(r.path,e):". Did you mean one of these: "+t.print(zi(i))+t.printLocation(n,e),console.log('%cUnknown option detected: "'+e+'"'+o,pd),cd=!0}},{key:"findInOptions",value:function(e,i,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=1e9,s="",a=[],l=e.toLowerCase(),h=void 0;for(var u in i){var d=void 0;if(void 0!==i[u].__type__&&!0===o){var c=t.findInOptions(e,i[u],Ba.copyAndExtendArray(n,u));r>c.distance&&(s=c.closestMatch,a=c.path,r=c.distance,h=c.indexMatch)}else{var p;-1!==Io(p=u.toLowerCase()).call(p,l)&&(h=u),r>(d=t.levenshteinDistance(e,u))&&(s=u,a=Ba.copyArray(n),r=d)}}return{closestMatch:s,path:a,distance:r,indexMatch:h}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",n="\n\n"+i+"options = {\n",o=0;o<t.length;o++){for(var r=0;r<o+1;r++)n+=" ";n+=t[o]+": {\n"}for(var s=0;s<t.length+1;s++)n+=" ";n+=e+"\n";for(var a=0;a<t.length+1;a++){for(var l=0;l<t.length-a;l++)n+=" ";n+="}\n"}return n+"\n\n"}},{key:"print",value:function(t){return Ur(t).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}},{key:"levenshteinDistance",value:function(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;var i,n,o=[];for(i=0;i<=e.length;i++)o[i]=[i];for(n=0;n<=t.length;n++)o[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)==t.charAt(n-1)?o[i][n]=o[i-1][n-1]:o[i][n]=Math.min(o[i-1][n-1]+1,Math.min(o[i][n-1]+1,o[i-1][n]+1));return o[e.length][t.length]}}]),t}(),fd="string",vd="boolean",gd="number",yd="object",bd={configure:{enabled:{boolean:vd},filter:{boolean:vd,function:"function"},container:{dom:"dom"},__type__:{object:yd,boolean:vd,function:"function"}},align:{string:fd},alignCurrentTime:{string:fd,undefined:"undefined"},rtl:{boolean:vd,undefined:"undefined"},rollingMode:{follow:{boolean:vd},offset:{number:gd,undefined:"undefined"},__type__:{object:yd}},onTimeout:{timeoutMs:{number:gd},callback:{function:"function"},__type__:{object:yd}},verticalScroll:{boolean:vd,undefined:"undefined"},horizontalScroll:{boolean:vd,undefined:"undefined"},autoResize:{boolean:vd},throttleRedraw:{number:gd},clickToUse:{boolean:vd},dataAttributes:{string:fd,array:"array"},editable:{add:{boolean:vd,undefined:"undefined"},remove:{boolean:vd,undefined:"undefined"},updateGroup:{boolean:vd,undefined:"undefined"},updateTime:{boolean:vd,undefined:"undefined"},overrideItems:{boolean:vd,undefined:"undefined"},__type__:{boolean:vd,object:yd}},end:{number:gd,date:"date",string:fd,moment:"moment"},format:{minorLabels:{millisecond:{string:fd,undefined:"undefined"},second:{string:fd,undefined:"undefined"},minute:{string:fd,undefined:"undefined"},hour:{string:fd,undefined:"undefined"},weekday:{string:fd,undefined:"undefined"},day:{string:fd,undefined:"undefined"},week:{string:fd,undefined:"undefined"},month:{string:fd,undefined:"undefined"},year:{string:fd,undefined:"undefined"},__type__:{object:yd,function:"function"}},majorLabels:{millisecond:{string:fd,undefined:"undefined"},second:{string:fd,undefined:"undefined"},minute:{string:fd,undefined:"undefined"},hour:{string:fd,undefined:"undefined"},weekday:{string:fd,undefined:"undefined"},day:{string:fd,undefined:"undefined"},week:{string:fd,undefined:"undefined"},month:{string:fd,undefined:"undefined"},year:{string:fd,undefined:"undefined"},__type__:{object:yd,function:"function"}},__type__:{object:yd}},moment:{function:"function"},groupHeightMode:{string:fd},groupOrder:{string:fd,function:"function"},groupEditable:{add:{boolean:vd,undefined:"undefined"},remove:{boolean:vd,undefined:"undefined"},order:{boolean:vd,undefined:"undefined"},__type__:{boolean:vd,object:yd}},groupOrderSwap:{function:"function"},height:{string:fd,number:gd},hiddenDates:{start:{date:"date",number:gd,string:fd,moment:"moment"},end:{date:"date",number:gd,string:fd,moment:"moment"},repeat:{string:fd},__type__:{object:yd,array:"array"}},itemsAlwaysDraggable:{item:{boolean:vd,undefined:"undefined"},range:{boolean:vd,undefined:"undefined"},__type__:{boolean:vd,object:yd}},limitSize:{boolean:vd},locale:{string:fd},locales:{__any__:{any:"any"},__type__:{object:yd}},longSelectPressTime:{number:gd},margin:{axis:{number:gd},item:{horizontal:{number:gd,undefined:"undefined"},vertical:{number:gd,undefined:"undefined"},__type__:{object:yd,number:gd}},__type__:{object:yd,number:gd}},max:{date:"date",number:gd,string:fd,moment:"moment"},maxHeight:{number:gd,string:fd},maxMinorChars:{number:gd},min:{date:"date",number:gd,string:fd,moment:"moment"},minHeight:{number:gd,string:fd},moveable:{boolean:vd},multiselect:{boolean:vd},multiselectPerGroup:{boolean:vd},onAdd:{function:"function"},onDropObjectOnItem:{function:"function"},onUpdate:{function:"function"},onMove:{function:"function"},onMoving:{function:"function"},onRemove:{function:"function"},onAddGroup:{function:"function"},onMoveGroup:{function:"function"},onRemoveGroup:{function:"function"},onInitialDrawComplete:{function:"function"},order:{function:"function"},orientation:{axis:{string:fd,undefined:"undefined"},item:{string:fd,undefined:"undefined"},__type__:{string:fd,object:yd}},selectable:{boolean:vd},sequentialSelection:{boolean:vd},showCurrentTime:{boolean:vd},showMajorLabels:{boolean:vd},showMinorLabels:{boolean:vd},showWeekScale:{boolean:vd},stack:{boolean:vd},stackSubgroups:{boolean:vd},cluster:{maxItems:{number:gd,undefined:"undefined"},titleTemplate:{string:fd,undefined:"undefined"},clusterCriteria:{function:"function",undefined:"undefined"},showStipes:{boolean:vd,undefined:"undefined"},fitOnDoubleClick:{boolean:vd,undefined:"undefined"},__type__:{boolean:vd,object:yd}},snap:{function:"function",null:"null"},start:{date:"date",number:gd,string:fd,moment:"moment"},template:{function:"function"},loadingScreenTemplate:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:fd,function:"function"},showTooltips:{boolean:vd},tooltip:{followMouse:{boolean:vd},overflowMethod:{string:["cap","flip","none"]},delay:{number:gd},template:{function:"function"},__type__:{object:yd}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:vd,object:yd}},timeAxis:{scale:{string:fd,undefined:"undefined"},step:{number:gd,undefined:"undefined"},__type__:{object:yd}},type:{string:fd},width:{string:fd,number:gd},preferZoom:{boolean:vd},zoomable:{boolean:vd},zoomKey:{string:["ctrlKey","altKey","shiftKey","metaKey",""]},zoomFriction:{number:gd},zoomMax:{number:gd},zoomMin:{number:gd},__type__:{object:yd}},_d={global:{align:["center","left","right"],alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}},groupHeightMode:["auto","fixed","fitItems"],groupsDraggable:!1,height:"",locale:"",longSelectPressTime:251,margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},preferZoom:!1,selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,cluster:!1,start:"",showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:[500,0,99999,100]},tooltipOnItemUpdateTime:!1,type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","shiftKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1]}};U({target:"Array",proto:!0},{fill:function(t){for(var e=Tt(this),i=Q(e.length),n=arguments.length,o=it(n>1?arguments[1]:void 0,i),r=n>2?arguments[2]:void 0,s=void 0===r?i:it(r,i);s>o;)e[o++]=t;return e}});var wd=Zi("Array").fill,kd=Array.prototype,xd=function(t){var e=t.fill;return t===kd||t instanceof Array&&e===kd.fill?wd:e},Dd={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},Sd=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;ya(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return _a(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){if("string"==typeof t)return Dd[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i,n=this._isColorString(t);if(void 0!==n&&(t=n),!0===Ba.isString(t)){if(!0===Ba.isValidRGB(t)){var o=t.substr(4).substr(0,t.length-5).split(",");i={r:o[0],g:o[1],b:o[2],a:1}}else if(!0===Ba.isValidRGBA(t)){var r=t.substr(5).substr(0,t.length-6).split(",");i={r:r[0],g:r[1],b:r[2],a:r[3]}}else if(!0===Ba.isValidHex(t)){var s=Ba.hexToRGB(t);i={r:s.r,g:s.g,b:s.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var a=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:a}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+Ur(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!0===e&&(this.previousColor=Ba.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Js((function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)}),0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!0===e&&(this.initialColor=Ba.extend({},t)),this.color=t;var i=Ba.RGBToHSV(t.r,t.g,t.b),n=2*Math.PI,o=this.r*i.s,r=this.centerCoordinates.x+o*Math.sin(n*i.h),s=this.centerCoordinates.y+o*Math.cos(n*i.h);this.colorPickerSelector.style.left=r-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=Ba.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=Ba.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=Ba.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),xd(i).call(i),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var t,e,i,n;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var o=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var r=document.createElement("DIV");r.style.color="red",r.style.fontWeight="bold",r.style.padding="10px",r.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(r)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var s=this;this.opacityRange.onchange=function(){s._setOpacity(this.value)},this.opacityRange.oninput=function(){s._setOpacity(this.value)},this.brightnessRange.onchange=function(){s._setBrightness(this.value)},this.brightnessRange.oninput=function(){s._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=ga(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=ga(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=ga(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=ga(n=this._loadLast).call(n,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new Uh(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),Xh(this.hammer,(function(e){t._moveSelector(e)})),this.hammer.on("tap",(function(e){t._moveSelector(e)})),this.hammer.on("panstart",(function(e){t._moveSelector(e)})),this.hammer.on("panmove",(function(e){t._moveSelector(e)})),this.hammer.on("panend",(function(e){t._moveSelector(e)}))}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e,i,n,o,r=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,r,s),this.centerCoordinates={x:.5*r,y:.5*s},this.r=.49*r;var a,l=2*Math.PI/360,h=1/this.r;for(n=0;n<360;n++)for(o=0;o<this.r;o++)e=this.centerCoordinates.x+o*Math.sin(l*n),i=this.centerCoordinates.y+o*Math.cos(l*n),a=Ba.HSVToRGB(n*(1/360),o*h,1),t.fillStyle="rgb("+a.r+","+a.g+","+a.b+")",t.fillRect(e-.5,i-.5,2,2);t.strokeStyle="rgba(0,0,0,1)",t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),t.stroke(),this.hueCircle=t.getImageData(0,0,r,s)}this.generated=!0}},{key:"_moveSelector",value:function(t){var e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,n=t.center.y-e.top,o=.5*this.colorPickerDiv.clientHeight,r=.5*this.colorPickerDiv.clientWidth,s=i-r,a=n-o,l=Math.atan2(s,a),h=.98*Math.min(Math.sqrt(s*s+a*a),r),u=Math.cos(l)*h+o,d=Math.sin(l)*h+r;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+"px";var c=l/(2*Math.PI);c=c<0?c+1:c;var p=h/this.r,m=Ba.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=c,m.s=p;var f=Ba.HSVToRGB(m.h,m.s,m.v);f.a=this.color.a,this.color=f,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),t}(),Md=function(){function t(e,i,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;ya(this,t),this.parent=e,this.changedOptions=[],this.container=i,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Ba.extend(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Sd(o),this.wrapper=void 0}return _a(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;if("string"==typeof t)this.options.filter=t;else if(t instanceof Array)this.options.filter=t.join();else if("object"===Bo(t)){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==Gn(t)&&(this.options.filter=Gn(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===Gn(this.options)&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var t=Gn(this.options),e=0,i=!1;for(var n in this.configureOptions)this.configureOptions.hasOwnProperty(n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?i=(i=t(n,[]))||this._handleObject(this.configureOptions[n],[n],!0):!0!==t&&-1===Io(t).call(t,n)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(t){for(var e=this.moduleOptions,i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}},{key:"_makeItem",value:function(t){if(!0===this.allowCreation){var e=document.createElement("div");e.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return mn(n).call(n,(function(t){e.appendChild(t)})),this.domElements.push(e),this.domElements.length}return 0}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=t,this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");return n.className="vis-configuration vis-config-label vis-config-s"+e.length,n.innerHTML=!0===i?"<i><b>"+t+":</b></i>":t+":",n}},{key:"_makeDropdown",value:function(t,e,i){var n=document.createElement("select");n.className="vis-configuration vis-config-select";var o=0;void 0!==e&&-1!==Io(t).call(t,e)&&(o=Io(t).call(t,e));for(var r=0;r<t.length;r++){var s=document.createElement("option");s.value=t[r],r===o&&(s.selected="selected"),s.innerHTML=t[r],n.appendChild(s)}var a=this;n.onchange=function(){a._update(this.value,i)};var l=this._makeLabel(i[i.length-1],i);this._makeItem(i,l,n)}},{key:"_makeRange",value:function(t,e,i){var n=t[0],o=t[1],r=t[2],s=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=r}catch(t){}a.step=s;var l="",h=0;if(void 0!==e){e<0&&1.2*e<o?(a.min=Math.ceil(1.2*e),h=a.min,l="range increased"):e/1.2<o&&(a.min=Math.ceil(e/1.2),h=a.min,l="range increased"),1.2*e>r&&1!==r&&(a.max=Math.ceil(1.2*e),h=a.max,l="range increased"),a.value=e}else a.value=n;var u=document.createElement("input");u.className="vis-configuration vis-config-rangeinput",u.value=Number(a.value);var d=this;a.onchange=function(){u.value=this.value,d._update(Number(this.value),i)},a.oninput=function(){u.value=this.value};var c=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,c,a,u);""!==l&&this.popupHistory[p]!==h&&(this.popupHistory[p]=h,this._setupPopup(l,p))}},{key:"_makeButton",value:function(){var t=this;if(!0===this.options.showButton){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerHTML="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}},{key:"_setupPopup",value:function(t,e){var i=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){var n=document.createElement("div");n.id="vis-configuration-popup",n.className="vis-configuration-popup",n.innerHTML=t,n.onclick=function(){i._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:e}}}},{key:"_removePopup",value:function(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var t=this;if(void 0!==this.popupDiv.html){var e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+"px",this.popupDiv.html.style.top=e.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Js((function(){t.popupDiv.html.style.opacity=0}),1500),this.popupDiv.deleteTimeout=Js((function(){t._removePopup()}),1800)}}},{key:"_makeCheckbox",value:function(t,e,i){var n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=t,void 0!==e&&(n.checked=e,e!==t&&("object"===Bo(t)?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));var o=this;n.onchange=function(){o._update(this.checked,i)};var r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}},{key:"_makeTextInput",value:function(t,e,i){var n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=e,e!==t&&this.changedOptions.push({path:i,value:e});var o=this;n.onchange=function(){o._update(this.value,i)};var r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}},{key:"_makeColorField",value:function(t,e,i){var n=this,o=t[1],r=document.createElement("div");"none"!==(e=void 0===e?o:e)?(r.className="vis-configuration vis-config-colorBlock",r.style.backgroundColor=e):r.className="vis-configuration vis-config-colorBlock none",e=void 0===e?o:e,r.onclick=function(){n._showColorPicker(e,r,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,r)}},{key:"_showColorPicker",value:function(t,e,i){var n=this;e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback((function(t){var o="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=o,n._update(o,i)})),this.colorPicker.setCloseCallback((function(){e.onclick=function(){n._showColorPicker(t,e,i)}}))}},{key:"_handleObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=Gn(this.options),r=!1;for(var s in t)if(t.hasOwnProperty(s)){n=!0;var a=t[s],l=Ba.copyAndExtendArray(e,s);if("function"==typeof o&&!1===(n=o(s,e))&&!(a instanceof Array)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i),!1!==n){r=!0;var h=this._getValue(l);if(a instanceof Array)this._handleArray(a,h,l);else if("string"==typeof a)this._makeTextInput(a,h,l);else if("boolean"==typeof a)this._makeCheckbox(a,h,l);else if(a instanceof Object){var u=!0;if(-1!==Io(e).call(e,"physics")&&this.moduleOptions.physics.solver!==s&&(u=!1),!0===u)if(void 0!==a.enabled){var d=Ba.copyAndExtendArray(l,"enabled"),c=this._getValue(d);if(!0===c){var p=this._makeLabel(s,l,!0);this._makeItem(l,p),r=this._handleObject(a,l)||r}else this._makeCheckbox(a,c,l)}else{var m=this._makeLabel(s,l,!0);this._makeItem(l,m),r=this._handleObject(a,l)||r}}else console.error("dont know how to handle",a,s,l)}}return r}},{key:"_handleArray",value:function(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i;t="false"!==(t="true"===t||t)&&t;for(var o=0;o<e.length;o++)"global"!==e[o]&&(void 0===n[e[o]]&&(n[e[o]]={}),o!==e.length-1?n=n[e[o]]:n[e[o]]=t);return i}},{key:"_printOptions",value:function(){var t=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+Ur(t,null,2)+"</pre>"}},{key:"getOptions",value:function(){for(var t={},e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}]),t}(),Td=function(t){function e(t,i,n,o){var r,s,a,l,h,u,d,c;if(ya(this,e),(c=as(this,us(e).call(this))).initTime=new Date,c.itemsDone=!1,!(Nr(c)instanceof e))throw new SyntaxError("Constructor must be called with the new operator");if(!(Ao(n)||n instanceof ja||n instanceof Fa)&&n instanceof Object){var p=o;o=n,n=p}o&&o.throttleRedraw&&console.warn('Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var m=Nr(c);if(c.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:"bottom",item:"bottom"},moment:Ha},c.options=Ba.deepExtend({},c.defaultOptions),c._create(t),!o||o&&void 0===o.rtl){var f;c.dom.root.style.visibility="hidden";for(var v=c.dom.root;!f&&v;)f=window.getComputedStyle(v,null).direction,v=v.parentElement;c.options.rtl=f&&"rtl"==f.toLowerCase()}else c.options.rtl=o.rtl;o&&(o.rollingMode&&(c.options.rollingMode=o.rollingMode),o.onInitialDrawComplete&&(c.options.onInitialDrawComplete=o.onInitialDrawComplete),o.onTimeout&&(c.options.onTimeout=o.onTimeout),o.loadingScreenTemplate&&(c.options.loadingScreenTemplate=o.loadingScreenTemplate));var g=document.createElement("div");if(c.options.loadingScreenTemplate){var y,b=ga(y=c.options.loadingScreenTemplate).call(y,Nr(c)),_=b(c.dom.loadingScreen);_ instanceof Object&&!(_ instanceof Element)?b(g):_ instanceof Element?(g.innerHTML="",g.appendChild(_)):null!=_&&(g.innerHTML=_)}return c.dom.loadingScreen.appendChild(g),c.components=[],c.body={dom:c.dom,domProps:c.props,emitter:{on:ga(r=c.on).call(r,Nr(c)),off:ga(s=c.off).call(s,Nr(c)),emit:ga(a=c.emit).call(a,Nr(c))},hiddenDates:[],util:{getScale:function(){return m.timeAxis.step.scale},getStep:function(){return m.timeAxis.step.step},toScreen:ga(l=m._toScreen).call(l,m),toGlobalScreen:ga(h=m._toGlobalScreen).call(h,m),toTime:ga(u=m._toTime).call(u,m),toGlobalTime:ga(d=m._toGlobalTime).call(d,m)}},c.range=new ml(c.body,c.options),c.components.push(c.range),c.body.range=c.range,c.timeAxis=new Zh(c.body,c.options),c.timeAxis2=null,c.components.push(c.timeAxis),c.currentTime=new cu(c.body,c.options),c.components.push(c.currentTime),c.itemSet=new ud(c.body,c.options),c.components.push(c.itemSet),c.itemsData=null,c.groupsData=null,c.dom.root.onclick=function(t){m.emit("click",m.getEventProperties(t))},c.dom.root.ondblclick=function(t){m.emit("doubleClick",m.getEventProperties(t))},c.dom.root.oncontextmenu=function(t){m.emit("contextmenu",m.getEventProperties(t))},c.dom.root.onmouseover=function(t){m.emit("mouseOver",m.getEventProperties(t))},window.PointerEvent?(c.dom.root.onpointerdown=function(t){m.emit("mouseDown",m.getEventProperties(t))},c.dom.root.onpointermove=function(t){m.emit("mouseMove",m.getEventProperties(t))},c.dom.root.onpointerup=function(t){m.emit("mouseUp",m.getEventProperties(t))}):(c.dom.root.onmousemove=function(t){m.emit("mouseMove",m.getEventProperties(t))},c.dom.root.onmousedown=function(t){m.emit("mouseDown",m.getEventProperties(t))},c.dom.root.onmouseup=function(t){m.emit("mouseUp",m.getEventProperties(t))}),c.initialFitDone=!1,c.on("changed",(function(){if(null!=m.itemsData){if(!m.initialFitDone&&!m.options.rollingMode)if(m.initialFitDone=!0,null!=m.options.start||null!=m.options.end){if(null==m.options.start||null==m.options.end)var t=m.getItemRange();var e=null!=m.options.start?m.options.start:t.min,i=null!=m.options.end?m.options.end:t.max;m.setWindow(e,i,{animation:!1})}else m.fit({animation:!1});m.initialDrawDone||!m.initialRangeChangeDone&&(m.options.start||m.options.end)&&!m.options.rollingMode||(m.initialDrawDone=!0,m.itemSet.initialDrawDone=!0,m.dom.root.style.visibility="visible",m.dom.loadingScreen.parentNode.removeChild(m.dom.loadingScreen),m.options.onInitialDrawComplete&&Js((function(){return m.options.onInitialDrawComplete()}),0))}})),c.on("destroyTimeline",(function(){m.destroy()})),o&&c.setOptions(o),c.body.emitter.on("fit",(function(t){c._onFit(t),c.redraw()})),n&&c.setGroups(n),i&&c.setItems(i),c._redraw(),c}return ps(e,t),_a(e,[{key:"_createConfigurator",value:function(){return new Md(this,this.dom.container,_d)}},{key:"redraw",value:function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}},{key:"setOptions",value:function(t){if(!0===md.validate(t,bd)&&console.log("%cErrors have been found in the supplied options object.",pd),du.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var e=this.itemsData;if(e){var i=this.getSelection();this.setItems(null),this.setItems(e.rawDS),this.setSelection(i)}}}},{key:"setItems",value:function(t){var e;this.itemsDone=!1,e=t?Va(t instanceof ja||t instanceof Fa?t:new ja(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.itemSet&&this.itemSet.setItems(null!=e?e.rawDS:null)}},{key:"setGroups",value:function(t){var e;if(t){var i=function(t){return!1!==t.visible};e=t instanceof ja||t instanceof Fa?new Fa(t,{filter:i}):new ja(Gn(t).call(t,i))}else e=null;this.groupsData instanceof Fa&&this.groupsData.setData(null),this.groupsData=e,this.itemSet.setGroups(e)}},{key:"setData",value:function(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)}},{key:"setSelection",value:function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)}},{key:"getSelection",value:function(){return this.itemSet&&this.itemSet.getSelection()||[]}},{key:"focus",value:function(t,e){if(this.itemsData&&null!=t){var i=Ao(t)?t:[t],n=this.itemsData.get(i),o=null,r=null;if(mn(n).call(n,(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===o||e<o)&&(o=e),(null===r||i>r)&&(r=i)})),null!==o&&null!==r){var s=this,a=this.itemSet.items[i[0]],l=-1*this._getScrollTop(),h=null,u=function(){var t=Ed(s,a);t.shouldScroll&&t.itemTop!=h.itemTop&&(s._setScrollTop(-t.scrollOffset),s._redraw())},d=!e||void 0===e.zoom||e.zoom,c=(o+r)/2,p=d?1.1*(r-o):Math.max(this.range.end-this.range.start,1.1*(r-o)),m=!e||void 0===e.animation||e.animation;m||(h={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.setRange(c-p/2,c+p/2,{animation:m},(function(){u(),Js(u,100)}),(function(t,e,i){var n=Ed(s,a);if(!1!==n&&(h||(h=n),h.itemTop!=n.itemTop||h.shouldScroll)){h.itemTop!=n.itemTop&&n.shouldScroll&&(h=n,l=-1*s._getScrollTop());var o=l,r=h.scrollOffset,u=i?r:o+(r-o)*t;s._setScrollTop(-u),e||s._redraw()}}))}}}},{key:"fit",value:function(t,e){var i,n=!t||void 0===t.animation||t.animation;1===this.itemsData.length&&void 0===this.itemsData.get()[0].end?(i=this.getDataRange(),this.moveTo(i.min.valueOf(),{animation:n},e)):(i=this.getItemRange(),this.range.setRange(i.min,i.max,{animation:n},e))}},{key:"getItemRange",value:function(){var t=this,e=this.getDataRange(),i=null!==e.min?e.min.valueOf():null,n=null!==e.max?e.max.valueOf():null,o=null,r=null;if(null!=i&&null!=n){var s=n-i;s<=0&&(s=10);var a=s/this.props.center.width,l={},h=0;if(mn(Ba).call(Ba,this.itemSet.items,(function(t,e){if(t.groupShowing){l[e]=t.redraw(!0),h=l[e].length}})),h>0)for(var u=function(t){mn(Ba).call(Ba,l,(function(e){e[t]()}))},d=0;d<h;d++)u(d);if(mn(Ba).call(Ba,this.itemSet.items,(function(e){var s,l,h=Cd(e),u=Od(e);t.options.rtl?(s=h-(e.getWidthRight()+10)*a,l=u+(e.getWidthLeft()+10)*a):(s=h-(e.getWidthLeft()+10)*a,l=u+(e.getWidthRight()+10)*a),s<i&&(i=s,o=e),l>n&&(n=l,r=e)})),o&&r){var c=o.getWidthLeft()+10,p=r.getWidthRight()+10,m=this.props.center.width-c-p;m>0&&(this.options.rtl?(i=Cd(o)-p*s/m,n=Od(r)+c*s/m):(i=Cd(o)-c*s/m,n=Od(r)+p*s/m))}}return{min:null!=i?new Date(i):null,max:null!=n?new Date(n):null}}},{key:"getDataRange",value:function(){var t,e=null,i=null;this.itemsData&&mn(t=this.itemsData).call(t,(function(t){var n=Ba.convert(t.start,"Date").valueOf(),o=Ba.convert(null!=t.end?t.end:t.start,"Date").valueOf();(null===e||n<e)&&(e=n),(null===i||o>i)&&(i=o)}));return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}}},{key:"getEventProperties",value:function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=this.dom.centerContainer.getBoundingClientRect(),o=this.options.rtl?n.right-e:e-n.left,r=i-n.top,s=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),l=uu.customTimeFromTarget(t),h=this.itemSet.options.snap||null,u=this.body.util.getScale(),d=this.body.util.getStep(),c=this._toTime(o),p=h?h(c,u,d):c,m=Ba.getTarget(t),f=null;return null!=s?f="item":null!=l?f="custom-time":Ba.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&Ba.hasParent(m,this.timeAxis2.dom.foreground)?f="axis":Ba.hasParent(m,this.itemSet.dom.labelSet)?f="group-label":Ba.hasParent(m,this.currentTime.bar)?f="current-time":Ba.hasParent(m,this.dom.center)&&(f="background"),{event:t,item:s?s.id:null,isCluster:!!s&&!!s.isCluster,items:s?s.items||[]:null,group:a?a.groupId:null,customTime:l?l.options.id:null,what:f,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:r,time:c,snappedTime:p}}},{key:"toggleRollingMode",value:function(){this.range.rolling?this.range.stopRolling():(null==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())}},{key:"_redraw",value:function(){du.prototype._redraw.call(this)}},{key:"_onFit",value:function(t){var e=t.start,i=t.end,n=t.animation;i?this.range.setRange(e,i,{animation:n}):this.moveTo(e.valueOf(),{animation:n})}}]),e}(du);function Cd(t){return Ba.convert(t.data.start,"Date").valueOf()}function Od(t){var e=null!=t.data.end?t.data.end:t.data.start;return Ba.convert(e,"Date").valueOf()}function Ed(t,e){if(!e.parent)return!1;var i=t.options.rtl?t.props.rightContainer.height:t.props.leftContainer.height,n=t.props.center.height,o=e.parent,r=o.top,s=!0,a=t.timeAxis.options.orientation.axis,l=function(){return"bottom"==a?o.height-e.top-e.height:e.top},h=-1*t._getScrollTop(),u=r+l(),d=e.height;return u<h?r+i<=r+l()+d&&(r+=l()-t.itemSet.options.margin.item.vertical):u+d>h+i?r+=l()+d-i+t.itemSet.options.margin.item.vertical:s=!1,{shouldScroll:s,scrollOffset:r=Math.min(r,n-i),itemTop:u}}var Pd=function(){function t(e,i,n,o,r,s){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(ya(this,t),this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=r,this.majorCharHeight=s,this._start=e,this._end=i,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=a,this.autoScaleStart=n,this.autoScaleEnd=o,this.formattingFunction=l,n||o){var h=this,u=function(t){var e=t-t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx]);return t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx])>h.magnitudefactor*h.minorSteps[h.minorStepIdx]*.5?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};n&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=u(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=u(this._end)),this.determineScale()}}return _a(t,[{key:"setCharHeight",value:function(t){this.majorCharHeight=t}},{key:"setHeight",value:function(t){this.containerHeight=t}},{key:"determineScale",value:function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var n=0;i<0&&(n=i);for(var o=!1,r=n;Math.abs(r)<=Math.abs(i);r++){this.magnitudefactor=Math.pow(10,r);for(var s=0;s<this.minorSteps.length;s++){if(this.magnitudefactor*this.minorSteps[s]>=e){o=!0,this.minorStepIdx=s;break}}if(!0===o)break}}},{key:"is_major",value:function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])==0}},{key:"getStep",value:function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}},{key:"getFirstMajor",value:function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)}},{key:"formatValue",value:function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?"".concat(e):"string"==typeof e?e:t.toPrecision(5)}},{key:"getLines",value:function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,n=this._start+i;this._end-n>1e-5;n+=e)n!=this._start&&t.push({major:this.is_major(n),y:this.convertValue(n),val:this.formatValue(n)});return t}},{key:"followScale",value:function(t){var e=this.minorStepIdx,i=this._start,n=this._end,o=this,r=function(){o.magnitudefactor*=2},s=function(){o.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,2==e||r(),r()):(this.minorStepIdx=2,1==e||s(),s()));for(var a=t.convertValue(0),l=t.getStep()*t.scale,h=!1,u=0;!h&&u++<5;){this.scale=l/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);var d=this.containerHeight/this.scale;this._start=i,this._end=this._start+d;var c=this._end*this.scale,p=this.magnitudefactor*this.majorSteps[this.minorStepIdx],m=this.getFirstMajor()-t.getFirstMajor();if(this.zeroAlign){var f=a-c;this._end+=f/this.scale,this._start=this._end-d}else this.autoScaleStart?(this._start-=m/this.scale,this._end=this._start+d):(this._start+=p-m/this.scale,this._end=this._start+d);if(!this.autoScaleEnd&&this._end>n+1e-5)s(),h=!1;else{if(!this.autoScaleStart&&this._start<i-1e-5){if(!(this.zeroAlign&&i>=0)){s(),h=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&d<n-i?(r(),h=!1):h=!0}}}},{key:"convertValue",value:function(t){return this.containerHeight-(t-this._start)*this.scale}},{key:"screenToValue",value:function(t){return(this.containerHeight-t)/this.scale+this._start}}]),t}(),Ld=function(t){function e(t,i,n,o){var r;ya(this,e),(r=as(this,us(e).call(this))).id=Du(),r.body=t,r.defaultOptions={orientation:"left",showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:"40px",visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format:function(t){return"".concat(Za(t.toPrecision(3)))},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:function(t){return"".concat(Za(t.toPrecision(3)))},title:{text:void 0,style:void 0}}},r.linegraphOptions=o,r.linegraphSVG=n,r.props={},r.DOMelements={lines:{},labels:{},title:{}},r.dom={},r.scale=void 0,r.range={start:0,end:0},r.options=Ba.extend({},r.defaultOptions),r.conversionFactor=1,r.setOptions(i),r.width=Number("".concat(r.options.width).replace("px","")),r.minWidth=r.width,r.height=r.linegraphSVG.getBoundingClientRect().height,r.hidden=!1,r.stepPixels=25,r.zeroCrossing=-1,r.amountOfSteps=-1,r.lineOffset=0,r.master=!0,r.masterAxis=null,r.svgElements={},r.iconsRemoved=!1,r.groups={},r.amountOfGroups=0,r._create(),null==r.scale&&r._redrawLabels(),r.framework={svg:r.svg,svgElements:r.svgElements,options:r.options,groups:r.groups};var s=Nr(r);return r.body.emitter.on("verticalDrag",(function(){s.dom.lineContainer.style.top="".concat(s.body.domProps.scrollTop,"px")})),r}return ps(e,t),_a(e,[{key:"addGroup",value:function(t,e){this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1}},{key:"updateGroup",value:function(t,e){this.groups.hasOwnProperty(t)||(this.amountOfGroups+=1),this.groups[t]=e}},{key:"removeGroup",value:function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)}},{key:"setOptions",value:function(t){if(t){var e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);Ba.selectiveDeepExtend(["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","left","right","alignZeros"],this.options,t),this.minWidth=Number("".concat(this.options.width).replace("px","")),!0===e&&this.dom.frame&&(this.hide(),this.show())}}},{key:"_create",value:function(){this.dom.frame=document.createElement("div"),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement("div"),this.dom.lineContainer.style.width="100%",this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position="relative",this.dom.lineContainer.style.visibility="visible",this.dom.lineContainer.style.display="block",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.height="100%",this.svg.style.width="100%",this.svg.style.display="block",this.dom.frame.appendChild(this.svg)}},{key:"_redrawGroupIcons",value:function(){var t;Mr(this.svgElements);var e=this.options.iconWidth,i=11.5;t="left"===this.options.orientation?4:this.width-e-4;var n=zi(this.groups);ws(n).call(n,(function(t,e){return t<e?-1:1}));var o=!0,r=!1,s=void 0;try{for(var a,l=Ii(n);!(o=(a=l.next()).done);o=!0){var h=a.value;!0!==this.groups[h].visible||void 0!==this.linegraphOptions.visibility[h]&&!0!==this.linegraphOptions.visibility[h]||(this.groups[h].getLegend(e,15,this.framework,t,i),i+=19)}}catch(t){r=!0,s=t}finally{try{o||null==l.return||l.return()}finally{if(r)throw s}}Tr(this.svgElements),this.iconsRemoved=!1}},{key:"_cleanupIcons",value:function(){!1===this.iconsRemoved&&(Mr(this.svgElements),Tr(this.svgElements),this.iconsRemoved=!0)}},{key:"show",value:function(){this.hidden=!1,this.dom.frame.parentNode||("left"===this.options.orientation?this.body.dom.left.appendChild(this.dom.frame):this.body.dom.right.appendChild(this.dom.frame)),this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer),this.dom.lineContainer.style.display="block"}},{key:"hide",value:function(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.style.display="none"}},{key:"setRange",value:function(t,e){this.range.start=t,this.range.end=e}},{key:"redraw",value:function(){var t=!1,e=0;for(var i in this.dom.lineContainer.style.top="".concat(this.body.domProps.scrollTop,"px"),this.groups)this.groups.hasOwnProperty(i)&&(!0!==this.groups[i].visible||void 0!==this.linegraphOptions.visibility[i]&&!0!==this.linegraphOptions.visibility[i]||e++);if(0===this.amountOfGroups||0===e)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace("px","")),this.dom.lineContainer.style.height="".concat(this.height,"px"),this.width=!0===this.options.visible?Number("".concat(this.options.width).replace("px","")):0;var n=this.props,o=this.dom.frame;o.className="vis-data-axis",this._calculateCharSize();var r=this.options.orientation,s=this.options.showMinorLabels,a=this.options.showMajorLabels,l=this.body.dom.backgroundHorizontal.offsetWidth;n.minorLabelHeight=s?n.minorCharHeight:0,n.majorLabelHeight=a?n.majorCharHeight:0,n.minorLineWidth=l-this.lineOffset-this.width+2*this.options.minorLinesOffset,n.minorLineHeight=1,n.majorLineWidth=l-this.lineOffset-this.width+2*this.options.majorLinesOffset,n.majorLineHeight=1,"left"===r?(o.style.top="0",o.style.left="0",o.style.bottom="",o.style.width="".concat(this.width,"px"),o.style.height="".concat(this.height,"px"),this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(o.style.top="",o.style.bottom="0",o.style.left="0",o.style.width="".concat(this.width,"px"),o.style.height="".concat(this.height,"px"),this.props.width=this.body.domProps.right.width,this.props.height=this.body.domProps.right.height),t=this._redrawLabels(),t=this._isResized()||t,!0===this.options.icons?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(r)}return t}},{key:"_redrawLabels",value:function(){var t=this,e=!1;Mr(this.DOMelements.lines),Mr(this.DOMelements.labels);var i=this.options.orientation,n=null!=this.options[i].range?this.options[i].range:{},o=!0;null!=n.max&&(this.range.end=n.max,o=!1);var r=!0;null!=n.min&&(this.range.start=n.min,r=!1),this.scale=new Pd(this.range.start,this.range.end,r,o,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[i].format),!1===this.master&&null!=this.masterAxis?(this.scale.followScale(this.masterAxis.scale),this.dom.lineContainer.style.display="none"):this.dom.lineContainer.style.display="block",this.maxLabelSize=0;var s=this.scale.getLines();mn(s).call(s,(function(e){var n=e.y,o=e.major;t.options.showMinorLabels&&!1===o&&t._redrawLabel(n-2,e.val,i,"vis-y-axis vis-minor",t.props.minorCharHeight),o&&n>=0&&t._redrawLabel(n-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),!0===t.master&&(o?t._redrawLine(n,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(n,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))}));var a=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(a=this.props.titleCharHeight);var l=!0===this.options.icons?Math.max(this.options.iconWidth,a)+this.options.labelOffsetX+15:a+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-l&&!0===this.options.visible?(this.width=this.maxLabelSize+l,this.options.width="".concat(this.width,"px"),Tr(this.DOMelements.lines),Tr(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSize<this.width-l&&!0===this.options.visible&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+l),this.options.width="".concat(this.width,"px"),Tr(this.DOMelements.lines),Tr(this.DOMelements.labels),this.redraw(),e=!0):(Tr(this.DOMelements.lines),Tr(this.DOMelements.labels),e=!1),e}},{key:"convertValue",value:function(t){return this.scale.convertValue(t)}},{key:"screenToValue",value:function(t){return this.scale.screenToValue(t)}},{key:"_redrawLabel",value:function(t,e,i,n,o){var r=Er("div",this.DOMelements.labels,this.dom.frame);r.className=n,r.innerHTML=e,"left"===i?(r.style.left="-".concat(this.options.labelOffsetX,"px"),r.style.textAlign="right"):(r.style.right="-".concat(this.options.labelOffsetX,"px"),r.style.textAlign="left"),r.style.top="".concat(t-.5*o+this.options.labelOffsetY,"px"),e+="";var s=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*s&&(this.maxLabelSize=e.length*s)}},{key:"_redrawLine",value:function(t,e,i,n,o){if(!0===this.master){var r=Er("div",this.DOMelements.lines,this.dom.lineContainer);r.className=i,r.innerHTML="","left"===e?r.style.left="".concat(this.width-n,"px"):r.style.right="".concat(this.width-n,"px"),r.style.width="".concat(o,"px"),r.style.top="".concat(t,"px")}}},{key:"_redrawTitle",value:function(t){if(Mr(this.DOMelements.title),void 0!==this.options[t].title&&void 0!==this.options[t].title.text){var e=Er("div",this.DOMelements.title,this.dom.frame);e.className="vis-y-axis vis-title vis-".concat(t),e.innerHTML=this.options[t].title.text,void 0!==this.options[t].title.style&&Ba.addCssText(e,this.options[t].title.style),"left"===t?e.style.left="".concat(this.props.titleCharHeight,"px"):e.style.right="".concat(this.props.titleCharHeight,"px"),e.style.width="".concat(this.height,"px")}Tr(this.DOMelements.title)}},{key:"_calculateCharSize",value:function(){if(!("minorCharHeight"in this.props)){var t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-minor vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.minorCharHeight=e.clientHeight,this.props.minorCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}if(!("majorCharHeight"in this.props)){var i=document.createTextNode("0"),n=document.createElement("div");n.className="vis-y-axis vis-major vis-measure",n.appendChild(i),this.dom.frame.appendChild(n),this.props.majorCharHeight=n.clientHeight,this.props.majorCharWidth=n.clientWidth,this.dom.frame.removeChild(n)}if(!("titleCharHeight"in this.props)){var o=document.createTextNode("0"),r=document.createElement("div");r.className="vis-y-axis vis-title vis-measure",r.appendChild(o),this.dom.frame.appendChild(r),this.props.titleCharHeight=r.clientHeight,this.props.titleCharWidth=r.clientWidth,this.dom.frame.removeChild(r)}}}]),e}(Ka);function Id(t,e){}function Ad(t,e){return{style:(e=void 0===e?{}:e).style||t.options.drawPoints.style,styles:e.styles||t.options.drawPoints.styles,size:e.size||t.options.drawPoints.size,className:e.className||t.className}}function Nd(t,e){}function Yd(t,e){}function Rd(t,e,i,n){this.id=e;this.options=Ba.selectiveBridgeObject(["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"],i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=n,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible||t.visible}function jd(t,e,i,n){this.body=t,this.defaultOptions={enabled:!1,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:"top-left"},right:{visible:!0,position:"top-right"}},this.side=i,this.options=Ba.extend({},this.defaultOptions),this.linegraphOptions=n,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.setOptions(e)}Id.draw=function(t,e,i,n){n=n||0;for(var o=function(t,e){var i=void 0;t.options&&t.options.drawPoints&&t.options.drawPoints.onRender&&"function"==typeof t.options.drawPoints.onRender&&(i=t.options.drawPoints.onRender);e.group.options&&e.group.options.drawPoints&&e.group.options.drawPoints.onRender&&"function"==typeof e.group.options.drawPoints.onRender&&(i=e.group.options.drawPoints.onRender);return i}(i,e),r=0;r<t.length;r++)if(o){var s=o(t[r],e);!0!==s&&"object"!==Bo(s)||Pr(t[r].screen_x+n,t[r].screen_y,Ad(e,s),i.svgElements,i.svg,t[r].label)}else Pr(t[r].screen_x+n,t[r].screen_y,Ad(e),i.svgElements,i.svg,t[r].label)},Id.drawIcon=function(t,e,i,n,o,r){var s=.5*o,a=Or("rect",r.svgElements,r.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-s),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*s),a.setAttributeNS(null,"class","vis-outline"),Pr(e+.5*n,i,Ad(t),r.svgElements,r.svg)},Nd.drawIcon=function(t,e,i,n,o,r){var s=.5*o,a=Or("rect",r.svgElements,r.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-s),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*s),a.setAttributeNS(null,"class","vis-outline");var l=Math.round(.3*n),h=t.options.barChart.width/l,u=Math.round(.4*o),d=Math.round(.75*o),c=Math.round((n-2*l)/3);if(Lr(e+.5*l+c,i+s-u-1,l,u,t.className+" vis-bar",r.svgElements,r.svg,t.style),Lr(e+1.5*l+c+2,i+s-d-1,l,d,t.className+" vis-bar",r.svgElements,r.svg,t.style),1==t.options.drawPoints.enabled){var p={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size/h,className:t.className};Pr(e+.5*l+c,i+s-u-1,p,r.svgElements,r.svg),Pr(e+1.5*l+c+2,i+s-d-1,p,r.svgElements,r.svg)}},Nd.draw=function(t,e,i){var n,o,r,s,a,l,h=[],u={},d=0;for(a=0;a<t.length;a++)if("bar"===(s=i.groups[t[a]]).options.style&&!0===s.visible&&(void 0===i.options.groups.visibility[t[a]]||!0===i.options.groups.visibility[t[a]]))for(l=0;l<e[t[a]].length;l++)h.push({screen_x:e[t[a]][l].screen_x,screen_end:e[t[a]][l].screen_end,screen_y:e[t[a]][l].screen_y,x:e[t[a]][l].x,end:e[t[a]][l].end,y:e[t[a]][l].y,groupId:t[a],label:e[t[a]][l].label}),d+=1;if(0!==d)for(ws(h).call(h,(function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x})),Nd._getDataIntersections(u,h),a=0;a<h.length;a++){var c=null!=(s=i.groups[h[a].groupId]).options.barChart.minWidth?s.options.barChart.minWidth:.1*s.options.barChart.width,p=0;if(void 0===u[o=h[a].screen_x])a+1<h.length&&(n=Math.abs(h[a+1].screen_x-o)),r=Nd._getSafeDrawData(n,s,c);else{var m=a+(u[o].amount-u[o].resolved);m<h.length&&(n=Math.abs(h[m].screen_x-o)),r=Nd._getSafeDrawData(n,s,c),u[o].resolved+=1,!0===s.options.stack&&!0!==s.options.excludeFromStacking?h[a].screen_y<s.zeroPosition?(p=u[o].accumulatedNegative,u[o].accumulatedNegative+=s.zeroPosition-h[a].screen_y):(p=u[o].accumulatedPositive,u[o].accumulatedPositive+=s.zeroPosition-h[a].screen_y):!0===s.options.barChart.sideBySide&&(r.width=r.width/u[o].amount,r.offset+=u[o].resolved*r.width-.5*r.width*(u[o].amount+1))}var f=r.width,v=h[a].screen_x;if(null!=h[a].screen_end?v+=.5*(f=h[a].screen_end-h[a].screen_x):v+=r.offset,Lr(v,h[a].screen_y-p,f,s.zeroPosition-h[a].screen_y,s.className+" vis-bar",i.svgElements,i.svg,s.style),!0===s.options.drawPoints.enabled){var g={screen_x:h[a].screen_x,screen_y:h[a].screen_y-p,x:h[a].x,y:h[a].y,groupId:h[a].groupId,label:h[a].label};Id.draw([g],s,i,r.offset)}}},Nd._getDataIntersections=function(t,e){for(var i,n=0;n<e.length;n++)n+1<e.length&&(i=Math.abs(e[n+1].screen_x-e[n].screen_x)),n>0&&(i=Math.min(i,Math.abs(e[n-1].screen_x-e[n].screen_x))),0===i&&(void 0===t[e[n].screen_x]&&(t[e[n].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[n].screen_x].amount+=1)},Nd._getSafeDrawData=function(t,e,i){var n,o;return t<e.options.barChart.width&&t>0?(n=t<i?i:t,o=0,"left"===e.options.barChart.align?o-=.5*t:"right"===e.options.barChart.align&&(o+=.5*t)):(n=e.options.barChart.width,o=0,"left"===e.options.barChart.align?o-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(o+=.5*e.options.barChart.width)),{width:n,offset:o}},Nd.getStackedYRange=function(t,e,i,n,o){if(t.length>0){ws(t).call(t,(function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x}));var r={};Nd._getDataIntersections(r,t),e[n]=Nd._getStackedYRange(r,t),e[n].yAxisOrientation=o,i.push(n)}},Nd._getStackedYRange=function(t,e){for(var i,n=e[0].screen_y,o=e[0].screen_y,r=0;r<e.length;r++)void 0===t[i=e[r].screen_x]?(n=n>e[r].screen_y?e[r].screen_y:n,o=o<e[r].screen_y?e[r].screen_y:o):e[r].screen_y<0?t[i].accumulatedNegative+=e[r].screen_y:t[i].accumulatedPositive+=e[r].screen_y;for(var s in t)t.hasOwnProperty(s)&&(n=(n=n>t[s].accumulatedNegative?t[s].accumulatedNegative:n)>t[s].accumulatedPositive?t[s].accumulatedPositive:n,o=(o=o<t[s].accumulatedNegative?t[s].accumulatedNegative:o)<t[s].accumulatedPositive?t[s].accumulatedPositive:o);return{min:n,max:o}},Yd.calcPath=function(t,e){if(null!=t&&t.length>0){return 1==e.options.interpolation.enabled?Yd._catmullRom(t,e):Yd._linear(t)}},Yd.drawIcon=function(t,e,i,n,o,r){var s,a,l=.5*o,h=Or("rect",r.svgElements,r.svg);(h.setAttributeNS(null,"x",e),h.setAttributeNS(null,"y",i-l),h.setAttributeNS(null,"width",n),h.setAttributeNS(null,"height",2*l),h.setAttributeNS(null,"class","vis-outline"),(s=Or("path",r.svgElements,r.svg)).setAttributeNS(null,"class",t.className),void 0!==t.style&&s.setAttributeNS(null,"style",t.style),s.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+n)+","+i),1==t.options.shaded.enabled&&(a=Or("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?a.setAttributeNS(null,"d","M"+e+", "+(i-l)+"L"+e+","+i+" L"+(e+n)+","+i+" L"+(e+n)+","+(i-l)):a.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+l)+" L"+(e+n)+","+(i+l)+"L"+(e+n)+","+i),a.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&a.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled)&&Pr(e+.5*n,i,{style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className},r.svgElements,r.svg)},Yd.drawShading=function(t,e,i,n){if(1==e.options.shaded.enabled){var o,r=Number(n.svg.style.height.replace("px","")),s=Or("path",n.svgElements,n.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var l=0;l="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?r:Math.min(Math.max(0,e.zeroPosition),r),o="group"==e.options.shaded.orientation&&null!=i&&null!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+l+" H"+t[0][0]+" Z",s.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&s.setAttributeNS(null,"style",e.options.shaded.style),s.setAttributeNS(null,"d",o)}},Yd.draw=function(t,e,i){if(null!=t&&null!=t){var n=Or("path",i.svgElements,i.svg);n.setAttributeNS(null,"class",e.className),void 0!==e.style&&n.setAttributeNS(null,"style",e.style);var o="L";1==e.options.interpolation.enabled&&(o="C"),n.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,o,!1))}},Yd.serializePath=function(t,e,i){if(t.length<2)return"";var n,o=e;if(i)for(n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(n=1;n<t.length;n++)o+=t[n][0]+","+t[n][1]+" ";return o},Yd._catmullRomUniform=function(t){var e,i,n,o,r,s,a=[];a.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var l=t.length,h=0;h<l-1;h++)e=0==h?t[0]:t[h-1],i=t[h],n=t[h+1],o=h+2<l?t[h+2]:n,r={screen_x:(-e.screen_x+6*i.screen_x+n.screen_x)*(1/6),screen_y:(-e.screen_y+6*i.screen_y+n.screen_y)*(1/6)},s={screen_x:(i.screen_x+6*n.screen_x-o.screen_x)*(1/6),screen_y:(i.screen_y+6*n.screen_y-o.screen_y)*(1/6)},a.push([r.screen_x,r.screen_y]),a.push([s.screen_x,s.screen_y]),a.push([n.screen_x,n.screen_y]);return a},Yd._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var n,o,r,s,a,l,h,u,d,c,p,m,f,v,g,y,b,_,w,k=[];k.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var x=t.length,D=0;D<x-1;D++)n=0==D?t[0]:t[D-1],o=t[D],r=t[D+1],s=D+2<x?t[D+2]:r,h=Math.sqrt(Math.pow(n.screen_x-o.screen_x,2)+Math.pow(n.screen_y-o.screen_y,2)),u=Math.sqrt(Math.pow(o.screen_x-r.screen_x,2)+Math.pow(o.screen_y-r.screen_y,2)),d=Math.sqrt(Math.pow(r.screen_x-s.screen_x,2)+Math.pow(r.screen_y-s.screen_y,2)),v=Math.pow(d,i),y=Math.pow(d,2*i),g=Math.pow(u,i),b=Math.pow(u,2*i),w=Math.pow(h,i),c=2*(_=Math.pow(h,2*i))+3*w*g+b,p=2*y+3*v*g+b,(m=3*w*(w+g))>0&&(m=1/m),(f=3*v*(v+g))>0&&(f=1/f),a={screen_x:(-b*n.screen_x+c*o.screen_x+_*r.screen_x)*m,screen_y:(-b*n.screen_y+c*o.screen_y+_*r.screen_y)*m},l={screen_x:(y*o.screen_x+p*r.screen_x-b*s.screen_x)*f,screen_y:(y*o.screen_y+p*r.screen_y-b*s.screen_y)*f},0==a.screen_x&&0==a.screen_y&&(a=o),0==l.screen_x&&0==l.screen_y&&(l=r),k.push([a.screen_x,a.screen_y]),k.push([l.screen_x,l.screen_y]),k.push([r.screen_x,r.screen_y]);return k},Yd._linear=function(t){for(var e=[],i=0;i<t.length;i++)e.push([t[i].screen_x,t[i].screen_y]);return e},Rd.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==ws(this.options)&&Ba.insertSort(this.itemsData,(function(t,e){return t.x>e.x?1:-1}))):this.itemsData=[]},Rd.prototype.getItems=function(){return this.itemsData},Rd.prototype.setZeroPosition=function(t){this.zeroPosition=t},Rd.prototype.setOptions=function(t){if(void 0!==t){Ba.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),Ba.mergeOptions(this.options,t,"interpolation"),Ba.mergeOptions(this.options,t,"drawPoints"),Ba.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==Bo(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},Rd.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible||t.visible,this.style=t.style,this.setOptions(t.options)},Rd.prototype.getLegend=function(t,e,i,n,o){null!=i&&null!=i||(i={svg:document.createElementNS("http://www.w3.org/2000/svg","svg"),svgElements:{},options:this.options,groups:[this]});switch(null!=n&&null!=n||(n=0),null!=o&&null!=o||(o=.5*e),this.options.style){case"line":Yd.drawIcon(this,n,o,t,e,i);break;case"points":case"point":Id.drawIcon(this,n,o,t,e,i);break;case"bar":Nd.drawIcon(this,n,o,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},Rd.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,n=0;n<t.length;n++)e=e>t[n].y?t[n].y:e,i=i<t[n].y?t[n].y:i;return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}},jd.prototype=new Ka,jd.prototype.clear=function(){this.groups={},this.amountOfGroups=0},jd.prototype.addGroup=function(t,e){1!=e.options.excludeFromLegend&&(this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1)},jd.prototype.updateGroup=function(t,e){this.groups[t]=e},jd.prototype.removeGroup=function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)},jd.prototype._create=function(){this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-legend",this.dom.frame.style.position="absolute",this.dom.frame.style.top="10px",this.dom.frame.style.display="block",this.dom.textArea=document.createElement("div"),this.dom.textArea.className="vis-legend-text",this.dom.textArea.style.position="relative",this.dom.textArea.style.top="0px",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.width=this.options.iconSize+5+"px",this.svg.style.height="100%",this.dom.frame.appendChild(this.svg),this.dom.frame.appendChild(this.dom.textArea)},jd.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},jd.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},jd.prototype.setOptions=function(t){Ba.selectiveDeepExtend(["enabled","orientation","icons","left","right"],this.options,t)},jd.prototype.redraw=function(){var t=0,e=zi(this.groups);ws(e).call(e,(function(t,e){return t<e?-1:1}));for(var i=0;i<e.length;i++){var n=e[i];1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||t++}if(0==this.options[this.side].visible||0==this.amountOfGroups||0==this.options.enabled||0==t)this.hide();else{if(this.show(),"top-left"==this.options[this.side].position||"bottom-left"==this.options[this.side].position?(this.dom.frame.style.left="4px",this.dom.frame.style.textAlign="left",this.dom.textArea.style.textAlign="left",this.dom.textArea.style.left=this.options.iconSize+15+"px",this.dom.textArea.style.right="",this.svg.style.left="0px",this.svg.style.right=""):(this.dom.frame.style.right="4px",this.dom.frame.style.textAlign="right",this.dom.textArea.style.textAlign="right",this.dom.textArea.style.right=this.options.iconSize+15+"px",this.dom.textArea.style.left="",this.svg.style.right="0px",this.svg.style.left=""),"top-left"==this.options[this.side].position||"top-right"==this.options[this.side].position)this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.bottom="";else{var o=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+o+Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.top=""}0==this.options.icons?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+"px",this.dom.textArea.style.right="",this.dom.textArea.style.left="",this.svg.style.width="0px"):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+"px",this.drawLegendIcons());var r="";for(i=0;i<e.length;i++)n=e[i],1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||(r+=this.groups[n].content+"<br />");this.dom.textArea.innerHTML=r,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},jd.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=zi(this.groups);ws(t).call(t,(function(t,e){return t<e?-1:1})),Cr(this.svgElements);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),n=i,o=this.options.iconSize,r=.75*this.options.iconSize,s=i+.5*r+3;this.svg.style.width=o+5+i+"px";for(var a=0;a<t.length;a++){var l=t[a];1!=this.groups[l].visible||void 0!==this.linegraphOptions.visibility[l]&&1!=this.linegraphOptions.visibility[l]||(this.groups[l].getLegend(o,r,this.framework,n,s),s+=r+this.options.iconSpacing)}}};function Fd(t,e){this.id=Du(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=Ba.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var i=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,n){i._onAdd(e.items)},update:function(t,e,n){i._onUpdate(e.items)},remove:function(t,e,n){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,n){i._onAddGroups(e.items)},update:function(t,e,n){i._onUpdateGroups(e.items)},remove:function(t,e,n){i._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.body.emitter.on("rangechanged",(function(){i.lastStart=i.body.range.start,i.svg.style.left=Ba.option.asSize(-i.props.width),i.forceGraphUpdate=!0,i.redraw.call(i)})),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}Fd.prototype=new Ka,Fd.prototype._create=function(){var t=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=new Ld(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new Ld(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new jd(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new jd(this.body,this.options.legend,"right",this.options.groups),this.show()},Fd.prototype.setOptions=function(t){if(t){void 0===t.graphHeight&&void 0!==t.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&Ln((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),Ba.selectiveDeepExtend(["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"],this.options,t),Ba.mergeOptions(this.options,t,"interpolation"),Ba.mergeOptions(this.options,t,"drawPoints"),Ba.mergeOptions(this.options,t,"shaded"),Ba.mergeOptions(this.options,t,"legend"),t.interpolation&&"object"==Bo(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5)),this.yAxisLeft&&void 0!==t.dataAxis&&(this.yAxisLeft.setOptions(this.options.dataAxis),this.yAxisRight.setOptions(this.options.dataAxis)),this.legendLeft&&void 0!==t.legend&&(this.legendLeft.setOptions(this.options.legend),this.legendRight.setOptions(this.options.legend)),this.groups.hasOwnProperty("__ungrouped__")&&this.groups.__ungrouped__.setOptions(t)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0}))},Fd.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},Fd.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},Fd.prototype.setItems=function(t){var e,i=this,n=this.itemsData;if(t){if(!(t instanceof ja||t instanceof Fa))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=Va(t)}else this.itemsData=null;if(n&&(mn(Ba).call(Ba,this.itemListeners,(function(t,e){n.off(e,t)})),n.dispose(),e=n.getIds(),this._onRemove(e)),this.itemsData){var o=this.id;mn(Ba).call(Ba,this.itemListeners,(function(t,e){i.itemsData.on(e,t,o)})),e=this.itemsData.getIds(),this._onAdd(e)}},Fd.prototype.setGroups=function(t){var e,i=this;if(this.groupsData){mn(Ba).call(Ba,this.groupListeners,(function(t,e){i.groupsData.off(e,t)})),e=this.groupsData.getIds(),this.groupsData=null;for(var n=0;n<e.length;n++)this._removeGroup(e[n])}if(t){if(!(t instanceof ja||t instanceof Fa))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;mn(Ba).call(Ba,this.groupListeners,(function(t,e){i.groupsData.on(e,t,o)})),e=this.groupsData.getIds(),this._onAddGroups(e)}},Fd.prototype._onUpdate=function(t){this._updateAllGroupData(t)},Fd.prototype._onAdd=function(t){this._onUpdate(t)},Fd.prototype._onRemove=function(t){this._onUpdate(t)},Fd.prototype._onUpdateGroups=function(t){this._updateAllGroupData(null,t)},Fd.prototype._onAddGroups=function(t){this._onUpdateGroups(t)},Fd.prototype._onRemoveGroups=function(t){for(var e=0;e<t.length;e++)this._removeGroup(t[e]);this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})},Fd.prototype._removeGroup=function(t){this.groups.hasOwnProperty(t)&&("right"==this.groups[t].options.yAxisOrientation?(this.yAxisRight.removeGroup(t),this.legendRight.removeGroup(t),this.legendRight.redraw()):(this.yAxisLeft.removeGroup(t),this.legendLeft.removeGroup(t),this.legendLeft.redraw()),delete this.groups[t])},Fd.prototype._updateGroup=function(t,e){this.groups.hasOwnProperty(e)?(this.groups[e].update(t),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.updateGroup(e,this.groups[e]),this.legendRight.updateGroup(e,this.groups[e]),this.yAxisLeft.removeGroup(e),this.legendLeft.removeGroup(e)):(this.yAxisLeft.updateGroup(e,this.groups[e]),this.legendLeft.updateGroup(e,this.groups[e]),this.yAxisRight.removeGroup(e),this.legendRight.removeGroup(e))):(this.groups[e]=new Rd(t,e,this.options,this.groupsUsingDefaultStyles),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.addGroup(e,this.groups[e]),this.legendRight.addGroup(e,this.groups[e])):(this.yAxisLeft.addGroup(e,this.groups[e]),this.legendLeft.addGroup(e,this.groups[e]))),this.legendLeft.redraw(),this.legendRight.redraw()},Fd.prototype._updateAllGroupData=function(t,e){if(null!=this.itemsData){var i={},n=this.itemsData.get(),o=this.itemsData.idProp,r={};t&&Tn(t).call(t,(function(t){r[t]=t}));for(var s={},a=0;a<n.length;a++){var l=n[a],h=l.group;null==h&&(h="__ungrouped__"),s.hasOwnProperty(h)?s[h]++:s[h]=1}var u={};if(!e&&t)for(h in this.groups)if(this.groups.hasOwnProperty(h)){var d=(f=this.groups[h]).getItems();i[h]=Gn(d).call(d,(function(t){return u[t[o]]=t[o],t[o]!==r[t[o]]}));var c=s[h];s[h]-=i[h].length,i[h].length<c&&(i[h][c-1]={})}for(a=0;a<n.length;a++)if(null==(h=(l=n[a]).group)&&(h="__ungrouped__"),e||!t||l[o]===r[l[o]]||!u.hasOwnProperty(l[o])){i.hasOwnProperty(h)||(i[h]=new Array(s[h]));var p=Ba.bridgeObject(l);p.x=Ba.convert(l.x,"Date"),p.end=Ba.convert(l.end,"Date"),p.orginalY=l.y,p.y=Number(l.y),p[o]=l[o];var m=i[h].length-s[h]--;i[h][m]=p}for(h in this.groups)this.groups.hasOwnProperty(h)&&(i.hasOwnProperty(h)||(i[h]=new Array(0)));for(h in i)if(i.hasOwnProperty(h))if(0==i[h].length)this.groups.hasOwnProperty(h)&&this._removeGroup(h);else{var f=void 0;null!=this.groupsData&&(f=this.groupsData.get(h)),null==f&&(f={id:h,content:this.options.defaultGroup+h}),this._updateGroup(f,h),this.groups[h].setItems(i[h])}this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})}},Fd.prototype.redraw=function(){var t=!1;this.props.width=this.dom.frame.offsetWidth,this.props.height=this.body.domProps.centerContainer.height-this.body.domProps.border.top-this.body.domProps.border.bottom,t=this._isResized()||t;var e,i=this.body.range.end-this.body.range.start,n=i!=this.lastVisibleInterval;(this.lastVisibleInterval=i,1==t)&&(this.svg.style.width=Ba.option.asSize(3*this.props.width),this.svg.style.left=Ba.option.asSize(-this.props.width),-1==Io(e=this.options.height+"").call(e,"%")&&1!=this.updateSVGheightOnResize||(this.updateSVGheight=!0));if(1==this.updateSVGheight?(this.options.graphHeight!=this.props.height+"px"&&(this.options.graphHeight=this.props.height+"px",this.svg.style.height=this.props.height+"px"),this.updateSVGheight=!1):this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",1==t||1==n||1==this.abortedGraphUpdate||1==this.forceGraphUpdate)t=this._updateGraph()||t,this.forceGraphUpdate=!1;else if(0!=this.lastStart){var o=this.body.range.start-this.lastStart,r=this.body.range.end-this.body.range.start;if(0!=this.props.width){var s=o*(this.props.width/r);this.svg.style.left=-this.props.width-s+"px"}}return this.legendLeft.redraw(),this.legendRight.redraw(),t},Fd.prototype._getSortedGroupIds=function(){var t=[];for(var e in this.groups)if(this.groups.hasOwnProperty(e)){var i=this.groups[e];1!=i.visible||void 0!==this.options.groups.visibility[e]&&1!=this.options.groups.visibility[e]||t.push({id:e,zIndex:i.options.zIndex})}Ba.insertSort(t,(function(t,e){var i=t.zIndex,n=e.zIndex;return void 0===i&&(i=0),void 0===n&&(n=0),i==n?0:i<n?-1:1}));for(var n=new Array(t.length),o=0;o<t.length;o++)n[o]=t[o].id;return n},Fd.prototype._updateGraph=function(){if(Mr(this.svgElements),0!=this.props.width&&null!=this.itemsData){var t,e,i={},n=this.body.util.toGlobalTime(-this.body.domProps.root.width),o=this.body.util.toGlobalTime(2*this.body.domProps.root.width),r=this._getSortedGroupIds();if(r.length>0){var s={};for(this._getRelevantData(r,s,n,o),this._applySampling(r,s),e=0;e<r.length;e++)this._convertXcoordinates(s[r[e]]);if(this._getYRanges(r,s,i),1==this._updateYAxis(r,i))return Tr(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var a=void 0;for(e=0;e<r.length;e++)t=this.groups[r[e]],!0===this.options.stack&&"line"===this.options.style&&(null!=t.options.excludeFromStacking&&t.options.excludeFromStacking||(null!=a&&(this._stack(s[t.id],s[a.id]),1==t.options.shaded.enabled&&"group"!==t.options.shaded.orientation&&("top"==t.options.shaded.orientation&&"group"!==a.options.shaded.orientation?(a.options.shaded.orientation="group",a.options.shaded.groupId=t.id):(t.options.shaded.orientation="group",t.options.shaded.groupId=a.id))),a=t)),this._convertYcoordinates(s[r[e]],t);var l={};for(e=0;e<r.length;e++)if("line"===(t=this.groups[r[e]]).options.style&&1==t.options.shaded.enabled){var h=s[r[e]];if(null==h||0==h.length)continue;if(l.hasOwnProperty(r[e])||(l[r[e]]=Yd.calcPath(h,t)),"group"===t.options.shaded.orientation){var u=t.options.shaded.groupId;if(-1===Io(r).call(r,u)){console.log(t.id+": Unknown shading group target given:"+u);continue}l.hasOwnProperty(u)||(l[u]=Yd.calcPath(s[u],this.groups[u])),Yd.drawShading(l[r[e]],t,l[u],this.framework)}else Yd.drawShading(l[r[e]],t,void 0,this.framework)}for(Nd.draw(r,s,this.framework),e=0;e<r.length;e++)if(t=this.groups[r[e]],s[r[e]].length>0)switch(t.options.style){case"line":l.hasOwnProperty(r[e])||(l[r[e]]=Yd.calcPath(s[r[e]],t)),Yd.draw(l[r[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||Id.draw(s[r[e]],t,this.framework)}}}return Tr(this.svgElements),!1},Fd.prototype._stack=function(t,e){var i,n,o,r,s;i=0;for(var a=0;a<t.length;a++){r=void 0,s=void 0;for(var l=i;l<e.length;l++){if(e[l].x===t[a].x){r=e[l],s=e[l],i=l;break}if(e[l].x>t[a].x){s=e[l],r=0==l?s:e[l-1],i=l;break}}void 0===s&&(r=e[e.length-1],s=e[e.length-1]),n=s.x-r.x,o=s.y-r.y,t[a].y=0==n?t[a].orginalY+s.y:t[a].orginalY+o/n*(t[a].x-r.x)+r.y}},Fd.prototype._getRelevantData=function(t,e,i,n){var o,r,s,a;if(t.length>0)for(r=0;r<t.length;r++){var l=(o=this.groups[t[r]]).getItems();if(1==ws(o.options)){var h=function(t,e){return t.getTime()==e.getTime()?0:t<e?-1:1},u=Math.max(0,Ba.binarySearchValue(l,i,"x","before",h)),d=Math.min(l.length,Ba.binarySearchValue(l,n,"x","after",h)+1);d<=0&&(d=l.length);var c=new Array(d-u);for(s=u;s<d;s++)a=o.itemsData[s],c[s-u]=a;e[t[r]]=c}else e[t[r]]=o.itemsData}},Fd.prototype._applySampling=function(t,e){if(t.length>0)for(var i=0;i<t.length;i++)if(1==this.groups[t[i]].options.sampling){var n=e[t[i]];if(n.length>0){var o,r=n.length,s=r/(this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x));o=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(s)));for(var a=new Array(r),l=0;l<r;l+=o){a[Math.round(l/o)]=n[l]}e[t[i]]=qs(a).call(a,0,Math.round(r/o))}}},Fd.prototype._getYRanges=function(t,e,i){var n,o,r,s,a=[],l=[];if(t.length>0){for(r=0;r<t.length;r++)n=e[t[r]],s=this.groups[t[r]].options,n.length>0&&(o=this.groups[t[r]],!0===s.stack&&"bar"===s.style?"left"===s.yAxisOrientation?a=Zn(a).call(a,n):l=Zn(l).call(l,n):i[t[r]]=o.getYRange(n,t[r]));Nd.getStackedYRange(a,i,t,"__barStackLeft","left"),Nd.getStackedYRange(l,i,t,"__barStackRight","right")}},Fd.prototype._updateYAxis=function(t,e){var i,n,o=!1,r=!1,s=!1,a=1e9,l=1e9,h=-1e9,u=-1e9;if(t.length>0){for(var d=0;d<t.length;d++){var c=this.groups[t[d]];c&&"right"!=c.options.yAxisOrientation?(r=!0,a=1e9,h=-1e9):c&&c.options.yAxisOrientation&&(s=!0,l=1e9,u=-1e9)}for(d=0;d<t.length;d++)e.hasOwnProperty(t[d])&&!0!==e[t[d]].ignore&&(i=e[t[d]].min,n=e[t[d]].max,"right"!=e[t[d]].yAxisOrientation?(r=!0,a=a>i?i:a,h=h<n?n:h):(s=!0,l=l>i?i:l,u=u<n?n:u));1==r&&this.yAxisLeft.setRange(a,h),1==s&&this.yAxisRight.setRange(l,u)}o=this._toggleAxisVisiblity(r,this.yAxisLeft)||o,o=this._toggleAxisVisiblity(s,this.yAxisRight)||o,1==s&&1==r?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!r,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(this.yAxisLeft.lineOffset=1==s?this.yAxisRight.width:0,o=this.yAxisLeft.redraw()||o,o=this.yAxisRight.redraw()||o):o=this.yAxisRight.redraw()||o;var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"];for(d=0;d<p.length;d++)-1!=Io(t).call(t,p[d])&&qs(t).call(t,Io(t).call(t,p[d]),1);return o},Fd.prototype._toggleAxisVisiblity=function(t,e){var i=!1;return 0==t?e.dom.frame.parentNode&&0==e.hidden&&(e.hide(),i=!0):e.dom.frame.parentNode||1!=e.hidden||(e.show(),i=!0),i},Fd.prototype._convertXcoordinates=function(t){for(var e=this.body.util.toScreen,i=0;i<t.length;i++)t[i].screen_x=e(t[i].x)+this.props.width,t[i].screen_y=t[i].y,null!=t[i].end?t[i].screen_end=e(t[i].end)+this.props.width:t[i].screen_end=void 0},Fd.prototype._convertYcoordinates=function(t,e){var i=this.yAxisLeft,n=Number(this.svg.style.height.replace("px",""));"right"==e.options.yAxisOrientation&&(i=this.yAxisRight);for(var o=0;o<t.length;o++)t[o].screen_y=Math.round(i.convertValue(t[o].y));e.setZeroPosition(Math.min(n,i.convertValue(0)))};var Hd="boolean",zd={configure:{enabled:{boolean:Hd},filter:{boolean:Hd,function:"function"},container:{dom:"dom"},__type__:{object:"object",boolean:Hd,function:"function"}},alignCurrentTime:{string:"string",undefined:"undefined"},yAxisOrientation:{string:["left","right"]},defaultGroup:{string:"string"},sort:{boolean:Hd},sampling:{boolean:Hd},stack:{boolean:Hd},graphHeight:{string:"string",number:"number"},shaded:{enabled:{boolean:Hd},orientation:{string:["bottom","top","zero","group"]},groupId:{object:"object"},__type__:{boolean:Hd,object:"object"}},style:{string:["line","bar","points"]},barChart:{width:{number:"number"},minWidth:{number:"number"},sideBySide:{boolean:Hd},align:{string:["left","center","right"]},__type__:{object:"object"}},interpolation:{enabled:{boolean:Hd},parametrization:{string:["centripetal","chordal","uniform"]},alpha:{number:"number"},__type__:{object:"object",boolean:Hd}},drawPoints:{enabled:{boolean:Hd},onRender:{function:"function"},size:{number:"number"},style:{string:["square","circle"]},__type__:{object:"object",boolean:Hd,function:"function"}},dataAxis:{showMinorLabels:{boolean:Hd},showMajorLabels:{boolean:Hd},showWeekScale:{boolean:Hd},icons:{boolean:Hd},width:{string:"string",number:"number"},visible:{boolean:Hd},alignZeros:{boolean:Hd},left:{range:{min:{number:"number",undefined:"undefined"},max:{number:"number",undefined:"undefined"},__type__:{object:"object"}},format:{function:"function"},title:{text:{string:"string",number:"number",undefined:"undefined"},style:{string:"string",undefined:"undefined"},__type__:{object:"object"}},__type__:{object:"object"}},right:{range:{min:{number:"number",undefined:"undefined"},max:{number:"number",undefined:"undefined"},__type__:{object:"object"}},format:{function:"function"},title:{text:{string:"string",number:"number",undefined:"undefined"},style:{string:"string",undefined:"undefined"},__type__:{object:"object"}},__type__:{object:"object"}},__type__:{object:"object"}},legend:{enabled:{boolean:Hd},icons:{boolean:Hd},left:{visible:{boolean:Hd},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:"object"}},right:{visible:{boolean:Hd},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:"object"}},__type__:{object:"object",boolean:Hd}},groups:{visibility:{any:"any"},__type__:{object:"object"}},autoResize:{boolean:Hd},throttleRedraw:{number:"number"},clickToUse:{boolean:Hd},end:{number:"number",date:"date",string:"string",moment:"moment"},format:{minorLabels:{millisecond:{string:"string",undefined:"undefined"},second:{string:"string",undefined:"undefined"},minute:{string:"string",undefined:"undefined"},hour:{string:"string",undefined:"undefined"},weekday:{string:"string",undefined:"undefined"},day:{string:"string",undefined:"undefined"},week:{string:"string",undefined:"undefined"},month:{string:"string",undefined:"undefined"},quarter:{string:"string",undefined:"undefined"},year:{string:"string",undefined:"undefined"},__type__:{object:"object"}},majorLabels:{millisecond:{string:"string",undefined:"undefined"},second:{string:"string",undefined:"undefined"},minute:{string:"string",undefined:"undefined"},hour:{string:"string",undefined:"undefined"},weekday:{string:"string",undefined:"undefined"},day:{string:"string",undefined:"undefined"},week:{string:"string",undefined:"undefined"},month:{string:"string",undefined:"undefined"},quarter:{string:"string",undefined:"undefined"},year:{string:"string",undefined:"undefined"},__type__:{object:"object"}},__type__:{object:"object"}},moment:{function:"function"},height:{string:"string",number:"number"},hiddenDates:{start:{date:"date",number:"number",string:"string",moment:"moment"},end:{date:"date",number:"number",string:"string",moment:"moment"},repeat:{string:"string"},__type__:{object:"object",array:"array"}},locale:{string:"string"},locales:{__any__:{any:"any"},__type__:{object:"object"}},max:{date:"date",number:"number",string:"string",moment:"moment"},maxHeight:{number:"number",string:"string"},maxMinorChars:{number:"number"},min:{date:"date",number:"number",string:"string",moment:"moment"},minHeight:{number:"number",string:"string"},moveable:{boolean:Hd},multiselect:{boolean:Hd},orientation:{string:"string"},showCurrentTime:{boolean:Hd},showMajorLabels:{boolean:Hd},showMinorLabels:{boolean:Hd},showWeekScale:{boolean:Hd},start:{date:"date",number:"number",string:"string",moment:"moment"},timeAxis:{scale:{string:"string",undefined:"undefined"},step:{number:"number",undefined:"undefined"},__type__:{object:"object"}},width:{string:"string",number:"number"},zoomable:{boolean:Hd},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:"number"},zoomMin:{number:"number"},zIndex:{number:"number"},__type__:{object:"object"}},Gd={global:{alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:["zero","top","bottom","group"]},style:["line","bar","points"],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:["left","center","right"]},interpolation:{enabled:!0,parametrization:["centripetal","chordal","uniform"]},drawPoints:{enabled:!0,size:[6,2,30,1],style:["square","circle"]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:"",style:""}},right:{title:{text:"",style:""}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]},right:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]}},autoResize:!0,clickToUse:!1,end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",quarter:"[Q]Q",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",quarter:"YYYY",year:""}},height:"",locale:"",max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!0,orientation:["both","bottom","top"],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,showWeekScale:!1,start:"",width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}};function Wd(t,e,i,n){var o,r,s,a,l,h,u;if(!(Ao(i)||i instanceof ja||i instanceof Fa)&&i instanceof Object){var d=n;n=i,i=d}n&&n.throttleRedraw&&console.warn('Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var c=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:Ha,width:null,height:null,maxHeight:null,minHeight:null},this.options=Ba.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:ga(o=this.on).call(o,this),off:ga(r=this.off).call(r,this),emit:ga(s=this.emit).call(s,this)},hiddenDates:[],util:{toScreen:ga(a=c._toScreen).call(a,c),toGlobalScreen:ga(l=c._toGlobalScreen).call(l,c),toTime:ga(h=c._toTime).call(h,c),toGlobalTime:ga(u=c._toGlobalTime).call(u,c)}},this.range=new ml(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new Zh(this.body),this.components.push(this.timeAxis),this.currentTime=new cu(this.body),this.components.push(this.currentTime),this.linegraph=new Fd(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",(function(t){c.emit("click",c.getEventProperties(t))})),this.on("doubletap",(function(t){c.emit("doubleClick",c.getEventProperties(t))})),this.dom.root.oncontextmenu=function(t){c.emit("contextmenu",c.getEventProperties(t))},this.initialFitDone=!1,this.on("changed",(function(){if(null!=c.itemsData){if(!c.initialFitDone&&!c.options.rollingMode)if(c.initialFitDone=!0,null!=c.options.start||null!=c.options.end){if(null==c.options.start||null==c.options.end)var t=c.getItemRange();var e=null!=c.options.start?c.options.start:t.min,i=null!=c.options.end?c.options.end:t.max;c.setWindow(e,i,{animation:!1})}else c.fit({animation:!1});c.initialDrawDone||!c.initialRangeChangeDone&&(c.options.start||c.options.end)&&!c.options.rollingMode||(c.initialDrawDone=!0,c.dom.root.style.visibility="visible",c.dom.loadingScreen.parentNode.removeChild(c.dom.loadingScreen),c.options.onInitialDrawComplete&&Js((function(){return c.options.onInitialDrawComplete()}),0))}})),n&&this.setOptions(n),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}Wd.prototype=new du,Wd.prototype.setOptions=function(t){!0===md.validate(t,zd)&&console.log("%cErrors have been found in the supplied options object.",pd),du.prototype.setOptions.call(this,t)},Wd.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?Va(t instanceof ja||t instanceof Fa?t:new ja(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.linegraph&&this.linegraph.setItems(null!=e?e.rawDS:null),i)if(null!=this.options.start||null!=this.options.end){var n=null!=this.options.start?this.options.start:null,o=null!=this.options.end?this.options.end:null;this.setWindow(n,o,{animation:!1})}else this.fit({animation:!1})},Wd.prototype.setGroups=function(t){var e;e=t?t instanceof ja||t instanceof Fa?t:new ja(t):null,this.groupsData=e,this.linegraph.setGroups(e)},Wd.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+"'"},Wd.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]))},Wd.prototype.getDataRange=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 n=0;n<this.linegraph.groups[i].itemsData.length;n++){var o=this.linegraph.groups[i].itemsData[n],r=Ba.convert(o.x,"Date").valueOf();t=null==t||t>r?r:t,e=null==e||e<r?r:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},Wd.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=e-Ba.getAbsoluteLeft(this.dom.centerContainer),o=i-Ba.getAbsoluteTop(this.dom.centerContainer),r=this._toTime(n),s=uu.customTimeFromTarget(t),a=Ba.getTarget(t),l=null;Ba.hasParent(a,this.timeAxis.dom.foreground)||this.timeAxis2&&Ba.hasParent(a,this.timeAxis2.dom.foreground)?l="axis":Ba.hasParent(a,this.linegraph.yAxisLeft.dom.frame)||Ba.hasParent(a,this.linegraph.yAxisRight.dom.frame)?l="data-axis":Ba.hasParent(a,this.linegraph.legendLeft.dom.frame)||Ba.hasParent(a,this.linegraph.legendRight.dom.frame)?l="legend":null!=s?l="custom-time":Ba.hasParent(a,this.currentTime.bar)?l="current-time":Ba.hasParent(a,this.dom.center)&&(l="background");var h=[],u=this.linegraph.yAxisLeft,d=this.linegraph.yAxisRight;return!u.hidden&&this.itemsData.length>0&&h.push(u.screenToValue(o)),!d.hidden&&this.itemsData.length>0&&h.push(d.screenToValue(o)),{event:t,customTime:s?s.options.id:null,what:l,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:n,y:o,time:r,value:h}},Wd.prototype._createConfigurator=function(){return new Md(this,this.dom.container,Gd)},console.warn(["This build has been deprecated.","","In case you are importing this through a URL it will result in a 404 eventually.","In case you are importing this through Node it will be replaced by the peer build eventually.","","Please use the peer or standalone build instead.","Peer: https://visjs.github.io/vis-timeline/examples/timeline/peer-build.html","Standalone: https://visjs.github.io/vis-timeline/examples/timeline/standalone-build.html"].join("\n"));var Vd=Ir();Ha.locale(Vd);var Bd={Core:du,DateUtil:pl,Range:ml,stack:Vu,TimeStep:qh,components:{items:{Item:qu,BackgroundItem:Ju,BoxItem:Zu,PointItem:Ku,RangeItem:$u},BackgroundGroup:Xu,Component:Ka,CurrentTime:cu,CustomTime:uu,DataAxis:Ld,DataScale:Pd,GraphGroup:Rd,Group:Uu,ItemSet:ud,Legend:jd,LineGraph:Fd,TimeAxis:Zh}},Ud={util:Sr,DOMutil:Ar,DataSet:ja,DataView:Fa,Queue:Aa,Timeline:Td,Graph2d:Wd,timeline:Bd,moment:Ha,Hammer:Uh,keycharm:$h};t.DOMutil=Ar,t.DataSet=ja,t.DataView=Fa,t.Graph2d=Wd,t.Hammer=Uh,t.Queue=Aa,t.Timeline=Td,t.default=Ud,t.keycharm=$h,t.moment=Ha,t.timeline=Bd,t.util=Sr,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=vis-timeline-graph2d.min.js.map