From ba8b43da34f807e7e00121de32b909c2cb350939 Mon Sep 17 00:00:00 2001 From: Eddie Webbinaro Date: Sat, 11 Dec 2021 11:59:33 -0500 Subject: [PATCH] node vulnerabilities --- js/dist/admin.js | 2 +- js/dist/admin.js.map | 2 +- js/dist/forum.js | 56 +- js/dist/forum.js.map | 2 +- js/package-lock.json | 9709 +++++++++++++++++++++++++----------------- js/package.json | 10 +- 6 files changed, 5771 insertions(+), 4010 deletions(-) diff --git a/js/dist/admin.js b/js/dist/admin.js index 753705f..c840c27 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -module.exports=function(e){var r={};function n(a){if(r[a])return r[a].exports;var t=r[a]={i:a,l:!1,exports:{}};return e[a].call(t.exports,t,t.exports,n),t.l=!0,t.exports}return n.m=e,n.c=r,n.d=function(e,r,a){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var t in e)n.d(a,t,function(r){return e[r]}.bind(null,t));return a},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=36)}({21:function(e,r){e.exports=flarum.core.compat["components/BasicsPage"]},36:function(e,r,n){"use strict";n.r(r);var a=n(5),t=n(21),o=n.n(t);app.initializers.add("webbinaro/flarum-calendar",(function(){console.log("[webbinaro/flarum-calendar] Hello, admin!"),app.extensionData.for("webbinaro-calendar").registerPermission({icon:"fas fa-calendar",label:app.translator.trans("flarum-calendar.admin.permissions.view"),permission:"event.view",allowGuest:!0},"view",95).registerPermission({icon:"fas fa-calendar-plus",label:app.translator.trans("flarum-calendar.admin.permissions.add"),permission:"event.create"},"start",95).registerPermission({icon:"fas fa-calendar-times",label:app.translator.trans("flarum-calendar.admin.permissions.moderate"),permission:"event.moderate"},"moderate",95),Object(a.extend)(o.a.prototype,"homePageItems",(function(e){e.add("events",{path:"/events",label:app.translator.trans("flarum-calendar.admin.basics.homepage")})}))}))},5:function(e,r){e.exports=flarum.core.compat.extend}}); +(()=>{var e={n:a=>{var r=a&&a.__esModule?()=>a.default:()=>a;return e.d(r,{a:r}),r},d:(a,r)=>{for(var n in r)e.o(r,n)&&!e.o(a,n)&&Object.defineProperty(a,n,{enumerable:!0,get:r[n]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};(()=>{"use strict";e.r(a);const r=flarum.core.compat.extend,n=flarum.core.compat["components/BasicsPage"];var t=e.n(n);app.initializers.add("webbinaro/flarum-calendar",(function(){console.log("[webbinaro/flarum-calendar] Hello, admin!"),app.extensionData.for("webbinaro-calendar").registerPermission({icon:"fas fa-calendar",label:app.translator.trans("flarum-calendar.admin.permissions.view"),permission:"event.view",allowGuest:!0},"view",95).registerPermission({icon:"fas fa-calendar-plus",label:app.translator.trans("flarum-calendar.admin.permissions.add"),permission:"event.create"},"start",95).registerPermission({icon:"fas fa-calendar-times",label:app.translator.trans("flarum-calendar.admin.permissions.moderate"),permission:"event.moderate"},"moderate",95),(0,r.extend)(t().prototype,"homePageItems",(function(e){e.add("events",{path:"/events",label:app.translator.trans("flarum-calendar.admin.basics.homepage")})}))}))})(),module.exports=a})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 8c9a6ca..191d7ab 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@webbinaro/flarum-calendar/webpack/bootstrap","webpack://@webbinaro/flarum-calendar/external \"flarum.core.compat['components/BasicsPage']\"","webpack://@webbinaro/flarum-calendar/./src/admin/index.js","webpack://@webbinaro/flarum-calendar/external \"flarum.core.compat['extend']\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","app","initializers","add","console","log","extensionData","registerPermission","icon","label","translator","trans","permission","allowGuest","extend","BasicsPage","items","path"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WAC7B,WAAwB,OAAOrB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAH,EAAoBU,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRZ,EAAoBa,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,I,mBClFrDhC,EAAOD,QAAUkC,OAAOC,KAAKC,OAAO,0B,mECGpCC,IAAIC,aAAaC,IAAI,6BAA6B,WAChDC,QAAQC,IAAI,6CAEZJ,IAAIK,cAAJ,IACO,sBASJC,mBACC,CACEC,KAAM,kBACNC,MAAOR,IAAIS,WAAWC,MAAM,0CAC5BC,WAAY,aACZC,YAAY,GAEd,OACA,IAEDN,mBACC,CACEC,KAAM,uBACNC,MAAOR,IAAIS,WAAWC,MAAM,yCAC5BC,WAAY,gBAEd,QACA,IAEDL,mBACC,CACEC,KAAM,wBACNC,MAAOR,IAAIS,WAAWC,MAAM,8CAC5BC,WAAY,kBAEd,WACA,IAGJE,iBAAOC,IAAWrB,UAAW,iBAAiB,SAACsB,GAC7CA,EAAMb,IAAI,SAAU,CAClBc,KAAM,UACNR,MAAOR,IAAIS,WAAWC,MAAM,kD,gBChDlC9C,EAAOD,QAAUkC,OAAOC,KAAKC,OAAe","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 36);\n","module.exports = flarum.core.compat['components/BasicsPage'];","import { extend } from 'flarum/extend';\nimport BasicsPage from 'flarum/components/BasicsPage';\n\napp.initializers.add('webbinaro/flarum-calendar', () => {\n console.log('[webbinaro/flarum-calendar] Hello, admin!');\n\n app.extensionData\n .for('webbinaro-calendar')\n /*.registerSetting(\n {\n setting: 'some-key', // This is the key the settings will be saved under in the settings table in the database.\n label: app.translator.trans('flarum-calendar.admin.title'), // The label to be shown letting the admin know what the setting does.\n type: 'boolean', // What type of setting this is, valid options are: boolean, text (or any other tag type), and select. \n },\n 30 // Optional: Priority\n )*/\n .registerPermission(\n {\n icon: 'fas fa-calendar', // Font-Awesome Icon\n label: app.translator.trans('flarum-calendar.admin.permissions.view'), // Permission Label\n permission: 'event.view', // Actual permission name stored in database (and used when checking permission).\n allowGuest: true,\n }, \n 'view', // Category permission will be added to on the grid\n 95 // Optional: Priority\n )\n .registerPermission(\n {\n icon: 'fas fa-calendar-plus', // Font-Awesome Icon\n label: app.translator.trans('flarum-calendar.admin.permissions.add'), // Permission Label\n permission: 'event.create', // Actual permission name stored in database (and used when checking permission).\n }, \n 'start', // Category permission will be added to on the grid\n 95 // Optional: Priority\n )\n .registerPermission(\n {\n icon: 'fas fa-calendar-times', // Font-Awesome Icon\n label: app.translator.trans('flarum-calendar.admin.permissions.moderate'), // Permission Label\n permission: 'event.moderate', // Actual permission name stored in database (and used when checking permission).\n }, \n 'moderate', // Category permission will be added to on the grid\n 95 // Optional: Priority\n );\n\n extend(BasicsPage.prototype, 'homePageItems', (items) => {\n items.add('events', {\n path: '/events',\n label: app.translator.trans('flarum-calendar.admin.basics.homepage'),\n });\n });\n\n});\n","module.exports = flarum.core.compat['extend'];"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3ER,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,+BCLvD,MAAM,EAA+BC,OAAOC,KAAKC,OAAe,OCA1D,EAA+BF,OAAOC,KAAKC,OAAO,yB,aCGxDC,IAAIC,aAAaC,IAAI,6BAA6B,WAChDC,QAAQC,IAAI,6CAEZJ,IAAIK,cAAJ,IACO,sBASJC,mBACC,CACEC,KAAM,kBACNC,MAAOR,IAAIS,WAAWC,MAAM,0CAC5BC,WAAY,aACZC,YAAY,GAEd,OACA,IAEDN,mBACC,CACEC,KAAM,uBACNC,MAAOR,IAAIS,WAAWC,MAAM,yCAC5BC,WAAY,gBAEd,QACA,IAEDL,mBACC,CACEC,KAAM,wBACNC,MAAOR,IAAIS,WAAWC,MAAM,8CAC5BC,WAAY,kBAEd,WACA,KAGJE,EAAAA,EAAAA,QAAOC,IAAAA,UAAsB,iBAAiB,SAACC,GAC7CA,EAAMb,IAAI,SAAU,CAClBc,KAAM,UACNR,MAAOR,IAAIS,WAAWC,MAAM,kD","sources":["webpack://@webbinaro/flarum-calendar/webpack/bootstrap","webpack://@webbinaro/flarum-calendar/webpack/runtime/compat get default export","webpack://@webbinaro/flarum-calendar/webpack/runtime/define property getters","webpack://@webbinaro/flarum-calendar/webpack/runtime/hasOwnProperty shorthand","webpack://@webbinaro/flarum-calendar/webpack/runtime/make namespace object","webpack://@webbinaro/flarum-calendar/external root \"flarum.core.compat['extend']\"","webpack://@webbinaro/flarum-calendar/external root \"flarum.core.compat['components/BasicsPage']\"","webpack://@webbinaro/flarum-calendar/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['components/BasicsPage'];","import { extend } from 'flarum/extend';\nimport BasicsPage from 'flarum/components/BasicsPage';\n\napp.initializers.add('webbinaro/flarum-calendar', () => {\n console.log('[webbinaro/flarum-calendar] Hello, admin!');\n\n app.extensionData\n .for('webbinaro-calendar')\n /*.registerSetting(\n {\n setting: 'some-key', // This is the key the settings will be saved under in the settings table in the database.\n label: app.translator.trans('flarum-calendar.admin.title'), // The label to be shown letting the admin know what the setting does.\n type: 'boolean', // What type of setting this is, valid options are: boolean, text (or any other tag type), and select. \n },\n 30 // Optional: Priority\n )*/\n .registerPermission(\n {\n icon: 'fas fa-calendar', // Font-Awesome Icon\n label: app.translator.trans('flarum-calendar.admin.permissions.view'), // Permission Label\n permission: 'event.view', // Actual permission name stored in database (and used when checking permission).\n allowGuest: true,\n }, \n 'view', // Category permission will be added to on the grid\n 95 // Optional: Priority\n )\n .registerPermission(\n {\n icon: 'fas fa-calendar-plus', // Font-Awesome Icon\n label: app.translator.trans('flarum-calendar.admin.permissions.add'), // Permission Label\n permission: 'event.create', // Actual permission name stored in database (and used when checking permission).\n }, \n 'start', // Category permission will be added to on the grid\n 95 // Optional: Priority\n )\n .registerPermission(\n {\n icon: 'fas fa-calendar-times', // Font-Awesome Icon\n label: app.translator.trans('flarum-calendar.admin.permissions.moderate'), // Permission Label\n permission: 'event.moderate', // Actual permission name stored in database (and used when checking permission).\n }, \n 'moderate', // Category permission will be added to on the grid\n 95 // Optional: Priority\n );\n\n extend(BasicsPage.prototype, 'homePageItems', (items) => {\n items.add('events', {\n path: '/events',\n label: app.translator.trans('flarum-calendar.admin.basics.homepage'),\n });\n });\n\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","initializers","add","console","log","extensionData","registerPermission","icon","label","translator","trans","permission","allowGuest","extend","BasicsPage","items","path"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index 8aa4ace..71a61aa 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,55 +1,3 @@ -module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=35)}([function(e,t){e.exports=flarum.core.compat.Model},function(e,t){e.exports=flarum.core.compat.app},function(e,t){e.exports=flarum.core.compat["utils/Stream"]},function(e,t){e.exports=flarum.core.compat["components/IndexPage"]},function(e,t){e.exports=flarum.core.compat["components/Button"]},function(e,t){e.exports=flarum.core.compat.extend},function(e,t,n){"use strict";var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function s(e){for(var t=-1,n=0;n",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},r={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},o=function(e){return("0"+e).slice(-2)},i=function(e){return!0===e?1:0};function a(e,t,n){var r;return void 0===n&&(n=!1),function(){var o=this,i=arguments;null!==r&&clearTimeout(r),r=window.setTimeout((function(){r=null,n||e.apply(o,i)}),t),n&&!r&&e.apply(o,i)}}var s=function(e){return e instanceof Array?e:[e]};function l(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function c(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function u(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function d(e,t){var n=c("div","numInputWrapper"),r=c("input","numInput "+e),o=c("span","arrowUp"),i=c("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?r.type="number":(r.type="text",r.pattern="\\d*"),void 0!==t)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(o),n.appendChild(i),n}var f=function(){},p=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},h={D:f,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*i(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var r=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(r-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:f,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:f,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},g={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},v={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[v.w(e,t,n)]},F:function(e,t,n){return p(v.n(e,t,n)-1,!1,t)},G:function(e,t,n){return o(v.h(e,t,n))},H:function(e){return o(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[i(e.getHours()>11)]},M:function(e,t){return p(e.getMonth(),!0,t)},S:function(e){return o(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return o(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return o(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return o(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},m=function(e){var t=e.config,o=void 0===t?n:t,i=e.l10n,a=void 0===i?r:i;return function(e,t,n){var r=n||a;return void 0!==o.formatDate?o.formatDate(e,t,r):t.split("").map((function(t,n,i){return v[t]&&"\\"!==i[n-1]?v[t](e,r,o):"\\"!==t?t:""})).join("")}},y=function(e){var t=e.config,o=void 0===t?n:t,i=e.l10n,a=void 0===i?r:i;return function(e,t,r,i){if(0===e||e){var s,l=i||a,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var u=t||(o||n).dateFormat,d=String(e).trim();if("today"===d)s=new Date,r=!0;else if(/Z$/.test(d)||/GMT$/.test(d))s=new Date(e);else if(o&&o.parseDate)s=o.parseDate(e,u);else{s=o&&o.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var f=void 0,p=[],v=0,m=0,y="";va&&(u=n===v.hourElement?u-a-i(!v.amPM):r,f&&P(void 0,1,v.hourElement)),v.amPM&&d&&(1===s?u+l===23:Math.abs(u-l)>s)&&(v.amPM.textContent=v.l10n.amPM[i(v.amPM.textContent===v.l10n.amPM[0])]),n.value=o(u)}}(e);var t=v._input.value;k(),me(),v._input.value!==t&&v._debouncedChange()}function k(){if(void 0!==v.hourElement&&void 0!==v.minuteElement){var e,t,n=(parseInt(v.hourElement.value.slice(-2),10)||0)%24,r=(parseInt(v.minuteElement.value,10)||0)%60,o=void 0!==v.secondElement?(parseInt(v.secondElement.value,10)||0)%60:0;void 0!==v.amPM&&(e=n,t=v.amPM.textContent,n=e%12+12*i(t===v.l10n.amPM[1]));var a=void 0!==v.config.minTime||v.config.minDate&&v.minDateHasTime&&v.latestSelectedDateObj&&0===b(v.latestSelectedDateObj,v.config.minDate,!0);if(void 0!==v.config.maxTime||v.config.maxDate&&v.maxDateHasTime&&v.latestSelectedDateObj&&0===b(v.latestSelectedDateObj,v.config.maxDate,!0)){var s=void 0!==v.config.maxTime?v.config.maxTime:v.config.maxDate;(n=Math.min(n,s.getHours()))===s.getHours()&&(r=Math.min(r,s.getMinutes())),r===s.getMinutes()&&(o=Math.min(o,s.getSeconds()))}if(a){var l=void 0!==v.config.minTime?v.config.minTime:v.config.minDate;(n=Math.max(n,l.getHours()))===l.getHours()&&(r=Math.max(r,l.getMinutes())),r===l.getMinutes()&&(o=Math.max(o,l.getSeconds()))}M(n,r,o)}}function x(e){var t=e||v.latestSelectedDateObj;t&&M(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=v.config.defaultHour,t=v.config.defaultMinute,n=v.config.defaultSeconds;if(void 0!==v.config.minDate){var r=v.config.minDate.getHours(),o=v.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=v.config.minDate.getSeconds())}if(void 0!==v.config.maxDate){var i=v.config.maxDate.getHours(),a=v.config.maxDate.getMinutes();(e=Math.min(e,i))===i&&(t=Math.min(a,t)),e===i&&t===a&&(n=v.config.maxDate.getSeconds())}M(e,t,n)}function M(e,t,n){void 0!==v.latestSelectedDateObj&&v.latestSelectedDateObj.setHours(e%24,t,n||0,0),v.hourElement&&v.minuteElement&&!v.isMobile&&(v.hourElement.value=o(v.config.time_24hr?e:(12+e)%12+12*i(e%12==0)),v.minuteElement.value=o(t),void 0!==v.amPM&&(v.amPM.textContent=v.l10n.amPM[i(e>=12)]),void 0!==v.secondElement&&(v.secondElement.value=o(n)))}function T(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function R(e,t,n,r){return t instanceof Array?t.forEach((function(t){return R(e,t,n,r)})):e instanceof Array?e.forEach((function(e){return R(e,t,n,r)})):(e.addEventListener(t,n,r),void v._handlers.push({element:e,event:t,handler:n,options:r}))}function _(e){return function(t){1===t.which&&e(t)}}function I(){fe("onChange")}function N(e,t){var n=void 0!==e?v.parseDate(e):v.latestSelectedDateObj||(v.config.minDate&&v.config.minDate>v.now?v.config.minDate:v.config.maxDate&&v.config.maxDate=0&&b(e,v.selectedDates[1])<=0}(t)&&!he(t)&&i.classList.add("inRange"),v.weekNumbers&&1===v.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&v.weekNumbers.insertAdjacentHTML("beforeend",""+v.config.getWeek(t)+""),fe("onDayCreate",i),i}function B(e){e.focus(),"range"===v.config.mode&&ee(e)}function F(e){for(var t=e>0?0:v.config.showMonths-1,n=e>0?v.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=v.daysContainer.children[r],i=e>0?0:o.children.length-1,a=e>0?o.children.length:-1,s=i;s!=a;s+=e){var l=o.children[s];if(-1===l.className.indexOf("hidden")&&J(l.dateObj))return l}}function L(e,t){var n=K(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==v.selectedDateElem&&K(v.selectedDateElem)?v.selectedDateElem:void 0!==v.todayDateElem&&K(v.todayDateElem)?v.todayDateElem:F(t>0?1:-1);return void 0===r?v._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():v.currentMonth,r=t>0?v.config.showMonths:-1,o=t>0?1:-1,i=n-v.currentMonth;i!=r;i+=o)for(var a=v.daysContainer.children[i],s=n-v.currentMonth===i?e.$i+t:t<0?a.children.length-1:0,l=a.children.length,c=s;c>=0&&c0?l:-1);c+=o){var u=a.children[c];if(-1===u.className.indexOf("hidden")&&J(u.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return B(u)}v.changeMonth(o),L(F(o),0)}(r,t):B(r)}function z(e,t){for(var n=(new Date(e,t,1).getDay()-v.l10n.firstDayOfWeek+7)%7,r=v.utils.getDaysInMonth((t-1+12)%12),o=v.utils.getDaysInMonth(t),i=window.document.createDocumentFragment(),a=v.config.showMonths>1,s=a?"prevMonthDay hidden":"prevMonthDay",l=a?"nextMonthDay hidden":"nextMonthDay",u=r+1-n,d=0;u<=r;u++,d++)i.appendChild(H(s,new Date(e,t-1,u),u,d));for(u=1;u<=o;u++,d++)i.appendChild(H("",new Date(e,t,u),u,d));for(var f=o+1;f<=42-n&&(1===v.config.showMonths||d%7!=0);f++,d++)i.appendChild(H(l,new Date(e,t+1,f%o),f,d));var p=c("div","dayContainer");return p.appendChild(i),p}function U(){if(void 0!==v.daysContainer){u(v.daysContainer),v.weekNumbers&&u(v.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t1||"dropdown"!==v.config.monthSelectorType)){var e=function(e){return!(void 0!==v.config.minDate&&v.currentYear===v.config.minDate.getFullYear()&&ev.config.maxDate.getMonth())};v.monthsDropdownContainer.tabIndex=-1,v.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=c("option","flatpickr-monthDropdown-month");n.value=new Date(v.currentYear,t).getMonth().toString(),n.textContent=p(t,v.config.shorthandCurrentMonth,v.l10n),n.tabIndex=-1,v.currentMonth===t&&(n.selected=!0),v.monthsDropdownContainer.appendChild(n)}}}function W(){var e,t=c("div","flatpickr-month"),n=window.document.createDocumentFragment();v.config.showMonths>1||"static"===v.config.monthSelectorType?e=c("span","cur-month"):(v.monthsDropdownContainer=c("select","flatpickr-monthDropdown-months"),R(v.monthsDropdownContainer,"change",(function(e){var t=e.target,n=parseInt(t.value,10);v.changeMonth(n-v.currentMonth),fe("onMonthChange")})),j(),e=v.monthsDropdownContainer);var r=d("cur-year",{tabindex:"-1"}),o=r.getElementsByTagName("input")[0];o.setAttribute("aria-label",v.l10n.yearAriaLabel),v.config.minDate&&o.setAttribute("min",v.config.minDate.getFullYear().toString()),v.config.maxDate&&(o.setAttribute("max",v.config.maxDate.getFullYear().toString()),o.disabled=!!v.config.minDate&&v.config.minDate.getFullYear()===v.config.maxDate.getFullYear());var i=c("div","flatpickr-current-month");return i.appendChild(e),i.appendChild(r),n.appendChild(i),t.appendChild(n),{container:t,yearElement:o,monthElement:e}}function Y(){u(v.monthNav),v.monthNav.appendChild(v.prevMonthNav),v.config.showMonths&&(v.yearElements=[],v.monthElements=[]);for(var e=v.config.showMonths;e--;){var t=W();v.yearElements.push(t.yearElement),v.monthElements.push(t.monthElement),v.monthNav.appendChild(t.container)}v.monthNav.appendChild(v.nextMonthNav)}function V(){v.weekdayContainer?u(v.weekdayContainer):v.weekdayContainer=c("div","flatpickr-weekdays");for(var e=v.config.showMonths;e--;){var t=c("div","flatpickr-weekdaycontainer");v.weekdayContainer.appendChild(t)}return Q(),v.weekdayContainer}function Q(){if(v.weekdayContainer){var e=v.l10n.firstDayOfWeek,t=v.l10n.weekdays.shorthand.slice();e>0&&e\n "+t.join("")+"\n \n "}}function G(e,t){void 0===t&&(t=!0);var n=t?e:e-v.currentMonth;n<0&&!0===v._hidePrevMonthArrow||n>0&&!0===v._hideNextMonthArrow||(v.currentMonth+=n,(v.currentMonth<0||v.currentMonth>11)&&(v.currentYear+=v.currentMonth>11?1:-1,v.currentMonth=(v.currentMonth+12)%12,fe("onYearChange"),j()),U(),fe("onMonthChange"),ge())}function q(e){return!(!v.config.appendTo||!v.config.appendTo.contains(e))||v.calendarContainer.contains(e)}function Z(e){if(v.isOpen&&!v.config.inline){var t="function"==typeof(a=e).composedPath?a.composedPath()[0]:a.target,n=q(t),r=t===v.input||t===v.altInput||v.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(v.input)||~e.path.indexOf(v.altInput)),o="blur"===e.type?r&&e.relatedTarget&&!q(e.relatedTarget):!r&&!n&&!q(e.relatedTarget),i=!v.config.ignoredFocusElements.some((function(e){return e.contains(t)}));o&&i&&(void 0!==v.timeContainer&&void 0!==v.minuteElement&&void 0!==v.hourElement&&C(),v.close(),"range"===v.config.mode&&1===v.selectedDates.length&&(v.clear(!1),v.redraw()))}var a}function X(e){if(!(!e||v.config.minDate&&ev.config.maxDate.getFullYear())){var t=e,n=v.currentYear!==t;v.currentYear=t||v.currentYear,v.config.maxDate&&v.currentYear===v.config.maxDate.getFullYear()?v.currentMonth=Math.min(v.config.maxDate.getMonth(),v.currentMonth):v.config.minDate&&v.currentYear===v.config.minDate.getFullYear()&&(v.currentMonth=Math.max(v.config.minDate.getMonth(),v.currentMonth)),n&&(v.redraw(),fe("onYearChange"),j())}}function J(e,t){void 0===t&&(t=!0);var n=v.parseDate(e,void 0,t);if(v.config.minDate&&n&&b(n,v.config.minDate,void 0!==t?t:!v.minDateHasTime)<0||v.config.maxDate&&n&&b(n,v.config.maxDate,void 0!==t?t:!v.maxDateHasTime)>0)return!1;if(0===v.config.enable.length&&0===v.config.disable.length)return!0;if(void 0===n)return!1;for(var r=v.config.enable.length>0,o=r?v.config.enable:v.config.disable,i=0,a=void 0;i=a.from.getTime()&&n.getTime()<=a.to.getTime())return r}return!r}function K(e){return void 0!==v.daysContainer&&-1===e.className.indexOf("hidden")&&v.daysContainer.contains(e)}function $(e){var t=e.target===v._input,n=v.config.allowInput,r=v.isOpen&&(!n||!t),o=v.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return v.setDate(v._input.value,!0,e.target===v.altInput?v.config.altFormat:v.config.dateFormat),e.target.blur();v.open()}else if(q(e.target)||r||o){var i=!!v.timeContainer&&v.timeContainer.contains(e.target);switch(e.keyCode){case 13:i?(e.preventDefault(),C(),se()):le(e);break;case 27:e.preventDefault(),se();break;case 8:case 46:t&&!v.config.allowInput&&(e.preventDefault(),v.clear());break;case 37:case 39:if(i||t)v.hourElement&&v.hourElement.focus();else if(e.preventDefault(),void 0!==v.daysContainer&&(!1===n||document.activeElement&&K(document.activeElement))){var a=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),G(a),L(F(1),0)):L(void 0,a)}break;case 38:case 40:e.preventDefault();var s=40===e.keyCode?1:-1;v.daysContainer&&void 0!==e.target.$i||e.target===v.input||e.target===v.altInput?e.ctrlKey?(e.stopPropagation(),X(v.currentYear-s),L(F(1),0)):i||L(void 0,7*s):e.target===v.currentYearElement?X(v.currentYear-s):v.config.enableTime&&(!i&&v.hourElement&&v.hourElement.focus(),C(e),v._debouncedChange());break;case 9:if(i){var l=[v.hourElement,v.minuteElement,v.secondElement,v.amPM].concat(v.pluginElements).filter((function(e){return e})),c=l.indexOf(e.target);if(-1!==c){var u=l[c+(e.shiftKey?-1:1)];e.preventDefault(),(u||v._input).focus()}}else!v.config.noCalendar&&v.daysContainer&&v.daysContainer.contains(e.target)&&e.shiftKey&&(e.preventDefault(),v._input.focus())}}if(void 0!==v.amPM&&e.target===v.amPM)switch(e.key){case v.l10n.amPM[0].charAt(0):case v.l10n.amPM[0].charAt(0).toLowerCase():v.amPM.textContent=v.l10n.amPM[0],k(),me();break;case v.l10n.amPM[1].charAt(0):case v.l10n.amPM[1].charAt(0).toLowerCase():v.amPM.textContent=v.l10n.amPM[1],k(),me()}(t||q(e.target))&&fe("onKeyDown",e)}function ee(e){if(1===v.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():v.days.firstElementChild.dateObj.getTime(),n=v.parseDate(v.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,v.selectedDates[0].getTime()),o=Math.max(t,v.selectedDates[0].getTime()),i=!1,a=0,s=0,l=r;lr&&la)?a=l:l>n&&(!s||l0&&p0&&p>s;return h?(f.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach((function(e){f.classList.remove(e)})),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach((function(e){f.classList.remove(e)})),void(void 0!==e&&(e.classList.add(t<=v.selectedDates[0].getTime()?"startRange":"endRange"),nt&&p===n&&f.classList.add("endRange"),p>=a&&(0===s||p<=s)&&(c=n,d=t,(l=p)>Math.min(c,d)&&l0||n.getMinutes()>0||n.getSeconds()>0),v.selectedDates&&(v.selectedDates=v.selectedDates.filter((function(e){return J(e)})),v.selectedDates.length||"min"!==e||x(n),me()),v.daysContainer&&(ae(),void 0!==n?v.currentYearElement[e]=n.getFullYear().toString():v.currentYearElement.removeAttribute(e),v.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function oe(){"object"!=typeof v.config.locale&&void 0===A.l10ns[v.config.locale]&&v.config.errorHandler(new Error("flatpickr: invalid locale "+v.config.locale)),v.l10n=e({},A.l10ns.default,"object"==typeof v.config.locale?v.config.locale:"default"!==v.config.locale?A.l10ns[v.config.locale]:void 0),g.K="("+v.l10n.amPM[0]+"|"+v.l10n.amPM[1]+"|"+v.l10n.amPM[0].toLowerCase()+"|"+v.l10n.amPM[1].toLowerCase()+")",void 0===e({},h,JSON.parse(JSON.stringify(f.dataset||{}))).time_24hr&&void 0===A.defaultConfig.time_24hr&&(v.config.time_24hr=v.l10n.time_24hr),v.formatDate=m(v),v.parseDate=y({config:v.config,l10n:v.l10n})}function ie(e){if(void 0!==v.calendarContainer){fe("onPreCalendarPosition");var t=e||v._positionElement,n=Array.prototype.reduce.call(v.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),r=v.calendarContainer.offsetWidth,o=v.config.position.split(" "),i=o[0],a=o.length>1?o[1]:null,s=t.getBoundingClientRect(),c=window.innerHeight-s.bottom,u="above"===i||"below"!==i&&cn,d=window.pageYOffset+s.top+(u?-n-2:t.offsetHeight+2);if(l(v.calendarContainer,"arrowTop",!u),l(v.calendarContainer,"arrowBottom",u),!v.config.inline){var f=window.pageXOffset+s.left-(null!=a&&"center"===a?(r-s.width)/2:0),p=window.document.body.offsetWidth-(window.pageXOffset+s.right),h=f+r>window.document.body.offsetWidth,g=p+r>window.document.body.offsetWidth;if(l(v.calendarContainer,"rightMost",h),!v.config.static)if(v.calendarContainer.style.top=d+"px",h)if(g){var m=document.styleSheets[0];if(void 0===m)return;var y=window.document.body.offsetWidth,b=Math.max(0,y/2-r/2),w=m.cssRules.length,D="{left:"+s.left+"px;right:auto;}";l(v.calendarContainer,"rightMost",!1),l(v.calendarContainer,"centerMost",!0),m.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+D,w),v.calendarContainer.style.left=b+"px",v.calendarContainer.style.right="auto"}else v.calendarContainer.style.left="auto",v.calendarContainer.style.right=p+"px";else v.calendarContainer.style.left=f+"px",v.calendarContainer.style.right="auto"}}}function ae(){v.config.noCalendar||v.isMobile||(ge(),U())}function se(){v._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(v.close,0):v.close()}function le(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,(function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")}));if(void 0!==t){var n=t,r=v.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()v.currentMonth+v.config.showMonths-1)&&"range"!==v.config.mode;if(v.selectedDateElem=n,"single"===v.config.mode)v.selectedDates=[r];else if("multiple"===v.config.mode){var i=he(r);i?v.selectedDates.splice(parseInt(i),1):v.selectedDates.push(r)}else"range"===v.config.mode&&(2===v.selectedDates.length&&v.clear(!1,!1),v.latestSelectedDateObj=r,v.selectedDates.push(r),0!==b(r,v.selectedDates[0],!0)&&v.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(k(),o){var a=v.currentYear!==r.getFullYear();v.currentYear=r.getFullYear(),v.currentMonth=r.getMonth(),a&&(fe("onYearChange"),j()),fe("onMonthChange")}if(ge(),U(),me(),v.config.enableTime&&setTimeout((function(){return v.showTimeInput=!0}),50),o||"range"===v.config.mode||1!==v.config.showMonths?void 0!==v.selectedDateElem&&void 0===v.hourElement&&v.selectedDateElem&&v.selectedDateElem.focus():B(n),void 0!==v.hourElement&&void 0!==v.hourElement&&v.hourElement.focus(),v.config.closeOnSelect){var s="single"===v.config.mode&&!v.config.enableTime,l="range"===v.config.mode&&2===v.selectedDates.length&&!v.config.enableTime;(s||l)&&se()}I()}}v.parseDate=y({config:v.config,l10n:v.l10n}),v._handlers=[],v.pluginElements=[],v.loadedPlugins=[],v._bind=R,v._setHoursFromDate=x,v._positionCalendar=ie,v.changeMonth=G,v.changeYear=X,v.clear=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),v.input.value="",void 0!==v.altInput&&(v.altInput.value=""),void 0!==v.mobileInput&&(v.mobileInput.value=""),v.selectedDates=[],v.latestSelectedDateObj=void 0,!0===t&&(v.currentYear=v._initialDate.getFullYear(),v.currentMonth=v._initialDate.getMonth()),v.showTimeInput=!1,!0===v.config.enableTime&&S(),v.redraw(),e&&fe("onChange")},v.close=function(){v.isOpen=!1,v.isMobile||(void 0!==v.calendarContainer&&v.calendarContainer.classList.remove("open"),void 0!==v._input&&v._input.classList.remove("active")),fe("onClose")},v._createElement=c,v.destroy=function(){void 0!==v.config&&fe("onDestroy");for(var e=v._handlers.length;e--;){var t=v._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(v._handlers=[],v.mobileInput)v.mobileInput.parentNode&&v.mobileInput.parentNode.removeChild(v.mobileInput),v.mobileInput=void 0;else if(v.calendarContainer&&v.calendarContainer.parentNode)if(v.config.static&&v.calendarContainer.parentNode){var n=v.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else v.calendarContainer.parentNode.removeChild(v.calendarContainer);v.altInput&&(v.input.type="text",v.altInput.parentNode&&v.altInput.parentNode.removeChild(v.altInput),delete v.altInput),v.input&&(v.input.type=v.input._type,v.input.classList.remove("flatpickr-input"),v.input.removeAttribute("readonly"),v.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete v[e]}catch(e){}}))},v.isEnabled=J,v.jumpToDate=N,v.open=function(e,t){if(void 0===t&&(t=v._positionElement),!0===v.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==v.mobileInput&&(v.mobileInput.focus(),v.mobileInput.click()),void fe("onOpen");if(!v._input.disabled&&!v.config.inline){var n=v.isOpen;v.isOpen=!0,n||(v.calendarContainer.classList.add("open"),v._input.classList.add("active"),fe("onOpen"),ie(t)),!0===v.config.enableTime&&!0===v.config.noCalendar&&(0===v.selectedDates.length&&ne(),!1!==v.config.allowInput||void 0!==e&&v.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return v.hourElement.select()}),50))}},v.redraw=ae,v.set=function(e,n){if(null!==e&&"object"==typeof e)for(var r in Object.assign(v.config,e),e)void 0!==ce[r]&&ce[r].forEach((function(e){return e()}));else v.config[e]=n,void 0!==ce[e]?ce[e].forEach((function(e){return e()})):t.indexOf(e)>-1&&(v.config[e]=s(n));v.redraw(),me(!1)},v.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=v.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return v.clear(t);ue(e,n),v.showTimeInput=v.selectedDates.length>0,v.latestSelectedDateObj=v.selectedDates[v.selectedDates.length-1],v.redraw(),N(),x(),0===v.selectedDates.length&&v.clear(!1),me(t),t&&fe("onChange")},v.toggle=function(e){if(!0===v.isOpen)return v.close();v.open(e)};var ce={locale:[oe,Q],showMonths:[Y,E,V],minDate:[N],maxDate:[N]};function ue(e,t){var n=[];if(e instanceof Array)n=e.map((function(e){return v.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)n=[v.parseDate(e,t)];else if("string"==typeof e)switch(v.config.mode){case"single":case"time":n=[v.parseDate(e,t)];break;case"multiple":n=e.split(v.config.conjunction).map((function(e){return v.parseDate(e,t)}));break;case"range":n=e.split(v.l10n.rangeSeparator).map((function(e){return v.parseDate(e,t)}))}else v.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));v.selectedDates=n.filter((function(e){return e instanceof Date&&J(e,!1)})),"range"===v.config.mode&&v.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function de(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?v.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:v.parseDate(e.from,void 0),to:v.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function fe(e,t){if(void 0!==v.config){var n=v.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&r1||"static"===v.config.monthSelectorType?v.monthElements[t].textContent=p(n.getMonth(),v.config.shorthandCurrentMonth,v.l10n)+" ":v.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()})),v._hidePrevMonthArrow=void 0!==v.config.minDate&&(v.currentYear===v.config.minDate.getFullYear()?v.currentMonth<=v.config.minDate.getMonth():v.currentYearv.config.maxDate.getMonth():v.currentYear>v.config.maxDate.getFullYear()))}function ve(e){return v.selectedDates.map((function(t){return v.formatDate(t,e)})).filter((function(e,t,n){return"range"!==v.config.mode||v.config.enableTime||n.indexOf(e)===t})).join("range"!==v.config.mode?v.config.conjunction:v.l10n.rangeSeparator)}function me(e){void 0===e&&(e=!0),void 0!==v.mobileInput&&v.mobileFormatStr&&(v.mobileInput.value=void 0!==v.latestSelectedDateObj?v.formatDate(v.latestSelectedDateObj,v.mobileFormatStr):""),v.input.value=ve(v.config.dateFormat),void 0!==v.altInput&&(v.altInput.value=ve(v.config.altFormat)),!1!==e&&fe("onValueUpdate")}function ye(e){var t=v.prevMonthNav.contains(e.target),n=v.nextMonthNav.contains(e.target);t||n?G(t?-1:1):v.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?v.changeYear(v.currentYear+1):e.target.classList.contains("arrowDown")&&v.changeYear(v.currentYear-1)}return function(){v.element=v.input=f,v.isOpen=!1,function(){var r=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],o=e({},h,JSON.parse(JSON.stringify(f.dataset||{}))),i={};v.config.parseDate=o.parseDate,v.config.formatDate=o.formatDate,Object.defineProperty(v.config,"enable",{get:function(){return v.config._enable},set:function(e){v.config._enable=de(e)}}),Object.defineProperty(v.config,"disable",{get:function(){return v.config._disable},set:function(e){v.config._disable=de(e)}});var a="time"===o.mode;if(!o.dateFormat&&(o.enableTime||a)){var l=A.defaultConfig.dateFormat||n.dateFormat;i.dateFormat=o.noCalendar||a?"H:i"+(o.enableSeconds?":S":""):l+" H:i"+(o.enableSeconds?":S":"")}if(o.altInput&&(o.enableTime||a)&&!o.altFormat){var c=A.defaultConfig.altFormat||n.altFormat;i.altFormat=o.noCalendar||a?"h:i"+(o.enableSeconds?":S K":" K"):c+" h:i"+(o.enableSeconds?":S":"")+" K"}o.altInputClass||(v.config.altInputClass=v.input.className+" "+v.config.altInputClass),Object.defineProperty(v.config,"minDate",{get:function(){return v.config._minDate},set:re("min")}),Object.defineProperty(v.config,"maxDate",{get:function(){return v.config._maxDate},set:re("max")});var u=function(e){return function(t){v.config["min"===e?"_minTime":"_maxTime"]=v.parseDate(t,"H:i:S")}};Object.defineProperty(v.config,"minTime",{get:function(){return v.config._minTime},set:u("min")}),Object.defineProperty(v.config,"maxTime",{get:function(){return v.config._maxTime},set:u("max")}),"time"===o.mode&&(v.config.noCalendar=!0,v.config.enableTime=!0),Object.assign(v.config,i,o);for(var d=0;d-1?v.config[g]=s(p[g]).map(D).concat(v.config[g]):void 0===o[g]&&(v.config[g]=p[g])}fe("onParseConfig")}(),oe(),v.input=v.config.wrap?f.querySelector("[data-input]"):f,v.input?(v.input._type=v.input.type,v.input.type="text",v.input.classList.add("flatpickr-input"),v._input=v.input,v.config.altInput&&(v.altInput=c(v.input.nodeName,v.config.altInputClass),v._input=v.altInput,v.altInput.placeholder=v.input.placeholder,v.altInput.disabled=v.input.disabled,v.altInput.required=v.input.required,v.altInput.tabIndex=v.input.tabIndex,v.altInput.type="text",v.input.setAttribute("type","hidden"),!v.config.static&&v.input.parentNode&&v.input.parentNode.insertBefore(v.altInput,v.input.nextSibling)),v.config.allowInput||v._input.setAttribute("readonly","readonly"),v._positionElement=v.config.positionElement||v._input):v.config.errorHandler(new Error("Invalid input element specified")),function(){v.selectedDates=[],v.now=v.parseDate(v.config.now)||new Date;var e=v.config.defaultDate||("INPUT"!==v.input.nodeName&&"TEXTAREA"!==v.input.nodeName||!v.input.placeholder||v.input.value!==v.input.placeholder?v.input.value:null);e&&ue(e,v.config.dateFormat),v._initialDate=v.selectedDates.length>0?v.selectedDates[0]:v.config.minDate&&v.config.minDate.getTime()>v.now.getTime()?v.config.minDate:v.config.maxDate&&v.config.maxDate.getTime()0&&(v.latestSelectedDateObj=v.selectedDates[0]),void 0!==v.config.minTime&&(v.config.minTime=v.parseDate(v.config.minTime,"H:i")),void 0!==v.config.maxTime&&(v.config.maxTime=v.parseDate(v.config.maxTime,"H:i")),v.minDateHasTime=!!v.config.minDate&&(v.config.minDate.getHours()>0||v.config.minDate.getMinutes()>0||v.config.minDate.getSeconds()>0),v.maxDateHasTime=!!v.config.maxDate&&(v.config.maxDate.getHours()>0||v.config.maxDate.getMinutes()>0||v.config.maxDate.getSeconds()>0),Object.defineProperty(v,"showTimeInput",{get:function(){return v._showTimeInput},set:function(e){v._showTimeInput=e,v.calendarContainer&&l(v.calendarContainer,"showTimeInput",e),v.isOpen&&ie()}})}(),v.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=v.currentMonth),void 0===t&&(t=v.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:v.l10n.daysInMonth[e]}},v.isMobile||function(){var e=window.document.createDocumentFragment();if(v.calendarContainer=c("div","flatpickr-calendar"),v.calendarContainer.tabIndex=-1,!v.config.noCalendar){if(e.appendChild((v.monthNav=c("div","flatpickr-months"),v.yearElements=[],v.monthElements=[],v.prevMonthNav=c("span","flatpickr-prev-month"),v.prevMonthNav.innerHTML=v.config.prevArrow,v.nextMonthNav=c("span","flatpickr-next-month"),v.nextMonthNav.innerHTML=v.config.nextArrow,Y(),Object.defineProperty(v,"_hidePrevMonthArrow",{get:function(){return v.__hidePrevMonthArrow},set:function(e){v.__hidePrevMonthArrow!==e&&(l(v.prevMonthNav,"flatpickr-disabled",e),v.__hidePrevMonthArrow=e)}}),Object.defineProperty(v,"_hideNextMonthArrow",{get:function(){return v.__hideNextMonthArrow},set:function(e){v.__hideNextMonthArrow!==e&&(l(v.nextMonthNav,"flatpickr-disabled",e),v.__hideNextMonthArrow=e)}}),v.currentYearElement=v.yearElements[0],ge(),v.monthNav)),v.innerContainer=c("div","flatpickr-innerContainer"),v.config.weekNumbers){var t=function(){v.calendarContainer.classList.add("hasWeeks");var e=c("div","flatpickr-weekwrapper");e.appendChild(c("span","flatpickr-weekday",v.l10n.weekAbbreviation));var t=c("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,r=t.weekNumbers;v.innerContainer.appendChild(n),v.weekNumbers=r,v.weekWrapper=n}v.rContainer=c("div","flatpickr-rContainer"),v.rContainer.appendChild(V()),v.daysContainer||(v.daysContainer=c("div","flatpickr-days"),v.daysContainer.tabIndex=-1),U(),v.rContainer.appendChild(v.daysContainer),v.innerContainer.appendChild(v.rContainer),e.appendChild(v.innerContainer)}v.config.enableTime&&e.appendChild(function(){v.calendarContainer.classList.add("hasTime"),v.config.noCalendar&&v.calendarContainer.classList.add("noCalendar"),v.timeContainer=c("div","flatpickr-time"),v.timeContainer.tabIndex=-1;var e=c("span","flatpickr-time-separator",":"),t=d("flatpickr-hour",{"aria-label":v.l10n.hourAriaLabel});v.hourElement=t.getElementsByTagName("input")[0];var n=d("flatpickr-minute",{"aria-label":v.l10n.minuteAriaLabel});if(v.minuteElement=n.getElementsByTagName("input")[0],v.hourElement.tabIndex=v.minuteElement.tabIndex=-1,v.hourElement.value=o(v.latestSelectedDateObj?v.latestSelectedDateObj.getHours():v.config.time_24hr?v.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(v.config.defaultHour)),v.minuteElement.value=o(v.latestSelectedDateObj?v.latestSelectedDateObj.getMinutes():v.config.defaultMinute),v.hourElement.setAttribute("step",v.config.hourIncrement.toString()),v.minuteElement.setAttribute("step",v.config.minuteIncrement.toString()),v.hourElement.setAttribute("min",v.config.time_24hr?"0":"1"),v.hourElement.setAttribute("max",v.config.time_24hr?"23":"12"),v.minuteElement.setAttribute("min","0"),v.minuteElement.setAttribute("max","59"),v.timeContainer.appendChild(t),v.timeContainer.appendChild(e),v.timeContainer.appendChild(n),v.config.time_24hr&&v.timeContainer.classList.add("time24hr"),v.config.enableSeconds){v.timeContainer.classList.add("hasSeconds");var r=d("flatpickr-second");v.secondElement=r.getElementsByTagName("input")[0],v.secondElement.value=o(v.latestSelectedDateObj?v.latestSelectedDateObj.getSeconds():v.config.defaultSeconds),v.secondElement.setAttribute("step",v.minuteElement.getAttribute("step")),v.secondElement.setAttribute("min","0"),v.secondElement.setAttribute("max","59"),v.timeContainer.appendChild(c("span","flatpickr-time-separator",":")),v.timeContainer.appendChild(r)}return v.config.time_24hr||(v.amPM=c("span","flatpickr-am-pm",v.l10n.amPM[i((v.latestSelectedDateObj?v.hourElement.value:v.config.defaultHour)>11)]),v.amPM.title=v.l10n.toggleTitle,v.amPM.tabIndex=-1,v.timeContainer.appendChild(v.amPM)),v.timeContainer}()),l(v.calendarContainer,"rangeMode","range"===v.config.mode),l(v.calendarContainer,"animate",!0===v.config.animate),l(v.calendarContainer,"multiMonth",v.config.showMonths>1),v.calendarContainer.appendChild(e);var a=void 0!==v.config.appendTo&&void 0!==v.config.appendTo.nodeType;if((v.config.inline||v.config.static)&&(v.calendarContainer.classList.add(v.config.inline?"inline":"static"),v.config.inline&&(!a&&v.element.parentNode?v.element.parentNode.insertBefore(v.calendarContainer,v._input.nextSibling):void 0!==v.config.appendTo&&v.config.appendTo.appendChild(v.calendarContainer)),v.config.static)){var s=c("div","flatpickr-wrapper");v.element.parentNode&&v.element.parentNode.insertBefore(s,v.element),s.appendChild(v.element),v.altInput&&s.appendChild(v.altInput),s.appendChild(v.calendarContainer)}v.config.static||v.config.inline||(void 0!==v.config.appendTo?v.config.appendTo:window.document.body).appendChild(v.calendarContainer)}(),function(){if(v.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(v.element.querySelectorAll("[data-"+e+"]"),(function(t){return R(t,"click",v[e])}))})),v.isMobile)!function(){var e=v.config.enableTime?v.config.noCalendar?"time":"datetime-local":"date";v.mobileInput=c("input",v.input.className+" flatpickr-mobile"),v.mobileInput.step=v.input.getAttribute("step")||"any",v.mobileInput.tabIndex=1,v.mobileInput.type=e,v.mobileInput.disabled=v.input.disabled,v.mobileInput.required=v.input.required,v.mobileInput.placeholder=v.input.placeholder,v.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",v.selectedDates.length>0&&(v.mobileInput.defaultValue=v.mobileInput.value=v.formatDate(v.selectedDates[0],v.mobileFormatStr)),v.config.minDate&&(v.mobileInput.min=v.formatDate(v.config.minDate,"Y-m-d")),v.config.maxDate&&(v.mobileInput.max=v.formatDate(v.config.maxDate,"Y-m-d")),v.input.type="hidden",void 0!==v.altInput&&(v.altInput.type="hidden");try{v.input.parentNode&&v.input.parentNode.insertBefore(v.mobileInput,v.input.nextSibling)}catch(e){}R(v.mobileInput,"change",(function(e){v.setDate(e.target.value,!1,v.mobileFormatStr),fe("onChange"),fe("onClose")}))}();else{var e=a(te,50);v._debouncedChange=a(I,300),v.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&R(v.daysContainer,"mouseover",(function(e){"range"===v.config.mode&&ee(e.target)})),R(window.document.body,"keydown",$),v.config.inline||v.config.static||R(window,"resize",e),void 0!==window.ontouchstart?R(window.document,"touchstart",Z):R(window.document,"mousedown",_(Z)),R(window.document,"focus",Z,{capture:!0}),!0===v.config.clickOpens&&(R(v._input,"focus",v.open),R(v._input,"mousedown",_(v.open))),void 0!==v.daysContainer&&(R(v.monthNav,"mousedown",_(ye)),R(v.monthNav,["keyup","increment"],T),R(v.daysContainer,"mousedown",_(le))),void 0!==v.timeContainer&&void 0!==v.minuteElement&&void 0!==v.hourElement&&(R(v.timeContainer,["increment"],C),R(v.timeContainer,"blur",C,{capture:!0}),R(v.timeContainer,"mousedown",_(O)),R([v.hourElement,v.minuteElement],["focus","click"],(function(e){return e.target.select()})),void 0!==v.secondElement&&R(v.secondElement,"focus",(function(){return v.secondElement&&v.secondElement.select()})),void 0!==v.amPM&&R(v.amPM,"mousedown",_((function(e){C(e),I()}))))}}(),(v.selectedDates.length||v.config.noCalendar)&&(v.config.enableTime&&x(v.config.noCalendar?v.latestSelectedDateObj||v.config.minDate:void 0),me(!1)),E(),v.showTimeInput=v.selectedDates.length>0||v.config.noCalendar;var r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!v.isMobile&&r&&ie(),fe("onReady")}(),v}function E(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),r=[],o=0;o */\n\n.fc-not-allowed,\n.fc-not-allowed .fc-event { /* override events\' custom cursors */\n cursor: not-allowed;\n}\n\n.fc-unselectable {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.fc {\n /* layout of immediate children */\n display: flex;\n flex-direction: column;\n\n font-size: 1em\n}\n.fc,\n .fc *,\n .fc *:before,\n .fc *:after {\n box-sizing: border-box;\n }\n.fc table {\n border-collapse: collapse;\n border-spacing: 0;\n font-size: 1em; /* normalize cross-browser */\n }\n.fc th {\n text-align: center;\n }\n.fc th,\n .fc td {\n vertical-align: top;\n padding: 0;\n }\n.fc a[data-navlink] {\n cursor: pointer;\n }\n.fc a[data-navlink]:hover {\n text-decoration: underline;\n }\n.fc-direction-ltr {\n direction: ltr;\n text-align: left;\n}\n.fc-direction-rtl {\n direction: rtl;\n text-align: right;\n}\n.fc-theme-standard td,\n .fc-theme-standard th {\n border: 1px solid #ddd;\n border: 1px solid var(--fc-border-color, #ddd);\n }\n/* for FF, which doesn\'t expand a 100% div within a table cell. use absolute positioning */\n/* inner-wrappers are responsible for being absolute */\n/* TODO: best place for this? */\n.fc-liquid-hack td,\n .fc-liquid-hack th {\n position: relative;\n }\n\n@font-face {\n font-family: \'fcicons\';\n src: url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format(\'truetype\');\n font-weight: normal;\n font-style: normal;\n}\n\n.fc-icon {\n /* added for fc */\n display: inline-block;\n width: 1em;\n height: 1em;\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: \'fcicons\' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.fc-icon-chevron-left:before {\n content: "\\e900";\n}\n\n.fc-icon-chevron-right:before {\n content: "\\e901";\n}\n\n.fc-icon-chevrons-left:before {\n content: "\\e902";\n}\n\n.fc-icon-chevrons-right:before {\n content: "\\e903";\n}\n\n.fc-icon-minus-square:before {\n content: "\\e904";\n}\n\n.fc-icon-plus-square:before {\n content: "\\e905";\n}\n\n.fc-icon-x:before {\n content: "\\e906";\n}\n/*\nLots taken from Flatly (MIT): https://bootswatch.com/4/flatly/bootstrap.css\n\nThese styles only apply when the standard-theme is activated.\nWhen it\'s NOT activated, the fc-button classes won\'t even be in the DOM.\n*/\n.fc {\n\n /* reset */\n\n}\n.fc .fc-button {\n border-radius: 0;\n overflow: visible;\n text-transform: none;\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n }\n.fc .fc-button:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n }\n.fc .fc-button {\n -webkit-appearance: button;\n }\n.fc .fc-button:not(:disabled) {\n cursor: pointer;\n }\n.fc .fc-button::-moz-focus-inner {\n padding: 0;\n border-style: none;\n }\n.fc {\n\n /* theme */\n\n}\n.fc .fc-button {\n display: inline-block;\n font-weight: 400;\n text-align: center;\n vertical-align: middle;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-color: transparent;\n border: 1px solid transparent;\n padding: 0.4em 0.65em;\n font-size: 1em;\n line-height: 1.5;\n border-radius: 0.25em;\n }\n.fc .fc-button:hover {\n text-decoration: none;\n }\n.fc .fc-button:focus {\n outline: 0;\n box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);\n }\n.fc .fc-button:disabled {\n opacity: 0.65;\n }\n.fc {\n\n /* "primary" coloring */\n\n}\n.fc .fc-button-primary {\n color: #fff;\n color: var(--fc-button-text-color, #fff);\n background-color: #2C3E50;\n background-color: var(--fc-button-bg-color, #2C3E50);\n border-color: #2C3E50;\n border-color: var(--fc-button-border-color, #2C3E50);\n }\n.fc .fc-button-primary:hover {\n color: #fff;\n color: var(--fc-button-text-color, #fff);\n background-color: #1e2b37;\n background-color: var(--fc-button-hover-bg-color, #1e2b37);\n border-color: #1a252f;\n border-color: var(--fc-button-hover-border-color, #1a252f);\n }\n.fc .fc-button-primary:disabled { /* not DRY */\n color: #fff;\n color: var(--fc-button-text-color, #fff);\n background-color: #2C3E50;\n background-color: var(--fc-button-bg-color, #2C3E50);\n border-color: #2C3E50;\n border-color: var(--fc-button-border-color, #2C3E50); /* overrides :hover */\n }\n.fc .fc-button-primary:focus {\n box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);\n }\n.fc .fc-button-primary:not(:disabled):active,\n .fc .fc-button-primary:not(:disabled).fc-button-active {\n color: #fff;\n color: var(--fc-button-text-color, #fff);\n background-color: #1a252f;\n background-color: var(--fc-button-active-bg-color, #1a252f);\n border-color: #151e27;\n border-color: var(--fc-button-active-border-color, #151e27);\n }\n.fc .fc-button-primary:not(:disabled):active:focus,\n .fc .fc-button-primary:not(:disabled).fc-button-active:focus {\n box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);\n }\n.fc {\n\n /* icons within buttons */\n\n}\n.fc .fc-button .fc-icon {\n vertical-align: middle;\n font-size: 1.5em; /* bump up the size (but don\'t make it bigger than line-height of button, which is 1.5em also) */\n }\n.fc .fc-button-group {\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n }\n.fc .fc-button-group > .fc-button {\n position: relative;\n flex: 1 1 auto;\n }\n.fc .fc-button-group > .fc-button:hover {\n z-index: 1;\n }\n.fc .fc-button-group > .fc-button:focus,\n .fc .fc-button-group > .fc-button:active,\n .fc .fc-button-group > .fc-button.fc-button-active {\n z-index: 1;\n }\n.fc-direction-ltr .fc-button-group > .fc-button:not(:first-child) {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n.fc-direction-ltr .fc-button-group > .fc-button:not(:last-child) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n.fc-direction-rtl .fc-button-group > .fc-button:not(:first-child) {\n margin-right: -1px;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n.fc-direction-rtl .fc-button-group > .fc-button:not(:last-child) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n.fc .fc-toolbar {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n.fc .fc-toolbar.fc-header-toolbar {\n margin-bottom: 1.5em;\n }\n.fc .fc-toolbar.fc-footer-toolbar {\n margin-top: 1.5em;\n }\n.fc .fc-toolbar-title {\n font-size: 1.75em;\n margin: 0;\n }\n.fc-direction-ltr .fc-toolbar > * > :not(:first-child) {\n margin-left: .75em; /* space between */\n }\n.fc-direction-rtl .fc-toolbar > * > :not(:first-child) {\n margin-right: .75em; /* space between */\n }\n.fc-direction-rtl .fc-toolbar-ltr { /* when the toolbar-chunk positioning system is explicitly left-to-right */\n flex-direction: row-reverse;\n }\n.fc .fc-scroller {\n -webkit-overflow-scrolling: touch;\n position: relative; /* for abs-positioned elements within */\n }\n.fc .fc-scroller-liquid {\n height: 100%;\n }\n.fc .fc-scroller-liquid-absolute {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n }\n.fc .fc-scroller-harness {\n position: relative;\n overflow: hidden;\n direction: ltr;\n /* hack for chrome computing the scroller\'s right/left wrong for rtl. undone below... */\n /* TODO: demonstrate in codepen */\n }\n.fc .fc-scroller-harness-liquid {\n height: 100%;\n }\n.fc-direction-rtl .fc-scroller-harness > .fc-scroller { /* undo above hack */\n direction: rtl;\n }\n.fc-theme-standard .fc-scrollgrid {\n border: 1px solid #ddd;\n border: 1px solid var(--fc-border-color, #ddd); /* bootstrap does this. match */\n }\n.fc .fc-scrollgrid,\n .fc .fc-scrollgrid table { /* all tables (self included) */\n width: 100%; /* because tables don\'t normally do this */\n table-layout: fixed;\n }\n.fc .fc-scrollgrid table { /* inner tables */\n border-top-style: hidden;\n border-left-style: hidden;\n border-right-style: hidden;\n }\n.fc .fc-scrollgrid > tbody table,\n .fc .fc-scrollgrid > tfoot table {\n border-bottom-style: hidden; /* head keeps its bottom border tho */\n }\n.fc .fc-scrollgrid {\n\n border-collapse: separate;\n border-right-width: 0;\n border-bottom-width: 0\n }\n.fc .fc-scrollgrid > * > tr > * {\n border-top-width: 0;\n border-left-width: 0;\n }\n.fc .fc-scrollgrid > thead > tr > *,\n .fc .fc-scrollgrid > tfoot > tr > * {\n border-bottom-width: 0;\n }\n.fc .fc-scrollgrid-liquid {\n height: 100%;\n }\n.fc .fc-scrollgrid-section { /* a */\n height: 0\n\n }\n.fc .fc-scrollgrid-section > td {\n height: 0; /* needs a height so inner div within grow */\n }\n.fc .fc-scrollgrid-section table {\n height: 1px;\n /* for most browsers, if a height isn\'t set on the table, can\'t do liquid-height within cells */\n /* serves as a min-height. harmless */\n }\n.fc .fc-scrollgrid-section-liquid {\n height: auto\n\n }\n.fc .fc-scrollgrid-section-liquid > td {\n height: 100%; /* FF needs this instead of auto */\n }\n.fc {\n\n /* stickiness */\n\n}\n.fc .fc-scrollgrid-section-sticky > * {\n background: #fff;\n background: var(--fc-page-bg-color, #fff);\n position: -webkit-sticky;\n position: sticky;\n z-index: 2; /* TODO: var */\n /* TODO: box-shadow when sticking */\n }\n.fc .fc-scrollgrid > thead > .fc-scrollgrid-section-sticky > * {\n top: 0; /* because border-sharing causes a gap at the top */\n /* TODO: give safari -1. has bug */\n }\n.fc .fc-scrollgrid > tfoot > .fc-scrollgrid-section-sticky > * {\n bottom: 0; /* known bug: bottom-stickiness doesn\'t work in safari */\n }\n.fc .fc-scrollgrid-sticky-shim { /* for horizontal scrollbar */\n height: 1px; /* needs height to create scrollbars */\n margin-bottom: -1px;\n }\n.fc .fc-sticky {\n position: -webkit-sticky;\n position: sticky;\n }\n.fc .fc-view-harness {\n flex-grow: 1; /* because this harness is WITHIN the .fc\'s flexbox */\n position: relative;\n }\n.fc {\n\n /* when the harness controls the height, make the view liquid */\n\n}\n.fc .fc-view-harness-active > .fc-view {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n.fc .fc-col-header-cell-cushion {\n display: inline-block; /* x-browser for when sticky (when multi-tier header) */\n padding: 2px 4px;\n }\n.fc .fc-bg-event,\n .fc .fc-non-business,\n .fc .fc-highlight {\n /* will always have a harness with position:relative/absolute, so absolutely expand */\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n.fc .fc-non-business {\n background: rgba(215, 215, 215, 0.3);\n background: var(--fc-non-business-color, rgba(215, 215, 215, 0.3));\n }\n.fc .fc-bg-event {\n background: rgb(143, 223, 130);\n background: var(--fc-bg-event-color, rgb(143, 223, 130));\n opacity: 0.3;\n opacity: var(--fc-bg-event-opacity, 0.3)\n }\n.fc .fc-bg-event .fc-event-title {\n margin: .5em;\n font-size: .85em;\n font-size: var(--fc-small-font-size, .85em);\n font-style: italic;\n }\n.fc .fc-highlight {\n background: rgba(188, 232, 241, 0.3);\n background: var(--fc-highlight-color, rgba(188, 232, 241, 0.3));\n }\n.fc .fc-cell-shaded,\n .fc .fc-day-disabled {\n background: rgba(208, 208, 208, 0.3);\n background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\n }\n/* link resets */\n/* ---------------------------------------------------------------------------------------------------- */\na.fc-event,\na.fc-event:hover {\n text-decoration: none;\n}\n/* cursor */\n.fc-event[href],\n.fc-event.fc-event-draggable {\n cursor: pointer;\n}\n/* event text content */\n/* ---------------------------------------------------------------------------------------------------- */\n.fc-event .fc-event-main {\n position: relative;\n z-index: 2;\n }\n/* dragging */\n/* ---------------------------------------------------------------------------------------------------- */\n.fc-event-dragging:not(.fc-event-selected) { /* MOUSE */\n opacity: 0.75;\n }\n.fc-event-dragging.fc-event-selected { /* TOUCH */\n box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);\n }\n/* resizing */\n/* ---------------------------------------------------------------------------------------------------- */\n/* (subclasses should hone positioning for touch and non-touch) */\n.fc-event .fc-event-resizer {\n display: none;\n position: absolute;\n z-index: 4;\n }\n.fc-event:hover, /* MOUSE */\n.fc-event-selected { /* TOUCH */\n\n}\n.fc-event:hover .fc-event-resizer, .fc-event-selected .fc-event-resizer {\n display: block;\n }\n.fc-event-selected .fc-event-resizer {\n border-radius: 4px;\n border-radius: calc(var(--fc-event-resizer-dot-total-width, 8px) / 2);\n border-width: 1px;\n border-width: var(--fc-event-resizer-dot-border-width, 1px);\n width: 8px;\n width: var(--fc-event-resizer-dot-total-width, 8px);\n height: 8px;\n height: var(--fc-event-resizer-dot-total-width, 8px);\n border-style: solid;\n border-color: inherit;\n background: #fff;\n background: var(--fc-page-bg-color, #fff)\n\n /* expand hit area */\n\n }\n.fc-event-selected .fc-event-resizer:before {\n content: \'\';\n position: absolute;\n top: -20px;\n left: -20px;\n right: -20px;\n bottom: -20px;\n }\n/* selecting (always TOUCH) */\n/* ---------------------------------------------------------------------------------------------------- */\n.fc-event-selected {\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2)\n\n /* expand hit area (subclasses should expand) */\n\n}\n.fc-event-selected:before {\n content: "";\n position: absolute;\n z-index: 3;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n.fc-event-selected {\n\n /* dimmer effect */\n\n}\n.fc-event-selected:after {\n content: "";\n background: rgba(0, 0, 0, 0.25);\n background: var(--fc-event-selected-overlay-color, rgba(0, 0, 0, 0.25));\n position: absolute;\n z-index: 1;\n\n /* assume there\'s a border on all sides. overcome it. */\n /* sometimes there\'s NOT a border, in which case the dimmer will go over */\n /* an adjacent border, which looks fine. */\n top: -1px;\n left: -1px;\n right: -1px;\n bottom: -1px;\n }\n/*\nA HORIZONTAL event\n*/\n.fc-h-event { /* allowed to be top-level */\n display: block;\n border: 1px solid #3788d8;\n border: 1px solid var(--fc-event-bg-color, #3788d8);\n background-color: #3788d8;\n background-color: var(--fc-event-border-color, #3788d8)\n\n}\n.fc-h-event .fc-event-main {\n color: #fff;\n color: var(--fc-event-text-color, #fff);\n }\n.fc-h-event .fc-event-main-frame {\n display: flex; /* for make fc-event-title-container expand */\n }\n.fc-h-event .fc-event-time {\n max-width: 100%; /* clip overflow on this element */\n overflow: hidden;\n }\n.fc-h-event .fc-event-title-container { /* serves as a container for the sticky cushion */\n flex-grow: 1;\n flex-shrink: 1;\n min-width: 0; /* important for allowing to shrink all the way */\n }\n.fc-h-event .fc-event-title {\n display: inline-block; /* need this to be sticky cross-browser */\n vertical-align: top; /* for not messing up line-height */\n left: 0; /* for sticky */\n right: 0; /* for sticky */\n max-width: 100%; /* clip overflow on this element */\n overflow: hidden;\n }\n.fc-h-event.fc-event-selected:before {\n /* expand hit area */\n top: -10px;\n bottom: -10px;\n }\n/* adjust border and border-radius (if there is any) for non-start/end */\n.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),\n.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-left-width: 0;\n}\n.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),\n.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right-width: 0;\n}\n/* resizers */\n.fc-h-event:not(.fc-event-selected) .fc-event-resizer {\n top: 0;\n bottom: 0;\n width: 8px;\n width: var(--fc-event-resizer-thickness, 8px);\n}\n.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,\n.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end {\n cursor: w-resize;\n left: -4px;\n left: calc(var(--fc-event-resizer-thickness, 8px) / -2);\n}\n.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,\n.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start {\n cursor: e-resize;\n right: -4px;\n right: calc(var(--fc-event-resizer-thickness, 8px) / -2);\n}\n/* resizers for TOUCH */\n.fc-h-event.fc-event-selected .fc-event-resizer {\n top: 50%;\n margin-top: -4px;\n margin-top: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);\n}\n.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,\n.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end {\n left: -4px;\n left: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);\n}\n.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,\n.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start {\n right: -4px;\n right: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);\n}\n',""]),e.exports=t},function(e,t,n){var r=n(6),o=n(27);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},function(e,t,n){(t=n(7)(!1)).push([e.i,'\n:root {\n --fc-daygrid-event-dot-width: 8px;\n}\n.fc .fc-popover {\n position: fixed;\n top: 0; /* for when not positioned yet */\n box-shadow: 0 2px 6px rgba(0,0,0,.15);\n }\n.fc .fc-popover-header {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 3px 4px;\n }\n.fc .fc-popover-title {\n margin: 0 2px;\n }\n.fc .fc-popover-close {\n cursor: pointer;\n opacity: 0.65;\n font-size: 1.1em;\n }\n.fc-theme-standard .fc-popover {\n border: 1px solid #ddd;\n border: 1px solid var(--fc-border-color, #ddd);\n background: #fff;\n background: var(--fc-page-bg-color, #fff);\n }\n.fc-theme-standard .fc-popover-header {\n background: rgba(208, 208, 208, 0.3);\n background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\n }\n/* help things clear margins of inner content */\n.fc-daygrid-day-frame,\n.fc-daygrid-day-events,\n.fc-daygrid-event-harness { /* for event top/bottom margins */\n}\n.fc-daygrid-day-frame:before, .fc-daygrid-day-events:before, .fc-daygrid-event-harness:before {\n content: "";\n clear: both;\n display: table; }\n.fc-daygrid-day-frame:after, .fc-daygrid-day-events:after, .fc-daygrid-event-harness:after {\n content: "";\n clear: both;\n display: table; }\n.fc .fc-daygrid-body { /* a
that wraps the table */\n position: relative;\n z-index: 1; /* container inner z-index\'s because s can\'t do it */\n }\n.fc .fc-daygrid-day.fc-day-today {\n background-color: rgba(255, 220, 40, 0.15);\n background-color: var(--fc-today-bg-color, rgba(255, 220, 40, 0.15));\n }\n.fc .fc-daygrid-day-frame {\n position: relative;\n min-height: 100%; /* seems to work better than `height` because sets height after rows/cells naturally do it */\n }\n.fc {\n\n /* cell top */\n\n}\n.fc .fc-daygrid-day-top {\n position: relative;\n z-index: 4;\n display: flex;\n flex-direction: row-reverse;\n }\n.fc .fc-day-other .fc-daygrid-day-top {\n opacity: 0.3;\n }\n.fc {\n\n /* day number (within cell top) */\n\n}\n.fc .fc-daygrid-day-number {\n padding: 4px;\n }\n.fc {\n\n /* event container */\n\n}\n.fc .fc-daygrid-day-events {\n margin-top: 1px; /* needs to be margin, not padding, so that available cell height can be computed */\n }\n.fc {\n\n /* positioning for balanced vs natural */\n\n}\n.fc .fc-daygrid-body-balanced .fc-daygrid-day-events {\n position: absolute;\n left: 0;\n right: 0;\n }\n.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events {\n position: relative; /* for containing abs positioned event harnesses */\n min-height: 2em; /* in addition to being a min-height during natural height, equalizes the heights a little bit */\n }\n.fc .fc-daygrid-body-natural { /* can coexist with -unbalanced */\n }\n.fc .fc-daygrid-body-natural .fc-daygrid-day-events {\n margin-bottom: 1em;\n }\n.fc {\n\n /* event harness */\n\n}\n.fc .fc-daygrid-event-harness {\n position: relative;\n }\n.fc .fc-daygrid-event-harness-abs {\n position: absolute;\n top: 0; /* fallback coords for when cannot yet be computed */\n left: 0; /* */\n right: 0; /* */\n }\n.fc .fc-daygrid-bg-harness {\n position: absolute;\n top: 0;\n bottom: 0;\n }\n.fc {\n\n /* bg content */\n\n}\n.fc .fc-daygrid-day-bg .fc-non-business { z-index: 1 }\n.fc .fc-daygrid-day-bg .fc-bg-event { z-index: 2 }\n.fc .fc-daygrid-day-bg .fc-highlight { z-index: 3 }\n.fc {\n\n /* events */\n\n}\n.fc .fc-daygrid-event {\n z-index: 6;\n margin-top: 1px;\n }\n.fc .fc-daygrid-event.fc-event-mirror {\n z-index: 7;\n }\n.fc {\n\n /* cell bottom (within day-events) */\n\n}\n.fc .fc-daygrid-day-bottom {\n position: relative;\n z-index: 4;\n font-size: .85em;\n margin: 2px 3px 0;\n }\n.fc .fc-daygrid-more-link {\n cursor: pointer;\n }\n.fc {\n\n /* week number (within frame) */\n\n}\n.fc .fc-daygrid-week-number {\n position: absolute;\n z-index: 5;\n top: 0;\n padding: 2px;\n min-width: 1.5em;\n text-align: center;\n background-color: rgba(208, 208, 208, 0.3);\n background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\n color: #808080;\n color: var(--fc-neutral-text-color, #808080);\n }\n.fc {\n\n /* popover */\n\n}\n.fc .fc-more-popover {\n z-index: 8;\n }\n.fc .fc-more-popover .fc-popover-body {\n min-width: 220px;\n padding: 10px;\n }\n.fc-direction-ltr .fc-daygrid-event.fc-event-start,\n.fc-direction-rtl .fc-daygrid-event.fc-event-end {\n margin-left: 2px;\n}\n.fc-direction-ltr .fc-daygrid-event.fc-event-end,\n.fc-direction-rtl .fc-daygrid-event.fc-event-start {\n margin-right: 2px;\n}\n.fc-direction-ltr .fc-daygrid-week-number {\n left: 0;\n border-radius: 0 0 3px 0;\n }\n.fc-direction-rtl .fc-daygrid-week-number {\n right: 0;\n border-radius: 0 0 0 3px;\n }\n.fc-liquid-hack .fc-daygrid-day-frame {\n position: static; /* will cause inner absolute stuff to expand to */\n }\n.fc-daygrid-event { /* make root-level, because will be dragged-and-dropped outside of a component root */\n position: relative; /* for z-indexes assigned later */\n white-space: nowrap;\n border-radius: 3px; /* dot event needs this to when selected */\n font-size: .85em;\n font-size: var(--fc-small-font-size, .85em);\n}\n/* --- the rectangle ("block") style of event --- */\n.fc-daygrid-block-event .fc-event-time {\n font-weight: bold;\n }\n.fc-daygrid-block-event .fc-event-time,\n .fc-daygrid-block-event .fc-event-title {\n padding: 1px;\n }\n/* --- the dot style of event --- */\n.fc-daygrid-dot-event {\n display: block;\n padding: 2px 0;\n overflow: hidden\n\n}\n.fc-daygrid-dot-event .fc-event-title {\n font-weight: bold;\n }\n.fc-daygrid-dot-event .fc-event-time,\n .fc-daygrid-dot-event .fc-event-title {\n display: inline-block; /* better than inline, for sitting next to dot */\n }\n.fc-daygrid-dot-event:hover,\n .fc-daygrid-dot-event.fc-event-mirror {\n background: rgba(0, 0, 0, 0.1);\n }\n.fc-daygrid-event-dot { /* the actual dot */\n display: inline-block;\n margin: 0 4px;\n box-sizing: content-box;\n width: 0;\n height: 0;\n border: 4px solid #3788d8;\n border: calc(var(--fc-daygrid-event-dot-width, 8px) / 2) solid var(--fc-event-border-color, #3788d8);\n border-radius: 4px;\n border-radius: calc(var(--fc-daygrid-event-dot-width, 8px) / 2);\n}\n/* --- spacing between time and title --- */\n.fc-direction-ltr .fc-daygrid-event .fc-event-time {\n margin-right: 3px;\n }\n.fc-direction-rtl .fc-daygrid-event .fc-event-time {\n margin-left: 3px;\n }\n',""]),e.exports=t},function(e,t,n){var r=n(6),o=n(29);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},function(e,t,n){(t=n(7)(!1)).push([e.i,'\n:root {\n --fc-list-event-dot-width: 10px;\n --fc-list-event-hover-bg-color: #f5f5f5;\n}\n.fc-theme-standard .fc-list {\n border: 1px solid #ddd;\n border: 1px solid var(--fc-border-color, #ddd);\n }\n.fc {\n\n /* message when no events */\n\n}\n.fc .fc-list-empty {\n background-color: rgba(208, 208, 208, 0.3);\n background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center; /* vertically aligns fc-list-empty-inner */\n }\n.fc .fc-list-empty-cushion {\n margin: 5em 0;\n }\n.fc {\n\n /* table within the scroller */\n /* ---------------------------------------------------------------------------------------------------- */\n\n}\n.fc .fc-list-table {\n width: 100%;\n border-style: hidden; /* kill outer border on theme */\n }\n.fc .fc-list-table tr > * {\n border-left: 0;\n border-right: 0;\n }\n.fc .fc-list-sticky .fc-list-day > * { /* the cells */\n position: -webkit-sticky;\n position: sticky;\n top: 0;\n background: #fff;\n background: var(--fc-page-bg-color, #fff); /* for when headers are styled to be transparent and sticky */\n }\n.fc .fc-list-table th {\n padding: 0; /* uses an inner-wrapper instead... */\n }\n.fc .fc-list-table td,\n .fc .fc-list-day-cushion {\n padding: 8px 14px;\n }\n.fc {\n\n\n /* date heading rows */\n /* ---------------------------------------------------------------------------------------------------- */\n\n}\n.fc .fc-list-day-cushion:after {\n content: "";\n clear: both;\n display: table; /* clear floating */\n }\n.fc-theme-standard .fc-list-day-cushion {\n background-color: rgba(208, 208, 208, 0.3);\n background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\n }\n.fc-direction-ltr .fc-list-day-text,\n.fc-direction-rtl .fc-list-day-side-text {\n float: left;\n}\n.fc-direction-ltr .fc-list-day-side-text,\n.fc-direction-rtl .fc-list-day-text {\n float: right;\n}\n/* make the dot closer to the event title */\n.fc-direction-ltr .fc-list-table .fc-list-event-graphic { padding-right: 0 }\n.fc-direction-rtl .fc-list-table .fc-list-event-graphic { padding-left: 0 }\n.fc .fc-list-event.fc-event-forced-url {\n cursor: pointer; /* whole row will seem clickable */\n }\n.fc .fc-list-event:hover td {\n background-color: #f5f5f5;\n background-color: var(--fc-list-event-hover-bg-color, #f5f5f5);\n }\n.fc {\n\n /* shrink certain cols */\n\n}\n.fc .fc-list-event-graphic,\n .fc .fc-list-event-time {\n white-space: nowrap;\n width: 1px;\n }\n.fc .fc-list-event-dot {\n display: inline-block;\n box-sizing: content-box;\n width: 0;\n height: 0;\n border: 5px solid #3788d8;\n border: calc(var(--fc-list-event-dot-width, 10px) / 2) solid var(--fc-event-border-color, #3788d8);\n border-radius: 5px;\n border-radius: calc(var(--fc-list-event-dot-width, 10px) / 2);\n }\n.fc {\n\n /* reset styling */\n\n}\n.fc .fc-list-event-title a {\n color: inherit;\n text-decoration: none;\n }\n.fc {\n\n /* underline link when hovering over any part of row */\n\n}\n.fc .fc-list-event.fc-event-forced-url:hover a {\n text-decoration: underline;\n }\n',""]),e.exports=t},function(e,t){e.exports=flarum.core.compat["models/User"]},function(e,t,n){var r=n(6),o=n(32);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},function(e,t,n){(t=n(7)(!1)).push([e.i,'.flatpickr-calendar {\n background: transparent;\n opacity: 0;\n display: none;\n text-align: center;\n visibility: hidden;\n padding: 0;\n -webkit-animation: none;\n animation: none;\n direction: ltr;\n border: 0;\n font-size: 14px;\n line-height: 24px;\n border-radius: 5px;\n position: absolute;\n width: 307.875px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n background: #fff;\n -webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);\n box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);\n}\n.flatpickr-calendar.open,\n.flatpickr-calendar.inline {\n opacity: 1;\n max-height: 640px;\n visibility: visible;\n}\n.flatpickr-calendar.open {\n display: inline-block;\n z-index: 99999;\n}\n.flatpickr-calendar.animate.open {\n -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);\n animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.flatpickr-calendar.inline {\n display: block;\n position: relative;\n top: 2px;\n}\n.flatpickr-calendar.static {\n position: absolute;\n top: calc(100% + 2px);\n}\n.flatpickr-calendar.static.open {\n z-index: 999;\n display: block;\n}\n.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n}\n.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {\n -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n}\n.flatpickr-calendar .hasWeeks .dayContainer,\n.flatpickr-calendar .hasTime .dayContainer {\n border-bottom: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.flatpickr-calendar .hasWeeks .dayContainer {\n border-left: 0;\n}\n.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {\n height: 40px;\n border-top: 1px solid #e6e6e6;\n}\n.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {\n height: auto;\n}\n.flatpickr-calendar:before,\n.flatpickr-calendar:after {\n position: absolute;\n display: block;\n pointer-events: none;\n border: solid transparent;\n content: \'\';\n height: 0;\n width: 0;\n left: 22px;\n}\n.flatpickr-calendar.rightMost:before,\n.flatpickr-calendar.rightMost:after {\n left: auto;\n right: 22px;\n}\n.flatpickr-calendar:before {\n border-width: 5px;\n margin: 0 -5px;\n}\n.flatpickr-calendar:after {\n border-width: 4px;\n margin: 0 -4px;\n}\n.flatpickr-calendar.arrowTop:before,\n.flatpickr-calendar.arrowTop:after {\n bottom: 100%;\n}\n.flatpickr-calendar.arrowTop:before {\n border-bottom-color: #e6e6e6;\n}\n.flatpickr-calendar.arrowTop:after {\n border-bottom-color: #fff;\n}\n.flatpickr-calendar.arrowBottom:before,\n.flatpickr-calendar.arrowBottom:after {\n top: 100%;\n}\n.flatpickr-calendar.arrowBottom:before {\n border-top-color: #e6e6e6;\n}\n.flatpickr-calendar.arrowBottom:after {\n border-top-color: #fff;\n}\n.flatpickr-calendar:focus {\n outline: 0;\n}\n.flatpickr-wrapper {\n position: relative;\n display: inline-block;\n}\n.flatpickr-months {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n.flatpickr-months .flatpickr-month {\n background: transparent;\n color: rgba(0,0,0,0.9);\n fill: rgba(0,0,0,0.9);\n height: 34px;\n line-height: 1;\n text-align: center;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.flatpickr-months .flatpickr-prev-month,\n.flatpickr-months .flatpickr-next-month {\n text-decoration: none;\n cursor: pointer;\n position: absolute;\n top: 0;\n height: 34px;\n padding: 10px;\n z-index: 3;\n color: rgba(0,0,0,0.9);\n fill: rgba(0,0,0,0.9);\n}\n.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,\n.flatpickr-months .flatpickr-next-month.flatpickr-disabled {\n display: none;\n}\n.flatpickr-months .flatpickr-prev-month i,\n.flatpickr-months .flatpickr-next-month i {\n position: relative;\n}\n.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,\n.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {\n/*\n /*rtl:begin:ignore*/\n/*\n */\n left: 0;\n/*\n /*rtl:end:ignore*/\n/*\n */\n}\n/*\n /*rtl:begin:ignore*/\n/*\n /*rtl:end:ignore*/\n.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,\n.flatpickr-months .flatpickr-next-month.flatpickr-next-month {\n/*\n /*rtl:begin:ignore*/\n/*\n */\n right: 0;\n/*\n /*rtl:end:ignore*/\n/*\n */\n}\n/*\n /*rtl:begin:ignore*/\n/*\n /*rtl:end:ignore*/\n.flatpickr-months .flatpickr-prev-month:hover,\n.flatpickr-months .flatpickr-next-month:hover {\n color: #959ea9;\n}\n.flatpickr-months .flatpickr-prev-month:hover svg,\n.flatpickr-months .flatpickr-next-month:hover svg {\n fill: #f64747;\n}\n.flatpickr-months .flatpickr-prev-month svg,\n.flatpickr-months .flatpickr-next-month svg {\n width: 14px;\n height: 14px;\n}\n.flatpickr-months .flatpickr-prev-month svg path,\n.flatpickr-months .flatpickr-next-month svg path {\n -webkit-transition: fill 0.1s;\n transition: fill 0.1s;\n fill: inherit;\n}\n.numInputWrapper {\n position: relative;\n height: auto;\n}\n.numInputWrapper input,\n.numInputWrapper span {\n display: inline-block;\n}\n.numInputWrapper input {\n width: 100%;\n}\n.numInputWrapper input::-ms-clear {\n display: none;\n}\n.numInputWrapper input::-webkit-outer-spin-button,\n.numInputWrapper input::-webkit-inner-spin-button {\n margin: 0;\n -webkit-appearance: none;\n}\n.numInputWrapper span {\n position: absolute;\n right: 0;\n width: 14px;\n padding: 0 4px 0 2px;\n height: 50%;\n line-height: 50%;\n opacity: 0;\n cursor: pointer;\n border: 1px solid rgba(57,57,57,0.15);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.numInputWrapper span:hover {\n background: rgba(0,0,0,0.1);\n}\n.numInputWrapper span:active {\n background: rgba(0,0,0,0.2);\n}\n.numInputWrapper span:after {\n display: block;\n content: "";\n position: absolute;\n}\n.numInputWrapper span.arrowUp {\n top: 0;\n border-bottom: 0;\n}\n.numInputWrapper span.arrowUp:after {\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-bottom: 4px solid rgba(57,57,57,0.6);\n top: 26%;\n}\n.numInputWrapper span.arrowDown {\n top: 50%;\n}\n.numInputWrapper span.arrowDown:after {\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 4px solid rgba(57,57,57,0.6);\n top: 40%;\n}\n.numInputWrapper span svg {\n width: inherit;\n height: auto;\n}\n.numInputWrapper span svg path {\n fill: rgba(0,0,0,0.5);\n}\n.numInputWrapper:hover {\n background: rgba(0,0,0,0.05);\n}\n.numInputWrapper:hover span {\n opacity: 1;\n}\n.flatpickr-current-month {\n font-size: 135%;\n line-height: inherit;\n font-weight: 300;\n color: inherit;\n position: absolute;\n width: 75%;\n left: 12.5%;\n padding: 7.48px 0 0 0;\n line-height: 1;\n height: 34px;\n display: inline-block;\n text-align: center;\n -webkit-transform: translate3d(0px, 0px, 0px);\n transform: translate3d(0px, 0px, 0px);\n}\n.flatpickr-current-month span.cur-month {\n font-family: inherit;\n font-weight: 700;\n color: inherit;\n display: inline-block;\n margin-left: 0.5ch;\n padding: 0;\n}\n.flatpickr-current-month span.cur-month:hover {\n background: rgba(0,0,0,0.05);\n}\n.flatpickr-current-month .numInputWrapper {\n width: 6ch;\n width: 7ch\\0;\n display: inline-block;\n}\n.flatpickr-current-month .numInputWrapper span.arrowUp:after {\n border-bottom-color: rgba(0,0,0,0.9);\n}\n.flatpickr-current-month .numInputWrapper span.arrowDown:after {\n border-top-color: rgba(0,0,0,0.9);\n}\n.flatpickr-current-month input.cur-year {\n background: transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: inherit;\n cursor: text;\n padding: 0 0 0 0.5ch;\n margin: 0;\n display: inline-block;\n font-size: inherit;\n font-family: inherit;\n font-weight: 300;\n line-height: inherit;\n height: auto;\n border: 0;\n border-radius: 0;\n vertical-align: initial;\n -webkit-appearance: textfield;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.flatpickr-current-month input.cur-year:focus {\n outline: 0;\n}\n.flatpickr-current-month input.cur-year[disabled],\n.flatpickr-current-month input.cur-year[disabled]:hover {\n font-size: 100%;\n color: rgba(0,0,0,0.5);\n background: transparent;\n pointer-events: none;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months {\n appearance: menulist;\n background: transparent;\n border: none;\n border-radius: 0;\n box-sizing: border-box;\n color: inherit;\n cursor: pointer;\n font-size: inherit;\n font-family: inherit;\n font-weight: 300;\n height: auto;\n line-height: inherit;\n margin: -1px 0 0 0;\n outline: none;\n padding: 0 0 0 0.5ch;\n position: relative;\n vertical-align: initial;\n -webkit-box-sizing: border-box;\n -webkit-appearance: menulist;\n -moz-appearance: menulist;\n width: auto;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months:focus,\n.flatpickr-current-month .flatpickr-monthDropdown-months:active {\n outline: none;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months:hover {\n background: rgba(0,0,0,0.05);\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {\n background-color: transparent;\n outline: none;\n padding: 0;\n}\n.flatpickr-weekdays {\n background: transparent;\n text-align: center;\n overflow: hidden;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n height: 28px;\n}\n.flatpickr-weekdays .flatpickr-weekdaycontainer {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\nspan.flatpickr-weekday {\n cursor: default;\n font-size: 90%;\n background: transparent;\n color: rgba(0,0,0,0.54);\n line-height: 1;\n margin: 0;\n text-align: center;\n display: block;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n font-weight: bolder;\n}\n.dayContainer,\n.flatpickr-weeks {\n padding: 1px 0 0 0;\n}\n.flatpickr-days {\n position: relative;\n overflow: hidden;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: start;\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n width: 307.875px;\n}\n.flatpickr-days:focus {\n outline: 0;\n}\n.dayContainer {\n padding: 0;\n outline: 0;\n text-align: left;\n width: 307.875px;\n min-width: 307.875px;\n max-width: 307.875px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n display: -ms-flexbox;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-flex-wrap: wrap;\n flex-wrap: wrap;\n -ms-flex-wrap: wrap;\n -ms-flex-pack: justify;\n -webkit-justify-content: space-around;\n justify-content: space-around;\n -webkit-transform: translate3d(0px, 0px, 0px);\n transform: translate3d(0px, 0px, 0px);\n opacity: 1;\n}\n.dayContainer + .dayContainer {\n -webkit-box-shadow: -1px 0 0 #e6e6e6;\n box-shadow: -1px 0 0 #e6e6e6;\n}\n.flatpickr-day {\n background: none;\n border: 1px solid transparent;\n border-radius: 150px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #393939;\n cursor: pointer;\n font-weight: 400;\n width: 14.2857143%;\n -webkit-flex-basis: 14.2857143%;\n -ms-flex-preferred-size: 14.2857143%;\n flex-basis: 14.2857143%;\n max-width: 39px;\n height: 39px;\n line-height: 39px;\n margin: 0;\n display: inline-block;\n position: relative;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n text-align: center;\n}\n.flatpickr-day.inRange,\n.flatpickr-day.prevMonthDay.inRange,\n.flatpickr-day.nextMonthDay.inRange,\n.flatpickr-day.today.inRange,\n.flatpickr-day.prevMonthDay.today.inRange,\n.flatpickr-day.nextMonthDay.today.inRange,\n.flatpickr-day:hover,\n.flatpickr-day.prevMonthDay:hover,\n.flatpickr-day.nextMonthDay:hover,\n.flatpickr-day:focus,\n.flatpickr-day.prevMonthDay:focus,\n.flatpickr-day.nextMonthDay:focus {\n cursor: pointer;\n outline: 0;\n background: #e6e6e6;\n border-color: #e6e6e6;\n}\n.flatpickr-day.today {\n border-color: #959ea9;\n}\n.flatpickr-day.today:hover,\n.flatpickr-day.today:focus {\n border-color: #959ea9;\n background: #959ea9;\n color: #fff;\n}\n.flatpickr-day.selected,\n.flatpickr-day.startRange,\n.flatpickr-day.endRange,\n.flatpickr-day.selected.inRange,\n.flatpickr-day.startRange.inRange,\n.flatpickr-day.endRange.inRange,\n.flatpickr-day.selected:focus,\n.flatpickr-day.startRange:focus,\n.flatpickr-day.endRange:focus,\n.flatpickr-day.selected:hover,\n.flatpickr-day.startRange:hover,\n.flatpickr-day.endRange:hover,\n.flatpickr-day.selected.prevMonthDay,\n.flatpickr-day.startRange.prevMonthDay,\n.flatpickr-day.endRange.prevMonthDay,\n.flatpickr-day.selected.nextMonthDay,\n.flatpickr-day.startRange.nextMonthDay,\n.flatpickr-day.endRange.nextMonthDay {\n background: #569ff7;\n -webkit-box-shadow: none;\n box-shadow: none;\n color: #fff;\n border-color: #569ff7;\n}\n.flatpickr-day.selected.startRange,\n.flatpickr-day.startRange.startRange,\n.flatpickr-day.endRange.startRange {\n border-radius: 50px 0 0 50px;\n}\n.flatpickr-day.selected.endRange,\n.flatpickr-day.startRange.endRange,\n.flatpickr-day.endRange.endRange {\n border-radius: 0 50px 50px 0;\n}\n.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),\n.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),\n.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {\n -webkit-box-shadow: -10px 0 0 #569ff7;\n box-shadow: -10px 0 0 #569ff7;\n}\n.flatpickr-day.selected.startRange.endRange,\n.flatpickr-day.startRange.startRange.endRange,\n.flatpickr-day.endRange.startRange.endRange {\n border-radius: 50px;\n}\n.flatpickr-day.inRange {\n border-radius: 0;\n -webkit-box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n}\n.flatpickr-day.flatpickr-disabled,\n.flatpickr-day.flatpickr-disabled:hover,\n.flatpickr-day.prevMonthDay,\n.flatpickr-day.nextMonthDay,\n.flatpickr-day.notAllowed,\n.flatpickr-day.notAllowed.prevMonthDay,\n.flatpickr-day.notAllowed.nextMonthDay {\n color: rgba(57,57,57,0.3);\n background: transparent;\n border-color: transparent;\n cursor: default;\n}\n.flatpickr-day.flatpickr-disabled,\n.flatpickr-day.flatpickr-disabled:hover {\n cursor: not-allowed;\n color: rgba(57,57,57,0.1);\n}\n.flatpickr-day.week.selected {\n border-radius: 0;\n -webkit-box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;\n box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;\n}\n.flatpickr-day.hidden {\n visibility: hidden;\n}\n.rangeMode .flatpickr-day {\n margin-top: 1px;\n}\n.flatpickr-weekwrapper {\n float: left;\n}\n.flatpickr-weekwrapper .flatpickr-weeks {\n padding: 0 12px;\n -webkit-box-shadow: 1px 0 0 #e6e6e6;\n box-shadow: 1px 0 0 #e6e6e6;\n}\n.flatpickr-weekwrapper .flatpickr-weekday {\n float: none;\n width: 100%;\n line-height: 28px;\n}\n.flatpickr-weekwrapper span.flatpickr-day,\n.flatpickr-weekwrapper span.flatpickr-day:hover {\n display: block;\n width: 100%;\n max-width: none;\n color: rgba(57,57,57,0.3);\n background: transparent;\n cursor: default;\n border: none;\n}\n.flatpickr-innerContainer {\n display: block;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n}\n.flatpickr-rContainer {\n display: inline-block;\n padding: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.flatpickr-time {\n text-align: center;\n outline: 0;\n display: block;\n height: 0;\n line-height: 40px;\n max-height: 40px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n.flatpickr-time:after {\n content: "";\n display: table;\n clear: both;\n}\n.flatpickr-time .numInputWrapper {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n width: 40%;\n height: 40px;\n float: left;\n}\n.flatpickr-time .numInputWrapper span.arrowUp:after {\n border-bottom-color: #393939;\n}\n.flatpickr-time .numInputWrapper span.arrowDown:after {\n border-top-color: #393939;\n}\n.flatpickr-time.hasSeconds .numInputWrapper {\n width: 26%;\n}\n.flatpickr-time.time24hr .numInputWrapper {\n width: 49%;\n}\n.flatpickr-time input {\n background: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n border: 0;\n border-radius: 0;\n text-align: center;\n margin: 0;\n padding: 0;\n height: inherit;\n line-height: inherit;\n color: #393939;\n font-size: 14px;\n position: relative;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-appearance: textfield;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.flatpickr-time input.flatpickr-hour {\n font-weight: bold;\n}\n.flatpickr-time input.flatpickr-minute,\n.flatpickr-time input.flatpickr-second {\n font-weight: 400;\n}\n.flatpickr-time input:focus {\n outline: 0;\n border: 0;\n}\n.flatpickr-time .flatpickr-time-separator,\n.flatpickr-time .flatpickr-am-pm {\n height: inherit;\n float: left;\n line-height: inherit;\n color: #393939;\n font-weight: bold;\n width: 2%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.flatpickr-time .flatpickr-am-pm {\n outline: 0;\n width: 18%;\n cursor: pointer;\n text-align: center;\n font-weight: 400;\n}\n.flatpickr-time input:hover,\n.flatpickr-time .flatpickr-am-pm:hover,\n.flatpickr-time input:focus,\n.flatpickr-time .flatpickr-am-pm:focus {\n background: #eee;\n}\n.flatpickr-input[readonly] {\n cursor: pointer;\n}\n@-webkit-keyframes fpFadeInDown {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -20px, 0);\n transform: translate3d(0, -20px, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fpFadeInDown {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -20px, 0);\n transform: translate3d(0, -20px, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n',""]),e.exports=t},function(e,t){e.exports=flarum.core.compat["common/components/Alert"]},function(e,t){e.exports=flarum.core.compat["utils/affixSidebar"]},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.r(t);var o=n(1),i=n.n(o),a=n(8),s=n.n(a),l=(n(22),n(9)),c=n.n(l),u=n(3),d=n.n(u),f=(n(23),function(e,t){return(f=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,t)});function p(e,t){function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n3)for(n=[n],r=3;r1&&z(o,t,n),t=H(n,o,o,e.__k,null,o.__e,t),"function"==typeof e.type&&(e.__d=t)))}function U(e,t,n,r,o,i,a,s,l){var c,u,d,f,p,h,v,m,y,b,w,D=t.type;if(void 0!==t.constructor)return null;(c=g.__b)&&c(t);try{e:if("function"==typeof D){if(m=t.props,y=(c=D.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?v=(u=t.__c=n.__c).__=u.__E:("prototype"in D&&D.prototype.render?t.__c=u=new D(m,b):(t.__c=u=new R(m,b),u.constructor=D,u.render=Q),y&&y.sub(u),u.props=m,u.state||(u.state={}),u.context=b,u.__n=r,d=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=D.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=k({},u.__s)),k(u.__s,D.getDerivedStateFromProps(m,u.__s))),f=u.props,p=u.state,d)null==D.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==D.getDerivedStateFromProps&&m!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(m,b),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(m,u.__s,b)||t.__v===n.__v){u.props=m,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,u.__h.length&&a.push(u),z(t,s,e);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(m,u.__s,b),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(f,p,h)}))}u.context=b,u.props=m,u.state=u.__s,(c=g.__r)&&c(t),u.__d=!1,u.__v=t,u.__P=e,c=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(r=k(k({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(h=u.getSnapshotBeforeUpdate(f,p)),w=null!=c&&c.type==T&&null==c.key?c.props.children:c,P(e,Array.isArray(w)?w:[w],t,n,r,o,i,a,s,l),u.base=t.__e,u.__h.length&&a.push(u),v&&(u.__E=u.__=null),u.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=W(n.__e,t,n,r,o,i,a,l);(c=g.diffed)&&c(t)}catch(e){t.__v=null,g.__e(e,t,n)}return t.__e}function j(e,t){g.__c&&g.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){g.__e(e,t.__v)}}))}function W(e,t,n,r,o,i,a,s){var l,c,u,d,f,p=n.props,h=t.props;if(o="svg"===t.type||o,null!=i)for(l=0;l=0;i--){var a=e[i][r];if("object"==typeof a&&a)o.unshift(a);else if(void 0!==a){n[r]=a;break}}o.length&&(n[r]=qe(o))}for(i=e.length-1;i>=0;i--){var s=e[i];for(var l in s)l in n||(n[l]=s[l])}return n}function Ze(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Xe(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Je(e){for(var t={},n=0,r=e;n1)||"numeric"!==o.year&&"2-digit"!==o.year||"numeric"!==o.month&&"2-digit"!==o.month||"numeric"!==o.day&&"2-digit"!==o.day||(s=1);var l=this.format(e,n),c=this.format(t,n);if(l===c)return l;var u=At(function(e,t){var n={};for(var r in e)(!(r in vt)||vt[r]<=t)&&(n[r]=e[r]);return n}(o,s),i,n),d=u(e),f=u(t),p=function(e,t,n,r){var o=0;for(;o=ct(t)&&(r=Ne(r,1))}return e.start&&(n=Be(e.start),r&&r<=n&&(r=Ne(n,1))),{start:n,end:r}}function an(e,t,n,r){return"year"===r?at(n.diffWholeYears(e,t),"year"):"month"===r?at(n.diffWholeMonths(e,t),"month"):(i=t,a=Be(o=e),s=Be(i),{years:0,months:0,days:Math.round(Pe(a,s)),milliseconds:i.valueOf()-s.valueOf()-(o.valueOf()-a.valueOf())});var o,i,a,s}function sn(e,t){var n,r,o=[],i=t.start;for(e.sort(ln),n=0;ni&&o.push({start:i,end:r.start}),r.end>i&&(i=r.end);return it.start)&&(null===e.start||null===t.end||e.start=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function fn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t=(n||t.end),isToday:t&&fn(t,r.start)}}var kn={start:Ft,end:Ft,allDay:Boolean};function xn(e,t,n){var r=function(e,t){var n=Bt(e,kn),r=n.refined,o=n.extra,i=r.start?t.createMarkerMeta(r.start):null,a=r.end?t.createMarkerMeta(r.end):null,s=r.allDay;null==s&&(s=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified));return J({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:s},o)}(e,t),o=r.range;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return r}function Sn(e,t,n){return J(J({},Mn(e,t,n)),{timeZone:t.timeZone})}function Mn(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 Tn(e,t,n){var r=en({editable:!1},n),o=nn(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:mn(o,t),instance:Qe(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function Rn(e,t,n){n.emitter.trigger("select",J(J({},_n(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function _n(e,t){for(var n,r,o={},i=0,a=t.pluginHooks.dateSpanTransforms;i=0;r--){var o=n[r].parseMeta(e);if(o)return{sourceDefId:r,meta:o}}return null}(i,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:Ae(),sourceDefId:s.sourceDefId,meta:s.meta,ui:Qt(i,t),extendedProps:a}}return null}function Ln(e){return J(J(J({},Vt),Bn),e.pluginHooks.eventSourceRefiners)}function zn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var Un=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=1?Math.min(o,i):o}(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=Oe(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",ft(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?We(ze(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?We(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Ue(je(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(je(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Ue(je(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(je(e))*60):new Date(e.valueOf()-(t||0))},e}(),Xn=[],Jn={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 Kn(e){for(var t=e.length>0?e[0].code:"en",n=Xn.concat(e),r={en:Jn},o=0,i=n;o0;o--){var i=r.slice(0,o).join("-");if(t[i])return t[i]}return null}(n,t)||Jn;return er(e,n,r)}(e,t):er(e.code,[e.code],e)}function er(e,t,n){var r=qe([Jn,n],["buttonText"]);delete r.code;var o=r.week;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var 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 Lt(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return J(J({},tr),e)}))}(e),null,t)}function rr(e,t){return e.left>=t.left&&e.left=t.top&&e.topn:!!t&&e>=t.end)}}function sr(e,t){var n=["fc-day","fc-day-"+_e[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 lr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:dt(e),type:t})}var cr,ur=null;function dr(){return null===ur&&(ur=function(){var e=document.createElement("div");ve(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="
",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return le(e),t}()),ur}function fr(){return cr||(cr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=pr(e);return document.body.removeChild(e),t}()),cr}function pr(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function hr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():gr(e),o=function(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,o=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,s=pr(e),l=s.y-r-o,c={borderLeft:r,borderRight:o,borderTop:i,borderBottom:a,scrollbarBottom:s.x-i-a,scrollbarLeft:0,scrollbarRight:0};return dr()&&"rtl"===n.direction?c.scrollbarLeft=l:c.scrollbarRight=l,t&&(c.paddingLeft=parseInt(n.paddingLeft,10)||0,c.paddingRight=parseInt(n.paddingRight,10)||0,c.paddingTop=parseInt(n.paddingTop,10)||0,c.paddingBottom=parseInt(n.paddingBottom,10)||0),c}(e,t),i={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return t&&(i.left+=o.paddingLeft,i.right-=o.paddingRight,i.top+=o.paddingTop,i.bottom-=o.paddingBottom),i}function gr(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}}var vr=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=n[t]&&e=n[t]&&e0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()0},e.prototype.canScrollRight=function(){return this.getScrollLeft()=u.end?new Date(u.end.valueOf()-1):c),o=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,i),s=a=this.trimHiddenDays(a),d.showNonCurrentDates||(s=cn(s,o.range)),s=cn(s=this.adjustActiveRange(s),r),l=un(o.range,r),{validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:i,activeRange:s,renderRange:a,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(o.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,o=null,i=null,a=null;return r.duration?(o=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,t,o,i)):(n=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=ut(o=this.getFallbackDuration()).unit,a=this.buildRangeFromDuration(e,t,o,i)),{duration:o,unit:i,range:a}},e.prototype.getFallbackDuration=function(){return at({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,o=t.slotMinTime,i=t.slotMaxTime,a=e.start,s=e.end;return r&&(lt(o)<0&&(a=Be(a),a=n.add(a,o)),lt(i)>1&&(s=Ne(s=Be(s),-1),s=n.add(s,i))),{start:a,end:s}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var o,i,a,s=this.props,l=s.dateEnv,c=s.dateAlignment;if(!c){var u=this.props.dateIncrement;c=u&&ct(u)e.fetchRange.end:!e.latestFetchId}(e,t,n)})),t,n)}function co(e,t,n,r){var o={};for(var i in e){var a=e[i];t[i]?o[i]=uo(a,n,r):o[i]=a}return o}function uo(e,t,n){var r=n.options,o=n.calendarApi,i=n.pluginHooks.eventSourceDefs[e.sourceDefId],a=Ae();return i.fetch({eventSource:e,range:t,context:n},(function(i){var s=i.rawEvents;r.eventSourceSuccess&&(s=r.eventSourceSuccess.call(o,s,i.xhr)||s),e.success&&(s=e.success.call(o,s,i.xhr)||s),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:s})}),(function(i){console.warn(i.message,i),r.eventSourceFailure&&r.eventSourceFailure.call(o,i),e.failure&&e.failure(i),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:i})})),J(J({},e),{isFetching:!0,latestFetchId:a})}function fo(e,t){return Ze(e,(function(e){return po(e,t)}))}function po(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function ho(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function go(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function vo(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 mo(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 yo(e,t,n,r,o){var i=[];return{headerToolbar:e.headerToolbar?bo(e.headerToolbar,e,t,n,r,o,i):null,footerToolbar:e.footerToolbar?bo(e.footerToolbar,e,t,n,r,o,i):null,viewsWithButtons:i}}function bo(e,t,n,r,o,i,a){return Xe(e,(function(e){return function(e,t,n,r,o,i,a){var s="rtl"===t.direction,l=t.customButtons||{},c=n.buttonText||{},u=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,f=void 0,p=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e)},(f=r.getCustomButtonIconClass(t))||(f=r.getIconClass(e,s))||(p=t.text)):(n=o[e])?(a.push(e),d=function(){i.changeView(e)},(p=n.buttonTextOverride)||(f=r.getIconClass(e,s))||(p=n.buttonTextDefault)):i[e]&&(d=function(){i[e]()},(p=c[e])||(f=r.getIconClass(e,s))||(p=u[e])),{buttonName:e,buttonClick:d,buttonIcon:f,buttonText:p}}))}))}(e,t,n,r,o,i,a)}))}function wo(e,t,n,r,o){var i=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Do(t)}(t,n):i=Do(n);var a=new XMLHttpRequest;a.open(e,t,!0),"GET"!==e&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onload=function(){if(a.status>=200&&a.status<400){var e=!1,t=void 0;try{t=JSON.parse(a.responseText),e=!0}catch(e){}e?r(t,a):o("Failure parsing JSON",a)}else o("Request failed",a)},a.onerror=function(){o("Request failed",a)},a.send(i)}function Do(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function Eo(e,t){for(var n=Ke(t.getCurrentData().eventSources),r=[],o=0,i=e;o1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var So=function(){function e(e){var t=this;this.computeOptionsData=pt(this._computeOptionsData),this.computeCurrentViewData=pt(this._computeCurrentViewData),this.organizeRawLocales=pt(Kn),this.buildLocale=pt($n),this.buildPluginHooks=jr(),this.buildDateEnv=pt(Mo),this.buildTheme=pt(To),this.parseToolbars=pt(yo),this.buildViewSpecs=pt(to),this.buildDateProfileGenerator=ht(Ro),this.buildViewApi=pt(_o),this.buildViewUiProps=ht(Oo),this.buildEventUiBySource=pt(Io,$e),this.buildEventUiBases=pt(No),this.parseContextBusinessHours=ht(Po),this.buildTitle=pt(xo),this.emitter=new vr,this.actionRunner=new ko(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={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=r.calendarOptions.initialView||r.pluginHooks.initialView,i=this.computeCurrentViewData(o,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);var a,s,l,c=(a=r.calendarOptions,s=r.dateEnv,null!=(l=a.initialDate)?s.createMarker(l):zn(a.now,s)),u=i.dateProfileGenerator.build(c);fn(u.activeRange,c)||(c=u.currentRange.start);for(var d={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f=0,p=r.pluginHooks.contextInit;f1){var g=o&&n.getClass("buttonGroup")||"";return ee.apply(void 0,K(["div",{className:g}],r))}return r[0]},t}(xr),qo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return X(t,e),t.prototype.render=function(){var e=this.props,t=e.aspectRatio,n=["fc-view-harness",t||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],r="",o="";return t?o=1/t*100+"%":r=e.height||"",ee("div",{ref:e.elRef,onClick:e.onClick,className:n.join(" "),style:{height:r,paddingBottom:o}},e.children)},t}(xr),Zo=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,o=r.context,i=gn(t);if(i&&r.isValidSegDownEl(e.target)){var a=pe(e.target,".fc-event-forced-url"),s=a?a.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:t,event:new jn(r.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:o.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},n.destroy=we(t.el,"click",".fc-event",n.handleSegClick),n}return X(t,e),t}(Bo),Xo=function(e){function t(t){var n,r,o,i,a,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){gn(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,r=".fc-event",o=s.handleSegEnter,i=s.handleSegLeave,we(n,"mouseover",r,(function(e,t){if(t!==a){a=t,o(e,t);var n=function(e){a=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return X(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,o=r.context,i=gn(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new jn(o,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:o.viewApi})},t}(Bo),Jo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=pt(Cr),t.buildViewPropTransformers=pt($o),t.buildToolbarProps=pt(Ko),t.handleNavLinkClick=be("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=ne(),t.footerRef=ne(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=Fo(e,n),o=[Zo,Xo].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=o,zo[e.uid]=r},t.unregisterInteractiveComponent=function(e){for(var n=0,r=t.interactionsStore[e.uid];n
',document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),Vo}var ti=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 X(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,o=r||null==t.height?"":t.height,i=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return ei()||i.push("fc-liquid-hack"),e.children(i,o,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}(xr);var ni="fc-col-header-cell",ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return X(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,r=e.theme,o=e.viewApi,i=this.props,a=i.date,s=i.dateProfile,l=ar(a,i.todayRange,null,s),c=[ni].concat(sr(l,r)),u=t.format(a,i.dayHeaderFormat),d=n.navLinks&&!l.isDisabled&&i.colCnt>1?{"data-navlink":lr(a),tabIndex:0}:{},f=J(J(J({date:t.toDate(a),view:o},i.extraHookProps),{text:u}),l);return ee(Vr,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:ii,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return ee("th",J({ref:e,className:c.concat(t).join(" "),"data-date":l.isDisabled?void 0:dt(a),colSpan:i.colSpan},i.extraDataAttrs),ee("div",{className:"fc-scrollgrid-sync-inner"},!l.isDisabled&&ee("a",J({ref:n,className:["fc-col-header-cell-cushion",i.isSticky?"fc-sticky":""].join(" ")},d),r)))}))},t}(xr),oi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return X(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,r=t.theme,o=t.viewApi,i=t.options,a=Ne(new Date(2592e5),e.dow),s={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},l=[ni].concat(sr(s,r),e.extraClassNames||[]),c=n.format(a,e.dayHeaderFormat),u=J(J(J(J({date:a},s),{view:o}),e.extraHookProps),{text:c});return ee(Vr,{hookProps:u,classNames:i.dayHeaderClassNames,content:i.dayHeaderContent,defaultContent:ii,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(function(t,n,r,o){return ee("th",J({ref:t,className:l.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),ee("div",{className:"fc-scrollgrid-sync-inner"},ee("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:r},o)))}))},t}(xr);function ii(e){return e.text}var ai=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=zn(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return X(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=Oe(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),o=t.dateEnv.add(r,at(1,e.unit)),i=o.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:si(r)},nextState:{nowDate:o,todayRange:si(o)},waitMs:i}},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=Ar,t}($);function si(e){var t=Be(e);return{start:t,end:Ne(t,1)}}var li=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=pt(ci),t}return X(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,o=t.datesRepDistinctDays,i=t.renderIntro,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return ee(ai,{unit:"day"},(function(e,t){return ee("tr",null,i&&i(),n.map((function(e){return o?ee(ri,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:a}):ee(oi,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a})})))}))},t}(xr);function ci(e,t,n){return e||function(e,t){return Mt(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}var ui=function(){function e(e,t){for(var n=e.start,r=e.end,o=[],i=[],a=-1;n=t.length?t[t.length-1]+1:t[n]},e}(),di=function(){function e(e,t){var n,r,o,i=e.dates;if(t){for(r=i[0].getUTCDay(),n=1;nt)return!0}return!1},t.prototype.needsYScrolling=function(){if(hi.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;rt)return!0}return!1},t.prototype.getXScrollbarWidth=function(){return hi.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return hi.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(xr),vi=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,o=r.depths,i=r.currentMap,a=!1,s=!1;null!==e?(a=n in i,i[n]=e,o[n]=(o[n]||0)+1,s=!0):0==--o[n]&&(delete i[n],delete t.callbackMap[n],a=!0),t.masterCallback&&(a&&t.masterCallback(null,String(n)),s&&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 function(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var o=[];null==n&&(n=Object.keys(e).length);for(var i=t;ia.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var o=l[r],i=0;i=o[i].top;)i++;o.splice(i,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var S in o)o[S]||(u[S.split(":")[0]]=!0);return{segsByFirstCol:l.map(ra),segsByEachCol:l.map((function(t,n){var r=function(e){for(var t=[],n=0,r=e;n1,showWeekNumbers:t.showWeekNumbers,todayRange:v,dateProfile:n,cells:i,renderIntro:t.renderRowIntro,businessHourSegs:l[a],eventSelection:t.eventSelection,bgEventSegs:c[a].filter(ua),fgEventSegs:u[a],dateSelectionSegs:d[a],eventDrag:f[a],eventResize:p[a],dayMaxEvents:o,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:h,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&a&&a.currentFgEventSegs===t.fgEventSegs&&ee(sa,{date:a.date,dateProfile:n,segs:a.allSegs,alignmentEl:a.dayEl,topAlignmentEl:1===s?t.headerAlignElRef.current:null,onCloseClick:e.handleMorePopoverClose,selectedInstanceId:t.eventSelection,hiddenInstances:(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{},todayRange:v}))})))},t.prototype.prepareHits=function(){this.rowPositions=new mr(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new mr(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,o=n.leftToIndex(e),i=r.topToIndex(t);if(null!=i&&null!=o)return{row:i,col:o,dateSpan:{range:this.getCellRange(i,o),allDay:!0},dayEl:this.getCellEl(i,o),relativeRect:{left:n.lefts[o],right:n.rights[o],top:r.tops[i],bottom:r.bottoms[i]}}},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:Ne(n,1)}},t}(zr);function ca(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ua(e){return e.eventRange.def.allDay}var da=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new fa,t.tableRef=ne(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return zi(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return ee(la,Ui({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}(zr),fa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return zi(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(fi);function pa(e,t){var n=new ui(e.renderRange,t);return new di(n,/year|month|week/.test(e.currentRangeUnit))}var ha=Ur({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:Ft,moreLinkClassNames:Ft,moreLinkContent:Ft,moreLinkDidMount:Ft,moreLinkWillUnmount:Ft},views:{dayGrid:{component:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=pt(pa),t.headerRef=ne(),t.tableRef=ne(),t}return zi(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,o=this.props,i=this.buildDayTableModel(o.dateProfile,r),a=n.dayHeaders&&ee(li,{ref:this.headerRef,dateProfile:o.dateProfile,dates:i.headerDates,datesRepDistinctDays:1===i.rowCnt}),s=function(t){return ee(da,{ref:e.tableRef,dateProfile:o.dateProfile,dayTableModel:i,businessHours:o.businessHours,dateSelection:o.dateSelection,eventStore:o.eventStore,eventUiBases:o.eventUiBases,eventSelection:o.eventSelection,eventDrag:o.eventDrag,eventResize:o.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!o.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:o.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(a,s,i.colCnt,n.dayMinWidth):this.renderSimpleLayout(a,s)},t}(ji),dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zi(t,e),t.prototype.buildRenderRange=function(t,n,r){var o,i=this.props.dateEnv,a=e.prototype.buildRenderRange.call(this,t,n,r),s=a.start,l=a.end;(/^(year|month)$/.test(n)&&(s=i.startOfWeek(s),(o=i.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=Ie(o,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=Ie(l,6-Math.ceil(Pe(s,l)/7)));return{start:s,end:l}},t}(ro)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),ga=function(e,t){return(ga=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,t)};function va(e,t){function n(){this.constructor=e}ga(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ma=function(){return(ma=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(this.everMovedDown=!0),i<0?this.everMovedLeft=!0:i>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(Sa()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e=0&&c>=0&&u>=0&&d>=0&&(u<=n&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>u)&&(r={scrollCache:a,name:"top",distance:u}),d<=n&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:a,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:a,name:"left",distance:l}),c<=n&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>c)&&(r={scrollCache:a,name:"right",distance:c}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new xa(!1):new ka(e,!1)}))},e.prototype.queryScrollEls=function(){for(var e=[],t=0,n=this.scrollQuery;t=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){var t;r.isInteracting&&(r.isInteracting=!1,(t=document.body).classList.remove("fc-unselectable"),t.removeEventListener("selectstart",ye),function(e){e.removeEventListener("contextmenu",ye)}(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var o=r.pointer=new Da(t);return o.emitter.on("pointerdown",r.onPointerDown),o.emitter.on("pointermove",r.onPointerMove),o.emitter.on("pointerup",r.onPointerUp),n&&(o.selector=n),r.mirror=new Aa,r.autoScroller=new Ma,r}return va(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}(Uo),Ra=function(){function e(e){this.origRect=gr(e),this.scrollCaches=function(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}(e).map((function(e){return new ka(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e=0&&u=0&&do.layer)&&(g.rect.left+=l,g.rect.right+=l,g.rect.top+=c,g.rect.bottom+=c,o=g)}}}return o},e}();function Ia(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&(n=e.dateSpan,r=t.dateSpan,o=n.range,i=r.range,(null===o.start?null:o.start.valueOf())===(null===i.start?null:i.start.valueOf())&&(null===o.end?null:o.end.valueOf())===(null===i.end?null:i.end.valueOf())&&n.allDay===r.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}(n,r));var n,r,o,i}function Na(e,t){for(var n,r,o={},i=0,a=t.pluginHooks.datePointTransforms;ir.start)return c.endDelta=l,c;return null}(a,e,r.subjectEl.classList.contains("fc-event-resizer-start"),s.range,o.pluginHooks.eventResizeJoinTransforms)),l&&(c=Nn(i,o.getCurrentData().eventUiBases,l,o),d.mutatedEvents=c,n.component.isInteractionValid(d)||(u=!0,l=null,c=null,d.mutatedEvents=null)),c?o.dispatch({type:"SET_EVENT_RESIZE",state:d}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),u?Ce():ke(),t||(l&&Ia(a,e)&&(l=null),n.validMutation=l,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,r=n.eventRange.def,o=n.eventRange.instance,i=new jn(t,r,o),a=n.relevantEvents,s=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:i,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var l=new jn(t,s.defs[r.defId],o?s.instances[o.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:s});var c={oldEvent:i,event:l,relatedEvents:Yn(s,t,o),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",ma(ma({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||at(0),endDelta:n.validMutation.endDelta||at(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 r=t.component,o=n.dragging=new Ta(t.el);o.pointer.selector=".fc-event-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=r.context.options.dragScroll;var i=n.hitDragging=new _a(n.dragging,Lo(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragstart",n.handleDragStart),i.emitter.on("hitupdate",n.handleHitUpdate),i.emitter.on("dragend",n.handleDragEnd),n}return va(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return pe(e.subjectEl,".fc-event")},t}(Bo);var Fa=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,o=n.getCurrentData();if(!r.wasTouchScroll){if(o.dateSelection&&!t.isRecentPointerDateSelect){var i=n.options.unselectAuto,a=n.options.unselectCancel;!i||i&&pe(r.downEl,a)||n.calendarApi.unselect(e)}o.eventSelection&&!pe(r.downEl,Ha.SELECTOR)&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new Da(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,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}(),La={dateClick:Ft,eventDragStart:Ft,eventDragStop:Ft,eventDrop:Ft,eventResizeStart:Ft,eventResizeStop:Ft,eventResize:Ft,drop:Ft,eventReceive:Ft,eventLeave:Ft},za=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,r){var o=n.hitDragging.dragging,i=null,a=null,s=!1,l={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(i=e.component.context,n.canDropElOnCalendar(r.subjectEl,i)&&(a=function(e,t,n){for(var r=ma({},t.leftoverProps),o=0,i=n.pluginHooks.externalDefTransforms;o1?e.isStart?s=An(e,t,n,null,null,i.range.start,e.end):e.isEnd?s=An(e,t,n,null,null,e.start,i.range.end):a=!0:s=An(e,t,n)),a){var l={text:n.options.allDayText,view:n.viewApi};return ee(Vr,{hookProps:l,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Ja,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return ee("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return ee("td",{className:"fc-list-event-time"},s)}var c,u;return null}(n,r,t),ee("td",{className:"fc-list-event-graphic"},ee("span",{className:"fc-list-event-dot",style:{borderColor:s.borderColor||s.backgroundColor}})),ee("td",{className:"fc-list-event-title",ref:i},a))}))},t}(xr);function Xa(e){var t=e.event,n=t.url;return ee("a",Va({},n?{href:n}:{}),t.title)}function Ja(e){return e.text}function Ka(e){return e.text}function $a(e){for(var t=Be(e.renderRange.start),n=e.renderRange.end,r=[],o=[];t0?e.renderSegList(s,i):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return ee(Vr,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:Ka,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return ee("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},ee("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,r=n.theme,o=n.options,i=function(e){var t,n,r=[];for(t=0;t=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Ps(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{var e={788:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,o,i=e[1]||"",a=e[3];if(!a)return i;if(t&&"function"==typeof btoa){var s=(n=a,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(o," */")),l=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[i].concat(l).concat([s]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i{"use strict";"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{(t=n(788)(!1)).push([e.id,'\n/* classes attached to */\n/* TODO: make fc-event selector work when calender in shadow DOM */\n.fc-not-allowed,\n.fc-not-allowed .fc-event { /* override events\' custom cursors */\n cursor: not-allowed;\n}\n\n/* TODO: not attached to body. attached to specific els. move */\n.fc-unselectable {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.fc {\n /* layout of immediate children */\n display: flex;\n flex-direction: column;\n\n font-size: 1em\n}\n.fc,\n .fc *,\n .fc *:before,\n .fc *:after {\n box-sizing: border-box;\n }\n.fc table {\n border-collapse: collapse;\n border-spacing: 0;\n font-size: 1em; /* normalize cross-browser */\n }\n.fc th {\n text-align: center;\n }\n.fc th,\n .fc td {\n vertical-align: top;\n padding: 0;\n }\n.fc a[data-navlink] {\n cursor: pointer;\n }\n.fc a[data-navlink]:hover {\n text-decoration: underline;\n }\n.fc-direction-ltr {\n direction: ltr;\n text-align: left;\n}\n.fc-direction-rtl {\n direction: rtl;\n text-align: right;\n}\n.fc-theme-standard td,\n .fc-theme-standard th {\n border: 1px solid #ddd;\n border: 1px solid var(--fc-border-color, #ddd);\n }\n/* for FF, which doesn\'t expand a 100% div within a table cell. use absolute positioning */\n/* inner-wrappers are responsible for being absolute */\n/* TODO: best place for this? */\n.fc-liquid-hack td,\n .fc-liquid-hack th {\n position: relative;\n }\n\n@font-face {\n font-family: \'fcicons\';\n src: url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format(\'truetype\');\n font-weight: normal;\n font-style: normal;\n}\n\n.fc-icon {\n /* added for fc */\n display: inline-block;\n width: 1em;\n height: 1em;\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: \'fcicons\' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.fc-icon-chevron-left:before {\n content: "\\e900";\n}\n\n.fc-icon-chevron-right:before {\n content: "\\e901";\n}\n\n.fc-icon-chevrons-left:before {\n content: "\\e902";\n}\n\n.fc-icon-chevrons-right:before {\n content: "\\e903";\n}\n\n.fc-icon-minus-square:before {\n content: "\\e904";\n}\n\n.fc-icon-plus-square:before {\n content: "\\e905";\n}\n\n.fc-icon-x:before {\n content: "\\e906";\n}\n/*\nLots taken from Flatly (MIT): https://bootswatch.com/4/flatly/bootstrap.css\n\nThese styles only apply when the standard-theme is activated.\nWhen it\'s NOT activated, the fc-button classes won\'t even be in the DOM.\n*/\n.fc {\n\n /* reset */\n\n}\n.fc .fc-button {\n border-radius: 0;\n overflow: visible;\n text-transform: none;\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n }\n.fc .fc-button:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n }\n.fc .fc-button {\n -webkit-appearance: button;\n }\n.fc .fc-button:not(:disabled) {\n cursor: pointer;\n }\n.fc .fc-button::-moz-focus-inner {\n padding: 0;\n border-style: none;\n }\n.fc {\n\n /* theme */\n\n}\n.fc .fc-button {\n display: inline-block;\n font-weight: 400;\n text-align: center;\n vertical-align: middle;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-color: transparent;\n border: 1px solid transparent;\n padding: 0.4em 0.65em;\n font-size: 1em;\n line-height: 1.5;\n border-radius: 0.25em;\n }\n.fc .fc-button:hover {\n text-decoration: none;\n }\n.fc .fc-button:focus {\n outline: 0;\n box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);\n }\n.fc .fc-button:disabled {\n opacity: 0.65;\n }\n.fc {\n\n /* "primary" coloring */\n\n}\n.fc .fc-button-primary {\n color: #fff;\n color: var(--fc-button-text-color, #fff);\n background-color: #2C3E50;\n background-color: var(--fc-button-bg-color, #2C3E50);\n border-color: #2C3E50;\n border-color: var(--fc-button-border-color, #2C3E50);\n }\n.fc .fc-button-primary:hover {\n color: #fff;\n color: var(--fc-button-text-color, #fff);\n background-color: #1e2b37;\n background-color: var(--fc-button-hover-bg-color, #1e2b37);\n border-color: #1a252f;\n border-color: var(--fc-button-hover-border-color, #1a252f);\n }\n.fc .fc-button-primary:disabled { /* not DRY */\n color: #fff;\n color: var(--fc-button-text-color, #fff);\n background-color: #2C3E50;\n background-color: var(--fc-button-bg-color, #2C3E50);\n border-color: #2C3E50;\n border-color: var(--fc-button-border-color, #2C3E50); /* overrides :hover */\n }\n.fc .fc-button-primary:focus {\n box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);\n }\n.fc .fc-button-primary:not(:disabled):active,\n .fc .fc-button-primary:not(:disabled).fc-button-active {\n color: #fff;\n color: var(--fc-button-text-color, #fff);\n background-color: #1a252f;\n background-color: var(--fc-button-active-bg-color, #1a252f);\n border-color: #151e27;\n border-color: var(--fc-button-active-border-color, #151e27);\n }\n.fc .fc-button-primary:not(:disabled):active:focus,\n .fc .fc-button-primary:not(:disabled).fc-button-active:focus {\n box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);\n }\n.fc {\n\n /* icons within buttons */\n\n}\n.fc .fc-button .fc-icon {\n vertical-align: middle;\n font-size: 1.5em; /* bump up the size (but don\'t make it bigger than line-height of button, which is 1.5em also) */\n }\n.fc .fc-button-group {\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n }\n.fc .fc-button-group > .fc-button {\n position: relative;\n flex: 1 1 auto;\n }\n.fc .fc-button-group > .fc-button:hover {\n z-index: 1;\n }\n.fc .fc-button-group > .fc-button:focus,\n .fc .fc-button-group > .fc-button:active,\n .fc .fc-button-group > .fc-button.fc-button-active {\n z-index: 1;\n }\n.fc-direction-ltr .fc-button-group > .fc-button:not(:first-child) {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n.fc-direction-ltr .fc-button-group > .fc-button:not(:last-child) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n.fc-direction-rtl .fc-button-group > .fc-button:not(:first-child) {\n margin-right: -1px;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n.fc-direction-rtl .fc-button-group > .fc-button:not(:last-child) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n.fc .fc-toolbar {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n.fc .fc-toolbar.fc-header-toolbar {\n margin-bottom: 1.5em;\n }\n.fc .fc-toolbar.fc-footer-toolbar {\n margin-top: 1.5em;\n }\n.fc .fc-toolbar-title {\n font-size: 1.75em;\n margin: 0;\n }\n.fc-direction-ltr .fc-toolbar > * > :not(:first-child) {\n margin-left: .75em; /* space between */\n }\n.fc-direction-rtl .fc-toolbar > * > :not(:first-child) {\n margin-right: .75em; /* space between */\n }\n.fc-direction-rtl .fc-toolbar-ltr { /* when the toolbar-chunk positioning system is explicitly left-to-right */\n flex-direction: row-reverse;\n }\n.fc .fc-scroller {\n -webkit-overflow-scrolling: touch;\n position: relative; /* for abs-positioned elements within */\n }\n.fc .fc-scroller-liquid {\n height: 100%;\n }\n.fc .fc-scroller-liquid-absolute {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n }\n.fc .fc-scroller-harness {\n position: relative;\n overflow: hidden;\n direction: ltr;\n /* hack for chrome computing the scroller\'s right/left wrong for rtl. undone below... */\n /* TODO: demonstrate in codepen */\n }\n.fc .fc-scroller-harness-liquid {\n height: 100%;\n }\n.fc-direction-rtl .fc-scroller-harness > .fc-scroller { /* undo above hack */\n direction: rtl;\n }\n.fc-theme-standard .fc-scrollgrid {\n border: 1px solid #ddd;\n border: 1px solid var(--fc-border-color, #ddd); /* bootstrap does this. match */\n }\n.fc .fc-scrollgrid,\n .fc .fc-scrollgrid table { /* all tables (self included) */\n width: 100%; /* because tables don\'t normally do this */\n table-layout: fixed;\n }\n.fc .fc-scrollgrid table { /* inner tables */\n border-top-style: hidden;\n border-left-style: hidden;\n border-right-style: hidden;\n }\n.fc .fc-scrollgrid {\n\n border-collapse: separate;\n border-right-width: 0;\n border-bottom-width: 0;\n\n }\n.fc .fc-scrollgrid-liquid {\n height: 100%;\n }\n.fc .fc-scrollgrid-section { /* a */\n height: 1px /* better than 0, for firefox */\n\n }\n.fc .fc-scrollgrid-section > td {\n height: 1px; /* needs a height so inner div within grow. better than 0, for firefox */\n }\n.fc .fc-scrollgrid-section table {\n height: 1px;\n /* for most browsers, if a height isn\'t set on the table, can\'t do liquid-height within cells */\n /* serves as a min-height. harmless */\n }\n.fc .fc-scrollgrid-section-liquid > td {\n height: 100%; /* better than `auto`, for firefox */\n }\n.fc .fc-scrollgrid-section > * {\n border-top-width: 0;\n border-left-width: 0;\n }\n.fc .fc-scrollgrid-section-header > *,\n .fc .fc-scrollgrid-section-footer > * {\n border-bottom-width: 0;\n }\n.fc .fc-scrollgrid-section-body table,\n .fc .fc-scrollgrid-section-footer table {\n border-bottom-style: hidden; /* head keeps its bottom border tho */\n }\n.fc {\n\n /* stickiness */\n\n}\n.fc .fc-scrollgrid-section-sticky > * {\n background: #fff;\n background: var(--fc-page-bg-color, #fff);\n position: sticky;\n z-index: 3; /* TODO: var */\n /* TODO: box-shadow when sticking */\n }\n.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky > * {\n top: 0; /* because border-sharing causes a gap at the top */\n /* TODO: give safari -1. has bug */\n }\n.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky > * {\n bottom: 0; /* known bug: bottom-stickiness doesn\'t work in safari */\n }\n.fc .fc-scrollgrid-sticky-shim { /* for horizontal scrollbar */\n height: 1px; /* needs height to create scrollbars */\n margin-bottom: -1px;\n }\n.fc-sticky { /* no .fc wrap because used as child of body */\n position: sticky;\n}\n.fc .fc-view-harness {\n flex-grow: 1; /* because this harness is WITHIN the .fc\'s flexbox */\n position: relative;\n }\n.fc {\n\n /* when the harness controls the height, make the view liquid */\n\n}\n.fc .fc-view-harness-active > .fc-view {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n.fc .fc-col-header-cell-cushion {\n display: inline-block; /* x-browser for when sticky (when multi-tier header) */\n padding: 2px 4px;\n }\n.fc .fc-bg-event,\n .fc .fc-non-business,\n .fc .fc-highlight {\n /* will always have a harness with position:relative/absolute, so absolutely expand */\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n.fc .fc-non-business {\n background: rgba(215, 215, 215, 0.3);\n background: var(--fc-non-business-color, rgba(215, 215, 215, 0.3));\n }\n.fc .fc-bg-event {\n background: rgb(143, 223, 130);\n background: var(--fc-bg-event-color, rgb(143, 223, 130));\n opacity: 0.3;\n opacity: var(--fc-bg-event-opacity, 0.3)\n }\n.fc .fc-bg-event .fc-event-title {\n margin: .5em;\n font-size: .85em;\n font-size: var(--fc-small-font-size, .85em);\n font-style: italic;\n }\n.fc .fc-highlight {\n background: rgba(188, 232, 241, 0.3);\n background: var(--fc-highlight-color, rgba(188, 232, 241, 0.3));\n }\n.fc .fc-cell-shaded,\n .fc .fc-day-disabled {\n background: rgba(208, 208, 208, 0.3);\n background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\n }\n/* link resets */\n/* ---------------------------------------------------------------------------------------------------- */\na.fc-event,\na.fc-event:hover {\n text-decoration: none;\n}\n/* cursor */\n.fc-event[href],\n.fc-event.fc-event-draggable {\n cursor: pointer;\n}\n/* event text content */\n/* ---------------------------------------------------------------------------------------------------- */\n.fc-event .fc-event-main {\n position: relative;\n z-index: 2;\n }\n/* dragging */\n/* ---------------------------------------------------------------------------------------------------- */\n.fc-event-dragging:not(.fc-event-selected) { /* MOUSE */\n opacity: 0.75;\n }\n.fc-event-dragging.fc-event-selected { /* TOUCH */\n box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);\n }\n/* resizing */\n/* ---------------------------------------------------------------------------------------------------- */\n/* (subclasses should hone positioning for touch and non-touch) */\n.fc-event .fc-event-resizer {\n display: none;\n position: absolute;\n z-index: 4;\n }\n.fc-event:hover, /* MOUSE */\n.fc-event-selected { /* TOUCH */\n\n}\n.fc-event:hover .fc-event-resizer, .fc-event-selected .fc-event-resizer {\n display: block;\n }\n.fc-event-selected .fc-event-resizer {\n border-radius: 4px;\n border-radius: calc(var(--fc-event-resizer-dot-total-width, 8px) / 2);\n border-width: 1px;\n border-width: var(--fc-event-resizer-dot-border-width, 1px);\n width: 8px;\n width: var(--fc-event-resizer-dot-total-width, 8px);\n height: 8px;\n height: var(--fc-event-resizer-dot-total-width, 8px);\n border-style: solid;\n border-color: inherit;\n background: #fff;\n background: var(--fc-page-bg-color, #fff)\n\n /* expand hit area */\n\n }\n.fc-event-selected .fc-event-resizer:before {\n content: \'\';\n position: absolute;\n top: -20px;\n left: -20px;\n right: -20px;\n bottom: -20px;\n }\n/* selecting (always TOUCH) */\n/* OR, focused by tab-index */\n/* (TODO: maybe not the best focus-styling for .fc-daygrid-dot-event) */\n/* ---------------------------------------------------------------------------------------------------- */\n.fc-event-selected,\n.fc-event:focus {\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2)\n\n /* expand hit area (subclasses should expand) */\n\n}\n.fc-event-selected:before, .fc-event:focus:before {\n content: "";\n position: absolute;\n z-index: 3;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n.fc-event-selected,\n.fc-event:focus {\n\n /* dimmer effect */\n\n}\n.fc-event-selected:after, .fc-event:focus:after {\n content: "";\n background: rgba(0, 0, 0, 0.25);\n background: var(--fc-event-selected-overlay-color, rgba(0, 0, 0, 0.25));\n position: absolute;\n z-index: 1;\n\n /* assume there\'s a border on all sides. overcome it. */\n /* sometimes there\'s NOT a border, in which case the dimmer will go over */\n /* an adjacent border, which looks fine. */\n top: -1px;\n left: -1px;\n right: -1px;\n bottom: -1px;\n }\n/*\nA HORIZONTAL event\n*/\n.fc-h-event { /* allowed to be top-level */\n display: block;\n border: 1px solid #3788d8;\n border: 1px solid var(--fc-event-border-color, #3788d8);\n background-color: #3788d8;\n background-color: var(--fc-event-bg-color, #3788d8)\n\n}\n.fc-h-event .fc-event-main {\n color: #fff;\n color: var(--fc-event-text-color, #fff);\n }\n.fc-h-event .fc-event-main-frame {\n display: flex; /* for make fc-event-title-container expand */\n }\n.fc-h-event .fc-event-time {\n max-width: 100%; /* clip overflow on this element */\n overflow: hidden;\n }\n.fc-h-event .fc-event-title-container { /* serves as a container for the sticky cushion */\n flex-grow: 1;\n flex-shrink: 1;\n min-width: 0; /* important for allowing to shrink all the way */\n }\n.fc-h-event .fc-event-title {\n display: inline-block; /* need this to be sticky cross-browser */\n vertical-align: top; /* for not messing up line-height */\n left: 0; /* for sticky */\n right: 0; /* for sticky */\n max-width: 100%; /* clip overflow on this element */\n overflow: hidden;\n }\n.fc-h-event.fc-event-selected:before {\n /* expand hit area */\n top: -10px;\n bottom: -10px;\n }\n/* adjust border and border-radius (if there is any) for non-start/end */\n.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),\n.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-left-width: 0;\n}\n.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),\n.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right-width: 0;\n}\n/* resizers */\n.fc-h-event:not(.fc-event-selected) .fc-event-resizer {\n top: 0;\n bottom: 0;\n width: 8px;\n width: var(--fc-event-resizer-thickness, 8px);\n}\n.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,\n.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end {\n cursor: w-resize;\n left: -4px;\n left: calc(-0.5 * var(--fc-event-resizer-thickness, 8px));\n}\n.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,\n.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start {\n cursor: e-resize;\n right: -4px;\n right: calc(-0.5 * var(--fc-event-resizer-thickness, 8px));\n}\n/* resizers for TOUCH */\n.fc-h-event.fc-event-selected .fc-event-resizer {\n top: 50%;\n margin-top: -4px;\n margin-top: calc(-0.5 * var(--fc-event-resizer-dot-total-width, 8px));\n}\n.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,\n.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end {\n left: -4px;\n left: calc(-0.5 * var(--fc-event-resizer-dot-total-width, 8px));\n}\n.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,\n.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start {\n right: -4px;\n right: calc(-0.5 * var(--fc-event-resizer-dot-total-width, 8px));\n}\n.fc .fc-popover {\n position: absolute;\n z-index: 9999;\n box-shadow: 0 2px 6px rgba(0,0,0,.15);\n }\n.fc .fc-popover-header {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 3px 4px;\n }\n.fc .fc-popover-title {\n margin: 0 2px;\n }\n.fc .fc-popover-close {\n cursor: pointer;\n opacity: 0.65;\n font-size: 1.1em;\n }\n.fc-theme-standard .fc-popover {\n border: 1px solid #ddd;\n border: 1px solid var(--fc-border-color, #ddd);\n background: #fff;\n background: var(--fc-page-bg-color, #fff);\n }\n.fc-theme-standard .fc-popover-header {\n background: rgba(208, 208, 208, 0.3);\n background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\n }\n',""]),e.exports=t},266:(e,t,n)=>{(t=n(788)(!1)).push([e.id,'\n:root {\n --fc-daygrid-event-dot-width: 8px;\n}\n/* help things clear margins of inner content */\n.fc-daygrid-day-frame,\n.fc-daygrid-day-events,\n.fc-daygrid-event-harness { /* for event top/bottom margins */\n}\n.fc-daygrid-day-frame:before, .fc-daygrid-day-events:before, .fc-daygrid-event-harness:before {\n content: "";\n clear: both;\n display: table; }\n.fc-daygrid-day-frame:after, .fc-daygrid-day-events:after, .fc-daygrid-event-harness:after {\n content: "";\n clear: both;\n display: table; }\n.fc .fc-daygrid-body { /* a
that wraps the table */\n position: relative;\n z-index: 1; /* container inner z-index\'s because s can\'t do it */\n }\n.fc .fc-daygrid-day.fc-day-today {\n background-color: rgba(255, 220, 40, 0.15);\n background-color: var(--fc-today-bg-color, rgba(255, 220, 40, 0.15));\n }\n.fc .fc-daygrid-day-frame {\n position: relative;\n min-height: 100%; /* seems to work better than `height` because sets height after rows/cells naturally do it */\n }\n.fc {\n\n /* cell top */\n\n}\n.fc .fc-daygrid-day-top {\n display: flex;\n flex-direction: row-reverse;\n }\n.fc .fc-day-other .fc-daygrid-day-top {\n opacity: 0.3;\n }\n.fc {\n\n /* day number (within cell top) */\n\n}\n.fc .fc-daygrid-day-number {\n position: relative;\n z-index: 4;\n padding: 4px;\n }\n.fc {\n\n /* event container */\n\n}\n.fc .fc-daygrid-day-events {\n margin-top: 1px; /* needs to be margin, not padding, so that available cell height can be computed */\n }\n.fc {\n\n /* positioning for balanced vs natural */\n\n}\n.fc .fc-daygrid-body-balanced .fc-daygrid-day-events {\n position: absolute;\n left: 0;\n right: 0;\n }\n.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events {\n position: relative; /* for containing abs positioned event harnesses */\n min-height: 2em; /* in addition to being a min-height during natural height, equalizes the heights a little bit */\n }\n.fc .fc-daygrid-body-natural { /* can coexist with -unbalanced */\n }\n.fc .fc-daygrid-body-natural .fc-daygrid-day-events {\n margin-bottom: 1em;\n }\n.fc {\n\n /* event harness */\n\n}\n.fc .fc-daygrid-event-harness {\n position: relative;\n }\n.fc .fc-daygrid-event-harness-abs {\n position: absolute;\n top: 0; /* fallback coords for when cannot yet be computed */\n left: 0; /* */\n right: 0; /* */\n }\n.fc .fc-daygrid-bg-harness {\n position: absolute;\n top: 0;\n bottom: 0;\n }\n.fc {\n\n /* bg content */\n\n}\n.fc .fc-daygrid-day-bg .fc-non-business { z-index: 1 }\n.fc .fc-daygrid-day-bg .fc-bg-event { z-index: 2 }\n.fc .fc-daygrid-day-bg .fc-highlight { z-index: 3 }\n.fc {\n\n /* events */\n\n}\n.fc .fc-daygrid-event {\n z-index: 6;\n margin-top: 1px;\n }\n.fc .fc-daygrid-event.fc-event-mirror {\n z-index: 7;\n }\n.fc {\n\n /* cell bottom (within day-events) */\n\n}\n.fc .fc-daygrid-day-bottom {\n font-size: .85em;\n padding: 2px 3px 0\n }\n.fc .fc-daygrid-day-bottom:before {\n content: "";\n clear: both;\n display: table; }\n.fc .fc-daygrid-more-link {\n position: relative;\n z-index: 4;\n cursor: pointer;\n }\n.fc {\n\n /* week number (within frame) */\n\n}\n.fc .fc-daygrid-week-number {\n position: absolute;\n z-index: 5;\n top: 0;\n padding: 2px;\n min-width: 1.5em;\n text-align: center;\n background-color: rgba(208, 208, 208, 0.3);\n background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\n color: #808080;\n color: var(--fc-neutral-text-color, #808080);\n }\n.fc {\n\n /* popover */\n\n}\n.fc .fc-more-popover .fc-popover-body {\n min-width: 220px;\n padding: 10px;\n }\n.fc-direction-ltr .fc-daygrid-event.fc-event-start,\n.fc-direction-rtl .fc-daygrid-event.fc-event-end {\n margin-left: 2px;\n}\n.fc-direction-ltr .fc-daygrid-event.fc-event-end,\n.fc-direction-rtl .fc-daygrid-event.fc-event-start {\n margin-right: 2px;\n}\n.fc-direction-ltr .fc-daygrid-week-number {\n left: 0;\n border-radius: 0 0 3px 0;\n }\n.fc-direction-rtl .fc-daygrid-week-number {\n right: 0;\n border-radius: 0 0 0 3px;\n }\n.fc-liquid-hack .fc-daygrid-day-frame {\n position: static; /* will cause inner absolute stuff to expand to */\n }\n.fc-daygrid-event { /* make root-level, because will be dragged-and-dropped outside of a component root */\n position: relative; /* for z-indexes assigned later */\n white-space: nowrap;\n border-radius: 3px; /* dot event needs this to when selected */\n font-size: .85em;\n font-size: var(--fc-small-font-size, .85em);\n}\n/* --- the rectangle ("block") style of event --- */\n.fc-daygrid-block-event .fc-event-time {\n font-weight: bold;\n }\n.fc-daygrid-block-event .fc-event-time,\n .fc-daygrid-block-event .fc-event-title {\n padding: 1px;\n }\n/* --- the dot style of event --- */\n.fc-daygrid-dot-event {\n display: flex;\n align-items: center;\n padding: 2px 0\n\n}\n.fc-daygrid-dot-event .fc-event-title {\n flex-grow: 1;\n flex-shrink: 1;\n min-width: 0; /* important for allowing to shrink all the way */\n overflow: hidden;\n font-weight: bold;\n }\n.fc-daygrid-dot-event:hover,\n .fc-daygrid-dot-event.fc-event-mirror {\n background: rgba(0, 0, 0, 0.1);\n }\n.fc-daygrid-dot-event.fc-event-selected:before {\n /* expand hit area */\n top: -10px;\n bottom: -10px;\n }\n.fc-daygrid-event-dot { /* the actual dot */\n margin: 0 4px;\n box-sizing: content-box;\n width: 0;\n height: 0;\n border: 4px solid #3788d8;\n border: calc(var(--fc-daygrid-event-dot-width, 8px) / 2) solid var(--fc-event-border-color, #3788d8);\n border-radius: 4px;\n border-radius: calc(var(--fc-daygrid-event-dot-width, 8px) / 2);\n}\n/* --- spacing between time and title --- */\n.fc-direction-ltr .fc-daygrid-event .fc-event-time {\n margin-right: 3px;\n }\n.fc-direction-rtl .fc-daygrid-event .fc-event-time {\n margin-left: 3px;\n }\n',""]),e.exports=t},326:(e,t,n)=>{(t=n(788)(!1)).push([e.id,'\n:root {\n --fc-list-event-dot-width: 10px;\n --fc-list-event-hover-bg-color: #f5f5f5;\n}\n.fc-theme-standard .fc-list {\n border: 1px solid #ddd;\n border: 1px solid var(--fc-border-color, #ddd);\n }\n.fc {\n\n /* message when no events */\n\n}\n.fc .fc-list-empty {\n background-color: rgba(208, 208, 208, 0.3);\n background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center; /* vertically aligns fc-list-empty-inner */\n }\n.fc .fc-list-empty-cushion {\n margin: 5em 0;\n }\n.fc {\n\n /* table within the scroller */\n /* ---------------------------------------------------------------------------------------------------- */\n\n}\n.fc .fc-list-table {\n width: 100%;\n border-style: hidden; /* kill outer border on theme */\n }\n.fc .fc-list-table tr > * {\n border-left: 0;\n border-right: 0;\n }\n.fc .fc-list-sticky .fc-list-day > * { /* the cells */\n position: sticky;\n top: 0;\n background: #fff;\n background: var(--fc-page-bg-color, #fff); /* for when headers are styled to be transparent and sticky */\n }\n.fc {\n\n /* only exists for aria reasons, hide for non-screen-readers */\n\n}\n.fc .fc-list-table thead {\n position: absolute;\n left: -10000px;\n }\n.fc {\n\n /* the table\'s border-style:hidden gets confused by hidden thead. force-hide top border of first cell */\n\n}\n.fc .fc-list-table tbody > tr:first-child th {\n border-top: 0;\n }\n.fc .fc-list-table th {\n padding: 0; /* uses an inner-wrapper instead... */\n }\n.fc .fc-list-table td,\n .fc .fc-list-day-cushion {\n padding: 8px 14px;\n }\n.fc {\n\n\n /* date heading rows */\n /* ---------------------------------------------------------------------------------------------------- */\n\n}\n.fc .fc-list-day-cushion:after {\n content: "";\n clear: both;\n display: table; /* clear floating */\n }\n.fc-theme-standard .fc-list-day-cushion {\n background-color: rgba(208, 208, 208, 0.3);\n background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\n }\n.fc-direction-ltr .fc-list-day-text,\n.fc-direction-rtl .fc-list-day-side-text {\n float: left;\n}\n.fc-direction-ltr .fc-list-day-side-text,\n.fc-direction-rtl .fc-list-day-text {\n float: right;\n}\n/* make the dot closer to the event title */\n.fc-direction-ltr .fc-list-table .fc-list-event-graphic { padding-right: 0 }\n.fc-direction-rtl .fc-list-table .fc-list-event-graphic { padding-left: 0 }\n.fc .fc-list-event.fc-event-forced-url {\n cursor: pointer; /* whole row will seem clickable */\n }\n.fc .fc-list-event:hover td {\n background-color: #f5f5f5;\n background-color: var(--fc-list-event-hover-bg-color, #f5f5f5);\n }\n.fc {\n\n /* shrink certain cols */\n\n}\n.fc .fc-list-event-graphic,\n .fc .fc-list-event-time {\n white-space: nowrap;\n width: 1px;\n }\n.fc .fc-list-event-dot {\n display: inline-block;\n box-sizing: content-box;\n width: 0;\n height: 0;\n border: 5px solid #3788d8;\n border: calc(var(--fc-list-event-dot-width, 10px) / 2) solid var(--fc-event-border-color, #3788d8);\n border-radius: 5px;\n border-radius: calc(var(--fc-list-event-dot-width, 10px) / 2);\n }\n.fc {\n\n /* reset styling */\n\n}\n.fc .fc-list-event-title a {\n color: inherit;\n text-decoration: none;\n }\n.fc {\n\n /* underline link when hovering over any part of row */\n\n}\n.fc .fc-list-event.fc-event-forced-url:hover a {\n text-decoration: underline;\n }\n',""]),e.exports=t},880:(e,t,n)=>{(t=n(788)(!1)).push([e.id,'.flatpickr-calendar {\n background: transparent;\n opacity: 0;\n display: none;\n text-align: center;\n visibility: hidden;\n padding: 0;\n -webkit-animation: none;\n animation: none;\n direction: ltr;\n border: 0;\n font-size: 14px;\n line-height: 24px;\n border-radius: 5px;\n position: absolute;\n width: 307.875px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n background: #fff;\n -webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);\n box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);\n}\n.flatpickr-calendar.open,\n.flatpickr-calendar.inline {\n opacity: 1;\n max-height: 640px;\n visibility: visible;\n}\n.flatpickr-calendar.open {\n display: inline-block;\n z-index: 99999;\n}\n.flatpickr-calendar.animate.open {\n -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);\n animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.flatpickr-calendar.inline {\n display: block;\n position: relative;\n top: 2px;\n}\n.flatpickr-calendar.static {\n position: absolute;\n top: calc(100% + 2px);\n}\n.flatpickr-calendar.static.open {\n z-index: 999;\n display: block;\n}\n.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n}\n.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {\n -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n}\n.flatpickr-calendar .hasWeeks .dayContainer,\n.flatpickr-calendar .hasTime .dayContainer {\n border-bottom: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.flatpickr-calendar .hasWeeks .dayContainer {\n border-left: 0;\n}\n.flatpickr-calendar.hasTime .flatpickr-time {\n height: 40px;\n border-top: 1px solid #e6e6e6;\n}\n.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {\n height: auto;\n}\n.flatpickr-calendar:before,\n.flatpickr-calendar:after {\n position: absolute;\n display: block;\n pointer-events: none;\n border: solid transparent;\n content: \'\';\n height: 0;\n width: 0;\n left: 22px;\n}\n.flatpickr-calendar.rightMost:before,\n.flatpickr-calendar.arrowRight:before,\n.flatpickr-calendar.rightMost:after,\n.flatpickr-calendar.arrowRight:after {\n left: auto;\n right: 22px;\n}\n.flatpickr-calendar.arrowCenter:before,\n.flatpickr-calendar.arrowCenter:after {\n left: 50%;\n right: 50%;\n}\n.flatpickr-calendar:before {\n border-width: 5px;\n margin: 0 -5px;\n}\n.flatpickr-calendar:after {\n border-width: 4px;\n margin: 0 -4px;\n}\n.flatpickr-calendar.arrowTop:before,\n.flatpickr-calendar.arrowTop:after {\n bottom: 100%;\n}\n.flatpickr-calendar.arrowTop:before {\n border-bottom-color: #e6e6e6;\n}\n.flatpickr-calendar.arrowTop:after {\n border-bottom-color: #fff;\n}\n.flatpickr-calendar.arrowBottom:before,\n.flatpickr-calendar.arrowBottom:after {\n top: 100%;\n}\n.flatpickr-calendar.arrowBottom:before {\n border-top-color: #e6e6e6;\n}\n.flatpickr-calendar.arrowBottom:after {\n border-top-color: #fff;\n}\n.flatpickr-calendar:focus {\n outline: 0;\n}\n.flatpickr-wrapper {\n position: relative;\n display: inline-block;\n}\n.flatpickr-months {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n.flatpickr-months .flatpickr-month {\n background: transparent;\n color: rgba(0,0,0,0.9);\n fill: rgba(0,0,0,0.9);\n height: 34px;\n line-height: 1;\n text-align: center;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\n.flatpickr-months .flatpickr-prev-month,\n.flatpickr-months .flatpickr-next-month {\n text-decoration: none;\n cursor: pointer;\n position: absolute;\n top: 0;\n height: 34px;\n padding: 10px;\n z-index: 3;\n color: rgba(0,0,0,0.9);\n fill: rgba(0,0,0,0.9);\n}\n.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,\n.flatpickr-months .flatpickr-next-month.flatpickr-disabled {\n display: none;\n}\n.flatpickr-months .flatpickr-prev-month i,\n.flatpickr-months .flatpickr-next-month i {\n position: relative;\n}\n.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,\n.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {\n/*\n /*rtl:begin:ignore*/\n/*\n */\n left: 0;\n/*\n /*rtl:end:ignore*/\n/*\n */\n}\n/*\n /*rtl:begin:ignore*/\n/*\n /*rtl:end:ignore*/\n.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,\n.flatpickr-months .flatpickr-next-month.flatpickr-next-month {\n/*\n /*rtl:begin:ignore*/\n/*\n */\n right: 0;\n/*\n /*rtl:end:ignore*/\n/*\n */\n}\n/*\n /*rtl:begin:ignore*/\n/*\n /*rtl:end:ignore*/\n.flatpickr-months .flatpickr-prev-month:hover,\n.flatpickr-months .flatpickr-next-month:hover {\n color: #959ea9;\n}\n.flatpickr-months .flatpickr-prev-month:hover svg,\n.flatpickr-months .flatpickr-next-month:hover svg {\n fill: #f64747;\n}\n.flatpickr-months .flatpickr-prev-month svg,\n.flatpickr-months .flatpickr-next-month svg {\n width: 14px;\n height: 14px;\n}\n.flatpickr-months .flatpickr-prev-month svg path,\n.flatpickr-months .flatpickr-next-month svg path {\n -webkit-transition: fill 0.1s;\n transition: fill 0.1s;\n fill: inherit;\n}\n.numInputWrapper {\n position: relative;\n height: auto;\n}\n.numInputWrapper input,\n.numInputWrapper span {\n display: inline-block;\n}\n.numInputWrapper input {\n width: 100%;\n}\n.numInputWrapper input::-ms-clear {\n display: none;\n}\n.numInputWrapper input::-webkit-outer-spin-button,\n.numInputWrapper input::-webkit-inner-spin-button {\n margin: 0;\n -webkit-appearance: none;\n}\n.numInputWrapper span {\n position: absolute;\n right: 0;\n width: 14px;\n padding: 0 4px 0 2px;\n height: 50%;\n line-height: 50%;\n opacity: 0;\n cursor: pointer;\n border: 1px solid rgba(57,57,57,0.15);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.numInputWrapper span:hover {\n background: rgba(0,0,0,0.1);\n}\n.numInputWrapper span:active {\n background: rgba(0,0,0,0.2);\n}\n.numInputWrapper span:after {\n display: block;\n content: "";\n position: absolute;\n}\n.numInputWrapper span.arrowUp {\n top: 0;\n border-bottom: 0;\n}\n.numInputWrapper span.arrowUp:after {\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-bottom: 4px solid rgba(57,57,57,0.6);\n top: 26%;\n}\n.numInputWrapper span.arrowDown {\n top: 50%;\n}\n.numInputWrapper span.arrowDown:after {\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 4px solid rgba(57,57,57,0.6);\n top: 40%;\n}\n.numInputWrapper span svg {\n width: inherit;\n height: auto;\n}\n.numInputWrapper span svg path {\n fill: rgba(0,0,0,0.5);\n}\n.numInputWrapper:hover {\n background: rgba(0,0,0,0.05);\n}\n.numInputWrapper:hover span {\n opacity: 1;\n}\n.flatpickr-current-month {\n font-size: 135%;\n line-height: inherit;\n font-weight: 300;\n color: inherit;\n position: absolute;\n width: 75%;\n left: 12.5%;\n padding: 7.48px 0 0 0;\n line-height: 1;\n height: 34px;\n display: inline-block;\n text-align: center;\n -webkit-transform: translate3d(0px, 0px, 0px);\n transform: translate3d(0px, 0px, 0px);\n}\n.flatpickr-current-month span.cur-month {\n font-family: inherit;\n font-weight: 700;\n color: inherit;\n display: inline-block;\n margin-left: 0.5ch;\n padding: 0;\n}\n.flatpickr-current-month span.cur-month:hover {\n background: rgba(0,0,0,0.05);\n}\n.flatpickr-current-month .numInputWrapper {\n width: 6ch;\n width: 7ch\\0;\n display: inline-block;\n}\n.flatpickr-current-month .numInputWrapper span.arrowUp:after {\n border-bottom-color: rgba(0,0,0,0.9);\n}\n.flatpickr-current-month .numInputWrapper span.arrowDown:after {\n border-top-color: rgba(0,0,0,0.9);\n}\n.flatpickr-current-month input.cur-year {\n background: transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: inherit;\n cursor: text;\n padding: 0 0 0 0.5ch;\n margin: 0;\n display: inline-block;\n font-size: inherit;\n font-family: inherit;\n font-weight: 300;\n line-height: inherit;\n height: auto;\n border: 0;\n border-radius: 0;\n vertical-align: initial;\n -webkit-appearance: textfield;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.flatpickr-current-month input.cur-year:focus {\n outline: 0;\n}\n.flatpickr-current-month input.cur-year[disabled],\n.flatpickr-current-month input.cur-year[disabled]:hover {\n font-size: 100%;\n color: rgba(0,0,0,0.5);\n background: transparent;\n pointer-events: none;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months {\n appearance: menulist;\n background: transparent;\n border: none;\n border-radius: 0;\n box-sizing: border-box;\n color: inherit;\n cursor: pointer;\n font-size: inherit;\n font-family: inherit;\n font-weight: 300;\n height: auto;\n line-height: inherit;\n margin: -1px 0 0 0;\n outline: none;\n padding: 0 0 0 0.5ch;\n position: relative;\n vertical-align: initial;\n -webkit-box-sizing: border-box;\n -webkit-appearance: menulist;\n -moz-appearance: menulist;\n width: auto;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months:focus,\n.flatpickr-current-month .flatpickr-monthDropdown-months:active {\n outline: none;\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months:hover {\n background: rgba(0,0,0,0.05);\n}\n.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {\n background-color: transparent;\n outline: none;\n padding: 0;\n}\n.flatpickr-weekdays {\n background: transparent;\n text-align: center;\n overflow: hidden;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n height: 28px;\n}\n.flatpickr-weekdays .flatpickr-weekdaycontainer {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n}\nspan.flatpickr-weekday {\n cursor: default;\n font-size: 90%;\n background: transparent;\n color: rgba(0,0,0,0.54);\n line-height: 1;\n margin: 0;\n text-align: center;\n display: block;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n font-weight: bolder;\n}\n.dayContainer,\n.flatpickr-weeks {\n padding: 1px 0 0 0;\n}\n.flatpickr-days {\n position: relative;\n overflow: hidden;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: start;\n -webkit-align-items: flex-start;\n -ms-flex-align: start;\n align-items: flex-start;\n width: 307.875px;\n}\n.flatpickr-days:focus {\n outline: 0;\n}\n.dayContainer {\n padding: 0;\n outline: 0;\n text-align: left;\n width: 307.875px;\n min-width: 307.875px;\n max-width: 307.875px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n display: -ms-flexbox;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-flex-wrap: wrap;\n flex-wrap: wrap;\n -ms-flex-wrap: wrap;\n -ms-flex-pack: justify;\n -webkit-justify-content: space-around;\n justify-content: space-around;\n -webkit-transform: translate3d(0px, 0px, 0px);\n transform: translate3d(0px, 0px, 0px);\n opacity: 1;\n}\n.dayContainer + .dayContainer {\n -webkit-box-shadow: -1px 0 0 #e6e6e6;\n box-shadow: -1px 0 0 #e6e6e6;\n}\n.flatpickr-day {\n background: none;\n border: 1px solid transparent;\n border-radius: 150px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #393939;\n cursor: pointer;\n font-weight: 400;\n width: 14.2857143%;\n -webkit-flex-basis: 14.2857143%;\n -ms-flex-preferred-size: 14.2857143%;\n flex-basis: 14.2857143%;\n max-width: 39px;\n height: 39px;\n line-height: 39px;\n margin: 0;\n display: inline-block;\n position: relative;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n text-align: center;\n}\n.flatpickr-day.inRange,\n.flatpickr-day.prevMonthDay.inRange,\n.flatpickr-day.nextMonthDay.inRange,\n.flatpickr-day.today.inRange,\n.flatpickr-day.prevMonthDay.today.inRange,\n.flatpickr-day.nextMonthDay.today.inRange,\n.flatpickr-day:hover,\n.flatpickr-day.prevMonthDay:hover,\n.flatpickr-day.nextMonthDay:hover,\n.flatpickr-day:focus,\n.flatpickr-day.prevMonthDay:focus,\n.flatpickr-day.nextMonthDay:focus {\n cursor: pointer;\n outline: 0;\n background: #e6e6e6;\n border-color: #e6e6e6;\n}\n.flatpickr-day.today {\n border-color: #959ea9;\n}\n.flatpickr-day.today:hover,\n.flatpickr-day.today:focus {\n border-color: #959ea9;\n background: #959ea9;\n color: #fff;\n}\n.flatpickr-day.selected,\n.flatpickr-day.startRange,\n.flatpickr-day.endRange,\n.flatpickr-day.selected.inRange,\n.flatpickr-day.startRange.inRange,\n.flatpickr-day.endRange.inRange,\n.flatpickr-day.selected:focus,\n.flatpickr-day.startRange:focus,\n.flatpickr-day.endRange:focus,\n.flatpickr-day.selected:hover,\n.flatpickr-day.startRange:hover,\n.flatpickr-day.endRange:hover,\n.flatpickr-day.selected.prevMonthDay,\n.flatpickr-day.startRange.prevMonthDay,\n.flatpickr-day.endRange.prevMonthDay,\n.flatpickr-day.selected.nextMonthDay,\n.flatpickr-day.startRange.nextMonthDay,\n.flatpickr-day.endRange.nextMonthDay {\n background: #569ff7;\n -webkit-box-shadow: none;\n box-shadow: none;\n color: #fff;\n border-color: #569ff7;\n}\n.flatpickr-day.selected.startRange,\n.flatpickr-day.startRange.startRange,\n.flatpickr-day.endRange.startRange {\n border-radius: 50px 0 0 50px;\n}\n.flatpickr-day.selected.endRange,\n.flatpickr-day.startRange.endRange,\n.flatpickr-day.endRange.endRange {\n border-radius: 0 50px 50px 0;\n}\n.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),\n.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),\n.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {\n -webkit-box-shadow: -10px 0 0 #569ff7;\n box-shadow: -10px 0 0 #569ff7;\n}\n.flatpickr-day.selected.startRange.endRange,\n.flatpickr-day.startRange.startRange.endRange,\n.flatpickr-day.endRange.startRange.endRange {\n border-radius: 50px;\n}\n.flatpickr-day.inRange {\n border-radius: 0;\n -webkit-box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\n}\n.flatpickr-day.flatpickr-disabled,\n.flatpickr-day.flatpickr-disabled:hover,\n.flatpickr-day.prevMonthDay,\n.flatpickr-day.nextMonthDay,\n.flatpickr-day.notAllowed,\n.flatpickr-day.notAllowed.prevMonthDay,\n.flatpickr-day.notAllowed.nextMonthDay {\n color: rgba(57,57,57,0.3);\n background: transparent;\n border-color: transparent;\n cursor: default;\n}\n.flatpickr-day.flatpickr-disabled,\n.flatpickr-day.flatpickr-disabled:hover {\n cursor: not-allowed;\n color: rgba(57,57,57,0.1);\n}\n.flatpickr-day.week.selected {\n border-radius: 0;\n -webkit-box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;\n box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;\n}\n.flatpickr-day.hidden {\n visibility: hidden;\n}\n.rangeMode .flatpickr-day {\n margin-top: 1px;\n}\n.flatpickr-weekwrapper {\n float: left;\n}\n.flatpickr-weekwrapper .flatpickr-weeks {\n padding: 0 12px;\n -webkit-box-shadow: 1px 0 0 #e6e6e6;\n box-shadow: 1px 0 0 #e6e6e6;\n}\n.flatpickr-weekwrapper .flatpickr-weekday {\n float: none;\n width: 100%;\n line-height: 28px;\n}\n.flatpickr-weekwrapper span.flatpickr-day,\n.flatpickr-weekwrapper span.flatpickr-day:hover {\n display: block;\n width: 100%;\n max-width: none;\n color: rgba(57,57,57,0.3);\n background: transparent;\n cursor: default;\n border: none;\n}\n.flatpickr-innerContainer {\n display: block;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n}\n.flatpickr-rContainer {\n display: inline-block;\n padding: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.flatpickr-time {\n text-align: center;\n outline: 0;\n display: block;\n height: 0;\n line-height: 40px;\n max-height: 40px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n}\n.flatpickr-time:after {\n content: "";\n display: table;\n clear: both;\n}\n.flatpickr-time .numInputWrapper {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n -ms-flex: 1;\n flex: 1;\n width: 40%;\n height: 40px;\n float: left;\n}\n.flatpickr-time .numInputWrapper span.arrowUp:after {\n border-bottom-color: #393939;\n}\n.flatpickr-time .numInputWrapper span.arrowDown:after {\n border-top-color: #393939;\n}\n.flatpickr-time.hasSeconds .numInputWrapper {\n width: 26%;\n}\n.flatpickr-time.time24hr .numInputWrapper {\n width: 49%;\n}\n.flatpickr-time input {\n background: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n border: 0;\n border-radius: 0;\n text-align: center;\n margin: 0;\n padding: 0;\n height: inherit;\n line-height: inherit;\n color: #393939;\n font-size: 14px;\n position: relative;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-appearance: textfield;\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.flatpickr-time input.flatpickr-hour {\n font-weight: bold;\n}\n.flatpickr-time input.flatpickr-minute,\n.flatpickr-time input.flatpickr-second {\n font-weight: 400;\n}\n.flatpickr-time input:focus {\n outline: 0;\n border: 0;\n}\n.flatpickr-time .flatpickr-time-separator,\n.flatpickr-time .flatpickr-am-pm {\n height: inherit;\n float: left;\n line-height: inherit;\n color: #393939;\n font-weight: bold;\n width: 2%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n}\n.flatpickr-time .flatpickr-am-pm {\n outline: 0;\n width: 18%;\n cursor: pointer;\n text-align: center;\n font-weight: 400;\n}\n.flatpickr-time input:hover,\n.flatpickr-time .flatpickr-am-pm:hover,\n.flatpickr-time input:focus,\n.flatpickr-time .flatpickr-am-pm:focus {\n background: #eee;\n}\n.flatpickr-input[readonly] {\n cursor: pointer;\n}\n@-webkit-keyframes fpFadeInDown {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -20px, 0);\n transform: translate3d(0, -20px, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n@keyframes fpFadeInDown {\n from {\n opacity: 0;\n -webkit-transform: translate3d(0, -20px, 0);\n transform: translate3d(0, -20px, 0);\n }\n to {\n opacity: 1;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n',""]),e.exports=t},386:(e,t,n)=>{var r=n(379),o=n(46);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);r(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},728:(e,t,n)=>{var r=n(379),o=n(266);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);r(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},734:(e,t,n)=>{var r=n(379),o=n(326);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);r(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},117:(e,t,n)=>{var r=n(379),o=n(880);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);r(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},379:(e,t,n)=>{"use strict";var r,o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n{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.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})};var r={};(()=>{"use strict";function e(t,n){return e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e(t,n)}function t(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,e(t,n)}n.r(r);const o=flarum.core.compat.app;var i=n.n(o);const a=flarum.core.compat["components/Page"];var s=n.n(a);flarum.core.compat["utils/ItemList"];const l=flarum.core.compat["helpers/listItems"];var c=n.n(l);const u=flarum.core.compat["components/IndexPage"];var d=n.n(u);flarum.core.compat["components/SelectDropdown"];var f=function(e,t){return f=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])},f(e,t)};function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n2&&(a.children=arguments.length>3?v.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return T(e,a,r,o,null)}function T(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++b:o};return null==o&&null!=y.vnode&&y.vnode(i),i}function R(e){return e.children}function I(e,t){this.props=e,this.context=t}function N(e,t){if(null==t)return e.__?N(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?T(p.type,p.props,p.key,null,p.__v):p)){if(p.__=n,p.__b=n.__b+1,null===(f=m[u])||f&&p.key==f.key&&p.type===f.type)m[u]=void 0;else for(d=0;d3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(e)}}),J(M(be,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}(me.prototype=new I).__e=function(e){var t=this,n=ve(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),ye(t,e,r)):o()};n?n(i):i()}},me.prototype.render=function(e){this.u=null,this.o=new Map;var t=L(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},me.prototype.componentDidUpdate=me.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){ye(e,n,t)}))};var De="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ee=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ae="undefined"!=typeof document,Ce=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};I.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(I.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var ke=y.event;function xe(){}function Se(){return this.cancelBubble}function _e(){return this.defaultPrevented}y.event=function(e){return ke&&(e=ke(e)),e.persist=xe,e.isPropagationStopped=Se,e.isDefaultPrevented=_e,e.nativeEvent=e};var Me={configurable:!0,get:function(){return this.class}},Te=y.vnode;y.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in r={},n){var a=n[i];Ae&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in n&&null==a||("defaultValue"===i&&"value"in n&&null==n.value?i="value":"download"===i&&!0===a?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!Ce(n.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():o&&Ee.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),r[i]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=L(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=L(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Me.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Me))}e.$$typeof=De,Te&&Te(e)};var Re=y.__r;y.__r=function(e){Re&&Re(e),e.__c};var Ie="undefined"!=typeof globalThis?globalThis:window;Ie.FullCalendarVDom?console.warn("FullCalendar VDOM already loaded"):Ie.FullCalendarVDom={Component:I,createElement:M,render:J,createRef:function(){return{current:null}},Fragment:R,createContext:function(e){var t=function(e,t){var n={__c:t="__cC"+A++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(P)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var o=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&o.forEach((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){o.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){o.splice(o.indexOf(e),1),t&&t.call(e)}}}return r},t},createPortal:function(e,t){return M(we,{__v:e,i:t})},flushToDom:function(){var e=y.debounceRendering,t=[];for(y.debounceRendering=function(e){t.push(e)},J(M(Ne,{}),document.createElement("div"));t.length;)t.shift()();y.debounceRendering=e},unmountComponentAtNode:function(e){J(null,e)}};var Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.render=function(){return M("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(I);if(n(386),"undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Oe=FullCalendarVDom.Component,Pe=FullCalendarVDom.createElement,He=FullCalendarVDom.render,Be=FullCalendarVDom.createRef,Fe=FullCalendarVDom.Fragment,Le=FullCalendarVDom.createContext,Ue=FullCalendarVDom.createPortal,ze=FullCalendarVDom.flushToDom,je=FullCalendarVDom.unmountComponentAtNode,We=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],isRefetch:!0})},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}),Object.defineProperty(e.prototype,"format",{get:function(){return this.internalEventSource.meta.format},enumerable:!1,configurable:!0}),e}();function Ve(e){e.parentNode&&e.parentNode.removeChild(e)}function Ye(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(Qe(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function Qe(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}var Ge=/(top|left|right|bottom|width|height)$/i;function qe(e,t){for(var n in t)Ze(e,n,t[n])}function Ze(e,t,n){null==n?e.style[t]="":"number"==typeof n&&Ge.test(t)?e.style[t]=n+"px":e.style[t]=n}function Xe(e){var t,n;return null!==(n=null===(t=e.composedPath)||void 0===t?void 0:t.call(e)[0])&&void 0!==n?n:e.target}function Je(e){return e.getRootNode?e.getRootNode():document}var Ke=0;function $e(){return"fc-dom-"+(Ke+=1)}function et(e){e.preventDefault()}function tt(e,t,n,r){var o=function(e,t){return function(n){var r=Ye(n.target,e);r&&t.call(r,n,r)}}(n,r);return e.addEventListener(t,o),function(){e.removeEventListener(t,o)}}var nt=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function rt(e){return h({onClick:e},ot(e))}function ot(e){return{tabIndex:0,onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(e(t),t.preventDefault())}}}var it=0;function at(){return String(it+=1)}function st(){document.body.classList.add("fc-not-allowed")}function lt(){document.body.classList.remove("fc-not-allowed")}function ct(e,t,n){return n.func?n.func(e,t):function(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}(e[n.field],t[n.field])*(n.order||1)}function ut(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function dt(e,t,n){return"function"==typeof e?e.apply(void 0,t):"string"==typeof e?t.reduce((function(e,t,n){return e.replace("$"+n,t||"")}),e):n}function ft(e,t){return e-t}function pt(e){return e%1==0}function ht(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 gt=["sun","mon","tue","wed","thu","fri","sat"];function vt(e,t){var n=xt(e);return n[2]+=7*t,St(n)}function mt(e,t){var n=xt(e);return n[2]+=t,St(n)}function yt(e,t){var n=xt(e);return n[6]+=t,St(n)}function bt(e,t){return(t.valueOf()-e.valueOf())/864e5}function wt(e,t){return Mt(e)===Mt(t)?Math.round(bt(e,t)):null}function Dt(e){return St([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function Et(e,t,n,r){var o=St([t,0,1+At(t,n,r)]),i=Dt(e),a=Math.round(bt(o,i));return Math.floor(a/7)+1}function At(e,t,n){var r=7+t-n;return-(7+St([e,0,r]).getUTCDay()-t)%7+r-1}function Ct(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function kt(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 xt(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function St(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function _t(e){return!isNaN(e.valueOf())}function Mt(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Tt(e,t,n,r){return{instanceId:at(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Rt=Object.prototype.hasOwnProperty;function It(e,t){var n={};if(t)for(var r in t){for(var o=[],i=e.length-1;i>=0;i-=1){var a=e[i][r];if("object"==typeof a&&a)o.unshift(a);else if(void 0!==a){n[r]=a;break}}o.length&&(n[r]=It(o))}for(i=e.length-1;i>=0;i-=1){var s=e[i];for(var l in s)l in n||(n[l]=s[l])}return n}function Nt(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Ot(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Pt(e){for(var t={},n=0,r=e;n1)||"numeric"!==s.year&&"2-digit"!==s.year||"numeric"!==s.month&&"2-digit"!==s.month||"numeric"!==s.day&&"2-digit"!==s.day||(u=1);var d=this.format(e,n),f=this.format(t,n);if(d===f)return d;var p=ln(function(e,t){var n={};for(var r in e)(!(r in en)||en[r]<=t)&&(n[r]=e[r]);return n}(s,u),l,n),h=p(e),g=p(t),v=function(e,t,n,r){for(var o=0;o=Qt(t)&&(r=mt(r,1))}return e.start&&(n=Dt(e.start),r&&r<=n&&(r=mt(n,1))),{start:n,end:r}}function Vn(e,t,n,r){return"year"===r?Wt(n.diffWholeYears(e,t),"year"):"month"===r?Wt(n.diffWholeMonths(e,t),"month"):(i=t,a=Dt(o=e),s=Dt(i),{years:0,months:0,days:Math.round(bt(a,s)),milliseconds:i.valueOf()-s.valueOf()-(o.valueOf()-a.valueOf())});var o,i,a,s}function Yn(e,t){var n,r,o=[],i=t.start;for(e.sort(Qn),n=0;ni&&o.push({start:i,end:r.start}),r.end>i&&(i=r.end);return it.start)&&(null===e.start||null===t.end||e.start=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function Xn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t=(n||t.end),isToday:t&&Xn(t,r.start)}}function cr(e,t){var n=e.eventRange,r=n.def,o=n.instance,i=r.url;if(i)return{href:i};var a=t.emitter,s=t.options.eventInteractive;return null==s&&null==(s=r.interactive)&&(s=Boolean(a.hasHandlers("eventClick"))),s?ot((function(e){a.trigger("eventClick",{el:e.target,event:new xr(t,r,o),jsEvent:e,view:t.viewApi})})):{}}var ur={start:An,end:An,allDay:Boolean};function dr(e,t,n){return h(h({},fr(e,t,n)),{timeZone:t.timeZone})}function fr(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 pr(e,t,n){var r=Ln({editable:!1},n),o=zn(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:tr(o,t),instance:Tt(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function hr(e,t,n){n.emitter.trigger("select",h(h({},gr(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function gr(e,t){for(var n,r,o={},i=0,a=t.pluginHooks.dateSpanTransforms;i=0;r-=1){var o=n[r].parseMeta(e);if(o)return{sourceDefId:r,meta:o}}return null}(i,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:at(),sourceDefId:s.sourceDefId,meta:s.meta,ui:In(i,t),extendedProps:a}}return null}function Ar(e){return h(h(h({},Tn),Dr),e.pluginHooks.eventSourceRefiners)}function Cr(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var kr=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=1?Math.min(o,i):o}(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=yt(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",Zt(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?St(Ct(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?St(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-kt(xt(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(xt(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?kt(xt(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(xt(e))*60):new Date(e.valueOf()-(t||0))},e}(),Or=[],Pr={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",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},Hr=h(h({},Pr),{buttonHints:{prev:"Previous $0",next:"Next $0",today:function(e,t){return"day"===t?"Today":"This "+e}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint:function(e){return"Show "+e+" more event"+(1===e?"":"s")}});function Br(e){for(var t=e.length>0?e[0].code:"en",n=Or.concat(e),r={en:Hr},o=0,i=n;o0;o-=1){var i=r.slice(0,o).join("-");if(t[i])return t[i]}return null}(n,t)||Hr;return Lr(e,n,r)}(e,t):Lr(e.code,[e.code],e)}function Lr(e,t,n){var r=It([Pr,n],["buttonText"]);delete r.code;var o=r.week;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}var Ur,zr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function jr(e,t){return e.left>=t.left&&e.left=t.top&&e.top
",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}()),Ur}var Yr={defs:{},instances:{}};function Qr(e,t,n){var r=[];e&&r.push(e),t&&r.push(t);var o={"":Nn(r)};return n&&h(o,n),o}function Gr(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!Xn(r.activeRange,e)),isOther:Boolean(r&&!Xn(r.currentRange,e)),isToday:Boolean(t&&Xn(t,e)),isPast:Boolean(n?en:!!t&&e>=t.end)}}function qr(e,t){var n=["fc-day","fc-day-"+gt[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(){function e(){this.getKeysForEventDefs=Jt(this._getKeysForEventDefs),this.splitDateSelection=Jt(this._splitDateSpan),this.splitEventStore=Jt(this._splitEventStore),this.splitIndividualUi=Jt(this._splitIndividualUi),this.splitEventDrag=Jt(this._splitInteraction),this.splitEventResize=Jt(this._splitInteraction),this.eventUiBuilders={}}e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),o=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),s=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),c={};for(var u in this.eventUiBuilders=Ot(n,(function(e,n){return t.eventUiBuilders[n]||Jt(Qr)})),n){var d=n[u],f=a[u]||Yr,p=this.eventUiBuilders[u];c[u]={businessHours:d.businessHours||e.businessHours,dateSelection:o[u]||null,eventStore:f,eventUiBases:p(e.eventUiBases[""],d.ui,i[u]),eventSelection:f.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[u]||null,eventResize:l[u]||null}}return c},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n
",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return Ve(e),t}()),$r&&"rtl"===n.direction?c.scrollbarLeft=l:c.scrollbarRight=l,t&&(c.paddingLeft=parseInt(n.paddingLeft,10)||0,c.paddingRight=parseInt(n.paddingRight,10)||0,c.paddingTop=parseInt(n.paddingTop,10)||0,c.paddingBottom=parseInt(n.paddingBottom,10)||0),c}(e,t),i={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return t&&(i.left+=o.paddingLeft,i.right-=o.paddingRight,i.top+=o.paddingTop,i.bottom-=o.paddingBottom),i}function no(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 ro(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}var oo=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=n[t]&&e=n[t]&&e0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()0},e.prototype.canScrollRight=function(){return this.getScrollLeft()=u.end?new Date(u.end.valueOf()-1):c),o=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,i),s=a=this.trimHiddenDays(a),d.showNonCurrentDates||(s=Gn(s,o.range)),s=Gn(s=this.adjustActiveRange(s),r),l=qn(o.range,r),{validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:i,activeRange:s,renderRange:a,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(o.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,o=null,i=null,a=null;return r.duration?(o=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,t,o,i)):(n=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=Gt(o=this.getFallbackDuration()).unit,a=this.buildRangeFromDuration(e,t,o,i)),{duration:o,unit:i,range:a}},e.prototype.getFallbackDuration=function(){return Wt({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,o=t.slotMinTime,i=t.slotMaxTime,a=e.start,s=e.end;return r&&(Yt(o)<0&&(a=Dt(a),a=n.add(a,o)),Yt(i)>1&&(s=mt(s=Dt(s),-1),s=n.add(s,i))),{start:a,end:s}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var o,i,a,s=this.props,l=s.dateEnv,c=s.dateAlignment;if(!c){var u=this.props.dateIncrement;c=u&&Qt(u)e.fetchRange.end:!e.latestFetchId}(e,t,n)})),t,!1,n)}function Uo(e,t,n,r,o){var i={};for(var a in e){var s=e[a];t[a]?i[a]=zo(s,n,r,o):i[a]=s}return i}function zo(e,t,n,r){var o=r.options,i=r.calendarApi,a=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=at();return a.fetch({eventSource:e,range:t,isRefetch:n,context:r},(function(n){var a=n.rawEvents;o.eventSourceSuccess&&(a=o.eventSourceSuccess.call(i,a,n.xhr)||a),e.success&&(a=e.success.call(i,a,n.xhr)||a),r.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:a})}),(function(n){console.warn(n.message,n),o.eventSourceFailure&&o.eventSourceFailure.call(i,n),e.failure&&e.failure(n),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})})),h(h({},e),{isFetching:!0,latestFetchId:s})}function jo(e,t){return Nt(e,(function(e){return Wo(e,t)}))}function Wo(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Vo(e,t){var n;if(t){n=[];for(var r=0,o=e;r=200&&a.status<400){var e=!1,t=void 0;try{t=JSON.parse(a.responseText),e=!0}catch(e){}e?r(t,a):o("Failure parsing JSON",a)}else o("Request failed",a)},a.onerror=function(){o("Request failed",a)},a.send(i)}(r.method,r.url,o,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),wo({recurringTypes:[ei],eventRefiners:{daysOfWeek:An,startTime:Wt,endTime:Wt,duration:Wt,startRecur:An,endRecur:An}}),wo({optionChangeHandlers:{events:function(e,t){ti([e],t)},eventSources:ti}}),wo({isLoadingFuncs:[function(e){return Bo(e.eventSources)}],contentTypeHandlers:{html:function(){var e=null,t="";return{render:function(n,r){n===e&&r===t||(n.innerHTML=r),e=n,t=r},destroy:function(){e.innerHTML="",e=null,t=""}}},domNodes:function(){var e=null,t=[];function n(){t.forEach(Ve),t=[],e=null}return{render:function(r,o){var i=Array.prototype.slice.call(o);if(r!==e||!Xt(t,i)){for(var a=0,s=i;a1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var ai=function(){function e(e){var t,n,r,o=this;this.computeOptionsData=Jt(this._computeOptionsData),this.computeCurrentViewData=Jt(this._computeCurrentViewData),this.organizeRawLocales=Jt(Br),this.buildLocale=Jt(Fr),this.buildPluginHooks=(n=[],r=[],function(e,o){return t&&Xt(e,n)&&Xt(o,r)||(t=function(e,t){var n={},r={reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],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,i=e;ta.end&&(r+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:a.end,end:i.end}},o)),r?(n.push.apply(n,g([{index:e.index,thickness:e.thickness,span:wi(a,i)}],o)),r):(n.push(e),0)},e.prototype.insertEntryAt=function(e,t){var n=this.entriesByLevel,r=this.levelCoords;-1===t.lateral?(Di(r,t.level,t.levelCoord),Di(n,t.level,[e])):Di(n[t.level],t.lateral,e),this.stackCnts[bi(e)]=t.stackCnt},e.prototype.findInsertion=function(e){for(var t=this,n=t.levelCoords,r=t.entriesByLevel,o=t.strictOrder,i=t.stackCnts,a=n.length,s=0,l=-1,c=-1,u=null,d=0,f=0;f=s+e.thickness)break;for(var h=r[f],g=void 0,v=Ei(h,e.span.start,yi),m=v[0]+v[1];(g=h[m])&&g.span.starts&&(s=y,u=g,l=f,c=m),y===s&&(d=Math.max(d,i[bi(g)]+1)),m+=1}}var b=0;if(u)for(b=l+1;bn(e[o-1]))return[o,0];for(;ra))return[i,1];r=i+1}}return[r,0]}var Ai=function(){function e(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}return e.prototype.destroy=function(){},e}();function Ci(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}function ki(e){var t;return(t={})[e.component.uid]=e,t}var xi={},Si=function(){function e(e,t){this.emitter=new oo}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),_i={},Mi={startTime:Wt,duration:Wt,create:Boolean,sourceId:String};function Ti(e){var t=En(e,Mi),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 Ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Pe.apply(void 0,g(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,r=[],o=!0,i=0,a=e;i1){var m=o&&n.getClass("buttonGroup")||"";return Pe.apply(void 0,g(["div",{className:m}],r))}return r[0]},t}(go),Ii=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,o=n.extraClassName,i=!1,a=r.sectionWidgets,s=a.center;return a.left?(i=!0,e=a.left):e=a.start,a.right?(i=!0,t=a.right):t=a.end,Pe("div",{className:[o||"","fc-toolbar",i?"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 Pe(Ri,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})},t}(go),Ni=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,yo(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return p(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"],o="",i="";return n?null!==t.availableWidth?o=t.availableWidth/n:i=1/n*100+"%":o=e.height||"",Pe("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(" "),style:{height:o,paddingBottom:i}},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}(go),Oi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,o=r.context,i=$n(t);if(i&&r.isValidSegDownEl(e.target)){var a=Ye(e.target,".fc-event-forced-url"),s=a?a.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:t,event:new xr(r.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:o.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},n.destroy=tt(t.el,"click",".fc-event",n.handleSegClick),n}return p(t,e),t}(Ai),Pi=function(e){function t(t){var n,r,o,i,a=e.call(this,t)||this;return a.handleEventElRemove=function(e){e===a.currentSegEl&&a.handleSegLeave(null,a.currentSegEl)},a.handleSegEnter=function(e,t){$n(t)&&(a.currentSegEl=t,a.triggerEvent("eventMouseEnter",e,t))},a.handleSegLeave=function(e,t){a.currentSegEl&&(a.currentSegEl=null,a.triggerEvent("eventMouseLeave",e,t))},a.removeHoverListeners=(n=t.el,".fc-event",r=a.handleSegEnter,o=a.handleSegLeave,tt(n,"mouseover",".fc-event",(function(e,t){t!==i&&(i=t,r(e,t),t.addEventListener("mouseleave",(function e(n){i=null,o(n,t),t.removeEventListener("mouseleave",e)})))}))),a}return p(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,o=r.context,i=$n(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new xr(o,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:o.viewApi})},t}(Ai),Hi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=Jt(po),t.buildViewPropTransformers=Jt(Fi),t.buildToolbarProps=Jt(Bi),t.headerRef=Be(),t.footerRef=Be(),t.interactionsStore={},t.state={viewLabelId:$e()},t.registerInteractiveComponent=function(e,n){var r=Ci(e,n),o=[Oi,Pi].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=o,xi[e.uid]=r},t.unregisterInteractiveComponent=function(e){for(var n=0,r=t.interactionsStore[e.uid];n1?Jr(this.context,a):{},f=h(h(h({date:t.toDate(a),view:o},i.extraHookProps),{text:u}),l);return Pe(Ao,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:zi,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,r){return Pe("th",h({ref:e,role:"columnheader",className:c.concat(t).join(" "),"data-date":l.isDisabled?void 0:qt(a),colSpan:i.colSpan},i.extraDataAttrs),Pe("div",{className:"fc-scrollgrid-sync-inner"},!l.isDisabled&&Pe("a",h({ref:n,className:["fc-col-header-cell-cushion",i.isSticky?"fc-sticky":""].join(" ")},d),r)))}))},t}(go),Wi=pn({weekday:"long"}),Vi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,r=t.theme,o=t.viewApi,i=t.options,a=mt(new Date(2592e5),e.dow),s={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},l=[Ui].concat(qr(s,r),e.extraClassNames||[]),c=n.format(a,e.dayHeaderFormat),u=h(h(h(h({date:a},s),{view:o}),e.extraHookProps),{text:c});return Pe(Ao,{hookProps:u,classNames:i.dayHeaderClassNames,content:i.dayHeaderContent,defaultContent:zi,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},(function(t,r,o,i){return Pe("th",h({ref:t,role:"columnheader",className:l.concat(r).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Pe("div",{className:"fc-scrollgrid-sync-inner"},Pe("a",{"aria-label":n.format(a,Wi),className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:o},i)))}))},t}(go),Yi=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Cr(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return p(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=yt(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),o=t.dateEnv.add(r,Wt(1,e.unit)),i=o.valueOf()-n.valueOf();return i=Math.min(864e5,i),{currentState:{nowDate:r,todayRange:Qi(r)},nextState:{nowDate:o,todayRange:Qi(o)},waitMs:i}},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=fo,t}(Oe);function Qi(e){var t=Dt(e);return{start:t,end:mt(t,1)}}var Gi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=Jt(qi),t}return p(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,o=t.datesRepDistinctDays,i=t.renderIntro,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return Pe(Yi,{unit:"day"},(function(e,t){return Pe("tr",{role:"row"},i&&i("day"),n.map((function(e){return o?Pe(ji,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:a}):Pe(Vi,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a})})))}))},t}(go);function qi(e,t,n){return e||function(e,t){return pn(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}(t,n)}var Zi=function(){function e(e,t){for(var n=e.start,r=e.end,o=[],i=[],a=-1;n=t.length?t[t.length-1]+1:t[n]},e}(),Xi=function(){function e(e,t){var n,r,o,i=e.dates;if(t){for(r=i[0].getUTCDay(),n=1;nt)return!0;return!1},t.prototype.needsYScrolling=function(){if(aa.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;rt)return!0;return!1},t.prototype.getXScrollbarWidth=function(){return aa.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return aa.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(go),la=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,o=r.depths,i=r.currentMap,a=!1,s=!1;null!==e?(a=n in i,i[n]=e,o[n]=(o[n]||0)+1,s=!0):(o[n]-=1,o[n]||(delete i[n],delete t.callbackMap[n],a=!0)),t.masterCallback&&(a&&t.masterCallback(null,String(n)),s&&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 function(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var o=[];null==n&&(n=Object.keys(e).length);for(var i=t;i=0&&e=0&&tt.eventRange.range.end?e:t}var Ba=function(e){function t(t,n){void 0===n&&(n={});var r=e.call(this)||this;return r.isRendering=!1,r.isRendered=!1,r.currentClassNames=[],r.customContentRenderId=0,r.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":r.renderRunner.tryDrain()}},r.handleData=function(e){r.currentData=e,r.renderRunner.request(e.calendarOptions.rerenderDelay)},r.handleRenderRequest=function(){if(r.isRendering){r.isRendered=!0;var e=r.currentData;He(Pe(Li,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,o,i){return r.setClassNames(t),r.setHeight(n),Pe(Co.Provider,{value:r.customContentRenderId},Pe(Hi,h({isHeightAuto:o,forPrint:i},e)))})),r.el)}else r.isRendered&&(r.isRendered=!1,je(r.el),r.setClassNames([]),r.setHeight(""));ze()},r.el=t,r.renderRunner=new ri(r.handleRenderRequest),new ai({optionOverrides:n,calendarApi:r,onAction:r.handleAction,onData:r.handleData}),r}return p(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+=1: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),ze()},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(!Xt(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n1,w=y.span.start===s;d+=y.levelCoord-u,u=y.levelCoord+y.thickness,b?(d+=y.thickness,w&&g.push({seg:$a(h,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:y.levelCoord,marginTop:0})):w&&(g.push({seg:$a(h,y.span.start,y.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:y.levelCoord,marginTop:d}),d=0)}o.push(c),i.push(g),a.push(d)}return{singleColPlacements:o,multiColPlacements:i,leftoverMargins:a}}(s.toRects(),e,a),h=p.singleColPlacements,g=p.multiColPlacements,v=p.leftoverMargins,m=[],y=[],b=0,w=c;b1,showWeekNumbers:t.showWeekNumbers,todayRange:h,dateProfile:n,cells:i,renderIntro:t.renderRowIntro,businessHourSegs:s[p],eventSelection:t.eventSelection,bgEventSegs:l[p].filter(rs),fgEventSegs:c[p],dateSelectionSegs:u[p],eventDrag:d[p],eventResize:f[p],dayMaxEvents:o,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:t.forPrint})})))))})))},t.prototype.prepareHits=function(){this.rowPositions=new io(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new io(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.queryHit=function(e,t){var n=this.colPositions,r=this.rowPositions,o=n.leftToIndex(e),i=r.topToIndex(t);if(null!=i&&null!=o){var a=this.props.cells[i][o];return{dateProfile:this.props.dateProfile,dateSpan:h({range:this.getCellRange(i,o),allDay:!0},a.extraDateSpan),dayEl:this.getCellEl(i,o),rect:{left:n.lefts[o],right:n.rights[o],top:r.tops[i],bottom:r.bottoms[i]},layer:0}}return null},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:mt(n,1)}},t}(bo);function rs(e){return e.eventRange.def.allDay}var os=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return p(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Ji),is=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new os,t.tableRef=Be(),t}return p(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Pe(ns,h({ref:this.tableRef},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}(bo);function as(e,t){var n=new Zi(e.renderRange,t);return new Xi(n,/year|month|week/.test(e.currentRangeUnit))}const ss=wo({initialView:"dayGridMonth",views:{dayGrid:{component:function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=Jt(as),t.headerRef=Be(),t.tableRef=Be(),t}return p(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,o=this.props,i=this.buildDayTableModel(o.dateProfile,r),a=n.dayHeaders&&Pe(Gi,{ref:this.headerRef,dateProfile:o.dateProfile,dates:i.headerDates,datesRepDistinctDays:1===i.rowCnt}),s=function(t){return Pe(is,{ref:e.tableRef,dateProfile:o.dateProfile,dayTableModel:i,businessHours:o.businessHours,dateSelection:o.dateSelection,eventStore:o.eventStore,eventUiBases:o.eventUiBases,eventSelection:o.eventSelection,eventDrag:o.eventDrag,eventResize:o.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!o.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:o.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(a,s,i.colCnt,n.dayMinWidth):this.renderSimpleLayout(a,s)},t}(Fa),dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.buildRenderRange=function(t,n,r){var o,i=this.props.dateEnv,a=e.prototype.buildRenderRange.call(this,t,n,r),s=a.start,l=a.end;return/^(year|month)$/.test(n)&&(s=i.startOfWeek(s),(o=i.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=vt(o,1))),this.props.monthMode&&this.props.fixedWeekCount&&(l=vt(l,6-Math.ceil(bt(s,l)/7))),{start:s,end:l}},t}(Ho)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}});_i.touchMouseIgnoreWait=500;var ls=0,cs=0,us=!1,ds=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,ls+=1,setTimeout((function(){ls-=1}),_i.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 oo,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),1===(cs+=1)&&window.addEventListener("touchmove",fs,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),(cs-=1)||window.removeEventListener("touchmove",fs,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!Ye(n,this.handleSelector)||(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,0))},e.prototype.cleanup=function(){us=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?Ye(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return ls||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(us=!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,o=e.touches,i=0,a=0;return o&&o.length?(n=o[0].pageX,r=o[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(i=n-this.origPageX,a=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:i,deltaY:a}},e}();function fs(e){us&&e.preventDefault()}var ps=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",qe(n,{left:r.left,top:r.top}),function(e,t){var n=function n(r){t(),nt.forEach((function(t){e.removeEventListener(t,n)}))};nt.forEach((function(t){e.addEventListener(t,n)}))}(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Ve(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&qe(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"),qe(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}(),hs=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 p(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}(ao),gs=function(e){function t(t,n){return e.call(this,new so(t),n)||this}return p(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return to(this.scrollController.el)},t}(hs),vs=function(e){function t(t){return e.call(this,new lo,t)||this}return p(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}(hs),ms="function"==typeof performance?performance.now:Date.now,ys=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=ms();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t,n){this.isEnabled&&(this.scrollCaches=this.buildCaches(n),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,o=null===this.pointerScreenY?0:r-this.pointerScreenY,i=null===this.pointerScreenX?0:n-this.pointerScreenX;o<0?this.everMovedUp=!0:o>0&&(this.everMovedDown=!0),i<0?this.everMovedLeft=!0:i>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(ms()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e=0&&c>=0&&u>=0&&d>=0&&(u<=n&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>u)&&(r={scrollCache:a,name:"top",distance:u}),d<=n&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:a,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:a,name:"left",distance:l}),c<=n&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>c)&&(r={scrollCache:a,name:"right",distance:c}))}return r},e.prototype.buildCaches=function(e){return this.queryScrollEls(e).map((function(e){return e===window?new vs(!1):new gs(e,!1)}))},e.prototype.queryScrollEls=function(e){for(var t=[],n=0,r=this.scrollQuery;n=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){var t;r.isInteracting&&(r.isInteracting=!1,(t=document.body).classList.remove("fc-unselectable"),t.removeEventListener("selectstart",et),document.body.removeEventListener("contextmenu",et),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var o=r.pointer=new ds(t);return o.emitter.on("pointerdown",r.onPointerDown),o.emitter.on("pointermove",r.onPointerMove),o.emitter.on("pointerup",r.onPointerUp),n&&(o.selector=n),r.mirror=new ps,r.autoScroller=new ys,r}return p(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.containerEl),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}(Si),ws=function(){function e(e){this.origRect=no(e),this.scrollCaches=ro(e).map((function(e){return new gs(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e=0&&u=0&&do.layer)&&(g.componentId=i,g.context=a.context,g.rect.left+=l,g.rect.right+=l,g.rect.top+=c,g.rect.bottom+=c,o=g)}}}return o},e}();function Es(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&(n=e.dateSpan,r=t.dateSpan,o=n.range,i=r.range,(null===o.start?null:o.start.valueOf())===(null===i.start?null:i.start.valueOf())&&(null===o.end?null:o.end.valueOf())===(null===i.end?null:i.end.valueOf())&&n.allDay===r.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}(n,r));var n,r,o,i}function As(e,t){for(var n,r,o={},i=0,a=t.pluginHooks.datePointTransforms;ir.start)return{endDelta:i};return null}(a,e,r.subjectEl.classList.contains("fc-event-resizer-start"),s.range))),l&&(c=mr(i,o.getCurrentData().eventUiBases,l,o),d.mutatedEvents=c,$i(d,e.dateProfile,o)||(u=!0,l=null,c=null,d.mutatedEvents=null)),c?o.dispatch({type:"SET_EVENT_RESIZE",state:d}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),u?st():lt(),t||(l&&Es(a,e)&&(l=null),n.validMutation=l,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,r=n.eventRange.def,o=n.eventRange.instance,i=new xr(t,r,o),a=n.relevantEvents,s=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:i,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var l=new xr(t,s.defs[r.defId],o?s.instances[o.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:s});var c={oldEvent:i,event:l,relatedEvents:_r(s,t,o),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",h(h({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||Wt(0),endDelta:n.validMutation.endDelta||Wt(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 r=t.component,o=n.dragging=new bs(t.el);o.pointer.selector=".fc-event-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=r.context.options.dragScroll;var i=n.hitDragging=new Ds(n.dragging,ki(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragstart",n.handleDragStart),i.emitter.on("hitupdate",n.handleHitUpdate),i.emitter.on("dragend",n.handleDragEnd),n}return p(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return Ye(e.subjectEl,".fc-event")},t}(Ai),_s=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=Xe(e.origEvent);t.matchesCancel=!!Ye(r,n),t.matchesEvent=!!Ye(r,xs.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,o=n.getCurrentData();if(!r.wasTouchScroll){if(o.dateSelection&&!t.isRecentPointerDateSelect){var i=n.options.unselectAuto;!i||i&&t.matchesCancel||n.calendarApi.unselect(e)}o.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new ds(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}(),Ms={fixedMirrorParent:An},Ts={dateClick:An,eventDragStart:An,eventDragStop:An,eventDrop:An,eventResizeStart:An,eventResizeStop:An,eventResize:An,drop:An,eventReceive:An,eventLeave:An};!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,r){var o=n.hitDragging.dragging,i=null,a=null,s=!1,l={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(i=e.context,n.canDropElOnCalendar(r.subjectEl,i)&&(a=function(e,t,n){for(var r=h({},t.leftoverProps),o=0,i=n.pluginHooks.externalDefTransforms;o1?e.isStart?u=sr(e,t,n,null,null,l.range.start,e.end):e.isEnd?u=sr(e,t,n,null,null,e.start,l.range.end):c=!0:u=sr(e,t,n),c){var d={text:n.options.allDayText,view:n.viewApi};return Pe(Ao,{hookProps:d,classNames:a.allDayClassNames,content:a.allDayContent,defaultContent:Hs,didMount:a.allDayDidMount,willUnmount:a.allDayWillUnmount},(function(e,t,n,i){return Pe("td",{ref:e,headers:r+" "+o,className:["fc-list-event-time"].concat(t).join(" ")},i)}))}return Pe("td",{className:"fc-list-event-time"},u)}return null}(n,a,t,r,i),Pe("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},Pe("span",{className:"fc-list-event-dot",style:{borderColor:u.borderColor||u.backgroundColor}})),Pe("td",{ref:l,headers:o+" "+i,className:"fc-list-event-title"},c))}))},t}(go);function Hs(e){return e.text}function Bs(e){return e.text}function Fs(e){for(var t=Dt(e.renderRange.start),n=e.renderRange.end,r=[],o=[];t0?e.renderSegList(s,i):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Pe(Ao,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:Bs,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Pe("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Pe("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,r=n.theme,o=n.options,i=this.state,a=i.timeHeaderId,s=i.eventHeaderId,l=i.dateHeaderIdRoot,c=function(e){var t,n,r=[];for(t=0;t",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},il={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1};const al=il;var sl=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},ll=function(e){return!0===e?1:0};function cl(e,t){var n;return function(){var r=arguments,o=this;clearTimeout(n),n=setTimeout((function(){return e.apply(o,r)}),t)}}var ul=function(e){return e instanceof Array?e:[e]};function dl(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function fl(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function pl(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function hl(e,t){return t(e)?e:e.parentNode?hl(e.parentNode,t):void 0}function gl(e,t){var n=fl("div","numInputWrapper"),r=fl("input","numInput "+e),o=fl("span","arrowUp"),i=fl("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?r.type="number":(r.type="text",r.pattern="\\d*"),void 0!==t)for(var a in t)r.setAttribute(a,t[a]);return n.appendChild(r),n.appendChild(o),n.appendChild(i),n}function vl(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}var ml=function(){},yl=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},bl={D:ml,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*ll(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var r=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(r-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:ml,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:ml,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},wl={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Dl={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[Dl.w(e,t,n)]},F:function(e,t,n){return yl(Dl.n(e,t,n)-1,!1,t)},G:function(e,t,n){return sl(Dl.h(e,t,n))},H:function(e){return sl(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[ll(e.getHours()>11)]},M:function(e,t){return yl(e.getMonth(),!0,t)},S:function(e){return sl(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return sl(e.getFullYear(),4)},d:function(e){return sl(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return sl(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return sl(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},El=function(e){var t=e.config,n=void 0===t?ol:t,r=e.l10n,o=void 0===r?il:r,i=e.isMobile,a=void 0!==i&&i;return function(e,t,r){var i=r||o;return void 0===n.formatDate||a?t.split("").map((function(t,r,o){return Dl[t]&&"\\"!==o[r-1]?Dl[t](e,i,n):"\\"!==t?t:""})).join(""):n.formatDate(e,t,i)}},Al=function(e){var t=e.config,n=void 0===t?ol:t,r=e.l10n,o=void 0===r?il:r;return function(e,t,r,i){if(0===e||e){var a,s=i||o,l=e;if(e instanceof Date)a=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)a=new Date(e);else if("string"==typeof e){var c=t||(n||ol).dateFormat,u=String(e).trim();if("today"===u)a=new Date,r=!0;else if(/Z$/.test(u)||/GMT$/.test(u))a=new Date(e);else if(n&&n.parseDate)a=n.parseDate(e,c);else{a=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,f=[],p=0,h=0,g="";p=0?new Date:new Date(n.config.minDate.getTime()),r=kl(n.config);t.setHours(r.hours,r.minutes,r.seconds,t.getMilliseconds()),n.selectedDates=[t],n.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,r=vl(e),o=r;void 0!==n.amPM&&r===n.amPM&&(n.amPM.textContent=n.l10n.amPM[ll(n.amPM.textContent===n.l10n.amPM[0])]);var i=parseFloat(o.getAttribute("min")),a=parseFloat(o.getAttribute("max")),s=parseFloat(o.getAttribute("step")),l=parseInt(o.value,10),c=l+s*(e.delta||(t?38===e.which?1:-1:0));if(void 0!==o.value&&2===o.value.length){var u=o===n.hourElement,d=o===n.minuteElement;ca&&(c=o===n.hourElement?c-a-ll(!n.amPM):i,d&&h(void 0,1,n.hourElement)),n.amPM&&u&&(1===s?c+l===23:Math.abs(c-l)>s)&&(n.amPM.textContent=n.l10n.amPM[ll(n.amPM.textContent===n.l10n.amPM[0])]),o.value=sl(c)}}(e);var o=n._input.value;a(),J(),n._input.value!==o&&n._debouncedChange()}function a(){if(void 0!==n.hourElement&&void 0!==n.minuteElement){var e,t,r=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(n.minuteElement.value,10)||0)%60,i=void 0!==n.secondElement?(parseInt(n.secondElement.value,10)||0)%60:0;void 0!==n.amPM&&(e=r,t=n.amPM.textContent,r=e%12+12*ll(t===n.l10n.amPM[1]));var a=void 0!==n.config.minTime||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&0===Cl(n.latestSelectedDateObj,n.config.minDate,!0);if(void 0!==n.config.maxTime||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&0===Cl(n.latestSelectedDateObj,n.config.maxDate,!0)){var s=void 0!==n.config.maxTime?n.config.maxTime:n.config.maxDate;(r=Math.min(r,s.getHours()))===s.getHours()&&(o=Math.min(o,s.getMinutes())),o===s.getMinutes()&&(i=Math.min(i,s.getSeconds()))}if(a){var c=void 0!==n.config.minTime?n.config.minTime:n.config.minDate;(r=Math.max(r,c.getHours()))===c.getHours()&&o=12)]),void 0!==n.secondElement&&(n.secondElement.value=sl(r)))}function c(e){var t=vl(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&M(n)}function u(e,t,r,o){return t instanceof Array?t.forEach((function(t){return u(e,t,r,o)})):e instanceof Array?e.forEach((function(e){return u(e,t,r,o)})):(e.addEventListener(t,r,o),void n._handlers.push({remove:function(){return e.removeEventListener(t,r)}}))}function d(){Q("onChange")}function f(e,t){var r=void 0!==e?n.parseDate(e):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate=0&&Cl(e,n.selectedDates[1])<=0}(t)&&!q(t)&&a.classList.add("inRange"),n.weekNumbers&&1===n.config.showMonths&&"prevMonthDay"!==e&&r%7==1&&n.weekNumbers.insertAdjacentHTML("beforeend",""+n.config.getWeek(t)+""),Q("onDayCreate",a),a}function v(e){e.focus(),"range"===n.config.mode&&O(e)}function m(e){for(var t=e>0?0:n.config.showMonths-1,r=e>0?n.config.showMonths:-1,o=t;o!=r;o+=e)for(var i=n.daysContainer.children[o],a=e>0?0:i.children.length-1,s=e>0?i.children.length:-1,l=a;l!=s;l+=e){var c=i.children[l];if(-1===c.className.indexOf("hidden")&&T(c.dateObj))return c}}function y(e,t){var r=R(document.activeElement||document.body),o=void 0!==e?e:r?document.activeElement:void 0!==n.selectedDateElem&&R(n.selectedDateElem)?n.selectedDateElem:void 0!==n.todayDateElem&&R(n.todayDateElem)?n.todayDateElem:m(t>0?1:-1);void 0===o?n._input.focus():r?function(e,t){for(var r=-1===e.className.indexOf("Month")?e.dateObj.getMonth():n.currentMonth,o=t>0?n.config.showMonths:-1,i=t>0?1:-1,a=r-n.currentMonth;a!=o;a+=i)for(var s=n.daysContainer.children[a],l=r-n.currentMonth===a?e.$i+t:t<0?s.children.length-1:0,c=s.children.length,u=l;u>=0&&u0?c:-1);u+=i){var d=s.children[u];if(-1===d.className.indexOf("hidden")&&T(d.dateObj)&&Math.abs(e.$i-u)>=Math.abs(t))return v(d)}n.changeMonth(i),y(m(i),0)}(o,t):v(o)}function b(e,t){for(var r=(new Date(e,t,1).getDay()-n.l10n.firstDayOfWeek+7)%7,o=n.utils.getDaysInMonth((t-1+12)%12,e),i=n.utils.getDaysInMonth(t,e),a=window.document.createDocumentFragment(),s=n.config.showMonths>1,l=s?"prevMonthDay hidden":"prevMonthDay",c=s?"nextMonthDay hidden":"nextMonthDay",u=o+1-r,d=0;u<=o;u++,d++)a.appendChild(g(l,new Date(e,t-1,u),u,d));for(u=1;u<=i;u++,d++)a.appendChild(g("",new Date(e,t,u),u,d));for(var f=i+1;f<=42-r&&(1===n.config.showMonths||d%7!=0);f++,d++)a.appendChild(g(c,new Date(e,t+1,f%i),f,d));var p=fl("div","dayContainer");return p.appendChild(a),p}function w(){if(void 0!==n.daysContainer){pl(n.daysContainer),n.weekNumbers&&pl(n.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t1||"dropdown"!==n.config.monthSelectorType)){var e=function(e){return!(void 0!==n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&en.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var r=fl("option","flatpickr-monthDropdown-month");r.value=new Date(n.currentYear,t).getMonth().toString(),r.textContent=yl(t,n.config.shorthandCurrentMonth,n.l10n),r.tabIndex=-1,n.currentMonth===t&&(r.selected=!0),n.monthsDropdownContainer.appendChild(r)}}}function E(){var e,t=fl("div","flatpickr-month"),r=window.document.createDocumentFragment();n.config.showMonths>1||"static"===n.config.monthSelectorType?e=fl("span","cur-month"):(n.monthsDropdownContainer=fl("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),u(n.monthsDropdownContainer,"change",(function(e){var t=vl(e),r=parseInt(t.value,10);n.changeMonth(r-n.currentMonth),Q("onMonthChange")})),D(),e=n.monthsDropdownContainer);var o=gl("cur-year",{tabindex:"-1"}),i=o.getElementsByTagName("input")[0];i.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&i.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(i.setAttribute("max",n.config.maxDate.getFullYear().toString()),i.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var a=fl("div","flatpickr-current-month");return a.appendChild(e),a.appendChild(o),r.appendChild(a),t.appendChild(r),{container:t,yearElement:i,monthElement:e}}function A(){pl(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var e=n.config.showMonths;e--;){var t=E();n.yearElements.push(t.yearElement),n.monthElements.push(t.monthElement),n.monthNav.appendChild(t.container)}n.monthNav.appendChild(n.nextMonthNav)}function C(){n.weekdayContainer?pl(n.weekdayContainer):n.weekdayContainer=fl("div","flatpickr-weekdays");for(var e=n.config.showMonths;e--;){var t=fl("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(t)}return k(),n.weekdayContainer}function k(){if(n.weekdayContainer){var e=n.l10n.firstDayOfWeek,t=[].concat(n.l10n.weekdays.shorthand);e>0&&e\n "+t.join("")+"\n \n "}}function x(e,t){void 0===t&&(t=!0);var r=t?e:e-n.currentMonth;r<0&&!0===n._hidePrevMonthArrow||r>0&&!0===n._hideNextMonthArrow||(n.currentMonth+=r,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,Q("onYearChange"),D()),w(),Q("onMonthChange"),Z())}function S(e){return!(!n.config.appendTo||!n.config.appendTo.contains(e))||n.calendarContainer.contains(e)}function _(e){if(n.isOpen&&!n.config.inline){var t=vl(e),r=S(t),o=t===n.input||t===n.altInput||n.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(n.input)||~e.path.indexOf(n.altInput)),a="blur"===e.type?o&&e.relatedTarget&&!S(e.relatedTarget):!o&&!r&&!S(e.relatedTarget),s=!n.config.ignoredFocusElements.some((function(e){return e.contains(t)}));a&&s&&(void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement&&""!==n.input.value&&void 0!==n.input.value&&i(),n.close(),n.config&&"range"===n.config.mode&&1===n.selectedDates.length&&(n.clear(!1),n.redraw()))}}function M(e){if(!(!e||n.config.minDate&&en.config.maxDate.getFullYear())){var t=e,r=n.currentYear!==t;n.currentYear=t||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),r&&(n.redraw(),Q("onYearChange"),D())}}function T(e,t){var r;void 0===t&&(t=!0);var o=n.parseDate(e,void 0,t);if(n.config.minDate&&o&&Cl(o,n.config.minDate,void 0!==t?t:!n.minDateHasTime)<0||n.config.maxDate&&o&&Cl(o,n.config.maxDate,void 0!==t?t:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&0===n.config.disable.length)return!0;if(void 0===o)return!1;for(var i,a=!!n.config.enable,s=null!==(r=n.config.enable)&&void 0!==r?r:n.config.disable,l=0;l=i.from.getTime()&&o.getTime()<=i.to.getTime())return a}return!a}function R(e){return void 0!==n.daysContainer&&-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&n.daysContainer.contains(e)}function I(e){e.target!==n._input||!(n.selectedDates.length>0||n._input.value.length>0)||e.relatedTarget&&S(e.relatedTarget)||n.setDate(n._input.value,!0,e.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function N(t){var r=vl(t),o=n.config.wrap?e.contains(r):r===n._input,s=n.config.allowInput,l=n.isOpen&&(!s||!o),c=n.config.inline&&o&&!s;if(13===t.keyCode&&o){if(s)return n.setDate(n._input.value,!0,r===n.altInput?n.config.altFormat:n.config.dateFormat),r.blur();n.open()}else if(S(r)||l||c){var u=!!n.timeContainer&&n.timeContainer.contains(r);switch(t.keyCode){case 13:u?(t.preventDefault(),i(),z()):j(t);break;case 27:t.preventDefault(),z();break;case 8:case 46:o&&!n.config.allowInput&&(t.preventDefault(),n.clear());break;case 37:case 39:if(u||o)n.hourElement&&n.hourElement.focus();else if(t.preventDefault(),void 0!==n.daysContainer&&(!1===s||document.activeElement&&R(document.activeElement))){var d=39===t.keyCode?1:-1;t.ctrlKey?(t.stopPropagation(),x(d),y(m(1),0)):y(void 0,d)}break;case 38:case 40:t.preventDefault();var f=40===t.keyCode?1:-1;n.daysContainer&&void 0!==r.$i||r===n.input||r===n.altInput?t.ctrlKey?(t.stopPropagation(),M(n.currentYear-f),y(m(1),0)):u||y(void 0,7*f):r===n.currentYearElement?M(n.currentYear-f):n.config.enableTime&&(!u&&n.hourElement&&n.hourElement.focus(),i(t),n._debouncedChange());break;case 9:if(u){var p=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter((function(e){return e})),h=p.indexOf(r);if(-1!==h){var g=p[h+(t.shiftKey?-1:1)];t.preventDefault(),(g||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(r)&&t.shiftKey&&(t.preventDefault(),n._input.focus())}}if(void 0!==n.amPM&&r===n.amPM)switch(t.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],a(),J();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],a(),J()}(o||S(r))&&Q("onKeyDown",t)}function O(e){if(1===n.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),r=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),o=Math.min(t,n.selectedDates[0].getTime()),i=Math.max(t,n.selectedDates[0].getTime()),a=!1,s=0,l=0,c=o;co&&cs)?s=c:c>r&&(!l||c0&&h0&&h>l;return g?(p.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach((function(e){p.classList.remove(e)})),"continue"):a&&!g?"continue":(["startRange","inRange","endRange","notAllowed"].forEach((function(e){p.classList.remove(e)})),void(void 0!==e&&(e.classList.add(t<=n.selectedDates[0].getTime()?"startRange":"endRange"),rt&&h===r&&p.classList.add("endRange"),h>=s&&(0===l||h<=l)&&(u=r,f=t,(c=h)>Math.min(u,f)&&c0||r.getMinutes()>0||r.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter((function(e){return T(e)})),n.selectedDates.length||"min"!==e||s(r),J()),n.daysContainer&&(U(),void 0!==r?n.currentYearElement[e]=r.getFullYear().toString():n.currentYearElement.removeAttribute(e),n.currentYearElement.disabled=!!o&&void 0!==r&&o.getFullYear()===r.getFullYear())}}function B(){return n.config.wrap?e.querySelector("[data-input]"):e}function F(){"object"!=typeof n.config.locale&&void 0===_l.l10ns[n.config.locale]&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Object.assign(Object.assign({},_l.l10ns.default),"object"==typeof n.config.locale?n.config.locale:"default"!==n.config.locale?_l.l10ns[n.config.locale]:void 0),wl.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")",void 0===Object.assign(Object.assign({},t),JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr&&void 0===_l.defaultConfig.time_24hr&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=El(n),n.parseDate=Al({config:n.config,l10n:n.l10n})}function L(e){if("function"!=typeof n.config.position){if(void 0!==n.calendarContainer){Q("onPreCalendarPosition");var t=e||n._positionElement,r=Array.prototype.reduce.call(n.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),o=n.calendarContainer.offsetWidth,i=n.config.position.split(" "),a=i[0],s=i.length>1?i[1]:null,l=t.getBoundingClientRect(),c=window.innerHeight-l.bottom,u="above"===a||"below"!==a&&cr,d=window.pageYOffset+l.top+(u?-r-2:t.offsetHeight+2);if(dl(n.calendarContainer,"arrowTop",!u),dl(n.calendarContainer,"arrowBottom",u),!n.config.inline){var f=window.pageXOffset+l.left,p=!1,h=!1;"center"===s?(f-=(o-l.width)/2,p=!0):"right"===s&&(f-=o-l.width,h=!0),dl(n.calendarContainer,"arrowLeft",!p&&!h),dl(n.calendarContainer,"arrowCenter",p),dl(n.calendarContainer,"arrowRight",h);var g=window.document.body.offsetWidth-(window.pageXOffset+l.right),v=f+o>window.document.body.offsetWidth,m=g+o>window.document.body.offsetWidth;if(dl(n.calendarContainer,"rightMost",v),!n.config.static)if(n.calendarContainer.style.top=d+"px",v)if(m){var y=function(){for(var e=null,t=0;tn.currentMonth+n.config.showMonths-1)&&"range"!==n.config.mode;if(n.selectedDateElem=r,"single"===n.config.mode)n.selectedDates=[o];else if("multiple"===n.config.mode){var s=q(o);s?n.selectedDates.splice(parseInt(s),1):n.selectedDates.push(o)}else"range"===n.config.mode&&(2===n.selectedDates.length&&n.clear(!1,!1),n.latestSelectedDateObj=o,n.selectedDates.push(o),0!==Cl(o,n.selectedDates[0],!0)&&n.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(a(),i){var l=n.currentYear!==o.getFullYear();n.currentYear=o.getFullYear(),n.currentMonth=o.getMonth(),l&&(Q("onYearChange"),D()),Q("onMonthChange")}if(Z(),w(),J(),i||"range"===n.config.mode||1!==n.config.showMonths?void 0!==n.selectedDateElem&&void 0===n.hourElement&&n.selectedDateElem&&n.selectedDateElem.focus():v(r),void 0!==n.hourElement&&void 0!==n.hourElement&&n.hourElement.focus(),n.config.closeOnSelect){var c="single"===n.config.mode&&!n.config.enableTime,u="range"===n.config.mode&&2===n.selectedDates.length&&!n.config.enableTime;(c||u)&&z()}d()}}n.parseDate=Al({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=u,n._setHoursFromDate=s,n._positionCalendar=L,n.changeMonth=x,n.changeYear=M,n.clear=function(e,t){if(void 0===e&&(e=!0),void 0===t&&(t=!0),n.input.value="",void 0!==n.altInput&&(n.altInput.value=""),void 0!==n.mobileInput&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,!0===t&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),!0===n.config.enableTime){var r=kl(n.config);l(r.hours,r.minutes,r.seconds)}n.redraw(),e&&Q("onChange")},n.close=function(){n.isOpen=!1,n.isMobile||(void 0!==n.calendarContainer&&n.calendarContainer.classList.remove("open"),void 0!==n._input&&n._input.classList.remove("active")),Q("onClose")},n._createElement=fl,n.destroy=function(){void 0!==n.config&&Q("onDestroy");for(var e=n._handlers.length;e--;)n._handlers[e].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var t=n.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete n[e]}catch(e){}}))},n.isEnabled=T,n.jumpToDate=f,n.open=function(e,t){if(void 0===t&&(t=n._positionElement),!0===n.isMobile){if(e){e.preventDefault();var r=vl(e);r&&r.blur()}return void 0!==n.mobileInput&&(n.mobileInput.focus(),n.mobileInput.click()),void Q("onOpen")}if(!n._input.disabled&&!n.config.inline){var o=n.isOpen;n.isOpen=!0,o||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),Q("onOpen"),L(t)),!0===n.config.enableTime&&!0===n.config.noCalendar&&(!1!==n.config.allowInput||void 0!==e&&n.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return n.hourElement.select()}),50))}},n.redraw=U,n.set=function(e,t){if(null!==e&&"object"==typeof e)for(var r in Object.assign(n.config,e),e)void 0!==W[r]&&W[r].forEach((function(e){return e()}));else n.config[e]=t,void 0!==W[e]?W[e].forEach((function(e){return e()})):rl.indexOf(e)>-1&&(n.config[e]=ul(t));n.redraw(),J(!0)},n.setDate=function(e,t,r){if(void 0===t&&(t=!1),void 0===r&&(r=n.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return n.clear(t);V(e,r),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),f(void 0,t),s(),0===n.selectedDates.length&&n.clear(!1),J(t),t&&Q("onChange")},n.toggle=function(e){if(!0===n.isOpen)return n.close();n.open(e)};var W={locale:[F,k],showMonths:[A,o,C],minDate:[f],maxDate:[f],clickOpens:[function(){!0===n.config.clickOpens?(u(n._input,"focus",n.open),u(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function V(e,t){var r=[];if(e instanceof Array)r=e.map((function(e){return n.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)r=[n.parseDate(e,t)];else if("string"==typeof e)switch(n.config.mode){case"single":case"time":r=[n.parseDate(e,t)];break;case"multiple":r=e.split(n.config.conjunction).map((function(e){return n.parseDate(e,t)}));break;case"range":r=e.split(n.l10n.rangeSeparator).map((function(e){return n.parseDate(e,t)}))}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));n.selectedDates=n.config.allowInvalidPreload?r:r.filter((function(e){return e instanceof Date&&T(e,!1)})),"range"===n.config.mode&&n.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function Y(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?n.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:n.parseDate(e.from,void 0),to:n.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function Q(e,t){if(void 0!==n.config){var r=n.config[e];if(void 0!==r&&r.length>0)for(var o=0;r[o]&&o1||"static"===n.config.monthSelectorType?n.monthElements[t].textContent=yl(r.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=r.getMonth().toString(),e.value=r.getFullYear().toString()})),n._hidePrevMonthArrow=void 0!==n.config.minDate&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYearn.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function X(e){return n.selectedDates.map((function(t){return n.formatDate(t,e)})).filter((function(e,t,r){return"range"!==n.config.mode||n.config.enableTime||r.indexOf(e)===t})).join("range"!==n.config.mode?n.config.conjunction:n.l10n.rangeSeparator)}function J(e){void 0===e&&(e=!0),void 0!==n.mobileInput&&n.mobileFormatStr&&(n.mobileInput.value=void 0!==n.latestSelectedDateObj?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=X(n.config.dateFormat),void 0!==n.altInput&&(n.altInput.value=X(n.config.altFormat)),!1!==e&&Q("onValueUpdate")}function K(e){var t=vl(e),r=n.prevMonthNav.contains(t),o=n.nextMonthNav.contains(t);r||o?x(r?-1:1):n.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):t.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}return function(){n.element=n.input=e,n.isOpen=!1,function(){var o=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],i=Object.assign(Object.assign({},JSON.parse(JSON.stringify(e.dataset||{}))),t),a={};n.config.parseDate=i.parseDate,n.config.formatDate=i.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(e){n.config._enable=Y(e)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(e){n.config._disable=Y(e)}});var s="time"===i.mode;if(!i.dateFormat&&(i.enableTime||s)){var l=_l.defaultConfig.dateFormat||ol.dateFormat;a.dateFormat=i.noCalendar||s?"H:i"+(i.enableSeconds?":S":""):l+" H:i"+(i.enableSeconds?":S":"")}if(i.altInput&&(i.enableTime||s)&&!i.altFormat){var c=_l.defaultConfig.altFormat||ol.altFormat;a.altFormat=i.noCalendar||s?"h:i"+(i.enableSeconds?":S K":" K"):c+" h:i"+(i.enableSeconds?":S":"")+" K"}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:H("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:H("max")});var u=function(e){return function(t){n.config["min"===e?"_minTime":"_maxTime"]=n.parseDate(t,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:u("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:u("max")}),"time"===i.mode&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,a,i);for(var d=0;d-1?n.config[h]=ul(p[h]).map(r).concat(n.config[h]):void 0===i[h]&&(n.config[h]=p[h])}i.altInputClass||(n.config.altInputClass=B().className+" "+n.config.altInputClass),Q("onParseConfig")}(),F(),n.input=B(),n.input?(n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=fl(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),n._positionElement=n.config.positionElement||n._input):n.config.errorHandler(new Error("Invalid input element specified")),function(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var e=n.config.defaultDate||("INPUT"!==n.input.nodeName&&"TEXTAREA"!==n.input.nodeName||!n.input.placeholder||n.input.value!==n.input.placeholder?n.input.value:null);e&&V(e,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()0&&(n.latestSelectedDateObj=n.selectedDates[0]),void 0!==n.config.minTime&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),void 0!==n.config.maxTime&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}(),n.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=n.currentMonth),void 0===t&&(t=n.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:n.l10n.daysInMonth[e]}},n.isMobile||function(){var e=window.document.createDocumentFragment();if(n.calendarContainer=fl("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(e.appendChild((n.monthNav=fl("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=fl("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=fl("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,A(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(e){n.__hidePrevMonthArrow!==e&&(dl(n.prevMonthNav,"flatpickr-disabled",e),n.__hidePrevMonthArrow=e)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(e){n.__hideNextMonthArrow!==e&&(dl(n.nextMonthNav,"flatpickr-disabled",e),n.__hideNextMonthArrow=e)}}),n.currentYearElement=n.yearElements[0],Z(),n.monthNav)),n.innerContainer=fl("div","flatpickr-innerContainer"),n.config.weekNumbers){var t=function(){n.calendarContainer.classList.add("hasWeeks");var e=fl("div","flatpickr-weekwrapper");e.appendChild(fl("span","flatpickr-weekday",n.l10n.weekAbbreviation));var t=fl("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),r=t.weekWrapper,o=t.weekNumbers;n.innerContainer.appendChild(r),n.weekNumbers=o,n.weekWrapper=r}n.rContainer=fl("div","flatpickr-rContainer"),n.rContainer.appendChild(C()),n.daysContainer||(n.daysContainer=fl("div","flatpickr-days"),n.daysContainer.tabIndex=-1),w(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),e.appendChild(n.innerContainer)}n.config.enableTime&&e.appendChild(function(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var e=kl(n.config);n.timeContainer=fl("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var t=fl("span","flatpickr-time-separator",":"),r=gl("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=r.getElementsByTagName("input")[0];var o=gl("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=o.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=sl(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),n.minuteElement.value=sl(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():e.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(r),n.timeContainer.appendChild(t),n.timeContainer.appendChild(o),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var i=gl("flatpickr-second");n.secondElement=i.getElementsByTagName("input")[0],n.secondElement.value=sl(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():e.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(fl("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(i)}return n.config.time_24hr||(n.amPM=fl("span","flatpickr-am-pm",n.l10n.amPM[ll((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}()),dl(n.calendarContainer,"rangeMode","range"===n.config.mode),dl(n.calendarContainer,"animate",!0===n.config.animate),dl(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(e);var i=void 0!==n.config.appendTo&&void 0!==n.config.appendTo.nodeType;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!i&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):void 0!==n.config.appendTo&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var a=fl("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(a,n.element),a.appendChild(n.element),n.altInput&&a.appendChild(n.altInput),a.appendChild(n.calendarContainer)}n.config.static||n.config.inline||(void 0!==n.config.appendTo?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}(),function(){if(n.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+e+"]"),(function(t){return u(t,"click",n[e])}))})),n.isMobile)!function(){var e=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=fl("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=e,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",void 0!==n.altInput&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(e){}u(n.mobileInput,"change",(function(e){n.setDate(vl(e).value,!1,n.mobileFormatStr),Q("onChange"),Q("onClose")}))}();else{var e=cl(P,50);if(n._debouncedChange=cl(d,300),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&u(n.daysContainer,"mouseover",(function(e){"range"===n.config.mode&&O(vl(e))})),u(window.document.body,"keydown",N),n.config.inline||n.config.static||u(window,"resize",e),void 0!==window.ontouchstart?u(window.document,"touchstart",_):u(window.document,"mousedown",_),u(window.document,"focus",_,{capture:!0}),!0===n.config.clickOpens&&(u(n._input,"focus",n.open),u(n._input,"click",n.open)),void 0!==n.daysContainer&&(u(n.monthNav,"click",K),u(n.monthNav,["keyup","increment"],c),u(n.daysContainer,"click",j)),void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement){u(n.timeContainer,["increment"],i),u(n.timeContainer,"blur",i,{capture:!0}),u(n.timeContainer,"click",p),u([n.hourElement,n.minuteElement],["focus","click"],(function(e){return vl(e).select()})),void 0!==n.secondElement&&u(n.secondElement,"focus",(function(){return n.secondElement&&n.secondElement.select()})),void 0!==n.amPM&&u(n.amPM,"click",(function(e){i(e),d()}))}n.config.allowInput&&u(n._input,"blur",I)}}(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&s(n.config.noCalendar?n.latestSelectedDateObj:void 0),J(!1)),o();var a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&a&&L(),Q("onReady")}(),n}function Sl(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),r=[],o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.events);!(t=n()).done;){var r=t.value;if(r.id()===e.event.extendedProps.eventId){console.log(r.user()),i().modal.show(zl,{event:r});break}}}.bind(this),dateClick:function(e){n(e)},events:function(e,t,n){var r=this;i().store.find("events",{start:e.start.toISOString(),end:e.end.toISOString(),sort:"event_start"}).then((function(e){r.events=e,t(e)}))}.bind(this),eventDataTransform:this.flarumToFullCalendarEvent}).render()},r.openCreateModal=function(e){null!=i().session.user?e.dateStr?i().modal.show(Bl,{withStart:e.dateStr}):i().modal.show(Bl):i().modal.show(Wl())},r.flarumToFullCalendarEvent=function(e){return console.log(e),{title:e.name(),end:e.event_end(),start:e.event_start(),extendedProps:{description:e.description(),user:e.user(),eventId:e.id()},url:i().route("advevent",{id:e.id()})}},n}(s());flarum.core.compat["utils/affixSidebar"];const Ql=flarum.core.compat["components/LoadingIndicator"];var Gl=n.n(Ql);const ql=flarum.core.compat.Model;var Zl=n.n(ql),Xl=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),o=0;o\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n if (Object.prototype.toString.call(newList) !== '[object Array]') {\n return;\n }\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDom[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDom[_index].references === 0) {\n stylesInDom[_index].updater();\n\n stylesInDom.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || '').concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","module.exports = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['helpers/listItems'];","module.exports = flarum.core.compat['components/Modal'];","module.exports = flarum.core.compat['components/LinkButton'];","/* flatpickr v4.6.3, @license MIT */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.flatpickr = factory());\n}(this, function () { 'use strict';\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n\r\n var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n };\n\n var HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n ];\n var defaults = {\n _disable: [],\n _enable: [],\n allowInput: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enable: [],\n enableSeconds: false,\n enableTime: false,\n errorHandler: function (err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function (givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n // Thursday in current week decides the year.\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n // January 4 is always in week 1.\n var week1 = new Date(date.getFullYear(), 0, 4);\n // Adjust to Thursday in week 1 and count number of weeks from date to week1.\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false\n };\n\n var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ]\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ]\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function (nth) {\n var s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false\n };\n\n var pad = function (number) { return (\"0\" + number).slice(-2); };\n var int = function (bool) { return (bool === true ? 1 : 0); };\n /* istanbul ignore next */\n function debounce(func, wait, immediate) {\n if (immediate === void 0) { immediate = false; }\n var timeout;\n return function () {\n var context = this, args = arguments;\n timeout !== null && clearTimeout(timeout);\n timeout = window.setTimeout(function () {\n timeout = null;\n if (!immediate)\n func.apply(context, args);\n }, wait);\n if (immediate && !timeout)\n func.apply(context, args);\n };\n }\n var arrayify = function (obj) {\n return obj instanceof Array ? obj : [obj];\n };\n\n function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n }\n function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n }\n function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n }\n function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined; // nothing found\n }\n function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (var key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n }\n function getEventTarget(event) {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n\n var doNothing = function () { return undefined; };\n var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\n var revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n H: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function (dateObj, amPM, locale) {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n W: function (dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function (dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function (_, ISODate) { return new Date(ISODate); },\n d: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n i: function (dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function (_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function (dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n }\n };\n var tokenRegex = {\n D: \"(\\\\w+)\",\n F: \"(\\\\w+)\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"(\\\\w+)\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"(\\\\w+)\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\"\n };\n var formats = {\n // get the date in UTC\n Z: function (date) { return date.toISOString(); },\n // weekday name, short, e.g. Thu\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n // full month name e.g. January\n F: function (date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n // padded hour 1-12\n G: function (date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n // hours with leading zero e.g. 03\n H: function (date) { return pad(date.getHours()); },\n // day (1-30) with ordinal suffix e.g. 1st, 2nd\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n // AM/PM\n K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },\n // shorthand month e.g. Jan, Sep, Oct, etc\n M: function (date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n // seconds 00-59\n S: function (date) { return pad(date.getSeconds()); },\n // unix timestamp\n U: function (date) { return date.getTime() / 1000; },\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n // full year e.g. 2016\n Y: function (date) { return date.getFullYear(); },\n // day in month, padded (01-30)\n d: function (date) { return pad(date.getDate()); },\n // hour from 1-12 (am/pm)\n h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n // minutes, padded with leading zero e.g. 09\n i: function (date) { return pad(date.getMinutes()); },\n // day in month (1-30)\n j: function (date) { return date.getDate(); },\n // weekday name, full, e.g. Thursday\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n // padded month number (01-12)\n m: function (date) { return pad(date.getMonth() + 1); },\n // the month number (1-12)\n n: function (date) { return date.getMonth() + 1; },\n // seconds 0-59\n s: function (date) { return date.getSeconds(); },\n // Unix Milliseconds\n u: function (date) { return date.getTime(); },\n // number of the day of the week\n w: function (date) { return date.getDay(); },\n // last two digits of year e.g. 16 for 2016\n y: function (date) { return String(date.getFullYear()).substring(2); }\n };\n\n var createDateFormatter = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n if (config.formatDate !== undefined) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\"\n ? formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\";\n })\n .join(\"\");\n };\n };\n var createDateParser = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date)\n return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined // timestamp\n )\n // create a copy\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n // date string\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr) // datestrings w/ timezone\n )\n parsedDate = new Date(date);\n else if (config && config.parseDate)\n parsedDate = config.parseDate(date, format);\n else {\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n var matched = void 0, ops = [];\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token_1 = format[i];\n var isBackSlash = token_1 === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (tokenRegex[token_1] && !escaped) {\n regexStr += tokenRegex[token_1];\n var match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token_1 !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token_1],\n val: match[++matchIndex]\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\"; // don't really care\n ops.forEach(function (_a) {\n var fn = _a.fn, val = _a.val;\n return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n });\n }\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n /* istanbul ignore next */\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n };\n /**\n * Compute the difference in dates, measured in ms\n */\n function compareDates(date1, date2, timeless) {\n if (timeless === void 0) { timeless = true; }\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n }\n var isBetween = function (ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n };\n var duration = {\n DAY: 86400000\n };\n\n if (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n var _loop_1 = function (source) {\n if (source) {\n Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n }\n };\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n _loop_1(source);\n }\n return target;\n };\n }\n\n var DEBOUNCED_CHANGE_MS = 300;\n function FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign({}, defaults, flatpickr.defaultConfig),\n l10n: english\n };\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self._createElement = createElement;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function (month, yr) {\n if (month === void 0) { month = self.currentMonth; }\n if (yr === void 0) { yr = self.currentYear; }\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n }\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar\n ? self.latestSelectedDateObj || self.config.minDate\n : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n self.showTimeInput =\n self.selectedDates.length > 0 || self.config.noCalendar;\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n /* TODO: investigate this further\n \n Currently, there is weird positioning behavior in safari causing pages\n to scroll up. https://github.com/chmln/flatpickr/issues/563\n \n However, most browsers are not Safari and positioning is expensive when used\n in scale. https://github.com/chmln/flatpickr/issues/1096\n */\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1)\n return;\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n /**\n * The handler for all events targeting the time inputs\n */\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n setDefaultTime();\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n /**\n * Syncs the selected date object time with user's time input\n */\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours())\n minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }\n /**\n * Syncs time input values with a date\n */\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date)\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n function setDefaultHours() {\n var hours = self.config.defaultHour;\n var minutes = self.config.defaultMinute;\n var seconds = self.config.defaultSeconds;\n if (self.config.minDate !== undefined) {\n var minHr = self.config.minDate.getHours();\n var minMinutes = self.config.minDate.getMinutes();\n hours = Math.max(hours, minHr);\n if (hours === minHr)\n minutes = Math.max(minMinutes, minutes);\n if (hours === minHr && minutes === minMinutes)\n seconds = self.config.minDate.getSeconds();\n }\n if (self.config.maxDate !== undefined) {\n var maxHr = self.config.maxDate.getHours();\n var maxMinutes = self.config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = self.config.maxDate.getSeconds();\n }\n setHours(hours, minutes, seconds);\n }\n /**\n * Sets the hours, minutes, and optionally seconds\n * of the latest selected date object and the\n * corresponding time inputs\n * @param {Number} hours the hour. whether its military\n * or am-pm gets inferred from config\n * @param {Number} minutes the minutes\n * @param {Number} seconds the seconds (optional)\n */\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = pad(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = pad(seconds);\n }\n /**\n * Handles the year input and incrementing events\n * @param {Event} event the keyup or increment event\n */\n function onYearInput(event) {\n var year = parseInt(event.target.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n /**\n * Essentially addEventListener + tracking\n * @param {Element} element the element to addEventListener to\n * @param {String} event the event name\n * @param {Function} handler the event handler\n */\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n if (element instanceof Array)\n return element.forEach(function (el) { return bind(el, event, handler, options); });\n element.addEventListener(event, handler, options);\n self._handlers.push({\n element: element,\n event: event,\n handler: handler,\n options: options\n });\n }\n /**\n * A mousedown handler which mimics click.\n * Minimizes latency, since we don't need to wait for mouseup in most cases.\n * Also, avoids handling right clicks.\n *\n * @param {Function} handler the event handler\n */\n function onClick(handler) {\n return function (evt) {\n evt.which === 1 && handler(evt);\n };\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n /**\n * Adds all the necessary event listeners\n */\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\")\n onMouseOver(e.target);\n });\n bind(window.document.body, \"keydown\", onKeyDown);\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", onClick(documentClick));\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"mousedown\", onClick(self.open));\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"mousedown\", onClick(onMonthNavClick));\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"mousedown\", onClick(selectDate));\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n var selText = function (e) {\n return e.target.select();\n };\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"mousedown\", onClick(timeIncrement));\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n if (self.amPM !== undefined) {\n bind(self.amPM, \"mousedown\", onClick(function (e) {\n updateTime(e);\n triggerChange();\n }));\n }\n }\n }\n /**\n * Set the calendar view to a particular date.\n * @param {Date} jumpDate the date to set the view to\n * @param {boolean} triggerChange if change events should be triggered\n */\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n /* istanbul ignore next */\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n /**\n * The up/down arrow handler for time inputs\n * @param {Event} e the click event\n */\n function timeIncrement(e) {\n if (~e.target.className.indexOf(\"arrow\"))\n incrementNumInput(e, e.target.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n /**\n * Increments/decrements the value of input associ-\n * ated with the up/down arrow by dispatching an\n * \"increment\" event on the input.\n *\n * @param {Event} e the click event\n * @param {Number} delta the diff (usually 1 or -1)\n * @param {Element} inputElem the input element\n */\n function incrementNumInput(e, delta, inputElem) {\n var target = e && e.target;\n var input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", \"flatpickr-day \" + className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n dayNumber % 7 === 1) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \"\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n var numMonthDays = month.children.length;\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n var dayFocused = isInView(document.activeElement || document.body);\n var startElem = current !== undefined\n ? current\n : dayFocused\n ? document.activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined)\n return self._input.focus();\n if (!dayFocused)\n return focusOnDayElem(startElem);\n getNextAvailableDay(startElem, offset);\n }\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12);\n var daysInMonth = self.utils.getDaysInMonth(month), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n // prepend days from the ending of previous month\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n // Start at 1 since there is no 0th day\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n // append days from the next month\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n //updateNavigationCurrentMonth();\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n clearNode(self.daysContainer);\n // TODO: week numbers for each month\n if (self.weekNumbers)\n clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n var shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = e.target;\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n var yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement\n };\n }\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function () { return self.__hidePrevMonthArrow; },\n set: function (bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n }\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function () { return self.__hideNextMonthArrow; },\n set: function (bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n }\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? self.config.defaultHour\n : military2ampm(self.config.defaultHour));\n self.minuteElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : self.config.defaultMinute);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : self.config.defaultSeconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n // add self.amPM if appropriate\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n else\n clearNode(self.weekdayContainer);\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = self.l10n.weekdays.shorthand.slice();\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = weekdays.splice(firstDayOfWeek, weekdays.length).concat(weekdays.splice(0, firstDayOfWeek));\n }\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n \\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n /* istanbul ignore next */\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers\n };\n }\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) { isOffset = true; }\n var delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }\n if (toInitial === void 0) { toInitial = true; }\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n self.showTimeInput = false;\n if (self.config.enableTime === true) {\n setDefaultHours();\n }\n self.redraw();\n if (triggerChangeEvent)\n // triggerChangeEvent is true (default) or an Event\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (var i = self._handlers.length; i--;) {\n var h = self._handlers[i];\n h.element.removeEventListener(h.event, h.handler, h.options);\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n self.input.value = \"\";\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach(function (k) {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n if (self.config.appendTo && self.config.appendTo.contains(elem))\n return true;\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = getEventTarget(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input ||\n eventTarget_1 === self.altInput ||\n self.element.contains(eventTarget_1) ||\n // web components\n // e.path is not present in all browsers. circumventing typechecks\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n var lostFocus = e.type === \"blur\"\n ? isInput &&\n e.relatedTarget &&\n !isCalendarElem(e.relatedTarget)\n : !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n if (lostFocus && isIgnored) {\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n self.clear(false);\n self.redraw();\n }\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless) {\n if (timeless === void 0) { timeless = true; }\n var dateToCheck = self.parseDate(date, undefined, timeless); // timeless\n if ((self.config.minDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (self.config.enable.length === 0 && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n var bool = self.config.enable.length > 0, array = bool ? self.config.enable : self.config.disable;\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck) // disabled by function\n )\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n // disabled by date\n return bool;\n else if (typeof d === \"string\" && dateToCheck !== undefined) {\n // disabled by date string\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (\n // disabled by range\n typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onKeyDown(e) {\n // e.key e.keyCode\n // \"Backspace\" 8\n // \"Tab\" 9\n // \"Enter\" 13\n // \"Escape\" (IE \"Esc\") 27\n // \"ArrowLeft\" (IE \"Left\") 37\n // \"ArrowUp\" (IE \"Up\") 38\n // \"ArrowRight\" (IE \"Right\") 39\n // \"ArrowDown\" (IE \"Down\") 40\n // \"Delete\" (IE \"Del\") 46\n var isInput = e.target === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n return e.target.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(e.target) ||\n allowKeydown ||\n allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(e.target);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27: // escape\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (document.activeElement && isInView(document.activeElement)))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta_1);\n else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer && e.target.$i !== undefined) ||\n e.target === self.input ||\n e.target === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (e.target === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n var elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter(function (x) { return x; });\n var i = elems.indexOf(e.target);\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(e.target) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && e.target === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(e.target)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem) {\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(\"flatpickr-day\") ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n var hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0, maxRange = 0;\n for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n for (var m = 0; m < self.config.showMonths; m++) {\n var month = self.daysContainer.children[m];\n var _loop_1 = function (i, l) {\n var dayElem = month.children[i], date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return \"continue\";\n }\n else if (containsDisabled && !outOfRange)\n return \"continue\";\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n isBetween(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n };\n for (var i = 0, l = month.children.length; i < l; i++) {\n _loop_1(i, l);\n }\n }\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function setDefaultTime() {\n self.setDate(self.config.minDate !== undefined\n ? new Date(self.config.minDate.getTime())\n : new Date(), true);\n setDefaultHours();\n updateValue();\n }\n function open(e, positionElement) {\n if (positionElement === void 0) { positionElement = self._positionElement; }\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n e.target && e.target.blur();\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n if (self._input.disabled || self.config.inline)\n return;\n var wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.selectedDates.length === 0) {\n setDefaultTime();\n }\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () { return self.hourElement.select(); }, 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n var boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n var userConfig = __assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {})));\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function () { return self.config._enable; },\n set: function (dates) {\n self.config._enable = parseDateRules(dates);\n }\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function () { return self.config._disable; },\n set: function (dates) {\n self.config._disable = parseDateRules(dates);\n }\n });\n var timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaults.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaults.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n self.input.className + \" \" + self.config.altInputClass;\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: function () { return self.config._minDate; },\n set: minMaxDateSetter(\"min\")\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function () { return self.config._maxDate; },\n set: minMaxDateSetter(\"max\")\n });\n var minMaxTimeSetter = function (type) { return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n }; };\n Object.defineProperty(self.config, \"minTime\", {\n get: function () { return self.config._minTime; },\n set: minMaxTimeSetter(\"min\")\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function () { return self.config._maxTime; },\n set: minMaxTimeSetter(\"max\")\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (var i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable.length &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n triggerEvent(\"onParseConfig\");\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign({}, flatpickr.l10ns[\"default\"], (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n var userConfig = __assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n var top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n var left = window.pageXOffset +\n inputBounds.left -\n (configPosHorizontal != null && configPosHorizontal === \"center\"\n ? (calendarWidth - inputBounds.width) / 2\n : 0);\n var right = window.document.body.offsetWidth - (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = top + \"px\";\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n else {\n var doc = document.styleSheets[0];\n // some testing environments don't have css support\n if (doc === undefined)\n return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n // hack - bugs in the way IE handles focus keeps the calendar open\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n var isSelectable = function (day) {\n return day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n };\n var t = findParent(e.target, isSelectable);\n if (t === undefined)\n return;\n var target = t;\n var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n // unless selecting same date twice, sort ascendingly\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (self.config.enableTime)\n setTimeout(function () { return (self.showTimeInput = true); }, 50);\n // maintain focus\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate]\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (var key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach(function (x) { return x(); });\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach(function (x) { return x(); });\n else if (HOOKS.indexOf(option) > -1)\n self.config[option] = arrayify(value);\n }\n self.redraw();\n updateValue(false);\n }\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); });\n if (self.config.mode === \"range\")\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) { triggerChange = false; }\n if (format === void 0) { format = self.config.dateFormat; }\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.showTimeInput = self.selectedDates.length > 0;\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate();\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map(function (rule) {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined)\n };\n return rule;\n })\n .filter(function (x) { return x; }); // remove falsy values\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n // Workaround IE11 setting placeholder as the input's value\n var preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n Object.defineProperty(self, \"showTimeInput\", {\n get: function () { return self._showTimeInput; },\n set: function (bool) {\n self._showTimeInput = bool;\n if (self.calendarContainer)\n toggleClass(self.calendarContainer, \"showTimeInput\", bool);\n self.isOpen && positionCalendar();\n }\n });\n }\n function setupInputs() {\n self.input = self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n /* istanbul ignore next */\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n // hack: store previous type to restore it after destroy()\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n // replicate self.element\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n var inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.step = self.input.getAttribute(\"step\") || \"any\";\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(e.target.value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n // If the instance has been destroyed already, all hooks have been removed\n if (self.config === undefined)\n return;\n var hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n // many front-end frameworks bind to the input event\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n if (compareDates(self.selectedDates[i], date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return (compareDates(date, self.selectedDates[0]) >= 0 &&\n compareDates(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(format) {\n return self.selectedDates\n .map(function (dObj) { return self.formatDate(dObj, format); })\n .filter(function (d, i, arr) {\n return self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i;\n })\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n /**\n * Updates the values of inputs associated with the calendar\n */\n function updateValue(triggerChange) {\n if (triggerChange === void 0) { triggerChange = true; }\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n var isPrevMonth = self.prevMonthNav.contains(e.target);\n var isNextMonth = self.nextMonthNav.contains(e.target);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(e.target) >= 0) {\n e.target.select();\n }\n else if (e.target.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (e.target.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\", input = e.target;\n if (self.amPM !== undefined && e.target === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n var newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n int(!isHourElem) +\n (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = pad(newValue);\n }\n }\n init();\n return self;\n }\n /* istanbul ignore next */\n function _flatpickr(nodeList, config) {\n // static list\n var nodes = Array.prototype.slice\n .call(nodeList)\n .filter(function (x) { return x instanceof HTMLElement; });\n var instances = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n }\n /* istanbul ignore next */\n if (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n // browser env\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n }\n /* istanbul ignore next */\n var flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n };\n /* istanbul ignore next */\n flatpickr.defaultConfig = {};\n flatpickr.l10ns = {\n en: __assign({}, english),\n \"default\": __assign({}, english)\n };\n flatpickr.localize = function (l10n) {\n flatpickr.l10ns[\"default\"] = __assign({}, flatpickr.l10ns[\"default\"], l10n);\n };\n flatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign({}, flatpickr.defaultConfig, config);\n };\n flatpickr.parseDate = createDateParser({});\n flatpickr.formatDate = createDateFormatter({});\n flatpickr.compareDates = compareDates;\n /* istanbul ignore next */\n if (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n }\n // eslint-disable-next-line @typescript-eslint/camelcase\n Date.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n };\n if (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n }\n\n return flatpickr;\n\n}));\n","module.exports = flarum.core.compat['helpers/avatar'];","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['helpers/fullTime'];","module.exports = flarum.core.compat['common/Component'];","module.exports = flarum.core.compat['helpers/username'];","module.exports = flarum.core.compat['helpers/userOnline'];","module.exports = flarum.core.compat['components/LogInModal'];","module.exports = flarum.core.compat['components/LoadingIndicator'];","module.exports = flarum.core.compat['utils/ItemList'];","module.exports = flarum.core.compat['components/SelectDropdown'];","var api = require(\"!../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../css-loader/dist/cjs.js!./main.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"\\n/* classes attached to */\\n\\n.fc-not-allowed,\\n.fc-not-allowed .fc-event { /* override events' custom cursors */\\n cursor: not-allowed;\\n}\\n\\n.fc-unselectable {\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n -webkit-touch-callout: none;\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n}\\n.fc {\\n /* layout of immediate children */\\n display: flex;\\n flex-direction: column;\\n\\n font-size: 1em\\n}\\n.fc,\\n .fc *,\\n .fc *:before,\\n .fc *:after {\\n box-sizing: border-box;\\n }\\n.fc table {\\n border-collapse: collapse;\\n border-spacing: 0;\\n font-size: 1em; /* normalize cross-browser */\\n }\\n.fc th {\\n text-align: center;\\n }\\n.fc th,\\n .fc td {\\n vertical-align: top;\\n padding: 0;\\n }\\n.fc a[data-navlink] {\\n cursor: pointer;\\n }\\n.fc a[data-navlink]:hover {\\n text-decoration: underline;\\n }\\n.fc-direction-ltr {\\n direction: ltr;\\n text-align: left;\\n}\\n.fc-direction-rtl {\\n direction: rtl;\\n text-align: right;\\n}\\n.fc-theme-standard td,\\n .fc-theme-standard th {\\n border: 1px solid #ddd;\\n border: 1px solid var(--fc-border-color, #ddd);\\n }\\n/* for FF, which doesn't expand a 100% div within a table cell. use absolute positioning */\\n/* inner-wrappers are responsible for being absolute */\\n/* TODO: best place for this? */\\n.fc-liquid-hack td,\\n .fc-liquid-hack th {\\n position: relative;\\n }\\n\\n@font-face {\\n font-family: 'fcicons';\\n src: url(\\\"data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\\\") format('truetype');\\n font-weight: normal;\\n font-style: normal;\\n}\\n\\n.fc-icon {\\n /* added for fc */\\n display: inline-block;\\n width: 1em;\\n height: 1em;\\n text-align: center;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n\\n /* use !important to prevent issues with browser extensions that change fonts */\\n font-family: 'fcicons' !important;\\n speak: none;\\n font-style: normal;\\n font-weight: normal;\\n font-variant: normal;\\n text-transform: none;\\n line-height: 1;\\n\\n /* Better Font Rendering =========== */\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n}\\n\\n.fc-icon-chevron-left:before {\\n content: \\\"\\\\e900\\\";\\n}\\n\\n.fc-icon-chevron-right:before {\\n content: \\\"\\\\e901\\\";\\n}\\n\\n.fc-icon-chevrons-left:before {\\n content: \\\"\\\\e902\\\";\\n}\\n\\n.fc-icon-chevrons-right:before {\\n content: \\\"\\\\e903\\\";\\n}\\n\\n.fc-icon-minus-square:before {\\n content: \\\"\\\\e904\\\";\\n}\\n\\n.fc-icon-plus-square:before {\\n content: \\\"\\\\e905\\\";\\n}\\n\\n.fc-icon-x:before {\\n content: \\\"\\\\e906\\\";\\n}\\n/*\\nLots taken from Flatly (MIT): https://bootswatch.com/4/flatly/bootstrap.css\\n\\nThese styles only apply when the standard-theme is activated.\\nWhen it's NOT activated, the fc-button classes won't even be in the DOM.\\n*/\\n.fc {\\n\\n /* reset */\\n\\n}\\n.fc .fc-button {\\n border-radius: 0;\\n overflow: visible;\\n text-transform: none;\\n margin: 0;\\n font-family: inherit;\\n font-size: inherit;\\n line-height: inherit;\\n }\\n.fc .fc-button:focus {\\n outline: 1px dotted;\\n outline: 5px auto -webkit-focus-ring-color;\\n }\\n.fc .fc-button {\\n -webkit-appearance: button;\\n }\\n.fc .fc-button:not(:disabled) {\\n cursor: pointer;\\n }\\n.fc .fc-button::-moz-focus-inner {\\n padding: 0;\\n border-style: none;\\n }\\n.fc {\\n\\n /* theme */\\n\\n}\\n.fc .fc-button {\\n display: inline-block;\\n font-weight: 400;\\n text-align: center;\\n vertical-align: middle;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n background-color: transparent;\\n border: 1px solid transparent;\\n padding: 0.4em 0.65em;\\n font-size: 1em;\\n line-height: 1.5;\\n border-radius: 0.25em;\\n }\\n.fc .fc-button:hover {\\n text-decoration: none;\\n }\\n.fc .fc-button:focus {\\n outline: 0;\\n box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);\\n }\\n.fc .fc-button:disabled {\\n opacity: 0.65;\\n }\\n.fc {\\n\\n /* \\\"primary\\\" coloring */\\n\\n}\\n.fc .fc-button-primary {\\n color: #fff;\\n color: var(--fc-button-text-color, #fff);\\n background-color: #2C3E50;\\n background-color: var(--fc-button-bg-color, #2C3E50);\\n border-color: #2C3E50;\\n border-color: var(--fc-button-border-color, #2C3E50);\\n }\\n.fc .fc-button-primary:hover {\\n color: #fff;\\n color: var(--fc-button-text-color, #fff);\\n background-color: #1e2b37;\\n background-color: var(--fc-button-hover-bg-color, #1e2b37);\\n border-color: #1a252f;\\n border-color: var(--fc-button-hover-border-color, #1a252f);\\n }\\n.fc .fc-button-primary:disabled { /* not DRY */\\n color: #fff;\\n color: var(--fc-button-text-color, #fff);\\n background-color: #2C3E50;\\n background-color: var(--fc-button-bg-color, #2C3E50);\\n border-color: #2C3E50;\\n border-color: var(--fc-button-border-color, #2C3E50); /* overrides :hover */\\n }\\n.fc .fc-button-primary:focus {\\n box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);\\n }\\n.fc .fc-button-primary:not(:disabled):active,\\n .fc .fc-button-primary:not(:disabled).fc-button-active {\\n color: #fff;\\n color: var(--fc-button-text-color, #fff);\\n background-color: #1a252f;\\n background-color: var(--fc-button-active-bg-color, #1a252f);\\n border-color: #151e27;\\n border-color: var(--fc-button-active-border-color, #151e27);\\n }\\n.fc .fc-button-primary:not(:disabled):active:focus,\\n .fc .fc-button-primary:not(:disabled).fc-button-active:focus {\\n box-shadow: 0 0 0 0.2rem rgba(76, 91, 106, 0.5);\\n }\\n.fc {\\n\\n /* icons within buttons */\\n\\n}\\n.fc .fc-button .fc-icon {\\n vertical-align: middle;\\n font-size: 1.5em; /* bump up the size (but don't make it bigger than line-height of button, which is 1.5em also) */\\n }\\n.fc .fc-button-group {\\n position: relative;\\n display: inline-flex;\\n vertical-align: middle;\\n }\\n.fc .fc-button-group > .fc-button {\\n position: relative;\\n flex: 1 1 auto;\\n }\\n.fc .fc-button-group > .fc-button:hover {\\n z-index: 1;\\n }\\n.fc .fc-button-group > .fc-button:focus,\\n .fc .fc-button-group > .fc-button:active,\\n .fc .fc-button-group > .fc-button.fc-button-active {\\n z-index: 1;\\n }\\n.fc-direction-ltr .fc-button-group > .fc-button:not(:first-child) {\\n margin-left: -1px;\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n }\\n.fc-direction-ltr .fc-button-group > .fc-button:not(:last-child) {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n }\\n.fc-direction-rtl .fc-button-group > .fc-button:not(:first-child) {\\n margin-right: -1px;\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n }\\n.fc-direction-rtl .fc-button-group > .fc-button:not(:last-child) {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n }\\n.fc .fc-toolbar {\\n display: flex;\\n justify-content: space-between;\\n align-items: center;\\n }\\n.fc .fc-toolbar.fc-header-toolbar {\\n margin-bottom: 1.5em;\\n }\\n.fc .fc-toolbar.fc-footer-toolbar {\\n margin-top: 1.5em;\\n }\\n.fc .fc-toolbar-title {\\n font-size: 1.75em;\\n margin: 0;\\n }\\n.fc-direction-ltr .fc-toolbar > * > :not(:first-child) {\\n margin-left: .75em; /* space between */\\n }\\n.fc-direction-rtl .fc-toolbar > * > :not(:first-child) {\\n margin-right: .75em; /* space between */\\n }\\n.fc-direction-rtl .fc-toolbar-ltr { /* when the toolbar-chunk positioning system is explicitly left-to-right */\\n flex-direction: row-reverse;\\n }\\n.fc .fc-scroller {\\n -webkit-overflow-scrolling: touch;\\n position: relative; /* for abs-positioned elements within */\\n }\\n.fc .fc-scroller-liquid {\\n height: 100%;\\n }\\n.fc .fc-scroller-liquid-absolute {\\n position: absolute;\\n top: 0;\\n right: 0;\\n left: 0;\\n bottom: 0;\\n }\\n.fc .fc-scroller-harness {\\n position: relative;\\n overflow: hidden;\\n direction: ltr;\\n /* hack for chrome computing the scroller's right/left wrong for rtl. undone below... */\\n /* TODO: demonstrate in codepen */\\n }\\n.fc .fc-scroller-harness-liquid {\\n height: 100%;\\n }\\n.fc-direction-rtl .fc-scroller-harness > .fc-scroller { /* undo above hack */\\n direction: rtl;\\n }\\n.fc-theme-standard .fc-scrollgrid {\\n border: 1px solid #ddd;\\n border: 1px solid var(--fc-border-color, #ddd); /* bootstrap does this. match */\\n }\\n.fc .fc-scrollgrid,\\n .fc .fc-scrollgrid table { /* all tables (self included) */\\n width: 100%; /* because tables don't normally do this */\\n table-layout: fixed;\\n }\\n.fc .fc-scrollgrid table { /* inner tables */\\n border-top-style: hidden;\\n border-left-style: hidden;\\n border-right-style: hidden;\\n }\\n.fc .fc-scrollgrid > tbody table,\\n .fc .fc-scrollgrid > tfoot table {\\n border-bottom-style: hidden; /* head keeps its bottom border tho */\\n }\\n.fc .fc-scrollgrid {\\n\\n border-collapse: separate;\\n border-right-width: 0;\\n border-bottom-width: 0\\n }\\n.fc .fc-scrollgrid > * > tr > * {\\n border-top-width: 0;\\n border-left-width: 0;\\n }\\n.fc .fc-scrollgrid > thead > tr > *,\\n .fc .fc-scrollgrid > tfoot > tr > * {\\n border-bottom-width: 0;\\n }\\n.fc .fc-scrollgrid-liquid {\\n height: 100%;\\n }\\n.fc .fc-scrollgrid-section { /* a */\\n height: 0\\n\\n }\\n.fc .fc-scrollgrid-section > td {\\n height: 0; /* needs a height so inner div within grow */\\n }\\n.fc .fc-scrollgrid-section table {\\n height: 1px;\\n /* for most browsers, if a height isn't set on the table, can't do liquid-height within cells */\\n /* serves as a min-height. harmless */\\n }\\n.fc .fc-scrollgrid-section-liquid {\\n height: auto\\n\\n }\\n.fc .fc-scrollgrid-section-liquid > td {\\n height: 100%; /* FF needs this instead of auto */\\n }\\n.fc {\\n\\n /* stickiness */\\n\\n}\\n.fc .fc-scrollgrid-section-sticky > * {\\n background: #fff;\\n background: var(--fc-page-bg-color, #fff);\\n position: -webkit-sticky;\\n position: sticky;\\n z-index: 2; /* TODO: var */\\n /* TODO: box-shadow when sticking */\\n }\\n.fc .fc-scrollgrid > thead > .fc-scrollgrid-section-sticky > * {\\n top: 0; /* because border-sharing causes a gap at the top */\\n /* TODO: give safari -1. has bug */\\n }\\n.fc .fc-scrollgrid > tfoot > .fc-scrollgrid-section-sticky > * {\\n bottom: 0; /* known bug: bottom-stickiness doesn't work in safari */\\n }\\n.fc .fc-scrollgrid-sticky-shim { /* for horizontal scrollbar */\\n height: 1px; /* needs height to create scrollbars */\\n margin-bottom: -1px;\\n }\\n.fc .fc-sticky {\\n position: -webkit-sticky;\\n position: sticky;\\n }\\n.fc .fc-view-harness {\\n flex-grow: 1; /* because this harness is WITHIN the .fc's flexbox */\\n position: relative;\\n }\\n.fc {\\n\\n /* when the harness controls the height, make the view liquid */\\n\\n}\\n.fc .fc-view-harness-active > .fc-view {\\n position: absolute;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n }\\n.fc .fc-col-header-cell-cushion {\\n display: inline-block; /* x-browser for when sticky (when multi-tier header) */\\n padding: 2px 4px;\\n }\\n.fc .fc-bg-event,\\n .fc .fc-non-business,\\n .fc .fc-highlight {\\n /* will always have a harness with position:relative/absolute, so absolutely expand */\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n }\\n.fc .fc-non-business {\\n background: rgba(215, 215, 215, 0.3);\\n background: var(--fc-non-business-color, rgba(215, 215, 215, 0.3));\\n }\\n.fc .fc-bg-event {\\n background: rgb(143, 223, 130);\\n background: var(--fc-bg-event-color, rgb(143, 223, 130));\\n opacity: 0.3;\\n opacity: var(--fc-bg-event-opacity, 0.3)\\n }\\n.fc .fc-bg-event .fc-event-title {\\n margin: .5em;\\n font-size: .85em;\\n font-size: var(--fc-small-font-size, .85em);\\n font-style: italic;\\n }\\n.fc .fc-highlight {\\n background: rgba(188, 232, 241, 0.3);\\n background: var(--fc-highlight-color, rgba(188, 232, 241, 0.3));\\n }\\n.fc .fc-cell-shaded,\\n .fc .fc-day-disabled {\\n background: rgba(208, 208, 208, 0.3);\\n background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\\n }\\n/* link resets */\\n/* ---------------------------------------------------------------------------------------------------- */\\na.fc-event,\\na.fc-event:hover {\\n text-decoration: none;\\n}\\n/* cursor */\\n.fc-event[href],\\n.fc-event.fc-event-draggable {\\n cursor: pointer;\\n}\\n/* event text content */\\n/* ---------------------------------------------------------------------------------------------------- */\\n.fc-event .fc-event-main {\\n position: relative;\\n z-index: 2;\\n }\\n/* dragging */\\n/* ---------------------------------------------------------------------------------------------------- */\\n.fc-event-dragging:not(.fc-event-selected) { /* MOUSE */\\n opacity: 0.75;\\n }\\n.fc-event-dragging.fc-event-selected { /* TOUCH */\\n box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);\\n }\\n/* resizing */\\n/* ---------------------------------------------------------------------------------------------------- */\\n/* (subclasses should hone positioning for touch and non-touch) */\\n.fc-event .fc-event-resizer {\\n display: none;\\n position: absolute;\\n z-index: 4;\\n }\\n.fc-event:hover, /* MOUSE */\\n.fc-event-selected { /* TOUCH */\\n\\n}\\n.fc-event:hover .fc-event-resizer, .fc-event-selected .fc-event-resizer {\\n display: block;\\n }\\n.fc-event-selected .fc-event-resizer {\\n border-radius: 4px;\\n border-radius: calc(var(--fc-event-resizer-dot-total-width, 8px) / 2);\\n border-width: 1px;\\n border-width: var(--fc-event-resizer-dot-border-width, 1px);\\n width: 8px;\\n width: var(--fc-event-resizer-dot-total-width, 8px);\\n height: 8px;\\n height: var(--fc-event-resizer-dot-total-width, 8px);\\n border-style: solid;\\n border-color: inherit;\\n background: #fff;\\n background: var(--fc-page-bg-color, #fff)\\n\\n /* expand hit area */\\n\\n }\\n.fc-event-selected .fc-event-resizer:before {\\n content: '';\\n position: absolute;\\n top: -20px;\\n left: -20px;\\n right: -20px;\\n bottom: -20px;\\n }\\n/* selecting (always TOUCH) */\\n/* ---------------------------------------------------------------------------------------------------- */\\n.fc-event-selected {\\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2)\\n\\n /* expand hit area (subclasses should expand) */\\n\\n}\\n.fc-event-selected:before {\\n content: \\\"\\\";\\n position: absolute;\\n z-index: 3;\\n top: 0;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n }\\n.fc-event-selected {\\n\\n /* dimmer effect */\\n\\n}\\n.fc-event-selected:after {\\n content: \\\"\\\";\\n background: rgba(0, 0, 0, 0.25);\\n background: var(--fc-event-selected-overlay-color, rgba(0, 0, 0, 0.25));\\n position: absolute;\\n z-index: 1;\\n\\n /* assume there's a border on all sides. overcome it. */\\n /* sometimes there's NOT a border, in which case the dimmer will go over */\\n /* an adjacent border, which looks fine. */\\n top: -1px;\\n left: -1px;\\n right: -1px;\\n bottom: -1px;\\n }\\n/*\\nA HORIZONTAL event\\n*/\\n.fc-h-event { /* allowed to be top-level */\\n display: block;\\n border: 1px solid #3788d8;\\n border: 1px solid var(--fc-event-bg-color, #3788d8);\\n background-color: #3788d8;\\n background-color: var(--fc-event-border-color, #3788d8)\\n\\n}\\n.fc-h-event .fc-event-main {\\n color: #fff;\\n color: var(--fc-event-text-color, #fff);\\n }\\n.fc-h-event .fc-event-main-frame {\\n display: flex; /* for make fc-event-title-container expand */\\n }\\n.fc-h-event .fc-event-time {\\n max-width: 100%; /* clip overflow on this element */\\n overflow: hidden;\\n }\\n.fc-h-event .fc-event-title-container { /* serves as a container for the sticky cushion */\\n flex-grow: 1;\\n flex-shrink: 1;\\n min-width: 0; /* important for allowing to shrink all the way */\\n }\\n.fc-h-event .fc-event-title {\\n display: inline-block; /* need this to be sticky cross-browser */\\n vertical-align: top; /* for not messing up line-height */\\n left: 0; /* for sticky */\\n right: 0; /* for sticky */\\n max-width: 100%; /* clip overflow on this element */\\n overflow: hidden;\\n }\\n.fc-h-event.fc-event-selected:before {\\n /* expand hit area */\\n top: -10px;\\n bottom: -10px;\\n }\\n/* adjust border and border-radius (if there is any) for non-start/end */\\n.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),\\n.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end) {\\n border-top-left-radius: 0;\\n border-bottom-left-radius: 0;\\n border-left-width: 0;\\n}\\n.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),\\n.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start) {\\n border-top-right-radius: 0;\\n border-bottom-right-radius: 0;\\n border-right-width: 0;\\n}\\n/* resizers */\\n.fc-h-event:not(.fc-event-selected) .fc-event-resizer {\\n top: 0;\\n bottom: 0;\\n width: 8px;\\n width: var(--fc-event-resizer-thickness, 8px);\\n}\\n.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,\\n.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end {\\n cursor: w-resize;\\n left: -4px;\\n left: calc(var(--fc-event-resizer-thickness, 8px) / -2);\\n}\\n.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,\\n.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start {\\n cursor: e-resize;\\n right: -4px;\\n right: calc(var(--fc-event-resizer-thickness, 8px) / -2);\\n}\\n/* resizers for TOUCH */\\n.fc-h-event.fc-event-selected .fc-event-resizer {\\n top: 50%;\\n margin-top: -4px;\\n margin-top: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);\\n}\\n.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,\\n.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end {\\n left: -4px;\\n left: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);\\n}\\n.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,\\n.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start {\\n right: -4px;\\n right: calc(var(--fc-event-resizer-dot-total-width, 8px) / -2);\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var api = require(\"!../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../css-loader/dist/cjs.js!./main.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"\\n:root {\\n --fc-daygrid-event-dot-width: 8px;\\n}\\n.fc .fc-popover {\\n position: fixed;\\n top: 0; /* for when not positioned yet */\\n box-shadow: 0 2px 6px rgba(0,0,0,.15);\\n }\\n.fc .fc-popover-header {\\n display: flex;\\n flex-direction: row;\\n justify-content: space-between;\\n align-items: center;\\n padding: 3px 4px;\\n }\\n.fc .fc-popover-title {\\n margin: 0 2px;\\n }\\n.fc .fc-popover-close {\\n cursor: pointer;\\n opacity: 0.65;\\n font-size: 1.1em;\\n }\\n.fc-theme-standard .fc-popover {\\n border: 1px solid #ddd;\\n border: 1px solid var(--fc-border-color, #ddd);\\n background: #fff;\\n background: var(--fc-page-bg-color, #fff);\\n }\\n.fc-theme-standard .fc-popover-header {\\n background: rgba(208, 208, 208, 0.3);\\n background: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\\n }\\n/* help things clear margins of inner content */\\n.fc-daygrid-day-frame,\\n.fc-daygrid-day-events,\\n.fc-daygrid-event-harness { /* for event top/bottom margins */\\n}\\n.fc-daygrid-day-frame:before, .fc-daygrid-day-events:before, .fc-daygrid-event-harness:before {\\n content: \\\"\\\";\\n clear: both;\\n display: table; }\\n.fc-daygrid-day-frame:after, .fc-daygrid-day-events:after, .fc-daygrid-event-harness:after {\\n content: \\\"\\\";\\n clear: both;\\n display: table; }\\n.fc .fc-daygrid-body { /* a
that wraps the table */\\n position: relative;\\n z-index: 1; /* container inner z-index's because s can't do it */\\n }\\n.fc .fc-daygrid-day.fc-day-today {\\n background-color: rgba(255, 220, 40, 0.15);\\n background-color: var(--fc-today-bg-color, rgba(255, 220, 40, 0.15));\\n }\\n.fc .fc-daygrid-day-frame {\\n position: relative;\\n min-height: 100%; /* seems to work better than `height` because sets height after rows/cells naturally do it */\\n }\\n.fc {\\n\\n /* cell top */\\n\\n}\\n.fc .fc-daygrid-day-top {\\n position: relative;\\n z-index: 4;\\n display: flex;\\n flex-direction: row-reverse;\\n }\\n.fc .fc-day-other .fc-daygrid-day-top {\\n opacity: 0.3;\\n }\\n.fc {\\n\\n /* day number (within cell top) */\\n\\n}\\n.fc .fc-daygrid-day-number {\\n padding: 4px;\\n }\\n.fc {\\n\\n /* event container */\\n\\n}\\n.fc .fc-daygrid-day-events {\\n margin-top: 1px; /* needs to be margin, not padding, so that available cell height can be computed */\\n }\\n.fc {\\n\\n /* positioning for balanced vs natural */\\n\\n}\\n.fc .fc-daygrid-body-balanced .fc-daygrid-day-events {\\n position: absolute;\\n left: 0;\\n right: 0;\\n }\\n.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events {\\n position: relative; /* for containing abs positioned event harnesses */\\n min-height: 2em; /* in addition to being a min-height during natural height, equalizes the heights a little bit */\\n }\\n.fc .fc-daygrid-body-natural { /* can coexist with -unbalanced */\\n }\\n.fc .fc-daygrid-body-natural .fc-daygrid-day-events {\\n margin-bottom: 1em;\\n }\\n.fc {\\n\\n /* event harness */\\n\\n}\\n.fc .fc-daygrid-event-harness {\\n position: relative;\\n }\\n.fc .fc-daygrid-event-harness-abs {\\n position: absolute;\\n top: 0; /* fallback coords for when cannot yet be computed */\\n left: 0; /* */\\n right: 0; /* */\\n }\\n.fc .fc-daygrid-bg-harness {\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n }\\n.fc {\\n\\n /* bg content */\\n\\n}\\n.fc .fc-daygrid-day-bg .fc-non-business { z-index: 1 }\\n.fc .fc-daygrid-day-bg .fc-bg-event { z-index: 2 }\\n.fc .fc-daygrid-day-bg .fc-highlight { z-index: 3 }\\n.fc {\\n\\n /* events */\\n\\n}\\n.fc .fc-daygrid-event {\\n z-index: 6;\\n margin-top: 1px;\\n }\\n.fc .fc-daygrid-event.fc-event-mirror {\\n z-index: 7;\\n }\\n.fc {\\n\\n /* cell bottom (within day-events) */\\n\\n}\\n.fc .fc-daygrid-day-bottom {\\n position: relative;\\n z-index: 4;\\n font-size: .85em;\\n margin: 2px 3px 0;\\n }\\n.fc .fc-daygrid-more-link {\\n cursor: pointer;\\n }\\n.fc {\\n\\n /* week number (within frame) */\\n\\n}\\n.fc .fc-daygrid-week-number {\\n position: absolute;\\n z-index: 5;\\n top: 0;\\n padding: 2px;\\n min-width: 1.5em;\\n text-align: center;\\n background-color: rgba(208, 208, 208, 0.3);\\n background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\\n color: #808080;\\n color: var(--fc-neutral-text-color, #808080);\\n }\\n.fc {\\n\\n /* popover */\\n\\n}\\n.fc .fc-more-popover {\\n z-index: 8;\\n }\\n.fc .fc-more-popover .fc-popover-body {\\n min-width: 220px;\\n padding: 10px;\\n }\\n.fc-direction-ltr .fc-daygrid-event.fc-event-start,\\n.fc-direction-rtl .fc-daygrid-event.fc-event-end {\\n margin-left: 2px;\\n}\\n.fc-direction-ltr .fc-daygrid-event.fc-event-end,\\n.fc-direction-rtl .fc-daygrid-event.fc-event-start {\\n margin-right: 2px;\\n}\\n.fc-direction-ltr .fc-daygrid-week-number {\\n left: 0;\\n border-radius: 0 0 3px 0;\\n }\\n.fc-direction-rtl .fc-daygrid-week-number {\\n right: 0;\\n border-radius: 0 0 0 3px;\\n }\\n.fc-liquid-hack .fc-daygrid-day-frame {\\n position: static; /* will cause inner absolute stuff to expand to */\\n }\\n.fc-daygrid-event { /* make root-level, because will be dragged-and-dropped outside of a component root */\\n position: relative; /* for z-indexes assigned later */\\n white-space: nowrap;\\n border-radius: 3px; /* dot event needs this to when selected */\\n font-size: .85em;\\n font-size: var(--fc-small-font-size, .85em);\\n}\\n/* --- the rectangle (\\\"block\\\") style of event --- */\\n.fc-daygrid-block-event .fc-event-time {\\n font-weight: bold;\\n }\\n.fc-daygrid-block-event .fc-event-time,\\n .fc-daygrid-block-event .fc-event-title {\\n padding: 1px;\\n }\\n/* --- the dot style of event --- */\\n.fc-daygrid-dot-event {\\n display: block;\\n padding: 2px 0;\\n overflow: hidden\\n\\n}\\n.fc-daygrid-dot-event .fc-event-title {\\n font-weight: bold;\\n }\\n.fc-daygrid-dot-event .fc-event-time,\\n .fc-daygrid-dot-event .fc-event-title {\\n display: inline-block; /* better than inline, for sitting next to dot */\\n }\\n.fc-daygrid-dot-event:hover,\\n .fc-daygrid-dot-event.fc-event-mirror {\\n background: rgba(0, 0, 0, 0.1);\\n }\\n.fc-daygrid-event-dot { /* the actual dot */\\n display: inline-block;\\n margin: 0 4px;\\n box-sizing: content-box;\\n width: 0;\\n height: 0;\\n border: 4px solid #3788d8;\\n border: calc(var(--fc-daygrid-event-dot-width, 8px) / 2) solid var(--fc-event-border-color, #3788d8);\\n border-radius: 4px;\\n border-radius: calc(var(--fc-daygrid-event-dot-width, 8px) / 2);\\n}\\n/* --- spacing between time and title --- */\\n.fc-direction-ltr .fc-daygrid-event .fc-event-time {\\n margin-right: 3px;\\n }\\n.fc-direction-rtl .fc-daygrid-event .fc-event-time {\\n margin-left: 3px;\\n }\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","var api = require(\"!../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../css-loader/dist/cjs.js!./main.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"\\n:root {\\n --fc-list-event-dot-width: 10px;\\n --fc-list-event-hover-bg-color: #f5f5f5;\\n}\\n.fc-theme-standard .fc-list {\\n border: 1px solid #ddd;\\n border: 1px solid var(--fc-border-color, #ddd);\\n }\\n.fc {\\n\\n /* message when no events */\\n\\n}\\n.fc .fc-list-empty {\\n background-color: rgba(208, 208, 208, 0.3);\\n background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\\n height: 100%;\\n display: flex;\\n justify-content: center;\\n align-items: center; /* vertically aligns fc-list-empty-inner */\\n }\\n.fc .fc-list-empty-cushion {\\n margin: 5em 0;\\n }\\n.fc {\\n\\n /* table within the scroller */\\n /* ---------------------------------------------------------------------------------------------------- */\\n\\n}\\n.fc .fc-list-table {\\n width: 100%;\\n border-style: hidden; /* kill outer border on theme */\\n }\\n.fc .fc-list-table tr > * {\\n border-left: 0;\\n border-right: 0;\\n }\\n.fc .fc-list-sticky .fc-list-day > * { /* the cells */\\n position: -webkit-sticky;\\n position: sticky;\\n top: 0;\\n background: #fff;\\n background: var(--fc-page-bg-color, #fff); /* for when headers are styled to be transparent and sticky */\\n }\\n.fc .fc-list-table th {\\n padding: 0; /* uses an inner-wrapper instead... */\\n }\\n.fc .fc-list-table td,\\n .fc .fc-list-day-cushion {\\n padding: 8px 14px;\\n }\\n.fc {\\n\\n\\n /* date heading rows */\\n /* ---------------------------------------------------------------------------------------------------- */\\n\\n}\\n.fc .fc-list-day-cushion:after {\\n content: \\\"\\\";\\n clear: both;\\n display: table; /* clear floating */\\n }\\n.fc-theme-standard .fc-list-day-cushion {\\n background-color: rgba(208, 208, 208, 0.3);\\n background-color: var(--fc-neutral-bg-color, rgba(208, 208, 208, 0.3));\\n }\\n.fc-direction-ltr .fc-list-day-text,\\n.fc-direction-rtl .fc-list-day-side-text {\\n float: left;\\n}\\n.fc-direction-ltr .fc-list-day-side-text,\\n.fc-direction-rtl .fc-list-day-text {\\n float: right;\\n}\\n/* make the dot closer to the event title */\\n.fc-direction-ltr .fc-list-table .fc-list-event-graphic { padding-right: 0 }\\n.fc-direction-rtl .fc-list-table .fc-list-event-graphic { padding-left: 0 }\\n.fc .fc-list-event.fc-event-forced-url {\\n cursor: pointer; /* whole row will seem clickable */\\n }\\n.fc .fc-list-event:hover td {\\n background-color: #f5f5f5;\\n background-color: var(--fc-list-event-hover-bg-color, #f5f5f5);\\n }\\n.fc {\\n\\n /* shrink certain cols */\\n\\n}\\n.fc .fc-list-event-graphic,\\n .fc .fc-list-event-time {\\n white-space: nowrap;\\n width: 1px;\\n }\\n.fc .fc-list-event-dot {\\n display: inline-block;\\n box-sizing: content-box;\\n width: 0;\\n height: 0;\\n border: 5px solid #3788d8;\\n border: calc(var(--fc-list-event-dot-width, 10px) / 2) solid var(--fc-event-border-color, #3788d8);\\n border-radius: 5px;\\n border-radius: calc(var(--fc-list-event-dot-width, 10px) / 2);\\n }\\n.fc {\\n\\n /* reset styling */\\n\\n}\\n.fc .fc-list-event-title a {\\n color: inherit;\\n text-decoration: none;\\n }\\n.fc {\\n\\n /* underline link when hovering over any part of row */\\n\\n}\\n.fc .fc-list-event.fc-event-forced-url:hover a {\\n text-decoration: underline;\\n }\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = flarum.core.compat['models/User'];","var api = require(\"!../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../css-loader/dist/cjs.js!./flatpickr.css\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".flatpickr-calendar {\\n background: transparent;\\n opacity: 0;\\n display: none;\\n text-align: center;\\n visibility: hidden;\\n padding: 0;\\n -webkit-animation: none;\\n animation: none;\\n direction: ltr;\\n border: 0;\\n font-size: 14px;\\n line-height: 24px;\\n border-radius: 5px;\\n position: absolute;\\n width: 307.875px;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n -ms-touch-action: manipulation;\\n touch-action: manipulation;\\n background: #fff;\\n -webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);\\n box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);\\n}\\n.flatpickr-calendar.open,\\n.flatpickr-calendar.inline {\\n opacity: 1;\\n max-height: 640px;\\n visibility: visible;\\n}\\n.flatpickr-calendar.open {\\n display: inline-block;\\n z-index: 99999;\\n}\\n.flatpickr-calendar.animate.open {\\n -webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);\\n animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);\\n}\\n.flatpickr-calendar.inline {\\n display: block;\\n position: relative;\\n top: 2px;\\n}\\n.flatpickr-calendar.static {\\n position: absolute;\\n top: calc(100% + 2px);\\n}\\n.flatpickr-calendar.static.open {\\n z-index: 999;\\n display: block;\\n}\\n.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {\\n -webkit-box-shadow: none !important;\\n box-shadow: none !important;\\n}\\n.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {\\n -webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\\n box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\\n}\\n.flatpickr-calendar .hasWeeks .dayContainer,\\n.flatpickr-calendar .hasTime .dayContainer {\\n border-bottom: 0;\\n border-bottom-right-radius: 0;\\n border-bottom-left-radius: 0;\\n}\\n.flatpickr-calendar .hasWeeks .dayContainer {\\n border-left: 0;\\n}\\n.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {\\n height: 40px;\\n border-top: 1px solid #e6e6e6;\\n}\\n.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {\\n height: auto;\\n}\\n.flatpickr-calendar:before,\\n.flatpickr-calendar:after {\\n position: absolute;\\n display: block;\\n pointer-events: none;\\n border: solid transparent;\\n content: '';\\n height: 0;\\n width: 0;\\n left: 22px;\\n}\\n.flatpickr-calendar.rightMost:before,\\n.flatpickr-calendar.rightMost:after {\\n left: auto;\\n right: 22px;\\n}\\n.flatpickr-calendar:before {\\n border-width: 5px;\\n margin: 0 -5px;\\n}\\n.flatpickr-calendar:after {\\n border-width: 4px;\\n margin: 0 -4px;\\n}\\n.flatpickr-calendar.arrowTop:before,\\n.flatpickr-calendar.arrowTop:after {\\n bottom: 100%;\\n}\\n.flatpickr-calendar.arrowTop:before {\\n border-bottom-color: #e6e6e6;\\n}\\n.flatpickr-calendar.arrowTop:after {\\n border-bottom-color: #fff;\\n}\\n.flatpickr-calendar.arrowBottom:before,\\n.flatpickr-calendar.arrowBottom:after {\\n top: 100%;\\n}\\n.flatpickr-calendar.arrowBottom:before {\\n border-top-color: #e6e6e6;\\n}\\n.flatpickr-calendar.arrowBottom:after {\\n border-top-color: #fff;\\n}\\n.flatpickr-calendar:focus {\\n outline: 0;\\n}\\n.flatpickr-wrapper {\\n position: relative;\\n display: inline-block;\\n}\\n.flatpickr-months {\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: -ms-flexbox;\\n display: flex;\\n}\\n.flatpickr-months .flatpickr-month {\\n background: transparent;\\n color: rgba(0,0,0,0.9);\\n fill: rgba(0,0,0,0.9);\\n height: 34px;\\n line-height: 1;\\n text-align: center;\\n position: relative;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n overflow: hidden;\\n -webkit-box-flex: 1;\\n -webkit-flex: 1;\\n -ms-flex: 1;\\n flex: 1;\\n}\\n.flatpickr-months .flatpickr-prev-month,\\n.flatpickr-months .flatpickr-next-month {\\n text-decoration: none;\\n cursor: pointer;\\n position: absolute;\\n top: 0;\\n height: 34px;\\n padding: 10px;\\n z-index: 3;\\n color: rgba(0,0,0,0.9);\\n fill: rgba(0,0,0,0.9);\\n}\\n.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,\\n.flatpickr-months .flatpickr-next-month.flatpickr-disabled {\\n display: none;\\n}\\n.flatpickr-months .flatpickr-prev-month i,\\n.flatpickr-months .flatpickr-next-month i {\\n position: relative;\\n}\\n.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,\\n.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {\\n/*\\n /*rtl:begin:ignore*/\\n/*\\n */\\n left: 0;\\n/*\\n /*rtl:end:ignore*/\\n/*\\n */\\n}\\n/*\\n /*rtl:begin:ignore*/\\n/*\\n /*rtl:end:ignore*/\\n.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,\\n.flatpickr-months .flatpickr-next-month.flatpickr-next-month {\\n/*\\n /*rtl:begin:ignore*/\\n/*\\n */\\n right: 0;\\n/*\\n /*rtl:end:ignore*/\\n/*\\n */\\n}\\n/*\\n /*rtl:begin:ignore*/\\n/*\\n /*rtl:end:ignore*/\\n.flatpickr-months .flatpickr-prev-month:hover,\\n.flatpickr-months .flatpickr-next-month:hover {\\n color: #959ea9;\\n}\\n.flatpickr-months .flatpickr-prev-month:hover svg,\\n.flatpickr-months .flatpickr-next-month:hover svg {\\n fill: #f64747;\\n}\\n.flatpickr-months .flatpickr-prev-month svg,\\n.flatpickr-months .flatpickr-next-month svg {\\n width: 14px;\\n height: 14px;\\n}\\n.flatpickr-months .flatpickr-prev-month svg path,\\n.flatpickr-months .flatpickr-next-month svg path {\\n -webkit-transition: fill 0.1s;\\n transition: fill 0.1s;\\n fill: inherit;\\n}\\n.numInputWrapper {\\n position: relative;\\n height: auto;\\n}\\n.numInputWrapper input,\\n.numInputWrapper span {\\n display: inline-block;\\n}\\n.numInputWrapper input {\\n width: 100%;\\n}\\n.numInputWrapper input::-ms-clear {\\n display: none;\\n}\\n.numInputWrapper input::-webkit-outer-spin-button,\\n.numInputWrapper input::-webkit-inner-spin-button {\\n margin: 0;\\n -webkit-appearance: none;\\n}\\n.numInputWrapper span {\\n position: absolute;\\n right: 0;\\n width: 14px;\\n padding: 0 4px 0 2px;\\n height: 50%;\\n line-height: 50%;\\n opacity: 0;\\n cursor: pointer;\\n border: 1px solid rgba(57,57,57,0.15);\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n.numInputWrapper span:hover {\\n background: rgba(0,0,0,0.1);\\n}\\n.numInputWrapper span:active {\\n background: rgba(0,0,0,0.2);\\n}\\n.numInputWrapper span:after {\\n display: block;\\n content: \\\"\\\";\\n position: absolute;\\n}\\n.numInputWrapper span.arrowUp {\\n top: 0;\\n border-bottom: 0;\\n}\\n.numInputWrapper span.arrowUp:after {\\n border-left: 4px solid transparent;\\n border-right: 4px solid transparent;\\n border-bottom: 4px solid rgba(57,57,57,0.6);\\n top: 26%;\\n}\\n.numInputWrapper span.arrowDown {\\n top: 50%;\\n}\\n.numInputWrapper span.arrowDown:after {\\n border-left: 4px solid transparent;\\n border-right: 4px solid transparent;\\n border-top: 4px solid rgba(57,57,57,0.6);\\n top: 40%;\\n}\\n.numInputWrapper span svg {\\n width: inherit;\\n height: auto;\\n}\\n.numInputWrapper span svg path {\\n fill: rgba(0,0,0,0.5);\\n}\\n.numInputWrapper:hover {\\n background: rgba(0,0,0,0.05);\\n}\\n.numInputWrapper:hover span {\\n opacity: 1;\\n}\\n.flatpickr-current-month {\\n font-size: 135%;\\n line-height: inherit;\\n font-weight: 300;\\n color: inherit;\\n position: absolute;\\n width: 75%;\\n left: 12.5%;\\n padding: 7.48px 0 0 0;\\n line-height: 1;\\n height: 34px;\\n display: inline-block;\\n text-align: center;\\n -webkit-transform: translate3d(0px, 0px, 0px);\\n transform: translate3d(0px, 0px, 0px);\\n}\\n.flatpickr-current-month span.cur-month {\\n font-family: inherit;\\n font-weight: 700;\\n color: inherit;\\n display: inline-block;\\n margin-left: 0.5ch;\\n padding: 0;\\n}\\n.flatpickr-current-month span.cur-month:hover {\\n background: rgba(0,0,0,0.05);\\n}\\n.flatpickr-current-month .numInputWrapper {\\n width: 6ch;\\n width: 7ch\\\\0;\\n display: inline-block;\\n}\\n.flatpickr-current-month .numInputWrapper span.arrowUp:after {\\n border-bottom-color: rgba(0,0,0,0.9);\\n}\\n.flatpickr-current-month .numInputWrapper span.arrowDown:after {\\n border-top-color: rgba(0,0,0,0.9);\\n}\\n.flatpickr-current-month input.cur-year {\\n background: transparent;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n color: inherit;\\n cursor: text;\\n padding: 0 0 0 0.5ch;\\n margin: 0;\\n display: inline-block;\\n font-size: inherit;\\n font-family: inherit;\\n font-weight: 300;\\n line-height: inherit;\\n height: auto;\\n border: 0;\\n border-radius: 0;\\n vertical-align: initial;\\n -webkit-appearance: textfield;\\n -moz-appearance: textfield;\\n appearance: textfield;\\n}\\n.flatpickr-current-month input.cur-year:focus {\\n outline: 0;\\n}\\n.flatpickr-current-month input.cur-year[disabled],\\n.flatpickr-current-month input.cur-year[disabled]:hover {\\n font-size: 100%;\\n color: rgba(0,0,0,0.5);\\n background: transparent;\\n pointer-events: none;\\n}\\n.flatpickr-current-month .flatpickr-monthDropdown-months {\\n appearance: menulist;\\n background: transparent;\\n border: none;\\n border-radius: 0;\\n box-sizing: border-box;\\n color: inherit;\\n cursor: pointer;\\n font-size: inherit;\\n font-family: inherit;\\n font-weight: 300;\\n height: auto;\\n line-height: inherit;\\n margin: -1px 0 0 0;\\n outline: none;\\n padding: 0 0 0 0.5ch;\\n position: relative;\\n vertical-align: initial;\\n -webkit-box-sizing: border-box;\\n -webkit-appearance: menulist;\\n -moz-appearance: menulist;\\n width: auto;\\n}\\n.flatpickr-current-month .flatpickr-monthDropdown-months:focus,\\n.flatpickr-current-month .flatpickr-monthDropdown-months:active {\\n outline: none;\\n}\\n.flatpickr-current-month .flatpickr-monthDropdown-months:hover {\\n background: rgba(0,0,0,0.05);\\n}\\n.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {\\n background-color: transparent;\\n outline: none;\\n padding: 0;\\n}\\n.flatpickr-weekdays {\\n background: transparent;\\n text-align: center;\\n overflow: hidden;\\n width: 100%;\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-align: center;\\n -webkit-align-items: center;\\n -ms-flex-align: center;\\n align-items: center;\\n height: 28px;\\n}\\n.flatpickr-weekdays .flatpickr-weekdaycontainer {\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-flex: 1;\\n -webkit-flex: 1;\\n -ms-flex: 1;\\n flex: 1;\\n}\\nspan.flatpickr-weekday {\\n cursor: default;\\n font-size: 90%;\\n background: transparent;\\n color: rgba(0,0,0,0.54);\\n line-height: 1;\\n margin: 0;\\n text-align: center;\\n display: block;\\n -webkit-box-flex: 1;\\n -webkit-flex: 1;\\n -ms-flex: 1;\\n flex: 1;\\n font-weight: bolder;\\n}\\n.dayContainer,\\n.flatpickr-weeks {\\n padding: 1px 0 0 0;\\n}\\n.flatpickr-days {\\n position: relative;\\n overflow: hidden;\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-align: start;\\n -webkit-align-items: flex-start;\\n -ms-flex-align: start;\\n align-items: flex-start;\\n width: 307.875px;\\n}\\n.flatpickr-days:focus {\\n outline: 0;\\n}\\n.dayContainer {\\n padding: 0;\\n outline: 0;\\n text-align: left;\\n width: 307.875px;\\n min-width: 307.875px;\\n max-width: 307.875px;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n display: inline-block;\\n display: -ms-flexbox;\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: flex;\\n -webkit-flex-wrap: wrap;\\n flex-wrap: wrap;\\n -ms-flex-wrap: wrap;\\n -ms-flex-pack: justify;\\n -webkit-justify-content: space-around;\\n justify-content: space-around;\\n -webkit-transform: translate3d(0px, 0px, 0px);\\n transform: translate3d(0px, 0px, 0px);\\n opacity: 1;\\n}\\n.dayContainer + .dayContainer {\\n -webkit-box-shadow: -1px 0 0 #e6e6e6;\\n box-shadow: -1px 0 0 #e6e6e6;\\n}\\n.flatpickr-day {\\n background: none;\\n border: 1px solid transparent;\\n border-radius: 150px;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n color: #393939;\\n cursor: pointer;\\n font-weight: 400;\\n width: 14.2857143%;\\n -webkit-flex-basis: 14.2857143%;\\n -ms-flex-preferred-size: 14.2857143%;\\n flex-basis: 14.2857143%;\\n max-width: 39px;\\n height: 39px;\\n line-height: 39px;\\n margin: 0;\\n display: inline-block;\\n position: relative;\\n -webkit-box-pack: center;\\n -webkit-justify-content: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n text-align: center;\\n}\\n.flatpickr-day.inRange,\\n.flatpickr-day.prevMonthDay.inRange,\\n.flatpickr-day.nextMonthDay.inRange,\\n.flatpickr-day.today.inRange,\\n.flatpickr-day.prevMonthDay.today.inRange,\\n.flatpickr-day.nextMonthDay.today.inRange,\\n.flatpickr-day:hover,\\n.flatpickr-day.prevMonthDay:hover,\\n.flatpickr-day.nextMonthDay:hover,\\n.flatpickr-day:focus,\\n.flatpickr-day.prevMonthDay:focus,\\n.flatpickr-day.nextMonthDay:focus {\\n cursor: pointer;\\n outline: 0;\\n background: #e6e6e6;\\n border-color: #e6e6e6;\\n}\\n.flatpickr-day.today {\\n border-color: #959ea9;\\n}\\n.flatpickr-day.today:hover,\\n.flatpickr-day.today:focus {\\n border-color: #959ea9;\\n background: #959ea9;\\n color: #fff;\\n}\\n.flatpickr-day.selected,\\n.flatpickr-day.startRange,\\n.flatpickr-day.endRange,\\n.flatpickr-day.selected.inRange,\\n.flatpickr-day.startRange.inRange,\\n.flatpickr-day.endRange.inRange,\\n.flatpickr-day.selected:focus,\\n.flatpickr-day.startRange:focus,\\n.flatpickr-day.endRange:focus,\\n.flatpickr-day.selected:hover,\\n.flatpickr-day.startRange:hover,\\n.flatpickr-day.endRange:hover,\\n.flatpickr-day.selected.prevMonthDay,\\n.flatpickr-day.startRange.prevMonthDay,\\n.flatpickr-day.endRange.prevMonthDay,\\n.flatpickr-day.selected.nextMonthDay,\\n.flatpickr-day.startRange.nextMonthDay,\\n.flatpickr-day.endRange.nextMonthDay {\\n background: #569ff7;\\n -webkit-box-shadow: none;\\n box-shadow: none;\\n color: #fff;\\n border-color: #569ff7;\\n}\\n.flatpickr-day.selected.startRange,\\n.flatpickr-day.startRange.startRange,\\n.flatpickr-day.endRange.startRange {\\n border-radius: 50px 0 0 50px;\\n}\\n.flatpickr-day.selected.endRange,\\n.flatpickr-day.startRange.endRange,\\n.flatpickr-day.endRange.endRange {\\n border-radius: 0 50px 50px 0;\\n}\\n.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),\\n.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),\\n.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {\\n -webkit-box-shadow: -10px 0 0 #569ff7;\\n box-shadow: -10px 0 0 #569ff7;\\n}\\n.flatpickr-day.selected.startRange.endRange,\\n.flatpickr-day.startRange.startRange.endRange,\\n.flatpickr-day.endRange.startRange.endRange {\\n border-radius: 50px;\\n}\\n.flatpickr-day.inRange {\\n border-radius: 0;\\n -webkit-box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\\n box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;\\n}\\n.flatpickr-day.flatpickr-disabled,\\n.flatpickr-day.flatpickr-disabled:hover,\\n.flatpickr-day.prevMonthDay,\\n.flatpickr-day.nextMonthDay,\\n.flatpickr-day.notAllowed,\\n.flatpickr-day.notAllowed.prevMonthDay,\\n.flatpickr-day.notAllowed.nextMonthDay {\\n color: rgba(57,57,57,0.3);\\n background: transparent;\\n border-color: transparent;\\n cursor: default;\\n}\\n.flatpickr-day.flatpickr-disabled,\\n.flatpickr-day.flatpickr-disabled:hover {\\n cursor: not-allowed;\\n color: rgba(57,57,57,0.1);\\n}\\n.flatpickr-day.week.selected {\\n border-radius: 0;\\n -webkit-box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;\\n box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;\\n}\\n.flatpickr-day.hidden {\\n visibility: hidden;\\n}\\n.rangeMode .flatpickr-day {\\n margin-top: 1px;\\n}\\n.flatpickr-weekwrapper {\\n float: left;\\n}\\n.flatpickr-weekwrapper .flatpickr-weeks {\\n padding: 0 12px;\\n -webkit-box-shadow: 1px 0 0 #e6e6e6;\\n box-shadow: 1px 0 0 #e6e6e6;\\n}\\n.flatpickr-weekwrapper .flatpickr-weekday {\\n float: none;\\n width: 100%;\\n line-height: 28px;\\n}\\n.flatpickr-weekwrapper span.flatpickr-day,\\n.flatpickr-weekwrapper span.flatpickr-day:hover {\\n display: block;\\n width: 100%;\\n max-width: none;\\n color: rgba(57,57,57,0.3);\\n background: transparent;\\n cursor: default;\\n border: none;\\n}\\n.flatpickr-innerContainer {\\n display: block;\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: -ms-flexbox;\\n display: flex;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n overflow: hidden;\\n}\\n.flatpickr-rContainer {\\n display: inline-block;\\n padding: 0;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n.flatpickr-time {\\n text-align: center;\\n outline: 0;\\n display: block;\\n height: 0;\\n line-height: 40px;\\n max-height: 40px;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n overflow: hidden;\\n display: -webkit-box;\\n display: -webkit-flex;\\n display: -ms-flexbox;\\n display: flex;\\n}\\n.flatpickr-time:after {\\n content: \\\"\\\";\\n display: table;\\n clear: both;\\n}\\n.flatpickr-time .numInputWrapper {\\n -webkit-box-flex: 1;\\n -webkit-flex: 1;\\n -ms-flex: 1;\\n flex: 1;\\n width: 40%;\\n height: 40px;\\n float: left;\\n}\\n.flatpickr-time .numInputWrapper span.arrowUp:after {\\n border-bottom-color: #393939;\\n}\\n.flatpickr-time .numInputWrapper span.arrowDown:after {\\n border-top-color: #393939;\\n}\\n.flatpickr-time.hasSeconds .numInputWrapper {\\n width: 26%;\\n}\\n.flatpickr-time.time24hr .numInputWrapper {\\n width: 49%;\\n}\\n.flatpickr-time input {\\n background: transparent;\\n -webkit-box-shadow: none;\\n box-shadow: none;\\n border: 0;\\n border-radius: 0;\\n text-align: center;\\n margin: 0;\\n padding: 0;\\n height: inherit;\\n line-height: inherit;\\n color: #393939;\\n font-size: 14px;\\n position: relative;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n -webkit-appearance: textfield;\\n -moz-appearance: textfield;\\n appearance: textfield;\\n}\\n.flatpickr-time input.flatpickr-hour {\\n font-weight: bold;\\n}\\n.flatpickr-time input.flatpickr-minute,\\n.flatpickr-time input.flatpickr-second {\\n font-weight: 400;\\n}\\n.flatpickr-time input:focus {\\n outline: 0;\\n border: 0;\\n}\\n.flatpickr-time .flatpickr-time-separator,\\n.flatpickr-time .flatpickr-am-pm {\\n height: inherit;\\n float: left;\\n line-height: inherit;\\n color: #393939;\\n font-weight: bold;\\n width: 2%;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n -webkit-align-self: center;\\n -ms-flex-item-align: center;\\n align-self: center;\\n}\\n.flatpickr-time .flatpickr-am-pm {\\n outline: 0;\\n width: 18%;\\n cursor: pointer;\\n text-align: center;\\n font-weight: 400;\\n}\\n.flatpickr-time input:hover,\\n.flatpickr-time .flatpickr-am-pm:hover,\\n.flatpickr-time input:focus,\\n.flatpickr-time .flatpickr-am-pm:focus {\\n background: #eee;\\n}\\n.flatpickr-input[readonly] {\\n cursor: pointer;\\n}\\n@-webkit-keyframes fpFadeInDown {\\n from {\\n opacity: 0;\\n -webkit-transform: translate3d(0, -20px, 0);\\n transform: translate3d(0, -20px, 0);\\n }\\n to {\\n opacity: 1;\\n -webkit-transform: translate3d(0, 0, 0);\\n transform: translate3d(0, 0, 0);\\n }\\n}\\n@keyframes fpFadeInDown {\\n from {\\n opacity: 0;\\n -webkit-transform: translate3d(0, -20px, 0);\\n transform: translate3d(0, -20px, 0);\\n }\\n to {\\n opacity: 1;\\n -webkit-transform: translate3d(0, 0, 0);\\n transform: translate3d(0, 0, 0);\\n }\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n","module.exports = flarum.core.compat['common/components/Alert'];","module.exports = flarum.core.compat['utils/affixSidebar'];","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","var n,l,u,i,t,r,o,f={},e=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(n,l){for(var u in l)n[u]=l[u];return n}function a(n){var l=n.parentNode;l&&l.removeChild(n)}function v(n,l,u){var i,t=arguments,r={};for(i in l)\"key\"!==i&&\"ref\"!==i&&(r[i]=l[i]);if(arguments.length>3)for(u=[u],i=3;i1&&z(t,l,u),l=x(u,t,t,n.__k,null,t.__e,l),\"function\"==typeof n.type&&(n.__d=l)))}function T(l,u,i,t,r,o,f,e,c){var a,v,h,y,_,k,w,m,b,x,A,P=u.type;if(void 0!==u.constructor)return null;(a=n.__b)&&a(u);try{n:if(\"function\"==typeof P){if(m=u.props,b=(a=P.contextType)&&t[a.__c],x=a?b?b.props.value:a.__:t,i.__c?w=(v=u.__c=i.__c).__=v.__E:(\"prototype\"in P&&P.prototype.render?u.__c=v=new P(m,x):(u.__c=v=new d(m,x),v.constructor=P,v.render=L),b&&b.sub(v),v.props=m,v.state||(v.state={}),v.context=x,v.__n=t,h=v.__d=!0,v.__h=[]),null==v.__s&&(v.__s=v.state),null!=P.getDerivedStateFromProps&&(v.__s==v.state&&(v.__s=s({},v.__s)),s(v.__s,P.getDerivedStateFromProps(m,v.__s))),y=v.props,_=v.state,h)null==P.getDerivedStateFromProps&&null!=v.componentWillMount&&v.componentWillMount(),null!=v.componentDidMount&&v.__h.push(v.componentDidMount);else{if(null==P.getDerivedStateFromProps&&m!==y&&null!=v.componentWillReceiveProps&&v.componentWillReceiveProps(m,x),!v.__e&&null!=v.shouldComponentUpdate&&!1===v.shouldComponentUpdate(m,v.__s,x)||u.__v===i.__v){v.props=m,v.state=v.__s,u.__v!==i.__v&&(v.__d=!1),v.__v=u,u.__e=i.__e,u.__k=i.__k,v.__h.length&&f.push(v),z(u,e,l);break n}null!=v.componentWillUpdate&&v.componentWillUpdate(m,v.__s,x),null!=v.componentDidUpdate&&v.__h.push(function(){v.componentDidUpdate(y,_,k)})}v.context=x,v.props=m,v.state=v.__s,(a=n.__r)&&a(u),v.__d=!1,v.__v=u,v.__P=l,a=v.render(v.props,v.state,v.context),v.state=v.__s,null!=v.getChildContext&&(t=s(s({},t),v.getChildContext())),h||null==v.getSnapshotBeforeUpdate||(k=v.getSnapshotBeforeUpdate(y,_)),A=null!=a&&a.type==p&&null==a.key?a.props.children:a,g(l,Array.isArray(A)?A:[A],u,i,t,r,o,f,e,c),v.base=u.__e,v.__h.length&&f.push(v),w&&(v.__E=v.__=null),v.__e=!1}else null==o&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=j(i.__e,u,i,t,r,o,f,c);(a=n.diffed)&&a(u)}catch(l){u.__v=null,n.__e(l,u,i)}return u.__e}function $(l,u){n.__c&&n.__c(u,l),l.some(function(u){try{l=u.__h,u.__h=[],l.some(function(n){n.call(u)})}catch(l){n.__e(l,u.__v)}})}function j(n,l,u,i,t,r,o,c){var s,a,v,h,y,p=u.props,d=l.props;if(t=\"svg\"===l.type||t,null!=r)for(s=0;s2&&(l.children=e.slice.call(arguments,2)),u={},l)\"key\"!==i&&\"ref\"!==i&&(u[i]=l[i]);return h(n.type,u,l.key||n.key,l.ref||n.ref,null)}function q(n){var l={},u={__c:\"__cC\"+o++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var i,t=this;return this.getChildContext||(i=[],this.getChildContext=function(){return l[u.__c]=t,l},this.shouldComponentUpdate=function(n){t.props.value!==n.value&&i.some(function(l){l.context=n.value,w(l)})},this.sub=function(n){i.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){i.splice(i.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Consumer.contextType=u,u.Provider.__=u,u}n={__e:function(n,l){for(var u,i;l=l.__;)if((u=l.__c)&&!u.__)try{if(u.constructor&&null!=u.constructor.getDerivedStateFromError&&(i=!0,u.setState(u.constructor.getDerivedStateFromError(n))),null!=u.componentDidCatch&&(i=!0,u.componentDidCatch(n)),i)return w(u.__E=u)}catch(l){n=l}throw n}},l=function(n){return null!=n&&void 0===n.constructor},d.prototype.setState=function(n,l){var u;u=this.__s!==this.state?this.__s:this.__s=s({},this.state),\"function\"==typeof n&&(n=n(u,this.props)),n&&s(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),w(this))},d.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),w(this))},d.prototype.render=p,u=[],i=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,m.__r=0,r=f,o=0;export{M as render,O as hydrate,v as createElement,v as h,p as Fragment,y as createRef,l as isValidElement,d as Component,S as cloneElement,q as createContext,b as toChildArray,I as __u,n as options};\n//# sourceMappingURL=preact.module.js.map\n","import { __extends } from \"tslib\";\nimport * as preact from 'preact';\nwindow.FullCalendarVDom = {\n Component: preact.Component,\n createElement: preact.createElement,\n render: preact.render,\n createRef: preact.createRef,\n Fragment: preact.Fragment,\n createContext: createContext,\n flushToDom: flushToDom\n};\n\n\n\nfunction flushToDom() {\n var oldDebounceRendering = preact.options.debounceRendering; \n var callbackQ = [];\n function execCallbackSync(callback) {\n callbackQ.push(callback);\n }\n preact.options.debounceRendering = execCallbackSync;\n preact.render(preact.createElement(FakeComponent, {}), document.createElement('div'));\n while (callbackQ.length) {\n callbackQ.shift()();\n }\n preact.options.debounceRendering = oldDebounceRendering;\n}\nvar FakeComponent = /** @class */ (function (_super) {\n __extends(FakeComponent, _super);\n function FakeComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FakeComponent.prototype.render = function () { return preact.createElement('div', {}); };\n FakeComponent.prototype.componentDidMount = function () { this.setState({}); };\n return FakeComponent;\n}(preact.Component));\nfunction createContext(defaultValue) {\n var ContextType = preact.createContext(defaultValue);\n var origProvider = ContextType.Provider;\n ContextType.Provider = function () {\n var _this = this;\n var isNew = !this.getChildContext;\n var children = origProvider.apply(this, arguments);\n if (isNew) {\n var subs_1 = [];\n this.shouldComponentUpdate = function (_props) {\n if (_this.props.value !== _props.value) {\n subs_1.some(function (c) {\n c.context = _props.value;\n c.forceUpdate();\n });\n }\n };\n this.sub = function (c) {\n subs_1.push(c);\n var old = c.componentWillUnmount;\n c.componentWillUnmount = function () {\n subs_1.splice(subs_1.indexOf(c), 1);\n old && old.call(c);\n };\n };\n }\n return children;\n };\n return ContextType;\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","\nif (typeof FullCalendarVDom === 'undefined') {\n throw new Error('Please import the top-level fullcalendar lib before attempting to import a plugin.');\n}\nexport var Component = FullCalendarVDom.Component;\nexport var createElement = FullCalendarVDom.createElement;\nexport var render = FullCalendarVDom.render;\nexport var createRef = FullCalendarVDom.createRef;\nexport var Fragment = FullCalendarVDom.Fragment;\nexport var createContext = FullCalendarVDom.createContext;\nexport var flushToDom = FullCalendarVDom.flushToDom;\n","/*!\nFullCalendar v5.1.0\nDocs & License: https://fullcalendar.io/\n(c) 2020 Adam Shaw\n*/\nimport './main.css';\n\nimport { __assign, __spreadArrays, __extends } from 'tslib';\nimport { createContext, Component, createRef, createElement, Fragment } from './vdom';\nexport * from './vdom';\n\n// no public types yet. when there are, export from:\n// import {} from './api-type-deps'\nvar EventSourceApi = /** @class */ (function () {\n function EventSourceApi(context, internalEventSource // rename?\n ) {\n this.context = context;\n this.internalEventSource = internalEventSource;\n }\n EventSourceApi.prototype.remove = function () {\n this.context.dispatch({\n type: 'REMOVE_EVENT_SOURCE',\n sourceId: this.internalEventSource.sourceId\n });\n };\n EventSourceApi.prototype.refetch = function () {\n this.context.dispatch({\n type: 'FETCH_EVENT_SOURCES',\n sourceIds: [this.internalEventSource.sourceId]\n });\n };\n Object.defineProperty(EventSourceApi.prototype, \"id\", {\n get: function () {\n return this.internalEventSource.publicId;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventSourceApi.prototype, \"url\", {\n // only relevant to json-feed event sources\n get: function () {\n return this.internalEventSource.meta.url;\n },\n enumerable: false,\n configurable: true\n });\n return EventSourceApi;\n}());\n\n// TODO: new util arrayify?\nfunction removeExact(array, exactVal) {\n var removeCnt = 0;\n var i = 0;\n while (i < array.length) {\n if (array[i] === exactVal) {\n array.splice(i, 1);\n removeCnt++;\n }\n else {\n i++;\n }\n }\n return removeCnt;\n}\nfunction isArraysEqual(a0, a1, equalityFunc) {\n if (a0 === a1) {\n return true;\n }\n var len = a0.length;\n var i;\n if (len !== a1.length) { // not array? or not same length?\n return false;\n }\n for (i = 0; i < len; i++) {\n if (!(equalityFunc ? equalityFunc(a0[i], a1[i]) : a0[i] === a1[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction htmlToElement(html) {\n html = html.trim();\n var container = document.createElement('div');\n container.innerHTML = html;\n return container.firstChild;\n}\nfunction removeElement(el) {\n if (el.parentNode) {\n el.parentNode.removeChild(el);\n }\n}\nfunction injectHtml(el, html) {\n el.innerHTML = html;\n}\nfunction injectDomNodes(el, domNodes) {\n var oldNodes = Array.prototype.slice.call(el.childNodes); // TODO: use array util\n var newNodes = Array.prototype.slice.call(domNodes); // TODO: use array util\n if (!isArraysEqual(oldNodes, newNodes)) {\n for (var _i = 0, newNodes_1 = newNodes; _i < newNodes_1.length; _i++) {\n var newNode = newNodes_1[_i];\n el.appendChild(newNode);\n }\n oldNodes.forEach(removeElement);\n }\n}\n// Querying\n// ----------------------------------------------------------------------------------------------------------------\n// from https://developer.mozilla.org/en-US/docs/Web/API/Element/closest\nvar matchesMethod = Element.prototype.matches ||\n Element.prototype.matchesSelector ||\n Element.prototype.msMatchesSelector;\nvar closestMethod = Element.prototype.closest || function (selector) {\n // polyfill\n var el = this;\n if (!document.documentElement.contains(el)) {\n return null;\n }\n do {\n if (elementMatches(el, selector)) {\n return el;\n }\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n};\nfunction elementClosest(el, selector) {\n return closestMethod.call(el, selector);\n}\nfunction elementMatches(el, selector) {\n return matchesMethod.call(el, selector);\n}\n// accepts multiple subject els\n// returns a real array. good for methods like forEach\n// TODO: accept the document\nfunction findElements(container, selector) {\n var containers = container instanceof HTMLElement ? [container] : container;\n var allMatches = [];\n for (var i = 0; i < containers.length; i++) {\n var matches = containers[i].querySelectorAll(selector);\n for (var j = 0; j < matches.length; j++) {\n allMatches.push(matches[j]);\n }\n }\n return allMatches;\n}\n// accepts multiple subject els\n// only queries direct child elements // TODO: rename to findDirectChildren!\nfunction findDirectChildren(parent, selector) {\n var parents = parent instanceof HTMLElement ? [parent] : parent;\n var allMatches = [];\n for (var i = 0; i < parents.length; i++) {\n var childNodes = parents[i].children; // only ever elements\n for (var j = 0; j < childNodes.length; j++) {\n var childNode = childNodes[j];\n if (!selector || elementMatches(childNode, selector)) {\n allMatches.push(childNode);\n }\n }\n }\n return allMatches;\n}\n// Style\n// ----------------------------------------------------------------------------------------------------------------\nvar PIXEL_PROP_RE = /(top|left|right|bottom|width|height)$/i;\nfunction applyStyle(el, props) {\n for (var propName in props) {\n applyStyleProp(el, propName, props[propName]);\n }\n}\nfunction applyStyleProp(el, name, val) {\n if (val == null) {\n el.style[name] = '';\n }\n else if (typeof val === 'number' && PIXEL_PROP_RE.test(name)) {\n el.style[name] = val + 'px';\n }\n else {\n el.style[name] = val;\n }\n}\n\n// Stops a mouse/touch event from doing it's native browser action\nfunction preventDefault(ev) {\n ev.preventDefault();\n}\n// Event Delegation\n// ----------------------------------------------------------------------------------------------------------------\nfunction buildDelegationHandler(selector, handler) {\n return function (ev) {\n var matchedChild = elementClosest(ev.target, selector);\n if (matchedChild) {\n handler.call(matchedChild, ev, matchedChild);\n }\n };\n}\nfunction listenBySelector(container, eventType, selector, handler) {\n var attachedHandler = buildDelegationHandler(selector, handler);\n container.addEventListener(eventType, attachedHandler);\n return function () {\n container.removeEventListener(eventType, attachedHandler);\n };\n}\nfunction listenToHoverBySelector(container, selector, onMouseEnter, onMouseLeave) {\n var currentMatchedChild;\n return listenBySelector(container, 'mouseover', selector, function (ev, matchedChild) {\n if (matchedChild !== currentMatchedChild) {\n currentMatchedChild = matchedChild;\n onMouseEnter(ev, matchedChild);\n var realOnMouseLeave_1 = function (ev) {\n currentMatchedChild = null;\n onMouseLeave(ev, matchedChild);\n matchedChild.removeEventListener('mouseleave', realOnMouseLeave_1);\n };\n // listen to the next mouseleave, and then unattach\n matchedChild.addEventListener('mouseleave', realOnMouseLeave_1);\n }\n });\n}\n// Animation\n// ----------------------------------------------------------------------------------------------------------------\nvar transitionEventNames = [\n 'webkitTransitionEnd',\n 'otransitionend',\n 'oTransitionEnd',\n 'msTransitionEnd',\n 'transitionend'\n];\n// triggered only when the next single subsequent transition finishes\nfunction whenTransitionDone(el, callback) {\n var realCallback = function (ev) {\n callback(ev);\n transitionEventNames.forEach(function (eventName) {\n el.removeEventListener(eventName, realCallback);\n });\n };\n transitionEventNames.forEach(function (eventName) {\n el.addEventListener(eventName, realCallback); // cross-browser way to determine when the transition finishes\n });\n}\n\nvar guidNumber = 0;\nfunction guid() {\n return String(guidNumber++);\n}\n/* FullCalendar-specific DOM Utilities\n----------------------------------------------------------------------------------------------------------------------*/\n// Make the mouse cursor express that an event is not allowed in the current area\nfunction disableCursor() {\n document.body.classList.add('fc-not-allowed');\n}\n// Returns the mouse cursor to its original look\nfunction enableCursor() {\n document.body.classList.remove('fc-not-allowed');\n}\n/* Selection\n----------------------------------------------------------------------------------------------------------------------*/\nfunction preventSelection(el) {\n el.classList.add('fc-unselectable');\n el.addEventListener('selectstart', preventDefault);\n}\nfunction allowSelection(el) {\n el.classList.remove('fc-unselectable');\n el.removeEventListener('selectstart', preventDefault);\n}\n/* Context Menu\n----------------------------------------------------------------------------------------------------------------------*/\nfunction preventContextMenu(el) {\n el.addEventListener('contextmenu', preventDefault);\n}\nfunction allowContextMenu(el) {\n el.removeEventListener('contextmenu', preventDefault);\n}\nfunction parseFieldSpecs(input) {\n var specs = [];\n var tokens = [];\n var i;\n var token;\n if (typeof input === 'string') {\n tokens = input.split(/\\s*,\\s*/);\n }\n else if (typeof input === 'function') {\n tokens = [input];\n }\n else if (Array.isArray(input)) {\n tokens = input;\n }\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n if (typeof token === 'string') {\n specs.push(token.charAt(0) === '-' ?\n { field: token.substring(1), order: -1 } :\n { field: token, order: 1 });\n }\n else if (typeof token === 'function') {\n specs.push({ func: token });\n }\n }\n return specs;\n}\nfunction compareByFieldSpecs(obj0, obj1, fieldSpecs) {\n var i;\n var cmp;\n for (i = 0; i < fieldSpecs.length; i++) {\n cmp = compareByFieldSpec(obj0, obj1, fieldSpecs[i]);\n if (cmp) {\n return cmp;\n }\n }\n return 0;\n}\nfunction compareByFieldSpec(obj0, obj1, fieldSpec) {\n if (fieldSpec.func) {\n return fieldSpec.func(obj0, obj1);\n }\n return flexibleCompare(obj0[fieldSpec.field], obj1[fieldSpec.field])\n * (fieldSpec.order || 1);\n}\nfunction flexibleCompare(a, b) {\n if (!a && !b) {\n return 0;\n }\n if (b == null) {\n return -1;\n }\n if (a == null) {\n return 1;\n }\n if (typeof a === 'string' || typeof b === 'string') {\n return String(a).localeCompare(String(b));\n }\n return a - b;\n}\n/* String Utilities\n----------------------------------------------------------------------------------------------------------------------*/\nfunction padStart(val, len) {\n var s = String(val);\n return '000'.substr(0, len - s.length) + s;\n}\n/* Number Utilities\n----------------------------------------------------------------------------------------------------------------------*/\nfunction compareNumbers(a, b) {\n return a - b;\n}\nfunction isInt(n) {\n return n % 1 === 0;\n}\n/* FC-specific DOM dimension stuff\n----------------------------------------------------------------------------------------------------------------------*/\nfunction computeSmallestCellWidth(cellEl) {\n var allWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-frame');\n var contentWidthEl = cellEl.querySelector('.fc-scrollgrid-shrink-cushion');\n if (!allWidthEl) {\n throw new Error('needs fc-scrollgrid-shrink-frame className'); // TODO: use const\n }\n if (!contentWidthEl) {\n throw new Error('needs fc-scrollgrid-shrink-cushion className');\n }\n return cellEl.getBoundingClientRect().width - allWidthEl.getBoundingClientRect().width + // the cell padding+border\n contentWidthEl.getBoundingClientRect().width;\n}\n\nvar DAY_IDS = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];\n// Adding\nfunction addWeeks(m, n) {\n var a = dateToUtcArray(m);\n a[2] += n * 7;\n return arrayToUtcDate(a);\n}\nfunction addDays(m, n) {\n var a = dateToUtcArray(m);\n a[2] += n;\n return arrayToUtcDate(a);\n}\nfunction addMs(m, n) {\n var a = dateToUtcArray(m);\n a[6] += n;\n return arrayToUtcDate(a);\n}\n// Diffing (all return floats)\n// TODO: why not use ranges?\nfunction diffWeeks(m0, m1) {\n return diffDays(m0, m1) / 7;\n}\nfunction diffDays(m0, m1) {\n return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60 * 24);\n}\nfunction diffHours(m0, m1) {\n return (m1.valueOf() - m0.valueOf()) / (1000 * 60 * 60);\n}\nfunction diffMinutes(m0, m1) {\n return (m1.valueOf() - m0.valueOf()) / (1000 * 60);\n}\nfunction diffSeconds(m0, m1) {\n return (m1.valueOf() - m0.valueOf()) / 1000;\n}\nfunction diffDayAndTime(m0, m1) {\n var m0day = startOfDay(m0);\n var m1day = startOfDay(m1);\n return {\n years: 0,\n months: 0,\n days: Math.round(diffDays(m0day, m1day)),\n milliseconds: (m1.valueOf() - m1day.valueOf()) - (m0.valueOf() - m0day.valueOf())\n };\n}\n// Diffing Whole Units\nfunction diffWholeWeeks(m0, m1) {\n var d = diffWholeDays(m0, m1);\n if (d !== null && d % 7 === 0) {\n return d / 7;\n }\n return null;\n}\nfunction diffWholeDays(m0, m1) {\n if (timeAsMs(m0) === timeAsMs(m1)) {\n return Math.round(diffDays(m0, m1));\n }\n return null;\n}\n// Start-Of\nfunction startOfDay(m) {\n return arrayToUtcDate([\n m.getUTCFullYear(),\n m.getUTCMonth(),\n m.getUTCDate()\n ]);\n}\nfunction startOfHour(m) {\n return arrayToUtcDate([\n m.getUTCFullYear(),\n m.getUTCMonth(),\n m.getUTCDate(),\n m.getUTCHours()\n ]);\n}\nfunction startOfMinute(m) {\n return arrayToUtcDate([\n m.getUTCFullYear(),\n m.getUTCMonth(),\n m.getUTCDate(),\n m.getUTCHours(),\n m.getUTCMinutes()\n ]);\n}\nfunction startOfSecond(m) {\n return arrayToUtcDate([\n m.getUTCFullYear(),\n m.getUTCMonth(),\n m.getUTCDate(),\n m.getUTCHours(),\n m.getUTCMinutes(),\n m.getUTCSeconds()\n ]);\n}\n// Week Computation\nfunction weekOfYear(marker, dow, doy) {\n var y = marker.getUTCFullYear();\n var w = weekOfGivenYear(marker, y, dow, doy);\n if (w < 1) {\n return weekOfGivenYear(marker, y - 1, dow, doy);\n }\n var nextW = weekOfGivenYear(marker, y + 1, dow, doy);\n if (nextW >= 1) {\n return Math.min(w, nextW);\n }\n return w;\n}\nfunction weekOfGivenYear(marker, year, dow, doy) {\n var firstWeekStart = arrayToUtcDate([year, 0, 1 + firstWeekOffset(year, dow, doy)]);\n var dayStart = startOfDay(marker);\n var days = Math.round(diffDays(firstWeekStart, dayStart));\n return Math.floor(days / 7) + 1; // zero-indexed\n}\n// start-of-first-week - start-of-year\nfunction firstWeekOffset(year, dow, doy) {\n // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n var fwd = 7 + dow - doy;\n // first-week day local weekday -- which local weekday is fwd\n var fwdlw = (7 + arrayToUtcDate([year, 0, fwd]).getUTCDay() - dow) % 7;\n return -fwdlw + fwd - 1;\n}\n// Array Conversion\nfunction dateToLocalArray(date) {\n return [\n date.getFullYear(),\n date.getMonth(),\n date.getDate(),\n date.getHours(),\n date.getMinutes(),\n date.getSeconds(),\n date.getMilliseconds()\n ];\n}\nfunction arrayToLocalDate(a) {\n return new Date(a[0], a[1] || 0, a[2] == null ? 1 : a[2], // day of month\n a[3] || 0, a[4] || 0, a[5] || 0);\n}\nfunction dateToUtcArray(date) {\n return [\n date.getUTCFullYear(),\n date.getUTCMonth(),\n date.getUTCDate(),\n date.getUTCHours(),\n date.getUTCMinutes(),\n date.getUTCSeconds(),\n date.getUTCMilliseconds()\n ];\n}\nfunction arrayToUtcDate(a) {\n // according to web standards (and Safari), a month index is required.\n // massage if only given a year.\n if (a.length === 1) {\n a = a.concat([0]);\n }\n return new Date(Date.UTC.apply(Date, a));\n}\n// Other Utils\nfunction isValidDate(m) {\n return !isNaN(m.valueOf());\n}\nfunction timeAsMs(m) {\n return m.getUTCHours() * 1000 * 60 * 60 +\n m.getUTCMinutes() * 1000 * 60 +\n m.getUTCSeconds() * 1000 +\n m.getUTCMilliseconds();\n}\n\nfunction createEventInstance(defId, range, forcedStartTzo, forcedEndTzo) {\n return {\n instanceId: guid(),\n defId: defId,\n range: range,\n forcedStartTzo: forcedStartTzo == null ? null : forcedStartTzo,\n forcedEndTzo: forcedEndTzo == null ? null : forcedEndTzo\n };\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n// Merges an array of objects into a single object.\n// The second argument allows for an array of property names who's object values will be merged together.\nfunction mergeProps(propObjs, complexPropsMap) {\n var dest = {};\n if (complexPropsMap) {\n for (var name_1 in complexPropsMap) {\n var complexObjs = [];\n // collect the trailing object values, stopping when a non-object is discovered\n for (var i = propObjs.length - 1; i >= 0; i--) {\n var val = propObjs[i][name_1];\n if (typeof val === 'object' && val) { // non-null object\n complexObjs.unshift(val);\n }\n else if (val !== undefined) {\n dest[name_1] = val; // if there were no objects, this value will be used\n break;\n }\n }\n // if the trailing values were objects, use the merged value\n if (complexObjs.length) {\n dest[name_1] = mergeProps(complexObjs);\n }\n }\n }\n // copy values into the destination, going from last to first\n for (var i = propObjs.length - 1; i >= 0; i--) {\n var props = propObjs[i];\n for (var name_2 in props) {\n if (!(name_2 in dest)) { // if already assigned by previous props or complex props, don't reassign\n dest[name_2] = props[name_2];\n }\n }\n }\n return dest;\n}\nfunction filterHash(hash, func) {\n var filtered = {};\n for (var key in hash) {\n if (func(hash[key], key)) {\n filtered[key] = hash[key];\n }\n }\n return filtered;\n}\nfunction mapHash(hash, func) {\n var newHash = {};\n for (var key in hash) {\n newHash[key] = func(hash[key], key);\n }\n return newHash;\n}\nfunction arrayToHash(a) {\n var hash = {};\n for (var _i = 0, a_1 = a; _i < a_1.length; _i++) {\n var item = a_1[_i];\n hash[item] = true;\n }\n return hash;\n}\nfunction buildHashFromArray(a, func) {\n var hash = {};\n for (var i = 0; i < a.length; i++) {\n var tuple = func(a[i], i);\n hash[tuple[0]] = tuple[1];\n }\n return hash;\n}\nfunction hashValuesToArray(obj) {\n var a = [];\n for (var key in obj) {\n a.push(obj[key]);\n }\n return a;\n}\nfunction isPropsEqual(obj0, obj1) {\n if (obj0 === obj1) {\n return true;\n }\n for (var key in obj0) {\n if (hasOwnProperty.call(obj0, key)) {\n if (!(key in obj1)) {\n return false;\n }\n }\n }\n for (var key in obj1) {\n if (hasOwnProperty.call(obj1, key)) {\n if (obj0[key] !== obj1[key]) {\n return false;\n }\n }\n }\n return true;\n}\nfunction getUnequalProps(obj0, obj1) {\n var keys = [];\n for (var key in obj0) {\n if (hasOwnProperty.call(obj0, key)) {\n if (!(key in obj1)) {\n keys.push(key);\n }\n }\n }\n for (var key in obj1) {\n if (hasOwnProperty.call(obj1, key)) {\n if (obj0[key] !== obj1[key]) {\n keys.push(key);\n }\n }\n }\n return keys;\n}\nfunction compareObjs(oldProps, newProps, equalityFuncs) {\n if (equalityFuncs === void 0) { equalityFuncs = {}; }\n if (oldProps === newProps) {\n return true;\n }\n for (var key in newProps) {\n if (key in oldProps && isObjValsEqual(oldProps[key], newProps[key], equalityFuncs[key])) ;\n else {\n return false;\n }\n }\n // check for props that were omitted in the new\n for (var key in oldProps) {\n if (!(key in newProps)) {\n return false;\n }\n }\n return true;\n}\n/*\nassumed \"true\" equality for handler names like \"onReceiveSomething\"\n*/\nfunction isObjValsEqual(val0, val1, comparator) {\n if (val0 === val1 || comparator === true) {\n return true;\n }\n if (comparator) {\n return comparator(val0, val1);\n }\n return false;\n}\nfunction collectFromHash(hash, startIndex, endIndex, step) {\n if (startIndex === void 0) { startIndex = 0; }\n if (step === void 0) { step = 1; }\n var res = [];\n if (endIndex == null) {\n endIndex = Object.keys(hash).length;\n }\n for (var i = startIndex; i < endIndex; i += step) {\n var val = hash[i];\n if (val !== undefined) { // will disregard undefined for sparse arrays\n res.push(val);\n }\n }\n return res;\n}\n\nfunction parseRecurring(refined, defaultAllDay, dateEnv, recurringTypes) {\n for (var i = 0; i < recurringTypes.length; i++) {\n var parsed = recurringTypes[i].parse(refined, dateEnv);\n if (parsed) {\n var allDay = refined.allDay;\n if (allDay == null) {\n allDay = defaultAllDay;\n if (allDay == null) {\n allDay = parsed.allDayGuess;\n if (allDay == null) {\n allDay = false;\n }\n }\n }\n return {\n allDay: allDay,\n duration: parsed.duration,\n typeData: parsed.typeData,\n typeId: i\n };\n }\n }\n return null;\n}\nfunction expandRecurring(eventStore, framingRange, context) {\n var dateEnv = context.dateEnv, pluginHooks = context.pluginHooks, options = context.options;\n var defs = eventStore.defs, instances = eventStore.instances;\n // remove existing recurring instances\n // TODO: bad. always expand events as a second step\n instances = filterHash(instances, function (instance) {\n return !defs[instance.defId].recurringDef;\n });\n for (var defId in defs) {\n var def = defs[defId];\n if (def.recurringDef) {\n var duration = def.recurringDef.duration;\n if (!duration) {\n duration = def.allDay ?\n options.defaultAllDayEventDuration :\n options.defaultTimedEventDuration;\n }\n var starts = expandRecurringRanges(def, duration, framingRange, dateEnv, pluginHooks.recurringTypes);\n for (var _i = 0, starts_1 = starts; _i < starts_1.length; _i++) {\n var start = starts_1[_i];\n var instance = createEventInstance(defId, {\n start: start,\n end: dateEnv.add(start, duration)\n });\n instances[instance.instanceId] = instance;\n }\n }\n }\n return { defs: defs, instances: instances };\n}\n/*\nEvent MUST have a recurringDef\n*/\nfunction expandRecurringRanges(eventDef, duration, framingRange, dateEnv, recurringTypes) {\n var typeDef = recurringTypes[eventDef.recurringDef.typeId];\n var markers = typeDef.expand(eventDef.recurringDef.typeData, {\n start: dateEnv.subtract(framingRange.start, duration),\n end: framingRange.end\n }, dateEnv);\n // the recurrence plugins don't guarantee that all-day events are start-of-day, so we have to\n if (eventDef.allDay) {\n markers = markers.map(startOfDay);\n }\n return markers;\n}\n\nvar INTERNAL_UNITS = ['years', 'months', 'days', 'milliseconds'];\nvar PARSE_RE = /^(-?)(?:(\\d+)\\.)?(\\d+):(\\d\\d)(?::(\\d\\d)(?:\\.(\\d\\d\\d))?)?/;\n// Parsing and Creation\nfunction createDuration(input, unit) {\n var _a;\n if (typeof input === 'string') {\n return parseString(input);\n }\n else if (typeof input === 'object' && input) { // non-null object\n return parseObject(input);\n }\n else if (typeof input === 'number') {\n return parseObject((_a = {}, _a[unit || 'milliseconds'] = input, _a));\n }\n else {\n return null;\n }\n}\nfunction parseString(s) {\n var m = PARSE_RE.exec(s);\n if (m) {\n var sign = m[1] ? -1 : 1;\n return {\n years: 0,\n months: 0,\n days: sign * (m[2] ? parseInt(m[2], 10) : 0),\n milliseconds: sign * ((m[3] ? parseInt(m[3], 10) : 0) * 60 * 60 * 1000 + // hours\n (m[4] ? parseInt(m[4], 10) : 0) * 60 * 1000 + // minutes\n (m[5] ? parseInt(m[5], 10) : 0) * 1000 + // seconds\n (m[6] ? parseInt(m[6], 10) : 0) // ms\n )\n };\n }\n return null;\n}\nfunction parseObject(obj) {\n var duration = {\n years: obj.years || obj.year || 0,\n months: obj.months || obj.month || 0,\n days: obj.days || obj.day || 0,\n milliseconds: (obj.hours || obj.hour || 0) * 60 * 60 * 1000 + // hours\n (obj.minutes || obj.minute || 0) * 60 * 1000 + // minutes\n (obj.seconds || obj.second || 0) * 1000 + // seconds\n (obj.milliseconds || obj.millisecond || obj.ms || 0) // ms\n };\n var weeks = obj.weeks || obj.week;\n if (weeks) {\n duration.days += weeks * 7;\n duration.specifiedWeeks = true;\n }\n return duration;\n}\n// Equality\nfunction durationsEqual(d0, d1) {\n return d0.years === d1.years &&\n d0.months === d1.months &&\n d0.days === d1.days &&\n d0.milliseconds === d1.milliseconds;\n}\nfunction isSingleDay(dur) {\n return dur.years === 0 && dur.months === 0 && dur.days === 1 && dur.milliseconds === 0;\n}\n// Simple Math\nfunction addDurations(d0, d1) {\n return {\n years: d0.years + d1.years,\n months: d0.months + d1.months,\n days: d0.days + d1.days,\n milliseconds: d0.milliseconds + d1.milliseconds\n };\n}\nfunction subtractDurations(d1, d0) {\n return {\n years: d1.years - d0.years,\n months: d1.months - d0.months,\n days: d1.days - d0.days,\n milliseconds: d1.milliseconds - d0.milliseconds\n };\n}\nfunction multiplyDuration(d, n) {\n return {\n years: d.years * n,\n months: d.months * n,\n days: d.days * n,\n milliseconds: d.milliseconds * n\n };\n}\n// Conversions\n// \"Rough\" because they are based on average-case Gregorian months/years\nfunction asRoughYears(dur) {\n return asRoughDays(dur) / 365;\n}\nfunction asRoughMonths(dur) {\n return asRoughDays(dur) / 30;\n}\nfunction asRoughDays(dur) {\n return asRoughMs(dur) / 864e5;\n}\nfunction asRoughMinutes(dur) {\n return asRoughMs(dur) / (1000 * 60);\n}\nfunction asRoughSeconds(dur) {\n return asRoughMs(dur) / 1000;\n}\nfunction asRoughMs(dur) {\n return dur.years * (365 * 864e5) +\n dur.months * (30 * 864e5) +\n dur.days * 864e5 +\n dur.milliseconds;\n}\n// Advanced Math\nfunction wholeDivideDurations(numerator, denominator) {\n var res = null;\n for (var i = 0; i < INTERNAL_UNITS.length; i++) {\n var unit = INTERNAL_UNITS[i];\n if (denominator[unit]) {\n var localRes = numerator[unit] / denominator[unit];\n if (!isInt(localRes) || (res !== null && res !== localRes)) {\n return null;\n }\n res = localRes;\n }\n else if (numerator[unit]) {\n // needs to divide by something but can't!\n return null;\n }\n }\n return res;\n}\nfunction greatestDurationDenominator(dur) {\n var ms = dur.milliseconds;\n if (ms) {\n if (ms % 1000 !== 0) {\n return { unit: 'millisecond', value: ms };\n }\n if (ms % (1000 * 60) !== 0) {\n return { unit: 'second', value: ms / 1000 };\n }\n if (ms % (1000 * 60 * 60) !== 0) {\n return { unit: 'minute', value: ms / (1000 * 60) };\n }\n if (ms) {\n return { unit: 'hour', value: ms / (1000 * 60 * 60) };\n }\n }\n if (dur.days) {\n if (dur.specifiedWeeks && dur.days % 7 === 0) {\n return { unit: 'week', value: dur.days / 7 };\n }\n return { unit: 'day', value: dur.days };\n }\n if (dur.months) {\n return { unit: 'month', value: dur.months };\n }\n if (dur.years) {\n return { unit: 'year', value: dur.years };\n }\n return { unit: 'millisecond', value: 0 };\n}\n\n// timeZoneOffset is in minutes\nfunction buildIsoString(marker, timeZoneOffset, stripZeroTime) {\n if (stripZeroTime === void 0) { stripZeroTime = false; }\n var s = marker.toISOString();\n s = s.replace('.000', '');\n if (stripZeroTime) {\n s = s.replace('T00:00:00Z', '');\n }\n if (s.length > 10) { // time part wasn't stripped, can add timezone info\n if (timeZoneOffset == null) {\n s = s.replace('Z', '');\n }\n else if (timeZoneOffset !== 0) {\n s = s.replace('Z', formatTimeZoneOffset(timeZoneOffset, true));\n }\n // otherwise, its UTC-0 and we want to keep the Z\n }\n return s;\n}\n// formats the date, but with no time part\n// TODO: somehow merge with buildIsoString and stripZeroTime\n// TODO: rename. omit \"string\"\nfunction formatDayString(marker) {\n return marker.toISOString().replace(/T.*$/, '');\n}\n// TODO: use Date::toISOString and use everything after the T?\nfunction formatIsoTimeString(marker) {\n return padStart(marker.getUTCHours(), 2) + ':' +\n padStart(marker.getUTCMinutes(), 2) + ':' +\n padStart(marker.getUTCSeconds(), 2);\n}\nfunction formatTimeZoneOffset(minutes, doIso) {\n if (doIso === void 0) { doIso = false; }\n var sign = minutes < 0 ? '-' : '+';\n var abs = Math.abs(minutes);\n var hours = Math.floor(abs / 60);\n var mins = Math.round(abs % 60);\n if (doIso) {\n return sign + padStart(hours, 2) + ':' + padStart(mins, 2);\n }\n else {\n return 'GMT' + sign + hours + (mins ? ':' + padStart(mins, 2) : '');\n }\n}\n\nfunction memoize(workerFunc, resEquality, teardownFunc) {\n var currentArgs;\n var currentRes;\n return function () {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (!currentArgs) {\n currentRes = workerFunc.apply(this, newArgs);\n }\n else if (!isArraysEqual(currentArgs, newArgs)) {\n if (teardownFunc) {\n teardownFunc(currentRes);\n }\n var res = workerFunc.apply(this, newArgs);\n if (!resEquality || !resEquality(res, currentRes)) {\n currentRes = res;\n }\n }\n currentArgs = newArgs;\n return currentRes;\n };\n}\nfunction memoizeObjArg(workerFunc, resEquality, teardownFunc) {\n var currentArg;\n var currentRes;\n return function (newArg) {\n if (!currentArg) {\n currentRes = workerFunc.call(this, newArg);\n }\n else if (!isPropsEqual(currentArg, newArg)) {\n if (teardownFunc) {\n teardownFunc(currentRes);\n }\n var res = workerFunc.call(this, newArg);\n if (!resEquality || !resEquality(res, currentRes)) {\n currentRes = res;\n }\n }\n currentArg = newArg;\n return currentRes;\n };\n}\nfunction memoizeArraylike(// used at all?\nworkerFunc, resEquality, teardownFunc) {\n var currentArgSets = [];\n var currentResults = [];\n return function (newArgSets) {\n var currentLen = currentArgSets.length;\n var newLen = newArgSets.length;\n var i = 0;\n for (; i < currentLen; i++) {\n if (!newArgSets[i]) { // one of the old sets no longer exists\n if (teardownFunc) {\n teardownFunc(currentResults[i]);\n }\n }\n else if (!isArraysEqual(currentArgSets[i], newArgSets[i])) {\n if (teardownFunc) {\n teardownFunc(currentResults[i]);\n }\n var res = workerFunc.apply(this, newArgSets[i]);\n if (!resEquality || !resEquality(res, currentResults[i])) {\n currentResults[i] = res;\n }\n }\n }\n for (; i < newLen; i++) {\n currentResults[i] = workerFunc.apply(this, newArgSets[i]);\n }\n currentArgSets = newArgSets;\n currentResults.splice(newLen); // remove excess\n return currentResults;\n };\n}\nfunction memoizeHashlike(// used?\nworkerFunc, resEquality, teardownFunc // TODO: change arg order\n) {\n var currentArgHash = {};\n var currentResHash = {};\n return function (newArgHash) {\n var newResHash = {};\n for (var key in newArgHash) {\n if (!currentResHash[key]) {\n newResHash[key] = workerFunc.apply(this, newArgHash[key]);\n }\n else if (!isArraysEqual(currentArgHash[key], newArgHash[key])) {\n if (teardownFunc) {\n teardownFunc(currentResHash[key]);\n }\n var res = workerFunc.apply(this, newArgHash[key]);\n newResHash[key] = (resEquality && resEquality(res, currentResHash[key]))\n ? currentResHash[key]\n : res;\n }\n else {\n newResHash[key] = currentResHash[key];\n }\n }\n currentArgHash = newArgHash;\n currentResHash = newResHash;\n return newResHash;\n };\n}\n\nvar EXTENDED_SETTINGS_AND_SEVERITIES = {\n week: 3,\n separator: 0,\n omitZeroMinute: 0,\n meridiem: 0,\n omitCommas: 0\n};\nvar STANDARD_DATE_PROP_SEVERITIES = {\n timeZoneName: 7,\n era: 6,\n year: 5,\n month: 4,\n day: 2,\n weekday: 2,\n hour: 1,\n minute: 1,\n second: 1\n};\nvar MERIDIEM_RE = /\\s*([ap])\\.?m\\.?/i; // eats up leading spaces too\nvar COMMA_RE = /,/g; // we need re for globalness\nvar MULTI_SPACE_RE = /\\s+/g;\nvar LTR_RE = /\\u200e/g; // control character\nvar UTC_RE = /UTC|GMT/;\nvar NativeFormatter = /** @class */ (function () {\n function NativeFormatter(formatSettings) {\n var standardDateProps = {};\n var extendedSettings = {};\n var severity = 0;\n for (var name_1 in formatSettings) {\n if (name_1 in EXTENDED_SETTINGS_AND_SEVERITIES) {\n extendedSettings[name_1] = formatSettings[name_1];\n severity = Math.max(EXTENDED_SETTINGS_AND_SEVERITIES[name_1], severity);\n }\n else {\n standardDateProps[name_1] = formatSettings[name_1];\n if (name_1 in STANDARD_DATE_PROP_SEVERITIES) { // TODO: what about hour12? no severity\n severity = Math.max(STANDARD_DATE_PROP_SEVERITIES[name_1], severity);\n }\n }\n }\n this.standardDateProps = standardDateProps;\n this.extendedSettings = extendedSettings;\n this.severity = severity;\n this.buildFormattingFunc = memoize(buildFormattingFunc);\n }\n NativeFormatter.prototype.format = function (date, context) {\n return this.buildFormattingFunc(this.standardDateProps, this.extendedSettings, context)(date);\n };\n NativeFormatter.prototype.formatRange = function (start, end, context, betterDefaultSeparator) {\n var _a = this, standardDateProps = _a.standardDateProps, extendedSettings = _a.extendedSettings;\n var diffSeverity = computeMarkerDiffSeverity(start.marker, end.marker, context.calendarSystem);\n if (!diffSeverity) {\n return this.format(start, context);\n }\n var biggestUnitForPartial = diffSeverity;\n if (biggestUnitForPartial > 1 && // the two dates are different in a way that's larger scale than time\n (standardDateProps.year === 'numeric' || standardDateProps.year === '2-digit') &&\n (standardDateProps.month === 'numeric' || standardDateProps.month === '2-digit') &&\n (standardDateProps.day === 'numeric' || standardDateProps.day === '2-digit')) {\n biggestUnitForPartial = 1; // make it look like the dates are only different in terms of time\n }\n var full0 = this.format(start, context);\n var full1 = this.format(end, context);\n if (full0 === full1) {\n return full0;\n }\n var partialDateProps = computePartialFormattingOptions(standardDateProps, biggestUnitForPartial);\n var partialFormattingFunc = buildFormattingFunc(partialDateProps, extendedSettings, context);\n var partial0 = partialFormattingFunc(start);\n var partial1 = partialFormattingFunc(end);\n var insertion = findCommonInsertion(full0, partial0, full1, partial1);\n var separator = extendedSettings.separator || betterDefaultSeparator || context.defaultSeparator || '';\n if (insertion) {\n return insertion.before + partial0 + separator + partial1 + insertion.after;\n }\n return full0 + separator + full1;\n };\n NativeFormatter.prototype.getLargestUnit = function () {\n switch (this.severity) {\n case 7:\n case 6:\n case 5:\n return 'year';\n case 4:\n return 'month';\n case 3:\n return 'week';\n case 2:\n return 'day';\n default:\n return 'time'; // really?\n }\n };\n return NativeFormatter;\n}());\nfunction buildFormattingFunc(standardDateProps, extendedSettings, context) {\n var standardDatePropCnt = Object.keys(standardDateProps).length;\n if (standardDatePropCnt === 1 && standardDateProps.timeZoneName === 'short') {\n return function (date) {\n return formatTimeZoneOffset(date.timeZoneOffset);\n };\n }\n if (standardDatePropCnt === 0 && extendedSettings.week) {\n return function (date) {\n return formatWeekNumber(context.computeWeekNumber(date.marker), context.weekText, context.locale, extendedSettings.week);\n };\n }\n return buildNativeFormattingFunc(standardDateProps, extendedSettings, context);\n}\nfunction buildNativeFormattingFunc(standardDateProps, extendedSettings, context) {\n standardDateProps = __assign({}, standardDateProps); // copy\n extendedSettings = __assign({}, extendedSettings); // copy\n sanitizeSettings(standardDateProps, extendedSettings);\n standardDateProps.timeZone = 'UTC'; // we leverage the only guaranteed timeZone for our UTC markers\n var normalFormat = new Intl.DateTimeFormat(context.locale.codes, standardDateProps);\n var zeroFormat; // needed?\n if (extendedSettings.omitZeroMinute) {\n var zeroProps = __assign({}, standardDateProps);\n delete zeroProps.minute; // seconds and ms were already considered in sanitizeSettings\n zeroFormat = new Intl.DateTimeFormat(context.locale.codes, zeroProps);\n }\n return function (date) {\n var marker = date.marker;\n var format;\n if (zeroFormat && !marker.getUTCMinutes()) {\n format = zeroFormat;\n }\n else {\n format = normalFormat;\n }\n var s = format.format(marker);\n return postProcess(s, date, standardDateProps, extendedSettings, context);\n };\n}\nfunction sanitizeSettings(standardDateProps, extendedSettings) {\n // deal with a browser inconsistency where formatting the timezone\n // requires that the hour/minute be present.\n if (standardDateProps.timeZoneName) {\n if (!standardDateProps.hour) {\n standardDateProps.hour = '2-digit';\n }\n if (!standardDateProps.minute) {\n standardDateProps.minute = '2-digit';\n }\n }\n // only support short timezone names\n if (standardDateProps.timeZoneName === 'long') {\n standardDateProps.timeZoneName = 'short';\n }\n // if requesting to display seconds, MUST display minutes\n if (extendedSettings.omitZeroMinute && (standardDateProps.second || standardDateProps.millisecond)) {\n delete extendedSettings.omitZeroMinute;\n }\n}\nfunction postProcess(s, date, standardDateProps, extendedSettings, context) {\n s = s.replace(LTR_RE, ''); // remove left-to-right control chars. do first. good for other regexes\n if (standardDateProps.timeZoneName === 'short') {\n s = injectTzoStr(s, (context.timeZone === 'UTC' || date.timeZoneOffset == null) ?\n 'UTC' : // important to normalize for IE, which does \"GMT\"\n formatTimeZoneOffset(date.timeZoneOffset));\n }\n if (extendedSettings.omitCommas) {\n s = s.replace(COMMA_RE, '').trim();\n }\n if (extendedSettings.omitZeroMinute) {\n s = s.replace(':00', ''); // zeroFormat doesn't always achieve this\n }\n // ^ do anything that might create adjacent spaces before this point,\n // because MERIDIEM_RE likes to eat up loading spaces\n if (extendedSettings.meridiem === false) {\n s = s.replace(MERIDIEM_RE, '').trim();\n }\n else if (extendedSettings.meridiem === 'narrow') { // a/p\n s = s.replace(MERIDIEM_RE, function (m0, m1) {\n return m1.toLocaleLowerCase();\n });\n }\n else if (extendedSettings.meridiem === 'short') { // am/pm\n s = s.replace(MERIDIEM_RE, function (m0, m1) {\n return m1.toLocaleLowerCase() + 'm';\n });\n }\n else if (extendedSettings.meridiem === 'lowercase') { // other meridiem transformers already converted to lowercase\n s = s.replace(MERIDIEM_RE, function (m0) {\n return m0.toLocaleLowerCase();\n });\n }\n s = s.replace(MULTI_SPACE_RE, ' ');\n s = s.trim();\n return s;\n}\nfunction injectTzoStr(s, tzoStr) {\n var replaced = false;\n s = s.replace(UTC_RE, function () {\n replaced = true;\n return tzoStr;\n });\n // IE11 doesn't include UTC/GMT in the original string, so append to end\n if (!replaced) {\n s += ' ' + tzoStr;\n }\n return s;\n}\nfunction formatWeekNumber(num, weekText, locale, display) {\n var parts = [];\n if (display === 'narrow') {\n parts.push(weekText);\n }\n else if (display === 'short') {\n parts.push(weekText, ' ');\n }\n // otherwise, considered 'numeric'\n parts.push(locale.simpleNumberFormat.format(num));\n if (locale.options.direction === 'rtl') { // TODO: use control characters instead?\n parts.reverse();\n }\n return parts.join('');\n}\n// Range Formatting Utils\n// 0 = exactly the same\n// 1 = different by time\n// and bigger\nfunction computeMarkerDiffSeverity(d0, d1, ca) {\n if (ca.getMarkerYear(d0) !== ca.getMarkerYear(d1)) {\n return 5;\n }\n if (ca.getMarkerMonth(d0) !== ca.getMarkerMonth(d1)) {\n return 4;\n }\n if (ca.getMarkerDay(d0) !== ca.getMarkerDay(d1)) {\n return 2;\n }\n if (timeAsMs(d0) !== timeAsMs(d1)) {\n return 1;\n }\n return 0;\n}\nfunction computePartialFormattingOptions(options, biggestUnit) {\n var partialOptions = {};\n for (var name_2 in options) {\n if (!(name_2 in STANDARD_DATE_PROP_SEVERITIES) || // not a date part prop (like timeZone)\n STANDARD_DATE_PROP_SEVERITIES[name_2] <= biggestUnit) {\n partialOptions[name_2] = options[name_2];\n }\n }\n return partialOptions;\n}\nfunction findCommonInsertion(full0, partial0, full1, partial1) {\n var i0 = 0;\n while (i0 < full0.length) {\n var found0 = full0.indexOf(partial0, i0);\n if (found0 === -1) {\n break;\n }\n var before0 = full0.substr(0, found0);\n i0 = found0 + partial0.length;\n var after0 = full0.substr(i0);\n var i1 = 0;\n while (i1 < full1.length) {\n var found1 = full1.indexOf(partial1, i1);\n if (found1 === -1) {\n break;\n }\n var before1 = full1.substr(0, found1);\n i1 = found1 + partial1.length;\n var after1 = full1.substr(i1);\n if (before0 === before1 && after0 === after1) {\n return {\n before: before0,\n after: after0\n };\n }\n }\n }\n return null;\n}\n\nfunction expandZonedMarker(dateInfo, calendarSystem) {\n var a = calendarSystem.markerToArray(dateInfo.marker);\n return {\n marker: dateInfo.marker,\n timeZoneOffset: dateInfo.timeZoneOffset,\n array: a,\n year: a[0],\n month: a[1],\n day: a[2],\n hour: a[3],\n minute: a[4],\n second: a[5],\n millisecond: a[6]\n };\n}\n\nfunction createVerboseFormattingArg(start, end, context, betterDefaultSeparator) {\n var startInfo = expandZonedMarker(start, context.calendarSystem);\n var endInfo = end ? expandZonedMarker(end, context.calendarSystem) : null;\n return {\n date: startInfo,\n start: startInfo,\n end: endInfo,\n timeZone: context.timeZone,\n localeCodes: context.locale.codes,\n defaultSeparator: betterDefaultSeparator || context.defaultSeparator\n };\n}\n\n/*\nTODO: fix the terminology of \"formatter\" vs \"formatting func\"\n*/\n/*\nAt the time of instantiation, this object does not know which cmd-formatting system it will use.\nIt receives this at the time of formatting, as a setting.\n*/\nvar CmdFormatter = /** @class */ (function () {\n function CmdFormatter(cmdStr) {\n this.cmdStr = cmdStr;\n }\n CmdFormatter.prototype.format = function (date, context, betterDefaultSeparator) {\n return context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(date, null, context, betterDefaultSeparator));\n };\n CmdFormatter.prototype.formatRange = function (start, end, context, betterDefaultSeparator) {\n return context.cmdFormatter(this.cmdStr, createVerboseFormattingArg(start, end, context, betterDefaultSeparator));\n };\n return CmdFormatter;\n}());\n\nvar FuncFormatter = /** @class */ (function () {\n function FuncFormatter(func) {\n this.func = func;\n }\n FuncFormatter.prototype.format = function (date, context, betterDefaultSeparator) {\n return this.func(createVerboseFormattingArg(date, null, context, betterDefaultSeparator));\n };\n FuncFormatter.prototype.formatRange = function (start, end, context, betterDefaultSeparator) {\n return this.func(createVerboseFormattingArg(start, end, context, betterDefaultSeparator));\n };\n return FuncFormatter;\n}());\n\nfunction createFormatter(input) {\n if (typeof input === 'object' && input) { // non-null object\n return new NativeFormatter(input);\n }\n else if (typeof input === 'string') {\n return new CmdFormatter(input);\n }\n else if (typeof input === 'function') {\n return new FuncFormatter(input);\n }\n}\n\n// base options\n// ------------\nvar BASE_OPTION_REFINERS = {\n navLinkDayClick: identity,\n navLinkWeekClick: identity,\n duration: createDuration,\n bootstrapFontAwesome: identity,\n buttonIcons: identity,\n customButtons: identity,\n defaultAllDayEventDuration: createDuration,\n defaultTimedEventDuration: createDuration,\n nextDayThreshold: createDuration,\n scrollTime: createDuration,\n slotMinTime: createDuration,\n slotMaxTime: createDuration,\n dayPopoverFormat: createFormatter,\n slotDuration: createDuration,\n snapDuration: createDuration,\n headerToolbar: identity,\n footerToolbar: identity,\n defaultRangeSeparator: String,\n titleRangeSeparator: String,\n forceEventDuration: Boolean,\n dayHeaders: Boolean,\n dayHeaderFormat: createFormatter,\n dayHeaderClassNames: identity,\n dayHeaderContent: identity,\n dayHeaderDidMount: identity,\n dayHeaderWillUnmount: identity,\n dayCellClassNames: identity,\n dayCellContent: identity,\n dayCellDidMount: identity,\n dayCellWillUnmount: identity,\n initialView: String,\n aspectRatio: Number,\n weekends: Boolean,\n weekNumberCalculation: identity,\n weekNumbers: Boolean,\n weekNumberClassNames: identity,\n weekNumberContent: identity,\n weekNumberDidMount: identity,\n weekNumberWillUnmount: identity,\n editable: Boolean,\n viewClassNames: identity,\n viewDidMount: identity,\n viewWillUnmount: identity,\n nowIndicator: Boolean,\n nowIndicatorClassNames: identity,\n nowIndicatorContent: identity,\n nowIndicatorDidMount: identity,\n nowIndicatorWillUnmount: identity,\n showNonCurrentDates: Boolean,\n lazyFetching: Boolean,\n startParam: String,\n endParam: String,\n timeZoneParam: String,\n timeZone: String,\n locales: identity,\n locale: identity,\n themeSystem: String,\n dragRevertDuration: Number,\n dragScroll: Boolean,\n allDayMaintainDuration: Boolean,\n unselectAuto: Boolean,\n dropAccept: identity,\n eventOrder: parseFieldSpecs,\n handleWindowResize: Boolean,\n windowResizeDelay: Number,\n longPressDelay: Number,\n eventDragMinDistance: Number,\n expandRows: Boolean,\n height: identity,\n contentHeight: identity,\n direction: String,\n weekNumberFormat: createFormatter,\n eventResizableFromStart: Boolean,\n displayEventTime: Boolean,\n displayEventEnd: Boolean,\n weekText: String,\n progressiveEventRendering: Boolean,\n businessHours: identity,\n initialDate: identity,\n now: identity,\n eventDataTransform: identity,\n stickyHeaderDates: identity,\n stickyFooterScrollbar: identity,\n viewHeight: identity,\n defaultAllDay: Boolean,\n eventSourceFailure: identity,\n eventSourceSuccess: identity,\n eventDisplay: String,\n eventStartEditable: Boolean,\n eventDurationEditable: Boolean,\n eventOverlap: identity,\n eventConstraint: identity,\n eventAllow: identity,\n eventBackgroundColor: String,\n eventBorderColor: String,\n eventTextColor: String,\n eventColor: String,\n eventClassNames: identity,\n eventContent: identity,\n eventDidMount: identity,\n eventWillUnmount: identity,\n selectConstraint: identity,\n selectOverlap: identity,\n selectAllow: identity,\n droppable: Boolean,\n unselectCancel: String,\n slotLabelFormat: identity,\n slotLaneClassNames: identity,\n slotLaneContent: identity,\n slotLaneDidMount: identity,\n slotLaneWillUnmount: identity,\n slotLabelClassNames: identity,\n slotLabelContent: identity,\n slotLabelDidMount: identity,\n slotLabelWillUnmount: identity,\n dayMaxEvents: identity,\n dayMaxEventRows: identity,\n dayMinWidth: Number,\n slotLabelInterval: createDuration,\n allDayText: String,\n allDayClassNames: identity,\n allDayContent: identity,\n allDayDidMount: identity,\n allDayWillUnmount: identity,\n slotMinWidth: Number,\n navLinks: Boolean,\n eventTimeFormat: createFormatter,\n rerenderDelay: Number,\n moreLinkText: identity,\n selectMinDistance: Number,\n selectable: Boolean,\n selectLongPressDelay: Number,\n eventLongPressDelay: Number,\n selectMirror: Boolean,\n eventMinHeight: Number,\n slotEventOverlap: Boolean,\n plugins: identity,\n firstDay: Number,\n dayCount: Number,\n dateAlignment: String,\n dateIncrement: createDuration,\n hiddenDays: identity,\n monthMode: Boolean,\n fixedWeekCount: Boolean,\n validRange: identity,\n visibleRange: identity,\n titleFormat: identity,\n // only used by list-view, but languages define the value, so we need it in base options\n noEventsText: String\n};\n// do NOT give a type here. need `typeof BASE_OPTION_DEFAULTS` to give real results.\n// raw values.\nvar BASE_OPTION_DEFAULTS = {\n eventDisplay: 'auto',\n defaultRangeSeparator: ' - ',\n titleRangeSeparator: ' \\u2013 ',\n defaultTimedEventDuration: '01:00:00',\n defaultAllDayEventDuration: { day: 1 },\n forceEventDuration: false,\n nextDayThreshold: '00:00:00',\n dayHeaders: true,\n initialView: '',\n aspectRatio: 1.35,\n headerToolbar: {\n start: 'title',\n center: '',\n end: 'today prev,next'\n },\n weekends: true,\n weekNumbers: false,\n weekNumberCalculation: 'local',\n editable: false,\n nowIndicator: false,\n scrollTime: '06:00:00',\n slotMinTime: '00:00:00',\n slotMaxTime: '24:00:00',\n showNonCurrentDates: true,\n lazyFetching: true,\n startParam: 'start',\n endParam: 'end',\n timeZoneParam: 'timeZone',\n timeZone: 'local',\n locales: [],\n locale: '',\n themeSystem: 'standard',\n dragRevertDuration: 500,\n dragScroll: true,\n allDayMaintainDuration: false,\n unselectAuto: true,\n dropAccept: '*',\n eventOrder: 'start,-duration,allDay,title',\n dayPopoverFormat: { month: 'long', day: 'numeric', year: 'numeric' },\n handleWindowResize: true,\n windowResizeDelay: 100,\n longPressDelay: 1000,\n eventDragMinDistance: 5,\n expandRows: false,\n navLinks: false,\n selectable: false\n};\n// calendar listeners\n// ------------------\nvar CALENDAR_LISTENER_REFINERS = {\n datesSet: identity,\n eventsSet: identity,\n eventAdd: identity,\n eventChange: identity,\n eventRemove: identity,\n windowResize: identity,\n eventClick: identity,\n eventMouseEnter: identity,\n eventMouseLeave: identity,\n select: identity,\n unselect: identity,\n loading: identity,\n // internal\n _unmount: identity,\n _beforeprint: identity,\n _afterprint: identity,\n _noEventDrop: identity,\n _noEventResize: identity,\n _resize: identity,\n _scrollRequest: identity\n};\n// calendar-specific options\n// -------------------------\nvar CALENDAR_OPTION_REFINERS = {\n buttonText: identity,\n views: identity,\n plugins: identity,\n initialEvents: identity,\n events: identity,\n eventSources: identity\n};\nvar COMPLEX_OPTION_COMPARATORS = {\n headerToolbar: isBoolComplexEqual,\n footerToolbar: isBoolComplexEqual,\n buttonText: isBoolComplexEqual,\n buttonIcons: isBoolComplexEqual\n};\nfunction isBoolComplexEqual(a, b) {\n if (typeof a === 'object' && typeof b === 'object' && a && b) { // both non-null objects\n return isPropsEqual(a, b);\n }\n else {\n return a === b;\n }\n}\n// view-specific options\n// ---------------------\nvar VIEW_OPTION_REFINERS = {\n type: String,\n component: identity,\n buttonText: String,\n buttonTextKey: String,\n dateProfileGeneratorClass: identity,\n usesMinMaxTime: Boolean,\n classNames: identity,\n content: identity,\n didMount: identity,\n willUnmount: identity\n};\n// util funcs\n// ----------------------------------------------------------------------------------------------------\nfunction mergeRawOptions(optionSets) {\n return mergeProps(optionSets, COMPLEX_OPTION_COMPARATORS);\n}\nfunction refineProps(input, refiners) {\n var refined = {};\n var extra = {};\n for (var propName in refiners) {\n if (propName in input) {\n refined[propName] = refiners[propName](input[propName]);\n }\n }\n for (var propName in input) {\n if (!(propName in refiners)) {\n extra[propName] = input[propName];\n }\n }\n return { refined: refined, extra: extra };\n}\nfunction identity(raw) {\n return raw;\n}\n\nfunction parseEvents(rawEvents, eventSource, context, allowOpenRange) {\n var eventStore = createEmptyEventStore();\n var eventRefiners = buildEventRefiners(context);\n for (var _i = 0, rawEvents_1 = rawEvents; _i < rawEvents_1.length; _i++) {\n var rawEvent = rawEvents_1[_i];\n var tuple = parseEvent(rawEvent, eventSource, context, allowOpenRange, eventRefiners);\n if (tuple) {\n eventTupleToStore(tuple, eventStore);\n }\n }\n return eventStore;\n}\nfunction eventTupleToStore(tuple, eventStore) {\n if (eventStore === void 0) { eventStore = createEmptyEventStore(); }\n eventStore.defs[tuple.def.defId] = tuple.def;\n if (tuple.instance) {\n eventStore.instances[tuple.instance.instanceId] = tuple.instance;\n }\n return eventStore;\n}\n// retrieves events that have the same groupId as the instance specified by `instanceId`\n// or they are the same as the instance.\n// why might instanceId not be in the store? an event from another calendar?\nfunction getRelevantEvents(eventStore, instanceId) {\n var instance = eventStore.instances[instanceId];\n if (instance) {\n var def_1 = eventStore.defs[instance.defId];\n // get events/instances with same group\n var newStore = filterEventStoreDefs(eventStore, function (lookDef) {\n return isEventDefsGrouped(def_1, lookDef);\n });\n // add the original\n // TODO: wish we could use eventTupleToStore or something like it\n newStore.defs[def_1.defId] = def_1;\n newStore.instances[instance.instanceId] = instance;\n return newStore;\n }\n return createEmptyEventStore();\n}\nfunction isEventDefsGrouped(def0, def1) {\n return Boolean(def0.groupId && def0.groupId === def1.groupId);\n}\nfunction createEmptyEventStore() {\n return { defs: {}, instances: {} };\n}\nfunction mergeEventStores(store0, store1) {\n return {\n defs: __assign(__assign({}, store0.defs), store1.defs),\n instances: __assign(__assign({}, store0.instances), store1.instances)\n };\n}\nfunction filterEventStoreDefs(eventStore, filterFunc) {\n var defs = filterHash(eventStore.defs, filterFunc);\n var instances = filterHash(eventStore.instances, function (instance) {\n return defs[instance.defId]; // still exists?\n });\n return { defs: defs, instances: instances };\n}\nfunction excludeSubEventStore(master, sub) {\n var defs = master.defs, instances = master.instances;\n var filteredDefs = {};\n var filteredInstances = {};\n for (var defId in defs) {\n if (!sub.defs[defId]) { // not explicitly excluded\n filteredDefs[defId] = defs[defId];\n }\n }\n for (var instanceId in instances) {\n if (!sub.instances[instanceId] && // not explicitly excluded\n filteredDefs[instances[instanceId].defId] // def wasn't filtered away\n ) {\n filteredInstances[instanceId] = instances[instanceId];\n }\n }\n return {\n defs: filteredDefs,\n instances: filteredInstances\n };\n}\n\nfunction normalizeConstraint(input, context) {\n if (Array.isArray(input)) {\n return parseEvents(input, null, context, true); // allowOpenRange=true\n }\n else if (typeof input === 'object' && input) { // non-null object\n return parseEvents([input], null, context, true); // allowOpenRange=true\n }\n else if (input != null) {\n return String(input);\n }\n else {\n return null;\n }\n}\n\nfunction parseClassNames(raw) {\n if (Array.isArray(raw)) {\n return raw;\n }\n else if (typeof raw === 'string') {\n return raw.split(/\\s+/);\n }\n else {\n return [];\n }\n}\n\n// TODO: better called \"EventSettings\" or \"EventConfig\"\n// TODO: move this file into structs\n// TODO: separate constraint/overlap/allow, because selection uses only that, not other props\nvar EVENT_UI_REFINERS = {\n display: String,\n editable: Boolean,\n startEditable: Boolean,\n durationEditable: Boolean,\n constraint: identity,\n overlap: identity,\n allow: identity,\n className: parseClassNames,\n classNames: parseClassNames,\n color: String,\n backgroundColor: String,\n borderColor: String,\n textColor: String\n};\nfunction createEventUi(refined, context) {\n var constraint = normalizeConstraint(refined.constraint, context);\n return {\n display: refined.display || null,\n startEditable: refined.startEditable != null ? refined.startEditable : refined.editable,\n durationEditable: refined.durationEditable != null ? refined.durationEditable : refined.editable,\n constraints: constraint != null ? [constraint] : [],\n overlap: refined.overlap != null ? refined.overlap : null,\n allows: refined.allow != null ? [refined.allow] : [],\n backgroundColor: refined.backgroundColor || refined.color || '',\n borderColor: refined.borderColor || refined.color || '',\n textColor: refined.textColor || '',\n classNames: (refined.className || []).concat(refined.classNames || []) // join singular and plural\n };\n}\n// TODO: prevent against problems with <2 args!\nfunction combineEventUis(uis) {\n return uis.reduce(combineTwoEventUis, EMPTY_EVENT_UI);\n}\nfunction combineTwoEventUis(item0, item1) {\n return {\n display: item1.display != null ? item1.display : item0.display,\n startEditable: item1.startEditable != null ? item1.startEditable : item0.startEditable,\n durationEditable: item1.durationEditable != null ? item1.durationEditable : item0.durationEditable,\n constraints: item0.constraints.concat(item1.constraints),\n overlap: typeof item1.overlap === 'boolean' ? item1.overlap : item0.overlap,\n allows: item0.allows.concat(item1.allows),\n backgroundColor: item1.backgroundColor || item0.backgroundColor,\n borderColor: item1.borderColor || item0.borderColor,\n textColor: item1.textColor || item0.textColor,\n classNames: item0.classNames.concat(item1.classNames)\n };\n}\nvar EMPTY_EVENT_UI = {\n display: null,\n startEditable: null,\n durationEditable: null,\n constraints: [],\n overlap: null,\n allows: [],\n backgroundColor: '',\n borderColor: '',\n textColor: '',\n classNames: []\n};\n\nvar EVENT_NON_DATE_REFINERS = {\n id: String,\n groupId: String,\n title: String,\n url: String\n};\nvar EVENT_DATE_REFINERS = {\n start: identity,\n end: identity,\n date: identity,\n allDay: Boolean\n};\nvar EVENT_REFINERS = __assign(__assign(__assign({}, EVENT_NON_DATE_REFINERS), EVENT_DATE_REFINERS), { extendedProps: identity });\nfunction parseEvent(raw, eventSource, context, allowOpenRange, refiners) {\n if (refiners === void 0) { refiners = buildEventRefiners(context); }\n var _a = refineEventDef(raw, context, refiners), refined = _a.refined, extra = _a.extra;\n var defaultAllDay = computeIsDefaultAllDay(eventSource, context);\n var recurringRes = parseRecurring(refined, defaultAllDay, context.dateEnv, context.pluginHooks.recurringTypes);\n if (recurringRes) {\n var def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', recurringRes.allDay, Boolean(recurringRes.duration), context);\n def.recurringDef = {\n typeId: recurringRes.typeId,\n typeData: recurringRes.typeData,\n duration: recurringRes.duration\n };\n return { def: def, instance: null };\n }\n else {\n var singleRes = parseSingle(refined, defaultAllDay, context, allowOpenRange);\n if (singleRes) {\n var def = parseEventDef(refined, extra, eventSource ? eventSource.sourceId : '', singleRes.allDay, singleRes.hasEnd, context);\n var instance = createEventInstance(def.defId, singleRes.range, singleRes.forcedStartTzo, singleRes.forcedEndTzo);\n return { def: def, instance: instance };\n }\n }\n return null;\n}\nfunction refineEventDef(raw, context, refiners) {\n if (refiners === void 0) { refiners = buildEventRefiners(context); }\n return refineProps(raw, refiners);\n}\nfunction buildEventRefiners(context) {\n return __assign(__assign(__assign({}, EVENT_UI_REFINERS), EVENT_REFINERS), context.pluginHooks.eventRefiners);\n}\n/*\nWill NOT populate extendedProps with the leftover properties.\nWill NOT populate date-related props.\n*/\nfunction parseEventDef(refined, extra, sourceId, allDay, hasEnd, context) {\n var def = {\n title: refined.title || '',\n groupId: refined.groupId || '',\n publicId: refined.id || '',\n url: refined.url || '',\n recurringDef: null,\n defId: guid(),\n sourceId: sourceId,\n allDay: allDay,\n hasEnd: hasEnd,\n ui: createEventUi(refined, context),\n extendedProps: __assign(__assign({}, (refined.extendedProps || {})), extra)\n };\n for (var _i = 0, _a = context.pluginHooks.eventDefMemberAdders; _i < _a.length; _i++) {\n var memberAdder = _a[_i];\n __assign(def, memberAdder(refined));\n }\n // help out EventApi from having user modify props\n Object.freeze(def.ui.classNames);\n Object.freeze(def.extendedProps);\n return def;\n}\nfunction parseSingle(refined, defaultAllDay, context, allowOpenRange) {\n var allDay = refined.allDay;\n var startMeta;\n var startMarker = null;\n var hasEnd = false;\n var endMeta;\n var endMarker = null;\n var startInput = refined.start != null ? refined.start : refined.date;\n startMeta = context.dateEnv.createMarkerMeta(startInput);\n if (startMeta) {\n startMarker = startMeta.marker;\n }\n else if (!allowOpenRange) {\n return null;\n }\n if (refined.end != null) {\n endMeta = context.dateEnv.createMarkerMeta(refined.end);\n }\n if (allDay == null) {\n if (defaultAllDay != null) {\n allDay = defaultAllDay;\n }\n else {\n // fall back to the date props LAST\n allDay = (!startMeta || startMeta.isTimeUnspecified) &&\n (!endMeta || endMeta.isTimeUnspecified);\n }\n }\n if (allDay && startMarker) {\n startMarker = startOfDay(startMarker);\n }\n if (endMeta) {\n endMarker = endMeta.marker;\n if (allDay) {\n endMarker = startOfDay(endMarker);\n }\n if (startMarker && endMarker <= startMarker) {\n endMarker = null;\n }\n }\n if (endMarker) {\n hasEnd = true;\n }\n else if (!allowOpenRange) {\n hasEnd = context.options.forceEventDuration || false;\n endMarker = context.dateEnv.add(startMarker, allDay ?\n context.options.defaultAllDayEventDuration :\n context.options.defaultTimedEventDuration);\n }\n return {\n allDay: allDay,\n hasEnd: hasEnd,\n range: { start: startMarker, end: endMarker },\n forcedStartTzo: startMeta ? startMeta.forcedTzo : null,\n forcedEndTzo: endMeta ? endMeta.forcedTzo : null\n };\n}\nfunction computeIsDefaultAllDay(eventSource, context) {\n var res = null;\n if (eventSource) {\n res = eventSource.defaultAllDay;\n }\n if (res == null) {\n res = context.options.defaultAllDay;\n }\n return res;\n}\n\n/* Date stuff that doesn't belong in datelib core\n----------------------------------------------------------------------------------------------------------------------*/\n// given a timed range, computes an all-day range that has the same exact duration,\n// but whose start time is aligned with the start of the day.\nfunction computeAlignedDayRange(timedRange) {\n var dayCnt = Math.floor(diffDays(timedRange.start, timedRange.end)) || 1;\n var start = startOfDay(timedRange.start);\n var end = addDays(start, dayCnt);\n return { start: start, end: end };\n}\n// given a timed range, computes an all-day range based on how for the end date bleeds into the next day\n// TODO: give nextDayThreshold a default arg\nfunction computeVisibleDayRange(timedRange, nextDayThreshold) {\n if (nextDayThreshold === void 0) { nextDayThreshold = createDuration(0); }\n var startDay = null;\n var endDay = null;\n if (timedRange.end) {\n endDay = startOfDay(timedRange.end);\n var endTimeMS = timedRange.end.valueOf() - endDay.valueOf(); // # of milliseconds into `endDay`\n // If the end time is actually inclusively part of the next day and is equal to or\n // beyond the next day threshold, adjust the end to be the exclusive end of `endDay`.\n // Otherwise, leaving it as inclusive will cause it to exclude `endDay`.\n if (endTimeMS && endTimeMS >= asRoughMs(nextDayThreshold)) {\n endDay = addDays(endDay, 1);\n }\n }\n if (timedRange.start) {\n startDay = startOfDay(timedRange.start); // the beginning of the day the range starts\n // If end is within `startDay` but not past nextDayThreshold, assign the default duration of one day.\n if (endDay && endDay <= startDay) {\n endDay = addDays(startDay, 1);\n }\n }\n return { start: startDay, end: endDay };\n}\n// spans from one day into another?\nfunction isMultiDayRange(range) {\n var visibleRange = computeVisibleDayRange(range);\n return diffDays(visibleRange.start, visibleRange.end) > 1;\n}\nfunction diffDates(date0, date1, dateEnv, largeUnit) {\n if (largeUnit === 'year') {\n return createDuration(dateEnv.diffWholeYears(date0, date1), 'year');\n }\n else if (largeUnit === 'month') {\n return createDuration(dateEnv.diffWholeMonths(date0, date1), 'month');\n }\n else {\n return diffDayAndTime(date0, date1); // returns a duration\n }\n}\n\nfunction parseRange(input, dateEnv) {\n var start = null;\n var end = null;\n if (input.start) {\n start = dateEnv.createMarker(input.start);\n }\n if (input.end) {\n end = dateEnv.createMarker(input.end);\n }\n if (!start && !end) {\n return null;\n }\n if (start && end && end < start) {\n return null;\n }\n return { start: start, end: end };\n}\n// SIDE-EFFECT: will mutate ranges.\n// Will return a new array result.\nfunction invertRanges(ranges, constraintRange) {\n var invertedRanges = [];\n var start = constraintRange.start; // the end of the previous range. the start of the new range\n var i;\n var dateRange;\n // ranges need to be in order. required for our date-walking algorithm\n ranges.sort(compareRanges);\n for (i = 0; i < ranges.length; i++) {\n dateRange = ranges[i];\n // add the span of time before the event (if there is any)\n if (dateRange.start > start) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: dateRange.start });\n }\n if (dateRange.end > start) {\n start = dateRange.end;\n }\n }\n // add the span of time after the last event (if there is any)\n if (start < constraintRange.end) { // compare millisecond time (skip any ambig logic)\n invertedRanges.push({ start: start, end: constraintRange.end });\n }\n return invertedRanges;\n}\nfunction compareRanges(range0, range1) {\n return range0.start.valueOf() - range1.start.valueOf(); // earlier ranges go first\n}\nfunction intersectRanges(range0, range1) {\n var start = range0.start;\n var end = range0.end;\n var newRange = null;\n if (range1.start !== null) {\n if (start === null) {\n start = range1.start;\n }\n else {\n start = new Date(Math.max(start.valueOf(), range1.start.valueOf()));\n }\n }\n if (range1.end != null) {\n if (end === null) {\n end = range1.end;\n }\n else {\n end = new Date(Math.min(end.valueOf(), range1.end.valueOf()));\n }\n }\n if (start === null || end === null || start < end) {\n newRange = { start: start, end: end };\n }\n return newRange;\n}\nfunction rangesEqual(range0, range1) {\n return (range0.start === null ? null : range0.start.valueOf()) === (range1.start === null ? null : range1.start.valueOf()) &&\n (range0.end === null ? null : range0.end.valueOf()) === (range1.end === null ? null : range1.end.valueOf());\n}\nfunction rangesIntersect(range0, range1) {\n return (range0.end === null || range1.start === null || range0.end > range1.start) &&\n (range0.start === null || range1.end === null || range0.start < range1.end);\n}\nfunction rangeContainsRange(outerRange, innerRange) {\n return (outerRange.start === null || (innerRange.start !== null && innerRange.start >= outerRange.start)) &&\n (outerRange.end === null || (innerRange.end !== null && innerRange.end <= outerRange.end));\n}\nfunction rangeContainsMarker(range, date) {\n return (range.start === null || date >= range.start) &&\n (range.end === null || date < range.end);\n}\n// If the given date is not within the given range, move it inside.\n// (If it's past the end, make it one millisecond before the end).\nfunction constrainMarkerToRange(date, range) {\n if (range.start != null && date < range.start) {\n return range.start;\n }\n if (range.end != null && date >= range.end) {\n return new Date(range.end.valueOf() - 1);\n }\n return date;\n}\n\n/*\nSpecifying nextDayThreshold signals that all-day ranges should be sliced.\n*/\nfunction sliceEventStore(eventStore, eventUiBases, framingRange, nextDayThreshold) {\n var inverseBgByGroupId = {};\n var inverseBgByDefId = {};\n var defByGroupId = {};\n var bgRanges = [];\n var fgRanges = [];\n var eventUis = compileEventUis(eventStore.defs, eventUiBases);\n for (var defId in eventStore.defs) {\n var def = eventStore.defs[defId];\n var ui = eventUis[def.defId];\n if (ui.display === 'inverse-background') {\n if (def.groupId) {\n inverseBgByGroupId[def.groupId] = [];\n if (!defByGroupId[def.groupId]) {\n defByGroupId[def.groupId] = def;\n }\n }\n else {\n inverseBgByDefId[defId] = [];\n }\n }\n }\n for (var instanceId in eventStore.instances) {\n var instance = eventStore.instances[instanceId];\n var def = eventStore.defs[instance.defId];\n var ui = eventUis[def.defId];\n var origRange = instance.range;\n var normalRange = (!def.allDay && nextDayThreshold) ?\n computeVisibleDayRange(origRange, nextDayThreshold) :\n origRange;\n var slicedRange = intersectRanges(normalRange, framingRange);\n if (slicedRange) {\n if (ui.display === 'inverse-background') {\n if (def.groupId) {\n inverseBgByGroupId[def.groupId].push(slicedRange);\n }\n else {\n inverseBgByDefId[instance.defId].push(slicedRange);\n }\n }\n else if (ui.display !== 'none') {\n (ui.display === 'background' ? bgRanges : fgRanges).push({\n def: def,\n ui: ui,\n instance: instance,\n range: slicedRange,\n isStart: normalRange.start && normalRange.start.valueOf() === slicedRange.start.valueOf(),\n isEnd: normalRange.end && normalRange.end.valueOf() === slicedRange.end.valueOf()\n });\n }\n }\n }\n for (var groupId in inverseBgByGroupId) { // BY GROUP\n var ranges = inverseBgByGroupId[groupId];\n var invertedRanges = invertRanges(ranges, framingRange);\n for (var _i = 0, invertedRanges_1 = invertedRanges; _i < invertedRanges_1.length; _i++) {\n var invertedRange = invertedRanges_1[_i];\n var def = defByGroupId[groupId];\n var ui = eventUis[def.defId];\n bgRanges.push({\n def: def,\n ui: ui,\n instance: null,\n range: invertedRange,\n isStart: false,\n isEnd: false\n });\n }\n }\n for (var defId in inverseBgByDefId) {\n var ranges = inverseBgByDefId[defId];\n var invertedRanges = invertRanges(ranges, framingRange);\n for (var _a = 0, invertedRanges_2 = invertedRanges; _a < invertedRanges_2.length; _a++) {\n var invertedRange = invertedRanges_2[_a];\n bgRanges.push({\n def: eventStore.defs[defId],\n ui: eventUis[defId],\n instance: null,\n range: invertedRange,\n isStart: false,\n isEnd: false\n });\n }\n }\n return { bg: bgRanges, fg: fgRanges };\n}\nfunction hasBgRendering(def) {\n return def.ui.display === 'background' || def.ui.display === 'inverse-background';\n}\nfunction setElSeg(el, seg) {\n el.fcSeg = seg;\n}\nfunction getElSeg(el) {\n return el.fcSeg ||\n el.parentNode.fcSeg || // for the harness\n null;\n}\n// event ui computation\nfunction compileEventUis(eventDefs, eventUiBases) {\n return mapHash(eventDefs, function (eventDef) {\n return compileEventUi(eventDef, eventUiBases);\n });\n}\nfunction compileEventUi(eventDef, eventUiBases) {\n var uis = [];\n if (eventUiBases['']) {\n uis.push(eventUiBases['']);\n }\n if (eventUiBases[eventDef.defId]) {\n uis.push(eventUiBases[eventDef.defId]);\n }\n uis.push(eventDef.ui);\n return combineEventUis(uis);\n}\nfunction sortEventSegs(segs, eventOrderSpecs) {\n var objs = segs.map(buildSegCompareObj);\n objs.sort(function (obj0, obj1) {\n return compareByFieldSpecs(obj0, obj1, eventOrderSpecs);\n });\n return objs.map(function (c) {\n return c._seg;\n });\n}\n// returns a object with all primitive props that can be compared\nfunction buildSegCompareObj(seg) {\n var eventRange = seg.eventRange;\n var eventDef = eventRange.def;\n var range = eventRange.instance ? eventRange.instance.range : eventRange.range;\n var start = range.start ? range.start.valueOf() : 0; // TODO: better support for open-range events\n var end = range.end ? range.end.valueOf() : 0; // \"\n return __assign(__assign(__assign({}, eventDef.extendedProps), eventDef), { id: eventDef.publicId, start: start,\n end: end, duration: end - start, allDay: Number(eventDef.allDay), _seg: seg // for later retrieval\n });\n}\nfunction computeSegDraggable(seg, context) {\n var pluginHooks = context.pluginHooks;\n var transformers = pluginHooks.isDraggableTransformers;\n var _a = seg.eventRange, def = _a.def, ui = _a.ui;\n var val = ui.startEditable;\n for (var _i = 0, transformers_1 = transformers; _i < transformers_1.length; _i++) {\n var transformer = transformers_1[_i];\n val = transformer(val, def, ui, context);\n }\n return val;\n}\nfunction computeSegStartResizable(seg, context) {\n return seg.isStart && seg.eventRange.ui.durationEditable && context.options.eventResizableFromStart;\n}\nfunction computeSegEndResizable(seg, context) {\n return seg.isEnd && seg.eventRange.ui.durationEditable;\n}\nfunction buildSegTimeText(seg, timeFormat, context, defaultDisplayEventTime, // defaults to true\ndefaultDisplayEventEnd, // defaults to true\nstartOverride, endOverride) {\n var dateEnv = context.dateEnv, options = context.options;\n var displayEventTime = options.displayEventTime, displayEventEnd = options.displayEventEnd;\n var eventDef = seg.eventRange.def;\n var eventInstance = seg.eventRange.instance;\n if (displayEventTime == null) {\n displayEventTime = defaultDisplayEventTime !== false;\n }\n if (displayEventEnd == null) {\n displayEventEnd = defaultDisplayEventEnd !== false;\n }\n if (displayEventTime && !eventDef.allDay && (seg.isStart || seg.isEnd)) {\n var segStart = startOverride || (seg.isStart ? eventInstance.range.start : (seg.start || seg.eventRange.range.start));\n var segEnd = endOverride || (seg.isEnd ? eventInstance.range.end : (seg.end || seg.eventRange.range.end));\n if (displayEventEnd && eventDef.hasEnd) {\n return dateEnv.formatRange(segStart, segEnd, timeFormat, {\n forcedStartTzo: startOverride ? null : eventInstance.forcedStartTzo,\n forcedEndTzo: endOverride ? null : eventInstance.forcedEndTzo\n });\n }\n else {\n return dateEnv.format(segStart, timeFormat, {\n forcedTzo: startOverride ? null : eventInstance.forcedStartTzo // nooooo, same\n });\n }\n }\n return '';\n}\nfunction getSegMeta(seg, todayRange, nowDate) {\n var segRange = seg.eventRange.range;\n return {\n isPast: segRange.end < (nowDate || todayRange.start),\n isFuture: segRange.start >= (nowDate || todayRange.end),\n isToday: todayRange && rangeContainsMarker(todayRange, segRange.start)\n };\n}\nfunction getEventClassNames(props) {\n var classNames = ['fc-event'];\n if (props.isMirror) {\n classNames.push('fc-event-mirror');\n }\n if (props.isDraggable) {\n classNames.push('fc-event-draggable');\n }\n if (props.isStartResizable || props.isEndResizable) {\n classNames.push('fc-event-resizable');\n }\n if (props.isDragging) {\n classNames.push('fc-event-dragging');\n }\n if (props.isResizing) {\n classNames.push('fc-event-resizing');\n }\n if (props.isSelected) {\n classNames.push('fc-event-selected');\n }\n if (props.isStart) {\n classNames.push('fc-event-start');\n }\n if (props.isEnd) {\n classNames.push('fc-event-end');\n }\n if (props.isPast) {\n classNames.push('fc-event-past');\n }\n if (props.isToday) {\n classNames.push('fc-event-today');\n }\n if (props.isFuture) {\n classNames.push('fc-event-future');\n }\n return classNames;\n}\nfunction buildEventRangeKey(eventRange) {\n return eventRange.instance\n ? eventRange.instance.instanceId\n : eventRange.def.defId + ':' + eventRange.range.start.toISOString();\n // inverse-background events don't have specific instances. TODO: better solution\n}\n\nvar STANDARD_PROPS = {\n start: identity,\n end: identity,\n allDay: Boolean\n};\nfunction parseDateSpan(raw, dateEnv, defaultDuration) {\n var span = parseOpenDateSpan(raw, dateEnv);\n var range = span.range;\n if (!range.start) {\n return null;\n }\n if (!range.end) {\n if (defaultDuration == null) {\n return null;\n }\n else {\n range.end = dateEnv.add(range.start, defaultDuration);\n }\n }\n return span;\n}\n/*\nTODO: somehow combine with parseRange?\nWill return null if the start/end props were present but parsed invalidly.\n*/\nfunction parseOpenDateSpan(raw, dateEnv) {\n var _a = refineProps(raw, STANDARD_PROPS), standardProps = _a.refined, extra = _a.extra;\n var startMeta = standardProps.start ? dateEnv.createMarkerMeta(standardProps.start) : null;\n var endMeta = standardProps.end ? dateEnv.createMarkerMeta(standardProps.end) : null;\n var allDay = standardProps.allDay;\n if (allDay == null) {\n allDay = (startMeta && startMeta.isTimeUnspecified) &&\n (!endMeta || endMeta.isTimeUnspecified);\n }\n return __assign({ range: {\n start: startMeta ? startMeta.marker : null,\n end: endMeta ? endMeta.marker : null,\n }, allDay: allDay }, extra);\n}\nfunction isDateSpansEqual(span0, span1) {\n return rangesEqual(span0.range, span1.range) &&\n span0.allDay === span1.allDay &&\n isSpanPropsEqual(span0, span1);\n}\n// the NON-DATE-RELATED props\nfunction isSpanPropsEqual(span0, span1) {\n for (var propName in span1) {\n if (propName !== 'range' && propName !== 'allDay') {\n if (span0[propName] !== span1[propName]) {\n return false;\n }\n }\n }\n // are there any props that span0 has that span1 DOESN'T have?\n // both have range/allDay, so no need to special-case.\n for (var propName in span0) {\n if (!(propName in span1)) {\n return false;\n }\n }\n return true;\n}\nfunction buildDateSpanApi(span, dateEnv) {\n return __assign(__assign({}, buildRangeApi(span.range, dateEnv, span.allDay)), { allDay: span.allDay });\n}\nfunction buildRangeApiWithTimeZone(range, dateEnv, omitTime) {\n return __assign(__assign({}, buildRangeApi(range, dateEnv, omitTime)), { timeZone: dateEnv.timeZone });\n}\nfunction buildRangeApi(range, dateEnv, omitTime) {\n return {\n start: dateEnv.toDate(range.start),\n end: dateEnv.toDate(range.end),\n startStr: dateEnv.formatIso(range.start, { omitTime: omitTime }),\n endStr: dateEnv.formatIso(range.end, { omitTime: omitTime })\n };\n}\nfunction fabricateEventRange(dateSpan, eventUiBases, context) {\n var res = refineEventDef({ editable: false }, context);\n var def = parseEventDef(res.refined, res.extra, '', // sourceId\n dateSpan.allDay, true, // hasEnd\n context);\n return {\n def: def,\n ui: compileEventUi(def, eventUiBases),\n instance: createEventInstance(def.defId, dateSpan.range),\n range: dateSpan.range,\n isStart: true,\n isEnd: true\n };\n}\n\nfunction triggerDateSelect(selection, pev, context) {\n context.emitter.trigger('select', __assign(__assign({}, buildDateSpanApiWithContext(selection, context)), { jsEvent: pev ? pev.origEvent : null, view: context.viewApi || context.calendarApi.view }));\n}\nfunction triggerDateUnselect(pev, context) {\n context.emitter.trigger('unselect', {\n jsEvent: pev ? pev.origEvent : null,\n view: context.viewApi || context.calendarApi.view\n });\n}\nfunction buildDateSpanApiWithContext(dateSpan, context) {\n var props = {};\n for (var _i = 0, _a = context.pluginHooks.dateSpanTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n __assign(props, transform(dateSpan, context));\n }\n __assign(props, buildDateSpanApi(dateSpan, context.dateEnv));\n return props;\n}\n// Given an event's allDay status and start date, return what its fallback end date should be.\n// TODO: rename to computeDefaultEventEnd\nfunction getDefaultEventEnd(allDay, marker, context) {\n var dateEnv = context.dateEnv, options = context.options;\n var end = marker;\n if (allDay) {\n end = startOfDay(end);\n end = dateEnv.add(end, options.defaultAllDayEventDuration);\n }\n else {\n end = dateEnv.add(end, options.defaultTimedEventDuration);\n }\n return end;\n}\n\n// applies the mutation to ALL defs/instances within the event store\nfunction applyMutationToEventStore(eventStore, eventConfigBase, mutation, context) {\n var eventConfigs = compileEventUis(eventStore.defs, eventConfigBase);\n var dest = createEmptyEventStore();\n for (var defId in eventStore.defs) {\n var def = eventStore.defs[defId];\n dest.defs[defId] = applyMutationToEventDef(def, eventConfigs[defId], mutation, context);\n }\n for (var instanceId in eventStore.instances) {\n var instance = eventStore.instances[instanceId];\n var def = dest.defs[instance.defId]; // important to grab the newly modified def\n dest.instances[instanceId] = applyMutationToEventInstance(instance, def, eventConfigs[instance.defId], mutation, context);\n }\n return dest;\n}\nfunction applyMutationToEventDef(eventDef, eventConfig, mutation, context) {\n var standardProps = mutation.standardProps || {};\n // if hasEnd has not been specified, guess a good value based on deltas.\n // if duration will change, there's no way the default duration will persist,\n // and thus, we need to mark the event as having a real end\n if (standardProps.hasEnd == null &&\n eventConfig.durationEditable &&\n (mutation.startDelta || mutation.endDelta)) {\n standardProps.hasEnd = true; // TODO: is this mutation okay?\n }\n var copy = __assign(__assign(__assign({}, eventDef), standardProps), { ui: __assign(__assign({}, eventDef.ui), standardProps.ui) });\n if (mutation.extendedProps) {\n copy.extendedProps = __assign(__assign({}, copy.extendedProps), mutation.extendedProps);\n }\n for (var _i = 0, _a = context.pluginHooks.eventDefMutationAppliers; _i < _a.length; _i++) {\n var applier = _a[_i];\n applier(copy, mutation, context);\n }\n if (!copy.hasEnd && context.options.forceEventDuration) {\n copy.hasEnd = true;\n }\n return copy;\n}\nfunction applyMutationToEventInstance(eventInstance, eventDef, // must first be modified by applyMutationToEventDef\neventConfig, mutation, context) {\n var dateEnv = context.dateEnv;\n var forceAllDay = mutation.standardProps && mutation.standardProps.allDay === true;\n var clearEnd = mutation.standardProps && mutation.standardProps.hasEnd === false;\n var copy = __assign({}, eventInstance);\n if (forceAllDay) {\n copy.range = computeAlignedDayRange(copy.range);\n }\n if (mutation.datesDelta && eventConfig.startEditable) {\n copy.range = {\n start: dateEnv.add(copy.range.start, mutation.datesDelta),\n end: dateEnv.add(copy.range.end, mutation.datesDelta)\n };\n }\n if (mutation.startDelta && eventConfig.durationEditable) {\n copy.range = {\n start: dateEnv.add(copy.range.start, mutation.startDelta),\n end: copy.range.end\n };\n }\n if (mutation.endDelta && eventConfig.durationEditable) {\n copy.range = {\n start: copy.range.start,\n end: dateEnv.add(copy.range.end, mutation.endDelta)\n };\n }\n if (clearEnd) {\n copy.range = {\n start: copy.range.start,\n end: getDefaultEventEnd(eventDef.allDay, copy.range.start, context)\n };\n }\n // in case event was all-day but the supplied deltas were not\n // better util for this?\n if (eventDef.allDay) {\n copy.range = {\n start: startOfDay(copy.range.start),\n end: startOfDay(copy.range.end)\n };\n }\n // handle invalid durations\n if (copy.range.end < copy.range.start) {\n copy.range.end = getDefaultEventEnd(eventDef.allDay, copy.range.start, context);\n }\n return copy;\n}\n\n// no public types yet. when there are, export from:\n// import {} from './api-type-deps'\nvar ViewApi = /** @class */ (function () {\n function ViewApi(type, getCurrentData, dateEnv) {\n this.type = type;\n this.getCurrentData = getCurrentData;\n this.dateEnv = dateEnv;\n }\n Object.defineProperty(ViewApi.prototype, \"calendar\", {\n get: function () {\n return this.getCurrentData().calendarApi;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewApi.prototype, \"title\", {\n get: function () {\n return this.getCurrentData().viewTitle;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewApi.prototype, \"activeStart\", {\n get: function () {\n return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewApi.prototype, \"activeEnd\", {\n get: function () {\n return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewApi.prototype, \"currentStart\", {\n get: function () {\n return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ViewApi.prototype, \"currentEnd\", {\n get: function () {\n return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end);\n },\n enumerable: false,\n configurable: true\n });\n ViewApi.prototype.getOption = function (name) {\n return this.getCurrentData().options[name]; // are the view-specific options\n };\n return ViewApi;\n}());\n\nvar EVENT_SOURCE_REFINERS = {\n id: String,\n defaultAllDay: Boolean,\n url: String,\n events: identity,\n eventDataTransform: identity,\n // for any network-related sources\n success: identity,\n failure: identity,\n};\nfunction parseEventSource(raw, context, refiners) {\n if (refiners === void 0) { refiners = buildEventSourceRefiners(context); }\n var rawObj;\n if (typeof raw === 'string') {\n rawObj = { url: raw };\n }\n else if (typeof raw === 'function' || Array.isArray(raw)) {\n rawObj = { events: raw };\n }\n else if (typeof raw === 'object' && raw) { // not null\n rawObj = raw;\n }\n if (rawObj) {\n var _a = refineProps(rawObj, refiners), refined = _a.refined, extra = _a.extra;\n var metaRes = buildEventSourceMeta(refined, context);\n if (metaRes) {\n return {\n _raw: raw,\n isFetching: false,\n latestFetchId: '',\n fetchRange: null,\n defaultAllDay: refined.defaultAllDay,\n eventDataTransform: refined.eventDataTransform,\n success: refined.success,\n failure: refined.failure,\n publicId: refined.id || '',\n sourceId: guid(),\n sourceDefId: metaRes.sourceDefId,\n meta: metaRes.meta,\n ui: createEventUi(refined, context),\n extendedProps: extra\n };\n }\n }\n return null;\n}\nfunction buildEventSourceRefiners(context) {\n return __assign(__assign(__assign({}, EVENT_UI_REFINERS), EVENT_SOURCE_REFINERS), context.pluginHooks.eventSourceRefiners);\n}\nfunction buildEventSourceMeta(raw, context) {\n var defs = context.pluginHooks.eventSourceDefs;\n for (var i = defs.length - 1; i >= 0; i--) { // later-added plugins take precedence\n var def = defs[i];\n var meta = def.parseMeta(raw);\n if (meta) {\n return { sourceDefId: i, meta: meta };\n }\n }\n return null;\n}\n\nfunction reduceCurrentDate(currentDate, action) {\n switch (action.type) {\n case 'CHANGE_DATE':\n return action.dateMarker;\n default:\n return currentDate;\n }\n}\nfunction getInitialDate(options, dateEnv) {\n var initialDateInput = options.initialDate;\n // compute the initial ambig-timezone date\n if (initialDateInput != null) {\n return dateEnv.createMarker(initialDateInput);\n }\n else {\n return getNow(options.now, dateEnv); // getNow already returns unzoned\n }\n}\nfunction getNow(nowInput, dateEnv) {\n if (typeof nowInput === 'function') {\n nowInput = nowInput();\n }\n if (nowInput == null) {\n return dateEnv.createNowMarker();\n }\n return dateEnv.createMarker(nowInput);\n}\n\nvar CalendarApi = /** @class */ (function () {\n function CalendarApi() {\n }\n CalendarApi.prototype.getCurrentData = function () {\n return this.currentDataManager.getCurrentData();\n };\n CalendarApi.prototype.dispatch = function (action) {\n return this.currentDataManager.dispatch(action);\n };\n Object.defineProperty(CalendarApi.prototype, \"view\", {\n get: function () { return this.getCurrentData().viewApi; } // for public API\n ,\n enumerable: false,\n configurable: true\n });\n CalendarApi.prototype.batchRendering = function (callback) {\n callback();\n };\n CalendarApi.prototype.updateSize = function () {\n this.trigger('_resize', true);\n };\n // Options\n // -----------------------------------------------------------------------------------------------------------------\n CalendarApi.prototype.setOption = function (name, val) {\n this.dispatch({\n type: 'SET_OPTION',\n optionName: name,\n rawOptionValue: val\n });\n };\n CalendarApi.prototype.getOption = function (name) {\n return this.currentDataManager.currentCalendarOptionsInput[name];\n };\n CalendarApi.prototype.getAvailableLocaleCodes = function () {\n return Object.keys(this.getCurrentData().availableRawLocales);\n };\n // Trigger\n // -----------------------------------------------------------------------------------------------------------------\n CalendarApi.prototype.on = function (handlerName, handler) {\n var currentDataManager = this.currentDataManager;\n if (currentDataManager.currentCalendarOptionsRefiners[handlerName]) {\n currentDataManager.emitter.on(handlerName, handler);\n }\n else {\n console.warn(\"Unknown listener name '\" + handlerName + \"'\");\n }\n };\n CalendarApi.prototype.off = function (handlerName, handler) {\n this.currentDataManager.emitter.off(handlerName, handler);\n };\n CalendarApi.prototype.trigger = function (handlerName) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n (_a = this.currentDataManager.emitter).trigger.apply(_a, __spreadArrays([handlerName], args));\n };\n // View\n // -----------------------------------------------------------------------------------------------------------------\n CalendarApi.prototype.changeView = function (viewType, dateOrRange) {\n var _this = this;\n this.batchRendering(function () {\n _this.unselect();\n if (dateOrRange) {\n if (dateOrRange.start && dateOrRange.end) { // a range\n _this.dispatch({\n type: 'CHANGE_VIEW_TYPE',\n viewType: viewType,\n });\n _this.dispatch({\n type: 'SET_OPTION',\n optionName: 'visibleRange',\n rawOptionValue: dateOrRange\n });\n }\n else {\n var dateEnv = _this.getCurrentData().dateEnv;\n _this.dispatch({\n type: 'CHANGE_VIEW_TYPE',\n viewType: viewType,\n dateMarker: dateEnv.createMarker(dateOrRange)\n });\n }\n }\n else {\n _this.dispatch({\n type: 'CHANGE_VIEW_TYPE',\n viewType: viewType\n });\n }\n });\n };\n // Forces navigation to a view for the given date.\n // `viewType` can be a specific view name or a generic one like \"week\" or \"day\".\n // needs to change\n CalendarApi.prototype.zoomTo = function (dateMarker, viewType) {\n var state = this.getCurrentData();\n var spec;\n viewType = viewType || 'day'; // day is default zoom\n spec = state.viewSpecs[viewType] || this.getUnitViewSpec(viewType);\n this.unselect();\n if (spec) {\n this.dispatch({\n type: 'CHANGE_VIEW_TYPE',\n viewType: spec.type,\n dateMarker: dateMarker\n });\n }\n else {\n this.dispatch({\n type: 'CHANGE_DATE',\n dateMarker: dateMarker\n });\n }\n };\n // Given a duration singular unit, like \"week\" or \"day\", finds a matching view spec.\n // Preference is given to views that have corresponding buttons.\n CalendarApi.prototype.getUnitViewSpec = function (unit) {\n var _a = this.getCurrentData(), viewSpecs = _a.viewSpecs, toolbarConfig = _a.toolbarConfig;\n var viewTypes = [].concat(toolbarConfig.viewsWithButtons);\n var i;\n var spec;\n for (var viewType in viewSpecs) {\n viewTypes.push(viewType);\n }\n for (i = 0; i < viewTypes.length; i++) {\n spec = viewSpecs[viewTypes[i]];\n if (spec) {\n if (spec.singleUnit === unit) {\n return spec;\n }\n }\n }\n };\n // Current Date\n // -----------------------------------------------------------------------------------------------------------------\n CalendarApi.prototype.prev = function () {\n this.unselect();\n this.dispatch({ type: 'PREV' });\n };\n CalendarApi.prototype.next = function () {\n this.unselect();\n this.dispatch({ type: 'NEXT' });\n };\n CalendarApi.prototype.prevYear = function () {\n var state = this.getCurrentData();\n this.unselect();\n this.dispatch({\n type: 'CHANGE_DATE',\n dateMarker: state.dateEnv.addYears(state.currentDate, -1)\n });\n };\n CalendarApi.prototype.nextYear = function () {\n var state = this.getCurrentData();\n this.unselect();\n this.dispatch({\n type: 'CHANGE_DATE',\n dateMarker: state.dateEnv.addYears(state.currentDate, 1)\n });\n };\n CalendarApi.prototype.today = function () {\n var state = this.getCurrentData();\n this.unselect();\n this.dispatch({\n type: 'CHANGE_DATE',\n dateMarker: getNow(state.calendarOptions.now, state.dateEnv)\n });\n };\n CalendarApi.prototype.gotoDate = function (zonedDateInput) {\n var state = this.getCurrentData();\n this.unselect();\n this.dispatch({\n type: 'CHANGE_DATE',\n dateMarker: state.dateEnv.createMarker(zonedDateInput)\n });\n };\n CalendarApi.prototype.incrementDate = function (deltaInput) {\n var state = this.getCurrentData();\n var delta = createDuration(deltaInput);\n if (delta) { // else, warn about invalid input?\n this.unselect();\n this.dispatch({\n type: 'CHANGE_DATE',\n dateMarker: state.dateEnv.add(state.currentDate, delta)\n });\n }\n };\n // for external API\n CalendarApi.prototype.getDate = function () {\n var state = this.getCurrentData();\n return state.dateEnv.toDate(state.currentDate);\n };\n // Date Formatting Utils\n // -----------------------------------------------------------------------------------------------------------------\n CalendarApi.prototype.formatDate = function (d, formatter) {\n var dateEnv = this.getCurrentData().dateEnv;\n return dateEnv.format(dateEnv.createMarker(d), createFormatter(formatter));\n };\n // `settings` is for formatter AND isEndExclusive\n CalendarApi.prototype.formatRange = function (d0, d1, settings) {\n var dateEnv = this.getCurrentData().dateEnv;\n return dateEnv.formatRange(dateEnv.createMarker(d0), dateEnv.createMarker(d1), createFormatter(settings), settings);\n };\n CalendarApi.prototype.formatIso = function (d, omitTime) {\n var dateEnv = this.getCurrentData().dateEnv;\n return dateEnv.formatIso(dateEnv.createMarker(d), { omitTime: omitTime });\n };\n // Date Selection / Event Selection / DayClick\n // -----------------------------------------------------------------------------------------------------------------\n // this public method receives start/end dates in any format, with any timezone\n // NOTE: args were changed from v3\n CalendarApi.prototype.select = function (dateOrObj, endDate) {\n var selectionInput;\n if (endDate == null) {\n if (dateOrObj.start != null) {\n selectionInput = dateOrObj;\n }\n else {\n selectionInput = {\n start: dateOrObj,\n end: null\n };\n }\n }\n else {\n selectionInput = {\n start: dateOrObj,\n end: endDate\n };\n }\n var state = this.getCurrentData();\n var selection = parseDateSpan(selectionInput, state.dateEnv, createDuration({ days: 1 }) // TODO: cache this?\n );\n if (selection) { // throw parse error otherwise?\n this.dispatch({ type: 'SELECT_DATES', selection: selection });\n triggerDateSelect(selection, null, state);\n }\n };\n // public method\n CalendarApi.prototype.unselect = function (pev) {\n var state = this.getCurrentData();\n if (state.dateSelection) {\n this.dispatch({ type: 'UNSELECT_DATES' });\n triggerDateUnselect(pev, state);\n }\n };\n // Public Events API\n // -----------------------------------------------------------------------------------------------------------------\n CalendarApi.prototype.addEvent = function (eventInput, sourceInput) {\n if (eventInput instanceof EventApi) {\n var def = eventInput._def;\n var instance = eventInput._instance;\n var currentData = this.getCurrentData();\n // not already present? don't want to add an old snapshot\n if (!currentData.eventStore.defs[def.defId]) {\n this.dispatch({\n type: 'ADD_EVENTS',\n eventStore: eventTupleToStore({ def: def, instance: instance }) // TODO: better util for two args?\n });\n this.triggerEventAdd(eventInput);\n }\n return eventInput;\n }\n var state = this.getCurrentData();\n var eventSource;\n if (sourceInput instanceof EventSourceApi) {\n eventSource = sourceInput.internalEventSource;\n }\n else if (typeof sourceInput === 'boolean') {\n if (sourceInput) { // true. part of the first event source\n eventSource = hashValuesToArray(state.eventSources)[0];\n }\n }\n else if (sourceInput != null) { // an ID. accepts a number too\n var sourceApi = this.getEventSourceById(sourceInput); // TODO: use an internal function\n if (!sourceApi) {\n console.warn('Could not find an event source with ID \"' + sourceInput + '\"'); // TODO: test\n return null;\n }\n else {\n eventSource = sourceApi.internalEventSource;\n }\n }\n var tuple = parseEvent(eventInput, eventSource, state, false);\n if (tuple) {\n var newEventApi = new EventApi(state, tuple.def, tuple.def.recurringDef ? null : tuple.instance);\n this.dispatch({\n type: 'ADD_EVENTS',\n eventStore: eventTupleToStore(tuple)\n });\n this.triggerEventAdd(newEventApi);\n return newEventApi;\n }\n return null;\n };\n CalendarApi.prototype.triggerEventAdd = function (eventApi) {\n var _this = this;\n var emitter = this.getCurrentData().emitter;\n emitter.trigger('eventAdd', {\n event: eventApi,\n relatedEvents: [],\n revert: function () {\n _this.dispatch({\n type: 'REMOVE_EVENTS',\n eventStore: eventApiToStore(eventApi)\n });\n }\n });\n };\n // TODO: optimize\n CalendarApi.prototype.getEventById = function (id) {\n var state = this.getCurrentData();\n var _a = state.eventStore, defs = _a.defs, instances = _a.instances;\n id = String(id);\n for (var defId in defs) {\n var def = defs[defId];\n if (def.publicId === id) {\n if (def.recurringDef) {\n return new EventApi(state, def, null);\n }\n else {\n for (var instanceId in instances) {\n var instance = instances[instanceId];\n if (instance.defId === def.defId) {\n return new EventApi(state, def, instance);\n }\n }\n }\n }\n }\n return null;\n };\n CalendarApi.prototype.getEvents = function () {\n var currentData = this.getCurrentData();\n return buildEventApis(currentData.eventStore, currentData);\n };\n CalendarApi.prototype.removeAllEvents = function () {\n this.dispatch({ type: 'REMOVE_ALL_EVENTS' });\n };\n // Public Event Sources API\n // -----------------------------------------------------------------------------------------------------------------\n CalendarApi.prototype.getEventSources = function () {\n var state = this.getCurrentData();\n var sourceHash = state.eventSources;\n var sourceApis = [];\n for (var internalId in sourceHash) {\n sourceApis.push(new EventSourceApi(state, sourceHash[internalId]));\n }\n return sourceApis;\n };\n CalendarApi.prototype.getEventSourceById = function (id) {\n var state = this.getCurrentData();\n var sourceHash = state.eventSources;\n id = String(id);\n for (var sourceId in sourceHash) {\n if (sourceHash[sourceId].publicId === id) {\n return new EventSourceApi(state, sourceHash[sourceId]);\n }\n }\n return null;\n };\n CalendarApi.prototype.addEventSource = function (sourceInput) {\n var state = this.getCurrentData();\n if (sourceInput instanceof EventSourceApi) {\n // not already present? don't want to add an old snapshot\n if (!state.eventSources[sourceInput.internalEventSource.sourceId]) {\n this.dispatch({\n type: 'ADD_EVENT_SOURCES',\n sources: [sourceInput.internalEventSource]\n });\n }\n return sourceInput;\n }\n var eventSource = parseEventSource(sourceInput, state);\n if (eventSource) { // TODO: error otherwise?\n this.dispatch({ type: 'ADD_EVENT_SOURCES', sources: [eventSource] });\n return new EventSourceApi(state, eventSource);\n }\n return null;\n };\n CalendarApi.prototype.removeAllEventSources = function () {\n this.dispatch({ type: 'REMOVE_ALL_EVENT_SOURCES' });\n };\n CalendarApi.prototype.refetchEvents = function () {\n this.dispatch({ type: 'FETCH_EVENT_SOURCES' });\n };\n // Scroll\n // -----------------------------------------------------------------------------------------------------------------\n CalendarApi.prototype.scrollToTime = function (timeInput) {\n var time = createDuration(timeInput);\n if (time) {\n this.trigger('_scrollRequest', { time: time });\n }\n };\n return CalendarApi;\n}());\n\nvar EventApi = /** @class */ (function () {\n // instance will be null if expressing a recurring event that has no current instances,\n // OR if trying to validate an incoming external event that has no dates assigned\n function EventApi(context, def, instance) {\n this._context = context;\n this._def = def;\n this._instance = instance || null;\n }\n /*\n TODO: make event struct more responsible for this\n */\n EventApi.prototype.setProp = function (name, val) {\n var _a, _b;\n if (name in EVENT_DATE_REFINERS) {\n console.warn(\"Could not set date-related prop 'name'. Use one of the date-related methods instead.\");\n }\n else if (name in EVENT_NON_DATE_REFINERS) {\n val = EVENT_NON_DATE_REFINERS[name](val);\n this.mutate({\n standardProps: (_a = {}, _a[name] = val, _a)\n });\n }\n else if (name in EVENT_UI_REFINERS) {\n var ui = EVENT_UI_REFINERS[name](val);\n if (name === 'color') {\n ui = { backgroundColor: val, borderColor: val };\n }\n else if (name === 'editable') {\n ui = { startEditable: val, durationEditable: val };\n }\n else {\n ui = (_b = {}, _b[name] = val, _b);\n }\n this.mutate({\n standardProps: { ui: ui }\n });\n }\n else {\n console.warn(\"Could not set prop '\" + name + \"'. Use setExtendedProp instead.\");\n }\n };\n EventApi.prototype.setExtendedProp = function (name, val) {\n var _a;\n this.mutate({\n extendedProps: (_a = {}, _a[name] = val, _a)\n });\n };\n EventApi.prototype.setStart = function (startInput, options) {\n if (options === void 0) { options = {}; }\n var dateEnv = this._context.dateEnv;\n var start = dateEnv.createMarker(startInput);\n if (start && this._instance) { // TODO: warning if parsed bad\n var instanceRange = this._instance.range;\n var startDelta = diffDates(instanceRange.start, start, dateEnv, options.granularity); // what if parsed bad!?\n if (options.maintainDuration) {\n this.mutate({ datesDelta: startDelta });\n }\n else {\n this.mutate({ startDelta: startDelta });\n }\n }\n };\n EventApi.prototype.setEnd = function (endInput, options) {\n if (options === void 0) { options = {}; }\n var dateEnv = this._context.dateEnv;\n var end;\n if (endInput != null) {\n end = dateEnv.createMarker(endInput);\n if (!end) {\n return; // TODO: warning if parsed bad\n }\n }\n if (this._instance) {\n if (end) {\n var endDelta = diffDates(this._instance.range.end, end, dateEnv, options.granularity);\n this.mutate({ endDelta: endDelta });\n }\n else {\n this.mutate({ standardProps: { hasEnd: false } });\n }\n }\n };\n EventApi.prototype.setDates = function (startInput, endInput, options) {\n if (options === void 0) { options = {}; }\n var dateEnv = this._context.dateEnv;\n var standardProps = { allDay: options.allDay };\n var start = dateEnv.createMarker(startInput);\n var end;\n if (!start) {\n return; // TODO: warning if parsed bad\n }\n if (endInput != null) {\n end = dateEnv.createMarker(endInput);\n if (!end) { // TODO: warning if parsed bad\n return;\n }\n }\n if (this._instance) {\n var instanceRange = this._instance.range;\n // when computing the diff for an event being converted to all-day,\n // compute diff off of the all-day values the way event-mutation does.\n if (options.allDay === true) {\n instanceRange = computeAlignedDayRange(instanceRange);\n }\n var startDelta = diffDates(instanceRange.start, start, dateEnv, options.granularity);\n if (end) {\n var endDelta = diffDates(instanceRange.end, end, dateEnv, options.granularity);\n if (durationsEqual(startDelta, endDelta)) {\n this.mutate({ datesDelta: startDelta, standardProps: standardProps });\n }\n else {\n this.mutate({ startDelta: startDelta, endDelta: endDelta, standardProps: standardProps });\n }\n }\n else { // means \"clear the end\"\n standardProps.hasEnd = false;\n this.mutate({ datesDelta: startDelta, standardProps: standardProps });\n }\n }\n };\n EventApi.prototype.moveStart = function (deltaInput) {\n var delta = createDuration(deltaInput);\n if (delta) { // TODO: warning if parsed bad\n this.mutate({ startDelta: delta });\n }\n };\n EventApi.prototype.moveEnd = function (deltaInput) {\n var delta = createDuration(deltaInput);\n if (delta) { // TODO: warning if parsed bad\n this.mutate({ endDelta: delta });\n }\n };\n EventApi.prototype.moveDates = function (deltaInput) {\n var delta = createDuration(deltaInput);\n if (delta) { // TODO: warning if parsed bad\n this.mutate({ datesDelta: delta });\n }\n };\n EventApi.prototype.setAllDay = function (allDay, options) {\n if (options === void 0) { options = {}; }\n var standardProps = { allDay: allDay };\n var maintainDuration = options.maintainDuration;\n if (maintainDuration == null) {\n maintainDuration = this._context.options.allDayMaintainDuration;\n }\n if (this._def.allDay !== allDay) {\n standardProps.hasEnd = maintainDuration;\n }\n this.mutate({ standardProps: standardProps });\n };\n EventApi.prototype.formatRange = function (formatInput) {\n var dateEnv = this._context.dateEnv;\n var instance = this._instance;\n var formatter = createFormatter(formatInput);\n if (this._def.hasEnd) {\n return dateEnv.formatRange(instance.range.start, instance.range.end, formatter, {\n forcedStartTzo: instance.forcedStartTzo,\n forcedEndTzo: instance.forcedEndTzo\n });\n }\n else {\n return dateEnv.format(instance.range.start, formatter, {\n forcedTzo: instance.forcedStartTzo\n });\n }\n };\n EventApi.prototype.mutate = function (mutation) {\n var instance = this._instance;\n if (instance) {\n var def = this._def;\n var context_1 = this._context;\n var eventStore = context_1.getCurrentData().eventStore;\n var relevantEvents_1 = getRelevantEvents(eventStore, instance.instanceId);\n var eventConfigBase = {\n '': {\n display: '',\n startEditable: true,\n durationEditable: true,\n constraints: [],\n overlap: null,\n allows: [],\n backgroundColor: '',\n borderColor: '',\n textColor: '',\n classNames: []\n }\n };\n relevantEvents_1 = applyMutationToEventStore(relevantEvents_1, eventConfigBase, mutation, context_1);\n var oldEvent = new EventApi(context_1, def, instance); // snapshot\n this._def = relevantEvents_1.defs[def.defId];\n this._instance = relevantEvents_1.instances[instance.instanceId];\n context_1.dispatch({\n type: 'MERGE_EVENTS',\n eventStore: relevantEvents_1\n });\n context_1.emitter.trigger('eventChange', {\n oldEvent: oldEvent,\n event: this,\n relatedEvents: buildEventApis(relevantEvents_1, context_1, instance),\n revert: function () {\n context_1.dispatch({\n type: 'REMOVE_EVENTS',\n eventStore: relevantEvents_1\n });\n }\n });\n }\n };\n EventApi.prototype.remove = function () {\n var context = this._context;\n var asStore = eventApiToStore(this);\n context.dispatch({\n type: 'REMOVE_EVENTS',\n eventStore: asStore\n });\n context.emitter.trigger('eventRemove', {\n event: this,\n relatedEvents: [],\n revert: function () {\n context.dispatch({\n type: 'MERGE_EVENTS',\n eventStore: asStore\n });\n }\n });\n };\n Object.defineProperty(EventApi.prototype, \"source\", {\n get: function () {\n var sourceId = this._def.sourceId;\n if (sourceId) {\n return new EventSourceApi(this._context, this._context.getCurrentData().eventSources[sourceId]);\n }\n return null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"start\", {\n get: function () {\n return this._instance ?\n this._context.dateEnv.toDate(this._instance.range.start) :\n null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"end\", {\n get: function () {\n return (this._instance && this._def.hasEnd) ?\n this._context.dateEnv.toDate(this._instance.range.end) :\n null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"startStr\", {\n get: function () {\n var instance = this._instance;\n if (instance) {\n return this._context.dateEnv.formatIso(instance.range.start, {\n omitTime: this._def.allDay,\n forcedTzo: instance.forcedStartTzo\n });\n }\n return '';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"endStr\", {\n get: function () {\n var instance = this._instance;\n if (instance && this._def.hasEnd) {\n return this._context.dateEnv.formatIso(instance.range.end, {\n omitTime: this._def.allDay,\n forcedTzo: instance.forcedEndTzo\n });\n }\n return '';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"id\", {\n // computable props that all access the def\n // TODO: find a TypeScript-compatible way to do this at scale\n get: function () { return this._def.publicId; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"groupId\", {\n get: function () { return this._def.groupId; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"allDay\", {\n get: function () { return this._def.allDay; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"title\", {\n get: function () { return this._def.title; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"url\", {\n get: function () { return this._def.url; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"display\", {\n get: function () { return this._def.ui.display || 'auto'; } // bad. just normalize the type earlier\n ,\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"startEditable\", {\n get: function () { return this._def.ui.startEditable; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"durationEditable\", {\n get: function () { return this._def.ui.durationEditable; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"constraint\", {\n get: function () { return this._def.ui.constraints[0] || null; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"overlap\", {\n get: function () { return this._def.ui.overlap; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"allow\", {\n get: function () { return this._def.ui.allows[0] || null; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"backgroundColor\", {\n get: function () { return this._def.ui.backgroundColor; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"borderColor\", {\n get: function () { return this._def.ui.borderColor; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"textColor\", {\n get: function () { return this._def.ui.textColor; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"classNames\", {\n // NOTE: user can't modify these because Object.freeze was called in event-def parsing\n get: function () { return this._def.ui.classNames; },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventApi.prototype, \"extendedProps\", {\n get: function () { return this._def.extendedProps; },\n enumerable: false,\n configurable: true\n });\n EventApi.prototype.toPlainObject = function (settings) {\n if (settings === void 0) { settings = {}; }\n var def = this._def;\n var ui = def.ui;\n var _a = this, startStr = _a.startStr, endStr = _a.endStr;\n var res = {};\n if (def.title) {\n res.title = def.title;\n }\n if (startStr) {\n res.start = startStr;\n }\n if (endStr) {\n res.end = endStr;\n }\n if (def.publicId) {\n res.id = def.publicId;\n }\n if (def.groupId) {\n res.groupId = def.groupId;\n }\n if (def.url) {\n res.url = def.url;\n }\n if (ui.display && ui.display !== 'auto') {\n res.display = ui.display;\n }\n // TODO: what about recurring-event properties???\n // TODO: include startEditable/durationEditable/constraint/overlap/allow\n if (settings.collapseColor && ui.backgroundColor && ui.backgroundColor === ui.borderColor) {\n res.color = ui.backgroundColor;\n }\n else {\n if (ui.backgroundColor) {\n res.backgroundColor = ui.backgroundColor;\n }\n if (ui.borderColor) {\n res.borderColor = ui.borderColor;\n }\n }\n if (ui.textColor) {\n res.textColor = ui.textColor;\n }\n if (ui.classNames.length) {\n res.classNames = ui.classNames;\n }\n if (Object.keys(def.extendedProps).length) {\n if (settings.collapseExtendedProps) {\n __assign(res, def.extendedProps);\n }\n else {\n res.extendedProps = def.extendedProps;\n }\n }\n return res;\n };\n EventApi.prototype.toJSON = function () {\n return this.toPlainObject();\n };\n return EventApi;\n}());\nfunction eventApiToStore(eventApi) {\n var _a, _b;\n var def = eventApi._def;\n var instance = eventApi._instance;\n return {\n defs: (_a = {}, _a[def.defId] = def, _a),\n instances: instance\n ? (_b = {}, _b[instance.instanceId] = instance, _b) : {}\n };\n}\nfunction buildEventApis(eventStore, context, excludeInstance) {\n var defs = eventStore.defs, instances = eventStore.instances;\n var eventApis = [];\n var excludeInstanceId = excludeInstance ? excludeInstance.instanceId : '';\n for (var id in instances) {\n var instance = instances[id];\n var def = defs[instance.defId];\n if (instance.instanceId !== excludeInstanceId) {\n eventApis.push(new EventApi(context, def, instance));\n }\n }\n return eventApis;\n}\n\nvar calendarSystemClassMap = {};\nfunction registerCalendarSystem(name, theClass) {\n calendarSystemClassMap[name] = theClass;\n}\nfunction createCalendarSystem(name) {\n return new calendarSystemClassMap[name]();\n}\nvar GregorianCalendarSystem = /** @class */ (function () {\n function GregorianCalendarSystem() {\n }\n GregorianCalendarSystem.prototype.getMarkerYear = function (d) {\n return d.getUTCFullYear();\n };\n GregorianCalendarSystem.prototype.getMarkerMonth = function (d) {\n return d.getUTCMonth();\n };\n GregorianCalendarSystem.prototype.getMarkerDay = function (d) {\n return d.getUTCDate();\n };\n GregorianCalendarSystem.prototype.arrayToMarker = function (arr) {\n return arrayToUtcDate(arr);\n };\n GregorianCalendarSystem.prototype.markerToArray = function (marker) {\n return dateToUtcArray(marker);\n };\n return GregorianCalendarSystem;\n}());\nregisterCalendarSystem('gregory', GregorianCalendarSystem);\n\nvar ISO_RE = /^\\s*(\\d{4})(-(\\d{2})(-(\\d{2})([T ](\\d{2}):(\\d{2})(:(\\d{2})(\\.(\\d+))?)?(Z|(([-+])(\\d{2})(:?(\\d{2}))?))?)?)?)?$/;\nfunction parse(str) {\n var m = ISO_RE.exec(str);\n if (m) {\n var marker = new Date(Date.UTC(Number(m[1]), m[3] ? Number(m[3]) - 1 : 0, Number(m[5] || 1), Number(m[7] || 0), Number(m[8] || 0), Number(m[10] || 0), m[12] ? Number('0.' + m[12]) * 1000 : 0));\n if (isValidDate(marker)) {\n var timeZoneOffset = null;\n if (m[13]) {\n timeZoneOffset = (m[15] === '-' ? -1 : 1) * (Number(m[16] || 0) * 60 +\n Number(m[18] || 0));\n }\n return {\n marker: marker,\n isTimeUnspecified: !m[6],\n timeZoneOffset: timeZoneOffset\n };\n }\n }\n return null;\n}\n\nvar DateEnv = /** @class */ (function () {\n function DateEnv(settings) {\n var timeZone = this.timeZone = settings.timeZone;\n var isNamedTimeZone = timeZone !== 'local' && timeZone !== 'UTC';\n if (settings.namedTimeZoneImpl && isNamedTimeZone) {\n this.namedTimeZoneImpl = new settings.namedTimeZoneImpl(timeZone);\n }\n this.canComputeOffset = Boolean(!isNamedTimeZone || this.namedTimeZoneImpl);\n this.calendarSystem = createCalendarSystem(settings.calendarSystem);\n this.locale = settings.locale;\n this.weekDow = settings.locale.week.dow;\n this.weekDoy = settings.locale.week.doy;\n if (settings.weekNumberCalculation === 'ISO') {\n this.weekDow = 1;\n this.weekDoy = 4;\n }\n if (typeof settings.firstDay === 'number') {\n this.weekDow = settings.firstDay;\n }\n if (typeof settings.weekNumberCalculation === 'function') {\n this.weekNumberFunc = settings.weekNumberCalculation;\n }\n this.weekText = settings.weekText != null ? settings.weekText : settings.locale.options.weekText;\n this.cmdFormatter = settings.cmdFormatter;\n this.defaultSeparator = settings.defaultSeparator;\n }\n // Creating / Parsing\n DateEnv.prototype.createMarker = function (input) {\n var meta = this.createMarkerMeta(input);\n if (meta === null) {\n return null;\n }\n return meta.marker;\n };\n DateEnv.prototype.createNowMarker = function () {\n if (this.canComputeOffset) {\n return this.timestampToMarker(new Date().valueOf());\n }\n else {\n // if we can't compute the current date val for a timezone,\n // better to give the current local date vals than UTC\n return arrayToUtcDate(dateToLocalArray(new Date()));\n }\n };\n DateEnv.prototype.createMarkerMeta = function (input) {\n if (typeof input === 'string') {\n return this.parse(input);\n }\n var marker = null;\n if (typeof input === 'number') {\n marker = this.timestampToMarker(input);\n }\n else if (input instanceof Date) {\n input = input.valueOf();\n if (!isNaN(input)) {\n marker = this.timestampToMarker(input);\n }\n }\n else if (Array.isArray(input)) {\n marker = arrayToUtcDate(input);\n }\n if (marker === null || !isValidDate(marker)) {\n return null;\n }\n return { marker: marker, isTimeUnspecified: false, forcedTzo: null };\n };\n DateEnv.prototype.parse = function (s) {\n var parts = parse(s);\n if (parts === null) {\n return null;\n }\n var marker = parts.marker;\n var forcedTzo = null;\n if (parts.timeZoneOffset !== null) {\n if (this.canComputeOffset) {\n marker = this.timestampToMarker(marker.valueOf() - parts.timeZoneOffset * 60 * 1000);\n }\n else {\n forcedTzo = parts.timeZoneOffset;\n }\n }\n return { marker: marker, isTimeUnspecified: parts.isTimeUnspecified, forcedTzo: forcedTzo };\n };\n // Accessors\n DateEnv.prototype.getYear = function (marker) {\n return this.calendarSystem.getMarkerYear(marker);\n };\n DateEnv.prototype.getMonth = function (marker) {\n return this.calendarSystem.getMarkerMonth(marker);\n };\n // Adding / Subtracting\n DateEnv.prototype.add = function (marker, dur) {\n var a = this.calendarSystem.markerToArray(marker);\n a[0] += dur.years;\n a[1] += dur.months;\n a[2] += dur.days;\n a[6] += dur.milliseconds;\n return this.calendarSystem.arrayToMarker(a);\n };\n DateEnv.prototype.subtract = function (marker, dur) {\n var a = this.calendarSystem.markerToArray(marker);\n a[0] -= dur.years;\n a[1] -= dur.months;\n a[2] -= dur.days;\n a[6] -= dur.milliseconds;\n return this.calendarSystem.arrayToMarker(a);\n };\n DateEnv.prototype.addYears = function (marker, n) {\n var a = this.calendarSystem.markerToArray(marker);\n a[0] += n;\n return this.calendarSystem.arrayToMarker(a);\n };\n DateEnv.prototype.addMonths = function (marker, n) {\n var a = this.calendarSystem.markerToArray(marker);\n a[1] += n;\n return this.calendarSystem.arrayToMarker(a);\n };\n // Diffing Whole Units\n DateEnv.prototype.diffWholeYears = function (m0, m1) {\n var calendarSystem = this.calendarSystem;\n if (timeAsMs(m0) === timeAsMs(m1) &&\n calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1) &&\n calendarSystem.getMarkerMonth(m0) === calendarSystem.getMarkerMonth(m1)) {\n return calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0);\n }\n return null;\n };\n DateEnv.prototype.diffWholeMonths = function (m0, m1) {\n var calendarSystem = this.calendarSystem;\n if (timeAsMs(m0) === timeAsMs(m1) &&\n calendarSystem.getMarkerDay(m0) === calendarSystem.getMarkerDay(m1)) {\n return (calendarSystem.getMarkerMonth(m1) - calendarSystem.getMarkerMonth(m0)) +\n (calendarSystem.getMarkerYear(m1) - calendarSystem.getMarkerYear(m0)) * 12;\n }\n return null;\n };\n // Range / Duration\n DateEnv.prototype.greatestWholeUnit = function (m0, m1) {\n var n = this.diffWholeYears(m0, m1);\n if (n !== null) {\n return { unit: 'year', value: n };\n }\n n = this.diffWholeMonths(m0, m1);\n if (n !== null) {\n return { unit: 'month', value: n };\n }\n n = diffWholeWeeks(m0, m1);\n if (n !== null) {\n return { unit: 'week', value: n };\n }\n n = diffWholeDays(m0, m1);\n if (n !== null) {\n return { unit: 'day', value: n };\n }\n n = diffHours(m0, m1);\n if (isInt(n)) {\n return { unit: 'hour', value: n };\n }\n n = diffMinutes(m0, m1);\n if (isInt(n)) {\n return { unit: 'minute', value: n };\n }\n n = diffSeconds(m0, m1);\n if (isInt(n)) {\n return { unit: 'second', value: n };\n }\n return { unit: 'millisecond', value: m1.valueOf() - m0.valueOf() };\n };\n DateEnv.prototype.countDurationsBetween = function (m0, m1, d) {\n // TODO: can use greatestWholeUnit\n var diff;\n if (d.years) {\n diff = this.diffWholeYears(m0, m1);\n if (diff !== null) {\n return diff / asRoughYears(d);\n }\n }\n if (d.months) {\n diff = this.diffWholeMonths(m0, m1);\n if (diff !== null) {\n return diff / asRoughMonths(d);\n }\n }\n if (d.days) {\n diff = diffWholeDays(m0, m1);\n if (diff !== null) {\n return diff / asRoughDays(d);\n }\n }\n return (m1.valueOf() - m0.valueOf()) / asRoughMs(d);\n };\n // Start-Of\n // these DON'T return zoned-dates. only UTC start-of dates\n DateEnv.prototype.startOf = function (m, unit) {\n if (unit === 'year') {\n return this.startOfYear(m);\n }\n else if (unit === 'month') {\n return this.startOfMonth(m);\n }\n else if (unit === 'week') {\n return this.startOfWeek(m);\n }\n else if (unit === 'day') {\n return startOfDay(m);\n }\n else if (unit === 'hour') {\n return startOfHour(m);\n }\n else if (unit === 'minute') {\n return startOfMinute(m);\n }\n else if (unit === 'second') {\n return startOfSecond(m);\n }\n };\n DateEnv.prototype.startOfYear = function (m) {\n return this.calendarSystem.arrayToMarker([\n this.calendarSystem.getMarkerYear(m)\n ]);\n };\n DateEnv.prototype.startOfMonth = function (m) {\n return this.calendarSystem.arrayToMarker([\n this.calendarSystem.getMarkerYear(m),\n this.calendarSystem.getMarkerMonth(m)\n ]);\n };\n DateEnv.prototype.startOfWeek = function (m) {\n return this.calendarSystem.arrayToMarker([\n this.calendarSystem.getMarkerYear(m),\n this.calendarSystem.getMarkerMonth(m),\n m.getUTCDate() - ((m.getUTCDay() - this.weekDow + 7) % 7)\n ]);\n };\n // Week Number\n DateEnv.prototype.computeWeekNumber = function (marker) {\n if (this.weekNumberFunc) {\n return this.weekNumberFunc(this.toDate(marker));\n }\n else {\n return weekOfYear(marker, this.weekDow, this.weekDoy);\n }\n };\n // TODO: choke on timeZoneName: long\n DateEnv.prototype.format = function (marker, formatter, dateOptions) {\n if (dateOptions === void 0) { dateOptions = {}; }\n return formatter.format({\n marker: marker,\n timeZoneOffset: dateOptions.forcedTzo != null ?\n dateOptions.forcedTzo :\n this.offsetForMarker(marker)\n }, this);\n };\n DateEnv.prototype.formatRange = function (start, end, formatter, dateOptions) {\n if (dateOptions === void 0) { dateOptions = {}; }\n if (dateOptions.isEndExclusive) {\n end = addMs(end, -1);\n }\n return formatter.formatRange({\n marker: start,\n timeZoneOffset: dateOptions.forcedStartTzo != null ?\n dateOptions.forcedStartTzo :\n this.offsetForMarker(start)\n }, {\n marker: end,\n timeZoneOffset: dateOptions.forcedEndTzo != null ?\n dateOptions.forcedEndTzo :\n this.offsetForMarker(end)\n }, this, dateOptions.defaultSeparator);\n };\n /*\n DUMB: the omitTime arg is dumb. if we omit the time, we want to omit the timezone offset. and if we do that,\n might as well use buildIsoString or some other util directly\n */\n DateEnv.prototype.formatIso = function (marker, extraOptions) {\n if (extraOptions === void 0) { extraOptions = {}; }\n var timeZoneOffset = null;\n if (!extraOptions.omitTimeZoneOffset) {\n if (extraOptions.forcedTzo != null) {\n timeZoneOffset = extraOptions.forcedTzo;\n }\n else {\n timeZoneOffset = this.offsetForMarker(marker);\n }\n }\n return buildIsoString(marker, timeZoneOffset, extraOptions.omitTime);\n };\n // TimeZone\n DateEnv.prototype.timestampToMarker = function (ms) {\n if (this.timeZone === 'local') {\n return arrayToUtcDate(dateToLocalArray(new Date(ms)));\n }\n else if (this.timeZone === 'UTC' || !this.namedTimeZoneImpl) {\n return new Date(ms);\n }\n else {\n return arrayToUtcDate(this.namedTimeZoneImpl.timestampToArray(ms));\n }\n };\n DateEnv.prototype.offsetForMarker = function (m) {\n if (this.timeZone === 'local') {\n return -arrayToLocalDate(dateToUtcArray(m)).getTimezoneOffset(); // convert \"inverse\" offset to \"normal\" offset\n }\n else if (this.timeZone === 'UTC') {\n return 0;\n }\n else if (this.namedTimeZoneImpl) {\n return this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m));\n }\n return null;\n };\n // Conversion\n DateEnv.prototype.toDate = function (m, forcedTzo) {\n if (this.timeZone === 'local') {\n return arrayToLocalDate(dateToUtcArray(m));\n }\n else if (this.timeZone === 'UTC') {\n return new Date(m.valueOf()); // make sure it's a copy\n }\n else if (!this.namedTimeZoneImpl) {\n return new Date(m.valueOf() - (forcedTzo || 0));\n }\n else {\n return new Date(m.valueOf() -\n this.namedTimeZoneImpl.offsetForArray(dateToUtcArray(m)) * 1000 * 60 // convert minutes -> ms\n );\n }\n };\n return DateEnv;\n}());\n\nvar globalLocales = [];\n\nvar RAW_EN_LOCALE = {\n code: 'en',\n week: {\n dow: 0,\n doy: 4 // 4 days need to be within the year to be considered the first week\n },\n direction: 'ltr',\n buttonText: {\n prev: 'prev',\n next: 'next',\n prevYear: 'prev year',\n nextYear: 'next year',\n year: 'year',\n today: 'today',\n month: 'month',\n week: 'week',\n day: 'day',\n list: 'list'\n },\n weekText: 'W',\n allDayText: 'all-day',\n moreLinkText: 'more',\n noEventsText: 'No events to display'\n};\nfunction organizeRawLocales(explicitRawLocales) {\n var defaultCode = explicitRawLocales.length > 0 ? explicitRawLocales[0].code : 'en';\n var allRawLocales = globalLocales.concat(explicitRawLocales);\n var rawLocaleMap = {\n en: RAW_EN_LOCALE // necessary?\n };\n for (var _i = 0, allRawLocales_1 = allRawLocales; _i < allRawLocales_1.length; _i++) {\n var rawLocale = allRawLocales_1[_i];\n rawLocaleMap[rawLocale.code] = rawLocale;\n }\n return {\n map: rawLocaleMap,\n defaultCode: defaultCode\n };\n}\nfunction buildLocale(inputSingular, available) {\n if (typeof inputSingular === 'object' && !Array.isArray(inputSingular)) {\n return parseLocale(inputSingular.code, [inputSingular.code], inputSingular);\n }\n else {\n return queryLocale(inputSingular, available);\n }\n}\nfunction queryLocale(codeArg, available) {\n var codes = [].concat(codeArg || []); // will convert to array\n var raw = queryRawLocale(codes, available) || RAW_EN_LOCALE;\n return parseLocale(codeArg, codes, raw);\n}\nfunction queryRawLocale(codes, available) {\n for (var i = 0; i < codes.length; i++) {\n var parts = codes[i].toLocaleLowerCase().split('-');\n for (var j = parts.length; j > 0; j--) {\n var simpleId = parts.slice(0, j).join('-');\n if (available[simpleId]) {\n return available[simpleId];\n }\n }\n }\n return null;\n}\nfunction parseLocale(codeArg, codes, raw) {\n var merged = mergeProps([RAW_EN_LOCALE, raw], ['buttonText']);\n delete merged.code; // don't want this part of the options\n var week = merged.week;\n delete merged.week;\n return {\n codeArg: codeArg,\n codes: codes,\n week: week,\n simpleNumberFormat: new Intl.NumberFormat(codeArg),\n options: merged\n };\n}\n\nfunction formatDate(dateInput, options) {\n if (options === void 0) { options = {}; }\n var dateEnv = buildDateEnv(options);\n var formatter = createFormatter(options);\n var dateMeta = dateEnv.createMarkerMeta(dateInput);\n if (!dateMeta) { // TODO: warning?\n return '';\n }\n return dateEnv.format(dateMeta.marker, formatter, {\n forcedTzo: dateMeta.forcedTzo\n });\n}\nfunction formatRange(startInput, endInput, options // mixture of env and formatter settings\n) {\n var dateEnv = buildDateEnv(typeof options === 'object' && options ? options : {}); // pass in if non-null object\n var formatter = createFormatter(options);\n var startMeta = dateEnv.createMarkerMeta(startInput);\n var endMeta = dateEnv.createMarkerMeta(endInput);\n if (!startMeta || !endMeta) { // TODO: warning?\n return '';\n }\n return dateEnv.formatRange(startMeta.marker, endMeta.marker, formatter, {\n forcedStartTzo: startMeta.forcedTzo,\n forcedEndTzo: endMeta.forcedTzo,\n isEndExclusive: options.isEndExclusive,\n defaultSeparator: BASE_OPTION_DEFAULTS.defaultRangeSeparator\n });\n}\n// TODO: more DRY and optimized\nfunction buildDateEnv(settings) {\n var locale = buildLocale(settings.locale || 'en', organizeRawLocales([]).map); // TODO: don't hardcode 'en' everywhere\n return new DateEnv(__assign(__assign({ timeZone: BASE_OPTION_DEFAULTS.timeZone, calendarSystem: 'gregory' }, settings), { locale: locale }));\n}\n\nvar DEF_DEFAULTS = {\n startTime: '09:00',\n endTime: '17:00',\n daysOfWeek: [1, 2, 3, 4, 5],\n display: 'inverse-background',\n classNames: 'fc-non-business',\n groupId: '_businessHours' // so multiple defs get grouped\n};\n/*\nTODO: pass around as EventDefHash!!!\n*/\nfunction parseBusinessHours(input, context) {\n return parseEvents(refineInputs(input), null, context);\n}\nfunction refineInputs(input) {\n var rawDefs;\n if (input === true) {\n rawDefs = [{}]; // will get DEF_DEFAULTS verbatim\n }\n else if (Array.isArray(input)) {\n // if specifying an array, every sub-definition NEEDS a day-of-week\n rawDefs = input.filter(function (rawDef) {\n return rawDef.daysOfWeek;\n });\n }\n else if (typeof input === 'object' && input) { // non-null object\n rawDefs = [input];\n }\n else { // is probably false\n rawDefs = [];\n }\n rawDefs = rawDefs.map(function (rawDef) {\n return __assign(__assign({}, DEF_DEFAULTS), rawDef);\n });\n return rawDefs;\n}\n\nfunction pointInsideRect(point, rect) {\n return point.left >= rect.left &&\n point.left < rect.right &&\n point.top >= rect.top &&\n point.top < rect.bottom;\n}\n// Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false\nfunction intersectRects(rect1, rect2) {\n var res = {\n left: Math.max(rect1.left, rect2.left),\n right: Math.min(rect1.right, rect2.right),\n top: Math.max(rect1.top, rect2.top),\n bottom: Math.min(rect1.bottom, rect2.bottom)\n };\n if (res.left < res.right && res.top < res.bottom) {\n return res;\n }\n return false;\n}\nfunction translateRect(rect, deltaX, deltaY) {\n return {\n left: rect.left + deltaX,\n right: rect.right + deltaX,\n top: rect.top + deltaY,\n bottom: rect.bottom + deltaY\n };\n}\n// Returns a new point that will have been moved to reside within the given rectangle\nfunction constrainPoint(point, rect) {\n return {\n left: Math.min(Math.max(point.left, rect.left), rect.right),\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\n };\n}\n// Returns a point that is the center of the given rectangle\nfunction getRectCenter(rect) {\n return {\n left: (rect.left + rect.right) / 2,\n top: (rect.top + rect.bottom) / 2\n };\n}\n// Subtracts point2's coordinates from point1's coordinates, returning a delta\nfunction diffPoints(point1, point2) {\n return {\n left: point1.left - point2.left,\n top: point1.top - point2.top\n };\n}\n\nvar EMPTY_EVENT_STORE = createEmptyEventStore(); // for purecomponents. TODO: keep elsewhere\nvar Splitter = /** @class */ (function () {\n function Splitter() {\n this.getKeysForEventDefs = memoize(this._getKeysForEventDefs);\n this.splitDateSelection = memoize(this._splitDateSpan);\n this.splitEventStore = memoize(this._splitEventStore);\n this.splitIndividualUi = memoize(this._splitIndividualUi);\n this.splitEventDrag = memoize(this._splitInteraction);\n this.splitEventResize = memoize(this._splitInteraction);\n this.eventUiBuilders = {}; // TODO: typescript protection\n }\n Splitter.prototype.splitProps = function (props) {\n var _this = this;\n var keyInfos = this.getKeyInfo(props);\n var defKeys = this.getKeysForEventDefs(props.eventStore);\n var dateSelections = this.splitDateSelection(props.dateSelection);\n var individualUi = this.splitIndividualUi(props.eventUiBases, defKeys); // the individual *bases*\n var eventStores = this.splitEventStore(props.eventStore, defKeys);\n var eventDrags = this.splitEventDrag(props.eventDrag);\n var eventResizes = this.splitEventResize(props.eventResize);\n var splitProps = {};\n this.eventUiBuilders = mapHash(keyInfos, function (info, key) {\n return _this.eventUiBuilders[key] || memoize(buildEventUiForKey);\n });\n for (var key in keyInfos) {\n var keyInfo = keyInfos[key];\n var eventStore = eventStores[key] || EMPTY_EVENT_STORE;\n var buildEventUi = this.eventUiBuilders[key];\n splitProps[key] = {\n businessHours: keyInfo.businessHours || props.businessHours,\n dateSelection: dateSelections[key] || null,\n eventStore: eventStore,\n eventUiBases: buildEventUi(props.eventUiBases[''], keyInfo.ui, individualUi[key]),\n eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : '',\n eventDrag: eventDrags[key] || null,\n eventResize: eventResizes[key] || null\n };\n }\n return splitProps;\n };\n Splitter.prototype._splitDateSpan = function (dateSpan) {\n var dateSpans = {};\n if (dateSpan) {\n var keys = this.getKeysForDateSpan(dateSpan);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n dateSpans[key] = dateSpan;\n }\n }\n return dateSpans;\n };\n Splitter.prototype._getKeysForEventDefs = function (eventStore) {\n var _this = this;\n return mapHash(eventStore.defs, function (eventDef) {\n return _this.getKeysForEventDef(eventDef);\n });\n };\n Splitter.prototype._splitEventStore = function (eventStore, defKeys) {\n var defs = eventStore.defs, instances = eventStore.instances;\n var splitStores = {};\n for (var defId in defs) {\n for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) {\n var key = _a[_i];\n if (!splitStores[key]) {\n splitStores[key] = createEmptyEventStore();\n }\n splitStores[key].defs[defId] = defs[defId];\n }\n }\n for (var instanceId in instances) {\n var instance = instances[instanceId];\n for (var _b = 0, _c = defKeys[instance.defId]; _b < _c.length; _b++) {\n var key = _c[_b];\n if (splitStores[key]) { // must have already been created\n splitStores[key].instances[instanceId] = instance;\n }\n }\n }\n return splitStores;\n };\n Splitter.prototype._splitIndividualUi = function (eventUiBases, defKeys) {\n var splitHashes = {};\n for (var defId in eventUiBases) {\n if (defId) { // not the '' key\n for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) {\n var key = _a[_i];\n if (!splitHashes[key]) {\n splitHashes[key] = {};\n }\n splitHashes[key][defId] = eventUiBases[defId];\n }\n }\n }\n return splitHashes;\n };\n Splitter.prototype._splitInteraction = function (interaction) {\n var splitStates = {};\n if (interaction) {\n var affectedStores_1 = this._splitEventStore(interaction.affectedEvents, this._getKeysForEventDefs(interaction.affectedEvents) // can't use cached. might be events from other calendar\n );\n // can't rely on defKeys because event data is mutated\n var mutatedKeysByDefId = this._getKeysForEventDefs(interaction.mutatedEvents);\n var mutatedStores_1 = this._splitEventStore(interaction.mutatedEvents, mutatedKeysByDefId);\n var populate = function (key) {\n if (!splitStates[key]) {\n splitStates[key] = {\n affectedEvents: affectedStores_1[key] || EMPTY_EVENT_STORE,\n mutatedEvents: mutatedStores_1[key] || EMPTY_EVENT_STORE,\n isEvent: interaction.isEvent\n };\n }\n };\n for (var key in affectedStores_1) {\n populate(key);\n }\n for (var key in mutatedStores_1) {\n populate(key);\n }\n }\n return splitStates;\n };\n return Splitter;\n}());\nfunction buildEventUiForKey(allUi, eventUiForKey, individualUi) {\n var baseParts = [];\n if (allUi) {\n baseParts.push(allUi);\n }\n if (eventUiForKey) {\n baseParts.push(eventUiForKey);\n }\n var stuff = {\n '': combineEventUis(baseParts)\n };\n if (individualUi) {\n __assign(stuff, individualUi);\n }\n return stuff;\n}\n\nfunction getDateMeta(date, todayRange, nowDate, dateProfile) {\n return {\n dow: date.getUTCDay(),\n isDisabled: Boolean(dateProfile && !rangeContainsMarker(dateProfile.activeRange, date)),\n isOther: Boolean(dateProfile && !rangeContainsMarker(dateProfile.currentRange, date)),\n isToday: Boolean(todayRange && rangeContainsMarker(todayRange, date)),\n isPast: Boolean(nowDate ? (date < nowDate) : todayRange ? (date < todayRange.start) : false),\n isFuture: Boolean(nowDate ? (date > nowDate) : todayRange ? (date >= todayRange.end) : false)\n };\n}\nfunction getDayClassNames(meta, theme) {\n var classNames = [\n 'fc-day',\n 'fc-day-' + DAY_IDS[meta.dow]\n ];\n if (meta.isDisabled) {\n classNames.push('fc-day-disabled');\n }\n else {\n if (meta.isToday) {\n classNames.push('fc-day-today');\n classNames.push(theme.getClass('today'));\n }\n if (meta.isPast) {\n classNames.push('fc-day-past');\n }\n if (meta.isFuture) {\n classNames.push('fc-day-future');\n }\n if (meta.isOther) {\n classNames.push('fc-day-other');\n }\n }\n return classNames;\n}\nfunction getSlotClassNames(meta, theme) {\n var classNames = [\n 'fc-slot',\n 'fc-slot-' + DAY_IDS[meta.dow]\n ];\n if (meta.isDisabled) {\n classNames.push('fc-slot-disabled');\n }\n else {\n if (meta.isToday) {\n classNames.push('fc-slot-today');\n classNames.push(theme.getClass('today'));\n }\n if (meta.isPast) {\n classNames.push('fc-slot-past');\n }\n if (meta.isFuture) {\n classNames.push('fc-slot-future');\n }\n }\n return classNames;\n}\n\nfunction buildNavLinkData(date, type) {\n if (type === void 0) { type = 'day'; }\n return JSON.stringify({\n date: formatDayString(date),\n type: type\n });\n}\n\nvar _isRtlScrollbarOnLeft = null;\nfunction getIsRtlScrollbarOnLeft() {\n if (_isRtlScrollbarOnLeft === null) {\n _isRtlScrollbarOnLeft = computeIsRtlScrollbarOnLeft();\n }\n return _isRtlScrollbarOnLeft;\n}\nfunction computeIsRtlScrollbarOnLeft() {\n // TODO: use htmlToElement\n var outerEl = document.createElement('div');\n applyStyle(outerEl, {\n position: 'absolute',\n top: -1000,\n left: 0,\n border: 0,\n padding: 0,\n overflow: 'scroll',\n direction: 'rtl'\n });\n outerEl.innerHTML = '
';\n document.body.appendChild(outerEl);\n var innerEl = outerEl.firstChild;\n var res = innerEl.getBoundingClientRect().left > outerEl.getBoundingClientRect().left;\n removeElement(outerEl);\n return res;\n}\n\nvar _scrollbarWidths;\nfunction getScrollbarWidths() {\n if (!_scrollbarWidths) {\n _scrollbarWidths = computeScrollbarWidths();\n }\n return _scrollbarWidths;\n}\nfunction computeScrollbarWidths() {\n var el = document.createElement('div');\n el.style.overflow = 'scroll';\n document.body.appendChild(el);\n var res = computeScrollbarWidthsForEl(el);\n document.body.removeChild(el);\n return res;\n}\n// WARNING: will include border\nfunction computeScrollbarWidthsForEl(el) {\n return {\n x: el.offsetHeight - el.clientHeight,\n y: el.offsetWidth - el.clientWidth\n };\n}\n\nfunction computeEdges(el, getPadding) {\n if (getPadding === void 0) { getPadding = false; }\n var computedStyle = window.getComputedStyle(el);\n var borderLeft = parseInt(computedStyle.borderLeftWidth, 10) || 0;\n var borderRight = parseInt(computedStyle.borderRightWidth, 10) || 0;\n var borderTop = parseInt(computedStyle.borderTopWidth, 10) || 0;\n var borderBottom = parseInt(computedStyle.borderBottomWidth, 10) || 0;\n var badScrollbarWidths = computeScrollbarWidthsForEl(el); // includes border!\n var scrollbarLeftRight = badScrollbarWidths.y - borderLeft - borderRight;\n var scrollbarBottom = badScrollbarWidths.x - borderTop - borderBottom;\n var res = {\n borderLeft: borderLeft,\n borderRight: borderRight,\n borderTop: borderTop,\n borderBottom: borderBottom,\n scrollbarBottom: scrollbarBottom,\n scrollbarLeft: 0,\n scrollbarRight: 0\n };\n if (getIsRtlScrollbarOnLeft() && computedStyle.direction === 'rtl') { // is the scrollbar on the left side?\n res.scrollbarLeft = scrollbarLeftRight;\n }\n else {\n res.scrollbarRight = scrollbarLeftRight;\n }\n if (getPadding) {\n res.paddingLeft = parseInt(computedStyle.paddingLeft, 10) || 0;\n res.paddingRight = parseInt(computedStyle.paddingRight, 10) || 0;\n res.paddingTop = parseInt(computedStyle.paddingTop, 10) || 0;\n res.paddingBottom = parseInt(computedStyle.paddingBottom, 10) || 0;\n }\n return res;\n}\nfunction computeInnerRect(el, goWithinPadding, doFromWindowViewport) {\n if (goWithinPadding === void 0) { goWithinPadding = false; }\n var outerRect = doFromWindowViewport ? el.getBoundingClientRect() : computeRect(el);\n var edges = computeEdges(el, goWithinPadding);\n var res = {\n left: outerRect.left + edges.borderLeft + edges.scrollbarLeft,\n right: outerRect.right - edges.borderRight - edges.scrollbarRight,\n top: outerRect.top + edges.borderTop,\n bottom: outerRect.bottom - edges.borderBottom - edges.scrollbarBottom\n };\n if (goWithinPadding) {\n res.left += edges.paddingLeft;\n res.right -= edges.paddingRight;\n res.top += edges.paddingTop;\n res.bottom -= edges.paddingBottom;\n }\n return res;\n}\nfunction computeRect(el) {\n var rect = el.getBoundingClientRect();\n return {\n left: rect.left + window.pageXOffset,\n top: rect.top + window.pageYOffset,\n right: rect.right + window.pageXOffset,\n bottom: rect.bottom + window.pageYOffset\n };\n}\nfunction computeHeightAndMargins(el) {\n return el.getBoundingClientRect().height + computeVMargins(el);\n}\nfunction computeVMargins(el) {\n var computed = window.getComputedStyle(el);\n return parseInt(computed.marginTop, 10) +\n parseInt(computed.marginBottom, 10);\n}\n// does not return window\nfunction getClippingParents(el) {\n var parents = [];\n while (el instanceof HTMLElement) { // will stop when gets to document or null\n var computedStyle = window.getComputedStyle(el);\n if (computedStyle.position === 'fixed') {\n break;\n }\n if ((/(auto|scroll)/).test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) {\n parents.push(el);\n }\n el = el.parentNode;\n }\n return parents;\n}\n\n// given a function that resolves a result asynchronously.\n// the function can either call passed-in success and failure callbacks,\n// or it can return a promise.\n// if you need to pass additional params to func, bind them first.\nfunction unpromisify(func, success, failure) {\n // guard against success/failure callbacks being called more than once\n // and guard against a promise AND callback being used together.\n var isResolved = false;\n var wrappedSuccess = function () {\n if (!isResolved) {\n isResolved = true;\n success.apply(this, arguments);\n }\n };\n var wrappedFailure = function () {\n if (!isResolved) {\n isResolved = true;\n if (failure) {\n failure.apply(this, arguments);\n }\n }\n };\n var res = func(wrappedSuccess, wrappedFailure);\n if (res && typeof res.then === 'function') {\n res.then(wrappedSuccess, wrappedFailure);\n }\n}\n\nvar Emitter = /** @class */ (function () {\n function Emitter() {\n this.handlers = {};\n this.thisContext = null;\n }\n Emitter.prototype.setThisContext = function (thisContext) {\n this.thisContext = thisContext;\n };\n Emitter.prototype.setOptions = function (options) {\n this.options = options;\n };\n Emitter.prototype.on = function (type, handler) {\n addToHash(this.handlers, type, handler);\n };\n Emitter.prototype.off = function (type, handler) {\n removeFromHash(this.handlers, type, handler);\n };\n Emitter.prototype.trigger = function (type) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var attachedHandlers = this.handlers[type] || [];\n var optionHandler = this.options && this.options[type];\n var handlers = [].concat(optionHandler || [], attachedHandlers);\n for (var _a = 0, handlers_1 = handlers; _a < handlers_1.length; _a++) {\n var handler = handlers_1[_a];\n handler.apply(this.thisContext, args);\n }\n };\n Emitter.prototype.hasHandlers = function (type) {\n return (this.handlers[type] && this.handlers[type].length) ||\n (this.options && this.options[type]);\n };\n return Emitter;\n}());\nfunction addToHash(hash, type, handler) {\n (hash[type] || (hash[type] = []))\n .push(handler);\n}\nfunction removeFromHash(hash, type, handler) {\n if (handler) {\n if (hash[type]) {\n hash[type] = hash[type].filter(function (func) {\n return func !== handler;\n });\n }\n }\n else {\n delete hash[type]; // remove all handler funcs for this type\n }\n}\n\n/*\nRecords offset information for a set of elements, relative to an origin element.\nCan record the left/right OR the top/bottom OR both.\nProvides methods for querying the cache by position.\n*/\nvar PositionCache = /** @class */ (function () {\n function PositionCache(originEl, els, isHorizontal, isVertical) {\n this.els = els;\n var originClientRect = this.originClientRect = originEl.getBoundingClientRect(); // relative to viewport top-left\n if (isHorizontal) {\n this.buildElHorizontals(originClientRect.left);\n }\n if (isVertical) {\n this.buildElVerticals(originClientRect.top);\n }\n }\n // Populates the left/right internal coordinate arrays\n PositionCache.prototype.buildElHorizontals = function (originClientLeft) {\n var lefts = [];\n var rights = [];\n for (var _i = 0, _a = this.els; _i < _a.length; _i++) {\n var el = _a[_i];\n var rect = el.getBoundingClientRect();\n lefts.push(rect.left - originClientLeft);\n rights.push(rect.right - originClientLeft);\n }\n this.lefts = lefts;\n this.rights = rights;\n };\n // Populates the top/bottom internal coordinate arrays\n PositionCache.prototype.buildElVerticals = function (originClientTop) {\n var tops = [];\n var bottoms = [];\n for (var _i = 0, _a = this.els; _i < _a.length; _i++) {\n var el = _a[_i];\n var rect = el.getBoundingClientRect();\n tops.push(rect.top - originClientTop);\n bottoms.push(rect.bottom - originClientTop);\n }\n this.tops = tops;\n this.bottoms = bottoms;\n };\n // Given a left offset (from document left), returns the index of the el that it horizontally intersects.\n // If no intersection is made, returns undefined.\n PositionCache.prototype.leftToIndex = function (leftPosition) {\n var lefts = this.lefts;\n var rights = this.rights;\n var len = lefts.length;\n var i;\n for (i = 0; i < len; i++) {\n if (leftPosition >= lefts[i] && leftPosition < rights[i]) {\n return i;\n }\n }\n };\n // Given a top offset (from document top), returns the index of the el that it vertically intersects.\n // If no intersection is made, returns undefined.\n PositionCache.prototype.topToIndex = function (topPosition) {\n var tops = this.tops;\n var bottoms = this.bottoms;\n var len = tops.length;\n var i;\n for (i = 0; i < len; i++) {\n if (topPosition >= tops[i] && topPosition < bottoms[i]) {\n return i;\n }\n }\n };\n // Gets the width of the element at the given index\n PositionCache.prototype.getWidth = function (leftIndex) {\n return this.rights[leftIndex] - this.lefts[leftIndex];\n };\n // Gets the height of the element at the given index\n PositionCache.prototype.getHeight = function (topIndex) {\n return this.bottoms[topIndex] - this.tops[topIndex];\n };\n return PositionCache;\n}());\n\n/*\nAn object for getting/setting scroll-related information for an element.\nInternally, this is done very differently for window versus DOM element,\nso this object serves as a common interface.\n*/\nvar ScrollController = /** @class */ (function () {\n function ScrollController() {\n }\n ScrollController.prototype.getMaxScrollTop = function () {\n return this.getScrollHeight() - this.getClientHeight();\n };\n ScrollController.prototype.getMaxScrollLeft = function () {\n return this.getScrollWidth() - this.getClientWidth();\n };\n ScrollController.prototype.canScrollVertically = function () {\n return this.getMaxScrollTop() > 0;\n };\n ScrollController.prototype.canScrollHorizontally = function () {\n return this.getMaxScrollLeft() > 0;\n };\n ScrollController.prototype.canScrollUp = function () {\n return this.getScrollTop() > 0;\n };\n ScrollController.prototype.canScrollDown = function () {\n return this.getScrollTop() < this.getMaxScrollTop();\n };\n ScrollController.prototype.canScrollLeft = function () {\n return this.getScrollLeft() > 0;\n };\n ScrollController.prototype.canScrollRight = function () {\n return this.getScrollLeft() < this.getMaxScrollLeft();\n };\n return ScrollController;\n}());\nvar ElementScrollController = /** @class */ (function (_super) {\n __extends(ElementScrollController, _super);\n function ElementScrollController(el) {\n var _this = _super.call(this) || this;\n _this.el = el;\n return _this;\n }\n ElementScrollController.prototype.getScrollTop = function () {\n return this.el.scrollTop;\n };\n ElementScrollController.prototype.getScrollLeft = function () {\n return this.el.scrollLeft;\n };\n ElementScrollController.prototype.setScrollTop = function (top) {\n this.el.scrollTop = top;\n };\n ElementScrollController.prototype.setScrollLeft = function (left) {\n this.el.scrollLeft = left;\n };\n ElementScrollController.prototype.getScrollWidth = function () {\n return this.el.scrollWidth;\n };\n ElementScrollController.prototype.getScrollHeight = function () {\n return this.el.scrollHeight;\n };\n ElementScrollController.prototype.getClientHeight = function () {\n return this.el.clientHeight;\n };\n ElementScrollController.prototype.getClientWidth = function () {\n return this.el.clientWidth;\n };\n return ElementScrollController;\n}(ScrollController));\nvar WindowScrollController = /** @class */ (function (_super) {\n __extends(WindowScrollController, _super);\n function WindowScrollController() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WindowScrollController.prototype.getScrollTop = function () {\n return window.pageYOffset;\n };\n WindowScrollController.prototype.getScrollLeft = function () {\n return window.pageXOffset;\n };\n WindowScrollController.prototype.setScrollTop = function (n) {\n window.scroll(window.pageXOffset, n);\n };\n WindowScrollController.prototype.setScrollLeft = function (n) {\n window.scroll(n, window.pageYOffset);\n };\n WindowScrollController.prototype.getScrollWidth = function () {\n return document.documentElement.scrollWidth;\n };\n WindowScrollController.prototype.getScrollHeight = function () {\n return document.documentElement.scrollHeight;\n };\n WindowScrollController.prototype.getClientHeight = function () {\n return document.documentElement.clientHeight;\n };\n WindowScrollController.prototype.getClientWidth = function () {\n return document.documentElement.clientWidth;\n };\n return WindowScrollController;\n}(ScrollController));\n\nvar Theme = /** @class */ (function () {\n function Theme(calendarOptions) {\n if (this.iconOverrideOption) {\n this.setIconOverride(calendarOptions[this.iconOverrideOption]);\n }\n }\n Theme.prototype.setIconOverride = function (iconOverrideHash) {\n var iconClassesCopy;\n var buttonName;\n if (typeof iconOverrideHash === 'object' && iconOverrideHash) { // non-null object\n iconClassesCopy = __assign({}, this.iconClasses);\n for (buttonName in iconOverrideHash) {\n iconClassesCopy[buttonName] = this.applyIconOverridePrefix(iconOverrideHash[buttonName]);\n }\n this.iconClasses = iconClassesCopy;\n }\n else if (iconOverrideHash === false) {\n this.iconClasses = {};\n }\n };\n Theme.prototype.applyIconOverridePrefix = function (className) {\n var prefix = this.iconOverridePrefix;\n if (prefix && className.indexOf(prefix) !== 0) { // if not already present\n className = prefix + className;\n }\n return className;\n };\n Theme.prototype.getClass = function (key) {\n return this.classes[key] || '';\n };\n Theme.prototype.getIconClass = function (buttonName, isRtl) {\n var className;\n if (isRtl && this.rtlIconClasses) {\n className = this.rtlIconClasses[buttonName] || this.iconClasses[buttonName];\n }\n else {\n className = this.iconClasses[buttonName];\n }\n if (className) {\n return this.baseIconClass + ' ' + className;\n }\n return '';\n };\n Theme.prototype.getCustomButtonIconClass = function (customButtonProps) {\n var className;\n if (this.iconOverrideCustomButtonOption) {\n className = customButtonProps[this.iconOverrideCustomButtonOption];\n if (className) {\n return this.baseIconClass + ' ' + this.applyIconOverridePrefix(className);\n }\n }\n return '';\n };\n return Theme;\n}());\nTheme.prototype.classes = {};\nTheme.prototype.iconClasses = {};\nTheme.prototype.baseIconClass = '';\nTheme.prototype.iconOverridePrefix = '';\n\nvar ScrollResponder = /** @class */ (function () {\n function ScrollResponder(execFunc, emitter, scrollTime) {\n var _this = this;\n this.execFunc = execFunc;\n this.emitter = emitter;\n this.scrollTime = scrollTime;\n this.handleScrollRequest = function (request) {\n _this.queuedRequest = __assign({}, _this.queuedRequest || {}, request);\n _this.drain();\n };\n emitter.on('_scrollRequest', this.handleScrollRequest);\n this.fireInitialScroll();\n }\n ScrollResponder.prototype.detach = function () {\n this.emitter.off('_scrollRequest', this.handleScrollRequest);\n };\n ScrollResponder.prototype.update = function (isDatesNew) {\n if (isDatesNew) {\n this.fireInitialScroll(); // will drain\n }\n else {\n this.drain();\n }\n };\n ScrollResponder.prototype.fireInitialScroll = function () {\n this.handleScrollRequest({\n time: this.scrollTime\n });\n };\n ScrollResponder.prototype.drain = function () {\n if (this.queuedRequest && this.execFunc(this.queuedRequest)) {\n this.queuedRequest = null;\n }\n };\n return ScrollResponder;\n}());\n\nvar ViewContextType = createContext({}); // for Components\nfunction buildViewContext(viewSpec, viewApi, viewOptions, dateProfileGenerator, dateEnv, theme, pluginHooks, dispatch, getCurrentData, emitter, calendarApi, registerInteractiveComponent, unregisterInteractiveComponent) {\n return {\n dateEnv: dateEnv,\n options: viewOptions,\n pluginHooks: pluginHooks,\n emitter: emitter,\n dispatch: dispatch,\n getCurrentData: getCurrentData,\n calendarApi: calendarApi,\n viewSpec: viewSpec,\n viewApi: viewApi,\n dateProfileGenerator: dateProfileGenerator,\n theme: theme,\n isRtl: viewOptions.direction === 'rtl',\n addResizeHandler: function (handler) {\n emitter.on('_resize', handler);\n },\n removeResizeHandler: function (handler) {\n emitter.off('_resize', handler);\n },\n createScrollResponder: function (execFunc) {\n return new ScrollResponder(execFunc, emitter, createDuration(viewOptions.scrollTime));\n },\n registerInteractiveComponent: registerInteractiveComponent,\n unregisterInteractiveComponent: unregisterInteractiveComponent\n };\n}\n\nvar PureComponent = /** @class */ (function (_super) {\n __extends(PureComponent, _super);\n function PureComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PureComponent.prototype.shouldComponentUpdate = function (nextProps, nextState) {\n if (this.debug) {\n console.log(getUnequalProps(nextProps, this.props), getUnequalProps(nextState, this.state));\n }\n return !compareObjs(this.props, nextProps, this.propEquality) ||\n !compareObjs(this.state, nextState, this.stateEquality);\n };\n PureComponent.addPropsEquality = addPropsEquality;\n PureComponent.addStateEquality = addStateEquality;\n PureComponent.contextType = ViewContextType;\n return PureComponent;\n}(Component));\nPureComponent.prototype.propEquality = {};\nPureComponent.prototype.stateEquality = {};\nvar BaseComponent = /** @class */ (function (_super) {\n __extends(BaseComponent, _super);\n function BaseComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BaseComponent.contextType = ViewContextType;\n return BaseComponent;\n}(PureComponent));\nfunction addPropsEquality(propEquality) {\n var hash = Object.create(this.prototype.propEquality);\n __assign(hash, propEquality);\n this.prototype.propEquality = hash;\n}\nfunction addStateEquality(stateEquality) {\n var hash = Object.create(this.prototype.stateEquality);\n __assign(hash, stateEquality);\n this.prototype.stateEquality = hash;\n}\n// use other one\nfunction setRef(ref, current) {\n if (typeof ref === 'function') {\n ref(current);\n }\n else if (ref) {\n // see https://github.com/facebook/react/issues/13029\n ref.current = current;\n }\n}\n\nfunction reduceEventStore(eventStore, action, eventSources, dateProfile, context) {\n switch (action.type) {\n case 'RECEIVE_EVENTS': // raw\n return receiveRawEvents(eventStore, eventSources[action.sourceId], action.fetchId, action.fetchRange, action.rawEvents, context);\n case 'ADD_EVENTS': // already parsed, but not expanded\n return addEvent(eventStore, action.eventStore, // new ones\n dateProfile ? dateProfile.activeRange : null, context);\n case 'MERGE_EVENTS': // already parsed and expanded\n return mergeEventStores(eventStore, action.eventStore);\n case 'PREV': // TODO: how do we track all actions that affect dateProfile :(\n case 'NEXT':\n case 'CHANGE_DATE':\n case 'CHANGE_VIEW_TYPE':\n if (dateProfile) {\n return expandRecurring(eventStore, dateProfile.activeRange, context);\n }\n else {\n return eventStore;\n }\n case 'REMOVE_EVENTS':\n return excludeSubEventStore(eventStore, action.eventStore);\n case 'REMOVE_EVENT_SOURCE':\n return excludeEventsBySourceId(eventStore, action.sourceId);\n case 'REMOVE_ALL_EVENT_SOURCES':\n return filterEventStoreDefs(eventStore, function (eventDef) {\n return !eventDef.sourceId; // only keep events with no source id\n });\n case 'REMOVE_ALL_EVENTS':\n return createEmptyEventStore();\n default:\n return eventStore;\n }\n}\nfunction receiveRawEvents(eventStore, eventSource, fetchId, fetchRange, rawEvents, context) {\n if (eventSource && // not already removed\n fetchId === eventSource.latestFetchId // TODO: wish this logic was always in event-sources\n ) {\n var subset = parseEvents(transformRawEvents(rawEvents, eventSource, context), eventSource, context);\n if (fetchRange) {\n subset = expandRecurring(subset, fetchRange, context);\n }\n return mergeEventStores(excludeEventsBySourceId(eventStore, eventSource.sourceId), subset);\n }\n return eventStore;\n}\nfunction transformRawEvents(rawEvents, eventSource, context) {\n var calEachTransform = context.options.eventDataTransform;\n var sourceEachTransform = eventSource ? eventSource.eventDataTransform : null;\n if (sourceEachTransform) {\n rawEvents = transformEachRawEvent(rawEvents, sourceEachTransform);\n }\n if (calEachTransform) {\n rawEvents = transformEachRawEvent(rawEvents, calEachTransform);\n }\n return rawEvents;\n}\nfunction transformEachRawEvent(rawEvents, func) {\n var refinedEvents;\n if (!func) {\n refinedEvents = rawEvents;\n }\n else {\n refinedEvents = [];\n for (var _i = 0, rawEvents_1 = rawEvents; _i < rawEvents_1.length; _i++) {\n var rawEvent = rawEvents_1[_i];\n var refinedEvent = func(rawEvent);\n if (refinedEvent) {\n refinedEvents.push(refinedEvent);\n }\n else if (refinedEvent == null) {\n refinedEvents.push(rawEvent);\n } // if a different falsy value, do nothing\n }\n }\n return refinedEvents;\n}\nfunction addEvent(eventStore, subset, expandRange, context) {\n if (expandRange) {\n subset = expandRecurring(subset, expandRange, context);\n }\n return mergeEventStores(eventStore, subset);\n}\nfunction rezoneEventStoreDates(eventStore, oldDateEnv, newDateEnv) {\n var defs = eventStore.defs;\n var instances = mapHash(eventStore.instances, function (instance) {\n var def = defs[instance.defId];\n if (def.allDay || def.recurringDef) {\n return instance; // isn't dependent on timezone\n }\n else {\n return __assign(__assign({}, instance), { range: {\n start: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.start, instance.forcedStartTzo)),\n end: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.end, instance.forcedEndTzo))\n }, forcedStartTzo: newDateEnv.canComputeOffset ? null : instance.forcedStartTzo, forcedEndTzo: newDateEnv.canComputeOffset ? null : instance.forcedEndTzo });\n }\n });\n return { defs: defs, instances: instances };\n}\nfunction excludeEventsBySourceId(eventStore, sourceId) {\n return filterEventStoreDefs(eventStore, function (eventDef) {\n return eventDef.sourceId !== sourceId;\n });\n}\n// QUESTION: why not just return instances? do a general object-property-exclusion util\nfunction excludeInstances(eventStore, removals) {\n return {\n defs: eventStore.defs,\n instances: filterHash(eventStore.instances, function (instance) {\n return !removals[instance.instanceId];\n })\n };\n}\n\n// high-level segmenting-aware tester functions\n// ------------------------------------------------------------------------------------------------------------------------\nfunction isInteractionValid(interaction, context) {\n return isNewPropsValid({ eventDrag: interaction }, context); // HACK: the eventDrag props is used for ALL interactions\n}\nfunction isDateSelectionValid(dateSelection, context) {\n return isNewPropsValid({ dateSelection: dateSelection }, context);\n}\nfunction isNewPropsValid(newProps, context) {\n var calendarState = context.getCurrentData();\n var props = __assign({ businessHours: calendarState.businessHours, dateSelection: '', eventStore: calendarState.eventStore, eventUiBases: calendarState.eventUiBases, eventSelection: '', eventDrag: null, eventResize: null }, newProps);\n return (context.pluginHooks.isPropsValid || isPropsValid)(props, context);\n}\nfunction isPropsValid(state, context, dateSpanMeta, filterConfig) {\n if (dateSpanMeta === void 0) { dateSpanMeta = {}; }\n if (state.eventDrag && !isInteractionPropsValid(state, context, dateSpanMeta, filterConfig)) {\n return false;\n }\n if (state.dateSelection && !isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig)) {\n return false;\n }\n return true;\n}\n// Moving Event Validation\n// ------------------------------------------------------------------------------------------------------------------------\nfunction isInteractionPropsValid(state, context, dateSpanMeta, filterConfig) {\n var currentState = context.getCurrentData();\n var interaction = state.eventDrag; // HACK: the eventDrag props is used for ALL interactions\n var subjectEventStore = interaction.mutatedEvents;\n var subjectDefs = subjectEventStore.defs;\n var subjectInstances = subjectEventStore.instances;\n var subjectConfigs = compileEventUis(subjectDefs, interaction.isEvent ?\n state.eventUiBases :\n { '': currentState.selectionConfig } // if not a real event, validate as a selection\n );\n if (filterConfig) {\n subjectConfigs = mapHash(subjectConfigs, filterConfig);\n }\n var otherEventStore = excludeInstances(state.eventStore, interaction.affectedEvents.instances); // exclude the subject events. TODO: exclude defs too?\n var otherDefs = otherEventStore.defs;\n var otherInstances = otherEventStore.instances;\n var otherConfigs = compileEventUis(otherDefs, state.eventUiBases);\n for (var subjectInstanceId in subjectInstances) {\n var subjectInstance = subjectInstances[subjectInstanceId];\n var subjectRange = subjectInstance.range;\n var subjectConfig = subjectConfigs[subjectInstance.defId];\n var subjectDef = subjectDefs[subjectInstance.defId];\n // constraint\n if (!allConstraintsPass(subjectConfig.constraints, subjectRange, otherEventStore, state.businessHours, context)) {\n return false;\n }\n // overlap\n var eventOverlap = context.options.eventOverlap;\n var eventOverlapFunc = typeof eventOverlap === 'function' ? eventOverlap : null;\n for (var otherInstanceId in otherInstances) {\n var otherInstance = otherInstances[otherInstanceId];\n // intersect! evaluate\n if (rangesIntersect(subjectRange, otherInstance.range)) {\n var otherOverlap = otherConfigs[otherInstance.defId].overlap;\n // consider the other event's overlap. only do this if the subject event is a \"real\" event\n if (otherOverlap === false && interaction.isEvent) {\n return false;\n }\n if (subjectConfig.overlap === false) {\n return false;\n }\n if (eventOverlapFunc && !eventOverlapFunc(new EventApi(context, otherDefs[otherInstance.defId], otherInstance), // still event\n new EventApi(context, subjectDef, subjectInstance) // moving event\n )) {\n return false;\n }\n }\n }\n // allow (a function)\n var calendarEventStore = currentState.eventStore; // need global-to-calendar, not local to component (splittable)state\n for (var _i = 0, _a = subjectConfig.allows; _i < _a.length; _i++) {\n var subjectAllow = _a[_i];\n var subjectDateSpan = __assign(__assign({}, dateSpanMeta), { range: subjectInstance.range, allDay: subjectDef.allDay });\n var origDef = calendarEventStore.defs[subjectDef.defId];\n var origInstance = calendarEventStore.instances[subjectInstanceId];\n var eventApi = void 0;\n if (origDef) { // was previously in the calendar\n eventApi = new EventApi(context, origDef, origInstance);\n }\n else { // was an external event\n eventApi = new EventApi(context, subjectDef); // no instance, because had no dates\n }\n if (!subjectAllow(buildDateSpanApiWithContext(subjectDateSpan, context), eventApi)) {\n return false;\n }\n }\n }\n return true;\n}\n// Date Selection Validation\n// ------------------------------------------------------------------------------------------------------------------------\nfunction isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig) {\n var relevantEventStore = state.eventStore;\n var relevantDefs = relevantEventStore.defs;\n var relevantInstances = relevantEventStore.instances;\n var selection = state.dateSelection;\n var selectionRange = selection.range;\n var selectionConfig = context.getCurrentData().selectionConfig;\n if (filterConfig) {\n selectionConfig = filterConfig(selectionConfig);\n }\n // constraint\n if (!allConstraintsPass(selectionConfig.constraints, selectionRange, relevantEventStore, state.businessHours, context)) {\n return false;\n }\n // overlap\n var selectOverlap = context.options.selectOverlap;\n var selectOverlapFunc = typeof selectOverlap === 'function' ? selectOverlap : null;\n for (var relevantInstanceId in relevantInstances) {\n var relevantInstance = relevantInstances[relevantInstanceId];\n // intersect! evaluate\n if (rangesIntersect(selectionRange, relevantInstance.range)) {\n if (selectionConfig.overlap === false) {\n return false;\n }\n if (selectOverlapFunc && !selectOverlapFunc(new EventApi(context, relevantDefs[relevantInstance.defId], relevantInstance), null)) {\n return false;\n }\n }\n }\n // allow (a function)\n for (var _i = 0, _a = selectionConfig.allows; _i < _a.length; _i++) {\n var selectionAllow = _a[_i];\n var fullDateSpan = __assign(__assign({}, dateSpanMeta), selection);\n if (!selectionAllow(buildDateSpanApiWithContext(fullDateSpan, context), null)) {\n return false;\n }\n }\n return true;\n}\n// Constraint Utils\n// ------------------------------------------------------------------------------------------------------------------------\nfunction allConstraintsPass(constraints, subjectRange, otherEventStore, businessHoursUnexpanded, context) {\n for (var _i = 0, constraints_1 = constraints; _i < constraints_1.length; _i++) {\n var constraint = constraints_1[_i];\n if (!anyRangesContainRange(constraintToRanges(constraint, subjectRange, otherEventStore, businessHoursUnexpanded, context), subjectRange)) {\n return false;\n }\n }\n return true;\n}\nfunction constraintToRanges(constraint, subjectRange, // for expanding a recurring constraint, or expanding business hours\notherEventStore, // for if constraint is an even group ID\nbusinessHoursUnexpanded, // for if constraint is 'businessHours'\ncontext // for expanding businesshours\n) {\n if (constraint === 'businessHours') {\n return eventStoreToRanges(expandRecurring(businessHoursUnexpanded, subjectRange, context));\n }\n else if (typeof constraint === 'string') { // an group ID\n return eventStoreToRanges(filterEventStoreDefs(otherEventStore, function (eventDef) {\n return eventDef.groupId === constraint;\n }));\n }\n else if (typeof constraint === 'object' && constraint) { // non-null object\n return eventStoreToRanges(expandRecurring(constraint, subjectRange, context));\n }\n return []; // if it's false\n}\n// TODO: move to event-store file?\nfunction eventStoreToRanges(eventStore) {\n var instances = eventStore.instances;\n var ranges = [];\n for (var instanceId in instances) {\n ranges.push(instances[instanceId].range);\n }\n return ranges;\n}\n// TODO: move to geom file?\nfunction anyRangesContainRange(outerRanges, innerRange) {\n for (var _i = 0, outerRanges_1 = outerRanges; _i < outerRanges_1.length; _i++) {\n var outerRange = outerRanges_1[_i];\n if (rangeContainsRange(outerRange, innerRange)) {\n return true;\n }\n }\n return false;\n}\n\n/*\nan INTERACTABLE date component\n\nPURPOSES:\n- hook up to fg, fill, and mirror renderers\n- interface for dragging and hits\n*/\nvar DateComponent = /** @class */ (function (_super) {\n __extends(DateComponent, _super);\n function DateComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.uid = guid();\n return _this;\n }\n // Hit System\n // -----------------------------------------------------------------------------------------------------------------\n DateComponent.prototype.prepareHits = function () {\n };\n DateComponent.prototype.queryHit = function (positionLeft, positionTop, elWidth, elHeight) {\n return null; // this should be abstract\n };\n // Validation\n // -----------------------------------------------------------------------------------------------------------------\n DateComponent.prototype.isInteractionValid = function (interaction) {\n var dateProfile = this.props.dateProfile; // HACK\n var instances = interaction.mutatedEvents.instances;\n if (dateProfile) { // HACK for MorePopover\n for (var instanceId in instances) {\n if (!rangeContainsRange(dateProfile.validRange, instances[instanceId].range)) {\n return false;\n }\n }\n }\n return isInteractionValid(interaction, this.context);\n };\n DateComponent.prototype.isDateSelectionValid = function (selection) {\n var dateProfile = this.props.dateProfile; // HACK\n if (dateProfile && // HACK for MorePopover\n !rangeContainsRange(dateProfile.validRange, selection.range)) {\n return false;\n }\n return isDateSelectionValid(selection, this.context);\n };\n // Pointer Interaction Utils\n // -----------------------------------------------------------------------------------------------------------------\n DateComponent.prototype.isValidSegDownEl = function (el) {\n return !this.props.eventDrag && // HACK\n !this.props.eventResize && // HACK\n !elementClosest(el, '.fc-event-mirror') &&\n (this.isPopover() || !this.isInPopover(el));\n // ^above line ensures we don't detect a seg interaction within a nested component.\n // it's a HACK because it only supports a popover as the nested component.\n };\n DateComponent.prototype.isValidDateDownEl = function (el) {\n return !elementClosest(el, '.fc-event:not(.fc-bg-event)') &&\n !elementClosest(el, '.fc-daygrid-more-link') && // a \"more..\" link\n !elementClosest(el, 'a[data-navlink]') && // a clickable nav link\n !this.isInPopover(el);\n };\n DateComponent.prototype.isPopover = function () {\n return false;\n };\n DateComponent.prototype.isInPopover = function (el) {\n return Boolean(elementClosest(el, '.fc-popover'));\n };\n return DateComponent;\n}(BaseComponent));\n\n// TODO: easier way to add new hooks? need to update a million things\nfunction createPlugin(input) {\n return {\n id: guid(),\n deps: input.deps || [],\n reducers: input.reducers || [],\n contextInit: [].concat(input.contextInit || []),\n eventRefiners: input.eventRefiners || {},\n eventDefMemberAdders: input.eventDefMemberAdders || [],\n eventSourceRefiners: input.eventSourceRefiners || {},\n isDraggableTransformers: input.isDraggableTransformers || [],\n eventDragMutationMassagers: input.eventDragMutationMassagers || [],\n eventDefMutationAppliers: input.eventDefMutationAppliers || [],\n dateSelectionTransformers: input.dateSelectionTransformers || [],\n datePointTransforms: input.datePointTransforms || [],\n dateSpanTransforms: input.dateSpanTransforms || [],\n views: input.views || {},\n viewPropsTransformers: input.viewPropsTransformers || [],\n isPropsValid: input.isPropsValid || null,\n externalDefTransforms: input.externalDefTransforms || [],\n eventResizeJoinTransforms: input.eventResizeJoinTransforms || [],\n viewContainerAppends: input.viewContainerAppends || [],\n eventDropTransformers: input.eventDropTransformers || [],\n componentInteractions: input.componentInteractions || [],\n calendarInteractions: input.calendarInteractions || [],\n themeClasses: input.themeClasses || {},\n eventSourceDefs: input.eventSourceDefs || [],\n cmdFormatter: input.cmdFormatter,\n recurringTypes: input.recurringTypes || [],\n namedTimeZonedImpl: input.namedTimeZonedImpl,\n initialView: input.initialView || '',\n elementDraggingImpl: input.elementDraggingImpl,\n optionChangeHandlers: input.optionChangeHandlers || {},\n scrollGridImpl: input.scrollGridImpl || null,\n contentTypeHandlers: input.contentTypeHandlers || {},\n listenerRefiners: input.listenerRefiners || {},\n optionRefiners: input.optionRefiners || {},\n propSetHandlers: input.propSetHandlers || {}\n };\n}\nfunction buildPluginHooks(pluginDefs, globalDefs) {\n var isAdded = {};\n var hooks = {\n reducers: [],\n contextInit: [],\n eventRefiners: {},\n eventDefMemberAdders: [],\n eventSourceRefiners: {},\n isDraggableTransformers: [],\n eventDragMutationMassagers: [],\n eventDefMutationAppliers: [],\n dateSelectionTransformers: [],\n datePointTransforms: [],\n dateSpanTransforms: [],\n views: {},\n viewPropsTransformers: [],\n isPropsValid: null,\n externalDefTransforms: [],\n eventResizeJoinTransforms: [],\n viewContainerAppends: [],\n eventDropTransformers: [],\n componentInteractions: [],\n calendarInteractions: [],\n themeClasses: {},\n eventSourceDefs: [],\n cmdFormatter: null,\n recurringTypes: [],\n namedTimeZonedImpl: null,\n initialView: '',\n elementDraggingImpl: null,\n optionChangeHandlers: {},\n scrollGridImpl: null,\n contentTypeHandlers: {},\n listenerRefiners: {},\n optionRefiners: {},\n propSetHandlers: {}\n };\n function addDefs(defs) {\n for (var _i = 0, defs_1 = defs; _i < defs_1.length; _i++) {\n var def = defs_1[_i];\n if (!isAdded[def.id]) {\n isAdded[def.id] = true;\n addDefs(def.deps);\n hooks = combineHooks(hooks, def);\n }\n }\n }\n if (pluginDefs) {\n addDefs(pluginDefs);\n }\n addDefs(globalDefs);\n return hooks;\n}\nfunction buildBuildPluginHooks() {\n var currentOverrideDefs = [];\n var currentGlobalDefs = [];\n var currentHooks;\n return function (overrideDefs, globalDefs) {\n if (!currentHooks || !isArraysEqual(overrideDefs, currentOverrideDefs) || !isArraysEqual(globalDefs, currentGlobalDefs)) {\n currentHooks = buildPluginHooks(overrideDefs, globalDefs);\n }\n currentOverrideDefs = overrideDefs;\n currentGlobalDefs = globalDefs;\n return currentHooks;\n };\n}\nfunction combineHooks(hooks0, hooks1) {\n return {\n reducers: hooks0.reducers.concat(hooks1.reducers),\n contextInit: hooks0.contextInit.concat(hooks1.contextInit),\n eventRefiners: __assign(__assign({}, hooks0.eventRefiners), hooks1.eventRefiners),\n eventDefMemberAdders: hooks0.eventDefMemberAdders.concat(hooks1.eventDefMemberAdders),\n eventSourceRefiners: __assign(__assign({}, hooks0.eventSourceRefiners), hooks1.eventSourceRefiners),\n isDraggableTransformers: hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers),\n eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers),\n eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers),\n dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers),\n datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms),\n dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms),\n views: __assign(__assign({}, hooks0.views), hooks1.views),\n viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers),\n isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid,\n externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms),\n eventResizeJoinTransforms: hooks0.eventResizeJoinTransforms.concat(hooks1.eventResizeJoinTransforms),\n viewContainerAppends: hooks0.viewContainerAppends.concat(hooks1.viewContainerAppends),\n eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers),\n calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions),\n componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions),\n themeClasses: __assign(__assign({}, hooks0.themeClasses), hooks1.themeClasses),\n eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs),\n cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter,\n recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes),\n namedTimeZonedImpl: hooks1.namedTimeZonedImpl || hooks0.namedTimeZonedImpl,\n initialView: hooks0.initialView || hooks1.initialView,\n elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl,\n optionChangeHandlers: __assign(__assign({}, hooks0.optionChangeHandlers), hooks1.optionChangeHandlers),\n scrollGridImpl: hooks1.scrollGridImpl || hooks0.scrollGridImpl,\n contentTypeHandlers: __assign(__assign({}, hooks0.contentTypeHandlers), hooks1.contentTypeHandlers),\n listenerRefiners: __assign(__assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners),\n optionRefiners: __assign(__assign({}, hooks0.optionRefiners), hooks1.optionRefiners),\n propSetHandlers: __assign(__assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers)\n };\n}\n\nvar StandardTheme = /** @class */ (function (_super) {\n __extends(StandardTheme, _super);\n function StandardTheme() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return StandardTheme;\n}(Theme));\nStandardTheme.prototype.classes = {\n root: 'fc-theme-standard',\n tableCellShaded: 'fc-cell-shaded',\n buttonGroup: 'fc-button-group',\n button: 'fc-button fc-button-primary',\n buttonActive: 'fc-button-active'\n};\nStandardTheme.prototype.baseIconClass = 'fc-icon';\nStandardTheme.prototype.iconClasses = {\n close: 'fc-icon-x',\n prev: 'fc-icon-chevron-left',\n next: 'fc-icon-chevron-right',\n prevYear: 'fc-icon-chevrons-left',\n nextYear: 'fc-icon-chevrons-right'\n};\nStandardTheme.prototype.rtlIconClasses = {\n prev: 'fc-icon-chevron-right',\n next: 'fc-icon-chevron-left',\n prevYear: 'fc-icon-chevrons-right',\n nextYear: 'fc-icon-chevrons-left'\n};\nStandardTheme.prototype.iconOverrideOption = 'buttonIcons'; // TODO: make TS-friendly\nStandardTheme.prototype.iconOverrideCustomButtonOption = 'icon';\nStandardTheme.prototype.iconOverridePrefix = 'fc-icon-';\n\nfunction compileViewDefs(defaultConfigs, overrideConfigs) {\n var hash = {};\n var viewType;\n for (viewType in defaultConfigs) {\n ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs);\n }\n for (viewType in overrideConfigs) {\n ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs);\n }\n return hash;\n}\nfunction ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs) {\n if (hash[viewType]) {\n return hash[viewType];\n }\n var viewDef = buildViewDef(viewType, hash, defaultConfigs, overrideConfigs);\n if (viewDef) {\n hash[viewType] = viewDef;\n }\n return viewDef;\n}\nfunction buildViewDef(viewType, hash, defaultConfigs, overrideConfigs) {\n var defaultConfig = defaultConfigs[viewType];\n var overrideConfig = overrideConfigs[viewType];\n var queryProp = function (name) {\n return (defaultConfig && defaultConfig[name] !== null) ? defaultConfig[name] :\n ((overrideConfig && overrideConfig[name] !== null) ? overrideConfig[name] : null);\n };\n var theComponent = queryProp('component');\n var superType = queryProp('superType');\n var superDef = null;\n if (superType) {\n if (superType === viewType) {\n throw new Error('Can\\'t have a custom view type that references itself');\n }\n superDef = ensureViewDef(superType, hash, defaultConfigs, overrideConfigs);\n }\n if (!theComponent && superDef) {\n theComponent = superDef.component;\n }\n if (!theComponent) {\n return null; // don't throw a warning, might be settings for a single-unit view\n }\n return {\n type: viewType,\n component: theComponent,\n defaults: __assign(__assign({}, (superDef ? superDef.defaults : {})), (defaultConfig ? defaultConfig.rawOptions : {})),\n overrides: __assign(__assign({}, (superDef ? superDef.overrides : {})), (overrideConfig ? overrideConfig.rawOptions : {}))\n };\n}\n\n// NOTE: in JSX, you should always use this class with arg. otherwise, will default to any???\nvar RenderHook = /** @class */ (function (_super) {\n __extends(RenderHook, _super);\n function RenderHook() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.rootElRef = createRef();\n _this.handleRootEl = function (el) {\n setRef(_this.rootElRef, el);\n if (_this.props.elRef) {\n setRef(_this.props.elRef, el);\n }\n };\n return _this;\n }\n RenderHook.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var hookProps = props.hookProps;\n return (createElement(MountHook, { hookProps: hookProps, didMount: props.didMount, willUnmount: props.willUnmount, elRef: this.handleRootEl }, function (rootElRef) { return (createElement(ContentHook, { hookProps: hookProps, content: props.content, defaultContent: props.defaultContent, backupElRef: _this.rootElRef }, function (innerElRef, innerContent) { return props.children(rootElRef, normalizeClassNames(props.classNames, hookProps), innerElRef, innerContent); })); }));\n };\n return RenderHook;\n}(BaseComponent));\n// for forcing rerender of components that use the ContentHook\nvar CustomContentRenderContext = createContext(0);\nvar ContentHook = /** @class */ (function (_super) {\n __extends(ContentHook, _super);\n function ContentHook() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.innerElRef = createRef();\n return _this;\n }\n ContentHook.prototype.render = function () {\n var _this = this;\n return (createElement(CustomContentRenderContext.Consumer, null, function () { return (_this.props.children(_this.innerElRef, _this.renderInnerContent())); }));\n };\n ContentHook.prototype.componentDidMount = function () {\n this.updateCustomContent();\n };\n ContentHook.prototype.componentDidUpdate = function () {\n this.updateCustomContent();\n };\n ContentHook.prototype.renderInnerContent = function () {\n var contentTypeHandlers = this.context.pluginHooks.contentTypeHandlers;\n var _a = this, props = _a.props, customContentInfo = _a.customContentInfo;\n var rawVal = props.content;\n var innerContent = normalizeContent(rawVal, props.hookProps);\n var innerContentVDom = null;\n if (innerContent === undefined) { // use the default\n innerContent = normalizeContent(props.defaultContent, props.hookProps);\n }\n if (innerContent !== undefined) { // we allow custom content handlers to return nothing\n if (customContentInfo) {\n customContentInfo.contentVal = innerContent[customContentInfo.contentKey];\n }\n else if (typeof innerContent === 'object') {\n // look for a prop that would indicate a custom content handler is needed\n for (var contentKey in contentTypeHandlers) {\n if (innerContent[contentKey] !== undefined) {\n customContentInfo = this.customContentInfo = {\n contentKey: contentKey,\n contentVal: innerContent[contentKey],\n handler: contentTypeHandlers[contentKey]()\n };\n break;\n }\n }\n }\n if (customContentInfo) {\n innerContentVDom = []; // signal that something was specified\n }\n else {\n innerContentVDom = innerContent; // assume a [p]react vdom node. use it\n }\n }\n return innerContentVDom;\n };\n ContentHook.prototype.updateCustomContent = function () {\n if (this.customContentInfo) {\n this.customContentInfo.handler(this.innerElRef.current || this.props.backupElRef.current, // the element to render into\n this.customContentInfo.contentVal);\n }\n };\n return ContentHook;\n}(BaseComponent));\nvar MountHook = /** @class */ (function (_super) {\n __extends(MountHook, _super);\n function MountHook() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handleRootEl = function (rootEl) {\n _this.rootEl = rootEl;\n if (_this.props.elRef) {\n setRef(_this.props.elRef, rootEl);\n }\n };\n return _this;\n }\n MountHook.prototype.render = function () {\n return this.props.children(this.handleRootEl);\n };\n MountHook.prototype.componentDidMount = function () {\n var callback = this.props.didMount;\n callback && callback(__assign(__assign({}, this.props.hookProps), { el: this.rootEl }));\n };\n MountHook.prototype.componentWillUnmount = function () {\n var callback = this.props.willUnmount;\n callback && callback(__assign(__assign({}, this.props.hookProps), { el: this.rootEl }));\n };\n return MountHook;\n}(BaseComponent));\nfunction buildClassNameNormalizer() {\n var currentGenerator;\n var currentHookProps;\n var currentClassNames = [];\n return function (generator, hookProps) {\n if (!currentHookProps || !isPropsEqual(currentHookProps, hookProps) || generator !== currentGenerator) {\n currentGenerator = generator;\n currentHookProps = hookProps;\n currentClassNames = normalizeClassNames(generator, hookProps);\n }\n return currentClassNames;\n };\n}\nfunction normalizeClassNames(classNames, hookProps) {\n if (typeof classNames === 'function') {\n classNames = classNames(hookProps);\n }\n return parseClassNames(classNames);\n}\nfunction normalizeContent(input, hookProps) {\n if (typeof input === 'function') {\n return input(hookProps, createElement); // give the function the vdom-creation func\n }\n else {\n return input;\n }\n}\n\nvar ViewRoot = /** @class */ (function (_super) {\n __extends(ViewRoot, _super);\n function ViewRoot() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.normalizeClassNames = buildClassNameNormalizer();\n return _this;\n }\n ViewRoot.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var options = context.options;\n var hookProps = { view: context.viewApi };\n var customClassNames = this.normalizeClassNames(options.viewClassNames, hookProps);\n return (createElement(MountHook, { hookProps: hookProps, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount, elRef: props.elRef }, function (rootElRef) { return props.children(rootElRef, [\"fc-\" + props.viewSpec.type + \"-view\", 'fc-view'].concat(customClassNames)); }));\n };\n return ViewRoot;\n}(BaseComponent));\n\nfunction parseViewConfigs(inputs) {\n return mapHash(inputs, parseViewConfig);\n}\nfunction parseViewConfig(input) {\n var rawOptions = typeof input === 'function' ?\n { component: input } :\n input;\n var component = rawOptions.component;\n if (rawOptions.content) {\n component = createViewHookComponent(rawOptions);\n // TODO: remove content/classNames/didMount/etc from options?\n }\n return {\n superType: rawOptions.type,\n component: component,\n rawOptions: rawOptions // includes type and component too :(\n };\n}\nfunction createViewHookComponent(options) {\n return function (viewProps) {\n return (createElement(ViewContextType.Consumer, null, function (context) { return (createElement(ViewRoot, { viewSpec: context.viewSpec }, function (rootElRef, viewClassNames) {\n var hookProps = __assign(__assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold });\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.classNames, content: options.content, didMount: options.didMount, willUnmount: options.willUnmount, elRef: rootElRef }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (createElement(\"div\", { className: viewClassNames.concat(customClassNames).join(' '), ref: rootElRef }, innerContent)); }));\n })); }));\n };\n}\n\nfunction buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) {\n var defaultConfigs = parseViewConfigs(defaultInputs);\n var overrideConfigs = parseViewConfigs(optionOverrides.views);\n var viewDefs = compileViewDefs(defaultConfigs, overrideConfigs);\n return mapHash(viewDefs, function (viewDef) {\n return buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults);\n });\n}\nfunction buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults) {\n var durationInput = viewDef.overrides.duration ||\n viewDef.defaults.duration ||\n dynamicOptionOverrides.duration ||\n optionOverrides.duration;\n var duration = null;\n var durationUnit = '';\n var singleUnit = '';\n var singleUnitOverrides = {};\n if (durationInput) {\n duration = createDurationCached(durationInput);\n if (duration) { // valid?\n var denom = greatestDurationDenominator(duration);\n durationUnit = denom.unit;\n if (denom.value === 1) {\n singleUnit = durationUnit;\n singleUnitOverrides = overrideConfigs[durationUnit] ? overrideConfigs[durationUnit].rawOptions : {};\n }\n }\n }\n var queryButtonText = function (optionsSubset) {\n var buttonTextMap = optionsSubset.buttonText || {};\n var buttonTextKey = viewDef.defaults.buttonTextKey;\n if (buttonTextKey != null && buttonTextMap[buttonTextKey] != null) {\n return buttonTextMap[buttonTextKey];\n }\n if (buttonTextMap[viewDef.type] != null) {\n return buttonTextMap[viewDef.type];\n }\n if (buttonTextMap[singleUnit] != null) {\n return buttonTextMap[singleUnit];\n }\n };\n return {\n type: viewDef.type,\n component: viewDef.component,\n duration: duration,\n durationUnit: durationUnit,\n singleUnit: singleUnit,\n optionDefaults: viewDef.defaults,\n optionOverrides: __assign(__assign({}, singleUnitOverrides), viewDef.overrides),\n buttonTextOverride: queryButtonText(dynamicOptionOverrides) ||\n queryButtonText(optionOverrides) || // constructor-specified buttonText lookup hash takes precedence\n viewDef.overrides.buttonText,\n buttonTextDefault: queryButtonText(localeDefaults) ||\n viewDef.defaults.buttonText ||\n queryButtonText(BASE_OPTION_DEFAULTS) ||\n viewDef.type // fall back to given view name\n };\n}\n// hack to get memoization working\nvar durationInputMap = {};\nfunction createDurationCached(durationInput) {\n var json = JSON.stringify(durationInput);\n var res = durationInputMap[json];\n if (res === undefined) {\n res = createDuration(durationInput);\n durationInputMap[json] = res;\n }\n return res;\n}\n\nvar DateProfileGenerator = /** @class */ (function () {\n function DateProfileGenerator(props) {\n this.props = props;\n this.nowDate = getNow(props.nowInput, props.dateEnv);\n this.initHiddenDays();\n }\n /* Date Range Computation\n ------------------------------------------------------------------------------------------------------------------*/\n // Builds a structure with info about what the dates/ranges will be for the \"prev\" view.\n DateProfileGenerator.prototype.buildPrev = function (currentDateProfile, currentDate, forceToValid) {\n var dateEnv = this.props.dateEnv;\n var prevDate = dateEnv.subtract(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month\n currentDateProfile.dateIncrement);\n return this.build(prevDate, -1, forceToValid);\n };\n // Builds a structure with info about what the dates/ranges will be for the \"next\" view.\n DateProfileGenerator.prototype.buildNext = function (currentDateProfile, currentDate, forceToValid) {\n var dateEnv = this.props.dateEnv;\n var nextDate = dateEnv.add(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), // important for start-of-month\n currentDateProfile.dateIncrement);\n return this.build(nextDate, 1, forceToValid);\n };\n // Builds a structure holding dates/ranges for rendering around the given date.\n // Optional direction param indicates whether the date is being incremented/decremented\n // from its previous value. decremented = -1, incremented = 1 (default).\n DateProfileGenerator.prototype.build = function (currentDate, direction, forceToValid) {\n if (forceToValid === void 0) { forceToValid = true; }\n var props = this.props;\n var validRange;\n var currentInfo;\n var isRangeAllDay;\n var renderRange;\n var activeRange;\n var isValid;\n validRange = this.buildValidRange();\n validRange = this.trimHiddenDays(validRange);\n if (forceToValid) {\n currentDate = constrainMarkerToRange(currentDate, validRange);\n }\n currentInfo = this.buildCurrentRangeInfo(currentDate, direction);\n isRangeAllDay = /^(year|month|week|day)$/.test(currentInfo.unit);\n renderRange = this.buildRenderRange(this.trimHiddenDays(currentInfo.range), currentInfo.unit, isRangeAllDay);\n renderRange = this.trimHiddenDays(renderRange);\n activeRange = renderRange;\n if (!props.showNonCurrentDates) {\n activeRange = intersectRanges(activeRange, currentInfo.range);\n }\n activeRange = this.adjustActiveRange(activeRange);\n activeRange = intersectRanges(activeRange, validRange); // might return null\n // it's invalid if the originally requested date is not contained,\n // or if the range is completely outside of the valid range.\n isValid = rangesIntersect(currentInfo.range, validRange);\n return {\n // constraint for where prev/next operations can go and where events can be dragged/resized to.\n // an object with optional start and end properties.\n validRange: validRange,\n // range the view is formally responsible for.\n // for example, a month view might have 1st-31st, excluding padded dates\n currentRange: currentInfo.range,\n // name of largest unit being displayed, like \"month\" or \"week\"\n currentRangeUnit: currentInfo.unit,\n isRangeAllDay: isRangeAllDay,\n // dates that display events and accept drag-n-drop\n // will be `null` if no dates accept events\n activeRange: activeRange,\n // date range with a rendered skeleton\n // includes not-active days that need some sort of DOM\n renderRange: renderRange,\n // Duration object that denotes the first visible time of any given day\n slotMinTime: props.slotMinTime,\n // Duration object that denotes the exclusive visible end time of any given day\n slotMaxTime: props.slotMaxTime,\n isValid: isValid,\n // how far the current date will move for a prev/next operation\n dateIncrement: this.buildDateIncrement(currentInfo.duration)\n // pass a fallback (might be null) ^\n };\n };\n // Builds an object with optional start/end properties.\n // Indicates the minimum/maximum dates to display.\n // not responsible for trimming hidden days.\n DateProfileGenerator.prototype.buildValidRange = function () {\n var input = this.props.validRangeInput;\n var simpleInput = typeof input === 'function'\n ? input.call(this.props.calendarApi, this.nowDate)\n : input;\n return this.refineRange(simpleInput) ||\n { start: null, end: null }; // completely open-ended\n };\n // Builds a structure with info about the \"current\" range, the range that is\n // highlighted as being the current month for example.\n // See build() for a description of `direction`.\n // Guaranteed to have `range` and `unit` properties. `duration` is optional.\n DateProfileGenerator.prototype.buildCurrentRangeInfo = function (date, direction) {\n var props = this.props;\n var duration = null;\n var unit = null;\n var range = null;\n var dayCount;\n if (props.duration) {\n duration = props.duration;\n unit = props.durationUnit;\n range = this.buildRangeFromDuration(date, direction, duration, unit);\n }\n else if ((dayCount = this.props.dayCount)) {\n unit = 'day';\n range = this.buildRangeFromDayCount(date, direction, dayCount);\n }\n else if ((range = this.buildCustomVisibleRange(date))) {\n unit = props.dateEnv.greatestWholeUnit(range.start, range.end).unit;\n }\n else {\n duration = this.getFallbackDuration();\n unit = greatestDurationDenominator(duration).unit;\n range = this.buildRangeFromDuration(date, direction, duration, unit);\n }\n return { duration: duration, unit: unit, range: range };\n };\n DateProfileGenerator.prototype.getFallbackDuration = function () {\n return createDuration({ day: 1 });\n };\n // Returns a new activeRange to have time values (un-ambiguate)\n // slotMinTime or slotMaxTime causes the range to expand.\n DateProfileGenerator.prototype.adjustActiveRange = function (range) {\n var _a = this.props, dateEnv = _a.dateEnv, usesMinMaxTime = _a.usesMinMaxTime, slotMinTime = _a.slotMinTime, slotMaxTime = _a.slotMaxTime;\n var start = range.start;\n var end = range.end;\n if (usesMinMaxTime) {\n // expand active range if slotMinTime is negative (why not when positive?)\n if (asRoughDays(slotMinTime) < 0) {\n start = startOfDay(start); // necessary?\n start = dateEnv.add(start, slotMinTime);\n }\n // expand active range if slotMaxTime is beyond one day (why not when negative?)\n if (asRoughDays(slotMaxTime) > 1) {\n end = startOfDay(end); // necessary?\n end = addDays(end, -1);\n end = dateEnv.add(end, slotMaxTime);\n }\n }\n return { start: start, end: end };\n };\n // Builds the \"current\" range when it is specified as an explicit duration.\n // `unit` is the already-computed greatestDurationDenominator unit of duration.\n DateProfileGenerator.prototype.buildRangeFromDuration = function (date, direction, duration, unit) {\n var _a = this.props, dateEnv = _a.dateEnv, dateAlignment = _a.dateAlignment;\n var start;\n var end;\n var res;\n // compute what the alignment should be\n if (!dateAlignment) {\n var dateIncrement = this.props.dateIncrement;\n if (dateIncrement) {\n // use the smaller of the two units\n if (asRoughMs(dateIncrement) < asRoughMs(duration)) {\n dateAlignment = greatestDurationDenominator(dateIncrement).unit;\n }\n else {\n dateAlignment = unit;\n }\n }\n else {\n dateAlignment = unit;\n }\n }\n // if the view displays a single day or smaller\n if (asRoughDays(duration) <= 1) {\n if (this.isHiddenDay(start)) {\n start = this.skipHiddenDays(start, direction);\n start = startOfDay(start);\n }\n }\n function computeRes() {\n start = dateEnv.startOf(date, dateAlignment);\n end = dateEnv.add(start, duration);\n res = { start: start, end: end };\n }\n computeRes();\n // if range is completely enveloped by hidden days, go past the hidden days\n if (!this.trimHiddenDays(res)) {\n date = this.skipHiddenDays(date, direction);\n computeRes();\n }\n return res;\n };\n // Builds the \"current\" range when a dayCount is specified.\n DateProfileGenerator.prototype.buildRangeFromDayCount = function (date, direction, dayCount) {\n var _a = this.props, dateEnv = _a.dateEnv, dateAlignment = _a.dateAlignment;\n var runningCount = 0;\n var start = date;\n var end;\n if (dateAlignment) {\n start = dateEnv.startOf(start, dateAlignment);\n }\n start = startOfDay(start);\n start = this.skipHiddenDays(start, direction);\n end = start;\n do {\n end = addDays(end, 1);\n if (!this.isHiddenDay(end)) {\n runningCount++;\n }\n } while (runningCount < dayCount);\n return { start: start, end: end };\n };\n // Builds a normalized range object for the \"visible\" range,\n // which is a way to define the currentRange and activeRange at the same time.\n DateProfileGenerator.prototype.buildCustomVisibleRange = function (date) {\n var props = this.props;\n var input = props.visibleRangeInput;\n var simpleInput = typeof input === 'function'\n ? input.call(props.calendarApi, props.dateEnv.toDate(date))\n : input;\n var range = this.refineRange(simpleInput);\n if (range && (range.start == null || range.end == null)) {\n return null;\n }\n return range;\n };\n // Computes the range that will represent the element/cells for *rendering*,\n // but which may have voided days/times.\n // not responsible for trimming hidden days.\n DateProfileGenerator.prototype.buildRenderRange = function (currentRange, currentRangeUnit, isRangeAllDay) {\n return currentRange;\n };\n // Compute the duration value that should be added/substracted to the current date\n // when a prev/next operation happens.\n DateProfileGenerator.prototype.buildDateIncrement = function (fallback) {\n var dateIncrement = this.props.dateIncrement;\n var customAlignment;\n if (dateIncrement) {\n return dateIncrement;\n }\n else if ((customAlignment = this.props.dateAlignment)) {\n return createDuration(1, customAlignment);\n }\n else if (fallback) {\n return fallback;\n }\n else {\n return createDuration({ days: 1 });\n }\n };\n DateProfileGenerator.prototype.refineRange = function (rangeInput) {\n if (rangeInput) {\n var range = parseRange(rangeInput, this.props.dateEnv);\n if (range) {\n range = computeVisibleDayRange(range);\n }\n return range;\n }\n return null;\n };\n /* Hidden Days\n ------------------------------------------------------------------------------------------------------------------*/\n // Initializes internal variables related to calculating hidden days-of-week\n DateProfileGenerator.prototype.initHiddenDays = function () {\n var hiddenDays = this.props.hiddenDays || []; // array of day-of-week indices that are hidden\n var isHiddenDayHash = []; // is the day-of-week hidden? (hash with day-of-week-index -> bool)\n var dayCnt = 0;\n var i;\n if (this.props.weekends === false) {\n hiddenDays.push(0, 6); // 0=sunday, 6=saturday\n }\n for (i = 0; i < 7; i++) {\n if (!(isHiddenDayHash[i] = hiddenDays.indexOf(i) !== -1)) {\n dayCnt++;\n }\n }\n if (!dayCnt) {\n throw new Error('invalid hiddenDays'); // all days were hidden? bad.\n }\n this.isHiddenDayHash = isHiddenDayHash;\n };\n // Remove days from the beginning and end of the range that are computed as hidden.\n // If the whole range is trimmed off, returns null\n DateProfileGenerator.prototype.trimHiddenDays = function (range) {\n var start = range.start;\n var end = range.end;\n if (start) {\n start = this.skipHiddenDays(start);\n }\n if (end) {\n end = this.skipHiddenDays(end, -1, true);\n }\n if (start == null || end == null || start < end) {\n return { start: start, end: end };\n }\n return null;\n };\n // Is the current day hidden?\n // `day` is a day-of-week index (0-6), or a Date (used for UTC)\n DateProfileGenerator.prototype.isHiddenDay = function (day) {\n if (day instanceof Date) {\n day = day.getUTCDay();\n }\n return this.isHiddenDayHash[day];\n };\n // Incrementing the current day until it is no longer a hidden day, returning a copy.\n // DOES NOT CONSIDER validRange!\n // If the initial value of `date` is not a hidden day, don't do anything.\n // Pass `isExclusive` as `true` if you are dealing with an end date.\n // `inc` defaults to `1` (increment one day forward each time)\n DateProfileGenerator.prototype.skipHiddenDays = function (date, inc, isExclusive) {\n if (inc === void 0) { inc = 1; }\n if (isExclusive === void 0) { isExclusive = false; }\n while (this.isHiddenDayHash[(date.getUTCDay() + (isExclusive ? inc : 0) + 7) % 7]) {\n date = addDays(date, inc);\n }\n return date;\n };\n return DateProfileGenerator;\n}());\n\nfunction reduceViewType(viewType, action) {\n switch (action.type) {\n case 'CHANGE_VIEW_TYPE':\n return viewType = action.viewType;\n }\n return viewType;\n}\n\nfunction reduceDynamicOptionOverrides(dynamicOptionOverrides, action) {\n var _a;\n switch (action.type) {\n case 'SET_OPTION':\n return __assign(__assign({}, dynamicOptionOverrides), (_a = {}, _a[action.optionName] = action.rawOptionValue, _a));\n default:\n return dynamicOptionOverrides;\n }\n}\n\nfunction reduceDateProfile(currentDateProfile, action, currentDate, dateProfileGenerator) {\n var dp;\n switch (action.type) {\n case 'CHANGE_VIEW_TYPE':\n return dateProfileGenerator.build(action.dateMarker || currentDate);\n case 'CHANGE_DATE':\n if (!currentDateProfile.activeRange ||\n !rangeContainsMarker(currentDateProfile.currentRange, action.dateMarker) // don't move if date already in view\n ) {\n return dateProfileGenerator.build(action.dateMarker);\n }\n break;\n case 'PREV':\n dp = dateProfileGenerator.buildPrev(currentDateProfile, currentDate);\n if (dp.isValid) {\n return dp;\n }\n break;\n case 'NEXT':\n dp = dateProfileGenerator.buildNext(currentDateProfile, currentDate);\n if (dp.isValid) {\n return dp;\n }\n break;\n }\n return currentDateProfile;\n}\n\nfunction initEventSources(calendarOptions, dateProfile, context) {\n var activeRange = dateProfile ? dateProfile.activeRange : null;\n return addSources({}, parseInitialSources(calendarOptions, context), activeRange, context);\n}\nfunction reduceEventSources(eventSources, action, dateProfile, context) {\n var activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?\n switch (action.type) {\n case 'ADD_EVENT_SOURCES': // already parsed\n return addSources(eventSources, action.sources, activeRange, context);\n case 'REMOVE_EVENT_SOURCE':\n return removeSource(eventSources, action.sourceId);\n case 'PREV': // TODO: how do we track all actions that affect dateProfile :(\n case 'NEXT':\n case 'CHANGE_DATE':\n case 'CHANGE_VIEW_TYPE':\n if (dateProfile) {\n return fetchDirtySources(eventSources, activeRange, context);\n }\n else {\n return eventSources;\n }\n case 'FETCH_EVENT_SOURCES':\n return fetchSourcesByIds(eventSources, action.sourceIds ? // why no type?\n arrayToHash(action.sourceIds) :\n excludeStaticSources(eventSources, context), activeRange, context);\n case 'RECEIVE_EVENTS':\n case 'RECEIVE_EVENT_ERROR':\n return receiveResponse(eventSources, action.sourceId, action.fetchId, action.fetchRange);\n case 'REMOVE_ALL_EVENT_SOURCES':\n return {};\n default:\n return eventSources;\n }\n}\nfunction reduceEventSourcesNewTimeZone(eventSources, dateProfile, context) {\n var activeRange = dateProfile ? dateProfile.activeRange : null; // need this check?\n return fetchSourcesByIds(eventSources, excludeStaticSources(eventSources, context), activeRange, context);\n}\nfunction computeEventSourceLoadingLevel(eventSources) {\n var cnt = 0;\n for (var sourceId in eventSources) {\n if (eventSources[sourceId].isFetching) {\n cnt++;\n }\n }\n return cnt;\n}\nfunction addSources(eventSourceHash, sources, fetchRange, context) {\n var hash = {};\n for (var _i = 0, sources_1 = sources; _i < sources_1.length; _i++) {\n var source = sources_1[_i];\n hash[source.sourceId] = source;\n }\n if (fetchRange) {\n hash = fetchDirtySources(hash, fetchRange, context);\n }\n return __assign(__assign({}, eventSourceHash), hash);\n}\nfunction removeSource(eventSourceHash, sourceId) {\n return filterHash(eventSourceHash, function (eventSource) {\n return eventSource.sourceId !== sourceId;\n });\n}\nfunction fetchDirtySources(sourceHash, fetchRange, context) {\n return fetchSourcesByIds(sourceHash, filterHash(sourceHash, function (eventSource) {\n return isSourceDirty(eventSource, fetchRange, context);\n }), fetchRange, context);\n}\nfunction isSourceDirty(eventSource, fetchRange, context) {\n if (!doesSourceNeedRange(eventSource, context)) {\n return !eventSource.latestFetchId;\n }\n else {\n return !context.options.lazyFetching ||\n !eventSource.fetchRange ||\n eventSource.isFetching || // always cancel outdated in-progress fetches\n fetchRange.start < eventSource.fetchRange.start ||\n fetchRange.end > eventSource.fetchRange.end;\n }\n}\nfunction fetchSourcesByIds(prevSources, sourceIdHash, fetchRange, context) {\n var nextSources = {};\n for (var sourceId in prevSources) {\n var source = prevSources[sourceId];\n if (sourceIdHash[sourceId]) {\n nextSources[sourceId] = fetchSource(source, fetchRange, context);\n }\n else {\n nextSources[sourceId] = source;\n }\n }\n return nextSources;\n}\nfunction fetchSource(eventSource, fetchRange, context) {\n var options = context.options, calendarApi = context.calendarApi;\n var sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId];\n var fetchId = guid();\n sourceDef.fetch({\n eventSource: eventSource,\n range: fetchRange,\n context: context\n }, function (res) {\n var rawEvents = res.rawEvents;\n if (options.eventSourceSuccess) {\n rawEvents = options.eventSourceSuccess.call(calendarApi, rawEvents, res.xhr) || rawEvents;\n }\n if (eventSource.success) {\n rawEvents = eventSource.success.call(calendarApi, rawEvents, res.xhr) || rawEvents;\n }\n context.dispatch({\n type: 'RECEIVE_EVENTS',\n sourceId: eventSource.sourceId,\n fetchId: fetchId,\n fetchRange: fetchRange,\n rawEvents: rawEvents\n });\n }, function (error) {\n console.warn(error.message, error);\n if (options.eventSourceFailure) {\n options.eventSourceFailure.call(calendarApi, error);\n }\n if (eventSource.failure) {\n eventSource.failure(error);\n }\n context.dispatch({\n type: 'RECEIVE_EVENT_ERROR',\n sourceId: eventSource.sourceId,\n fetchId: fetchId,\n fetchRange: fetchRange,\n error: error\n });\n });\n return __assign(__assign({}, eventSource), { isFetching: true, latestFetchId: fetchId });\n}\nfunction receiveResponse(sourceHash, sourceId, fetchId, fetchRange) {\n var _a;\n var eventSource = sourceHash[sourceId];\n if (eventSource && // not already removed\n fetchId === eventSource.latestFetchId) {\n return __assign(__assign({}, sourceHash), (_a = {}, _a[sourceId] = __assign(__assign({}, eventSource), { isFetching: false, fetchRange: fetchRange // also serves as a marker that at least one fetch has completed\n }), _a));\n }\n return sourceHash;\n}\nfunction excludeStaticSources(eventSources, context) {\n return filterHash(eventSources, function (eventSource) {\n return doesSourceNeedRange(eventSource, context);\n });\n}\nfunction parseInitialSources(rawOptions, context) {\n var refiners = buildEventSourceRefiners(context);\n var rawSources = [].concat(rawOptions.eventSources || []);\n var sources = []; // parsed\n if (rawOptions.initialEvents) {\n rawSources.unshift(rawOptions.initialEvents);\n }\n if (rawOptions.events) {\n rawSources.unshift(rawOptions.events);\n }\n for (var _i = 0, rawSources_1 = rawSources; _i < rawSources_1.length; _i++) {\n var rawSource = rawSources_1[_i];\n var source = parseEventSource(rawSource, context, refiners);\n if (source) {\n sources.push(source);\n }\n }\n return sources;\n}\nfunction doesSourceNeedRange(eventSource, context) {\n var defs = context.pluginHooks.eventSourceDefs;\n return !defs[eventSource.sourceDefId].ignoreRange;\n}\n\nfunction reduceDateSelection(currentSelection, action) {\n switch (action.type) {\n case 'UNSELECT_DATES':\n return null;\n case 'SELECT_DATES':\n return action.selection;\n default:\n return currentSelection;\n }\n}\n\nfunction reduceSelectedEvent(currentInstanceId, action) {\n switch (action.type) {\n case 'UNSELECT_EVENT':\n return '';\n case 'SELECT_EVENT':\n return action.eventInstanceId;\n default:\n return currentInstanceId;\n }\n}\n\nfunction reduceEventDrag(currentDrag, action) {\n var newDrag;\n switch (action.type) {\n case 'UNSET_EVENT_DRAG':\n return null;\n case 'SET_EVENT_DRAG':\n newDrag = action.state;\n return {\n affectedEvents: newDrag.affectedEvents,\n mutatedEvents: newDrag.mutatedEvents,\n isEvent: newDrag.isEvent\n };\n default:\n return currentDrag;\n }\n}\n\nfunction reduceEventResize(currentResize, action) {\n var newResize;\n switch (action.type) {\n case 'UNSET_EVENT_RESIZE':\n return null;\n case 'SET_EVENT_RESIZE':\n newResize = action.state;\n return {\n affectedEvents: newResize.affectedEvents,\n mutatedEvents: newResize.mutatedEvents,\n isEvent: newResize.isEvent\n };\n default:\n return currentResize;\n }\n}\n\nfunction parseToolbars(calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) {\n var viewsWithButtons = [];\n var headerToolbar = calendarOptions.headerToolbar ? parseToolbar(calendarOptions.headerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi, viewsWithButtons) : null;\n var footerToolbar = calendarOptions.footerToolbar ? parseToolbar(calendarOptions.footerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi, viewsWithButtons) : null;\n return { headerToolbar: headerToolbar, footerToolbar: footerToolbar, viewsWithButtons: viewsWithButtons };\n}\nfunction parseToolbar(sectionStrHash, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi, viewsWithButtons // dump side effects\n) {\n return mapHash(sectionStrHash, function (sectionStr) { return parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi, viewsWithButtons); });\n}\n/*\nBAD: querying icons and text here. should be done at render time\n*/\nfunction parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi, viewsWithButtons // dump side effects\n) {\n var isRtl = calendarOptions.direction === 'rtl';\n var calendarCustomButtons = calendarOptions.customButtons || {};\n var calendarButtonTextOverrides = calendarOptionOverrides.buttonText || {};\n var calendarButtonText = calendarOptions.buttonText || {};\n var sectionSubstrs = sectionStr ? sectionStr.split(' ') : [];\n return sectionSubstrs.map(function (buttonGroupStr) {\n return buttonGroupStr.split(',').map(function (buttonName) {\n if (buttonName === 'title') {\n return { buttonName: buttonName };\n }\n else {\n var customButtonProps_1;\n var viewSpec = void 0;\n var buttonClick = void 0;\n var buttonIcon = void 0; // only one of these will be set\n var buttonText = void 0; // \"\n if ((customButtonProps_1 = calendarCustomButtons[buttonName])) {\n buttonClick = function (ev) {\n if (customButtonProps_1.click) {\n customButtonProps_1.click.call(ev.target, ev); // TODO: correct to use `target`?\n }\n };\n (buttonIcon = theme.getCustomButtonIconClass(customButtonProps_1)) ||\n (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||\n (buttonText = customButtonProps_1.text);\n }\n else if ((viewSpec = viewSpecs[buttonName])) {\n viewsWithButtons.push(buttonName);\n buttonClick = function () {\n calendarApi.changeView(buttonName);\n };\n (buttonText = viewSpec.buttonTextOverride) ||\n (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||\n (buttonText = viewSpec.buttonTextDefault);\n }\n else if (calendarApi[buttonName]) { // a calendarApi method\n buttonClick = function () {\n calendarApi[buttonName]();\n };\n (buttonText = calendarButtonTextOverrides[buttonName]) ||\n (buttonIcon = theme.getIconClass(buttonName, isRtl)) ||\n (buttonText = calendarButtonText[buttonName]);\n // ^ everything else is considered default\n }\n return { buttonName: buttonName, buttonClick: buttonClick, buttonIcon: buttonIcon, buttonText: buttonText };\n }\n });\n });\n}\n\nvar eventSourceDef = {\n ignoreRange: true,\n parseMeta: function (refined) {\n if (Array.isArray(refined.events)) {\n return refined.events;\n }\n return null;\n },\n fetch: function (arg, success) {\n success({\n rawEvents: arg.eventSource.meta\n });\n }\n};\nvar arrayEventSourcePlugin = createPlugin({\n eventSourceDefs: [eventSourceDef]\n});\n\nvar eventSourceDef$1 = {\n parseMeta: function (refined) {\n if (typeof refined.events === 'function') {\n return refined.events;\n }\n return null;\n },\n fetch: function (arg, success, failure) {\n var dateEnv = arg.context.dateEnv;\n var func = arg.eventSource.meta;\n unpromisify(func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)), function (rawEvents) {\n success({ rawEvents: rawEvents }); // needs an object response\n }, failure // send errorObj directly to failure callback\n );\n }\n};\nvar funcEventSourcePlugin = createPlugin({\n eventSourceDefs: [eventSourceDef$1]\n});\n\nfunction requestJson(method, url, params, successCallback, failureCallback) {\n method = method.toUpperCase();\n var body = null;\n if (method === 'GET') {\n url = injectQueryStringParams(url, params);\n }\n else {\n body = encodeParams(params);\n }\n var xhr = new XMLHttpRequest();\n xhr.open(method, url, true);\n if (method !== 'GET') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n }\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 400) {\n var parsed = false;\n var res = void 0;\n try {\n res = JSON.parse(xhr.responseText);\n parsed = true;\n }\n catch (err) {\n // will handle parsed=false\n }\n if (parsed) {\n successCallback(res, xhr);\n }\n else {\n failureCallback('Failure parsing JSON', xhr);\n }\n }\n else {\n failureCallback('Request failed', xhr);\n }\n };\n xhr.onerror = function () {\n failureCallback('Request failed', xhr);\n };\n xhr.send(body);\n}\nfunction injectQueryStringParams(url, params) {\n return url +\n (url.indexOf('?') === -1 ? '?' : '&') +\n encodeParams(params);\n}\nfunction encodeParams(params) {\n var parts = [];\n for (var key in params) {\n parts.push(encodeURIComponent(key) + '=' + encodeURIComponent(params[key]));\n }\n return parts.join('&');\n}\n\nvar JSON_FEED_EVENT_SOURCE_REFINERS = {\n method: String,\n extraParams: identity,\n startParam: String,\n endParam: String,\n timeZoneParam: String\n};\n\nvar eventSourceDef$2 = {\n parseMeta: function (refined) {\n if (refined.url) {\n return {\n url: refined.url,\n method: (refined.method || 'GET').toUpperCase(),\n extraParams: refined.extraParams,\n startParam: refined.startParam,\n endParam: refined.endParam,\n timeZoneParam: refined.timeZoneParam\n };\n }\n return null;\n },\n fetch: function (arg, success, failure) {\n var meta = arg.eventSource.meta;\n var requestParams = buildRequestParams(meta, arg.range, arg.context);\n requestJson(meta.method, meta.url, requestParams, function (rawEvents, xhr) {\n success({ rawEvents: rawEvents, xhr: xhr });\n }, function (errorMessage, xhr) {\n failure({ message: errorMessage, xhr: xhr });\n });\n }\n};\nvar jsonFeedEventSourcePlugin = createPlugin({\n eventSourceRefiners: JSON_FEED_EVENT_SOURCE_REFINERS,\n eventSourceDefs: [eventSourceDef$2]\n});\nfunction buildRequestParams(meta, range, context) {\n var dateEnv = context.dateEnv, options = context.options;\n var startParam;\n var endParam;\n var timeZoneParam;\n var customRequestParams;\n var params = {};\n startParam = meta.startParam;\n if (startParam == null) {\n startParam = options.startParam;\n }\n endParam = meta.endParam;\n if (endParam == null) {\n endParam = options.endParam;\n }\n timeZoneParam = meta.timeZoneParam;\n if (timeZoneParam == null) {\n timeZoneParam = options.timeZoneParam;\n }\n // retrieve any outbound GET/POST data from the options\n if (typeof meta.extraParams === 'function') {\n // supplied as a function that returns a key/value object\n customRequestParams = meta.extraParams();\n }\n else {\n // probably supplied as a straight key/value object\n customRequestParams = meta.extraParams || {};\n }\n __assign(params, customRequestParams);\n params[startParam] = dateEnv.formatIso(range.start);\n params[endParam] = dateEnv.formatIso(range.end);\n if (dateEnv.timeZone !== 'local') {\n params[timeZoneParam] = dateEnv.timeZone;\n }\n return params;\n}\n\nvar SIMPLE_RECURRING_REFINERS = {\n daysOfWeek: identity,\n startTime: createDuration,\n endTime: createDuration,\n duration: createDuration,\n startRecur: identity,\n endRecur: identity\n};\n\nvar recurring = {\n parse: function (refined, dateEnv) {\n if (refined.daysOfWeek || refined.startTime || refined.endTime || refined.startRecur || refined.endRecur) {\n var recurringData = {\n daysOfWeek: refined.daysOfWeek || null,\n startTime: refined.startTime || null,\n endTime: refined.endTime || null,\n startRecur: refined.startRecur ? dateEnv.createMarker(refined.startRecur) : null,\n endRecur: refined.endRecur ? dateEnv.createMarker(refined.endRecur) : null\n };\n var duration = void 0;\n if (refined.duration) {\n duration = refined.duration;\n }\n if (!duration && refined.startTime && refined.endTime) {\n duration = subtractDurations(refined.endTime, refined.startTime);\n }\n return {\n allDayGuess: Boolean(!refined.startTime && !refined.endTime),\n duration: duration,\n typeData: recurringData // doesn't need endTime anymore but oh well\n };\n }\n return null;\n },\n expand: function (typeData, framingRange, dateEnv) {\n var clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur });\n if (clippedFramingRange) {\n return expandRanges(typeData.daysOfWeek, typeData.startTime, clippedFramingRange, dateEnv);\n }\n else {\n return [];\n }\n }\n};\nvar simpleRecurringEventsPlugin = createPlugin({\n recurringTypes: [recurring],\n eventRefiners: SIMPLE_RECURRING_REFINERS\n});\nfunction expandRanges(daysOfWeek, startTime, framingRange, dateEnv) {\n var dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null;\n var dayMarker = startOfDay(framingRange.start);\n var endMarker = framingRange.end;\n var instanceStarts = [];\n while (dayMarker < endMarker) {\n var instanceStart \n // if everyday, or this particular day-of-week\n = void 0;\n // if everyday, or this particular day-of-week\n if (!dowHash || dowHash[dayMarker.getUTCDay()]) {\n if (startTime) {\n instanceStart = dateEnv.add(dayMarker, startTime);\n }\n else {\n instanceStart = dayMarker;\n }\n instanceStarts.push(instanceStart);\n }\n dayMarker = addDays(dayMarker, 1);\n }\n return instanceStarts;\n}\n\nvar changeHandlerPlugin = createPlugin({\n optionChangeHandlers: {\n events: function (events, context) {\n handleEventSources([events], context);\n },\n eventSources: handleEventSources\n }\n});\n/*\nBUG: if `event` was supplied, all previously-given `eventSources` will be wiped out\n*/\nfunction handleEventSources(inputs, context) {\n var unfoundSources = hashValuesToArray(context.getCurrentData().eventSources);\n var newInputs = [];\n for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {\n var input = inputs_1[_i];\n var inputFound = false;\n for (var i = 0; i < unfoundSources.length; i++) {\n if (unfoundSources[i]._raw === input) {\n unfoundSources.splice(i, 1); // delete\n inputFound = true;\n break;\n }\n }\n if (!inputFound) {\n newInputs.push(input);\n }\n }\n for (var _a = 0, unfoundSources_1 = unfoundSources; _a < unfoundSources_1.length; _a++) {\n var unfoundSource = unfoundSources_1[_a];\n context.dispatch({\n type: 'REMOVE_EVENT_SOURCE',\n sourceId: unfoundSource.sourceId\n });\n }\n for (var _b = 0, newInputs_1 = newInputs; _b < newInputs_1.length; _b++) {\n var newInput = newInputs_1[_b];\n context.calendarApi.addEventSource(newInput);\n }\n}\n\nfunction handleDateProfile(dateProfile, context) {\n context.emitter.trigger('datesSet', __assign(__assign({}, buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv)), { view: context.viewApi }));\n}\n\nfunction handleEventStore(eventStore, context) {\n var emitter = context.emitter;\n if (emitter.hasHandlers('eventsSet')) {\n emitter.trigger('eventsSet', buildEventApis(eventStore, context));\n }\n}\n\n/*\nthis array is exposed on the root namespace so that UMD plugins can add to it.\nsee the rollup-bundles script.\n*/\nvar globalPlugins = [\n arrayEventSourcePlugin,\n funcEventSourcePlugin,\n jsonFeedEventSourcePlugin,\n simpleRecurringEventsPlugin,\n changeHandlerPlugin,\n createPlugin({\n contentTypeHandlers: {\n html: function () { return injectHtml; },\n domNodes: function () { return injectDomNodes; }\n },\n propSetHandlers: {\n dateProfile: handleDateProfile,\n eventStore: handleEventStore\n }\n })\n];\n\nvar DelayedRunner = /** @class */ (function () {\n function DelayedRunner(drainedOption) {\n this.drainedOption = drainedOption;\n this.isRunning = false;\n this.isDirty = false;\n this.pauseDepths = {};\n this.timeoutId = 0;\n }\n DelayedRunner.prototype.request = function (delay) {\n this.isDirty = true;\n if (!this.isPaused()) {\n this.clearTimeout();\n if (delay == null) {\n this.tryDrain();\n }\n else {\n this.timeoutId = setTimeout(// NOT OPTIMAL! TODO: look at debounce\n this.tryDrain.bind(this), delay);\n }\n }\n };\n DelayedRunner.prototype.pause = function (scope) {\n if (scope === void 0) { scope = ''; }\n var pauseDepths = this.pauseDepths;\n pauseDepths[scope] = (pauseDepths[scope] || 0) + 1;\n this.clearTimeout();\n };\n DelayedRunner.prototype.resume = function (scope, force) {\n if (scope === void 0) { scope = ''; }\n var pauseDepths = this.pauseDepths;\n if (scope in pauseDepths) {\n if (force) {\n delete pauseDepths[scope];\n }\n else {\n var depth = --pauseDepths[scope];\n if (depth <= 0) {\n delete pauseDepths[scope];\n }\n }\n this.tryDrain();\n }\n };\n DelayedRunner.prototype.isPaused = function () {\n return Object.keys(this.pauseDepths).length;\n };\n DelayedRunner.prototype.tryDrain = function () {\n if (!this.isRunning && !this.isPaused()) {\n this.isRunning = true;\n while (this.isDirty) {\n this.isDirty = false;\n this.drained(); // might set isDirty to true again\n }\n this.isRunning = false;\n }\n };\n DelayedRunner.prototype.clear = function () {\n this.clearTimeout();\n this.isDirty = false;\n this.pauseDepths = {};\n };\n DelayedRunner.prototype.clearTimeout = function () {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n this.timeoutId = 0;\n }\n };\n DelayedRunner.prototype.drained = function () {\n if (this.drainedOption) {\n this.drainedOption();\n }\n };\n return DelayedRunner;\n}());\nvar TaskRunner = /** @class */ (function () {\n function TaskRunner(runTaskOption, drainedOption) {\n this.runTaskOption = runTaskOption;\n this.drainedOption = drainedOption;\n this.queue = [];\n this.delayedRunner = new DelayedRunner(this.drain.bind(this));\n }\n TaskRunner.prototype.request = function (task, delay) {\n this.queue.push(task);\n this.delayedRunner.request(delay);\n };\n TaskRunner.prototype.pause = function (scope) {\n this.delayedRunner.pause(scope);\n };\n TaskRunner.prototype.resume = function (scope, force) {\n this.delayedRunner.resume(scope, force);\n };\n TaskRunner.prototype.drain = function () {\n var queue = this.queue;\n while (queue.length) {\n var completedTasks = [];\n var task = void 0;\n while ((task = queue.shift())) {\n this.runTask(task);\n completedTasks.push(task);\n }\n this.drained(completedTasks);\n } // keep going, in case new tasks were added in the drained handler\n };\n TaskRunner.prototype.runTask = function (task) {\n if (this.runTaskOption) {\n this.runTaskOption(task);\n }\n };\n TaskRunner.prototype.drained = function (completedTasks) {\n if (this.drainedOption) {\n this.drainedOption(completedTasks);\n }\n };\n return TaskRunner;\n}());\n\n// Computes what the title at the top of the calendarApi should be for this view\nfunction buildTitle(dateProfile, viewOptions, dateEnv) {\n var range;\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\n range = dateProfile.currentRange;\n }\n else { // for day units or smaller, use the actual day range\n range = dateProfile.activeRange;\n }\n return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), {\n isEndExclusive: dateProfile.isRangeAllDay,\n defaultSeparator: viewOptions.titleRangeSeparator\n });\n}\n// Generates the format string that should be used to generate the title for the current date range.\n// Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.\nfunction buildTitleFormat(dateProfile) {\n var currentRangeUnit = dateProfile.currentRangeUnit;\n if (currentRangeUnit === 'year') {\n return { year: 'numeric' };\n }\n else if (currentRangeUnit === 'month') {\n return { year: 'numeric', month: 'long' }; // like \"September 2014\"\n }\n else {\n var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end);\n if (days !== null && days > 1) {\n // multi-day range. shorter, like \"Sep 9 - 10 2014\"\n return { year: 'numeric', month: 'short', day: 'numeric' };\n }\n else {\n // one day. longer, like \"September 9 2014\"\n return { year: 'numeric', month: 'long', day: 'numeric' };\n }\n }\n}\n\n// in future refactor, do the redux-style function(state=initial) for initial-state\n// also, whatever is happening in constructor, have it happen in action queue too\nvar CalendarDataManager = /** @class */ (function () {\n function CalendarDataManager(props) {\n var _this = this;\n this.computeOptionsData = memoize(this._computeOptionsData);\n this.computeCurrentViewData = memoize(this._computeCurrentViewData);\n this.organizeRawLocales = memoize(organizeRawLocales);\n this.buildLocale = memoize(buildLocale);\n this.buildPluginHooks = buildBuildPluginHooks();\n this.buildDateEnv = memoize(buildDateEnv$1);\n this.buildTheme = memoize(buildTheme);\n this.parseToolbars = memoize(parseToolbars);\n this.buildViewSpecs = memoize(buildViewSpecs);\n this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator);\n this.buildViewApi = memoize(buildViewApi);\n this.buildViewUiProps = memoizeObjArg(buildViewUiProps);\n this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual);\n this.buildEventUiBases = memoize(buildEventUiBases);\n this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours);\n this.buildTitle = memoize(buildTitle);\n this.emitter = new Emitter();\n this.actionRunner = new TaskRunner(this._handleAction.bind(this), this.updateData.bind(this));\n this.currentCalendarOptionsInput = {};\n this.currentCalendarOptionsRefined = {};\n this.currentViewOptionsInput = {};\n this.currentViewOptionsRefined = {};\n this.currentCalendarOptionsRefiners = {};\n this.getCurrentData = function () {\n return _this.data;\n };\n this.dispatch = function (action) {\n _this.actionRunner.request(action); // protects against recursive calls to _handleAction\n };\n this.props = props;\n this.actionRunner.pause();\n var dynamicOptionOverrides = {};\n var optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi);\n var currentViewType = optionsData.calendarOptions.initialView || optionsData.pluginHooks.initialView;\n var currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides);\n // wire things up\n // TODO: not DRY\n props.calendarApi.currentDataManager = this;\n this.emitter.setThisContext(props.calendarApi);\n this.emitter.setOptions(currentViewData.options);\n var currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv);\n var dateProfile = currentViewData.dateProfileGenerator.build(currentDate);\n if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) {\n currentDate = dateProfile.currentRange.start;\n }\n var calendarContext = {\n dateEnv: optionsData.dateEnv,\n options: optionsData.calendarOptions,\n pluginHooks: optionsData.pluginHooks,\n calendarApi: props.calendarApi,\n dispatch: this.dispatch,\n emitter: this.emitter,\n getCurrentData: this.getCurrentData\n };\n // needs to be after setThisContext\n for (var _i = 0, _a = optionsData.pluginHooks.contextInit; _i < _a.length; _i++) {\n var callback = _a[_i];\n callback(calendarContext);\n }\n // NOT DRY\n var eventSources = initEventSources(optionsData.calendarOptions, dateProfile, calendarContext);\n var initialState = {\n dynamicOptionOverrides: dynamicOptionOverrides,\n currentViewType: currentViewType,\n currentDate: currentDate,\n dateProfile: dateProfile,\n businessHours: this.parseContextBusinessHours(calendarContext),\n eventSources: eventSources,\n eventUiBases: {},\n loadingLevel: computeEventSourceLoadingLevel(eventSources),\n eventStore: createEmptyEventStore(),\n renderableEventStore: createEmptyEventStore(),\n dateSelection: null,\n eventSelection: '',\n eventDrag: null,\n eventResize: null,\n selectionConfig: this.buildViewUiProps(calendarContext).selectionConfig\n };\n var contextAndState = __assign(__assign({}, calendarContext), initialState);\n for (var _b = 0, _c = optionsData.pluginHooks.reducers; _b < _c.length; _b++) {\n var reducer = _c[_b];\n __assign(initialState, reducer(null, null, contextAndState));\n }\n if (initialState.loadingLevel) {\n this.emitter.trigger('loading', true); // NOT DRY\n }\n this.state = initialState;\n this.updateData();\n this.actionRunner.resume();\n }\n CalendarDataManager.prototype.resetOptions = function (optionOverrides, append) {\n var props = this.props;\n props.optionOverrides = append\n ? __assign(__assign({}, props.optionOverrides), optionOverrides) : optionOverrides;\n this.actionRunner.request({\n type: 'NOTHING'\n });\n };\n CalendarDataManager.prototype._handleAction = function (action) {\n var _a = this, props = _a.props, state = _a.state, emitter = _a.emitter;\n var dynamicOptionOverrides = reduceDynamicOptionOverrides(state.dynamicOptionOverrides, action);\n var optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi);\n var currentViewType = reduceViewType(state.currentViewType, action);\n var currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides);\n // wire things up\n // TODO: not DRY\n props.calendarApi.currentDataManager = this;\n emitter.setThisContext(props.calendarApi);\n emitter.setOptions(currentViewData.options);\n var calendarContext = {\n dateEnv: optionsData.dateEnv,\n options: optionsData.calendarOptions,\n pluginHooks: optionsData.pluginHooks,\n calendarApi: props.calendarApi,\n dispatch: this.dispatch,\n emitter: emitter,\n getCurrentData: this.getCurrentData\n };\n var currentDate = state.currentDate;\n var dateProfile = state.dateProfile;\n if (this.data && this.data.dateProfileGenerator !== currentViewData.dateProfileGenerator) { // hack\n dateProfile = currentViewData.dateProfileGenerator.build(currentDate);\n }\n currentDate = reduceCurrentDate(currentDate, action);\n dateProfile = reduceDateProfile(dateProfile, action, currentDate, currentViewData.dateProfileGenerator);\n if (!rangeContainsMarker(dateProfile.currentRange, currentDate)) {\n currentDate = dateProfile.currentRange.start;\n }\n var eventSources = reduceEventSources(state.eventSources, action, dateProfile, calendarContext);\n var eventSourceLoadingLevel = computeEventSourceLoadingLevel(eventSources);\n var eventStore = reduceEventStore(state.eventStore, action, eventSources, dateProfile, calendarContext);\n var renderableEventStore = (eventSourceLoadingLevel && !currentViewData.options.progressiveEventRendering) ?\n (state.renderableEventStore || eventStore) : // try from previous state\n eventStore;\n var _b = this.buildViewUiProps(calendarContext), eventUiSingleBase = _b.eventUiSingleBase, selectionConfig = _b.selectionConfig; // will memoize obj\n var eventUiBySource = this.buildEventUiBySource(eventSources);\n var eventUiBases = this.buildEventUiBases(renderableEventStore.defs, eventUiSingleBase, eventUiBySource);\n var prevLoadingLevel = state.loadingLevel || 0;\n var loadingLevel = eventSourceLoadingLevel;\n var newState = {\n dynamicOptionOverrides: dynamicOptionOverrides,\n currentViewType: currentViewType,\n currentDate: currentDate,\n dateProfile: dateProfile,\n eventSources: eventSources,\n eventStore: eventStore,\n renderableEventStore: renderableEventStore,\n selectionConfig: selectionConfig,\n eventUiBases: eventUiBases,\n loadingLevel: loadingLevel,\n businessHours: this.parseContextBusinessHours(calendarContext),\n dateSelection: reduceDateSelection(state.dateSelection, action),\n eventSelection: reduceSelectedEvent(state.eventSelection, action),\n eventDrag: reduceEventDrag(state.eventDrag, action),\n eventResize: reduceEventResize(state.eventResize, action)\n };\n var contextAndState = __assign(__assign({}, calendarContext), newState);\n for (var _i = 0, _c = optionsData.pluginHooks.reducers; _i < _c.length; _i++) {\n var reducer = _c[_i];\n __assign(newState, reducer(state, action, contextAndState)); // give the OLD state, for old value\n }\n // TODO: use propSetHandlers in plugin system\n if (!prevLoadingLevel && loadingLevel) {\n emitter.trigger('loading', true);\n }\n else if (prevLoadingLevel && !loadingLevel) {\n emitter.trigger('loading', false);\n }\n this.state = newState;\n if (props.onAction) {\n props.onAction(action);\n }\n };\n CalendarDataManager.prototype.updateData = function () {\n var _a = this, props = _a.props, state = _a.state;\n var oldData = this.data;\n var optionsData = this.computeOptionsData(props.optionOverrides, state.dynamicOptionOverrides, props.calendarApi);\n var currentViewData = this.computeCurrentViewData(state.currentViewType, optionsData, props.optionOverrides, state.dynamicOptionOverrides);\n var data = this.data = __assign(__assign(__assign({ viewTitle: this.buildTitle(state.dateProfile, currentViewData.options, optionsData.dateEnv), calendarApi: props.calendarApi, dispatch: this.dispatch, emitter: this.emitter, getCurrentData: this.getCurrentData }, optionsData), currentViewData), state);\n var changeHandlers = optionsData.pluginHooks.optionChangeHandlers;\n var oldCalendarOptions = oldData && oldData.calendarOptions;\n var newCalendarOptions = optionsData.calendarOptions;\n if (oldCalendarOptions && oldCalendarOptions !== newCalendarOptions) {\n if (oldCalendarOptions.timeZone !== newCalendarOptions.timeZone) {\n // hack\n state.eventSources = data.eventSources = reduceEventSourcesNewTimeZone(data.eventSources, state.dateProfile, data);\n state.eventStore = data.eventStore = rezoneEventStoreDates(data.eventStore, oldData.dateEnv, data.dateEnv);\n }\n for (var optionName in changeHandlers) {\n if (oldCalendarOptions[optionName] !== newCalendarOptions[optionName]) {\n changeHandlers[optionName](newCalendarOptions[optionName], data);\n }\n }\n }\n if (props.onData) {\n props.onData(data);\n }\n };\n CalendarDataManager.prototype._computeOptionsData = function (optionOverrides, dynamicOptionOverrides, calendarApi) {\n // TODO: blacklist options that are handled by optionChangeHandlers\n var _a = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides), refinedOptions = _a.refinedOptions, pluginHooks = _a.pluginHooks, localeDefaults = _a.localeDefaults, availableLocaleData = _a.availableLocaleData, extra = _a.extra;\n warnUnknownOptions(extra);\n var dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekText, pluginHooks, availableLocaleData, refinedOptions.defaultRangeSeparator);\n var viewSpecs = this.buildViewSpecs(pluginHooks.views, optionOverrides, dynamicOptionOverrides, localeDefaults);\n var theme = this.buildTheme(refinedOptions, pluginHooks);\n var toolbarConfig = this.parseToolbars(refinedOptions, optionOverrides, theme, viewSpecs, calendarApi);\n return {\n calendarOptions: refinedOptions,\n pluginHooks: pluginHooks,\n dateEnv: dateEnv,\n viewSpecs: viewSpecs,\n theme: theme,\n toolbarConfig: toolbarConfig,\n localeDefaults: localeDefaults,\n availableRawLocales: availableLocaleData.map\n };\n };\n // always called from behind a memoizer\n CalendarDataManager.prototype.processRawCalendarOptions = function (optionOverrides, dynamicOptionOverrides) {\n var _a = mergeRawOptions([\n BASE_OPTION_DEFAULTS,\n optionOverrides,\n dynamicOptionOverrides\n ]), locales = _a.locales, locale = _a.locale;\n var availableLocaleData = this.organizeRawLocales(locales);\n var availableRawLocales = availableLocaleData.map;\n var localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options;\n var pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins);\n var refiners = this.currentCalendarOptionsRefiners = __assign(__assign(__assign(__assign(__assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);\n var extra = {};\n var raw = mergeRawOptions([\n BASE_OPTION_DEFAULTS,\n localeDefaults,\n optionOverrides,\n dynamicOptionOverrides\n ]);\n var refined = {};\n var currentRaw = this.currentCalendarOptionsInput;\n var currentRefined = this.currentCalendarOptionsRefined;\n var anyChanges = false;\n for (var optionName in raw) {\n if (optionName !== 'plugins') { // because plugins is special-cased\n if (raw[optionName] === currentRaw[optionName] ||\n (COMPLEX_OPTION_COMPARATORS[optionName] && (optionName in currentRaw) && COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName]))) {\n refined[optionName] = currentRefined[optionName];\n }\n else if (refiners[optionName]) {\n refined[optionName] = refiners[optionName](raw[optionName]);\n anyChanges = true;\n }\n else {\n extra[optionName] = currentRaw[optionName];\n }\n }\n }\n if (anyChanges) {\n this.currentCalendarOptionsInput = raw;\n this.currentCalendarOptionsRefined = refined;\n }\n return {\n rawOptions: this.currentCalendarOptionsInput,\n refinedOptions: this.currentCalendarOptionsRefined,\n pluginHooks: pluginHooks,\n availableLocaleData: availableLocaleData,\n localeDefaults: localeDefaults,\n extra: extra\n };\n };\n CalendarDataManager.prototype._computeCurrentViewData = function (viewType, optionsData, optionOverrides, dynamicOptionOverrides) {\n var viewSpec = optionsData.viewSpecs[viewType];\n if (!viewSpec) {\n throw new Error(\"viewType \\\"\" + viewType + \"\\\" is not available. Please make sure you've loaded all neccessary plugins\");\n }\n var _a = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides), refinedOptions = _a.refinedOptions, extra = _a.extra;\n warnUnknownOptions(extra);\n var dateProfileGenerator = this.buildDateProfileGenerator({\n dateProfileGeneratorClass: viewSpec.optionDefaults.dateProfileGeneratorClass,\n duration: viewSpec.duration,\n durationUnit: viewSpec.durationUnit,\n usesMinMaxTime: viewSpec.optionDefaults.usesMinMaxTime,\n dateEnv: optionsData.dateEnv,\n calendarApi: this.props.calendarApi,\n slotMinTime: refinedOptions.slotMinTime,\n slotMaxTime: refinedOptions.slotMaxTime,\n showNonCurrentDates: refinedOptions.showNonCurrentDates,\n dayCount: refinedOptions.dayCount,\n dateAlignment: refinedOptions.dateAlignment,\n dateIncrement: refinedOptions.dateIncrement,\n hiddenDays: refinedOptions.hiddenDays,\n weekends: refinedOptions.weekends,\n nowInput: refinedOptions.now,\n validRangeInput: refinedOptions.validRange,\n visibleRangeInput: refinedOptions.visibleRange,\n monthMode: refinedOptions.monthMode,\n fixedWeekCount: refinedOptions.fixedWeekCount\n });\n var viewApi = this.buildViewApi(viewType, this.getCurrentData, optionsData.dateEnv);\n return { viewSpec: viewSpec, options: refinedOptions, dateProfileGenerator: dateProfileGenerator, viewApi: viewApi };\n };\n CalendarDataManager.prototype.processRawViewOptions = function (viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) {\n var raw = mergeRawOptions([\n BASE_OPTION_DEFAULTS,\n viewSpec.optionDefaults,\n localeDefaults,\n optionOverrides,\n viewSpec.optionOverrides,\n dynamicOptionOverrides\n ]);\n var refiners = __assign(__assign(__assign(__assign(__assign(__assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), VIEW_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners);\n var refined = {};\n var currentRaw = this.currentViewOptionsInput;\n var currentRefined = this.currentViewOptionsRefined;\n var anyChanges = false;\n var extra = {};\n for (var optionName in raw) {\n if (raw[optionName] === currentRaw[optionName]) {\n refined[optionName] = currentRefined[optionName];\n }\n else {\n if (raw[optionName] === this.currentCalendarOptionsInput[optionName]) {\n if (optionName in this.currentCalendarOptionsRefined) { // might be an \"extra\" prop\n refined[optionName] = this.currentCalendarOptionsRefined[optionName];\n }\n }\n else if (refiners[optionName]) {\n refined[optionName] = refiners[optionName](raw[optionName]);\n }\n else {\n extra[optionName] = raw[optionName];\n }\n anyChanges = true;\n }\n }\n if (anyChanges) {\n this.currentViewOptionsInput = raw;\n this.currentViewOptionsRefined = refined;\n }\n return {\n rawOptions: this.currentViewOptionsInput,\n refinedOptions: this.currentViewOptionsRefined,\n extra: extra\n };\n };\n return CalendarDataManager;\n}());\nfunction buildDateEnv$1(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, pluginHooks, availableLocaleData, defaultSeparator) {\n var locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map);\n return new DateEnv({\n calendarSystem: 'gregory',\n timeZone: timeZone,\n namedTimeZoneImpl: pluginHooks.namedTimeZonedImpl,\n locale: locale,\n weekNumberCalculation: weekNumberCalculation,\n firstDay: firstDay,\n weekText: weekText,\n cmdFormatter: pluginHooks.cmdFormatter,\n defaultSeparator: defaultSeparator\n });\n}\nfunction buildTheme(options, pluginHooks) {\n var ThemeClass = pluginHooks.themeClasses[options.themeSystem] || StandardTheme;\n return new ThemeClass(options);\n}\nfunction buildDateProfileGenerator(props) {\n var DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator;\n return new DateProfileGeneratorClass(props);\n}\nfunction buildViewApi(type, getCurrentData, dateEnv) {\n return new ViewApi(type, getCurrentData, dateEnv);\n}\nfunction buildEventUiBySource(eventSources) {\n return mapHash(eventSources, function (eventSource) {\n return eventSource.ui;\n });\n}\nfunction buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) {\n var eventUiBases = { '': eventUiSingleBase };\n for (var defId in eventDefs) {\n var def = eventDefs[defId];\n if (def.sourceId && eventUiBySource[def.sourceId]) {\n eventUiBases[defId] = eventUiBySource[def.sourceId];\n }\n }\n return eventUiBases;\n}\nfunction buildViewUiProps(calendarContext) {\n var options = calendarContext.options;\n return {\n eventUiSingleBase: createEventUi({\n display: options.eventDisplay,\n editable: options.editable,\n startEditable: options.eventStartEditable,\n durationEditable: options.eventDurationEditable,\n constraint: options.eventConstraint,\n overlap: typeof options.eventOverlap === 'boolean' ? options.eventOverlap : undefined,\n allow: options.eventAllow,\n backgroundColor: options.eventBackgroundColor,\n borderColor: options.eventBorderColor,\n textColor: options.eventTextColor,\n color: options.eventColor\n // classNames: options.eventClassNames // render hook will handle this\n }, calendarContext),\n selectionConfig: createEventUi({\n constraint: options.selectConstraint,\n overlap: typeof options.selectOverlap === 'boolean' ? options.selectOverlap : undefined,\n allow: options.selectAllow\n }, calendarContext)\n };\n}\nfunction parseContextBusinessHours(calendarContext) {\n return parseBusinessHours(calendarContext.options.businessHours, calendarContext);\n}\nfunction warnUnknownOptions(options, viewName) {\n for (var optionName in options) {\n console.warn(\"Unknown option '\" + optionName + \"'\" +\n (viewName ? \" for view '\" + viewName + \"'\" : ''));\n }\n}\n\n// TODO: move this to react plugin?\nvar CalendarDataProvider = /** @class */ (function (_super) {\n __extends(CalendarDataProvider, _super);\n function CalendarDataProvider(props) {\n var _this = _super.call(this, props) || this;\n _this.handleData = function (data) {\n if (!_this.dataManager) { // still within initial run, before assignment in constructor\n // eslint-disable-next-line react/no-direct-mutation-state\n _this.state = data; // can't use setState yet\n }\n else {\n _this.setState(data);\n }\n };\n _this.dataManager = new CalendarDataManager({\n optionOverrides: props.optionOverrides,\n calendarApi: props.calendarApi,\n onData: _this.handleData\n });\n return _this;\n }\n CalendarDataProvider.prototype.render = function () {\n return this.props.children(this.state);\n };\n CalendarDataProvider.prototype.componentDidUpdate = function (prevProps) {\n var newOptionOverrides = this.props.optionOverrides;\n if (newOptionOverrides !== prevProps.optionOverrides) { // prevent recursive handleData\n this.dataManager.resetOptions(newOptionOverrides);\n }\n };\n return CalendarDataProvider;\n}(Component));\n\n// HELPERS\n/*\nif nextDayThreshold is specified, slicing is done in an all-day fashion.\nyou can get nextDayThreshold from context.nextDayThreshold\n*/\nfunction sliceEvents(props, allDay) {\n return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;\n}\n\nvar NamedTimeZoneImpl = /** @class */ (function () {\n function NamedTimeZoneImpl(timeZoneName) {\n this.timeZoneName = timeZoneName;\n }\n return NamedTimeZoneImpl;\n}());\n\nvar Interaction = /** @class */ (function () {\n function Interaction(settings) {\n this.component = settings.component;\n }\n Interaction.prototype.destroy = function () {\n };\n return Interaction;\n}());\nfunction parseInteractionSettings(component, input) {\n return {\n component: component,\n el: input.el,\n useEventCenter: input.useEventCenter != null ? input.useEventCenter : true\n };\n}\nfunction interactionSettingsToStore(settings) {\n var _a;\n return _a = {},\n _a[settings.component.uid] = settings,\n _a;\n}\n// global state\nvar interactionSettingsStore = {};\n\n/*\nAn abstraction for a dragging interaction originating on an event.\nDoes higher-level things than PointerDragger, such as possibly:\n- a \"mirror\" that moves with the pointer\n- a minimum number of pixels or other criteria for a true drag to begin\n\nsubclasses must emit:\n- pointerdown\n- dragstart\n- dragmove\n- pointerup\n- dragend\n*/\nvar ElementDragging = /** @class */ (function () {\n function ElementDragging(el, selector) {\n this.emitter = new Emitter();\n }\n ElementDragging.prototype.destroy = function () {\n };\n ElementDragging.prototype.setMirrorIsVisible = function (bool) {\n // optional if subclass doesn't want to support a mirror\n };\n ElementDragging.prototype.setMirrorNeedsRevert = function (bool) {\n // optional if subclass doesn't want to support a mirror\n };\n ElementDragging.prototype.setAutoScrollEnabled = function (bool) {\n // optional\n };\n return ElementDragging;\n}());\n\n// TODO: get rid of this in favor of options system,\n// tho it's really easy to access this globally rather than pass thru options.\nvar config = {};\n\n/*\nInformation about what will happen when an external element is dragged-and-dropped\nonto a calendar. Contains information for creating an event.\n*/\nvar DRAG_META_REFINERS = {\n startTime: createDuration,\n duration: createDuration,\n create: Boolean,\n sourceId: String\n};\nfunction parseDragMeta(raw) {\n var _a = refineProps(raw, DRAG_META_REFINERS), refined = _a.refined, extra = _a.extra;\n return {\n startTime: refined.startTime || null,\n duration: refined.duration || null,\n create: refined.create != null ? refined.create : true,\n sourceId: refined.sourceId,\n leftoverProps: extra\n };\n}\n\nvar Toolbar = /** @class */ (function (_super) {\n __extends(Toolbar, _super);\n function Toolbar() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Toolbar.prototype.render = function () {\n var _a = this.props, model = _a.model, extraClassName = _a.extraClassName;\n var forceLtr = false;\n var startContent, endContent;\n var centerContent = model.center;\n if (model.left) {\n forceLtr = true;\n startContent = model.left;\n }\n else {\n startContent = model.start;\n }\n if (model.right) {\n forceLtr = true;\n endContent = model.right;\n }\n else {\n endContent = model.end;\n }\n var classNames = [\n extraClassName || '',\n 'fc-toolbar',\n forceLtr ? 'fc-toolbar-ltr' : ''\n ];\n return (createElement(\"div\", { className: classNames.join(' ') },\n this.renderSection('start', startContent || []),\n this.renderSection('center', centerContent || []),\n this.renderSection('end', endContent || [])));\n };\n Toolbar.prototype.renderSection = function (key, widgetGroups) {\n var props = this.props;\n return (createElement(ToolbarSection, { key: key, widgetGroups: widgetGroups, title: props.title, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled }));\n };\n return Toolbar;\n}(BaseComponent));\nvar ToolbarSection = /** @class */ (function (_super) {\n __extends(ToolbarSection, _super);\n function ToolbarSection() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ToolbarSection.prototype.render = function () {\n var _this = this;\n var children = this.props.widgetGroups.map(function (widgetGroup) { return _this.renderWidgetGroup(widgetGroup); });\n return createElement.apply(void 0, __spreadArrays(['div', { className: 'fc-toolbar-chunk' }], children));\n };\n ToolbarSection.prototype.renderWidgetGroup = function (widgetGroup) {\n var props = this.props;\n var theme = this.context.theme;\n var children = [];\n var isOnlyButtons = true;\n for (var _i = 0, widgetGroup_1 = widgetGroup; _i < widgetGroup_1.length; _i++) {\n var widget = widgetGroup_1[_i];\n var buttonName = widget.buttonName, buttonClick = widget.buttonClick, buttonText = widget.buttonText, buttonIcon = widget.buttonIcon;\n if (buttonName === 'title') {\n isOnlyButtons = false;\n children.push(createElement(\"h2\", { className: 'fc-toolbar-title' }, props.title));\n }\n else {\n var ariaAttrs = buttonIcon ? { 'aria-label': buttonName } : {};\n var buttonClasses = ['fc-' + buttonName + '-button', theme.getClass('button')];\n if (buttonName === props.activeButton) {\n buttonClasses.push(theme.getClass('buttonActive'));\n }\n var isDisabled = (!props.isTodayEnabled && buttonName === 'today') ||\n (!props.isPrevEnabled && buttonName === 'prev') ||\n (!props.isNextEnabled && buttonName === 'next');\n children.push(createElement(\"button\", __assign({ disabled: isDisabled, className: buttonClasses.join(' '), onClick: buttonClick, type: 'button' }, ariaAttrs), buttonText || (buttonIcon ? createElement(\"span\", { className: buttonIcon }) : '')));\n }\n }\n if (children.length > 1) {\n var groupClassName = (isOnlyButtons && theme.getClass('buttonGroup')) || '';\n return createElement.apply(void 0, __spreadArrays(['div', { className: groupClassName }], children));\n }\n else {\n return children[0];\n }\n };\n return ToolbarSection;\n}(BaseComponent));\n\n// TODO: do function component?\nvar ViewContainer = /** @class */ (function (_super) {\n __extends(ViewContainer, _super);\n function ViewContainer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ViewContainer.prototype.render = function () {\n var props = this.props;\n var aspectRatio = props.aspectRatio;\n var classNames = [\n 'fc-view-harness',\n (aspectRatio || props.liquid || props.height)\n ? 'fc-view-harness-active' // harness controls the height\n : 'fc-view-harness-passive' // let the view do the height\n ];\n var height = '';\n var paddingBottom = '';\n if (aspectRatio) {\n paddingBottom = (1 / aspectRatio) * 100 + '%';\n }\n else {\n height = props.height || '';\n }\n return (createElement(\"div\", { ref: props.elRef, onClick: props.onClick, className: classNames.join(' '), style: { height: height, paddingBottom: paddingBottom } }, props.children));\n };\n return ViewContainer;\n}(BaseComponent));\n\n/*\nDetects when the user clicks on an event within a DateComponent\n*/\nvar EventClicking = /** @class */ (function (_super) {\n __extends(EventClicking, _super);\n function EventClicking(settings) {\n var _this = _super.call(this, settings) || this;\n _this.handleSegClick = function (ev, segEl) {\n var component = _this.component;\n var context = component.context;\n var seg = getElSeg(segEl);\n if (seg && // might be the
surrounding the more link\n component.isValidSegDownEl(ev.target)) {\n // our way to simulate a link click for elements that can't be tags\n // grab before trigger fired in case trigger trashes DOM thru rerendering\n var hasUrlContainer = elementClosest(ev.target, '.fc-event-forced-url');\n var url = hasUrlContainer ? hasUrlContainer.querySelector('a[href]').href : '';\n context.emitter.trigger('eventClick', {\n el: segEl,\n event: new EventApi(component.context, seg.eventRange.def, seg.eventRange.instance),\n jsEvent: ev,\n view: context.viewApi\n });\n if (url && !ev.defaultPrevented) {\n window.location.href = url;\n }\n }\n };\n _this.destroy = listenBySelector(settings.el, 'click', '.fc-event', // on both fg and bg events\n _this.handleSegClick);\n return _this;\n }\n return EventClicking;\n}(Interaction));\n\n/*\nTriggers events and adds/removes core classNames when the user's pointer\nenters/leaves event-elements of a component.\n*/\nvar EventHovering = /** @class */ (function (_super) {\n __extends(EventHovering, _super);\n function EventHovering(settings) {\n var _this = _super.call(this, settings) || this;\n // for simulating an eventMouseLeave when the event el is destroyed while mouse is over it\n _this.handleEventElRemove = function (el) {\n if (el === _this.currentSegEl) {\n _this.handleSegLeave(null, _this.currentSegEl);\n }\n };\n _this.handleSegEnter = function (ev, segEl) {\n if (getElSeg(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper\n _this.currentSegEl = segEl;\n _this.triggerEvent('eventMouseEnter', ev, segEl);\n }\n };\n _this.handleSegLeave = function (ev, segEl) {\n if (_this.currentSegEl) {\n _this.currentSegEl = null;\n _this.triggerEvent('eventMouseLeave', ev, segEl);\n }\n };\n _this.removeHoverListeners = listenToHoverBySelector(settings.el, '.fc-event', // on both fg and bg events\n _this.handleSegEnter, _this.handleSegLeave);\n return _this;\n }\n EventHovering.prototype.destroy = function () {\n this.removeHoverListeners();\n };\n EventHovering.prototype.triggerEvent = function (publicEvName, ev, segEl) {\n var component = this.component;\n var context = component.context;\n var seg = getElSeg(segEl);\n if (!ev || component.isValidSegDownEl(ev.target)) {\n context.emitter.trigger(publicEvName, {\n el: segEl,\n event: new EventApi(context, seg.eventRange.def, seg.eventRange.instance),\n jsEvent: ev,\n view: context.viewApi\n });\n }\n };\n return EventHovering;\n}(Interaction));\n\nvar CalendarContent = /** @class */ (function (_super) {\n __extends(CalendarContent, _super);\n function CalendarContent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.buildViewContext = memoize(buildViewContext);\n _this.buildViewPropTransformers = memoize(buildViewPropTransformers);\n _this.buildToolbarProps = memoize(buildToolbarProps);\n _this.handleNavLinkClick = buildDelegationHandler('a[data-navlink]', _this._handleNavLinkClick.bind(_this));\n _this.headerRef = createRef();\n _this.footerRef = createRef();\n _this.interactionsStore = {};\n // Component Registration\n // -----------------------------------------------------------------------------------------------------------------\n _this.registerInteractiveComponent = function (component, settingsInput) {\n var settings = parseInteractionSettings(component, settingsInput);\n var DEFAULT_INTERACTIONS = [\n EventClicking,\n EventHovering\n ];\n var interactionClasses = DEFAULT_INTERACTIONS.concat(_this.props.pluginHooks.componentInteractions);\n var interactions = interactionClasses.map(function (interactionClass) {\n return new interactionClass(settings);\n });\n _this.interactionsStore[component.uid] = interactions;\n interactionSettingsStore[component.uid] = settings;\n };\n _this.unregisterInteractiveComponent = function (component) {\n for (var _i = 0, _a = _this.interactionsStore[component.uid]; _i < _a.length; _i++) {\n var listener = _a[_i];\n listener.destroy();\n }\n delete _this.interactionsStore[component.uid];\n delete interactionSettingsStore[component.uid];\n };\n // Resizing\n // -----------------------------------------------------------------------------------------------------------------\n _this.resizeRunner = new DelayedRunner(function () {\n _this.props.emitter.trigger('_resize', true); // should window resizes be considered \"forced\" ?\n _this.props.emitter.trigger('windowResize', { view: _this.props.viewApi });\n });\n _this.handleWindowResize = function (ev) {\n var options = _this.props.options;\n if (options.handleWindowResize &&\n ev.target === window // avoid jqui events\n ) {\n _this.resizeRunner.request(options.windowResizeDelay);\n }\n };\n return _this;\n }\n /*\n renders INSIDE of an outer div\n */\n CalendarContent.prototype.render = function () {\n var props = this.props;\n var toolbarConfig = props.toolbarConfig, options = props.options;\n var toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), // TODO: use NowTimer????\n props.viewTitle);\n var viewVGrow = false;\n var viewHeight = '';\n var viewAspectRatio;\n if (props.isHeightAuto || props.forPrint) {\n viewHeight = '';\n }\n else if (options.height != null) {\n viewVGrow = true;\n }\n else if (options.contentHeight != null) {\n viewHeight = options.contentHeight;\n }\n else {\n viewAspectRatio = Math.max(options.aspectRatio, 0.5); // prevent from getting too tall\n }\n var viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.theme, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent);\n return (createElement(ViewContextType.Provider, { value: viewContext },\n toolbarConfig.headerToolbar &&\n createElement(Toolbar, __assign({ ref: this.headerRef, extraClassName: 'fc-header-toolbar', model: toolbarConfig.headerToolbar }, toolbarProps)),\n createElement(ViewContainer, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, onClick: this.handleNavLinkClick },\n this.renderView(props),\n this.buildAppendContent()),\n toolbarConfig.footerToolbar &&\n createElement(Toolbar, __assign({ ref: this.footerRef, extraClassName: 'fc-footer-toolbar', model: toolbarConfig.footerToolbar }, toolbarProps))));\n };\n CalendarContent.prototype.componentDidMount = function () {\n var props = this.props;\n this.calendarInteractions = props.pluginHooks.calendarInteractions\n .map(function (calendarInteractionClass) {\n return new calendarInteractionClass(props);\n });\n window.addEventListener('resize', this.handleWindowResize);\n var propSetHandlers = props.pluginHooks.propSetHandlers;\n for (var propName in propSetHandlers) {\n propSetHandlers[propName](props[propName], props);\n }\n };\n CalendarContent.prototype.componentDidUpdate = function (prevProps) {\n var props = this.props;\n var propSetHandlers = props.pluginHooks.propSetHandlers;\n for (var propName in propSetHandlers) {\n if (props[propName] !== prevProps[propName]) {\n propSetHandlers[propName](props[propName], props);\n }\n }\n };\n CalendarContent.prototype.componentWillUnmount = function () {\n window.removeEventListener('resize', this.handleWindowResize);\n this.resizeRunner.clear();\n for (var _i = 0, _a = this.calendarInteractions; _i < _a.length; _i++) {\n var interaction = _a[_i];\n interaction.destroy();\n }\n this.props.emitter.trigger('_unmount');\n };\n CalendarContent.prototype._handleNavLinkClick = function (ev, anchorEl) {\n var _a = this.props, dateEnv = _a.dateEnv, options = _a.options, calendarApi = _a.calendarApi;\n var navLinkOptions = anchorEl.getAttribute('data-navlink');\n navLinkOptions = navLinkOptions ? JSON.parse(navLinkOptions) : {};\n var dateMarker = dateEnv.createMarker(navLinkOptions.date);\n var viewType = navLinkOptions.type;\n var customAction = viewType === 'day' ? options.navLinkDayClick :\n viewType === 'week' ? options.navLinkWeekClick : null;\n if (typeof customAction === 'function') {\n customAction.call(calendarApi, dateEnv.toDate(dateMarker), ev);\n }\n else {\n if (typeof customAction === 'string') {\n viewType = customAction;\n }\n calendarApi.zoomTo(dateMarker, viewType);\n }\n };\n CalendarContent.prototype.buildAppendContent = function () {\n var props = this.props;\n var children = props.pluginHooks.viewContainerAppends.map(function (buildAppendContent) { return buildAppendContent(props); });\n return createElement.apply(void 0, __spreadArrays([Fragment, {}], children));\n };\n CalendarContent.prototype.renderView = function (props) {\n var pluginHooks = props.pluginHooks;\n var viewSpec = props.viewSpec;\n var viewProps = {\n dateProfile: props.dateProfile,\n businessHours: props.businessHours,\n eventStore: props.renderableEventStore,\n eventUiBases: props.eventUiBases,\n dateSelection: props.dateSelection,\n eventSelection: props.eventSelection,\n eventDrag: props.eventDrag,\n eventResize: props.eventResize,\n isHeightAuto: props.isHeightAuto,\n forPrint: props.forPrint\n };\n var transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers);\n for (var _i = 0, transformers_1 = transformers; _i < transformers_1.length; _i++) {\n var transformer = transformers_1[_i];\n __assign(viewProps, transformer.transform(viewProps, props));\n }\n var ViewComponent = viewSpec.component;\n return (createElement(ViewComponent, __assign({}, viewProps)));\n };\n return CalendarContent;\n}(PureComponent));\nfunction buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now, title) {\n // don't force any date-profiles to valid date profiles (the `false`) so that we can tell if it's invalid\n var todayInfo = dateProfileGenerator.build(now, undefined, false); // TODO: need `undefined` or else INFINITE LOOP for some reason\n var prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, false);\n var nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, false);\n return {\n title: title,\n activeButton: viewSpec.type,\n isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now),\n isPrevEnabled: prevInfo.isValid,\n isNextEnabled: nextInfo.isValid\n };\n}\n// Plugin\n// -----------------------------------------------------------------------------------------------------------------\nfunction buildViewPropTransformers(theClasses) {\n return theClasses.map(function (theClass) {\n return new theClass();\n });\n}\n\nvar canVGrowWithinCell;\nfunction getCanVGrowWithinCell() {\n if (canVGrowWithinCell == null) {\n canVGrowWithinCell = computeCanVGrowWithinCell();\n }\n return canVGrowWithinCell;\n}\nfunction computeCanVGrowWithinCell() {\n // TODO: abstraction for creating these temporary detection-based els\n var el = document.createElement('div');\n el.style.position = 'absolute'; // for not interfering with current layout\n el.style.top = '0';\n el.style.left = '0';\n el.innerHTML = '
';\n document.body.appendChild(el);\n var div = el.querySelector('div');\n var possible = div.offsetHeight > 0;\n document.body.removeChild(el);\n return possible;\n}\n\nvar CalendarRoot = /** @class */ (function (_super) {\n __extends(CalendarRoot, _super);\n function CalendarRoot() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n forPrint: false\n };\n _this.handleBeforePrint = function () {\n _this.setState({ forPrint: true });\n };\n _this.handleAfterPrint = function () {\n _this.setState({ forPrint: false });\n };\n return _this;\n }\n CalendarRoot.prototype.render = function () {\n var props = this.props;\n var options = props.options;\n var forPrint = this.state.forPrint;\n var isHeightAuto = forPrint || options.height === 'auto' || options.contentHeight === 'auto';\n var height = (!isHeightAuto && options.height != null) ? options.height : '';\n var classNames = [\n 'fc',\n forPrint ? 'fc-media-print' : 'fc-media-screen',\n 'fc-direction-' + options.direction,\n props.theme.getClass('root')\n ];\n if (!getCanVGrowWithinCell()) {\n classNames.push('fc-liquid-hack');\n }\n return props.children(classNames, height, isHeightAuto, forPrint);\n };\n CalendarRoot.prototype.componentDidMount = function () {\n var emitter = this.props.emitter;\n emitter.on('_beforeprint', this.handleBeforePrint);\n emitter.on('_afterprint', this.handleAfterPrint);\n };\n CalendarRoot.prototype.componentWillUnmount = function () {\n var emitter = this.props.emitter;\n emitter.off('_beforeprint', this.handleBeforePrint);\n emitter.off('_afterprint', this.handleAfterPrint);\n };\n return CalendarRoot;\n}(BaseComponent));\n\n// Computes a default column header formatting string if `colFormat` is not explicitly defined\nfunction computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) {\n // if more than one week row, or if there are a lot of columns with not much space,\n // put just the day numbers will be in each cell\n if (!datesRepDistinctDays || dayCnt > 10) {\n return createFormatter({ weekday: 'short' }); // \"Sat\"\n }\n else if (dayCnt > 1) {\n return createFormatter({ weekday: 'short', month: 'numeric', day: 'numeric', omitCommas: true }); // \"Sat 11/12\"\n }\n else {\n return createFormatter({ weekday: 'long' }); // \"Saturday\"\n }\n}\n\nvar CLASS_NAME = 'fc-col-header-cell'; // do the cushion too? no\nvar TableDateCell = /** @class */ (function (_super) {\n __extends(TableDateCell, _super);\n function TableDateCell() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TableDateCell.prototype.render = function () {\n var _a = this.context, dateEnv = _a.dateEnv, options = _a.options, theme = _a.theme, viewApi = _a.viewApi;\n var props = this.props;\n var date = props.date, dateProfile = props.dateProfile;\n var dayMeta = getDateMeta(date, props.todayRange, null, dateProfile);\n var classNames = [CLASS_NAME].concat(getDayClassNames(dayMeta, theme));\n var text = dateEnv.format(date, props.dayHeaderFormat);\n // if colCnt is 1, we are already in a day-view and don't need a navlink\n var navLinkAttrs = (options.navLinks && !dayMeta.isDisabled && props.colCnt > 1)\n ? { 'data-navlink': buildNavLinkData(date), tabIndex: 0 }\n : {};\n var hookProps = __assign(__assign(__assign({ date: dateEnv.toDate(date), view: viewApi }, props.extraHookProps), { text: text }), dayMeta);\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (createElement(\"th\", __assign({ ref: rootElRef, className: classNames.concat(customClassNames).join(' '), \"data-date\": !dayMeta.isDisabled ? formatDayString(date) : undefined, colSpan: props.colSpan }, props.extraDataAttrs),\n createElement(\"div\", { className: 'fc-scrollgrid-sync-inner' }, !dayMeta.isDisabled &&\n createElement(\"a\", __assign({ ref: innerElRef, className: [\n 'fc-col-header-cell-cushion',\n props.isSticky ? 'fc-sticky' : ''\n ].join(' ') }, navLinkAttrs), innerContent)))); }));\n };\n return TableDateCell;\n}(BaseComponent));\nvar TableDowCell = /** @class */ (function (_super) {\n __extends(TableDowCell, _super);\n function TableDowCell() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TableDowCell.prototype.render = function () {\n var props = this.props;\n var _a = this.context, dateEnv = _a.dateEnv, theme = _a.theme, viewApi = _a.viewApi, options = _a.options;\n var date = addDays(new Date(259200000), props.dow); // start with Sun, 04 Jan 1970 00:00:00 GMT\n var dateMeta = {\n dow: props.dow,\n isDisabled: false,\n isFuture: false,\n isPast: false,\n isToday: false,\n isOther: false\n };\n var classNames = [CLASS_NAME].concat(getDayClassNames(dateMeta, theme), props.extraClassNames || []);\n var text = dateEnv.format(date, props.dayHeaderFormat);\n var hookProps = __assign(__assign(__assign(__assign({ // TODO: make this public?\n date: date }, dateMeta), { view: viewApi }), props.extraHookProps), { text: text });\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (createElement(\"th\", __assign({ ref: rootElRef, className: classNames.concat(customClassNames).join(' '), colSpan: props.colSpan }, props.extraDataAttrs),\n createElement(\"div\", { className: 'fc-scrollgrid-sync-inner' },\n createElement(\"a\", { className: [\n 'fc-col-header-cell-cushion',\n props.isSticky ? 'fc-sticky' : ''\n ].join(' '), ref: innerElRef }, innerContent)))); }));\n };\n return TableDowCell;\n}(BaseComponent));\nfunction renderInner(hookProps) {\n return hookProps.text;\n}\n\nvar NowTimer = /** @class */ (function (_super) {\n __extends(NowTimer, _super);\n function NowTimer(props, context) {\n var _this = _super.call(this, props, context) || this;\n _this.initialNowDate = getNow(context.options.now, context.dateEnv);\n _this.initialNowQueriedMs = new Date().valueOf();\n _this.state = _this.computeTiming().currentState;\n return _this;\n }\n NowTimer.prototype.render = function () {\n var _a = this, props = _a.props, state = _a.state;\n return props.children(state.nowDate, state.todayRange);\n };\n NowTimer.prototype.componentDidMount = function () {\n this.setTimeout();\n };\n NowTimer.prototype.componentDidUpdate = function (prevProps) {\n if (prevProps.unit !== this.props.unit) {\n this.clearTimeout();\n this.setTimeout();\n }\n };\n NowTimer.prototype.componentWillUnmount = function () {\n this.clearTimeout();\n };\n NowTimer.prototype.computeTiming = function () {\n var _a = this, props = _a.props, context = _a.context;\n var unroundedNow = addMs(this.initialNowDate, new Date().valueOf() - this.initialNowQueriedMs);\n var currentUnitStart = context.dateEnv.startOf(unroundedNow, props.unit);\n var nextUnitStart = context.dateEnv.add(currentUnitStart, createDuration(1, props.unit));\n var waitMs = nextUnitStart.valueOf() - unroundedNow.valueOf();\n return {\n currentState: { nowDate: currentUnitStart, todayRange: buildDayRange(currentUnitStart) },\n nextState: { nowDate: nextUnitStart, todayRange: buildDayRange(nextUnitStart) },\n waitMs: waitMs\n };\n };\n NowTimer.prototype.setTimeout = function () {\n var _this = this;\n var _a = this.computeTiming(), nextState = _a.nextState, waitMs = _a.waitMs;\n this.timeoutId = setTimeout(function () {\n _this.setState(nextState, function () {\n _this.setTimeout();\n });\n }, waitMs);\n };\n NowTimer.prototype.clearTimeout = function () {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n };\n NowTimer.contextType = ViewContextType;\n return NowTimer;\n}(Component));\nfunction buildDayRange(date) {\n var start = startOfDay(date);\n var end = addDays(start, 1);\n return { start: start, end: end };\n}\n\nvar DayHeader = /** @class */ (function (_super) {\n __extends(DayHeader, _super);\n function DayHeader() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.createDayHeaderFormatter = memoize(createDayHeaderFormatter);\n return _this;\n }\n DayHeader.prototype.render = function () {\n var context = this.context;\n var _a = this.props, dates = _a.dates, dateProfile = _a.dateProfile, datesRepDistinctDays = _a.datesRepDistinctDays, renderIntro = _a.renderIntro;\n var dayHeaderFormat = this.createDayHeaderFormatter(context.options.dayHeaderFormat, datesRepDistinctDays, dates.length);\n return (createElement(NowTimer, { unit: 'day' }, function (nowDate, todayRange) { return (createElement(\"tr\", null,\n renderIntro && renderIntro(),\n dates.map(function (date) { return (datesRepDistinctDays ?\n createElement(TableDateCell, { key: date.toISOString(), date: date, dateProfile: dateProfile, todayRange: todayRange, colCnt: dates.length, dayHeaderFormat: dayHeaderFormat }) :\n createElement(TableDowCell, { key: date.getUTCDay(), dow: date.getUTCDay(), dayHeaderFormat: dayHeaderFormat })); }))); }));\n };\n return DayHeader;\n}(BaseComponent));\nfunction createDayHeaderFormatter(explicitFormat, datesRepDistinctDays, dateCnt) {\n return explicitFormat || computeFallbackHeaderFormat(datesRepDistinctDays, dateCnt);\n}\n\nvar DaySeriesModel = /** @class */ (function () {\n function DaySeriesModel(range, dateProfileGenerator) {\n var date = range.start;\n var end = range.end;\n var indices = [];\n var dates = [];\n var dayIndex = -1;\n while (date < end) { // loop each day from start to end\n if (dateProfileGenerator.isHiddenDay(date)) {\n indices.push(dayIndex + 0.5); // mark that it's between indices\n }\n else {\n dayIndex++;\n indices.push(dayIndex);\n dates.push(date);\n }\n date = addDays(date, 1);\n }\n this.dates = dates;\n this.indices = indices;\n this.cnt = dates.length;\n }\n DaySeriesModel.prototype.sliceRange = function (range) {\n var firstIndex = this.getDateDayIndex(range.start); // inclusive first index\n var lastIndex = this.getDateDayIndex(addDays(range.end, -1)); // inclusive last index\n var clippedFirstIndex = Math.max(0, firstIndex);\n var clippedLastIndex = Math.min(this.cnt - 1, lastIndex);\n // deal with in-between indices\n clippedFirstIndex = Math.ceil(clippedFirstIndex); // in-between starts round to next cell\n clippedLastIndex = Math.floor(clippedLastIndex); // in-between ends round to prev cell\n if (clippedFirstIndex <= clippedLastIndex) {\n return {\n firstIndex: clippedFirstIndex,\n lastIndex: clippedLastIndex,\n isStart: firstIndex === clippedFirstIndex,\n isEnd: lastIndex === clippedLastIndex\n };\n }\n else {\n return null;\n }\n };\n // Given a date, returns its chronolocial cell-index from the first cell of the grid.\n // If the date lies between cells (because of hiddenDays), returns a floating-point value between offsets.\n // If before the first offset, returns a negative number.\n // If after the last offset, returns an offset past the last cell offset.\n // Only works for *start* dates of cells. Will not work for exclusive end dates for cells.\n DaySeriesModel.prototype.getDateDayIndex = function (date) {\n var indices = this.indices;\n var dayOffset = Math.floor(diffDays(this.dates[0], date));\n if (dayOffset < 0) {\n return indices[0] - 1;\n }\n else if (dayOffset >= indices.length) {\n return indices[indices.length - 1] + 1;\n }\n else {\n return indices[dayOffset];\n }\n };\n return DaySeriesModel;\n}());\n\nvar DayTableModel = /** @class */ (function () {\n function DayTableModel(daySeries, breakOnWeeks) {\n var dates = daySeries.dates;\n var daysPerRow;\n var firstDay;\n var rowCnt;\n if (breakOnWeeks) {\n // count columns until the day-of-week repeats\n firstDay = dates[0].getUTCDay();\n for (daysPerRow = 1; daysPerRow < dates.length; daysPerRow++) {\n if (dates[daysPerRow].getUTCDay() === firstDay) {\n break;\n }\n }\n rowCnt = Math.ceil(dates.length / daysPerRow);\n }\n else {\n rowCnt = 1;\n daysPerRow = dates.length;\n }\n this.rowCnt = rowCnt;\n this.colCnt = daysPerRow;\n this.daySeries = daySeries;\n this.cells = this.buildCells();\n this.headerDates = this.buildHeaderDates();\n }\n DayTableModel.prototype.buildCells = function () {\n var rows = [];\n for (var row = 0; row < this.rowCnt; row++) {\n var cells = [];\n for (var col = 0; col < this.colCnt; col++) {\n cells.push(this.buildCell(row, col));\n }\n rows.push(cells);\n }\n return rows;\n };\n DayTableModel.prototype.buildCell = function (row, col) {\n var date = this.daySeries.dates[row * this.colCnt + col];\n return {\n key: date.toISOString(),\n date: date\n };\n };\n DayTableModel.prototype.buildHeaderDates = function () {\n var dates = [];\n for (var col = 0; col < this.colCnt; col++) {\n dates.push(this.cells[0][col].date);\n }\n return dates;\n };\n DayTableModel.prototype.sliceRange = function (range) {\n var colCnt = this.colCnt;\n var seriesSeg = this.daySeries.sliceRange(range);\n var segs = [];\n if (seriesSeg) {\n var firstIndex = seriesSeg.firstIndex, lastIndex = seriesSeg.lastIndex;\n var index = firstIndex;\n while (index <= lastIndex) {\n var row = Math.floor(index / colCnt);\n var nextIndex = Math.min((row + 1) * colCnt, lastIndex + 1);\n segs.push({\n row: row,\n firstCol: index % colCnt,\n lastCol: (nextIndex - 1) % colCnt,\n isStart: seriesSeg.isStart && index === firstIndex,\n isEnd: seriesSeg.isEnd && (nextIndex - 1) === lastIndex\n });\n index = nextIndex;\n }\n }\n return segs;\n };\n return DayTableModel;\n}());\n\nvar Slicer = /** @class */ (function () {\n function Slicer() {\n this.sliceBusinessHours = memoize(this._sliceBusinessHours);\n this.sliceDateSelection = memoize(this._sliceDateSpan);\n this.sliceEventStore = memoize(this._sliceEventStore);\n this.sliceEventDrag = memoize(this._sliceInteraction);\n this.sliceEventResize = memoize(this._sliceInteraction);\n this.forceDayIfListItem = false; // hack\n }\n Slicer.prototype.sliceProps = function (props, dateProfile, nextDayThreshold, context) {\n var extraArgs = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n extraArgs[_i - 4] = arguments[_i];\n }\n var eventUiBases = props.eventUiBases;\n var eventSegs = this.sliceEventStore.apply(this, __spreadArrays([props.eventStore, eventUiBases, dateProfile, nextDayThreshold], extraArgs));\n return {\n dateSelectionSegs: this.sliceDateSelection.apply(this, __spreadArrays([props.dateSelection, eventUiBases, context], extraArgs)),\n businessHourSegs: this.sliceBusinessHours.apply(this, __spreadArrays([props.businessHours, dateProfile, nextDayThreshold, context], extraArgs)),\n fgEventSegs: eventSegs.fg,\n bgEventSegs: eventSegs.bg,\n eventDrag: this.sliceEventDrag.apply(this, __spreadArrays([props.eventDrag, eventUiBases, dateProfile, nextDayThreshold], extraArgs)),\n eventResize: this.sliceEventResize.apply(this, __spreadArrays([props.eventResize, eventUiBases, dateProfile, nextDayThreshold], extraArgs)),\n eventSelection: props.eventSelection\n }; // TODO: give interactionSegs?\n };\n Slicer.prototype.sliceNowDate = function (// does not memoize\n date, context) {\n var extraArgs = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n extraArgs[_i - 2] = arguments[_i];\n }\n return this._sliceDateSpan.apply(this, __spreadArrays([{ range: { start: date, end: addMs(date, 1) }, allDay: false },\n {},\n context], extraArgs));\n };\n Slicer.prototype._sliceBusinessHours = function (businessHours, dateProfile, nextDayThreshold, context) {\n var extraArgs = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n extraArgs[_i - 4] = arguments[_i];\n }\n if (!businessHours) {\n return [];\n }\n return this._sliceEventStore.apply(this, __spreadArrays([expandRecurring(businessHours, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), context),\n {},\n dateProfile,\n nextDayThreshold], extraArgs)).bg;\n };\n Slicer.prototype._sliceEventStore = function (eventStore, eventUiBases, dateProfile, nextDayThreshold) {\n var extraArgs = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n extraArgs[_i - 4] = arguments[_i];\n }\n if (eventStore) {\n var rangeRes = sliceEventStore(eventStore, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold);\n return {\n bg: this.sliceEventRanges(rangeRes.bg, extraArgs),\n fg: this.sliceEventRanges(rangeRes.fg, extraArgs)\n };\n }\n else {\n return { bg: [], fg: [] };\n }\n };\n Slicer.prototype._sliceInteraction = function (interaction, eventUiBases, dateProfile, nextDayThreshold) {\n var extraArgs = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n extraArgs[_i - 4] = arguments[_i];\n }\n if (!interaction) {\n return null;\n }\n var rangeRes = sliceEventStore(interaction.mutatedEvents, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold);\n return {\n segs: this.sliceEventRanges(rangeRes.fg, extraArgs),\n affectedInstances: interaction.affectedEvents.instances,\n isEvent: interaction.isEvent\n };\n };\n Slicer.prototype._sliceDateSpan = function (dateSpan, eventUiBases, context) {\n var extraArgs = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n extraArgs[_i - 3] = arguments[_i];\n }\n if (!dateSpan) {\n return [];\n }\n var eventRange = fabricateEventRange(dateSpan, eventUiBases, context);\n var segs = this.sliceRange.apply(this, __spreadArrays([dateSpan.range], extraArgs));\n for (var _a = 0, segs_1 = segs; _a < segs_1.length; _a++) {\n var seg = segs_1[_a];\n seg.eventRange = eventRange;\n }\n return segs;\n };\n /*\n \"complete\" seg means it has component and eventRange\n */\n Slicer.prototype.sliceEventRanges = function (eventRanges, extraArgs) {\n var segs = [];\n for (var _i = 0, eventRanges_1 = eventRanges; _i < eventRanges_1.length; _i++) {\n var eventRange = eventRanges_1[_i];\n segs.push.apply(segs, this.sliceEventRange(eventRange, extraArgs));\n }\n return segs;\n };\n /*\n \"complete\" seg means it has component and eventRange\n */\n Slicer.prototype.sliceEventRange = function (eventRange, extraArgs) {\n var dateRange = eventRange.range;\n // hack to make multi-day events that are being force-displayed as list-items to take up only one day\n if (this.forceDayIfListItem && eventRange.ui.display === 'list-item') {\n dateRange = {\n start: dateRange.start,\n end: addDays(dateRange.start, 1)\n };\n }\n var segs = this.sliceRange.apply(this, __spreadArrays([dateRange], extraArgs));\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n seg.eventRange = eventRange;\n seg.isStart = eventRange.isStart && seg.isStart;\n seg.isEnd = eventRange.isEnd && seg.isEnd;\n }\n return segs;\n };\n return Slicer;\n}());\n/*\nfor incorporating slotMinTime/slotMaxTime if appropriate\nTODO: should be part of DateProfile!\nTimelineDateProfile already does this btw\n*/\nfunction computeActiveRange(dateProfile, isComponentAllDay) {\n var range = dateProfile.activeRange;\n if (isComponentAllDay) {\n return range;\n }\n return {\n start: addMs(range.start, dateProfile.slotMinTime.milliseconds),\n end: addMs(range.end, dateProfile.slotMaxTime.milliseconds - 864e5) // 864e5 = ms in a day\n };\n}\n\nvar VISIBLE_HIDDEN_RE = /^(visible|hidden)$/;\nvar Scroller = /** @class */ (function (_super) {\n __extends(Scroller, _super);\n function Scroller() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handleEl = function (el) {\n _this.el = el;\n setRef(_this.props.elRef, el);\n };\n return _this;\n }\n Scroller.prototype.render = function () {\n var props = this.props;\n var liquid = props.liquid, liquidIsAbsolute = props.liquidIsAbsolute;\n var isAbsolute = liquid && liquidIsAbsolute;\n var className = ['fc-scroller'];\n if (liquid) {\n if (liquidIsAbsolute) {\n className.push('fc-scroller-liquid-absolute');\n }\n else {\n className.push('fc-scroller-liquid');\n }\n }\n return (createElement(\"div\", { ref: this.handleEl, className: className.join(' '), style: {\n overflowX: props.overflowX,\n overflowY: props.overflowY,\n left: (isAbsolute && -(props.overcomeLeft || 0)) || '',\n right: (isAbsolute && -(props.overcomeRight || 0)) || '',\n bottom: (isAbsolute && -(props.overcomeBottom || 0)) || '',\n marginLeft: (!isAbsolute && -(props.overcomeLeft || 0)) || '',\n marginRight: (!isAbsolute && -(props.overcomeRight || 0)) || '',\n marginBottom: (!isAbsolute && -(props.overcomeBottom || 0)) || '',\n maxHeight: props.maxHeight || ''\n } }, props.children));\n };\n Scroller.prototype.needsXScrolling = function () {\n if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) {\n return false;\n }\n // testing scrollWidth>clientWidth is unreliable cross-browser when pixel heights aren't integers.\n // much more reliable to see if children are taller than the scroller, even tho doesn't account for\n // inner-child margins and absolute positioning\n var el = this.el;\n var realClientWidth = this.el.getBoundingClientRect().width - this.getYScrollbarWidth();\n var children = el.children;\n for (var i = 0; i < children.length; i++) {\n var childEl = children[i];\n if (childEl.getBoundingClientRect().width > realClientWidth) {\n return true;\n }\n }\n return false;\n };\n Scroller.prototype.needsYScrolling = function () {\n if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) {\n return false;\n }\n // testing scrollHeight>clientHeight is unreliable cross-browser when pixel heights aren't integers.\n // much more reliable to see if children are taller than the scroller, even tho doesn't account for\n // inner-child margins and absolute positioning\n var el = this.el;\n var realClientHeight = this.el.getBoundingClientRect().height - this.getXScrollbarWidth();\n var children = el.children;\n for (var i = 0; i < children.length; i++) {\n var childEl = children[i];\n if (childEl.getBoundingClientRect().height > realClientHeight) {\n return true;\n }\n }\n return false;\n };\n Scroller.prototype.getXScrollbarWidth = function () {\n if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) {\n return 0;\n }\n else {\n return this.el.offsetHeight - this.el.clientHeight; // only works because we guarantee no borders. TODO: add to CSS with important?\n }\n };\n Scroller.prototype.getYScrollbarWidth = function () {\n if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) {\n return 0;\n }\n else {\n return this.el.offsetWidth - this.el.clientWidth; // only works because we guarantee no borders. TODO: add to CSS with important?\n }\n };\n return Scroller;\n}(BaseComponent));\n\n/*\nTODO: somehow infer OtherArgs from masterCallback?\nTODO: infer RefType from masterCallback if provided\n*/\nvar RefMap = /** @class */ (function () {\n function RefMap(masterCallback) {\n var _this = this;\n this.masterCallback = masterCallback;\n this.currentMap = {};\n this.depths = {};\n this.callbackMap = {};\n this.handleValue = function (val, key) {\n var _a = _this, depths = _a.depths, currentMap = _a.currentMap;\n var removed = false;\n var added = false;\n if (val !== null) {\n removed = (key in currentMap); // for bug... ACTUALLY: can probably do away with this now that callers don't share numeric indices anymore\n currentMap[key] = val;\n depths[key] = (depths[key] || 0) + 1;\n added = true;\n }\n else if (--depths[key] === 0) {\n delete currentMap[key];\n delete _this.callbackMap[key];\n removed = true;\n }\n if (_this.masterCallback) {\n if (removed) {\n _this.masterCallback(null, String(key));\n }\n if (added) {\n _this.masterCallback(val, String(key));\n }\n }\n };\n }\n RefMap.prototype.createRef = function (key) {\n var _this = this;\n var refCallback = this.callbackMap[key];\n if (!refCallback) {\n refCallback = this.callbackMap[key] = function (val) {\n _this.handleValue(val, String(key));\n };\n }\n return refCallback;\n };\n // TODO: check callers that don't care about order. should use getAll instead\n // NOTE: this method has become less valuable now that we are encouraged to map order by some other index\n // TODO: provide ONE array-export function, buildArray, which fails on non-numeric indexes. caller can manipulate and \"collect\"\n RefMap.prototype.collect = function (startIndex, endIndex, step) {\n return collectFromHash(this.currentMap, startIndex, endIndex, step);\n };\n RefMap.prototype.getAll = function () {\n return hashValuesToArray(this.currentMap);\n };\n return RefMap;\n}());\n\nfunction computeShrinkWidth(chunkEls) {\n var shrinkCells = findElements(chunkEls, '.fc-scrollgrid-shrink');\n var largestWidth = 0;\n for (var _i = 0, shrinkCells_1 = shrinkCells; _i < shrinkCells_1.length; _i++) {\n var shrinkCell = shrinkCells_1[_i];\n largestWidth = Math.max(largestWidth, computeSmallestCellWidth(shrinkCell));\n }\n return Math.ceil(largestWidth); // elements work best with integers. round up to ensure contents fits\n}\nfunction getSectionHasLiquidHeight(props, sectionConfig) {\n return props.liquid && sectionConfig.liquid; // does the section do liquid-height? (need to have whole scrollgrid liquid-height as well)\n}\nfunction getAllowYScrolling(props, sectionConfig) {\n return sectionConfig.maxHeight != null || // if its possible for the height to max out, we might need scrollbars\n getSectionHasLiquidHeight(props, sectionConfig); // if the section is liquid height, it might condense enough to require scrollbars\n}\n// TODO: ONLY use `arg`. force out internal function to use same API\nfunction renderChunkContent(sectionConfig, chunkConfig, arg) {\n var expandRows = arg.expandRows;\n var content = typeof chunkConfig.content === 'function' ?\n chunkConfig.content(arg) :\n createElement('table', {\n className: [\n chunkConfig.tableClassName,\n sectionConfig.syncRowHeights ? 'fc-scrollgrid-sync-table' : ''\n ].join(' '),\n style: {\n minWidth: arg.tableMinWidth,\n width: arg.clientWidth,\n height: expandRows ? arg.clientHeight : '' // css `height` on a
serves as a min-height\n }\n }, arg.tableColGroupNode, createElement('tbody', {}, typeof chunkConfig.rowContent === 'function' ? chunkConfig.rowContent(arg) : chunkConfig.rowContent));\n return content;\n}\nfunction isColPropsEqual(cols0, cols1) {\n return isArraysEqual(cols0, cols1, isPropsEqual);\n}\nfunction renderMicroColGroup(cols, shrinkWidth) {\n var colNodes = [];\n /*\n for ColProps with spans, it would have been great to make a single \n HOWEVER, Chrome was getting messing up distributing the width to elements makes Chrome behave.\n */\n for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) {\n var colProps = cols_1[_i];\n var span = colProps.span || 1;\n for (var i = 0; i < span; i++) {\n colNodes.push(createElement(\"col\", { style: {\n width: colProps.width === 'shrink' ? sanitizeShrinkWidth(shrinkWidth) : (colProps.width || ''),\n minWidth: colProps.minWidth || ''\n } }));\n }\n }\n return createElement.apply(void 0, __spreadArrays(['colgroup', {}], colNodes));\n}\nfunction sanitizeShrinkWidth(shrinkWidth) {\n /* why 4? if we do 0, it will kill any border, which are needed for computeSmallestCellWidth\n 4 accounts for 2 2-pixel borders. TODO: better solution? */\n return shrinkWidth == null ? 4 : shrinkWidth;\n}\nfunction hasShrinkWidth(cols) {\n for (var _i = 0, cols_2 = cols; _i < cols_2.length; _i++) {\n var col = cols_2[_i];\n if (col.width === 'shrink') {\n return true;\n }\n }\n return false;\n}\nfunction getScrollGridClassNames(liquid, context) {\n var classNames = [\n 'fc-scrollgrid',\n context.theme.getClass('table')\n ];\n if (liquid) {\n classNames.push('fc-scrollgrid-liquid');\n }\n return classNames;\n}\nfunction getSectionClassNames(sectionConfig, wholeTableVGrow) {\n var classNames = [\n 'fc-scrollgrid-section',\n sectionConfig.className // used?\n ];\n if (wholeTableVGrow && sectionConfig.liquid && sectionConfig.maxHeight == null) {\n classNames.push('fc-scrollgrid-section-liquid');\n }\n if (sectionConfig.isSticky) {\n classNames.push('fc-scrollgrid-section-sticky');\n }\n return classNames;\n}\nfunction renderScrollShim(arg) {\n return (createElement(\"div\", { className: 'fc-scrollgrid-sticky-shim', style: {\n width: arg.clientWidth,\n minWidth: arg.tableMinWidth\n } }));\n}\nfunction getStickyHeaderDates(options) {\n var stickyHeaderDates = options.stickyHeaderDates;\n if (stickyHeaderDates == null || stickyHeaderDates === 'auto') {\n stickyHeaderDates = options.height === 'auto' || options.viewHeight === 'auto';\n }\n return stickyHeaderDates;\n}\nfunction getStickyFooterScrollbar(options) {\n var stickyFooterScrollbar = options.stickyFooterScrollbar;\n if (stickyFooterScrollbar == null || stickyFooterScrollbar === 'auto') {\n stickyFooterScrollbar = options.height === 'auto' || options.viewHeight === 'auto';\n }\n return stickyFooterScrollbar;\n}\n\nvar SimpleScrollGrid = /** @class */ (function (_super) {\n __extends(SimpleScrollGrid, _super);\n function SimpleScrollGrid() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.processCols = memoize(function (a) { return a; }, isColPropsEqual); // so we get same `cols` props every time\n _this.renderMicroColGroup = memoize(renderMicroColGroup); // yucky to memoize VNodes, but much more efficient for consumers\n _this.scrollerRefs = new RefMap();\n _this.scrollerElRefs = new RefMap(_this._handleScrollerEl.bind(_this));\n _this.state = {\n shrinkWidth: null,\n forceYScrollbars: false,\n scrollerClientWidths: {},\n scrollerClientHeights: {}\n };\n // TODO: can do a really simple print-view. dont need to join rows\n _this.handleSizing = function () {\n _this.setState(__assign({ shrinkWidth: _this.computeShrinkWidth() }, _this.computeScrollerDims()));\n };\n return _this;\n }\n SimpleScrollGrid.prototype.render = function () {\n var _a = this, props = _a.props, state = _a.state, context = _a.context;\n var sectionConfigs = props.sections || [];\n var cols = this.processCols(props.cols);\n var microColGroupNode = this.renderMicroColGroup(cols, state.shrinkWidth);\n var classNames = getScrollGridClassNames(props.liquid, context);\n // TODO: make DRY\n var configCnt = sectionConfigs.length;\n var configI = 0;\n var currentConfig;\n var headSectionNodes = [];\n var bodySectionNodes = [];\n var footSectionNodes = [];\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'header') {\n headSectionNodes.push(this.renderSection(currentConfig, configI, microColGroupNode));\n configI++;\n }\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'body') {\n bodySectionNodes.push(this.renderSection(currentConfig, configI, microColGroupNode));\n configI++;\n }\n while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === 'footer') {\n footSectionNodes.push(this.renderSection(currentConfig, configI, microColGroupNode));\n configI++;\n }\n return (createElement(\"table\", { className: classNames.join(' '), style: { height: props.height } },\n Boolean(headSectionNodes.length) && createElement.apply(void 0, __spreadArrays(['thead', {}], headSectionNodes)),\n Boolean(bodySectionNodes.length) && createElement.apply(void 0, __spreadArrays(['tbody', {}], bodySectionNodes)),\n Boolean(footSectionNodes.length) && createElement.apply(void 0, __spreadArrays(['tfoot', {}], footSectionNodes))));\n };\n SimpleScrollGrid.prototype.renderSection = function (sectionConfig, sectionI, microColGroupNode) {\n if ('outerContent' in sectionConfig) {\n return (createElement(Fragment, { key: sectionConfig.key }, sectionConfig.outerContent));\n }\n return (createElement(\"tr\", { key: sectionConfig.key, className: getSectionClassNames(sectionConfig, this.props.liquid).join(' ') }, this.renderChunkTd(sectionConfig, sectionI, microColGroupNode, sectionConfig.chunk)));\n };\n SimpleScrollGrid.prototype.renderChunkTd = function (sectionConfig, sectionI, microColGroupNode, chunkConfig) {\n if ('outerContent' in chunkConfig) {\n return chunkConfig.outerContent;\n }\n var props = this.props;\n var _a = this.state, forceYScrollbars = _a.forceYScrollbars, scrollerClientWidths = _a.scrollerClientWidths, scrollerClientHeights = _a.scrollerClientHeights;\n var needsYScrolling = getAllowYScrolling(props, sectionConfig); // TODO: do lazily. do in section config?\n var isLiquid = getSectionHasLiquidHeight(props, sectionConfig);\n // for `!props.liquid` - is WHOLE scrollgrid natural height?\n // TODO: do same thing in advanced scrollgrid? prolly not b/c always has horizontal scrollbars\n var overflowY = !props.liquid ? 'visible' :\n forceYScrollbars ? 'scroll' :\n !needsYScrolling ? 'hidden' :\n 'auto';\n var content = renderChunkContent(sectionConfig, chunkConfig, {\n tableColGroupNode: microColGroupNode,\n tableMinWidth: '',\n clientWidth: scrollerClientWidths[sectionI] !== undefined ? scrollerClientWidths[sectionI] : null,\n clientHeight: scrollerClientHeights[sectionI] !== undefined ? scrollerClientHeights[sectionI] : null,\n expandRows: sectionConfig.expandRows,\n syncRowHeights: false,\n rowSyncHeights: [],\n reportRowHeightChange: function () { }\n });\n return (createElement(\"td\", { ref: chunkConfig.elRef },\n createElement(\"div\", { className: 'fc-scroller-harness' + (isLiquid ? ' fc-scroller-harness-liquid' : '') },\n createElement(Scroller, { ref: this.scrollerRefs.createRef(sectionI), elRef: this.scrollerElRefs.createRef(sectionI), overflowY: overflowY, overflowX: !props.liquid ? 'visible' : 'hidden' /* natural height? */, maxHeight: sectionConfig.maxHeight, liquid: isLiquid, liquidIsAbsolute: true /* because its within a harness */ }, content))));\n };\n SimpleScrollGrid.prototype._handleScrollerEl = function (scrollerEl, key) {\n var sectionI = parseInt(key, 10);\n var chunkConfig = this.props.sections[sectionI].chunk;\n setRef(chunkConfig.scrollerElRef, scrollerEl);\n };\n SimpleScrollGrid.prototype.componentDidMount = function () {\n this.handleSizing();\n this.context.addResizeHandler(this.handleSizing);\n };\n SimpleScrollGrid.prototype.componentDidUpdate = function () {\n // TODO: need better solution when state contains non-sizing things\n this.handleSizing();\n };\n SimpleScrollGrid.prototype.componentWillUnmount = function () {\n this.context.removeResizeHandler(this.handleSizing);\n };\n SimpleScrollGrid.prototype.computeShrinkWidth = function () {\n return hasShrinkWidth(this.props.cols)\n ? computeShrinkWidth(this.scrollerElRefs.getAll())\n : 0;\n };\n SimpleScrollGrid.prototype.computeScrollerDims = function () {\n var scrollbarWidth = getScrollbarWidths();\n var sectionCnt = this.props.sections.length;\n var _a = this, scrollerRefs = _a.scrollerRefs, scrollerElRefs = _a.scrollerElRefs;\n var forceYScrollbars = false;\n var scrollerClientWidths = {};\n var scrollerClientHeights = {};\n for (var sectionI = 0; sectionI < sectionCnt; sectionI++) { // along edge\n var scroller = scrollerRefs.currentMap[sectionI];\n if (scroller && scroller.needsYScrolling()) {\n forceYScrollbars = true;\n break;\n }\n }\n for (var sectionI = 0; sectionI < sectionCnt; sectionI++) { // along edge\n var scrollerEl = scrollerElRefs.currentMap[sectionI];\n if (scrollerEl) {\n var harnessEl = scrollerEl.parentNode; // TODO: weird way to get this. need harness b/c doesn't include table borders\n scrollerClientWidths[sectionI] = Math.floor(harnessEl.getBoundingClientRect().width - (forceYScrollbars\n ? scrollbarWidth.y // use global because scroller might not have scrollbars yet but will need them in future\n : 0));\n scrollerClientHeights[sectionI] = Math.floor(harnessEl.getBoundingClientRect().height // never has horizontal scrollbars\n );\n }\n }\n return { forceYScrollbars: forceYScrollbars, scrollerClientWidths: scrollerClientWidths, scrollerClientHeights: scrollerClientHeights };\n };\n return SimpleScrollGrid;\n}(BaseComponent));\nSimpleScrollGrid.addStateEquality({\n scrollerClientWidths: isPropsEqual,\n scrollerClientHeights: isPropsEqual\n});\n\nvar EventRoot = /** @class */ (function (_super) {\n __extends(EventRoot, _super);\n function EventRoot() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.elRef = createRef();\n return _this;\n }\n EventRoot.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var options = context.options;\n var seg = props.seg;\n var eventRange = seg.eventRange;\n var ui = eventRange.ui;\n var hookProps = {\n event: new EventApi(context, eventRange.def, eventRange.instance),\n view: context.viewApi,\n timeText: props.timeText,\n textColor: ui.textColor,\n backgroundColor: ui.backgroundColor,\n borderColor: ui.borderColor,\n isDraggable: !props.disableDragging && computeSegDraggable(seg, context),\n isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context),\n isEndResizable: !props.disableResizing && computeSegEndResizable(seg),\n isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),\n isStart: Boolean(seg.isStart),\n isEnd: Boolean(seg.isEnd),\n isPast: Boolean(props.isPast),\n isFuture: Boolean(props.isFuture),\n isToday: Boolean(props.isToday),\n isSelected: Boolean(props.isSelected),\n isDragging: Boolean(props.isDragging),\n isResizing: Boolean(props.isResizing)\n };\n var standardClassNames = getEventClassNames(hookProps).concat(ui.classNames);\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.eventClassNames, content: options.eventContent, defaultContent: props.defaultContent, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount, elRef: this.elRef }, function (rootElRef, customClassNames, innerElRef, innerContent) { return props.children(rootElRef, standardClassNames.concat(customClassNames), innerElRef, innerContent, hookProps); }));\n };\n EventRoot.prototype.componentDidMount = function () {\n setElSeg(this.elRef.current, this.props.seg);\n };\n /*\n need to re-assign seg to the element if seg changes, even if the element is the same\n */\n EventRoot.prototype.componentDidUpdate = function (prevProps) {\n var seg = this.props.seg;\n if (seg !== prevProps.seg) {\n setElSeg(this.elRef.current, seg);\n }\n };\n return EventRoot;\n}(BaseComponent));\n\n// should not be a purecomponent\nvar StandardEvent = /** @class */ (function (_super) {\n __extends(StandardEvent, _super);\n function StandardEvent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n StandardEvent.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var seg = props.seg;\n var timeFormat = context.options.eventTimeFormat || props.defaultTimeFormat;\n var timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd);\n return (createElement(EventRoot, { seg: seg, timeText: timeText, disableDragging: props.disableDragging, disableResizing: props.disableResizing, defaultContent: props.defaultContent || renderInnerContent, isDragging: props.isDragging, isResizing: props.isResizing, isDateSelecting: props.isDateSelecting, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function (rootElRef, classNames, innerElRef, innerContent, hookProps) { return (createElement(\"a\", __assign({ className: props.extraClassNames.concat(classNames).join(' '), style: {\n borderColor: hookProps.borderColor,\n backgroundColor: hookProps.backgroundColor\n }, ref: rootElRef }, getSegAnchorAttrs(seg)),\n createElement(\"div\", { className: 'fc-event-main', ref: innerElRef, style: { color: hookProps.textColor } }, innerContent),\n hookProps.isStartResizable &&\n createElement(\"div\", { className: 'fc-event-resizer fc-event-resizer-start' }),\n hookProps.isEndResizable &&\n createElement(\"div\", { className: 'fc-event-resizer fc-event-resizer-end' }))); }));\n };\n return StandardEvent;\n}(BaseComponent));\nfunction renderInnerContent(innerProps) {\n return (createElement(\"div\", { className: 'fc-event-main-frame' },\n innerProps.timeText &&\n createElement(\"div\", { className: 'fc-event-time' }, innerProps.timeText),\n createElement(\"div\", { className: 'fc-event-title-container' },\n createElement(\"div\", { className: 'fc-event-title fc-sticky' }, innerProps.event.title || createElement(Fragment, null, \"\\u00A0\")))));\n}\nfunction getSegAnchorAttrs(seg) {\n var url = seg.eventRange.def.url;\n return url ? { href: url } : {};\n}\n\nvar NowIndicatorRoot = function (props) { return (createElement(ViewContextType.Consumer, null, function (context) {\n var options = context.options;\n var hookProps = {\n isAxis: props.isAxis,\n date: context.dateEnv.toDate(props.date),\n view: context.viewApi\n };\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.nowIndicatorClassNames, content: options.nowIndicatorContent, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount }, props.children));\n})); };\n\nvar DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });\nvar DayCellRoot = /** @class */ (function (_super) {\n __extends(DayCellRoot, _super);\n function DayCellRoot() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.refineHookProps = memoizeObjArg(refineHookProps);\n _this.normalizeClassNames = buildClassNameNormalizer();\n return _this;\n }\n DayCellRoot.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var options = context.options;\n var hookProps = this.refineHookProps({\n date: props.date,\n dateProfile: props.dateProfile,\n todayRange: props.todayRange,\n showDayNumber: props.showDayNumber,\n extraProps: props.extraHookProps,\n viewApi: context.viewApi,\n dateEnv: context.dateEnv\n });\n var classNames = getDayClassNames(hookProps, context.theme).concat(hookProps.isDisabled\n ? [] // don't use custom classNames if disabled\n : this.normalizeClassNames(options.dayCellClassNames, hookProps));\n var dataAttrs = hookProps.isDisabled ? {} : {\n 'data-date': formatDayString(props.date)\n };\n return (createElement(MountHook, { hookProps: hookProps, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount, elRef: props.elRef }, function (rootElRef) { return props.children(rootElRef, classNames, dataAttrs, hookProps.isDisabled); }));\n };\n return DayCellRoot;\n}(BaseComponent));\nvar DayCellContent = /** @class */ (function (_super) {\n __extends(DayCellContent, _super);\n function DayCellContent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DayCellContent.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var options = context.options;\n var hookProps = refineHookProps({\n date: props.date,\n dateProfile: props.dateProfile,\n todayRange: props.todayRange,\n showDayNumber: props.showDayNumber,\n extraProps: props.extraHookProps,\n viewApi: context.viewApi,\n dateEnv: context.dateEnv\n });\n return (createElement(ContentHook, { hookProps: hookProps, content: options.dayCellContent, defaultContent: props.defaultContent }, props.children));\n };\n return DayCellContent;\n}(BaseComponent));\nfunction refineHookProps(raw) {\n var date = raw.date, dateEnv = raw.dateEnv;\n var dayMeta = getDateMeta(date, raw.todayRange, null, raw.dateProfile);\n return __assign(__assign(__assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { dayNumberText: raw.showDayNumber ? dateEnv.format(date, DAY_NUM_FORMAT) : '' }), raw.extraProps);\n}\n\nfunction renderFill(fillType) {\n return (createElement(\"div\", { className: \"fc-\" + fillType }));\n}\nvar BgEvent = function (props) { return (createElement(EventRoot, { defaultContent: renderInnerContent$1, seg: props.seg /* uselesss i think */, timeText: '' /* weird */, disableDragging: true, disableResizing: true, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function (rootElRef, classNames, innerElRef, innerContent, hookProps) { return (createElement(\"div\", { ref: rootElRef, className: ['fc-bg-event'].concat(classNames).join(' '), style: {\n backgroundColor: hookProps.backgroundColor\n } }, innerContent)); })); };\nfunction renderInnerContent$1(props) {\n var title = props.event.title;\n return title && (createElement(\"div\", { className: 'fc-event-title' }, props.event.title));\n}\n\nvar WeekNumberRoot = function (props) { return (createElement(ViewContextType.Consumer, null, function (context) {\n var dateEnv = context.dateEnv, options = context.options;\n var date = props.date;\n var format = options.weekNumberFormat || props.defaultFormat;\n var num = dateEnv.computeWeekNumber(date); // TODO: somehow use for formatting as well?\n var text = dateEnv.format(date, format);\n var hookProps = { num: num, text: text, date: date };\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.weekNumberClassNames, content: options.weekNumberContent, defaultContent: renderInner$1, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount }, props.children));\n})); };\nfunction renderInner$1(innerProps) {\n return innerProps.text;\n}\n\n// exports\n// --------------------------------------------------------------------------------------------------\nvar version = '<%= version %>'; // important to type it, so .d.ts has generic string\n\nexport { BASE_OPTION_DEFAULTS, BASE_OPTION_REFINERS, BaseComponent, BgEvent, CalendarApi, CalendarContent, CalendarDataManager, CalendarDataProvider, CalendarRoot, ContentHook, CustomContentRenderContext, DateComponent, DateEnv, DateProfileGenerator, DayCellContent, DayCellRoot, DayHeader, DaySeriesModel, DayTableModel, DelayedRunner, ElementDragging, ElementScrollController, Emitter, EventApi, EventRoot, EventSourceApi, Interaction, MountHook, NamedTimeZoneImpl, NowIndicatorRoot, NowTimer, PositionCache, RefMap, RenderHook, ScrollController, ScrollResponder, Scroller, SimpleScrollGrid, Slicer, Splitter, StandardEvent, TableDateCell, TableDowCell, Theme, ViewApi, ViewContextType, ViewRoot, WeekNumberRoot, WindowScrollController, addDays, addDurations, addMs, addWeeks, allowContextMenu, allowSelection, applyMutationToEventStore, applyStyle, applyStyleProp, asRoughMinutes, asRoughMs, asRoughSeconds, buildClassNameNormalizer, buildEventApis, buildEventRangeKey, buildHashFromArray, buildNavLinkData, buildSegCompareObj, buildSegTimeText, collectFromHash, combineEventUis, compareByFieldSpec, compareByFieldSpecs, compareNumbers, compareObjs, computeEdges, computeFallbackHeaderFormat, computeHeightAndMargins, computeInnerRect, computeRect, computeSegDraggable, computeSegEndResizable, computeSegStartResizable, computeShrinkWidth, computeSmallestCellWidth, computeVisibleDayRange, config, constrainPoint, createDuration, createEmptyEventStore, createEventInstance, createEventUi, createFormatter, createPlugin, diffDates, diffDayAndTime, diffDays, diffPoints, diffWeeks, diffWholeDays, diffWholeWeeks, disableCursor, elementClosest, elementMatches, enableCursor, eventTupleToStore, filterEventStoreDefs, filterHash, findDirectChildren, findElements, flexibleCompare, formatDate, formatDayString, formatIsoTimeString, formatRange, getAllowYScrolling, getClippingParents, getDateMeta, getDayClassNames, getDefaultEventEnd, getElSeg, getEventClassNames, getIsRtlScrollbarOnLeft, getRectCenter, getRelevantEvents, getScrollGridClassNames, getScrollbarWidths, getSectionClassNames, getSectionHasLiquidHeight, getSegMeta, getSlotClassNames, getStickyFooterScrollbar, getStickyHeaderDates, getUnequalProps, globalLocales, globalPlugins, greatestDurationDenominator, guid, hasBgRendering, hasShrinkWidth, htmlToElement, identity, interactionSettingsStore, interactionSettingsToStore, intersectRanges, intersectRects, isArraysEqual, isColPropsEqual, isDateSpansEqual, isInt, isInteractionValid, isMultiDayRange, isPropsEqual, isPropsValid, isSingleDay, isValidDate, listenBySelector, mapHash, memoize, memoizeArraylike, memoizeHashlike, memoizeObjArg, mergeEventStores, multiplyDuration, padStart, parseBusinessHours, parseClassNames, parseDragMeta, parseEventDef, parseFieldSpecs, parse as parseMarker, pointInsideRect, preventContextMenu, preventDefault, preventSelection, rangeContainsMarker, rangeContainsRange, rangesEqual, rangesIntersect, refineEventDef, refineProps, removeElement, removeExact, renderChunkContent, renderFill, renderMicroColGroup, renderScrollShim, requestJson, sanitizeShrinkWidth, setElSeg, setRef, sliceEventStore, sliceEvents, sortEventSegs, startOfDay, translateRect, triggerDateSelect, unpromisify, version, whenTransitionDone, wholeDivideDurations };\n//# sourceMappingURL=main.js.map\n","/*!\nFullCalendar v5.1.0\nDocs & License: https://fullcalendar.io/\n(c) 2020 Adam Shaw\n*/\nimport './vdom';\nimport { __extends, __assign } from 'tslib';\nimport { render, createElement, CalendarRoot, CustomContentRenderContext, CalendarContent, flushToDom, DelayedRunner, CalendarDataManager, isArraysEqual, applyStyleProp, CalendarApi } from '@fullcalendar/common';\nexport * from '@fullcalendar/common';\n\nvar Calendar = /** @class */ (function (_super) {\n __extends(Calendar, _super);\n function Calendar(el, optionOverrides) {\n if (optionOverrides === void 0) { optionOverrides = {}; }\n var _this = _super.call(this) || this;\n _this.isRendering = false;\n _this.isRendered = false;\n _this.currentClassNames = [];\n _this.customContentRenderId = 0; // will affect custom generated classNames?\n _this.handleAction = function (action) {\n // actions we know we want to render immediately\n switch (action.type) {\n case 'SET_EVENT_DRAG':\n case 'SET_EVENT_RESIZE':\n _this.renderRunner.tryDrain();\n }\n };\n _this.handleData = function (data) {\n _this.currentData = data;\n _this.renderRunner.request(data.calendarOptions.rerenderDelay);\n };\n _this.handleRenderRequest = function () {\n if (_this.isRendering) {\n _this.isRendered = true;\n var currentData_1 = _this.currentData;\n render(createElement(CalendarRoot, { options: currentData_1.calendarOptions, theme: currentData_1.theme, emitter: currentData_1.emitter }, function (classNames, height, isHeightAuto, forPrint) {\n _this.setClassNames(classNames);\n _this.setHeight(height);\n return (createElement(CustomContentRenderContext.Provider, { value: _this.customContentRenderId },\n createElement(CalendarContent, __assign({ isHeightAuto: isHeightAuto, forPrint: forPrint }, currentData_1))));\n }), _this.el);\n }\n else if (_this.isRendered) {\n _this.isRendered = false;\n render(null, _this.el);\n _this.setClassNames([]);\n _this.setHeight('');\n }\n flushToDom();\n };\n _this.el = el;\n _this.renderRunner = new DelayedRunner(_this.handleRenderRequest);\n new CalendarDataManager({\n optionOverrides: optionOverrides,\n calendarApi: _this,\n onAction: _this.handleAction,\n onData: _this.handleData\n });\n return _this;\n }\n Object.defineProperty(Calendar.prototype, \"view\", {\n get: function () { return this.currentData.viewApi; } // for public API\n ,\n enumerable: false,\n configurable: true\n });\n Calendar.prototype.render = function () {\n if (!this.isRendering) {\n this.isRendering = true;\n }\n else {\n this.customContentRenderId++;\n }\n this.renderRunner.request();\n };\n Calendar.prototype.destroy = function () {\n if (this.isRendering) {\n this.isRendering = false;\n this.renderRunner.request();\n }\n };\n Calendar.prototype.updateSize = function () {\n _super.prototype.updateSize.call(this);\n flushToDom();\n };\n Calendar.prototype.batchRendering = function (func) {\n this.renderRunner.pause('batchRendering');\n func();\n this.renderRunner.resume('batchRendering');\n };\n Calendar.prototype.pauseRendering = function () {\n this.renderRunner.pause('pauseRendering');\n };\n Calendar.prototype.resumeRendering = function () {\n this.renderRunner.resume('pauseRendering', true);\n };\n Calendar.prototype.resetOptions = function (optionOverrides, append) {\n this.currentDataManager.resetOptions(optionOverrides, append);\n };\n Calendar.prototype.setClassNames = function (classNames) {\n if (!isArraysEqual(classNames, this.currentClassNames)) {\n var classList = this.el.classList;\n for (var _i = 0, _a = this.currentClassNames; _i < _a.length; _i++) {\n var className = _a[_i];\n classList.remove(className);\n }\n for (var _b = 0, classNames_1 = classNames; _b < classNames_1.length; _b++) {\n var className = classNames_1[_b];\n classList.add(className);\n }\n this.currentClassNames = classNames;\n }\n };\n Calendar.prototype.setHeight = function (height) {\n applyStyleProp(this.el, 'height', height);\n };\n return Calendar;\n}(CalendarApi));\n\nexport { Calendar };\n//# sourceMappingURL=main.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/*!\nFullCalendar v5.1.0\nDocs & License: https://fullcalendar.io/\n(c) 2020 Adam Shaw\n*/\nimport './main.css';\n\nimport { createRef, getStickyHeaderDates, createElement, ViewRoot, SimpleScrollGrid, getStickyFooterScrollbar, DateComponent, renderScrollShim, createFormatter, setRef, buildNavLinkData, DayCellRoot, WeekNumberRoot, RenderHook, DayCellContent, BaseComponent, buildSegTimeText, EventRoot, Fragment, StandardEvent, sortEventSegs, addDays, intersectRanges, RefMap, isPropsEqual, getSegMeta, buildEventRangeKey, BgEvent, renderFill, PositionCache, mapHash, DelayedRunner, applyStyle, memoize, NowTimer, EventApi, Slicer, DayHeader, DaySeriesModel, DayTableModel, addWeeks, diffWeeks, DateProfileGenerator, identity, createPlugin } from '@fullcalendar/common';\nimport { __extends, __assign, __spreadArrays } from 'tslib';\n\n/* An abstract class for the daygrid views, as well as month view. Renders one or more rows of day cells.\n----------------------------------------------------------------------------------------------------------------------*/\n// It is a manager for a Table subcomponent, which does most of the heavy lifting.\n// It is responsible for managing width/height.\nvar TableView = /** @class */ (function (_super) {\n __extends(TableView, _super);\n function TableView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.headerElRef = createRef();\n return _this;\n }\n TableView.prototype.renderSimpleLayout = function (headerRowContent, bodyContent) {\n var _a = this, props = _a.props, context = _a.context;\n var sections = [];\n var stickyHeaderDates = getStickyHeaderDates(context.options);\n if (headerRowContent) {\n sections.push({\n type: 'header',\n key: 'header',\n isSticky: stickyHeaderDates,\n chunk: {\n elRef: this.headerElRef,\n tableClassName: 'fc-col-header',\n rowContent: headerRowContent\n }\n });\n }\n sections.push({\n type: 'body',\n key: 'body',\n liquid: true,\n chunk: { content: bodyContent }\n });\n return (createElement(ViewRoot, { viewSpec: context.viewSpec }, function (rootElRef, classNames) { return (createElement(\"div\", { ref: rootElRef, className: ['fc-daygrid'].concat(classNames).join(' ') },\n createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, cols: [] /* TODO: make optional? */, sections: sections }))); }));\n };\n TableView.prototype.renderHScrollLayout = function (headerRowContent, bodyContent, colCnt, dayMinWidth) {\n var ScrollGrid = this.context.pluginHooks.scrollGridImpl;\n if (!ScrollGrid) {\n throw new Error('No ScrollGrid implementation');\n }\n var _a = this, props = _a.props, context = _a.context;\n var stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options);\n var stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options);\n var sections = [];\n if (headerRowContent) {\n sections.push({\n type: 'header',\n key: 'header',\n isSticky: stickyHeaderDates,\n chunks: [{\n key: 'main',\n elRef: this.headerElRef,\n tableClassName: 'fc-col-header',\n rowContent: headerRowContent\n }]\n });\n }\n sections.push({\n type: 'body',\n key: 'body',\n liquid: true,\n chunks: [{\n key: 'main',\n content: bodyContent\n }]\n });\n if (stickyFooterScrollbar) {\n sections.push({\n type: 'footer',\n key: 'footer',\n isSticky: true,\n chunks: [{\n key: 'main',\n content: renderScrollShim\n }]\n });\n }\n return (createElement(ViewRoot, { viewSpec: context.viewSpec }, function (rootElRef, classNames) { return (createElement(\"div\", { ref: rootElRef, className: ['fc-daygrid'].concat(classNames).join(' ') },\n createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections: sections }))); }));\n };\n return TableView;\n}(DateComponent));\n\nfunction splitSegsByRow(segs, rowCnt) {\n var byRow = [];\n for (var i = 0; i < rowCnt; i++) {\n byRow[i] = [];\n }\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n byRow[seg.row].push(seg);\n }\n return byRow;\n}\nfunction splitSegsByFirstCol(segs, colCnt) {\n var byCol = [];\n for (var i = 0; i < colCnt; i++) {\n byCol[i] = [];\n }\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n byCol[seg.firstCol].push(seg);\n }\n return byCol;\n}\nfunction splitInteractionByRow(ui, rowCnt) {\n var byRow = [];\n if (!ui) {\n for (var i = 0; i < rowCnt; i++) {\n byRow[i] = null;\n }\n }\n else {\n for (var i = 0; i < rowCnt; i++) {\n byRow[i] = {\n affectedInstances: ui.affectedInstances,\n isEvent: ui.isEvent,\n segs: []\n };\n }\n for (var _i = 0, _a = ui.segs; _i < _a.length; _i++) {\n var seg = _a[_i];\n byRow[seg.row].segs.push(seg);\n }\n }\n return byRow;\n}\n\nvar DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: 'narrow' });\nvar TableCell = /** @class */ (function (_super) {\n __extends(TableCell, _super);\n function TableCell() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handleRootEl = function (el) {\n _this.rootEl = el;\n setRef(_this.props.elRef, el);\n };\n _this.handleMoreLinkClick = function (ev) {\n var props = _this.props;\n if (props.onMoreClick) {\n var allSegs = props.segsByEachCol;\n var hiddenSegs = allSegs.filter(function (seg) { return props.segIsHidden[seg.eventRange.instance.instanceId]; });\n props.onMoreClick({\n date: props.date,\n allSegs: allSegs,\n hiddenSegs: hiddenSegs,\n moreCnt: props.moreCnt,\n dayEl: _this.rootEl,\n ev: ev\n });\n }\n };\n return _this;\n }\n TableCell.prototype.render = function () {\n var _this = this;\n var _a = this.context, options = _a.options, viewApi = _a.viewApi;\n var props = this.props;\n var date = props.date, dateProfile = props.dateProfile;\n var hookProps = {\n num: props.moreCnt,\n text: props.buildMoreLinkText(props.moreCnt),\n view: viewApi\n };\n var navLinkAttrs = options.navLinks\n ? { 'data-navlink': buildNavLinkData(date, 'week'), tabIndex: 0 }\n : {};\n return (createElement(DayCellRoot, { date: date, dateProfile: dateProfile, todayRange: props.todayRange, showDayNumber: props.showDayNumber, extraHookProps: props.extraHookProps, elRef: this.handleRootEl }, function (rootElRef, classNames, rootDataAttrs, isDisabled) { return (createElement(\"td\", __assign({ ref: rootElRef, className: ['fc-daygrid-day'].concat(classNames, props.extraClassNames || []).join(' ') }, rootDataAttrs, props.extraDataAttrs),\n createElement(\"div\", { className: 'fc-daygrid-day-frame fc-scrollgrid-sync-inner', ref: props.innerElRef /* different from hook system! RENAME */ },\n props.showWeekNumber &&\n createElement(WeekNumberRoot, { date: date, defaultFormat: DEFAULT_WEEK_NUM_FORMAT }, function (rootElRef, classNames, innerElRef, innerContent) { return (createElement(\"a\", __assign({ ref: rootElRef, className: ['fc-daygrid-week-number'].concat(classNames).join(' ') }, navLinkAttrs), innerContent)); }),\n !isDisabled &&\n createElement(TableCellTop, { date: date, dateProfile: dateProfile, showDayNumber: props.showDayNumber, todayRange: props.todayRange, extraHookProps: props.extraHookProps }),\n createElement(\"div\", { className: 'fc-daygrid-day-events', ref: props.fgContentElRef, style: { paddingBottom: props.fgPaddingBottom } },\n props.fgContent,\n Boolean(props.moreCnt) &&\n createElement(\"div\", { className: 'fc-daygrid-day-bottom', style: { marginTop: props.moreMarginTop } },\n createElement(RenderHook, { hookProps: hookProps, classNames: options.moreLinkClassNames, content: options.moreLinkContent, defaultContent: renderMoreLinkInner, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, function (rootElRef, classNames, innerElRef, innerContent) { return (createElement(\"a\", { onClick: _this.handleMoreLinkClick, ref: rootElRef, className: ['fc-daygrid-more-link'].concat(classNames).join(' ') }, innerContent)); }))),\n createElement(\"div\", { className: 'fc-daygrid-day-bg' }, props.bgContent)))); }));\n };\n return TableCell;\n}(DateComponent));\nfunction renderTopInner(props) {\n return props.dayNumberText;\n}\nfunction renderMoreLinkInner(props) {\n return props.text;\n}\nvar TableCellTop = /** @class */ (function (_super) {\n __extends(TableCellTop, _super);\n function TableCellTop() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TableCellTop.prototype.render = function () {\n var props = this.props;\n var navLinkAttrs = this.context.options.navLinks\n ? { 'data-navlink': buildNavLinkData(props.date), tabIndex: 0 }\n : {};\n return (createElement(DayCellContent, { date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, showDayNumber: props.showDayNumber, extraHookProps: props.extraHookProps, defaultContent: renderTopInner }, function (innerElRef, innerContent) { return (innerContent &&\n createElement(\"div\", { className: 'fc-daygrid-day-top', ref: innerElRef },\n createElement(\"a\", __assign({ className: 'fc-daygrid-day-number' }, navLinkAttrs), innerContent))); }));\n };\n return TableCellTop;\n}(BaseComponent));\n\nvar DEFAULT_TABLE_EVENT_TIME_FORMAT = createFormatter({\n hour: 'numeric',\n minute: '2-digit',\n omitZeroMinute: true,\n meridiem: 'narrow'\n});\nfunction hasListItemDisplay(seg) {\n var display = seg.eventRange.ui.display;\n return display === 'list-item' || (display === 'auto' &&\n !seg.eventRange.def.allDay &&\n seg.firstCol === seg.lastCol // can't be multi-day\n );\n}\n\nvar TableListItemEvent = /** @class */ (function (_super) {\n __extends(TableListItemEvent, _super);\n function TableListItemEvent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TableListItemEvent.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var timeFormat = context.options.eventTimeFormat || DEFAULT_TABLE_EVENT_TIME_FORMAT;\n var timeText = buildSegTimeText(props.seg, timeFormat, context, true, props.defaultDisplayEventEnd);\n return (createElement(EventRoot, { seg: props.seg, timeText: timeText, defaultContent: renderInnerContent, isDragging: props.isDragging, isResizing: false, isDateSelecting: false, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function (rootElRef, classNames, innerElRef, innerContent) { return ( // we don't use styles!\n createElement(\"a\", __assign({ className: ['fc-daygrid-event', 'fc-daygrid-dot-event'].concat(classNames).join(' '), ref: rootElRef }, getSegAnchorAttrs(props.seg)), innerContent)); }));\n };\n return TableListItemEvent;\n}(BaseComponent));\nfunction renderInnerContent(innerProps) {\n return (createElement(Fragment, null,\n createElement(\"div\", { className: 'fc-daygrid-event-dot', style: { borderColor: innerProps.borderColor || innerProps.backgroundColor } }),\n innerProps.timeText &&\n createElement(\"div\", { className: 'fc-event-time' }, innerProps.timeText),\n createElement(\"div\", { className: 'fc-event-title' }, innerProps.event.title || createElement(Fragment, null, \"\\u00A0\"))));\n}\nfunction getSegAnchorAttrs(seg) {\n var url = seg.eventRange.def.url;\n return url ? { href: url } : {};\n}\n\nvar TableBlockEvent = /** @class */ (function (_super) {\n __extends(TableBlockEvent, _super);\n function TableBlockEvent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TableBlockEvent.prototype.render = function () {\n var props = this.props;\n return (createElement(StandardEvent, __assign({}, props, { extraClassNames: ['fc-daygrid-event', 'fc-daygrid-block-event', 'fc-h-event'], defaultTimeFormat: DEFAULT_TABLE_EVENT_TIME_FORMAT, defaultDisplayEventEnd: props.defaultDisplayEventEnd, disableResizing: !props.seg.eventRange.def.allDay })));\n };\n return TableBlockEvent;\n}(BaseComponent));\n\nfunction computeFgSegPlacement(// for one row. TODO: print mode?\ncellModels, segs, dayMaxEvents, dayMaxEventRows, eventHeights, maxContentHeight, colCnt, eventOrderSpecs) {\n var colPlacements = []; // if event spans multiple cols, its present in each col\n var moreCnts = []; // by-col\n var segIsHidden = {};\n var segTops = {}; // always populated for each seg\n var segMarginTops = {}; // simetimes populated for each seg\n var moreTops = {};\n var paddingBottoms = {}; // for each cell's inner-wrapper div\n for (var i = 0; i < colCnt; i++) {\n colPlacements.push([]);\n moreCnts.push(0);\n }\n segs = sortEventSegs(segs, eventOrderSpecs);\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n var instanceId = seg.eventRange.instance.instanceId;\n var eventHeight = eventHeights[instanceId + ':' + seg.firstCol];\n placeSeg(seg, eventHeight || 0); // will keep colPlacements sorted by top\n }\n if (dayMaxEvents === true || dayMaxEventRows === true) {\n limitByMaxHeight(moreCnts, segIsHidden, colPlacements, maxContentHeight); // populates moreCnts/segIsHidden\n }\n else if (typeof dayMaxEvents === 'number') {\n limitByMaxEvents(moreCnts, segIsHidden, colPlacements, dayMaxEvents); // populates moreCnts/segIsHidden\n }\n else if (typeof dayMaxEventRows === 'number') {\n limitByMaxRows(moreCnts, segIsHidden, colPlacements, dayMaxEventRows); // populates moreCnts/segIsHidden\n }\n // computes segTops/segMarginTops/moreTops/paddingBottoms\n for (var col = 0; col < colCnt; col++) {\n var placements = colPlacements[col];\n var currentNonAbsBottom = 0;\n var runningAbsHeight = 0;\n for (var _a = 0, placements_1 = placements; _a < placements_1.length; _a++) {\n var placement = placements_1[_a];\n var seg = placement.seg;\n if (!segIsHidden[seg.eventRange.instance.instanceId]) {\n segTops[seg.eventRange.instance.instanceId] = placement.top; // from top of container\n if (seg.firstCol === seg.lastCol && seg.isStart && seg.isEnd) { // TODO: simpler way? NOT DRY\n segMarginTops[seg.eventRange.instance.instanceId] =\n placement.top - currentNonAbsBottom; // from previous seg bottom\n runningAbsHeight = 0;\n currentNonAbsBottom = placement.bottom;\n }\n else { // multi-col event, abs positioned\n runningAbsHeight += placement.bottom - placement.top;\n }\n }\n }\n if (runningAbsHeight) {\n if (moreCnts[col]) {\n moreTops[col] = runningAbsHeight;\n }\n else {\n paddingBottoms[col] = runningAbsHeight;\n }\n }\n }\n function placeSeg(seg, segHeight) {\n if (!tryPlaceSegAt(seg, segHeight, 0)) {\n for (var col = seg.firstCol; col <= seg.lastCol; col++) {\n for (var _i = 0, _a = colPlacements[col]; _i < _a.length; _i++) { // will repeat multi-day segs!!!!!!! bad!!!!!!\n var placement = _a[_i];\n if (tryPlaceSegAt(seg, segHeight, placement.bottom)) {\n return;\n }\n }\n }\n }\n }\n function tryPlaceSegAt(seg, segHeight, top) {\n if (canPlaceSegAt(seg, segHeight, top)) {\n for (var col = seg.firstCol; col <= seg.lastCol; col++) {\n var placements = colPlacements[col];\n var insertionIndex = 0;\n while (insertionIndex < placements.length &&\n top >= placements[insertionIndex].top) {\n insertionIndex++;\n }\n placements.splice(insertionIndex, 0, {\n seg: seg,\n top: top,\n bottom: top + segHeight\n });\n }\n return true;\n }\n else {\n return false;\n }\n }\n function canPlaceSegAt(seg, segHeight, top) {\n for (var col = seg.firstCol; col <= seg.lastCol; col++) {\n for (var _i = 0, _a = colPlacements[col]; _i < _a.length; _i++) {\n var placement = _a[_i];\n if (top < placement.bottom && top + segHeight > placement.top) { // collide?\n return false;\n }\n }\n }\n return true;\n }\n // what does this do!?\n for (var instanceIdAndFirstCol in eventHeights) {\n if (!eventHeights[instanceIdAndFirstCol]) {\n segIsHidden[instanceIdAndFirstCol.split(':')[0]] = true;\n }\n }\n var segsByFirstCol = colPlacements.map(extractFirstColSegs); // operates on the sorted cols\n var segsByEachCol = colPlacements.map(function (placements, col) {\n var segs = extractAllColSegs(placements);\n segs = resliceDaySegs(segs, cellModels[col].date, col);\n return segs;\n });\n return {\n segsByFirstCol: segsByFirstCol,\n segsByEachCol: segsByEachCol,\n segIsHidden: segIsHidden,\n segTops: segTops,\n segMarginTops: segMarginTops,\n moreCnts: moreCnts,\n moreTops: moreTops,\n paddingBottoms: paddingBottoms\n };\n}\nfunction extractFirstColSegs(oneColPlacements, col) {\n var segs = [];\n for (var _i = 0, oneColPlacements_1 = oneColPlacements; _i < oneColPlacements_1.length; _i++) {\n var placement = oneColPlacements_1[_i];\n if (placement.seg.firstCol === col) {\n segs.push(placement.seg);\n }\n }\n return segs;\n}\nfunction extractAllColSegs(oneColPlacements) {\n var segs = [];\n for (var _i = 0, oneColPlacements_2 = oneColPlacements; _i < oneColPlacements_2.length; _i++) {\n var placement = oneColPlacements_2[_i];\n segs.push(placement.seg);\n }\n return segs;\n}\nfunction limitByMaxHeight(hiddenCnts, segIsHidden, colPlacements, maxContentHeight) {\n limitEvents(hiddenCnts, segIsHidden, colPlacements, true, function (placement) {\n return placement.bottom <= maxContentHeight;\n });\n}\nfunction limitByMaxEvents(hiddenCnts, segIsHidden, colPlacements, dayMaxEvents) {\n limitEvents(hiddenCnts, segIsHidden, colPlacements, false, function (placement, levelIndex) {\n return levelIndex < dayMaxEvents;\n });\n}\nfunction limitByMaxRows(hiddenCnts, segIsHidden, colPlacements, dayMaxEventRows) {\n limitEvents(hiddenCnts, segIsHidden, colPlacements, true, function (placement, levelIndex) {\n return levelIndex < dayMaxEventRows;\n });\n}\n/*\npopulates the given hiddenCnts/segIsHidden, which are supplied empty.\nTODO: return them instead\n*/\nfunction limitEvents(hiddenCnts, segIsHidden, colPlacements, moreLinkConsumesLevel, isPlacementInBounds) {\n var colCnt = hiddenCnts.length;\n var segIsVisible = {}; // TODO: instead, use segIsHidden with true/false?\n var visibleColPlacements = []; // will mirror colPlacements\n for (var col = 0; col < colCnt; col++) {\n visibleColPlacements.push([]);\n }\n for (var col = 0; col < colCnt; col++) {\n var placements = colPlacements[col];\n var level = 0;\n for (var _i = 0, placements_2 = placements; _i < placements_2.length; _i++) {\n var placement = placements_2[_i];\n if (isPlacementInBounds(placement, level)) {\n recordVisible(placement);\n }\n else {\n recordHidden(placement);\n }\n // only considered a level if the seg had height\n if (placement.top !== placement.bottom) {\n level++;\n }\n }\n }\n function recordVisible(placement) {\n var seg = placement.seg;\n var instanceId = seg.eventRange.instance.instanceId;\n if (!segIsVisible[instanceId]) {\n segIsVisible[instanceId] = true;\n for (var col = seg.firstCol; col <= seg.lastCol; col++) {\n visibleColPlacements[col].push(placement);\n }\n }\n }\n function recordHidden(placement) {\n var seg = placement.seg;\n var instanceId = seg.eventRange.instance.instanceId;\n if (!segIsHidden[instanceId]) {\n segIsHidden[instanceId] = true;\n for (var col = seg.firstCol; col <= seg.lastCol; col++) {\n var hiddenCnt = ++hiddenCnts[col];\n if (moreLinkConsumesLevel && hiddenCnt === 1) {\n var lastVisiblePlacement = visibleColPlacements[col].pop();\n if (lastVisiblePlacement) {\n recordHidden(lastVisiblePlacement);\n }\n }\n }\n }\n }\n}\n// Given the events within an array of segment objects, reslice them to be in a single day\nfunction resliceDaySegs(segs, dayDate, colIndex) {\n var dayStart = dayDate;\n var dayEnd = addDays(dayStart, 1);\n var dayRange = { start: dayStart, end: dayEnd };\n var newSegs = [];\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n var eventRange = seg.eventRange;\n var origRange = eventRange.range;\n var slicedRange = intersectRanges(origRange, dayRange);\n if (slicedRange) {\n newSegs.push(__assign(__assign({}, seg), { firstCol: colIndex, lastCol: colIndex, eventRange: {\n def: eventRange.def,\n ui: __assign(__assign({}, eventRange.ui), { durationEditable: false }),\n instance: eventRange.instance,\n range: slicedRange\n }, isStart: seg.isStart && slicedRange.start.valueOf() === origRange.start.valueOf(), isEnd: seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf() }));\n }\n }\n return newSegs;\n}\n\nvar TableRow = /** @class */ (function (_super) {\n __extends(TableRow, _super);\n function TableRow() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cellElRefs = new RefMap(); // the
/ elements with colspans.\n SOLUTION: making individual
\n _this.frameElRefs = new RefMap(); // the fc-daygrid-day-frame\n _this.fgElRefs = new RefMap(); // the fc-daygrid-day-events\n _this.segHarnessRefs = new RefMap(); // indexed by \"instanceId:firstCol\"\n _this.rootElRef = createRef();\n _this.state = {\n framePositions: null,\n maxContentHeight: null,\n segHeights: {}\n };\n return _this;\n }\n TableRow.prototype.render = function () {\n var _this = this;\n var _a = this, props = _a.props, state = _a.state, context = _a.context;\n var colCnt = props.cells.length;\n var businessHoursByCol = splitSegsByFirstCol(props.businessHourSegs, colCnt);\n var bgEventSegsByCol = splitSegsByFirstCol(props.bgEventSegs, colCnt);\n var highlightSegsByCol = splitSegsByFirstCol(this.getHighlightSegs(), colCnt);\n var mirrorSegsByCol = splitSegsByFirstCol(this.getMirrorSegs(), colCnt);\n var _b = computeFgSegPlacement(props.cells, props.fgEventSegs, props.dayMaxEvents, props.dayMaxEventRows, state.segHeights, state.maxContentHeight, colCnt, context.options.eventOrder), paddingBottoms = _b.paddingBottoms, segsByFirstCol = _b.segsByFirstCol, segsByEachCol = _b.segsByEachCol, segIsHidden = _b.segIsHidden, segTops = _b.segTops, segMarginTops = _b.segMarginTops, moreCnts = _b.moreCnts, moreTops = _b.moreTops;\n var selectedInstanceHash = // TODO: messy way to compute this\n (props.eventDrag && props.eventDrag.affectedInstances) ||\n (props.eventResize && props.eventResize.affectedInstances) ||\n {};\n return (createElement(\"tr\", { ref: this.rootElRef },\n props.renderIntro && props.renderIntro(),\n props.cells.map(function (cell, col) {\n var normalFgNodes = _this.renderFgSegs(segsByFirstCol[col], segIsHidden, segTops, segMarginTops, selectedInstanceHash, props.todayRange);\n var mirrorFgNodes = _this.renderFgSegs(mirrorSegsByCol[col], {}, segTops, // use same tops as real rendering\n {}, {}, props.todayRange, Boolean(props.eventDrag), Boolean(props.eventResize), false // date-selecting (because mirror is never drawn for date selection)\n );\n var showWeekNumber = props.showWeekNumbers && col === 0;\n return (createElement(TableCell, { key: cell.key, elRef: _this.cellElRefs.createRef(cell.key), innerElRef: _this.frameElRefs.createRef(cell.key) /* FF problem, but okay to use for left/right. TODO: rename prop */, dateProfile: props.dateProfile, date: cell.date, showDayNumber: props.showDayNumbers || showWeekNumber /* for spacing, we need to force day-numbers if week numbers */, showWeekNumber: showWeekNumber, todayRange: props.todayRange, extraHookProps: cell.extraHookProps, extraDataAttrs: cell.extraDataAttrs, extraClassNames: cell.extraClassNames, moreCnt: moreCnts[col], buildMoreLinkText: props.buildMoreLinkText, onMoreClick: props.onMoreClick, segIsHidden: segIsHidden, moreMarginTop: moreTops[col] /* rename */, segsByEachCol: segsByEachCol[col], fgPaddingBottom: paddingBottoms[col], fgContentElRef: _this.fgElRefs.createRef(cell.key), fgContent: ( // Fragment scopes the keys\n createElement(Fragment, null,\n createElement(Fragment, null, normalFgNodes),\n createElement(Fragment, null, mirrorFgNodes))), bgContent: ( // Fragment scopes the keys\n createElement(Fragment, null,\n _this.renderFillSegs(highlightSegsByCol[col], 'highlight'),\n _this.renderFillSegs(businessHoursByCol[col], 'non-business'),\n _this.renderFillSegs(bgEventSegsByCol[col], 'bg-event'))) }));\n })));\n };\n TableRow.prototype.componentDidMount = function () {\n this.updateSizing(true);\n };\n TableRow.prototype.componentDidUpdate = function (prevProps, prevState) {\n var currentProps = this.props;\n this.updateSizing(!isPropsEqual(prevProps, currentProps));\n };\n TableRow.prototype.getHighlightSegs = function () {\n var props = this.props;\n if (props.eventDrag && props.eventDrag.segs.length) { // messy check\n return props.eventDrag.segs;\n }\n else if (props.eventResize && props.eventResize.segs.length) { // messy check\n return props.eventResize.segs;\n }\n else {\n return props.dateSelectionSegs;\n }\n };\n TableRow.prototype.getMirrorSegs = function () {\n var props = this.props;\n if (props.eventResize && props.eventResize.segs.length) { // messy check\n return props.eventResize.segs;\n }\n else {\n return [];\n }\n };\n TableRow.prototype.renderFgSegs = function (segs, segIsHidden, // does NOT mean display:hidden\n segTops, segMarginTops, selectedInstanceHash, todayRange, isDragging, isResizing, isDateSelecting) {\n var context = this.context;\n var eventSelection = this.props.eventSelection;\n var framePositions = this.state.framePositions;\n var defaultDisplayEventEnd = this.props.cells.length === 1; // colCnt === 1\n var nodes = [];\n if (framePositions) {\n for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) {\n var seg = segs_1[_i];\n var instanceId = seg.eventRange.instance.instanceId;\n var isMirror = isDragging || isResizing || isDateSelecting;\n var isSelected = selectedInstanceHash[instanceId];\n var isInvisible = segIsHidden[instanceId] || isSelected;\n var isAbsolute = segIsHidden[instanceId] || isMirror || seg.firstCol !== seg.lastCol || !seg.isStart || !seg.isEnd; // TODO: simpler way? NOT DRY\n var marginTop = void 0;\n var top_1 = void 0;\n var left = void 0;\n var right = void 0;\n if (isAbsolute) {\n top_1 = segTops[instanceId];\n if (context.isRtl) {\n right = 0;\n left = framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol];\n }\n else {\n left = 0;\n right = framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol];\n }\n }\n else {\n marginTop = segMarginTops[instanceId];\n }\n /*\n known bug: events that are force to be list-item but span multiple days still take up space in later columns\n */\n nodes.push(createElement(\"div\", { className: 'fc-daygrid-event-harness' + (isAbsolute ? ' fc-daygrid-event-harness-abs' : ''), key: instanceId, ref: isMirror ? null : this.segHarnessRefs.createRef(instanceId + ':' + seg.firstCol) /* in print mode when in mult cols, could collide */, style: {\n visibility: isInvisible ? 'hidden' : '',\n marginTop: marginTop || '',\n top: top_1 || '',\n left: left || '',\n right: right || ''\n } }, hasListItemDisplay(seg) ?\n createElement(TableListItemEvent, __assign({ seg: seg, isDragging: isDragging, isSelected: instanceId === eventSelection, defaultDisplayEventEnd: defaultDisplayEventEnd }, getSegMeta(seg, todayRange))) :\n createElement(TableBlockEvent, __assign({ seg: seg, isDragging: isDragging, isResizing: isResizing, isDateSelecting: isDateSelecting, isSelected: instanceId === eventSelection, defaultDisplayEventEnd: defaultDisplayEventEnd }, getSegMeta(seg, todayRange)))));\n }\n }\n return nodes;\n };\n TableRow.prototype.renderFillSegs = function (segs, fillType) {\n var isRtl = this.context.isRtl;\n var todayRange = this.props.todayRange;\n var framePositions = this.state.framePositions;\n var nodes = [];\n if (framePositions) {\n for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) {\n var seg = segs_2[_i];\n var leftRightCss = isRtl ? {\n right: 0,\n left: framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol]\n } : {\n left: 0,\n right: framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol],\n };\n nodes.push(createElement(\"div\", { key: buildEventRangeKey(seg.eventRange), className: 'fc-daygrid-bg-harness', style: leftRightCss }, fillType === 'bg-event' ?\n createElement(BgEvent, __assign({ seg: seg }, getSegMeta(seg, todayRange))) :\n renderFill(fillType)));\n }\n }\n return createElement.apply(void 0, __spreadArrays([Fragment, {}], nodes));\n };\n TableRow.prototype.updateSizing = function (isExternalSizingChange) {\n var _a = this, props = _a.props, frameElRefs = _a.frameElRefs;\n if (props.clientWidth !== null) { // positioning ready?\n if (isExternalSizingChange) {\n var frameEls = props.cells.map(function (cell) { return frameElRefs.currentMap[cell.key]; });\n if (frameEls.length) {\n var originEl = this.rootElRef.current;\n this.setState({\n framePositions: new PositionCache(originEl, frameEls, true, // isHorizontal\n false)\n });\n }\n }\n var limitByContentHeight = props.dayMaxEvents === true || props.dayMaxEventRows === true;\n this.setState({\n segHeights: this.computeSegHeights(),\n maxContentHeight: limitByContentHeight ? this.computeMaxContentHeight() : null\n });\n }\n };\n TableRow.prototype.computeSegHeights = function () {\n return mapHash(this.segHarnessRefs.currentMap, function (eventHarnessEl) { return (eventHarnessEl.getBoundingClientRect().height); });\n };\n TableRow.prototype.computeMaxContentHeight = function () {\n var firstKey = this.props.cells[0].key;\n var cellEl = this.cellElRefs.currentMap[firstKey];\n var fcContainerEl = this.fgElRefs.currentMap[firstKey];\n return cellEl.getBoundingClientRect().bottom - fcContainerEl.getBoundingClientRect().top;\n };\n TableRow.prototype.getCellEls = function () {\n var elMap = this.cellElRefs.currentMap;\n return this.props.cells.map(function (cell) { return elMap[cell.key]; });\n };\n return TableRow;\n}(DateComponent));\nTableRow.addStateEquality({\n segHeights: isPropsEqual\n});\n\nvar PADDING_FROM_VIEWPORT = 10;\nvar SCROLL_DEBOUNCE = 10;\nvar Popover = /** @class */ (function (_super) {\n __extends(Popover, _super);\n function Popover() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.repositioner = new DelayedRunner(_this.updateSize.bind(_this));\n _this.handleRootEl = function (el) {\n _this.rootEl = el;\n if (_this.props.elRef) {\n setRef(_this.props.elRef, el);\n }\n };\n // Triggered when the user clicks *anywhere* in the document, for the autoHide feature\n _this.handleDocumentMousedown = function (ev) {\n var onClose = _this.props.onClose;\n // only hide the popover if the click happened outside the popover\n if (onClose && !_this.rootEl.contains(ev.target)) {\n onClose();\n }\n };\n _this.handleDocumentScroll = function () {\n _this.repositioner.request(SCROLL_DEBOUNCE);\n };\n _this.handleCloseClick = function () {\n var onClose = _this.props.onClose;\n if (onClose) {\n onClose();\n }\n };\n return _this;\n }\n Popover.prototype.render = function () {\n var theme = this.context.theme;\n var props = this.props;\n var classNames = [\n 'fc-popover',\n theme.getClass('popover')\n ].concat(props.extraClassNames || []);\n return (createElement(\"div\", __assign({ className: classNames.join(' ') }, props.extraAttrs, { ref: this.handleRootEl }),\n createElement(\"div\", { className: 'fc-popover-header ' + theme.getClass('popoverHeader') },\n createElement(\"span\", { className: 'fc-popover-title' }, props.title),\n createElement(\"span\", { className: 'fc-popover-close ' + theme.getIconClass('close'), onClick: this.handleCloseClick })),\n createElement(\"div\", { className: 'fc-popover-body ' + theme.getClass('popoverContent') }, props.children)));\n };\n Popover.prototype.componentDidMount = function () {\n document.addEventListener('mousedown', this.handleDocumentMousedown);\n document.addEventListener('scroll', this.handleDocumentScroll);\n this.updateSize();\n };\n Popover.prototype.componentWillUnmount = function () {\n document.removeEventListener('mousedown', this.handleDocumentMousedown);\n document.removeEventListener('scroll', this.handleDocumentScroll);\n };\n // TODO: adjust on window resize\n /*\n NOTE: the popover is position:fixed, so coordinates are relative to the viewport\n NOTE: the PARENT calls this as well, on window resize. we would have wanted to use the repositioner,\n but need to ensure that all other components have updated size first (for alignmentEl)\n */\n Popover.prototype.updateSize = function () {\n var _a = this.props, alignmentEl = _a.alignmentEl, topAlignmentEl = _a.topAlignmentEl;\n var rootEl = this.rootEl;\n if (!rootEl) {\n return; // not sure why this was null, but we shouldn't let external components call updateSize() anyway\n }\n var dims = rootEl.getBoundingClientRect(); // only used for width,height\n var alignment = alignmentEl.getBoundingClientRect();\n var top = topAlignmentEl ? topAlignmentEl.getBoundingClientRect().top : alignment.top;\n top = Math.min(top, window.innerHeight - dims.height - PADDING_FROM_VIEWPORT);\n top = Math.max(top, PADDING_FROM_VIEWPORT);\n var left;\n if (this.context.isRtl) {\n left = alignment.right - dims.width;\n }\n else {\n left = alignment.left;\n }\n left = Math.min(left, window.innerWidth - dims.width - PADDING_FROM_VIEWPORT);\n left = Math.max(left, PADDING_FROM_VIEWPORT);\n applyStyle(rootEl, { top: top, left: left });\n };\n return Popover;\n}(BaseComponent));\n\nvar MorePopover = /** @class */ (function (_super) {\n __extends(MorePopover, _super);\n function MorePopover() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.handlePopoverEl = function (popoverEl) {\n _this.popoverEl = popoverEl;\n if (popoverEl) {\n _this.context.registerInteractiveComponent(_this, {\n el: popoverEl,\n useEventCenter: false\n });\n }\n else {\n _this.context.unregisterInteractiveComponent(_this);\n }\n };\n return _this;\n }\n MorePopover.prototype.render = function () {\n var _a = this.context, options = _a.options, dateEnv = _a.dateEnv;\n var props = this.props;\n var date = props.date, hiddenInstances = props.hiddenInstances, todayRange = props.todayRange, dateProfile = props.dateProfile, selectedInstanceId = props.selectedInstanceId;\n var title = dateEnv.format(date, options.dayPopoverFormat);\n return (createElement(DayCellRoot, { date: date, dateProfile: dateProfile, todayRange: todayRange, elRef: this.handlePopoverEl }, function (rootElRef, dayClassNames, dataAttrs) { return (createElement(Popover, { elRef: rootElRef, title: title, extraClassNames: ['fc-more-popover'].concat(dayClassNames), extraAttrs: dataAttrs, onClose: props.onCloseClick, alignmentEl: props.alignmentEl, topAlignmentEl: props.topAlignmentEl },\n createElement(DayCellContent, { date: date, dateProfile: dateProfile, todayRange: todayRange }, function (innerElRef, innerContent) { return (innerContent &&\n createElement(\"div\", { className: 'fc-more-popover-misc', ref: innerElRef }, innerContent)); }),\n props.segs.map(function (seg) {\n var instanceId = seg.eventRange.instance.instanceId;\n return (createElement(\"div\", { className: 'fc-daygrid-event-harness', key: instanceId, style: {\n visibility: hiddenInstances[instanceId] ? 'hidden' : ''\n } }, hasListItemDisplay(seg) ?\n createElement(TableListItemEvent, __assign({ seg: seg, isDragging: false, isSelected: instanceId === selectedInstanceId, defaultDisplayEventEnd: false }, getSegMeta(seg, todayRange))) :\n createElement(TableBlockEvent, __assign({ seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === selectedInstanceId, defaultDisplayEventEnd: false }, getSegMeta(seg, todayRange)))));\n }))); }));\n };\n MorePopover.prototype.queryHit = function (positionLeft, positionTop, elWidth, elHeight) {\n var date = this.props.date;\n if (positionLeft < elWidth && positionTop < elHeight) {\n return {\n component: this,\n dateSpan: {\n allDay: true,\n range: { start: date, end: addDays(date, 1) }\n },\n dayEl: this.popoverEl,\n rect: {\n left: 0,\n top: 0,\n right: elWidth,\n bottom: elHeight\n },\n layer: 1\n };\n }\n };\n MorePopover.prototype.isPopover = function () {\n return true; // gross\n };\n return MorePopover;\n}(DateComponent));\n\nvar Table = /** @class */ (function (_super) {\n __extends(Table, _super);\n function Table() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.splitBusinessHourSegs = memoize(splitSegsByRow);\n _this.splitBgEventSegs = memoize(splitSegsByRow);\n _this.splitFgEventSegs = memoize(splitSegsByRow);\n _this.splitDateSelectionSegs = memoize(splitSegsByRow);\n _this.splitEventDrag = memoize(splitInteractionByRow);\n _this.splitEventResize = memoize(splitInteractionByRow);\n _this.buildBuildMoreLinkText = memoize(buildBuildMoreLinkText);\n _this.rowRefs = new RefMap();\n _this.state = {\n morePopoverState: null\n };\n _this.handleRootEl = function (rootEl) {\n _this.rootEl = rootEl;\n setRef(_this.props.elRef, rootEl);\n };\n _this.handleMoreLinkClick = function (arg) {\n var context = _this.context;\n var dateEnv = context.dateEnv;\n var clickOption = context.options.moreLinkClick;\n function segForPublic(seg) {\n var _a = seg.eventRange, def = _a.def, instance = _a.instance, range = _a.range;\n return {\n event: new EventApi(context, def, instance),\n start: dateEnv.toDate(range.start),\n end: dateEnv.toDate(range.end),\n isStart: seg.isStart,\n isEnd: seg.isEnd\n };\n }\n if (typeof clickOption === 'function') {\n clickOption = clickOption({\n date: dateEnv.toDate(arg.date),\n allDay: true,\n allSegs: arg.allSegs.map(segForPublic),\n hiddenSegs: arg.hiddenSegs.map(segForPublic),\n jsEvent: arg.ev,\n view: context.viewApi\n }); // hack to handle void\n }\n if (!clickOption || clickOption === 'popover') {\n _this.setState({\n morePopoverState: __assign(__assign({}, arg), { currentFgEventSegs: _this.props.fgEventSegs })\n });\n }\n else if (typeof clickOption === 'string') { // a view name\n context.calendarApi.zoomTo(arg.date, clickOption);\n }\n };\n _this.handleMorePopoverClose = function () {\n _this.setState({\n morePopoverState: null\n });\n };\n return _this;\n }\n Table.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var dateProfile = props.dateProfile, dayMaxEventRows = props.dayMaxEventRows, dayMaxEvents = props.dayMaxEvents, expandRows = props.expandRows;\n var morePopoverState = this.state.morePopoverState;\n var rowCnt = props.cells.length;\n var businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, rowCnt);\n var bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, rowCnt);\n var fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, rowCnt);\n var dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, rowCnt);\n var eventDragByRow = this.splitEventDrag(props.eventDrag, rowCnt);\n var eventResizeByRow = this.splitEventResize(props.eventResize, rowCnt);\n var buildMoreLinkText = this.buildBuildMoreLinkText(this.context.options.moreLinkText);\n var limitViaBalanced = dayMaxEvents === true || dayMaxEventRows === true;\n // if rows can't expand to fill fixed height, can't do balanced-height event limit\n // TODO: best place to normalize these options?\n if (limitViaBalanced && !expandRows) {\n limitViaBalanced = false;\n dayMaxEventRows = null;\n dayMaxEvents = null;\n }\n var classNames = [\n 'fc-daygrid-body',\n limitViaBalanced ? 'fc-daygrid-body-balanced' : 'fc-daygrid-body-unbalanced',\n expandRows ? '' : 'fc-daygrid-body-natural' // will height of one row depend on the others?\n ];\n return (createElement(\"div\", { className: classNames.join(' '), ref: this.handleRootEl, style: {\n // these props are important to give this wrapper correct dimensions for interactions\n // TODO: if we set it here, can we avoid giving to inner tables?\n width: props.clientWidth,\n minWidth: props.tableMinWidth\n } },\n createElement(NowTimer, { unit: 'day' }, function (nowDate, todayRange) { return (createElement(Fragment, null,\n createElement(\"table\", { className: 'fc-scrollgrid-sync-table', style: {\n width: props.clientWidth,\n minWidth: props.tableMinWidth,\n height: expandRows ? props.clientHeight : ''\n } },\n props.colGroupNode,\n createElement(\"tbody\", null, props.cells.map(function (cells, row) { return (createElement(TableRow, { ref: _this.rowRefs.createRef(row), key: cells.length\n ? cells[0].date.toISOString() /* best? or put key on cell? or use diff formatter? */\n : row // in case there are no cells (like when resource view is loading)\n , showDayNumbers: rowCnt > 1, showWeekNumbers: props.showWeekNumbers, todayRange: todayRange, dateProfile: dateProfile, cells: cells, renderIntro: props.renderRowIntro, businessHourSegs: businessHourSegsByRow[row], eventSelection: props.eventSelection, bgEventSegs: bgEventSegsByRow[row].filter(isSegAllDay) /* hack */, fgEventSegs: fgEventSegsByRow[row], dateSelectionSegs: dateSelectionSegsByRow[row], eventDrag: eventDragByRow[row], eventResize: eventResizeByRow[row], dayMaxEvents: dayMaxEvents, dayMaxEventRows: dayMaxEventRows, clientWidth: props.clientWidth, clientHeight: props.clientHeight, buildMoreLinkText: buildMoreLinkText, onMoreClick: _this.handleMoreLinkClick })); }))),\n (!props.forPrint && morePopoverState && morePopoverState.currentFgEventSegs === props.fgEventSegs) && // clear popover on event mod\n createElement(MorePopover, { date: morePopoverState.date, dateProfile: dateProfile, segs: morePopoverState.allSegs, alignmentEl: morePopoverState.dayEl, topAlignmentEl: rowCnt === 1 ? props.headerAlignElRef.current : null, onCloseClick: _this.handleMorePopoverClose, selectedInstanceId: props.eventSelection, hiddenInstances: // yuck\n (props.eventDrag ? props.eventDrag.affectedInstances : null) ||\n (props.eventResize ? props.eventResize.affectedInstances : null) ||\n {}, todayRange: todayRange }))); })));\n };\n // Hit System\n // ----------------------------------------------------------------------------------------------------\n Table.prototype.prepareHits = function () {\n this.rowPositions = new PositionCache(this.rootEl, this.rowRefs.collect().map(function (rowObj) { return rowObj.getCellEls()[0]; }), // first cell el in each row. TODO: not optimal\n false, true // vertical\n );\n this.colPositions = new PositionCache(this.rootEl, this.rowRefs.currentMap[0].getCellEls(), // cell els in first row\n true, // horizontal\n false);\n };\n Table.prototype.positionToHit = function (leftPosition, topPosition) {\n var _a = this, colPositions = _a.colPositions, rowPositions = _a.rowPositions;\n var col = colPositions.leftToIndex(leftPosition);\n var row = rowPositions.topToIndex(topPosition);\n if (row != null && col != null) {\n return {\n row: row,\n col: col,\n dateSpan: {\n range: this.getCellRange(row, col),\n allDay: true\n },\n dayEl: this.getCellEl(row, col),\n relativeRect: {\n left: colPositions.lefts[col],\n right: colPositions.rights[col],\n top: rowPositions.tops[row],\n bottom: rowPositions.bottoms[row]\n }\n };\n }\n };\n Table.prototype.getCellEl = function (row, col) {\n return this.rowRefs.currentMap[row].getCellEls()[col]; // TODO: not optimal\n };\n Table.prototype.getCellRange = function (row, col) {\n var start = this.props.cells[row][col].date;\n var end = addDays(start, 1);\n return { start: start, end: end };\n };\n return Table;\n}(DateComponent));\nfunction buildBuildMoreLinkText(moreLinkTextInput) {\n if (typeof moreLinkTextInput === 'function') {\n return moreLinkTextInput;\n }\n else {\n return function (num) {\n return \"+\" + num + \" \" + moreLinkTextInput;\n };\n }\n}\nfunction isSegAllDay(seg) {\n return seg.eventRange.def.allDay;\n}\n\nvar DayTable = /** @class */ (function (_super) {\n __extends(DayTable, _super);\n function DayTable() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.slicer = new DayTableSlicer();\n _this.tableRef = createRef();\n _this.handleRootEl = function (rootEl) {\n if (rootEl) {\n _this.context.registerInteractiveComponent(_this, { el: rootEl });\n }\n else {\n _this.context.unregisterInteractiveComponent(_this);\n }\n };\n return _this;\n }\n DayTable.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n return (createElement(Table, __assign({ ref: this.tableRef, elRef: this.handleRootEl }, this.slicer.sliceProps(props, props.dateProfile, props.nextDayThreshold, context, props.dayTableModel), { dateProfile: props.dateProfile, cells: props.dayTableModel.cells, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, forPrint: props.forPrint })));\n };\n DayTable.prototype.prepareHits = function () {\n this.tableRef.current.prepareHits();\n };\n DayTable.prototype.queryHit = function (positionLeft, positionTop) {\n var rawHit = this.tableRef.current.positionToHit(positionLeft, positionTop);\n if (rawHit) {\n return {\n component: this,\n dateSpan: rawHit.dateSpan,\n dayEl: rawHit.dayEl,\n rect: {\n left: rawHit.relativeRect.left,\n right: rawHit.relativeRect.right,\n top: rawHit.relativeRect.top,\n bottom: rawHit.relativeRect.bottom\n },\n layer: 0\n };\n }\n };\n return DayTable;\n}(DateComponent));\nvar DayTableSlicer = /** @class */ (function (_super) {\n __extends(DayTableSlicer, _super);\n function DayTableSlicer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.forceDayIfListItem = true;\n return _this;\n }\n DayTableSlicer.prototype.sliceRange = function (dateRange, dayTableModel) {\n return dayTableModel.sliceRange(dateRange);\n };\n return DayTableSlicer;\n}(Slicer));\n\nvar DayTableView = /** @class */ (function (_super) {\n __extends(DayTableView, _super);\n function DayTableView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.buildDayTableModel = memoize(buildDayTableModel);\n _this.headerRef = createRef();\n _this.tableRef = createRef();\n return _this;\n }\n DayTableView.prototype.render = function () {\n var _this = this;\n var _a = this.context, options = _a.options, dateProfileGenerator = _a.dateProfileGenerator;\n var props = this.props;\n var dayTableModel = this.buildDayTableModel(props.dateProfile, dateProfileGenerator);\n var headerContent = options.dayHeaders &&\n createElement(DayHeader, { ref: this.headerRef, dateProfile: props.dateProfile, dates: dayTableModel.headerDates, datesRepDistinctDays: dayTableModel.rowCnt === 1 });\n var bodyContent = function (contentArg) { return (createElement(DayTable, { ref: _this.tableRef, dateProfile: props.dateProfile, dayTableModel: dayTableModel, businessHours: props.businessHours, dateSelection: props.dateSelection, eventStore: props.eventStore, eventUiBases: props.eventUiBases, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, colGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint })); };\n return options.dayMinWidth\n ? this.renderHScrollLayout(headerContent, bodyContent, dayTableModel.colCnt, options.dayMinWidth)\n : this.renderSimpleLayout(headerContent, bodyContent);\n };\n return DayTableView;\n}(TableView));\nfunction buildDayTableModel(dateProfile, dateProfileGenerator) {\n var daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator);\n return new DayTableModel(daySeries, /year|month|week/.test(dateProfile.currentRangeUnit));\n}\n\nvar TableDateProfileGenerator = /** @class */ (function (_super) {\n __extends(TableDateProfileGenerator, _super);\n function TableDateProfileGenerator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // Computes the date range that will be rendered.\n TableDateProfileGenerator.prototype.buildRenderRange = function (currentRange, currentRangeUnit, isRangeAllDay) {\n var dateEnv = this.props.dateEnv;\n var renderRange = _super.prototype.buildRenderRange.call(this, currentRange, currentRangeUnit, isRangeAllDay);\n var start = renderRange.start;\n var end = renderRange.end;\n var endOfWeek;\n // year and month views should be aligned with weeks. this is already done for week\n if (/^(year|month)$/.test(currentRangeUnit)) {\n start = dateEnv.startOfWeek(start);\n // make end-of-week if not already\n endOfWeek = dateEnv.startOfWeek(end);\n if (endOfWeek.valueOf() !== end.valueOf()) {\n end = addWeeks(endOfWeek, 1);\n }\n }\n // ensure 6 weeks\n if (this.props.monthMode &&\n this.props.fixedWeekCount) {\n var rowCnt = Math.ceil(// could be partial weeks due to hiddenDays\n diffWeeks(start, end));\n end = addWeeks(end, 6 - rowCnt);\n }\n return { start: start, end: end };\n };\n return TableDateProfileGenerator;\n}(DateProfileGenerator));\n\nvar OPTION_REFINERS = {\n moreLinkClick: identity,\n moreLinkClassNames: identity,\n moreLinkContent: identity,\n moreLinkDidMount: identity,\n moreLinkWillUnmount: identity,\n};\n\nvar main = createPlugin({\n initialView: 'dayGridMonth',\n optionRefiners: OPTION_REFINERS,\n views: {\n dayGrid: {\n component: DayTableView,\n dateProfileGeneratorClass: TableDateProfileGenerator\n },\n dayGridDay: {\n type: 'dayGrid',\n duration: { days: 1 }\n },\n dayGridWeek: {\n type: 'dayGrid',\n duration: { weeks: 1 }\n },\n dayGridMonth: {\n type: 'dayGrid',\n duration: { months: 1 },\n monthMode: true,\n fixedWeekCount: true\n }\n }\n});\n\nexport default main;\nexport { DayTableView as DayGridView, DayTable, DayTableSlicer, Table, TableView, buildDayTableModel };\n//# sourceMappingURL=main.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/*!\nFullCalendar v5.1.0\nDocs & License: https://fullcalendar.io/\n(c) 2020 Adam Shaw\n*/\nimport { config, elementClosest, Emitter, applyStyle, whenTransitionDone, removeElement, ScrollController, ElementScrollController, computeInnerRect, WindowScrollController, preventSelection, preventContextMenu, allowSelection, allowContextMenu, ElementDragging, computeRect, getClippingParents, pointInsideRect, isDateSpansEqual, constrainPoint, intersectRects, getRectCenter, diffPoints, mapHash, rangeContainsRange, interactionSettingsToStore, Interaction, enableCursor, disableCursor, triggerDateSelect, compareNumbers, getElSeg, getRelevantEvents, EventApi, createEmptyEventStore, applyMutationToEventStore, buildEventApis, interactionSettingsStore, startOfDay, diffDates, createDuration, identity, eventTupleToStore, isInteractionValid, parseDragMeta, elementMatches, refineEventDef, parseEventDef, getDefaultEventEnd, createEventInstance, BASE_OPTION_DEFAULTS, createPlugin } from '@fullcalendar/common';\nimport { __extends, __assign } from 'tslib';\n\nconfig.touchMouseIgnoreWait = 500;\nvar ignoreMouseDepth = 0;\nvar listenerCnt = 0;\nvar isWindowTouchMoveCancelled = false;\n/*\nUses a \"pointer\" abstraction, which monitors UI events for both mouse and touch.\nTracks when the pointer \"drags\" on a certain element, meaning down+move+up.\n\nAlso, tracks if there was touch-scrolling.\nAlso, can prevent touch-scrolling from happening.\nAlso, can fire pointermove events when scrolling happens underneath, even when no real pointer movement.\n\nemits:\n- pointerdown\n- pointermove\n- pointerup\n*/\nvar PointerDragging = /** @class */ (function () {\n function PointerDragging(containerEl) {\n var _this = this;\n this.subjectEl = null;\n this.downEl = null;\n // options that can be directly assigned by caller\n this.selector = ''; // will cause subjectEl in all emitted events to be this element\n this.handleSelector = '';\n this.shouldIgnoreMove = false;\n this.shouldWatchScroll = true; // for simulating pointermove on scroll\n // internal states\n this.isDragging = false;\n this.isTouchDragging = false;\n this.wasTouchScroll = false;\n // Mouse\n // ----------------------------------------------------------------------------------------------------\n this.handleMouseDown = function (ev) {\n if (!_this.shouldIgnoreMouse() &&\n isPrimaryMouseButton(ev) &&\n _this.tryStart(ev)) {\n var pev = _this.createEventFromMouse(ev, true);\n _this.emitter.trigger('pointerdown', pev);\n _this.initScrollWatch(pev);\n if (!_this.shouldIgnoreMove) {\n document.addEventListener('mousemove', _this.handleMouseMove);\n }\n document.addEventListener('mouseup', _this.handleMouseUp);\n }\n };\n this.handleMouseMove = function (ev) {\n var pev = _this.createEventFromMouse(ev);\n _this.recordCoords(pev);\n _this.emitter.trigger('pointermove', pev);\n };\n this.handleMouseUp = function (ev) {\n document.removeEventListener('mousemove', _this.handleMouseMove);\n document.removeEventListener('mouseup', _this.handleMouseUp);\n _this.emitter.trigger('pointerup', _this.createEventFromMouse(ev));\n _this.cleanup(); // call last so that pointerup has access to props\n };\n // Touch\n // ----------------------------------------------------------------------------------------------------\n this.handleTouchStart = function (ev) {\n if (_this.tryStart(ev)) {\n _this.isTouchDragging = true;\n var pev = _this.createEventFromTouch(ev, true);\n _this.emitter.trigger('pointerdown', pev);\n _this.initScrollWatch(pev);\n // unlike mouse, need to attach to target, not document\n // https://stackoverflow.com/a/45760014\n var target = ev.target;\n if (!_this.shouldIgnoreMove) {\n target.addEventListener('touchmove', _this.handleTouchMove);\n }\n target.addEventListener('touchend', _this.handleTouchEnd);\n target.addEventListener('touchcancel', _this.handleTouchEnd); // treat it as a touch end\n // attach a handler to get called when ANY scroll action happens on the page.\n // this was impossible to do with normal on/off because 'scroll' doesn't bubble.\n // http://stackoverflow.com/a/32954565/96342\n window.addEventListener('scroll', _this.handleTouchScroll, true // useCapture\n );\n }\n };\n this.handleTouchMove = function (ev) {\n var pev = _this.createEventFromTouch(ev);\n _this.recordCoords(pev);\n _this.emitter.trigger('pointermove', pev);\n };\n this.handleTouchEnd = function (ev) {\n if (_this.isDragging) { // done to guard against touchend followed by touchcancel\n var target = ev.target;\n target.removeEventListener('touchmove', _this.handleTouchMove);\n target.removeEventListener('touchend', _this.handleTouchEnd);\n target.removeEventListener('touchcancel', _this.handleTouchEnd);\n window.removeEventListener('scroll', _this.handleTouchScroll, true); // useCaptured=true\n _this.emitter.trigger('pointerup', _this.createEventFromTouch(ev));\n _this.cleanup(); // call last so that pointerup has access to props\n _this.isTouchDragging = false;\n startIgnoringMouse();\n }\n };\n this.handleTouchScroll = function () {\n _this.wasTouchScroll = true;\n };\n this.handleScroll = function (ev) {\n if (!_this.shouldIgnoreMove) {\n var pageX = (window.pageXOffset - _this.prevScrollX) + _this.prevPageX;\n var pageY = (window.pageYOffset - _this.prevScrollY) + _this.prevPageY;\n _this.emitter.trigger('pointermove', {\n origEvent: ev,\n isTouch: _this.isTouchDragging,\n subjectEl: _this.subjectEl,\n pageX: pageX,\n pageY: pageY,\n deltaX: pageX - _this.origPageX,\n deltaY: pageY - _this.origPageY\n });\n }\n };\n this.containerEl = containerEl;\n this.emitter = new Emitter();\n containerEl.addEventListener('mousedown', this.handleMouseDown);\n containerEl.addEventListener('touchstart', this.handleTouchStart, { passive: true });\n listenerCreated();\n }\n PointerDragging.prototype.destroy = function () {\n this.containerEl.removeEventListener('mousedown', this.handleMouseDown);\n this.containerEl.removeEventListener('touchstart', this.handleTouchStart, { passive: true });\n listenerDestroyed();\n };\n PointerDragging.prototype.tryStart = function (ev) {\n var subjectEl = this.querySubjectEl(ev);\n var downEl = ev.target;\n if (subjectEl &&\n (!this.handleSelector || elementClosest(downEl, this.handleSelector))) {\n this.subjectEl = subjectEl;\n this.downEl = downEl;\n this.isDragging = true; // do this first so cancelTouchScroll will work\n this.wasTouchScroll = false;\n return true;\n }\n return false;\n };\n PointerDragging.prototype.cleanup = function () {\n isWindowTouchMoveCancelled = false;\n this.isDragging = false;\n this.subjectEl = null;\n this.downEl = null;\n // keep wasTouchScroll around for later access\n this.destroyScrollWatch();\n };\n PointerDragging.prototype.querySubjectEl = function (ev) {\n if (this.selector) {\n return elementClosest(ev.target, this.selector);\n }\n else {\n return this.containerEl;\n }\n };\n PointerDragging.prototype.shouldIgnoreMouse = function () {\n return ignoreMouseDepth || this.isTouchDragging;\n };\n // can be called by user of this class, to cancel touch-based scrolling for the current drag\n PointerDragging.prototype.cancelTouchScroll = function () {\n if (this.isDragging) {\n isWindowTouchMoveCancelled = true;\n }\n };\n // Scrolling that simulates pointermoves\n // ----------------------------------------------------------------------------------------------------\n PointerDragging.prototype.initScrollWatch = function (ev) {\n if (this.shouldWatchScroll) {\n this.recordCoords(ev);\n window.addEventListener('scroll', this.handleScroll, true); // useCapture=true\n }\n };\n PointerDragging.prototype.recordCoords = function (ev) {\n if (this.shouldWatchScroll) {\n this.prevPageX = ev.pageX;\n this.prevPageY = ev.pageY;\n this.prevScrollX = window.pageXOffset;\n this.prevScrollY = window.pageYOffset;\n }\n };\n PointerDragging.prototype.destroyScrollWatch = function () {\n if (this.shouldWatchScroll) {\n window.removeEventListener('scroll', this.handleScroll, true); // useCaptured=true\n }\n };\n // Event Normalization\n // ----------------------------------------------------------------------------------------------------\n PointerDragging.prototype.createEventFromMouse = function (ev, isFirst) {\n var deltaX = 0;\n var deltaY = 0;\n // TODO: repeat code\n if (isFirst) {\n this.origPageX = ev.pageX;\n this.origPageY = ev.pageY;\n }\n else {\n deltaX = ev.pageX - this.origPageX;\n deltaY = ev.pageY - this.origPageY;\n }\n return {\n origEvent: ev,\n isTouch: false,\n subjectEl: this.subjectEl,\n pageX: ev.pageX,\n pageY: ev.pageY,\n deltaX: deltaX,\n deltaY: deltaY\n };\n };\n PointerDragging.prototype.createEventFromTouch = function (ev, isFirst) {\n var touches = ev.touches;\n var pageX;\n var pageY;\n var deltaX = 0;\n var deltaY = 0;\n // if touch coords available, prefer,\n // because FF would give bad ev.pageX ev.pageY\n if (touches && touches.length) {\n pageX = touches[0].pageX;\n pageY = touches[0].pageY;\n }\n else {\n pageX = ev.pageX;\n pageY = ev.pageY;\n }\n // TODO: repeat code\n if (isFirst) {\n this.origPageX = pageX;\n this.origPageY = pageY;\n }\n else {\n deltaX = pageX - this.origPageX;\n deltaY = pageY - this.origPageY;\n }\n return {\n origEvent: ev,\n isTouch: true,\n subjectEl: this.subjectEl,\n pageX: pageX,\n pageY: pageY,\n deltaX: deltaX,\n deltaY: deltaY\n };\n };\n return PointerDragging;\n}());\n// Returns a boolean whether this was a left mouse click and no ctrl key (which means right click on Mac)\nfunction isPrimaryMouseButton(ev) {\n return ev.button === 0 && !ev.ctrlKey;\n}\n// Ignoring fake mouse events generated by touch\n// ----------------------------------------------------------------------------------------------------\nfunction startIgnoringMouse() {\n ignoreMouseDepth++;\n setTimeout(function () {\n ignoreMouseDepth--;\n }, config.touchMouseIgnoreWait);\n}\n// We want to attach touchmove as early as possible for Safari\n// ----------------------------------------------------------------------------------------------------\nfunction listenerCreated() {\n if (!(listenerCnt++)) {\n window.addEventListener('touchmove', onWindowTouchMove, { passive: false });\n }\n}\nfunction listenerDestroyed() {\n if (!(--listenerCnt)) {\n window.removeEventListener('touchmove', onWindowTouchMove, { passive: false });\n }\n}\nfunction onWindowTouchMove(ev) {\n if (isWindowTouchMoveCancelled) {\n ev.preventDefault();\n }\n}\n\n/*\nAn effect in which an element follows the movement of a pointer across the screen.\nThe moving element is a clone of some other element.\nMust call start + handleMove + stop.\n*/\nvar ElementMirror = /** @class */ (function () {\n function ElementMirror() {\n this.isVisible = false; // must be explicitly enabled\n this.sourceEl = null;\n this.mirrorEl = null;\n this.sourceElRect = null; // screen coords relative to viewport\n // options that can be set directly by caller\n this.parentNode = document.body;\n this.zIndex = 9999;\n this.revertDuration = 0;\n }\n ElementMirror.prototype.start = function (sourceEl, pageX, pageY) {\n this.sourceEl = sourceEl;\n this.sourceElRect = this.sourceEl.getBoundingClientRect();\n this.origScreenX = pageX - window.pageXOffset;\n this.origScreenY = pageY - window.pageYOffset;\n this.deltaX = 0;\n this.deltaY = 0;\n this.updateElPosition();\n };\n ElementMirror.prototype.handleMove = function (pageX, pageY) {\n this.deltaX = (pageX - window.pageXOffset) - this.origScreenX;\n this.deltaY = (pageY - window.pageYOffset) - this.origScreenY;\n this.updateElPosition();\n };\n // can be called before start\n ElementMirror.prototype.setIsVisible = function (bool) {\n if (bool) {\n if (!this.isVisible) {\n if (this.mirrorEl) {\n this.mirrorEl.style.display = '';\n }\n this.isVisible = bool; // needs to happen before updateElPosition\n this.updateElPosition(); // because was not updating the position while invisible\n }\n }\n else {\n if (this.isVisible) {\n if (this.mirrorEl) {\n this.mirrorEl.style.display = 'none';\n }\n this.isVisible = bool;\n }\n }\n };\n // always async\n ElementMirror.prototype.stop = function (needsRevertAnimation, callback) {\n var _this = this;\n var done = function () {\n _this.cleanup();\n callback();\n };\n if (needsRevertAnimation &&\n this.mirrorEl &&\n this.isVisible &&\n this.revertDuration && // if 0, transition won't work\n (this.deltaX || this.deltaY) // if same coords, transition won't work\n ) {\n this.doRevertAnimation(done, this.revertDuration);\n }\n else {\n setTimeout(done, 0);\n }\n };\n ElementMirror.prototype.doRevertAnimation = function (callback, revertDuration) {\n var mirrorEl = this.mirrorEl;\n var finalSourceElRect = this.sourceEl.getBoundingClientRect(); // because autoscrolling might have happened\n mirrorEl.style.transition =\n 'top ' + revertDuration + 'ms,' +\n 'left ' + revertDuration + 'ms';\n applyStyle(mirrorEl, {\n left: finalSourceElRect.left,\n top: finalSourceElRect.top\n });\n whenTransitionDone(mirrorEl, function () {\n mirrorEl.style.transition = '';\n callback();\n });\n };\n ElementMirror.prototype.cleanup = function () {\n if (this.mirrorEl) {\n removeElement(this.mirrorEl);\n this.mirrorEl = null;\n }\n this.sourceEl = null;\n };\n ElementMirror.prototype.updateElPosition = function () {\n if (this.sourceEl && this.isVisible) {\n applyStyle(this.getMirrorEl(), {\n left: this.sourceElRect.left + this.deltaX,\n top: this.sourceElRect.top + this.deltaY\n });\n }\n };\n ElementMirror.prototype.getMirrorEl = function () {\n var sourceElRect = this.sourceElRect;\n var mirrorEl = this.mirrorEl;\n if (!mirrorEl) {\n mirrorEl = this.mirrorEl = this.sourceEl.cloneNode(true); // cloneChildren=true\n // we don't want long taps or any mouse interaction causing selection/menus.\n // would use preventSelection(), but that prevents selectstart, causing problems.\n mirrorEl.classList.add('fc-unselectable');\n mirrorEl.classList.add('fc-event-dragging');\n applyStyle(mirrorEl, {\n position: 'fixed',\n zIndex: this.zIndex,\n visibility: '',\n boxSizing: 'border-box',\n width: sourceElRect.right - sourceElRect.left,\n height: sourceElRect.bottom - sourceElRect.top,\n right: 'auto',\n bottom: 'auto',\n margin: 0\n });\n this.parentNode.appendChild(mirrorEl);\n }\n return mirrorEl;\n };\n return ElementMirror;\n}());\n\n/*\nIs a cache for a given element's scroll information (all the info that ScrollController stores)\nin addition the \"client rectangle\" of the element.. the area within the scrollbars.\n\nThe cache can be in one of two modes:\n- doesListening:false - ignores when the container is scrolled by someone else\n- doesListening:true - watch for scrolling and update the cache\n*/\nvar ScrollGeomCache = /** @class */ (function (_super) {\n __extends(ScrollGeomCache, _super);\n function ScrollGeomCache(scrollController, doesListening) {\n var _this = _super.call(this) || this;\n _this.handleScroll = function () {\n _this.scrollTop = _this.scrollController.getScrollTop();\n _this.scrollLeft = _this.scrollController.getScrollLeft();\n _this.handleScrollChange();\n };\n _this.scrollController = scrollController;\n _this.doesListening = doesListening;\n _this.scrollTop = _this.origScrollTop = scrollController.getScrollTop();\n _this.scrollLeft = _this.origScrollLeft = scrollController.getScrollLeft();\n _this.scrollWidth = scrollController.getScrollWidth();\n _this.scrollHeight = scrollController.getScrollHeight();\n _this.clientWidth = scrollController.getClientWidth();\n _this.clientHeight = scrollController.getClientHeight();\n _this.clientRect = _this.computeClientRect(); // do last in case it needs cached values\n if (_this.doesListening) {\n _this.getEventTarget().addEventListener('scroll', _this.handleScroll);\n }\n return _this;\n }\n ScrollGeomCache.prototype.destroy = function () {\n if (this.doesListening) {\n this.getEventTarget().removeEventListener('scroll', this.handleScroll);\n }\n };\n ScrollGeomCache.prototype.getScrollTop = function () {\n return this.scrollTop;\n };\n ScrollGeomCache.prototype.getScrollLeft = function () {\n return this.scrollLeft;\n };\n ScrollGeomCache.prototype.setScrollTop = function (top) {\n this.scrollController.setScrollTop(top);\n if (!this.doesListening) {\n // we are not relying on the element to normalize out-of-bounds scroll values\n // so we need to sanitize ourselves\n this.scrollTop = Math.max(Math.min(top, this.getMaxScrollTop()), 0);\n this.handleScrollChange();\n }\n };\n ScrollGeomCache.prototype.setScrollLeft = function (top) {\n this.scrollController.setScrollLeft(top);\n if (!this.doesListening) {\n // we are not relying on the element to normalize out-of-bounds scroll values\n // so we need to sanitize ourselves\n this.scrollLeft = Math.max(Math.min(top, this.getMaxScrollLeft()), 0);\n this.handleScrollChange();\n }\n };\n ScrollGeomCache.prototype.getClientWidth = function () {\n return this.clientWidth;\n };\n ScrollGeomCache.prototype.getClientHeight = function () {\n return this.clientHeight;\n };\n ScrollGeomCache.prototype.getScrollWidth = function () {\n return this.scrollWidth;\n };\n ScrollGeomCache.prototype.getScrollHeight = function () {\n return this.scrollHeight;\n };\n ScrollGeomCache.prototype.handleScrollChange = function () {\n };\n return ScrollGeomCache;\n}(ScrollController));\nvar ElementScrollGeomCache = /** @class */ (function (_super) {\n __extends(ElementScrollGeomCache, _super);\n function ElementScrollGeomCache(el, doesListening) {\n return _super.call(this, new ElementScrollController(el), doesListening) || this;\n }\n ElementScrollGeomCache.prototype.getEventTarget = function () {\n return this.scrollController.el;\n };\n ElementScrollGeomCache.prototype.computeClientRect = function () {\n return computeInnerRect(this.scrollController.el);\n };\n return ElementScrollGeomCache;\n}(ScrollGeomCache));\nvar WindowScrollGeomCache = /** @class */ (function (_super) {\n __extends(WindowScrollGeomCache, _super);\n function WindowScrollGeomCache(doesListening) {\n return _super.call(this, new WindowScrollController(), doesListening) || this;\n }\n WindowScrollGeomCache.prototype.getEventTarget = function () {\n return window;\n };\n WindowScrollGeomCache.prototype.computeClientRect = function () {\n return {\n left: this.scrollLeft,\n right: this.scrollLeft + this.clientWidth,\n top: this.scrollTop,\n bottom: this.scrollTop + this.clientHeight\n };\n };\n // the window is the only scroll object that changes it's rectangle relative\n // to the document's topleft as it scrolls\n WindowScrollGeomCache.prototype.handleScrollChange = function () {\n this.clientRect = this.computeClientRect();\n };\n return WindowScrollGeomCache;\n}(ScrollGeomCache));\n\n// If available we are using native \"performance\" API instead of \"Date\"\n// Read more about it on MDN:\n// https://developer.mozilla.org/en-US/docs/Web/API/Performance\nvar getTime = typeof performance === 'function' ? performance.now : Date.now;\n/*\nFor a pointer interaction, automatically scrolls certain scroll containers when the pointer\napproaches the edge.\n\nThe caller must call start + handleMove + stop.\n*/\nvar AutoScroller = /** @class */ (function () {\n function AutoScroller() {\n var _this = this;\n // options that can be set by caller\n this.isEnabled = true;\n this.scrollQuery = [window, '.fc-scroller'];\n this.edgeThreshold = 50; // pixels\n this.maxVelocity = 300; // pixels per second\n // internal state\n this.pointerScreenX = null;\n this.pointerScreenY = null;\n this.isAnimating = false;\n this.scrollCaches = null;\n // protect against the initial pointerdown being too close to an edge and starting the scroll\n this.everMovedUp = false;\n this.everMovedDown = false;\n this.everMovedLeft = false;\n this.everMovedRight = false;\n this.animate = function () {\n if (_this.isAnimating) { // wasn't cancelled between animation calls\n var edge = _this.computeBestEdge(_this.pointerScreenX + window.pageXOffset, _this.pointerScreenY + window.pageYOffset);\n if (edge) {\n var now = getTime();\n _this.handleSide(edge, (now - _this.msSinceRequest) / 1000);\n _this.requestAnimation(now);\n }\n else {\n _this.isAnimating = false; // will stop animation\n }\n }\n };\n }\n AutoScroller.prototype.start = function (pageX, pageY) {\n if (this.isEnabled) {\n this.scrollCaches = this.buildCaches();\n this.pointerScreenX = null;\n this.pointerScreenY = null;\n this.everMovedUp = false;\n this.everMovedDown = false;\n this.everMovedLeft = false;\n this.everMovedRight = false;\n this.handleMove(pageX, pageY);\n }\n };\n AutoScroller.prototype.handleMove = function (pageX, pageY) {\n if (this.isEnabled) {\n var pointerScreenX = pageX - window.pageXOffset;\n var pointerScreenY = pageY - window.pageYOffset;\n var yDelta = this.pointerScreenY === null ? 0 : pointerScreenY - this.pointerScreenY;\n var xDelta = this.pointerScreenX === null ? 0 : pointerScreenX - this.pointerScreenX;\n if (yDelta < 0) {\n this.everMovedUp = true;\n }\n else if (yDelta > 0) {\n this.everMovedDown = true;\n }\n if (xDelta < 0) {\n this.everMovedLeft = true;\n }\n else if (xDelta > 0) {\n this.everMovedRight = true;\n }\n this.pointerScreenX = pointerScreenX;\n this.pointerScreenY = pointerScreenY;\n if (!this.isAnimating) {\n this.isAnimating = true;\n this.requestAnimation(getTime());\n }\n }\n };\n AutoScroller.prototype.stop = function () {\n if (this.isEnabled) {\n this.isAnimating = false; // will stop animation\n for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) {\n var scrollCache = _a[_i];\n scrollCache.destroy();\n }\n this.scrollCaches = null;\n }\n };\n AutoScroller.prototype.requestAnimation = function (now) {\n this.msSinceRequest = now;\n requestAnimationFrame(this.animate);\n };\n AutoScroller.prototype.handleSide = function (edge, seconds) {\n var scrollCache = edge.scrollCache;\n var edgeThreshold = this.edgeThreshold;\n var invDistance = edgeThreshold - edge.distance;\n var velocity = // the closer to the edge, the faster we scroll\n (invDistance * invDistance) / (edgeThreshold * edgeThreshold) * // quadratic\n this.maxVelocity * seconds;\n var sign = 1;\n switch (edge.name) {\n case 'left':\n sign = -1;\n // falls through\n case 'right':\n scrollCache.setScrollLeft(scrollCache.getScrollLeft() + velocity * sign);\n break;\n case 'top':\n sign = -1;\n // falls through\n case 'bottom':\n scrollCache.setScrollTop(scrollCache.getScrollTop() + velocity * sign);\n break;\n }\n };\n // left/top are relative to document topleft\n AutoScroller.prototype.computeBestEdge = function (left, top) {\n var edgeThreshold = this.edgeThreshold;\n var bestSide = null;\n for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) {\n var scrollCache = _a[_i];\n var rect = scrollCache.clientRect;\n var leftDist = left - rect.left;\n var rightDist = rect.right - left;\n var topDist = top - rect.top;\n var bottomDist = rect.bottom - top;\n // completely within the rect?\n if (leftDist >= 0 && rightDist >= 0 && topDist >= 0 && bottomDist >= 0) {\n if (topDist <= edgeThreshold && this.everMovedUp && scrollCache.canScrollUp() &&\n (!bestSide || bestSide.distance > topDist)) {\n bestSide = { scrollCache: scrollCache, name: 'top', distance: topDist };\n }\n if (bottomDist <= edgeThreshold && this.everMovedDown && scrollCache.canScrollDown() &&\n (!bestSide || bestSide.distance > bottomDist)) {\n bestSide = { scrollCache: scrollCache, name: 'bottom', distance: bottomDist };\n }\n if (leftDist <= edgeThreshold && this.everMovedLeft && scrollCache.canScrollLeft() &&\n (!bestSide || bestSide.distance > leftDist)) {\n bestSide = { scrollCache: scrollCache, name: 'left', distance: leftDist };\n }\n if (rightDist <= edgeThreshold && this.everMovedRight && scrollCache.canScrollRight() &&\n (!bestSide || bestSide.distance > rightDist)) {\n bestSide = { scrollCache: scrollCache, name: 'right', distance: rightDist };\n }\n }\n }\n return bestSide;\n };\n AutoScroller.prototype.buildCaches = function () {\n return this.queryScrollEls().map(function (el) {\n if (el === window) {\n return new WindowScrollGeomCache(false); // false = don't listen to user-generated scrolls\n }\n else {\n return new ElementScrollGeomCache(el, false); // false = don't listen to user-generated scrolls\n }\n });\n };\n AutoScroller.prototype.queryScrollEls = function () {\n var els = [];\n for (var _i = 0, _a = this.scrollQuery; _i < _a.length; _i++) {\n var query = _a[_i];\n if (typeof query === 'object') {\n els.push(query);\n }\n else {\n els.push.apply(els, Array.prototype.slice.call(document.querySelectorAll(query)));\n }\n }\n return els;\n };\n return AutoScroller;\n}());\n\n/*\nMonitors dragging on an element. Has a number of high-level features:\n- minimum distance required before dragging\n- minimum wait time (\"delay\") before dragging\n- a mirror element that follows the pointer\n*/\nvar FeaturefulElementDragging = /** @class */ (function (_super) {\n __extends(FeaturefulElementDragging, _super);\n function FeaturefulElementDragging(containerEl, selector) {\n var _this = _super.call(this, containerEl) || this;\n // options that can be directly set by caller\n // the caller can also set the PointerDragging's options as well\n _this.delay = null;\n _this.minDistance = 0;\n _this.touchScrollAllowed = true; // prevents drag from starting and blocks scrolling during drag\n _this.mirrorNeedsRevert = false;\n _this.isInteracting = false; // is the user validly moving the pointer? lasts until pointerup\n _this.isDragging = false; // is it INTENTFULLY dragging? lasts until after revert animation\n _this.isDelayEnded = false;\n _this.isDistanceSurpassed = false;\n _this.delayTimeoutId = null;\n _this.onPointerDown = function (ev) {\n if (!_this.isDragging) { // so new drag doesn't happen while revert animation is going\n _this.isInteracting = true;\n _this.isDelayEnded = false;\n _this.isDistanceSurpassed = false;\n preventSelection(document.body);\n preventContextMenu(document.body);\n // prevent links from being visited if there's an eventual drag.\n // also prevents selection in older browsers (maybe?).\n // not necessary for touch, besides, browser would complain about passiveness.\n if (!ev.isTouch) {\n ev.origEvent.preventDefault();\n }\n _this.emitter.trigger('pointerdown', ev);\n if (_this.isInteracting && // not destroyed via pointerdown handler\n !_this.pointer.shouldIgnoreMove) {\n // actions related to initiating dragstart+dragmove+dragend...\n _this.mirror.setIsVisible(false); // reset. caller must set-visible\n _this.mirror.start(ev.subjectEl, ev.pageX, ev.pageY); // must happen on first pointer down\n _this.startDelay(ev);\n if (!_this.minDistance) {\n _this.handleDistanceSurpassed(ev);\n }\n }\n }\n };\n _this.onPointerMove = function (ev) {\n if (_this.isInteracting) {\n _this.emitter.trigger('pointermove', ev);\n if (!_this.isDistanceSurpassed) {\n var minDistance = _this.minDistance;\n var distanceSq = void 0; // current distance from the origin, squared\n var deltaX = ev.deltaX, deltaY = ev.deltaY;\n distanceSq = deltaX * deltaX + deltaY * deltaY;\n if (distanceSq >= minDistance * minDistance) { // use pythagorean theorem\n _this.handleDistanceSurpassed(ev);\n }\n }\n if (_this.isDragging) {\n // a real pointer move? (not one simulated by scrolling)\n if (ev.origEvent.type !== 'scroll') {\n _this.mirror.handleMove(ev.pageX, ev.pageY);\n _this.autoScroller.handleMove(ev.pageX, ev.pageY);\n }\n _this.emitter.trigger('dragmove', ev);\n }\n }\n };\n _this.onPointerUp = function (ev) {\n if (_this.isInteracting) {\n _this.isInteracting = false;\n allowSelection(document.body);\n allowContextMenu(document.body);\n _this.emitter.trigger('pointerup', ev); // can potentially set mirrorNeedsRevert\n if (_this.isDragging) {\n _this.autoScroller.stop();\n _this.tryStopDrag(ev); // which will stop the mirror\n }\n if (_this.delayTimeoutId) {\n clearTimeout(_this.delayTimeoutId);\n _this.delayTimeoutId = null;\n }\n }\n };\n var pointer = _this.pointer = new PointerDragging(containerEl);\n pointer.emitter.on('pointerdown', _this.onPointerDown);\n pointer.emitter.on('pointermove', _this.onPointerMove);\n pointer.emitter.on('pointerup', _this.onPointerUp);\n if (selector) {\n pointer.selector = selector;\n }\n _this.mirror = new ElementMirror();\n _this.autoScroller = new AutoScroller();\n return _this;\n }\n FeaturefulElementDragging.prototype.destroy = function () {\n this.pointer.destroy();\n // HACK: simulate a pointer-up to end the current drag\n // TODO: fire 'dragend' directly and stop interaction. discourage use of pointerup event (b/c might not fire)\n this.onPointerUp({});\n };\n FeaturefulElementDragging.prototype.startDelay = function (ev) {\n var _this = this;\n if (typeof this.delay === 'number') {\n this.delayTimeoutId = setTimeout(function () {\n _this.delayTimeoutId = null;\n _this.handleDelayEnd(ev);\n }, this.delay); // not assignable to number!\n }\n else {\n this.handleDelayEnd(ev);\n }\n };\n FeaturefulElementDragging.prototype.handleDelayEnd = function (ev) {\n this.isDelayEnded = true;\n this.tryStartDrag(ev);\n };\n FeaturefulElementDragging.prototype.handleDistanceSurpassed = function (ev) {\n this.isDistanceSurpassed = true;\n this.tryStartDrag(ev);\n };\n FeaturefulElementDragging.prototype.tryStartDrag = function (ev) {\n if (this.isDelayEnded && this.isDistanceSurpassed) {\n if (!this.pointer.wasTouchScroll || this.touchScrollAllowed) {\n this.isDragging = true;\n this.mirrorNeedsRevert = false;\n this.autoScroller.start(ev.pageX, ev.pageY);\n this.emitter.trigger('dragstart', ev);\n if (this.touchScrollAllowed === false) {\n this.pointer.cancelTouchScroll();\n }\n }\n }\n };\n FeaturefulElementDragging.prototype.tryStopDrag = function (ev) {\n // .stop() is ALWAYS asynchronous, which we NEED because we want all pointerup events\n // that come from the document to fire beforehand. much more convenient this way.\n this.mirror.stop(this.mirrorNeedsRevert, this.stopDrag.bind(this, ev) // bound with args\n );\n };\n FeaturefulElementDragging.prototype.stopDrag = function (ev) {\n this.isDragging = false;\n this.emitter.trigger('dragend', ev);\n };\n // fill in the implementations...\n FeaturefulElementDragging.prototype.setIgnoreMove = function (bool) {\n this.pointer.shouldIgnoreMove = bool;\n };\n FeaturefulElementDragging.prototype.setMirrorIsVisible = function (bool) {\n this.mirror.setIsVisible(bool);\n };\n FeaturefulElementDragging.prototype.setMirrorNeedsRevert = function (bool) {\n this.mirrorNeedsRevert = bool;\n };\n FeaturefulElementDragging.prototype.setAutoScrollEnabled = function (bool) {\n this.autoScroller.isEnabled = bool;\n };\n return FeaturefulElementDragging;\n}(ElementDragging));\n\n/*\nWhen this class is instantiated, it records the offset of an element (relative to the document topleft),\nand continues to monitor scrolling, updating the cached coordinates if it needs to.\nDoes not access the DOM after instantiation, so highly performant.\n\nAlso keeps track of all scrolling/overflow:hidden containers that are parents of the given element\nand an determine if a given point is inside the combined clipping rectangle.\n*/\nvar OffsetTracker = /** @class */ (function () {\n function OffsetTracker(el) {\n this.origRect = computeRect(el);\n // will work fine for divs that have overflow:hidden\n this.scrollCaches = getClippingParents(el).map(function (el) {\n return new ElementScrollGeomCache(el, true); // listen=true\n });\n }\n OffsetTracker.prototype.destroy = function () {\n for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) {\n var scrollCache = _a[_i];\n scrollCache.destroy();\n }\n };\n OffsetTracker.prototype.computeLeft = function () {\n var left = this.origRect.left;\n for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) {\n var scrollCache = _a[_i];\n left += scrollCache.origScrollLeft - scrollCache.getScrollLeft();\n }\n return left;\n };\n OffsetTracker.prototype.computeTop = function () {\n var top = this.origRect.top;\n for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) {\n var scrollCache = _a[_i];\n top += scrollCache.origScrollTop - scrollCache.getScrollTop();\n }\n return top;\n };\n OffsetTracker.prototype.isWithinClipping = function (pageX, pageY) {\n var point = { left: pageX, top: pageY };\n for (var _i = 0, _a = this.scrollCaches; _i < _a.length; _i++) {\n var scrollCache = _a[_i];\n if (!isIgnoredClipping(scrollCache.getEventTarget()) &&\n !pointInsideRect(point, scrollCache.clientRect)) {\n return false;\n }\n }\n return true;\n };\n return OffsetTracker;\n}());\n// certain clipping containers should never constrain interactions, like and \n// https://github.com/fullcalendar/fullcalendar/issues/3615\nfunction isIgnoredClipping(node) {\n var tagName = node.tagName;\n return tagName === 'HTML' || tagName === 'BODY';\n}\n\n/*\nTracks movement over multiple droppable areas (aka \"hits\")\nthat exist in one or more DateComponents.\nRelies on an existing draggable.\n\nemits:\n- pointerdown\n- dragstart\n- hitchange - fires initially, even if not over a hit\n- pointerup\n- (hitchange - again, to null, if ended over a hit)\n- dragend\n*/\nvar HitDragging = /** @class */ (function () {\n function HitDragging(dragging, droppableStore) {\n var _this = this;\n // options that can be set by caller\n this.useSubjectCenter = false;\n this.requireInitial = true; // if doesn't start out on a hit, won't emit any events\n this.initialHit = null;\n this.movingHit = null;\n this.finalHit = null; // won't ever be populated if shouldIgnoreMove\n this.handlePointerDown = function (ev) {\n var dragging = _this.dragging;\n _this.initialHit = null;\n _this.movingHit = null;\n _this.finalHit = null;\n _this.prepareHits();\n _this.processFirstCoord(ev);\n if (_this.initialHit || !_this.requireInitial) {\n dragging.setIgnoreMove(false);\n _this.emitter.trigger('pointerdown', ev); // TODO: fire this before computing processFirstCoord, so listeners can cancel. this gets fired by almost every handler :(\n }\n else {\n dragging.setIgnoreMove(true);\n }\n };\n this.handleDragStart = function (ev) {\n _this.emitter.trigger('dragstart', ev);\n _this.handleMove(ev, true); // force = fire even if initially null\n };\n this.handleDragMove = function (ev) {\n _this.emitter.trigger('dragmove', ev);\n _this.handleMove(ev);\n };\n this.handlePointerUp = function (ev) {\n _this.releaseHits();\n _this.emitter.trigger('pointerup', ev);\n };\n this.handleDragEnd = function (ev) {\n if (_this.movingHit) {\n _this.emitter.trigger('hitupdate', null, true, ev);\n }\n _this.finalHit = _this.movingHit;\n _this.movingHit = null;\n _this.emitter.trigger('dragend', ev);\n };\n this.droppableStore = droppableStore;\n dragging.emitter.on('pointerdown', this.handlePointerDown);\n dragging.emitter.on('dragstart', this.handleDragStart);\n dragging.emitter.on('dragmove', this.handleDragMove);\n dragging.emitter.on('pointerup', this.handlePointerUp);\n dragging.emitter.on('dragend', this.handleDragEnd);\n this.dragging = dragging;\n this.emitter = new Emitter();\n }\n // sets initialHit\n // sets coordAdjust\n HitDragging.prototype.processFirstCoord = function (ev) {\n var origPoint = { left: ev.pageX, top: ev.pageY };\n var adjustedPoint = origPoint;\n var subjectEl = ev.subjectEl;\n var subjectRect;\n if (subjectEl !== document) {\n subjectRect = computeRect(subjectEl);\n adjustedPoint = constrainPoint(adjustedPoint, subjectRect);\n }\n var initialHit = this.initialHit = this.queryHitForOffset(adjustedPoint.left, adjustedPoint.top);\n if (initialHit) {\n if (this.useSubjectCenter && subjectRect) {\n var slicedSubjectRect = intersectRects(subjectRect, initialHit.rect);\n if (slicedSubjectRect) {\n adjustedPoint = getRectCenter(slicedSubjectRect);\n }\n }\n this.coordAdjust = diffPoints(adjustedPoint, origPoint);\n }\n else {\n this.coordAdjust = { left: 0, top: 0 };\n }\n };\n HitDragging.prototype.handleMove = function (ev, forceHandle) {\n var hit = this.queryHitForOffset(ev.pageX + this.coordAdjust.left, ev.pageY + this.coordAdjust.top);\n if (forceHandle || !isHitsEqual(this.movingHit, hit)) {\n this.movingHit = hit;\n this.emitter.trigger('hitupdate', hit, false, ev);\n }\n };\n HitDragging.prototype.prepareHits = function () {\n this.offsetTrackers = mapHash(this.droppableStore, function (interactionSettings) {\n interactionSettings.component.prepareHits();\n return new OffsetTracker(interactionSettings.el);\n });\n };\n HitDragging.prototype.releaseHits = function () {\n var offsetTrackers = this.offsetTrackers;\n for (var id in offsetTrackers) {\n offsetTrackers[id].destroy();\n }\n this.offsetTrackers = {};\n };\n HitDragging.prototype.queryHitForOffset = function (offsetLeft, offsetTop) {\n var _a = this, droppableStore = _a.droppableStore, offsetTrackers = _a.offsetTrackers;\n var bestHit = null;\n for (var id in droppableStore) {\n var component = droppableStore[id].component;\n var offsetTracker = offsetTrackers[id];\n if (offsetTracker && // wasn't destroyed mid-drag\n offsetTracker.isWithinClipping(offsetLeft, offsetTop)) {\n var originLeft = offsetTracker.computeLeft();\n var originTop = offsetTracker.computeTop();\n var positionLeft = offsetLeft - originLeft;\n var positionTop = offsetTop - originTop;\n var origRect = offsetTracker.origRect;\n var width = origRect.right - origRect.left;\n var height = origRect.bottom - origRect.top;\n if (\n // must be within the element's bounds\n positionLeft >= 0 && positionLeft < width &&\n positionTop >= 0 && positionTop < height) {\n var hit = component.queryHit(positionLeft, positionTop, width, height);\n var dateProfile = component.context.getCurrentData().dateProfile;\n if (hit &&\n (\n // make sure the hit is within activeRange, meaning it's not a deal cell\n rangeContainsRange(dateProfile.activeRange, hit.dateSpan.range)) &&\n (!bestHit || hit.layer > bestHit.layer)) {\n // TODO: better way to re-orient rectangle\n hit.rect.left += originLeft;\n hit.rect.right += originLeft;\n hit.rect.top += originTop;\n hit.rect.bottom += originTop;\n bestHit = hit;\n }\n }\n }\n }\n return bestHit;\n };\n return HitDragging;\n}());\nfunction isHitsEqual(hit0, hit1) {\n if (!hit0 && !hit1) {\n return true;\n }\n if (Boolean(hit0) !== Boolean(hit1)) {\n return false;\n }\n return isDateSpansEqual(hit0.dateSpan, hit1.dateSpan);\n}\n\nfunction buildDatePointApiWithContext(dateSpan, context) {\n var props = {};\n for (var _i = 0, _a = context.pluginHooks.datePointTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n __assign(props, transform(dateSpan, context));\n }\n __assign(props, buildDatePointApi(dateSpan, context.dateEnv));\n return props;\n}\nfunction buildDatePointApi(span, dateEnv) {\n return {\n date: dateEnv.toDate(span.range.start),\n dateStr: dateEnv.formatIso(span.range.start, { omitTime: span.allDay }),\n allDay: span.allDay\n };\n}\n\n/*\nMonitors when the user clicks on a specific date/time of a component.\nA pointerdown+pointerup on the same \"hit\" constitutes a click.\n*/\nvar DateClicking = /** @class */ (function (_super) {\n __extends(DateClicking, _super);\n function DateClicking(settings) {\n var _this = _super.call(this, settings) || this;\n _this.handlePointerDown = function (ev) {\n var dragging = _this.dragging;\n // do this in pointerdown (not dragend) because DOM might be mutated by the time dragend is fired\n dragging.setIgnoreMove(!_this.component.isValidDateDownEl(dragging.pointer.downEl));\n };\n // won't even fire if moving was ignored\n _this.handleDragEnd = function (ev) {\n var component = _this.component;\n var pointer = _this.dragging.pointer;\n if (!pointer.wasTouchScroll) {\n var _a = _this.hitDragging, initialHit = _a.initialHit, finalHit = _a.finalHit;\n if (initialHit && finalHit && isHitsEqual(initialHit, finalHit)) {\n var context = component.context;\n var arg = __assign(__assign({}, buildDatePointApiWithContext(initialHit.dateSpan, context)), { dayEl: initialHit.dayEl, jsEvent: ev.origEvent, view: context.viewApi || context.calendarApi.view });\n context.emitter.trigger('dateClick', arg);\n }\n }\n };\n // we DO want to watch pointer moves because otherwise finalHit won't get populated\n _this.dragging = new FeaturefulElementDragging(settings.el);\n _this.dragging.autoScroller.isEnabled = false;\n var hitDragging = _this.hitDragging = new HitDragging(_this.dragging, interactionSettingsToStore(settings));\n hitDragging.emitter.on('pointerdown', _this.handlePointerDown);\n hitDragging.emitter.on('dragend', _this.handleDragEnd);\n return _this;\n }\n DateClicking.prototype.destroy = function () {\n this.dragging.destroy();\n };\n return DateClicking;\n}(Interaction));\n\n/*\nTracks when the user selects a portion of time of a component,\nconstituted by a drag over date cells, with a possible delay at the beginning of the drag.\n*/\nvar DateSelecting = /** @class */ (function (_super) {\n __extends(DateSelecting, _super);\n function DateSelecting(settings) {\n var _this = _super.call(this, settings) || this;\n _this.dragSelection = null;\n _this.handlePointerDown = function (ev) {\n var _a = _this, component = _a.component, dragging = _a.dragging;\n var options = component.context.options;\n var canSelect = options.selectable &&\n component.isValidDateDownEl(ev.origEvent.target);\n // don't bother to watch expensive moves if component won't do selection\n dragging.setIgnoreMove(!canSelect);\n // if touch, require user to hold down\n dragging.delay = ev.isTouch ? getComponentTouchDelay(component) : null;\n };\n _this.handleDragStart = function (ev) {\n _this.component.context.calendarApi.unselect(ev); // unselect previous selections\n };\n _this.handleHitUpdate = function (hit, isFinal) {\n var context = _this.component.context;\n var dragSelection = null;\n var isInvalid = false;\n if (hit) {\n dragSelection = joinHitsIntoSelection(_this.hitDragging.initialHit, hit, context.pluginHooks.dateSelectionTransformers);\n if (!dragSelection || !_this.component.isDateSelectionValid(dragSelection)) {\n isInvalid = true;\n dragSelection = null;\n }\n }\n if (dragSelection) {\n context.dispatch({ type: 'SELECT_DATES', selection: dragSelection });\n }\n else if (!isFinal) { // only unselect if moved away while dragging\n context.dispatch({ type: 'UNSELECT_DATES' });\n }\n if (!isInvalid) {\n enableCursor();\n }\n else {\n disableCursor();\n }\n if (!isFinal) {\n _this.dragSelection = dragSelection; // only clear if moved away from all hits while dragging\n }\n };\n _this.handlePointerUp = function (pev) {\n if (_this.dragSelection) {\n // selection is already rendered, so just need to report selection\n triggerDateSelect(_this.dragSelection, pev, _this.component.context);\n _this.dragSelection = null;\n }\n };\n var component = settings.component;\n var options = component.context.options;\n var dragging = _this.dragging = new FeaturefulElementDragging(settings.el);\n dragging.touchScrollAllowed = false;\n dragging.minDistance = options.selectMinDistance || 0;\n dragging.autoScroller.isEnabled = options.dragScroll;\n var hitDragging = _this.hitDragging = new HitDragging(_this.dragging, interactionSettingsToStore(settings));\n hitDragging.emitter.on('pointerdown', _this.handlePointerDown);\n hitDragging.emitter.on('dragstart', _this.handleDragStart);\n hitDragging.emitter.on('hitupdate', _this.handleHitUpdate);\n hitDragging.emitter.on('pointerup', _this.handlePointerUp);\n return _this;\n }\n DateSelecting.prototype.destroy = function () {\n this.dragging.destroy();\n };\n return DateSelecting;\n}(Interaction));\nfunction getComponentTouchDelay(component) {\n var options = component.context.options;\n var delay = options.selectLongPressDelay;\n if (delay == null) {\n delay = options.longPressDelay;\n }\n return delay;\n}\nfunction joinHitsIntoSelection(hit0, hit1, dateSelectionTransformers) {\n var dateSpan0 = hit0.dateSpan;\n var dateSpan1 = hit1.dateSpan;\n var ms = [\n dateSpan0.range.start,\n dateSpan0.range.end,\n dateSpan1.range.start,\n dateSpan1.range.end\n ];\n ms.sort(compareNumbers);\n var props = {};\n for (var _i = 0, dateSelectionTransformers_1 = dateSelectionTransformers; _i < dateSelectionTransformers_1.length; _i++) {\n var transformer = dateSelectionTransformers_1[_i];\n var res = transformer(hit0, hit1);\n if (res === false) {\n return null;\n }\n else if (res) {\n __assign(props, res);\n }\n }\n props.range = { start: ms[0], end: ms[3] };\n props.allDay = dateSpan0.allDay;\n return props;\n}\n\nvar EventDragging = /** @class */ (function (_super) {\n __extends(EventDragging, _super);\n function EventDragging(settings) {\n var _this = _super.call(this, settings) || this;\n // internal state\n _this.subjectEl = null;\n _this.subjectSeg = null; // the seg being selected/dragged\n _this.isDragging = false;\n _this.eventRange = null;\n _this.relevantEvents = null; // the events being dragged\n _this.receivingContext = null;\n _this.validMutation = null;\n _this.mutatedRelevantEvents = null;\n _this.handlePointerDown = function (ev) {\n var origTarget = ev.origEvent.target;\n var _a = _this, component = _a.component, dragging = _a.dragging;\n var mirror = dragging.mirror;\n var options = component.context.options;\n var initialContext = component.context;\n _this.subjectEl = ev.subjectEl;\n var subjectSeg = _this.subjectSeg = getElSeg(ev.subjectEl);\n var eventRange = _this.eventRange = subjectSeg.eventRange;\n var eventInstanceId = eventRange.instance.instanceId;\n _this.relevantEvents = getRelevantEvents(initialContext.getCurrentData().eventStore, eventInstanceId);\n dragging.minDistance = ev.isTouch ? 0 : options.eventDragMinDistance;\n dragging.delay =\n // only do a touch delay if touch and this event hasn't been selected yet\n (ev.isTouch && eventInstanceId !== component.props.eventSelection) ?\n getComponentTouchDelay$1(component) :\n null;\n mirror.parentNode = elementClosest(origTarget, '.fc');\n mirror.revertDuration = options.dragRevertDuration;\n var isValid = component.isValidSegDownEl(origTarget) &&\n !elementClosest(origTarget, '.fc-event-resizer'); // NOT on a resizer\n dragging.setIgnoreMove(!isValid);\n // disable dragging for elements that are resizable (ie, selectable)\n // but are not draggable\n _this.isDragging = isValid &&\n ev.subjectEl.classList.contains('fc-event-draggable');\n };\n _this.handleDragStart = function (ev) {\n var initialContext = _this.component.context;\n var eventRange = _this.eventRange;\n var eventInstanceId = eventRange.instance.instanceId;\n if (ev.isTouch) {\n // need to select a different event?\n if (eventInstanceId !== _this.component.props.eventSelection) {\n initialContext.dispatch({ type: 'SELECT_EVENT', eventInstanceId: eventInstanceId });\n }\n }\n else {\n // if now using mouse, but was previous touch interaction, clear selected event\n initialContext.dispatch({ type: 'UNSELECT_EVENT' });\n }\n if (_this.isDragging) {\n initialContext.calendarApi.unselect(ev); // unselect *date* selection\n initialContext.emitter.trigger('eventDragStart', {\n el: _this.subjectEl,\n event: new EventApi(initialContext, eventRange.def, eventRange.instance),\n jsEvent: ev.origEvent,\n view: initialContext.viewApi\n });\n }\n };\n _this.handleHitUpdate = function (hit, isFinal) {\n if (!_this.isDragging) {\n return;\n }\n var relevantEvents = _this.relevantEvents;\n var initialHit = _this.hitDragging.initialHit;\n var initialContext = _this.component.context;\n // states based on new hit\n var receivingContext = null;\n var mutation = null;\n var mutatedRelevantEvents = null;\n var isInvalid = false;\n var interaction = {\n affectedEvents: relevantEvents,\n mutatedEvents: createEmptyEventStore(),\n isEvent: true\n };\n if (hit) {\n var receivingComponent = hit.component;\n receivingContext = receivingComponent.context;\n var receivingOptions = receivingContext.options;\n if (initialContext === receivingContext ||\n receivingOptions.editable && receivingOptions.droppable) {\n mutation = computeEventMutation(initialHit, hit, receivingContext.getCurrentData().pluginHooks.eventDragMutationMassagers);\n if (mutation) {\n mutatedRelevantEvents = applyMutationToEventStore(relevantEvents, receivingContext.getCurrentData().eventUiBases, mutation, receivingContext);\n interaction.mutatedEvents = mutatedRelevantEvents;\n if (!receivingComponent.isInteractionValid(interaction)) {\n isInvalid = true;\n mutation = null;\n mutatedRelevantEvents = null;\n interaction.mutatedEvents = createEmptyEventStore();\n }\n }\n }\n else {\n receivingContext = null;\n }\n }\n _this.displayDrag(receivingContext, interaction);\n if (!isInvalid) {\n enableCursor();\n }\n else {\n disableCursor();\n }\n if (!isFinal) {\n if (initialContext === receivingContext && // TODO: write test for this\n isHitsEqual(initialHit, hit)) {\n mutation = null;\n }\n _this.dragging.setMirrorNeedsRevert(!mutation);\n // render the mirror if no already-rendered mirror\n // TODO: wish we could somehow wait for dispatch to guarantee render\n _this.dragging.setMirrorIsVisible(!hit || !document.querySelector('.fc-event-mirror'));\n // assign states based on new hit\n _this.receivingContext = receivingContext;\n _this.validMutation = mutation;\n _this.mutatedRelevantEvents = mutatedRelevantEvents;\n }\n };\n _this.handlePointerUp = function () {\n if (!_this.isDragging) {\n _this.cleanup(); // because handleDragEnd won't fire\n }\n };\n _this.handleDragEnd = function (ev) {\n if (_this.isDragging) {\n var initialContext_1 = _this.component.context;\n var initialView = initialContext_1.viewApi;\n var _a = _this, receivingContext_1 = _a.receivingContext, validMutation = _a.validMutation;\n var eventDef = _this.eventRange.def;\n var eventInstance = _this.eventRange.instance;\n var eventApi = new EventApi(initialContext_1, eventDef, eventInstance);\n var relevantEvents_1 = _this.relevantEvents;\n var mutatedRelevantEvents_1 = _this.mutatedRelevantEvents;\n var finalHit = _this.hitDragging.finalHit;\n _this.clearDrag(); // must happen after revert animation\n initialContext_1.emitter.trigger('eventDragStop', {\n el: _this.subjectEl,\n event: eventApi,\n jsEvent: ev.origEvent,\n view: initialView\n });\n if (validMutation) {\n // dropped within same calendar\n if (receivingContext_1 === initialContext_1) {\n var updatedEventApi = new EventApi(initialContext_1, mutatedRelevantEvents_1.defs[eventDef.defId], eventInstance ? mutatedRelevantEvents_1.instances[eventInstance.instanceId] : null);\n initialContext_1.dispatch({\n type: 'MERGE_EVENTS',\n eventStore: mutatedRelevantEvents_1\n });\n var eventChangeArg = {\n oldEvent: eventApi,\n event: updatedEventApi,\n relatedEvents: buildEventApis(mutatedRelevantEvents_1, initialContext_1, eventInstance),\n revert: function () {\n initialContext_1.dispatch({\n type: 'MERGE_EVENTS',\n eventStore: relevantEvents_1 // the pre-change data\n });\n }\n };\n var transformed = {};\n for (var _i = 0, _b = initialContext_1.getCurrentData().pluginHooks.eventDropTransformers; _i < _b.length; _i++) {\n var transformer = _b[_i];\n __assign(transformed, transformer(validMutation, initialContext_1));\n }\n initialContext_1.emitter.trigger('eventDrop', __assign(__assign(__assign({}, eventChangeArg), transformed), { el: ev.subjectEl, delta: validMutation.datesDelta, jsEvent: ev.origEvent, view: initialView }));\n initialContext_1.emitter.trigger('eventChange', eventChangeArg);\n // dropped in different calendar\n }\n else if (receivingContext_1) {\n initialContext_1.emitter.trigger('eventLeave', {\n draggedEl: ev.subjectEl,\n event: eventApi,\n view: initialView\n });\n initialContext_1.dispatch({\n type: 'REMOVE_EVENTS',\n eventStore: relevantEvents_1\n });\n initialContext_1.emitter.trigger('eventRemove', {\n event: eventApi,\n relatedEvents: buildEventApis(relevantEvents_1, initialContext_1, eventInstance),\n revert: function () {\n initialContext_1.dispatch({\n type: 'MERGE_EVENTS',\n eventStore: relevantEvents_1\n });\n }\n });\n var addedEventDef = mutatedRelevantEvents_1.defs[eventDef.defId];\n var addedEventInstance = mutatedRelevantEvents_1.instances[eventInstance.instanceId];\n var addedEventApi = new EventApi(receivingContext_1, addedEventDef, addedEventInstance);\n receivingContext_1.dispatch({\n type: 'MERGE_EVENTS',\n eventStore: mutatedRelevantEvents_1\n });\n receivingContext_1.emitter.trigger('eventAdd', {\n event: addedEventApi,\n relatedEvents: buildEventApis(mutatedRelevantEvents_1, receivingContext_1, addedEventInstance),\n revert: function () {\n receivingContext_1.dispatch({\n type: 'REMOVE_EVENTS',\n eventStore: mutatedRelevantEvents_1\n });\n }\n });\n if (ev.isTouch) {\n receivingContext_1.dispatch({\n type: 'SELECT_EVENT',\n eventInstanceId: eventInstance.instanceId\n });\n }\n receivingContext_1.emitter.trigger('drop', __assign(__assign({}, buildDatePointApiWithContext(finalHit.dateSpan, receivingContext_1)), { draggedEl: ev.subjectEl, jsEvent: ev.origEvent, view: finalHit.component.context.viewApi }));\n receivingContext_1.emitter.trigger('eventReceive', {\n draggedEl: ev.subjectEl,\n event: addedEventApi,\n view: finalHit.component.context.viewApi\n });\n }\n }\n else {\n initialContext_1.emitter.trigger('_noEventDrop');\n }\n }\n _this.cleanup();\n };\n var component = _this.component;\n var options = component.context.options;\n var dragging = _this.dragging = new FeaturefulElementDragging(settings.el);\n dragging.pointer.selector = EventDragging.SELECTOR;\n dragging.touchScrollAllowed = false;\n dragging.autoScroller.isEnabled = options.dragScroll;\n var hitDragging = _this.hitDragging = new HitDragging(_this.dragging, interactionSettingsStore);\n hitDragging.useSubjectCenter = settings.useEventCenter;\n hitDragging.emitter.on('pointerdown', _this.handlePointerDown);\n hitDragging.emitter.on('dragstart', _this.handleDragStart);\n hitDragging.emitter.on('hitupdate', _this.handleHitUpdate);\n hitDragging.emitter.on('pointerup', _this.handlePointerUp);\n hitDragging.emitter.on('dragend', _this.handleDragEnd);\n return _this;\n }\n EventDragging.prototype.destroy = function () {\n this.dragging.destroy();\n };\n // render a drag state on the next receivingCalendar\n EventDragging.prototype.displayDrag = function (nextContext, state) {\n var initialContext = this.component.context;\n var prevContext = this.receivingContext;\n // does the previous calendar need to be cleared?\n if (prevContext && prevContext !== nextContext) {\n // does the initial calendar need to be cleared?\n // if so, don't clear all the way. we still need to to hide the affectedEvents\n if (prevContext === initialContext) {\n prevContext.dispatch({\n type: 'SET_EVENT_DRAG',\n state: {\n affectedEvents: state.affectedEvents,\n mutatedEvents: createEmptyEventStore(),\n isEvent: true\n }\n });\n // completely clear the old calendar if it wasn't the initial\n }\n else {\n prevContext.dispatch({ type: 'UNSET_EVENT_DRAG' });\n }\n }\n if (nextContext) {\n nextContext.dispatch({ type: 'SET_EVENT_DRAG', state: state });\n }\n };\n EventDragging.prototype.clearDrag = function () {\n var initialCalendar = this.component.context;\n var receivingContext = this.receivingContext;\n if (receivingContext) {\n receivingContext.dispatch({ type: 'UNSET_EVENT_DRAG' });\n }\n // the initial calendar might have an dummy drag state from displayDrag\n if (initialCalendar !== receivingContext) {\n initialCalendar.dispatch({ type: 'UNSET_EVENT_DRAG' });\n }\n };\n EventDragging.prototype.cleanup = function () {\n this.subjectSeg = null;\n this.isDragging = false;\n this.eventRange = null;\n this.relevantEvents = null;\n this.receivingContext = null;\n this.validMutation = null;\n this.mutatedRelevantEvents = null;\n };\n // TODO: test this in IE11\n // QUESTION: why do we need it on the resizable???\n EventDragging.SELECTOR = '.fc-event-draggable, .fc-event-resizable';\n return EventDragging;\n}(Interaction));\nfunction computeEventMutation(hit0, hit1, massagers) {\n var dateSpan0 = hit0.dateSpan;\n var dateSpan1 = hit1.dateSpan;\n var date0 = dateSpan0.range.start;\n var date1 = dateSpan1.range.start;\n var standardProps = {};\n if (dateSpan0.allDay !== dateSpan1.allDay) {\n standardProps.allDay = dateSpan1.allDay;\n standardProps.hasEnd = hit1.component.context.options.allDayMaintainDuration;\n if (dateSpan1.allDay) {\n // means date1 is already start-of-day,\n // but date0 needs to be converted\n date0 = startOfDay(date0);\n }\n }\n var delta = diffDates(date0, date1, hit0.component.context.dateEnv, hit0.component === hit1.component ?\n hit0.component.largeUnit :\n null);\n if (delta.milliseconds) { // has hours/minutes/seconds\n standardProps.allDay = false;\n }\n var mutation = {\n datesDelta: delta,\n standardProps: standardProps\n };\n for (var _i = 0, massagers_1 = massagers; _i < massagers_1.length; _i++) {\n var massager = massagers_1[_i];\n massager(mutation, hit0, hit1);\n }\n return mutation;\n}\nfunction getComponentTouchDelay$1(component) {\n var options = component.context.options;\n var delay = options.eventLongPressDelay;\n if (delay == null) {\n delay = options.longPressDelay;\n }\n return delay;\n}\n\nvar EventResizing = /** @class */ (function (_super) {\n __extends(EventResizing, _super);\n function EventResizing(settings) {\n var _this = _super.call(this, settings) || this;\n // internal state\n _this.draggingSegEl = null;\n _this.draggingSeg = null; // TODO: rename to resizingSeg? subjectSeg?\n _this.eventRange = null;\n _this.relevantEvents = null;\n _this.validMutation = null;\n _this.mutatedRelevantEvents = null;\n _this.handlePointerDown = function (ev) {\n var component = _this.component;\n var segEl = _this.querySegEl(ev);\n var seg = getElSeg(segEl);\n var eventRange = _this.eventRange = seg.eventRange;\n _this.dragging.minDistance = component.context.options.eventDragMinDistance;\n // if touch, need to be working with a selected event\n _this.dragging.setIgnoreMove(!_this.component.isValidSegDownEl(ev.origEvent.target) ||\n (ev.isTouch && _this.component.props.eventSelection !== eventRange.instance.instanceId));\n };\n _this.handleDragStart = function (ev) {\n var context = _this.component.context;\n var eventRange = _this.eventRange;\n _this.relevantEvents = getRelevantEvents(context.getCurrentData().eventStore, _this.eventRange.instance.instanceId);\n var segEl = _this.querySegEl(ev);\n _this.draggingSegEl = segEl;\n _this.draggingSeg = getElSeg(segEl);\n context.calendarApi.unselect();\n context.emitter.trigger('eventResizeStart', {\n el: segEl,\n event: new EventApi(context, eventRange.def, eventRange.instance),\n jsEvent: ev.origEvent,\n view: context.viewApi\n });\n };\n _this.handleHitUpdate = function (hit, isFinal, ev) {\n var context = _this.component.context;\n var relevantEvents = _this.relevantEvents;\n var initialHit = _this.hitDragging.initialHit;\n var eventInstance = _this.eventRange.instance;\n var mutation = null;\n var mutatedRelevantEvents = null;\n var isInvalid = false;\n var interaction = {\n affectedEvents: relevantEvents,\n mutatedEvents: createEmptyEventStore(),\n isEvent: true\n };\n if (hit) {\n mutation = computeMutation(initialHit, hit, ev.subjectEl.classList.contains('fc-event-resizer-start'), eventInstance.range, context.pluginHooks.eventResizeJoinTransforms);\n }\n if (mutation) {\n mutatedRelevantEvents = applyMutationToEventStore(relevantEvents, context.getCurrentData().eventUiBases, mutation, context);\n interaction.mutatedEvents = mutatedRelevantEvents;\n if (!_this.component.isInteractionValid(interaction)) {\n isInvalid = true;\n mutation = null;\n mutatedRelevantEvents = null;\n interaction.mutatedEvents = null;\n }\n }\n if (mutatedRelevantEvents) {\n context.dispatch({\n type: 'SET_EVENT_RESIZE',\n state: interaction\n });\n }\n else {\n context.dispatch({ type: 'UNSET_EVENT_RESIZE' });\n }\n if (!isInvalid) {\n enableCursor();\n }\n else {\n disableCursor();\n }\n if (!isFinal) {\n if (mutation && isHitsEqual(initialHit, hit)) {\n mutation = null;\n }\n _this.validMutation = mutation;\n _this.mutatedRelevantEvents = mutatedRelevantEvents;\n }\n };\n _this.handleDragEnd = function (ev) {\n var context = _this.component.context;\n var eventDef = _this.eventRange.def;\n var eventInstance = _this.eventRange.instance;\n var eventApi = new EventApi(context, eventDef, eventInstance);\n var relevantEvents = _this.relevantEvents;\n var mutatedRelevantEvents = _this.mutatedRelevantEvents;\n context.emitter.trigger('eventResizeStop', {\n el: _this.draggingSegEl,\n event: eventApi,\n jsEvent: ev.origEvent,\n view: context.viewApi\n });\n if (_this.validMutation) {\n var updatedEventApi = new EventApi(context, mutatedRelevantEvents.defs[eventDef.defId], eventInstance ? mutatedRelevantEvents.instances[eventInstance.instanceId] : null);\n context.dispatch({\n type: 'MERGE_EVENTS',\n eventStore: mutatedRelevantEvents\n });\n var eventChangeArg = {\n oldEvent: eventApi,\n event: updatedEventApi,\n relatedEvents: buildEventApis(mutatedRelevantEvents, context, eventInstance),\n revert: function () {\n context.dispatch({\n type: 'MERGE_EVENTS',\n eventStore: relevantEvents // the pre-change events\n });\n }\n };\n context.emitter.trigger('eventResize', __assign(__assign({}, eventChangeArg), { el: _this.draggingSegEl, startDelta: _this.validMutation.startDelta || createDuration(0), endDelta: _this.validMutation.endDelta || createDuration(0), jsEvent: ev.origEvent, view: context.viewApi }));\n context.emitter.trigger('eventChange', eventChangeArg);\n }\n else {\n context.emitter.trigger('_noEventResize');\n }\n // reset all internal state\n _this.draggingSeg = null;\n _this.relevantEvents = null;\n _this.validMutation = null;\n // okay to keep eventInstance around. useful to set it in handlePointerDown\n };\n var component = settings.component;\n var dragging = _this.dragging = new FeaturefulElementDragging(settings.el);\n dragging.pointer.selector = '.fc-event-resizer';\n dragging.touchScrollAllowed = false;\n dragging.autoScroller.isEnabled = component.context.options.dragScroll;\n var hitDragging = _this.hitDragging = new HitDragging(_this.dragging, interactionSettingsToStore(settings));\n hitDragging.emitter.on('pointerdown', _this.handlePointerDown);\n hitDragging.emitter.on('dragstart', _this.handleDragStart);\n hitDragging.emitter.on('hitupdate', _this.handleHitUpdate);\n hitDragging.emitter.on('dragend', _this.handleDragEnd);\n return _this;\n }\n EventResizing.prototype.destroy = function () {\n this.dragging.destroy();\n };\n EventResizing.prototype.querySegEl = function (ev) {\n return elementClosest(ev.subjectEl, '.fc-event');\n };\n return EventResizing;\n}(Interaction));\nfunction computeMutation(hit0, hit1, isFromStart, instanceRange, transforms) {\n var dateEnv = hit0.component.context.dateEnv;\n var date0 = hit0.dateSpan.range.start;\n var date1 = hit1.dateSpan.range.start;\n var delta = diffDates(date0, date1, dateEnv, hit0.component.largeUnit);\n var props = {};\n for (var _i = 0, transforms_1 = transforms; _i < transforms_1.length; _i++) {\n var transform = transforms_1[_i];\n var res = transform(hit0, hit1);\n if (res === false) {\n return null;\n }\n else if (res) {\n __assign(props, res);\n }\n }\n if (isFromStart) {\n if (dateEnv.add(instanceRange.start, delta) < instanceRange.end) {\n props.startDelta = delta;\n return props;\n }\n }\n else {\n if (dateEnv.add(instanceRange.end, delta) > instanceRange.start) {\n props.endDelta = delta;\n return props;\n }\n }\n return null;\n}\n\nvar UnselectAuto = /** @class */ (function () {\n function UnselectAuto(context) {\n var _this = this;\n this.context = context;\n this.isRecentPointerDateSelect = false; // wish we could use a selector to detect date selection, but uses hit system\n this.onSelect = function (selectInfo) {\n if (selectInfo.jsEvent) {\n _this.isRecentPointerDateSelect = true;\n }\n };\n this.onDocumentPointerUp = function (pev) {\n var context = _this.context;\n var documentPointer = _this.documentPointer;\n var calendarState = context.getCurrentData();\n // touch-scrolling should never unfocus any type of selection\n if (!documentPointer.wasTouchScroll) {\n if (calendarState.dateSelection && // an existing date selection?\n !_this.isRecentPointerDateSelect // a new pointer-initiated date selection since last onDocumentPointerUp?\n ) {\n var unselectAuto = context.options.unselectAuto;\n var unselectCancel = context.options.unselectCancel;\n if (unselectAuto && (!unselectAuto || !elementClosest(documentPointer.downEl, unselectCancel))) {\n context.calendarApi.unselect(pev);\n }\n }\n if (calendarState.eventSelection && // an existing event selected?\n !elementClosest(documentPointer.downEl, EventDragging.SELECTOR) // interaction DIDN'T start on an event\n ) {\n context.dispatch({ type: 'UNSELECT_EVENT' });\n }\n }\n _this.isRecentPointerDateSelect = false;\n };\n var documentPointer = this.documentPointer = new PointerDragging(document);\n documentPointer.shouldIgnoreMove = true;\n documentPointer.shouldWatchScroll = false;\n documentPointer.emitter.on('pointerup', this.onDocumentPointerUp);\n /*\n TODO: better way to know about whether there was a selection with the pointer\n */\n context.emitter.on('select', this.onSelect);\n }\n UnselectAuto.prototype.destroy = function () {\n this.context.emitter.off('select', this.onSelect);\n this.documentPointer.destroy();\n };\n return UnselectAuto;\n}());\n\nvar LISTENER_REFINERS = {\n dateClick: identity,\n eventDragStart: identity,\n eventDragStop: identity,\n eventDrop: identity,\n eventResizeStart: identity,\n eventResizeStop: identity,\n eventResize: identity,\n drop: identity,\n eventReceive: identity,\n eventLeave: identity\n};\n\n/*\nGiven an already instantiated draggable object for one-or-more elements,\nInterprets any dragging as an attempt to drag an events that lives outside\nof a calendar onto a calendar.\n*/\nvar ExternalElementDragging = /** @class */ (function () {\n function ExternalElementDragging(dragging, suppliedDragMeta) {\n var _this = this;\n this.receivingContext = null;\n this.droppableEvent = null; // will exist for all drags, even if create:false\n this.suppliedDragMeta = null;\n this.dragMeta = null;\n this.handleDragStart = function (ev) {\n _this.dragMeta = _this.buildDragMeta(ev.subjectEl);\n };\n this.handleHitUpdate = function (hit, isFinal, ev) {\n var dragging = _this.hitDragging.dragging;\n var receivingContext = null;\n var droppableEvent = null;\n var isInvalid = false;\n var interaction = {\n affectedEvents: createEmptyEventStore(),\n mutatedEvents: createEmptyEventStore(),\n isEvent: _this.dragMeta.create\n };\n if (hit) {\n receivingContext = hit.component.context;\n if (_this.canDropElOnCalendar(ev.subjectEl, receivingContext)) {\n droppableEvent = computeEventForDateSpan(hit.dateSpan, _this.dragMeta, receivingContext);\n interaction.mutatedEvents = eventTupleToStore(droppableEvent);\n isInvalid = !isInteractionValid(interaction, receivingContext);\n if (isInvalid) {\n interaction.mutatedEvents = createEmptyEventStore();\n droppableEvent = null;\n }\n }\n }\n _this.displayDrag(receivingContext, interaction);\n // show mirror if no already-rendered mirror element OR if we are shutting down the mirror (?)\n // TODO: wish we could somehow wait for dispatch to guarantee render\n dragging.setMirrorIsVisible(isFinal || !droppableEvent || !document.querySelector('.fc-event-mirror'));\n if (!isInvalid) {\n enableCursor();\n }\n else {\n disableCursor();\n }\n if (!isFinal) {\n dragging.setMirrorNeedsRevert(!droppableEvent);\n _this.receivingContext = receivingContext;\n _this.droppableEvent = droppableEvent;\n }\n };\n this.handleDragEnd = function (pev) {\n var _a = _this, receivingContext = _a.receivingContext, droppableEvent = _a.droppableEvent;\n _this.clearDrag();\n if (receivingContext && droppableEvent) {\n var finalHit = _this.hitDragging.finalHit;\n var finalView = finalHit.component.context.viewApi;\n var dragMeta = _this.dragMeta;\n receivingContext.emitter.trigger('drop', __assign(__assign({}, buildDatePointApiWithContext(finalHit.dateSpan, receivingContext)), { draggedEl: pev.subjectEl, jsEvent: pev.origEvent, view: finalView }));\n if (dragMeta.create) {\n receivingContext.dispatch({\n type: 'MERGE_EVENTS',\n eventStore: eventTupleToStore(droppableEvent)\n });\n if (pev.isTouch) {\n receivingContext.dispatch({\n type: 'SELECT_EVENT',\n eventInstanceId: droppableEvent.instance.instanceId\n });\n }\n // signal that an external event landed\n receivingContext.emitter.trigger('eventReceive', {\n draggedEl: pev.subjectEl,\n event: new EventApi(receivingContext, droppableEvent.def, droppableEvent.instance),\n view: finalView\n });\n }\n }\n _this.receivingContext = null;\n _this.droppableEvent = null;\n };\n var hitDragging = this.hitDragging = new HitDragging(dragging, interactionSettingsStore);\n hitDragging.requireInitial = false; // will start outside of a component\n hitDragging.emitter.on('dragstart', this.handleDragStart);\n hitDragging.emitter.on('hitupdate', this.handleHitUpdate);\n hitDragging.emitter.on('dragend', this.handleDragEnd);\n this.suppliedDragMeta = suppliedDragMeta;\n }\n ExternalElementDragging.prototype.buildDragMeta = function (subjectEl) {\n if (typeof this.suppliedDragMeta === 'object') {\n return parseDragMeta(this.suppliedDragMeta);\n }\n else if (typeof this.suppliedDragMeta === 'function') {\n return parseDragMeta(this.suppliedDragMeta(subjectEl));\n }\n else {\n return getDragMetaFromEl(subjectEl);\n }\n };\n ExternalElementDragging.prototype.displayDrag = function (nextContext, state) {\n var prevContext = this.receivingContext;\n if (prevContext && prevContext !== nextContext) {\n prevContext.dispatch({ type: 'UNSET_EVENT_DRAG' });\n }\n if (nextContext) {\n nextContext.dispatch({ type: 'SET_EVENT_DRAG', state: state });\n }\n };\n ExternalElementDragging.prototype.clearDrag = function () {\n if (this.receivingContext) {\n this.receivingContext.dispatch({ type: 'UNSET_EVENT_DRAG' });\n }\n };\n ExternalElementDragging.prototype.canDropElOnCalendar = function (el, receivingContext) {\n var dropAccept = receivingContext.options.dropAccept;\n if (typeof dropAccept === 'function') {\n return dropAccept.call(receivingContext.calendarApi, el);\n }\n else if (typeof dropAccept === 'string' && dropAccept) {\n return Boolean(elementMatches(el, dropAccept));\n }\n return true;\n };\n return ExternalElementDragging;\n}());\n// Utils for computing event store from the DragMeta\n// ----------------------------------------------------------------------------------------------------\nfunction computeEventForDateSpan(dateSpan, dragMeta, context) {\n var defProps = __assign({}, dragMeta.leftoverProps);\n for (var _i = 0, _a = context.pluginHooks.externalDefTransforms; _i < _a.length; _i++) {\n var transform = _a[_i];\n __assign(defProps, transform(dateSpan, dragMeta));\n }\n var _b = refineEventDef(defProps, context), refined = _b.refined, extra = _b.extra;\n var def = parseEventDef(refined, extra, dragMeta.sourceId, dateSpan.allDay, context.options.forceEventDuration || Boolean(dragMeta.duration), // hasEnd\n context);\n var start = dateSpan.range.start;\n // only rely on time info if drop zone is all-day,\n // otherwise, we already know the time\n if (dateSpan.allDay && dragMeta.startTime) {\n start = context.dateEnv.add(start, dragMeta.startTime);\n }\n var end = dragMeta.duration ?\n context.dateEnv.add(start, dragMeta.duration) :\n getDefaultEventEnd(dateSpan.allDay, start, context);\n var instance = createEventInstance(def.defId, { start: start, end: end });\n return { def: def, instance: instance };\n}\n// Utils for extracting data from element\n// ----------------------------------------------------------------------------------------------------\nfunction getDragMetaFromEl(el) {\n var str = getEmbeddedElData(el, 'event');\n var obj = str ?\n JSON.parse(str) :\n { create: false }; // if no embedded data, assume no event creation\n return parseDragMeta(obj);\n}\nconfig.dataAttrPrefix = '';\nfunction getEmbeddedElData(el, name) {\n var prefix = config.dataAttrPrefix;\n var prefixedName = (prefix ? prefix + '-' : '') + name;\n return el.getAttribute('data-' + prefixedName) || '';\n}\n\n/*\nMakes an element (that is *external* to any calendar) draggable.\nCan pass in data that determines how an event will be created when dropped onto a calendar.\nLeverages FullCalendar's internal drag-n-drop functionality WITHOUT a third-party drag system.\n*/\nvar ExternalDraggable = /** @class */ (function () {\n function ExternalDraggable(el, settings) {\n var _this = this;\n if (settings === void 0) { settings = {}; }\n this.handlePointerDown = function (ev) {\n var dragging = _this.dragging;\n var _a = _this.settings, minDistance = _a.minDistance, longPressDelay = _a.longPressDelay;\n dragging.minDistance =\n minDistance != null ?\n minDistance :\n (ev.isTouch ? 0 : BASE_OPTION_DEFAULTS.eventDragMinDistance);\n dragging.delay =\n ev.isTouch ? // TODO: eventually read eventLongPressDelay instead vvv\n (longPressDelay != null ? longPressDelay : BASE_OPTION_DEFAULTS.longPressDelay) :\n 0;\n };\n this.handleDragStart = function (ev) {\n if (ev.isTouch &&\n _this.dragging.delay &&\n ev.subjectEl.classList.contains('fc-event')) {\n _this.dragging.mirror.getMirrorEl().classList.add('fc-event-selected');\n }\n };\n this.settings = settings;\n var dragging = this.dragging = new FeaturefulElementDragging(el);\n dragging.touchScrollAllowed = false;\n if (settings.itemSelector != null) {\n dragging.pointer.selector = settings.itemSelector;\n }\n if (settings.appendTo != null) {\n dragging.mirror.parentNode = settings.appendTo; // TODO: write tests\n }\n dragging.emitter.on('pointerdown', this.handlePointerDown);\n dragging.emitter.on('dragstart', this.handleDragStart);\n new ExternalElementDragging(dragging, settings.eventData);\n }\n ExternalDraggable.prototype.destroy = function () {\n this.dragging.destroy();\n };\n return ExternalDraggable;\n}());\n\n/*\nDetects when a *THIRD-PARTY* drag-n-drop system interacts with elements.\nThe third-party system is responsible for drawing the visuals effects of the drag.\nThis class simply monitors for pointer movements and fires events.\nIt also has the ability to hide the moving element (the \"mirror\") during the drag.\n*/\nvar InferredElementDragging = /** @class */ (function (_super) {\n __extends(InferredElementDragging, _super);\n function InferredElementDragging(containerEl) {\n var _this = _super.call(this, containerEl) || this;\n _this.shouldIgnoreMove = false;\n _this.mirrorSelector = '';\n _this.currentMirrorEl = null;\n _this.handlePointerDown = function (ev) {\n _this.emitter.trigger('pointerdown', ev);\n if (!_this.shouldIgnoreMove) {\n // fire dragstart right away. does not support delay or min-distance\n _this.emitter.trigger('dragstart', ev);\n }\n };\n _this.handlePointerMove = function (ev) {\n if (!_this.shouldIgnoreMove) {\n _this.emitter.trigger('dragmove', ev);\n }\n };\n _this.handlePointerUp = function (ev) {\n _this.emitter.trigger('pointerup', ev);\n if (!_this.shouldIgnoreMove) {\n // fire dragend right away. does not support a revert animation\n _this.emitter.trigger('dragend', ev);\n }\n };\n var pointer = _this.pointer = new PointerDragging(containerEl);\n pointer.emitter.on('pointerdown', _this.handlePointerDown);\n pointer.emitter.on('pointermove', _this.handlePointerMove);\n pointer.emitter.on('pointerup', _this.handlePointerUp);\n return _this;\n }\n InferredElementDragging.prototype.destroy = function () {\n this.pointer.destroy();\n };\n InferredElementDragging.prototype.setIgnoreMove = function (bool) {\n this.shouldIgnoreMove = bool;\n };\n InferredElementDragging.prototype.setMirrorIsVisible = function (bool) {\n if (bool) {\n // restore a previously hidden element.\n // use the reference in case the selector class has already been removed.\n if (this.currentMirrorEl) {\n this.currentMirrorEl.style.visibility = '';\n this.currentMirrorEl = null;\n }\n }\n else {\n var mirrorEl = this.mirrorSelector ?\n document.querySelector(this.mirrorSelector) :\n null;\n if (mirrorEl) {\n this.currentMirrorEl = mirrorEl;\n mirrorEl.style.visibility = 'hidden';\n }\n }\n };\n return InferredElementDragging;\n}(ElementDragging));\n\n/*\nBridges third-party drag-n-drop systems with FullCalendar.\nMust be instantiated and destroyed by caller.\n*/\nvar ThirdPartyDraggable = /** @class */ (function () {\n function ThirdPartyDraggable(containerOrSettings, settings) {\n var containerEl = document;\n if (\n // wish we could just test instanceof EventTarget, but doesn't work in IE11\n containerOrSettings === document ||\n containerOrSettings instanceof Element) {\n containerEl = containerOrSettings;\n settings = settings || {};\n }\n else {\n settings = (containerOrSettings || {});\n }\n var dragging = this.dragging = new InferredElementDragging(containerEl);\n if (typeof settings.itemSelector === 'string') {\n dragging.pointer.selector = settings.itemSelector;\n }\n else if (containerEl === document) {\n dragging.pointer.selector = '[data-event]';\n }\n if (typeof settings.mirrorSelector === 'string') {\n dragging.mirrorSelector = settings.mirrorSelector;\n }\n new ExternalElementDragging(dragging, settings.eventData);\n }\n ThirdPartyDraggable.prototype.destroy = function () {\n this.dragging.destroy();\n };\n return ThirdPartyDraggable;\n}());\n\nvar main = createPlugin({\n componentInteractions: [DateClicking, DateSelecting, EventDragging, EventResizing],\n calendarInteractions: [UnselectAuto],\n elementDraggingImpl: FeaturefulElementDragging,\n listenerRefiners: LISTENER_REFINERS\n});\n\nexport default main;\nexport { ExternalDraggable as Draggable, FeaturefulElementDragging, PointerDragging, ThirdPartyDraggable };\n//# sourceMappingURL=main.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/*!\nFullCalendar v5.1.0\nDocs & License: https://fullcalendar.io/\n(c) 2020 Adam Shaw\n*/\nimport './main.css';\n\nimport { getDateMeta, buildNavLinkData, getDayClassNames, createElement, RenderHook, formatDayString, BaseComponent, Fragment, createFormatter, EventRoot, isMultiDayRange, buildSegTimeText, memoize, ViewRoot, Scroller, NowTimer, sortEventSegs, getSegMeta, sliceEventStore, intersectRanges, DateComponent, startOfDay, addDays, identity, createPlugin } from '@fullcalendar/common';\nimport { __extends, __assign } from 'tslib';\n\nvar ListViewHeaderRow = /** @class */ (function (_super) {\n __extends(ListViewHeaderRow, _super);\n function ListViewHeaderRow() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ListViewHeaderRow.prototype.render = function () {\n var _a = this.props, dayDate = _a.dayDate, todayRange = _a.todayRange;\n var _b = this.context, theme = _b.theme, dateEnv = _b.dateEnv, options = _b.options, viewApi = _b.viewApi;\n var dayMeta = getDateMeta(dayDate, todayRange);\n var text = options.listDayFormat ? dateEnv.format(dayDate, options.listDayFormat) : ''; // will ever be falsy?\n var sideText = options.listDaySideFormat ? dateEnv.format(dayDate, options.listDaySideFormat) : ''; // will ever be falsy? also, BAD NAME \"alt\"\n var navLinkData = options.navLinks\n ? buildNavLinkData(dayDate)\n : null;\n var hookProps = __assign({ date: dateEnv.toDate(dayDate), view: viewApi, text: text,\n sideText: sideText,\n navLinkData: navLinkData }, dayMeta);\n var classNames = ['fc-list-day'].concat(getDayClassNames(dayMeta, theme));\n // TODO: make a reusable HOC for dayHeader (used in daygrid/timegrid too)\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInnerContent, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function (rootElRef, customClassNames, innerElRef, innerContent) { return (createElement(\"tr\", { ref: rootElRef, className: classNames.concat(customClassNames).join(' '), \"data-date\": formatDayString(dayDate) },\n createElement(\"th\", { colSpan: 3 },\n createElement(\"div\", { className: 'fc-list-day-cushion ' + theme.getClass('tableCellShaded'), ref: innerElRef }, innerContent)))); }));\n };\n return ListViewHeaderRow;\n}(BaseComponent));\nfunction renderInnerContent(props) {\n var navLinkAttrs = props.navLinkData // is there a type for this?\n ? { 'data-navlink': props.navLinkData, tabIndex: 0 }\n : {};\n return (createElement(Fragment, null,\n props.text &&\n createElement(\"a\", __assign({ className: 'fc-list-day-text' }, navLinkAttrs), props.text),\n props.sideText &&\n createElement(\"a\", __assign({ className: 'fc-list-day-side-text' }, navLinkAttrs), props.sideText)));\n}\n\nvar DEFAULT_TIME_FORMAT = createFormatter({\n hour: 'numeric',\n minute: '2-digit',\n meridiem: 'short'\n});\nvar ListViewEventRow = /** @class */ (function (_super) {\n __extends(ListViewEventRow, _super);\n function ListViewEventRow() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ListViewEventRow.prototype.render = function () {\n var _a = this, props = _a.props, context = _a.context;\n var seg = props.seg;\n var timeFormat = context.options.eventTimeFormat || DEFAULT_TIME_FORMAT;\n return (createElement(EventRoot, { seg: seg, timeText: '' /* BAD. because of all-day content */, disableDragging: true, disableResizing: true, defaultContent: renderEventInnerContent, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday, isSelected: props.isSelected, isDragging: props.isDragging, isResizing: props.isResizing, isDateSelecting: props.isDateSelecting }, function (rootElRef, classNames, innerElRef, innerContent, hookProps) { return (createElement(\"tr\", { className: ['fc-list-event', hookProps.event.url ? 'fc-event-forced-url' : ''].concat(classNames).join(' '), ref: rootElRef },\n buildTimeContent(seg, timeFormat, context),\n createElement(\"td\", { className: 'fc-list-event-graphic' },\n createElement(\"span\", { className: 'fc-list-event-dot', style: { borderColor: hookProps.borderColor || hookProps.backgroundColor } })),\n createElement(\"td\", { className: 'fc-list-event-title', ref: innerElRef }, innerContent))); }));\n };\n return ListViewEventRow;\n}(BaseComponent));\nfunction renderEventInnerContent(props) {\n var event = props.event;\n var url = event.url;\n var anchorAttrs = url ? { href: url } : {};\n return (createElement(\"a\", __assign({}, anchorAttrs), event.title));\n}\nfunction buildTimeContent(seg, timeFormat, context) {\n var options = context.options;\n if (options.displayEventTime !== false) {\n var eventDef = seg.eventRange.def;\n var eventInstance = seg.eventRange.instance;\n var doAllDay = false;\n var timeText = void 0;\n if (eventDef.allDay) {\n doAllDay = true;\n }\n else if (isMultiDayRange(seg.eventRange.range)) { // TODO: use (!isStart || !isEnd) instead?\n if (seg.isStart) {\n timeText = buildSegTimeText(seg, timeFormat, context, null, null, eventInstance.range.start, seg.end);\n }\n else if (seg.isEnd) {\n timeText = buildSegTimeText(seg, timeFormat, context, null, null, seg.start, eventInstance.range.end);\n }\n else {\n doAllDay = true;\n }\n }\n else {\n timeText = buildSegTimeText(seg, timeFormat, context);\n }\n if (doAllDay) {\n var hookProps = {\n text: context.options.allDayText,\n view: context.viewApi\n };\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.allDayClassNames, content: options.allDayContent, defaultContent: renderAllDayInner, didMount: options.allDayDidMount, willUnmount: options.allDayWillUnmount }, function (rootElRef, classNames, innerElRef, innerContent) { return (createElement(\"td\", { className: ['fc-list-event-time'].concat(classNames).join(' '), ref: rootElRef }, innerContent)); }));\n }\n else {\n return (createElement(\"td\", { className: 'fc-list-event-time' }, timeText));\n }\n }\n return null;\n}\nfunction renderAllDayInner(hookProps) {\n return hookProps.text;\n}\n\n/*\nResponsible for the scroller, and forwarding event-related actions into the \"grid\".\n*/\nvar ListView = /** @class */ (function (_super) {\n __extends(ListView, _super);\n function ListView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.computeDateVars = memoize(computeDateVars);\n _this.eventStoreToSegs = memoize(_this._eventStoreToSegs);\n _this.setRootEl = function (rootEl) {\n if (rootEl) {\n _this.context.registerInteractiveComponent(_this, {\n el: rootEl\n });\n }\n else {\n _this.context.unregisterInteractiveComponent(_this);\n }\n };\n return _this;\n }\n ListView.prototype.render = function () {\n var _this = this;\n var _a = this, props = _a.props, context = _a.context;\n var extraClassNames = [\n 'fc-list',\n context.theme.getClass('table'),\n context.options.stickyHeaderDates !== false ? 'fc-list-sticky' : ''\n ];\n var _b = this.computeDateVars(props.dateProfile), dayDates = _b.dayDates, dayRanges = _b.dayRanges;\n var eventSegs = this.eventStoreToSegs(props.eventStore, props.eventUiBases, dayRanges);\n return (createElement(ViewRoot, { viewSpec: context.viewSpec, elRef: this.setRootEl }, function (rootElRef, classNames) { return (createElement(\"div\", { ref: rootElRef, className: extraClassNames.concat(classNames).join(' ') },\n createElement(Scroller, { liquid: !props.isHeightAuto, overflowX: props.isHeightAuto ? 'visible' : 'hidden', overflowY: props.isHeightAuto ? 'visible' : 'auto' }, eventSegs.length > 0 ?\n _this.renderSegList(eventSegs, dayDates) :\n _this.renderEmptyMessage()))); }));\n };\n ListView.prototype.renderEmptyMessage = function () {\n var _a = this.context, options = _a.options, viewApi = _a.viewApi;\n var hookProps = {\n text: options.noEventsText,\n view: viewApi\n };\n return (createElement(RenderHook, { hookProps: hookProps, classNames: options.noEventsClassNames, content: options.noEventsContent, defaultContent: renderNoEventsInner, didMount: options.noEventsDidMount, willUnmount: options.noEventsWillUnmount }, function (rootElRef, classNames, innerElRef, innerContent) { return (createElement(\"div\", { className: ['fc-list-empty'].concat(classNames).join(' '), ref: rootElRef },\n createElement(\"div\", { className: 'fc-list-empty-cushion', ref: innerElRef }, innerContent))); }));\n };\n ListView.prototype.renderSegList = function (allSegs, dayDates) {\n var _a = this.context, theme = _a.theme, options = _a.options;\n var segsByDay = groupSegsByDay(allSegs); // sparse array\n return (createElement(NowTimer, { unit: 'day' }, function (nowDate, todayRange) {\n var innerNodes = [];\n for (var dayIndex = 0; dayIndex < segsByDay.length; dayIndex++) {\n var daySegs = segsByDay[dayIndex];\n if (daySegs) { // sparse array, so might be undefined\n var dayStr = dayDates[dayIndex].toISOString();\n // append a day header\n innerNodes.push(createElement(ListViewHeaderRow, { key: dayStr, dayDate: dayDates[dayIndex], todayRange: todayRange }));\n daySegs = sortEventSegs(daySegs, options.eventOrder);\n for (var _i = 0, daySegs_1 = daySegs; _i < daySegs_1.length; _i++) {\n var seg = daySegs_1[_i];\n innerNodes.push(createElement(ListViewEventRow, __assign({ key: dayStr + ':' + seg.eventRange.instance.instanceId /* are multiple segs for an instanceId */, seg: seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false }, getSegMeta(seg, todayRange, nowDate))));\n }\n }\n }\n return (createElement(\"table\", { className: 'fc-list-table ' + theme.getClass('table') },\n createElement(\"tbody\", null, innerNodes)));\n }));\n };\n ListView.prototype._eventStoreToSegs = function (eventStore, eventUiBases, dayRanges) {\n return this.eventRangesToSegs(sliceEventStore(eventStore, eventUiBases, this.props.dateProfile.activeRange, this.context.options.nextDayThreshold).fg, dayRanges);\n };\n ListView.prototype.eventRangesToSegs = function (eventRanges, dayRanges) {\n var segs = [];\n for (var _i = 0, eventRanges_1 = eventRanges; _i < eventRanges_1.length; _i++) {\n var eventRange = eventRanges_1[_i];\n segs.push.apply(segs, this.eventRangeToSegs(eventRange, dayRanges));\n }\n return segs;\n };\n ListView.prototype.eventRangeToSegs = function (eventRange, dayRanges) {\n var dateEnv = this.context.dateEnv;\n var nextDayThreshold = this.context.options.nextDayThreshold;\n var range = eventRange.range;\n var allDay = eventRange.def.allDay;\n var dayIndex;\n var segRange;\n var seg;\n var segs = [];\n for (dayIndex = 0; dayIndex < dayRanges.length; dayIndex++) {\n segRange = intersectRanges(range, dayRanges[dayIndex]);\n if (segRange) {\n seg = {\n component: this,\n eventRange: eventRange,\n start: segRange.start,\n end: segRange.end,\n isStart: eventRange.isStart && segRange.start.valueOf() === range.start.valueOf(),\n isEnd: eventRange.isEnd && segRange.end.valueOf() === range.end.valueOf(),\n dayIndex: dayIndex\n };\n segs.push(seg);\n // detect when range won't go fully into the next day,\n // and mutate the latest seg to the be the end.\n if (!seg.isEnd && !allDay &&\n dayIndex + 1 < dayRanges.length &&\n range.end <\n dateEnv.add(dayRanges[dayIndex + 1].start, nextDayThreshold)) {\n seg.end = range.end;\n seg.isEnd = true;\n break;\n }\n }\n }\n return segs;\n };\n return ListView;\n}(DateComponent));\nfunction renderNoEventsInner(hookProps) {\n return hookProps.text;\n}\nfunction computeDateVars(dateProfile) {\n var dayStart = startOfDay(dateProfile.renderRange.start);\n var viewEnd = dateProfile.renderRange.end;\n var dayDates = [];\n var dayRanges = [];\n while (dayStart < viewEnd) {\n dayDates.push(dayStart);\n dayRanges.push({\n start: dayStart,\n end: addDays(dayStart, 1)\n });\n dayStart = addDays(dayStart, 1);\n }\n return { dayDates: dayDates, dayRanges: dayRanges };\n}\n// Returns a sparse array of arrays, segs grouped by their dayIndex\nfunction groupSegsByDay(segs) {\n var segsByDay = []; // sparse array\n var i;\n var seg;\n for (i = 0; i < segs.length; i++) {\n seg = segs[i];\n (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))\n .push(seg);\n }\n return segsByDay;\n}\n\nvar OPTION_REFINERS = {\n listDayFormat: createFalsableFormatter,\n listDaySideFormat: createFalsableFormatter,\n noEventsClassNames: identity,\n noEventsContent: identity,\n noEventsDidMount: identity,\n noEventsWillUnmount: identity\n // noEventsText is defined in base options\n};\nfunction createFalsableFormatter(input) {\n return input === false ? null : createFormatter(input);\n}\n\nvar main = createPlugin({\n optionRefiners: OPTION_REFINERS,\n views: {\n list: {\n component: ListView,\n buttonTextKey: 'list',\n listDayFormat: { month: 'long', day: 'numeric', year: 'numeric' } // like \"January 1, 2016\"\n },\n listDay: {\n type: 'list',\n duration: { days: 1 },\n listDayFormat: { weekday: 'long' } // day-of-week is all we need. full date is probably in headerToolbar\n },\n listWeek: {\n type: 'list',\n duration: { weeks: 1 },\n listDayFormat: { weekday: 'long' },\n listDaySideFormat: { month: 'long', day: 'numeric', year: 'numeric' }\n },\n listMonth: {\n type: 'list',\n duration: { month: 1 },\n listDaySideFormat: { weekday: 'long' } // day-of-week is nice-to-have\n },\n listYear: {\n type: 'list',\n duration: { year: 1 },\n listDaySideFormat: { weekday: 'long' } // day-of-week is nice-to-have\n }\n }\n});\n\nexport default main;\nexport { ListView };\n//# sourceMappingURL=main.js.map\n","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\nimport flatpickr from 'flatpickr';\nimport Stream from 'flarum/utils/Stream';\nrequire(\"flatpickr/dist/flatpickr.css\");\n\nconst name = Stream('');\nconst user = Stream('');\nconst description = Stream('');\nconst event_start = Stream();\nconst event_end = Stream();\n\n/**\n * THis builds event details based on a FullCalendar concept of object. CalendarPage talks to api, sends us FC payload\n */\nexport default class EditEventModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n if (this.attrs.event) {\n const event = this.attrs.event;\n name(event.name());\n description(event.description());\n user(event.user())\n event_start(event.event_start());\n event_end(event.event_end() ? event.event_end() : event.event_start());\n }\n }\n\n /**\n * Builder to create new modal *with empty event* but pre-populated date field.\n * @param startDate\n * @returns {EditEventModal}\n *//*\n withStart(startDate)\n {\n event_start(startDate);\n return this;\n }*/\n\n title() {\n return name() ? \"Edit event details\" : \"Create new calendar event\";\n }\n\n className() {\n return 'EditEventsModal Modal--small';\n }\n\n content() {\n return [\n
\n
\n \n \n
\n
\n \n
\n \n
\n
\n
\n \n