144 lines
572 KiB
JavaScript
144 lines
572 KiB
JavaScript
import{d3 as t,dM as e,dN as n,d4 as o,dO as s,dP as r,db as a,df as h,dQ as l,dR as d,_ as c,n as u,t as p,cW as m,b as f,a as g,x as v,cR as y,dS as b,dh as w,l as _,cV as x,dT as k,dU as S,dV as D,c$ as C,dW as T,dg as E,dX as O,da as M,d6 as P,d8 as I,cI as A,dn as N,dY as R,dZ as F,i as L,s as j,r as Y}from"./card-45855f1f.js";import{s as z,e as H}from"./startOfHour-5e3c525d.js";import{e as G}from"./endOfDay-24d35e3f.js";import"./date-picker-40111fdc.js";var W={exports:{}};!function(t){function e(t){if(t)return function(t){for(var i in e.prototype)t[i]=e.prototype[i];return t}(t)}W.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}}();var B=e(W.exports);
|
||
/*! 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 V(){return V=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},V.apply(this,arguments)}function U(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function $(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var q,X="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,Q=["","webkit","Moz","MS","ms","o"],Z="undefined"==typeof document?{style:{}}:document.createElement("div"),K=Math.round,J=Math.abs,tt=Date.now;function et(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),s=0;s<Q.length;){if((n=(i=Q[s])?i+o:e)in t)return n;s++}}q="undefined"==typeof window?{}:window;var it=et(Z.style,"touchAction"),nt=void 0!==it;var ot="compute",st="auto",rt="manipulation",at="none",ht="pan-x",lt="pan-y",dt=function(){if(!nt)return!1;var t={},e=q.CSS&&q.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){return t[i]=!e||q.CSS.supports("touch-action",i)})),t}(),ct="ontouchstart"in q,ut=void 0!==et(q,"PointerEvent"),pt=ct&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),mt="touch",ft="mouse",gt=25,vt=1,yt=4,bt=8,wt=1,_t=2,xt=4,kt=8,St=16,Dt=_t|xt,Ct=kt|St,Tt=Dt|Ct,Et=["x","y"],Ot=["clientX","clientY"];function Mt(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 Pt(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function It(t,e){return t.indexOf(e)>-1}var At=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===ot&&(t=this.compute()),nt&&this.manager.element.style&&dt[t]&&(this.manager.element.style[it]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return Mt(this.manager.recognizers,(function(e){Pt(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(It(t,at))return at;var e=It(t,ht),i=It(t,lt);return e&&i?at:e||i?e?ht:lt:It(t,rt)?rt:st}(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=It(n,at)&&!dt[at],s=It(n,lt)&&!dt[lt],r=It(n,ht)&&!dt[ht];if(o){var a=1===t.pointers.length,h=t.distance<2,l=t.deltaTime<250;if(a&&h&&l)return}if(!r||!s)return o||s&&i&Dt||r&&i&Ct?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Nt(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Rt(t){var e=t.length;if(1===e)return{x:K(t[0].clientX),y:K(t[0].clientY)};for(var i=0,n=0,o=0;o<e;)i+=t[o].clientX,n+=t[o].clientY,o++;return{x:K(i/e),y:K(n/e)}}function Ft(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:K(t.pointers[i].clientX),clientY:K(t.pointers[i].clientY)},i++;return{timeStamp:tt(),pointers:e,center:Rt(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Lt(t,e,i){i||(i=Et);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function jt(t,e,i){i||(i=Et);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function Yt(t,e){return t===e?wt:J(t)>=J(e)?t<0?_t:xt:e<0?kt:St}function zt(t,e,i){return{x:e/t||0,y:i/t||0}}function Ht(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=Ft(e)),o>1&&!i.firstMultiple?i.firstMultiple=Ft(e):1===o&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=Rt(n);e.timeStamp=tt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=jt(a,h),e.distance=Lt(a,h),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},s=t.prevInput||{};e.eventType!==vt&&s.eventType!==yt||(o=t.prevDelta={x:s.deltaX||0,y:s.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=Yt(e.deltaX,e.deltaY);var l,d,c=zt(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=J(c.x)>J(c.y)?c.x:c.y,e.scale=r?(l=r.pointers,Lt((d=n)[0],d[1],Ot)/Lt(l[0],l[1],Ot)):1,e.rotation=r?function(t,e){return jt(e[1],e[0],Ot)+jt(t[1],t[0],Ot)}(r.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,s,r=t.lastInterval||e,a=e.timeStamp-r.timeStamp;if(e.eventType!==bt&&(a>gt||void 0===r.velocity)){var h=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,d=zt(a,h,l);n=d.x,o=d.y,i=J(d.x)>J(d.y)?d.x:d.y,s=Yt(h,l),t.lastInterval=e}else i=r.velocity,n=r.velocityX,o=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=s}(i,e);var u,p=t.element,m=e.srcEvent;Nt(u=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=u),e.target=p}function Gt(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,s=e&vt&&n-o==0,r=e&(yt|bt)&&n-o==0;i.isFirst=!!s,i.isFinal=!!r,s&&(t.session={}),i.eventType=e,Ht(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function Wt(t){return t.trim().split(/\s+/g)}function Bt(t,e,i){Mt(Wt(e),(function(e){t.addEventListener(e,i,!1)}))}function Vt(t,e,i){Mt(Wt(e),(function(e){t.removeEventListener(e,i,!1)}))}function Ut(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var $t=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){Pt(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Bt(this.element,this.evEl,this.domHandler),this.evTarget&&Bt(this.target,this.evTarget,this.domHandler),this.evWin&&Bt(Ut(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Vt(this.element,this.evEl,this.domHandler),this.evTarget&&Vt(this.target,this.evTarget,this.domHandler),this.evWin&&Vt(Ut(this.element),this.evWin,this.domHandler)},t}();function qt(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 Xt={pointerdown:vt,pointermove:2,pointerup:yt,pointercancel:bt,pointerout:bt},Qt={2:mt,3:"pen",4:ft,5:"kinect"},Zt="pointerdown",Kt="pointermove pointerup pointercancel";q.MSPointerEvent&&!q.PointerEvent&&(Zt="MSPointerDown",Kt="MSPointerMove MSPointerUp MSPointerCancel");var Jt=function(t){function e(){var i,n=e.prototype;return n.evEl=Zt,n.evWin=Kt,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return U(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=Xt[n],s=Qt[t.pointerType]||t.pointerType,r=s===mt,a=qt(e,t.pointerId,"pointerId");o&vt&&(0===t.button||r)?a<0&&(e.push(t),a=e.length-1):o&(yt|bt)&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))},e}($t);function te(t){return Array.prototype.slice.call(t,0)}function ee(t,e,i){for(var n=[],o=[],s=0;s<t.length;){var r=e?t[s][e]:t[s];qt(o,r)<0&&n.push(t[s]),o[s]=r,s++}return i&&(n=e?n.sort((function(t,i){return t[e]>i[e]})):n.sort()),n}var ie={touchstart:vt,touchmove:2,touchend:yt,touchcancel:bt},ne=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return U(e,t),e.prototype.handler=function(t){var e=ie[t.type],i=oe.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:mt,srcEvent:t})},e}($t);function oe(t,e){var i,n,o=te(t.touches),s=this.targetIds;if(e&(2|vt)&&1===o.length)return s[o[0].identifier]=!0,[o,o];var r=te(t.changedTouches),a=[],h=this.target;if(n=o.filter((function(t){return Nt(t.target,h)})),e===vt)for(i=0;i<n.length;)s[n[i].identifier]=!0,i++;for(i=0;i<r.length;)s[r[i].identifier]&&a.push(r[i]),e&(yt|bt)&&delete s[r[i].identifier],i++;return a.length?[ee(n.concat(a),"identifier",!0),a]:void 0}var se={mousedown:vt,mousemove:2,mouseup:yt},re=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 U(e,t),e.prototype.handler=function(t){var e=se[t.type];e&vt&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=yt),this.pressed&&(e&yt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:ft,srcEvent:t}))},e}($t),ae=2500;function he(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)}),ae)}}function le(t,e){t&vt?(this.primaryTouch=e.changedPointers[0].identifier,he.call(this,e)):t&(yt|bt)&&he.call(this,e)}function de(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],s=Math.abs(e-o.x),r=Math.abs(i-o.y);if(s<=25&&r<=25)return!0}return!1}var ce=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=i.pointerType===mt,s=i.pointerType===ft;if(!(s&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(o)le.call($($(n)),e,i);else if(s&&de.call($($(n)),i))return;n.callback(t,e,i)}},n.touch=new ne(n.manager,n.handler),n.mouse=new re(n.manager,n.handler),n.primaryTouch=null,n.lastTouches=[],n}return U(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}($t)}();function ue(t,e,i){return!!Array.isArray(t)&&(Mt(t,i[e],i),!0)}var pe=32,me=1;function fe(t,e){var i=e.manager;return i?i.get(t):t}function ge(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var ve=function(){function t(t){void 0===t&&(t={}),this.options=V({enable:!0},t),this.id=me++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return X(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(ue(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=fe(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return ue(t,"dropRecognizeWith",this)||(t=fe(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(ue(t,"requireFailure",this))return this;var e=this.requireFail;return-1===qt(e,t=fe(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(ue(t,"dropRequireFailure",this))return this;t=fe(t,this);var e=qt(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+ge(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+ge(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=pe},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=X({},t);if(!Pt(this.options.enable,[this,e]))return this.reset(),void(this.state=pe);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}(),ye=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,V({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}U(e,t);var i=e.prototype;return i.getTouchAction=function(){return[rt]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,s=t.deltaTime<i.time;if(this.reset(),t.eventType&vt&&0===this.count)return this.failTimeout();if(o&&s&&n){if(t.eventType!==yt)return this.failTimeout();var r=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||Lt(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&r?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 pe},i.failTimeout=function(){var t=this;return this._timer=setTimeout((function(){t.state=pe}),this.options.interval),pe},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}(ve),be=function(t){function e(e){return void 0===e&&(e={}),t.call(this,V({pointers:1},e))||this}U(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&&(i&bt||!o)?16|e:n||o?i&yt?8|e:2&e?4|e:2:pe},e}(ve);function we(t){return t===St?"down":t===kt?"up":t===_t?"left":t===xt?"right":""}var _e=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,V({event:"pan",threshold:10,pointers:1,direction:Tt},e))||this).pX=null,i.pY=null,i}U(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return t&Dt&&e.push(lt),t&Ct&&e.push(ht),e},i.directionTest=function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,s=t.deltaX,r=t.deltaY;return o&e.direction||(e.direction&Dt?(o=0===s?wt:s<0?_t:xt,i=s!==this.pX,n=Math.abs(t.deltaX)):(o=0===r?wt:r<0?kt:St,i=r!==this.pY,n=Math.abs(t.deltaY))),t.direction=o,i&&n>e.threshold&&o&e.direction},i.attrTest=function(t){return be.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=we(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(be),xe=function(t){function e(e){return void 0===e&&(e={}),t.call(this,V({event:"swipe",threshold:10,velocity:.3,direction:Dt|Ct,pointers:1},e))||this}U(e,t);var i=e.prototype;return i.getTouchAction=function(){return _e.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,n=this.options.direction;return n&(Dt|Ct)?i=e.overallVelocity:n&Dt?i=e.overallVelocityX:n&Ct&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&J(i)>this.options.velocity&&e.eventType&yt},i.emit=function(t){var e=we(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(be),ke=function(t){function e(e){return void 0===e&&(e={}),t.call(this,V({event:"pinch",threshold:0,pointers:2},e))||this}U(e,t);var i=e.prototype;return i.getTouchAction=function(){return[at]},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}(be),Se=function(t){function e(e){return void 0===e&&(e={}),t.call(this,V({event:"rotate",threshold:0,pointers:2},e))||this}U(e,t);var i=e.prototype;return i.getTouchAction=function(){return[at]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(be),De=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,V({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}U(e,t);var i=e.prototype;return i.getTouchAction=function(){return[st]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,s=t.deltaTime>i.time;if(this._input=t,!o||!n||t.eventType&(yt|bt)&&!s)this.reset();else if(t.eventType&vt)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(t.eventType&yt)return 8;return pe},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&t.eventType&yt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=tt(),this.manager.emit(this.options.event,this._input)))},e}(ve),Ce={domEvents:!1,touchAction:ot,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Te=[[Se,{enable:!1}],[ke,{enable:!1},["rotate"]],[xe,{direction:Dt}],[_e,{direction:Dt},["swipe"]],[ye],[ye,{event:"doubletap",taps:2},["tap"]],[De]];function Ee(t,e){var i,n=t.element;n.style&&(Mt(t.options.cssProps,(function(o,s){i=et(n.style,s),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var Oe=function(){function t(t,e){var i,n=this;this.options=X({},Ce,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||(ut?Jt:pt?ne:ct?ce:re))(i,Gt),this.touchAction=new At(this,this.options.touchAction),Ee(this,!0),Mt(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 X(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 s=0;s<n.length;)i=n[s],2===e.stopped||o&&i!==o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t),!o&&14&i.state&&(e.curRecognizer=i,o=i),s++}},e.get=function(t){if(t instanceof ve)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(ue(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(ue(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,n=qt(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 Mt(Wt(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 Mt(Wt(t),(function(t){e?i[t]&&i[t].splice(qt(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&&Ee(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),Me={touchstart:vt,touchmove:2,touchend:yt,touchcancel:bt},Pe=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 U(e,t),e.prototype.handler=function(t){var e=Me[t.type];if(e===vt&&(this.started=!0),this.started){var i=Ie.call(this,t,e);e&(yt|bt)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:mt,srcEvent:t})}},e}($t);function Ie(t,e){var i=te(t.touches),n=te(t.changedTouches);return e&(yt|bt)&&(i=ee(i.concat(n),"identifier",!0)),[i,n]}function Ae(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 Ne=Ae((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`."),Re=Ae((function(t,e){return Ne(t,e,!0)}),"merge","Use `assign`.");function Fe(t,e,i){var n,o=e.prototype;(n=t.prototype=Object.create(o)).constructor=t,n._super=o,i&&X(n,i)}function Le(t,e){return function(){return t.apply(e,arguments)}}var je=function(){var t=function(t,e){return void 0===e&&(e={}),new Oe(t,V({recognizers:Te.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=Tt,t.DIRECTION_DOWN=St,t.DIRECTION_LEFT=_t,t.DIRECTION_RIGHT=xt,t.DIRECTION_UP=kt,t.DIRECTION_HORIZONTAL=Dt,t.DIRECTION_VERTICAL=Ct,t.DIRECTION_NONE=wt,t.DIRECTION_DOWN=St,t.INPUT_START=vt,t.INPUT_MOVE=2,t.INPUT_END=yt,t.INPUT_CANCEL=bt,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=pe,t.Manager=Oe,t.Input=$t,t.TouchAction=At,t.TouchInput=ne,t.MouseInput=re,t.PointerEventInput=Jt,t.TouchMouseInput=ce,t.SingleTouchInput=Pe,t.Recognizer=ve,t.AttrRecognizer=be,t.Tap=ye,t.Pan=_e,t.Swipe=xe,t.Pinch=ke,t.Rotate=Se,t.Press=De,t.on=Bt,t.off=Vt,t.each=Mt,t.merge=Re,t.extend=Ne,t.bindFn=Le,t.assign=X,t.inherit=Fe,t.bindFn=Le,t.prefixed=et,t.toArray=te,t.inArray=qt,t.uniqueArray=ee,t.splitStr=Wt,t.boolOrFn=Pt,t.hasParent=Nt,t.addEventListeners=Bt,t.removeEventListeners=Vt,t.defaults=X({},Ce,{preset:Te}),t}();je.defaults;var Ye=je;
|
||
/**
|
||
* vis-util
|
||
* https://github.com/visjs/vis-util
|
||
*
|
||
* utilitie collection for visjs
|
||
*
|
||
* @version 5.0.7
|
||
* @date 2023-11-20T09:06:51.067Z
|
||
*
|
||
* @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.
|
||
*/const ze=Symbol("DELETE");function He(t,...e){return Ge({},t,...e)}function Ge(...t){const e=We(...t);return Ve(e),e}function We(...t){if(t.length<2)return t[0];if(t.length>2)return We(Ge(t[0],t[1]),...t.slice(2));const e=t[0],i=t[1];if(e instanceof Date&&i instanceof Date)return e.setTime(i.getTime()),e;for(const t of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,t)&&(i[t]===ze?delete e[t]:null===e[t]||null===i[t]||"object"!=typeof e[t]||"object"!=typeof i[t]||Array.isArray(e[t])||Array.isArray(i[t])?e[t]=Be(i[t]):e[t]=We(e[t],i[t]));return e}function Be(t){return Array.isArray(t)?t.map((t=>Be(t))):"object"==typeof t&&null!==t?t instanceof Date?new Date(t.getTime()):We({},t):t}function Ve(t){for(const e of Object.keys(t))t[e]===ze?delete t[e]:"object"==typeof t[e]&&null!==t[e]&&Ve(t[e])}const Ue="undefined"!=typeof window?window.Hammer||Ye:function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};function $e(t){this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push((()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)}));const e=Ue(this._dom.overlay);e.on("tap",this._onTapOverlay.bind(this)),this._cleanupQueue.push((()=>{e.destroy()}));["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach((t=>{e.on(t,(t=>{t.srcEvent.stopPropagation()}))})),document&&document.body&&(this._onClick=e=>{(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push((()=>{document.body.removeEventListener("click",this._onClick)}))),this._escListener=t=>{("key"in t?"Escape"===t.key:27===t.keyCode)&&this.deactivate()}}B($e.prototype),$e.current=null,$e.prototype.destroy=function(){this.deactivate();for(const t of this._cleanupQueue.splice(0).reverse())t()},$e.prototype.activate=function(){$e.current&&$e.current.deactivate(),$e.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},$e.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},$e.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};const qe=/^\/?Date\((-?\d+)/i,Xe=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Qe=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Ze=/^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,Ke=/^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 Je(t){return t instanceof Number||"number"==typeof t}function ti(t){return t instanceof String||"string"==typeof t}function ei(t){return"object"==typeof t&&null!==t}function ii(t,e,i,n){let o=!1;!0===n&&(o=null===e[i]&&void 0!==t[i]),o?delete t[i]:t[i]=e[i]}const ni=Object.assign;function oi(t,e,i=!1,n=!1){for(const o in e)(Object.prototype.hasOwnProperty.call(e,o)||!0===i)&&("object"==typeof e[o]&&null!==e[o]&&Object.getPrototypeOf(e[o])===Object.prototype?void 0===t[o]?t[o]=oi({},e[o],i):"object"==typeof t[o]&&null!==t[o]&&Object.getPrototypeOf(t[o])===Object.prototype?oi(t[o],e[o],i):ii(t,e,o,n):Array.isArray(e[o])?t[o]=e[o].slice():ii(t,e,o,n));return t}function si(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"===e?"Number":"boolean"===e?"Boolean":"string"===e?"String":void 0===e?"undefined":e}function ri(t,e){return[...t,e]}function ai(t){return t.slice()}const hi=Object.values;const li={asBoolean:(t,e)=>("function"==typeof t&&(t=t()),null!=t?0!=t:e||null),asNumber:(t,e)=>("function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null),asString:(t,e)=>("function"==typeof t&&(t=t()),null!=t?String(t):e||null),asSize:(t,e)=>("function"==typeof t&&(t=t()),ti(t)?t:Je(t)?t+"px":e||null),asElement:(t,e)=>("function"==typeof t&&(t=t()),t||e||null)};function di(t){let e;switch(t.length){case 3:case 4:return e=Qe.exec(t),e?{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16)}:null;case 6:case 7:return e=Xe.exec(t),e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null;default:return null}}function ci(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)}function ui(t,e,i){t/=255,e/=255,i/=255;const n=Math.min(t,Math.min(e,i)),o=Math.max(t,Math.max(e,i));if(n===o)return{h:0,s:0,v:n};return{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}}function pi(t){const e=document.createElement("div"),i={};e.style.cssText=t;for(let t=0;t<e.style.length;++t)i[e.style[t]]=e.style.getPropertyValue(e.style[t]);return i}function mi(t,e,i){let n,o,s;const r=Math.floor(6*t),a=6*t-r,h=i*(1-e),l=i*(1-a*e),d=i*(1-(1-a)*e);switch(r%6){case 0:n=i,o=d,s=h;break;case 1:n=l,o=i,s=h;break;case 2:n=h,o=i,s=d;break;case 3:n=h,o=l,s=i;break;case 4:n=d,o=h,s=i;break;case 5:n=i,o=h,s=l}return{r:Math.floor(255*n),g:Math.floor(255*o),b:Math.floor(255*s)}}function fi(t,e,i){const n=mi(t,e,i);return ci(n.r,n.g,n.b)}function gi(t){const e=di(t);if(!e)throw new TypeError(`'${t}' is not a valid color.`);return ui(e.r,e.g,e.b)}function vi(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function yi(t){return Ze.test(t)}function bi(t){return Ke.test(t)}function wi(t){if(null===t||"object"!=typeof t)return null;if(t instanceof Element)return t;const e=Object.create(t);for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&"object"==typeof t[i]&&(e[i]=wi(t[i]));return e}const _i={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:(4-2*t)*t-1,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1- --t*t*t*t,easeInOutQuart:t=>t<.5?8*t*t*t*t:1-8*--t*t*t*t,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1+--t*t*t*t*t,easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t};const xi={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"};let ki=class{constructor(t=1){this.pixelRatio=t,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=()=>{},this.closeCallback=()=>{},this._create()}insertTo(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}setCloseCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}_isColorString(t){if("string"==typeof t)return xi[t]}setColor(t,e=!0){if("none"===t)return;let i;const n=this._isColorString(t);if(void 0!==n&&(t=n),!0===ti(t)){if(!0===yi(t)){const e=t.substr(4).substr(0,t.length-5).split(",");i={r:e[0],g:e[1],b:e[2],a:1}}else if(!0===bi(t)){const e=t.substr(5).substr(0,t.length-6).split(",");i={r:e[0],g:e[1],b:e[2],a:e[3]}}else if(!0===vi(t)){const e=di(t);i={r:e.r,g:e.g,b:e.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){const e=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:e}}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: "+JSON.stringify(t));this._setColor(i,e)}show(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(t=!0){!0===t&&(this.previousColor=Object.assign({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout((()=>{void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0)}),0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(t,e=!0){!0===e&&(this.initialColor=Object.assign({},t)),this.color=t;const i=ui(t.r,t.g,t.b),n=2*Math.PI,o=this.r*i.s,s=this.centerCoordinates.x+o*Math.sin(n*i.h),r=this.centerCoordinates.y+o*Math.cos(n*i.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=r-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){const e=ui(this.color.r,this.color.g,this.color.b);e.v=t/100;const i=mi(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(t=this.color){const e=ui(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);const 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),i.fill(),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+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){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){const t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}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);const t=this;this.opacityRange.onchange=function(){t._setOpacity(this.value)},this.opacityRange.oninput=function(){t._setOpacity(this.value)},this.brightnessRange.onchange=function(){t._setBrightness(this.value)},this.brightnessRange.oninput=function(){t._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=this._loadLast.bind(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)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new Ue(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",(t=>{t.isFirst&&this._moveSelector(t)})),this.hammer.on("tap",(t=>{this._moveSelector(t)})),this.hammer.on("panstart",(t=>{this._moveSelector(t)})),this.hammer.on("panmove",(t=>{this._moveSelector(t)})),this.hammer.on("panend",(t=>{this._moveSelector(t)}))}_generateHueCircle(){if(!1===this.generated){const 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);const e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;let n,o,s,r;t.clearRect(0,0,e,i),this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;const a=2*Math.PI/360,h=1/360,l=1/this.r;let d;for(s=0;s<360;s++)for(r=0;r<this.r;r++)n=this.centerCoordinates.x+r*Math.sin(a*s),o=this.centerCoordinates.y+r*Math.cos(a*s),d=mi(s*h,r*l,1),t.fillStyle="rgb("+d.r+","+d.g+","+d.b+")",t.fillRect(n-.5,o-.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,e,i)}this.generated=!0}_moveSelector(t){const e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,n=t.center.y-e.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,r=i-s,a=n-o,h=Math.atan2(r,a),l=.98*Math.min(Math.sqrt(r*r+a*a),s),d=Math.cos(h)*l+o,c=Math.sin(h)*l+s;this.colorPickerSelector.style.top=d-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";let u=h/(2*Math.PI);u=u<0?u+1:u;const p=l/this.r,m=ui(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;const f=mi(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+")"}};function Si(...t){if(t.length<1)throw new TypeError("Invalid arguments.");if(1===t.length)return document.createTextNode(t[0]);{const e=document.createElement(t[0]);return e.appendChild(Si(...t.slice(1))),e}}let Di,Ci=!1;const Ti="background: #FFeeee; color: #dd0000";const Ei=$e,Oi=ki,Mi=class{constructor(t,e,i,n=1,o=(()=>!1)){this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=o,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Object.assign(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new ki(n),this.wrapper=void 0}setOptions(t){if(void 0!==t){this.popupHistory={},this._removePopup();let e=!0;if("string"==typeof t)this.options.filter=t;else if(Array.isArray(t))this.options.filter=t.join();else if("object"==typeof t){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==t.filter&&(this.options.filter=t.filter),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===this.options.filter&&(e=!1),this.options.enabled=e}this._clean()}setModuleOptions(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const t=this.options.filter;let e=0,i=!1;for(const n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?(i=t(n,[]),i=i||this._handleObject(this.configureOptions[n],[n],!0)):!0!==t&&-1===t.indexOf(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()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}_clean(){for(let 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()}_getValue(t){let e=this.moduleOptions;for(let i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}_makeItem(t,...e){if(!0===this.allowCreation){const i=document.createElement("div");return i.className="vis-configuration vis-config-item vis-config-s"+t.length,e.forEach((t=>{i.appendChild(t)})),this.domElements.push(i),this.domElements.length}return 0}_makeHeader(t){const e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerText=t,this._makeItem([],e)}_makeLabel(t,e,i=!1){const n=document.createElement("div");if(n.className="vis-configuration vis-config-label vis-config-s"+e.length,!0===i){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(Si("i","b",t))}else n.innerText=t+":";return n}_makeDropdown(t,e,i){const n=document.createElement("select");n.className="vis-configuration vis-config-select";let o=0;void 0!==e&&-1!==t.indexOf(e)&&(o=t.indexOf(e));for(let e=0;e<t.length;e++){const i=document.createElement("option");i.value=t[e],e===o&&(i.selected="selected"),i.innerText=t[e],n.appendChild(i)}const s=this;n.onchange=function(){s._update(this.value,i)};const r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}_makeRange(t,e,i){const n=t[0],o=t[1],s=t[2],r=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=s}catch(t){}a.step=r;let h="",l=0;if(void 0!==e){const t=1.2;e<0&&e*t<o?(a.min=Math.ceil(e*t),l=a.min,h="range increased"):e/t<o&&(a.min=Math.ceil(e/t),l=a.min,h="range increased"),e*t>s&&1!==s&&(a.max=Math.ceil(e*t),l=a.max,h="range increased"),a.value=e}else a.value=n;const d=document.createElement("input");d.className="vis-configuration vis-config-rangeinput",d.value=a.value;const c=this;a.onchange=function(){d.value=this.value,c._update(Number(this.value),i)},a.oninput=function(){d.value=this.value};const u=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,u,a,d);""!==h&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(h,p))}_makeButton(){if(!0===this.options.showButton){const t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=()=>{this._printOptions()},t.onmouseover=()=>{t.className="vis-configuration vis-config-button hover"},t.onmouseout=()=>{t.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(t)}}_setupPopup(t,e){if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){const i=document.createElement("div");i.id="vis-configuration-popup",i.className="vis-configuration-popup",i.innerText=t,i.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:e}}}_removePopup(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(void 0!==this.popupDiv.html){const t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=setTimeout((()=>{this.popupDiv.html.style.opacity=0}),1500),this.popupDiv.deleteTimeout=setTimeout((()=>{this._removePopup()}),1800)}}_makeCheckbox(t,e,i){const 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"==typeof t?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));const o=this;n.onchange=function(){o._update(this.checked,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeTextInput(t,e,i){const 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});const o=this;n.onchange=function(){o._update(this.value,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeColorField(t,e,i){const n=t[1],o=document.createElement("div");"none"!==(e=void 0===e?n:e)?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=e):o.className="vis-configuration vis-config-colorBlock none",e=void 0===e?n:e,o.onclick=()=>{this._showColorPicker(e,o,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback((t=>{const n="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=n,this._update(n,i)})),this.colorPicker.setCloseCallback((()=>{e.onclick=()=>{this._showColorPicker(t,e,i)}}))}_handleObject(t,e=[],i=!1){let n=!1;const o=this.options.filter;let s=!1;for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){n=!0;const a=t[r],h=ri(e,r);if("function"==typeof o&&(n=o(r,e),!1===n&&!Array.isArray(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,h,!0),this.allowCreation=!1===i)),!1!==n){s=!0;const t=this._getValue(h);if(Array.isArray(a))this._handleArray(a,t,h);else if("string"==typeof a)this._makeTextInput(a,t,h);else if("boolean"==typeof a)this._makeCheckbox(a,t,h);else if(a instanceof Object){if(!this.hideOption(e,r,this.moduleOptions))if(void 0!==a.enabled){const t=ri(h,"enabled"),e=this._getValue(t);if(!0===e){const t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,e,h)}else{const t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}_handleArray(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)}))}_update(t,e){const 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)}_constructOptions(t,e,i={}){let n=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;i<e.length;i++)"global"!==e[i]&&(void 0===n[e[i]]&&(n[e[i]]={}),i!==e.length-1?n=n[e[i]]:n[e[i]]=t);return i}_printOptions(){const t=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(Si("pre","const options = "+JSON.stringify(t,null,2)))}getOptions(){const t={};for(let e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}},Pi=Ue,Ii=class{constructor(t,e){this.container=t,this.overflowMethod=e||"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)}setPosition(t,e){this.x=parseInt(t),this.y=parseInt(e)}setText(t){if(t instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(t)}else this.frame.innerText=t}show(t){if(void 0===t&&(t=!0),!0===t){const t=this.frame.clientHeight,e=this.frame.clientWidth,i=this.frame.parentNode.clientHeight,n=this.frame.parentNode.clientWidth;let o=0,s=0;if("flip"==this.overflowMethod){let i=!1,r=!0;this.y-t<this.padding&&(r=!1),this.x+e>n-this.padding&&(i=!0),o=i?this.x-e:this.x,s=r?this.y-t:this.y}else s=this.y-t,s+t+this.padding>i&&(s=i-t-this.padding),s<this.padding&&(s=this.padding),o=this.x,o+e+this.padding>n&&(o=n-e-this.padding),o<this.padding&&(o=this.padding);this.frame.style.left=o+"px",this.frame.style.top=s+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}},Ai=Ti,Ni=class t{static validate(e,i,n){Ci=!1,Di=i;let o=i;return void 0!==n&&(o=i[n]),t.parse(e,o,[]),Ci}static parse(e,i,n){for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.check(o,e,i,n)}static check(e,i,n,o){if(void 0===n[e]&&void 0===n.__any__)return void t.getSuggestion(e,n,o);let s=e,r=!0;void 0===n[e]&&void 0!==n.__any__&&(s="__any__",r="object"===t.getType(i[e]));let a=n[s];r&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,n,s,a,o)}static checkFields(e,i,n,o,s,r){const a=function(i){console.error("%c"+i+t.printLocation(r,e),Ti)},h=t.getType(i[e]),l=s[h];void 0!==l?"array"===t.getType(l)&&-1===l.indexOf(i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(l)+' not "'+i[e]+'". '),Ci=!0):"object"===h&&"__any__"!==o&&(r=ri(r,e),t.parse(i[e],n[o],r)):void 0===s.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print(Object.keys(s))+". Received ["+h+'] "'+i[e]+'"'),Ci=!0)}static getType(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Array.isArray(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}static getSuggestion(e,i,n){const o=t.findInOptions(e,i,n,!1),s=t.findInOptions(e,Di,[],!0);let r;r=void 0!==o.indexMatch?" in "+t.printLocation(o.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':s.distance<=4&&o.distance>s.distance?" in "+t.printLocation(o.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+t.printLocation(o.path,e):". Did you mean one of these: "+t.print(Object.keys(i))+t.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+r,Ti),Ci=!0}static findInOptions(e,i,n,o=!1){let s=1e9,r="",a=[];const h=e.toLowerCase();let l;for(const d in i){let c;if(void 0!==i[d].__type__&&!0===o){const o=t.findInOptions(e,i[d],ri(n,d));s>o.distance&&(r=o.closestMatch,a=o.path,s=o.distance,l=o.indexMatch)}else-1!==d.toLowerCase().indexOf(h)&&(l=d),c=t.levenshteinDistance(e,d),s>c&&(r=d,a=ai(n),s=c)}return{closestMatch:r,path:a,distance:s,indexMatch:l}}static printLocation(t,e,i="Problem value found at: \n"){let n="\n\n"+i+"options = {\n";for(let e=0;e<t.length;e++){for(let t=0;t<e+1;t++)n+=" ";n+=t[e]+": {\n"}for(let e=0;e<t.length+1;e++)n+=" ";n+=e+"\n";for(let e=0;e<t.length+1;e++){for(let i=0;i<t.length-e;i++)n+=" ";n+="}\n"}return n+"\n\n"}static print(t){return JSON.stringify(t).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const i=[];let n,o;for(n=0;n<=e.length;n++)i[n]=[n];for(o=0;o<=t.length;o++)i[0][o]=o;for(n=1;n<=e.length;n++)for(o=1;o<=t.length;o++)e.charAt(n-1)==t.charAt(o-1)?i[n][o]=i[n-1][o-1]:i[n][o]=Math.min(i[n-1][o-1]+1,Math.min(i[n][o-1]+1,i[n-1][o]+1));return i[e.length][t.length]}};var Ri,Fi=Object.freeze({__proto__:null,Activator:Ei,Alea:function(...t){return function(t){let[e,i,n]=function(...t){const e=function(){let t=4022871197;return function(e){const i=e.toString();for(let e=0;e<i.length;e++){t+=i.charCodeAt(e);let n=.02519603282416938*t;t=n>>>0,n-=t,n*=t,t=n>>>0,n-=t,t+=4294967296*n}return 2.3283064365386963e-10*(t>>>0)}}();let i=e(" "),n=e(" "),o=e(" ");for(let s=0;s<t.length;s++)i-=e(t[s]),i<0&&(i+=1),n-=e(t[s]),n<0&&(n+=1),o-=e(t[s]),o<0&&(o+=1);return[i,n,o]}(t),o=1;const s=()=>{const t=2091639*e+2.3283064365386963e-10*o;return e=i,i=n,n=t-(o=0|t)};return s.uint32=()=>4294967296*s(),s.fract53=()=>s()+11102230246251565e-32*(2097152*s()|0),s.algorithm="Alea",s.seed=t,s.version="0.9",s}(t.length?t:[Date.now()])},ColorPicker:Oi,Configurator:Mi,DELETE:ze,HSVToHex:fi,HSVToRGB:mi,Hammer:Pi,Popup:Ii,RGBToHSV:ui,RGBToHex:ci,VALIDATOR_PRINT_STYLE:Ai,Validator:Ni,addClassName:function(t,e){let i=t.className.split(" ");const n=e.split(" ");i=i.concat(n.filter((function(t){return!i.includes(t)}))),t.className=i.join(" ")},addCssText:function(t,e){const i=pi(e);for(const[e,n]of Object.entries(i))t.style.setProperty(e,n)},binarySearchCustom:function(t,e,i,n){let o=0,s=0,r=t.length-1;for(;s<=r&&o<1e4;){const a=Math.floor((s+r)/2),h=t[a],l=e(void 0===n?h[i]:h[i][n]);if(0==l)return a;-1==l?s=a+1:r=a-1,o++}return-1},binarySearchValue:function(t,e,i,n,o){let s,r,a,h,l=0,d=0,c=t.length-1;for(o=null!=o?o:function(t,e){return t==e?0:t<e?-1:1};d<=c&&l<1e4;){if(h=Math.floor(.5*(c+d)),s=t[Math.max(0,h-1)][i],r=t[h][i],a=t[Math.min(t.length-1,h+1)][i],0==o(r,e))return h;if(o(s,e)<0&&o(r,e)>0)return"before"==n?Math.max(0,h-1):h;if(o(r,e)<0&&o(a,e)>0)return"before"==n?h:Math.min(t.length-1,h+1);o(r,e)<0?d=h+1:c=h-1,l++}return-1},bridgeObject:wi,copyAndExtendArray:ri,copyArray:ai,deepExtend:oi,deepObjectAssign:Ge,easingFunctions:_i,equalArray:function(t,e){if(t.length!==e.length)return!1;for(let i=0,n=t.length;i<n;i++)if(t[i]!=e[i])return!1;return!0},extend:ni,fillIfDefined:function t(e,i,n=!1){for(const o in e)if(void 0!==i[o])if(null===i[o]||"object"!=typeof i[o])ii(e,i,o,n);else{const s=e[o],r=i[o];ei(s)&&ei(r)&&t(s,r,n)}},forEach:function(t,e){if(Array.isArray(t)){const i=t.length;for(let n=0;n<i;n++)e(t[n],n,t)}else for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&e(t[i],i,t)},getAbsoluteLeft:function(t){return t.getBoundingClientRect().left},getAbsoluteRight:function(t){return t.getBoundingClientRect().right},getAbsoluteTop:function(t){return t.getBoundingClientRect().top},getScrollBarWidth:function(){const t=document.createElement("p");t.style.width="100%",t.style.height="200px";const 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);const i=t.offsetWidth;e.style.overflow="scroll";let n=t.offsetWidth;return i==n&&(n=e.clientWidth),document.body.removeChild(e),i-n},getTarget:function(t=window.event){let 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,e instanceof Element))?e:null},getType:si,hasParent:function(t,e){let i=t;for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}return!1},hexToHSV:gi,hexToRGB:di,insertSort:function(t,e){for(let i=0;i<t.length;i++){const n=t[i];let o;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(ti(t)){if(qe.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},isNumber:Je,isObject:ei,isString:ti,isValidHex:vi,isValidRGB:yi,isValidRGBA:bi,mergeOptions:function(t,e,i,n={}){const o=function(t){return null!=t},s=function(t){return null!==t&&"object"==typeof t};if(!s(t))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!o(i))throw new Error("Parameter option must have a value");if(!s(n))throw new Error("Parameter globalOptions must be an object");const r=e[i],a=s(n)&&!function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(n),h=a?n[i]:void 0,l=h?h.enabled:void 0;if(void 0===r)return;if("boolean"==typeof r)return s(t[i])||(t[i]={}),void(t[i].enabled=r);if(null===r&&!s(t[i])){if(!o(h))return;t[i]=Object.create(h)}if(!s(r))return;let d=!0;void 0!==r.enabled?d=r.enabled:void 0!==l&&(d=h.enabled),function(t,e,i){s(t[i])||(t[i]={});const n=e[i],o=t[i];for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t])}(t,e,i),t[i].enabled=d},option:li,overrideOpacity:function(t,e){if(t.includes("rgba"))return t;if(t.includes("rgb")){const i=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}{const i=di(t);return null==i?t:"rgba("+i.r+","+i.g+","+i.b+","+e+")"}},parseColor:function(t,e){if(ti(t)){let e=t;if(yi(e)){const t=e.substr(4).substr(0,e.length-5).split(",").map((function(t){return parseInt(t)}));e=ci(t[0],t[1],t[2])}if(!0===vi(e)){const t=gi(e),i={h:t.h,s:.8*t.s,v:Math.min(1,1.02*t.v)},n={h:t.h,s:Math.min(1,1.25*t.s),v:.8*t.v},o=fi(n.h,n.s,n.v),s=fi(i.h,i.s,i.v);return{background:e,border:o,highlight:{background:s,border:o},hover:{background:s,border:o}}}return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}if(e){return{background:t.background||e.background,border:t.border||e.border,highlight:ti(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:ti(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}}}return{background:t.background||void 0,border:t.border||void 0,highlight:ti(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:ti(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)},pureDeepObjectAssign:He,recursiveDOMDelete:function t(e){if(e)for(;!0===e.hasChildNodes();){const i=e.firstChild;i&&(t(i),e.removeChild(i))}},removeClassName:function(t,e){let i=t.className.split(" ");const n=e.split(" ");i=i.filter((function(t){return!n.includes(t)})),t.className=i.join(" ")},removeCssText:function(t,e){const i=pi(e);for(const e of Object.keys(i))t.style.removeProperty(e)},selectiveBridgeObject:function(t,e){if(null!==e&&"object"==typeof e){const i=Object.create(e);for(let n=0;n<t.length;n++)Object.prototype.hasOwnProperty.call(e,t[n])&&"object"==typeof e[t[n]]&&(i[t[n]]=wi(e[t[n]]));return i}return null},selectiveDeepExtend:function(t,e,i,n=!1){if(Array.isArray(i))throw new TypeError("Arrays are not supported by deepExtend");for(let o=0;o<t.length;o++){const s=t[o];if(Object.prototype.hasOwnProperty.call(i,s))if(i[s]&&i[s].constructor===Object)void 0===e[s]&&(e[s]={}),e[s].constructor===Object?oi(e[s],i[s],!1,n):ii(e,i,s,n);else{if(Array.isArray(i[s]))throw new TypeError("Arrays are not supported by deepExtend");ii(e,i,s,n)}}return e},selectiveExtend:function(t,e,...i){if(!Array.isArray(t))throw new Error("Array with property names expected as first argument");for(const n of i)for(let i=0;i<t.length;i++){const o=t[i];n&&Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},selectiveNotDeepExtend:function(t,e,i,n=!1){if(Array.isArray(i))throw new TypeError("Arrays are not supported by deepExtend");for(const o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&!t.includes(o))if(i[o]&&i[o].constructor===Object)void 0===e[o]&&(e[o]={}),e[o].constructor===Object?oi(e[o],i[o]):ii(e,i,o,n);else if(Array.isArray(i[o])){e[o]=[];for(let t=0;t<i[o].length;t++)e[o].push(i[o][t])}else ii(e,i,o,n);return e},throttle:function(t){let e=!1;return()=>{e||(e=!0,requestAnimationFrame((()=>{e=!1,t()})))}},toArray:hi,topMost:function(t,e){let i;Array.isArray(e)||(e=[e]);for(const n of t)if(n){i=n[e[0]];for(let t=1;t<e.length;t++)i&&(i=i[e[t]]);if(void 0!==i)break}return i},updateProperty:function(t,e,i){return t[e]!==i&&(t[e]=i,!0)}}),Li=new Uint8Array(16);function ji(){if(!Ri&&!(Ri="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ri(Li)}var Yi=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var zi=[],Hi=0;Hi<256;++Hi)zi.push((Hi+256).toString(16).substr(1));function Gi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(zi[t[e+0]]+zi[t[e+1]]+zi[t[e+2]]+zi[t[e+3]]+"-"+zi[t[e+4]]+zi[t[e+5]]+"-"+zi[t[e+6]]+zi[t[e+7]]+"-"+zi[t[e+8]]+zi[t[e+9]]+"-"+zi[t[e+10]]+zi[t[e+11]]+zi[t[e+12]]+zi[t[e+13]]+zi[t[e+14]]+zi[t[e+15]]).toLowerCase();if(!function(t){return"string"==typeof t&&Yi.test(t)}(i))throw TypeError("Stringified UUID is invalid");return i}function Wi(t,e,i){var n=(t=t||{}).random||(t.rng||ji)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){i=i||0;for(var o=0;o<16;++o)e[i+o]=n[o];return e}return Gi(n)}
|
||
/**
|
||
* vis-data
|
||
* http://visjs.org/
|
||
*
|
||
* Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
|
||
*
|
||
* @version 7.1.9
|
||
* @date 2023-11-24T17:53:34.179Z
|
||
*
|
||
* @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.
|
||
*/class Bi{_source;_transformers;_target;_listeners={add:this._add.bind(this),remove:this._remove.bind(this),update:this._update.bind(this)};constructor(t,e,i){this._source=t,this._transformers=e,this._target=i}all(){return this._target.update(this._transformItems(this._source.get())),this}start(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}stop(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}_transformItems(t){return this._transformers.reduce(((t,e)=>e(t)),t)}_add(t,e){null!=e&&this._target.add(this._transformItems(this._source.get(e.items)))}_update(t,e){null!=e&&this._target.update(this._transformItems(this._source.get(e.items)))}_remove(t,e){null!=e&&this._target.remove(this._transformItems(e.oldData))}}class Vi{_source;_transformers=[];constructor(t){this._source=t}filter(t){return this._transformers.push((e=>e.filter(t))),this}map(t){return this._transformers.push((e=>e.map(t))),this}flatMap(t){return this._transformers.push((e=>e.flatMap(t))),this}to(t){return new Bi(this._source,this._transformers,t)}}function Ui(t){return"string"==typeof t||"number"==typeof t}class $i{delay;max;_queue=[];_timeout=null;_extended=null;constructor(t){this.delay=null,this.max=1/0,this.setOptions(t)}setOptions(t){t&&void 0!==t.delay&&(this.delay=t.delay),t&&void 0!==t.max&&(this.max=t.max),this._flushIfNeeded()}static extend(t,e){const i=new $i(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=()=>{i.flush()};const n=[{name:"flush",original:void 0}];if(e&&e.replace)for(let o=0;o<e.replace.length;o++){const s=e.replace[o];n.push({name:s,original:t[s]}),i.replace(t,s)}return i._extended={object:t,methods:n},i}destroy(){if(this.flush(),this._extended){const t=this._extended.object,e=this._extended.methods;for(let i=0;i<e.length;i++){const n=e[i];n.original?t[n.name]=n.original:delete t[n.name]}this._extended=null}}replace(t,e){const i=this,n=t[e];if(!n)throw new Error("Method "+e+" undefined");t[e]=function(...t){i.queue({args:t,fn:n,context:this})}}queue(t){"function"==typeof t?this._queue.push({fn:t}):this._queue.push(t),this._flushIfNeeded()}_flushIfNeeded(){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=setTimeout((()=>{this.flush()}),this.delay))}flush(){this._queue.splice(0).forEach((t=>{t.fn.apply(t.context||t.fn,t.args||[])}))}}class qi{_subscribers={"*":[],add:[],remove:[],update:[]};_trigger(t,e,i){if("*"===t)throw new Error("Cannot trigger event *");[...this._subscribers[t],...this._subscribers["*"]].forEach((n=>{n(t,e,null!=i?i:null)}))}on(t,e){"function"==typeof e&&this._subscribers[t].push(e)}off(t,e){this._subscribers[t]=this._subscribers[t].filter((t=>t!==e))}subscribe=qi.prototype.on;unsubscribe=qi.prototype.off}class Xi{_pairs;constructor(t){this._pairs=t}*[Symbol.iterator](){for(const[t,e]of this._pairs)yield[t,e]}*entries(){for(const[t,e]of this._pairs)yield[t,e]}*keys(){for(const[t]of this._pairs)yield t}*values(){for(const[,t]of this._pairs)yield t}toIdArray(){return[...this._pairs].map((t=>t[0]))}toItemArray(){return[...this._pairs].map((t=>t[1]))}toEntryArray(){return[...this._pairs]}toObjectMap(){const t=Object.create(null);for(const[e,i]of this._pairs)t[e]=i;return t}toMap(){return new Map(this._pairs)}toIdSet(){return new Set(this.toIdArray())}toItemSet(){return new Set(this.toItemArray())}cache(){return new Xi([...this._pairs])}distinct(t){const e=new Set;for(const[i,n]of this._pairs)e.add(t(n,i));return e}filter(t){const e=this._pairs;return new Xi({*[Symbol.iterator](){for(const[i,n]of e)t(n,i)&&(yield[i,n])}})}forEach(t){for(const[e,i]of this._pairs)t(i,e)}map(t){const e=this._pairs;return new Xi({*[Symbol.iterator](){for(const[i,n]of e)yield[i,t(n,i)]}})}max(t){const e=this._pairs[Symbol.iterator]();let i=e.next();if(i.done)return null;let n=i.value[1],o=t(i.value[1],i.value[0]);for(;!(i=e.next()).done;){const[e,s]=i.value,r=t(s,e);r>o&&(o=r,n=s)}return n}min(t){const e=this._pairs[Symbol.iterator]();let i=e.next();if(i.done)return null;let n=i.value[1],o=t(i.value[1],i.value[0]);for(;!(i=e.next()).done;){const[e,s]=i.value,r=t(s,e);r<o&&(o=r,n=s)}return n}reduce(t,e){for(const[i,n]of this._pairs)e=t(e,n,i);return e}sort(t){return new Xi({[Symbol.iterator]:()=>[...this._pairs].sort((([e,i],[n,o])=>t(i,o,e,n)))[Symbol.iterator]()})}}class Qi extends qi{flush;length;get idProp(){return this._idProp}_options;_data;_idProp;_queue=null;constructor(t,e){super(),t&&!Array.isArray(t)&&(e=t,t=[]),this._options=e||{},this._data=new Map,this.length=0,this._idProp=this._options.fieldId||"id",t&&t.length&&this.add(t),this.setOptions(e)}setOptions(t){t&&void 0!==t.queue&&(!1===t.queue?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=$i.extend(this,{replace:["add","update","remove"]})),t.queue&&"object"==typeof t.queue&&this._queue.setOptions(t.queue)))}add(t,e){const i=[];let n;if(Array.isArray(t)){if(t.map((t=>t[this._idProp])).some((t=>this._data.has(t))))throw new Error("A duplicate id was found in the parameter array.");for(let e=0,o=t.length;e<o;e++)n=this._addItem(t[e]),i.push(n)}else{if(!t||"object"!=typeof t)throw new Error("Unknown dataType");n=this._addItem(t),i.push(n)}return i.length&&this._trigger("add",{items:i},e),i}update(t,e){const i=[],n=[],o=[],s=[],r=this._idProp,a=t=>{const e=t[r];if(null!=e&&this._data.has(e)){const i=t,r=Object.assign({},this._data.get(e)),a=this._updateItem(i);n.push(a),s.push(i),o.push(r)}else{const e=this._addItem(t);i.push(e)}};if(Array.isArray(t))for(let e=0,i=t.length;e<i;e++)t[e]&&"object"==typeof t[e]?a(t[e]):console.warn("Ignoring input item, which is not an object at index "+e);else{if(!t||"object"!=typeof t)throw new Error("Unknown dataType");a(t)}if(i.length&&this._trigger("add",{items:i},e),n.length){const t={items:n,oldData:o,data:s};this._trigger("update",t,e)}return i.concat(n)}updateOnly(t,e){Array.isArray(t)||(t=[t]);const i=t.map((t=>{const e=this._data.get(t[this._idProp]);if(null==e)throw new Error("Updating non-existent items is not allowed.");return{oldData:e,update:t}})).map((({oldData:t,update:e})=>{const i=t[this._idProp],n=He(t,e);return this._data.set(i,n),{id:i,oldData:t,updatedData:n}}));if(i.length){const t={items:i.map((t=>t.id)),oldData:i.map((t=>t.oldData)),data:i.map((t=>t.updatedData))};return this._trigger("update",t,e),t.items}return[]}get(t,e){let i,n,o;Ui(t)?(i=t,o=e):Array.isArray(t)?(n=t,o=e):o=t;const s=o&&"Object"===o.returnType?"Object":"Array",r=o&&o.filter,a=[];let h,l,d;if(null!=i)h=this._data.get(i),h&&r&&!r(h)&&(h=void 0);else if(null!=n)for(let t=0,e=n.length;t<e;t++)h=this._data.get(n[t]),null==h||r&&!r(h)||a.push(h);else{l=[...this._data.keys()];for(let t=0,e=l.length;t<e;t++)d=l[t],h=this._data.get(d),null==h||r&&!r(h)||a.push(h)}if(o&&o.order&&null==i&&this._sort(a,o.order),o&&o.fields){const t=o.fields;if(null!=i&&null!=h)h=this._filterFields(h,t);else for(let e=0,i=a.length;e<i;e++)a[e]=this._filterFields(a[e],t)}if("Object"==s){const t={};for(let e=0,i=a.length;e<i;e++){const i=a[e];t[i[this._idProp]]=i}return t}return null!=i?h??null:a}getIds(t){const e=this._data,i=t&&t.filter,n=t&&t.order,o=[...e.keys()],s=[];if(i)if(n){const t=[];for(let e=0,n=o.length;e<n;e++){const n=o[e],s=this._data.get(n);null!=s&&i(s)&&t.push(s)}this._sort(t,n);for(let e=0,i=t.length;e<i;e++)s.push(t[e][this._idProp])}else for(let t=0,e=o.length;t<e;t++){const e=o[t],n=this._data.get(e);null!=n&&i(n)&&s.push(n[this._idProp])}else if(n){const t=[];for(let i=0,n=o.length;i<n;i++){const n=o[i];t.push(e.get(n))}this._sort(t,n);for(let e=0,i=t.length;e<i;e++)s.push(t[e][this._idProp])}else for(let t=0,i=o.length;t<i;t++){const i=o[t],n=e.get(i);null!=n&&s.push(n[this._idProp])}return s}getDataSet(){return this}forEach(t,e){const i=e&&e.filter,n=[...this._data.keys()];if(e&&e.order){const i=this.get(e);for(let e=0,n=i.length;e<n;e++){const n=i[e];t(n,n[this._idProp])}}else for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._data.get(o);null==s||i&&!i(s)||t(s,o)}}map(t,e){const i=e&&e.filter,n=[],o=[...this._data.keys()];for(let e=0,s=o.length;e<s;e++){const s=o[e],r=this._data.get(s);null==r||i&&!i(r)||n.push(t(r,s))}return e&&e.order&&this._sort(n,e.order),n}_filterFields(t,e){return t?(Array.isArray(e)?e:Object.keys(e)).reduce(((e,i)=>(e[i]=t[i],e)),{}):t}_sort(t,e){if("string"==typeof e){const i=e;t.sort(((t,e)=>{const 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");t.sort(e)}}remove(t,e){const i=[],n=[],o=Array.isArray(t)?t:[t];for(let t=0,e=o.length;t<e;t++){const e=this._remove(o[t]);if(e){const t=e[this._idProp];null!=t&&(i.push(t),n.push(e))}}return i.length&&this._trigger("remove",{items:i,oldData:n},e),i}_remove(t){let e;if(Ui(t)?e=t:t&&"object"==typeof t&&(e=t[this._idProp]),null!=e&&this._data.has(e)){const t=this._data.get(e)||null;return this._data.delete(e),--this.length,t}return null}clear(t){const e=[...this._data.keys()],i=[];for(let t=0,n=e.length;t<n;t++)i.push(this._data.get(e[t]));return this._data.clear(),this.length=0,this._trigger("remove",{items:e,oldData:i},t),e}max(t){let e=null,i=null;for(const n of this._data.values()){const o=n[t];"number"==typeof o&&(null==i||o>i)&&(e=n,i=o)}return e||null}min(t){let e=null,i=null;for(const n of this._data.values()){const o=n[t];"number"==typeof o&&(null==i||o<i)&&(e=n,i=o)}return e||null}distinct(t){const e=this._data,i=[...e.keys()],n=[];let o=0;for(let s=0,r=i.length;s<r;s++){const r=i[s],a=e.get(r)[t];let h=!1;for(let t=0;t<o;t++)if(n[t]==a){h=!0;break}h||void 0===a||(n[o]=a,o++)}return n}_addItem(t){const e=function(t,e){return null==t[e]&&(t[e]=Wi()),t}(t,this._idProp),i=e[this._idProp];if(this._data.has(i))throw new Error("Cannot add item: item with id "+i+" already exists");return this._data.set(i,e),++this.length,i}_updateItem(t){const e=t[this._idProp];if(null==e)throw new Error("Cannot update item: item has no id (item: "+JSON.stringify(t)+")");const i=this._data.get(e);if(!i)throw new Error("Cannot update item: no item with id "+e+" found");return this._data.set(e,{...i,...t}),e}stream(t){if(t){const e=this._data;return new Xi({*[Symbol.iterator](){for(const i of t){const t=e.get(i);null!=t&&(yield[i,t])}}})}return new Xi({[Symbol.iterator]:this._data.entries.bind(this._data)})}}class Zi extends qi{length=0;get idProp(){return this.getDataSet().idProp}_listener;_data;_ids=new Set;_options;constructor(t,e){super(),this._options=e||{},this._listener=this._onEvent.bind(this),this.setData(t)}setData(t){if(this._data){this._data.off&&this._data.off("*",this._listener);const t=this._data.getIds({filter:this._options.filter}),e=this._data.get(t);this._ids.clear(),this.length=0,this._trigger("remove",{items:t,oldData:e})}if(null!=t){this._data=t;const e=this._data.getIds({filter:this._options.filter});for(let t=0,i=e.length;t<i;t++){const i=e[t];this._ids.add(i)}this.length=e.length,this._trigger("add",{items:e})}else this._data=new Qi;this._data.on&&this._data.on("*",this._listener)}refresh(){const t=this._data.getIds({filter:this._options.filter}),e=[...this._ids],i={},n=[],o=[],s=[];for(let e=0,o=t.length;e<o;e++){const o=t[e];i[o]=!0,this._ids.has(o)||(n.push(o),this._ids.add(o))}for(let t=0,n=e.length;t<n;t++){const n=e[t],r=this._data.get(n);null==r?console.error("If you see this, report it please."):i[n]||(o.push(n),s.push(r),this._ids.delete(n))}this.length+=n.length-o.length,n.length&&this._trigger("add",{items:n}),o.length&&this._trigger("remove",{items:o,oldData:s})}get(t,e){if(null==this._data)return null;let i,n=null;Ui(t)||Array.isArray(t)?(n=t,i=e):i=t;const o=Object.assign({},this._options,i),s=this._options.filter,r=i&&i.filter;return s&&r&&(o.filter=t=>s(t)&&r(t)),null==n?this._data.get(o):this._data.get(n,o)}getIds(t){if(this._data.length){const e=this._options.filter,i=null!=t?t.filter:null;let n;return n=i?e?t=>e(t)&&i(t):i:e,this._data.getIds({filter:n,order:t&&t.order})}return[]}forEach(t,e){if(this._data){const i=this._options.filter,n=e&&e.filter;let o;o=n?i?function(t){return i(t)&&n(t)}:n:i,this._data.forEach(t,{filter:o,order:e&&e.order})}}map(t,e){if(this._data){const i=this._options.filter,n=e&&e.filter;let o;return o=n?i?t=>i(t)&&n(t):n:i,this._data.map(t,{filter:o,order:e&&e.order})}return[]}getDataSet(){return this._data.getDataSet()}stream(t){return this._data.stream(t||{[Symbol.iterator]:this._ids.keys.bind(this._ids)})}dispose(){this._data?.off&&this._data.off("*",this._listener);const t="This data view has already been disposed of.",e={get:()=>{throw new Error(t)},set:()=>{throw new Error(t)},configurable:!1};for(const t of Reflect.ownKeys(Zi.prototype))Object.defineProperty(this,t,e)}_onEvent(t,e,i){if(!e||!e.items||!this._data)return;const n=e.items,o=[],s=[],r=[],a=[],h=[],l=[];switch(t){case"add":for(let t=0,e=n.length;t<e;t++){const e=n[t];this.get(e)&&(this._ids.add(e),o.push(e))}break;case"update":for(let t=0,i=n.length;t<i;t++){const i=n[t];this.get(i)?this._ids.has(i)?(s.push(i),h.push(e.data[t]),a.push(e.oldData[t])):(this._ids.add(i),o.push(i)):this._ids.has(i)&&(this._ids.delete(i),r.push(i),l.push(e.oldData[t]))}break;case"remove":for(let t=0,i=n.length;t<i;t++){const i=n[t];this._ids.has(i)&&(this._ids.delete(i),r.push(i),l.push(e.oldData[t]))}}this.length+=o.length-r.length,o.length&&this._trigger("add",{items:o},i),s.length&&this._trigger("update",{items:s,oldData:a,data:h},i),r.length&&this._trigger("remove",{items:r,oldData:l},i)}}function Ki(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ji,tn={exports:{}};(Ji=tn).exports=function(){var t,e;function i(){return t.apply(null,arguments)}function n(e){t=e}function o(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 r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function a(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(r(t,e))return!1;return!0}function h(t){return void 0===t}function l(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function d(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function c(t,e){var i,n=[],o=t.length;for(i=0;i<o;++i)n.push(e(t[i],i));return n}function u(t,e){for(var i in e)r(e,i)&&(t[i]=e[i]);return r(e,"toString")&&(t.toString=e.toString),r(e,"valueOf")&&(t.valueOf=e.valueOf),t}function p(t,e,i,n){return Ui(t,e,i,n,!0).utc()}function m(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function f(t){return null==t._pf&&(t._pf=m()),t._pf}function g(t){var i=null,n=!1,o=t._d&&!isNaN(t._d.getTime());return o&&(i=f(t),n=e.call(i.parsedDateParts,(function(t){return null!=t})),o=i.overflow<0&&!i.empty&&!i.invalidEra&&!i.invalidMonth&&!i.invalidWeekday&&!i.weekdayMismatch&&!i.nullInput&&!i.invalidFormat&&!i.userInvalidated&&(!i.meridiem||i.meridiem&&n),t._strict&&(o=o&&0===i.charsLeftOver&&0===i.unusedTokens.length&&void 0===i.bigHour)),null!=Object.isFrozen&&Object.isFrozen(t)?o:(t._isValid=o,t._isValid)}function v(t){var e=p(NaN);return null!=t?u(f(e),t):f(e).userInvalidated=!0,e}e=Array.prototype.some?Array.prototype.some:function(t){var e,i=Object(this),n=i.length>>>0;for(e=0;e<n;e++)if(e in i&&t.call(this,i[e],e,i))return!0;return!1};var y=i.momentProperties=[],b=!1;function w(t,e){var i,n,o,s=y.length;if(h(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),h(e._i)||(t._i=e._i),h(e._f)||(t._f=e._f),h(e._l)||(t._l=e._l),h(e._strict)||(t._strict=e._strict),h(e._tzm)||(t._tzm=e._tzm),h(e._isUTC)||(t._isUTC=e._isUTC),h(e._offset)||(t._offset=e._offset),h(e._pf)||(t._pf=f(e)),h(e._locale)||(t._locale=e._locale),s>0)for(i=0;i<s;i++)h(o=e[n=y[i]])||(t[n]=o);return t}function _(t){w(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function x(t){return t instanceof _||null!=t&&null!=t._isAMomentObject}function k(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function S(t,e){var n=!0;return u((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){var o,s,a,h=[],l=arguments.length;for(s=0;s<l;s++){if(o="","object"==typeof arguments[s]){for(a in o+="\n["+s+"] ",arguments[0])r(arguments[0],a)&&(o+=a+": "+arguments[0][a]+", ");o=o.slice(0,-2)}else o=arguments[s];h.push(o)}k(t+"\nArguments: "+Array.prototype.slice.call(h).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var D,C={};function T(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),C[t]||(k(e),C[t]=!0)}function E(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function O(t){var e,i;for(i in t)r(t,i)&&(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)}function M(t,e){var i,n=u({},t);for(i in e)r(e,i)&&(s(t[i])&&s(e[i])?(n[i]={},u(n[i],t[i]),u(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);for(i in t)r(t,i)&&!r(e,i)&&s(t[i])&&(n[i]=u({},n[i]));return n}function P(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,D=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)r(t,e)&&i.push(e);return i};var I={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function A(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return E(n)?n.call(e,i):n}function N(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 R=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,L={},j={};function Y(t,e,i,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),t&&(j[t]=o),e&&(j[e[0]]=function(){return N(o.apply(this,arguments),e[1],e[2])}),i&&(j[i]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function z(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function H(t){var e,i,n=t.match(R);for(e=0,i=n.length;e<i;e++)j[n[e]]?n[e]=j[n[e]]:n[e]=z(n[e]);return function(e){var o,s="";for(o=0;o<i;o++)s+=E(n[o])?n[o].call(e,t):n[o];return s}}function G(t,e){return t.isValid()?(e=W(e,t.localeData()),L[e]=L[e]||H(e),L[e](t)):t.localeData().invalidDate()}function W(t,e){var i=5;function n(t){return e.longDateFormat(t)||t}for(F.lastIndex=0;i>=0&&F.test(t);)t=t.replace(F,n),F.lastIndex=0,i-=1;return t}var B={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function V(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.match(R).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])}var U="Invalid date";function $(){return this._invalidDate}var q="%d",X=/\d{1,2}/;function Q(t){return this._ordinal.replace("%d",t)}var Z={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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function K(t,e,i,n){var o=this._relativeTime[i];return E(o)?o(t,e,i,n):o.replace(/%d/i,t)}function J(t,e){var i=this._relativeTime[t>0?"future":"past"];return E(i)?i(e):i.replace(/%s/i,e)}var tt={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function et(t){return"string"==typeof t?tt[t]||tt[t.toLowerCase()]:void 0}function it(t){var e,i,n={};for(i in t)r(t,i)&&(e=et(i))&&(n[e]=t[i]);return n}var nt={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ot(t){var e,i=[];for(e in t)r(t,e)&&i.push({unit:e,priority:nt[e]});return i.sort((function(t,e){return t.priority-e.priority})),i}var st,rt=/\d/,at=/\d\d/,ht=/\d{3}/,lt=/\d{4}/,dt=/[+-]?\d{6}/,ct=/\d\d?/,ut=/\d\d\d\d?/,pt=/\d\d\d\d\d\d?/,mt=/\d{1,3}/,ft=/\d{1,4}/,gt=/[+-]?\d{1,6}/,vt=/\d+/,yt=/[+-]?\d+/,bt=/Z|[+-]\d\d:?\d\d/gi,wt=/Z|[+-]\d\d(?::?\d\d)?/gi,_t=/[+-]?\d+(\.\d{1,3})?/,xt=/[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,kt=/^[1-9]\d?/,St=/^([1-9]\d|\d)/;function Dt(t,e,i){st[t]=E(e)?e:function(t,n){return t&&i?i:e}}function Ct(t,e){return r(st,t)?st[t](e._strict,e._locale):new RegExp(Tt(t))}function Tt(t){return Et(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,i,n,o){return e||i||n||o})))}function Et(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ot(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function Mt(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=Ot(e)),i}st={};var Pt={};function It(t,e){var i,n,o=e;for("string"==typeof t&&(t=[t]),l(e)&&(o=function(t,i){i[e]=Mt(t)}),n=t.length,i=0;i<n;i++)Pt[t[i]]=o}function At(t,e){It(t,(function(t,i,n,o){n._w=n._w||{},e(t,n._w,n,o)}))}function Nt(t,e,i){null!=e&&r(Pt,t)&&Pt[t](e,i._a,i,t)}function Rt(t){return t%4==0&&t%100!=0||t%400==0}var Ft=0,Lt=1,jt=2,Yt=3,zt=4,Ht=5,Gt=6,Wt=7,Bt=8;function Vt(t){return Rt(t)?366:365}Y("Y",0,0,(function(){var t=this.year();return t<=9999?N(t,4):"+"+t})),Y(0,["YY",2],0,(function(){return this.year()%100})),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),Dt("Y",yt),Dt("YY",ct,at),Dt("YYYY",ft,lt),Dt("YYYYY",gt,dt),Dt("YYYYYY",gt,dt),It(["YYYYY","YYYYYY"],Ft),It("YYYY",(function(t,e){e[Ft]=2===t.length?i.parseTwoDigitYear(t):Mt(t)})),It("YY",(function(t,e){e[Ft]=i.parseTwoDigitYear(t)})),It("Y",(function(t,e){e[Ft]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return Mt(t)+(Mt(t)>68?1900:2e3)};var Ut,$t=Xt("FullYear",!0);function qt(){return Rt(this.year())}function Xt(t,e){return function(n){return null!=n?(Zt(this,t,n),i.updateOffset(this,e),this):Qt(this,t)}}function Qt(t,e){if(!t.isValid())return NaN;var i=t._d,n=t._isUTC;switch(e){case"Milliseconds":return n?i.getUTCMilliseconds():i.getMilliseconds();case"Seconds":return n?i.getUTCSeconds():i.getSeconds();case"Minutes":return n?i.getUTCMinutes():i.getMinutes();case"Hours":return n?i.getUTCHours():i.getHours();case"Date":return n?i.getUTCDate():i.getDate();case"Day":return n?i.getUTCDay():i.getDay();case"Month":return n?i.getUTCMonth():i.getMonth();case"FullYear":return n?i.getUTCFullYear():i.getFullYear();default:return NaN}}function Zt(t,e,i){var n,o,s,r,a;if(t.isValid()&&!isNaN(i)){switch(n=t._d,o=t._isUTC,e){case"Milliseconds":return void(o?n.setUTCMilliseconds(i):n.setMilliseconds(i));case"Seconds":return void(o?n.setUTCSeconds(i):n.setSeconds(i));case"Minutes":return void(o?n.setUTCMinutes(i):n.setMinutes(i));case"Hours":return void(o?n.setUTCHours(i):n.setHours(i));case"Date":return void(o?n.setUTCDate(i):n.setDate(i));case"FullYear":break;default:return}s=i,r=t.month(),a=29!==(a=t.date())||1!==r||Rt(s)?a:28,o?n.setUTCFullYear(s,r,a):n.setFullYear(s,r,a)}}function Kt(t){return E(this[t=et(t)])?this[t]():this}function Jt(t,e){if("object"==typeof t){var i,n=ot(t=it(t)),o=n.length;for(i=0;i<o;i++)this[n[i].unit](t[n[i].unit])}else if(E(this[t=et(t)]))return this[t](e);return this}function te(t,e){return(t%e+e)%e}function ee(t,e){if(isNaN(t)||isNaN(e))return NaN;var i=te(e,12);return t+=(e-i)/12,1===i?Rt(t)?29:28:31-i%7%2}Ut=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},Y("M",["MM",2],"Mo",(function(){return this.month()+1})),Y("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),Y("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),Dt("M",ct,kt),Dt("MM",ct,at),Dt("MMM",(function(t,e){return e.monthsShortRegex(t)})),Dt("MMMM",(function(t,e){return e.monthsRegex(t)})),It(["M","MM"],(function(t,e){e[Lt]=Mt(t)-1})),It(["MMM","MMMM"],(function(t,e,i,n){var o=i._locale.monthsParse(t,n,i._strict);null!=o?e[Lt]=o:f(i).invalidMonth=t}));var ie="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ne="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),oe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,se=xt,re=xt;function ae(t,e){return t?o(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||oe).test(e)?"format":"standalone"][t.month()]:o(this._months)?this._months:this._months.standalone}function he(t,e){return t?o(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[oe.test(e)?"format":"standalone"][t.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function le(t,e,i){var n,o,s,r=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=p([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(o=Ut.call(this._shortMonthsParse,r))?o:null:-1!==(o=Ut.call(this._longMonthsParse,r))?o:null:"MMM"===e?-1!==(o=Ut.call(this._shortMonthsParse,r))||-1!==(o=Ut.call(this._longMonthsParse,r))?o:null:-1!==(o=Ut.call(this._longMonthsParse,r))||-1!==(o=Ut.call(this._shortMonthsParse,r))?o:null}function de(t,e,i){var n,o,s;if(this._monthsParseExact)return le.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]||(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[n]=new RegExp(s.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}}function ce(t,e){if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=Mt(e);else if(!l(e=t.localeData().monthsParse(e)))return t;var i=e,n=t.date();return n=n<29?n:Math.min(n,ee(t.year(),i)),t._isUTC?t._d.setUTCMonth(i,n):t._d.setMonth(i,n),t}function ue(t){return null!=t?(ce(this,t),i.updateOffset(this,!0),this):Qt(this,"Month")}function pe(){return ee(this.year(),this.month())}function me(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ge.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(r(this,"_monthsShortRegex")||(this._monthsShortRegex=se),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function fe(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ge.call(this),t?this._monthsStrictRegex:this._monthsRegex):(r(this,"_monthsRegex")||(this._monthsRegex=re),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function ge(){function t(t,e){return e.length-t.length}var e,i,n,o,s=[],r=[],a=[];for(e=0;e<12;e++)i=p([2e3,e]),n=Et(this.monthsShort(i,"")),o=Et(this.months(i,"")),s.push(n),r.push(o),a.push(o),a.push(n);s.sort(t),r.sort(t),a.sort(t),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function ve(t,e,i,n,o,s,r){var a;return t<100&&t>=0?(a=new Date(t+400,e,i,n,o,s,r),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,i,n,o,s,r),a}function ye(t){var e,i;return t<100&&t>=0?((i=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function be(t,e,i){var n=7+e-i;return-(7+ye(t,0,n).getUTCDay()-e)%7+n-1}function we(t,e,i,n,o){var s,r,a=1+7*(e-1)+(7+i-n)%7+be(t,n,o);return a<=0?r=Vt(s=t-1)+a:a>Vt(t)?(s=t+1,r=a-Vt(t)):(s=t,r=a),{year:s,dayOfYear:r}}function _e(t,e,i){var n,o,s=be(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return r<1?n=r+xe(o=t.year()-1,e,i):r>xe(t.year(),e,i)?(n=r-xe(t.year(),e,i),o=t.year()+1):(o=t.year(),n=r),{week:n,year:o}}function xe(t,e,i){var n=be(t,e,i),o=be(t+1,e,i);return(Vt(t)-n+o)/7}function ke(t){return _e(t,this._week.dow,this._week.doy).week}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),Dt("w",ct,kt),Dt("ww",ct,at),Dt("W",ct,kt),Dt("WW",ct,at),At(["w","ww","W","WW"],(function(t,e,i,n){e[n.substr(0,1)]=Mt(t)}));var Se={dow:0,doy:6};function De(){return this._week.dow}function Ce(){return this._week.doy}function Te(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Ee(t){var e=_e(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Oe(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function Me(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Pe(t,e){return t.slice(e,7).concat(t.slice(0,e))}Y("d",0,"do","day"),Y("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),Y("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),Y("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),Dt("d",ct),Dt("e",ct),Dt("E",ct),Dt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),Dt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),Dt("dddd",(function(t,e){return e.weekdaysRegex(t)})),At(["dd","ddd","dddd"],(function(t,e,i,n){var o=i._locale.weekdaysParse(t,n,i._strict);null!=o?e.d=o:f(i).invalidWeekday=t})),At(["d","e","E"],(function(t,e,i,n){e[n]=Mt(t)}));var Ie="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ae="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ne="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Re=xt,Fe=xt,Le=xt;function je(t,e){var i=o(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Pe(i,this._week.dow):t?i[t.day()]:i}function Ye(t){return!0===t?Pe(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function ze(t){return!0===t?Pe(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function He(t,e,i){var n,o,s,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(o=Ut.call(this._weekdaysParse,r))?o:null:"ddd"===e?-1!==(o=Ut.call(this._shortWeekdaysParse,r))?o:null:-1!==(o=Ut.call(this._minWeekdaysParse,r))?o:null:"dddd"===e?-1!==(o=Ut.call(this._weekdaysParse,r))||-1!==(o=Ut.call(this._shortWeekdaysParse,r))||-1!==(o=Ut.call(this._minWeekdaysParse,r))?o:null:"ddd"===e?-1!==(o=Ut.call(this._shortWeekdaysParse,r))||-1!==(o=Ut.call(this._weekdaysParse,r))||-1!==(o=Ut.call(this._minWeekdaysParse,r))?o:null:-1!==(o=Ut.call(this._minWeekdaysParse,r))||-1!==(o=Ut.call(this._weekdaysParse,r))||-1!==(o=Ut.call(this._shortWeekdaysParse,r))?o:null}function Ge(t,e,i){var n,o,s;if(this._weekdaysParseExact)return He.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]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[n]=new RegExp(s.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}}function We(t){if(!this.isValid())return null!=t?this:NaN;var e=Qt(this,"Day");return null!=t?(t=Oe(t,this.localeData()),this.add(t-e,"d")):e}function Be(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")}function Ve(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Me(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Ue(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(r(this,"_weekdaysRegex")||(this._weekdaysRegex=Re),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function $e(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(r(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Fe),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function qe(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Xe.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(r(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Le),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Xe(){function t(t,e){return e.length-t.length}var e,i,n,o,s,r=[],a=[],h=[],l=[];for(e=0;e<7;e++)i=p([2e3,1]).day(e),n=Et(this.weekdaysMin(i,"")),o=Et(this.weekdaysShort(i,"")),s=Et(this.weekdays(i,"")),r.push(n),a.push(o),h.push(s),l.push(n),l.push(o),l.push(s);r.sort(t),a.sort(t),h.sort(t),l.sort(t),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Ze(){return this.hours()||24}function Ke(t,e){Y(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Je(t,e){return e._meridiemParse}function ti(t){return"p"===(t+"").toLowerCase().charAt(0)}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,Qe),Y("k",["kk",2],0,Ze),Y("hmm",0,0,(function(){return""+Qe.apply(this)+N(this.minutes(),2)})),Y("hmmss",0,0,(function(){return""+Qe.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),Y("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),Y("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),Dt("a",Je),Dt("A",Je),Dt("H",ct,St),Dt("h",ct,kt),Dt("k",ct,kt),Dt("HH",ct,at),Dt("hh",ct,at),Dt("kk",ct,at),Dt("hmm",ut),Dt("hmmss",pt),Dt("Hmm",ut),Dt("Hmmss",pt),It(["H","HH"],Yt),It(["k","kk"],(function(t,e,i){var n=Mt(t);e[Yt]=24===n?0:n})),It(["a","A"],(function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t})),It(["h","hh"],(function(t,e,i){e[Yt]=Mt(t),f(i).bigHour=!0})),It("hmm",(function(t,e,i){var n=t.length-2;e[Yt]=Mt(t.substr(0,n)),e[zt]=Mt(t.substr(n)),f(i).bigHour=!0})),It("hmmss",(function(t,e,i){var n=t.length-4,o=t.length-2;e[Yt]=Mt(t.substr(0,n)),e[zt]=Mt(t.substr(n,2)),e[Ht]=Mt(t.substr(o)),f(i).bigHour=!0})),It("Hmm",(function(t,e,i){var n=t.length-2;e[Yt]=Mt(t.substr(0,n)),e[zt]=Mt(t.substr(n))})),It("Hmmss",(function(t,e,i){var n=t.length-4,o=t.length-2;e[Yt]=Mt(t.substr(0,n)),e[zt]=Mt(t.substr(n,2)),e[Ht]=Mt(t.substr(o))}));var ei=/[ap]\.?m?\.?/i,ii=Xt("Hours",!0);function ni(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}var oi,si={calendar:I,longDateFormat:B,invalidDate:U,ordinal:q,dayOfMonthOrdinalParse:X,relativeTime:Z,months:ie,monthsShort:ne,week:Se,weekdays:Ie,weekdaysMin:Ne,weekdaysShort:Ae,meridiemParse:ei},ri={},ai={};function hi(t,e){var i,n=Math.min(t.length,e.length);for(i=0;i<n;i+=1)if(t[i]!==e[i])return i;return n}function li(t){return t?t.toLowerCase().replace("_","-"):t}function di(t){for(var e,i,n,o,s=0;s<t.length;){for(e=(o=li(t[s]).split("-")).length,i=(i=li(t[s+1]))?i.split("-"):null;e>0;){if(n=ui(o.slice(0,e).join("-")))return n;if(i&&i.length>=e&&hi(o,i)>=e-1)break;e--}s++}return oi}function ci(t){return!(!t||!t.match("^[^/\\\\]*$"))}function ui(t){var e=null;if(void 0===ri[t]&&Ji&&Ji.exports&&ci(t))try{e=oi._abbr,Ki("./locale/"+t),pi(e)}catch(e){ri[t]=null}return ri[t]}function pi(t,e){var i;return t&&((i=h(e)?gi(t):mi(t,e))?oi=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),oi._abbr}function mi(t,e){if(null!==e){var i,n=si;if(e.abbr=t,null!=ri[t])T("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=ri[t]._config;else if(null!=e.parentLocale)if(null!=ri[e.parentLocale])n=ri[e.parentLocale]._config;else{if(null==(i=ui(e.parentLocale)))return ai[e.parentLocale]||(ai[e.parentLocale]=[]),ai[e.parentLocale].push({name:t,config:e}),null;n=i._config}return ri[t]=new P(M(n,e)),ai[t]&&ai[t].forEach((function(t){mi(t.name,t.config)})),pi(t),ri[t]}return delete ri[t],null}function fi(t,e){if(null!=e){var i,n,o=si;null!=ri[t]&&null!=ri[t].parentLocale?ri[t].set(M(ri[t]._config,e)):(null!=(n=ui(t))&&(o=n._config),e=M(o,e),null==n&&(e.abbr=t),(i=new P(e)).parentLocale=ri[t],ri[t]=i),pi(t)}else null!=ri[t]&&(null!=ri[t].parentLocale?(ri[t]=ri[t].parentLocale,t===pi()&&pi(t)):null!=ri[t]&&delete ri[t]);return ri[t]}function gi(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return oi;if(!o(t)){if(e=ui(t))return e;t=[t]}return di(t)}function vi(){return D(ri)}function yi(t){var e,i=t._a;return i&&-2===f(t).overflow&&(e=i[Lt]<0||i[Lt]>11?Lt:i[jt]<1||i[jt]>ee(i[Ft],i[Lt])?jt:i[Yt]<0||i[Yt]>24||24===i[Yt]&&(0!==i[zt]||0!==i[Ht]||0!==i[Gt])?Yt:i[zt]<0||i[zt]>59?zt:i[Ht]<0||i[Ht]>59?Ht:i[Gt]<0||i[Gt]>999?Gt:-1,f(t)._overflowDayOfYear&&(e<Ft||e>jt)&&(e=jt),f(t)._overflowWeeks&&-1===e&&(e=Wt),f(t)._overflowWeekday&&-1===e&&(e=Bt),f(t).overflow=e),t}var bi=/^\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)?)?$/,wi=/^\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)?)?$/,_i=/Z|[+-]\d\d(?::?\d\d)?/,xi=[["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}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ki=[["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/]],Si=/^\/?Date\((-?\d+)/i,Di=/^(?:(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}))$/,Ci={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ti(t){var e,i,n,o,s,r,a=t._i,h=bi.exec(a)||wi.exec(a),l=xi.length,d=ki.length;if(h){for(f(t).iso=!0,e=0,i=l;e<i;e++)if(xi[e][1].exec(h[1])){o=xi[e][0],n=!1!==xi[e][2];break}if(null==o)return void(t._isValid=!1);if(h[3]){for(e=0,i=d;e<i;e++)if(ki[e][1].exec(h[3])){s=(h[2]||" ")+ki[e][0];break}if(null==s)return void(t._isValid=!1)}if(!n&&null!=s)return void(t._isValid=!1);if(h[4]){if(!_i.exec(h[4]))return void(t._isValid=!1);r="Z"}t._f=o+(s||"")+(r||""),Yi(t)}else t._isValid=!1}function Ei(t,e,i,n,o,s){var r=[Oi(t),ne.indexOf(e),parseInt(i,10),parseInt(n,10),parseInt(o,10)];return s&&r.push(parseInt(s,10)),r}function Oi(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function Mi(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Pi(t,e,i){return!t||Ae.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(f(i).weekdayMismatch=!0,i._isValid=!1,!1)}function Ii(t,e,i){if(t)return Ci[t];if(e)return 0;var n=parseInt(i,10),o=n%100;return(n-o)/100*60+o}function Ai(t){var e,i=Di.exec(Mi(t._i));if(i){if(e=Ei(i[4],i[3],i[2],i[5],i[6],i[7]),!Pi(i[1],e,t))return;t._a=e,t._tzm=Ii(i[8],i[9],i[10]),t._d=ye.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),f(t).rfc2822=!0}else t._isValid=!1}function Ni(t){var e=Si.exec(t._i);null===e?(Ti(t),!1===t._isValid&&(delete t._isValid,Ai(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:i.createFromInputFallback(t)))):t._d=new Date(+e[1])}function Ri(t,e,i){return null!=t?t:null!=e?e:i}function Fi(t){var e=new Date(i.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Li(t){var e,i,n,o,s,r=[];if(!t._d){for(n=Fi(t),t._w&&null==t._a[jt]&&null==t._a[Lt]&&ji(t),null!=t._dayOfYear&&(s=Ri(t._a[Ft],n[Ft]),(t._dayOfYear>Vt(s)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),i=ye(s,0,t._dayOfYear),t._a[Lt]=i.getUTCMonth(),t._a[jt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=r[e]=n[e];for(;e<7;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Yt]&&0===t._a[zt]&&0===t._a[Ht]&&0===t._a[Gt]&&(t._nextDay=!0,t._a[Yt]=0),t._d=(t._useUTC?ye:ve).apply(null,r),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Yt]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(f(t).weekdayMismatch=!0)}}function ji(t){var e,i,n,o,s,r,a,h,l;null!=(e=t._w).GG||null!=e.W||null!=e.E?(s=1,r=4,i=Ri(e.GG,t._a[Ft],_e($i(),1,4).year),n=Ri(e.W,1),((o=Ri(e.E,1))<1||o>7)&&(h=!0)):(s=t._locale._week.dow,r=t._locale._week.doy,l=_e($i(),s,r),i=Ri(e.gg,t._a[Ft],l.year),n=Ri(e.w,l.week),null!=e.d?((o=e.d)<0||o>6)&&(h=!0):null!=e.e?(o=e.e+s,(e.e<0||e.e>6)&&(h=!0)):o=s),n<1||n>xe(i,s,r)?f(t)._overflowWeeks=!0:null!=h?f(t)._overflowWeekday=!0:(a=we(i,n,o,s,r),t._a[Ft]=a.year,t._dayOfYear=a.dayOfYear)}function Yi(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],f(t).empty=!0;var e,n,o,s,r,a,h,l=""+t._i,d=l.length,c=0;for(h=(o=W(t._f,t._locale).match(R)||[]).length,e=0;e<h;e++)s=o[e],(n=(l.match(Ct(s,t))||[])[0])&&((r=l.substr(0,l.indexOf(n))).length>0&&f(t).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),c+=n.length),j[s]?(n?f(t).empty=!1:f(t).unusedTokens.push(s),Nt(s,n,t)):t._strict&&!n&&f(t).unusedTokens.push(s);f(t).charsLeftOver=d-c,l.length>0&&f(t).unusedInput.push(l),t._a[Yt]<=12&&!0===f(t).bigHour&&t._a[Yt]>0&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[Yt]=zi(t._locale,t._a[Yt],t._meridiem),null!==(a=f(t).era)&&(t._a[Ft]=t._locale.erasConvertYear(a,t._a[Ft])),Li(t),yi(t)}else Ai(t);else Ti(t)}function zi(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}function Hi(t){var e,i,n,o,s,r,a=!1,h=t._f.length;if(0===h)return f(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;o<h;o++)s=0,r=!1,e=w({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[o],Yi(e),g(e)&&(r=!0),s+=f(e).charsLeftOver,s+=10*f(e).unusedTokens.length,f(e).score=s,a?s<n&&(n=s,i=e):(null==n||s<n||r)&&(n=s,i=e,r&&(a=!0));u(t,i||e)}function Gi(t){if(!t._d){var e=it(t._i),i=void 0===e.day?e.date:e.day;t._a=c([e.year,e.month,i,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),Li(t)}}function Wi(t){var e=new _(yi(Bi(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Bi(t){var e=t._i,i=t._f;return t._locale=t._locale||gi(t._l),null===e||void 0===i&&""===e?v({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),x(e)?new _(yi(e)):(d(e)?t._d=e:o(i)?Hi(t):i?Yi(t):Vi(t),g(t)||(t._d=null),t))}function Vi(t){var e=t._i;h(e)?t._d=new Date(i.now()):d(e)?t._d=new Date(e.valueOf()):"string"==typeof e?Ni(t):o(e)?(t._a=c(e.slice(0),(function(t){return parseInt(t,10)})),Li(t)):s(e)?Gi(t):l(e)?t._d=new Date(e):i.createFromInputFallback(t)}function Ui(t,e,i,n,r){var h={};return!0!==e&&!1!==e||(n=e,e=void 0),!0!==i&&!1!==i||(n=i,i=void 0),(s(t)&&a(t)||o(t)&&0===t.length)&&(t=void 0),h._isAMomentObject=!0,h._useUTC=h._isUTC=r,h._l=i,h._i=t,h._f=e,h._strict=n,Wi(h)}function $i(t,e,i,n){return Ui(t,e,i,n,!1)}i.createFromInputFallback=S("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. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var qi=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=$i.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:v()})),Xi=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=$i.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:v()}));function Qi(t,e){var i,n;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return $i();for(i=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](i)||(i=e[n]);return i}function Zi(){return Qi("isBefore",[].slice.call(arguments,0))}function tn(){return Qi("isAfter",[].slice.call(arguments,0))}var en=function(){return Date.now?Date.now():+new Date},nn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function on(t){var e,i,n=!1,o=nn.length;for(e in t)if(r(t,e)&&(-1===Ut.call(nn,e)||null!=t[e]&&isNaN(t[e])))return!1;for(i=0;i<o;++i)if(t[nn[i]]){if(n)return!1;parseFloat(t[nn[i]])!==Mt(t[nn[i]])&&(n=!0)}return!0}function sn(){return this._isValid}function rn(){return On(NaN)}function an(t){var e=it(t),i=e.year||0,n=e.quarter||0,o=e.month||0,s=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,h=e.minute||0,l=e.second||0,d=e.millisecond||0;this._isValid=on(e),this._milliseconds=+d+1e3*l+6e4*h+1e3*a*60*60,this._days=+r+7*s,this._months=+o+3*n+12*i,this._data={},this._locale=gi(),this._bubble()}function hn(t){return t instanceof an}function ln(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function dn(t,e,i){var n,o=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(n=0;n<o;n++)(i&&t[n]!==e[n]||!i&&Mt(t[n])!==Mt(e[n]))&&r++;return r+s}function cn(t,e){Y(t,0,0,(function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+N(~~(t/60),2)+e+N(~~t%60,2)}))}cn("Z",":"),cn("ZZ",""),Dt("Z",wt),Dt("ZZ",wt),It(["Z","ZZ"],(function(t,e,i){i._useUTC=!0,i._tzm=pn(wt,t)}));var un=/([\+\-]|\d\d)/gi;function pn(t,e){var i,n,o=(e||"").match(t);return null===o?null:0===(n=60*(i=((o[o.length-1]||[])+"").match(un)||["-",0,0])[1]+Mt(i[2]))?0:"+"===i[0]?n:-n}function mn(t,e){var n,o;return e._isUTC?(n=e.clone(),o=(x(t)||d(t)?t.valueOf():$i(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),i.updateOffset(n,!1),n):$i(t).local()}function fn(t){return-Math.round(t._d.getTimezoneOffset())}function gn(t,e,n){var o,s=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=pn(wt,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(o=fn(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),s!==t&&(!e||this._changeInProgress?Nn(this,On(t-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:fn(this)}function vn(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function yn(t){return this.utcOffset(0,t)}function bn(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(fn(this),"m")),this}function wn(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=pn(bt,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this}function _n(t){return!!this.isValid()&&(t=t?$i(t).utcOffset():0,(this.utcOffset()-t)%60==0)}function xn(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function kn(){if(!h(this._isDSTShifted))return this._isDSTShifted;var t,e={};return w(e,this),(e=Bi(e))._a?(t=e._isUTC?p(e._a):$i(e._a),this._isDSTShifted=this.isValid()&&dn(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Sn(){return!!this.isValid()&&!this._isUTC}function Dn(){return!!this.isValid()&&this._isUTC}function Cn(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Tn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,En=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function On(t,e){var i,n,o,s=t,a=null;return hn(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:l(t)||!isNaN(+t)?(s={},e?s[e]=+t:s.milliseconds=+t):(a=Tn.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:Mt(a[jt])*i,h:Mt(a[Yt])*i,m:Mt(a[zt])*i,s:Mt(a[Ht])*i,ms:Mt(ln(1e3*a[Gt]))*i}):(a=En.exec(t))?(i="-"===a[1]?-1:1,s={y:Mn(a[2],i),M:Mn(a[3],i),w:Mn(a[4],i),d:Mn(a[5],i),h:Mn(a[6],i),m:Mn(a[7],i),s:Mn(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(o=In($i(s.from),$i(s.to)),(s={}).ms=o.milliseconds,s.M=o.months),n=new an(s),hn(t)&&r(t,"_locale")&&(n._locale=t._locale),hn(t)&&r(t,"_isValid")&&(n._isValid=t._isValid),n}function Mn(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Pn(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 In(t,e){var i;return t.isValid()&&e.isValid()?(e=mn(e,t),t.isBefore(e)?i=Pn(t,e):((i=Pn(e,t)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function An(t,e){return function(i,n){var o;return null===n||isNaN(+n)||(T(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),Nn(this,On(i,n),t),this}}function Nn(t,e,n,o){var s=e._milliseconds,r=ln(e._days),a=ln(e._months);t.isValid()&&(o=null==o||o,a&&ce(t,Qt(t,"Month")+a*n),r&&Zt(t,"Date",Qt(t,"Date")+r*n),s&&t._d.setTime(t._d.valueOf()+s*n),o&&i.updateOffset(t,r||a))}On.fn=an.prototype,On.invalid=rn;var Rn=An(1,"add"),Fn=An(-1,"subtract");function Ln(t){return"string"==typeof t||t instanceof String}function jn(t){return x(t)||d(t)||Ln(t)||l(t)||zn(t)||Yn(t)||null==t}function Yn(t){var e,i,n=s(t)&&!a(t),o=!1,h=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l=h.length;for(e=0;e<l;e+=1)i=h[e],o=o||r(t,i);return n&&o}function zn(t){var e=o(t),i=!1;return e&&(i=0===t.filter((function(e){return!l(e)&&Ln(t)})).length),e&&i}function Hn(t){var e,i,n=s(t)&&!a(t),o=!1,h=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<h.length;e+=1)i=h[e],o=o||r(t,i);return n&&o}function Gn(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"}function Wn(t,e){1===arguments.length&&(arguments[0]?jn(arguments[0])?(t=arguments[0],e=void 0):Hn(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||$i(),o=mn(n,this).startOf("day"),s=i.calendarFormat(this,o)||"sameElse",r=e&&(E(e[s])?e[s].call(this,n):e[s]);return this.format(r||this.localeData().calendar(s,this,$i(n)))}function Bn(){return new _(this)}function Vn(t,e){var i=x(t)?t:$i(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=et(e)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())}function Un(t,e){var i=x(t)?t:$i(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=et(e)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())}function $n(t,e,i,n){var o=x(t)?t:$i(t),s=x(e)?e:$i(e);return!!(this.isValid()&&o.isValid()&&s.isValid())&&("("===(n=n||"()")[0]?this.isAfter(o,i):!this.isBefore(o,i))&&(")"===n[1]?this.isBefore(s,i):!this.isAfter(s,i))}function qn(t,e){var i,n=x(t)?t:$i(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=et(e)||"millisecond")?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))}function Xn(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Qn(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Zn(t,e,i){var n,o,s;if(!this.isValid())return NaN;if(!(n=mn(t,this)).isValid())return NaN;switch(o=6e4*(n.utcOffset()-this.utcOffset()),e=et(e)){case"year":s=Kn(this,n)/12;break;case"month":s=Kn(this,n);break;case"quarter":s=Kn(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-o)/864e5;break;case"week":s=(this-n-o)/6048e5;break;default:s=this-n}return i?s:Ot(s)}function Kn(t,e){if(t.date()<e.date())return-Kn(e,t);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 Jn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function to(t){if(!this.isValid())return null;var e=!0!==t,i=e?this.clone().utc():this;return i.year()<0||i.year()>9999?G(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",G(i,"Z")):G(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eo(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,i,n,o="moment",s="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),t="["+o+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",n=s+'[")]',this.format(t+e+i+n)}function io(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=G(this,t);return this.localeData().postformat(e)}function no(t,e){return this.isValid()&&(x(t)&&t.isValid()||$i(t).isValid())?On({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function oo(t){return this.from($i(),t)}function so(t,e){return this.isValid()&&(x(t)&&t.isValid()||$i(t).isValid())?On({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ro(t){return this.to($i(),t)}function ao(t){var e;return void 0===t?this._locale._abbr:(null!=(e=gi(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ho=S("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 lo(){return this._locale}var co=1e3,uo=60*co,po=60*uo,mo=3506328*po;function fo(t,e){return(t%e+e)%e}function go(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-mo:new Date(t,e,i).valueOf()}function vo(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-mo:Date.UTC(t,e,i)}function yo(t){var e,n;if(void 0===(t=et(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?vo:go,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=fo(e+(this._isUTC?0:this.utcOffset()*uo),po);break;case"minute":e=this._d.valueOf(),e-=fo(e,uo);break;case"second":e=this._d.valueOf(),e-=fo(e,co)}return this._d.setTime(e),i.updateOffset(this,!0),this}function bo(t){var e,n;if(void 0===(t=et(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?vo:go,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=po-fo(e+(this._isUTC?0:this.utcOffset()*uo),po)-1;break;case"minute":e=this._d.valueOf(),e+=uo-fo(e,uo)-1;break;case"second":e=this._d.valueOf(),e+=co-fo(e,co)-1}return this._d.setTime(e),i.updateOffset(this,!0),this}function wo(){return this._d.valueOf()-6e4*(this._offset||0)}function _o(){return Math.floor(this.valueOf()/1e3)}function xo(){return new Date(this.valueOf())}function ko(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function So(){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()}}function Do(){return this.isValid()?this.toISOString():null}function Co(){return g(this)}function To(){return u({},f(this))}function Eo(){return f(this).overflow}function Oo(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Mo(t,e){var n,o,s,r=this._eras||gi("en")._eras;for(n=0,o=r.length;n<o;++n)switch("string"==typeof r[n].since&&(s=i(r[n].since).startOf("day"),r[n].since=s.valueOf()),typeof r[n].until){case"undefined":r[n].until=1/0;break;case"string":s=i(r[n].until).startOf("day").valueOf(),r[n].until=s.valueOf()}return r}function Po(t,e,i){var n,o,s,r,a,h=this.eras();for(t=t.toUpperCase(),n=0,o=h.length;n<o;++n)if(s=h[n].name.toUpperCase(),r=h[n].abbr.toUpperCase(),a=h[n].narrow.toUpperCase(),i)switch(e){case"N":case"NN":case"NNN":if(r===t)return h[n];break;case"NNNN":if(s===t)return h[n];break;case"NNNNN":if(a===t)return h[n]}else if([s,r,a].indexOf(t)>=0)return h[n]}function Io(t,e){var n=t.since<=t.until?1:-1;return void 0===e?i(t.since).year():i(t.since).year()+(e-t.offset)*n}function Ao(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].name;if(n[t].until<=i&&i<=n[t].since)return n[t].name}return""}function No(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].narrow;if(n[t].until<=i&&i<=n[t].since)return n[t].narrow}return""}function Ro(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].abbr;if(n[t].until<=i&&i<=n[t].since)return n[t].abbr}return""}function Fo(){var t,e,n,o,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t)if(n=s[t].since<=s[t].until?1:-1,o=this.clone().startOf("day").valueOf(),s[t].since<=o&&o<=s[t].until||s[t].until<=o&&o<=s[t].since)return(this.year()-i(s[t].since).year())*n+s[t].offset;return this.year()}function Lo(t){return r(this,"_erasNameRegex")||Bo.call(this),t?this._erasNameRegex:this._erasRegex}function jo(t){return r(this,"_erasAbbrRegex")||Bo.call(this),t?this._erasAbbrRegex:this._erasRegex}function Yo(t){return r(this,"_erasNarrowRegex")||Bo.call(this),t?this._erasNarrowRegex:this._erasRegex}function zo(t,e){return e.erasAbbrRegex(t)}function Ho(t,e){return e.erasNameRegex(t)}function Go(t,e){return e.erasNarrowRegex(t)}function Wo(t,e){return e._eraYearOrdinalRegex||vt}function Bo(){var t,e,i,n,o,s=[],r=[],a=[],h=[],l=this.eras();for(t=0,e=l.length;t<e;++t)i=Et(l[t].name),n=Et(l[t].abbr),o=Et(l[t].narrow),r.push(i),s.push(n),a.push(o),h.push(i),h.push(n),h.push(o);this._erasRegex=new RegExp("^("+h.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function Vo(t,e){Y(0,[t,t.length],0,e)}function Uo(t){return Ko.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function $o(t){return Ko.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function qo(){return xe(this.year(),1,4)}function Xo(){return xe(this.isoWeekYear(),1,4)}function Qo(){var t=this.localeData()._week;return xe(this.year(),t.dow,t.doy)}function Zo(){var t=this.localeData()._week;return xe(this.weekYear(),t.dow,t.doy)}function Ko(t,e,i,n,o){var s;return null==t?_e(this,n,o).year:(e>(s=xe(t,n,o))&&(e=s),Jo.call(this,t,e,i,n,o))}function Jo(t,e,i,n,o){var s=we(t,e,i,n,o),r=ye(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function ts(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}Y("N",0,0,"eraAbbr"),Y("NN",0,0,"eraAbbr"),Y("NNN",0,0,"eraAbbr"),Y("NNNN",0,0,"eraName"),Y("NNNNN",0,0,"eraNarrow"),Y("y",["y",1],"yo","eraYear"),Y("y",["yy",2],0,"eraYear"),Y("y",["yyy",3],0,"eraYear"),Y("y",["yyyy",4],0,"eraYear"),Dt("N",zo),Dt("NN",zo),Dt("NNN",zo),Dt("NNNN",Ho),Dt("NNNNN",Go),It(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,i,n){var o=i._locale.erasParse(t,n,i._strict);o?f(i).era=o:f(i).invalidEra=t})),Dt("y",vt),Dt("yy",vt),Dt("yyy",vt),Dt("yyyy",vt),Dt("yo",Wo),It(["y","yy","yyy","yyyy"],Ft),It(["yo"],(function(t,e,i,n){var o;i._locale._eraYearOrdinalRegex&&(o=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?e[Ft]=i._locale.eraYearOrdinalParse(t,o):e[Ft]=parseInt(t,10)})),Y(0,["gg",2],0,(function(){return this.weekYear()%100})),Y(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Vo("gggg","weekYear"),Vo("ggggg","weekYear"),Vo("GGGG","isoWeekYear"),Vo("GGGGG","isoWeekYear"),Dt("G",yt),Dt("g",yt),Dt("GG",ct,at),Dt("gg",ct,at),Dt("GGGG",ft,lt),Dt("gggg",ft,lt),Dt("GGGGG",gt,dt),Dt("ggggg",gt,dt),At(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,i,n){e[n.substr(0,2)]=Mt(t)})),At(["gg","GG"],(function(t,e,n,o){e[o]=i.parseTwoDigitYear(t)})),Y("Q",0,"Qo","quarter"),Dt("Q",rt),It("Q",(function(t,e){e[Lt]=3*(Mt(t)-1)})),Y("D",["DD",2],"Do","date"),Dt("D",ct,kt),Dt("DD",ct,at),Dt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),It(["D","DD"],jt),It("Do",(function(t,e){e[jt]=Mt(t.match(ct)[0])}));var es=Xt("Date",!0);function is(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}Y("DDD",["DDDD",3],"DDDo","dayOfYear"),Dt("DDD",mt),Dt("DDDD",ht),It(["DDD","DDDD"],(function(t,e,i){i._dayOfYear=Mt(t)})),Y("m",["mm",2],0,"minute"),Dt("m",ct,St),Dt("mm",ct,at),It(["m","mm"],zt);var ns=Xt("Minutes",!1);Y("s",["ss",2],0,"second"),Dt("s",ct,St),Dt("ss",ct,at),It(["s","ss"],Ht);var os,ss,rs=Xt("Seconds",!1);for(Y("S",0,0,(function(){return~~(this.millisecond()/100)})),Y(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),Y(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),Y(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),Y(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),Y(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),Y(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Dt("S",mt,rt),Dt("SS",mt,at),Dt("SSS",mt,ht),os="SSSS";os.length<=9;os+="S")Dt(os,vt);function as(t,e){e[Gt]=Mt(1e3*("0."+t))}for(os="S";os.length<=9;os+="S")It(os,as);function hs(){return this._isUTC?"UTC":""}function ls(){return this._isUTC?"Coordinated Universal Time":""}ss=Xt("Milliseconds",!1),Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var ds=_.prototype;function cs(t){return $i(1e3*t)}function us(){return $i.apply(null,arguments).parseZone()}function ps(t){return t}ds.add=Rn,ds.calendar=Wn,ds.clone=Bn,ds.diff=Zn,ds.endOf=bo,ds.format=io,ds.from=no,ds.fromNow=oo,ds.to=so,ds.toNow=ro,ds.get=Kt,ds.invalidAt=Eo,ds.isAfter=Vn,ds.isBefore=Un,ds.isBetween=$n,ds.isSame=qn,ds.isSameOrAfter=Xn,ds.isSameOrBefore=Qn,ds.isValid=Co,ds.lang=ho,ds.locale=ao,ds.localeData=lo,ds.max=Xi,ds.min=qi,ds.parsingFlags=To,ds.set=Jt,ds.startOf=yo,ds.subtract=Fn,ds.toArray=ko,ds.toObject=So,ds.toDate=xo,ds.toISOString=to,ds.inspect=eo,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ds[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ds.toJSON=Do,ds.toString=Jn,ds.unix=_o,ds.valueOf=wo,ds.creationData=Oo,ds.eraName=Ao,ds.eraNarrow=No,ds.eraAbbr=Ro,ds.eraYear=Fo,ds.year=$t,ds.isLeapYear=qt,ds.weekYear=Uo,ds.isoWeekYear=$o,ds.quarter=ds.quarters=ts,ds.month=ue,ds.daysInMonth=pe,ds.week=ds.weeks=Te,ds.isoWeek=ds.isoWeeks=Ee,ds.weeksInYear=Qo,ds.weeksInWeekYear=Zo,ds.isoWeeksInYear=qo,ds.isoWeeksInISOWeekYear=Xo,ds.date=es,ds.day=ds.days=We,ds.weekday=Be,ds.isoWeekday=Ve,ds.dayOfYear=is,ds.hour=ds.hours=ii,ds.minute=ds.minutes=ns,ds.second=ds.seconds=rs,ds.millisecond=ds.milliseconds=ss,ds.utcOffset=gn,ds.utc=yn,ds.local=bn,ds.parseZone=wn,ds.hasAlignedHourOffset=_n,ds.isDST=xn,ds.isLocal=Sn,ds.isUtcOffset=Dn,ds.isUtc=Cn,ds.isUTC=Cn,ds.zoneAbbr=hs,ds.zoneName=ls,ds.dates=S("dates accessor is deprecated. Use date instead.",es),ds.months=S("months accessor is deprecated. Use month instead",ue),ds.years=S("years accessor is deprecated. Use year instead",$t),ds.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vn),ds.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",kn);var ms=P.prototype;function fs(t,e,i,n){var o=gi(),s=p().set(n,e);return o[i](s,t)}function gs(t,e,i){if(l(t)&&(e=t,t=void 0),t=t||"",null!=e)return fs(t,e,i,"month");var n,o=[];for(n=0;n<12;n++)o[n]=fs(t,n,i,"month");return o}function vs(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,s=gi(),r=t?s._week.dow:0,a=[];if(null!=i)return fs(e,(i+r)%7,n,"day");for(o=0;o<7;o++)a[o]=fs(e,(o+r)%7,n,"day");return a}function ys(t,e){return gs(t,e,"months")}function bs(t,e){return gs(t,e,"monthsShort")}function ws(t,e,i){return vs(t,e,i,"weekdays")}function _s(t,e,i){return vs(t,e,i,"weekdaysShort")}function xs(t,e,i){return vs(t,e,i,"weekdaysMin")}ms.calendar=A,ms.longDateFormat=V,ms.invalidDate=$,ms.ordinal=Q,ms.preparse=ps,ms.postformat=ps,ms.relativeTime=K,ms.pastFuture=J,ms.set=O,ms.eras=Mo,ms.erasParse=Po,ms.erasConvertYear=Io,ms.erasAbbrRegex=jo,ms.erasNameRegex=Lo,ms.erasNarrowRegex=Yo,ms.months=ae,ms.monthsShort=he,ms.monthsParse=de,ms.monthsRegex=fe,ms.monthsShortRegex=me,ms.week=ke,ms.firstDayOfYear=Ce,ms.firstDayOfWeek=De,ms.weekdays=je,ms.weekdaysMin=ze,ms.weekdaysShort=Ye,ms.weekdaysParse=Ge,ms.weekdaysRegex=Ue,ms.weekdaysShortRegex=$e,ms.weekdaysMinRegex=qe,ms.isPM=ti,ms.meridiem=ni,pi("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===Mt(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",pi),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",gi);var ks=Math.abs;function Ss(){var t=this._data;return this._milliseconds=ks(this._milliseconds),this._days=ks(this._days),this._months=ks(this._months),t.milliseconds=ks(t.milliseconds),t.seconds=ks(t.seconds),t.minutes=ks(t.minutes),t.hours=ks(t.hours),t.months=ks(t.months),t.years=ks(t.years),this}function Ds(t,e,i,n){var o=On(e,i);return t._milliseconds+=n*o._milliseconds,t._days+=n*o._days,t._months+=n*o._months,t._bubble()}function Cs(t,e){return Ds(this,t,e,1)}function Ts(t,e){return Ds(this,t,e,-1)}function Es(t){return t<0?Math.floor(t):Math.ceil(t)}function Os(){var t,e,i,n,o,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||s<=0&&r<=0&&a<=0||(s+=864e5*Es(Ps(a)+r),r=0,a=0),h.milliseconds=s%1e3,t=Ot(s/1e3),h.seconds=t%60,e=Ot(t/60),h.minutes=e%60,i=Ot(e/60),h.hours=i%24,r+=Ot(i/24),a+=o=Ot(Ms(r)),r-=Es(Ps(o)),n=Ot(a/12),a%=12,h.days=r,h.months=a,h.years=n,this}function Ms(t){return 4800*t/146097}function Ps(t){return 146097*t/4800}function Is(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=et(t))||"quarter"===t||"year"===t)switch(e=this._days+n/864e5,i=this._months+Ms(e),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(Ps(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)}}function As(t){return function(){return this.as(t)}}var Ns=As("ms"),Rs=As("s"),Fs=As("m"),Ls=As("h"),js=As("d"),Ys=As("w"),zs=As("M"),Hs=As("Q"),Gs=As("y"),Ws=Ns;function Bs(){return On(this)}function Vs(t){return t=et(t),this.isValid()?this[t+"s"]():NaN}function Us(t){return function(){return this.isValid()?this._data[t]:NaN}}var $s=Us("milliseconds"),qs=Us("seconds"),Xs=Us("minutes"),Qs=Us("hours"),Zs=Us("days"),Ks=Us("months"),Js=Us("years");function tr(){return Ot(this.days()/7)}var er=Math.round,ir={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function nr(t,e,i,n,o){return o.relativeTime(e||1,!!i,t,n)}function or(t,e,i,n){var o=On(t).abs(),s=er(o.as("s")),r=er(o.as("m")),a=er(o.as("h")),h=er(o.as("d")),l=er(o.as("M")),d=er(o.as("w")),c=er(o.as("y")),u=s<=i.ss&&["s",s]||s<i.s&&["ss",s]||r<=1&&["m"]||r<i.m&&["mm",r]||a<=1&&["h"]||a<i.h&&["hh",a]||h<=1&&["d"]||h<i.d&&["dd",h];return null!=i.w&&(u=u||d<=1&&["w"]||d<i.w&&["ww",d]),(u=u||l<=1&&["M"]||l<i.M&&["MM",l]||c<=1&&["y"]||["yy",c])[2]=e,u[3]=+t>0,u[4]=n,nr.apply(null,u)}function sr(t){return void 0===t?er:"function"==typeof t&&(er=t,!0)}function rr(t,e){return void 0!==ir[t]&&(void 0===e?ir[t]:(ir[t]=e,"s"===t&&(ir.ss=e-1),!0))}function ar(t,e){if(!this.isValid())return this.localeData().invalidDate();var i,n,o=!1,s=ir;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(o=t),"object"==typeof e&&(s=Object.assign({},ir,e),null!=e.s&&null==e.ss&&(s.ss=e.s-1)),n=or(this,!o,s,i=this.localeData()),o&&(n=i.pastFuture(+this,n)),i.postformat(n)}var hr=Math.abs;function lr(t){return(t>0)-(t<0)||+t}function dr(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,n,o,s,r,a,h=hr(this._milliseconds)/1e3,l=hr(this._days),d=hr(this._months),c=this.asSeconds();return c?(t=Ot(h/60),e=Ot(t/60),h%=60,t%=60,i=Ot(d/12),d%=12,n=h?h.toFixed(3).replace(/\.?0+$/,""):"",o=c<0?"-":"",s=lr(this._months)!==lr(c)?"-":"",r=lr(this._days)!==lr(c)?"-":"",a=lr(this._milliseconds)!==lr(c)?"-":"",o+"P"+(i?s+i+"Y":"")+(d?s+d+"M":"")+(l?r+l+"D":"")+(e||t||h?"T":"")+(e?a+e+"H":"")+(t?a+t+"M":"")+(h?a+n+"S":"")):"P0D"}var cr=an.prototype;return cr.isValid=sn,cr.abs=Ss,cr.add=Cs,cr.subtract=Ts,cr.as=Is,cr.asMilliseconds=Ns,cr.asSeconds=Rs,cr.asMinutes=Fs,cr.asHours=Ls,cr.asDays=js,cr.asWeeks=Ys,cr.asMonths=zs,cr.asQuarters=Hs,cr.asYears=Gs,cr.valueOf=Ws,cr._bubble=Os,cr.clone=Bs,cr.get=Vs,cr.milliseconds=$s,cr.seconds=qs,cr.minutes=Xs,cr.hours=Qs,cr.days=Zs,cr.weeks=tr,cr.months=Ks,cr.years=Js,cr.humanize=ar,cr.toISOString=dr,cr.toString=dr,cr.toJSON=dr,cr.locale=ao,cr.localeData=lo,cr.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",dr),cr.lang=ho,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),Dt("x",yt),Dt("X",_t),It("X",(function(t,e,i){i._d=new Date(1e3*parseFloat(t))})),It("x",(function(t,e,i){i._d=new Date(Mt(t))})),
|
||
//! moment.js
|
||
i.version="2.30.1",n($i),i.fn=ds,i.min=Zi,i.max=tn,i.now=en,i.utc=p,i.unix=cs,i.months=ys,i.isDate=d,i.locale=pi,i.invalid=v,i.duration=On,i.isMoment=x,i.weekdays=ws,i.parseZone=us,i.localeData=gi,i.isDuration=hn,i.monthsShort=bs,i.weekdaysMin=xs,i.defineLocale=mi,i.updateLocale=fi,i.locales=vi,i.weekdaysShort=_s,i.normalizeUnits=et,i.relativeTimeRounding=sr,i.relativeTimeThreshold=rr,i.calendarFormat=Gn,i.prototype=ds,i.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"},i}();var en=e(tn.exports),nn={exports:{}},on={},sn={exports:{}},rn={};function an(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}var hn=/javascript\s*\:/gim;rn.whiteList=an(),rn.getDefaultWhiteList=an,rn.onAttr=function(t,e,i){},rn.onIgnoreAttr=function(t,e,i){},rn.safeAttrValue=function(t,e){return hn.test(e)?"":e};var ln={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var n,o;if(Array.prototype.forEach)return t.forEach(e,i);for(n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}};var dn=function(t,e){";"!==(t=ln.trimRight(t))[t.length-1]&&(t+=";");var i=t.length,n=!1,o=0,s=0,r="";function a(){if(!n){var i=ln.trim(t.slice(o,s)),a=i.indexOf(":");if(-1!==a){var h=ln.trim(i.slice(0,a)),l=ln.trim(i.slice(a+1));if(h){var d=e(o,r.length,h,l,i);d&&(r+=d+"; ")}}}o=s+1}for(;s<i;s++){var h=t[s];if("/"===h&&"*"===t[s+1]){var l=t.indexOf("*/",s+2);if(-1===l)break;o=(s=l+1)+1,n=!1}else"("===h?n=!0:")"===h?n=!1:";"===h?n||a():"\n"===h&&a()}return ln.trim(r)},cn=rn,un=dn;function pn(t){return null==t}function mn(t){(t=function(t){var e={};for(var i in t)e[i]=t[i];return e}(t||{})).whiteList=t.whiteList||cn.whiteList,t.onAttr=t.onAttr||cn.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||cn.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||cn.safeAttrValue,this.options=t}mn.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,i=e.whiteList,n=e.onAttr,o=e.onIgnoreAttr,s=e.safeAttrValue;return un(t,(function(t,e,r,a,h){var l=i[r],d=!1;if(!0===l?d=l:"function"==typeof l?d=l(a):l instanceof RegExp&&(d=l.test(a)),!0!==d&&(d=!1),a=s(r,a)){var c,u={position:e,sourcePosition:t,source:h,isWhite:d};return d?pn(c=n(r,a,u))?r+":"+a:c:pn(c=o(r,a,u))?void 0:c}}))};var fn=mn;!function(t,e){var i=rn,n=fn;for(var o in(e=t.exports=function(t,e){return new n(e).process(t)}).FilterCSS=n,i)e[o]=i[o];"undefined"!=typeof window&&(window.filterCSS=t.exports)}(sn,sn.exports);var gn=sn.exports,vn={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var n,o;if(Array.prototype.forEach)return t.forEach(e,i);for(n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}},yn=gn.FilterCSS,bn=gn.getDefaultWhiteList,wn=vn;function _n(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var xn=new yn;function kn(t){return t.replace(Sn,"<").replace(Dn,">")}var Sn=/</g,Dn=/>/g,Cn=/"/g,Tn=/"/g,En=/&#([a-zA-Z0-9]*);?/gim,On=/:?/gim,Mn=/&newline;?/gim,Pn=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,In=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,An=/u\s*r\s*l\s*\(.*/gi;function Nn(t){return t.replace(Cn,""")}function Rn(t){return t.replace(Tn,'"')}function Fn(t){return t.replace(En,(function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))}))}function Ln(t){return t.replace(On,":").replace(Mn," ")}function jn(t){for(var e="",i=0,n=t.length;i<n;i++)e+=t.charCodeAt(i)<32?" ":t.charAt(i);return wn.trim(e)}function Yn(t){return t=jn(t=Ln(t=Fn(t=Rn(t))))}function zn(t){return t=kn(t=Nn(t))}on.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},on.getDefaultWhiteList=_n,on.onTag=function(t,e,i){},on.onIgnoreTag=function(t,e,i){},on.onTagAttr=function(t,e,i){},on.onIgnoreTagAttr=function(t,e,i){},on.safeAttrValue=function(t,e,i,n){if(i=Yn(i),"href"===e||"src"===e){if("#"===(i=wn.trim(i)))return"#";if("http://"!==i.substr(0,7)&&"https://"!==i.substr(0,8)&&"mailto:"!==i.substr(0,7)&&"tel:"!==i.substr(0,4)&&"data:image/"!==i.substr(0,11)&&"ftp://"!==i.substr(0,6)&&"./"!==i.substr(0,2)&&"../"!==i.substr(0,3)&&"#"!==i[0]&&"/"!==i[0])return""}else if("background"===e){if(Pn.lastIndex=0,Pn.test(i))return""}else if("style"===e){if(In.lastIndex=0,In.test(i))return"";if(An.lastIndex=0,An.test(i)&&(Pn.lastIndex=0,Pn.test(i)))return"";!1!==n&&(i=(n=n||xn).process(i))}return i=zn(i)},on.escapeHtml=kn,on.escapeQuote=Nn,on.unescapeQuote=Rn,on.escapeHtmlEntities=Fn,on.escapeDangerHtml5Entities=Ln,on.clearNonPrintableCharacter=jn,on.friendlyAttrValue=Yn,on.escapeAttrValue=zn,on.onIgnoreTagStripAll=function(){return""},on.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var i=!Array.isArray(t),n=[],o=!1;return{onIgnoreTag:function(s,r,a){if(function(e){return!!i||-1!==wn.indexOf(t,e)}(s)){if(a.isClosing){var h="[/removed]",l=a.position+10;return n.push([!1!==o?o:a.position,l]),o=!1,h}return o||(o=a.position),"[removed]"}return e(s,r,a)},remove:function(t){var e="",i=0;return wn.forEach(n,(function(n){e+=t.slice(i,n[0]),i=n[1]})),e+=t.slice(i)}}},on.stripCommentTag=function(t){for(var e="",i=0;i<t.length;){var n=t.indexOf("\x3c!--",i);if(-1===n){e+=t.slice(i);break}e+=t.slice(i,n);var o=t.indexOf("--\x3e",n);if(-1===o)break;i=o+3}return e},on.stripBlankChar=function(t){var e=t.split("");return(e=e.filter((function(t){var e=t.charCodeAt(0);return 127!==e&&(!(e<=31)||(10===e||13===e))}))).join("")},on.attributeWrapSign='"',on.cssFilter=xn,on.getDefaultCSSWhiteList=bn;var Hn={},Gn=vn;function Wn(t){var e,i=Gn.spaceIndex(t);return e=-1===i?t.slice(1,-1):t.slice(1,i+1),"/"===(e=Gn.trim(e).toLowerCase()).slice(0,1)&&(e=e.slice(1)),"/"===e.slice(-1)&&(e=e.slice(0,-1)),e}function Bn(t){return"</"===t.slice(0,2)}var Vn=/[^a-zA-Z0-9\\_:.-]/gim;function Un(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"="===i?e:-1}}function $n(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"'"===i||'"'===i?e:-1}}function qn(t,e){for(;e>0;e--){var i=t[e];if(" "!==i)return"="===i?e:-1}}function Xn(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}Hn.parseTag=function(t,e,i){var n="",o=0,s=!1,r=!1,a=0,h=t.length,l="",d="";t:for(a=0;a<h;a++){var c=t.charAt(a);if(!1===s){if("<"===c){s=a;continue}}else if(!1===r){if("<"===c){n+=i(t.slice(o,a)),s=a,o=a;continue}if(">"===c||a===h-1){n+=i(t.slice(o,s)),l=Wn(d=t.slice(s,a+1)),n+=e(s,n.length,l,d,Bn(d)),o=a+1,s=!1;continue}if('"'===c||"'"===c)for(var u=1,p=t.charAt(a-u);""===p.trim()||"="===p;){if("="===p){r=c;continue t}p=t.charAt(a-++u)}}else if(c===r){r=!1;continue}}return o<h&&(n+=i(t.substr(o))),n},Hn.parseAttr=function(t,e){var i=0,n=0,o=[],s=!1,r=t.length;function a(t,i){if(!((t=(t=Gn.trim(t)).replace(Vn,"").toLowerCase()).length<1)){var n=e(t,i||"");n&&o.push(n)}}for(var h=0;h<r;h++){var l,d=t.charAt(h);if(!1!==s||"="!==d)if(!1===s||h!==n)if(/\s|\n|\t/.test(d)){if(t=t.replace(/\s|\n|\t/g," "),!1===s){if(-1===(l=Un(t,h))){a(Gn.trim(t.slice(i,h))),s=!1,i=h+1;continue}h=l-1;continue}if(-1===(l=qn(t,h-1))){a(s,Xn(Gn.trim(t.slice(i,h)))),s=!1,i=h+1;continue}}else;else{if(-1===(l=t.indexOf(d,h+1)))break;a(s,Gn.trim(t.slice(n+1,l))),s=!1,i=(h=l)+1}else s=t.slice(i,h),i=h+1,n='"'===t.charAt(i)||"'"===t.charAt(i)?i:$n(t,h+1)}return i<t.length&&(!1===s?a(t.slice(i)):a(s,Xn(Gn.trim(t.slice(i))))),Gn.trim(o.join(" "))};var Qn=gn.FilterCSS,Zn=on,Kn=Hn,Jn=Kn.parseTag,to=Kn.parseAttr,eo=vn;function io(t){return null==t}function no(t){(t=function(t){var e={};for(var i in t)e[i]=t[i];return e}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=Zn.onIgnoreTagStripAll),t.whiteList||t.allowList?t.whiteList=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i.toLowerCase()]=t[i].map((function(t){return t.toLowerCase()})):e[i.toLowerCase()]=t[i];return e}(t.whiteList||t.allowList):t.whiteList=Zn.whiteList,this.attributeWrapSign=!0===t.singleQuotedAttributeValue?"'":Zn.attributeWrapSign,t.onTag=t.onTag||Zn.onTag,t.onTagAttr=t.onTagAttr||Zn.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||Zn.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||Zn.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||Zn.safeAttrValue,t.escapeHtml=t.escapeHtml||Zn.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new Qn(t.css))}no.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this,i=e.options,n=i.whiteList,o=i.onTag,s=i.onIgnoreTag,r=i.onTagAttr,a=i.onIgnoreTagAttr,h=i.safeAttrValue,l=i.escapeHtml,d=e.attributeWrapSign,c=e.cssFilter;i.stripBlankChar&&(t=Zn.stripBlankChar(t)),i.allowCommentTag||(t=Zn.stripCommentTag(t));var u=!1;i.stripIgnoreTagBody&&(u=Zn.StripTagBody(i.stripIgnoreTagBody,s),s=u.onIgnoreTag);var p=Jn(t,(function(t,e,i,u,p){var m={sourcePosition:t,position:e,isClosing:p,isWhite:Object.prototype.hasOwnProperty.call(n,i)},f=o(i,u,m);if(!io(f))return f;if(m.isWhite){if(m.isClosing)return"</"+i+">";var g=function(t){var e=eo.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var i="/"===(t=eo.trim(t.slice(e+1,-1)))[t.length-1];return i&&(t=eo.trim(t.slice(0,-1))),{html:t,closing:i}}(u),v=n[i],y=to(g.html,(function(t,e){var n=-1!==eo.indexOf(v,t),o=r(i,t,e,n);return io(o)?n?(e=h(i,t,e,c))?t+"="+d+e+d:t:io(o=a(i,t,e,n))?void 0:o:o}));return u="<"+i,y&&(u+=" "+y),g.closing&&(u+=" /"),u+=">"}return io(f=s(i,u,m))?l(u):f}),l);return u&&(p=u.remove(p)),p};var oo=no;!function(t,e){var i=on,n=Hn,o=oo;function s(t,e){return new o(e).process(t)}(e=t.exports=s).filterXSS=s,e.FilterXSS=o,function(){for(var t in i)e[t]=i[t];for(var o in n)e[o]=n[o]}(),"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)}(nn,nn.exports);var so=e(nn.exports),ro=null;
|
||
/**
|
||
* vis-timeline and vis-graph2d
|
||
* https://visjs.github.io/vis-timeline/
|
||
*
|
||
* Create a fully customizable, interactive timeline with items and ranges.
|
||
*
|
||
* @version 7.7.3
|
||
* @date 2023-10-27T17:57:57.604Z
|
||
*
|
||
* @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 ao(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ho=ao("undefined"!=typeof window&&window.moment||en);function lo(t){if(!t)return!1;let e=t.idProp??t._idProp;return!!e&&function(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof e.forEach&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof e.map&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.stream&&function(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof e.add&&"function"==typeof e.clear&&"function"==typeof e.distinct&&"function"==typeof e.forEach&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof e.map&&"function"==typeof e.max&&"function"==typeof e.min&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.remove&&"function"==typeof e.setOptions&&"function"==typeof e.stream&&"function"==typeof e.update&&"function"==typeof e.updateOnly}(t,e.getDataSet())}(e,t)}const co=/^\/?Date\((-?\d+)/i,uo=/^\d+$/;function po(t,e){let 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 ti(t)&&!isNaN(Date.parse(t))?en(t).valueOf():Number(t.valueOf());case"string":case"String":return String(t);case"Date":try{return po(t,"Moment").toDate()}catch(i){throw i instanceof TypeError?new TypeError("Cannot convert object of type "+si(t)+" to type "+e):i}case"Moment":if(Je(t))return en(t);if(t instanceof Date)return en(t.valueOf());if(en.isMoment(t))return en(t);if(ti(t))return i=co.exec(t),i?en(Number(i[1])):(i=uo.exec(t),en(i?Number(t):t));throw new TypeError("Cannot convert object of type "+si(t)+" to type "+e);case"ISODate":if(Je(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(en.isMoment(t))return t.toDate().toISOString();if(ti(t))return i=co.exec(t),i?new Date(Number(i[1])).toISOString():en(t).format();throw new Error("Cannot convert object of type "+si(t)+" to type ISODate");case"ASPDate":if(Je(t))return"/Date("+t+")/";if(t instanceof Date||en.isMoment(t))return"/Date("+t.valueOf()+")/";if(ti(t)){let e;return i=co.exec(t),e=i?new Date(Number(i[1])).valueOf():new Date(t).valueOf(),"/Date("+e+")/"}throw new Error("Cannot convert object of type "+si(t)+" to type ASPDate");default:throw new Error(`Unknown type ${e}`)}}}function mo(t,e={start:"Date",end:"Date"}){const i=t._idProp,n=new Qi({fieldId:i}),o=(s=t,new Vi(s)).map((t=>Object.keys(t).reduce(((i,n)=>(i[n]=po(t[n],e[n]),i)),{}))).to(n);var s;return o.all().start(),{add:(...e)=>t.getDataSet().add(...e),remove:(...e)=>t.getDataSet().remove(...e),update:(...e)=>t.getDataSet().update(...e),updateOnly:(...e)=>t.getDataSet().updateOnly(...e),clear:(...e)=>t.getDataSet().clear(...e),forEach:n.forEach.bind(n),get:n.get.bind(n),getIds:n.getIds.bind(n),off:n.off.bind(n),on:n.on.bind(n),get length(){return n.length},idProp:i,type:e,rawDS:t,coercedDS:n,dispose:()=>o.stop()}}const fo=t=>{const e=new so.FilterXSS(t);return t=>e.process(t)},go=t=>t;let vo=fo();const yo={...Fi,convert:po,setupXSSProtection:t=>{t&&(!0===t.disabled?(vo=go,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):t.filterOptions&&(vo=fo(t.filterOptions)))}};Object.defineProperty(yo,"xss",{get:function(){return vo}});class bo{constructor(t,e){this.options=null,this.props=null}setOptions(t){t&&yo.extend(this.options,t)}redraw(){return!1}destroy(){}_isResized(){const 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}}function wo(t,e,i){if(i&&!Array.isArray(i))return wo(t,e,[i]);if(e.hiddenDates=[],i&&1==Array.isArray(i)){for(let n=0;n<i.length;n++)if(void 0===i[n].repeat){const o={};o.start=t(i[n].start).toDate().valueOf(),o.end=t(i[n].end).toDate().valueOf(),e.hiddenDates.push(o)}e.hiddenDates.sort(((t,e)=>t.start-e.start))}}function _o(t,e,i){if(i&&!Array.isArray(i))return _o(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){wo(t,e,i);const n=t(e.range.start),o=t(e.range.end),s=(e.range.end-e.range.start)/e.domProps.centerContainer.width;for(let r=0;r<i.length;r++)if(void 0!==i[r].repeat){const a=t(i[r].start);let h=t(i[r].end);if("Invalid Date"==a._d)throw new Error(`Supplied start date is not valid: ${i[r].start}`);if("Invalid Date"==h._d)throw new Error(`Supplied end date is not valid: ${i[r].end}`);if(h-a>=4*s){let t=0;const s=o.clone();switch(i[r].repeat){case"daily":a.day()!=h.day()&&(t=1),a.dayOfYear(n.dayOfYear()),a.year(n.year()),a.subtract(7,"days"),h.dayOfYear(n.dayOfYear()),h.year(n.year()),h.subtract(7-t,"days"),s.add(1,"weeks");break;case"weekly":{const t=h.diff(a,"days"),e=a.day();a.date(n.date()),a.month(n.month()),a.year(n.year()),h=a.clone(),a.day(e),h.day(e),h.add(t,"days"),a.subtract(1,"weeks"),h.subtract(1,"weeks"),s.add(1,"weeks");break}case"monthly":a.month()!=h.month()&&(t=1),a.month(n.month()),a.year(n.year()),a.subtract(1,"months"),h.month(n.month()),h.year(n.year()),h.subtract(1,"months"),h.add(t,"months"),s.add(1,"months");break;case"yearly":a.year()!=h.year()&&(t=1),a.year(n.year()),a.subtract(1,"years"),h.year(n.year()),h.subtract(1,"years"),h.add(t,"years"),s.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",i[r].repeat)}for(;a<s;)switch(e.hiddenDates.push({start:a.valueOf(),end:h.valueOf()}),i[r].repeat){case"daily":a.add(1,"days"),h.add(1,"days");break;case"weekly":a.add(1,"weeks"),h.add(1,"weeks");break;case"monthly":a.add(1,"months"),h.add(1,"months");break;case"yearly":a.add(1,"y"),h.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",i[r].repeat)}e.hiddenDates.push({start:a.valueOf(),end:h.valueOf()})}}!function(t){const e=t.hiddenDates,i=[];for(var n=0;n<e.length;n++)for(let t=0;t<e.length;t++)n!=t&&1!=e[t].remove&&1!=e[n].remove&&(e[t].start>=e[n].start&&e[t].end<=e[n].end?e[t].remove=!0:e[t].start>=e[n].start&&e[t].start<=e[n].end?(e[n].end=e[t].end,e[t].remove=!0):e[t].end>=e[n].start&&e[t].end<=e[n].end&&(e[n].start=e[t].start,e[t].remove=!0));for(n=0;n<e.length;n++)!0!==e[n].remove&&i.push(e[n]);t.hiddenDates=i,t.hiddenDates.sort(((t,e)=>t.start-e.start))}(e);const r=Eo(e.range.start,e.hiddenDates),a=Eo(e.range.end,e.hiddenDates);let h=e.range.start,l=e.range.end;1==r.hidden&&(h=1==e.range.startToFront?r.startDate-1:r.endDate+1),1==a.hidden&&(l=1==e.range.endToFront?a.startDate-1:a.endDate+1),1!=r.hidden&&1!=a.hidden||e.range._applyRange(h,l)}}function xo(t,e,i){let n;if(0==t.body.hiddenDates.length)return n=t.range.conversion(i),(e.valueOf()-n.offset)*n.scale;{const o=Eo(e,t.body.hiddenDates);1==o.hidden&&(e=o.startDate);const s=So(t.body.hiddenDates,t.range.start,t.range.end);if(e<t.range.start){n=t.range.conversion(i,s);const o=function(t,e,i){let n=0;for(let o=0;o<t.length;o++){const s=t[o].start,r=t[o].end;s>=e&&r<=i&&(n+=r-s)}return n}(t.body.hiddenDates,e,n.offset);return e=t.options.moment(e).toDate().valueOf(),e+=o,-(n.offset-e.valueOf())*n.scale}if(e>t.range.end){const o={start:t.range.start,end:e};return e=Do(t.options.moment,t.body.hiddenDates,o,e),n=t.range.conversion(i,s),(e.valueOf()-n.offset)*n.scale}return e=Do(t.options.moment,t.body.hiddenDates,t.range,e),n=t.range.conversion(i,s),(e.valueOf()-n.offset)*n.scale}}function ko(t,e,i){if(0==t.body.hiddenDates.length){const n=t.range.conversion(i);return new Date(e/n.scale+n.offset)}{const n=So(t.body.hiddenDates,t.range.start,t.range.end),o=(t.range.end-t.range.start-n)*e/i,s=function(t,e,i){let n=0,o=0,s=e.start;for(let r=0;r<t.length;r++){const a=t[r].start,h=t[r].end;if(a>=e.start&&h<e.end){if(o+=a-s,s=h,o>=i)break;n+=h-a}}return n}(t.body.hiddenDates,t.range,o);return new Date(s+o+t.range.start)}}function So(t,e,i){let n=0;for(let o=0;o<t.length;o++){const s=t[o].start,r=t[o].end;s>=e&&r<i&&(n+=r-s)}return n}function Do(t,e,i,n){return n=t(n).toDate().valueOf(),n-=Co(t,e,i,n)}function Co(t,e,i,n){let o=0;n=t(n).toDate().valueOf();for(let t=0;t<e.length;t++){const s=e[t].start,r=e[t].end;s>=i.start&&r<i.end&&n>=r&&(o+=r-s)}return o}function To(t,e,i,n){const o=Eo(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 Eo(t,e){for(let o=0;o<e.length;o++){var i=e[o].start,n=e[o].end;if(t>=i&&t<n)return{hidden:!0,startDate:i,endDate:n}}return{hidden:!1,startDate:i,endDate:n}}class Oo extends bo{constructor(t,e){super();const i=ho().hours(0).minutes(0).seconds(0).milliseconds(0),n=i.clone().add(-3,"days").valueOf(),o=i.clone().add(3,"days").valueOf();this.millisecondsPerPixelCache=void 0,void 0===e?(this.start=n,this.end=o):(this.start=e.start||n,this.end=e.end||o),this.rolling=!1,this.body=t,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:ho,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},this.options=yo.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on("panstart",this._onDragStart.bind(this)),this.body.emitter.on("panmove",this._onDrag.bind(this)),this.body.emitter.on("panend",this._onDragEnd.bind(this)),this.body.emitter.on("mousewheel",this._onMouseWheel.bind(this)),this.body.emitter.on("touch",this._onTouch.bind(this)),this.body.emitter.on("pinch",this._onPinch.bind(this)),this.body.dom.rollingModeBtn.addEventListener("click",this.startRolling.bind(this)),this.setOptions(e)}setOptions(t){if(t){const e=["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","zoomFriction","rtl","showCurrentTime","rollingMode","horizontalScroll"];yo.selectiveExtend(e,this.options,t),t.rollingMode&&t.rollingMode.follow&&this.startRolling(),("start"in t||"end"in t)&&this.setRange(t.start,t.end)}}startRolling(){const t=this;!function e(){t.stopRolling(),t.rolling=!0;let i=t.end-t.start;const n=yo.convert(new Date,"Date").valueOf(),o=t.options.rollingMode&&t.options.rollingMode.offset||.5,s=n-i*o,r=n+i*(1-o);t.setRange(s,r,{animation:!1}),i=1/t.conversion(t.body.domProps.center.width).scale/10,i<30&&(i=30),i>1e3&&(i=1e3),t.body.dom.rollingModeBtn.style.visibility="hidden",t.currentTimeTimer=setTimeout(e,i)}()}stopRolling(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")}setRange(t,e,i,n,o){i||(i={}),!0!==i.byUser&&(i.byUser=!1);const s=this,r=null!=t?yo.convert(t,"Date").valueOf():null,a=null!=e?yo.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,i.animation){const t=this.start,e=this.end,l="object"==typeof i.animation&&"duration"in i.animation?i.animation.duration:500,d="object"==typeof i.animation&&"easingFunction"in i.animation?i.animation.easingFunction:"easeInOutQuad",c=yo.easingFunctions[d];if(!c)throw new Error(`Unknown easing function ${JSON.stringify(d)}. Choose from: ${Object.keys(yo.easingFunctions).join(", ")}`);const u=Date.now();let p=!1;const m=()=>{if(!s.props.touch.dragging){const d=Date.now()-u,f=c(d/l),g=d>l,v=g||null===r?r:t+(r-t)*f,y=g||null===a?a:e+(a-e)*f;h=s._applyRange(v,y),_o(s.options.moment,s.body,s.options.hiddenDates),p=p||h;const b={start:new Date(s.start),end:new Date(s.end),byUser:i.byUser,event:i.event};if(o&&o(f,h,g),h&&s.body.emitter.emit("rangechange",b),g){if(p&&(s.body.emitter.emit("rangechanged",b),n))return n()}else s.animationTimer=setTimeout(m,20)}};return m()}var h=this._applyRange(r,a);if(_o(this.options.moment,this.body,this.options.hiddenDates),h){const t={start:new Date(this.start),end:new Date(this.end),byUser:i.byUser,event:i.event};if(this.body.emitter.emit("rangechange",t),clearTimeout(s.timeoutID),s.timeoutID=setTimeout((()=>{s.body.emitter.emit("rangechanged",t)}),200),n)return n()}}getMillisecondsPerPixel(){return void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}_cancelAnimation(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)}_applyRange(t,e){let i=null!=t?yo.convert(t,"Date").valueOf():this.start,n=null!=e?yo.convert(e,"Date").valueOf():this.end;const o=null!=this.options.max?yo.convert(this.options.max,"Date").valueOf():null,s=null!=this.options.min?yo.convert(this.options.min,"Date").valueOf():null;let r;if(isNaN(i)||null===i)throw new Error(`Invalid start "${t}"`);if(isNaN(n)||null===n)throw new Error(`Invalid end "${e}"`);if(n<i&&(n=i),null!==s&&i<s&&(r=s-i,i+=r,n+=r,null!=o&&n>o&&(n=o)),null!==o&&n>o&&(r=n-o,i-=r,n-=r,null!=s&&i<s&&(i=s)),null!==this.options.zoomMin){let t=parseFloat(this.options.zoomMin);if(t<0&&(t=0),n-i<t){const e=.5;this.end-this.start===t&&i>=this.start-e&&n<=this.end?(i=this.start,n=this.end):(r=t-(n-i),i-=r/2,n+=r/2)}}if(null!==this.options.zoomMax){let t=parseFloat(this.options.zoomMax);t<0&&(t=0),n-i>t&&(this.end-this.start===t&&i<this.start&&n>this.end?(i=this.start,n=this.end):(r=n-i-t,i+=r/2,n-=r/2))}const a=this.start!=i||this.end!=n;return i>=this.start&&i<=this.end||n>=this.start&&n<=this.end||this.start>=i&&this.start<=n||this.end>=i&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=i,this.end=n,a}getRange(){return{start:this.start,end:this.end}}conversion(t,e){return Oo.conversion(this.start,this.end,t,e)}static conversion(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}}_onDragStart(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"))}_onDrag(t){if(!t)return;if(!this.props.touch.dragging)return;if(!this.options.moveable)return;if(!this.props.touch.allowDragging)return;const e=this.options.direction;Mo(e);let i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;let n=this.props.touch.end-this.props.touch.start;n-=So(this.body.hiddenDates,this.start,this.end);const o="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;let s;s=this.options.rtl?i/o*n:-i/o*n;const r=this.props.touch.start+s,a=this.props.touch.end+s,h=To(this.body.hiddenDates,r,this.previousDelta-i,!0),l=To(this.body.hiddenDates,a,this.previousDelta-i,!0);if(h!=r||l!=a)return this.deltaDifference+=i,this.props.touch.start=h,this.props.touch.end=l,void this._onDrag(t);this.previousDelta=i,this._applyRange(r,a);const d=new Date(this.start),c=new Date(this.end);this.body.emitter.emit("rangechange",{start:d,end:c,byUser:!0,event:t}),this.body.emitter.emit("panmove")}_onDragEnd(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}))}_onMouseWheel(t){let 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){const i=this.options.zoomFriction||5;let n,o;if(n=e<0?1-e/i:1/(1+e/i),this.rolling){const t=this.options.rollingMode&&this.options.rollingMode.offset||.5;o=this.start+(this.end-this.start)*t}else{const e=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);o=this._pointerToDate(e)}this.zoom(n,o,e,t),t.preventDefault()}}_onTouch(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,yo.preventDefault(t)}_onPinch(t){if(!this.options.zoomable||!this.options.moveable)return;yo.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();const e=1/(t.scale+this.scaleOffset),i=this.props.touch.centerDate,n=So(this.body.hiddenDates,this.start,this.end),o=Co(this.options.moment,this.body.hiddenDates,this,i),s=n-o;let r=i-o+(this.props.touch.start-(i-o))*e,a=i+s+(this.props.touch.end-(i+s))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;const h=To(this.body.hiddenDates,r,1-e,!0),l=To(this.body.hiddenDates,a,e-1,!0);h==r&&l==a||(this.props.touch.start=h,this.props.touch.end=l,this.scaleOffset=1-t.scale,r=h,a=l);const d={animation:!1,byUser:!0,event:t};this.setRange(r,a,d),this.startToFront=!1,this.endToFront=!0}_isInsideRange(t){const 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}_pointerToDate(t){let e;const i=this.options.direction;if(Mo(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();{const i=this.body.domProps.center.height;return e=this.conversion(i),t.y/e.scale+e.offset}}getPointer(t,e){const 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}}zoom(t,e,i,n){null==e&&(e=(this.start+this.end)/2);const o=So(this.body.hiddenDates,this.start,this.end),s=Co(this.options.moment,this.body.hiddenDates,this,e),r=o-s;let a=e-s+(this.start-(e-s))*t,h=e+r+(this.end-(e+r))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);const l=To(this.body.hiddenDates,a,i,!0),d=To(this.body.hiddenDates,h,-i,!0);l==a&&d==h||(a=l,h=d);const c={animation:!1,byUser:!0,event:n};this.setRange(a,h,c),this.startToFront=!1,this.endToFront=!0}move(t){const e=this.end-this.start,i=this.start+e*t,n=this.end+e*t;this.start=i,this.end=n}moveTo(t){const 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})}destroy(){this.stopRolling()}}function Mo(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError(`Unknown direction "${t}". Choose "horizontal" or "vertical".`)}let Po;if("undefined"!=typeof window){Po=function t(e,i){var n=i||{preventDefault:!1};if(e.Manager){var o=e,s=function(e,i){var s=Object.create(n);return i&&o.assign(s,i),t(new o(e,s),s)};return o.assign(s,o),s.Manager=function(e,i){var s=Object.create(n);return i&&o.assign(s,i),t(new o.Manager(e,s),s)},s}var r=Object.create(e),a=e.element;function h(t){return t.match(/[^ ]+/g)}function l(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 i=t.srcEvent.stopPropagation.bind(t.srcEvent);"function"==typeof i&&(t.srcEvent.stopPropagation=function(){i(),t.stopPropagation()}),t.firstTarget=ro;for(var n=ro;n&&!e;){var o=n.hammer;if(o)for(var s,r=0;r<o.length;r++)if(s=o[r]._handlers[t.type])for(var a=0;a<s.length&&!e;a++)s[a](t);n=n.parentNode}}return a.hammer||(a.hammer=[]),a.hammer.push(r),e.on("hammer.input",(function(t){!0!==n.preventDefault&&n.preventDefault!==t.pointerType||t.preventDefault(),t.isFirst&&(ro=t.target)})),r._handlers={},r.on=function(t,i){return h(t).forEach((function(t){var n=r._handlers[t];n||(r._handlers[t]=n=[],e.on(t,l)),n.push(i)})),r},r.off=function(t,i){return h(t).forEach((function(t){var n=r._handlers[t];n&&((n=i?n.filter((function(t){return t!==i})):[]).length>0?r._handlers[t]=n:(e.off(t,l),delete r._handlers[t]))})),r},r.emit=function(t,i){ro=i.target,e.emit(t,i)},r.destroy=function(){var t=e.element.hammer,i=t.indexOf(r);-1!==i&&t.splice(i,1),t.length||delete e.element.hammer,r._handlers={},e.destroy()},r}(window.Hammer||Ye,{preventDefault:"mouse"})}else Po=()=>function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:e=>({set:t})}}();var Io=Po;function Ao(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}class No{constructor(t,e,i,n,o){this.moment=o&&o.moment||ho,this.options=o||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale="day",this.step=1,this.setRange(t,e,i),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,Array.isArray(n)?this.hiddenDates=n:this.hiddenDates=null!=n?[n]:[],this.format=No.FORMAT}setMoment(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())}setFormat(t){const e=yo.deepExtend({},No.FORMAT);this.format=yo.deepExtend(e,t)}setRange(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()):Date.now(),this._end=null!=e?this.moment(e.valueOf()):Date.now(),this.autoScale&&this.setMinimumStep(i)}start(){this.current=this._start.clone(),this.roundToMinor()}roundToMinor(){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){let 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(To(this.hiddenDates,this.current.valueOf(),-1,!0)))}}hasNext(){return this.current.valueOf()<=this._end.valueOf()}next(){const 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{const t=this.current.clone();t.add(1,"week"),t.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,function(t,e,i){let n=!1;const o=e.current.valueOf();for(let t=0;t<e.hiddenDates.length;t++){const i=e.hiddenDates[t].start;var s=e.hiddenDates[t].end;if(o>=i&&o<s){n=!0;break}}if(1==n&&o<e._end.valueOf()&&o!=i){const n=t(i),o=t(s);n.year()!=o.year()?e.switchedYear=!0:n.month()!=o.month()?e.switchedMonth=!0:n.dayOfYear()!=o.dayOfYear()&&(e.switchedDay=!0),e.current=o}}(this.moment,this,t)}getCurrent(){return this.current.clone()}setScale(t){t&&"string"==typeof t.scale&&(this.scale=t.scale,this.step=t.step>0?t.step:1,this.autoScale=!1)}setAutoScale(t){this.autoScale=t}setMinimumStep(t){if(null==t)return;const e=31104e6,i=2592e6,n=864e5,o=36e5,s=6e4,r=1e3;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),7776e6>t&&(this.scale="month",this.step=3),i>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),n>t&&(this.scale="day",this.step=1),432e5>t&&(this.scale="weekday",this.step=1),144e5>t&&(this.scale="hour",this.step=4),o>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),s>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),r>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)}static snap(t,e,i){const n=ho(t);if("year"==e){const t=n.year()+Math.round(n.month()/12);n.year(Math.round(t/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){if(4===i)n.minutes(60*Math.round(n.minutes()/60));else 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){const t=i>5?i/2:1;n.milliseconds(Math.round(n.milliseconds()/t)*t)}return n}isMajor(){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}const 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":return this.options.showWeekScale?1==t.isoWeekday():1==t.date();case"week":return 1==t.date();case"month":return 0==t.month();default:return!1}}getLabelMinor(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);const e=this.format.minorLabels[this.scale];return"week"===this.scale&&1===t.date()&&0!==t.weekday()?"":e&&e.length>0?this.moment(t).format(e):""}getLabelMajor(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);const e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""}getClassName(){const t=this.moment,e=this.moment(this.current),i=e.locale?e.locale("en"):e.lang("en"),n=this.step,o=[];function s(t){return t/n%2==0?" vis-even":" vis-odd"}function r(e){return e.isSame(Date.now(),"day")?" vis-today":e.isSame(t().add(1,"day"),"day")?" vis-tomorrow":e.isSame(t().add(-1,"day"),"day")?" vis-yesterday":""}function a(t){return t.isSame(Date.now(),"week")?" vis-current-week":""}function h(t){return t.isSame(Date.now(),"month")?" vis-current-month":""}switch(this.scale){case"millisecond":o.push(r(i)),o.push(s(i.milliseconds()));break;case"second":o.push(r(i)),o.push(s(i.seconds()));break;case"minute":o.push(r(i)),o.push(s(i.minutes()));break;case"hour":o.push(`vis-h${i.hours()}${4==this.step?"-h"+(i.hours()+4):""}`),o.push(r(i)),o.push(s(i.hours()));break;case"weekday":o.push(`vis-${i.format("dddd").toLowerCase()}`),o.push(r(i)),o.push(a(i)),o.push(s(i.date()));break;case"day":o.push(`vis-day${i.date()}`),o.push(`vis-${i.format("MMMM").toLowerCase()}`),o.push(r(i)),o.push(h(i)),o.push(this.step<=2?r(i):""),o.push(this.step<=2?`vis-${i.format("dddd").toLowerCase()}`:""),o.push(s(i.date()-1));break;case"week":o.push(`vis-week${i.format("w")}`),o.push(a(i)),o.push(s(i.week()));break;case"month":o.push(`vis-${i.format("MMMM").toLowerCase()}`),o.push(h(i)),o.push(s(i.month()));break;case"year":o.push(`vis-year${i.year()}`),o.push(function(t){return t.isSame(Date.now(),"year")?" vis-current-year":""}(i)),o.push(s(i.year()))}return o.filter(String).join(" ")}}No.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:""}};class Ro extends bo{constructor(t,e){super(),this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:yo.extend({},No.FORMAT),moment:ho,timeAxis:null},this.options=yo.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}setOptions(t){t&&(yo.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),yo.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"==typeof t.orientation&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof ho.locale?ho.locale(t.locale):ho.lang(t.locale)))}_create(){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"}destroy(){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}redraw(){const 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();const s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?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;const a=e.nextSibling,h=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height=`${this.props.height}px`,this._repaintLabels(),a?n.insertBefore(e,a):n.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||o}_repaintLabels(){const t=this.options.orientation.axis,e=yo.convert(this.body.range.start,"Number"),i=yo.convert(this.body.range.end,"Number"),n=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf();let o=n-Co(this.options.moment,this.body.hiddenDates,this.body.range,n);o-=this.body.util.toTime(0).valueOf();const s=new No(new Date(e),new Date(i),o,this.body.hiddenDates,this.options);s.setMoment(this.options.moment),this.options.format&&s.setFormat(this.options.format),this.options.timeAxis&&s.setScale(this.options.timeAxis),this.step=s;const r=this.dom;let a,h,l,d,c,u;r.redundant.lines=r.lines,r.redundant.majorTexts=r.majorTexts,r.redundant.minorTexts=r.minorTexts,r.lines=[],r.majorTexts=[],r.minorTexts=[];let p,m,f,g=0,v=0;const y=1e3;let b;for(s.start(),h=s.getCurrent(),d=this.body.util.toScreen(h);s.hasNext()&&v<y;){if(v++,c=s.isMajor(),b=s.getClassName(),a=h,l=d,s.next(),h=s.getCurrent(),d=this.body.util.toScreen(h),p=g,g=d-l,"week"===s.scale)u=!0;else u=g>=.4*p;if(this.options.showMinorLabels&&u){var w=this._repaintMinorText(l,s.getLabelMinor(a),t,b);w.style.width=`${g}px`}c&&this.options.showMajorLabels?(l>0&&(null==f&&(f=l),w=this._repaintMajorText(l,s.getLabelMajor(a),t,b)),m=this._repaintMajorLine(l,g,t,b)):u?m=this._repaintMinorLine(l,g,t,b):m&&(m.style.width=`${parseInt(m.style.width)+g}px`)}if(v!==y||Fo||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to 1000 lines."),Fo=!0),this.options.showMajorLabels){const e=this.body.util.toTime(0),i=s.getLabelMajor(e),n=i.length*(this.props.majorCharWidth||10)+10;(null==f||n<f)&&this._repaintMajorText(0,i,t,b)}yo.forEach(this.dom.redundant,(t=>{for(;t.length;){const e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}}))}_repaintMinorText(t,e,i,n){let o=this.dom.redundant.minorTexts.shift();if(!o){const t=document.createTextNode("");o=document.createElement("div"),o.appendChild(t),this.dom.foreground.appendChild(o)}this.dom.minorTexts.push(o),o.innerHTML=yo.xss(e);let s="top"==i?this.props.majorLabelHeight:0;return this._setXY(o,t,s),o.className=`vis-text vis-minor ${n}`,o}_repaintMajorText(t,e,i,n){let o=this.dom.redundant.majorTexts.shift();if(!o){const t=document.createElement("div");o=document.createElement("div"),o.appendChild(t),this.dom.foreground.appendChild(o)}o.childNodes[0].innerHTML=yo.xss(e),o.className=`vis-text vis-major ${n}`;let s="top"==i?0:this.props.minorLabelHeight;return this._setXY(o,t,s),this.dom.majorTexts.push(o),o}_setXY(t,e,i){const n=this.options.rtl?-1*e:e;t.style.transform=`translate(${n}px, ${i}px)`}_repaintMinorLine(t,e,i,n){let o=this.dom.redundant.lines.shift();o||(o=document.createElement("div"),this.dom.background.appendChild(o)),this.dom.lines.push(o);const s=this.props;o.style.width=`${e}px`,o.style.height=`${s.minorLineHeight}px`;let r="top"==i?s.majorLabelHeight:this.body.domProps.top.height,a=t-s.minorLineWidth/2;return this._setXY(o,a,r),o.className=`vis-grid ${this.options.rtl?"vis-vertical-rtl":"vis-vertical"} vis-minor ${n}`,o}_repaintMajorLine(t,e,i,n){let o=this.dom.redundant.lines.shift();o||(o=document.createElement("div"),this.dom.background.appendChild(o)),this.dom.lines.push(o);const s=this.props;o.style.width=`${e}px`,o.style.height=`${s.majorLineHeight}px`;let r="top"==i?0:this.body.domProps.top.height,a=t-s.majorLineWidth/2;return this._setXY(o,a,r),o.className=`vis-grid ${this.options.rtl?"vis-vertical-rtl":"vis-vertical"} vis-major ${n}`,o}_calculateCharSize(){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}}var Fo=!1;function Lo(t){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=Io(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var e=this;["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach((function(t){e.hammer.on(t,(function(t){t.stopPropagation()}))})),document&&document.body&&(this.onClick=function(i){(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(i.target,t)||e.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=function(t){var e,i=t&&t.preventDefault||!1,n=t&&t.container||window,o={},s={keydown:{},keyup:{}},r={};for(e=97;e<=122;e++)r[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)r[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)r["num"+e]={code:96+e,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r.delete={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(t){l(t,"keydown")},h=function(t){l(t,"keyup")},l=function(t,e){if(void 0!==s[e][t.keyCode]){for(var n=s[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===r[t])throw new Error("unsupported key: "+t);void 0===s[i][r[t].code]&&(s[i][r[t].code]=[]),s[i][r[t].code].push({fn:e,shift:r[t].shift})},o.bindAll=function(t,e){for(var i in void 0===e&&(e="keydown"),r)r.hasOwnProperty(i)&&o.bind(i,t,e)},o.getKey=function(t){for(var e in r)if(r.hasOwnProperty(e)){if(1==t.shiftKey&&1==r[e].shift&&t.keyCode==r[e].code)return e;if(0==t.shiftKey&&0==r[e].shift&&t.keyCode==r[e].code)return e;if(t.keyCode==r[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===r[t])throw new Error("unsupported key: "+t);if(void 0!==e){var n=[],o=s[i][r[t].code];if(void 0!==o)for(var a=0;a<o.length;a++)o[a].fn==e&&o[a].shift==r[t].shift||n.push(s[i][r[t].code][a]);s[i][r[t].code]=n}else s[i][r[t].code]=[]},o.reset=function(){s={keydown:{},keyup:{}}},o.destroy=function(){s={keydown:{},keyup:{}},n.removeEventListener("keydown",a,!0),n.removeEventListener("keyup",h,!0)},n.addEventListener("keydown",a,!0),n.addEventListener("keyup",h,!0),o}(),this.escListener=this.deactivate.bind(this)}B(Lo.prototype),Lo.current=null,Lo.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},Lo.prototype.activate=function(){Lo.current&&Lo.current.deactivate(),Lo.current=this,this.active=!0,this.dom.overlay.style.display="none",yo.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},Lo.prototype.deactivate=function(){Lo.current===this&&(Lo.current=null),this.active=!1,this.dom.overlay.style.display="",yo.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},Lo.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()};const jo={current:"current",time:"time",deleteSelected:"Delete selected"},Yo={current:"attuale",time:"tempo",deleteSelected:"Cancella la selezione"},zo={current:"huidige",time:"tijd",deleteSelected:"Selectie verwijderen"},Ho={current:"Aktuelle",time:"Zeit",deleteSelected:"Lösche Auswahl"},Go={current:"actuel",time:"heure",deleteSelected:"Effacer la selection"},Wo={current:"corriente",time:"hora",deleteSelected:"Eliminar selección"},Bo={current:"поточний",time:"час",deleteSelected:"Видалити обране"},Vo={current:"текущее",time:"время",deleteSelected:"Удалить выбранное"},Uo={current:"aktualny",time:"czas",deleteSelected:"Usuń wybrane"},$o={current:"atual",time:"data",deleteSelected:"Apagar selecionado"},qo={current:"現在",time:"時刻",deleteSelected:"選択されたものを削除"},Xo={current:"nuvarande",time:"tid",deleteSelected:"Radera valda"},Qo={current:"nåværende",time:"tid",deleteSelected:"Slett valgte"},Zo={current:"einamas",time:"laikas",deleteSelected:"Pašalinti pasirinktą"},Ko={en:jo,en_EN:jo,en_US:jo,it:Yo,it_IT:Yo,it_CH:Yo,nl:zo,nl_NL:zo,nl_BE:zo,de:Ho,de_DE:Ho,fr:Go,fr_FR:Go,fr_CA:Go,fr_BE:Go,es:Wo,es_ES:Wo,uk:Bo,uk_UA:Bo,ru:Vo,ru_RU:Vo,pl:Uo,pl_PL:Uo,pt:$o,pt_BR:$o,pt_PT:$o,ja:qo,ja_JP:qo,lt:Zo,lt_LT:Zo,sv:Xo,sv_SE:Xo,nb:Qo,nn:Qo,nb_NO:Qo,nn_NO:Qo};class Jo extends bo{constructor(t,e){super(),this.body=t,this.defaultOptions={moment:ho,locales:Ko,locale:"en",id:void 0,title:void 0},this.options=yo.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=yo.extend({},Ko,this.options.locales);const i=this.defaultOptions.locales[this.defaultOptions.locale];Object.keys(this.options.locales).forEach((t=>{this.options.locales[t]=yo.extend({},i,this.options.locales[t])})),e&&null!=e.time?this.customTime=e.time:this.customTime=new Date,this.eventParams={},this._create()}setOptions(t){t&&yo.selectiveExtend(["moment","locale","locales","id","title","rtl","snap"],this.options,t)}_create(){const t=document.createElement("div");t["custom-time"]=this,t.className=`vis-custom-time ${this.options.id||""}`,t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t;const e=document.createElement("div");function i(t){this.body.range._onMouseWheel(t)}e.style.position="relative",e.style.top="0px",this.options.rtl?e.style.right="-10px":e.style.left="-10px",e.style.height="100%",e.style.width="20px",e.addEventListener?(e.addEventListener("mousewheel",i.bind(this),!1),e.addEventListener("DOMMouseScroll",i.bind(this),!1)):e.attachEvent("onmousewheel",i.bind(this)),t.appendChild(e),this.hammer=new Io(e),this.hammer.on("panstart",this._onDragStart.bind(this)),this.hammer.on("panmove",this._onDrag.bind(this)),this.hammer.on("panend",this._onDragEnd.bind(this)),this.hammer.get("pan").set({threshold:5,direction:Io.DIRECTION_ALL}),this.hammer.get("press").set({time:1e4})}destroy(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}redraw(){const t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar));const e=this.body.util.toScreen(this.customTime);let i=this.options.locales[this.options.locale];i||(this.warned||(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),this.warned=!0),i=this.options.locales.en);let n=this.options.title;return void 0===n?(n=`${i.time}: ${this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss")}`,n=n.charAt(0).toUpperCase()+n.substring(1)):"function"==typeof n&&(n=n.call(this,this.customTime)),this.options.rtl?this.bar.style.right=`${e}px`:this.bar.style.left=`${e}px`,this.bar.title=n,!1}hide(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}setCustomTime(t){this.customTime=yo.convert(t,"Date"),this.redraw()}getCustomTime(){return new Date(this.customTime.valueOf())}setCustomMarker(t,e){this.marker&&this.bar.removeChild(this.marker),this.marker=document.createElement("div"),this.marker.className="vis-custom-time-marker",this.marker.innerHTML=yo.xss(t),this.marker.style.position="absolute",e&&(this.marker.setAttribute("contenteditable","true"),this.marker.addEventListener("pointerdown",(function(){this.marker.focus()})),this.marker.addEventListener("input",this._onMarkerChange.bind(this)),this.marker.title=t,this.marker.addEventListener("blur",function(t){this.title!=t.target.innerHTML&&(this._onMarkerChanged(t),this.title=t.target.innerHTML)}.bind(this))),this.bar.appendChild(this.marker)}setCustomTitle(t){this.options.title=t}_onDragStart(t){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,t.stopPropagation()}_onDrag(t){if(!this.eventParams.dragging)return;let e=this.options.rtl?-1*t.deltaX:t.deltaX;const i=this.body.util.toScreen(this.eventParams.customTime)+e,n=this.body.util.toTime(i),o=this.body.util.getScale(),s=this.body.util.getStep(),r=this.options.snap,a=r?r(n,o,s):n;this.setCustomTime(a),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation()}_onDragEnd(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation())}_onMarkerChange(t){this.body.emitter.emit("markerchange",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}_onMarkerChanged(t){this.body.emitter.emit("markerchanged",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}static customTimeFromTarget(t){let e=t.target;for(;e;){if(e.hasOwnProperty("custom-time"))return e["custom-time"];e=e.parentNode}return null}}class ts{_create(t){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",(()=>{!0===this.initialDrawDone&&this._redraw()})),this.on("rangechanged",(()=>{this.initialRangeChangeDone||(this.initialRangeChangeDone=!0)})),this.on("touch",this._onTouch.bind(this)),this.on("panmove",this._onDrag.bind(this));const e=this;this._origRedraw=this._redraw.bind(this),this._redraw=yo.throttle(this._origRedraw),this.on("_change",(t=>{e.itemSet&&e.itemSet.initialItemSetDrawn&&t&&1==t.queue?e._redraw():e._origRedraw()})),this.hammer=new Io(this.dom.root);const i=this.hammer.get("pinch").set({enable:!0});i&&function(t){t.getTouchAction=function(){return["pan-y"]}}(i),this.hammer.get("pan").set({threshold:5,direction:Io.DIRECTION_ALL}),this.timelineListeners={};var n,o;function s(t){this.isActive()&&this.emit("mousewheel",t);let 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)){const e=this.props.scrollTop,n=e+i;if(this.isActive()){this._setScrollTop(n)!==e&&(this._redraw(),this.emit("scroll",t),t.preventDefault())}}else if(this.options.horizontalScroll){const n=(Math.abs(e)>=Math.abs(i)?e:i)/120*(this.range.end-this.range.start)/20,o=this.range.start+n,s=this.range.end+n,r={animation:!1,byUser:!0,event:t};this.range.setRange(o,s,r),t.preventDefault()}}["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach((t=>{const i=i=>{e.isActive()&&e.emit(t,i)};e.hammer.on(t,i),e.timelineListeners[t]=i})),Ao(this.hammer,(t=>{e.emit("touch",t)})),n=this.hammer,(o=t=>{e.emit("release",t)}).inputHandler=function(t){t.isFinal&&o(t)},n.on("hammer.input",o.inputHandler);const r="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";function a(t){if(e.options.verticalScroll&&(t.preventDefault(),e.isActive())){const i=-t.target.scrollTop;e._setScrollTop(i),e._redraw(),e.emit("scrollSide",t)}}this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(r,s.bind(this),!1),this.dom.top.addEventListener(r,s.bind(this),!1),this.dom.bottom.addEventListener(r,s.bind(this),!1),this.dom.left.parentNode.addEventListener("scroll",a.bind(this)),this.dom.right.parentNode.addEventListener("scroll",a.bind(this));let h=!1;if(this.dom.center.addEventListener("dragover",function(t){if(t.preventDefault&&(e.emit("dragover",e.getEventProperties(t)),t.preventDefault()),t.target.className.indexOf("timeline")>-1&&!h)return t.dataTransfer.dropEffect="move",h=!0,!1}.bind(this),!1),this.dom.center.addEventListener("drop",function(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();try{var i=JSON.parse(t.dataTransfer.getData("text"));if(!i||!i.content)return}catch(t){return!1}return h=!1,t.center={x:t.clientX,y:t.clientY},"item"!==i.target?e.itemSet._onAddItem(t):e.itemSet._onDropObjectOnItem(t),e.emit("drop",e.getEventProperties(t)),!1}.bind(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)}setOptions(t){if(t){const e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","preferZoom","rtl","zoomKey","horizontalScroll","verticalScroll","longSelectPressTime","snap"];if(yo.selectiveExtend(e,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"!=typeof 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"==typeof 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){const t=this.timeAxis2=new Ro(this.body,this.options);t.setOptions=e=>{const i=e?yo.extend({},e):{};i.orientation="top",Ro.prototype.setOptions.call(t,i)},this.components.push(t)}}else if(this.timeAxis2){const t=this.components.indexOf(this.timeAxis2);-1!==t&&this.components.splice(t,1),this.timeAxis2.destroy(),this.timeAxis2=null}"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&wo(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new Lo(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(this.components.forEach((e=>e.setOptions(t))),"configure"in t){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);const e=yo.deepExtend({},this.options);this.components.forEach((t=>{yo.deepExtend(e,t.options)})),this.configurator.setModuleOptions({global:e})}this._redraw()}isActive(){return!this.activator||this.activator.active}destroy(){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);for(const t in this.timelineListeners)this.timelineListeners.hasOwnProperty(t)&&delete this.timelineListeners[t];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,this.components.forEach((t=>t.destroy())),this.body=null}setCustomTime(t,e){const i=this.customTimes.filter((t=>e===t.options.id));if(0===i.length)throw new Error(`No custom time bar found with id ${JSON.stringify(e)}`);i.length>0&&i[0].setCustomTime(t)}getCustomTime(t){const e=this.customTimes.filter((e=>e.options.id===t));if(0===e.length)throw new Error(`No custom time bar found with id ${JSON.stringify(t)}`);return e[0].getCustomTime()}setCustomTimeMarker(t,e,i){const n=this.customTimes.filter((t=>t.options.id===e));if(0===n.length)throw new Error(`No custom time bar found with id ${JSON.stringify(e)}`);n.length>0&&n[0].setCustomMarker(t,i)}setCustomTimeTitle(t,e){const i=this.customTimes.filter((t=>t.options.id===e));if(0===i.length)throw new Error(`No custom time bar found with id ${JSON.stringify(e)}`);if(i.length>0)return i[0].setCustomTitle(t)}getEventProperties(t){return{event:t}}addCustomTime(t,e){const i=void 0!==t?yo.convert(t,"Date"):new Date,n=this.customTimes.some((t=>t.options.id===e));if(n)throw new Error(`A custom time with id ${JSON.stringify(e)} already exists`);const o=new Jo(this.body,yo.extend({},this.options,{time:i,id:e,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(o),this.components.push(o),this._redraw(),e}removeCustomTime(t){const e=this.customTimes.filter((e=>e.options.id===t));if(0===e.length)throw new Error(`No custom time bar found with id ${JSON.stringify(t)}`);e.forEach((t=>{this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}))}getVisibleItems(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}getItemsAtCurrentTime(t){return this.time=t,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}getVisibleGroups(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}fit(t,e){const i=this.getDataRange();if(null===i.min&&null===i.max)return;const n=i.max-i.min,o=new Date(i.min.valueOf()-.01*n),s=new Date(i.max.valueOf()+.01*n),r=!t||void 0===t.animation||t.animation;this.range.setRange(o,s,{animation:r},e)}getDataRange(){throw new Error("Cannot invoke abstract method getDataRange")}setWindow(t,e,i,n){let o,s;"function"==typeof arguments[2]&&(n=arguments[2],i={}),1==arguments.length?(s=arguments[0],o=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:o})):2==arguments.length&&"function"==typeof arguments[1]?(s=arguments[0],n=arguments[1],o=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:o},n)):(o=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:o},n))}moveTo(t,e,i){"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.range.end-this.range.start,o=yo.convert(t,"Date").valueOf(),s=o-n/2,r=o+n/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(s,r,{animation:a},i)}getWindow(){const t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}}zoomIn(t,e,i){if(!t||t<0||t>1)return;"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.getWindow(),o=n.start.valueOf(),s=n.end.valueOf(),r=s-o,a=(r-r/(1+t))/2,h=o+a,l=s-a;this.setWindow(h,l,e,i)}zoomOut(t,e,i){if(!t||t<0||t>1)return;"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.getWindow(),o=n.start.valueOf(),s=n.end.valueOf(),r=s-o,a=o-r*t/2,h=s+r*t/2;this.setWindow(a,h,e,i)}redraw(){this._redraw()}_redraw(){this.redrawCount++;const t=this.dom;if(!t||!t.container||0==t.root.offsetWidth)return;let e=!1;const i=this.options,n=this.props;_o(this.options.moment,this.body,this.options.hiddenDates),"top"==i.orientation?(yo.addClassName(t.root,"vis-top"),yo.removeClassName(t.root,"vis-bottom")):(yo.removeClassName(t.root,"vis-top"),yo.addClassName(t.root,"vis-bottom")),i.rtl?(yo.addClassName(t.root,"vis-rtl"),yo.removeClassName(t.root,"vis-ltr")):(yo.addClassName(t.root,"vis-ltr"),yo.removeClassName(t.root,"vis-rtl")),t.root.style.maxHeight=yo.option.asSize(i.maxHeight,""),t.root.style.minHeight=yo.option.asSize(i.minHeight,""),t.root.style.width=yo.option.asSize(i.width,"");const o=t.root.offsetWidth;n.border.left=1,n.border.right=1,n.border.top=1,n.border.bottom=1,n.center.height=t.center.offsetHeight,n.left.height=t.left.offsetHeight,n.right.height=t.right.offsetHeight,n.top.height=t.top.clientHeight||-n.border.top,n.bottom.height=Math.round(t.bottom.getBoundingClientRect().height)||t.bottom.clientHeight||-n.border.bottom;const s=Math.max(n.left.height,n.center.height,n.right.height),r=n.top.height+s+n.bottom.height+n.border.top+n.border.bottom;t.root.style.height=yo.option.asSize(i.height,`${r}px`),n.root.height=t.root.offsetHeight,n.background.height=n.root.height;const a=n.root.height-n.top.height-n.bottom.height;n.centerContainer.height=a,n.leftContainer.height=a,n.rightContainer.height=n.leftContainer.height,n.root.width=o,n.background.width=n.root.width,this.initialDrawDone||(n.scrollbarWidth=yo.getScrollBarWidth());const h=t.leftContainer.clientWidth,l=t.rightContainer.clientWidth;i.verticalScroll?i.rtl?(n.left.width=h||-n.border.left,n.right.width=l+n.scrollbarWidth||-n.border.right):(n.left.width=h+n.scrollbarWidth||-n.border.left,n.right.width=l||-n.border.right):(n.left.width=h||-n.border.left,n.right.width=l||-n.border.right),this._setDOM();let d=this._updateScrollTop();"top"!=i.orientation.item&&(d+=Math.max(n.centerContainer.height-n.center.height-n.border.top-n.border.bottom,0)),t.center.style.transform=`translateY(${d}px)`;const c=0==n.scrollTop?"hidden":"",u=n.scrollTop==n.scrollTopMin?"hidden":"";t.shadowTop.style.visibility=c,t.shadowBottom.style.visibility=u,t.shadowTopLeft.style.visibility=c,t.shadowBottomLeft.style.visibility=u,t.shadowTopRight.style.visibility=c,t.shadowBottomRight.style.visibility=u,i.verticalScroll&&(t.rightContainer.className="vis-panel vis-right vis-vertical-scroll",t.leftContainer.className="vis-panel vis-left vis-vertical-scroll",t.shadowTopRight.style.visibility="hidden",t.shadowBottomRight.style.visibility="hidden",t.shadowTopLeft.style.visibility="hidden",t.shadowBottomLeft.style.visibility="hidden",t.left.style.top="0px",t.right.style.top="0px"),(!i.verticalScroll||n.center.height<n.centerContainer.height)&&(t.left.style.top=`${d}px`,t.right.style.top=`${d}px`,t.rightContainer.className=t.rightContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),t.leftContainer.className=t.leftContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),n.left.width=h||-n.border.left,n.right.width=l||-n.border.right,this._setDOM());const p=n.center.height>n.centerContainer.height;this.hammer.get("pan").set({direction:p?Io.DIRECTION_ALL:Io.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),this.components.forEach((t=>{e=t.redraw()||e}));if(e){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")}_setDOM(){const t=this.props,e=this.dom;t.leftContainer.width=t.left.width,t.rightContainer.width=t.right.width;const 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=`${t.background.height}px`,e.backgroundVertical.style.height=`${t.background.height}px`,e.backgroundHorizontal.style.height=`${t.centerContainer.height}px`,e.centerContainer.style.height=`${t.centerContainer.height}px`,e.leftContainer.style.height=`${t.leftContainer.height}px`,e.rightContainer.style.height=`${t.rightContainer.height}px`,e.background.style.width=`${t.background.width}px`,e.backgroundVertical.style.width=`${t.centerContainer.width}px`,e.backgroundHorizontal.style.width=`${t.background.width}px`,e.centerContainer.style.width=`${t.center.width}px`,e.top.style.width=`${t.top.width}px`,e.bottom.style.width=`${t.bottom.width}px`,e.background.style.left="0",e.background.style.top="0",e.backgroundVertical.style.left=`${t.left.width+t.border.left}px`,e.backgroundVertical.style.top="0",e.backgroundHorizontal.style.left="0",e.backgroundHorizontal.style.top=`${t.top.height}px`,e.centerContainer.style.left=`${t.left.width}px`,e.centerContainer.style.top=`${t.top.height}px`,e.leftContainer.style.left="0",e.leftContainer.style.top=`${t.top.height}px`,e.rightContainer.style.left=`${t.left.width+t.center.width}px`,e.rightContainer.style.top=`${t.top.height}px`,e.top.style.left=`${t.left.width}px`,e.top.style.top="0",e.bottom.style.left=`${t.left.width}px`,e.bottom.style.top=`${t.top.height+t.centerContainer.height}px`,e.center.style.left="0",e.left.style.left="0",e.right.style.left="0"}setCurrentTime(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)}getCurrentTime(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()}_toTime(t){return ko(this,t,this.props.center.width)}_toGlobalTime(t){return ko(this,t,this.props.root.width)}_toScreen(t){return xo(this,t,this.props.center.width)}_toGlobalScreen(t){return xo(this,t,this.props.root.width)}_initAutoResize(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()}_startAutoResize(){const t=this;this._stopAutoResize(),this._onResize=()=>{if(1==t.options.autoResize){if(t.dom.root){const 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=yo.getScrollBarWidth(),t.body.emitter.emit("_change"))}}else t._stopAutoResize()},window.addEventListener("resize",this._onResize),t.dom.root&&(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight),this.watchTimer=setInterval(this._onResize,1e3)}_stopAutoResize(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null)}_onTouch(t){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}_onPinch(t){this.touch.allowDragging=!1}_onDrag(t){if(!t)return;if(!this.touch.allowDragging)return;const 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")}_setScrollTop(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop}_updateScrollTop(){const t=Math.min(this.props.centerContainer.height-this.props.border.top-this.props.border.bottom-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.props.scrollTop}_getScrollTop(){return this.props.scrollTop}_createConfigurator(){throw new Error("Cannot invoke abstract method _createConfigurator")}}B(ts.prototype);class es extends bo{constructor(t,e){super(),this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:ho,locales:Ko,locale:"en"},this.options=yo.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=yo.extend({},Ko,this.options.locales);const i=this.defaultOptions.locales[this.defaultOptions.locale];Object.keys(this.options.locales).forEach((t=>{this.options.locales[t]=yo.extend({},i,this.options.locales[t])})),this.offset=0,this._create()}_create(){const t=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t}destroy(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}setOptions(t){t&&yo.selectiveExtend(["rtl","showCurrentTime","alignCurrentTime","moment","locale","locales"],this.options,t)}redraw(){if(this.options.showCurrentTime){const t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar),this.start());let e=this.options.moment(Date.now()+this.offset);this.options.alignCurrentTime&&(e=e.startOf(this.options.alignCurrentTime));const i=this.body.util.toScreen(e);let n=this.options.locales[this.options.locale];n||(this.warned||(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),this.warned=!0),n=this.options.locales.en);let o=`${n.current} ${n.time}: ${e.format("dddd, MMMM Do YYYY, H:mm:ss")}`;o=o.charAt(0).toUpperCase()+o.substring(1),this.options.rtl?this.bar.style.transform=`translateX(${-1*i}px)`:this.bar.style.transform=`translateX(${i}px)`,this.bar.title=o}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}start(){const t=this;!function e(){t.stop();let 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=setTimeout(e,i)}()}stop(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}setCurrentTime(t){const e=yo.convert(t,"Date").valueOf(),i=Date.now();this.offset=e-i,this.redraw()}getCurrentTime(){return new Date(Date.now()+this.offset)}}const is=.001;function ns(t,e,i,n){return null===as(t,e.item,!1,(t=>t.stack&&(i||null===t.top)),(t=>t.stack),(t=>e.axis),n)}function os(t,e,i){const n=as(t,e.item,!1,(t=>t.stack),(t=>!0),(t=>t.baseTop));i.height=n-i.top+.5*e.item.vertical}function ss(t,e,i,n){for(let 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){let n=0;for(const e in i)i.hasOwnProperty(e)&&1==i[e].visible&&i[e].index<i[t[o].data.subgroup].index&&(n+=i[e].height,i[t[o].data.subgroup].top=n);t[o].top=n+.5*e.item.vertical}n||function(t,e,i){as(Object.values(i).sort(((t,e)=>t.index>e.index?1:t.index<e.index?-1:0)),{vertical:0},!0,(t=>!0),(t=>!0),(t=>0));for(let n=0;n<t.length;n++)void 0!==t[n].data.subgroup&&(t[n].top=i[t[n].data.subgroup].top+.5*e.item.vertical)}(t,e,i)}function rs(t,e,i){let n=!1;const o=[];for(var s in i)i[s].hasOwnProperty("index")?o[i[s].index]=s:o.push(s);for(let r=0;r<o.length;r++)if(s=o[r],i.hasOwnProperty(s)){n=n||i[s].stack,i[s].top=0;for(const t in i)i[t].visible&&i[s].index>i[t].index&&(i[s].top+=i[t].height);const o=t[s];for(let t=0;t<o.length;t++)void 0!==o[t].data.subgroup&&(o[t].top=i[o[t].data.subgroup].top+.5*e.item.vertical,i[s].stack&&(o[t].baseTop=o[t].top));n&&i[s].stack&&os(t[s],e,i[s])}}function as(t,e,i,n,o,s,r){let a=t=>t.start,h=t=>t.end;if(!i){const i=!(!t[0]||!t[0].options.rtl);a=i?t=>t.right:t=>t.left,h=t=>a(t)+t.width+e.horizontal}const l=[],d=[];let c=null,u=0;for(const e of t)if(n(e))l.push(e);else if(o(e)){const t=a(e);null!==c&&t<c-is&&(u=0),c=t,u=hs(d,(e=>a(e)-is>t),u),d.splice(u,0,e),u++}c=null;let p=null;u=0;let m=0,f=0,g=0;for(;l.length>0;){const t=l.shift();t.top=s(t);const i=a(t),n=h(t);null!==c&&i<c-is&&(m=0,f=0,u=0,p=null),c=i,m=hs(d,(t=>i<h(t)-is),m),(null===p||p<n-is)&&(f=hs(d,(t=>n<a(t)-is),Math.max(m,f))),null!==p&&p-is>n&&(f=ls(d,(t=>n+is>=a(t)),m,f)+1);const w=d.slice(m,f).filter((t=>i<h(t)-is&&n-is>a(t))).sort(((t,e)=>t.top-e.top));for(let i=0;i<w.length;i++){const n=w[i];y=n,b=e,(v=t).top-b.vertical+is<y.top+y.height&&v.top+v.height+b.vertical-is>y.top&&(t.top=n.top+n.height+e.vertical)}o(t)&&(u=hs(d,(t=>a(t)-is>i),u),d.splice(u,0,t),u++);const _=t.top+t.height;if(_>g&&(g=_),r&&r())return null}var v,y,b;return g}function hs(t,e,i){i||(i=0);const n=t.slice(i).findIndex(e);return-1===n?t.length:n+i}function ls(t,e,n,o){for(n||(n=0),o||(o=t.length),i=o-1;i>=n;i--)if(e(t[i]))return i;return n-1}const ds="__background__";class cs{constructor(t,e,i){if(this.groupId=t,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.isVisible=null,this.stackDirty=!0,this._disposeCallbacks=[],e&&e.nestedGroups&&(this.nestedGroups=e.nestedGroups,0==e.showNested?this.showNested=!1:this.showNested=!0),e&&e.subgroupStack)if("boolean"==typeof e.subgroupStack)this.doInnerStack=e.subgroupStack,this.subgroupStackAll=e.subgroupStack;else for(const t in e.subgroupStack)this.subgroupStack[t]=e.subgroupStack[t],this.doInnerStack=this.doInnerStack||e.subgroupStack[t];e&&e.heightMode?this.heightMode=e.heightMode:this.heightMode=i.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;const n=()=>{this.checkRangedItems=!0};this.itemSet.body.emitter.on("checkRangedItems",n),this._disposeCallbacks.push((()=>{this.itemSet.body.emitter.off("checkRangedItems",n)})),this._create(),this.setData(e)}_create(){const t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;const e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;const 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)}setData(t){if(this.itemSet.groupTouchParams.isDragging)return;let e,i;if(t&&t.subgroupVisibility)for(const e in t.subgroupVisibility)this.subgroupVisibility[e]=t.subgroupVisibility[e];if(this.itemSet.options&&this.itemSet.options.groupTemplate?(i=this.itemSet.options.groupTemplate.bind(this),e=i(t,this.dom.inner)):e=t&&t.content,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?yo.xss(e):yo.xss(this.groupId||""));this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?yo.removeClassName(this.dom.inner,"vis-hidden"):yo.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),yo.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(yo.removeClassName(this.dom.label,"collapsed"),yo.addClassName(this.dom.label,"expanded")):(yo.removeClassName(this.dom.label,"expanded"),yo.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,yo.removeClassName(this.dom.label,"collapsed"),yo.removeClassName(this.dom.label,"expanded"),yo.removeClassName(this.dom.label,"vis-nesting-group")),t&&(t.treeLevel||t.nestedInGroup)?(yo.addClassName(this.dom.label,"vis-nested-group"),t.treeLevel?yo.addClassName(this.dom.label,"vis-group-level-"+t.treeLevel):yo.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):yo.addClassName(this.dom.label,"vis-group-level-0");const n=t&&t.className||null;n!=this.className&&(this.className&&(yo.removeClassName(this.dom.label,this.className),yo.removeClassName(this.dom.foreground,this.className),yo.removeClassName(this.dom.background,this.className),yo.removeClassName(this.dom.axis,this.className)),yo.addClassName(this.dom.label,n),yo.addClassName(this.dom.foreground,n),yo.addClassName(this.dom.background,n),yo.addClassName(this.dom.axis,n),this.className=n),this.style&&(yo.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(yo.addCssText(this.dom.label,t.style),this.style=t.style)}getLabelWidth(){return this.props.label.width}_didMarkerHeightChange(){const t=this.dom.marker.clientHeight;if(t!=this.lastMarkerHeight){this.lastMarkerHeight=t;const e={};let i=0;yo.forEach(this.items,((t,n)=>{if(t.dirty=!0,t.displayed){const o=!0;e[n]=t.redraw(o),i=e[n].length}}));if(i>0)for(let t=0;t<i;t++)yo.forEach(e,(e=>{e[t]()}));return!0}return!1}_calculateGroupSizeAndPosition(){const{offsetTop:t,offsetLeft:e,offsetWidth:i}=this.dom.foreground;this.top=t,this.right=e,this.width=i}_shouldBailItemsRedraw(){const t=this,e=this.itemSet.options.onTimeout,i={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:e&&e.timeoutMs,userBailFunction:e&&e.callback,shouldBailStackItems:this.shouldBailStackItems};let n=null;if(!this.itemSet.initialDrawDone){if(i.shouldBailStackItems)return!0;Math.abs(Date.now()-new Date(i.relativeBailingTime))>i.bailTimeMs&&(i.userBailFunction&&null==this.itemSet.userContinueNotBail?i.userBailFunction((e=>{t.itemSet.userContinueNotBail=e,n=!e})):n=0==t.itemSet.userContinueNotBail)}return n}_redrawItems(t,e,i,n){if(t||this.stackDirty||this.isVisible&&!e){const t={byEnd:this.orderedItems.byEnd.filter((t=>!t.isCluster)),byStart:this.orderedItems.byStart.filter((t=>!t.isCluster))},e={byEnd:[...new Set(this.orderedItems.byEnd.map((t=>t.cluster)).filter((t=>!!t)))],byStart:[...new Set(this.orderedItems.byStart.map((t=>t.cluster)).filter((t=>!!t)))]},o=()=>[...this._updateItemsInRange(t,this.visibleItems.filter((t=>!t.isCluster)),n),...this._updateClustersInRange(e,this.visibleItems.filter((t=>t.isCluster)),n)],s=t=>{let e={};for(const i in this.subgroups){const n=this.visibleItems.filter((t=>t.data.subgroup===i));e[i]=t?n.sort(((e,i)=>t(e.data,i.data))):n}return e};if("function"==typeof this.itemSet.options.order){const t=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups){rs(s(this.itemSet.options.order),i,this.subgroups),this.visibleItems=o(),this._updateSubGroupHeights(i)}else{this.visibleItems=o(),this._updateSubGroupHeights(i);const e=this.visibleItems.slice().filter((t=>t.isCluster||!t.isCluster&&!t.cluster)).sort(((e,i)=>t.itemSet.options.order(e.data,i.data)));this.shouldBailStackItems=ns(e,i,!0,this._shouldBailItemsRedraw.bind(this))}}else if(this.visibleItems=o(),this._updateSubGroupHeights(i),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups){rs(s(),i,this.subgroups)}else this.shouldBailStackItems=ns(this.visibleItems,i,!0,this._shouldBailItemsRedraw.bind(this));else ss(this.visibleItems,i,this.subgroups,this.itemSet.options.stackSubgroups);for(let t=0;t<this.visibleItems.length;t++)this.visibleItems[t].repositionX(),void 0!==this.subgroupVisibility[this.visibleItems[t].data.subgroup]&&(this.subgroupVisibility[this.visibleItems[t].data.subgroup]||this.visibleItems[t].hide());this.itemSet.options.cluster&&yo.forEach(this.items,(t=>{t.cluster&&t.displayed&&t.hide()})),this.shouldBailStackItems&&this.itemSet.body.emitter.emit("destroyTimeline"),this.stackDirty=!1}}_didResize(t,e){t=yo.updateProperty(this,"height",e)||t;const i=this.dom.inner.clientWidth,n=this.dom.inner.clientHeight;return t=yo.updateProperty(this.props.label,"width",i)||t,t=yo.updateProperty(this.props.label,"height",n)||t}_applyGroupHeight(t){this.dom.background.style.height=`${t}px`,this.dom.foreground.style.height=`${t}px`,this.dom.label.style.height=`${t}px`}_updateItemsVerticalPosition(t){for(let e=0,i=this.visibleItems.length;e<i;e++){const i=this.visibleItems[e];i.repositionY(t),this.isVisible||this.groupId==ds||i.displayed&&i.hide()}}redraw(t,e,i,n){let o=!1;const s=this.isVisible;let r;const a=[()=>{i=this._didMarkerHeightChange.call(this)||i},this._updateSubGroupHeights.bind(this,e),this._calculateGroupSizeAndPosition.bind(this),()=>{this.isVisible=this._isGroupVisible.bind(this)(t,e)},()=>{this._redrawItems.bind(this)(i,s,e,t)},this._updateSubgroupsSizes.bind(this),()=>{r=this._calculateHeight.bind(this)(e)},this._calculateGroupSizeAndPosition.bind(this),()=>{o=this._didResize.bind(this)(o,r)},()=>{this._applyGroupHeight.bind(this)(r)},()=>{this._updateItemsVerticalPosition.bind(this)(e)},(()=>(!this.isVisible&&this.height&&(o=!1),o)).bind(this)];if(n)return a;{let t;return a.forEach((e=>{t=e()})),t}}_updateSubGroupHeights(t){if(Object.keys(this.subgroups).length>0){const e=this;this._resetSubgroups(),yo.forEach(this.visibleItems,(i=>{void 0!==i.data.subgroup&&(e.subgroups[i.data.subgroup].height=Math.max(e.subgroups[i.data.subgroup].height,i.height+t.item.vertical),e.subgroups[i.data.subgroup].visible=void 0===this.subgroupVisibility[i.data.subgroup]||Boolean(this.subgroupVisibility[i.data.subgroup]))}))}}_isGroupVisible(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}_calculateHeight(t){let e,i;if(i="fixed"===this.heightMode?yo.toArray(this.items):this.visibleItems,i.length>0){let n=i[0].top,o=i[0].top+i[0].height;if(yo.forEach(i,(t=>{n=Math.min(n,t.top),o=Math.max(o,t.top+t.height)})),n>t.axis){const e=n-t.axis;o-=e,yo.forEach(i,(t=>{t.top-=e}))}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}show(){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)}hide(){const t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);const e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);const i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);const n=this.dom.axis;n.parentNode&&n.parentNode.removeChild(n)}add(t){if(this.items[t.id]=t,t.setParent(this),this.stackDirty=!0,void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups()),!this.visibleItems.includes(t)){const e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}}_addToSubgroup(t,e=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);const 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)}_updateSubgroupsSizes(){const t=this;if(t.subgroups)for(const e in t.subgroups){const i=t.subgroups[e].items[0].data.end||t.subgroups[e].items[0].data.start;let n=t.subgroups[e].items[0].data.start,o=i-1;t.subgroups[e].items.forEach((t=>{new Date(t.data.start)<new Date(n)&&(n=t.data.start);const e=t.data.end||t.data.start;new Date(e)>new Date(o)&&(o=e)})),t.subgroups[e].start=n,t.subgroups[e].end=new Date(o-1)}}orderSubgroups(){if(void 0!==this.subgroupOrderer){const t=[];if("string"==typeof this.subgroupOrderer){for(const e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(((t,e)=>t.sortField-e.sortField))}else if("function"==typeof this.subgroupOrderer){for(const e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(let e=0;e<t.length;e++)this.subgroups[t[e].subgroup].index=e}}_resetSubgroups(){for(const t in this.subgroups)this.subgroups.hasOwnProperty(t)&&(this.subgroups[t].visible=!1,this.subgroups[t].height=0)}remove(t){delete this.items[t.id],t.setParent(null),this.stackDirty=!0;const e=this.visibleItems.indexOf(t);-1!=e&&this.visibleItems.splice(e,1),void 0!==t.data.subgroup&&(this._removeFromSubgroup(t),this.orderSubgroups())}_removeFromSubgroup(t,e=t.data.subgroup){if(null!=e){const i=this.subgroups[e];if(i){const n=i.items.indexOf(t);n>=0&&(i.items.splice(n,1),i.items.length?this._updateSubgroupsSizes():delete this.subgroups[e])}}}removeFromDataSet(t){this.itemSet.removeItem(t.id)}order(){const t=yo.toArray(this.items),e=[],i=[];for(let 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},this.orderedItems.byStart.sort(((t,e)=>t.data.start-e.data.start)),function(t){t.sort(((t,e)=>("end"in t.data?t.data.end:t.data.start)-("end"in e.data?e.data.end:e.data.start)))}(this.orderedItems.byEnd)}_updateItemsInRange(t,e,i){const n=[],o={};if(!this.isVisible&&void 0!==this.height&&this.groupId!=ds){for(let t=0;t<e.length;t++){var s=e[t];s.displayed&&s.hide()}return n}const r=(i.end-i.start)/4,a=i.start-r,h=i.end+r,l=t=>{const{start:e,end:i}=t;return i<a?-1:e<=h?0:1};if(e.length>0)for(let t=0;t<e.length;t++)this._checkIfVisibleWithReference(e[t],n,o,i);const d=yo.binarySearchCustom(t.byStart,(t=>t<a?-1:t<=h?0:1),"data","start");if(this._traceVisible(d,t.byStart,n,o,(t=>t.data.start<a||t.data.start>h)),1==this.checkRangedItems){this.checkRangedItems=!1;for(let e=0;e<t.byEnd.length;e++)this._checkIfVisibleWithReference(t.byEnd[e],n,o,i)}else{const e=yo.binarySearchCustom(t.byEnd,l,"data");this._traceVisible(e,t.byEnd,n,o,(t=>t.data.end<a||t.data.start>h))}const c={};let u=0;for(let t=0;t<n.length;t++){const e=n[t];if(!e.displayed){const i=!0;c[t]=e.redraw(i),u=c[t].length}}if(u>0)for(let t=0;t<u;t++)yo.forEach(c,(e=>{e[t]()}));for(let t=0;t<n.length;t++)n[t].repositionX();return n}_traceVisible(t,e,i,n,o){if(-1!=t){for(let s=t;s>=0;s--){let t=e[s];if(o(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===n[t.id]&&(n[t.id]=!0,i.push(t))}for(let s=t+1;s<e.length;s++){let t=e[s];if(o(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===n[t.id]&&(n[t.id]=!0,i.push(t))}}}_checkIfVisible(t,e,i){t.isVisible(i)?(t.displayed||t.show(),t.repositionX(),e.push(t)):t.displayed&&t.hide()}_checkIfVisibleWithReference(t,e,i,n){t.isVisible(n)?void 0===i[t.id]&&(i[t.id]=!0,e.push(t)):t.displayed&&t.hide()}_updateClustersInRange(t,e,i){const n=[],o={};if(e.length>0)for(let t=0;t<e.length;t++)this._checkIfVisibleWithReference(e[t],n,o,i);for(let e=0;e<t.byStart.length;e++)this._checkIfVisibleWithReference(t.byStart[e],n,o,i);for(let e=0;e<t.byEnd.length;e++)this._checkIfVisibleWithReference(t.byEnd[e],n,o,i);const s={};let r=0;for(let t=0;t<n.length;t++){const e=n[t];if(!e.displayed){const i=!0;s[t]=e.redraw(i),r=s[t].length}}if(r>0)for(var a=0;a<r;a++)yo.forEach(s,(function(t){t[a]()}));for(let t=0;t<n.length;t++)n[t].repositionX();return n}changeSubgroup(t,e,i){this._removeFromSubgroup(t,e),this._addToSubgroup(t,i),this.orderSubgroups()}dispose(){let t;for(this.hide();t=this._disposeCallbacks.pop();)t()}}class us extends cs{constructor(t,e,i){super(t,e,i),this.width=0,this.height=0,this.top=0,this.left=0}redraw(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(let t=0,i=this.visibleItems.length;t<i;t++){this.visibleItems[t].repositionY(e)}return!1}show(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)}}class ps{constructor(t,e,i){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.defaultOptions={locales:Ko,locale:"en"},this.options=yo.extend({},this.defaultOptions,i),this.options.locales=yo.extend({},Ko,this.options.locales);const n=this.defaultOptions.locales[this.defaultOptions.locale];Object.keys(this.options.locales).forEach((t=>{this.options.locales[t]=yo.extend({},n,this.options.locales[t])})),this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.selectable=i&&i.selectable||!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.setSelectability(t),this.editable=null,this._updateEditStatus()}select(){this.selectable&&(this.selected=!0,this.dirty=!0,this.displayed&&this.redraw())}unselect(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()}setData(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()}setSelectability(t){t&&(this.selectable=void 0===t.selectable||Boolean(t.selectable))}setParent(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t}isVisible(t){return!1}show(){return!1}hide(){return!1}redraw(){}repositionX(){}repositionY(){}_repaintDragCenter(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){const t=this,e=document.createElement("div");e.className="vis-drag-center",e.dragCenterItem=this,this.hammerDragCenter=new Io(e),this.hammerDragCenter.on("tap",(e=>{t.parent.itemSet.body.emitter.emit("click",{event:e,item:t.id})})),this.hammerDragCenter.on("doubletap",(e=>{e.stopPropagation(),t.parent.itemSet._onUpdateItem(t),t.parent.itemSet.body.emitter.emit("doubleClick",{event:e,item:t.id})})),this.hammerDragCenter.on("panstart",(e=>{e.stopPropagation(),t.parent.itemSet._onDragStart(e)})),this.hammerDragCenter.on("panmove",t.parent.itemSet._onDrag.bind(t.parent.itemSet)),this.hammerDragCenter.on("panend",t.parent.itemSet._onDragEnd.bind(t.parent.itemSet)),this.hammerDragCenter.get("press").set({time:1e4}),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(e,this.dom.dragLeft):this.dom.box.appendChild(e):this.dom.point&&this.dom.point.appendChild(e),this.dom.dragCenter=e}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))}_repaintDeleteButton(t){const 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){const e=this,i=document.createElement("div");this.options.rtl?i.className="vis-delete-rtl":i.className="vis-delete";let n=this.options.locales[this.options.locale];n||(this.warned||(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),this.warned=!0),n=this.options.locales.en),i.title=n.deleteSelected,this.hammerDeleteButton=new Io(i).on("tap",(t=>{t.stopPropagation(),e.parent.removeFromDataSet(e)})),t.appendChild(i),this.dom.deleteButton=i}else this.selected&&e||!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))}_repaintOnItemUpdateTimeTooltip(t){if(!this.options.tooltipOnItemUpdateTime)return;const e=(this.options.editable.updateTime||!0===this.data.editable)&&!1!==this.data.editable;if(this.selected&&e&&!this.dom.onItemUpdateTimeTooltip){const e=document.createElement("div");e.className="vis-onUpdateTime-tooltip",t.appendChild(e),this.dom.onItemUpdateTimeTooltip=e}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%";const t=50,e=this.parent.itemSet.body.domProps.scrollTop;let i;i="top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height;let n,o;i+this.parent.top-t<-e?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top=`${this.height+2}px`):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom=`${this.height+2}px`),this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template?(o=this.options.tooltipOnItemUpdateTime.template.bind(this),n=o(this.data)):(n=`start: ${ho(this.data.start).format("MM/DD/YYYY hh:mm")}`,this.data.end&&(n+=`<br> end: ${ho(this.data.end).format("MM/DD/YYYY hh:mm")}`)),this.dom.onItemUpdateTimeTooltip.innerHTML=yo.xss(n)}}_getItemData(){return this.parent.itemSet.itemsData.get(this.id)}_updateContents(t){let e,i,n,o,s;const r=this._getItemData(),a=(this.dom.box||this.dom.point).getElementsByClassName("vis-item-visible-frame")[0];if(this.options.visibleFrameTemplate?(s=this.options.visibleFrameTemplate.bind(this),o=yo.xss(s(r,a))):o="",a)if(o instanceof Object&&!(o instanceof Element))s(r,a);else if(i=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(o),i){if(o instanceof Element)a.innerHTML="",a.appendChild(o);else if(null!=o)a.innerHTML=yo.xss(o);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error(`Property "content" missing in item ${this.id}`);this.itemVisibleFrameContent=o}if(this.options.template?(n=this.options.template.bind(this),e=n(r,t,this.data)):e=this.data.content,e instanceof Object&&!(e instanceof Element))n(r,t);else if(i=this._contentToString(this.content)!==this._contentToString(e),i){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(null!=e)t.innerHTML=yo.xss(e);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error(`Property "content" missing in item ${this.id}`);this.content=e}}_updateDataAttributes(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){let e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Object.keys(this.data)}for(const i of e){const e=this.data[i];null!=e?t.setAttribute(`data-${i}`,e):t.removeAttribute(`data-${i}`)}}}_updateStyle(t){this.style&&(yo.removeCssText(t,this.style),this.style=null),this.data.style&&(yo.addCssText(t,this.data.style),this.style=this.data.style)}_contentToString(t){return"string"==typeof t?t:t&&"outerHTML"in t?t.outerHTML:t}_updateEditStatus(){this.options&&("boolean"==typeof this.options.editable?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:"object"==typeof this.options.editable&&(this.editable={},yo.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"==typeof this.data.editable&&(this.editable={},yo.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.data.editable)))}getWidthLeft(){return 0}getWidthRight(){return 0}getTitle(){if(this.options.tooltip&&this.options.tooltip.template){return this.options.tooltip.template.bind(this)(this._getItemData(),this.data)}return this.data.title}}ps.prototype.stack=!0;class ms extends ps{constructor(t,e,i){if(super(t,e,i),this.props={content:{width:0}},this.overflow=!1,t){if(null==t.start)throw new Error(`Property "start" missing in item ${t.id}`);if(null==t.end)throw new Error(`Property "end" missing in item ${t.id}`)}}isVisible(t){return!this.cluster&&(this.data.start<t.end&&this.data.end>t.start)}_createDomElement(){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)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const 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}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const 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"}}_getDomComponentsSizes(){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}}}_updateDomComponentsSizes(t){this.props.content.width=t.content.width,this.height=t.box.height,this.dom.content.style.maxWidth="",this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()}redraw(t){let e;const i=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),()=>{this.dirty&&(e=this._getDomComponentsSizes.bind(this)())},()=>{this.dirty&&this._updateDomComponentsSizes.bind(this)(e)},this._repaintDomAdditionals.bind(this)];if(t)return i;{let t;return i.forEach((e=>{t=e()})),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}}repositionX(t){const e=this.parent.width;let i=this.conversion.toScreen(this.data.start),n=this.conversion.toScreen(this.data.end);const o=void 0===this.data.align?this.options.align:this.data.align;let s,r;!1===this.data.limitSize||void 0!==t&&!0!==t||(i<-e&&(i=-e),n>2*e&&(n=2*e));const a=Math.max(Math.round(1e3*(n-i))/1e3,1);switch(this.overflow?(this.options.rtl?this.right=i:this.left=i,this.width=a+this.props.content.width,r=this.props.content.width):(this.options.rtl?this.right=i:this.left=i,this.width=a,r=Math.min(n-i,this.props.content.width)),this.options.rtl?this.dom.box.style.transform=`translateX(${-1*this.right}px)`:this.dom.box.style.transform=`translateX(${this.left}px)`,this.dom.box.style.width=`${a}px`,this.whiteSpace&&(this.height=this.dom.box.offsetHeight),o){case"left":this.dom.content.style.transform="translateX(0)";break;case"right":if(this.options.rtl){const t=-1*Math.max(a-r,0);this.dom.content.style.transform=`translateX(${t}px)`}else this.dom.content.style.transform=`translateX(${Math.max(a-r,0)}px)`;break;case"center":if(this.options.rtl){const t=-1*Math.max((a-r)/2,0);this.dom.content.style.transform=`translateX(${t}px)`}else this.dom.content.style.transform=`translateX(${Math.max((a-r)/2,0)}px)`;break;default:if(s=this.overflow?n>0?Math.max(-i,0):-r:i<0?-i:0,this.options.rtl){const t=-1*s;this.dom.content.style.transform=`translateX(${t}px)`}else this.dom.content.style.transform=`translateX(${s}px)`}}repositionY(){const t=this.options.orientation.item,e=this.dom.box;e.style.top="top"==t?`${this.top}px`:this.parent.height-this.top-this.height+"px"}_repaintDragLeft(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){const 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)}_repaintDragRight(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){const 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)}}ms.prototype.baseClassName="vis-item vis-range";class fs extends ps{constructor(t,e,i){if(super(t,e,i),this.props={content:{width:0}},this.overflow=!1,t){if(null==t.start)throw new Error(`Property "start" missing in item ${t.id}`);if(null==t.end)throw new Error(`Property "end" missing in item ${t.id}`)}}isVisible(t){return this.data.start<t.end&&this.data.end>t.start}_createDomElement(){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)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const 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}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);const t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");this.dom.box.className=this.baseClassName+t}}_getDomComponentsSizes(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.content).overflow,{content:{width:this.dom.content.offsetWidth}}}_updateDomComponentsSizes(t){this.props.content.width=t.content.width,this.height=0,this.dirty=!1}_repaintDomAdditionals(){}redraw(t){let e;const i=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),()=>{this.dirty&&(e=this._getDomComponentsSizes.bind(this)())},()=>{this.dirty&&this._updateDomComponentsSizes.bind(this)(e)},this._repaintDomAdditionals.bind(this)];if(t)return i;{let t;return i.forEach((e=>{t=e()})),t}}repositionY(t){let e;const i=this.options.orientation.item;if(void 0!==this.data.subgroup){const t=this.data.subgroup;this.dom.box.style.height=`${this.parent.subgroups[t].height}px`,this.dom.box.style.top="top"==i?`${this.parent.top+this.parent.subgroups[t].top}px`:this.parent.top+this.parent.height-this.parent.subgroups[t].top-this.parent.subgroups[t].height+"px",this.dom.box.style.bottom=""}else this.parent instanceof us?(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=`${this.parent.top}px`,this.dom.box.style.bottom="");this.dom.box.style.height=`${e}px`}}fs.prototype.baseClassName="vis-item vis-background",fs.prototype.stack=!1,fs.prototype.show=ms.prototype.show,fs.prototype.hide=ms.prototype.hide,fs.prototype.repositionX=ms.prototype.repositionX;class gs{constructor(t,e){this.container=t,this.overflowMethod=e||"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)}setPosition(t,e){this.x=parseInt(t),this.y=parseInt(e)}setText(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=yo.xss(t)}show(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,s=0,r=0;if("flip"==this.overflowMethod||"none"==this.overflowMethod){let t=!1,n=!0;"flip"==this.overflowMethod&&(this.y-e<this.padding&&(n=!1),this.x+i>o-this.padding&&(t=!0)),s=t?this.x-i:this.x,r=n?this.y-e:this.y}else(r=this.y-e)+e+this.padding>n&&(r=n-e-this.padding),r<this.padding&&(r=this.padding),(s=this.x)+i+this.padding>o&&(s=o-i-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=r+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}}class vs extends ps{constructor(t,e,i){if(super(t,e,Object.assign({},{fitOnDoubleClick:!0},i,{editable:!1})),this.props={content:{width:0,height:0}},!t||null==t.uiItems)throw new Error('Property "uiItems" missing in item '+t.id);this.id=Wi(),this.group=t.group,this._setupRange(),this.emitter=this.data.eventEmitter,this.range=this.data.range,this.attached=!1,this.isCluster=!0,this.data.isCluster=!0}hasItems(){return this.data.uiItems&&this.data.uiItems.length&&this.attached}setUiItems(t){this.detach(),this.data.uiItems=t,this._setupRange(),this.attach()}isVisible(t){const e=this.data.end?this.data.end-this.data.start:0,i=this.width*t.getMillisecondsPerPixel(),n=Math.max(this.data.start.getTime()+e,this.data.start.getTime()+i);return this.data.start<t.end&&n>t.start&&this.hasItems()}getData(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}redraw(t){var e,i,n=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),function(){this.dirty&&(e=this._getDomComponentsSizes())}.bind(this),function(){this.dirty&&this._updateDomComponentsSizes.bind(this)(e)}.bind(this),this._repaintDomAdditionals.bind(this)];return t?n:(n.forEach((function(t){i=t()})),i)}show(){this.displayed||this.redraw()}hide(){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}}repositionX(){let 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{let e=void 0===this.data.align?this.options.align:this.data.align;this.repositionXWithoutRanges(t,e)}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))}repositionStype(t,e){this.dom.line.style.display="block",this.dom.dot.style.display="block";const i=this.dom.line.offsetWidth,n=this.dom.dot.offsetWidth;if(e){const o=i+t+(e-t)/2,s=o-n/2,r=this.options.rtl?-1*o:o,a=this.options.rtl?-1*s:s;this.dom.line.style.transform=`translateX(${r}px)`,this.dom.dot.style.transform=`translateX(${a}px)`}else{const e=this.options.rtl?-1*t:t,i=this.options.rtl?-1*(t-n/2):t-n/2;this.dom.line.style.transform=`translateX(${e}px)`,this.dom.dot.style.transform=`translateX(${i}px)`}}repositionXWithoutRanges(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")}repositionXWithRanges(t,e){let 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"}repositionY(){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"}}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}move(){this.repositionX(),this.repositionY()}attach(){for(let t of this.data.uiItems)t.cluster=this;this.data.items=this.data.uiItems.map((t=>t.data)),this.attached=!0,this.dirty=!0}detach(t=!1){if(this.hasItems()){for(let t of this.data.uiItems)delete t.cluster;this.attached=!1,t&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}_onDoubleClick(){this._fit()}_setupRange(){const t=this.data.uiItems.map((t=>({start:t.data.start.valueOf(),end:t.data.end?t.data.end.valueOf():t.data.start.valueOf()})));this.data.min=Math.min(...t.map((t=>Math.min(t.start,t.end||t.start)))),this.data.max=Math.max(...t.map((t=>Math.max(t.start,t.end||t.start))));const e=this.data.uiItems.map((t=>t.center)).reduce(((t,e)=>t+e),0)/this.data.uiItems.length;this.data.uiItems.some((t=>t.data.end))?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(e),this.data.end=null)}_getUiItems(){return this.data.uiItems&&this.data.uiItems.length?this.data.uiItems.filter((t=>t.cluster===this)):[]}_createDomElement(){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.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=vs.prototype._onDoubleClick.bind(this)),this.dom.box["vis-item"]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}const t=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var e=this.parent.dom.axis;if(!t)throw new Error("Cannot redraw item: parent has no axis container element");e.appendChild(this.dom.dot)}}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const 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")}}_getDomComponentsSizes(){const 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}_updateDomComponentsSizes(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}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}_isStipeVisible(){return this.minWidth>=this.width||!this.data.end}_getFitRange(){const t=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-t,fitEnd:this.data.max+t}}_fit(){if(this.emitter){const{fitStart:t,fitEnd:e}=this._getFitRange(),i={start:new Date(t),end:new Date(e),animation:!0};this.emitter.emit("fit",i)}}_getItemData(){return this.data}}vs.prototype.baseClassName="vis-item vis-range vis-cluster";const ys="__ungrouped__";class bs{constructor(t){this.itemSet=t,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(t,e,i){return new vs(t,e,i)}setItems(t,e){this.items=t||[],this.dataChanged=!0,this.applyOnChangedLevel=!1,e&&e.applyOnChangedLevel&&(this.applyOnChangedLevel=e.applyOnChangedLevel)}updateData(){this.dataChanged=!0,this.applyOnChangedLevel=!1}getClusters(t,e,i){let{maxItems:n,clusterCriteria:o}="boolean"==typeof i?{}:i;o||(o=()=>!0),n=n||1;let s=-1,r=0;if(e>0){if(e>=1)return[];s=Math.abs(Math.round(Math.log(100/e)/Math.log(2))),r=Math.abs(Math.pow(2,s))}if(this.dataChanged){const t=s!=this.cacheLevel;(!this.applyOnChangedLevel||t)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=s;let a=this.cache[s];if(!a){a=[];for(let e in this.groups)if(this.groups.hasOwnProperty(e)){const s=this.groups[e],h=s.length;let l=0;for(;l<h;){let e=s[l],h=1,d=l-1;for(;d>=0&&e.center-s[d].center<r/2;)!s[d].cluster&&o(e.data,s[d].data)&&h++,d--;let c=l+1;for(;c<s.length&&s[c].center-e.center<r/2;)o(e.data,s[c].data)&&h++,c++;let u=a.length-1;for(;u>=0&&e.center-a[u].center<r;)e.group==a[u].group&&o(e.data,a[u].data)&&h++,u--;if(h>n){const r=h-n+1,d=[];let c=l;for(;d.length<r&&c<s.length;)o(s[l].data,s[c].data)&&d.push(s[c]),c++;const u=this.itemSet.getGroupId(e.data),p=this.itemSet.groups[u]||this.itemSet.groups[ys];let m=this._getClusterForItems(d,p,t,i);a.push(m),l+=r}else delete e.cluster,l+=1}}this.cache[s]=a}return a}_filterData(){const t={};this.groups=t;for(const e of Object.values(this.items)){const i=e.parent?e.parent.groupId:"";let n=t[i];n||(n=[],t[i]=n),n.push(e),e.data.start&&(e.data.end?e.center=(e.data.start.valueOf()+e.data.end.valueOf())/2:e.center=e.data.start.valueOf())}for(let e in t)t.hasOwnProperty(e)&&t[e].sort(((t,e)=>t.center-e.center));this.dataChanged=!1}_getClusterForItems(t,e,i,n){const o=(i||[]).map((t=>({cluster:t,itemsIds:new Set(t.data.uiItems.map((t=>t.id)))})));let s;if(o.length)for(let e of o)if(e.itemsIds.size===t.length&&t.every((t=>e.itemsIds.has(t.id)))){s=e.cluster;break}if(s)return s.setUiItems(t),s.group!==e&&(s.group&&s.group.remove(s),e&&(e.add(s),s.group=e)),s;let r=n.titleTemplate||"";const a={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},h=r.replace(/{count}/,t.length),l='<div title="'+h+'">'+t.length+"</div>",d=Object.assign({},n,this.itemSet.options),c={content:l,title:h,group:e,uiItems:t,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return s=this.createClusterItem(c,a,d),e&&(e.add(s),s.group=e),s.attach(),s}_dropLevelsCache(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}}const ws="__ungrouped__",_s="__background__";class xs extends bo{constructor(t,e){super(),this.body=t,this.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap(t,e,i){const 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:No.snap,onDropObjectOnItem(t,e,i){i(e)},onAdd(t,e){e(t)},onUpdate(t,e){e(t)},onMove(t,e){e(t)},onRemove(t,e){e(t)},onMoving(t,e){e(t)},onAddGroup(t,e){e(t)},onMoveGroup(t,e){e(t)},onRemoveGroup(t,e){e(t)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:500},tooltipOnItemUpdateTime:!1},this.options=yo.extend({},this.defaultOptions),this.options.rtl=e.rtl,this.options.onTimeout=e.onTimeout,this.conversion={toScreen:t.util.toScreen,toTime:t.util.toTime},this.dom={},this.props={},this.hammer=null;const i=this;this.itemsData=null,this.groupsData=null,this.itemsSettingTime=null,this.initialItemSetDrawn=!1,this.userContinueNotBail=null,this.sequentialSelection=!1,this.itemListeners={add(t,e,n){i._onAdd(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},update(t,e,n){i._onUpdate(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},remove(t,e,n){i._onRemove(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()}},this.groupListeners={add(t,e,n){if(i._onAddGroups(e.items),i.groupsData&&i.groupsData.length>0){const t=i.groupsData.getDataSet();t.get().forEach((e=>{if(e.nestedGroups){0!=e.showNested&&(e.showNested=!0);let i=[];e.nestedGroups.forEach((n=>{const o=t.get(n);o&&(o.nestedInGroup=e.id,0==e.showNested&&(o.visible=!1),i=i.concat(o))})),t.update(i,n)}}))}},update(t,e,n){i._onUpdateGroups(e.items)},remove(t,e,n){i._onRemoveGroups(e.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.popupTimer=null,this.touchParams={},this.groupTouchParams={group:null,isDragging:!1},this._create(),this.setOptions(e),this.clusters=[]}_create(){const t=document.createElement("div");t.className="vis-itemset",t["vis-itemset"]=this,this.dom.frame=t;const e=document.createElement("div");e.className="vis-background",t.appendChild(e),this.dom.background=e;const i=document.createElement("div");i.className="vis-foreground",t.appendChild(i),this.dom.foreground=i;const n=document.createElement("div");n.className="vis-axis",this.dom.axis=n;const o=document.createElement("div");o.className="vis-labelset",this.dom.labelSet=o,this._updateUngrouped();const s=new us(_s,null,this);s.show(),this.groups[_s]=s,this.hammer=new Io(this.body.dom.centerContainer),this.hammer.on("hammer.input",(t=>{t.isFirst&&this._onTouch(t)})),this.hammer.on("panstart",this._onDragStart.bind(this)),this.hammer.on("panmove",this._onDrag.bind(this)),this.hammer.on("panend",this._onDragEnd.bind(this)),this.hammer.get("pan").set({threshold:5,direction:Io.ALL}),this.hammer.get("press").set({time:1e4}),this.hammer.on("tap",this._onSelectItem.bind(this)),this.hammer.on("press",this._onMultiSelectItem.bind(this)),this.hammer.get("press").set({time:1e4}),this.hammer.on("doubletap",this._onAddItem.bind(this)),this.options.rtl?this.groupHammer=new Io(this.body.dom.rightContainer):this.groupHammer=new Io(this.body.dom.leftContainer),this.groupHammer.on("tap",this._onGroupClick.bind(this)),this.groupHammer.on("panstart",this._onGroupDragStart.bind(this)),this.groupHammer.on("panmove",this._onGroupDrag.bind(this)),this.groupHammer.on("panend",this._onGroupDragEnd.bind(this)),this.groupHammer.get("pan").set({threshold:5,direction:Io.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",this._onMouseOver.bind(this)),this.body.dom.centerContainer.addEventListener("mouseout",this._onMouseOut.bind(this)),this.body.dom.centerContainer.addEventListener("mousemove",this._onMouseMove.bind(this)),this.body.dom.centerContainer.addEventListener("contextmenu",this._onDragEnd.bind(this)),this.body.dom.centerContainer.addEventListener("mousewheel",this._onMouseWheel.bind(this)),this.show()}setOptions(t){if(t){const e=["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","sequentialSelection","multiselectPerGroup","longSelectPressTime","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime","groupHeightMode","onTimeout"];yo.selectiveExtend(e,this.options,t),"itemsAlwaysDraggable"in t&&("boolean"==typeof t.itemsAlwaysDraggable?(this.options.itemsAlwaysDraggable.item=t.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):"object"==typeof t.itemsAlwaysDraggable&&(yo.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"==typeof 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"==typeof t.margin&&(yo.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"==typeof t.margin.item&&yo.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),["locale","locales"].forEach((e=>{e in t&&(this.options[e]=t[e])})),"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"==typeof t.editable&&yo.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"==typeof t.groupEditable&&yo.selectiveExtend(["order","add","remove"],this.options.groupEditable,t.groupEditable));["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"].forEach((e=>{const i=t[e];if(i){if("function"!=typeof i)throw new Error(`option ${e} must be a function ${e}(item, callback)`);this.options[e]=i}})),t.cluster?(Object.assign(this.options,{cluster:t.cluster}),this.clusterGenerator||(this.clusterGenerator=new bs(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()}}markDirty(t){this.groupIds=[],t&&(t.refreshItems&&yo.forEach(this.items,(t=>{t.dirty=!0,t.displayed&&t.redraw()})),t.restackGroups&&yo.forEach(this.groups,((t,e)=>{e!==_s&&(t.stackDirty=!0)})))}destroy(){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}hide(){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)}show(){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))}setPopupTimer(t){if(this.clearPopupTimer(),t){const e=this.options.tooltip.delay||"number"==typeof this.options.tooltip.delay?this.options.tooltip.delay:500;this.popupTimer=setTimeout((function(){t.show()}),e)}}clearPopupTimer(){null!=this.popupTimer&&(clearTimeout(this.popupTimer),this.popupTimer=null)}setSelection(t){null==t&&(t=[]),Array.isArray(t)||(t=[t]);const e=this.selection.filter((e=>-1===t.indexOf(e)));for(let t of e){const e=this.getItemById(t);e&&e.unselect()}this.selection=[...t];for(let e of t){const t=this.getItemById(e);t&&t.select()}}getSelection(){return this.selection.concat([])}getVisibleItems(){const t=this.body.range.getRange();let e,i;this.options.rtl?(e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end)):(i=this.body.util.toScreen(t.start),e=this.body.util.toScreen(t.end));const n=[];for(const t in this.groups)if(this.groups.hasOwnProperty(t)){const o=this.groups[t],s=o.isVisible?o.visibleItems:[];for(const t of s)this.options.rtl?t.right<i&&t.right+t.width>e&&n.push(t.id):t.left<e&&t.left+t.width>i&&n.push(t.id)}return n}getItemsAtCurrentTime(t){let e,i;this.options.rtl?(e=this.body.util.toScreen(t),i=this.body.util.toScreen(t)):(i=this.body.util.toScreen(t),e=this.body.util.toScreen(t));const n=[];for(const t in this.groups)if(this.groups.hasOwnProperty(t)){const o=this.groups[t],s=o.isVisible?o.visibleItems:[];for(const t of s)this.options.rtl?t.right<i&&t.right+t.width>e&&n.push(t.id):t.left<e&&t.left+t.width>i&&n.push(t.id)}return n}getVisibleGroups(){const t=[];for(const e in this.groups)if(this.groups.hasOwnProperty(e)){this.groups[e].isVisible&&t.push(e)}return t}getItemById(t){return this.items[t]||this.clusters.find((e=>e.id===t))}_deselect(t){const e=this.selection;for(let i=0,n=e.length;i<n;i++)if(e[i]==t){e.splice(i,1);break}}redraw(){const t=this.options.margin,e=this.body.range,i=yo.option.asSize,n=this.options,o=n.orientation.item;let s=!1;const r=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,r.className="vis-itemset",this.options.cluster&&this._clusterItems(),s=this._orderGroups()||s;const a=e.end-e.start,h=a!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,l=e.start!=this.lastRangeStart,d=n.stack!=this.lastStack,c=n.stackSubgroups!=this.lastStackSubgroups,u=h||l||d||c;this.lastVisibleInterval=a,this.lastRangeStart=e.start,this.lastStack=n.stack,this.lastStackSubgroups=n.stackSubgroups,this.props.lastWidth=this.props.width;const p=this._firstGroup(),m={item:t.item,axis:t.axis},f={item:t.item,axis:t.item.vertical/2};let g=0;const v=t.axis+t.item.vertical;this.groups[_s].redraw(e,f,u);const y={};let b=0;yo.forEach(this.groups,((t,i)=>{if(i===_s)return;const n=t==p?m:f;y[i]=t.redraw(e,n,u,!0),b=y[i].length}));if(b>0){const t={};for(let e=0;e<b;e++)yo.forEach(y,((i,n)=>{t[n]=i[e]()}));yo.forEach(this.groups,((e,i)=>{if(i===_s)return;const n=t[i];s=n||s,g+=e.height})),g=Math.max(g,v)}return g=Math.max(g,v),r.style.height=i(g),this.props.width=r.offsetWidth,this.props.height=g,this.dom.axis.style.top=i("top"==o?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,s}_firstGroup(){const t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups[ws]||null}_updateUngrouped(){let t,e,i=this.groups[ws];if(this.groupsData){if(i)for(e in i.dispose(),delete this.groups[ws],this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);const i=this.getGroupId(t.data),n=this.groups[i];n&&n.add(t)||t.hide()}}else if(!i){const n=null,o=null;for(e in i=new cs(n,o,this),this.groups[ws]=i,this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}}getLabelSet(){return this.dom.labelSet}setItems(t){this.itemsSettingTime=new Date;const e=this;let i;const n=this.itemsData;if(t){if(!lo(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=mo(t)}else this.itemsData=null;if(n&&(yo.forEach(this.itemListeners,((t,e)=>{n.off(e,t)})),n.dispose(),i=n.getIds(),this._onRemove(i)),this.itemsData){const t=this.id;yo.forEach(this.itemListeners,((i,n)=>{e.itemsData.on(n,i,t)})),i=this.itemsData.getIds(),this._onAdd(i),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})}getItems(){return null!=this.itemsData?this.itemsData.rawDS:null}setGroups(t){const e=this;let i;if(this.groupsData&&(yo.forEach(this.groupListeners,((t,i)=>{e.groupsData.off(i,t)})),i=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(i)),t){if(!lo(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){const t=this.groupsData.getDataSet();t.get().forEach((e=>{e.nestedGroups&&e.nestedGroups.forEach((i=>{const n=t.get(i);n.nestedInGroup=e.id,0==e.showNested&&(n.visible=!1),t.update(n)}))}));const n=this.id;yo.forEach(this.groupListeners,((t,i)=>{e.groupsData.on(i,t,n)})),i=this.groupsData.getIds(),this._onAddGroups(i)}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})}getGroups(){return this.groupsData}removeItem(t){const e=this.itemsData.get(t);e&&this.options.onRemove(e,(e=>{e&&this.itemsData.remove(t)}))}_getType(t){return t.type||this.options.type||(t.end?"range":"box")}getGroupId(t){return"background"==this._getType(t)&&null==t.group?_s:this.groupsData?t.group:ws}_onUpdate(t){const e=this;t.forEach((t=>{const i=e.itemsData.get(t);let n=e.items[t];const o=i?e._getType(i):null,s=xs.types[o];let r;if(n&&(s&&n instanceof s?e._updateItem(n,i):(r=n.selected,e._removeItem(n),n=null)),!n&&i){if(!s)throw new TypeError(`Unknown item type "${o}"`);n=new s(i,e.conversion,e.options),n.id=t,e._addItem(n),r&&(this.selection.push(t),n.select())}})),this._order(),this.options.cluster&&(this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this._clusterItems()),this.body.emitter.emit("_change",{queue:!0})}_onRemove(t){let e=0;const i=this;t.forEach((t=>{const n=i.items[t];n&&(e++,i._removeItem(n))})),e&&(this._order(),this.body.emitter.emit("_change",{queue:!0}))}_order(){yo.forEach(this.groups,(t=>{t.order()}))}_onUpdateGroups(t){this._onAddGroups(t)}_onAddGroups(t){const e=this;t.forEach((t=>{const i=e.groupsData.get(t);let n=e.groups[t];if(n)n.setData(i);else{if(t==ws||t==_s)throw new Error(`Illegal group id. ${t} is a reserved id.`);const o=Object.create(e.options);yo.extend(o,{height:null}),n=new cs(t,i,e),e.groups[t]=n;for(const i in e.items)if(e.items.hasOwnProperty(i)){const o=e.items[i];o.data.group==t&&n.add(o)}n.order(),n.show()}})),this.body.emitter.emit("_change",{queue:!0})}_onRemoveGroups(t){t.forEach((t=>{const e=this.groups[t];e&&(e.dispose(),delete this.groups[t])})),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems()),this.markDirty({restackGroups:!!this.options.cluster}),this.body.emitter.emit("_change",{queue:!0})}_orderGroups(){if(this.groupsData){let t=this.groupsData.getIds({order:this.options.groupOrder});t=this._orderNestedGroups(t);const e=!yo.equalArray(t,this.groupIds);if(e){const e=this.groups;t.forEach((t=>{e[t].hide()})),t.forEach((t=>{e[t].show()})),this.groupIds=t}return e}return!1}_orderNestedGroups(t){return function t(e,i){let n=[];return i.forEach((i=>{n.push(i);if(e.groupsData.get(i).nestedGroups){const o=e.groupsData.get({filter:t=>t.nestedInGroup==i,order:e.options.groupOrder}).map((t=>t.id));n=n.concat(t(e,o))}})),n}(this,t.filter((t=>!this.groupsData.get(t).nestedInGroup)))}_addItem(t){this.items[t.id]=t;const 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)}_updateItem(t,e){t.setData(e);const i=this.getGroupId(t.data),n=this.groups[i];n?n&&n.data&&n.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1}_removeItem(t){t.hide(),delete this.items[t.id];const e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t),null!=this.popup&&this.popup.hide()}_constructByEndArray(t){const e=[];for(let i=0;i<t.length;i++)t[i]instanceof ms&&e.push(t[i]);return e}_onTouch(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}_getGroupIndex(t){for(let e=0;e<this.groupIds.length;e++)if(t==this.groupIds[e])return e}_onDragStart(t){if(this.touchParams.itemIsDragging)return;const e=this.touchParams.item||null,i=this;let n;if(e&&(e.selected||this.options.itemsAlwaysDraggable.item)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;if(null!=e.editable&&!e.editable.updateTime&&!e.editable.updateGroup&&!this.options.editable.overrideItems)return;const o=this.touchParams.dragLeftItem,s=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=e,o)n={item:o,initialX:t.center.x,dragLeft:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[n];else if(s)n={item:s,initialX:t.center.x,dragRight:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[n];else if(this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey))this._onDragStartAddItem(t);else{this.groupIds.length<1&&this.redraw();const n=this._getGroupIndex(e.data.group),o=this.options.itemsAlwaysDraggable.item&&!e.selected?[e.id]:this.getSelection();this.touchParams.itemProps=o.map((e=>{const o=i.items[e],s=i._getGroupIndex(o.data.group);return{item:o,initialX:t.center.x,groupOffset:n-s,data:this._cloneItemData(o.data)}}))}t.stopPropagation()}else this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey)&&this._onDragStartAddItem(t)}_onDragStartAddItem(t){const 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),s=this.body.util.getScale(),r=this.body.util.getStep(),a=e?e(o,s,r):o,h={type:"range",start:a,end:a,content:"new item"},l=Wi();h[this.itemsData.idProp]=l;const d=this.groupFromTarget(t);d&&(h.group=d.groupId);const c=new ms(h,this.conversion,this.options);c.id=l,c.data=this._cloneItemData(h),this._addItem(c),this.touchParams.selectedItem=c;const u={item:c,initialX:t.center.x,data:c.data};this.options.rtl?u.dragLeft=!0:u.dragRight=!0,this.touchParams.itemProps=[u],t.stopPropagation()}_onDrag(t){if(null!=this.popup&&this.options.showTooltips&&!this.popup.hidden){const e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.center.x-i.left+e.offsetLeft,t.center.y-i.top+e.offsetTop),this.popup.show()}if(this.touchParams.itemProps){t.stopPropagation();const e=this,i=this.options.snap||null,n=this.body.dom.root.offsetLeft,o=this.options.rtl?n+this.body.domProps.right.width:n+this.body.domProps.left.width,s=this.body.util.getScale(),r=this.body.util.getStep(),a=this.touchParams.selectedItem,h=(this.options.editable.overrideItems||null==a.editable)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&null!=a.editable&&a.editable.updateGroup;let l=null;if(h&&a&&null!=a.data.group){const i=e.groupFromTarget(t);i&&(l=this._getGroupIndex(i.groupId))}this.touchParams.itemProps.forEach((n=>{const d=e.body.util.toTime(t.center.x-o),c=e.body.util.toTime(n.initialX-o);let u,p,m,f,g;u=this.options.rtl?-(d-c):d-c;let v=this._cloneItemData(n.item.data);if(null!=n.item.editable&&!n.item.editable.updateTime&&!n.item.editable.updateGroup&&!e.options.editable.overrideItems)return;if((this.options.editable.overrideItems||null==a.editable)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&null!=a.editable&&a.editable.updateTime)if(n.dragLeft)this.options.rtl?null!=v.end&&(m=yo.convert(n.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=i?i(g,s,r):g):null!=v.start&&(p=yo.convert(n.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=i?i(f,s,r):f);else if(n.dragRight)this.options.rtl?null!=v.start&&(p=yo.convert(n.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=i?i(f,s,r):f):null!=v.end&&(m=yo.convert(n.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=i?i(g,s,r):g);else if(null!=v.start)if(p=yo.convert(n.data.start,"Date").valueOf(),f=new Date(p+u),null!=v.end){m=yo.convert(n.data.end,"Date");const t=m.valueOf()-p.valueOf();v.start=i?i(f,s,r):f,v.end=new Date(v.start.valueOf()+t)}else v.start=i?i(f,s,r):f;if(h&&!n.dragLeft&&!n.dragRight&&null!=l&&null!=v.group){let t=l-n.groupOffset;t=Math.max(0,t),t=Math.min(e.groupIds.length-1,t),v.group=e.groupIds[t]}v=this._cloneItemData(v),e.options.onMoving(v,(t=>{t&&n.item.setData(this._cloneItemData(t,"Date"))}))})),this.body.emitter.emit("_change")}}_moveToGroup(t,e){const i=this.groups[e];if(i&&i.groupId!=t.data.group){const e=t.parent;e.remove(t),e.order(),t.data.group=i.groupId,i.add(t),i.order()}}_onDragEnd(t){if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){t.stopPropagation();const e=this,i=this.touchParams.itemProps;this.touchParams.itemProps=null,i.forEach((t=>{const i=t.item.id;if(null!=e.itemsData.get(i)){const n=this._cloneItemData(t.item.data);e.options.onMove(n,(n=>{n?(n[this.itemsData.idProp]=i,this.itemsData.update(n)):(t.item.setData(t.data),e.body.emitter.emit("_change"))}))}else e.options.onAdd(t.item.data,(i=>{e._removeItem(t.item),i&&e.itemsData.add(i),e.body.emitter.emit("_change")}))}))}}_onGroupClick(t){const e=this.groupFromTarget(t);setTimeout((()=>{this.toggleGroupShowNested(e)}),1)}toggleGroupShowNested(t,e=void 0){if(!t||!t.nestedGroups)return;const i=this.groupsData.getDataSet();t.showNested=null!=e?!!e:!t.showNested;let n=i.get(t.groupId);n.showNested=t.showNested;let o=t.nestedGroups,s=o;for(;s.length>0;){let t=s;s=[];for(let e=0;e<t.length;e++){let n=i.get(t[e]);n.nestedGroups&&(s=s.concat(n.nestedGroups))}s.length>0&&(o=o.concat(s))}var r;if(n.showNested){var a=i.get(n.nestedGroups);for(let t=0;t<a.length;t++){let e=a[t];e.nestedGroups&&e.nestedGroups.length>0&&(null==e.showNested||1==e.showNested)&&a.push(...i.get(e.nestedGroups))}r=a.map((function(t){return null==t.visible&&(t.visible=!0),t.visible=!!n.showNested,t}))}else r=i.get(o).map((function(t){return null==t.visible&&(t.visible=!0),t.visible=!!n.showNested,t}));i.update(r.concat(n)),n.showNested?(yo.removeClassName(t.dom.label,"collapsed"),yo.addClassName(t.dom.label,"expanded")):(yo.removeClassName(t.dom.label,"expanded"),yo.addClassName(t.dom.label,"collapsed"))}toggleGroupDragClassName(t){t.dom.label.classList.toggle("vis-group-is-dragging"),t.dom.foreground.classList.toggle("vis-group-is-dragging")}_onGroupDragStart(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})))}_onGroupDrag(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();const e=this.groupsData.getDataSet(),i=this.groupFromTarget(t);if(i&&i.height!=this.groupTouchParams.group.height){const e=i.top<this.groupTouchParams.group.top,n=t.center?t.center.y:t.clientY,o=i.dom.foreground.getBoundingClientRect(),s=this.groupTouchParams.group.height;if(e){if(o.top+s<n)return}else{const t=i.height;if(o.top+t-s>n)return}}if(i&&i!=this.groupTouchParams.group){const t=e.get(i.groupId),n=e.get(this.groupTouchParams.group.groupId);n&&t&&(this.options.groupOrderSwap(n,t,e),e.update(n),e.update(t));const o=e.getIds({order:this.options.groupOrder});if(!yo.equalArray(o,this.groupTouchParams.originalOrder)){const t=this.groupTouchParams.originalOrder,i=this.groupTouchParams.group.groupId,n=Math.min(t.length,o.length);let s=0,r=0,a=0;for(;s<n;){for(;s+r<n&&s+a<n&&o[s+r]==t[s+a];)s++;if(s+r>=n)break;if(o[s+r]==i)r=1;else if(t[s+a]==i)a=1;else{const i=o.indexOf(t[s+a]),n=e.get(o[s+r]),h=e.get(t[s+a]);this.options.groupOrderSwap(n,h,e),e.update(n),e.update(h);const l=o[s+r];o[s+r]=t[s+a],o[i]=l,s++}}}}}}_onGroupDragEnd(t){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();const e=this,i=e.groupTouchParams.group.groupId,n=e.groupsData.getDataSet(),o=yo.extend({},n.get(i));e.options.onMoveGroup(o,(t=>{if(t)t[n._idProp]=i,n.update(t);else{const t=n.getIds({order:e.options.groupOrder});if(!yo.equalArray(t,e.groupTouchParams.originalOrder)){const i=e.groupTouchParams.originalOrder,o=Math.min(i.length,t.length);let s=0;for(;s<o;){for(;s<o&&t[s]==i[s];)s++;if(s>=o)break;const r=t.indexOf(i[s]),a=n.get(t[s]),h=n.get(i[s]);e.options.groupOrderSwap(a,h,n),n.update(a),n.update(h);const l=t[s];t[s]=i[s],t[r]=l,s++}}}})),e.body.emitter.emit("groupDragged",{groupId:i}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}_onSelectItem(t){if(!this.options.selectable)return;const e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);const n=this.getSelection(),o=this.itemFromTarget(t),s=o&&o.selectable?[o.id]:[];this.setSelection(s);const r=this.getSelection();(r.length>0||n.length>0)&&this.body.emitter.emit("select",{items:r,event:t})}_onMouseOver(t){const e=this.itemFromTarget(t);if(!e)return;if(e===this.itemFromRelatedTarget(t))return;const i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new gs(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);const e=this.body.dom.centerContainer,n=e.getBoundingClientRect();this.popup.setPosition(t.clientX-n.left+e.offsetLeft,t.clientY-n.top+e.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}_onMouseOut(t){const e=this.itemFromTarget(t);if(!e)return;e!==this.itemFromRelatedTarget(t)&&(this.clearPopupTimer(),null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t}))}_onMouseMove(t){if(this.itemFromTarget(t)&&(null!=this.popupTimer&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){const 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()}}_onMouseWheel(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)}_onUpdateItem(t){if(!this.options.selectable)return;if(!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;const e=this;if(t){const i=e.itemsData.get(t.id);this.options.onUpdate(i,(t=>{t&&e.itemsData.update(t)}))}}_onDropObjectOnItem(t){const e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)}_onAddItem(t){if(!this.options.selectable)return;if(!this.options.editable.add)return;const e=this,i=this.options.snap||null,n=this.dom.frame.getBoundingClientRect(),o=this.options.rtl?n.right-t.center.x:t.center.x-n.left,s=this.body.util.toTime(o),r=this.body.util.getScale(),a=this.body.util.getStep();let h,l;"drop"==t.type?(l=JSON.parse(t.dataTransfer.getData("text")),l.content=l.content?l.content:"new item",l.start=l.start?l.start:i?i(s,r,a):s,l.type=l.type||"box",l[this.itemsData.idProp]=l.id||Wi(),"range"!=l.type||l.end||(h=this.body.util.toTime(o+this.props.width/5),l.end=i?i(h,r,a):h)):(l={start:i?i(s,r,a):s,content:"new item"},l[this.itemsData.idProp]=Wi(),"range"===this.options.type&&(h=this.body.util.toTime(o+this.props.width/5),l.end=i?i(h,r,a):h));const d=this.groupFromTarget(t);d&&(l.group=d.groupId),l=this._cloneItemData(l),this.options.onAdd(l,(i=>{i&&(e.itemsData.add(i),"drop"==t.type&&e.setSelection([i.id]))}))}_onMultiSelectItem(t){if(!this.options.selectable)return;const e=this.itemFromTarget(t);if(e){let i=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||!1||this.options.sequentialSelection)&&this.options.multiselect){const t=this.itemsData.get(e.id).group;let n;this.options.multiselectPerGroup&&i.length>0&&(n=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&null!=n&&n!=t||i.push(e.id);const o=xs._getItemRange(this.itemsData.get(i));if(!this.options.multiselectPerGroup||n==t){i=[];for(const t in this.items)if(this.items.hasOwnProperty(t)){const e=this.items[t],s=e.data.start,r=void 0!==e.data.end?e.data.end:s;!(s>=o.min&&r<=o.max)||this.options.multiselectPerGroup&&n!=this.itemsData.get(e.id).group||e instanceof fs||i.push(e.id)}}}else{const t=i.indexOf(e.id);-1==t?i.push(e.id):i.splice(t,1)}const n=i.filter((t=>this.getItemById(t).selectable));this.setSelection(n),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}static _getItemRange(t){let e=null,i=null;return t.forEach((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}}itemFromElement(t){let e=t;for(;e;){if(e.hasOwnProperty("vis-item"))return e["vis-item"];e=e.parentNode}return null}itemFromTarget(t){return this.itemFromElement(t.target)}itemFromRelatedTarget(t){return this.itemFromElement(t.relatedTarget)}groupFromTarget(t){const e=t.center?t.center.y:t.clientY;let i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(let t=0;t<i.length;t++){const n=i[t],o=this.groups[n],s=o.dom.foreground,r=s.getBoundingClientRect();if(e>=r.top&&e<r.top+s.offsetHeight)return o;if("top"===this.options.orientation.item){if(t===this.groupIds.length-1&&e>r.top)return o}else if(0===t&&e<r.top+s.offset)return o}return null}static itemSetFromTarget(t){let e=t.target;for(;e;){if(e.hasOwnProperty("vis-itemset"))return e["vis-itemset"];e=e.parentNode}return null}_cloneItemData(t,e){const i=yo.extend({},t);return e||(e=this.itemsData.type),null!=i.start&&(i.start=yo.convert(i.start,e&&e.start||"Date")),null!=i.end&&(i.end=yo.convert(i.end,e&&e.end||"Date")),i}_clusterItems(){if(!this.options.cluster)return;const{scale:t}=this.body.range.conversion(this.body.domProps.center.width),e=this.clusterGenerator.getClusters(this.clusters,t,this.options.cluster);if(this.clusters!=e){if(this._detachAllClusters(),e){for(let t of e)t.attach();this.clusters=e}this._updateClusters(e)}}_detachAllClusters(){if(this.options.cluster&&this.clusters&&this.clusters.length)for(let t of this.clusters)t.detach()}_updateClusters(t){if(this.clusters&&this.clusters.length){const e=new Set(t.map((t=>t.id))),i=this.clusters.filter((t=>!e.has(t.id)));let n=!1;for(let t of i){const e=this.selection.indexOf(t.id);-1!==e&&(t.unselect(),this.selection.splice(e,1),n=!0)}if(n){const t=this.getSelection();this.body.emitter.emit("select",{items:t,event:event})}}this.clusters=t||[]}}xs.types={background:fs,box:class extends ps{constructor(t,e,i){if(super(t,e,i),this.props={dot:{width:0,height:0},line:{width:0,height:0}},t&&null==t.start)throw new Error(`Property "start" missing in item ${t}`)}isVisible(t){if(this.cluster)return!1;let e;const 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}_createDomElement(){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)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const 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 t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){const e=this.parent.dom.axis;if(!t)throw new Error("Cannot redraw item: parent has no axis container element");e.appendChild(this.dom.dot)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const 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${e}`,this.dom.line.className=`vis-item vis-line${e}`,this.dom.dot.className=`vis-item vis-dot${e}`}}_getDomComponentsSizes(){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}}}_updateDomComponentsSizes(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}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.box)}redraw(t){let e;const i=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),()=>{this.dirty&&(e=this._getDomComponentsSizes())},()=>{this.dirty&&this._updateDomComponentsSizes.bind(this)(e)},this._repaintDomAdditionals.bind(this)];if(t)return i;{let t;return i.forEach((e=>{t=e()})),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const 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}}repositionXY(){const t=this.options.rtl,e=(t,e,i,n=!1)=>{if(void 0===e&&void 0===i)return;const o=n?-1*e:e;t.style.transform=void 0!==i?void 0!==e?`translate(${o}px, ${i}px)`:`translateY(${i}px)`:`translateX(${o}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)}repositionX(){const 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()}repositionY(){const t=this.options.orientation.item,e=this.dom.line.style;if("top"==t){const t=this.parent.top+this.top+1;this.boxY=this.top||0,e.height=`${t}px`,e.bottom="",e.top="0"}else{const t=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=`${t}px`,e.top="",e.bottom="0"}this.dotY=-this.props.dot.height/2,this.repositionXY()}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}},range:ms,point:class extends ps{constructor(t,e,i){if(super(t,e,i),this.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 ${t}`)}isVisible(t){if(this.cluster)return!1;const e=this.width*t.getMillisecondsPerPixel();return this.data.start.getTime()+e>t.start&&this.data.start<t.end}_createDomElement(){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)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.point.parentNode){const 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}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);const 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${e}`,this.dom.dot.className=`vis-item vis-dot${e}`}}_getDomComponentsSizes(){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}}}_updateDomComponentsSizes(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=this.props.dot.width/2+"px":this.dom.content.style.marginLeft=this.props.dot.width/2+"px",this.width=t.point.width,this.height=t.point.height,this.dom.dot.style.top=(this.height-this.props.dot.height)/2+"px";const e=this.props.dot.width,i=this.options.rtl?e/2:e/2*-1;this.dom.dot.style.transform=`translateX(${i}px`,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.point),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.point)}redraw(t){let e;const i=[this._createDomElement.bind(this),this._appendDomElement.bind(this),this._updateDirtyDomComponents.bind(this),()=>{this.dirty&&(e=this._getDomComponentsSizes())},()=>{this.dirty&&this._updateDomComponentsSizes.bind(this)(e)},this._repaintDomAdditionals.bind(this)];if(t)return i;{let t;return i.forEach((e=>{t=e()})),t}}repositionXY(){const t=this.options.rtl;((t,e,i,n=!1)=>{if(void 0===e&&void 0===i)return;const o=n?-1*e:e;t.style.transform=void 0!==i?void 0!==e?`translate(${o}px, ${i}px)`:`translateY(${i}px)`:`translateX(${o}px)`})(this.dom.point,this.pointX,this.pointY,t)}show(t){if(!this.displayed)return this.redraw(t)}hide(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)}repositionX(){const 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()}repositionY(){const t=this.options.orientation.item;this.pointY="top"==t?this.top:this.parent.height-this.top-this.height,this.repositionXY()}getWidthLeft(){return this.props.dot.width}getWidthRight(){return this.props.dot.width}}},xs.prototype._onAdd=xs.prototype._onUpdate;let ks,Ss=!1,Ds="background: #FFeeee; color: #dd0000";class Cs{constructor(){}static validate(t,e,i){Ss=!1,ks=e;let n=e;return void 0!==i&&(n=e[i]),Cs.parse(t,n,[]),Ss}static parse(t,e,i){for(let n in t)t.hasOwnProperty(n)&&Cs.check(n,t,e,i)}static check(t,e,i,n){if(void 0===i[t]&&void 0===i.__any__)return void Cs.getSuggestion(t,i,n);let o=t,s=!0;void 0===i[t]&&void 0!==i.__any__&&(o="__any__",s="object"===Cs.getType(e[t]));let r=i[o];s&&void 0!==r.__type__&&(r=r.__type__),Cs.checkFields(t,e,i,o,r,n)}static checkFields(t,e,i,n,o,s){let r=function(e){console.log("%c"+e+Cs.printLocation(s,t),Ds)},a=Cs.getType(e[t]),h=o[a];void 0!==h?"array"===Cs.getType(h)&&-1===h.indexOf(e[t])?(r('Invalid option detected in "'+t+'". Allowed values are:'+Cs.print(h)+' not "'+e[t]+'". '),Ss=!0):"object"===a&&"__any__"!==n&&(s=yo.copyAndExtendArray(s,t),Cs.parse(e[t],i[n],s)):void 0===o.any&&(r('Invalid type received for "'+t+'". Expected: '+Cs.print(Object.keys(o))+". Received ["+a+'] "'+e[t]+'"'),Ss=!0)}static getType(t){var e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Array.isArray(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}static getSuggestion(t,e,i){let n,o=Cs.findInOptions(t,e,i,!1),s=Cs.findInOptions(t,ks,[],!0);n=void 0!==o.indexMatch?" in "+Cs.printLocation(o.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':s.distance<=4&&o.distance>s.distance?" in "+Cs.printLocation(o.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+Cs.printLocation(s.path,s.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+Cs.printLocation(o.path,t):". Did you mean one of these: "+Cs.print(Object.keys(e))+Cs.printLocation(i,t),console.log('%cUnknown option detected: "'+t+'"'+n,Ds),Ss=!0}static findInOptions(t,e,i,n=!1){let o,s=1e9,r="",a=[],h=t.toLowerCase();for(let l in e){let d;if(void 0!==e[l].__type__&&!0===n){let n=Cs.findInOptions(t,e[l],yo.copyAndExtendArray(i,l));s>n.distance&&(r=n.closestMatch,a=n.path,s=n.distance,o=n.indexMatch)}else-1!==l.toLowerCase().indexOf(h)&&(o=l),d=Cs.levenshteinDistance(t,l),s>d&&(r=l,a=yo.copyArray(i),s=d)}return{closestMatch:r,path:a,distance:s,indexMatch:o}}static printLocation(t,e,i="Problem value found at: \n"){let n="\n\n"+i+"options = {\n";for(let e=0;e<t.length;e++){for(let t=0;t<e+1;t++)n+=" ";n+=t[e]+": {\n"}for(let e=0;e<t.length+1;e++)n+=" ";n+=e+"\n";for(let e=0;e<t.length+1;e++){for(let i=0;i<t.length-e;i++)n+=" ";n+="}\n"}return n+"\n\n"}static print(t){return JSON.stringify(t).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}static levenshteinDistance(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]}}let Ts="string",Es="boolean",Os="number",Ms="array",Ps="date",Is="object",As="moment",Ns={configure:{enabled:{boolean:Es},filter:{boolean:Es,function:"function"},container:{dom:"dom"},__type__:{object:Is,boolean:Es,function:"function"}},align:{string:Ts},alignCurrentTime:{string:Ts,undefined:"undefined"},rtl:{boolean:Es,undefined:"undefined"},rollingMode:{follow:{boolean:Es},offset:{number:Os,undefined:"undefined"},__type__:{object:Is}},onTimeout:{timeoutMs:{number:Os},callback:{function:"function"},__type__:{object:Is}},verticalScroll:{boolean:Es,undefined:"undefined"},horizontalScroll:{boolean:Es,undefined:"undefined"},autoResize:{boolean:Es},throttleRedraw:{number:Os},clickToUse:{boolean:Es},dataAttributes:{string:Ts,array:Ms},editable:{add:{boolean:Es,undefined:"undefined"},remove:{boolean:Es,undefined:"undefined"},updateGroup:{boolean:Es,undefined:"undefined"},updateTime:{boolean:Es,undefined:"undefined"},overrideItems:{boolean:Es,undefined:"undefined"},__type__:{boolean:Es,object:Is}},end:{number:Os,date:Ps,string:Ts,moment:As},format:{minorLabels:{millisecond:{string:Ts,undefined:"undefined"},second:{string:Ts,undefined:"undefined"},minute:{string:Ts,undefined:"undefined"},hour:{string:Ts,undefined:"undefined"},weekday:{string:Ts,undefined:"undefined"},day:{string:Ts,undefined:"undefined"},week:{string:Ts,undefined:"undefined"},month:{string:Ts,undefined:"undefined"},year:{string:Ts,undefined:"undefined"},__type__:{object:Is,function:"function"}},majorLabels:{millisecond:{string:Ts,undefined:"undefined"},second:{string:Ts,undefined:"undefined"},minute:{string:Ts,undefined:"undefined"},hour:{string:Ts,undefined:"undefined"},weekday:{string:Ts,undefined:"undefined"},day:{string:Ts,undefined:"undefined"},week:{string:Ts,undefined:"undefined"},month:{string:Ts,undefined:"undefined"},year:{string:Ts,undefined:"undefined"},__type__:{object:Is,function:"function"}},__type__:{object:Is}},moment:{function:"function"},groupHeightMode:{string:Ts},groupOrder:{string:Ts,function:"function"},groupEditable:{add:{boolean:Es,undefined:"undefined"},remove:{boolean:Es,undefined:"undefined"},order:{boolean:Es,undefined:"undefined"},__type__:{boolean:Es,object:Is}},groupOrderSwap:{function:"function"},height:{string:Ts,number:Os},hiddenDates:{start:{date:Ps,number:Os,string:Ts,moment:As},end:{date:Ps,number:Os,string:Ts,moment:As},repeat:{string:Ts},__type__:{object:Is,array:Ms}},itemsAlwaysDraggable:{item:{boolean:Es,undefined:"undefined"},range:{boolean:Es,undefined:"undefined"},__type__:{boolean:Es,object:Is}},limitSize:{boolean:Es},locale:{string:Ts},locales:{__any__:{any:"any"},__type__:{object:Is}},longSelectPressTime:{number:Os},margin:{axis:{number:Os},item:{horizontal:{number:Os,undefined:"undefined"},vertical:{number:Os,undefined:"undefined"},__type__:{object:Is,number:Os}},__type__:{object:Is,number:Os}},max:{date:Ps,number:Os,string:Ts,moment:As},maxHeight:{number:Os,string:Ts},maxMinorChars:{number:Os},min:{date:Ps,number:Os,string:Ts,moment:As},minHeight:{number:Os,string:Ts},moveable:{boolean:Es},multiselect:{boolean:Es},multiselectPerGroup:{boolean:Es},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:Ts,undefined:"undefined"},item:{string:Ts,undefined:"undefined"},__type__:{string:Ts,object:Is}},selectable:{boolean:Es},sequentialSelection:{boolean:Es},showCurrentTime:{boolean:Es},showMajorLabels:{boolean:Es},showMinorLabels:{boolean:Es},showWeekScale:{boolean:Es},stack:{boolean:Es},stackSubgroups:{boolean:Es},cluster:{maxItems:{number:Os,undefined:"undefined"},titleTemplate:{string:Ts,undefined:"undefined"},clusterCriteria:{function:"function",undefined:"undefined"},showStipes:{boolean:Es,undefined:"undefined"},fitOnDoubleClick:{boolean:Es,undefined:"undefined"},__type__:{boolean:Es,object:Is}},snap:{function:"function",null:"null"},start:{date:Ps,number:Os,string:Ts,moment:As},template:{function:"function"},loadingScreenTemplate:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:Ts,function:"function"},showTooltips:{boolean:Es},tooltip:{followMouse:{boolean:Es},overflowMethod:{string:["cap","flip","none"]},delay:{number:Os},template:{function:"function"},__type__:{object:Is}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:Es,object:Is}},timeAxis:{scale:{string:Ts,undefined:"undefined"},step:{number:Os,undefined:"undefined"},__type__:{object:Is}},type:{string:Ts},width:{string:Ts,number:Os},preferZoom:{boolean:Es},zoomable:{boolean:Es},zoomKey:{string:["ctrlKey","altKey","shiftKey","metaKey",""]},zoomFriction:{number:Os},zoomMax:{number:Os},zoomMin:{number:Os},xss:{disabled:{boolean:Es},filterOptions:{__any__:{any:"any"},__type__:{object:Is}},__type__:{object:Is}},__type__:{object:Is}},Rs={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],xss:{disabled:!1}}};var Fs={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"};class Ls{constructor(t=1){this.pixelRatio=t,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=()=>{},this.closeCallback=()=>{},this._create()}insertTo(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}setCloseCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}_isColorString(t){if("string"==typeof t)return Fs[t]}setColor(t,e=!0){if("none"===t)return;let i;var n=this._isColorString(t);if(void 0!==n&&(t=n),!0===yo.isString(t)){if(!0===yo.isValidRGB(t)){let e=t.substr(4).substr(0,t.length-5).split(",");i={r:e[0],g:e[1],b:e[2],a:1}}else if(!0===yo.isValidRGBA(t)){let e=t.substr(5).substr(0,t.length-6).split(",");i={r:e[0],g:e[1],b:e[2],a:e[3]}}else if(!0===yo.isValidHex(t)){let e=yo.hexToRGB(t);i={r:e.r,g:e.g,b:e.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){let e=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:e}}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: "+JSON.stringify(t));this._setColor(i,e)}show(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(t=!0){!0===t&&(this.previousColor=yo.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout((()=>{void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0)}),0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(t,e=!0){!0===e&&(this.initialColor=yo.extend({},t)),this.color=t;let i=yo.RGBToHSV(t.r,t.g,t.b),n=2*Math.PI,o=this.r*i.s,s=this.centerCoordinates.x+o*Math.sin(n*i.h),r=this.centerCoordinates.y+o*Math.cos(n*i.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=r-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){let e=yo.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;let i=yo.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(t=this.color){let e=yo.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);let 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),i.fill(),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+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){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){let t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}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 t=this;this.opacityRange.onchange=function(){t._setOpacity(this.value)},this.opacityRange.oninput=function(){t._setOpacity(this.value)},this.brightnessRange.onchange=function(){t._setBrightness(this.value)},this.brightnessRange.oninput=function(){t._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=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=this._loadLast.bind(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)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new Io(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),Ao(this.hammer,(t=>{this._moveSelector(t)})),this.hammer.on("tap",(t=>{this._moveSelector(t)})),this.hammer.on("panstart",(t=>{this._moveSelector(t)})),this.hammer.on("panmove",(t=>{this._moveSelector(t)})),this.hammer.on("panend",(t=>{this._moveSelector(t)}))}_generateHueCircle(){if(!1===this.generated){let 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);let e,i,n,o,s=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,s,r),this.centerCoordinates={x:.5*s,y:.5*r},this.r=.49*s;let a,h=2*Math.PI/360,l=1/360,d=1/this.r;for(n=0;n<360;n++)for(o=0;o<this.r;o++)e=this.centerCoordinates.x+o*Math.sin(h*n),i=this.centerCoordinates.y+o*Math.cos(h*n),a=yo.HSVToRGB(n*l,o*d,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,s,r)}this.generated=!0}_moveSelector(t){let e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,n=t.center.y-e.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,r=i-s,a=n-o,h=Math.atan2(r,a),l=.98*Math.min(Math.sqrt(r*r+a*a),s),d=Math.cos(h)*l+o,c=Math.sin(h)*l+s;this.colorPickerSelector.style.top=d-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";let u=h/(2*Math.PI);u=u<0?u+1:u;let p=l/this.r,m=yo.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;let f=yo.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+")"}}class js{constructor(t,e,i,n=1){this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},yo.extend(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Ls(n),this.wrapper=void 0}setOptions(t){if(void 0!==t){this.popupHistory={},this._removePopup();let e=!0;if("string"==typeof t)this.options.filter=t;else if(Array.isArray(t))this.options.filter=t.join();else if("object"==typeof t){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==t.filter&&(this.options.filter=t.filter),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===this.options.filter&&(e=!1),this.options.enabled=e}this._clean()}setModuleOptions(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let t=this.options.filter,e=0,i=!1;for(let n in this.configureOptions)this.configureOptions.hasOwnProperty(n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?(i=t(n,[]),i=i||this._handleObject(this.configureOptions[n],[n],!0)):!0!==t&&-1===t.indexOf(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()}_push(){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()}_clean(){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()}_getValue(t){let e=this.moduleOptions;for(let i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}_makeItem(t,...e){if(!0===this.allowCreation){let i=document.createElement("div");return i.className="vis-configuration vis-config-item vis-config-s"+t.length,e.forEach((t=>{i.appendChild(t)})),this.domElements.push(i),this.domElements.length}return 0}_makeHeader(t){let e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=yo.xss(t),this._makeItem([],e)}_makeLabel(t,e,i=!1){let n=document.createElement("div");return n.className="vis-configuration vis-config-label vis-config-s"+e.length,n.innerHTML=!0===i?yo.xss("<i><b>"+t+":</b></i>"):yo.xss(t+":"),n}_makeDropdown(t,e,i){let n=document.createElement("select");n.className="vis-configuration vis-config-select";let o=0;void 0!==e&&-1!==t.indexOf(e)&&(o=t.indexOf(e));for(let e=0;e<t.length;e++){let i=document.createElement("option");i.value=t[e],e===o&&(i.selected="selected"),i.innerHTML=t[e],n.appendChild(i)}let s=this;n.onchange=function(){s._update(this.value,i)};let r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}_makeRange(t,e,i){let n=t[0],o=t[1],s=t[2],r=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=s}catch(t){}a.step=r;let h="",l=0;if(void 0!==e){let t=1.2;e<0&&e*t<o?(a.min=Math.ceil(e*t),l=a.min,h="range increased"):e/t<o&&(a.min=Math.ceil(e/t),l=a.min,h="range increased"),e*t>s&&1!==s&&(a.max=Math.ceil(e*t),l=a.max,h="range increased"),a.value=e}else a.value=n;let d=document.createElement("input");d.className="vis-configuration vis-config-rangeinput",d.value=Number(a.value);var c=this;a.onchange=function(){d.value=this.value,c._update(Number(this.value),i)},a.oninput=function(){d.value=this.value};let u=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,u,a,d);""!==h&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(h,p))}_makeButton(){if(!0===this.options.showButton){let t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerHTML="generate options",t.onclick=()=>{this._printOptions()},t.onmouseover=()=>{t.className="vis-configuration vis-config-button hover"},t.onmouseout=()=>{t.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(t)}}_setupPopup(t,e){if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){let i=document.createElement("div");i.id="vis-configuration-popup",i.className="vis-configuration-popup",i.innerHTML=yo.xss(t),i.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:e}}}_removePopup(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(void 0!==this.popupDiv.html){let t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=setTimeout((()=>{this.popupDiv.html.style.opacity=0}),1500),this.popupDiv.deleteTimeout=setTimeout((()=>{this._removePopup()}),1800)}}_makeCheckbox(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"==typeof t?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));let o=this;n.onchange=function(){o._update(this.checked,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeTextInput(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});let o=this;n.onchange=function(){o._update(this.value,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeColorField(t,e,i){let n=t[1],o=document.createElement("div");"none"!==(e=void 0===e?n:e)?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=e):o.className="vis-configuration vis-config-colorBlock none",e=void 0===e?n:e,o.onclick=()=>{this._showColorPicker(e,o,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback((t=>{let n="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=n,this._update(n,i)})),this.colorPicker.setCloseCallback((()=>{e.onclick=()=>{this._showColorPicker(t,e,i)}}))}_handleObject(t,e=[],i=!1){let n=!1,o=this.options.filter,s=!1;for(let r in t)if(t.hasOwnProperty(r)){n=!0;let a=t[r],h=yo.copyAndExtendArray(e,r);if("function"==typeof o&&(n=o(r,e),!1===n&&!Array.isArray(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,h,!0),this.allowCreation=!1===i)),!1!==n){s=!0;let t=this._getValue(h);if(Array.isArray(a))this._handleArray(a,t,h);else if("string"==typeof a)this._makeTextInput(a,t,h);else if("boolean"==typeof a)this._makeCheckbox(a,t,h);else if(a instanceof Object){let t=!0;if(-1!==e.indexOf("physics")&&this.moduleOptions.physics.solver!==r&&(t=!1),!0===t)if(void 0!==a.enabled){let t=yo.copyAndExtendArray(h,"enabled"),e=this._getValue(t);if(!0===e){let t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,e,h)}else{let t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}_handleArray(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)}))}_update(t,e){let 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)}_constructOptions(t,e,i={}){let n=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;i<e.length;i++)"global"!==e[i]&&(void 0===n[e[i]]&&(n[e[i]]={}),i!==e.length-1?n=n[e[i]]:n[e[i]]=t);return i}_printOptions(){let t=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+JSON.stringify(t,null,2)+"</pre>"}getOptions(){let t={};for(var e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}class Ys extends ts{constructor(t,e,i,n){if(super(),this.initTime=new Date,this.itemsDone=!1,!(this instanceof Ys))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(i)&&!lo(i)&&i instanceof Object){const t=n;n=i,i=t}n&&n.throttleRedraw&&console.warn('Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');const o=this;if(this.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:"bottom",item:"bottom"},moment:ho},this.options=yo.deepExtend({},this.defaultOptions),n&&yo.setupXSSProtection(n.xss),this._create(t),!n||n&&void 0===n.rtl){let t;this.dom.root.style.visibility="hidden";let e=this.dom.root;for(;!t&&e;)t=window.getComputedStyle(e,null).direction,e=e.parentElement;this.options.rtl=t&&"rtl"==t.toLowerCase()}else this.options.rtl=n.rtl;n&&(n.rollingMode&&(this.options.rollingMode=n.rollingMode),n.onInitialDrawComplete&&(this.options.onInitialDrawComplete=n.onInitialDrawComplete),n.onTimeout&&(this.options.onTimeout=n.onTimeout),n.loadingScreenTemplate&&(this.options.loadingScreenTemplate=n.loadingScreenTemplate));const s=document.createElement("div");if(this.options.loadingScreenTemplate){const t=this.options.loadingScreenTemplate.bind(this),e=t(this.dom.loadingScreen);e instanceof Object&&!(e instanceof Element)?t(s):e instanceof Element?(s.innerHTML="",s.appendChild(e)):null!=e&&(s.innerHTML=yo.xss(e))}function r(t,e){o.hasListeners(t)&&o.emit(t,o.getEventProperties(e))}this.dom.loadingScreen.appendChild(s),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{getScale:()=>o.timeAxis.step.scale,getStep:()=>o.timeAxis.step.step,toScreen:o._toScreen.bind(o),toGlobalScreen:o._toGlobalScreen.bind(o),toTime:o._toTime.bind(o),toGlobalTime:o._toGlobalTime.bind(o)}},this.range=new Oo(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new Ro(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new es(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new xs(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.dom.root.onclick=t=>{r("click",t)},this.dom.root.ondblclick=t=>{r("doubleClick",t)},this.dom.root.oncontextmenu=t=>{r("contextmenu",t)},this.dom.root.onmouseover=t=>{r("mouseOver",t)},window.PointerEvent?(this.dom.root.onpointerdown=t=>{r("mouseDown",t)},this.dom.root.onpointermove=t=>{r("mouseMove",t)},this.dom.root.onpointerup=t=>{r("mouseUp",t)}):(this.dom.root.onmousemove=t=>{r("mouseMove",t)},this.dom.root.onmousedown=t=>{r("mouseDown",t)},this.dom.root.onmouseup=t=>{r("mouseUp",t)}),this.initialFitDone=!1,this.on("changed",(()=>{if(null!=o.itemsData){if(!o.initialFitDone&&!o.options.rollingMode)if(o.initialFitDone=!0,null!=o.options.start||null!=o.options.end){if(null==o.options.start||null==o.options.end)var t=o.getItemRange();const e=null!=o.options.start?o.options.start:t.min,i=null!=o.options.end?o.options.end:t.max;o.setWindow(e,i,{animation:!1})}else o.fit({animation:!1});o.initialDrawDone||!o.initialRangeChangeDone&&(o.options.start||o.options.end)&&!o.options.rollingMode||(o.initialDrawDone=!0,o.itemSet.initialDrawDone=!0,o.dom.root.style.visibility="visible",o.dom.loadingScreen.parentNode.removeChild(o.dom.loadingScreen),o.options.onInitialDrawComplete&&setTimeout((()=>o.options.onInitialDrawComplete()),0))}})),this.on("destroyTimeline",(()=>{o.destroy()})),n&&this.setOptions(n),this.body.emitter.on("fit",(t=>{this._onFit(t),this.redraw()})),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}_createConfigurator(){return new js(this,this.dom.container,Rs)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(t){if(!0===Cs.validate(t,Ns)&&console.log("%cErrors have been found in the supplied options object.",Ds),ts.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;const e=this.itemsData;if(e){const t=this.getSelection();this.setItems(null),this.setItems(e.rawDS),this.setSelection(t)}}}setItems(t){let e;this.itemsDone=!1,e=t?lo(t)?mo(t):mo(new Qi(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.itemSet&&this.itemSet.setItems(null!=e?e.rawDS:null)}setGroups(t){let e;const i=t=>!1!==t.visible;t?(Array.isArray(t)&&(t=new Qi(t)),e=new Zi(t,{filter:i})):e=null,null!=this.groupsData&&"function"==typeof this.groupsData.setData&&this.groupsData.setData(null),this.groupsData=e,this.itemSet.setGroups(e)}setData(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)}setSelection(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)}getSelection(){return this.itemSet&&this.itemSet.getSelection()||[]}focus(t,e){if(!this.itemsData||null==t)return;const i=Array.isArray(t)?t:[t],n=this.itemsData.get(i);let o=null,s=null;if(n.forEach((t=>{const e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===o||e<o)&&(o=e),(null===s||i>s)&&(s=i)})),null!==o&&null!==s){const t=this,n=this.itemSet.items[i[0]];let r=-1*this._getScrollTop(),a=null;const h=(e,i,o)=>{const s=Gs(t,n);if(!1===s)return;if(a||(a=s),a.itemTop==s.itemTop&&!a.shouldScroll)return;a.itemTop!=s.itemTop&&s.shouldScroll&&(a=s,r=-1*t._getScrollTop());const h=r,l=a.scrollOffset,d=o?l:h+(l-h)*e;t._setScrollTop(-d),i||t._redraw()},l=()=>{const e=Gs(t,n);e.shouldScroll&&e.itemTop!=a.itemTop&&(t._setScrollTop(-e.scrollOffset),t._redraw())},d=()=>{l(),setTimeout(l,100)},c=!e||void 0===e.zoom||e.zoom,u=(o+s)/2,p=c?1.1*(s-o):Math.max(this.range.end-this.range.start,1.1*(s-o)),m=!e||void 0===e.animation||e.animation;m||(a={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.setRange(u-p/2,u+p/2,{animation:m},d,h)}}fit(t,e){const i=!t||void 0===t.animation||t.animation;let n;1===this.itemsData.length&&void 0===this.itemsData.get()[0].end?(n=this.getDataRange(),this.moveTo(n.min.valueOf(),{animation:i},e)):(n=this.getItemRange(),this.range.setRange(n.min,n.max,{animation:i},e))}getItemRange(){const t=this.getDataRange();let e=null!==t.min?t.min.valueOf():null,i=null!==t.max?t.max.valueOf():null,n=null,o=null;if(null!=e&&null!=i){let t=i-e;t<=0&&(t=10);const s=t/this.props.center.width,r={};let a=0;yo.forEach(this.itemSet.items,((t,e)=>{if(t.groupShowing){const i=!0;r[e]=t.redraw(i),a=r[e].length}}));if(a>0)for(let t=0;t<a;t++)yo.forEach(r,(e=>{e[t]()}));if(yo.forEach(this.itemSet.items,(t=>{const r=zs(t),a=Hs(t);let h,l;this.options.rtl?(h=r-(t.getWidthRight()+10)*s,l=a+(t.getWidthLeft()+10)*s):(h=r-(t.getWidthLeft()+10)*s,l=a+(t.getWidthRight()+10)*s),h<e&&(e=h,n=t),l>i&&(i=l,o=t)})),n&&o){const s=n.getWidthLeft()+10,r=o.getWidthRight()+10,a=this.props.center.width-s-r;a>0&&(this.options.rtl?(e=zs(n)-r*t/a,i=Hs(o)+s*t/a):(e=zs(n)-s*t/a,i=Hs(o)+r*t/a))}}return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}}getDataRange(){let t=null,e=null;return this.itemsData&&this.itemsData.forEach((i=>{const n=yo.convert(i.start,"Date").valueOf(),o=yo.convert(null!=i.end?i.end:i.start,"Date").valueOf();(null===t||n<t)&&(t=n),(null===e||o>e)&&(e=o)})),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}}getEventProperties(t){const 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,s=i-n.top,r=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),h=Jo.customTimeFromTarget(t),l=this.itemSet.options.snap||null,d=this.body.util.getScale(),c=this.body.util.getStep(),u=this._toTime(o),p=l?l(u,d,c):u,m=yo.getTarget(t);let f=null;return null!=r?f="item":null!=h?f="custom-time":yo.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&yo.hasParent(m,this.timeAxis2.dom.foreground)?f="axis":yo.hasParent(m,this.itemSet.dom.labelSet)?f="group-label":yo.hasParent(m,this.currentTime.bar)?f="current-time":yo.hasParent(m,this.dom.center)&&(f="background"),{event:t,item:r?r.id:null,isCluster:!!r&&!!r.isCluster,items:r?r.items||[]:null,group:a?a.groupId:null,customTime:h?h.options.id:null,what:f,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:s,time:u,snappedTime:p}}toggleRollingMode(){this.range.rolling?this.range.stopRolling():(null==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())}_redraw(){ts.prototype._redraw.call(this)}_onFit(t){const{start:e,end:i,animation:n}=t;i?this.range.setRange(e,i,{animation:n}):this.moveTo(e.valueOf(),{animation:n})}}function zs(t){return yo.convert(t.data.start,"Date").valueOf()}function Hs(t){const e=null!=t.data.end?t.data.end:t.data.start;return yo.convert(e,"Date").valueOf()}function Gs(t,e){if(!e.parent)return!1;const i=t.options.rtl?t.props.rightContainer.height:t.props.leftContainer.height,n=t.props.center.height,o=e.parent;let s=o.top,r=!0;const a=t.timeAxis.options.orientation.axis,h=()=>"bottom"==a?o.height-e.top-e.height:e.top,l=-1*t._getScrollTop(),d=s+h(),c=e.height;return d<l?s+i<=s+h()+c&&(s+=h()-t.itemSet.options.margin.item.vertical):d+c>l+i?s+=h()+c-i+t.itemSet.options.margin.item.vertical:r=!1,s=Math.min(s,n-i),{shouldScroll:r,scrollOffset:s,itemTop:d}}function Ws(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])}function Bs(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 Vs(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 Us(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 $s(t,e,i,n,o,s){var r;if("circle"==i.style?((r=Vs("circle",n,o)).setAttributeNS(null,"cx",t),r.setAttributeNS(null,"cy",e),r.setAttributeNS(null,"r",.5*i.size)):((r=Vs("rect",n,o)).setAttributeNS(null,"x",t-.5*i.size),r.setAttributeNS(null,"y",e-.5*i.size),r.setAttributeNS(null,"width",i.size),r.setAttributeNS(null,"height",i.size)),void 0!==i.styles&&r.setAttributeNS(null,"style",i.styles),r.setAttributeNS(null,"class",i.className+" vis-point"),s){var a=Vs("text",n,o);s.xOffset&&(t+=s.xOffset),s.yOffset&&(e+=s.yOffset),s.content&&(a.textContent=s.content),s.className&&a.setAttributeNS(null,"class",s.className+" vis-label"),a.setAttributeNS(null,"x",t),a.setAttributeNS(null,"y",e)}return r}function qs(t,e,i,n,o,s,r,a){if(0!=n){n<0&&(e-=n*=-1);var h=Vs("rect",s,r);h.setAttributeNS(null,"x",t-.5*i),h.setAttributeNS(null,"y",e),h.setAttributeNS(null,"width",i),h.setAttributeNS(null,"height",n),h.setAttributeNS(null,"class",o),a&&h.setAttributeNS(null,"style",a)}}class Xs{constructor(t,e,i,n,o,s,r=!1,a=!1){if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=o,this.majorCharHeight=s,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=r,this.autoScaleStart=i,this.autoScaleEnd=n,this.formattingFunction=a,i||n){const t=this,e=e=>{const i=e-e%(t.magnitudefactor*t.minorSteps[t.minorStepIdx]);return e%(t.magnitudefactor*t.minorSteps[t.minorStepIdx])>t.magnitudefactor*t.minorSteps[t.minorStepIdx]*.5?i+t.magnitudefactor*t.minorSteps[t.minorStepIdx]:i};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=e(this._start)),n&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=e(this._end)),this.determineScale()}}setCharHeight(t){this.majorCharHeight=t}setHeight(t){this.containerHeight=t}determineScale(){const t=this._end-this._start;this.scale=this.containerHeight/t;const 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);let n=0;i<0&&(n=i);let o=!1;for(let t=n;Math.abs(t)<=Math.abs(i);t++){this.magnitudefactor=Math.pow(10,t);for(let t=0;t<this.minorSteps.length;t++){if(this.magnitudefactor*this.minorSteps[t]>=e){o=!0,this.minorStepIdx=t;break}}if(!0===o)break}}is_major(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])==0}getStep(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}getFirstMajor(){const t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)}formatValue(t){let e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?`${e}`:"string"==typeof e?e:t.toPrecision(5)}getLines(){const t=[],e=this.getStep(),i=(e-this._start%e)%e;for(let 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}followScale(t){const e=this.minorStepIdx,i=this._start,n=this._end,o=this,s=()=>{o.magnitudefactor*=2},r=()=>{o.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,2==e||s(),s()):(this.minorStepIdx=2,1==e||r(),r()));const a=t.convertValue(0),h=t.getStep()*t.scale;let l=!1,d=0;for(;!l&&d++<5;){this.scale=h/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);const e=this.containerHeight/this.scale;this._start=i,this._end=this._start+e;const o=this._end*this.scale,d=this.magnitudefactor*this.majorSteps[this.minorStepIdx],c=this.getFirstMajor()-t.getFirstMajor();if(this.zeroAlign){const t=a-o;this._end+=t/this.scale,this._start=this._end-e}else this.autoScaleStart?(this._start-=c/this.scale,this._end=this._start+e):(this._start+=d-c/this.scale,this._end=this._start+e);if(!this.autoScaleEnd&&this._end>n+1e-5)r(),l=!1;else{if(!this.autoScaleStart&&this._start<i-1e-5){if(!(this.zeroAlign&&i>=0)){r(),l=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&e<n-i?(s(),l=!1):l=!0}}}convertValue(t){return this.containerHeight-(t-this._start)*this.scale}screenToValue(t){return(this.containerHeight-t)/this.scale+this._start}}class Qs extends bo{constructor(t,e,i,n){super(),this.id=Wi(),this.body=t,this.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:t=>`${parseFloat(t.toPrecision(3))}`,title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:t=>`${parseFloat(t.toPrecision(3))}`,title:{text:void 0,style:void 0}}},this.linegraphOptions=n,this.linegraphSVG=i,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=yo.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(e),this.width=Number(`${this.options.width}`.replace("px","")),this.minWidth=this.width,this.height=this.linegraphSVG.getBoundingClientRect().height,this.hidden=!1,this.stepPixels=25,this.zeroCrossing=-1,this.amountOfSteps=-1,this.lineOffset=0,this.master=!0,this.masterAxis=null,this.svgElements={},this.iconsRemoved=!1,this.groups={},this.amountOfGroups=0,this._create(),null==this.scale&&this._redrawLabels(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};const o=this;this.body.emitter.on("verticalDrag",(()=>{o.dom.lineContainer.style.top=`${o.body.domProps.scrollTop}px`}))}addGroup(t,e){this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1}updateGroup(t,e){this.groups.hasOwnProperty(t)||(this.amountOfGroups+=1),this.groups[t]=e}removeGroup(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)}setOptions(t){if(t){let e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);const i=["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","left","right","alignZeros"];yo.selectiveDeepExtend(i,this.options,t),this.minWidth=Number(`${this.options.width}`.replace("px","")),!0===e&&this.dom.frame&&(this.hide(),this.show())}}_create(){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)}_redrawGroupIcons(){let t;Ws(this.svgElements);const e=this.options.iconWidth;let i=11.5;t="left"===this.options.orientation?4:this.width-e-4;const n=Object.keys(this.groups);n.sort(((t,e)=>t<e?-1:1));for(const o of n)!0!==this.groups[o].visible||void 0!==this.linegraphOptions.visibility[o]&&!0!==this.linegraphOptions.visibility[o]||(this.groups[o].getLegend(e,15,this.framework,t,i),i+=19);Bs(this.svgElements),this.iconsRemoved=!1}_cleanupIcons(){!1===this.iconsRemoved&&(Ws(this.svgElements),Bs(this.svgElements),this.iconsRemoved=!0)}show(){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"}hide(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.style.display="none"}setRange(t,e){this.range.start=t,this.range.end=e}redraw(){let t=!1,e=0;this.dom.lineContainer.style.top=`${this.body.domProps.scrollTop}px`;for(const t in this.groups)this.groups.hasOwnProperty(t)&&(!0!==this.groups[t].visible||void 0!==this.linegraphOptions.visibility[t]&&!0!==this.linegraphOptions.visibility[t]||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=`${this.height}px`,this.width=!0===this.options.visible?Number(`${this.options.width}`.replace("px","")):0;const e=this.props,i=this.dom.frame;i.className="vis-data-axis",this._calculateCharSize();const n=this.options.orientation,o=this.options.showMinorLabels,s=this.options.showMajorLabels,r=this.body.dom.backgroundHorizontal.offsetWidth;e.minorLabelHeight=o?e.minorCharHeight:0,e.majorLabelHeight=s?e.majorCharHeight:0,e.minorLineWidth=r-this.lineOffset-this.width+2*this.options.minorLinesOffset,e.minorLineHeight=1,e.majorLineWidth=r-this.lineOffset-this.width+2*this.options.majorLinesOffset,e.majorLineHeight=1,"left"===n?(i.style.top="0",i.style.left="0",i.style.bottom="",i.style.width=`${this.width}px`,i.style.height=`${this.height}px`,this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(i.style.top="",i.style.bottom="0",i.style.left="0",i.style.width=`${this.width}px`,i.style.height=`${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(n)}return t}_redrawLabels(){let t=!1;Ws(this.DOMelements.lines),Ws(this.DOMelements.labels);const e=this.options.orientation,i=null!=this.options[e].range?this.options[e].range:{};let n=!0;null!=i.max&&(this.range.end=i.max,n=!1);let o=!0;null!=i.min&&(this.range.start=i.min,o=!1),this.scale=new Xs(this.range.start,this.range.end,o,n,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[e].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;this.scale.getLines().forEach((t=>{const i=t.y,n=t.major;this.options.showMinorLabels&&!1===n&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-minor",this.props.minorCharHeight),n&&i>=0&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-major",this.props.majorCharHeight),!0===this.master&&(n?this._redrawLine(i,e,"vis-grid vis-horizontal vis-major",this.options.majorLinesOffset,this.props.majorLineWidth):this._redrawLine(i,e,"vis-grid vis-horizontal vis-minor",this.options.minorLinesOffset,this.props.minorLineWidth))}));let s=0;void 0!==this.options[e].title&&void 0!==this.options[e].title.text&&(s=this.props.titleCharHeight);const r=!0===this.options.icons?Math.max(this.options.iconWidth,s)+this.options.labelOffsetX+15:s+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-r&&!0===this.options.visible?(this.width=this.maxLabelSize+r,this.options.width=`${this.width}px`,Bs(this.DOMelements.lines),Bs(this.DOMelements.labels),this.redraw(),t=!0):this.maxLabelSize<this.width-r&&!0===this.options.visible&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+r),this.options.width=`${this.width}px`,Bs(this.DOMelements.lines),Bs(this.DOMelements.labels),this.redraw(),t=!0):(Bs(this.DOMelements.lines),Bs(this.DOMelements.labels),t=!1),t}convertValue(t){return this.scale.convertValue(t)}screenToValue(t){return this.scale.screenToValue(t)}_redrawLabel(t,e,i,n,o){const s=Us("div",this.DOMelements.labels,this.dom.frame);s.className=n,s.innerHTML=yo.xss(e),"left"===i?(s.style.left=`-${this.options.labelOffsetX}px`,s.style.textAlign="right"):(s.style.right=`-${this.options.labelOffsetX}px`,s.style.textAlign="left"),s.style.top=`${t-.5*o+this.options.labelOffsetY}px`,e+="";const r=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*r&&(this.maxLabelSize=e.length*r)}_redrawLine(t,e,i,n,o){if(!0===this.master){const s=Us("div",this.DOMelements.lines,this.dom.lineContainer);s.className=i,s.innerHTML="","left"===e?s.style.left=this.width-n+"px":s.style.right=this.width-n+"px",s.style.width=`${o}px`,s.style.top=`${t}px`}}_redrawTitle(t){if(Ws(this.DOMelements.title),void 0!==this.options[t].title&&void 0!==this.options[t].title.text){const e=Us("div",this.DOMelements.title,this.dom.frame);e.className=`vis-y-axis vis-title vis-${t}`,e.innerHTML=yo.xss(this.options[t].title.text),void 0!==this.options[t].title.style&&yo.addCssText(e,this.options[t].title.style),"left"===t?e.style.left=`${this.props.titleCharHeight}px`:e.style.right=`${this.props.titleCharHeight}px`,e.style.width=`${this.height}px`}Bs(this.DOMelements.title)}_calculateCharSize(){if(!("minorCharHeight"in this.props)){const 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)){const t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-major vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.majorCharHeight=e.clientHeight,this.props.majorCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}if(!("titleCharHeight"in this.props)){const t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-title vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.titleCharHeight=e.clientHeight,this.props.titleCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}}}function Zs(t,e){}function Ks(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 Js(t,e){}function tr(t,e){}function er(t,e,i,n){this.id=e;this.options=yo.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 ir(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=yo.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)}Zs.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),s=0;s<t.length;s++)if(o){var r=o(t[s],e);!0!==r&&"object"!=typeof r||$s(t[s].screen_x+n,t[s].screen_y,Ks(e,r),i.svgElements,i.svg,t[s].label)}else $s(t[s].screen_x+n,t[s].screen_y,Ks(e),i.svgElements,i.svg,t[s].label)},Zs.drawIcon=function(t,e,i,n,o,s){var r=.5*o,a=Vs("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline"),$s(e+.5*n,i,Ks(t),s.svgElements,s.svg)},Js.drawIcon=function(t,e,i,n,o,s){var r=.5*o,a=Vs("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline");var h=Math.round(.3*n),l=t.options.barChart.width/h,d=Math.round(.4*o),c=Math.round(.75*o),u=Math.round((n-2*h)/3);if(qs(e+.5*h+u,i+r-d-1,h,d,t.className+" vis-bar",s.svgElements,s.svg,t.style),qs(e+1.5*h+u+2,i+r-c-1,h,c,t.className+" vis-bar",s.svgElements,s.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/l,className:t.className};$s(e+.5*h+u,i+r-d-1,p,s.svgElements,s.svg),$s(e+1.5*h+u+2,i+r-c-1,p,s.svgElements,s.svg)}},Js.draw=function(t,e,i){var n,o,s,r,a,h,l=[],d={},c=0;for(a=0;a<t.length;a++)if("bar"===(r=i.groups[t[a]]).options.style&&!0===r.visible&&(void 0===i.options.groups.visibility[t[a]]||!0===i.options.groups.visibility[t[a]]))for(h=0;h<e[t[a]].length;h++)l.push({screen_x:e[t[a]][h].screen_x,screen_end:e[t[a]][h].screen_end,screen_y:e[t[a]][h].screen_y,x:e[t[a]][h].x,end:e[t[a]][h].end,y:e[t[a]][h].y,groupId:t[a],label:e[t[a]][h].label}),c+=1;if(0!==c)for(l.sort((function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x})),Js._getDataIntersections(d,l),a=0;a<l.length;a++){var u=null!=(r=i.groups[l[a].groupId]).options.barChart.minWidth?r.options.barChart.minWidth:.1*r.options.barChart.width,p=0;if(void 0===d[o=l[a].screen_x])a+1<l.length&&(n=Math.abs(l[a+1].screen_x-o)),s=Js._getSafeDrawData(n,r,u);else{var m=a+(d[o].amount-d[o].resolved);m<l.length&&(n=Math.abs(l[m].screen_x-o)),s=Js._getSafeDrawData(n,r,u),d[o].resolved+=1,!0===r.options.stack&&!0!==r.options.excludeFromStacking?l[a].screen_y<r.zeroPosition?(p=d[o].accumulatedNegative,d[o].accumulatedNegative+=r.zeroPosition-l[a].screen_y):(p=d[o].accumulatedPositive,d[o].accumulatedPositive+=r.zeroPosition-l[a].screen_y):!0===r.options.barChart.sideBySide&&(s.width=s.width/d[o].amount,s.offset+=d[o].resolved*s.width-.5*s.width*(d[o].amount+1))}let t=s.width,e=l[a].screen_x;if(null!=l[a].screen_end?(t=l[a].screen_end-l[a].screen_x,e+=.5*t):e+=s.offset,qs(e,l[a].screen_y-p,t,r.zeroPosition-l[a].screen_y,r.className+" vis-bar",i.svgElements,i.svg,r.style),!0===r.options.drawPoints.enabled){let t={screen_x:l[a].screen_x,screen_y:l[a].screen_y-p,x:l[a].x,y:l[a].y,groupId:l[a].groupId,label:l[a].label};Zs.draw([t],r,i,s.offset)}}},Js._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)},Js._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}},Js.getStackedYRange=function(t,e,i,n,o){if(t.length>0){t.sort((function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x}));var s={};Js._getDataIntersections(s,t),e[n]=Js._getStackedYRange(s,t),e[n].yAxisOrientation=o,i.push(n)}},Js._getStackedYRange=function(t,e){for(var i,n=e[0].screen_y,o=e[0].screen_y,s=0;s<e.length;s++)void 0===t[i=e[s].screen_x]?(n=n>e[s].screen_y?e[s].screen_y:n,o=o<e[s].screen_y?e[s].screen_y:o):e[s].screen_y<0?t[i].accumulatedNegative+=e[s].screen_y:t[i].accumulatedPositive+=e[s].screen_y;for(var r in t)t.hasOwnProperty(r)&&(n=(n=n>t[r].accumulatedNegative?t[r].accumulatedNegative:n)>t[r].accumulatedPositive?t[r].accumulatedPositive:n,o=(o=o<t[r].accumulatedNegative?t[r].accumulatedNegative:o)<t[r].accumulatedPositive?t[r].accumulatedPositive:o);return{min:n,max:o}},tr.calcPath=function(t,e){if(null!=t&&t.length>0){return 1==e.options.interpolation.enabled?tr._catmullRom(t,e):tr._linear(t)}},tr.drawIcon=function(t,e,i,n,o,s){var r,a,h=.5*o,l=Vs("rect",s.svgElements,s.svg);(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-h),l.setAttributeNS(null,"width",n),l.setAttributeNS(null,"height",2*h),l.setAttributeNS(null,"class","vis-outline"),(r=Vs("path",s.svgElements,s.svg)).setAttributeNS(null,"class",t.className),void 0!==t.style&&r.setAttributeNS(null,"style",t.style),r.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+n)+","+i),1==t.options.shaded.enabled&&(a=Vs("path",s.svgElements,s.svg),"top"==t.options.shaded.orientation?a.setAttributeNS(null,"d","M"+e+", "+(i-h)+"L"+e+","+i+" L"+(e+n)+","+i+" L"+(e+n)+","+(i-h)):a.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+h)+" L"+(e+n)+","+(i+h)+"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)&&$s(e+.5*n,i,{style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className},s.svgElements,s.svg)},tr.drawShading=function(t,e,i,n){if(1==e.options.shaded.enabled){var o,s=Number(n.svg.style.height.replace("px","")),r=Vs("path",n.svgElements,n.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h=0;h="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),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"+h+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",o)}},tr.draw=function(t,e,i){if(null!=t&&null!=t){var n=Vs("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))}},tr.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},tr._catmullRomUniform=function(t){var e,i,n,o,s,r,a=[];a.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var h=1/6,l=t.length,d=0;d<l-1;d++)e=0==d?t[0]:t[d-1],i=t[d],n=t[d+1],o=d+2<l?t[d+2]:n,s={screen_x:(-e.screen_x+6*i.screen_x+n.screen_x)*h,screen_y:(-e.screen_y+6*i.screen_y+n.screen_y)*h},r={screen_x:(i.screen_x+6*n.screen_x-o.screen_x)*h,screen_y:(i.screen_y+6*n.screen_y-o.screen_y)*h},a.push([s.screen_x,s.screen_y]),a.push([r.screen_x,r.screen_y]),a.push([n.screen_x,n.screen_y]);return a},tr._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var n,o,s,r,a,h,l,d,c,u,p,m,f,g,v,y,b,w,_,x=[];x.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var k=t.length,S=0;S<k-1;S++)n=0==S?t[0]:t[S-1],o=t[S],s=t[S+1],r=S+2<k?t[S+2]:s,l=Math.sqrt(Math.pow(n.screen_x-o.screen_x,2)+Math.pow(n.screen_y-o.screen_y,2)),d=Math.sqrt(Math.pow(o.screen_x-s.screen_x,2)+Math.pow(o.screen_y-s.screen_y,2)),c=Math.sqrt(Math.pow(s.screen_x-r.screen_x,2)+Math.pow(s.screen_y-r.screen_y,2)),g=Math.pow(c,i),y=Math.pow(c,2*i),v=Math.pow(d,i),b=Math.pow(d,2*i),_=Math.pow(l,i),u=2*(w=Math.pow(l,2*i))+3*_*v+b,p=2*y+3*g*v+b,(m=3*_*(_+v))>0&&(m=1/m),(f=3*g*(g+v))>0&&(f=1/f),a={screen_x:(-b*n.screen_x+u*o.screen_x+w*s.screen_x)*m,screen_y:(-b*n.screen_y+u*o.screen_y+w*s.screen_y)*m},h={screen_x:(y*o.screen_x+p*s.screen_x-b*r.screen_x)*f,screen_y:(y*o.screen_y+p*s.screen_y-b*r.screen_y)*f},0==a.screen_x&&0==a.screen_y&&(a=o),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},tr._linear=function(t){for(var e=[],i=0;i<t.length;i++)e.push([t[i].screen_x,t[i].screen_y]);return e},er.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==this.options.sort&&yo.insertSort(this.itemsData,(function(t,e){return t.x>e.x?1:-1}))):this.itemsData=[]},er.prototype.getItems=function(){return this.itemsData},er.prototype.setZeroPosition=function(t){this.zeroPosition=t},er.prototype.setOptions=function(t){if(void 0!==t){yo.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),yo.mergeOptions(this.options,t,"interpolation"),yo.mergeOptions(this.options,t,"drawPoints"),yo.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==typeof 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))}},er.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)},er.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":tr.drawIcon(this,n,o,t,e,i);break;case"points":case"point":Zs.drawIcon(this,n,o,t,e,i);break;case"bar":Js.drawIcon(this,n,o,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},er.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}},ir.prototype=new bo,ir.prototype.clear=function(){this.groups={},this.amountOfGroups=0},ir.prototype.addGroup=function(t,e){1!=e.options.excludeFromLegend&&(this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1)},ir.prototype.updateGroup=function(t,e){this.groups[t]=e},ir.prototype.removeGroup=function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)},ir.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)},ir.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},ir.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},ir.prototype.setOptions=function(t){yo.selectiveDeepExtend(["enabled","orientation","icons","left","right"],this.options,t)},ir.prototype.redraw=function(){var t=0,e=Object.keys(this.groups);e.sort((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 s="";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]||(s+=this.groups[n].content+"<br />");this.dom.textArea.innerHTML=yo.xss(s),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},ir.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Object.keys(this.groups);t.sort((function(t,e){return t<e?-1:1})),Ws(l=this.svgElements),Bs(l),Ws(l);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),n=i,o=this.options.iconSize,s=.75*this.options.iconSize,r=i+.5*s+3;this.svg.style.width=o+5+i+"px";for(var a=0;a<t.length;a++){var h=t[a];1!=this.groups[h].visible||void 0!==this.linegraphOptions.visibility[h]&&1!=this.linegraphOptions.visibility[h]||(this.groups[h].getLegend(o,s,this.framework,n,r),r+=s+this.options.iconSpacing)}}var l};var nr="__ungrouped__";function or(t,e){this.id=Wi(),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=yo.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.svg.style.left=yo.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}}or.prototype=new bo,or.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 Qs(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new Qs(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new ir(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new ir(this.body,this.options.legend,"right",this.options.groups),this.show()},or.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&&parseInt((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),yo.selectiveDeepExtend(["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"],this.options,t),yo.mergeOptions(this.options,t,"interpolation"),yo.mergeOptions(this.options,t,"drawPoints"),yo.mergeOptions(this.options,t,"shaded"),yo.mergeOptions(this.options,t,"legend"),t.interpolation&&"object"==typeof 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(nr)&&this.groups[nr].setOptions(t)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0}))},or.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},or.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},or.prototype.setItems=function(t){var e,i=this,n=this.itemsData;if(t){if(!lo(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=mo(t)}else this.itemsData=null;if(n&&(yo.forEach(this.itemListeners,(function(t,e){n.off(e,t)})),n.dispose(),e=n.getIds(),this._onRemove(e)),this.itemsData){var o=this.id;yo.forEach(this.itemListeners,(function(t,e){i.itemsData.on(e,t,o)})),e=this.itemsData.getIds(),this._onAdd(e)}},or.prototype.setGroups=function(t){var e,i=this;if(this.groupsData){yo.forEach(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(!lo(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;yo.forEach(this.groupListeners,(function(t,e){i.groupsData.on(e,t,o)})),e=this.groupsData.getIds(),this._onAddGroups(e)}},or.prototype._onUpdate=function(t){this._updateAllGroupData(t)},or.prototype._onAdd=function(t){this._onUpdate(t)},or.prototype._onRemove=function(t){this._onUpdate(t)},or.prototype._onUpdateGroups=function(t){this._updateAllGroupData(null,t)},or.prototype._onAddGroups=function(t){this._onUpdateGroups(t)},or.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})},or.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])},or.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 er(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()},or.prototype._updateAllGroupData=function(t,e){if(null!=this.itemsData){var i={},n=this.itemsData.get(),o=this.itemsData.idProp,s={};t&&t.map((function(t){s[t]=t}));for(var r={},a=0;a<n.length;a++){var h=n[a],l=h.group;null==l&&(l=nr),r.hasOwnProperty(l)?r[l]++:r[l]=1}var d={};if(!e&&t)for(l in this.groups)if(this.groups.hasOwnProperty(l)){var c=(f=this.groups[l]).getItems();i[l]=c.filter((function(t){return d[t[o]]=t[o],t[o]!==s[t[o]]}));var u=r[l];r[l]-=i[l].length,i[l].length<u&&(i[l][u-1]={})}for(a=0;a<n.length;a++)if(null==(l=(h=n[a]).group)&&(l=nr),e||!t||h[o]===s[h[o]]||!d.hasOwnProperty(h[o])){i.hasOwnProperty(l)||(i[l]=new Array(r[l]));var p=yo.bridgeObject(h);p.x=yo.convert(h.x,"Date"),p.end=yo.convert(h.end,"Date"),p.orginalY=h.y,p.y=Number(h.y),p[o]=h[o];var m=i[l].length-r[l]--;i[l][m]=p}for(l in this.groups)this.groups.hasOwnProperty(l)&&(i.hasOwnProperty(l)||(i[l]=new Array(0)));for(l in i)if(i.hasOwnProperty(l))if(0==i[l].length)this.groups.hasOwnProperty(l)&&this._removeGroup(l);else{var f=void 0;null!=this.groupsData&&(f=this.groupsData.get(l)),null==f&&(f={id:l,content:this.options.defaultGroup+l}),this._updateGroup(f,l),this.groups[l].setItems(i[l])}this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})}},or.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=this.body.range.end-this.body.range.start,i=e!=this.lastVisibleInterval;if(this.lastVisibleInterval=e,1==t&&(this.svg.style.width=yo.option.asSize(3*this.props.width),this.svg.style.left=yo.option.asSize(-this.props.width),-1==(this.options.height+"").indexOf("%")&&1!=this.updateSVGheightOnResize||(this.updateSVGheight=!0)),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==i||1==this.abortedGraphUpdate||1==this.forceGraphUpdate)t=this._updateGraph()||t,this.forceGraphUpdate=!1,this.lastStart=this.body.range.start,this.svg.style.left=-this.props.width+"px";else if(0!=this.lastStart){var n=this.body.range.start-this.lastStart,o=this.body.range.end-this.body.range.start;if(0!=this.props.width){var s=n*(this.props.width/o);this.svg.style.left=-this.props.width-s+"px"}}return this.legendLeft.redraw(),this.legendRight.redraw(),t},or.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})}yo.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},or.prototype._updateGraph=function(){if(Ws(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),s=this._getSortedGroupIds();if(s.length>0){var r={};for(this._getRelevantData(s,r,n,o),this._applySampling(s,r),e=0;e<s.length;e++)this._convertXcoordinates(r[s[e]]);if(this._getYRanges(s,r,i),1==this._updateYAxis(s,i))return Bs(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var a=void 0;for(e=0;e<s.length;e++)t=this.groups[s[e]],!0===this.options.stack&&"line"===this.options.style&&(null!=t.options.excludeFromStacking&&t.options.excludeFromStacking||(null!=a&&(this._stack(r[t.id],r[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(r[s[e]],t);var h={};for(e=0;e<s.length;e++)if("line"===(t=this.groups[s[e]]).options.style&&1==t.options.shaded.enabled){var l=r[s[e]];if(null==l||0==l.length)continue;if(h.hasOwnProperty(s[e])||(h[s[e]]=tr.calcPath(l,t)),"group"===t.options.shaded.orientation){var d=t.options.shaded.groupId;if(-1===s.indexOf(d)){console.log(t.id+": Unknown shading group target given:"+d);continue}h.hasOwnProperty(d)||(h[d]=tr.calcPath(r[d],this.groups[d])),tr.drawShading(h[s[e]],t,h[d],this.framework)}else tr.drawShading(h[s[e]],t,void 0,this.framework)}for(Js.draw(s,r,this.framework),e=0;e<s.length;e++)if(t=this.groups[s[e]],r[s[e]].length>0)switch(t.options.style){case"line":h.hasOwnProperty(s[e])||(h[s[e]]=tr.calcPath(r[s[e]],t)),tr.draw(h[s[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||Zs.draw(r[s[e]],t,this.framework)}}}return Bs(this.svgElements),!1},or.prototype._stack=function(t,e){var i,n,o,s,r;i=0;for(var a=0;a<t.length;a++){s=void 0,r=void 0;for(var h=i;h<e.length;h++){if(e[h].x===t[a].x){s=e[h],r=e[h],i=h;break}if(e[h].x>t[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),n=r.x-s.x,o=r.y-s.y,t[a].y=0==n?t[a].orginalY+r.y:t[a].orginalY+o/n*(t[a].x-s.x)+s.y}},or.prototype._getRelevantData=function(t,e,i,n){var o,s,r,a;if(t.length>0)for(s=0;s<t.length;s++){var h=(o=this.groups[t[s]]).getItems();if(1==o.options.sort){var l=function(t,e){return t.getTime()==e.getTime()?0:t<e?-1:1},d=Math.max(0,yo.binarySearchValue(h,i,"x","before",l)),c=Math.min(h.length,yo.binarySearchValue(h,n,"x","after",l)+1);c<=0&&(c=h.length);var u=new Array(c-d);for(r=d;r<c;r++)a=o.itemsData[r],u[r-d]=a;e[t[s]]=u}else e[t[s]]=o.itemsData}},or.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,s=n.length,r=s/(this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x));o=Math.min(Math.ceil(.2*s),Math.max(1,Math.round(r)));for(var a=new Array(s),h=0;h<s;h+=o){a[Math.round(h/o)]=n[h]}e[t[i]]=a.splice(0,Math.round(s/o))}}},or.prototype._getYRanges=function(t,e,i){var n,o,s,r,a=[],h=[];if(t.length>0){for(s=0;s<t.length;s++)n=e[t[s]],r=this.groups[t[s]].options,n.length>0&&(o=this.groups[t[s]],!0===r.stack&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(n):h=h.concat(n):i[t[s]]=o.getYRange(n,t[s]));Js.getStackedYRange(a,i,t,"__barStackLeft","left"),Js.getStackedYRange(h,i,t,"__barStackRight","right")}},or.prototype._updateYAxis=function(t,e){var i,n,o=!1,s=!1,r=!1,a=1e9,h=1e9,l=-1e9,d=-1e9;if(t.length>0){for(var c=0;c<t.length;c++){var u=this.groups[t[c]];u&&"right"!=u.options.yAxisOrientation?(s=!0,a=1e9,l=-1e9):u&&u.options.yAxisOrientation&&(r=!0,h=1e9,d=-1e9)}for(c=0;c<t.length;c++)e.hasOwnProperty(t[c])&&!0!==e[t[c]].ignore&&(i=e[t[c]].min,n=e[t[c]].max,"right"!=e[t[c]].yAxisOrientation?(s=!0,a=a>i?i:a,l=l<n?n:l):(r=!0,h=h>i?i:h,d=d<n?n:d));1==s&&this.yAxisLeft.setRange(a,l),1==r&&this.yAxisRight.setRange(h,d)}o=this._toggleAxisVisiblity(s,this.yAxisLeft)||o,o=this._toggleAxisVisiblity(r,this.yAxisRight)||o,1==r&&1==s?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!s,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(this.yAxisLeft.lineOffset=1==r?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(c=0;c<p.length;c++)-1!=t.indexOf(p[c])&&t.splice(t.indexOf(p[c]),1);return o},or.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},or.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},or.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)))};let sr="string",rr="boolean",ar="number",hr="date",lr="object",dr="moment",cr={configure:{enabled:{boolean:rr},filter:{boolean:rr,function:"function"},container:{dom:"dom"},__type__:{object:lr,boolean:rr,function:"function"}},alignCurrentTime:{string:sr,undefined:"undefined"},yAxisOrientation:{string:["left","right"]},defaultGroup:{string:sr},sort:{boolean:rr},sampling:{boolean:rr},stack:{boolean:rr},graphHeight:{string:sr,number:ar},shaded:{enabled:{boolean:rr},orientation:{string:["bottom","top","zero","group"]},groupId:{object:lr},__type__:{boolean:rr,object:lr}},style:{string:["line","bar","points"]},barChart:{width:{number:ar},minWidth:{number:ar},sideBySide:{boolean:rr},align:{string:["left","center","right"]},__type__:{object:lr}},interpolation:{enabled:{boolean:rr},parametrization:{string:["centripetal","chordal","uniform"]},alpha:{number:ar},__type__:{object:lr,boolean:rr}},drawPoints:{enabled:{boolean:rr},onRender:{function:"function"},size:{number:ar},style:{string:["square","circle"]},__type__:{object:lr,boolean:rr,function:"function"}},dataAxis:{showMinorLabels:{boolean:rr},showMajorLabels:{boolean:rr},showWeekScale:{boolean:rr},icons:{boolean:rr},width:{string:sr,number:ar},visible:{boolean:rr},alignZeros:{boolean:rr},left:{range:{min:{number:ar,undefined:"undefined"},max:{number:ar,undefined:"undefined"},__type__:{object:lr}},format:{function:"function"},title:{text:{string:sr,number:ar,undefined:"undefined"},style:{string:sr,undefined:"undefined"},__type__:{object:lr}},__type__:{object:lr}},right:{range:{min:{number:ar,undefined:"undefined"},max:{number:ar,undefined:"undefined"},__type__:{object:lr}},format:{function:"function"},title:{text:{string:sr,number:ar,undefined:"undefined"},style:{string:sr,undefined:"undefined"},__type__:{object:lr}},__type__:{object:lr}},__type__:{object:lr}},legend:{enabled:{boolean:rr},icons:{boolean:rr},left:{visible:{boolean:rr},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:lr}},right:{visible:{boolean:rr},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:lr}},__type__:{object:lr,boolean:rr}},groups:{visibility:{any:"any"},__type__:{object:lr}},autoResize:{boolean:rr},throttleRedraw:{number:ar},clickToUse:{boolean:rr},end:{number:ar,date:hr,string:sr,moment:dr},format:{minorLabels:{millisecond:{string:sr,undefined:"undefined"},second:{string:sr,undefined:"undefined"},minute:{string:sr,undefined:"undefined"},hour:{string:sr,undefined:"undefined"},weekday:{string:sr,undefined:"undefined"},day:{string:sr,undefined:"undefined"},week:{string:sr,undefined:"undefined"},month:{string:sr,undefined:"undefined"},quarter:{string:sr,undefined:"undefined"},year:{string:sr,undefined:"undefined"},__type__:{object:lr}},majorLabels:{millisecond:{string:sr,undefined:"undefined"},second:{string:sr,undefined:"undefined"},minute:{string:sr,undefined:"undefined"},hour:{string:sr,undefined:"undefined"},weekday:{string:sr,undefined:"undefined"},day:{string:sr,undefined:"undefined"},week:{string:sr,undefined:"undefined"},month:{string:sr,undefined:"undefined"},quarter:{string:sr,undefined:"undefined"},year:{string:sr,undefined:"undefined"},__type__:{object:lr}},__type__:{object:lr}},moment:{function:"function"},height:{string:sr,number:ar},hiddenDates:{start:{date:hr,number:ar,string:sr,moment:dr},end:{date:hr,number:ar,string:sr,moment:dr},repeat:{string:sr},__type__:{object:lr,array:"array"}},locale:{string:sr},locales:{__any__:{any:"any"},__type__:{object:lr}},max:{date:hr,number:ar,string:sr,moment:dr},maxHeight:{number:ar,string:sr},maxMinorChars:{number:ar},min:{date:hr,number:ar,string:sr,moment:dr},minHeight:{number:ar,string:sr},moveable:{boolean:rr},multiselect:{boolean:rr},orientation:{string:sr},showCurrentTime:{boolean:rr},showMajorLabels:{boolean:rr},showMinorLabels:{boolean:rr},showWeekScale:{boolean:rr},snap:{function:"function",null:"null"},start:{date:hr,number:ar,string:sr,moment:dr},timeAxis:{scale:{string:sr,undefined:"undefined"},step:{number:ar,undefined:"undefined"},__type__:{object:lr}},width:{string:sr,number:ar},zoomable:{boolean:rr},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:ar},zoomMin:{number:ar},zIndex:{number:ar},__type__:{object:lr}},ur={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 pr(t,e,i,n){if(!Array.isArray(i)&&!lo(i)&&i instanceof Object){var o=n;n=i,i=o}n&&n.throttleRedraw&&console.warn('Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var s=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:ho,width:null,height:null,maxHeight:null,minHeight:null},this.options=yo.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{getScale:()=>s.timeAxis.step.scale,getStep:()=>s.timeAxis.step.step,toScreen:s._toScreen.bind(s),toGlobalScreen:s._toGlobalScreen.bind(s),toTime:s._toTime.bind(s),toGlobalTime:s._toGlobalTime.bind(s)}},this.range=new Oo(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new Ro(this.body),this.components.push(this.timeAxis),this.currentTime=new es(this.body),this.components.push(this.currentTime),this.linegraph=new or(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",(function(t){s.emit("click",s.getEventProperties(t))})),this.on("doubletap",(function(t){s.emit("doubleClick",s.getEventProperties(t))})),this.dom.root.oncontextmenu=function(t){s.emit("contextmenu",s.getEventProperties(t))},this.initialFitDone=!1,this.on("changed",(function(){if(null!=s.itemsData){if(!s.initialFitDone&&!s.options.rollingMode)if(s.initialFitDone=!0,null!=s.options.start||null!=s.options.end){if(null==s.options.start||null==s.options.end)var t=s.getItemRange();var e=null!=s.options.start?s.options.start:t.min,i=null!=s.options.end?s.options.end:t.max;s.setWindow(e,i,{animation:!1})}else s.fit({animation:!1});s.initialDrawDone||!s.initialRangeChangeDone&&(s.options.start||s.options.end)&&!s.options.rollingMode||(s.initialDrawDone=!0,s.dom.root.style.visibility="visible",s.dom.loadingScreen.parentNode.removeChild(s.dom.loadingScreen),s.options.onInitialDrawComplete&&setTimeout((()=>s.options.onInitialDrawComplete()),0))}})),n&&this.setOptions(n),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}pr.prototype=new ts,pr.prototype.setOptions=function(t){!0===Cs.validate(t,cr)&&console.log("%cErrors have been found in the supplied options object.",Ds),ts.prototype.setOptions.call(this,t)},pr.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?lo(t)?mo(t):mo(new Qi(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})},pr.prototype.setGroups=function(t){var e;e=t?lo(t)?t:new Qi(t):null,this.groupsData=e,this.linegraph.setGroups(e)},pr.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+"'"},pr.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]))},pr.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],s=yo.convert(o.x,"Date").valueOf();t=null==t||t>s?s:t,e=null==e||e<s?s:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},pr.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=e-yo.getAbsoluteLeft(this.dom.centerContainer),o=i-yo.getAbsoluteTop(this.dom.centerContainer),s=this._toTime(n),r=Jo.customTimeFromTarget(t),a=yo.getTarget(t),h=null;yo.hasParent(a,this.timeAxis.dom.foreground)||this.timeAxis2&&yo.hasParent(a,this.timeAxis2.dom.foreground)?h="axis":yo.hasParent(a,this.linegraph.yAxisLeft.dom.frame)||yo.hasParent(a,this.linegraph.yAxisRight.dom.frame)?h="data-axis":yo.hasParent(a,this.linegraph.legendLeft.dom.frame)||yo.hasParent(a,this.linegraph.legendRight.dom.frame)?h="legend":null!=r?h="custom-time":yo.hasParent(a,this.currentTime.bar)?h="current-time":yo.hasParent(a,this.dom.center)&&(h="background");var l=[],d=this.linegraph.yAxisLeft,c=this.linegraph.yAxisRight;return!d.hidden&&this.itemsData.length>0&&l.push(d.screenToValue(o)),!c.hidden&&this.itemsData.length>0&&l.push(c.screenToValue(o)),{event:t,customTime:r?r.options.id:null,what:h,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:n,y:o,time:s,value:l}},pr.prototype._createConfigurator=function(){return new js(this,this.dom.container,ur)};const mr=function(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch(t){return"en"}}();en.locale(mr);const fr=t=>{const e=new Date;return t>e?e:t},gr=(e,i)=>{let n,s;return(e.end.getTime()-e.start.getTime())/1e3<=3600?(n=z(e.start),s=H(e.end)):(n=o(e.start),s=G(e.end)),i?.endCap&&(s=function(e){const i=t(e);return i.setSeconds(59,999),i}(fr(s))),{start:n,end:s}};var vr={exports:{}};
|
||
/**
|
||
* vis-data
|
||
* http://visjs.org/
|
||
*
|
||
* Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
|
||
*
|
||
* @version 7.1.9
|
||
* @date 2023-11-24T17:53:34.179Z
|
||
*
|
||
* @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){function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s={exports:{}},r=function(t){return t&&t.Math===Math&&t},a=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof i&&i)||function(){return this}()||i||Function("return this")(),h=function(t){try{return!!t()}catch(t){return!0}},l=!h((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),d=l,c=Function.prototype,u=c.apply,p=c.call,m="object"==typeof Reflect&&Reflect.apply||(d?p.bind(u):function(){return p.apply(u,arguments)}),f=l,g=Function.prototype,v=g.call,y=f&&g.bind.bind(v,v),b=f?y:function(t){return function(){return v.apply(t,arguments)}},w=b,_=w({}.toString),x=w("".slice),k=function(t){return x(_(t),8,-1)},S=k,D=b,C=function(t){if("Function"===S(t))return D(t)},T="object"==typeof document&&document.all,E={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},O=E.all,M=E.IS_HTMLDDA?function(t){return"function"==typeof t||t===O}:function(t){return"function"==typeof t},P={},I=!h((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),A=l,N=Function.prototype.call,R=A?N.bind(N):function(){return N.apply(N,arguments)},F={},L={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,Y=j&&!L.call({1:2},1);F.f=Y?function(t){var e=j(this,t);return!!e&&e.enumerable}:L;var z,H,G=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},W=h,B=k,V=Object,U=b("".split),$=W((function(){return!V("z").propertyIsEnumerable(0)}))?function(t){return"String"===B(t)?U(t,""):V(t)}:V,q=function(t){return null==t},X=q,Q=TypeError,Z=function(t){if(X(t))throw new Q("Can't call method on "+t);return t},K=$,J=Z,tt=function(t){return K(J(t))},et=M,it=E.all,nt=E.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:et(t)||t===it}:function(t){return"object"==typeof t?null!==t:et(t)},ot={},st=ot,rt=a,at=M,ht=function(t){return at(t)?t:void 0},lt=function(t,e){return arguments.length<2?ht(st[t])||ht(rt[t]):st[t]&&st[t][e]||rt[t]&&rt[t][e]},dt=b({}.isPrototypeOf),ct="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ut=a,pt=ct,mt=ut.process,ft=ut.Deno,gt=mt&&mt.versions||ft&&ft.version,vt=gt&>.v8;vt&&(H=(z=vt.split("."))[0]>0&&z[0]<4?1:+(z[0]+z[1])),!H&&pt&&(!(z=pt.match(/Edge\/(\d+)/))||z[1]>=74)&&(z=pt.match(/Chrome\/(\d+)/))&&(H=+z[1]);var yt=H,bt=yt,wt=h,_t=a.String,xt=!!Object.getOwnPropertySymbols&&!wt((function(){var t=Symbol("symbol detection");return!_t(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&bt&&bt<41})),kt=xt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,St=lt,Dt=M,Ct=dt,Tt=Object,Et=kt?function(t){return"symbol"==typeof t}:function(t){var e=St("Symbol");return Dt(e)&&Ct(e.prototype,Tt(t))},Ot=String,Mt=function(t){try{return Ot(t)}catch(t){return"Object"}},Pt=M,It=Mt,At=TypeError,Nt=function(t){if(Pt(t))return t;throw new At(It(t)+" is not a function")},Rt=Nt,Ft=q,Lt=function(t,e){var i=t[e];return Ft(i)?void 0:Rt(i)},jt=R,Yt=M,zt=nt,Ht=TypeError,Gt={exports:{}},Wt=a,Bt=Object.defineProperty,Vt=function(t,e){try{Bt(Wt,t,{value:e,configurable:!0,writable:!0})}catch(i){Wt[t]=e}return e},Ut="__core-js_shared__",$t=a[Ut]||Vt(Ut,{}),qt=$t;(Gt.exports=function(t,e){return qt[t]||(qt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Xt=Gt.exports,Qt=Z,Zt=Object,Kt=function(t){return Zt(Qt(t))},Jt=Kt,te=b({}.hasOwnProperty),ee=Object.hasOwn||function(t,e){return te(Jt(t),e)},ie=b,ne=0,oe=Math.random(),se=ie(1..toString),re=function(t){return"Symbol("+(void 0===t?"":t)+")_"+se(++ne+oe,36)},ae=Xt,he=ee,le=re,de=xt,ce=kt,ue=a.Symbol,pe=ae("wks"),me=ce?ue.for||ue:ue&&ue.withoutSetter||le,fe=function(t){return he(pe,t)||(pe[t]=de&&he(ue,t)?ue[t]:me("Symbol."+t)),pe[t]},ge=R,ve=nt,ye=Et,be=Lt,we=function(t,e){var i,n;if("string"===e&&Yt(i=t.toString)&&!zt(n=jt(i,t)))return n;if(Yt(i=t.valueOf)&&!zt(n=jt(i,t)))return n;if("string"!==e&&Yt(i=t.toString)&&!zt(n=jt(i,t)))return n;throw new Ht("Can't convert object to primitive value")},_e=TypeError,xe=fe("toPrimitive"),ke=function(t,e){if(!ve(t)||ye(t))return t;var i,n=be(t,xe);if(n){if(void 0===e&&(e="default"),i=ge(n,t,e),!ve(i)||ye(i))return i;throw new _e("Can't convert object to primitive value")}return void 0===e&&(e="number"),we(t,e)},Se=Et,De=function(t){var e=ke(t,"string");return Se(e)?e:e+""},Ce=nt,Te=a.document,Ee=Ce(Te)&&Ce(Te.createElement),Oe=function(t){return Ee?Te.createElement(t):{}},Me=Oe,Pe=!I&&!h((function(){return 7!==Object.defineProperty(Me("div"),"a",{get:function(){return 7}}).a})),Ie=I,Ae=R,Ne=F,Re=G,Fe=tt,Le=De,je=ee,Ye=Pe,ze=Object.getOwnPropertyDescriptor;P.f=Ie?ze:function(t,e){if(t=Fe(t),e=Le(e),Ye)try{return ze(t,e)}catch(t){}if(je(t,e))return Re(!Ae(Ne.f,t,e),t[e])};var He=h,Ge=M,We=/#|\.prototype\./,Be=function(t,e){var i=Ue[Ve(t)];return i===qe||i!==$e&&(Ge(e)?He(e):!!e)},Ve=Be.normalize=function(t){return String(t).replace(We,".").toLowerCase()},Ue=Be.data={},$e=Be.NATIVE="N",qe=Be.POLYFILL="P",Xe=Be,Qe=Nt,Ze=l,Ke=C(C.bind),Je=function(t,e){return Qe(t),void 0===e?t:Ze?Ke(t,e):function(){return t.apply(e,arguments)}},ti={},ei=I&&h((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ii=nt,ni=String,oi=TypeError,si=function(t){if(ii(t))return t;throw new oi(ni(t)+" is not an object")},ri=I,ai=Pe,hi=ei,li=si,di=De,ci=TypeError,ui=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,mi="enumerable",fi="configurable",gi="writable";ti.f=ri?hi?function(t,e,i){if(li(t),e=di(e),li(i),"function"==typeof t&&"prototype"===e&&"value"in i&&gi in i&&!i[gi]){var n=pi(t,e);n&&n[gi]&&(t[e]=i.value,i={configurable:fi in i?i[fi]:n[fi],enumerable:mi in i?i[mi]:n[mi],writable:!1})}return ui(t,e,i)}:ui:function(t,e,i){if(li(t),e=di(e),li(i),ai)try{return ui(t,e,i)}catch(t){}if("get"in i||"set"in i)throw new ci("Accessors not supported");return"value"in i&&(t[e]=i.value),t};var vi=ti,yi=G,bi=I?function(t,e,i){return vi.f(t,e,yi(1,i))}:function(t,e,i){return t[e]=i,t},wi=a,_i=m,xi=C,ki=M,Si=P.f,Di=Xe,Ci=ot,Ti=Je,Ei=bi,Oi=ee,Mi=function(t){var e=function(i,n,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(i);case 2:return new t(i,n)}return new t(i,n,o)}return _i(t,this,arguments)};return e.prototype=t.prototype,e},Pi=function(t,e){var i,n,o,s,r,a,h,l,d,c=t.target,u=t.global,p=t.stat,m=t.proto,f=u?wi:p?wi[c]:(wi[c]||{}).prototype,g=u?Ci:Ci[c]||Ei(Ci,c,{})[c],v=g.prototype;for(s in e)n=!(i=Di(u?s:c+(p?".":"#")+s,t.forced))&&f&&Oi(f,s),a=g[s],n&&(h=t.dontCallGetSet?(d=Si(f,s))&&d.value:f[s]),r=n&&h?h:e[s],n&&typeof a==typeof r||(l=t.bind&&n?Ti(r,wi):t.wrap&&n?Mi(r):m&&ki(r)?xi(r):r,(t.sham||r&&r.sham||a&&a.sham)&&Ei(l,"sham",!0),Ei(g,s,l),m&&(Oi(Ci,o=c+"Prototype")||Ei(Ci,o,{}),Ei(Ci[o],s,r),t.real&&v&&(i||!v[s])&&Ei(v,s,r)))},Ii=Pi,Ai=I,Ni=ti.f;Ii({target:"Object",stat:!0,forced:Object.defineProperty!==Ni,sham:!Ai},{defineProperty:Ni});var Ri=ot.Object,Fi=s.exports=function(t,e,i){return Ri.defineProperty(t,e,i)};Ri.defineProperty.sham&&(Fi.sham=!0);var Li=s.exports,ji=Li,Yi=o(ji),zi=k,Hi=Array.isArray||function(t){return"Array"===zi(t)},Gi=Math.ceil,Wi=Math.floor,Bi=Math.trunc||function(t){var e=+t;return(e>0?Wi:Gi)(e)},Vi=function(t){var e=+t;return e!=e||0===e?0:Bi(e)},Ui=Vi,$i=Math.min,qi=function(t){return t>0?$i(Ui(t),9007199254740991):0},Xi=function(t){return qi(t.length)},Qi=TypeError,Zi=function(t){if(t>9007199254740991)throw Qi("Maximum allowed index exceeded");return t},Ki=De,Ji=ti,tn=G,en=function(t,e,i){var n=Ki(e);n in t?Ji.f(t,n,tn(0,i)):t[n]=i},nn={};nn[fe("toStringTag")]="z";var on="[object z]"===String(nn),sn=on,rn=M,an=k,hn=fe("toStringTag"),ln=Object,dn="Arguments"===an(function(){return arguments}()),cn=sn?an: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=ln(t),hn))?i:dn?an(e):"Object"===(n=an(e))&&rn(e.callee)?"Arguments":n},un=M,pn=$t,mn=b(Function.toString);un(pn.inspectSource)||(pn.inspectSource=function(t){return mn(t)});var fn=pn.inspectSource,gn=b,vn=h,yn=M,bn=cn,wn=fn,_n=function(){},xn=[],kn=lt("Reflect","construct"),Sn=/^\s*(?:class|function)\b/,Dn=gn(Sn.exec),Cn=!Sn.test(_n),Tn=function(t){if(!yn(t))return!1;try{return kn(_n,xn,t),!0}catch(t){return!1}},En=function(t){if(!yn(t))return!1;switch(bn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Cn||!!Dn(Sn,wn(t))}catch(t){return!0}};En.sham=!0;var On=!kn||vn((function(){var t;return Tn(Tn.call)||!Tn(Object)||!Tn((function(){t=!0}))||t}))?En:Tn,Mn=Hi,Pn=On,In=nt,An=fe("species"),Nn=Array,Rn=function(t){var e;return Mn(t)&&(e=t.constructor,(Pn(e)&&(e===Nn||Mn(e.prototype))||In(e)&&null===(e=e[An]))&&(e=void 0)),void 0===e?Nn:e},Fn=function(t,e){return new(Rn(t))(0===e?0:e)},Ln=h,jn=yt,Yn=fe("species"),zn=function(t){return jn>=51||!Ln((function(){var e=[];return(e.constructor={})[Yn]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Hn=Pi,Gn=h,Wn=Hi,Bn=nt,Vn=Kt,Un=Xi,$n=Zi,qn=en,Xn=Fn,Qn=zn,Zn=yt,Kn=fe("isConcatSpreadable"),Jn=Zn>=51||!Gn((function(){var t=[];return t[Kn]=!1,t.concat()[0]!==t})),to=function(t){if(!Bn(t))return!1;var e=t[Kn];return void 0!==e?!!e:Wn(t)};Hn({target:"Array",proto:!0,arity:1,forced:!Jn||!Qn("concat")},{concat:function(t){var e,i,n,o,s,r=Vn(this),a=Xn(r,0),h=0;for(e=-1,n=arguments.length;e<n;e++)if(to(s=-1===e?r:arguments[e]))for(o=Un(s),$n(h+o),i=0;i<o;i++,h++)i in s&&qn(a,h,s[i]);else $n(h+1),qn(a,h++,s);return a.length=h,a}});var eo=cn,io=String,no=function(t){if("Symbol"===eo(t))throw new TypeError("Cannot convert a Symbol value to a string");return io(t)},oo={},so=Vi,ro=Math.max,ao=Math.min,ho=function(t,e){var i=so(t);return i<0?ro(i+e,0):ao(i,e)},lo=tt,co=ho,uo=Xi,po=function(t){return function(e,i,n){var o,s=lo(e),r=uo(s),a=co(n,r);if(t&&i!=i){for(;r>a;)if((o=s[a++])!=o)return!0}else for(;r>a;a++)if((t||a in s)&&s[a]===i)return t||a||0;return!t&&-1}},mo={includes:po(!0),indexOf:po(!1)},fo={},go=ee,vo=tt,yo=mo.indexOf,bo=fo,wo=b([].push),_o=function(t,e){var i,n=vo(t),o=0,s=[];for(i in n)!go(bo,i)&&go(n,i)&&wo(s,i);for(;e.length>o;)go(n,i=e[o++])&&(~yo(s,i)||wo(s,i));return s},xo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ko=_o,So=xo,Do=Object.keys||function(t){return ko(t,So)},Co=I,To=ei,Eo=ti,Oo=si,Mo=tt,Po=Do;oo.f=Co&&!To?Object.defineProperties:function(t,e){Oo(t);for(var i,n=Mo(e),o=Po(e),s=o.length,r=0;s>r;)Eo.f(t,i=o[r++],n[i]);return t};var Io,Ao=lt("document","documentElement"),No=re,Ro=Xt("keys"),Fo=function(t){return Ro[t]||(Ro[t]=No(t))},Lo=si,jo=oo,Yo=xo,zo=fo,Ho=Ao,Go=Oe,Wo="prototype",Bo="script",Vo=Fo("IE_PROTO"),Uo=function(){},$o=function(t){return"<"+Bo+">"+t+"</"+Bo+">"},qo=function(t){t.write($o("")),t.close();var e=t.parentWindow.Object;return t=null,e},Xo=function(){try{Io=new ActiveXObject("htmlfile")}catch(t){}var t,e,i;Xo="undefined"!=typeof document?document.domain&&Io?qo(Io):(e=Go("iframe"),i="java"+Bo+":",e.style.display="none",Ho.appendChild(e),e.src=String(i),(t=e.contentWindow.document).open(),t.write($o("document.F=Object")),t.close(),t.F):qo(Io);for(var n=Yo.length;n--;)delete Xo[Wo][Yo[n]];return Xo()};zo[Vo]=!0;var Qo=Object.create||function(t,e){var i;return null!==t?(Uo[Wo]=Lo(t),i=new Uo,Uo[Wo]=null,i[Vo]=t):i=Xo(),void 0===e?i:jo.f(i,e)},Zo={},Ko=_o,Jo=xo.concat("length","prototype");Zo.f=Object.getOwnPropertyNames||function(t){return Ko(t,Jo)};var ts={},es=ho,is=Xi,ns=en,os=Array,ss=Math.max,rs=function(t,e,i){for(var n=is(t),o=es(e,n),s=es(void 0===i?n:i,n),r=os(ss(s-o,0)),a=0;o<s;o++,a++)ns(r,a,t[o]);return r.length=a,r},as=k,hs=tt,ls=Zo.f,ds=rs,cs="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ts.f=function(t){return cs&&"Window"===as(t)?function(t){try{return ls(t)}catch(t){return ds(cs)}}(t):ls(hs(t))};var us={};us.f=Object.getOwnPropertySymbols;var ps=bi,ms=function(t,e,i,n){return n&&n.enumerable?t[e]=i:ps(t,e,i),t},fs=ti,gs=function(t,e,i){return fs.f(t,e,i)},vs={},ys=fe;vs.f=ys;var bs,ws,_s,xs=ot,ks=ee,Ss=vs,Ds=ti.f,Cs=function(t){var e=xs.Symbol||(xs.Symbol={});ks(e,t)||Ds(e,t,{value:Ss.f(t)})},Ts=R,Es=lt,Os=fe,Ms=ms,Ps=function(){var t=Es("Symbol"),e=t&&t.prototype,i=e&&e.valueOf,n=Os("toPrimitive");e&&!e[n]&&Ms(e,n,(function(t){return Ts(i,this)}),{arity:1})},Is=cn,As=on?{}.toString:function(){return"[object "+Is(this)+"]"},Ns=on,Rs=ti.f,Fs=bi,Ls=ee,js=As,Ys=fe("toStringTag"),zs=function(t,e,i,n){if(t){var o=i?t:t.prototype;Ls(o,Ys)||Rs(o,Ys,{configurable:!0,value:e}),n&&!Ns&&Fs(o,"toString",js)}},Hs=M,Gs=a.WeakMap,Ws=Hs(Gs)&&/native code/.test(String(Gs)),Bs=a,Vs=nt,Us=bi,$s=ee,qs=$t,Xs=Fo,Qs=fo,Zs="Object already initialized",Ks=Bs.TypeError,Js=Bs.WeakMap;if(Ws||qs.state){var tr=qs.state||(qs.state=new Js);tr.get=tr.get,tr.has=tr.has,tr.set=tr.set,bs=function(t,e){if(tr.has(t))throw new Ks(Zs);return e.facade=t,tr.set(t,e),e},ws=function(t){return tr.get(t)||{}},_s=function(t){return tr.has(t)}}else{var er=Xs("state");Qs[er]=!0,bs=function(t,e){if($s(t,er))throw new Ks(Zs);return e.facade=t,Us(t,er,e),e},ws=function(t){return $s(t,er)?t[er]:{}},_s=function(t){return $s(t,er)}}var ir={set:bs,get:ws,has:_s,enforce:function(t){return _s(t)?ws(t):bs(t,{})},getterFor:function(t){return function(e){var i;if(!Vs(e)||(i=ws(e)).type!==t)throw new Ks("Incompatible receiver, "+t+" required");return i}}},nr=Je,or=$,sr=Kt,rr=Xi,ar=Fn,hr=b([].push),lr=function(t){var e=1===t,i=2===t,n=3===t,o=4===t,s=6===t,r=7===t,a=5===t||s;return function(h,l,d,c){for(var u,p,m=sr(h),f=or(m),g=nr(l,d),v=rr(f),y=0,b=c||ar,w=e?b(h,v):i||r?b(h,0):void 0;v>y;y++)if((a||y in f)&&(p=g(u=f[y],y,m),t))if(e)w[y]=p;else if(p)switch(t){case 3:return!0;case 5:return u;case 6:return y;case 2:hr(w,u)}else switch(t){case 4:return!1;case 7:hr(w,u)}return s?-1:n||o?o:w}},dr={forEach:lr(0),map:lr(1),filter:lr(2),some:lr(3),every:lr(4),find:lr(5),findIndex:lr(6),filterReject:lr(7)},cr=Pi,ur=a,pr=R,mr=b,fr=I,gr=xt,vr=h,yr=ee,br=dt,wr=si,_r=tt,xr=De,kr=no,Sr=G,Dr=Qo,Cr=Do,Tr=Zo,Er=ts,Or=us,Mr=P,Pr=ti,Ir=oo,Ar=F,Nr=ms,Rr=gs,Fr=Xt,Lr=fo,jr=re,Yr=fe,zr=vs,Hr=Cs,Gr=Ps,Wr=zs,Br=ir,Vr=dr.forEach,Ur=Fo("hidden"),$r="Symbol",qr="prototype",Xr=Br.set,Qr=Br.getterFor($r),Zr=Object[qr],Kr=ur.Symbol,Jr=Kr&&Kr[qr],ta=ur.RangeError,ea=ur.TypeError,ia=ur.QObject,na=Mr.f,oa=Pr.f,sa=Er.f,ra=Ar.f,aa=mr([].push),ha=Fr("symbols"),la=Fr("op-symbols"),da=Fr("wks"),ca=!ia||!ia[qr]||!ia[qr].findChild,ua=function(t,e,i){var n=na(Zr,e);n&&delete Zr[e],oa(t,e,i),n&&t!==Zr&&oa(Zr,e,n)},pa=fr&&vr((function(){return 7!==Dr(oa({},"a",{get:function(){return oa(this,"a",{value:7}).a}})).a}))?ua:oa,ma=function(t,e){var i=ha[t]=Dr(Jr);return Xr(i,{type:$r,tag:t,description:e}),fr||(i.description=e),i},fa=function(t,e,i){t===Zr&&fa(la,e,i),wr(t);var n=xr(e);return wr(i),yr(ha,n)?(i.enumerable?(yr(t,Ur)&&t[Ur][n]&&(t[Ur][n]=!1),i=Dr(i,{enumerable:Sr(0,!1)})):(yr(t,Ur)||oa(t,Ur,Sr(1,{})),t[Ur][n]=!0),pa(t,n,i)):oa(t,n,i)},ga=function(t,e){wr(t);var i=_r(e),n=Cr(i).concat(wa(i));return Vr(n,(function(e){fr&&!pr(va,i,e)||fa(t,e,i[e])})),t},va=function(t){var e=xr(t),i=pr(ra,this,e);return!(this===Zr&&yr(ha,e)&&!yr(la,e))&&(!(i||!yr(this,e)||!yr(ha,e)||yr(this,Ur)&&this[Ur][e])||i)},ya=function(t,e){var i=_r(t),n=xr(e);if(i!==Zr||!yr(ha,n)||yr(la,n)){var o=na(i,n);return!o||!yr(ha,n)||yr(i,Ur)&&i[Ur][n]||(o.enumerable=!0),o}},ba=function(t){var e=sa(_r(t)),i=[];return Vr(e,(function(t){yr(ha,t)||yr(Lr,t)||aa(i,t)})),i},wa=function(t){var e=t===Zr,i=sa(e?la:_r(t)),n=[];return Vr(i,(function(t){!yr(ha,t)||e&&!yr(Zr,t)||aa(n,ha[t])})),n};gr||(Kr=function(){if(br(Jr,this))throw new ea("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?kr(arguments[0]):void 0,e=jr(t),i=function(t){var n=void 0===this?ur:this;n===Zr&&pr(i,la,t),yr(n,Ur)&&yr(n[Ur],e)&&(n[Ur][e]=!1);var o=Sr(1,t);try{pa(n,e,o)}catch(t){if(!(t instanceof ta))throw t;ua(n,e,o)}};return fr&&ca&&pa(Zr,e,{configurable:!0,set:i}),ma(e,t)},Nr(Jr=Kr[qr],"toString",(function(){return Qr(this).tag})),Nr(Kr,"withoutSetter",(function(t){return ma(jr(t),t)})),Ar.f=va,Pr.f=fa,Ir.f=ga,Mr.f=ya,Tr.f=Er.f=ba,Or.f=wa,zr.f=function(t){return ma(Yr(t),t)},fr&&Rr(Jr,"description",{configurable:!0,get:function(){return Qr(this).description}})),cr({global:!0,constructor:!0,wrap:!0,forced:!gr,sham:!gr},{Symbol:Kr}),Vr(Cr(da),(function(t){Hr(t)})),cr({target:$r,stat:!0,forced:!gr},{useSetter:function(){ca=!0},useSimple:function(){ca=!1}}),cr({target:"Object",stat:!0,forced:!gr,sham:!fr},{create:function(t,e){return void 0===e?Dr(t):ga(Dr(t),e)},defineProperty:fa,defineProperties:ga,getOwnPropertyDescriptor:ya}),cr({target:"Object",stat:!0,forced:!gr},{getOwnPropertyNames:ba}),Gr(),Wr(Kr,$r),Lr[Ur]=!0;var _a=xt&&!!Symbol.for&&!!Symbol.keyFor,xa=Pi,ka=lt,Sa=ee,Da=no,Ca=Xt,Ta=_a,Ea=Ca("string-to-symbol-registry"),Oa=Ca("symbol-to-string-registry");xa({target:"Symbol",stat:!0,forced:!Ta},{for:function(t){var e=Da(t);if(Sa(Ea,e))return Ea[e];var i=ka("Symbol")(e);return Ea[e]=i,Oa[i]=e,i}});var Ma=Pi,Pa=ee,Ia=Et,Aa=Mt,Na=_a,Ra=Xt("symbol-to-string-registry");Ma({target:"Symbol",stat:!0,forced:!Na},{keyFor:function(t){if(!Ia(t))throw new TypeError(Aa(t)+" is not a symbol");if(Pa(Ra,t))return Ra[t]}});var Fa=b([].slice),La=Hi,ja=M,Ya=k,za=no,Ha=b([].push),Ga=Pi,Wa=lt,Ba=m,Va=R,Ua=b,$a=h,qa=M,Xa=Et,Qa=Fa,Za=function(t){if(ja(t))return t;if(La(t)){for(var e=t.length,i=[],n=0;n<e;n++){var o=t[n];"string"==typeof o?Ha(i,o):"number"!=typeof o&&"Number"!==Ya(o)&&"String"!==Ya(o)||Ha(i,za(o))}var s=i.length,r=!0;return function(t,e){if(r)return r=!1,e;if(La(this))return e;for(var n=0;n<s;n++)if(i[n]===t)return e}}},Ka=xt,Ja=String,th=Wa("JSON","stringify"),eh=Ua(/./.exec),ih=Ua("".charAt),nh=Ua("".charCodeAt),oh=Ua("".replace),sh=Ua(1..toString),rh=/[\uD800-\uDFFF]/g,ah=/^[\uD800-\uDBFF]$/,hh=/^[\uDC00-\uDFFF]$/,lh=!Ka||$a((function(){var t=Wa("Symbol")("stringify detection");return"[null]"!==th([t])||"{}"!==th({a:t})||"{}"!==th(Object(t))})),dh=$a((function(){return'"\\udf06\\ud834"'!==th("\udf06\ud834")||'"\\udead"'!==th("\udead")})),ch=function(t,e){var i=Qa(arguments),n=Za(e);if(qa(n)||void 0!==t&&!Xa(t))return i[1]=function(t,e){if(qa(n)&&(e=Va(n,this,Ja(t),e)),!Xa(e))return e},Ba(th,null,i)},uh=function(t,e,i){var n=ih(i,e-1),o=ih(i,e+1);return eh(ah,t)&&!eh(hh,o)||eh(hh,t)&&!eh(ah,n)?"\\u"+sh(nh(t,0),16):t};th&&Ga({target:"JSON",stat:!0,arity:3,forced:lh||dh},{stringify:function(t,e,i){var n=Qa(arguments),o=Ba(lh?ch:th,null,n);return dh&&"string"==typeof o?oh(o,rh,uh):o}});var ph=us,mh=Kt;Pi({target:"Object",stat:!0,forced:!xt||h((function(){ph.f(1)}))},{getOwnPropertySymbols:function(t){var e=ph.f;return e?e(mh(t)):[]}}),Cs("asyncIterator"),Cs("hasInstance"),Cs("isConcatSpreadable"),Cs("iterator"),Cs("match"),Cs("matchAll"),Cs("replace"),Cs("search"),Cs("species"),Cs("split");var fh=Ps;Cs("toPrimitive"),fh();var gh=lt,vh=zs;Cs("toStringTag"),vh(gh("Symbol"),"Symbol"),Cs("unscopables"),zs(a.JSON,"JSON",!0);var yh,bh,wh,_h=ot.Symbol,xh={},kh=I,Sh=ee,Dh=Function.prototype,Ch=kh&&Object.getOwnPropertyDescriptor,Th=Sh(Dh,"name"),Eh={EXISTS:Th,PROPER:Th&&"something"===function(){}.name,CONFIGURABLE:Th&&(!kh||kh&&Ch(Dh,"name").configurable)},Oh=!h((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Mh=ee,Ph=M,Ih=Kt,Ah=Oh,Nh=Fo("IE_PROTO"),Rh=Object,Fh=Rh.prototype,Lh=Ah?Rh.getPrototypeOf:function(t){var e=Ih(t);if(Mh(e,Nh))return e[Nh];var i=e.constructor;return Ph(i)&&e instanceof i?i.prototype:e instanceof Rh?Fh:null},jh=h,Yh=M,zh=nt,Hh=Qo,Gh=Lh,Wh=ms,Bh=fe("iterator"),Vh=!1;[].keys&&("next"in(wh=[].keys())?(bh=Gh(Gh(wh)))!==Object.prototype&&(yh=bh):Vh=!0);var Uh=!zh(yh)||jh((function(){var t={};return yh[Bh].call(t)!==t}));Yh((yh=Uh?{}:Hh(yh))[Bh])||Wh(yh,Bh,(function(){return this}));var $h={IteratorPrototype:yh,BUGGY_SAFARI_ITERATORS:Vh},qh=$h.IteratorPrototype,Xh=Qo,Qh=G,Zh=zs,Kh=xh,Jh=function(){return this},tl=b,el=Nt,il=M,nl=String,ol=TypeError,sl=function(t,e,i){try{return tl(el(Object.getOwnPropertyDescriptor(t,e)[i]))}catch(t){}},rl=si,al=function(t){if("object"==typeof t||il(t))return t;throw new ol("Can't set "+nl(t)+" as a prototype")},hl=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=sl(Object.prototype,"__proto__","set"))(i,[]),e=i instanceof Array}catch(t){}return function(i,n){return rl(i),al(n),e?t(i,n):i.__proto__=n,i}}():void 0),ll=Pi,dl=R,cl=function(t,e,i,n){var o=e+" Iterator";return t.prototype=Xh(qh,{next:Qh(+!n,i)}),Zh(t,o,!1,!0),Kh[o]=Jh,t},ul=Lh,pl=zs,ml=ms,fl=xh,gl=$h,vl=Eh.PROPER,yl=gl.BUGGY_SAFARI_ITERATORS,bl=fe("iterator"),wl="keys",_l="values",xl="entries",kl=function(){return this},Sl=function(t,e,i,n,o,s,r){cl(i,e,n);var a,h,l,d=function(t){if(t===o&&f)return f;if(!yl&&t&&t in p)return p[t];switch(t){case wl:case _l:case xl:return function(){return new i(this,t)}}return function(){return new i(this)}},c=e+" Iterator",u=!1,p=t.prototype,m=p[bl]||p["@@iterator"]||o&&p[o],f=!yl&&m||d(o),g="Array"===e&&p.entries||m;if(g&&(a=ul(g.call(new t)))!==Object.prototype&&a.next&&(pl(a,c,!0,!0),fl[c]=kl),vl&&o===_l&&m&&m.name!==_l&&(u=!0,f=function(){return dl(m,this)}),o)if(h={values:d(_l),keys:s?f:d(wl),entries:d(xl)},r)for(l in h)(yl||u||!(l in p))&&ml(p,l,h[l]);else ll({target:e,proto:!0,forced:yl||u},h);return r&&p[bl]!==f&&ml(p,bl,f,{name:o}),fl[e]=f,h},Dl=function(t,e){return{value:t,done:e}},Cl=tt,Tl=xh,El=ir;ti.f;var Ol=Sl,Ml=Dl,Pl="Array Iterator",Il=El.set,Al=El.getterFor(Pl);Ol(Array,"Array",(function(t,e){Il(this,{type:Pl,target:Cl(t),index:0,kind:e})}),(function(){var t=Al(this),e=t.target,i=t.index++;if(!e||i>=e.length)return t.target=void 0,Ml(void 0,!0);switch(t.kind){case"keys":return Ml(i,!1);case"values":return Ml(e[i],!1)}return Ml([i,e[i]],!1)}),"values"),Tl.Arguments=Tl.Array;var Nl={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},Rl=a,Fl=cn,Ll=bi,jl=xh,Yl=fe("toStringTag");for(var zl in Nl){var Hl=Rl[zl],Gl=Hl&&Hl.prototype;Gl&&Fl(Gl)!==Yl&&Ll(Gl,Yl,zl),jl[zl]=jl.Array}var Wl=_h,Bl=fe,Vl=ti.f,Ul=Bl("metadata"),$l=Function.prototype;void 0===$l[Ul]&&Vl($l,Ul,{value:null}),Cs("asyncDispose"),Cs("dispose"),Cs("metadata");var ql=Wl,Xl=b,Ql=lt("Symbol"),Zl=Ql.keyFor,Kl=Xl(Ql.prototype.valueOf),Jl=Ql.isRegisteredSymbol||function(t){try{return void 0!==Zl(Kl(t))}catch(t){return!1}};Pi({target:"Symbol",stat:!0},{isRegisteredSymbol:Jl});for(var td=Xt,ed=lt,id=b,nd=Et,od=fe,sd=ed("Symbol"),rd=sd.isWellKnownSymbol,ad=ed("Object","getOwnPropertyNames"),hd=id(sd.prototype.valueOf),ld=td("wks"),dd=0,cd=ad(sd),ud=cd.length;dd<ud;dd++)try{var pd=cd[dd];nd(sd[pd])&&od(pd)}catch(t){}var md=function(t){if(rd&&rd(t))return!0;try{for(var e=hd(t),i=0,n=ad(ld),o=n.length;i<o;i++)if(ld[n[i]]==e)return!0}catch(t){}return!1};Pi({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:md}),Cs("matcher"),Cs("observable"),Pi({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Jl}),Pi({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:md}),Cs("metadataKey"),Cs("patternMatch"),Cs("replaceAll");var fd=ql,gd=o(fd),vd=b,yd=Vi,bd=no,wd=Z,_d=vd("".charAt),xd=vd("".charCodeAt),kd=vd("".slice),Sd=function(t){return function(e,i){var n,o,s=bd(wd(e)),r=yd(i),a=s.length;return r<0||r>=a?t?"":void 0:(n=xd(s,r))<55296||n>56319||r+1===a||(o=xd(s,r+1))<56320||o>57343?t?_d(s,r):n:t?kd(s,r,r+2):o-56320+(n-55296<<10)+65536}},Dd=(Sd(!1),Sd(!0)),Cd=no,Td=ir,Ed=Sl,Od=Dl,Md="String Iterator",Pd=Td.set,Id=Td.getterFor(Md);Ed(String,"String",(function(t){Pd(this,{type:Md,string:Cd(t),index:0})}),(function(){var t,e=Id(this),i=e.string,n=e.index;return n>=i.length?Od(void 0,!0):(t=Dd(i,n),e.index+=t.length,Od(t,!1))}));var Ad=vs.f("iterator"),Nd=Ad,Rd=o(Nd);function Fd(t){return Fd="function"==typeof gd&&"symbol"==typeof Rd?function(t){return typeof t}:function(t){return t&&"function"==typeof gd&&t.constructor===gd&&t!==gd.prototype?"symbol":typeof t},Fd(t)}var Ld=o(vs.f("toPrimitive"));function jd(t){var e=function(t,e){if("object"!==Fd(t)||null===t)return t;var i=t[Ld];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==Fd(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Fd(e)?e:String(e)}function Yd(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),Yi(t,jd(n.key),n)}}function zd(t,e,i){return e&&Yd(t.prototype,e),i&&Yd(t,i),Yi(t,"prototype",{writable:!1}),t}function Hd(t,e,i){return(e=jd(e))in t?Yi(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Gd=b,Wd=Nt,Bd=nt,Vd=ee,Ud=Fa,$d=l,qd=Function,Xd=Gd([].concat),Qd=Gd([].join),Zd={},Kd=$d?qd.bind:function(t){var e=Wd(this),i=e.prototype,n=Ud(arguments,1),o=function(){var i=Xd(n,Ud(arguments));return this instanceof o?function(t,e,i){if(!Vd(Zd,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";Zd[e]=qd("C,a","return new C("+Qd(n,",")+")")}return Zd[e](t,i)}(e,i.length,i):e.apply(t,i)};return Bd(i)&&(o.prototype=i),o},Jd=Kd;Pi({target:"Function",proto:!0,forced:Function.bind!==Jd},{bind:Jd});var tc=a,ec=ot,ic=function(t,e){var i=ec[t+"Prototype"],n=i&&i[e];if(n)return n;var o=tc[t],s=o&&o.prototype;return s&&s[e]},nc=ic("Function","bind"),oc=dt,sc=nc,rc=Function.prototype,ac=function(t){var e=t.bind;return t===rc||oc(rc,t)&&e===rc.bind?sc:e},hc=o(ac),lc=Nt,dc=Kt,cc=$,uc=Xi,pc=TypeError,mc=function(t){return function(e,i,n,o){lc(i);var s=dc(e),r=cc(s),a=uc(s),h=t?a-1:0,l=t?-1:1;if(n<2)for(;;){if(h in r){o=r[h],h+=l;break}if(h+=l,t?h<0:a<=h)throw new pc("Reduce of empty array with no initial value")}for(;t?h>=0:a>h;h+=l)h in r&&(o=i(o,r[h],h,s));return o}},fc={left:mc(!1),right:mc(!0)},gc=h,vc=function(t,e){var i=[][t];return!!i&&gc((function(){i.call(null,e||function(){return 1},1)}))},yc="process"===k(a.process),bc=fc.left;Pi({target:"Array",proto:!0,forced:!yc&&yt>79&&yt<83||!vc("reduce")},{reduce:function(t){var e=arguments.length;return bc(this,t,e,e>1?arguments[1]:void 0)}});var wc=ic("Array","reduce"),_c=dt,xc=wc,kc=Array.prototype,Sc=o((function(t){var e=t.reduce;return t===kc||_c(kc,t)&&e===kc.reduce?xc:e})),Dc=dr.filter;Pi({target:"Array",proto:!0,forced:!zn("filter")},{filter:function(t){return Dc(this,t,arguments.length>1?arguments[1]:void 0)}});var Cc=ic("Array","filter"),Tc=dt,Ec=Cc,Oc=Array.prototype,Mc=o((function(t){var e=t.filter;return t===Oc||Tc(Oc,t)&&e===Oc.filter?Ec:e})),Pc=dr.map;Pi({target:"Array",proto:!0,forced:!zn("map")},{map:function(t){return Pc(this,t,arguments.length>1?arguments[1]:void 0)}});var Ic=ic("Array","map"),Ac=dt,Nc=Ic,Rc=Array.prototype,Fc=o((function(t){var e=t.map;return t===Rc||Ac(Rc,t)&&e===Rc.map?Nc:e})),Lc=Hi,jc=Xi,Yc=Zi,zc=Je,Hc=function(t,e,i,n,o,s,r,a){for(var h,l,d=o,c=0,u=!!r&&zc(r,a);c<n;)c in i&&(h=u?u(i[c],c,e):i[c],s>0&&Lc(h)?(l=jc(h),d=Hc(t,e,h,l,d,s-1)-1):(Yc(d+1),t[d]=h),d++),c++;return d},Gc=Hc,Wc=Nt,Bc=Kt,Vc=Xi,Uc=Fn;Pi({target:"Array",proto:!0},{flatMap:function(t){var e,i=Bc(this),n=Vc(i);return Wc(t),(e=Uc(i,0)).length=Gc(e,i,i,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}});var $c=ic("Array","flatMap"),qc=dt,Xc=$c,Qc=Array.prototype,Zc=o((function(t){var e=t.flatMap;return t===Qc||qc(Qc,t)&&e===Qc.flatMap?Xc:e})),Kc=function(){function t(i,n,o){var s,r,a;e(this,t),Hd(this,"_listeners",{add:hc(s=this._add).call(s,this),remove:hc(r=this._remove).call(r,this),update:hc(a=this._update).call(a,this)}),this._source=i,this._transformers=n,this._target=o}return zd(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 Sc(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}(),Jc=function(){function t(i){e(this,t),Hd(this,"_transformers",[]),this._source=i}return zd(t,[{key:"filter",value:function(t){return this._transformers.push((function(e){return Mc(e).call(e,t)})),this}},{key:"map",value:function(t){return this._transformers.push((function(e){return Fc(e).call(e,t)})),this}},{key:"flatMap",value:function(t){return this._transformers.push((function(e){return Zc(e).call(e,t)})),this}},{key:"to",value:function(t){return new Kc(this._source,this._transformers,t)}}]),t}(),tu=R,eu=si,iu=Lt,nu=function(t,e,i){var n,o;eu(t);try{if(!(n=iu(t,"return"))){if("throw"===e)throw i;return i}n=tu(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw i;if(o)throw n;return eu(n),i},ou=si,su=nu,ru=xh,au=fe("iterator"),hu=Array.prototype,lu=function(t){return void 0!==t&&(ru.Array===t||hu[au]===t)},du=cn,cu=Lt,uu=q,pu=xh,mu=fe("iterator"),fu=function(t){if(!uu(t))return cu(t,mu)||cu(t,"@@iterator")||pu[du(t)]},gu=R,vu=Nt,yu=si,bu=Mt,wu=fu,_u=TypeError,xu=function(t,e){var i=arguments.length<2?wu(t):e;if(vu(i))return yu(gu(i,t));throw new _u(bu(t)+" is not iterable")},ku=Je,Su=R,Du=Kt,Cu=function(t,e,i,n){try{return n?e(ou(i)[0],i[1]):e(i)}catch(e){su(t,"throw",e)}},Tu=lu,Eu=On,Ou=Xi,Mu=en,Pu=xu,Iu=fu,Au=Array,Nu=fe("iterator"),Ru=!1;try{var Fu=0,Lu={next:function(){return{done:!!Fu++}},return:function(){Ru=!0}};Lu[Nu]=function(){return this},Array.from(Lu,(function(){throw 2}))}catch(t){}var ju=function(t,e){try{if(!e&&!Ru)return!1}catch(t){return!1}var i=!1;try{var n={};n[Nu]=function(){return{next:function(){return{done:i=!0}}}},t(n)}catch(t){}return i},Yu=function(t){var e=Du(t),i=Eu(this),n=arguments.length,o=n>1?arguments[1]:void 0,s=void 0!==o;s&&(o=ku(o,n>2?arguments[2]:void 0));var r,a,h,l,d,c,u=Iu(e),p=0;if(!u||this===Au&&Tu(u))for(r=Ou(e),a=i?new this(r):Au(r);r>p;p++)c=s?o(e[p],p):e[p],Mu(a,p,c);else for(d=(l=Pu(e,u)).next,a=i?new this:[];!(h=Su(d,l)).done;p++)c=s?Cu(l,o,[h.value,p],!0):h.value,Mu(a,p,c);return a.length=p,a};Pi({target:"Array",stat:!0,forced:!ju((function(t){Array.from(t)}))},{from:Yu});var zu=ot.Array.from,Hu=o(zu),Gu=fu,Wu=o(Gu),Bu=o(Gu);Pi({target:"Array",stat:!0},{isArray:Hi});var Vu=ot.Array.isArray,Uu=o(Vu),$u=I,qu=Hi,Xu=TypeError,Qu=Object.getOwnPropertyDescriptor,Zu=$u&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}()?function(t,e){if(qu(t)&&!Qu(t,"length").writable)throw new Xu("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Ku=Kt,Ju=Xi,tp=Zu,ep=Zi;Pi({target:"Array",proto:!0,arity:1,forced:h((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=Ku(this),i=Ju(e),n=arguments.length;ep(i+n);for(var o=0;o<n;o++)e[i]=arguments[o],i++;return tp(e,i),i}});var ip=ic("Array","push"),np=dt,op=ip,sp=Array.prototype,rp=function(t){var e=t.push;return t===sp||np(sp,t)&&e===sp.push?op:e},ap=o(rp),hp=Pi,lp=Hi,dp=On,cp=nt,up=ho,pp=Xi,mp=tt,fp=en,gp=fe,vp=Fa,yp=zn("slice"),bp=gp("species"),wp=Array,_p=Math.max;hp({target:"Array",proto:!0,forced:!yp},{slice:function(t,e){var i,n,o,s=mp(this),r=pp(s),a=up(t,r),h=up(void 0===e?r:e,r);if(lp(s)&&(i=s.constructor,(dp(i)&&(i===wp||lp(i.prototype))||cp(i)&&null===(i=i[bp]))&&(i=void 0),i===wp||void 0===i))return vp(s,a,h);for(n=new(void 0===i?wp:i)(_p(h-a,0)),o=0;a<h;a++,o++)a in s&&fp(n,o,s[a]);return n.length=o,n}});var xp=ic("Array","slice"),kp=dt,Sp=xp,Dp=Array.prototype,Cp=function(t){var e=t.slice;return t===Dp||kp(Dp,t)&&e===Dp.slice?Sp:e},Tp=Cp,Ep=o(Tp),Op=o(zu);function Mp(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function Pp(t,e){var i;if(t){if("string"==typeof t)return Mp(t,e);var n=Ep(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Op(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mp(t,e):void 0}}function Ip(t,e){return function(t){if(Uu(t))return t}(t)||function(t,e){var i=null==t?null:void 0!==gd&&Wu(t)||t["@@iterator"];if(null!=i){var n,o,s,r,a=[],h=!0,l=!1;try{if(s=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;h=!1}else for(;!(h=(n=s.call(i)).done)&&(ap(a).call(a,n.value),a.length!==e);h=!0);}catch(t){l=!0,o=t}finally{try{if(!h&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(l)throw o}}return a}}(t,e)||Pp(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ap(t){return function(t){if(Uu(t))return Mp(t)}(t)||function(t){if(void 0!==gd&&null!=Wu(t)||null!=t["@@iterator"])return Op(t)}(t)||Pp(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Np=o(Wl),Rp=ic("Array","concat"),Fp=dt,Lp=Rp,jp=Array.prototype,Yp=o((function(t){var e=t.concat;return t===jp||Fp(jp,t)&&e===jp.concat?Lp:e})),zp=o(Cp),Hp=lt,Gp=Zo,Wp=us,Bp=si,Vp=b([].concat),Up=Hp("Reflect","ownKeys")||function(t){var e=Gp.f(Bp(t)),i=Wp.f;return i?Vp(e,i(t)):e};Pi({target:"Reflect",stat:!0},{ownKeys:Up});var $p=o(ot.Reflect.ownKeys),qp=o(Vu),Xp=Kt,Qp=Do;Pi({target:"Object",stat:!0,forced:h((function(){Qp(1)}))},{keys:function(t){return Qp(Xp(t))}});var Zp=o(ot.Object.keys),Kp=dr.forEach,Jp=vc("forEach")?[].forEach:function(t){return Kp(this,t,arguments.length>1?arguments[1]:void 0)};Pi({target:"Array",proto:!0,forced:[].forEach!==Jp},{forEach:Jp});var tm=ic("Array","forEach"),em=cn,im=ee,nm=dt,om=tm,sm=Array.prototype,rm={DOMTokenList:!0,NodeList:!0},am=function(t){var e=t.forEach;return t===sm||nm(sm,t)&&e===sm.forEach||im(rm,em(t))?om:e},hm=o(am),lm=Pi,dm=Hi,cm=b([].reverse),um=[1,2];lm({target:"Array",proto:!0,forced:String(um)===String(um.reverse())},{reverse:function(){return dm(this)&&(this.length=this.length),cm(this)}});var pm=ic("Array","reverse"),mm=dt,fm=pm,gm=Array.prototype,vm=function(t){var e=t.reverse;return t===gm||mm(gm,t)&&e===gm.reverse?fm:e},ym=o(vm),bm=Mt,wm=TypeError,_m=function(t,e){if(!delete t[e])throw new wm("Cannot delete property "+bm(e)+" of "+bm(t))},xm=Pi,km=Kt,Sm=ho,Dm=Vi,Cm=Xi,Tm=Zu,Em=Zi,Om=Fn,Mm=en,Pm=_m,Im=zn("splice"),Am=Math.max,Nm=Math.min;xm({target:"Array",proto:!0,forced:!Im},{splice:function(t,e){var i,n,o,s,r,a,h=km(this),l=Cm(h),d=Sm(t,l),c=arguments.length;for(0===c?i=n=0:1===c?(i=0,n=l-d):(i=c-2,n=Nm(Am(Dm(e),0),l-d)),Em(l+i-n),o=Om(h,n),s=0;s<n;s++)(r=d+s)in h&&Mm(o,s,h[r]);if(o.length=n,i<n){for(s=d;s<l-n;s++)a=s+i,(r=s+n)in h?h[a]=h[r]:Pm(h,a);for(s=l;s>l-n+i;s--)Pm(h,s-1)}else if(i>n)for(s=l-n;s>d;s--)a=s+i-1,(r=s+n-1)in h?h[a]=h[r]:Pm(h,a);for(s=0;s<i;s++)h[s+d]=arguments[s+2];return Tm(h,l-n+i),o}});var Rm=ic("Array","splice"),Fm=dt,Lm=Rm,jm=Array.prototype,Ym=o((function(t){var e=t.splice;return t===jm||Fm(jm,t)&&e===jm.splice?Lm:e})),zm=I,Hm=b,Gm=R,Wm=h,Bm=Do,Vm=us,Um=F,$m=Kt,qm=$,Xm=Object.assign,Qm=Object.defineProperty,Zm=Hm([].concat),Km=!Xm||Wm((function(){if(zm&&1!==Xm({b:1},Xm(Qm({},"a",{enumerable:!0,get:function(){Qm(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},i=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[i]=7,n.split("").forEach((function(t){e[t]=t})),7!==Xm({},t)[i]||Bm(Xm({},e)).join("")!==n}))?function(t,e){for(var i=$m(t),n=arguments.length,o=1,s=Vm.f,r=Um.f;n>o;)for(var a,h=qm(arguments[o++]),l=s?Zm(Bm(h),s(h)):Bm(h),d=l.length,c=0;d>c;)a=l[c++],zm&&!Gm(r,h,a)||(i[a]=h[a]);return i}:Xm,Jm=Km;Pi({target:"Object",stat:!0,arity:2,forced:Object.assign!==Jm},{assign:Jm});var tf=o(ot.Object.assign),ef=Kt,nf=Lh,of=Oh;Pi({target:"Object",stat:!0,forced:h((function(){nf(1)})),sham:!of},{getPrototypeOf:function(t){return nf(ef(t))}});var sf=ot.Object.getPrototypeOf;Pi({target:"Object",stat:!0,sham:!I},{create:Qo});var rf=ot.Object,af=function(t,e){return rf.create(t,e)},hf=o(af),lf=ot,df=m;lf.JSON||(lf.JSON={stringify:JSON.stringify});var cf=function(t,e,i){return df(lf.JSON.stringify,null,arguments)},uf=o(cf),pf="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,mf=TypeError,ff=function(t,e){if(t<e)throw new mf("Not enough arguments");return t},gf=a,vf=m,yf=M,bf=pf,wf=ct,_f=Fa,xf=ff,kf=gf.Function,Sf=/MSIE .\./.test(wf)||bf&&function(){var t=gf.Bun.version.split(".");return t.length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2])}(),Df=function(t,e){var i=e?2:1;return Sf?function(n,o){var s=xf(arguments.length,1)>i,r=yf(n)?n:kf(n),a=s?_f(arguments,i):[],h=s?function(){vf(r,this,a)}:r;return e?t(h,o):t(h)}:t},Cf=Pi,Tf=a,Ef=Df(Tf.setInterval,!0);Cf({global:!0,bind:!0,forced:Tf.setInterval!==Ef},{setInterval:Ef});var Of=Pi,Mf=a,Pf=Df(Mf.setTimeout,!0);Of({global:!0,bind:!0,forced:Mf.setTimeout!==Pf},{setTimeout:Pf});var If=o(ot.setTimeout),Af={exports:{}};!function(t){function e(t){if(t)return function(t){return Object.assign(t,e.prototype),t._callbacks=new Map,t}(t);this._callbacks=new Map}e.prototype.on=function(t,e){const i=this._callbacks.get(t)??[];return i.push(e),this._callbacks.set(t,i),this},e.prototype.once=function(t,e){const i=(...n)=>{this.off(t,i),e.apply(this,n)};return i.fn=e,this.on(t,i),this},e.prototype.off=function(t,e){if(void 0===t&&void 0===e)return this._callbacks.clear(),this;if(void 0===e)return this._callbacks.delete(t),this;const i=this._callbacks.get(t);if(i){for(const[t,n]of i.entries())if(n===e||n.fn===e){i.splice(t,1);break}0===i.length?this._callbacks.delete(t):this._callbacks.set(t,i)}return this},e.prototype.emit=function(t,...e){const i=this._callbacks.get(t);if(i){const t=[...i];for(const i of t)i.apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks.get(t)??[]},e.prototype.listenerCount=function(t){if(t)return this.listeners(t).length;let e=0;for(const t of this._callbacks.values())e+=t.length;return e},e.prototype.hasListeners=function(t){return this.listenerCount(t)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,t.exports=e}(Af);var Nf,Rf=o(Af.exports);
|
||
/*! 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 Ff(){return Ff=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},Ff.apply(this,arguments)}function Lf(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function jf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}Nf="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;var Yf,zf=Nf,Hf=["","webkit","Moz","MS","ms","o"],Gf="undefined"==typeof document?{style:{}}:document.createElement("div"),Wf=Math.round,Bf=Math.abs,Vf=Date.now;function Uf(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),s=0;s<Hf.length;){if((n=(i=Hf[s])?i+o:e)in t)return n;s++}}Yf="undefined"==typeof window?{}:window;var $f=Uf(Gf.style,"touchAction"),qf=void 0!==$f,Xf="compute",Qf="auto",Zf="manipulation",Kf="none",Jf="pan-x",tg="pan-y",eg=function(){if(!qf)return!1;var t={},e=Yf.CSS&&Yf.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){return t[i]=!e||Yf.CSS.supports("touch-action",i)})),t}(),ig="ontouchstart"in Yf,ng=void 0!==Uf(Yf,"PointerEvent"),og=ig&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),sg="touch",rg="mouse",ag=25,hg=1,lg=4,dg=8,cg=1,ug=2,pg=4,mg=8,fg=16,gg=ug|pg,vg=mg|fg,yg=gg|vg,bg=["x","y"],wg=["clientX","clientY"];function _g(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 xg(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function kg(t,e){return t.indexOf(e)>-1}var Sg=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===Xf&&(t=this.compute()),qf&&this.manager.element.style&&eg[t]&&(this.manager.element.style[$f]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return _g(this.manager.recognizers,(function(e){xg(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(kg(t,Kf))return Kf;var e=kg(t,Jf),i=kg(t,tg);return e&&i?Kf:e||i?e?Jf:tg:kg(t,Zf)?Zf:Qf}(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=kg(n,Kf)&&!eg[Kf],s=kg(n,tg)&&!eg[tg],r=kg(n,Jf)&&!eg[Jf];if(o){var a=1===t.pointers.length,h=t.distance<2,l=t.deltaTime<250;if(a&&h&&l)return}if(!r||!s)return o||s&&i&gg||r&&i&vg?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Dg(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Cg(t){var e=t.length;if(1===e)return{x:Wf(t[0].clientX),y:Wf(t[0].clientY)};for(var i=0,n=0,o=0;o<e;)i+=t[o].clientX,n+=t[o].clientY,o++;return{x:Wf(i/e),y:Wf(n/e)}}function Tg(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:Wf(t.pointers[i].clientX),clientY:Wf(t.pointers[i].clientY)},i++;return{timeStamp:Vf(),pointers:e,center:Cg(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Eg(t,e,i){i||(i=bg);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function Og(t,e,i){i||(i=bg);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function Mg(t,e){return t===e?cg:Bf(t)>=Bf(e)?t<0?ug:pg:e<0?mg:fg}function Pg(t,e,i){return{x:e/t||0,y:i/t||0}}function Ig(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=Tg(e)),o>1&&!i.firstMultiple?i.firstMultiple=Tg(e):1===o&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=Cg(n);e.timeStamp=Vf(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=Og(a,h),e.distance=Eg(a,h),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},s=t.prevInput||{};e.eventType!==hg&&s.eventType!==lg||(o=t.prevDelta={x:s.deltaX||0,y:s.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=Mg(e.deltaX,e.deltaY);var l,d,c=Pg(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=Bf(c.x)>Bf(c.y)?c.x:c.y,e.scale=r?(l=r.pointers,Eg((d=n)[0],d[1],wg)/Eg(l[0],l[1],wg)):1,e.rotation=r?function(t,e){return Og(e[1],e[0],wg)+Og(t[1],t[0],wg)}(r.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,s,r=t.lastInterval||e,a=e.timeStamp-r.timeStamp;if(e.eventType!==dg&&(a>ag||void 0===r.velocity)){var h=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,d=Pg(a,h,l);n=d.x,o=d.y,i=Bf(d.x)>Bf(d.y)?d.x:d.y,s=Mg(h,l),t.lastInterval=e}else i=r.velocity,n=r.velocityX,o=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=s}(i,e);var u,p=t.element,m=e.srcEvent;Dg(u=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=u),e.target=p}function Ag(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,s=e&hg&&n-o==0,r=e&(lg|dg)&&n-o==0;i.isFirst=!!s,i.isFinal=!!r,s&&(t.session={}),i.eventType=e,Ig(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function Ng(t){return t.trim().split(/\s+/g)}function Rg(t,e,i){_g(Ng(e),(function(e){t.addEventListener(e,i,!1)}))}function Fg(t,e,i){_g(Ng(e),(function(e){t.removeEventListener(e,i,!1)}))}function Lg(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var jg=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){xg(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Rg(this.element,this.evEl,this.domHandler),this.evTarget&&Rg(this.target,this.evTarget,this.domHandler),this.evWin&&Rg(Lg(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Fg(this.element,this.evEl,this.domHandler),this.evTarget&&Fg(this.target,this.evTarget,this.domHandler),this.evWin&&Fg(Lg(this.element),this.evWin,this.domHandler)},t}();function Yg(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 zg={pointerdown:hg,pointermove:2,pointerup:lg,pointercancel:dg,pointerout:dg},Hg={2:sg,3:"pen",4:rg,5:"kinect"},Gg="pointerdown",Wg="pointermove pointerup pointercancel";Yf.MSPointerEvent&&!Yf.PointerEvent&&(Gg="MSPointerDown",Wg="MSPointerMove MSPointerUp MSPointerCancel");var Bg=function(t){function e(){var i,n=e.prototype;return n.evEl=Gg,n.evWin=Wg,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return Lf(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=zg[n],s=Hg[t.pointerType]||t.pointerType,r=s===sg,a=Yg(e,t.pointerId,"pointerId");o&hg&&(0===t.button||r)?a<0&&(e.push(t),a=e.length-1):o&(lg|dg)&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))},e}(jg);function Vg(t){return Array.prototype.slice.call(t,0)}function Ug(t,e,i){for(var n=[],o=[],s=0;s<t.length;){var r=e?t[s][e]:t[s];Yg(o,r)<0&&n.push(t[s]),o[s]=r,s++}return i&&(n=e?n.sort((function(t,i){return t[e]>i[e]})):n.sort()),n}var $g={touchstart:hg,touchmove:2,touchend:lg,touchcancel:dg},qg=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return Lf(e,t),e.prototype.handler=function(t){var e=$g[t.type],i=Xg.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:sg,srcEvent:t})},e}(jg);function Xg(t,e){var i,n,o=Vg(t.touches),s=this.targetIds;if(e&(2|hg)&&1===o.length)return s[o[0].identifier]=!0,[o,o];var r=Vg(t.changedTouches),a=[],h=this.target;if(n=o.filter((function(t){return Dg(t.target,h)})),e===hg)for(i=0;i<n.length;)s[n[i].identifier]=!0,i++;for(i=0;i<r.length;)s[r[i].identifier]&&a.push(r[i]),e&(lg|dg)&&delete s[r[i].identifier],i++;return a.length?[Ug(n.concat(a),"identifier",!0),a]:void 0}var Qg={mousedown:hg,mousemove:2,mouseup:lg},Zg=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 Lf(e,t),e.prototype.handler=function(t){var e=Qg[t.type];e&hg&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=lg),this.pressed&&(e&lg&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:rg,srcEvent:t}))},e}(jg),Kg=2500;function Jg(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)}),Kg)}}function tv(t,e){t&hg?(this.primaryTouch=e.changedPointers[0].identifier,Jg.call(this,e)):t&(lg|dg)&&Jg.call(this,e)}function ev(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],s=Math.abs(e-o.x),r=Math.abs(i-o.y);if(s<=25&&r<=25)return!0}return!1}var iv=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).handler=function(t,e,i){var o=i.pointerType===sg,s=i.pointerType===rg;if(!(s&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(o)tv.call(jf(jf(n)),e,i);else if(s&&ev.call(jf(jf(n)),i))return;n.callback(t,e,i)}},n.touch=new qg(n.manager,n.handler),n.mouse=new Zg(n.manager,n.handler),n.primaryTouch=null,n.lastTouches=[],n}return Lf(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(jg);function nv(t,e,i){return!!Array.isArray(t)&&(_g(t,i[e],i),!0)}var ov=32,sv=1;function rv(t,e){var i=e.manager;return i?i.get(t):t}function av(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var hv=function(){function t(t){void 0===t&&(t={}),this.options=Ff({enable:!0},t),this.id=sv++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return zf(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(nv(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=rv(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return nv(t,"dropRecognizeWith",this)||(t=rv(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(nv(t,"requireFailure",this))return this;var e=this.requireFail;return-1===Yg(e,t=rv(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(nv(t,"dropRequireFailure",this))return this;t=rv(t,this);var e=Yg(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+av(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+av(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=ov},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=zf({},t);if(!xg(this.options.enable,[this,e]))return this.reset(),void(this.state=ov);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}(),lv=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Ff({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}Lf(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Zf]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,s=t.deltaTime<i.time;if(this.reset(),t.eventType&hg&&0===this.count)return this.failTimeout();if(o&&s&&n){if(t.eventType!==lg)return this.failTimeout();var r=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||Eg(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&r?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 ov},i.failTimeout=function(){var t=this;return this._timer=setTimeout((function(){t.state=ov}),this.options.interval),ov},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}(hv),dv=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Ff({pointers:1},e))||this}Lf(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&&(i&dg||!o)?16|e:n||o?i&lg?8|e:2&e?4|e:2:ov},e}(hv);function cv(t){return t===fg?"down":t===mg?"up":t===ug?"left":t===pg?"right":""}var uv=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Ff({event:"pan",threshold:10,pointers:1,direction:yg},e))||this).pX=null,i.pY=null,i}Lf(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return t&gg&&e.push(tg),t&vg&&e.push(Jf),e},i.directionTest=function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,s=t.deltaX,r=t.deltaY;return o&e.direction||(e.direction&gg?(o=0===s?cg:s<0?ug:pg,i=s!==this.pX,n=Math.abs(t.deltaX)):(o=0===r?cg:r<0?mg:fg,i=r!==this.pY,n=Math.abs(t.deltaY))),t.direction=o,i&&n>e.threshold&&o&e.direction},i.attrTest=function(t){return dv.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=cv(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(dv),pv=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Ff({event:"swipe",threshold:10,velocity:.3,direction:gg|vg,pointers:1},e))||this}Lf(e,t);var i=e.prototype;return i.getTouchAction=function(){return uv.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,n=this.options.direction;return n&(gg|vg)?i=e.overallVelocity:n&gg?i=e.overallVelocityX:n&vg&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&Bf(i)>this.options.velocity&&e.eventType&lg},i.emit=function(t){var e=cv(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(dv),mv=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Ff({event:"pinch",threshold:0,pointers:2},e))||this}Lf(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Kf]},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}(dv),fv=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Ff({event:"rotate",threshold:0,pointers:2},e))||this}Lf(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Kf]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(dv),gv=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Ff({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}Lf(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Qf]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,s=t.deltaTime>i.time;if(this._input=t,!o||!n||t.eventType&(lg|dg)&&!s)this.reset();else if(t.eventType&hg)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(t.eventType&lg)return 8;return ov},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&t.eventType&lg?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Vf(),this.manager.emit(this.options.event,this._input)))},e}(hv),vv={domEvents:!1,touchAction:Xf,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},yv=[[fv,{enable:!1}],[mv,{enable:!1},["rotate"]],[pv,{direction:gg}],[uv,{direction:gg},["swipe"]],[lv],[lv,{event:"doubletap",taps:2},["tap"]],[gv]];function bv(t,e){var i,n=t.element;n.style&&(_g(t.options.cssProps,(function(o,s){i=Uf(n.style,s),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var wv=function(){function t(t,e){var i,n=this;this.options=zf({},vv,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||(ng?Bg:og?qg:ig?iv:Zg))(i,Ag),this.touchAction=new Sg(this,this.options.touchAction),bv(this,!0),_g(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 zf(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 s=0;s<n.length;)i=n[s],2===e.stopped||o&&i!==o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t),!o&&14&i.state&&(e.curRecognizer=i,o=i),s++}},e.get=function(t){if(t instanceof hv)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(nv(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(nv(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,n=Yg(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 _g(Ng(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 _g(Ng(t),(function(t){e?i[t]&&i[t].splice(Yg(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&&bv(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),_v={touchstart:hg,touchmove:2,touchend:lg,touchcancel:dg},xv=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 Lf(e,t),e.prototype.handler=function(t){var e=_v[t.type];if(e===hg&&(this.started=!0),this.started){var i=kv.call(this,t,e);e&(lg|dg)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:sg,srcEvent:t})}},e}(jg);function kv(t,e){var i=Vg(t.touches),n=Vg(t.changedTouches);return e&(lg|dg)&&(i=Ug(i.concat(n),"identifier",!0)),[i,n]}function Sv(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 Dv=Sv((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`."),Cv=Sv((function(t,e){return Dv(t,e,!0)}),"merge","Use `assign`.");function Tv(t,e,i){var n,o=e.prototype;(n=t.prototype=Object.create(o)).constructor=t,n._super=o,i&&zf(n,i)}function Ev(t,e){return function(){return t.apply(e,arguments)}}var Ov=function(){var t=function(t,e){return void 0===e&&(e={}),new wv(t,Ff({recognizers:yv.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=yg,t.DIRECTION_DOWN=fg,t.DIRECTION_LEFT=ug,t.DIRECTION_RIGHT=pg,t.DIRECTION_UP=mg,t.DIRECTION_HORIZONTAL=gg,t.DIRECTION_VERTICAL=vg,t.DIRECTION_NONE=cg,t.DIRECTION_DOWN=fg,t.INPUT_START=hg,t.INPUT_MOVE=2,t.INPUT_END=lg,t.INPUT_CANCEL=dg,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=ov,t.Manager=wv,t.Input=jg,t.TouchAction=Sg,t.TouchInput=qg,t.MouseInput=Zg,t.PointerEventInput=Bg,t.TouchMouseInput=iv,t.SingleTouchInput=xv,t.Recognizer=hv,t.AttrRecognizer=dv,t.Tap=lv,t.Pan=uv,t.Swipe=pv,t.Pinch=mv,t.Rotate=fv,t.Press=gv,t.on=Rg,t.off=Fg,t.each=_g,t.merge=Cv,t.extend=Dv,t.bindFn=Ev,t.assign=zf,t.inherit=Tv,t.bindFn=Ev,t.prefixed=Uf,t.toArray=Vg,t.inArray=Yg,t.uniqueArray=Ug,t.splitStr=Ng,t.boolOrFn=xg,t.hasParent=Dg,t.addEventListeners=Rg,t.removeEventListeners=Fg,t.defaults=zf({},vv,{preset:yv}),t}();function Mv(t,e){var i=void 0!==Np&&Bu(t)||t["@@iterator"];if(!i){if(qp(t)||(i=function(t,e){var i;if(t){if("string"==typeof t)return Pv(t,e);var n=zp(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Hu(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pv(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,r=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return r=t.done,t},e:function(t){a=!0,s=t},f:function(){try{r||null==i.return||i.return()}finally{if(a)throw s}}}}function Pv(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var Iv=Np("DELETE");function Av(){var t=Nv.apply(void 0,arguments);return Fv(t),t}function Nv(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(e.length<2)return e[0];var n;if(e.length>2)return Nv.apply(void 0,Yp(n=[Av(e[0],e[1])]).call(n,Ap(zp(e).call(e,2))));var o=e[0],s=e[1];if(o instanceof Date&&s instanceof Date)return o.setTime(s.getTime()),o;var r,a=Mv($p(s));try{for(a.s();!(r=a.n()).done;){var h=r.value;Object.prototype.propertyIsEnumerable.call(s,h)&&(s[h]===Iv?delete o[h]:null===o[h]||null===s[h]||"object"!=typeof o[h]||"object"!=typeof s[h]||qp(o[h])||qp(s[h])?o[h]=Rv(s[h]):o[h]=Nv(o[h],s[h]))}}catch(t){a.e(t)}finally{a.f()}return o}function Rv(t){return qp(t)?Fc(t).call(t,(function(t){return Rv(t)})):"object"==typeof t&&null!==t?t instanceof Date?new Date(t.getTime()):Nv({},t):t}function Fv(t){for(var e=0,i=Zp(t);e<i.length;e++){var n=i[e];t[n]===Iv?delete t[n]:"object"==typeof t[n]&&null!==t[n]&&Fv(t[n])}}var Lv="undefined"!=typeof window?window.Hammer||Ov:function(){return function(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};function jv(t){var e,i=this;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push((function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)}));var n=Lv(this._dom.overlay);n.on("tap",hc(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push((function(){n.destroy()}));var o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];hm(o).call(o,(function(t){n.on(t,(function(t){t.srcEvent.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)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push((function(){document.body.removeEventListener("click",i._onClick)}))),this._escListener=function(t){("key"in t?"Escape"===t.key:27===t.keyCode)&&i.deactivate()}}Rf(jv.prototype),jv.current=null,jv.prototype.destroy=function(){var t,e;this.deactivate();var i,n=Mv(ym(t=Ym(e=this._cleanupQueue).call(e,0)).call(t));try{for(n.s();!(i=n.n()).done;)(0,i.value)()}catch(t){n.e(t)}finally{n.f()}},jv.prototype.activate=function(){jv.current&&jv.current.deactivate(),jv.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},jv.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},jv.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};var Yv=On,zv=Mt,Hv=TypeError,Gv=function(t){if(Yv(t))return t;throw new Hv(zv(t)+" is not a constructor")},Wv=Pi,Bv=m,Vv=Kd,Uv=Gv,$v=si,qv=nt,Xv=Qo,Qv=h,Zv=lt("Reflect","construct"),Kv=Object.prototype,Jv=[].push,ty=Qv((function(){function t(){}return!(Zv((function(){}),[],t)instanceof t)})),ey=!Qv((function(){Zv((function(){}))})),iy=ty||ey;Wv({target:"Reflect",stat:!0,forced:iy,sham:iy},{construct:function(t,e){Uv(t),$v(e);var i=arguments.length<3?t:Uv(arguments[2]);if(ey&&!ty)return Zv(t,e,i);if(t===i){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return Bv(Jv,n,e),new(Bv(Vv,t,n))}var o=i.prototype,s=Xv(qv(o)?o:Kv),r=Bv(t,s,e);return qv(r)?r:s}});var ny=o(ot.Reflect.construct),oy=o(ot.Object.getOwnPropertySymbols),sy={exports:{}},ry=Pi,ay=h,hy=tt,ly=P.f,dy=I;ry({target:"Object",stat:!0,forced:!dy||ay((function(){ly(1)})),sham:!dy},{getOwnPropertyDescriptor:function(t,e){return ly(hy(t),e)}});var cy=ot.Object,uy=sy.exports=function(t,e){return cy.getOwnPropertyDescriptor(t,e)};cy.getOwnPropertyDescriptor.sham&&(uy.sham=!0);var py=o(sy.exports),my=Up,fy=tt,gy=P,vy=en;Pi({target:"Object",stat:!0,sham:!I},{getOwnPropertyDescriptors:function(t){for(var e,i,n=fy(t),o=gy.f,s=my(n),r={},a=0;s.length>a;)void 0!==(i=o(n,e=s[a++]))&&vy(r,e,i);return r}});var yy=o(ot.Object.getOwnPropertyDescriptors),by={exports:{}},wy=Pi,_y=I,xy=oo.f;wy({target:"Object",stat:!0,forced:Object.defineProperties!==xy,sham:!_y},{defineProperties:xy});var ky=ot.Object,Sy=by.exports=function(t,e){return ky.defineProperties(t,e)};ky.defineProperties.sham&&(Sy.sham=!0);var Dy=o(by.exports),Cy=o(Li);function Ty(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Ey=af,Oy=o(Ey);Pi({target:"Object",stat:!0},{setPrototypeOf:hl});var My=ot.Object.setPrototypeOf,Py=o(My),Iy=o(ac);function Ay(t,e){var i;return Ay=Py?Iy(i=Py).call(i):function(t,e){return t.__proto__=e,t},Ay(t,e)}function Ny(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Oy(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Yi(t,"prototype",{writable:!1}),e&&Ay(t,e)}function Ry(t,e){if(e&&("object"===Fd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ty(t)}var Fy=sf,Ly=o(Fy);function jy(t){var e;return jy=Py?Iy(e=Ly).call(e):function(t){return t.__proto__||Ly(t)},jy(t)}var Yy={exports:{}},zy={exports:{}};!function(t){var e=fd,i=Nd;function n(o){return t.exports=n="function"==typeof e&&"symbol"==typeof i?function(t){return typeof t}:function(t){return t&&"function"==typeof e&&t.constructor===e&&t!==e.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,n(o)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}(zy);var Hy=zy.exports,Gy=am,Wy=ee,By=Up,Vy=P,Uy=ti,$y=nt,qy=bi,Xy=Error,Qy=b("".replace),Zy=String(new Xy("zxcasd").stack),Ky=/\n\s*at [^:]*:[^\n]*/,Jy=Ky.test(Zy),tb=G,eb=!h((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",tb(1,7)),7!==t.stack)})),ib=bi,nb=function(t,e){if(Jy&&"string"==typeof t&&!Xy.prepareStackTrace)for(;e--;)t=Qy(t,Ky,"");return t},ob=eb,sb=Error.captureStackTrace,rb=Je,ab=R,hb=si,lb=Mt,db=lu,cb=Xi,ub=dt,pb=xu,mb=fu,fb=nu,gb=TypeError,vb=function(t,e){this.stopped=t,this.result=e},yb=vb.prototype,bb=function(t,e,i){var n,o,s,r,a,h,l,d=i&&i.that,c=!(!i||!i.AS_ENTRIES),u=!(!i||!i.IS_RECORD),p=!(!i||!i.IS_ITERATOR),m=!(!i||!i.INTERRUPTED),f=rb(e,d),g=function(t){return n&&fb(n,"normal",t),new vb(!0,t)},v=function(t){return c?(hb(t),m?f(t[0],t[1],g):f(t[0],t[1])):m?f(t,g):f(t)};if(u)n=t.iterator;else if(p)n=t;else{if(!(o=mb(t)))throw new gb(lb(t)+" is not iterable");if(db(o)){for(s=0,r=cb(t);r>s;s++)if((a=v(t[s]))&&ub(yb,a))return a;return new vb(!1)}n=pb(t,o)}for(h=u?t.next:n.next;!(l=ab(h,n)).done;){try{a=v(l.value)}catch(t){fb(n,"throw",t)}if("object"==typeof a&&a&&ub(yb,a))return a}return new vb(!1)},wb=no,_b=Pi,xb=dt,kb=Lh,Sb=hl,Db=function(t,e,i){for(var n=By(e),o=Uy.f,s=Vy.f,r=0;r<n.length;r++){var a=n[r];Wy(t,a)||i&&Wy(i,a)||o(t,a,s(e,a))}},Cb=Qo,Tb=bi,Eb=G,Ob=function(t,e){$y(e)&&"cause"in e&&qy(t,"cause",e.cause)},Mb=function(t,e,i,n){ob&&(sb?sb(t,e):ib(t,"stack",nb(i,n)))},Pb=bb,Ib=function(t,e){return void 0===t?arguments.length<2?"":e:wb(t)},Ab=fe("toStringTag"),Nb=Error,Rb=[].push,Fb=function(t,e){var i,n=xb(Lb,this);Sb?i=Sb(new Nb,n?kb(this):Lb):(i=n?this:Cb(Lb),Tb(i,Ab,"Error")),void 0!==e&&Tb(i,"message",Ib(e)),Mb(i,Fb,i.stack,1),arguments.length>2&&Ob(i,arguments[2]);var o=[];return Pb(t,Rb,{that:o}),Tb(i,"errors",o),i};Sb?Sb(Fb,Nb):Db(Fb,Nb,{name:!0});var Lb=Fb.prototype=Cb(Nb.prototype,{constructor:Eb(1,Fb),message:Eb(1,""),name:Eb(1,"AggregateError")});_b({global:!0,constructor:!0,arity:2},{AggregateError:Fb});var jb,Yb,zb,Hb,Gb=lt,Wb=gs,Bb=I,Vb=fe("species"),Ub=function(t){var e=Gb(t);Bb&&e&&!e[Vb]&&Wb(e,Vb,{configurable:!0,get:function(){return this}})},$b=dt,qb=TypeError,Xb=function(t,e){if($b(e,t))return t;throw new qb("Incorrect invocation")},Qb=si,Zb=Gv,Kb=q,Jb=fe("species"),tw=function(t,e){var i,n=Qb(t).constructor;return void 0===n||Kb(i=Qb(n)[Jb])?e:Zb(i)},ew=/(?:ipad|iphone|ipod).*applewebkit/i.test(ct),iw=a,nw=m,ow=Je,sw=M,rw=ee,aw=h,hw=Ao,lw=Fa,dw=Oe,cw=ff,uw=ew,pw=yc,mw=iw.setImmediate,fw=iw.clearImmediate,gw=iw.process,vw=iw.Dispatch,yw=iw.Function,bw=iw.MessageChannel,ww=iw.String,_w=0,xw={},kw="onreadystatechange";aw((function(){jb=iw.location}));var Sw=function(t){if(rw(xw,t)){var e=xw[t];delete xw[t],e()}},Dw=function(t){return function(){Sw(t)}},Cw=function(t){Sw(t.data)},Tw=function(t){iw.postMessage(ww(t),jb.protocol+"//"+jb.host)};mw&&fw||(mw=function(t){cw(arguments.length,1);var e=sw(t)?t:yw(t),i=lw(arguments,1);return xw[++_w]=function(){nw(e,void 0,i)},Yb(_w),_w},fw=function(t){delete xw[t]},pw?Yb=function(t){gw.nextTick(Dw(t))}:vw&&vw.now?Yb=function(t){vw.now(Dw(t))}:bw&&!uw?(Hb=(zb=new bw).port2,zb.port1.onmessage=Cw,Yb=ow(Hb.postMessage,Hb)):iw.addEventListener&&sw(iw.postMessage)&&!iw.importScripts&&jb&&"file:"!==jb.protocol&&!aw(Tw)?(Yb=Tw,iw.addEventListener("message",Cw,!1)):Yb=kw in dw("script")?function(t){hw.appendChild(dw("script"))[kw]=function(){hw.removeChild(this),Sw(t)}}:function(t){setTimeout(Dw(t),0)});var Ew={set:mw,clear:fw},Ow=function(){this.head=null,this.tail=null};Ow.prototype={add:function(t){var e={item:t,next:null},i=this.tail;i?i.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Mw,Pw,Iw,Aw,Nw,Rw=Ow,Fw=/ipad|iphone|ipod/i.test(ct)&&"undefined"!=typeof Pebble,Lw=/web0s(?!.*chrome)/i.test(ct),jw=a,Yw=Je,zw=P.f,Hw=Ew.set,Gw=Rw,Ww=ew,Bw=Fw,Vw=Lw,Uw=yc,$w=jw.MutationObserver||jw.WebKitMutationObserver,qw=jw.document,Xw=jw.process,Qw=jw.Promise,Zw=zw(jw,"queueMicrotask"),Kw=Zw&&Zw.value;if(!Kw){var Jw=new Gw,t_=function(){var t,e;for(Uw&&(t=Xw.domain)&&t.exit();e=Jw.get();)try{e()}catch(t){throw Jw.head&&Mw(),t}t&&t.enter()};Ww||Uw||Vw||!$w||!qw?!Bw&&Qw&&Qw.resolve?((Aw=Qw.resolve(void 0)).constructor=Qw,Nw=Yw(Aw.then,Aw),Mw=function(){Nw(t_)}):Uw?Mw=function(){Xw.nextTick(t_)}:(Hw=Yw(Hw,jw),Mw=function(){Hw(t_)}):(Pw=!0,Iw=qw.createTextNode(""),new $w(t_).observe(Iw,{characterData:!0}),Mw=function(){Iw.data=Pw=!Pw}),Kw=function(t){Jw.head||Mw(),Jw.add(t)}}var e_=Kw,i_=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},n_=a.Promise,o_="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,s_=!o_&&!yc&&"object"==typeof window&&"object"==typeof document,r_=a,a_=n_,h_=M,l_=Xe,d_=fn,c_=fe,u_=s_,p_=o_,m_=yt,f_=a_&&a_.prototype,g_=c_("species"),v_=!1,y_=h_(r_.PromiseRejectionEvent),b_=l_("Promise",(function(){var t=d_(a_),e=t!==String(a_);if(!e&&66===m_)return!0;if(!f_.catch||!f_.finally)return!0;if(!m_||m_<51||!/native code/.test(t)){var i=new a_((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((i.constructor={})[g_]=n,!(v_=i.then((function(){}))instanceof n))return!0}return!e&&(u_||p_)&&!y_})),w_={CONSTRUCTOR:b_,REJECTION_EVENT:y_,SUBCLASSING:v_},__={},x_=Nt,k_=TypeError,S_=function(t){var e,i;this.promise=new t((function(t,n){if(void 0!==e||void 0!==i)throw new k_("Bad Promise constructor");e=t,i=n})),this.resolve=x_(e),this.reject=x_(i)};__.f=function(t){return new S_(t)};var D_,C_,T_=Pi,E_=yc,O_=a,M_=R,P_=ms,I_=zs,A_=Ub,N_=Nt,R_=M,F_=nt,L_=Xb,j_=tw,Y_=Ew.set,z_=e_,H_=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}},G_=i_,W_=Rw,B_=ir,V_=n_,U_=w_,$_=__,q_="Promise",X_=U_.CONSTRUCTOR,Q_=U_.REJECTION_EVENT,Z_=B_.getterFor(q_),K_=B_.set,J_=V_&&V_.prototype,tx=V_,ex=J_,ix=O_.TypeError,nx=O_.document,ox=O_.process,sx=$_.f,rx=sx,ax=!!(nx&&nx.createEvent&&O_.dispatchEvent),hx="unhandledrejection",lx=function(t){var e;return!(!F_(t)||!R_(e=t.then))&&e},dx=function(t,e){var i,n,o,s=e.value,r=1===e.state,a=r?t.ok:t.fail,h=t.resolve,l=t.reject,d=t.domain;try{a?(r||(2===e.rejection&&fx(e),e.rejection=1),!0===a?i=s:(d&&d.enter(),i=a(s),d&&(d.exit(),o=!0)),i===t.promise?l(new ix("Promise-chain cycle")):(n=lx(i))?M_(n,i,h,l):h(i)):l(s)}catch(t){d&&!o&&d.exit(),l(t)}},cx=function(t,e){t.notified||(t.notified=!0,z_((function(){for(var i,n=t.reactions;i=n.get();)dx(i,t);t.notified=!1,e&&!t.rejection&&px(t)})))},ux=function(t,e,i){var n,o;ax?((n=nx.createEvent("Event")).promise=e,n.reason=i,n.initEvent(t,!1,!0),O_.dispatchEvent(n)):n={promise:e,reason:i},!Q_&&(o=O_["on"+t])?o(n):t===hx&&H_("Unhandled promise rejection",i)},px=function(t){M_(Y_,O_,(function(){var e,i=t.facade,n=t.value;if(mx(t)&&(e=G_((function(){E_?ox.emit("unhandledRejection",n,i):ux(hx,i,n)})),t.rejection=E_||mx(t)?2:1,e.error))throw e.value}))},mx=function(t){return 1!==t.rejection&&!t.parent},fx=function(t){M_(Y_,O_,(function(){var e=t.facade;E_?ox.emit("rejectionHandled",e):ux("rejectionhandled",e,t.value)}))},gx=function(t,e,i){return function(n){t(e,n,i)}},vx=function(t,e,i){t.done||(t.done=!0,i&&(t=i),t.value=e,t.state=2,cx(t,!0))},yx=function(t,e,i){if(!t.done){t.done=!0,i&&(t=i);try{if(t.facade===e)throw new ix("Promise can't be resolved itself");var n=lx(e);n?z_((function(){var i={done:!1};try{M_(n,e,gx(yx,i,t),gx(vx,i,t))}catch(e){vx(i,e,t)}})):(t.value=e,t.state=1,cx(t,!1))}catch(e){vx({done:!1},e,t)}}};X_&&(ex=(tx=function(t){L_(this,ex),N_(t),M_(D_,this);var e=Z_(this);try{t(gx(yx,e),gx(vx,e))}catch(t){vx(e,t)}}).prototype,(D_=function(t){K_(this,{type:q_,done:!1,notified:!1,parent:!1,reactions:new W_,rejection:!1,state:0,value:void 0})}).prototype=P_(ex,"then",(function(t,e){var i=Z_(this),n=sx(j_(this,tx));return i.parent=!0,n.ok=!R_(t)||t,n.fail=R_(e)&&e,n.domain=E_?ox.domain:void 0,0===i.state?i.reactions.add(n):z_((function(){dx(n,i)})),n.promise})),C_=function(){var t=new D_,e=Z_(t);this.promise=t,this.resolve=gx(yx,e),this.reject=gx(vx,e)},$_.f=sx=function(t){return t===tx||void 0===t?new C_(t):rx(t)}),T_({global:!0,constructor:!0,wrap:!0,forced:X_},{Promise:tx}),I_(tx,q_,!1,!0),A_(q_);var bx=n_,wx=w_.CONSTRUCTOR||!ju((function(t){bx.all(t).then(void 0,(function(){}))})),_x=R,xx=Nt,kx=__,Sx=i_,Dx=bb;Pi({target:"Promise",stat:!0,forced:wx},{all:function(t){var e=this,i=kx.f(e),n=i.resolve,o=i.reject,s=Sx((function(){var i=xx(e.resolve),s=[],r=0,a=1;Dx(t,(function(t){var h=r++,l=!1;a++,_x(i,e,t).then((function(t){l||(l=!0,s[h]=t,--a||n(s))}),o)})),--a||n(s)}));return s.error&&o(s.value),i.promise}});var Cx=Pi,Tx=w_.CONSTRUCTOR;n_&&n_.prototype,Cx({target:"Promise",proto:!0,forced:Tx,real:!0},{catch:function(t){return this.then(void 0,t)}});var Ex=R,Ox=Nt,Mx=__,Px=i_,Ix=bb;Pi({target:"Promise",stat:!0,forced:wx},{race:function(t){var e=this,i=Mx.f(e),n=i.reject,o=Px((function(){var o=Ox(e.resolve);Ix(t,(function(t){Ex(o,e,t).then(i.resolve,n)}))}));return o.error&&n(o.value),i.promise}});var Ax=R,Nx=__;Pi({target:"Promise",stat:!0,forced:w_.CONSTRUCTOR},{reject:function(t){var e=Nx.f(this);return Ax(e.reject,void 0,t),e.promise}});var Rx=si,Fx=nt,Lx=__,jx=function(t,e){if(Rx(t),Fx(e)&&e.constructor===t)return e;var i=Lx.f(t);return(0,i.resolve)(e),i.promise},Yx=Pi,zx=n_,Hx=w_.CONSTRUCTOR,Gx=jx,Wx=lt("Promise"),Bx=!Hx;Yx({target:"Promise",stat:!0,forced:!0},{resolve:function(t){return Gx(Bx&&this===Wx?zx:this,t)}});var Vx=R,Ux=Nt,$x=__,qx=i_,Xx=bb;Pi({target:"Promise",stat:!0,forced:wx},{allSettled:function(t){var e=this,i=$x.f(e),n=i.resolve,o=i.reject,s=qx((function(){var i=Ux(e.resolve),o=[],s=0,r=1;Xx(t,(function(t){var a=s++,h=!1;r++,Vx(i,e,t).then((function(t){h||(h=!0,o[a]={status:"fulfilled",value:t},--r||n(o))}),(function(t){h||(h=!0,o[a]={status:"rejected",reason:t},--r||n(o))}))})),--r||n(o)}));return s.error&&o(s.value),i.promise}});var Qx=R,Zx=Nt,Kx=lt,Jx=__,tk=i_,ek=bb,ik="No one promise resolved";Pi({target:"Promise",stat:!0,forced:wx},{any:function(t){var e=this,i=Kx("AggregateError"),n=Jx.f(e),o=n.resolve,s=n.reject,r=tk((function(){var n=Zx(e.resolve),r=[],a=0,h=1,l=!1;ek(t,(function(t){var d=a++,c=!1;h++,Qx(n,e,t).then((function(t){c||l||(l=!0,o(t))}),(function(t){c||l||(c=!0,r[d]=t,--h||s(new i(r,ik)))}))})),--h||s(new i(r,ik))}));return r.error&&s(r.value),n.promise}});var nk=Pi,ok=n_,sk=h,rk=lt,ak=M,hk=tw,lk=jx,dk=ok&&ok.prototype;nk({target:"Promise",proto:!0,real:!0,forced:!!ok&&sk((function(){dk.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=hk(this,rk("Promise")),i=ak(t);return this.then(i?function(i){return lk(e,t()).then((function(){return i}))}:t,i?function(i){return lk(e,t()).then((function(){throw i}))}:t)}});var ck=ot.Promise,uk=__;Pi({target:"Promise",stat:!0},{withResolvers:function(){var t=uk.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var pk=ck,mk=__,fk=i_;Pi({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=mk.f(this),i=fk(t);return(i.error?e.reject:e.resolve)(i.value),e.promise}});var gk=pk,vk=vm;!function(t){var e=Hy.default,i=ji,n=fd,o=Ey,s=Fy,r=Gy,a=rp,h=My,l=gk,d=vk,c=Tp;function u(){t.exports=u=function(){return m},t.exports.__esModule=!0,t.exports.default=t.exports;var p,m={},f=Object.prototype,g=f.hasOwnProperty,v=i||function(t,e,i){t[e]=i.value},y="function"==typeof n?n:{},b=y.iterator||"@@iterator",w=y.asyncIterator||"@@asyncIterator",_=y.toStringTag||"@@toStringTag";function x(t,e,n){return i(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{x({},"")}catch(p){x=function(t,e,i){return t[e]=i}}function k(t,e,i,n){var s=e&&e.prototype instanceof M?e:M,r=o(s.prototype),a=new G(n||[]);return v(r,"_invoke",{value:j(t,i,a)}),r}function S(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}m.wrap=k;var D="suspendedStart",C="suspendedYield",T="executing",E="completed",O={};function M(){}function P(){}function I(){}var A={};x(A,b,(function(){return this}));var N=s&&s(s(W([])));N&&N!==f&&g.call(N,b)&&(A=N);var R=I.prototype=M.prototype=o(A);function F(t){var e;r(e=["next","throw","return"]).call(e,(function(e){x(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,i){function n(o,s,r,a){var h=S(t[o],t,s);if("throw"!==h.type){var l=h.arg,d=l.value;return d&&"object"==e(d)&&g.call(d,"__await")?i.resolve(d.__await).then((function(t){n("next",t,r,a)}),(function(t){n("throw",t,r,a)})):i.resolve(d).then((function(t){l.value=t,r(l)}),(function(t){return n("throw",t,r,a)}))}a(h.arg)}var o;v(this,"_invoke",{value:function(t,e){function s(){return new i((function(i,o){n(t,e,i,o)}))}return o=o?o.then(s,s):s()}})}function j(t,e,i){var n=D;return function(o,s){if(n===T)throw new Error("Generator is already running");if(n===E){if("throw"===o)throw s;return{value:p,done:!0}}for(i.method=o,i.arg=s;;){var r=i.delegate;if(r){var a=Y(r,i);if(a){if(a===O)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(n===D)throw n=E,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n=T;var h=S(t,e,i);if("normal"===h.type){if(n=i.done?E:C,h.arg===O)continue;return{value:h.arg,done:i.done}}"throw"===h.type&&(n=E,i.method="throw",i.arg=h.arg)}}}function Y(t,e){var i=e.method,n=t.iterator[i];if(n===p)return e.delegate=null,"throw"===i&&t.iterator.return&&(e.method="return",e.arg=p,Y(t,e),"throw"===e.method)||"return"!==i&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+i+"' method")),O;var o=S(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,O;var s=o.arg;return s?s.done?(e[t.resultName]=s.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=p),e.delegate=null,O):s:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,O)}function z(t){var e,i={tryLoc:t[0]};1 in t&&(i.catchLoc=t[1]),2 in t&&(i.finallyLoc=t[2],i.afterLoc=t[3]),a(e=this.tryEntries).call(e,i)}function H(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],r(t).call(t,z,this),this.reset(!0)}function W(t){if(t||""===t){var i=t[b];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(g.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=p,e.done=!0,e};return o.next=o}}throw new TypeError(e(t)+" is not iterable")}return P.prototype=I,v(R,"constructor",{value:I,configurable:!0}),v(I,"constructor",{value:P,configurable:!0}),P.displayName=x(I,_,"GeneratorFunction"),m.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===P||"GeneratorFunction"===(e.displayName||e.name))},m.mark=function(t){return h?h(t,I):(t.__proto__=I,x(t,_,"GeneratorFunction")),t.prototype=o(R),t},m.awrap=function(t){return{__await:t}},F(L.prototype),x(L.prototype,w,(function(){return this})),m.AsyncIterator=L,m.async=function(t,e,i,n,o){void 0===o&&(o=l);var s=new L(k(t,e,i,n),o);return m.isGeneratorFunction(e)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},F(R),x(R,_,"Generator"),x(R,b,(function(){return this})),x(R,"toString",(function(){return"[object Generator]"})),m.keys=function(t){var e=Object(t),i=[];for(var n in e)a(i).call(i,n);return d(i).call(i),function t(){for(;i.length;){var n=i.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},m.values=W,G.prototype={constructor:G,reset:function(t){var e;if(this.prev=0,this.next=0,this.sent=this._sent=p,this.done=!1,this.delegate=null,this.method="next",this.arg=p,r(e=this.tryEntries).call(e,H),!t)for(var i in this)"t"===i.charAt(0)&&g.call(this,i)&&!isNaN(+c(i).call(i,1))&&(this[i]=p)},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 i(i,n){return s.type="throw",s.arg=t,e.next=i,n&&(e.method="next",e.arg=p),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var r=g.call(o,"catchLoc"),a=g.call(o,"finallyLoc");if(r&&a){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(r){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&g.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,O):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),O},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),H(i),O}},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;H(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:W(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=p),O}},m}t.exports=u,t.exports.__esModule=!0,t.exports.default=t.exports}(Yy);var yk=(0,Yy.exports)(),bk=yk;try{regeneratorRuntime=yk}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=yk:Function("r","regeneratorRuntime = r")(yk)}var wk=o(bk),_k={exports:{}},xk=h((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),kk=h,Sk=nt,Dk=k,Ck=xk,Tk=Object.isExtensible,Ek=kk((function(){Tk(1)}))||Ck?function(t){return!!Sk(t)&&(!Ck||"ArrayBuffer"!==Dk(t))&&(!Tk||Tk(t))}:Tk,Ok=!h((function(){return Object.isExtensible(Object.preventExtensions({}))})),Mk=Pi,Pk=b,Ik=fo,Ak=nt,Nk=ee,Rk=ti.f,Fk=Zo,Lk=ts,jk=Ek,Yk=Ok,zk=!1,Hk=re("meta"),Gk=0,Wk=function(t){Rk(t,Hk,{value:{objectID:"O"+Gk++,weakData:{}}})},Bk=_k.exports={enable:function(){Bk.enable=function(){},zk=!0;var t=Fk.f,e=Pk([].splice),i={};i[Hk]=1,t(i).length&&(Fk.f=function(i){for(var n=t(i),o=0,s=n.length;o<s;o++)if(n[o]===Hk){e(n,o,1);break}return n},Mk({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Lk.f}))},fastKey:function(t,e){if(!Ak(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Nk(t,Hk)){if(!jk(t))return"F";if(!e)return"E";Wk(t)}return t[Hk].objectID},getWeakData:function(t,e){if(!Nk(t,Hk)){if(!jk(t))return!0;if(!e)return!1;Wk(t)}return t[Hk].weakData},onFreeze:function(t){return Yk&&zk&&jk(t)&&!Nk(t,Hk)&&Wk(t),t}};Ik[Hk]=!0;var Vk=_k.exports,Uk=Pi,$k=a,qk=Vk,Xk=h,Qk=bi,Zk=bb,Kk=Xb,Jk=M,tS=nt,eS=q,iS=zs,nS=ti.f,oS=dr.forEach,sS=I,rS=ir.set,aS=ir.getterFor,hS=function(t,e,i){var n,o=-1!==t.indexOf("Map"),s=-1!==t.indexOf("Weak"),r=o?"set":"add",a=$k[t],h=a&&a.prototype,l={};if(sS&&Jk(a)&&(s||h.forEach&&!Xk((function(){(new a).entries().next()})))){var d=(n=e((function(e,i){rS(Kk(e,d),{type:t,collection:new a}),eS(i)||Zk(i,e[r],{that:e,AS_ENTRIES:o})}))).prototype,c=aS(t);oS(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"===t||"set"===t;!(t in h)||s&&"clear"===t||Qk(d,t,(function(i,n){var o=c(this).collection;if(!e&&s&&!tS(i))return"get"===t&&void 0;var r=o[t](0===i?0:i,n);return e?this:r}))})),s||nS(d,"size",{configurable:!0,get:function(){return c(this).collection.size}})}else n=i.getConstructor(e,t,o,r),qk.enable();return iS(n,t,!1,!0),l[t]=n,Uk({global:!0,forced:!0},l),s||i.setStrong(n,t,o),n},lS=ms,dS=Qo,cS=gs,uS=function(t,e,i){for(var n in e)i&&i.unsafe&&t[n]?t[n]=e[n]:lS(t,n,e[n],i);return t},pS=Je,mS=Xb,fS=q,gS=bb,vS=Sl,yS=Dl,bS=Ub,wS=I,_S=Vk.fastKey,xS=ir.set,kS=ir.getterFor,SS={getConstructor:function(t,e,i,n){var o=t((function(t,o){mS(t,s),xS(t,{type:e,index:dS(null),first:void 0,last:void 0,size:0}),wS||(t.size=0),fS(o)||gS(o,t[n],{that:t,AS_ENTRIES:i})})),s=o.prototype,r=kS(e),a=function(t,e,i){var n,o,s=r(t),a=h(t,e);return a?a.value=i:(s.last=a={index:o=_S(e,!0),key:e,value:i,previous:n=s.last,next:void 0,removed:!1},s.first||(s.first=a),n&&(n.next=a),wS?s.size++:t.size++,"F"!==o&&(s.index[o]=a)),t},h=function(t,e){var i,n=r(t),o=_S(e);if("F"!==o)return n.index[o];for(i=n.first;i;i=i.next)if(i.key===e)return i};return uS(s,{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,wS?t.size=0:this.size=0},delete:function(t){var e=this,i=r(e),n=h(e,t);if(n){var o=n.next,s=n.previous;delete i.index[n.index],n.removed=!0,s&&(s.next=o),o&&(o.previous=s),i.first===n&&(i.first=o),i.last===n&&(i.last=s),wS?i.size--:e.size--}return!!n},forEach:function(t){for(var e,i=r(this),n=pS(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:i.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!h(this,t)}}),uS(s,i?{get:function(t){var e=h(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),wS&&cS(s,"size",{configurable:!0,get:function(){return r(this).size}}),o},setStrong:function(t,e,i){var n=e+" Iterator",o=kS(e),s=kS(n);vS(t,e,(function(t,e){xS(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=s(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)?yS("keys"===e?i.key:"values"===e?i.value:[i.key,i.value],!1):(t.target=void 0,yS(void 0,!0))}),i?"entries":"values",!i,!0),bS(e)}};hS("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),SS);var DS=o(ot.Map),CS=dr.some;Pi({target:"Array",proto:!0,forced:!vc("some")},{some:function(t){return CS(this,t,arguments.length>1?arguments[1]:void 0)}});var TS=ic("Array","some"),ES=dt,OS=TS,MS=Array.prototype,PS=o((function(t){var e=t.some;return t===MS||ES(MS,t)&&e===MS.some?OS:e})),IS=ic("Array","keys"),AS=cn,NS=ee,RS=dt,FS=IS,LS=Array.prototype,jS={DOMTokenList:!0,NodeList:!0},YS=o((function(t){var e=t.keys;return t===LS||RS(LS,t)&&e===LS.keys||NS(jS,AS(t))?FS:e})),zS=rs,HS=Math.floor,GS=function(t,e){var i=t.length,n=HS(i/2);return i<8?WS(t,e):BS(t,GS(zS(t,0,n),e),GS(zS(t,n),e),e)},WS=function(t,e){for(var i,n,o=t.length,s=1;s<o;){for(n=s,i=t[s];n&&e(t[n-1],i)>0;)t[n]=t[--n];n!==s++&&(t[n]=i)}return t},BS=function(t,e,i,n){for(var o=e.length,s=i.length,r=0,a=0;r<o||a<s;)t[r+a]=r<o&&a<s?n(e[r],i[a])<=0?e[r++]:i[a++]:r<o?e[r++]:i[a++];return t},VS=GS,US=ct.match(/firefox\/(\d+)/i),$S=!!US&&+US[1],qS=/MSIE|Trident/.test(ct),XS=ct.match(/AppleWebKit\/(\d+)\./),QS=!!XS&&+XS[1],ZS=Pi,KS=b,JS=Nt,tD=Kt,eD=Xi,iD=_m,nD=no,oD=h,sD=VS,rD=vc,aD=$S,hD=qS,lD=yt,dD=QS,cD=[],uD=KS(cD.sort),pD=KS(cD.push),mD=oD((function(){cD.sort(void 0)})),fD=oD((function(){cD.sort(null)})),gD=rD("sort"),vD=!oD((function(){if(lD)return lD<70;if(!(aD&&aD>3)){if(hD)return!0;if(dD)return dD<603;var t,e,i,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)cD.push({k:e+n,v:i})}for(cD.sort((function(t,e){return e.v-t.v})),n=0;n<cD.length;n++)e=cD[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));ZS({target:"Array",proto:!0,forced:mD||!fD||!gD||!vD},{sort:function(t){void 0!==t&&JS(t);var e=tD(this);if(vD)return void 0===t?uD(e):uD(e,t);var i,n,o=[],s=eD(e);for(n=0;n<s;n++)n in e&&pD(o,e[n]);for(sD(o,function(t){return function(e,i){return void 0===i?-1:void 0===e?1:void 0!==t?+t(e,i)||0:nD(e)>nD(i)?1:-1}}(t)),i=eD(o),n=0;n<i;)e[n]=o[n++];for(;n<s;)iD(e,n++);return e}});var yD=ic("Array","sort"),bD=dt,wD=yD,_D=Array.prototype,xD=o((function(t){var e=t.sort;return t===_D||bD(_D,t)&&e===_D.sort?wD:e})),kD=ic("Array","values"),SD=cn,DD=ee,CD=dt,TD=kD,ED=Array.prototype,OD={DOMTokenList:!0,NodeList:!0},MD=o((function(t){var e=t.values;return t===ED||CD(ED,t)&&e===ED.values||DD(OD,SD(t))?TD:e})),PD=o(Ad),ID=ic("Array","entries"),AD=cn,ND=ee,RD=dt,FD=ID,LD=Array.prototype,jD={DOMTokenList:!0,NodeList:!0},YD=o((function(t){var e=t.entries;return t===LD||RD(LD,t)&&e===LD.entries||ND(jD,AD(t))?FD:e}));let zD;const HD=new Uint8Array(16);function GD(){if(!zD&&(zD="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!zD))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zD(HD)}const WD=[];for(let t=0;t<256;++t)WD.push((t+256).toString(16).slice(1));var BD={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function VD(t,e,i){if(BD.randomUUID&&!e&&!t)return BD.randomUUID();const n=(t=t||{}).random||(t.rng||GD)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){i=i||0;for(let t=0;t<16;++t)e[i+t]=n[t];return e}return function(t,e=0){return WD[t[e+0]]+WD[t[e+1]]+WD[t[e+2]]+WD[t[e+3]]+"-"+WD[t[e+4]]+WD[t[e+5]]+"-"+WD[t[e+6]]+WD[t[e+7]]+"-"+WD[t[e+8]]+WD[t[e+9]]+"-"+WD[t[e+10]]+WD[t[e+11]]+WD[t[e+12]]+WD[t[e+13]]+WD[t[e+14]]+WD[t[e+15]]}(n)}function UD(t){return"string"==typeof t||"number"==typeof t}var $D=function(){function t(i){e(this,t),Hd(this,"_queue",[]),Hd(this,"_timeout",null),Hd(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(i)}return zd(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=If((function(){t.flush()}),this.delay))}},{key:"flush",value:function(){var t,e;hm(t=Ym(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 s=0;s<i.replace.length;s++){var r=i.replace[s];o.push({name:r,original:e[r]}),n.replace(e,r)}return n._extended={object:e,methods:o},n}}]),t}(),qD=function(){function t(){e(this,t),Hd(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Hd(this,"subscribe",t.prototype.on),Hd(this,"unsubscribe",t.prototype.off)}return zd(t,[{key:"_trigger",value:function(t,e,i){var n,o;if("*"===t)throw new Error("Cannot trigger event *");hm(n=Yp(o=[]).call(o,Ap(this._subscribers[t]),Ap(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]=Mc(i=this._subscribers[t]).call(i,(function(t){return t!==e}))}}]),t}();hS("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),SS);var XD=o(ot.Set),QD=o(xu);function ZD(t,e){var i=void 0!==Np&&Bu(t)||t["@@iterator"];if(!i){if(qp(t)||(i=function(t,e){var i;if(t){if("string"==typeof t)return KD(t,e);var n=zp(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Hu(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?KD(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,r=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return r=t.done,t},e:function(t){a=!0,s=t},f:function(){try{r||null==i.return||i.return()}finally{if(a)throw s}}}}function KD(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var JD=function(t){function i(t){e(this,i),this._pairs=t}return zd(i,[{key:t,value:wk.mark((function t(){var e,i,n,o,s;return wk.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=ZD(this._pairs),t.prev=1,e.s();case 3:if((i=e.n()).done){t.next=9;break}return n=Ip(i.value,2),o=n[0],s=n[1],t.next=7,[o,s];case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"entries",value:wk.mark((function t(){var e,i,n,o,s;return wk.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=ZD(this._pairs),t.prev=1,e.s();case 3:if((i=e.n()).done){t.next=9;break}return n=Ip(i.value,2),o=n[0],s=n[1],t.next=7,[o,s];case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"keys",value:wk.mark((function t(){var e,i,n,o;return wk.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=ZD(this._pairs),t.prev=1,e.s();case 3:if((i=e.n()).done){t.next=9;break}return n=Ip(i.value,1),o=n[0],t.next=7,o;case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"values",value:wk.mark((function t(){var e,i,n,o;return wk.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=ZD(this._pairs),t.prev=1,e.s();case 3:if((i=e.n()).done){t.next=9;break}return n=Ip(i.value,2),o=n[1],t.next=7,o;case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),e.e(t.t0);case 14:return t.prev=14,e.f(),t.finish(14);case 17:case"end":return t.stop()}}),t,this,[[1,11,14,17]])}))},{key:"toIdArray",value:function(){var t;return Fc(t=Ap(this._pairs)).call(t,(function(t){return t[0]}))}},{key:"toItemArray",value:function(){var t;return Fc(t=Ap(this._pairs)).call(t,(function(t){return t[1]}))}},{key:"toEntryArray",value:function(){return Ap(this._pairs)}},{key:"toObjectMap",value:function(){var t,e=hf(null),i=ZD(this._pairs);try{for(i.s();!(t=i.n()).done;){var n=Ip(t.value,2),o=n[0],s=n[1];e[o]=s}}catch(t){i.e(t)}finally{i.f()}return e}},{key:"toMap",value:function(){return new DS(this._pairs)}},{key:"toIdSet",value:function(){return new XD(this.toIdArray())}},{key:"toItemSet",value:function(){return new XD(this.toItemArray())}},{key:"cache",value:function(){return new i(Ap(this._pairs))}},{key:"distinct",value:function(t){var e,i=new XD,n=ZD(this._pairs);try{for(n.s();!(e=n.n()).done;){var o=Ip(e.value,2),s=o[0],r=o[1];i.add(t(r,s))}}catch(t){n.e(t)}finally{n.f()}return i}},{key:"filter",value:function(t){var e=this._pairs;return new i({[PD]:()=>wk.mark((function i(){var n,o,s,r,a;return wk.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:n=ZD(e),i.prev=1,n.s();case 3:if((o=n.n()).done){i.next=10;break}if(s=Ip(o.value,2),r=s[0],a=s[1],!t(a,r)){i.next=8;break}return i.next=8,[r,a];case 8:i.next=3;break;case 10:i.next=15;break;case 12:i.prev=12,i.t0=i.catch(1),n.e(i.t0);case 15:return i.prev=15,n.f(),i.finish(15);case 18:case"end":return i.stop()}}),i,null,[[1,12,15,18]])}))()})}},{key:"forEach",value:function(t){var e,i=ZD(this._pairs);try{for(i.s();!(e=i.n()).done;){var n=Ip(e.value,2),o=n[0];t(n[1],o)}}catch(t){i.e(t)}finally{i.f()}}},{key:"map",value:function(t){var e=this._pairs;return new i({[PD]:()=>wk.mark((function i(){var n,o,s,r,a;return wk.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:n=ZD(e),i.prev=1,n.s();case 3:if((o=n.n()).done){i.next=9;break}return s=Ip(o.value,2),r=s[0],a=s[1],i.next=7,[r,t(a,r)];case 7:i.next=3;break;case 9:i.next=14;break;case 11:i.prev=11,i.t0=i.catch(1),n.e(i.t0);case 14:return i.prev=14,n.f(),i.finish(14);case 17:case"end":return i.stop()}}),i,null,[[1,11,14,17]])}))()})}},{key:"max",value:function(t){var e=QD(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 s=Ip(i.value,2),r=s[0],a=s[1],h=t(a,r);h>o&&(o=h,n=a)}return n}},{key:"min",value:function(t){var e=QD(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 s=Ip(i.value,2),r=s[0],a=s[1],h=t(a,r);h<o&&(o=h,n=a)}return n}},{key:"reduce",value:function(t,e){var i,n=ZD(this._pairs);try{for(n.s();!(i=n.n()).done;){var o=Ip(i.value,2),s=o[0];e=t(e,o[1],s)}}catch(t){n.e(t)}finally{n.f()}return e}},{key:"sort",value:function(t){var e=this;return new i({[PD]:function(){var i;return QD(xD(i=Ap(e._pairs)).call(i,(function(e,i){var n=Ip(e,2),o=n[0],s=n[1],r=Ip(i,2),a=r[0],h=r[1];return t(s,h,o,a)})))}})}}]),i}(PD);function tC(t,e){var i=Zp(t);if(oy){var n=oy(t);e&&(n=Mc(n).call(n,(function(e){return py(t,e).enumerable}))),i.push.apply(i,n)}return i}function eC(t){for(var e=1;e<arguments.length;e++){var i,n,o=null!=arguments[e]?arguments[e]:{};e%2?hm(i=tC(Object(o),!0)).call(i,(function(e){Hd(t,e,o[e])})):yy?Dy(t,yy(o)):hm(n=tC(Object(o))).call(n,(function(e){Cy(t,e,py(o,e))}))}return t}function iC(t,e){var i=void 0!==Np&&Bu(t)||t["@@iterator"];if(!i){if(qp(t)||(i=function(t,e){var i;if(t){if("string"==typeof t)return nC(t,e);var n=zp(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Hu(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nC(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,r=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return r=t.done,t},e:function(t){a=!0,s=t},f:function(){try{r||null==i.return||i.return()}finally{if(a)throw s}}}}function nC(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function oC(t){var e=function(){if("undefined"==typeof Reflect||!ny)return!1;if(ny.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ny(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=jy(t);if(e){var o=jy(this).constructor;i=ny(n,arguments,o)}else i=n.apply(this,arguments);return Ry(this,i)}}var sC=function(t){Ny(n,t);var i=oC(n);function n(t,o){var s;return e(this,n),Hd(Ty(s=i.call(this)),"_queue",null),t&&!qp(t)&&(o=t,t=[]),s._options=o||{},s._data=new DS,s.length=0,s._idProp=s._options.fieldId||"id",t&&t.length&&s.add(t),s.setOptions(o),s}return zd(n,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(t){t&&void 0!==t.queue&&(!1===t.queue?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=$D.extend(this,{replace:["add","update","remove"]})),t.queue&&"object"==typeof t.queue&&this._queue.setOptions(t.queue)))}},{key:"add",value:function(t,e){var i,n=this,o=[];if(qp(t)){var s=Fc(t).call(t,(function(t){return t[n._idProp]}));if(PS(s).call(s,(function(t){return n._data.has(t)})))throw new Error("A duplicate id was found in the parameter array.");for(var r=0,a=t.length;r<a;r++)i=this._addItem(t[r]),o.push(i)}else{if(!t||"object"!=typeof 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=[],s=[],r=[],a=this._idProp,h=function(t){var e=t[a];if(null!=e&&i._data.has(e)){var h=t,l=tf({},i._data.get(e)),d=i._updateItem(h);o.push(d),r.push(h),s.push(l)}else{var c=i._addItem(t);n.push(c)}};if(qp(t))for(var l=0,d=t.length;l<d;l++)t[l]&&"object"==typeof t[l]?h(t[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!t||"object"!=typeof t)throw new Error("Unknown dataType");h(t)}if(n.length&&this._trigger("add",{items:n},e),o.length){var c={items:o,oldData:s,data:r};this._trigger("update",c,e)}return Yp(n).call(n,o)}},{key:"updateOnly",value:function(t,e){var i,n=this;qp(t)||(t=[t]);var o=Fc(i=Fc(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],s=function(t){for(var e,i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return Av.apply(void 0,Yp(e=[{},t]).call(e,n))}(e,i);return n._data.set(o,s),{id:o,oldData:e,updatedData:s}}));if(o.length){var s={items:Fc(o).call(o,(function(t){return t.id})),oldData:Fc(o).call(o,(function(t){return t.oldData})),data:Fc(o).call(o,(function(t){return t.updatedData}))};return this._trigger("update",s,e),s.items}return[]}},{key:"get",value:function(t,e){var i=void 0,n=void 0,o=void 0;UD(t)?(i=t,o=e):qp(t)?(n=t,o=e):o=t;var s,r=o&&"Object"===o.returnType?"Object":"Array",a=o&&Mc(o),h=[],l=void 0,d=void 0,c=void 0;if(null!=i)(l=this._data.get(i))&&a&&!a(l)&&(l=void 0);else if(null!=n)for(var u=0,p=n.length;u<p;u++)null==(l=this._data.get(n[u]))||a&&!a(l)||h.push(l);else for(var m,f=0,g=(d=Ap(YS(m=this._data).call(m))).length;f<g;f++)c=d[f],null==(l=this._data.get(c))||a&&!a(l)||h.push(l);if(o&&o.order&&null==i&&this._sort(h,o.order),o&&o.fields){var v=o.fields;if(null!=i&&null!=l)l=this._filterFields(l,v);else for(var y=0,b=h.length;y<b;y++)h[y]=this._filterFields(h[y],v)}if("Object"==r){for(var w={},_=0,x=h.length;_<x;_++){var k=h[_];w[k[this._idProp]]=k}return w}return null!=i?null!==(s=l)&&void 0!==s?s:null:h}},{key:"getIds",value:function(t){var e=this._data,i=t&&Mc(t),n=t&&t.order,o=Ap(YS(e).call(e)),s=[];if(i)if(n){for(var r=[],a=0,h=o.length;a<h;a++){var l=o[a],d=this._data.get(l);null!=d&&i(d)&&r.push(d)}this._sort(r,n);for(var c=0,u=r.length;c<u;c++)s.push(r[c][this._idProp])}else for(var p=0,m=o.length;p<m;p++){var f=o[p],g=this._data.get(f);null!=g&&i(g)&&s.push(g[this._idProp])}else if(n){for(var v=[],y=0,b=o.length;y<b;y++){var w=o[y];v.push(e.get(w))}this._sort(v,n);for(var _=0,x=v.length;_<x;_++)s.push(v[_][this._idProp])}else for(var k=0,S=o.length;k<S;k++){var D=o[k],C=e.get(D);null!=C&&s.push(C[this._idProp])}return s}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(t,e){var i=e&&Mc(e),n=this._data,o=Ap(YS(n).call(n));if(e&&e.order)for(var s=this.get(e),r=0,a=s.length;r<a;r++){var h=s[r];t(h,h[this._idProp])}else for(var l=0,d=o.length;l<d;l++){var c=o[l],u=this._data.get(c);null==u||i&&!i(u)||t(u,c)}}},{key:"map",value:function(t,e){for(var i=e&&Mc(e),n=[],o=this._data,s=Ap(YS(o).call(o)),r=0,a=s.length;r<a;r++){var h=s[r],l=this._data.get(h);null==l||i&&!i(l)||n.push(t(l,h))}return e&&e.order&&this._sort(n,e.order),n}},{key:"_filterFields",value:function(t,e){var i;return t?Sc(i=qp(e)?e:Zp(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;xD(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");xD(t).call(t,e)}}},{key:"remove",value:function(t,e){for(var i=[],n=[],o=qp(t)?t:[t],s=0,r=o.length;s<r;s++){var a=this._remove(o[s]);if(a){var h=a[this._idProp];null!=h&&(i.push(h),n.push(a))}}return i.length&&this._trigger("remove",{items:i,oldData:n},e),i}},{key:"_remove",value:function(t){var e;if(UD(t)?e=t:t&&"object"==typeof 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=Ap(YS(e=this._data).call(e)),n=[],o=0,s=i.length;o<s;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,i,n=null,o=null,s=iC(MD(e=this._data).call(e));try{for(s.s();!(i=s.n()).done;){var r=i.value,a=r[t];"number"==typeof a&&(null==o||a>o)&&(n=r,o=a)}}catch(t){s.e(t)}finally{s.f()}return n||null}},{key:"min",value:function(t){var e,i,n=null,o=null,s=iC(MD(e=this._data).call(e));try{for(s.s();!(i=s.n()).done;){var r=i.value,a=r[t];"number"==typeof a&&(null==o||a<o)&&(n=r,o=a)}}catch(t){s.e(t)}finally{s.f()}return n||null}},{key:"distinct",value:function(t){for(var e=this._data,i=Ap(YS(e).call(e)),n=[],o=0,s=0,r=i.length;s<r;s++){for(var a=i[s],h=e.get(a)[t],l=!1,d=0;d<o;d++)if(n[d]==h){l=!0;break}l||void 0===h||(n[o]=h,o++)}return n}},{key:"_addItem",value:function(t){var e=function(t,e){return null==t[e]&&(t[e]=VD()),t}(t,this._idProp),i=e[this._idProp];if(this._data.has(i))throw new Error("Cannot add item: item with id "+i+" already exists");return this._data.set(i,e),++this.length,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: "+uf(t)+")");var i=this._data.get(e);if(!i)throw new Error("Cannot update item: no item with id "+e+" found");return this._data.set(e,eC(eC({},i),t)),e}},{key:"stream",value:function(t){if(t){var e=this._data;return new JD({[PD]:()=>wk.mark((function i(){var n,o,s,r;return wk.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:n=iC(t),i.prev=1,n.s();case 3:if((o=n.n()).done){i.next=11;break}if(s=o.value,null==(r=e.get(s))){i.next=9;break}return i.next=9,[s,r];case 9:i.next=3;break;case 11:i.next=16;break;case 13:i.prev=13,i.t0=i.catch(1),n.e(i.t0);case 16:return i.prev=16,n.f(),i.finish(16);case 19:case"end":return i.stop()}}),i,null,[[1,13,16,19]])}))()})}var i;return new JD({[PD]:hc(i=YD(this._data)).call(i,this._data)})}}]),n}(qD);function rC(t,e){var i=void 0!==Np&&Bu(t)||t["@@iterator"];if(!i){if(qp(t)||(i=function(t,e){var i;if(t){if("string"==typeof t)return aC(t,e);var n=zp(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Hu(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aC(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,r=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return r=t.done,t},e:function(t){a=!0,s=t},f:function(){try{r||null==i.return||i.return()}finally{if(a)throw s}}}}function aC(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function hC(t){var e=function(){if("undefined"==typeof Reflect||!ny)return!1;if(ny.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(ny(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=jy(t);if(e){var o=jy(this).constructor;i=ny(n,arguments,o)}else i=n.apply(this,arguments);return Ry(this,i)}}var lC=function(t){Ny(n,t);var i=hC(n);function n(t,o){var s,r;return e(this,n),Hd(Ty(r=i.call(this)),"length",0),Hd(Ty(r),"_ids",new XD),r._options=o||{},r._listener=hc(s=r._onEvent).call(s,Ty(r)),r.setData(t),r}return zd(n,[{key:"idProp",get:function(){return this.getDataSet().idProp}},{key:"setData",value:function(t){if(this._data){this._data.off&&this._data.off("*",this._listener);var e=this._data.getIds({filter:Mc(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:Mc(this._options)}),o=0,s=n.length;o<s;o++){var r=n[o];this._ids.add(r)}this.length=n.length,this._trigger("add",{items:n})}else this._data=new sC;this._data.on&&this._data.on("*",this._listener)}},{key:"refresh",value:function(){for(var t=this._data.getIds({filter:Mc(this._options)}),e=Ap(this._ids),i={},n=[],o=[],s=[],r=0,a=t.length;r<a;r++){var h=t[r];i[h]=!0,this._ids.has(h)||(n.push(h),this._ids.add(h))}for(var l=0,d=e.length;l<d;l++){var c=e[l],u=this._data.get(c);null==u?console.error("If you see this, report it please."):i[c]||(o.push(c),s.push(u),this._ids.delete(c))}this.length+=n.length-o.length,n.length&&this._trigger("add",{items:n}),o.length&&this._trigger("remove",{items:o,oldData:s})}},{key:"get",value:function(t,e){if(null==this._data)return null;var i,n=null;UD(t)||qp(t)?(n=t,i=e):i=t;var o=tf({},this._options,i),s=Mc(this._options),r=i&&Mc(i);return s&&r&&(o.filter=function(t){return s(t)&&r(t)}),null==n?this._data.get(o):this._data.get(n,o)}},{key:"getIds",value:function(t){if(this._data.length){var e,i=Mc(this._options),n=null!=t?Mc(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=Mc(this._options),s=e&&Mc(e);n=s?o?function(t){return o(t)&&s(t)}:s:o,hm(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=Mc(this._options),s=e&&Mc(e);return n=s?o?function(t){return o(t)&&s(t)}:s:o,Fc(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||{[PD]:hc(e=YS(this._ids)).call(e,this._ids)})}},{key:"dispose",value:function(){var t;null!==(t=this._data)&&void 0!==t&&t.off&&this._data.off("*",this._listener);var e,i="This data view has already been disposed of.",o={get:function(){throw new Error(i)},set:function(){throw new Error(i)},configurable:!1},s=rC($p(n.prototype));try{for(s.s();!(e=s.n()).done;){var r=e.value;Cy(this,r,o)}}catch(t){s.e(t)}finally{s.f()}}},{key:"_onEvent",value:function(t,e,i){if(e&&e.items&&this._data){var n=e.items,o=[],s=[],r=[],a=[],h=[],l=[];switch(t){case"add":for(var d=0,c=n.length;d<c;d++){var u=n[d];this.get(u)&&(this._ids.add(u),o.push(u))}break;case"update":for(var p=0,m=n.length;p<m;p++){var f=n[p];this.get(f)?this._ids.has(f)?(s.push(f),h.push(e.data[p]),a.push(e.oldData[p])):(this._ids.add(f),o.push(f)):this._ids.has(f)&&(this._ids.delete(f),r.push(f),l.push(e.oldData[p]))}break;case"remove":for(var g=0,v=n.length;g<v;g++){var y=n[g];this._ids.has(y)&&(this._ids.delete(y),r.push(y),l.push(e.oldData[g]))}}this.length+=o.length-r.length,o.length&&this._trigger("add",{items:o},i),s.length&&this._trigger("update",{items:s,oldData:a,data:h},i),r.length&&this._trigger("remove",{items:r,oldData:l},i)}}}]),n}(qD);function dC(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof e.add&&"function"==typeof e.clear&&"function"==typeof e.distinct&&"function"==typeof hm(e)&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof Fc(e)&&"function"==typeof e.max&&"function"==typeof e.min&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.remove&&"function"==typeof e.setOptions&&"function"==typeof e.stream&&"function"==typeof e.update&&"function"==typeof e.updateOnly}t.DELETE=Iv,t.DataSet=sC,t.DataStream=JD,t.DataView=lC,t.Queue=$D,t.createNewDataPipeFrom=function(t){return new Jc(t)},t.isDataSetLike=dC,t.isDataViewLike=function(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof hm(e)&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof Fc(e)&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.stream&&dC(t,e.getDataSet())}}(vr.exports);var yr=vr.exports;class br{constructor(t,e,i,n){this._dataset=new yr.DataSet,this._recordingRanges=new s,this._eventRanges=new r,this._cameraManager=t,this._cameraIDs=e,this._eventsMediaType=i,this._showRecordings=n}get dataset(){return this._dataset}rewriteEvent(t){const e=this._dataset.get(t);e&&(this._dataset.remove(t),this._dataset.add(e))}async refresh(t){try{await Promise.all([this._refreshEvents(t),...this._showRecordings?[this._refreshRecordings(t)]:[]])}catch(t){a(t)}}getTimelineEventQueries(t){return this._cameraManager.generateDefaultEventQueries(this._cameraIDs,{start:t.start,end:t.end,..."clips"===this._eventsMediaType&&{hasClip:!0},..."snapshots"===this._eventsMediaType&&{hasSnapshot:!0}})}getTimelineRecordingQueries(t){return this._cameraManager.generateDefaultRecordingQueries(this._cameraIDs,{start:t.start,end:t.end})}async _refreshEvents(t){if(this._eventRanges.hasCoverage({start:t.start,end:h(fr(t.end),{seconds:30})}))return;const e=gr(t),i=this.getTimelineEventQueries(e);if(!i)return;const n=await this._cameraManager.executeMediaQueries(i),o=[];for(const t of n??[]){const e=t.getStartTime(),i=t.getID();i&&e&&o.push({id:i,group:t.getCameraID(),content:"",media:t,start:e.getTime(),type:"range",end:t.getUsableEndTime()?.getTime()??e.getTime()})}this._dataset.update(o),this._eventRanges.add({...e,expires:l(new Date,{seconds:30})})}async _refreshRecordings(t){const e=(t,e)=>({id:`recording-${t}-${e.id}`,group:t,start:1e3*e.start_time,end:1e3*e.end_time,content:"",type:"background"}),i=t=>this._dataset.get({filter:e=>"background"==e.type&&e.group===t&&void 0!==e.end}),n=t=>{this._dataset.remove(this._dataset.get({filter:e=>"background"===e.type&&e.group===t}))},o=t=>{this._dataset.add(t)};if(this._recordingRanges.hasCoverage({start:t.start,end:h(fr(t.end),{seconds:30})}))return;const s=gr(t),r=this._cameraManager.generateDefaultRecordingSegmentsQueries(this._cameraIDs,{start:s.start,end:s.end});if(!r)return;const a=await this._cameraManager.getRecordingSegments(r),l=new Map;for(const[t,e]of a)for(const i of t.cameraIDs){let t=l.get(i);t||(t=[],l.set(i,t)),e.segments.forEach((e=>t?.push(e)))}for(const[t,s]of l.entries()){const r=i(t).concat(s.map((i=>e(t,i)))),a=d(r,60);n(t),o(a)}this._recordingRanges.add({start:s.start,end:s.end})}}class wr extends CustomEvent{}const _r="target_bar";let xr=class extends g{constructor(){super(...arguments),this.details=!1}render(){if(!this.item)return v``;const t={item:this.item};return this.dispatchEvent(new wr("frigate-card:timeline:thumbnail-data-request",{composed:!0,bubbles:!0,detail:t})),t.hass&&t.cameraManager&&t.cameraConfig&&t.media&&t.viewManagerEpoch?v` <frigate-card-thumbnail
|
||
.hass=${t.hass}
|
||
.cameraManager=${t.cameraManager}
|
||
.media=${t.media}
|
||
.viewManagerEpoch=${t.viewManagerEpoch}
|
||
?details=${this.details}
|
||
>
|
||
</frigate-card-thumbnail>`:v``}};c([u({attribute:!0})],xr.prototype,"item",void 0),c([u({attribute:!0,type:Boolean})],xr.prototype,"details",void 0),xr=c([p("frigate-card-timeline-thumbnail")],xr);let kr=class extends g{constructor(){super(...arguments),this.mini=!1,this._panMode=null,this._targetBarVisible=!1,this._refDatePicker=y(),this._refTimeline=y(),this._timelineSource=null,this._pointerHeld=null,this._ignoreClick=!1,this._isHoverableDevice=b(),this._throttledSetViewDuringRangeChange=w(this._setViewDuringRangeChange.bind(this),100)}_getTooltip(t){return this._isHoverableDevice?`\n <frigate-card-timeline-thumbnail\n item='${t.id}'\n ${this.thumbnailConfig?.show_details?"details":""}\n >\n </frigate-card-timeline-thumbnail>`:""}_handleThumbnailDataRequest(t){const e=t.detail.item,i=this._timelineSource?.dataset.get(e)?.media,n=i?this.cameraManager?.getStore().getCameraConfigForMedia(i)??void 0:void 0;t.detail.hass=this.hass,t.detail.cameraConfig=n,t.detail.cameraManager=this.cameraManager,t.detail.media=i,t.detail.viewManagerEpoch=this.viewManagerEpoch}render(){if(!this.hass||!this.timelineConfig||!this.cameraIDs?.size)return;const t=this._getEffectivePanMode(),e=_("pan"===t?"config.common.controls.timeline.pan_modes.pan":"seek"===t?"config.common.controls.timeline.pan_modes.seek":"seek-in-media"===t?"config.common.controls.timeline.pan_modes.seek-in-media":"config.common.controls.timeline.pan_modes.seek-in-camera"),i="pan"===t?"mdi:pan-horizontal":"seek"===t?"mdi:filmstrip-box-multiple":"seek-in-media"===t?"mdi:play-box-lock":"mdi:camera-lock";return v` <div
|
||
@frigate-card:timeline:thumbnail-data-request=${this._handleThumbnailDataRequest.bind(this)}
|
||
class="timeline"
|
||
${x(this._refTimeline)}
|
||
>
|
||
<div class="timeline-tools">
|
||
${this._shouldSupportSeeking()?v` <ha-icon
|
||
.icon=${i}
|
||
@click=${()=>{this._panMode="pan"===t?"seek":"seek"===t?"seek-in-media":"seek-in-media"===t?"seek-in-camera":"pan"}}
|
||
aria-label="${e}"
|
||
title="${e}"
|
||
>
|
||
</ha-icon>`:""}
|
||
<frigate-card-date-picker
|
||
${x(this._refDatePicker)}
|
||
@frigate-card:date-picker:change=${t=>{t.detail.date&&this._timeline?.moveTo(t.detail.date)}}
|
||
>
|
||
</frigate-card-date-picker>
|
||
</div>
|
||
</div>`}_timelineRangeChangeHandler(t){if(this._pointerHeld&&(this._ignoreClick=!0),this._shouldSupportSeeking()&&this._timeline&&t.byUser&&"wheel"!==t.event.type&&"pinchin"!==t.event.additionalEvent&&"pinchout"!==t.event.additionalEvent){const e=this._pointerHeld?.window?l(t.start,{seconds:(this._pointerHeld.time.getTime()-this._pointerHeld.window.start.getTime())/1e3}):t.end;this._pointerHeld&&this._setTargetBarAppropriately(e),this._throttledSetViewDuringRangeChange(e,t)}}_shouldSupportSeeking(){return this.mini}_setTargetBarAppropriately(t){if(!this._timeline)return;this.viewManagerEpoch?.manager.getView();const e=this._getEffectivePanMode();if(this._shouldSupportSeeking()&&("seek"===e||("seek-in-camera"===e||"seek-in-media"===e)&&this._timeline.getSelection().some((i=>{const n=this._timelineSource?.dataset?.get(i);return"seek-in-camera"!==e||n?.media?.getCameraID(),n&&n.start&&n.end&&t.getTime()>=n.start&&t.getTime()<=n.end})))){this._targetBarVisible?this._timeline?.setCustomTime(t,_r):(this._timeline?.addCustomTime(t,_r),this._targetBarVisible=!0);const e=this._timeline.getWindow(),i=(t.getTime()-e.start.getTime())/(e.end.getTime()-e.start.getTime());this.setAttribute("target-bar-marker-direction",i<.25?"right":i>.75?"left":"center"),this._timeline?.setCustomTimeMarker?.(k(t,!0),_r)}else this._removeTargetBar()}_removeTargetBar(){this.removeAttribute("target-bar-direction"),this._targetBarVisible&&(this._timeline?.removeCustomTime(_r),this._targetBarVisible=!1)}async _setViewDuringRangeChange(t,e){const i=this.viewManagerEpoch?.manager.getView(),n=i?.queryResults,o=n?.getResults(),s=this._getEffectivePanMode();if(!(o&&n&&this._timeline&&i&&this.hass&&this.cameraManager&&"pan"!==s))return;const r=this._shouldSupportSeeking();let a=null;"seek"===s?a=n.clone().resetSelectedResult().selectBestResult((e=>S(e,t,i?.camera)),{allCameras:!0,main:!0}):"seek-in-camera"===s?a=n.clone().resetSelectedResult().selectBestResult((e=>S(e,t)),{cameraID:i.camera}).promoteCameraSelectionToMainSelection(i.camera):"seek-in-media"===s&&(a=n);const h=this.mini?t>=new Date?"live":"media":i.view,l=a?.getSelectedResult()?.getCameraID();this.viewManagerEpoch?.manager.setViewByParameters({params:{...l&&{camera:l},view:h,queryResults:a},modifiers:[new D({...r&&{mediaViewer:{seek:t}},...this._getTimelineContext({start:e.start,end:e.end})})]})}_getEffectivePanMode(){return this._panMode??this.timelineConfig?.pan_mode??"pan"}async _timelineClickHandler(t){(this._ignoreClick||t.what&&["item","background","group-label","axis"].includes(t.what))&&C(t.event);const e=this.viewManagerEpoch?.manager.getView();if(this._ignoreClick||!e||!this.viewManagerEpoch||!this._timelineSource||!t.what)return;let i="close";if(this.timelineConfig?.show_recordings&&t.time&&["background","axis"].includes(t.what)){const i=this._createMediaQueries("recording");i&&await(this.viewManagerEpoch?.manager.setViewByParametersWithExistingQuery({baseView:e,params:{view:"recording",query:i},queryExecutorOptions:{selectResult:{time:{time:t.time}}}}))}else if(t.item&&"item"===t.what){const n=String(t.group),o=String(t.item),s={main:!0,...n&&e.isGrid()&&{cameraID:n}},r=e.queryResults?.clone().resetSelectedResult().selectResultIfFound((e=>e.getID()===t.item),s),a=T(this._getTimelineContext(),{mediaViewer:{seek:t.time}});if(r&&r.hasSelectedResult())this.viewManagerEpoch.manager.setViewByParameters({params:{queryResults:r,view:"play"===this.itemClickAction?"media":e.view},modifiers:[new D(a)]});else{const t=this._createMediaQueries("event");t&&await(this.viewManagerEpoch?.manager.setViewByParametersWithExistingQuery({params:{view:"media",query:t},queryExecutorOptions:{selectResult:{id:o},rejectResults:t=>!t.hasResults()},modifiers:[new D(a)]}))}"select"===this.itemClickAction&&(i="open")}E(this,`thumbnails:${i}`),this._ignoreClick=!1}_getPrefetchWindow(t){const e=O(t.end,t.start);return{start:h(t.start,{seconds:e}),end:l(t.end,{seconds:e})}}async _timelineRangeChangedHandler(t){this._removeTargetBar();const e=this.viewManagerEpoch?.manager.getView();if(!this._timeline||!e||this.mini&&!t.byUser)return;await(this._timelineSource?.refresh(this._getPrefetchWindow(t)));const i=M.getQueriesType(e.query);if(!i)return;const n=this._createMediaQueries(i);await(this.viewManagerEpoch?.manager.setViewByParametersWithExistingQuery({params:{query:n},queryExecutorOptions:{selectResult:{id:this.viewManagerEpoch?.manager.getView()?.queryResults?.getSelectedResult()?.getID()??void 0}},modifiers:[new D(this._getTimelineContext())]}))}_createMediaQueries(t,e){if(!this._timeline||!this._timelineSource)return null;const i=gr(this._getPrefetchWindow(e?.window??this._timeline.getWindow()));if("event"===t){const t=this._timelineSource.getTimelineEventQueries(i);return t?new P(t):null}if("recording"===t){const t=this._timelineSource.getTimelineRecordingQueries(i);return t?new I(t):null}return null}_getGroups(){const t=[];return(this.cameraIDs??[]).forEach((e=>{if(!this.hass||!this.cameraManager)return;const i=this.cameraManager.getCameraMetadata(e);i&&t.push({id:e,content:i.title})})),new Qi(t)}_getPerfectWindowFromMediaStartAndEndTime(t,e,i){if(t){const t=this._getConfiguredWindowSeconds();if(e&&i){if(i.getTime()-e.getTime()>1e3*t)return{start:h(i,{seconds:t}),end:i};{const n=t-(i.getTime()-e.getTime())/1e3;return{start:h(e,{seconds:n/2}),end:l(i,{seconds:n/2})}}}if(e)return{start:h(e,{seconds:t/2}),end:l(e,{seconds:t/2})}}else if(e&&i)return{start:e,end:i};return null}_getConfiguredWindowSeconds(){return this.timelineConfig?.window_seconds??A.timeline.window_seconds}_getDefaultStartEnd(){const t=new Date;return{start:h(t,{seconds:this._getConfiguredWindowSeconds()}),end:t}}_isClustering(){return"stack"===this.timelineConfig?.style&&!!this.timelineConfig?.clustering_threshold&&this.timelineConfig.clustering_threshold>0}_getOptions(){if(!this.timelineConfig)return null;const t=this._getDefaultStartEnd(),e="stack"===this.timelineConfig.style;return{cluster:!!this._isClustering()&&{maxItems:this.timelineConfig.clustering_threshold,clusterCriteria:(t,e)=>{const i=this._getAllSelectedMediaIDsFromView(),n=t.media,o=e.media;return"background"!==t.type&&t.type===e.type&&!i.includes(t.id)&&!i.includes(e.id)&&!!n&&!!o&&N.isEvent(n)&&N.isEvent(o)&&n.isGroupableWith(o)}},minHeight:"100%",maxHeight:"100%",zoomMax:864e5,zoomMin:1e3,margin:{item:{vertical:e?10:24}},selectable:!0,stack:e,start:t.start,end:t.end,groupHeightMode:"auto",tooltip:{followMouse:!0,overflowMethod:"cap",template:this._getTooltip.bind(this)},xss:{disabled:!1,filterOptions:{whiteList:{"frigate-card-timeline-thumbnail":["details","item"],div:["title"],span:["style"]}}}}}shouldUpdate(t){return!!this.hass&&!!this.cameraManager}_getAllSelectedMediaIDsFromView(){const t=this.viewManagerEpoch?.manager.getView();return(t?.queryResults?.getMultipleSelectedResults({main:!0,...t.isGrid()&&{allCameras:!0}})??[]).filter((t=>N.isEvent(t))).map((t=>t.getID())).filter(R)}async _updateTimelineFromView(){const t=this.viewManagerEpoch?.manager.getView();if(!(t&&this.timelineConfig&&this._timelineSource&&this._timeline))return;const e=this._timeline.getWindow();let i=e;const n=t.queryResults?.getSelectedResult(),o=n?.getStartTime()??null,s=n?.getEndTime()??null,r=!!n&&N.isEvent(n),a=n&&o?{start:o,end:s??o}:null,h=t.context?.timeline;if(h&&h.window)i=h.window;else if(a&&!F(a,e)){const t=this._getPerfectWindowFromMediaStartAndEndTime(r,o,s);t&&(i=t)}const l=this._getPrefetchWindow(i);this._pointerHeld||await(this._timelineSource?.refresh(l));const d=this._timeline.getSelection(),c=this._getAllSelectedMediaIDsFromView();if(c.some((t=>!d.includes(t)))){if(this._isClustering())for(const t of c)this._timelineSource?.rewriteEvent(t);this._timeline?.setSelection(c,{focus:!1,animation:{animation:!1,zoom:!1}})}this._pointerHeld||L(i,e)||this._timeline.setWindow(i.start,i.end);const u=M.getQueriesType(t.query);if(!u)return;const p=this._createMediaQueries(u,{window:i});if(!this.mini&&p&&!this._alreadyHasAcceptableMediaQuery(p)){const t=this.viewManagerEpoch?.manager.getView()?.queryResults?.getSelectedResult();await(this.viewManagerEpoch?.manager.setViewByParametersWithExistingQuery({params:{query:p},queryExecutorOptions:{selectResult:{id:t?.getID()??void 0}},modifiers:[new D(this._getTimelineContext(i))]}))}}_alreadyHasAcceptableMediaQuery(t){const e=this.viewManagerEpoch?.manager.getView(),i=e?.query?.getQueries(),n=e?.queryResults?.getResultsTimestamp();return!!this.cameraManager&&!!i&&!!n&&L(i,t.getQueries())&&this.cameraManager.areMediaQueriesResultsFresh(i,n)}_getTimelineContext(t){const e=this.viewManagerEpoch?.manager.getView(),i=t??this._timeline?.getWindow();return{timeline:{...e?.context?.timeline,...i&&{window:i}}}}willUpdate(t){t.has("thumbnailConfig")&&(this.thumbnailConfig?this.style.setProperty("--frigate-card-thumbnail-size",`${this.thumbnailConfig.size}px`):this.style.removeProperty("--frigate-card-thumbnail-size")),t.has("timelineConfig")&&(j(this,!!this.timelineConfig?.show_recordings,"recordings"),j(this,"ribbon"===this.timelineConfig?.style,"ribbon"),j(this,"stack"===this.timelineConfig?.style,"stack")),(t.has("cameraManager")||t.has("cameras")||t.has("timelineConfig")||t.has("cameraIDs"))&&(this.cameraIDs?.size&&this.cameraManager&&this.timelineConfig?this._timelineSource=new br(this.cameraManager,this.cameraIDs,this.timelineConfig.events_media_type,this.timelineConfig.show_recordings):this._timelineSource=null)}_destroy(){this._timeline?.destroy(),this._timeline=void 0,this._targetBarVisible=!1,this._pointerHeld=null}updated(t){super.updated(t),(t.has("cameras")||t.has("cameraManager"))&&this._destroy();let e=!1;if(this._timelineSource&&this._refTimeline.value&&this.timelineConfig&&(t.has("timelineConfig")||t.has("cameraIDs"))){this._timeline&&this._destroy();const t=this._getGroups();if(!t.length)return;const i=this._getOptions();if(i){e=!0;const n=this.mini&&1===t.length;this._timeline=n?new Ys(this._refTimeline.value,this._timelineSource.dataset,i):new Ys(this._refTimeline.value,this._timelineSource.dataset,t,i),j(this,!n,"groups"),this._timeline.on("rangechanged",this._timelineRangeChangedHandler.bind(this)),this._timeline.on("click",this._timelineClickHandler.bind(this)),this._timeline.on("rangechange",this._timelineRangeChangeHandler.bind(this)),this._timeline.on("mouseDown",(t=>{const e=this._timeline?.getWindow();this._pointerHeld={...t,...e&&{window:e}},this._ignoreClick=!1})),this._timeline.on("mouseUp",(()=>{this._pointerHeld=null,this._removeTargetBar()}))}}e?window.requestAnimationFrame(this._updateTimelineFromView.bind(this)):t.has("viewManagerEpoch")&&this._updateTimelineFromView()}static get styles(){return Y('@charset "UTF-8";\n/* override some bootstrap styles screwing up the timelines css */\n.vis [class*=span] {\n min-height: 0;\n width: auto;\n}\n\n.vis-current-time {\n background-color: #FF7F6E;\n width: 2px;\n z-index: 1;\n pointer-events: none;\n}\n\n.vis-rolling-mode-btn {\n height: 40px;\n width: 40px;\n position: absolute;\n top: 7px;\n right: 20px;\n border-radius: 50%;\n font-size: 28px;\n cursor: pointer;\n opacity: 0.8;\n color: white;\n font-weight: bold;\n text-align: center;\n background: #3876c2;\n}\n\n.vis-rolling-mode-btn:before {\n content: "⛶";\n}\n\n.vis-rolling-mode-btn:hover {\n opacity: 1;\n}\n\n.vis-timeline {\n position: relative;\n border: 1px solid #bfbfbf;\n overflow: hidden;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.vis-loading-screen {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.vis-panel {\n position: absolute;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-left,\n.vis-panel.vis-right,\n.vis-panel.vis-top,\n.vis-panel.vis-bottom {\n border: 1px #bfbfbf;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-left,\n.vis-panel.vis-right {\n border-top-style: solid;\n border-bottom-style: solid;\n overflow: hidden;\n}\n\n.vis-left.vis-panel.vis-vertical-scroll, .vis-right.vis-panel.vis-vertical-scroll {\n height: 100%;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n\n.vis-left.vis-panel.vis-vertical-scroll {\n direction: rtl;\n}\n\n.vis-left.vis-panel.vis-vertical-scroll .vis-content {\n direction: ltr;\n}\n\n.vis-right.vis-panel.vis-vertical-scroll {\n direction: ltr;\n}\n\n.vis-right.vis-panel.vis-vertical-scroll .vis-content {\n direction: rtl;\n}\n\n.vis-panel.vis-center,\n.vis-panel.vis-top,\n.vis-panel.vis-bottom {\n border-left-style: solid;\n border-right-style: solid;\n}\n\n.vis-background {\n overflow: hidden;\n}\n\n.vis-panel > .vis-content {\n position: relative;\n}\n\n.vis-panel .vis-shadow {\n position: absolute;\n width: 100%;\n height: 1px;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);\n /* TODO: find a nice way to ensure vis-shadows are drawn on top of items\n z-index: 1;\n */\n}\n\n.vis-panel .vis-shadow.vis-top {\n top: -1px;\n left: 0;\n}\n\n.vis-panel .vis-shadow.vis-bottom {\n bottom: -1px;\n left: 0;\n}\n\n.vis-graph-group0 {\n fill: #4f81bd;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #4f81bd;\n}\n\n.vis-graph-group1 {\n fill: #f79646;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #f79646;\n}\n\n.vis-graph-group2 {\n fill: #8c51cf;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #8c51cf;\n}\n\n.vis-graph-group3 {\n fill: #75c841;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #75c841;\n}\n\n.vis-graph-group4 {\n fill: #ff0100;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #ff0100;\n}\n\n.vis-graph-group5 {\n fill: #37d8e6;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #37d8e6;\n}\n\n.vis-graph-group6 {\n fill: #042662;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #042662;\n}\n\n.vis-graph-group7 {\n fill: #00ff26;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #00ff26;\n}\n\n.vis-graph-group8 {\n fill: #ff00ff;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #ff00ff;\n}\n\n.vis-graph-group9 {\n fill: #8f3938;\n fill-opacity: 0;\n stroke-width: 2px;\n stroke: #8f3938;\n}\n\n.vis-timeline .vis-fill {\n fill-opacity: 0.1;\n stroke: none;\n}\n\n.vis-timeline .vis-bar {\n fill-opacity: 0.5;\n stroke-width: 1px;\n}\n\n.vis-timeline .vis-point {\n stroke-width: 2px;\n fill-opacity: 1;\n}\n\n.vis-timeline .vis-legend-background {\n stroke-width: 1px;\n fill-opacity: 0.9;\n fill: #ffffff;\n stroke: #c2c2c2;\n}\n\n.vis-timeline .vis-outline {\n stroke-width: 1px;\n fill-opacity: 1;\n fill: #ffffff;\n stroke: #e5e5e5;\n}\n\n.vis-timeline .vis-icon-fill {\n fill-opacity: 0.3;\n stroke: none;\n}\n\n.vis-timeline {\n /*\n -webkit-transition: height .4s ease-in-out;\n transition: height .4s ease-in-out;\n */\n}\n\n.vis-panel {\n /*\n -webkit-transition: height .4s ease-in-out, top .4s ease-in-out;\n transition: height .4s ease-in-out, top .4s ease-in-out;\n */\n}\n\n.vis-axis {\n /*\n -webkit-transition: top .4s ease-in-out;\n transition: top .4s ease-in-out;\n */\n}\n\n/* TODO: get animation working nicely\n\n.vis-item {\n -webkit-transition: top .4s ease-in-out;\n transition: top .4s ease-in-out;\n}\n\n.vis-item.line {\n -webkit-transition: height .4s ease-in-out, top .4s ease-in-out;\n transition: height .4s ease-in-out, top .4s ease-in-out;\n}\n/**/\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal {\n position: absolute;\n width: 100%;\n height: 0;\n border-bottom: 1px solid;\n}\n\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor {\n border-color: #e5e5e5;\n}\n\n.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major {\n border-color: #bfbfbf;\n}\n\n.vis-data-axis .vis-y-axis.vis-major {\n width: 100%;\n position: absolute;\n color: #4d4d4d;\n white-space: nowrap;\n}\n\n.vis-data-axis .vis-y-axis.vis-major.vis-measure {\n padding: 0;\n margin: 0;\n border: 0;\n visibility: hidden;\n width: auto;\n}\n\n.vis-data-axis .vis-y-axis.vis-minor {\n position: absolute;\n width: 100%;\n color: #bebebe;\n white-space: nowrap;\n}\n\n.vis-data-axis .vis-y-axis.vis-minor.vis-measure {\n padding: 0;\n margin: 0;\n border: 0;\n visibility: hidden;\n width: auto;\n}\n\n.vis-data-axis .vis-y-axis.vis-title {\n position: absolute;\n color: #4d4d4d;\n white-space: nowrap;\n bottom: 20px;\n text-align: center;\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-measure {\n padding: 0;\n margin: 0;\n visibility: hidden;\n width: auto;\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-left {\n bottom: 0;\n -webkit-transform-origin: left top;\n -moz-transform-origin: left top;\n -ms-transform-origin: left top;\n -o-transform-origin: left top;\n transform-origin: left bottom;\n -webkit-transform: rotate(-90deg);\n -moz-transform: rotate(-90deg);\n -ms-transform: rotate(-90deg);\n -o-transform: rotate(-90deg);\n transform: rotate(-90deg);\n}\n\n.vis-data-axis .vis-y-axis.vis-title.vis-right {\n bottom: 0;\n -webkit-transform-origin: right bottom;\n -moz-transform-origin: right bottom;\n -ms-transform-origin: right bottom;\n -o-transform-origin: right bottom;\n transform-origin: right bottom;\n -webkit-transform: rotate(90deg);\n -moz-transform: rotate(90deg);\n -ms-transform: rotate(90deg);\n -o-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.vis-legend {\n background-color: rgba(247, 252, 255, 0.65);\n padding: 5px;\n border: 1px solid #b3b3b3;\n box-shadow: 2px 2px 10px rgba(154, 154, 154, 0.55);\n}\n\n.vis-legend-text {\n /*font-size: 10px;*/\n white-space: nowrap;\n display: inline-block;\n}\n\n.vis-itemset {\n position: relative;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.vis-itemset .vis-background,\n.vis-itemset .vis-foreground {\n position: absolute;\n width: 100%;\n height: 100%;\n overflow: visible;\n}\n\n.vis-axis {\n position: absolute;\n width: 100%;\n height: 0;\n left: 0;\n z-index: 1;\n}\n\n.vis-foreground .vis-group {\n position: relative;\n box-sizing: border-box;\n border-bottom: 1px solid #bfbfbf;\n}\n\n.vis-foreground .vis-group:last-child {\n border-bottom: none;\n}\n\n.vis-nesting-group {\n cursor: pointer;\n}\n\n.vis-label.vis-nested-group.vis-group-level-unknown-but-gte1 {\n background: #f5f5f5;\n}\n\n.vis-label.vis-nested-group.vis-group-level-0 {\n background-color: #ffffff;\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-0 .vis-inner {\n padding-left: 0;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-0 .vis-inner {\n padding-right: 0;\n}\n\n.vis-label.vis-nested-group.vis-group-level-1 {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-1 .vis-inner {\n padding-left: 15px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-1 .vis-inner {\n padding-right: 15px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-2 {\n background-color: rgba(0, 0, 0, 0.1);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-2 .vis-inner {\n padding-left: 30px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-2 .vis-inner {\n padding-right: 30px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-3 {\n background-color: rgba(0, 0, 0, 0.15);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-3 .vis-inner {\n padding-left: 45px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-3 .vis-inner {\n padding-right: 45px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-4 {\n background-color: rgba(0, 0, 0, 0.2);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-4 .vis-inner {\n padding-left: 60px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-4 .vis-inner {\n padding-right: 60px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-5 {\n background-color: rgba(0, 0, 0, 0.25);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-5 .vis-inner {\n padding-left: 75px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-5 .vis-inner {\n padding-right: 75px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-6 {\n background-color: rgba(0, 0, 0, 0.3);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-6 .vis-inner {\n padding-left: 90px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-6 .vis-inner {\n padding-right: 90px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-7 {\n background-color: rgba(0, 0, 0, 0.35);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-7 .vis-inner {\n padding-left: 105px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-7 .vis-inner {\n padding-right: 105px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-8 {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-8 .vis-inner {\n padding-left: 120px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-8 .vis-inner {\n padding-right: 120px;\n}\n\n.vis-label.vis-nested-group.vis-group-level-9 {\n background-color: rgba(0, 0, 0, 0.45);\n}\n\n.vis-ltr .vis-label.vis-nested-group.vis-group-level-9 .vis-inner {\n padding-left: 135px;\n}\n\n.vis-rtl .vis-label.vis-nested-group.vis-group-level-9 .vis-inner {\n padding-right: 135px;\n}\n\n/* default takes over beginning with level-10 (thats why we add .vis-nested-group\n to the selectors above, to have higher specifity than these rules for the defaults) */\n.vis-label.vis-nested-group {\n background-color: rgba(0, 0, 0, 0.5);\n}\n\n.vis-ltr .vis-label.vis-nested-group .vis-inner {\n padding-left: 150px;\n}\n\n.vis-rtl .vis-label.vis-nested-group .vis-inner {\n padding-right: 150px;\n}\n\n.vis-group-level-unknown-but-gte1 {\n border: 1px solid red;\n}\n\n/* expanded/collapsed indicators */\n.vis-label.vis-nesting-group:before,\n.vis-label.vis-nesting-group:before {\n display: inline-block;\n width: 15px;\n}\n\n.vis-label.vis-nesting-group.expanded:before {\n content: "▼";\n}\n\n.vis-label.vis-nesting-group.collapsed:before {\n content: "▶";\n}\n\n.vis-rtl .vis-label.vis-nesting-group.collapsed:before {\n content: "◀";\n}\n\n/* compensate missing expanded/collapsed indicator, but only at levels > 0 */\n.vis-ltr .vis-label:not(.vis-nesting-group):not(.vis-group-level-0) {\n padding-left: 15px;\n}\n\n.vis-rtl .vis-label:not(.vis-nesting-group):not(.vis-group-level-0) {\n padding-right: 15px;\n}\n\n.vis-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 10;\n}\n\n.vis-labelset {\n position: relative;\n overflow: hidden;\n box-sizing: border-box;\n}\n\n.vis-labelset .vis-label {\n position: relative;\n left: 0;\n top: 0;\n width: 100%;\n color: #4d4d4d;\n box-sizing: border-box;\n}\n\n.vis-labelset .vis-label {\n border-bottom: 1px solid #bfbfbf;\n}\n\n.vis-labelset .vis-label.draggable {\n cursor: pointer;\n}\n\n.vis-group-is-dragging {\n background: rgba(0, 0, 0, 0.1);\n}\n\n.vis-labelset .vis-label:last-child {\n border-bottom: none;\n}\n\n.vis-labelset .vis-label .vis-inner {\n display: inline-block;\n padding: 5px;\n}\n\n.vis-labelset .vis-label .vis-inner.vis-hidden {\n padding: 0;\n}\n\n.vis-time-axis {\n position: relative;\n overflow: hidden;\n}\n\n.vis-time-axis.vis-foreground {\n top: 0;\n left: 0;\n width: 100%;\n}\n\n.vis-time-axis.vis-background {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.vis-time-axis .vis-text {\n position: absolute;\n color: #4d4d4d;\n padding: 3px;\n overflow: hidden;\n box-sizing: border-box;\n white-space: nowrap;\n}\n\n.vis-time-axis .vis-text.vis-measure {\n position: absolute;\n padding-left: 0;\n padding-right: 0;\n margin-left: 0;\n margin-right: 0;\n visibility: hidden;\n}\n\n.vis-time-axis .vis-grid.vis-vertical {\n position: absolute;\n border-left: 1px solid;\n}\n\n.vis-time-axis .vis-grid.vis-vertical-rtl {\n position: absolute;\n border-right: 1px solid;\n}\n\n.vis-time-axis .vis-grid.vis-minor {\n border-color: #e5e5e5;\n}\n\n.vis-time-axis .vis-grid.vis-major {\n border-color: #bfbfbf;\n}\n\n.vis-custom-time {\n background-color: #6E94FF;\n width: 2px;\n cursor: move;\n z-index: 1;\n}\n\n.vis-custom-time > .vis-custom-time-marker {\n background-color: inherit;\n color: white;\n font-size: 12px;\n white-space: nowrap;\n padding: 3px 5px;\n top: 0px;\n cursor: initial;\n z-index: inherit;\n}\n\n.vis-item {\n position: absolute;\n color: #1A1A1A;\n border-color: #97B0F8;\n border-width: 1px;\n background-color: #D5DDF6;\n display: inline-block;\n z-index: 1;\n /*overflow: hidden;*/\n}\n\n.vis-item.vis-selected {\n border-color: #FFC200;\n background-color: #FFF785;\n /* z-index must be higher than the z-index of custom time bar and current time bar */\n z-index: 2;\n}\n\n.vis-editable.vis-selected {\n cursor: move;\n}\n\n.vis-item.vis-point.vis-selected {\n background-color: #FFF785;\n}\n\n.vis-item.vis-box {\n text-align: center;\n border-style: solid;\n border-radius: 2px;\n}\n\n.vis-item.vis-point {\n background: none;\n}\n\n.vis-item.vis-dot {\n position: absolute;\n padding: 0;\n border-width: 4px;\n border-style: solid;\n border-radius: 4px;\n}\n\n.vis-item.vis-range {\n border-style: solid;\n border-radius: 2px;\n box-sizing: border-box;\n}\n\n.vis-item.vis-background {\n border: none;\n background-color: rgba(213, 221, 246, 0.4);\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n}\n\n.vis-item .vis-item-overflow {\n position: relative;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n overflow: hidden;\n}\n\n.vis-item-visible-frame {\n white-space: nowrap;\n}\n\n.vis-item.vis-range .vis-item-content {\n position: relative;\n display: inline-block;\n}\n\n.vis-item.vis-background .vis-item-content {\n position: absolute;\n display: inline-block;\n}\n\n.vis-item.vis-line {\n padding: 0;\n position: absolute;\n width: 0;\n border-left-width: 1px;\n border-left-style: solid;\n}\n\n.vis-item .vis-item-content {\n white-space: nowrap;\n box-sizing: border-box;\n padding: 5px;\n}\n\n.vis-item .vis-onUpdateTime-tooltip {\n position: absolute;\n background: #4f81bd;\n color: white;\n width: 200px;\n text-align: center;\n white-space: nowrap;\n padding: 5px;\n border-radius: 1px;\n transition: 0.4s;\n -o-transition: 0.4s;\n -moz-transition: 0.4s;\n -webkit-transition: 0.4s;\n}\n\n.vis-item .vis-delete, .vis-item .vis-delete-rtl {\n position: absolute;\n top: 0px;\n width: 24px;\n height: 24px;\n box-sizing: border-box;\n padding: 0px 5px;\n cursor: pointer;\n -webkit-transition: background 0.2s linear;\n -moz-transition: background 0.2s linear;\n -ms-transition: background 0.2s linear;\n -o-transition: background 0.2s linear;\n transition: background 0.2s linear;\n}\n\n.vis-item .vis-delete {\n right: -24px;\n}\n\n.vis-item .vis-delete-rtl {\n left: -24px;\n}\n\n.vis-item .vis-delete:after, .vis-item .vis-delete-rtl:after {\n content: "×"; /* MULTIPLICATION SIGN */\n color: red;\n font-family: arial, sans-serif;\n font-size: 22px;\n font-weight: bold;\n -webkit-transition: color 0.2s linear;\n -moz-transition: color 0.2s linear;\n -ms-transition: color 0.2s linear;\n -o-transition: color 0.2s linear;\n transition: color 0.2s linear;\n}\n\n.vis-item .vis-delete:hover, .vis-item .vis-delete-rtl:hover {\n background: red;\n}\n\n.vis-item .vis-delete:hover:after, .vis-item .vis-delete-rtl:hover:after {\n color: white;\n}\n\n.vis-item .vis-drag-center {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0px;\n cursor: move;\n}\n\n.vis-item.vis-range .vis-drag-left {\n position: absolute;\n width: 24px;\n max-width: 20%;\n min-width: 2px;\n height: 100%;\n top: 0;\n left: -4px;\n cursor: w-resize;\n}\n\n.vis-item.vis-range .vis-drag-right {\n position: absolute;\n width: 24px;\n max-width: 20%;\n min-width: 2px;\n height: 100%;\n top: 0;\n right: -4px;\n cursor: e-resize;\n}\n\n.vis-range.vis-item.vis-readonly .vis-drag-left,\n.vis-range.vis-item.vis-readonly .vis-drag-right {\n cursor: auto;\n}\n\n.vis-item.vis-cluster {\n vertical-align: center;\n text-align: center;\n border-style: solid;\n border-radius: 2px;\n}\n\n.vis-item.vis-cluster-line {\n padding: 0;\n position: absolute;\n width: 0;\n border-left-width: 1px;\n border-left-style: solid;\n}\n\n.vis-item.vis-cluster-dot {\n position: absolute;\n padding: 0;\n border-width: 4px;\n border-style: solid;\n border-radius: 4px;\n}\n\n.vis .overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n /* Must be displayed above for example selected Timeline items */\n z-index: 10;\n}\n\n.vis-active {\n box-shadow: 0 0 10px #86d5f8;\n}\n\ndiv.vis-configuration {\n position: relative;\n display: block;\n float: left;\n font-size: 12px;\n}\n\ndiv.vis-configuration-wrapper {\n display: block;\n width: 700px;\n}\n\ndiv.vis-configuration-wrapper::after {\n clear: both;\n content: "";\n display: block;\n}\n\ndiv.vis-configuration.vis-config-option-container {\n display: block;\n width: 495px;\n background-color: #ffffff;\n border: 2px solid #f7f8fa;\n border-radius: 4px;\n margin-top: 20px;\n left: 10px;\n padding-left: 5px;\n}\n\ndiv.vis-configuration.vis-config-button {\n display: block;\n width: 495px;\n height: 25px;\n vertical-align: middle;\n line-height: 25px;\n background-color: #f7f8fa;\n border: 2px solid #ceced0;\n border-radius: 4px;\n margin-top: 20px;\n left: 10px;\n padding-left: 5px;\n cursor: pointer;\n margin-bottom: 30px;\n}\n\ndiv.vis-configuration.vis-config-button.hover {\n background-color: #4588e6;\n border: 2px solid #214373;\n color: #ffffff;\n}\n\ndiv.vis-configuration.vis-config-item {\n display: block;\n float: left;\n width: 495px;\n height: 25px;\n vertical-align: middle;\n line-height: 25px;\n}\n\ndiv.vis-configuration.vis-config-item.vis-config-s2 {\n left: 10px;\n background-color: #f7f8fa;\n padding-left: 5px;\n border-radius: 3px;\n}\n\ndiv.vis-configuration.vis-config-item.vis-config-s3 {\n left: 20px;\n background-color: #e4e9f0;\n padding-left: 5px;\n border-radius: 3px;\n}\n\ndiv.vis-configuration.vis-config-item.vis-config-s4 {\n left: 30px;\n background-color: #cfd8e6;\n padding-left: 5px;\n border-radius: 3px;\n}\n\ndiv.vis-configuration.vis-config-header {\n font-size: 18px;\n font-weight: bold;\n}\n\ndiv.vis-configuration.vis-config-label {\n width: 120px;\n height: 25px;\n line-height: 25px;\n}\n\ndiv.vis-configuration.vis-config-label.vis-config-s3 {\n width: 110px;\n}\n\ndiv.vis-configuration.vis-config-label.vis-config-s4 {\n width: 100px;\n}\n\ndiv.vis-configuration.vis-config-colorBlock {\n top: 1px;\n width: 30px;\n height: 19px;\n border: 1px solid #444444;\n border-radius: 2px;\n padding: 0px;\n margin: 0px;\n cursor: pointer;\n}\n\ninput.vis-configuration.vis-config-checkbox {\n left: -5px;\n}\n\ninput.vis-configuration.vis-config-rangeinput {\n position: relative;\n top: -5px;\n width: 60px;\n /*height:13px;*/\n padding: 1px;\n margin: 0;\n pointer-events: none;\n}\n\ninput.vis-configuration.vis-config-range {\n /*removes default webkit styles*/\n -webkit-appearance: none;\n /*fix for FF unable to apply focus style bug */\n border: 0px solid white;\n background-color: rgba(0, 0, 0, 0);\n /*required for proper track sizing in FF*/\n width: 300px;\n height: 20px;\n}\n\ninput.vis-configuration.vis-config-range::-webkit-slider-runnable-track {\n width: 300px;\n height: 5px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dedede), color-stop(99%, #c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#dedede", endColorstr="#c8c8c8",GradientType=0 ); /* IE6-9 */\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\n\ninput.vis-configuration.vis-config-range::-webkit-slider-thumb {\n -webkit-appearance: none;\n border: 1px solid #14334b;\n height: 17px;\n width: 17px;\n border-radius: 50%;\n background: #3876c2; /* Old browsers */\n background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #3876c2), color-stop(100%, #385380)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #3876c2 0%, #385380 100%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #3876c2 0%, #385380 100%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #3876c2 0%, #385380 100%); /* IE10+ */\n background: linear-gradient(to bottom, #3876c2 0%, #385380 100%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#3876c2", endColorstr="#385380",GradientType=0 ); /* IE6-9 */\n box-shadow: #111927 0px 0px 1px 0px;\n margin-top: -7px;\n}\n\ninput.vis-configuration.vis-config-range:focus {\n outline: none;\n}\n\ninput.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track {\n background: #9d9d9d; /* Old browsers */\n background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #9d9d9d), color-stop(99%, #c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #9d9d9d 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#9d9d9d", endColorstr="#c8c8c8",GradientType=0 ); /* IE6-9 */\n}\n\ninput.vis-configuration.vis-config-range::-moz-range-track {\n width: 300px;\n height: 10px;\n background: #dedede; /* Old browsers */\n background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dedede), color-stop(99%, #c8c8c8)); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */\n background: -ms-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* IE10+ */\n background: linear-gradient(to bottom, #dedede 0%, #c8c8c8 99%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="#dedede", endColorstr="#c8c8c8",GradientType=0 ); /* IE6-9 */\n border: 1px solid #999999;\n box-shadow: #aaaaaa 0px 0px 3px 0px;\n border-radius: 3px;\n}\n\ninput.vis-configuration.vis-config-range::-moz-range-thumb {\n border: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: #385380;\n}\n\n/*hide the outline behind the border*/\ninput.vis-configuration.vis-config-range:-moz-focusring {\n outline: 1px solid white;\n outline-offset: -1px;\n}\n\ninput.vis-configuration.vis-config-range::-ms-track {\n width: 300px;\n height: 5px;\n /*remove bg colour from the track, we\'ll use ms-fill-lower and ms-fill-upper instead */\n background: transparent;\n /*leave room for the larger thumb to overflow with a transparent border */\n border-color: transparent;\n border-width: 6px 0;\n /*remove default tick marks*/\n color: transparent;\n}\n\ninput.vis-configuration.vis-config-range::-ms-fill-lower {\n background: #777;\n border-radius: 10px;\n}\n\ninput.vis-configuration.vis-config-range::-ms-fill-upper {\n background: #ddd;\n border-radius: 10px;\n}\n\ninput.vis-configuration.vis-config-range::-ms-thumb {\n border: none;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background: #385380;\n}\n\ninput.vis-configuration.vis-config-range:focus::-ms-fill-lower {\n background: #888;\n}\n\ninput.vis-configuration.vis-config-range:focus::-ms-fill-upper {\n background: #ccc;\n}\n\n.vis-configuration-popup {\n position: absolute;\n background: rgba(57, 76, 89, 0.85);\n border: 2px solid #f2faff;\n line-height: 30px;\n height: 30px;\n width: 150px;\n text-align: center;\n color: #ffffff;\n font-size: 14px;\n border-radius: 4px;\n -webkit-transition: opacity 0.3s ease-in-out;\n -moz-transition: opacity 0.3s ease-in-out;\n transition: opacity 0.3s ease-in-out;\n}\n\n.vis-configuration-popup:after, .vis-configuration-popup:before {\n left: 100%;\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.vis-configuration-popup:after {\n border-color: rgba(136, 183, 213, 0);\n border-left-color: rgba(57, 76, 89, 0.85);\n border-width: 8px;\n margin-top: -8px;\n}\n\n.vis-configuration-popup:before {\n border-color: rgba(194, 225, 245, 0);\n border-left-color: #f2faff;\n border-width: 12px;\n margin-top: -12px;\n}\n\ndiv.vis-tooltip {\n position: absolute;\n visibility: hidden;\n padding: 5px;\n white-space: nowrap;\n font-family: verdana;\n font-size: 14px;\n color: #000000;\n background-color: #f5f4ed;\n -moz-border-radius: 3px;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n border: 1px solid #808074;\n box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);\n pointer-events: none;\n z-index: 5;\n}\n\nside-drawer {\n background-color: var(--card-background-color);\n}\n\ndiv.control-surround {\n position: absolute;\n bottom: 50%;\n transform: translateY(50%);\n z-index: 0;\n padding-top: 20px;\n padding-bottom: 20px;\n}\n\n:host([location=left]) div.control-surround {\n padding-right: 12px;\n left: 100%;\n}\n\n:host([location=right]) div.control-surround {\n padding-left: 12px;\n right: 100%;\n}\n\n:host([empty]),\n:host([empty]) > * {\n visibility: hidden;\n}\n\n:host(:not([empty])),\n:host(:not([empty])) > * {\n visibility: visible;\n}\n\nha-icon.control {\n color: var(--secondary-color, white);\n background-color: rgba(0, 0, 0, 0.7);\n opacity: 0.5;\n pointer-events: all;\n --mdc-icon-size: 20px;\n padding-top: 20px;\n padding-bottom: 20px;\n transition: opacity 0.5s ease;\n}\n\n:host([open]) ha-icon.control,\nha-icon.control:hover {\n opacity: 1;\n background-color: black;\n}\n\n:host([location=left]) ha-icon.control {\n border-top-right-radius: 20px;\n border-bottom-right-radius: 20px;\n}\n\n:host([location=right]) ha-icon.control {\n border-top-left-radius: 20px;\n border-bottom-left-radius: 20px;\n}\n\n:host {\n --frigate-card-thumbnail-size-max: 300px;\n --frigate-card-thumbnail-details-width: calc(\n var(--frigate-card-thumbnail-size) + 200px\n );\n}\n\n:host {\n width: 100%;\n display: flex;\n flex-direction: column;\n position: relative;\n}\n\n:host(:not([mini])) {\n height: 100%;\n}\n\nfrigate-card-thumbnail {\n height: var(--frigate-card-thumbnail-size);\n width: var(--frigate-card-thumbnail-size);\n}\n\nfrigate-card-thumbnail[details] {\n width: var(--frigate-card-thumbnail-details-width);\n}\n\ndiv.timeline {\n flex: 1;\n}\n\n.vis-text {\n color: var(--primary-text-color) !important;\n}\n\n.vis-timeline {\n border: none;\n}\n\n.vis-labelset .vis-label {\n color: var(--primary-text-color);\n}\n\n:host([ribbon]:not([groups])) .vis-item:not(.vis-background) {\n margin-top: 7px;\n}\n\n:host([ribbon]) .vis-item:not(.vis-background) {\n height: 6px;\n}\n\n.vis-item {\n border-color: var(--primary-color);\n background: none;\n color: var(--primary-text-color);\n background-color: var(--primary-color);\n transition: background-color ease-in-out 1s, border-color ease-in-out 1s, box-shadow ease-in-out 1s;\n}\n\n.vis-item.vis-selected {\n border-color: var(--accent-color);\n background-color: var(--accent-color);\n box-shadow: var(--frigate-card-css-box-shadow, 0px 0px 5px 1px var(--primary-color));\n}\n\n.vis-item.vis-background {\n background-color: var(--primary-color);\n opacity: 0.1;\n}\n\n:host(:not([groups])) .vis-item.vis-background {\n min-height: 100%;\n}\n\n.vis-item:not(.vis-background) {\n cursor: pointer;\n}\n\n:host([recordings]) .vis-item.vis-background,\n:host([recordings]) .vis-time-axis {\n cursor: crosshair;\n}\n\n.vis-item:active {\n cursor: unset;\n}\n\n.vis-item.vis-box {\n border: none;\n}\n\n.vis-item .vis-item-content {\n padding: 0px;\n}\n\n.vis-item.vis-cluster {\n border-style: dotted;\n color: var(--primary-text-color);\n background-color: var(--primary-background-color);\n box-shadow: var(--frigate-card-css-box-shadow, 0px 0px 5px 1px var(--primary-color));\n}\n\n.vis-item.vis-range {\n border-radius: var(--frigate-card-css-border-radius, unset);\n}\n\n.vis-time-axis .vis-grid.vis-minor {\n border-color: var(--secondary-color);\n}\n\n.vis-text.vis-minor,\n.vis-label {\n transition: background-color 0.5s ease-out;\n}\n\n:host([recordings]) .vis-text.vis-minor:hover {\n background-color: var(--primary-color);\n}\n\n.vis-time-axis .vis-grid.vis-major {\n border-color: var(--secondary-color);\n}\n\n.vis-label {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\ndiv.vis-tooltip {\n padding: 0px;\n background-color: unset;\n border: none;\n font-family: unset;\n z-index: 30;\n}\n\n.target_bar {\n background-color: var(--primary-color);\n width: 2px;\n z-index: 20;\n pointer-events: none;\n}\n\n.target_bar .vis-custom-time-marker {\n background-color: var(--primary-background-color);\n color: var(--primary-text-color);\n bottom: 0px;\n top: unset;\n}\n\n:host([target-bar-marker-direction=right]) .target_bar .vis-custom-time-marker {\n left: 2px;\n}\n\n:host([target-bar-marker-direction=left]) .target_bar .vis-custom-time-marker {\n right: 2px;\n}\n\n:host([target-bar-marker-direction=center]) .target_bar .vis-custom-time-marker {\n left: 0px;\n transform: translateX(-50%);\n}\n\n.timeline-tools {\n display: inline-flex;\n position: absolute;\n right: 2px;\n bottom: 2px;\n color: var(--primary-color);\n z-index: 10;\n}\n\n.timeline-tools ha-icon {\n cursor: pointer;\n}')}};c([u({attribute:!1})],kr.prototype,"hass",void 0),c([u({attribute:!1})],kr.prototype,"viewManagerEpoch",void 0),c([u({attribute:!1,hasChanged:m})],kr.prototype,"timelineConfig",void 0),c([u({attribute:!1})],kr.prototype,"thumbnailConfig",void 0),c([u({attribute:!0,type:Boolean,reflect:!0})],kr.prototype,"mini",void 0),c([u({attribute:!1,hasChanged:m})],kr.prototype,"cameraIDs",void 0),c([u({attribute:!1})],kr.prototype,"cameraManager",void 0),c([u({attribute:!1})],kr.prototype,"cardWideConfig",void 0),c([u({attribute:!1})],kr.prototype,"itemClickAction",void 0),c([f()],kr.prototype,"_panMode",void 0),kr=c([p("frigate-card-timeline-core")],kr);export{kr as FrigateCardTimelineCore,xr as FrigateCardTimelineThumbnail};
|