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-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=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;ni[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-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-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;te.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.distancei.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\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;o2)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;tt,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!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{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;es&&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._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;in-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),sn&&(o=n-e-this.padding),os.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>>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{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:t0)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;i0&&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{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;t1&&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;othis.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[...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{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{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[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:ni)&&(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||os(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>>0;for(e=0;e0)for(i=0;i=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=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;i68?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=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;i0;){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&&(ejt)&&(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;eVt(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;e0&&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;othis?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;nthis.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;ei.valueOf():i.valueOf()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=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(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]||s0,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/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;i0;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"===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";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;nt.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=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=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;nt.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=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=e.start&&h=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=e&&r=i.start&&r=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=i&&t1e3&&(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(no&&(n=o)),null!==o&&n>o&&(r=n-o,i-=r,n-=r,null!=s&&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&&ithis.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;r0?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()0&&this.current.seconds()0&&this.current.minutes()0&&this.current.hours()=i&&o0?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=.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{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{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.heightn.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{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;ot.index>e.index?1:t.index!0),(t=>!0),(t=>0));for(let n=0;ni[t].index&&(i[s].top+=i[t].height);const o=t[s];for(let t=0;tt.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&&ta(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&&iinn&&(f=ls(d,(t=>n+is>=a(t)),m,f)+1);const w=d.slice(m,f).filter((t=>ia(t))).sort(((t,e)=>t.top-e.top));for(let i=0;iy.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{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{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=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].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(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=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;nt.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{const{start:e,end:i}=t;return i0)for(let t=0;ttt.data.starth)),1==this.checkRangedItems){this.checkRangedItems=!1;for(let e=0;et.data.endh))}const c={};let u=0;for(let t=0;t0)for(let t=0;t{e[t]()}));for(let t=0;t=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;s0)for(let t=0;t0)for(var a=0;a{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+=`
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.startt.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.startt.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-eo-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),ro&&(s=o-i-this.padding),st.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=0&&e.center-s[d].center=0&&e.center-a[u].centern){const r=h-n+1,d=[];let c=l;for(;d.lengtht.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='
'+t.length+"
",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.righte&&n.push(t.id):t.lefti&&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.righte&&n.push(t.id):t.lefti&&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{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{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{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;e0&&(o=o.concat(s))}var r;if(n.showNested){var a=i.get(n.nestedGroups);for(let t=0;t0&&(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.topn)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)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)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.starte)&&(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=r.top&&er.top)return o}else if(0===t&&et.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()-nt.start&&this.data.start.getTime()t.start&&this.data.start.getTime()-n/2{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{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{},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;o0&&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{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(""+t+":"):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;es&&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._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;ivar options = "+JSON.stringify(t,null,2)+""}getOptions(){let t={};for(var e=0;eo.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||es)&&(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{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),hi&&(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||ne)&&(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 dl+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;i0?(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=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.minorStepIdxn+1e-5)r(),l=!1;else{if(!this.autoScaleStart&&this._start=0)){r(),l=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&e`${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{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.maxLabelSizethis.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.maxLabelSize0&&(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 t0?(n=t0){t.sort((function(t,e){return t.screen_x===e.screen_x?t.groupIde[s].screen_y?e[s].screen_y:n,o=ot[r].accumulatedNegative?t[r].accumulatedNegative:n)>t[r].accumulatedPositive?t[r].accumulatedPositive:n,o=(o=o0){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;n0&&(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;ie.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;nt[n].y?t[n].y:e,i=i");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 t0){var r={};for(this._getRelevantData(s,r,n,o),this._applySampling(s,r),e=0;e0)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;at[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;s0)for(var i=0;i0){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;h0){for(s=0;s0&&(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;ci?i:a,l=li?i:h,d=ds.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;ns?s:t,e=null==e||e0&&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;ea;)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+""},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;oy;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.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=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=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);c0&&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;ot.length)&&(e=t.length);for(var i=0,n=new Array(e);i1?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;sl-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;so;)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(ti,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-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=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;ni[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-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-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;te.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.distancei.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\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=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);i2)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({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;r2&&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=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=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&g.call(n,"finallyLoc")&&this.prev=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;o1?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;s0;)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;r3)){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;nnD(i)?1:-1}}(t)),i=eD(o),n=0;nthis.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=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);iwk.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=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);i1?i-1:0),o=1;oo?1:no)&&(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||awk.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({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` `: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 \n `:""}_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`
${this._shouldSupportSeeking()?v` {this._panMode="pan"===t?"seek":"seek"===t?"seek-in-media":"seek-in-media"===t?"seek-in-camera":"pan"}} aria-label="${e}" title="${e}" > `:""} {t.detail.date&&this._timeline?.moveTo(t.detail.date)}} >
`}_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};