@event-calendar/core 4.6.0 → 4.7.0

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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * EventCalendar v4.6.0
2
+ * EventCalendar v4.7.0
3
3
  * https://github.com/vkurko/calendar
4
4
  */
5
5
  import { tick, getContext, untrack, setContext, onMount, mount, unmount } from "svelte";
@@ -18,9 +18,9 @@ function setContent(node, content) {
18
18
  update(content2) {
19
19
  if (typeof content2 == "string") {
20
20
  node.innerText = content2;
21
- } else if (content2 == null ? void 0 : content2.domNodes) {
21
+ } else if (content2?.domNodes) {
22
22
  node.replaceChildren(...content2.domNodes);
23
- } else if (content2 == null ? void 0 : content2.html) {
23
+ } else if (content2?.html) {
24
24
  node.innerHTML = content2.html;
25
25
  }
26
26
  }
@@ -251,7 +251,7 @@ function flushDebounce(queue) {
251
251
  queue.clear();
252
252
  }
253
253
  function task(fn, handle, tasks) {
254
- handle ?? (handle = fn);
254
+ handle ??= fn;
255
255
  if (!tasks.has(handle)) {
256
256
  tasks.set(handle, setTimeout(() => {
257
257
  tasks.delete(handle);
@@ -264,7 +264,7 @@ function setPayload(obj, payload) {
264
264
  obj[payloadProp] = payload;
265
265
  }
266
266
  function hasPayload(obj) {
267
- return !!(obj == null ? void 0 : obj[payloadProp]);
267
+ return !!obj?.[payloadProp];
268
268
  }
269
269
  function getPayload(obj) {
270
270
  return obj[payloadProp];
@@ -555,11 +555,10 @@ function repositionEvent$1(chunk, longChunks, height2) {
555
555
  return margin;
556
556
  }
557
557
  function runReposition(refs, data) {
558
- var _a;
559
558
  refs.length = data.length;
560
559
  let result = [];
561
560
  for (let ref of refs) {
562
- result.push((_a = ref == null ? void 0 : ref.reposition) == null ? void 0 : _a.call(ref));
561
+ result.push(ref?.reposition?.());
563
562
  }
564
563
  return result;
565
564
  }
@@ -671,12 +670,10 @@ function createResource(input) {
671
670
  };
672
671
  }
673
672
  function resourceBackgroundColor(event, resources) {
674
- var _a;
675
- return (_a = findResource(event, resources)) == null ? void 0 : _a.eventBackgroundColor;
673
+ return findResource(event, resources)?.eventBackgroundColor;
676
674
  }
677
675
  function resourceTextColor(event, resources) {
678
- var _a;
679
- return (_a = findResource(event, resources)) == null ? void 0 : _a.eventTextColor;
676
+ return findResource(event, resources)?.eventTextColor;
680
677
  }
681
678
  function findResource(event, resources) {
682
679
  return resources.find((resource) => event.resourceIds.includes(resource.id));
@@ -784,7 +781,7 @@ function createSlotTimeLimits($slotMinTime, $slotMaxTime, $flexibleSlotTimeLimit
784
781
  if ($flexibleSlotTimeLimits) {
785
782
  let minMin = createDuration(min(toSeconds(min$1), max(0, toSeconds(max$1) - DAY_IN_SECONDS)));
786
783
  let maxMax = createDuration(max(toSeconds(max$1), toSeconds(minMin) + DAY_IN_SECONDS));
787
- let filter = isFunction($flexibleSlotTimeLimits == null ? void 0 : $flexibleSlotTimeLimits.eventFilter) ? $flexibleSlotTimeLimits.eventFilter : (event) => !bgEvent(event.display);
784
+ let filter = isFunction($flexibleSlotTimeLimits?.eventFilter) ? $flexibleSlotTimeLimits.eventFilter : (event) => !bgEvent(event.display);
788
785
  loop: for (let date of $_viewDates) {
789
786
  let start = addDuration(cloneDate(date), min$1);
790
787
  let end = addDuration(cloneDate(date), max$1);
@@ -813,8 +810,8 @@ function createSlotTimeLimits($slotMinTime, $slotMaxTime, $flexibleSlotTimeLimit
813
810
  }
814
811
  return { min: min$1, max: max$1 };
815
812
  }
813
+ const specialOptions = ["buttonText", "customButtons", "theme"];
816
814
  function createOptions(plugins) {
817
- var _a;
818
815
  let options = {
819
816
  allDayContent: void 0,
820
817
  allDaySlot: true,
@@ -940,12 +937,11 @@ function createOptions(plugins) {
940
937
  views: {}
941
938
  };
942
939
  for (let plugin of plugins) {
943
- (_a = plugin.createOptions) == null ? void 0 : _a.call(plugin, options);
940
+ plugin.createOptions?.(options);
944
941
  }
945
942
  return options;
946
943
  }
947
944
  function createParsers(plugins) {
948
- var _a;
949
945
  let parsers = {
950
946
  date: (date) => setMidnight(createDate(date)),
951
947
  duration: createDuration,
@@ -962,7 +958,7 @@ function createParsers(plugins) {
962
958
  validRange: createDateRange
963
959
  };
964
960
  for (let plugin of plugins) {
965
- (_a = plugin.createParsers) == null ? void 0 : _a.call(plugin, parsers);
961
+ plugin.createParsers?.(parsers);
966
962
  }
967
963
  return parsers;
968
964
  }
@@ -976,7 +972,7 @@ function diff(options, prevOptions) {
976
972
  return diff2;
977
973
  }
978
974
  function dayGrid(state) {
979
- return derived(state.view, ($view) => $view == null ? void 0 : $view.startsWith("dayGrid"));
975
+ return derived(state.view, ($view) => $view?.startsWith("dayGrid"));
980
976
  }
981
977
  function activeRange(state) {
982
978
  return derived(
@@ -1150,7 +1146,6 @@ function today(state) {
1150
1146
  }
1151
1147
  class State {
1152
1148
  constructor(plugins, input) {
1153
- var _a, _b;
1154
1149
  plugins = plugins || [];
1155
1150
  let options = createOptions(plugins);
1156
1151
  let parsers = createParsers(plugins);
@@ -1196,7 +1191,7 @@ class State {
1196
1191
  };
1197
1192
  this._get = (key) => validKey(key, this) ? get(this[key]) : void 0;
1198
1193
  for (let plugin of plugins) {
1199
- (_a = plugin.createStores) == null ? void 0 : _a.call(plugin, this);
1194
+ plugin.createStores?.(this);
1200
1195
  }
1201
1196
  if (input.view) {
1202
1197
  this.view.set(input.view);
@@ -1204,14 +1199,14 @@ class State {
1204
1199
  let views = /* @__PURE__ */ new Set([...keys(options.views), ...keys(input.views ?? {})]);
1205
1200
  for (let view2 of views) {
1206
1201
  let defOpts = mergeOpts(options, options.views[view2] ?? {});
1207
- let opts = mergeOpts(defOpts, input, ((_b = input.views) == null ? void 0 : _b[view2]) ?? {});
1202
+ let opts = mergeOpts(defOpts, input, input.views?.[view2] ?? {});
1208
1203
  let component = opts.component;
1209
1204
  filterOpts(opts, this);
1210
1205
  for (let key of keys(opts)) {
1211
1206
  let { set, _set = set, ...rest } = this[key];
1212
1207
  this[key] = {
1213
1208
  // Set value in all views
1214
- set: ["buttonText", "theme"].includes(key) ? (value) => {
1209
+ set: specialOptions.includes(key) ? (value) => {
1215
1210
  if (isFunction(value)) {
1216
1211
  let result = value(defOpts[key]);
1217
1212
  opts[key] = result;
@@ -1263,7 +1258,7 @@ function mergeOpts(...args) {
1263
1258
  let result = {};
1264
1259
  for (let opts of args) {
1265
1260
  let override = {};
1266
- for (let key of ["buttonText", "theme"]) {
1261
+ for (let key of specialOptions) {
1267
1262
  if (isFunction(opts[key])) {
1268
1263
  override[key] = opts[key](result[key]);
1269
1264
  }
@@ -1290,7 +1285,6 @@ var root_10$1 = $.from_html(`<button></button>`);
1290
1285
  var root_12$1 = $.from_html(`<button> </button>`);
1291
1286
  function Buttons($$anchor, $$props) {
1292
1287
  $.push($$props, false);
1293
- const [$$stores, $$cleanup] = $.setup_stores();
1294
1288
  const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
1295
1289
  const $date = () => $.store_get(date, "$date", $$stores);
1296
1290
  const $duration = () => $.store_get(duration, "$duration", $$stores);
@@ -1302,6 +1296,7 @@ function Buttons($$anchor, $$props) {
1302
1296
  const $buttonText = () => $.store_get(buttonText, "$buttonText", $$stores);
1303
1297
  const $customButtons = () => $.store_get(customButtons, "$customButtons", $$stores);
1304
1298
  const $view = () => $.store_get(view2, "$view", $$stores);
1299
+ const [$$stores, $$cleanup] = $.setup_stores();
1305
1300
  let buttons = $.prop($$props, "buttons", 8);
1306
1301
  let {
1307
1302
  _currentRange,
@@ -1371,7 +1366,7 @@ function Buttons($$anchor, $$props) {
1371
1366
  {
1372
1367
  var consequent = ($$anchor3) => {
1373
1368
  var h2 = root_2$7();
1374
- $.action(h2, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), $_viewTitle);
1369
+ $.action(h2, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), $_viewTitle);
1375
1370
  $.template_effect(() => $.set_class(h2, 1, ($theme(), $.untrack(() => $theme().title))));
1376
1371
  $.append($$anchor3, h2);
1377
1372
  };
@@ -1434,10 +1429,9 @@ function Buttons($$anchor, $$props) {
1434
1429
  var consequent_4 = ($$anchor7) => {
1435
1430
  var button_4 = root_10$1();
1436
1431
  $.effect(() => $.event("click", button_4, function(...$$args) {
1437
- var _a;
1438
- (_a = $customButtons()[$.get(button)].click) == null ? void 0 : _a.apply(this, $$args);
1432
+ $customButtons()[$.get(button)].click?.apply(this, $$args);
1439
1433
  }));
1440
- $.action(button_4, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $customButtons()[$.get(button)].text);
1434
+ $.action(button_4, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $customButtons()[$.get(button)].text);
1441
1435
  $.template_effect(() => $.set_class(button_4, 1, `${($theme(), $.untrack(() => $theme().button)) ?? ""} ec-${$.get(button) ?? ""}${($customButtons(), $.get(button), $theme(), $.untrack(() => $customButtons()[$.get(button)].active ? " " + $theme().active : "")) ?? ""}`));
1442
1436
  $.append($$anchor7, button_4);
1443
1437
  };
@@ -1526,15 +1520,14 @@ var root_1$d = $.from_html(`<div></div>`);
1526
1520
  var root$r = $.from_html(`<nav></nav>`);
1527
1521
  function Toolbar($$anchor, $$props) {
1528
1522
  $.push($$props, true);
1529
- const [$$stores, $$cleanup] = $.setup_stores();
1530
1523
  const $headerToolbar = () => $.store_get(headerToolbar, "$headerToolbar", $$stores);
1531
1524
  const $theme = () => $.store_get(theme, "$theme", $$stores);
1525
+ const [$$stores, $$cleanup] = $.setup_stores();
1532
1526
  let { headerToolbar, theme } = getContext("state");
1533
1527
  let sections = $.derived(() => {
1534
- var _a;
1535
1528
  let sections2 = {};
1536
1529
  for (let key of ["start", "center", "end"]) {
1537
- sections2[key] = ((_a = $headerToolbar()[key]) == null ? void 0 : _a.split(" ").map((group) => group.split(","))) ?? [];
1530
+ sections2[key] = $headerToolbar()[key]?.split(" ").map((group) => group.split(",")) ?? [];
1538
1531
  }
1539
1532
  return sections2;
1540
1533
  });
@@ -1583,7 +1576,6 @@ function Toolbar($$anchor, $$props) {
1583
1576
  }
1584
1577
  function Auxiliary$1($$anchor, $$props) {
1585
1578
  $.push($$props, true);
1586
- const [$$stores, $$cleanup] = $.setup_stores();
1587
1579
  const $_activeRange = () => $.store_get(_activeRange, "$_activeRange", $$stores);
1588
1580
  const $datesSet = () => $.store_get(datesSet, "$datesSet", $$stores);
1589
1581
  const $_view = () => $.store_get(_view, "$_view", $$stores);
@@ -1593,6 +1585,7 @@ function Auxiliary$1($$anchor, $$props) {
1593
1585
  const $_recheckScrollable = () => $.store_get(_recheckScrollable, "$_recheckScrollable", $$stores);
1594
1586
  const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
1595
1587
  const $_auxiliary = () => $.store_get(_auxiliary, "$_auxiliary", $$stores);
1588
+ const [$$stores, $$cleanup] = $.setup_stores();
1596
1589
  let {
1597
1590
  datesSet,
1598
1591
  eventAllUpdated,
@@ -1660,7 +1653,6 @@ function Auxiliary$1($$anchor, $$props) {
1660
1653
  var root$q = $.from_html(`<div><!> <!></div> <!>`, 1);
1661
1654
  function Calendar($$anchor, $$props) {
1662
1655
  $.push($$props, true);
1663
- const [$$stores, $$cleanup] = $.setup_stores();
1664
1656
  const $_events = () => $.store_get(_events, "$_events", $$stores);
1665
1657
  const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
1666
1658
  const $date = () => $.store_get(date, "$date", $$stores);
@@ -1672,6 +1664,7 @@ function Calendar($$anchor, $$props) {
1672
1664
  const $_iClass = () => $.store_get(_iClass, "$_iClass", $$stores);
1673
1665
  const $height = () => $.store_get(height2, "$height", $$stores);
1674
1666
  const $view = () => $.store_get(view2, "$view", $$stores);
1667
+ const [$$stores, $$cleanup] = $.setup_stores();
1675
1668
  let plugins = $.prop($$props, "plugins", 19, () => []), options = $.prop($$props, "options", 19, () => ({}));
1676
1669
  let state = new State(plugins(), options());
1677
1670
  setContext("state", state);
@@ -1749,8 +1742,7 @@ function Calendar($$anchor, $$props) {
1749
1742
  return toViewWithLocalDates(get(state._view));
1750
1743
  }
1751
1744
  function unselect() {
1752
- var _a;
1753
- (_a = $_interaction().action) == null ? void 0 : _a.unselect();
1745
+ $_interaction().action?.unselect();
1754
1746
  return this;
1755
1747
  }
1756
1748
  function dateFromPoint(x, y) {
@@ -1771,6 +1763,21 @@ function Calendar($$anchor, $$props) {
1771
1763
  return this;
1772
1764
  }
1773
1765
  let View2 = $.derived($_viewComponent);
1766
+ var $$exports = {
1767
+ setOption,
1768
+ getOption,
1769
+ refetchEvents,
1770
+ getEvents,
1771
+ getEventById,
1772
+ addEvent,
1773
+ updateEvent,
1774
+ removeEventById,
1775
+ getView,
1776
+ unselect,
1777
+ dateFromPoint,
1778
+ next,
1779
+ prev
1780
+ };
1774
1781
  var fragment = root$q();
1775
1782
  var div = $.first_child(fragment);
1776
1783
  let styles;
@@ -1795,21 +1802,7 @@ function Calendar($$anchor, $$props) {
1795
1802
  ]
1796
1803
  );
1797
1804
  $.append($$anchor, fragment);
1798
- var $$pop = $.pop({
1799
- setOption,
1800
- getOption,
1801
- refetchEvents,
1802
- getEvents,
1803
- getEventById,
1804
- addEvent,
1805
- updateEvent,
1806
- removeEventById,
1807
- getView,
1808
- unselect,
1809
- dateFromPoint,
1810
- next,
1811
- prev
1812
- });
1805
+ var $$pop = $.pop($$exports);
1813
1806
  $$cleanup();
1814
1807
  return $$pop;
1815
1808
  }
@@ -1835,11 +1828,11 @@ var root_1$c = $.from_html(`<div role="columnheader"><span></span></div>`);
1835
1828
  var root$p = $.from_html(`<div><div role="row"></div> <div></div></div>`);
1836
1829
  function Header$1($$anchor, $$props) {
1837
1830
  $.push($$props, false);
1838
- const [$$stores, $$cleanup] = $.setup_stores();
1839
1831
  const $theme = () => $.store_get(theme, "$theme", $$stores);
1840
1832
  const $_days = () => $.store_get(_days, "$_days", $$stores);
1841
1833
  const $_intlDayHeaderAL = () => $.store_get(_intlDayHeaderAL, "$_intlDayHeaderAL", $$stores);
1842
1834
  const $_intlDayHeader = () => $.store_get(_intlDayHeader, "$_intlDayHeader", $$stores);
1835
+ const [$$stores, $$cleanup] = $.setup_stores();
1843
1836
  let { theme, _intlDayHeader, _intlDayHeaderAL, _days } = getContext("state");
1844
1837
  $.init();
1845
1838
  var div = root$p();
@@ -1847,7 +1840,7 @@ function Header$1($$anchor, $$props) {
1847
1840
  $.each(div_1, 5, $_days, $.index, ($$anchor2, day) => {
1848
1841
  var div_2 = root_1$c();
1849
1842
  var span = $.child(div_2);
1850
- $.action(span, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $_intlDayHeader().format($.get(day)));
1843
+ $.action(span, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(day)));
1851
1844
  $.reset(div_2);
1852
1845
  $.template_effect(
1853
1846
  ($0, $1) => {
@@ -1855,10 +1848,7 @@ function Header$1($$anchor, $$props) {
1855
1848
  $.set_attribute(span, "aria-label", $1);
1856
1849
  },
1857
1850
  [
1858
- () => {
1859
- var _a;
1860
- return (_a = $theme().weekdays) == null ? void 0 : _a[$.get(day).getUTCDay()];
1861
- },
1851
+ () => $theme().weekdays?.[$.get(day).getUTCDay()],
1862
1852
  () => $_intlDayHeaderAL().format($.get(day))
1863
1853
  ]
1864
1854
  );
@@ -1880,7 +1870,6 @@ var root_1$b = $.from_html(`<div></div>`);
1880
1870
  var root$o = $.from_html(`<article><!></article>`);
1881
1871
  function BaseEvent($$anchor, $$props) {
1882
1872
  $.push($$props, true);
1883
- const [$$stores, $$cleanup] = $.setup_stores();
1884
1873
  const $resources = () => $.store_get(resources, "$resources", $$stores);
1885
1874
  const $eventBackgroundColor = () => $.store_get(eventBackgroundColor, "$eventBackgroundColor", $$stores);
1886
1875
  const $eventColor = () => $.store_get(eventColor, "$eventColor", $$stores);
@@ -1895,6 +1884,7 @@ function BaseEvent($$anchor, $$props) {
1895
1884
  const $eventClick = () => $.store_get(eventClick, "$eventClick", $$stores);
1896
1885
  const $eventMouseEnter = () => $.store_get(eventMouseEnter, "$eventMouseEnter", $$stores);
1897
1886
  const $eventMouseLeave = () => $.store_get(eventMouseLeave, "$eventMouseLeave", $$stores);
1887
+ const [$$stores, $$cleanup] = $.setup_stores();
1898
1888
  let el = $.prop($$props, "el", 15), classes = $.prop($$props, "classes", 3, identity), styles = $.prop($$props, "styles", 3, identity);
1899
1889
  let {
1900
1890
  displayEventEnd,
@@ -1946,21 +1936,18 @@ function BaseEvent($$anchor, $$props) {
1946
1936
  let onmouseleave = $.derived(() => createHandler($eventMouseLeave(), $.get(display)));
1947
1937
  var article = root$o();
1948
1938
  article.__click = function(...$$args) {
1949
- var _a;
1950
- (_a = $.get(onclick2)) == null ? void 0 : _a.apply(this, $$args);
1939
+ $.get(onclick2)?.apply(this, $$args);
1951
1940
  };
1952
1941
  article.__keydown = function(...$$args) {
1953
- var _a;
1954
- (_a = $.get(onkeydown)) == null ? void 0 : _a.apply(this, $$args);
1942
+ $.get(onkeydown)?.apply(this, $$args);
1955
1943
  };
1956
1944
  article.__pointerdown = function(...$$args) {
1957
- var _a;
1958
- (_a = $$props.onpointerdown) == null ? void 0 : _a.apply(this, $$args);
1945
+ $$props.onpointerdown?.apply(this, $$args);
1959
1946
  };
1960
1947
  {
1961
1948
  const defaultBody = ($$anchor2) => {
1962
1949
  var div = root_1$b();
1963
- $.action(div, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $.get(content));
1950
+ $.action(div, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(content));
1964
1951
  $.template_effect(() => $.set_class(div, 1, $.clsx($theme().eventBody)));
1965
1952
  $.append($$anchor2, div);
1966
1953
  };
@@ -1990,12 +1977,10 @@ function BaseEvent($$anchor, $$props) {
1990
1977
  $.set_attribute(article, "tabindex", $.get(onclick2) ? 0 : void 0);
1991
1978
  });
1992
1979
  $.event("mouseenter", article, function(...$$args) {
1993
- var _a;
1994
- (_a = $.get(onmouseenter)) == null ? void 0 : _a.apply(this, $$args);
1980
+ $.get(onmouseenter)?.apply(this, $$args);
1995
1981
  });
1996
1982
  $.event("mouseleave", article, function(...$$args) {
1997
- var _a;
1998
- (_a = $.get(onmouseleave)) == null ? void 0 : _a.apply(this, $$args);
1983
+ $.get(onmouseleave)?.apply(this, $$args);
1999
1984
  });
2000
1985
  $.append($$anchor, article);
2001
1986
  $.pop();
@@ -2004,20 +1989,16 @@ function BaseEvent($$anchor, $$props) {
2004
1989
  $.delegate(["click", "keydown", "pointerdown"]);
2005
1990
  function InteractableEvent($$anchor, $$props) {
2006
1991
  $.push($$props, true);
2007
- const [$$stores, $$cleanup] = $.setup_stores();
2008
1992
  const $_iClasses = () => $.store_get(_iClasses, "$_iClasses", $$stores);
2009
1993
  const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
1994
+ const [$$stores, $$cleanup] = $.setup_stores();
2010
1995
  let el = $.prop($$props, "el", 15);
2011
1996
  let { _interaction, _iClasses } = getContext("state");
2012
1997
  let event = $.derived(() => $$props.chunk.event);
2013
1998
  let display = $.derived(() => $$props.chunk.event.display);
2014
1999
  let classes = $.derived(() => (classNames) => $_iClasses()(classNames, $.get(event)));
2015
2000
  function createDragHandler(event2) {
2016
- var _a, _b;
2017
- return ((_a = $_interaction().action) == null ? void 0 : _a.draggable(event2)) ? (jsEvent) => {
2018
- var _a2, _b2;
2019
- return $_interaction().action.drag(event2, jsEvent, (_a2 = $$props.forceDate) == null ? void 0 : _a2.call($$props), (_b2 = $$props.forceMargin) == null ? void 0 : _b2.call($$props));
2020
- } : (_b = $_interaction().action) == null ? void 0 : _b.noAction;
2001
+ return $_interaction().action?.draggable(event2) ? (jsEvent) => $_interaction().action.drag(event2, jsEvent, $$props.forceDate?.(), $$props.forceMargin?.()) : $_interaction().action?.noAction;
2021
2002
  }
2022
2003
  let onpointerdown = $.derived(() => !bgEvent($.get(display)) && !helperEvent($.get(display)) ? createDragHandler($.get(event)) : void 0);
2023
2004
  let Resizer2 = $.derived(() => $_interaction().resizer);
@@ -2095,10 +2076,10 @@ function InteractableEvent($$anchor, $$props) {
2095
2076
  }
2096
2077
  function Event$4($$anchor, $$props) {
2097
2078
  $.push($$props, true);
2098
- const [$$stores, $$cleanup] = $.setup_stores();
2099
2079
  const $dayMaxEvents = () => $.store_get(dayMaxEvents, "$dayMaxEvents", $$stores);
2100
2080
  const $_hiddenEvents = () => $.store_get(_hiddenEvents, "$_hiddenEvents", $$stores);
2101
2081
  const $_popupDate = () => $.store_get(_popupDate, "$_popupDate", $$stores);
2082
+ const [$$stores, $$cleanup] = $.setup_stores();
2102
2083
  let longChunks = $.prop($$props, "longChunks", 19, () => ({})), inPopup = $.prop($$props, "inPopup", 3, false), dates = $.prop($$props, "dates", 19, () => []);
2103
2084
  let { dayMaxEvents, _hiddenEvents, _popupDate } = getContext("state");
2104
2085
  let el = $.state(void 0);
@@ -2167,6 +2148,7 @@ function Event$4($$anchor, $$props) {
2167
2148
  }
2168
2149
  return h;
2169
2150
  }
2151
+ var $$exports = { reposition };
2170
2152
  InteractableEvent($$anchor, {
2171
2153
  get chunk() {
2172
2154
  return $$props.chunk;
@@ -2187,20 +2169,20 @@ function Event$4($$anchor, $$props) {
2187
2169
  $.set(el, $$value, true);
2188
2170
  }
2189
2171
  });
2190
- var $$pop = $.pop({ reposition });
2172
+ var $$pop = $.pop($$exports);
2191
2173
  $$cleanup();
2192
2174
  return $$pop;
2193
2175
  }
2194
2176
  var root$n = $.from_html(`<div><div><time></time> <a role="button" tabindex="0">&times;</a></div> <div></div></div>`);
2195
2177
  function Popup($$anchor, $$props) {
2196
2178
  $.push($$props, true);
2197
- const [$$stores, $$cleanup] = $.setup_stores();
2198
2179
  const $_popupChunks = () => $.store_get(_popupChunks, "$_popupChunks", $$stores);
2199
2180
  const $_popupDate = () => $.store_get(_popupDate, "$_popupDate", $$stores);
2200
2181
  const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
2201
2182
  const $theme = () => $.store_get(theme, "$theme", $$stores);
2202
2183
  const $_intlDayPopover = () => $.store_get(_intlDayPopover, "$_intlDayPopover", $$stores);
2203
2184
  const $buttonText = () => $.store_get(buttonText, "$buttonText", $$stores);
2185
+ const [$$stores, $$cleanup] = $.setup_stores();
2204
2186
  let {
2205
2187
  buttonText,
2206
2188
  theme,
@@ -2263,29 +2245,25 @@ function Popup($$anchor, $$props) {
2263
2245
  $.store_set(_popupChunks, []);
2264
2246
  }
2265
2247
  function handlePointerDownOutside() {
2266
- var _a;
2267
2248
  close();
2268
- (_a = $_interaction().action) == null ? void 0 : _a.noClick();
2249
+ $_interaction().action?.noClick();
2269
2250
  }
2270
2251
  var div = root$n();
2271
2252
  var event_handler = $.derived(stopPropagation);
2272
2253
  div.__pointerdown = function(...$$args) {
2273
- var _a;
2274
- (_a = $.get(event_handler)) == null ? void 0 : _a.apply(this, $$args);
2254
+ $.get(event_handler)?.apply(this, $$args);
2275
2255
  };
2276
2256
  var div_1 = $.child(div);
2277
2257
  var time = $.child(div_1);
2278
- $.action(time, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $_intlDayPopover().format($_popupDate()));
2258
+ $.action(time, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayPopover().format($_popupDate()));
2279
2259
  var a = $.sibling(time, 2);
2280
2260
  var event_handler_1 = $.derived(() => stopPropagation(close));
2281
2261
  a.__click = function(...$$args) {
2282
- var _a;
2283
- (_a = $.get(event_handler_1)) == null ? void 0 : _a.apply(this, $$args);
2262
+ $.get(event_handler_1)?.apply(this, $$args);
2284
2263
  };
2285
2264
  var event_handler_2 = $.derived(() => keyEnter(close));
2286
2265
  a.__keydown = function(...$$args) {
2287
- var _a;
2288
- (_a = $.get(event_handler_2)) == null ? void 0 : _a.apply(this, $$args);
2266
+ $.get(event_handler_2)?.apply(this, $$args);
2289
2267
  };
2290
2268
  $.reset(div_1);
2291
2269
  var div_2 = $.sibling(div_1, 2);
@@ -2300,7 +2278,7 @@ function Popup($$anchor, $$props) {
2300
2278
  $.reset(div_2);
2301
2279
  $.reset(div);
2302
2280
  $.bind_this(div, ($$value) => $.set(el, $$value), () => $.get(el));
2303
- $.action(div, ($$node, $$action_arg) => outsideEvent == null ? void 0 : outsideEvent($$node, $$action_arg), () => "pointerdown");
2281
+ $.action(div, ($$node, $$action_arg) => outsideEvent?.($$node, $$action_arg), () => "pointerdown");
2304
2282
  $.template_effect(
2305
2283
  ($0) => {
2306
2284
  $.set_class(div, 1, $theme().popup);
@@ -2326,7 +2304,6 @@ var root_10 = $.from_html(`<a role="button" tabindex="0" aria-haspopup="true"></
2326
2304
  var root$m = $.from_html(`<div role="cell"><div><time></time> <!></div> <div><!></div> <!> <div><!></div> <!> <div><!></div></div>`);
2327
2305
  function Day$4($$anchor, $$props) {
2328
2306
  $.push($$props, true);
2329
- const [$$stores, $$cleanup] = $.setup_stores();
2330
2307
  const $_hiddenEvents = () => $.store_get(_hiddenEvents, "$_hiddenEvents", $$stores);
2331
2308
  const $_today = () => $.store_get(_today, "$_today", $$stores);
2332
2309
  const $currentDate = () => $.store_get(currentDate, "$currentDate", $$stores);
@@ -2340,6 +2317,7 @@ function Day$4($$anchor, $$props) {
2340
2317
  const $theme = () => $.store_get(theme, "$theme", $$stores);
2341
2318
  const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
2342
2319
  const $_intlDayCell = () => $.store_get(_intlDayCell, "$_intlDayCell", $$stores);
2320
+ const [$$stores, $$cleanup] = $.setup_stores();
2343
2321
  let iChunks = $.prop($$props, "iChunks", 19, () => []);
2344
2322
  let {
2345
2323
  date: currentDate,
@@ -2417,9 +2395,8 @@ function Day$4($$anchor, $$props) {
2417
2395
  }
2418
2396
  });
2419
2397
  function setPopupChunks() {
2420
- var _a;
2421
2398
  let nextDay = addDay(cloneDate($$props.date));
2422
- let chunks = $.get(dayChunks).concat(((_a = $$props.longChunks[$$props.date.getTime()]) == null ? void 0 : _a.chunks) || []);
2399
+ let chunks = $.get(dayChunks).concat($$props.longChunks[$$props.date.getTime()]?.chunks || []);
2423
2400
  $.store_set(_popupChunks, chunks.map((chunk) => assign({}, chunk, createEventChunk(chunk.event, $$props.date, nextDay), { days: 1, dates: [$$props.date] })).sort((a, b) => a.top - b.top));
2424
2401
  }
2425
2402
  let showWeekNumber = $.derived(() => $weekNumbers() && $$props.date.getUTCDay() == ($firstDay() ? 1 : 0));
@@ -2440,19 +2417,19 @@ function Day$4($$anchor, $$props) {
2440
2417
  runReposition(refs, $.get(dayChunks));
2441
2418
  }
2442
2419
  }
2420
+ var $$exports = { reposition };
2443
2421
  var div = root$m();
2444
2422
  div.__pointerdown = function(...$$args) {
2445
- var _a, _b;
2446
- (_b = (_a = $_interaction().action) == null ? void 0 : _a.select) == null ? void 0 : _b.apply(this, $$args);
2423
+ $_interaction().action?.select?.apply(this, $$args);
2447
2424
  };
2448
2425
  var div_1 = $.child(div);
2449
2426
  var time = $.child(div_1);
2450
- $.action(time, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $_intlDayCell().format($$props.date));
2427
+ $.action(time, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayCell().format($$props.date));
2451
2428
  var node = $.sibling(time, 2);
2452
2429
  {
2453
2430
  var consequent = ($$anchor2) => {
2454
2431
  var span = root_1$a();
2455
- $.action(span, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $.get(weekNumber));
2432
+ $.action(span, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(weekNumber));
2456
2433
  $.template_effect(() => $.set_class(span, 1, $theme().weekNumber));
2457
2434
  $.append($$anchor2, span);
2458
2435
  };
@@ -2547,7 +2524,7 @@ function Day$4($$anchor, $$props) {
2547
2524
  }
2548
2525
  }),
2549
2526
  ($$value, i2) => refs[i2] = $$value,
2550
- (i2) => refs == null ? void 0 : refs[i2],
2527
+ (i2) => refs?.[i2],
2551
2528
  () => [$.get(i)]
2552
2529
  );
2553
2530
  });
@@ -2574,20 +2551,17 @@ function Day$4($$anchor, $$props) {
2574
2551
  var a_1 = root_10();
2575
2552
  var event_handler = $.derived(() => stopPropagation(showMore));
2576
2553
  a_1.__click = function(...$$args) {
2577
- var _a;
2578
- (_a = $.get(event_handler)) == null ? void 0 : _a.apply(this, $$args);
2554
+ $.get(event_handler)?.apply(this, $$args);
2579
2555
  };
2580
2556
  var event_handler_1 = $.derived(() => keyEnter(showMore));
2581
2557
  a_1.__keydown = function(...$$args) {
2582
- var _a;
2583
- (_a = $.get(event_handler_1)) == null ? void 0 : _a.apply(this, $$args);
2558
+ $.get(event_handler_1)?.apply(this, $$args);
2584
2559
  };
2585
2560
  var event_handler_2 = $.derived(stopPropagation);
2586
2561
  a_1.__pointerdown = function(...$$args) {
2587
- var _a;
2588
- (_a = $.get(event_handler_2)) == null ? void 0 : _a.apply(this, $$args);
2562
+ $.get(event_handler_2)?.apply(this, $$args);
2589
2563
  };
2590
- $.action(a_1, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $.get(moreLink));
2564
+ $.action(a_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(moreLink));
2591
2565
  $.append($$anchor2, a_1);
2592
2566
  };
2593
2567
  $.if(node_11, ($$render) => {
@@ -2607,15 +2581,12 @@ function Day$4($$anchor, $$props) {
2607
2581
  $.set_class(div_6, 1, $theme().dayFoot);
2608
2582
  },
2609
2583
  [
2610
- () => {
2611
- var _a;
2612
- return (_a = $theme().weekdays) == null ? void 0 : _a[$$props.date.getUTCDay()];
2613
- },
2584
+ () => $theme().weekdays?.[$$props.date.getUTCDay()],
2614
2585
  () => toISOString($$props.date, 10)
2615
2586
  ]
2616
2587
  );
2617
2588
  $.append($$anchor, div);
2618
- var $$pop = $.pop({ reposition });
2589
+ var $$pop = $.pop($$exports);
2619
2590
  $$cleanup();
2620
2591
  return $$pop;
2621
2592
  }
@@ -2623,7 +2594,6 @@ $.delegate(["pointerdown", "click", "keydown"]);
2623
2594
  var root$l = $.from_html(`<div role="row"></div>`);
2624
2595
  function Week$1($$anchor, $$props) {
2625
2596
  $.push($$props, true);
2626
- const [$$stores, $$cleanup] = $.setup_stores();
2627
2597
  const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
2628
2598
  const $_filteredEvents = () => $.store_get(_filteredEvents, "$_filteredEvents", $$stores);
2629
2599
  const $filterEventsWithResources = () => $.store_get(filterEventsWithResources, "$filterEventsWithResources", $$stores);
@@ -2632,6 +2602,7 @@ function Week$1($$anchor, $$props) {
2632
2602
  const $eventOrder = () => $.store_get(eventOrder, "$eventOrder", $$stores);
2633
2603
  const $_iEvents = () => $.store_get(_iEvents, "$_iEvents", $$stores);
2634
2604
  const $theme = () => $.store_get(theme, "$theme", $$stores);
2605
+ const [$$stores, $$cleanup] = $.setup_stores();
2635
2606
  let {
2636
2607
  _filteredEvents,
2637
2608
  _iEvents,
@@ -2677,6 +2648,7 @@ function Week$1($$anchor, $$props) {
2677
2648
  function reposition() {
2678
2649
  runReposition(refs, $$props.dates);
2679
2650
  }
2651
+ var $$exports = { reposition };
2680
2652
  var div = root$l();
2681
2653
  $.each(div, 21, () => $$props.dates, $.index, ($$anchor2, date, i) => {
2682
2654
  $.bind_this(
@@ -2701,21 +2673,20 @@ function Week$1($$anchor, $$props) {
2701
2673
  }
2702
2674
  }),
2703
2675
  ($$value, i2) => refs[i2] = $$value,
2704
- (i2) => refs == null ? void 0 : refs[i2],
2676
+ (i2) => refs?.[i2],
2705
2677
  () => [i]
2706
2678
  );
2707
2679
  });
2708
2680
  $.reset(div);
2709
2681
  $.template_effect(() => $.set_class(div, 1, $theme().days));
2710
2682
  $.append($$anchor, div);
2711
- var $$pop = $.pop({ reposition });
2683
+ var $$pop = $.pop($$exports);
2712
2684
  $$cleanup();
2713
2685
  return $$pop;
2714
2686
  }
2715
2687
  var root$k = $.from_html(`<div><div></div></div>`);
2716
2688
  function Body$3($$anchor, $$props) {
2717
2689
  $.push($$props, true);
2718
- const [$$stores, $$cleanup] = $.setup_stores();
2719
2690
  const $hiddenDays = () => $.store_get(hiddenDays, "$hiddenDays", $$stores);
2720
2691
  const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
2721
2692
  const $dayMaxEvents = () => $.store_get(dayMaxEvents, "$dayMaxEvents", $$stores);
@@ -2723,6 +2694,7 @@ function Body$3($$anchor, $$props) {
2723
2694
  const $_filteredEvents = () => $.store_get(_filteredEvents, "$_filteredEvents", $$stores);
2724
2695
  const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
2725
2696
  const $theme = () => $.store_get(theme, "$theme", $$stores);
2697
+ const [$$stores, $$cleanup] = $.setup_stores();
2726
2698
  let {
2727
2699
  _bodyEl,
2728
2700
  _viewDates,
@@ -2771,14 +2743,14 @@ function Body$3($$anchor, $$props) {
2771
2743
  }
2772
2744
  }),
2773
2745
  ($$value, i2) => refs[i2] = $$value,
2774
- (i2) => refs == null ? void 0 : refs[i2],
2746
+ (i2) => refs?.[i2],
2775
2747
  () => [i]
2776
2748
  );
2777
2749
  });
2778
2750
  $.reset(div_1);
2779
2751
  $.reset(div);
2780
2752
  $.bind_this(div, ($$value) => $.store_set(_bodyEl, $$value), () => $_bodyEl());
2781
- $.action(div, ($$node, $$action_arg) => observeResize == null ? void 0 : observeResize($$node, $$action_arg), () => () => $.store_set(_recheckScrollable, true));
2753
+ $.action(div, ($$node, $$action_arg) => observeResize?.($$node, $$action_arg), () => () => $.store_set(_recheckScrollable, true));
2782
2754
  $.template_effect(() => {
2783
2755
  $.set_class(div, 1, `${$theme().body ?? ""}${$dayMaxEvents() === true ? " " + $theme().uniform : ""}`);
2784
2756
  $.set_class(div_1, 1, $theme().content);
@@ -2852,7 +2824,6 @@ function limit(value, minLimit, maxLimit) {
2852
2824
  }
2853
2825
  function Action($$anchor, $$props) {
2854
2826
  $.push($$props, false);
2855
- const [$$stores, $$cleanup] = $.setup_stores();
2856
2827
  const $eventStartEditable = () => $.store_get(eventStartEditable, "$eventStartEditable", $$stores);
2857
2828
  const $editable = () => $.store_get(editable, "$editable", $$stores);
2858
2829
  const $slotDuration = () => $.store_get(slotDuration, "$slotDuration", $$stores);
@@ -2888,6 +2859,7 @@ function Action($$anchor, $$props) {
2888
2859
  const $_events = () => $.store_get(_events, "$_events", $$stores);
2889
2860
  const $selectBackgroundColor = () => $.store_get(selectBackgroundColor, "$selectBackgroundColor", $$stores);
2890
2861
  const $unselectFn = () => $.store_get(unselectFn, "$unselectFn", $$stores);
2862
+ const [$$stores, $$cleanup] = $.setup_stores();
2891
2863
  let {
2892
2864
  _iEvents,
2893
2865
  _iClass,
@@ -3418,6 +3390,16 @@ function Action($$anchor, $$props) {
3418
3390
  }
3419
3391
  };
3420
3392
  }
3393
+ var $$exports = {
3394
+ draggable,
3395
+ drag,
3396
+ resize,
3397
+ select,
3398
+ noAction,
3399
+ handleScroll,
3400
+ unselect,
3401
+ noClick
3402
+ };
3421
3403
  $.init();
3422
3404
  $.event("pointermove", $.window, handlePointerMove);
3423
3405
  $.event("pointerup", $.window, handlePointerUp);
@@ -3425,13 +3407,11 @@ function Action($$anchor, $$props) {
3425
3407
  $.event("scroll", $.window, handleScroll);
3426
3408
  var event_handler = $.derived(() => createPreventDefaultHandler(complexAction));
3427
3409
  $.event("selectstart", $.window, function(...$$args) {
3428
- var _a;
3429
- (_a = $.get(event_handler)) == null ? void 0 : _a.apply(this, $$args);
3410
+ $.get(event_handler)?.apply(this, $$args);
3430
3411
  });
3431
3412
  var event_handler_1 = $.derived(() => createPreventDefaultHandler(() => $.get(timer)));
3432
3413
  $.event("contextmenu", $.window, function(...$$args) {
3433
- var _a;
3434
- (_a = $.get(event_handler_1)) == null ? void 0 : _a.apply(this, $$args);
3414
+ $.get(event_handler_1)?.apply(this, $$args);
3435
3415
  });
3436
3416
  $.event("touchstart", $.window, handleTouchStart, void 0, true);
3437
3417
  $.bind_prop($$props, "draggable", draggable);
@@ -3442,24 +3422,15 @@ function Action($$anchor, $$props) {
3442
3422
  $.bind_prop($$props, "handleScroll", handleScroll);
3443
3423
  $.bind_prop($$props, "unselect", unselect);
3444
3424
  $.bind_prop($$props, "noClick", noClick);
3445
- var $$pop = $.pop({
3446
- draggable,
3447
- drag,
3448
- resize,
3449
- select,
3450
- noAction,
3451
- handleScroll,
3452
- unselect,
3453
- noClick
3454
- });
3425
+ var $$pop = $.pop($$exports);
3455
3426
  $$cleanup();
3456
3427
  return $$pop;
3457
3428
  }
3458
3429
  function Pointer($$anchor, $$props) {
3459
3430
  $.push($$props, true);
3460
- const [$$stores, $$cleanup] = $.setup_stores();
3461
3431
  const $_iEvents = () => $.store_get(_iEvents, "$_iEvents", $$stores);
3462
3432
  const $slotDuration = () => $.store_get(slotDuration, "$slotDuration", $$stores);
3433
+ const [$$stores, $$cleanup] = $.setup_stores();
3463
3434
  let { _iEvents, slotDuration } = getContext("state");
3464
3435
  let x = 0, y = 0;
3465
3436
  $.user_effect(() => {
@@ -3520,9 +3491,10 @@ function Pointer($$anchor, $$props) {
3520
3491
  function validEvent(jsEvent) {
3521
3492
  return jsEvent.isPrimary && jsEvent.pointerType === "mouse";
3522
3493
  }
3494
+ var $$exports = { handleScroll };
3523
3495
  $.event("pointermove", $.window, handlePointerMove);
3524
3496
  $.event("scroll", $.window, handleScroll);
3525
- var $$pop = $.pop({ handleScroll });
3497
+ var $$pop = $.pop($$exports);
3526
3498
  $$cleanup();
3527
3499
  return $$pop;
3528
3500
  }
@@ -3531,12 +3503,12 @@ var root_2$6 = $.from_html(`<div></div>`);
3531
3503
  var root$i = $.from_html(`<!> <!> <!>`, 1);
3532
3504
  function Resizer($$anchor, $$props) {
3533
3505
  $.push($$props, true);
3534
- const [$$stores, $$cleanup] = $.setup_stores();
3535
3506
  const $eventDurationEditable = () => $.store_get(eventDurationEditable, "$eventDurationEditable", $$stores);
3536
3507
  const $editable = () => $.store_get(editable, "$editable", $$stores);
3537
3508
  const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
3538
3509
  const $eventResizableFromStart = () => $.store_get(eventResizableFromStart, "$eventResizableFromStart", $$stores);
3539
3510
  const $theme = () => $.store_get(theme, "$theme", $$stores);
3511
+ const [$$stores, $$cleanup] = $.setup_stores();
3540
3512
  let forceDate = $.prop($$props, "forceDate", 3, void 0), forceMargin = $.prop($$props, "forceMargin", 3, void 0);
3541
3513
  let {
3542
3514
  theme,
@@ -3549,10 +3521,7 @@ function Resizer($$anchor, $$props) {
3549
3521
  let display = $.derived(() => $$props.chunk.event.display);
3550
3522
  let resizable = $.derived(() => !bgEvent($.get(display)) && !helperEvent($.get(display)) && eventResizable($.get(event), $eventDurationEditable(), $editable()));
3551
3523
  function createResizeHandler(start) {
3552
- return (jsEvent) => {
3553
- var _a, _b;
3554
- return $_interaction().action.resize($.get(event), jsEvent, start, $$props.axis, (_a = forceDate()) == null ? void 0 : _a(), (_b = forceMargin()) == null ? void 0 : _b(), $$props.chunk.zeroDuration);
3555
- };
3524
+ return (jsEvent) => $_interaction().action.resize($.get(event), jsEvent, start, $$props.axis, forceDate()?.(), forceMargin()?.(), $$props.chunk.zeroDuration);
3556
3525
  }
3557
3526
  var fragment = root$i();
3558
3527
  var node = $.first_child(fragment);
@@ -3561,8 +3530,7 @@ function Resizer($$anchor, $$props) {
3561
3530
  var div = root_1$9();
3562
3531
  var event_handler = $.derived(() => createResizeHandler(true));
3563
3532
  div.__pointerdown = function(...$$args) {
3564
- var _a;
3565
- (_a = $.get(event_handler)) == null ? void 0 : _a.apply(this, $$args);
3533
+ $.get(event_handler)?.apply(this, $$args);
3566
3534
  };
3567
3535
  $.template_effect(() => $.set_class(div, 1, `${$theme().resizer ?? ""} ${$theme().start ?? ""}`));
3568
3536
  $.append($$anchor2, div);
@@ -3579,8 +3547,7 @@ function Resizer($$anchor, $$props) {
3579
3547
  var div_1 = root_2$6();
3580
3548
  var event_handler_1 = $.derived(() => createResizeHandler(false));
3581
3549
  div_1.__pointerdown = function(...$$args) {
3582
- var _a;
3583
- (_a = $.get(event_handler_1)) == null ? void 0 : _a.apply(this, $$args);
3550
+ $.get(event_handler_1)?.apply(this, $$args);
3584
3551
  };
3585
3552
  $.template_effect(() => $.set_class(div_1, 1, $theme().resizer));
3586
3553
  $.append($$anchor2, div_1);
@@ -3597,13 +3564,13 @@ $.delegate(["pointerdown"]);
3597
3564
  var root$h = $.from_html(`<!> <!>`, 1);
3598
3565
  function Auxiliary($$anchor, $$props) {
3599
3566
  $.push($$props, true);
3600
- const [$$stores, $$cleanup] = $.setup_stores();
3601
3567
  const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
3602
3568
  const $theme = () => $.store_get(theme, "$theme", $$stores);
3603
3569
  const $eventStartEditable = () => $.store_get(eventStartEditable, "$eventStartEditable", $$stores);
3604
3570
  const $editable = () => $.store_get(editable, "$editable", $$stores);
3605
3571
  const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
3606
3572
  const $pointer = () => $.store_get(pointer, "$pointer", $$stores);
3573
+ const [$$stores, $$cleanup] = $.setup_stores();
3607
3574
  let {
3608
3575
  theme,
3609
3576
  editable,
@@ -3632,24 +3599,17 @@ function Auxiliary($$anchor, $$props) {
3632
3599
  }
3633
3600
  });
3634
3601
  function bodyScrollHandler() {
3635
- var _a;
3636
3602
  for (let component of Object.values($_interaction())) {
3637
- (_a = component == null ? void 0 : component.handleScroll) == null ? void 0 : _a.call(component);
3603
+ component?.handleScroll?.();
3638
3604
  }
3639
3605
  }
3640
3606
  var fragment = root$h();
3641
3607
  var node = $.first_child(fragment);
3642
- $.bind_this(Action(node, {}), ($$value) => $.store_mutate(_interaction, $.untrack($_interaction).action = $$value, $.untrack($_interaction)), () => {
3643
- var _a;
3644
- return (_a = $_interaction()) == null ? void 0 : _a.action;
3645
- });
3608
+ $.bind_this(Action(node, {}), ($$value) => $.store_mutate(_interaction, $.untrack($_interaction).action = $$value, $.untrack($_interaction)), () => $_interaction()?.action);
3646
3609
  var node_1 = $.sibling(node, 2);
3647
3610
  {
3648
3611
  var consequent = ($$anchor2) => {
3649
- $.bind_this(Pointer($$anchor2, {}), ($$value) => $.store_mutate(_interaction, $.untrack($_interaction).pointer = $$value, $.untrack($_interaction)), () => {
3650
- var _a;
3651
- return (_a = $_interaction()) == null ? void 0 : _a.pointer;
3652
- });
3612
+ $.bind_this(Pointer($$anchor2, {}), ($$value) => $.store_mutate(_interaction, $.untrack($_interaction).pointer = $$value, $.untrack($_interaction)), () => $_interaction()?.pointer);
3653
3613
  };
3654
3614
  $.if(node_1, ($$render) => {
3655
3615
  if ($pointer()) $$render(consequent);
@@ -3705,9 +3665,9 @@ const index$3 = {
3705
3665
  var root_1$8 = $.from_html(`<div></div> <!>`, 1);
3706
3666
  function Event$3($$anchor, $$props) {
3707
3667
  $.push($$props, true);
3708
- const [$$stores, $$cleanup] = $.setup_stores();
3709
3668
  const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
3710
3669
  const $theme = () => $.store_get(theme, "$theme", $$stores);
3670
+ const [$$stores, $$cleanup] = $.setup_stores();
3711
3671
  let { theme, _interaction } = getContext("state");
3712
3672
  let styles = $.derived(() => (style) => {
3713
3673
  delete style["background-color"];
@@ -3730,10 +3690,7 @@ function Event$3($$anchor, $$props) {
3730
3690
  );
3731
3691
  $.append($$anchor2, fragment_1);
3732
3692
  };
3733
- let $0 = $.derived(() => {
3734
- var _a;
3735
- return (_a = $_interaction().action) == null ? void 0 : _a.noAction;
3736
- });
3693
+ let $0 = $.derived(() => $_interaction().action?.noAction);
3737
3694
  BaseEvent($$anchor, {
3738
3695
  get chunk() {
3739
3696
  return $$props.chunk;
@@ -3754,7 +3711,6 @@ function Event$3($$anchor, $$props) {
3754
3711
  var root_1$7 = $.from_html(`<div role="listitem"><h4><time></time> <time></time></h4> <!></div>`);
3755
3712
  function Day$3($$anchor, $$props) {
3756
3713
  $.push($$props, true);
3757
- const [$$stores, $$cleanup] = $.setup_stores();
3758
3714
  const $_today = () => $.store_get(_today, "$_today", $$stores);
3759
3715
  const $highlightedDates = () => $.store_get(highlightedDates, "$highlightedDates", $$stores);
3760
3716
  const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
@@ -3766,6 +3722,7 @@ function Day$3($$anchor, $$props) {
3766
3722
  const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
3767
3723
  const $_intlListDay = () => $.store_get(_intlListDay, "$_intlListDay", $$stores);
3768
3724
  const $_intlListDaySide = () => $.store_get(_intlListDaySide, "$_intlListDaySide", $$stores);
3725
+ const [$$stores, $$cleanup] = $.setup_stores();
3769
3726
  let {
3770
3727
  _filteredEvents,
3771
3728
  _interaction,
@@ -3816,14 +3773,13 @@ function Day$3($$anchor, $$props) {
3816
3773
  var consequent = ($$anchor2) => {
3817
3774
  var div = root_1$7();
3818
3775
  div.__pointerdown = function(...$$args) {
3819
- var _a, _b;
3820
- (_b = (_a = $_interaction().action) == null ? void 0 : _a.select) == null ? void 0 : _b.apply(this, $$args);
3776
+ $_interaction().action?.select?.apply(this, $$args);
3821
3777
  };
3822
3778
  var h4 = $.child(div);
3823
3779
  var time = $.child(h4);
3824
- $.action(time, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $_intlListDay().format($$props.date));
3780
+ $.action(time, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlListDay().format($$props.date));
3825
3781
  var time_1 = $.sibling(time, 2);
3826
- $.action(time_1, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $_intlListDaySide().format($$props.date));
3782
+ $.action(time_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlListDaySide().format($$props.date));
3827
3783
  $.reset(h4);
3828
3784
  var node_1 = $.sibling(h4, 2);
3829
3785
  $.each(node_1, 17, () => $.get(chunks), (chunk) => chunk.event, ($$anchor3, chunk) => {
@@ -3843,10 +3799,7 @@ function Day$3($$anchor, $$props) {
3843
3799
  $.set_class(time_1, 1, $theme().daySide);
3844
3800
  $.set_attribute(time_1, "datetime", $.get(datetime));
3845
3801
  },
3846
- [() => {
3847
- var _a;
3848
- return (_a = $theme().weekdays) == null ? void 0 : _a[$$props.date.getUTCDay()];
3849
- }]
3802
+ [() => $theme().weekdays?.[$$props.date.getUTCDay()]]
3850
3803
  );
3851
3804
  $.append($$anchor2, div);
3852
3805
  };
@@ -3868,7 +3821,6 @@ var root_1$6 = $.from_html(`<div></div>`);
3868
3821
  var root$g = $.from_html(`<div><div><!></div></div>`);
3869
3822
  function Body$2($$anchor, $$props) {
3870
3823
  $.push($$props, true);
3871
- const [$$stores, $$cleanup] = $.setup_stores();
3872
3824
  const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
3873
3825
  const $_filteredEvents = () => $.store_get(_filteredEvents, "$_filteredEvents", $$stores);
3874
3826
  const $noEventsContent = () => $.store_get(noEventsContent, "$noEventsContent", $$stores);
@@ -3876,6 +3828,7 @@ function Body$2($$anchor, $$props) {
3876
3828
  const $_view = () => $.store_get(_view, "$_view", $$stores);
3877
3829
  const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
3878
3830
  const $theme = () => $.store_get(theme, "$theme", $$stores);
3831
+ const [$$stores, $$cleanup] = $.setup_stores();
3879
3832
  let {
3880
3833
  _bodyEl,
3881
3834
  _filteredEvents,
@@ -3907,7 +3860,7 @@ function Body$2($$anchor, $$props) {
3907
3860
  var consequent = ($$anchor2) => {
3908
3861
  var div_2 = root_1$6();
3909
3862
  div_2.__click = [onclick$1, $noEventsClick, noEventsClick, $_view, _view];
3910
- $.action(div_2, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $.get(content));
3863
+ $.action(div_2, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(content));
3911
3864
  $.template_effect(() => $.set_class(div_2, 1, $theme().noEvents));
3912
3865
  $.append($$anchor2, div_2);
3913
3866
  };
@@ -4052,22 +4005,22 @@ var root_1$5 = $.from_html(`<time></time>`);
4052
4005
  var root$f = $.from_html(`<div><div></div> <!></div> <div role="row"><div><!></div> <!></div>`, 1);
4053
4006
  function Section($$anchor, $$props) {
4054
4007
  $.push($$props, true);
4055
- const [$$stores, $$cleanup] = $.setup_stores();
4056
4008
  const $allDayContent = () => $.store_get(allDayContent, "$allDayContent", $$stores);
4057
4009
  const $slotLabelInterval = () => $.store_get(slotLabelInterval, "$slotLabelInterval", $$stores);
4058
4010
  const $theme = () => $.store_get(theme, "$theme", $$stores);
4059
4011
  const $_times = () => $.store_get(_times, "$_times", $$stores);
4012
+ const [$$stores, $$cleanup] = $.setup_stores();
4060
4013
  let { allDayContent, slotLabelInterval, theme, _times } = getContext("state");
4061
4014
  let allDayText = $.derived(() => createAllDayContent($allDayContent()));
4062
4015
  let showAllTimes = $.derived(() => $slotLabelInterval() && $slotLabelInterval().seconds <= 0);
4063
4016
  var fragment = root$f();
4064
4017
  var div = $.first_child(fragment);
4065
4018
  var div_1 = $.child(div);
4066
- $.action(div_1, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $.get(allDayText));
4019
+ $.action(div_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(allDayText));
4067
4020
  var node = $.sibling(div_1, 2);
4068
4021
  $.each(node, 1, $_times, $.index, ($$anchor2, time, i) => {
4069
4022
  var time_1 = root_1$5();
4070
- $.action(time_1, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $.get(time)[1]);
4023
+ $.action(time_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(time)[1]);
4071
4024
  $.template_effect(() => {
4072
4025
  $.set_class(time_1, 1, `${$theme().time ?? ""}${(i || $.get(showAllTimes)) && $.get(time)[2] ? "" : " " + $theme().minor}`);
4073
4026
  $.set_attribute(time_1, "datetime", $.get(time)[0]);
@@ -4117,7 +4070,6 @@ var root_2$5 = $.from_html(`<div></div>`);
4117
4070
  var root$e = $.from_html(`<div><div><!></div></div>`);
4118
4071
  function Body$1($$anchor, $$props) {
4119
4072
  $.push($$props, true);
4120
- const [$$stores, $$cleanup] = $.setup_stores();
4121
4073
  const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
4122
4074
  const $scrollTime = () => $.store_get(scrollTime, "$scrollTime", $$stores);
4123
4075
  const $_slotTimeLimits = () => $.store_get(_slotTimeLimits, "$_slotTimeLimits", $$stores);
@@ -4125,6 +4077,7 @@ function Body$1($$anchor, $$props) {
4125
4077
  const $slotHeight = () => $.store_get(slotHeight, "$slotHeight", $$stores);
4126
4078
  const $theme = () => $.store_get(theme, "$theme", $$stores);
4127
4079
  const $_times = () => $.store_get(_times, "$_times", $$stores);
4080
+ const [$$stores, $$cleanup] = $.setup_stores();
4128
4081
  let {
4129
4082
  _bodyEl,
4130
4083
  _viewDates,
@@ -4173,7 +4126,7 @@ function Body$1($$anchor, $$props) {
4173
4126
  $.reset(div_1);
4174
4127
  $.reset(div);
4175
4128
  $.bind_this(div, ($$value) => $.set(el, $$value), () => $.get(el));
4176
- $.action(div, ($$node, $$action_arg) => observeResize == null ? void 0 : observeResize($$node, $$action_arg), () => () => $.store_set(_recheckScrollable, true));
4129
+ $.action(div, ($$node, $$action_arg) => observeResize?.($$node, $$action_arg), () => () => $.store_set(_recheckScrollable, true));
4177
4130
  $.template_effect(() => {
4178
4131
  $.set_class(div, 1, $theme().body);
4179
4132
  $.set_class(div_1, 1, $theme().content);
@@ -4184,11 +4137,11 @@ function Body$1($$anchor, $$props) {
4184
4137
  }
4185
4138
  function Event$2($$anchor, $$props) {
4186
4139
  $.push($$props, true);
4187
- const [$$stores, $$cleanup] = $.setup_stores();
4188
4140
  const $slotDuration = () => $.store_get(slotDuration, "$slotDuration", $$stores);
4189
4141
  const $_slotTimeLimits = () => $.store_get(_slotTimeLimits, "$_slotTimeLimits", $$stores);
4190
4142
  const $slotHeight = () => $.store_get(slotHeight, "$slotHeight", $$stores);
4191
4143
  const $slotEventOverlap = () => $.store_get(slotEventOverlap, "$slotEventOverlap", $$stores);
4144
+ const [$$stores, $$cleanup] = $.setup_stores();
4192
4145
  let { slotEventOverlap, slotDuration, slotHeight, _slotTimeLimits } = getContext("state");
4193
4146
  let display = $.derived(() => $$props.chunk.event.display);
4194
4147
  let styles = $.derived(() => (style) => {
@@ -4225,13 +4178,13 @@ function Event$2($$anchor, $$props) {
4225
4178
  var root$d = $.from_html(`<div></div>`);
4226
4179
  function NowIndicator$1($$anchor, $$props) {
4227
4180
  $.push($$props, true);
4228
- const [$$stores, $$cleanup] = $.setup_stores();
4229
4181
  const $_now = () => $.store_get(_now, "$_now", $$stores);
4230
4182
  const $_today = () => $.store_get(_today, "$_today", $$stores);
4231
4183
  const $slotDuration = () => $.store_get(slotDuration, "$slotDuration", $$stores);
4232
4184
  const $_slotTimeLimits = () => $.store_get(_slotTimeLimits, "$_slotTimeLimits", $$stores);
4233
4185
  const $slotHeight = () => $.store_get(slotHeight, "$slotHeight", $$stores);
4234
4186
  const $theme = () => $.store_get(theme, "$theme", $$stores);
4187
+ const [$$stores, $$cleanup] = $.setup_stores();
4235
4188
  let {
4236
4189
  slotDuration,
4237
4190
  slotHeight,
@@ -4259,7 +4212,6 @@ var root_3$4 = $.from_html(`<!> <!> <!>`, 1);
4259
4212
  var root$c = $.from_html(`<div role="cell"><div><!></div> <div><!></div> <div><!></div></div>`);
4260
4213
  function Day$2($$anchor, $$props) {
4261
4214
  $.push($$props, true);
4262
- const [$$stores, $$cleanup] = $.setup_stores();
4263
4215
  const $_today = () => $.store_get(_today, "$_today", $$stores);
4264
4216
  const $highlightedDates = () => $.store_get(highlightedDates, "$highlightedDates", $$stores);
4265
4217
  const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
@@ -4274,6 +4226,7 @@ function Day$2($$anchor, $$props) {
4274
4226
  const $theme = () => $.store_get(theme, "$theme", $$stores);
4275
4227
  const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
4276
4228
  const $nowIndicator = () => $.store_get(nowIndicator, "$nowIndicator", $$stores);
4229
+ const [$$stores, $$cleanup] = $.setup_stores();
4277
4230
  let resource = $.prop($$props, "resource", 3, void 0);
4278
4231
  let {
4279
4232
  _filteredEvents,
@@ -4340,8 +4293,7 @@ function Day$2($$anchor, $$props) {
4340
4293
  });
4341
4294
  var div = root$c();
4342
4295
  div.__pointerdown = function(...$$args) {
4343
- var _a, _b;
4344
- (_b = !$.get(disabled) ? (_a = $_interaction().action) == null ? void 0 : _a.select : void 0) == null ? void 0 : _b.apply(this, $$args);
4296
+ (!$.get(disabled) ? $_interaction().action?.select : void 0)?.apply(this, $$args);
4345
4297
  };
4346
4298
  var div_1 = $.child(div);
4347
4299
  var node = $.child(div_1);
@@ -4441,10 +4393,7 @@ function Day$2($$anchor, $$props) {
4441
4393
  $.set_class(div_2, 1, $theme().events);
4442
4394
  $.set_class(div_3, 1, $theme().extra);
4443
4395
  },
4444
- [() => {
4445
- var _a;
4446
- return (_a = $theme().weekdays) == null ? void 0 : _a[$$props.date.getUTCDay()];
4447
- }]
4396
+ [() => $theme().weekdays?.[$$props.date.getUTCDay()]]
4448
4397
  );
4449
4398
  $.append($$anchor, div);
4450
4399
  $.pop();
@@ -4473,6 +4422,7 @@ function Event$1($$anchor, $$props) {
4473
4422
  }
4474
4423
  $.set(margin, repositionEvent$1($$props.chunk, longChunks(), height($.get(el))), true);
4475
4424
  }
4425
+ var $$exports = { reposition };
4476
4426
  InteractableEvent($$anchor, {
4477
4427
  get chunk() {
4478
4428
  return $$props.chunk;
@@ -4489,18 +4439,18 @@ function Event$1($$anchor, $$props) {
4489
4439
  $.set(el, $$value, true);
4490
4440
  }
4491
4441
  });
4492
- return $.pop({ reposition });
4442
+ return $.pop($$exports);
4493
4443
  }
4494
4444
  var root_3$3 = $.from_html(`<div><!></div>`);
4495
4445
  var root$b = $.from_html(`<div role="cell"><div><!></div> <!> <div><!></div></div>`);
4496
4446
  function Day$1($$anchor, $$props) {
4497
4447
  $.push($$props, true);
4498
- const [$$stores, $$cleanup] = $.setup_stores();
4499
4448
  const $_today = () => $.store_get(_today, "$_today", $$stores);
4500
4449
  const $highlightedDates = () => $.store_get(highlightedDates, "$highlightedDates", $$stores);
4501
4450
  const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
4502
4451
  const $theme = () => $.store_get(theme, "$theme", $$stores);
4503
4452
  const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
4453
+ const [$$stores, $$cleanup] = $.setup_stores();
4504
4454
  let iChunks = $.prop($$props, "iChunks", 19, () => []), resource = $.prop($$props, "resource", 3, void 0);
4505
4455
  let { highlightedDates, theme, validRange, _interaction, _today } = getContext("state");
4506
4456
  let el = $.state(void 0);
@@ -4524,10 +4474,10 @@ function Day$1($$anchor, $$props) {
4524
4474
  runReposition(refs, $.get(dayChunks));
4525
4475
  }
4526
4476
  }
4477
+ var $$exports = { reposition };
4527
4478
  var div = root$b();
4528
4479
  div.__pointerdown = function(...$$args) {
4529
- var _a, _b;
4530
- (_b = !$.get(disabled) ? (_a = $_interaction().action) == null ? void 0 : _a.select : void 0) == null ? void 0 : _b.apply(this, $$args);
4480
+ (!$.get(disabled) ? $_interaction().action?.select : void 0)?.apply(this, $$args);
4531
4481
  };
4532
4482
  var div_1 = $.child(div);
4533
4483
  var node = $.child(div_1);
@@ -4584,7 +4534,7 @@ function Day$1($$anchor, $$props) {
4584
4534
  }
4585
4535
  }),
4586
4536
  ($$value, i2) => refs[i2] = $$value,
4587
- (i2) => refs == null ? void 0 : refs[i2],
4537
+ (i2) => refs?.[i2],
4588
4538
  () => [$.get(i)]
4589
4539
  );
4590
4540
  });
@@ -4603,20 +4553,16 @@ function Day$1($$anchor, $$props) {
4603
4553
  $.set_class(div_1, 1, $theme().bgEvents);
4604
4554
  $.set_class(div_3, 1, $theme().events);
4605
4555
  },
4606
- [() => {
4607
- var _a;
4608
- return (_a = $theme().weekdays) == null ? void 0 : _a[$$props.date.getUTCDay()];
4609
- }]
4556
+ [() => $theme().weekdays?.[$$props.date.getUTCDay()]]
4610
4557
  );
4611
4558
  $.append($$anchor, div);
4612
- var $$pop = $.pop({ reposition });
4559
+ var $$pop = $.pop($$exports);
4613
4560
  $$cleanup();
4614
4561
  return $$pop;
4615
4562
  }
4616
4563
  $.delegate(["pointerdown"]);
4617
4564
  function Week($$anchor, $$props) {
4618
4565
  $.push($$props, true);
4619
- const [$$stores, $$cleanup] = $.setup_stores();
4620
4566
  const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
4621
4567
  const $filterEventsWithResources = () => $.store_get(filterEventsWithResources, "$filterEventsWithResources", $$stores);
4622
4568
  const $resources = () => $.store_get(resources, "$resources", $$stores);
@@ -4624,6 +4570,7 @@ function Week($$anchor, $$props) {
4624
4570
  const $hiddenDays = () => $.store_get(hiddenDays, "$hiddenDays", $$stores);
4625
4571
  const $eventOrder = () => $.store_get(eventOrder, "$eventOrder", $$stores);
4626
4572
  const $_iEvents = () => $.store_get(_iEvents, "$_iEvents", $$stores);
4573
+ const [$$stores, $$cleanup] = $.setup_stores();
4627
4574
  let resource = $.prop($$props, "resource", 3, void 0);
4628
4575
  let {
4629
4576
  _filteredEvents,
@@ -4698,7 +4645,7 @@ function Week($$anchor, $$props) {
4698
4645
  }
4699
4646
  }),
4700
4647
  ($$value, i2) => refs[i2] = $$value,
4701
- (i2) => refs == null ? void 0 : refs[i2],
4648
+ (i2) => refs?.[i2],
4702
4649
  () => [i]
4703
4650
  );
4704
4651
  });
@@ -4711,13 +4658,13 @@ var root_3$2 = $.from_html(`<div><div><!> <div></div></div></div>`);
4711
4658
  var root$a = $.from_html(`<div><!> <div></div></div> <!> <!>`, 1);
4712
4659
  function View$2($$anchor, $$props) {
4713
4660
  $.push($$props, false);
4714
- const [$$stores, $$cleanup] = $.setup_stores();
4715
4661
  const $theme = () => $.store_get(theme, "$theme", $$stores);
4716
4662
  const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
4717
4663
  const $_today = () => $.store_get(_today, "$_today", $$stores);
4718
4664
  const $_intlDayHeaderAL = () => $.store_get(_intlDayHeaderAL, "$_intlDayHeaderAL", $$stores);
4719
4665
  const $_intlDayHeader = () => $.store_get(_intlDayHeader, "$_intlDayHeader", $$stores);
4720
4666
  const $allDaySlot = () => $.store_get(allDaySlot, "$allDaySlot", $$stores);
4667
+ const [$$stores, $$cleanup] = $.setup_stores();
4721
4668
  let {
4722
4669
  _viewDates,
4723
4670
  _intlDayHeader,
@@ -4737,7 +4684,7 @@ function View$2($$anchor, $$props) {
4737
4684
  $.each(node_1, 1, $_viewDates, $.index, ($$anchor3, date) => {
4738
4685
  var div_1 = root_2$4();
4739
4686
  var time = $.child(div_1);
4740
- $.action(time, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $_intlDayHeader().format($.get(date)));
4687
+ $.action(time, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(date)));
4741
4688
  $.reset(div_1);
4742
4689
  $.template_effect(
4743
4690
  ($0, $1, $2, $3) => {
@@ -4746,10 +4693,7 @@ function View$2($$anchor, $$props) {
4746
4693
  $.set_attribute(time, "aria-label", $3);
4747
4694
  },
4748
4695
  [
4749
- () => {
4750
- var _a;
4751
- return (_a = $theme().weekdays) == null ? void 0 : _a[$.get(date).getUTCDay()];
4752
- },
4696
+ () => $theme().weekdays?.[$.get(date).getUTCDay()],
4753
4697
  () => datesEqual($.get(date), $_today()) ? " " + $theme().today : "",
4754
4698
  () => toISOString($.get(date), 10),
4755
4699
  () => $_intlDayHeaderAL().format($.get(date))
@@ -4845,10 +4789,10 @@ const TimeGrid = {
4845
4789
  var root$9 = $.from_html(`<span></span>`);
4846
4790
  function Label$1($$anchor, $$props) {
4847
4791
  $.push($$props, true);
4848
- const [$$stores, $$cleanup] = $.setup_stores();
4849
4792
  const $resourceLabelContent = () => $.store_get(resourceLabelContent, "$resourceLabelContent", $$stores);
4850
4793
  const $_intlDayHeaderAL = () => $.store_get(_intlDayHeaderAL, "$_intlDayHeaderAL", $$stores);
4851
4794
  const $resourceLabelDidMount = () => $.store_get(resourceLabelDidMount, "$resourceLabelDidMount", $$stores);
4795
+ const [$$stores, $$cleanup] = $.setup_stores();
4852
4796
  let date = $.prop($$props, "date", 3, void 0), setLabel = $.prop($$props, "setLabel", 3, void 0);
4853
4797
  let {
4854
4798
  resourceLabelContent,
@@ -4889,7 +4833,7 @@ function Label$1($$anchor, $$props) {
4889
4833
  });
4890
4834
  var span = root$9();
4891
4835
  $.bind_this(span, ($$value) => $.set(el, $$value), () => $.get(el));
4892
- $.action(span, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $.get(content));
4836
+ $.action(span, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(content));
4893
4837
  $.template_effect(() => $.set_attribute(span, "aria-label", $.get(ariaLabel)));
4894
4838
  $.append($$anchor, span);
4895
4839
  $.pop();
@@ -4908,7 +4852,6 @@ var root_17 = $.from_html(`<div></div>`);
4908
4852
  var root$8 = $.from_html(`<div><!> <div></div></div> <!> <!>`, 1);
4909
4853
  function View$1($$anchor, $$props) {
4910
4854
  $.push($$props, true);
4911
- const [$$stores, $$cleanup] = $.setup_stores();
4912
4855
  const $datesAboveResources = () => $.store_get(datesAboveResources, "$datesAboveResources", $$stores);
4913
4856
  const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
4914
4857
  const $_viewResources = () => $.store_get(_viewResources, "$_viewResources", $$stores);
@@ -4917,6 +4860,7 @@ function View$1($$anchor, $$props) {
4917
4860
  const $_intlDayHeaderAL = () => $.store_get(_intlDayHeaderAL, "$_intlDayHeaderAL", $$stores);
4918
4861
  const $_intlDayHeader = () => $.store_get(_intlDayHeader, "$_intlDayHeader", $$stores);
4919
4862
  const $allDaySlot = () => $.store_get(allDaySlot, "$allDaySlot", $$stores);
4863
+ const [$$stores, $$cleanup] = $.setup_stores();
4920
4864
  let {
4921
4865
  datesAboveResources,
4922
4866
  _today,
@@ -4943,7 +4887,7 @@ function View$1($$anchor, $$props) {
4943
4887
  var consequent = ($$anchor4) => {
4944
4888
  var div_2 = root_3$1();
4945
4889
  var time = $.child(div_2);
4946
- $.action(time, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $_intlDayHeader().format($.get(item0)));
4890
+ $.action(time, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(item0)));
4947
4891
  $.reset(div_2);
4948
4892
  $.template_effect(
4949
4893
  ($0, $1, $2, $3) => {
@@ -4952,10 +4896,7 @@ function View$1($$anchor, $$props) {
4952
4896
  $.set_attribute(time, "aria-label", $3);
4953
4897
  },
4954
4898
  [
4955
- () => {
4956
- var _a;
4957
- return (_a = $theme().weekdays) == null ? void 0 : _a[$.get(item0).getUTCDay()];
4958
- },
4899
+ () => $theme().weekdays?.[$.get(item0).getUTCDay()],
4959
4900
  () => datesEqual($.get(item0), $_today()) ? " " + $theme().today : "",
4960
4901
  () => toISOString($.get(item0), 10),
4961
4902
  () => $_intlDayHeaderAL().format($.get(item0))
@@ -5007,7 +4948,7 @@ function View$1($$anchor, $$props) {
5007
4948
  var alternate_1 = ($$anchor6) => {
5008
4949
  var div_6 = root_8();
5009
4950
  var time_1 = $.child(div_6);
5010
- $.action(time_1, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $_intlDayHeader().format($.get(item1)));
4951
+ $.action(time_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(item1)));
5011
4952
  $.reset(div_6);
5012
4953
  $.template_effect(
5013
4954
  ($0, $1, $2, $3) => {
@@ -5016,10 +4957,7 @@ function View$1($$anchor, $$props) {
5016
4957
  $.set_attribute(time_1, "aria-label", `${resourceLabels[i] ?? ""}${$3 ?? ""}`);
5017
4958
  },
5018
4959
  [
5019
- () => {
5020
- var _a;
5021
- return (_a = $theme().weekdays) == null ? void 0 : _a[$.get(item1).getUTCDay()];
5022
- },
4960
+ () => $theme().weekdays?.[$.get(item1).getUTCDay()],
5023
4961
  () => datesEqual($.get(item1), $_today()) ? " " + $theme().today : "",
5024
4962
  () => toISOString($.get(item1), 10),
5025
4963
  () => $_intlDayHeaderAL().format($.get(item1))
@@ -5232,10 +5170,10 @@ function nestedResources(state) {
5232
5170
  var root$7 = $.from_html(`<span></span>`);
5233
5171
  function Label($$anchor, $$props) {
5234
5172
  $.push($$props, true);
5235
- const [$$stores, $$cleanup] = $.setup_stores();
5236
5173
  const $resourceLabelContent = () => $.store_get(resourceLabelContent, "$resourceLabelContent", $$stores);
5237
5174
  const $_resHs = () => $.store_get(_resHs, "$_resHs", $$stores);
5238
5175
  const $resourceLabelDidMount = () => $.store_get(resourceLabelDidMount, "$resourceLabelDidMount", $$stores);
5176
+ const [$$stores, $$cleanup] = $.setup_stores();
5239
5177
  let date = $.prop($$props, "date", 3, void 0);
5240
5178
  let { resourceLabelContent, resourceLabelDidMount, _resHs } = getContext("state");
5241
5179
  let el = $.state(void 0);
@@ -5267,7 +5205,7 @@ function Label($$anchor, $$props) {
5267
5205
  });
5268
5206
  var span = root$7();
5269
5207
  $.bind_this(span, ($$value) => $.set(el, $$value), () => $.get(el));
5270
- $.action(span, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $.get(content));
5208
+ $.action(span, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(content));
5271
5209
  $.append($$anchor, span);
5272
5210
  $.pop();
5273
5211
  $$cleanup();
@@ -5283,8 +5221,8 @@ var root_2$2 = $.from_html(`<button><!></button>`);
5283
5221
  var root$6 = $.from_html(`<!> <span><!></span>`, 1);
5284
5222
  function Expander($$anchor, $$props) {
5285
5223
  $.push($$props, true);
5286
- const [$$stores, $$cleanup] = $.setup_stores();
5287
5224
  const $theme = () => $.store_get(theme, "$theme", $$stores);
5225
+ const [$$stores, $$cleanup] = $.setup_stores();
5288
5226
  let { resources, theme } = getContext("state");
5289
5227
  let payload = $.state({});
5290
5228
  let expanded = $.state(true);
@@ -5334,8 +5272,7 @@ function Expander($$anchor, $$props) {
5334
5272
  $.append($$anchor2, button);
5335
5273
  };
5336
5274
  $.if(node_1, ($$render) => {
5337
- var _a;
5338
- if ((_a = $.get(payload).children) == null ? void 0 : _a.length) $$render(consequent_1);
5275
+ if ($.get(payload).children?.length) $$render(consequent_1);
5339
5276
  });
5340
5277
  }
5341
5278
  $.reset(span_1);
@@ -5349,7 +5286,6 @@ var root_1$3 = $.from_html(`<div role="rowheader"><!> <!></div>`);
5349
5286
  var root$5 = $.from_html(`<div><div></div> <div></div></div>`);
5350
5287
  function Sidebar($$anchor, $$props) {
5351
5288
  $.push($$props, true);
5352
- const [$$stores, $$cleanup] = $.setup_stores();
5353
5289
  const $_viewResources = () => $.store_get(_viewResources, "$_viewResources", $$stores);
5354
5290
  const $_resHs = () => $.store_get(_resHs, "$_resHs", $$stores);
5355
5291
  const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
@@ -5358,6 +5294,7 @@ function Sidebar($$anchor, $$props) {
5358
5294
  const $_sidebarEl = () => $.store_get(_sidebarEl, "$_sidebarEl", $$stores);
5359
5295
  const $_daysHs = () => $.store_get(_daysHs, "$_daysHs", $$stores);
5360
5296
  const $_nestedResources = () => $.store_get(_nestedResources, "$_nestedResources", $$stores);
5297
+ const [$$stores, $$cleanup] = $.setup_stores();
5361
5298
  let {
5362
5299
  _viewResources,
5363
5300
  _headerHeight,
@@ -5434,7 +5371,6 @@ var root_1$2 = $.from_html(`<div><!></div>`);
5434
5371
  var root$4 = $.from_html(`<div><div role="row"></div> <div></div></div>`);
5435
5372
  function Header($$anchor, $$props) {
5436
5373
  $.push($$props, false);
5437
- const [$$stores, $$cleanup] = $.setup_stores();
5438
5374
  const $theme = () => $.store_get(theme, "$theme", $$stores);
5439
5375
  const $_headerEl = () => $.store_get(_headerEl, "$_headerEl", $$stores);
5440
5376
  const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
@@ -5443,6 +5379,7 @@ function Header($$anchor, $$props) {
5443
5379
  const $_intlDayHeaderAL = () => $.store_get(_intlDayHeaderAL, "$_intlDayHeaderAL", $$stores);
5444
5380
  const $_intlDayHeader = () => $.store_get(_intlDayHeader, "$_intlDayHeader", $$stores);
5445
5381
  const $_dayTimes = () => $.store_get(_dayTimes, "$_dayTimes", $$stores);
5382
+ const [$$stores, $$cleanup] = $.setup_stores();
5446
5383
  let {
5447
5384
  _headerEl,
5448
5385
  _headerHeight,
@@ -5465,13 +5402,13 @@ function Header($$anchor, $$props) {
5465
5402
  var fragment = root_2$1();
5466
5403
  var div_3 = $.first_child(fragment);
5467
5404
  var time_1 = $.child(div_3);
5468
- $.action(time_1, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $_intlDayHeader().format($.get(date)));
5405
+ $.action(time_1, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(date)));
5469
5406
  $.reset(div_3);
5470
5407
  var div_4 = $.sibling(div_3, 2);
5471
5408
  $.each(div_4, 5, () => $_dayTimes()[$.get(date).getTime()], $.index, ($$anchor4, time) => {
5472
5409
  var div_5 = root_3();
5473
5410
  var time_2 = $.child(div_5);
5474
- $.action(time_2, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $.get(time)[1]);
5411
+ $.action(time_2, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $.get(time)[1]);
5475
5412
  $.reset(div_5);
5476
5413
  $.template_effect(() => {
5477
5414
  $.set_class(div_5, 1, `${$theme().time ?? ""}${$.get(time)[2] ? "" : " " + $theme().minor}`);
@@ -5497,7 +5434,7 @@ function Header($$anchor, $$props) {
5497
5434
  var alternate = ($$anchor3) => {
5498
5435
  var div_6 = root_4();
5499
5436
  var time_3 = $.child(div_6);
5500
- $.action(time_3, ($$node, $$action_arg) => setContent == null ? void 0 : setContent($$node, $$action_arg), () => $_intlDayHeader().format($.get(date)));
5437
+ $.action(time_3, ($$node, $$action_arg) => setContent?.($$node, $$action_arg), () => $_intlDayHeader().format($.get(date)));
5501
5438
  $.reset(div_6);
5502
5439
  $.template_effect(
5503
5440
  ($0, $1) => {
@@ -5519,10 +5456,7 @@ function Header($$anchor, $$props) {
5519
5456
  }
5520
5457
  $.reset(div_2);
5521
5458
  $.template_effect(($0, $1) => $.set_class(div_2, 1, `${$theme().day ?? ""} ${$0 ?? ""}${$1 ?? ""}`), [
5522
- () => {
5523
- var _a;
5524
- return (_a = $theme().weekdays) == null ? void 0 : _a[$.get(date).getUTCDay()];
5525
- },
5459
+ () => $theme().weekdays?.[$.get(date).getUTCDay()],
5526
5460
  () => datesEqual($.get(date), $_today()) ? " " + $theme().today : ""
5527
5461
  ]);
5528
5462
  $.append($$anchor2, div_2);
@@ -5531,7 +5465,7 @@ function Header($$anchor, $$props) {
5531
5465
  var div_7 = $.sibling(div_1, 2);
5532
5466
  $.reset(div);
5533
5467
  $.bind_this(div, ($$value) => $.store_set(_headerEl, $$value), () => $_headerEl());
5534
- $.action(div, ($$node, $$action_arg) => observeResize == null ? void 0 : observeResize($$node, $$action_arg), () => () => $.store_set(_headerHeight, $_headerEl().clientHeight));
5468
+ $.action(div, ($$node, $$action_arg) => observeResize?.($$node, $$action_arg), () => () => $.store_set(_headerHeight, $_headerEl().clientHeight));
5535
5469
  $.template_effect(() => {
5536
5470
  $.set_class(div, 1, $theme().header);
5537
5471
  $.set_class(div_1, 1, $theme().days);
@@ -5638,7 +5572,7 @@ function repositionEvent(chunk, dayChunks, longChunks, height2, allDay) {
5638
5572
  chunk.bottom = height2;
5639
5573
  let margin = 1;
5640
5574
  let key = chunk.date.getTime();
5641
- longChunks = (longChunks == null ? void 0 : longChunks[key]) ?? [];
5575
+ longChunks = longChunks?.[key] ?? [];
5642
5576
  let chunks = [...dayChunks, ...longChunks];
5643
5577
  chunks.sort((a, b) => (a.top ?? 0) - (b.top ?? 0) || a.start - b.start || b.event.allDay - a.event.allDay);
5644
5578
  for (let dayChunk of chunks) {
@@ -5659,9 +5593,9 @@ function getSlotTimeLimits($_dayTimeLimits, date) {
5659
5593
  }
5660
5594
  function Event($$anchor, $$props) {
5661
5595
  $.push($$props, true);
5662
- const [$$stores, $$cleanup] = $.setup_stores();
5663
5596
  const $slotWidth = () => $.store_get(slotWidth, "$slotWidth", $$stores);
5664
5597
  const $slotDuration = () => $.store_get(slotDuration, "$slotDuration", $$stores);
5598
+ const [$$stores, $$cleanup] = $.setup_stores();
5665
5599
  let dayChunks = $.prop($$props, "dayChunks", 19, () => []), longChunks = $.prop($$props, "longChunks", 19, () => ({})), resource = $.prop($$props, "resource", 3, void 0);
5666
5600
  let { slotDuration, slotWidth } = getContext("state");
5667
5601
  let el = $.state(void 0);
@@ -5694,6 +5628,7 @@ function Event($$anchor, $$props) {
5694
5628
  $.set(margin, repositionEvent($$props.chunk, dayChunks(), longChunks(), h, !toSeconds($slotDuration())), true);
5695
5629
  return $.get(margin) + h;
5696
5630
  }
5631
+ var $$exports = { reposition };
5697
5632
  var fragment = $.comment();
5698
5633
  var node = $.first_child(fragment);
5699
5634
  {
@@ -5720,7 +5655,7 @@ function Event($$anchor, $$props) {
5720
5655
  });
5721
5656
  }
5722
5657
  $.append($$anchor, fragment);
5723
- var $$pop = $.pop({ reposition });
5658
+ var $$pop = $.pop($$exports);
5724
5659
  $$cleanup();
5725
5660
  return $$pop;
5726
5661
  }
@@ -5728,7 +5663,6 @@ var root_1$1 = $.from_html(`<!> <!> <!> <!>`, 1);
5728
5663
  var root$3 = $.from_html(`<div role="cell"><div><!></div></div>`);
5729
5664
  function Day($$anchor, $$props) {
5730
5665
  $.push($$props, true);
5731
- const [$$stores, $$cleanup] = $.setup_stores();
5732
5666
  const $_today = () => $.store_get(_today, "$_today", $$stores);
5733
5667
  const $highlightedDates = () => $.store_get(highlightedDates, "$highlightedDates", $$stores);
5734
5668
  const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
@@ -5737,6 +5671,7 @@ function Day($$anchor, $$props) {
5737
5671
  const $slotWidth = () => $.store_get(slotWidth, "$slotWidth", $$stores);
5738
5672
  const $theme = () => $.store_get(theme, "$theme", $$stores);
5739
5673
  const $_interaction = () => $.store_get(_interaction, "$_interaction", $$stores);
5674
+ const [$$stores, $$cleanup] = $.setup_stores();
5740
5675
  let iChunks = $.prop($$props, "iChunks", 19, () => []);
5741
5676
  let {
5742
5677
  highlightedDates,
@@ -5777,10 +5712,10 @@ function Day($$anchor, $$props) {
5777
5712
  function reposition() {
5778
5713
  return max(...runReposition(refs, $.get(dayChunks)));
5779
5714
  }
5715
+ var $$exports = { reposition };
5780
5716
  var div = root$3();
5781
5717
  div.__pointerdown = function(...$$args) {
5782
- var _a, _b;
5783
- (_b = (_a = $_interaction().action) == null ? void 0 : _a.select) == null ? void 0 : _b.apply(this, $$args);
5718
+ $_interaction().action?.select?.apply(this, $$args);
5784
5719
  };
5785
5720
  var div_1 = $.child(div);
5786
5721
  var node = $.child(div_1);
@@ -5826,7 +5761,7 @@ function Day($$anchor, $$props) {
5826
5761
  }
5827
5762
  }),
5828
5763
  ($$value, i2) => refs[i2] = $$value,
5829
- (i2) => refs == null ? void 0 : refs[i2],
5764
+ (i2) => refs?.[i2],
5830
5765
  () => [$.get(i)]
5831
5766
  );
5832
5767
  });
@@ -5862,15 +5797,12 @@ function Day($$anchor, $$props) {
5862
5797
  $.set_class(div_1, 1, $theme().events);
5863
5798
  },
5864
5799
  [
5865
- () => {
5866
- var _a;
5867
- return (_a = $theme().weekdays) == null ? void 0 : _a[$$props.date.getUTCDay()];
5868
- },
5800
+ () => $theme().weekdays?.[$$props.date.getUTCDay()],
5869
5801
  () => $.get(allDay) ? null : ceil((toSeconds($.get(slotTimeLimits2).max) - toSeconds($.get(slotTimeLimits2).min)) / toSeconds($slotDuration()))
5870
5802
  ]
5871
5803
  );
5872
5804
  $.append($$anchor, div);
5873
- var $$pop = $.pop({ reposition });
5805
+ var $$pop = $.pop($$exports);
5874
5806
  $$cleanup();
5875
5807
  return $$pop;
5876
5808
  }
@@ -5878,7 +5810,6 @@ $.delegate(["pointerdown"]);
5878
5810
  var root$2 = $.from_html(`<div role="row"></div>`);
5879
5811
  function Days($$anchor, $$props) {
5880
5812
  $.push($$props, true);
5881
- const [$$stores, $$cleanup] = $.setup_stores();
5882
5813
  const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
5883
5814
  const $validRange = () => $.store_get(validRange, "$validRange", $$stores);
5884
5815
  const $_dayTimeLimits = () => $.store_get(_dayTimeLimits, "$_dayTimeLimits", $$stores);
@@ -5889,6 +5820,7 @@ function Days($$anchor, $$props) {
5889
5820
  const $_daysHs = () => $.store_get(_daysHs, "$_daysHs", $$stores);
5890
5821
  const $theme = () => $.store_get(theme, "$theme", $$stores);
5891
5822
  const $_resHs = () => $.store_get(_resHs, "$_resHs", $$stores);
5823
+ const [$$stores, $$cleanup] = $.setup_stores();
5892
5824
  let {
5893
5825
  _viewDates,
5894
5826
  _filteredEvents,
@@ -5947,6 +5879,7 @@ function Days($$anchor, $$props) {
5947
5879
  $_daysHs().set($$props.resource, ceil(max(...runReposition(refs, $_viewDates()))) + 10);
5948
5880
  $.store_set(_daysHs, $_daysHs());
5949
5881
  }
5882
+ var $$exports = { reposition };
5950
5883
  var div = root$2();
5951
5884
  $.each(div, 5, $_viewDates, $.index, ($$anchor2, date, i) => {
5952
5885
  $.bind_this(
@@ -5971,7 +5904,7 @@ function Days($$anchor, $$props) {
5971
5904
  }
5972
5905
  }),
5973
5906
  ($$value, i2) => refs[i2] = $$value,
5974
- (i2) => refs == null ? void 0 : refs[i2],
5907
+ (i2) => refs?.[i2],
5975
5908
  () => [i]
5976
5909
  );
5977
5910
  });
@@ -5986,7 +5919,7 @@ function Days($$anchor, $$props) {
5986
5919
  ]
5987
5920
  );
5988
5921
  $.append($$anchor, div);
5989
- var $$pop = $.pop({ reposition });
5922
+ var $$pop = $.pop($$exports);
5990
5923
  $$cleanup();
5991
5924
  return $$pop;
5992
5925
  }
@@ -5994,7 +5927,6 @@ var root_2 = $.from_html(`<div></div>`);
5994
5927
  var root$1 = $.from_html(`<div><div><div></div> <!></div></div>`);
5995
5928
  function Body($$anchor, $$props) {
5996
5929
  $.push($$props, true);
5997
- const [$$stores, $$cleanup] = $.setup_stores();
5998
5930
  const $_dayTimeLimits = () => $.store_get(_dayTimeLimits, "$_dayTimeLimits", $$stores);
5999
5931
  const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
6000
5932
  const $_bodyEl = () => $.store_get(_bodyEl, "$_bodyEl", $$stores);
@@ -6008,6 +5940,7 @@ function Body($$anchor, $$props) {
6008
5940
  const $_sidebarEl = () => $.store_get(_sidebarEl, "$_sidebarEl", $$stores);
6009
5941
  const $theme = () => $.store_get(theme, "$theme", $$stores);
6010
5942
  const $_dayTimes = () => $.store_get(_dayTimes, "$_dayTimes", $$stores);
5943
+ const [$$stores, $$cleanup] = $.setup_stores();
6011
5944
  let {
6012
5945
  _bodyEl,
6013
5946
  _bodyHeight,
@@ -6081,14 +6014,14 @@ function Body($$anchor, $$props) {
6081
6014
  }
6082
6015
  }),
6083
6016
  ($$value, i2) => refs[i2] = $$value,
6084
- (i2) => refs == null ? void 0 : refs[i2],
6017
+ (i2) => refs?.[i2],
6085
6018
  () => [i]
6086
6019
  );
6087
6020
  });
6088
6021
  $.reset(div_1);
6089
6022
  $.reset(div);
6090
6023
  $.bind_this(div, ($$value) => $.store_set(_bodyEl, $$value), () => $_bodyEl());
6091
- $.action(div, ($$node, $$action_arg) => observeResize == null ? void 0 : observeResize($$node, $$action_arg), () => onresize);
6024
+ $.action(div, ($$node, $$action_arg) => observeResize?.($$node, $$action_arg), () => onresize);
6092
6025
  $.template_effect(() => {
6093
6026
  $.set_class(div, 1, $theme().body);
6094
6027
  $.set_class(div_1, 1, $theme().content);
@@ -6102,7 +6035,6 @@ function Body($$anchor, $$props) {
6102
6035
  var root_1 = $.from_html(`<div></div>`);
6103
6036
  function NowIndicator($$anchor, $$props) {
6104
6037
  $.push($$props, true);
6105
- const [$$stores, $$cleanup] = $.setup_stores();
6106
6038
  const $_viewDates = () => $.store_get(_viewDates, "$_viewDates", $$stores);
6107
6039
  const $_dayTimeLimits = () => $.store_get(_dayTimeLimits, "$_dayTimeLimits", $$stores);
6108
6040
  const $_today = () => $.store_get(_today, "$_today", $$stores);
@@ -6114,6 +6046,7 @@ function NowIndicator($$anchor, $$props) {
6114
6046
  const $theme = () => $.store_get(theme, "$theme", $$stores);
6115
6047
  const $_headerHeight = () => $.store_get(_headerHeight, "$_headerHeight", $$stores);
6116
6048
  const $_bodyHeight = () => $.store_get(_bodyHeight, "$_bodyHeight", $$stores);
6049
+ const [$$stores, $$cleanup] = $.setup_stores();
6117
6050
  let {
6118
6051
  slotDuration,
6119
6052
  slotWidth,
@@ -6179,9 +6112,9 @@ function NowIndicator($$anchor, $$props) {
6179
6112
  var root = $.from_html(`<div><!> <div><!> <!> <!></div></div>`);
6180
6113
  function View($$anchor, $$props) {
6181
6114
  $.push($$props, false);
6182
- const [$$stores, $$cleanup] = $.setup_stores();
6183
6115
  const $theme = () => $.store_get(theme, "$theme", $$stores);
6184
6116
  const $nowIndicator = () => $.store_get(nowIndicator, "$nowIndicator", $$stores);
6117
+ const [$$stores, $$cleanup] = $.setup_stores();
6185
6118
  let { nowIndicator, theme } = getContext("state");
6186
6119
  $.init();
6187
6120
  var div = root();