r)return}}if(i&&i!=this.groupTouchParams.group){var l=e.get(i.groupId),h=e.get(this.groupTouchParams.group.groupId);h&&l&&(this.options.groupOrderSwap(h,l,e),e.update(h),e.update(l));var u=e.getIds({order:this.options.groupOrder});if(!wE.equalArray(u,this.groupTouchParams.originalOrder))for(var d=this.groupTouchParams.originalOrder,c=this.groupTouchParams.group.groupId,p=Math.min(d.length,u.length),f=0,m=0,v=0;f=p)break;if(u[f+m]==c)m=1;else if(d[f+v]==c)v=1;else{var g=av(u).call(u,d[f+v]),y=e.get(u[f+m]),b=e.get(d[f+v]);this.options.groupOrderSwap(y,b,e),e.update(y),e.update(b);var _=u[f+m];u[f+m]=d[f+v],u[g]=_,f++}}}}}},{key:"_onGroupDragEnd",value:function(t){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,n=e.groupsData.getDataSet(),r=wE.extend({},n.get(i));e.options.onMoveGroup(r,(function(t){if(t)t[n._idProp]=i,n.update(t);else{var r=n.getIds({order:e.options.groupOrder});if(!wE.equalArray(r,e.groupTouchParams.originalOrder))for(var o=e.groupTouchParams.originalOrder,s=Math.min(o.length,r.length),a=0;a=s)break;var l=av(r).call(r,o[a]),h=n.get(r[a]),u=n.get(o[a]);e.options.groupOrderSwap(h,u,n),n.update(h),n.update(u);var d=r[a];r[a]=o[a],r[l]=d,a++}}})),e.body.emitter.emit("groupDragged",{groupId:i}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}},{key:"_onSelectItem",value:function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)this._onMultiSelectItem(t);else{var n=this.getSelection(),r=this.itemFromTarget(t),o=r&&r.selectable?[r.id]:[];this.setSelection(o);var s=this.getSelection();(s.length>0||n.length>0)&&this.body.emitter.emit("select",{items:s,event:t})}}}},{key:"_onMouseOver",value:function(t){var e=this.itemFromTarget(t);if(e&&e!==this.itemFromRelatedTarget(t)){var i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new IA(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);var n=this.body.dom.centerContainer,r=n.getBoundingClientRect();this.popup.setPosition(t.clientX-r.left+n.offsetLeft,t.clientY-r.top+n.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}}},{key:"_onMouseOut",value:function(t){var e=this.itemFromTarget(t);e&&(e!==this.itemFromRelatedTarget(t)&&(this.clearPopupTimer(),null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t})))}},{key:"_onMouseMove",value:function(t){if(this.itemFromTarget(t)&&(null!=this.popupTimer&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){var e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.clientX-i.left+e.offsetLeft,t.clientY-i.top+e.offsetTop),this.popup.show()}}},{key:"_onMouseWheel",value:function(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)}},{key:"_onUpdateItem",value:function(t){if(this.options.selectable&&(this.options.editable.updateTime||this.options.editable.updateGroup)){var e=this;if(t){var i=e.itemsData.get(t.id);this.options.onUpdate(i,(function(t){t&&e.itemsData.update(t)}))}}}},{key:"_onDropObjectOnItem",value:function(t){var e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)}},{key:"_onAddItem",value:function(t){if(this.options.selectable&&this.options.editable.add){var e,i,n=this,r=this.options.snap||null,o=this.dom.frame.getBoundingClientRect(),s=this.options.rtl?o.right-t.center.x:t.center.x-o.left,a=this.body.util.toTime(s),l=this.body.util.getScale(),h=this.body.util.getStep();"drop"==t.type?((i=JSON.parse(t.dataTransfer.getData("text"))).content=i.content?i.content:"new item",i.start=i.start?i.start:r?r(a,l,h):a,i.type=i.type||"box",i[this.itemsData.idProp]=i.id||VM(),"range"!=i.type||i.end||(e=this.body.util.toTime(s+this.props.width/5),i.end=r?r(e,l,h):e)):((i={start:r?r(a,l,h):a,content:"new item"})[this.itemsData.idProp]=VM(),"range"===this.options.type&&(e=this.body.util.toTime(s+this.props.width/5),i.end=r?r(e,l,h):e));var u=this.groupFromTarget(t);u&&(i.group=u.groupId),i=this._cloneItemData(i),this.options.onAdd(i,(function(e){e&&(n.itemsData.add(e),"drop"==t.type&&n.setSelection([e.id]))}))}}},{key:"_onMultiSelectItem",value:function(t){var e=this;if(this.options.selectable){var n=this.itemFromTarget(t);if(n){var r=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||!1||this.options.sequentialSelection)&&this.options.multiselect){var o=this.itemsData.get(n.id).group,s=void 0;this.options.multiselectPerGroup&&r.length>0&&(s=this.itemsData.get(r[0]).group),this.options.multiselectPerGroup&&null!=s&&s!=o||r.push(n.id);var a=i._getItemRange(this.itemsData.get(r));if(!this.options.multiselectPerGroup||s==o)for(var l in r=[],this.items)if(this.items.hasOwnProperty(l)){var h=this.items[l],u=h.data.start,d=void 0!==h.data.end?h.data.end:u;!(u>=a.min&&d<=a.max)||this.options.multiselectPerGroup&&s!=this.itemsData.get(h.id).group||h instanceof AA||r.push(h.id)}}else{var c=av(r).call(r,n.id);-1==c?r.push(n.id):_f(r).call(r,c,1)}var p=mm(r).call(r,(function(t){return e.getItemById(t).selectable}));this.setSelection(p),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}}},{key:"itemFromElement",value:function(t){for(var e=t;e;){if(e.hasOwnProperty("vis-item"))return e["vis-item"];e=e.parentNode}return null}},{key:"itemFromTarget",value:function(t){return this.itemFromElement(t.target)}},{key:"itemFromRelatedTarget",value:function(t){return this.itemFromElement(t.relatedTarget)}},{key:"groupFromTarget",value:function(t){var e=t.center?t.center.y:t.clientY,i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(var n=0;n=a.top&&ea.top)return o}else if(0===n&&ee)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)})),{min:i,max:e}}},{key:"itemSetFromTarget",value:function(t){for(var e=t.target;e;){if(e.hasOwnProperty("vis-itemset"))return e["vis-itemset"];e=e.parentNode}return null}}]),i}(IE);tI.types={background:AA,box:CA,range:EA,point:MA},tI.prototype._onAdd=tI.prototype._onUpdate;var eI,iI=!1,nI="background: #FFeeee; color: #dd0000",rI=function(){function t(){Ma(this,t)}return Yd(t,null,[{key:"validate",value:function(e,i,n){iI=!1,eI=i;var r=i;return void 0!==n&&(r=i[n]),t.parse(e,r,[]),iI}},{key:"parse",value:function(e,i,n){for(var r in e)e.hasOwnProperty(r)&&t.check(r,e,i,n)}},{key:"check",value:function(e,i,n,r){if(void 0!==n[e]||void 0!==n.__any__){var o=e,s=!0;void 0===n[e]&&void 0!==n.__any__&&(o="__any__",s="object"===t.getType(i[e]));var a=n[o];s&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,n,o,a,r)}else t.getSuggestion(e,n,r)}},{key:"checkFields",value:function(e,i,n,r,o,s){var a=function(i){console.log("%c"+i+t.printLocation(s,e),nI)},l=t.getType(i[e]),h=o[l];void 0!==h?"array"===t.getType(h)&&-1===av(h).call(h,i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(h)+' not "'+i[e]+'". '),iI=!0):"object"===l&&"__any__"!==r&&(s=wE.copyAndExtendArray(s,e),t.parse(i[e],n[r],s)):void 0===o.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print(rp(o))+". Received ["+l+'] "'+i[e]+'"'),iI=!0)}},{key:"getType",value:function(t){var e=Nd(t);return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":qc(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}},{key:"getSuggestion",value:function(e,i,n){var r,o=t.findInOptions(e,i,n,!1),s=t.findInOptions(e,eI,[],!0);r=void 0!==o.indexMatch?" in "+t.printLocation(o.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':s.distance<=4&&o.distance>s.distance?" in "+t.printLocation(o.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+t.printLocation(o.path,e):". Did you mean one of these: "+t.print(rp(i))+t.printLocation(n,e),console.log('%cUnknown option detected: "'+e+'"'+r,nI),iI=!0}},{key:"findInOptions",value:function(e,i,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=1e9,s="",a=[],l=e.toLowerCase(),h=void 0;for(var u in i){var d=void 0;if(void 0!==i[u].__type__&&!0===r){var c=t.findInOptions(e,i[u],wE.copyAndExtendArray(n,u));o>c.distance&&(s=c.closestMatch,a=c.path,o=c.distance,h=c.indexMatch)}else{var p;-1!==av(p=u.toLowerCase()).call(p,l)&&(h=u),o>(d=t.levenshteinDistance(e,u))&&(s=u,a=wE.copyArray(n),o=d)}}return{closestMatch:s,path:a,distance:o,indexMatch:h}}},{key:"printLocation",value:function(t,e){for(var i="\n\n"+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n",n=0;n0&&void 0!==arguments[0]?arguments[0]:1;Ma(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return Yd(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){if("string"==typeof t)return fI[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i,n=this._isColorString(t);if(void 0!==n&&(t=n),!0===wE.isString(t)){if(!0===wE.isValidRGB(t)){var r=t.substr(4).substr(0,t.length-5).split(",");i={r:r[0],g:r[1],b:r[2],a:1}}else if(!0===wE.isValidRGBA(t)){var o=t.substr(5).substr(0,t.length-6).split(",");i={r:o[0],g:o[1],b:o[2],a:o[3]}}else if(!0===wE.isValidHex(t)){var s=wE.hexToRGB(t);i={r:s.r,g:s.g,b:s.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var a=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:a}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+vv(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this;!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=wE.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Rv((function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)}),0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=wE.extend({},t)),this.color=t;var e=wE.RGBToHSV(t.r,t.g,t.b),i=2*Math.PI,n=this.r*e.s,r=this.centerCoordinates.x+n*Math.sin(i*e.h),o=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=r-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=o-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=wE.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=wE.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=wE.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var n=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,r),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),Uv(i).call(i),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var t,e,i,n;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var r=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var s=this;this.opacityRange.onchange=function(){s._setOpacity(this.value)},this.opacityRange.oninput=function(){s._setOpacity(this.value)},this.brightnessRange.onchange=function(){s._setBrightness(this.value)},this.brightnessRange.oninput=function(){s._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=Tp(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=Tp(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=Tp(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=Tp(n=this._loadLast).call(n,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new uP(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),dP(this.hammer,(function(e){t._moveSelector(e)})),this.hammer.on("tap",(function(e){t._moveSelector(e)})),this.hammer.on("panstart",(function(e){t._moveSelector(e)})),this.hammer.on("panmove",(function(e){t._moveSelector(e)})),this.hammer.on("panend",(function(e){t._moveSelector(e)}))}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e,i,n,r,o=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,o,s),this.centerCoordinates={x:.5*o,y:.5*s},this.r=.49*o;var a,l=2*Math.PI/360,h=1/this.r;for(n=0;n<360;n++)for(r=0;r3&&void 0!==arguments[3]?arguments[3]:1;Ma(this,t),this.parent=e,this.changedOptions=[],this.container=i,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},wE.extend(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new mI(r),this.wrapper=void 0}return Yd(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;if("string"==typeof t)this.options.filter=t;else if(qc(t))this.options.filter=t.join();else if("object"===Nd(t)){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==mm(t)&&(this.options.filter=mm(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===mm(this.options)&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var t=mm(this.options),e=0,i=!1;for(var n in this.configureOptions)this.configureOptions.hasOwnProperty(n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?i=(i=t(n,[]))||this._handleObject(this.configureOptions[n],[n],!0):!0!==t&&-1===av(t).call(t,n)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?i-1:0),r=1;r2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");return n.className="vis-configuration vis-config-label vis-config-s"+e.length,n.innerHTML=!0===i?wE.xss(""+t+":"):wE.xss(t+":"),n}},{key:"_makeDropdown",value:function(t,e,i){var n=document.createElement("select");n.className="vis-configuration vis-config-select";var r=0;void 0!==e&&-1!==av(t).call(t,e)&&(r=av(t).call(t,e));for(var o=0;oo&&1!==o&&(a.max=Math.ceil(e*u),h=a.max,l="range increased"),a.value=e}else a.value=n;var 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};var p=this._makeLabel(i[i.length-1],i),f=this._makeItem(i,p,a,d);""!==l&&this.popupHistory[f]!==h&&(this.popupHistory[f]=h,this._setupPopup(l,f))}},{key:"_makeButton",value:function(){var t=this;if(!0===this.options.showButton){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerHTML="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}},{key:"_setupPopup",value:function(t,e){var i=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,r=mm(this.options),o=!1;for(var s in t)if(t.hasOwnProperty(s)){n=!0;var a=t[s],l=wE.copyAndExtendArray(e,s);if("function"==typeof r&&!1===(n=r(s,e))&&!qc(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i),!1!==n){o=!0;var h=this._getValue(l);if(qc(a))this._handleArray(a,h,l);else if("string"==typeof a)this._makeTextInput(a,h,l);else if("boolean"==typeof a)this._makeCheckbox(a,h,l);else if(a instanceof Object){var u=!0;if(-1!==av(e).call(e,"physics")&&this.moduleOptions.physics.solver!==s&&(u=!1),!0===u)if(void 0!==a.enabled){var d=wE.copyAndExtendArray(l,"enabled"),c=this._getValue(d);if(!0===c){var p=this._makeLabel(s,l,!0);this._makeItem(l,p),o=this._handleObject(a,l)||o}else this._makeCheckbox(a,c,l)}else{var f=this._makeLabel(s,l,!0);this._makeItem(l,f),o=this._handleObject(a,l)||o}}else console.error("dont know how to handle",a,s,l)}}return o}},{key:"_handleArray",value:function(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i;t="false"!==(t="true"===t||t)&&t;for(var r=0;rvar options = "+vv(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;eo)&&(o=i)})),null!==r&&null!==o){var s=this,a=this.itemSet.items[i[0]],l=-1*this._getScrollTop(),h=null,u=function(){var t=wI(s,a);t.shouldScroll&&t.itemTop!=h.itemTop&&(s._setScrollTop(-t.scrollOffset),s._redraw())},d=!e||void 0===e.zoom||e.zoom,c=(r+o)/2,p=d?1.1*(o-r):Math.max(this.range.end-this.range.start,1.1*(o-r)),f=!e||void 0===e.animation||e.animation;f||(h={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.setRange(c-p/2,c+p/2,{animation:f},(function(){u(),Rv(u,100)}),(function(t,e,i){var n=wI(s,a);if(!1!==n&&(h||(h=n),h.itemTop!=n.itemTop||h.shouldScroll)){h.itemTop!=n.itemTop&&n.shouldScroll&&(h=n,l=-1*s._getScrollTop());var r=l,o=h.scrollOffset,u=i?o:r+(o-r)*t;s._setScrollTop(-u),e||s._redraw()}}))}}}},{key:"fit",value:function(t,e){var i,n=!t||void 0===t.animation||t.animation;1===this.itemsData.length&&void 0===this.itemsData.get()[0].end?(i=this.getDataRange(),this.moveTo(i.min.valueOf(),{animation:n},e)):(i=this.getItemRange(),this.range.setRange(i.min,i.max,{animation:n},e))}},{key:"getItemRange",value:function(){var t=this,e=this.getDataRange(),i=null!==e.min?e.min.valueOf():null,n=null!==e.max?e.max.valueOf():null,r=null,o=null;if(null!=i&&null!=n){var s=n-i;s<=0&&(s=10);var a=s/this.props.center.width,l={},h=0;if(Hp(wE).call(wE,this.itemSet.items,(function(t,e){if(t.groupShowing){l[e]=t.redraw(!0),h=l[e].length}})),h>0)for(var u=function(t){Hp(wE).call(wE,l,(function(e){e[t]()}))},d=0;dn&&(n=l,o=e)})),r&&o){var c=r.getWidthLeft()+10,p=o.getWidthRight()+10,f=this.props.center.width-c-p;f>0&&(this.options.rtl?(i=bI(r)-p*s/f,n=_I(o)+c*s/f):(i=bI(r)-c*s/f,n=_I(o)+p*s/f))}}return{min:null!=i?new Date(i):null,max:null!=n?new Date(n):null}}},{key:"getDataRange",value:function(){var t,e=null,i=null;this.itemsData&&Hp(t=this.itemsData).call(t,(function(t){var n=wE.convert(t.start,"Date").valueOf(),r=wE.convert(null!=t.end?t.end:t.start,"Date").valueOf();(null===e||ni)&&(i=r)}));return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}}},{key:"getEventProperties",value:function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=this.dom.centerContainer.getBoundingClientRect(),r=this.options.rtl?n.right-e:e-n.left,o=i-n.top,s=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),l=NP.customTimeFromTarget(t),h=this.itemSet.options.snap||null,u=this.body.util.getScale(),d=this.body.util.getStep(),c=this._toTime(r),p=h?h(c,u,d):c,f=wE.getTarget(t),m=null;return null!=s?m="item":null!=l?m="custom-time":wE.hasParent(f,this.timeAxis.dom.foreground)||this.timeAxis2&&wE.hasParent(f,this.timeAxis2.dom.foreground)?m="axis":wE.hasParent(f,this.itemSet.dom.labelSet)?m="group-label":wE.hasParent(f,this.currentTime.bar)?m="current-time":wE.hasParent(f,this.dom.center)&&(m="background"),{event:t,item:s?s.id:null,isCluster:!!s&&!!s.isCluster,items:s?s.items||[]:null,group:a?a.groupId:null,customTime:l?l.options.id:null,what:m,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:r,y:o,time:c,snappedTime:p}}},{key:"toggleRollingMode",value:function(){this.range.rolling?this.range.stopRolling():(null==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())}},{key:"_redraw",value:function(){RP.prototype._redraw.call(this)}},{key:"_onFit",value:function(t){var e=t.start,i=t.end,n=t.animation;i?this.range.setRange(e,i,{animation:n}):this.moveTo(e.valueOf(),{animation:n})}}]),i}(RP);function bI(t){return wE.convert(t.data.start,"Date").valueOf()}function _I(t){var e=null!=t.data.end?t.data.end:t.data.start;return wE.convert(e,"Date").valueOf()}function wI(t,e){if(!e.parent)return!1;var i=t.options.rtl?t.props.rightContainer.height:t.props.leftContainer.height,n=t.props.center.height,r=e.parent,o=r.top,s=!0,a=t.timeAxis.options.orientation.axis,l=function(){return"bottom"==a?r.height-e.top-e.height:e.top},h=-1*t._getScrollTop(),u=o+l(),d=e.height;return uh+i?o+=l()+d-i+t.itemSet.options.margin.item.vertical:s=!1,{shouldScroll:s,scrollOffset:o=Math.min(o,n-i),itemTop:u}}var kI=function(){function t(e,i,n,r,o,s){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(Ma(this,t),this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=o,this.majorCharHeight=s,this._start=e,this._end=i,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=a,this.autoScaleStart=n,this.autoScaleEnd=r,this.formattingFunction=l,n||r){var h=this,u=function(t){var e=t-t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx]);return t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx])>h.magnitudefactor*h.minorSteps[h.minorStepIdx]*.5?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};n&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=u(this._start)),r&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=u(this._end)),this.determineScale()}}return Yd(t,[{key:"setCharHeight",value:function(t){this.majorCharHeight=t}},{key:"setHeight",value:function(t){this.containerHeight=t}},{key:"determineScale",value:function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var n=0;i<0&&(n=i);for(var r=!1,o=n;Math.abs(o)<=Math.abs(i);o++){this.magnitudefactor=Math.pow(10,o);for(var s=0;s=e){r=!0,this.minorStepIdx=s;break}}if(!0===r)break}}},{key:"is_major",value:function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])==0}},{key:"getStep",value:function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}},{key:"getFirstMajor",value:function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)}},{key:"formatValue",value:function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?"".concat(e):"string"==typeof e?e:t.toPrecision(5)}},{key:"getLines",value:function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,n=this._start+i;this._end-n>1e-5;n+=e)n!=this._start&&t.push({major:this.is_major(n),y:this.convertValue(n),val:this.formatValue(n)});return t}},{key:"followScale",value:function(t){var e=this.minorStepIdx,i=this._start,n=this._end,r=this,o=function(){r.magnitudefactor*=2},s=function(){r.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdxn+1e-5)s(),h=!1;else{if(!this.autoScaleStart&&this._start=0)){s(),h=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&d=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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 o,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function DI(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i=0&&t._redrawLabel(n-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),!0===t.master&&(r?t._redrawLine(n,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(n,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))}));var a=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(a=this.props.titleCharHeight);var l=!0===this.options.icons?Math.max(this.options.iconWidth,a)+this.options.labelOffsetX+15:a+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-l&&!0===this.options.visible?(this.width=this.maxLabelSize+l,this.options.width="".concat(this.width,"px"),Ub(this.DOMelements.lines),Ub(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+l),this.options.width="".concat(this.width,"px"),Ub(this.DOMelements.lines),Ub(this.DOMelements.labels),this.redraw(),e=!0):(Ub(this.DOMelements.lines),Ub(this.DOMelements.labels),e=!1),e}},{key:"convertValue",value:function(t){return this.scale.convertValue(t)}},{key:"screenToValue",value:function(t){return this.scale.screenToValue(t)}},{key:"_redrawLabel",value:function(t,e,i,n,r){var o=$b("div",this.DOMelements.labels,this.dom.frame);o.className=n,o.innerHTML=wE.xss(e),"left"===i?(o.style.left="-".concat(this.options.labelOffsetX,"px"),o.style.textAlign="right"):(o.style.right="-".concat(this.options.labelOffsetX,"px"),o.style.textAlign="left"),o.style.top="".concat(t-.5*r+this.options.labelOffsetY,"px"),e+="";var s=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)},OI._getSafeDrawData=function(t,e,i){var n,r;return t0?(n=t0){_T(t).call(t,(function(t,e){return t.screen_x===e.screen_x?t.groupIde[o].screen_y?e[o].screen_y:n,r=rt[s].accumulatedNegative?t[s].accumulatedNegative:n)>t[s].accumulatedPositive?t[s].accumulatedPositive:n,r=(r=r0){return 1==e.options.interpolation.enabled?EI._catmullRom(t,e):EI._linear(t)}},EI.drawIcon=function(t,e,i,n,r,o){var s,a,l=.5*r,h=qb("rect",o.svgElements,o.svg);(h.setAttributeNS(null,"x",e),h.setAttributeNS(null,"y",i-l),h.setAttributeNS(null,"width",n),h.setAttributeNS(null,"height",2*l),h.setAttributeNS(null,"class","vis-outline"),(s=qb("path",o.svgElements,o.svg)).setAttributeNS(null,"class",t.className),void 0!==t.style&&s.setAttributeNS(null,"style",t.style),s.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+n)+","+i),1==t.options.shaded.enabled&&(a=qb("path",o.svgElements,o.svg),"top"==t.options.shaded.orientation?a.setAttributeNS(null,"d","M"+e+", "+(i-l)+"L"+e+","+i+" L"+(e+n)+","+i+" L"+(e+n)+","+(i-l)):a.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+l)+" L"+(e+n)+","+(i+l)+"L"+(e+n)+","+i),a.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&a.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled)&&Zb(e+.5*n,i,{style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className},o.svgElements,o.svg)},EI.drawShading=function(t,e,i,n){if(1==e.options.shaded.enabled){var r,o=Number(n.svg.style.height.replace("px","")),s=qb("path",n.svgElements,n.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var l=0;l="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?o:Math.min(Math.max(0,e.zeroPosition),o),r="group"==e.options.shaded.orientation&&null!=i&&null!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+l+" H"+t[0][0]+" Z",s.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&s.setAttributeNS(null,"style",e.options.shaded.style),s.setAttributeNS(null,"d",r)}},EI.draw=function(t,e,i){if(null!=t&&null!=t){var n=qb("path",i.svgElements,i.svg);n.setAttributeNS(null,"class",e.className),void 0!==e.style&&n.setAttributeNS(null,"style",e.style);var r="L";1==e.options.interpolation.enabled&&(r="C"),n.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,r,!1))}},EI.serializePath=function(t,e,i){if(t.length<2)return"";var n,r=e;if(i)for(n=t.length-2;n>0;n--)r+=t[n][0]+","+t[n][1]+" ";else for(n=1;n0&&(f=1/f),(m=3*v*(v+g))>0&&(m=1/m),a={screen_x:(-b*n.screen_x+c*r.screen_x+_*o.screen_x)*f,screen_y:(-b*n.screen_y+c*r.screen_y+_*o.screen_y)*f},l={screen_x:(y*r.screen_x+p*o.screen_x-b*s.screen_x)*m,screen_y:(y*r.screen_y+p*o.screen_y-b*s.screen_y)*m},0==a.screen_x&&0==a.screen_y&&(a=r),0==l.screen_x&&0==l.screen_y&&(l=o),k.push([a.screen_x,a.screen_y]),k.push([l.screen_x,l.screen_y]),k.push([o.screen_x,o.screen_y]);return k},EI._linear=function(t){for(var e=[],i=0;ie.x?1:-1}))):this.itemsData=[]},PI.prototype.getItems=function(){return this.itemsData},PI.prototype.setZeroPosition=function(t){this.zeroPosition=t},PI.prototype.setOptions=function(t){if(void 0!==t){wE.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),wE.mergeOptions(this.options,t,"interpolation"),wE.mergeOptions(this.options,t,"drawPoints"),wE.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==Nd(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))}},PI.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)},PI.prototype.getLegend=function(t,e,i,n,r){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!=r&&null!=r||(r=.5*e),this.options.style){case"line":EI.drawIcon(this,n,r,t,e,i);break;case"points":case"point":TI.drawIcon(this,n,r,t,e,i);break;case"bar":OI.drawIcon(this,n,r,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},PI.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=wE.xss(o),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},AI.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=rp(this.groups);_T(t).call(t,(function(t,e){return t0){var s={};for(this._getRelevantData(o,s,n,r),this._applySampling(o,s),e=0;e0)switch(t.options.style){case"line":l.hasOwnProperty(o[e])||(l[o[e]]=EI.calcPath(s[o[e]],t)),EI.draw(l[o[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||TI.draw(s[o[e]],t,this.framework)}}}return Ub(this.svgElements),!1},LI.prototype._stack=function(t,e){var i,n,r,o,s;i=0;for(var a=0;at[a].x){s=e[l],o=0==l?s:e[l-1],i=l;break}}void 0===s&&(o=e[e.length-1],s=e[e.length-1]),n=s.x-o.x,r=s.y-o.y,t[a].y=0==n?t[a].orginalY+s.y:t[a].orginalY+r/n*(t[a].x-o.x)+o.y}},LI.prototype._getRelevantData=function(t,e,i,n){var r,o,s,a;if(t.length>0)for(o=0;o0)for(var i=0;i0){var r,o=n.length,s=o/(this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x));r=Math.min(Math.ceil(.2*o),Math.max(1,Math.round(s)));for(var a=new Array(o),l=0;l0){for(o=0;o0&&(r=this.groups[t[o]],!0===s.stack&&"bar"===s.style?"left"===s.yAxisOrientation?a=Yc(a).call(a,n):l=Yc(l).call(l,n):i[t[o]]=r.getYRange(n,t[o]));OI.getStackedYRange(a,i,t,"__barStackLeft","left"),OI.getStackedYRange(l,i,t,"__barStackRight","right")}},LI.prototype._updateYAxis=function(t,e){var i,n,r=!1,o=!1,s=!1,a=1e9,l=1e9,h=-1e9,u=-1e9;if(t.length>0){for(var d=0;di?i:a,h=hi?i:l,u=uo?o:t,e=null==e||e0&&h.push(u.screenToValue(r)),!d.hidden&&this.itemsData.length>0&&h.push(d.screenToValue(r)),{event:t,customTime:s?s.options.id:null,what:l,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:n,y:r,time:o,value:h}},GI.prototype._createConfigurator=function(){return new vI(this,this.dom.container,BI)};var WI=Jb();sO.locale(WI);var VI={Core:RP,DateUtil:nP,Range:oP,stack:gA,TimeStep:cP,components:{items:{Item:DA,BackgroundItem:AA,BoxItem:CA,ClusterItem:WA,PointItem:MA,RangeItem:EA},BackgroundGroup:wA,Component:IE,CurrentTime:jP,CustomTime:NP,DataAxis:CI,DataScale:kI,GraphGroup:PI,Group:bA,ItemSet:tI,Legend:AI,LineGraph:LI,TimeAxis:mP}};t.DOMutil=Qb,t.DataSet=nO,t.DataView=rO,t.Graph2d=GI,t.Hammer=uP,t.Queue=tO,t.Timeline=yI,t.keycharm=gP,t.moment=sO,t.timeline=VI,t.util=Wb}));
+
diff --git a/assets/vendor/vis-timeline.min.js.peer-bak b/assets/vendor/vis-timeline.min.js.peer-bak
new file mode 100644
index 0000000..755e9bc
--- /dev/null
+++ b/assets/vendor/vis-timeline.min.js.peer-bak
@@ -0,0 +1,34 @@
+/**
+ * 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(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("moment"),require("vis-data/peer/umd/vis-data.js")):"function"==typeof define&&define.amd?define(["exports","moment","vis-data/peer/umd/vis-data.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).vis=t.vis||{},t.moment,t.vis)}(this,(function(t,e,n){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s=function(t){return t&&t.Math===Math&&t},a=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof o&&o)||function(){return this}()||o||Function("return this")(),l=function(t){try{return!!t()}catch(t){return!0}},h=!l((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=h,c=Function.prototype,d=c.apply,p=c.call,m="object"==typeof Reflect&&Reflect.apply||(u?p.bind(d):function(){return p.apply(d,arguments)}),f=h,v=Function.prototype,g=v.call,y=f&&v.bind.bind(g,g),b=f?y:function(t){return function(){return g.apply(t,arguments)}},w=b,k=w({}.toString),_=w("".slice),x=function(t){return _(k(t),8,-1)},C=x,S=b,D=function(t){if("Function"===C(t))return S(t)},T="object"==typeof document&&document.all,E={all:T,IS_HTMLDDA:void 0===T&&void 0!==T},O=E.all,A=E.IS_HTMLDDA?function(t){return"function"==typeof t||t===O}:function(t){return"function"==typeof t},I={},P=!l((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),M=h,N=Function.prototype.call,F=M?N.bind(N):function(){return N.apply(N,arguments)},R={},L={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,B=j&&!L.call({1:2},1);R.f=B?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=l,Y=x,V=Object,U=b("".split),X=W((function(){return!V("z").propertyIsEnumerable(0)}))?function(t){return"String"===Y(t)?U(t,""):V(t)}:V,q=function(t){return null==t},K=q,$=TypeError,Z=function(t){if(K(t))throw new $("Can't call method on "+t);return t},Q=X,J=Z,tt=function(t){return Q(J(t))},et=A,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={},rt=ot,st=a,at=A,lt=function(t){return at(t)?t:void 0},ht=function(t,e){return arguments.length<2?lt(rt[t])||lt(st[t]):rt[t]&&rt[t][e]||st[t]&&st[t][e]},ut=b({}.isPrototypeOf),ct="undefined"!=typeof navigator&&String(navigator.userAgent)||"",dt=a,pt=ct,mt=dt.process,ft=dt.Deno,vt=mt&&mt.versions||ft&&ft.version,gt=vt&&vt.v8;gt&&(H=(z=gt.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=l,kt=a.String,_t=!!Object.getOwnPropertySymbols&&!wt((function(){var t=Symbol("symbol detection");return!kt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&bt&&bt<41})),xt=_t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ct=ht,St=A,Dt=ut,Tt=Object,Et=xt?function(t){return"symbol"==typeof t}:function(t){var e=Ct("Symbol");return St(e)&&Dt(e.prototype,Tt(t))},Ot=String,At=function(t){try{return Ot(t)}catch(t){return"Object"}},It=A,Pt=At,Mt=TypeError,Nt=function(t){if(It(t))return t;throw new Mt(Pt(t)+" is not a function")},Ft=Nt,Rt=q,Lt=function(t,e){var i=t[e];return Rt(i)?void 0:Ft(i)},jt=F,Bt=A,zt=nt,Ht=TypeError,Gt={exports:{}},Wt=a,Yt=Object.defineProperty,Vt=function(t,e){try{Yt(Wt,t,{value:e,configurable:!0,writable:!0})}catch(i){Wt[t]=e}return e},Ut="__core-js_shared__",Xt=a[Ut]||Vt(Ut,{}),qt=Xt;(Gt.exports=function(t,e){return qt[t]||(qt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Kt=Gt.exports,$t=Z,Zt=Object,Qt=function(t){return Zt($t(t))},Jt=Qt,te=b({}.hasOwnProperty),ee=Object.hasOwn||function(t,e){return te(Jt(t),e)},ie=b,ne=0,oe=Math.random(),re=ie(1..toString),se=function(t){return"Symbol("+(void 0===t?"":t)+")_"+re(++ne+oe,36)},ae=Kt,le=ee,he=se,ue=_t,ce=xt,de=a.Symbol,pe=ae("wks"),me=ce?de.for||de:de&&de.withoutSetter||he,fe=function(t){return le(pe,t)||(pe[t]=ue&&le(de,t)?de[t]:me("Symbol."+t)),pe[t]},ve=F,ge=nt,ye=Et,be=Lt,we=function(t,e){var i,n;if("string"===e&&Bt(i=t.toString)&&!zt(n=jt(i,t)))return n;if(Bt(i=t.valueOf)&&!zt(n=jt(i,t)))return n;if("string"!==e&&Bt(i=t.toString)&&!zt(n=jt(i,t)))return n;throw new Ht("Can't convert object to primitive value")},ke=TypeError,_e=fe("toPrimitive"),xe=function(t,e){if(!ge(t)||ye(t))return t;var i,n=be(t,_e);if(n){if(void 0===e&&(e="default"),i=ve(n,t,e),!ge(i)||ye(i))return i;throw new ke("Can't convert object to primitive value")}return void 0===e&&(e="number"),we(t,e)},Ce=Et,Se=function(t){var e=xe(t,"string");return Ce(e)?e:e+""},De=nt,Te=a.document,Ee=De(Te)&&De(Te.createElement),Oe=function(t){return Ee?Te.createElement(t):{}},Ae=Oe,Ie=!P&&!l((function(){return 7!==Object.defineProperty(Ae("div"),"a",{get:function(){return 7}}).a})),Pe=P,Me=F,Ne=R,Fe=G,Re=tt,Le=Se,je=ee,Be=Ie,ze=Object.getOwnPropertyDescriptor;I.f=Pe?ze:function(t,e){if(t=Re(t),e=Le(e),Be)try{return ze(t,e)}catch(t){}if(je(t,e))return Fe(!Me(Ne.f,t,e),t[e])};var He=l,Ge=A,We=/#|\.prototype\./,Ye=function(t,e){var i=Ue[Ve(t)];return i===qe||i!==Xe&&(Ge(e)?He(e):!!e)},Ve=Ye.normalize=function(t){return String(t).replace(We,".").toLowerCase()},Ue=Ye.data={},Xe=Ye.NATIVE="N",qe=Ye.POLYFILL="P",Ke=Ye,$e=Nt,Ze=h,Qe=D(D.bind),Je=function(t,e){return $e(t),void 0===e?t:Ze?Qe(t,e):function(){return t.apply(e,arguments)}},ti={},ei=P&&l((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ii=nt,ni=String,oi=TypeError,ri=function(t){if(ii(t))return t;throw new oi(ni(t)+" is not an object")},si=P,ai=Ie,li=ei,hi=ri,ui=Se,ci=TypeError,di=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,mi="enumerable",fi="configurable",vi="writable";ti.f=si?li?function(t,e,i){if(hi(t),e=ui(e),hi(i),"function"==typeof t&&"prototype"===e&&"value"in i&&vi in i&&!i[vi]){var n=pi(t,e);n&&n[vi]&&(t[e]=i.value,i={configurable:fi in i?i[fi]:n[fi],enumerable:mi in i?i[mi]:n[mi],writable:!1})}return di(t,e,i)}:di:function(t,e,i){if(hi(t),e=ui(e),hi(i),ai)try{return di(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 gi=ti,yi=G,bi=P?function(t,e,i){return gi.f(t,e,yi(1,i))}:function(t,e,i){return t[e]=i,t},wi=a,ki=m,_i=D,xi=A,Ci=I.f,Si=Ke,Di=ot,Ti=Je,Ei=bi,Oi=ee,Ai=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 ki(t,this,arguments)};return e.prototype=t.prototype,e},Ii=function(t,e){var i,n,o,r,s,a,l,h,u,c=t.target,d=t.global,p=t.stat,m=t.proto,f=d?wi:p?wi[c]:(wi[c]||{}).prototype,v=d?Di:Di[c]||Ei(Di,c,{})[c],g=v.prototype;for(r in e)n=!(i=Si(d?r:c+(p?".":"#")+r,t.forced))&&f&&Oi(f,r),a=v[r],n&&(l=t.dontCallGetSet?(u=Ci(f,r))&&u.value:f[r]),s=n&&l?l:e[r],n&&typeof a==typeof s||(h=t.bind&&n?Ti(s,wi):t.wrap&&n?Ai(s):m&&xi(s)?_i(s):s,(t.sham||s&&s.sham||a&&a.sham)&&Ei(h,"sham",!0),Ei(v,r,h),m&&(Oi(Di,o=c+"Prototype")||Ei(Di,o,{}),Ei(Di[o],r,s),t.real&&g&&(i||!g[r])&&Ei(g,r,s)))},Pi=b([].slice),Mi=b,Ni=Nt,Fi=nt,Ri=ee,Li=Pi,ji=h,Bi=Function,zi=Mi([].concat),Hi=Mi([].join),Gi={},Wi=ji?Bi.bind:function(t){var e=Ni(this),i=e.prototype,n=Li(arguments,1),o=function(){var i=zi(n,Li(arguments));return this instanceof o?function(t,e,i){if(!Ri(Gi,e)){for(var n=[],o=0;o0?xn:_n)(e)},Sn=function(t){var e=+t;return e!=e||0===e?0:Cn(e)},Dn=Sn,Tn=Math.max,En=Math.min,On=function(t,e){var i=Dn(t);return i<0?Tn(i+e,0):En(i,e)},An=Sn,In=Math.min,Pn=function(t){return t>0?In(An(t),9007199254740991):0},Mn=function(t){return Pn(t.length)},Nn=tt,Fn=On,Rn=Mn,Ln=function(t){return function(e,i,n){var o,r=Nn(e),s=Rn(r),a=Fn(n,s);if(t&&i!=i){for(;s>a;)if((o=r[a++])!=o)return!0}else for(;s>a;a++)if((t||a in r)&&r[a]===i)return t||a||0;return!t&&-1}},jn={includes:Ln(!0),indexOf:Ln(!1)},Bn={},zn=ee,Hn=tt,Gn=jn.indexOf,Wn=Bn,Yn=b([].push),Vn=function(t,e){var i,n=Hn(t),o=0,r=[];for(i in n)!zn(Wn,i)&&zn(n,i)&&Yn(r,i);for(;e.length>o;)zn(n,i=e[o++])&&(~Gn(r,i)||Yn(r,i));return r},Un=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Xn=Vn,qn=Un,Kn=Object.keys||function(t){return Xn(t,qn)},$n=P,Zn=ei,Qn=ti,Jn=ri,to=tt,eo=Kn;kn.f=$n&&!Zn?Object.defineProperties:function(t,e){Jn(t);for(var i,n=to(e),o=eo(e),r=o.length,s=0;r>s;)Qn.f(t,i=o[s++],n[i]);return t};var io,no=ht("document","documentElement"),oo=se,ro=Kt("keys"),so=function(t){return ro[t]||(ro[t]=oo(t))},ao=ri,lo=kn,ho=Un,uo=Bn,co=no,po=Oe,mo="prototype",fo="script",vo=so("IE_PROTO"),go=function(){},yo=function(t){return"<"+fo+">"+t+""+fo+">"},bo=function(t){t.write(yo("")),t.close();var e=t.parentWindow.Object;return t=null,e},wo=function(){try{io=new ActiveXObject("htmlfile")}catch(t){}var t,e,i;wo="undefined"!=typeof document?document.domain&&io?bo(io):(e=po("iframe"),i="java"+fo+":",e.style.display="none",co.appendChild(e),e.src=String(i),(t=e.contentWindow.document).open(),t.write(yo("document.F=Object")),t.close(),t.F):bo(io);for(var n=ho.length;n--;)delete wo[mo][ho[n]];return wo()};uo[vo]=!0;var ko=Object.create||function(t,e){var i;return null!==t?(go[mo]=ao(t),i=new go,go[mo]=null,i[vo]=t):i=wo(),void 0===e?i:lo.f(i,e)},_o=Ii,xo=m,Co=Wi,So=function(t){if(yn(t))return t;throw new wn(bn(t)+" is not a constructor")},Do=ri,To=nt,Eo=ko,Oo=l,Ao=ht("Reflect","construct"),Io=Object.prototype,Po=[].push,Mo=Oo((function(){function t(){}return!(Ao((function(){}),[],t)instanceof t)})),No=!Oo((function(){Ao((function(){}))})),Fo=Mo||No;_o({target:"Reflect",stat:!0,forced:Fo,sham:Fo},{construct:function(t,e){So(t),Do(e);var i=arguments.length<3?t:So(arguments[2]);if(No&&!Mo)return Ao(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 xo(Po,n,e),new(xo(Co,t,n))}var o=i.prototype,r=Eo(To(o)?o:Io),s=xo(t,r,e);return To(s)?s:r}});var Ro=r(ot.Reflect.construct);function Lo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var jo={exports:{}},Bo=Ii,zo=P,Ho=ti.f;Bo({target:"Object",stat:!0,forced:Object.defineProperty!==Ho,sham:!zo},{defineProperty:Ho});var Go=ot.Object,Wo=jo.exports=function(t,e,i){return Go.defineProperty(t,e,i)};Go.defineProperty.sham&&(Wo.sham=!0);var Yo=jo.exports,Vo=r(Yo),Uo=x,Xo=Array.isArray||function(t){return"Array"===Uo(t)},qo=TypeError,Ko=function(t){if(t>9007199254740991)throw qo("Maximum allowed index exceeded");return t},$o=Se,Zo=ti,Qo=G,Jo=function(t,e,i){var n=$o(e);n in t?Zo.f(t,n,Qo(0,i)):t[n]=i},tr=Xo,er=gn,ir=nt,nr=fe("species"),or=Array,rr=function(t){var e;return tr(t)&&(e=t.constructor,(er(e)&&(e===or||tr(e.prototype))||ir(e)&&null===(e=e[nr]))&&(e=void 0)),void 0===e?or:e},sr=function(t,e){return new(rr(t))(0===e?0:e)},ar=l,lr=yt,hr=fe("species"),ur=function(t){return lr>=51||!ar((function(){var e=[];return(e.constructor={})[hr]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},cr=Ii,dr=l,pr=Xo,mr=nt,fr=Qt,vr=Mn,gr=Ko,yr=Jo,br=sr,wr=ur,kr=yt,_r=fe("isConcatSpreadable"),xr=kr>=51||!dr((function(){var t=[];return t[_r]=!1,t.concat()[0]!==t})),Cr=function(t){if(!mr(t))return!1;var e=t[_r];return void 0!==e?!!e:pr(t)};cr({target:"Array",proto:!0,arity:1,forced:!xr||!wr("concat")},{concat:function(t){var e,i,n,o,r,s=fr(this),a=br(s,0),l=0;for(e=-1,n=arguments.length;ey;y++)if((a||y in f)&&(p=v(d=f[y],y,m),t))if(e)w[y]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return y;case 2:Bs(w,d)}else switch(t){case 4:return!1;case 7:Bs(w,d)}return r?-1:n||o?o:w}},Hs={forEach:zs(0),map:zs(1),filter:zs(2),some:zs(3),every:zs(4),find:zs(5),findIndex:zs(6),filterReject:zs(7)},Gs=Ii,Ws=a,Ys=F,Vs=b,Us=P,Xs=_t,qs=l,Ks=ee,$s=ut,Zs=ri,Qs=tt,Js=Se,ta=Tr,ea=G,ia=ko,na=Kn,oa=Er,ra=Ir,sa=Wr,aa=I,la=ti,ha=kn,ua=R,ca=Vr,da=Xr,pa=Kt,ma=Bn,fa=se,va=fe,ga=qr,ya=ns,ba=ls,wa=gs,ka=Ms,_a=Hs.forEach,xa=so("hidden"),Ca="Symbol",Sa="prototype",Da=ka.set,Ta=ka.getterFor(Ca),Ea=Object[Sa],Oa=Ws.Symbol,Aa=Oa&&Oa[Sa],Ia=Ws.RangeError,Pa=Ws.TypeError,Ma=Ws.QObject,Na=aa.f,Fa=la.f,Ra=ra.f,La=ua.f,ja=Vs([].push),Ba=pa("symbols"),za=pa("op-symbols"),Ha=pa("wks"),Ga=!Ma||!Ma[Sa]||!Ma[Sa].findChild,Wa=function(t,e,i){var n=Na(Ea,e);n&&delete Ea[e],Fa(t,e,i),n&&t!==Ea&&Fa(Ea,e,n)},Ya=Us&&qs((function(){return 7!==ia(Fa({},"a",{get:function(){return Fa(this,"a",{value:7}).a}})).a}))?Wa:Fa,Va=function(t,e){var i=Ba[t]=ia(Aa);return Da(i,{type:Ca,tag:t,description:e}),Us||(i.description=e),i},Ua=function(t,e,i){t===Ea&&Ua(za,e,i),Zs(t);var n=Js(e);return Zs(i),Ks(Ba,n)?(i.enumerable?(Ks(t,xa)&&t[xa][n]&&(t[xa][n]=!1),i=ia(i,{enumerable:ea(0,!1)})):(Ks(t,xa)||Fa(t,xa,ea(1,{})),t[xa][n]=!0),Ya(t,n,i)):Fa(t,n,i)},Xa=function(t,e){Zs(t);var i=Qs(e),n=na(i).concat(Za(i));return _a(n,(function(e){Us&&!Ys(qa,i,e)||Ua(t,e,i[e])})),t},qa=function(t){var e=Js(t),i=Ys(La,this,e);return!(this===Ea&&Ks(Ba,e)&&!Ks(za,e))&&(!(i||!Ks(this,e)||!Ks(Ba,e)||Ks(this,xa)&&this[xa][e])||i)},Ka=function(t,e){var i=Qs(t),n=Js(e);if(i!==Ea||!Ks(Ba,n)||Ks(za,n)){var o=Na(i,n);return!o||!Ks(Ba,n)||Ks(i,xa)&&i[xa][n]||(o.enumerable=!0),o}},$a=function(t){var e=Ra(Qs(t)),i=[];return _a(e,(function(t){Ks(Ba,t)||Ks(ma,t)||ja(i,t)})),i},Za=function(t){var e=t===Ea,i=Ra(e?za:Qs(t)),n=[];return _a(i,(function(t){!Ks(Ba,t)||e&&!Ks(Ea,t)||ja(n,Ba[t])})),n};Xs||(Oa=function(){if($s(Aa,this))throw new Pa("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?ta(arguments[0]):void 0,e=fa(t),i=function(t){this===Ea&&Ys(i,za,t),Ks(this,xa)&&Ks(this[xa],e)&&(this[xa][e]=!1);var n=ea(1,t);try{Ya(this,e,n)}catch(t){if(!(t instanceof Ia))throw t;Wa(this,e,n)}};return Us&&Ga&&Ya(Ea,e,{configurable:!0,set:i}),Va(e,t)},ca(Aa=Oa[Sa],"toString",(function(){return Ta(this).tag})),ca(Oa,"withoutSetter",(function(t){return Va(fa(t),t)})),ua.f=qa,la.f=Ua,ha.f=Xa,aa.f=Ka,oa.f=ra.f=$a,sa.f=Za,ga.f=function(t){return Va(va(t),t)},Us&&da(Aa,"description",{configurable:!0,get:function(){return Ta(this).description}})),Gs({global:!0,constructor:!0,wrap:!0,forced:!Xs,sham:!Xs},{Symbol:Oa}),_a(na(Ha),(function(t){ya(t)})),Gs({target:Ca,stat:!0,forced:!Xs},{useSetter:function(){Ga=!0},useSimple:function(){Ga=!1}}),Gs({target:"Object",stat:!0,forced:!Xs,sham:!Us},{create:function(t,e){return void 0===e?ia(t):Xa(ia(t),e)},defineProperty:Ua,defineProperties:Xa,getOwnPropertyDescriptor:Ka}),Gs({target:"Object",stat:!0,forced:!Xs},{getOwnPropertyNames:$a}),ba(),wa(Oa,Ca),ma[xa]=!0;var Qa=_t&&!!Symbol.for&&!!Symbol.keyFor,Ja=Ii,tl=ht,el=ee,il=Tr,nl=Kt,ol=Qa,rl=nl("string-to-symbol-registry"),sl=nl("symbol-to-string-registry");Ja({target:"Symbol",stat:!0,forced:!ol},{for:function(t){var e=il(t);if(el(rl,e))return rl[e];var i=tl("Symbol")(e);return rl[e]=i,sl[i]=e,i}});var al=Ii,ll=ee,hl=Et,ul=At,cl=Qa,dl=Kt("symbol-to-string-registry");al({target:"Symbol",stat:!0,forced:!cl},{keyFor:function(t){if(!hl(t))throw new TypeError(ul(t)+" is not a symbol");if(ll(dl,t))return dl[t]}});var pl=Xo,ml=A,fl=x,vl=Tr,gl=b([].push),yl=Ii,bl=ht,wl=m,kl=F,_l=b,xl=l,Cl=A,Sl=Et,Dl=Pi,Tl=function(t){if(ml(t))return t;if(pl(t)){for(var e=t.length,i=[],n=0;n=e.length)return t.target=void 0,au(void 0,!0);switch(i){case"keys":return au(n,!1);case"values":return au(e[n],!1)}return au([n,e[n]],!1)}),"values"),ou.Arguments=ou.Array;var cu={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},du=a,pu=Qi,mu=bi,fu=Ql,vu=fe("toStringTag");for(var gu in cu){var yu=du[gu],bu=yu&&yu.prototype;bu&&pu(bu)!==vu&&mu(bu,vu,gu),fu[gu]=fu.Array}var wu=Zl,ku=fe,_u=ti.f,xu=ku("metadata"),Cu=Function.prototype;void 0===Cu[xu]&&_u(Cu,xu,{value:null}),ns("asyncDispose"),ns("dispose"),ns("metadata");var Su=wu,Du=b,Tu=ht("Symbol"),Eu=Tu.keyFor,Ou=Du(Tu.prototype.valueOf),Au=Tu.isRegisteredSymbol||function(t){try{return void 0!==Eu(Ou(t))}catch(t){return!1}};Ii({target:"Symbol",stat:!0},{isRegisteredSymbol:Au});for(var Iu=Kt,Pu=ht,Mu=b,Nu=Et,Fu=fe,Ru=Pu("Symbol"),Lu=Ru.isWellKnownSymbol,ju=Pu("Object","getOwnPropertyNames"),Bu=Mu(Ru.prototype.valueOf),zu=Iu("wks"),Hu=0,Gu=ju(Ru),Wu=Gu.length;Hu=a?t?"":void 0:(n=Qu(r,s))<55296||n>56319||s+1===a||(o=Qu(r,s+1))<56320||o>57343?t?Zu(r,s):n:t?Ju(r,s,s+2):o-56320+(n-55296<<10)+65536}},ec={codeAt:tc(!1),charAt:tc(!0)}.charAt,ic=Tr,nc=Ms,oc=eu,rc=iu,sc="String Iterator",ac=nc.set,lc=nc.getterFor(sc);oc(String,"String",(function(t){ac(this,{type:sc,string:ic(t),index:0})}),(function(){var t,e=lc(this),i=e.string,n=e.index;return n>=i.length?rc(void 0,!0):(t=ec(i,n),e.index+=t.length,rc(t,!1))}));var hc=r(qr.f("iterator"));function uc(t){return uc="function"==typeof Uu&&"symbol"==typeof hc?function(t){return typeof t}:function(t){return t&&"function"==typeof Uu&&t.constructor===Uu&&t!==Uu.prototype?"symbol":typeof t},uc(t)}var cc=r(qr.f("toPrimitive"));function dc(t){var e=function(t,e){if("object"!==uc(t)||null===t)return t;var i=t[cc];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==uc(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===uc(e)?e:String(e)}function pc(t,e){for(var i=0;ii,s=Uc(n)?n:Zc(n),a=r?Kc(arguments,i):[],l=r?function(){Vc(s,this,a)}:s;return e?t(l,o):t(l)}:t},td=Ii,ed=a,id=Jc(ed.setInterval,!0);td({global:!0,bind:!0,forced:ed.setInterval!==id},{setInterval:id});var nd=Ii,od=a,rd=Jc(od.setTimeout,!0);nd({global:!0,bind:!0,forced:od.setTimeout!==rd},{setTimeout:rd});var sd=r(ot.setTimeout),ad=l,ld=function(t,e){var i=[][t];return!!i&&ad((function(){i.call(null,e||function(){return 1},1)}))},hd=Hs.forEach,ud=ld("forEach")?[].forEach:function(t){return hd(this,t,arguments.length>1?arguments[1]:void 0)};Ii({target:"Array",proto:!0,forced:[].forEach!==ud},{forEach:ud});var cd=_c("Array").forEach,dd=Qi,pd=ee,md=ut,fd=cd,vd=Array.prototype,gd={DOMTokenList:!0,NodeList:!0},yd=function(t){var e=t.forEach;return t===vd||md(vd,t)&&e===vd.forEach||pd(gd,dd(t))?fd:e},bd=r(yd),wd=r("undefined"!=typeof window&&window.moment||e),kd=r(ot.Object.getOwnPropertySymbols),_d=Hs.filter;Ii({target:"Array",proto:!0,forced:!ur("filter")},{filter:function(t){return _d(this,t,arguments.length>1?arguments[1]:void 0)}});var xd=_c("Array").filter,Cd=ut,Sd=xd,Dd=Array.prototype,Td=function(t){var e=t.filter;return t===Dd||Cd(Dd,t)&&e===Dd.filter?Sd:e},Ed=r(Td),Od={exports:{}},Ad=Ii,Id=l,Pd=tt,Md=I.f,Nd=P;Ad({target:"Object",stat:!0,forced:!Nd||Id((function(){Md(1)})),sham:!Nd},{getOwnPropertyDescriptor:function(t,e){return Md(Pd(t),e)}});var Fd=ot.Object,Rd=Od.exports=function(t,e){return Fd.getOwnPropertyDescriptor(t,e)};Fd.getOwnPropertyDescriptor.sham&&(Rd.sham=!0);var Ld=r(Od.exports),jd=ht,Bd=Er,zd=Wr,Hd=ri,Gd=b([].concat),Wd=jd("Reflect","ownKeys")||function(t){var e=Bd.f(Hd(t)),i=zd.f;return i?Gd(e,i(t)):e},Yd=Wd,Vd=tt,Ud=I,Xd=Jo;Ii({target:"Object",stat:!0,sham:!P},{getOwnPropertyDescriptors:function(t){for(var e,i,n=Vd(t),o=Ud.f,r=Yd(n),s={},a=0;r.length>a;)void 0!==(i=o(n,e=r[a++]))&&Xd(s,e,i);return s}});var qd=r(ot.Object.getOwnPropertyDescriptors),Kd={exports:{}},$d=Ii,Zd=P,Qd=kn.f;$d({target:"Object",stat:!0,forced:Object.defineProperties!==Qd,sham:!Zd},{defineProperties:Qd});var Jd=ot.Object,tp=Kd.exports=function(t,e){return Jd.defineProperties(t,e)};Jd.defineProperties.sham&&(tp.sham=!0);var ep=r(Kd.exports);var ip=Hs.map;Ii({target:"Array",proto:!0,forced:!ur("map")},{map:function(t){return ip(this,t,arguments.length>1?arguments[1]:void 0)}});var np=_c("Array").map,op=ut,rp=np,sp=Array.prototype,ap=function(t){var e=t.map;return t===sp||op(sp,t)&&e===sp.map?rp:e},lp=r(ap),hp=Nt,up=Qt,cp=X,dp=Mn,pp=TypeError,mp=function(t){return function(e,i,n,o){hp(i);var r=up(e),s=cp(r),a=dp(r),l=t?a-1:0,h=t?-1:1;if(n<2)for(;;){if(l in s){o=s[l],l+=h;break}if(l+=h,t?l<0:a<=l)throw new pp("Reduce of empty array with no initial value")}for(;t?l>=0:a>l;l+=h)l in s&&(o=i(o,s[l],l,r));return o}},fp={left:mp(!1),right:mp(!0)},vp="process"===x(a.process),gp=fp.left;Ii({target:"Array",proto:!0,forced:!vp&&yt>79&&yt<83||!ld("reduce")},{reduce:function(t){var e=arguments.length;return gp(this,t,e,e>1?arguments[1]:void 0)}});var yp=_c("Array").reduce,bp=ut,wp=yp,kp=Array.prototype,_p=function(t){var e=t.reduce;return t===kp||bp(kp,t)&&e===kp.reduce?wp:e},xp=r(_p),Cp=Qt,Sp=Kn;Ii({target:"Object",stat:!0,forced:l((function(){Sp(1)}))},{keys:function(t){return Sp(Cp(t))}});var Dp=r(ot.Object.keys),Tp=r(Yo),Ep=F,Op=ri,Ap=Lt,Ip=function(t,e,i){var n,o;Op(t);try{if(!(n=Ap(t,"return"))){if("throw"===e)throw i;return i}n=Ep(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw i;if(o)throw n;return Op(n),i},Pp=ri,Mp=Ip,Np=Ql,Fp=fe("iterator"),Rp=Array.prototype,Lp=function(t){return void 0!==t&&(Np.Array===t||Rp[Fp]===t)},jp=Qi,Bp=Lt,zp=q,Hp=Ql,Gp=fe("iterator"),Wp=function(t){if(!zp(t))return Bp(t,Gp)||Bp(t,"@@iterator")||Hp[jp(t)]},Yp=F,Vp=Nt,Up=ri,Xp=At,qp=Wp,Kp=TypeError,$p=function(t,e){var i=arguments.length<2?qp(t):e;if(Vp(i))return Up(Yp(i,t));throw new Kp(Xp(t)+" is not iterable")},Zp=Je,Qp=F,Jp=Qt,tm=function(t,e,i,n){try{return n?e(Pp(i)[0],i[1]):e(i)}catch(e){Mp(t,"throw",e)}},em=Lp,im=gn,nm=Mn,om=Jo,rm=$p,sm=Wp,am=Array,lm=fe("iterator"),hm=!1;try{var um=0,cm={next:function(){return{done:!!um++}},return:function(){hm=!0}};cm[lm]=function(){return this},Array.from(cm,(function(){throw 2}))}catch(t){}var dm=function(t){var e=Jp(t),i=im(this),n=arguments.length,o=n>1?arguments[1]:void 0,r=void 0!==o;r&&(o=Zp(o,n>2?arguments[2]:void 0));var s,a,l,h,u,c,d=sm(e),p=0;if(!d||this===am&&em(d))for(s=nm(e),a=i?new this(s):am(s);s>p;p++)c=r?o(e[p],p):e[p],om(a,p,c);else for(u=(h=rm(e,d)).next,a=i?new this:[];!(l=Qp(u,h)).done;p++)c=r?tm(h,o,[l.value,p],!0):l.value,om(a,p,c);return a.length=p,a},pm=function(t,e){try{if(!e&&!hm)return!1}catch(t){return!1}var i=!1;try{var n={};n[lm]=function(){return{next:function(){return{done:i=!0}}}},t(n)}catch(t){}return i};Ii({target:"Array",stat:!0,forced:!pm((function(t){Array.from(t)}))},{from:dm});var mm=ot.Array.from,fm=r(mm),vm=Wp,gm=r(vm),ym=r(vm),bm=r(Bc);var wm=P,km=Xo,_m=TypeError,xm=Object.getOwnPropertyDescriptor,Cm=wm&&!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(km(t)&&!xm(t,"length").writable)throw new _m("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Sm=Qt,Dm=Mn,Tm=Cm,Em=Ko;Ii({target:"Array",proto:!0,arity:1,forced:l((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=Sm(this),i=Dm(e),n=arguments.length;Em(i+n);for(var o=0;ot.length)&&(e=t.length);for(var i=0,n=new Array(e);ih-n+i;r--)Wf(l,r-1)}else if(i>n)for(r=h-n;r>u;r--)a=r+i-1,(s=r+n-1)in l?l[a]=l[s]:Wf(l,a);for(r=0;ro;)for(var a,l=av(arguments[o++]),h=r?uv(nv(l),r(l)):nv(l),u=h.length,c=0;u>c;)a=h[c++],Jf&&!ev(s,l,a)||(i[a]=l[a]);return i}:lv,dv=cv;Ii({target:"Object",stat:!0,arity:2,forced:Object.assign!==dv},{assign:dv});var pv=r(ot.Object.assign),mv=jn.includes;Ii({target:"Array",proto:!0,forced:l((function(){return!Array(1).includes()}))},{includes:function(t){return mv(this,t,arguments.length>1?arguments[1]:void 0)}});var fv=_c("Array").includes,vv=nt,gv=x,yv=fe("match"),bv=function(t){var e;return vv(t)&&(void 0!==(e=t[yv])?!!e:"RegExp"===gv(t))},wv=TypeError,kv=fe("match"),_v=Ii,xv=function(t){if(bv(t))throw new wv("The method doesn't accept regular expressions");return t},Cv=Z,Sv=Tr,Dv=function(t){var e=/./;try{"/./"[t](e)}catch(i){try{return e[kv]=!1,"/./"[t](e)}catch(t){}}return!1},Tv=b("".indexOf);_v({target:"String",proto:!0,forced:!Dv("includes")},{includes:function(t){return!!~Tv(Sv(Cv(this)),Sv(xv(t)),arguments.length>1?arguments[1]:void 0)}});var Ev=_c("String").includes,Ov=ut,Av=fv,Iv=Ev,Pv=Array.prototype,Mv=String.prototype,Nv=function(t){var e=t.includes;return t===Pv||Ov(Pv,t)&&e===Pv.includes?Av:"string"==typeof t||t===Mv||Ov(Mv,t)&&e===Mv.includes?Iv:e},Fv=r(Nv),Rv=r(Rc),Lv=P,jv=l,Bv=b,zv=ph,Hv=Kn,Gv=tt,Wv=Bv(R.f),Yv=Bv([].push),Vv=Lv&&jv((function(){var t=Object.create(null);return t[2]=2,!Wv(t,2)})),Uv=function(t){return function(e){for(var i,n=Gv(e),o=Hv(n),r=Vv&&null===zv(n),s=o.length,a=0,l=[];s>a;)i=o[a++],Lv&&!(r?i in n:Wv(n,i))||Yv(l,t?[i,n[i]]:n[i]);return l}},Xv={entries:Uv(!0),values:Uv(!1)},qv=Xv.values;Ii({target:"Object",stat:!0},{values:function(t){return qv(t)}});var Kv=r(ot.Object.values),$v="\t\n\v\f\r \u2028\u2029\ufeff",Zv=Z,Qv=Tr,Jv=$v,tg=b("".replace),eg=RegExp("^["+Jv+"]+"),ig=RegExp("(^|[^"+Jv+"])["+Jv+"]+$"),ng=function(t){return function(e){var i=Qv(Zv(e));return 1&t&&(i=tg(i,eg,"")),2&t&&(i=tg(i,ig,"$1")),i}},og={start:ng(1),end:ng(2),trim:ng(3)},rg=a,sg=l,ag=b,lg=Tr,hg=og.trim,ug=$v,cg=rg.parseInt,dg=rg.Symbol,pg=dg&&dg.iterator,mg=/^[+-]?0x/i,fg=ag(mg.exec),vg=8!==cg(ug+"08")||22!==cg(ug+"0x16")||pg&&!sg((function(){cg(Object(pg))}))?function(t,e){var i=hg(lg(t));return cg(i,e>>>0||(fg(mg,i)?16:10))}:cg;Ii({global:!0,forced:parseInt!==vg},{parseInt:vg});var gg=r(ot.parseInt),yg=Ii,bg=jn.indexOf,wg=ld,kg=D([].indexOf),_g=!!kg&&1/kg([1],1,-0)<0;yg({target:"Array",proto:!0,forced:_g||!wg("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return _g?kg(this,t,e)||0:bg(this,t,e)}});var xg=_c("Array").indexOf,Cg=ut,Sg=xg,Dg=Array.prototype,Tg=function(t){var e=t.indexOf;return t===Dg||Cg(Dg,t)&&e===Dg.indexOf?Sg:e},Eg=r(Tg),Og=Xv.entries;Ii({target:"Object",stat:!0},{entries:function(t){return Og(t)}});var Ag=r(ot.Object.entries),Ig=r(gc),Pg=ot,Mg=m;Pg.JSON||(Pg.JSON={stringify:JSON.stringify});var Ng=function(t,e,i){return Mg(Pg.JSON.stringify,null,arguments)},Fg=r(Ng),Rg=Qt,Lg=On,jg=Mn,Bg=function(t){for(var e=Rg(this),i=jg(e),n=arguments.length,o=Lg(n>1?arguments[1]:void 0,i),r=n>2?arguments[2]:void 0,s=void 0===r?i:Lg(r,i);s>o;)e[o++]=t;return e};Ii({target:"Array",proto:!0},{fill:Bg});var zg=_c("Array").fill,Hg=ut,Gg=zg,Wg=Array.prototype,Yg=function(t){var e=t.fill;return t===Wg||Hg(Wg,t)&&e===Wg.fill?Gg:e},Vg=r(Yg),Ug={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)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o-1}var Ly=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===ly&&(t=this.compute()),ay&&this.manager.element.style&&my[t]&&(this.manager.element.style[sy]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return Ny(this.manager.recognizers,(function(e){Fy(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(Ry(t,cy))return cy;var e=Ry(t,dy),i=Ry(t,py);return e&&i?cy:e||i?e?dy:py:Ry(t,uy)?uy:hy}(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=Ry(n,cy)&&!my[cy],r=Ry(n,py)&&!my[py],s=Ry(n,dy)&&!my[dy];if(o){var a=1===t.pointers.length,l=t.distance<2,h=t.deltaTime<250;if(a&&l&&h)return}if(!s||!r)return o||r&&i&Oy||s&&i&Ay?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function jy(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function By(t){var e=t.length;if(1===e)return{x:iy(t[0].clientX),y:iy(t[0].clientY)};for(var i=0,n=0,o=0;o=ny(e)?t<0?Sy:Dy:e<0?Ty:Ey}function Yy(t,e,i){return{x:e/t||0,y:i/t||0}}function Vy(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=zy(e)),o>1&&!i.firstMultiple?i.firstMultiple=zy(e):1===o&&(i.firstMultiple=!1);var r=i.firstInput,s=i.firstMultiple,a=s?s.center:r.center,l=e.center=By(n);e.timeStamp=oy(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=Gy(a,l),e.distance=Hy(a,l),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};e.eventType!==ky&&r.eventType!==_y||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}(i,e),e.offsetDirection=Wy(e.deltaX,e.deltaY);var h,u,c=Yy(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=ny(c.x)>ny(c.y)?c.x:c.y,e.scale=s?(h=s.pointers,Hy((u=n)[0],u[1],My)/Hy(h[0],h[1],My)):1,e.rotation=s?function(t,e){return Gy(e[1],e[0],My)+Gy(t[1],t[0],My)}(s.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,o,r,s=t.lastInterval||e,a=e.timeStamp-s.timeStamp;if(e.eventType!==xy&&(a>wy||void 0===s.velocity)){var l=e.deltaX-s.deltaX,h=e.deltaY-s.deltaY,u=Yy(a,l,h);n=u.x,o=u.y,i=ny(u.x)>ny(u.y)?u.x:u.y,r=Wy(l,h),t.lastInterval=e}else i=s.velocity,n=s.velocityX,o=s.velocityY,r=s.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=r}(i,e);var d,p=t.element,m=e.srcEvent;jy(d=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=d),e.target=p}function Uy(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,r=e&ky&&n-o==0,s=e&(_y|xy)&&n-o==0;i.isFirst=!!r,i.isFinal=!!s,r&&(t.session={}),i.eventType=e,Vy(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function Xy(t){return t.trim().split(/\s+/g)}function qy(t,e,i){Ny(Xy(e),(function(e){t.addEventListener(e,i,!1)}))}function Ky(t,e,i){Ny(Xy(e),(function(e){t.removeEventListener(e,i,!1)}))}function $y(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var Zy=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){Fy(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&qy(this.element,this.evEl,this.domHandler),this.evTarget&&qy(this.target,this.evTarget,this.domHandler),this.evWin&&qy($y(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Ky(this.element,this.evEl,this.domHandler),this.evTarget&&Ky(this.target,this.evTarget,this.domHandler),this.evWin&&Ky($y(this.element),this.evWin,this.domHandler)},t}();function Qy(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]})):n.sort()),n}var sb={touchstart:ky,touchmove:2,touchend:_y,touchcancel:xy},ab=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return $g(e,t),e.prototype.handler=function(t){var e=sb[t.type],i=lb.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:yy,srcEvent:t})},e}(Zy);function lb(t,e){var i,n,o=ob(t.touches),r=this.targetIds;if(e&(2|ky)&&1===o.length)return r[o[0].identifier]=!0,[o,o];var s=ob(t.changedTouches),a=[],l=this.target;if(n=o.filter((function(t){return jy(t.target,l)})),e===ky)for(i=0;i-1&&n.splice(t,1)}),cb)}}function pb(t,e){t&ky?(this.primaryTouch=e.changedPointers[0].identifier,db.call(this,e)):t&(_y|xy)&&db.call(this,e)}function mb(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+wb(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+wb(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=gb},e.canEmit=function(){for(var t=0;te.threshold&&o&e.direction},i.attrTest=function(t){return xb.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=Cb(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(xb),Db=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Kg({event:"swipe",threshold:10,velocity:.3,direction:Oy|Ay,pointers:1},e))||this}$g(e,t);var i=e.prototype;return i.getTouchAction=function(){return Sb.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,n=this.options.direction;return n&(Oy|Ay)?i=e.overallVelocity:n&Oy?i=e.overallVelocityX:n&Ay&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&ny(i)>this.options.velocity&&e.eventType&_y},i.emit=function(t){var e=Cb(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(xb),Tb=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Kg({event:"pinch",threshold:0,pointers:2},e))||this}$g(e,t);var i=e.prototype;return i.getTouchAction=function(){return[cy]},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}(xb),Eb=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Kg({event:"rotate",threshold:0,pointers:2},e))||this}$g(e,t);var i=e.prototype;return i.getTouchAction=function(){return[cy]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(xb),Ob=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Kg({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}$g(e,t);var i=e.prototype;return i.getTouchAction=function(){return[hy]},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&(_y|xy)&&!r)this.reset();else if(t.eventType&ky)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(t.eventType&_y)return 8;return gb},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&t.eventType&_y?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=oy(),this.manager.emit(this.options.event,this._input)))},e}(kb),Ab={domEvents:!1,touchAction:ly,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ib=[[Eb,{enable:!1}],[Tb,{enable:!1},["rotate"]],[Db,{direction:Oy}],[Sb,{direction:Oy},["swipe"]],[_b],[_b,{event:"doubletap",taps:2},["tap"]],[Ob]];function Pb(t,e){var i,n=t.element;n.style&&(Ny(t.options.cssProps,(function(o,r){i=ry(n.style,r),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var Mb=function(){function t(t,e){var i,n=this;this.options=Jg({},Ab,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||(vy?nb:gy?ab:fy?fb:ub))(i,Uy),this.touchAction=new Ly(this,this.options.touchAction),Pb(this,!0),Ny(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 Jg(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var n=this.recognizers,o=e.curRecognizer;(!o||o&&8&o.state)&&(e.curRecognizer=null,o=null);for(var r=0;r\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 jb=Lb((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 r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function Vb(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i2)return qb.apply(void 0,mf(n=[Xb(e[0],e[1])]).call(n,af(ff(e).call(e,2))));var o=e[0],r=e[1];if(o instanceof Date&&r instanceof Date)return o.setTime(r.getTime()),o;var s,a=Yb(vf(r));try{for(a.s();!(s=a.n()).done;){var l=s.value;Object.prototype.propertyIsEnumerable.call(r,l)&&(r[l]===Ub?delete o[l]:null===o[l]||null===r[l]||"object"!==uc(o[l])||"object"!==uc(r[l])||zc(o[l])||zc(r[l])?o[l]=Kb(r[l]):o[l]=qb(o[l],r[l]))}}catch(t){a.e(t)}finally{a.f()}return o}function Kb(t){return zc(t)?lp(t).call(t,(function(t){return Kb(t)})):"object"===uc(t)&&null!==t?t instanceof Date?new Date(t.getTime()):qb({},t):t}function $b(t){for(var e=0,i=Dp(t);e2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)||!0===i)if("object"===uc(e[o])&&null!==e[o]&&Rv(e[o])===Object.prototype)void 0===t[o]?t[o]=hw({},e[o],i):"object"===uc(t[o])&&null!==t[o]&&Rv(t[o])===Object.prototype?hw(t[o],e[o],i):aw(t,e,o,n);else if(zc(e[o])){var r;t[o]=ff(r=e[o]).call(r)}else aw(t,e,o,n);return t}function uw(t){var e=uc(t);return"object"===e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":zc(t)?"Array":t instanceof Date?"Date":"Object":"number"===e?"Number":"boolean"===e?"Boolean":"string"===e?"String":void 0===e?"undefined":e}function cw(t,e){var i;return mf(i=[]).call(i,af(t),[e])}function dw(t){return ff(t).call(t)}var pw=Kv;var mw={asBoolean:function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},asNumber:function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},asString:function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},asSize:function(t,e){return"function"==typeof t&&(t=t()),rw(t)?t:ow(t)?t+"px":e||null},asElement:function(t,e){return"function"==typeof t&&(t=t()),t||e||null}};function fw(t){var e;switch(t.length){case 3:case 4:return(e=ew.exec(t))?{r:gg(e[1]+e[1],16),g:gg(e[2]+e[2],16),b:gg(e[3]+e[3],16)}:null;case 6:case 7:return(e=tw.exec(t))?{r:gg(e[1],16),g:gg(e[2],16),b:gg(e[3],16)}:null;default:return null}}function vw(t,e,i){var n;return"#"+ff(n=((1<<24)+(t<<16)+(e<<8)+i).toString(16)).call(n,1)}function gw(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,Math.min(e,i)),o=Math.max(t,Math.max(e,i));return n===o?{h:0,s:0,v:n}:{h:60*((t===n?3:i===n?1:5)-(t===n?e-i:i===n?t-e:i-t)/(o-n))/360,s:(o-n)/o,v:o}}function yw(t){var e=document.createElement("div"),i={};e.style.cssText=t;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:1;Lo(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return mc(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){if("string"==typeof t)return Dw[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i,n=this._isColorString(t);if(void 0!==n&&(t=n),!0===rw(t)){if(!0===xw(t)){var o=t.substr(4).substr(0,t.length-5).split(",");i={r:o[0],g:o[1],b:o[2],a:1}}else if(!0===Cw(t)){var r=t.substr(5).substr(0,t.length-6).split(",");i={r:r[0],g:r[1],b:r[2],a:r[3]}}else if(!0===_w(t)){var s=fw(t);i={r:s.r,g:s.g,b:s.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var a=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:a}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+Fg(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this;!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=pv({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",sd((function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)}),0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=pv({},t)),this.color=t;var e=gw(t.r,t.g,t.b),i=2*Math.PI,n=this.r*e.s,o=this.centerCoordinates.x+n*Math.sin(i*e.h),r=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=r-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=gw(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=bw(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=gw(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),Vg(i).call(i),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var t,e,i,n;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var o=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var r=document.createElement("DIV");r.style.color="red",r.style.fontWeight="bold",r.style.padding="10px",r.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(r)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var s=this;this.opacityRange.onchange=function(){s._setOpacity(this.value)},this.opacityRange.oninput=function(){s._setOpacity(this.value)},this.brightnessRange.onchange=function(){s._setBrightness(this.value)},this.brightnessRange.oninput=function(){s._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.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=Hc(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=Hc(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=Hc(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=Hc(n=this._loadLast).call(n,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new Zb(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",(function(e){e.isFirst&&t._moveSelector(e)})),this.hammer.on("tap",(function(e){t._moveSelector(e)})),this.hammer.on("panstart",(function(e){t._moveSelector(e)})),this.hammer.on("panmove",(function(e){t._moveSelector(e)})),this.hammer.on("panend",(function(e){t._moveSelector(e)}))}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e,i,n,o,r=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,r,s),this.centerCoordinates={x:.5*r,y:.5*s},this.r=.49*r;var a,l=2*Math.PI/360,h=1/this.r;for(n=0;n<360;n++)for(o=0;o3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return!1};Lo(this,t),this.parent=e,this.changedOptions=[],this.container=i,this.allowCreation=!1,this.hideOption=r,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},pv(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Tw(o),this.wrapper=void 0}return mc(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;if("string"==typeof t)this.options.filter=t;else if(zc(t))this.options.filter=t.join();else if("object"===uc(t)){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==Ed(t)&&(this.options.filter=Ed(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===Ed(this.options)&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var t=Ed(this.options),e=0,i=!1;for(var n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?i=(i=t(n,[]))||this._handleObject(this.configureOptions[n],[n],!0):!0!==t&&-1===Eg(t).call(t,n)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?i-1:0),o=1;o2&&void 0!==arguments[2]&&arguments[2],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(Ew("i","b",t))}else n.innerText=t+":";return n}},{key:"_makeDropdown",value:function(t,e,i){var n=document.createElement("select");n.className="vis-configuration vis-config-select";var o=0;void 0!==e&&-1!==Eg(t).call(t,e)&&(o=Eg(t).call(t,e));for(var r=0;rr&&1!==r&&(a.max=Math.ceil(e*u),h=a.max,l="range increased"),a.value=e}else a.value=n;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;var d=this;a.onchange=function(){c.value=this.value,d._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};var p=this._makeLabel(i[i.length-1],i),m=this._makeItem(i,p,a,c);""!==l&&this.popupHistory[m]!==h&&(this.popupHistory[m]=h,this._setupPopup(l,m))}},{key:"_makeButton",value:function(){var t=this;if(!0===this.options.showButton){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}},{key:"_setupPopup",value:function(t,e){var i=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=Ed(this.options),r=!1;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){n=!0;var a=t[s],l=cw(e,s);if("function"==typeof o&&!1===(n=o(s,e))&&!zc(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i),!1!==n){r=!0;var h=this._getValue(l);if(zc(a))this._handleArray(a,h,l);else if("string"==typeof a)this._makeTextInput(a,h,l);else if("boolean"==typeof a)this._makeCheckbox(a,h,l);else if(a instanceof Object){if(!this.hideOption(e,s,this.moduleOptions))if(void 0!==a.enabled){var u=cw(l,"enabled"),c=this._getValue(u);if(!0===c){var d=this._makeLabel(s,l,!0);this._makeItem(l,d),r=this._handleObject(a,l)||r}else this._makeCheckbox(a,c,l)}else{var p=this._makeLabel(s,l,!0);this._makeItem(l,p),r=this._handleObject(a,l)||r}}else console.error("dont know how to handle",a,s,l)}}return r}},{key:"_handleArray",value:function(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i;t="false"!==(t="true"===t||t)&&t;for(var o=0;oo-this.padding&&(a=!0),r=a?this.x-i:this.x,s=l?this.y-e:this.y}else(s=this.y-e)+e+this.padding>n&&(s=n-e-this.padding),so&&(r=o-i-this.padding),rs.distance?" in "+t.printLocation(r.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):r.distance<=8?'. Did you mean "'+r.closestMatch+'"?'+t.printLocation(r.path,e):". Did you mean one of these: "+t.print(Dp(i))+t.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+o,Mw),Pw=!0}},{key:"findInOptions",value:function(e,i,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=1e9,s="",a=[],l=e.toLowerCase(),h=void 0;for(var u in i){var c=void 0;if(void 0!==i[u].__type__&&!0===o){var d=t.findInOptions(e,i[u],cw(n,u));r>d.distance&&(s=d.closestMatch,a=d.path,r=d.distance,h=d.indexMatch)}else{var p;-1!==Eg(p=u.toLowerCase()).call(p,l)&&(h=u),r>(c=t.levenshteinDistance(e,u))&&(s=u,a=dw(n),r=c)}}return{closestMatch:s,path:a,distance:r,indexMatch:h}}},{key:"printLocation",value:function(t,e){for(var i="\n\n"+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n",n=0;n>>0,t=(o*=t)>>>0,t+=4294967296*(o-=t)}return 2.3283064365386963e-10*(t>>>0)}}(),e=t(" "),i=t(" "),n=t(" "),o=0;o0)return"before"==n?Math.max(0,l-1):l;if(o(s,e)<0&&o(a,e)>0)return"before"==n?l:Math.min(t.length-1,l+1);o(s,e)<0?u=l+1:c=l-1,h++}return-1},bridgeObject:Sw,copyAndExtendArray:cw,copyArray:dw,deepExtend:hw,deepObjectAssign:Xb,easingFunctions:{linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},equalArray:function(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i2&&void 0!==arguments[2]&&arguments[2];for(var o in e)if(void 0!==i[o])if(null===i[o]||"object"!==uc(i[o]))aw(e,i,o,n);else{var r=e[o],s=i[o];sw(r)&&sw(s)&&t(r,s,n)}},forEach:function(t,e){if(zc(t))for(var i=t.length,n=0;n0&&void 0!==arguments[0]?arguments[0]:window.event,e=null;return t&&(t.target?e=t.target:t.srcElement&&(e=t.srcElement)),e instanceof Element&&(null==e.nodeType||3!=e.nodeType||(e=e.parentNode)instanceof Element)?e:null},getType:uw,hasParent:function(t,e){for(var i=t;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}return!1},hexToHSV:kw,hexToRGB:fw,insertSort:function(t,e){for(var i=0;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(rw(t)){if(Jb.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},isNumber:ow,isObject:sw,isString:rw,isValidHex:_w,isValidRGB:xw,isValidRGBA:Cw,mergeOptions:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=function(t){return null!=t},r=function(t){return null!==t&&"object"===uc(t)};if(!r(t))throw new Error("Parameter mergeTarget must be an object");if(!r(e))throw new Error("Parameter options must be an object");if(!o(i))throw new Error("Parameter option must have a value");if(!r(n))throw new Error("Parameter globalOptions must be an object");var s=e[i],a=r(n)&&!function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(n)?n[i]:void 0,l=a?a.enabled:void 0;if(void 0!==s){if("boolean"==typeof s)return r(t[i])||(t[i]={}),void(t[i].enabled=s);if(null===s&&!r(t[i])){if(!o(a))return;t[i]=Ig(a)}if(r(s)){var h=!0;void 0!==s.enabled?h=s.enabled:void 0!==l&&(h=a.enabled),function(t,e,i){r(t[i])||(t[i]={});var n=e[i],o=t[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])}(t,e,i),t[i].enabled=h}}},option:mw,overrideOpacity:function(t,e){if(Fv(t).call(t,"rgba"))return t;if(Fv(t).call(t,"rgb")){var i=t.substr(Eg(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}var n=fw(t);return null==n?t:"rgba("+n.r+","+n.g+","+n.b+","+e+")"},parseColor:function(t,e){if(rw(t)){var i=t;if(xw(i)){var n,o=lp(n=i.substr(4).substr(0,i.length-5).split(",")).call(n,(function(t){return gg(t)}));i=vw(o[0],o[1],o[2])}if(!0===_w(i)){var r=kw(i),s={h:r.h,s:.8*r.s,v:Math.min(1,1.02*r.v)},a={h:r.h,s:Math.min(1,1.25*r.s),v:.8*r.v},l=ww(a.h,a.s,a.v),h=ww(s.h,s.s,s.v);return{background:i,border:l,highlight:{background:h,border:l},hover:{background:h,border:l}}}return{background:i,border:i,highlight:{background:i,border:i},hover:{background:i,border:i}}}return e?{background:t.background||e.background,border:t.border||e.border,highlight:rw(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:rw(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||e.hover.border,background:t.hover&&t.hover.background||e.hover.background}}:{background:t.background||void 0,border:t.border||void 0,highlight:rw(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:rw(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:function(t){for(var e,i=arguments.length,n=new Array(i>1?i-1:0),o=1;o3&&void 0!==arguments[3]&&arguments[3];if(zc(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o=0;o2?i-2:0),o=2;o3&&void 0!==arguments[3]&&arguments[3];if(zc(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&!Fv(t).call(t,o))if(i[o]&&i[o].constructor===Object)void 0===e[o]&&(e[o]={}),e[o].constructor===Object?hw(e[o],i[o]):aw(e,i,o,n);else if(zc(i[o])){e[o]=[];for(var r=0;r/g,dk=/"/g,pk=/"/g,mk=/([a-zA-Z0-9]*);?/gim,fk=/:?/gim,vk=/&newline;?/gim,gk=/((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,yk=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,bk=/u\s*r\s*l\s*\(.*/gi;function wk(t){return t.replace(dk,""")}function kk(t){return t.replace(pk,'"')}function _k(t){return t.replace(mk,(function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))}))}function xk(t){return t.replace(fk,":").replace(vk," ")}function Ck(t){for(var e="",i=0,n=t.length;i0;e--){var i=t[e];if(" "!==i)return"="===i?e:-1}}function Fk(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}Tk.parseTag=function(t,e,i){var n="",o=0,r=!1,s=!1,a=0,l=t.length,h="",u="";t:for(a=0;a"===c||a===l-1){n+=i(t.slice(o,r)),h=Ok(u=t.slice(r,a+1)),n+=e(r,n.length,h,u,Ak(u)),o=a+1,r=!1;continue}if('"'===c||"'"===c)for(var d=1,p=t.charAt(a-d);""===p.trim()||"="===p;){if("="===p){s=c;continue t}p=t.charAt(a-++d)}}else if(c===s){s=!1;continue}}return o";var f=function(t){var e=Hk.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var i="/"===(t=Hk.trim(t.slice(e+1,-1)))[t.length-1];return i&&(t=Hk.trim(t.slice(0,-1))),{html:t,closing:i}}(c),v=i[u],g=zk(f.html,(function(t,e){var i=-1!==Hk.indexOf(v,t),n=r(u,t,e,i);return Gk(n)?i?(e=a(u,t,e,h))?t+'="'+e+'"':t:Gk(n=s(u,t,e,i))?void 0:n:n}));return c="<"+u,g&&(c+=" "+g),f.closing&&(c+=" /"),c+=">"}return Gk(m=o(u,c,p))?l(c):m}),l);return u&&(c=u.remove(c)),c};var Yk=Wk;!function(t,e){var i=Yw,n=Tk,o=Yk;function r(t,e){return new o(e).process(t)}(e=t.exports=r).filterXSS=r,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)}(Ww,Ww.exports);var Vk=r(Ww.exports);let Uk;const Xk=new Uint8Array(16);function qk(){if(!Uk&&(Uk="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Uk))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Uk(Xk)}const Kk=[];for(let t=0;t<256;++t)Kk.push((t+256).toString(16).slice(1));var $k={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Zk(t,e,i){if($k.randomUUID&&!e&&!t)return $k.randomUUID();const n=(t=t||{}).random||(t.rng||qk)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){i=i||0;for(let t=0;t<16;++t)e[i+t]=n[t];return e}return function(t,e=0){return Kk[t[e+0]]+Kk[t[e+1]]+Kk[t[e+2]]+Kk[t[e+3]]+"-"+Kk[t[e+4]]+Kk[t[e+5]]+"-"+Kk[t[e+6]]+Kk[t[e+7]]+"-"+Kk[t[e+8]]+Kk[t[e+9]]+"-"+Kk[t[e+10]]+Kk[t[e+11]]+Kk[t[e+12]]+Kk[t[e+13]]+Kk[t[e+14]]+Kk[t[e+15]]}(n)}function Qk(t,e){var i=Dp(t);if(kd){var n=kd(t);e&&(n=Ed(n).call(n,(function(e){return Ld(t,e).enumerable}))),i.push.apply(i,n)}return i}function Jk(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{start:"Date",end:"Date"},h=t._idProp,u=new n.DataSet({fieldId:h}),c=lp(e=n.createNewDataPipeFrom(t)).call(e,(function(t){var e;return xp(e=Dp(t)).call(e,(function(e,i){return e[i]=n_(t[i],l[i]),e}),{})})).to(u);return c.all().start(),{add:function(){var e;return(e=t.getDataSet()).add.apply(e,arguments)},remove:function(){var e;return(e=t.getDataSet()).remove.apply(e,arguments)},update:function(){var e;return(e=t.getDataSet()).update.apply(e,arguments)},updateOnly:function(){var e;return(e=t.getDataSet()).updateOnly.apply(e,arguments)},clear:function(){var e;return(e=t.getDataSet()).clear.apply(e,arguments)},forEach:Hc(i=bd(u)).call(i,u),get:Hc(o=u.get).call(o,u),getIds:Hc(r=u.getIds).call(r,u),off:Hc(s=u.off).call(s,u),on:Hc(a=u.on).call(a,u),get length(){return u.length},idProp:h,type:l,rawDS:t,coercedDS:u,dispose:function(){return c.stop()}}}var r_=function(t){var e=new Vk.FilterXSS(t);return function(t){return e.process(t)}},s_=function(t){return t},a_=r_(),l_=Jk(Jk({},Gw),{},{convert:n_,setupXSSProtection:function(t){t&&(!0===t.disabled?(a_=s_,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):t.filterOptions&&(a_=r_(t.filterOptions)))}});Tp(l_,"xss",{get:function(){return a_}});var h_=a,u_=l,c_=Tr,d_=og.trim,p_=$v,m_=b("".charAt),f_=h_.parseFloat,v_=h_.Symbol,g_=v_&&v_.iterator,y_=1/f_(p_+"-0")!=-1/0||g_&&!u_((function(){f_(Object(g_))}))?function(t){var e=d_(c_(t)),i=f_(e);return 0===i&&"-"===m_(e,0)?-0:i}:f_;Ii({global:!0,forced:parseFloat!==y_},{parseFloat:y_});var b_=r(ot.parseFloat),w_=function(){function t(e,i){Lo(this,t),this.options=null,this.props=null}return mc(t,[{key:"setOptions",value:function(t){t&&l_.extend(this.options,t)}},{key:"redraw",value:function(){return!1}},{key:"destroy",value:function(){}},{key:"_isResized",value:function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t}}]),t}(),k_=Sn,__=Tr,x_=Z,C_=RangeError;Ii({target:"String",proto:!0},{repeat:function(t){var e=__(x_(this)),i="",n=k_(t);if(n<0||n===1/0)throw new C_("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(i+=e);return i}});var S_=_c("String").repeat,D_=ut,T_=S_,E_=String.prototype,O_=function(t){var e=t.repeat;return"string"==typeof t||t===E_||D_(E_,t)&&e===E_.repeat?T_:e},A_=r(O_),I_=Lr,P_=Math.floor,M_=function(t,e){var i=t.length,n=P_(i/2);return i<8?N_(t,e):F_(t,M_(I_(t,0,n),e),M_(I_(t,n),e),e)},N_=function(t,e){for(var i,n,o=t.length,r=1;r0;)t[n]=t[--n];n!==r++&&(t[n]=i)}return t},F_=function(t,e,i,n){for(var o=e.length,r=i.length,s=0,a=0;s3)){if(J_)return!0;if(ex)return ex<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++)ix.push({k:e+n,v:i})}for(ix.sort((function(t,e){return e.v-t.v})),n=0;nq_(i)?1:-1}}(t)),i=U_(o),n=0;n=4*r){var h=0,u=o.clone();switch(A_(i[s])){case"daily":a.day()!=l.day()&&(h=1),a.dayOfYear(n.dayOfYear()),a.year(n.year()),a.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-h,"days"),u.add(1,"weeks");break;case"weekly":var c=l.diff(a,"days"),d=a.day();a.date(n.date()),a.month(n.month()),a.year(n.year()),l=a.clone(),a.day(d),l.day(d),l.add(c,"days"),a.subtract(1,"weeks"),l.subtract(1,"weeks"),u.add(1,"weeks");break;case"monthly":a.month()!=l.month()&&(h=1),a.month(n.month()),a.year(n.year()),a.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(h,"months"),u.add(1,"months");break;case"yearly":a.year()!=l.year()&&(h=1),a.year(n.year()),a.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(h,"years"),u.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",A_(i[s]))}for(;a=i[o].start&&i[r].end<=i[o].end?i[r].remove=!0:i[r].start>=i[o].start&&i[r].start<=i[o].end?(i[o].end=i[r].end,i[r].remove=!0):i[r].end>=i[o].start&&i[r].end<=i[o].end&&(i[o].start=i[r].start,i[r].remove=!0));for(o=0;o=s&&ot.range.end){var a={start:t.range.start,end:e};return e=xx(t.options.moment,t.body.hiddenDates,a,e),n=t.range.conversion(i,r),(e.valueOf()-n.offset)*n.scale}return e=xx(t.options.moment,t.body.hiddenDates,t.range,e),n=t.range.conversion(i,r),(e.valueOf()-n.offset)*n.scale}function wx(t,e,i){if(0==t.body.hiddenDates.length){var n=t.range.conversion(i);return new Date(e/n.scale+n.offset)}var o=kx(t.body.hiddenDates,t.range.start,t.range.end),r=(t.range.end-t.range.start-o)*e/i,s=Sx(t.body.hiddenDates,t.range,r);return new Date(s+r+t.range.start)}function kx(t,e,i){for(var n=0,o=0;o=e&&s=e&&s<=i&&(n+=s-r)}return n}function xx(t,e,i,n){return n=t(n).toDate().valueOf(),n-=Cx(t,e,i,n)}function Cx(t,e,i,n){var o=0;n=t(n).toDate().valueOf();for(var r=0;r=i.start&&a=a&&(o+=a-s)}return o}function Sx(t,e,i){for(var n=0,o=0,r=e.start,s=0;s=e.start&&l=i)break;n+=l-a}}return n}function Dx(t,e,i,n){var o=Tx(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 Tx(t,e){for(var i=0;i=n&&t1e3&&(i=1e3),t.body.dom.rollingModeBtn.style.visibility="hidden",t.currentTimeTimer=sd(e,i)}()}},{key:"stopRolling",value:function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")}},{key:"setRange",value:function(t,e,i,n,o){i||(i={}),!0!==i.byUser&&(i.byUser=!1);var r=this,s=null!=t?l_.convert(t,"Date").valueOf():null,a=null!=e?l_.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,i.animation){var l,h=this.start,u=this.end,c="object"===uc(i.animation)&&"duration"in i.animation?i.animation.duration:500,d="object"===uc(i.animation)&&"easingFunction"in i.animation?i.animation.easingFunction:"easeInOutQuad",p=l_.easingFunctions[d];if(!p)throw new Error(mf(l="Unknown easing function ".concat(Fg(d),". Choose from: ")).call(l,Dp(l_.easingFunctions).join(", ")));var m=wf(),f=!1;return function t(){if(!r.props.touch.dragging){var e=wf()-m,l=p(e/c),d=e>c,g=d||null===s?s:h+(s-h)*l,y=d||null===a?a:u+(a-u)*l;v=r._applyRange(g,y),vx(r.options.moment,r.body,r.options.hiddenDates),f=f||v;var b={start:new Date(r.start),end:new Date(r.end),byUser:i.byUser,event:i.event};if(o&&o(l,v,d),v&&r.body.emitter.emit("rangechange",b),d){if(f&&(r.body.emitter.emit("rangechanged",b),n))return n()}else r.animationTimer=sd(t,20)}}()}var v=this._applyRange(s,a);if(vx(this.options.moment,this.body,this.options.hiddenDates),v){var g={start:new Date(this.start),end:new Date(this.end),byUser:i.byUser,event:i.event};if(this.body.emitter.emit("rangechange",g),clearTimeout(r.timeoutID),r.timeoutID=sd((function(){r.body.emitter.emit("rangechanged",g)}),200),n)return n()}}},{key:"getMillisecondsPerPixel",value:function(){return void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}},{key:"_cancelAnimation",value:function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)}},{key:"_applyRange",value:function(t,e){var i,n=null!=t?l_.convert(t,"Date").valueOf():this.start,o=null!=e?l_.convert(e,"Date").valueOf():this.end,r=null!=this.options.max?l_.convert(this.options.max,"Date").valueOf():null,s=null!=this.options.min?l_.convert(this.options.min,"Date").valueOf():null;if(isNaN(n)||null===n)throw new Error('Invalid start "'.concat(t,'"'));if(isNaN(o)||null===o)throw new Error('Invalid end "'.concat(e,'"'));if(or&&(o=r)),null!==r&&o>r&&(n-=i=o-r,o-=i,null!=s&&n=this.start-.5&&o<=this.end?(n=this.start,o=this.end):(n-=(i=a-(o-n))/2,o+=i/2)}}if(null!==this.options.zoomMax){var l=b_(this.options.zoomMax);l<0&&(l=0),o-n>l&&(this.end-this.start===l&&nthis.end?(n=this.start,o=this.end):(n+=(i=o-n-l)/2,o-=i/2))}var h=this.start!=n||this.end!=o;return n>=this.start&&n<=this.end||o>=this.start&&o<=this.end||this.start>=n&&this.start<=o||this.end>=n&&this.end<=o||this.body.emitter.emit("checkRangedItems"),this.start=n,this.end=o,h}},{key:"getRange",value:function(){return{start:this.start,end:this.end}}},{key:"conversion",value:function(t,e){return i.conversion(this.start,this.end,t,e)}},{key:"_onDragStart",value:function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))}},{key:"_onDrag",value:function(t){if(t&&this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;Ix(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var n=this.props.touch.end-this.props.touch.start;n-=kx(this.body.hiddenDates,this.start,this.end);var o,r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;o=this.options.rtl?i/r*n:-i/r*n;var s=this.props.touch.start+o,a=this.props.touch.end+o,l=Dx(this.body.hiddenDates,s,this.previousDelta-i,!0),h=Dx(this.body.hiddenDates,a,this.previousDelta-i,!0);if(l!=s||h!=a)return this.deltaDifference+=i,this.props.touch.start=l,this.props.touch.end=h,void this._onDrag(t);this.previousDelta=i,this._applyRange(s,a);var u=new Date(this.start),c=new Date(this.end);this.body.emitter.emit("rangechange",{start:u,end:c,byUser:!0,event:t}),this.body.emitter.emit("panmove")}}},{key:"_onDragEnd",value:function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:t}))}},{key:"_onMouseWheel",value:function(t){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail?e=-t.detail/3:t.deltaY&&(e=-t.deltaY/3),!(this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){var i,n,o=this.options.zoomFriction||5;if(i=e<0?1-e/o:1/(1+e/o),this.rolling){var r=this.options.rollingMode&&this.options.rollingMode.offset||.5;n=this.start+(this.end-this.start)*r}else{var s=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);n=this._pointerToDate(s)}this.zoom(i,n,e,t),t.preventDefault()}}},{key:"_onTouch",value:function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.props.touch.centerDate=null,this.scaleOffset=0,this.deltaDifference=0,l_.preventDefault(t)}},{key:"_onPinch",value:function(t){if(this.options.zoomable&&this.options.moveable){l_.preventDefault(t),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center),this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)),this.stopRolling();var e=1/(t.scale+this.scaleOffset),i=this.props.touch.centerDate,n=kx(this.body.hiddenDates,this.start,this.end),o=Cx(this.options.moment,this.body.hiddenDates,this,i),r=n-o,s=i-o+(this.props.touch.start-(i-o))*e,a=i+r+(this.props.touch.end-(i+r))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;var l=Dx(this.body.hiddenDates,s,1-e,!0),h=Dx(this.body.hiddenDates,a,e-1,!0);l==s&&h==a||(this.props.touch.start=l,this.props.touch.end=h,this.scaleOffset=1-t.scale,s=l,a=h);var u={animation:!1,byUser:!0,event:t};this.setRange(s,a,u),this.startToFront=!1,this.endToFront=!0}}},{key:"_isInsideRange",value:function(t){var e=t.center?t.center.x:t.clientX,i=this.body.dom.centerContainer.getBoundingClientRect(),n=this.options.rtl?e-i.left:i.right-e,o=this.body.util.toTime(n);return o>=this.start&&o<=this.end}},{key:"_pointerToDate",value:function(t){var e,i=this.options.direction;if(Ix(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var n=this.body.domProps.center.height;return e=this.conversion(n),t.y/e.scale+e.offset}},{key:"getPointer",value:function(t,e){var i=e.getBoundingClientRect();return this.options.rtl?{x:i.right-t.x,y:t.y-i.top}:{x:t.x-i.left,y:t.y-i.top}}},{key:"zoom",value:function(t,e,i,n){null==e&&(e=(this.start+this.end)/2);var o=kx(this.body.hiddenDates,this.start,this.end),r=Cx(this.options.moment,this.body.hiddenDates,this,e),s=o-r,a=e-r+(this.start-(e-r))*t,l=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);var h=Dx(this.body.hiddenDates,a,i,!0),u=Dx(this.body.hiddenDates,l,-i,!0);h==a&&u==l||(a=h,l=u);var c={animation:!1,byUser:!0,event:n};this.setRange(a,l,c),this.startToFront=!1,this.endToFront=!0}},{key:"move",value:function(t){var e=this.end-this.start,i=this.start+e*t,n=this.end+e*t;this.start=i,this.end=n}},{key:"moveTo",value:function(t){var e=(this.start+this.end)/2-t,i=this.start-e,n=this.end-e;this.setRange(i,n,{animation:!1,byUser:!0,event:null})}},{key:"destroy",value:function(){this.stopRolling()}}],[{key:"conversion",value:function(t,e,i,n){return void 0===n&&(n=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-n)}:{offset:0,scale:1}}}]),i}(w_);function Ix(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'.concat(t,'". Choose "horizontal" or "vertical".'))}var Px=Hs.some;Ii({target:"Array",proto:!0,forced:!ld("some")},{some:function(t){return Px(this,t,arguments.length>1?arguments[1]:void 0)}});var Mx,Nx=_c("Array").some,Fx=ut,Rx=Nx,Lx=Array.prototype,jx=function(t){var e=t.some;return t===Lx||Fx(Lx,t)&&e===Lx.some?Rx:e},Bx=r(jx),zx=r(ot.setInterval),Hx=null;"undefined"!=typeof window?Mx=function t(e,i){var n=i||{preventDefault:!1};if(e.Manager){var o=e,r=function(e,i){var r=Object.create(n);return i&&o.assign(r,i),t(new o(e,r),r)};return o.assign(r,o),r.Manager=function(e,i){var r=Object.create(n);return i&&o.assign(r,i),t(new o.Manager(e,r),r)},r}var s=Object.create(e),a=e.element;function l(t){return t.match(/[^ ]+/g)}function h(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=Hx;for(var n=Hx;n&&!e;){var o=n.hammer;if(o)for(var r,s=0;s0?s._handlers[t]=n:(e.off(t,h),delete s._handlers[t]))})),s},s.emit=function(t,i){Hx=i.target,e.emit(t,i)},s.destroy=function(){var t=e.element.hammer,i=t.indexOf(s);-1!==i&&t.splice(i,1),t.length||delete e.element.hammer,s._handlers={},e.destroy()},s}(window.Hammer||Wb,{preventDefault:"mouse"}):Mx=function(){return function(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(e){return{set:t}}}}()};var Gx=Mx;function Wx(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}var Yx=function(){function t(e,i,n,o,r){Lo(this,t),this.moment=r&&r.moment||wd,this.options=r||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale="day",this.step=1,this.setRange(e,i,n),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,zc(o)?this.hiddenDates=o:this.hiddenDates=null!=o?[o]:[],this.format=t.FORMAT}return mc(t,[{key:"setMoment",value:function(t){this.moment=t,this.current=this.moment(this.current.valueOf()),this._start=this.moment(this._start.valueOf()),this._end=this.moment(this._end.valueOf())}},{key:"setFormat",value:function(e){var i=l_.deepExtend({},t.FORMAT);this.format=l_.deepExtend(i,e)}},{key:"setRange",value:function(t,e,i){if(!(t instanceof Date&&e instanceof Date))throw"No legal start or end date in method setRange";this._start=null!=t?this.moment(t.valueOf()):wf(),this._end=null!=e?this.moment(e.valueOf()):wf(),this.autoScale&&this.setMinimumStep(i)}},{key:"start",value:function(){this.current=this._start.clone(),this.roundToMinor()}},{key:"roundToMinor",value:function(){switch("week"==this.scale&&this.current.weekday(0),this.scale){case"year":this.current.year(this.step*Math.floor(this.current.year()/this.step)),this.current.month(0);case"month":this.current.date(1);case"week":case"day":case"weekday":this.current.hours(0);case"hour":this.current.minutes(0);case"minute":this.current.seconds(0);case"second":this.current.milliseconds(0)}if(1!=this.step){var t=this.current.clone();switch(this.scale){case"millisecond":this.current.subtract(this.current.milliseconds()%this.step,"milliseconds");break;case"second":this.current.subtract(this.current.seconds()%this.step,"seconds");break;case"minute":this.current.subtract(this.current.minutes()%this.step,"minutes");break;case"hour":this.current.subtract(this.current.hours()%this.step,"hours");break;case"weekday":case"day":this.current.subtract((this.current.date()-1)%this.step,"day");break;case"week":this.current.subtract(this.current.week()%this.step,"week");break;case"month":this.current.subtract(this.current.month()%this.step,"month");break;case"year":this.current.subtract(this.current.year()%this.step,"year")}t.isSame(this.current)||(this.current=this.moment(Dx(this.hiddenDates,this.current.valueOf(),-1,!0)))}}},{key:"hasNext",value:function(){return this.current.valueOf()<=this._end.valueOf()}},{key:"next",value:function(){var t=this.current.valueOf();switch(this.scale){case"millisecond":this.current.add(this.step,"millisecond");break;case"second":this.current.add(this.step,"second");break;case"minute":this.current.add(this.step,"minute");break;case"hour":this.current.add(this.step,"hour"),this.current.month()<6?this.current.subtract(this.current.hours()%this.step,"hour"):this.current.hours()%this.step!=0&&this.current.add(this.step-this.current.hours()%this.step,"hour");break;case"weekday":case"day":this.current.add(this.step,"day");break;case"week":if(0!==this.current.weekday())this.current.weekday(0),this.current.add(this.step,"week");else if(!1===this.options.showMajorLabels)this.current.add(this.step,"week");else{var e=this.current.clone();e.add(1,"week"),e.isSame(this.current,"month")?this.current.add(this.step,"week"):(this.current.add(this.step,"week"),this.current.date(1))}break;case"month":this.current.add(this.step,"month");break;case"year":this.current.add(this.step,"year")}if(1!=this.step)switch(this.scale){case"millisecond":this.current.milliseconds()>0&&this.current.milliseconds()0&&this.current.seconds()0&&this.current.minutes()0&&this.current.hours()0?t.step:1,this.autoScale=!1)}},{key:"setAutoScale",value:function(t){this.autoScale=t}},{key:"setMinimumStep",value:function(t){if(null!=t){var e=31104e6,i=2592e6,n=864e5,o=36e5,r=6e4,s=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),r>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),s>t&&(this.scale="second",this.step=1),200>t&&(this.scale="millisecond",this.step=200),100>t&&(this.scale="millisecond",this.step=100),50>t&&(this.scale="millisecond",this.step=50),10>t&&(this.scale="millisecond",this.step=10),5>t&&(this.scale="millisecond",this.step=5),1>t&&(this.scale="millisecond",this.step=1)}}},{key:"isMajor",value:function(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":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}}},{key:"getLabelMinor",value:function(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.minorLabels)return this.format.minorLabels(t,this.scale,this.step);var e=this.format.minorLabels[this.scale];return"week"===this.scale&&1===t.date()&&0!==t.weekday()?"":e&&e.length>0?this.moment(t).format(e):""}},{key:"getLabelMajor",value:function(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.majorLabels)return this.format.majorLabels(t,this.scale,this.step);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""}},{key:"getClassName",value:function(){var t,e=this.moment,i=this.moment(this.current),n=i.locale?i.locale("en"):i.lang("en"),o=this.step,r=[];function s(t){return t/o%2==0?" vis-even":" vis-odd"}function a(t){return t.isSame(wf(),"day")?" vis-today":t.isSame(e().add(1,"day"),"day")?" vis-tomorrow":t.isSame(e().add(-1,"day"),"day")?" vis-yesterday":""}function l(t){return t.isSame(wf(),"week")?" vis-current-week":""}function h(t){return t.isSame(wf(),"month")?" vis-current-month":""}switch(this.scale){case"millisecond":r.push(a(n)),r.push(s(n.milliseconds()));break;case"second":r.push(a(n)),r.push(s(n.seconds()));break;case"minute":r.push(a(n)),r.push(s(n.minutes()));break;case"hour":r.push(mf(t="vis-h".concat(n.hours())).call(t,4==this.step?"-h"+(n.hours()+4):"")),r.push(a(n)),r.push(s(n.hours()));break;case"weekday":r.push("vis-".concat(n.format("dddd").toLowerCase())),r.push(a(n)),r.push(l(n)),r.push(s(n.date()));break;case"day":r.push("vis-day".concat(n.date())),r.push("vis-".concat(n.format("MMMM").toLowerCase())),r.push(a(n)),r.push(h(n)),r.push(this.step<=2?a(n):""),r.push(this.step<=2?"vis-".concat(n.format("dddd").toLowerCase()):""),r.push(s(n.date()-1));break;case"week":r.push("vis-week".concat(n.format("w"))),r.push(l(n)),r.push(s(n.week()));break;case"month":r.push("vis-".concat(n.format("MMMM").toLowerCase())),r.push(h(n)),r.push(s(n.month()));break;case"year":r.push("vis-year".concat(n.year())),r.push(function(t){return t.isSame(wf(),"year")?" vis-current-year":""}(n)),r.push(s(n.year()))}return Ed(r).call(r,String).join(" ")}}],[{key:"snap",value:function(t,e,i){var n=wd(t);if("year"==e){var o=n.year()+Math.round(n.month()/12);n.year(Math.round(o/i)*i),n.month(0),n.date(0),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("month"==e)n.date()>15?(n.date(1),n.add(1,"month")):n.date(1),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0);else if("week"==e)n.weekday()>2?(n.weekday(0),n.add(1,"week")):n.weekday(0),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:n.hours(24*Math.round(n.hours()/24));break;default:n.hours(12*Math.round(n.hours()/12))}n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:n.hours(12*Math.round(n.hours()/12));break;default:n.hours(6*Math.round(n.hours()/6))}n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("hour"==e){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){var r=i>5?i/2:1;n.milliseconds(Math.round(n.milliseconds()/r)*r)}return n}}]),t}();function Vx(t){var e=function(){if("undefined"==typeof Reflect||!Ro)return!1;if(Ro.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Ro(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=jc(t);if(e){var o=jc(this).constructor;i=Ro(n,arguments,o)}else i=n.apply(this,arguments);return Pc(this,i)}}Yx.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}};var Ux=function(t){Ic(i,t);var e=Vx(i);function i(t,n){var o;return Lo(this,i),(o=e.call(this)).dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},o.props={range:{start:0,end:0,minimumStep:0},lineTop:0},o.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:l_.extend({},Yx.FORMAT),moment:wd,timeAxis:null},o.options=l_.extend({},o.defaultOptions),o.body=t,o._create(),o.setOptions(n),o}return mc(i,[{key:"setOptions",value:function(t){t&&(l_.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),l_.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"===uc(t.orientation)&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof wd.locale?wd.locale(t.locale):wd.lang(t.locale)))}},{key:"_create",value:function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"}},{key:"destroy",value:function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null}},{key:"redraw",value:function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,n="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,o=e.parentNode!==n;this._calculateCharSize();var r=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,s=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=r?t.minorCharHeight:0,t.majorLabelHeight=s?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,l=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height="".concat(this.props.height,"px"),this._repaintLabels(),a?n.insertBefore(e,a):n.appendChild(e),l?this.body.dom.backgroundVertical.insertBefore(i,l):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||o}},{key:"_repaintLabels",value:function(){var t=this.options.orientation.axis,e=l_.convert(this.body.range.start,"Number"),i=l_.convert(this.body.range.end,"Number"),n=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),o=n-Cx(this.options.moment,this.body.hiddenDates,this.body.range,n);o-=this.body.util.toTime(0).valueOf();var r=new Yx(new Date(e),new Date(i),o,this.body.hiddenDates,this.options);r.setMoment(this.options.moment),this.options.format&&r.setFormat(this.options.format),this.options.timeAxis&&r.setScale(this.options.timeAxis),this.step=r;var s,a,l,h,u,c,d=this.dom;d.redundant.lines=d.lines,d.redundant.majorTexts=d.majorTexts,d.redundant.minorTexts=d.minorTexts,d.lines=[],d.majorTexts=[],d.minorTexts=[];var p,m,f,v=0,g=void 0,y=0,b=1e3;for(r.start(),a=r.getCurrent(),h=this.body.util.toScreen(a);r.hasNext()&&y=.4*p;if(this.options.showMinorLabels&&c){var w=this._repaintMinorText(l,r.getLabelMinor(s),t,f);w.style.width="".concat(v,"px")}u&&this.options.showMajorLabels?(l>0&&(null==g&&(g=l),w=this._repaintMajorText(l,r.getLabelMajor(s),t,f)),m=this._repaintMajorLine(l,v,t,f)):c?m=this._repaintMinorLine(l,v,t,f):m&&(m.style.width="".concat(gg(m.style.width)+v,"px"))}if(y!==b||Xx||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(b," lines.")),Xx=!0),this.options.showMajorLabels){var k=this.body.util.toTime(0),_=r.getLabelMajor(k),x=_.length*(this.props.majorCharWidth||10)+10;(null==g||x=Math.abs(e)){var n=this.props.scrollTop,o=n+i;if(this.isActive())this._setScrollTop(o)!==n&&(this._redraw(),this.emit("scroll",t),t.preventDefault())}else if(this.options.horizontalScroll){var r=(Math.abs(e)>=Math.abs(i)?e:i)/120*(this.range.end-this.range.start)/20,s=this.range.start+r,a=this.range.end+r,l={animation:!1,byUser:!0,event:t};this.range.setRange(s,a,l),t.preventDefault()}}bd(h).call(h,(function(t){var e=function(e){r.isActive()&&r.emit(t,e)};r.hammer.on(t,e),r.timelineListeners[t]=e})),Wx(this.hammer,(function(t){r.emit("touch",t)})),a=this.hammer,(l=function(t){r.emit("release",t)}).inputHandler=function(t){t.isFinal&&l(t)},a.on("hammer.input",l.inputHandler);var c="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";function d(t){if(r.options.verticalScroll&&(t.preventDefault(),r.isActive())){var e=-t.target.scrollTop;r._setScrollTop(e),r._redraw(),r.emit("scrollSide",t)}}this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(c,Hc(u).call(u,this),!1),this.dom.top.addEventListener(c,Hc(u).call(u,this),!1),this.dom.bottom.addEventListener(c,Hc(u).call(u,this),!1),this.dom.left.parentNode.addEventListener("scroll",Hc(d).call(d,this)),this.dom.right.parentNode.addEventListener("scroll",Hc(d).call(d,this));var p=!1;function m(t){var e;if(t.preventDefault&&(r.emit("dragover",r.getEventProperties(t)),t.preventDefault()),Eg(e=t.target.className).call(e,"timeline")>-1&&!p)return t.dataTransfer.dropEffect="move",p=!0,!1}function f(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();try{var e=JSON.parse(t.dataTransfer.getData("text"));if(!e||!e.content)return}catch(t){return!1}return p=!1,t.center={x:t.clientX,y:t.clientY},"item"!==e.target?r.itemSet._onAddItem(t):r.itemSet._onDropObjectOnItem(t),r.emit("drop",r.getEventProperties(t)),!1}if(this.dom.center.addEventListener("dragover",Hc(m).call(m,this),!1),this.dom.center.addEventListener("drop",Hc(f).call(f,this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root),t.appendChild(this.dom.loadingScreen)}},{key:"setOptions",value:function(t){var e;if(t){if(l_.selectiveExtend(["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","preferZoom","rtl","zoomKey","horizontalScroll","verticalScroll","longSelectPressTime","snap"],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"!==uc(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"===uc(t.orientation)&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var i=this.timeAxis2=new Ux(this.body,this.options);i.setOptions=function(t){var e=t?l_.extend({},t):{};e.orientation="top",Ux.prototype.setOptions.call(i,e)},this.components.push(i)}}else if(this.timeAxis2){var n,o,r=Eg(n=this.components).call(n,this.timeAxis2);if(-1!==r)Qf(o=this.components).call(o,r,1);this.timeAxis2.destroy(),this.timeAxis2=null}"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&fx(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new qx(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(bd(e=this.components).call(e,(function(e){return e.setOptions(t)})),"configure"in t){var s;this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var a=l_.deepExtend({},this.options);bd(s=this.components).call(s,(function(t){l_.deepExtend(a,t.options)})),this.configurator.setModuleOptions({global:a})}this._redraw()}},{key:"isActive",value:function(){return!this.activator||this.activator.active}},{key:"destroy",value:function(){var t;for(var e in this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator),this.timelineListeners)this.timelineListeners.hasOwnProperty(e)&&delete this.timelineListeners[e];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,bd(t=this.components).call(t,(function(t){return t.destroy()})),this.body=null}},{key:"setCustomTime",value:function(t,e){var i,n=Ed(i=this.customTimes).call(i,(function(t){return e===t.options.id}));if(0===n.length)throw new Error("No custom time bar found with id ".concat(Fg(e)));n.length>0&&n[0].setCustomTime(t)}},{key:"getCustomTime",value:function(t){var e,i=Ed(e=this.customTimes).call(e,(function(e){return e.options.id===t}));if(0===i.length)throw new Error("No custom time bar found with id ".concat(Fg(t)));return i[0].getCustomTime()}},{key:"setCustomTimeMarker",value:function(t,e,i){var n,o=Ed(n=this.customTimes).call(n,(function(t){return t.options.id===e}));if(0===o.length)throw new Error("No custom time bar found with id ".concat(Fg(e)));o.length>0&&o[0].setCustomMarker(t,i)}},{key:"setCustomTimeTitle",value:function(t,e){var i,n=Ed(i=this.customTimes).call(i,(function(t){return t.options.id===e}));if(0===n.length)throw new Error("No custom time bar found with id ".concat(Fg(e)));if(n.length>0)return n[0].setCustomTitle(t)}},{key:"getEventProperties",value:function(t){return{event:t}}},{key:"addCustomTime",value:function(t,e){var i,n=void 0!==t?l_.convert(t,"Date"):new Date,o=Bx(i=this.customTimes).call(i,(function(t){return t.options.id===e}));if(o)throw new Error("A custom time with id ".concat(Fg(e)," already exists"));var r=new cC(this.body,l_.extend({},this.options,{time:n,id:e,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(r),this.components.push(r),this._redraw(),e}},{key:"removeCustomTime",value:function(t){var e,i=this,n=Ed(e=this.customTimes).call(e,(function(e){return e.options.id===t}));if(0===n.length)throw new Error("No custom time bar found with id ".concat(Fg(t)));bd(n).call(n,(function(t){var e,n,o,r;Qf(e=i.customTimes).call(e,Eg(n=i.customTimes).call(n,t),1),Qf(o=i.components).call(o,Eg(r=i.components).call(r,t),1),t.destroy()}))}},{key:"getVisibleItems",value:function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}},{key:"getItemsAtCurrentTime",value:function(t){return this.time=t,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}},{key:"getVisibleGroups",value:function(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}},{key:"fit",value:function(t,e){var i=this.getDataRange();if(null!==i.min||null!==i.max){var n=i.max-i.min,o=new Date(i.min.valueOf()-.01*n),r=new Date(i.max.valueOf()+.01*n),s=!t||void 0===t.animation||t.animation;this.range.setRange(o,r,{animation:s},e)}}},{key:"getDataRange",value:function(){throw new Error("Cannot invoke abstract method getDataRange")}},{key:"setWindow",value:function(t,e,i,n){var o,r;"function"==typeof arguments[2]&&(n=arguments[2],i={}),1==arguments.length?(o=void 0===(r=arguments[0]).animation||r.animation,this.range.setRange(r.start,r.end,{animation:o})):2==arguments.length&&"function"==typeof arguments[1]?(n=arguments[1],o=void 0===(r=arguments[0]).animation||r.animation,this.range.setRange(r.start,r.end,{animation:o},n)):(o=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:o},n))}},{key:"moveTo",value:function(t,e,i){"function"==typeof arguments[1]&&(i=arguments[1],e={});var n=this.range.end-this.range.start,o=l_.convert(t,"Date").valueOf(),r=o-n/2,s=o+n/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(r,s,{animation:a},i)}},{key:"getWindow",value:function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}}},{key:"zoomIn",value:function(t,e,i){if(!(!t||t<0||t>1)){"function"==typeof arguments[1]&&(i=arguments[1],e={});var n=this.getWindow(),o=n.start.valueOf(),r=n.end.valueOf(),s=r-o,a=(s-s/(1+t))/2,l=o+a,h=r-a;this.setWindow(l,h,e,i)}}},{key:"zoomOut",value:function(t,e,i){if(!(!t||t<0||t>1)){"function"==typeof arguments[1]&&(i=arguments[1],e={});var n=this.getWindow(),o=n.start.valueOf(),r=n.end.valueOf(),s=r-o,a=o-s*t/2,l=r+s*t/2;this.setWindow(a,l,e,i)}}},{key:"redraw",value:function(){this._redraw()}},{key:"_redraw",value:function(){var t;this.redrawCount++;var e=this.dom;if(e&&e.container&&0!=e.root.offsetWidth){var i=!1,n=this.options,o=this.props;vx(this.options.moment,this.body,this.options.hiddenDates),"top"==n.orientation?(l_.addClassName(e.root,"vis-top"),l_.removeClassName(e.root,"vis-bottom")):(l_.removeClassName(e.root,"vis-top"),l_.addClassName(e.root,"vis-bottom")),n.rtl?(l_.addClassName(e.root,"vis-rtl"),l_.removeClassName(e.root,"vis-ltr")):(l_.addClassName(e.root,"vis-ltr"),l_.removeClassName(e.root,"vis-rtl")),e.root.style.maxHeight=l_.option.asSize(n.maxHeight,""),e.root.style.minHeight=l_.option.asSize(n.minHeight,""),e.root.style.width=l_.option.asSize(n.width,"");var r=e.root.offsetWidth;o.border.left=1,o.border.right=1,o.border.top=1,o.border.bottom=1,o.center.height=e.center.offsetHeight,o.left.height=e.left.offsetHeight,o.right.height=e.right.offsetHeight,o.top.height=e.top.clientHeight||-o.border.top,o.bottom.height=Math.round(e.bottom.getBoundingClientRect().height)||e.bottom.clientHeight||-o.border.bottom;var s=Math.max(o.left.height,o.center.height,o.right.height),a=o.top.height+s+o.bottom.height+o.border.top+o.border.bottom;e.root.style.height=l_.option.asSize(n.height,"".concat(a,"px")),o.root.height=e.root.offsetHeight,o.background.height=o.root.height;var l=o.root.height-o.top.height-o.bottom.height;o.centerContainer.height=l,o.leftContainer.height=l,o.rightContainer.height=o.leftContainer.height,o.root.width=r,o.background.width=o.root.width,this.initialDrawDone||(o.scrollbarWidth=l_.getScrollBarWidth());var h=e.leftContainer.clientWidth,u=e.rightContainer.clientWidth;n.verticalScroll?n.rtl?(o.left.width=h||-o.border.left,o.right.width=u+o.scrollbarWidth||-o.border.right):(o.left.width=h+o.scrollbarWidth||-o.border.left,o.right.width=u||-o.border.right):(o.left.width=h||-o.border.left,o.right.width=u||-o.border.right),this._setDOM();var c=this._updateScrollTop();"top"!=n.orientation.item&&(c+=Math.max(o.centerContainer.height-o.center.height-o.border.top-o.border.bottom,0)),e.center.style.transform="translateY(".concat(c,"px)");var d=0==o.scrollTop?"hidden":"",p=o.scrollTop==o.scrollTopMin?"hidden":"";e.shadowTop.style.visibility=d,e.shadowBottom.style.visibility=p,e.shadowTopLeft.style.visibility=d,e.shadowBottomLeft.style.visibility=p,e.shadowTopRight.style.visibility=d,e.shadowBottomRight.style.visibility=p,n.verticalScroll&&(e.rightContainer.className="vis-panel vis-right vis-vertical-scroll",e.leftContainer.className="vis-panel vis-left vis-vertical-scroll",e.shadowTopRight.style.visibility="hidden",e.shadowBottomRight.style.visibility="hidden",e.shadowTopLeft.style.visibility="hidden",e.shadowBottomLeft.style.visibility="hidden",e.left.style.top="0px",e.right.style.top="0px"),(!n.verticalScroll||o.center.heighto.centerContainer.height;this.hammer.get("pan").set({direction:m?Gx.DIRECTION_ALL:Gx.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),bd(t=this.components).call(t,(function(t){i=t.redraw()||i}));if(i){if(this.redrawCount<5)return void this.body.emitter.emit("_change");console.log("WARNING: infinite loop in redraw?")}else this.redrawCount=0;this.body.emitter.emit("changed")}}},{key:"_setDOM",value:function(){var t=this.props,e=this.dom;t.leftContainer.width=t.left.width,t.rightContainer.width=t.right.width;var i=t.root.width-t.left.width-t.right.width;t.center.width=i,t.centerContainer.width=i,t.top.width=i,t.bottom.width=i,e.background.style.height="".concat(t.background.height,"px"),e.backgroundVertical.style.height="".concat(t.background.height,"px"),e.backgroundHorizontal.style.height="".concat(t.centerContainer.height,"px"),e.centerContainer.style.height="".concat(t.centerContainer.height,"px"),e.leftContainer.style.height="".concat(t.leftContainer.height,"px"),e.rightContainer.style.height="".concat(t.rightContainer.height,"px"),e.background.style.width="".concat(t.background.width,"px"),e.backgroundVertical.style.width="".concat(t.centerContainer.width,"px"),e.backgroundHorizontal.style.width="".concat(t.background.width,"px"),e.centerContainer.style.width="".concat(t.center.width,"px"),e.top.style.width="".concat(t.top.width,"px"),e.bottom.style.width="".concat(t.bottom.width,"px"),e.background.style.left="0",e.background.style.top="0",e.backgroundVertical.style.left="".concat(t.left.width+t.border.left,"px"),e.backgroundVertical.style.top="0",e.backgroundHorizontal.style.left="0",e.backgroundHorizontal.style.top="".concat(t.top.height,"px"),e.centerContainer.style.left="".concat(t.left.width,"px"),e.centerContainer.style.top="".concat(t.top.height,"px"),e.leftContainer.style.left="0",e.leftContainer.style.top="".concat(t.top.height,"px"),e.rightContainer.style.left="".concat(t.left.width+t.center.width,"px"),e.rightContainer.style.top="".concat(t.top.height,"px"),e.top.style.left="".concat(t.left.width,"px"),e.top.style.top="0",e.bottom.style.left="".concat(t.left.width,"px"),e.bottom.style.top="".concat(t.top.height+t.centerContainer.height,"px"),e.center.style.left="0",e.left.style.left="0",e.right.style.left="0"}},{key:"setCurrentTime",value:function(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)}},{key:"getCurrentTime",value:function(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()}},{key:"_toTime",value:function(t){return wx(this,t,this.props.center.width)}},{key:"_toGlobalTime",value:function(t){return wx(this,t,this.props.root.width)}},{key:"_toScreen",value:function(t){return bx(this,t,this.props.center.width)}},{key:"_toGlobalScreen",value:function(t){return bx(this,t,this.props.root.width)}},{key:"_initAutoResize",value:function(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()}},{key:"_startAutoResize",value:function(){var t=this;this._stopAutoResize(),this._onResize=function(){if(1==t.options.autoResize){if(t.dom.root){var e=t.dom.root.offsetHeight,i=t.dom.root.offsetWidth;i==t.props.lastWidth&&e==t.props.lastHeight||(t.props.lastWidth=i,t.props.lastHeight=e,t.props.scrollbarWidth=l_.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=zx(this._onResize,1e3)}},{key:"_stopAutoResize",value:function(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null)}},{key:"_onTouch",value:function(t){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}},{key:"_onPinch",value:function(t){this.touch.allowDragging=!1}},{key:"_onDrag",value:function(t){if(t&&this.touch.allowDragging){var e=t.deltaY,i=this._getScrollTop(),n=this._setScrollTop(this.touch.initialScrollTop+e);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),n!=i&&this.emit("verticalDrag")}}},{key:"_setScrollTop",value:function(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop}},{key:"_updateScrollTop",value:function(){var t=Math.min(this.props.centerContainer.height-this.props.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