@fullcalendar/core 7.0.0-beta.0 → 7.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/index.cjs +25 -42
  2. package/index.d.ts +0 -1
  3. package/index.global.js +1509 -1352
  4. package/index.global.min.js +2 -2
  5. package/index.js +26 -43
  6. package/internal-common.cjs +4139 -3965
  7. package/internal-common.d.ts +188 -165
  8. package/internal-common.js +4123 -3944
  9. package/internal.cjs +14 -20
  10. package/internal.d.ts +1 -2
  11. package/internal.js +1 -1
  12. package/locales/af.global.js +1 -1
  13. package/locales/af.global.min.js +1 -1
  14. package/locales/ar-dz.global.js +1 -1
  15. package/locales/ar-dz.global.min.js +1 -1
  16. package/locales/ar-kw.global.js +1 -1
  17. package/locales/ar-kw.global.min.js +1 -1
  18. package/locales/ar-ly.global.js +1 -1
  19. package/locales/ar-ly.global.min.js +1 -1
  20. package/locales/ar-ma.global.js +1 -1
  21. package/locales/ar-ma.global.min.js +1 -1
  22. package/locales/ar-sa.global.js +1 -1
  23. package/locales/ar-sa.global.min.js +1 -1
  24. package/locales/ar-tn.global.js +1 -1
  25. package/locales/ar-tn.global.min.js +1 -1
  26. package/locales/ar.global.js +1 -1
  27. package/locales/ar.global.min.js +1 -1
  28. package/locales/az.global.js +1 -1
  29. package/locales/az.global.min.js +1 -1
  30. package/locales/bg.global.js +1 -1
  31. package/locales/bg.global.min.js +1 -1
  32. package/locales/bn.global.js +1 -1
  33. package/locales/bn.global.min.js +1 -1
  34. package/locales/bs.global.js +1 -1
  35. package/locales/bs.global.min.js +1 -1
  36. package/locales/ca.global.js +1 -1
  37. package/locales/ca.global.min.js +1 -1
  38. package/locales/cs.global.js +1 -1
  39. package/locales/cs.global.min.js +1 -1
  40. package/locales/cy.global.js +1 -1
  41. package/locales/cy.global.min.js +1 -1
  42. package/locales/da.global.js +1 -1
  43. package/locales/da.global.min.js +1 -1
  44. package/locales/de-at.global.js +1 -1
  45. package/locales/de-at.global.min.js +1 -1
  46. package/locales/de.global.js +1 -1
  47. package/locales/de.global.min.js +1 -1
  48. package/locales/el.global.js +1 -1
  49. package/locales/el.global.min.js +1 -1
  50. package/locales/en-au.global.js +1 -1
  51. package/locales/en-au.global.min.js +1 -1
  52. package/locales/en-gb.global.js +1 -1
  53. package/locales/en-gb.global.min.js +1 -1
  54. package/locales/en-nz.global.js +1 -1
  55. package/locales/en-nz.global.min.js +1 -1
  56. package/locales/eo.global.js +1 -1
  57. package/locales/eo.global.min.js +1 -1
  58. package/locales/es-us.global.js +1 -1
  59. package/locales/es-us.global.min.js +1 -1
  60. package/locales/es.global.js +1 -1
  61. package/locales/es.global.min.js +1 -1
  62. package/locales/et.global.js +1 -1
  63. package/locales/et.global.min.js +1 -1
  64. package/locales/eu.global.js +1 -1
  65. package/locales/eu.global.min.js +1 -1
  66. package/locales/fa.global.js +1 -1
  67. package/locales/fa.global.min.js +1 -1
  68. package/locales/fi.global.js +1 -1
  69. package/locales/fi.global.min.js +1 -1
  70. package/locales/fr-ca.global.js +1 -1
  71. package/locales/fr-ca.global.min.js +1 -1
  72. package/locales/fr-ch.global.js +1 -1
  73. package/locales/fr-ch.global.min.js +1 -1
  74. package/locales/fr.global.js +1 -1
  75. package/locales/fr.global.min.js +1 -1
  76. package/locales/gl.global.js +1 -1
  77. package/locales/gl.global.min.js +1 -1
  78. package/locales/he.global.js +1 -1
  79. package/locales/he.global.min.js +1 -1
  80. package/locales/hi.global.js +1 -1
  81. package/locales/hi.global.min.js +1 -1
  82. package/locales/hr.global.js +1 -1
  83. package/locales/hr.global.min.js +1 -1
  84. package/locales/hu.global.js +1 -1
  85. package/locales/hu.global.min.js +1 -1
  86. package/locales/hy-am.global.js +1 -1
  87. package/locales/hy-am.global.min.js +1 -1
  88. package/locales/id.global.js +1 -1
  89. package/locales/id.global.min.js +1 -1
  90. package/locales/is.global.js +1 -1
  91. package/locales/is.global.min.js +1 -1
  92. package/locales/it.global.js +1 -1
  93. package/locales/it.global.min.js +1 -1
  94. package/locales/ja.global.js +1 -1
  95. package/locales/ja.global.min.js +1 -1
  96. package/locales/ka.global.js +1 -1
  97. package/locales/ka.global.min.js +1 -1
  98. package/locales/kk.global.js +1 -1
  99. package/locales/kk.global.min.js +1 -1
  100. package/locales/km.global.js +1 -1
  101. package/locales/km.global.min.js +1 -1
  102. package/locales/ko.global.js +1 -1
  103. package/locales/ko.global.min.js +1 -1
  104. package/locales/ku.global.js +1 -1
  105. package/locales/ku.global.min.js +1 -1
  106. package/locales/lb.global.js +1 -1
  107. package/locales/lb.global.min.js +1 -1
  108. package/locales/lt.global.js +1 -1
  109. package/locales/lt.global.min.js +1 -1
  110. package/locales/lv.global.js +1 -1
  111. package/locales/lv.global.min.js +1 -1
  112. package/locales/mk.global.js +1 -1
  113. package/locales/mk.global.min.js +1 -1
  114. package/locales/ms.global.js +1 -1
  115. package/locales/ms.global.min.js +1 -1
  116. package/locales/nb.global.js +1 -1
  117. package/locales/nb.global.min.js +1 -1
  118. package/locales/ne.global.js +1 -1
  119. package/locales/ne.global.min.js +1 -1
  120. package/locales/nl.global.js +1 -1
  121. package/locales/nl.global.min.js +1 -1
  122. package/locales/nn.global.js +1 -1
  123. package/locales/nn.global.min.js +1 -1
  124. package/locales/pl.global.js +1 -1
  125. package/locales/pl.global.min.js +1 -1
  126. package/locales/pt-br.global.js +1 -1
  127. package/locales/pt-br.global.min.js +1 -1
  128. package/locales/pt.global.js +1 -1
  129. package/locales/pt.global.min.js +1 -1
  130. package/locales/ro.global.js +1 -1
  131. package/locales/ro.global.min.js +1 -1
  132. package/locales/ru.global.js +1 -1
  133. package/locales/ru.global.min.js +1 -1
  134. package/locales/si-lk.global.js +1 -1
  135. package/locales/si-lk.global.min.js +1 -1
  136. package/locales/sk.global.js +1 -1
  137. package/locales/sk.global.min.js +1 -1
  138. package/locales/sl.global.js +1 -1
  139. package/locales/sl.global.min.js +1 -1
  140. package/locales/sm.global.js +1 -1
  141. package/locales/sm.global.min.js +1 -1
  142. package/locales/sq.global.js +1 -1
  143. package/locales/sq.global.min.js +1 -1
  144. package/locales/sr-cyrl.global.js +1 -1
  145. package/locales/sr-cyrl.global.min.js +1 -1
  146. package/locales/sr.global.js +1 -1
  147. package/locales/sr.global.min.js +1 -1
  148. package/locales/sv.global.js +1 -1
  149. package/locales/sv.global.min.js +1 -1
  150. package/locales/ta-in.global.js +1 -1
  151. package/locales/ta-in.global.min.js +1 -1
  152. package/locales/th.global.js +1 -1
  153. package/locales/th.global.min.js +1 -1
  154. package/locales/tr.global.js +1 -1
  155. package/locales/tr.global.min.js +1 -1
  156. package/locales/ug.global.js +1 -1
  157. package/locales/ug.global.min.js +1 -1
  158. package/locales/uk.global.js +1 -1
  159. package/locales/uk.global.min.js +1 -1
  160. package/locales/uz-cy.global.js +1 -1
  161. package/locales/uz-cy.global.min.js +1 -1
  162. package/locales/uz.global.js +1 -1
  163. package/locales/uz.global.min.js +1 -1
  164. package/locales/vi.global.js +1 -1
  165. package/locales/vi.global.min.js +1 -1
  166. package/locales/zh-cn.global.js +1 -1
  167. package/locales/zh-cn.global.min.js +1 -1
  168. package/locales/zh-tw.global.js +1 -1
  169. package/locales/zh-tw.global.min.js +1 -1
  170. package/locales-all.global.js +1 -1
  171. package/locales-all.global.min.js +1 -1
  172. package/package.json +1 -1
  173. package/preact.cjs +1 -0
  174. package/preact.d.ts +9 -2
  175. package/preact.js +1 -1
package/index.global.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- FullCalendar Core v7.0.0-beta.0
2
+ FullCalendar Core v7.0.0-beta.3
3
3
  Docs & License: https://fullcalendar.io
4
4
  (c) 2024 Adam Shaw
5
5
  */
@@ -86,102 +86,9 @@ var FullCalendar = (function (exports) {
86
86
  registerStylesRoot(document);
87
87
  }
88
88
 
89
- var css_248z = ":root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc{display:flex;flex-direction:column;gap:1.5em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-flex-row{display:flex;flex-direction:row}.fc-flex-column{display:flex;flex-direction:column}.fc-grow{flex-grow:1}.fc-basis0,.fc-liquid{flex-basis:0}.fc-liquid{flex-grow:1;min-height:0;min-width:0}.fc-row{display:flex;flex-direction:row}.fc-rowgroup{display:flex;flex-direction:column}.fc-row,.fc-rowdivider,.fc-rowgroup{border-color:var(--fc-border-color);border-style:solid;border-width:1px 0 0}.fc-row:first-child:not(.fc-not-first),.fc-rowdivider+.fc-row,.fc-rowdivider+.fc-rowgroup,.fc-rowdivider:first-child,.fc-rowgroup:first-child,.fc-sticky-header+.fc-row,.fc-sticky-header+.fc-rowgroup{border-top-width:0}.fc-cell,.fc-celldivider{border:0 solid var(--fc-border-color)}.fc-cell{margin:0!important;padding:0!important}.fc-cell-inner{overflow:hidden;white-space:nowrap}.fc-direction-ltr .fc-cell,.fc-direction-ltr .fc-celldivider{border-left-width:1px}.fc-direction-ltr .fc-cell:first-child:not(.fc-not-first),.fc-direction-ltr .fc-celldivider+.fc-cell{border-left-width:0}.fc-direction-ltr .fc-celldivider,.fc-direction-rtl .fc-cell,.fc-direction-rtl .fc-celldivider{border-right-width:1px}.fc-direction-rtl .fc-cell:first-child:not(.fc-not-first),.fc-direction-rtl .fc-celldivider+.fc-cell{border-right-width:0}.fc-direction-rtl .fc-celldivider{border-left-width:1px}.fc-cell:only-child{flex-basis:0;flex-grow:1;min-width:0}.fc-celldivider,.fc-rowdivider{background:var(--fc-neutral-bg-color)}.fc-celldivider{padding-left:2px}.fc-rowdivider{padding-bottom:2px}.fc-rowdivider,.fc-sticky-header{border-bottom-width:1px}.fc-rel{position:relative}.fc-abs{position:absolute}.fc-fill{bottom:0;top:0}.fc-fill,.fc-fill-x{left:0;position:absolute;right:0}.fc-fill-y{bottom:0;position:absolute;top:0}.fc-sticky-y{bottom:0;position:sticky;top:0}.fc-sticky-x{left:0;position:sticky;right:0}.fc-sticky-header{background:var(--fc-page-bg-color);position:sticky;top:0;z-index:9999}.fc-sticky-footer{bottom:0;position:sticky;z-index:9999}.fc-content-box{box-sizing:content-box}.fc-border{border:1px solid var(--fc-border-color)}.fc-offscreen{left:-10000px;position:absolute}.fc-shaded{background-color:var(--fc-neutral-bg-color)}.fc-padding-sm{padding:2px 4px}.fc-padding-md{padding:4px 5px}.fc-padding-lg{padding:8px}.fc-justify-center{justify-content:center}.fc-align-center{align-items:center}.fc-align-start{align-items:flex-start}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-view-harness{position:relative}.fc-view-harness-fixedheight,.fc-view-harness-liquid{display:flex;flex-direction:column}.fc-view-harness-fixedheight>.fc-view,.fc-view-harness-liquid,.fc-view-harness-liquid>.fc-view{flex-basis:0;flex-grow:1;min-height:0}.fc-view-harness-aspectratio>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:\"\";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-event-inner{position:relative;z-index:2}.fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:\"\";left:-20px;position:absolute;right:-20px;top:-20px}.fc-bg-event,.fc-highlight,.fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc-non-business{background:var(--fc-non-business-color)}.fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc-highlight{background:var(--fc-highlight-color)}.fc-day-disabled{background:var(--fc-neutral-bg-color)}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:flex;flex-direction:column;position:relative}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-h-event .fc-event-inner{color:var(--fc-event-text-color);display:flex;flex-direction:row;flex-grow:1;min-width:0}.fc-h-event .fc-event-time,.fc-h-event .fc-event-title{overflow:hidden;white-space:nowrap}.fc-h-event .fc-event-title-outer{display:flex;flex-basis:0;flex-direction:row;flex-grow:1;min-width:0}.fc-h-event .fc-event-title{left:0;position:sticky;right:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc-popover-title{margin:0 2px}.fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}.fc-scroller-nobars{-ms-overflow-style:none;scrollbar-width:none}.fc-scroller-nobars::-webkit-scrollbar{display:none}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}@font-face{font-family:fcicons;font-style:normal;font-weight:400;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\")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:\"\\e900\"}.fc-icon-chevron-right:before{content:\"\\e901\"}.fc-icon-chevrons-left:before{content:\"\\e902\"}.fc-icon-chevrons-right:before{content:\"\\e903\"}.fc-icon-minus-square:before{content:\"\\e904\"}.fc-icon-plus-square:before{content:\"\\e905\"}.fc-icon-x:before{content:\"\\e906\"}.fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc-button{-webkit-appearance:button}.fc-button:not(:disabled){cursor:pointer}.fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-moz-user-select:none;user-select:none;vertical-align:middle}.fc-button:hover{text-decoration:none}.fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc-button:disabled{opacity:.65}.fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc-button-primary:not(:disabled).fc-button-active,.fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc-button-primary:not(:disabled).fc-button-active:focus,.fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc-button-group>.fc-button.fc-button-active,.fc-button-group>.fc-button:active,.fc-button-group>.fc-button:focus,.fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc-toolbar{align-items:center;display:flex;flex-direction:row;gap:.75em;justify-content:space-between}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc-toolbar-chunk{display:flex;flex-direction:row;flex-shrink:0;gap:.75em}.fc-toolbar-title{font-size:1.75em;margin:0;white-space:nowrap}";
89
+ var css_248z = ":root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc{display:flex;flex-direction:column;gap:1.5em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-border,.fc-border-b,.fc-border-e,.fc-border-s,.fc-border-t{border:0 solid var(--fc-border-color)}.fc-border-transparent{border-color:transparent}.fc-border{border-width:1px}.fc-border-t{border-top-width:1px}.fc-border-b{border-bottom-width:1px}.fc-direction-ltr .fc-border-s,.fc-direction-rtl .fc-border-e{border-left-width:1px}.fc-direction-ltr .fc-border-e,.fc-direction-rtl .fc-border-s{border-right-width:1px}.fc-flex-row{display:flex;flex-direction:row}.fc-flex-col{display:flex;flex-direction:column}.fc-grow{flex-grow:1}.fc-basis0,.fc-liquid{flex-basis:0}.fc-liquid{flex-grow:1;min-height:0;min-width:0}.fc-media-screen .fc-print-header,.fc-media-screen .fc-print-root{display:flex;flex-direction:column}.fc-cell{margin:0!important;padding:0!important}.fc-cell-inner{flex-shrink:0;overflow:hidden;white-space:nowrap}.fc-celldivider,.fc-rowdivider{border:0 solid var(--fc-border-color)}.fc-rowdivider{border-width:1px 0}.fc-celldivider{border-width:0 1px}.fc-celldivider,.fc-rowdivider{background:var(--fc-neutral-bg-color)}.fc-celldivider{padding-left:2px}.fc-rowdivider{padding-bottom:2px}.fc-crop{overflow:hidden}.fc-rel{position:relative}.fc-abs{position:absolute}.fc-fill{bottom:0;top:0}.fc-fill,.fc-fill-x{left:0;position:absolute;right:0}.fc-fill-y{bottom:0;position:absolute;top:0}.fc-sticky-t{position:sticky;top:0}.fc-sticky-s{left:0;position:sticky;right:0}.fc-table-header-sticky{background:var(--fc-page-bg-color);position:sticky;top:0;z-index:5}.fc-sticky-footer-scrollbar{bottom:0;position:sticky;z-index:5}.fc-sticky-footer-scrollbar>.fc-scroller{margin-top:-1px}.fc-sticky-footer-scrollbar>.fc-scroller>*{height:1px}.fc-content-box{box-sizing:content-box}.fc-offscreen{left:-10000px;position:absolute}.fc-shaded{background-color:var(--fc-neutral-bg-color)}.fc-filler{opacity:.5}.fc-padding-sm{padding:2px 4px}.fc-padding-md{padding:4px 5px}.fc-padding-lg{padding:8px}.fc-justify-center{justify-content:center}.fc-align-center{align-items:center}.fc-align-start{align-items:flex-start}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-view-outer{position:relative}.fc-view-outer-liquid,.fc-view-outer-static{display:flex;flex-direction:column}.fc-view-outer-liquid,.fc-view-outer-liquid>.fc-view,.fc-view-outer-static>.fc-view{flex-basis:0;flex-grow:1;min-height:0;min-width:0}.fc-view-outer-aspect-ratio>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event-selected:before{bottom:0;content:\"\";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:\"\";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-event-inner{position:relative;z-index:2}.fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:\"\";left:-20px;position:absolute;right:-20px;top:-20px}.fc-bg-event,.fc-highlight,.fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc-non-business{background:var(--fc-non-business-color)}.fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc-highlight{background:var(--fc-highlight-color)}.fc-day-disabled{background:var(--fc-neutral-bg-color)}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:flex;flex-direction:column;position:relative}.fc-h-event.fc-event-mirror{z-index:3}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-h-event .fc-event-inner{color:var(--fc-event-text-color);display:flex;flex-direction:row}.fc-h-event .fc-event-time,.fc-h-event .fc-event-title{overflow:hidden;white-space:nowrap}.fc-h-event .fc-event-title-outer{display:flex;flex-basis:0;flex-direction:row;flex-grow:1;min-height:0;min-width:0}.fc-h-event .fc-event-title{left:0;position:sticky;right:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:6}.fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc-popover-title{margin:0 2px}.fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}.fc-scroller{padding:0!important}.fc-scroller-no-bars{-ms-overflow-style:none;scrollbar-width:none}.fc-scroller-no-bars::-webkit-scrollbar{display:none}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}@font-face{font-family:fcicons;font-style:normal;font-weight:400;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\")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:\"\\e900\"}.fc-icon-chevron-right:before{content:\"\\e901\"}.fc-icon-chevrons-left:before{content:\"\\e902\"}.fc-icon-chevrons-right:before{content:\"\\e903\"}.fc-icon-minus-square:before{content:\"\\e904\"}.fc-icon-plus-square:before{content:\"\\e905\"}.fc-icon-x:before{content:\"\\e906\"}.fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc-button{-webkit-appearance:button}.fc-button:not(:disabled){cursor:pointer}.fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-moz-user-select:none;user-select:none;vertical-align:middle}.fc-button:hover{text-decoration:none}.fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc-button:disabled{opacity:.65}.fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc-button-primary:not(:disabled).fc-button-active,.fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc-button-primary:not(:disabled).fc-button-active:focus,.fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc-button-group>.fc-button.fc-button-active,.fc-button-group>.fc-button:active,.fc-button-group>.fc-button:focus,.fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc-toolbar{align-items:center;display:flex;flex-direction:row;gap:.75em;justify-content:space-between}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc-toolbar-section{display:flex;flex-direction:row;flex-shrink:0;gap:.75em}.fc-toolbar-title{font-size:1.75em;margin:0;white-space:nowrap}";
90
90
  injectStyles(css_248z);
91
91
 
92
- function removeElement(el) {
93
- if (el.parentNode) {
94
- el.parentNode.removeChild(el);
95
- }
96
- }
97
- // Querying
98
- // ----------------------------------------------------------------------------------------------------------------
99
- function elementClosest(el, selector) {
100
- if (el.closest) {
101
- return el.closest(selector);
102
- // really bad fallback for IE
103
- // from https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
104
- }
105
- if (!document.documentElement.contains(el)) {
106
- return null;
107
- }
108
- do {
109
- if (elementMatches(el, selector)) {
110
- return el;
111
- }
112
- el = (el.parentElement || el.parentNode);
113
- } while (el !== null && el.nodeType === 1);
114
- return null;
115
- }
116
- function elementMatches(el, selector) {
117
- let method = el.matches || el.matchesSelector || el.msMatchesSelector;
118
- return method.call(el, selector);
119
- }
120
- // accepts multiple subject els
121
- // returns a real array. good for methods like forEach
122
- // TODO: accept the document
123
- function findElements(container, selector) {
124
- let containers = container instanceof HTMLElement ? [container] : container;
125
- let allMatches = [];
126
- for (let i = 0; i < containers.length; i += 1) {
127
- let matches = containers[i].querySelectorAll(selector);
128
- for (let j = 0; j < matches.length; j += 1) {
129
- allMatches.push(matches[j]);
130
- }
131
- }
132
- return allMatches;
133
- }
134
- // accepts multiple subject els
135
- // only queries direct child elements // TODO: rename to findDirectChildren!
136
- function findDirectChildren(parent, selector) {
137
- let parents = parent instanceof HTMLElement ? [parent] : parent;
138
- let allMatches = [];
139
- for (let i = 0; i < parents.length; i += 1) {
140
- let childNodes = parents[i].children; // only ever elements
141
- for (let j = 0; j < childNodes.length; j += 1) {
142
- let childNode = childNodes[j];
143
- if (!selector || elementMatches(childNode, selector)) {
144
- allMatches.push(childNode);
145
- }
146
- }
147
- }
148
- return allMatches;
149
- }
150
- // Style
151
- // ----------------------------------------------------------------------------------------------------------------
152
- const PIXEL_PROP_RE = /(top|left|right|bottom|width|height)$/i;
153
- function applyStyle(el, props) {
154
- for (let propName in props) {
155
- applyStyleProp(el, propName, props[propName]);
156
- }
157
- }
158
- function applyStyleProp(el, name, val) {
159
- if (val == null) {
160
- el.style[name] = '';
161
- }
162
- else if (typeof val === 'number' && PIXEL_PROP_RE.test(name)) {
163
- el.style[name] = `${val}px`;
164
- }
165
- else {
166
- el.style[name] = val;
167
- }
168
- }
169
- // Event Handling
170
- // ----------------------------------------------------------------------------------------------------------------
171
- // if intercepting bubbled events at the document/window/body level,
172
- // and want to see originating element (the 'target'), use this util instead
173
- // of `ev.target` because it goes within web-component boundaries.
174
- function getEventTargetViaRoot(ev) {
175
- var _a, _b;
176
- return (_b = (_a = ev.composedPath) === null || _a === void 0 ? void 0 : _a.call(ev)[0]) !== null && _b !== void 0 ? _b : ev.target;
177
- }
178
- // Unique ID for DOM attribute
179
- let guid$1 = 0;
180
- function getUniqueDomId() {
181
- guid$1 += 1;
182
- return 'fc-dom-' + guid$1;
183
- }
184
-
185
92
  // Stops a mouse/touch event from doing it's native browser action
186
93
  function preventDefault(ev) {
187
94
  ev.preventDefault();
@@ -190,7 +97,7 @@ var FullCalendar = (function (exports) {
190
97
  // ----------------------------------------------------------------------------------------------------------------
191
98
  function buildDelegationHandler(selector, handler) {
192
99
  return (ev) => {
193
- let matchedChild = elementClosest(ev.target, selector);
100
+ let matchedChild = ev.target.closest(selector);
194
101
  if (matchedChild) {
195
102
  handler.call(matchedChild, ev, matchedChild);
196
103
  }
@@ -258,7 +165,7 @@ var FullCalendar = (function (exports) {
258
165
  }
259
166
 
260
167
  let guidNumber = 0;
261
- function guid() {
168
+ function guid$1() {
262
169
  guidNumber += 1;
263
170
  return String(guidNumber);
264
171
  }
@@ -1449,6 +1356,7 @@ var FullCalendar = (function (exports) {
1449
1356
  dropAccept: identity,
1450
1357
  eventOrder: parseFieldSpecs,
1451
1358
  eventOrderStrict: Boolean,
1359
+ eventSlicing: Boolean,
1452
1360
  longPressDelay: Number,
1453
1361
  eventDragMinDistance: Number,
1454
1362
  expandRows: Boolean,
@@ -1705,7 +1613,7 @@ var FullCalendar = (function (exports) {
1705
1613
 
1706
1614
  function createEventInstance(defId, range, forcedStartTzo, forcedEndTzo) {
1707
1615
  return {
1708
- instanceId: guid(),
1616
+ instanceId: guid$1(),
1709
1617
  defId,
1710
1618
  range,
1711
1619
  forcedStartTzo: forcedStartTzo == null ? null : forcedStartTzo,
@@ -1868,6 +1776,9 @@ var FullCalendar = (function (exports) {
1868
1776
  return null;
1869
1777
  }
1870
1778
 
1779
+ function joinClassNames(...args) {
1780
+ return args.filter(Boolean).join(' ');
1781
+ }
1871
1782
  function parseClassNames(raw) {
1872
1783
  if (Array.isArray(raw)) {
1873
1784
  return raw;
@@ -2000,7 +1911,7 @@ var FullCalendar = (function (exports) {
2000
1911
  publicId: refined.id || '',
2001
1912
  url: refined.url || '',
2002
1913
  recurringDef: null,
2003
- defId: ((defIdMap && refined.id) ? defIdMap[refined.id] : '') || guid(),
1914
+ defId: ((defIdMap && refined.id) ? defIdMap[refined.id] : '') || guid$1(),
2004
1915
  sourceId,
2005
1916
  allDay,
2006
1917
  hasEnd,
@@ -2151,11 +2062,6 @@ var FullCalendar = (function (exports) {
2151
2062
  }
2152
2063
  return { start: startDay, end: endDay };
2153
2064
  }
2154
- // spans from one day into another?
2155
- function isMultiDayRange(range) {
2156
- let visibleRange = computeVisibleDayRange(range);
2157
- return diffDays(visibleRange.start, visibleRange.end) > 1;
2158
- }
2159
2065
  function diffDates(date0, date1, dateEnv, largeUnit) {
2160
2066
  if (largeUnit === 'year') {
2161
2067
  return createDuration(dateEnv.diffWholeYears(date0, date1), 'year');
@@ -2215,6 +2121,41 @@ var FullCalendar = (function (exports) {
2215
2121
  };
2216
2122
  }
2217
2123
 
2124
+ // Style
2125
+ // ----------------------------------------------------------------------------------------------------------------
2126
+ const PIXEL_PROP_RE = /(top|left|right|bottom|width|height)$/i;
2127
+ function applyStyle(el, props) {
2128
+ for (let propName in props) {
2129
+ applyStyleProp(el, propName, props[propName]);
2130
+ }
2131
+ }
2132
+ function applyStyleProp(el, name, val) {
2133
+ if (val == null) {
2134
+ el.style[name] = '';
2135
+ }
2136
+ else if (typeof val === 'number' && PIXEL_PROP_RE.test(name)) {
2137
+ el.style[name] = `${val}px`;
2138
+ }
2139
+ else {
2140
+ el.style[name] = val;
2141
+ }
2142
+ }
2143
+ // Event Handling
2144
+ // ----------------------------------------------------------------------------------------------------------------
2145
+ // if intercepting bubbled events at the document/window/body level,
2146
+ // and want to see originating element (the 'target'), use this util instead
2147
+ // of `ev.target` because it goes within web-component boundaries.
2148
+ function getEventTargetViaRoot(ev) {
2149
+ var _a, _b;
2150
+ return (_b = (_a = ev.composedPath) === null || _a === void 0 ? void 0 : _a.call(ev)[0]) !== null && _b !== void 0 ? _b : ev.target;
2151
+ }
2152
+ // Unique ID for DOM attribute
2153
+ let guid = 0;
2154
+ function getUniqueDomId() {
2155
+ guid += 1;
2156
+ return 'fc-dom-' + guid;
2157
+ }
2158
+
2218
2159
  const EMPTY_EVENT_STORE = createEmptyEventStore(); // for purecomponents. TODO: keep elsewhere
2219
2160
  class Splitter {
2220
2161
  constructor() {
@@ -2450,145 +2391,388 @@ var FullCalendar = (function (exports) {
2450
2391
  isFuture: Boolean(nowDate ? (date > nowDate) : todayRange ? (date >= todayRange.end) : false),
2451
2392
  };
2452
2393
  }
2453
- function getDayClassNames(meta, theme) {
2454
- let classNames = [
2455
- 'fc-day',
2456
- `fc-day-${DAY_IDS[meta.dow]}`,
2457
- ];
2458
- if (meta.isDisabled) {
2459
- classNames.push('fc-day-disabled');
2394
+ function getDayClassName(meta) {
2395
+ return joinClassNames('fc-day', `fc-day-${DAY_IDS[meta.dow]}`, meta.isDisabled
2396
+ ? 'fc-day-disabled'
2397
+ : joinClassNames(meta.isToday && 'fc-day-today', meta.isPast && 'fc-day-past', meta.isFuture && 'fc-day-future', meta.isOther && 'fc-day-other'));
2398
+ }
2399
+ function getSlotClassName(meta) {
2400
+ return joinClassNames('fc-slot', `fc-slot-${DAY_IDS[meta.dow]}`, meta.isDisabled
2401
+ ? 'fc-slot-disabled'
2402
+ : joinClassNames(meta.isToday && 'fc-slot-today', meta.isPast && 'fc-slot-past', meta.isFuture && 'fc-slot-future'));
2403
+ }
2404
+
2405
+ function isDimsEqual(v0, v1) {
2406
+ return v0 != null && (v0 === v1 || Math.abs(v0 - v1) < 0.01);
2407
+ }
2408
+
2409
+ var n,l$1,u$1,t,i$1,o,r$1,f$1,e$1,c$1,s$1,a$1,h={},p=[],v$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function w$1(n){var l=n.parentNode;l&&l.removeChild(n);}function _(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return g$1(l,f,i,o,null)}function g$1(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u$1:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function m$1(){return {current:null}}function k$1(n){return n.children}function b(n,l){this.props=n,this.context=l;}function x(n,l){if(null==l)return n.__?x(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?x(n):null}function C$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$1(n)}}function M$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!P$1.__r++||o!==l$1.debounceRendering)&&((o=l$1.debounceRendering)||r$1)(P$1);}function P$1(){var n,u,t,o,r,e,c,s;for(i$1.sort(f$1);n=i$1.shift();)n.__d&&(u=i$1.length,o=void 0,e=(r=(t=n).__v).__e,c=[],s=[],t.__P&&((o=d({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(o),O$1(t.__P,o,r,t.__n,t.__P.namespaceURI,32&r.__u?[e]:null,c,null==e?x(r):e,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,j$2(c,o,s),o.__e!=e&&C$1(o)),i$1.length>u&&i$1.sort(f$1));P$1.__r=0;}function S(n,l,u,t,i,o,r,f,e,c,s){var a,v,y,d,w,_=t&&t.__k||p,g=l.length;for(u.__d=e,$$1(u,l,_),e=u.__d,a=0;a<g;a++)null!=(y=u.__k[a])&&"boolean"!=typeof y&&"function"!=typeof y&&(v=-1===y.__i?h:_[y.__i]||h,y.__i=a,O$1(n,y,v,i,o,r,f,e,c,s),d=y.__e,y.ref&&v.ref!=y.ref&&(v.ref&&N(v.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),65536&y.__u||v.__k===y.__k?e=I(y,e,n):"function"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=w;}function $$1(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)r=t+a,null!=(i=n.__k[t]=null==(i=l[t])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?g$1(null,i,null,null,null):y(i)?g$1(k$1,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?g$1(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=L$1(i,u,r,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,"function"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f==r-1?a=f-r:f==r+1?a++:f>r?s>e-r?a+=f-r:a--:f<r&&a++,f!==t+a&&(i.__u|=65536))):(o=u[r])&&null==o.key&&o.__e&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V$1(o,o,!1),u[r]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V$1(o,o));}function I(n,l,u){var t,i;if("function"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=I(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!u.contains(l)&&(l=x(n)),u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8===l.nodeType);return l}function H$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(y(n)?n.some(function(n){H$1(n,l);}):l.push(n)),l}function L$1(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type&&0==(131072&e.__u))return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--;}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++;}}return -1}function T$1(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||v$1.test(l)?u:u+"px";}function A$1(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$1(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||T$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=e$1,n.addEventListener(l,o?s$1:c$1,o)):n.removeEventListener(l,o?s$1:c$1,o);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=e$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O$1(n,u,t,i,o,r,f,e,c,s){var a,h,p,v,w,_,g,m,x,C,M,P,$,I,H,L,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof T)try{if(m=u.props,x="prototype"in T&&T.prototype.render,C=(a=T.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?g=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(m,M):(u.__c=h=new b(m,M),h.constructor=T,h.render=q),C&&C.sub(h),h.props=m,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,T.getDerivedStateFromProps(m,h.__s))),v=h.props,w=h.state,h.__v=u,p)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(x&&null==T.getDerivedStateFromProps&&m!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,M)||u.__v===t.__v)){for(u.__v!==t.__v&&(h.props=m,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u);}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,M),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,w,_);});}if(h.context=M,h.props=m,h.__P=n,h.__e=!1,$=l$1.__r,I=0,x){for(h.state=h.__s,h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++I<25);h.state=h.__s,null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),x&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,w)),S(n,y(L=null!=a&&a.type===k$1&&null==a.key?a.props.children:a)?L:[L],u,t,i,o,r,f,e,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&f.push(h),g&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=r){for(u.__u|=c?160:32;e&&8===e.nodeType&&e.nextSibling;)e=e.nextSibling;r[r.indexOf(e)]=null,u.__e=e;}else u.__e=t.__e,u.__k=t.__k;l$1.__e(n,u,t);}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z$2(t.__e,u,t,i,o,r,f,c,s);(a=l$1.diffed)&&a(u);}function j$2(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)N(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function z$2(l,u,t,i,o,r,f,e,c){var s,a,p,v,d,_,g,m=t.props,k=u.props,b=u.type;if("svg"===b?o="http://www.w3.org/2000/svg":"math"===b?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=r)for(s=0;s<r.length;s++)if((d=r[s])&&"setAttribute"in d==!!b&&(b?d.localName===b:3===d.nodeType)){l=d,r[s]=null;break}if(null==l){if(null===b)return document.createTextNode(k);l=document.createElementNS(o,b,k.is&&k),r=null,e=!1;}if(null===b)m===k||e&&l.data===k||(l.data=k);else {if(r=r&&n.call(l.childNodes),m=t.props||h,!e&&null!=r)for(m={},s=0;s<l.attributes.length;s++)m[(d=l.attributes[s]).name]=d.value;for(s in m)if(d=m[s],"children"==s);else if("dangerouslySetInnerHTML"==s)p=d;else if("key"!==s&&!(s in k)){if("value"==s&&"defaultValue"in k||"checked"==s&&"defaultChecked"in k)continue;A$1(l,s,null,d,o);}for(s in k)d=k[s],"children"==s?v=d:"dangerouslySetInnerHTML"==s?a=d:"value"==s?_=d:"checked"==s?g=d:"key"===s||e&&"function"!=typeof d||m[s]===d||A$1(l,s,d,m[s],o);if(a)e||p&&(a.__html===p.__html||a.__html===l.innerHTML)||(l.innerHTML=a.__html),u.__k=[];else if(p&&(l.innerHTML=""),S(l,y(v)?v:[v],u,t,i,"foreignObject"===b?"http://www.w3.org/1999/xhtml":o,r,f,r?r[0]:t.__k&&x(t,0),e,c),null!=r)for(s=r.length;s--;)null!=r[s]&&w$1(r[s]);e||(s="value",void 0!==_&&(_!==l[s]||"progress"===b&&!_||"option"===b&&_!==m[s])&&A$1(l,s,_,m[s],o),s="checked",void 0!==g&&g!==l[s]&&A$1(l,s,g,m[s],o));}return l}function N(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function V$1(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&V$1(i[o],u,t||"function"!=typeof n.type);t||null==n.__e||w$1(n.__e),n.__c=n.__=n.__e=n.__d=void 0;}function q(n,l,u){return this.constructor(n,u)}function B$2(u,t,i){var o,r,f,e;l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],O$1(t,u=(!o&&i||t).__k=_(k$1,null,[u]),r||h,h,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),j$2(f,u,e);}function D$1(n,l){B$2(n,l,D$1);}function E$1(l,u,t){var i,o,r,f,e=d({},l.props);for(r in l.type&&l.type.defaultProps&&(f=l.type.defaultProps),u)"key"==r?i=u[r]:"ref"==r?o=u[r]:e[r]=void 0===u[r]&&void 0!==f?f[r]:u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),g$1(l.type,e,i||l.key,o||l.ref,null)}function G(n,l){var u={__c:l="__cC"+a$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null;},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,M$1(n);});},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=p.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,t=function(n){return null!=n&&null==n.constructor},b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M$1(this));},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M$1(this));},b.prototype.render=k$1,i$1=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$1=function(n,l){return n.__v.__b-l.__v.__b},P$1.__r=0,e$1=0,c$1=F(!1),s$1=F(!0),a$1=0;
2410
+
2411
+ var r,u,i,f=[],c=l$1,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function j$1(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z$1),n.__H.__h.forEach(B$1),n.__H.__h=[];}catch(t){n.__H.__h=[],c.__e(t,n.__v);}}c.__b=function(n){r=null,e&&e(n);},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t);},c.__r=function(n){a&&a(n);var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0;})):(i.__h.forEach(z$1),i.__h.forEach(B$1),i.__h=[],0)),u=r;},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j$1)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0;})),u=r=null;},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z$1),n.__h=n.__h.filter(function(n){return !n.__||B$1(n)});}catch(r){t.some(function(n){n.__h&&(n.__h=[]);}),t=[],c.__e(r,n.__v);}}),l&&l(n,t);},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z$1(n);}catch(n){t=n;}}),r.__H=void 0,t&&c.__e(t,r.__v));};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r));}function z$1(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function B$1(n){var t=r;n.__c=n.__(),r=t;}
2412
+
2413
+ function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function C(n,t){this.props=n,this.context=t;}(C.prototype=new b).isPureReactComponent=!0,C.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var R=l$1.__b;l$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n);};var M=l$1.__e;l$1.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);M(n,t,e,r);};var T=l$1.unmount;function A(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return A(n,t,e)})),n}function D(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return D(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function L(){this.__u=0,this.t=null,this.__b=null;}function O(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function U(){this.u=null,this.o=null;}l$1.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),T&&T(n);},(L.prototype=new b).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=O(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(c):c());};e.__R=i;var c=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=D(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate();}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i);},L.prototype.componentWillUnmount=function(){this.t=[];},L.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=A(this.__b,r,o.__O=o.__P);}this.__b=null;}var i=e.__a&&_(k$1,null,n.fallback);return i&&(i.__u&=-33),[_(k$1,null,e.__a?null:n.children),i]};var V=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};function W(n){return this.getChildContext=function(){return n.context},n.children}function P(n){var e=this,r=n.i;e.componentWillUnmount=function(){B$2(null,e.l),e.l=null,e.i=null;},e.i&&e.i!==r&&e.componentWillUnmount(),e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],contains:function(){return !0},appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n);},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n);},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n);}}),B$2(_(W,{context:e.context},n.__v),e.l);}function j(n,e){var r=_(P,{__v:n,i:e});return r.containerInfo=e,r}(U.prototype=new b).__a=function(n){var t=this,e=O(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),V(t,n,r)):u();};e?e(o):o();}},U.prototype.render=function(n){this.u=null,this.o=new Map;var t=H$1(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},U.prototype.componentDidUpdate=U.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){V(n,e,t);});};var z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,H=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Z=/[A-Z0-9]/g,Y="undefined"!=typeof document,$=function(n){return ("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};b.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(b.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n});}});});var J=l$1.event;function K(){}function Q(){return this.cancelBubble}function X(){return this.defaultPrevented}l$1.event=function(n){return J&&(n=J(n)),n.persist=K,n.isPropagationStopped=Q,n.isDefaultPrevented=X,n.nativeEvent=n};var tn={enumerable:!1,configurable:!0,get:function(){return this.class}},en=l$1.vnode;l$1.vnode=function(n){"string"==typeof n.type&&function(n){var t=n.props,e=n.type,u={};for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||Y&&"children"===o&&"noscript"===e||"class"===o||"className"===o)){var c=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"translate"===c&&"no"===i?i=!1:"ondoubleclick"===c?o="ondblclick":"onchange"!==c||"input"!==e&&"textarea"!==e||$(t.type)?"onfocus"===c?o="onfocusin":"onblur"===c?o="onfocusout":H.test(o)?o=c:-1===e.indexOf("-")&&B.test(o)?o=o.replace(Z,"-$&").toLowerCase():null===i&&(i=void 0):c=o="oninput","oninput"===c&&u[o=c]&&(o="oninputCapture"),u[o]=i;}}"select"==e&&u.multiple&&Array.isArray(u.value)&&(u.value=H$1(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value);})),"select"==e&&null!=u.defaultValue&&(u.value=H$1(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value;})),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,"className",tn)):(t.className&&!t.class||t.class&&t.className)&&(u.class=u.className=t.className),n.props=u;}(n),n.$$typeof=z,en&&en(n);};var rn=l$1.__r;l$1.__r=function(n){rn&&rn(n),n.__c;};var un=l$1.diffed;l$1.diffed=function(n){un&&un(n);var t=n.props,e=n.__e;null!=e&&"textarea"===n.type&&"value"in t&&t.value!==e.value&&(e.value=null==t.value?"":t.value);};
2414
+
2415
+ /*
2416
+ NOTE: this can be a public API, especially createElement for hooks.
2417
+ See examples/typescript-scheduler/src/index.ts
2418
+ */
2419
+ /*
2420
+ HACK for flushSync being a noop:
2421
+ https://github.com/preactjs/preact/issues/3929
2422
+ */
2423
+ function flushSync(renderActionToFlush) {
2424
+ renderActionToFlush();
2425
+ let oldDebounceRendering = l$1.debounceRendering; // orig
2426
+ let callbackQ = [];
2427
+ function execCallbackSync(callback) {
2428
+ callbackQ.push(callback);
2460
2429
  }
2461
- else {
2462
- if (meta.isToday) {
2463
- classNames.push('fc-day-today');
2430
+ l$1.debounceRendering = execCallbackSync;
2431
+ B$2(_(FakeComponent, {}), document.createElement('div'));
2432
+ while (callbackQ.length) {
2433
+ callbackQ.shift()();
2434
+ }
2435
+ l$1.debounceRendering = oldDebounceRendering;
2436
+ }
2437
+ /*
2438
+ Triggers a state-change which unclogs the render queue? Needed?
2439
+ */
2440
+ class FakeComponent extends b {
2441
+ render() { return _('div', {}); }
2442
+ componentDidMount() { this.setState({}); }
2443
+ }
2444
+ /*
2445
+ HACK for Preact wrongly calling shouldComponentUpdate during context changes:
2446
+ https://github.com/preactjs/preact/issues/2510
2447
+ */
2448
+ function createContext(defaultValue) {
2449
+ let ContextType = G(defaultValue);
2450
+ let origProvider = ContextType.Provider;
2451
+ ContextType.Provider = function () {
2452
+ let isNew = !this.getChildContext;
2453
+ let children = origProvider.apply(this, arguments); // eslint-disable-line prefer-rest-params
2454
+ if (isNew) {
2455
+ let subs = [];
2456
+ this.shouldComponentUpdate = (_props) => {
2457
+ if (this.props.value !== _props.value) {
2458
+ subs.forEach((c) => {
2459
+ c.context = _props.value;
2460
+ c.forceUpdate();
2461
+ });
2462
+ }
2463
+ };
2464
+ this.sub = (c) => {
2465
+ subs.push(c);
2466
+ let old = c.componentWillUnmount;
2467
+ c.componentWillUnmount = () => {
2468
+ subs.splice(subs.indexOf(c), 1);
2469
+ old && old.call(c);
2470
+ };
2471
+ };
2464
2472
  }
2465
- if (meta.isPast) {
2466
- classNames.push('fc-day-past');
2473
+ return children;
2474
+ };
2475
+ return ContextType;
2476
+ }
2477
+ const preactOptions = l$1;
2478
+
2479
+ var preact = {
2480
+ __proto__: null,
2481
+ flushSync: flushSync,
2482
+ createContext: createContext,
2483
+ preactOptions: preactOptions,
2484
+ createPortal: j,
2485
+ Component: b,
2486
+ Fragment: k$1,
2487
+ cloneElement: E$1,
2488
+ createElement: _,
2489
+ createRef: m$1,
2490
+ h: _,
2491
+ hydrate: D$1,
2492
+ get isValidElement () { return t; },
2493
+ get options () { return l$1; },
2494
+ render: B$2,
2495
+ toChildArray: H$1
2496
+ };
2497
+
2498
+ const nativeBorderBoxEnabled = true;
2499
+ const fallbackTimeout = 100;
2500
+ const configMap = new Map();
2501
+ const afterSizeCallbacks = new Set();
2502
+ let isHandling = false; // utilized by both techniques
2503
+ function afterSize(callback) {
2504
+ if (isHandling) {
2505
+ afterSizeCallbacks.add(callback);
2506
+ }
2507
+ else {
2508
+ callback(); // TODO: should we queue microtask?
2509
+ }
2510
+ }
2511
+ function flushAfterSize() {
2512
+ for (const flushedCallback of afterSizeCallbacks.values()) {
2513
+ flushedCallback();
2514
+ afterSizeCallbacks.delete(flushedCallback);
2515
+ }
2516
+ }
2517
+ /*
2518
+ A proper ResizeObserver polyfill would keep checking dimensions until all stabilized,
2519
+ to detect if a *handler* caused a new element's dimensions to change,
2520
+ while ignoring changes per-element after the first (to prevent infinite loops),
2521
+ but our Preact system does not commit to the DOM immediately, commits are batched for later,
2522
+ so we can skip this.
2523
+ */
2524
+ function checkConfigMap() {
2525
+ if (!isHandling) {
2526
+ isHandling = true;
2527
+ const dirtyConfigs = [];
2528
+ for (const [el, config] of configMap.entries()) {
2529
+ let width;
2530
+ let height;
2531
+ if (config.client) {
2532
+ width = el.clientWidth;
2533
+ height = el.clientHeight;
2534
+ }
2535
+ else {
2536
+ ({ width, height } = el.getBoundingClientRect());
2537
+ }
2538
+ if (storeConfigDims(config, width, height)) {
2539
+ dirtyConfigs.push(config);
2540
+ }
2467
2541
  }
2468
- if (meta.isFuture) {
2469
- classNames.push('fc-day-future');
2542
+ for (const dirtyConfig of dirtyConfigs) {
2543
+ dirtyConfig.callback(dirtyConfig.width, dirtyConfig.height);
2470
2544
  }
2471
- if (meta.isOther) {
2472
- classNames.push('fc-day-other');
2545
+ flushAfterSize();
2546
+ isHandling = false;
2547
+ }
2548
+ }
2549
+ function storeConfigDims(config, width, height) {
2550
+ let shouldFire = false;
2551
+ // we use it because ResizeObserver's results could be slightly off from getBoundingClientRect
2552
+ if (!isDimsEqual(config.width, width)) {
2553
+ config.width = width;
2554
+ shouldFire = config.watchWidth;
2555
+ }
2556
+ if (!isDimsEqual(config.height, height)) {
2557
+ config.height = height;
2558
+ shouldFire || (shouldFire = config.watchHeight);
2559
+ }
2560
+ return shouldFire;
2561
+ }
2562
+ // Native Technique ONLY
2563
+ // -------------------------------------------------------------------------------------------------
2564
+ function initNative() {
2565
+ // Single global ResizeObserver does batching and uses less memory than individuals
2566
+ // Will always fire with delay after DOM mutation, but before repaint,
2567
+ // thus doesn't need !isHandling check like checkConfigMap
2568
+ const globalResizeObserver = new ResizeObserver((entries) => {
2569
+ isHandling = true;
2570
+ for (let entry of entries) {
2571
+ const el = entry.target;
2572
+ const config = configMap.get(el);
2573
+ let width;
2574
+ let height;
2575
+ if (config.client) {
2576
+ width = el.clientWidth;
2577
+ height = el.clientHeight;
2578
+ }
2579
+ else if (entry.borderBoxSize && nativeBorderBoxEnabled) {
2580
+ const borderBoxSize = entry.borderBoxSize[0] || entry.borderBoxSize; // HACK for Firefox
2581
+ width = borderBoxSize.inlineSize;
2582
+ height = borderBoxSize.blockSize;
2583
+ }
2584
+ else {
2585
+ ({ width, height } = el.getBoundingClientRect());
2586
+ }
2587
+ if (storeConfigDims(config, width, height)) {
2588
+ config.callback(width, height);
2589
+ }
2473
2590
  }
2591
+ flushAfterSize();
2592
+ isHandling = false;
2593
+ });
2594
+ function watchSize(el, callback, client, watchWidth = true, watchHeight = true) {
2595
+ configMap.set(el, { callback, client, watchWidth, watchHeight });
2596
+ globalResizeObserver.observe(el, {
2597
+ box: !client && nativeBorderBoxEnabled
2598
+ ? 'border-box'
2599
+ : undefined // default is 'content-box'
2600
+ });
2601
+ return () => {
2602
+ configMap.delete(el);
2603
+ globalResizeObserver.unobserve(el);
2604
+ };
2474
2605
  }
2475
- return classNames;
2606
+ return [watchSize, checkConfigMap];
2476
2607
  }
2477
- function getSlotClassNames(meta, theme) {
2478
- let classNames = [
2479
- 'fc-slot',
2480
- `fc-slot-${DAY_IDS[meta.dow]}`,
2481
- ];
2482
- if (meta.isDisabled) {
2483
- classNames.push('fc-slot-disabled');
2608
+ // Fallback Technique ONLY
2609
+ // -------------------------------------------------------------------------------------------------
2610
+ // from https://github.com/juggle/resize-observer/blob/master/src/utils/scheduler.ts
2611
+ const globalEventNames = [
2612
+ // Global Resize
2613
+ 'resize',
2614
+ // Global Load
2615
+ 'load',
2616
+ // Transitions & Animations
2617
+ 'transitionend',
2618
+ 'animationend',
2619
+ 'animationstart',
2620
+ 'animationiteration',
2621
+ // Interactions
2622
+ 'keyup',
2623
+ 'keydown',
2624
+ 'mouseup',
2625
+ 'mousedown',
2626
+ 'mouseover',
2627
+ 'mouseout',
2628
+ 'blur',
2629
+ 'focus'
2630
+ ];
2631
+ const eventListenerConfig = {
2632
+ capture: true,
2633
+ passive: true, // we don't call preventDefault, so can optimize
2634
+ };
2635
+ function initFallback() {
2636
+ let globalMutationObserver; // lazily initialize for non-browser envs
2637
+ let globalMutationObserverPaused = false;
2638
+ const [requestCheckSizes, cancelCheckSizes] = debounce(checkConfigMap, fallbackTimeout);
2639
+ function requestCheckSizesSync() {
2640
+ cancelCheckSizes();
2641
+ checkConfigMap();
2642
+ }
2643
+ function watchSize(el, callback, client, watchWidth = true, watchHeight = true) {
2644
+ if (!configMap.size) {
2645
+ addGlobalHandlers();
2646
+ }
2647
+ configMap.set(el, { callback, client, watchWidth, watchHeight });
2648
+ requestCheckSizes();
2649
+ return () => {
2650
+ configMap.delete(el);
2651
+ if (!configMap.size) {
2652
+ removeGlobalHandlers();
2653
+ }
2654
+ };
2484
2655
  }
2485
- else {
2486
- if (meta.isToday) {
2487
- classNames.push('fc-slot-today');
2656
+ function addGlobalHandlers() {
2657
+ globalMutationObserver = new MutationObserver(requestCheckSizes);
2658
+ if (!globalMutationObserverPaused) {
2659
+ startGlobalMutationObserver();
2488
2660
  }
2489
- if (meta.isPast) {
2490
- classNames.push('fc-slot-past');
2661
+ for (const eventName of globalEventNames) {
2662
+ window.addEventListener(eventName, requestCheckSizes, eventListenerConfig);
2491
2663
  }
2492
- if (meta.isFuture) {
2493
- classNames.push('fc-slot-future');
2664
+ }
2665
+ function removeGlobalHandlers() {
2666
+ if (!globalMutationObserverPaused) {
2667
+ stopGlobalMutationObserver();
2668
+ }
2669
+ for (const eventName of globalEventNames) {
2670
+ window.removeEventListener(eventName, requestCheckSizes, eventListenerConfig);
2494
2671
  }
2495
2672
  }
2496
- return classNames;
2497
- }
2498
-
2499
- // TODO: kill Component::safeSetState
2500
- // TODO: kill
2501
- function setStateDimMap(component, key, newMap) {
2502
- const currentMap = component.state[key];
2503
- if (!currentMap || !isDimMapsEqual(currentMap, newMap)) {
2504
- component.setState({ [key]: newMap });
2673
+ function startGlobalMutationObserver() {
2674
+ globalMutationObserver.observe(document.documentElement, {
2675
+ attributes: true,
2676
+ childList: true,
2677
+ subtree: true,
2678
+ characterData: true,
2679
+ });
2505
2680
  }
2506
- }
2507
- // TODO: kill
2508
- function isDimMapsEqual(oldMap, newMap) {
2509
- for (const key in newMap) {
2510
- if (!isDimsEqual(oldMap[key], newMap[key])) {
2511
- return false;
2681
+ function stopGlobalMutationObserver() {
2682
+ globalMutationObserver.disconnect();
2683
+ }
2684
+ function pauseGlobalMutationObserver() {
2685
+ if (!globalMutationObserverPaused) {
2686
+ globalMutationObserverPaused = true;
2687
+ if (configMap.size) {
2688
+ stopGlobalMutationObserver();
2689
+ }
2512
2690
  }
2513
2691
  }
2514
- return true;
2515
- }
2516
- // TODO: kill
2517
- function isDimsEqual(v0, v1) {
2518
- return v0 != null && (v0 === v1 || Math.abs(v0 - v1) < 0.01);
2692
+ function resumeGlobalMutationObserver() {
2693
+ if (globalMutationObserverPaused) {
2694
+ globalMutationObserverPaused = false;
2695
+ if (configMap.size) {
2696
+ startGlobalMutationObserver();
2697
+ }
2698
+ }
2699
+ }
2700
+ // Preact Integration
2701
+ const __rOld = preactOptions.__r || noop;
2702
+ const __cOld = preactOptions.__c || noop;
2703
+ let requested = false;
2704
+ preactOptions.__r = function () {
2705
+ pauseGlobalMutationObserver();
2706
+ __rOld.apply(this, arguments);
2707
+ };
2708
+ preactOptions.__c = function () {
2709
+ if (!requested) {
2710
+ requested = true;
2711
+ requestAnimationFrame(() => {
2712
+ requestCheckSizesSync();
2713
+ resumeGlobalMutationObserver();
2714
+ requested = false;
2715
+ });
2716
+ }
2717
+ __cOld.apply(this, arguments);
2718
+ };
2719
+ return [watchSize, requestCheckSizesSync];
2519
2720
  }
2520
-
2521
- const callbackMap = new Map();
2522
- let flushedCallbackSet = new Set();
2523
- let isHandling = false;
2524
- /*
2525
- Performant from multiple perspectives:
2526
- - less memory with one ResizeObserver
2527
- - batches firing
2528
- */
2529
- const resizeObserver = new ResizeObserver((entries) => {
2530
- isHandling = true;
2531
- for (let entry of entries) {
2532
- const callback = callbackMap.get(entry.target);
2533
- if (entry.contentBoxSize) {
2534
- // The standard makes contentBoxSize an array...
2535
- if (entry.contentBoxSize[0]) {
2536
- callback(entry.contentBoxSize[0].inlineSize, entry.contentBoxSize[0].blockSize);
2721
+ // Util
2722
+ // -------------------------------------------------------------------------------------------------
2723
+ const noop = () => { }; // TODO: use elsewhere
2724
+ function debounce(fn, ms) {
2725
+ let timeoutStarted;
2726
+ let timeoutAdded;
2727
+ let timeoutId; // thruthiness indicates whether active timeout
2728
+ function runWithTimeout(timeout) {
2729
+ timeoutStarted = Date.now();
2730
+ timeoutAdded = 0;
2731
+ timeoutId = setTimeout(() => {
2732
+ if (timeoutAdded) {
2733
+ runWithTimeout(timeoutAdded);
2537
2734
  }
2538
2735
  else {
2539
- // ...but old versions of Firefox treat it as a single item
2540
- callback(entry.contentBoxSize.inlineSize, entry.contentBoxSize.blockSize);
2736
+ timeoutId = undefined;
2737
+ fn();
2541
2738
  }
2739
+ }, timeout);
2740
+ }
2741
+ function request() {
2742
+ if (timeoutId) {
2743
+ timeoutAdded = Date.now() - timeoutStarted;
2542
2744
  }
2543
2745
  else {
2544
- callback(entry.contentRect.width, entry.contentRect.height);
2746
+ runWithTimeout(ms);
2545
2747
  }
2546
2748
  }
2547
- for (const flushedCallback of flushedCallbackSet.values()) {
2548
- flushedCallback();
2549
- flushedCallbackSet.delete(flushedCallback);
2749
+ function cancel() {
2750
+ if (timeoutId) {
2751
+ clearTimeout(timeoutId);
2752
+ timeoutId = undefined;
2753
+ }
2550
2754
  }
2551
- isHandling = false;
2552
- });
2755
+ return [request, cancel];
2756
+ }
2757
+ // Main
2758
+ // -------------------------------------------------------------------------------------------------
2553
2759
  /*
2554
- PRECONDITIONS:
2555
- - element can only have one listener attached ever
2556
- - element cannot have border or padding
2760
+ PRECONDITION: element can only have one listener attached
2557
2761
 
2558
- TODO:
2559
- - always force border/padding on these elements to `0 !important` ???
2762
+ NOTE: If we ever kill the fallback technique and use ResizeObserver unconditionally with full
2763
+ border-box support, we no longer need wrappers around the <StickyFooterScrollbar>'s <Scroller>
2560
2764
  */
2561
- function watchSize(el, callback) {
2562
- callbackMap.set(el, callback);
2563
- resizeObserver.observe(el);
2564
- return () => {
2565
- callbackMap.delete(el);
2566
- resizeObserver.unobserve(el);
2567
- };
2568
- }
2765
+ const [watchSize, updateSizeSync] = typeof ResizeObserver !== 'undefined'
2766
+ ? initNative()
2767
+ : initFallback();
2569
2768
  function watchWidth(el, callback) {
2570
- let currentWidth;
2571
- return watchSize(el, (width) => {
2572
- if (currentWidth == null || currentWidth !== width) {
2573
- callback(currentWidth = width);
2574
- }
2575
- });
2769
+ return watchSize(el, callback,
2770
+ /* watchWidth = */ true);
2576
2771
  }
2577
2772
  function watchHeight(el, callback) {
2578
- let currentHeight;
2579
- return watchSize(el, (_width, height) => {
2580
- if (currentHeight == null || currentHeight !== height) {
2581
- callback(currentHeight = height);
2582
- }
2583
- });
2584
- }
2585
- function afterSize(callback) {
2586
- if (isHandling) {
2587
- flushedCallbackSet.add(callback);
2588
- }
2589
- else {
2590
- callback(); // TODO: should we queue microtask?
2591
- }
2773
+ return watchSize(el, (_width, height) => callback(height),
2774
+ /* watchWidth = */ false,
2775
+ /* watchHeight = */ true);
2592
2776
  }
2593
2777
 
2594
2778
  const DAY_FORMAT = createFormatter({ year: 'numeric', month: 'long', day: 'numeric' });
@@ -2640,7 +2824,7 @@ var FullCalendar = (function (exports) {
2640
2824
  document.body.appendChild(outerEl);
2641
2825
  let innerEl = outerEl.firstChild;
2642
2826
  let res = innerEl.getBoundingClientRect().left > outerEl.getBoundingClientRect().left;
2643
- removeElement(outerEl);
2827
+ outerEl.remove();
2644
2828
  return res;
2645
2829
  }
2646
2830
 
@@ -3041,7 +3225,7 @@ var FullCalendar = (function (exports) {
3041
3225
  }
3042
3226
  return className;
3043
3227
  }
3044
- getClass(key) {
3228
+ getClassName(key) {
3045
3229
  return this.classes[key] || '';
3046
3230
  }
3047
3231
  getIconClass(buttonName, isRtl) {
@@ -3073,86 +3257,6 @@ var FullCalendar = (function (exports) {
3073
3257
  Theme.prototype.baseIconClass = '';
3074
3258
  Theme.prototype.iconOverridePrefix = '';
3075
3259
 
3076
- var n,l$1,u$1,t,i$1,o,r$1,f$1,e$1,c$1,s$1,a$1,h={},p=[],v$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function w$1(n){var l=n.parentNode;l&&l.removeChild(n);}function _(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return g$1(l,f,i,o,null)}function g$1(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u$1:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function m$1(){return {current:null}}function k$1(n){return n.children}function b(n,l){this.props=n,this.context=l;}function x(n,l){if(null==l)return n.__?x(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?x(n):null}function C$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$1(n)}}function M$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!P$1.__r++||o!==l$1.debounceRendering)&&((o=l$1.debounceRendering)||r$1)(P$1);}function P$1(){var n,u,t,o,r,e,c,s;for(i$1.sort(f$1);n=i$1.shift();)n.__d&&(u=i$1.length,o=void 0,e=(r=(t=n).__v).__e,c=[],s=[],t.__P&&((o=d({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(o),O$1(t.__P,o,r,t.__n,t.__P.namespaceURI,32&r.__u?[e]:null,c,null==e?x(r):e,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,j$2(c,o,s),o.__e!=e&&C$1(o)),i$1.length>u&&i$1.sort(f$1));P$1.__r=0;}function S(n,l,u,t,i,o,r,f,e,c,s){var a,v,y,d,w,_=t&&t.__k||p,g=l.length;for(u.__d=e,$$1(u,l,_),e=u.__d,a=0;a<g;a++)null!=(y=u.__k[a])&&"boolean"!=typeof y&&"function"!=typeof y&&(v=-1===y.__i?h:_[y.__i]||h,y.__i=a,O$1(n,y,v,i,o,r,f,e,c,s),d=y.__e,y.ref&&v.ref!=y.ref&&(v.ref&&N(v.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),65536&y.__u||v.__k===y.__k?e=I(y,e,n):"function"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=w;}function $$1(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)r=t+a,null!=(i=n.__k[t]=null==(i=l[t])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?g$1(null,i,null,null,null):y(i)?g$1(k$1,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?g$1(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=L$1(i,u,r,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,"function"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f==r-1?a=f-r:f==r+1?a++:f>r?s>e-r?a+=f-r:a--:f<r&&a++,f!==t+a&&(i.__u|=65536))):(o=u[r])&&null==o.key&&o.__e&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V$1(o,o,!1),u[r]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V$1(o,o));}function I(n,l,u){var t,i;if("function"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=I(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!u.contains(l)&&(l=x(n)),u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8===l.nodeType);return l}function H$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(y(n)?n.some(function(n){H$1(n,l);}):l.push(n)),l}function L$1(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type&&0==(131072&e.__u))return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--;}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++;}}return -1}function T$1(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||v$1.test(l)?u:u+"px";}function A$1(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$1(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||T$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=e$1,n.addEventListener(l,o?s$1:c$1,o)):n.removeEventListener(l,o?s$1:c$1,o);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=e$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O$1(n,u,t,i,o,r,f,e,c,s){var a,h,p,v,w,_,g,m,x,C,M,P,$,I,H,L,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof T)try{if(m=u.props,x="prototype"in T&&T.prototype.render,C=(a=T.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?g=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(m,M):(u.__c=h=new b(m,M),h.constructor=T,h.render=q),C&&C.sub(h),h.props=m,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,T.getDerivedStateFromProps(m,h.__s))),v=h.props,w=h.state,h.__v=u,p)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(x&&null==T.getDerivedStateFromProps&&m!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,M)||u.__v===t.__v)){for(u.__v!==t.__v&&(h.props=m,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u);}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,M),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,w,_);});}if(h.context=M,h.props=m,h.__P=n,h.__e=!1,$=l$1.__r,I=0,x){for(h.state=h.__s,h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++I<25);h.state=h.__s,null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),x&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,w)),S(n,y(L=null!=a&&a.type===k$1&&null==a.key?a.props.children:a)?L:[L],u,t,i,o,r,f,e,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&f.push(h),g&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=r){for(u.__u|=c?160:32;e&&8===e.nodeType&&e.nextSibling;)e=e.nextSibling;r[r.indexOf(e)]=null,u.__e=e;}else u.__e=t.__e,u.__k=t.__k;l$1.__e(n,u,t);}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z$2(t.__e,u,t,i,o,r,f,c,s);(a=l$1.diffed)&&a(u);}function j$2(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)N(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function z$2(l,u,t,i,o,r,f,e,c){var s,a,p,v,d,_,g,m=t.props,k=u.props,b=u.type;if("svg"===b?o="http://www.w3.org/2000/svg":"math"===b?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=r)for(s=0;s<r.length;s++)if((d=r[s])&&"setAttribute"in d==!!b&&(b?d.localName===b:3===d.nodeType)){l=d,r[s]=null;break}if(null==l){if(null===b)return document.createTextNode(k);l=document.createElementNS(o,b,k.is&&k),r=null,e=!1;}if(null===b)m===k||e&&l.data===k||(l.data=k);else {if(r=r&&n.call(l.childNodes),m=t.props||h,!e&&null!=r)for(m={},s=0;s<l.attributes.length;s++)m[(d=l.attributes[s]).name]=d.value;for(s in m)if(d=m[s],"children"==s);else if("dangerouslySetInnerHTML"==s)p=d;else if("key"!==s&&!(s in k)){if("value"==s&&"defaultValue"in k||"checked"==s&&"defaultChecked"in k)continue;A$1(l,s,null,d,o);}for(s in k)d=k[s],"children"==s?v=d:"dangerouslySetInnerHTML"==s?a=d:"value"==s?_=d:"checked"==s?g=d:"key"===s||e&&"function"!=typeof d||m[s]===d||A$1(l,s,d,m[s],o);if(a)e||p&&(a.__html===p.__html||a.__html===l.innerHTML)||(l.innerHTML=a.__html),u.__k=[];else if(p&&(l.innerHTML=""),S(l,y(v)?v:[v],u,t,i,"foreignObject"===b?"http://www.w3.org/1999/xhtml":o,r,f,r?r[0]:t.__k&&x(t,0),e,c),null!=r)for(s=r.length;s--;)null!=r[s]&&w$1(r[s]);e||(s="value",void 0!==_&&(_!==l[s]||"progress"===b&&!_||"option"===b&&_!==m[s])&&A$1(l,s,_,m[s],o),s="checked",void 0!==g&&g!==l[s]&&A$1(l,s,g,m[s],o));}return l}function N(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function V$1(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&V$1(i[o],u,t||"function"!=typeof n.type);t||null==n.__e||w$1(n.__e),n.__c=n.__=n.__e=n.__d=void 0;}function q(n,l,u){return this.constructor(n,u)}function B$2(u,t,i){var o,r,f,e;l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],O$1(t,u=(!o&&i||t).__k=_(k$1,null,[u]),r||h,h,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),j$2(f,u,e);}function D$1(n,l){B$2(n,l,D$1);}function E$1(l,u,t){var i,o,r,f,e=d({},l.props);for(r in l.type&&l.type.defaultProps&&(f=l.type.defaultProps),u)"key"==r?i=u[r]:"ref"==r?o=u[r]:e[r]=void 0===u[r]&&void 0!==f?f[r]:u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),g$1(l.type,e,i||l.key,o||l.ref,null)}function G(n,l){var u={__c:l="__cC"+a$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null;},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,M$1(n);});},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=p.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,t=function(n){return null!=n&&null==n.constructor},b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M$1(this));},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M$1(this));},b.prototype.render=k$1,i$1=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$1=function(n,l){return n.__v.__b-l.__v.__b},P$1.__r=0,e$1=0,c$1=F(!1),s$1=F(!0),a$1=0;
3077
-
3078
- var r,u,i,f=[],c=l$1,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function j$1(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z$1),n.__H.__h.forEach(B$1),n.__H.__h=[];}catch(t){n.__H.__h=[],c.__e(t,n.__v);}}c.__b=function(n){r=null,e&&e(n);},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t);},c.__r=function(n){a&&a(n);var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0;})):(i.__h.forEach(z$1),i.__h.forEach(B$1),i.__h=[],0)),u=r;},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j$1)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0;})),u=r=null;},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z$1),n.__h=n.__h.filter(function(n){return !n.__||B$1(n)});}catch(r){t.some(function(n){n.__h&&(n.__h=[]);}),t=[],c.__e(r,n.__v);}}),l&&l(n,t);},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z$1(n);}catch(n){t=n;}}),r.__H=void 0,t&&c.__e(t,r.__v));};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r));}function z$1(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function B$1(n){var t=r;n.__c=n.__(),r=t;}
3079
-
3080
- function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if("__source"!==e&&!(e in t))return !0;for(var r in t)if("__source"!==r&&n[r]!==t[r])return !0;return !1}function C(n,t){this.props=n,this.context=t;}(C.prototype=new b).isPureReactComponent=!0,C.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var R=l$1.__b;l$1.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n);};var M=l$1.__e;l$1.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);M(n,t,e,r);};var T=l$1.unmount;function A(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c();}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return A(n,t,e)})),n}function D(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return D(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function L(){this.__u=0,this.t=null,this.__b=null;}function O(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function U(){this.u=null,this.o=null;}l$1.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),T&&T(n);},(L.prototype=new b).__c=function(n,t){var e=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(e);var u=O(r.__v),o=!1,i=function(){o||(o=!0,e.__R=null,u?u(c):c());};e.__R=i;var c=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=D(n,n.__c.__P,n.__c.__O);}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate();}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i);},L.prototype.componentWillUnmount=function(){this.t=[];},L.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=A(this.__b,r,o.__O=o.__P);}this.__b=null;}var i=e.__a&&_(k$1,null,n.fallback);return i&&(i.__u&=-33),[_(k$1,null,e.__a?null:n.children),i]};var V=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.u=e=e[2];}};function W(n){return this.getChildContext=function(){return n.context},n.children}function P(n){var e=this,r=n.i;e.componentWillUnmount=function(){B$2(null,e.l),e.l=null,e.i=null;},e.i&&e.i!==r&&e.componentWillUnmount(),e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],contains:function(){return !0},appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n);},insertBefore:function(n,t){this.childNodes.push(n),e.i.appendChild(n);},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n);}}),B$2(_(W,{context:e.context},n.__v),e.l);}function j(n,e){var r=_(P,{__v:n,i:e});return r.containerInfo=e,r}(U.prototype=new b).__a=function(n){var t=this,e=O(t.__v),r=t.o.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),V(t,n,r)):u();};e?e(o):o();}},U.prototype.render=function(n){this.u=null,this.o=new Map;var t=H$1(n.children);n.revealOrder&&"b"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},U.prototype.componentDidUpdate=U.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){V(n,e,t);});};var z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,B=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,H=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Z=/[A-Z0-9]/g,Y="undefined"!=typeof document,$=function(n){return ("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};b.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(b.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n});}});});var J=l$1.event;function K(){}function Q(){return this.cancelBubble}function X(){return this.defaultPrevented}l$1.event=function(n){return J&&(n=J(n)),n.persist=K,n.isPropagationStopped=Q,n.isDefaultPrevented=X,n.nativeEvent=n};var tn={enumerable:!1,configurable:!0,get:function(){return this.class}},en=l$1.vnode;l$1.vnode=function(n){"string"==typeof n.type&&function(n){var t=n.props,e=n.type,u={};for(var o in t){var i=t[o];if(!("value"===o&&"defaultValue"in t&&null==i||Y&&"children"===o&&"noscript"===e||"class"===o||"className"===o)){var c=o.toLowerCase();"defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":"translate"===c&&"no"===i?i=!1:"ondoubleclick"===c?o="ondblclick":"onchange"!==c||"input"!==e&&"textarea"!==e||$(t.type)?"onfocus"===c?o="onfocusin":"onblur"===c?o="onfocusout":H.test(o)?o=c:-1===e.indexOf("-")&&B.test(o)?o=o.replace(Z,"-$&").toLowerCase():null===i&&(i=void 0):c=o="oninput","oninput"===c&&u[o=c]&&(o="oninputCapture"),u[o]=i;}}"select"==e&&u.multiple&&Array.isArray(u.value)&&(u.value=H$1(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value);})),"select"==e&&null!=u.defaultValue&&(u.value=H$1(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value;})),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,"className",tn)):(t.className&&!t.class||t.class&&t.className)&&(u.class=u.className=t.className),n.props=u;}(n),n.$$typeof=z,en&&en(n);};var rn=l$1.__r;l$1.__r=function(n){rn&&rn(n),n.__c;};var un=l$1.diffed;l$1.diffed=function(n){un&&un(n);var t=n.props,e=n.__e;null!=e&&"textarea"===n.type&&"value"in t&&t.value!==e.value&&(e.value=null==t.value?"":t.value);};
3081
-
3082
- /*
3083
- NOTE: this can be a public API, especially createElement for hooks.
3084
- See examples/typescript-scheduler/src/index.ts
3085
- */
3086
- /*
3087
- TODO: rethink this
3088
- */
3089
- function flushSync(runBeforeFlush) {
3090
- runBeforeFlush();
3091
- let oldDebounceRendering = l$1.debounceRendering; // orig
3092
- let callbackQ = [];
3093
- function execCallbackSync(callback) {
3094
- callbackQ.push(callback);
3095
- }
3096
- l$1.debounceRendering = execCallbackSync;
3097
- B$2(_(FakeComponent, {}), document.createElement('div'));
3098
- while (callbackQ.length) {
3099
- callbackQ.shift()();
3100
- }
3101
- l$1.debounceRendering = oldDebounceRendering;
3102
- }
3103
- class FakeComponent extends b {
3104
- render() { return _('div', {}); }
3105
- componentDidMount() { this.setState({}); }
3106
- }
3107
- // TODO: use preact/compat instead?
3108
- function createContext(defaultValue) {
3109
- let ContextType = G(defaultValue);
3110
- let origProvider = ContextType.Provider;
3111
- ContextType.Provider = function () {
3112
- let isNew = !this.getChildContext;
3113
- let children = origProvider.apply(this, arguments); // eslint-disable-line prefer-rest-params
3114
- if (isNew) {
3115
- let subs = [];
3116
- this.shouldComponentUpdate = (_props) => {
3117
- if (this.props.value !== _props.value) {
3118
- subs.forEach((c) => {
3119
- c.context = _props.value;
3120
- c.forceUpdate();
3121
- });
3122
- }
3123
- };
3124
- this.sub = (c) => {
3125
- subs.push(c);
3126
- let old = c.componentWillUnmount;
3127
- c.componentWillUnmount = () => {
3128
- subs.splice(subs.indexOf(c), 1);
3129
- old && old.call(c);
3130
- };
3131
- };
3132
- }
3133
- return children;
3134
- };
3135
- return ContextType;
3136
- }
3137
-
3138
- var preact = {
3139
- __proto__: null,
3140
- flushSync: flushSync,
3141
- createContext: createContext,
3142
- createPortal: j,
3143
- Component: b,
3144
- Fragment: k$1,
3145
- cloneElement: E$1,
3146
- createElement: _,
3147
- createRef: m$1,
3148
- h: _,
3149
- hydrate: D$1,
3150
- get isValidElement () { return t; },
3151
- get options () { return l$1; },
3152
- render: B$2,
3153
- toChildArray: H$1
3154
- };
3155
-
3156
3260
  const ViewContextType = createContext({}); // for Components
3157
3261
  function buildViewContext(viewSpec, viewApi, viewOptions, dateProfileGenerator, dateEnv, theme, pluginHooks, dispatch, getCurrentData, emitter, calendarApi, registerInteractiveComponent, unregisterInteractiveComponent) {
3158
3262
  return {
@@ -3183,12 +3287,6 @@ var FullCalendar = (function (exports) {
3183
3287
  return !compareObjs(this.props, nextProps, this.propEquality) ||
3184
3288
  !compareObjs(this.state, nextState, this.stateEquality);
3185
3289
  }
3186
- // HACK for freakin' React StrictMode
3187
- safeSetState(newState) {
3188
- if (!compareObjs(this.state, Object.assign(Object.assign({}, this.state), newState), this.stateEquality)) {
3189
- this.setState(newState);
3190
- }
3191
- }
3192
3290
  }
3193
3291
  PureComponent.addPropsEquality = addPropsEquality;
3194
3292
  PureComponent.addStateEquality = addStateEquality;
@@ -3229,7 +3327,7 @@ var FullCalendar = (function (exports) {
3229
3327
  class DateComponent extends BaseComponent {
3230
3328
  constructor() {
3231
3329
  super(...arguments);
3232
- this.uid = guid();
3330
+ this.uid = guid$1();
3233
3331
  }
3234
3332
  // Hit System
3235
3333
  // -----------------------------------------------------------------------------------------------------------------
@@ -3243,13 +3341,13 @@ var FullCalendar = (function (exports) {
3243
3341
  isValidSegDownEl(el) {
3244
3342
  return !this.props.eventDrag && // HACK
3245
3343
  !this.props.eventResize && // HACK
3246
- !elementClosest(el, '.fc-event-mirror');
3344
+ !el.closest('.fc-event-mirror');
3247
3345
  }
3248
3346
  isValidDateDownEl(el) {
3249
- return !elementClosest(el, '.fc-event:not(.fc-bg-event)') &&
3250
- !elementClosest(el, '.fc-more-link') && // a "more.." link
3251
- !elementClosest(el, 'a[data-navlink]') && // a clickable nav link
3252
- !elementClosest(el, '.fc-popover'); // hack
3347
+ return !el.closest('.fc-event:not(.fc-bg-event)') &&
3348
+ !el.closest('.fc-more-link') && // a "more.." link
3349
+ !el.closest('a[data-navlink]') && // a clickable nav link
3350
+ !el.closest('.fc-popover'); // hack
3253
3351
  }
3254
3352
  }
3255
3353
 
@@ -4102,6 +4200,9 @@ var FullCalendar = (function (exports) {
4102
4200
  return eventApis;
4103
4201
  }
4104
4202
 
4203
+ function getEventKey(seg) {
4204
+ return seg.eventRange.instance.instanceId;
4205
+ }
4105
4206
  /*
4106
4207
  Specifying nextDayThreshold signals that all-day ranges should be sliced.
4107
4208
  */
@@ -4192,12 +4293,12 @@ var FullCalendar = (function (exports) {
4192
4293
  function hasBgRendering(def) {
4193
4294
  return def.ui.display === 'background' || def.ui.display === 'inverse-background';
4194
4295
  }
4195
- function setElSeg(el, seg) {
4196
- el.fcSeg = seg;
4296
+ function setElEventRange(el, eventRange) {
4297
+ el.fcEventRange = eventRange;
4197
4298
  }
4198
- function getElSeg(el) {
4199
- return el.fcSeg ||
4200
- el.parentNode.fcSeg || // for the harness
4299
+ function getElEventRange(el) {
4300
+ return el.fcEventRange ||
4301
+ el.parentNode.fcEventRange || // for the harness
4201
4302
  null;
4202
4303
  }
4203
4304
  // event ui computation
@@ -4217,7 +4318,7 @@ var FullCalendar = (function (exports) {
4217
4318
  }
4218
4319
  function sortEventSegs(segs, eventOrderSpecs) {
4219
4320
  let objs = segs.map(buildSegCompareObj);
4220
- objs.sort((obj0, obj1) => compareByFieldSpecs(obj0, obj1, eventOrderSpecs));
4321
+ objs.sort((obj0, obj1) => compareByFieldSpecs(obj0, obj1, eventOrderSpecs)); // !!!
4221
4322
  return objs.map((c) => c._seg);
4222
4323
  }
4223
4324
  // returns a object with all primitive props that can be compared
@@ -4230,58 +4331,53 @@ var FullCalendar = (function (exports) {
4230
4331
  return Object.assign(Object.assign(Object.assign({}, eventDef.extendedProps), eventDef), { id: eventDef.publicId, start,
4231
4332
  end, duration: end - start, allDay: Number(eventDef.allDay), _seg: seg });
4232
4333
  }
4233
- function computeSegDraggable(seg, context) {
4334
+ function computeEventRangeDraggable(eventRange, context) {
4234
4335
  let { pluginHooks } = context;
4235
4336
  let transformers = pluginHooks.isDraggableTransformers;
4236
- let { def, ui } = seg.eventRange;
4337
+ let { def, ui } = eventRange;
4237
4338
  let val = ui.startEditable;
4238
4339
  for (let transformer of transformers) {
4239
4340
  val = transformer(val, def, ui, context);
4240
4341
  }
4241
4342
  return val;
4242
4343
  }
4243
- function computeSegStartResizable(seg, context) {
4244
- return seg.isStart && seg.eventRange.ui.durationEditable && context.options.eventResizableFromStart;
4245
- }
4246
- function computeSegEndResizable(seg, context) {
4247
- return seg.isEnd && seg.eventRange.ui.durationEditable;
4248
- }
4249
- function buildSegTimeText(seg, timeFormat, context, defaultDisplayEventTime, // defaults to true
4250
- defaultDisplayEventEnd, // defaults to true
4251
- startOverride, endOverride) {
4252
- let { dateEnv, options } = context;
4344
+ /*
4345
+ slicedStart/slicedEnd are optionally supplied to signal where breaks occur in view-specific segment
4346
+ a better approach is to always slice with dates and always supply this argument,
4347
+ however, daygrid only slices by row/col
4348
+ */
4349
+ function buildEventRangeTimeText(timeFormat, eventRange, // timed/whole-day span
4350
+ slicedStart, // view-sliced timed/whole-day span
4351
+ slicedEnd, // view-sliced timed/whole-day span
4352
+ isStart, isEnd, context, defaultDisplayEventTime = true, defaultDisplayEventEnd = true) {
4353
+ const { dateEnv, options } = context;
4354
+ const { def, instance } = eventRange;
4253
4355
  let { displayEventTime, displayEventEnd } = options;
4254
- let eventDef = seg.eventRange.def;
4255
- let eventInstance = seg.eventRange.instance;
4256
4356
  if (displayEventTime == null) {
4257
4357
  displayEventTime = defaultDisplayEventTime !== false;
4258
4358
  }
4259
4359
  if (displayEventEnd == null) {
4260
4360
  displayEventEnd = defaultDisplayEventEnd !== false;
4261
4361
  }
4262
- let wholeEventStart = eventInstance.range.start;
4263
- let wholeEventEnd = eventInstance.range.end;
4264
- let segStart = startOverride || seg.start || seg.eventRange.range.start;
4265
- let segEnd = endOverride || seg.end || seg.eventRange.range.end;
4266
- let isStartDay = startOfDay(wholeEventStart).valueOf() === startOfDay(segStart).valueOf();
4267
- let isEndDay = startOfDay(addMs(wholeEventEnd, -1)).valueOf() === startOfDay(addMs(segEnd, -1)).valueOf();
4268
- if (displayEventTime && !eventDef.allDay && (isStartDay || isEndDay)) {
4269
- segStart = isStartDay ? wholeEventStart : segStart;
4270
- segEnd = isEndDay ? wholeEventEnd : segEnd;
4271
- if (displayEventEnd && eventDef.hasEnd) {
4272
- return dateEnv.formatRange(segStart, segEnd, timeFormat, {
4273
- forcedStartTzo: startOverride ? null : eventInstance.forcedStartTzo,
4274
- forcedEndTzo: endOverride ? null : eventInstance.forcedEndTzo,
4362
+ const startDate = (!isStart && slicedStart) ? slicedStart : eventRange.instance.range.start;
4363
+ const endDate = (!isEnd && slicedEnd) ? slicedEnd : eventRange.instance.range.end;
4364
+ if (displayEventTime && !def.allDay) {
4365
+ if (displayEventEnd && (isStart || isEnd) && def.hasEnd) {
4366
+ return dateEnv.formatRange(startDate, endDate, timeFormat, {
4367
+ forcedStartTzo: isStart ? instance.forcedStartTzo : null,
4368
+ forcedEndTzo: isEnd ? instance.forcedEndTzo : null,
4369
+ });
4370
+ }
4371
+ if (isStart) {
4372
+ return dateEnv.format(startDate, timeFormat, {
4373
+ forcedTzo: instance.forcedStartTzo,
4275
4374
  });
4276
4375
  }
4277
- return dateEnv.format(segStart, timeFormat, {
4278
- forcedTzo: startOverride ? null : eventInstance.forcedStartTzo, // nooooo, same
4279
- });
4280
4376
  }
4281
4377
  return '';
4282
4378
  }
4283
- function getSegMeta(seg, todayRange, nowDate) {
4284
- let segRange = seg.eventRange.range;
4379
+ function getEventRangeMeta(eventRange, todayRange, nowDate) {
4380
+ let segRange = eventRange.range;
4285
4381
  return {
4286
4382
  isPast: segRange.end <= (nowDate || todayRange.start),
4287
4383
  isFuture: segRange.start >= (nowDate || todayRange.end),
@@ -4331,8 +4427,8 @@ var FullCalendar = (function (exports) {
4331
4427
  : `${eventRange.def.defId}:${eventRange.range.start.toISOString()}`;
4332
4428
  // inverse-background events don't have specific instances. TODO: better solution
4333
4429
  }
4334
- function getSegAnchorAttrs(seg, context) {
4335
- let { def, instance } = seg.eventRange;
4430
+ function getEventRangeAnchorAttrs(eventRange, context) {
4431
+ let { def, instance } = eventRange;
4336
4432
  let { url } = def;
4337
4433
  if (url) {
4338
4434
  return { href: url };
@@ -4357,7 +4453,6 @@ var FullCalendar = (function (exports) {
4357
4453
  });
4358
4454
  });
4359
4455
  }
4360
- return {};
4361
4456
  }
4362
4457
 
4363
4458
  const STANDARD_PROPS = {
@@ -4825,719 +4920,254 @@ var FullCalendar = (function (exports) {
4825
4920
  }
4826
4921
  }
4827
4922
 
4828
- class ContentInjector extends BaseComponent {
4829
- constructor() {
4830
- super(...arguments);
4831
- this.id = guid();
4832
- this.queuedDomNodes = [];
4833
- this.currentDomNodes = [];
4834
- this.handleEl = (el) => {
4835
- const { options } = this.context;
4836
- const { generatorName } = this.props;
4837
- if (!options.customRenderingReplaces || !hasCustomRenderingHandler(generatorName, options)) {
4838
- this.updateElRef(el);
4839
- }
4840
- };
4841
- this.updateElRef = (el) => {
4842
- if (this.props.elRef) {
4843
- setRef(this.props.elRef, el);
4844
- }
4923
+ function doCoordRangesIntersect(r0, r1) {
4924
+ return r0.end > r1.start && r0.start < r1.end;
4925
+ }
4926
+ function intersectCoordRanges(r0, r1) {
4927
+ const start = Math.max(r0.start, r1.start);
4928
+ const end = Math.min(r0.end, r1.end);
4929
+ if (start < end) {
4930
+ return {
4931
+ start,
4932
+ end,
4933
+ isStart: r0.isStart && start === r0.start,
4934
+ isEnd: r0.isEnd && end === r0.end,
4845
4935
  };
4846
4936
  }
4847
- render() {
4848
- const { props, context } = this;
4849
- const { options } = context;
4850
- const { customGenerator, defaultGenerator, renderProps } = props;
4851
- const attrs = buildElAttrs(props, [], this.handleEl);
4852
- let useDefault = false;
4853
- let innerContent;
4854
- let queuedDomNodes = [];
4855
- let currentGeneratorMeta;
4856
- if (customGenerator != null) {
4857
- const customGeneratorRes = typeof customGenerator === 'function' ?
4858
- customGenerator(renderProps, _) :
4859
- customGenerator;
4860
- if (customGeneratorRes === true) {
4861
- useDefault = true;
4937
+ }
4938
+ function joinCoordRanges(r0, r1) {
4939
+ return {
4940
+ start: Math.min(r0.start, r1.start),
4941
+ end: Math.max(r0.end, r1.end),
4942
+ };
4943
+ }
4944
+ function getCoordRangeEnd(r) {
4945
+ return r.end;
4946
+ }
4947
+ // { eventRange }
4948
+ // -------------------------------------------------------------------------------------------------
4949
+ function computeEarliestStart(segs) {
4950
+ return segs.reduce(pickEarliestStart).eventRange.range.start;
4951
+ }
4952
+ function computeLatestEnd(segs) {
4953
+ return segs.reduce(pickLatestEnd).eventRange.range.end;
4954
+ }
4955
+ function pickEarliestStart(r0, r1) {
4956
+ return r0.eventRange.range.start < r1.eventRange.range.start ? r0 : r1;
4957
+ }
4958
+ function pickLatestEnd(r0, r1) {
4959
+ return r0.eventRange.range.end > r1.eventRange.range.end ? r0 : r1;
4960
+ }
4961
+
4962
+ class SegHierarchy {
4963
+ constructor(segs, getSegThickness = (seg) => {
4964
+ return 1;
4965
+ }, strictOrder = false, // HACK
4966
+ maxCoord, maxDepth, hiddenConsumes = false, // hidden segs also hide the touchingPlacement?
4967
+ allowSlicing = false) {
4968
+ this.getSegThickness = getSegThickness;
4969
+ this.strictOrder = strictOrder;
4970
+ this.maxCoord = maxCoord;
4971
+ this.maxDepth = maxDepth;
4972
+ this.hiddenConsumes = hiddenConsumes;
4973
+ this.allowSlicing = allowSlicing;
4974
+ this.placementsByLevel = [];
4975
+ this.levelCoords = []; // parallel with placementsByLevel
4976
+ this.hiddenSegs = [];
4977
+ for (const seg of segs) {
4978
+ this.insertSeg(seg, this.getSegThickness(seg));
4979
+ }
4980
+ }
4981
+ insertSeg(seg, segThickness, isSlice) {
4982
+ if (segThickness != null) {
4983
+ const insertion = this.findInsertion(seg, segThickness);
4984
+ if (this.isInsertionValid(insertion, segThickness)) {
4985
+ this.insertSegAt(seg, insertion, segThickness, isSlice);
4862
4986
  }
4863
4987
  else {
4864
- const isObject = customGeneratorRes && typeof customGeneratorRes === 'object'; // non-null
4865
- if (isObject && ('html' in customGeneratorRes)) {
4866
- attrs.dangerouslySetInnerHTML = { __html: customGeneratorRes.html };
4867
- }
4868
- else if (isObject && ('domNodes' in customGeneratorRes)) {
4869
- queuedDomNodes = Array.prototype.slice.call(customGeneratorRes.domNodes);
4870
- }
4871
- else if (isObject
4872
- ? t(customGeneratorRes) // vdom node
4873
- : typeof customGeneratorRes !== 'function' // primitive value (like string or number)
4874
- ) {
4875
- // use in vdom
4876
- innerContent = customGeneratorRes;
4988
+ const { touchingPlacement } = insertion;
4989
+ // is there a touching-seg?
4990
+ if (touchingPlacement) {
4991
+ // should we hide or reslice touchingPlacement?
4992
+ if (this.hiddenConsumes && !touchingPlacement.isZombie) {
4993
+ touchingPlacement.isZombie = true; // edit in-place
4994
+ this.hiddenSegs.push(touchingPlacement);
4995
+ if (this.allowSlicing) {
4996
+ const newSeg = Object.assign({}, touchingPlacement); // copy
4997
+ // slice touchingPlacement in-place
4998
+ Object.assign(touchingPlacement, intersectCoordRanges(touchingPlacement, seg));
4999
+ touchingPlacement.isSlice = true;
5000
+ // try to reinsert touchingPlacement's seg
5001
+ this.splitSeg(newSeg, touchingPlacement.thickness, touchingPlacement);
5002
+ }
5003
+ }
5004
+ // record seg as hidden, potentially split by touchingPlacement
5005
+ if (this.allowSlicing) {
5006
+ this.hiddenSegs.push(Object.assign(Object.assign({}, seg), intersectCoordRanges(seg, touchingPlacement)));
5007
+ this.splitSeg(seg, segThickness, touchingPlacement);
5008
+ }
5009
+ else {
5010
+ this.hiddenSegs.push(seg);
5011
+ }
5012
+ // not touching anything
4877
5013
  }
4878
5014
  else {
4879
- // an exotic object for handleCustomRendering
4880
- currentGeneratorMeta = customGeneratorRes;
5015
+ this.hiddenSegs.push(seg);
4881
5016
  }
4882
5017
  }
4883
5018
  }
4884
- else {
4885
- useDefault = !hasCustomRenderingHandler(props.generatorName, options);
4886
- }
4887
- if (useDefault && defaultGenerator) {
4888
- innerContent = defaultGenerator(renderProps);
4889
- }
4890
- this.queuedDomNodes = queuedDomNodes;
4891
- this.currentGeneratorMeta = currentGeneratorMeta;
4892
- return _(props.elTag, attrs, innerContent);
4893
5019
  }
4894
- componentDidMount() {
4895
- this.applyQueueudDomNodes();
4896
- this.triggerCustomRendering(true);
5020
+ /*
5021
+ TODO: inline?
5022
+ */
5023
+ isInsertionValid(insertion, thickness) {
5024
+ return (this.maxCoord == null || insertion.levelCoord + thickness <= this.maxCoord) &&
5025
+ (this.maxDepth == null || insertion.depth < this.maxDepth);
4897
5026
  }
4898
- componentDidUpdate() {
4899
- this.applyQueueudDomNodes();
4900
- this.triggerCustomRendering(true);
5027
+ /*
5028
+ Does not add the portion that intersects with barrier to hiddenSegs
5029
+ */
5030
+ splitSeg(seg, segThickness, barrier) {
5031
+ // any leftover seg on the start-side of the barrier?
5032
+ if (seg.start < barrier.start) {
5033
+ this.insertSeg(Object.assign(Object.assign({}, seg), { end: barrier.start, isEnd: false }), segThickness,
5034
+ /* isSlice = */ true);
5035
+ }
5036
+ // any leftover seg on the end-side of the barrier?
5037
+ if (seg.end > barrier.end) {
5038
+ this.insertSeg(Object.assign(Object.assign({}, seg), { start: barrier.end, isStart: false }), segThickness,
5039
+ /* isSlice = */ true);
5040
+ }
4901
5041
  }
4902
- componentWillUnmount() {
4903
- this.triggerCustomRendering(false); // TODO: different API for removal?
5042
+ /*
5043
+ TODO: inline?
5044
+ */
5045
+ insertSegAt(seg, insertion, segThickness, isSlice) {
5046
+ const placement = Object.assign(Object.assign({}, seg), { thickness: segThickness, depth: insertion.depth, isSlice: isSlice || seg.isSlice || false, isZombie: false });
5047
+ if (insertion.lateralIndex === -1) {
5048
+ // create a new level
5049
+ insertAt(this.placementsByLevel, insertion.levelIndex, [placement]);
5050
+ insertAt(this.levelCoords, insertion.levelIndex, insertion.levelCoord);
5051
+ }
5052
+ else {
5053
+ // insert into existing level
5054
+ insertAt(this.placementsByLevel[insertion.levelIndex], insertion.lateralIndex, placement);
5055
+ }
4904
5056
  }
4905
- triggerCustomRendering(isActive) {
4906
- var _a;
4907
- const { props, context } = this;
4908
- const { handleCustomRendering, customRenderingMetaMap } = context.options;
4909
- if (handleCustomRendering) {
4910
- const generatorMeta = (_a = this.currentGeneratorMeta) !== null && _a !== void 0 ? _a : customRenderingMetaMap === null || customRenderingMetaMap === void 0 ? void 0 : customRenderingMetaMap[props.generatorName];
4911
- if (generatorMeta) {
4912
- handleCustomRendering(Object.assign(Object.assign({ id: this.id, isActive, containerEl: this.base, reportNewContainerEl: this.updateElRef, // front-end framework tells us about new container els
4913
- generatorMeta }, props), { elClasses: (props.elClasses || []).filter(isTruthy) }));
5057
+ /*
5058
+ Ignores limits
5059
+ */
5060
+ findInsertion(seg, segThickness) {
5061
+ let { placementsByLevel, levelCoords } = this;
5062
+ let levelCnt = placementsByLevel.length;
5063
+ let candidateCoord = 0; // a tentative levelCoord for seg's placement
5064
+ let touchingPlacement;
5065
+ let touchingLevelIndex;
5066
+ let depth = 0;
5067
+ // iterate through existing levels
5068
+ for (let currentLevelIndex = 0; currentLevelIndex < levelCnt; currentLevelIndex += 1) {
5069
+ const currentLevelCoord = levelCoords[currentLevelIndex];
5070
+ // if the current level has cleared seg's bottom coord, we have found a good empty space and can stop.
5071
+ // if strictOrder, keep finding more lateral intersections.
5072
+ if (!this.strictOrder && currentLevelCoord >= candidateCoord + segThickness) {
5073
+ break;
5074
+ }
5075
+ let currentLevelSegs = placementsByLevel[currentLevelIndex];
5076
+ let currentSeg;
5077
+ // finds the first possible entry that seg could intersect with
5078
+ let [searchIndex, isExact] = binarySearch(currentLevelSegs, seg.start, getCoordRangeEnd); // find first entry after seg's end
5079
+ let lateralIndex = searchIndex + isExact; // if exact match (which doesn't collide), go to next one
5080
+ // loop through entries that horizontally intersect
5081
+ while ((currentSeg = currentLevelSegs[lateralIndex]) && // but not past the whole entry list
5082
+ currentSeg.start < seg.end // and not entirely past seg
5083
+ ) {
5084
+ let currentEntryBottom = currentLevelCoord + currentSeg.thickness;
5085
+ // intersects into the top of the candidate?
5086
+ if (currentEntryBottom > candidateCoord) {
5087
+ // push it downward so doesn't 'vertically' intersect anymore
5088
+ candidateCoord = currentEntryBottom;
5089
+ // tentatively record as touching
5090
+ touchingPlacement = currentSeg;
5091
+ touchingLevelIndex = currentLevelIndex;
5092
+ }
5093
+ // does current entry butt up against top of candidate?
5094
+ // will obviously happen if just intersected, but can also happen if pushed down previously
5095
+ // because intersected with a sibling
5096
+ // TODO: after automated tests hooked up, see if these gate is unnecessary,
5097
+ // we might just be able to do this for ALL intersecting currentEntries (this whole loop)
5098
+ if (currentEntryBottom === candidateCoord) {
5099
+ // accumulate the highest possible depth of the currentLevelSegs that butt up
5100
+ depth = Math.max(depth, currentSeg.depth + 1);
5101
+ }
5102
+ lateralIndex += 1;
5103
+ }
5104
+ }
5105
+ // the destination level will be after touchingPlacement's level. find it
5106
+ // TODO: can reuse work from above?
5107
+ let destLevelIndex = 0;
5108
+ if (touchingPlacement) {
5109
+ destLevelIndex = touchingLevelIndex + 1;
5110
+ while (destLevelIndex < levelCnt && levelCoords[destLevelIndex] < candidateCoord) {
5111
+ destLevelIndex += 1;
4914
5112
  }
4915
5113
  }
5114
+ // if adding to an existing level, find where to insert
5115
+ // TODO: can reuse work from above?
5116
+ let destLateralIndex = -1;
5117
+ if (destLevelIndex < levelCnt && levelCoords[destLevelIndex] === candidateCoord) {
5118
+ [destLateralIndex] = binarySearch(placementsByLevel[destLevelIndex], seg.end, getCoordRangeEnd);
5119
+ }
5120
+ return {
5121
+ touchingPlacement,
5122
+ levelCoord: candidateCoord,
5123
+ levelIndex: destLevelIndex,
5124
+ lateralIndex: destLateralIndex,
5125
+ depth,
5126
+ };
4916
5127
  }
4917
- applyQueueudDomNodes() {
4918
- const { queuedDomNodes, currentDomNodes } = this;
4919
- const el = this.base;
4920
- if (!isArraysEqual(queuedDomNodes, currentDomNodes)) {
4921
- currentDomNodes.forEach(removeElement);
4922
- for (let newNode of queuedDomNodes) {
4923
- el.appendChild(newNode);
5128
+ traverseSegs(handler) {
5129
+ const { placementsByLevel, levelCoords } = this;
5130
+ for (let i = 0; i < placementsByLevel.length; i++) {
5131
+ const placements = placementsByLevel[i];
5132
+ const levelCoord = levelCoords[i];
5133
+ for (const placement of placements) {
5134
+ if (!placement.isZombie) {
5135
+ handler(placement, levelCoord);
5136
+ }
4924
5137
  }
4925
- this.currentDomNodes = queuedDomNodes;
4926
5138
  }
4927
5139
  }
4928
5140
  }
4929
- ContentInjector.addPropsEquality({
4930
- elClasses: isArraysEqual,
4931
- elStyle: isPropsEqual,
4932
- elAttrs: isNonHandlerPropsEqual,
4933
- renderProps: isPropsEqual,
4934
- });
4935
- // Util
4936
5141
  /*
4937
- Does UI-framework provide custom way of rendering that does not use Preact VDOM
4938
- AND does the calendar's options define custom rendering?
4939
- AKA. Should we NOT render the default content?
5142
+ Returns groups with entries sorted by input order
4940
5143
  */
4941
- function hasCustomRenderingHandler(generatorName, options) {
4942
- var _a;
4943
- return Boolean(options.handleCustomRendering &&
4944
- generatorName &&
4945
- ((_a = options.customRenderingMetaMap) === null || _a === void 0 ? void 0 : _a[generatorName]));
4946
- }
4947
- function buildElAttrs(props, extraClassNames, elRef) {
4948
- const attrs = Object.assign(Object.assign({}, props.elAttrs), { ref: elRef });
4949
- if (props.elClasses || extraClassNames) {
4950
- attrs.className = (props.elClasses || [])
4951
- .concat(extraClassNames || [])
4952
- .concat(attrs.className || [])
4953
- .filter(Boolean)
4954
- .join(' ');
4955
- }
4956
- if (props.elStyle) {
4957
- attrs.style = props.elStyle;
4958
- }
4959
- return attrs;
4960
- }
4961
- function isTruthy(val) {
4962
- return Boolean(val);
4963
- }
4964
-
4965
- const RenderId = createContext(0);
4966
-
4967
- class ContentContainer extends b {
4968
- constructor() {
4969
- super(...arguments);
4970
- this.InnerContent = InnerContentInjector.bind(undefined, this);
4971
- this.handleEl = (el) => {
4972
- this.el = el;
4973
- if (this.props.elRef) {
4974
- setRef(this.props.elRef, el);
4975
- if (el && this.didMountMisfire) {
4976
- this.componentDidMount();
4977
- }
4978
- }
5144
+ function groupIntersectingSegs(segs) {
5145
+ let mergedGroups = [];
5146
+ for (let seg of segs) {
5147
+ let filteredGroups = [];
5148
+ let hungryGroup = {
5149
+ segs: [seg],
5150
+ start: seg.start,
5151
+ end: seg.end,
4979
5152
  };
4980
- }
4981
- render() {
4982
- const { props } = this;
4983
- const generatedClassNames = generateClassNames(props.classNameGenerator, props.renderProps);
4984
- if (props.children) {
4985
- const elAttrs = buildElAttrs(props, generatedClassNames, this.handleEl);
4986
- const children = props.children(this.InnerContent, props.renderProps, elAttrs);
4987
- if (props.elTag) {
4988
- return _(props.elTag, elAttrs, children);
5153
+ for (let mergedGroup of mergedGroups) {
5154
+ if (doCoordRangesIntersect(mergedGroup, hungryGroup)) {
5155
+ hungryGroup = Object.assign(Object.assign({}, joinCoordRanges(mergedGroup, hungryGroup)), { segs: mergedGroup.segs.concat(hungryGroup.segs) // keep preexisting mergedGroup's items first. maintains order
5156
+ });
4989
5157
  }
4990
5158
  else {
4991
- return children;
5159
+ filteredGroups.push(mergedGroup);
4992
5160
  }
4993
5161
  }
4994
- else {
4995
- return _((ContentInjector), Object.assign(Object.assign({}, props), { elRef: this.handleEl, elTag: props.elTag || 'div', elClasses: (props.elClasses || []).concat(generatedClassNames), renderId: this.context }));
4996
- }
5162
+ filteredGroups.push(hungryGroup);
5163
+ mergedGroups = filteredGroups;
4997
5164
  }
4998
- componentDidMount() {
4999
- var _a, _b;
5000
- if (this.el) {
5001
- (_b = (_a = this.props).didMount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el }));
5002
- }
5003
- else {
5004
- this.didMountMisfire = true;
5005
- }
5006
- }
5007
- componentWillUnmount() {
5008
- var _a, _b;
5009
- (_b = (_a = this.props).willUnmount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el }));
5010
- }
5011
- }
5012
- ContentContainer.contextType = RenderId;
5013
- function InnerContentInjector(containerComponent, props) {
5014
- const parentProps = containerComponent.props;
5015
- return _((ContentInjector), Object.assign({ renderProps: parentProps.renderProps, generatorName: parentProps.generatorName, customGenerator: parentProps.customGenerator, defaultGenerator: parentProps.defaultGenerator, renderId: containerComponent.context }, props));
5016
- }
5017
- // Utils
5018
- function generateClassNames(classNameGenerator, renderProps) {
5019
- const classNames = typeof classNameGenerator === 'function' ?
5020
- classNameGenerator(renderProps) :
5021
- classNameGenerator || [];
5022
- return typeof classNames === 'string' ? [classNames] : classNames;
5023
- }
5024
-
5025
- const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
5026
- class DayCellContainer extends BaseComponent {
5027
- constructor() {
5028
- super(...arguments);
5029
- this.refineRenderProps = memoizeObjArg(refineRenderProps);
5030
- }
5031
- render() {
5032
- let { props, context } = this;
5033
- let { options } = context;
5034
- let renderProps = this.refineRenderProps({
5035
- date: props.date,
5036
- dateProfile: props.dateProfile,
5037
- todayRange: props.todayRange,
5038
- isMonthStart: props.isMonthStart || false,
5039
- showDayNumber: props.showDayNumber,
5040
- extraRenderProps: props.extraRenderProps,
5041
- viewApi: context.viewApi,
5042
- dateEnv: context.dateEnv,
5043
- monthStartFormat: options.monthStartFormat,
5044
- });
5045
- return (_(ContentContainer, Object.assign({}, props /* includes children */, { elClasses: [
5046
- ...getDayClassNames(renderProps, context.theme),
5047
- ...(props.elClasses || []),
5048
- ], elAttrs: Object.assign(Object.assign({}, props.elAttrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator:
5049
- // don't use custom classNames if disabled
5050
- renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount })));
5051
- }
5052
- }
5053
- function hasCustomDayCellContent(options) {
5054
- return Boolean(options.dayCellContent || hasCustomRenderingHandler('dayCellContent', options));
5055
- }
5056
- function refineRenderProps(raw) {
5057
- let { date, dateEnv, dateProfile, isMonthStart } = raw;
5058
- let dayMeta = getDateMeta(date, raw.todayRange, null, dateProfile);
5059
- let dayNumberText = raw.showDayNumber ? (dateEnv.format(date, isMonthStart ? raw.monthStartFormat : DAY_NUM_FORMAT)) : '';
5060
- return Object.assign(Object.assign(Object.assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { isMonthStart,
5061
- dayNumberText }), raw.extraRenderProps);
5062
- }
5063
-
5064
- const PADDING_FROM_VIEWPORT = 10;
5065
- class Popover extends BaseComponent {
5066
- constructor() {
5067
- super(...arguments);
5068
- this.state = {
5069
- titleId: getUniqueDomId(),
5070
- };
5071
- this.handleRootEl = (el) => {
5072
- this.rootEl = el;
5073
- if (this.props.elRef) {
5074
- setRef(this.props.elRef, el);
5075
- }
5076
- };
5077
- // Triggered when the user clicks *anywhere* in the document, for the autoHide feature
5078
- this.handleDocumentMouseDown = (ev) => {
5079
- // only hide the popover if the click happened outside the popover
5080
- const target = getEventTargetViaRoot(ev);
5081
- if (!this.rootEl.contains(target)) {
5082
- this.handleCloseClick();
5083
- }
5084
- };
5085
- this.handleDocumentKeyDown = (ev) => {
5086
- if (ev.key === 'Escape') {
5087
- this.handleCloseClick();
5088
- }
5089
- };
5090
- this.handleCloseClick = () => {
5091
- let { onClose } = this.props;
5092
- if (onClose) {
5093
- onClose();
5094
- }
5095
- };
5096
- }
5097
- render() {
5098
- let { theme, options } = this.context;
5099
- let { props, state } = this;
5100
- let classNames = [
5101
- 'fc-popover',
5102
- theme.getClass('popover'),
5103
- ].concat(props.extraClassNames || []);
5104
- return j(_("div", Object.assign({}, props.extraAttrs, { id: props.id, className: classNames.join(' '), "aria-labelledby": state.titleId, ref: this.handleRootEl }),
5105
- _("div", { className: 'fc-popover-header ' + theme.getClass('popoverHeader') },
5106
- _("span", { className: "fc-popover-title", id: state.titleId }, props.title),
5107
- _("span", { className: 'fc-popover-close ' + theme.getIconClass('close'), title: options.closeHint, onClick: this.handleCloseClick })),
5108
- _("div", { className: 'fc-popover-body ' + theme.getClass('popoverContent') }, props.children)), props.parentEl);
5109
- }
5110
- componentDidMount() {
5111
- document.addEventListener('mousedown', this.handleDocumentMouseDown);
5112
- document.addEventListener('keydown', this.handleDocumentKeyDown);
5113
- this.updateSize();
5114
- }
5115
- componentWillUnmount() {
5116
- document.removeEventListener('mousedown', this.handleDocumentMouseDown);
5117
- document.removeEventListener('keydown', this.handleDocumentKeyDown);
5118
- }
5119
- updateSize() {
5120
- let { isRtl } = this.context;
5121
- let { alignmentEl, alignGridTop } = this.props;
5122
- let { rootEl } = this;
5123
- let alignmentRect = computeClippedClientRect(alignmentEl);
5124
- if (alignmentRect) {
5125
- let popoverDims = rootEl.getBoundingClientRect();
5126
- if (alignGridTop) {
5127
- throw new Error('alignGridTop not supported yet');
5128
- }
5129
- // position relative to viewport
5130
- let popoverTop = alignGridTop
5131
- ? elementClosest(alignmentEl, '.fc-scrollgrid').getBoundingClientRect().top // BAD!!!
5132
- : alignmentRect.top;
5133
- let popoverLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left;
5134
- // constrain
5135
- popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT);
5136
- popoverLeft = Math.min(popoverLeft, document.documentElement.clientWidth - PADDING_FROM_VIEWPORT - popoverDims.width);
5137
- popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT);
5138
- let origin = rootEl.offsetParent.getBoundingClientRect();
5139
- applyStyle(rootEl, {
5140
- top: popoverTop - origin.top,
5141
- left: popoverLeft - origin.left,
5142
- });
5143
- }
5144
- }
5145
- }
5146
-
5147
- class MorePopover extends DateComponent {
5148
- constructor() {
5149
- super(...arguments);
5150
- this.handleRootEl = (rootEl) => {
5151
- this.rootEl = rootEl;
5152
- if (rootEl) {
5153
- this.context.registerInteractiveComponent(this, {
5154
- el: rootEl,
5155
- useEventCenter: false,
5156
- });
5157
- }
5158
- else {
5159
- this.context.unregisterInteractiveComponent(this);
5160
- }
5161
- };
5162
- }
5163
- render() {
5164
- let { options, dateEnv } = this.context;
5165
- let { props } = this;
5166
- let { startDate, todayRange, dateProfile } = props;
5167
- let title = dateEnv.format(startDate, options.dayPopoverFormat);
5168
- return (_(DayCellContainer, { elRef: this.handleRootEl, date: startDate, dateProfile: dateProfile, todayRange: todayRange }, (InnerContent, renderProps, elAttrs) => (_(Popover, { elRef: elAttrs.ref, id: props.id, title: title, extraClassNames: ['fc-more-popover'].concat(elAttrs.className || []), extraAttrs: elAttrs /* TODO: make these time-based when not whole-day? */, parentEl: props.parentEl, alignmentEl: props.alignmentEl, alignGridTop: props.alignGridTop, onClose: props.onClose },
5169
- hasCustomDayCellContent(options) && (_(InnerContent, { elTag: "div", elClasses: ['fc-more-popover-misc'] })),
5170
- props.children))));
5171
- }
5172
- queryHit(positionLeft, positionTop, elWidth, elHeight) {
5173
- let { rootEl, props } = this;
5174
- if (positionLeft >= 0 && positionLeft < elWidth &&
5175
- positionTop >= 0 && positionTop < elHeight) {
5176
- return {
5177
- dateProfile: props.dateProfile,
5178
- dateSpan: Object.assign({ allDay: !props.forceTimed, range: {
5179
- start: props.startDate,
5180
- end: props.endDate,
5181
- } }, props.extraDateSpan),
5182
- dayEl: rootEl,
5183
- rect: {
5184
- left: 0,
5185
- top: 0,
5186
- right: elWidth,
5187
- bottom: elHeight,
5188
- },
5189
- layer: 1, // important when comparing with hits from other components
5190
- };
5191
- }
5192
- return null;
5193
- }
5194
- }
5195
-
5196
- class MoreLinkContainer extends BaseComponent {
5197
- constructor() {
5198
- super(...arguments);
5199
- this.state = {
5200
- isPopoverOpen: false,
5201
- popoverId: getUniqueDomId(),
5202
- };
5203
- this.handleLinkEl = (linkEl) => {
5204
- this.linkEl = linkEl;
5205
- if (this.props.elRef) {
5206
- setRef(this.props.elRef, linkEl);
5207
- }
5208
- };
5209
- this.handleClick = (ev) => {
5210
- let { props, context } = this;
5211
- let { moreLinkClick } = context.options;
5212
- let date = computeRange(props).start;
5213
- function buildPublicSeg(seg) {
5214
- let { def, instance, range } = seg.eventRange;
5215
- return {
5216
- event: new EventImpl(context, def, instance),
5217
- start: context.dateEnv.toDate(range.start),
5218
- end: context.dateEnv.toDate(range.end),
5219
- isStart: seg.isStart,
5220
- isEnd: seg.isEnd,
5221
- };
5222
- }
5223
- if (typeof moreLinkClick === 'function') {
5224
- moreLinkClick = moreLinkClick({
5225
- date,
5226
- allDay: Boolean(props.allDayDate),
5227
- allSegs: props.segs.map(buildPublicSeg),
5228
- hiddenSegs: props.hiddenSegs.map(buildPublicSeg),
5229
- jsEvent: ev,
5230
- view: context.viewApi,
5231
- });
5232
- }
5233
- if (!moreLinkClick || moreLinkClick === 'popover') {
5234
- this.setState({ isPopoverOpen: true });
5235
- }
5236
- else if (typeof moreLinkClick === 'string') { // a view name
5237
- context.calendarApi.zoomTo(date, moreLinkClick);
5238
- }
5239
- };
5240
- this.handlePopoverClose = () => {
5241
- this.setState({ isPopoverOpen: false });
5242
- };
5243
- }
5244
- render() {
5245
- let { props, state } = this;
5246
- return (_(ViewContextType.Consumer, null, (context) => {
5247
- let { viewApi, options, calendarApi } = context;
5248
- let { moreLinkText } = options;
5249
- let moreCnt = props.hiddenSegs.length;
5250
- let range = computeRange(props);
5251
- let text = typeof moreLinkText === 'function' // TODO: eventually use formatWithOrdinals
5252
- ? moreLinkText.call(calendarApi, moreCnt)
5253
- : `+${moreCnt} ${moreLinkText}`;
5254
- let hint = formatWithOrdinals(options.moreLinkHint, [moreCnt], text);
5255
- let renderProps = {
5256
- num: moreCnt,
5257
- shortText: `+${moreCnt}`,
5258
- text,
5259
- view: viewApi,
5260
- };
5261
- return (_(k$1, null,
5262
- Boolean(moreCnt) && (_(ContentContainer, { elTag: props.elTag || 'a', elRef: this.handleLinkEl, elClasses: [
5263
- ...(props.elClasses || []),
5264
- 'fc-more-link',
5265
- ], elStyle: props.elStyle, elAttrs: Object.assign(Object.assign(Object.assign({}, props.elAttrs), createAriaClickAttrs(this.handleClick)), { title: hint, 'aria-expanded': state.isPopoverOpen, 'aria-controls': state.isPopoverOpen ? state.popoverId : '' }), renderProps: renderProps, generatorName: "moreLinkContent", customGenerator: options.moreLinkContent, defaultGenerator: props.defaultGenerator || renderMoreLinkInner, classNameGenerator: options.moreLinkClassNames, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, props.children)),
5266
- state.isPopoverOpen && (_(MorePopover, { id: state.popoverId, startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: props.extraDateSpan, parentEl: this.parentEl, alignmentEl: props.alignmentElRef ?
5267
- props.alignmentElRef.current :
5268
- this.linkEl, alignGridTop: props.alignGridTop, forceTimed: props.forceTimed, onClose: this.handlePopoverClose }, props.popoverContent()))));
5269
- }));
5270
- }
5271
- componentDidMount() {
5272
- this.updateParentEl();
5273
- }
5274
- componentDidUpdate() {
5275
- this.updateParentEl();
5276
- }
5277
- updateParentEl() {
5278
- if (this.linkEl) {
5279
- this.parentEl = elementClosest(this.linkEl, '.fc-view-harness'); // HACK. reconsider
5280
- }
5281
- }
5282
- }
5283
- function renderMoreLinkInner(props) {
5284
- return props.text;
5285
- }
5286
- function computeRange(props) {
5287
- if (props.allDayDate) {
5288
- return {
5289
- start: props.allDayDate,
5290
- end: addDays(props.allDayDate, 1),
5291
- };
5292
- }
5293
- return {
5294
- start: computeEarliestSegStart(props.hiddenSegs),
5295
- end: computeLatestSegEnd(props.hiddenSegs),
5296
- };
5297
- }
5298
- function computeEarliestSegStart(segs) {
5299
- return segs.reduce(pickEarliestStart).eventRange.range.start;
5300
- }
5301
- function pickEarliestStart(seg0, seg1) {
5302
- return seg0.eventRange.range.start < seg1.eventRange.range.start ? seg0 : seg1;
5303
- }
5304
- function computeLatestSegEnd(segs) {
5305
- return segs.reduce(pickLatestEnd).eventRange.range.end;
5306
- }
5307
- function pickLatestEnd(seg0, seg1) {
5308
- return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1;
5309
- }
5310
-
5311
- class SegHierarchy {
5312
- constructor(getEntryThickness = (entry) => {
5313
- // if no thickness known, assume 1 (if 0, so small it always fits)
5314
- return entry.thickness;
5315
- }) {
5316
- this.getEntryThickness = getEntryThickness;
5317
- // settings
5318
- this.strictOrder = false;
5319
- this.allowReslicing = false;
5320
- this.maxCoord = -1; // -1 means no max
5321
- this.maxStackCnt = -1; // -1 means no max
5322
- this.levelCoords = []; // ordered
5323
- this.entriesByLevel = []; // parallel with levelCoords
5324
- this.stackCnts = {}; // TODO: use better technique!?
5325
- }
5326
- addSegs(inputs) {
5327
- let hiddenEntries = [];
5328
- for (let input of inputs) {
5329
- this.insertEntry(input, hiddenEntries);
5330
- }
5331
- return hiddenEntries;
5332
- }
5333
- insertEntry(entry, hiddenEntries) {
5334
- let entryThickness = this.getEntryThickness(entry);
5335
- if (entryThickness == null) {
5336
- hiddenEntries.push(entry);
5337
- }
5338
- else {
5339
- let insertion = this.findInsertion(entry, entryThickness);
5340
- if (this.isInsertionValid(insertion, entry, entryThickness)) {
5341
- this.insertEntryAt(entry, insertion);
5342
- }
5343
- else {
5344
- this.handleInvalidInsertion(insertion, entry, hiddenEntries);
5345
- }
5346
- }
5347
- }
5348
- isInsertionValid(insertion, entry, entryThickness) {
5349
- return (this.maxCoord === -1 || insertion.levelCoord + entryThickness <= this.maxCoord) &&
5350
- (this.maxStackCnt === -1 || insertion.stackCnt < this.maxStackCnt);
5351
- }
5352
- handleInvalidInsertion(insertion, entry, hiddenEntries) {
5353
- if (this.allowReslicing && insertion.touchingEntry) {
5354
- const hiddenEntry = Object.assign(Object.assign({}, entry), { span: intersectSpans(entry.span, insertion.touchingEntry.span) });
5355
- hiddenEntries.push(hiddenEntry);
5356
- this.splitEntry(entry, insertion.touchingEntry, hiddenEntries);
5357
- }
5358
- else {
5359
- hiddenEntries.push(entry);
5360
- }
5361
- }
5362
- /*
5363
- Does NOT add what hit the `barrier` into hiddenEntries. Should already be done.
5364
- */
5365
- splitEntry(entry, barrier, hiddenEntries) {
5366
- let entrySpan = entry.span;
5367
- let barrierSpan = barrier.span;
5368
- if (entrySpan.start < barrierSpan.start) {
5369
- this.insertEntry({
5370
- index: entry.index,
5371
- seg: entry.seg,
5372
- thickness: entry.thickness,
5373
- span: { start: entrySpan.start, end: barrierSpan.start },
5374
- }, hiddenEntries);
5375
- }
5376
- if (entrySpan.end > barrierSpan.end) {
5377
- this.insertEntry({
5378
- index: entry.index,
5379
- seg: entry.seg,
5380
- thickness: entry.thickness,
5381
- span: { start: barrierSpan.end, end: entrySpan.end },
5382
- }, hiddenEntries);
5383
- }
5384
- }
5385
- insertEntryAt(entry, insertion) {
5386
- let { entriesByLevel, levelCoords } = this;
5387
- if (insertion.lateral === -1) {
5388
- // create a new level
5389
- insertAt(levelCoords, insertion.level, insertion.levelCoord);
5390
- insertAt(entriesByLevel, insertion.level, [entry]);
5391
- }
5392
- else {
5393
- // insert into existing level
5394
- insertAt(entriesByLevel[insertion.level], insertion.lateral, entry);
5395
- }
5396
- this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt;
5397
- }
5398
- /*
5399
- does not care about limits
5400
- */
5401
- findInsertion(newEntry, newEntryThickness) {
5402
- let { levelCoords, entriesByLevel, strictOrder, stackCnts } = this;
5403
- let levelCnt = levelCoords.length;
5404
- let candidateCoord = 0;
5405
- let touchingLevel = -1;
5406
- let touchingLateral = -1;
5407
- let touchingEntry = null;
5408
- let stackCnt = 0;
5409
- for (let trackingLevel = 0; trackingLevel < levelCnt; trackingLevel += 1) {
5410
- const trackingCoord = levelCoords[trackingLevel];
5411
- // if the current level is past the placed entry, we have found a good empty space and can stop.
5412
- // if strictOrder, keep finding more lateral intersections.
5413
- if (!strictOrder && trackingCoord >= candidateCoord + newEntryThickness) {
5414
- break;
5415
- }
5416
- let trackingEntries = entriesByLevel[trackingLevel];
5417
- let trackingEntry;
5418
- let searchRes = binarySearch(trackingEntries, newEntry.span.start, getEntrySpanEnd); // find first entry after newEntry's end
5419
- let lateralIndex = searchRes[0] + searchRes[1]; // if exact match (which doesn't collide), go to next one
5420
- while ( // loop through entries that horizontally intersect
5421
- (trackingEntry = trackingEntries[lateralIndex]) && // but not past the whole entry list
5422
- trackingEntry.span.start < newEntry.span.end // and not entirely past newEntry
5423
- ) {
5424
- let trackingEntryBottom = trackingCoord + this.getEntryThickness(trackingEntry);
5425
- // intersects into the top of the candidate?
5426
- if (trackingEntryBottom > candidateCoord) {
5427
- candidateCoord = trackingEntryBottom;
5428
- touchingEntry = trackingEntry;
5429
- touchingLevel = trackingLevel;
5430
- touchingLateral = lateralIndex;
5431
- }
5432
- // butts up against top of candidate? (will happen if just intersected as well)
5433
- if (trackingEntryBottom === candidateCoord) {
5434
- // accumulate the highest possible stackCnt of the trackingEntries that butt up
5435
- stackCnt = Math.max(stackCnt, stackCnts[buildEntryKey(trackingEntry)] + 1);
5436
- }
5437
- lateralIndex += 1;
5438
- }
5439
- }
5440
- // the destination level will be after touchingEntry's level. find it
5441
- let destLevel = 0;
5442
- if (touchingEntry) {
5443
- destLevel = touchingLevel + 1;
5444
- while (destLevel < levelCnt && levelCoords[destLevel] < candidateCoord) {
5445
- destLevel += 1;
5446
- }
5447
- }
5448
- // if adding to an existing level, find where to insert
5449
- let destLateral = -1;
5450
- if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) {
5451
- destLateral = binarySearch(entriesByLevel[destLevel], newEntry.span.end, getEntrySpanEnd)[0];
5452
- }
5453
- return {
5454
- touchingLevel,
5455
- touchingLateral,
5456
- touchingEntry,
5457
- stackCnt,
5458
- levelCoord: candidateCoord,
5459
- level: destLevel,
5460
- lateral: destLateral,
5461
- };
5462
- }
5463
- // sorted by levelCoord (lowest to highest)
5464
- toRects() {
5465
- let { entriesByLevel, levelCoords } = this;
5466
- let levelCnt = entriesByLevel.length;
5467
- let rects = [];
5468
- for (let level = 0; level < levelCnt; level += 1) {
5469
- let entries = entriesByLevel[level];
5470
- let levelCoord = levelCoords[level];
5471
- for (let entry of entries) {
5472
- rects.push(Object.assign(Object.assign({}, entry), { thickness: this.getEntryThickness(entry), levelCoord }));
5473
- }
5474
- }
5475
- return rects;
5476
- }
5477
- }
5478
- function getEntrySpanEnd(entry) {
5479
- return entry.span.end;
5480
- }
5481
- /*
5482
- Generates a unique ID whose lifespan is a single run of SegHierarchy, so can be really specific
5483
- without fear of accidentally busting the cache on subsequent rerenders
5484
- */
5485
- function buildEntryKey(entry) {
5486
- return entry.index + ':' + entry.span.start;
5487
- }
5488
- /*
5489
- returns groups with entries sorted by input order
5490
- */
5491
- function groupIntersectingEntries(entries) {
5492
- let merges = [];
5493
- for (let entry of entries) {
5494
- let filteredMerges = [];
5495
- let hungryMerge = {
5496
- span: entry.span,
5497
- entries: [entry],
5498
- };
5499
- for (let merge of merges) {
5500
- if (intersectSpans(merge.span, hungryMerge.span)) {
5501
- hungryMerge = {
5502
- span: joinSpans(merge.span, hungryMerge.span),
5503
- entries: merge.entries.concat(hungryMerge.entries), // keep preexisting merge's items first. maintains order
5504
- };
5505
- }
5506
- else {
5507
- filteredMerges.push(merge);
5508
- }
5509
- }
5510
- filteredMerges.push(hungryMerge);
5511
- merges = filteredMerges;
5512
- }
5513
- return merges.map((merge) => {
5514
- const segs = merge.entries.map(extractEntrySeg);
5515
- return {
5516
- key: buildIsoString(computeEarliestSegStart(segs)),
5517
- span: merge.span,
5518
- segs,
5519
- };
5165
+ return mergedGroups.map((mergedGroup) => {
5166
+ return Object.assign({ key: buildIsoString(computeEarliestStart(segs)) }, mergedGroup);
5520
5167
  });
5521
5168
  }
5522
- function extractEntrySeg(entry) {
5523
- return entry.seg;
5524
- }
5525
- function joinSpans(span0, span1) {
5526
- return {
5527
- start: Math.min(span0.start, span1.start),
5528
- end: Math.max(span0.end, span1.end),
5529
- };
5530
- }
5531
- function intersectSpans(span0, span1) {
5532
- let start = Math.max(span0.start, span1.start);
5533
- let end = Math.min(span0.end, span1.end);
5534
- if (start < end) {
5535
- return { start, end };
5536
- }
5537
- return null;
5538
- }
5539
- // general util
5540
- // ---------------------------------------------------------------------------------------------------------------------
5169
+ // General Utils
5170
+ // -------------------------------------------------------------------------------------------------
5541
5171
  function insertAt(arr, index, item) {
5542
5172
  arr.splice(index, 0, item);
5543
5173
  }
@@ -5652,14 +5282,14 @@ var FullCalendar = (function (exports) {
5652
5282
  forPrint: false,
5653
5283
  };
5654
5284
  this.handleBeforePrint = () => {
5655
- flushSync(() => {
5656
- this.setState({ forPrint: true });
5657
- });
5285
+ this.setState({ forPrint: true });
5286
+ flushSync(() => { }); // TODO: use noop
5287
+ updateSizeSync();
5288
+ flushSync(() => { }); // TODO: use noop
5658
5289
  };
5659
5290
  this.handleAfterPrint = () => {
5660
- flushSync(() => {
5661
- this.setState({ forPrint: false });
5662
- });
5291
+ this.setState({ forPrint: false });
5292
+ flushSync(() => { }); // TODO: use noop
5663
5293
  };
5664
5294
  }
5665
5295
  render() {
@@ -5670,7 +5300,7 @@ var FullCalendar = (function (exports) {
5670
5300
  'fc',
5671
5301
  forPrint ? 'fc-media-print' : 'fc-media-screen',
5672
5302
  `fc-direction-${options.direction}`,
5673
- props.theme.getClass('root'),
5303
+ props.theme.getClassName('root'),
5674
5304
  ];
5675
5305
  return props.children(classNames, options.height, forPrint);
5676
5306
  }
@@ -5718,8 +5348,8 @@ var FullCalendar = (function (exports) {
5718
5348
  clippedLastIndex = Math.floor(clippedLastIndex); // in-between ends round to prev cell
5719
5349
  if (clippedFirstIndex <= clippedLastIndex) {
5720
5350
  return {
5721
- firstIndex: clippedFirstIndex,
5722
- lastIndex: clippedLastIndex,
5351
+ start: clippedFirstIndex,
5352
+ end: clippedLastIndex + 1,
5723
5353
  isStart: firstIndex === clippedFirstIndex,
5724
5354
  isEnd: lastIndex === clippedLastIndex,
5725
5355
  };
@@ -5800,17 +5430,17 @@ var FullCalendar = (function (exports) {
5800
5430
  let seriesSeg = this.daySeries.sliceRange(range);
5801
5431
  let segs = [];
5802
5432
  if (seriesSeg) {
5803
- let { firstIndex, lastIndex } = seriesSeg;
5804
- let index = firstIndex;
5805
- while (index <= lastIndex) {
5433
+ const { start, end } = seriesSeg;
5434
+ let index = start;
5435
+ while (index < end) {
5806
5436
  let row = Math.floor(index / colCnt);
5807
- let nextIndex = Math.min((row + 1) * colCnt, lastIndex + 1);
5437
+ let nextIndex = Math.min((row + 1) * colCnt, end);
5808
5438
  segs.push({
5809
5439
  row,
5810
- firstCol: index % colCnt,
5811
- lastCol: (nextIndex - 1) % colCnt,
5812
- isStart: seriesSeg.isStart && index === firstIndex,
5813
- isEnd: seriesSeg.isEnd && (nextIndex - 1) === lastIndex,
5440
+ start: index % colCnt,
5441
+ end: (nextIndex - 1) % colCnt + 1,
5442
+ isStart: seriesSeg.isStart && index === start,
5443
+ isEnd: seriesSeg.isEnd && nextIndex === end,
5814
5444
  });
5815
5445
  index = nextIndex;
5816
5446
  }
@@ -5819,85 +5449,253 @@ var FullCalendar = (function (exports) {
5819
5449
  }
5820
5450
  }
5821
5451
 
5822
- class Scroller extends DateComponent {
5823
- constructor() {
5824
- super(...arguments);
5825
- // ref
5826
- this.elRef = m$1();
5827
- }
5828
- render() {
5829
- const { props } = this;
5830
- // if there's only one axis that needs scrolling, the other axis will unintentionally have
5831
- // scrollbars too, so we must force to 'hidden'
5832
- const fallbackOverflow = (props.horizontal || props.vertical) ? 'hidden' : '';
5833
- return (_("div", { ref: this.elRef, className: [
5834
- 'fc-scroller',
5835
- props.hideScrollbars ? 'fc-scroller-nobars' : '',
5836
- ...(props.elClassNames || []),
5837
- ].join(' '), style: Object.assign(Object.assign({}, props.elStyle), { overflowX: props.horizontal ? 'auto' : fallbackOverflow, overflowY: props.vertical ? 'auto' : fallbackOverflow }) }, props.children));
5452
+ class DelayedRunner {
5453
+ constructor(drainedOption) {
5454
+ this.drainedOption = drainedOption;
5455
+ this.isRunning = false;
5456
+ this.isDirty = false;
5457
+ this.pauseDepths = {};
5458
+ this.timeoutId = 0;
5838
5459
  }
5839
- componentDidMount() {
5840
- const el = this.elRef.current; // TODO: make dynamic with useEffect
5841
- this.disconnectSize = watchSize(el, (contentWidth, contentHeight) => {
5842
- const { props, context } = this;
5843
- const bottomScrollbarWidth = el.offsetHeight - el.clientHeight;
5844
- const horizontalScrollbarWidth = el.offsetWidth - el.clientWidth;
5845
- let rightScrollbarWidth = 0;
5846
- let leftScrollbarWidth = 0;
5847
- if (context.isRtl && getRtlScrollerConfig().leftScrollbars) {
5848
- leftScrollbarWidth = horizontalScrollbarWidth;
5460
+ request(delay) {
5461
+ this.isDirty = true;
5462
+ if (!this.isPaused()) {
5463
+ this.clearTimeout();
5464
+ if (delay == null) {
5465
+ this.tryDrain();
5849
5466
  }
5850
5467
  else {
5851
- rightScrollbarWidth = horizontalScrollbarWidth;
5468
+ this.timeoutId = setTimeout(// NOT OPTIMAL! TODO: look at debounce
5469
+ this.tryDrain.bind(this), delay);
5470
+ }
5471
+ }
5472
+ }
5473
+ pause(scope = '') {
5474
+ let { pauseDepths } = this;
5475
+ pauseDepths[scope] = (pauseDepths[scope] || 0) + 1;
5476
+ this.clearTimeout();
5477
+ }
5478
+ resume(scope = '', force) {
5479
+ let { pauseDepths } = this;
5480
+ if (scope in pauseDepths) {
5481
+ if (force) {
5482
+ delete pauseDepths[scope];
5852
5483
  }
5853
- if (!isDimsEqual(this.currentWidth, contentWidth)) {
5854
- setRef(props.widthRef, this.currentWidth = contentWidth);
5484
+ else {
5485
+ pauseDepths[scope] -= 1;
5486
+ let depth = pauseDepths[scope];
5487
+ if (depth <= 0) {
5488
+ delete pauseDepths[scope];
5489
+ }
5855
5490
  }
5856
- if (!isDimsEqual(this.currentHeight, contentHeight)) {
5857
- setRef(props.heightRef, this.currentHeight = contentHeight);
5491
+ this.tryDrain();
5492
+ }
5493
+ }
5494
+ isPaused() {
5495
+ return Object.keys(this.pauseDepths).length;
5496
+ }
5497
+ tryDrain() {
5498
+ if (!this.isRunning && !this.isPaused()) {
5499
+ this.isRunning = true;
5500
+ while (this.isDirty) {
5501
+ this.isDirty = false;
5502
+ this.drained(); // might set isDirty to true again
5858
5503
  }
5859
- if (!isDimsEqual(this.currentBottomScrollbarWidth, bottomScrollbarWidth)) {
5860
- setRef(props.bottomScrollbarWidthRef, this.currentBottomScrollbarWidth = bottomScrollbarWidth);
5504
+ this.isRunning = false;
5505
+ }
5506
+ }
5507
+ clear() {
5508
+ this.clearTimeout();
5509
+ this.isDirty = false;
5510
+ this.pauseDepths = {};
5511
+ }
5512
+ clearTimeout() {
5513
+ if (this.timeoutId) {
5514
+ clearTimeout(this.timeoutId);
5515
+ this.timeoutId = 0;
5516
+ }
5517
+ }
5518
+ drained() {
5519
+ if (this.drainedOption) {
5520
+ this.drainedOption();
5521
+ }
5522
+ }
5523
+ }
5524
+
5525
+ const WHEEL_EVENT_NAMES = 'wheel mousewheel DomMouseScroll MozMousePixelScroll'.split(' ');
5526
+ /*
5527
+ Fires:
5528
+ - scrollStart (always user)
5529
+ - scroll
5530
+ - scrollEnd (always user)
5531
+
5532
+ NOTE: detection is complicated (w/ touch and wheel) because ScrollerSyncer needs to know about it,
5533
+ but are we sure we can't just ignore programmatic scrollTo() calls with a flag? and determine the
5534
+ the scroll-master simply by who was the newest scroller? Does passive:true do things asynchronously?
5535
+ */
5536
+ class ScrollListener {
5537
+ constructor(el) {
5538
+ this.el = el;
5539
+ this.emitter = new Emitter();
5540
+ this.isScrolling = false;
5541
+ this.isTouching = false; // user currently has finger down?
5542
+ this.isRecentlyWheeled = false;
5543
+ this.isRecentlyScrolled = false;
5544
+ this.wheelWaiter = new DelayedRunner(this._handleWheelWaited.bind(this));
5545
+ this.scrollWaiter = new DelayedRunner(this._handleScrollWaited.bind(this));
5546
+ // Handlers
5547
+ // ----------------------------------------------------------------------------------------------
5548
+ this.handleScroll = () => {
5549
+ this.startScroll();
5550
+ this.emitter.trigger('scroll', this.isRecentlyWheeled, this.isTouching);
5551
+ this.isRecentlyScrolled = true;
5552
+ this.scrollWaiter.request(500);
5553
+ };
5554
+ // will fire *before* the scroll event is fired (might not cause a scroll)
5555
+ this.handleWheel = () => {
5556
+ this.isRecentlyWheeled = true;
5557
+ this.wheelWaiter.request(500);
5558
+ };
5559
+ // will fire *before* the scroll event is fired (might not cause a scroll)
5560
+ this.handleTouchStart = () => {
5561
+ this.isTouching = true;
5562
+ };
5563
+ this.handleTouchEnd = () => {
5564
+ this.isTouching = false;
5565
+ // if the user ended their touch, and the scroll area wasn't moving,
5566
+ // we consider this to be the end of the scroll.
5567
+ if (!this.isRecentlyScrolled) {
5568
+ this.endScroll(); // won't fire if already ended
5861
5569
  }
5862
- if (!isDimsEqual(this.currentRightScrollbarWidth, rightScrollbarWidth)) {
5863
- setRef(props.rightScrollbarWidthRef, this.currentRightScrollbarWidth = rightScrollbarWidth);
5570
+ };
5571
+ el.addEventListener('scroll', this.handleScroll);
5572
+ el.addEventListener('touchstart', this.handleTouchStart, { passive: true });
5573
+ el.addEventListener('touchend', this.handleTouchEnd);
5574
+ for (let eventName of WHEEL_EVENT_NAMES) {
5575
+ el.addEventListener(eventName, this.handleWheel, { passive: true });
5576
+ }
5577
+ }
5578
+ destroy() {
5579
+ let { el } = this;
5580
+ el.removeEventListener('scroll', this.handleScroll);
5581
+ el.removeEventListener('touchstart', this.handleTouchStart, { passive: true });
5582
+ el.removeEventListener('touchend', this.handleTouchEnd);
5583
+ for (let eventName of WHEEL_EVENT_NAMES) {
5584
+ el.removeEventListener(eventName, this.handleWheel, { passive: true });
5585
+ }
5586
+ }
5587
+ // Start / Stop
5588
+ // ----------------------------------------------------------------------------------------------
5589
+ startScroll() {
5590
+ if (!this.isScrolling) {
5591
+ this.isScrolling = true;
5592
+ this.emitter.trigger('scrollStart', this.isRecentlyWheeled, this.isTouching);
5593
+ }
5594
+ }
5595
+ endScroll() {
5596
+ if (this.isScrolling) {
5597
+ this.emitter.trigger('scrollEnd');
5598
+ this.isScrolling = false;
5599
+ this.isRecentlyScrolled = true;
5600
+ this.isRecentlyWheeled = false;
5601
+ this.scrollWaiter.clear();
5602
+ this.wheelWaiter.clear();
5603
+ }
5604
+ }
5605
+ _handleScrollWaited() {
5606
+ this.isRecentlyScrolled = false;
5607
+ // only end the scroll if not currently touching.
5608
+ // if touching, the scrolling will end later, on touchend.
5609
+ if (!this.isTouching) {
5610
+ this.endScroll(); // won't fire if already ended
5611
+ }
5612
+ }
5613
+ _handleWheelWaited() {
5614
+ this.isRecentlyWheeled = false;
5615
+ }
5616
+ }
5617
+
5618
+ class Scroller extends DateComponent {
5619
+ constructor() {
5620
+ super(...arguments);
5621
+ this.handleEl = (el) => {
5622
+ const { props } = this;
5623
+ if (this.el) {
5624
+ this.el = null;
5625
+ this.listener.destroy();
5626
+ this.disconnectSize();
5627
+ setRef(props.clientWidthRef, null);
5628
+ setRef(props.clientHeightRef, null);
5629
+ setRef(props.endScrollbarWidthRef, null);
5630
+ setRef(props.bottomScrollbarWidthRef, null);
5864
5631
  }
5865
- if (!isDimsEqual(this.currentLeftScrollbarWidth, leftScrollbarWidth)) {
5866
- setRef(props.leftScrollbarWidthRef, this.currentLeftScrollbarWidth = leftScrollbarWidth);
5632
+ if (el) {
5633
+ this.el = el;
5634
+ this.listener = new ScrollListener(el);
5635
+ this.disconnectSize = watchSize(el, (clientWidth, clientHeight) => {
5636
+ const { props } = this;
5637
+ const endScrollbarWidth = el.offsetWidth - clientWidth;
5638
+ const bottomScrollbarWidth = el.offsetHeight - clientHeight;
5639
+ if (this.currentClientWidth !== clientWidth) {
5640
+ setRef(props.clientWidthRef, this.currentClientWidth = clientWidth);
5641
+ }
5642
+ if (this.currentClientHeight !== clientHeight) {
5643
+ setRef(props.clientHeightRef, this.currentClientHeight = clientHeight);
5644
+ }
5645
+ // are these isDimsEqual calls necessary?
5646
+ if (!isDimsEqual(this.currentBottomScrollbarWidth, bottomScrollbarWidth)) {
5647
+ setRef(props.bottomScrollbarWidthRef, this.currentBottomScrollbarWidth = bottomScrollbarWidth);
5648
+ }
5649
+ if (!isDimsEqual(this.currentEndScrollbarWidth, endScrollbarWidth)) {
5650
+ setRef(props.endScrollbarWidthRef, this.currentEndScrollbarWidth = endScrollbarWidth);
5651
+ }
5652
+ }, /* client(width+height) = */ true);
5867
5653
  }
5868
- });
5654
+ };
5869
5655
  }
5870
- componentWillUnmount() {
5871
- this.disconnectSize();
5656
+ render() {
5657
+ const { props } = this;
5658
+ // if there's only one axis that needs scrolling, the other axis will unintentionally have
5659
+ // scrollbars too if we don't force to 'hidden'
5660
+ const fallbackOverflow = (props.horizontal || props.vertical) ? 'hidden' : '';
5661
+ return (_("div", { ref: this.handleEl, className: joinClassNames(props.className, 'fc-scroller', props.hideScrollbars && 'fc-scroller-no-bars'), style: Object.assign(Object.assign({}, props.style), { overflowX: props.horizontal ? 'auto' : fallbackOverflow, overflowY: props.vertical ? 'auto' : fallbackOverflow }) }, props.children));
5662
+ }
5663
+ endScroll() {
5664
+ this.listener.endScroll();
5872
5665
  }
5873
5666
  // Public API
5874
5667
  // -----------------------------------------------------------------------------------------------
5875
- get el() {
5876
- return this.elRef.current;
5877
- }
5878
5668
  get x() {
5879
5669
  const { isRtl } = this.context;
5880
- const el = this.elRef.current;
5881
- return getNormalizedScrollX(el, isRtl);
5670
+ const { el } = this;
5671
+ return el ? getNormalizedScrollX(el, isRtl) : 0;
5882
5672
  }
5883
5673
  get y() {
5884
- const el = this.elRef.current;
5885
- return el.scrollTop;
5674
+ const { el } = this;
5675
+ return el ? el.scrollTop : 0;
5886
5676
  }
5887
5677
  scrollTo({ x, y }) {
5888
5678
  const { isRtl } = this.context;
5889
- const el = this.elRef.current;
5890
- if (y != null) {
5891
- el.scrollTop = y;
5892
- }
5893
- if (x != null) {
5894
- setNormalizedScrollX(el, isRtl, x);
5679
+ const { el } = this;
5680
+ if (el) {
5681
+ if (y != null) {
5682
+ el.scrollTop = y;
5683
+ }
5684
+ if (x != null) {
5685
+ setNormalizedScrollX(el, isRtl, x);
5686
+ }
5895
5687
  }
5896
5688
  }
5689
+ addScrollEndListener(handler) {
5690
+ this.listener.emitter.on('scrollEnd', handler);
5691
+ }
5692
+ removeScrollEndListener(handler) {
5693
+ this.listener.emitter.off('scrollEnd', handler);
5694
+ }
5897
5695
  }
5898
5696
  // Public API
5899
5697
  // -------------------------------------------------------------------------------------------------
5900
- // TODO: consolidate with scroll-left-norm.ts
5698
+ // We can drop normalization when support for Chromium-based <86 is dropped (see Notion)
5901
5699
  function getNormalizedScrollX(el, isRtl) {
5902
5700
  const { scrollLeft } = el;
5903
5701
  return isRtl ? getNormalizedRtlScrollX(scrollLeft, el) : scrollLeft;
@@ -5909,7 +5707,7 @@ var FullCalendar = (function (exports) {
5909
5707
  Returns a value in the 'reverse' system
5910
5708
  */
5911
5709
  function getNormalizedRtlScrollX(scrollLeft, el) {
5912
- switch (getRtlScrollerConfig().system) {
5710
+ switch (getRtlScrollerSystem()) {
5913
5711
  case 'positive':
5914
5712
  return el.scrollWidth - el.clientWidth - scrollLeft;
5915
5713
  case 'negative':
@@ -5923,7 +5721,7 @@ var FullCalendar = (function (exports) {
5923
5721
  If so, consolidate. With isRtl check too
5924
5722
  */
5925
5723
  function getNormalizedRtlScrollLeft(x, el) {
5926
- switch (getRtlScrollerConfig().system) {
5724
+ switch (getRtlScrollerSystem()) {
5927
5725
  case 'positive':
5928
5726
  return el.scrollWidth - el.clientWidth - x;
5929
5727
  case 'negative':
@@ -5931,11 +5729,14 @@ var FullCalendar = (function (exports) {
5931
5729
  }
5932
5730
  return x;
5933
5731
  }
5934
- let _rtlScrollerConfig;
5935
- function getRtlScrollerConfig() {
5936
- return _rtlScrollerConfig || (_rtlScrollerConfig = detectRtlScrollerConfig());
5732
+ let _rtlScrollerSystem;
5733
+ function getRtlScrollerSystem() {
5734
+ return _rtlScrollerSystem || (_rtlScrollerSystem = detectRtlScrollerSystem());
5937
5735
  }
5938
- function detectRtlScrollerConfig() {
5736
+ /*
5737
+ TODO: make this more minimal now that scrollbar-side detection isn't needed?
5738
+ */
5739
+ function detectRtlScrollerSystem() {
5939
5740
  let el = document.createElement('div');
5940
5741
  el.style.position = 'absolute';
5941
5742
  el.style.top = '-1000px';
@@ -5961,9 +5762,8 @@ var FullCalendar = (function (exports) {
5961
5762
  system = 'negative'; // scroll is a negative number from the right edge
5962
5763
  }
5963
5764
  }
5964
- let rightScrollbars = innerEl.getBoundingClientRect().right < el.getBoundingClientRect().right;
5965
- removeElement(el);
5966
- return { system, leftScrollbars: !rightScrollbars };
5765
+ el.remove();
5766
+ return system;
5967
5767
  }
5968
5768
 
5969
5769
  class Slicer {
@@ -6059,7 +5859,7 @@ var FullCalendar = (function (exports) {
6059
5859
  end: addDays(dateRange.start, 1),
6060
5860
  };
6061
5861
  }
6062
- let segs = this.sliceRange(dateRange, ...extraArgs);
5862
+ let segs = this.sliceRange(dateRange, ...extraArgs); // !!!
6063
5863
  for (let seg of segs) {
6064
5864
  seg.eventRange = eventRange;
6065
5865
  seg.isStart = eventRange.isStart && seg.isStart;
@@ -6394,119 +6194,46 @@ var FullCalendar = (function (exports) {
6394
6194
  // TODO: move to geom file?
6395
6195
  function anyRangesContainRange(outerRanges, innerRange) {
6396
6196
  for (let outerRange of outerRanges) {
6397
- if (rangeContainsRange(outerRange, innerRange)) {
6398
- return true;
6399
- }
6400
- }
6401
- return false;
6402
- }
6403
-
6404
- class JsonRequestError extends Error {
6405
- constructor(message, response) {
6406
- super(message);
6407
- this.response = response;
6408
- }
6409
- }
6410
- function requestJson(method, url, params) {
6411
- method = method.toUpperCase();
6412
- const fetchOptions = {
6413
- method,
6414
- };
6415
- if (method === 'GET') {
6416
- url += (url.indexOf('?') === -1 ? '?' : '&') +
6417
- new URLSearchParams(params);
6418
- }
6419
- else {
6420
- fetchOptions.body = new URLSearchParams(params);
6421
- fetchOptions.headers = {
6422
- 'Content-Type': 'application/x-www-form-urlencoded',
6423
- };
6424
- }
6425
- return fetch(url, fetchOptions).then((fetchRes) => {
6426
- if (fetchRes.ok) {
6427
- return fetchRes.json().then((parsedResponse) => {
6428
- return [parsedResponse, fetchRes];
6429
- }, () => {
6430
- throw new JsonRequestError('Failure parsing JSON', fetchRes);
6431
- });
6432
- }
6433
- else {
6434
- throw new JsonRequestError('Request failed', fetchRes);
6435
- }
6436
- });
6437
- }
6438
-
6439
- class DelayedRunner {
6440
- constructor(drainedOption) {
6441
- this.drainedOption = drainedOption;
6442
- this.isRunning = false;
6443
- this.isDirty = false;
6444
- this.pauseDepths = {};
6445
- this.timeoutId = 0;
6446
- }
6447
- request(delay) {
6448
- this.isDirty = true;
6449
- if (!this.isPaused()) {
6450
- this.clearTimeout();
6451
- if (delay == null) {
6452
- this.tryDrain();
6453
- }
6454
- else {
6455
- this.timeoutId = setTimeout(// NOT OPTIMAL! TODO: look at debounce
6456
- this.tryDrain.bind(this), delay);
6457
- }
6458
- }
6459
- }
6460
- pause(scope = '') {
6461
- let { pauseDepths } = this;
6462
- pauseDepths[scope] = (pauseDepths[scope] || 0) + 1;
6463
- this.clearTimeout();
6464
- }
6465
- resume(scope = '', force) {
6466
- let { pauseDepths } = this;
6467
- if (scope in pauseDepths) {
6468
- if (force) {
6469
- delete pauseDepths[scope];
6470
- }
6471
- else {
6472
- pauseDepths[scope] -= 1;
6473
- let depth = pauseDepths[scope];
6474
- if (depth <= 0) {
6475
- delete pauseDepths[scope];
6476
- }
6477
- }
6478
- this.tryDrain();
6197
+ if (rangeContainsRange(outerRange, innerRange)) {
6198
+ return true;
6479
6199
  }
6480
6200
  }
6481
- isPaused() {
6482
- return Object.keys(this.pauseDepths).length;
6201
+ return false;
6202
+ }
6203
+
6204
+ class JsonRequestError extends Error {
6205
+ constructor(message, response) {
6206
+ super(message);
6207
+ this.response = response;
6483
6208
  }
6484
- tryDrain() {
6485
- if (!this.isRunning && !this.isPaused()) {
6486
- this.isRunning = true;
6487
- while (this.isDirty) {
6488
- this.isDirty = false;
6489
- this.drained(); // might set isDirty to true again
6490
- }
6491
- this.isRunning = false;
6492
- }
6209
+ }
6210
+ function requestJson(method, url, params) {
6211
+ method = method.toUpperCase();
6212
+ const fetchOptions = {
6213
+ method,
6214
+ };
6215
+ if (method === 'GET') {
6216
+ url += (url.indexOf('?') === -1 ? '?' : '&') +
6217
+ new URLSearchParams(params);
6493
6218
  }
6494
- clear() {
6495
- this.clearTimeout();
6496
- this.isDirty = false;
6497
- this.pauseDepths = {};
6219
+ else {
6220
+ fetchOptions.body = new URLSearchParams(params);
6221
+ fetchOptions.headers = {
6222
+ 'Content-Type': 'application/x-www-form-urlencoded',
6223
+ };
6498
6224
  }
6499
- clearTimeout() {
6500
- if (this.timeoutId) {
6501
- clearTimeout(this.timeoutId);
6502
- this.timeoutId = 0;
6225
+ return fetch(url, fetchOptions).then((fetchRes) => {
6226
+ if (fetchRes.ok) {
6227
+ return fetchRes.json().then((parsedResponse) => {
6228
+ return [parsedResponse, fetchRes];
6229
+ }, () => {
6230
+ throw new JsonRequestError('Failure parsing JSON', fetchRes);
6231
+ });
6503
6232
  }
6504
- }
6505
- drained() {
6506
- if (this.drainedOption) {
6507
- this.drainedOption();
6233
+ else {
6234
+ throw new JsonRequestError('Request failed', fetchRes);
6508
6235
  }
6509
- }
6236
+ });
6510
6237
  }
6511
6238
 
6512
6239
  function getIsHeightAuto(options) {
@@ -6552,7 +6279,7 @@ var FullCalendar = (function (exports) {
6552
6279
  else {
6553
6280
  current.set(key, val);
6554
6281
  }
6555
- this.rev = guid();
6282
+ this.rev = guid$1();
6556
6283
  if (this.masterCallback) {
6557
6284
  this.masterCallback(val, key);
6558
6285
  }
@@ -6629,22 +6356,199 @@ var FullCalendar = (function (exports) {
6629
6356
  return { start, end };
6630
6357
  }
6631
6358
 
6632
- class ScrollResponder {
6633
- constructor(_handleScroll) {
6634
- this._handleScroll = _handleScroll;
6635
- this.handleScroll = (scroll) => {
6636
- this.queuedScroll = scroll;
6637
- this.drain();
6359
+ class ContentInjector extends BaseComponent {
6360
+ constructor() {
6361
+ super(...arguments);
6362
+ this.id = guid$1();
6363
+ this.queuedDomNodes = [];
6364
+ this.currentDomNodes = [];
6365
+ this.handleEl = (el) => {
6366
+ const { options } = this.context;
6367
+ const { generatorName } = this.props;
6368
+ if (!options.customRenderingReplaces || !hasCustomRenderingHandler(generatorName, options)) {
6369
+ this.updateElRef(el);
6370
+ }
6371
+ };
6372
+ this.updateElRef = (el) => {
6373
+ if (this.props.elRef) {
6374
+ setRef(this.props.elRef, el);
6375
+ }
6638
6376
  };
6639
6377
  }
6640
- drain() {
6641
- if (this.queuedScroll) {
6642
- if (this._handleScroll(this.queuedScroll)) {
6643
- this.queuedScroll = undefined;
6378
+ render() {
6379
+ const { props, context } = this;
6380
+ const { options } = context;
6381
+ const { customGenerator, defaultGenerator, renderProps } = props;
6382
+ const attrs = buildElAttrs(props, '', this.handleEl);
6383
+ let useDefault = false;
6384
+ let innerContent;
6385
+ let queuedDomNodes = [];
6386
+ let currentGeneratorMeta;
6387
+ if (customGenerator != null) {
6388
+ const customGeneratorRes = typeof customGenerator === 'function' ?
6389
+ customGenerator(renderProps, _) :
6390
+ customGenerator;
6391
+ if (customGeneratorRes === true) {
6392
+ useDefault = true;
6393
+ }
6394
+ else {
6395
+ const isObject = customGeneratorRes && typeof customGeneratorRes === 'object'; // non-null
6396
+ if (isObject && ('html' in customGeneratorRes)) {
6397
+ attrs.dangerouslySetInnerHTML = { __html: customGeneratorRes.html };
6398
+ }
6399
+ else if (isObject && ('domNodes' in customGeneratorRes)) {
6400
+ queuedDomNodes = Array.prototype.slice.call(customGeneratorRes.domNodes);
6401
+ }
6402
+ else if (isObject
6403
+ ? t(customGeneratorRes) // vdom node
6404
+ : typeof customGeneratorRes !== 'function' // primitive value (like string or number)
6405
+ ) {
6406
+ // use in vdom
6407
+ innerContent = customGeneratorRes;
6408
+ }
6409
+ else {
6410
+ // an exotic object for handleCustomRendering
6411
+ currentGeneratorMeta = customGeneratorRes;
6412
+ }
6413
+ }
6414
+ }
6415
+ else {
6416
+ useDefault = !hasCustomRenderingHandler(props.generatorName, options);
6417
+ }
6418
+ if (useDefault && defaultGenerator) {
6419
+ innerContent = defaultGenerator(renderProps);
6420
+ }
6421
+ this.queuedDomNodes = queuedDomNodes;
6422
+ this.currentGeneratorMeta = currentGeneratorMeta;
6423
+ return _(props.tag, attrs, innerContent);
6424
+ }
6425
+ componentDidMount() {
6426
+ this.applyQueueudDomNodes();
6427
+ this.triggerCustomRendering(true);
6428
+ }
6429
+ componentDidUpdate() {
6430
+ this.applyQueueudDomNodes();
6431
+ this.triggerCustomRendering(true);
6432
+ }
6433
+ componentWillUnmount() {
6434
+ this.triggerCustomRendering(false); // TODO: different API for removal?
6435
+ }
6436
+ triggerCustomRendering(isActive) {
6437
+ var _a;
6438
+ const { props, context } = this;
6439
+ const { handleCustomRendering, customRenderingMetaMap } = context.options;
6440
+ if (handleCustomRendering) {
6441
+ const generatorMeta = (_a = this.currentGeneratorMeta) !== null && _a !== void 0 ? _a : customRenderingMetaMap === null || customRenderingMetaMap === void 0 ? void 0 : customRenderingMetaMap[props.generatorName];
6442
+ if (generatorMeta) {
6443
+ handleCustomRendering(Object.assign({ id: this.id, isActive, containerEl: this.base, reportNewContainerEl: this.updateElRef, // front-end framework tells us about new container els
6444
+ generatorMeta }, props));
6445
+ }
6446
+ }
6447
+ }
6448
+ applyQueueudDomNodes() {
6449
+ const { queuedDomNodes, currentDomNodes } = this;
6450
+ const el = this.base;
6451
+ if (!isArraysEqual(queuedDomNodes, currentDomNodes)) {
6452
+ for (const domNode of currentDomNodes) {
6453
+ domNode.remove();
6454
+ }
6455
+ for (let newNode of queuedDomNodes) {
6456
+ el.appendChild(newNode);
6457
+ }
6458
+ this.currentDomNodes = queuedDomNodes;
6459
+ }
6460
+ }
6461
+ }
6462
+ ContentInjector.addPropsEquality({
6463
+ renderProps: isPropsEqual,
6464
+ attrs: isNonHandlerPropsEqual,
6465
+ style: isPropsEqual,
6466
+ });
6467
+ // Util
6468
+ /*
6469
+ Does UI-framework provide custom way of rendering that does not use Preact VDOM
6470
+ AND does the calendar's options define custom rendering?
6471
+ AKA. Should we NOT render the default content?
6472
+ */
6473
+ function hasCustomRenderingHandler(generatorName, options) {
6474
+ var _a;
6475
+ return Boolean(options.handleCustomRendering &&
6476
+ generatorName &&
6477
+ ((_a = options.customRenderingMetaMap) === null || _a === void 0 ? void 0 : _a[generatorName]));
6478
+ }
6479
+ function buildElAttrs(props, className, elRef) {
6480
+ const attrs = Object.assign(Object.assign({}, props.attrs), { ref: elRef });
6481
+ if (props.className || className) {
6482
+ attrs.className = joinClassNames(className, props.className, attrs.className);
6483
+ }
6484
+ if (props.style) {
6485
+ attrs.style = props.style;
6486
+ }
6487
+ return attrs;
6488
+ }
6489
+
6490
+ const RenderId = createContext(0);
6491
+
6492
+ class ContentContainer extends b {
6493
+ constructor() {
6494
+ super(...arguments);
6495
+ this.InnerContent = InnerContentInjector.bind(undefined, this);
6496
+ this.handleEl = (el) => {
6497
+ this.el = el;
6498
+ if (this.props.elRef) {
6499
+ setRef(this.props.elRef, el);
6500
+ if (el && this.didMountMisfire) {
6501
+ this.componentDidMount();
6502
+ }
6503
+ }
6504
+ };
6505
+ }
6506
+ render() {
6507
+ const { props } = this;
6508
+ const generatedClassName = generateClassName(props.classNameGenerator, props.renderProps);
6509
+ if (props.children) {
6510
+ const attrs = buildElAttrs(props, generatedClassName, this.handleEl);
6511
+ const children = props.children(this.InnerContent, props.renderProps, attrs);
6512
+ if (props.tag) {
6513
+ return _(props.tag, attrs, children);
6514
+ }
6515
+ else {
6516
+ return children;
6644
6517
  }
6645
6518
  }
6519
+ else {
6520
+ return _((ContentInjector), Object.assign(Object.assign({}, props), { elRef: this.handleEl, tag: props.tag || 'div', className: joinClassNames(props.className, generatedClassName), renderId: this.context }));
6521
+ }
6522
+ }
6523
+ componentDidMount() {
6524
+ var _a, _b;
6525
+ if (this.el) {
6526
+ (_b = (_a = this.props).didMount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el }));
6527
+ }
6528
+ else {
6529
+ this.didMountMisfire = true;
6530
+ }
6531
+ }
6532
+ componentWillUnmount() {
6533
+ var _a, _b;
6534
+ (_b = (_a = this.props).willUnmount) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.props.renderProps), { el: this.el }));
6646
6535
  }
6647
6536
  }
6537
+ ContentContainer.contextType = RenderId;
6538
+ function InnerContentInjector(containerComponent, props) {
6539
+ const parentProps = containerComponent.props;
6540
+ return _((ContentInjector), Object.assign({ renderProps: parentProps.renderProps, generatorName: parentProps.generatorName, customGenerator: parentProps.customGenerator, defaultGenerator: parentProps.defaultGenerator, renderId: containerComponent.context }, props));
6541
+ }
6542
+ // Utils
6543
+ function generateClassName(classNameGenerator, renderProps) {
6544
+ const classNames = typeof classNameGenerator === 'function' ?
6545
+ classNameGenerator(renderProps) :
6546
+ classNameGenerator || [];
6547
+ return typeof classNames === 'string' ? classNames : classNames.join(' ');
6548
+ }
6549
+ function renderText(renderProps) {
6550
+ return renderProps.text;
6551
+ }
6648
6552
 
6649
6553
  class EventContainer extends BaseComponent {
6650
6554
  constructor() {
@@ -6652,15 +6556,14 @@ var FullCalendar = (function (exports) {
6652
6556
  this.handleEl = (el) => {
6653
6557
  this.el = el;
6654
6558
  if (el) {
6655
- setElSeg(el, this.props.seg);
6559
+ setElEventRange(el, this.props.eventRange);
6656
6560
  }
6657
6561
  };
6658
6562
  }
6659
6563
  render() {
6660
6564
  const { props, context } = this;
6661
6565
  const { options } = context;
6662
- const { seg } = props;
6663
- const { eventRange } = seg;
6566
+ const { eventRange } = props;
6664
6567
  const { ui } = eventRange;
6665
6568
  const renderProps = {
6666
6569
  event: new EventImpl(context, eventRange.def, eventRange.instance),
@@ -6669,12 +6572,12 @@ var FullCalendar = (function (exports) {
6669
6572
  textColor: ui.textColor,
6670
6573
  backgroundColor: ui.backgroundColor,
6671
6574
  borderColor: ui.borderColor,
6672
- isDraggable: !props.disableDragging && computeSegDraggable(seg, context),
6673
- isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context),
6674
- isEndResizable: !props.disableResizing && computeSegEndResizable(seg),
6575
+ isDraggable: !props.disableDragging && computeEventRangeDraggable(eventRange, context),
6576
+ isStartResizable: !props.disableResizing && props.isStart && eventRange.ui.durationEditable && options.eventResizableFromStart,
6577
+ isEndResizable: !props.disableResizing && props.isEnd && eventRange.ui.durationEditable,
6675
6578
  isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting),
6676
- isStart: Boolean(seg.isStart),
6677
- isEnd: Boolean(seg.isEnd),
6579
+ isStart: Boolean(props.isStart),
6580
+ isEnd: Boolean(props.isEnd),
6678
6581
  isPast: Boolean(props.isPast),
6679
6582
  isFuture: Boolean(props.isFuture),
6680
6583
  isToday: Boolean(props.isToday),
@@ -6682,15 +6585,11 @@ var FullCalendar = (function (exports) {
6682
6585
  isDragging: Boolean(props.isDragging),
6683
6586
  isResizing: Boolean(props.isResizing),
6684
6587
  };
6685
- return (_(ContentContainer, Object.assign({}, props /* contains children */, { elRef: this.handleEl, elClasses: [
6686
- ...getEventClassNames(renderProps),
6687
- ...seg.eventRange.ui.classNames,
6688
- ...(props.elClasses || []),
6689
- ], renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount })));
6588
+ return (_(ContentContainer, Object.assign({}, props /* contains children */, { elRef: this.handleEl, className: joinClassNames(props.className, ...getEventClassNames(renderProps), ...eventRange.ui.classNames), renderProps: renderProps, generatorName: "eventContent", customGenerator: options.eventContent, defaultGenerator: props.defaultGenerator, classNameGenerator: options.eventClassNames, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount })));
6690
6589
  }
6691
6590
  componentDidUpdate(prevProps) {
6692
- if (this.el && this.props.seg !== prevProps.seg) {
6693
- setElSeg(this.el, this.props.seg);
6591
+ if (this.el && this.props.eventRange !== prevProps.eventRange) {
6592
+ setElEventRange(this.el, this.props.eventRange);
6694
6593
  }
6695
6594
  }
6696
6595
  }
@@ -6698,43 +6597,81 @@ var FullCalendar = (function (exports) {
6698
6597
  // should not be a purecomponent
6699
6598
  class StandardEvent extends BaseComponent {
6700
6599
  render() {
6701
- let { props, context } = this;
6702
- let { options } = context;
6703
- let { seg } = props;
6704
- let { ui } = seg.eventRange;
6705
- let timeFormat = options.eventTimeFormat || props.defaultTimeFormat;
6706
- let timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd);
6707
- return (_(EventContainer, Object.assign({}, props /* includes elRef */, { elTag: "a", elStyle: {
6708
- borderColor: ui.borderColor,
6709
- backgroundColor: ui.backgroundColor,
6710
- }, elAttrs: getSegAnchorAttrs(seg, context), defaultGenerator: renderInnerContent$1, timeText: timeText }), (InnerContent, eventContentArg) => (_(k$1, null,
6711
- _(InnerContent, { elTag: "div", elClasses: ['fc-event-inner'], elStyle: { color: eventContentArg.textColor } }),
6600
+ const { props, context } = this;
6601
+ const { eventRange } = props;
6602
+ const { options } = context;
6603
+ const timeFormat = options.eventTimeFormat || props.defaultTimeFormat;
6604
+ const timeText = buildEventRangeTimeText(timeFormat, eventRange, // just for def/instance
6605
+ props.slicedStart, props.slicedEnd, props.isStart, props.isEnd, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd);
6606
+ const anchorAttrs = getEventRangeAnchorAttrs(eventRange, context);
6607
+ return (_(EventContainer, Object.assign({}, props /* includes elRef */, { tag: anchorAttrs ? 'a' : 'div', style: {
6608
+ borderColor: eventRange.ui.borderColor,
6609
+ backgroundColor: eventRange.ui.backgroundColor,
6610
+ }, attrs: anchorAttrs, defaultGenerator: renderInnerContent$1, timeText: timeText }), (InnerContent, eventContentArg) => (_(k$1, null,
6611
+ _(InnerContent, { tag: "div", className: 'fc-event-inner', style: { color: eventContentArg.textColor } }),
6712
6612
  Boolean(eventContentArg.isStartResizable) && (_("div", { className: "fc-event-resizer fc-event-resizer-start" })),
6713
6613
  Boolean(eventContentArg.isEndResizable) && (_("div", { className: "fc-event-resizer fc-event-resizer-end" }))))));
6714
6614
  }
6715
6615
  }
6716
- function renderInnerContent$1(innerProps) {
6717
- return (_(k$1, null,
6718
- innerProps.timeText && (_("div", { className: "fc-event-time" }, innerProps.timeText)),
6719
- _("div", { className: "fc-event-title-outer" },
6720
- _("div", { className: "fc-event-title" }, innerProps.event.title || _(k$1, null, "\u00A0")))));
6616
+ function renderInnerContent$1(innerProps) {
6617
+ return (_(k$1, null,
6618
+ innerProps.timeText && (_("div", { className: "fc-event-time" }, innerProps.timeText)),
6619
+ _("div", { className: "fc-event-title-outer" },
6620
+ _("div", { className: "fc-event-title" }, innerProps.event.title || _(k$1, null, "\u00A0")))));
6621
+ }
6622
+
6623
+ const NowIndicatorContainer = (props) => (_(ViewContextType.Consumer, null, (context) => {
6624
+ let { options } = context;
6625
+ let renderProps = {
6626
+ isAxis: props.isAxis,
6627
+ date: context.dateEnv.toDate(props.date),
6628
+ view: context.viewApi,
6629
+ };
6630
+ return (_(ContentContainer, Object.assign({}, props /* includes children */, { tag: props.tag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent", customGenerator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount })));
6631
+ }));
6632
+
6633
+ const DAY_NUM_FORMAT = createFormatter({ day: 'numeric' });
6634
+ class DayCellContainer extends BaseComponent {
6635
+ constructor() {
6636
+ super(...arguments);
6637
+ this.refineRenderProps = memoizeObjArg(refineRenderProps);
6638
+ }
6639
+ render() {
6640
+ let { props, context } = this;
6641
+ let { options } = context;
6642
+ let renderProps = this.refineRenderProps({
6643
+ date: props.date,
6644
+ dateProfile: props.dateProfile,
6645
+ todayRange: props.todayRange,
6646
+ isMonthStart: props.isMonthStart || false,
6647
+ showDayNumber: props.showDayNumber,
6648
+ renderProps: props.renderProps,
6649
+ viewApi: context.viewApi,
6650
+ dateEnv: context.dateEnv,
6651
+ monthStartFormat: options.monthStartFormat,
6652
+ });
6653
+ return (_(ContentContainer, Object.assign({}, props /* includes children */, { className: joinClassNames(props.className, getDayClassName(renderProps)), attrs: Object.assign(Object.assign({}, props.attrs), (renderProps.isDisabled ? {} : { 'data-date': formatDayString(props.date) })), renderProps: renderProps, generatorName: "dayCellContent", customGenerator: options.dayCellContent, defaultGenerator: props.defaultGenerator, classNameGenerator:
6654
+ // don't use custom classNames if disabled
6655
+ // TODO: make DRY with DayGridHeaderCell
6656
+ renderProps.isDisabled ? undefined : options.dayCellClassNames, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount })));
6657
+ }
6658
+ }
6659
+ function hasCustomDayCellContent(options) {
6660
+ return Boolean(options.dayCellContent || hasCustomRenderingHandler('dayCellContent', options));
6661
+ }
6662
+ function refineRenderProps(raw) {
6663
+ let { date, dateEnv, dateProfile, isMonthStart } = raw;
6664
+ let dayMeta = getDateMeta(date, raw.todayRange, null, dateProfile);
6665
+ let dayNumberText = raw.showDayNumber ? (dateEnv.format(date, isMonthStart ? raw.monthStartFormat : DAY_NUM_FORMAT)) : '';
6666
+ return Object.assign(Object.assign(Object.assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { isMonthStart,
6667
+ dayNumberText }), raw.renderProps);
6721
6668
  }
6722
-
6723
- const NowIndicatorContainer = (props) => (_(ViewContextType.Consumer, null, (context) => {
6724
- let { options } = context;
6725
- let renderProps = {
6726
- isAxis: props.isAxis,
6727
- date: context.dateEnv.toDate(props.date),
6728
- view: context.viewApi,
6729
- };
6730
- return (_(ContentContainer, Object.assign({}, props /* includes children */, { elTag: props.elTag || 'div', renderProps: renderProps, generatorName: "nowIndicatorContent", customGenerator: options.nowIndicatorContent, classNameGenerator: options.nowIndicatorClassNames, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount })));
6731
- }));
6732
6669
 
6733
6670
  class BgEvent extends BaseComponent {
6734
6671
  render() {
6735
6672
  let { props } = this;
6736
- let { seg } = props;
6737
- return (_(EventContainer, { elTag: "div", elClasses: ['fc-bg-event'], elStyle: { backgroundColor: seg.eventRange.ui.backgroundColor }, defaultGenerator: renderInnerContent, seg: seg, timeText: "", isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday, disableDragging: true, disableResizing: true }));
6673
+ let { eventRange } = props;
6674
+ return (_(EventContainer, { tag: "div", className: 'fc-bg-event', style: { backgroundColor: eventRange.ui.backgroundColor }, defaultGenerator: renderInnerContent, eventRange: eventRange, isStart: props.isStart, isEnd: props.isEnd, timeText: "", isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday, disableDragging: true, disableResizing: true }));
6738
6675
  }
6739
6676
  }
6740
6677
  function renderInnerContent(props) {
@@ -6753,10 +6690,233 @@ var FullCalendar = (function (exports) {
6753
6690
  let text = dateEnv.format(date, format);
6754
6691
  let renderProps = { num, text, date };
6755
6692
  return (_(ContentContainer // why isn't WeekNumberContentArg being auto-detected?
6756
- , Object.assign({}, props /* includes children */, { renderProps: renderProps, generatorName: "weekNumberContent", customGenerator: options.weekNumberContent, defaultGenerator: renderInner, classNameGenerator: options.weekNumberClassNames, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount })));
6693
+ , Object.assign({}, props /* includes children */, { renderProps: renderProps, generatorName: "weekNumberContent", customGenerator: options.weekNumberContent, defaultGenerator: renderText, classNameGenerator: options.weekNumberClassNames, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount })));
6757
6694
  }));
6758
- function renderInner(innerProps) {
6759
- return innerProps.text;
6695
+
6696
+ const PADDING_FROM_VIEWPORT = 10;
6697
+ class Popover extends BaseComponent {
6698
+ constructor() {
6699
+ super(...arguments);
6700
+ this.state = {
6701
+ titleId: getUniqueDomId(),
6702
+ };
6703
+ this.handleRootEl = (el) => {
6704
+ this.rootEl = el;
6705
+ if (this.props.elRef) {
6706
+ setRef(this.props.elRef, el);
6707
+ }
6708
+ };
6709
+ // Triggered when the user clicks *anywhere* in the document, for the autoHide feature
6710
+ this.handleDocumentMouseDown = (ev) => {
6711
+ // only hide the popover if the click happened outside the popover
6712
+ const target = getEventTargetViaRoot(ev);
6713
+ if (!this.rootEl.contains(target)) {
6714
+ this.handleCloseClick();
6715
+ }
6716
+ };
6717
+ this.handleDocumentKeyDown = (ev) => {
6718
+ if (ev.key === 'Escape') {
6719
+ this.handleCloseClick();
6720
+ }
6721
+ };
6722
+ this.handleCloseClick = () => {
6723
+ let { onClose } = this.props;
6724
+ if (onClose) {
6725
+ onClose();
6726
+ }
6727
+ };
6728
+ }
6729
+ render() {
6730
+ let { theme, options } = this.context;
6731
+ let { props, state } = this;
6732
+ return j(_("div", Object.assign({}, props.attrs, { id: props.id, className: joinClassNames(props.className, 'fc-popover', theme.getClassName('popover')), "aria-labelledby": state.titleId, ref: this.handleRootEl }),
6733
+ _("div", { className: 'fc-popover-header ' + theme.getClassName('popoverHeader') },
6734
+ _("span", { className: "fc-popover-title", id: state.titleId }, props.title),
6735
+ _("span", { className: 'fc-popover-close ' + theme.getIconClass('close'), title: options.closeHint, onClick: this.handleCloseClick })),
6736
+ _("div", { className: 'fc-popover-body ' + theme.getClassName('popoverContent') }, props.children)), props.parentEl);
6737
+ }
6738
+ componentDidMount() {
6739
+ document.addEventListener('mousedown', this.handleDocumentMouseDown);
6740
+ document.addEventListener('keydown', this.handleDocumentKeyDown);
6741
+ this.updateSize();
6742
+ }
6743
+ componentWillUnmount() {
6744
+ document.removeEventListener('mousedown', this.handleDocumentMouseDown);
6745
+ document.removeEventListener('keydown', this.handleDocumentKeyDown);
6746
+ }
6747
+ updateSize() {
6748
+ let { isRtl } = this.context;
6749
+ let { alignEl, alignParentTop } = this.props;
6750
+ let { rootEl } = this;
6751
+ let alignmentRect = computeClippedClientRect(alignEl);
6752
+ if (alignmentRect) {
6753
+ let popoverDims = rootEl.getBoundingClientRect();
6754
+ // position relative to viewport
6755
+ let popoverTop = alignParentTop
6756
+ ? alignEl.closest(alignParentTop).getBoundingClientRect().top
6757
+ : alignmentRect.top;
6758
+ let popoverLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left;
6759
+ // constrain
6760
+ popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT);
6761
+ popoverLeft = Math.min(popoverLeft, document.documentElement.clientWidth - PADDING_FROM_VIEWPORT - popoverDims.width);
6762
+ popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT);
6763
+ let origin = rootEl.offsetParent.getBoundingClientRect();
6764
+ applyStyle(rootEl, {
6765
+ top: popoverTop - origin.top,
6766
+ left: popoverLeft - origin.left,
6767
+ });
6768
+ }
6769
+ }
6770
+ }
6771
+
6772
+ class MorePopover extends DateComponent {
6773
+ constructor() {
6774
+ super(...arguments);
6775
+ this.handleRootEl = (rootEl) => {
6776
+ this.rootEl = rootEl;
6777
+ if (rootEl) {
6778
+ this.context.registerInteractiveComponent(this, {
6779
+ el: rootEl,
6780
+ useEventCenter: false,
6781
+ });
6782
+ }
6783
+ else {
6784
+ this.context.unregisterInteractiveComponent(this);
6785
+ }
6786
+ };
6787
+ }
6788
+ render() {
6789
+ let { options, dateEnv } = this.context;
6790
+ let { props } = this;
6791
+ let { startDate, todayRange, dateProfile } = props;
6792
+ let title = dateEnv.format(startDate, options.dayPopoverFormat);
6793
+ return (_(DayCellContainer, { elRef: this.handleRootEl, date: startDate, dateProfile: dateProfile, todayRange: todayRange }, (InnerContent, renderProps, attrs) => (_(Popover, { elRef: attrs.ref, id: props.id, title: title, attrs: attrs /* TODO: make these time-based when not whole-day? */, className: joinClassNames(attrs.className, // TODO: solve SignalLike type problem
6794
+ 'fc-more-popover'), parentEl: props.parentEl, alignEl: props.alignEl, alignParentTop: props.alignParentTop, onClose: props.onClose },
6795
+ hasCustomDayCellContent(options) && (_(InnerContent, { tag: "div", className: 'fc-more-popover-misc' })),
6796
+ props.children))));
6797
+ }
6798
+ queryHit(positionLeft, positionTop, elWidth, elHeight) {
6799
+ let { rootEl, props } = this;
6800
+ if (positionLeft >= 0 && positionLeft < elWidth &&
6801
+ positionTop >= 0 && positionTop < elHeight) {
6802
+ return {
6803
+ dateProfile: props.dateProfile,
6804
+ dateSpan: Object.assign({ allDay: !props.forceTimed, range: {
6805
+ start: props.startDate,
6806
+ end: props.endDate,
6807
+ } }, props.dateSpanProps),
6808
+ dayEl: rootEl,
6809
+ rect: {
6810
+ left: 0,
6811
+ top: 0,
6812
+ right: elWidth,
6813
+ bottom: elHeight,
6814
+ },
6815
+ layer: 1, // important when comparing with hits from other components
6816
+ };
6817
+ }
6818
+ return null;
6819
+ }
6820
+ }
6821
+
6822
+ class MoreLinkContainer extends BaseComponent {
6823
+ constructor() {
6824
+ super(...arguments);
6825
+ this.state = {
6826
+ isPopoverOpen: false,
6827
+ popoverId: getUniqueDomId(),
6828
+ };
6829
+ this.handleLinkEl = (linkEl) => {
6830
+ this.linkEl = linkEl;
6831
+ if (this.props.elRef) {
6832
+ setRef(this.props.elRef, linkEl);
6833
+ }
6834
+ };
6835
+ this.handleClick = (ev) => {
6836
+ let { props, context } = this;
6837
+ let { moreLinkClick } = context.options;
6838
+ let date = computeRange(props).start;
6839
+ function buildPublicSeg(seg) {
6840
+ let { def, instance, range } = seg.eventRange;
6841
+ return {
6842
+ event: new EventImpl(context, def, instance),
6843
+ start: context.dateEnv.toDate(range.start),
6844
+ end: context.dateEnv.toDate(range.end),
6845
+ isStart: seg.isStart,
6846
+ isEnd: seg.isEnd,
6847
+ };
6848
+ }
6849
+ if (typeof moreLinkClick === 'function') {
6850
+ moreLinkClick = moreLinkClick({
6851
+ date,
6852
+ allDay: Boolean(props.allDayDate),
6853
+ allSegs: props.segs.map(buildPublicSeg),
6854
+ hiddenSegs: props.hiddenSegs.map(buildPublicSeg),
6855
+ jsEvent: ev,
6856
+ view: context.viewApi,
6857
+ });
6858
+ }
6859
+ if (!moreLinkClick || moreLinkClick === 'popover') {
6860
+ this.setState({ isPopoverOpen: true });
6861
+ }
6862
+ else if (typeof moreLinkClick === 'string') { // a view name
6863
+ context.calendarApi.zoomTo(date, moreLinkClick);
6864
+ }
6865
+ };
6866
+ this.handlePopoverClose = () => {
6867
+ this.setState({ isPopoverOpen: false });
6868
+ };
6869
+ }
6870
+ render() {
6871
+ let { props, state } = this;
6872
+ return (_(ViewContextType.Consumer, null, (context) => {
6873
+ let { viewApi, options, calendarApi } = context;
6874
+ let { moreLinkText } = options;
6875
+ let moreCnt = props.hiddenSegs.length;
6876
+ let range = computeRange(props);
6877
+ let text = typeof moreLinkText === 'function' // TODO: eventually use formatWithOrdinals
6878
+ ? moreLinkText.call(calendarApi, moreCnt)
6879
+ : `+${moreCnt} ${moreLinkText}`;
6880
+ let hint = formatWithOrdinals(options.moreLinkHint, [moreCnt], text);
6881
+ let renderProps = {
6882
+ num: moreCnt,
6883
+ shortText: `+${moreCnt}`,
6884
+ text,
6885
+ view: viewApi,
6886
+ };
6887
+ return (_(k$1, null,
6888
+ Boolean(moreCnt) && (_(ContentContainer, { tag: props.tag || 'a', elRef: this.handleLinkEl, className: joinClassNames(props.className, 'fc-more-link'), style: props.style, attrs: Object.assign(Object.assign(Object.assign({}, props.attrs), createAriaClickAttrs(this.handleClick)), { title: hint, 'aria-expanded': state.isPopoverOpen, 'aria-controls': state.isPopoverOpen ? state.popoverId : '' }), renderProps: renderProps, generatorName: "moreLinkContent", customGenerator: options.moreLinkContent, defaultGenerator: props.defaultGenerator || renderMoreLinkInner, classNameGenerator: options.moreLinkClassNames, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, props.children)),
6889
+ state.isPopoverOpen && (_(MorePopover, { id: state.popoverId, startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, dateSpanProps: props.dateSpanProps, parentEl: this.parentEl, alignEl: props.alignElRef ?
6890
+ props.alignElRef.current :
6891
+ this.linkEl, alignParentTop: props.alignParentTop, forceTimed: props.forceTimed, onClose: this.handlePopoverClose }, props.popoverContent()))));
6892
+ }));
6893
+ }
6894
+ componentDidMount() {
6895
+ this.updateParentEl();
6896
+ }
6897
+ componentDidUpdate() {
6898
+ this.updateParentEl();
6899
+ }
6900
+ updateParentEl() {
6901
+ if (this.linkEl) {
6902
+ this.parentEl = this.linkEl.closest('.fc-view-outer'); // HACK. reconsider
6903
+ }
6904
+ }
6905
+ }
6906
+ function renderMoreLinkInner(props) {
6907
+ return props.text;
6908
+ }
6909
+ function computeRange(props) {
6910
+ if (props.allDayDate) {
6911
+ return {
6912
+ start: props.allDayDate,
6913
+ end: addDays(props.allDayDate, 1),
6914
+ };
6915
+ }
6916
+ return {
6917
+ start: computeEarliestStart(props.hiddenSegs),
6918
+ end: computeLatestEnd(props.hiddenSegs),
6919
+ };
6760
6920
  }
6761
6921
 
6762
6922
  class ViewContainer extends BaseComponent {
@@ -6764,17 +6924,11 @@ var FullCalendar = (function (exports) {
6764
6924
  let { props, context } = this;
6765
6925
  let { options } = context;
6766
6926
  let renderProps = { view: context.viewApi };
6767
- return (_(ContentContainer, Object.assign({}, props, { elTag: props.elTag || 'div', elClasses: [
6768
- ...buildViewClassNames(props.viewSpec),
6769
- ...(props.elClasses || []),
6770
- ], renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }), () => props.children));
6927
+ return (_(ContentContainer, Object.assign({}, props, { tag: props.tag || 'div', className: joinClassNames(props.className, buildViewClassName(props.viewSpec)), renderProps: renderProps, classNameGenerator: options.viewClassNames, generatorName: undefined, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount }), () => props.children));
6771
6928
  }
6772
6929
  }
6773
- function buildViewClassNames(viewSpec) {
6774
- return [
6775
- `fc-${viewSpec.type}-view`,
6776
- 'fc-view',
6777
- ];
6930
+ function buildViewClassName(viewSpec) {
6931
+ return `fc-${viewSpec.type}-view fc-view`;
6778
6932
  }
6779
6933
 
6780
6934
  const EVENT_SOURCE_REFINERS = {
@@ -6813,7 +6967,7 @@ var FullCalendar = (function (exports) {
6813
6967
  success: refined.success,
6814
6968
  failure: refined.failure,
6815
6969
  publicId: refined.id || '',
6816
- sourceId: guid(),
6970
+ sourceId: guid$1(),
6817
6971
  sourceDefId: metaRes.sourceDefId,
6818
6972
  meta: metaRes.meta,
6819
6973
  ui: createEventUi(refined, context),
@@ -6853,7 +7007,7 @@ var FullCalendar = (function (exports) {
6853
7007
  callback();
6854
7008
  }
6855
7009
  updateSize() {
6856
- console.warn('Doesnt do anything!');
7010
+ requestAnimationFrame(updateSizeSync);
6857
7011
  }
6858
7012
  // Options
6859
7013
  // -----------------------------------------------------------------------------------------------------------------
@@ -7261,6 +7415,32 @@ var FullCalendar = (function (exports) {
7261
7415
  }
7262
7416
  }
7263
7417
 
7418
+ class StickyFooterScrollbar extends BaseComponent {
7419
+ constructor() {
7420
+ super(...arguments);
7421
+ this.rootElRef = m$1();
7422
+ }
7423
+ render() {
7424
+ const { props } = this;
7425
+ // NOTE: we need a wrapper around the Scroller because if scrollbars appear/hide,
7426
+ // the outer dimensions change, but the inner dimensions do not. The Scroller's
7427
+ // dimension-watching, when used in ponyfill-mode, can't fire on border-box change, so we
7428
+ // workaround it by monitoring dimensions of a wrapper instead
7429
+ return (_("div", { ref: this.rootElRef, className: 'fc-sticky-footer-scrollbar' },
7430
+ _(Scroller, { horizontal: true, ref: props.scrollerRef },
7431
+ _("div", { style: { minWidth: props.canvasWidth } }))));
7432
+ }
7433
+ componentDidMount() {
7434
+ this.disconnectHeight = watchHeight(this.rootElRef.current, (height) => {
7435
+ setRef(this.props.scrollbarWidthRef, height);
7436
+ });
7437
+ }
7438
+ componentWillUnmount() {
7439
+ this.disconnectHeight();
7440
+ setRef(this.props.scrollbarWidthRef, null);
7441
+ }
7442
+ }
7443
+
7264
7444
  var internal = {
7265
7445
  __proto__: null,
7266
7446
  BASE_OPTION_DEFAULTS: BASE_OPTION_DEFAULTS,
@@ -7282,9 +7462,8 @@ var FullCalendar = (function (exports) {
7282
7462
  compareNumbers: compareNumbers,
7283
7463
  enableCursor: enableCursor,
7284
7464
  disableCursor: disableCursor,
7285
- guid: guid,
7465
+ guid: guid$1,
7286
7466
  computeVisibleDayRange: computeVisibleDayRange,
7287
- isMultiDayRange: isMultiDayRange,
7288
7467
  diffDates: diffDates,
7289
7468
  removeExact: removeExact,
7290
7469
  isArraysEqual: isArraysEqual,
@@ -7303,14 +7482,10 @@ var FullCalendar = (function (exports) {
7303
7482
  isPropsEqual: isPropsEqual,
7304
7483
  compareObjs: compareObjs,
7305
7484
  collectFromHash: collectFromHash,
7306
- findElements: findElements,
7307
- findDirectChildren: findDirectChildren,
7308
- removeElement: removeElement,
7309
7485
  applyStyle: applyStyle,
7310
- elementMatches: elementMatches,
7311
- elementClosest: elementClosest,
7312
7486
  getEventTargetViaRoot: getEventTargetViaRoot,
7313
7487
  getUniqueDomId: getUniqueDomId,
7488
+ joinClassNames: joinClassNames,
7314
7489
  parseClassNames: parseClassNames,
7315
7490
  fracToCssDim: fracToCssDim,
7316
7491
  createEmptyEventStore: createEmptyEventStore,
@@ -7320,11 +7495,9 @@ var FullCalendar = (function (exports) {
7320
7495
  combineEventUis: combineEventUis,
7321
7496
  createEventUi: createEventUi,
7322
7497
  Splitter: Splitter,
7323
- getDayClassNames: getDayClassNames,
7498
+ getDayClassName: getDayClassName,
7324
7499
  getDateMeta: getDateMeta,
7325
- getSlotClassNames: getSlotClassNames,
7326
- setStateDimMap: setStateDimMap,
7327
- isDimMapsEqual: isDimMapsEqual,
7500
+ getSlotClassName: getSlotClassName,
7328
7501
  isDimsEqual: isDimsEqual,
7329
7502
  watchSize: watchSize,
7330
7503
  watchWidth: watchWidth,
@@ -7381,11 +7554,8 @@ var FullCalendar = (function (exports) {
7381
7554
  NamedTimeZoneImpl: NamedTimeZoneImpl,
7382
7555
  parseMarker: parse,
7383
7556
  SegHierarchy: SegHierarchy,
7384
- buildEntryKey: buildEntryKey,
7385
- getEntrySpanEnd: getEntrySpanEnd,
7557
+ groupIntersectingSegs: groupIntersectingSegs,
7386
7558
  binarySearch: binarySearch,
7387
- groupIntersectingEntries: groupIntersectingEntries,
7388
- intersectSpans: intersectSpans,
7389
7559
  Interaction: Interaction,
7390
7560
  interactionSettingsToStore: interactionSettingsToStore,
7391
7561
  interactionSettingsStore: interactionSettingsStore,
@@ -7396,12 +7566,13 @@ var FullCalendar = (function (exports) {
7396
7566
  DaySeriesModel: DaySeriesModel,
7397
7567
  sliceEventStore: sliceEventStore,
7398
7568
  hasBgRendering: hasBgRendering,
7399
- getElSeg: getElSeg,
7400
- buildSegTimeText: buildSegTimeText,
7569
+ getElEventRange: getElEventRange,
7570
+ buildEventRangeTimeText: buildEventRangeTimeText,
7401
7571
  sortEventSegs: sortEventSegs,
7402
- getSegMeta: getSegMeta,
7572
+ getEventRangeMeta: getEventRangeMeta,
7403
7573
  buildEventRangeKey: buildEventRangeKey,
7404
- getSegAnchorAttrs: getSegAnchorAttrs,
7574
+ getEventRangeAnchorAttrs: getEventRangeAnchorAttrs,
7575
+ getEventKey: getEventKey,
7405
7576
  DayTableModel: DayTableModel,
7406
7577
  Scroller: Scroller,
7407
7578
  getNormalizedScrollX: getNormalizedScrollX,
@@ -7423,7 +7594,6 @@ var FullCalendar = (function (exports) {
7423
7594
  RefMap: RefMap,
7424
7595
  getIsRtlScrollbarOnLeft: getIsRtlScrollbarOnLeft,
7425
7596
  NowTimer: NowTimer,
7426
- ScrollResponder: ScrollResponder,
7427
7597
  StandardEvent: StandardEvent,
7428
7598
  NowIndicatorContainer: NowIndicatorContainer,
7429
7599
  DayCellContainer: DayCellContainer,
@@ -7433,7 +7603,6 @@ var FullCalendar = (function (exports) {
7433
7603
  BgEvent: BgEvent,
7434
7604
  WeekNumberContainer: WeekNumberContainer,
7435
7605
  MoreLinkContainer: MoreLinkContainer,
7436
- computeEarliestSegStart: computeEarliestSegStart,
7437
7606
  ViewContainer: ViewContainer,
7438
7607
  triggerDateSelect: triggerDateSelect,
7439
7608
  getDefaultEventEnd: getDefaultEventEnd,
@@ -7443,7 +7612,12 @@ var FullCalendar = (function (exports) {
7443
7612
  buildEventApis: buildEventApis,
7444
7613
  buildElAttrs: buildElAttrs,
7445
7614
  ContentContainer: ContentContainer,
7446
- CustomRenderingStore: CustomRenderingStore
7615
+ renderText: renderText,
7616
+ CustomRenderingStore: CustomRenderingStore,
7617
+ computeEarliestStart: computeEarliestStart,
7618
+ computeLatestEnd: computeLatestEnd,
7619
+ getCoordRangeEnd: getCoordRangeEnd,
7620
+ StickyFooterScrollbar: StickyFooterScrollbar
7447
7621
  };
7448
7622
 
7449
7623
  const globalLocales = [];
@@ -7544,7 +7718,7 @@ var FullCalendar = (function (exports) {
7544
7718
  // TODO: easier way to add new hooks? need to update a million things
7545
7719
  function createPlugin(input) {
7546
7720
  return {
7547
- id: guid(),
7721
+ id: guid$1(),
7548
7722
  name: input.name,
7549
7723
  premiumReleaseDate: input.premiumReleaseDate ? new Date(input.premiumReleaseDate) : undefined,
7550
7724
  deps: input.deps || [],
@@ -7799,7 +7973,7 @@ var FullCalendar = (function (exports) {
7799
7973
  };
7800
7974
  }
7801
7975
  function createViewHookComponent(options) {
7802
- return (viewProps) => (_(ViewContextType.Consumer, null, (context) => (_(ContentContainer, { elTag: "div", elClasses: buildViewClassNames(context.viewSpec), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }), generatorName: undefined, customGenerator: options.content, classNameGenerator: options.classNames, didMount: options.didMount, willUnmount: options.willUnmount }))));
7976
+ return (viewProps) => (_(ViewContextType.Consumer, null, (context) => (_(ContentContainer, { tag: "div", className: buildViewClassName(context.viewSpec), renderProps: Object.assign(Object.assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }), generatorName: undefined, customGenerator: options.content, classNameGenerator: options.classNames, didMount: options.didMount, willUnmount: options.willUnmount }))));
7803
7977
  }
7804
7978
 
7805
7979
  function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) {
@@ -8019,7 +8193,7 @@ var FullCalendar = (function (exports) {
8019
8193
  function fetchSource(eventSource, fetchRange, isRefetch, context) {
8020
8194
  let { options, calendarApi } = context;
8021
8195
  let sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId];
8022
- let fetchId = guid();
8196
+ let fetchId = guid$1();
8023
8197
  sourceDef.fetch({
8024
8198
  eventSource,
8025
8199
  range: fetchRange,
@@ -9067,7 +9241,7 @@ var FullCalendar = (function (exports) {
9067
9241
  render() {
9068
9242
  let children = this.props.widgetGroups.map((widgetGroup) => this.renderWidgetGroup(widgetGroup));
9069
9243
  return _('div', {
9070
- className: 'fc-toolbar-chunk fc-toolbar-' + this.props.name
9244
+ className: 'fc-toolbar-section fc-toolbar-' + this.props.name
9071
9245
  }, ...children);
9072
9246
  }
9073
9247
  renderWidgetGroup(widgetGroup) {
@@ -9086,15 +9260,11 @@ var FullCalendar = (function (exports) {
9086
9260
  let isDisabled = (!props.isTodayEnabled && buttonName === 'today') ||
9087
9261
  (!props.isPrevEnabled && buttonName === 'prev') ||
9088
9262
  (!props.isNextEnabled && buttonName === 'next');
9089
- let buttonClasses = [`fc-${buttonName}-button`, theme.getClass('button')];
9090
- if (isPressed) {
9091
- buttonClasses.push(theme.getClass('buttonActive'));
9092
- }
9093
- children.push(_("button", { type: "button", title: typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: buttonClasses.join(' '), onClick: buttonClick }, buttonText || (buttonIcon ? _("span", { className: buttonIcon, role: "img" }) : '')));
9263
+ children.push(_("button", { type: "button", title: typeof buttonHint === 'function' ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: joinClassNames(`fc-${buttonName}-button`, theme.getClassName('button'), isPressed && theme.getClassName('buttonActive')), onClick: buttonClick }, buttonText || (buttonIcon ? _("span", { className: buttonIcon, role: "img" }) : '')));
9094
9264
  }
9095
9265
  }
9096
9266
  if (children.length > 1) {
9097
- let groupClassName = (isOnlyButtons && theme.getClass('buttonGroup')) || '';
9267
+ let groupClassName = (isOnlyButtons && theme.getClassName('buttonGroup')) || '';
9098
9268
  return _('div', { className: groupClassName }, ...children);
9099
9269
  }
9100
9270
  return children[0];
@@ -9103,7 +9273,7 @@ var FullCalendar = (function (exports) {
9103
9273
 
9104
9274
  class Toolbar extends BaseComponent {
9105
9275
  render() {
9106
- let { model, extraClassName } = this.props;
9276
+ let { model, className } = this.props;
9107
9277
  let forceLtr = false;
9108
9278
  let startContent;
9109
9279
  let endContent;
@@ -9123,12 +9293,7 @@ var FullCalendar = (function (exports) {
9123
9293
  else {
9124
9294
  endContent = sectionWidgets.end;
9125
9295
  }
9126
- let classNames = [
9127
- extraClassName || '',
9128
- 'fc-toolbar',
9129
- forceLtr ? 'fc-toolbar-ltr' : '',
9130
- ];
9131
- return (_("div", { className: classNames.join(' ') },
9296
+ return (_("div", { className: joinClassNames(className, 'fc-toolbar', forceLtr && 'fc-toolbar-ltr') },
9132
9297
  this.renderSection('start', startContent || []),
9133
9298
  this.renderSection('center', centerContent || []),
9134
9299
  this.renderSection('end', endContent || [])));
@@ -9148,22 +9313,15 @@ var FullCalendar = (function (exports) {
9148
9313
  this.handleSegClick = (ev, segEl) => {
9149
9314
  let { component } = this;
9150
9315
  let { context } = component;
9151
- let seg = getElSeg(segEl);
9152
- if (seg && // might be the <div> surrounding the more link
9316
+ let eventRange = getElEventRange(segEl);
9317
+ if (eventRange && // might be the <div> surrounding the more link
9153
9318
  component.isValidSegDownEl(ev.target)) {
9154
- // our way to simulate a link click for elements that can't be <a> tags
9155
- // grab before trigger fired in case trigger trashes DOM thru rerendering
9156
- let hasUrlContainer = elementClosest(ev.target, '.fc-event-forced-url');
9157
- let url = hasUrlContainer ? hasUrlContainer.querySelector('a[href]').href : '';
9158
9319
  context.emitter.trigger('eventClick', {
9159
9320
  el: segEl,
9160
- event: new EventImpl(component.context, seg.eventRange.def, seg.eventRange.instance),
9321
+ event: new EventImpl(component.context, eventRange.def, eventRange.instance),
9161
9322
  jsEvent: ev,
9162
9323
  view: context.viewApi,
9163
9324
  });
9164
- if (url && !ev.defaultPrevented) {
9165
- window.location.href = url;
9166
- }
9167
9325
  }
9168
9326
  };
9169
9327
  this.destroy = listenBySelector(settings.el, 'click', '.fc-event', // on both fg and bg events
@@ -9185,7 +9343,7 @@ var FullCalendar = (function (exports) {
9185
9343
  }
9186
9344
  };
9187
9345
  this.handleSegEnter = (ev, segEl) => {
9188
- if (getElSeg(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper
9346
+ if (getElEventRange(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper
9189
9347
  this.currentSegEl = segEl;
9190
9348
  this.triggerEvent('eventMouseEnter', ev, segEl);
9191
9349
  }
@@ -9205,11 +9363,11 @@ var FullCalendar = (function (exports) {
9205
9363
  triggerEvent(publicEvName, ev, segEl) {
9206
9364
  let { component } = this;
9207
9365
  let { context } = component;
9208
- let seg = getElSeg(segEl);
9366
+ let eventRange = getElEventRange(segEl);
9209
9367
  if (!ev || component.isValidSegDownEl(ev.target)) {
9210
9368
  context.emitter.trigger(publicEvName, {
9211
9369
  el: segEl,
9212
- event: new EventImpl(context, seg.eventRange.def, seg.eventRange.instance),
9370
+ event: new EventImpl(context, eventRange.def, eventRange.instance),
9213
9371
  jsEvent: ev,
9214
9372
  view: context.viewApi,
9215
9373
  });
@@ -9220,16 +9378,12 @@ var FullCalendar = (function (exports) {
9220
9378
  class ViewHarness extends b {
9221
9379
  render() {
9222
9380
  const { props } = this;
9223
- return (_("div", { className: [
9224
- 'fc-view-harness',
9225
- props.height != null
9226
- ? 'fc-view-harness-fixedheight'
9227
- : props.heightLiquid
9228
- ? 'fc-view-harness-liquid'
9229
- : props.aspectRatio != null
9230
- ? 'fc-view-harness-aspectratio'
9231
- : ''
9232
- ].join(' '), style: {
9381
+ return (_("div", { className: joinClassNames('fc-view-outer', props.height != null
9382
+ ? 'fc-view-outer-static'
9383
+ : props.heightLiquid
9384
+ ? 'fc-view-outer-liquid'
9385
+ : props.aspectRatio != null
9386
+ && 'fc-view-outer-aspect-ratio'), style: {
9233
9387
  height: props.height,
9234
9388
  paddingBottom: props.aspectRatio != null
9235
9389
  ? `${(1 / props.aspectRatio) * 100}%`
@@ -9253,7 +9407,10 @@ var FullCalendar = (function (exports) {
9253
9407
  EventClicking,
9254
9408
  EventHovering,
9255
9409
  ];
9256
- let interactionClasses = DEFAULT_INTERACTIONS.concat(this.props.pluginHooks.componentInteractions);
9410
+ let interactionClasses = DEFAULT_INTERACTIONS;
9411
+ if (!settingsInput.disableHits) {
9412
+ interactionClasses = interactionClasses.concat(this.props.pluginHooks.componentInteractions);
9413
+ }
9257
9414
  let interactions = interactionClasses.map((TheInteractionClass) => new TheInteractionClass(settings));
9258
9415
  this.interactionsStore[component.uid] = interactions;
9259
9416
  interactionSettingsStore[component.uid] = settings;
@@ -9292,11 +9449,11 @@ var FullCalendar = (function (exports) {
9292
9449
  }
9293
9450
  let 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);
9294
9451
  return (_(ViewContextType.Provider, { value: viewContext },
9295
- toolbarConfig.header && (_(Toolbar, Object.assign({ extraClassName: "fc-header-toolbar", model: toolbarConfig.header }, toolbarProps))),
9452
+ toolbarConfig.header && (_(Toolbar, Object.assign({ className: "fc-header-toolbar", model: toolbarConfig.header }, toolbarProps))),
9296
9453
  _(ViewHarness, { height: viewHeight, heightLiquid: viewHeightLiquid, aspectRatio: viewAspectRatio },
9297
9454
  this.renderView(props),
9298
9455
  this.buildAppendContent()),
9299
- toolbarConfig.footer && (_(Toolbar, Object.assign({ extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer }, toolbarProps)))));
9456
+ toolbarConfig.footer && (_(Toolbar, Object.assign({ className: "fc-footer-toolbar", model: toolbarConfig.footer }, toolbarProps)))));
9300
9457
  }
9301
9458
  componentDidMount() {
9302
9459
  let { props } = this;
@@ -9517,7 +9674,7 @@ var FullCalendar = (function (exports) {
9517
9674
  return sliceEventStore(props.eventStore, props.eventUiBases, props.dateProfile.activeRange, allDay ? props.nextDayThreshold : null).fg;
9518
9675
  }
9519
9676
 
9520
- const version = '7.0.0-beta.0';
9677
+ const version = '7.0.0-beta.3';
9521
9678
 
9522
9679
  exports.Calendar = Calendar;
9523
9680
  exports.Internal = internal;