@wavemaker/app-runtime-wm-build 11.7.5-next.NULL → 11.8.0-next.24860
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- app-runtime-wm-build/package.json +1 -1
- app-runtime-wm-build/wmapp/scripts/wm-libs.js +3 -3
- app-runtime-wm-build/wmapp/scripts/wm-libs.min.js +3 -3
- app-runtime-wm-build/wmapp/scripts/wm-loader.js +1 -1
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-libs.js +3 -3
- app-runtime-wm-build/wmmobile/scripts/wm-libs.min.js +3 -3
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +1 -1
|
@@ -515,7 +515,7 @@ FullCalendar v5.3.1
|
|
|
515
515
|
Docs & License: https://fullcalendar.io/
|
|
516
516
|
(c) 2020 Adam Shaw
|
|
517
517
|
*/
|
|
518
|
-
var FullCalendar=function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};function n(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}var o,s,a,l,u,c,d,h={},p=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function m(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var r,i=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(i[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return y(e,o,t&&t.key,t&&t.ref,null)}function y(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(s.__v=s),o.vnode&&o.vnode(s),s}function _(e){return e.children}function b(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?w(e):null}function x(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return x(e)}}function k(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!a++||u!==o.debounceRendering)&&((u=o.debounceRendering)||l)(S)}function S(){for(var e;a=s.length;)e=s.sort((function(e,t){return e.__v.__b-t.__v.__b})),s=[],e.some((function(e){var t,n,r,i,o,s,a;e.__d&&(s=(o=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=m({},o)).__v=r,i=A(a,o,r,t.__n,void 0!==a.ownerSVGElement,null,n,null==s?w(o):s),I(n,o),i!=s&&x(o)))}))}function T(e,t,n,r,i,o,s,a,l){var u,c,d,f,m,v,y,_=n&&n.__k||p,b=_.length;if(a==h&&(a=null!=o?o[0]:b?w(n,0):null),u=0,t.__k=E(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=_[u])||d&&n.key==d.key&&n.type===d.type)_[u]=void 0;else for(c=0;c<b;c++){if((d=_[c])&&n.key==d.key&&n.type===d.type){_[c]=void 0;break}d=null}if(f=A(e,n,d=d||h,r,i,o,s,a,l),(c=n.ref)&&d.ref!=c&&(y||(y=[]),d.ref&&y.push(d.ref,null,n),y.push(c,n.__c||f,n)),null!=f){var p;if(null==v&&(v=f),void 0!==n.__d)p=n.__d,n.__d=void 0;else if(o==d||f!=a||null==f.parentNode){e:if(null==a||a.parentNode!==e)e.appendChild(f),p=null;else{for(m=a,c=0;(m=m.nextSibling)&&c<b;c+=2)if(m==f)break e;e.insertBefore(f,a),p=a}"option"==t.type&&(e.value="")}a=void 0!==p?p:f.nextSibling,"function"==typeof t.type&&(t.__d=a)}else a&&d.__e==a&&a.parentNode!=e&&(a=w(d))}return u++,n})),t.__e=v,null!=o&&"function"!=typeof t.type)for(u=o.length;u--;)null!=o[u]&&g(o[u]);for(u=b;u--;)null!=_[u]&&N(_[u],_[u]);if(y)for(u=0;u<y.length;u++)O(y[u],y[++u],y[++u])}function E(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)E(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?y(null,e,null,null,e):null!=e.__e||null!=e.__c?y(e.type,e.props,e.key,null,e.__v):e):e);return n}function D(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===f.test(t)?n+"px":null==n?"":n}function C(e,t,n,r,i){var o,s,a,l,u;if(i?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(l in r)n&&l in n||D(o,l,"");if(n)for(u in n)r&&n[u]===r[u]||D(o,u,n[u])}else"o"===t[0]&&"n"===t[1]?(s=t!==(t=t.replace(/Capture$/,"")),a=t.toLowerCase(),t=(a in e?a:t).slice(2),n?(r||e.addEventListener(t,M,s),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,M,s)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!i&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function M(e){this.l[e.type](o.event?o.event(e):e)}function A(e,t,n,r,i,s,a,l,u){var c,d,h,p,f,g,v,y,w,x,k=t.type;if(void 0!==t.constructor)return null;(c=o.__b)&&c(t);try{e:if("function"==typeof k){if(y=t.props,w=(c=k.contextType)&&r[c.__c],x=c?w?w.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(y,x):(t.__c=d=new b(y,x),d.constructor=k,d.render=R),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=x,d.__n=r,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=m({},d.__s)),m(d.__s,k.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,h)null==k.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==k.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,x)||t.__v===n.__v&&!d.__){for(d.props=y,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,d.__h.length&&a.push(d),c=0;c<t.__k.length;c++)t.__k[c]&&(t.__k[c].__=t);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,g)}))}d.context=x,d.props=y,d.state=d.__s,(c=o.__r)&&c(t),d.__d=!1,d.__v=t,d.__P=e,c=d.render(d.props,d.state,d.context),t.__k=null!=c&&c.type==_&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=d.getChildContext&&(r=m(m({},r),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(p,f)),T(e,t,n,r,i,s,a,l,u),d.base=t.__e,d.__h.length&&a.push(d),v&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=L(n.__e,t,n,r,i,s,a,u);(c=o.diffed)&&c(t)}catch(e){t.__v=null,o.__e(e,t,n)}return t.__e}function I(e,t){o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function L(e,t,n,r,i,o,s,a){var l,u,c,d,f,m=n.props,g=t.props;if(i="svg"===t.type||i,null!=o)for(l=0;l<o.length;l++)if(null!=(u=o[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,g.is&&{is:g.is}),o=null,a=!1}if(null===t.type)m!==g&&e.data!=g&&(e.data=g);else{if(null!=o&&(o=p.slice.call(e.childNodes)),c=(m=n.props||h).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!a){if(m===h)for(m={},f=0;f<e.attributes.length;f++)m[e.attributes[f].name]=e.attributes[f].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||C(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||C(e,o,t[o],n[o],r)})(e,g,m,i,a),d?t.__k=[]:(t.__k=t.props.children,T(e,t,n,r,"foreignObject"!==t.type&&i,o,s,h,a)),a||("value"in g&&void 0!==(l=g.value)&&l!==e.value&&C(e,"value",l,m.value,!1),"checked"in g&&void 0!==(l=g.checked)&&l!==e.checked&&C(e,"checked",l,m.checked,!1))}return e}function O(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){o.__e(e,n)}}function N(e,t,n){var r,i,s;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||O(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&N(r[s],t,n);null!=i&&g(i)}function R(e,t,n){return this.constructor(e,n)}function P(e,t,n){var r,i,s;o.__&&o.__(e,t),i=(r=n===c)?null:n&&n.__k||t.__k,e=v(_,null,[e]),s=[],A(t,(r?t:n||t).__k=e,i||h,h,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:p.slice.call(t.childNodes),s,n||h,r),I(s,e)}o={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return k(n.__E=n)}catch(t){e=t}throw e}},b.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),k(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},b.prototype.render=_,s=[],a=0,l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=h,d=0,("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:b,createElement:v,render:P,createRef:function(){return{}},Fragment:_,createContext:function(e){var t=function(e){var t={},n={__c:"__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,k(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var i=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&i.some((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}}return r},t},flushToDom:function(){var e=o.debounceRendering,t=[];for(o.debounceRendering=function(e){t.push(e)},P(v(F,{}),document.createElement("div"));t.length;)t.shift()();o.debounceRendering=e}};var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return v("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(b),j=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId]})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),e}();function Y(e){e.parentNode&&e.parentNode.removeChild(e)}function V(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(H(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function H(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function B(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].querySelectorAll(t),s=0;s<o.length;s++)r.push(o[s]);return r}var U=/(top|left|right|bottom|width|height)$/i;function z(e,t){for(var n in t)q(e,n,t[n])}function q(e,t,n){null==n?e.style[t]="":"number"==typeof n&&U.test(t)?e.style[t]=n+"px":e.style[t]=n}function W(e){e.preventDefault()}function $(e,t){return function(n){var r=V(n.target,e);r&&t.call(r,n,r)}}function G(e,t,n,r){var i=$(n,r);return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var K=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Z(e,t){var n=function(r){t(r),K.forEach((function(t){e.removeEventListener(t,n)}))};K.forEach((function(t){e.addEventListener(t,n)}))}var X=0;function J(){return String(X++)}function Q(){document.body.classList.add("fc-not-allowed")}function ee(){document.body.classList.remove("fc-not-allowed")}function te(e){e.classList.add("fc-unselectable"),e.addEventListener("selectstart",W)}function ne(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",W)}function re(e){e.addEventListener("contextmenu",W)}function ie(e){e.removeEventListener("contextmenu",W)}function oe(e){var t,n,r=[],i=[];for("string"==typeof e?i=e.split(/\s*,\s*/):"function"==typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t<i.length;t++)"string"==typeof(n=i[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function se(e,t,n){var r,i;for(r=0;r<n.length;r++)if(i=ae(e,t,n[r]))return i;return 0}function ae(e,t,n){return n.func?n.func(e,t):le(e[n.field],t[n.field])*(n.order||1)}function le(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}function ue(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function ce(e,t){return e-t}function de(e){return e%1==0}function he(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var pe=["sun","mon","tue","wed","thu","fri","sat"];function fe(e,t){var n=De(e);return n[2]+=7*t,Ce(n)}function me(e,t){var n=De(e);return n[2]+=t,Ce(n)}function ge(e,t){var n=De(e);return n[6]+=t,Ce(n)}function ve(e,t){return ye(e,t)/7}function ye(e,t){return(t.valueOf()-e.valueOf())/864e5}function _e(e,t){var n=xe(e),r=xe(t);return{years:0,months:0,days:Math.round(ye(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function be(e,t){var n=we(e,t);return null!==n&&n%7==0?n/7:null}function we(e,t){return Ae(e)===Ae(t)?Math.round(ye(e,t)):null}function xe(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function ke(e,t,n,r){var i=Ce([t,0,1+Se(t,n,r)]),o=xe(e),s=Math.round(ye(i,o));return Math.floor(s/7)+1}function Se(e,t,n){var r=7+t-n;return-(7+Ce([e,0,r]).getUTCDay()-t)%7+r-1}function Te(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Ee(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function De(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Ce(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function Me(e){return!isNaN(e.valueOf())}function Ae(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Ie(e,t,n,r){return{instanceId:J(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Le=Object.prototype.hasOwnProperty;function Oe(e,t){var n={};if(t)for(var r in t){for(var i=[],o=e.length-1;o>=0;o--){var s=e[o][r];if("object"==typeof s&&s)i.unshift(s);else if(void 0!==s){n[r]=s;break}}i.length&&(n[r]=Oe(i))}for(o=e.length-1;o>=0;o--){var a=e[o];for(var l in a)l in n||(n[l]=a[l])}return n}function Ne(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Re(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Pe(e){for(var t={},n=0,r=e;n<r.length;n++)t[r[n]]=!0;return t}function Fe(e){var t=[];for(var n in e)t.push(e[n]);return t}function je(e,t){if(e===t)return!0;for(var n in e)if(Le.call(e,n)&&!(n in t))return!1;for(var n in t)if(Le.call(t,n)&&e[n]!==t[n])return!1;return!0}function Ye(e,t){var n=[];for(var r in e)Le.call(e,r)&&(r in t||n.push(r));for(var r in t)Le.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function Ve(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!He(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function He(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Be(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var i=[];null==n&&(n=Object.keys(e).length);for(var o=t;o<n;o+=r){var s=e[o];void 0!==s&&i.push(s)}return i}function Ue(e,t,n){var r=n.dateEnv,i=n.pluginHooks,o=n.options,s=e.defs,a=e.instances;for(var l in a=Ne(a,(function(e){return!s[e.defId].recurringDef})),s){var u=s[l];if(u.recurringDef){var c=u.recurringDef.duration;c||(c=u.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration);for(var d=0,h=ze(u,c,t,r,i.recurringTypes);d<h.length;d++){var p=h[d],f=Ie(l,{start:p,end:r.add(p,c)});a[f.instanceId]=f}}}return{defs:s,instances:a}}function ze(e,t,n,r,i){var o=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(o=o.map(xe)),o}var qe=["years","months","days","milliseconds"],We=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function $e(e,t){var n;return"string"==typeof e?function(e){var t=We.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?Ge(e):"number"==typeof e?Ge(((n={})[t||"milliseconds"]=e,n)):null}function Ge(e){var t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function Ke(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function Ze(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function Xe(e){return Je(e)/864e5}function Je(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Qe(e,t){for(var n=null,r=0;r<qe.length;r++){var i=qe[r];if(t[i]){var o=e[i]/t[i];if(!de(o)||null!==n&&n!==o)return null;n=o}else if(e[i])return null}return n}function et(e){var t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function tt(e){return e.toISOString().replace(/T.*$/,"")}function nt(e){return ue(e.getUTCHours(),2)+":"+ue(e.getUTCMinutes(),2)+":"+ue(e.getUTCSeconds(),2)}function rt(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?n+ue(i,2)+":"+ue(o,2):"GMT"+n+i+(o?":"+ue(o,2):"")}function it(e,t,n){if(e===t)return!0;var r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r++)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function ot(e,t,n){var r,i;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(r){if(!it(r,o)){n&&n(i);var a=e.apply(this,o);t&&t(a,i)||(i=a)}}else i=e.apply(this,o);return r=o,i}}function st(e,t,n){var r,i;return function(o){if(r){if(!je(r,o)){n&&n(i);var s=e.call(this,o);t&&t(s,i)||(i=s)}}else i=e.call(this,o);return r=o,i}}var at={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},lt={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},ut=/\s*([ap])\.?m\.?/i,ct=/,/g,dt=/\s+/g,ht=/\u200e/g,pt=/UTC|GMT/,ft=function(){function e(e){var t={},n={},r=0;for(var i in e)i in at?(n[i]=e[i],r=Math.max(at[i],r)):(t[i]=e[i],i in lt&&(r=Math.max(lt[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=ot(mt)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n,r){var i=this.standardDateProps,o=this.extendedSettings,s=function(e,t,n){return n.getMarkerYear(e)!==n.getMarkerYear(t)?5:n.getMarkerMonth(e)!==n.getMarkerMonth(t)?4:n.getMarkerDay(e)!==n.getMarkerDay(t)?2:Ae(e)!==Ae(t)?1:0}(e.marker,t.marker,n.calendarSystem);if(!s)return this.format(e,n);var a=s;!(a>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(a=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=mt(function(e,t){var n={};for(var r in e)(!(r in lt)||lt[r]<=t)&&(n[r]=e[r]);return n}(i,a),o,n),d=c(e),h=c(t),p=function(e,t,n,r){for(var i=0;i<e.length;){var o=e.indexOf(t,i);if(-1===o)break;var s=e.substr(0,o);i=o+t.length;for(var a=e.substr(i),l=0;l<n.length;){var u=n.indexOf(r,l);if(-1===u)break;var c=n.substr(0,u);l=u+r.length;var d=n.substr(l);if(s===c&&a===d)return{before:s,after:a}}}return null}(l,d,u,h),f=o.separator||r||n.defaultSeparator||"";return p?p.before+d+f+h+p.after:l+f+u},e.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}},e}();function mt(e,t,n){var i=Object.keys(e).length;return 1===i&&"short"===e.timeZoneName?function(e){return rt(e.timeZoneOffset)}:0===i&&t.week?function(e){return function(e,t,n,r){var i=[];return"narrow"===r?i.push(t):"short"===r&&i.push(t," "),i.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&i.reverse(),i.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.locale,t.week)}:function(e,t,n){e=r({},e),t=r({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";var i,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var s=r({},e);delete s.minute,i=new Intl.DateTimeFormat(n.locale.codes,s)}return function(r){var s=r.marker;return function(e,t,n,r,i){return e=e.replace(ht,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;return e=e.replace(pt,(function(){return n=!0,t})),n||(e+=" "+t),e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":rt(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(ct,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(ut,"").trim():"narrow"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(ut,(function(e){return e.toLocaleLowerCase()}))),(e=e.replace(dt," ")).trim()}((i&&!s.getUTCMinutes()?i:o).format(s),r,e,t,n)}}(e,t,n)}function gt(e,t){var n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function vt(e,t,n,r){var i=gt(e,n.calendarSystem);return{date:i,start:i,end:t?gt(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var yt=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,vt(e,t,n,r))},e}(),_t=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(vt(e,t,n,r))},e}();function bt(e){return"object"==typeof e&&e?new ft(e):"string"==typeof e?new yt(e):"function"==typeof e?new _t(e):void 0}var wt={navLinkDayClick:At,navLinkWeekClick:At,duration:$e,bootstrapFontAwesome:At,buttonIcons:At,customButtons:At,defaultAllDayEventDuration:$e,defaultTimedEventDuration:$e,nextDayThreshold:$e,scrollTime:$e,slotMinTime:$e,slotMaxTime:$e,dayPopoverFormat:bt,slotDuration:$e,snapDuration:$e,headerToolbar:At,footerToolbar:At,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:bt,dayHeaderClassNames:At,dayHeaderContent:At,dayHeaderDidMount:At,dayHeaderWillUnmount:At,dayCellClassNames:At,dayCellContent:At,dayCellDidMount:At,dayCellWillUnmount:At,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:At,weekNumbers:Boolean,weekNumberClassNames:At,weekNumberContent:At,weekNumberDidMount:At,weekNumberWillUnmount:At,editable:Boolean,viewClassNames:At,viewDidMount:At,viewWillUnmount:At,nowIndicator:Boolean,nowIndicatorClassNames:At,nowIndicatorContent:At,nowIndicatorDidMount:At,nowIndicatorWillUnmount:At,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:At,locale:At,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:At,eventOrder:oe,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:At,contentHeight:At,direction:String,weekNumberFormat:bt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:At,initialDate:At,now:At,eventDataTransform:At,stickyHeaderDates:At,stickyFooterScrollbar:At,viewHeight:At,defaultAllDay:Boolean,eventSourceFailure:At,eventSourceSuccess:At,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:At,eventConstraint:At,eventAllow:At,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:At,eventContent:At,eventDidMount:At,eventWillUnmount:At,selectConstraint:At,selectOverlap:At,selectAllow:At,droppable:Boolean,unselectCancel:String,slotLabelFormat:At,slotLaneClassNames:At,slotLaneContent:At,slotLaneDidMount:At,slotLaneWillUnmount:At,slotLabelClassNames:At,slotLabelContent:At,slotLabelDidMount:At,slotLabelWillUnmount:At,dayMaxEvents:At,dayMaxEventRows:At,dayMinWidth:Number,slotLabelInterval:$e,allDayText:String,allDayClassNames:At,allDayContent:At,allDayDidMount:At,allDayWillUnmount:At,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:bt,rerenderDelay:Number,moreLinkText:At,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMinHeight:Number,slotEventOverlap:Boolean,plugins:At,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:$e,hiddenDays:At,monthMode:Boolean,fixedWeekCount:Boolean,validRange:At,visibleRange:At,titleFormat:At,noEventsText:String},xt={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" \u2013 ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1},kt={datesSet:At,eventsSet:At,eventAdd:At,eventChange:At,eventRemove:At,windowResize:At,eventClick:At,eventMouseEnter:At,eventMouseLeave:At,select:At,unselect:At,loading:At,_unmount:At,_beforeprint:At,_afterprint:At,_noEventDrop:At,_noEventResize:At,_resize:At,_scrollRequest:At},St={buttonText:At,views:At,plugins:At,initialEvents:At,events:At,eventSources:At},Tt={headerToolbar:Et,footerToolbar:Et,buttonText:Et,buttonIcons:Et};function Et(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?je(e,t):e===t}var Dt={type:String,component:At,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:At,usesMinMaxTime:Boolean,classNames:At,content:At,didMount:At,willUnmount:At};function Ct(e){return Oe(e,Tt)}function Mt(e,t){var n={},r={};for(var i in t)i in e&&(n[i]=t[i](e[i]));for(var i in e)i in t||(r[i]=e[i]);return{refined:n,extra:r}}function At(e){return e}function It(e,t,n,r){for(var i={defs:{},instances:{}},o=$t(n),s=0,a=e;s<a.length;s++){var l=qt(a[s],t,n,r,o);l&&Lt(l,i)}return i}function Lt(e,t){return void 0===t&&(t={defs:{},instances:{}}),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Ot(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],i=Rt(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return{defs:{},instances:{}}}function Nt(e,t){return{defs:r(r({},e.defs),t.defs),instances:r(r({},e.instances),t.instances)}}function Rt(e,t){var n=Ne(e.defs,t),r=Ne(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function Pt(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Ft={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:At,overlap:At,allow:At,className:Pt,classNames:Pt,color:String,backgroundColor:String,borderColor:String,textColor:String};function jt(e,t){var n=function(e,t){return Array.isArray(e)?It(e,null,t,!0):"object"==typeof e&&e?It([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function Yt(e){return e.reduce(Vt,Ht)}function Vt(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var Ht={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]},Bt={id:String,groupId:String,title:String,url:String},Ut={start:At,end:At,date:At,allDay:Boolean},zt=r(r(r({},Bt),Ut),{extendedProps:At});function qt(e,t,n,r,i){void 0===i&&(i=$t(n));var o=Wt(e,n,i),s=o.refined,a=o.extra,l=function(e,t){var n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),u=function(e,t,n,r){for(var i=0;i<r.length;i++){var o=r[i].parse(e,n);if(o){var s=e.allDay;return null==s&&null==(s=t)&&null==(s=o.allDayGuess)&&(s=!1),{allDay:s,duration:o.duration,typeData:o.typeData,typeId:i}}}return null}(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(c=Gt(s,a,t?t.sourceId:"",u.allDay,Boolean(u.duration),n)).recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:c,instance:null};var c,d=function(e,t,n,r){var i,o,s=e.allDay,a=null,l=!1,u=null,c=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(c))a=i.marker;else if(!r)return null;return null!=e.end&&(o=n.dateEnv.createMarkerMeta(e.end)),null==s&&(s=null!=t?t:(!i||i.isTimeUnspecified)&&(!o||o.isTimeUnspecified)),s&&a&&(a=xe(a)),o&&(u=o.marker,s&&(u=xe(u)),a&&u<=a&&(u=null)),u?l=!0:r||(l=n.options.forceEventDuration||!1,u=n.dateEnv.add(a,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:s,hasEnd:l,range:{start:a,end:u},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:o?o.forcedTzo:null}}(s,l,n,r);return d?{def:c=Gt(s,a,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:Ie(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function Wt(e,t,n){return void 0===n&&(n=$t(t)),Mt(e,n)}function $t(e){return r(r(r({},Ft),zt),e.pluginHooks.eventRefiners)}function Gt(e,t,n,i,o,s){for(var a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:J(),sourceId:n,allDay:i,hasEnd:o,ui:jt(e,s),extendedProps:r(r({},e.extendedProps||{}),t)},l=0,u=s.pluginHooks.eventDefMemberAdders;l<u.length;l++){var c=u[l];r(a,c(e))}return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function Kt(e){var t=Math.floor(ye(e.start,e.end))||1,n=xe(e.start);return{start:n,end:me(n,t)}}function Zt(e,t){void 0===t&&(t=$e(0));var n=null,r=null;if(e.end){r=xe(e.end);var i=e.end.valueOf()-r.valueOf();i&&i>=Je(t)&&(r=me(r,1))}return e.start&&(n=xe(e.start),r&&r<=n&&(r=me(n,1))),{start:n,end:r}}function Xt(e){var t=Zt(e);return ye(t.start,t.end)>1}function Jt(e,t,n,r){return"year"===r?$e(n.diffWholeYears(e,t),"year"):"month"===r?$e(n.diffWholeMonths(e,t),"month"):_e(e,t)}function Qt(e,t){var n,r,i=[],o=t.start;for(e.sort(en),n=0;n<e.length;n++)(r=e[n]).start>o&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return o<t.end&&i.push({start:o,end:t.end}),i}function en(e,t){return e.start.valueOf()-t.start.valueOf()}function tn(e,t){var n=e.start,r=e.end,i=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(i={start:n,end:r}),i}function nn(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function rn(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function on(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function sn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function an(e,t,n,r){var i={},o={},s={},a=[],l=[],u=dn(e.defs,t);for(var c in e.defs)"inverse-background"===(p=u[(b=e.defs[c]).defId]).display&&(b.groupId?(i[b.groupId]=[],s[b.groupId]||(s[b.groupId]=b)):o[c]=[]);for(var d in e.instances){var h=e.instances[d],p=u[(b=e.defs[h.defId]).defId],f=h.range,m=!b.allDay&&r?Zt(f,r):f,g=tn(m,n);g&&("inverse-background"===p.display?b.groupId?i[b.groupId].push(g):o[h.defId].push(g):"none"!==p.display&&("background"===p.display?a:l).push({def:b,ui:p,instance:h,range:g,isStart:m.start&&m.start.valueOf()===g.start.valueOf(),isEnd:m.end&&m.end.valueOf()===g.end.valueOf()}))}for(var v in i)for(var y=0,_=Qt(i[v],n);y<_.length;y++){var b,w=_[y];p=u[(b=s[v]).defId],a.push({def:b,ui:p,instance:null,range:w,isStart:!1,isEnd:!1})}for(var c in o)for(var x=0,k=Qt(o[c],n);x<k.length;x++)w=k[x],a.push({def:e.defs[c],ui:u[c],instance:null,range:w,isStart:!1,isEnd:!1});return{bg:a,fg:l}}function ln(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function un(e,t){e.fcSeg=t}function cn(e){return e.fcSeg||e.parentNode.fcSeg||null}function dn(e,t){return Re(e,(function(e){return hn(e,t)}))}function hn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Yt(n)}function pn(e,t){var n=e.map(fn);return n.sort((function(e,n){return se(e,n,t)})),n.map((function(e){return e._seg}))}function fn(e){var t=e.eventRange,n=t.def,i=t.instance?t.instance.range:t.range,o=i.start?i.start.valueOf():0,s=i.end?i.end.valueOf():0;return r(r(r({},n.extendedProps),n),{id:n.publicId,start:o,end:s,duration:s-o,allDay:Number(n.allDay),_seg:e})}function mn(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,i=r.def,o=r.ui,s=o.startEditable,a=0,l=n;a<l.length;a++)s=(0,l[a])(s,i,o,t);return s}function gn(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function vn(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function yn(e,t,n,r,i,o,s){var a=n.dateEnv,l=n.options,u=l.displayEventTime,c=l.displayEventEnd,d=e.eventRange.def,h=e.eventRange.instance;if(null==u&&(u=!1!==r),null==c&&(c=!1!==i),u&&!d.allDay&&(e.isStart||e.isEnd)){var p=o||(e.isStart?h.range.start:e.start||e.eventRange.range.start),f=s||(e.isEnd?h.range.end:e.end||e.eventRange.range.end);return c&&d.hasEnd?a.formatRange(p,f,t,{forcedStartTzo:o?null:h.forcedStartTzo,forcedEndTzo:s?null:h.forcedEndTzo}):a.format(p,t,{forcedTzo:o?null:h.forcedStartTzo})}return""}function _n(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&sn(t,r.start)}}function bn(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function wn(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}var xn={start:At,end:At,allDay:Boolean};function kn(e,t,n){var i=function(e,t){var n=Mt(e,xn),i=n.refined,o=n.extra,s=i.start?t.createMarkerMeta(i.start):null,a=i.end?t.createMarkerMeta(i.end):null,l=i.allDay;return null==l&&(l=s&&s.isTimeUnspecified&&(!a||a.isTimeUnspecified)),r({range:{start:s?s.marker:null,end:a?a.marker:null},allDay:l},o)}(e,t),o=i.range;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return i}function Sn(e,t){return nn(e.range,t.range)&&e.allDay===t.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(e,t)}function Tn(e,t,n){return r(r({},En(e,t,n)),{timeZone:t.timeZone})}function En(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function Dn(e,t,n){n.emitter.trigger("select",r(r({},Cn(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Cn(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.dateSpanTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,i=t.dateEnv,r(r({},En(n.range,i,n.allDay)),{allDay:n.allDay}))),o}function Mn(e,t,n){var r=n.dateEnv,i=n.options,o=t;return e?(o=xe(o),o=r.add(o,i.defaultAllDayEventDuration)):o=r.add(o,i.defaultTimedEventDuration),o}function An(e,t,n,r){var i=dn(e.defs,t),o={defs:{},instances:{}};for(var s in e.defs){var a=e.defs[s];o.defs[s]=In(a,i[s],n,r)}for(var l in e.instances){var u=e.instances[l];a=o.defs[u.defId],o.instances[l]=Ln(u,a,i[u.defId],n,r)}return o}function In(e,t,n,i){var o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);var s=r(r(r({},e),o),{ui:r(r({},e.ui),o.ui)});n.extendedProps&&(s.extendedProps=r(r({},s.extendedProps),n.extendedProps));for(var a=0,l=i.pluginHooks.eventDefMutationAppliers;a<l.length;a++)(0,l[a])(s,n,i);return!s.hasEnd&&i.options.forceEventDuration&&(s.hasEnd=!0),s}function Ln(e,t,n,i,o){var s=o.dateEnv,a=i.standardProps&&!0===i.standardProps.allDay,l=i.standardProps&&!1===i.standardProps.hasEnd,u=r({},e);return a&&(u.range=Kt(u.range)),i.datesDelta&&n.startEditable&&(u.range={start:s.add(u.range.start,i.datesDelta),end:s.add(u.range.end,i.datesDelta)}),i.startDelta&&n.durationEditable&&(u.range={start:s.add(u.range.start,i.startDelta),end:u.range.end}),i.endDelta&&n.durationEditable&&(u.range={start:u.range.start,end:s.add(u.range.end,i.endDelta)}),l&&(u.range={start:u.range.start,end:Mn(t.allDay,u.range.start,o)}),t.allDay&&(u.range={start:xe(u.range.start),end:xe(u.range.end)}),u.range.end<u.range.start&&(u.range.end=Mn(t.allDay,u.range.start,o)),u}var On=function(){function e(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}return Object.defineProperty(e.prototype,"calendar",{get:function(){return this.getCurrentData().calendarApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.getCurrentData().viewTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)},enumerable:!1,configurable:!0}),e.prototype.getOption=function(e){return this.getCurrentData().options[e]},e}(),Nn={id:String,defaultAllDay:Boolean,url:String,events:At,eventDataTransform:At,success:At,failure:At};function Rn(e,t,n){var r;if(void 0===n&&(n=Pn(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var i=Mt(r,n),o=i.refined,s=i.extra,a=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r--){var i=n[r].parseMeta(e);if(i)return{sourceDefId:r,meta:i}}return null}(o,t);if(a)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:J(),sourceDefId:a.sourceDefId,meta:a.meta,ui:jt(o,t),extendedProps:s}}return null}function Pn(e){return r(r(r({},Ft),Nn),e.pluginHooks.eventSourceRefiners)}function Fn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var jn=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.currentDataManager.emitter).trigger.apply(t,i([e],n))},e.prototype.changeView=function(e,t){var n=this;this.batchRendering((function(){if(n.unselect(),t)if(t.start&&t.end)n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),n.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{var r=n.getCurrentData().dateEnv;n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))},e.prototype.zoomTo=function(e,t){var n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.getCurrentData(),i=r.viewSpecs,o=r.toolbarConfig,s=[].concat(o.viewsWithButtons);for(var a in i)s.push(a);for(t=0;t<s.length;t++)if((n=i[s[t]])&&n.singleUnit===e)return n},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})},e.prototype.nextYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})},e.prototype.today=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Fn(e.calendarOptions.now,e.dateEnv)})},e.prototype.gotoDate=function(e){var t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=this.getCurrentData(),n=$e(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))},e.prototype.getDate=function(){var e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)},e.prototype.formatDate=function(e,t){var n=this.getCurrentData().dateEnv;return n.format(n.createMarker(e),bt(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),bt(n),n)},e.prototype.formatIso=function(e,t){var n=this.getCurrentData().dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.select=function(e,t){var n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};var r=this.getCurrentData(),i=kn(n,r.dateEnv,$e({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),Dn(i,null,r))},e.prototype.unselect=function(e){var t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))},e.prototype.addEvent=function(e,t){if(e instanceof Yn){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Lt({def:n,instance:r})}),this.triggerEventAdd(e)),e}var i,o=this.getCurrentData();if(t instanceof j)i=t.internalEventSource;else if("boolean"==typeof t)t&&(i=Fe(o.eventSources)[0]);else if(null!=t){var s=this.getEventSourceById(t);if(!s)return console.warn('Could not find an event source with ID "'+t+'"'),null;i=s.internalEventSource}var a=qt(e,i,o,!1);if(a){var l=new Yn(o,a.def,a.def.recurringDef?null:a.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Lt(a)}),this.triggerEventAdd(l),l}return null},e.prototype.triggerEventAdd=function(e){var t=this;this.getCurrentData().emitter.trigger("eventAdd",{event:e,relatedEvents:[],revert:function(){t.dispatch({type:"REMOVE_EVENTS",eventStore:Vn(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,i=n.instances;for(var o in e=String(e),r){var s=r[o];if(s.publicId===e){if(s.recurringDef)return new Yn(t,s,null);for(var a in i){var l=i[a];if(l.defId===s.defId)return new Yn(t,s,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Hn(e.eventStore,e)},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.getEventSources=function(){var e=this.getCurrentData(),t=e.eventSources,n=[];for(var r in t)n.push(new j(e,t[r]));return n},e.prototype.getEventSourceById=function(e){var t=this.getCurrentData(),n=t.eventSources;for(var r in e=String(e),n)if(n[r].publicId===e)return new j(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof j)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=Rn(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new j(t,n)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES"})},e.prototype.scrollToTime=function(e){var t=$e(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),Yn=function(){function e(e,t,n){this._context=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in Ut)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e in Bt)t=Bt[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in Ft){var i=Ft[e](t);"color"===e?i={backgroundColor:t,borderColor:t}:"editable"===e?i={startEditable:t,durationEditable:t}:((r={})[e]=t,i=r),this.mutate({standardProps:{ui:i}})}else console.warn("Could not set prop '"+e+"'. Use setExtendedProp instead.")},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._context.dateEnv,r=n.createMarker(e);if(r&&this._instance){var i=Jt(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._context.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var i=Jt(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,i,o,s=this._context.dateEnv,a={allDay:n.allDay},l=s.createMarker(e);if(l&&(null==t||(r=s.createMarker(t)))&&this._instance){var u=this._instance.range;!0===n.allDay&&(u=Kt(u));var c=Jt(u.start,l,s,n.granularity);if(r){var d=Jt(u.end,r,s,n.granularity);o=d,(i=c).years===o.years&&i.months===o.months&&i.days===o.days&&i.milliseconds===o.milliseconds?this.mutate({datesDelta:c,standardProps:a}):this.mutate({startDelta:c,endDelta:d,standardProps:a})}else a.hasEnd=!1,this.mutate({datesDelta:c,standardProps:a})}},e.prototype.moveStart=function(e){var t=$e(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=$e(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=$e(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._context.dateEnv,n=this._instance,r=bt(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})},e.prototype.mutate=function(t){var n=this._instance;if(n){var r=this._def,i=this._context,o=Ot(i.getCurrentData().eventStore,n.instanceId);o=An(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,i);var s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:Hn(o,i,n),revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:o})}})}},e.prototype.remove=function(){var e=this._context,t=Vn(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert:function(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new j(this._context,this._context.getCurrentData().eventSources[e]):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startStr",{get:function(){var e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endStr",{get:function(){var e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"display",{get:function(){return this._def.ui.display||"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!1,configurable:!0}),e.prototype.toPlainObject=function(e){void 0===e&&(e={});var t=this._def,n=t.ui,i=this.startStr,o=this.endStr,s={};return t.title&&(s.title=t.title),i&&(s.start=i),o&&(s.end=o),t.publicId&&(s.id=t.publicId),t.groupId&&(s.groupId=t.groupId),t.url&&(s.url=t.url),n.display&&"auto"!==n.display&&(s.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?s.color=n.backgroundColor:(n.backgroundColor&&(s.backgroundColor=n.backgroundColor),n.borderColor&&(s.borderColor=n.borderColor)),n.textColor&&(s.textColor=n.textColor),n.classNames.length&&(s.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?r(s,t.extendedProps):s.extendedProps=t.extendedProps),s},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function Vn(e){var t,n,r=e._def,i=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:i?(n={},n[i.instanceId]=i,n):{}}}function Hn(e,t,n){var r=e.defs,i=e.instances,o=[],s=n?n.instanceId:"";for(var a in i){var l=i[a],u=r[l.defId];l.instanceId!==s&&o.push(new Yn(t,u,l))}return o}var Bn,Un={},zn=function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return Ce(e)},e.prototype.markerToArray=function(e){return De(e)},e}();Bn=zn,Un.gregory=Bn;var qn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Wn(e){var t=qn.exec(e);if(t){var n=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number("0."+t[12]):0));if(Me(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}var $n=function(){function e(e){var t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new Un[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Ce(Te(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Ce(e)),null!==t&&Me(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=Wn(e);if(null===t)return null;var n=t.marker,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.subtract=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:null!==(n=be(e,t))?{unit:"week",value:n}:null!==(n=we(e,t))?{unit:"day",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t))?{unit:"hour",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t))?{unit:"minute",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t))?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/(Xe(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Xe(e)/30}(n):n.days&&null!==(r=we(e,t))?r/Xe(n):(t.valueOf()-e.valueOf())/Je(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?xe(e):"hour"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):void 0},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){var r=e.getUTCFullYear(),i=ke(e,r,t,n);if(i<1)return ke(e,r-1,t,n);var o=ke(e,r+1,t,n);return o>=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=ge(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",rt(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?Ce(Te(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Ce(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Ee(De(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(De(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Ee(De(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(De(e))*60):new Date(e.valueOf()-(t||0))},e}(),Gn=[],Kn={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"};function Zn(e){for(var t=e.length>0?e[0].code:"en",n=Gn.concat(e),r={en:Kn},i=0,o=n;i<o.length;i++){var s=o[i];r[s.code]=s}return{map:r,defaultCode:t}}function Xn(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){var n=[].concat(e||[]),r=function(e,t){for(var n=0;n<e.length;n++)for(var r=e[n].toLocaleLowerCase().split("-"),i=r.length;i>0;i--){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||Kn;return Jn(e,n,r)}(e,t):Jn(e.code,[e.code],e)}function Jn(e,t,n){var r=Oe([Kn,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Qn(e){var t=Xn(e.locale||"en",Zn([]).map);return new $n(r(r({timeZone:xt.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var er,tr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function nr(e,t){return It(function(e){return(!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[]).map((function(e){return r(r({},tr),e)}))}(e),null,t)}function rr(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function ir(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function or(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}}function sr(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function ar(e,t){return{left:e.left-t.left,top:e.top-t.top}}function lr(){return null==er&&(er=function(){if("undefined"==typeof document)return!0;var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),er}var ur={defs:{},instances:{}},cr=function(){function e(){this.getKeysForEventDefs=ot(this._getKeysForEventDefs),this.splitDateSelection=ot(this._splitDateSpan),this.splitEventStore=ot(this._splitEventStore),this.splitIndividualUi=ot(this._splitIndividualUi),this.splitEventDrag=ot(this._splitInteraction),this.splitEventResize=ot(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,r),s=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Re(n,(function(e,n){return t.eventUiBuilders[n]||ot(dr)})),n){var d=n[c],h=s[c]||ur,p=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:h,eventUiBases:p(e.eventUiBases[""],d.ui,o[c]),eventSelection:h.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++)t[r[n]]=e;return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return Re(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,i={};for(var o in n)for(var s=0,a=t[o];s<a.length;s++)i[h=a[s]]||(i[h]={defs:{},instances:{}}),i[h].defs[o]=n[o];for(var l in r)for(var u=r[l],c=0,d=t[u.defId];c<d.length;c++){var h;i[h=d[c]]&&(i[h].instances[l]=u)}return i},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var i=0,o=t[r];i<o.length;i++){var s=o[i];n[s]||(n[s]={}),n[s][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),o=function(r){t[r]||(t[r]={affectedEvents:n[r]||ur,mutatedEvents:i[r]||ur,isEvent:e.isEvent})};for(var s in n)o(s);for(var s in i)o(s)}return t},e}();function dr(e,t,n){var i=[];e&&i.push(e),t&&i.push(t);var o={"":Yt(i)};return n&&r(o,n),o}function hr(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!sn(r.activeRange,e)),isOther:Boolean(r&&!sn(r.currentRange,e)),isToday:Boolean(t&&sn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function pr(e,t){var n=["fc-day","fc-day-"+pe[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}function fr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:tt(e),type:t})}var mr,gr=null;function vr(){return null===gr&&(gr=function(){var e=document.createElement("div");z(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Y(e),t}()),gr}function yr(){return mr||(mr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=_r(e);return document.body.removeChild(e),t}()),mr}function _r(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function br(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,s=parseInt(n.borderBottomWidth,10)||0,a=_r(e),l=a.y-r-i,u={borderLeft:r,borderRight:i,borderTop:o,borderBottom:s,scrollbarBottom:a.x-o-s,scrollbarLeft:0,scrollbarRight:0};return vr()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function wr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():xr(e),i=br(e,t),o={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o}function xr(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function kr(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function Sr(e,t,n){var r=!1,i=function(){r||(r=!0,t.apply(this,arguments))},o=function(){r||(r=!0,n&&n.apply(this,arguments))},s=e(i,o);s&&"function"==typeof s.then&&s.then(i,o)}var Tr=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=this.handlers[e]||[],i=this.options&&this.options[e],o=0,s=[].concat(i||[],r);o<s.length;o++){s[o].apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e]},e}(),Er=function(){function e(e,t,n,r){this.els=t;var i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.left-e),n.push(o.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.top-e),n.push(o.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),Dr=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),Cr=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return n(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(Dr),Mr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(Dr),Ar=function(){function e(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}return e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=r({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e,t){var n;return(n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e])?this.baseIconClass+" "+n:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();if(Ar.prototype.classes={},Ar.prototype.iconClasses={},Ar.prototype.baseIconClass="",Ar.prototype.iconOverridePrefix="","undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Ir=FullCalendarVDom.Component,Lr=FullCalendarVDom.createElement,Or=FullCalendarVDom.render,Nr=FullCalendarVDom.createRef,Rr=FullCalendarVDom.Fragment,Pr=FullCalendarVDom.createContext,Fr=FullCalendarVDom.flushToDom,jr=function(){function e(e,t,n){var i=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.handleScrollRequest=function(e){i.queuedRequest=r({},i.queuedRequest||{},e),i.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}return e.prototype.detach=function(){this.emitter.off("_scrollRequest",this.handleScrollRequest)},e.prototype.update=function(e){e?this.fireInitialScroll():this.drain()},e.prototype.fireInitialScroll=function(){this.handleScrollRequest({time:this.scrollTime})},e.prototype.drain=function(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)},e}(),Yr=Pr({});function Vr(e,t,n,r,i,o,s,a,l,u,c,d,h){return{dateEnv:i,options:n,pluginHooks:s,emitter:u,dispatch:a,getCurrentData:l,calendarApi:c,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new jr(e,u,$e(n.scrollTime))},registerInteractiveComponent:d,unregisterInteractiveComponent:h}}var Hr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(Ye(e,this.props),Ye(t,this.state)),!Ve(this.props,e,this.propEquality)||!Ve(this.state,t,this.stateEquality)},t.addPropsEquality=Ur,t.addStateEquality=zr,t.contextType=Yr,t}(Ir);Hr.prototype.propEquality={},Hr.prototype.stateEquality={};var Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.contextType=Yr,t}(Hr);function Ur(e){var t=Object.create(this.prototype.propEquality);r(t,e),this.prototype.propEquality=t}function zr(e){var t=Object.create(this.prototype.stateEquality);r(t,e),this.prototype.stateEquality=t}function qr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Wr(e,t){var n;if(t){n=[];for(var r=0,i=e;r<i.length;r++){var o=i[r],s=t(o);s?n.push(s):null==s&&n.push(o)}}else n=e;return n}function $r(e,t){return Rt(e,(function(e){return e.sourceId!==t}))}function Gr(e,t){return Kr({eventDrag:e},t)}function Kr(e,t){var n=t.getCurrentData(),i=r({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||Zr)(i,t)}function Zr(e,t,n,i){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,i){var o=t.getCurrentData(),s=e.eventDrag,a=s.mutatedEvents,l=a.defs,u=a.instances,c=dn(l,s.isEvent?e.eventUiBases:{"":o.selectionConfig});i&&(c=Re(c,i));var d,h,p=(d=e.eventStore,h=s.affectedEvents.instances,{defs:d.defs,instances:Ne(d.instances,(function(e){return!h[e.instanceId]}))}),f=p.defs,m=p.instances,g=dn(f,e.eventUiBases);for(var v in u){var y=u[v],_=y.range,b=c[y.defId],w=l[y.defId];if(!Xr(b.constraints,_,p,e.businessHours,t))return!1;var x=t.options.eventOverlap,k="function"==typeof x?x:null;for(var S in m){var T=m[S];if(rn(_,T.range)){if(!1===g[T.defId].overlap&&s.isEvent)return!1;if(!1===b.overlap)return!1;if(k&&!k(new Yn(t,f[T.defId],T),new Yn(t,w,y)))return!1}}for(var E=o.eventStore,D=0,C=b.allows;D<C.length;D++){var M,A=C[D],I=r(r({},n),{range:y.range,allDay:w.allDay}),L=E.defs[w.defId],O=E.instances[v];if(M=L?new Yn(t,L,O):new Yn(t,w),!A(Cn(I,t),M))return!1}}return!0}(e,t,n,i)||e.dateSelection&&!function(e,t,n,i){var o=e.eventStore,s=o.defs,a=o.instances,l=e.dateSelection,u=l.range,c=t.getCurrentData().selectionConfig;if(i&&(c=i(c)),!Xr(c.constraints,u,o,e.businessHours,t))return!1;var d=t.options.selectOverlap,h="function"==typeof d?d:null;for(var p in a){var f=a[p];if(rn(u,f.range)){if(!1===c.overlap)return!1;if(h&&!h(new Yn(t,s[f.defId],f),null))return!1}}for(var m=0,g=c.allows;m<g.length;m++){if(!(0,g[m])(Cn(r(r({},n),l),t),null))return!1}return!0}(e,t,n,i))}function Xr(e,t,n,r,i){for(var o=0,s=e;o<s.length;o++)if(!ei(Jr(s[o],t,n,r,i),t))return!1;return!0}function Jr(e,t,n,r,i){return"businessHours"===e?Qr(Ue(r,t,i)):"string"==typeof e?Qr(Rt(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?Qr(Ue(e,t,i)):[]}function Qr(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function ei(e,t){for(var n=0,r=e;n<r.length;n++)if(on(r[n],t))return!0;return!1}var ti=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=J(),t}return n(t,e),t.prototype.prepareHits=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isInteractionValid=function(e){var t=this.props.dateProfile,n=e.mutatedEvents.instances;if(t)for(var r in n)if(!on(t.validRange,n[r].range))return!1;return Gr(e,this.context)},t.prototype.isDateSelectionValid=function(e){var t=this.props.dateProfile;return!(t&&!on(t.validRange,e.range))&&Kr({dateSelection:e},this.context)},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!V(e,".fc-event-mirror")&&(this.isPopover()||!this.isInPopover(e))},t.prototype.isValidDateDownEl=function(e){return!(V(e,".fc-event:not(.fc-bg-event)")||V(e,".fc-daygrid-more-link")||V(e,"a[data-navlink]")||this.isInPopover(e))},t.prototype.isPopover=function(){return!1},t.prototype.isInPopover=function(e){return Boolean(V(e,".fc-popover"))},t}(Br);function ni(e){return{id:J(),deps:e.deps||[],reducers:e.reducers||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],eventResizeJoinTransforms:e.eventResizeJoinTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,contentTypeHandlers:e.contentTypeHandlers||{},listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}var ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);function ii(e,t,n,i){if(t[e])return t[e];var o=function(e,t,n,i){var o=n[e],s=i[e],a=function(e){return o&&null!==o[e]?o[e]:s&&null!==s[e]?s[e]:null},l=a("component"),u=a("superType"),c=null;if(u){if(u===e)throw new Error("Can't have a custom view type that references itself");c=ii(u,t,n,i)}return!l&&c&&(l=c.component),l?{type:e,component:l,defaults:r(r({},c?c.defaults:{}),o?o.rawOptions:{}),overrides:r(r({},c?c.overrides:{}),s?s.rawOptions:{})}:null}(e,t,n,i);return o&&(t[e]=o),o}ri.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},ri.prototype.baseIconClass="fc-icon",ri.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},ri.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},ri.prototype.iconOverrideOption="buttonIcons",ri.prototype.iconOverrideCustomButtonOption="icon",ri.prototype.iconOverridePrefix="fc-icon-";var oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.handleRootEl=function(e){qr(t.rootElRef,e),t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return Lr(ui,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return Lr(ai,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,i){return t.children(r,di(t.classNames,n),e,i)}))}))},t}(Br),si=Pr(0);function ai(e){return Lr(si.Consumer,null,(function(t){return Lr(li,r({renderId:t},e))}))}var li=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Nr(),t}return n(t,e),t.prototype.render=function(){return this.props.children(this.innerElRef,this.renderInnerContent())},t.prototype.componentDidMount=function(){this.updateCustomContent()},t.prototype.componentDidUpdate=function(){this.updateCustomContent()},t.prototype.renderInnerContent=function(){var e=this.context.pluginHooks.contentTypeHandlers,t=this.props,n=this.customContentInfo,r=hi(t.content,t.hookProps),i=null;if(void 0===r&&(r=hi(t.defaultContent,t.hookProps)),void 0!==r){if(n)n.contentVal=r[n.contentKey];else if("object"==typeof r)for(var o in e)if(void 0!==r[o]){n=this.customContentInfo={contentKey:o,contentVal:r[o],handler:e[o]()};break}i=n?[]:r}return i},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.handler(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(Br),ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t}(Br);function ci(){var e,t,n=[];return function(r,i){return t&&je(t,i)&&r===e||(e=r,t=i,n=di(r,i)),n}}function di(e,t){return"function"==typeof e&&(e=e(t)),Pt(e)}function hi(e,t){return"function"==typeof e?e(t,Lr):e}var pi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},i=this.normalizeClassNames(n.viewClassNames,r);return Lr(ui,{hookProps:r,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount,elRef:e.elRef},(function(t){return e.children(t,["fc-"+e.viewSpec.type+"-view","fc-view"].concat(i))}))},t}(Br);function fi(e){return Re(e,mi)}function mi(e){var t,n="function"==typeof e?{component:e}:e,i=n.component;return n.content&&(t=n,i=function(e){return Lr(Yr.Consumer,null,(function(n){return Lr(pi,{viewSpec:n.viewSpec},(function(i,o){var s=r(r({},e),{nextDayThreshold:n.options.nextDayThreshold});return Lr(oi,{hookProps:s,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:i},(function(e,t,n,r){return Lr("div",{className:o.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:i,rawOptions:n}}function gi(e,t,n,i){var o=fi(e),s=fi(t.views);return Re(function(e,t){var n,r={};for(n in e)ii(n,r,e,t);for(n in t)ii(n,r,e,t);return r}(o,s),(function(e){return function(e,t,n,i,o){var s=e.overrides.duration||e.defaults.duration||i.duration||n.duration,a=null,l="",u="",c={};if(s&&(a=function(e){var t=JSON.stringify(e),n=vi[t];return void 0===n&&(n=$e(e),vi[t]=n),n}(s))){var d=et(a);l=d.unit,1===d.value&&(u=l,c=t[l]?t[l].rawOptions:{})}var h=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[u]?n[u]:void 0};return{type:e.type,component:e.component,duration:a,durationUnit:l,singleUnit:u,optionDefaults:e.defaults,optionOverrides:r(r({},c),e.overrides),buttonTextOverride:h(i)||h(n)||e.overrides.buttonText,buttonTextDefault:h(o)||e.defaults.buttonText||h(xt)||e.type}}(e,s,t,n,i)}))}var vi={},yi=function(){function e(e){this.props=e,this.nowDate=Fn(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,i,o,s,a,l,u,c,d=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(u=e,e=null!=(c=r).start&&u<c.start?c.start:null!=c.end&&u>=c.end?new Date(c.end.valueOf()-1):u),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),s=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),a=s=this.trimHiddenDays(s),d.showNonCurrentDates||(a=tn(a,i.range)),a=tn(a=this.adjustActiveRange(a),r),l=rn(i.range,r),{validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:a,renderRange:s,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,i=null,o=null,s=null;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(e,t,i,o)):(n=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=et(i=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}},e.prototype.getFallbackDuration=function(){return $e({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,i=t.slotMinTime,o=t.slotMaxTime,s=e.start,a=e.end;return r&&(Xe(i)<0&&(s=xe(s),s=n.add(s,i)),Xe(o)>1&&(a=me(a=xe(a),-1),a=n.add(a,o))),{start:s,end:a}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,s,a=this.props,l=a.dateEnv,u=a.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&Je(c)<Je(n)?et(c).unit:r}function d(){i=l.startOf(e,u),o=l.add(i,n),s={start:i,end:o}}return Xe(n)<=1&&this.isHiddenDay(i)&&(i=xe(i=this.skipHiddenDays(i,t))),d(),this.trimHiddenDays(s)||(e=this.skipHiddenDays(e,t),d()),s},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,i=this.props,o=i.dateEnv,s=i.dateAlignment,a=0,l=e;s&&(l=o.startOf(l,s)),l=xe(l),r=l=this.skipHiddenDays(l,t);do{r=me(r,1),this.isHiddenDay(r)||a++}while(a<n);return{start:l,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.props,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return!i||null!=i.start&&null!=i.end?i:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t;return this.props.dateIncrement||((t=this.props.dateAlignment)?$e(1,t):e||$e({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,i=null,o=null,n.start&&(i=r.createMarker(n.start)),n.end&&(o=r.createMarker(n.end)),i||o?i&&o&&o<i?null:{start:i,end:o}:null);return t&&(t=Zt(t)),t}var n,r,i,o;return null},e.prototype.initHiddenDays=function(){var e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==t.indexOf(e))||r++;if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=me(e,t);return e},e}();function _i(e){var t=0;for(var n in e)e[n].isFetching&&t++;return t}function bi(e,t,n,i){for(var o={},s=0,a=t;s<a.length;s++){var l=a[s];o[l.sourceId]=l}return n&&(o=wi(o,n,i)),r(r({},e),o)}function wi(e,t,n){return xi(e,Ne(e,(function(e){return function(e,t,n){return Ti(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n)})),t,n)}function xi(e,t,n,r){var i={};for(var o in e){var s=e[o];t[o]?i[o]=ki(s,n,r):i[o]=s}return i}function ki(e,t,n){var i=n.options,o=n.calendarApi,s=n.pluginHooks.eventSourceDefs[e.sourceDefId],a=J();return s.fetch({eventSource:e,range:t,context:n},(function(r){var s=r.rawEvents;i.eventSourceSuccess&&(s=i.eventSourceSuccess.call(o,s,r.xhr)||s),e.success&&(s=e.success.call(o,s,r.xhr)||s),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:s})}),(function(r){console.warn(r.message,r),i.eventSourceFailure&&i.eventSourceFailure.call(o,r),e.failure&&e.failure(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:r})})),r(r({},e),{isFetching:!0,latestFetchId:a})}function Si(e,t){return Ne(e,(function(e){return Ti(e,t)}))}function Ti(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Ei(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Di(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Ci(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Mi(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ai(e,t,n,r,i){var o=[];return{headerToolbar:e.headerToolbar?Ii(e.headerToolbar,e,t,n,r,i,o):null,footerToolbar:e.footerToolbar?Ii(e.footerToolbar,e,t,n,r,i,o):null,viewsWithButtons:o}}function Ii(e,t,n,r,i,o,s){return Re(e,(function(e){return function(e,t,n,r,i,o,s){var a="rtl"===t.direction,l=t.customButtons||{},u=n.buttonText||{},c=t.buttonText||{};return(e?e.split(" "):[]).map((function(e){return e.split(",").map((function(e){if("title"===e)return{buttonName:e};var t,n=void 0,d=void 0,h=void 0,p=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(h=r.getCustomButtonIconClass(t))||(h=r.getIconClass(e,a))||(p=t.text)):(n=i[e])?(s.push(e),d=function(){o.changeView(e)},(p=n.buttonTextOverride)||(h=r.getIconClass(e,a))||(p=n.buttonTextDefault)):o[e]&&(d=function(){o[e]()},(p=u[e])||(h=r.getIconClass(e,a))||(p=c[e])),{buttonName:e,buttonClick:d,buttonIcon:h,buttonText:p}}))}))}(e,t,n,r,i,o,s)}))}function Li(e,t,n,r,i){var o=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Oi(t)}(t,n):o=Oi(n);var s=new XMLHttpRequest;s.open(e,t,!0),"GET"!==e&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.onload=function(){if(s.status>=200&&s.status<400){var e=!1,t=void 0;try{t=JSON.parse(s.responseText),e=!0}catch(e){}e?r(t,s):i("Failure parsing JSON",s)}else i("Request failed",s)},s.onerror=function(){i("Request failed",s)},s.send(o)}function Oi(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function Ni(e,t){for(var n=Fe(t.getCurrentData().eventSources),r=[],i=0,o=e;i<o.length;i++){for(var s=o[i],a=!1,l=0;l<n.length;l++)if(n[l]._raw===s){n.splice(l,1),a=!0;break}a||r.push(s)}for(var u=0,c=n;u<c.length;u++){var d=c[u];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var h=0,p=r;h<p.length;h++){var f=p[h];t.calendarApi.addEventSource(f)}}var Ri=[ni({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),ni({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;Sr(e.eventSource.meta.bind(null,Tn(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),ni({eventSourceRefiners:{method:String,extraParams:At,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:function(e){return e.url?{url:e.url,method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch:function(e,t,n){var i=e.eventSource.meta,o=function(e,t,n){var i,o,s,a,l=n.dateEnv,u=n.options,c={};return null==(i=e.startParam)&&(i=u.startParam),null==(o=e.endParam)&&(o=u.endParam),null==(s=e.timeZoneParam)&&(s=u.timeZoneParam),a="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},r(c,a),c[i]=l.formatIso(t.start),c[o]=l.formatIso(t.end),"local"!==l.timeZone&&(c[s]=l.timeZone),c}(i,e.range,e.context);Li(i.method,i.url,o,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),ni({recurringTypes:[{parse:function(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){var n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null},r=void 0;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(i=e.endTime,o=e.startTime,r={years:i.years-o.years,months:i.months-o.months,days:i.days-o.days,milliseconds:i.milliseconds-o.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var i,o;return null},expand:function(e,t,n){var r=tn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){for(var i=e?Pe(e):null,o=xe(n.start),s=n.end,a=[];o<s;){var l=void 0;i&&!i[o.getUTCDay()]||(l=t?r.add(o,t):o,a.push(l)),o=me(o,1)}return a}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:At,startTime:$e,endTime:$e,duration:$e,startRecur:At,endRecur:At}}),ni({optionChangeHandlers:{events:function(e,t){Ni([e],t)},eventSources:Ni}}),ni({contentTypeHandlers:{html:function(){return Pi},domNodes:function(){return Fi}},propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",r(r({},Tn(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Hn(e,t))}}})];function Pi(e,t){e.innerHTML=t}function Fi(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!it(n,r)){for(var i=0,o=r;i<o.length;i++){var s=o[i];e.appendChild(s)}n.forEach(Y)}}var ji=function(){function e(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}return e.prototype.request=function(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))},e.prototype.pause=function(e){void 0===e&&(e="");var t=this.pauseDepths;t[e]=(t[e]||0)+1,this.clearTimeout()},e.prototype.resume=function(e,t){void 0===e&&(e="");var n=this.pauseDepths;e in n&&((t||--n[e]<=0)&&delete n[e],this.tryDrain())},e.prototype.isPaused=function(){return Object.keys(this.pauseDepths).length},e.prototype.tryDrain=function(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}},e.prototype.clear=function(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}},e.prototype.clearTimeout=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)},e.prototype.drained=function(){this.drainedOption&&this.drainedOption()},e}(),Yi=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new ji(this.drain.bind(this))}return e.prototype.request=function(e,t){this.queue.push(e),this.delayedRunner.request(t)},e.prototype.pause=function(e){this.delayedRunner.pause(e)},e.prototype.resume=function(e,t){this.delayedRunner.resume(e,t)},e.prototype.drain=function(){for(var e=this.queue;e.length;){for(var t=[],n=void 0;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}},e.prototype.runTask=function(e){this.runTaskOption&&this.runTaskOption(e)},e.prototype.drained=function(e){this.drainedOption&&this.drainedOption(e)},e}();function Vi(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,bt(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=we(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var Hi=function(){function e(e){var t=this;this.computeOptionsData=ot(this._computeOptionsData),this.computeCurrentViewData=ot(this._computeCurrentViewData),this.organizeRawLocales=ot(Zn),this.buildLocale=ot(Xn),this.buildPluginHooks=function(){var e,t=[],n=[];return function(i,o){return e&&it(i,t)&&it(o,n)||(e=function(e,t){var n={},i={reducers:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],eventResizeJoinTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,contentTypeHandlers:{},listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(e){for(var t=0,s=e;t<s.length;t++){var a=s[t];n[a.id]||(n[a.id]=!0,o(a.deps),u=a,i={reducers:(l=i).reducers.concat(u.reducers),contextInit:l.contextInit.concat(u.contextInit),eventRefiners:r(r({},l.eventRefiners),u.eventRefiners),eventDefMemberAdders:l.eventDefMemberAdders.concat(u.eventDefMemberAdders),eventSourceRefiners:r(r({},l.eventSourceRefiners),u.eventSourceRefiners),isDraggableTransformers:l.isDraggableTransformers.concat(u.isDraggableTransformers),eventDragMutationMassagers:l.eventDragMutationMassagers.concat(u.eventDragMutationMassagers),eventDefMutationAppliers:l.eventDefMutationAppliers.concat(u.eventDefMutationAppliers),dateSelectionTransformers:l.dateSelectionTransformers.concat(u.dateSelectionTransformers),datePointTransforms:l.datePointTransforms.concat(u.datePointTransforms),dateSpanTransforms:l.dateSpanTransforms.concat(u.dateSpanTransforms),views:r(r({},l.views),u.views),viewPropsTransformers:l.viewPropsTransformers.concat(u.viewPropsTransformers),isPropsValid:u.isPropsValid||l.isPropsValid,externalDefTransforms:l.externalDefTransforms.concat(u.externalDefTransforms),eventResizeJoinTransforms:l.eventResizeJoinTransforms.concat(u.eventResizeJoinTransforms),viewContainerAppends:l.viewContainerAppends.concat(u.viewContainerAppends),eventDropTransformers:l.eventDropTransformers.concat(u.eventDropTransformers),calendarInteractions:l.calendarInteractions.concat(u.calendarInteractions),componentInteractions:l.componentInteractions.concat(u.componentInteractions),themeClasses:r(r({},l.themeClasses),u.themeClasses),eventSourceDefs:l.eventSourceDefs.concat(u.eventSourceDefs),cmdFormatter:u.cmdFormatter||l.cmdFormatter,recurringTypes:l.recurringTypes.concat(u.recurringTypes),namedTimeZonedImpl:u.namedTimeZonedImpl||l.namedTimeZonedImpl,initialView:l.initialView||u.initialView,elementDraggingImpl:l.elementDraggingImpl||u.elementDraggingImpl,optionChangeHandlers:r(r({},l.optionChangeHandlers),u.optionChangeHandlers),scrollGridImpl:u.scrollGridImpl||l.scrollGridImpl,contentTypeHandlers:r(r({},l.contentTypeHandlers),u.contentTypeHandlers),listenerRefiners:r(r({},l.listenerRefiners),u.listenerRefiners),optionRefiners:r(r({},l.optionRefiners),u.optionRefiners),propSetHandlers:r(r({},l.propSetHandlers),u.propSetHandlers)})}var l,u}return e&&o(e),o(t),i}(i,o)),t=i,n=o,e}}(),this.buildDateEnv=ot(Bi),this.buildTheme=ot(Ui),this.parseToolbars=ot(Ai),this.buildViewSpecs=ot(gi),this.buildDateProfileGenerator=st(zi),this.buildViewApi=ot(qi),this.buildViewUiProps=st(Gi),this.buildEventUiBySource=ot(Wi,je),this.buildEventUiBases=ot($i),this.parseContextBusinessHours=st(Ki),this.buildTitle=ot(Vi),this.emitter=new Tr,this.actionRunner=new Yi(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},i=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=i.calendarOptions.initialView||i.pluginHooks.initialView,s=this.computeCurrentViewData(o,i,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);var a,l,u,c=(a=i.calendarOptions,l=i.dateEnv,null!=(u=a.initialDate)?l.createMarker(u):Fn(a.now,l)),d=s.dateProfileGenerator.build(c);sn(d.activeRange,c)||(c=d.currentRange.start);for(var h={dateEnv:i.dateEnv,options:i.calendarOptions,pluginHooks:i.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p=0,f=i.pluginHooks.contextInit;p<f.length;p++)(0,f[p])(h);for(var m=function(e,t,n){var r=t?t.activeRange:null;return bi({},function(e,t){var n=Pn(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(var o=0,s=r;o<s.length;o++){var a=Rn(s[o],t,n);a&&i.push(a)}return i}(e,n),r,n)}(i.calendarOptions,d,h),g={dynamicOptionOverrides:n,currentViewType:o,currentDate:c,dateProfile:d,businessHours:this.parseContextBusinessHours(h),eventSources:m,eventUiBases:{},loadingLevel:_i(m),eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(h).selectionConfig},v=r(r({},h),g),y=0,_=i.pluginHooks.reducers;y<_.length;y++){var b=_[y];r(g,b(null,null,v))}g.loadingLevel&&this.emitter.trigger("loading",!0),this.state=g,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?r(r({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this.props,n=this.state,i=this.emitter,o=function(e,t){var n;return"SET_OPTION"===t.type?r(r({},e),((n={})[t.optionName]=t.rawOptionValue,n)):e}(n.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,o,t.calendarApi),a=function(e,t){return"CHANGE_VIEW_TYPE"===t.type?t.viewType:e}(n.currentViewType,e),l=this.computeCurrentViewData(a,s,t.optionOverrides,o);t.calendarApi.currentDataManager=this,i.setThisContext(t.calendarApi),i.setOptions(l.options);var u={dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},c=n.currentDate,d=n.dateProfile;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(d=l.dateProfileGenerator.build(c)),d=function(e,t,n,r){var i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":if(!e.activeRange||!sn(e.currentRange,t.dateMarker))return r.build(t.dateMarker);break;case"PREV":if((i=r.buildPrev(e,n)).isValid)return i;break;case"NEXT":if((i=r.buildNext(e,n)).isValid)return i}return e}(d,e,c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),l.dateProfileGenerator),sn(d.currentRange,c)||(c=d.currentRange.start);for(var h=function(e,t,n,i){var o,s,a=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return bi(e,t.sources,a,i);case"REMOVE_EVENT_SOURCE":return o=e,s=t.sourceId,Ne(o,(function(e){return e.sourceId!==s}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?wi(e,a,i):e;case"FETCH_EVENT_SOURCES":return xi(e,t.sourceIds?Pe(t.sourceIds):Si(e,i),a,i);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,i){var o,s=e[t];return s&&n===s.latestFetchId?r(r({},e),((o={})[t]=r(r({},s),{isFetching:!1,fetchRange:i}),o)):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}(n.eventSources,e,d,u),p=_i(h),f=function(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){var s=It(function(e,t,n){var r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Wr(e,i)),r&&(e=Wr(e,r)),e}(i,t,o),t,o);return r&&(s=Ue(s,r,o)),Nt($r(e,t.sourceId),s)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=Ue(t,n,r)),Nt(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"MERGE_EVENTS":return Nt(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Ue(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,i={},o={};for(var s in n)t.defs[s]||(i[s]=n[s]);for(var a in r)!t.instances[a]&&i[r[a].defId]&&(o[a]=r[a]);return{defs:i,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return $r(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Rt(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,h,d,u),m=p&&!l.options.progressiveEventRendering&&n.renderableEventStore||f,g=this.buildViewUiProps(u),v=g.eventUiSingleBase,y=g.selectionConfig,_=this.buildEventUiBySource(h),b=this.buildEventUiBases(m.defs,v,_),w=n.loadingLevel||0,x=p,k={dynamicOptionOverrides:o,currentViewType:a,currentDate:c,dateProfile:d,eventSources:h,eventStore:f,renderableEventStore:m,selectionConfig:y,eventUiBases:b,loadingLevel:x,businessHours:this.parseContextBusinessHours(u),dateSelection:Ei(n.dateSelection,e),eventSelection:Di(n.eventSelection,e),eventDrag:Ci(n.eventDrag,e),eventResize:Mi(n.eventResize,e)},S=r(r({},u),k),T=0,E=s.pluginHooks.reducers;T<E.length;T++){var D=E[T];r(k,D(n,e,S))}!w&&x?i.trigger("loading",!0):w&&!x&&i.trigger("loading",!1),this.state=k,t.onAction&&t.onAction(e)},e.prototype.updateData=function(){var e,t,n,i,o,s,a,l,u,c=this.props,d=this.state,h=this.data,p=this.computeOptionsData(c.optionOverrides,d.dynamicOptionOverrides,c.calendarApi),f=this.computeCurrentViewData(d.currentViewType,p,c.optionOverrides,d.dynamicOptionOverrides),m=this.data=r(r(r({viewTitle:this.buildTitle(d.dateProfile,f.options,p.dateEnv),calendarApi:c.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p),f),d),g=p.pluginHooks.optionChangeHandlers,v=h&&h.calendarOptions,y=p.calendarOptions;if(v&&v!==y)for(var _ in v.timeZone!==y.timeZone&&(d.eventSources=m.eventSources=(s=m.eventSources,l=m,u=(a=d.dateProfile)?a.activeRange:null,xi(s,Si(s,l),u,l)),d.eventStore=m.eventStore=(e=m.eventStore,t=h.dateEnv,n=m.dateEnv,i=e.defs,o=Re(e.instances,(function(e){var o=i[e.defId];return o.allDay||o.recurringDef?e:r(r({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})})),{defs:i,instances:o})),g)v[_]!==y[_]&&g[_](y[_],m);c.onData&&c.onData(m)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),i=r.refinedOptions,o=r.pluginHooks,s=r.localeDefaults,a=r.availableLocaleData;Zi(r.extra);var l=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,o,a,i.defaultRangeSeparator),u=this.buildViewSpecs(o.views,e,t,s),c=this.buildTheme(i,o);return{calendarOptions:i,pluginHooks:o,dateEnv:l,viewSpecs:u,theme:c,toolbarConfig:this.parseToolbars(i,e,c,u,n),localeDefaults:s,availableRawLocales:a.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=Ct([xt,e,t]),i=n.locales,o=n.locale,s=this.organizeRawLocales(i),a=s.map,l=this.buildLocale(o||s.defaultCode,a).options,u=this.buildPluginHooks(e.plugins||[],Ri),c=this.currentCalendarOptionsRefiners=r(r(r(r(r({},wt),kt),St),u.listenerRefiners),u.optionRefiners),d={},h=Ct([xt,l,e,t]),p={},f=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,g=!1;for(var v in h)"plugins"!==v&&(h[v]===f[v]||Tt[v]&&v in f&&Tt[v](f[v],h[v])?p[v]=m[v]:c[v]?(p[v]=c[v](h[v]),g=!0):d[v]=f[v]);return g&&(this.currentCalendarOptionsInput=h,this.currentCalendarOptionsRefined=p),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:u,availableLocaleData:s,localeDefaults:l,extra:d}},e.prototype._computeCurrentViewData=function(e,t,n,r){var i=t.viewSpecs[e];if(!i)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var o=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r),s=o.refinedOptions;return Zi(o.extra),{viewSpec:i,options:s,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,nowInput:s.now,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,monthMode:s.monthMode,fixedWeekCount:s.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,i,o){var s=Ct([xt,e.optionDefaults,n,i,e.optionOverrides,o]),a=r(r(r(r(r(r({},wt),kt),St),Dt),t.listenerRefiners),t.optionRefiners),l={},u=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,h={};for(var p in s)s[p]===u[p]?l[p]=c[p]:(s[p]===this.currentCalendarOptionsInput[p]?p in this.currentCalendarOptionsRefined&&(l[p]=this.currentCalendarOptionsRefined[p]):a[p]?l[p]=a[p](s[p]):h[p]=s[p],d=!0);return d&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:h}},e}();function Bi(e,t,n,r,i,o,s,a){var l=Xn(t||s.defaultCode,s.map);return new $n({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:o.cmdFormatter,defaultSeparator:a})}function Ui(e,t){return new(t.themeClasses[e.themeSystem]||ri)(e)}function zi(e){return new(e.dateProfileGeneratorClass||yi)(e)}function qi(e,t,n){return new On(e,t,n)}function Wi(e){return Re(e,(function(e){return e.ui}))}function $i(e,t,n){var r={"":t};for(var i in e){var o=e[i];o.sourceId&&n[o.sourceId]&&(r[i]=n[o.sourceId])}return r}function Gi(e){var t=e.options;return{eventUiSingleBase:jt({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:jt({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function Ki(e){return nr(e.options.businessHours,e)}function Zi(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var Xi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleData=function(e){n.dataManager?n.setState(e):n.state=e},n.dataManager=new Hi({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return n(t,e),t.prototype.render=function(){return this.props.children(this.state)},t.prototype.componentDidUpdate=function(e){var t=this.props.optionOverrides;t!==e.optionOverrides&&this.dataManager.resetOptions(t)},t}(Ir),Ji=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();function Qi(e){var t;return(t={})[e.component.uid]=e,t}var eo={},to=function(){function e(e,t){this.emitter=new Tr}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),no={},ro={startTime:$e,duration:$e,create:Boolean,sourceId:String};function io(e){var t=Mt(e,ro),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,i=n.extraClassName,o=!1,s=r.center;return r.left?(o=!0,e=r.left):e=r.start,r.right?(o=!0,t=r.right):t=r.end,Lr("div",{className:[i||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Lr(so,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(Br),so=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Lr.apply(void 0,i(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,o=[],s=!0,a=0,l=e;a<l.length;a++){var u=l[a],c=u.buttonName,d=u.buttonClick,h=u.buttonText,p=u.buttonIcon;if("title"===c)s=!1,o.push(Lr("h2",{className:"fc-toolbar-title"},t.title));else{var f=p?{"aria-label":c}:{},m=["fc-"+c+"-button",n.getClass("button")];c===t.activeButton&&m.push(n.getClass("buttonActive"));var g=!t.isTodayEnabled&&"today"===c||!t.isPrevEnabled&&"prev"===c||!t.isNextEnabled&&"next"===c;o.push(Lr("button",r({disabled:g,className:m.join(" "),onClick:d,type:"button"},f),h||(p?Lr("span",{className:p}):"")))}}if(o.length>1){var v=s&&n.getClass("buttonGroup")||"";return Lr.apply(void 0,i(["div",{className:v}],o))}return o[0]},t}(Br),ao=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,qr(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",o="";return n?null!==t.availableWidth?i=t.availableWidth/n:o=1/n*100+"%":i=e.height||"",Lr("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:i,paddingBottom:o}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(Br),lo=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=cn(t);if(o&&r.isValidSegDownEl(e.target)){var s=V(e.target,".fc-event-forced-url"),a=s?s.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:t,event:new Yn(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:i.viewApi}),a&&!e.defaultPrevented&&(window.location.href=a)}},n.destroy=G(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(Ji),uo=function(e){function t(t){var n,r,i,o,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){cn(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,".fc-event",r=s.handleSegEnter,i=s.handleSegLeave,G(n,"mouseover",".fc-event",(function(e,t){if(t!==o){o=t,r(e,t);var n=function(e){o=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return n(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=r.context,o=cn(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Yn(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})},t}(Ji),co=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=ot(Vr),t.buildViewPropTransformers=ot(po),t.buildToolbarProps=ot(ho),t.handleNavLinkClick=$("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Nr(),t.footerRef=Nr(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter}}(e,n),i=[lo,uo].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=i,eo[e.uid]=r},t.unregisterInteractiveComponent=function(e){for(var n=0,r=t.interactionsStore[e.uid];n<r.length;n++)r[n].destroy();delete t.interactionsStore[e.uid],delete eo[e.uid]},t.resizeRunner=new ji((function(){t.props.emitter.trigger("_resize",!0),t.props.emitter.trigger("windowResize",{view:t.props.viewApi})})),t.handleWindowResize=function(e){var n=t.props.options;n.handleWindowResize&&e.target===window&&t.resizeRunner.request(n.windowResizeDelay)},t}return n(t,e),t.prototype.render=function(){var e,t=this.props,n=t.toolbarConfig,i=t.options,o=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Fn(t.options.now,t.dateEnv),t.viewTitle),s=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=i.height?s=!0:null!=i.contentHeight?a=i.contentHeight:e=Math.max(i.aspectRatio,.5);var l=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent);return Lr(Yr.Provider,{value:l},n.headerToolbar&&Lr(oo,r({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},o)),Lr(ao,{liquid:s,height:a,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&Lr(oo,r({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footerToolbar},o)))},t.prototype.componentDidMount=function(){var e=this.props;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((function(t){return new t(e)})),window.addEventListener("resize",this.handleWindowResize);var t=e.pluginHooks.propSetHandlers;for(var n in t)t[n](e[n],e)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.pluginHooks.propSetHandlers;for(var r in n)t[r]!==e[r]&&n[r](t[r],t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(var e=0,t=this.calendarInteractions;e<t.length;e++)t[e].destroy();this.props.emitter.trigger("_unmount")},t.prototype._handleNavLinkClick=function(e,t){var n=this.props,r=n.dateEnv,i=n.options,o=n.calendarApi,s=t.getAttribute("data-navlink");s=s?JSON.parse(s):{};var a=r.createMarker(s.date),l=s.type,u="day"===l?i.navLinkDayClick:"week"===l?i.navLinkWeekClick:null;"function"==typeof u?u.call(o,r.toDate(a),e):("string"==typeof u&&(l=u),o.zoomTo(a,l))},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return Lr.apply(void 0,i([Rr,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,i={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},o=0,s=this.buildViewPropTransformers(t.viewPropsTransformers);o<s.length;o++){var a=s[o];r(i,a.transform(i,e))}var l=n.component;return Lr(l,r({},i))},t}(Hr);function ho(e,t,n,r,i,o){var s=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:o,activeButton:e.type,isTodayEnabled:s.isValid&&!sn(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function po(e){return e.map((function(e){return new e}))}var fo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={forPrint:!1},t.handleBeforePrint=function(){t.setState({forPrint:!0})},t.handleAfterPrint=function(){t.setState({forPrint:!1})},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.options,n=this.state.forPrint,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,o=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return lr()||o.push("fc-liquid-hack"),e.children(o,i,r,n)},t.prototype.componentDidMount=function(){var e=this.props.emitter;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)},t.prototype.componentWillUnmount=function(){var e=this.props.emitter;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)},t}(Br);function mo(e,t){return bt(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var go="fc-col-header-cell",vo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,i=e.theme,o=e.viewApi,s=this.props,a=s.date,l=s.dateProfile,u=hr(a,s.todayRange,null,l),c=[go].concat(pr(u,i)),d=t.format(a,s.dayHeaderFormat),h=n.navLinks&&!u.isDisabled&&s.colCnt>1?{"data-navlink":fr(a),tabIndex:0}:{},p=r(r(r({date:t.toDate(a),view:o},s.extraHookProps),{text:d}),u);return Lr(oi,{hookProps:p,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:_o,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,i){return Lr("th",r({ref:e,className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:tt(a),colSpan:s.colSpan},s.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Lr("a",r({ref:n,className:["fc-col-header-cell-cushion",s.isSticky?"fc-sticky":""].join(" ")},h),i)))}))},t}(Br),yo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,i=t.theme,o=t.viewApi,s=t.options,a=me(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[go].concat(pr(l,i),e.extraClassNames||[]),c=n.format(a,e.dayHeaderFormat),d=r(r(r(r({date:a},l),{view:o}),e.extraHookProps),{text:c});return Lr(oi,{hookProps:d,classNames:s.dayHeaderClassNames,content:s.dayHeaderContent,defaultContent:_o,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},(function(t,n,i,o){return Lr("th",r({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},Lr("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},o)))}))},t}(Br);function _o(e){return e.text}var bo=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Fn(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=ge(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,$e(1,e.unit)),o=i.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:wo(r)},nextState:{nowDate:i,todayRange:wo(i)},waitMs:o}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=Yr,t}(Ir);function wo(e){var t=xe(e);return{start:t,end:me(t,1)}}var xo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=ot(ko),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,i=t.datesRepDistinctDays,o=t.renderIntro,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return Lr(bo,{unit:"day"},(function(e,t){return Lr("tr",null,o&&o(),n.map((function(e){return i?Lr(vo,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:s}):Lr(yo,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s})})))}))},t}(Br);function ko(e,t,n){return e||mo(t,n)}var So=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],s=-1;n<r;)t.isHiddenDay(n)?i.push(s+.5):(s++,i.push(s),o.push(n)),n=me(n,1);this.dates=o,this.indices=i,this.cnt=o.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(me(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(i=Math.floor(i))?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(ye(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),To=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;n<o.length&&o[n].getUTCDay()!==r;n++);i=Math.ceil(o.length/n)}else i=1,n=o.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}return e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t++){for(var n=[],r=0;r<this.colCnt;r++)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){var n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t++)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var i=n.firstIndex,o=n.lastIndex,s=i;s<=o;){var a=Math.floor(s/t),l=Math.min((a+1)*t,o+1);r.push({row:a,firstCol:s%t,lastCol:(l-1)%t,isStart:n.isStart&&s===i,isEnd:n.isEnd&&l-1===o}),s=l}return r},e}(),Eo=function(){function e(){this.sliceBusinessHours=ot(this._sliceBusinessHours),this.sliceDateSelection=ot(this._sliceDateSpan),this.sliceEventStore=ot(this._sliceEventStore),this.sliceEventDrag=ot(this._sliceInteraction),this.sliceEventResize=ot(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];var a=e.eventUiBases,l=this.sliceEventStore.apply(this,i([e.eventStore,a,t,n],o));return{dateSelectionSegs:this.sliceDateSelection.apply(this,i([e.dateSelection,a,r],o)),businessHourSegs:this.sliceBusinessHours.apply(this,i([e.businessHours,t,n,r],o)),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag.apply(this,i([e.eventDrag,a,t,n],o)),eventResize:this.sliceEventResize.apply(this,i([e.eventResize,a,t,n],o)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,i([{range:{start:e,end:ge(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];return e?this._sliceEventStore.apply(this,i([Ue(e,Do(t,Boolean(n)),r),{},t,n],o)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(e){var s=an(e,t,Do(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(!e)return null;var s=an(e.mutatedEvents,t,Do(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];if(!e)return[];for(var s=function(e,t,n){var r=Wt({editable:!1},n),i=Gt(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:hn(i,t),instance:Ie(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e,t,n),a=this.sliceRange.apply(this,i([e.range],r)),l=0,u=a;l<u.length;l++){u[l].eventRange=s}return a},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.sliceEventRange(o,t))}return n},e.prototype.sliceEventRange=function(e,t){var n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:me(n.start,1)});for(var r=this.sliceRange.apply(this,i([n],t)),o=0,s=r;o<s.length;o++){var a=s[o];a.eventRange=e,a.isStart=e.isStart&&a.isStart,a.isEnd=e.isEnd&&a.isEnd}return r},e}();function Do(e,t){var n=e.activeRange;return t?n:{start:ge(n.start,e.slotMinTime.milliseconds),end:ge(n.end,e.slotMaxTime.milliseconds-864e5)}}var Co=/^(visible|hidden)$/,Mo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.liquid,n=e.liquidIsAbsolute,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),Lr("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)},t.prototype.needsXScrolling=function(){if(Co.test(this.props.overflowX))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().width>t)return!0;return!1},t.prototype.needsYScrolling=function(){if(Co.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().height>t)return!0;return!1},t.prototype.getXScrollbarWidth=function(){return Co.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Co.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(Br),Ao=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,i=r.depths,o=r.currentMap,s=!1,a=!1;null!==e?(s=n in o,o[n]=e,i[n]=(i[n]||0)+1,a=!0):0==--i[n]&&(delete o[n],delete t.callbackMap[n],s=!0),t.masterCallback&&(s&&t.masterCallback(null,String(n)),a&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Be(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Fe(this.currentMap)},e}();function Io(e){for(var t=0,n=0,r=B(e,".fc-scrollgrid-shrink");n<r.length;n++){var i=r[n];t=Math.max(t,he(i))}return Math.ceil(t)}function Lo(e,t){return e.liquid&&t.liquid}function Oo(e,t){return null!=t.maxHeight||Lo(e,t)}function No(e,t,n){var r=n.expandRows;return"function"==typeof t.content?t.content(n):Lr("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,Lr("tbody",{},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function Ro(e,t){return it(e,t,je)}function Po(e,t){for(var n=[],r=0,o=e;r<o.length;r++)for(var s=o[r],a=s.span||1,l=0;l<a;l++)n.push(Lr("col",{style:{width:"shrink"===s.width?Fo(t):s.width||"",minWidth:s.minWidth||""}}));return Lr.apply(void 0,i(["colgroup",{}],n))}function Fo(e){return null==e?4:e}function jo(e){for(var t=0,n=e;t<n.length;t++)if("shrink"===n[t].width)return!0;return!1}function Yo(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Vo(e,t){var n=["fc-scrollgrid-section","fc-scrollgrid-section-"+e.type,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function Ho(e){return Lr("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Bo(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Uo(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=ot((function(e){return e}),Ro),t.renderMicroColGroup=ot(Po),t.scrollerRefs=new Ao,t.scrollerElRefs=new Ao(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.setState(r({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return n(t,e),t.prototype.render=function(){for(var e,t=this.props,n=this.state,r=this.context,o=t.sections||[],s=this.processCols(t.cols),a=this.renderMicroColGroup(s,n.shrinkWidth),l=Yo(t.liquid,r),u=o.length,c=0,d=[],h=[],p=[];c<u&&"header"===(e=o[c]).type;)d.push(this.renderSection(e,c,a)),c++;for(;c<u&&"body"===(e=o[c]).type;)h.push(this.renderSection(e,c,a)),c++;for(;c<u&&"footer"===(e=o[c]).type;)p.push(this.renderSection(e,c,a)),c++;var f=!lr();return Lr("table",{className:l.join(" "),style:{height:t.height}},Boolean(!f&&d.length)&&Lr.apply(void 0,i(["thead",{}],d)),Boolean(!f&&h.length)&&Lr.apply(void 0,i(["tbody",{}],h)),Boolean(!f&&p.length)&&Lr.apply(void 0,i(["tfoot",{}],p)),f&&Lr.apply(void 0,i(["tbody",{}],d,h,p)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?Lr(Rr,{key:e.key},e.outerContent):Lr("tr",{key:e.key,className:Vo(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,n,e.chunk))},t.prototype.renderChunkTd=function(e,t,n,r){if("outerContent"in r)return r.outerContent;var i=this.props,o=this.state,s=o.forceYScrollbars,a=o.scrollerClientWidths,l=o.scrollerClientHeights,u=Oo(i,e),c=Lo(i,e),d=i.liquid?s?"scroll":u?"auto":"hidden":"visible",h=No(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:void 0!==a[t]?a[t]:null,clientHeight:void 0!==l[t]?l[t]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}});return Lr("td",{ref:r.elRef},Lr("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},Lr(Mo,{ref:this.scrollerRefs.createRef(t),elRef:this.scrollerElRefs.createRef(t),overflowY:d,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},h)))},t.prototype._handleScrollerEl=function(e,t){var n=parseInt(t,10);qr(this.props.sections[n].chunk.scrollerElRef,e)},t.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},t.prototype.componentDidUpdate=function(){this.handleSizing()},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},t.prototype.computeShrinkWidth=function(){return jo(this.props.cols)?Io(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){for(var e=yr(),t=this.props.sections.length,n=this.scrollerRefs,r=this.scrollerElRefs,i=!1,o={},s={},a=0;a<t;a++){var l=n.currentMap[a];if(l&&l.needsYScrolling()){i=!0;break}}for(a=0;a<t;a++){var u=r.currentMap[a];if(u){var c=u.parentNode;o[a]=Math.floor(c.getBoundingClientRect().width-(i?e.y:0)),s[a]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:o,scrollerClientHeights:s}},t}(Br);zo.addStateEquality({scrollerClientWidths:je,scrollerClientHeights:je});var qo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,i=r.eventRange,o=i.ui,s={event:new Yn(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&mn(r,t),isStartResizable:!e.disableResizing&&gn(r,t),isEndResizable:!e.disableResizing&&vn(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)},a=bn(s).concat(o.classNames);return Lr(oi,{hookProps:s,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,i){return e.children(t,a.concat(n),r,i,s)}))},t.prototype.componentDidMount=function(){un(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&un(this.elRef.current,t)},t}(Br),Wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,i=t.options.eventTimeFormat||e.defaultTimeFormat,o=yn(n,i,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Lr(qo,{seg:n,timeText:o,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||$o,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,i,o,s,a){return Lr("a",r({className:e.extraClassNames.concat(i).join(" "),style:{borderColor:a.borderColor,backgroundColor:a.backgroundColor},ref:t},function(e){var t=e.eventRange.def.url;return t?{href:t}:{}}(n)),Lr("div",{className:"fc-event-main",ref:o,style:{color:a.textColor}},s),a.isStartResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-start"}),a.isEndResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(Br);function $o(e){return Lr("div",{className:"fc-event-main-frame"},e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title-container"},Lr("div",{className:"fc-event-title fc-sticky"},e.event.title||Lr(Rr,null,"\xa0"))))}var Go=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return Lr(oi,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},Ko=bt({day:"numeric"}),Zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=st(Jo),t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=this.refineHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv}),i=pr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),o=r.isDisabled?{}:{"data-date":tt(e.date)};return Lr(ui,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,i,o,r.isDisabled)}))},t}(Br),Xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=Jo({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return Lr(ai,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(Br);function Jo(e){var t=e.date,n=e.dateEnv,i=hr(t,e.todayRange,null,e.dateProfile);return r(r(r({date:n.toDate(t),view:e.viewApi},i),{dayNumberText:e.showDayNumber?n.format(t,Ko):""}),e.extraProps)}function Qo(e){return Lr("div",{className:"fc-"+e})}var es=function(e){return Lr(qo,{defaultContent:ts,seg:e.seg,timeText:"",disableDragging:!0,disableResizing:!0,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(e,t,n,r,i){return Lr("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:i.backgroundColor}},r)}))};function ts(e){return e.event.title&&Lr("div",{className:"fc-event-title"},e.event.title)}var ns=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,i=e.date,o=r.weekNumberFormat||e.defaultFormat,s=n.computeWeekNumber(i),a=n.format(i,o);return Lr(oi,{hookProps:{num:s,text:a,date:i},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:rs,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function rs(e){return e.text}var is=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this)||this;return i.isRendering=!1,i.isRendered=!1,i.currentClassNames=[],i.customContentRenderId=0,i.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":i.renderRunner.tryDrain()}},i.handleData=function(e){i.currentData=e,i.renderRunner.request(e.calendarOptions.rerenderDelay)},i.handleRenderRequest=function(){if(i.isRendering){i.isRendered=!0;var e=i.currentData;Or(Lr(fo,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,o,s){return i.setClassNames(t),i.setHeight(n),Lr(si.Provider,{value:i.customContentRenderId},Lr(co,r({isHeightAuto:o,forPrint:s},e)))})),i.el)}else i.isRendered&&(i.isRendered=!1,Or(null,i.el),i.setClassNames([]),i.setHeight(""));Fr()},i.el=t,i.renderRunner=new ji(i.handleRenderRequest),new Hi({optionOverrides:n,calendarApi:i,onAction:i.handleAction,onData:i.handleData}),i}return n(t,e),Object.defineProperty(t.prototype,"view",{get:function(){return this.currentData.viewApi},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.isRendering;e?this.customContentRenderId++:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()},t.prototype.destroy=function(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())},t.prototype.updateSize=function(){e.prototype.updateSize.call(this),Fr()},t.prototype.batchRendering=function(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")},t.prototype.pauseRendering=function(){this.renderRunner.pause("pauseRendering")},t.prototype.resumeRendering=function(){this.renderRunner.resume("pauseRendering",!0)},t.prototype.resetOptions=function(e,t){this.currentDataManager.resetOptions(e,t)},t.prototype.setClassNames=function(e){if(!it(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n<r.length;n++){var i=r[n];t.remove(i)}for(var o=0,s=e;o<s.length;o++)i=s[o],t.add(i);this.currentClassNames=e}},t.prototype.setHeight=function(e){q(this.el,"height",e)},t}(jn);no.touchMouseIgnoreWait=500;var os=0,ss=0,as=!1,ls=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,os++,setTimeout((function(){os--}),no.touchMouseIgnoreWait)}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new Tr,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),ss++||window.addEventListener("touchmove",us,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),--ss||window.removeEventListener("touchmove",us,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!V(n,this.handleSelector)||(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,0))},e.prototype.cleanup=function(){as=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?V(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return os||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(as=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,i=e.touches,o=0,s=0;return i&&i.length?(n=i[0].pageX,r=i[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(o=n-this.origPageX,s=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:o,deltaY:s}},e}();function us(e){as&&e.preventDefault()}var cs=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",z(n,{left:r.left,top:r.top}),Z(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Y(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&z(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),z(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),ds=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return n(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(Dr),hs=function(e){function t(t,n){return e.call(this,new Cr(t),n)||this}return n(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return wr(this.scrollController.el)},t}(ds),ps=function(e){function t(t){return e.call(this,new Mr,t)||this}return n(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(ds),fs="function"==typeof performance?performance.now:Date.now,ms=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=fs();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t){this.isEnabled&&(this.scrollCaches=this.buildCaches(),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,i=null===this.pointerScreenY?0:r-this.pointerScreenY,o=null===this.pointerScreenX?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(fs()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy();this.scrollCaches=null}},e.prototype.requestAnimation=function(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)},e.prototype.handleSide=function(e,t){var n=e.scrollCache,r=this.edgeThreshold,i=r-e.distance,o=i*i/(r*r)*this.maxVelocity*t,s=1;switch(e.name){case"left":s=-1;case"right":n.setScrollLeft(n.getScrollLeft()+o*s);break;case"top":s=-1;case"bottom":n.setScrollTop(n.getScrollTop()+o*s)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i],a=s.clientRect,l=e-a.left,u=a.right-e,c=t-a.top,d=a.bottom-t;l>=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&s.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:s,name:"top",distance:c}),d<=n&&this.everMovedDown&&s.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:s,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&s.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:s,name:"left",distance:l}),u<=n&&this.everMovedRight&&s.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:s,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new ps(!1):new hs(e,!1)}))},e.prototype.queryScrollEls=function(){for(var e=[],t=0,n=this.scrollQuery;t<n.length;t++){var r=n[t];"object"==typeof r?e.push(r):e.push.apply(e,Array.prototype.slice.call(document.querySelectorAll(r)))}return e},e}(),gs=function(e){function t(t,n){var r=e.call(this,t)||this;r.delay=null,r.minDistance=0,r.touchScrollAllowed=!0,r.mirrorNeedsRevert=!1,r.isInteracting=!1,r.isDragging=!1,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,r.delayTimeoutId=null,r.onPointerDown=function(e){r.isDragging||(r.isInteracting=!0,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,te(document.body),re(document.body),e.isTouch||e.origEvent.preventDefault(),r.emitter.trigger("pointerdown",e),r.isInteracting&&!r.pointer.shouldIgnoreMove&&(r.mirror.setIsVisible(!1),r.mirror.start(e.subjectEl,e.pageX,e.pageY),r.startDelay(e),r.minDistance||r.handleDistanceSurpassed(e)))},r.onPointerMove=function(e){if(r.isInteracting){if(r.emitter.trigger("pointermove",e),!r.isDistanceSurpassed){var t=r.minDistance,n=e.deltaX,i=e.deltaY;n*n+i*i>=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,ne(document.body),ie(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var i=r.pointer=new ls(t);return i.emitter.on("pointerdown",r.onPointerDown),i.emitter.on("pointermove",r.onPointerMove),i.emitter.on("pointerup",r.onPointerUp),n&&(i.selector=n),r.mirror=new cs,r.autoScroller=new ms,r}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(to),vs=function(){function e(e){this.origRect=xr(e),this.scrollCaches=kr(e).map((function(e){return new hs(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy()},e.prototype.computeLeft=function(){for(var e=this.origRect.left,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollLeft-r.getScrollLeft()}return e},e.prototype.computeTop=function(){for(var e=this.origRect.top,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollTop-r.getScrollTop()}return e},e.prototype.isWithinClipping=function(e,t){for(var n,r={left:e,top:t},i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i];if(void 0,"HTML"!==(n=s.getEventTarget().tagName)&&"BODY"!==n&&!rr(r,s.clientRect))return!1}return!0},e}(),ys=function(){function e(e,t){var n=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(e){var t=n.dragging;n.initialHit=null,n.movingHit=null,n.finalHit=null,n.prepareHits(),n.processFirstCoord(e),n.initialHit||!n.requireInitial?(t.setIgnoreMove(!1),n.emitter.trigger("pointerdown",e)):t.setIgnoreMove(!0)},this.handleDragStart=function(e){n.emitter.trigger("dragstart",e),n.handleMove(e,!0)},this.handleDragMove=function(e){n.emitter.trigger("dragmove",e),n.handleMove(e)},this.handlePointerUp=function(e){n.releaseHits(),n.emitter.trigger("pointerup",e)},this.handleDragEnd=function(e){n.movingHit&&n.emitter.trigger("hitupdate",null,!0,e),n.finalHit=n.movingHit,n.movingHit=null,n.emitter.trigger("dragend",e)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Tr}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,i=e.subjectEl;i!==document&&(r=or(r,t=xr(i)));var o=this.initialHit=this.queryHitForOffset(r.left,r.top);if(o){if(this.useSubjectCenter&&t){var s=ir(t,o.rect);s&&(r=sr(s))}this.coordAdjust=ar(r,n)}else this.coordAdjust={left:0,top:0}},e.prototype.handleMove=function(e,t){var n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);!t&&_s(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=Re(this.droppableStore,(function(e){return e.component.prepareHits(),new vs(e.el)}))},e.prototype.releaseHits=function(){var e=this.offsetTrackers;for(var t in e)e[t].destroy();this.offsetTrackers={}},e.prototype.queryHitForOffset=function(e,t){var n=this.droppableStore,r=this.offsetTrackers,i=null;for(var o in n){var s=n[o].component,a=r[o];if(a&&a.isWithinClipping(e,t)){var l=a.computeLeft(),u=a.computeTop(),c=e-l,d=t-u,h=a.origRect,p=h.right-h.left,f=h.bottom-h.top;if(c>=0&&c<p&&d>=0&&d<f){var m=s.queryHit(c,d,p,f),g=s.context.getCurrentData().dateProfile;m&&on(g.activeRange,m.dateSpan.range)&&(!i||m.layer>i.layer)&&(m.rect.left+=l,m.rect.right+=l,m.rect.top+=u,m.rect.bottom+=u,i=m)}}}return i},e}();function _s(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&Sn(e.dateSpan,t.dateSpan)}function bs(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.datePointTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,{date:(i=t.dateEnv).toDate(n.range.start),dateStr:i.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay})),o}var ws=function(e){function t(t){var n=e.call(this,t)||this;n.handlePointerDown=function(e){var t=n.dragging,r=e.origEvent.target;t.setIgnoreMove(!n.component.isValidDateDownEl(r))},n.handleDragEnd=function(e){var t=n.component;if(!n.dragging.pointer.wasTouchScroll){var i=n.hitDragging,o=i.initialHit,s=i.finalHit;if(o&&s&&_s(o,s)){var a=t.context,l=r(r({},bs(o.dateSpan,a)),{dayEl:o.dayEl,jsEvent:e.origEvent,view:a.viewApi||a.calendarApi.view});a.emitter.trigger("dateClick",l)}}},n.dragging=new gs(t.el),n.dragging.autoScroller.isEnabled=!1;var i=n.hitDragging=new ys(n.dragging,Qi(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),xs=function(e){function t(t){var n=e.call(this,t)||this;n.dragSelection=null,n.handlePointerDown=function(e){var t=n,r=t.component,i=t.dragging,o=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);i.setIgnoreMove(!o),i.delay=e.isTouch?function(e){var t=e.context.options,n=t.selectLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var i=n.component.context,o=null,s=!1;e&&((o=function(e,t,n){var i=e.dateSpan,o=t.dateSpan,s=[i.range.start,i.range.end,o.range.start,o.range.end];s.sort(ce);for(var a={},l=0,u=n;l<u.length;l++){var c=(0,u[l])(e,t);if(!1===c)return null;c&&r(a,c)}return a.range={start:s[0],end:s[3]},a.allDay=i.allDay,a}(n.hitDragging.initialHit,e,i.pluginHooks.dateSelectionTransformers))&&n.component.isDateSelectionValid(o)||(s=!0,o=null)),o?i.dispatch({type:"SELECT_DATES",selection:o}):t||i.dispatch({type:"UNSELECT_DATES"}),s?Q():ee(),t||(n.dragSelection=o)},n.handlePointerUp=function(e){n.dragSelection&&(Dn(n.dragSelection,e,n.component.context),n.dragSelection=null)};var i=t.component.context.options,o=n.dragging=new gs(t.el);o.touchScrollAllowed=!1,o.minDistance=i.selectMinDistance||0,o.autoScroller.isEnabled=i.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),ks=function(e){function t(n){var i=e.call(this,n)||this;i.subjectEl=null,i.subjectSeg=null,i.isDragging=!1,i.eventRange=null,i.relevantEvents=null,i.receivingContext=null,i.validMutation=null,i.mutatedRelevantEvents=null,i.handlePointerDown=function(e){var t=e.origEvent.target,n=i,r=n.component,o=n.dragging,s=o.mirror,a=r.context.options,l=r.context;i.subjectEl=e.subjectEl;var u=i.subjectSeg=cn(e.subjectEl),c=(i.eventRange=u.eventRange).instance.instanceId;i.relevantEvents=Ot(l.getCurrentData().eventStore,c),o.minDistance=e.isTouch?0:a.eventDragMinDistance,o.delay=e.isTouch&&c!==r.props.eventSelection?function(e){var t=e.context.options,n=t.eventLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null,s.parentNode=V(t,".fc"),s.revertDuration=a.dragRevertDuration;var d=r.isValidSegDownEl(t)&&!V(t,".fc-event-resizer");o.setIgnoreMove(!d),i.isDragging=d&&e.subjectEl.classList.contains("fc-event-draggable")},i.handleDragStart=function(e){var t=i.component.context,n=i.eventRange,r=n.instance.instanceId;e.isTouch?r!==i.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:r}):t.dispatch({type:"UNSELECT_EVENT"}),i.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:i.subjectEl,event:new Yn(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},i.handleHitUpdate=function(e,t){if(i.isDragging){var n=i.relevantEvents,r=i.hitDragging.initialHit,o=i.component.context,s=null,a=null,l=null,u=!1,c={affectedEvents:n,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){var d=e.component,h=(s=d.context).options;o===s||h.editable&&h.droppable?(a=function(e,t,n){var r=e.dateSpan,i=t.dateSpan,o=r.range.start,s=i.range.start,a={};r.allDay!==i.allDay&&(a.allDay=i.allDay,a.hasEnd=t.component.context.options.allDayMaintainDuration,i.allDay&&(o=xe(o)));var l=Jt(o,s,e.component.context.dateEnv,e.component===t.component?e.component.largeUnit:null);l.milliseconds&&(a.allDay=!1);for(var u={datesDelta:l,standardProps:a},c=0,d=n;c<d.length;c++)(0,d[c])(u,e,t);return u}(r,e,s.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=An(n,s.getCurrentData().eventUiBases,a,s),c.mutatedEvents=l,d.isInteractionValid(c)||(u=!0,a=null,l=null,c.mutatedEvents={defs:{},instances:{}})):s=null}i.displayDrag(s,c),u?Q():ee(),t||(o===s&&_s(r,e)&&(a=null),i.dragging.setMirrorNeedsRevert(!a),i.dragging.setMirrorIsVisible(!e||!document.querySelector(".fc-event-mirror")),i.receivingContext=s,i.validMutation=a,i.mutatedRelevantEvents=l)}},i.handlePointerUp=function(){i.isDragging||i.cleanup()},i.handleDragEnd=function(e){if(i.isDragging){var t=i.component.context,n=t.viewApi,o=i,s=o.receivingContext,a=o.validMutation,l=i.eventRange.def,u=i.eventRange.instance,c=new Yn(t,l,u),d=i.relevantEvents,h=i.mutatedRelevantEvents,p=i.hitDragging.finalHit;if(i.clearDrag(),t.emitter.trigger("eventDragStop",{el:i.subjectEl,event:c,jsEvent:e.origEvent,view:n}),a){if(s===t){var f=new Yn(t,h.defs[l.defId],u?h.instances[u.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:h});for(var m={oldEvent:c,event:f,relatedEvents:Hn(h,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}},g={},v=0,y=t.getCurrentData().pluginHooks.eventDropTransformers;v<y.length;v++){var _=y[v];r(g,_(a,t))}t.emitter.trigger("eventDrop",r(r(r({},m),g),{el:e.subjectEl,delta:a.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",m)}else if(s){var b={event:c,relatedEvents:Hn(d,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}};t.emitter.trigger("eventLeave",r(r({},b),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:d}),t.emitter.trigger("eventRemove",b);var w=h.defs[l.defId],x=h.instances[u.instanceId],k=new Yn(s,w,x);s.dispatch({type:"MERGE_EVENTS",eventStore:h});var S={event:k,relatedEvents:Hn(h,s,x),revert:function(){s.dispatch({type:"REMOVE_EVENTS",eventStore:h})}};s.emitter.trigger("eventAdd",S),e.isTouch&&s.dispatch({type:"SELECT_EVENT",eventInstanceId:u.instanceId}),s.emitter.trigger("drop",r(r({},bs(p.dateSpan,s)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:p.component.context.viewApi})),s.emitter.trigger("eventReceive",r(r({},S),{draggedEl:e.subjectEl,view:p.component.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}i.cleanup()};var o=i.component.context.options,s=i.dragging=new gs(n.el);s.pointer.selector=t.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=o.dragScroll;var a=i.hitDragging=new ys(i.dragging,eo);return a.useSubjectCenter=n.useEventCenter,a.emitter.on("pointerdown",i.handlePointerDown),a.emitter.on("dragstart",i.handleDragStart),a.emitter.on("hitupdate",i.handleHitUpdate),a.emitter.on("pointerup",i.handlePointerUp),a.emitter.on("dragend",i.handleDragEnd),i}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.displayDrag=function(e,t){var n=this.component.context,r=this.receivingContext;r&&r!==e&&(r===n?r.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:{defs:{},instances:{}},isEvent:!0}}):r.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},t.prototype.clearDrag=function(){var e=this.component.context,t=this.receivingContext;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})},t.prototype.cleanup=function(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null},t.SELECTOR=".fc-event-draggable, .fc-event-resizable",t}(Ji),Ss=function(e){function t(t){var n=e.call(this,t)||this;n.draggingSegEl=null,n.draggingSeg=null,n.eventRange=null,n.relevantEvents=null,n.validMutation=null,n.mutatedRelevantEvents=null,n.handlePointerDown=function(e){var t=n.component,r=cn(n.querySegEl(e)),i=n.eventRange=r.eventRange;n.dragging.minDistance=t.context.options.eventDragMinDistance,n.dragging.setIgnoreMove(!n.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&n.component.props.eventSelection!==i.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=Ot(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var i=n.querySegEl(e);n.draggingSegEl=i,n.draggingSeg=cn(i),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:i,event:new Yn(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,i){var o=n.component.context,s=n.relevantEvents,a=n.hitDragging.initialHit,l=n.eventRange.instance,u=null,c=null,d=!1,h={affectedEvents:s,mutatedEvents:{defs:{},instances:{}},isEvent:!0};e&&(u=function(e,t,n,i,o){for(var s=e.component.context.dateEnv,a=Jt(e.dateSpan.range.start,t.dateSpan.range.start,s,e.component.largeUnit),l={},u=0,c=o;u<c.length;u++){var d=(0,c[u])(e,t);if(!1===d)return null;d&&r(l,d)}if(n){if(s.add(i.start,a)<i.end)return l.startDelta=a,l}else if(s.add(i.end,a)>i.start)return l.endDelta=a,l;return null}(a,e,i.subjectEl.classList.contains("fc-event-resizer-start"),l.range,o.pluginHooks.eventResizeJoinTransforms)),u&&(c=An(s,o.getCurrentData().eventUiBases,u,o),h.mutatedEvents=c,n.component.isInteractionValid(h)||(d=!0,u=null,c=null,h.mutatedEvents=null)),c?o.dispatch({type:"SET_EVENT_RESIZE",state:h}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),d?Q():ee(),t||(u&&_s(a,e)&&(u=null),n.validMutation=u,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,i=n.eventRange.def,o=n.eventRange.instance,s=new Yn(t,i,o),a=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:s,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new Yn(t,l.defs[i.defId],o?l.instances[o.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:s,event:u,relatedEvents:Hn(l,t,o),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",r(r({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||$e(0),endDelta:n.validMutation.endDelta||$e(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var i=t.component,o=n.dragging=new gs(t.el);o.pointer.selector=".fc-event-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=i.context.options.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return V(e.subjectEl,".fc-event")},t}(Ji),Ts=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=e.origEvent.target;t.matchesCancel=!!V(r,n),t.matchesEvent=!!V(r,ks.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,i=n.getCurrentData();if(!r.wasTouchScroll){if(i.dateSelection&&!t.isRecentPointerDateSelect){var o=n.options.unselectAuto;!o||o&&t.matchesCancel||n.calendarApi.unselect(e)}i.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new ls(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Es={dateClick:At,eventDragStart:At,eventDragStop:At,eventDrop:At,eventResizeStart:At,eventResizeStop:At,eventResize:At,drop:At,eventReceive:At,eventLeave:At},Ds=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,i){var o=n.hitDragging.dragging,s=null,a=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(s=e.component.context,n.canDropElOnCalendar(i.subjectEl,s)&&(a=function(e,t,n){for(var i=r({},t.leftoverProps),o=0,s=n.pluginHooks.externalDefTransforms;o<s.length;o++){var a=s[o];r(i,a(e,t))}var l=Wt(i,n),u=Gt(l.refined,l.extra,t.sourceId,e.allDay,n.options.forceEventDuration||Boolean(t.duration),n),c=e.range.start;e.allDay&&t.startTime&&(c=n.dateEnv.add(c,t.startTime));var d=t.duration?n.dateEnv.add(c,t.duration):Mn(e.allDay,c,n);return{def:u,instance:Ie(u.defId,{start:c,end:d})}}(e.dateSpan,n.dragMeta,s),u.mutatedEvents=Lt(a),(l=!Gr(u,s))&&(u.mutatedEvents={defs:{},instances:{}},a=null))),n.displayDrag(s,u),o.setMirrorIsVisible(t||!a||!document.querySelector(".fc-event-mirror")),l?Q():ee(),t||(o.setMirrorNeedsRevert(!a),n.receivingContext=s,n.droppableEvent=a)},this.handleDragEnd=function(e){var t=n,i=t.receivingContext,o=t.droppableEvent;if(n.clearDrag(),i&&o){var s=n.hitDragging.finalHit,a=s.component.context.viewApi,l=n.dragMeta;if(i.emitter.trigger("drop",r(r({},bs(s.dateSpan,i)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:a})),l.create){var u=Lt(o);i.dispatch({type:"MERGE_EVENTS",eventStore:u}),e.isTouch&&i.dispatch({type:"SELECT_EVENT",eventInstanceId:o.instance.instanceId}),i.emitter.trigger("eventReceive",{event:new Yn(i,o.def,o.instance),relatedEvents:[],revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:u})},draggedEl:e.subjectEl,view:a})}}n.receivingContext=null,n.droppableEvent=null};var i=this.hitDragging=new ys(e,eo);i.requireInitial=!1,i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}return e.prototype.buildDragMeta=function(e){return"object"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta(e)):io((t=function(e,t){var n=no.dataAttrPrefix,r=(n?n+"-":"")+"event";return e.getAttribute("data-"+r)||""}(e))?JSON.parse(t):{create:!1});var t},e.prototype.displayDrag=function(e,t){var n=this.receivingContext;n&&n!==e&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},e.prototype.clearDrag=function(){this.receivingContext&&this.receivingContext.dispatch({type:"UNSET_EVENT_DRAG"})},e.prototype.canDropElOnCalendar=function(e,t){var n=t.options.dropAccept;return"function"==typeof n?n.call(t.calendarApi,e):"string"!=typeof n||!n||Boolean(H(e,n))},e}();no.dataAttrPrefix="";var Cs=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.handlePointerDown=function(e){var t=n.dragging,r=n.settings,i=r.minDistance,o=r.longPressDelay;t.minDistance=null!=i?i:e.isTouch?0:xt.eventDragMinDistance,t.delay=e.isTouch?null!=o?o:xt.longPressDelay:0},this.handleDragStart=function(e){e.isTouch&&n.dragging.delay&&e.subjectEl.classList.contains("fc-event")&&n.dragging.mirror.getMirrorEl().classList.add("fc-event-selected")},this.settings=t;var r=this.dragging=new gs(e);r.touchScrollAllowed=!1,null!=t.itemSelector&&(r.pointer.selector=t.itemSelector),null!=t.appendTo&&(r.mirror.parentNode=t.appendTo),r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Ms=function(e){function t(t){var n=e.call(this,t)||this;n.shouldIgnoreMove=!1,n.mirrorSelector="",n.currentMirrorEl=null,n.handlePointerDown=function(e){n.emitter.trigger("pointerdown",e),n.shouldIgnoreMove||n.emitter.trigger("dragstart",e)},n.handlePointerMove=function(e){n.shouldIgnoreMove||n.emitter.trigger("dragmove",e)},n.handlePointerUp=function(e){n.emitter.trigger("pointerup",e),n.shouldIgnoreMove||n.emitter.trigger("dragend",e)};var r=n.pointer=new ls(t);return r.emitter.on("pointerdown",n.handlePointerDown),r.emitter.on("pointermove",n.handlePointerMove),r.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy()},t.prototype.setIgnoreMove=function(e){this.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){if(e)this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null);else{var t=this.mirrorSelector?document.querySelector(this.mirrorSelector):null;t&&(this.currentMirrorEl=t,t.style.visibility="hidden")}},t}(to),As=function(){function e(e,t){var n=document;e===document||e instanceof Element?(n=e,t=t||{}):t=e||{};var r=this.dragging=new Ms(n);"string"==typeof t.itemSelector?r.pointer.selector=t.itemSelector:n===document&&(r.pointer.selector="[data-event]"),"string"==typeof t.mirrorSelector&&(r.mirrorSelector=t.mirrorSelector),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Is=ni({componentInteractions:[ws,xs,ks,Ss],calendarInteractions:[Ts],elementDraggingImpl:gs,listenerRefiners:Es}),Ls=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Nr(),t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,i=[],o=Bo(r.options);return e&&i.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),Lr(pi,{viewSpec:r.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(zo,{liquid:!n.isHeightAuto&&!n.forPrint,cols:[],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");var o=this.props,s=this.context,a=!o.forPrint&&Bo(s.options),l=!o.forPrint&&Uo(s.options),u=[];return e&&u.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),u.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&u.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Ho}]}),Lr(pi,{viewSpec:s.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(i,{liquid:!o.isHeightAuto&&!o.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:u}))}))},t}(ti);function Os(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.row].push(s)}return n}function Ns(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.firstCol].push(s)}return n}function Rs(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.row].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}var Ps=bt({week:"narrow"}),Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.props;if(n.onMoreClick){var r=n.segsByEachCol,i=r.filter((function(e){return n.segIsHidden[e.eventRange.instance.instanceId]}));n.onMoreClick({date:n.date,allSegs:r,hiddenSegs:i,moreCnt:n.moreCnt,dayEl:t.rootEl,ev:e})}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.viewApi,o=this.props,s=o.date,a=o.dateProfile,l={num:o.moreCnt,text:o.buildMoreLinkText(o.moreCnt),view:i},u=n.navLinks?{"data-navlink":fr(s,"week"),tabIndex:0}:{};return Lr(Zo,{date:s,dateProfile:a,todayRange:o.todayRange,showDayNumber:o.showDayNumber,extraHookProps:o.extraHookProps,elRef:this.handleRootEl},(function(t,i,c,d){return Lr("td",r({ref:t,className:["fc-daygrid-day"].concat(i,o.extraClassNames||[]).join(" ")},c,o.extraDataAttrs),Lr("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:o.innerElRef},o.showWeekNumber&&Lr(ns,{date:s,defaultFormat:Ps},(function(e,t,n,i){return Lr("a",r({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},u),i)})),!d&&Lr(Vs,{date:s,dateProfile:a,showDayNumber:o.showDayNumber,forceDayTop:o.forceDayTop,todayRange:o.todayRange,extraHookProps:o.extraHookProps}),Lr("div",{className:"fc-daygrid-day-events",ref:o.fgContentElRef,style:{paddingBottom:o.fgPaddingBottom}},o.fgContent,Boolean(o.moreCnt)&&Lr("div",{className:"fc-daygrid-day-bottom",style:{marginTop:o.moreMarginTop}},Lr(oi,{hookProps:l,classNames:n.moreLinkClassNames,content:n.moreLinkContent,defaultContent:Ys,didMount:n.moreLinkDidMount,willUnmount:n.moreLinkWillUnmount},(function(t,n,r,i){return Lr("a",{onClick:e.handleMoreLinkClick,ref:t,className:["fc-daygrid-more-link"].concat(n).join(" ")},i)})))),Lr("div",{className:"fc-daygrid-day-bg"},o.bgContent)))}))},t}(ti);function js(e){return e.dayNumberText}function Ys(e){return e.text}var Vs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context.options.navLinks?{"data-navlink":fr(e.date),tabIndex:0}:{};return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:js},(function(n,i){return(i||e.forceDayTop)&&Lr("div",{className:"fc-daygrid-day-top",ref:n},Lr("a",r({className:"fc-daygrid-day-number"},t),i||Lr(Rr,null,"\xa0")))}))},t}(Br),Hs=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Bs(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var Us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||Hs,i=yn(e.seg,n,t,!0,e.defaultDisplayEventEnd);return Lr(qo,{seg:e.seg,timeText:i,defaultContent:zs,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,i,o){return Lr("a",r({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(s=e.seg.eventRange.def.url)?{href:s}:{}),o);var s}))},t}(Br);function zs(e){return Lr(Rr,null,Lr("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title"},e.event.title||Lr(Rr,null,"\xa0")))}var qs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Wo,r({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Hs,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(Br);function Ws(e,t,n,i,o,s,a,l){for(var u=[],c=[],d={},h={},p={},f={},m={},g=0;g<a;g++)u.push([]),c.push(0);for(var v=0,y=t=pn(t,l);v<y.length;v++)E(S=y[v],o[S.eventRange.instance.instanceId+":"+S.firstCol]||0);!0===n||!0===i?function(e,t,n,r){Gs(e,t,n,!0,(function(e){return e.bottom<=r}))}(c,d,u,s):"number"==typeof n?function(e,t,n,r){Gs(e,t,n,!1,(function(e,t){return t<r}))}(c,d,u,n):"number"==typeof i&&function(e,t,n,r){Gs(e,t,n,!0,(function(e,t){return t<r}))}(c,d,u,i);for(var _=0;_<a;_++){for(var b=0,w=0,x=0,k=u[_];x<k.length;x++){var S,T=k[x];d[(S=T.seg).eventRange.instance.instanceId]||(h[S.eventRange.instance.instanceId]=T.top,S.firstCol===S.lastCol&&S.isStart&&S.isEnd?(p[S.eventRange.instance.instanceId]=T.top-b,w=0,b=T.bottom):w+=T.bottom-T.top)}w&&(c[_]?f[_]=w:m[_]=w)}function E(e,t){if(!D(e,t,0))for(var n=e.firstCol;n<=e.lastCol;n++)for(var r=0,i=u[n];r<i.length;r++)if(D(e,t,i[r].bottom))return}function D(e,t,n){if(function(e,t,n){for(var r=e.firstCol;r<=e.lastCol;r++)for(var i=0,o=u[r];i<o.length;i++){var s=o[i];if(n<s.bottom&&n+t>s.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var i=u[r],o=0;o<i.length&&n>=i[o].top;)o++;i.splice(o,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var C in o)o[C]||(d[C.split(":")[0]]=!0);return{segsByFirstCol:u.map($s),segsByEachCol:u.map((function(t,n){var i=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];t.push(i.seg)}return t}(t);return function(e,t,n){for(var i={start:t,end:me(t,1)},o=[],s=0,a=e;s<a.length;s++){var l=a[s],u=l.eventRange,c=u.range,d=tn(c,i);d&&o.push(r(r({},l),{firstCol:n,lastCol:n,eventRange:{def:u.def,ui:r(r({},u.ui),{durationEditable:!1}),instance:u.instance,range:d},isStart:l.isStart&&d.start.valueOf()===c.start.valueOf(),isEnd:l.isEnd&&d.end.valueOf()===c.end.valueOf()}))}return o}(i,e[n].date,n)})),segIsHidden:d,segTops:h,segMarginTops:p,moreCnts:c,moreTops:f,paddingBottoms:m}}function $s(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];o.seg.firstCol===t&&n.push(o.seg)}return n}function Gs(e,t,n,r,i){for(var o=e.length,s={},a=[],l=0;l<o;l++)a.push([]);for(l=0;l<o;l++)for(var u=0,c=0,d=n[l];c<d.length;c++){var h=d[c];i(h,u)?p(h):f(h,u,r),h.top!==h.bottom&&u++}function p(e){var t=e.seg,n=t.eventRange.instance.instanceId;if(!s[n]){s[n]=!0;for(var r=t.firstCol;r<=t.lastCol;r++)a[r].push(e)}}function f(n,r,i){var o=n.seg,s=o.eventRange.instance.instanceId;if(!t[s]){t[s]=!0;for(var l=o.firstCol;l<=o.lastCol;l++){var u=++e[l];if(i&&1===u)for(var c=r-1;a[l].length>c;)f(a[l].pop(),a[l].length,!1)}}}}var Ks=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Ao,t.frameElRefs=new Ao,t.fgElRefs=new Ao,t.segHarnessRefs=new Ao,t.rootElRef=Nr(),t.state={framePositions:null,maxContentHeight:null,segHeights:{}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context,i=t.cells.length,o=Ns(t.businessHourSegs,i),s=Ns(t.bgEventSegs,i),a=Ns(this.getHighlightSegs(),i),l=Ns(this.getMirrorSegs(),i),u=Ws(t.cells,t.fgEventSegs,t.dayMaxEvents,t.dayMaxEventRows,n.segHeights,n.maxContentHeight,i,r.options.eventOrder),c=u.paddingBottoms,d=u.segsByFirstCol,h=u.segsByEachCol,p=u.segIsHidden,f=u.segTops,m=u.segMarginTops,g=u.moreCnts,v=u.moreTops,y=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var i=e.renderFgSegs(d[r],p,f,m,y,t.todayRange),u=e.renderFgSegs(l[r],{},f,{},{},t.todayRange,Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Lr(Fs,{key:n.key,elRef:e.cellElRefs.createRef(n.key),innerElRef:e.frameElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&0===r,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,moreCnt:g[r],buildMoreLinkText:t.buildMoreLinkText,onMoreClick:t.onMoreClick,segIsHidden:p,moreMarginTop:v[r],segsByEachCol:h[r],fgPaddingBottom:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Lr(Rr,null,Lr(Rr,null,i),Lr(Rr,null,u)),bgContent:Lr(Rr,null,e.renderFillSegs(a[r],"highlight"),e.renderFillSegs(o[r],"non-business"),e.renderFillSegs(s[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!je(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,i,o,s,a,l,u){var c=this.context,d=this.props.eventSelection,h=this.state.framePositions,p=1===this.props.cells.length,f=[];if(h)for(var m=0,g=e;m<g.length;m++){var v=g[m],y=v.eventRange.instance.instanceId,_=a||l||u,b=o[y],w=t[y]||b,x=t[y]||_||v.firstCol!==v.lastCol||!v.isStart||!v.isEnd,k=void 0,S=void 0,T=void 0,E=void 0;x?(S=n[y],c.isRtl?(E=0,T=h.lefts[v.lastCol]-h.lefts[v.firstCol]):(T=0,E=h.rights[v.firstCol]-h.rights[v.lastCol])):k=i[y],f.push(Lr("div",{className:"fc-daygrid-event-harness"+(x?" fc-daygrid-event-harness-abs":""),key:y,ref:_?null:this.segHarnessRefs.createRef(y+":"+v.firstCol),style:{visibility:w?"hidden":"",marginTop:k||"",top:S||"",left:T||"",right:E||""}},Bs(v)?Lr(Us,r({seg:v,isDragging:a,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s))):Lr(qs,r({seg:v,isDragging:a,isResizing:l,isDateSelecting:u,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s)))))}return f},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,o=this.props.todayRange,s=this.state.framePositions,a=[];if(s)for(var l=0,u=e;l<u.length;l++){var c=u[l],d=n?{right:0,left:s.lefts[c.lastCol]-s.lefts[c.firstCol]}:{left:0,right:s.rights[c.firstCol]-s.rights[c.lastCol]};a.push(Lr("div",{key:wn(c.eventRange),className:"fc-daygrid-bg-harness",style:d},"bg-event"===t?Lr(es,r({seg:c},_n(c,o))):Qo(t)))}return Lr.apply(void 0,i([Rr,{}],a))},t.prototype.updateSizing=function(e){var t=this.props,n=this.frameElRefs;if(null!==t.clientWidth){if(e){var r=t.cells.map((function(e){return n.currentMap[e.key]}));if(r.length){var i=this.rootElRef.current;this.setState({framePositions:new Er(i,r,!0,!1)})}}var o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({segHeights:this.computeSegHeights(),maxContentHeight:o?this.computeMaxContentHeight():null})}},t.prototype.computeSegHeights=function(){return Re(this.segHarnessRefs.currentMap,(function(e){return e.getBoundingClientRect().height}))},t.prototype.computeMaxContentHeight=function(){var e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top},t.prototype.getCellEls=function(){var e=this.cellElRefs.currentMap;return this.props.cells.map((function(t){return e[t.key]}))},t}(ti);Ks.addStateEquality({segHeights:je});var Zs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.repositioner=new ji(t.updateSize.bind(t)),t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t.handleDocumentMousedown=function(e){var n=t.props.onClose;n&&!t.rootEl.contains(e.target)&&n()},t.handleDocumentScroll=function(){t.repositioner.request(10)},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return n(t,e),t.prototype.render=function(){var e=this.context.theme,t=this.props,n=["fc-popover",e.getClass("popover")].concat(t.extraClassNames||[]);return Lr("div",r({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),Lr("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},Lr("span",{className:"fc-popover-title"},t.title),Lr("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),Lr("div",{className:"fc-popover-body "+e.getClass("popoverContent")},t.children))},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMousedown),document.addEventListener("scroll",this.handleDocumentScroll),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMousedown),document.removeEventListener("scroll",this.handleDocumentScroll)},t.prototype.updateSize=function(){var e=this.props,t=e.alignmentEl,n=e.topAlignmentEl,r=this.rootEl;if(r){var i,o=r.getBoundingClientRect(),s=t.getBoundingClientRect(),a=n?n.getBoundingClientRect().top:s.top;a=Math.min(a,window.innerHeight-o.height-10),a=Math.max(a,10),i=this.context.isRtl?s.right-o.width:s.left,i=Math.min(i,window.innerWidth-o.width-10),z(r,{top:a,left:i=Math.max(i,10)})}},t}(Br),Xs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handlePopoverEl=function(e){t.popoverEl=e,e?t.context.registerInteractiveComponent(t,{el:e,useEventCenter:!1}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,i=this.props,o=i.date,s=i.hiddenInstances,a=i.todayRange,l=i.dateProfile,u=i.selectedInstanceId,c=n.format(o,t.dayPopoverFormat);return Lr(Zo,{date:o,dateProfile:l,todayRange:a,elRef:this.handlePopoverEl},(function(e,t,n){return Lr(Zs,{elRef:e,title:c,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,onClose:i.onCloseClick,alignmentEl:i.alignmentEl,topAlignmentEl:i.topAlignmentEl},Lr(Xo,{date:o,dateProfile:l,todayRange:a},(function(e,t){return t&&Lr("div",{className:"fc-more-popover-misc",ref:e},t)})),i.segs.map((function(e){var t=e.eventRange.instance.instanceId;return Lr("div",{className:"fc-daygrid-event-harness",key:t,style:{visibility:s[t]?"hidden":""}},Bs(e)?Lr(Us,r({seg:e,isDragging:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))):Lr(qs,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))))})))}))},t.prototype.queryHit=function(e,t,n,r){var i=this.props.date;if(e<n&&t<r)return{component:this,dateSpan:{allDay:!0,range:{start:i,end:me(i,1)}},dayEl:this.popoverEl,rect:{left:0,top:0,right:n,bottom:r},layer:1}},t.prototype.isPopover=function(){return!0},t}(ti),Js=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=ot(Os),t.splitBgEventSegs=ot(Os),t.splitFgEventSegs=ot(Os),t.splitDateSelectionSegs=ot(Os),t.splitEventDrag=ot(Rs),t.splitEventResize=ot(Rs),t.buildBuildMoreLinkText=ot(Qs),t.rowRefs=new Ao,t.state={morePopoverState:null},t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.context,i=n.dateEnv,o=n.options.moreLinkClick;function s(e){var t=e.eventRange,r=t.def,o=t.instance,s=t.range;return{event:new Yn(n,r,o),start:i.toDate(s.start),end:i.toDate(s.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof o&&(o=o({date:i.toDate(e.date),allDay:!0,allSegs:e.allSegs.map(s),hiddenSegs:e.hiddenSegs.map(s),jsEvent:e.ev,view:n.viewApi})),o&&"popover"!==o?"string"==typeof o&&n.calendarApi.zoomTo(e.date,o):t.setState({morePopoverState:r(r({},e),{currentFgEventSegs:t.props.fgEventSegs})})},t.handleMorePopoverClose=function(){t.setState({morePopoverState:null})},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,i=t.dayMaxEvents,o=t.expandRows,s=this.state.morePopoverState,a=t.cells.length,l=this.splitBusinessHourSegs(t.businessHourSegs,a),u=this.splitBgEventSegs(t.bgEventSegs,a),c=this.splitFgEventSegs(t.fgEventSegs,a),d=this.splitDateSelectionSegs(t.dateSelectionSegs,a),h=this.splitEventDrag(t.eventDrag,a),p=this.splitEventResize(t.eventResize,a),f=this.buildBuildMoreLinkText(this.context.options.moreLinkText),m=!0===i||!0===r;return m&&!o&&(m=!1,r=null,i=null),Lr("div",{className:["fc-daygrid-body",m?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},Lr(bo,{unit:"day"},(function(m,g){return Lr(Rr,null,Lr("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:o?t.clientHeight:""}},t.colGroupNode,Lr("tbody",null,t.cells.map((function(o,s){return Lr(Ks,{ref:e.rowRefs.createRef(s),key:o.length?o[0].date.toISOString():s,showDayNumbers:a>1,showWeekNumbers:t.showWeekNumbers,todayRange:g,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:l[s],eventSelection:t.eventSelection,bgEventSegs:u[s].filter(ea),fgEventSegs:c[s],dateSelectionSegs:d[s],eventDrag:h[s],eventResize:p[s],dayMaxEvents:i,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:f,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&s&&s.currentFgEventSegs===t.fgEventSegs&&Lr(Xs,{date:s.date,dateProfile:n,segs:s.allSegs,alignmentEl:s.dayEl,topAlignmentEl:1===a?t.headerAlignElRef.current:null,onCloseClick:e.handleMorePopoverClose,selectedInstanceId:t.eventSelection,hiddenInstances:(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{},todayRange:g}))})))},t.prototype.prepareHits=function(){this.rowPositions=new Er(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Er(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i)return{row:o,col:i,dateSpan:{range:this.getCellRange(o,i),allDay:!0},dayEl:this.getCellEl(o,i),relativeRect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]}}},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:me(n,1)}},t}(ti);function Qs(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ea(e){return e.eventRange.def.allDay}var ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new na,t.tableRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr(Js,r({ref:this.tableRef,elRef:this.handleRootEl},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t.prototype.prepareHits=function(){this.tableRef.current.prepareHits()},t.prototype.queryHit=function(e,t){var n=this.tableRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti),na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return n(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Eo),ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=ot(ia),t.headerRef=Nr(),t.tableRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,i=this.props,o=this.buildDayTableModel(i.dateProfile,r),s=n.dayHeaders&&Lr(xo,{ref:this.headerRef,dateProfile:i.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),a=function(t){return Lr(ta,{ref:e.tableRef,dateProfile:i.dateProfile,dayTableModel:o,businessHours:i.businessHours,dateSelection:i.dateSelection,eventStore:i.eventStore,eventUiBases:i.eventUiBases,eventSelection:i.eventSelection,eventDrag:i.eventDrag,eventResize:i.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!i.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(s,a,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(s,a)},t}(Ls);function ia(e,t){var n=new So(e.renderRange,t);return new To(n,/year|month|week/.test(e.currentRangeUnit))}var oa=ni({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:At,moreLinkClassNames:At,moreLinkContent:At,moreLinkDidMount:At,moreLinkWillUnmount:At},views:{dayGrid:{component:ra,dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.buildRenderRange=function(t,n,r){var i,o=this.props.dateEnv,s=e.prototype.buildRenderRange.call(this,t,n,r),a=s.start,l=s.end;return/^(year|month)$/.test(n)&&(a=o.startOfWeek(a),(i=o.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=fe(i,1))),this.props.monthMode&&this.props.fixedWeekCount&&(l=fe(l,6-Math.ceil(ve(a,l)))),{start:a,end:l}},t}(yi)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?ln(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(cr),aa=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slatMetas=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(sn(t.currentRange,e)){var n=xe(e),r=e.valueOf()-n.valueOf();if(r>=Je(t.slotMinTime)&&r<Je(t.slotMaxTime))return this.computeTimeTop($e(r))}},e.prototype.computeDateTop=function(e,t){return t||(t=xe(e)),this.computeTimeTop($e(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,i=this.dateProfile,o=this.slatMetas,s=r.els.length,a=o[1].date.valueOf()-o[0].date.valueOf(),l=(e.milliseconds-Je(i.slotMinTime))/a;return l=Math.max(0,l),l=Math.min(s,l),t=Math.floor(l),n=l-(t=Math.min(t,s-1)),r.tops[t]+r.getHeight(t)*n},e}(),la=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],ua=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.slatElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr("div",{className:"fc-timegrid-slots",ref:this.rootElRef},Lr("table",{className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,Lr(ca,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))},t.prototype.componentDidMount=function(){this.updateSizing()},t.prototype.componentDidUpdate=function(){this.updateSizing()},t.prototype.componentWillUnmount=function(){this.props.onCoords&&this.props.onCoords(null)},t.prototype.updateSizing=function(){var e,t=this.props;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new aa(new Er(this.rootElRef.current,(e=this.slatElRefs.currentMap,t.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,t.slatMetas))},t}(Br),ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,i=e.slatElRefs;return Lr("tbody",null,e.slatMetas.map((function(o,s){var a={time:o.time,date:t.dateEnv.toDate(o.date),view:t.viewApi},l=["fc-timegrid-slot","fc-timegrid-slot-lane",o.isLabeled?"":"fc-timegrid-slot-minor"];return Lr("tr",{key:o.key,ref:i.createRef(o.key)},e.axis&&Lr(ha,r({},o)),Lr(oi,{hookProps:a,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return Lr("td",{ref:e,className:l.concat(t).join(" "),"data-time":o.isoTimeStr},r)})))})))},t}(Br),da=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function ha(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Lr(Yr.Consumer,null,(function(n){if(e.isLabeled){var r=n.dateEnv,i=n.options,o=n.viewApi,s=null==i.slotLabelFormat?da:Array.isArray(i.slotLabelFormat)?bt(i.slotLabelFormat[0]):bt(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:o,text:r.format(e.date,s)};return Lr(oi,{hookProps:a,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:pa,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,o){return Lr("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Lr("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Lr("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},o)))}))}return Lr("td",{className:t.join(" "),"data-time":e.isoTimeStr})}))}function pa(e){return e.text}function fa(e,t,n,r,i){for(var o=new Date(0),s=e,a=$e(0),l=n||function(e){var t,n,r;for(t=la.length-1;t>=0;t--)if(null!==(r=Qe(n=$e(la[t]),e))&&r>1)return n;return e}(r),u=[];Je(s)<Je(t);){var c=i.add(o,s),d=null!==Qe(a,l);u.push({date:c,time:s,key:c.toISOString(),isoTimeStr:nt(c),isLabeled:d}),s=Ke(s,r),a=Ke(a,r)}return u}var ma=bt({week:"short"}),ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new sa,t.headerElRef=Nr(),t.rootElRef=Nr(),t.scrollerElRef=Nr(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e){void 0===e&&(e="");var n=t.context.options,i=t.props.dateProfile.renderRange,o=ye(i.start,i.end),s=n.navLinks&&1===o?{"data-navlink":fr(i.start,"week"),tabIndex:0}:{};return n.weekNumbers?Lr(ns,{date:i.start,defaultFormat:ma},(function(t,n,i,o){return Lr("th",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:e}},Lr("a",r({ref:i,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},s),o)))})):Lr("th",{className:"fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-axis-frame",style:{height:e}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,i=n.viewApi,o={text:r.allDayText,view:i};return Lr(oi,{hookProps:o,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:va,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,i){return Lr("td",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Lr("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,i=this.props,o=[],s=Bo(r.options);return e&&o.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(o.push({type:"body",key:"all-day",chunk:{content:t}}),o.push({type:"body",key:"all-day-divider",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Lr(pi,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(zo,{liquid:!i.isHeightAuto&&!i.forPrint,cols:[{width:"shrink"}],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,i,o,s){var a=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Bo(u.options),h=!c.forPrint&&Uo(u.options),p=[];e&&p.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderHeadAxis(e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(p.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),p.push({key:"all-day-divider",type:"body",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var f=u.options.nowIndicator;return p.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Lr("div",{className:"fc-timegrid-axis-chunk"},Lr("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Lr("tbody",null,Lr(ya,{slatMetas:o}))),Lr("div",{className:"fc-timegrid-now-indicator-container"},Lr(bo,{unit:f?"minute":"day"},(function(e){var t=f&&s&&s.safeComputeTop(e);return"number"==typeof t?Lr(Go,{isAxis:!0,date:e},(function(e,n,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),h&&p.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Ho},{key:"cols",content:Ho}]}),Lr(pi,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(l,{liquid:!c.isHeightAuto&&!c.forPrint,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:p}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=5),{dayMaxEvents:t,dayMaxEventRows:n}},t}(ti);function va(e){return e.text}var ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return Lr("tr",{key:e.key},Lr(ha,r({},e)))}))},t}(Br);function _a(e,t){var n,r=[];for(n=0;n<t;n++)r.push([]);if(e)for(n=0;n<e.length;n++)r[e[n].col].push(e[n]);return r}function ba(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.col].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}function wa(e,t,n,r){for(var i=0,o=e;i<o.length;i++){var s=o[i];s.top=n.computeDateTop(s.start,t),s.bottom=Math.max(s.top+(r||0),n.computeDateTop(s.end,t))}}function xa(e,t,n){void 0===n&&(n=[]);for(var r=0;r<t.length;r++)i=e,o=t[r],i.bottom>o.top&&i.top<o.bottom&&n.push(t[r]);var i,o;return n}function ka(e){var t,n,r=e.forwardSegs,i=0;if(null==e.forwardPressure){for(t=0;t<r.length;t++)ka(n=r[t]),i=Math.max(i,1+n.forwardPressure);e.forwardPressure=i}}function Sa(e,t,n,r){var i,o=e.forwardSegs;if(null==e.forwardCoord)for(o.length?(function(e,t){var n=e.map(Ta),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(t);n.sort((function(e,t){return se(e,t,r)})),n.map((function(e){return e._seg}))}(o,r),Sa(o[0],t+1,n,r),e.forwardCoord=o[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),i=0;i<o.length;i++)Sa(o[i],0,e.forwardCoord,r)}function Ta(e){var t=fn(e);return t.forwardPressure=e.forwardPressure,t.backwardCoord=e.backwardCoord,t}var Ea=bt({hour:"numeric",minute:"2-digit",meridiem:!1}),Da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=["fc-timegrid-event","fc-v-event"];return this.props.isCondensed&&e.push("fc-timegrid-event-condensed"),Lr(Wo,r({},this.props,{defaultTimeFormat:Ea,extraClassNames:e}))},t}(Br);no.timeGridEventCondensedHeight=30;var Ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.selectMirror,i=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||n&&t.dateSelectionSegs||[],o=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr(Zo,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(s,a,l){return Lr("td",r({ref:s,className:["fc-timegrid-col"].concat(a,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(t.fgEventSegs,o)),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(i,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(n))),Lr("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),Lr(Ma,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,i){var o=this.props;return o.forPrint?this.renderPrintFgSegs(e):o.slatCoords?this.renderPositionedFgSegs(e,t,n,r,i):void 0},t.prototype.renderPrintFgSegs=function(e){var t=this.props;return(e=pn(e,this.context.options.eventOrder)).map((function(e){return Lr("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},Lr(Da,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},_n(e,t.todayRange,t.nowDate))))}))},t.prototype.renderPositionedFgSegs=function(e,t,n,i,o){var s=this,a=this.context,l=this.props;return(e=function(e,t,n,r,i){return wa(e,t,n,r),function(e,t){for(var n=0,r=e;n<r.length;n++)(c=r[n]).level=null,c.forwardCoord=null,c.backwardCoord=null,c.forwardPressure=null;var i,o=function(e){var t,n,r,i=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<i.length&&xa(n,i[r]).length;r++);n.level=r,(i[r]||(i[r]=[])).push(n)}return i}(e=pn(e,t));if(function(e){var t,n,r,i,o;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((i=n[r]).forwardSegs=[],o=t+1;o<e.length;o++)xa(i,e[o],i.forwardSegs)}(o),i=o[0]){for(var s=0,a=i;s<a.length;s++)ka(c=a[s]);for(var l=0,u=i;l<u.length;l++){var c;Sa(c=u[l],0,0,t)}}return e}(e,i)}(e,l.date,l.slatCoords,a.options.eventMinHeight,a.options.eventOrder)).map((function(e){var a=e.eventRange.instance.instanceId,u=n||i||o?r({left:0,right:0},s.computeSegTopBottomCss(e)):s.computeFgSegPositionCss(e);return Lr("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:a,style:r({visibility:t[a]?"hidden":""},u)},Lr(Da,r({seg:e,isDragging:n,isResizing:i,isDateSelecting:o,isSelected:a===l.eventSelection,isCondensed:e.bottom-e.top<no.timeGridEventCondensedHeight},_n(e,l.todayRange,l.nowDate))))}))},t.prototype.renderFillSegs=function(e,t){var n=this,i=this.context,o=this.props;if(o.slatCoords){wa(e,o.date,o.slatCoords,i.options.eventMinHeight);var s=e.map((function(e){return Lr("div",{key:wn(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===t?Lr(es,r({seg:e},_n(e,o.todayRange,o.nowDate))):Qo(t))}));return Lr(Rr,null,s)}},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;if(n)return e.map((function(e,t){return Lr(Go,{isAxis:!1,date:r,key:t},(function(t,i,o,s){return Lr("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(i).join(" "),style:{top:n.computeDateTop(e.start,r)}},s)}))}))},t.prototype.computeFgSegPositionCss=function(e){var t,n,i=this.context,o=i.isRtl,s=i.options.slotEventOverlap,a=e.backwardCoord,l=e.forwardCoord;s&&(l=Math.min(1,a+2*(l-a))),o?(t=1-l,n=a):(t=a,n=1-l);var u={zIndex:e.level+1,left:100*t+"%",right:100*n+"%"};return s&&e.forwardPressure&&(u[o?"marginLeft":"marginRight"]=20),r(r({},u),this.computeSegTopBottomCss(e))},t.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},t}(Br),Ma=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&Lr("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(Br),Aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=ot(_a),t.splitBgEventSegs=ot(_a),t.splitBusinessHourSegs=ot(_a),t.splitNowIndicatorSegs=ot(_a),t.splitDateSelectionSegs=ot(_a),t.splitEventDrag=ot(ba),t.splitEventResize=ot(ba),t.rootElRef=Nr(),t.cellElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.nowIndicator&&t.slatCoords&&t.slatCoords.safeComputeTop(t.nowDate),r=t.cells.length,i=this.splitFgEventSegs(t.fgEventSegs,r),o=this.splitBgEventSegs(t.bgEventSegs,r),s=this.splitBusinessHourSegs(t.businessHourSegs,r),a=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),u=this.splitEventDrag(t.eventDrag,r),c=this.splitEventResize(t.eventResize,r);return Lr("div",{className:"fc-timegrid-cols",ref:this.rootElRef},Lr("table",{style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,Lr("tbody",null,Lr("tr",null,t.axis&&Lr("td",{className:"fc-timegrid-col fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&Lr(Go,{isAxis:!0,date:t.nowDate},(function(e,t,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},i)}))))),t.cells.map((function(n,r){return Lr(Ca,{key:n.key,elRef:e.cellElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,nowDate:t.nowDate,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,fgEventSegs:i[r],bgEventSegs:o[r],businessHourSegs:s[r],nowIndicatorSegs:a[r],dateSelectionSegs:l[r],eventDrag:u[r],eventResize:c[r],slatCoords:t.slatCoords,eventSelection:t.eventSelection,forPrint:t.forPrint})}))))))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.updateCoords=function(){var e,t=this.props;t.onColCoords&&null!==t.clientWidth&&t.onColCoords(new Er(this.rootElRef.current,(e=this.cellElRefs.currentMap,t.cells.map((function(t){return e[t.key]}))),!0,!1))},t}(Br),Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=ot(La),t.state={slatCoords:null},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var i=r.computeTimeTop(e.time);(i=Math.ceil(i))&&i++,n(i)}return!0}},t.handleColCoords=function(e){t.colCoords=e},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return Lr("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Lr(ua,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),Lr(Aa,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))},t.prototype.componentDidMount=function(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.componentDidUpdate=function(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},t.prototype.positionToHit=function(e,t){var n=this.context,r=n.dateEnv,i=n.options,o=this.colCoords,s=this.props.dateProfile,a=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,i.snapDuration),u=l.snapDuration,c=l.snapsPerSlot,d=o.leftToIndex(e),h=a.positions.topToIndex(t);if(null!=d&&null!=h){var p=a.positions.tops[h],f=a.positions.getHeight(h),m=(t-p)/f,g=h*c+Math.floor(m*c),v=this.props.cells[d].date,y=Ke(s.slotMinTime,Ze(u,g)),_=r.add(v,y);return{col:d,dateSpan:{range:{start:_,end:r.add(_,u)},allDay:!1},dayEl:o.els[d],relativeRect:{left:o.lefts[d],right:o.rights[d],top:p,bottom:p+f}}}},t}(Br);function La(e,t){var n=t||e,r=Qe(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var Oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=ot(Na),t.slicer=new Ra,t.timeColsRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,i=t.dateProfile,o=t.dayTableModel,s=n.options.nowIndicator,a=this.buildDayRanges(o,i,n.dateEnv);return Lr(bo,{unit:s?"minute":"day"},(function(l,u){return Lr(Ia,r({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(t,i,null,n,a),{forPrint:t.forPrint,axis:t.axis,dateProfile:i,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:o.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:l,nowIndicatorSegs:s&&e.slicer.sliceNowDate(l,n,a),todayRange:u,onScrollTopRequest:t.onScrollTopRequest,onSlatCoords:t.onSlatCoords}))}))},t.prototype.queryHit=function(e,t){var n=this.timeColsRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti);function Na(e,t,n){for(var r=[],i=0,o=e.headerDates;i<o.length;i++){var s=o[i];r.push({start:n.add(s,t.slotMinTime),end:n.add(s,t.slotMaxTime)})}return r}var Ra=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.sliceRange=function(e,t){for(var n=[],r=0;r<t.length;r++){var i=tn(e,t[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n},t}(Eo),Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=ot(Fa),t.buildSlatMetas=ot(fa),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.dateEnv,o=t.dateProfileGenerator,s=this.props,a=s.dateProfile,l=this.buildTimeColsModel(a,o),u=this.allDaySplitter.splitProps(s),c=this.buildSlatMetas(a.slotMinTime,a.slotMaxTime,n.slotLabelInterval,n.slotDuration,i),d=n.dayMinWidth,h=!d,p=d,f=n.dayHeaders&&Lr(xo,{dates:l.headerDates,dateProfile:a,datesRepDistinctDays:!0,renderIntro:h?this.renderHeadAxis:null}),m=!1!==n.allDaySlot&&function(t){return Lr(ta,r({},u.allDay,{dateProfile:a,dayTableModel:l,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:h?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:s.forPrint},e.getAllDayMaxEventProps()))},g=function(t){return Lr(Oa,r({},u.timed,{dayTableModel:l,dateProfile:a,axis:h,slotDuration:n.slotDuration,slatMetas:c,forPrint:s.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return p?this.renderHScrollLayout(f,m,g,l.colCnt,d,c,this.state.slatCoords):this.renderSimpleLayout(f,m,g)},t}(ga);function Fa(e,t){var n=new So(e.renderRange,t);return new To(n,!1)}var ja=ni({initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:Pa,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}}),Ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.dayDate,n=e.todayRange,i=this.context,o=i.theme,s=i.dateEnv,a=i.options,l=i.viewApi,u=hr(t,n),c=a.listDayFormat?s.format(t,a.listDayFormat):"",d=a.listDaySideFormat?s.format(t,a.listDaySideFormat):"",h=a.navLinks?fr(t):null,p=r({date:s.toDate(t),view:l,text:c,sideText:d,navLinkData:h},u),f=["fc-list-day"].concat(pr(u,o));return Lr(oi,{hookProps:p,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:Va,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(e,n,r,i){return Lr("tr",{ref:e,className:f.concat(n).join(" "),"data-date":tt(t)},Lr("th",{colSpan:3},Lr("div",{className:"fc-list-day-cushion "+o.getClass("tableCellShaded"),ref:r},i)))}))},t}(Br);function Va(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Lr(Rr,null,e.text&&Lr("a",r({className:"fc-list-day-text"},t),e.text),e.sideText&&Lr("a",r({className:"fc-list-day-side-text"},t),e.sideText))}var Ha=bt({hour:"numeric",minute:"2-digit",meridiem:"short"}),Ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||Ha;return Lr(qo,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:Ua,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,i,o,s,a){return Lr("tr",{className:["fc-list-event",a.event.url?"fc-event-forced-url":""].concat(i).join(" "),ref:e},function(e,t,n){var r=n.options;if(!1!==r.displayEventTime){var i=e.eventRange.def,o=e.eventRange.instance,s=!1,a=void 0;if(i.allDay?s=!0:Xt(e.eventRange.range)?e.isStart?a=yn(e,t,n,null,null,o.range.start,e.end):e.isEnd?a=yn(e,t,n,null,null,e.start,o.range.end):s=!0:a=yn(e,t,n),s){var l={text:n.options.allDayText,view:n.viewApi};return Lr(oi,{hookProps:l,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:za,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return Lr("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return Lr("td",{className:"fc-list-event-time"},a)}return null}(n,r,t),Lr("td",{className:"fc-list-event-graphic"},Lr("span",{className:"fc-list-event-dot",style:{borderColor:a.borderColor||a.backgroundColor}})),Lr("td",{className:"fc-list-event-title",ref:o},s))}))},t}(Br);function Ua(e){var t=e.event,n=t.url;return Lr("a",r({},n?{href:n}:{}),t.title)}function za(e){return e.text}var qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=ot($a),t.eventStoreToSegs=ot(t._eventStoreToSegs),t.setRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=["fc-list",n.theme.getClass("table"),!1!==n.options.stickyHeaderDates?"fc-list-sticky":""],i=this.computeDateVars(t.dateProfile),o=i.dayDates,s=i.dayRanges,a=this.eventStoreToSegs(t.eventStore,t.eventUiBases,s);return Lr(pi,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,i){return Lr("div",{ref:n,className:r.concat(i).join(" ")},Lr(Mo,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},a.length>0?e.renderSegList(a,o):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Lr(oi,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:Wa,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Lr("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Lr("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,i=n.theme,o=n.options,s=function(e){var t,n,r=[];for(t=0;t<e.length;t++)(r[(n=e[t]).dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return Lr(bo,{unit:"day"},(function(e,n){for(var a=[],l=0;l<s.length;l++){var u=s[l];if(u){var c=t[l].toISOString();a.push(Lr(Ya,{key:c,dayDate:t[l],todayRange:n}));for(var d=0,h=u=pn(u,o.eventOrder);d<h.length;d++){var p=h[d];a.push(Lr(Ba,r({key:c+":"+p.eventRange.instance.instanceId,seg:p,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},_n(p,n,e))))}}}return Lr("table",{className:"fc-list-table "+i.getClass("table")},Lr("tbody",null,a))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(an(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.eventRangeToSegs(o,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,i,o=this.context.dateEnv,s=this.context.options.nextDayThreshold,a=e.range,l=e.def.allDay,u=[];for(n=0;n<t.length;n++)if((r=tn(a,t[n]))&&(i={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===a.end.valueOf(),dayIndex:n},u.push(i),!i.isEnd&&!l&&n+1<t.length&&a.end<o.add(t[n+1].start,s))){i.end=a.end,i.isEnd=!0;break}return u},t}(ti);function Wa(e){return e.text}function $a(e){for(var t=xe(e.renderRange.start),n=e.renderRange.end,r=[],i=[];t<n;)r.push(t),i.push({start:t,end:me(t,1)}),t=me(t,1);return{dayDates:r,dayRanges:i}}function Ga(e){return!1===e?null:bt(e)}var Ka=ni({optionRefiners:{listDayFormat:Ga,listDaySideFormat:Ga,noEventsClassNames:At,noEventsContent:At,noEventsDidMount:At,noEventsWillUnmount:At},views:{list:{component:qa,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}}),Za=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);Za.prototype.classes={root:"fc-theme-bootstrap",table:"table-bordered",tableCellShaded:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",buttonActive:"active",popover:"popover",popoverHeader:"popover-header",popoverContent:"popover-body"},Za.prototype.baseIconClass="fa",Za.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},Za.prototype.rtlIconClasses={prev:"fa-chevron-right",next:"fa-chevron-left",prevYear:"fa-angle-double-right",nextYear:"fa-angle-double-left"},Za.prototype.iconOverrideOption="bootstrapFontAwesome",Za.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",Za.prototype.iconOverridePrefix="fa-";var Xa=ni({themeClasses:{bootstrap:Za}}),Ja=ni({eventSourceDefs:[{parseMeta:function(e){var t=e.googleCalendarId;return!t&&e.url&&(t=function(e){var t;return/^[^/]+@([^/.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}(e.url)),t?{googleCalendarId:t,googleCalendarApiKey:e.googleCalendarApiKey,googleCalendarApiBase:e.googleCalendarApiBase,extraParams:e.extraParams}:null},fetch:function(e,t,n){var i=e.context,o=i.dateEnv,s=i.options,a=e.eventSource.meta,l=a.googleCalendarApiKey||s.googleCalendarApiKey;if(l){var u=function(e){var t=e.googleCalendarApiBase;return t||(t="https://www.googleapis.com/calendar/v3/calendars"),t+"/"+encodeURIComponent(e.googleCalendarId)+"/events"}(a),c=a.extraParams,d="function"==typeof c?c():c,h=function(e,t,n,i){var o,s,a;return i.canComputeOffset?(s=i.formatIso(e.start),a=i.formatIso(e.end)):(s=me(e.start,-1).toISOString(),a=me(e.end,1).toISOString()),o=r(r({},n||{}),{key:t,timeMin:s,timeMax:a,singleEvents:!0,maxResults:9999}),"local"!==i.timeZone&&(o.timeZone=i.timeZone),o}(e.range,l,d,o);Li("GET",u,h,(function(e,r){var i,o;e.error?n({message:"Google Calendar API: "+e.error.message,errors:e.error.errors,xhr:r}):t({rawEvents:(i=e.items,o=h.timeZone,i.map((function(e){return function(e,t){var n=e.htmlLink||null;return n&&t&&(n=function(e,t){return e.replace(/(\?.*?)?(#|$)/,(function(e,n,r){return(n?n+"&":"?")+t+r}))}(n,"ctz="+t)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:n,location:e.location,description:e.description}}(e,o)}))),xhr:r})}),(function(e,t){n({message:e,xhr:t})}))}else n({message:"Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"})}}],optionRefiners:{googleCalendarApiKey:String},eventSourceRefiners:{googleCalendarApiKey:String,googleCalendarId:String,googleCalendarApiBase:String,extraParams:At}});return Ri.push(Is,oa,ja,Ka,Xa,Ja),e.BASE_OPTION_DEFAULTS=xt,e.BASE_OPTION_REFINERS=wt,e.BaseComponent=Br,e.BgEvent=es,e.BootstrapTheme=Za,e.Calendar=is,e.CalendarApi=jn,e.CalendarContent=co,e.CalendarDataManager=Hi,e.CalendarDataProvider=Xi,e.CalendarRoot=fo,e.Component=Ir,e.ContentHook=ai,e.CustomContentRenderContext=si,e.DateComponent=ti,e.DateEnv=$n,e.DateProfileGenerator=yi,e.DayCellContent=Xo,e.DayCellRoot=Zo,e.DayGridView=ra,e.DayHeader=xo,e.DaySeriesModel=So,e.DayTable=ta,e.DayTableModel=To,e.DayTableSlicer=na,e.DayTimeCols=Oa,e.DayTimeColsSlicer=Ra,e.DayTimeColsView=Pa,e.DelayedRunner=ji,e.Draggable=Cs,e.ElementDragging=to,e.ElementScrollController=Cr,e.Emitter=Tr,e.EventApi=Yn,e.EventRoot=qo,e.EventSourceApi=j,e.FeaturefulElementDragging=gs,e.Fragment=Rr,e.Interaction=Ji,e.ListView=qa,e.MountHook=ui,e.NamedTimeZoneImpl=function(e){this.timeZoneName=e},e.NowIndicatorRoot=Go,e.NowTimer=bo,e.PointerDragging=ls,e.PositionCache=Er,e.RefMap=Ao,e.RenderHook=oi,e.ScrollController=Dr,e.ScrollResponder=jr,e.Scroller=Mo,e.SimpleScrollGrid=zo,e.Slicer=Eo,e.Splitter=cr,e.StandardEvent=Wo,e.Table=Js,e.TableDateCell=vo,e.TableDowCell=yo,e.TableView=Ls,e.Theme=Ar,e.ThirdPartyDraggable=As,e.TimeCols=Ia,e.TimeColsSlatsCoords=aa,e.TimeColsView=ga,e.ViewApi=On,e.ViewContextType=Yr,e.ViewRoot=pi,e.WeekNumberRoot=ns,e.WindowScrollController=Mr,e.addDays=me,e.addDurations=Ke,e.addMs=ge,e.addWeeks=fe,e.allowContextMenu=ie,e.allowSelection=ne,e.applyMutationToEventStore=An,e.applyStyle=z,e.applyStyleProp=q,e.asCleanDays=function(e){return e.years||e.months||e.milliseconds?0:e.days},e.asRoughMinutes=function(e){return Je(e)/6e4},e.asRoughMs=Je,e.asRoughSeconds=function(e){return Je(e)/1e3},e.buildClassNameNormalizer=ci,e.buildDayRanges=Na,e.buildDayTableModel=ia,e.buildEventApis=Hn,e.buildEventRangeKey=wn,e.buildHashFromArray=function(e,t){for(var n={},r=0;r<e.length;r++){var i=t(e[r],r);n[i[0]]=i[1]}return n},e.buildNavLinkData=fr,e.buildSegCompareObj=fn,e.buildSegTimeText=yn,e.buildSlatMetas=fa,e.buildTimeColsModel=Fa,e.collectFromHash=Be,e.combineEventUis=Yt,e.compareByFieldSpec=ae,e.compareByFieldSpecs=se,e.compareNumbers=ce,e.compareObjs=Ve,e.computeEdges=br,e.computeFallbackHeaderFormat=mo,e.computeHeightAndMargins=function(e){return e.getBoundingClientRect().height+function(e){var t=window.getComputedStyle(e);return parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(e)},e.computeInnerRect=wr,e.computeRect=xr,e.computeSegDraggable=mn,e.computeSegEndResizable=vn,e.computeSegStartResizable=gn,e.computeShrinkWidth=Io,e.computeSmallestCellWidth=he,e.computeVisibleDayRange=Zt,e.config=no,e.constrainPoint=or,e.createContext=Pr,e.createDuration=$e,e.createElement=Lr,e.createEmptyEventStore=function(){return{defs:{},instances:{}}},e.createEventInstance=Ie,e.createEventUi=jt,e.createFormatter=bt,e.createPlugin=ni,e.createRef=Nr,e.diffDates=Jt,e.diffDayAndTime=_e,e.diffDays=ye,e.diffPoints=ar,e.diffWeeks=ve,e.diffWholeDays=we,e.diffWholeWeeks=be,e.disableCursor=Q,e.elementClosest=V,e.elementMatches=H,e.enableCursor=ee,e.eventTupleToStore=Lt,e.filterEventStoreDefs=Rt,e.filterHash=Ne,e.findDirectChildren=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].children,s=0;s<o.length;s++){var a=o[s];t&&!H(a,t)||r.push(a)}return r},e.findElements=B,e.flexibleCompare=le,e.flushToDom=Fr,e.formatDate=function(e,t){void 0===t&&(t={});var n=Qn(t),r=bt(t),i=n.createMarkerMeta(e);return i?n.format(i.marker,r,{forcedTzo:i.forcedTzo}):""},e.formatDayString=tt,e.formatIsoTimeString=nt,e.formatRange=function(e,t,n){var r=Qn("object"==typeof n&&n?n:{}),i=bt(n),o=r.createMarkerMeta(e),s=r.createMarkerMeta(t);return o&&s?r.formatRange(o.marker,s.marker,i,{forcedStartTzo:o.forcedTzo,forcedEndTzo:s.forcedTzo,isEndExclusive:n.isEndExclusive,defaultSeparator:xt.defaultRangeSeparator}):""},e.getAllowYScrolling=Oo,e.getCanVGrowWithinCell=lr,e.getClippingParents=kr,e.getDateMeta=hr,e.getDayClassNames=pr,e.getDefaultEventEnd=Mn,e.getElSeg=cn,e.getEventClassNames=bn,e.getIsRtlScrollbarOnLeft=vr,e.getRectCenter=sr,e.getRelevantEvents=Ot,e.getScrollGridClassNames=Yo,e.getScrollbarWidths=yr,e.getSectionClassNames=Vo,e.getSectionHasLiquidHeight=Lo,e.getSegMeta=_n,e.getSlotClassNames=function(e,t){var n=["fc-slot","fc-slot-"+pe[e.dow]];return e.isDisabled?n.push("fc-slot-disabled"):(e.isToday&&(n.push("fc-slot-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-slot-past"),e.isFuture&&n.push("fc-slot-future")),n},e.getStickyFooterScrollbar=Uo,e.getStickyHeaderDates=Bo,e.getUnequalProps=Ye,e.globalLocales=Gn,e.globalPlugins=Ri,e.greatestDurationDenominator=et,e.guid=J,e.hasBgRendering=ln,e.hasShrinkWidth=jo,e.identity=At,e.interactionSettingsStore=eo,e.interactionSettingsToStore=Qi,e.intersectRanges=tn,e.intersectRects=ir,e.isArraysEqual=it,e.isColPropsEqual=Ro,e.isDateSpansEqual=Sn,e.isInt=de,e.isInteractionValid=Gr,e.isMultiDayRange=Xt,e.isPropsEqual=je,e.isPropsValid=Zr,e.isValidDate=Me,e.listenBySelector=G,e.mapHash=Re,e.memoize=ot,e.memoizeArraylike=function(e,t,n){var r=[],i=[];return function(o){for(var s=r.length,a=o.length,l=0;l<s;l++)if(o[l]){if(!it(r[l],o[l])){n&&n(i[l]);var u=e.apply(this,o[l]);t&&t(u,i[l])||(i[l]=u)}}else n&&n(i[l]);for(;l<a;l++)i[l]=e.apply(this,o[l]);return r=o,i.splice(a),i}},e.memoizeHashlike=function(e,t,n){var r={},i={};return function(o){var s={};for(var a in o)if(i[a])if(it(r[a],o[a]))s[a]=i[a];else{n&&n(i[a]);var l=e.apply(this,o[a]);s[a]=t&&t(l,i[a])?i[a]:l}else s[a]=e.apply(this,o[a]);return r=o,i=s,s}},e.memoizeObjArg=st,e.mergeEventStores=Nt,e.multiplyDuration=Ze,e.padStart=ue,e.parseBusinessHours=nr,e.parseClassNames=Pt,e.parseDragMeta=io,e.parseEventDef=Gt,e.parseFieldSpecs=oe,e.parseMarker=Wn,e.pointInsideRect=rr,e.preventContextMenu=re,e.preventDefault=W,e.preventSelection=te,e.rangeContainsMarker=sn,e.rangeContainsRange=on,e.rangesEqual=nn,e.rangesIntersect=rn,e.refineEventDef=Wt,e.refineProps=Mt,e.removeElement=Y,e.removeExact=function(e,t){for(var n=0,r=0;r<e.length;)e[r]===t?(e.splice(r,1),n++):r++;return n},e.render=Or,e.renderChunkContent=No,e.renderFill=Qo,e.renderMicroColGroup=Po,e.renderScrollShim=Ho,e.requestJson=Li,e.sanitizeShrinkWidth=Fo,e.setElSeg=un,e.setRef=qr,e.sliceEventStore=an,e.sliceEvents=function(e,t){return an(e.eventStore,e.eventUiBases,e.dateProfile.activeRange,t?e.nextDayThreshold:null).fg},e.sortEventSegs=pn,e.startOfDay=xe,e.translateRect=function(e,t,n){return{left:e.left+t,right:e.right+t,top:e.top+n,bottom:e.bottom+n}},e.triggerDateSelect=Dn,e.unpromisify=Sr,e.version="5.3.1",e.whenTransitionDone=Z,e.wholeDivideDurations=Qe,e}({});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).jsSHA=t()}(this,(function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};"function"==typeof SuppressedError&&SuppressedError;var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="ARRAYBUFFER not supported by this environment",r="UINT8ARRAY not supported by this environment";function i(e,t,n,r){var i,o,s,a=t||[0],l=(n=n||0)>>>3,u=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(s=i+l)>>>2,a.length<=o&&a.push(0),a[o]|=e[i]<<8*(u+r*(s%4));return{value:a,binLen:8*e.length+n}}function o(e,o,s){switch(o){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,s,a;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(s=(a=(i>>>1)+u)>>>2;l.length<=s;)l.push(0);l[s]|=o<<8*(c+r*(a%4))}return{value:l,binLen:4*e.length+n}}(e,t,n,s)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,s,a,l,u,c,d,h,p=0,f=n||[0],m=(r=r||0)>>>3;if("UTF8"===t)for(d=-1===i?3:0,a=0;a<e.length;a+=1)for(s=[],128>(o=e.charCodeAt(a))?s.push(o):2048>o?(s.push(192|o>>>6),s.push(128|63&o)):55296>o||57344<=o?s.push(224|o>>>12,128|o>>>6&63,128|63&o):(a+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(a)),s.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),l=0;l<s.length;l+=1){for(u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=s[l]<<8*(d+i*(c%4)),p+=1}else for(d=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,a=0;a<e.length;a+=1){for(o=e.charCodeAt(a),!0===h&&(o=(l=255&o)<<8|o>>>8),u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=o<<8*(d+i*(c%4)),p+=2}return{value:f,binLen:8*p+r}}(e,o,t,n,s)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,s,a,l,u,c,d=0,h=n||[0],p=(r=r||0)>>>3,f=-1===i?3:0,m=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==m&&m<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(l=e.substr(o,4),a=0,s=0;s<l.length;s+=1)a|=t.indexOf(l.charAt(s))<<18-6*s;for(s=0;s<l.length-1;s+=1){for(u=(c=d+p)>>>2;h.length<=u;)h.push(0);h[u]|=(a>>>16-8*s&255)<<8*(f+i*(c%4)),d+=1}}return{value:h,binLen:8*d+r}}(e,n,r,s)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,s,a,l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),s=(a=o+u)>>>2,l.length<=s&&l.push(0),l[s]|=i<<8*(c+r*(a%4));return{value:l,binLen:8*e.length+n}}(e,t,n,s)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error(n)}return function(e,t,n){return function(e,t,n,r){return i(new Uint8Array(e),t,n,r)}(e,t,n,s)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error(r)}return function(e,t,n){return i(e,t,n,s)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function s(e,i,o,s){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,s="0123456789abcdef",a="",l=t/8,u=-1===n?3:0;for(i=0;i<l;i+=1)o=e[i>>>2]>>>8*(u+n*(i%4)),a+=s.charAt(o>>>4&15)+s.charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,i,o,s)};case"B64":return function(e){return function(e,n,r,i){var o,s,a,l,u,c="",d=n/8,h=-1===r?3:0;for(o=0;o<d;o+=3)for(l=o+1<d?e[o+1>>>2]:0,u=o+2<d?e[o+2>>>2]:0,a=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(l>>>8*(h+r*((o+1)%4))&255)<<8|u>>>8*(h+r*((o+2)%4))&255,s=0;s<4;s+=1)c+=8*o+6*s<=n?t.charAt(a>>>6*(3-s)&63):i.b64Pad;return c}(e,i,o,s)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",s=t/8,a=-1===n?3:0;for(r=0;r<s;r+=1)i=e[r>>>2]>>>8*(a+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,i,o)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error(n)}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),s=new Uint8Array(o),a=-1===n?3:0;for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(a+n*(r%4))&255;return o}(e,i,o)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error(r)}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,s=new Uint8Array(i);for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return s}(e,i,o)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],u=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function c(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function d(e,t){return e>>>t|e<<32-t}function h(e,t){return e>>>t}function p(e,t,n){return e&t^~e&n}function f(e,t,n){return e&t^e&n^t&n}function m(e){return d(e,2)^d(e,13)^d(e,22)}function g(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function v(e,t,n,r){var i=(65535&e)+(65535&t)+(65535&n)+(65535&r);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16))<<16|65535&i}function y(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function _(e){return d(e,7)^d(e,18)^h(e,3)}function b(e){return d(e,6)^d(e,11)^d(e,25)}function w(e){return"SHA-224"==e?l.slice():u.slice()}function x(e,t){var n,r,i,o,s,l,u,c,w,x,k,S,T=[];for(n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],k=0;k<64;k+=1)T[k]=k<16?e[k]:v(d(S=T[k-2],17)^d(S,19)^h(S,10),T[k-7],_(T[k-15]),T[k-16]),w=y(c,b(s),p(s,l,u),a[k],T[k]),x=g(m(n),f(n,r,i)),c=u,u=l,l=s,s=g(o,w),o=i,i=r,r=n,n=g(w,x);return t[0]=g(n,t[0]),t[1]=g(r,t[1]),t[2]=g(i,t[2]),t[3]=g(o,t[3]),t[4]=g(s,t[4]),t[5]=g(l,t[5]),t[6]=g(u,t[6]),t[7]=g(c,t[7]),t}return function(t){function n(e,n,r){var i=this;if("SHA-224"!==e&&"SHA-256"!==e)throw new Error("Chosen SHA variant is not supported");var s=r||{};return(i=t.call(this,e,n,r)||this).t=i.i,i.o=!0,i.u=-1,i.h=o(i.v,i.l,i.u),i.p=x,i.A=function(e){return e.slice()},i.U=w,i.T=function(t,n,r,i){return function(e,t,n,r,i){for(var o,s=15+(t+65>>>9<<4),a=t+n;e.length<=s;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[s]=4294967295&a,e[s-1]=a/4294967296|0,o=0;o<e.length;o+=16)r=x(e.slice(o,o+16),r);return"SHA-224"===i?[r[0],r[1],r[2],r[3],r[4],r[5],r[6]]:r}(t,n,r,i,e)},i.R=w(e),i.m=512,i.F="SHA-224"===e?224:256,i.g=!1,s.hmacKey&&i.B(function(e,t,n,r){var i="hmacKey must include a value and format";if(!t)throw new Error(i);if(void 0===t.value||!t.format)throw new Error(i);return o(t.format,t.encoding||"UTF8",n)(t.value)}(0,s.hmacKey,i.u)),i}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.v=t,this.l=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.S=e,this.H=[],this.Y=0,this.C=!1,this.I=0,this.L=!1,this.N=[],this.X=[]}return e.prototype.update=function(e){var t,n=0,r=this.m>>>5,i=this.h(e,this.H,this.Y),o=i.binLen,s=i.value,a=o>>>5;for(t=0;t<a;t+=r)n+this.m<=o&&(this.R=this.p(s.slice(t,t+r),this.R),n+=this.m);return this.I+=n,this.H=s.slice(n>>>5),this.Y=o%this.m,this.C=!0,this},e.prototype.getHash=function(e,t){var n,r,i=this.F,o=c(t);if(this.g){if(-1===o.outputLen)throw new Error("Output length must be specified in options");i=o.outputLen}var a=s(e,i,this.u,o);if(this.L&&this.t)return a(this.t(o));for(r=this.T(this.H.slice(),this.Y,this.I,this.A(this.R),i),n=1;n<this.numRounds;n+=1)this.g&&i%32!=0&&(r[r.length-1]&=16777215>>>24-i%32),r=this.T(r,i,0,this.U(this.S),i);return a(r)},e.prototype.setHMACKey=function(e,t,n){if(!this.o)throw new Error("Variant does not support HMAC");if(this.C)throw new Error("Cannot set MAC key after calling update");var r=o(t,(n||{}).encoding||"UTF8",this.u);this.B(r(e))},e.prototype.B=function(e){var t,n=this.m>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(this.L)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.T(e.value,e.binLen,0,this.U(this.S),this.F));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.N[t]=909522486^e.value[t],this.X[t]=1549556828^e.value[t];this.R=this.p(this.N,this.R),this.I=this.m,this.L=!0},e.prototype.getHMAC=function(e,t){var n=c(t);return s(e,this.F,this.u,n)(this.i())},e.prototype.i=function(){var e;if(!this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.T(this.H.slice(),this.Y,this.I,this.A(this.R),this.F);return e=this.p(this.X,this.U(this.S)),this.T(t,this.F,this.m,e,this.F)},e}())})),
|
|
518
|
+
var FullCalendar=function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};function n(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}var o,s,a,l,u,c,d,h={},p=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function m(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var r,i=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(i[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return y(e,o,t&&t.key,t&&t.ref,null)}function y(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(s.__v=s),o.vnode&&o.vnode(s),s}function _(e){return e.children}function b(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?w(e):null}function x(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return x(e)}}function k(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!a++||u!==o.debounceRendering)&&((u=o.debounceRendering)||l)(S)}function S(){for(var e;a=s.length;)e=s.sort((function(e,t){return e.__v.__b-t.__v.__b})),s=[],e.some((function(e){var t,n,r,i,o,s,a;e.__d&&(s=(o=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=m({},o)).__v=r,i=A(a,o,r,t.__n,void 0!==a.ownerSVGElement,null,n,null==s?w(o):s),I(n,o),i!=s&&x(o)))}))}function T(e,t,n,r,i,o,s,a,l){var u,c,d,f,m,v,y,_=n&&n.__k||p,b=_.length;if(a==h&&(a=null!=o?o[0]:b?w(n,0):null),u=0,t.__k=E(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=_[u])||d&&n.key==d.key&&n.type===d.type)_[u]=void 0;else for(c=0;c<b;c++){if((d=_[c])&&n.key==d.key&&n.type===d.type){_[c]=void 0;break}d=null}if(f=A(e,n,d=d||h,r,i,o,s,a,l),(c=n.ref)&&d.ref!=c&&(y||(y=[]),d.ref&&y.push(d.ref,null,n),y.push(c,n.__c||f,n)),null!=f){var p;if(null==v&&(v=f),void 0!==n.__d)p=n.__d,n.__d=void 0;else if(o==d||f!=a||null==f.parentNode){e:if(null==a||a.parentNode!==e)e.appendChild(f),p=null;else{for(m=a,c=0;(m=m.nextSibling)&&c<b;c+=2)if(m==f)break e;e.insertBefore(f,a),p=a}"option"==t.type&&(e.value="")}a=void 0!==p?p:f.nextSibling,"function"==typeof t.type&&(t.__d=a)}else a&&d.__e==a&&a.parentNode!=e&&(a=w(d))}return u++,n})),t.__e=v,null!=o&&"function"!=typeof t.type)for(u=o.length;u--;)null!=o[u]&&g(o[u]);for(u=b;u--;)null!=_[u]&&N(_[u],_[u]);if(y)for(u=0;u<y.length;u++)O(y[u],y[++u],y[++u])}function E(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)E(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?y(null,e,null,null,e):null!=e.__e||null!=e.__c?y(e.type,e.props,e.key,null,e.__v):e):e);return n}function D(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===f.test(t)?n+"px":null==n?"":n}function C(e,t,n,r,i){var o,s,a,l,u;if(i?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(l in r)n&&l in n||D(o,l,"");if(n)for(u in n)r&&n[u]===r[u]||D(o,u,n[u])}else"o"===t[0]&&"n"===t[1]?(s=t!==(t=t.replace(/Capture$/,"")),a=t.toLowerCase(),t=(a in e?a:t).slice(2),n?(r||e.addEventListener(t,M,s),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,M,s)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!i&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function M(e){this.l[e.type](o.event?o.event(e):e)}function A(e,t,n,r,i,s,a,l,u){var c,d,h,p,f,g,v,y,w,x,k=t.type;if(void 0!==t.constructor)return null;(c=o.__b)&&c(t);try{e:if("function"==typeof k){if(y=t.props,w=(c=k.contextType)&&r[c.__c],x=c?w?w.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(y,x):(t.__c=d=new b(y,x),d.constructor=k,d.render=R),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=x,d.__n=r,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=m({},d.__s)),m(d.__s,k.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,h)null==k.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==k.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,x)||t.__v===n.__v&&!d.__){for(d.props=y,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,d.__h.length&&a.push(d),c=0;c<t.__k.length;c++)t.__k[c]&&(t.__k[c].__=t);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,g)}))}d.context=x,d.props=y,d.state=d.__s,(c=o.__r)&&c(t),d.__d=!1,d.__v=t,d.__P=e,c=d.render(d.props,d.state,d.context),t.__k=null!=c&&c.type==_&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=d.getChildContext&&(r=m(m({},r),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(p,f)),T(e,t,n,r,i,s,a,l,u),d.base=t.__e,d.__h.length&&a.push(d),v&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=L(n.__e,t,n,r,i,s,a,u);(c=o.diffed)&&c(t)}catch(e){t.__v=null,o.__e(e,t,n)}return t.__e}function I(e,t){o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function L(e,t,n,r,i,o,s,a){var l,u,c,d,f,m=n.props,g=t.props;if(i="svg"===t.type||i,null!=o)for(l=0;l<o.length;l++)if(null!=(u=o[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,g.is&&{is:g.is}),o=null,a=!1}if(null===t.type)m!==g&&e.data!=g&&(e.data=g);else{if(null!=o&&(o=p.slice.call(e.childNodes)),c=(m=n.props||h).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!a){if(m===h)for(m={},f=0;f<e.attributes.length;f++)m[e.attributes[f].name]=e.attributes[f].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||C(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||C(e,o,t[o],n[o],r)})(e,g,m,i,a),d?t.__k=[]:(t.__k=t.props.children,T(e,t,n,r,"foreignObject"!==t.type&&i,o,s,h,a)),a||("value"in g&&void 0!==(l=g.value)&&l!==e.value&&C(e,"value",l,m.value,!1),"checked"in g&&void 0!==(l=g.checked)&&l!==e.checked&&C(e,"checked",l,m.checked,!1))}return e}function O(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){o.__e(e,n)}}function N(e,t,n){var r,i,s;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||O(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&N(r[s],t,n);null!=i&&g(i)}function R(e,t,n){return this.constructor(e,n)}function P(e,t,n){var r,i,s;o.__&&o.__(e,t),i=(r=n===c)?null:n&&n.__k||t.__k,e=v(_,null,[e]),s=[],A(t,(r?t:n||t).__k=e,i||h,h,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:p.slice.call(t.childNodes),s,n||h,r),I(s,e)}o={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return k(n.__E=n)}catch(t){e=t}throw e}},b.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),k(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},b.prototype.render=_,s=[],a=0,l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=h,d=0,("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:b,createElement:v,render:P,createRef:function(){return{}},Fragment:_,createContext:function(e){var t=function(e){var t={},n={__c:"__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,k(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var i=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&i.some((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}}return r},t},flushToDom:function(){var e=o.debounceRendering,t=[];for(o.debounceRendering=function(e){t.push(e)},P(v(F,{}),document.createElement("div"));t.length;)t.shift()();o.debounceRendering=e}};var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return v("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(b),j=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId]})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),e}();function Y(e){e.parentNode&&e.parentNode.removeChild(e)}function V(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(H(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function H(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function B(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].querySelectorAll(t),s=0;s<o.length;s++)r.push(o[s]);return r}var U=/(top|left|right|bottom|width|height)$/i;function z(e,t){for(var n in t)q(e,n,t[n])}function q(e,t,n){null==n?e.style[t]="":"number"==typeof n&&U.test(t)?e.style[t]=n+"px":e.style[t]=n}function W(e){e.preventDefault()}function $(e,t){return function(n){var r=V(n.target,e);r&&t.call(r,n,r)}}function G(e,t,n,r){var i=$(n,r);return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var K=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Z(e,t){var n=function(r){t(r),K.forEach((function(t){e.removeEventListener(t,n)}))};K.forEach((function(t){e.addEventListener(t,n)}))}var X=0;function J(){return String(X++)}function Q(){document.body.classList.add("fc-not-allowed")}function ee(){document.body.classList.remove("fc-not-allowed")}function te(e){e.classList.add("fc-unselectable"),e.addEventListener("selectstart",W)}function ne(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",W)}function re(e){e.addEventListener("contextmenu",W)}function ie(e){e.removeEventListener("contextmenu",W)}function oe(e){var t,n,r=[],i=[];for("string"==typeof e?i=e.split(/\s*,\s*/):"function"==typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t<i.length;t++)"string"==typeof(n=i[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function se(e,t,n){var r,i;for(r=0;r<n.length;r++)if(i=ae(e,t,n[r]))return i;return 0}function ae(e,t,n){return n.func?n.func(e,t):le(e[n.field],t[n.field])*(n.order||1)}function le(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}function ue(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function ce(e,t){return e-t}function de(e){return e%1==0}function he(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var pe=["sun","mon","tue","wed","thu","fri","sat"];function fe(e,t){var n=De(e);return n[2]+=7*t,Ce(n)}function me(e,t){var n=De(e);return n[2]+=t,Ce(n)}function ge(e,t){var n=De(e);return n[6]+=t,Ce(n)}function ve(e,t){return ye(e,t)/7}function ye(e,t){return(t.valueOf()-e.valueOf())/864e5}function _e(e,t){var n=xe(e),r=xe(t);return{years:0,months:0,days:Math.round(ye(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function be(e,t){var n=we(e,t);return null!==n&&n%7==0?n/7:null}function we(e,t){return Ae(e)===Ae(t)?Math.round(ye(e,t)):null}function xe(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function ke(e,t,n,r){var i=Ce([t,0,1+Se(t,n,r)]),o=xe(e),s=Math.round(ye(i,o));return Math.floor(s/7)+1}function Se(e,t,n){var r=7+t-n;return-(7+Ce([e,0,r]).getUTCDay()-t)%7+r-1}function Te(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Ee(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function De(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Ce(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function Me(e){return!isNaN(e.valueOf())}function Ae(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Ie(e,t,n,r){return{instanceId:J(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Le=Object.prototype.hasOwnProperty;function Oe(e,t){var n={};if(t)for(var r in t){for(var i=[],o=e.length-1;o>=0;o--){var s=e[o][r];if("object"==typeof s&&s)i.unshift(s);else if(void 0!==s){n[r]=s;break}}i.length&&(n[r]=Oe(i))}for(o=e.length-1;o>=0;o--){var a=e[o];for(var l in a)l in n||(n[l]=a[l])}return n}function Ne(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Re(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Pe(e){for(var t={},n=0,r=e;n<r.length;n++)t[r[n]]=!0;return t}function Fe(e){var t=[];for(var n in e)t.push(e[n]);return t}function je(e,t){if(e===t)return!0;for(var n in e)if(Le.call(e,n)&&!(n in t))return!1;for(var n in t)if(Le.call(t,n)&&e[n]!==t[n])return!1;return!0}function Ye(e,t){var n=[];for(var r in e)Le.call(e,r)&&(r in t||n.push(r));for(var r in t)Le.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function Ve(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!He(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function He(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Be(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var i=[];null==n&&(n=Object.keys(e).length);for(var o=t;o<n;o+=r){var s=e[o];void 0!==s&&i.push(s)}return i}function Ue(e,t,n){var r=n.dateEnv,i=n.pluginHooks,o=n.options,s=e.defs,a=e.instances;for(var l in a=Ne(a,(function(e){return!s[e.defId].recurringDef})),s){var u=s[l];if(u.recurringDef){var c=u.recurringDef.duration;c||(c=u.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration);for(var d=0,h=ze(u,c,t,r,i.recurringTypes);d<h.length;d++){var p=h[d],f=Ie(l,{start:p,end:r.add(p,c)});a[f.instanceId]=f}}}return{defs:s,instances:a}}function ze(e,t,n,r,i){var o=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(o=o.map(xe)),o}var qe=["years","months","days","milliseconds"],We=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function $e(e,t){var n;return"string"==typeof e?function(e){var t=We.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?Ge(e):"number"==typeof e?Ge(((n={})[t||"milliseconds"]=e,n)):null}function Ge(e){var t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function Ke(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function Ze(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function Xe(e){return Je(e)/864e5}function Je(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Qe(e,t){for(var n=null,r=0;r<qe.length;r++){var i=qe[r];if(t[i]){var o=e[i]/t[i];if(!de(o)||null!==n&&n!==o)return null;n=o}else if(e[i])return null}return n}function et(e){var t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function tt(e){return e.toISOString().replace(/T.*$/,"")}function nt(e){return ue(e.getUTCHours(),2)+":"+ue(e.getUTCMinutes(),2)+":"+ue(e.getUTCSeconds(),2)}function rt(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?n+ue(i,2)+":"+ue(o,2):"GMT"+n+i+(o?":"+ue(o,2):"")}function it(e,t,n){if(e===t)return!0;var r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r++)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function ot(e,t,n){var r,i;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(r){if(!it(r,o)){n&&n(i);var a=e.apply(this,o);t&&t(a,i)||(i=a)}}else i=e.apply(this,o);return r=o,i}}function st(e,t,n){var r,i;return function(o){if(r){if(!je(r,o)){n&&n(i);var s=e.call(this,o);t&&t(s,i)||(i=s)}}else i=e.call(this,o);return r=o,i}}var at={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},lt={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},ut=/\s*([ap])\.?m\.?/i,ct=/,/g,dt=/\s+/g,ht=/\u200e/g,pt=/UTC|GMT/,ft=function(){function e(e){var t={},n={},r=0;for(var i in e)i in at?(n[i]=e[i],r=Math.max(at[i],r)):(t[i]=e[i],i in lt&&(r=Math.max(lt[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=ot(mt)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n,r){var i=this.standardDateProps,o=this.extendedSettings,s=function(e,t,n){return n.getMarkerYear(e)!==n.getMarkerYear(t)?5:n.getMarkerMonth(e)!==n.getMarkerMonth(t)?4:n.getMarkerDay(e)!==n.getMarkerDay(t)?2:Ae(e)!==Ae(t)?1:0}(e.marker,t.marker,n.calendarSystem);if(!s)return this.format(e,n);var a=s;!(a>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(a=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=mt(function(e,t){var n={};for(var r in e)(!(r in lt)||lt[r]<=t)&&(n[r]=e[r]);return n}(i,a),o,n),d=c(e),h=c(t),p=function(e,t,n,r){for(var i=0;i<e.length;){var o=e.indexOf(t,i);if(-1===o)break;var s=e.substr(0,o);i=o+t.length;for(var a=e.substr(i),l=0;l<n.length;){var u=n.indexOf(r,l);if(-1===u)break;var c=n.substr(0,u);l=u+r.length;var d=n.substr(l);if(s===c&&a===d)return{before:s,after:a}}}return null}(l,d,u,h),f=o.separator||r||n.defaultSeparator||"";return p?p.before+d+f+h+p.after:l+f+u},e.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}},e}();function mt(e,t,n){var i=Object.keys(e).length;return 1===i&&"short"===e.timeZoneName?function(e){return rt(e.timeZoneOffset)}:0===i&&t.week?function(e){return function(e,t,n,r){var i=[];return"narrow"===r?i.push(t):"short"===r&&i.push(t," "),i.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&i.reverse(),i.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.locale,t.week)}:function(e,t,n){e=r({},e),t=r({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit")),"long"===e.timeZoneName&&(e.timeZoneName="short"),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";var i,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var s=r({},e);delete s.minute,i=new Intl.DateTimeFormat(n.locale.codes,s)}return function(r){var s=r.marker;return function(e,t,n,r,i){return e=e.replace(ht,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;return e=e.replace(pt,(function(){return n=!0,t})),n||(e+=" "+t),e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":rt(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(ct,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(ut,"").trim():"narrow"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(ut,(function(e){return e.toLocaleLowerCase()}))),(e=e.replace(dt," ")).trim()}((i&&!s.getUTCMinutes()?i:o).format(s),r,e,t,n)}}(e,t,n)}function gt(e,t){var n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function vt(e,t,n,r){var i=gt(e,n.calendarSystem);return{date:i,start:i,end:t?gt(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var yt=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,vt(e,t,n,r))},e}(),_t=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(vt(e,t,n,r))},e}();function bt(e){return"object"==typeof e&&e?new ft(e):"string"==typeof e?new yt(e):"function"==typeof e?new _t(e):void 0}var wt={navLinkDayClick:At,navLinkWeekClick:At,duration:$e,bootstrapFontAwesome:At,buttonIcons:At,customButtons:At,defaultAllDayEventDuration:$e,defaultTimedEventDuration:$e,nextDayThreshold:$e,scrollTime:$e,slotMinTime:$e,slotMaxTime:$e,dayPopoverFormat:bt,slotDuration:$e,snapDuration:$e,headerToolbar:At,footerToolbar:At,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:bt,dayHeaderClassNames:At,dayHeaderContent:At,dayHeaderDidMount:At,dayHeaderWillUnmount:At,dayCellClassNames:At,dayCellContent:At,dayCellDidMount:At,dayCellWillUnmount:At,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:At,weekNumbers:Boolean,weekNumberClassNames:At,weekNumberContent:At,weekNumberDidMount:At,weekNumberWillUnmount:At,editable:Boolean,viewClassNames:At,viewDidMount:At,viewWillUnmount:At,nowIndicator:Boolean,nowIndicatorClassNames:At,nowIndicatorContent:At,nowIndicatorDidMount:At,nowIndicatorWillUnmount:At,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:At,locale:At,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:At,eventOrder:oe,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:At,contentHeight:At,direction:String,weekNumberFormat:bt,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:At,initialDate:At,now:At,eventDataTransform:At,stickyHeaderDates:At,stickyFooterScrollbar:At,viewHeight:At,defaultAllDay:Boolean,eventSourceFailure:At,eventSourceSuccess:At,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:At,eventConstraint:At,eventAllow:At,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:At,eventContent:At,eventDidMount:At,eventWillUnmount:At,selectConstraint:At,selectOverlap:At,selectAllow:At,droppable:Boolean,unselectCancel:String,slotLabelFormat:At,slotLaneClassNames:At,slotLaneContent:At,slotLaneDidMount:At,slotLaneWillUnmount:At,slotLabelClassNames:At,slotLabelContent:At,slotLabelDidMount:At,slotLabelWillUnmount:At,dayMaxEvents:At,dayMaxEventRows:At,dayMinWidth:Number,slotLabelInterval:$e,allDayText:String,allDayClassNames:At,allDayContent:At,allDayDidMount:At,allDayWillUnmount:At,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:bt,rerenderDelay:Number,moreLinkText:At,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMinHeight:Number,slotEventOverlap:Boolean,plugins:At,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:$e,hiddenDays:At,monthMode:Boolean,fixedWeekCount:Boolean,validRange:At,visibleRange:At,titleFormat:At,noEventsText:String},xt={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" \u2013 ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1},kt={datesSet:At,eventsSet:At,eventAdd:At,eventChange:At,eventRemove:At,windowResize:At,eventClick:At,eventMouseEnter:At,eventMouseLeave:At,select:At,unselect:At,loading:At,_unmount:At,_beforeprint:At,_afterprint:At,_noEventDrop:At,_noEventResize:At,_resize:At,_scrollRequest:At},St={buttonText:At,views:At,plugins:At,initialEvents:At,events:At,eventSources:At},Tt={headerToolbar:Et,footerToolbar:Et,buttonText:Et,buttonIcons:Et};function Et(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?je(e,t):e===t}var Dt={type:String,component:At,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:At,usesMinMaxTime:Boolean,classNames:At,content:At,didMount:At,willUnmount:At};function Ct(e){return Oe(e,Tt)}function Mt(e,t){var n={},r={};for(var i in t)i in e&&(n[i]=t[i](e[i]));for(var i in e)i in t||(r[i]=e[i]);return{refined:n,extra:r}}function At(e){return e}function It(e,t,n,r){for(var i={defs:{},instances:{}},o=$t(n),s=0,a=e;s<a.length;s++){var l=qt(a[s],t,n,r,o);l&&Lt(l,i)}return i}function Lt(e,t){return void 0===t&&(t={defs:{},instances:{}}),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Ot(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],i=Rt(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return{defs:{},instances:{}}}function Nt(e,t){return{defs:r(r({},e.defs),t.defs),instances:r(r({},e.instances),t.instances)}}function Rt(e,t){var n=Ne(e.defs,t),r=Ne(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function Pt(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Ft={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:At,overlap:At,allow:At,className:Pt,classNames:Pt,color:String,backgroundColor:String,borderColor:String,textColor:String};function jt(e,t){var n=function(e,t){return Array.isArray(e)?It(e,null,t,!0):"object"==typeof e&&e?It([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function Yt(e){return e.reduce(Vt,Ht)}function Vt(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var Ht={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]},Bt={id:String,groupId:String,title:String,url:String},Ut={start:At,end:At,date:At,allDay:Boolean},zt=r(r(r({},Bt),Ut),{extendedProps:At});function qt(e,t,n,r,i){void 0===i&&(i=$t(n));var o=Wt(e,n,i),s=o.refined,a=o.extra,l=function(e,t){var n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),u=function(e,t,n,r){for(var i=0;i<r.length;i++){var o=r[i].parse(e,n);if(o){var s=e.allDay;return null==s&&null==(s=t)&&null==(s=o.allDayGuess)&&(s=!1),{allDay:s,duration:o.duration,typeData:o.typeData,typeId:i}}}return null}(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(c=Gt(s,a,t?t.sourceId:"",u.allDay,Boolean(u.duration),n)).recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:c,instance:null};var c,d=function(e,t,n,r){var i,o,s=e.allDay,a=null,l=!1,u=null,c=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(c))a=i.marker;else if(!r)return null;return null!=e.end&&(o=n.dateEnv.createMarkerMeta(e.end)),null==s&&(s=null!=t?t:(!i||i.isTimeUnspecified)&&(!o||o.isTimeUnspecified)),s&&a&&(a=xe(a)),o&&(u=o.marker,s&&(u=xe(u)),a&&u<=a&&(u=null)),u?l=!0:r||(l=n.options.forceEventDuration||!1,u=n.dateEnv.add(a,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:s,hasEnd:l,range:{start:a,end:u},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:o?o.forcedTzo:null}}(s,l,n,r);return d?{def:c=Gt(s,a,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:Ie(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function Wt(e,t,n){return void 0===n&&(n=$t(t)),Mt(e,n)}function $t(e){return r(r(r({},Ft),zt),e.pluginHooks.eventRefiners)}function Gt(e,t,n,i,o,s){for(var a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:J(),sourceId:n,allDay:i,hasEnd:o,ui:jt(e,s),extendedProps:r(r({},e.extendedProps||{}),t)},l=0,u=s.pluginHooks.eventDefMemberAdders;l<u.length;l++){var c=u[l];r(a,c(e))}return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function Kt(e){var t=Math.floor(ye(e.start,e.end))||1,n=xe(e.start);return{start:n,end:me(n,t)}}function Zt(e,t){void 0===t&&(t=$e(0));var n=null,r=null;if(e.end){r=xe(e.end);var i=e.end.valueOf()-r.valueOf();i&&i>=Je(t)&&(r=me(r,1))}return e.start&&(n=xe(e.start),r&&r<=n&&(r=me(n,1))),{start:n,end:r}}function Xt(e){var t=Zt(e);return ye(t.start,t.end)>1}function Jt(e,t,n,r){return"year"===r?$e(n.diffWholeYears(e,t),"year"):"month"===r?$e(n.diffWholeMonths(e,t),"month"):_e(e,t)}function Qt(e,t){var n,r,i=[],o=t.start;for(e.sort(en),n=0;n<e.length;n++)(r=e[n]).start>o&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return o<t.end&&i.push({start:o,end:t.end}),i}function en(e,t){return e.start.valueOf()-t.start.valueOf()}function tn(e,t){var n=e.start,r=e.end,i=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(i={start:n,end:r}),i}function nn(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function rn(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function on(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function sn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function an(e,t,n,r){var i={},o={},s={},a=[],l=[],u=dn(e.defs,t);for(var c in e.defs)"inverse-background"===(p=u[(b=e.defs[c]).defId]).display&&(b.groupId?(i[b.groupId]=[],s[b.groupId]||(s[b.groupId]=b)):o[c]=[]);for(var d in e.instances){var h=e.instances[d],p=u[(b=e.defs[h.defId]).defId],f=h.range,m=!b.allDay&&r?Zt(f,r):f,g=tn(m,n);g&&("inverse-background"===p.display?b.groupId?i[b.groupId].push(g):o[h.defId].push(g):"none"!==p.display&&("background"===p.display?a:l).push({def:b,ui:p,instance:h,range:g,isStart:m.start&&m.start.valueOf()===g.start.valueOf(),isEnd:m.end&&m.end.valueOf()===g.end.valueOf()}))}for(var v in i)for(var y=0,_=Qt(i[v],n);y<_.length;y++){var b,w=_[y];p=u[(b=s[v]).defId],a.push({def:b,ui:p,instance:null,range:w,isStart:!1,isEnd:!1})}for(var c in o)for(var x=0,k=Qt(o[c],n);x<k.length;x++)w=k[x],a.push({def:e.defs[c],ui:u[c],instance:null,range:w,isStart:!1,isEnd:!1});return{bg:a,fg:l}}function ln(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function un(e,t){e.fcSeg=t}function cn(e){return e.fcSeg||e.parentNode.fcSeg||null}function dn(e,t){return Re(e,(function(e){return hn(e,t)}))}function hn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Yt(n)}function pn(e,t){var n=e.map(fn);return n.sort((function(e,n){return se(e,n,t)})),n.map((function(e){return e._seg}))}function fn(e){var t=e.eventRange,n=t.def,i=t.instance?t.instance.range:t.range,o=i.start?i.start.valueOf():0,s=i.end?i.end.valueOf():0;return r(r(r({},n.extendedProps),n),{id:n.publicId,start:o,end:s,duration:s-o,allDay:Number(n.allDay),_seg:e})}function mn(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,i=r.def,o=r.ui,s=o.startEditable,a=0,l=n;a<l.length;a++)s=(0,l[a])(s,i,o,t);return s}function gn(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function vn(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function yn(e,t,n,r,i,o,s){var a=n.dateEnv,l=n.options,u=l.displayEventTime,c=l.displayEventEnd,d=e.eventRange.def,h=e.eventRange.instance;if(null==u&&(u=!1!==r),null==c&&(c=!1!==i),u&&!d.allDay&&(e.isStart||e.isEnd)){var p=o||(e.isStart?h.range.start:e.start||e.eventRange.range.start),f=s||(e.isEnd?h.range.end:e.end||e.eventRange.range.end);return c&&d.hasEnd?a.formatRange(p,f,t,{forcedStartTzo:o?null:h.forcedStartTzo,forcedEndTzo:s?null:h.forcedEndTzo}):a.format(p,t,{forcedTzo:o?null:h.forcedStartTzo})}return""}function _n(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&sn(t,r.start)}}function bn(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function wn(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}var xn={start:At,end:At,allDay:Boolean};function kn(e,t,n){var i=function(e,t){var n=Mt(e,xn),i=n.refined,o=n.extra,s=i.start?t.createMarkerMeta(i.start):null,a=i.end?t.createMarkerMeta(i.end):null,l=i.allDay;return null==l&&(l=s&&s.isTimeUnspecified&&(!a||a.isTimeUnspecified)),r({range:{start:s?s.marker:null,end:a?a.marker:null},allDay:l},o)}(e,t),o=i.range;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return i}function Sn(e,t){return nn(e.range,t.range)&&e.allDay===t.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(e,t)}function Tn(e,t,n){return r(r({},En(e,t,n)),{timeZone:t.timeZone})}function En(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function Dn(e,t,n){n.emitter.trigger("select",r(r({},Cn(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Cn(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.dateSpanTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,i=t.dateEnv,r(r({},En(n.range,i,n.allDay)),{allDay:n.allDay}))),o}function Mn(e,t,n){var r=n.dateEnv,i=n.options,o=t;return e?(o=xe(o),o=r.add(o,i.defaultAllDayEventDuration)):o=r.add(o,i.defaultTimedEventDuration),o}function An(e,t,n,r){var i=dn(e.defs,t),o={defs:{},instances:{}};for(var s in e.defs){var a=e.defs[s];o.defs[s]=In(a,i[s],n,r)}for(var l in e.instances){var u=e.instances[l];a=o.defs[u.defId],o.instances[l]=Ln(u,a,i[u.defId],n,r)}return o}function In(e,t,n,i){var o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);var s=r(r(r({},e),o),{ui:r(r({},e.ui),o.ui)});n.extendedProps&&(s.extendedProps=r(r({},s.extendedProps),n.extendedProps));for(var a=0,l=i.pluginHooks.eventDefMutationAppliers;a<l.length;a++)(0,l[a])(s,n,i);return!s.hasEnd&&i.options.forceEventDuration&&(s.hasEnd=!0),s}function Ln(e,t,n,i,o){var s=o.dateEnv,a=i.standardProps&&!0===i.standardProps.allDay,l=i.standardProps&&!1===i.standardProps.hasEnd,u=r({},e);return a&&(u.range=Kt(u.range)),i.datesDelta&&n.startEditable&&(u.range={start:s.add(u.range.start,i.datesDelta),end:s.add(u.range.end,i.datesDelta)}),i.startDelta&&n.durationEditable&&(u.range={start:s.add(u.range.start,i.startDelta),end:u.range.end}),i.endDelta&&n.durationEditable&&(u.range={start:u.range.start,end:s.add(u.range.end,i.endDelta)}),l&&(u.range={start:u.range.start,end:Mn(t.allDay,u.range.start,o)}),t.allDay&&(u.range={start:xe(u.range.start),end:xe(u.range.end)}),u.range.end<u.range.start&&(u.range.end=Mn(t.allDay,u.range.start,o)),u}var On=function(){function e(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}return Object.defineProperty(e.prototype,"calendar",{get:function(){return this.getCurrentData().calendarApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.getCurrentData().viewTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)},enumerable:!1,configurable:!0}),e.prototype.getOption=function(e){return this.getCurrentData().options[e]},e}(),Nn={id:String,defaultAllDay:Boolean,url:String,events:At,eventDataTransform:At,success:At,failure:At};function Rn(e,t,n){var r;if(void 0===n&&(n=Pn(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var i=Mt(r,n),o=i.refined,s=i.extra,a=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r--){var i=n[r].parseMeta(e);if(i)return{sourceDefId:r,meta:i}}return null}(o,t);if(a)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:J(),sourceDefId:a.sourceDefId,meta:a.meta,ui:jt(o,t),extendedProps:s}}return null}function Pn(e){return r(r(r({},Ft),Nn),e.pluginHooks.eventSourceRefiners)}function Fn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var jn=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.currentDataManager.emitter).trigger.apply(t,i([e],n))},e.prototype.changeView=function(e,t){var n=this;this.batchRendering((function(){if(n.unselect(),t)if(t.start&&t.end)n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),n.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{var r=n.getCurrentData().dateEnv;n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))},e.prototype.zoomTo=function(e,t){var n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.getCurrentData(),i=r.viewSpecs,o=r.toolbarConfig,s=[].concat(o.viewsWithButtons);for(var a in i)s.push(a);for(t=0;t<s.length;t++)if((n=i[s[t]])&&n.singleUnit===e)return n},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})},e.prototype.nextYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})},e.prototype.today=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Fn(e.calendarOptions.now,e.dateEnv)})},e.prototype.gotoDate=function(e){var t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=this.getCurrentData(),n=$e(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))},e.prototype.getDate=function(){var e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)},e.prototype.formatDate=function(e,t){var n=this.getCurrentData().dateEnv;return n.format(n.createMarker(e),bt(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),bt(n),n)},e.prototype.formatIso=function(e,t){var n=this.getCurrentData().dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.select=function(e,t){var n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};var r=this.getCurrentData(),i=kn(n,r.dateEnv,$e({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),Dn(i,null,r))},e.prototype.unselect=function(e){var t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))},e.prototype.addEvent=function(e,t){if(e instanceof Yn){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Lt({def:n,instance:r})}),this.triggerEventAdd(e)),e}var i,o=this.getCurrentData();if(t instanceof j)i=t.internalEventSource;else if("boolean"==typeof t)t&&(i=Fe(o.eventSources)[0]);else if(null!=t){var s=this.getEventSourceById(t);if(!s)return console.warn('Could not find an event source with ID "'+t+'"'),null;i=s.internalEventSource}var a=qt(e,i,o,!1);if(a){var l=new Yn(o,a.def,a.def.recurringDef?null:a.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Lt(a)}),this.triggerEventAdd(l),l}return null},e.prototype.triggerEventAdd=function(e){var t=this;this.getCurrentData().emitter.trigger("eventAdd",{event:e,relatedEvents:[],revert:function(){t.dispatch({type:"REMOVE_EVENTS",eventStore:Vn(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,i=n.instances;for(var o in e=String(e),r){var s=r[o];if(s.publicId===e){if(s.recurringDef)return new Yn(t,s,null);for(var a in i){var l=i[a];if(l.defId===s.defId)return new Yn(t,s,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Hn(e.eventStore,e)},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.getEventSources=function(){var e=this.getCurrentData(),t=e.eventSources,n=[];for(var r in t)n.push(new j(e,t[r]));return n},e.prototype.getEventSourceById=function(e){var t=this.getCurrentData(),n=t.eventSources;for(var r in e=String(e),n)if(n[r].publicId===e)return new j(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof j)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=Rn(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new j(t,n)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES"})},e.prototype.scrollToTime=function(e){var t=$e(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),Yn=function(){function e(e,t,n){this._context=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in Ut)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e in Bt)t=Bt[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in Ft){var i=Ft[e](t);"color"===e?i={backgroundColor:t,borderColor:t}:"editable"===e?i={startEditable:t,durationEditable:t}:((r={})[e]=t,i=r),this.mutate({standardProps:{ui:i}})}else console.warn("Could not set prop '"+e+"'. Use setExtendedProp instead.")},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._context.dateEnv,r=n.createMarker(e);if(r&&this._instance){var i=Jt(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._context.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var i=Jt(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,i,o,s=this._context.dateEnv,a={allDay:n.allDay},l=s.createMarker(e);if(l&&(null==t||(r=s.createMarker(t)))&&this._instance){var u=this._instance.range;!0===n.allDay&&(u=Kt(u));var c=Jt(u.start,l,s,n.granularity);if(r){var d=Jt(u.end,r,s,n.granularity);o=d,(i=c).years===o.years&&i.months===o.months&&i.days===o.days&&i.milliseconds===o.milliseconds?this.mutate({datesDelta:c,standardProps:a}):this.mutate({startDelta:c,endDelta:d,standardProps:a})}else a.hasEnd=!1,this.mutate({datesDelta:c,standardProps:a})}},e.prototype.moveStart=function(e){var t=$e(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=$e(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=$e(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._context.dateEnv,n=this._instance,r=bt(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})},e.prototype.mutate=function(t){var n=this._instance;if(n){var r=this._def,i=this._context,o=Ot(i.getCurrentData().eventStore,n.instanceId);o=An(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,i);var s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:Hn(o,i,n),revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:o})}})}},e.prototype.remove=function(){var e=this._context,t=Vn(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert:function(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new j(this._context,this._context.getCurrentData().eventSources[e]):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startStr",{get:function(){var e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endStr",{get:function(){var e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"display",{get:function(){return this._def.ui.display||"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!1,configurable:!0}),e.prototype.toPlainObject=function(e){void 0===e&&(e={});var t=this._def,n=t.ui,i=this.startStr,o=this.endStr,s={};return t.title&&(s.title=t.title),i&&(s.start=i),o&&(s.end=o),t.publicId&&(s.id=t.publicId),t.groupId&&(s.groupId=t.groupId),t.url&&(s.url=t.url),n.display&&"auto"!==n.display&&(s.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?s.color=n.backgroundColor:(n.backgroundColor&&(s.backgroundColor=n.backgroundColor),n.borderColor&&(s.borderColor=n.borderColor)),n.textColor&&(s.textColor=n.textColor),n.classNames.length&&(s.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?r(s,t.extendedProps):s.extendedProps=t.extendedProps),s},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function Vn(e){var t,n,r=e._def,i=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:i?(n={},n[i.instanceId]=i,n):{}}}function Hn(e,t,n){var r=e.defs,i=e.instances,o=[],s=n?n.instanceId:"";for(var a in i){var l=i[a],u=r[l.defId];l.instanceId!==s&&o.push(new Yn(t,u,l))}return o}var Bn,Un={},zn=function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return Ce(e)},e.prototype.markerToArray=function(e){return De(e)},e}();Bn=zn,Un.gregory=Bn;var qn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Wn(e){var t=qn.exec(e);if(t){var n=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number("0."+t[12]):0));if(Me(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}var $n=function(){function e(e){var t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new Un[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Ce(Te(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Ce(e)),null!==t&&Me(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=Wn(e);if(null===t)return null;var n=t.marker,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.subtract=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return Ae(e)===Ae(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:null!==(n=be(e,t))?{unit:"week",value:n}:null!==(n=we(e,t))?{unit:"day",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t))?{unit:"hour",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t))?{unit:"minute",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t))?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/(Xe(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Xe(e)/30}(n):n.days&&null!==(r=we(e,t))?r/Xe(n):(t.valueOf()-e.valueOf())/Je(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?xe(e):"hour"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Ce([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):void 0},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){var r=e.getUTCFullYear(),i=ke(e,r,t,n);if(i<1)return ke(e,r-1,t,n);var o=ke(e,r+1,t,n);return o>=1?Math.min(i,o):i}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=ge(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",rt(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?Ce(Te(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Ce(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Ee(De(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(De(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Ee(De(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(De(e))*60):new Date(e.valueOf()-(t||0))},e}(),Gn=[],Kn={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"};function Zn(e){for(var t=e.length>0?e[0].code:"en",n=Gn.concat(e),r={en:Kn},i=0,o=n;i<o.length;i++){var s=o[i];r[s.code]=s}return{map:r,defaultCode:t}}function Xn(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){var n=[].concat(e||[]),r=function(e,t){for(var n=0;n<e.length;n++)for(var r=e[n].toLocaleLowerCase().split("-"),i=r.length;i>0;i--){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||Kn;return Jn(e,n,r)}(e,t):Jn(e.code,[e.code],e)}function Jn(e,t,n){var r=Oe([Kn,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Qn(e){var t=Xn(e.locale||"en",Zn([]).map);return new $n(r(r({timeZone:xt.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var er,tr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function nr(e,t){return It(function(e){return(!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[]).map((function(e){return r(r({},tr),e)}))}(e),null,t)}function rr(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function ir(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function or(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}}function sr(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function ar(e,t){return{left:e.left-t.left,top:e.top-t.top}}function lr(){return null==er&&(er=function(){if("undefined"==typeof document)return!0;var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),er}var ur={defs:{},instances:{}},cr=function(){function e(){this.getKeysForEventDefs=ot(this._getKeysForEventDefs),this.splitDateSelection=ot(this._splitDateSpan),this.splitEventStore=ot(this._splitEventStore),this.splitIndividualUi=ot(this._splitIndividualUi),this.splitEventDrag=ot(this._splitInteraction),this.splitEventResize=ot(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,r),s=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Re(n,(function(e,n){return t.eventUiBuilders[n]||ot(dr)})),n){var d=n[c],h=s[c]||ur,p=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:h,eventUiBases:p(e.eventUiBases[""],d.ui,o[c]),eventSelection:h.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++)t[r[n]]=e;return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return Re(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,i={};for(var o in n)for(var s=0,a=t[o];s<a.length;s++)i[h=a[s]]||(i[h]={defs:{},instances:{}}),i[h].defs[o]=n[o];for(var l in r)for(var u=r[l],c=0,d=t[u.defId];c<d.length;c++){var h;i[h=d[c]]&&(i[h].instances[l]=u)}return i},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var i=0,o=t[r];i<o.length;i++){var s=o[i];n[s]||(n[s]={}),n[s][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),i=this._splitEventStore(e.mutatedEvents,r),o=function(r){t[r]||(t[r]={affectedEvents:n[r]||ur,mutatedEvents:i[r]||ur,isEvent:e.isEvent})};for(var s in n)o(s);for(var s in i)o(s)}return t},e}();function dr(e,t,n){var i=[];e&&i.push(e),t&&i.push(t);var o={"":Yt(i)};return n&&r(o,n),o}function hr(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!sn(r.activeRange,e)),isOther:Boolean(r&&!sn(r.currentRange,e)),isToday:Boolean(t&&sn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function pr(e,t){var n=["fc-day","fc-day-"+pe[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}function fr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:tt(e),type:t})}var mr,gr=null;function vr(){return null===gr&&(gr=function(){var e=document.createElement("div");z(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Y(e),t}()),gr}function yr(){return mr||(mr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=_r(e);return document.body.removeChild(e),t}()),mr}function _r(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function br(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,s=parseInt(n.borderBottomWidth,10)||0,a=_r(e),l=a.y-r-i,u={borderLeft:r,borderRight:i,borderTop:o,borderBottom:s,scrollbarBottom:a.x-o-s,scrollbarLeft:0,scrollbarRight:0};return vr()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function wr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():xr(e),i=br(e,t),o={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o}function xr(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function kr(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function Sr(e,t,n){var r=!1,i=function(){r||(r=!0,t.apply(this,arguments))},o=function(){r||(r=!0,n&&n.apply(this,arguments))},s=e(i,o);s&&"function"==typeof s.then&&s.then(i,o)}var Tr=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=this.handlers[e]||[],i=this.options&&this.options[e],o=0,s=[].concat(i||[],r);o<s.length;o++){s[o].apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e]},e}(),Er=function(){function e(e,t,n,r){this.els=t;var i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.left-e),n.push(o.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.top-e),n.push(o.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),Dr=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),Cr=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return n(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(Dr),Mr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(Dr),Ar=function(){function e(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}return e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=r({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e,t){var n;return(n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e])?this.baseIconClass+" "+n:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();if(Ar.prototype.classes={},Ar.prototype.iconClasses={},Ar.prototype.baseIconClass="",Ar.prototype.iconOverridePrefix="","undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Ir=FullCalendarVDom.Component,Lr=FullCalendarVDom.createElement,Or=FullCalendarVDom.render,Nr=FullCalendarVDom.createRef,Rr=FullCalendarVDom.Fragment,Pr=FullCalendarVDom.createContext,Fr=FullCalendarVDom.flushToDom,jr=function(){function e(e,t,n){var i=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.handleScrollRequest=function(e){i.queuedRequest=r({},i.queuedRequest||{},e),i.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}return e.prototype.detach=function(){this.emitter.off("_scrollRequest",this.handleScrollRequest)},e.prototype.update=function(e){e?this.fireInitialScroll():this.drain()},e.prototype.fireInitialScroll=function(){this.handleScrollRequest({time:this.scrollTime})},e.prototype.drain=function(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)},e}(),Yr=Pr({});function Vr(e,t,n,r,i,o,s,a,l,u,c,d,h){return{dateEnv:i,options:n,pluginHooks:s,emitter:u,dispatch:a,getCurrentData:l,calendarApi:c,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new jr(e,u,$e(n.scrollTime))},registerInteractiveComponent:d,unregisterInteractiveComponent:h}}var Hr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(Ye(e,this.props),Ye(t,this.state)),!Ve(this.props,e,this.propEquality)||!Ve(this.state,t,this.stateEquality)},t.addPropsEquality=Ur,t.addStateEquality=zr,t.contextType=Yr,t}(Ir);Hr.prototype.propEquality={},Hr.prototype.stateEquality={};var Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.contextType=Yr,t}(Hr);function Ur(e){var t=Object.create(this.prototype.propEquality);r(t,e),this.prototype.propEquality=t}function zr(e){var t=Object.create(this.prototype.stateEquality);r(t,e),this.prototype.stateEquality=t}function qr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Wr(e,t){var n;if(t){n=[];for(var r=0,i=e;r<i.length;r++){var o=i[r],s=t(o);s?n.push(s):null==s&&n.push(o)}}else n=e;return n}function $r(e,t){return Rt(e,(function(e){return e.sourceId!==t}))}function Gr(e,t){return Kr({eventDrag:e},t)}function Kr(e,t){var n=t.getCurrentData(),i=r({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||Zr)(i,t)}function Zr(e,t,n,i){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,i){var o=t.getCurrentData(),s=e.eventDrag,a=s.mutatedEvents,l=a.defs,u=a.instances,c=dn(l,s.isEvent?e.eventUiBases:{"":o.selectionConfig});i&&(c=Re(c,i));var d,h,p=(d=e.eventStore,h=s.affectedEvents.instances,{defs:d.defs,instances:Ne(d.instances,(function(e){return!h[e.instanceId]}))}),f=p.defs,m=p.instances,g=dn(f,e.eventUiBases);for(var v in u){var y=u[v],_=y.range,b=c[y.defId],w=l[y.defId];if(!Xr(b.constraints,_,p,e.businessHours,t))return!1;var x=t.options.eventOverlap,k="function"==typeof x?x:null;for(var S in m){var T=m[S];if(rn(_,T.range)){if(!1===g[T.defId].overlap&&s.isEvent)return!1;if(!1===b.overlap)return!1;if(k&&!k(new Yn(t,f[T.defId],T),new Yn(t,w,y)))return!1}}for(var E=o.eventStore,D=0,C=b.allows;D<C.length;D++){var M,A=C[D],I=r(r({},n),{range:y.range,allDay:w.allDay}),L=E.defs[w.defId],O=E.instances[v];if(M=L?new Yn(t,L,O):new Yn(t,w),!A(Cn(I,t),M))return!1}}return!0}(e,t,n,i)||e.dateSelection&&!function(e,t,n,i){var o=e.eventStore,s=o.defs,a=o.instances,l=e.dateSelection,u=l.range,c=t.getCurrentData().selectionConfig;if(i&&(c=i(c)),!Xr(c.constraints,u,o,e.businessHours,t))return!1;var d=t.options.selectOverlap,h="function"==typeof d?d:null;for(var p in a){var f=a[p];if(rn(u,f.range)){if(!1===c.overlap)return!1;if(h&&!h(new Yn(t,s[f.defId],f),null))return!1}}for(var m=0,g=c.allows;m<g.length;m++){if(!(0,g[m])(Cn(r(r({},n),l),t),null))return!1}return!0}(e,t,n,i))}function Xr(e,t,n,r,i){for(var o=0,s=e;o<s.length;o++)if(!ei(Jr(s[o],t,n,r,i),t))return!1;return!0}function Jr(e,t,n,r,i){return"businessHours"===e?Qr(Ue(r,t,i)):"string"==typeof e?Qr(Rt(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?Qr(Ue(e,t,i)):[]}function Qr(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function ei(e,t){for(var n=0,r=e;n<r.length;n++)if(on(r[n],t))return!0;return!1}var ti=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=J(),t}return n(t,e),t.prototype.prepareHits=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isInteractionValid=function(e){var t=this.props.dateProfile,n=e.mutatedEvents.instances;if(t)for(var r in n)if(!on(t.validRange,n[r].range))return!1;return Gr(e,this.context)},t.prototype.isDateSelectionValid=function(e){var t=this.props.dateProfile;return!(t&&!on(t.validRange,e.range))&&Kr({dateSelection:e},this.context)},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!V(e,".fc-event-mirror")&&(this.isPopover()||!this.isInPopover(e))},t.prototype.isValidDateDownEl=function(e){return!(V(e,".fc-event:not(.fc-bg-event)")||V(e,".fc-daygrid-more-link")||V(e,"a[data-navlink]")||this.isInPopover(e))},t.prototype.isPopover=function(){return!1},t.prototype.isInPopover=function(e){return Boolean(V(e,".fc-popover"))},t}(Br);function ni(e){return{id:J(),deps:e.deps||[],reducers:e.reducers||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],eventResizeJoinTransforms:e.eventResizeJoinTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,contentTypeHandlers:e.contentTypeHandlers||{},listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}var ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);function ii(e,t,n,i){if(t[e])return t[e];var o=function(e,t,n,i){var o=n[e],s=i[e],a=function(e){return o&&null!==o[e]?o[e]:s&&null!==s[e]?s[e]:null},l=a("component"),u=a("superType"),c=null;if(u){if(u===e)throw new Error("Can't have a custom view type that references itself");c=ii(u,t,n,i)}return!l&&c&&(l=c.component),l?{type:e,component:l,defaults:r(r({},c?c.defaults:{}),o?o.rawOptions:{}),overrides:r(r({},c?c.overrides:{}),s?s.rawOptions:{})}:null}(e,t,n,i);return o&&(t[e]=o),o}ri.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},ri.prototype.baseIconClass="fc-icon",ri.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},ri.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},ri.prototype.iconOverrideOption="buttonIcons",ri.prototype.iconOverrideCustomButtonOption="icon",ri.prototype.iconOverridePrefix="fc-icon-";var oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.handleRootEl=function(e){qr(t.rootElRef,e),t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return Lr(ui,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return Lr(ai,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,i){return t.children(r,di(t.classNames,n),e,i)}))}))},t}(Br),si=Pr(0);function ai(e){return Lr(si.Consumer,null,(function(t){return Lr(li,r({renderId:t},e))}))}var li=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Nr(),t}return n(t,e),t.prototype.render=function(){return this.props.children(this.innerElRef,this.renderInnerContent())},t.prototype.componentDidMount=function(){this.updateCustomContent()},t.prototype.componentDidUpdate=function(){this.updateCustomContent()},t.prototype.renderInnerContent=function(){var e=this.context.pluginHooks.contentTypeHandlers,t=this.props,n=this.customContentInfo,r=hi(t.content,t.hookProps),i=null;if(void 0===r&&(r=hi(t.defaultContent,t.hookProps)),void 0!==r){if(n)n.contentVal=r[n.contentKey];else if("object"==typeof r)for(var o in e)if(void 0!==r[o]){n=this.customContentInfo={contentKey:o,contentVal:r[o],handler:e[o]()};break}i=n?[]:r}return i},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.handler(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(Br),ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t}(Br);function ci(){var e,t,n=[];return function(r,i){return t&&je(t,i)&&r===e||(e=r,t=i,n=di(r,i)),n}}function di(e,t){return"function"==typeof e&&(e=e(t)),Pt(e)}function hi(e,t){return"function"==typeof e?e(t,Lr):e}var pi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},i=this.normalizeClassNames(n.viewClassNames,r);return Lr(ui,{hookProps:r,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount,elRef:e.elRef},(function(t){return e.children(t,["fc-"+e.viewSpec.type+"-view","fc-view"].concat(i))}))},t}(Br);function fi(e){return Re(e,mi)}function mi(e){var t,n="function"==typeof e?{component:e}:e,i=n.component;return n.content&&(t=n,i=function(e){return Lr(Yr.Consumer,null,(function(n){return Lr(pi,{viewSpec:n.viewSpec},(function(i,o){var s=r(r({},e),{nextDayThreshold:n.options.nextDayThreshold});return Lr(oi,{hookProps:s,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:i},(function(e,t,n,r){return Lr("div",{className:o.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:i,rawOptions:n}}function gi(e,t,n,i){var o=fi(e),s=fi(t.views);return Re(function(e,t){var n,r={};for(n in e)ii(n,r,e,t);for(n in t)ii(n,r,e,t);return r}(o,s),(function(e){return function(e,t,n,i,o){var s=e.overrides.duration||e.defaults.duration||i.duration||n.duration,a=null,l="",u="",c={};if(s&&(a=function(e){var t=JSON.stringify(e),n=vi[t];return void 0===n&&(n=$e(e),vi[t]=n),n}(s))){var d=et(a);l=d.unit,1===d.value&&(u=l,c=t[l]?t[l].rawOptions:{})}var h=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[u]?n[u]:void 0};return{type:e.type,component:e.component,duration:a,durationUnit:l,singleUnit:u,optionDefaults:e.defaults,optionOverrides:r(r({},c),e.overrides),buttonTextOverride:h(i)||h(n)||e.overrides.buttonText,buttonTextDefault:h(o)||e.defaults.buttonText||h(xt)||e.type}}(e,s,t,n,i)}))}var vi={},yi=function(){function e(e){this.props=e,this.nowDate=Fn(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,i,o,s,a,l,u,c,d=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(u=e,e=null!=(c=r).start&&u<c.start?c.start:null!=c.end&&u>=c.end?new Date(c.end.valueOf()-1):u),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),s=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),a=s=this.trimHiddenDays(s),d.showNonCurrentDates||(a=tn(a,i.range)),a=tn(a=this.adjustActiveRange(a),r),l=rn(i.range,r),{validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:a,renderRange:s,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,i=null,o=null,s=null;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(e,t,i,o)):(n=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=et(i=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}},e.prototype.getFallbackDuration=function(){return $e({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,i=t.slotMinTime,o=t.slotMaxTime,s=e.start,a=e.end;return r&&(Xe(i)<0&&(s=xe(s),s=n.add(s,i)),Xe(o)>1&&(a=me(a=xe(a),-1),a=n.add(a,o))),{start:s,end:a}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,s,a=this.props,l=a.dateEnv,u=a.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&Je(c)<Je(n)?et(c).unit:r}function d(){i=l.startOf(e,u),o=l.add(i,n),s={start:i,end:o}}return Xe(n)<=1&&this.isHiddenDay(i)&&(i=xe(i=this.skipHiddenDays(i,t))),d(),this.trimHiddenDays(s)||(e=this.skipHiddenDays(e,t),d()),s},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,i=this.props,o=i.dateEnv,s=i.dateAlignment,a=0,l=e;s&&(l=o.startOf(l,s)),l=xe(l),r=l=this.skipHiddenDays(l,t);do{r=me(r,1),this.isHiddenDay(r)||a++}while(a<n);return{start:l,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.props,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return!i||null!=i.start&&null!=i.end?i:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t;return this.props.dateIncrement||((t=this.props.dateAlignment)?$e(1,t):e||$e({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,i=null,o=null,n.start&&(i=r.createMarker(n.start)),n.end&&(o=r.createMarker(n.end)),i||o?i&&o&&o<i?null:{start:i,end:o}:null);return t&&(t=Zt(t)),t}var n,r,i,o;return null},e.prototype.initHiddenDays=function(){var e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==t.indexOf(e))||r++;if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=me(e,t);return e},e}();function _i(e){var t=0;for(var n in e)e[n].isFetching&&t++;return t}function bi(e,t,n,i){for(var o={},s=0,a=t;s<a.length;s++){var l=a[s];o[l.sourceId]=l}return n&&(o=wi(o,n,i)),r(r({},e),o)}function wi(e,t,n){return xi(e,Ne(e,(function(e){return function(e,t,n){return Ti(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n)})),t,n)}function xi(e,t,n,r){var i={};for(var o in e){var s=e[o];t[o]?i[o]=ki(s,n,r):i[o]=s}return i}function ki(e,t,n){var i=n.options,o=n.calendarApi,s=n.pluginHooks.eventSourceDefs[e.sourceDefId],a=J();return s.fetch({eventSource:e,range:t,context:n},(function(r){var s=r.rawEvents;i.eventSourceSuccess&&(s=i.eventSourceSuccess.call(o,s,r.xhr)||s),e.success&&(s=e.success.call(o,s,r.xhr)||s),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:s})}),(function(r){console.warn(r.message,r),i.eventSourceFailure&&i.eventSourceFailure.call(o,r),e.failure&&e.failure(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:r})})),r(r({},e),{isFetching:!0,latestFetchId:a})}function Si(e,t){return Ne(e,(function(e){return Ti(e,t)}))}function Ti(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Ei(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Di(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Ci(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Mi(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ai(e,t,n,r,i){var o=[];return{headerToolbar:e.headerToolbar?Ii(e.headerToolbar,e,t,n,r,i,o):null,footerToolbar:e.footerToolbar?Ii(e.footerToolbar,e,t,n,r,i,o):null,viewsWithButtons:o}}function Ii(e,t,n,r,i,o,s){return Re(e,(function(e){return function(e,t,n,r,i,o,s){var a="rtl"===t.direction,l=t.customButtons||{},u=n.buttonText||{},c=t.buttonText||{};return(e?e.split(" "):[]).map((function(e){return e.split(",").map((function(e){if("title"===e)return{buttonName:e};var t,n=void 0,d=void 0,h=void 0,p=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(h=r.getCustomButtonIconClass(t))||(h=r.getIconClass(e,a))||(p=t.text)):(n=i[e])?(s.push(e),d=function(){o.changeView(e)},(p=n.buttonTextOverride)||(h=r.getIconClass(e,a))||(p=n.buttonTextDefault)):o[e]&&(d=function(){o[e]()},(p=u[e])||(h=r.getIconClass(e,a))||(p=c[e])),{buttonName:e,buttonClick:d,buttonIcon:h,buttonText:p}}))}))}(e,t,n,r,i,o,s)}))}function Li(e,t,n,r,i){var o=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Oi(t)}(t,n):o=Oi(n);var s=new XMLHttpRequest;s.open(e,t,!0),"GET"!==e&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.onload=function(){if(s.status>=200&&s.status<400){var e=!1,t=void 0;try{t=JSON.parse(s.responseText),e=!0}catch(e){}e?r(t,s):i("Failure parsing JSON",s)}else i("Request failed",s)},s.onerror=function(){i("Request failed",s)},s.send(o)}function Oi(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function Ni(e,t){for(var n=Fe(t.getCurrentData().eventSources),r=[],i=0,o=e;i<o.length;i++){for(var s=o[i],a=!1,l=0;l<n.length;l++)if(n[l]._raw===s){n.splice(l,1),a=!0;break}a||r.push(s)}for(var u=0,c=n;u<c.length;u++){var d=c[u];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var h=0,p=r;h<p.length;h++){var f=p[h];t.calendarApi.addEventSource(f)}}var Ri=[ni({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),ni({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;Sr(e.eventSource.meta.bind(null,Tn(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),ni({eventSourceRefiners:{method:String,extraParams:At,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:function(e){return e.url?{url:e.url,method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch:function(e,t,n){var i=e.eventSource.meta,o=function(e,t,n){var i,o,s,a,l=n.dateEnv,u=n.options,c={};return null==(i=e.startParam)&&(i=u.startParam),null==(o=e.endParam)&&(o=u.endParam),null==(s=e.timeZoneParam)&&(s=u.timeZoneParam),a="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},r(c,a),c[i]=l.formatIso(t.start),c[o]=l.formatIso(t.end),"local"!==l.timeZone&&(c[s]=l.timeZone),c}(i,e.range,e.context);Li(i.method,i.url,o,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),ni({recurringTypes:[{parse:function(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){var n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null},r=void 0;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(i=e.endTime,o=e.startTime,r={years:i.years-o.years,months:i.months-o.months,days:i.days-o.days,milliseconds:i.milliseconds-o.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var i,o;return null},expand:function(e,t,n){var r=tn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){for(var i=e?Pe(e):null,o=xe(n.start),s=n.end,a=[];o<s;){var l=void 0;i&&!i[o.getUTCDay()]||(l=t?r.add(o,t):o,a.push(l)),o=me(o,1)}return a}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:At,startTime:$e,endTime:$e,duration:$e,startRecur:At,endRecur:At}}),ni({optionChangeHandlers:{events:function(e,t){Ni([e],t)},eventSources:Ni}}),ni({contentTypeHandlers:{html:function(){return Pi},domNodes:function(){return Fi}},propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",r(r({},Tn(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Hn(e,t))}}})];function Pi(e,t){e.innerHTML=t}function Fi(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!it(n,r)){for(var i=0,o=r;i<o.length;i++){var s=o[i];e.appendChild(s)}n.forEach(Y)}}var ji=function(){function e(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}return e.prototype.request=function(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))},e.prototype.pause=function(e){void 0===e&&(e="");var t=this.pauseDepths;t[e]=(t[e]||0)+1,this.clearTimeout()},e.prototype.resume=function(e,t){void 0===e&&(e="");var n=this.pauseDepths;e in n&&((t||--n[e]<=0)&&delete n[e],this.tryDrain())},e.prototype.isPaused=function(){return Object.keys(this.pauseDepths).length},e.prototype.tryDrain=function(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}},e.prototype.clear=function(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}},e.prototype.clearTimeout=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)},e.prototype.drained=function(){this.drainedOption&&this.drainedOption()},e}(),Yi=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new ji(this.drain.bind(this))}return e.prototype.request=function(e,t){this.queue.push(e),this.delayedRunner.request(t)},e.prototype.pause=function(e){this.delayedRunner.pause(e)},e.prototype.resume=function(e,t){this.delayedRunner.resume(e,t)},e.prototype.drain=function(){for(var e=this.queue;e.length;){for(var t=[],n=void 0;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}},e.prototype.runTask=function(e){this.runTaskOption&&this.runTaskOption(e)},e.prototype.drained=function(e){this.drainedOption&&this.drainedOption(e)},e}();function Vi(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,bt(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=we(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var Hi=function(){function e(e){var t=this;this.computeOptionsData=ot(this._computeOptionsData),this.computeCurrentViewData=ot(this._computeCurrentViewData),this.organizeRawLocales=ot(Zn),this.buildLocale=ot(Xn),this.buildPluginHooks=function(){var e,t=[],n=[];return function(i,o){return e&&it(i,t)&&it(o,n)||(e=function(e,t){var n={},i={reducers:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],eventResizeJoinTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,contentTypeHandlers:{},listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function o(e){for(var t=0,s=e;t<s.length;t++){var a=s[t];n[a.id]||(n[a.id]=!0,o(a.deps),u=a,i={reducers:(l=i).reducers.concat(u.reducers),contextInit:l.contextInit.concat(u.contextInit),eventRefiners:r(r({},l.eventRefiners),u.eventRefiners),eventDefMemberAdders:l.eventDefMemberAdders.concat(u.eventDefMemberAdders),eventSourceRefiners:r(r({},l.eventSourceRefiners),u.eventSourceRefiners),isDraggableTransformers:l.isDraggableTransformers.concat(u.isDraggableTransformers),eventDragMutationMassagers:l.eventDragMutationMassagers.concat(u.eventDragMutationMassagers),eventDefMutationAppliers:l.eventDefMutationAppliers.concat(u.eventDefMutationAppliers),dateSelectionTransformers:l.dateSelectionTransformers.concat(u.dateSelectionTransformers),datePointTransforms:l.datePointTransforms.concat(u.datePointTransforms),dateSpanTransforms:l.dateSpanTransforms.concat(u.dateSpanTransforms),views:r(r({},l.views),u.views),viewPropsTransformers:l.viewPropsTransformers.concat(u.viewPropsTransformers),isPropsValid:u.isPropsValid||l.isPropsValid,externalDefTransforms:l.externalDefTransforms.concat(u.externalDefTransforms),eventResizeJoinTransforms:l.eventResizeJoinTransforms.concat(u.eventResizeJoinTransforms),viewContainerAppends:l.viewContainerAppends.concat(u.viewContainerAppends),eventDropTransformers:l.eventDropTransformers.concat(u.eventDropTransformers),calendarInteractions:l.calendarInteractions.concat(u.calendarInteractions),componentInteractions:l.componentInteractions.concat(u.componentInteractions),themeClasses:r(r({},l.themeClasses),u.themeClasses),eventSourceDefs:l.eventSourceDefs.concat(u.eventSourceDefs),cmdFormatter:u.cmdFormatter||l.cmdFormatter,recurringTypes:l.recurringTypes.concat(u.recurringTypes),namedTimeZonedImpl:u.namedTimeZonedImpl||l.namedTimeZonedImpl,initialView:l.initialView||u.initialView,elementDraggingImpl:l.elementDraggingImpl||u.elementDraggingImpl,optionChangeHandlers:r(r({},l.optionChangeHandlers),u.optionChangeHandlers),scrollGridImpl:u.scrollGridImpl||l.scrollGridImpl,contentTypeHandlers:r(r({},l.contentTypeHandlers),u.contentTypeHandlers),listenerRefiners:r(r({},l.listenerRefiners),u.listenerRefiners),optionRefiners:r(r({},l.optionRefiners),u.optionRefiners),propSetHandlers:r(r({},l.propSetHandlers),u.propSetHandlers)})}var l,u}return e&&o(e),o(t),i}(i,o)),t=i,n=o,e}}(),this.buildDateEnv=ot(Bi),this.buildTheme=ot(Ui),this.parseToolbars=ot(Ai),this.buildViewSpecs=ot(gi),this.buildDateProfileGenerator=st(zi),this.buildViewApi=ot(qi),this.buildViewUiProps=st(Gi),this.buildEventUiBySource=ot(Wi,je),this.buildEventUiBases=ot($i),this.parseContextBusinessHours=st(Ki),this.buildTitle=ot(Vi),this.emitter=new Tr,this.actionRunner=new Yi(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},i=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=i.calendarOptions.initialView||i.pluginHooks.initialView,s=this.computeCurrentViewData(o,i,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);var a,l,u,c=(a=i.calendarOptions,l=i.dateEnv,null!=(u=a.initialDate)?l.createMarker(u):Fn(a.now,l)),d=s.dateProfileGenerator.build(c);sn(d.activeRange,c)||(c=d.currentRange.start);for(var h={dateEnv:i.dateEnv,options:i.calendarOptions,pluginHooks:i.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p=0,f=i.pluginHooks.contextInit;p<f.length;p++)(0,f[p])(h);for(var m=function(e,t,n){var r=t?t.activeRange:null;return bi({},function(e,t){var n=Pn(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(var o=0,s=r;o<s.length;o++){var a=Rn(s[o],t,n);a&&i.push(a)}return i}(e,n),r,n)}(i.calendarOptions,d,h),g={dynamicOptionOverrides:n,currentViewType:o,currentDate:c,dateProfile:d,businessHours:this.parseContextBusinessHours(h),eventSources:m,eventUiBases:{},loadingLevel:_i(m),eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(h).selectionConfig},v=r(r({},h),g),y=0,_=i.pluginHooks.reducers;y<_.length;y++){var b=_[y];r(g,b(null,null,v))}g.loadingLevel&&this.emitter.trigger("loading",!0),this.state=g,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?r(r({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this.props,n=this.state,i=this.emitter,o=function(e,t){var n;return"SET_OPTION"===t.type?r(r({},e),((n={})[t.optionName]=t.rawOptionValue,n)):e}(n.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,o,t.calendarApi),a=function(e,t){return"CHANGE_VIEW_TYPE"===t.type?t.viewType:e}(n.currentViewType,e),l=this.computeCurrentViewData(a,s,t.optionOverrides,o);t.calendarApi.currentDataManager=this,i.setThisContext(t.calendarApi),i.setOptions(l.options);var u={dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},c=n.currentDate,d=n.dateProfile;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(d=l.dateProfileGenerator.build(c)),d=function(e,t,n,r){var i;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":if(!e.activeRange||!sn(e.currentRange,t.dateMarker))return r.build(t.dateMarker);break;case"PREV":if((i=r.buildPrev(e,n)).isValid)return i;break;case"NEXT":if((i=r.buildNext(e,n)).isValid)return i}return e}(d,e,c=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(c,e),l.dateProfileGenerator),sn(d.currentRange,c)||(c=d.currentRange.start);for(var h=function(e,t,n,i){var o,s,a=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return bi(e,t.sources,a,i);case"REMOVE_EVENT_SOURCE":return o=e,s=t.sourceId,Ne(o,(function(e){return e.sourceId!==s}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?wi(e,a,i):e;case"FETCH_EVENT_SOURCES":return xi(e,t.sourceIds?Pe(t.sourceIds):Si(e,i),a,i);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,i){var o,s=e[t];return s&&n===s.latestFetchId?r(r({},e),((o={})[t]=r(r({},s),{isFetching:!1,fetchRange:i}),o)):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}(n.eventSources,e,d,u),p=_i(h),f=function(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){var s=It(function(e,t,n){var r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Wr(e,i)),r&&(e=Wr(e,r)),e}(i,t,o),t,o);return r&&(s=Ue(s,r,o)),Nt($r(e,t.sourceId),s)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=Ue(t,n,r)),Nt(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"MERGE_EVENTS":return Nt(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Ue(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,i={},o={};for(var s in n)t.defs[s]||(i[s]=n[s]);for(var a in r)!t.instances[a]&&i[r[a].defId]&&(o[a]=r[a]);return{defs:i,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return $r(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Rt(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,h,d,u),m=p&&!l.options.progressiveEventRendering&&n.renderableEventStore||f,g=this.buildViewUiProps(u),v=g.eventUiSingleBase,y=g.selectionConfig,_=this.buildEventUiBySource(h),b=this.buildEventUiBases(m.defs,v,_),w=n.loadingLevel||0,x=p,k={dynamicOptionOverrides:o,currentViewType:a,currentDate:c,dateProfile:d,eventSources:h,eventStore:f,renderableEventStore:m,selectionConfig:y,eventUiBases:b,loadingLevel:x,businessHours:this.parseContextBusinessHours(u),dateSelection:Ei(n.dateSelection,e),eventSelection:Di(n.eventSelection,e),eventDrag:Ci(n.eventDrag,e),eventResize:Mi(n.eventResize,e)},S=r(r({},u),k),T=0,E=s.pluginHooks.reducers;T<E.length;T++){var D=E[T];r(k,D(n,e,S))}!w&&x?i.trigger("loading",!0):w&&!x&&i.trigger("loading",!1),this.state=k,t.onAction&&t.onAction(e)},e.prototype.updateData=function(){var e,t,n,i,o,s,a,l,u,c=this.props,d=this.state,h=this.data,p=this.computeOptionsData(c.optionOverrides,d.dynamicOptionOverrides,c.calendarApi),f=this.computeCurrentViewData(d.currentViewType,p,c.optionOverrides,d.dynamicOptionOverrides),m=this.data=r(r(r({viewTitle:this.buildTitle(d.dateProfile,f.options,p.dateEnv),calendarApi:c.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p),f),d),g=p.pluginHooks.optionChangeHandlers,v=h&&h.calendarOptions,y=p.calendarOptions;if(v&&v!==y)for(var _ in v.timeZone!==y.timeZone&&(d.eventSources=m.eventSources=(s=m.eventSources,l=m,u=(a=d.dateProfile)?a.activeRange:null,xi(s,Si(s,l),u,l)),d.eventStore=m.eventStore=(e=m.eventStore,t=h.dateEnv,n=m.dateEnv,i=e.defs,o=Re(e.instances,(function(e){var o=i[e.defId];return o.allDay||o.recurringDef?e:r(r({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})})),{defs:i,instances:o})),g)v[_]!==y[_]&&g[_](y[_],m);c.onData&&c.onData(m)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),i=r.refinedOptions,o=r.pluginHooks,s=r.localeDefaults,a=r.availableLocaleData;Zi(r.extra);var l=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,o,a,i.defaultRangeSeparator),u=this.buildViewSpecs(o.views,e,t,s),c=this.buildTheme(i,o);return{calendarOptions:i,pluginHooks:o,dateEnv:l,viewSpecs:u,theme:c,toolbarConfig:this.parseToolbars(i,e,c,u,n),localeDefaults:s,availableRawLocales:a.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=Ct([xt,e,t]),i=n.locales,o=n.locale,s=this.organizeRawLocales(i),a=s.map,l=this.buildLocale(o||s.defaultCode,a).options,u=this.buildPluginHooks(e.plugins||[],Ri),c=this.currentCalendarOptionsRefiners=r(r(r(r(r({},wt),kt),St),u.listenerRefiners),u.optionRefiners),d={},h=Ct([xt,l,e,t]),p={},f=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,g=!1;for(var v in h)"plugins"!==v&&(h[v]===f[v]||Tt[v]&&v in f&&Tt[v](f[v],h[v])?p[v]=m[v]:c[v]?(p[v]=c[v](h[v]),g=!0):d[v]=f[v]);return g&&(this.currentCalendarOptionsInput=h,this.currentCalendarOptionsRefined=p),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:u,availableLocaleData:s,localeDefaults:l,extra:d}},e.prototype._computeCurrentViewData=function(e,t,n,r){var i=t.viewSpecs[e];if(!i)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var o=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r),s=o.refinedOptions;return Zi(o.extra),{viewSpec:i,options:s,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,nowInput:s.now,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,monthMode:s.monthMode,fixedWeekCount:s.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,i,o){var s=Ct([xt,e.optionDefaults,n,i,e.optionOverrides,o]),a=r(r(r(r(r(r({},wt),kt),St),Dt),t.listenerRefiners),t.optionRefiners),l={},u=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,h={};for(var p in s)s[p]===u[p]?l[p]=c[p]:(s[p]===this.currentCalendarOptionsInput[p]?p in this.currentCalendarOptionsRefined&&(l[p]=this.currentCalendarOptionsRefined[p]):a[p]?l[p]=a[p](s[p]):h[p]=s[p],d=!0);return d&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:h}},e}();function Bi(e,t,n,r,i,o,s,a){var l=Xn(t||s.defaultCode,s.map);return new $n({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:o.cmdFormatter,defaultSeparator:a})}function Ui(e,t){return new(t.themeClasses[e.themeSystem]||ri)(e)}function zi(e){return new(e.dateProfileGeneratorClass||yi)(e)}function qi(e,t,n){return new On(e,t,n)}function Wi(e){return Re(e,(function(e){return e.ui}))}function $i(e,t,n){var r={"":t};for(var i in e){var o=e[i];o.sourceId&&n[o.sourceId]&&(r[i]=n[o.sourceId])}return r}function Gi(e){var t=e.options;return{eventUiSingleBase:jt({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:jt({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function Ki(e){return nr(e.options.businessHours,e)}function Zi(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var Xi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleData=function(e){n.dataManager?n.setState(e):n.state=e},n.dataManager=new Hi({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return n(t,e),t.prototype.render=function(){return this.props.children(this.state)},t.prototype.componentDidUpdate=function(e){var t=this.props.optionOverrides;t!==e.optionOverrides&&this.dataManager.resetOptions(t)},t}(Ir),Ji=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();function Qi(e){var t;return(t={})[e.component.uid]=e,t}var eo={},to=function(){function e(e,t){this.emitter=new Tr}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),no={},ro={startTime:$e,duration:$e,create:Boolean,sourceId:String};function io(e){var t=Mt(e,ro),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,i=n.extraClassName,o=!1,s=r.center;return r.left?(o=!0,e=r.left):e=r.start,r.right?(o=!0,t=r.right):t=r.end,Lr("div",{className:[i||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Lr(so,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(Br),so=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Lr.apply(void 0,i(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,o=[],s=!0,a=0,l=e;a<l.length;a++){var u=l[a],c=u.buttonName,d=u.buttonClick,h=u.buttonText,p=u.buttonIcon;if("title"===c)s=!1,o.push(Lr("h2",{className:"fc-toolbar-title"},t.title));else{var f=p?{"aria-label":c}:{},m=["fc-"+c+"-button",n.getClass("button")];c===t.activeButton&&m.push(n.getClass("buttonActive"));var g=!t.isTodayEnabled&&"today"===c||!t.isPrevEnabled&&"prev"===c||!t.isNextEnabled&&"next"===c;o.push(Lr("button",r({disabled:g,className:m.join(" "),onClick:d,type:"button"},f),h||(p?Lr("span",{className:p}):"")))}}if(o.length>1){var v=s&&n.getClass("buttonGroup")||"";return Lr.apply(void 0,i(["div",{className:v}],o))}return o[0]},t}(Br),ao=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,qr(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],i="",o="";return n?null!==t.availableWidth?i=t.availableWidth/n:o=1/n*100+"%":i=e.height||"",Lr("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:i,paddingBottom:o}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(Br),lo=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=cn(t);if(o&&r.isValidSegDownEl(e.target)){var s=V(e.target,".fc-event-forced-url"),a=s?s.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:t,event:new Yn(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:i.viewApi}),a&&!e.defaultPrevented&&(window.location.href=a)}},n.destroy=G(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(Ji),uo=function(e){function t(t){var n,r,i,o,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){cn(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,".fc-event",r=s.handleSegEnter,i=s.handleSegLeave,G(n,"mouseover",".fc-event",(function(e,t){if(t!==o){o=t,r(e,t);var n=function(e){o=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return n(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,i=r.context,o=cn(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Yn(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})},t}(Ji),co=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=ot(Vr),t.buildViewPropTransformers=ot(po),t.buildToolbarProps=ot(ho),t.handleNavLinkClick=$("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Nr(),t.footerRef=Nr(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter}}(e,n),i=[lo,uo].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=i,eo[e.uid]=r},t.unregisterInteractiveComponent=function(e){for(var n=0,r=t.interactionsStore[e.uid];n<r.length;n++)r[n].destroy();delete t.interactionsStore[e.uid],delete eo[e.uid]},t.resizeRunner=new ji((function(){t.props.emitter.trigger("_resize",!0),t.props.emitter.trigger("windowResize",{view:t.props.viewApi})})),t.handleWindowResize=function(e){var n=t.props.options;n.handleWindowResize&&e.target===window&&t.resizeRunner.request(n.windowResizeDelay)},t}return n(t,e),t.prototype.render=function(){var e,t=this.props,n=t.toolbarConfig,i=t.options,o=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Fn(t.options.now,t.dateEnv),t.viewTitle),s=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=i.height?s=!0:null!=i.contentHeight?a=i.contentHeight:e=Math.max(i.aspectRatio,.5);var l=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent);return Lr(Yr.Provider,{value:l},n.headerToolbar&&Lr(oo,r({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},o)),Lr(ao,{liquid:s,height:a,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&Lr(oo,r({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footerToolbar},o)))},t.prototype.componentDidMount=function(){var e=this.props;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((function(t){return new t(e)})),window.addEventListener("resize",this.handleWindowResize);var t=e.pluginHooks.propSetHandlers;for(var n in t)t[n](e[n],e)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.pluginHooks.propSetHandlers;for(var r in n)t[r]!==e[r]&&n[r](t[r],t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(var e=0,t=this.calendarInteractions;e<t.length;e++)t[e].destroy();this.props.emitter.trigger("_unmount")},t.prototype._handleNavLinkClick=function(e,t){var n=this.props,r=n.dateEnv,i=n.options,o=n.calendarApi,s=t.getAttribute("data-navlink");s=s?JSON.parse(s):{};var a=r.createMarker(s.date),l=s.type,u="day"===l?i.navLinkDayClick:"week"===l?i.navLinkWeekClick:null;"function"==typeof u?u.call(o,r.toDate(a),e):("string"==typeof u&&(l=u),o.zoomTo(a,l))},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return Lr.apply(void 0,i([Rr,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,i={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},o=0,s=this.buildViewPropTransformers(t.viewPropsTransformers);o<s.length;o++){var a=s[o];r(i,a.transform(i,e))}var l=n.component;return Lr(l,r({},i))},t}(Hr);function ho(e,t,n,r,i,o){var s=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:o,activeButton:e.type,isTodayEnabled:s.isValid&&!sn(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function po(e){return e.map((function(e){return new e}))}var fo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={forPrint:!1},t.handleBeforePrint=function(){t.setState({forPrint:!0})},t.handleAfterPrint=function(){t.setState({forPrint:!1})},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.options,n=this.state.forPrint,r=n||"auto"===t.height||"auto"===t.contentHeight,i=r||null==t.height?"":t.height,o=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return lr()||o.push("fc-liquid-hack"),e.children(o,i,r,n)},t.prototype.componentDidMount=function(){var e=this.props.emitter;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)},t.prototype.componentWillUnmount=function(){var e=this.props.emitter;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)},t}(Br);function mo(e,t){return bt(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var go="fc-col-header-cell",vo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,i=e.theme,o=e.viewApi,s=this.props,a=s.date,l=s.dateProfile,u=hr(a,s.todayRange,null,l),c=[go].concat(pr(u,i)),d=t.format(a,s.dayHeaderFormat),h=n.navLinks&&!u.isDisabled&&s.colCnt>1?{"data-navlink":fr(a),tabIndex:0}:{},p=r(r(r({date:t.toDate(a),view:o},s.extraHookProps),{text:d}),u);return Lr(oi,{hookProps:p,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:_o,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,i){return Lr("th",r({ref:e,className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:tt(a),colSpan:s.colSpan},s.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Lr("a",r({ref:n,className:["fc-col-header-cell-cushion",s.isSticky?"fc-sticky":""].join(" ")},h),i)))}))},t}(Br),yo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,i=t.theme,o=t.viewApi,s=t.options,a=me(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[go].concat(pr(l,i),e.extraClassNames||[]),c=n.format(a,e.dayHeaderFormat),d=r(r(r(r({date:a},l),{view:o}),e.extraHookProps),{text:c});return Lr(oi,{hookProps:d,classNames:s.dayHeaderClassNames,content:s.dayHeaderContent,defaultContent:_o,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},(function(t,n,i,o){return Lr("th",r({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},Lr("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},o)))}))},t}(Br);function _o(e){return e.text}var bo=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Fn(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=ge(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),i=t.dateEnv.add(r,$e(1,e.unit)),o=i.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:wo(r)},nextState:{nowDate:i,todayRange:wo(i)},waitMs:o}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=Yr,t}(Ir);function wo(e){var t=xe(e);return{start:t,end:me(t,1)}}var xo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=ot(ko),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,i=t.datesRepDistinctDays,o=t.renderIntro,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return Lr(bo,{unit:"day"},(function(e,t){return Lr("tr",null,o&&o(),n.map((function(e){return i?Lr(vo,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:s}):Lr(yo,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s})})))}))},t}(Br);function ko(e,t,n){return e||mo(t,n)}var So=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],s=-1;n<r;)t.isHiddenDay(n)?i.push(s+.5):(s++,i.push(s),o.push(n)),n=me(n,1);this.dates=o,this.indices=i,this.cnt=o.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(me(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(i=Math.floor(i))?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(ye(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),To=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;n<o.length&&o[n].getUTCDay()!==r;n++);i=Math.ceil(o.length/n)}else i=1,n=o.length;this.rowCnt=i,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}return e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t++){for(var n=[],r=0;r<this.colCnt;r++)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){var n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t++)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var i=n.firstIndex,o=n.lastIndex,s=i;s<=o;){var a=Math.floor(s/t),l=Math.min((a+1)*t,o+1);r.push({row:a,firstCol:s%t,lastCol:(l-1)%t,isStart:n.isStart&&s===i,isEnd:n.isEnd&&l-1===o}),s=l}return r},e}(),Eo=function(){function e(){this.sliceBusinessHours=ot(this._sliceBusinessHours),this.sliceDateSelection=ot(this._sliceDateSpan),this.sliceEventStore=ot(this._sliceEventStore),this.sliceEventDrag=ot(this._sliceInteraction),this.sliceEventResize=ot(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];var a=e.eventUiBases,l=this.sliceEventStore.apply(this,i([e.eventStore,a,t,n],o));return{dateSelectionSegs:this.sliceDateSelection.apply(this,i([e.dateSelection,a,r],o)),businessHourSegs:this.sliceBusinessHours.apply(this,i([e.businessHours,t,n,r],o)),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag.apply(this,i([e.eventDrag,a,t,n],o)),eventResize:this.sliceEventResize.apply(this,i([e.eventResize,a,t,n],o)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,i([{range:{start:e,end:ge(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];return e?this._sliceEventStore.apply(this,i([Ue(e,Do(t,Boolean(n)),r),{},t,n],o)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(e){var s=an(e,t,Do(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(!e)return null;var s=an(e.mutatedEvents,t,Do(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];if(!e)return[];for(var s=function(e,t,n){var r=Wt({editable:!1},n),i=Gt(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:hn(i,t),instance:Ie(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e,t,n),a=this.sliceRange.apply(this,i([e.range],r)),l=0,u=a;l<u.length;l++){u[l].eventRange=s}return a},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.sliceEventRange(o,t))}return n},e.prototype.sliceEventRange=function(e,t){var n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:me(n.start,1)});for(var r=this.sliceRange.apply(this,i([n],t)),o=0,s=r;o<s.length;o++){var a=s[o];a.eventRange=e,a.isStart=e.isStart&&a.isStart,a.isEnd=e.isEnd&&a.isEnd}return r},e}();function Do(e,t){var n=e.activeRange;return t?n:{start:ge(n.start,e.slotMinTime.milliseconds),end:ge(n.end,e.slotMaxTime.milliseconds-864e5)}}var Co=/^(visible|hidden)$/,Mo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.liquid,n=e.liquidIsAbsolute,r=t&&n,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),Lr("div",{ref:this.handleEl,className:i.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)},t.prototype.needsXScrolling=function(){if(Co.test(this.props.overflowX))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().width>t)return!0;return!1},t.prototype.needsYScrolling=function(){if(Co.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;r<n.length;r++)if(n[r].getBoundingClientRect().height>t)return!0;return!1},t.prototype.getXScrollbarWidth=function(){return Co.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Co.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(Br),Ao=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,i=r.depths,o=r.currentMap,s=!1,a=!1;null!==e?(s=n in o,o[n]=e,i[n]=(i[n]||0)+1,a=!0):0==--i[n]&&(delete o[n],delete t.callbackMap[n],s=!0),t.masterCallback&&(s&&t.masterCallback(null,String(n)),a&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Be(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Fe(this.currentMap)},e}();function Io(e){for(var t=0,n=0,r=B(e,".fc-scrollgrid-shrink");n<r.length;n++){var i=r[n];t=Math.max(t,he(i))}return Math.ceil(t)}function Lo(e,t){return e.liquid&&t.liquid}function Oo(e,t){return null!=t.maxHeight||Lo(e,t)}function No(e,t,n){var r=n.expandRows;return"function"==typeof t.content?t.content(n):Lr("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,Lr("tbody",{},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function Ro(e,t){return it(e,t,je)}function Po(e,t){for(var n=[],r=0,o=e;r<o.length;r++)for(var s=o[r],a=s.span||1,l=0;l<a;l++)n.push(Lr("col",{style:{width:"shrink"===s.width?Fo(t):s.width||"",minWidth:s.minWidth||""}}));return Lr.apply(void 0,i(["colgroup",{}],n))}function Fo(e){return null==e?4:e}function jo(e){for(var t=0,n=e;t<n.length;t++)if("shrink"===n[t].width)return!0;return!1}function Yo(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Vo(e,t){var n=["fc-scrollgrid-section","fc-scrollgrid-section-"+e.type,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function Ho(e){return Lr("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Bo(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Uo(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=ot((function(e){return e}),Ro),t.renderMicroColGroup=ot(Po),t.scrollerRefs=new Ao,t.scrollerElRefs=new Ao(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.setState(r({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return n(t,e),t.prototype.render=function(){for(var e,t=this.props,n=this.state,r=this.context,o=t.sections||[],s=this.processCols(t.cols),a=this.renderMicroColGroup(s,n.shrinkWidth),l=Yo(t.liquid,r),u=o.length,c=0,d=[],h=[],p=[];c<u&&"header"===(e=o[c]).type;)d.push(this.renderSection(e,c,a)),c++;for(;c<u&&"body"===(e=o[c]).type;)h.push(this.renderSection(e,c,a)),c++;for(;c<u&&"footer"===(e=o[c]).type;)p.push(this.renderSection(e,c,a)),c++;var f=!lr();return Lr("table",{className:l.join(" "),style:{height:t.height}},Boolean(!f&&d.length)&&Lr.apply(void 0,i(["thead",{}],d)),Boolean(!f&&h.length)&&Lr.apply(void 0,i(["tbody",{}],h)),Boolean(!f&&p.length)&&Lr.apply(void 0,i(["tfoot",{}],p)),f&&Lr.apply(void 0,i(["tbody",{}],d,h,p)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?Lr(Rr,{key:e.key},e.outerContent):Lr("tr",{key:e.key,className:Vo(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,n,e.chunk))},t.prototype.renderChunkTd=function(e,t,n,r){if("outerContent"in r)return r.outerContent;var i=this.props,o=this.state,s=o.forceYScrollbars,a=o.scrollerClientWidths,l=o.scrollerClientHeights,u=Oo(i,e),c=Lo(i,e),d=i.liquid?s?"scroll":u?"auto":"hidden":"visible",h=No(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:void 0!==a[t]?a[t]:null,clientHeight:void 0!==l[t]?l[t]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}});return Lr("td",{ref:r.elRef},Lr("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},Lr(Mo,{ref:this.scrollerRefs.createRef(t),elRef:this.scrollerElRefs.createRef(t),overflowY:d,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},h)))},t.prototype._handleScrollerEl=function(e,t){var n=parseInt(t,10);qr(this.props.sections[n].chunk.scrollerElRef,e)},t.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},t.prototype.componentDidUpdate=function(){this.handleSizing()},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},t.prototype.computeShrinkWidth=function(){return jo(this.props.cols)?Io(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){for(var e=yr(),t=this.props.sections.length,n=this.scrollerRefs,r=this.scrollerElRefs,i=!1,o={},s={},a=0;a<t;a++){var l=n.currentMap[a];if(l&&l.needsYScrolling()){i=!0;break}}for(a=0;a<t;a++){var u=r.currentMap[a];if(u){var c=u.parentNode;o[a]=Math.floor(c.getBoundingClientRect().width-(i?e.y:0)),s[a]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:o,scrollerClientHeights:s}},t}(Br);zo.addStateEquality({scrollerClientWidths:je,scrollerClientHeights:je});var qo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,i=r.eventRange,o=i.ui,s={event:new Yn(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&mn(r,t),isStartResizable:!e.disableResizing&&gn(r,t),isEndResizable:!e.disableResizing&&vn(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)},a=bn(s).concat(o.classNames);return Lr(oi,{hookProps:s,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,i){return e.children(t,a.concat(n),r,i,s)}))},t.prototype.componentDidMount=function(){un(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&un(this.elRef.current,t)},t}(Br),Wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,i=t.options.eventTimeFormat||e.defaultTimeFormat,o=yn(n,i,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Lr(qo,{seg:n,timeText:o,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||$o,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,i,o,s,a){return Lr("a",r({className:e.extraClassNames.concat(i).join(" "),style:{borderColor:a.borderColor,backgroundColor:a.backgroundColor},ref:t},function(e){var t=e.eventRange.def.url;return t?{href:t}:{}}(n)),Lr("div",{className:"fc-event-main",ref:o,style:{color:a.textColor}},s),a.isStartResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-start"}),a.isEndResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(Br);function $o(e){return Lr("div",{className:"fc-event-main-frame"},e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title-container"},Lr("div",{className:"fc-event-title fc-sticky"},e.event.title||Lr(Rr,null,"\xa0"))))}var Go=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return Lr(oi,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},Ko=bt({day:"numeric"}),Zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=st(Jo),t.normalizeClassNames=ci(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=this.refineHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv}),i=pr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),o=r.isDisabled?{}:{"data-date":tt(e.date)};return Lr(ui,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,i,o,r.isDisabled)}))},t}(Br),Xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=Jo({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return Lr(ai,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(Br);function Jo(e){var t=e.date,n=e.dateEnv,i=hr(t,e.todayRange,null,e.dateProfile);return r(r(r({date:n.toDate(t),view:e.viewApi},i),{dayNumberText:e.showDayNumber?n.format(t,Ko):""}),e.extraProps)}function Qo(e){return Lr("div",{className:"fc-"+e})}var es=function(e){return Lr(qo,{defaultContent:ts,seg:e.seg,timeText:"",disableDragging:!0,disableResizing:!0,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(e,t,n,r,i){return Lr("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:i.backgroundColor}},r)}))};function ts(e){return e.event.title&&Lr("div",{className:"fc-event-title"},e.event.title)}var ns=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,i=e.date,o=r.weekNumberFormat||e.defaultFormat,s=n.computeWeekNumber(i),a=n.format(i,o);return Lr(oi,{hookProps:{num:s,text:a,date:i},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:rs,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function rs(e){return e.text}var is=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this)||this;return i.isRendering=!1,i.isRendered=!1,i.currentClassNames=[],i.customContentRenderId=0,i.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":i.renderRunner.tryDrain()}},i.handleData=function(e){i.currentData=e,i.renderRunner.request(e.calendarOptions.rerenderDelay)},i.handleRenderRequest=function(){if(i.isRendering){i.isRendered=!0;var e=i.currentData;Or(Lr(fo,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,o,s){return i.setClassNames(t),i.setHeight(n),Lr(si.Provider,{value:i.customContentRenderId},Lr(co,r({isHeightAuto:o,forPrint:s},e)))})),i.el)}else i.isRendered&&(i.isRendered=!1,Or(null,i.el),i.setClassNames([]),i.setHeight(""));Fr()},i.el=t,i.renderRunner=new ji(i.handleRenderRequest),new Hi({optionOverrides:n,calendarApi:i,onAction:i.handleAction,onData:i.handleData}),i}return n(t,e),Object.defineProperty(t.prototype,"view",{get:function(){return this.currentData.viewApi},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.isRendering;e?this.customContentRenderId++:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()},t.prototype.destroy=function(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())},t.prototype.updateSize=function(){e.prototype.updateSize.call(this),Fr()},t.prototype.batchRendering=function(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")},t.prototype.pauseRendering=function(){this.renderRunner.pause("pauseRendering")},t.prototype.resumeRendering=function(){this.renderRunner.resume("pauseRendering",!0)},t.prototype.resetOptions=function(e,t){this.currentDataManager.resetOptions(e,t)},t.prototype.setClassNames=function(e){if(!it(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n<r.length;n++){var i=r[n];t.remove(i)}for(var o=0,s=e;o<s.length;o++)i=s[o],t.add(i);this.currentClassNames=e}},t.prototype.setHeight=function(e){q(this.el,"height",e)},t}(jn);no.touchMouseIgnoreWait=500;var os=0,ss=0,as=!1,ls=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,os++,setTimeout((function(){os--}),no.touchMouseIgnoreWait)}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new Tr,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),ss++||window.addEventListener("touchmove",us,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),--ss||window.removeEventListener("touchmove",us,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!V(n,this.handleSelector)||(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,0))},e.prototype.cleanup=function(){as=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?V(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return os||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(as=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,i=e.touches,o=0,s=0;return i&&i.length?(n=i[0].pageX,r=i[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(o=n-this.origPageX,s=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:o,deltaY:s}},e}();function us(e){as&&e.preventDefault()}var cs=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",z(n,{left:r.left,top:r.top}),Z(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Y(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&z(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),z(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),ds=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return n(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(Dr),hs=function(e){function t(t,n){return e.call(this,new Cr(t),n)||this}return n(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return wr(this.scrollController.el)},t}(ds),ps=function(e){function t(t){return e.call(this,new Mr,t)||this}return n(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(ds),fs="function"==typeof performance?performance.now:Date.now,ms=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=fs();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t){this.isEnabled&&(this.scrollCaches=this.buildCaches(),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,i=null===this.pointerScreenY?0:r-this.pointerScreenY,o=null===this.pointerScreenX?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(fs()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy();this.scrollCaches=null}},e.prototype.requestAnimation=function(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)},e.prototype.handleSide=function(e,t){var n=e.scrollCache,r=this.edgeThreshold,i=r-e.distance,o=i*i/(r*r)*this.maxVelocity*t,s=1;switch(e.name){case"left":s=-1;case"right":n.setScrollLeft(n.getScrollLeft()+o*s);break;case"top":s=-1;case"bottom":n.setScrollTop(n.getScrollTop()+o*s)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i],a=s.clientRect,l=e-a.left,u=a.right-e,c=t-a.top,d=a.bottom-t;l>=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&s.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:s,name:"top",distance:c}),d<=n&&this.everMovedDown&&s.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:s,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&s.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:s,name:"left",distance:l}),u<=n&&this.everMovedRight&&s.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:s,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new ps(!1):new hs(e,!1)}))},e.prototype.queryScrollEls=function(){for(var e=[],t=0,n=this.scrollQuery;t<n.length;t++){var r=n[t];"object"==typeof r?e.push(r):e.push.apply(e,Array.prototype.slice.call(document.querySelectorAll(r)))}return e},e}(),gs=function(e){function t(t,n){var r=e.call(this,t)||this;r.delay=null,r.minDistance=0,r.touchScrollAllowed=!0,r.mirrorNeedsRevert=!1,r.isInteracting=!1,r.isDragging=!1,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,r.delayTimeoutId=null,r.onPointerDown=function(e){r.isDragging||(r.isInteracting=!0,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,te(document.body),re(document.body),e.isTouch||e.origEvent.preventDefault(),r.emitter.trigger("pointerdown",e),r.isInteracting&&!r.pointer.shouldIgnoreMove&&(r.mirror.setIsVisible(!1),r.mirror.start(e.subjectEl,e.pageX,e.pageY),r.startDelay(e),r.minDistance||r.handleDistanceSurpassed(e)))},r.onPointerMove=function(e){if(r.isInteracting){if(r.emitter.trigger("pointermove",e),!r.isDistanceSurpassed){var t=r.minDistance,n=e.deltaX,i=e.deltaY;n*n+i*i>=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,ne(document.body),ie(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var i=r.pointer=new ls(t);return i.emitter.on("pointerdown",r.onPointerDown),i.emitter.on("pointermove",r.onPointerMove),i.emitter.on("pointerup",r.onPointerUp),n&&(i.selector=n),r.mirror=new cs,r.autoScroller=new ms,r}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(to),vs=function(){function e(e){this.origRect=xr(e),this.scrollCaches=kr(e).map((function(e){return new hs(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e<t.length;e++)t[e].destroy()},e.prototype.computeLeft=function(){for(var e=this.origRect.left,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollLeft-r.getScrollLeft()}return e},e.prototype.computeTop=function(){for(var e=this.origRect.top,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollTop-r.getScrollTop()}return e},e.prototype.isWithinClipping=function(e,t){for(var n,r={left:e,top:t},i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i];if(void 0,"HTML"!==(n=s.getEventTarget().tagName)&&"BODY"!==n&&!rr(r,s.clientRect))return!1}return!0},e}(),ys=function(){function e(e,t){var n=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(e){var t=n.dragging;n.initialHit=null,n.movingHit=null,n.finalHit=null,n.prepareHits(),n.processFirstCoord(e),n.initialHit||!n.requireInitial?(t.setIgnoreMove(!1),n.emitter.trigger("pointerdown",e)):t.setIgnoreMove(!0)},this.handleDragStart=function(e){n.emitter.trigger("dragstart",e),n.handleMove(e,!0)},this.handleDragMove=function(e){n.emitter.trigger("dragmove",e),n.handleMove(e)},this.handlePointerUp=function(e){n.releaseHits(),n.emitter.trigger("pointerup",e)},this.handleDragEnd=function(e){n.movingHit&&n.emitter.trigger("hitupdate",null,!0,e),n.finalHit=n.movingHit,n.movingHit=null,n.emitter.trigger("dragend",e)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Tr}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,i=e.subjectEl;i!==document&&(r=or(r,t=xr(i)));var o=this.initialHit=this.queryHitForOffset(r.left,r.top);if(o){if(this.useSubjectCenter&&t){var s=ir(t,o.rect);s&&(r=sr(s))}this.coordAdjust=ar(r,n)}else this.coordAdjust={left:0,top:0}},e.prototype.handleMove=function(e,t){var n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);!t&&_s(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=Re(this.droppableStore,(function(e){return e.component.prepareHits(),new vs(e.el)}))},e.prototype.releaseHits=function(){var e=this.offsetTrackers;for(var t in e)e[t].destroy();this.offsetTrackers={}},e.prototype.queryHitForOffset=function(e,t){var n=this.droppableStore,r=this.offsetTrackers,i=null;for(var o in n){var s=n[o].component,a=r[o];if(a&&a.isWithinClipping(e,t)){var l=a.computeLeft(),u=a.computeTop(),c=e-l,d=t-u,h=a.origRect,p=h.right-h.left,f=h.bottom-h.top;if(c>=0&&c<p&&d>=0&&d<f){var m=s.queryHit(c,d,p,f),g=s.context.getCurrentData().dateProfile;m&&on(g.activeRange,m.dateSpan.range)&&(!i||m.layer>i.layer)&&(m.rect.left+=l,m.rect.right+=l,m.rect.top+=u,m.rect.bottom+=u,i=m)}}}return i},e}();function _s(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&Sn(e.dateSpan,t.dateSpan)}function bs(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.datePointTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,{date:(i=t.dateEnv).toDate(n.range.start),dateStr:i.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay})),o}var ws=function(e){function t(t){var n=e.call(this,t)||this;n.handlePointerDown=function(e){var t=n.dragging,r=e.origEvent.target;t.setIgnoreMove(!n.component.isValidDateDownEl(r))},n.handleDragEnd=function(e){var t=n.component;if(!n.dragging.pointer.wasTouchScroll){var i=n.hitDragging,o=i.initialHit,s=i.finalHit;if(o&&s&&_s(o,s)){var a=t.context,l=r(r({},bs(o.dateSpan,a)),{dayEl:o.dayEl,jsEvent:e.origEvent,view:a.viewApi||a.calendarApi.view});a.emitter.trigger("dateClick",l)}}},n.dragging=new gs(t.el),n.dragging.autoScroller.isEnabled=!1;var i=n.hitDragging=new ys(n.dragging,Qi(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),xs=function(e){function t(t){var n=e.call(this,t)||this;n.dragSelection=null,n.handlePointerDown=function(e){var t=n,r=t.component,i=t.dragging,o=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);i.setIgnoreMove(!o),i.delay=e.isTouch?function(e){var t=e.context.options,n=t.selectLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var i=n.component.context,o=null,s=!1;e&&((o=function(e,t,n){var i=e.dateSpan,o=t.dateSpan,s=[i.range.start,i.range.end,o.range.start,o.range.end];s.sort(ce);for(var a={},l=0,u=n;l<u.length;l++){var c=(0,u[l])(e,t);if(!1===c)return null;c&&r(a,c)}return a.range={start:s[0],end:s[3]},a.allDay=i.allDay,a}(n.hitDragging.initialHit,e,i.pluginHooks.dateSelectionTransformers))&&n.component.isDateSelectionValid(o)||(s=!0,o=null)),o?i.dispatch({type:"SELECT_DATES",selection:o}):t||i.dispatch({type:"UNSELECT_DATES"}),s?Q():ee(),t||(n.dragSelection=o)},n.handlePointerUp=function(e){n.dragSelection&&(Dn(n.dragSelection,e,n.component.context),n.dragSelection=null)};var i=t.component.context.options,o=n.dragging=new gs(t.el);o.touchScrollAllowed=!1,o.minDistance=i.selectMinDistance||0,o.autoScroller.isEnabled=i.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),ks=function(e){function t(n){var i=e.call(this,n)||this;i.subjectEl=null,i.subjectSeg=null,i.isDragging=!1,i.eventRange=null,i.relevantEvents=null,i.receivingContext=null,i.validMutation=null,i.mutatedRelevantEvents=null,i.handlePointerDown=function(e){var t=e.origEvent.target,n=i,r=n.component,o=n.dragging,s=o.mirror,a=r.context.options,l=r.context;i.subjectEl=e.subjectEl;var u=i.subjectSeg=cn(e.subjectEl),c=(i.eventRange=u.eventRange).instance.instanceId;i.relevantEvents=Ot(l.getCurrentData().eventStore,c),o.minDistance=e.isTouch?0:a.eventDragMinDistance,o.delay=e.isTouch&&c!==r.props.eventSelection?function(e){var t=e.context.options,n=t.eventLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null,s.parentNode=V(t,".fc"),s.revertDuration=a.dragRevertDuration;var d=r.isValidSegDownEl(t)&&!V(t,".fc-event-resizer");o.setIgnoreMove(!d),i.isDragging=d&&e.subjectEl.classList.contains("fc-event-draggable")},i.handleDragStart=function(e){var t=i.component.context,n=i.eventRange,r=n.instance.instanceId;e.isTouch?r!==i.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:r}):t.dispatch({type:"UNSELECT_EVENT"}),i.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:i.subjectEl,event:new Yn(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},i.handleHitUpdate=function(e,t){if(i.isDragging){var n=i.relevantEvents,r=i.hitDragging.initialHit,o=i.component.context,s=null,a=null,l=null,u=!1,c={affectedEvents:n,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){var d=e.component,h=(s=d.context).options;o===s||h.editable&&h.droppable?(a=function(e,t,n){var r=e.dateSpan,i=t.dateSpan,o=r.range.start,s=i.range.start,a={};r.allDay!==i.allDay&&(a.allDay=i.allDay,a.hasEnd=t.component.context.options.allDayMaintainDuration,i.allDay&&(o=xe(o)));var l=Jt(o,s,e.component.context.dateEnv,e.component===t.component?e.component.largeUnit:null);l.milliseconds&&(a.allDay=!1);for(var u={datesDelta:l,standardProps:a},c=0,d=n;c<d.length;c++)(0,d[c])(u,e,t);return u}(r,e,s.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=An(n,s.getCurrentData().eventUiBases,a,s),c.mutatedEvents=l,d.isInteractionValid(c)||(u=!0,a=null,l=null,c.mutatedEvents={defs:{},instances:{}})):s=null}i.displayDrag(s,c),u?Q():ee(),t||(o===s&&_s(r,e)&&(a=null),i.dragging.setMirrorNeedsRevert(!a),i.dragging.setMirrorIsVisible(!e||!document.querySelector(".fc-event-mirror")),i.receivingContext=s,i.validMutation=a,i.mutatedRelevantEvents=l)}},i.handlePointerUp=function(){i.isDragging||i.cleanup()},i.handleDragEnd=function(e){if(i.isDragging){var t=i.component.context,n=t.viewApi,o=i,s=o.receivingContext,a=o.validMutation,l=i.eventRange.def,u=i.eventRange.instance,c=new Yn(t,l,u),d=i.relevantEvents,h=i.mutatedRelevantEvents,p=i.hitDragging.finalHit;if(i.clearDrag(),t.emitter.trigger("eventDragStop",{el:i.subjectEl,event:c,jsEvent:e.origEvent,view:n}),a){if(s===t){var f=new Yn(t,h.defs[l.defId],u?h.instances[u.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:h});for(var m={oldEvent:c,event:f,relatedEvents:Hn(h,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}},g={},v=0,y=t.getCurrentData().pluginHooks.eventDropTransformers;v<y.length;v++){var _=y[v];r(g,_(a,t))}t.emitter.trigger("eventDrop",r(r(r({},m),g),{el:e.subjectEl,delta:a.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",m)}else if(s){var b={event:c,relatedEvents:Hn(d,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}};t.emitter.trigger("eventLeave",r(r({},b),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:d}),t.emitter.trigger("eventRemove",b);var w=h.defs[l.defId],x=h.instances[u.instanceId],k=new Yn(s,w,x);s.dispatch({type:"MERGE_EVENTS",eventStore:h});var S={event:k,relatedEvents:Hn(h,s,x),revert:function(){s.dispatch({type:"REMOVE_EVENTS",eventStore:h})}};s.emitter.trigger("eventAdd",S),e.isTouch&&s.dispatch({type:"SELECT_EVENT",eventInstanceId:u.instanceId}),s.emitter.trigger("drop",r(r({},bs(p.dateSpan,s)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:p.component.context.viewApi})),s.emitter.trigger("eventReceive",r(r({},S),{draggedEl:e.subjectEl,view:p.component.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}i.cleanup()};var o=i.component.context.options,s=i.dragging=new gs(n.el);s.pointer.selector=t.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=o.dragScroll;var a=i.hitDragging=new ys(i.dragging,eo);return a.useSubjectCenter=n.useEventCenter,a.emitter.on("pointerdown",i.handlePointerDown),a.emitter.on("dragstart",i.handleDragStart),a.emitter.on("hitupdate",i.handleHitUpdate),a.emitter.on("pointerup",i.handlePointerUp),a.emitter.on("dragend",i.handleDragEnd),i}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.displayDrag=function(e,t){var n=this.component.context,r=this.receivingContext;r&&r!==e&&(r===n?r.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:{defs:{},instances:{}},isEvent:!0}}):r.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},t.prototype.clearDrag=function(){var e=this.component.context,t=this.receivingContext;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})},t.prototype.cleanup=function(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null},t.SELECTOR=".fc-event-draggable, .fc-event-resizable",t}(Ji),Ss=function(e){function t(t){var n=e.call(this,t)||this;n.draggingSegEl=null,n.draggingSeg=null,n.eventRange=null,n.relevantEvents=null,n.validMutation=null,n.mutatedRelevantEvents=null,n.handlePointerDown=function(e){var t=n.component,r=cn(n.querySegEl(e)),i=n.eventRange=r.eventRange;n.dragging.minDistance=t.context.options.eventDragMinDistance,n.dragging.setIgnoreMove(!n.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&n.component.props.eventSelection!==i.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=Ot(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var i=n.querySegEl(e);n.draggingSegEl=i,n.draggingSeg=cn(i),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:i,event:new Yn(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,i){var o=n.component.context,s=n.relevantEvents,a=n.hitDragging.initialHit,l=n.eventRange.instance,u=null,c=null,d=!1,h={affectedEvents:s,mutatedEvents:{defs:{},instances:{}},isEvent:!0};e&&(u=function(e,t,n,i,o){for(var s=e.component.context.dateEnv,a=Jt(e.dateSpan.range.start,t.dateSpan.range.start,s,e.component.largeUnit),l={},u=0,c=o;u<c.length;u++){var d=(0,c[u])(e,t);if(!1===d)return null;d&&r(l,d)}if(n){if(s.add(i.start,a)<i.end)return l.startDelta=a,l}else if(s.add(i.end,a)>i.start)return l.endDelta=a,l;return null}(a,e,i.subjectEl.classList.contains("fc-event-resizer-start"),l.range,o.pluginHooks.eventResizeJoinTransforms)),u&&(c=An(s,o.getCurrentData().eventUiBases,u,o),h.mutatedEvents=c,n.component.isInteractionValid(h)||(d=!0,u=null,c=null,h.mutatedEvents=null)),c?o.dispatch({type:"SET_EVENT_RESIZE",state:h}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),d?Q():ee(),t||(u&&_s(a,e)&&(u=null),n.validMutation=u,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,i=n.eventRange.def,o=n.eventRange.instance,s=new Yn(t,i,o),a=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:s,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new Yn(t,l.defs[i.defId],o?l.instances[o.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:s,event:u,relatedEvents:Hn(l,t,o),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",r(r({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||$e(0),endDelta:n.validMutation.endDelta||$e(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var i=t.component,o=n.dragging=new gs(t.el);o.pointer.selector=".fc-event-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=i.context.options.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return V(e.subjectEl,".fc-event")},t}(Ji),Ts=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=e.origEvent.target;t.matchesCancel=!!V(r,n),t.matchesEvent=!!V(r,ks.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,i=n.getCurrentData();if(!r.wasTouchScroll){if(i.dateSelection&&!t.isRecentPointerDateSelect){var o=n.options.unselectAuto;!o||o&&t.matchesCancel||n.calendarApi.unselect(e)}i.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new ls(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Es={dateClick:At,eventDragStart:At,eventDragStop:At,eventDrop:At,eventResizeStart:At,eventResizeStop:At,eventResize:At,drop:At,eventReceive:At,eventLeave:At},Ds=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,i){var o=n.hitDragging.dragging,s=null,a=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(s=e.component.context,n.canDropElOnCalendar(i.subjectEl,s)&&(a=function(e,t,n){for(var i=r({},t.leftoverProps),o=0,s=n.pluginHooks.externalDefTransforms;o<s.length;o++){var a=s[o];r(i,a(e,t))}var l=Wt(i,n),u=Gt(l.refined,l.extra,t.sourceId,e.allDay,n.options.forceEventDuration||Boolean(t.duration),n),c=e.range.start;e.allDay&&t.startTime&&(c=n.dateEnv.add(c,t.startTime));var d=t.duration?n.dateEnv.add(c,t.duration):Mn(e.allDay,c,n);return{def:u,instance:Ie(u.defId,{start:c,end:d})}}(e.dateSpan,n.dragMeta,s),u.mutatedEvents=Lt(a),(l=!Gr(u,s))&&(u.mutatedEvents={defs:{},instances:{}},a=null))),n.displayDrag(s,u),o.setMirrorIsVisible(t||!a||!document.querySelector(".fc-event-mirror")),l?Q():ee(),t||(o.setMirrorNeedsRevert(!a),n.receivingContext=s,n.droppableEvent=a)},this.handleDragEnd=function(e){var t=n,i=t.receivingContext,o=t.droppableEvent;if(n.clearDrag(),i&&o){var s=n.hitDragging.finalHit,a=s.component.context.viewApi,l=n.dragMeta;if(i.emitter.trigger("drop",r(r({},bs(s.dateSpan,i)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:a})),l.create){var u=Lt(o);i.dispatch({type:"MERGE_EVENTS",eventStore:u}),e.isTouch&&i.dispatch({type:"SELECT_EVENT",eventInstanceId:o.instance.instanceId}),i.emitter.trigger("eventReceive",{event:new Yn(i,o.def,o.instance),relatedEvents:[],revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:u})},draggedEl:e.subjectEl,view:a})}}n.receivingContext=null,n.droppableEvent=null};var i=this.hitDragging=new ys(e,eo);i.requireInitial=!1,i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}return e.prototype.buildDragMeta=function(e){return"object"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta(e)):io((t=function(e,t){var n=no.dataAttrPrefix,r=(n?n+"-":"")+"event";return e.getAttribute("data-"+r)||""}(e))?JSON.parse(t):{create:!1});var t},e.prototype.displayDrag=function(e,t){var n=this.receivingContext;n&&n!==e&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},e.prototype.clearDrag=function(){this.receivingContext&&this.receivingContext.dispatch({type:"UNSET_EVENT_DRAG"})},e.prototype.canDropElOnCalendar=function(e,t){var n=t.options.dropAccept;return"function"==typeof n?n.call(t.calendarApi,e):"string"!=typeof n||!n||Boolean(H(e,n))},e}();no.dataAttrPrefix="";var Cs=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.handlePointerDown=function(e){var t=n.dragging,r=n.settings,i=r.minDistance,o=r.longPressDelay;t.minDistance=null!=i?i:e.isTouch?0:xt.eventDragMinDistance,t.delay=e.isTouch?null!=o?o:xt.longPressDelay:0},this.handleDragStart=function(e){e.isTouch&&n.dragging.delay&&e.subjectEl.classList.contains("fc-event")&&n.dragging.mirror.getMirrorEl().classList.add("fc-event-selected")},this.settings=t;var r=this.dragging=new gs(e);r.touchScrollAllowed=!1,null!=t.itemSelector&&(r.pointer.selector=t.itemSelector),null!=t.appendTo&&(r.mirror.parentNode=t.appendTo),r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Ms=function(e){function t(t){var n=e.call(this,t)||this;n.shouldIgnoreMove=!1,n.mirrorSelector="",n.currentMirrorEl=null,n.handlePointerDown=function(e){n.emitter.trigger("pointerdown",e),n.shouldIgnoreMove||n.emitter.trigger("dragstart",e)},n.handlePointerMove=function(e){n.shouldIgnoreMove||n.emitter.trigger("dragmove",e)},n.handlePointerUp=function(e){n.emitter.trigger("pointerup",e),n.shouldIgnoreMove||n.emitter.trigger("dragend",e)};var r=n.pointer=new ls(t);return r.emitter.on("pointerdown",n.handlePointerDown),r.emitter.on("pointermove",n.handlePointerMove),r.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy()},t.prototype.setIgnoreMove=function(e){this.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){if(e)this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null);else{var t=this.mirrorSelector?document.querySelector(this.mirrorSelector):null;t&&(this.currentMirrorEl=t,t.style.visibility="hidden")}},t}(to),As=function(){function e(e,t){var n=document;e===document||e instanceof Element?(n=e,t=t||{}):t=e||{};var r=this.dragging=new Ms(n);"string"==typeof t.itemSelector?r.pointer.selector=t.itemSelector:n===document&&(r.pointer.selector="[data-event]"),"string"==typeof t.mirrorSelector&&(r.mirrorSelector=t.mirrorSelector),new Ds(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Is=ni({componentInteractions:[ws,xs,ks,Ss],calendarInteractions:[Ts],elementDraggingImpl:gs,listenerRefiners:Es}),Ls=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Nr(),t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,i=[],o=Bo(r.options);return e&&i.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),Lr(pi,{viewSpec:r.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(zo,{liquid:!n.isHeightAuto&&!n.forPrint,cols:[],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");var o=this.props,s=this.context,a=!o.forPrint&&Bo(s.options),l=!o.forPrint&&Uo(s.options),u=[];return e&&u.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),u.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&u.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Ho}]}),Lr(pi,{viewSpec:s.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(i,{liquid:!o.isHeightAuto&&!o.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:u}))}))},t}(ti);function Os(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.row].push(s)}return n}function Ns(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.firstCol].push(s)}return n}function Rs(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.row].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}var Ps=bt({week:"narrow"}),Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.props;if(n.onMoreClick){var r=n.segsByEachCol,i=r.filter((function(e){return n.segIsHidden[e.eventRange.instance.instanceId]}));n.onMoreClick({date:n.date,allSegs:r,hiddenSegs:i,moreCnt:n.moreCnt,dayEl:t.rootEl,ev:e})}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.viewApi,o=this.props,s=o.date,a=o.dateProfile,l={num:o.moreCnt,text:o.buildMoreLinkText(o.moreCnt),view:i},u=n.navLinks?{"data-navlink":fr(s,"week"),tabIndex:0}:{};return Lr(Zo,{date:s,dateProfile:a,todayRange:o.todayRange,showDayNumber:o.showDayNumber,extraHookProps:o.extraHookProps,elRef:this.handleRootEl},(function(t,i,c,d){return Lr("td",r({ref:t,className:["fc-daygrid-day"].concat(i,o.extraClassNames||[]).join(" ")},c,o.extraDataAttrs),Lr("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:o.innerElRef},o.showWeekNumber&&Lr(ns,{date:s,defaultFormat:Ps},(function(e,t,n,i){return Lr("a",r({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},u),i)})),!d&&Lr(Vs,{date:s,dateProfile:a,showDayNumber:o.showDayNumber,forceDayTop:o.forceDayTop,todayRange:o.todayRange,extraHookProps:o.extraHookProps}),Lr("div",{className:"fc-daygrid-day-events",ref:o.fgContentElRef,style:{paddingBottom:o.fgPaddingBottom}},o.fgContent,Boolean(o.moreCnt)&&Lr("div",{className:"fc-daygrid-day-bottom",style:{marginTop:o.moreMarginTop}},Lr(oi,{hookProps:l,classNames:n.moreLinkClassNames,content:n.moreLinkContent,defaultContent:Ys,didMount:n.moreLinkDidMount,willUnmount:n.moreLinkWillUnmount},(function(t,n,r,i){return Lr("a",{onClick:e.handleMoreLinkClick,ref:t,className:["fc-daygrid-more-link"].concat(n).join(" ")},i)})))),Lr("div",{className:"fc-daygrid-day-bg"},o.bgContent)))}))},t}(ti);function js(e){return e.dayNumberText}function Ys(e){return e.text}var Vs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context.options.navLinks?{"data-navlink":fr(e.date),tabIndex:0}:{};return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:js},(function(n,i){return(i||e.forceDayTop)&&Lr("div",{className:"fc-daygrid-day-top",ref:n},Lr("a",r({className:"fc-daygrid-day-number"},t),i||Lr(Rr,null,"\xa0")))}))},t}(Br),Hs=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Bs(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var Us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||Hs,i=yn(e.seg,n,t,!0,e.defaultDisplayEventEnd);return Lr(qo,{seg:e.seg,timeText:i,defaultContent:zs,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,i,o){return Lr("a",r({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(s=e.seg.eventRange.def.url)?{href:s}:{}),o);var s}))},t}(Br);function zs(e){return Lr(Rr,null,Lr("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title"},e.event.title||Lr(Rr,null,"\xa0")))}var qs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Wo,r({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Hs,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(Br);function Ws(e,t,n,i,o,s,a,l){for(var u=[],c=[],d={},h={},p={},f={},m={},g=0;g<a;g++)u.push([]),c.push(0);for(var v=0,y=t=pn(t,l);v<y.length;v++)E(S=y[v],o[S.eventRange.instance.instanceId+":"+S.firstCol]||0);!0===n||!0===i?function(e,t,n,r){Gs(e,t,n,!0,(function(e){return e.bottom<=r}))}(c,d,u,s):"number"==typeof n?function(e,t,n,r){Gs(e,t,n,!1,(function(e,t){return t<r}))}(c,d,u,n):"number"==typeof i&&function(e,t,n,r){Gs(e,t,n,!0,(function(e,t){return t<r}))}(c,d,u,i);for(var _=0;_<a;_++){for(var b=0,w=0,x=0,k=u[_];x<k.length;x++){var S,T=k[x];d[(S=T.seg).eventRange.instance.instanceId]||(h[S.eventRange.instance.instanceId]=T.top,S.firstCol===S.lastCol&&S.isStart&&S.isEnd?(p[S.eventRange.instance.instanceId]=T.top-b,w=0,b=T.bottom):w+=T.bottom-T.top)}w&&(c[_]?f[_]=w:m[_]=w)}function E(e,t){if(!D(e,t,0))for(var n=e.firstCol;n<=e.lastCol;n++)for(var r=0,i=u[n];r<i.length;r++)if(D(e,t,i[r].bottom))return}function D(e,t,n){if(function(e,t,n){for(var r=e.firstCol;r<=e.lastCol;r++)for(var i=0,o=u[r];i<o.length;i++){var s=o[i];if(n<s.bottom&&n+t>s.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var i=u[r],o=0;o<i.length&&n>=i[o].top;)o++;i.splice(o,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var C in o)o[C]||(d[C.split(":")[0]]=!0);return{segsByFirstCol:u.map($s),segsByEachCol:u.map((function(t,n){var i=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];t.push(i.seg)}return t}(t);return function(e,t,n){for(var i={start:t,end:me(t,1)},o=[],s=0,a=e;s<a.length;s++){var l=a[s],u=l.eventRange,c=u.range,d=tn(c,i);d&&o.push(r(r({},l),{firstCol:n,lastCol:n,eventRange:{def:u.def,ui:r(r({},u.ui),{durationEditable:!1}),instance:u.instance,range:d},isStart:l.isStart&&d.start.valueOf()===c.start.valueOf(),isEnd:l.isEnd&&d.end.valueOf()===c.end.valueOf()}))}return o}(i,e[n].date,n)})),segIsHidden:d,segTops:h,segMarginTops:p,moreCnts:c,moreTops:f,paddingBottoms:m}}function $s(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];o.seg.firstCol===t&&n.push(o.seg)}return n}function Gs(e,t,n,r,i){for(var o=e.length,s={},a=[],l=0;l<o;l++)a.push([]);for(l=0;l<o;l++)for(var u=0,c=0,d=n[l];c<d.length;c++){var h=d[c];i(h,u)?p(h):f(h,u,r),h.top!==h.bottom&&u++}function p(e){var t=e.seg,n=t.eventRange.instance.instanceId;if(!s[n]){s[n]=!0;for(var r=t.firstCol;r<=t.lastCol;r++)a[r].push(e)}}function f(n,r,i){var o=n.seg,s=o.eventRange.instance.instanceId;if(!t[s]){t[s]=!0;for(var l=o.firstCol;l<=o.lastCol;l++){var u=++e[l];if(i&&1===u)for(var c=r-1;a[l].length>c;)f(a[l].pop(),a[l].length,!1)}}}}var Ks=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Ao,t.frameElRefs=new Ao,t.fgElRefs=new Ao,t.segHarnessRefs=new Ao,t.rootElRef=Nr(),t.state={framePositions:null,maxContentHeight:null,segHeights:{}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context,i=t.cells.length,o=Ns(t.businessHourSegs,i),s=Ns(t.bgEventSegs,i),a=Ns(this.getHighlightSegs(),i),l=Ns(this.getMirrorSegs(),i),u=Ws(t.cells,t.fgEventSegs,t.dayMaxEvents,t.dayMaxEventRows,n.segHeights,n.maxContentHeight,i,r.options.eventOrder),c=u.paddingBottoms,d=u.segsByFirstCol,h=u.segsByEachCol,p=u.segIsHidden,f=u.segTops,m=u.segMarginTops,g=u.moreCnts,v=u.moreTops,y=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var i=e.renderFgSegs(d[r],p,f,m,y,t.todayRange),u=e.renderFgSegs(l[r],{},f,{},{},t.todayRange,Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Lr(Fs,{key:n.key,elRef:e.cellElRefs.createRef(n.key),innerElRef:e.frameElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&0===r,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,moreCnt:g[r],buildMoreLinkText:t.buildMoreLinkText,onMoreClick:t.onMoreClick,segIsHidden:p,moreMarginTop:v[r],segsByEachCol:h[r],fgPaddingBottom:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Lr(Rr,null,Lr(Rr,null,i),Lr(Rr,null,u)),bgContent:Lr(Rr,null,e.renderFillSegs(a[r],"highlight"),e.renderFillSegs(o[r],"non-business"),e.renderFillSegs(s[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!je(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,i,o,s,a,l,u){var c=this.context,d=this.props.eventSelection,h=this.state.framePositions,p=1===this.props.cells.length,f=[];if(h)for(var m=0,g=e;m<g.length;m++){var v=g[m],y=v.eventRange.instance.instanceId,_=a||l||u,b=o[y],w=t[y]||b,x=t[y]||_||v.firstCol!==v.lastCol||!v.isStart||!v.isEnd,k=void 0,S=void 0,T=void 0,E=void 0;x?(S=n[y],c.isRtl?(E=0,T=h.lefts[v.lastCol]-h.lefts[v.firstCol]):(T=0,E=h.rights[v.firstCol]-h.rights[v.lastCol])):k=i[y],f.push(Lr("div",{className:"fc-daygrid-event-harness"+(x?" fc-daygrid-event-harness-abs":""),key:y,ref:_?null:this.segHarnessRefs.createRef(y+":"+v.firstCol),style:{visibility:w?"hidden":"",marginTop:k||"",top:S||"",left:T||"",right:E||""}},Bs(v)?Lr(Us,r({seg:v,isDragging:a,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s))):Lr(qs,r({seg:v,isDragging:a,isResizing:l,isDateSelecting:u,isSelected:y===d,defaultDisplayEventEnd:p},_n(v,s)))))}return f},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,o=this.props.todayRange,s=this.state.framePositions,a=[];if(s)for(var l=0,u=e;l<u.length;l++){var c=u[l],d=n?{right:0,left:s.lefts[c.lastCol]-s.lefts[c.firstCol]}:{left:0,right:s.rights[c.firstCol]-s.rights[c.lastCol]};a.push(Lr("div",{key:wn(c.eventRange),className:"fc-daygrid-bg-harness",style:d},"bg-event"===t?Lr(es,r({seg:c},_n(c,o))):Qo(t)))}return Lr.apply(void 0,i([Rr,{}],a))},t.prototype.updateSizing=function(e){var t=this.props,n=this.frameElRefs;if(null!==t.clientWidth){if(e){var r=t.cells.map((function(e){return n.currentMap[e.key]}));if(r.length){var i=this.rootElRef.current;this.setState({framePositions:new Er(i,r,!0,!1)})}}var o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({segHeights:this.computeSegHeights(),maxContentHeight:o?this.computeMaxContentHeight():null})}},t.prototype.computeSegHeights=function(){return Re(this.segHarnessRefs.currentMap,(function(e){return e.getBoundingClientRect().height}))},t.prototype.computeMaxContentHeight=function(){var e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top},t.prototype.getCellEls=function(){var e=this.cellElRefs.currentMap;return this.props.cells.map((function(t){return e[t.key]}))},t}(ti);Ks.addStateEquality({segHeights:je});var Zs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.repositioner=new ji(t.updateSize.bind(t)),t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(t.props.elRef,e)},t.handleDocumentMousedown=function(e){var n=t.props.onClose;n&&!t.rootEl.contains(e.target)&&n()},t.handleDocumentScroll=function(){t.repositioner.request(10)},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return n(t,e),t.prototype.render=function(){var e=this.context.theme,t=this.props,n=["fc-popover",e.getClass("popover")].concat(t.extraClassNames||[]);return Lr("div",r({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),Lr("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},Lr("span",{className:"fc-popover-title"},t.title),Lr("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),Lr("div",{className:"fc-popover-body "+e.getClass("popoverContent")},t.children))},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMousedown),document.addEventListener("scroll",this.handleDocumentScroll),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMousedown),document.removeEventListener("scroll",this.handleDocumentScroll)},t.prototype.updateSize=function(){var e=this.props,t=e.alignmentEl,n=e.topAlignmentEl,r=this.rootEl;if(r){var i,o=r.getBoundingClientRect(),s=t.getBoundingClientRect(),a=n?n.getBoundingClientRect().top:s.top;a=Math.min(a,window.innerHeight-o.height-10),a=Math.max(a,10),i=this.context.isRtl?s.right-o.width:s.left,i=Math.min(i,window.innerWidth-o.width-10),z(r,{top:a,left:i=Math.max(i,10)})}},t}(Br),Xs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handlePopoverEl=function(e){t.popoverEl=e,e?t.context.registerInteractiveComponent(t,{el:e,useEventCenter:!1}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,i=this.props,o=i.date,s=i.hiddenInstances,a=i.todayRange,l=i.dateProfile,u=i.selectedInstanceId,c=n.format(o,t.dayPopoverFormat);return Lr(Zo,{date:o,dateProfile:l,todayRange:a,elRef:this.handlePopoverEl},(function(e,t,n){return Lr(Zs,{elRef:e,title:c,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,onClose:i.onCloseClick,alignmentEl:i.alignmentEl,topAlignmentEl:i.topAlignmentEl},Lr(Xo,{date:o,dateProfile:l,todayRange:a},(function(e,t){return t&&Lr("div",{className:"fc-more-popover-misc",ref:e},t)})),i.segs.map((function(e){var t=e.eventRange.instance.instanceId;return Lr("div",{className:"fc-daygrid-event-harness",key:t,style:{visibility:s[t]?"hidden":""}},Bs(e)?Lr(Us,r({seg:e,isDragging:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))):Lr(qs,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===u,defaultDisplayEventEnd:!1},_n(e,a))))})))}))},t.prototype.queryHit=function(e,t,n,r){var i=this.props.date;if(e<n&&t<r)return{component:this,dateSpan:{allDay:!0,range:{start:i,end:me(i,1)}},dayEl:this.popoverEl,rect:{left:0,top:0,right:n,bottom:r},layer:1}},t.prototype.isPopover=function(){return!0},t}(ti),Js=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=ot(Os),t.splitBgEventSegs=ot(Os),t.splitFgEventSegs=ot(Os),t.splitDateSelectionSegs=ot(Os),t.splitEventDrag=ot(Rs),t.splitEventResize=ot(Rs),t.buildBuildMoreLinkText=ot(Qs),t.rowRefs=new Ao,t.state={morePopoverState:null},t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.context,i=n.dateEnv,o=n.options.moreLinkClick;function s(e){var t=e.eventRange,r=t.def,o=t.instance,s=t.range;return{event:new Yn(n,r,o),start:i.toDate(s.start),end:i.toDate(s.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof o&&(o=o({date:i.toDate(e.date),allDay:!0,allSegs:e.allSegs.map(s),hiddenSegs:e.hiddenSegs.map(s),jsEvent:e.ev,view:n.viewApi})),o&&"popover"!==o?"string"==typeof o&&n.calendarApi.zoomTo(e.date,o):t.setState({morePopoverState:r(r({},e),{currentFgEventSegs:t.props.fgEventSegs})})},t.handleMorePopoverClose=function(){t.setState({morePopoverState:null})},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,i=t.dayMaxEvents,o=t.expandRows,s=this.state.morePopoverState,a=t.cells.length,l=this.splitBusinessHourSegs(t.businessHourSegs,a),u=this.splitBgEventSegs(t.bgEventSegs,a),c=this.splitFgEventSegs(t.fgEventSegs,a),d=this.splitDateSelectionSegs(t.dateSelectionSegs,a),h=this.splitEventDrag(t.eventDrag,a),p=this.splitEventResize(t.eventResize,a),f=this.buildBuildMoreLinkText(this.context.options.moreLinkText),m=!0===i||!0===r;return m&&!o&&(m=!1,r=null,i=null),Lr("div",{className:["fc-daygrid-body",m?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},Lr(bo,{unit:"day"},(function(m,g){return Lr(Rr,null,Lr("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:o?t.clientHeight:""}},t.colGroupNode,Lr("tbody",null,t.cells.map((function(o,s){return Lr(Ks,{ref:e.rowRefs.createRef(s),key:o.length?o[0].date.toISOString():s,showDayNumbers:a>1,showWeekNumbers:t.showWeekNumbers,todayRange:g,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:l[s],eventSelection:t.eventSelection,bgEventSegs:u[s].filter(ea),fgEventSegs:c[s],dateSelectionSegs:d[s],eventDrag:h[s],eventResize:p[s],dayMaxEvents:i,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:f,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&s&&s.currentFgEventSegs===t.fgEventSegs&&Lr(Xs,{date:s.date,dateProfile:n,segs:s.allSegs,alignmentEl:s.dayEl,topAlignmentEl:1===a?t.headerAlignElRef.current:null,onCloseClick:e.handleMorePopoverClose,selectedInstanceId:t.eventSelection,hiddenInstances:(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{},todayRange:g}))})))},t.prototype.prepareHits=function(){this.rowPositions=new Er(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Er(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i)return{row:o,col:i,dateSpan:{range:this.getCellRange(o,i),allDay:!0},dayEl:this.getCellEl(o,i),relativeRect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]}}},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:me(n,1)}},t}(ti);function Qs(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ea(e){return e.eventRange.def.allDay}var ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new na,t.tableRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr(Js,r({ref:this.tableRef,elRef:this.handleRootEl},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t.prototype.prepareHits=function(){this.tableRef.current.prepareHits()},t.prototype.queryHit=function(e,t){var n=this.tableRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti),na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return n(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Eo),ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=ot(ia),t.headerRef=Nr(),t.tableRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,i=this.props,o=this.buildDayTableModel(i.dateProfile,r),s=n.dayHeaders&&Lr(xo,{ref:this.headerRef,dateProfile:i.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),a=function(t){return Lr(ta,{ref:e.tableRef,dateProfile:i.dateProfile,dayTableModel:o,businessHours:i.businessHours,dateSelection:i.dateSelection,eventStore:i.eventStore,eventUiBases:i.eventUiBases,eventSelection:i.eventSelection,eventDrag:i.eventDrag,eventResize:i.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!i.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(s,a,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(s,a)},t}(Ls);function ia(e,t){var n=new So(e.renderRange,t);return new To(n,/year|month|week/.test(e.currentRangeUnit))}var oa=ni({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:At,moreLinkClassNames:At,moreLinkContent:At,moreLinkDidMount:At,moreLinkWillUnmount:At},views:{dayGrid:{component:ra,dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.buildRenderRange=function(t,n,r){var i,o=this.props.dateEnv,s=e.prototype.buildRenderRange.call(this,t,n,r),a=s.start,l=s.end;return/^(year|month)$/.test(n)&&(a=o.startOfWeek(a),(i=o.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=fe(i,1))),this.props.monthMode&&this.props.fixedWeekCount&&(l=fe(l,6-Math.ceil(ve(a,l)))),{start:a,end:l}},t}(yi)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?ln(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(cr),aa=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slatMetas=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(sn(t.currentRange,e)){var n=xe(e),r=e.valueOf()-n.valueOf();if(r>=Je(t.slotMinTime)&&r<Je(t.slotMaxTime))return this.computeTimeTop($e(r))}},e.prototype.computeDateTop=function(e,t){return t||(t=xe(e)),this.computeTimeTop($e(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,i=this.dateProfile,o=this.slatMetas,s=r.els.length,a=o[1].date.valueOf()-o[0].date.valueOf(),l=(e.milliseconds-Je(i.slotMinTime))/a;return l=Math.max(0,l),l=Math.min(s,l),t=Math.floor(l),n=l-(t=Math.min(t,s-1)),r.tops[t]+r.getHeight(t)*n},e}(),la=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],ua=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.slatElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr("div",{className:"fc-timegrid-slots",ref:this.rootElRef},Lr("table",{className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,Lr(ca,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))},t.prototype.componentDidMount=function(){this.updateSizing()},t.prototype.componentDidUpdate=function(){this.updateSizing()},t.prototype.componentWillUnmount=function(){this.props.onCoords&&this.props.onCoords(null)},t.prototype.updateSizing=function(){var e,t=this.props;t.onCoords&&null!==t.clientWidth&&this.rootElRef.current.offsetHeight&&t.onCoords(new aa(new Er(this.rootElRef.current,(e=this.slatElRefs.currentMap,t.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,t.slatMetas))},t}(Br),ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,i=e.slatElRefs;return Lr("tbody",null,e.slatMetas.map((function(o,s){var a={time:o.time,date:t.dateEnv.toDate(o.date),view:t.viewApi},l=["fc-timegrid-slot","fc-timegrid-slot-lane",o.isLabeled?"":"fc-timegrid-slot-minor"];return Lr("tr",{key:o.key,ref:i.createRef(o.key)},e.axis&&Lr(ha,r({},o)),Lr(oi,{hookProps:a,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return Lr("td",{ref:e,className:l.concat(t).join(" "),"data-time":o.isoTimeStr},r)})))})))},t}(Br),da=bt({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function ha(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Lr(Yr.Consumer,null,(function(n){if(e.isLabeled){var r=n.dateEnv,i=n.options,o=n.viewApi,s=null==i.slotLabelFormat?da:Array.isArray(i.slotLabelFormat)?bt(i.slotLabelFormat[0]):bt(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:o,text:r.format(e.date,s)};return Lr(oi,{hookProps:a,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:pa,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,o){return Lr("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Lr("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Lr("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},o)))}))}return Lr("td",{className:t.join(" "),"data-time":e.isoTimeStr})}))}function pa(e){return e.text}function fa(e,t,n,r,i){for(var o=new Date(0),s=e,a=$e(0),l=n||function(e){var t,n,r;for(t=la.length-1;t>=0;t--)if(null!==(r=Qe(n=$e(la[t]),e))&&r>1)return n;return e}(r),u=[];Je(s)<Je(t);){var c=i.add(o,s),d=null!==Qe(a,l);u.push({date:c,time:s,key:c.toISOString(),isoTimeStr:nt(c),isLabeled:d}),s=Ke(s,r),a=Ke(a,r)}return u}var ma=bt({week:"short"}),ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new sa,t.headerElRef=Nr(),t.rootElRef=Nr(),t.scrollerElRef=Nr(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e){void 0===e&&(e="");var n=t.context.options,i=t.props.dateProfile.renderRange,o=ye(i.start,i.end),s=n.navLinks&&1===o?{"data-navlink":fr(i.start,"week"),tabIndex:0}:{};return n.weekNumbers?Lr(ns,{date:i.start,defaultFormat:ma},(function(t,n,i,o){return Lr("th",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:e}},Lr("a",r({ref:i,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},s),o)))})):Lr("th",{className:"fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-axis-frame",style:{height:e}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,i=n.viewApi,o={text:r.allDayText,view:i};return Lr(oi,{hookProps:o,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:va,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,i){return Lr("td",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Lr("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,i=this.props,o=[],s=Bo(r.options);return e&&o.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(o.push({type:"body",key:"all-day",chunk:{content:t}}),o.push({type:"body",key:"all-day-divider",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Lr(pi,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(zo,{liquid:!i.isHeightAuto&&!i.forPrint,cols:[{width:"shrink"}],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,i,o,s){var a=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Bo(u.options),h=!c.forPrint&&Uo(u.options),p=[];e&&p.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderHeadAxis(e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(p.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),p.push({key:"all-day-divider",type:"body",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var f=u.options.nowIndicator;return p.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Lr("div",{className:"fc-timegrid-axis-chunk"},Lr("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Lr("tbody",null,Lr(ya,{slatMetas:o}))),Lr("div",{className:"fc-timegrid-now-indicator-container"},Lr(bo,{unit:f?"minute":"day"},(function(e){var t=f&&s&&s.safeComputeTop(e);return"number"==typeof t?Lr(Go,{isAxis:!0,date:e},(function(e,n,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),h&&p.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Ho},{key:"cols",content:Ho}]}),Lr(pi,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(l,{liquid:!c.isHeightAuto&&!c.forPrint,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:p}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=5),{dayMaxEvents:t,dayMaxEventRows:n}},t}(ti);function va(e){return e.text}var ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return Lr("tr",{key:e.key},Lr(ha,r({},e)))}))},t}(Br);function _a(e,t){var n,r=[];for(n=0;n<t;n++)r.push([]);if(e)for(n=0;n<e.length;n++)r[e[n].col].push(e[n]);return r}function ba(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.col].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}function wa(e,t,n,r){for(var i=0,o=e;i<o.length;i++){var s=o[i];s.top=n.computeDateTop(s.start,t),s.bottom=Math.max(s.top+(r||0),n.computeDateTop(s.end,t))}}function xa(e,t,n){void 0===n&&(n=[]);for(var r=0;r<t.length;r++)i=e,o=t[r],i.bottom>o.top&&i.top<o.bottom&&n.push(t[r]);var i,o;return n}function ka(e){var t,n,r=e.forwardSegs,i=0;if(null==e.forwardPressure){for(t=0;t<r.length;t++)ka(n=r[t]),i=Math.max(i,1+n.forwardPressure);e.forwardPressure=i}}function Sa(e,t,n,r){var i,o=e.forwardSegs;if(null==e.forwardCoord)for(o.length?(function(e,t){var n=e.map(Ta),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(t);n.sort((function(e,t){return se(e,t,r)})),n.map((function(e){return e._seg}))}(o,r),Sa(o[0],t+1,n,r),e.forwardCoord=o[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),i=0;i<o.length;i++)Sa(o[i],0,e.forwardCoord,r)}function Ta(e){var t=fn(e);return t.forwardPressure=e.forwardPressure,t.backwardCoord=e.backwardCoord,t}var Ea=bt({hour:"numeric",minute:"2-digit",meridiem:!1}),Da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=["fc-timegrid-event","fc-v-event"];return this.props.isCondensed&&e.push("fc-timegrid-event-condensed"),Lr(Wo,r({},this.props,{defaultTimeFormat:Ea,extraClassNames:e}))},t}(Br);no.timeGridEventCondensedHeight=30;var Ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.selectMirror,i=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||n&&t.dateSelectionSegs||[],o=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr(Zo,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(s,a,l){return Lr("td",r({ref:s,className:["fc-timegrid-col"].concat(a,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(t.fgEventSegs,o)),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(i,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(n))),Lr("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),Lr(Ma,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,i){var o=this.props;return o.forPrint?this.renderPrintFgSegs(e):o.slatCoords?this.renderPositionedFgSegs(e,t,n,r,i):void 0},t.prototype.renderPrintFgSegs=function(e){var t=this.props;return(e=pn(e,this.context.options.eventOrder)).map((function(e){return Lr("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},Lr(Da,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},_n(e,t.todayRange,t.nowDate))))}))},t.prototype.renderPositionedFgSegs=function(e,t,n,i,o){var s=this,a=this.context,l=this.props;return(e=function(e,t,n,r,i){return wa(e,t,n,r),function(e,t){for(var n=0,r=e;n<r.length;n++)(c=r[n]).level=null,c.forwardCoord=null,c.backwardCoord=null,c.forwardPressure=null;var i,o=function(e){var t,n,r,i=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<i.length&&xa(n,i[r]).length;r++);n.level=r,(i[r]||(i[r]=[])).push(n)}return i}(e=pn(e,t));if(function(e){var t,n,r,i,o;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((i=n[r]).forwardSegs=[],o=t+1;o<e.length;o++)xa(i,e[o],i.forwardSegs)}(o),i=o[0]){for(var s=0,a=i;s<a.length;s++)ka(c=a[s]);for(var l=0,u=i;l<u.length;l++){var c;Sa(c=u[l],0,0,t)}}return e}(e,i)}(e,l.date,l.slatCoords,a.options.eventMinHeight,a.options.eventOrder)).map((function(e){var a=e.eventRange.instance.instanceId,u=n||i||o?r({left:0,right:0},s.computeSegTopBottomCss(e)):s.computeFgSegPositionCss(e);return Lr("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:a,style:r({visibility:t[a]?"hidden":""},u)},Lr(Da,r({seg:e,isDragging:n,isResizing:i,isDateSelecting:o,isSelected:a===l.eventSelection,isCondensed:e.bottom-e.top<no.timeGridEventCondensedHeight},_n(e,l.todayRange,l.nowDate))))}))},t.prototype.renderFillSegs=function(e,t){var n=this,i=this.context,o=this.props;if(o.slatCoords){wa(e,o.date,o.slatCoords,i.options.eventMinHeight);var s=e.map((function(e){return Lr("div",{key:wn(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===t?Lr(es,r({seg:e},_n(e,o.todayRange,o.nowDate))):Qo(t))}));return Lr(Rr,null,s)}},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;if(n)return e.map((function(e,t){return Lr(Go,{isAxis:!1,date:r,key:t},(function(t,i,o,s){return Lr("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(i).join(" "),style:{top:n.computeDateTop(e.start,r)}},s)}))}))},t.prototype.computeFgSegPositionCss=function(e){var t,n,i=this.context,o=i.isRtl,s=i.options.slotEventOverlap,a=e.backwardCoord,l=e.forwardCoord;s&&(l=Math.min(1,a+2*(l-a))),o?(t=1-l,n=a):(t=a,n=1-l);var u={zIndex:e.level+1,left:100*t+"%",right:100*n+"%"};return s&&e.forwardPressure&&(u[o?"marginLeft":"marginRight"]=20),r(r({},u),this.computeSegTopBottomCss(e))},t.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},t}(Br),Ma=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&Lr("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(Br),Aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=ot(_a),t.splitBgEventSegs=ot(_a),t.splitBusinessHourSegs=ot(_a),t.splitNowIndicatorSegs=ot(_a),t.splitDateSelectionSegs=ot(_a),t.splitEventDrag=ot(ba),t.splitEventResize=ot(ba),t.rootElRef=Nr(),t.cellElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.nowIndicator&&t.slatCoords&&t.slatCoords.safeComputeTop(t.nowDate),r=t.cells.length,i=this.splitFgEventSegs(t.fgEventSegs,r),o=this.splitBgEventSegs(t.bgEventSegs,r),s=this.splitBusinessHourSegs(t.businessHourSegs,r),a=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),u=this.splitEventDrag(t.eventDrag,r),c=this.splitEventResize(t.eventResize,r);return Lr("div",{className:"fc-timegrid-cols",ref:this.rootElRef},Lr("table",{style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,Lr("tbody",null,Lr("tr",null,t.axis&&Lr("td",{className:"fc-timegrid-col fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&Lr(Go,{isAxis:!0,date:t.nowDate},(function(e,t,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},i)}))))),t.cells.map((function(n,r){return Lr(Ca,{key:n.key,elRef:e.cellElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,nowDate:t.nowDate,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,fgEventSegs:i[r],bgEventSegs:o[r],businessHourSegs:s[r],nowIndicatorSegs:a[r],dateSelectionSegs:l[r],eventDrag:u[r],eventResize:c[r],slatCoords:t.slatCoords,eventSelection:t.eventSelection,forPrint:t.forPrint})}))))))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.updateCoords=function(){var e,t=this.props;t.onColCoords&&null!==t.clientWidth&&t.onColCoords(new Er(this.rootElRef.current,(e=this.cellElRefs.currentMap,t.cells.map((function(t){return e[t.key]}))),!0,!1))},t}(Br),Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=ot(La),t.state={slatCoords:null},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var i=r.computeTimeTop(e.time);(i=Math.ceil(i))&&i++,n(i)}return!0}},t.handleColCoords=function(e){t.colCoords=e},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return Lr("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Lr(ua,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),Lr(Aa,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))},t.prototype.componentDidMount=function(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.componentDidUpdate=function(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},t.prototype.positionToHit=function(e,t){var n=this.context,r=n.dateEnv,i=n.options,o=this.colCoords,s=this.props.dateProfile,a=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,i.snapDuration),u=l.snapDuration,c=l.snapsPerSlot,d=o.leftToIndex(e),h=a.positions.topToIndex(t);if(null!=d&&null!=h){var p=a.positions.tops[h],f=a.positions.getHeight(h),m=(t-p)/f,g=h*c+Math.floor(m*c),v=this.props.cells[d].date,y=Ke(s.slotMinTime,Ze(u,g)),_=r.add(v,y);return{col:d,dateSpan:{range:{start:_,end:r.add(_,u)},allDay:!1},dayEl:o.els[d],relativeRect:{left:o.lefts[d],right:o.rights[d],top:p,bottom:p+f}}}},t}(Br);function La(e,t){var n=t||e,r=Qe(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var Oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=ot(Na),t.slicer=new Ra,t.timeColsRef=Nr(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,i=t.dateProfile,o=t.dayTableModel,s=n.options.nowIndicator,a=this.buildDayRanges(o,i,n.dateEnv);return Lr(bo,{unit:s?"minute":"day"},(function(l,u){return Lr(Ia,r({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(t,i,null,n,a),{forPrint:t.forPrint,axis:t.axis,dateProfile:i,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:o.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:l,nowIndicatorSegs:s&&e.slicer.sliceNowDate(l,n,a),todayRange:u,onScrollTopRequest:t.onScrollTopRequest,onSlatCoords:t.onSlatCoords}))}))},t.prototype.queryHit=function(e,t){var n=this.timeColsRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(ti);function Na(e,t,n){for(var r=[],i=0,o=e.headerDates;i<o.length;i++){var s=o[i];r.push({start:n.add(s,t.slotMinTime),end:n.add(s,t.slotMaxTime)})}return r}var Ra=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.sliceRange=function(e,t){for(var n=[],r=0;r<t.length;r++){var i=tn(e,t[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n},t}(Eo),Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=ot(Fa),t.buildSlatMetas=ot(fa),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.dateEnv,o=t.dateProfileGenerator,s=this.props,a=s.dateProfile,l=this.buildTimeColsModel(a,o),u=this.allDaySplitter.splitProps(s),c=this.buildSlatMetas(a.slotMinTime,a.slotMaxTime,n.slotLabelInterval,n.slotDuration,i),d=n.dayMinWidth,h=!d,p=d,f=n.dayHeaders&&Lr(xo,{dates:l.headerDates,dateProfile:a,datesRepDistinctDays:!0,renderIntro:h?this.renderHeadAxis:null}),m=!1!==n.allDaySlot&&function(t){return Lr(ta,r({},u.allDay,{dateProfile:a,dayTableModel:l,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:h?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:s.forPrint},e.getAllDayMaxEventProps()))},g=function(t){return Lr(Oa,r({},u.timed,{dayTableModel:l,dateProfile:a,axis:h,slotDuration:n.slotDuration,slatMetas:c,forPrint:s.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return p?this.renderHScrollLayout(f,m,g,l.colCnt,d,c,this.state.slatCoords):this.renderSimpleLayout(f,m,g)},t}(ga);function Fa(e,t){var n=new So(e.renderRange,t);return new To(n,!1)}var ja=ni({initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:Pa,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}}),Ya=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.dayDate,n=e.todayRange,i=this.context,o=i.theme,s=i.dateEnv,a=i.options,l=i.viewApi,u=hr(t,n),c=a.listDayFormat?s.format(t,a.listDayFormat):"",d=a.listDaySideFormat?s.format(t,a.listDaySideFormat):"",h=a.navLinks?fr(t):null,p=r({date:s.toDate(t),view:l,text:c,sideText:d,navLinkData:h},u),f=["fc-list-day"].concat(pr(u,o));return Lr(oi,{hookProps:p,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:Va,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(e,n,r,i){return Lr("tr",{ref:e,className:f.concat(n).join(" "),"data-date":tt(t)},Lr("th",{colSpan:3},Lr("div",{className:"fc-list-day-cushion "+o.getClass("tableCellShaded"),ref:r},i)))}))},t}(Br);function Va(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Lr(Rr,null,e.text&&Lr("a",r({className:"fc-list-day-text"},t),e.text),e.sideText&&Lr("a",r({className:"fc-list-day-side-text"},t),e.sideText))}var Ha=bt({hour:"numeric",minute:"2-digit",meridiem:"short"}),Ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||Ha;return Lr(qo,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:Ua,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,i,o,s,a){return Lr("tr",{className:["fc-list-event",a.event.url?"fc-event-forced-url":""].concat(i).join(" "),ref:e},function(e,t,n){var r=n.options;if(!1!==r.displayEventTime){var i=e.eventRange.def,o=e.eventRange.instance,s=!1,a=void 0;if(i.allDay?s=!0:Xt(e.eventRange.range)?e.isStart?a=yn(e,t,n,null,null,o.range.start,e.end):e.isEnd?a=yn(e,t,n,null,null,e.start,o.range.end):s=!0:a=yn(e,t,n),s){var l={text:n.options.allDayText,view:n.viewApi};return Lr(oi,{hookProps:l,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:za,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return Lr("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return Lr("td",{className:"fc-list-event-time"},a)}return null}(n,r,t),Lr("td",{className:"fc-list-event-graphic"},Lr("span",{className:"fc-list-event-dot",style:{borderColor:a.borderColor||a.backgroundColor}})),Lr("td",{className:"fc-list-event-title",ref:o},s))}))},t}(Br);function Ua(e){var t=e.event,n=t.url;return Lr("a",r({},n?{href:n}:{}),t.title)}function za(e){return e.text}var qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=ot($a),t.eventStoreToSegs=ot(t._eventStoreToSegs),t.setRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=["fc-list",n.theme.getClass("table"),!1!==n.options.stickyHeaderDates?"fc-list-sticky":""],i=this.computeDateVars(t.dateProfile),o=i.dayDates,s=i.dayRanges,a=this.eventStoreToSegs(t.eventStore,t.eventUiBases,s);return Lr(pi,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,i){return Lr("div",{ref:n,className:r.concat(i).join(" ")},Lr(Mo,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},a.length>0?e.renderSegList(a,o):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Lr(oi,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:Wa,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Lr("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Lr("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,i=n.theme,o=n.options,s=function(e){var t,n,r=[];for(t=0;t<e.length;t++)(r[(n=e[t]).dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return Lr(bo,{unit:"day"},(function(e,n){for(var a=[],l=0;l<s.length;l++){var u=s[l];if(u){var c=t[l].toISOString();a.push(Lr(Ya,{key:c,dayDate:t[l],todayRange:n}));for(var d=0,h=u=pn(u,o.eventOrder);d<h.length;d++){var p=h[d];a.push(Lr(Ba,r({key:c+":"+p.eventRange.instance.instanceId,seg:p,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},_n(p,n,e))))}}}return Lr("table",{className:"fc-list-table "+i.getClass("table")},Lr("tbody",null,a))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(an(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.eventRangeToSegs(o,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,i,o=this.context.dateEnv,s=this.context.options.nextDayThreshold,a=e.range,l=e.def.allDay,u=[];for(n=0;n<t.length;n++)if((r=tn(a,t[n]))&&(i={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===a.end.valueOf(),dayIndex:n},u.push(i),!i.isEnd&&!l&&n+1<t.length&&a.end<o.add(t[n+1].start,s))){i.end=a.end,i.isEnd=!0;break}return u},t}(ti);function Wa(e){return e.text}function $a(e){for(var t=xe(e.renderRange.start),n=e.renderRange.end,r=[],i=[];t<n;)r.push(t),i.push({start:t,end:me(t,1)}),t=me(t,1);return{dayDates:r,dayRanges:i}}function Ga(e){return!1===e?null:bt(e)}var Ka=ni({optionRefiners:{listDayFormat:Ga,listDaySideFormat:Ga,noEventsClassNames:At,noEventsContent:At,noEventsDidMount:At,noEventsWillUnmount:At},views:{list:{component:qa,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}}),Za=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);Za.prototype.classes={root:"fc-theme-bootstrap",table:"table-bordered",tableCellShaded:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",buttonActive:"active",popover:"popover",popoverHeader:"popover-header",popoverContent:"popover-body"},Za.prototype.baseIconClass="fa",Za.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},Za.prototype.rtlIconClasses={prev:"fa-chevron-right",next:"fa-chevron-left",prevYear:"fa-angle-double-right",nextYear:"fa-angle-double-left"},Za.prototype.iconOverrideOption="bootstrapFontAwesome",Za.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",Za.prototype.iconOverridePrefix="fa-";var Xa=ni({themeClasses:{bootstrap:Za}}),Ja=ni({eventSourceDefs:[{parseMeta:function(e){var t=e.googleCalendarId;return!t&&e.url&&(t=function(e){var t;return/^[^/]+@([^/.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}(e.url)),t?{googleCalendarId:t,googleCalendarApiKey:e.googleCalendarApiKey,googleCalendarApiBase:e.googleCalendarApiBase,extraParams:e.extraParams}:null},fetch:function(e,t,n){var i=e.context,o=i.dateEnv,s=i.options,a=e.eventSource.meta,l=a.googleCalendarApiKey||s.googleCalendarApiKey;if(l){var u=function(e){var t=e.googleCalendarApiBase;return t||(t="https://www.googleapis.com/calendar/v3/calendars"),t+"/"+encodeURIComponent(e.googleCalendarId)+"/events"}(a),c=a.extraParams,d="function"==typeof c?c():c,h=function(e,t,n,i){var o,s,a;return i.canComputeOffset?(s=i.formatIso(e.start),a=i.formatIso(e.end)):(s=me(e.start,-1).toISOString(),a=me(e.end,1).toISOString()),o=r(r({},n||{}),{key:t,timeMin:s,timeMax:a,singleEvents:!0,maxResults:9999}),"local"!==i.timeZone&&(o.timeZone=i.timeZone),o}(e.range,l,d,o);Li("GET",u,h,(function(e,r){var i,o;e.error?n({message:"Google Calendar API: "+e.error.message,errors:e.error.errors,xhr:r}):t({rawEvents:(i=e.items,o=h.timeZone,i.map((function(e){return function(e,t){var n=e.htmlLink||null;return n&&t&&(n=function(e,t){return e.replace(/(\?.*?)?(#|$)/,(function(e,n,r){return(n?n+"&":"?")+t+r}))}(n,"ctz="+t)),{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:n,location:e.location,description:e.description}}(e,o)}))),xhr:r})}),(function(e,t){n({message:e,xhr:t})}))}else n({message:"Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"})}}],optionRefiners:{googleCalendarApiKey:String},eventSourceRefiners:{googleCalendarApiKey:String,googleCalendarId:String,googleCalendarApiBase:String,extraParams:At}});return Ri.push(Is,oa,ja,Ka,Xa,Ja),e.BASE_OPTION_DEFAULTS=xt,e.BASE_OPTION_REFINERS=wt,e.BaseComponent=Br,e.BgEvent=es,e.BootstrapTheme=Za,e.Calendar=is,e.CalendarApi=jn,e.CalendarContent=co,e.CalendarDataManager=Hi,e.CalendarDataProvider=Xi,e.CalendarRoot=fo,e.Component=Ir,e.ContentHook=ai,e.CustomContentRenderContext=si,e.DateComponent=ti,e.DateEnv=$n,e.DateProfileGenerator=yi,e.DayCellContent=Xo,e.DayCellRoot=Zo,e.DayGridView=ra,e.DayHeader=xo,e.DaySeriesModel=So,e.DayTable=ta,e.DayTableModel=To,e.DayTableSlicer=na,e.DayTimeCols=Oa,e.DayTimeColsSlicer=Ra,e.DayTimeColsView=Pa,e.DelayedRunner=ji,e.Draggable=Cs,e.ElementDragging=to,e.ElementScrollController=Cr,e.Emitter=Tr,e.EventApi=Yn,e.EventRoot=qo,e.EventSourceApi=j,e.FeaturefulElementDragging=gs,e.Fragment=Rr,e.Interaction=Ji,e.ListView=qa,e.MountHook=ui,e.NamedTimeZoneImpl=function(e){this.timeZoneName=e},e.NowIndicatorRoot=Go,e.NowTimer=bo,e.PointerDragging=ls,e.PositionCache=Er,e.RefMap=Ao,e.RenderHook=oi,e.ScrollController=Dr,e.ScrollResponder=jr,e.Scroller=Mo,e.SimpleScrollGrid=zo,e.Slicer=Eo,e.Splitter=cr,e.StandardEvent=Wo,e.Table=Js,e.TableDateCell=vo,e.TableDowCell=yo,e.TableView=Ls,e.Theme=Ar,e.ThirdPartyDraggable=As,e.TimeCols=Ia,e.TimeColsSlatsCoords=aa,e.TimeColsView=ga,e.ViewApi=On,e.ViewContextType=Yr,e.ViewRoot=pi,e.WeekNumberRoot=ns,e.WindowScrollController=Mr,e.addDays=me,e.addDurations=Ke,e.addMs=ge,e.addWeeks=fe,e.allowContextMenu=ie,e.allowSelection=ne,e.applyMutationToEventStore=An,e.applyStyle=z,e.applyStyleProp=q,e.asCleanDays=function(e){return e.years||e.months||e.milliseconds?0:e.days},e.asRoughMinutes=function(e){return Je(e)/6e4},e.asRoughMs=Je,e.asRoughSeconds=function(e){return Je(e)/1e3},e.buildClassNameNormalizer=ci,e.buildDayRanges=Na,e.buildDayTableModel=ia,e.buildEventApis=Hn,e.buildEventRangeKey=wn,e.buildHashFromArray=function(e,t){for(var n={},r=0;r<e.length;r++){var i=t(e[r],r);n[i[0]]=i[1]}return n},e.buildNavLinkData=fr,e.buildSegCompareObj=fn,e.buildSegTimeText=yn,e.buildSlatMetas=fa,e.buildTimeColsModel=Fa,e.collectFromHash=Be,e.combineEventUis=Yt,e.compareByFieldSpec=ae,e.compareByFieldSpecs=se,e.compareNumbers=ce,e.compareObjs=Ve,e.computeEdges=br,e.computeFallbackHeaderFormat=mo,e.computeHeightAndMargins=function(e){return e.getBoundingClientRect().height+function(e){var t=window.getComputedStyle(e);return parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(e)},e.computeInnerRect=wr,e.computeRect=xr,e.computeSegDraggable=mn,e.computeSegEndResizable=vn,e.computeSegStartResizable=gn,e.computeShrinkWidth=Io,e.computeSmallestCellWidth=he,e.computeVisibleDayRange=Zt,e.config=no,e.constrainPoint=or,e.createContext=Pr,e.createDuration=$e,e.createElement=Lr,e.createEmptyEventStore=function(){return{defs:{},instances:{}}},e.createEventInstance=Ie,e.createEventUi=jt,e.createFormatter=bt,e.createPlugin=ni,e.createRef=Nr,e.diffDates=Jt,e.diffDayAndTime=_e,e.diffDays=ye,e.diffPoints=ar,e.diffWeeks=ve,e.diffWholeDays=we,e.diffWholeWeeks=be,e.disableCursor=Q,e.elementClosest=V,e.elementMatches=H,e.enableCursor=ee,e.eventTupleToStore=Lt,e.filterEventStoreDefs=Rt,e.filterHash=Ne,e.findDirectChildren=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].children,s=0;s<o.length;s++){var a=o[s];t&&!H(a,t)||r.push(a)}return r},e.findElements=B,e.flexibleCompare=le,e.flushToDom=Fr,e.formatDate=function(e,t){void 0===t&&(t={});var n=Qn(t),r=bt(t),i=n.createMarkerMeta(e);return i?n.format(i.marker,r,{forcedTzo:i.forcedTzo}):""},e.formatDayString=tt,e.formatIsoTimeString=nt,e.formatRange=function(e,t,n){var r=Qn("object"==typeof n&&n?n:{}),i=bt(n),o=r.createMarkerMeta(e),s=r.createMarkerMeta(t);return o&&s?r.formatRange(o.marker,s.marker,i,{forcedStartTzo:o.forcedTzo,forcedEndTzo:s.forcedTzo,isEndExclusive:n.isEndExclusive,defaultSeparator:xt.defaultRangeSeparator}):""},e.getAllowYScrolling=Oo,e.getCanVGrowWithinCell=lr,e.getClippingParents=kr,e.getDateMeta=hr,e.getDayClassNames=pr,e.getDefaultEventEnd=Mn,e.getElSeg=cn,e.getEventClassNames=bn,e.getIsRtlScrollbarOnLeft=vr,e.getRectCenter=sr,e.getRelevantEvents=Ot,e.getScrollGridClassNames=Yo,e.getScrollbarWidths=yr,e.getSectionClassNames=Vo,e.getSectionHasLiquidHeight=Lo,e.getSegMeta=_n,e.getSlotClassNames=function(e,t){var n=["fc-slot","fc-slot-"+pe[e.dow]];return e.isDisabled?n.push("fc-slot-disabled"):(e.isToday&&(n.push("fc-slot-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-slot-past"),e.isFuture&&n.push("fc-slot-future")),n},e.getStickyFooterScrollbar=Uo,e.getStickyHeaderDates=Bo,e.getUnequalProps=Ye,e.globalLocales=Gn,e.globalPlugins=Ri,e.greatestDurationDenominator=et,e.guid=J,e.hasBgRendering=ln,e.hasShrinkWidth=jo,e.identity=At,e.interactionSettingsStore=eo,e.interactionSettingsToStore=Qi,e.intersectRanges=tn,e.intersectRects=ir,e.isArraysEqual=it,e.isColPropsEqual=Ro,e.isDateSpansEqual=Sn,e.isInt=de,e.isInteractionValid=Gr,e.isMultiDayRange=Xt,e.isPropsEqual=je,e.isPropsValid=Zr,e.isValidDate=Me,e.listenBySelector=G,e.mapHash=Re,e.memoize=ot,e.memoizeArraylike=function(e,t,n){var r=[],i=[];return function(o){for(var s=r.length,a=o.length,l=0;l<s;l++)if(o[l]){if(!it(r[l],o[l])){n&&n(i[l]);var u=e.apply(this,o[l]);t&&t(u,i[l])||(i[l]=u)}}else n&&n(i[l]);for(;l<a;l++)i[l]=e.apply(this,o[l]);return r=o,i.splice(a),i}},e.memoizeHashlike=function(e,t,n){var r={},i={};return function(o){var s={};for(var a in o)if(i[a])if(it(r[a],o[a]))s[a]=i[a];else{n&&n(i[a]);var l=e.apply(this,o[a]);s[a]=t&&t(l,i[a])?i[a]:l}else s[a]=e.apply(this,o[a]);return r=o,i=s,s}},e.memoizeObjArg=st,e.mergeEventStores=Nt,e.multiplyDuration=Ze,e.padStart=ue,e.parseBusinessHours=nr,e.parseClassNames=Pt,e.parseDragMeta=io,e.parseEventDef=Gt,e.parseFieldSpecs=oe,e.parseMarker=Wn,e.pointInsideRect=rr,e.preventContextMenu=re,e.preventDefault=W,e.preventSelection=te,e.rangeContainsMarker=sn,e.rangeContainsRange=on,e.rangesEqual=nn,e.rangesIntersect=rn,e.refineEventDef=Wt,e.refineProps=Mt,e.removeElement=Y,e.removeExact=function(e,t){for(var n=0,r=0;r<e.length;)e[r]===t?(e.splice(r,1),n++):r++;return n},e.render=Or,e.renderChunkContent=No,e.renderFill=Qo,e.renderMicroColGroup=Po,e.renderScrollShim=Ho,e.requestJson=Li,e.sanitizeShrinkWidth=Fo,e.setElSeg=un,e.setRef=qr,e.sliceEventStore=an,e.sliceEvents=function(e,t){return an(e.eventStore,e.eventUiBases,e.dateProfile.activeRange,t?e.nextDayThreshold:null).fg},e.sortEventSegs=pn,e.startOfDay=xe,e.translateRect=function(e,t,n){return{left:e.left+t,right:e.right+t,top:e.top+n,bottom:e.bottom+n}},e.triggerDateSelect=Dn,e.unpromisify=Sr,e.version="5.3.1",e.whenTransitionDone=Z,e.wholeDivideDurations=Qe,e}({});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).jsSHA=t()}(this,(function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,s,a=t||[0],l=(n=n||0)>>>3,u=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(s=i+l)>>>2,a.length<=o&&a.push(0),a[o]|=e[i]<<8*(u+r*(s%4));return{value:a,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,s,a;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(s=(a=(i>>>1)+u)>>>2;l.length<=s;)l.push(0);l[s]|=o<<8*(c+r*(a%4))}return{value:l,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,s,a,l,u,c,d,h,p=0,f=n||[0],m=(r=r||0)>>>3;if("UTF8"===t)for(d=-1===i?3:0,a=0;a<e.length;a+=1)for(s=[],128>(o=e.charCodeAt(a))?s.push(o):2048>o?(s.push(192|o>>>6),s.push(128|63&o)):55296>o||57344<=o?s.push(224|o>>>12,128|o>>>6&63,128|63&o):(a+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(a)),s.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),l=0;l<s.length;l+=1){for(u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=s[l]<<8*(d+i*(c%4)),p+=1}else for(d=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,a=0;a<e.length;a+=1){for(o=e.charCodeAt(a),!0===h&&(o=(l=255&o)<<8|o>>>8),u=(c=p+m)>>>2;f.length<=u;)f.push(0);f[u]|=o<<8*(d+i*(c%4)),p+=2}return{value:f,binLen:8*p+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,s,a,l,u,c,d=0,h=n||[0],p=(r=r||0)>>>3,f=-1===i?3:0,m=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==m&&m<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(l=e.substr(o,4),a=0,s=0;s<l.length;s+=1)a|=t.indexOf(l.charAt(s))<<18-6*s;for(s=0;s<l.length-1;s+=1){for(u=(c=d+p)>>>2;h.length<=u;)h.push(0);h[u]|=(a>>>16-8*s&255)<<8*(f+i*(c%4)),d+=1}}return{value:h,binLen:8*d+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,s,a,l=t||[0],u=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),s=(a=o+u)>>>2,l.length<=s&&l.push(0),l[s]|=i<<8*(c+r*(a%4));return{value:l,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,s="",a=t/8,l=-1===n?3:0;for(i=0;i<a;i+=1)o=e[i>>>2]>>>8*(l+n*(i%4)),s+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?s.toUpperCase():s}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,s,a,l,u,c="",d=n/8,h=-1===r?3:0;for(o=0;o<d;o+=3)for(l=o+1<d?e[o+1>>>2]:0,u=o+2<d?e[o+2>>>2]:0,a=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(l>>>8*(h+r*((o+1)%4))&255)<<8|u>>>8*(h+r*((o+2)%4))&255,s=0;s<4;s+=1)c+=8*o+6*s<=n?t.charAt(a>>>6*(3-s)&63):i.b64Pad;return c}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",s=t/8,a=-1===n?3:0;for(r=0;r<s;r+=1)i=e[r>>>2]>>>8*(a+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),s=new Uint8Array(o),a=-1===n?3:0;for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(a+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,s=new Uint8Array(i);for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return s}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],a=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function l(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function u(e,t){return e>>>t|e<<32-t}function c(e,t){return e>>>t}function d(e,t,n){return e&t^~e&n}function h(e,t,n){return e&t^e&n^t&n}function p(e){return u(e,2)^u(e,13)^u(e,22)}function f(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function m(e,t,n,r){var i=(65535&e)+(65535&t)+(65535&n)+(65535&r);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16))<<16|65535&i}function g(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function v(e){return u(e,7)^u(e,18)^c(e,3)}function y(e){return u(e,6)^u(e,11)^u(e,25)}function _(e){return"SHA-224"==e?s.slice():a.slice()}function b(e,t){var n,r,i,s,a,l,_,b,w,x,k,S,T=[];for(n=t[0],r=t[1],i=t[2],s=t[3],a=t[4],l=t[5],_=t[6],b=t[7],k=0;k<64;k+=1)T[k]=k<16?e[k]:m(u(S=T[k-2],17)^u(S,19)^c(S,10),T[k-7],v(T[k-15]),T[k-16]),w=g(b,y(a),d(a,l,_),o[k],T[k]),x=f(p(n),h(n,r,i)),b=_,_=l,l=a,a=f(s,w),s=i,i=r,r=n,n=f(w,x);return t[0]=f(n,t[0]),t[1]=f(r,t[1]),t[2]=f(i,t[2]),t[3]=f(s,t[3]),t[4]=f(a,t[4]),t[5]=f(l,t[5]),t[6]=f(_,t[6]),t[7]=f(b,t[7]),t}return function(t){function n(e,n,i){var o=this;if("SHA-224"!==e&&"SHA-256"!==e)throw new Error("Chosen SHA variant is not supported");var s=i||{};return(o=t.call(this,e,n,i)||this).t=o.i,o.o=!0,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=b,o.p=function(e){return e.slice()},o.l=_,o.R=function(t,n,r,i){return function(e,t,n,r,i){for(var o,s=15+(t+65>>>9<<4),a=t+n;e.length<=s;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[s]=4294967295&a,e[s-1]=a/4294967296|0,o=0;o<e.length;o+=16)r=b(e.slice(o,o+16),r);return"SHA-224"===i?[r[0],r[1],r[2],r[3],r[4],r[5],r[6]]:r}(t,n,r,i,e)},o.U=_(e),o.T=512,o.m="SHA-224"===e?224:256,o.F=!1,s.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,s.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.H=0,this.S=!1,this.I=0,this.C=!1,this.L=[],this.N=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.H),o=i.binLen,s=i.value,a=o>>>5;for(t=0;t<a;t+=r)n+this.T<=o&&(this.U=this.A(s.slice(t,t+r),this.U),n+=this.T);this.I+=n,this.Y=s.slice(n>>>5),this.H=o%this.T,this.S=!0},e.prototype.getHash=function(e,t){var n,r,o=this.m,s=l(t);if(this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");o=s.outputLen}var a=i(e,o,this.u,s);if(this.C&&this.t)return a(this.t(s));for(r=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),o),n=1;n<this.numRounds;n+=1)this.F&&o%32!=0&&(r[r.length-1]&=16777215>>>24-o%32),r=this.R(r,o,0,this.l(this.g),o);return a(r)},e.prototype.setHMACKey=function(e,t,n){if(!this.o)throw new Error("Variant does not support HMAC");if(this.S)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(this.C)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.L[t]=909522486^e.value[t],this.N[t]=1549556828^e.value[t];this.U=this.A(this.L,this.U),this.I=this.T,this.C=!0},e.prototype.getHMAC=function(e,t){var n=l(t);return i(e,this.m,this.u,n)(this.i())},e.prototype.i=function(){var e;if(!this.C)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),this.m);return e=this.A(this.N,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())})),
|
|
519
519
|
/*!
|
|
520
520
|
*
|
|
521
521
|
* Super simple wysiwyg editor v0.8.18
|
|
@@ -610,7 +610,7 @@ function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery",
|
|
|
610
610
|
* http://jquery.org/license
|
|
611
611
|
*/
|
|
612
612
|
function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./draggable","./mouse","../version","../widget"],e):e(jQuery)}((function(e){"use strict";return e.widget("ui.droppable",{version:"1.13.2",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,t=this.options,n=t.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof n?n:function(e){return e.is(n)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(t.scope),t.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,n){if("accept"===t)this.accept="function"==typeof n?n:function(e){return e.is(n)};else if("scope"===t){var r=e.ui.ddmanager.droppables[this.options.scope];this._splice(r),this._addToManager(n)}this._super(t,n)},_activate:function(t){var n=e.ui.ddmanager.current;this._addActiveClass(),n&&this._trigger("activate",t,this.ui(n))},_deactivate:function(t){var n=e.ui.ddmanager.current;this._removeActiveClass(),n&&this._trigger("deactivate",t,this.ui(n))},_over:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(n)))},_out:function(t){var n=e.ui.ddmanager.current;n&&(n.currentItem||n.element)[0]!==this.element[0]&&this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(n)))},_drop:function(t,n){var r=n||e.ui.ddmanager.current,i=!1;return!(!r||(r.currentItem||r.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each((function(){var n=e(this).droppable("instance");if(n.options.greedy&&!n.options.disabled&&n.options.scope===r.options.scope&&n.accept.call(n.element[0],r.currentItem||r.element)&&e.ui.intersect(r,e.extend(n,{offset:n.element.offset()}),n.options.tolerance,t))return i=!0,!1})),!i&&(!!this.accept.call(this.element[0],r.currentItem||r.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(r)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),e.ui.intersect=function(){function e(e,t,n){return e>=t&&e<t+n}return function(t,n,r,i){if(!n.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,s=(t.positionAbs||t.position.absolute).top+t.margins.top,a=o+t.helperProportions.width,l=s+t.helperProportions.height,u=n.offset.left,c=n.offset.top,d=u+n.proportions().width,h=c+n.proportions().height;switch(r){case"fit":return u<=o&&a<=d&&c<=s&&l<=h;case"intersect":return u<o+t.helperProportions.width/2&&a-t.helperProportions.width/2<d&&c<s+t.helperProportions.height/2&&l-t.helperProportions.height/2<h;case"pointer":return e(i.pageY,c,n.proportions().height)&&e(i.pageX,u,n.proportions().width);case"touch":return(s>=c&&s<=h||l>=c&&l<=h||s<c&&l>h)&&(o>=u&&o<=d||a>=u&&a<=d||o<u&&a>d);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,n){var r,i,o=e.ui.ddmanager.droppables[t.options.scope]||[],s=n?n.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(r=0;r<o.length;r++)if(!(o[r].options.disabled||t&&!o[r].accept.call(o[r].element[0],t.currentItem||t.element))){for(i=0;i<a.length;i++)if(a[i]===o[r].element[0]){o[r].proportions().height=0;continue e}o[r].visible="none"!==o[r].element.css("display"),o[r].visible&&("mousedown"===s&&o[r]._activate.call(o[r],n),o[r].offset=o[r].element.offset(),o[r].proportions({width:o[r].element[0].offsetWidth,height:o[r].element[0].offsetHeight}))}},drop:function(t,n){var r=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),(function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,n)&&(r=this._drop.call(this,n)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,n)))})),r},dragStart:function(t,n){t.element.parentsUntil("body").on("scroll.droppable",(function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}))},drag:function(t,n){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,n),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],(function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var r,i,o,s=e.ui.intersect(t,this,this.options.tolerance,n),a=!s&&this.isover?"isout":s&&!this.isover?"isover":null;a&&(this.options.greedy&&(i=this.options.scope,(o=this.element.parents(":data(ui-droppable)").filter((function(){return e(this).droppable("instance").options.scope===i}))).length&&((r=e(o[0]).droppable("instance")).greedyChild="isover"===a)),r&&"isover"===a&&(r.isover=!1,r.isout=!0,r._out.call(r,n)),this[a]=!0,this["isout"===a?"isover":"isout"]=!1,this["isover"===a?"_over":"_out"].call(this,n),r&&"isout"===a&&(r.isout=!1,r.isover=!0,r._over.call(r,n)))}}))},dragStop:function(t,n){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,n)}},!1!==e.uiBackCompat&&e.widget("ui.droppable",e.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),e.ui.droppable})),function(e,t,n,r){"use strict";function i(e,t,n){return setTimeout(u(e,n),t)}function o(e,t,n){return!!Array.isArray(e)&&(s(e,n[t],n),!0)}function s(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==r)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function a(t,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,i,r),t.apply(this,arguments)}}function l(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&re(r,n)}function u(e,t){return function(){return e.apply(t,arguments)}}function c(e,t){return typeof e==se?e.apply(t&&t[0]||r,t):e}function d(e,t){return e===r?t:e}function h(e,t,n){s(g(t),(function(t){e.addEventListener(t,n,!1)}))}function p(e,t,n){s(g(t),(function(t){e.removeEventListener(t,n,!1)}))}function f(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function m(e,t){return e.indexOf(t)>-1}function g(e){return e.trim().split(/\s+/g)}function v(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function y(e){return Array.prototype.slice.call(e,0)}function _(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var s=t?e[o][t]:e[o];v(i,s)<0&&r.push(e[o]),i[o]=s,o++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}function b(e,t){for(var n,i,o=t[0].toUpperCase()+t.slice(1),s=0;s<ie.length;){if((i=(n=ie[s])?n+o:t)in e)return i;s++}return r}function w(t){var n=t.ownerDocument||t;return n.defaultView||n.parentWindow||e}function x(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){c(e.options.enable,[e])&&n.handler(t)},this.init()}function k(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,o=t&_e&&r-i==0,s=t&(we|xe)&&r-i==0;n.isFirst=!!o,n.isFinal=!!s,o&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||(n.firstInput=T(t)),i>1&&!n.firstMultiple?n.firstMultiple=T(t):1===i&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,a=s?s.center:o.center,l=t.center=E(r);t.timeStamp=ue(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=A(a,l),t.distance=M(a,l),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};t.eventType!==_e&&o.eventType!==we||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=C(t.deltaX,t.deltaY);var u=D(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=u.x,t.overallVelocityY=u.y,t.overallVelocity=le(u.x)>le(u.y)?u.x:u.y,t.scale=s?function(e,t){return M(t[0],t[1],Le)/M(e[0],e[1],Le)}(s.pointers,r):1,t.rotation=s?function(e,t){return A(t[1],t[0],Le)+A(e[1],e[0],Le)}(s.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,S(n,t);var c=e.element;f(t.srcEvent.target,c)&&(c=t.srcEvent.target),t.target=c}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function S(e,t){var n,i,o,s,a=e.lastInterval||t,l=t.timeStamp-a.timeStamp;if(t.eventType!=xe&&(l>ye||a.velocity===r)){var u=t.deltaX-a.deltaX,c=t.deltaY-a.deltaY,d=D(l,u,c);i=d.x,o=d.y,n=le(d.x)>le(d.y)?d.x:d.y,s=C(u,c),e.lastInterval=t}else n=a.velocity,i=a.velocityX,o=a.velocityY,s=a.direction;t.velocity=n,t.velocityX=i,t.velocityY=o,t.direction=s}function T(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:ae(e.pointers[n].clientX),clientY:ae(e.pointers[n].clientY)},n++;return{timeStamp:ue(),pointers:t,center:E(t),deltaX:e.deltaX,deltaY:e.deltaY}}function E(e){var t=e.length;if(1===t)return{x:ae(e[0].clientX),y:ae(e[0].clientY)};for(var n=0,r=0,i=0;t>i;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:ae(n/t),y:ae(r/t)}}function D(e,t,n){return{x:t/e||0,y:n/e||0}}function C(e,t){return e===t?ke:le(e)>=le(t)?0>e?Se:Te:0>t?Ee:De}function M(e,t,n){n||(n=Ie);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function A(e,t,n){n||(n=Ie);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}function I(){this.evEl=Ne,this.evWin=Re,this.pressed=!1,x.apply(this,arguments)}function L(){this.evEl=je,this.evWin=Ye,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function O(){this.evTarget=He,this.evWin=Be,this.started=!1,x.apply(this,arguments)}function N(e,t){var n=y(e.touches),r=y(e.changedTouches);return t&(we|xe)&&(n=_(n.concat(r),"identifier",!0)),[n,r]}function R(){this.evTarget=ze,this.targetIds={},x.apply(this,arguments)}function P(e,t){var n=y(e.touches),r=this.targetIds;if(t&(_e|be)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,s=y(e.changedTouches),a=[],l=this.target;if(o=n.filter((function(e){return f(e.target,l)})),t===_e)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),t&(we|xe)&&delete r[s[i].identifier],i++;return a.length?[_(o.concat(a),"identifier",!0),a]:void 0}function F(){x.apply(this,arguments);var e=u(this.handler,this);this.touch=new R(this.manager,e),this.mouse=new I(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function j(e,t){e&_e?(this.primaryTouch=t.changedPointers[0].identifier,Y.call(this,t)):e&(we|xe)&&Y.call(this,t)}function Y(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),qe)}}function V(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),s=Math.abs(n-i.y);if(We>=o&&We>=s)return!0}return!1}function H(e,t){this.manager=e,this.set(t)}function B(e){this.options=re({},this.defaults,e||{}),this.id=he++,this.manager=null,this.options.enable=d(this.options.enable,!0),this.state=nt,this.simultaneous={},this.requireFail=[]}function U(e){return e&at?"cancel":e&ot?"end":e&it?"move":e&rt?"start":""}function z(e){return e==De?"down":e==Ee?"up":e==Se?"left":e==Te?"right":""}function q(e,t){var n=t.manager;return n?n.get(e):e}function W(){B.apply(this,arguments)}function $(){W.apply(this,arguments),this.pX=null,this.pY=null}function G(){W.apply(this,arguments)}function K(){B.apply(this,arguments),this._timer=null,this._input=null}function Z(){W.apply(this,arguments)}function X(){W.apply(this,arguments)}function J(){B.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Q(e,t){return(t=t||{}).recognizers=d(t.recognizers,Q.defaults.preset),new ee(e,t)}function ee(e,t){this.options=re({},Q.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=function(e){var t=e.options.inputClass;return new(t||(fe?L:me?R:pe?F:I))(e,k)}(this),this.touchAction=new H(this,this.options.touchAction),te(this,!0),s(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function te(e,t){var n,r=e.element;r.style&&(s(e.options.cssProps,(function(i,o){n=b(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}function ne(e,n){var r=t.createEvent("Event");r.initEvent(e,!0,!0),r.gesture=n,n.target.dispatchEvent(r)}var re,ie=["","webkit","Moz","MS","ms","o"],oe=t.createElement("div"),se="function",ae=Math.round,le=Math.abs,ue=Date.now;re="function"!=typeof Object.assign?function(e){if(e===r||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==r&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:Object.assign;var ce=a((function(e,t,n){for(var i=Object.keys(t),o=0;o<i.length;)(!n||n&&e[i[o]]===r)&&(e[i[o]]=t[i[o]]),o++;return e}),"extend","Use `assign`."),de=a((function(e,t){return ce(e,t,!0)}),"merge","Use `assign`."),he=1,pe="ontouchstart"in e,fe=b(e,"PointerEvent")!==r,me=pe&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),ge="touch",ve="mouse",ye=25,_e=1,be=2,we=4,xe=8,ke=1,Se=2,Te=4,Ee=8,De=16,Ce=Se|Te,Me=Ee|De,Ae=Ce|Me,Ie=["x","y"],Le=["clientX","clientY"];x.prototype={handler:function(){},init:function(){this.evEl&&h(this.element,this.evEl,this.domHandler),this.evTarget&&h(this.target,this.evTarget,this.domHandler),this.evWin&&h(w(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&p(this.element,this.evEl,this.domHandler),this.evTarget&&p(this.target,this.evTarget,this.domHandler),this.evWin&&p(w(this.element),this.evWin,this.domHandler)}};var Oe={mousedown:_e,mousemove:be,mouseup:we},Ne="mousedown",Re="mousemove mouseup";l(I,x,{handler:function(e){var t=Oe[e.type];t&_e&&0===e.button&&(this.pressed=!0),t&be&&1!==e.which&&(t=we),this.pressed&&(t&we&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:ve,srcEvent:e}))}});var Pe={pointerdown:_e,pointermove:be,pointerup:we,pointercancel:xe,pointerout:xe},Fe={2:ge,3:"pen",4:ve,5:"kinect"},je="pointerdown",Ye="pointermove pointerup pointercancel";e.MSPointerEvent&&!e.PointerEvent&&(je="MSPointerDown",Ye="MSPointerMove MSPointerUp MSPointerCancel"),l(L,x,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=Pe[r],o=Fe[e.pointerType]||e.pointerType,s=o==ge,a=v(t,e.pointerId,"pointerId");i&_e&&(0===e.button||s)?0>a&&(t.push(e),a=t.length-1):i&(we|xe)&&(n=!0),0>a||(t[a]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(a,1))}});var Ve={touchstart:_e,touchmove:be,touchend:we,touchcancel:xe},He="touchstart",Be="touchstart touchmove touchend touchcancel";l(O,x,{handler:function(e){var t=Ve[e.type];if(t===_e&&(this.started=!0),this.started){var n=N.call(this,e,t);t&(we|xe)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:ge,srcEvent:e})}}});var Ue={touchstart:_e,touchmove:be,touchend:we,touchcancel:xe},ze="touchstart touchmove touchend touchcancel";l(R,x,{handler:function(e){var t=Ue[e.type],n=P.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:ge,srcEvent:e})}});var qe=2500,We=25;l(F,x,{handler:function(e,t,n){var r=n.pointerType==ge,i=n.pointerType==ve;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)j.call(this,t,n);else if(i&&V.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var $e=b(oe.style,"touchAction"),Ge=$e!==r,Ke="compute",Ze="auto",Xe="manipulation",Je="none",Qe="pan-x",et="pan-y",tt=function(){if(!Ge)return!1;var t={},n=e.CSS&&e.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(r){t[r]=!n||e.CSS.supports("touch-action",r)})),t}();H.prototype={set:function(e){e==Ke&&(e=this.compute()),Ge&&this.manager.element.style&&tt[e]&&(this.manager.element.style[$e]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return s(this.manager.recognizers,(function(t){c(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(m(e,Je))return Je;var t=m(e,Qe),n=m(e,et);return t&&n?Je:t||n?t?Qe:et:m(e,Xe)?Xe:Ze}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(!this.manager.session.prevented){var r=this.actions,i=m(r,Je)&&!tt[Je],o=m(r,et)&&!tt[et],s=m(r,Qe)&&!tt[Qe];if(i){var a=1===e.pointers.length,l=e.distance<2,u=e.deltaTime<250;if(a&&l&&u)return}return s&&o?void 0:i||o&&n&Ce||s&&n&Me?this.preventSrc(t):void 0}t.preventDefault()},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var nt=1,rt=2,it=4,ot=8,st=ot,at=16,lt=32;B.prototype={defaults:{},set:function(e){return re(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(o(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=q(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return o(e,"dropRecognizeWith",this)||(e=q(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(o(e,"requireFailure",this))return this;var t=this.requireFail;return-1===v(t,e=q(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(o(e,"dropRequireFailure",this))return this;e=q(e,this);var t=v(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){n.manager.emit(t,e)}var n=this,r=this.state;ot>r&&t(n.options.event+U(r)),t(n.options.event),e.additionalEvent&&t(e.additionalEvent),r>=ot&&t(n.options.event+U(r))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=lt)},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(lt|nt)))return!1;e++}return!0},recognize:function(e){var t=re({},e);return c(this.options.enable,[this,t])?(this.state&(st|at|lt)&&(this.state=nt),this.state=this.process(t),void(this.state&(rt|it|ot|at)&&this.tryEmit(t))):(this.reset(),void(this.state=lt))},process:function(e){},getTouchAction:function(){},reset:function(){}},l(W,B,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=t&(rt|it),i=this.attrTest(e);return r&&(n&xe||!i)?t|at:r||i?n&we?t|ot:t&rt?t|it:rt:lt}}),l($,W,{defaults:{event:"pan",threshold:10,pointers:1,direction:Ae},getTouchAction:function(){var e=this.options.direction,t=[];return e&Ce&&t.push(et),e&Me&&t.push(Qe),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,s=e.deltaY;return i&t.direction||(t.direction&Ce?(i=0===o?ke:0>o?Se:Te,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===s?ke:0>s?Ee:De,n=s!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return W.prototype.attrTest.call(this,e)&&(this.state&rt||!(this.state&rt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=z(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),l(G,W,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Je]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&rt)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),l(K,B,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Ze]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,o=e.deltaTime>t.time;if(this._input=e,!r||!n||e.eventType&(we|xe)&&!o)this.reset();else if(e.eventType&_e)this.reset(),this._timer=i((function(){this.state=st,this.tryEmit()}),t.time,this);else if(e.eventType&we)return st;return lt},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===st&&(e&&e.eventType&we?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=ue(),this.manager.emit(this.options.event,this._input)))}}),l(Z,W,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Je]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&rt)}}),l(X,W,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ce|Me,pointers:1},getTouchAction:function(){return $.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(Ce|Me)?t=e.overallVelocity:n&Ce?t=e.overallVelocityX:n&Me&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&le(t)>this.options.velocity&&e.eventType&we},emit:function(e){var t=z(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),l(J,B,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Xe]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,o=e.deltaTime<t.time;if(this.reset(),e.eventType&_e&&0===this.count)return this.failTimeout();if(r&&o&&n){if(e.eventType!=we)return this.failTimeout();var s=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||M(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&s?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=i((function(){this.state=st,this.tryEmit()}),t.interval,this),rt):st}return lt},failTimeout:function(){return this._timer=i((function(){this.state=lt}),this.options.interval,this),lt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==st&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Q.VERSION="2.0.7",Q.defaults={domEvents:!1,touchAction:Ke,enable:!0,inputTarget:null,inputClass:null,preset:[[Z,{enable:!1}],[G,{enable:!1},["rotate"]],[X,{direction:Ce}],[$,{direction:Ce},["swipe"]],[J],[J,{event:"doubletap",taps:2},["tap"]],[K]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};ee.prototype={set:function(e){return re(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&st)&&(i=t.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&n.state&(rt|it|ot)&&(i=t.curRecognizer=n),o++}},get:function(e){if(e instanceof B)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(o(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(o(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=v(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==r&&t!==r){var n=this.handlers;return s(g(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(e!==r){var n=this.handlers;return s(g(e),(function(e){t?n[e]&&n[e].splice(v(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&ne(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},destroy:function(){this.element&&te(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},re(Q,{INPUT_START:_e,INPUT_MOVE:be,INPUT_END:we,INPUT_CANCEL:xe,STATE_POSSIBLE:nt,STATE_BEGAN:rt,STATE_CHANGED:it,STATE_ENDED:ot,STATE_RECOGNIZED:st,STATE_CANCELLED:at,STATE_FAILED:lt,DIRECTION_NONE:ke,DIRECTION_LEFT:Se,DIRECTION_RIGHT:Te,DIRECTION_UP:Ee,DIRECTION_DOWN:De,DIRECTION_HORIZONTAL:Ce,DIRECTION_VERTICAL:Me,DIRECTION_ALL:Ae,Manager:ee,Input:x,TouchAction:H,TouchInput:R,MouseInput:I,PointerEventInput:L,TouchMouseInput:F,SingleTouchInput:O,Recognizer:B,AttrRecognizer:W,Tap:J,Pan:$,Swipe:X,Pinch:G,Rotate:Z,Press:K,on:h,off:p,each:s,merge:de,extend:ce,assign:re,inherit:l,bindFn:u,prefixed:b}),(void 0!==e?e:"undefined"!=typeof self?self:{}).Hammer=Q,"function"==typeof define&&define.amd?define((function(){return Q})):"undefined"!=typeof module&&module.exports?module.exports=Q:e.Hammer=Q}(window,document),/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */
|
|
613
|
-
function(e,t,n){var r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){e.setTimeout(t,1e3/60)},i=function(){var r={},i=t.createElement("div").style,o=function(){for(var e=["t","webkitT","MozT","msT","OT"],t=0,n=e.length;t<n;t++)if(e[t]+"ransform"in i)return e[t].substr(0,e[t].length-1);return!1}();function s(e){return!1!==o&&(""===o?e:o+e.charAt(0).toUpperCase()+e.substr(1))}r.getTime=Date.now||function(){return(new Date).getTime()},r.extend=function(e,t){for(var n in t)e[n]=t[n]},r.addEvent=function(e,t,n,r){e.addEventListener(t,n,!!r)},r.removeEvent=function(e,t,n,r){e.removeEventListener(t,n,!!r)},r.prefixPointerEvent=function(t){return e.MSPointerEvent?"MSPointer"+t.charAt(7).toUpperCase()+t.substr(8):t},r.momentum=function(e,t,r,i,o,s){var a,l,u=e-t,c=n.abs(u)/r;return l=c/(s=void 0===s?6e-4:s),(a=e+c*c/(2*s)*(u<0?-1:1))<i?(a=o?i-o/2.5*(c/8):i,l=(u=n.abs(a-e))/c):a>0&&(a=o?o/2.5*(c/8):0,l=(u=n.abs(e)+a)/c),{destination:n.round(a),duration:l}};var a=s("transform");return r.extend(r,{hasTransform:!1!==a,hasPerspective:s("perspective")in i,hasTouch:"ontouchstart"in e,hasPointer:!(!e.PointerEvent&&!e.MSPointerEvent),hasTransition:s("transition")in i}),r.isBadAndroid=function(){var t=e.navigator.appVersion;if(/Android/.test(t)&&!/Chrome\/\d/.test(t)){var n=t.match(/Safari\/(\d+.\d)/);return!(n&&"object"==typeof n&&n.length>=2)||parseFloat(n[1])<535.19}return!1}(),r.extend(r.style={},{transform:a,transitionTimingFunction:s("transitionTimingFunction"),transitionDuration:s("transitionDuration"),transitionDelay:s("transitionDelay"),transformOrigin:s("transformOrigin")}),r.hasClass=function(e,t){return new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},r.addClass=function(e,t){if(!r.hasClass(e,t)){var n=e.className.split(" ");n.push(t),e.className=n.join(" ")}},r.removeClass=function(e,t){if(r.hasClass(e,t)){var n=new RegExp("(^|\\s)"+t+"(\\s|$)","g");e.className=e.className.replace(n," ")}},r.offset=function(e){for(var t=-e.offsetLeft,n=-e.offsetTop;e=e.offsetParent;)t-=e.offsetLeft,n-=e.offsetTop;return{left:t,top:n}},r.preventDefaultException=function(e,t){for(var n in t)if(t[n].test(e[n]))return!0;return!1},r.extend(r.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),r.extend(r.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(e){return e*(2-e)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(e){return n.sqrt(1- --e*e)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(e){return(e-=1)*e*(5*e+4)+1}},bounce:{style:"",fn:function(e){return(e/=1)<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}},elastic:{style:"",fn:function(e){return 0===e?0:1==e?1:.4*n.pow(2,-10*e)*n.sin((e-.055)*(2*n.PI)/.22)+1}}}),r.tap=function(e,n){var r=t.createEvent("Event");r.initEvent(n,!0,!0),r.pageX=e.pageX,r.pageY=e.pageY,e.target.dispatchEvent(r)},r.click=function(e){var n,r=e.target;/(SELECT|INPUT|TEXTAREA)/i.test(r.tagName)||((n=t.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,e.view,1,r.screenX,r.screenY,r.clientX,r.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,null),n._constructed=!0,r.dispatchEvent(n))},r}();function o(n,r){for(var o in this.wrapper="string"==typeof n?t.querySelector(n):n,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!i.hasPointer,disableTouch:i.hasPointer||!i.hasTouch,disableMouse:i.hasPointer||i.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:void 0===e.onmousedown},r)this.options[o]=r[o];this.translateZ=this.options.HWCompositing&&i.hasPerspective?" translateZ(0)":"",this.options.useTransition=i.hasTransition&&this.options.useTransition,this.options.useTransform=i.hasTransform&&this.options.useTransform,this.options.eventPassthrough=!0===this.options.eventPassthrough?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"!=this.options.eventPassthrough&&this.options.scrollY,this.options.scrollX="horizontal"!=this.options.eventPassthrough&&this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?i.ease[this.options.bounceEasing]||i.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,!0===this.options.tap&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function s(e,n,r){var i=t.createElement("div"),o=t.createElement("div");return!0===r&&(i.style.cssText="position:absolute;z-index:9999",o.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),o.className="iScrollIndicator","h"==e?(!0===r&&(i.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",o.style.height="100%"),i.className="iScrollHorizontalScrollbar"):(!0===r&&(i.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",o.style.width="100%"),i.className="iScrollVerticalScrollbar"),i.style.cssText+=";overflow:hidden",n||(i.style.pointerEvents="none"),i.appendChild(o),i}function a(n,o){for(var s in this.wrapper="string"==typeof o.el?t.querySelector(o.el):o.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=n,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0},o)this.options[s]=o[s];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(i.addEvent(this.indicator,"touchstart",this),i.addEvent(e,"touchend",this)),this.options.disablePointer||(i.addEvent(this.indicator,i.prefixPointerEvent("pointerdown"),this),i.addEvent(e,i.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(i.addEvent(this.indicator,"mousedown",this),i.addEvent(e,"mouseup",this))),this.options.fade){this.wrapperStyle[i.style.transform]=this.scroller.translateZ;var a=i.style.transitionDuration;this.wrapperStyle[a]=i.isBadAndroid?"0.0001ms":"0ms";var l=this;i.isBadAndroid&&r((function(){"0.0001ms"===l.wrapperStyle[a]&&(l.wrapperStyle[a]="0s")})),this.wrapperStyle.opacity="0"}}o.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(e){e.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(e){if(1!=i.eventType[e.type]&&0!==(e.which?e.button:e.button<2?0:4==e.button?1:2))return;if(this.enabled&&(!this.initiated||i.eventType[e.type]===this.initiated)){!this.options.preventDefault||i.isBadAndroid||i.preventDefaultException(e.target,this.options.preventDefaultException)||e.preventDefault();var t,r=e.touches?e.touches[0]:e;this.initiated=i.eventType[e.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=i.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,t=this.getComputedPosition(),this._translate(n.round(t.x),n.round(t.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=r.pageX,this.pointY=r.pageY,this._execEvent("beforeScrollStart")}},_move:function(e){if(this.enabled&&i.eventType[e.type]===this.initiated){this.options.preventDefault&&e.preventDefault();var t,r,o,s,a=e.touches?e.touches[0]:e,l=a.pageX-this.pointX,u=a.pageY-this.pointY,c=i.getTime();if(this.pointX=a.pageX,this.pointY=a.pageY,this.distX+=l,this.distY+=u,o=n.abs(this.distX),s=n.abs(this.distY),!(c-this.endTime>300&&o<10&&s<10)){if(this.directionLocked||this.options.freeScroll||(o>s+this.options.directionLockThreshold?this.directionLocked="h":s>=o+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)e.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);u=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)e.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);l=0}l=this.hasHorizontalScroll?l:0,u=this.hasVerticalScroll?u:0,t=this.x+l,r=this.y+u,(t>0||t<this.maxScrollX)&&(t=this.options.bounce?this.x+l/3:t>0?0:this.maxScrollX),(r>0||r<this.maxScrollY)&&(r=this.options.bounce?this.y+u/3:r>0?0:this.maxScrollY),this.directionX=l>0?-1:l<0?1:0,this.directionY=u>0?-1:u<0?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(t,r),c-this.startTime>300&&(this.startTime=c,this.startX=this.x,this.startY=this.y)}}},_end:function(e){if(this.enabled&&i.eventType[e.type]===this.initiated){this.options.preventDefault&&!i.preventDefaultException(e.target,this.options.preventDefaultException)&&e.preventDefault();e.changedTouches&&e.changedTouches[0];var t,r,o=i.getTime()-this.startTime,s=n.round(this.x),a=n.round(this.y),l=n.abs(s-this.startX),u=n.abs(a-this.startY),c=0,d="";if(this.isInTransition=0,this.initiated=0,this.endTime=i.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(s,a),!this.moved)return this.options.tap&&i.tap(e,this.options.tap),this.options.click&&i.click(e),void this._execEvent("scrollCancel");if(this._events.flick&&o<200&&l<100&&u<100)this._execEvent("flick");else{if(this.options.momentum&&o<300&&(t=this.hasHorizontalScroll?i.momentum(this.x,this.startX,o,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:s,duration:0},r=this.hasVerticalScroll?i.momentum(this.y,this.startY,o,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:a,duration:0},s=t.destination,a=r.destination,c=n.max(t.duration,r.duration),this.isInTransition=1),this.options.snap){var h=this._nearestSnap(s,a);this.currentPage=h,c=this.options.snapSpeed||n.max(n.max(n.min(n.abs(s-h.x),1e3),n.min(n.abs(a-h.y),1e3)),300),s=h.x,a=h.y,this.directionX=0,this.directionY=0,d=this.options.bounceEasing}if(s!=this.x||a!=this.y)return(s>0||s<this.maxScrollX||a>0||a<this.maxScrollY)&&(d=i.ease.quadratic),void this.scrollTo(s,a,c,d);this._execEvent("scrollEnd")}}}},_resize:function(){var e=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){e.refresh()}),this.options.resizePolling)},resetPosition:function(e){var t=this.x,n=this.y;return e=e||0,!this.hasHorizontalScroll||this.x>0?t=0:this.x<this.maxScrollX&&(t=this.maxScrollX),!this.hasVerticalScroll||this.y>0?n=0:this.y<this.maxScrollY&&(n=this.maxScrollY),(t!=this.x||n!=this.y)&&(this.scrollTo(t,n,e,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight,this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=i.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(e,t){this._events[e]||(this._events[e]=[]),this._events[e].push(t)},off:function(e,t){if(this._events[e]){var n=this._events[e].indexOf(t);n>-1&&this._events[e].splice(n,1)}},_execEvent:function(e){if(this._events[e]){var t=0,n=this._events[e].length;if(n)for(;t<n;t++)this._events[e][t].apply(this,[].slice.call(arguments,1))}},scrollBy:function(e,t,n,r){e=this.x+e,t=this.y+t,n=n||0,this.scrollTo(e,t,n,r)},scrollTo:function(e,t,n,r){r=r||i.ease.circular,this.isInTransition=this.options.useTransition&&n>0;var o=this.options.useTransition&&r.style;!n||o?(o&&(this._transitionTimingFunction(r.style),this._transitionTime(n)),this._translate(e,t)):this._animate(e,t,n,r.fn)},scrollToElement:function(e,t,r,o,s){if(e=e.nodeType?e:this.scroller.querySelector(e)){var a=i.offset(e);a.left-=this.wrapperOffset.left,a.top-=this.wrapperOffset.top,!0===r&&(r=n.round(e.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===o&&(o=n.round(e.offsetHeight/2-this.wrapper.offsetHeight/2)),a.left-=r||0,a.top-=o||0,a.left=a.left>0?0:a.left<this.maxScrollX?this.maxScrollX:a.left,a.top=a.top>0?0:a.top<this.maxScrollY?this.maxScrollY:a.top,t=null==t||"auto"===t?n.max(n.abs(this.x-a.left),n.abs(this.y-a.top)):t,this.scrollTo(a.left,a.top,t,s)}},_transitionTime:function(e){e=e||0;var t=i.style.transitionDuration;if(this.scrollerStyle[t]=e+"ms",!e&&i.isBadAndroid){this.scrollerStyle[t]="0.0001ms";var n=this;r((function(){"0.0001ms"===n.scrollerStyle[t]&&(n.scrollerStyle[t]="0s")}))}if(this.indicators)for(var o=this.indicators.length;o--;)this.indicators[o].transitionTime(e)},_transitionTimingFunction:function(e){if(this.scrollerStyle[i.style.transitionTimingFunction]=e,this.indicators)for(var t=this.indicators.length;t--;)this.indicators[t].transitionTimingFunction(e)},_translate:function(e,t){if(this.options.useTransform?this.scrollerStyle[i.style.transform]="translate("+e+"px,"+t+"px)"+this.translateZ:(e=n.round(e),t=n.round(t),this.scrollerStyle.left=e+"px",this.scrollerStyle.top=t+"px"),this.x=e,this.y=t,this.indicators)for(var r=this.indicators.length;r--;)this.indicators[r].updatePosition()},_initEvents:function(t){var n=t?i.removeEvent:i.addEvent,r=this.options.bindToWrapper?this.wrapper:e;n(e,"orientationchange",this),n(e,"resize",this),this.options.click&&n(this.wrapper,"click",this,!0),this.options.disableMouse||(n(this.wrapper,"mousedown",this),n(r,"mousemove",this),n(r,"mousecancel",this),n(r,"mouseup",this)),i.hasPointer&&!this.options.disablePointer&&(n(this.wrapper,i.prefixPointerEvent("pointerdown"),this),n(r,i.prefixPointerEvent("pointermove"),this),n(r,i.prefixPointerEvent("pointercancel"),this),n(r,i.prefixPointerEvent("pointerup"),this)),i.hasTouch&&!this.options.disableTouch&&(n(this.wrapper,"touchstart",this),n(r,"touchmove",this),n(r,"touchcancel",this),n(r,"touchend",this)),n(this.scroller,"transitionend",this),n(this.scroller,"webkitTransitionEnd",this),n(this.scroller,"oTransitionEnd",this),n(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var t,n,r=e.getComputedStyle(this.scroller,null);return this.options.useTransform?(t=+((r=r[i.style.transform].split(")")[0].split(", "))[12]||r[4]),n=+(r[13]||r[5])):(t=+r.left.replace(/[^-\d.]/g,""),n=+r.top.replace(/[^-\d.]/g,"")),{x:t,y:n}},_initIndicators:function(){var e,t=this.options.interactiveScrollbars,n="string"!=typeof this.options.scrollbars,r=[],i=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(e={el:s("v",t,this.options.scrollbars),interactive:t,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(e.el),r.push(e)),this.options.scrollX&&(e={el:s("h",t,this.options.scrollbars),interactive:t,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(e.el),r.push(e))),this.options.indicators&&(r=r.concat(this.options.indicators));for(var o=r.length;o--;)this.indicators.push(new a(this,r[o]));function l(e){if(i.indicators)for(var t=i.indicators.length;t--;)e.call(i.indicators[t])}this.options.fadeScrollbars&&(this.on("scrollEnd",(function(){l((function(){this.fade()}))})),this.on("scrollCancel",(function(){l((function(){this.fade()}))})),this.on("scrollStart",(function(){l((function(){this.fade(1)}))})),this.on("beforeScrollStart",(function(){l((function(){this.fade(1,!0)}))}))),this.on("refresh",(function(){l((function(){this.refresh()}))})),this.on("destroy",(function(){l((function(){this.destroy()})),delete this.indicators}))},_initWheel:function(){i.addEvent(this.wrapper,"wheel",this),i.addEvent(this.wrapper,"mousewheel",this),i.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",(function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,i.removeEvent(this.wrapper,"wheel",this),i.removeEvent(this.wrapper,"mousewheel",this),i.removeEvent(this.wrapper,"DOMMouseScroll",this)}))},_wheel:function(e){if(this.enabled){e.preventDefault();var t,r,i,o,s=this;if(void 0===this.wheelTimeout&&s._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout((function(){s.options.snap||s._execEvent("scrollEnd"),s.wheelTimeout=void 0}),400),"deltaX"in e)1===e.deltaMode?(t=-e.deltaX*this.options.mouseWheelSpeed,r=-e.deltaY*this.options.mouseWheelSpeed):(t=-e.deltaX,r=-e.deltaY);else if("wheelDeltaX"in e)t=e.wheelDeltaX/120*this.options.mouseWheelSpeed,r=e.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in e)t=r=e.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in e))return;t=r=-e.detail/3*this.options.mouseWheelSpeed}if(t*=this.options.invertWheelDirection,r*=this.options.invertWheelDirection,this.hasVerticalScroll||(t=r,r=0),this.options.snap)return i=this.currentPage.pageX,o=this.currentPage.pageY,t>0?i--:t<0&&i++,r>0?o--:r<0&&o++,void this.goToPage(i,o);i=this.x+n.round(this.hasHorizontalScroll?t:0),o=this.y+n.round(this.hasVerticalScroll?r:0),this.directionX=t>0?-1:t<0?1:0,this.directionY=r>0?-1:r<0?1:0,i>0?i=0:i<this.maxScrollX&&(i=this.maxScrollX),o>0?o=0:o<this.maxScrollY&&(o=this.maxScrollY),this.scrollTo(i,o,0)}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",(function(){var e,t,r,i,o,s,a=0,l=0,u=0,c=this.options.snapStepX||this.wrapperWidth,d=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(!0===this.options.snap)for(r=n.round(c/2),i=n.round(d/2);u>-this.scrollerWidth;){for(this.pages[a]=[],e=0,o=0;o>-this.scrollerHeight;)this.pages[a][e]={x:n.max(u,this.maxScrollX),y:n.max(o,this.maxScrollY),width:c,height:d,cx:u-r,cy:o-i},o-=d,e++;u-=c,a++}else for(e=(s=this.options.snap).length,t=-1;a<e;a++)(0===a||s[a].offsetLeft<=s[a-1].offsetLeft)&&(l=0,t++),this.pages[l]||(this.pages[l]=[]),u=n.max(-s[a].offsetLeft,this.maxScrollX),o=n.max(-s[a].offsetTop,this.maxScrollY),r=u-n.round(s[a].offsetWidth/2),i=o-n.round(s[a].offsetHeight/2),this.pages[l][t]={x:u,y:o,width:s[a].offsetWidth,height:s[a].offsetHeight,cx:r,cy:i},u>this.maxScrollX&&l++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1==0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}})),this.on("flick",(function(){var e=this.options.snapSpeed||n.max(n.max(n.min(n.abs(this.x-this.startX),1e3),n.min(n.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,e)}))},_nearestSnap:function(e,t){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var r=0,i=this.pages.length,o=0;if(n.abs(e-this.absStartX)<this.snapThresholdX&&n.abs(t-this.absStartY)<this.snapThresholdY)return this.currentPage;for(e>0?e=0:e<this.maxScrollX&&(e=this.maxScrollX),t>0?t=0:t<this.maxScrollY&&(t=this.maxScrollY);r<i;r++)if(e>=this.pages[r][0].cx){e=this.pages[r][0].x;break}for(i=this.pages[r].length;o<i;o++)if(t>=this.pages[0][o].cy){t=this.pages[0][o].y;break}return r==this.currentPage.pageX&&((r+=this.directionX)<0?r=0:r>=this.pages.length&&(r=this.pages.length-1),e=this.pages[r][0].x),o==this.currentPage.pageY&&((o+=this.directionY)<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),t=this.pages[0][o].y),{x:e,y:t,pageX:r,pageY:o}},goToPage:function(e,t,r,i){i=i||this.options.bounceEasing,e>=this.pages.length?e=this.pages.length-1:e<0&&(e=0),t>=this.pages[e].length?t=this.pages[e].length-1:t<0&&(t=0);var o=this.pages[e][t].x,s=this.pages[e][t].y;r=void 0===r?this.options.snapSpeed||n.max(n.max(n.min(n.abs(o-this.x),1e3),n.min(n.abs(s-this.y),1e3)),300):r,this.currentPage={x:o,y:s,pageX:e,pageY:t},this.scrollTo(o,s,r,i)},next:function(e,t){var n=this.currentPage.pageX,r=this.currentPage.pageY;++n>=this.pages.length&&this.hasVerticalScroll&&(n=0,r++),this.goToPage(n,r,e,t)},prev:function(e,t){var n=this.currentPage.pageX,r=this.currentPage.pageY;--n<0&&this.hasVerticalScroll&&(n=0,r--),this.goToPage(n,r,e,t)},_initKeys:function(t){var n,r={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(n in this.options.keyBindings)"string"==typeof this.options.keyBindings[n]&&(this.options.keyBindings[n]=this.options.keyBindings[n].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(n in r)this.options.keyBindings[n]=this.options.keyBindings[n]||r[n];i.addEvent(e,"keydown",this),this.on("destroy",(function(){i.removeEvent(e,"keydown",this)}))},_key:function(e){if(this.enabled){var t,r=this.options.snap,o=r?this.currentPage.pageX:this.x,s=r?this.currentPage.pageY:this.y,a=i.getTime(),l=this.keyTime||0;switch(this.options.useTransition&&this.isInTransition&&(t=this.getComputedPosition(),this._translate(n.round(t.x),n.round(t.y)),this.isInTransition=!1),this.keyAcceleration=a-l<200?n.min(this.keyAcceleration+.25,50):0,e.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?o+=r?1:this.wrapperWidth:s+=r?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?o-=r?1:this.wrapperWidth:s-=r?1:this.wrapperHeight;break;case this.options.keyBindings.end:o=r?this.pages.length-1:this.maxScrollX,s=r?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:o=0,s=0;break;case this.options.keyBindings.left:o+=r?-1:5+this.keyAcceleration|0;break;case this.options.keyBindings.up:s+=r?1:5+this.keyAcceleration|0;break;case this.options.keyBindings.right:o-=r?-1:5+this.keyAcceleration|0;break;case this.options.keyBindings.down:s-=r?1:5+this.keyAcceleration|0;break;default:return}r?this.goToPage(o,s):(o>0?(o=0,this.keyAcceleration=0):o<this.maxScrollX&&(o=this.maxScrollX,this.keyAcceleration=0),s>0?(s=0,this.keyAcceleration=0):s<this.maxScrollY&&(s=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(o,s,0),this.keyTime=a)}},_animate:function(e,t,n,o){var s=this,a=this.x,l=this.y,u=i.getTime(),c=u+n;this.isAnimating=!0,function d(){var h,p,f,m=i.getTime();if(m>=c)return s.isAnimating=!1,s._translate(e,t),void(s.resetPosition(s.options.bounceTime)||s._execEvent("scrollEnd"));f=o(m=(m-u)/n),h=(e-a)*f+a,p=(t-l)*f+l,s._translate(h,p),s.isAnimating&&r(d)}()},handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(e);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(e);break;case"keydown":this._key(e);break;case"click":this.enabled&&!e._constructed&&(e.preventDefault(),e.stopPropagation())}}},a.prototype={handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(i.removeEvent(this.indicator,"touchstart",this),i.removeEvent(this.indicator,i.prefixPointerEvent("pointerdown"),this),i.removeEvent(this.indicator,"mousedown",this),i.removeEvent(e,"touchmove",this),i.removeEvent(e,i.prefixPointerEvent("pointermove"),this),i.removeEvent(e,"mousemove",this),i.removeEvent(e,"touchend",this),i.removeEvent(e,i.prefixPointerEvent("pointerup"),this),i.removeEvent(e,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(t){var n=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=n.pageX,this.lastPointY=n.pageY,this.startTime=i.getTime(),this.options.disableTouch||i.addEvent(e,"touchmove",this),this.options.disablePointer||i.addEvent(e,i.prefixPointerEvent("pointermove"),this),this.options.disableMouse||i.addEvent(e,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(e){var t,n,r,o,s=e.touches?e.touches[0]:e;i.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,t=s.pageX-this.lastPointX,this.lastPointX=s.pageX,n=s.pageY-this.lastPointY,this.lastPointY=s.pageY,r=this.x+t,o=this.y+n,this._pos(r,o),e.preventDefault(),e.stopPropagation()},_end:function(t){if(this.initiated){if(this.initiated=!1,t.preventDefault(),t.stopPropagation(),i.removeEvent(e,"touchmove",this),i.removeEvent(e,i.prefixPointerEvent("pointermove"),this),i.removeEvent(e,"mousemove",this),this.scroller.options.snap){var r=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),o=this.options.snapSpeed||n.max(n.max(n.min(n.abs(this.scroller.x-r.x),1e3),n.min(n.abs(this.scroller.y-r.y),1e3)),300);this.scroller.x==r.x&&this.scroller.y==r.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=r,this.scroller.scrollTo(r.x,r.y,o,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(e){e=e||0;var t=i.style.transitionDuration;if(this.indicatorStyle[t]=e+"ms",!e&&i.isBadAndroid){this.indicatorStyle[t]="0.0001ms";var n=this;r((function(){"0.0001ms"===n.indicatorStyle[t]&&(n.indicatorStyle[t]="0s")}))}},transitionTimingFunction:function(e){this.indicatorStyle[i.style.transitionTimingFunction]=e},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(i.addClass(this.wrapper,"iScrollBothScrollbars"),i.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(i.removeClass(this.wrapper,"iScrollBothScrollbars"),i.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=n.max(n.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=8-this.indicatorWidth,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=n.max(n.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=8-this.indicatorHeight,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var e=this.options.listenX&&n.round(this.sizeRatioX*this.scroller.x)||0,t=this.options.listenY&&n.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(e<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=n.max(this.indicatorWidth+e,8),this.indicatorStyle.width=this.width+"px"),e=this.minBoundaryX):e>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=n.max(this.indicatorWidth-(e-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",e=this.maxPosX+this.indicatorWidth-this.width):e=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),t<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=n.max(this.indicatorHeight+3*t,8),this.indicatorStyle.height=this.height+"px"),t=this.minBoundaryY):t>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=n.max(this.indicatorHeight-3*(t-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",t=this.maxPosY+this.indicatorHeight-this.height):t=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=e,this.y=t,this.scroller.options.useTransform?this.indicatorStyle[i.style.transform]="translate("+e+"px,"+t+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=e+"px",this.indicatorStyle.top=t+"px")},_pos:function(e,t){e<0?e=0:e>this.maxPosX&&(e=this.maxPosX),t<0?t=0:t>this.maxPosY&&(t=this.maxPosY),e=this.options.listenX?n.round(e/this.sizeRatioX):this.scroller.x,t=this.options.listenY?n.round(t/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(e,t)},fade:function(e,t){if(!t||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var n=e?250:500,r=e?0:300;e=e?"1":"0",this.wrapperStyle[i.style.transitionDuration]=n+"ms",this.fadeTimeout=setTimeout(function(e){this.wrapperStyle.opacity=e,this.visible=+e}.bind(this,e),r)}}},o.utils=i,"undefined"!=typeof module&&module.exports?module.exports=o:"function"==typeof define&&define.amd?define((function(){return o})):e.IScroll=o}(window,document,Math),function(e){var t=!1;if("function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),!t){var n=window.Cookies,r=window.Cookies=e();r.noConflict=function(){return window.Cookies=n,r}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}return function t(n){function r(t,i,o){var s;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(o=e({path:"/"},r.defaults,o)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}o.expires=o.expires?o.expires.toUTCString():"";try{s=JSON.stringify(i),/^[\{\[]/.test(s)&&(i=s)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var l="";for(var u in o)o[u]&&(l+="; "+u,!0!==o[u]&&(l+="="+o[u]));return document.cookie=t+"="+i+l}t||(s={});for(var c=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,h=0;h<c.length;h++){var p=c[h].split("="),f=p.slice(1).join("=");this.json||'"'!==f.charAt(0)||(f=f.slice(1,-1));try{var m=p[0].replace(d,decodeURIComponent);if(f=n.read?n.read(f,m):n(f,m)||f.replace(d,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(e){}if(t===m){s=f;break}t||(s[m]=f)}catch(e){}}return s}}return r.set=r,r.get=function(e){return r.call(r,e)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,n){r(t,"",e(n,{expires:-1}))},r.withConverter=t,r}((function(){}))})),$.widget("wm.datatable",{options:{data:[],statusMsg:"",colDefs:[],rowActions:[],headerConfig:[],sortInfo:{field:"",direction:""},isMobile:!1,enableSort:!0,filtermode:"",filteronkeypress:!1,activeRow:void 0,height:"100%",showHeader:!0,selectFirstRow:!1,showNewRow:!0,showRowIndex:!1,enableRowSelection:!0,enableColumnSelection:!1,multiselect:!1,filterNullRecords:!0,navigation:"",isdynamictable:"",cssClassNames:{tableRow:"app-datagrid-row",headerCell:"app-datagrid-header-cell",groupHeaderCell:"app-datagrid-group-header-cell",tableCell:"app-datagrid-cell",grid:"",gridDefault:"table",gridBody:"app-datagrid-body",gridFooter:"app-datagrid-footer",deleteRow:"danger",ascIcon:"wi wi-long-arrow-up",descIcon:"wi wi-long-arrow-down",selectedColumn:"selected-column",rowExpandIcon:"wi wi-minus-square",rowCollapseIcon:"wi wi-plus-square",gridRowExpansionClass:"table-row-expansion",expandedRowClass:"expanded"},dataStates:{loading:"Loading...",ready:"",error:"An error occurred in loading the data.",nodata:"No data found."},messages:{selectField:"Select Field"},loadingicon:"",startRowIndex:1,editmode:"",actionsEnabled:{edit:!0,new:!0},rowExpansionEnabled:!1,rowDef:{position:"0",closeothers:!1,columnwidth:"30px"},summaryRow:!1,summaryRowDefs:[],summaryRowDefsObject:[],searchHandler:function(){},sortHandler:function(){}},customColumnDefs:{checkbox:{field:"checkbox",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",isMultiSelectCol:!0,show:!0},radio:{field:"radio",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",show:!0},__expand:{field:"__expand",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"text-align: center;",textAlignment:"center",show:!0,width:"30px"},rowIndex:{field:"rowIndex",type:"custom",displayName:"S. No.",sortable:!1,searchable:!1,selectable:!1,readonly:!0,style:"text-align: left;",textAlignment:"left",show:!0}},CONSTANTS:{QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog",SEARCH:"search",MULTI_COLUMN:"multicolumn"},Utils:{random:function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},isDefined:function(e){return void 0!==e},isObject:function(e){return null!==e&&"object"==typeof e},getObjectIndex:function(e,t){var n=-1;return Array.isArray(e)?(e.some((function(e,r){if(_.isEqual(e,t))return n=r,!0})),n):-1},generateGuid:function(){var e=this.random;return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},isValidHtml:function(e){return/<[a-z][\s\S]*>/i.test(e)},isMac:function(){return navigator.platform.toUpperCase().indexOf("MAC")>=0},isDeleteKey:function(e){return this.isMac()&&8===e.which||46===e.which}},_setStyles:function(e,t){if(t)return t.split(";").forEach((function(t){var n,r,i=t.split(":");2===i.length&&(n=i[0].trim(),r=i[1].trim(),e.css(n,r))})),t},_getColumnSortDirection:function(e){var t=this.options.sortInfo;return e===t.field?t.direction:""},_toggleSpacingClasses:function(e){switch(e){case"normal":this.tableContainer.removeClass("table-condensed"),this.gridSearch&&(this.gridSearch.find(".form-group").removeClass("form-group-sm"),this.gridSearch.find("select").removeClass("input-sm"),this.gridSearch.find(".input-group").removeClass("input-group-sm"));break;case"condensed":this.tableContainer.addClass("table-condensed"),this.gridSearch&&(this.gridSearch.find(".form-group").addClass("form-group-sm"),this.gridSearch.find("select").addClass("input-sm"),this.gridSearch.find(".input-group").addClass("input-group-sm"))}},_getColSpan:function(e){var t=0,n=this;return _.forEach(e,(function(e){var r;e.isGroup?t+=n._getColSpan(e.columns):(r=_.find(n.preparedHeaderData,{field:e.field}),t=_.isUndefined(r.show)||r.show?t+1:t)})),t},_setColSpan:function(e){var t=this;_.forEach(e,(function(e){e.isGroup&&(e.colspan=t._getColSpan(e.columns),t.gridHeaderElement.find('th[data-col-group="'+e.field+'"]').attr("colspan",e.colspan),t._setColSpan(e.columns))}))},_getHeaderTemplate:function(){var e,t=$("<colgroup></colgroup>"),n=this.gridHeaderElement.empty(),r=this.Utils.isDefined,i=this.options.sortInfo,o=i.field,s=this,a=[],l=this.options.headerConfig,u=s.options.cssClassNames.groupHeaderCell;function c(e,n){var a,l,u,c,d,h=n,p=e.field,f=s.Utils.isDefined(e.displayName)?e.displayName:p||"",m=f,g=s.options.enableSort&&(_.isUndefined(e.show)||e.show)&&(_.isUndefined(e.sortable)||e.sortable),v=s.options.cssClassNames.headerCell,y="";return f=s.Utils.isDefined(f)&&""!==f?f:" ",u=$("<col/>"),e.style&&s._setStyles(u,e.style),t.append(u),r(e.class)&&(v+=" "+e.class),e.selected&&(v+=" "+s.options.cssClassNames.selectedColumn+" "),"checkbox"!==p&&"radio"!==p||(v+=" grid-col-small"),y+="<th",(_.isUndefined(e.resizable)||e.resizable)&&(_.isUndefined(e.show)||e.show)&&(y+=" data-col-resizable"),s.options.enableColumnSelection&&(_.isUndefined(e.selectable)||e.selectable)&&(y+=" data-col-selectable"),g&&(y+=" data-col-sortable"),y+="></th>",(l=$(y)).attr({"data-col-id":h,"data-col-field":p,title:m}),s._setStyles(l,"text-align: "+e.textAlignment),l.addClass(v),"checkbox"===p&&l.append('<input type="checkbox" />'),l.append('<span class="header-data">'+f+"</span>"),g&&(c=$('<span class="sort-buttons-container"></span>'),d=$('<i class="sort-icon"></i>'),o&&o===e.field&&i.direction&&(a="asc"===i.direction?s.options.cssClassNames.ascIcon:s.options.cssClassNames.descIcon,c.addClass("active"),d.addClass(a+" "+i.direction)),l.append(c.append(d))),l}return _.isEmpty(l)?(e=$("<tr></tr>"),s.preparedHeaderData.forEach((function(t,n){e.append(c(t,n))})),n.append(e)):(!function e(t,n){var r=[];_.forEach(t,(function(t){var i,o,a,l,d;t.columns&&t.columns.length?(d=$("<th></th>"),a=u+" "+(t.class||""),l="text-align: "+t.textAlignment+";background-color: "+(t.backgroundColor||"")+";",d.attr({"data-col-group":t.field,class:a,title:t.displayName}),s._setStyles(d,l),d.append('<span class="header-data">'+t.displayName+"</span>"),r.push(d),e(t.columns,n+1)):(i=_.findIndex(s.preparedHeaderData,{field:t.field}),(o=s.preparedHeaderData[i])&&r.push(c(o,i)))})),a[n]=a[n]||[],a[n]=a[n].concat(r)}(l,0),a.forEach((function(t,r){e=$('<tr role="row" tabindex="0"></tr>');var i=a.length-r;t.forEach((function(t){i>1&&t.hasClass("app-datagrid-header-cell")&&t.attr("rowspan",i),e.append(t)})),n.append(e)}))),{colgroup:t,header:n}},_getSearchEl:function(){var e='<select name="wm-datatable" data-element="dgFilterValue" class="form-control app-select"><option value="" selected class="placeholder">'+this.options.messages.selectField+"</option>",t=this.Utils.isDefined(this.options.searchLabel)&&this.options.searchLabel.length?this.options.searchLabel:"";this.options.colDefs.forEach((function(t,n){"none"!==t.field&&"rowOperations"!==t.field&&t.searchable&&"false"!==_.toString(t.showinfilter)&&(e+='<option value="'+t.field+'" data-coldef-index="'+n+'">'+(t.displayName||t.field)+"</option>")})),e+="</select>";var n=$('<form class="form-search form-inline" onsubmit="return false;"><div class="form-group"><input type="text" data-element="dgSearchText" class="form-control app-textbox" value="" placeholder="'+t+'"/></div><div class="input-append input-group">'+e+'<span class="input-group-addon"><button type="button" data-element="dgSearchButton" class="app-search-button" title="'+t+'"><i class="wi wi-search"></i></button></span></div></div></form>');return this._setStyles(n.find('[data-element="dgSearchText"]'),"display: inline-block;"),n},_appendRowExpansionButtons:function(e){var t=this;e.find("[data-identifier='rowExpansionButtons']").each((function(e){var n,r,i,o=e;r=$(this).closest("tr.app-datagrid-row"),i=parseInt(r.attr("data-row-id"),10),(n=_.clone(t.options.data[i])).$index=o+1,t.options.generateRowExpansionCell(n,o),$(this).empty().append(t.options.getRowExpansionAction(o))}))},setSummaryRowDef:function(e,t,n,r){this.options.summaryRow=!0,null==this.options.summaryRowDefs[n]&&(this.options.summaryRowDefs[n]={},this.options.summaryRowDefsObject[n]={}),this.options.summaryRowDefsObject[n][e]=t,this.options.summaryRowDefs[n][e]=t&&t.value?t.value:t,r&&this.refreshGridData()},_getSummaryRowTemplate:function(){var e=this,t=$('<tfoot class="'+this.options.cssClassNames.gridFooter+'"></tfoot>');return this._setStyles(t,"border-top: 3px solid #eee;"),_.forEach(this.options.summaryRowDefs,(function(n,r){n.$$pk=r,t.append(e._getRowTemplate(n,r,!0))})),t},getPageStartIndex:function(){var e=this.options.getCurrentPage(),t=this.options.getPageSize();return((this.options.actionRowPage<e?this.options.actionRowPage:e)-1)*t},_getPreparedDataForInfiniteScroll:function(e,t){return t=t.filter((function(t,n){if(!e.find("tr.app-datagrid-row[data-row-id="+t.$$pk+"]").length)return t}))},_updateTrData:function(e){var t,n,r=this;t=e.find("tr.app-datagrid-row[data-row-id="+r.options.actionRowIndex+"]"),n=r.preparedData[r.options.actionRowIndex],r.options.generateCustomExpressions(n,r.options.actionRowIndex);var i=r._getRowTemplate(n,r.options.actionRowIndex);t.replaceWith(i[0])},_handleCRUDForInfiniteScroll:function(e){var t=this;t.options.lastActionPerformed!==t.options.ACTIONS.SEARCH_OR_SORT&&t.options.lastActionPerformed!==t.options.ACTIONS.FILTER_CRITERIA&&t.options.lastActionPerformed!==t.options.ACTIONS.DATASET_UPDATE||!(t.options.isSearchTrigerred||t.options.isDatasetUpdated||t.options.isDataUpdatedByUser)?t.options.lastActionPerformed===t.options.ACTIONS.EDIT&&void 0!==t.options.actionRowIndex&&t.options.editmode!==this.CONSTANTS.QUICK_EDIT&&t._updateTrData(e):(e.html(""),"On-Demand"!==this.options.navigation||this.options.isLastPage||this.element.find(".on-demand-datagrid").show(),t.options.clearCustomExpression(),t.options.clearRowDetailExpression(),t.options.setIsSearchTrigerred(!1),t.options.setIsDatasetUpdated(!1))},_getGridTemplate:function(){var e,t,n=this,r=n.getPageStartIndex(),i=n.options.startRowIndex,o=n.options.isNavTypeScrollOrOndemand();return o?(t=this.gridElement,this.renderTableOnViewLess&&(t=this.gridElement.empty(),this.hideLoadingIndicator(),this.renderTableOnViewLess=!1)):t=this.gridElement.empty(),o?(this._handleCRUDForInfiniteScroll(t),n.options.lastActionPerformed===n.options.ACTIONS.DELETE&&(i=n.options.actionRowIndex+1),e=this._getPreparedDataForInfiniteScroll(t,this.preparedData.slice(r))):(this.options.clearCustomExpression(),this.options.clearRowDetailExpression(),e=this.preparedData),_.forEach(e,(function(e,r){var s,a=_.clone(e),l=o?i+r-1:r;if(a.$index=l+1,n.options.generateCustomExpressions(a,l),n.options.registerRowNgClassWatcher(a,l),s=n._getRowTemplate(e,l),t.append(s),n.options.rowExpansionEnabled){var u=n.options.rowDef.height,c=n.options.rowDef.position,d=_.filter(n.preparedHeaderData,(function(e){return e.show})).length-1,h=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+e.$$pk+'"><td></td><td colspan="'+d+'" class="app-datagrid-row-details-cell"><div class="row-overlay"><div class="row-status"><i class="'+n.options.loadingicon+'"></i></div></div><div class="details-section"></div></td></tr>');"-1"===c&&(h=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+e.$$pk+'"><td colspan="'+d+'" class="app-datagrid-row-details-cell"><div class="row-overlay"><div class="row-status"><i class="'+n.options.loadingicon+'"></i></div></div><div class="details-section"></div></td><td></td></tr>')),u&&h.find("div.row-overlay").css("min-height",u),h.css("display","none"),h.find(".details-section").css("display","none"),t.append(h)}})),this.options.isdynamictable||(this.options.setLastActionPerformed(this.options.ACTIONS.DEFAULT),this.options.setIsDataUpdatedByUser(!1),this.options.clearActionRowIndex()),t},_getRowTemplate:function(e,t,n){var r,i=this,o=i.options;return r=$('<tr role="row" tabindex="0" class="'+o.cssClassNames.tableRow+" "+(o.rowClass||"")+'" data-row-id="'+e.$$pk+'"></tr>'),this.preparedHeaderData.forEach((function(o,s){r.append(i._getColumnTemplate(e,s,o,t,n))})),r},_getRowActionsColumnDefIndex:function(){var e,t=this.preparedHeaderData.length;for(e=0;e<t;e+=1)if("rowOperations"===this.preparedHeaderData[e].field)return e;return-1},_getRowActionsColumnDef:function(){var e=this._getRowActionsColumnDefIndex();return-1!==e?this.preparedHeaderData[e]:null},_getCheckboxTemplate:function(e,t){return'<input name="'+(t?"gridMultiSelect":"")+'" type="checkbox"'+(!0===e._checked?" checked":"")+(e.disabed?" disabled":"")+"/>"},_getRadioTemplate:function(e){return'<input type="radio" rowSelectInput name="" value=""'+(!0===e._checked?" checked":"")+(e.disabed?" disabled":"")+"/>"},_getColumnTemplate:function(e,t,n,r,i){var o,s,a,l,u=this.options.cssClassNames.tableCell+" "+(n.class||""),c=n.customExpression,d="text-align: "+n.textAlignment+";position: relative;";if(o=$('<td class="'+u+'" data-col-id="'+t+'" role="cell"></td>'),this._setStyles(o,d),s=_.get(e,n.field),i)(a=this.options.summaryRowDefsObject[r][n.field])instanceof Object&&a.class&&o.addClass(a.class),s instanceof Promise?('<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>',o.html('<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>')):(l=_.isUndefined(s)||null===s?"":s,o.html(l));else if(c)o.html(this.options.getCustomExpression(n.field,r));else if("custom"!==n.type)s=_.get(e,n.field),(this.options.filterNullRecords&&null===s||_.isUndefined(s))&&(s=""),o.attr("title",s),o.text(""+s);else{switch(n.field){case"checkbox":l=this._getCheckboxTemplate(e,n.isMultiSelectCol);break;case"__expand":l='<span class="row-expansion-column" data-identifier="rowExpansionButtons"></span>';break;case"radio":l=this._getRadioTemplate(e);break;case"rowOperations":l='<span class="actions-column" data-identifier="actionButtons"></span>';break;case"rowIndex":l=e.$$index;break;case"none":l="";break;default:l=_.isUndefined(s)||null===s?"":s}o.html(l)}return e.$index=r+1,this.options.registerColNgClassWatcher(e,n,r,t),o},_getEventTemplate:function(e){var t,n=_.filter(_.keys(e),(function(e){return _.startsWith(e,"on")})),r="";return t="autocomplete"===e.editWidgetType?"onSubmit":"onChange",n=_.union(n,[t]),_.forEach(n,(function(t){r+=" "+_.kebabCase(t)+'="',"onSubmit"!==t&&"onChange"!==t||(r+="_"+t+"Field($event, $scope, newVal, oldVal);"),r+=(e[t]||"")+'" '})),r},_insertFieldInHeaderConfig:function(e,t,n){var r=_.findIndex(e,{field:n}),i=this;-1===r?_.forEach(e,(function(e){e.isGroup&&i._insertFieldInHeaderConfig(e.columns,t,n)})):e.splice(r+1,0,{field:t,isPredefined:!0})},setHeaderConfigForDefaultFields:function(e,t){if(!_.isEmpty(this.options.headerConfig)){var n=this.customColumnDefs[e].field;_.remove(this.options.headerConfig,{field:n}),"0"===t?this.options.headerConfig.unshift({field:n,isPredefined:!0}):"-1"===t?this.options.headerConfig.push({field:n,isPredefined:!0}):this._insertFieldInHeaderConfig(this.options.headerConfig,n,t)}},setDefaultColsData:function(e){if(!_.isEmpty(this.preparedHeaderData)){var t,n;if(this.options.rowExpansionEnabled){if(t=this.options.rowDef.position,(n=_.clone(this.customColumnDefs.__expand)).width=this.options.rowDef.columnwidth,e)if("-1"===t)this.preparedHeaderData.push(n);else if("0"===t)this.preparedHeaderData.unshift(n);else{var r=_.findIndex(this.preparedHeaderData,{field:t});this.preparedHeaderData.splice(r+1,0,n)}this.setHeaderConfigForDefaultFields("__expand",t)}this.options.showRowIndex&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.rowIndex),this.setHeaderConfigForDefaultFields("rowIndex","0")),this.options.multiselect&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.checkbox),this.setHeaderConfigForDefaultFields("checkbox","0")),!this.options.multiselect&&this.options.showRadioColumn&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.radio),this.setHeaderConfigForDefaultFields("radio","0"))}},_prepareHeaderData:function(){this.preparedHeaderData=[],$.extend(this.preparedHeaderData,this.options.colDefs),this.setDefaultColsData(!0)},_generateCustomColDefs:function(){var e=[],t={};function n(n){if(!t[n]){var r={type:"string",field:n};e.push(r),t[n]=!0}}this.options.data.forEach((function(e){_.keys(e).forEach(n)})),this.options.colDefs=e,this._prepareHeaderData()},_prepareData:function(){var e=[],t=this.options.colDefs,n=this,r=n.getPageStartIndex(),i=this.Utils.isObject,o=this.Utils.isDefined;!this.options.colDefs.length&&this.options.data.length&&this._generateCustomColDefs(),(this.options.isNavTypeScrollOrOndemand()?this.options.data.slice(r):this.options.data).forEach((function(s,a){var l=$.extend(!0,{},s);t.forEach((function(e){if(e.field){var t,n,r,a=e.field.split("."),u=s,c=a.length;for(t=0;t<c;t++)if(r=void 0,-1!==(n=a[t]).indexOf("[0]")&&(n=n.replace("[0]",""),r=!0),i(u)&&!r)u=_.get(u,n);else{if(!r){u=void 0;break}u=_.get(u,n+"[0]")}o(u)?l[e.field]=u:a.length>1&&_.has(s,e.field)&&(l[e.field]=s[e.field])}})),l.$$index=r+a+1,l.$$pk=n.options.isNavTypeScrollOrOndemand()?r+a:a,e.push(l)})),n.options.isNavTypeScrollOrOndemand()?n.options.isSearchTrigerred&&!n.emptySearch||n.options.isDatasetUpdated?n.preparedData=e:n.preparedData.length?e.forEach((function(e,t){var i=r+t;n.preparedData[i]&&e.$$index===n.preparedData[i].$$index?n.preparedData[i]=e:n.preparedData.push(e)})):n.preparedData.push(...e):n.preparedData=e},_reselectColumns:function(){var e=[],t=this;this.gridHeaderElement&&this.options.enableColumnSelection&&(e=this.gridHeaderElement.find("th."+this.options.cssClassNames.selectedColumn)).length&&e.each((function(){t.columnSelectionHandler(void 0,$(this))})),this.options.multiselect&&this.updateSelectAllCheckboxState()},_create:function(){$.extend(this,{dataStatus:{message:"",state:"ready"},preparedData:[],preparedHeaderData:[],dataStatusContainer:null,gridContainer:null,gridElement:null,gridHeader:null,gridBody:null,columnClickInfo:{},gridFooter:null,gridSearch:null,tableId:null,searchObj:{field:"",value:"",event:null},compiledCellTemplates:{}}),this._setStatus=_.debounce((function(e){this.__setStatus(e)}),100),this._debounceOnEnter=_.debounce((function(e,t,n,r){this._onEnter(e,t,n,r)}),150),this.options.summaryRow=!1,this.options.summaryRowDefs=[],this._prepareHeaderData(),this._prepareData(),this._render(!0)},_setGridEditMode:function(e){_.isFunction(this.options.setGridEditMode)&&this.options.setGridEditMode(e)},_refreshGrid:function(){this._prepareHeaderData(),this._prepareData(),this._render(),this.addOrRemoveScroll(),this._setGridEditMode(!1)},refreshGrid:function(){window.clearTimeout(this.refreshGridTimeout),this.refreshGridTimeout=window.setTimeout(this._refreshGrid.bind(this),50)},callRenderGridForInfiniteScroll:function(){this.gridFooter.remove();var e=this.gridElement.find("> tr.app-datagrid-row.always-new-row");e.length&&e.remove(),this._renderGrid(void 0)},refreshGridData:function(){this._prepareData(),this.options.isNavTypeScrollOrOndemand()?this.callRenderGridForInfiniteScroll():(this.gridFooter.remove(),this._renderGrid()),this._reselectColumns(),this.addOrRemoveScroll(),this._setGridEditMode(!1),this.toggleNewRowActions(!1)},setDefaultRowData:function(e){_.forEach(this.preparedHeaderData,(function(t){e[t.field]=t.defaultvalue}))},addNewRow:function(e,t){var n,r,i,o=this.gridElement.find("> tr.app-datagrid-row:visible").length||99999,s=this,a={};if(!t&&_.isFunction(this.options.beforeRowInsert)&&this.options.beforeRowInsert(),(i=(r=this.gridElement).find("> tr.app-datagrid-row.always-new-row")).length){if(this.setFocusOnElement(void 0,i),this.options.editmode===this.CONSTANTS.QUICK_EDIT){var l=i.find("input").length>0?$(i.find("input")[0]):null;if(null!==l){var u=$.Event("keydown");u.which=13,l.trigger(u)}}}else a.$index=o,a.$$pk=o,this.options.editmode!==this.CONSTANTS.FORM&&this.options.editmode!==this.CONSTANTS.DIALOG&&(n=$(this._getRowTemplate(a,a.$index)),this.preparedData.length||this.setStatus("ready",this.dataStatus.ready),"top"===this.options.formPosition?r.prepend(n):r.append(n),this._appendRowActions(n,!0,a),this.attachEventHandlers(n),(t||this.options.editmode!==this.CONSTANTS.QUICK_EDIT)&&(n.find(".delete-row-button").hide(),t&&n.find(".edit-row-button").hide()),this._findAndReplaceCompiledTemplates(),t?(this.setDefaultRowData(a),n.addClass("always-new-row").addClass("row-editing"),this.options.runInNgZone((function(){s.makeRowEditable(n,a,!0)}))):n.trigger("click",[void 0,{action:"edit",operation:"new",skipFocus:e}]),this.updateSelectAllCheckboxState(),this.addOrRemoveScroll(),this.options.timeoutCall((function(){s.setColGroupWidths()}),100))},addLoadMoreBtn:function(e,t,n,r){var i;if(!this.options.isLastPage||r){var o=this,s=$('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>');(i=s.find("a")).append(e),this.element.find(".app-grid-header-inner").append(s),r&&this.element.find(".on-demand-load-btn").length&&this.element.find(".on-demand-load-btn").text(this.options.viewlessmessage),i.on("click",(function(e){var s=o.options.getCurrentPage()==o.options.getPageCount();s||o.showLoadingIndicator(t,!1),o.options.showviewlessbutton||i.hide(),r&&s&&o.element.find(".on-demand-datagrid").remove(),s&&o.options.showviewlessbutton&&(i.hide(),o.renderTableOnViewLess=!0,o.renderPaginationOnViewLess=!0,o.options.enableNavigation(),o._renderGrid()),n&&"function"==typeof n&&n(e)}))}},showLoadingIndicator:function(e,t){var n=this.element.find(".loading-data-msg"),r=this.element.find(".on-demand-datagrid");if(n.length&&!t)n.show();else if(t&&r.length)r.show();else{var i=$('<div class="loading-data-msg spin-icon-in-center"><span><i class="app-icon panel-icon fa-spin '+this.options.loadingicon+'"></i><span class="sr-only">Loading</span><span class="loading-text"></span></span></div>');if(i.find(".loading-text").html(e),r.length)r.append(i);else{var o=$('<div class="on-demand-datagrid">'+i[0].outerHTML+"</div>");this.element.find(".app-grid-header-inner").append(o)}}},hideLoadingIndicator:function(e,t){e||t?this.options.getCurrentPage()==this.options.getPageCount()&&this.options.showviewlessbutton?(this.element.find(".on-demand-load-btn").show().text(this.options.viewlessmessage),this.element.find(".loading-data-msg").hide(),t&&(this.element.find(".on-demand-load-btn").length||this.options.addLoadMoreBtn(),this.element.find(".loading-data-msg").hide())):this.element.find(".on-demand-datagrid").hide():(this.element.find(".loading-data-msg").hide(),this.element.find(".on-demand-load-btn").text(this.options.ondemandmessage),this.element.find(".on-demand-load-btn").show())},getSelectedRows:function(){this.getSelectedColumns();var e=[],t=this;return this.preparedData.forEach((function(n,r){n._selected&&e.push(t.options.data[r])})),e},selectRows:function(e){var t=this;t.gridElement.find("tr.app-datagrid-row").each((function(e){t.preparedData[e]&&!0===t.preparedData[e]._selected&&$(this).trigger("click",[$(this),{skipSingleCheck:!0}])})),_.isArray(e)?_.forEach(e,(function(e){t.selectRow(e,!0)})):t.selectRow(e,!0)},toggleRowFilter:function(e){this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this.gridSearch&&(e?this.gridSearch.show():this.gridSearch.hide())},setColGroupWidths:function(){var e=this,t=(this.options.isMobile,this.tableContainer.find("col")),n=this.tableContainer.find("col"),r=this.options.showHeader?this.gridContainer.find("th.app-datagrid-header-cell"):this.gridElement.find("tr.app-datagrid-row").first().find("td"),i=this.preparedHeaderData.length,o=this.gridElement.parent().prop("scrollLeft");if(t.length||r.length){this._setColSpan(this.options.headerConfig),this.toggleRowFilter();var s=0,a=t.length;t.each((function(){var e=$(this).width();e&&(s+=e,a-=1)})),r.each((function(){var r,i,o=Number($(this).attr("data-col-id")),s=e.preparedHeaderData[o],a=e.gridContainer.find('th[data-col-id="'+o+'"]'),l=e.gridElement.find('td.app-datagrid-cell[data-col-id="'+o+'"]'),u=e.tableContainer.find('tfoot tr.app-datagrid-row td.app-datagrid-cell[data-col-id="'+o+'"]'),c=$(t[o]),d=$(n[o]);s&&(r=s.width,_.isUndefined(s.show)||s.show?(a.show(),l.show(),c.show(),d.show(),u.show()):(a.hide(),l.hide(),c.hide(),d.hide(),u.hide()),c.length&&"90px"===c[0].style.width&&(i=_.isUndefined(r)?"":r,c.css("width",i),d.css("width",i)))})),r.each((function(){var r,o,l,u,c=$(this),d=Number(c.attr("data-col-id")),h=e.preparedHeaderData[d];if(h){if(r=h.width,_.isUndefined(h.show)||h.show)if(c.hasClass("grid-col-small"))o=50;else if(_.isUndefined(r)||""===r||_.includes(r,"%")){if((u=$(t[d])).length)if(""===(l=u[0].style.width)||"0px"===l||"90px"===l||_.includes(l,"%"))if((o=c.width())<=0){for(var p=c,f=o,m=0;f<=0;)f=(p=p.parent()).width(),p.find("table").length&&(m=m+parseFloat(p.css("padding-left"))+parseFloat(p.css("padding-right")));if(f>0)if(m&&(f-=m),_.includes(l,"%"))o=f*(parseInt(l)/100);else o=(o=(s&&s>0?f-s:f)/(a||t.length))>90?i===d+1?o-17:o:90;else o=o>90?i===d+1?o-17:o:90}else o=o>90?i===d+1?o-17:o:90;else o=l}else o=r;else o=0;$(t[d]).css("width",o),$(n[d]).css("width",o)}})),this.toggleRowFilter(!0),this.gridElement.parent().prop("scrollLeft",o),this.gridHeaderElement.parent().prop("scrollLeft",o)}},getSelectedColumns:function(){var e,t,n,r={},i=[],o=this;return $.extend(i,this.preparedHeaderData),this.options.multiselect?(i.some((function(t,n){if("checkbox"===t.field)return e=n,!0})),i.splice(e,1)):this.options.showRadioColumn&&(i.some((function(e,n){if("radio"===e.field)return t=n,!0})),i.splice(t,1)),this.options.showRowIndex&&(i.some((function(e,t){if("rowIndex"===e.field)return n=t,!0})),i.splice(n,1)),i.forEach((function(e){var t=e.field;e.selected&&(r[t]={colDef:e,colData:o.options.data.map((function(e){return e[t]}))})})),r},_setOption:function(e,t){switch(this._super(e,t),e){case"showHeader":this._toggleHeader(),this._toggleSearch(),this.setColGroupWidths(),this.addOrRemoveScroll();break;case"filtermode":this._toggleSearch();break;case"searchLabel":this.gridSearch&&(this.gridSearch.find('[data-element="dgSearchText"]').attr("placeholder",t),this.gridSearch.find('[data-element="dgSearchButton"]').attr("title",t));break;case"selectFirstRow":this.selectFirstRow(t);break;case"data":this.isResetSortIconsDone||this.setSortIconDefault(),this.refreshGridData();break;case"dataStates":"nodata"===this.dataStatus.state?this.setStatus("nodata",this.dataStatus.nodata):"loading"===this.dataStatus.state&&this.setStatus("loading");break;case"loadingicon":this.dataStatusContainer.find("i").removeClass().addClass(this.options.loadingicon);break;case"colDefs":if(this.options.isNavTypeScrollOrOndemand()&&this.options.isNextPageData){this.tableContainer.find("colgroup").remove(),this._prepareHeaderData(),this.setColGroupWidths(),this._renderHeader(),this._renderSearch(),this.attachEventHandlers(this.gridElement),this._reselectColumns(),this.addOrRemoveScroll();break}case"multiselect":case"showRadioColumn":case"rowActions":case"filterNullRecords":case"showRowIndex":this.refreshGrid();break;case"cssClassNames":var n=this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid;this.options.rowExpansionEnabled&&(n=n+" "+this.options.cssClassNames.gridRowExpansionClass),this.tableContainer.attr("class",n),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed");break;case"spacing":this._toggleSpacingClasses(t);break;case"messages":this.gridSearch&&this.gridSearch.find("option.placeholder").text(t&&t.selectField)}},getOptions:function(){return this.options},_toggleHeader:function(){this.gridHeaderElement&&this.gridHeaderElement.empty(),this.tableContainer&&(this.tableContainer.find("colgroup").remove(),this.tableContainer.find("thead").remove()),this.setDefaultColsData(),this.options.showHeader&&this._renderHeader()},_toggleSearch:function(){this.gridSearch&&this.gridSearch.remove(),this.options.filtermode===this.CONSTANTS.SEARCH?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&(this._renderRowFilter(),this.setColGroupWidths())},selectFirstRow:function(e,t){var n,r;t&&this.gridElement.find("tr").is(":visible")?(this.__setStatus(),n=this.gridElement.find("tr.app-datagrid-row:visible:not(.always-new-row)").first()):n=this.gridElement.find("tr.app-datagrid-row:not(.always-new-row)").first(),r=n.attr("data-row-id"),n.length&&this.preparedData.length&&(this.preparedData[r]._selected=!e,n[0].click())},selectRow:function(e,t){var n,r,i=_.isNumber(e)?e:this.Utils.getObjectIndex(this.options.data,e);-1!==i&&(n="tr.app-datagrid-row[data-row-id="+i+"]",(r=this.gridElement.find(n)).length&&(this.preparedData[i]._selected=!t),t?r.trigger("click"):(this.toggleRowSelection(r,t),this.options.callOnRowDeselectEvent(this.preparedData[i])))},deselectRow:function(e){this.selectRow(e,!1)},toggleRowSelection:function(e,t,n,r){if(e.length){var i=e.attr("data-row-id");this.preparedData[i]&&(this.preparedData[i]._selected=t,t?e.addClass("active"):e.removeClass("active"),this.options.showRadioColumn&&(e.find("td input[rowSelectInput]:radio:not(:disabled)").prop("checked",t),this.preparedData[i]._checked=t),this.options.multiselect?(e.find('td input[name="gridMultiSelect"]:checkbox:not(:disabled)').prop("checked",t),this.preparedData[i]._checked=t,r||this.updateSelectAllCheckboxState()):this._deselectPreviousSelection(e,n))}},updateSelectAllCheckboxState:function(){if(this.options.showHeader&&this.options.multiselect){this.__setStatus();var e=this.gridHeaderElement.find("th.app-datagrid-header-cell input:checkbox"),t=this.gridElement,n=t.find('tr.app-datagrid-row:visible input[name="gridMultiSelect"]:checkbox:checked').length,r=t.find("tr.app-datagrid-row:visible").length;r&&n===r?e.prop("checked",!0):e.prop("checked",!1)}},rowClickHandlerOnCapture:function(e,t,n){if(!this.getColInfo(e)||"checkbox"==e.target.type){t=t||$(e.target).closest("tr.app-datagrid-row");var r=this.gridElement.find(t);if(r.length&&r.closest("tbody").attr("id")===this.gridElement.attr("id")){var i=t.attr("data-row-id"),o=this.preparedData[i],s=this.options.data[i];this.options.assignSelectedItems(s,e,{rowId:i,_selected:o?._selected})}}},rowSelectionHandler:function(e,t,n){if(!this.getColInfo(e)||"checkbox"==e.target.type){var r,i,o,s,a=this,l=(n=n||{}).action,u=$(e.target),c=this.options.editmode===this.CONSTANTS.QUICK_EDIT;t=t||u.closest("tr.app-datagrid-row"),(l||c&&(u.hasClass("app-datagrid-cell")||u.closest("td.app-datagrid-cell").length)&&!t.hasClass("always-new-row"))&&(n.action=n.action||"edit",("new"===n.operation||a.options.actionsEnabled.edit)&&a.toggleEditRow(e,n),n.skipSelect)||(r=t.attr("data-row-id"),i=this.preparedData[r],o=this.options.data[r],s=i&&i._selected||!1,n.skipSingleCheck||(!t.hasClass("active")||this.options.multiselect)&&i?(this.options.callOnRowClickEvent(o,e),s=!s,this.toggleRowSelection(t,s,e),d()):c||"new"===n.operation||d())}function d(){s&&_.isFunction(a.options.onRowSelect)&&a.options.onRowSelect(o,e),!s&&_.isFunction(a.options.onRowDeselect)&&a.options.onRowDeselect(o,e)}},rowDblClickHandler:function(e,t){e.stopPropagation();var n,r=(t=t||$(e.target).closest("tr.app-datagrid-row")).attr("data-row-id");(n=this.preparedData[r])&&_.isFunction(this.options.onRowDblClick)&&this.options.onRowDblClick(n,e)},closePopover:function(){this.options.closePopover(this.element)},headerClickHandler:function(e){var t=$(e.target).closest("th.app-datagrid-header-cell").attr("data-col-id");this.closePopover(),this.options.onHeaderClick(this.preparedHeaderData[t],e)},columnSelectionHandler:function(e,t){e&&e.stopImmediatePropagation();var n=e?$(e.target).closest("th.app-datagrid-header-cell"):t,r=n.attr("data-col-id"),i=this.preparedHeaderData[r],o=i.field,s='td[data-col-id="'+r+'"]',a=this.gridElement.find(s),l=a.data("selected")||!1,u={colDef:i,data:this.options.data.map((function(e){return e[o]})),sortDirection:this._getColumnSortDirection(i.field)},c=this.options.cssClassNames.selectedColumn;l=!l,i.selected=l,a.data("selected",l),l?(a.addClass(c),n.addClass(c),_.isFunction(this.options.onColumnSelect)&&e&&this.options.onColumnSelect(u,e)):(a.removeClass(c),n.removeClass(c),_.isFunction(this.options.onColumnDeselect)&&e&&this.options.onColumnDeselect(u,e))},getTextValue:function(e,t){return this.options.getFieldValue(t?e+"_new":e)},getUploadedFiles:function(e,t){return _.get(document.forms,[e.find("form").attr("name"),t,"files",0])},isDataModified:function(e,t,n){var r=!1,i=this;function o(e){return e?moment(e).valueOf():e}return e.each((function(){var e=$(this),s=e.attr("data-col-id"),a=i.preparedHeaderData[s],l=i.getTextValue(a.field,n),u=_.get(t,a.field);if(r="upload"===a.editWidgetType?i.getUploadedFiles(e,a.field)instanceof File:!(!i.Utils.isDefined(l)&&null==u)&&("datetime"===a.editWidgetType?!(o(u)===o(l)):!(u==l)))return!r})),r},focusActiveRow:function(){this.gridElement.find("tr.app-datagrid-row.active").focus()},focusNewRow:function(){var e=this.gridElement.find("tr.always-new-row"),t=e&&e.find("input")||[];t.length&&t[0].focus()},disableActions:function(e){var t=this.gridElement.find(".delete-row-button"),n=this.gridElement.find(".edit-row-button");e?(n.addClass("disabled-action"),t.addClass("disabled-action")):(n.removeClass("disabled-action"),t.removeClass("disabled-action"))},setFocusOnElement:function(e,t,n){var r,i,o=e&&$(e.target);o&&o.hasClass("app-datagrid-cell")?r=o.find("input"):(t?t.hasClass("app-datagrid-row")&&(t=t.find("td.cell-editing")):t=o.closest("tr.app-datagrid-row").find("td.cell-editing"),(r=$(t).first().find("input")).length||(r=$(t).first().find("textarea")),r.length||(r=$(t).first().find("select"))),r.length&&(i=r.first(),n?(i.focus(),i.select()):this.options.timeoutCall((function(){i.focus(),i.select()})))},removeNewRow:function(e){this.disableActions(!1),this._setGridEditMode(!1),e.hasClass("always-new-row")||(e.attr("data-removed",!0),e.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),this.addOrRemoveScroll(),this.toggleNewRowActions(!1))},saveRow:function(e){this.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").each((function(){$(this).trigger("click",[void 0,{action:"save",skipSelect:!0,noMsg:!0,success:e}])}))},makeRowEditable:function(e,t,n){var r,i=this,o=e.find("td.app-datagrid-cell"),s=parseInt(e.attr("data-row-id"),10),a=_.clone(t);a.$index=s+1,this.options.removeValidations(n),this.options.generateInlineEditRow(a,n),o.each((function(){var e,r,o=$(this),a=o.text(),l=o.attr("data-col-id"),u=i.preparedHeaderData[l];u.readonly||(e=_.get(t,u.field),r=i.options.getInlineEditWidget(u.field,e,n),u.customExpression||u.formatpattern&&"None"!==u.formatpattern?(o.addClass("cell-editing editable-expression").data("originalValue",{rowIndex:s,fieldName:u.field}),o.addClass("cell-editing editable-expression").html(r).data("originalText",a)):o.addClass("cell-editing").html(r).data("originalText",a),o.addClass("form-group"),"rowOperations"!==u.binding?i.options.timeoutCall((function(){i.options.applyValidations(u,n),u.required&&o.addClass("required-field")})):u.required&&o.addClass("required-field"))})),(r=e.find("td.cell-editing")).on("click",(function(e){e.stopPropagation()})),r.on("keydown",(function(e){38!==e.which&&40!==e.which||!e.currentTarget||e.currentTarget.closest(".always-new-row")||e.stopPropagation()}))},toggleNewRowActions:function(e){var t=this,n=$(this.element).siblings("div.panel-footer, div.panel-heading").find("div.app-datagrid-actions"),r=this.gridElement.find("tr.app-datagrid-row.row-editing"),i=n.find("i.wi-plus").closest(".app-button");this.options.editmode!==this.CONSTANTS.INLINE||0!==this.options.rowActions.length&&_.some(this.options.rowActions,{action:"editRow($event)"})||(e?(n.append('<button type="button" wmbutton="" class="btn app-button btn-default cancelNewRow" tabindex="0" accesskey="" title="Cancel"><i aria-hidden="true" class="app-icon wi wi-cancel"></i><span class="sr-only">Cancel Icon</span><span class="btn-caption">Cancel</span></button><button type="button" wmbutton="" class="btn app-button btn-primary saveNewRow" tabindex="0" accesskey="" title="Save"><i aria-hidden="true" class="app-icon wi wi-done"></i><span class="sr-only">Save Icon</span><span class="btn-caption">Save</span></button>'),n.find(".cancelNewRow").on("click",(function(e){t.toggleEditRow(e,{action:"cancel",$row:r})})),n.find(".saveNewRow").on("click",(function(e){t.toggleEditRow(e,{action:"save",$row:r})})),i.hide()):($("typeahead-container").removeClass("open"),n.find(".cancelNewRow").remove(),n.find(".saveNewRow").remove(),i.show()))},_isNewRow:function(e){return parseInt(e.attr("data-row-id"),10)>=this.preparedData.length||e.hasClass("always-new-row")},toggleEditRow:function(e,t){t=t||{},e&&e.stopPropagation(),this.closePopover();var n,r,i,o,s=t.$row||$(e.target).closest("tr.app-datagrid-row"),a=s.find(".edit-row-button"),l=s.find(".cancel-edit-row-button"),u=s.find(".save-edit-row-button"),c=s.find(".delete-row-button"),d=_.cloneDeep(this.options.data[s.attr("data-row-id")])||{},h=this,p=s.hasClass("always-new-row"),f=h.options.editmode===h.CONSTANTS.QUICK_EDIT,m={};function g(e,n){_.isFunction(t.success)&&t.success(e,n),f&&!h.options.actionsEnabled.edit||h.focusActiveRow()}if(this.options.setActionRowIndex(s.attr("data-row-id")),this.options.setLastActionPerformed(this.options.ACTIONS.EDIT),"true"!==s.attr("data-removed")){if(t.selectRow&&this.selectRow(d,!0),(e=e||{}).data=e.data||{},"edit"===(n=e.data.action||t.action)){if(this.options.editmode===this.CONSTANTS.INLINE&&this.options.callLoadInlineWidgetData(),f&&h.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").length)return void h.saveRow((function(t,n){h.editSuccessHandler(t,n,e,s,!0)}));if(s.addClass("row-editing"),_.isFunction(this.options.beforeRowUpdate)&&this.options.beforeRowUpdate(d,e),h.options.editmode===h.CONSTANTS.FORM||h.options.editmode===h.CONSTANTS.DIALOG)return;if("new"===t.operation&&(h.setDefaultRowData(d),h.toggleNewRowActions(!0)),_.isFunction(this.options.onBeforeFormRender)&&!1===this.options.onBeforeFormRender(d,e,t.operation||n))return;this._setGridEditMode(!0),this.disableActions(!0),c.removeClass("disabled-action"),this.options.runInNgZone((function(){h.makeRowEditable(s,d)})),a.addClass("hidden"),l.removeClass("hidden"),u.removeClass("hidden"),i=s.find("td.cell-editing"),!t.skipFocus&&i&&this.options.timeoutCall((function(){h.setFocusOnElement(e,i)})),_.isFunction(this.options.onFormRender)&&this.options.onFormRender(s,e,t.operation||n,s.hasClass("always-new-row"))}else if(i=s.find("td.cell-editing"),r=h._isNewRow(s),"save"===n)if(!!r||this.isDataModified(i,d,p)){if(i.each((function(){var e,t=$(this),n=t.attr("data-col-id"),i=h.preparedHeaderData[n],o=_.split(i.field,".");e=h.getTextValue(i.field,p),1===o.length&&"upload"===i.editWidgetType?_.set(d,i.field,h.getUploadedFiles(t,i.field)):(e=1!==o.length&&!r||""!==e?e:void 0,h.Utils.isDefined(e)?null===(e="null"===e?null:e)?o.length>1?_.set(d,o[0],e):r||_.set(d,i.field,""):_.set(d,i.field,e):1!==o.length||r||_.set(d,i.field,e))})),i.find(".ng-pending").length>0)return void setTimeout(this.toggleEditRow.bind(this,e,t),200);if((o=i.find(".ng-invalid")).length>0)return o.each((function(e){var t=$(this).closest("td.app-datagrid-cell");0===e&&t.find("[focus-target]").focus(),h.options.setTouched(t.find("[formcontrolname]").attr("formcontrolname"))})),void(_.isFunction(t.success)&&t.success(!1,!0));if(r&&f&&_.isEmpty(d))return h.removeNewRow(s),void(_.isFunction(t.success)&&t.success(!1,void 0,!0));if(r){if(_.isFunction(this.options.onBeforeRowInsert)&&!1===this.options.onBeforeRowInsert(d,e,m))return;this.options.onRowInsert(d,e,g,m),h.toggleNewRowActions(!1),!s.hasClass("always-new-row")&&h.options.isNavTypeScrollOrOndemand()&&h.removeNewRow(s)}else{if(_.isFunction(this.options.onBeforeRowUpdate)&&!1===this.options.onBeforeRowUpdate(d,e,m))return;this.options.afterRowUpdate(d,e,g,m)}}else this.cancelEdit(s),t.noMsg||this.options.noChangesDetected(),_.isFunction(t.success)&&t.success(!1);else{if(r)return void h.removeNewRow(s);this.cancelEdit(s)}this.addOrRemoveScroll()}},cancelEdit:function(e){var t=this,n=e.find("td.cell-editing"),r=e.find(".cancel-edit-row-button"),i=e.find(".save-edit-row-button"),o=e.find(".edit-row-button");this.options.clearActionRowIndex(),this.disableActions(!1),e.removeClass("row-editing"),n.off("click"),n.each((function(){var e=$(this),n=e.data("originalValue");e.removeClass("datetime-wrapper cell-editing required-field form-group"),n?e.html(t.options.getCustomExpression(n.fieldName,n.rowIndex)):e.text(e.data("originalText")||"")})),$("typeahead-container").removeClass("open"),o.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this._setGridEditMode(!1)},closeEditedRow:function(){var e=this.gridElement.find("tr.app-datagrid-row.row-editing");e.length&&(this._isNewRow(e)?this.removeNewRow(e):this.cancelEdit(e))},hideRowEditMode:function(e){if(e.hasClass("always-new-row")&&this.options.isNavTypeScrollOrOndemand())this.resetNewRow(e);else{var t=e.find("td.cell-editing"),n=e.find(".edit-row-button"),r=e.find(".cancel-edit-row-button"),i=e.find(".save-edit-row-button"),o=this;e.removeClass("row-editing"),t.off("click"),this.disableActions(!1),this._setGridEditMode(!1),t.each((function(){var e,t,n=$(this),r=n.data("originalValue");n.removeClass("datetime-wrapper cell-editing required-field form-group"),r?n.html(o.options.getCustomExpression(r.fieldName,r.rowIndex)):(t=o.preparedHeaderData[n.attr("data-col-id")],e=o.getTextValue(t.field),n.text(o.Utils.isDefined(e)?e:""))})),n.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this.addOrRemoveScroll()}},deleteRow:function(e){e.stopPropagation();var t,n,r=$(e.target).closest("tr.app-datagrid-row"),i=r.attr("data-row-id"),o=this.options.data[i],s=this._isNewRow(r),a={},l=this;if(this.options.setActionRowIndex(i),this.options.setLastActionPerformed(this.options.ACTIONS.DELETE),_.isFunction(this.options.beforeRowDelete)&&this.options.beforeRowDelete(o,e),s)return this.disableActions(!1),this._setGridEditMode(!1),r.attr("data-removed",!0),r.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),void this.addOrRemoveScroll();_.isFunction(this.options.onBeforeRowDelete)&&!1===this.options.onBeforeRowDelete(o,e,a)||_.isFunction(this.options.onRowDelete)&&(t=this.options.cssClassNames.deleteRow,(n=-1!==r.attr("class").indexOf("active"))&&r.removeClass("active"),r.addClass(t),this.options.onRowDelete(o,(function(){n&&r.addClass("active"),r.removeClass(t),l.addOrRemoveScroll()}),e,(function(t,n){if(l.options.isNavTypeScrollOrOndemand()){var r=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),i=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+r+'"]');l.options.setDeletedRowIndex(r),l.preparedData.splice(r,1),l.options.data.splice(r,1),l.gridElement.find("tr.app-datagrid-row:gt("+r+")").each((function(e,t){i.is(":last-child")||$(t).hasClass("always-new-row")||($(t).attr("data-row-id",r),l.preparedData[r].$$pk--,l.preparedData[r].$$index--,l.preparedData[r].$index--,r++)})),i.remove()}var o,s;l.options.editmode===l.CONSTANTS.QUICK_EDIT&&($(e.target).hasClass("delete-row-button")||l.Utils.isDeleteKey(e))&&(l.__setStatus(),n||(o=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),(s=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+o+'"]')).length||(s=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+(o-1)+'"]')),s.trigger("click",[void 0,{action:"edit",skipFocus:t}])))}),a))},deleteRowAndUpdateSelectAll:function(e){this.deleteRow(e),this.updateSelectAllCheckboxState()},_deselectPreviousSelection:function(e,t){var n=this.gridElement.find("tr.app-datagrid-row.active"),r=e.attr("data-row-id"),i=this;n.each((function(){var e=$(this).attr("data-row-id"),n=i.preparedData[e];e!==r&&n&&($(this).find("input[rowSelectInput]:radio").prop("checked",!1),n._selected=n._checked=!1,$(this).removeClass("active"),i.options.callOnRowDeselectEvent(n,t))}))},resetSortIcons:function(e){var t;this.isResetSortIconsDone=!0,!e&&this.gridHeaderElement&&(e=(t=this.gridHeaderElement.find(".sort-buttons-container.active")).find("i.sort-icon"),t.removeClass("active")),e.removeClass("desc asc").removeClass(this.options.cssClassNames.descIcon).removeClass(this.options.cssClassNames.ascIcon)},setSortIconDefault:function(){const e=this.options.sortInfo,t=this.tableContainer.find("[data-col-field='"+e.field+"']").find(".sort-buttons-container"),n=t.find("i.sort-icon"),r=e.direction;"asc"===r?(n.addClass(r+" "+this.options.cssClassNames.ascIcon),t.addClass("active")):"desc"===r&&(n.addClass(r+" "+this.options.cssClassNames.descIcon),t.addClass("active"))},sortHandler:function(e){e.stopImmediatePropagation(),$(e.target).hasClass("header-data")&&this.options.enableColumnSelection&&this.headerClickHandler(e);var t,n,r,i=$(e.target).closest("th.app-datagrid-header-cell"),o=i.attr("data-col-id"),s=i.find(".sort-buttons-container"),a=s.find("i.sort-icon"),l=a.hasClass("asc")?"desc":"asc",u=this.options.sortInfo,c=this.gridHeaderElement.find(".sort-buttons-container.active"),d=i.attr("data-col-field");this.resetSortIcons(a),a.addClass(l),"asc"===l?(a.addClass(this.options.cssClassNames.ascIcon),s.addClass("active")):"desc"===l&&(a.addClass(this.options.cssClassNames.descIcon),s.addClass("active")),c.length&&(n=c.closest("th.app-datagrid-header-cell").attr("data-col-id"),r=this.preparedHeaderData[n],t=c.find("i.sort-icon"),r.field!==d&&(c.removeClass("active"),this.resetSortIcons(t)),r.sortInfo={sorted:!1,direction:""}),u.direction=l,u.field=d,""!==l&&(this.preparedHeaderData[o].sortInfo={sorted:!0,direction:l}),this._setGridEditMode(!1),this.closeEditedRow(),this.options.sortHandler.call(this,this.options.sortInfo,e,"sort")},processUpDownKeys:function(e,t,n){var r=this,i=t.find("input").val();t.hasClass("row-editing")&&r.options.editmode===r.CONSTANTS.QUICK_EDIT&&i?r.toggleEditRow(e,{action:"save",noMsg:!0,success:function(i,o){r.editSuccessHandler(i,o,e,t,!0,n)}}):(t="down"===n?t.next():t.prev(),this.options.rowExpansionEnabled&&!t.is(":visible")&&(t="down"===n?t.next():t.prev()),t.focus())},resetNewRow:function(e){var t={},n=this;this.options.clearForm(!0),n.setDefaultRowData(t),e.find("[data-field-name]").each((function(){var e=$(this),r=e.attr("data-field-name")+"_new";n.options.setFieldValue(r,t[e.attr("data-field-name")]||"")})),n.options.safeApply(),n.setFocusOnElement(void 0,e,!0)},_onEnter:function(e,t,n,r){var i=this;e.is("button")||(n&&e.hasClass("app-datagrid-row")&&!e.hasClass("row-editing")?t.trigger("click",[void 0,{action:"edit"}]):t.hasClass("row-editing")&&e.closest("[data-field-name]").length?(e.blur(),i.toggleEditRow(r,{action:"save",success:function(t,n){n?e.focus():(i.focusActiveRow(),i.focusNewRow())}})):(t.trigger("click"),n&&e.hasClass("always-new-row")&&e.hasClass("row-editing")&&i.focusNewRow()),e.is("button")||r.stopPropagation())},onKeyDown:function(e){var t,n=$(e.target),r=n.closest("tr.app-datagrid-row"),i=this.options.editmode===this.CONSTANTS.QUICK_EDIT;if(this.options.rowExpansionEnabled&&!r.length&&(r=n.closest("tr.app-datagrid-detail-row")),!this.Utils.isDeleteKey(e))return 27===e.which?((t=this._isNewRow(r))&&r.hasClass("always-new-row")?(n.blur(),this.resetNewRow(r)):r.trigger("click",[void 0,{action:"cancel"}]),void(t||r.focus())):13===e.which?(e.stopPropagation(),void this._debounceOnEnter(n,r,i,e)):void(38!==e.which?40===e.which&&this.processUpDownKeys(e,r,"down"):this.processUpDownKeys(e,r,"up"));!this.options.actionsEnabled.delete||n.is("input")||n.hasClass("form-control")||this.deleteRow(e)},editSuccessHandler:function(e,t,n,r,i,o){var s,a,l=this;if(l.__setStatus(),t)l.setFocusOnElement(n);else{if(s=+r.attr("data-row-id"),o)return s="down"===o?++s:--s,void((a=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+s+'"]')).length?a.focus():r.focus());i||_.isUndefined(i)||s++,(a=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+s+'"]')).hasClass("always-new-row")?("top"!==l.options.formPosition||r.hasClass("always-new-row"))&&l.addNewRow(e):a.length?a.trigger("click",[void 0,{action:"edit",skipFocus:e,skipSelect:l.options.multiselect}]):l.options.actionsEnabled.new&&l.addNewRow(e)}},isLastColumn:function(e){var t,n=e.closest("td.app-datagrid-cell");return!!n.is(":last-child")||!!n.hasClass("cell-editing")&&(t=n.closest("tr.app-datagrid-row").find(".cell-editing").has('> :not([disabled="disabled"])'),n.attr("data-col-id")===t.last().attr("data-col-id"))},getColInfo:function(e){var t=$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),n=$(e.target).closest("td.app-datagrid-cell").attr("data-col-id");return!!(this.columnClickInfo&&this.columnClickInfo[t]&&this.columnClickInfo[t][n])&&this.columnClickInfo[t][n]},attachEventHandlers:function(e){var t=this.gridHeaderElement,n=this;this.options.enableRowSelection&&(e[0].removeEventListener("click",this.rowClickHandlerOnCapture.bind(this)),e.off(),e[0].addEventListener("click",this.rowClickHandlerOnCapture.bind(this)),e.on("click",this.rowSelectionHandler.bind(this)),e.on("click","td *",(function(e){if("checkbox"!=e.target.type){var t=$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),r=$(e.target).closest("td.app-datagrid-cell").attr("data-col-id"),i=Number(r);n.preparedHeaderData[i].readonly&&(n.columnClickInfo[t]={},n.columnClickInfo[t][r]=!0)}})),e.on("dblclick",this.rowDblClickHandler.bind(this)),e.on("keydown",this.onKeyDown.bind(this))),t&&(this.options.enableColumnSelection?(t.find("th[data-col-selectable]").off("click",this.columnSelectionHandler.bind(this)),t.find("th[data-col-selectable]").on("click",this.columnSelectionHandler.bind(this))):t.find("th[data-col-selectable]").off("click"),this.options.enableSort?this.options.enableColumnSelection?(t.find("th[data-col-sortable] .header-data").off("click",this.sortHandler.bind(this)),t.find("th[data-col-sortable] .header-data").on("click",this.sortHandler.bind(this))):(t.find("th[data-col-sortable]").off("click",this.sortHandler.bind(this)),t.find("th[data-col-sortable]").on("click",this.sortHandler.bind(this))):this.options.enableColumnSelection?t.find("th[data-col-sortable] .header-data").off("click"):t.find("th[data-col-sortable]").off("click")),this.options.rowActions.length&&(e.find(".cancel-edit-row-button").off("click"),e.find(".save-edit-row-button").off("click"),e.find(".cancel-edit-row-button").on("click",{action:"cancel"},this.toggleEditRow.bind(this)),e.find(".save-edit-row-button").on("click",{action:"save"},this.toggleEditRow.bind(this))),n.options.editmode===n.CONSTANTS.QUICK_EDIT&&e.on("focusout","tr.app-datagrid-row",(function(e){var t=$(e.target),r=t.closest("tr.app-datagrid-row"),i=$(e.relatedTarget),o=n.isLastColumn(t,i),s=t.closest("span.actions-column").length>0,a=i.closest("span.actions-column").length>0,l=i.closest("div.app-datagrid-actions").length>0,u=i.closest("div.app-datagrid-actions").length>0;i.is("tr.app-datagrid-row")&&i.attr("data-row-id")===r.attr("data-row-id")||a||r.hasClass("danger")||u||s&&a||s&&null===e.relatedTarget||!i.closest(".app-grid").length||i.is('.row-editing:not(".always-new-row"), .row-action-button, .app-datagrid-cell, .caption, button.btn-time, button.btn-date')||""===i.attr("focus-target")||(l||s||!(!o||o&&null===e.relatedTarget||t.hasClass("file-upload")))&&n.options.timeoutCall((function(){n.toggleEditRow(e,{action:"save",noMsg:!0,success:function(t,i,o){o||n.editSuccessHandler(t,i,e,r)}})}))})),e.find('[data-identifier="rowExpansionButtons"]').off("click"),e.find('[data-identifier="rowExpansionButtons"]').on("click",(function(e){var t=$(e.target).closest("tr.app-datagrid-row");$(this).find(".app-button").attr("disabled")||n.toggleExpandRow(+t.attr("data-row-id"),void 0,e)}))},expandRow:function(e){this.toggleExpandRow(e,!0)},collapseRow:function(e){this.toggleExpandRow(e,!1)},_collapseRow:function(e,t,n,r,i){var o=this.gridElement,s=$(o.find('> tr.app-datagrid-row[data-row-id="'+n+'"]'));s.removeClass(this.options.cssClassNames.expandedRowClass),s.find("button, a").attr("aria-expanded","false").attr("aria-live","polite"),!1!==this.options.onBeforeRowCollapse(e,t,n)&&(i.length&&i.hasClass(this.options.cssClassNames.rowExpandIcon)&&i.removeClass(this.options.cssClassNames.rowExpandIcon).addClass(this.options.cssClassNames.rowCollapseIcon),r.hide(),this.options.onRowCollapse(e,t))},toggleExpandRow:function(e,t,n){var r=this,i=r.gridElement,o=$(i.find('> tr.app-datagrid-row[data-row-id="'+e+'"]')),s=_.clone(r.options.data[e]),a=o.next("tr.app-datagrid-detail-row"),l=!a.is(":visible"),u=o.find('[data-identifier="rowExpansionButtons"] i.app-icon');s.$index=e+1,t&&!l||!1===t&&l||(l?(o.addClass(r.options.cssClassNames.expandedRowClass),o.find("button, a").attr("aria-expanded","true"),n&&r.preparedData[e]._selected&&n.stopPropagation(),r.options.rowDef.closeothers&&i.find("> tr.app-datagrid-detail-row:visible").each((function(){var e=$(this),t=e.prev("tr.app-datagrid-row").find('[data-identifier="rowExpansionButtons"] i.app-icon'),i=+e.attr("data-row-id"),o=r.options.data[i];e.hide(),r._collapseRow(n,o,i,e,t)})),r.options.generateRowDetailView(n,s,e,a.find("td.app-datagrid-row-details-cell .details-section"),a.find("td.app-datagrid-row-details-cell .row-overlay"),(function(){u.length&&u.hasClass(r.options.cssClassNames.rowCollapseIcon)&&u.removeClass(r.options.cssClassNames.rowCollapseIcon).addClass(r.options.cssClassNames.rowExpandIcon),a.show()}))):r._collapseRow(n,s,e,a,u))},_findAndReplaceCompiledTemplates:function(){if(this.gridElement){var e=this.gridElement.find("td[data-compiled-template]"),t=this;e.each((function(){var e=$(this),n=e.attr("data-compiled-template");e.replaceWith(t.compiledCellTemplates[n])}))}},_renderSearch:function(){var e,t=$(this._getSearchEl()),n=this;function r(e){e.stopPropagation();var r=t.find('[data-element="dgSearchText"]')[0].value,i=t.find('[data-element="dgFilterValue"]')[0].value,o=t.find("option:selected").attr("data-coldef-index"),s=n.options.colDefs[o],a=s&&s.type?s.type:"";n.searchObj={field:i,value:r,type:a,event:e},n.options.searchHandler.call(n,n.searchObj,e,"search")}this.element.find(".form-search").remove(),t.insertBefore(this.gridContainer),this.gridSearch=this.element.find(".form-search"),e=this.gridSearch.find('[data-element="dgSearchText"]'),this.gridSearch.find(".app-search-button").on("click",r),this.gridSearch.find('[data-element="dgFilterValue"]').on("change",(function(e){n.dataStatusContainer.find(".status").text()===n.options.dataStates.nodata&&r(e)})),e.on("keyup",(function(e){e.stopPropagation(),$(this).val()?n.emptySearch=!1:(n.emptySearch=!0,n.searchObj.value&&(n.searchObj.value="",r(e))),(13===e.which||n.options.filteronkeypress)&&r(e)}))},_renderRowFilter:function(){var e=$('<tr class="filter-row"></tr>'),t=this,n=this.options.isMobile&&!this.options.showHeader?this.gridElement:this.gridHeaderElement;n.find(".filter-row").remove(),this.options.generateFilterRow(),this.preparedHeaderData.forEach((function(n,r){var i=n.field,o=$('<th data-col-id="'+r+'"></th>');n.searchable?(o.append(t.options.getFilterWidget(i)),e.append(o)):e.append(o)}),this),this.options.showHeader?this.gridHeaderElement.append(e):(this.options.isMobile,n.empty().append(e)),this.gridSearch=n.find(".filter-row")},_renderHeader:function(){var e,t=this._getHeaderTemplate(),n=t.colgroup,r=this;if(this.gridElement.parent().scroll((function(){r.gridHeaderElement.parent().prop("scrollLeft",this.scrollLeft)})),!this.options.showHeader)return this.tableContainer.append(n),void this.gridHeaderElement.hide();this.gridHeaderElement.show();var i=(e=t.header).find("th.app-datagrid-header-cell"),o=n.find("col");i.each((function(){var e=Number($(this).attr("data-col-id")),t=r.preparedHeaderData[e],n=$(o[e]);t&&(_.isUndefined(t.show)||t.show||($(this).hide(),n.hide()))})),this.options.isMobile,this.tableContainer.append(n),e.on("click",".app-datagrid-header-cell input:checkbox",(function(e){var t=$('tr.app-datagrid-row:not(.always-new-row):visible td input[name="gridMultiSelect"]:checkbox',r.gridElement),n=this.checked;t.prop("checked",n),t.each((function(){var t=$(this).closest("tr.app-datagrid-row"),i=t.attr("data-row-id"),o=r.options.data[i];r.options.assignSelectedItems(o,e,{rowId:i,_selected:r.preparedData[i]?._selected}),r.toggleRowSelection(t,n,e,!0),n&&_.isFunction(r.options.onRowSelect)&&r.options.onRowSelect(o,e),!n&&_.isFunction(r.options.onRowDeselect)&&r.options.onRowDeselect(o,e)}))})),_.isFunction(this.options.onHeaderClick)&&this.gridHeaderElement.find("th.app-datagrid-header-cell").on("click",this.headerClickHandler.bind(this)),!this.options.isMobile&&this.gridHeaderElement.length&&this.gridHeaderElement.find("th[data-col-resizable]").resizable({handles:"e",minWidth:50,resize:function(e,t){var n,i,o,s,a=+t.helper.attr("data-col-id")+1,l=t.helper.width(),u=t.size.width;i=r.tableContainer.find("colgroup > col:nth-child("+a+")"),n=r.tableContainer.find("colgroup > col:nth-child("+a+")"),o=r.gridElement.find("tr.app-datagrid-row > td:nth-child("+a+") > div"),n.width(u),i.width(u),o.width(u),$(this).css("height","auto"),u>t.originalSize.width&&(s=r.gridHeaderElement.width()+u-l,r.gridHeaderElement.width(s),r.gridElement.width(s)),r.addOrRemoveScroll(),r.options.redrawWidgets()}}),this.isResetSortIconsDone||this.setSortIconDefault()},addOrRemoveScroll:function(){var e=this.gridContainer.find("tbody"),t=this.gridContainer.find(".table-header");e.scrollHeight>e.clientHeight&&!this.Utils.isMac()?t.addClass("scroll-visible"):t.removeClass("scroll-visible")},_handleCustomEvents:function(e,t){this.options.handleCustomEvents(e,t)},_setActionsEnabled:function(){var e=this;_.forEach(this.options.rowActions,(function(t){_.includes(t.action,"editRow(")?e.options.actionsEnabled.edit=!0:_.includes(t.action,"deleteRow(")&&(e.options.actionsEnabled.delete=!0)}))},_appendRowActions:function(e,t,n){var r,i=this._getRowActionsColumnDef();(this.options.rowActions.length||i)&&(this._setActionsEnabled(),r=this,e.find("[data-identifier='actionButtons']").each((function(e){var i,o,s,a=e;t?i=n:(o=$(this).closest("tr.app-datagrid-row"),s=parseInt(o.attr("data-row-id"),10),(i=_.clone(r.options.data[s])).$index=a+1),r.options.generateRowActions(i,a),$(this).empty().append(r.options.getRowAction(a))})))},_renderGrid:function(e){var t,n=this.options.isNavTypeScrollOrOndemand();this.getPageStartIndex();if($("table.table-bordered").parents(".app-grid-header-inner").addClass("table_border"),n){var r=this.gridElement,i=this._getGridTemplate();t=$(i),i&&!r.length&&this.gridElement.append(t)}else{var o=this._getGridTemplate();t=$(o),o&&this.gridElement.append(t)}if(this.options.summaryRow){var s=$(this._getSummaryRowTemplate());this.tableContainer.find("tfoot").remove(),this.options.data.length&&this.tableContainer.append(s)}this.options.data.length||"nodata"!==this.dataStatus.state?(this.dataStatus.state=this.dataStatus.state||"loading",this.dataStatus.message=this.dataStatus.message||this.options.dataStates.loading,this.setStatus(this.dataStatus.state,this.dataStatus.message,e)):this.setStatus("nodata"),this.gridBody=this.gridElement.find("tbody"),this.gridFooter=this.tableContainer.find("tfoot"),this._findAndReplaceCompiledTemplates(),this.options.clearRowActions(),this._appendRowExpansionButtons(t),this._appendRowActions(t),this.attachEventHandlers(t),this.__setStatus(e),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&this.options.showNewRow&&this.addNewRow(!1,!0),e&&this._setColSpan(this.options.headerConfig),_.isFunction(this.options.onDataRender)&&this.options.onDataRender(),!e&&this.options.selectFirstRow&&(this.options.multiselect&&(this.options.selectFirstRow=!1),this.gridElement.find("tr.app-datagrid-row.active").length<=0&&this.selectFirstRow(!0,!0))},_render:function(e){this.tableId||(this.tableId=this.Utils.generateGuid());!this.options.isNavTypeScrollOrOndemand()||"100%"!==this.options.height&&this.options.height;var t='<div class="overlay"><div class="status"><i class="'+this.options.loadingicon+'"></i><span class="message"></span></div></div>',n='<div class="table-container table-responsive"><div class="app-grid-header"><div class="app-grid-header-inner"><table tabindex="0" class="'+this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid+'"><thead tabindex="0" class="table-header thead-sticky" id="table_header_'+this.tableId+'"></thead><tbody class="app-grid-content app-datagrid-body" id="table_'+this.tableId+'"></tbody></table></div></div></div>',r=$(t),i=this.element.find(".table-container");this.gridContainer=$(n),this.gridHeaderElement=this.gridContainer.find(".table-header"),this._setStyles(r.find("div.overlay"),"display:none"),this._setStyles(this.gridContainer.find("div.app-grid-header-inner"),"height:"+this.options.height+"; overflow: auto;"),this.tableContainer=this.gridContainer.find("table"),this.gridElement=this.gridContainer.find(".app-grid-content"),(!this.options.isNavTypeScrollOrOndemand()||i.length&&this.options.isNextPageData)&&this.options.isNavTypeScrollOrOndemand()||(this.element.find(".table-container").remove(),this.element.append(this.gridContainer)),this.options.setIsNextPageData(!1),this.gridContainer.find(".overlay").length||(this.dataStatusContainer=$(t),this.gridContainer.append(this.dataStatusContainer)),this.gridHeaderElement&&(this.gridHeaderElement.empty(),this.gridElement.find("colgroup").remove()),this._renderHeader(),this.options.filtermode===this.CONSTANTS.SEARCH&&(_.isEmpty(this.searchObj)||this.searchObj&&!this.searchObj.field&&!this.searchObj.value)?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this._renderRowFilter(),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed"),this._renderGrid(e),this.addNavigationControls()},addNavigationControls:function(){this.options.isdynamictable&&(this.element.find(".on-demand-datagrid").remove(),"On-Demand"!==this.options.navigation||this.element.find(".on-demand-datagrid").length?"Scroll"===this.options.navigation&&this.options.bindScrollEvt():this.options.addLoadMoreBtn())},__setStatus:function(e){var t=this.dataStatusContainer.find("i"),n=this.dataStatus.state,r=this.options.isNavTypeScrollOrOndemand();this.dataStatusContainer.find(".message").text(this.dataStatus.message),"loading"===n?t.removeClass("hidden"):t.addClass("hidden"),"ready"===n?this.dataStatusContainer.hide():(this.options.isNavTypeScrollOrOndemand()&&("nodata"===n||this.options.getCurrentPage()==this.options.getPageCount()&&!this.options.showviewlessbutton)&&this.element.find(".on-demand-datagrid a").hide(),this.dataStatusContainer.show()),"nodata"===n||"loading"===n||"error"===n?("100%"!==this.options.height&&"auto"!==this.options.height||("nodata"===n?(this.dataStatusContainer.css("height","auto"),this.dataStatus.contentHeight=0):this.options.isNavTypeScrollOrOndemand()&&this.options.getCurrentPage()>1?this.dataStatusContainer.hide():(this.dataStatus.height=this.dataStatus.height||this.dataStatusContainer.outerHeight(),this.dataStatus.contentHeight=this.gridElement.outerHeight()||this.dataStatus.contentHeight,this.dataStatusContainer.css("height",this.dataStatus.height>this.dataStatus.contentHeight?"auto":this.dataStatus.contentHeight))),(!r||r&&1===this.options.getCurrentPage())&&this.gridContainer.addClass("show-msg")):(this.gridContainer.removeClass("show-msg"),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&(this.options.activeRow&&this.attachHandlersToActiveRow(this.options.activeRow),this.options.activeRow=void 0)),e||this.setColGroupWidths(),this.addOrRemoveScroll()},attachHandlersToActiveRow(e){var t=this.Utils.getObjectIndex(this.options.data,e),n=this.gridElement.find("tr.app-datagrid-row[data-row-id="+t+"]");n.length&&(n.hasClass("active")||n.addClass("active"),this.focusActiveRow(),this.attachEventHandlers(n))},setActiveRow(e){this.options.activeRow=e},setStatus:function(e,t,n){var r;"nodata"===e&&(e=(r=this.gridElement&&this.gridElement.find("tr.app-datagrid-row.always-new-row"))&&r.length?"ready":e),this.dataStatus.state=e,this.options.setGridState(e),this.dataStatus.message=t||this.options.dataStates[e],this._setStatusCalled?this._setStatus(n):(this.__setStatus(n),this._setStatusCalled=!0)},setGridDimensions:function(e,t){if(-1===t.indexOf("px")&&-1===t.indexOf("%")&&-1===t.indexOf("em")&&"auto"!=t&&(t+="px"),this.options[e]=t,"height"===e){this.gridHeaderElement.find("th");this.gridContainer.find(".app-grid-header-inner").css(e,t),this.options.isNavTypeScrollOrOndemand()&&"100%"!=this.options.height&&"auto"!=this.options.height&&this.gridContainer.find(".app-grid-header-inner").css("overflow","auto"),this.dataStatusContainer.css(e,t)}this.addOrRemoveScroll()},setColumnProp:function(e,t,n,r){var i;"displayName"===t&&((i=r?this.gridHeaderElement.find('th[data-col-group="'+e+'"]'):this.gridHeaderElement.find('th[data-col-field="'+e+'"]')).attr("title",n),i.find(".header-data").html(n),this.options.filtermode===this.CONSTANTS.SEARCH&&this.gridSearch&&this.gridSearch.find('select option[value="'+e+'"]').text(n))},applyRowNgClass:function(e,t){var n=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+t+'"]');n.removeClass(e.toRemove),n.addClass(e.toAdd)},applyColNgClass:function(e,t,n){var r=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+t+'"] td.app-datagrid-cell[data-col-id="'+n+'"]');r.removeClass(e.toRemove),r.addClass(e.toAdd)},_destroy:function(){this.element.text(""),window.clearTimeout(this.refreshGridTimeout)}}),window.requestAnimationFrame=function(){"use strict";return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimaitonFrame||function(e){window.setTimeout(e,1e3/60)}}(),function(e){"use strict";var t,n,r={NONE:0,HORIZONTAL:1,LEFT_TO_RIGHT:2,RIGHT_TO_LEFT:3,VERTICAL:4,TOP_TO_DOWN:5,DOWN_TO_TOP:6},i=Math.abs,o=Math.max,s=["INPUT","SELECT","OPTION"],a=e("<div></div>");a.css({"background-color":"rgba(0, 0, 0, 0)",position:"fixed",top:0,width:"100vw",height:"100vh","z-index":1e5});var l=[],u=[],c=null,d=function(t){t&&(t.pointerId&&t.pointerId!==c||t.touches&&t.touches.length>1)&&h(t),e.each(l,(function(e,n){return n(t)}))},h=function(t){c=null,e.each(u,(function(e,n){return n(t)})),l.length=0,u.length=0};function p(e,t,n){(e.__zone_symbol__addEventListener||e.addEventListener).call(e,t,n,{passive:!0})}function f(t,n,r){var i=function(t){for(var r=n;r;)t.push({$ele:e(r),last:{scrollLeft:r.iscroll?r.iscroll.x:r.scrollLeft,scrollTop:r.iscroll?r.iscroll.y:r.scrollTop}}),r=r.parentElement;return t}([]);this.hasSrcolled=function(){return r===e.fn.swipey.DIRECTIONS.VERTICAL?(e.each(i,(function(){this.$ele[0].iscroll?isNaN(this.$ele[0].iscroll.y)||0===this.$ele[0].iscroll.y||(t=!0):0!==this.$ele[0].scrollTop&&(t=!0)})),t):r===e.fn.swipey.DIRECTIONS.HORIZONTAL?function(){var t;return e.each(i,(function(){this.$ele[0].iscroll?isNaN(this.$ele[0].iscroll.x)||0===this.$ele[0].iscroll.x||(t=!0):0!==this.$ele[0].scrollLeft&&(t=!0)})),t}():void 0;var t}}function m(e){return e.originalEvent&&"mouse"!==e.originalEvent.pointerType?e.originalEvent:e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches[0]||e&&e.touches&&e.touches[0]||e}function g(e,t,n){var s,a,l=0;return n===r.HORIZONTAL?l=t.x-e.x:n===r.LEFT_TO_RIGHT?l=o(t.x-e.x,0):n===r.RIGHT_TO_LEFT?l=o(e.x-t.x,0):n===r.VERTICAL?l=t.y-e.y:n===r.TOP_TO_DOWN?l=o(t.y-e.y,0):n===r.DOWN_TO_TOP?l=o(e.y-t.y,0):(s=t.x-e.x,a=t.y-e.y,l=o(i(s),i(a)),(s<0&&i(s)===l||a<0&&i(a)===l)&&(l=-l)),l}function v(e,r){var i=m(e);i&&r.data.path.push({x:i.pageX,y:i.pageY}),n.push((function(){t.onSwipeEnd(e,r.data),r.onSwipeEnd.call(r.target,e,r.data)})),n.process()}function y(r,o){var s,c,d,h=m(r),p=o.data.path[0],f={x:h.pageX,y:h.pageY};return d=g(p,f,o.direction),o.data.length=d<0?-1:1,o.lastDistance=o.data.length,o.data.path=[f],o.data.totalLength=i(o.data.length),o.data.startTime=Date.now(),!1!==o.onSwipeStart.call(o.target,r,o.data)&&(a.appendTo(e("body")),s=function(r){!function(r,o){var s,a,l=m(r),u=o.data.path[0],c={x:l.pageX,y:l.pageY},d=g(u,c,o.direction),h=[];if(o.renderInProgress=!1,d!==o.lastDistance){s=30*(d<o.lastDistance?-1:1),a=d-o.lastDistance;for(var p=s;s>0&&p<=a||s<0&&p>=a;p+=s)h.push(p+o.lastDistance);a%s!=0&&h.push(a%i(s)+(0===h.length?o.lastDistance:h[h.length-1])),o.lastDistance=d,e.each(h,(function(){var e=this;n.push((function(){o.data.length=e,o.data.totalLength+=i(e),o.data.velocity=i(o.data.totalLength/(Date.now()-o.data.startTime)),o.data.path.push(c),!1===o.onSwipe.call(o.target,r,o.data)&&v(r,o),t.onSwipe(r,o.data)}))})),n.process()}}(r,o)},c=function(e){a.remove(),v(e,o)},(l=[]).push(s),(u=[]).push(c),t.onSwipeStart(r,o.data),!0)}function b(e,t){var n=t.data.path[0],o={x:e.pageX,y:e.pageY},s=g(n,o,t.direction);return i(s)>t.threshold&&function(e,t,n){if(n===r.HORIZONTAL){if(Math.abs((t.y-e.y)/(t.x-e.x))<=.36397023426)return!0}else if(n===r.VERTICAL&&Math.abs((t.y-e.y)/(t.x-e.x))>=2.74747741945)return!0;return!1}(n,o,t.direction)}function w(e){var t=e.bindEvents,n="";_.includes(t,"touch")?n+="touchstart":_.includes(t,"mouse")?n+="mousedown":_.includes(t,"pointer")&&(n+="pointerdown"),n&&p(e.target[0],n,(function(t){if(!e.disableMouse||"mouse"!==t.pointerType){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(s.indexOf(t.target.tagName)<0))return;t.preventDefault()}var n=m(t);n&&function(e,t){var n;t.scrollObserver=new f(event.currentTarget,event.target,t.direction),n=function(e){if(b(m(e),t)&&(t.scrollObserver.hasSrcolled()||y(e,t)))return!1},l.push(n),t.data={path:[{x:e.pageX,y:e.pageY}]}}(n,e)}}))}window.PointerEvent&&function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return parseInt(e[1],10)}}()>=13?(p(document,"pointerdown",(function(e){c&&c!==e.pointerId?h(e):c=e.pointerId})),p(document,"pointermove",d),p(document,"pointerup",h),p(document,"pointercancel",h)):(p(document,"mousemove",d),p(document,"touchmove",d),p(document,"mouseup",h),p(document,"touchcancel",h),p(document,"touchend",h)),n=new function(){var e=[],t=!1;function n(){if(e.length>0){try{e.shift()()}catch(e){console.error("Function invocation failed",e)}window.requestAnimationFrame(n)}else t=!1}this.push=function(t){e.push(t)},this.process=function(){t||(t=!0,n())}},e.fn.swipey=function(t){return this.each((function(){w(e.extend({direction:r.NONE,target:e(this),bindEvents:["touch","mouse"],swipeTarget:document,threshold:30,onSwipeStart:e.noop,onSwipe:e.noop,onSwipeEnd:e.noop,disableMouse:!0},t))})),this},t={onSwipeStart:function(t,n){if(e.fn.swipey.trace){var r='<svg height="100vh" width="100vw" id ="canvas"> <path stroke="rgba(0, 0, 0, 0.5)" stroke-linecap="round" stroke-width="20" fill-opacity="0" stroke-opacity="0.8" d="M'+n.path[0].x+" "+n.path[0].y+' " /> </svg>';r.css({position:"fixed",top:0,left:0,width:"100vw",height:"100vh","z-index":1e4}),e("body").append(r),n.tracer={pathd:e("#canvas path")}}},onSwipe:function(e,t){if(t.tracer){var n=t.tracer.pathd.attr("d"),r=t.path[t.path.length-1];t.tracer.pathd.attr("d",n+" L"+r.x+" "+r.y+" ")}},onSwipeEnd:function(t,n){if(n.tracer){var r=n.path[0],i=[r,{y:r.y-50},{x:r.x+50},{y:r.y+50}],o=0;_.forEach(n.path,(function(e){var t;o!==i.length&&(!(t=i[o]).x||t.x<=e.x)&&(!t.y||t.y<=e.y)&&o++})),setTimeout((function(){e("body >#canvas").remove()}),500)}}},e.fn.swipey.DIRECTIONS=r}(jQuery),function(e){var t,n=/\$\{\{[a-zA-Z\+-/%\.\*\s\(\)\d,\\'"\$_]*\}\}/;function r(r){var i,o=[];if(t=t||(e.fn.swipeAnimation.expressionEvaluator?e.fn.swipeAnimation.expressionEvaluator:window.exprEval&&window.exprEval.Parser?function(e){var t=(new window.exprEval.Parser).parse(e);return function(e){return t.evaluate(e)}}:void 0),_.isFunction(r))return r;if(t){for(;null!==(i=n.exec(r));){var s=i[0],a=r.substring(0,i.index);r=r.substring(i.index+s.length),s=s.substring(3,s.length-2),o.push(a),o.push(t(s).bind({}))}return o.push(r),function(){var e=arguments;return _.map(o,(function(t){return _.isFunction(t)?t.apply(void 0,e):t})).join("")}}}function i(e,t,n){return _.isFunction(e)?e.apply(t,n):e}function o(e,t,n){var r=0,o=i(t.bounds,e,n);return _.isUndefined(o.center)||(r=o.center),_.isUndefined(o.lower)||(o.lower=o.lower+r),_.isUndefined(o.upper)||(o.upper=o.upper+r),o}function s(e){_.forEach(e.animation,(function(e){(_.isFunction(e.target)||e.targetFn)&&(e.targetFn=_.isUndefined(e.targetFn)?e.target:e.targetFn,e.target=e.targetFn())}))}function a(){this.setSettings=function(e,t){t.data("swipeAnimationDefaults",e)},this.getSettings=function(e){return e.data("swipeAnimationDefaults")}}function l(t,n,r,i,o,s){_.forEach(t.animation,(function(t){t.target&&(t.target.length>1?t.target.each((function(r){n.$i=r,e(this).css(_.mapValues(t.css,(function(e,t){return e(n)})))})):(n.$i=0,t.target.css(_.mapValues(t.css,(function(e,t){return e(n)})))),t.target.css({transition:"all ease-out "+r+"ms"}),t.target.one("webkitTransitionEnd transitionend",(function(){t.target.css({transition:""})})))})),setTimeout((function(){window.requestAnimationFrame((function(){n.$D===n.bounds.lower?t.onLower.call(i,s):n.$D===n.bounds.upper&&t.onUpper.call(i,s),t.onAnimation(s,o)}))}),r)}var u={gotoUpper:function(){c(this,"upper",arguments[1])},gotoLower:function(e){c(this,"lower",arguments[1])}};function c(e,t,n){var r,u=(new a).getSettings(e),c={},d=o(e,u);s(u),n=n||300,r=i(u.context,e),(c=_.extend({},r)).$d=0,c.$D="lower"===t?d.lower:d.upper,c.bounds=d,l(u,c,n,e)}function d(t,n){var u={$D:0},c={max:Math.max,min:Math.min,abs:Math.abs};if(!_.isArray(n.animation)){var d=n.animation.target||t,h=n.animation.css||n.animation;delete h[t],n.animation=[{target:d,css:h}]}_.forEach(n.animation,(function(e){e.css=_.mapValues(e.css,(function(e,t){return r(e)}))})),(new a).setSettings(n,t),t.swipey({direction:n.direction,threshold:n.threshold,bindEvents:n.bindEvents,target:n.target,onSwipeStart:function(e,r){var a,l,d,h;if(u.$d=0,u.bounds=o(this,n,[e,r.length]),_.isUndefined(u.bounds.center)?u.$D=0:u.$D=u.bounds.center,a=u.$D+r.length,u.bounds.strictLower=!(!1===u.bounds.strict||!1===u.bounds.strictLower),u.bounds.strictUpper=!(!1===u.bounds.strict||!1===u.bounds.strictUpper),!n.enableGestures()||u.bounds.strictLower&&(_.isUndefined(u.bounds.lower)&&r.length<0||!_.isUndefined(u.bounds.lower)&&u.bounds.lower>a)||u.bounds.strictUpper&&(_.isUndefined(u.bounds.upper)&&r.length>0||!_.isUndefined(u.bounds.upper)&&u.bounds.upper<a))return!1;u.vc=(l=0,d=0,h=0,{addDistance:function(e){var t=Date.now();return Math.abs(e-l)>10&&t!==d&&(h=(e-l)/(t-d),l=e,d=t),h=h<0?Math.min(h,-1):Math.max(h,1),this},getVelocity:function(){return h},getTime:function(e){return Math.abs(e/h)}}),u.context=_.extend(c,i(n.context,t)),u.localState=_.extend({},u.context),s(n),_.forEach(n.animation,(function(e){e.target&&e.target.css({transition:"none"})}))},onSwipe:function(t,r){var i=u.localState,o=u.$D+r.length;i.$d=r.length,i.$D=u.$D,u.bounds.strictLower&&!_.isUndefined(u.bounds.lower)&&u.bounds.lower>o?i.$d=u.bounds.lower-u.$D:u.bounds.strictUpper&&!_.isUndefined(u.bounds.upper)&&u.bounds.upper<o&&(i.$d=u.bounds.upper-u.$D),u.vc.addDistance(r.length),_.forEach(n.animation,(function(t){t.target&&(t.target.length>1?t.target.each((function(n){i.$i=n,e(this).css(_.mapValues(t.css,(function(e,t){return e(i)})))})):(i.$i=0,t.target.css(_.mapValues(t.css,(function(e,t){return e(i)})))))}))},onSwipeEnd:function(e,r){var i,o=u.localState,s=u.$D+r.length,a=u.vc.getVelocity();o.$d=r.length,o.$D=u.$D,!_.isUndefined(u.bounds.lower)&&a<=0&&u.$D>s?o.$D=u.bounds.lower:!_.isUndefined(u.bounds.upper)&&a>=0&&u.$D<s&&(o.$D=u.bounds.upper),o.$d=0,o.bounds=u.bounds,u.$D=o.$D,i=u.vc.getTime(o.$D-s),l(n,o,i,t,s,e)}})}e.fn.swipeAnimation=function(t){return u[t]?u[t].apply(this,arguments):(this.each((function(){d(e(this),e.extend({direction:e.fn.swipey.DIRECTIONS.HORIZONTAL,target:e(this),threshold:30,enableGestures:function(){return!0},bindEvents:["touch"],bounds:{},context:{},animation:{},onLower:e.noop,onUpper:e.noop,onAnimation:e.noop},t))})),this)}}(jQuery),function(e){function t(e,t){if(!(e.originalEvent.touches.length>1)){$(e.target).is("input")||$(e.target).is("textarea")||$(e.target).is("select")||$(e.target).is("button")||$(e.target).is("option")?e.stopPropagation():e.preventDefault();var n=e.originalEvent.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent(t,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(r)}}if(e.support.touch="ontouchend"in document,e.support.touch){var n,r=e.ui.mouse.prototype,i=r._mouseInit,o=r._mouseDestroy;r._touchStart=function(e){!n&&this._mouseCapture(e.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,t(e,"mouseover"),t(e,"mousemove"),t(e,"mousedown"))},r._touchMove=function(e){n&&(this._touchMoved=!0,t(e,"mousemove"))},r._touchEnd=function(e){n&&(t(e,"mouseup"),t(e,"mouseout"),this._touchMoved||t(e,"click"),n=!1)},r._mouseInit=function(){var t=this;t.element.bind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),i.call(t)},r._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),o.call(t)}}}(jQuery),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.wm_common_variables=t():e.wm_common_variables=t()}(window,(()=>(()=>{var e={"./node_modules/@metrichor/jmespath/dist/jmespath.esm.js":
|
|
613
|
+
function(e,t,n){var r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){e.setTimeout(t,1e3/60)},i=function(){var r={},i=t.createElement("div").style,o=function(){for(var e=["t","webkitT","MozT","msT","OT"],t=0,n=e.length;t<n;t++)if(e[t]+"ransform"in i)return e[t].substr(0,e[t].length-1);return!1}();function s(e){return!1!==o&&(""===o?e:o+e.charAt(0).toUpperCase()+e.substr(1))}r.getTime=Date.now||function(){return(new Date).getTime()},r.extend=function(e,t){for(var n in t)e[n]=t[n]},r.addEvent=function(e,t,n,r){e.addEventListener(t,n,!!r)},r.removeEvent=function(e,t,n,r){e.removeEventListener(t,n,!!r)},r.prefixPointerEvent=function(t){return e.MSPointerEvent?"MSPointer"+t.charAt(7).toUpperCase()+t.substr(8):t},r.momentum=function(e,t,r,i,o,s){var a,l,u=e-t,c=n.abs(u)/r;return l=c/(s=void 0===s?6e-4:s),(a=e+c*c/(2*s)*(u<0?-1:1))<i?(a=o?i-o/2.5*(c/8):i,l=(u=n.abs(a-e))/c):a>0&&(a=o?o/2.5*(c/8):0,l=(u=n.abs(e)+a)/c),{destination:n.round(a),duration:l}};var a=s("transform");return r.extend(r,{hasTransform:!1!==a,hasPerspective:s("perspective")in i,hasTouch:"ontouchstart"in e,hasPointer:!(!e.PointerEvent&&!e.MSPointerEvent),hasTransition:s("transition")in i}),r.isBadAndroid=function(){var t=e.navigator.appVersion;if(/Android/.test(t)&&!/Chrome\/\d/.test(t)){var n=t.match(/Safari\/(\d+.\d)/);return!(n&&"object"==typeof n&&n.length>=2)||parseFloat(n[1])<535.19}return!1}(),r.extend(r.style={},{transform:a,transitionTimingFunction:s("transitionTimingFunction"),transitionDuration:s("transitionDuration"),transitionDelay:s("transitionDelay"),transformOrigin:s("transformOrigin")}),r.hasClass=function(e,t){return new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},r.addClass=function(e,t){if(!r.hasClass(e,t)){var n=e.className.split(" ");n.push(t),e.className=n.join(" ")}},r.removeClass=function(e,t){if(r.hasClass(e,t)){var n=new RegExp("(^|\\s)"+t+"(\\s|$)","g");e.className=e.className.replace(n," ")}},r.offset=function(e){for(var t=-e.offsetLeft,n=-e.offsetTop;e=e.offsetParent;)t-=e.offsetLeft,n-=e.offsetTop;return{left:t,top:n}},r.preventDefaultException=function(e,t){for(var n in t)if(t[n].test(e[n]))return!0;return!1},r.extend(r.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),r.extend(r.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(e){return e*(2-e)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(e){return n.sqrt(1- --e*e)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(e){return(e-=1)*e*(5*e+4)+1}},bounce:{style:"",fn:function(e){return(e/=1)<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}},elastic:{style:"",fn:function(e){return 0===e?0:1==e?1:.4*n.pow(2,-10*e)*n.sin((e-.055)*(2*n.PI)/.22)+1}}}),r.tap=function(e,n){var r=t.createEvent("Event");r.initEvent(n,!0,!0),r.pageX=e.pageX,r.pageY=e.pageY,e.target.dispatchEvent(r)},r.click=function(e){var n,r=e.target;/(SELECT|INPUT|TEXTAREA)/i.test(r.tagName)||((n=t.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,e.view,1,r.screenX,r.screenY,r.clientX,r.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,null),n._constructed=!0,r.dispatchEvent(n))},r}();function o(n,r){for(var o in this.wrapper="string"==typeof n?t.querySelector(n):n,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!i.hasPointer,disableTouch:i.hasPointer||!i.hasTouch,disableMouse:i.hasPointer||i.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:void 0===e.onmousedown},r)this.options[o]=r[o];this.translateZ=this.options.HWCompositing&&i.hasPerspective?" translateZ(0)":"",this.options.useTransition=i.hasTransition&&this.options.useTransition,this.options.useTransform=i.hasTransform&&this.options.useTransform,this.options.eventPassthrough=!0===this.options.eventPassthrough?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"!=this.options.eventPassthrough&&this.options.scrollY,this.options.scrollX="horizontal"!=this.options.eventPassthrough&&this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?i.ease[this.options.bounceEasing]||i.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,!0===this.options.tap&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function s(e,n,r){var i=t.createElement("div"),o=t.createElement("div");return!0===r&&(i.style.cssText="position:absolute;z-index:9999",o.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),o.className="iScrollIndicator","h"==e?(!0===r&&(i.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",o.style.height="100%"),i.className="iScrollHorizontalScrollbar"):(!0===r&&(i.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",o.style.width="100%"),i.className="iScrollVerticalScrollbar"),i.style.cssText+=";overflow:hidden",n||(i.style.pointerEvents="none"),i.appendChild(o),i}function a(n,o){for(var s in this.wrapper="string"==typeof o.el?t.querySelector(o.el):o.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=n,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0},o)this.options[s]=o[s];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(i.addEvent(this.indicator,"touchstart",this),i.addEvent(e,"touchend",this)),this.options.disablePointer||(i.addEvent(this.indicator,i.prefixPointerEvent("pointerdown"),this),i.addEvent(e,i.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(i.addEvent(this.indicator,"mousedown",this),i.addEvent(e,"mouseup",this))),this.options.fade){this.wrapperStyle[i.style.transform]=this.scroller.translateZ;var a=i.style.transitionDuration;this.wrapperStyle[a]=i.isBadAndroid?"0.0001ms":"0ms";var l=this;i.isBadAndroid&&r((function(){"0.0001ms"===l.wrapperStyle[a]&&(l.wrapperStyle[a]="0s")})),this.wrapperStyle.opacity="0"}}o.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(e){e.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(e){if(1!=i.eventType[e.type]&&0!==(e.which?e.button:e.button<2?0:4==e.button?1:2))return;if(this.enabled&&(!this.initiated||i.eventType[e.type]===this.initiated)){!this.options.preventDefault||i.isBadAndroid||i.preventDefaultException(e.target,this.options.preventDefaultException)||e.preventDefault();var t,r=e.touches?e.touches[0]:e;this.initiated=i.eventType[e.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=i.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,t=this.getComputedPosition(),this._translate(n.round(t.x),n.round(t.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=r.pageX,this.pointY=r.pageY,this._execEvent("beforeScrollStart")}},_move:function(e){if(this.enabled&&i.eventType[e.type]===this.initiated){this.options.preventDefault&&e.preventDefault();var t,r,o,s,a=e.touches?e.touches[0]:e,l=a.pageX-this.pointX,u=a.pageY-this.pointY,c=i.getTime();if(this.pointX=a.pageX,this.pointY=a.pageY,this.distX+=l,this.distY+=u,o=n.abs(this.distX),s=n.abs(this.distY),!(c-this.endTime>300&&o<10&&s<10)){if(this.directionLocked||this.options.freeScroll||(o>s+this.options.directionLockThreshold?this.directionLocked="h":s>=o+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)e.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);u=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)e.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);l=0}l=this.hasHorizontalScroll?l:0,u=this.hasVerticalScroll?u:0,t=this.x+l,r=this.y+u,(t>0||t<this.maxScrollX)&&(t=this.options.bounce?this.x+l/3:t>0?0:this.maxScrollX),(r>0||r<this.maxScrollY)&&(r=this.options.bounce?this.y+u/3:r>0?0:this.maxScrollY),this.directionX=l>0?-1:l<0?1:0,this.directionY=u>0?-1:u<0?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(t,r),c-this.startTime>300&&(this.startTime=c,this.startX=this.x,this.startY=this.y)}}},_end:function(e){if(this.enabled&&i.eventType[e.type]===this.initiated){this.options.preventDefault&&!i.preventDefaultException(e.target,this.options.preventDefaultException)&&e.preventDefault();e.changedTouches&&e.changedTouches[0];var t,r,o=i.getTime()-this.startTime,s=n.round(this.x),a=n.round(this.y),l=n.abs(s-this.startX),u=n.abs(a-this.startY),c=0,d="";if(this.isInTransition=0,this.initiated=0,this.endTime=i.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(s,a),!this.moved)return this.options.tap&&i.tap(e,this.options.tap),this.options.click&&i.click(e),void this._execEvent("scrollCancel");if(this._events.flick&&o<200&&l<100&&u<100)this._execEvent("flick");else{if(this.options.momentum&&o<300&&(t=this.hasHorizontalScroll?i.momentum(this.x,this.startX,o,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:s,duration:0},r=this.hasVerticalScroll?i.momentum(this.y,this.startY,o,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:a,duration:0},s=t.destination,a=r.destination,c=n.max(t.duration,r.duration),this.isInTransition=1),this.options.snap){var h=this._nearestSnap(s,a);this.currentPage=h,c=this.options.snapSpeed||n.max(n.max(n.min(n.abs(s-h.x),1e3),n.min(n.abs(a-h.y),1e3)),300),s=h.x,a=h.y,this.directionX=0,this.directionY=0,d=this.options.bounceEasing}if(s!=this.x||a!=this.y)return(s>0||s<this.maxScrollX||a>0||a<this.maxScrollY)&&(d=i.ease.quadratic),void this.scrollTo(s,a,c,d);this._execEvent("scrollEnd")}}}},_resize:function(){var e=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){e.refresh()}),this.options.resizePolling)},resetPosition:function(e){var t=this.x,n=this.y;return e=e||0,!this.hasHorizontalScroll||this.x>0?t=0:this.x<this.maxScrollX&&(t=this.maxScrollX),!this.hasVerticalScroll||this.y>0?n=0:this.y<this.maxScrollY&&(n=this.maxScrollY),(t!=this.x||n!=this.y)&&(this.scrollTo(t,n,e,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight,this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=i.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(e,t){this._events[e]||(this._events[e]=[]),this._events[e].push(t)},off:function(e,t){if(this._events[e]){var n=this._events[e].indexOf(t);n>-1&&this._events[e].splice(n,1)}},_execEvent:function(e){if(this._events[e]){var t=0,n=this._events[e].length;if(n)for(;t<n;t++)this._events[e][t].apply(this,[].slice.call(arguments,1))}},scrollBy:function(e,t,n,r){e=this.x+e,t=this.y+t,n=n||0,this.scrollTo(e,t,n,r)},scrollTo:function(e,t,n,r){r=r||i.ease.circular,this.isInTransition=this.options.useTransition&&n>0;var o=this.options.useTransition&&r.style;!n||o?(o&&(this._transitionTimingFunction(r.style),this._transitionTime(n)),this._translate(e,t)):this._animate(e,t,n,r.fn)},scrollToElement:function(e,t,r,o,s){if(e=e.nodeType?e:this.scroller.querySelector(e)){var a=i.offset(e);a.left-=this.wrapperOffset.left,a.top-=this.wrapperOffset.top,!0===r&&(r=n.round(e.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===o&&(o=n.round(e.offsetHeight/2-this.wrapper.offsetHeight/2)),a.left-=r||0,a.top-=o||0,a.left=a.left>0?0:a.left<this.maxScrollX?this.maxScrollX:a.left,a.top=a.top>0?0:a.top<this.maxScrollY?this.maxScrollY:a.top,t=null==t||"auto"===t?n.max(n.abs(this.x-a.left),n.abs(this.y-a.top)):t,this.scrollTo(a.left,a.top,t,s)}},_transitionTime:function(e){e=e||0;var t=i.style.transitionDuration;if(this.scrollerStyle[t]=e+"ms",!e&&i.isBadAndroid){this.scrollerStyle[t]="0.0001ms";var n=this;r((function(){"0.0001ms"===n.scrollerStyle[t]&&(n.scrollerStyle[t]="0s")}))}if(this.indicators)for(var o=this.indicators.length;o--;)this.indicators[o].transitionTime(e)},_transitionTimingFunction:function(e){if(this.scrollerStyle[i.style.transitionTimingFunction]=e,this.indicators)for(var t=this.indicators.length;t--;)this.indicators[t].transitionTimingFunction(e)},_translate:function(e,t){if(this.options.useTransform?this.scrollerStyle[i.style.transform]="translate("+e+"px,"+t+"px)"+this.translateZ:(e=n.round(e),t=n.round(t),this.scrollerStyle.left=e+"px",this.scrollerStyle.top=t+"px"),this.x=e,this.y=t,this.indicators)for(var r=this.indicators.length;r--;)this.indicators[r].updatePosition()},_initEvents:function(t){var n=t?i.removeEvent:i.addEvent,r=this.options.bindToWrapper?this.wrapper:e;n(e,"orientationchange",this),n(e,"resize",this),this.options.click&&n(this.wrapper,"click",this,!0),this.options.disableMouse||(n(this.wrapper,"mousedown",this),n(r,"mousemove",this),n(r,"mousecancel",this),n(r,"mouseup",this)),i.hasPointer&&!this.options.disablePointer&&(n(this.wrapper,i.prefixPointerEvent("pointerdown"),this),n(r,i.prefixPointerEvent("pointermove"),this),n(r,i.prefixPointerEvent("pointercancel"),this),n(r,i.prefixPointerEvent("pointerup"),this)),i.hasTouch&&!this.options.disableTouch&&(n(this.wrapper,"touchstart",this),n(r,"touchmove",this),n(r,"touchcancel",this),n(r,"touchend",this)),n(this.scroller,"transitionend",this),n(this.scroller,"webkitTransitionEnd",this),n(this.scroller,"oTransitionEnd",this),n(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var t,n,r=e.getComputedStyle(this.scroller,null);return this.options.useTransform?(t=+((r=r[i.style.transform].split(")")[0].split(", "))[12]||r[4]),n=+(r[13]||r[5])):(t=+r.left.replace(/[^-\d.]/g,""),n=+r.top.replace(/[^-\d.]/g,"")),{x:t,y:n}},_initIndicators:function(){var e,t=this.options.interactiveScrollbars,n="string"!=typeof this.options.scrollbars,r=[],i=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(e={el:s("v",t,this.options.scrollbars),interactive:t,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(e.el),r.push(e)),this.options.scrollX&&(e={el:s("h",t,this.options.scrollbars),interactive:t,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(e.el),r.push(e))),this.options.indicators&&(r=r.concat(this.options.indicators));for(var o=r.length;o--;)this.indicators.push(new a(this,r[o]));function l(e){if(i.indicators)for(var t=i.indicators.length;t--;)e.call(i.indicators[t])}this.options.fadeScrollbars&&(this.on("scrollEnd",(function(){l((function(){this.fade()}))})),this.on("scrollCancel",(function(){l((function(){this.fade()}))})),this.on("scrollStart",(function(){l((function(){this.fade(1)}))})),this.on("beforeScrollStart",(function(){l((function(){this.fade(1,!0)}))}))),this.on("refresh",(function(){l((function(){this.refresh()}))})),this.on("destroy",(function(){l((function(){this.destroy()})),delete this.indicators}))},_initWheel:function(){i.addEvent(this.wrapper,"wheel",this),i.addEvent(this.wrapper,"mousewheel",this),i.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",(function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,i.removeEvent(this.wrapper,"wheel",this),i.removeEvent(this.wrapper,"mousewheel",this),i.removeEvent(this.wrapper,"DOMMouseScroll",this)}))},_wheel:function(e){if(this.enabled){e.preventDefault();var t,r,i,o,s=this;if(void 0===this.wheelTimeout&&s._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout((function(){s.options.snap||s._execEvent("scrollEnd"),s.wheelTimeout=void 0}),400),"deltaX"in e)1===e.deltaMode?(t=-e.deltaX*this.options.mouseWheelSpeed,r=-e.deltaY*this.options.mouseWheelSpeed):(t=-e.deltaX,r=-e.deltaY);else if("wheelDeltaX"in e)t=e.wheelDeltaX/120*this.options.mouseWheelSpeed,r=e.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in e)t=r=e.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in e))return;t=r=-e.detail/3*this.options.mouseWheelSpeed}if(t*=this.options.invertWheelDirection,r*=this.options.invertWheelDirection,this.hasVerticalScroll||(t=r,r=0),this.options.snap)return i=this.currentPage.pageX,o=this.currentPage.pageY,t>0?i--:t<0&&i++,r>0?o--:r<0&&o++,void this.goToPage(i,o);i=this.x+n.round(this.hasHorizontalScroll?t:0),o=this.y+n.round(this.hasVerticalScroll?r:0),this.directionX=t>0?-1:t<0?1:0,this.directionY=r>0?-1:r<0?1:0,i>0?i=0:i<this.maxScrollX&&(i=this.maxScrollX),o>0?o=0:o<this.maxScrollY&&(o=this.maxScrollY),this.scrollTo(i,o,0)}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",(function(){var e,t,r,i,o,s,a=0,l=0,u=0,c=this.options.snapStepX||this.wrapperWidth,d=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(!0===this.options.snap)for(r=n.round(c/2),i=n.round(d/2);u>-this.scrollerWidth;){for(this.pages[a]=[],e=0,o=0;o>-this.scrollerHeight;)this.pages[a][e]={x:n.max(u,this.maxScrollX),y:n.max(o,this.maxScrollY),width:c,height:d,cx:u-r,cy:o-i},o-=d,e++;u-=c,a++}else for(e=(s=this.options.snap).length,t=-1;a<e;a++)(0===a||s[a].offsetLeft<=s[a-1].offsetLeft)&&(l=0,t++),this.pages[l]||(this.pages[l]=[]),u=n.max(-s[a].offsetLeft,this.maxScrollX),o=n.max(-s[a].offsetTop,this.maxScrollY),r=u-n.round(s[a].offsetWidth/2),i=o-n.round(s[a].offsetHeight/2),this.pages[l][t]={x:u,y:o,width:s[a].offsetWidth,height:s[a].offsetHeight,cx:r,cy:i},u>this.maxScrollX&&l++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1==0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=n.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}})),this.on("flick",(function(){var e=this.options.snapSpeed||n.max(n.max(n.min(n.abs(this.x-this.startX),1e3),n.min(n.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,e)}))},_nearestSnap:function(e,t){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var r=0,i=this.pages.length,o=0;if(n.abs(e-this.absStartX)<this.snapThresholdX&&n.abs(t-this.absStartY)<this.snapThresholdY)return this.currentPage;for(e>0?e=0:e<this.maxScrollX&&(e=this.maxScrollX),t>0?t=0:t<this.maxScrollY&&(t=this.maxScrollY);r<i;r++)if(e>=this.pages[r][0].cx){e=this.pages[r][0].x;break}for(i=this.pages[r].length;o<i;o++)if(t>=this.pages[0][o].cy){t=this.pages[0][o].y;break}return r==this.currentPage.pageX&&((r+=this.directionX)<0?r=0:r>=this.pages.length&&(r=this.pages.length-1),e=this.pages[r][0].x),o==this.currentPage.pageY&&((o+=this.directionY)<0?o=0:o>=this.pages[0].length&&(o=this.pages[0].length-1),t=this.pages[0][o].y),{x:e,y:t,pageX:r,pageY:o}},goToPage:function(e,t,r,i){i=i||this.options.bounceEasing,e>=this.pages.length?e=this.pages.length-1:e<0&&(e=0),t>=this.pages[e].length?t=this.pages[e].length-1:t<0&&(t=0);var o=this.pages[e][t].x,s=this.pages[e][t].y;r=void 0===r?this.options.snapSpeed||n.max(n.max(n.min(n.abs(o-this.x),1e3),n.min(n.abs(s-this.y),1e3)),300):r,this.currentPage={x:o,y:s,pageX:e,pageY:t},this.scrollTo(o,s,r,i)},next:function(e,t){var n=this.currentPage.pageX,r=this.currentPage.pageY;++n>=this.pages.length&&this.hasVerticalScroll&&(n=0,r++),this.goToPage(n,r,e,t)},prev:function(e,t){var n=this.currentPage.pageX,r=this.currentPage.pageY;--n<0&&this.hasVerticalScroll&&(n=0,r--),this.goToPage(n,r,e,t)},_initKeys:function(t){var n,r={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(n in this.options.keyBindings)"string"==typeof this.options.keyBindings[n]&&(this.options.keyBindings[n]=this.options.keyBindings[n].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(n in r)this.options.keyBindings[n]=this.options.keyBindings[n]||r[n];i.addEvent(e,"keydown",this),this.on("destroy",(function(){i.removeEvent(e,"keydown",this)}))},_key:function(e){if(this.enabled){var t,r=this.options.snap,o=r?this.currentPage.pageX:this.x,s=r?this.currentPage.pageY:this.y,a=i.getTime(),l=this.keyTime||0;switch(this.options.useTransition&&this.isInTransition&&(t=this.getComputedPosition(),this._translate(n.round(t.x),n.round(t.y)),this.isInTransition=!1),this.keyAcceleration=a-l<200?n.min(this.keyAcceleration+.25,50):0,e.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?o+=r?1:this.wrapperWidth:s+=r?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?o-=r?1:this.wrapperWidth:s-=r?1:this.wrapperHeight;break;case this.options.keyBindings.end:o=r?this.pages.length-1:this.maxScrollX,s=r?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:o=0,s=0;break;case this.options.keyBindings.left:o+=r?-1:5+this.keyAcceleration|0;break;case this.options.keyBindings.up:s+=r?1:5+this.keyAcceleration|0;break;case this.options.keyBindings.right:o-=r?-1:5+this.keyAcceleration|0;break;case this.options.keyBindings.down:s-=r?1:5+this.keyAcceleration|0;break;default:return}r?this.goToPage(o,s):(o>0?(o=0,this.keyAcceleration=0):o<this.maxScrollX&&(o=this.maxScrollX,this.keyAcceleration=0),s>0?(s=0,this.keyAcceleration=0):s<this.maxScrollY&&(s=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(o,s,0),this.keyTime=a)}},_animate:function(e,t,n,o){var s=this,a=this.x,l=this.y,u=i.getTime(),c=u+n;this.isAnimating=!0,function d(){var h,p,f,m=i.getTime();if(m>=c)return s.isAnimating=!1,s._translate(e,t),void(s.resetPosition(s.options.bounceTime)||s._execEvent("scrollEnd"));f=o(m=(m-u)/n),h=(e-a)*f+a,p=(t-l)*f+l,s._translate(h,p),s.isAnimating&&r(d)}()},handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(e);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(e);break;case"keydown":this._key(e);break;case"click":this.enabled&&!e._constructed&&(e.preventDefault(),e.stopPropagation())}}},a.prototype={handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(i.removeEvent(this.indicator,"touchstart",this),i.removeEvent(this.indicator,i.prefixPointerEvent("pointerdown"),this),i.removeEvent(this.indicator,"mousedown",this),i.removeEvent(e,"touchmove",this),i.removeEvent(e,i.prefixPointerEvent("pointermove"),this),i.removeEvent(e,"mousemove",this),i.removeEvent(e,"touchend",this),i.removeEvent(e,i.prefixPointerEvent("pointerup"),this),i.removeEvent(e,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(t){var n=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=n.pageX,this.lastPointY=n.pageY,this.startTime=i.getTime(),this.options.disableTouch||i.addEvent(e,"touchmove",this),this.options.disablePointer||i.addEvent(e,i.prefixPointerEvent("pointermove"),this),this.options.disableMouse||i.addEvent(e,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(e){var t,n,r,o,s=e.touches?e.touches[0]:e;i.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,t=s.pageX-this.lastPointX,this.lastPointX=s.pageX,n=s.pageY-this.lastPointY,this.lastPointY=s.pageY,r=this.x+t,o=this.y+n,this._pos(r,o),e.preventDefault(),e.stopPropagation()},_end:function(t){if(this.initiated){if(this.initiated=!1,t.preventDefault(),t.stopPropagation(),i.removeEvent(e,"touchmove",this),i.removeEvent(e,i.prefixPointerEvent("pointermove"),this),i.removeEvent(e,"mousemove",this),this.scroller.options.snap){var r=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),o=this.options.snapSpeed||n.max(n.max(n.min(n.abs(this.scroller.x-r.x),1e3),n.min(n.abs(this.scroller.y-r.y),1e3)),300);this.scroller.x==r.x&&this.scroller.y==r.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=r,this.scroller.scrollTo(r.x,r.y,o,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(e){e=e||0;var t=i.style.transitionDuration;if(this.indicatorStyle[t]=e+"ms",!e&&i.isBadAndroid){this.indicatorStyle[t]="0.0001ms";var n=this;r((function(){"0.0001ms"===n.indicatorStyle[t]&&(n.indicatorStyle[t]="0s")}))}},transitionTimingFunction:function(e){this.indicatorStyle[i.style.transitionTimingFunction]=e},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(i.addClass(this.wrapper,"iScrollBothScrollbars"),i.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(i.removeClass(this.wrapper,"iScrollBothScrollbars"),i.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=n.max(n.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=8-this.indicatorWidth,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=n.max(n.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=8-this.indicatorHeight,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var e=this.options.listenX&&n.round(this.sizeRatioX*this.scroller.x)||0,t=this.options.listenY&&n.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(e<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=n.max(this.indicatorWidth+e,8),this.indicatorStyle.width=this.width+"px"),e=this.minBoundaryX):e>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=n.max(this.indicatorWidth-(e-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",e=this.maxPosX+this.indicatorWidth-this.width):e=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),t<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=n.max(this.indicatorHeight+3*t,8),this.indicatorStyle.height=this.height+"px"),t=this.minBoundaryY):t>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=n.max(this.indicatorHeight-3*(t-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",t=this.maxPosY+this.indicatorHeight-this.height):t=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=e,this.y=t,this.scroller.options.useTransform?this.indicatorStyle[i.style.transform]="translate("+e+"px,"+t+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=e+"px",this.indicatorStyle.top=t+"px")},_pos:function(e,t){e<0?e=0:e>this.maxPosX&&(e=this.maxPosX),t<0?t=0:t>this.maxPosY&&(t=this.maxPosY),e=this.options.listenX?n.round(e/this.sizeRatioX):this.scroller.x,t=this.options.listenY?n.round(t/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(e,t)},fade:function(e,t){if(!t||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var n=e?250:500,r=e?0:300;e=e?"1":"0",this.wrapperStyle[i.style.transitionDuration]=n+"ms",this.fadeTimeout=setTimeout(function(e){this.wrapperStyle.opacity=e,this.visible=+e}.bind(this,e),r)}}},o.utils=i,"undefined"!=typeof module&&module.exports?module.exports=o:"function"==typeof define&&define.amd?define((function(){return o})):e.IScroll=o}(window,document,Math),function(e){var t=!1;if("function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),!t){var n=window.Cookies,r=window.Cookies=e();r.noConflict=function(){return window.Cookies=n,r}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}return function t(n){function r(t,i,o){var s;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(o=e({path:"/"},r.defaults,o)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*o.expires),o.expires=a}o.expires=o.expires?o.expires.toUTCString():"";try{s=JSON.stringify(i),/^[\{\[]/.test(s)&&(i=s)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var l="";for(var u in o)o[u]&&(l+="; "+u,!0!==o[u]&&(l+="="+o[u]));return document.cookie=t+"="+i+l}t||(s={});for(var c=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,h=0;h<c.length;h++){var p=c[h].split("="),f=p.slice(1).join("=");this.json||'"'!==f.charAt(0)||(f=f.slice(1,-1));try{var m=p[0].replace(d,decodeURIComponent);if(f=n.read?n.read(f,m):n(f,m)||f.replace(d,decodeURIComponent),this.json)try{f=JSON.parse(f)}catch(e){}if(t===m){s=f;break}t||(s[m]=f)}catch(e){}}return s}}return r.set=r,r.get=function(e){return r.call(r,e)},r.getJSON=function(){return r.apply({json:!0},[].slice.call(arguments))},r.defaults={},r.remove=function(t,n){r(t,"",e(n,{expires:-1}))},r.withConverter=t,r}((function(){}))})),$.widget("wm.datatable",{options:{data:[],statusMsg:"",colDefs:[],rowActions:[],headerConfig:[],sortInfo:{field:"",direction:""},isMobile:!1,enableSort:!0,filtermode:"",filteronkeypress:!1,activeRow:void 0,height:"100%",showHeader:!0,selectFirstRow:!1,showNewRow:!0,showRowIndex:!1,enableRowSelection:!0,enableColumnSelection:!1,multiselect:!1,filterNullRecords:!0,navigation:"",isdynamictable:"",cssClassNames:{tableRow:"app-datagrid-row",headerCell:"app-datagrid-header-cell",groupHeaderCell:"app-datagrid-group-header-cell",tableCell:"app-datagrid-cell",grid:"",gridDefault:"table",gridBody:"app-datagrid-body",gridFooter:"app-datagrid-footer",deleteRow:"danger",ascIcon:"wi wi-long-arrow-up",descIcon:"wi wi-long-arrow-down",selectedColumn:"selected-column",rowExpandIcon:"wi wi-minus-square",rowCollapseIcon:"wi wi-plus-square",gridRowExpansionClass:"table-row-expansion",expandedRowClass:"expanded"},dataStates:{loading:"Loading...",ready:"",error:"An error occurred in loading the data.",nodata:"No data found."},messages:{selectField:"Select Field"},loadingicon:"",startRowIndex:1,editmode:"",actionsEnabled:{edit:!0,new:!0},rowExpansionEnabled:!1,rowDef:{position:"0",closeothers:!1,columnwidth:"30px"},summaryRow:!1,summaryRowDefs:[],summaryRowDefsObject:[],searchHandler:function(){},sortHandler:function(){}},customColumnDefs:{checkbox:{field:"checkbox",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",isMultiSelectCol:!0,show:!0},radio:{field:"radio",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"width: 50px; text-align: center;",textAlignment:"center",show:!0},__expand:{field:"__expand",type:"custom",displayName:"",sortable:!1,searchable:!1,resizable:!1,selectable:!1,readonly:!0,style:"text-align: center;",textAlignment:"center",show:!0,width:"30px"},rowIndex:{field:"rowIndex",type:"custom",displayName:"S. No.",sortable:!1,searchable:!1,selectable:!1,readonly:!0,style:"text-align: left;",textAlignment:"left",show:!0}},CONSTANTS:{QUICK_EDIT:"quickedit",INLINE:"inline",FORM:"form",DIALOG:"dialog",SEARCH:"search",MULTI_COLUMN:"multicolumn"},Utils:{random:function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)},isDefined:function(e){return void 0!==e},isObject:function(e){return null!==e&&"object"==typeof e},getObjectIndex:function(e,t){var n=-1;return Array.isArray(e)?(e.some((function(e,r){if(_.isEqual(e,t))return n=r,!0})),n):-1},generateGuid:function(){var e=this.random;return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},isValidHtml:function(e){return/<[a-z][\s\S]*>/i.test(e)},isMac:function(){return navigator.platform.toUpperCase().indexOf("MAC")>=0},isDeleteKey:function(e){return this.isMac()&&8===e.which||46===e.which}},_setStyles:function(e,t){if(t)return t.split(";").forEach((function(t){var n,r,i=t.split(":");2===i.length&&(n=i[0].trim(),r=i[1].trim(),e.css(n,r))})),t},_getColumnSortDirection:function(e){var t=this.options.sortInfo;return e===t.field?t.direction:""},_toggleSpacingClasses:function(e){switch(e){case"normal":this.tableContainer.removeClass("table-condensed"),this.gridSearch&&(this.gridSearch.find(".form-group").removeClass("form-group-sm"),this.gridSearch.find("select").removeClass("input-sm"),this.gridSearch.find(".input-group").removeClass("input-group-sm"));break;case"condensed":this.tableContainer.addClass("table-condensed"),this.gridSearch&&(this.gridSearch.find(".form-group").addClass("form-group-sm"),this.gridSearch.find("select").addClass("input-sm"),this.gridSearch.find(".input-group").addClass("input-group-sm"))}},_getColSpan:function(e){var t=0,n=this;return _.forEach(e,(function(e){var r;e.isGroup?t+=n._getColSpan(e.columns):(r=_.find(n.preparedHeaderData,{field:e.field}),t=_.isUndefined(r.show)||r.show?t+1:t)})),t},_setColSpan:function(e){var t=this;_.forEach(e,(function(e){e.isGroup&&(e.colspan=t._getColSpan(e.columns),t.gridHeaderElement.find('th[data-col-group="'+e.field+'"]').attr("colspan",e.colspan),t._setColSpan(e.columns))}))},_getHeaderTemplate:function(){var e,t=$("<colgroup></colgroup>"),n=this.gridHeaderElement.empty(),r=this.Utils.isDefined,i=this.options.sortInfo,o=i.field,s=this,a=[],l=this.options.headerConfig,u=s.options.cssClassNames.groupHeaderCell;function c(e,n){var a,l,u,c,d,h=n,p=e.field,f=s.Utils.isDefined(e.displayName)?e.displayName:p||"",m=f,g=s.options.enableSort&&(_.isUndefined(e.show)||e.show)&&(_.isUndefined(e.sortable)||e.sortable),v=s.options.cssClassNames.headerCell,y="";return f=s.Utils.isDefined(f)&&""!==f?f:" ",u=$("<col/>"),e.style&&s._setStyles(u,e.style),t.append(u),r(e.class)&&(v+=" "+e.class),e.selected&&(v+=" "+s.options.cssClassNames.selectedColumn+" "),"checkbox"!==p&&"radio"!==p||(v+=" grid-col-small"),y+="<th",(_.isUndefined(e.resizable)||e.resizable)&&(_.isUndefined(e.show)||e.show)&&(y+=" data-col-resizable"),s.options.enableColumnSelection&&(_.isUndefined(e.selectable)||e.selectable)&&(y+=" data-col-selectable"),g&&(y+=" data-col-sortable"),y+="></th>",(l=$(y)).attr({"data-col-id":h,"data-col-field":p,title:m}),s._setStyles(l,"text-align: "+e.textAlignment),l.addClass(v),"checkbox"===p&&l.append('<input type="checkbox" />'),l.append('<span class="header-data">'+f+"</span>"),g&&(c=$('<span class="sort-buttons-container"></span>'),d=$('<i class="sort-icon"></i>'),o&&o===e.field&&i.direction&&(a="asc"===i.direction?s.options.cssClassNames.ascIcon:s.options.cssClassNames.descIcon,c.addClass("active"),d.addClass(a+" "+i.direction)),l.append(c.append(d))),l}return _.isEmpty(l)?(e=$("<tr></tr>"),s.preparedHeaderData.forEach((function(t,n){e.append(c(t,n))})),n.append(e)):(!function e(t,n){var r=[];_.forEach(t,(function(t){var i,o,a,l,d;t.columns&&t.columns.length?(d=$("<th></th>"),a=u+" "+(t.class||""),l="text-align: "+t.textAlignment+";background-color: "+(t.backgroundColor||"")+";",d.attr({"data-col-group":t.field,class:a,title:t.displayName}),s._setStyles(d,l),d.append('<span class="header-data">'+t.displayName+"</span>"),r.push(d),e(t.columns,n+1)):(i=_.findIndex(s.preparedHeaderData,{field:t.field}),(o=s.preparedHeaderData[i])&&r.push(c(o,i)))})),a[n]=a[n]||[],a[n]=a[n].concat(r)}(l,0),a.forEach((function(t,r){e=$('<tr role="row" tabindex="0"></tr>');var i=a.length-r;t.forEach((function(t){i>1&&t.hasClass("app-datagrid-header-cell")&&t.attr("rowspan",i),e.append(t)})),n.append(e)}))),{colgroup:t,header:n}},_getSearchEl:function(){var e='<select name="wm-datatable" data-element="dgFilterValue" class="form-control app-select"><option value="" selected class="placeholder">'+this.options.messages.selectField+"</option>",t=this.Utils.isDefined(this.options.searchLabel)&&this.options.searchLabel.length?this.options.searchLabel:"";this.options.colDefs.forEach((function(t,n){"none"!==t.field&&"rowOperations"!==t.field&&t.searchable&&"false"!==_.toString(t.showinfilter)&&(e+='<option value="'+t.field+'" data-coldef-index="'+n+'">'+(t.displayName||t.field)+"</option>")})),e+="</select>";var n=$('<form class="form-search form-inline" onsubmit="return false;"><div class="form-group"><input type="text" data-element="dgSearchText" class="form-control app-textbox" value="" placeholder="'+t+'"/></div><div class="input-append input-group">'+e+'<span class="input-group-addon"><button type="button" data-element="dgSearchButton" class="app-search-button" title="'+t+'"><i class="wi wi-search"></i></button></span></div></div></form>');return this._setStyles(n.find('[data-element="dgSearchText"]'),"display: inline-block;"),n},_appendRowExpansionButtons:function(e){var t=this;e.find("[data-identifier='rowExpansionButtons']").each((function(e){var n,r,i,o=e;r=$(this).closest("tr.app-datagrid-row"),i=parseInt(r.attr("data-row-id"),10),(n=_.clone(t.options.data[i])).$index=o+1,t.options.generateRowExpansionCell(n,o),$(this).empty().append(t.options.getRowExpansionAction(o))}))},setSummaryRowDef:function(e,t,n,r){this.options.summaryRow=!0,null==this.options.summaryRowDefs[n]&&(this.options.summaryRowDefs[n]={},this.options.summaryRowDefsObject[n]={}),this.options.summaryRowDefsObject[n][e]=t,this.options.summaryRowDefs[n][e]=t&&t.value?t.value:t,r&&this.refreshGridData()},_getSummaryRowTemplate:function(){var e=this,t=$('<tfoot class="'+this.options.cssClassNames.gridFooter+'"></tfoot>');return this._setStyles(t,"border-top: 3px solid #eee;"),_.forEach(this.options.summaryRowDefs,(function(n,r){n.$$pk=r,t.append(e._getRowTemplate(n,r,!0))})),t},getPageStartIndex:function(){var e=this.options.getCurrentPage(),t=this.options.getPageSize();return((this.options.actionRowPage<e?this.options.actionRowPage:e)-1)*t},_getPreparedDataForInfiniteScroll:function(e,t){return t=t.filter((function(t,n){if(!e.find("tr.app-datagrid-row[data-row-id="+t.$$pk+"]").length)return t}))},_updateTrData:function(e){var t,n,r=this;t=e.find("tr.app-datagrid-row[data-row-id="+r.options.actionRowIndex+"]"),n=r.preparedData[r.options.actionRowIndex],r.options.generateCustomExpressions(n,r.options.actionRowIndex);var i=r._getRowTemplate(n,r.options.actionRowIndex);t.replaceWith(i[0])},_handleCRUDForInfiniteScroll:function(e){var t=this;t.options.lastActionPerformed!==t.options.ACTIONS.SEARCH_OR_SORT&&t.options.lastActionPerformed!==t.options.ACTIONS.FILTER_CRITERIA&&t.options.lastActionPerformed!==t.options.ACTIONS.DATASET_UPDATE||!(t.options.isSearchTrigerred||t.options.isDatasetUpdated||t.options.isDataUpdatedByUser)?t.options.lastActionPerformed===t.options.ACTIONS.EDIT&&void 0!==t.options.actionRowIndex&&t.options.editmode!==this.CONSTANTS.QUICK_EDIT&&t._updateTrData(e):(e.html(""),"On-Demand"!==this.options.navigation||this.options.isLastPage||this.element.find(".on-demand-datagrid").show(),t.options.clearCustomExpression(),t.options.clearRowDetailExpression(),t.options.setIsSearchTrigerred(!1),t.options.setIsDatasetUpdated(!1))},_getGridTemplate:function(){var e,t,n=this,r=n.getPageStartIndex(),i=n.options.startRowIndex,o=n.options.isNavTypeScrollOrOndemand();return o?(t=this.gridElement,this.renderTableOnViewLess&&(t=this.gridElement.empty(),this.hideLoadingIndicator(),this.renderTableOnViewLess=!1)):t=this.gridElement.empty(),o?(this._handleCRUDForInfiniteScroll(t),n.options.lastActionPerformed===n.options.ACTIONS.DELETE&&(i=n.options.actionRowIndex+1),e=this._getPreparedDataForInfiniteScroll(t,this.preparedData.slice(r))):(this.options.clearCustomExpression(),this.options.clearRowDetailExpression(),e=this.preparedData),_.forEach(e,(function(e,r){var s,a=_.clone(e),l=o?i+r-1:r;if(a.$index=l+1,n.options.generateCustomExpressions(a,l),n.options.registerRowNgClassWatcher(a,l),s=n._getRowTemplate(e,l),t.append(s),n.options.rowExpansionEnabled){var u=n.options.rowDef.height,c=n.options.rowDef.position,d=_.filter(n.preparedHeaderData,(function(e){return e.show})).length-1,h=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+e.$$pk+'"><td></td><td colspan="'+d+'" class="app-datagrid-row-details-cell"><div class="row-overlay"><div class="row-status"><i class="'+n.options.loadingicon+'"></i></div></div><div class="details-section"></div></td></tr>');"-1"===c&&(h=$('<tr class="app-datagrid-detail-row" tabindex="0" role="row" data-row-id="'+e.$$pk+'"><td colspan="'+d+'" class="app-datagrid-row-details-cell"><div class="row-overlay"><div class="row-status"><i class="'+n.options.loadingicon+'"></i></div></div><div class="details-section"></div></td><td></td></tr>')),u&&h.find("div.row-overlay").css("min-height",u),h.css("display","none"),h.find(".details-section").css("display","none"),t.append(h)}})),this.options.isdynamictable||(this.options.setLastActionPerformed(this.options.ACTIONS.DEFAULT),this.options.setIsDataUpdatedByUser(!1),this.options.clearActionRowIndex()),t},_getRowTemplate:function(e,t,n){var r,i=this,o=i.options;return r=$('<tr role="row" tabindex="0" class="'+o.cssClassNames.tableRow+" "+(o.rowClass||"")+'" data-row-id="'+e.$$pk+'"></tr>'),this.preparedHeaderData.forEach((function(o,s){r.append(i._getColumnTemplate(e,s,o,t,n))})),r},_getRowActionsColumnDefIndex:function(){var e,t=this.preparedHeaderData.length;for(e=0;e<t;e+=1)if("rowOperations"===this.preparedHeaderData[e].field)return e;return-1},_getRowActionsColumnDef:function(){var e=this._getRowActionsColumnDefIndex();return-1!==e?this.preparedHeaderData[e]:null},_getCheckboxTemplate:function(e,t){return'<input name="'+(t?"gridMultiSelect":"")+'" type="checkbox"'+(!0===e._checked?" checked":"")+(e.disabed?" disabled":"")+"/>"},_getRadioTemplate:function(e){return'<input type="radio" rowSelectInput name="" value=""'+(!0===e._checked?" checked":"")+(e.disabed?" disabled":"")+"/>"},_getColumnTemplate:function(e,t,n,r,i){var o,s,a,l,u=this.options.cssClassNames.tableCell+" "+(n.class||""),c=n.customExpression,d="text-align: "+n.textAlignment+";position: relative;";if(o=$('<td class="'+u+'" data-col-id="'+t+'" role="cell"></td>'),this._setStyles(o,d),s=_.get(e,n.field),i)(a=this.options.summaryRowDefsObject[r][n.field])instanceof Object&&a.class&&o.addClass(a.class),s instanceof Promise?('<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>',o.html('<div class="overlay"><span aria-hidden="true" class="form-field-spinner fa fa-circle-o-notch fa-spin form-control-feedback"></span></div>')):(l=_.isUndefined(s)||null===s?"":s,o.html(l));else if(c)o.html(this.options.getCustomExpression(n.field,r));else if("custom"!==n.type)s=_.get(e,n.field),(this.options.filterNullRecords&&null===s||_.isUndefined(s))&&(s=""),o.attr("title",s),o.text(""+s);else{switch(n.field){case"checkbox":l=this._getCheckboxTemplate(e,n.isMultiSelectCol);break;case"__expand":l='<span class="row-expansion-column" data-identifier="rowExpansionButtons"></span>';break;case"radio":l=this._getRadioTemplate(e);break;case"rowOperations":l='<span class="actions-column" data-identifier="actionButtons"></span>';break;case"rowIndex":l=e.$$index;break;case"none":l="";break;default:l=_.isUndefined(s)||null===s?"":s}o.html(l)}return e.$index=r+1,this.options.registerColNgClassWatcher(e,n,r,t),o},_getEventTemplate:function(e){var t,n=_.filter(_.keys(e),(function(e){return _.startsWith(e,"on")})),r="";return t="autocomplete"===e.editWidgetType?"onSubmit":"onChange",n=_.union(n,[t]),_.forEach(n,(function(t){r+=" "+_.kebabCase(t)+'="',"onSubmit"!==t&&"onChange"!==t||(r+="_"+t+"Field($event, $scope, newVal, oldVal);"),r+=(e[t]||"")+'" '})),r},_insertFieldInHeaderConfig:function(e,t,n){var r=_.findIndex(e,{field:n}),i=this;-1===r?_.forEach(e,(function(e){e.isGroup&&i._insertFieldInHeaderConfig(e.columns,t,n)})):e.splice(r+1,0,{field:t,isPredefined:!0})},setHeaderConfigForDefaultFields:function(e,t){if(!_.isEmpty(this.options.headerConfig)){var n=this.customColumnDefs[e].field;_.remove(this.options.headerConfig,{field:n}),"0"===t?this.options.headerConfig.unshift({field:n,isPredefined:!0}):"-1"===t?this.options.headerConfig.push({field:n,isPredefined:!0}):this._insertFieldInHeaderConfig(this.options.headerConfig,n,t)}},setDefaultColsData:function(e){if(!_.isEmpty(this.preparedHeaderData)){var t,n;if(this.options.rowExpansionEnabled){if(t=this.options.rowDef.position,(n=_.clone(this.customColumnDefs.__expand)).width=this.options.rowDef.columnwidth,e)if("-1"===t)this.preparedHeaderData.push(n);else if("0"===t)this.preparedHeaderData.unshift(n);else{var r=_.findIndex(this.preparedHeaderData,{field:t});this.preparedHeaderData.splice(r+1,0,n)}this.setHeaderConfigForDefaultFields("__expand",t)}this.options.showRowIndex&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.rowIndex),this.setHeaderConfigForDefaultFields("rowIndex","0")),this.options.multiselect&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.checkbox),this.setHeaderConfigForDefaultFields("checkbox","0")),!this.options.multiselect&&this.options.showRadioColumn&&(e&&this.preparedHeaderData.unshift(this.customColumnDefs.radio),this.setHeaderConfigForDefaultFields("radio","0"))}},_prepareHeaderData:function(){this.preparedHeaderData=[],$.extend(this.preparedHeaderData,this.options.colDefs),this.setDefaultColsData(!0)},_generateCustomColDefs:function(){var e=[],t={};function n(n){if(!t[n]){var r={type:"string",field:n};e.push(r),t[n]=!0}}this.options.data.forEach((function(e){_.keys(e).forEach(n)})),this.options.colDefs=e,this._prepareHeaderData()},_prepareData:function(){var e=[],t=this.options.colDefs,n=this,r=n.getPageStartIndex(),i=this.Utils.isObject,o=this.Utils.isDefined;!this.options.colDefs.length&&this.options.data.length&&this._generateCustomColDefs(),(this.options.isNavTypeScrollOrOndemand()?this.options.data.slice(r):this.options.data).forEach((function(s,a){var l=$.extend(!0,{},s);t.forEach((function(e){if(e.field){var t,n,r,a=e.field.split("."),u=s,c=a.length;for(t=0;t<c;t++)if(r=void 0,-1!==(n=a[t]).indexOf("[0]")&&(n=n.replace("[0]",""),r=!0),i(u)&&!r)u=_.get(u,n);else{if(!r){u=void 0;break}u=_.get(u,n+"[0]")}o(u)?l[e.field]=u:a.length>1&&_.has(s,e.field)&&(l[e.field]=s[e.field])}})),l.$$index=r+a+1,l.$$pk=n.options.isNavTypeScrollOrOndemand()?r+a:a,e.push(l)})),n.options.isNavTypeScrollOrOndemand()?n.options.isSearchTrigerred&&!n.emptySearch||n.options.isDatasetUpdated?n.preparedData=e:n.preparedData.length?e.forEach((function(e,t){var i=r+t;n.preparedData[i]&&e.$$index===n.preparedData[i].$$index?n.preparedData[i]=e:n.preparedData.push(e)})):n.preparedData.push(...e):n.preparedData=e},_reselectColumns:function(){var e=[],t=this;this.gridHeaderElement&&this.options.enableColumnSelection&&(e=this.gridHeaderElement.find("th."+this.options.cssClassNames.selectedColumn)).length&&e.each((function(){t.columnSelectionHandler(void 0,$(this))})),this.options.multiselect&&this.updateSelectAllCheckboxState()},_create:function(){$.extend(this,{dataStatus:{message:"",state:"ready"},preparedData:[],preparedHeaderData:[],dataStatusContainer:null,gridContainer:null,gridElement:null,gridHeader:null,gridBody:null,columnClickInfo:{},gridFooter:null,gridSearch:null,tableId:null,searchObj:{field:"",value:"",event:null},compiledCellTemplates:{}}),this._setStatus=_.debounce((function(e){this.__setStatus(e)}),100),this._debounceOnEnter=_.debounce((function(e,t,n,r){this._onEnter(e,t,n,r)}),150),this.options.summaryRow=!1,this.options.summaryRowDefs=[],this._prepareHeaderData(),this._prepareData(),this._render(!0)},_setGridEditMode:function(e){_.isFunction(this.options.setGridEditMode)&&this.options.setGridEditMode(e)},_refreshGrid:function(){this._prepareHeaderData(),this._prepareData(),this._render(),this.addOrRemoveScroll(),this._setGridEditMode(!1)},refreshGrid:function(){window.clearTimeout(this.refreshGridTimeout),this.refreshGridTimeout=window.setTimeout(this._refreshGrid.bind(this),50)},callRenderGridForInfiniteScroll:function(){this.gridFooter.remove();var e=this.gridElement.find("> tr.app-datagrid-row.always-new-row");e.length&&e.remove(),this._renderGrid(void 0)},refreshGridData:function(){this._prepareData(),this.options.isNavTypeScrollOrOndemand()?this.callRenderGridForInfiniteScroll():(this.gridFooter.remove(),this._renderGrid()),this._reselectColumns(),this.addOrRemoveScroll(),this._setGridEditMode(!1),this.toggleNewRowActions(!1)},setDefaultRowData:function(e){_.forEach(this.preparedHeaderData,(function(t){e[t.field]=t.defaultvalue}))},addNewRow:function(e,t){var n,r,i,o=this.gridElement.find("> tr.app-datagrid-row:visible").length||99999,s=this,a={};if(!t&&_.isFunction(this.options.beforeRowInsert)&&this.options.beforeRowInsert(),(i=(r=this.gridElement).find("> tr.app-datagrid-row.always-new-row")).length){if(this.setFocusOnElement(void 0,i),this.options.editmode===this.CONSTANTS.QUICK_EDIT){var l=i.find("input").length>0?$(i.find("input")[0]):null;if(null!==l){var u=$.Event("keydown");u.which=13,l.trigger(u)}}}else a.$index=o,a.$$pk=o,this.options.editmode!==this.CONSTANTS.FORM&&this.options.editmode!==this.CONSTANTS.DIALOG&&(n=$(this._getRowTemplate(a,a.$index)),this.preparedData.length||this.setStatus("ready",this.dataStatus.ready),"top"===this.options.formPosition?r.prepend(n):r.append(n),this._appendRowActions(n,!0,a),this.attachEventHandlers(n),(t||this.options.editmode!==this.CONSTANTS.QUICK_EDIT)&&(n.find(".delete-row-button").hide(),t&&n.find(".edit-row-button").hide()),this._findAndReplaceCompiledTemplates(),t?(this.setDefaultRowData(a),n.addClass("always-new-row").addClass("row-editing"),this.options.runInNgZone((function(){s.makeRowEditable(n,a,!0)}))):n.trigger("click",[void 0,{action:"edit",operation:"new",skipFocus:e}]),this.updateSelectAllCheckboxState(),this.addOrRemoveScroll(),this.options.timeoutCall((function(){s.setColGroupWidths()}),100))},addLoadMoreBtn:function(e,t,n,r){var i;if(!this.options.isLastPage||r){var o=this,s=$('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>');(i=s.find("a")).append(e),this.element.find(".app-grid-header-inner").append(s),r&&this.element.find(".on-demand-load-btn").length&&this.element.find(".on-demand-load-btn").text(this.options.viewlessmessage),i.on("click",(function(e){var s=o.options.getCurrentPage()==o.options.getPageCount();s||o.showLoadingIndicator(t,!1),o.options.showviewlessbutton||i.hide(),r&&s&&o.element.find(".on-demand-datagrid").remove(),s&&o.options.showviewlessbutton&&(i.hide(),o.renderTableOnViewLess=!0,o.renderPaginationOnViewLess=!0,o.options.enableNavigation(),o._renderGrid()),n&&"function"==typeof n&&n(e)}))}},showLoadingIndicator:function(e,t){var n=this.element.find(".loading-data-msg"),r=this.element.find(".on-demand-datagrid");if(n.length&&!t)n.show();else if(t&&r.length)r.show();else{var i=$('<div class="loading-data-msg spin-icon-in-center"><span><i class="app-icon panel-icon fa-spin '+this.options.loadingicon+'"></i><span class="sr-only">Loading</span><span class="loading-text"></span></span></div>');if(i.find(".loading-text").html(e),r.length)r.append(i);else{var o=$('<div class="on-demand-datagrid">'+i[0].outerHTML+"</div>");this.element.find(".app-grid-header-inner").append(o)}}},hideLoadingIndicator:function(e,t){e||t?this.options.getCurrentPage()==this.options.getPageCount()&&this.options.showviewlessbutton?(this.element.find(".on-demand-load-btn").show().text(this.options.viewlessmessage),this.element.find(".loading-data-msg").hide(),t&&(this.element.find(".on-demand-load-btn").length||this.options.addLoadMoreBtn(),this.element.find(".loading-data-msg").hide())):this.element.find(".on-demand-datagrid").hide():(this.element.find(".loading-data-msg").hide(),this.element.find(".on-demand-load-btn").text(this.options.ondemandmessage),this.element.find(".on-demand-load-btn").show())},getSelectedRows:function(){this.getSelectedColumns();var e=[],t=this;return this.preparedData.forEach((function(n,r){n._selected&&e.push(t.options.data[r])})),e},selectRows:function(e){var t=this;t.gridElement.find("tr.app-datagrid-row").each((function(e){t.preparedData[e]&&!0===t.preparedData[e]._selected&&$(this).trigger("click",[$(this),{skipSingleCheck:!0}])})),_.isArray(e)?_.forEach(e,(function(e){t.selectRow(e,!0)})):t.selectRow(e,!0)},toggleRowFilter:function(e){this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this.gridSearch&&(e?this.gridSearch.show():this.gridSearch.hide())},setColGroupWidths:function(){var e=this,t=(this.options.isMobile,this.tableContainer.find("col")),n=this.tableContainer.find("col"),r=this.options.showHeader?this.gridContainer.find("th.app-datagrid-header-cell"):this.gridElement.find("tr.app-datagrid-row").first().find("td"),i=this.preparedHeaderData.length,o=this.gridElement.parent().prop("scrollLeft");if(t.length||r.length){this._setColSpan(this.options.headerConfig),this.toggleRowFilter();var s=0,a=t.length;t.each((function(){var e=$(this).width();e&&(s+=e,a-=1)})),r.each((function(){var r,i,o=Number($(this).attr("data-col-id")),s=e.preparedHeaderData[o],a=e.gridContainer.find('th[data-col-id="'+o+'"]'),l=e.gridElement.find('td.app-datagrid-cell[data-col-id="'+o+'"]'),u=e.tableContainer.find('tfoot tr.app-datagrid-row td.app-datagrid-cell[data-col-id="'+o+'"]'),c=$(t[o]),d=$(n[o]);s&&(r=s.width,_.isUndefined(s.show)||s.show?(a.show(),l.show(),c.show(),d.show(),u.show()):(a.hide(),l.hide(),c.hide(),d.hide(),u.hide()),c.length&&"90px"===c[0].style.width&&(i=_.isUndefined(r)?"":r,c.css("width",i),d.css("width",i)))})),r.each((function(){var r,o,l,u,c=$(this),d=Number(c.attr("data-col-id")),h=e.preparedHeaderData[d];if(h){if(r=h.width,_.isUndefined(h.show)||h.show)if(c.hasClass("grid-col-small"))o=50;else if(_.isUndefined(r)||""===r||_.includes(r,"%")){if((u=$(t[d])).length)if(""===(l=u[0].style.width)||"0px"===l||"90px"===l||_.includes(l,"%"))if((o=c.width())<=0){for(var p=c,f=o,m=0;f<=0;)f=(p=p.parent()).width(),p.find("table").length&&p.prop("style")&&(m=m+parseFloat(p.css("padding-left"))+parseFloat(p.css("padding-right")));if(f>0)if(m&&(f-=m),_.includes(l,"%"))o=f*(parseInt(l)/100);else o=(o=(s&&s>0?f-s:f)/(a||t.length))>90?i===d+1?o-17:o:90;else o=o>90?i===d+1?o-17:o:90}else o=o>90?i===d+1?o-17:o:90;else o=l}else o=r;else o=0;$(t[d]).css("width",o),$(n[d]).css("width",o)}})),this.toggleRowFilter(!0),this.gridElement.parent().prop("scrollLeft",o),this.gridHeaderElement.parent().prop("scrollLeft",o)}},getSelectedColumns:function(){var e,t,n,r={},i=[],o=this;return $.extend(i,this.preparedHeaderData),this.options.multiselect?(i.some((function(t,n){if("checkbox"===t.field)return e=n,!0})),i.splice(e,1)):this.options.showRadioColumn&&(i.some((function(e,n){if("radio"===e.field)return t=n,!0})),i.splice(t,1)),this.options.showRowIndex&&(i.some((function(e,t){if("rowIndex"===e.field)return n=t,!0})),i.splice(n,1)),i.forEach((function(e){var t=e.field;e.selected&&(r[t]={colDef:e,colData:o.options.data.map((function(e){return e[t]}))})})),r},_setOption:function(e,t){switch(this._super(e,t),e){case"showHeader":this._toggleHeader(),this._toggleSearch(),this.setColGroupWidths(),this.addOrRemoveScroll();break;case"filtermode":this._toggleSearch();break;case"searchLabel":this.gridSearch&&(this.gridSearch.find('[data-element="dgSearchText"]').attr("placeholder",t),this.gridSearch.find('[data-element="dgSearchButton"]').attr("title",t));break;case"selectFirstRow":this.selectFirstRow(t);break;case"data":this.isResetSortIconsDone||this.setSortIconDefault(),this.refreshGridData();break;case"dataStates":"nodata"===this.dataStatus.state?this.setStatus("nodata",this.dataStatus.nodata):"loading"===this.dataStatus.state&&this.setStatus("loading");break;case"loadingicon":this.dataStatusContainer.find("i").removeClass().addClass(this.options.loadingicon);break;case"colDefs":if(this.options.isNavTypeScrollOrOndemand()&&this.options.isNextPageData){this.tableContainer.find("colgroup").remove(),this._prepareHeaderData(),this.setColGroupWidths(),this._renderHeader(),this._renderSearch(),this.attachEventHandlers(this.gridElement),this._reselectColumns(),this.addOrRemoveScroll();break}case"multiselect":case"showRadioColumn":case"rowActions":case"filterNullRecords":case"showRowIndex":this.refreshGrid();break;case"cssClassNames":var n=this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid;this.options.rowExpansionEnabled&&(n=n+" "+this.options.cssClassNames.gridRowExpansionClass),this.tableContainer.attr("class",n),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed");break;case"spacing":this._toggleSpacingClasses(t);break;case"messages":this.gridSearch&&this.gridSearch.find("option.placeholder").text(t&&t.selectField)}},getOptions:function(){return this.options},_toggleHeader:function(){this.gridHeaderElement&&this.gridHeaderElement.empty(),this.tableContainer&&(this.tableContainer.find("colgroup").remove(),this.tableContainer.find("thead").remove()),this.setDefaultColsData(),this.options.showHeader&&this._renderHeader()},_toggleSearch:function(){this.gridSearch&&this.gridSearch.remove(),this.options.filtermode===this.CONSTANTS.SEARCH?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&(this._renderRowFilter(),this.setColGroupWidths())},selectFirstRow:function(e,t){var n,r;t&&this.gridElement.find("tr").is(":visible")?(this.__setStatus(),n=this.gridElement.find("tr.app-datagrid-row:visible:not(.always-new-row)").first()):n=this.gridElement.find("tr.app-datagrid-row:not(.always-new-row)").first(),r=n.attr("data-row-id"),n.length&&this.preparedData.length&&(this.preparedData[r]._selected=!e,n[0].click())},selectRow:function(e,t){var n,r,i=_.isNumber(e)?e:this.Utils.getObjectIndex(this.options.data,e);-1!==i&&(n="tr.app-datagrid-row[data-row-id="+i+"]",(r=this.gridElement.find(n)).length&&(this.preparedData[i]._selected=!t),t?r.trigger("click"):(this.toggleRowSelection(r,t),this.options.callOnRowDeselectEvent(this.preparedData[i])))},deselectRow:function(e){this.selectRow(e,!1)},toggleRowSelection:function(e,t,n,r){if(e.length){var i=e.attr("data-row-id");this.preparedData[i]&&(this.preparedData[i]._selected=t,t?e.addClass("active"):e.removeClass("active"),this.options.showRadioColumn&&(e.find("td input[rowSelectInput]:radio:not(:disabled)").prop("checked",t),this.preparedData[i]._checked=t),this.options.multiselect?(e.find('td input[name="gridMultiSelect"]:checkbox:not(:disabled)').prop("checked",t),this.preparedData[i]._checked=t,r||this.updateSelectAllCheckboxState()):this._deselectPreviousSelection(e,n))}},updateSelectAllCheckboxState:function(){if(this.options.showHeader&&this.options.multiselect){this.__setStatus();var e=this.gridHeaderElement.find("th.app-datagrid-header-cell input:checkbox"),t=this.gridElement,n=t.find('tr.app-datagrid-row:visible input[name="gridMultiSelect"]:checkbox:checked').length,r=t.find("tr.app-datagrid-row:visible").length;r&&n===r?e.prop("checked",!0):e.prop("checked",!1)}},rowClickHandlerOnCapture:function(e,t,n){if(!this.getColInfo(e)||"checkbox"==e.target.type||"radio"==e.target.type){t=t||$(e.target).closest("tr.app-datagrid-row");var r=this.gridElement.find(t);if(r.length&&r.closest("tbody").attr("id")===this.gridElement.attr("id")){var i=t.attr("data-row-id"),o=this.preparedData[i],s=this.options.data[i];this.options.assignSelectedItems(s,e,{rowId:i,_selected:o?._selected})}}},rowSelectionHandler:function(e,t,n){if(!this.getColInfo(e)||"checkbox"==e.target.type||"radio"==e.target.type){var r,i,o,s,a=this,l=(n=n||{}).action,u=$(e.target),c=this.options.editmode===this.CONSTANTS.QUICK_EDIT;t=t||u.closest("tr.app-datagrid-row"),(l||c&&(u.hasClass("app-datagrid-cell")||u.closest("td.app-datagrid-cell").length)&&!t.hasClass("always-new-row"))&&(n.action=n.action||"edit",("new"===n.operation||a.options.actionsEnabled.edit)&&a.toggleEditRow(e,n),n.skipSelect)||(r=t.attr("data-row-id"),i=this.preparedData[r],o=this.options.data[r],s=i&&i._selected||!1,n.skipSingleCheck||(!t.hasClass("active")||this.options.multiselect)&&i?(this.options.callOnRowClickEvent(o,e),s=!s,this.toggleRowSelection(t,s,e),d()):c||"new"===n.operation||d())}function d(){s&&_.isFunction(a.options.onRowSelect)&&a.options.onRowSelect(o,e),!s&&_.isFunction(a.options.onRowDeselect)&&a.options.onRowDeselect(o,e)}},rowDblClickHandler:function(e,t){e.stopPropagation();var n,r=(t=t||$(e.target).closest("tr.app-datagrid-row")).attr("data-row-id");(n=this.preparedData[r])&&_.isFunction(this.options.onRowDblClick)&&this.options.onRowDblClick(n,e)},closePopover:function(){this.options.closePopover(this.element)},headerClickHandler:function(e){var t=$(e.target).closest("th.app-datagrid-header-cell").attr("data-col-id");this.closePopover(),this.options.onHeaderClick(this.preparedHeaderData[t],e)},columnSelectionHandler:function(e,t){e&&e.stopImmediatePropagation();var n=e?$(e.target).closest("th.app-datagrid-header-cell"):t,r=n.attr("data-col-id"),i=this.preparedHeaderData[r],o=i.field,s='td[data-col-id="'+r+'"]',a=this.gridElement.find(s),l=a.data("selected")||!1,u={colDef:i,data:this.options.data.map((function(e){return e[o]})),sortDirection:this._getColumnSortDirection(i.field)},c=this.options.cssClassNames.selectedColumn;l=!l,i.selected=l,a.data("selected",l),l?(a.addClass(c),n.addClass(c),_.isFunction(this.options.onColumnSelect)&&e&&this.options.onColumnSelect(u,e)):(a.removeClass(c),n.removeClass(c),_.isFunction(this.options.onColumnDeselect)&&e&&this.options.onColumnDeselect(u,e))},getTextValue:function(e,t){return this.options.getFieldValue(t?e+"_new":e)},getUploadedFiles:function(e,t){return _.get(document.forms,[e.find("form").attr("name"),t,"files",0])},isDataModified:function(e,t,n){var r=!1,i=this;function o(e){return e?moment(e).valueOf():e}return e.each((function(){var e=$(this),s=e.attr("data-col-id"),a=i.preparedHeaderData[s],l=i.getTextValue(a.field,n),u=_.get(t,a.field);if(r="upload"===a.editWidgetType?i.getUploadedFiles(e,a.field)instanceof File:!(!i.Utils.isDefined(l)&&null==u)&&("datetime"===a.editWidgetType?!(o(u)===o(l)):!(u==l)))return!r})),r},focusActiveRow:function(){this.gridElement.find("tr.app-datagrid-row.active").focus()},focusNewRow:function(){var e=this.gridElement.find("tr.always-new-row"),t=e&&e.find("input")||[];t.length&&t[0].focus()},disableActions:function(e){var t=this.gridElement.find(".delete-row-button"),n=this.gridElement.find(".edit-row-button");e?(n.addClass("disabled-action"),t.addClass("disabled-action")):(n.removeClass("disabled-action"),t.removeClass("disabled-action"))},setFocusOnElement:function(e,t,n){var r,i,o=e&&$(e.target);o&&o.hasClass("app-datagrid-cell")?r=o.find("input"):(t?t.hasClass("app-datagrid-row")&&(t=t.find("td.cell-editing")):t=o.closest("tr.app-datagrid-row").find("td.cell-editing"),(r=$(t).first().find("input")).length||(r=$(t).first().find("textarea")),r.length||(r=$(t).first().find("select"))),r.length&&(i=r.first(),n?(i.focus(),i.select()):this.options.timeoutCall((function(){i.focus(),i.select()})))},removeNewRow:function(e){this.disableActions(!1),this._setGridEditMode(!1),e.hasClass("always-new-row")||(e.attr("data-removed",!0),e.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),this.addOrRemoveScroll(),this.toggleNewRowActions(!1))},saveRow:function(e){this.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").each((function(){$(this).trigger("click",[void 0,{action:"save",skipSelect:!0,noMsg:!0,success:e}])}))},makeRowEditable:function(e,t,n){var r,i=this,o=e.find("td.app-datagrid-cell"),s=parseInt(e.attr("data-row-id"),10),a=_.clone(t);a.$index=s+1,this.options.removeValidations(n),this.options.generateInlineEditRow(a,n),o.each((function(){var e,r,o=$(this),a=o.text(),l=o.attr("data-col-id"),u=i.preparedHeaderData[l];u.readonly||(e=_.get(t,u.field),r=i.options.getInlineEditWidget(u.field,e,n),u.customExpression||u.formatpattern&&"None"!==u.formatpattern?(o.addClass("cell-editing editable-expression").data("originalValue",{rowIndex:s,fieldName:u.field}),o.addClass("cell-editing editable-expression").html(r).data("originalText",a)):o.addClass("cell-editing").html(r).data("originalText",a),o.addClass("form-group"),"rowOperations"!==u.binding?i.options.timeoutCall((function(){i.options.applyValidations(u,n),u.required&&o.addClass("required-field")})):u.required&&o.addClass("required-field"))})),(r=e.find("td.cell-editing")).on("click",(function(e){e.stopPropagation()})),r.on("keydown",(function(e){38!==e.which&&40!==e.which||!e.currentTarget||e.currentTarget.closest(".always-new-row")||e.stopPropagation()}))},toggleNewRowActions:function(e){var t=this,n=$(this.element).siblings("div.panel-footer, div.panel-heading").find("div.app-datagrid-actions"),r=this.gridElement.find("tr.app-datagrid-row.row-editing"),i=n.find("i.wi-plus").closest(".app-button");this.options.editmode!==this.CONSTANTS.INLINE||0!==this.options.rowActions.length&&_.some(this.options.rowActions,{action:"editRow($event)"})||(e?(n.append('<button type="button" wmbutton="" class="btn app-button btn-default cancelNewRow" tabindex="0" accesskey="" title="Cancel"><i aria-hidden="true" class="app-icon wi wi-cancel"></i><span class="sr-only">Cancel Icon</span><span class="btn-caption">Cancel</span></button><button type="button" wmbutton="" class="btn app-button btn-primary saveNewRow" tabindex="0" accesskey="" title="Save"><i aria-hidden="true" class="app-icon wi wi-done"></i><span class="sr-only">Save Icon</span><span class="btn-caption">Save</span></button>'),n.find(".cancelNewRow").on("click",(function(e){t.toggleEditRow(e,{action:"cancel",$row:r})})),n.find(".saveNewRow").on("click",(function(e){t.toggleEditRow(e,{action:"save",$row:r})})),i.hide()):($("typeahead-container").removeClass("open"),n.find(".cancelNewRow").remove(),n.find(".saveNewRow").remove(),i.show()))},_isNewRow:function(e){return parseInt(e.attr("data-row-id"),10)>=this.preparedData.length||e.hasClass("always-new-row")},toggleEditRow:function(e,t){t=t||{},e&&e.stopPropagation(),this.closePopover();var n,r,i,o,s=t.$row||$(e.target).closest("tr.app-datagrid-row"),a=s.find(".edit-row-button"),l=s.find(".cancel-edit-row-button"),u=s.find(".save-edit-row-button"),c=s.find(".delete-row-button"),d=_.cloneDeep(this.options.data[s.attr("data-row-id")])||{},h=this,p=s.hasClass("always-new-row"),f=h.options.editmode===h.CONSTANTS.QUICK_EDIT,m={};function g(e,n){_.isFunction(t.success)&&t.success(e,n),f&&!h.options.actionsEnabled.edit||h.focusActiveRow()}if(this.options.setActionRowIndex(s.attr("data-row-id")),this.options.setLastActionPerformed(this.options.ACTIONS.EDIT),"true"!==s.attr("data-removed")){if(t.selectRow&&this.selectRow(d,!0),(e=e||{}).data=e.data||{},"edit"===(n=e.data.action||t.action)){if(this.options.editmode===this.CONSTANTS.INLINE&&this.options.callLoadInlineWidgetData(),f&&h.gridElement.find("tr.app-datagrid-row.row-editing:not(.always-new-row)").length)return void h.saveRow((function(t,n){h.editSuccessHandler(t,n,e,s,!0)}));if(s.addClass("row-editing"),_.isFunction(this.options.beforeRowUpdate)&&this.options.beforeRowUpdate(d,e),h.options.editmode===h.CONSTANTS.FORM||h.options.editmode===h.CONSTANTS.DIALOG)return;if("new"===t.operation&&(h.setDefaultRowData(d),h.toggleNewRowActions(!0)),_.isFunction(this.options.onBeforeFormRender)&&!1===this.options.onBeforeFormRender(d,e,t.operation||n))return;this._setGridEditMode(!0),this.disableActions(!0),c.removeClass("disabled-action"),this.options.runInNgZone((function(){h.makeRowEditable(s,d)})),a.addClass("hidden"),l.removeClass("hidden"),u.removeClass("hidden"),i=s.find("td.cell-editing"),!t.skipFocus&&i&&this.options.timeoutCall((function(){h.setFocusOnElement(e,i)})),_.isFunction(this.options.onFormRender)&&this.options.onFormRender(s,e,t.operation||n,s.hasClass("always-new-row"))}else if(i=s.find("td.cell-editing"),r=h._isNewRow(s),"save"===n)if(!!r||this.isDataModified(i,d,p)){if(i.each((function(){var e,t=$(this),n=t.attr("data-col-id"),i=h.preparedHeaderData[n],o=_.split(i.field,".");e=h.getTextValue(i.field,p),1===o.length&&"upload"===i.editWidgetType?_.set(d,i.field,h.getUploadedFiles(t,i.field)):(e=1!==o.length&&!r||""!==e?e:void 0,h.Utils.isDefined(e)?null===(e="null"===e?null:e)?o.length>1?_.set(d,o[0],e):r||_.set(d,i.field,""):_.set(d,i.field,e):1!==o.length||r||_.set(d,i.field,e))})),i.find(".ng-pending").length>0)return void setTimeout(this.toggleEditRow.bind(this,e,t),200);if((o=i.find(".ng-invalid")).length>0)return o.each((function(e){var t=$(this).closest("td.app-datagrid-cell");0===e&&t.find("[focus-target]").focus(),h.options.setTouched(t.find("[formcontrolname]").attr("formcontrolname"))})),void(_.isFunction(t.success)&&t.success(!1,!0));if(r&&f&&_.isEmpty(d))return h.removeNewRow(s),void(_.isFunction(t.success)&&t.success(!1,void 0,!0));if(r){if(_.isFunction(this.options.onBeforeRowInsert)&&!1===this.options.onBeforeRowInsert(d,e,m))return;this.options.onRowInsert(d,e,g,m),h.toggleNewRowActions(!1),!s.hasClass("always-new-row")&&h.options.isNavTypeScrollOrOndemand()&&h.removeNewRow(s)}else{if(_.isFunction(this.options.onBeforeRowUpdate)&&!1===this.options.onBeforeRowUpdate(d,e,m))return;this.options.afterRowUpdate(d,e,g,m)}}else this.cancelEdit(s),t.noMsg||this.options.noChangesDetected(),_.isFunction(t.success)&&t.success(!1);else{if(r)return void h.removeNewRow(s);this.cancelEdit(s)}this.addOrRemoveScroll()}},cancelEdit:function(e){var t=this,n=e.find("td.cell-editing"),r=e.find(".cancel-edit-row-button"),i=e.find(".save-edit-row-button"),o=e.find(".edit-row-button");this.options.clearActionRowIndex(),this.disableActions(!1),e.removeClass("row-editing"),n.off("click"),n.each((function(){var e=$(this),n=e.data("originalValue");e.removeClass("datetime-wrapper cell-editing required-field form-group"),n?e.html(t.options.getCustomExpression(n.fieldName,n.rowIndex)):e.text(e.data("originalText")||"")})),$("typeahead-container").removeClass("open"),o.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this._setGridEditMode(!1)},closeEditedRow:function(){var e=this.gridElement.find("tr.app-datagrid-row.row-editing");e.length&&(this._isNewRow(e)?this.removeNewRow(e):this.cancelEdit(e))},hideRowEditMode:function(e){if(e.hasClass("always-new-row")&&this.options.isNavTypeScrollOrOndemand())this.resetNewRow(e);else{var t=e.find("td.cell-editing"),n=e.find(".edit-row-button"),r=e.find(".cancel-edit-row-button"),i=e.find(".save-edit-row-button"),o=this;e.removeClass("row-editing"),t.off("click"),this.disableActions(!1),this._setGridEditMode(!1),t.each((function(){var e,t,n=$(this),r=n.data("originalValue");n.removeClass("datetime-wrapper cell-editing required-field form-group"),r?n.html(o.options.getCustomExpression(r.fieldName,r.rowIndex)):(t=o.preparedHeaderData[n.attr("data-col-id")],e=o.getTextValue(t.field),n.text(o.Utils.isDefined(e)?e:""))})),n.removeClass("hidden"),r.addClass("hidden"),i.addClass("hidden"),this.addOrRemoveScroll()}},deleteRow:function(e){e.stopPropagation();var t,n,r=$(e.target).closest("tr.app-datagrid-row"),i=r.attr("data-row-id"),o=this.options.data[i],s=this._isNewRow(r),a={},l=this;if(this.options.setActionRowIndex(i),this.options.setLastActionPerformed(this.options.ACTIONS.DELETE),_.isFunction(this.options.beforeRowDelete)&&this.options.beforeRowDelete(o,e),s)return this.disableActions(!1),this._setGridEditMode(!1),r.attr("data-removed",!0),r.remove(),this.preparedData.length||this.setStatus("nodata",this.dataStatus.nodata),void this.addOrRemoveScroll();_.isFunction(this.options.onBeforeRowDelete)&&!1===this.options.onBeforeRowDelete(o,e,a)||_.isFunction(this.options.onRowDelete)&&(t=this.options.cssClassNames.deleteRow,(n=-1!==r.attr("class").indexOf("active"))&&r.removeClass("active"),r.addClass(t),this.options.onRowDelete(o,(function(){n&&r.addClass("active"),r.removeClass(t),l.addOrRemoveScroll()}),e,(function(t,n){if(l.options.isNavTypeScrollOrOndemand()){var r=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),i=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+r+'"]');l.options.setDeletedRowIndex(r),l.preparedData.splice(r,1),l.options.data.splice(r,1),l.gridElement.find("tr.app-datagrid-row:gt("+r+")").each((function(e,t){i.is(":last-child")||$(t).hasClass("always-new-row")||($(t).attr("data-row-id",r),l.preparedData[r].$$pk--,l.preparedData[r].$$index--,l.preparedData[r].$index--,r++)})),i.remove()}var o,s;l.options.editmode===l.CONSTANTS.QUICK_EDIT&&($(e.target).hasClass("delete-row-button")||l.Utils.isDeleteKey(e))&&(l.__setStatus(),n||(o=+$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),(s=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+o+'"]')).length||(s=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+(o-1)+'"]')),s.trigger("click",[void 0,{action:"edit",skipFocus:t}])))}),a))},deleteRowAndUpdateSelectAll:function(e){this.deleteRow(e),this.updateSelectAllCheckboxState()},_deselectPreviousSelection:function(e,t){var n=this.gridElement.find("tr.app-datagrid-row.active"),r=e.attr("data-row-id"),i=this;n.each((function(){var e=$(this).attr("data-row-id"),n=i.preparedData[e];e!==r&&n&&($(this).find("input[rowSelectInput]:radio").prop("checked",!1),n._selected=n._checked=!1,$(this).removeClass("active"),i.options.callOnRowDeselectEvent(n,t))}))},resetSortIcons:function(e){var t;this.isResetSortIconsDone=!0,!e&&this.gridHeaderElement&&(e=(t=this.gridHeaderElement.find(".sort-buttons-container.active")).find("i.sort-icon"),t.removeClass("active")),e.removeClass("desc asc").removeClass(this.options.cssClassNames.descIcon).removeClass(this.options.cssClassNames.ascIcon)},setSortIconDefault:function(){const e=this.options.sortInfo,t=this.tableContainer.find("[data-col-field='"+e.field+"']").find(".sort-buttons-container"),n=t.find("i.sort-icon"),r=e.direction;"asc"===r?(n.addClass(r+" "+this.options.cssClassNames.ascIcon),t.addClass("active")):"desc"===r&&(n.addClass(r+" "+this.options.cssClassNames.descIcon),t.addClass("active"))},sortHandler:function(e){e.stopImmediatePropagation(),$(e.target).hasClass("header-data")&&this.options.enableColumnSelection&&this.headerClickHandler(e);var t,n,r,i=$(e.target).closest("th.app-datagrid-header-cell"),o=i.attr("data-col-id"),s=i.find(".sort-buttons-container"),a=s.find("i.sort-icon"),l=a.hasClass("asc")?"desc":"asc",u=this.options.sortInfo,c=this.gridHeaderElement.find(".sort-buttons-container.active"),d=i.attr("data-col-field");this.resetSortIcons(a),a.addClass(l),"asc"===l?(a.addClass(this.options.cssClassNames.ascIcon),s.addClass("active")):"desc"===l&&(a.addClass(this.options.cssClassNames.descIcon),s.addClass("active")),c.length&&(n=c.closest("th.app-datagrid-header-cell").attr("data-col-id"),r=this.preparedHeaderData[n],t=c.find("i.sort-icon"),r.field!==d&&(c.removeClass("active"),this.resetSortIcons(t)),r.sortInfo={sorted:!1,direction:""}),u.direction=l,u.field=d,""!==l&&(this.preparedHeaderData[o].sortInfo={sorted:!0,direction:l}),this._setGridEditMode(!1),this.closeEditedRow(),this.options.sortHandler.call(this,this.options.sortInfo,e,"sort")},processUpDownKeys:function(e,t,n){var r=this,i=t.find("input").val();t.hasClass("row-editing")&&r.options.editmode===r.CONSTANTS.QUICK_EDIT&&i?r.toggleEditRow(e,{action:"save",noMsg:!0,success:function(i,o){r.editSuccessHandler(i,o,e,t,!0,n)}}):(t="down"===n?t.next():t.prev(),this.options.rowExpansionEnabled&&!t.is(":visible")&&(t="down"===n?t.next():t.prev()),t.focus())},resetNewRow:function(e){var t={},n=this;this.options.clearForm(!0),n.setDefaultRowData(t),e.find("[data-field-name]").each((function(){var e=$(this),r=e.attr("data-field-name")+"_new";n.options.setFieldValue(r,t[e.attr("data-field-name")]||"")})),n.options.safeApply(),n.setFocusOnElement(void 0,e,!0)},_onEnter:function(e,t,n,r){var i=this;e.is("button")||(n&&e.hasClass("app-datagrid-row")&&!e.hasClass("row-editing")?t.trigger("click",[void 0,{action:"edit"}]):t.hasClass("row-editing")&&e.closest("[data-field-name]").length?(e.blur(),i.toggleEditRow(r,{action:"save",success:function(t,n){n?e.focus():(i.focusActiveRow(),i.focusNewRow())}})):(t.trigger("click"),n&&e.hasClass("always-new-row")&&e.hasClass("row-editing")&&i.focusNewRow()),e.is("button")||r.stopPropagation())},onKeyDown:function(e){var t,n=$(e.target),r=n.closest("tr.app-datagrid-row"),i=this.options.editmode===this.CONSTANTS.QUICK_EDIT;if(this.options.rowExpansionEnabled&&!r.length&&(r=n.closest("tr.app-datagrid-detail-row")),!this.Utils.isDeleteKey(e))return 27===e.which?((t=this._isNewRow(r))&&r.hasClass("always-new-row")?(n.blur(),this.resetNewRow(r)):r.trigger("click",[void 0,{action:"cancel"}]),void(t||r.focus())):13===e.which?(e.stopPropagation(),void this._debounceOnEnter(n,r,i,e)):void(38!==e.which?40===e.which&&this.processUpDownKeys(e,r,"down"):this.processUpDownKeys(e,r,"up"));!this.options.actionsEnabled.delete||n.is("input")||n.hasClass("form-control")||this.deleteRow(e)},editSuccessHandler:function(e,t,n,r,i,o){var s,a,l=this;if(l.__setStatus(),t)l.setFocusOnElement(n);else{if(s=+r.attr("data-row-id"),o)return s="down"===o?++s:--s,void((a=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+s+'"]')).length?a.focus():r.focus());i||_.isUndefined(i)||s++,(a=l.gridElement.find('tr.app-datagrid-row[data-row-id="'+s+'"]')).hasClass("always-new-row")?("top"!==l.options.formPosition||r.hasClass("always-new-row"))&&l.addNewRow(e):a.length?a.trigger("click",[void 0,{action:"edit",skipFocus:e,skipSelect:l.options.multiselect}]):l.options.actionsEnabled.new&&l.addNewRow(e)}},isLastColumn:function(e){var t,n=e.closest("td.app-datagrid-cell");return!!n.is(":last-child")||!!n.hasClass("cell-editing")&&(t=n.closest("tr.app-datagrid-row").find(".cell-editing").has('> :not([disabled="disabled"])'),n.attr("data-col-id")===t.last().attr("data-col-id"))},getColInfo:function(e){var t=$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),n=$(e.target).closest("td.app-datagrid-cell").attr("data-col-id");return!!(this.columnClickInfo&&this.columnClickInfo[t]&&this.columnClickInfo[t][n])&&this.columnClickInfo[t][n]},attachEventHandlers:function(e){var t=this.gridHeaderElement,n=this;this.options.enableRowSelection&&(e[0].removeEventListener("click",this.rowClickHandlerOnCapture.bind(this)),e.off(),e[0].addEventListener("click",this.rowClickHandlerOnCapture.bind(this)),e.on("click",this.rowSelectionHandler.bind(this)),e.on("click","td *",(function(e){if("checkbox"!=e.target.type){var t=$(e.target).closest("tr.app-datagrid-row").attr("data-row-id"),r=$(e.target).closest("td.app-datagrid-cell").attr("data-col-id"),i=Number(r);n.preparedHeaderData[i].readonly&&(n.columnClickInfo[t]={},n.columnClickInfo[t][r]=!0)}})),e.on("dblclick",this.rowDblClickHandler.bind(this)),e.on("keydown",this.onKeyDown.bind(this))),t&&(this.options.enableColumnSelection?(t.find("th[data-col-selectable]").off("click",this.columnSelectionHandler.bind(this)),t.find("th[data-col-selectable]").on("click",this.columnSelectionHandler.bind(this))):t.find("th[data-col-selectable]").off("click"),this.options.enableSort?this.options.enableColumnSelection?(t.find("th[data-col-sortable] .header-data").off("click",this.sortHandler.bind(this)),t.find("th[data-col-sortable] .header-data").on("click",this.sortHandler.bind(this))):(t.find("th[data-col-sortable]").off("click",this.sortHandler.bind(this)),t.find("th[data-col-sortable]").on("click",this.sortHandler.bind(this))):this.options.enableColumnSelection?t.find("th[data-col-sortable] .header-data").off("click"):t.find("th[data-col-sortable]").off("click")),this.options.rowActions.length&&(e.find(".cancel-edit-row-button").off("click"),e.find(".save-edit-row-button").off("click"),e.find(".cancel-edit-row-button").on("click",{action:"cancel"},this.toggleEditRow.bind(this)),e.find(".save-edit-row-button").on("click",{action:"save"},this.toggleEditRow.bind(this))),n.options.editmode===n.CONSTANTS.QUICK_EDIT&&e.on("focusout","tr.app-datagrid-row",(function(e){var t=$(e.target),r=t.closest("tr.app-datagrid-row"),i=$(e.relatedTarget),o=n.isLastColumn(t,i),s=t.closest("span.actions-column").length>0,a=i.closest("span.actions-column").length>0,l=i.closest("div.app-datagrid-actions").length>0,u=i.closest("div.app-datagrid-actions").length>0;i.is("tr.app-datagrid-row")&&i.attr("data-row-id")===r.attr("data-row-id")||a||r.hasClass("danger")||u||s&&a||s&&null===e.relatedTarget||!i.closest(".app-grid").length||i.is('.row-editing:not(".always-new-row"), .row-action-button, .app-datagrid-cell, .caption, button.btn-time, button.btn-date')||""===i.attr("focus-target")||(l||s||!(!o||o&&null===e.relatedTarget||t.hasClass("file-upload")))&&n.options.timeoutCall((function(){n.toggleEditRow(e,{action:"save",noMsg:!0,success:function(t,i,o){o||n.editSuccessHandler(t,i,e,r)}})}))})),e.find('[data-identifier="rowExpansionButtons"]').off("click"),e.find('[data-identifier="rowExpansionButtons"]').on("click",(function(e){var t=$(e.target).closest("tr.app-datagrid-row");$(this).find(".app-button").attr("disabled")||n.toggleExpandRow(+t.attr("data-row-id"),void 0,e)}))},expandRow:function(e){this.toggleExpandRow(e,!0)},collapseRow:function(e){this.toggleExpandRow(e,!1)},_collapseRow:function(e,t,n,r,i){var o=this.gridElement,s=$(o.find('> tr.app-datagrid-row[data-row-id="'+n+'"]'));s.removeClass(this.options.cssClassNames.expandedRowClass),s.find("button, a").attr("aria-expanded","false").attr("aria-live","polite"),!1!==this.options.onBeforeRowCollapse(e,t,n)&&(i.length&&i.hasClass(this.options.cssClassNames.rowExpandIcon)&&i.removeClass(this.options.cssClassNames.rowExpandIcon).addClass(this.options.cssClassNames.rowCollapseIcon),r.hide(),this.options.onRowCollapse(e,t))},toggleExpandRow:function(e,t,n){var r=this,i=r.gridElement,o=$(i.find('> tr.app-datagrid-row[data-row-id="'+e+'"]')),s=_.clone(r.options.data[e]),a=o.next("tr.app-datagrid-detail-row"),l=!a.is(":visible"),u=o.find('[data-identifier="rowExpansionButtons"] i.app-icon');s.$index=e+1,t&&!l||!1===t&&l||(l?(o.addClass(r.options.cssClassNames.expandedRowClass),o.find("button, a").attr("aria-expanded","true"),n&&r.preparedData[e]._selected&&n.stopPropagation(),r.options.rowDef.closeothers&&i.find("> tr.app-datagrid-detail-row:visible").each((function(){var e=$(this),t=e.prev("tr.app-datagrid-row").find('[data-identifier="rowExpansionButtons"] i.app-icon'),i=+e.attr("data-row-id"),o=r.options.data[i];e.hide(),r._collapseRow(n,o,i,e,t)})),r.options.generateRowDetailView(n,s,e,a.find("td.app-datagrid-row-details-cell .details-section"),a.find("td.app-datagrid-row-details-cell .row-overlay"),(function(){u.length&&u.hasClass(r.options.cssClassNames.rowCollapseIcon)&&u.removeClass(r.options.cssClassNames.rowCollapseIcon).addClass(r.options.cssClassNames.rowExpandIcon),a.show()}))):r._collapseRow(n,s,e,a,u))},_findAndReplaceCompiledTemplates:function(){if(this.gridElement){var e=this.gridElement.find("td[data-compiled-template]"),t=this;e.each((function(){var e=$(this),n=e.attr("data-compiled-template");e.replaceWith(t.compiledCellTemplates[n])}))}},_renderSearch:function(){var e,t=$(this._getSearchEl()),n=this;function r(e){e.stopPropagation();var r=t.find('[data-element="dgSearchText"]')[0].value,i=t.find('[data-element="dgFilterValue"]')[0].value,o=t.find("option:selected").attr("data-coldef-index"),s=n.options.colDefs[o],a=s&&s.type?s.type:"";n.searchObj={field:i,value:r,type:a,event:e},n.options.searchHandler.call(n,n.searchObj,e,"search")}this.element.find(".form-search").remove(),t.insertBefore(this.gridContainer),this.gridSearch=this.element.find(".form-search"),e=this.gridSearch.find('[data-element="dgSearchText"]'),this.gridSearch.find(".app-search-button").on("click",r),this.gridSearch.find('[data-element="dgFilterValue"]').on("change",(function(e){n.dataStatusContainer.find(".status").text()===n.options.dataStates.nodata&&r(e)})),e.on("keyup",(function(e){e.stopPropagation(),$(this).val()?n.emptySearch=!1:(n.emptySearch=!0,n.searchObj.value&&(n.searchObj.value="",r(e))),(13===e.which||n.options.filteronkeypress)&&r(e)}))},_renderRowFilter:function(){var e=$('<tr class="filter-row"></tr>'),t=this,n=this.options.isMobile&&!this.options.showHeader?this.gridElement:this.gridHeaderElement;n.find(".filter-row").remove(),this.options.generateFilterRow(),this.preparedHeaderData.forEach((function(n,r){var i=n.field,o=$('<th data-col-id="'+r+'"></th>');n.searchable?(o.append(t.options.getFilterWidget(i)),e.append(o)):e.append(o)}),this),this.options.showHeader?this.gridHeaderElement.append(e):(this.options.isMobile,n.empty().append(e)),this.gridSearch=n.find(".filter-row")},_renderHeader:function(){var e,t=this._getHeaderTemplate(),n=t.colgroup,r=this;if(this.gridElement.parent().scroll((function(){r.gridHeaderElement.parent().prop("scrollLeft",this.scrollLeft)})),!this.options.showHeader)return this.tableContainer.append(n),void this.gridHeaderElement.hide();this.gridHeaderElement.show();var i=(e=t.header).find("th.app-datagrid-header-cell"),o=n.find("col");i.each((function(){var e=Number($(this).attr("data-col-id")),t=r.preparedHeaderData[e],n=$(o[e]);t&&(_.isUndefined(t.show)||t.show||($(this).hide(),n.hide()))})),this.options.isMobile,this.tableContainer.append(n),e.on("click",".app-datagrid-header-cell input:checkbox",(function(e){var t=$('tr.app-datagrid-row:not(.always-new-row):visible td input[name="gridMultiSelect"]:checkbox',r.gridElement),n=this.checked;t.prop("checked",n),t.each((function(){var t=$(this).closest("tr.app-datagrid-row"),i=t.attr("data-row-id"),o=r.options.data[i];r.options.assignSelectedItems(o,e,{rowId:i,_selected:r.preparedData[i]?._selected}),r.toggleRowSelection(t,n,e,!0),n&&_.isFunction(r.options.onRowSelect)&&r.options.onRowSelect(o,e),!n&&_.isFunction(r.options.onRowDeselect)&&r.options.onRowDeselect(o,e)}))})),_.isFunction(this.options.onHeaderClick)&&this.gridHeaderElement.find("th.app-datagrid-header-cell").on("click",this.headerClickHandler.bind(this)),!this.options.isMobile&&this.gridHeaderElement.length&&this.gridHeaderElement.find("th[data-col-resizable]").resizable({handles:"e",minWidth:50,resize:function(e,t){var n,i,o,s,a=+t.helper.attr("data-col-id")+1,l=t.helper.width(),u=t.size.width;i=r.tableContainer.find("colgroup > col:nth-child("+a+")"),n=r.tableContainer.find("colgroup > col:nth-child("+a+")"),o=r.gridElement.find("tr.app-datagrid-row > td:nth-child("+a+") > div"),n.width(u),i.width(u),o.width(u),$(this).css("height","auto"),u>t.originalSize.width&&(s=r.gridHeaderElement.width()+u-l,r.gridHeaderElement.width(s),r.gridElement.width(s)),r.addOrRemoveScroll(),r.options.redrawWidgets()}}),this.isResetSortIconsDone||this.setSortIconDefault()},addOrRemoveScroll:function(){var e=this.gridContainer.find("tbody"),t=this.gridContainer.find(".table-header");e.scrollHeight>e.clientHeight&&!this.Utils.isMac()?t.addClass("scroll-visible"):t.removeClass("scroll-visible")},_handleCustomEvents:function(e,t){this.options.handleCustomEvents(e,t)},_setActionsEnabled:function(){var e=this;_.forEach(this.options.rowActions,(function(t){_.includes(t.action,"editRow(")?e.options.actionsEnabled.edit=!0:_.includes(t.action,"deleteRow(")&&(e.options.actionsEnabled.delete=!0)}))},_appendRowActions:function(e,t,n){var r,i=this._getRowActionsColumnDef();(this.options.rowActions.length||i)&&(this._setActionsEnabled(),r=this,e.find("[data-identifier='actionButtons']").each((function(e){var i,o,s,a=e;t?i=n:(o=$(this).closest("tr.app-datagrid-row"),s=parseInt(o.attr("data-row-id"),10),(i=_.clone(r.options.data[s])).$index=a+1),r.options.generateRowActions(i,a),$(this).empty().append(r.options.getRowAction(a))})))},_renderGrid:function(e){var t,n=this.options.isNavTypeScrollOrOndemand();this.getPageStartIndex();if($("table.table-bordered").parents(".app-grid-header-inner").addClass("table_border"),n){var r=this.gridElement,i=this._getGridTemplate();t=$(i),i&&!r.length&&this.gridElement.append(t)}else{var o=this._getGridTemplate();t=$(o),o&&this.gridElement.append(t)}if(this.options.summaryRow){var s=$(this._getSummaryRowTemplate());this.tableContainer.find("tfoot").remove(),this.options.data.length&&this.tableContainer.append(s)}this.options.data.length||"nodata"!==this.dataStatus.state?(this.dataStatus.state=this.dataStatus.state||"loading",this.dataStatus.message=this.dataStatus.message||this.options.dataStates.loading,this.setStatus(this.dataStatus.state,this.dataStatus.message,e)):this.setStatus("nodata"),this.gridBody=this.gridElement.find("tbody"),this.gridFooter=this.tableContainer.find("tfoot"),this._findAndReplaceCompiledTemplates(),this.options.clearRowActions(),this._appendRowExpansionButtons(t),this._appendRowActions(t),this.attachEventHandlers(t),this.__setStatus(e),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&this.options.showNewRow&&this.addNewRow(!1,!0),e&&this._setColSpan(this.options.headerConfig),_.isFunction(this.options.onDataRender)&&this.options.onDataRender(),!e&&this.options.selectFirstRow&&(this.options.multiselect&&(this.options.selectFirstRow=!1),this.gridElement.find("tr.app-datagrid-row.active").length<=0&&this.selectFirstRow(!0,!0))},_render:function(e){this.tableId||(this.tableId=this.Utils.generateGuid());!this.options.isNavTypeScrollOrOndemand()||"100%"!==this.options.height&&this.options.height;var t='<div class="overlay"><div class="status"><i class="'+this.options.loadingicon+'"></i><span class="message"></span></div></div>',n='<div class="table-container table-responsive"><div class="app-grid-header"><div class="app-grid-header-inner"><table tabindex="0" class="'+this.options.cssClassNames.gridDefault+" "+this.options.cssClassNames.grid+'"><thead tabindex="0" class="table-header thead-sticky" id="table_header_'+this.tableId+'"></thead><tbody class="app-grid-content app-datagrid-body" id="table_'+this.tableId+'"></tbody></table></div></div></div>',r=$(t),i=this.element.find(".table-container");this.gridContainer=$(n),this.gridHeaderElement=this.gridContainer.find(".table-header"),this._setStyles(r.find("div.overlay"),"display:none"),this._setStyles(this.gridContainer.find("div.app-grid-header-inner"),"height:"+this.options.height+"; overflow: auto;"),this.tableContainer=this.gridContainer.find("table"),this.gridElement=this.gridContainer.find(".app-grid-content"),(!this.options.isNavTypeScrollOrOndemand()||i.length&&this.options.isNextPageData)&&this.options.isNavTypeScrollOrOndemand()||(this.element.find(".table-container").remove(),this.element.append(this.gridContainer)),this.options.setIsNextPageData(!1),this.gridContainer.find(".overlay").length||(this.dataStatusContainer=$(t),this.gridContainer.append(this.dataStatusContainer)),this.gridHeaderElement&&(this.gridHeaderElement.empty(),this.gridElement.find("colgroup").remove()),this._renderHeader(),this.options.filtermode===this.CONSTANTS.SEARCH&&(_.isEmpty(this.searchObj)||this.searchObj&&!this.searchObj.field&&!this.searchObj.value)?this._renderSearch():this.options.filtermode===this.CONSTANTS.MULTI_COLUMN&&this._renderRowFilter(),"condensed"===this.options.spacing&&this._toggleSpacingClasses("condensed"),this._renderGrid(e),this.addNavigationControls()},addNavigationControls:function(){this.options.isdynamictable&&(this.element.find(".on-demand-datagrid").remove(),"On-Demand"!==this.options.navigation||this.element.find(".on-demand-datagrid").length?"Scroll"===this.options.navigation&&this.options.bindScrollEvt():this.options.addLoadMoreBtn())},__setStatus:function(e){var t=this.dataStatusContainer.find("i"),n=this.dataStatus.state,r=this.options.isNavTypeScrollOrOndemand();this.dataStatusContainer.find(".message").text(this.dataStatus.message),"loading"===n?t.removeClass("hidden"):t.addClass("hidden"),"ready"===n?this.dataStatusContainer.hide():(this.options.isNavTypeScrollOrOndemand()&&("nodata"===n||this.options.getCurrentPage()==this.options.getPageCount()&&!this.options.showviewlessbutton)&&this.element.find(".on-demand-datagrid a").hide(),this.dataStatusContainer.show()),"nodata"===n||"loading"===n||"error"===n?("100%"!==this.options.height&&"auto"!==this.options.height||("nodata"===n?(this.dataStatusContainer.css("height","auto"),this.dataStatus.contentHeight=0):this.options.isNavTypeScrollOrOndemand()&&this.options.getCurrentPage()>1?this.dataStatusContainer.hide():(this.dataStatus.height=this.dataStatus.height||this.dataStatusContainer.outerHeight(),this.dataStatus.contentHeight=this.gridElement.outerHeight()||this.dataStatus.contentHeight,this.dataStatusContainer.css("height",this.dataStatus.height>this.dataStatus.contentHeight?"auto":this.dataStatus.contentHeight))),(!r||r&&1===this.options.getCurrentPage())&&this.gridContainer.addClass("show-msg")):(this.gridContainer.removeClass("show-msg"),this.options.editmode===this.CONSTANTS.QUICK_EDIT&&(this.options.activeRow&&this.attachHandlersToActiveRow(this.options.activeRow),this.options.activeRow=void 0)),e||this.setColGroupWidths(),this.addOrRemoveScroll()},attachHandlersToActiveRow(e){var t=this.Utils.getObjectIndex(this.options.data,e),n=this.gridElement.find("tr.app-datagrid-row[data-row-id="+t+"]");n.length&&(n.hasClass("active")||n.addClass("active"),this.focusActiveRow(),this.attachEventHandlers(n))},setActiveRow(e){this.options.activeRow=e},setStatus:function(e,t,n){var r;"nodata"===e&&(e=(r=this.gridElement&&this.gridElement.find("tr.app-datagrid-row.always-new-row"))&&r.length?"ready":e),this.dataStatus.state=e,this.options.setGridState(e),this.dataStatus.message=t||this.options.dataStates[e],this._setStatusCalled?this._setStatus(n):(this.__setStatus(n),this._setStatusCalled=!0)},setGridDimensions:function(e,t){if(-1===t.indexOf("px")&&-1===t.indexOf("%")&&-1===t.indexOf("em")&&"auto"!=t&&(t+="px"),this.options[e]=t,"height"===e){this.gridHeaderElement.find("th");this.gridContainer.find(".app-grid-header-inner").css(e,t),this.options.isNavTypeScrollOrOndemand()&&"100%"!=this.options.height&&"auto"!=this.options.height&&this.gridContainer.find(".app-grid-header-inner").css("overflow","auto"),this.dataStatusContainer.css(e,t)}this.addOrRemoveScroll()},setColumnProp:function(e,t,n,r){var i;"displayName"===t&&((i=r?this.gridHeaderElement.find('th[data-col-group="'+e+'"]'):this.gridHeaderElement.find('th[data-col-field="'+e+'"]')).attr("title",n),i.find(".header-data").html(n),this.options.filtermode===this.CONSTANTS.SEARCH&&this.gridSearch&&this.gridSearch.find('select option[value="'+e+'"]').text(n))},applyRowNgClass:function(e,t){var n=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+t+'"]');n.removeClass(e.toRemove),n.addClass(e.toAdd)},applyColNgClass:function(e,t,n){var r=this.gridElement.find('tr.app-datagrid-row[data-row-id="'+t+'"] td.app-datagrid-cell[data-col-id="'+n+'"]');r.removeClass(e.toRemove),r.addClass(e.toAdd)},_destroy:function(){this.element.text(""),window.clearTimeout(this.refreshGridTimeout)}}),window.requestAnimationFrame=function(){"use strict";return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimaitonFrame||function(e){window.setTimeout(e,1e3/60)}}(),function(e){"use strict";var t,n,r={NONE:0,HORIZONTAL:1,LEFT_TO_RIGHT:2,RIGHT_TO_LEFT:3,VERTICAL:4,TOP_TO_DOWN:5,DOWN_TO_TOP:6},i=Math.abs,o=Math.max,s=["INPUT","SELECT","OPTION"],a=e("<div></div>");a.css({"background-color":"rgba(0, 0, 0, 0)",position:"fixed",top:0,width:"100vw",height:"100vh","z-index":1e5});var l=[],u=[],c=null,d=function(t){t&&(t.pointerId&&t.pointerId!==c||t.touches&&t.touches.length>1)&&h(t),e.each(l,(function(e,n){return n(t)}))},h=function(t){c=null,e.each(u,(function(e,n){return n(t)})),l.length=0,u.length=0};function p(e,t,n){(e.__zone_symbol__addEventListener||e.addEventListener).call(e,t,n,{passive:!0})}function f(t,n,r){var i=function(t){for(var r=n;r;)t.push({$ele:e(r),last:{scrollLeft:r.iscroll?r.iscroll.x:r.scrollLeft,scrollTop:r.iscroll?r.iscroll.y:r.scrollTop}}),r=r.parentElement;return t}([]);this.hasSrcolled=function(){return r===e.fn.swipey.DIRECTIONS.VERTICAL?(e.each(i,(function(){this.$ele[0].iscroll?isNaN(this.$ele[0].iscroll.y)||0===this.$ele[0].iscroll.y||(t=!0):0!==this.$ele[0].scrollTop&&(t=!0)})),t):r===e.fn.swipey.DIRECTIONS.HORIZONTAL?function(){var t;return e.each(i,(function(){this.$ele[0].iscroll?isNaN(this.$ele[0].iscroll.x)||0===this.$ele[0].iscroll.x||(t=!0):0!==this.$ele[0].scrollLeft&&(t=!0)})),t}():void 0;var t}}function m(e){return e.originalEvent&&"mouse"!==e.originalEvent.pointerType?e.originalEvent:e.originalEvent&&e.originalEvent.touches&&e.originalEvent.touches[0]||e&&e.touches&&e.touches[0]||e}function g(e,t,n){var s,a,l=0;return n===r.HORIZONTAL?l=t.x-e.x:n===r.LEFT_TO_RIGHT?l=o(t.x-e.x,0):n===r.RIGHT_TO_LEFT?l=o(e.x-t.x,0):n===r.VERTICAL?l=t.y-e.y:n===r.TOP_TO_DOWN?l=o(t.y-e.y,0):n===r.DOWN_TO_TOP?l=o(e.y-t.y,0):(s=t.x-e.x,a=t.y-e.y,l=o(i(s),i(a)),(s<0&&i(s)===l||a<0&&i(a)===l)&&(l=-l)),l}function v(e,r){var i=m(e);i&&r.data.path.push({x:i.pageX,y:i.pageY}),n.push((function(){t.onSwipeEnd(e,r.data),r.onSwipeEnd.call(r.target,e,r.data)})),n.process()}function y(r,o){var s,c,d,h=m(r),p=o.data.path[0],f={x:h.pageX,y:h.pageY};return d=g(p,f,o.direction),o.data.length=d<0?-1:1,o.lastDistance=o.data.length,o.data.path=[f],o.data.totalLength=i(o.data.length),o.data.startTime=Date.now(),!1!==o.onSwipeStart.call(o.target,r,o.data)&&(a.appendTo(e("body")),s=function(r){!function(r,o){var s,a,l=m(r),u=o.data.path[0],c={x:l.pageX,y:l.pageY},d=g(u,c,o.direction),h=[];if(o.renderInProgress=!1,d!==o.lastDistance){s=30*(d<o.lastDistance?-1:1),a=d-o.lastDistance;for(var p=s;s>0&&p<=a||s<0&&p>=a;p+=s)h.push(p+o.lastDistance);a%s!=0&&h.push(a%i(s)+(0===h.length?o.lastDistance:h[h.length-1])),o.lastDistance=d,e.each(h,(function(){var e=this;n.push((function(){o.data.length=e,o.data.totalLength+=i(e),o.data.velocity=i(o.data.totalLength/(Date.now()-o.data.startTime)),o.data.path.push(c),!1===o.onSwipe.call(o.target,r,o.data)&&v(r,o),t.onSwipe(r,o.data)}))})),n.process()}}(r,o)},c=function(e){a.remove(),v(e,o)},(l=[]).push(s),(u=[]).push(c),t.onSwipeStart(r,o.data),!0)}function b(e,t){var n=t.data.path[0],o={x:e.pageX,y:e.pageY},s=g(n,o,t.direction);return i(s)>t.threshold&&function(e,t,n){if(n===r.HORIZONTAL){if(Math.abs((t.y-e.y)/(t.x-e.x))<=.36397023426)return!0}else if(n===r.VERTICAL&&Math.abs((t.y-e.y)/(t.x-e.x))>=2.74747741945)return!0;return!1}(n,o,t.direction)}function w(e){var t=e.bindEvents,n="";_.includes(t,"touch")?n+="touchstart":_.includes(t,"mouse")?n+="mousedown":_.includes(t,"pointer")&&(n+="pointerdown"),n&&p(e.target[0],n,(function(t){if(!e.disableMouse||"mouse"!==t.pointerType){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(s.indexOf(t.target.tagName)<0))return;t.preventDefault()}var n=m(t);n&&function(e,t){var n;t.scrollObserver=new f(event.currentTarget,event.target,t.direction),n=function(e){if(b(m(e),t)&&(t.scrollObserver.hasSrcolled()||y(e,t)))return!1},l.push(n),t.data={path:[{x:e.pageX,y:e.pageY}]}}(n,e)}}))}window.PointerEvent&&function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return parseInt(e[1],10)}}()>=13?(p(document,"pointerdown",(function(e){c&&c!==e.pointerId?h(e):c=e.pointerId})),p(document,"pointermove",d),p(document,"pointerup",h),p(document,"pointercancel",h)):(p(document,"mousemove",d),p(document,"touchmove",d),p(document,"mouseup",h),p(document,"touchcancel",h),p(document,"touchend",h)),n=new function(){var e=[],t=!1;function n(){if(e.length>0){try{e.shift()()}catch(e){console.error("Function invocation failed",e)}window.requestAnimationFrame(n)}else t=!1}this.push=function(t){e.push(t)},this.process=function(){t||(t=!0,n())}},e.fn.swipey=function(t){return this.each((function(){w(e.extend({direction:r.NONE,target:e(this),bindEvents:["touch","mouse"],swipeTarget:document,threshold:30,onSwipeStart:e.noop,onSwipe:e.noop,onSwipeEnd:e.noop,disableMouse:!0},t))})),this},t={onSwipeStart:function(t,n){if(e.fn.swipey.trace){var r='<svg height="100vh" width="100vw" id ="canvas"> <path stroke="rgba(0, 0, 0, 0.5)" stroke-linecap="round" stroke-width="20" fill-opacity="0" stroke-opacity="0.8" d="M'+n.path[0].x+" "+n.path[0].y+' " /> </svg>';r.css({position:"fixed",top:0,left:0,width:"100vw",height:"100vh","z-index":1e4}),e("body").append(r),n.tracer={pathd:e("#canvas path")}}},onSwipe:function(e,t){if(t.tracer){var n=t.tracer.pathd.attr("d"),r=t.path[t.path.length-1];t.tracer.pathd.attr("d",n+" L"+r.x+" "+r.y+" ")}},onSwipeEnd:function(t,n){if(n.tracer){var r=n.path[0],i=[r,{y:r.y-50},{x:r.x+50},{y:r.y+50}],o=0;_.forEach(n.path,(function(e){var t;o!==i.length&&(!(t=i[o]).x||t.x<=e.x)&&(!t.y||t.y<=e.y)&&o++})),setTimeout((function(){e("body >#canvas").remove()}),500)}}},e.fn.swipey.DIRECTIONS=r}(jQuery),function(e){var t,n=/\$\{\{[a-zA-Z\+-/%\.\*\s\(\)\d,\\'"\$_]*\}\}/;function r(r){var i,o=[];if(t=t||(e.fn.swipeAnimation.expressionEvaluator?e.fn.swipeAnimation.expressionEvaluator:window.exprEval&&window.exprEval.Parser?function(e){var t=(new window.exprEval.Parser).parse(e);return function(e){return t.evaluate(e)}}:void 0),_.isFunction(r))return r;if(t){for(;null!==(i=n.exec(r));){var s=i[0],a=r.substring(0,i.index);r=r.substring(i.index+s.length),s=s.substring(3,s.length-2),o.push(a),o.push(t(s).bind({}))}return o.push(r),function(){var e=arguments;return _.map(o,(function(t){return _.isFunction(t)?t.apply(void 0,e):t})).join("")}}}function i(e,t,n){return _.isFunction(e)?e.apply(t,n):e}function o(e,t,n){var r=0,o=i(t.bounds,e,n);return _.isUndefined(o.center)||(r=o.center),_.isUndefined(o.lower)||(o.lower=o.lower+r),_.isUndefined(o.upper)||(o.upper=o.upper+r),o}function s(e){_.forEach(e.animation,(function(e){(_.isFunction(e.target)||e.targetFn)&&(e.targetFn=_.isUndefined(e.targetFn)?e.target:e.targetFn,e.target=e.targetFn())}))}function a(){this.setSettings=function(e,t){t.data("swipeAnimationDefaults",e)},this.getSettings=function(e){return e.data("swipeAnimationDefaults")}}function l(t,n,r,i,o,s){_.forEach(t.animation,(function(t){t.target&&(t.target.length>1?t.target.each((function(r){n.$i=r,e(this).css(_.mapValues(t.css,(function(e,t){return e(n)})))})):(n.$i=0,t.target.css(_.mapValues(t.css,(function(e,t){return e(n)})))),t.target.css({transition:"all ease-out "+r+"ms"}),t.target.one("webkitTransitionEnd transitionend",(function(){t.target.css({transition:""})})))})),setTimeout((function(){window.requestAnimationFrame((function(){n.$D===n.bounds.lower?t.onLower.call(i,s):n.$D===n.bounds.upper&&t.onUpper.call(i,s),t.onAnimation(s,o)}))}),r)}var u={gotoUpper:function(){c(this,"upper",arguments[1])},gotoLower:function(e){c(this,"lower",arguments[1])}};function c(e,t,n){var r,u=(new a).getSettings(e),c={},d=o(e,u);s(u),n=n||300,r=i(u.context,e),(c=_.extend({},r)).$d=0,c.$D="lower"===t?d.lower:d.upper,c.bounds=d,l(u,c,n,e)}function d(t,n){var u={$D:0},c={max:Math.max,min:Math.min,abs:Math.abs};if(!_.isArray(n.animation)){var d=n.animation.target||t,h=n.animation.css||n.animation;delete h[t],n.animation=[{target:d,css:h}]}_.forEach(n.animation,(function(e){e.css=_.mapValues(e.css,(function(e,t){return r(e)}))})),(new a).setSettings(n,t),t.swipey({direction:n.direction,threshold:n.threshold,bindEvents:n.bindEvents,target:n.target,onSwipeStart:function(e,r){var a,l,d,h;if(u.$d=0,u.bounds=o(this,n,[e,r.length]),_.isUndefined(u.bounds.center)?u.$D=0:u.$D=u.bounds.center,a=u.$D+r.length,u.bounds.strictLower=!(!1===u.bounds.strict||!1===u.bounds.strictLower),u.bounds.strictUpper=!(!1===u.bounds.strict||!1===u.bounds.strictUpper),!n.enableGestures()||u.bounds.strictLower&&(_.isUndefined(u.bounds.lower)&&r.length<0||!_.isUndefined(u.bounds.lower)&&u.bounds.lower>a)||u.bounds.strictUpper&&(_.isUndefined(u.bounds.upper)&&r.length>0||!_.isUndefined(u.bounds.upper)&&u.bounds.upper<a))return!1;u.vc=(l=0,d=0,h=0,{addDistance:function(e){var t=Date.now();return Math.abs(e-l)>10&&t!==d&&(h=(e-l)/(t-d),l=e,d=t),h=h<0?Math.min(h,-1):Math.max(h,1),this},getVelocity:function(){return h},getTime:function(e){return Math.abs(e/h)}}),u.context=_.extend(c,i(n.context,t)),u.localState=_.extend({},u.context),s(n),_.forEach(n.animation,(function(e){e.target&&e.target.css({transition:"none"})}))},onSwipe:function(t,r){var i=u.localState,o=u.$D+r.length;i.$d=r.length,i.$D=u.$D,u.bounds.strictLower&&!_.isUndefined(u.bounds.lower)&&u.bounds.lower>o?i.$d=u.bounds.lower-u.$D:u.bounds.strictUpper&&!_.isUndefined(u.bounds.upper)&&u.bounds.upper<o&&(i.$d=u.bounds.upper-u.$D),u.vc.addDistance(r.length),_.forEach(n.animation,(function(t){t.target&&(t.target.length>1?t.target.each((function(n){i.$i=n,e(this).css(_.mapValues(t.css,(function(e,t){return e(i)})))})):(i.$i=0,t.target.css(_.mapValues(t.css,(function(e,t){return e(i)})))))}))},onSwipeEnd:function(e,r){var i,o=u.localState,s=u.$D+r.length,a=u.vc.getVelocity();o.$d=r.length,o.$D=u.$D,!_.isUndefined(u.bounds.lower)&&a<=0&&u.$D>s?o.$D=u.bounds.lower:!_.isUndefined(u.bounds.upper)&&a>=0&&u.$D<s&&(o.$D=u.bounds.upper),o.$d=0,o.bounds=u.bounds,u.$D=o.$D,i=u.vc.getTime(o.$D-s),l(n,o,i,t,s,e)}})}e.fn.swipeAnimation=function(t){return u[t]?u[t].apply(this,arguments):(this.each((function(){d(e(this),e.extend({direction:e.fn.swipey.DIRECTIONS.HORIZONTAL,target:e(this),threshold:30,enableGestures:function(){return!0},bindEvents:["touch"],bounds:{},context:{},animation:{},onLower:e.noop,onUpper:e.noop,onAnimation:e.noop},t))})),this)}}(jQuery),function(e){function t(e,t){if(!(e.originalEvent.touches.length>1)){$(e.target).is("input")||$(e.target).is("textarea")||$(e.target).is("select")||$(e.target).is("button")||$(e.target).is("option")?e.stopPropagation():e.preventDefault();var n=e.originalEvent.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent(t,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(r)}}if(e.support.touch="ontouchend"in document,e.support.touch){var n,r=e.ui.mouse.prototype,i=r._mouseInit,o=r._mouseDestroy;r._touchStart=function(e){!n&&this._mouseCapture(e.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,t(e,"mouseover"),t(e,"mousemove"),t(e,"mousedown"))},r._touchMove=function(e){n&&(this._touchMoved=!0,t(e,"mousemove"))},r._touchEnd=function(e){n&&(t(e,"mouseup"),t(e,"mouseout"),this._touchMoved||t(e,"click"),n=!1)},r._mouseInit=function(){var t=this;t.element.bind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),i.call(t)},r._mouseDestroy=function(){var t=this;t.element.unbind({touchstart:e.proxy(t,"_touchStart"),touchmove:e.proxy(t,"_touchMove"),touchend:e.proxy(t,"_touchEnd")}),o.call(t)}}}(jQuery),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.wm_common_variables=t():e.wm_common_variables=t()}(window,(()=>(()=>{var e={"./node_modules/@metrichor/jmespath/dist/jmespath.esm.js":
|
|
614
614
|
/*!***************************************************************!*\
|
|
615
615
|
!*** ./node_modules/@metrichor/jmespath/dist/jmespath.esm.js ***!
|
|
616
616
|
\***************************************************************/
|
|
@@ -1609,7 +1609,7 @@ i.version="2.30.1",o(Zn),i.fn=uo,i.min=er,i.max=tr,i.now=nr,i.utc=m,i.unix=co,i.
|
|
|
1609
1609
|
function(e,t){var n,r,i;!function(o,s){"use strict";r=[],void 0===(i="function"==typeof(n=function(e){return function(t){var n="3.4.4";function r(){t.arrayAccessForm=t.arrayAccessForm||"none",t.emptyNodeForm=t.emptyNodeForm||"text",t.jsAttributeFilter=t.jsAttributeFilter,t.jsAttributeConverter=t.jsAttributeConverter,t.attributeConverters=t.attributeConverters||[],t.datetimeAccessFormPaths=t.datetimeAccessFormPaths||[],t.arrayAccessFormPaths=t.arrayAccessFormPaths||[],t.xmldomOptions=t.xmldomOptions||{},void 0===t.enableToStringFunc&&(t.enableToStringFunc=!0),void 0===t.skipEmptyTextNodesForObj&&(t.skipEmptyTextNodesForObj=!0),void 0===t.stripWhitespaces&&(t.stripWhitespaces=!0),void 0===t.useDoubleQuotes&&(t.useDoubleQuotes=!0),void 0===t.ignoreRoot&&(t.ignoreRoot=!1),void 0===t.escapeMode&&(t.escapeMode=!0),void 0===t.attributePrefix&&(t.attributePrefix="_"),void 0===t.selfClosingElements&&(t.selfClosingElements=!0),void 0===t.keepCData&&(t.keepCData=!1),void 0===t.keepText&&(t.keepText=!1),void 0===t.jsDateUTC&&(t.jsDateUTC=!1)}function i(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!=typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){var t=1e3;return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/t).toFixed(3)).slice(2,5)+"Z"})}t=t||{},r(),i();var o={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function s(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!==t||(t=e.nodeName),t}function a(e){return e.prefix}function l(e){return"string"==typeof e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):e}function u(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function c(e,n,r){if("property"===t.arrayAccessForm)e[n]instanceof Array?e[n+"_asArray"]=e[n]:e[n+"_asArray"]=[e[n]];if(!(e[n]instanceof Array)&&t.arrayAccessFormPaths.length>0){for(var i=!1,o=0;o<t.arrayAccessFormPaths.length;o++){var s=t.arrayAccessFormPaths[o];if("string"==typeof s){if(s===r){i=!0;break}}else if(s instanceof RegExp){if(s.test(r)){i=!0;break}}else if("function"==typeof s&&s(n,r)){i=!0;break}}i&&(e[n]=[e[n]])}}function d(e){var t=60,n=e.split(/[-T:+Z]/g),r=new Date(n[0],n[1]-1,n[2]),i=n[5].split(".");if(r.setHours(n[3],n[4],i[0]),i.length>1&&r.setMilliseconds(i[1]),n[6]&&n[7]){var o=n[6]*t+Number(n[7]);o=0+("-"===(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*o:o),r.setMinutes(r.getMinutes()-o-r.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function h(e,n,r){if(t.datetimeAccessFormPaths.length>0)for(var i=r.split(".#")[0],o=0;o<t.datetimeAccessFormPaths.length;o++){var s=t.datetimeAccessFormPaths[o];if("string"==typeof s){if(s===i)return d(e)}else if(s instanceof RegExp){if(s.test(i))return d(e)}else if("function"==typeof s&&s(i))return d(e)}return e}function p(e){for(var n={},r=e.childNodes,i=0;i<r.length;i++){var a=r.item(i);if(a.nodeType===o.ELEMENT_NODE){var l=s(a);t.ignoreRoot?n=m(a,l):n[l]=m(a,l)}}return n}function f(e,n){for(var r={__cnt:0},i=e.childNodes,l=0;l<i.length;l++){var d=i.item(l),p=s(d);d.nodeType!==o.COMMENT_NODE&&(r.__cnt++,null==r[p]?(r[p]=m(d,n+"."+p),c(r,p,n+"."+p)):(r[p]instanceof Array||(r[p]=[r[p]],c(r,p,n+"."+p)),r[p][r[p].length]=m(d,n+"."+p)))}for(var f=0;f<e.attributes.length;f++){var g=e.attributes.item(f);r.__cnt++;for(var v=g.value,y=0;y<t.attributeConverters.length;y++){var _=t.attributeConverters[y];_.test.call(null,g.name,g.value)&&(v=_.convert.call(null,g.name,g.value))}r[t.attributePrefix+g.name]=v}var b=a(e);return b&&(r.__cnt++,r.__prefix=b),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),t.escapeMode&&(r.__text=u(r.__text)),t.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===t.arrayAccessForm&&delete r["#text_asArray"],r.__text=h(r.__text,"#text",n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===t.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text&&!t.keepText?r=r.__text:0===r.__cnt&&"text"===t.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&t.skipEmptyTextNodesForObj&&(t.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,t.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")||1!==Object.keys(r).length?(t.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function m(e,t){return e.nodeType===o.DOCUMENT_NODE?p(e):e.nodeType===o.ELEMENT_NODE?f(e,t):e.nodeType===o.TEXT_NODE||e.nodeType===o.CDATA_SECTION_NODE?e.nodeValue:null}function g(e,n,r,i){var o="<"+(e&&e.__prefix?e.__prefix+":":"")+n;if(r)for(var s=0;s<r.length;s++){var a=r[s],u=e[a];t.escapeMode&&(u=l(u)),o+=" "+a.substr(t.attributePrefix.length)+"=",t.useDoubleQuotes?o+='"'+u+'"':o+="'"+u+"'"}return o+=i?" />":">"}function v(e,t){return"</"+(e&&e.__prefix?e.__prefix+":":"")+t+">"}function y(e,t){return-1!==e.indexOf(t,e.length-t.length)}function _(e,n){return!!("property"===t.arrayAccessForm&&y(n.toString(),"_asArray")||0===n.toString().indexOf(t.attributePrefix)||0===n.toString().indexOf("__")||e[n]instanceof Function)}function b(e){var t=0;if(e instanceof Object)for(var n in e)_(e,n)||t++;return t}function w(e){var n=[];if(e instanceof Object)for(var r in e)-1===r.toString().indexOf("__")&&0===r.toString().indexOf(t.attributePrefix)&&n.push(r);return n}function x(e){var n="";return e.__cdata&&(n+="<![CDATA["+e.__cdata+"]]>"),(e.__text||"number"==typeof e.__text||"boolean"==typeof e.__text)&&(t.escapeMode?n+=l(e.__text):n+=e.__text),n}function k(e){var n="";return e instanceof Object?n+=x(e):null!==e&&(t.escapeMode?n+=l(e):n+=e),n}function S(e,t,n){var r="";if(0===e.length)r+=g(e,t,n,!0);else for(var i=0;i<e.length;i++)r+=T(e[i],t,w(e[i]));return r}function T(e,n,r){var i="";if(t.jsAttributeFilter&&t.jsAttributeFilter.call(null,n,e))return i;if(t.jsAttributeConverter&&(e=t.jsAttributeConverter.call(null,n,e)),null!=e&&""!==e||!t.selfClosingElements)if("object"==typeof e)if("[object Array]"===Object.prototype.toString.call(e))i+=S(e,n,r);else if(e instanceof Date)i+=g(e,n,r,!1),i+=t.jsDateUTC?e.toUTCString():e.toISOString(),i+=v(e,n);else{b(e)>0||"number"==typeof e.__text||"boolean"==typeof e.__text||e.__text||e.__cdata?(i+=g(e,n,r,!1),i+=E(e),i+=v(e,n)):t.selfClosingElements?i+=g(e,n,r,!0):(i+=g(e,n,r,!1),i+=v(e,n))}else i+=g(e,n,r,!1),i+=k(e),i+=v(e,n);else i+=g(e,n,r,!0);return i}function E(e){var t="";if(b(e)>0)for(var n in e)if(!_(e,n)){var r=e[n];t+=T(r,n,w(r))}return t+=k(e)}function D(n){if(void 0===n)return null;if("string"!=typeof n)return null;var r=null,i=null;if(e)i=(r=new e(t.xmldomOptions)).parseFromString(n,"text/xml");else if(window&&window.DOMParser){r=new window.DOMParser;var o=null;if(!(window.ActiveXObject||"ActiveXObject"in window)&&document.all&&!document.addEventListener)try{o=r.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(e){o=null}try{i=r.parseFromString(n,"text/xml"),null!==o&&i.getElementsByTagNameNS(o,"parsererror").length>0&&(i=null)}catch(e){i=null}}else 0===n.indexOf("<?")&&(n=n.substr(n.indexOf("?>")+2)),(i=new ActiveXObject("Microsoft.XMLDOM")).async="false",i.loadXML(n);return i}this.asArray=function(e){return null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?d(e):e},this.xml2dom=function(e){return D(e)},this.dom2js=function(e){return m(e,null)},this.js2dom=function(e){return D(this.js2xml(e))},this.xml2js=function(e){var t=D(e);return null!=t?this.dom2js(t):null},this.js2xml=function(e){return E(e)},this.getVersion=function(){return n}}})?n.apply(t,r):n)||(e.exports=i)}()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};return(()=>{"use strict";
|
|
1610
1610
|
/*!******************!*\
|
|
1611
1611
|
!*** ./index.ts ***!
|
|
1612
|
-
\******************/n.r(r),n.d(r,{$rootScope:()=>e.$rootScope,ApiAwareVariable:()=>o.ApiAwareVariable,BaseAction:()=>i.BaseAction,CONSTANTS:()=>e.CONSTANTS,CrudVariable:()=>u.CrudVariable,DB_CONSTANTS:()=>e.DB_CONSTANTS,LVService:()=>d.LVService,LiveVariable:()=>c.LiveVariable,LiveVariableUtils:()=>h.LiveVariableUtils,ModelVariable:()=>a.ModelVariable,SWAGGER_CONSTANTS:()=>e.SWAGGER_CONSTANTS,ServiceVariable:()=>l.ServiceVariable,TEST:()=>p,TimerAction:()=>s.TimerAction,VARIABLE_CONSTANTS:()=>e.VARIABLE_CONSTANTS,VARIABLE_URLS:()=>e.VARIABLE_URLS,WS_CONSTANTS:()=>e.WS_CONSTANTS,appManager:()=>t.appManager,debounceVariableCall:()=>t.debounceVariableCall,decodeData:()=>t.decodeData,dialogService:()=>t.dialogService,formatDate:()=>t.formatDate,formatExportExpression:()=>t.formatExportExpression,generateConnectionParams:()=>d.generateConnectionParams,getBlob:()=>t.getBlob,getErrMessage:()=>t.getErrMessage,getEvaluatedOrderBy:()=>t.getEvaluatedOrderBy,getTarget:()=>t.getTarget,getTargetNodeKey:()=>t.getTargetNodeKey,getTargetObj:()=>t.getTargetObj,httpService:()=>t.httpService,initiateCallback:()=>t.initiateCallback,internalBoundNodeMap:()=>t.internalBoundNodeMap,isFileUploadSupported:()=>t.isFileUploadSupported,metadataService:()=>t.metadataService,navigationService:()=>t.navigationService,oauthService:()=>t.oauthService,parseConfig:()=>d.parseConfig,routerService:()=>t.routerService,securityService:()=>t.securityService,setInput:()=>t.setInput,setValueToNode:()=>t.setValueToNode,toasterService:()=>t.toasterService,updateInternalNodes:()=>t.updateInternalNodes,wmSetDependency:()=>t.wmSetDependency});var e=n(/*! ./src/constants/variables.constants */"./src/constants/variables.constants.ts"),t=n(/*! ./src/util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),i=n(/*! ./src/model/base-action */"./src/model/base-action.ts"),o=n(/*! ./src/model/variable/api-aware-variable */"./src/model/variable/api-aware-variable.ts"),s=n(/*! ./src/model/action/timer-action */"./src/model/action/timer-action.ts"),a=n(/*! ./src/model/variable/model-variable */"./src/model/variable/model-variable.ts"),l=n(/*! ./src/model/variable/service-variable */"./src/model/variable/service-variable.ts"),u=n(/*! ./src/model/variable/crud-variable */"./src/model/variable/crud-variable.ts"),c=n(/*! ./src/model/variable/live-variable */"./src/model/variable/live-variable.ts"),d=(n(/*! ./src/types/http-client.service */"./src/types/http-client.service.ts"),n(/*! ./src/util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts")),h=n(/*! ./src/util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),p=(n(/*! ./src/types/date-formatter */"./src/types/date-formatter.ts"),"hello from variables")})(),r})())),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).IMask={})}(this,(function(e){"use strict";function t(e){return"string"==typeof e||e instanceof String}function n(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function r(e,t){return Array.isArray(t)?r(e,((e,n)=>t.includes(n))):Object.entries(e).reduce(((e,n)=>{let[r,i]=n;return t(i,r)&&(e[r]=i),e}),{})}const i={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function o(e){switch(e){case i.LEFT:return i.FORCE_LEFT;case i.RIGHT:return i.FORCE_RIGHT;default:return e}}function s(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function a(e,t){if(t===e)return!0;const n=Array.isArray(t),r=Array.isArray(e);let i;if(n&&r){if(t.length!=e.length)return!1;for(i=0;i<t.length;i++)if(!a(t[i],e[i]))return!1;return!0}if(n!=r)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){const n=t instanceof Date,r=e instanceof Date;if(n&&r)return t.getTime()==e.getTime();if(n!=r)return!1;const o=t instanceof RegExp,s=e instanceof RegExp;if(o&&s)return t.toString()==e.toString();if(o!=s)return!1;const l=Object.keys(t);for(i=0;i<l.length;i++)if(!Object.prototype.hasOwnProperty.call(e,l[i]))return!1;for(i=0;i<l.length;i++)if(!a(e[l[i]],t[l[i]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class l{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?i.NONE:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?i.LEFT:i.RIGHT}}function u(e,t){return new u.InputMask(e,t)}function c(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?u.MaskedRegExp:t(e)?u.MaskedPattern:e===Date?u.MaskedDate:e===Number?u.MaskedNumber:Array.isArray(e)||e===Array?u.MaskedDynamic:u.Masked&&e.prototype instanceof u.Masked?e:u.Masked&&e instanceof u.Masked?e.constructor:e instanceof Function?u.MaskedFunction:(console.warn("Mask not found for mask",e),u.Masked)}function d(e){if(!e)throw new Error("Options in not defined");if(u.Masked){if(e.prototype instanceof u.Masked)return{mask:e};const{mask:t,...i}=e instanceof u.Masked?{mask:e}:n(e)&&e.mask instanceof u.Masked?e:{};if(t){const e=t.mask;return{...r(t,((e,t)=>!t.startsWith("_"))),mask:t.constructor,_mask:e,...i}}}return n(e)?{...e}:{mask:e}}function h(e){if(u.Masked&&e instanceof u.Masked)return e;const t=d(e),n=c(t.mask);if(!n)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}u.createMask=h;class p{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}u.MaskElement=p;class f extends p{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,n;return null!=(e=null==(t=(n=this.input).getRootNode)?void 0:t.call(n))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}u.HTMLMaskElement=f;class m extends f{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}u.HTMLMaskElement=f;class g extends f{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n<r?n:r}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n>r?n:r}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,e),n.setEnd(this.input.lastChild||this.input,t);const r=this.rootElement,i=r.getSelection&&r.getSelection();i&&(i.removeAllRanges(),i.addRange(n))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}u.HTMLContenteditableMaskElement=g;class v{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>v.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}v.MAX_LENGTH=100;class y{constructor(e,t){this.el=e instanceof p?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new g(e):new m(e),this.masked=h(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new v,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof u.Masked)&&this.masked.constructor===c(e))return void this.masked.updateOptions({mask:e});const t=e instanceof u.Masked?e:h({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const n=this._listeners[e];n&&n.forEach((e=>e(t)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,n=this.masked.value,r=this.masked.rawInputValue,i=this.displayValue,o=this.unmaskedValue!==t||this.value!==n||this._rawInputValue!==r;this._unmaskedValue=t,this._value=n,this._rawInputValue=r,this.el.value!==i&&(this.el.value=i),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),o&&this._fireChangeEvents(),this._historyChanging||!o&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...n}=e,r=!this.maskEquals(t),i=this.masked.optionsIsChanged(n);r&&(this.mask=t),i&&this.masked.updateOptions(n),(r||i)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,i.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const n=this._listeners[e].indexOf(t);return n>=0&&this._listeners[e].splice(n,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new l({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,r=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,o=n===this.masked.rawInputValue?t.removeDirection:i.NONE;let s=this.masked.nearestInputPos(t.startChangePos+r,o);o!==i.NONE&&(s=this.masked.nearestInputPos(s,i.NONE)),this.updateControl(s),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}u.InputMask=y;class _{static normalize(e){return Array.isArray(e)?e:[e,new _]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}u.ChangeDetails=_;class b{constructor(e,t,n){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=n}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class w{constructor(e){this._value="",this._update({...w.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new b(this.extractInput(e,t),e)}appendTail(e){return t(e)&&(e=new b(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new _({inserted:e,rawInserted:e})):new _}_appendChar(e,t,n){void 0===t&&(t={});const r=this.state;let i;if([e,i]=this.doPrepareChar(e,t),e&&(i=i.aggregate(this._appendCharRaw(e,t)),!i.rawInserted&&"pad"===this.autofix)){const n=this.state;this.state=r;let o=this.pad(t);const s=this._appendCharRaw(e,t);o=o.aggregate(s),s.rawInserted||o.equals(i)?i=o:this.state=n}if(i.inserted){let e,o=!1!==this.doValidate(t);if(o&&null!=n){const t=this.state;if(!0===this.overwrite){e=n.state;for(let e=0;e<i.rawInserted.length;++e)n.unshift(this.displayValue.length-i.tailShift)}let r=this.appendTail(n);if(o=r.rawInserted.length===n.toString().length,!(o&&r.inserted||"shift"!==this.overwrite)){this.state=t,e=n.state;for(let e=0;e<i.rawInserted.length;++e)n.shift();r=this.appendTail(n),o=r.rawInserted.length===n.toString().length}o&&r.inserted&&(this.state=t)}o||(i=new _,this.state=r,n&&e&&(n.state=e))}return i}_appendPlaceholder(){return new _}_appendEager(){return new _}append(e,n,r){if(!t(e))throw new Error("value should be string");const i=t(r)?new b(String(r)):r;let o;null!=n&&n.tail&&(n._beforeTailState=this.state),[e,o]=this.doPrepare(e,n);for(let t=0;t<e.length;++t){const r=this._appendChar(e[t],n,i);if(!r.rawInserted&&!this.doSkipInvalid(e[t],n,i))break;o.aggregate(r)}return(!0===this.eager||"append"===this.eager)&&null!=n&&n.input&&e&&o.aggregate(this._appendEager()),null!=i&&(o.tailShift+=this.appendTail(i).tailShift),o}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new _}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,n=this.value,r=e();return this.rawInputValue=t,this.value&&this.value!==n&&0===n.indexOf(this.value)&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,n=e(this);return this.state=t,delete this._isolated,n}doSkipInvalid(e,t,n){return Boolean(this.skipInvalid)}doPrepare(e,t){return void 0===t&&(t={}),_.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),_.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,n,r,s){void 0===n&&(n=""),void 0===r&&(r=i.NONE),void 0===s&&(s={input:!0});const a=e+t,l=this.extractTail(a),u=!0===this.eager||"remove"===this.eager;let c;u&&(r=o(r),c=this.extractInput(0,a,{raw:!0}));let d=e;const h=new _;if(r!==i.NONE&&(d=this.nearestInputPos(e,t>1&&0!==e&&!u?i.NONE:r),h.tailShift=d-e),h.aggregate(this.remove(d)),u&&r!==i.NONE&&c===this.rawInputValue)if(r===i.FORCE_LEFT){let e;for(;c===this.rawInputValue&&(e=this.displayValue.length);)h.aggregate(new _({tailShift:-1})).aggregate(this.remove(e-1))}else r===i.FORCE_RIGHT&&l.unshift();return h.aggregate(this.append(n,s,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!a(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||w.EMPTY_VALUES.includes(e)&&w.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new _}}w.DEFAULTS={skipInvalid:!0},w.EMPTY_VALUES=[void 0,null,""],u.Masked=w;class x{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=t(e)?new b(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||null==e.stop)&&e.from===n.from+n.toString().length;if(e instanceof b)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof x){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof u.MaskedPattern))return new b(this.toString()).appendTo(e);const t=new _;for(let n=0;n<this.chunks.length;++n){const r=this.chunks[n],i=e._mapPosToBlock(e.displayValue.length),o=r.stop;let s;if(null!=o&&(!i||i.index<=o)&&((r instanceof x||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),s=r instanceof x&&e._blocks[o]),s){const n=s.appendTail(r);t.aggregate(n);const i=r.toString().slice(n.rawInserted.length);i&&t.aggregate(e.append(i,{tail:!0}))}else t.aggregate(e.append(r.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map((e=>e.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...n}=e;Object.assign(this,n),this.chunks=t.map((e=>{const t="chunks"in e?new x:new b;return t.state=e,t}))}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let n=0;for(;n<this.chunks.length;){const e=this.chunks[n],r=e.unshift(t);if(e.toString()){if(!r)break;++n}else this.chunks.splice(n,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],n=t.shift();if(t.toString()){if(!n)break;--e}else this.chunks.splice(e,1);if(n)return n}return""}}class k{constructor(e,t){this.masked=e,this._log=[];const{offset:n,index:r}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,i.FORCE_LEFT),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,i.LEFT),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,i.LEFT),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,i.FORCE_RIGHT),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,i.NONE),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,i.NONE),!0}))}}class S{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new _}nearestInputPos(e,t){void 0===t&&(t=i.NONE);const n=this._value.length;switch(t){case i.LEFT:case i.FORCE_LEFT:return 0;default:return n}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===n&&(n={}),n.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new _;const n=!0===this.eager||"append"===this.eager,r=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!n)&&!t.tail,i=new _({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(t.raw||t.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new _;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new b("")}appendTail(e){return t(e)&&(e=new b(String(e))),e.appendTo(this)}append(e,t,n){const r=this._appendChar(e[0],t);return null!=n&&(r.tailShift+=this.appendTail(n).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class T{constructor(e){const{parent:t,isOptional:n,placeholderChar:r,displayChar:i,lazy:o,eager:s,...a}=e;this.masked=h(a),Object.assign(this,{parent:t,isOptional:n,placeholderChar:r,displayChar:i,lazy:o,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new _}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new _;const n=this.masked.state;let r=this.masked._appendChar(e,this.currentMaskFlags(t));return r.inserted&&!1===this.doValidate(t)&&(r=new _,this.masked.state=n),r.inserted||this.isOptional||this.lazy||t.input||(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=Boolean(r.inserted),r}append(e,t,n){return this.masked.append(e,this.currentMaskFlags(t),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new _:(this.isFilled=!0,new _({inserted:this.placeholderChar}))}_appendEager(){return new _}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,n)}nearestInputPos(e,t){void 0===t&&(t=i.NONE);const n=this.value.length,r=Math.min(Math.max(e,0),n);switch(t){case i.LEFT:case i.FORCE_LEFT:return this.isComplete?r:0;case i.RIGHT:case i.FORCE_RIGHT:return this.isComplete?r:n;default:return r}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new _}}T.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class E extends w{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}}u.MaskedRegExp=E;class D extends w{constructor(e){super({...D.DEFAULTS,...e,definitions:Object.assign({},T.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let n=!1,r=!1;for(let i=0;i<t.length;++i){if(this.blocks){const e=t.slice(i),n=Object.keys(this.blocks).filter((t=>0===e.indexOf(t)));n.sort(((e,t)=>t.length-e.length));const r=n[0];if(r){const{expose:e,repeat:t,...n}=d(this.blocks[r]),o={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...n,repeat:t,parent:this},s=null!=t?new u.RepeatBlock(o):h(o);s&&(this._blocks.push(s),e&&(this.exposeBlock=s),this._maskedBlocks[r]||(this._maskedBlocks[r]=[]),this._maskedBlocks[r].push(this._blocks.length-1)),i+=r.length-1;continue}}let o=t[i],s=o in e;if(o===D.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===o||"}"===o){n=!n;continue}if("["===o||"]"===o){r=!r;continue}if(o===D.ESCAPE_CHAR){if(++i,o=t[i],!o)break;s=!1}const a=s?new T({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...d(e[o]),parent:this}):new S({char:o,eager:this.eager,isUnmasking:n});this._blocks.push(a)}}get state(){return{...super.state,_blocks:this._blocks.map((e=>e.state))}}set state(e){if(!e)return void this.reset();const{_blocks:t,...n}=e;this._blocks.forEach(((e,n)=>e.state=t[n])),super.state=n}reset(){super.reset(),this._blocks.forEach((e=>e.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((e=>e.isComplete))}get isFilled(){return this._blocks.every((e=>e.isFilled))}get isFixed(){return this._blocks.every((e=>e.isFixed))}get isOptional(){return this._blocks.every((e=>e.isOptional))}doCommit(){this._blocks.forEach((e=>e.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((e,t)=>e+t.unmaskedValue),"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((e,t)=>e+t.value),"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce(((e,t)=>e+t.displayValue),"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new _;let n=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==n)return t;this._blocks[n].isFilled&&++n;for(let e=n;e<this._blocks.length;++e){const n=this._blocks[e]._appendEager();if(!n.inserted)break;t.aggregate(n)}return t}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._mapPosToBlock(this.displayValue.length),r=new _;if(!n)return r;for(let o,s=n.index;o=this._blocks[s];++s){var i;const n=o._appendChar(e,{...t,_beforeTailState:null==(i=t._beforeTailState)||null==(i=i._blocks)?void 0:i[s]});if(r.aggregate(n),n.consumed)break}return r}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=new x;return e===t||this._forEachBlocksInRange(e,t,((e,t,r,i)=>{const o=e.extractTail(r,i);o.stop=this._findStopBefore(t),o.from=this._blockStartPos(t),o instanceof x&&(o.blockIndex=t),n.extend(o)})),n}extractInput(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===n&&(n={}),e===t)return"";let r="";return this._forEachBlocksInRange(e,t,((e,t,i,o)=>{r+=e.extractInput(i,o,n)})),r}_findStopBefore(e){let t;for(let n=0;n<this._stops.length;++n){const r=this._stops[n];if(!(r<=e))break;t=r}return t}_appendPlaceholder(e){const t=new _;if(this.lazy&&null==e)return t;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return t;const r=n.index,i=null!=e?e:this._blocks.length;return this._blocks.slice(r,i).forEach((n=>{var r;n.lazy&&null==e||t.aggregate(n._appendPlaceholder(null==(r=n._blocks)?void 0:r.length))})),t}_mapPosToBlock(e){let t="";for(let n=0;n<this._blocks.length;++n){const r=this._blocks[n],i=t.length;if(t+=r.displayValue,e<=t.length)return{index:n,offset:e-i}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce(((e,t)=>e+t.displayValue.length),0)}_forEachBlocksInRange(e,t,n){void 0===t&&(t=this.displayValue.length);const r=this._mapPosToBlock(e);if(r){const e=this._mapPosToBlock(t),i=e&&r.index===e.index,o=r.offset,s=e&&i?e.offset:this._blocks[r.index].displayValue.length;if(n(this._blocks[r.index],r.index,o,s),e&&!i){for(let t=r.index+1;t<e.index;++t)n(this._blocks[t],t,0,this._blocks[t].displayValue.length);n(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._forEachBlocksInRange(e,t,((e,t,r,i)=>{n.aggregate(e.remove(r,i))})),n}nearestInputPos(e,t){if(void 0===t&&(t=i.NONE),!this._blocks.length)return 0;const n=new k(this,e);if(t===i.NONE)return n.pushRightBeforeInput()?n.pos:(n.popState(),n.pushLeftBeforeInput()?n.pos:this.displayValue.length);if(t===i.LEFT||t===i.FORCE_LEFT){if(t===i.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===e)return e;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),t===i.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=e)return n.pos;if(n.popState(),n.ok&&n.pos<=e)return n.pos;n.popState()}return n.ok?n.pos:t===i.FORCE_LEFT?0:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:0))}return t===i.RIGHT||t===i.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:t===i.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:this.nearestInputPos(e,i.LEFT)))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let n=0;return this._forEachBlocksInRange(e,t,((e,t,r,i)=>{n+=e.totalInputPositions(r,i)})),n}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map((e=>this._blocks[e])):[]}pad(e){const t=new _;return this._forEachBlocksInRange(0,this.displayValue.length,(n=>t.aggregate(n.pad(e)))),t}}D.DEFAULTS={...w.DEFAULTS,lazy:!0,placeholderChar:"_"},D.STOP_CHAR="`",D.ESCAPE_CHAR="\\",D.InputDefinition=T,D.FixedDefinition=S,u.MaskedPattern=D;class C extends D{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:n=this.from||0,maxLength:r=this.maxLength||0,autofix:i=this.autofix,...o}=e;this.to=t,this.from=n,this.maxLength=Math.max(String(t).length,r),this.autofix=i;const s=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<a.length&&a[l]===s[l];)++l;o.mask=a.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(o)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",n="";const[,r,i]=e.match(/^(\D*)(\d*)(\D*)/)||[];return i&&(t="0".repeat(r.length)+i,n="9".repeat(r.length)+i),t=t.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[t,n]}doPrepareChar(e,t){let n;return void 0===t&&(t={}),[e,n]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(n.skip=!this.isComplete),[e,n]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[i,o]=this.boundaries(this.value+e);return Number(o)<this.from?super._appendCharRaw(n[this.value.length],t):Number(i)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(r[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(t);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const t=new _;if(this.value.length===this.maxLength)return t;const n=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let n=0;n<r;++n)t.aggregate(super._appendCharRaw("0",e));n.split("").forEach((e=>this._appendCharRaw(e)))}return t}}u.MaskedRange=C;class M extends D{static extractPatternOptions(e){const{mask:n,pattern:r,...i}=e;return{...i,mask:t(n)?n:r}}constructor(e){super(M.extractPatternOptions({...M.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...o}={...M.DEFAULTS,...e},s=Object.assign({},M.GET_DEFAULT_BLOCKS());e.min&&(s.Y.from=e.min.getFullYear()),e.max&&(s.Y.to=e.max.getFullYear()),e.min&&e.max&&s.Y.from===s.Y.to&&(s.m.from=e.min.getMonth()+1,s.m.to=e.max.getMonth()+1,s.m.from===s.m.to&&(s.d.from=e.min.getDate(),s.d.to=e.max.getDate())),Object.assign(s,this.blocks,i),super._update({...o,mask:t(n)?n:r,blocks:s})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(M.extractPatternOptions(e))}}M.GET_DEFAULT_BLOCKS=()=>({d:{mask:C,from:1,to:31,maxLength:2},m:{mask:C,from:1,to:12,maxLength:2},Y:{mask:C,from:1900,to:9999}}),M.DEFAULTS={...D.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>e?[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join("."):"",parse:(e,t)=>{const[n,r,i]=e.split(".").map(Number);return new Date(i,r-1,n)}},u.MaskedDate=M;class A extends w{constructor(e){super({...A.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map((e=>{const{expose:t,...n}=d(e),r=h({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return t&&(this.exposeMask=r),r})):[])}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._applyDispatch(e,t);return this.currentMask&&n.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),n}_applyDispatch(e,t,n){void 0===e&&(e=""),void 0===t&&(t={}),void 0===n&&(n="");const r=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,i=this.rawInputValue,o=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:i,s=i.slice(o.length),a=this.currentMask,l=new _,u=null==a?void 0:a.state;return this.currentMask=this.doDispatch(e,{...t},n),this.currentMask&&(this.currentMask!==a?(this.currentMask.reset(),o&&(this.currentMask.append(o,{raw:!0}),l.tailShift=this.currentMask.value.length-r.length),s&&(l.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),l}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new _;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,n;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(n=e._beforeTailState)?void 0:n.currentMask)||e._beforeTailState}}doDispatch(e,t,n){return void 0===t&&(t={}),void 0===n&&(n=""),this.dispatch(e,this,t,n)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[n,r]=super.doPrepare(e,t);if(this.currentMask){let e;[n,e]=super.doPrepare(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}doPrepareChar(e,t){void 0===t&&(t={});let[n,r]=super.doPrepareChar(e,t);if(this.currentMask){let e;[n,e]=super.doPrepareChar(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach((e=>e.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const n=new _;return this.currentMask&&n.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),n}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((e=>e.state)),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:n,currentMask:r,...i}=e;t&&this.compiledMasks.forEach(((e,n)=>e.state=t[n])),null!=n&&(this.currentMask=n,this.currentMask.state=r),super.state=i}extractInput(e,t,n){return this.currentMask?this.currentMask.extractInput(e,t,n):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every(((t,n)=>{if(!e[n])return;const{mask:r,...i}=e[n];return a(t,i)&&t.maskEquals(r)})):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}A.DEFAULTS={...w.DEFAULTS,dispatch:(e,t,n,r)=>{if(!t.compiledMasks.length)return;const o=t.rawInputValue,s=t.compiledMasks.map(((s,a)=>{const l=t.currentMask===s,u=l?s.displayValue.length:s.nearestInputPos(s.displayValue.length,i.FORCE_LEFT);return s.rawInputValue!==o?(s.reset(),s.append(o,{raw:!0})):l||s.remove(u),s.append(e,t.currentMaskFlags(n)),s.appendTail(r),{index:a,weight:s.rawInputValue.length,totalInputPositions:s.totalInputPositions(0,Math.max(u,s.nearestInputPos(s.displayValue.length,i.FORCE_LEFT)))}}));return s.sort(((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions)),t.compiledMasks[s[0].index]}},u.MaskedDynamic=A;class I extends D{constructor(e){super({...I.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...n}=e;if(t){const e=t.map((e=>e.length)),r=Math.min(...e),i=Math.max(...e)-r;n.mask="*".repeat(r),i&&(n.mask+="["+"*".repeat(i)+"]"),this.enum=t}super._update(n)}_appendCharRaw(e,t){void 0===t&&(t={});const n=Math.min(this.nearestInputPos(0,i.FORCE_RIGHT),this.value.length),r=this.enum.filter((t=>this.matchValue(t,this.unmaskedValue+e,n)));if(r.length){1===r.length&&this._forEachBlocksInRange(0,this.value.length,((e,n)=>{const i=r[0][n];n>=this.value.length||i===e.value||(e.reset(),e._appendChar(i,t))}));const e=super._appendCharRaw(r[0][this.value.length],t);return 1===r.length&&r[0].slice(this.unmaskedValue.length).split("").forEach((t=>e.aggregate(super._appendCharRaw(t)))),e}return new _({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new b("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new _;const n=Math.min(super.nearestInputPos(0,i.FORCE_RIGHT),this.value.length);let r;for(r=e;r>=0&&!(this.enum.filter((e=>this.matchValue(e,this.value.slice(n,r),n))).length>1);--r);const o=super.remove(r,t);return o.tailShift+=r-e,o}get isComplete(){return this.enum.indexOf(this.value)>=0}}I.DEFAULTS={...D.DEFAULTS,matchValue:(e,t,n)=>e.indexOf(t,n)===n},u.MaskedEnum=I;class L extends w{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}var O;u.MaskedFunction=L;class N extends w{constructor(e){super({...N.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+s(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(s).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(s(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[n,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!n&&(r.skip=!0),!n||this.allowPositive||this.value||"-"===n||r.aggregate(this._appendChar("-")),[n,r]}_separatorsCount(e,t){void 0===t&&(t=!1);let n=0;for(let r=0;r<e;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++n,t&&(e+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,n))}_appendCharRaw(e,t){void 0===t&&(t={});const n=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const i=this._value;this._value+=e;const o=this.number;let s,a=!isNaN(o),l=!1;if(a){let e;null!=this.min&&this.min<0&&this.number<this.min&&(e=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(N.UNMASKED_RADIX,this.radix),l||(l=i===this._value&&!t.tail)):a=!1),a&&(a=Boolean(this._value.match(this._numberRegExp)))}a?s=new _({inserted:this._value.slice(i.length),rawInserted:l?"":e,skip:l}):(this._value=i,s=new _),this._value=this._insertThousandsSeparators(this._value);const u=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,c=this._separatorsCountFromSlice(u);return s.tailShift+=(c-r)*this.thousandsSeparator.length,s}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,t);if(n<=e)return n}return-1}_adjustRangeWithSeparators(e,t){const n=this._findSeparatorAround(e);n>=0&&(e=n);const r=this._findSeparatorAround(t);return r>=0&&(t=r+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const n=this.value.slice(0,e),r=this.value.slice(t),i=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+r));const o=this._separatorsCountFromSlice(n);return new _({tailShift:(o-i)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case i.NONE:case i.LEFT:case i.FORCE_LEFT:{const n=this._findSeparatorAround(e-1);if(n>=0){const r=n+this.thousandsSeparator.length;if(e<r||this.value.length<=r||t===i.FORCE_LEFT)return n}break}case i.RIGHT:case i.FORCE_RIGHT:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,((e,t,n,r)=>t+r)),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,n){void 0===t&&(t={});const r=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===N.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,n)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,N.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(N.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||N.EMPTY_VALUES.includes(e)&&N.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}O=N,N.UNMASKED_RADIX=".",N.EMPTY_VALUES=[...w.EMPTY_VALUES,0],N.DEFAULTS={...w.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[O.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},u.MaskedNumber=N;const R={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function P(e,t,n){void 0===t&&(t=R.MASKED),void 0===n&&(n=R.MASKED);const r=h(e);return e=>r.runIsolated((r=>(r[t]=e,r[n])))}function F(e,t,n,r){return P(t,n,r)(e)}u.PIPE_TYPE=R,u.createPipe=P,u.pipe=F;class j extends D{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,n,r;const{repeat:i,...o}=d(e);this._blockOpts=Object.assign({},this._blockOpts,o);const s=h(this._blockOpts);this.repeat=null!=(t=null!=(n=null!=i?i:s.repeat)?n:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(r=this._blocks)?void 0:r.length)||0,this.repeatFrom)),blocks:{m:s},eager:s.eager,overwrite:s.overwrite,skipInvalid:s.skipInvalid,lazy:s.lazy,placeholderChar:s.placeholderChar,displayChar:s.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(h(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const n=new _;for(let a,l,u=null!=(r=null==(i=this._mapPosToBlock(this.displayValue.length))?void 0:i.index)?r:Math.max(this._blocks.length-1,0);a=null!=(o=this._blocks[u])?o:l=!l&&this._allocateBlock(u);++u){var r,i,o,s;const c=a._appendChar(e,{...t,_beforeTailState:null==(s=t._beforeTailState)||null==(s=s._blocks)?void 0:s[u]});if(c.skip&&l){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(c),c.consumed)break}return n}_trimEmptyTail(e,t){var n,r;void 0===e&&(e=0);const i=Math.max((null==(n=this._mapPosToBlock(e))?void 0:n.index)||0,this.repeatFrom,0);let o;null!=t&&(o=null==(r=this._mapPosToBlock(t))?void 0:r.index),null==o&&(o=this._blocks.length-1);let s=0;for(let e=o;i<=e&&!this._blocks[e].unmaskedValue;--e,++s);s&&(this._blocks.splice(o-s+1,s),this.mask=this.mask.slice(s))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._trimEmptyTail(e,t),n}totalInputPositions(e,t){return void 0===e&&(e=0),null==t&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}u.RepeatBlock=j;try{globalThis.IMask=u}catch{}e.ChangeDetails=_,e.ChunksTailDetails=x,e.DIRECTION=i,e.HTMLContenteditableMaskElement=g,e.HTMLInputMaskElement=m,e.HTMLMaskElement=f,e.InputMask=y,e.MaskElement=p,e.Masked=w,e.MaskedDate=M,e.MaskedDynamic=A,e.MaskedEnum=I,e.MaskedFunction=L,e.MaskedNumber=N,e.MaskedPattern=D,e.MaskedRange=C,e.MaskedRegExp=E,e.PIPE_TYPE=R,e.PatternFixedDefinition=S,e.PatternInputDefinition=T,e.RepeatBlock=j,e.createMask=h,e.createPipe=P,e.default=u,e.forceDirection=o,e.normalizeOpts=d,e.pipe=F,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("imask"),require("@angular/common"),require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define(["exports","imask","@angular/common","@angular/core","@angular/forms"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).angularIMask={},e.IMask,e.ng.common,e.ng.core,e.ng.forms)}(this,(function(e,t,n,r,i){"use strict";var o,s,a=(o=r,s=Object.create(null),o&&Object.keys(o).forEach((function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:function(){return o[e]}})}})),s.default=o,Object.freeze(s));class l{create(e,n){return t(e,n)}static{this.\u0275fac=a.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:l,deps:[],target:a.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=a.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:l,providedIn:"root"})}}a.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:l,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}]});const u=new r.InjectionToken("IMASK_FACTORY",{providedIn:"root",factory:()=>r.inject(l)}),c={provide:i.NG_VALUE_ACCESSOR,useExisting:r.forwardRef((()=>h)),multi:!0},d=e=>e.nativeElement;class h{constructor(){this.onTouched=()=>{},this.onChange=()=>{},this._viewInitialized=!1,this._composing=!1,this._writing=!1,this._elementRef=r.inject(r.ElementRef),this._renderer=r.inject(r.Renderer2),this._factory=r.inject(u),this._platformId=r.inject(r.PLATFORM_ID),this._compositionMode=r.inject(i.COMPOSITION_BUFFER_MODE,{optional:!0})??!this._isAndroid(),this.imaskElement=d,this.accept=new r.EventEmitter,this.complete=new r.EventEmitter}get element(){return this.imaskElement(this._elementRef,this)}get maskValue(){return this.maskRef?"typed"===this.unmask?this.maskRef.typedValue:this.unmask?this.maskRef.unmaskedValue:this.maskRef.value:this.element?.value||""}set maskValue(e){this.maskRef?"typed"===this.unmask?this.maskRef.typedValue=e:this.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e:this._renderer.setProperty(this.element,"value",e)}ngAfterViewInit(){this.imask&&this.initMask(),this._viewInitialized=!0}ngOnChanges(e){e.elementRef&&!this.imaskElement&&(this.imaskElement=d),e.imask&&this._viewInitialized&&(this.imask?this.maskRef?this.maskRef.updateOptions(this.imask):(this.initMask(),this.onChange(this.maskValue)):this.destroyMask())}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}ngOnDestroy(){this.destroyMask(),this.accept.complete(),this.complete.complete()}beginWrite(e){this._writing=!0,this._writingValue=e}endWrite(){return this._writing=!1,this._writingValue}writeValue(e){e=null==e&&"typed"!==this.unmask?"":e,this.maskRef?(this.beginWrite(e),this.maskValue=e,this.endWrite()):(this._renderer.setProperty(this.element,"value",e),this._initialValue=e)}_onAccept(){const e=this.maskValue;this._writing&&e===this.endWrite()||(this.onChange(e),this.accept.emit(e))}_onComplete(){this.complete.emit(this.maskValue)}initMask(){this.maskRef=this._factory.create(this.element,this.imask).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),null!=this._initialValue&&this.writeValue(this._initialValue),delete this._initialValue}setDisabledState(e){this._renderer.setProperty(this.element,"disabled",e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}_handleInput(e){this.maskRef||(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this._handleInput(e)}_isAndroid(){return n.isPlatformBrowser(this._platformId)&&/android (\d+)/.test(navigator.userAgent.toLowerCase())}static{this.\u0275fac=a.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:h,deps:[],target:a.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=a.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"16.2.12",type:h,isStandalone:!0,selector:"[imask]",inputs:{imask:"imask",unmask:"unmask",imaskElement:"imaskElement"},outputs:{accept:"accept",complete:"complete"},host:{listeners:{input:"_handleInput($event.target.value)",blur:"onTouched()",compositionstart:"_compositionStart()",compositionend:"_compositionEnd($event.target.value)"}},providers:[c],exportAs:["imask"],usesOnChanges:!0,ngImport:a})}}a.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:h,decorators:[{type:r.Directive,args:[{selector:"[imask]",standalone:!0,exportAs:"imask",host:{"(input)":"_handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"_compositionStart()","(compositionend)":"_compositionEnd($event.target.value)"},providers:[c]}]}],propDecorators:{imask:[{type:r.Input}],unmask:[{type:r.Input}],imaskElement:[{type:r.Input}],accept:[{type:r.Output}],complete:[{type:r.Output}]}});class p{transform(...e){return t.pipe(...e)}static{this.\u0275fac=a.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:p,deps:[],target:a.\u0275\u0275FactoryTarget.Pipe})}static{this.\u0275pipe=a.\u0275\u0275ngDeclarePipe({minVersion:"14.0.0",version:"16.2.12",ngImport:a,type:p,isStandalone:!0,name:"imask"})}}a.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:p,decorators:[{type:r.Pipe,args:[{name:"imask",standalone:!0}]}]});class f{static{this.\u0275fac=a.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:f,deps:[],target:a.\u0275\u0275FactoryTarget.NgModule})}static{this.\u0275mod=a.\u0275\u0275ngDeclareNgModule({minVersion:"14.0.0",version:"16.2.12",ngImport:a,type:f,imports:[h,p],exports:[h,p]})}static{this.\u0275inj=a.\u0275\u0275ngDeclareInjector({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:f})}}a.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:f,decorators:[{type:r.NgModule,args:[{imports:[h,p],exports:[h,p]}]}]}),e.IMask=t,Object.defineProperty(e,"PIPE_TYPE",{enumerable:!0,get:function(){return t.PIPE_TYPE}}),Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return t.pipe}}),e.DEFAULT_IMASK_ELEMENT=d,e.DefaultImaskFactory=l,e.IMASK_FACTORY=u,e.IMaskDirective=h,e.IMaskModule=f,e.IMaskPipe=p,e.MASKEDINPUT_VALUE_ACCESSOR=c})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jmespath={})}(this,(function(e){"use strict";const t=e=>null!==e&&"[object Object]"===Object.prototype.toString.call(e),n=(e,r)=>{if(e===r)return!0;if(typeof e!=typeof r)return!1;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t+=1)if(!n(e[t],r[t]))return!1;return!0}if(t(e)&&t(r)){const t=Object.entries(e),i=new Set(Object.keys(r));if(t.length!==i.size)return!1;for(const[e,o]of t){if(!n(o,r[e]))return!1;i.delete(e)}return 0===i.size}return!1},r=e=>{if(""===e||!1===e||null==e)return!0;if(Array.isArray(e)&&0===e.length)return!0;if(t(e)){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},i=e=>e>="0"&&e<="9"||"-"===e;var o;!function(e){e.TOK_EOF="EOF",e.TOK_UNQUOTEDIDENTIFIER="UnquotedIdentifier",e.TOK_QUOTEDIDENTIFIER="QuotedIdentifier",e.TOK_RBRACKET="Rbracket",e.TOK_RPAREN="Rparen",e.TOK_COMMA="Comma",e.TOK_COLON="Colon",e.TOK_RBRACE="Rbrace",e.TOK_NUMBER="Number",e.TOK_CURRENT="Current",e.TOK_ROOT="Root",e.TOK_EXPREF="Expref",e.TOK_PIPE="Pipe",e.TOK_OR="Or",e.TOK_AND="And",e.TOK_EQ="EQ",e.TOK_GT="GT",e.TOK_LT="LT",e.TOK_GTE="GTE",e.TOK_LTE="LTE",e.TOK_NE="NE",e.TOK_FLATTEN="Flatten",e.TOK_STAR="Star",e.TOK_FILTER="Filter",e.TOK_DOT="Dot",e.TOK_NOT="Not",e.TOK_LBRACE="Lbrace",e.TOK_LBRACKET="Lbracket",e.TOK_LPAREN="Lparen",e.TOK_LITERAL="Literal"}(o||(o={}));const s={"(":o.TOK_LPAREN,")":o.TOK_RPAREN,"*":o.TOK_STAR,",":o.TOK_COMMA,".":o.TOK_DOT,":":o.TOK_COLON,"@":o.TOK_CURRENT,$:o.TOK_ROOT,"]":o.TOK_RBRACKET,"{":o.TOK_LBRACE,"}":o.TOK_RBRACE},a={"!":!0,"<":!0,"=":!0,">":!0},l={"\t":!0,"\n":!0,"\r":!0," ":!0};const u=new class{constructor(){this._current=0}tokenize(e){const t=[];let n,r,u;for(this._current=0;this._current<e.length;)if((c=e[this._current])>="a"&&c<="z"||c>="A"&&c<="Z"||"_"===c)n=this._current,r=this.consumeUnquotedIdentifier(e),t.push({start:n,type:o.TOK_UNQUOTEDIDENTIFIER,value:r});else if(void 0!==s[e[this._current]])t.push({start:this._current,type:s[e[this._current]],value:e[this._current]}),this._current+=1;else if(i(e[this._current]))u=this.consumeNumber(e),t.push(u);else if("["===e[this._current])u=this.consumeLBracket(e),t.push(u);else if('"'===e[this._current])n=this._current,r=this.consumeQuotedIdentifier(e),t.push({start:n,type:o.TOK_QUOTEDIDENTIFIER,value:r});else if("'"===e[this._current])n=this._current,r=this.consumeRawStringLiteral(e),t.push({start:n,type:o.TOK_LITERAL,value:r});else if("`"===e[this._current]){n=this._current;const r=this.consumeLiteral(e);t.push({start:n,type:o.TOK_LITERAL,value:r})}else if(void 0!==a[e[this._current]])u=this.consumeOperator(e),u&&t.push(u);else if(void 0!==l[e[this._current]])this._current+=1;else if("&"===e[this._current])n=this._current,this._current+=1,"&"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_AND,value:"&&"})):t.push({start:n,type:o.TOK_EXPREF,value:"&"});else{if("|"!==e[this._current]){const t=new Error(`Unknown character: ${e[this._current]}`);throw t.name="LexerError",t}n=this._current,this._current+=1,"|"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_OR,value:"||"})):t.push({start:n,type:o.TOK_PIPE,value:"|"})}var c;return t}consumeUnquotedIdentifier(e){const t=this._current;for(this._current+=1;this._current<e.length&&((n=e[this._current])>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9"||"_"===n);)this._current+=1;var n;return e.slice(t,this._current)}consumeQuotedIdentifier(e){const t=this._current;this._current+=1;const n=e.length;for(;'"'!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&'"'!==e[t+1]?t+=1:t+=2,this._current=t}return this._current+=1,JSON.parse(e.slice(t,this._current))}consumeRawStringLiteral(e){const t=this._current;this._current+=1;const n=e.length;for(;"'"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"'"!==e[t+1]?t+=1:t+=2,this._current=t}this._current+=1;return e.slice(t+1,this._current-1).replace("\\'","'")}consumeNumber(e){const t=this._current;this._current+=1;const n=e.length;for(;i(e[this._current])&&this._current<n;)this._current+=1;return{start:t,value:parseInt(e.slice(t,this._current),10),type:o.TOK_NUMBER}}consumeLBracket(e){const t=this._current;return this._current+=1,"?"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FILTER,value:"[?"}):"]"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FLATTEN,value:"[]"}):{start:t,type:o.TOK_LBRACKET,value:"["}}consumeOperator(e){const t=this._current,n=e[t];return this._current+=1,"!"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_NE,value:"!="}):{start:t,type:o.TOK_NOT,value:"!"}:"<"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_LTE,value:"<="}):{start:t,type:o.TOK_LT,value:"<"}:">"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_GTE,value:">="}):{start:t,type:o.TOK_GT,value:">"}:"="===n&&"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_EQ,value:"=="}):void 0}consumeLiteral(e){this._current+=1;const t=this._current,n=e.length;for(;"`"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"`"!==e[t+1]?t+=1:t+=2,this._current=t}let r=e.slice(t,this._current).trimLeft();r=r.replace("\\`","`");const i=this.looksLikeJSON(r)?JSON.parse(r):JSON.parse(`"${r}"`);return this._current+=1,i}looksLikeJSON(e){if(""===e)return!1;if('[{"'.includes(e[0]))return!0;if(["true","false","null"].includes(e))return!0;if("-0123456789".includes(e[0]))try{return JSON.parse(e),!0}catch(e){return!1}return!1}},c={[o.TOK_EOF]:0,[o.TOK_UNQUOTEDIDENTIFIER]:0,[o.TOK_QUOTEDIDENTIFIER]:0,[o.TOK_RBRACKET]:0,[o.TOK_RPAREN]:0,[o.TOK_COMMA]:0,[o.TOK_RBRACE]:0,[o.TOK_NUMBER]:0,[o.TOK_CURRENT]:0,[o.TOK_EXPREF]:0,[o.TOK_ROOT]:0,[o.TOK_PIPE]:1,[o.TOK_OR]:2,[o.TOK_AND]:3,[o.TOK_EQ]:5,[o.TOK_GT]:5,[o.TOK_LT]:5,[o.TOK_GTE]:5,[o.TOK_LTE]:5,[o.TOK_NE]:5,[o.TOK_FLATTEN]:9,[o.TOK_STAR]:20,[o.TOK_FILTER]:21,[o.TOK_DOT]:40,[o.TOK_NOT]:45,[o.TOK_LBRACE]:50,[o.TOK_LBRACKET]:55,[o.TOK_LPAREN]:60};const d=new class{constructor(){this.index=0,this.tokens=[]}parse(e){this.loadTokens(e),this.index=0;const t=this.expression(0);if(this.lookahead(0)!==o.TOK_EOF){const e=this.lookaheadToken(0);this.errorToken(e,`Unexpected token type: ${e.type}, value: ${e.value}`)}return t}loadTokens(e){this.tokens=[...u.tokenize(e),{type:o.TOK_EOF,value:"",start:e.length}]}expression(e){const t=this.lookaheadToken(0);this.advance();let n=this.nud(t),r=this.lookahead(0);for(;e<c[r];)this.advance(),n=this.led(r,n),r=this.lookahead(0);return n}lookahead(e){return this.tokens[this.index+e].type}lookaheadToken(e){return this.tokens[this.index+e]}advance(){this.index+=1}nud(e){let t,n,r;switch(e.type){case o.TOK_LITERAL:return{type:"Literal",value:e.value};case o.TOK_UNQUOTEDIDENTIFIER:return{type:"Field",name:e.value};case o.TOK_QUOTEDIDENTIFIER:const i={type:"Field",name:e.value};if(this.lookahead(0)===o.TOK_LPAREN)throw new Error("Quoted identifier not allowed for function names.");return i;case o.TOK_NOT:return n=this.expression(c.Not),{type:"NotExpression",children:[n]};case o.TOK_STAR:return t={type:"Identity"},n=this.lookahead(0)===o.TOK_RBRACKET&&{type:"Identity"}||this.parseProjectionRHS(c.Star),{type:"ValueProjection",children:[t,n]};case o.TOK_FILTER:return this.led(e.type,{type:"Identity"});case o.TOK_LBRACE:return this.parseMultiselectHash();case o.TOK_FLATTEN:return t={type:o.TOK_FLATTEN,children:[{type:"Identity"}]},n=this.parseProjectionRHS(c.Flatten),{type:"Projection",children:[t,n]};case o.TOK_LBRACKET:return this.lookahead(0)===o.TOK_NUMBER||this.lookahead(0)===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice({type:"Identity"},n)):this.lookahead(0)===o.TOK_STAR&&this.lookahead(1)===o.TOK_RBRACKET?(this.advance(),this.advance(),n=this.parseProjectionRHS(c.Star),{children:[{type:"Identity"},n],type:"Projection"}):this.parseMultiselectList();case o.TOK_CURRENT:return{type:o.TOK_CURRENT};case o.TOK_ROOT:return{type:o.TOK_ROOT};case o.TOK_EXPREF:return r=this.expression(c.Expref),{type:"ExpressionReference",children:[r]};case o.TOK_LPAREN:const s=[];for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(r={type:o.TOK_CURRENT},this.advance()):r=this.expression(0),s.push(r);return this.match(o.TOK_RPAREN),s[0];default:this.errorToken(e)}}led(e,t){let n;switch(e){case o.TOK_DOT:const r=c.Dot;return this.lookahead(0)!==o.TOK_STAR?(n=this.parseDotRHS(r),{type:"Subexpression",children:[t,n]}):(this.advance(),n=this.parseProjectionRHS(r),{type:"ValueProjection",children:[t,n]});case o.TOK_PIPE:return n=this.expression(c.Pipe),{type:o.TOK_PIPE,children:[t,n]};case o.TOK_OR:return n=this.expression(c.Or),{type:"OrExpression",children:[t,n]};case o.TOK_AND:return n=this.expression(c.And),{type:"AndExpression",children:[t,n]};case o.TOK_LPAREN:const i=t.name,s=[];let a;for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(a={type:o.TOK_CURRENT},this.advance()):a=this.expression(0),this.lookahead(0)===o.TOK_COMMA&&this.match(o.TOK_COMMA),s.push(a);this.match(o.TOK_RPAREN);return{name:i,type:"Function",children:s};case o.TOK_FILTER:const l=this.expression(0);return this.match(o.TOK_RBRACKET),n=this.lookahead(0)===o.TOK_FLATTEN&&{type:"Identity"}||this.parseProjectionRHS(c.Filter),{type:"FilterProjection",children:[t,n,l]};case o.TOK_FLATTEN:return{type:"Projection",children:[{type:o.TOK_FLATTEN,children:[t]},this.parseProjectionRHS(c.Flatten)]};case o.TOK_EQ:case o.TOK_NE:case o.TOK_GT:case o.TOK_GTE:case o.TOK_LT:case o.TOK_LTE:return this.parseComparator(t,e);case o.TOK_LBRACKET:const u=this.lookaheadToken(0);return u.type===o.TOK_NUMBER||u.type===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice(t,n)):(this.match(o.TOK_STAR),this.match(o.TOK_RBRACKET),n=this.parseProjectionRHS(c.Star),{type:"Projection",children:[t,n]});default:return this.errorToken(this.lookaheadToken(0))}}match(e){if(this.lookahead(0)!==e){const t=this.lookaheadToken(0);this.errorToken(t,`Expected ${e}, got: ${t.type}`)}else this.advance()}errorToken(e,t=""){const n=new Error(t||`Invalid token (${e.type}): "${e.value}"`);throw n.name="ParserError",n}parseIndexExpression(){if(this.lookahead(0)===o.TOK_COLON||this.lookahead(1)===o.TOK_COLON)return this.parseSliceExpression();const e={type:"Index",value:this.lookaheadToken(0).value};return this.advance(),this.match(o.TOK_RBRACKET),e}projectIfSlice(e,t){const n={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{children:[n,this.parseProjectionRHS(c.Star)],type:"Projection"}:n}parseSliceExpression(){const e=[null,null,null];let t=0,n=this.lookahead(0);for(;n!==o.TOK_RBRACKET&&t<3;){if(n===o.TOK_COLON)t+=1,this.advance();else if(n===o.TOK_NUMBER)e[t]=this.lookaheadToken(0).value,this.advance();else{const e=this.lookaheadToken(0);this.errorToken(e,`Syntax error, unexpected token: ${e.value}(${e.type})`)}n=this.lookahead(0)}return this.match(o.TOK_RBRACKET),{children:e,type:"Slice"}}parseComparator(e,t){return{type:"Comparator",name:t,children:[e,this.expression(c[t])]}}parseDotRHS(e){const t=this.lookahead(0);if([o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER,o.TOK_STAR].includes(t))return this.expression(e);if(t===o.TOK_LBRACKET)return this.match(o.TOK_LBRACKET),this.parseMultiselectList();if(t===o.TOK_LBRACE)return this.match(o.TOK_LBRACE),this.parseMultiselectHash();const n=this.lookaheadToken(0);this.errorToken(n,`Syntax error, unexpected token: ${n.value}(${n.type})`)}parseProjectionRHS(e){if(c[this.lookahead(0)]<10)return{type:"Identity"};if(this.lookahead(0)===o.TOK_LBRACKET)return this.expression(e);if(this.lookahead(0)===o.TOK_FILTER)return this.expression(e);if(this.lookahead(0)===o.TOK_DOT)return this.match(o.TOK_DOT),this.parseDotRHS(e);const t=this.lookaheadToken(0);this.errorToken(t,`Syntax error, unexpected token: ${t.value}(${t.type})`)}parseMultiselectList(){const e=[];for(;this.lookahead(0)!==o.TOK_RBRACKET;){const t=this.expression(0);if(e.push(t),this.lookahead(0)===o.TOK_COMMA&&(this.match(o.TOK_COMMA),this.lookahead(0)===o.TOK_RBRACKET))throw new Error("Unexpected token Rbracket")}return this.match(o.TOK_RBRACKET),{type:"MultiSelectList",children:e}}parseMultiselectHash(){const e=[],t=[o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER];let n,r,i;for(;;){if(n=this.lookaheadToken(0),!t.includes(n.type))throw new Error(`Expecting an identifier token, got: ${n.type}`);if(r=n.value,this.advance(),this.match(o.TOK_COLON),i=this.expression(0),e.push({value:i,type:"KeyValuePair",name:r}),this.lookahead(0)===o.TOK_COMMA)this.match(o.TOK_COMMA);else if(this.lookahead(0)===o.TOK_RBRACE){this.match(o.TOK_RBRACE);break}}return{type:"MultiSelectHash",children:e}}};var h;!function(e){e[e.TYPE_NUMBER=0]="TYPE_NUMBER",e[e.TYPE_ANY=1]="TYPE_ANY",e[e.TYPE_STRING=2]="TYPE_STRING",e[e.TYPE_ARRAY=3]="TYPE_ARRAY",e[e.TYPE_OBJECT=4]="TYPE_OBJECT",e[e.TYPE_BOOLEAN=5]="TYPE_BOOLEAN",e[e.TYPE_EXPREF=6]="TYPE_EXPREF",e[e.TYPE_NULL=7]="TYPE_NULL",e[e.TYPE_ARRAY_NUMBER=8]="TYPE_ARRAY_NUMBER",e[e.TYPE_ARRAY_STRING=9]="TYPE_ARRAY_STRING"}(h||(h={}));class p{constructor(e){this.TYPE_NAME_TABLE={[h.TYPE_NUMBER]:"number",[h.TYPE_ANY]:"any",[h.TYPE_STRING]:"string",[h.TYPE_ARRAY]:"array",[h.TYPE_OBJECT]:"object",[h.TYPE_BOOLEAN]:"boolean",[h.TYPE_EXPREF]:"expression",[h.TYPE_NULL]:"null",[h.TYPE_ARRAY_NUMBER]:"Array<number>",[h.TYPE_ARRAY_STRING]:"Array<string>"},this.functionAbs=([e])=>Math.abs(e),this.functionAvg=([e])=>{let t=0;for(let n=0;n<e.length;n+=1)t+=e[n];return t/e.length},this.functionCeil=([e])=>Math.ceil(e),this.functionContains=e=>{const[t,n]=e;return t.includes(n)},this.functionEndsWith=e=>{const[t,n]=e;return t.includes(n,t.length-n.length)},this.functionFloor=([e])=>Math.floor(e),this.functionJoin=e=>{const[t,n]=e;return n.join(t)},this.functionKeys=([e])=>Object.keys(e),this.functionLength=([e])=>t(e)?Object.keys(e).length:e.length,this.functionMap=e=>{if(!this._interpreter)return[];const t=[],n=this._interpreter,r=e[0],i=e[1];for(let e=0;e<i.length;e+=1)t.push(n.visit(r,i[e]));return t},this.functionMax=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===h.TYPE_NUMBER)return Math.max(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)n.localeCompare(t[e])<0&&(n=t[e]);return n},this.functionMaxBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[h.TYPE_NUMBER,h.TYPE_STRING]);let i,o,s=-1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o>s&&(s=o,i=n[e]);return i},this.functionMerge=e=>{let t={};for(let n=0;n<e.length;n+=1){const r=e[n];t=Object.assign(t,r)}return t},this.functionMin=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===h.TYPE_NUMBER)return Math.min(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)t[e].localeCompare(n)<0&&(n=t[e]);return n},this.functionMinBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[h.TYPE_NUMBER,h.TYPE_STRING]);let i,o,s=1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o<s&&(s=o,i=n[e]);return i},this.functionNotNull=e=>{for(let t=0;t<e.length;t+=1)if(this.getTypeName(e[t])!==h.TYPE_NULL)return e[t];return null},this.functionReverse=([e])=>{if(this.getTypeName(e)===h.TYPE_STRING){const t=e;let n="";for(let e=t.length-1;e>=0;e-=1)n+=t[e];return n}const t=e.slice(0);return t.reverse(),t},this.functionSort=([e])=>[...e].sort(),this.functionSortBy=e=>{if(!this._interpreter)return[];const t=e[0].slice(0);if(0===t.length)return t;const n=this._interpreter,r=e[1],i=this.getTypeName(n.visit(r,t[0]));if(void 0!==i&&![h.TYPE_NUMBER,h.TYPE_STRING].includes(i))throw new Error(`TypeError: unexpected type (${this.TYPE_NAME_TABLE[i]})`);const o=[];for(let e=0;e<t.length;e+=1)o.push([e,t[e]]);o.sort(((e,t)=>{const o=n.visit(r,e[1]),s=n.visit(r,t[1]);if(this.getTypeName(o)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(o)]}`);if(this.getTypeName(s)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(s)]}`);return o>s?1:o<s?-1:e[0]-t[0]}));for(let e=0;e<o.length;e+=1)t[e]=o[e][1];return t},this.functionStartsWith=([e,t])=>e.startsWith(t),this.functionSum=([e])=>e.reduce(((e,t)=>e+t),0),this.functionToArray=([e])=>this.getTypeName(e)===h.TYPE_ARRAY?e:[e],this.functionToNumber=([e])=>{const t=this.getTypeName(e);let n;return t===h.TYPE_NUMBER?e:t!==h.TYPE_STRING||(n=+e,isNaN(n))?null:n},this.functionToString=([e])=>this.getTypeName(e)===h.TYPE_STRING?e:JSON.stringify(e),this.functionType=([e])=>{switch(this.getTypeName(e)){case h.TYPE_NUMBER:return"number";case h.TYPE_STRING:return"string";case h.TYPE_ARRAY:return"array";case h.TYPE_OBJECT:return"object";case h.TYPE_BOOLEAN:return"boolean";case h.TYPE_EXPREF:return"expref";case h.TYPE_NULL:return"null";default:return}},this.functionValues=([e])=>Object.values(e),this.functionTable={abs:{_func:this.functionAbs,_signature:[{types:[h.TYPE_NUMBER]}]},avg:{_func:this.functionAvg,_signature:[{types:[h.TYPE_ARRAY_NUMBER]}]},ceil:{_func:this.functionCeil,_signature:[{types:[h.TYPE_NUMBER]}]},contains:{_func:this.functionContains,_signature:[{types:[h.TYPE_STRING,h.TYPE_ARRAY]},{types:[h.TYPE_ANY]}]},ends_with:{_func:this.functionEndsWith,_signature:[{types:[h.TYPE_STRING]},{types:[h.TYPE_STRING]}]},floor:{_func:this.functionFloor,_signature:[{types:[h.TYPE_NUMBER]}]},join:{_func:this.functionJoin,_signature:[{types:[h.TYPE_STRING]},{types:[h.TYPE_ARRAY_STRING]}]},keys:{_func:this.functionKeys,_signature:[{types:[h.TYPE_OBJECT]}]},length:{_func:this.functionLength,_signature:[{types:[h.TYPE_STRING,h.TYPE_ARRAY,h.TYPE_OBJECT]}]},map:{_func:this.functionMap,_signature:[{types:[h.TYPE_EXPREF]},{types:[h.TYPE_ARRAY]}]},max:{_func:this.functionMax,_signature:[{types:[h.TYPE_ARRAY_NUMBER,h.TYPE_ARRAY_STRING]}]},max_by:{_func:this.functionMaxBy,_signature:[{types:[h.TYPE_ARRAY]},{types:[h.TYPE_EXPREF]}]},merge:{_func:this.functionMerge,_signature:[{types:[h.TYPE_OBJECT],variadic:!0}]},min:{_func:this.functionMin,_signature:[{types:[h.TYPE_ARRAY_NUMBER,h.TYPE_ARRAY_STRING]}]},min_by:{_func:this.functionMinBy,_signature:[{types:[h.TYPE_ARRAY]},{types:[h.TYPE_EXPREF]}]},not_null:{_func:this.functionNotNull,_signature:[{types:[h.TYPE_ANY],variadic:!0}]},reverse:{_func:this.functionReverse,_signature:[{types:[h.TYPE_STRING,h.TYPE_ARRAY]}]},sort:{_func:this.functionSort,_signature:[{types:[h.TYPE_ARRAY_STRING,h.TYPE_ARRAY_NUMBER]}]},sort_by:{_func:this.functionSortBy,_signature:[{types:[h.TYPE_ARRAY]},{types:[h.TYPE_EXPREF]}]},starts_with:{_func:this.functionStartsWith,_signature:[{types:[h.TYPE_STRING]},{types:[h.TYPE_STRING]}]},sum:{_func:this.functionSum,_signature:[{types:[h.TYPE_ARRAY_NUMBER]}]},to_array:{_func:this.functionToArray,_signature:[{types:[h.TYPE_ANY]}]},to_number:{_func:this.functionToNumber,_signature:[{types:[h.TYPE_ANY]}]},to_string:{_func:this.functionToString,_signature:[{types:[h.TYPE_ANY]}]},type:{_func:this.functionType,_signature:[{types:[h.TYPE_ANY]}]},values:{_func:this.functionValues,_signature:[{types:[h.TYPE_OBJECT]}]}},this._interpreter=e}registerFunction(e,t,n){if(e in this.functionTable)throw new Error(`Function already defined: ${e}()`);this.functionTable[e]={_func:t.bind(this),_signature:n}}callFunction(e,t){const n=this.functionTable[e];if(void 0===n)throw new Error(`Unknown function: ${e}()`);return this.validateArgs(e,t,n._signature),n._func.call(this,t)}validateInputSignatures(e,t){for(let n=0;n<t.length;n+=1)if("variadic"in t[n]&&n!==t.length-1)throw new Error(`ArgumentError: ${e}() 'variadic' argument ${n+1} must occur last`)}validateArgs(e,t,n){var r,i;let o;this.validateInputSignatures(e,n);const s=n.filter((e=>{var t;return null!==(t=!e.optional)&&void 0!==t&&t})).length,a=null!==(i=null===(r=n[n.length-1])||void 0===r?void 0:r.variadic)&&void 0!==i&&i,l=t.length<s,u=t.length>n.length,c=l&&(!a&&s>1||a)?"at least ":"";if(a&&l||!a&&(l||u))throw o=n.length>1,new Error(`ArgumentError: ${e}() takes ${c}${s} argument${o?"s":""} but received ${t.length}`);let d,h,p;for(let r=0;r<n.length;r+=1){let i;for(p=!1,d=n[r].types,h=this.getTypeName(t[r]),i=0;i<d.length;i+=1)if(void 0!==h&&this.typeMatches(h,d[i],t[r])){p=!0;break}if(!p&&void 0!==h){const t=d.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ");throw new Error(`TypeError: ${e}() expected argument ${r+1} to be type (${t}) but received type ${this.TYPE_NAME_TABLE[h]} instead.`)}}}typeMatches(e,t,n){if(t===h.TYPE_ANY)return!0;if(t!==h.TYPE_ARRAY_STRING&&t!==h.TYPE_ARRAY_NUMBER&&t!==h.TYPE_ARRAY)return e===t;if(t===h.TYPE_ARRAY)return e===h.TYPE_ARRAY;if(e===h.TYPE_ARRAY){let e;t===h.TYPE_ARRAY_NUMBER?e=h.TYPE_NUMBER:t===h.TYPE_ARRAY_STRING&&(e=h.TYPE_STRING);for(let t=0;t<n.length;t+=1){const r=this.getTypeName(n[t]);if(void 0!==r&&void 0!==e&&!this.typeMatches(r,e,n[t]))return!1}return!0}return!1}getTypeName(e){switch(Object.prototype.toString.call(e)){case"[object String]":return h.TYPE_STRING;case"[object Number]":return h.TYPE_NUMBER;case"[object Array]":return h.TYPE_ARRAY;case"[object Boolean]":return h.TYPE_BOOLEAN;case"[object Null]":return h.TYPE_NULL;case"[object Object]":return e.jmespathType===o.TOK_EXPREF?h.TYPE_EXPREF:h.TYPE_OBJECT;default:return}}createKeyFunction(e,t){if(!this._interpreter)return;const n=this._interpreter;return r=>{const i=n.visit(e,r);if(!t.includes(this.getTypeName(i))){const e=`TypeError: expected one of (${t.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ")}), received ${this.TYPE_NAME_TABLE[this.getTypeName(i)]}`;throw new Error(e)}return i}}}const f=new class{constructor(){this._rootValue=null,this.runtime=new p(this)}search(e,t){return this._rootValue=t,this.visit(e,t)}visit(e,i){let s,a,l,u,c,d,h,p,f,m,g;switch(e.type){case"Field":return null===i?null:t(i)?(d=i[e.name],void 0===d?null:d):null;case"Subexpression":for(l=this.visit(e.children[0],i),m=1;m<e.children.length;m+=1)if(l=this.visit(e.children[1],l),null===l)return null;return l;case"IndexExpression":return h=this.visit(e.children[0],i),p=this.visit(e.children[1],h),p;case"Index":if(!Array.isArray(i))return null;let v=e.value;return v<0&&(v=i.length+v),l=i[v],void 0===l&&(l=null),l;case"Slice":if(!Array.isArray(i))return null;const y=[...e.children],_=this.computeSliceParams(i.length,y),[b,w,x]=_;if(l=[],x>0)for(m=b;m<w;m+=x)l.push(i[m]);else for(m=b;m>w;m+=x)l.push(i[m]);return l;case"Projection":if(g=this.visit(e.children[0],i),!Array.isArray(g))return null;for(f=[],m=0;m<g.length;m+=1)a=this.visit(e.children[1],g[m]),null!==a&&f.push(a);return f;case"ValueProjection":if(g=this.visit(e.children[0],i),!t(g))return null;f=[];const k=Object.values(g);for(m=0;m<k.length;m+=1)a=this.visit(e.children[1],k[m]),null!==a&&f.push(a);return f;case"FilterProjection":if(g=this.visit(e.children[0],i),!Array.isArray(g))return null;const S=[],T=[];for(m=0;m<g.length;m+=1)s=this.visit(e.children[2],g[m]),r(s)||S.push(g[m]);for(let t=0;t<S.length;t+=1)a=this.visit(e.children[1],S[t]),null!==a&&T.push(a);return T;case"Comparator":switch(u=this.visit(e.children[0],i),c=this.visit(e.children[1],i),e.name){case o.TOK_EQ:l=n(u,c);break;case o.TOK_NE:l=!n(u,c);break;case o.TOK_GT:l=u>c;break;case o.TOK_GTE:l=u>=c;break;case o.TOK_LT:l=u<c;break;case o.TOK_LTE:l=u<=c;break;default:throw new Error(`Unknown comparator: ${e.name}`)}return l;case o.TOK_FLATTEN:const E=this.visit(e.children[0],i);if(!Array.isArray(E))return null;let D=[];for(m=0;m<E.length;m+=1)a=E[m],Array.isArray(a)?D=[...D,...a]:D.push(a);return D;case"Identity":return i;case"MultiSelectList":if(null===i)return null;for(f=[],m=0;m<e.children.length;m+=1)f.push(this.visit(e.children[m],i));return f;case"MultiSelectHash":if(null===i)return null;let C;for(f={},m=0;m<e.children.length;m+=1)C=e.children[m],f[C.name]=this.visit(C.value,i);return f;case"OrExpression":return s=this.visit(e.children[0],i),r(s)&&(s=this.visit(e.children[1],i)),s;case"AndExpression":return u=this.visit(e.children[0],i),r(u)?u:this.visit(e.children[1],i);case"NotExpression":return u=this.visit(e.children[0],i),r(u);case"Literal":return e.value;case o.TOK_PIPE:return h=this.visit(e.children[0],i),this.visit(e.children[1],h);case o.TOK_CURRENT:return i;case o.TOK_ROOT:return this._rootValue;case"Function":const M=[];for(let t=0;t<e.children.length;t+=1)M.push(this.visit(e.children[t],i));return this.runtime.callFunction(e.name,M);case"ExpressionReference":const A=e.children[0];return A.jmespathType=o.TOK_EXPREF,A;default:throw new Error(`Unknown node type: ${e.type}`)}}computeSliceParams(e,t){let[n,r,i]=t;if(null===i)i=1;else if(0===i){const e=new Error("Invalid slice, step cannot be 0");throw e.name="RuntimeError",e}const o=i<0;return n=null===n?o?e-1:0:this.capSliceRange(e,n,i),r=null===r?o?-1:e:this.capSliceRange(e,r,i),[n,r,i]}capSliceRange(e,t,n){let r=t;return r<0?(r+=e,r<0&&(r=n<0?-1:0)):r>=e&&(r=n<0?e-1:e),r}},m=h.TYPE_ANY,g=h.TYPE_ARRAY,v=h.TYPE_ARRAY_NUMBER,y=h.TYPE_ARRAY_STRING,_=h.TYPE_BOOLEAN,b=h.TYPE_EXPREF,w=h.TYPE_NULL,x=h.TYPE_NUMBER,k=h.TYPE_OBJECT,S=h.TYPE_STRING;function T(e){return d.parse(e)}function E(e){return u.tokenize(e)}const D=(e,t,n)=>{f.runtime.registerFunction(e,t,n)};function C(e,t){const n=d.parse(t);return f.search(n,e)}const M=f,A={compile:T,registerFunction:D,search:C,tokenize:E,TreeInterpreter:M,TYPE_ANY:m,TYPE_ARRAY_NUMBER:v,TYPE_ARRAY_STRING:y,TYPE_ARRAY:g,TYPE_BOOLEAN:_,TYPE_EXPREF:b,TYPE_NULL:w,TYPE_NUMBER:x,TYPE_OBJECT:k,TYPE_STRING:S};e.TYPE_ANY=m,e.TYPE_ARRAY=g,e.TYPE_ARRAY_NUMBER=v,e.TYPE_ARRAY_STRING=y,e.TYPE_BOOLEAN=_,e.TYPE_EXPREF=b,e.TYPE_NULL=w,e.TYPE_NUMBER=x,e.TYPE_OBJECT=k,e.TYPE_STRING=S,e.TreeInterpreter=M,e.compile=T,e.default=A,e.jmespath=A,e.registerFunction=D,e.search=C,e.tokenize=E,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/animations"),require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/animations","@angular/core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).collapse={},e.ng.animations,e.ng.core)}(this,(function(e,t,n){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=r(t),o=r(n);const s="400ms cubic-bezier(0.4,0.0,0.2,1)",a=[t.style({height:0,visibility:"hidden"}),t.animate(s,t.style({height:"*",visibility:"visible"}))],l=[t.style({height:"*",visibility:"visible"}),t.animate(s,t.style({height:0,visibility:"hidden"}))];class u{constructor(e,t,r){this._el=e,this._renderer=t,this.collapsed=new n.EventEmitter,this.collapses=new n.EventEmitter,this.expanded=new n.EventEmitter,this.expands=new n.EventEmitter,this.isExpanded=!0,this.collapseNewValue=!0,this.isCollapsed=!1,this.isCollapse=!0,this.isCollapsing=!1,this.isAnimated=!1,this._display="block",this._stylesLoaded=!1,this._COLLAPSE_ACTION_NAME="collapse",this._EXPAND_ACTION_NAME="expand",this._factoryCollapseAnimation=r.build(l),this._factoryExpandAnimation=r.build(a)}set display(e){this._display=e,"none"!==e?this.isAnimated?this.toggle():this.show():this.hide()}set collapse(e){this.collapseNewValue=e,this._player&&!this._isAnimationDone||(this.isExpanded=e,this.toggle())}get collapse(){return this.isExpanded}ngAfterViewChecked(){this._stylesLoaded=!0,this._player&&this._isAnimationDone&&(this._player.reset(),this._renderer.setStyle(this._el.nativeElement,"height","*"))}toggle(){this.isExpanded?this.hide():this.show()}hide(){this.isCollapsing=!0,this.isExpanded=!1,this.isCollapsed=!0,this.isCollapsing=!1,this.collapses.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._COLLAPSE_ACTION_NAME)((()=>{this._isAnimationDone=!0,this.collapseNewValue!==this.isCollapsed&&this.isAnimated?this.show():(this.collapsed.emit(this),this._renderer.setStyle(this._el.nativeElement,"display","none"))}))}show(){this._renderer.setStyle(this._el.nativeElement,"display",this._display),this.isCollapsing=!0,this.isExpanded=!0,this.isCollapsed=!1,this.isCollapsing=!1,this.expands.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._EXPAND_ACTION_NAME)((()=>{this._isAnimationDone=!0,this.collapseNewValue!==this.isCollapsed&&this.isAnimated?this.hide():(this.expanded.emit(this),this._renderer.removeStyle(this._el.nativeElement,"overflow"))}))}animationRun(e,t){if(!e||!this._stylesLoaded)return e=>e();this._renderer.setStyle(this._el.nativeElement,"overflow","hidden"),this._renderer.addClass(this._el.nativeElement,"collapse");const n=t===this._EXPAND_ACTION_NAME?this._factoryExpandAnimation:this._factoryCollapseAnimation;return this._player&&this._player.reset(),this._player=n.create(this._el.nativeElement),this._player.play(),e=>this._player?.onDone(e)}}u.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"14.0.6",ngImport:o,type:u,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:i.AnimationBuilder}],target:o.\u0275\u0275FactoryTarget.Directive}),u.\u0275dir=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"14.0.6",type:u,selector:"[collapse]",inputs:{display:"display",isAnimated:"isAnimated",collapse:"collapse"},outputs:{collapsed:"collapsed",collapses:"collapses",expanded:"expanded",expands:"expands"},host:{properties:{"class.collapse":"this.isCollapse","class.in":"this.isExpanded","class.show":"this.isExpanded","attr.aria-hidden":"this.isCollapsed","class.collapsing":"this.isCollapsing"}},exportAs:["bs-collapse"],ngImport:o}),o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"14.0.6",ngImport:o,type:u,decorators:[{type:n.Directive,args:[{selector:"[collapse]",exportAs:"bs-collapse",host:{"[class.collapse]":"true"}}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:i.AnimationBuilder}]},propDecorators:{collapsed:[{type:n.Output}],collapses:[{type:n.Output}],expanded:[{type:n.Output}],expands:[{type:n.Output}],isExpanded:[{type:n.HostBinding,args:["class.in"]},{type:n.HostBinding,args:["class.show"]}],isCollapsed:[{type:n.HostBinding,args:["attr.aria-hidden"]}],isCollapse:[{type:n.HostBinding,args:["class.collapse"]}],isCollapsing:[{type:n.HostBinding,args:["class.collapsing"]}],display:[{type:n.Input}],isAnimated:[{type:n.Input}],collapse:[{type:n.Input}]}});class c{static forRoot(){return{ngModule:c,providers:[]}}}c.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"14.0.6",ngImport:o,type:c,deps:[],target:o.\u0275\u0275FactoryTarget.NgModule}),c.\u0275mod=o.\u0275\u0275ngDeclareNgModule({minVersion:"14.0.0",version:"14.0.6",ngImport:o,type:c,declarations:[u],exports:[u]}),c.\u0275inj=o.\u0275\u0275ngDeclareInjector({minVersion:"12.0.0",version:"14.0.6",ngImport:o,type:c}),o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"14.0.6",ngImport:o,type:c,decorators:[{type:n.NgModule,args:[{declarations:[u],exports:[u]}]}]}),e.CollapseDirective=u,e.CollapseModule=c})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).chronos={})}(this,(function(e){"use strict";function t(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function n(e){return"string"==typeof e}function r(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function i(e){return e&&e.getTime&&!isNaN(e.getTime())}function o(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e){return void 0===e}function d(e){const n=+e;let r=0;return 0!==n&&isFinite(n)&&(r=t(n)),r}const h={},p={date:"day",hour:"hours",minute:"minutes",second:"seconds",millisecond:"milliseconds"};function f(e,t){const n=e.toLowerCase();let r=e;n in p&&(r=p[n]),h[n]=h[`${n}s`]=h[t]=r}function m(e){return n(e)?h[e]||h[e.toLowerCase()]:void 0}const g=0,v=1,y=2,_=3,b=4,w=5,x=6,k=7,S=8;function T(e,t,n){const r=`${Math.abs(e)}`,i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}const E={},D={},C=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;function M(e,t,n,r){e&&(D[e]=r),t&&(D[t[0]]=function(){return T(r.apply(null,arguments),t[1],t[2])}),n&&(D[n]=function(t,n){return n.locale.ordinal(r.apply(null,arguments),e)})}function A(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function I(e,t,n){const r=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(r.getUTCFullYear())&&r.setUTCFullYear(e),r}function L(e,t=0,n=1,r=0,i=0,o=0,s=0){const a=new Date(e,t,n,r,i,o,s);return e<100&&e>=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function O(e,t=!1){return t?e.getUTCHours():e.getHours()}function N(e,t=!1){return t?e.getUTCMinutes():e.getMinutes()}function R(e,t=!1){return t?e.getUTCSeconds():e.getSeconds()}function P(e,t=!1){return t?e.getUTCMilliseconds():e.getMilliseconds()}function F(e,t=!1){return t?e.getUTCDay():e.getDay()}function j(e,t=!1){return t?e.getUTCDate():e.getDate()}function Y(e,t=!1){return t?e.getUTCMonth():e.getMonth()}function V(e,t=!1){return t?e.getUTCFullYear():e.getFullYear()}function H(e,t){return!(!e||!t)&&(B(e,t)&&Y(e)===Y(t))}function B(e,t){return!(!e||!t)&&V(e)===V(t)}const U=/\d/,z=/\d\d/,q=/\d{3}/,W=/\d{4}/,$=/[+-]?\d{6}/,G=/\d\d?/,K=/\d\d\d\d?/,Z=/\d\d\d\d\d\d?/,X=/\d{1,3}/,J=/\d{1,4}/,Q=/[+-]?\d{1,6}/,ee=/\d+/,te=/[+-]?\d+/,ne=/Z|[+-]\d\d(?::?\d\d)?/gi,re=/[+-]?\d+(\.\d{1,3})?/,ie=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oe={};function se(e,t,n){o(t)?oe[e]=t:oe[e]=function(e,r){return e&&n?n:t}}function ae(e,t){return l(oe,e)?oe[e](!1,t):new RegExp(le(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,((e,t,n,r,i)=>t||n||r||i))))}function le(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}const ue={};function ce(e,t){const r=n(e)?[e]:e;let i=t;if(s(t)&&(i=function(e,n,r){return n[t]=d(e),r}),a(r)&&o(i)){let e;for(e=0;e<r.length;e++)ue[r[e]]=i}}function de(e,t){ce(e,(function(e,n,r,i){return r._w=r._w||{},t(e,r._w,r,i)}))}function he(e,t,n){return null!=t&&l(ue,e)&&ue[e](t,n._a,n,e),n}function pe(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function fe(e,t){return t.locale.getFullYear?t.locale.getFullYear(e,t.isUTC).toString():V(e,t.isUTC).toString()}function me(e){return d(e)+(d(e)>68?1900:2e3)}function ge(e){return ve(e)?366:365}function ve(e){return e%4==0&&e%100!=0||e%400==0}function ye(e,t){if(isNaN(e)||isNaN(t))return NaN;const n=(t%(r=12)+r)%r;var r;return 1===n?ve(e+(t-n)/12)?29:28:31-n%7%2}const _e={year:0,month:0,day:0,hour:0,minute:0,seconds:0};function be(e,t){return s(t)?t:e}function we(e,t,n){const r=Math.min(j(e),ye(V(e),t));return n?e.setUTCMonth(t,r):e.setMonth(t,r),e}function xe(e,t,n){return n?e.setUTCDate(t):e.setDate(t),e}function ke(e){return new Date(e.getTime())}function Se(e,t,r){const i=ke(e);switch(t){case"year":we(i,0,r);case"quarter":case"month":xe(i,1,r);case"week":case"isoWeek":case"day":case"date":!function(e,t,n){n?e.setUTCHours(t):e.setHours(t)}(i,0,r);case"hours":!function(e,t,n){n?e.setUTCMinutes(t):e.setMinutes(t)}(i,0,r);case"minutes":!function(e,t,n){n?e.setUTCSeconds(t):e.setSeconds(t)}(i,0,r);case"seconds":!function(e,t,n){n?e.setUTCMilliseconds(t):e.setMilliseconds(t)}(i,0,r)}return"week"===t&&function(e,t,n={}){const r=un(e,n.locale,n.isUTC);rn(e,t-r,"day")}(i,0,{isUTC:r}),"isoWeek"===t&&function(e,t,r={}){const i=function(e,t=ct()){if(n(e))return t.weekdaysParse(e)%7||7;return s(e)&&isNaN(e)?null:e}(t,r.locale);an(e,ln(e)%7?i:i-7)}
|
|
1612
|
+
\******************/n.r(r),n.d(r,{$rootScope:()=>e.$rootScope,ApiAwareVariable:()=>o.ApiAwareVariable,BaseAction:()=>i.BaseAction,CONSTANTS:()=>e.CONSTANTS,CrudVariable:()=>u.CrudVariable,DB_CONSTANTS:()=>e.DB_CONSTANTS,LVService:()=>d.LVService,LiveVariable:()=>c.LiveVariable,LiveVariableUtils:()=>h.LiveVariableUtils,ModelVariable:()=>a.ModelVariable,SWAGGER_CONSTANTS:()=>e.SWAGGER_CONSTANTS,ServiceVariable:()=>l.ServiceVariable,TEST:()=>p,TimerAction:()=>s.TimerAction,VARIABLE_CONSTANTS:()=>e.VARIABLE_CONSTANTS,VARIABLE_URLS:()=>e.VARIABLE_URLS,WS_CONSTANTS:()=>e.WS_CONSTANTS,appManager:()=>t.appManager,debounceVariableCall:()=>t.debounceVariableCall,decodeData:()=>t.decodeData,dialogService:()=>t.dialogService,formatDate:()=>t.formatDate,formatExportExpression:()=>t.formatExportExpression,generateConnectionParams:()=>d.generateConnectionParams,getBlob:()=>t.getBlob,getErrMessage:()=>t.getErrMessage,getEvaluatedOrderBy:()=>t.getEvaluatedOrderBy,getTarget:()=>t.getTarget,getTargetNodeKey:()=>t.getTargetNodeKey,getTargetObj:()=>t.getTargetObj,httpService:()=>t.httpService,initiateCallback:()=>t.initiateCallback,internalBoundNodeMap:()=>t.internalBoundNodeMap,isFileUploadSupported:()=>t.isFileUploadSupported,metadataService:()=>t.metadataService,navigationService:()=>t.navigationService,oauthService:()=>t.oauthService,parseConfig:()=>d.parseConfig,routerService:()=>t.routerService,securityService:()=>t.securityService,setInput:()=>t.setInput,setValueToNode:()=>t.setValueToNode,toasterService:()=>t.toasterService,updateInternalNodes:()=>t.updateInternalNodes,wmSetDependency:()=>t.wmSetDependency});var e=n(/*! ./src/constants/variables.constants */"./src/constants/variables.constants.ts"),t=n(/*! ./src/util/variable/variables.utils */"./src/util/variable/variables.utils.ts"),i=n(/*! ./src/model/base-action */"./src/model/base-action.ts"),o=n(/*! ./src/model/variable/api-aware-variable */"./src/model/variable/api-aware-variable.ts"),s=n(/*! ./src/model/action/timer-action */"./src/model/action/timer-action.ts"),a=n(/*! ./src/model/variable/model-variable */"./src/model/variable/model-variable.ts"),l=n(/*! ./src/model/variable/service-variable */"./src/model/variable/service-variable.ts"),u=n(/*! ./src/model/variable/crud-variable */"./src/model/variable/crud-variable.ts"),c=n(/*! ./src/model/variable/live-variable */"./src/model/variable/live-variable.ts"),d=(n(/*! ./src/types/http-client.service */"./src/types/http-client.service.ts"),n(/*! ./src/util/variable/live-variable.http.utils */"./src/util/variable/live-variable.http.utils.ts")),h=n(/*! ./src/util/variable/live-variable.utils */"./src/util/variable/live-variable.utils.ts"),p=(n(/*! ./src/types/date-formatter */"./src/types/date-formatter.ts"),"hello from variables")})(),r})())),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).IMask={})}(this,(function(e){"use strict";function t(e){return"string"==typeof e||e instanceof String}function n(e){var t;return"object"==typeof e&&null!=e&&"Object"===(null==e||null==(t=e.constructor)?void 0:t.name)}function r(e,t){return Array.isArray(t)?r(e,((e,n)=>t.includes(n))):Object.entries(e).reduce(((e,n)=>{let[r,i]=n;return t(i,r)&&(e[r]=i),e}),{})}const i={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function o(e){switch(e){case i.LEFT:return i.FORCE_LEFT;case i.RIGHT:return i.FORCE_RIGHT;default:return e}}function s(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function a(e,t){if(t===e)return!0;const n=Array.isArray(t),r=Array.isArray(e);let i;if(n&&r){if(t.length!=e.length)return!1;for(i=0;i<t.length;i++)if(!a(t[i],e[i]))return!1;return!0}if(n!=r)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){const n=t instanceof Date,r=e instanceof Date;if(n&&r)return t.getTime()==e.getTime();if(n!=r)return!1;const o=t instanceof RegExp,s=e instanceof RegExp;if(o&&s)return t.toString()==e.toString();if(o!=s)return!1;const l=Object.keys(t);for(i=0;i<l.length;i++)if(!Object.prototype.hasOwnProperty.call(e,l[i]))return!1;for(i=0;i<l.length;i++)if(!a(e[l[i]],t[l[i]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class l{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?i.NONE:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?i.LEFT:i.RIGHT}}function u(e,t){return new u.InputMask(e,t)}function c(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?u.MaskedRegExp:t(e)?u.MaskedPattern:e===Date?u.MaskedDate:e===Number?u.MaskedNumber:Array.isArray(e)||e===Array?u.MaskedDynamic:u.Masked&&e.prototype instanceof u.Masked?e:u.Masked&&e instanceof u.Masked?e.constructor:e instanceof Function?u.MaskedFunction:(console.warn("Mask not found for mask",e),u.Masked)}function d(e){if(!e)throw new Error("Options in not defined");if(u.Masked){if(e.prototype instanceof u.Masked)return{mask:e};const{mask:t,...i}=e instanceof u.Masked?{mask:e}:n(e)&&e.mask instanceof u.Masked?e:{};if(t){const e=t.mask;return{...r(t,((e,t)=>!t.startsWith("_"))),mask:t.constructor,_mask:e,...i}}}return n(e)?{...e}:{mask:e}}function h(e){if(u.Masked&&e instanceof u.Masked)return e;const t=d(e),n=c(t.mask);if(!n)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}u.createMask=h;class p{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}u.MaskElement=p;class f extends p{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,n;return null!=(e=null==(t=(n=this.input).getRootNode)?void 0:t.call(n))?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}u.HTMLMaskElement=f;class m extends f{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}u.HTMLMaskElement=f;class g extends f{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n<r?n:r}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return null==r||null==n||n>r?n:r}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,e),n.setEnd(this.input.lastChild||this.input,t);const r=this.rootElement,i=r.getSelection&&r.getSelection();i&&(i.removeAllRanges(),i.addRange(n))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}u.HTMLContenteditableMaskElement=g;class v{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>v.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}v.MAX_LENGTH=100;class y{constructor(e,t){this.el=e instanceof p?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new g(e):new m(e),this.masked=h(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new v,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof u.Masked)&&this.masked.constructor===c(e))return void this.masked.updateOptions({mask:e});const t=e instanceof u.Masked?e:h({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const n=this._listeners[e];n&&n.forEach((e=>e(t)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,n=this.masked.value,r=this.masked.rawInputValue,i=this.displayValue,o=this.unmaskedValue!==t||this.value!==n||this._rawInputValue!==r;this._unmaskedValue=t,this._value=n,this._rawInputValue=r,this.el.value!==i&&(this.el.value=i),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),o&&this._fireChangeEvents(),this._historyChanging||!o&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...n}=e,r=!this.maskEquals(t),i=this.masked.optionsIsChanged(n);r&&(this.mask=t),i&&this.masked.updateOptions(n),(r||i)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,i.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const n=this._listeners[e].indexOf(t);return n>=0&&this._listeners[e].splice(n,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new l({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,r=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,o=n===this.masked.rawInputValue?t.removeDirection:i.NONE;let s=this.masked.nearestInputPos(t.startChangePos+r,o);o!==i.NONE&&(s=this.masked.nearestInputPos(s,i.NONE)),this.updateControl(s),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}u.InputMask=y;class _{static normalize(e){return Array.isArray(e)?e:[e,new _]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}u.ChangeDetails=_;class b{constructor(e,t,n){void 0===e&&(e=""),void 0===t&&(t=0),this.value=e,this.from=t,this.stop=n}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class w{constructor(e){this._value="",this._update({...w.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new b(this.extractInput(e,t),e)}appendTail(e){return t(e)&&(e=new b(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new _({inserted:e,rawInserted:e})):new _}_appendChar(e,t,n){void 0===t&&(t={});const r=this.state;let i;if([e,i]=this.doPrepareChar(e,t),e&&(i=i.aggregate(this._appendCharRaw(e,t)),!i.rawInserted&&"pad"===this.autofix)){const n=this.state;this.state=r;let o=this.pad(t);const s=this._appendCharRaw(e,t);o=o.aggregate(s),s.rawInserted||o.equals(i)?i=o:this.state=n}if(i.inserted){let e,o=!1!==this.doValidate(t);if(o&&null!=n){const t=this.state;if(!0===this.overwrite){e=n.state;for(let e=0;e<i.rawInserted.length;++e)n.unshift(this.displayValue.length-i.tailShift)}let r=this.appendTail(n);if(o=r.rawInserted.length===n.toString().length,!(o&&r.inserted||"shift"!==this.overwrite)){this.state=t,e=n.state;for(let e=0;e<i.rawInserted.length;++e)n.shift();r=this.appendTail(n),o=r.rawInserted.length===n.toString().length}o&&r.inserted&&(this.state=t)}o||(i=new _,this.state=r,n&&e&&(n.state=e))}return i}_appendPlaceholder(){return new _}_appendEager(){return new _}append(e,n,r){if(!t(e))throw new Error("value should be string");const i=t(r)?new b(String(r)):r;let o;null!=n&&n.tail&&(n._beforeTailState=this.state),[e,o]=this.doPrepare(e,n);for(let t=0;t<e.length;++t){const r=this._appendChar(e[t],n,i);if(!r.rawInserted&&!this.doSkipInvalid(e[t],n,i))break;o.aggregate(r)}return(!0===this.eager||"append"===this.eager)&&null!=n&&n.input&&e&&o.aggregate(this._appendEager()),null!=i&&(o.tailShift+=this.appendTail(i).tailShift),o}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new _}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,n=this.value,r=e();return this.rawInputValue=t,this.value&&this.value!==n&&0===n.indexOf(this.value)&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,n=e(this);return this.state=t,delete this._isolated,n}doSkipInvalid(e,t,n){return Boolean(this.skipInvalid)}doPrepare(e,t){return void 0===t&&(t={}),_.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return void 0===t&&(t={}),_.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,n,r,s){void 0===n&&(n=""),void 0===r&&(r=i.NONE),void 0===s&&(s={input:!0});const a=e+t,l=this.extractTail(a),u=!0===this.eager||"remove"===this.eager;let c;u&&(r=o(r),c=this.extractInput(0,a,{raw:!0}));let d=e;const h=new _;if(r!==i.NONE&&(d=this.nearestInputPos(e,t>1&&0!==e&&!u?i.NONE:r),h.tailShift=d-e),h.aggregate(this.remove(d)),u&&r!==i.NONE&&c===this.rawInputValue)if(r===i.FORCE_LEFT){let e;for(;c===this.rawInputValue&&(e=this.displayValue.length);)h.aggregate(new _({tailShift:-1})).aggregate(this.remove(e-1))}else r===i.FORCE_RIGHT&&l.unshift();return h.aggregate(this.append(n,s,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!a(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||w.EMPTY_VALUES.includes(e)&&w.EMPTY_VALUES.includes(t)||!!this.format&&this.format(e,this)===this.format(this.typedValue,this)}pad(e){return new _}}w.DEFAULTS={skipInvalid:!0},w.EMPTY_VALUES=[void 0,null,""],u.Masked=w;class x{constructor(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=t(e)?new b(String(e)):e;const n=this.chunks[this.chunks.length-1],r=n&&(n.stop===e.stop||null==e.stop)&&e.from===n.from+n.toString().length;if(e instanceof b)r?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof x){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof u.MaskedPattern))return new b(this.toString()).appendTo(e);const t=new _;for(let n=0;n<this.chunks.length;++n){const r=this.chunks[n],i=e._mapPosToBlock(e.displayValue.length),o=r.stop;let s;if(null!=o&&(!i||i.index<=o)&&((r instanceof x||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),s=r instanceof x&&e._blocks[o]),s){const n=s.appendTail(r);t.aggregate(n);const i=r.toString().slice(n.rawInserted.length);i&&t.aggregate(e.append(i,{tail:!0}))}else t.aggregate(e.append(r.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map((e=>e.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...n}=e;Object.assign(this,n),this.chunks=t.map((e=>{const t="chunks"in e?new x:new b;return t.state=e,t}))}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let n=0;for(;n<this.chunks.length;){const e=this.chunks[n],r=e.unshift(t);if(e.toString()){if(!r)break;++n}else this.chunks.splice(n,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],n=t.shift();if(t.toString()){if(!n)break;--e}else this.chunks.splice(e,1);if(n)return n}return""}}class k{constructor(e,t){this.masked=e,this._log=[];const{offset:n,index:r}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,i.FORCE_LEFT),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,i.LEFT),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,i.LEFT),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,i.FORCE_RIGHT),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,i.NONE),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,i.NONE),!0}))}}class S{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new _}nearestInputPos(e,t){void 0===t&&(t=i.NONE);const n=this._value.length;switch(t){case i.LEFT:case i.FORCE_LEFT:return 0;default:return n}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),void 0===n&&(n={}),n.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new _;const n=!0===this.eager||"append"===this.eager,r=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!n)&&!t.tail,i=new _({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(t.raw||t.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new _;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new b("")}appendTail(e){return t(e)&&(e=new b(String(e))),e.appendTo(this)}append(e,t,n){const r=this._appendChar(e[0],t);return null!=n&&(r.tailShift+=this.appendTail(n).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class T{constructor(e){const{parent:t,isOptional:n,placeholderChar:r,displayChar:i,lazy:o,eager:s,...a}=e;this.masked=h(a),Object.assign(this,{parent:t,isOptional:n,placeholderChar:r,displayChar:i,lazy:o,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new _}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new _;const n=this.masked.state;let r=this.masked._appendChar(e,this.currentMaskFlags(t));return r.inserted&&!1===this.doValidate(t)&&(r=new _,this.masked.state=n),r.inserted||this.isOptional||this.lazy||t.input||(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=Boolean(r.inserted),r}append(e,t,n){return this.masked.append(e,this.currentMaskFlags(t),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new _:(this.isFilled=!0,new _({inserted:this.placeholderChar}))}_appendEager(){return new _}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.masked.extractInput(e,t,n)}nearestInputPos(e,t){void 0===t&&(t=i.NONE);const n=this.value.length,r=Math.min(Math.max(e,0),n);switch(t){case i.LEFT:case i.FORCE_LEFT:return this.isComplete?r:0;case i.RIGHT:case i.FORCE_RIGHT:return this.isComplete?r:n;default:return r}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new _}}T.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class E extends w{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>e.search(t)>=0),super._update(e)}}u.MaskedRegExp=E;class D extends w{constructor(e){super({...D.DEFAULTS,...e,definitions:Object.assign({},T.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let n=!1,r=!1;for(let i=0;i<t.length;++i){if(this.blocks){const e=t.slice(i),n=Object.keys(this.blocks).filter((t=>0===e.indexOf(t)));n.sort(((e,t)=>t.length-e.length));const r=n[0];if(r){const{expose:e,repeat:t,...n}=d(this.blocks[r]),o={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...n,repeat:t,parent:this},s=null!=t?new u.RepeatBlock(o):h(o);s&&(this._blocks.push(s),e&&(this.exposeBlock=s),this._maskedBlocks[r]||(this._maskedBlocks[r]=[]),this._maskedBlocks[r].push(this._blocks.length-1)),i+=r.length-1;continue}}let o=t[i],s=o in e;if(o===D.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===o||"}"===o){n=!n;continue}if("["===o||"]"===o){r=!r;continue}if(o===D.ESCAPE_CHAR){if(++i,o=t[i],!o)break;s=!1}const a=s?new T({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...d(e[o]),parent:this}):new S({char:o,eager:this.eager,isUnmasking:n});this._blocks.push(a)}}get state(){return{...super.state,_blocks:this._blocks.map((e=>e.state))}}set state(e){if(!e)return void this.reset();const{_blocks:t,...n}=e;this._blocks.forEach(((e,n)=>e.state=t[n])),super.state=n}reset(){super.reset(),this._blocks.forEach((e=>e.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((e=>e.isComplete))}get isFilled(){return this._blocks.every((e=>e.isFilled))}get isFixed(){return this._blocks.every((e=>e.isFixed))}get isOptional(){return this._blocks.every((e=>e.isOptional))}doCommit(){this._blocks.forEach((e=>e.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((e,t)=>e+t.unmaskedValue),"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((e,t)=>e+t.value),"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce(((e,t)=>e+t.displayValue),"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new _;let n=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==n)return t;this._blocks[n].isFilled&&++n;for(let e=n;e<this._blocks.length;++e){const n=this._blocks[e]._appendEager();if(!n.inserted)break;t.aggregate(n)}return t}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._mapPosToBlock(this.displayValue.length),r=new _;if(!n)return r;for(let o,s=n.index;o=this._blocks[s];++s){var i;const n=o._appendChar(e,{...t,_beforeTailState:null==(i=t._beforeTailState)||null==(i=i._blocks)?void 0:i[s]});if(r.aggregate(n),n.consumed)break}return r}extractTail(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=new x;return e===t||this._forEachBlocksInRange(e,t,((e,t,r,i)=>{const o=e.extractTail(r,i);o.stop=this._findStopBefore(t),o.from=this._blockStartPos(t),o instanceof x&&(o.blockIndex=t),n.extend(o)})),n}extractInput(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),void 0===n&&(n={}),e===t)return"";let r="";return this._forEachBlocksInRange(e,t,((e,t,i,o)=>{r+=e.extractInput(i,o,n)})),r}_findStopBefore(e){let t;for(let n=0;n<this._stops.length;++n){const r=this._stops[n];if(!(r<=e))break;t=r}return t}_appendPlaceholder(e){const t=new _;if(this.lazy&&null==e)return t;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return t;const r=n.index,i=null!=e?e:this._blocks.length;return this._blocks.slice(r,i).forEach((n=>{var r;n.lazy&&null==e||t.aggregate(n._appendPlaceholder(null==(r=n._blocks)?void 0:r.length))})),t}_mapPosToBlock(e){let t="";for(let n=0;n<this._blocks.length;++n){const r=this._blocks[n],i=t.length;if(t+=r.displayValue,e<=t.length)return{index:n,offset:e-i}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce(((e,t)=>e+t.displayValue.length),0)}_forEachBlocksInRange(e,t,n){void 0===t&&(t=this.displayValue.length);const r=this._mapPosToBlock(e);if(r){const e=this._mapPosToBlock(t),i=e&&r.index===e.index,o=r.offset,s=e&&i?e.offset:this._blocks[r.index].displayValue.length;if(n(this._blocks[r.index],r.index,o,s),e&&!i){for(let t=r.index+1;t<e.index;++t)n(this._blocks[t],t,0,this._blocks[t].displayValue.length);n(this._blocks[e.index],e.index,0,e.offset)}}}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._forEachBlocksInRange(e,t,((e,t,r,i)=>{n.aggregate(e.remove(r,i))})),n}nearestInputPos(e,t){if(void 0===t&&(t=i.NONE),!this._blocks.length)return 0;const n=new k(this,e);if(t===i.NONE)return n.pushRightBeforeInput()?n.pos:(n.popState(),n.pushLeftBeforeInput()?n.pos:this.displayValue.length);if(t===i.LEFT||t===i.FORCE_LEFT){if(t===i.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===e)return e;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),t===i.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=e)return n.pos;if(n.popState(),n.ok&&n.pos<=e)return n.pos;n.popState()}return n.ok?n.pos:t===i.FORCE_LEFT?0:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:0))}return t===i.RIGHT||t===i.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:t===i.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:this.nearestInputPos(e,i.LEFT)))):e}totalInputPositions(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);let n=0;return this._forEachBlocksInRange(e,t,((e,t,r,i)=>{n+=e.totalInputPositions(r,i)})),n}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map((e=>this._blocks[e])):[]}pad(e){const t=new _;return this._forEachBlocksInRange(0,this.displayValue.length,(n=>t.aggregate(n.pad(e)))),t}}D.DEFAULTS={...w.DEFAULTS,lazy:!0,placeholderChar:"_"},D.STOP_CHAR="`",D.ESCAPE_CHAR="\\",D.InputDefinition=T,D.FixedDefinition=S,u.MaskedPattern=D;class C extends D{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:n=this.from||0,maxLength:r=this.maxLength||0,autofix:i=this.autofix,...o}=e;this.to=t,this.from=n,this.maxLength=Math.max(String(t).length,r),this.autofix=i;const s=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0");let l=0;for(;l<a.length&&a[l]===s[l];)++l;o.mask=a.slice(0,l).replace(/0/g,"\\0")+"0".repeat(this.maxLength-l),super._update(o)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",n="";const[,r,i]=e.match(/^(\D*)(\d*)(\D*)/)||[];return i&&(t="0".repeat(r.length)+i,n="9".repeat(r.length)+i),t=t.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[t,n]}doPrepareChar(e,t){let n;return void 0===t&&(t={}),[e,n]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(n.skip=!this.isComplete),[e,n]}_appendCharRaw(e,t){if(void 0===t&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[i,o]=this.boundaries(this.value+e);return Number(o)<this.from?super._appendCharRaw(n[this.value.length],t):Number(i)>this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(r[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(-1===t.search(/[^0]/)&&t.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(t);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const t=new _;if(this.value.length===this.maxLength)return t;const n=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let n=0;n<r;++n)t.aggregate(super._appendCharRaw("0",e));n.split("").forEach((e=>this._appendCharRaw(e)))}return t}}u.MaskedRange=C;class M extends D{static extractPatternOptions(e){const{mask:n,pattern:r,...i}=e;return{...i,mask:t(n)?n:r}}constructor(e){super(M.extractPatternOptions({...M.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:r,blocks:i,...o}={...M.DEFAULTS,...e},s=Object.assign({},M.GET_DEFAULT_BLOCKS());e.min&&(s.Y.from=e.min.getFullYear()),e.max&&(s.Y.to=e.max.getFullYear()),e.min&&e.max&&s.Y.from===s.Y.to&&(s.m.from=e.min.getMonth()+1,s.m.to=e.max.getMonth()+1,s.m.from===s.m.to&&(s.d.from=e.min.getDate(),s.d.to=e.max.getDate())),Object.assign(s,this.blocks,i),super._update({...o,mask:t(n)?n:r,blocks:s})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(M.extractPatternOptions(e))}}M.GET_DEFAULT_BLOCKS=()=>({d:{mask:C,from:1,to:31,maxLength:2},m:{mask:C,from:1,to:12,maxLength:2},Y:{mask:C,from:1900,to:9999}}),M.DEFAULTS={...D.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>e?[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join("."):"",parse:(e,t)=>{const[n,r,i]=e.split(".").map(Number);return new Date(i,r-1,n)}},u.MaskedDate=M;class A extends w{constructor(e){super({...A.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map((e=>{const{expose:t,...n}=d(e),r=h({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return t&&(this.exposeMask=r),r})):[])}_appendCharRaw(e,t){void 0===t&&(t={});const n=this._applyDispatch(e,t);return this.currentMask&&n.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),n}_applyDispatch(e,t,n){void 0===e&&(e=""),void 0===t&&(t={}),void 0===n&&(n="");const r=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,i=this.rawInputValue,o=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:i,s=i.slice(o.length),a=this.currentMask,l=new _,u=null==a?void 0:a.state;return this.currentMask=this.doDispatch(e,{...t},n),this.currentMask&&(this.currentMask!==a?(this.currentMask.reset(),o&&(this.currentMask.append(o,{raw:!0}),l.tailShift=this.currentMask.value.length-r.length),s&&(l.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),l}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new _;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,n;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(n=e._beforeTailState)?void 0:n.currentMask)||e._beforeTailState}}doDispatch(e,t,n){return void 0===t&&(t={}),void 0===n&&(n=""),this.dispatch(e,this,t,n)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){void 0===t&&(t={});let[n,r]=super.doPrepare(e,t);if(this.currentMask){let e;[n,e]=super.doPrepare(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}doPrepareChar(e,t){void 0===t&&(t={});let[n,r]=super.doPrepareChar(e,t);if(this.currentMask){let e;[n,e]=super.doPrepareChar(n,this.currentMaskFlags(t)),r=r.aggregate(e)}return[n,r]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach((e=>e.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const n=new _;return this.currentMask&&n.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),n}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((e=>e.state)),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:n,currentMask:r,...i}=e;t&&this.compiledMasks.forEach(((e,n)=>e.state=t[n])),null!=n&&(this.currentMask=n,this.currentMask.state=r),super.state=i}extractInput(e,t,n){return this.currentMask?this.currentMask.extractInput(e,t,n):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every(((t,n)=>{if(!e[n])return;const{mask:r,...i}=e[n];return a(t,i)&&t.maskEquals(r)})):super.maskEquals(e)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}A.DEFAULTS={...w.DEFAULTS,dispatch:(e,t,n,r)=>{if(!t.compiledMasks.length)return;const o=t.rawInputValue,s=t.compiledMasks.map(((s,a)=>{const l=t.currentMask===s,u=l?s.displayValue.length:s.nearestInputPos(s.displayValue.length,i.FORCE_LEFT);return s.rawInputValue!==o?(s.reset(),s.append(o,{raw:!0})):l||s.remove(u),s.append(e,t.currentMaskFlags(n)),s.appendTail(r),{index:a,weight:s.rawInputValue.length,totalInputPositions:s.totalInputPositions(0,Math.max(u,s.nearestInputPos(s.displayValue.length,i.FORCE_LEFT)))}}));return s.sort(((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions)),t.compiledMasks[s[0].index]}},u.MaskedDynamic=A;class I extends D{constructor(e){super({...I.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...n}=e;if(t){const e=t.map((e=>e.length)),r=Math.min(...e),i=Math.max(...e)-r;n.mask="*".repeat(r),i&&(n.mask+="["+"*".repeat(i)+"]"),this.enum=t}super._update(n)}_appendCharRaw(e,t){void 0===t&&(t={});const n=Math.min(this.nearestInputPos(0,i.FORCE_RIGHT),this.value.length),r=this.enum.filter((t=>this.matchValue(t,this.unmaskedValue+e,n)));if(r.length){1===r.length&&this._forEachBlocksInRange(0,this.value.length,((e,n)=>{const i=r[0][n];n>=this.value.length||i===e.value||(e.reset(),e._appendChar(i,t))}));const e=super._appendCharRaw(r[0][this.value.length],t);return 1===r.length&&r[0].slice(this.unmaskedValue.length).split("").forEach((t=>e.aggregate(super._appendCharRaw(t)))),e}return new _({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new b("",e)}remove(e,t){if(void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),e===t)return new _;const n=Math.min(super.nearestInputPos(0,i.FORCE_RIGHT),this.value.length);let r;for(r=e;r>=0&&!(this.enum.filter((e=>this.matchValue(e,this.value.slice(n,r),n))).length>1);--r);const o=super.remove(r,t);return o.tailShift+=r-e,o}get isComplete(){return this.enum.indexOf(this.value)>=0}}I.DEFAULTS={...D.DEFAULTS,matchValue:(e,t,n)=>e.indexOf(t,n)===n},u.MaskedEnum=I;class L extends w{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}var O;u.MaskedFunction=L;class N extends w{constructor(e){super({...N.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+s(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(s).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(s(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[n,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!n&&(r.skip=!0),!n||this.allowPositive||this.value||"-"===n||r.aggregate(this._appendChar("-")),[n,r]}_separatorsCount(e,t){void 0===t&&(t=!1);let n=0;for(let r=0;r<e;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++n,t&&(e+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(e){return void 0===e&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,n))}_appendCharRaw(e,t){void 0===t&&(t={});const n=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const i=this._value;this._value+=e;const o=this.number;let s,a=!isNaN(o),l=!1;if(a){let e;null!=this.min&&this.min<0&&this.number<this.min&&(e=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(N.UNMASKED_RADIX,this.radix),l||(l=i===this._value&&!t.tail)):a=!1),a&&(a=Boolean(this._value.match(this._numberRegExp)))}a?s=new _({inserted:this._value.slice(i.length),rawInserted:l?"":e,skip:l}):(this._value=i,s=new _),this._value=this._insertThousandsSeparators(this._value);const u=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,c=this._separatorsCountFromSlice(u);return s.tailShift+=(c-r)*this.thousandsSeparator.length,s}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,t);if(n<=e)return n}return-1}_adjustRangeWithSeparators(e,t){const n=this._findSeparatorAround(e);n>=0&&(e=n);const r=this._findSeparatorAround(t);return r>=0&&(t=r+this.thousandsSeparator.length),[e,t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const n=this.value.slice(0,e),r=this.value.slice(t),i=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+r));const o=this._separatorsCountFromSlice(n);return new _({tailShift:(o-i)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case i.NONE:case i.LEFT:case i.FORCE_LEFT:{const n=this._findSeparatorAround(e-1);if(n>=0){const r=n+this.thousandsSeparator.length;if(e<r||this.value.length<=r||t===i.FORCE_LEFT)return n}break}case i.RIGHT:case i.FORCE_RIGHT:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,((e,t,n,r)=>t+r)),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,n){void 0===t&&(t={});const r=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===N.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,n)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,N.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(N.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||N.EMPTY_VALUES.includes(e)&&N.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}O=N,N.UNMASKED_RADIX=".",N.EMPTY_VALUES=[...w.EMPTY_VALUES,0],N.DEFAULTS={...w.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[O.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},u.MaskedNumber=N;const R={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function P(e,t,n){void 0===t&&(t=R.MASKED),void 0===n&&(n=R.MASKED);const r=h(e);return e=>r.runIsolated((r=>(r[t]=e,r[n])))}function F(e,t,n,r){return P(t,n,r)(e)}u.PIPE_TYPE=R,u.createPipe=P,u.pipe=F;class j extends D{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,n,r;const{repeat:i,...o}=d(e);this._blockOpts=Object.assign({},this._blockOpts,o);const s=h(this._blockOpts);this.repeat=null!=(t=null!=(n=null!=i?i:s.repeat)?n:this.repeat)?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(r=this._blocks)?void 0:r.length)||0,this.repeatFrom)),blocks:{m:s},eager:s.eager,overwrite:s.overwrite,skipInvalid:s.skipInvalid,lazy:s.lazy,placeholderChar:s.placeholderChar,displayChar:s.displayChar})}_allocateBlock(e){return e<this._blocks.length?this._blocks[e]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(h(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(e,t){void 0===t&&(t={});const n=new _;for(let a,l,u=null!=(r=null==(i=this._mapPosToBlock(this.displayValue.length))?void 0:i.index)?r:Math.max(this._blocks.length-1,0);a=null!=(o=this._blocks[u])?o:l=!l&&this._allocateBlock(u);++u){var r,i,o,s;const c=a._appendChar(e,{...t,_beforeTailState:null==(s=t._beforeTailState)||null==(s=s._blocks)?void 0:s[u]});if(c.skip&&l){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(c),c.consumed)break}return n}_trimEmptyTail(e,t){var n,r;void 0===e&&(e=0);const i=Math.max((null==(n=this._mapPosToBlock(e))?void 0:n.index)||0,this.repeatFrom,0);let o;null!=t&&(o=null==(r=this._mapPosToBlock(t))?void 0:r.index),null==o&&(o=this._blocks.length-1);let s=0;for(let e=o;i<=e&&!this._blocks[e].unmaskedValue;--e,++s);s&&(this._blocks.splice(o-s+1,s),this.mask=this.mask.slice(s))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length);const n=super.remove(e,t);return this._trimEmptyTail(e,t),n}totalInputPositions(e,t){return void 0===e&&(e=0),null==t&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}u.RepeatBlock=j;try{globalThis.IMask=u}catch{}e.ChangeDetails=_,e.ChunksTailDetails=x,e.DIRECTION=i,e.HTMLContenteditableMaskElement=g,e.HTMLInputMaskElement=m,e.HTMLMaskElement=f,e.InputMask=y,e.MaskElement=p,e.Masked=w,e.MaskedDate=M,e.MaskedDynamic=A,e.MaskedEnum=I,e.MaskedFunction=L,e.MaskedNumber=N,e.MaskedPattern=D,e.MaskedRange=C,e.MaskedRegExp=E,e.PIPE_TYPE=R,e.PatternFixedDefinition=S,e.PatternInputDefinition=T,e.RepeatBlock=j,e.createMask=h,e.createPipe=P,e.default=u,e.forceDirection=o,e.normalizeOpts=d,e.pipe=F,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("imask"),require("@angular/common"),require("@angular/core"),require("@angular/forms")):"function"==typeof define&&define.amd?define(["exports","imask","@angular/common","@angular/core","@angular/forms"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).angularIMask={},e.IMask,e.ng.common,e.ng.core,e.ng.forms)}(this,(function(e,t,n,r,i){"use strict";var o,s,a=(o=r,s=Object.create(null),o&&Object.keys(o).forEach((function(e){if("default"!==e){var t=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:function(){return o[e]}})}})),s.default=o,Object.freeze(s));class l{create(e,n){return t(e,n)}static{this.\u0275fac=a.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:l,deps:[],target:a.\u0275\u0275FactoryTarget.Injectable})}static{this.\u0275prov=a.\u0275\u0275ngDeclareInjectable({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:l,providedIn:"root"})}}a.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:l,decorators:[{type:r.Injectable,args:[{providedIn:"root"}]}]});const u=new r.InjectionToken("IMASK_FACTORY",{providedIn:"root",factory:()=>r.inject(l)}),c={provide:i.NG_VALUE_ACCESSOR,useExisting:r.forwardRef((()=>h)),multi:!0},d=e=>e.nativeElement;class h{constructor(){this.onTouched=()=>{},this.onChange=()=>{},this._viewInitialized=!1,this._composing=!1,this._writing=!1,this._elementRef=r.inject(r.ElementRef),this._renderer=r.inject(r.Renderer2),this._factory=r.inject(u),this._platformId=r.inject(r.PLATFORM_ID),this._compositionMode=r.inject(i.COMPOSITION_BUFFER_MODE,{optional:!0})??!this._isAndroid(),this.imaskElement=d,this.accept=new r.EventEmitter,this.complete=new r.EventEmitter}get element(){return this.imaskElement(this._elementRef,this)}get maskValue(){return this.maskRef?"typed"===this.unmask?this.maskRef.typedValue:this.unmask?this.maskRef.unmaskedValue:this.maskRef.value:this.element?.value||""}set maskValue(e){this.maskRef?"typed"===this.unmask?this.maskRef.typedValue=e:this.unmask?this.maskRef.unmaskedValue=e:this.maskRef.value=e:this._renderer.setProperty(this.element,"value",e)}ngAfterViewInit(){this.imask&&this.initMask(),this._viewInitialized=!0}ngOnChanges(e){e.elementRef&&!this.imaskElement&&(this.imaskElement=d),e.imask&&this._viewInitialized&&(this.imask?this.maskRef?this.maskRef.updateOptions(this.imask):(this.initMask(),this.onChange(this.maskValue)):this.destroyMask())}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}ngOnDestroy(){this.destroyMask(),this.accept.complete(),this.complete.complete()}beginWrite(e){this._writing=!0,this._writingValue=e}endWrite(){return this._writing=!1,this._writingValue}writeValue(e){e=null==e&&"typed"!==this.unmask?"":e,this.maskRef?(this.beginWrite(e),this.maskValue=e,this.endWrite()):(this._renderer.setProperty(this.element,"value",e),this._initialValue=e)}_onAccept(){const e=this.maskValue;this._writing&&e===this.endWrite()||(this.onChange(e),this.accept.emit(e))}_onComplete(){this.complete.emit(this.maskValue)}initMask(){this.maskRef=this._factory.create(this.element,this.imask).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),null!=this._initialValue&&this.writeValue(this._initialValue),delete this._initialValue}setDisabledState(e){this._renderer.setProperty(this.element,"disabled",e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}_handleInput(e){this.maskRef||(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this._handleInput(e)}_isAndroid(){return n.isPlatformBrowser(this._platformId)&&/android (\d+)/.test(navigator.userAgent.toLowerCase())}static{this.\u0275fac=a.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:h,deps:[],target:a.\u0275\u0275FactoryTarget.Directive})}static{this.\u0275dir=a.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"16.2.12",type:h,isStandalone:!0,selector:"[imask]",inputs:{imask:"imask",unmask:"unmask",imaskElement:"imaskElement"},outputs:{accept:"accept",complete:"complete"},host:{listeners:{input:"_handleInput($event.target.value)",blur:"onTouched()",compositionstart:"_compositionStart()",compositionend:"_compositionEnd($event.target.value)"}},providers:[c],exportAs:["imask"],usesOnChanges:!0,ngImport:a})}}a.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:h,decorators:[{type:r.Directive,args:[{selector:"[imask]",standalone:!0,exportAs:"imask",host:{"(input)":"_handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"_compositionStart()","(compositionend)":"_compositionEnd($event.target.value)"},providers:[c]}]}],propDecorators:{imask:[{type:r.Input}],unmask:[{type:r.Input}],imaskElement:[{type:r.Input}],accept:[{type:r.Output}],complete:[{type:r.Output}]}});class p{transform(...e){return t.pipe(...e)}static{this.\u0275fac=a.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:p,deps:[],target:a.\u0275\u0275FactoryTarget.Pipe})}static{this.\u0275pipe=a.\u0275\u0275ngDeclarePipe({minVersion:"14.0.0",version:"16.2.12",ngImport:a,type:p,isStandalone:!0,name:"imask"})}}a.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:p,decorators:[{type:r.Pipe,args:[{name:"imask",standalone:!0}]}]});class f{static{this.\u0275fac=a.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:f,deps:[],target:a.\u0275\u0275FactoryTarget.NgModule})}static{this.\u0275mod=a.\u0275\u0275ngDeclareNgModule({minVersion:"14.0.0",version:"16.2.12",ngImport:a,type:f,imports:[h,p],exports:[h,p]})}static{this.\u0275inj=a.\u0275\u0275ngDeclareInjector({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:f})}}a.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"16.2.12",ngImport:a,type:f,decorators:[{type:r.NgModule,args:[{imports:[h,p],exports:[h,p]}]}]}),e.IMask=t,Object.defineProperty(e,"PIPE_TYPE",{enumerable:!0,get:function(){return t.PIPE_TYPE}}),Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return t.pipe}}),e.DEFAULT_IMASK_ELEMENT=d,e.DefaultImaskFactory=l,e.IMASK_FACTORY=u,e.IMaskDirective=h,e.IMaskModule=f,e.IMaskPipe=p,e.MASKEDINPUT_VALUE_ACCESSOR=c})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jmespath={})}(this,(function(e){"use strict";const t=e=>null!==e&&"[object Object]"===Object.prototype.toString.call(e),n=(e,r)=>{if(e===r)return!0;if(typeof e!=typeof r)return!1;if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return!1;for(let t=0;t<e.length;t+=1)if(!n(e[t],r[t]))return!1;return!0}if(t(e)&&t(r)){const t=Object.entries(e),i=new Set(Object.keys(r));if(t.length!==i.size)return!1;for(const[e,o]of t){if(!n(o,r[e]))return!1;i.delete(e)}return 0===i.size}return!1},r=e=>{if(""===e||!1===e||null==e)return!0;if(Array.isArray(e)&&0===e.length)return!0;if(t(e)){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},i=e=>e>="0"&&e<="9"||"-"===e;var o;!function(e){e.TOK_EOF="EOF",e.TOK_UNQUOTEDIDENTIFIER="UnquotedIdentifier",e.TOK_QUOTEDIDENTIFIER="QuotedIdentifier",e.TOK_RBRACKET="Rbracket",e.TOK_RPAREN="Rparen",e.TOK_COMMA="Comma",e.TOK_COLON="Colon",e.TOK_RBRACE="Rbrace",e.TOK_NUMBER="Number",e.TOK_CURRENT="Current",e.TOK_ROOT="Root",e.TOK_EXPREF="Expref",e.TOK_PIPE="Pipe",e.TOK_OR="Or",e.TOK_AND="And",e.TOK_EQ="EQ",e.TOK_GT="GT",e.TOK_LT="LT",e.TOK_GTE="GTE",e.TOK_LTE="LTE",e.TOK_NE="NE",e.TOK_FLATTEN="Flatten",e.TOK_STAR="Star",e.TOK_FILTER="Filter",e.TOK_DOT="Dot",e.TOK_NOT="Not",e.TOK_LBRACE="Lbrace",e.TOK_LBRACKET="Lbracket",e.TOK_LPAREN="Lparen",e.TOK_LITERAL="Literal"}(o||(o={}));const s={"(":o.TOK_LPAREN,")":o.TOK_RPAREN,"*":o.TOK_STAR,",":o.TOK_COMMA,".":o.TOK_DOT,":":o.TOK_COLON,"@":o.TOK_CURRENT,$:o.TOK_ROOT,"]":o.TOK_RBRACKET,"{":o.TOK_LBRACE,"}":o.TOK_RBRACE},a={"!":!0,"<":!0,"=":!0,">":!0},l={"\t":!0,"\n":!0,"\r":!0," ":!0};const u=new class{constructor(){this._current=0}tokenize(e){const t=[];let n,r,u;for(this._current=0;this._current<e.length;)if((c=e[this._current])>="a"&&c<="z"||c>="A"&&c<="Z"||"_"===c)n=this._current,r=this.consumeUnquotedIdentifier(e),t.push({start:n,type:o.TOK_UNQUOTEDIDENTIFIER,value:r});else if(void 0!==s[e[this._current]])t.push({start:this._current,type:s[e[this._current]],value:e[this._current]}),this._current+=1;else if(i(e[this._current]))u=this.consumeNumber(e),t.push(u);else if("["===e[this._current])u=this.consumeLBracket(e),t.push(u);else if('"'===e[this._current])n=this._current,r=this.consumeQuotedIdentifier(e),t.push({start:n,type:o.TOK_QUOTEDIDENTIFIER,value:r});else if("'"===e[this._current])n=this._current,r=this.consumeRawStringLiteral(e),t.push({start:n,type:o.TOK_LITERAL,value:r});else if("`"===e[this._current]){n=this._current;const r=this.consumeLiteral(e);t.push({start:n,type:o.TOK_LITERAL,value:r})}else if(void 0!==a[e[this._current]])u=this.consumeOperator(e),u&&t.push(u);else if(void 0!==l[e[this._current]])this._current+=1;else if("&"===e[this._current])n=this._current,this._current+=1,"&"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_AND,value:"&&"})):t.push({start:n,type:o.TOK_EXPREF,value:"&"});else{if("|"!==e[this._current]){const t=new Error(`Unknown character: ${e[this._current]}`);throw t.name="LexerError",t}n=this._current,this._current+=1,"|"===e[this._current]?(this._current+=1,t.push({start:n,type:o.TOK_OR,value:"||"})):t.push({start:n,type:o.TOK_PIPE,value:"|"})}var c;return t}consumeUnquotedIdentifier(e){const t=this._current;for(this._current+=1;this._current<e.length&&((n=e[this._current])>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9"||"_"===n);)this._current+=1;var n;return e.slice(t,this._current)}consumeQuotedIdentifier(e){const t=this._current;this._current+=1;const n=e.length;for(;'"'!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&'"'!==e[t+1]?t+=1:t+=2,this._current=t}return this._current+=1,JSON.parse(e.slice(t,this._current))}consumeRawStringLiteral(e){const t=this._current;this._current+=1;const n=e.length;for(;"'"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"'"!==e[t+1]?t+=1:t+=2,this._current=t}this._current+=1;return e.slice(t+1,this._current-1).replace("\\'","'")}consumeNumber(e){const t=this._current;this._current+=1;const n=e.length;for(;i(e[this._current])&&this._current<n;)this._current+=1;return{start:t,value:parseInt(e.slice(t,this._current),10),type:o.TOK_NUMBER}}consumeLBracket(e){const t=this._current;return this._current+=1,"?"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FILTER,value:"[?"}):"]"===e[this._current]?(this._current+=1,{start:t,type:o.TOK_FLATTEN,value:"[]"}):{start:t,type:o.TOK_LBRACKET,value:"["}}consumeOperator(e){const t=this._current,n=e[t];return this._current+=1,"!"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_NE,value:"!="}):{start:t,type:o.TOK_NOT,value:"!"}:"<"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_LTE,value:"<="}):{start:t,type:o.TOK_LT,value:"<"}:">"===n?"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_GTE,value:">="}):{start:t,type:o.TOK_GT,value:">"}:"="===n&&"="===e[this._current]?(this._current+=1,{start:t,type:o.TOK_EQ,value:"=="}):void 0}consumeLiteral(e){this._current+=1;const t=this._current,n=e.length;for(;"`"!==e[this._current]&&this._current<n;){let t=this._current;"\\"!==e[t]||"\\"!==e[t+1]&&"`"!==e[t+1]?t+=1:t+=2,this._current=t}let r=e.slice(t,this._current).trimLeft();r=r.replace("\\`","`");const i=this.looksLikeJSON(r)?JSON.parse(r):JSON.parse(`"${r}"`);return this._current+=1,i}looksLikeJSON(e){if(""===e)return!1;if('[{"'.includes(e[0]))return!0;if(["true","false","null"].includes(e))return!0;if("-0123456789".includes(e[0]))try{return JSON.parse(e),!0}catch(e){return!1}return!1}},c={[o.TOK_EOF]:0,[o.TOK_UNQUOTEDIDENTIFIER]:0,[o.TOK_QUOTEDIDENTIFIER]:0,[o.TOK_RBRACKET]:0,[o.TOK_RPAREN]:0,[o.TOK_COMMA]:0,[o.TOK_RBRACE]:0,[o.TOK_NUMBER]:0,[o.TOK_CURRENT]:0,[o.TOK_EXPREF]:0,[o.TOK_ROOT]:0,[o.TOK_PIPE]:1,[o.TOK_OR]:2,[o.TOK_AND]:3,[o.TOK_EQ]:5,[o.TOK_GT]:5,[o.TOK_LT]:5,[o.TOK_GTE]:5,[o.TOK_LTE]:5,[o.TOK_NE]:5,[o.TOK_FLATTEN]:9,[o.TOK_STAR]:20,[o.TOK_FILTER]:21,[o.TOK_DOT]:40,[o.TOK_NOT]:45,[o.TOK_LBRACE]:50,[o.TOK_LBRACKET]:55,[o.TOK_LPAREN]:60};const d=new class{constructor(){this.index=0,this.tokens=[]}parse(e){this.loadTokens(e),this.index=0;const t=this.expression(0);if(this.lookahead(0)!==o.TOK_EOF){const e=this.lookaheadToken(0);this.errorToken(e,`Unexpected token type: ${e.type}, value: ${e.value}`)}return t}loadTokens(e){this.tokens=[...u.tokenize(e),{type:o.TOK_EOF,value:"",start:e.length}]}expression(e){const t=this.lookaheadToken(0);this.advance();let n=this.nud(t),r=this.lookahead(0);for(;e<c[r];)this.advance(),n=this.led(r,n),r=this.lookahead(0);return n}lookahead(e){return this.tokens[this.index+e].type}lookaheadToken(e){return this.tokens[this.index+e]}advance(){this.index+=1}nud(e){let t,n,r;switch(e.type){case o.TOK_LITERAL:return{type:"Literal",value:e.value};case o.TOK_UNQUOTEDIDENTIFIER:return{type:"Field",name:e.value};case o.TOK_QUOTEDIDENTIFIER:const i={type:"Field",name:e.value};if(this.lookahead(0)===o.TOK_LPAREN)throw new Error("Quoted identifier not allowed for function names.");return i;case o.TOK_NOT:return n=this.expression(c.Not),{type:"NotExpression",children:[n]};case o.TOK_STAR:return t={type:"Identity"},n=this.lookahead(0)===o.TOK_RBRACKET&&{type:"Identity"}||this.parseProjectionRHS(c.Star),{type:"ValueProjection",children:[t,n]};case o.TOK_FILTER:return this.led(e.type,{type:"Identity"});case o.TOK_LBRACE:return this.parseMultiselectHash();case o.TOK_FLATTEN:return t={type:o.TOK_FLATTEN,children:[{type:"Identity"}]},n=this.parseProjectionRHS(c.Flatten),{type:"Projection",children:[t,n]};case o.TOK_LBRACKET:return this.lookahead(0)===o.TOK_NUMBER||this.lookahead(0)===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice({type:"Identity"},n)):this.lookahead(0)===o.TOK_STAR&&this.lookahead(1)===o.TOK_RBRACKET?(this.advance(),this.advance(),n=this.parseProjectionRHS(c.Star),{children:[{type:"Identity"},n],type:"Projection"}):this.parseMultiselectList();case o.TOK_CURRENT:return{type:o.TOK_CURRENT};case o.TOK_ROOT:return{type:o.TOK_ROOT};case o.TOK_EXPREF:return r=this.expression(c.Expref),{type:"ExpressionReference",children:[r]};case o.TOK_LPAREN:const s=[];for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(r={type:o.TOK_CURRENT},this.advance()):r=this.expression(0),s.push(r);return this.match(o.TOK_RPAREN),s[0];default:this.errorToken(e)}}led(e,t){let n;switch(e){case o.TOK_DOT:const r=c.Dot;return this.lookahead(0)!==o.TOK_STAR?(n=this.parseDotRHS(r),{type:"Subexpression",children:[t,n]}):(this.advance(),n=this.parseProjectionRHS(r),{type:"ValueProjection",children:[t,n]});case o.TOK_PIPE:return n=this.expression(c.Pipe),{type:o.TOK_PIPE,children:[t,n]};case o.TOK_OR:return n=this.expression(c.Or),{type:"OrExpression",children:[t,n]};case o.TOK_AND:return n=this.expression(c.And),{type:"AndExpression",children:[t,n]};case o.TOK_LPAREN:const i=t.name,s=[];let a;for(;this.lookahead(0)!==o.TOK_RPAREN;)this.lookahead(0)===o.TOK_CURRENT?(a={type:o.TOK_CURRENT},this.advance()):a=this.expression(0),this.lookahead(0)===o.TOK_COMMA&&this.match(o.TOK_COMMA),s.push(a);this.match(o.TOK_RPAREN);return{name:i,type:"Function",children:s};case o.TOK_FILTER:const l=this.expression(0);return this.match(o.TOK_RBRACKET),n=this.lookahead(0)===o.TOK_FLATTEN&&{type:"Identity"}||this.parseProjectionRHS(c.Filter),{type:"FilterProjection",children:[t,n,l]};case o.TOK_FLATTEN:return{type:"Projection",children:[{type:o.TOK_FLATTEN,children:[t]},this.parseProjectionRHS(c.Flatten)]};case o.TOK_EQ:case o.TOK_NE:case o.TOK_GT:case o.TOK_GTE:case o.TOK_LT:case o.TOK_LTE:return this.parseComparator(t,e);case o.TOK_LBRACKET:const u=this.lookaheadToken(0);return u.type===o.TOK_NUMBER||u.type===o.TOK_COLON?(n=this.parseIndexExpression(),this.projectIfSlice(t,n)):(this.match(o.TOK_STAR),this.match(o.TOK_RBRACKET),n=this.parseProjectionRHS(c.Star),{type:"Projection",children:[t,n]});default:return this.errorToken(this.lookaheadToken(0))}}match(e){if(this.lookahead(0)!==e){const t=this.lookaheadToken(0);this.errorToken(t,`Expected ${e}, got: ${t.type}`)}else this.advance()}errorToken(e,t=""){const n=new Error(t||`Invalid token (${e.type}): "${e.value}"`);throw n.name="ParserError",n}parseIndexExpression(){if(this.lookahead(0)===o.TOK_COLON||this.lookahead(1)===o.TOK_COLON)return this.parseSliceExpression();const e={type:"Index",value:this.lookaheadToken(0).value};return this.advance(),this.match(o.TOK_RBRACKET),e}projectIfSlice(e,t){const n={type:"IndexExpression",children:[e,t]};return"Slice"===t.type?{children:[n,this.parseProjectionRHS(c.Star)],type:"Projection"}:n}parseSliceExpression(){const e=[null,null,null];let t=0,n=this.lookahead(0);for(;n!==o.TOK_RBRACKET&&t<3;){if(n===o.TOK_COLON)t+=1,this.advance();else if(n===o.TOK_NUMBER)e[t]=this.lookaheadToken(0).value,this.advance();else{const e=this.lookaheadToken(0);this.errorToken(e,`Syntax error, unexpected token: ${e.value}(${e.type})`)}n=this.lookahead(0)}return this.match(o.TOK_RBRACKET),{children:e,type:"Slice"}}parseComparator(e,t){return{type:"Comparator",name:t,children:[e,this.expression(c[t])]}}parseDotRHS(e){const t=this.lookahead(0);if([o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER,o.TOK_STAR].includes(t))return this.expression(e);if(t===o.TOK_LBRACKET)return this.match(o.TOK_LBRACKET),this.parseMultiselectList();if(t===o.TOK_LBRACE)return this.match(o.TOK_LBRACE),this.parseMultiselectHash();const n=this.lookaheadToken(0);this.errorToken(n,`Syntax error, unexpected token: ${n.value}(${n.type})`)}parseProjectionRHS(e){if(c[this.lookahead(0)]<10)return{type:"Identity"};if(this.lookahead(0)===o.TOK_LBRACKET)return this.expression(e);if(this.lookahead(0)===o.TOK_FILTER)return this.expression(e);if(this.lookahead(0)===o.TOK_DOT)return this.match(o.TOK_DOT),this.parseDotRHS(e);const t=this.lookaheadToken(0);this.errorToken(t,`Syntax error, unexpected token: ${t.value}(${t.type})`)}parseMultiselectList(){const e=[];for(;this.lookahead(0)!==o.TOK_RBRACKET;){const t=this.expression(0);if(e.push(t),this.lookahead(0)===o.TOK_COMMA&&(this.match(o.TOK_COMMA),this.lookahead(0)===o.TOK_RBRACKET))throw new Error("Unexpected token Rbracket")}return this.match(o.TOK_RBRACKET),{type:"MultiSelectList",children:e}}parseMultiselectHash(){const e=[],t=[o.TOK_UNQUOTEDIDENTIFIER,o.TOK_QUOTEDIDENTIFIER];let n,r,i;for(;;){if(n=this.lookaheadToken(0),!t.includes(n.type))throw new Error(`Expecting an identifier token, got: ${n.type}`);if(r=n.value,this.advance(),this.match(o.TOK_COLON),i=this.expression(0),e.push({value:i,type:"KeyValuePair",name:r}),this.lookahead(0)===o.TOK_COMMA)this.match(o.TOK_COMMA);else if(this.lookahead(0)===o.TOK_RBRACE){this.match(o.TOK_RBRACE);break}}return{type:"MultiSelectHash",children:e}}};var h;!function(e){e[e.TYPE_NUMBER=0]="TYPE_NUMBER",e[e.TYPE_ANY=1]="TYPE_ANY",e[e.TYPE_STRING=2]="TYPE_STRING",e[e.TYPE_ARRAY=3]="TYPE_ARRAY",e[e.TYPE_OBJECT=4]="TYPE_OBJECT",e[e.TYPE_BOOLEAN=5]="TYPE_BOOLEAN",e[e.TYPE_EXPREF=6]="TYPE_EXPREF",e[e.TYPE_NULL=7]="TYPE_NULL",e[e.TYPE_ARRAY_NUMBER=8]="TYPE_ARRAY_NUMBER",e[e.TYPE_ARRAY_STRING=9]="TYPE_ARRAY_STRING"}(h||(h={}));class p{constructor(e){this.TYPE_NAME_TABLE={[h.TYPE_NUMBER]:"number",[h.TYPE_ANY]:"any",[h.TYPE_STRING]:"string",[h.TYPE_ARRAY]:"array",[h.TYPE_OBJECT]:"object",[h.TYPE_BOOLEAN]:"boolean",[h.TYPE_EXPREF]:"expression",[h.TYPE_NULL]:"null",[h.TYPE_ARRAY_NUMBER]:"Array<number>",[h.TYPE_ARRAY_STRING]:"Array<string>"},this.functionAbs=([e])=>Math.abs(e),this.functionAvg=([e])=>{let t=0;for(let n=0;n<e.length;n+=1)t+=e[n];return t/e.length},this.functionCeil=([e])=>Math.ceil(e),this.functionContains=e=>{const[t,n]=e;return t.includes(n)},this.functionEndsWith=e=>{const[t,n]=e;return t.includes(n,t.length-n.length)},this.functionFloor=([e])=>Math.floor(e),this.functionJoin=e=>{const[t,n]=e;return n.join(t)},this.functionKeys=([e])=>Object.keys(e),this.functionLength=([e])=>t(e)?Object.keys(e).length:e.length,this.functionMap=e=>{if(!this._interpreter)return[];const t=[],n=this._interpreter,r=e[0],i=e[1];for(let e=0;e<i.length;e+=1)t.push(n.visit(r,i[e]));return t},this.functionMax=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===h.TYPE_NUMBER)return Math.max(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)n.localeCompare(t[e])<0&&(n=t[e]);return n},this.functionMaxBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[h.TYPE_NUMBER,h.TYPE_STRING]);let i,o,s=-1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o>s&&(s=o,i=n[e]);return i},this.functionMerge=e=>{let t={};for(let n=0;n<e.length;n+=1){const r=e[n];t=Object.assign(t,r)}return t},this.functionMin=([e])=>{if(!e.length)return null;if(this.getTypeName(e[0])===h.TYPE_NUMBER)return Math.min(...e);const t=e;let n=t[0];for(let e=1;e<t.length;e+=1)t[e].localeCompare(n)<0&&(n=t[e]);return n},this.functionMinBy=e=>{const t=e[1],n=e[0],r=this.createKeyFunction(t,[h.TYPE_NUMBER,h.TYPE_STRING]);let i,o,s=1/0;for(let e=0;e<n.length;e+=1)o=r&&r(n[e]),void 0!==o&&o<s&&(s=o,i=n[e]);return i},this.functionNotNull=e=>{for(let t=0;t<e.length;t+=1)if(this.getTypeName(e[t])!==h.TYPE_NULL)return e[t];return null},this.functionReverse=([e])=>{if(this.getTypeName(e)===h.TYPE_STRING){const t=e;let n="";for(let e=t.length-1;e>=0;e-=1)n+=t[e];return n}const t=e.slice(0);return t.reverse(),t},this.functionSort=([e])=>[...e].sort(),this.functionSortBy=e=>{if(!this._interpreter)return[];const t=e[0].slice(0);if(0===t.length)return t;const n=this._interpreter,r=e[1],i=this.getTypeName(n.visit(r,t[0]));if(void 0!==i&&![h.TYPE_NUMBER,h.TYPE_STRING].includes(i))throw new Error(`TypeError: unexpected type (${this.TYPE_NAME_TABLE[i]})`);const o=[];for(let e=0;e<t.length;e+=1)o.push([e,t[e]]);o.sort(((e,t)=>{const o=n.visit(r,e[1]),s=n.visit(r,t[1]);if(this.getTypeName(o)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(o)]}`);if(this.getTypeName(s)!==i)throw new Error(`TypeError: expected (${this.TYPE_NAME_TABLE[i]}), received ${this.TYPE_NAME_TABLE[this.getTypeName(s)]}`);return o>s?1:o<s?-1:e[0]-t[0]}));for(let e=0;e<o.length;e+=1)t[e]=o[e][1];return t},this.functionStartsWith=([e,t])=>e.startsWith(t),this.functionSum=([e])=>e.reduce(((e,t)=>e+t),0),this.functionToArray=([e])=>this.getTypeName(e)===h.TYPE_ARRAY?e:[e],this.functionToNumber=([e])=>{const t=this.getTypeName(e);let n;return t===h.TYPE_NUMBER?e:t!==h.TYPE_STRING||(n=+e,isNaN(n))?null:n},this.functionToString=([e])=>this.getTypeName(e)===h.TYPE_STRING?e:JSON.stringify(e),this.functionType=([e])=>{switch(this.getTypeName(e)){case h.TYPE_NUMBER:return"number";case h.TYPE_STRING:return"string";case h.TYPE_ARRAY:return"array";case h.TYPE_OBJECT:return"object";case h.TYPE_BOOLEAN:return"boolean";case h.TYPE_EXPREF:return"expref";case h.TYPE_NULL:return"null";default:return}},this.functionValues=([e])=>Object.values(e),this.functionTable={abs:{_func:this.functionAbs,_signature:[{types:[h.TYPE_NUMBER]}]},avg:{_func:this.functionAvg,_signature:[{types:[h.TYPE_ARRAY_NUMBER]}]},ceil:{_func:this.functionCeil,_signature:[{types:[h.TYPE_NUMBER]}]},contains:{_func:this.functionContains,_signature:[{types:[h.TYPE_STRING,h.TYPE_ARRAY]},{types:[h.TYPE_ANY]}]},ends_with:{_func:this.functionEndsWith,_signature:[{types:[h.TYPE_STRING]},{types:[h.TYPE_STRING]}]},floor:{_func:this.functionFloor,_signature:[{types:[h.TYPE_NUMBER]}]},join:{_func:this.functionJoin,_signature:[{types:[h.TYPE_STRING]},{types:[h.TYPE_ARRAY_STRING]}]},keys:{_func:this.functionKeys,_signature:[{types:[h.TYPE_OBJECT]}]},length:{_func:this.functionLength,_signature:[{types:[h.TYPE_STRING,h.TYPE_ARRAY,h.TYPE_OBJECT]}]},map:{_func:this.functionMap,_signature:[{types:[h.TYPE_EXPREF]},{types:[h.TYPE_ARRAY]}]},max:{_func:this.functionMax,_signature:[{types:[h.TYPE_ARRAY_NUMBER,h.TYPE_ARRAY_STRING]}]},max_by:{_func:this.functionMaxBy,_signature:[{types:[h.TYPE_ARRAY]},{types:[h.TYPE_EXPREF]}]},merge:{_func:this.functionMerge,_signature:[{types:[h.TYPE_OBJECT],variadic:!0}]},min:{_func:this.functionMin,_signature:[{types:[h.TYPE_ARRAY_NUMBER,h.TYPE_ARRAY_STRING]}]},min_by:{_func:this.functionMinBy,_signature:[{types:[h.TYPE_ARRAY]},{types:[h.TYPE_EXPREF]}]},not_null:{_func:this.functionNotNull,_signature:[{types:[h.TYPE_ANY],variadic:!0}]},reverse:{_func:this.functionReverse,_signature:[{types:[h.TYPE_STRING,h.TYPE_ARRAY]}]},sort:{_func:this.functionSort,_signature:[{types:[h.TYPE_ARRAY_STRING,h.TYPE_ARRAY_NUMBER]}]},sort_by:{_func:this.functionSortBy,_signature:[{types:[h.TYPE_ARRAY]},{types:[h.TYPE_EXPREF]}]},starts_with:{_func:this.functionStartsWith,_signature:[{types:[h.TYPE_STRING]},{types:[h.TYPE_STRING]}]},sum:{_func:this.functionSum,_signature:[{types:[h.TYPE_ARRAY_NUMBER]}]},to_array:{_func:this.functionToArray,_signature:[{types:[h.TYPE_ANY]}]},to_number:{_func:this.functionToNumber,_signature:[{types:[h.TYPE_ANY]}]},to_string:{_func:this.functionToString,_signature:[{types:[h.TYPE_ANY]}]},type:{_func:this.functionType,_signature:[{types:[h.TYPE_ANY]}]},values:{_func:this.functionValues,_signature:[{types:[h.TYPE_OBJECT]}]}},this._interpreter=e}registerFunction(e,t,n){if(e in this.functionTable)throw new Error(`Function already defined: ${e}()`);this.functionTable[e]={_func:t.bind(this),_signature:n}}callFunction(e,t){const n=this.functionTable[e];if(void 0===n)throw new Error(`Unknown function: ${e}()`);return this.validateArgs(e,t,n._signature),n._func.call(this,t)}validateInputSignatures(e,t){for(let n=0;n<t.length;n+=1)if("variadic"in t[n]&&n!==t.length-1)throw new Error(`ArgumentError: ${e}() 'variadic' argument ${n+1} must occur last`)}validateArgs(e,t,n){var r,i;let o;this.validateInputSignatures(e,n);const s=n.filter((e=>{var t;return null!==(t=!e.optional)&&void 0!==t&&t})).length,a=null!==(i=null===(r=n[n.length-1])||void 0===r?void 0:r.variadic)&&void 0!==i&&i,l=t.length<s,u=t.length>n.length,c=l&&(!a&&s>1||a)?"at least ":"";if(a&&l||!a&&(l||u))throw o=n.length>1,new Error(`ArgumentError: ${e}() takes ${c}${s} argument${o?"s":""} but received ${t.length}`);let d,h,p;for(let r=0;r<n.length;r+=1){let i;for(p=!1,d=n[r].types,h=this.getTypeName(t[r]),i=0;i<d.length;i+=1)if(void 0!==h&&this.typeMatches(h,d[i],t[r])){p=!0;break}if(!p&&void 0!==h){const t=d.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ");throw new Error(`TypeError: ${e}() expected argument ${r+1} to be type (${t}) but received type ${this.TYPE_NAME_TABLE[h]} instead.`)}}}typeMatches(e,t,n){if(t===h.TYPE_ANY)return!0;if(t!==h.TYPE_ARRAY_STRING&&t!==h.TYPE_ARRAY_NUMBER&&t!==h.TYPE_ARRAY)return e===t;if(t===h.TYPE_ARRAY)return e===h.TYPE_ARRAY;if(e===h.TYPE_ARRAY){let e;t===h.TYPE_ARRAY_NUMBER?e=h.TYPE_NUMBER:t===h.TYPE_ARRAY_STRING&&(e=h.TYPE_STRING);for(let t=0;t<n.length;t+=1){const r=this.getTypeName(n[t]);if(void 0!==r&&void 0!==e&&!this.typeMatches(r,e,n[t]))return!1}return!0}return!1}getTypeName(e){switch(Object.prototype.toString.call(e)){case"[object String]":return h.TYPE_STRING;case"[object Number]":return h.TYPE_NUMBER;case"[object Array]":return h.TYPE_ARRAY;case"[object Boolean]":return h.TYPE_BOOLEAN;case"[object Null]":return h.TYPE_NULL;case"[object Object]":return e.jmespathType===o.TOK_EXPREF?h.TYPE_EXPREF:h.TYPE_OBJECT;default:return}}createKeyFunction(e,t){if(!this._interpreter)return;const n=this._interpreter;return r=>{const i=n.visit(e,r);if(!t.includes(this.getTypeName(i))){const e=`TypeError: expected one of (${t.map((e=>this.TYPE_NAME_TABLE[e])).join(" | ")}), received ${this.TYPE_NAME_TABLE[this.getTypeName(i)]}`;throw new Error(e)}return i}}}const f=new class{constructor(){this._rootValue=null,this.runtime=new p(this)}search(e,t){return this._rootValue=t,this.visit(e,t)}visit(e,i){let s,a,l,u,c,d,h,p,f,m,g;switch(e.type){case"Field":return null===i?null:t(i)?(d=i[e.name],void 0===d?null:d):null;case"Subexpression":for(l=this.visit(e.children[0],i),m=1;m<e.children.length;m+=1)if(l=this.visit(e.children[1],l),null===l)return null;return l;case"IndexExpression":return h=this.visit(e.children[0],i),p=this.visit(e.children[1],h),p;case"Index":if(!Array.isArray(i))return null;let v=e.value;return v<0&&(v=i.length+v),l=i[v],void 0===l&&(l=null),l;case"Slice":if(!Array.isArray(i))return null;const y=[...e.children],_=this.computeSliceParams(i.length,y),[b,w,x]=_;if(l=[],x>0)for(m=b;m<w;m+=x)l.push(i[m]);else for(m=b;m>w;m+=x)l.push(i[m]);return l;case"Projection":if(g=this.visit(e.children[0],i),!Array.isArray(g))return null;for(f=[],m=0;m<g.length;m+=1)a=this.visit(e.children[1],g[m]),null!==a&&f.push(a);return f;case"ValueProjection":if(g=this.visit(e.children[0],i),!t(g))return null;f=[];const k=Object.values(g);for(m=0;m<k.length;m+=1)a=this.visit(e.children[1],k[m]),null!==a&&f.push(a);return f;case"FilterProjection":if(g=this.visit(e.children[0],i),!Array.isArray(g))return null;const S=[],T=[];for(m=0;m<g.length;m+=1)s=this.visit(e.children[2],g[m]),r(s)||S.push(g[m]);for(let t=0;t<S.length;t+=1)a=this.visit(e.children[1],S[t]),null!==a&&T.push(a);return T;case"Comparator":switch(u=this.visit(e.children[0],i),c=this.visit(e.children[1],i),e.name){case o.TOK_EQ:l=n(u,c);break;case o.TOK_NE:l=!n(u,c);break;case o.TOK_GT:l=u>c;break;case o.TOK_GTE:l=u>=c;break;case o.TOK_LT:l=u<c;break;case o.TOK_LTE:l=u<=c;break;default:throw new Error(`Unknown comparator: ${e.name}`)}return l;case o.TOK_FLATTEN:const E=this.visit(e.children[0],i);if(!Array.isArray(E))return null;let D=[];for(m=0;m<E.length;m+=1)a=E[m],Array.isArray(a)?D=[...D,...a]:D.push(a);return D;case"Identity":return i;case"MultiSelectList":if(null===i)return null;for(f=[],m=0;m<e.children.length;m+=1)f.push(this.visit(e.children[m],i));return f;case"MultiSelectHash":if(null===i)return null;let C;for(f={},m=0;m<e.children.length;m+=1)C=e.children[m],f[C.name]=this.visit(C.value,i);return f;case"OrExpression":return s=this.visit(e.children[0],i),r(s)&&(s=this.visit(e.children[1],i)),s;case"AndExpression":return u=this.visit(e.children[0],i),r(u)?u:this.visit(e.children[1],i);case"NotExpression":return u=this.visit(e.children[0],i),r(u);case"Literal":return e.value;case o.TOK_PIPE:return h=this.visit(e.children[0],i),this.visit(e.children[1],h);case o.TOK_CURRENT:return i;case o.TOK_ROOT:return this._rootValue;case"Function":const M=[];for(let t=0;t<e.children.length;t+=1)M.push(this.visit(e.children[t],i));return this.runtime.callFunction(e.name,M);case"ExpressionReference":const A=e.children[0];return A.jmespathType=o.TOK_EXPREF,A;default:throw new Error(`Unknown node type: ${e.type}`)}}computeSliceParams(e,t){let[n,r,i]=t;if(null===i)i=1;else if(0===i){const e=new Error("Invalid slice, step cannot be 0");throw e.name="RuntimeError",e}const o=i<0;return n=null===n?o?e-1:0:this.capSliceRange(e,n,i),r=null===r?o?-1:e:this.capSliceRange(e,r,i),[n,r,i]}capSliceRange(e,t,n){let r=t;return r<0?(r+=e,r<0&&(r=n<0?-1:0)):r>=e&&(r=n<0?e-1:e),r}},m=h.TYPE_ANY,g=h.TYPE_ARRAY,v=h.TYPE_ARRAY_NUMBER,y=h.TYPE_ARRAY_STRING,_=h.TYPE_BOOLEAN,b=h.TYPE_EXPREF,w=h.TYPE_NULL,x=h.TYPE_NUMBER,k=h.TYPE_OBJECT,S=h.TYPE_STRING;function T(e){return d.parse(e)}function E(e){return u.tokenize(e)}const D=(e,t,n)=>{f.runtime.registerFunction(e,t,n)};function C(e,t){const n=d.parse(t);return f.search(n,e)}const M=f,A={compile:T,registerFunction:D,search:C,tokenize:E,TreeInterpreter:M,TYPE_ANY:m,TYPE_ARRAY_NUMBER:v,TYPE_ARRAY_STRING:y,TYPE_ARRAY:g,TYPE_BOOLEAN:_,TYPE_EXPREF:b,TYPE_NULL:w,TYPE_NUMBER:x,TYPE_OBJECT:k,TYPE_STRING:S};e.TYPE_ANY=m,e.TYPE_ARRAY=g,e.TYPE_ARRAY_NUMBER=v,e.TYPE_ARRAY_STRING=y,e.TYPE_BOOLEAN=_,e.TYPE_EXPREF=b,e.TYPE_NULL=w,e.TYPE_NUMBER=x,e.TYPE_OBJECT=k,e.TYPE_STRING=S,e.TreeInterpreter=M,e.compile=T,e.default=A,e.jmespath=A,e.registerFunction=D,e.search=C,e.tokenize=E,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/animations"),require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/animations","@angular/core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).collapse={},e.ng.animations,e.ng.core)}(this,(function(e,t,n){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=r(t),o=r(n);const s="400ms cubic-bezier(0.4,0.0,0.2,1)",a=[t.style({height:0,visibility:"hidden"}),t.animate(s,t.style({height:"*",visibility:"visible"}))],l=[t.style({height:"*",visibility:"visible"}),t.animate(s,t.style({height:0,visibility:"hidden"}))];class u{constructor(e,t,r){this._el=e,this._renderer=t,this.collapsed=new n.EventEmitter,this.collapses=new n.EventEmitter,this.expanded=new n.EventEmitter,this.expands=new n.EventEmitter,this.isExpanded=!0,this.collapseNewValue=!0,this.isCollapsed=!1,this.isCollapse=!0,this.isCollapsing=!1,this.isAnimated=!1,this._display="block",this._stylesLoaded=!1,this._COLLAPSE_ACTION_NAME="collapse",this._EXPAND_ACTION_NAME="expand",this._factoryCollapseAnimation=r.build(l),this._factoryExpandAnimation=r.build(a)}set display(e){this._display=e,"none"!==e?this.isAnimated?this.toggle():this.show():this.hide()}set collapse(e){this.collapseNewValue=e,this._player&&!this._isAnimationDone||(this.isExpanded=e,this.toggle())}get collapse(){return this.isExpanded}ngAfterViewChecked(){this._stylesLoaded=!0,this._player&&this._isAnimationDone&&(this._player.reset(),this._renderer.setStyle(this._el.nativeElement,"height","*"))}toggle(){this.isExpanded?this.hide():this.show()}hide(){this.isCollapsing=!0,this.isExpanded=!1,this.isCollapsed=!0,this.isCollapsing=!1,this.collapses.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._COLLAPSE_ACTION_NAME)((()=>{this._isAnimationDone=!0,this.collapseNewValue!==this.isCollapsed&&this.isAnimated?this.show():(this.collapsed.emit(this),this._renderer.setStyle(this._el.nativeElement,"display","none"))}))}show(){this._renderer.setStyle(this._el.nativeElement,"display",this._display),this.isCollapsing=!0,this.isExpanded=!0,this.isCollapsed=!1,this.isCollapsing=!1,this.expands.emit(this),this._isAnimationDone=!1,this.animationRun(this.isAnimated,this._EXPAND_ACTION_NAME)((()=>{this._isAnimationDone=!0,this.collapseNewValue!==this.isCollapsed&&this.isAnimated?this.hide():(this.expanded.emit(this),this._renderer.removeStyle(this._el.nativeElement,"overflow"))}))}animationRun(e,t){if(!e||!this._stylesLoaded)return e=>e();this._renderer.setStyle(this._el.nativeElement,"overflow","hidden"),this._renderer.addClass(this._el.nativeElement,"collapse");const n=t===this._EXPAND_ACTION_NAME?this._factoryExpandAnimation:this._factoryCollapseAnimation;return this._player&&this._player.reset(),this._player=n.create(this._el.nativeElement),this._player.play(),e=>this._player?.onDone(e)}}u.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"14.0.6",ngImport:o,type:u,deps:[{token:o.ElementRef},{token:o.Renderer2},{token:i.AnimationBuilder}],target:o.\u0275\u0275FactoryTarget.Directive}),u.\u0275dir=o.\u0275\u0275ngDeclareDirective({minVersion:"14.0.0",version:"14.0.6",type:u,selector:"[collapse]",inputs:{display:"display",isAnimated:"isAnimated",collapse:"collapse"},outputs:{collapsed:"collapsed",collapses:"collapses",expanded:"expanded",expands:"expands"},host:{properties:{"class.collapse":"this.isCollapse","class.in":"this.isExpanded","class.show":"this.isExpanded","attr.aria-hidden":"this.isCollapsed","class.collapsing":"this.isCollapsing"}},exportAs:["bs-collapse"],ngImport:o}),o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"14.0.6",ngImport:o,type:u,decorators:[{type:n.Directive,args:[{selector:"[collapse]",exportAs:"bs-collapse",host:{"[class.collapse]":"true"}}]}],ctorParameters:function(){return[{type:o.ElementRef},{type:o.Renderer2},{type:i.AnimationBuilder}]},propDecorators:{collapsed:[{type:n.Output}],collapses:[{type:n.Output}],expanded:[{type:n.Output}],expands:[{type:n.Output}],isExpanded:[{type:n.HostBinding,args:["class.in"]},{type:n.HostBinding,args:["class.show"]}],isCollapsed:[{type:n.HostBinding,args:["attr.aria-hidden"]}],isCollapse:[{type:n.HostBinding,args:["class.collapse"]}],isCollapsing:[{type:n.HostBinding,args:["class.collapsing"]}],display:[{type:n.Input}],isAnimated:[{type:n.Input}],collapse:[{type:n.Input}]}});class c{static forRoot(){return{ngModule:c,providers:[]}}}c.\u0275fac=o.\u0275\u0275ngDeclareFactory({minVersion:"12.0.0",version:"14.0.6",ngImport:o,type:c,deps:[],target:o.\u0275\u0275FactoryTarget.NgModule}),c.\u0275mod=o.\u0275\u0275ngDeclareNgModule({minVersion:"14.0.0",version:"14.0.6",ngImport:o,type:c,declarations:[u],exports:[u]}),c.\u0275inj=o.\u0275\u0275ngDeclareInjector({minVersion:"12.0.0",version:"14.0.6",ngImport:o,type:c}),o.\u0275\u0275ngDeclareClassMetadata({minVersion:"12.0.0",version:"14.0.6",ngImport:o,type:c,decorators:[{type:n.NgModule,args:[{declarations:[u],exports:[u]}]}]}),e.CollapseDirective=u,e.CollapseModule=c})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).chronos={})}(this,(function(e){"use strict";function t(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function n(e){return"string"==typeof e}function r(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function i(e){return e&&e.getTime&&!isNaN(e.getTime())}function o(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function s(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e){return void 0===e}function d(e){const n=+e;let r=0;return 0!==n&&isFinite(n)&&(r=t(n)),r}const h={},p={date:"day",hour:"hours",minute:"minutes",second:"seconds",millisecond:"milliseconds"};function f(e,t){const n=e.toLowerCase();let r=e;n in p&&(r=p[n]),h[n]=h[`${n}s`]=h[t]=r}function m(e){return n(e)?h[e]||h[e.toLowerCase()]:void 0}const g=0,v=1,y=2,_=3,b=4,w=5,x=6,k=7,S=8;function T(e,t,n){const r=`${Math.abs(e)}`,i=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}const E={},D={},C=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;function M(e,t,n,r){e&&(D[e]=r),t&&(D[t[0]]=function(){return T(r.apply(null,arguments),t[1],t[2])}),n&&(D[n]=function(t,n){return n.locale.ordinal(r.apply(null,arguments),e)})}function A(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function I(e,t,n){const r=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(r.getUTCFullYear())&&r.setUTCFullYear(e),r}function L(e,t=0,n=1,r=0,i=0,o=0,s=0){const a=new Date(e,t,n,r,i,o,s);return e<100&&e>=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function O(e,t=!1){return t?e.getUTCHours():e.getHours()}function N(e,t=!1){return t?e.getUTCMinutes():e.getMinutes()}function R(e,t=!1){return t?e.getUTCSeconds():e.getSeconds()}function P(e,t=!1){return t?e.getUTCMilliseconds():e.getMilliseconds()}function F(e,t=!1){return t?e.getUTCDay():e.getDay()}function j(e,t=!1){return t?e.getUTCDate():e.getDate()}function Y(e,t=!1){return t?e.getUTCMonth():e.getMonth()}function V(e,t=!1){return t?e.getUTCFullYear():e.getFullYear()}function H(e,t){return!(!e||!t)&&(B(e,t)&&Y(e)===Y(t))}function B(e,t){return!(!e||!t)&&V(e)===V(t)}const U=/\d/,z=/\d\d/,q=/\d{3}/,W=/\d{4}/,$=/[+-]?\d{6}/,G=/\d\d?/,K=/\d\d\d\d?/,Z=/\d\d\d\d\d\d?/,X=/\d{1,3}/,J=/\d{1,4}/,Q=/[+-]?\d{1,6}/,ee=/\d+/,te=/[+-]?\d+/,ne=/Z|[+-]\d\d(?::?\d\d)?/gi,re=/[+-]?\d+(\.\d{1,3})?/,ie=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oe={};function se(e,t,n){o(t)?oe[e]=t:oe[e]=function(e,r){return e&&n?n:t}}function ae(e,t){return l(oe,e)?oe[e](!1,t):new RegExp(le(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,((e,t,n,r,i)=>t||n||r||i))))}function le(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}const ue={};function ce(e,t){const r=n(e)?[e]:e;let i=t;if(s(t)&&(i=function(e,n,r){return n[t]=d(e),r}),a(r)&&o(i)){let e;for(e=0;e<r.length;e++)ue[r[e]]=i}}function de(e,t){ce(e,(function(e,n,r,i){return r._w=r._w||{},t(e,r._w,r,i)}))}function he(e,t,n){return null!=t&&l(ue,e)&&ue[e](t,n._a,n,e),n}function pe(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function fe(e,t){return t.locale.getFullYear?t.locale.getFullYear(e,t.isUTC).toString():V(e,t.isUTC).toString()}function me(e){return d(e)+(d(e)>68?1900:2e3)}function ge(e){return ve(e)?366:365}function ve(e){return e%4==0&&e%100!=0||e%400==0}function ye(e,t){if(isNaN(e)||isNaN(t))return NaN;const n=(t%(r=12)+r)%r;var r;return 1===n?ve(e+(t-n)/12)?29:28:31-n%7%2}const _e={year:0,month:0,day:0,hour:0,minute:0,seconds:0};function be(e,t){return s(t)?t:e}function we(e,t,n){const r=Math.min(j(e),ye(V(e),t));return n?e.setUTCMonth(t,r):e.setMonth(t,r),e}function xe(e,t,n){return n?e.setUTCDate(t):e.setDate(t),e}function ke(e){return new Date(e.getTime())}function Se(e,t,r){const i=ke(e);switch(t){case"year":we(i,0,r);case"quarter":case"month":xe(i,1,r);case"week":case"isoWeek":case"day":case"date":!function(e,t,n){n?e.setUTCHours(t):e.setHours(t)}(i,0,r);case"hours":!function(e,t,n){n?e.setUTCMinutes(t):e.setMinutes(t)}(i,0,r);case"minutes":!function(e,t,n){n?e.setUTCSeconds(t):e.setSeconds(t)}(i,0,r);case"seconds":!function(e,t,n){n?e.setUTCMilliseconds(t):e.setMilliseconds(t)}(i,0,r)}return"week"===t&&function(e,t,n={}){const r=un(e,n.locale,n.isUTC);rn(e,t-r,"day")}(i,0,{isUTC:r}),"isoWeek"===t&&function(e,t,r={}){const i=function(e,t=ct()){if(n(e))return t.weekdaysParse(e)%7||7;return s(e)&&isNaN(e)?null:e}(t,r.locale);an(e,ln(e)%7?i:i-7)}
|
|
1613
1613
|
//! moment.js locale configuration
|
|
1614
1614
|
//! locale : Arabic [ar]
|
|
1615
1615
|
//! author : Abdel Said: https://github.com/abdelsaid
|