function Qo() {
  window.fbAsyncInit = function() {
    FB.init({
      appId: "1945424902141041",
      cookie: !0,
      xfbml: !0,
      version: "v2.11"
    });
  };
  var t = navigator.language || navigator.userLanguage, e = "de_DE";
  switch (t.split("-")[0]) {
    case "de":
      e = "de_DE";
      break;
    case "en":
      e = "en_GB";
      break;
    case "fr":
      e = "fr_FR";
      break;
    case "es":
      e = "es_ES";
      break;
    case "cs":
      e = "cs_CZ";
      break;
    case "cn":
      e = "zh_CN";
      break;
  }
  (function(n, r, i) {
    var s, a = n.getElementsByTagName(r)[0];
    n.getElementById(i) || (s = n.createElement(r), s.id = i, s.src = "https://connect.facebook.net/" + e + "/sdk.js", a.parentNode.insertBefore(s, a));
  })(document, "script", "facebook-jssdk");
}
function Yo() {
  var n;
  const t = (n = window.googleMapsApiKey) == null ? void 0 : n[0];
  if (!t) {
    console.error("Google Maps API key is missing");
    return;
  }
  if (typeof google == "object" && typeof google.maps == "object") {
    console.log("Google Maps API already loaded"), window.initialiseGoogleMaps();
    return;
  }
  const e = document.createElement("script");
  e.type = "text/javascript", e.src = `https://maps.googleapis.com/maps/api/js?loading=async&callback=window.initialiseGoogleMaps&key=${t}`, e.async = !0, e.defer = !0, document.body.appendChild(e);
}
function $o() {
  document.querySelectorAll(".wdg_google_init").forEach((e) => {
    const n = e.dataset.gmarker, r = e.dataset.gstyle, i = e.dataset.gtype, s = r === "json", a = n === "1", o = parseInt(e.dataset.zoom) || 8, l = parseFloat(e.dataset.lan) || 0, c = parseFloat(e.dataset.lat) || 0, u = new google.maps.LatLng(c, l), m = new google.maps.Map(e, Jo({
      zoom: o,
      center: u,
      googleStyle: r,
      googleType: i
    }));
    s && Ko(m), a && Xo({ map: m, position: u });
  });
}
function Jo({ zoom: t, center: e, googleStyle: n, googleType: r }) {
  const i = "edooboxstyle";
  return {
    zoom: t,
    center: e,
    streetViewControl: !0,
    ...n === "json" ? {
      mapTypeControlOptions: {
        mapTypeIds: [google.maps.MapTypeId[r], i]
      },
      mapTypeId: i
    } : {
      mapTypeId: (r || "ROADMAP").toLowerCase()
    }
  };
}
function Ko(t) {
  t.mapTypes.set("edooboxstyle", new google.maps.StyledMapType(window.googlemapstyle, {
    name: "Event Style"
  }));
}
function Xo({ map: t, position: e }) {
  return new google.maps.Marker({
    position: e,
    map: t,
    animation: google.maps.Animation.DROP,
    title: "Location"
  });
}
function el() {
  (function(t, r) {
    var n = t.createElement(r), r = t.getElementsByTagName(r)[0];
    n.src = "https://www.xing-share.com/js/external/share.js", r.parentNode.insertBefore(n, r);
  })(document, "script");
}
function tl() {
  var t = navigator.language || navigator.userLanguage, e = "de-DE";
  switch (t.split("-")[0]) {
    case "de":
      e = "de-DE";
      break;
    case "en":
      e = "en-US";
      break;
    case "fr":
      e = "fr-FR";
      break;
  }
  window.___gcfg = { lang: e }, function() {
    var n = document.createElement("script");
    n.type = "text/javascript", n.async = !0, n.src = "https://apis.google.com/js/plusone.js";
    var r = document.getElementsByTagName("script")[0];
    r.parentNode.insertBefore(n, r);
  }();
}
class ze extends Error {
}
class nl extends ze {
  constructor(e) {
    super(`Invalid DateTime: ${e.toMessage()}`);
  }
}
class rl extends ze {
  constructor(e) {
    super(`Invalid Interval: ${e.toMessage()}`);
  }
}
class il extends ze {
  constructor(e) {
    super(`Invalid Duration: ${e.toMessage()}`);
  }
}
class ct extends ze {
}
class ps extends ze {
  constructor(e) {
    super(`Invalid unit ${e}`);
  }
}
class K extends ze {
}
class ye extends ze {
  constructor() {
    super("Zone is an abstract class");
  }
}
const w = "numeric", ae = "short", Y = "long", Vn = {
  year: w,
  month: w,
  day: w
}, vs = {
  year: w,
  month: ae,
  day: w
}, sl = {
  year: w,
  month: ae,
  day: w,
  weekday: ae
}, ys = {
  year: w,
  month: Y,
  day: w
}, bs = {
  year: w,
  month: Y,
  day: w,
  weekday: Y
}, ws = {
  hour: w,
  minute: w
}, Es = {
  hour: w,
  minute: w,
  second: w
}, As = {
  hour: w,
  minute: w,
  second: w,
  timeZoneName: ae
}, Ss = {
  hour: w,
  minute: w,
  second: w,
  timeZoneName: Y
}, Ds = {
  hour: w,
  minute: w,
  hourCycle: "h23"
}, Cs = {
  hour: w,
  minute: w,
  second: w,
  hourCycle: "h23"
}, Ts = {
  hour: w,
  minute: w,
  second: w,
  hourCycle: "h23",
  timeZoneName: ae
}, _s = {
  hour: w,
  minute: w,
  second: w,
  hourCycle: "h23",
  timeZoneName: Y
}, Rs = {
  year: w,
  month: w,
  day: w,
  hour: w,
  minute: w
}, xs = {
  year: w,
  month: w,
  day: w,
  hour: w,
  minute: w,
  second: w
}, ks = {
  year: w,
  month: ae,
  day: w,
  hour: w,
  minute: w
}, Is = {
  year: w,
  month: ae,
  day: w,
  hour: w,
  minute: w,
  second: w
}, al = {
  year: w,
  month: ae,
  day: w,
  weekday: ae,
  hour: w,
  minute: w
}, Ms = {
  year: w,
  month: Y,
  day: w,
  hour: w,
  minute: w,
  timeZoneName: ae
}, Ns = {
  year: w,
  month: Y,
  day: w,
  hour: w,
  minute: w,
  second: w,
  timeZoneName: ae
}, Os = {
  year: w,
  month: Y,
  day: w,
  weekday: Y,
  hour: w,
  minute: w,
  timeZoneName: Y
}, Fs = {
  year: w,
  month: Y,
  day: w,
  weekday: Y,
  hour: w,
  minute: w,
  second: w,
  timeZoneName: Y
};
function R(t) {
  return typeof t > "u";
}
function Ne(t) {
  return typeof t == "number";
}
function ln(t) {
  return typeof t == "number" && t % 1 === 0;
}
function ol(t) {
  return typeof t == "string";
}
function ll(t) {
  return Object.prototype.toString.call(t) === "[object Date]";
}
function Hs() {
  try {
    return typeof Intl < "u" && !!Intl.RelativeTimeFormat;
  } catch {
    return !1;
  }
}
function cl(t) {
  return Array.isArray(t) ? t : [t];
}
function Wr(t, e, n) {
  if (t.length !== 0)
    return t.reduce((r, i) => {
      const s = [e(i), i];
      return r && n(r[0], s[0]) === r[0] ? r : s;
    }, null)[1];
}
function ul(t, e) {
  return e.reduce((n, r) => (n[r] = t[r], n), {});
}
function $e(t, e) {
  return Object.prototype.hasOwnProperty.call(t, e);
}
function fe(t, e, n) {
  return ln(t) && t >= e && t <= n;
}
function dl(t, e) {
  return t - e * Math.floor(t / e);
}
function V(t, e = 2) {
  const n = t < 0;
  let r;
  return n ? r = "-" + ("" + -t).padStart(e, "0") : r = ("" + t).padStart(e, "0"), r;
}
function be(t) {
  if (!(R(t) || t === null || t === ""))
    return parseInt(t, 10);
}
function Re(t) {
  if (!(R(t) || t === null || t === ""))
    return parseFloat(t);
}
function dr(t) {
  if (!(R(t) || t === null || t === "")) {
    const e = parseFloat("0." + t) * 1e3;
    return Math.floor(e);
  }
}
function fr(t, e, n = !1) {
  const r = 10 ** e;
  return (n ? Math.trunc : Math.round)(t * r) / r;
}
function Et(t) {
  return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
}
function dt(t) {
  return Et(t) ? 366 : 365;
}
function qt(t, e) {
  const n = dl(e - 1, 12) + 1, r = t + (e - n) / 12;
  return n === 2 ? Et(r) ? 29 : 28 : [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][n - 1];
}
function hr(t) {
  let e = Date.UTC(
    t.year,
    t.month - 1,
    t.day,
    t.hour,
    t.minute,
    t.second,
    t.millisecond
  );
  return t.year < 100 && t.year >= 0 && (e = new Date(e), e.setUTCFullYear(e.getUTCFullYear() - 1900)), +e;
}
function Zt(t) {
  const e = (t + Math.floor(t / 4) - Math.floor(t / 100) + Math.floor(t / 400)) % 7, n = t - 1, r = (n + Math.floor(n / 4) - Math.floor(n / 100) + Math.floor(n / 400)) % 7;
  return e === 4 || r === 3 ? 53 : 52;
}
function Wn(t) {
  return t > 99 ? t : t > 60 ? 1900 + t : 2e3 + t;
}
function Ps(t, e, n, r = null) {
  const i = new Date(t), s = {
    hourCycle: "h23",
    year: "numeric",
    month: "2-digit",
    day: "2-digit",
    hour: "2-digit",
    minute: "2-digit"
  };
  r && (s.timeZone = r);
  const a = { timeZoneName: e, ...s }, o = new Intl.DateTimeFormat(n, a).formatToParts(i).find((l) => l.type.toLowerCase() === "timezonename");
  return o ? o.value : null;
}
function cn(t, e) {
  let n = parseInt(t, 10);
  Number.isNaN(n) && (n = 0);
  const r = parseInt(e, 10) || 0, i = n < 0 || Object.is(n, -0) ? -r : r;
  return n * 60 + i;
}
function Bs(t) {
  const e = Number(t);
  if (typeof t == "boolean" || t === "" || Number.isNaN(e))
    throw new K(`Invalid unit value ${t}`);
  return e;
}
function Qt(t, e) {
  const n = {};
  for (const r in t)
    if ($e(t, r)) {
      const i = t[r];
      if (i == null)
        continue;
      n[e(r)] = Bs(i);
    }
  return n;
}
function ft(t, e) {
  const n = Math.trunc(Math.abs(t / 60)), r = Math.trunc(Math.abs(t % 60)), i = t >= 0 ? "+" : "-";
  switch (e) {
    case "short":
      return `${i}${V(n, 2)}:${V(r, 2)}`;
    case "narrow":
      return `${i}${n}${r > 0 ? `:${r}` : ""}`;
    case "techie":
      return `${i}${V(n, 2)}${V(r, 2)}`;
    default:
      throw new RangeError(`Value format ${e} is out of range for property format`);
  }
}
function un(t) {
  return ul(t, ["hour", "minute", "second", "millisecond"]);
}
const Ls = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/, fl = [
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
  "September",
  "October",
  "November",
  "December"
], zs = [
  "Jan",
  "Feb",
  "Mar",
  "Apr",
  "May",
  "Jun",
  "Jul",
  "Aug",
  "Sep",
  "Oct",
  "Nov",
  "Dec"
], hl = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"];
function Us(t) {
  switch (t) {
    case "narrow":
      return [...hl];
    case "short":
      return [...zs];
    case "long":
      return [...fl];
    case "numeric":
      return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
    case "2-digit":
      return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
    default:
      return null;
  }
}
const Vs = [
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday",
  "Sunday"
], Ws = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], ml = ["M", "T", "W", "T", "F", "S", "S"];
function js(t) {
  switch (t) {
    case "narrow":
      return [...ml];
    case "short":
      return [...Ws];
    case "long":
      return [...Vs];
    case "numeric":
      return ["1", "2", "3", "4", "5", "6", "7"];
    default:
      return null;
  }
}
const Gs = ["AM", "PM"], gl = ["Before Christ", "Anno Domini"], pl = ["BC", "AD"], vl = ["B", "A"];
function qs(t) {
  switch (t) {
    case "narrow":
      return [...vl];
    case "short":
      return [...pl];
    case "long":
      return [...gl];
    default:
      return null;
  }
}
function yl(t) {
  return Gs[t.hour < 12 ? 0 : 1];
}
function bl(t, e) {
  return js(e)[t.weekday - 1];
}
function wl(t, e) {
  return Us(e)[t.month - 1];
}
function El(t, e) {
  return qs(e)[t.year < 0 ? 0 : 1];
}
function Al(t, e, n = "always", r = !1) {
  const i = {
    years: ["year", "yr."],
    quarters: ["quarter", "qtr."],
    months: ["month", "mo."],
    weeks: ["week", "wk."],
    days: ["day", "day", "days"],
    hours: ["hour", "hr."],
    minutes: ["minute", "min."],
    seconds: ["second", "sec."]
  }, s = ["hours", "minutes", "seconds"].indexOf(t) === -1;
  if (n === "auto" && s) {
    const m = t === "days";
    switch (e) {
      case 1:
        return m ? "tomorrow" : `next ${i[t][0]}`;
      case -1:
        return m ? "yesterday" : `last ${i[t][0]}`;
      case 0:
        return m ? "today" : `this ${i[t][0]}`;
    }
  }
  const a = Object.is(e, -0) || e < 0, o = Math.abs(e), l = o === 1, c = i[t], u = r ? l ? c[1] : c[2] || c[1] : l ? i[t][0] : t;
  return a ? `${o} ${u} ago` : `in ${o} ${u}`;
}
function jr(t, e) {
  let n = "";
  for (const r of t)
    r.literal ? n += r.val : n += e(r.val);
  return n;
}
const Sl = {
  D: Vn,
  DD: vs,
  DDD: ys,
  DDDD: bs,
  t: ws,
  tt: Es,
  ttt: As,
  tttt: Ss,
  T: Ds,
  TT: Cs,
  TTT: Ts,
  TTTT: _s,
  f: Rs,
  ff: ks,
  fff: Ms,
  ffff: Os,
  F: xs,
  FF: Is,
  FFF: Ns,
  FFFF: Fs
};
class Z {
  static create(e, n = {}) {
    return new Z(e, n);
  }
  static parseFormat(e) {
    let n = null, r = "", i = !1;
    const s = [];
    for (let a = 0; a < e.length; a++) {
      const o = e.charAt(a);
      o === "'" ? (r.length > 0 && s.push({ literal: i, val: r }), n = null, r = "", i = !i) : i || o === n ? r += o : (r.length > 0 && s.push({ literal: !1, val: r }), r = o, n = o);
    }
    return r.length > 0 && s.push({ literal: i, val: r }), s;
  }
  static macroTokenToFormatOpts(e) {
    return Sl[e];
  }
  constructor(e, n) {
    this.opts = n, this.loc = e, this.systemLoc = null;
  }
  formatWithSystemDefault(e, n) {
    return this.systemLoc === null && (this.systemLoc = this.loc.redefaultToSystem()), this.systemLoc.dtFormatter(e, { ...this.opts, ...n }).format();
  }
  formatDateTime(e, n = {}) {
    return this.loc.dtFormatter(e, { ...this.opts, ...n }).format();
  }
  formatDateTimeParts(e, n = {}) {
    return this.loc.dtFormatter(e, { ...this.opts, ...n }).formatToParts();
  }
  resolvedOptions(e, n = {}) {
    return this.loc.dtFormatter(e, { ...this.opts, ...n }).resolvedOptions();
  }
  num(e, n = 0) {
    if (this.opts.forceSimple)
      return V(e, n);
    const r = { ...this.opts };
    return n > 0 && (r.padTo = n), this.loc.numberFormatter(r).format(e);
  }
  formatDateTimeFromString(e, n) {
    const r = this.loc.listingMode() === "en", i = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", s = (d, p) => this.loc.extract(e, d, p), a = (d) => e.isOffsetFixed && e.offset === 0 && d.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, d.format) : "", o = () => r ? yl(e) : s({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), l = (d, p) => r ? wl(e, d) : s(p ? { month: d } : { month: d, day: "numeric" }, "month"), c = (d, p) => r ? bl(e, d) : s(
      p ? { weekday: d } : { weekday: d, month: "long", day: "numeric" },
      "weekday"
    ), u = (d) => {
      const p = Z.macroTokenToFormatOpts(d);
      return p ? this.formatWithSystemDefault(e, p) : d;
    }, m = (d) => r ? El(e, d) : s({ era: d }, "era"), h = (d) => {
      switch (d) {
        case "S":
          return this.num(e.millisecond);
        case "u":
        case "SSS":
          return this.num(e.millisecond, 3);
        case "s":
          return this.num(e.second);
        case "ss":
          return this.num(e.second, 2);
        case "uu":
          return this.num(Math.floor(e.millisecond / 10), 2);
        case "uuu":
          return this.num(Math.floor(e.millisecond / 100));
        case "m":
          return this.num(e.minute);
        case "mm":
          return this.num(e.minute, 2);
        case "h":
          return this.num(e.hour % 12 === 0 ? 12 : e.hour % 12);
        case "hh":
          return this.num(e.hour % 12 === 0 ? 12 : e.hour % 12, 2);
        case "H":
          return this.num(e.hour);
        case "HH":
          return this.num(e.hour, 2);
        case "Z":
          return a({ format: "narrow", allowZ: this.opts.allowZ });
        case "ZZ":
          return a({ format: "short", allowZ: this.opts.allowZ });
        case "ZZZ":
          return a({ format: "techie", allowZ: this.opts.allowZ });
        case "ZZZZ":
          return e.zone.offsetName(e.ts, { format: "short", locale: this.loc.locale });
        case "ZZZZZ":
          return e.zone.offsetName(e.ts, { format: "long", locale: this.loc.locale });
        case "z":
          return e.zoneName;
        case "a":
          return o();
        case "d":
          return i ? s({ day: "numeric" }, "day") : this.num(e.day);
        case "dd":
          return i ? s({ day: "2-digit" }, "day") : this.num(e.day, 2);
        case "c":
          return this.num(e.weekday);
        case "ccc":
          return c("short", !0);
        case "cccc":
          return c("long", !0);
        case "ccccc":
          return c("narrow", !0);
        case "E":
          return this.num(e.weekday);
        case "EEE":
          return c("short", !1);
        case "EEEE":
          return c("long", !1);
        case "EEEEE":
          return c("narrow", !1);
        case "L":
          return i ? s({ month: "numeric", day: "numeric" }, "month") : this.num(e.month);
        case "LL":
          return i ? s({ month: "2-digit", day: "numeric" }, "month") : this.num(e.month, 2);
        case "LLL":
          return l("short", !0);
        case "LLLL":
          return l("long", !0);
        case "LLLLL":
          return l("narrow", !0);
        case "M":
          return i ? s({ month: "numeric" }, "month") : this.num(e.month);
        case "MM":
          return i ? s({ month: "2-digit" }, "month") : this.num(e.month, 2);
        case "MMM":
          return l("short", !1);
        case "MMMM":
          return l("long", !1);
        case "MMMMM":
          return l("narrow", !1);
        case "y":
          return i ? s({ year: "numeric" }, "year") : this.num(e.year);
        case "yy":
          return i ? s({ year: "2-digit" }, "year") : this.num(e.year.toString().slice(-2), 2);
        case "yyyy":
          return i ? s({ year: "numeric" }, "year") : this.num(e.year, 4);
        case "yyyyyy":
          return i ? s({ year: "numeric" }, "year") : this.num(e.year, 6);
        case "G":
          return m("short");
        case "GG":
          return m("long");
        case "GGGGG":
          return m("narrow");
        case "kk":
          return this.num(e.weekYear.toString().slice(-2), 2);
        case "kkkk":
          return this.num(e.weekYear, 4);
        case "W":
          return this.num(e.weekNumber);
        case "WW":
          return this.num(e.weekNumber, 2);
        case "o":
          return this.num(e.ordinal);
        case "ooo":
          return this.num(e.ordinal, 3);
        case "q":
          return this.num(e.quarter);
        case "qq":
          return this.num(e.quarter, 2);
        case "X":
          return this.num(Math.floor(e.ts / 1e3));
        case "x":
          return this.num(e.ts);
        default:
          return u(d);
      }
    };
    return jr(Z.parseFormat(n), h);
  }
  formatDurationFromString(e, n) {
    const r = (l) => {
      switch (l[0]) {
        case "S":
          return "millisecond";
        case "s":
          return "second";
        case "m":
          return "minute";
        case "h":
          return "hour";
        case "d":
          return "day";
        case "w":
          return "week";
        case "M":
          return "month";
        case "y":
          return "year";
        default:
          return null;
      }
    }, i = (l) => (c) => {
      const u = r(c);
      return u ? this.num(l.get(u), c.length) : c;
    }, s = Z.parseFormat(n), a = s.reduce(
      (l, { literal: c, val: u }) => c ? l : l.concat(u),
      []
    ), o = e.shiftTo(...a.map(r).filter((l) => l));
    return jr(s, i(o));
  }
}
class re {
  constructor(e, n) {
    this.reason = e, this.explanation = n;
  }
  toMessage() {
    return this.explanation ? `${this.reason}: ${this.explanation}` : this.reason;
  }
}
class At {
  get type() {
    throw new ye();
  }
  get name() {
    throw new ye();
  }
  get ianaName() {
    return this.name;
  }
  get isUniversal() {
    throw new ye();
  }
  offsetName(e, n) {
    throw new ye();
  }
  formatOffset(e, n) {
    throw new ye();
  }
  offset(e) {
    throw new ye();
  }
  equals(e) {
    throw new ye();
  }
  get isValid() {
    throw new ye();
  }
}
let yn = null;
class mr extends At {
  static get instance() {
    return yn === null && (yn = new mr()), yn;
  }
  get type() {
    return "system";
  }
  get name() {
    return new Intl.DateTimeFormat().resolvedOptions().timeZone;
  }
  get isUniversal() {
    return !1;
  }
  offsetName(e, { format: n, locale: r }) {
    return Ps(e, n, r);
  }
  formatOffset(e, n) {
    return ft(this.offset(e), n);
  }
  offset(e) {
    return -new Date(e).getTimezoneOffset();
  }
  equals(e) {
    return e.type === "system";
  }
  get isValid() {
    return !0;
  }
}
let Bt = {};
function Dl(t) {
  return Bt[t] || (Bt[t] = new Intl.DateTimeFormat("en-US", {
    hour12: !1,
    timeZone: t,
    year: "numeric",
    month: "2-digit",
    day: "2-digit",
    hour: "2-digit",
    minute: "2-digit",
    second: "2-digit",
    era: "short"
  })), Bt[t];
}
const Cl = {
  year: 0,
  month: 1,
  day: 2,
  era: 3,
  hour: 4,
  minute: 5,
  second: 6
};
function Tl(t, e) {
  const n = t.format(e).replace(/\u200E/g, ""), r = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n), [, i, s, a, o, l, c, u] = r;
  return [a, i, s, o, l, c, u];
}
function _l(t, e) {
  const n = t.formatToParts(e), r = [];
  for (let i = 0; i < n.length; i++) {
    const { type: s, value: a } = n[i], o = Cl[s];
    s === "era" ? r[o] = a : R(o) || (r[o] = parseInt(a, 10));
  }
  return r;
}
let _t = {};
class ge extends At {
  static create(e) {
    return _t[e] || (_t[e] = new ge(e)), _t[e];
  }
  static resetCache() {
    _t = {}, Bt = {};
  }
  static isValidSpecifier(e) {
    return this.isValidZone(e);
  }
  static isValidZone(e) {
    if (!e)
      return !1;
    try {
      return new Intl.DateTimeFormat("en-US", { timeZone: e }).format(), !0;
    } catch {
      return !1;
    }
  }
  constructor(e) {
    super(), this.zoneName = e, this.valid = ge.isValidZone(e);
  }
  get type() {
    return "iana";
  }
  get name() {
    return this.zoneName;
  }
  get isUniversal() {
    return !1;
  }
  offsetName(e, { format: n, locale: r }) {
    return Ps(e, n, r, this.name);
  }
  formatOffset(e, n) {
    return ft(this.offset(e), n);
  }
  offset(e) {
    const n = new Date(e);
    if (isNaN(n))
      return NaN;
    const r = Dl(this.name);
    let [i, s, a, o, l, c, u] = r.formatToParts ? _l(r, n) : Tl(r, n);
    o === "BC" && (i = -Math.abs(i) + 1);
    const h = hr({
      year: i,
      month: s,
      day: a,
      hour: l === 24 ? 0 : l,
      minute: c,
      second: u,
      millisecond: 0
    });
    let d = +n;
    const p = d % 1e3;
    return d -= p >= 0 ? p : 1e3 + p, (h - d) / (60 * 1e3);
  }
  equals(e) {
    return e.type === "iana" && e.name === this.name;
  }
  get isValid() {
    return this.valid;
  }
}
let bn = null;
class G extends At {
  static get utcInstance() {
    return bn === null && (bn = new G(0)), bn;
  }
  static instance(e) {
    return e === 0 ? G.utcInstance : new G(e);
  }
  static parseSpecifier(e) {
    if (e) {
      const n = e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
      if (n)
        return new G(cn(n[1], n[2]));
    }
    return null;
  }
  constructor(e) {
    super(), this.fixed = e;
  }
  get type() {
    return "fixed";
  }
  get name() {
    return this.fixed === 0 ? "UTC" : `UTC${ft(this.fixed, "narrow")}`;
  }
  get ianaName() {
    return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${ft(-this.fixed, "narrow")}`;
  }
  offsetName() {
    return this.name;
  }
  formatOffset(e, n) {
    return ft(this.fixed, n);
  }
  get isUniversal() {
    return !0;
  }
  offset() {
    return this.fixed;
  }
  equals(e) {
    return e.type === "fixed" && e.fixed === this.fixed;
  }
  get isValid() {
    return !0;
  }
}
class Rl extends At {
  constructor(e) {
    super(), this.zoneName = e;
  }
  get type() {
    return "invalid";
  }
  get name() {
    return this.zoneName;
  }
  get isUniversal() {
    return !1;
  }
  offsetName() {
    return null;
  }
  formatOffset() {
    return "";
  }
  offset() {
    return NaN;
  }
  equals() {
    return !1;
  }
  get isValid() {
    return !1;
  }
}
function we(t, e) {
  if (R(t) || t === null)
    return e;
  if (t instanceof At)
    return t;
  if (ol(t)) {
    const n = t.toLowerCase();
    return n === "local" || n === "system" ? e : n === "utc" || n === "gmt" ? G.utcInstance : G.parseSpecifier(n) || ge.create(t);
  } else
    return Ne(t) ? G.instance(t) : typeof t == "object" && t.offset && typeof t.offset == "number" ? t : new Rl(t);
}
let Gr = () => Date.now(), qr = "system", Zr = null, Qr = null, Yr = null, $r;
class U {
  static get now() {
    return Gr;
  }
  static set now(e) {
    Gr = e;
  }
  static set defaultZone(e) {
    qr = e;
  }
  static get defaultZone() {
    return we(qr, mr.instance);
  }
  static get defaultLocale() {
    return Zr;
  }
  static set defaultLocale(e) {
    Zr = e;
  }
  static get defaultNumberingSystem() {
    return Qr;
  }
  static set defaultNumberingSystem(e) {
    Qr = e;
  }
  static get defaultOutputCalendar() {
    return Yr;
  }
  static set defaultOutputCalendar(e) {
    Yr = e;
  }
  static get throwOnInvalid() {
    return $r;
  }
  static set throwOnInvalid(e) {
    $r = e;
  }
  static resetCaches() {
    B.resetCache(), ge.resetCache();
  }
}
let Jr = {};
function xl(t, e = {}) {
  const n = JSON.stringify([t, e]);
  let r = Jr[n];
  return r || (r = new Intl.ListFormat(t, e), Jr[n] = r), r;
}
let jn = {};
function Gn(t, e = {}) {
  const n = JSON.stringify([t, e]);
  let r = jn[n];
  return r || (r = new Intl.DateTimeFormat(t, e), jn[n] = r), r;
}
let qn = {};
function kl(t, e = {}) {
  const n = JSON.stringify([t, e]);
  let r = qn[n];
  return r || (r = new Intl.NumberFormat(t, e), qn[n] = r), r;
}
let Zn = {};
function Il(t, e = {}) {
  const { base: n, ...r } = e, i = JSON.stringify([t, r]);
  let s = Zn[i];
  return s || (s = new Intl.RelativeTimeFormat(t, e), Zn[i] = s), s;
}
let ut = null;
function Ml() {
  return ut || (ut = new Intl.DateTimeFormat().resolvedOptions().locale, ut);
}
function Nl(t) {
  const e = t.indexOf("-u-");
  if (e === -1)
    return [t];
  {
    let n;
    const r = t.substring(0, e);
    try {
      n = Gn(t).resolvedOptions();
    } catch {
      n = Gn(r).resolvedOptions();
    }
    const { numberingSystem: i, calendar: s } = n;
    return [r, i, s];
  }
}
function Ol(t, e, n) {
  return (n || e) && (t += "-u", n && (t += `-ca-${n}`), e && (t += `-nu-${e}`)), t;
}
function Fl(t) {
  const e = [];
  for (let n = 1; n <= 12; n++) {
    const r = D.utc(2016, n, 1);
    e.push(t(r));
  }
  return e;
}
function Hl(t) {
  const e = [];
  for (let n = 1; n <= 7; n++) {
    const r = D.utc(2016, 11, 13 + n);
    e.push(t(r));
  }
  return e;
}
function Rt(t, e, n, r, i) {
  const s = t.listingMode(n);
  return s === "error" ? null : s === "en" ? r(e) : i(e);
}
function Pl(t) {
  return t.numberingSystem && t.numberingSystem !== "latn" ? !1 : t.numberingSystem === "latn" || !t.locale || t.locale.startsWith("en") || new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem === "latn";
}
class Bl {
  constructor(e, n, r) {
    this.padTo = r.padTo || 0, this.floor = r.floor || !1;
    const { padTo: i, floor: s, ...a } = r;
    if (!n || Object.keys(a).length > 0) {
      const o = { useGrouping: !1, ...r };
      r.padTo > 0 && (o.minimumIntegerDigits = r.padTo), this.inf = kl(e, o);
    }
  }
  format(e) {
    if (this.inf) {
      const n = this.floor ? Math.floor(e) : e;
      return this.inf.format(n);
    } else {
      const n = this.floor ? Math.floor(e) : fr(e, 3);
      return V(n, this.padTo);
    }
  }
}
class Ll {
  constructor(e, n, r) {
    this.opts = r;
    let i;
    if (e.zone.isUniversal) {
      const a = -1 * (e.offset / 60), o = a >= 0 ? `Etc/GMT+${a}` : `Etc/GMT${a}`;
      e.offset !== 0 && ge.create(o).valid ? (i = o, this.dt = e) : (i = "UTC", r.timeZoneName ? this.dt = e : this.dt = e.offset === 0 ? e : D.fromMillis(e.ts + e.offset * 60 * 1e3));
    } else
      e.zone.type === "system" ? this.dt = e : (this.dt = e, i = e.zone.name);
    const s = { ...this.opts };
    i && (s.timeZone = i), this.dtf = Gn(n, s);
  }
  format() {
    return this.dtf.format(this.dt.toJSDate());
  }
  formatToParts() {
    return this.dtf.formatToParts(this.dt.toJSDate());
  }
  resolvedOptions() {
    return this.dtf.resolvedOptions();
  }
}
class zl {
  constructor(e, n, r) {
    this.opts = { style: "long", ...r }, !n && Hs() && (this.rtf = Il(e, r));
  }
  format(e, n) {
    return this.rtf ? this.rtf.format(e, n) : Al(n, e, this.opts.numeric, this.opts.style !== "long");
  }
  formatToParts(e, n) {
    return this.rtf ? this.rtf.formatToParts(e, n) : [];
  }
}
class B {
  static fromOpts(e) {
    return B.create(e.locale, e.numberingSystem, e.outputCalendar, e.defaultToEN);
  }
  static create(e, n, r, i = !1) {
    const s = e || U.defaultLocale, a = s || (i ? "en-US" : Ml()), o = n || U.defaultNumberingSystem, l = r || U.defaultOutputCalendar;
    return new B(a, o, l, s);
  }
  static resetCache() {
    ut = null, jn = {}, qn = {}, Zn = {};
  }
  static fromObject({ locale: e, numberingSystem: n, outputCalendar: r } = {}) {
    return B.create(e, n, r);
  }
  constructor(e, n, r, i) {
    const [s, a, o] = Nl(e);
    this.locale = s, this.numberingSystem = n || a || null, this.outputCalendar = r || o || null, this.intl = Ol(this.locale, this.numberingSystem, this.outputCalendar), this.weekdaysCache = { format: {}, standalone: {} }, this.monthsCache = { format: {}, standalone: {} }, this.meridiemCache = null, this.eraCache = {}, this.specifiedLocale = i, this.fastNumbersCached = null;
  }
  get fastNumbers() {
    return this.fastNumbersCached == null && (this.fastNumbersCached = Pl(this)), this.fastNumbersCached;
  }
  listingMode() {
    const e = this.isEnglish(), n = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory");
    return e && n ? "en" : "intl";
  }
  clone(e) {
    return !e || Object.getOwnPropertyNames(e).length === 0 ? this : B.create(
      e.locale || this.specifiedLocale,
      e.numberingSystem || this.numberingSystem,
      e.outputCalendar || this.outputCalendar,
      e.defaultToEN || !1
    );
  }
  redefaultToEN(e = {}) {
    return this.clone({ ...e, defaultToEN: !0 });
  }
  redefaultToSystem(e = {}) {
    return this.clone({ ...e, defaultToEN: !1 });
  }
  months(e, n = !1, r = !0) {
    return Rt(this, e, r, Us, () => {
      const i = n ? { month: e, day: "numeric" } : { month: e }, s = n ? "format" : "standalone";
      return this.monthsCache[s][e] || (this.monthsCache[s][e] = Fl((a) => this.extract(a, i, "month"))), this.monthsCache[s][e];
    });
  }
  weekdays(e, n = !1, r = !0) {
    return Rt(this, e, r, js, () => {
      const i = n ? { weekday: e, year: "numeric", month: "long", day: "numeric" } : { weekday: e }, s = n ? "format" : "standalone";
      return this.weekdaysCache[s][e] || (this.weekdaysCache[s][e] = Hl(
        (a) => this.extract(a, i, "weekday")
      )), this.weekdaysCache[s][e];
    });
  }
  meridiems(e = !0) {
    return Rt(
      this,
      void 0,
      e,
      () => Gs,
      () => {
        if (!this.meridiemCache) {
          const n = { hour: "numeric", hourCycle: "h12" };
          this.meridiemCache = [D.utc(2016, 11, 13, 9), D.utc(2016, 11, 13, 19)].map(
            (r) => this.extract(r, n, "dayperiod")
          );
        }
        return this.meridiemCache;
      }
    );
  }
  eras(e, n = !0) {
    return Rt(this, e, n, qs, () => {
      const r = { era: e };
      return this.eraCache[e] || (this.eraCache[e] = [D.utc(-40, 1, 1), D.utc(2017, 1, 1)].map(
        (i) => this.extract(i, r, "era")
      )), this.eraCache[e];
    });
  }
  extract(e, n, r) {
    const i = this.dtFormatter(e, n), s = i.formatToParts(), a = s.find((o) => o.type.toLowerCase() === r);
    return a ? a.value : null;
  }
  numberFormatter(e = {}) {
    return new Bl(this.intl, e.forceSimple || this.fastNumbers, e);
  }
  dtFormatter(e, n = {}) {
    return new Ll(e, this.intl, n);
  }
  relFormatter(e = {}) {
    return new zl(this.intl, this.isEnglish(), e);
  }
  listFormatter(e = {}) {
    return xl(this.intl, e);
  }
  isEnglish() {
    return this.locale === "en" || this.locale.toLowerCase() === "en-us" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us");
  }
  equals(e) {
    return this.locale === e.locale && this.numberingSystem === e.numberingSystem && this.outputCalendar === e.outputCalendar;
  }
}
function Xe(...t) {
  const e = t.reduce((n, r) => n + r.source, "");
  return RegExp(`^${e}$`);
}
function et(...t) {
  return (e) => t.reduce(
    ([n, r, i], s) => {
      const [a, o, l] = s(e, i);
      return [{ ...n, ...a }, o || r, l];
    },
    [{}, null, 1]
  ).slice(0, 2);
}
function tt(t, ...e) {
  if (t == null)
    return [null, null];
  for (const [n, r] of e) {
    const i = n.exec(t);
    if (i)
      return r(i);
  }
  return [null, null];
}
function Zs(...t) {
  return (e, n) => {
    const r = {};
    let i;
    for (i = 0; i < t.length; i++)
      r[t[i]] = be(e[n + i]);
    return [r, null, n + i];
  };
}
const Qs = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, Ul = `(?:${Qs.source}?(?:\\[(${Ls.source})\\])?)?`, gr = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, Ys = RegExp(`${gr.source}${Ul}`), pr = RegExp(`(?:T${Ys.source})?`), Vl = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Wl = /(\d{4})-?W(\d\d)(?:-?(\d))?/, jl = /(\d{4})-?(\d{3})/, Gl = Zs("weekYear", "weekNumber", "weekDay"), ql = Zs("year", "ordinal"), Zl = /(\d{4})-(\d\d)-(\d\d)/, $s = RegExp(
  `${gr.source} ?(?:${Qs.source}|(${Ls.source}))?`
), Ql = RegExp(`(?: ${$s.source})?`);
function qe(t, e, n) {
  const r = t[e];
  return R(r) ? n : be(r);
}
function Yl(t, e) {
  return [{
    year: qe(t, e),
    month: qe(t, e + 1, 1),
    day: qe(t, e + 2, 1)
  }, null, e + 3];
}
function nt(t, e) {
  return [{
    hours: qe(t, e, 0),
    minutes: qe(t, e + 1, 0),
    seconds: qe(t, e + 2, 0),
    milliseconds: dr(t[e + 3])
  }, null, e + 4];
}
function St(t, e) {
  const n = !t[e] && !t[e + 1], r = cn(t[e + 1], t[e + 2]), i = n ? null : G.instance(r);
  return [{}, i, e + 3];
}
function Dt(t, e) {
  const n = t[e] ? ge.create(t[e]) : null;
  return [{}, n, e + 1];
}
const $l = RegExp(`^T?${gr.source}$`), Jl = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
function Kl(t) {
  const [
    e,
    n,
    r,
    i,
    s,
    a,
    o,
    l,
    c
  ] = t, u = e[0] === "-", m = l && l[0] === "-", h = (d, p = !1) => d !== void 0 && (p || d && u) ? -d : d;
  return [
    {
      years: h(Re(n)),
      months: h(Re(r)),
      weeks: h(Re(i)),
      days: h(Re(s)),
      hours: h(Re(a)),
      minutes: h(Re(o)),
      seconds: h(Re(l), l === "-0"),
      milliseconds: h(dr(c), m)
    }
  ];
}
const Xl = {
  GMT: 0,
  EDT: -4 * 60,
  EST: -5 * 60,
  CDT: -5 * 60,
  CST: -6 * 60,
  MDT: -6 * 60,
  MST: -7 * 60,
  PDT: -7 * 60,
  PST: -8 * 60
};
function vr(t, e, n, r, i, s, a) {
  const o = {
    year: e.length === 2 ? Wn(be(e)) : be(e),
    month: zs.indexOf(n) + 1,
    day: be(r),
    hour: be(i),
    minute: be(s)
  };
  return a && (o.second = be(a)), t && (o.weekday = t.length > 3 ? Vs.indexOf(t) + 1 : Ws.indexOf(t) + 1), o;
}
const ec = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;
function tc(t) {
  const [
    ,
    e,
    n,
    r,
    i,
    s,
    a,
    o,
    l,
    c,
    u,
    m
  ] = t, h = vr(e, i, r, n, s, a, o);
  let d;
  return l ? d = Xl[l] : c ? d = 0 : d = cn(u, m), [h, new G(d)];
}
function nc(t) {
  return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
}
const rc = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, ic = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, sc = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
function Kr(t) {
  const [, e, n, r, i, s, a, o] = t;
  return [vr(e, i, r, n, s, a, o), G.utcInstance];
}
function ac(t) {
  const [, e, n, r, i, s, a, o] = t;
  return [vr(e, o, n, r, i, s, a), G.utcInstance];
}
const oc = Xe(Vl, pr), lc = Xe(Wl, pr), cc = Xe(jl, pr), uc = Xe(Ys), Js = et(
  Yl,
  nt,
  St,
  Dt
), dc = et(
  Gl,
  nt,
  St,
  Dt
), fc = et(
  ql,
  nt,
  St,
  Dt
), hc = et(
  nt,
  St,
  Dt
);
function mc(t) {
  return tt(
    t,
    [oc, Js],
    [lc, dc],
    [cc, fc],
    [uc, hc]
  );
}
function gc(t) {
  return tt(nc(t), [ec, tc]);
}
function pc(t) {
  return tt(
    t,
    [rc, Kr],
    [ic, Kr],
    [sc, ac]
  );
}
function vc(t) {
  return tt(t, [Jl, Kl]);
}
const yc = et(nt);
function bc(t) {
  return tt(t, [$l, yc]);
}
const wc = Xe(Zl, Ql), Ec = Xe($s), Ac = et(
  nt,
  St,
  Dt
);
function Sc(t) {
  return tt(
    t,
    [wc, Js],
    [Ec, Ac]
  );
}
const Dc = "Invalid Duration", Ks = {
  weeks: {
    days: 7,
    hours: 7 * 24,
    minutes: 7 * 24 * 60,
    seconds: 7 * 24 * 60 * 60,
    milliseconds: 7 * 24 * 60 * 60 * 1e3
  },
  days: {
    hours: 24,
    minutes: 24 * 60,
    seconds: 24 * 60 * 60,
    milliseconds: 24 * 60 * 60 * 1e3
  },
  hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1e3 },
  minutes: { seconds: 60, milliseconds: 60 * 1e3 },
  seconds: { milliseconds: 1e3 }
}, Cc = {
  years: {
    quarters: 4,
    months: 12,
    weeks: 52,
    days: 365,
    hours: 365 * 24,
    minutes: 365 * 24 * 60,
    seconds: 365 * 24 * 60 * 60,
    milliseconds: 365 * 24 * 60 * 60 * 1e3
  },
  quarters: {
    months: 3,
    weeks: 13,
    days: 91,
    hours: 91 * 24,
    minutes: 91 * 24 * 60,
    seconds: 91 * 24 * 60 * 60,
    milliseconds: 91 * 24 * 60 * 60 * 1e3
  },
  months: {
    weeks: 4,
    days: 30,
    hours: 30 * 24,
    minutes: 30 * 24 * 60,
    seconds: 30 * 24 * 60 * 60,
    milliseconds: 30 * 24 * 60 * 60 * 1e3
  },
  ...Ks
}, J = 146097 / 400, We = 146097 / 4800, Tc = {
  years: {
    quarters: 4,
    months: 12,
    weeks: J / 7,
    days: J,
    hours: J * 24,
    minutes: J * 24 * 60,
    seconds: J * 24 * 60 * 60,
    milliseconds: J * 24 * 60 * 60 * 1e3
  },
  quarters: {
    months: 3,
    weeks: J / 28,
    days: J / 4,
    hours: J * 24 / 4,
    minutes: J * 24 * 60 / 4,
    seconds: J * 24 * 60 * 60 / 4,
    milliseconds: J * 24 * 60 * 60 * 1e3 / 4
  },
  months: {
    weeks: We / 7,
    days: We,
    hours: We * 24,
    minutes: We * 24 * 60,
    seconds: We * 24 * 60 * 60,
    milliseconds: We * 24 * 60 * 60 * 1e3
  },
  ...Ks
}, ke = [
  "years",
  "quarters",
  "months",
  "weeks",
  "days",
  "hours",
  "minutes",
  "seconds",
  "milliseconds"
], _c = ke.slice(0).reverse();
function xe(t, e, n = !1) {
  const r = {
    values: n ? e.values : { ...t.values, ...e.values || {} },
    loc: t.loc.clone(e.loc),
    conversionAccuracy: e.conversionAccuracy || t.conversionAccuracy
  };
  return new x(r);
}
function Rc(t) {
  return t < 0 ? Math.floor(t) : Math.ceil(t);
}
function Xs(t, e, n, r, i) {
  const s = t[i][n], a = e[n] / s, o = Math.sign(a) === Math.sign(r[i]), l = !o && r[i] !== 0 && Math.abs(a) <= 1 ? Rc(a) : Math.trunc(a);
  r[i] += l, e[n] -= l * s;
}
function xc(t, e) {
  _c.reduce((n, r) => R(e[r]) ? n : (n && Xs(t, e, n, e, r), r), null);
}
class x {
  constructor(e) {
    const n = e.conversionAccuracy === "longterm" || !1;
    this.values = e.values, this.loc = e.loc || B.create(), this.conversionAccuracy = n ? "longterm" : "casual", this.invalid = e.invalid || null, this.matrix = n ? Tc : Cc, this.isLuxonDuration = !0;
  }
  static fromMillis(e, n) {
    return x.fromObject({ milliseconds: e }, n);
  }
  static fromObject(e, n = {}) {
    if (e == null || typeof e != "object")
      throw new K(
        `Duration.fromObject: argument expected to be an object, got ${e === null ? "null" : typeof e}`
      );
    return new x({
      values: Qt(e, x.normalizeUnit),
      loc: B.fromObject(n),
      conversionAccuracy: n.conversionAccuracy
    });
  }
  static fromDurationLike(e) {
    if (Ne(e))
      return x.fromMillis(e);
    if (x.isDuration(e))
      return e;
    if (typeof e == "object")
      return x.fromObject(e);
    throw new K(
      `Unknown duration argument ${e} of type ${typeof e}`
    );
  }
  static fromISO(e, n) {
    const [r] = vc(e);
    return r ? x.fromObject(r, n) : x.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
  }
  static fromISOTime(e, n) {
    const [r] = bc(e);
    return r ? x.fromObject(r, n) : x.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
  }
  static invalid(e, n = null) {
    if (!e)
      throw new K("need to specify a reason the Duration is invalid");
    const r = e instanceof re ? e : new re(e, n);
    if (U.throwOnInvalid)
      throw new il(r);
    return new x({ invalid: r });
  }
  static normalizeUnit(e) {
    const n = {
      year: "years",
      years: "years",
      quarter: "quarters",
      quarters: "quarters",
      month: "months",
      months: "months",
      week: "weeks",
      weeks: "weeks",
      day: "days",
      days: "days",
      hour: "hours",
      hours: "hours",
      minute: "minutes",
      minutes: "minutes",
      second: "seconds",
      seconds: "seconds",
      millisecond: "milliseconds",
      milliseconds: "milliseconds"
    }[e && e.toLowerCase()];
    if (!n)
      throw new ps(e);
    return n;
  }
  static isDuration(e) {
    return e && e.isLuxonDuration || !1;
  }
  get locale() {
    return this.isValid ? this.loc.locale : null;
  }
  get numberingSystem() {
    return this.isValid ? this.loc.numberingSystem : null;
  }
  toFormat(e, n = {}) {
    const r = {
      ...n,
      floor: n.round !== !1 && n.floor !== !1
    };
    return this.isValid ? Z.create(this.loc, r).formatDurationFromString(this, e) : Dc;
  }
  toHuman(e = {}) {
    const n = ke.map((r) => {
      const i = this.values[r];
      return R(i) ? null : this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...e, unit: r.slice(0, -1) }).format(i);
    }).filter((r) => r);
    return this.loc.listFormatter({ type: "conjunction", style: e.listStyle || "narrow", ...e }).format(n);
  }
  toObject() {
    return this.isValid ? { ...this.values } : {};
  }
  toISO() {
    if (!this.isValid)
      return null;
    let e = "P";
    return this.years !== 0 && (e += this.years + "Y"), (this.months !== 0 || this.quarters !== 0) && (e += this.months + this.quarters * 3 + "M"), this.weeks !== 0 && (e += this.weeks + "W"), this.days !== 0 && (e += this.days + "D"), (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) && (e += "T"), this.hours !== 0 && (e += this.hours + "H"), this.minutes !== 0 && (e += this.minutes + "M"), (this.seconds !== 0 || this.milliseconds !== 0) && (e += fr(this.seconds + this.milliseconds / 1e3, 3) + "S"), e === "P" && (e += "T0S"), e;
  }
  toISOTime(e = {}) {
    if (!this.isValid)
      return null;
    const n = this.toMillis();
    if (n < 0 || n >= 864e5)
      return null;
    e = {
      suppressMilliseconds: !1,
      suppressSeconds: !1,
      includePrefix: !1,
      format: "extended",
      ...e
    };
    const r = this.shiftTo("hours", "minutes", "seconds", "milliseconds");
    let i = e.format === "basic" ? "hhmm" : "hh:mm";
    (!e.suppressSeconds || r.seconds !== 0 || r.milliseconds !== 0) && (i += e.format === "basic" ? "ss" : ":ss", (!e.suppressMilliseconds || r.milliseconds !== 0) && (i += ".SSS"));
    let s = r.toFormat(i);
    return e.includePrefix && (s = "T" + s), s;
  }
  toJSON() {
    return this.toISO();
  }
  toString() {
    return this.toISO();
  }
  toMillis() {
    return this.as("milliseconds");
  }
  valueOf() {
    return this.toMillis();
  }
  plus(e) {
    if (!this.isValid)
      return this;
    const n = x.fromDurationLike(e), r = {};
    for (const i of ke)
      ($e(n.values, i) || $e(this.values, i)) && (r[i] = n.get(i) + this.get(i));
    return xe(this, { values: r }, !0);
  }
  minus(e) {
    if (!this.isValid)
      return this;
    const n = x.fromDurationLike(e);
    return this.plus(n.negate());
  }
  mapUnits(e) {
    if (!this.isValid)
      return this;
    const n = {};
    for (const r of Object.keys(this.values))
      n[r] = Bs(e(this.values[r], r));
    return xe(this, { values: n }, !0);
  }
  get(e) {
    return this[x.normalizeUnit(e)];
  }
  set(e) {
    if (!this.isValid)
      return this;
    const n = { ...this.values, ...Qt(e, x.normalizeUnit) };
    return xe(this, { values: n });
  }
  reconfigure({ locale: e, numberingSystem: n, conversionAccuracy: r } = {}) {
    const i = this.loc.clone({ locale: e, numberingSystem: n }), s = { loc: i };
    return r && (s.conversionAccuracy = r), xe(this, s);
  }
  as(e) {
    return this.isValid ? this.shiftTo(e).get(e) : NaN;
  }
  normalize() {
    if (!this.isValid)
      return this;
    const e = this.toObject();
    return xc(this.matrix, e), xe(this, { values: e }, !0);
  }
  shiftTo(...e) {
    if (!this.isValid)
      return this;
    if (e.length === 0)
      return this;
    e = e.map((a) => x.normalizeUnit(a));
    const n = {}, r = {}, i = this.toObject();
    let s;
    for (const a of ke)
      if (e.indexOf(a) >= 0) {
        s = a;
        let o = 0;
        for (const c in r)
          o += this.matrix[c][a] * r[c], r[c] = 0;
        Ne(i[a]) && (o += i[a]);
        const l = Math.trunc(o);
        n[a] = l, r[a] = (o * 1e3 - l * 1e3) / 1e3;
        for (const c in i)
          ke.indexOf(c) > ke.indexOf(a) && Xs(this.matrix, i, c, n, a);
      } else
        Ne(i[a]) && (r[a] = i[a]);
    for (const a in r)
      r[a] !== 0 && (n[s] += a === s ? r[a] : r[a] / this.matrix[s][a]);
    return xe(this, { values: n }, !0).normalize();
  }
  negate() {
    if (!this.isValid)
      return this;
    const e = {};
    for (const n of Object.keys(this.values))
      e[n] = this.values[n] === 0 ? 0 : -this.values[n];
    return xe(this, { values: e }, !0);
  }
  get years() {
    return this.isValid ? this.values.years || 0 : NaN;
  }
  get quarters() {
    return this.isValid ? this.values.quarters || 0 : NaN;
  }
  get months() {
    return this.isValid ? this.values.months || 0 : NaN;
  }
  get weeks() {
    return this.isValid ? this.values.weeks || 0 : NaN;
  }
  get days() {
    return this.isValid ? this.values.days || 0 : NaN;
  }
  get hours() {
    return this.isValid ? this.values.hours || 0 : NaN;
  }
  get minutes() {
    return this.isValid ? this.values.minutes || 0 : NaN;
  }
  get seconds() {
    return this.isValid ? this.values.seconds || 0 : NaN;
  }
  get milliseconds() {
    return this.isValid ? this.values.milliseconds || 0 : NaN;
  }
  get isValid() {
    return this.invalid === null;
  }
  get invalidReason() {
    return this.invalid ? this.invalid.reason : null;
  }
  get invalidExplanation() {
    return this.invalid ? this.invalid.explanation : null;
  }
  equals(e) {
    if (!this.isValid || !e.isValid || !this.loc.equals(e.loc))
      return !1;
    function n(r, i) {
      return r === void 0 || r === 0 ? i === void 0 || i === 0 : r === i;
    }
    for (const r of ke)
      if (!n(this.values[r], e.values[r]))
        return !1;
    return !0;
  }
}
const it = "Invalid Interval";
function kc(t, e) {
  return !t || !t.isValid ? L.invalid("missing or invalid start") : !e || !e.isValid ? L.invalid("missing or invalid end") : e < t ? L.invalid(
    "end before start",
    `The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`
  ) : null;
}
class L {
  constructor(e) {
    this.s = e.start, this.e = e.end, this.invalid = e.invalid || null, this.isLuxonInterval = !0;
  }
  static invalid(e, n = null) {
    if (!e)
      throw new K("need to specify a reason the Interval is invalid");
    const r = e instanceof re ? e : new re(e, n);
    if (U.throwOnInvalid)
      throw new rl(r);
    return new L({ invalid: r });
  }
  static fromDateTimes(e, n) {
    const r = ot(e), i = ot(n), s = kc(r, i);
    return s ?? new L({
      start: r,
      end: i
    });
  }
  static after(e, n) {
    const r = x.fromDurationLike(n), i = ot(e);
    return L.fromDateTimes(i, i.plus(r));
  }
  static before(e, n) {
    const r = x.fromDurationLike(n), i = ot(e);
    return L.fromDateTimes(i.minus(r), i);
  }
  static fromISO(e, n) {
    const [r, i] = (e || "").split("/", 2);
    if (r && i) {
      let s, a;
      try {
        s = D.fromISO(r, n), a = s.isValid;
      } catch {
        a = !1;
      }
      let o, l;
      try {
        o = D.fromISO(i, n), l = o.isValid;
      } catch {
        l = !1;
      }
      if (a && l)
        return L.fromDateTimes(s, o);
      if (a) {
        const c = x.fromISO(i, n);
        if (c.isValid)
          return L.after(s, c);
      } else if (l) {
        const c = x.fromISO(r, n);
        if (c.isValid)
          return L.before(o, c);
      }
    }
    return L.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
  }
  static isInterval(e) {
    return e && e.isLuxonInterval || !1;
  }
  get start() {
    return this.isValid ? this.s : null;
  }
  get end() {
    return this.isValid ? this.e : null;
  }
  get isValid() {
    return this.invalidReason === null;
  }
  get invalidReason() {
    return this.invalid ? this.invalid.reason : null;
  }
  get invalidExplanation() {
    return this.invalid ? this.invalid.explanation : null;
  }
  length(e = "milliseconds") {
    return this.isValid ? this.toDuration(e).get(e) : NaN;
  }
  count(e = "milliseconds") {
    if (!this.isValid)
      return NaN;
    const n = this.start.startOf(e), r = this.end.startOf(e);
    return Math.floor(r.diff(n, e).get(e)) + 1;
  }
  hasSame(e) {
    return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, e) : !1;
  }
  isEmpty() {
    return this.s.valueOf() === this.e.valueOf();
  }
  isAfter(e) {
    return this.isValid ? this.s > e : !1;
  }
  isBefore(e) {
    return this.isValid ? this.e <= e : !1;
  }
  contains(e) {
    return this.isValid ? this.s <= e && this.e > e : !1;
  }
  set({ start: e, end: n } = {}) {
    return this.isValid ? L.fromDateTimes(e || this.s, n || this.e) : this;
  }
  splitAt(...e) {
    if (!this.isValid)
      return [];
    const n = e.map(ot).filter((a) => this.contains(a)).sort(), r = [];
    let { s: i } = this, s = 0;
    for (; i < this.e; ) {
      const a = n[s] || this.e, o = +a > +this.e ? this.e : a;
      r.push(L.fromDateTimes(i, o)), i = o, s += 1;
    }
    return r;
  }
  splitBy(e) {
    const n = x.fromDurationLike(e);
    if (!this.isValid || !n.isValid || n.as("milliseconds") === 0)
      return [];
    let { s: r } = this, i = 1, s;
    const a = [];
    for (; r < this.e; ) {
      const o = this.start.plus(n.mapUnits((l) => l * i));
      s = +o > +this.e ? this.e : o, a.push(L.fromDateTimes(r, s)), r = s, i += 1;
    }
    return a;
  }
  divideEqually(e) {
    return this.isValid ? this.splitBy(this.length() / e).slice(0, e) : [];
  }
  overlaps(e) {
    return this.e > e.s && this.s < e.e;
  }
  abutsStart(e) {
    return this.isValid ? +this.e == +e.s : !1;
  }
  abutsEnd(e) {
    return this.isValid ? +e.e == +this.s : !1;
  }
  engulfs(e) {
    return this.isValid ? this.s <= e.s && this.e >= e.e : !1;
  }
  equals(e) {
    return !this.isValid || !e.isValid ? !1 : this.s.equals(e.s) && this.e.equals(e.e);
  }
  intersection(e) {
    if (!this.isValid)
      return this;
    const n = this.s > e.s ? this.s : e.s, r = this.e < e.e ? this.e : e.e;
    return n >= r ? null : L.fromDateTimes(n, r);
  }
  union(e) {
    if (!this.isValid)
      return this;
    const n = this.s < e.s ? this.s : e.s, r = this.e > e.e ? this.e : e.e;
    return L.fromDateTimes(n, r);
  }
  static merge(e) {
    const [n, r] = e.sort((i, s) => i.s - s.s).reduce(
      ([i, s], a) => s ? s.overlaps(a) || s.abutsStart(a) ? [i, s.union(a)] : [i.concat([s]), a] : [i, a],
      [[], null]
    );
    return r && n.push(r), n;
  }
  static xor(e) {
    let n = null, r = 0;
    const i = [], s = e.map((l) => [
      { time: l.s, type: "s" },
      { time: l.e, type: "e" }
    ]), a = Array.prototype.concat(...s), o = a.sort((l, c) => l.time - c.time);
    for (const l of o)
      r += l.type === "s" ? 1 : -1, r === 1 ? n = l.time : (n && +n != +l.time && i.push(L.fromDateTimes(n, l.time)), n = null);
    return L.merge(i);
  }
  difference(...e) {
    return L.xor([this].concat(e)).map((n) => this.intersection(n)).filter((n) => n && !n.isEmpty());
  }
  toString() {
    return this.isValid ? `[${this.s.toISO()} – ${this.e.toISO()})` : it;
  }
  toISO(e) {
    return this.isValid ? `${this.s.toISO(e)}/${this.e.toISO(e)}` : it;
  }
  toISODate() {
    return this.isValid ? `${this.s.toISODate()}/${this.e.toISODate()}` : it;
  }
  toISOTime(e) {
    return this.isValid ? `${this.s.toISOTime(e)}/${this.e.toISOTime(e)}` : it;
  }
  toFormat(e, { separator: n = " – " } = {}) {
    return this.isValid ? `${this.s.toFormat(e)}${n}${this.e.toFormat(e)}` : it;
  }
  toDuration(e, n) {
    return this.isValid ? this.e.diff(this.s, e, n) : x.invalid(this.invalidReason);
  }
  mapEndpoints(e) {
    return L.fromDateTimes(e(this.s), e(this.e));
  }
}
class xt {
  static hasDST(e = U.defaultZone) {
    const n = D.now().setZone(e).set({ month: 12 });
    return !e.isUniversal && n.offset !== n.set({ month: 6 }).offset;
  }
  static isValidIANAZone(e) {
    return ge.isValidZone(e);
  }
  static normalizeZone(e) {
    return we(e, U.defaultZone);
  }
  static months(e = "long", { locale: n = null, numberingSystem: r = null, locObj: i = null, outputCalendar: s = "gregory" } = {}) {
    return (i || B.create(n, r, s)).months(e);
  }
  static monthsFormat(e = "long", { locale: n = null, numberingSystem: r = null, locObj: i = null, outputCalendar: s = "gregory" } = {}) {
    return (i || B.create(n, r, s)).months(e, !0);
  }
  static weekdays(e = "long", { locale: n = null, numberingSystem: r = null, locObj: i = null } = {}) {
    return (i || B.create(n, r, null)).weekdays(e);
  }
  static weekdaysFormat(e = "long", { locale: n = null, numberingSystem: r = null, locObj: i = null } = {}) {
    return (i || B.create(n, r, null)).weekdays(e, !0);
  }
  static meridiems({ locale: e = null } = {}) {
    return B.create(e).meridiems();
  }
  static eras(e = "short", { locale: n = null } = {}) {
    return B.create(n, null, "gregory").eras(e);
  }
  static features() {
    return { relative: Hs() };
  }
}
function Xr(t, e) {
  const n = (i) => i.toUTC(0, { keepLocalTime: !0 }).startOf("day").valueOf(), r = n(e) - n(t);
  return Math.floor(x.fromMillis(r).as("days"));
}
function Ic(t, e, n) {
  const r = [
    ["years", (o, l) => l.year - o.year],
    ["quarters", (o, l) => l.quarter - o.quarter],
    ["months", (o, l) => l.month - o.month + (l.year - o.year) * 12],
    [
      "weeks",
      (o, l) => {
        const c = Xr(o, l);
        return (c - c % 7) / 7;
      }
    ],
    ["days", Xr]
  ], i = {};
  let s, a;
  for (const [o, l] of r)
    if (n.indexOf(o) >= 0) {
      s = o;
      let c = l(t, e);
      a = t.plus({ [o]: c }), a > e ? (t = t.plus({ [o]: c - 1 }), c -= 1) : t = a, i[o] = c;
    }
  return [t, i, a, s];
}
function Mc(t, e, n, r) {
  let [i, s, a, o] = Ic(t, e, n);
  const l = e - i, c = n.filter(
    (m) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(m) >= 0
  );
  c.length === 0 && (a < e && (a = i.plus({ [o]: 1 })), a !== i && (s[o] = (s[o] || 0) + l / (a - i)));
  const u = x.fromObject(s, r);
  return c.length > 0 ? x.fromMillis(l, r).shiftTo(...c).plus(u) : u;
}
const yr = {
  arab: "[٠-٩]",
  arabext: "[۰-۹]",
  bali: "[᭐-᭙]",
  beng: "[০-৯]",
  deva: "[०-९]",
  fullwide: "[０-９]",
  gujr: "[૦-૯]",
  hanidec: "[〇|一|二|三|四|五|六|七|八|九]",
  khmr: "[០-៩]",
  knda: "[೦-೯]",
  laoo: "[໐-໙]",
  limb: "[᥆-᥏]",
  mlym: "[൦-൯]",
  mong: "[᠐-᠙]",
  mymr: "[၀-၉]",
  orya: "[୦-୯]",
  tamldec: "[௦-௯]",
  telu: "[౦-౯]",
  thai: "[๐-๙]",
  tibt: "[༠-༩]",
  latn: "\\d"
}, ei = {
  arab: [1632, 1641],
  arabext: [1776, 1785],
  bali: [6992, 7001],
  beng: [2534, 2543],
  deva: [2406, 2415],
  fullwide: [65296, 65303],
  gujr: [2790, 2799],
  khmr: [6112, 6121],
  knda: [3302, 3311],
  laoo: [3792, 3801],
  limb: [6470, 6479],
  mlym: [3430, 3439],
  mong: [6160, 6169],
  mymr: [4160, 4169],
  orya: [2918, 2927],
  tamldec: [3046, 3055],
  telu: [3174, 3183],
  thai: [3664, 3673],
  tibt: [3872, 3881]
}, Nc = yr.hanidec.replace(/[\[|\]]/g, "").split("");
function Oc(t) {
  let e = parseInt(t, 10);
  if (isNaN(e)) {
    e = "";
    for (let n = 0; n < t.length; n++) {
      const r = t.charCodeAt(n);
      if (t[n].search(yr.hanidec) !== -1)
        e += Nc.indexOf(t[n]);
      else
        for (const i in ei) {
          const [s, a] = ei[i];
          r >= s && r <= a && (e += r - s);
        }
    }
    return parseInt(e, 10);
  } else
    return e;
}
function te({ numberingSystem: t }, e = "") {
  return new RegExp(`${yr[t || "latn"]}${e}`);
}
const Fc = "missing Intl.DateTimeFormat.formatToParts support";
function M(t, e = (n) => n) {
  return { regex: t, deser: ([n]) => e(Oc(n)) };
}
const Hc = String.fromCharCode(160), ea = `[ ${Hc}]`, ta = new RegExp(ea, "g");
function Pc(t) {
  return t.replace(/\./g, "\\.?").replace(ta, ea);
}
function ti(t) {
  return t.replace(/\./g, "").replace(ta, " ").toLowerCase();
}
function ne(t, e) {
  return t === null ? null : {
    regex: RegExp(t.map(Pc).join("|")),
    deser: ([n]) => t.findIndex((r) => ti(n) === ti(r)) + e
  };
}
function ni(t, e) {
  return { regex: t, deser: ([, n, r]) => cn(n, r), groups: e };
}
function wn(t) {
  return { regex: t, deser: ([e]) => e };
}
function Bc(t) {
  return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
}
function Lc(t, e) {
  const n = te(e), r = te(e, "{2}"), i = te(e, "{3}"), s = te(e, "{4}"), a = te(e, "{6}"), o = te(e, "{1,2}"), l = te(e, "{1,3}"), c = te(e, "{1,6}"), u = te(e, "{1,9}"), m = te(e, "{2,4}"), h = te(e, "{4,6}"), d = (v) => ({ regex: RegExp(Bc(v.val)), deser: ([b]) => b, literal: !0 }), y = ((v) => {
    if (t.literal)
      return d(v);
    switch (v.val) {
      case "G":
        return ne(e.eras("short", !1), 0);
      case "GG":
        return ne(e.eras("long", !1), 0);
      case "y":
        return M(c);
      case "yy":
        return M(m, Wn);
      case "yyyy":
        return M(s);
      case "yyyyy":
        return M(h);
      case "yyyyyy":
        return M(a);
      case "M":
        return M(o);
      case "MM":
        return M(r);
      case "MMM":
        return ne(e.months("short", !0, !1), 1);
      case "MMMM":
        return ne(e.months("long", !0, !1), 1);
      case "L":
        return M(o);
      case "LL":
        return M(r);
      case "LLL":
        return ne(e.months("short", !1, !1), 1);
      case "LLLL":
        return ne(e.months("long", !1, !1), 1);
      case "d":
        return M(o);
      case "dd":
        return M(r);
      case "o":
        return M(l);
      case "ooo":
        return M(i);
      case "HH":
        return M(r);
      case "H":
        return M(o);
      case "hh":
        return M(r);
      case "h":
        return M(o);
      case "mm":
        return M(r);
      case "m":
        return M(o);
      case "q":
        return M(o);
      case "qq":
        return M(r);
      case "s":
        return M(o);
      case "ss":
        return M(r);
      case "S":
        return M(l);
      case "SSS":
        return M(i);
      case "u":
        return wn(u);
      case "uu":
        return wn(o);
      case "uuu":
        return M(n);
      case "a":
        return ne(e.meridiems(), 0);
      case "kkkk":
        return M(s);
      case "kk":
        return M(m, Wn);
      case "W":
        return M(o);
      case "WW":
        return M(r);
      case "E":
      case "c":
        return M(n);
      case "EEE":
        return ne(e.weekdays("short", !1, !1), 1);
      case "EEEE":
        return ne(e.weekdays("long", !1, !1), 1);
      case "ccc":
        return ne(e.weekdays("short", !0, !1), 1);
      case "cccc":
        return ne(e.weekdays("long", !0, !1), 1);
      case "Z":
      case "ZZ":
        return ni(new RegExp(`([+-]${o.source})(?::(${r.source}))?`), 2);
      case "ZZZ":
        return ni(new RegExp(`([+-]${o.source})(${r.source})?`), 2);
      case "z":
        return wn(/[a-z_+-/]{1,256}?/i);
      default:
        return d(v);
    }
  })(t) || {
    invalidReason: Fc
  };
  return y.token = t, y;
}
const zc = {
  year: {
    "2-digit": "yy",
    numeric: "yyyyy"
  },
  month: {
    numeric: "M",
    "2-digit": "MM",
    short: "MMM",
    long: "MMMM"
  },
  day: {
    numeric: "d",
    "2-digit": "dd"
  },
  weekday: {
    short: "EEE",
    long: "EEEE"
  },
  dayperiod: "a",
  dayPeriod: "a",
  hour: {
    numeric: "h",
    "2-digit": "hh"
  },
  minute: {
    numeric: "m",
    "2-digit": "mm"
  },
  second: {
    numeric: "s",
    "2-digit": "ss"
  }
};
function Uc(t, e, n) {
  const { type: r, value: i } = t;
  if (r === "literal")
    return {
      literal: !0,
      val: i
    };
  const s = n[r];
  let a = zc[r];
  if (typeof a == "object" && (a = a[s]), a)
    return {
      literal: !1,
      val: a
    };
}
function Vc(t) {
  return [`^${t.map((n) => n.regex).reduce((n, r) => `${n}(${r.source})`, "")}$`, t];
}
function Wc(t, e, n) {
  const r = t.match(e);
  if (r) {
    const i = {};
    let s = 1;
    for (const a in n)
      if ($e(n, a)) {
        const o = n[a], l = o.groups ? o.groups + 1 : 1;
        !o.literal && o.token && (i[o.token.val[0]] = o.deser(r.slice(s, s + l))), s += l;
      }
    return [r, i];
  } else
    return [r, {}];
}
function jc(t) {
  const e = (s) => {
    switch (s) {
      case "S":
        return "millisecond";
      case "s":
        return "second";
      case "m":
        return "minute";
      case "h":
      case "H":
        return "hour";
      case "d":
        return "day";
      case "o":
        return "ordinal";
      case "L":
      case "M":
        return "month";
      case "y":
        return "year";
      case "E":
      case "c":
        return "weekday";
      case "W":
        return "weekNumber";
      case "k":
        return "weekYear";
      case "q":
        return "quarter";
      default:
        return null;
    }
  };
  let n = null, r;
  return R(t.z) || (n = ge.create(t.z)), R(t.Z) || (n || (n = new G(t.Z)), r = t.Z), R(t.q) || (t.M = (t.q - 1) * 3 + 1), R(t.h) || (t.h < 12 && t.a === 1 ? t.h += 12 : t.h === 12 && t.a === 0 && (t.h = 0)), t.G === 0 && t.y && (t.y = -t.y), R(t.u) || (t.S = dr(t.u)), [Object.keys(t).reduce((s, a) => {
    const o = e(a);
    return o && (s[o] = t[a]), s;
  }, {}), n, r];
}
let En = null;
function Gc() {
  return En || (En = D.fromMillis(1555555555555)), En;
}
function qc(t, e) {
  if (t.literal)
    return t;
  const n = Z.macroTokenToFormatOpts(t.val);
  if (!n)
    return t;
  const s = Z.create(e, n).formatDateTimeParts(Gc()).map((a) => Uc(a, e, n));
  return s.includes(void 0) ? t : s;
}
function Zc(t, e) {
  return Array.prototype.concat(...t.map((n) => qc(n, e)));
}
function na(t, e, n) {
  const r = Zc(Z.parseFormat(n), t), i = r.map((a) => Lc(a, t)), s = i.find((a) => a.invalidReason);
  if (s)
    return { input: e, tokens: r, invalidReason: s.invalidReason };
  {
    const [a, o] = Vc(i), l = RegExp(a, "i"), [c, u] = Wc(e, l, o), [m, h, d] = u ? jc(u) : [null, null, void 0];
    if ($e(u, "a") && $e(u, "H"))
      throw new ct(
        "Can't include meridiem when specifying 24-hour format"
      );
    return { input: e, tokens: r, regex: l, rawMatches: c, matches: u, result: m, zone: h, specificOffset: d };
  }
}
function Qc(t, e, n) {
  const { result: r, zone: i, specificOffset: s, invalidReason: a } = na(t, e, n);
  return [r, i, s, a];
}
const ra = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], ia = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
function X(t, e) {
  return new re(
    "unit out of range",
    `you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`
  );
}
function sa(t, e, n) {
  const r = new Date(Date.UTC(t, e - 1, n));
  t < 100 && t >= 0 && r.setUTCFullYear(r.getUTCFullYear() - 1900);
  const i = r.getUTCDay();
  return i === 0 ? 7 : i;
}
function aa(t, e, n) {
  return n + (Et(t) ? ia : ra)[e - 1];
}
function oa(t, e) {
  const n = Et(t) ? ia : ra, r = n.findIndex((s) => s < e), i = e - n[r];
  return { month: r + 1, day: i };
}
function Qn(t) {
  const { year: e, month: n, day: r } = t, i = aa(e, n, r), s = sa(e, n, r);
  let a = Math.floor((i - s + 10) / 7), o;
  return a < 1 ? (o = e - 1, a = Zt(o)) : a > Zt(e) ? (o = e + 1, a = 1) : o = e, { weekYear: o, weekNumber: a, weekday: s, ...un(t) };
}
function ri(t) {
  const { weekYear: e, weekNumber: n, weekday: r } = t, i = sa(e, 1, 4), s = dt(e);
  let a = n * 7 + r - i - 3, o;
  a < 1 ? (o = e - 1, a += dt(o)) : a > s ? (o = e + 1, a -= dt(e)) : o = e;
  const { month: l, day: c } = oa(o, a);
  return { year: o, month: l, day: c, ...un(t) };
}
function An(t) {
  const { year: e, month: n, day: r } = t, i = aa(e, n, r);
  return { year: e, ordinal: i, ...un(t) };
}
function ii(t) {
  const { year: e, ordinal: n } = t, { month: r, day: i } = oa(e, n);
  return { year: e, month: r, day: i, ...un(t) };
}
function Yc(t) {
  const e = ln(t.weekYear), n = fe(t.weekNumber, 1, Zt(t.weekYear)), r = fe(t.weekday, 1, 7);
  return e ? n ? r ? !1 : X("weekday", t.weekday) : X("week", t.week) : X("weekYear", t.weekYear);
}
function $c(t) {
  const e = ln(t.year), n = fe(t.ordinal, 1, dt(t.year));
  return e ? n ? !1 : X("ordinal", t.ordinal) : X("year", t.year);
}
function la(t) {
  const e = ln(t.year), n = fe(t.month, 1, 12), r = fe(t.day, 1, qt(t.year, t.month));
  return e ? n ? r ? !1 : X("day", t.day) : X("month", t.month) : X("year", t.year);
}
function ca(t) {
  const { hour: e, minute: n, second: r, millisecond: i } = t, s = fe(e, 0, 23) || e === 24 && n === 0 && r === 0 && i === 0, a = fe(n, 0, 59), o = fe(r, 0, 59), l = fe(i, 0, 999);
  return s ? a ? o ? l ? !1 : X("millisecond", i) : X("second", r) : X("minute", n) : X("hour", e);
}
const Sn = "Invalid DateTime", si = 864e13;
function kt(t) {
  return new re("unsupported zone", `the zone "${t.name}" is not supported`);
}
function Dn(t) {
  return t.weekData === null && (t.weekData = Qn(t.c)), t.weekData;
}
function st(t, e) {
  const n = {
    ts: t.ts,
    zone: t.zone,
    c: t.c,
    o: t.o,
    loc: t.loc,
    invalid: t.invalid
  };
  return new D({ ...n, ...e, old: n });
}
function ua(t, e, n) {
  let r = t - e * 60 * 1e3;
  const i = n.offset(r);
  if (e === i)
    return [r, e];
  r -= (i - e) * 60 * 1e3;
  const s = n.offset(r);
  return i === s ? [r, i] : [t - Math.min(i, s) * 60 * 1e3, Math.max(i, s)];
}
function ai(t, e) {
  t += e * 60 * 1e3;
  const n = new Date(t);
  return {
    year: n.getUTCFullYear(),
    month: n.getUTCMonth() + 1,
    day: n.getUTCDate(),
    hour: n.getUTCHours(),
    minute: n.getUTCMinutes(),
    second: n.getUTCSeconds(),
    millisecond: n.getUTCMilliseconds()
  };
}
function Lt(t, e, n) {
  return ua(hr(t), e, n);
}
function oi(t, e) {
  const n = t.o, r = t.c.year + Math.trunc(e.years), i = t.c.month + Math.trunc(e.months) + Math.trunc(e.quarters) * 3, s = {
    ...t.c,
    year: r,
    month: i,
    day: Math.min(t.c.day, qt(r, i)) + Math.trunc(e.days) + Math.trunc(e.weeks) * 7
  }, a = x.fromObject({
    years: e.years - Math.trunc(e.years),
    quarters: e.quarters - Math.trunc(e.quarters),
    months: e.months - Math.trunc(e.months),
    weeks: e.weeks - Math.trunc(e.weeks),
    days: e.days - Math.trunc(e.days),
    hours: e.hours,
    minutes: e.minutes,
    seconds: e.seconds,
    milliseconds: e.milliseconds
  }).as("milliseconds"), o = hr(s);
  let [l, c] = ua(o, n, t.zone);
  return a !== 0 && (l += a, c = t.zone.offset(l)), { ts: l, o: c };
}
function at(t, e, n, r, i, s) {
  const { setZone: a, zone: o } = n;
  if (t && Object.keys(t).length !== 0) {
    const l = e || o, c = D.fromObject(t, {
      ...n,
      zone: l,
      specificOffset: s
    });
    return a ? c : c.setZone(o);
  } else
    return D.invalid(
      new re("unparsable", `the input "${i}" can't be parsed as ${r}`)
    );
}
function It(t, e, n = !0) {
  return t.isValid ? Z.create(B.create("en-US"), {
    allowZ: n,
    forceSimple: !0
  }).formatDateTimeFromString(t, e) : null;
}
function Cn(t, e) {
  const n = t.c.year > 9999 || t.c.year < 0;
  let r = "";
  return n && t.c.year >= 0 && (r += "+"), r += V(t.c.year, n ? 6 : 4), e ? (r += "-", r += V(t.c.month), r += "-", r += V(t.c.day)) : (r += V(t.c.month), r += V(t.c.day)), r;
}
function li(t, e, n, r, i, s) {
  let a = V(t.c.hour);
  return e ? (a += ":", a += V(t.c.minute), (t.c.second !== 0 || !n) && (a += ":")) : a += V(t.c.minute), (t.c.second !== 0 || !n) && (a += V(t.c.second), (t.c.millisecond !== 0 || !r) && (a += ".", a += V(t.c.millisecond, 3))), i && (t.isOffsetFixed && t.offset === 0 && !s ? a += "Z" : t.o < 0 ? (a += "-", a += V(Math.trunc(-t.o / 60)), a += ":", a += V(Math.trunc(-t.o % 60))) : (a += "+", a += V(Math.trunc(t.o / 60)), a += ":", a += V(Math.trunc(t.o % 60)))), s && (a += "[" + t.zone.ianaName + "]"), a;
}
const da = {
  month: 1,
  day: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
}, Jc = {
  weekNumber: 1,
  weekday: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
}, Kc = {
  ordinal: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
}, fa = ["year", "month", "day", "hour", "minute", "second", "millisecond"], Xc = [
  "weekYear",
  "weekNumber",
  "weekday",
  "hour",
  "minute",
  "second",
  "millisecond"
], eu = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
function ci(t) {
  const e = {
    year: "year",
    years: "year",
    month: "month",
    months: "month",
    day: "day",
    days: "day",
    hour: "hour",
    hours: "hour",
    minute: "minute",
    minutes: "minute",
    quarter: "quarter",
    quarters: "quarter",
    second: "second",
    seconds: "second",
    millisecond: "millisecond",
    milliseconds: "millisecond",
    weekday: "weekday",
    weekdays: "weekday",
    weeknumber: "weekNumber",
    weeksnumber: "weekNumber",
    weeknumbers: "weekNumber",
    weekyear: "weekYear",
    weekyears: "weekYear",
    ordinal: "ordinal"
  }[t.toLowerCase()];
  if (!e)
    throw new ps(t);
  return e;
}
function ui(t, e) {
  const n = we(e.zone, U.defaultZone), r = B.fromObject(e), i = U.now();
  let s, a;
  if (R(t.year))
    s = i;
  else {
    for (const c of fa)
      R(t[c]) && (t[c] = da[c]);
    const o = la(t) || ca(t);
    if (o)
      return D.invalid(o);
    const l = n.offset(i);
    [s, a] = Lt(t, l, n);
  }
  return new D({ ts: s, zone: n, loc: r, o: a });
}
function di(t, e, n) {
  const r = R(n.round) ? !0 : n.round, i = (a, o) => (a = fr(a, r || n.calendary ? 0 : 2, !0), e.loc.clone(n).relFormatter(n).format(a, o)), s = (a) => n.calendary ? e.hasSame(t, a) ? 0 : e.startOf(a).diff(t.startOf(a), a).get(a) : e.diff(t, a).get(a);
  if (n.unit)
    return i(s(n.unit), n.unit);
  for (const a of n.units) {
    const o = s(a);
    if (Math.abs(o) >= 1)
      return i(o, a);
  }
  return i(t > e ? -0 : 0, n.units[n.units.length - 1]);
}
function fi(t) {
  let e = {}, n;
  return t.length > 0 && typeof t[t.length - 1] == "object" ? (e = t[t.length - 1], n = Array.from(t).slice(0, t.length - 1)) : n = Array.from(t), [e, n];
}
class D {
  constructor(e) {
    const n = e.zone || U.defaultZone;
    let r = e.invalid || (Number.isNaN(e.ts) ? new re("invalid input") : null) || (n.isValid ? null : kt(n));
    this.ts = R(e.ts) ? U.now() : e.ts;
    let i = null, s = null;
    if (!r)
      if (e.old && e.old.ts === this.ts && e.old.zone.equals(n))
        [i, s] = [e.old.c, e.old.o];
      else {
        const o = n.offset(this.ts);
        i = ai(this.ts, o), r = Number.isNaN(i.year) ? new re("invalid input") : null, i = r ? null : i, s = r ? null : o;
      }
    this._zone = n, this.loc = e.loc || B.create(), this.invalid = r, this.weekData = null, this.c = i, this.o = s, this.isLuxonDateTime = !0;
  }
  static now() {
    return new D({});
  }
  static local() {
    const [e, n] = fi(arguments), [r, i, s, a, o, l, c] = n;
    return ui({ year: r, month: i, day: s, hour: a, minute: o, second: l, millisecond: c }, e);
  }
  static utc() {
    const [e, n] = fi(arguments), [r, i, s, a, o, l, c] = n;
    return e.zone = G.utcInstance, ui({ year: r, month: i, day: s, hour: a, minute: o, second: l, millisecond: c }, e);
  }
  static fromJSDate(e, n = {}) {
    const r = ll(e) ? e.valueOf() : NaN;
    if (Number.isNaN(r))
      return D.invalid("invalid input");
    const i = we(n.zone, U.defaultZone);
    return i.isValid ? new D({
      ts: r,
      zone: i,
      loc: B.fromObject(n)
    }) : D.invalid(kt(i));
  }
  static fromMillis(e, n = {}) {
    if (Ne(e))
      return e < -si || e > si ? D.invalid("Timestamp out of range") : new D({
        ts: e,
        zone: we(n.zone, U.defaultZone),
        loc: B.fromObject(n)
      });
    throw new K(
      `fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`
    );
  }
  static fromSeconds(e, n = {}) {
    if (Ne(e))
      return new D({
        ts: e * 1e3,
        zone: we(n.zone, U.defaultZone),
        loc: B.fromObject(n)
      });
    throw new K("fromSeconds requires a numerical input");
  }
  static fromObject(e, n = {}) {
    e = e || {};
    const r = we(n.zone, U.defaultZone);
    if (!r.isValid)
      return D.invalid(kt(r));
    const i = U.now(), s = R(n.specificOffset) ? r.offset(i) : n.specificOffset, a = Qt(e, ci), o = !R(a.ordinal), l = !R(a.year), c = !R(a.month) || !R(a.day), u = l || c, m = a.weekYear || a.weekNumber, h = B.fromObject(n);
    if ((u || o) && m)
      throw new ct(
        "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
      );
    if (c && o)
      throw new ct("Can't mix ordinal dates with month/day");
    const d = m || a.weekday && !u;
    let p, y, v = ai(i, s);
    d ? (p = Xc, y = Jc, v = Qn(v)) : o ? (p = eu, y = Kc, v = An(v)) : (p = fa, y = da);
    let b = !1;
    for (const _ of p) {
      const oe = a[_];
      R(oe) ? b ? a[_] = y[_] : a[_] = v[_] : b = !0;
    }
    const E = d ? Yc(a) : o ? $c(a) : la(a), T = E || ca(a);
    if (T)
      return D.invalid(T);
    const C = d ? ri(a) : o ? ii(a) : a, [I, P] = Lt(C, s, r), z = new D({
      ts: I,
      zone: r,
      o: P,
      loc: h
    });
    return a.weekday && u && e.weekday !== z.weekday ? D.invalid(
      "mismatched weekday",
      `you can't specify both a weekday of ${a.weekday} and a date of ${z.toISO()}`
    ) : z;
  }
  static fromISO(e, n = {}) {
    const [r, i] = mc(e);
    return at(r, i, n, "ISO 8601", e);
  }
  static fromRFC2822(e, n = {}) {
    const [r, i] = gc(e);
    return at(r, i, n, "RFC 2822", e);
  }
  static fromHTTP(e, n = {}) {
    const [r, i] = pc(e);
    return at(r, i, n, "HTTP", n);
  }
  static fromFormat(e, n, r = {}) {
    if (R(e) || R(n))
      throw new K("fromFormat requires an input string and a format");
    const { locale: i = null, numberingSystem: s = null } = r, a = B.fromOpts({
      locale: i,
      numberingSystem: s,
      defaultToEN: !0
    }), [o, l, c, u] = Qc(a, e, n);
    return u ? D.invalid(u) : at(o, l, r, `format ${n}`, e, c);
  }
  static fromString(e, n, r = {}) {
    return D.fromFormat(e, n, r);
  }
  static fromSQL(e, n = {}) {
    const [r, i] = Sc(e);
    return at(r, i, n, "SQL", e);
  }
  static invalid(e, n = null) {
    if (!e)
      throw new K("need to specify a reason the DateTime is invalid");
    const r = e instanceof re ? e : new re(e, n);
    if (U.throwOnInvalid)
      throw new nl(r);
    return new D({ invalid: r });
  }
  static isDateTime(e) {
    return e && e.isLuxonDateTime || !1;
  }
  get(e) {
    return this[e];
  }
  get isValid() {
    return this.invalid === null;
  }
  get invalidReason() {
    return this.invalid ? this.invalid.reason : null;
  }
  get invalidExplanation() {
    return this.invalid ? this.invalid.explanation : null;
  }
  get locale() {
    return this.isValid ? this.loc.locale : null;
  }
  get numberingSystem() {
    return this.isValid ? this.loc.numberingSystem : null;
  }
  get outputCalendar() {
    return this.isValid ? this.loc.outputCalendar : null;
  }
  get zone() {
    return this._zone;
  }
  get zoneName() {
    return this.isValid ? this.zone.name : null;
  }
  get year() {
    return this.isValid ? this.c.year : NaN;
  }
  get quarter() {
    return this.isValid ? Math.ceil(this.c.month / 3) : NaN;
  }
  get month() {
    return this.isValid ? this.c.month : NaN;
  }
  get day() {
    return this.isValid ? this.c.day : NaN;
  }
  get hour() {
    return this.isValid ? this.c.hour : NaN;
  }
  get minute() {
    return this.isValid ? this.c.minute : NaN;
  }
  get second() {
    return this.isValid ? this.c.second : NaN;
  }
  get millisecond() {
    return this.isValid ? this.c.millisecond : NaN;
  }
  get weekYear() {
    return this.isValid ? Dn(this).weekYear : NaN;
  }
  get weekNumber() {
    return this.isValid ? Dn(this).weekNumber : NaN;
  }
  get weekday() {
    return this.isValid ? Dn(this).weekday : NaN;
  }
  get ordinal() {
    return this.isValid ? An(this.c).ordinal : NaN;
  }
  get monthShort() {
    return this.isValid ? xt.months("short", { locObj: this.loc })[this.month - 1] : null;
  }
  get monthLong() {
    return this.isValid ? xt.months("long", { locObj: this.loc })[this.month - 1] : null;
  }
  get weekdayShort() {
    return this.isValid ? xt.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
  }
  get weekdayLong() {
    return this.isValid ? xt.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
  }
  get offset() {
    return this.isValid ? +this.o : NaN;
  }
  get offsetNameShort() {
    return this.isValid ? this.zone.offsetName(this.ts, {
      format: "short",
      locale: this.locale
    }) : null;
  }
  get offsetNameLong() {
    return this.isValid ? this.zone.offsetName(this.ts, {
      format: "long",
      locale: this.locale
    }) : null;
  }
  get isOffsetFixed() {
    return this.isValid ? this.zone.isUniversal : null;
  }
  get isInDST() {
    return this.isOffsetFixed ? !1 : this.offset > this.set({ month: 1, day: 1 }).offset || this.offset > this.set({ month: 5 }).offset;
  }
  get isInLeapYear() {
    return Et(this.year);
  }
  get daysInMonth() {
    return qt(this.year, this.month);
  }
  get daysInYear() {
    return this.isValid ? dt(this.year) : NaN;
  }
  get weeksInWeekYear() {
    return this.isValid ? Zt(this.weekYear) : NaN;
  }
  resolvedLocaleOptions(e = {}) {
    const { locale: n, numberingSystem: r, calendar: i } = Z.create(
      this.loc.clone(e),
      e
    ).resolvedOptions(this);
    return { locale: n, numberingSystem: r, outputCalendar: i };
  }
  toUTC(e = 0, n = {}) {
    return this.setZone(G.instance(e), n);
  }
  toLocal() {
    return this.setZone(U.defaultZone);
  }
  setZone(e, { keepLocalTime: n = !1, keepCalendarTime: r = !1 } = {}) {
    if (e = we(e, U.defaultZone), e.equals(this.zone))
      return this;
    if (e.isValid) {
      let i = this.ts;
      if (n || r) {
        const s = e.offset(this.ts), a = this.toObject();
        [i] = Lt(a, s, e);
      }
      return st(this, { ts: i, zone: e });
    } else
      return D.invalid(kt(e));
  }
  reconfigure({ locale: e, numberingSystem: n, outputCalendar: r } = {}) {
    const i = this.loc.clone({ locale: e, numberingSystem: n, outputCalendar: r });
    return st(this, { loc: i });
  }
  setLocale(e) {
    return this.reconfigure({ locale: e });
  }
  set(e) {
    if (!this.isValid)
      return this;
    const n = Qt(e, ci), r = !R(n.weekYear) || !R(n.weekNumber) || !R(n.weekday), i = !R(n.ordinal), s = !R(n.year), a = !R(n.month) || !R(n.day), o = s || a, l = n.weekYear || n.weekNumber;
    if ((o || i) && l)
      throw new ct(
        "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
      );
    if (a && i)
      throw new ct("Can't mix ordinal dates with month/day");
    let c;
    r ? c = ri({ ...Qn(this.c), ...n }) : R(n.ordinal) ? (c = { ...this.toObject(), ...n }, R(n.day) && (c.day = Math.min(qt(c.year, c.month), c.day))) : c = ii({ ...An(this.c), ...n });
    const [u, m] = Lt(c, this.o, this.zone);
    return st(this, { ts: u, o: m });
  }
  plus(e) {
    if (!this.isValid)
      return this;
    const n = x.fromDurationLike(e);
    return st(this, oi(this, n));
  }
  minus(e) {
    if (!this.isValid)
      return this;
    const n = x.fromDurationLike(e).negate();
    return st(this, oi(this, n));
  }
  startOf(e) {
    if (!this.isValid)
      return this;
    const n = {}, r = x.normalizeUnit(e);
    switch (r) {
      case "years":
        n.month = 1;
      case "quarters":
      case "months":
        n.day = 1;
      case "weeks":
      case "days":
        n.hour = 0;
      case "hours":
        n.minute = 0;
      case "minutes":
        n.second = 0;
      case "seconds":
        n.millisecond = 0;
        break;
    }
    if (r === "weeks" && (n.weekday = 1), r === "quarters") {
      const i = Math.ceil(this.month / 3);
      n.month = (i - 1) * 3 + 1;
    }
    return this.set(n);
  }
  endOf(e) {
    return this.isValid ? this.plus({ [e]: 1 }).startOf(e).minus(1) : this;
  }
  toFormat(e, n = {}) {
    return this.isValid ? Z.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this, e) : Sn;
  }
  toLocaleString(e = Vn, n = {}) {
    return this.isValid ? Z.create(this.loc.clone(n), e).formatDateTime(this) : Sn;
  }
  toLocaleParts(e = {}) {
    return this.isValid ? Z.create(this.loc.clone(e), e).formatDateTimeParts(this) : [];
  }
  toISO({
    format: e = "extended",
    suppressSeconds: n = !1,
    suppressMilliseconds: r = !1,
    includeOffset: i = !0,
    extendedZone: s = !1
  } = {}) {
    if (!this.isValid)
      return null;
    const a = e === "extended";
    let o = Cn(this, a);
    return o += "T", o += li(this, a, n, r, i, s), o;
  }
  toISODate({ format: e = "extended" } = {}) {
    return this.isValid ? Cn(this, e === "extended") : null;
  }
  toISOWeekDate() {
    return It(this, "kkkk-'W'WW-c");
  }
  toISOTime({
    suppressMilliseconds: e = !1,
    suppressSeconds: n = !1,
    includeOffset: r = !0,
    includePrefix: i = !1,
    extendedZone: s = !1,
    format: a = "extended"
  } = {}) {
    return this.isValid ? (i ? "T" : "") + li(
      this,
      a === "extended",
      n,
      e,
      r,
      s
    ) : null;
  }
  toRFC2822() {
    return It(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", !1);
  }
  toHTTP() {
    return It(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
  }
  toSQLDate() {
    return this.isValid ? Cn(this, !0) : null;
  }
  toSQLTime({ includeOffset: e = !0, includeZone: n = !1, includeOffsetSpace: r = !0 } = {}) {
    let i = "HH:mm:ss.SSS";
    return (n || e) && (r && (i += " "), n ? i += "z" : e && (i += "ZZ")), It(this, i, !0);
  }
  toSQL(e = {}) {
    return this.isValid ? `${this.toSQLDate()} ${this.toSQLTime(e)}` : null;
  }
  toString() {
    return this.isValid ? this.toISO() : Sn;
  }
  valueOf() {
    return this.toMillis();
  }
  toMillis() {
    return this.isValid ? this.ts : NaN;
  }
  toSeconds() {
    return this.isValid ? this.ts / 1e3 : NaN;
  }
  toUnixInteger() {
    return this.isValid ? Math.floor(this.ts / 1e3) : NaN;
  }
  toJSON() {
    return this.toISO();
  }
  toBSON() {
    return this.toJSDate();
  }
  toObject(e = {}) {
    if (!this.isValid)
      return {};
    const n = { ...this.c };
    return e.includeConfig && (n.outputCalendar = this.outputCalendar, n.numberingSystem = this.loc.numberingSystem, n.locale = this.loc.locale), n;
  }
  toJSDate() {
    return new Date(this.isValid ? this.ts : NaN);
  }
  diff(e, n = "milliseconds", r = {}) {
    if (!this.isValid || !e.isValid)
      return x.invalid("created by diffing an invalid DateTime");
    const i = { locale: this.locale, numberingSystem: this.numberingSystem, ...r }, s = cl(n).map(x.normalizeUnit), a = e.valueOf() > this.valueOf(), o = a ? this : e, l = a ? e : this, c = Mc(o, l, s, i);
    return a ? c.negate() : c;
  }
  diffNow(e = "milliseconds", n = {}) {
    return this.diff(D.now(), e, n);
  }
  until(e) {
    return this.isValid ? L.fromDateTimes(this, e) : this;
  }
  hasSame(e, n) {
    if (!this.isValid)
      return !1;
    const r = e.valueOf(), i = this.setZone(e.zone, { keepLocalTime: !0 });
    return i.startOf(n) <= r && r <= i.endOf(n);
  }
  equals(e) {
    return this.isValid && e.isValid && this.valueOf() === e.valueOf() && this.zone.equals(e.zone) && this.loc.equals(e.loc);
  }
  toRelative(e = {}) {
    if (!this.isValid)
      return null;
    const n = e.base || D.fromObject({}, { zone: this.zone }), r = e.padding ? this < n ? -e.padding : e.padding : 0;
    let i = ["years", "months", "days", "hours", "minutes", "seconds"], s = e.unit;
    return Array.isArray(e.unit) && (i = e.unit, s = void 0), di(n, this.plus(r), {
      ...e,
      numeric: "always",
      units: i,
      unit: s
    });
  }
  toRelativeCalendar(e = {}) {
    return this.isValid ? di(e.base || D.fromObject({}, { zone: this.zone }), this, {
      ...e,
      numeric: "auto",
      units: ["years", "months", "days"],
      calendary: !0
    }) : null;
  }
  static min(...e) {
    if (!e.every(D.isDateTime))
      throw new K("min requires all arguments be DateTimes");
    return Wr(e, (n) => n.valueOf(), Math.min);
  }
  static max(...e) {
    if (!e.every(D.isDateTime))
      throw new K("max requires all arguments be DateTimes");
    return Wr(e, (n) => n.valueOf(), Math.max);
  }
  static fromFormatExplain(e, n, r = {}) {
    const { locale: i = null, numberingSystem: s = null } = r, a = B.fromOpts({
      locale: i,
      numberingSystem: s,
      defaultToEN: !0
    });
    return na(a, e, n);
  }
  static fromStringExplain(e, n, r = {}) {
    return D.fromFormatExplain(e, n, r);
  }
  static get DATE_SHORT() {
    return Vn;
  }
  static get DATE_MED() {
    return vs;
  }
  static get DATE_MED_WITH_WEEKDAY() {
    return sl;
  }
  static get DATE_FULL() {
    return ys;
  }
  static get DATE_HUGE() {
    return bs;
  }
  static get TIME_SIMPLE() {
    return ws;
  }
  static get TIME_WITH_SECONDS() {
    return Es;
  }
  static get TIME_WITH_SHORT_OFFSET() {
    return As;
  }
  static get TIME_WITH_LONG_OFFSET() {
    return Ss;
  }
  static get TIME_24_SIMPLE() {
    return Ds;
  }
  static get TIME_24_WITH_SECONDS() {
    return Cs;
  }
  static get TIME_24_WITH_SHORT_OFFSET() {
    return Ts;
  }
  static get TIME_24_WITH_LONG_OFFSET() {
    return _s;
  }
  static get DATETIME_SHORT() {
    return Rs;
  }
  static get DATETIME_SHORT_WITH_SECONDS() {
    return xs;
  }
  static get DATETIME_MED() {
    return ks;
  }
  static get DATETIME_MED_WITH_SECONDS() {
    return Is;
  }
  static get DATETIME_MED_WITH_WEEKDAY() {
    return al;
  }
  static get DATETIME_FULL() {
    return Ms;
  }
  static get DATETIME_FULL_WITH_SECONDS() {
    return Ns;
  }
  static get DATETIME_HUGE() {
    return Os;
  }
  static get DATETIME_HUGE_WITH_SECONDS() {
    return Fs;
  }
}
function ot(t) {
  if (D.isDateTime(t))
    return t;
  if (t && t.valueOf && Ne(t.valueOf()))
    return D.fromJSDate(t);
  if (t && typeof t == "object")
    return D.fromObject(t);
  throw new K(
    `Unknown datetime argument: ${t}, of type ${typeof t}`
  );
}
function ha(t) {
  return new URL(document.URL).searchParams.get(t);
}
function hi(t, e) {
  let n = new URL(document.URL);
  n.searchParams.get(t) !== e && (n.searchParams.set(t, e), window.history.pushState({}, "", n));
}
var dn, S, ma, ga, ht, mi, pa, Yt = {}, va = [], tu = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
function Ee(t, e) {
  for (var n in e)
    t[n] = e[n];
  return t;
}
function ya(t) {
  var e = t.parentNode;
  e && e.removeChild(t);
}
function f(t, e, n) {
  var r, i, s, a = {};
  for (s in e)
    s == "key" ? r = e[s] : s == "ref" ? i = e[s] : a[s] = e[s];
  if (arguments.length > 2 && (a.children = arguments.length > 3 ? dn.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null)
    for (s in t.defaultProps)
      a[s] === void 0 && (a[s] = t.defaultProps[s]);
  return zt(t, a, r, i, null);
}
function zt(t, e, n, r, i) {
  var s = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: i ?? ++ma };
  return i == null && S.vnode != null && S.vnode(s), s;
}
function q() {
  return { current: null };
}
function O(t) {
  return t.children;
}
function $(t, e) {
  this.props = t, this.context = e;
}
function vt(t, e) {
  if (e == null)
    return t.__ ? vt(t.__, t.__.__k.indexOf(t) + 1) : null;
  for (var n; e < t.__k.length; e++)
    if ((n = t.__k[e]) != null && n.__e != null)
      return n.__e;
  return typeof t.type == "function" ? vt(t) : null;
}
function ba(t) {
  var e, n;
  if ((t = t.__) != null && t.__c != null) {
    for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++)
      if ((n = t.__k[e]) != null && n.__e != null) {
        t.__e = t.__c.base = n.__e;
        break;
      }
    return ba(t);
  }
}
function Yn(t) {
  (!t.__d && (t.__d = !0) && ht.push(t) && !$t.__r++ || mi !== S.debounceRendering) && ((mi = S.debounceRendering) || setTimeout)($t);
}
function $t() {
  for (var t; $t.__r = ht.length; )
    t = ht.sort(function(e, n) {
      return e.__v.__b - n.__v.__b;
    }), ht = [], t.some(function(e) {
      var n, r, i, s, a, o;
      e.__d && (a = (s = (n = e).__v).__e, (o = n.__P) && (r = [], (i = Ee({}, s)).__v = s.__v + 1, br(o, s, i, n.__n, o.ownerSVGElement !== void 0, s.__h != null ? [a] : null, r, a ?? vt(s), s.__h), Sa(r, s), s.__e != a && ba(s)));
    });
}
function wa(t, e, n, r, i, s, a, o, l, c) {
  var u, m, h, d, p, y, v, b = r && r.__k || va, E = b.length;
  for (n.__k = [], u = 0; u < e.length; u++)
    if ((d = n.__k[u] = (d = e[u]) == null || typeof d == "boolean" ? null : typeof d == "string" || typeof d == "number" || typeof d == "bigint" ? zt(null, d, null, null, d) : Array.isArray(d) ? zt(O, { children: d }, null, null, null) : d.__b > 0 ? zt(d.type, d.props, d.key, d.ref ? d.ref : null, d.__v) : d) != null) {
      if (d.__ = n, d.__b = n.__b + 1, (h = b[u]) === null || h && d.key == h.key && d.type === h.type)
        b[u] = void 0;
      else
        for (m = 0; m < E; m++) {
          if ((h = b[m]) && d.key == h.key && d.type === h.type) {
            b[m] = void 0;
            break;
          }
          h = null;
        }
      br(t, d, h = h || Yt, i, s, a, o, l, c), p = d.__e, (m = d.ref) && h.ref != m && (v || (v = []), h.ref && v.push(h.ref, null, d), v.push(m, d.__c || p, d)), p != null ? (y == null && (y = p), typeof d.type == "function" && d.__k === h.__k ? d.__d = l = Ea(d, l, t) : l = Aa(t, d, h, b, p, l), typeof n.type == "function" && (n.__d = l)) : l && h.__e == l && l.parentNode != t && (l = vt(h));
    }
  for (n.__e = y, u = E; u--; )
    b[u] != null && Ca(b[u], b[u]);
  if (v)
    for (u = 0; u < v.length; u++)
      Da(v[u], v[++u], v[++u]);
}
function Ea(t, e, n) {
  for (var r, i = t.__k, s = 0; i && s < i.length; s++)
    (r = i[s]) && (r.__ = t, e = typeof r.type == "function" ? Ea(r, e, n) : Aa(n, r, r, i, r.__e, e));
  return e;
}
function Jt(t, e) {
  return e = e || [], t == null || typeof t == "boolean" || (Array.isArray(t) ? t.some(function(n) {
    Jt(n, e);
  }) : e.push(t)), e;
}
function Aa(t, e, n, r, i, s) {
  var a, o, l;
  if (e.__d !== void 0)
    a = e.__d, e.__d = void 0;
  else if (n == null || i != s || i.parentNode == null)
    e:
      if (s == null || s.parentNode !== t)
        t.appendChild(i), a = null;
      else {
        for (o = s, l = 0; (o = o.nextSibling) && l < r.length; l += 1)
          if (o == i)
            break e;
        t.insertBefore(i, s), a = s;
      }
  return a !== void 0 ? a : i.nextSibling;
}
function nu(t, e, n, r, i) {
  var s;
  for (s in n)
    s === "children" || s === "key" || s in e || Kt(t, s, null, n[s], r);
  for (s in e)
    i && typeof e[s] != "function" || s === "children" || s === "key" || s === "value" || s === "checked" || n[s] === e[s] || Kt(t, s, e[s], n[s], r);
}
function gi(t, e, n) {
  e[0] === "-" ? t.setProperty(e, n) : t[e] = n == null ? "" : typeof n != "number" || tu.test(e) ? n : n + "px";
}
function Kt(t, e, n, r, i) {
  var s;
  e:
    if (e === "style")
      if (typeof n == "string")
        t.style.cssText = n;
      else {
        if (typeof r == "string" && (t.style.cssText = r = ""), r)
          for (e in r)
            n && e in n || gi(t.style, e, "");
        if (n)
          for (e in n)
            r && n[e] === r[e] || gi(t.style, e, n[e]);
      }
    else if (e[0] === "o" && e[1] === "n")
      s = e !== (e = e.replace(/Capture$/, "")), e = e.toLowerCase() in t ? e.toLowerCase().slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = n, n ? r || t.addEventListener(e, s ? vi : pi, s) : t.removeEventListener(e, s ? vi : pi, s);
    else if (e !== "dangerouslySetInnerHTML") {
      if (i)
        e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
      else if (e !== "href" && e !== "list" && e !== "form" && e !== "tabIndex" && e !== "download" && e in t)
        try {
          t[e] = n ?? "";
          break e;
        } catch {
        }
      typeof n == "function" || (n == null || n === !1 && e.indexOf("-") == -1 ? t.removeAttribute(e) : t.setAttribute(e, n));
    }
}
function pi(t) {
  this.l[t.type + !1](S.event ? S.event(t) : t);
}
function vi(t) {
  this.l[t.type + !0](S.event ? S.event(t) : t);
}
function br(t, e, n, r, i, s, a, o, l) {
  var c, u, m, h, d, p, y, v, b, E, T, C, I, P, z, _ = e.type;
  if (e.constructor !== void 0)
    return null;
  n.__h != null && (l = n.__h, o = e.__e = n.__e, e.__h = null, s = [o]), (c = S.__b) && c(e);
  try {
    e:
      if (typeof _ == "function") {
        if (v = e.props, b = (c = _.contextType) && r[c.__c], E = c ? b ? b.props.value : c.__ : r, n.__c ? y = (u = e.__c = n.__c).__ = u.__E : ("prototype" in _ && _.prototype.render ? e.__c = u = new _(v, E) : (e.__c = u = new $(v, E), u.constructor = _, u.render = iu), b && b.sub(u), u.props = v, u.state || (u.state = {}), u.context = E, u.__n = r, m = u.__d = !0, u.__h = [], u._sb = []), u.__s == null && (u.__s = u.state), _.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = Ee({}, u.__s)), Ee(u.__s, _.getDerivedStateFromProps(v, u.__s))), h = u.props, d = u.state, m)
          _.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), u.componentDidMount != null && u.__h.push(u.componentDidMount);
        else {
          if (_.getDerivedStateFromProps == null && v !== h && u.componentWillReceiveProps != null && u.componentWillReceiveProps(v, E), !u.__e && u.shouldComponentUpdate != null && u.shouldComponentUpdate(v, u.__s, E) === !1 || e.__v === n.__v) {
            for (u.props = v, u.state = u.__s, e.__v !== n.__v && (u.__d = !1), u.__v = e, e.__e = n.__e, e.__k = n.__k, e.__k.forEach(function(oe) {
              oe && (oe.__ = e);
            }), T = 0; T < u._sb.length; T++)
              u.__h.push(u._sb[T]);
            u._sb = [], u.__h.length && a.push(u);
            break e;
          }
          u.componentWillUpdate != null && u.componentWillUpdate(v, u.__s, E), u.componentDidUpdate != null && u.__h.push(function() {
            u.componentDidUpdate(h, d, p);
          });
        }
        if (u.context = E, u.props = v, u.__v = e, u.__P = t, C = S.__r, I = 0, "prototype" in _ && _.prototype.render) {
          for (u.state = u.__s, u.__d = !1, C && C(e), c = u.render(u.props, u.state, u.context), P = 0; P < u._sb.length; P++)
            u.__h.push(u._sb[P]);
          u._sb = [];
        } else
          do
            u.__d = !1, C && C(e), c = u.render(u.props, u.state, u.context), u.state = u.__s;
          while (u.__d && ++I < 25);
        u.state = u.__s, u.getChildContext != null && (r = Ee(Ee({}, r), u.getChildContext())), m || u.getSnapshotBeforeUpdate == null || (p = u.getSnapshotBeforeUpdate(h, d)), z = c != null && c.type === O && c.key == null ? c.props.children : c, wa(t, Array.isArray(z) ? z : [z], e, n, r, i, s, a, o, l), u.base = e.__e, e.__h = null, u.__h.length && a.push(u), y && (u.__E = u.__ = null), u.__e = !1;
      } else
        s == null && e.__v === n.__v ? (e.__k = n.__k, e.__e = n.__e) : e.__e = ru(n.__e, e, n, r, i, s, a, l);
    (c = S.diffed) && c(e);
  } catch (oe) {
    e.__v = null, (l || s != null) && (e.__e = o, e.__h = !!l, s[s.indexOf(o)] = null), S.__e(oe, e, n);
  }
}
function Sa(t, e) {
  S.__c && S.__c(e, t), t.some(function(n) {
    try {
      t = n.__h, n.__h = [], t.some(function(r) {
        r.call(n);
      });
    } catch (r) {
      S.__e(r, n.__v);
    }
  });
}
function ru(t, e, n, r, i, s, a, o) {
  var l, c, u, m = n.props, h = e.props, d = e.type, p = 0;
  if (d === "svg" && (i = !0), s != null) {
    for (; p < s.length; p++)
      if ((l = s[p]) && "setAttribute" in l == !!d && (d ? l.localName === d : l.nodeType === 3)) {
        t = l, s[p] = null;
        break;
      }
  }
  if (t == null) {
    if (d === null)
      return document.createTextNode(h);
    t = i ? document.createElementNS("http://www.w3.org/2000/svg", d) : document.createElement(d, h.is && h), s = null, o = !1;
  }
  if (d === null)
    m === h || o && t.data === h || (t.data = h);
  else {
    if (s = s && dn.call(t.childNodes), c = (m = n.props || Yt).dangerouslySetInnerHTML, u = h.dangerouslySetInnerHTML, !o) {
      if (s != null)
        for (m = {}, p = 0; p < t.attributes.length; p++)
          m[t.attributes[p].name] = t.attributes[p].value;
      (u || c) && (u && (c && u.__html == c.__html || u.__html === t.innerHTML) || (t.innerHTML = u && u.__html || ""));
    }
    if (nu(t, h, m, i, o), u)
      e.__k = [];
    else if (p = e.props.children, wa(t, Array.isArray(p) ? p : [p], e, n, r, i && d !== "foreignObject", s, a, s ? s[0] : n.__k && vt(n, 0), o), s != null)
      for (p = s.length; p--; )
        s[p] != null && ya(s[p]);
    o || ("value" in h && (p = h.value) !== void 0 && (p !== t.value || d === "progress" && !p || d === "option" && p !== m.value) && Kt(t, "value", p, m.value, !1), "checked" in h && (p = h.checked) !== void 0 && p !== t.checked && Kt(t, "checked", p, m.checked, !1));
  }
  return t;
}
function Da(t, e, n) {
  try {
    typeof t == "function" ? t(e) : t.current = e;
  } catch (r) {
    S.__e(r, n);
  }
}
function Ca(t, e, n) {
  var r, i;
  if (S.unmount && S.unmount(t), (r = t.ref) && (r.current && r.current !== t.__e || Da(r, null, e)), (r = t.__c) != null) {
    if (r.componentWillUnmount)
      try {
        r.componentWillUnmount();
      } catch (s) {
        S.__e(s, e);
      }
    r.base = r.__P = null, t.__c = void 0;
  }
  if (r = t.__k)
    for (i = 0; i < r.length; i++)
      r[i] && Ca(r[i], e, n || typeof t.type != "function");
  n || t.__e == null || ya(t.__e), t.__ = t.__e = t.__d = void 0;
}
function iu(t, e, n) {
  return this.constructor(t, n);
}
function yt(t, e, n) {
  var r, i, s;
  S.__ && S.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, s = [], br(e, t = (!r && n || e).__k = f(O, null, [t]), i || Yt, Yt, e.ownerSVGElement !== void 0, !r && n ? [n] : i ? null : e.firstChild ? dn.call(e.childNodes) : null, s, !r && n ? n : i ? i.__e : e.firstChild, r), Sa(s, t);
}
function su(t, e) {
  var n = { __c: e = "__cC" + pa++, __: t, Consumer: function(r, i) {
    return r.children(i);
  }, Provider: function(r) {
    var i, s;
    return this.getChildContext || (i = [], (s = {})[e] = this, this.getChildContext = function() {
      return s;
    }, this.shouldComponentUpdate = function(a) {
      this.props.value !== a.value && i.some(Yn);
    }, this.sub = function(a) {
      i.push(a);
      var o = a.componentWillUnmount;
      a.componentWillUnmount = function() {
        i.splice(i.indexOf(a), 1), o && o.call(a);
      };
    }), r.children;
  } };
  return n.Provider.__ = n.Consumer.contextType = n;
}
dn = va.slice, S = { __e: function(t, e, n, r) {
  for (var i, s, a; e = e.__; )
    if ((i = e.__c) && !i.__)
      try {
        if ((s = i.constructor) && s.getDerivedStateFromError != null && (i.setState(s.getDerivedStateFromError(t)), a = i.__d), i.componentDidCatch != null && (i.componentDidCatch(t, r || {}), a = i.__d), a)
          return i.__E = i;
      } catch (o) {
        t = o;
      }
  throw t;
} }, ma = 0, ga = function(t) {
  return t != null && t.constructor === void 0;
}, $.prototype.setState = function(t, e) {
  var n;
  n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = Ee({}, this.state), typeof t == "function" && (t = t(Ee({}, n), this.props)), t && Ee(n, t), t != null && this.__v && (e && this._sb.push(e), Yn(this));
}, $.prototype.forceUpdate = function(t) {
  this.__v && (this.__e = !0, t && this.__h.push(t), Yn(this));
}, $.prototype.render = O, ht = [], $t.__r = 0, pa = 0;
var le, Tn, yi, Ta = [], _n = [], bi = S.__b, wi = S.__r, Ei = S.diffed, Ai = S.__c, Si = S.unmount;
function au() {
  for (var t; t = Ta.shift(); )
    if (t.__P && t.__H)
      try {
        t.__H.__h.forEach(Ut), t.__H.__h.forEach($n), t.__H.__h = [];
      } catch (e) {
        t.__H.__h = [], S.__e(e, t.__v);
      }
}
S.__b = function(t) {
  le = null, bi && bi(t);
}, S.__r = function(t) {
  wi && wi(t);
  var e = (le = t.__c).__H;
  e && (Tn === le ? (e.__h = [], le.__h = [], e.__.forEach(function(n) {
    n.__N && (n.__ = n.__N), n.__V = _n, n.__N = n.i = void 0;
  })) : (e.__h.forEach(Ut), e.__h.forEach($n), e.__h = [])), Tn = le;
}, S.diffed = function(t) {
  Ei && Ei(t);
  var e = t.__c;
  e && e.__H && (e.__H.__h.length && (Ta.push(e) !== 1 && yi === S.requestAnimationFrame || ((yi = S.requestAnimationFrame) || ou)(au)), e.__H.__.forEach(function(n) {
    n.i && (n.__H = n.i), n.__V !== _n && (n.__ = n.__V), n.i = void 0, n.__V = _n;
  })), Tn = le = null;
}, S.__c = function(t, e) {
  e.some(function(n) {
    try {
      n.__h.forEach(Ut), n.__h = n.__h.filter(function(r) {
        return !r.__ || $n(r);
      });
    } catch (r) {
      e.some(function(i) {
        i.__h && (i.__h = []);
      }), e = [], S.__e(r, n.__v);
    }
  }), Ai && Ai(t, e);
}, S.unmount = function(t) {
  Si && Si(t);
  var e, n = t.__c;
  n && n.__H && (n.__H.__.forEach(function(r) {
    try {
      Ut(r);
    } catch (i) {
      e = i;
    }
  }), n.__H = void 0, e && S.__e(e, n.__v));
};
var Di = typeof requestAnimationFrame == "function";
function ou(t) {
  var e, n = function() {
    clearTimeout(r), Di && cancelAnimationFrame(e), setTimeout(t);
  }, r = setTimeout(n, 100);
  Di && (e = requestAnimationFrame(n));
}
function Ut(t) {
  var e = le, n = t.__c;
  typeof n == "function" && (t.__c = void 0, n()), le = e;
}
function $n(t) {
  var e = le;
  t.__c = t.__(), le = e;
}
function lu(t, e) {
  for (var n in e)
    t[n] = e[n];
  return t;
}
function Ci(t, e) {
  for (var n in t)
    if (n !== "__source" && !(n in e))
      return !0;
  for (var r in e)
    if (r !== "__source" && t[r] !== e[r])
      return !0;
  return !1;
}
function Ti(t) {
  this.props = t;
}
(Ti.prototype = new $()).isPureReactComponent = !0, Ti.prototype.shouldComponentUpdate = function(t, e) {
  return Ci(this.props, t) || Ci(this.state, e);
};
var _i = S.__b;
S.__b = function(t) {
  t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), _i && _i(t);
};
var cu = S.__e;
S.__e = function(t, e, n, r) {
  if (t.then) {
    for (var i, s = e; s = s.__; )
      if ((i = s.__c) && i.__c)
        return e.__e == null && (e.__e = n.__e, e.__k = n.__k), i.__c(t, e);
  }
  cu(t, e, n, r);
};
var Ri = S.unmount;
function _a(t, e, n) {
  return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(r) {
    typeof r.__c == "function" && r.__c();
  }), t.__c.__H = null), (t = lu({}, t)).__c != null && (t.__c.__P === n && (t.__c.__P = e), t.__c = null), t.__k = t.__k && t.__k.map(function(r) {
    return _a(r, e, n);
  })), t;
}
function Ra(t, e, n) {
  return t && (t.__v = null, t.__k = t.__k && t.__k.map(function(r) {
    return Ra(r, e, n);
  }), t.__c && t.__c.__P === e && (t.__e && n.insertBefore(t.__e, t.__d), t.__c.__e = !0, t.__c.__P = n)), t;
}
function Rn() {
  this.__u = 0, this.t = null, this.__b = null;
}
function xa(t) {
  var e = t.__.__c;
  return e && e.__a && e.__a(t);
}
function Mt() {
  this.u = null, this.o = null;
}
S.unmount = function(t) {
  var e = t.__c;
  e && e.__R && e.__R(), e && t.__h === !0 && (t.type = null), Ri && Ri(t);
}, (Rn.prototype = new $()).__c = function(t, e) {
  var n = e.__c, r = this;
  r.t == null && (r.t = []), r.t.push(n);
  var i = xa(r.__v), s = !1, a = function() {
    s || (s = !0, n.__R = null, i ? i(o) : o());
  };
  n.__R = a;
  var o = function() {
    if (!--r.__u) {
      if (r.state.__a) {
        var c = r.state.__a;
        r.__v.__k[0] = Ra(c, c.__c.__P, c.__c.__O);
      }
      var u;
      for (r.setState({ __a: r.__b = null }); u = r.t.pop(); )
        u.forceUpdate();
    }
  }, l = e.__h === !0;
  r.__u++ || l || r.setState({ __a: r.__b = r.__v.__k[0] }), t.then(a, a);
}, Rn.prototype.componentWillUnmount = function() {
  this.t = [];
}, Rn.prototype.render = function(t, e) {
  if (this.__b) {
    if (this.__v.__k) {
      var n = document.createElement("div"), r = this.__v.__k[0].__c;
      this.__v.__k[0] = _a(this.__b, n, r.__O = r.__P);
    }
    this.__b = null;
  }
  var i = e.__a && f(O, null, t.fallback);
  return i && (i.__h = null), [f(O, null, e.__a ? null : t.children), i];
};
var xi = function(t, e, n) {
  if (++n[1] === n[0] && t.o.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.o.size))
    for (n = t.u; n; ) {
      for (; n.length > 3; )
        n.pop()();
      if (n[1] < n[0])
        break;
      t.u = n = n[2];
    }
};
function uu(t) {
  return this.getChildContext = function() {
    return t.context;
  }, t.children;
}
function du(t) {
  var e = this, n = t.i;
  e.componentWillUnmount = function() {
    yt(null, e.l), e.l = null, e.i = null;
  }, e.i && e.i !== n && e.componentWillUnmount(), t.__v ? (e.l || (e.i = n, e.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function(r) {
    this.childNodes.push(r), e.i.appendChild(r);
  }, insertBefore: function(r, i) {
    this.childNodes.push(r), e.i.appendChild(r);
  }, removeChild: function(r) {
    this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), e.i.removeChild(r);
  } }), yt(f(uu, { context: e.context }, t.__v), e.l)) : e.l && e.componentWillUnmount();
}
function fu(t, e) {
  var n = f(du, { __v: t, i: e });
  return n.containerInfo = e, n;
}
(Mt.prototype = new $()).__a = function(t) {
  var e = this, n = xa(e.__v), r = e.o.get(t);
  return r[0]++, function(i) {
    var s = function() {
      e.props.revealOrder ? (r.push(i), xi(e, t, r)) : i();
    };
    n ? n(s) : s();
  };
}, Mt.prototype.render = function(t) {
  this.u = null, this.o = /* @__PURE__ */ new Map();
  var e = Jt(t.children);
  t.revealOrder && t.revealOrder[0] === "b" && e.reverse();
  for (var n = e.length; n--; )
    this.o.set(e[n], this.u = [1, 0, this.u]);
  return t.children;
}, Mt.prototype.componentDidUpdate = Mt.prototype.componentDidMount = function() {
  var t = this;
  this.o.forEach(function(e, n) {
    xi(t, n, e);
  });
};
var hu = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, mu = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/, gu = typeof document < "u", pu = function(t) {
  return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/i : /fil|che|ra/i).test(t);
};
$.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
  Object.defineProperty($.prototype, t, { configurable: !0, get: function() {
    return this["UNSAFE_" + t];
  }, set: function(e) {
    Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e });
  } });
});
var ki = S.event;
function vu() {
}
function yu() {
  return this.cancelBubble;
}
function bu() {
  return this.defaultPrevented;
}
S.event = function(t) {
  return ki && (t = ki(t)), t.persist = vu, t.isPropagationStopped = yu, t.isDefaultPrevented = bu, t.nativeEvent = t;
};
var Ii = { configurable: !0, get: function() {
  return this.class;
} }, Mi = S.vnode;
S.vnode = function(t) {
  var e = t.type, n = t.props, r = n;
  if (typeof e == "string") {
    var i = e.indexOf("-") === -1;
    for (var s in r = {}, n) {
      var a = n[s];
      gu && s === "children" && e === "noscript" || s === "value" && "defaultValue" in n && a == null || (s === "defaultValue" && "value" in n && n.value == null ? s = "value" : s === "download" && a === !0 ? a = "" : /ondoubleclick/i.test(s) ? s = "ondblclick" : /^onchange(textarea|input)/i.test(s + e) && !pu(n.type) ? s = "oninput" : /^onfocus$/i.test(s) ? s = "onfocusin" : /^onblur$/i.test(s) ? s = "onfocusout" : /^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s) ? s = s.toLowerCase() : i && mu.test(s) ? s = s.replace(/[A-Z0-9]/g, "-$&").toLowerCase() : a === null && (a = void 0), /^oninput$/i.test(s) && (s = s.toLowerCase(), r[s] && (s = "oninputCapture")), r[s] = a);
    }
    e == "select" && r.multiple && Array.isArray(r.value) && (r.value = Jt(n.children).forEach(function(o) {
      o.props.selected = r.value.indexOf(o.props.value) != -1;
    })), e == "select" && r.defaultValue != null && (r.value = Jt(n.children).forEach(function(o) {
      o.props.selected = r.multiple ? r.defaultValue.indexOf(o.props.value) != -1 : r.defaultValue == o.props.value;
    })), t.props = r, n.class != n.className && (Ii.enumerable = "className" in n, n.className != null && (r.class = n.className), Object.defineProperty(r, "className", Ii));
  }
  t.$$typeof = hu, Mi && Mi(t);
};
var Ni = S.__r;
S.__r = function(t) {
  Ni && Ni(t), t.__c;
};
function fn(t) {
  if (!t || typeof document > "u")
    return;
  const e = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
  n.type = "text/css", e.appendChild(n), n.styleSheet ? n.styleSheet.cssText = t : n.appendChild(document.createTextNode(t));
}
class wr {
  constructor(e) {
    this.drainedOption = e, this.isRunning = !1, this.isDirty = !1, this.pauseDepths = {}, this.timeoutId = 0;
  }
  request(e) {
    this.isDirty = !0, this.isPaused() || (this.clearTimeout(), e == null ? this.tryDrain() : this.timeoutId = setTimeout(
      this.tryDrain.bind(this),
      e
    ));
  }
  pause(e = "") {
    let { pauseDepths: n } = this;
    n[e] = (n[e] || 0) + 1, this.clearTimeout();
  }
  resume(e = "", n) {
    let { pauseDepths: r } = this;
    e in r && (n ? delete r[e] : (r[e] -= 1, r[e] <= 0 && delete r[e]), this.tryDrain());
  }
  isPaused() {
    return Object.keys(this.pauseDepths).length;
  }
  tryDrain() {
    if (!this.isRunning && !this.isPaused()) {
      for (this.isRunning = !0; this.isDirty; )
        this.isDirty = !1, this.drained();
      this.isRunning = !1;
    }
  }
  clear() {
    this.clearTimeout(), this.isDirty = !1, this.pauseDepths = {};
  }
  clearTimeout() {
    this.timeoutId && (clearTimeout(this.timeoutId), this.timeoutId = 0);
  }
  drained() {
    this.drainedOption && this.drainedOption();
  }
}
const { hasOwnProperty: Xt } = Object.prototype;
function Er(t, e) {
  let n = {};
  if (e)
    for (let r in e) {
      let i = [];
      for (let s = t.length - 1; s >= 0; s -= 1) {
        let a = t[s][r];
        if (typeof a == "object" && a)
          i.unshift(a);
        else if (a !== void 0) {
          n[r] = a;
          break;
        }
      }
      i.length && (n[r] = Er(i));
    }
  for (let r = t.length - 1; r >= 0; r -= 1) {
    let i = t[r];
    for (let s in i)
      s in n || (n[s] = i[s]);
  }
  return n;
}
function Je(t, e) {
  let n = {};
  for (let r in t)
    e(t[r], r) && (n[r] = t[r]);
  return n;
}
function Fe(t, e) {
  let n = {};
  for (let r in t)
    n[r] = e(t[r], r);
  return n;
}
function ka(t) {
  let e = {};
  for (let n of t)
    e[n] = !0;
  return e;
}
function Ar(t) {
  let e = [];
  for (let n in t)
    e.push(t[n]);
  return e;
}
function se(t, e) {
  if (t === e)
    return !0;
  for (let n in t)
    if (Xt.call(t, n) && !(n in e))
      return !1;
  for (let n in e)
    if (Xt.call(e, n) && t[n] !== e[n])
      return !1;
  return !0;
}
function Oi(t, e) {
  let n = [];
  for (let r in t)
    Xt.call(t, r) && (r in e || n.push(r));
  for (let r in e)
    Xt.call(e, r) && t[r] !== e[r] && n.push(r);
  return n;
}
function xn(t, e, n = {}) {
  if (t === e)
    return !0;
  for (let r in e)
    if (!(r in t && wu(t[r], e[r], n[r])))
      return !1;
  for (let r in t)
    if (!(r in e))
      return !1;
  return !0;
}
function wu(t, e, n) {
  return t === e || n === !0 ? !0 : n ? n(t, e) : !1;
}
function Eu(t, e = 0, n, r = 1) {
  let i = [];
  n == null && (n = Object.keys(t).length);
  for (let s = e; s < n; s += r) {
    let a = t[s];
    a !== void 0 && i.push(a);
  }
  return i;
}
const Au = [];
function He(t, e, n) {
  if (t === e)
    return !0;
  let r = t.length, i;
  if (r !== e.length)
    return !1;
  for (i = 0; i < r; i += 1)
    if (!(n ? n(t[i], e[i]) : t[i] === e[i]))
      return !1;
  return !0;
}
function A(t, e, n) {
  let r, i;
  return function(...s) {
    if (!r)
      i = t.apply(this, s);
    else if (!He(r, s)) {
      n && n(i);
      let a = t.apply(this, s);
      (!e || !e(a, i)) && (i = a);
    }
    return r = s, i;
  };
}
function Vt(t, e, n) {
  let r, i;
  return (s) => {
    if (!r)
      i = t.call(this, s);
    else if (!se(r, s)) {
      n && n(i);
      let a = t.call(this, s);
      (!e || !e(a, i)) && (i = a);
    }
    return r = s, i;
  };
}
function Su(t) {
  t.parentNode && t.parentNode.removeChild(t);
}
function de(t, e) {
  if (t.closest)
    return t.closest(e);
  if (!document.documentElement.contains(t))
    return null;
  do {
    if (Du(t, e))
      return t;
    t = t.parentElement || t.parentNode;
  } while (t !== null && t.nodeType === 1);
  return null;
}
function Du(t, e) {
  return (t.matches || t.matchesSelector || t.msMatchesSelector).call(t, e);
}
function Cu(t, e) {
  let n = t instanceof HTMLElement ? [t] : t, r = [];
  for (let i = 0; i < n.length; i += 1) {
    let s = n[i].querySelectorAll(e);
    for (let a = 0; a < s.length; a += 1)
      r.push(s[a]);
  }
  return r;
}
const Tu = /(top|left|right|bottom|width|height)$/i;
function _u(t, e) {
  for (let n in e)
    Ia(t, n, e[n]);
}
function Ia(t, e, n) {
  n == null ? t.style[e] = "" : typeof n == "number" && Tu.test(e) ? t.style[e] = `${n}px` : t.style[e] = n;
}
function Ru(t) {
  var e, n;
  return (n = (e = t.composedPath) === null || e === void 0 ? void 0 : e.call(t)[0]) !== null && n !== void 0 ? n : t.target;
}
let Fi = 0;
function De() {
  return Fi += 1, "fc-dom-" + Fi;
}
function xu(t, e) {
  return (n) => {
    let r = de(n.target, t);
    r && e.call(r, n, r);
  };
}
function Ma(t, e, n, r) {
  let i = xu(n, r);
  return t.addEventListener(e, i), () => {
    t.removeEventListener(e, i);
  };
}
function ku(t, e, n, r) {
  let i;
  return Ma(t, "mouseover", e, (s, a) => {
    if (a !== i) {
      i = a, n(s, a);
      let o = (l) => {
        i = null, r(l, a), a.removeEventListener("mouseleave", o);
      };
      a.addEventListener("mouseleave", o);
    }
  });
}
function Na(t) {
  return Object.assign({ onClick: t }, Oa(t));
}
function Oa(t) {
  return {
    tabIndex: 0,
    onKeyDown(e) {
      (e.key === "Enter" || e.key === " ") && (t(e), e.preventDefault());
    }
  };
}
let Hi = 0;
function Ue() {
  return Hi += 1, String(Hi);
}
function Iu(t) {
  let e = [], n = [], r, i;
  for (typeof t == "string" ? n = t.split(/\s*,\s*/) : typeof t == "function" ? n = [t] : Array.isArray(t) && (n = t), r = 0; r < n.length; r += 1)
    i = n[r], typeof i == "string" ? e.push(i.charAt(0) === "-" ? { field: i.substring(1), order: -1 } : { field: i, order: 1 }) : typeof i == "function" && e.push({ func: i });
  return e;
}
function Mu(t, e, n) {
  let r, i;
  for (r = 0; r < n.length; r += 1)
    if (i = Nu(t, e, n[r]), i)
      return i;
  return 0;
}
function Nu(t, e, n) {
  return n.func ? n.func(t, e) : Ou(t[n.field], e[n.field]) * (n.order || 1);
}
function Ou(t, e) {
  return !t && !e ? 0 : e == null ? -1 : t == null ? 1 : typeof t == "string" || typeof e == "string" ? String(t).localeCompare(String(e)) : t - e;
}
function Ze(t, e) {
  let n = String(t);
  return "000".substr(0, e - n.length) + n;
}
function mt(t, e, n) {
  return typeof t == "function" ? t(...e) : typeof t == "string" ? e.reduce((r, i, s) => r.replace("$" + s, i || ""), t) : n;
}
function Wt(t) {
  return t % 1 === 0;
}
function Fu(t) {
  let e = t.querySelector(".fc-scrollgrid-shrink-frame"), n = t.querySelector(".fc-scrollgrid-shrink-cushion");
  if (!e)
    throw new Error("needs fc-scrollgrid-shrink-frame className");
  if (!n)
    throw new Error("needs fc-scrollgrid-shrink-cushion className");
  return t.getBoundingClientRect().width - e.getBoundingClientRect().width + n.getBoundingClientRect().width;
}
function ce(t) {
  return {
    id: Ue(),
    name: t.name,
    premiumReleaseDate: t.premiumReleaseDate ? new Date(t.premiumReleaseDate) : void 0,
    deps: t.deps || [],
    reducers: t.reducers || [],
    isLoadingFuncs: t.isLoadingFuncs || [],
    contextInit: [].concat(t.contextInit || []),
    eventRefiners: t.eventRefiners || {},
    eventDefMemberAdders: t.eventDefMemberAdders || [],
    eventSourceRefiners: t.eventSourceRefiners || {},
    isDraggableTransformers: t.isDraggableTransformers || [],
    eventDragMutationMassagers: t.eventDragMutationMassagers || [],
    eventDefMutationAppliers: t.eventDefMutationAppliers || [],
    dateSelectionTransformers: t.dateSelectionTransformers || [],
    datePointTransforms: t.datePointTransforms || [],
    dateSpanTransforms: t.dateSpanTransforms || [],
    views: t.views || {},
    viewPropsTransformers: t.viewPropsTransformers || [],
    isPropsValid: t.isPropsValid || null,
    externalDefTransforms: t.externalDefTransforms || [],
    viewContainerAppends: t.viewContainerAppends || [],
    eventDropTransformers: t.eventDropTransformers || [],
    componentInteractions: t.componentInteractions || [],
    calendarInteractions: t.calendarInteractions || [],
    themeClasses: t.themeClasses || {},
    eventSourceDefs: t.eventSourceDefs || [],
    cmdFormatter: t.cmdFormatter,
    recurringTypes: t.recurringTypes || [],
    namedTimeZonedImpl: t.namedTimeZonedImpl,
    initialView: t.initialView || "",
    elementDraggingImpl: t.elementDraggingImpl,
    optionChangeHandlers: t.optionChangeHandlers || {},
    scrollGridImpl: t.scrollGridImpl || null,
    listenerRefiners: t.listenerRefiners || {},
    optionRefiners: t.optionRefiners || {},
    propSetHandlers: t.propSetHandlers || {}
  };
}
function Hu(t, e) {
  let n = {}, r = {
    premiumReleaseDate: void 0,
    reducers: [],
    isLoadingFuncs: [],
    contextInit: [],
    eventRefiners: {},
    eventDefMemberAdders: [],
    eventSourceRefiners: {},
    isDraggableTransformers: [],
    eventDragMutationMassagers: [],
    eventDefMutationAppliers: [],
    dateSelectionTransformers: [],
    datePointTransforms: [],
    dateSpanTransforms: [],
    views: {},
    viewPropsTransformers: [],
    isPropsValid: null,
    externalDefTransforms: [],
    viewContainerAppends: [],
    eventDropTransformers: [],
    componentInteractions: [],
    calendarInteractions: [],
    themeClasses: {},
    eventSourceDefs: [],
    cmdFormatter: null,
    recurringTypes: [],
    namedTimeZonedImpl: null,
    initialView: "",
    elementDraggingImpl: null,
    optionChangeHandlers: {},
    scrollGridImpl: null,
    listenerRefiners: {},
    optionRefiners: {},
    propSetHandlers: {}
  };
  function i(s) {
    for (let a of s) {
      const o = a.name, l = n[o];
      l === void 0 ? (n[o] = a.id, i(a.deps), r = Bu(r, a)) : l !== a.id && console.warn(`Duplicate plugin '${o}'`);
    }
  }
  return t && i(t), i(e), r;
}
function Pu() {
  let t = [], e = [], n;
  return (r, i) => ((!n || !He(r, t) || !He(i, e)) && (n = Hu(r, i)), t = r, e = i, n);
}
function Bu(t, e) {
  return {
    premiumReleaseDate: Lu(t.premiumReleaseDate, e.premiumReleaseDate),
    reducers: t.reducers.concat(e.reducers),
    isLoadingFuncs: t.isLoadingFuncs.concat(e.isLoadingFuncs),
    contextInit: t.contextInit.concat(e.contextInit),
    eventRefiners: Object.assign(Object.assign({}, t.eventRefiners), e.eventRefiners),
    eventDefMemberAdders: t.eventDefMemberAdders.concat(e.eventDefMemberAdders),
    eventSourceRefiners: Object.assign(Object.assign({}, t.eventSourceRefiners), e.eventSourceRefiners),
    isDraggableTransformers: t.isDraggableTransformers.concat(e.isDraggableTransformers),
    eventDragMutationMassagers: t.eventDragMutationMassagers.concat(e.eventDragMutationMassagers),
    eventDefMutationAppliers: t.eventDefMutationAppliers.concat(e.eventDefMutationAppliers),
    dateSelectionTransformers: t.dateSelectionTransformers.concat(e.dateSelectionTransformers),
    datePointTransforms: t.datePointTransforms.concat(e.datePointTransforms),
    dateSpanTransforms: t.dateSpanTransforms.concat(e.dateSpanTransforms),
    views: Object.assign(Object.assign({}, t.views), e.views),
    viewPropsTransformers: t.viewPropsTransformers.concat(e.viewPropsTransformers),
    isPropsValid: e.isPropsValid || t.isPropsValid,
    externalDefTransforms: t.externalDefTransforms.concat(e.externalDefTransforms),
    viewContainerAppends: t.viewContainerAppends.concat(e.viewContainerAppends),
    eventDropTransformers: t.eventDropTransformers.concat(e.eventDropTransformers),
    calendarInteractions: t.calendarInteractions.concat(e.calendarInteractions),
    componentInteractions: t.componentInteractions.concat(e.componentInteractions),
    themeClasses: Object.assign(Object.assign({}, t.themeClasses), e.themeClasses),
    eventSourceDefs: t.eventSourceDefs.concat(e.eventSourceDefs),
    cmdFormatter: e.cmdFormatter || t.cmdFormatter,
    recurringTypes: t.recurringTypes.concat(e.recurringTypes),
    namedTimeZonedImpl: e.namedTimeZonedImpl || t.namedTimeZonedImpl,
    initialView: t.initialView || e.initialView,
    elementDraggingImpl: t.elementDraggingImpl || e.elementDraggingImpl,
    optionChangeHandlers: Object.assign(Object.assign({}, t.optionChangeHandlers), e.optionChangeHandlers),
    scrollGridImpl: e.scrollGridImpl || t.scrollGridImpl,
    listenerRefiners: Object.assign(Object.assign({}, t.listenerRefiners), e.listenerRefiners),
    optionRefiners: Object.assign(Object.assign({}, t.optionRefiners), e.optionRefiners),
    propSetHandlers: Object.assign(Object.assign({}, t.propSetHandlers), e.propSetHandlers)
  };
}
function Lu(t, e) {
  return t === void 0 ? e : e === void 0 ? t : new Date(Math.max(t.valueOf(), e.valueOf()));
}
const zu = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
function Pi(t, e) {
  let n = Ae(t);
  return n[2] += e * 7, Q(n);
}
function W(t, e) {
  let n = Ae(t);
  return n[2] += e, Q(n);
}
function Pe(t, e) {
  let n = Ae(t);
  return n[6] += e, Q(n);
}
function Uu(t, e) {
  return Te(t, e) / 7;
}
function Te(t, e) {
  return (e.valueOf() - t.valueOf()) / (1e3 * 60 * 60 * 24);
}
function Vu(t, e) {
  return (e.valueOf() - t.valueOf()) / (1e3 * 60 * 60);
}
function Wu(t, e) {
  return (e.valueOf() - t.valueOf()) / (1e3 * 60);
}
function ju(t, e) {
  return (e.valueOf() - t.valueOf()) / 1e3;
}
function Gu(t, e) {
  let n = F(t), r = F(e);
  return {
    years: 0,
    months: 0,
    days: Math.round(Te(n, r)),
    milliseconds: e.valueOf() - r.valueOf() - (t.valueOf() - n.valueOf())
  };
}
function qu(t, e) {
  let n = en(t, e);
  return n !== null && n % 7 === 0 ? n / 7 : null;
}
function en(t, e) {
  return Se(t) === Se(e) ? Math.round(Te(t, e)) : null;
}
function F(t) {
  return Q([
    t.getUTCFullYear(),
    t.getUTCMonth(),
    t.getUTCDate()
  ]);
}
function Zu(t) {
  return Q([
    t.getUTCFullYear(),
    t.getUTCMonth(),
    t.getUTCDate(),
    t.getUTCHours()
  ]);
}
function Qu(t) {
  return Q([
    t.getUTCFullYear(),
    t.getUTCMonth(),
    t.getUTCDate(),
    t.getUTCHours(),
    t.getUTCMinutes()
  ]);
}
function Yu(t) {
  return Q([
    t.getUTCFullYear(),
    t.getUTCMonth(),
    t.getUTCDate(),
    t.getUTCHours(),
    t.getUTCMinutes(),
    t.getUTCSeconds()
  ]);
}
function $u(t, e, n) {
  let r = t.getUTCFullYear(), i = kn(t, r, e, n);
  if (i < 1)
    return kn(t, r - 1, e, n);
  let s = kn(t, r + 1, e, n);
  return s >= 1 ? Math.min(i, s) : i;
}
function kn(t, e, n, r) {
  let i = Q([e, 0, 1 + Ju(e, n, r)]), s = F(t), a = Math.round(Te(i, s));
  return Math.floor(a / 7) + 1;
}
function Ju(t, e, n) {
  let r = 7 + e - n;
  return -((7 + Q([t, 0, r]).getUTCDay() - e) % 7) + r - 1;
}
function Bi(t) {
  return [
    t.getFullYear(),
    t.getMonth(),
    t.getDate(),
    t.getHours(),
    t.getMinutes(),
    t.getSeconds(),
    t.getMilliseconds()
  ];
}
function Li(t) {
  return new Date(
    t[0],
    t[1] || 0,
    t[2] == null ? 1 : t[2],
    t[3] || 0,
    t[4] || 0,
    t[5] || 0
  );
}
function Ae(t) {
  return [
    t.getUTCFullYear(),
    t.getUTCMonth(),
    t.getUTCDate(),
    t.getUTCHours(),
    t.getUTCMinutes(),
    t.getUTCSeconds(),
    t.getUTCMilliseconds()
  ];
}
function Q(t) {
  return t.length === 1 && (t = t.concat([0])), new Date(Date.UTC(...t));
}
function Fa(t) {
  return !isNaN(t.valueOf());
}
function Se(t) {
  return t.getUTCHours() * 1e3 * 60 * 60 + t.getUTCMinutes() * 1e3 * 60 + t.getUTCSeconds() * 1e3 + t.getUTCMilliseconds();
}
let Ha = {};
function Ku(t, e) {
  Ha[t] = e;
}
function Xu(t) {
  return new Ha[t]();
}
class ed {
  getMarkerYear(e) {
    return e.getUTCFullYear();
  }
  getMarkerMonth(e) {
    return e.getUTCMonth();
  }
  getMarkerDay(e) {
    return e.getUTCDate();
  }
  arrayToMarker(e) {
    return Q(e);
  }
  markerToArray(e) {
    return Ae(e);
  }
}
Ku("gregory", ed);
const zi = ["years", "months", "days", "milliseconds"], td = /^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;
function k(t, e) {
  return typeof t == "string" ? nd(t) : typeof t == "object" && t ? Ui(t) : typeof t == "number" ? Ui({ [e || "milliseconds"]: t }) : null;
}
function nd(t) {
  let e = td.exec(t);
  if (e) {
    let n = e[1] ? -1 : 1;
    return {
      years: 0,
      months: 0,
      days: n * (e[2] ? parseInt(e[2], 10) : 0),
      milliseconds: n * ((e[3] ? parseInt(e[3], 10) : 0) * 60 * 60 * 1e3 + (e[4] ? parseInt(e[4], 10) : 0) * 60 * 1e3 + (e[5] ? parseInt(e[5], 10) : 0) * 1e3 + (e[6] ? parseInt(e[6], 10) : 0))
    };
  }
  return null;
}
function Ui(t) {
  let e = {
    years: t.years || t.year || 0,
    months: t.months || t.month || 0,
    days: t.days || t.day || 0,
    milliseconds: (t.hours || t.hour || 0) * 60 * 60 * 1e3 + (t.minutes || t.minute || 0) * 60 * 1e3 + (t.seconds || t.second || 0) * 1e3 + (t.milliseconds || t.millisecond || t.ms || 0)
  }, n = t.weeks || t.week;
  return n && (e.days += n * 7, e.specifiedWeeks = !0), e;
}
function rd(t, e) {
  return t.years === e.years && t.months === e.months && t.days === e.days && t.milliseconds === e.milliseconds;
}
function Jn(t, e) {
  return {
    years: t.years + e.years,
    months: t.months + e.months,
    days: t.days + e.days,
    milliseconds: t.milliseconds + e.milliseconds
  };
}
function id(t, e) {
  return {
    years: t.years - e.years,
    months: t.months - e.months,
    days: t.days - e.days,
    milliseconds: t.milliseconds - e.milliseconds
  };
}
function sd(t, e) {
  return {
    years: t.years * e,
    months: t.months * e,
    days: t.days * e,
    milliseconds: t.milliseconds * e
  };
}
function ad(t) {
  return Qe(t) / 365;
}
function od(t) {
  return Qe(t) / 30;
}
function Qe(t) {
  return ie(t) / 864e5;
}
function ie(t) {
  return t.years * (365 * 864e5) + t.months * (30 * 864e5) + t.days * 864e5 + t.milliseconds;
}
function Sr(t, e) {
  let n = null;
  for (let r = 0; r < zi.length; r += 1) {
    let i = zi[r];
    if (e[i]) {
      let s = t[i] / e[i];
      if (!Wt(s) || n !== null && n !== s)
        return null;
      n = s;
    } else if (t[i])
      return null;
  }
  return n;
}
function Kn(t) {
  let e = t.milliseconds;
  if (e) {
    if (e % 1e3 !== 0)
      return { unit: "millisecond", value: e };
    if (e % (1e3 * 60) !== 0)
      return { unit: "second", value: e / 1e3 };
    if (e % (1e3 * 60 * 60) !== 0)
      return { unit: "minute", value: e / (1e3 * 60) };
    if (e)
      return { unit: "hour", value: e / (1e3 * 60 * 60) };
  }
  return t.days ? t.specifiedWeeks && t.days % 7 === 0 ? { unit: "week", value: t.days / 7 } : { unit: "day", value: t.days } : t.months ? { unit: "month", value: t.months } : t.years ? { unit: "year", value: t.years } : { unit: "millisecond", value: 0 };
}
function Pa(t, e, n = !1) {
  let r = t.toISOString();
  return r = r.replace(".000", ""), n && (r = r.replace("T00:00:00Z", "")), r.length > 10 && (e == null ? r = r.replace("Z", "") : e !== 0 && (r = r.replace("Z", Dr(e, !0)))), r;
}
function hn(t) {
  return t.toISOString().replace(/T.*$/, "");
}
function ld(t) {
  return Ze(t.getUTCHours(), 2) + ":" + Ze(t.getUTCMinutes(), 2) + ":" + Ze(t.getUTCSeconds(), 2);
}
function Dr(t, e = !1) {
  let n = t < 0 ? "-" : "+", r = Math.abs(t), i = Math.floor(r / 60), s = Math.round(r % 60);
  return e ? `${n + Ze(i, 2)}:${Ze(s, 2)}` : `GMT${n}${i}${s ? `:${Ze(s, 2)}` : ""}`;
}
const cd = /^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;
function ud(t) {
  let e = cd.exec(t);
  if (e) {
    let n = new Date(Date.UTC(Number(e[1]), e[3] ? Number(e[3]) - 1 : 0, Number(e[5] || 1), Number(e[7] || 0), Number(e[8] || 0), Number(e[10] || 0), e[12] ? Number(`0.${e[12]}`) * 1e3 : 0));
    if (Fa(n)) {
      let r = null;
      return e[13] && (r = (e[15] === "-" ? -1 : 1) * (Number(e[16] || 0) * 60 + Number(e[18] || 0))), {
        marker: n,
        isTimeUnspecified: !e[6],
        timeZoneOffset: r
      };
    }
  }
  return null;
}
class dd {
  constructor(e) {
    let n = this.timeZone = e.timeZone, r = n !== "local" && n !== "UTC";
    e.namedTimeZoneImpl && r && (this.namedTimeZoneImpl = new e.namedTimeZoneImpl(n)), this.canComputeOffset = Boolean(!r || this.namedTimeZoneImpl), this.calendarSystem = Xu(e.calendarSystem), this.locale = e.locale, this.weekDow = e.locale.week.dow, this.weekDoy = e.locale.week.doy, e.weekNumberCalculation === "ISO" && (this.weekDow = 1, this.weekDoy = 4), typeof e.firstDay == "number" && (this.weekDow = e.firstDay), typeof e.weekNumberCalculation == "function" && (this.weekNumberFunc = e.weekNumberCalculation), this.weekText = e.weekText != null ? e.weekText : e.locale.options.weekText, this.weekTextLong = (e.weekTextLong != null ? e.weekTextLong : e.locale.options.weekTextLong) || this.weekText, this.cmdFormatter = e.cmdFormatter, this.defaultSeparator = e.defaultSeparator;
  }
  createMarker(e) {
    let n = this.createMarkerMeta(e);
    return n === null ? null : n.marker;
  }
  createNowMarker() {
    return this.canComputeOffset ? this.timestampToMarker(new Date().valueOf()) : Q(Bi(new Date()));
  }
  createMarkerMeta(e) {
    if (typeof e == "string")
      return this.parse(e);
    let n = null;
    return typeof e == "number" ? n = this.timestampToMarker(e) : e instanceof Date ? (e = e.valueOf(), isNaN(e) || (n = this.timestampToMarker(e))) : Array.isArray(e) && (n = Q(e)), n === null || !Fa(n) ? null : { marker: n, isTimeUnspecified: !1, forcedTzo: null };
  }
  parse(e) {
    let n = ud(e);
    if (n === null)
      return null;
    let { marker: r } = n, i = null;
    return n.timeZoneOffset !== null && (this.canComputeOffset ? r = this.timestampToMarker(r.valueOf() - n.timeZoneOffset * 60 * 1e3) : i = n.timeZoneOffset), { marker: r, isTimeUnspecified: n.isTimeUnspecified, forcedTzo: i };
  }
  getYear(e) {
    return this.calendarSystem.getMarkerYear(e);
  }
  getMonth(e) {
    return this.calendarSystem.getMarkerMonth(e);
  }
  add(e, n) {
    let r = this.calendarSystem.markerToArray(e);
    return r[0] += n.years, r[1] += n.months, r[2] += n.days, r[6] += n.milliseconds, this.calendarSystem.arrayToMarker(r);
  }
  subtract(e, n) {
    let r = this.calendarSystem.markerToArray(e);
    return r[0] -= n.years, r[1] -= n.months, r[2] -= n.days, r[6] -= n.milliseconds, this.calendarSystem.arrayToMarker(r);
  }
  addYears(e, n) {
    let r = this.calendarSystem.markerToArray(e);
    return r[0] += n, this.calendarSystem.arrayToMarker(r);
  }
  addMonths(e, n) {
    let r = this.calendarSystem.markerToArray(e);
    return r[1] += n, this.calendarSystem.arrayToMarker(r);
  }
  diffWholeYears(e, n) {
    let { calendarSystem: r } = this;
    return Se(e) === Se(n) && r.getMarkerDay(e) === r.getMarkerDay(n) && r.getMarkerMonth(e) === r.getMarkerMonth(n) ? r.getMarkerYear(n) - r.getMarkerYear(e) : null;
  }
  diffWholeMonths(e, n) {
    let { calendarSystem: r } = this;
    return Se(e) === Se(n) && r.getMarkerDay(e) === r.getMarkerDay(n) ? r.getMarkerMonth(n) - r.getMarkerMonth(e) + (r.getMarkerYear(n) - r.getMarkerYear(e)) * 12 : null;
  }
  greatestWholeUnit(e, n) {
    let r = this.diffWholeYears(e, n);
    return r !== null ? { unit: "year", value: r } : (r = this.diffWholeMonths(e, n), r !== null ? { unit: "month", value: r } : (r = qu(e, n), r !== null ? { unit: "week", value: r } : (r = en(e, n), r !== null ? { unit: "day", value: r } : (r = Vu(e, n), Wt(r) ? { unit: "hour", value: r } : (r = Wu(e, n), Wt(r) ? { unit: "minute", value: r } : (r = ju(e, n), Wt(r) ? { unit: "second", value: r } : { unit: "millisecond", value: n.valueOf() - e.valueOf() }))))));
  }
  countDurationsBetween(e, n, r) {
    let i;
    return r.years && (i = this.diffWholeYears(e, n), i !== null) ? i / ad(r) : r.months && (i = this.diffWholeMonths(e, n), i !== null) ? i / od(r) : r.days && (i = en(e, n), i !== null) ? i / Qe(r) : (n.valueOf() - e.valueOf()) / ie(r);
  }
  startOf(e, n) {
    return n === "year" ? this.startOfYear(e) : n === "month" ? this.startOfMonth(e) : n === "week" ? this.startOfWeek(e) : n === "day" ? F(e) : n === "hour" ? Zu(e) : n === "minute" ? Qu(e) : n === "second" ? Yu(e) : null;
  }
  startOfYear(e) {
    return this.calendarSystem.arrayToMarker([
      this.calendarSystem.getMarkerYear(e)
    ]);
  }
  startOfMonth(e) {
    return this.calendarSystem.arrayToMarker([
      this.calendarSystem.getMarkerYear(e),
      this.calendarSystem.getMarkerMonth(e)
    ]);
  }
  startOfWeek(e) {
    return this.calendarSystem.arrayToMarker([
      this.calendarSystem.getMarkerYear(e),
      this.calendarSystem.getMarkerMonth(e),
      e.getUTCDate() - (e.getUTCDay() - this.weekDow + 7) % 7
    ]);
  }
  computeWeekNumber(e) {
    return this.weekNumberFunc ? this.weekNumberFunc(this.toDate(e)) : $u(e, this.weekDow, this.weekDoy);
  }
  format(e, n, r = {}) {
    return n.format({
      marker: e,
      timeZoneOffset: r.forcedTzo != null ? r.forcedTzo : this.offsetForMarker(e)
    }, this);
  }
  formatRange(e, n, r, i = {}) {
    return i.isEndExclusive && (n = Pe(n, -1)), r.formatRange({
      marker: e,
      timeZoneOffset: i.forcedStartTzo != null ? i.forcedStartTzo : this.offsetForMarker(e)
    }, {
      marker: n,
      timeZoneOffset: i.forcedEndTzo != null ? i.forcedEndTzo : this.offsetForMarker(n)
    }, this, i.defaultSeparator);
  }
  formatIso(e, n = {}) {
    let r = null;
    return n.omitTimeZoneOffset || (n.forcedTzo != null ? r = n.forcedTzo : r = this.offsetForMarker(e)), Pa(e, r, n.omitTime);
  }
  timestampToMarker(e) {
    return this.timeZone === "local" ? Q(Bi(new Date(e))) : this.timeZone === "UTC" || !this.namedTimeZoneImpl ? new Date(e) : Q(this.namedTimeZoneImpl.timestampToArray(e));
  }
  offsetForMarker(e) {
    return this.timeZone === "local" ? -Li(Ae(e)).getTimezoneOffset() : this.timeZone === "UTC" ? 0 : this.namedTimeZoneImpl ? this.namedTimeZoneImpl.offsetForArray(Ae(e)) : null;
  }
  toDate(e, n) {
    return this.timeZone === "local" ? Li(Ae(e)) : this.timeZone === "UTC" ? new Date(e.valueOf()) : this.namedTimeZoneImpl ? new Date(e.valueOf() - this.namedTimeZoneImpl.offsetForArray(Ae(e)) * 1e3 * 60) : new Date(e.valueOf() - (n || 0));
  }
}
class Ct {
  constructor(e) {
    this.iconOverrideOption && this.setIconOverride(e[this.iconOverrideOption]);
  }
  setIconOverride(e) {
    let n, r;
    if (typeof e == "object" && e) {
      n = Object.assign({}, this.iconClasses);
      for (r in e)
        n[r] = this.applyIconOverridePrefix(e[r]);
      this.iconClasses = n;
    } else
      e === !1 && (this.iconClasses = {});
  }
  applyIconOverridePrefix(e) {
    let n = this.iconOverridePrefix;
    return n && e.indexOf(n) !== 0 && (e = n + e), e;
  }
  getClass(e) {
    return this.classes[e] || "";
  }
  getIconClass(e, n) {
    let r;
    return n && this.rtlIconClasses ? r = this.rtlIconClasses[e] || this.iconClasses[e] : r = this.iconClasses[e], r ? `${this.baseIconClass} ${r}` : "";
  }
  getCustomButtonIconClass(e) {
    let n;
    return this.iconOverrideCustomButtonOption && (n = e[this.iconOverrideCustomButtonOption], n) ? `${this.baseIconClass} ${this.applyIconOverridePrefix(n)}` : "";
  }
}
Ct.prototype.classes = {};
Ct.prototype.iconClasses = {};
Ct.prototype.baseIconClass = "";
Ct.prototype.iconOverridePrefix = "";
const Vi = {
  week: 3,
  separator: 0,
  omitZeroMinute: 0,
  meridiem: 0,
  omitCommas: 0
}, tn = {
  timeZoneName: 7,
  era: 6,
  year: 5,
  month: 4,
  day: 2,
  weekday: 2,
  hour: 1,
  minute: 1,
  second: 1
}, Nt = /\s*([ap])\.?m\.?/i, fd = /,/g, hd = /\s+/g, md = /\u200e/g, gd = /UTC|GMT/;
class pd {
  constructor(e) {
    let n = {}, r = {}, i = 0;
    for (let s in e)
      s in Vi ? (r[s] = e[s], i = Math.max(Vi[s], i)) : (n[s] = e[s], s in tn && (i = Math.max(tn[s], i)));
    this.standardDateProps = n, this.extendedSettings = r, this.severity = i, this.buildFormattingFunc = A(Wi);
  }
  format(e, n) {
    return this.buildFormattingFunc(this.standardDateProps, this.extendedSettings, n)(e);
  }
  formatRange(e, n, r, i) {
    let { standardDateProps: s, extendedSettings: a } = this, o = Ad(e.marker, n.marker, r.calendarSystem);
    if (!o)
      return this.format(e, r);
    let l = o;
    l > 1 && (s.year === "numeric" || s.year === "2-digit") && (s.month === "numeric" || s.month === "2-digit") && (s.day === "numeric" || s.day === "2-digit") && (l = 1);
    let c = this.format(e, r), u = this.format(n, r);
    if (c === u)
      return c;
    let m = Sd(s, l), h = Wi(m, a, r), d = h(e), p = h(n), y = Dd(c, d, u, p), v = a.separator || i || r.defaultSeparator || "";
    return y ? y.before + d + v + p + y.after : c + v + u;
  }
  getLargestUnit() {
    switch (this.severity) {
      case 7:
      case 6:
      case 5:
        return "year";
      case 4:
        return "month";
      case 3:
        return "week";
      case 2:
        return "day";
      default:
        return "time";
    }
  }
}
function Wi(t, e, n) {
  let r = Object.keys(t).length;
  return r === 1 && t.timeZoneName === "short" ? (i) => Dr(i.timeZoneOffset) : r === 0 && e.week ? (i) => Ed(n.computeWeekNumber(i.marker), n.weekText, n.weekTextLong, n.locale, e.week) : vd(t, e, n);
}
function vd(t, e, n) {
  t = Object.assign({}, t), e = Object.assign({}, e), yd(t, e), t.timeZone = "UTC";
  let r = new Intl.DateTimeFormat(n.locale.codes, t), i;
  if (e.omitZeroMinute) {
    let s = Object.assign({}, t);
    delete s.minute, i = new Intl.DateTimeFormat(n.locale.codes, s);
  }
  return (s) => {
    let { marker: a } = s, o;
    i && !a.getUTCMinutes() ? o = i : o = r;
    let l = o.format(a);
    return bd(l, s, t, e, n);
  };
}
function yd(t, e) {
  t.timeZoneName && (t.hour || (t.hour = "2-digit"), t.minute || (t.minute = "2-digit")), t.timeZoneName === "long" && (t.timeZoneName = "short"), e.omitZeroMinute && (t.second || t.millisecond) && delete e.omitZeroMinute;
}
function bd(t, e, n, r, i) {
  return t = t.replace(md, ""), n.timeZoneName === "short" && (t = wd(t, i.timeZone === "UTC" || e.timeZoneOffset == null ? "UTC" : Dr(e.timeZoneOffset))), r.omitCommas && (t = t.replace(fd, "").trim()), r.omitZeroMinute && (t = t.replace(":00", "")), r.meridiem === !1 ? t = t.replace(Nt, "").trim() : r.meridiem === "narrow" ? t = t.replace(Nt, (s, a) => a.toLocaleLowerCase()) : r.meridiem === "short" ? t = t.replace(Nt, (s, a) => `${a.toLocaleLowerCase()}m`) : r.meridiem === "lowercase" && (t = t.replace(Nt, (s) => s.toLocaleLowerCase())), t = t.replace(hd, " "), t = t.trim(), t;
}
function wd(t, e) {
  let n = !1;
  return t = t.replace(gd, () => (n = !0, e)), n || (t += ` ${e}`), t;
}
function Ed(t, e, n, r, i) {
  let s = [];
  return i === "long" ? s.push(n) : (i === "short" || i === "narrow") && s.push(e), (i === "long" || i === "short") && s.push(" "), s.push(r.simpleNumberFormat.format(t)), r.options.direction === "rtl" && s.reverse(), s.join("");
}
function Ad(t, e, n) {
  return n.getMarkerYear(t) !== n.getMarkerYear(e) ? 5 : n.getMarkerMonth(t) !== n.getMarkerMonth(e) ? 4 : n.getMarkerDay(t) !== n.getMarkerDay(e) ? 2 : Se(t) !== Se(e) ? 1 : 0;
}
function Sd(t, e) {
  let n = {};
  for (let r in t)
    (!(r in tn) || tn[r] <= e) && (n[r] = t[r]);
  return n;
}
function Dd(t, e, n, r) {
  let i = 0;
  for (; i < t.length; ) {
    let s = t.indexOf(e, i);
    if (s === -1)
      break;
    let a = t.substr(0, s);
    i = s + e.length;
    let o = t.substr(i), l = 0;
    for (; l < n.length; ) {
      let c = n.indexOf(r, l);
      if (c === -1)
        break;
      let u = n.substr(0, c);
      l = c + r.length;
      let m = n.substr(l);
      if (a === u && o === m)
        return {
          before: a,
          after: o
        };
    }
  }
  return null;
}
function ji(t, e) {
  let n = e.markerToArray(t.marker);
  return {
    marker: t.marker,
    timeZoneOffset: t.timeZoneOffset,
    array: n,
    year: n[0],
    month: n[1],
    day: n[2],
    hour: n[3],
    minute: n[4],
    second: n[5],
    millisecond: n[6]
  };
}
function nn(t, e, n, r) {
  let i = ji(t, n.calendarSystem), s = e ? ji(e, n.calendarSystem) : null;
  return {
    date: i,
    start: i,
    end: s,
    timeZone: n.timeZone,
    localeCodes: n.locale.codes,
    defaultSeparator: r || n.defaultSeparator
  };
}
class Cd {
  constructor(e) {
    this.cmdStr = e;
  }
  format(e, n, r) {
    return n.cmdFormatter(this.cmdStr, nn(e, null, n, r));
  }
  formatRange(e, n, r, i) {
    return r.cmdFormatter(this.cmdStr, nn(e, n, r, i));
  }
}
class Td {
  constructor(e) {
    this.func = e;
  }
  format(e, n, r) {
    return this.func(nn(e, null, n, r));
  }
  formatRange(e, n, r, i) {
    return this.func(nn(e, n, r, i));
  }
}
function H(t) {
  return typeof t == "object" && t ? new pd(t) : typeof t == "string" ? new Cd(t) : typeof t == "function" ? new Td(t) : null;
}
const Gi = {
  navLinkDayClick: g,
  navLinkWeekClick: g,
  duration: k,
  bootstrapFontAwesome: g,
  buttonIcons: g,
  customButtons: g,
  defaultAllDayEventDuration: k,
  defaultTimedEventDuration: k,
  nextDayThreshold: k,
  scrollTime: k,
  scrollTimeReset: Boolean,
  slotMinTime: k,
  slotMaxTime: k,
  dayPopoverFormat: H,
  slotDuration: k,
  snapDuration: k,
  headerToolbar: g,
  footerToolbar: g,
  defaultRangeSeparator: String,
  titleRangeSeparator: String,
  forceEventDuration: Boolean,
  dayHeaders: Boolean,
  dayHeaderFormat: H,
  dayHeaderClassNames: g,
  dayHeaderContent: g,
  dayHeaderDidMount: g,
  dayHeaderWillUnmount: g,
  dayCellClassNames: g,
  dayCellContent: g,
  dayCellDidMount: g,
  dayCellWillUnmount: g,
  initialView: String,
  aspectRatio: Number,
  weekends: Boolean,
  weekNumberCalculation: g,
  weekNumbers: Boolean,
  weekNumberClassNames: g,
  weekNumberContent: g,
  weekNumberDidMount: g,
  weekNumberWillUnmount: g,
  editable: Boolean,
  viewClassNames: g,
  viewDidMount: g,
  viewWillUnmount: g,
  nowIndicator: Boolean,
  nowIndicatorClassNames: g,
  nowIndicatorContent: g,
  nowIndicatorDidMount: g,
  nowIndicatorWillUnmount: g,
  showNonCurrentDates: Boolean,
  lazyFetching: Boolean,
  startParam: String,
  endParam: String,
  timeZoneParam: String,
  timeZone: String,
  locales: g,
  locale: g,
  themeSystem: String,
  dragRevertDuration: Number,
  dragScroll: Boolean,
  allDayMaintainDuration: Boolean,
  unselectAuto: Boolean,
  dropAccept: g,
  eventOrder: Iu,
  eventOrderStrict: Boolean,
  handleWindowResize: Boolean,
  windowResizeDelay: Number,
  longPressDelay: Number,
  eventDragMinDistance: Number,
  expandRows: Boolean,
  height: g,
  contentHeight: g,
  direction: String,
  weekNumberFormat: H,
  eventResizableFromStart: Boolean,
  displayEventTime: Boolean,
  displayEventEnd: Boolean,
  weekText: String,
  weekTextLong: String,
  progressiveEventRendering: Boolean,
  businessHours: g,
  initialDate: g,
  now: g,
  eventDataTransform: g,
  stickyHeaderDates: g,
  stickyFooterScrollbar: g,
  viewHeight: g,
  defaultAllDay: Boolean,
  eventSourceFailure: g,
  eventSourceSuccess: g,
  eventDisplay: String,
  eventStartEditable: Boolean,
  eventDurationEditable: Boolean,
  eventOverlap: g,
  eventConstraint: g,
  eventAllow: g,
  eventBackgroundColor: String,
  eventBorderColor: String,
  eventTextColor: String,
  eventColor: String,
  eventClassNames: g,
  eventContent: g,
  eventDidMount: g,
  eventWillUnmount: g,
  selectConstraint: g,
  selectOverlap: g,
  selectAllow: g,
  droppable: Boolean,
  unselectCancel: String,
  slotLabelFormat: g,
  slotLaneClassNames: g,
  slotLaneContent: g,
  slotLaneDidMount: g,
  slotLaneWillUnmount: g,
  slotLabelClassNames: g,
  slotLabelContent: g,
  slotLabelDidMount: g,
  slotLabelWillUnmount: g,
  dayMaxEvents: g,
  dayMaxEventRows: g,
  dayMinWidth: Number,
  slotLabelInterval: k,
  allDayText: String,
  allDayClassNames: g,
  allDayContent: g,
  allDayDidMount: g,
  allDayWillUnmount: g,
  slotMinWidth: Number,
  navLinks: Boolean,
  eventTimeFormat: H,
  rerenderDelay: Number,
  moreLinkText: g,
  moreLinkHint: g,
  selectMinDistance: Number,
  selectable: Boolean,
  selectLongPressDelay: Number,
  eventLongPressDelay: Number,
  selectMirror: Boolean,
  eventMaxStack: Number,
  eventMinHeight: Number,
  eventMinWidth: Number,
  eventShortHeight: Number,
  slotEventOverlap: Boolean,
  plugins: g,
  firstDay: Number,
  dayCount: Number,
  dateAlignment: String,
  dateIncrement: k,
  hiddenDays: g,
  monthMode: Boolean,
  fixedWeekCount: Boolean,
  validRange: g,
  visibleRange: g,
  titleFormat: g,
  eventInteractive: Boolean,
  noEventsText: String,
  viewHint: g,
  navLinkHint: g,
  closeHint: String,
  timeHint: String,
  eventHint: String,
  moreLinkClick: g,
  moreLinkClassNames: g,
  moreLinkContent: g,
  moreLinkDidMount: g,
  moreLinkWillUnmount: g,
  handleCustomRendering: g,
  customRenderingMetaMap: g,
  customRenderingReplacesEl: Boolean
}, gt = {
  eventDisplay: "auto",
  defaultRangeSeparator: " - ",
  titleRangeSeparator: " – ",
  defaultTimedEventDuration: "01:00:00",
  defaultAllDayEventDuration: { day: 1 },
  forceEventDuration: !1,
  nextDayThreshold: "00:00:00",
  dayHeaders: !0,
  initialView: "",
  aspectRatio: 1.35,
  headerToolbar: {
    start: "title",
    center: "",
    end: "today prev,next"
  },
  weekends: !0,
  weekNumbers: !1,
  weekNumberCalculation: "local",
  editable: !1,
  nowIndicator: !1,
  scrollTime: "06:00:00",
  scrollTimeReset: !0,
  slotMinTime: "00:00:00",
  slotMaxTime: "24:00:00",
  showNonCurrentDates: !0,
  lazyFetching: !0,
  startParam: "start",
  endParam: "end",
  timeZoneParam: "timeZone",
  timeZone: "local",
  locales: [],
  locale: "",
  themeSystem: "standard",
  dragRevertDuration: 500,
  dragScroll: !0,
  allDayMaintainDuration: !1,
  unselectAuto: !0,
  dropAccept: "*",
  eventOrder: "start,-duration,allDay,title",
  dayPopoverFormat: { month: "long", day: "numeric", year: "numeric" },
  handleWindowResize: !0,
  windowResizeDelay: 100,
  longPressDelay: 1e3,
  eventDragMinDistance: 5,
  expandRows: !1,
  navLinks: !1,
  selectable: !1,
  eventMinHeight: 15,
  eventMinWidth: 30,
  eventShortHeight: 30
}, qi = {
  datesSet: g,
  eventsSet: g,
  eventAdd: g,
  eventChange: g,
  eventRemove: g,
  windowResize: g,
  eventClick: g,
  eventMouseEnter: g,
  eventMouseLeave: g,
  select: g,
  unselect: g,
  loading: g,
  _unmount: g,
  _beforeprint: g,
  _afterprint: g,
  _noEventDrop: g,
  _noEventResize: g,
  _resize: g,
  _scrollRequest: g
}, Zi = {
  buttonText: g,
  buttonHints: g,
  views: g,
  plugins: g,
  initialEvents: g,
  events: g,
  eventSources: g
}, Ie = {
  headerToolbar: je,
  footerToolbar: je,
  buttonText: je,
  buttonHints: je,
  buttonIcons: je,
  dateIncrement: je
};
function je(t, e) {
  return typeof t == "object" && typeof e == "object" && t && e ? se(t, e) : t === e;
}
const _d = {
  type: String,
  component: g,
  buttonText: String,
  buttonTextKey: String,
  dateProfileGeneratorClass: g,
  usesMinMaxTime: Boolean,
  classNames: g,
  content: g,
  didMount: g,
  willUnmount: g
};
function In(t) {
  return Er(t, Ie);
}
function Cr(t, e) {
  let n = {}, r = {};
  for (let i in e)
    i in t && (n[i] = e[i](t[i]));
  for (let i in t)
    i in e || (r[i] = t[i]);
  return { refined: n, extra: r };
}
function g(t) {
  return t;
}
function Qi(t) {
  t();
  let e = S.debounceRendering, n = [];
  function r(i) {
    n.push(i);
  }
  for (S.debounceRendering = r, yt(f(Rd, {}), document.createElement("div")); n.length; )
    n.shift()();
  S.debounceRendering = e;
}
class Rd extends $ {
  render() {
    return f("div", {});
  }
  componentDidMount() {
    this.setState({});
  }
}
function Ba(t) {
  let e = su(t), n = e.Provider;
  return e.Provider = function() {
    let r = !this.getChildContext, i = n.apply(this, arguments);
    if (r) {
      let s = [];
      this.shouldComponentUpdate = (a) => {
        this.props.value !== a.value && s.forEach((o) => {
          o.context = a.value, o.forceUpdate();
        });
      }, this.sub = (a) => {
        s.push(a);
        let o = a.componentWillUnmount;
        a.componentWillUnmount = () => {
          s.splice(s.indexOf(a), 1), o && o.call(a);
        };
      };
    }
    return i;
  }, e;
}
class xd {
  constructor(e, n, r, i) {
    this.execFunc = e, this.emitter = n, this.scrollTime = r, this.scrollTimeReset = i, this.handleScrollRequest = (s) => {
      this.queuedRequest = Object.assign({}, this.queuedRequest || {}, s), this.drain();
    }, n.on("_scrollRequest", this.handleScrollRequest), this.fireInitialScroll();
  }
  detach() {
    this.emitter.off("_scrollRequest", this.handleScrollRequest);
  }
  update(e) {
    e && this.scrollTimeReset ? this.fireInitialScroll() : this.drain();
  }
  fireInitialScroll() {
    this.handleScrollRequest({
      time: this.scrollTime
    });
  }
  drain() {
    this.queuedRequest && this.execFunc(this.queuedRequest) && (this.queuedRequest = null);
  }
}
const ve = Ba({});
function kd(t, e, n, r, i, s, a, o, l, c, u, m, h) {
  return {
    dateEnv: i,
    options: n,
    pluginHooks: a,
    emitter: c,
    dispatch: o,
    getCurrentData: l,
    calendarApi: u,
    viewSpec: t,
    viewApi: e,
    dateProfileGenerator: r,
    theme: s,
    isRtl: n.direction === "rtl",
    addResizeHandler(d) {
      c.on("_resize", d);
    },
    removeResizeHandler(d) {
      c.off("_resize", d);
    },
    createScrollResponder(d) {
      return new xd(d, c, k(n.scrollTime), n.scrollTimeReset);
    },
    registerInteractiveComponent: m,
    unregisterInteractiveComponent: h
  };
}
class Ve extends $ {
  shouldComponentUpdate(e, n) {
    return this.debug && console.log(Oi(e, this.props), Oi(n, this.state)), !xn(this.props, e, this.propEquality) || !xn(this.state, n, this.stateEquality);
  }
  safeSetState(e) {
    xn(this.state, Object.assign(Object.assign({}, this.state), e), this.stateEquality) || this.setState(e);
  }
}
Ve.addPropsEquality = Id;
Ve.addStateEquality = Md;
Ve.contextType = ve;
Ve.prototype.propEquality = {};
Ve.prototype.stateEquality = {};
class N extends Ve {
}
N.contextType = ve;
function Id(t) {
  let e = Object.create(this.prototype.propEquality);
  Object.assign(e, t), this.prototype.propEquality = e;
}
function Md(t) {
  let e = Object.create(this.prototype.stateEquality);
  Object.assign(e, t), this.prototype.stateEquality = e;
}
function Be(t, e) {
  typeof t == "function" ? t(e) : t && (t.current = e);
}
class Tr extends N {
  constructor() {
    super(...arguments), this.id = Ue(), this.currentDomNodes = [], this.queuedDomNodes = [], this.handleEl = (e) => {
      this.props.elRef && Be(this.props.elRef, e);
    };
  }
  render() {
    const { props: e, context: n } = this, { options: r } = n, { generator: i, renderProps: s } = e, a = za(e);
    let o, l = [];
    if (La(e.generatorName, r))
      r.customRenderingReplacesEl && delete a.elRef;
    else {
      const c = typeof i == "function" ? i(s, f) : i;
      typeof c == "string" || ga(c) || Array.isArray(c) ? o = c : typeof c == "object" && ("html" in c ? a.dangerouslySetInnerHTML = { __html: c.html } : "domNodes" in c && (l = Array.prototype.slice.call(c.domNodes)));
    }
    return this.queuedDomNodes = l, f(e.elTag, a, o);
  }
  componentDidMount() {
    this.applyQueueudDomNodes(), this.triggerCustomRendering(!0);
  }
  componentDidUpdate() {
    this.applyQueueudDomNodes(), this.triggerCustomRendering(!0);
  }
  componentWillUnmount() {
    this.triggerCustomRendering(!1);
  }
  triggerCustomRendering(e) {
    const { props: n, context: r } = this, { handleCustomRendering: i, customRenderingMetaMap: s } = r.options;
    if (i) {
      const a = s == null ? void 0 : s[n.generatorName];
      a && i(Object.assign({ id: this.id, isActive: e, containerEl: this.base, reportNewContainerEl: this.handleEl, generatorMeta: a }, n));
    }
  }
  applyQueueudDomNodes() {
    const { queuedDomNodes: e, currentDomNodes: n } = this, r = this.base;
    if (!He(e, n)) {
      n.forEach(Su);
      for (let i of e)
        r.appendChild(i);
      this.currentDomNodes = e;
    }
  }
}
Tr.addPropsEquality({
  elClasses: He,
  elStyle: se,
  elAttrs: se,
  renderProps: se
});
function La(t, e) {
  var n;
  return Boolean(e.handleCustomRendering && t && ((n = e.customRenderingMetaMap) === null || n === void 0 ? void 0 : n[t]));
}
function za(t, e) {
  const n = Object.assign(Object.assign({}, t.elAttrs), { ref: t.elRef });
  return (t.elClasses || e) && (n.className = (t.elClasses || []).concat(e || []).concat(n.className || []).filter(Boolean).join(" ")), t.elStyle && (n.style = t.elStyle), n;
}
const Ua = Ba(0);
class j extends $ {
  constructor() {
    super(...arguments), this.InnerContent = Nd.bind(void 0, this);
  }
  render() {
    const { props: e } = this, n = Od(e.classNameGenerator, e.renderProps);
    if (e.children) {
      const r = za(e, n), i = e.children(this.InnerContent, e.renderProps, r);
      return e.elTag ? f(e.elTag, r, i) : i;
    } else
      return f(Tr, Object.assign(Object.assign({}, e), { elTag: e.elTag || "div", elClasses: (e.elClasses || []).concat(n), renderId: this.context }));
  }
  componentDidMount() {
    var e, n;
    (n = (e = this.props).didMount) === null || n === void 0 || n.call(e, Object.assign(Object.assign({}, this.props.renderProps), { el: this.base }));
  }
  componentWillUnmount() {
    var e, n;
    (n = (e = this.props).willUnmount) === null || n === void 0 || n.call(e, Object.assign(Object.assign({}, this.props.renderProps), { el: this.base }));
  }
}
j.contextType = Ua;
function Nd(t, e) {
  const n = t.props;
  return f(Tr, Object.assign({ renderProps: n.renderProps, generatorName: n.generatorName, generator: n.generator, renderId: t.context }, e));
}
function Od(t, e) {
  const n = typeof t == "function" ? t(e) : t || [];
  return typeof n == "string" ? [n] : n;
}
let bt = class extends N {
  render() {
    let { props: e, context: n } = this, { options: r } = n, i = { view: n.viewApi };
    return f(j, Object.assign({}, e, { elTag: e.elTag || "div", elClasses: [
      ...Va(e.viewSpec),
      ...e.elClasses || []
    ], renderProps: i, classNameGenerator: r.viewClassNames, generatorName: void 0, generator: void 0, didMount: r.viewDidMount, willUnmount: r.viewWillUnmount }), () => e.children);
  }
};
function Va(t) {
  return [
    `fc-${t.type}-view`,
    "fc-view"
  ];
}
function Fd(t, e) {
  let n = null, r = null;
  return t.start && (n = e.createMarker(t.start)), t.end && (r = e.createMarker(t.end)), !n && !r || n && r && r < n ? null : { start: n, end: r };
}
function Yi(t, e) {
  let n = [], { start: r } = e, i, s;
  for (t.sort(Hd), i = 0; i < t.length; i += 1)
    s = t[i], s.start > r && n.push({ start: r, end: s.start }), s.end > r && (r = s.end);
  return r < e.end && n.push({ start: r, end: e.end }), n;
}
function Hd(t, e) {
  return t.start.valueOf() - e.start.valueOf();
}
function Le(t, e) {
  let { start: n, end: r } = t, i = null;
  return e.start !== null && (n === null ? n = e.start : n = new Date(Math.max(n.valueOf(), e.start.valueOf()))), e.end != null && (r === null ? r = e.end : r = new Date(Math.min(r.valueOf(), e.end.valueOf()))), (n === null || r === null || n < r) && (i = { start: n, end: r }), i;
}
function Pd(t, e) {
  return (t.end === null || e.start === null || t.end > e.start) && (t.start === null || e.end === null || t.start < e.end);
}
function Ce(t, e) {
  return (t.start === null || e >= t.start) && (t.end === null || e < t.end);
}
function Bd(t, e) {
  return e.start != null && t < e.start ? e.start : e.end != null && t >= e.end ? new Date(e.end.valueOf() - 1) : t;
}
function Wa(t) {
  let e = Math.floor(Te(t.start, t.end)) || 1, n = F(t.start), r = W(n, e);
  return { start: n, end: r };
}
function _r(t, e = k(0)) {
  let n = null, r = null;
  if (t.end) {
    r = F(t.end);
    let i = t.end.valueOf() - r.valueOf();
    i && i >= ie(e) && (r = W(r, 1));
  }
  return t.start && (n = F(t.start), r && r <= n && (r = W(n, 1))), { start: n, end: r };
}
function Ld(t) {
  let e = _r(t);
  return Te(e.start, e.end) > 1;
}
function Ot(t, e, n, r) {
  return r === "year" ? k(n.diffWholeYears(t, e), "year") : r === "month" ? k(n.diffWholeMonths(t, e), "month") : Gu(t, e);
}
function zd(t, e) {
  switch (e.type) {
    case "CHANGE_DATE":
      return e.dateMarker;
    default:
      return t;
  }
}
function Ud(t, e) {
  let n = t.initialDate;
  return n != null ? e.createMarker(n) : Tt(t.now, e);
}
function Tt(t, e) {
  return typeof t == "function" && (t = t()), t == null ? e.createNowMarker() : e.createMarker(t);
}
class ja {
  constructor(e) {
    this.props = e, this.nowDate = Tt(e.nowInput, e.dateEnv), this.initHiddenDays();
  }
  buildPrev(e, n, r) {
    let { dateEnv: i } = this.props, s = i.subtract(
      i.startOf(n, e.currentRangeUnit),
      e.dateIncrement
    );
    return this.build(s, -1, r);
  }
  buildNext(e, n, r) {
    let { dateEnv: i } = this.props, s = i.add(
      i.startOf(n, e.currentRangeUnit),
      e.dateIncrement
    );
    return this.build(s, 1, r);
  }
  build(e, n, r = !0) {
    let { props: i } = this, s, a, o, l, c, u;
    return s = this.buildValidRange(), s = this.trimHiddenDays(s), r && (e = Bd(e, s)), a = this.buildCurrentRangeInfo(e, n), o = /^(year|month|week|day)$/.test(a.unit), l = this.buildRenderRange(this.trimHiddenDays(a.range), a.unit, o), l = this.trimHiddenDays(l), c = l, i.showNonCurrentDates || (c = Le(c, a.range)), c = this.adjustActiveRange(c), c = Le(c, s), u = Pd(a.range, s), {
      validRange: s,
      currentRange: a.range,
      currentRangeUnit: a.unit,
      isRangeAllDay: o,
      activeRange: c,
      renderRange: l,
      slotMinTime: i.slotMinTime,
      slotMaxTime: i.slotMaxTime,
      isValid: u,
      dateIncrement: this.buildDateIncrement(a.duration)
    };
  }
  buildValidRange() {
    let e = this.props.validRangeInput, n = typeof e == "function" ? e.call(this.props.calendarApi, this.nowDate) : e;
    return this.refineRange(n) || { start: null, end: null };
  }
  buildCurrentRangeInfo(e, n) {
    let { props: r } = this, i = null, s = null, a = null, o;
    return r.duration ? (i = r.duration, s = r.durationUnit, a = this.buildRangeFromDuration(e, n, i, s)) : (o = this.props.dayCount) ? (s = "day", a = this.buildRangeFromDayCount(e, n, o)) : (a = this.buildCustomVisibleRange(e)) ? s = r.dateEnv.greatestWholeUnit(a.start, a.end).unit : (i = this.getFallbackDuration(), s = Kn(i).unit, a = this.buildRangeFromDuration(e, n, i, s)), { duration: i, unit: s, range: a };
  }
  getFallbackDuration() {
    return k({ day: 1 });
  }
  adjustActiveRange(e) {
    let { dateEnv: n, usesMinMaxTime: r, slotMinTime: i, slotMaxTime: s } = this.props, { start: a, end: o } = e;
    return r && (Qe(i) < 0 && (a = F(a), a = n.add(a, i)), Qe(s) > 1 && (o = F(o), o = W(o, -1), o = n.add(o, s))), { start: a, end: o };
  }
  buildRangeFromDuration(e, n, r, i) {
    let { dateEnv: s, dateAlignment: a } = this.props, o, l, c;
    if (!a) {
      let { dateIncrement: m } = this.props;
      m && ie(m) < ie(r) ? a = Kn(m).unit : a = i;
    }
    Qe(r) <= 1 && this.isHiddenDay(o) && (o = this.skipHiddenDays(o, n), o = F(o));
    function u() {
      o = s.startOf(e, a), l = s.add(o, r), c = { start: o, end: l };
    }
    return u(), this.trimHiddenDays(c) || (e = this.skipHiddenDays(e, n), u()), c;
  }
  buildRangeFromDayCount(e, n, r) {
    let { dateEnv: i, dateAlignment: s } = this.props, a = 0, o = e, l;
    s && (o = i.startOf(o, s)), o = F(o), o = this.skipHiddenDays(o, n), l = o;
    do
      l = W(l, 1), this.isHiddenDay(l) || (a += 1);
    while (a < r);
    return { start: o, end: l };
  }
  buildCustomVisibleRange(e) {
    let { props: n } = this, r = n.visibleRangeInput, i = typeof r == "function" ? r.call(n.calendarApi, n.dateEnv.toDate(e)) : r, s = this.refineRange(i);
    return s && (s.start == null || s.end == null) ? null : s;
  }
  buildRenderRange(e, n, r) {
    return e;
  }
  buildDateIncrement(e) {
    let { dateIncrement: n } = this.props, r;
    return n || ((r = this.props.dateAlignment) ? k(1, r) : e || k({ days: 1 }));
  }
  refineRange(e) {
    if (e) {
      let n = Fd(e, this.props.dateEnv);
      return n && (n = _r(n)), n;
    }
    return null;
  }
  initHiddenDays() {
    let e = this.props.hiddenDays || [], n = [], r = 0, i;
    for (this.props.weekends === !1 && e.push(0, 6), i = 0; i < 7; i += 1)
      (n[i] = e.indexOf(i) !== -1) || (r += 1);
    if (!r)
      throw new Error("invalid hiddenDays");
    this.isHiddenDayHash = n;
  }
  trimHiddenDays(e) {
    let { start: n, end: r } = e;
    return n && (n = this.skipHiddenDays(n)), r && (r = this.skipHiddenDays(r, -1, !0)), n == null || r == null || n < r ? { start: n, end: r } : null;
  }
  isHiddenDay(e) {
    return e instanceof Date && (e = e.getUTCDay()), this.isHiddenDayHash[e];
  }
  skipHiddenDays(e, n = 1, r = !1) {
    for (; this.isHiddenDayHash[(e.getUTCDay() + (r ? n : 0) + 7) % 7]; )
      e = W(e, n);
    return e;
  }
}
function Rr(t, e, n, r) {
  return {
    instanceId: Ue(),
    defId: t,
    range: e,
    forcedStartTzo: n ?? null,
    forcedEndTzo: r ?? null
  };
}
function Vd(t, e, n, r) {
  for (let i = 0; i < r.length; i += 1) {
    let s = r[i].parse(t, n);
    if (s) {
      let { allDay: a } = t;
      return a == null && (a = e, a == null && (a = s.allDayGuess, a == null && (a = !1))), {
        allDay: a,
        duration: s.duration,
        typeData: s.typeData,
        typeId: i
      };
    }
  }
  return null;
}
function mn(t, e, n) {
  let { dateEnv: r, pluginHooks: i, options: s } = n, { defs: a, instances: o } = t;
  o = Je(o, (l) => !a[l.defId].recurringDef);
  for (let l in a) {
    let c = a[l];
    if (c.recurringDef) {
      let { duration: u } = c.recurringDef;
      u || (u = c.allDay ? s.defaultAllDayEventDuration : s.defaultTimedEventDuration);
      let m = Wd(c, u, e, r, i.recurringTypes);
      for (let h of m) {
        let d = Rr(l, {
          start: h,
          end: r.add(h, u)
        });
        o[d.instanceId] = d;
      }
    }
  }
  return { defs: a, instances: o };
}
function Wd(t, e, n, r, i) {
  let a = i[t.recurringDef.typeId].expand(t.recurringDef.typeData, {
    start: r.subtract(n.start, e),
    end: n.end
  }, r);
  return t.allDay && (a = a.map(F)), a;
}
const jt = {
  id: String,
  groupId: String,
  title: String,
  url: String,
  interactive: Boolean
}, Ga = {
  start: g,
  end: g,
  date: g,
  allDay: Boolean
}, jd = Object.assign(Object.assign(Object.assign({}, jt), Ga), { extendedProps: g });
function qa(t, e, n, r, i = xr(n)) {
  let { refined: s, extra: a } = Za(t, n, i), o = qd(e, n), l = Vd(s, o, n.dateEnv, n.pluginHooks.recurringTypes);
  if (l) {
    let u = Xn(s, a, e ? e.sourceId : "", l.allDay, Boolean(l.duration), n);
    return u.recurringDef = {
      typeId: l.typeId,
      typeData: l.typeData,
      duration: l.duration
    }, { def: u, instance: null };
  }
  let c = Gd(s, o, n, r);
  if (c) {
    let u = Xn(s, a, e ? e.sourceId : "", c.allDay, c.hasEnd, n), m = Rr(u.defId, c.range, c.forcedStartTzo, c.forcedEndTzo);
    return { def: u, instance: m };
  }
  return null;
}
function Za(t, e, n = xr(e)) {
  return Cr(t, n);
}
function xr(t) {
  return Object.assign(Object.assign(Object.assign({}, sn), jd), t.pluginHooks.eventRefiners);
}
function Xn(t, e, n, r, i, s) {
  let a = {
    title: t.title || "",
    groupId: t.groupId || "",
    publicId: t.id || "",
    url: t.url || "",
    recurringDef: null,
    defId: Ue(),
    sourceId: n,
    allDay: r,
    hasEnd: i,
    interactive: t.interactive,
    ui: an(t, s),
    extendedProps: Object.assign(Object.assign({}, t.extendedProps || {}), e)
  };
  for (let o of s.pluginHooks.eventDefMemberAdders)
    Object.assign(a, o(t));
  return Object.freeze(a.ui.classNames), Object.freeze(a.extendedProps), a;
}
function Gd(t, e, n, r) {
  let { allDay: i } = t, s, a = null, o = !1, l, c = null, u = t.start != null ? t.start : t.date;
  if (s = n.dateEnv.createMarkerMeta(u), s)
    a = s.marker;
  else if (!r)
    return null;
  return t.end != null && (l = n.dateEnv.createMarkerMeta(t.end)), i == null && (e != null ? i = e : i = (!s || s.isTimeUnspecified) && (!l || l.isTimeUnspecified)), i && a && (a = F(a)), l && (c = l.marker, i && (c = F(c)), a && c <= a && (c = null)), c ? o = !0 : r || (o = n.options.forceEventDuration || !1, c = n.dateEnv.add(a, i ? n.options.defaultAllDayEventDuration : n.options.defaultTimedEventDuration)), {
    allDay: i,
    hasEnd: o,
    range: { start: a, end: c },
    forcedStartTzo: s ? s.forcedTzo : null,
    forcedEndTzo: l ? l.forcedTzo : null
  };
}
function qd(t, e) {
  let n = null;
  return t && (n = t.defaultAllDay), n == null && (n = e.options.defaultAllDay), n;
}
function rn(t, e, n, r) {
  let i = pe(), s = xr(n);
  for (let a of t) {
    let o = qa(a, e, n, r, s);
    o && er(o, i);
  }
  return i;
}
function er(t, e = pe()) {
  return e.defs[t.def.defId] = t.def, t.instance && (e.instances[t.instance.instanceId] = t.instance), e;
}
function Zd(t, e) {
  let n = t.instances[e];
  if (n) {
    let r = t.defs[n.defId], i = Ir(t, (s) => Qd(r, s));
    return i.defs[r.defId] = r, i.instances[n.instanceId] = n, i;
  }
  return pe();
}
function Qd(t, e) {
  return Boolean(t.groupId && t.groupId === e.groupId);
}
function pe() {
  return { defs: {}, instances: {} };
}
function kr(t, e) {
  return {
    defs: Object.assign(Object.assign({}, t.defs), e.defs),
    instances: Object.assign(Object.assign({}, t.instances), e.instances)
  };
}
function Ir(t, e) {
  let n = Je(t.defs, e), r = Je(t.instances, (i) => n[i.defId]);
  return { defs: n, instances: r };
}
function Yd(t, e) {
  let { defs: n, instances: r } = t, i = {}, s = {};
  for (let a in n)
    e.defs[a] || (i[a] = n[a]);
  for (let a in r)
    !e.instances[a] && i[r[a].defId] && (s[a] = r[a]);
  return {
    defs: i,
    instances: s
  };
}
function $d(t, e) {
  return Array.isArray(t) ? rn(t, null, e, !0) : typeof t == "object" && t ? rn([t], null, e, !0) : t != null ? String(t) : null;
}
function $i(t) {
  return Array.isArray(t) ? t : typeof t == "string" ? t.split(/\s+/) : [];
}
const sn = {
  display: String,
  editable: Boolean,
  startEditable: Boolean,
  durationEditable: Boolean,
  constraint: g,
  overlap: g,
  allow: g,
  className: $i,
  classNames: $i,
  color: String,
  backgroundColor: String,
  borderColor: String,
  textColor: String
}, Jd = {
  display: null,
  startEditable: null,
  durationEditable: null,
  constraints: [],
  overlap: null,
  allows: [],
  backgroundColor: "",
  borderColor: "",
  textColor: "",
  classNames: []
};
function an(t, e) {
  let n = $d(t.constraint, e);
  return {
    display: t.display || null,
    startEditable: t.startEditable != null ? t.startEditable : t.editable,
    durationEditable: t.durationEditable != null ? t.durationEditable : t.editable,
    constraints: n != null ? [n] : [],
    overlap: t.overlap != null ? t.overlap : null,
    allows: t.allow != null ? [t.allow] : [],
    backgroundColor: t.backgroundColor || t.color || "",
    borderColor: t.borderColor || t.color || "",
    textColor: t.textColor || "",
    classNames: (t.className || []).concat(t.classNames || [])
  };
}
function Qa(t) {
  return t.reduce(Kd, Jd);
}
function Kd(t, e) {
  return {
    display: e.display != null ? e.display : t.display,
    startEditable: e.startEditable != null ? e.startEditable : t.startEditable,
    durationEditable: e.durationEditable != null ? e.durationEditable : t.durationEditable,
    constraints: t.constraints.concat(e.constraints),
    overlap: typeof e.overlap == "boolean" ? e.overlap : t.overlap,
    allows: t.allows.concat(e.allows),
    backgroundColor: e.backgroundColor || t.backgroundColor,
    borderColor: e.borderColor || t.borderColor,
    textColor: e.textColor || t.textColor,
    classNames: t.classNames.concat(e.classNames)
  };
}
const Xd = {
  id: String,
  defaultAllDay: Boolean,
  url: String,
  format: String,
  events: g,
  eventDataTransform: g,
  success: g,
  failure: g
};
function Ya(t, e, n = $a(e)) {
  let r;
  if (typeof t == "string" ? r = { url: t } : typeof t == "function" || Array.isArray(t) ? r = { events: t } : typeof t == "object" && t && (r = t), r) {
    let { refined: i, extra: s } = Cr(r, n), a = ef(i, e);
    if (a)
      return {
        _raw: t,
        isFetching: !1,
        latestFetchId: "",
        fetchRange: null,
        defaultAllDay: i.defaultAllDay,
        eventDataTransform: i.eventDataTransform,
        success: i.success,
        failure: i.failure,
        publicId: i.id || "",
        sourceId: Ue(),
        sourceDefId: a.sourceDefId,
        meta: a.meta,
        ui: an(i, e),
        extendedProps: s
      };
  }
  return null;
}
function $a(t) {
  return Object.assign(Object.assign(Object.assign({}, sn), Xd), t.pluginHooks.eventSourceRefiners);
}
function ef(t, e) {
  let n = e.pluginHooks.eventSourceDefs;
  for (let r = n.length - 1; r >= 0; r -= 1) {
    let s = n[r].parseMeta(t);
    if (s)
      return { sourceDefId: r, meta: s };
  }
  return null;
}
function tf(t, e, n) {
  let r = e ? e.activeRange : null;
  return Ka({}, cf(t, n), r, n);
}
function nf(t, e, n, r) {
  let i = n ? n.activeRange : null;
  switch (e.type) {
    case "ADD_EVENT_SOURCES":
      return Ka(t, e.sources, i, r);
    case "REMOVE_EVENT_SOURCE":
      return sf(t, e.sourceId);
    case "PREV":
    case "NEXT":
    case "CHANGE_DATE":
    case "CHANGE_VIEW_TYPE":
      return n ? Xa(t, i, r) : t;
    case "FETCH_EVENT_SOURCES":
      return Mr(t, e.sourceIds ? ka(e.sourceIds) : eo(t, r), i, e.isRefetch || !1, r);
    case "RECEIVE_EVENTS":
    case "RECEIVE_EVENT_ERROR":
      return lf(t, e.sourceId, e.fetchId, e.fetchRange);
    case "REMOVE_ALL_EVENT_SOURCES":
      return {};
    default:
      return t;
  }
}
function rf(t, e, n) {
  let r = e ? e.activeRange : null;
  return Mr(t, eo(t, n), r, !0, n);
}
function Ja(t) {
  for (let e in t)
    if (t[e].isFetching)
      return !0;
  return !1;
}
function Ka(t, e, n, r) {
  let i = {};
  for (let s of e)
    i[s.sourceId] = s;
  return n && (i = Xa(i, n, r)), Object.assign(Object.assign({}, t), i);
}
function sf(t, e) {
  return Je(t, (n) => n.sourceId !== e);
}
function Xa(t, e, n) {
  return Mr(t, Je(t, (r) => af(r, e, n)), e, !1, n);
}
function af(t, e, n) {
  return to(t, n) ? !n.options.lazyFetching || !t.fetchRange || t.isFetching || e.start < t.fetchRange.start || e.end > t.fetchRange.end : !t.latestFetchId;
}
function Mr(t, e, n, r, i) {
  let s = {};
  for (let a in t) {
    let o = t[a];
    e[a] ? s[a] = of(o, n, r, i) : s[a] = o;
  }
  return s;
}
function of(t, e, n, r) {
  let { options: i, calendarApi: s } = r, a = r.pluginHooks.eventSourceDefs[t.sourceDefId], o = Ue();
  return a.fetch({
    eventSource: t,
    range: e,
    isRefetch: n,
    context: r
  }, (l) => {
    let { rawEvents: c } = l;
    i.eventSourceSuccess && (c = i.eventSourceSuccess.call(s, c, l.response) || c), t.success && (c = t.success.call(s, c, l.response) || c), r.dispatch({
      type: "RECEIVE_EVENTS",
      sourceId: t.sourceId,
      fetchId: o,
      fetchRange: e,
      rawEvents: c
    });
  }, (l) => {
    let c = !1;
    i.eventSourceFailure && (i.eventSourceFailure.call(s, l), c = !0), t.failure && (t.failure(l), c = !0), c || console.warn(l.message, l), r.dispatch({
      type: "RECEIVE_EVENT_ERROR",
      sourceId: t.sourceId,
      fetchId: o,
      fetchRange: e,
      error: l
    });
  }), Object.assign(Object.assign({}, t), { isFetching: !0, latestFetchId: o });
}
function lf(t, e, n, r) {
  let i = t[e];
  return i && n === i.latestFetchId ? Object.assign(Object.assign({}, t), { [e]: Object.assign(Object.assign({}, i), { isFetching: !1, fetchRange: r }) }) : t;
}
function eo(t, e) {
  return Je(t, (n) => to(n, e));
}
function cf(t, e) {
  let n = $a(e), r = [].concat(t.eventSources || []), i = [];
  t.initialEvents && r.unshift(t.initialEvents), t.events && r.unshift(t.events);
  for (let s of r) {
    let a = Ya(s, e, n);
    a && i.push(a);
  }
  return i;
}
function to(t, e) {
  return !e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange;
}
function uf(t, e, n, r, i) {
  switch (e.type) {
    case "RECEIVE_EVENTS":
      return df(t, n[e.sourceId], e.fetchId, e.fetchRange, e.rawEvents, i);
    case "ADD_EVENTS":
      return hf(
        t,
        e.eventStore,
        r ? r.activeRange : null,
        i
      );
    case "RESET_EVENTS":
      return e.eventStore;
    case "MERGE_EVENTS":
      return kr(t, e.eventStore);
    case "PREV":
    case "NEXT":
    case "CHANGE_DATE":
    case "CHANGE_VIEW_TYPE":
      return r ? mn(t, r.activeRange, i) : t;
    case "REMOVE_EVENTS":
      return Yd(t, e.eventStore);
    case "REMOVE_EVENT_SOURCE":
      return no(t, e.sourceId);
    case "REMOVE_ALL_EVENT_SOURCES":
      return Ir(t, (s) => !s.sourceId);
    case "REMOVE_ALL_EVENTS":
      return pe();
    default:
      return t;
  }
}
function df(t, e, n, r, i, s) {
  if (e && n === e.latestFetchId) {
    let a = rn(ff(i, e, s), e, s);
    return r && (a = mn(a, r, s)), kr(no(t, e.sourceId), a);
  }
  return t;
}
function ff(t, e, n) {
  let r = n.options.eventDataTransform, i = e ? e.eventDataTransform : null;
  return i && (t = Ji(t, i)), r && (t = Ji(t, r)), t;
}
function Ji(t, e) {
  let n;
  if (!e)
    n = t;
  else {
    n = [];
    for (let r of t) {
      let i = e(r);
      i ? n.push(i) : i == null && n.push(r);
    }
  }
  return n;
}
function hf(t, e, n, r) {
  return n && (e = mn(e, n, r)), kr(t, e);
}
function mf(t, e, n) {
  let { defs: r } = t, i = Fe(t.instances, (s) => {
    let a = r[s.defId];
    return a.allDay || a.recurringDef ? s : Object.assign(Object.assign({}, s), { range: {
      start: n.createMarker(e.toDate(s.range.start, s.forcedStartTzo)),
      end: n.createMarker(e.toDate(s.range.end, s.forcedEndTzo))
    }, forcedStartTzo: n.canComputeOffset ? null : s.forcedStartTzo, forcedEndTzo: n.canComputeOffset ? null : s.forcedEndTzo });
  });
  return { defs: r, instances: i };
}
function no(t, e) {
  return Ir(t, (n) => n.sourceId !== e);
}
class gf {
  constructor() {
    this.handlers = {}, this.thisContext = null;
  }
  setThisContext(e) {
    this.thisContext = e;
  }
  setOptions(e) {
    this.options = e;
  }
  on(e, n) {
    pf(this.handlers, e, n);
  }
  off(e, n) {
    vf(this.handlers, e, n);
  }
  trigger(e, ...n) {
    let r = this.handlers[e] || [], i = this.options && this.options[e], s = [].concat(i || [], r);
    for (let a of s)
      a.apply(this.thisContext, n);
  }
  hasHandlers(e) {
    return Boolean(this.handlers[e] && this.handlers[e].length || this.options && this.options[e]);
  }
}
function pf(t, e, n) {
  (t[e] || (t[e] = [])).push(n);
}
function vf(t, e, n) {
  n ? t[e] && (t[e] = t[e].filter((r) => r !== n)) : delete t[e];
}
const yf = {
  startTime: "09:00",
  endTime: "17:00",
  daysOfWeek: [1, 2, 3, 4, 5],
  display: "inverse-background",
  classNames: "fc-non-business",
  groupId: "_businessHours"
};
function bf(t, e) {
  return rn(wf(t), null, e);
}
function wf(t) {
  let e;
  return t === !0 ? e = [{}] : Array.isArray(t) ? e = t.filter((n) => n.daysOfWeek) : typeof t == "object" && t ? e = [t] : e = [], e = e.map((n) => Object.assign(Object.assign({}, yf), n)), e;
}
let Ef = {
  ignoreRange: !0,
  parseMeta(t) {
    return Array.isArray(t.events) ? t.events : null;
  },
  fetch(t, e) {
    e({
      rawEvents: t.eventSource.meta
    });
  }
};
const Af = ce({
  name: "array-event-source",
  eventSourceDefs: [Ef]
});
function Sf(t, e, n) {
  n.emitter.trigger("select", Object.assign(Object.assign({}, Cf(t, n)), { jsEvent: e ? e.origEvent : null, view: n.viewApi || n.calendarApi.view }));
}
function Df(t, e) {
  e.emitter.trigger("unselect", {
    jsEvent: t ? t.origEvent : null,
    view: e.viewApi || e.calendarApi.view
  });
}
function Cf(t, e) {
  let n = {};
  for (let r of e.pluginHooks.dateSpanTransforms)
    Object.assign(n, r(t, e));
  return Object.assign(n, Lf(t, e.dateEnv)), n;
}
function Ki(t, e, n) {
  let { dateEnv: r, options: i } = n, s = e;
  return t ? (s = F(s), s = r.add(s, i.defaultAllDayEventDuration)) : s = r.add(s, i.defaultTimedEventDuration), s;
}
function Tf(t, e, n, r) {
  let i = io(t.defs, e), s = pe();
  for (let a in t.defs) {
    let o = t.defs[a];
    s.defs[a] = _f(o, i[a], n, r);
  }
  for (let a in t.instances) {
    let o = t.instances[a], l = s.defs[o.defId];
    s.instances[a] = Rf(o, l, i[o.defId], n, r);
  }
  return s;
}
function _f(t, e, n, r) {
  let i = n.standardProps || {};
  i.hasEnd == null && e.durationEditable && (n.startDelta || n.endDelta) && (i.hasEnd = !0);
  let s = Object.assign(Object.assign(Object.assign({}, t), i), { ui: Object.assign(Object.assign({}, t.ui), i.ui) });
  n.extendedProps && (s.extendedProps = Object.assign(Object.assign({}, s.extendedProps), n.extendedProps));
  for (let a of r.pluginHooks.eventDefMutationAppliers)
    a(s, n, r);
  return !s.hasEnd && r.options.forceEventDuration && (s.hasEnd = !0), s;
}
function Rf(t, e, n, r, i) {
  let { dateEnv: s } = i, a = r.standardProps && r.standardProps.allDay === !0, o = r.standardProps && r.standardProps.hasEnd === !1, l = Object.assign({}, t);
  return a && (l.range = Wa(l.range)), r.datesDelta && n.startEditable && (l.range = {
    start: s.add(l.range.start, r.datesDelta),
    end: s.add(l.range.end, r.datesDelta)
  }), r.startDelta && n.durationEditable && (l.range = {
    start: s.add(l.range.start, r.startDelta),
    end: l.range.end
  }), r.endDelta && n.durationEditable && (l.range = {
    start: l.range.start,
    end: s.add(l.range.end, r.endDelta)
  }), o && (l.range = {
    start: l.range.start,
    end: Ki(e.allDay, l.range.start, i)
  }), e.allDay && (l.range = {
    start: F(l.range.start),
    end: F(l.range.end)
  }), l.range.end < l.range.start && (l.range.end = Ki(e.allDay, l.range.start, i)), l;
}
class Ge {
  constructor(e, n) {
    this.context = e, this.internalEventSource = n;
  }
  remove() {
    this.context.dispatch({
      type: "REMOVE_EVENT_SOURCE",
      sourceId: this.internalEventSource.sourceId
    });
  }
  refetch() {
    this.context.dispatch({
      type: "FETCH_EVENT_SOURCES",
      sourceIds: [this.internalEventSource.sourceId],
      isRefetch: !0
    });
  }
  get id() {
    return this.internalEventSource.publicId;
  }
  get url() {
    return this.internalEventSource.meta.url;
  }
  get format() {
    return this.internalEventSource.meta.format;
  }
}
class ee {
  constructor(e, n, r) {
    this._context = e, this._def = n, this._instance = r || null;
  }
  setProp(e, n) {
    if (e in Ga)
      console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");
    else if (e === "id")
      n = jt[e](n), this.mutate({
        standardProps: { publicId: n }
      });
    else if (e in jt)
      n = jt[e](n), this.mutate({
        standardProps: { [e]: n }
      });
    else if (e in sn) {
      let r = sn[e](n);
      e === "color" ? r = { backgroundColor: n, borderColor: n } : e === "editable" ? r = { startEditable: n, durationEditable: n } : r = { [e]: n }, this.mutate({
        standardProps: { ui: r }
      });
    } else
      console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`);
  }
  setExtendedProp(e, n) {
    this.mutate({
      extendedProps: { [e]: n }
    });
  }
  setStart(e, n = {}) {
    let { dateEnv: r } = this._context, i = r.createMarker(e);
    if (i && this._instance) {
      let s = this._instance.range, a = Ot(s.start, i, r, n.granularity);
      n.maintainDuration ? this.mutate({ datesDelta: a }) : this.mutate({ startDelta: a });
    }
  }
  setEnd(e, n = {}) {
    let { dateEnv: r } = this._context, i;
    if (!(e != null && (i = r.createMarker(e), !i)) && this._instance)
      if (i) {
        let s = Ot(this._instance.range.end, i, r, n.granularity);
        this.mutate({ endDelta: s });
      } else
        this.mutate({ standardProps: { hasEnd: !1 } });
  }
  setDates(e, n, r = {}) {
    let { dateEnv: i } = this._context, s = { allDay: r.allDay }, a = i.createMarker(e), o;
    if (!!a && !(n != null && (o = i.createMarker(n), !o)) && this._instance) {
      let l = this._instance.range;
      r.allDay === !0 && (l = Wa(l));
      let c = Ot(l.start, a, i, r.granularity);
      if (o) {
        let u = Ot(l.end, o, i, r.granularity);
        rd(c, u) ? this.mutate({ datesDelta: c, standardProps: s }) : this.mutate({ startDelta: c, endDelta: u, standardProps: s });
      } else
        s.hasEnd = !1, this.mutate({ datesDelta: c, standardProps: s });
    }
  }
  moveStart(e) {
    let n = k(e);
    n && this.mutate({ startDelta: n });
  }
  moveEnd(e) {
    let n = k(e);
    n && this.mutate({ endDelta: n });
  }
  moveDates(e) {
    let n = k(e);
    n && this.mutate({ datesDelta: n });
  }
  setAllDay(e, n = {}) {
    let r = { allDay: e }, { maintainDuration: i } = n;
    i == null && (i = this._context.options.allDayMaintainDuration), this._def.allDay !== e && (r.hasEnd = i), this.mutate({ standardProps: r });
  }
  formatRange(e) {
    let { dateEnv: n } = this._context, r = this._instance, i = H(e);
    return this._def.hasEnd ? n.formatRange(r.range.start, r.range.end, i, {
      forcedStartTzo: r.forcedStartTzo,
      forcedEndTzo: r.forcedEndTzo
    }) : n.format(r.range.start, i, {
      forcedTzo: r.forcedStartTzo
    });
  }
  mutate(e) {
    let n = this._instance;
    if (n) {
      let r = this._def, i = this._context, { eventStore: s } = i.getCurrentData(), a = Zd(s, n.instanceId);
      a = Tf(a, {
        "": {
          display: "",
          startEditable: !0,
          durationEditable: !0,
          constraints: [],
          overlap: null,
          allows: [],
          backgroundColor: "",
          borderColor: "",
          textColor: "",
          classNames: []
        }
      }, e, i);
      let l = new ee(i, r, n);
      this._def = a.defs[r.defId], this._instance = a.instances[n.instanceId], i.dispatch({
        type: "MERGE_EVENTS",
        eventStore: a
      }), i.emitter.trigger("eventChange", {
        oldEvent: l,
        event: this,
        relatedEvents: Nr(a, i, n),
        revert() {
          i.dispatch({
            type: "RESET_EVENTS",
            eventStore: s
          });
        }
      });
    }
  }
  remove() {
    let e = this._context, n = ro(this);
    e.dispatch({
      type: "REMOVE_EVENTS",
      eventStore: n
    }), e.emitter.trigger("eventRemove", {
      event: this,
      relatedEvents: [],
      revert() {
        e.dispatch({
          type: "MERGE_EVENTS",
          eventStore: n
        });
      }
    });
  }
  get source() {
    let { sourceId: e } = this._def;
    return e ? new Ge(this._context, this._context.getCurrentData().eventSources[e]) : null;
  }
  get start() {
    return this._instance ? this._context.dateEnv.toDate(this._instance.range.start) : null;
  }
  get end() {
    return this._instance && this._def.hasEnd ? this._context.dateEnv.toDate(this._instance.range.end) : null;
  }
  get startStr() {
    let e = this._instance;
    return e ? this._context.dateEnv.formatIso(e.range.start, {
      omitTime: this._def.allDay,
      forcedTzo: e.forcedStartTzo
    }) : "";
  }
  get endStr() {
    let e = this._instance;
    return e && this._def.hasEnd ? this._context.dateEnv.formatIso(e.range.end, {
      omitTime: this._def.allDay,
      forcedTzo: e.forcedEndTzo
    }) : "";
  }
  get id() {
    return this._def.publicId;
  }
  get groupId() {
    return this._def.groupId;
  }
  get allDay() {
    return this._def.allDay;
  }
  get title() {
    return this._def.title;
  }
  get url() {
    return this._def.url;
  }
  get display() {
    return this._def.ui.display || "auto";
  }
  get startEditable() {
    return this._def.ui.startEditable;
  }
  get durationEditable() {
    return this._def.ui.durationEditable;
  }
  get constraint() {
    return this._def.ui.constraints[0] || null;
  }
  get overlap() {
    return this._def.ui.overlap;
  }
  get allow() {
    return this._def.ui.allows[0] || null;
  }
  get backgroundColor() {
    return this._def.ui.backgroundColor;
  }
  get borderColor() {
    return this._def.ui.borderColor;
  }
  get textColor() {
    return this._def.ui.textColor;
  }
  get classNames() {
    return this._def.ui.classNames;
  }
  get extendedProps() {
    return this._def.extendedProps;
  }
  toPlainObject(e = {}) {
    let n = this._def, { ui: r } = n, { startStr: i, endStr: s } = this, a = {};
    return n.title && (a.title = n.title), i && (a.start = i), s && (a.end = s), n.publicId && (a.id = n.publicId), n.groupId && (a.groupId = n.groupId), n.url && (a.url = n.url), r.display && r.display !== "auto" && (a.display = r.display), e.collapseColor && r.backgroundColor && r.backgroundColor === r.borderColor ? a.color = r.backgroundColor : (r.backgroundColor && (a.backgroundColor = r.backgroundColor), r.borderColor && (a.borderColor = r.borderColor)), r.textColor && (a.textColor = r.textColor), r.classNames.length && (a.classNames = r.classNames), Object.keys(n.extendedProps).length && (e.collapseExtendedProps ? Object.assign(a, n.extendedProps) : a.extendedProps = n.extendedProps), a;
  }
  toJSON() {
    return this.toPlainObject();
  }
}
function ro(t) {
  let e = t._def, n = t._instance;
  return {
    defs: { [e.defId]: e },
    instances: n ? { [n.instanceId]: n } : {}
  };
}
function Nr(t, e, n) {
  let { defs: r, instances: i } = t, s = [], a = n ? n.instanceId : "";
  for (let o in i) {
    let l = i[o], c = r[l.defId];
    l.instanceId !== a && s.push(new ee(e, c, l));
  }
  return s;
}
function tr(t, e, n, r) {
  let i = {}, s = {}, a = {}, o = [], l = [], c = io(t.defs, e);
  for (let u in t.defs) {
    let m = t.defs[u];
    c[m.defId].display === "inverse-background" && (m.groupId ? (i[m.groupId] = [], a[m.groupId] || (a[m.groupId] = m)) : s[u] = []);
  }
  for (let u in t.instances) {
    let m = t.instances[u], h = t.defs[m.defId], d = c[h.defId], p = m.range, y = !h.allDay && r ? _r(p, r) : p, v = Le(y, n);
    v && (d.display === "inverse-background" ? h.groupId ? i[h.groupId].push(v) : s[m.defId].push(v) : d.display !== "none" && (d.display === "background" ? o : l).push({
      def: h,
      ui: d,
      instance: m,
      range: v,
      isStart: y.start && y.start.valueOf() === v.start.valueOf(),
      isEnd: y.end && y.end.valueOf() === v.end.valueOf()
    }));
  }
  for (let u in i) {
    let m = i[u], h = Yi(m, n);
    for (let d of h) {
      let p = a[u], y = c[p.defId];
      o.push({
        def: p,
        ui: y,
        instance: null,
        range: d,
        isStart: !1,
        isEnd: !1
      });
    }
  }
  for (let u in s) {
    let m = s[u], h = Yi(m, n);
    for (let d of h)
      o.push({
        def: t.defs[u],
        ui: c[u],
        instance: null,
        range: d,
        isStart: !1,
        isEnd: !1
      });
  }
  return { bg: o, fg: l };
}
function xf(t) {
  return t.ui.display === "background" || t.ui.display === "inverse-background";
}
function kf(t, e) {
  t.fcSeg = e;
}
function nr(t) {
  return t.fcSeg || t.parentNode.fcSeg || null;
}
function io(t, e) {
  return Fe(t, (n) => so(n, e));
}
function so(t, e) {
  let n = [];
  return e[""] && n.push(e[""]), e[t.defId] && n.push(e[t.defId]), n.push(t.ui), Qa(n);
}
function Or(t, e) {
  let n = t.map(If);
  return n.sort((r, i) => Mu(r, i, e)), n.map((r) => r._seg);
}
function If(t) {
  let { eventRange: e } = t, n = e.def, r = e.instance ? e.instance.range : e.range, i = r.start ? r.start.valueOf() : 0, s = r.end ? r.end.valueOf() : 0;
  return Object.assign(Object.assign(Object.assign({}, n.extendedProps), n), {
    id: n.publicId,
    start: i,
    end: s,
    duration: s - i,
    allDay: Number(n.allDay),
    _seg: t
  });
}
function Mf(t, e) {
  let { pluginHooks: n } = e, r = n.isDraggableTransformers, { def: i, ui: s } = t.eventRange, a = s.startEditable;
  for (let o of r)
    a = o(a, i, s, e);
  return a;
}
function Nf(t, e) {
  return t.isStart && t.eventRange.ui.durationEditable && e.options.eventResizableFromStart;
}
function Of(t, e) {
  return t.isEnd && t.eventRange.ui.durationEditable;
}
function pt(t, e, n, r, i, s, a) {
  let { dateEnv: o, options: l } = n, { displayEventTime: c, displayEventEnd: u } = l, m = t.eventRange.def, h = t.eventRange.instance;
  c == null && (c = r !== !1), u == null && (u = i !== !1);
  let d = h.range.start, p = h.range.end, y = s || t.start || t.eventRange.range.start, v = a || t.end || t.eventRange.range.end, b = F(d).valueOf() === F(y).valueOf(), E = F(Pe(p, -1)).valueOf() === F(Pe(v, -1)).valueOf();
  return c && !m.allDay && (b || E) ? (y = b ? d : y, v = E ? p : v, u && m.hasEnd ? o.formatRange(y, v, e, {
    forcedStartTzo: s ? null : h.forcedStartTzo,
    forcedEndTzo: a ? null : h.forcedEndTzo
  }) : o.format(y, e, {
    forcedTzo: s ? null : h.forcedStartTzo
  })) : "";
}
function me(t, e, n) {
  let r = t.eventRange.range;
  return {
    isPast: r.end < (n || e.start),
    isFuture: r.start >= (n || e.end),
    isToday: e && Ce(e, r.start)
  };
}
function Ff(t) {
  let e = ["fc-event"];
  return t.isMirror && e.push("fc-event-mirror"), t.isDraggable && e.push("fc-event-draggable"), (t.isStartResizable || t.isEndResizable) && e.push("fc-event-resizable"), t.isDragging && e.push("fc-event-dragging"), t.isResizing && e.push("fc-event-resizing"), t.isSelected && e.push("fc-event-selected"), t.isStart && e.push("fc-event-start"), t.isEnd && e.push("fc-event-end"), t.isPast && e.push("fc-event-past"), t.isToday && e.push("fc-event-today"), t.isFuture && e.push("fc-event-future"), e;
}
function ao(t) {
  return t.instance ? t.instance.instanceId : `${t.def.defId}:${t.range.start.toISOString()}`;
}
function Fr(t, e) {
  let { def: n, instance: r } = t.eventRange, { url: i } = n;
  if (i)
    return { href: i };
  let { emitter: s, options: a } = e, { eventInteractive: o } = a;
  return o == null && (o = n.interactive, o == null && (o = Boolean(s.hasHandlers("eventClick")))), o ? Oa((l) => {
    s.trigger("eventClick", {
      el: l.target,
      event: new ee(e, n, r),
      jsEvent: l,
      view: e.viewApi
    });
  }) : {};
}
const Hf = {
  start: g,
  end: g,
  allDay: Boolean
};
function Pf(t, e, n) {
  let r = Bf(t, e), { range: i } = r;
  if (!i.start)
    return null;
  if (!i.end) {
    if (n == null)
      return null;
    i.end = e.add(i.start, n);
  }
  return r;
}
function Bf(t, e) {
  let { refined: n, extra: r } = Cr(t, Hf), i = n.start ? e.createMarkerMeta(n.start) : null, s = n.end ? e.createMarkerMeta(n.end) : null, { allDay: a } = n;
  return a == null && (a = i && i.isTimeUnspecified && (!s || s.isTimeUnspecified)), Object.assign({ range: {
    start: i ? i.marker : null,
    end: s ? s.marker : null
  }, allDay: a }, r);
}
function Lf(t, e) {
  return Object.assign(Object.assign({}, lo(t.range, e, t.allDay)), { allDay: t.allDay });
}
function oo(t, e, n) {
  return Object.assign(Object.assign({}, lo(t, e, n)), { timeZone: e.timeZone });
}
function lo(t, e, n) {
  return {
    start: e.toDate(t.start),
    end: e.toDate(t.end),
    startStr: e.formatIso(t.start, { omitTime: n }),
    endStr: e.formatIso(t.end, { omitTime: n })
  };
}
function zf(t, e, n) {
  let r = Za({ editable: !1 }, n), i = Xn(
    r.refined,
    r.extra,
    "",
    t.allDay,
    !0,
    n
  );
  return {
    def: i,
    ui: so(i, e),
    instance: Rr(i.defId, t.range),
    range: t.range,
    isStart: !0,
    isEnd: !0
  };
}
function Uf(t, e, n) {
  let r = !1, i = function(o) {
    r || (r = !0, e(o));
  }, s = function(o) {
    r || (r = !0, n(o));
  }, a = t(i, s);
  a && typeof a.then == "function" && a.then(i, s);
}
let Vf = {
  parseMeta(t) {
    return typeof t.events == "function" ? t.events : null;
  },
  fetch(t, e, n) {
    const { dateEnv: r } = t.context, i = t.eventSource.meta;
    Uf(i.bind(null, oo(t.range, r)), (s) => e({ rawEvents: s }), n);
  }
};
const Wf = ce({
  name: "func-event-source",
  eventSourceDefs: [Vf]
});
class Xi extends Error {
  constructor(e, n) {
    super(e), this.response = n;
  }
}
function jf(t, e, n) {
  t = t.toUpperCase();
  const r = {
    method: t
  };
  return t === "GET" ? e += (e.indexOf("?") === -1 ? "?" : "&") + new URLSearchParams(n) : (r.body = new URLSearchParams(n), r.headers = {
    "Content-Type": "application/x-www-form-urlencoded"
  }), fetch(e, r).then((i) => {
    if (i.ok)
      return i.json().then((s) => [s, i], () => {
        throw new Xi("Failure parsing JSON", i);
      });
    throw new Xi("Request failed", i);
  });
}
const Gf = {
  method: String,
  extraParams: g,
  startParam: String,
  endParam: String,
  timeZoneParam: String
};
let qf = {
  parseMeta(t) {
    return t.url && (t.format === "json" || !t.format) ? {
      url: t.url,
      format: "json",
      method: (t.method || "GET").toUpperCase(),
      extraParams: t.extraParams,
      startParam: t.startParam,
      endParam: t.endParam,
      timeZoneParam: t.timeZoneParam
    } : null;
  },
  fetch(t, e, n) {
    const { meta: r } = t.eventSource, i = Qf(r, t.range, t.context);
    jf(r.method, r.url, i).then(([s, a]) => {
      e({ rawEvents: s, response: a });
    }, n);
  }
};
const Zf = ce({
  name: "json-event-source",
  eventSourceRefiners: Gf,
  eventSourceDefs: [qf]
});
function Qf(t, e, n) {
  let { dateEnv: r, options: i } = n, s, a, o, l, c = {};
  return s = t.startParam, s == null && (s = i.startParam), a = t.endParam, a == null && (a = i.endParam), o = t.timeZoneParam, o == null && (o = i.timeZoneParam), typeof t.extraParams == "function" ? l = t.extraParams() : l = t.extraParams || {}, Object.assign(c, l), c[s] = r.formatIso(e.start), c[a] = r.formatIso(e.end), r.timeZone !== "local" && (c[o] = r.timeZone), c;
}
const Yf = {
  daysOfWeek: g,
  startTime: k,
  endTime: k,
  duration: k,
  startRecur: g,
  endRecur: g
};
let $f = {
  parse(t, e) {
    if (t.daysOfWeek || t.startTime || t.endTime || t.startRecur || t.endRecur) {
      let n = {
        daysOfWeek: t.daysOfWeek || null,
        startTime: t.startTime || null,
        endTime: t.endTime || null,
        startRecur: t.startRecur ? e.createMarker(t.startRecur) : null,
        endRecur: t.endRecur ? e.createMarker(t.endRecur) : null
      }, r;
      return t.duration && (r = t.duration), !r && t.startTime && t.endTime && (r = id(t.endTime, t.startTime)), {
        allDayGuess: Boolean(!t.startTime && !t.endTime),
        duration: r,
        typeData: n
      };
    }
    return null;
  },
  expand(t, e, n) {
    let r = Le(e, { start: t.startRecur, end: t.endRecur });
    return r ? Kf(t.daysOfWeek, t.startTime, r, n) : [];
  }
};
const Jf = ce({
  name: "simple-recurring-event",
  recurringTypes: [$f],
  eventRefiners: Yf
});
function Kf(t, e, n, r) {
  let i = t ? ka(t) : null, s = F(n.start), a = n.end, o = [];
  for (; s < a; ) {
    let l;
    (!i || i[s.getUTCDay()]) && (e ? l = r.add(s, e) : l = s, o.push(l)), s = W(s, 1);
  }
  return o;
}
const Xf = ce({
  name: "change-handler",
  optionChangeHandlers: {
    events(t, e) {
      es([t], e);
    },
    eventSources: es
  }
});
function es(t, e) {
  let n = Ar(e.getCurrentData().eventSources), r = [];
  for (let i of t) {
    let s = !1;
    for (let a = 0; a < n.length; a += 1)
      if (n[a]._raw === i) {
        n.splice(a, 1), s = !0;
        break;
      }
    s || r.push(i);
  }
  for (let i of n)
    e.dispatch({
      type: "REMOVE_EVENT_SOURCE",
      sourceId: i.sourceId
    });
  for (let i of r)
    e.calendarApi.addEventSource(i);
}
function eh(t, e) {
  e.emitter.trigger("datesSet", Object.assign(Object.assign({}, oo(t.activeRange, e.dateEnv)), { view: e.viewApi }));
}
function th(t, e) {
  let { emitter: n } = e;
  n.hasHandlers("eventsSet") && n.trigger("eventsSet", Nr(t, e));
}
const nh = [
  Af,
  Wf,
  Zf,
  Jf,
  Xf,
  ce({
    name: "misc",
    isLoadingFuncs: [
      (t) => Ja(t.eventSources)
    ],
    propSetHandlers: {
      dateProfile: eh,
      eventStore: th
    }
  })
];
let Mn;
function co() {
  return Mn == null && (Mn = rh()), Mn;
}
function rh() {
  if (typeof document > "u")
    return !0;
  let t = document.createElement("div");
  t.style.position = "absolute", t.style.top = "0px", t.style.left = "0px", t.innerHTML = "<table><tr><td><div></div></td></tr></table>", t.querySelector("table").style.height = "100px", t.querySelector("div").style.height = "100%", document.body.appendChild(t);
  let n = t.querySelector("div").offsetHeight > 0;
  return document.body.removeChild(t), n;
}
class ih extends N {
  constructor() {
    super(...arguments), this.state = {
      forPrint: !1
    }, this.handleBeforePrint = () => {
      this.setState({ forPrint: !0 });
    }, this.handleAfterPrint = () => {
      this.setState({ forPrint: !1 });
    };
  }
  render() {
    let { props: e } = this, { options: n } = e, { forPrint: r } = this.state, i = r || n.height === "auto" || n.contentHeight === "auto", s = !i && n.height != null ? n.height : "", a = [
      "fc",
      r ? "fc-media-print" : "fc-media-screen",
      `fc-direction-${n.direction}`,
      e.theme.getClass("root")
    ];
    return co() || a.push("fc-liquid-hack"), e.children(a, s, i, r);
  }
  componentDidMount() {
    let { emitter: e } = this.props;
    e.on("_beforeprint", this.handleBeforePrint), e.on("_afterprint", this.handleAfterPrint);
  }
  componentWillUnmount() {
    let { emitter: e } = this.props;
    e.off("_beforeprint", this.handleBeforePrint), e.off("_afterprint", this.handleAfterPrint);
  }
}
class uo {
  constructor(e) {
    this.component = e.component, this.isHitComboAllowed = e.isHitComboAllowed || null;
  }
  destroy() {
  }
}
function sh(t, e) {
  return {
    component: t,
    el: e.el,
    useEventCenter: e.useEventCenter != null ? e.useEventCenter : !0,
    isHitComboAllowed: e.isHitComboAllowed || null
  };
}
const ts = {};
class ah {
  getCurrentData() {
    return this.currentDataManager.getCurrentData();
  }
  dispatch(e) {
    this.currentDataManager.dispatch(e);
  }
  get view() {
    return this.getCurrentData().viewApi;
  }
  batchRendering(e) {
    e();
  }
  updateSize() {
    this.trigger("_resize", !0);
  }
  setOption(e, n) {
    this.dispatch({
      type: "SET_OPTION",
      optionName: e,
      rawOptionValue: n
    });
  }
  getOption(e) {
    return this.currentDataManager.currentCalendarOptionsInput[e];
  }
  getAvailableLocaleCodes() {
    return Object.keys(this.getCurrentData().availableRawLocales);
  }
  on(e, n) {
    let { currentDataManager: r } = this;
    r.currentCalendarOptionsRefiners[e] ? r.emitter.on(e, n) : console.warn(`Unknown listener name '${e}'`);
  }
  off(e, n) {
    this.currentDataManager.emitter.off(e, n);
  }
  trigger(e, ...n) {
    this.currentDataManager.emitter.trigger(e, ...n);
  }
  changeView(e, n) {
    this.batchRendering(() => {
      if (this.unselect(), n)
        if (n.start && n.end)
          this.dispatch({
            type: "CHANGE_VIEW_TYPE",
            viewType: e
          }), this.dispatch({
            type: "SET_OPTION",
            optionName: "visibleRange",
            rawOptionValue: n
          });
        else {
          let { dateEnv: r } = this.getCurrentData();
          this.dispatch({
            type: "CHANGE_VIEW_TYPE",
            viewType: e,
            dateMarker: r.createMarker(n)
          });
        }
      else
        this.dispatch({
          type: "CHANGE_VIEW_TYPE",
          viewType: e
        });
    });
  }
  zoomTo(e, n) {
    let r = this.getCurrentData(), i;
    n = n || "day", i = r.viewSpecs[n] || this.getUnitViewSpec(n), this.unselect(), i ? this.dispatch({
      type: "CHANGE_VIEW_TYPE",
      viewType: i.type,
      dateMarker: e
    }) : this.dispatch({
      type: "CHANGE_DATE",
      dateMarker: e
    });
  }
  getUnitViewSpec(e) {
    let { viewSpecs: n, toolbarConfig: r } = this.getCurrentData(), i = [].concat(r.header ? r.header.viewsWithButtons : [], r.footer ? r.footer.viewsWithButtons : []), s, a;
    for (let o in n)
      i.push(o);
    for (s = 0; s < i.length; s += 1)
      if (a = n[i[s]], a && a.singleUnit === e)
        return a;
    return null;
  }
  prev() {
    this.unselect(), this.dispatch({ type: "PREV" });
  }
  next() {
    this.unselect(), this.dispatch({ type: "NEXT" });
  }
  prevYear() {
    let e = this.getCurrentData();
    this.unselect(), this.dispatch({
      type: "CHANGE_DATE",
      dateMarker: e.dateEnv.addYears(e.currentDate, -1)
    });
  }
  nextYear() {
    let e = this.getCurrentData();
    this.unselect(), this.dispatch({
      type: "CHANGE_DATE",
      dateMarker: e.dateEnv.addYears(e.currentDate, 1)
    });
  }
  today() {
    let e = this.getCurrentData();
    this.unselect(), this.dispatch({
      type: "CHANGE_DATE",
      dateMarker: Tt(e.calendarOptions.now, e.dateEnv)
    });
  }
  gotoDate(e) {
    let n = this.getCurrentData();
    this.unselect(), this.dispatch({
      type: "CHANGE_DATE",
      dateMarker: n.dateEnv.createMarker(e)
    });
  }
  incrementDate(e) {
    let n = this.getCurrentData(), r = k(e);
    r && (this.unselect(), this.dispatch({
      type: "CHANGE_DATE",
      dateMarker: n.dateEnv.add(n.currentDate, r)
    }));
  }
  getDate() {
    let e = this.getCurrentData();
    return e.dateEnv.toDate(e.currentDate);
  }
  formatDate(e, n) {
    let { dateEnv: r } = this.getCurrentData();
    return r.format(r.createMarker(e), H(n));
  }
  formatRange(e, n, r) {
    let { dateEnv: i } = this.getCurrentData();
    return i.formatRange(i.createMarker(e), i.createMarker(n), H(r), r);
  }
  formatIso(e, n) {
    let { dateEnv: r } = this.getCurrentData();
    return r.formatIso(r.createMarker(e), { omitTime: n });
  }
  select(e, n) {
    let r;
    n == null ? e.start != null ? r = e : r = {
      start: e,
      end: null
    } : r = {
      start: e,
      end: n
    };
    let i = this.getCurrentData(), s = Pf(r, i.dateEnv, k({ days: 1 }));
    s && (this.dispatch({ type: "SELECT_DATES", selection: s }), Sf(s, null, i));
  }
  unselect(e) {
    let n = this.getCurrentData();
    n.dateSelection && (this.dispatch({ type: "UNSELECT_DATES" }), Df(e, n));
  }
  addEvent(e, n) {
    if (e instanceof ee) {
      let a = e._def, o = e._instance;
      return this.getCurrentData().eventStore.defs[a.defId] || (this.dispatch({
        type: "ADD_EVENTS",
        eventStore: er({ def: a, instance: o })
      }), this.triggerEventAdd(e)), e;
    }
    let r = this.getCurrentData(), i;
    if (n instanceof Ge)
      i = n.internalEventSource;
    else if (typeof n == "boolean")
      n && ([i] = Ar(r.eventSources));
    else if (n != null) {
      let a = this.getEventSourceById(n);
      if (!a)
        return console.warn(`Could not find an event source with ID "${n}"`), null;
      i = a.internalEventSource;
    }
    let s = qa(e, i, r, !1);
    if (s) {
      let a = new ee(r, s.def, s.def.recurringDef ? null : s.instance);
      return this.dispatch({
        type: "ADD_EVENTS",
        eventStore: er(s)
      }), this.triggerEventAdd(a), a;
    }
    return null;
  }
  triggerEventAdd(e) {
    let { emitter: n } = this.getCurrentData();
    n.trigger("eventAdd", {
      event: e,
      relatedEvents: [],
      revert: () => {
        this.dispatch({
          type: "REMOVE_EVENTS",
          eventStore: ro(e)
        });
      }
    });
  }
  getEventById(e) {
    let n = this.getCurrentData(), { defs: r, instances: i } = n.eventStore;
    e = String(e);
    for (let s in r) {
      let a = r[s];
      if (a.publicId === e) {
        if (a.recurringDef)
          return new ee(n, a, null);
        for (let o in i) {
          let l = i[o];
          if (l.defId === a.defId)
            return new ee(n, a, l);
        }
      }
    }
    return null;
  }
  getEvents() {
    let e = this.getCurrentData();
    return Nr(e.eventStore, e);
  }
  removeAllEvents() {
    this.dispatch({ type: "REMOVE_ALL_EVENTS" });
  }
  getEventSources() {
    let e = this.getCurrentData(), n = e.eventSources, r = [];
    for (let i in n)
      r.push(new Ge(e, n[i]));
    return r;
  }
  getEventSourceById(e) {
    let n = this.getCurrentData(), r = n.eventSources;
    e = String(e);
    for (let i in r)
      if (r[i].publicId === e)
        return new Ge(n, r[i]);
    return null;
  }
  addEventSource(e) {
    let n = this.getCurrentData();
    if (e instanceof Ge)
      return n.eventSources[e.internalEventSource.sourceId] || this.dispatch({
        type: "ADD_EVENT_SOURCES",
        sources: [e.internalEventSource]
      }), e;
    let r = Ya(e, n);
    return r ? (this.dispatch({ type: "ADD_EVENT_SOURCES", sources: [r] }), new Ge(n, r)) : null;
  }
  removeAllEventSources() {
    this.dispatch({ type: "REMOVE_ALL_EVENT_SOURCES" });
  }
  refetchEvents() {
    this.dispatch({ type: "FETCH_EVENT_SOURCES", isRefetch: !0 });
  }
  scrollToTime(e) {
    let n = k(e);
    n && this.trigger("_scrollRequest", { time: n });
  }
}
function oh(t, e) {
  let n = {
    left: Math.max(t.left, e.left),
    right: Math.min(t.right, e.right),
    top: Math.max(t.top, e.top),
    bottom: Math.min(t.bottom, e.bottom)
  };
  return n.left < n.right && n.top < n.bottom ? n : !1;
}
const Nn = pe();
class lh {
  constructor() {
    this.getKeysForEventDefs = A(this._getKeysForEventDefs), this.splitDateSelection = A(this._splitDateSpan), this.splitEventStore = A(this._splitEventStore), this.splitIndividualUi = A(this._splitIndividualUi), this.splitEventDrag = A(this._splitInteraction), this.splitEventResize = A(this._splitInteraction), this.eventUiBuilders = {};
  }
  splitProps(e) {
    let n = this.getKeyInfo(e), r = this.getKeysForEventDefs(e.eventStore), i = this.splitDateSelection(e.dateSelection), s = this.splitIndividualUi(e.eventUiBases, r), a = this.splitEventStore(e.eventStore, r), o = this.splitEventDrag(e.eventDrag), l = this.splitEventResize(e.eventResize), c = {};
    this.eventUiBuilders = Fe(n, (u, m) => this.eventUiBuilders[m] || A(ch));
    for (let u in n) {
      let m = n[u], h = a[u] || Nn, d = this.eventUiBuilders[u];
      c[u] = {
        businessHours: m.businessHours || e.businessHours,
        dateSelection: i[u] || null,
        eventStore: h,
        eventUiBases: d(e.eventUiBases[""], m.ui, s[u]),
        eventSelection: h.instances[e.eventSelection] ? e.eventSelection : "",
        eventDrag: o[u] || null,
        eventResize: l[u] || null
      };
    }
    return c;
  }
  _splitDateSpan(e) {
    let n = {};
    if (e) {
      let r = this.getKeysForDateSpan(e);
      for (let i of r)
        n[i] = e;
    }
    return n;
  }
  _getKeysForEventDefs(e) {
    return Fe(e.defs, (n) => this.getKeysForEventDef(n));
  }
  _splitEventStore(e, n) {
    let { defs: r, instances: i } = e, s = {};
    for (let a in r)
      for (let o of n[a])
        s[o] || (s[o] = pe()), s[o].defs[a] = r[a];
    for (let a in i) {
      let o = i[a];
      for (let l of n[o.defId])
        s[l] && (s[l].instances[a] = o);
    }
    return s;
  }
  _splitIndividualUi(e, n) {
    let r = {};
    for (let i in e)
      if (i)
        for (let s of n[i])
          r[s] || (r[s] = {}), r[s][i] = e[i];
    return r;
  }
  _splitInteraction(e) {
    let n = {};
    if (e) {
      let r = this._splitEventStore(e.affectedEvents, this._getKeysForEventDefs(e.affectedEvents)), i = this._getKeysForEventDefs(e.mutatedEvents), s = this._splitEventStore(e.mutatedEvents, i), a = (o) => {
        n[o] || (n[o] = {
          affectedEvents: r[o] || Nn,
          mutatedEvents: s[o] || Nn,
          isEvent: e.isEvent
        });
      };
      for (let o in r)
        a(o);
      for (let o in s)
        a(o);
    }
    return n;
  }
}
function ch(t, e, n) {
  let r = [];
  t && r.push(t), e && r.push(e);
  let i = {
    "": Qa(r)
  };
  return n && Object.assign(i, n), i;
}
function Hr(t, e, n, r) {
  return {
    dow: t.getUTCDay(),
    isDisabled: Boolean(r && !Ce(r.activeRange, t)),
    isOther: Boolean(r && !Ce(r.currentRange, t)),
    isToday: Boolean(e && Ce(e, t)),
    isPast: Boolean(n ? t < n : e ? t < e.start : !1),
    isFuture: Boolean(n ? t > n : e ? t >= e.end : !1)
  };
}
function gn(t, e) {
  let n = [
    "fc-day",
    `fc-day-${zu[t.dow]}`
  ];
  return t.isDisabled ? n.push("fc-day-disabled") : (t.isToday && (n.push("fc-day-today"), n.push(e.getClass("today"))), t.isPast && n.push("fc-day-past"), t.isFuture && n.push("fc-day-future"), t.isOther && n.push("fc-day-other")), n;
}
const uh = H({ year: "numeric", month: "long", day: "numeric" }), dh = H({ week: "long" });
function Ke(t, e, n = "day", r = !0) {
  const { dateEnv: i, options: s, calendarApi: a } = t;
  let o = i.format(e, n === "week" ? dh : uh);
  if (s.navLinks) {
    let l = i.toDate(e);
    const c = (u) => {
      let m = n === "day" ? s.navLinkDayClick : n === "week" ? s.navLinkWeekClick : null;
      typeof m == "function" ? m.call(a, i.toDate(e), u) : (typeof m == "string" && (n = m), a.zoomTo(e, n));
    };
    return Object.assign({ title: mt(s.navLinkHint, [o, l], o), "data-navlink": "" }, r ? Na(c) : { onClick: c });
  }
  return { "aria-label": o };
}
let On;
function fh() {
  return On || (On = hh()), On;
}
function hh() {
  let t = document.createElement("div");
  t.style.overflow = "scroll", t.style.position = "absolute", t.style.top = "-9999px", t.style.left = "-9999px", document.body.appendChild(t);
  let e = mh(t);
  return document.body.removeChild(t), e;
}
function mh(t) {
  return {
    x: t.offsetHeight - t.clientHeight,
    y: t.offsetWidth - t.clientWidth
  };
}
function gh(t) {
  let e = ph(t), n = t.getBoundingClientRect();
  for (let r of e) {
    let i = oh(n, r.getBoundingClientRect());
    if (i)
      n = i;
    else
      return null;
  }
  return n;
}
function ph(t) {
  let e = [];
  for (; t instanceof HTMLElement; ) {
    let n = window.getComputedStyle(t);
    if (n.position === "fixed")
      break;
    /(auto|scroll)/.test(n.overflow + n.overflowY + n.overflowX) && e.push(t), t = t.parentNode;
  }
  return e;
}
class wt {
  constructor(e, n, r, i) {
    this.els = n;
    let s = this.originClientRect = e.getBoundingClientRect();
    r && this.buildElHorizontals(s.left), i && this.buildElVerticals(s.top);
  }
  buildElHorizontals(e) {
    let n = [], r = [];
    for (let i of this.els) {
      let s = i.getBoundingClientRect();
      n.push(s.left - e), r.push(s.right - e);
    }
    this.lefts = n, this.rights = r;
  }
  buildElVerticals(e) {
    let n = [], r = [];
    for (let i of this.els) {
      let s = i.getBoundingClientRect();
      n.push(s.top - e), r.push(s.bottom - e);
    }
    this.tops = n, this.bottoms = r;
  }
  leftToIndex(e) {
    let { lefts: n, rights: r } = this, i = n.length, s;
    for (s = 0; s < i; s += 1)
      if (e >= n[s] && e < r[s])
        return s;
  }
  topToIndex(e) {
    let { tops: n, bottoms: r } = this, i = n.length, s;
    for (s = 0; s < i; s += 1)
      if (e >= n[s] && e < r[s])
        return s;
  }
  getWidth(e) {
    return this.rights[e] - this.lefts[e];
  }
  getHeight(e) {
    return this.bottoms[e] - this.tops[e];
  }
}
class ue extends N {
  constructor() {
    super(...arguments), this.uid = Ue();
  }
  prepareHits() {
  }
  queryHit(e, n, r, i) {
    return null;
  }
  isValidSegDownEl(e) {
    return !this.props.eventDrag && !this.props.eventResize && !de(e, ".fc-event-mirror");
  }
  isValidDateDownEl(e) {
    return !de(e, ".fc-event:not(.fc-bg-event)") && !de(e, ".fc-more-link") && !de(e, "a[data-navlink]") && !de(e, ".fc-popover");
  }
}
class vh {
  constructor(e) {
    this.timeZoneName = e;
  }
}
class fo {
  constructor() {
    this.strictOrder = !1, this.allowReslicing = !1, this.maxCoord = -1, this.maxStackCnt = -1, this.levelCoords = [], this.entriesByLevel = [], this.stackCnts = {};
  }
  addSegs(e) {
    let n = [];
    for (let r of e)
      this.insertEntry(r, n);
    return n;
  }
  insertEntry(e, n) {
    let r = this.findInsertion(e);
    return this.isInsertionValid(r, e) ? (this.insertEntryAt(e, r), 1) : this.handleInvalidInsertion(r, e, n);
  }
  isInsertionValid(e, n) {
    return (this.maxCoord === -1 || e.levelCoord + n.thickness <= this.maxCoord) && (this.maxStackCnt === -1 || e.stackCnt < this.maxStackCnt);
  }
  handleInvalidInsertion(e, n, r) {
    return this.allowReslicing && e.touchingEntry ? this.splitEntry(n, e.touchingEntry, r) : (r.push(n), 0);
  }
  splitEntry(e, n, r) {
    let i = 0, s = [], a = e.span, o = n.span;
    return a.start < o.start && (i += this.insertEntry({
      index: e.index,
      thickness: e.thickness,
      span: { start: a.start, end: o.start }
    }, s)), a.end > o.end && (i += this.insertEntry({
      index: e.index,
      thickness: e.thickness,
      span: { start: o.end, end: a.end }
    }, s)), i ? (r.push({
      index: e.index,
      thickness: e.thickness,
      span: Pr(o, a)
    }, ...s), i) : (r.push(e), 0);
  }
  insertEntryAt(e, n) {
    let { entriesByLevel: r, levelCoords: i } = this;
    n.lateral === -1 ? (Fn(i, n.level, n.levelCoord), Fn(r, n.level, [e])) : Fn(r[n.level], n.lateral, e), this.stackCnts[Oe(e)] = n.stackCnt;
  }
  findInsertion(e) {
    let { levelCoords: n, entriesByLevel: r, strictOrder: i, stackCnts: s } = this, a = n.length, o = 0, l = -1, c = -1, u = null, m = 0;
    for (let p = 0; p < a; p += 1) {
      let y = n[p];
      if (!i && y >= o + e.thickness)
        break;
      let v = r[p], b, E = ir(v, e.span.start, rr), T = E[0] + E[1];
      for (; (b = v[T]) && b.span.start < e.span.end; ) {
        let C = y + b.thickness;
        C > o && (o = C, u = b, l = p, c = T), C === o && (m = Math.max(m, s[Oe(b)] + 1)), T += 1;
      }
    }
    let h = 0;
    if (u)
      for (h = l + 1; h < a && n[h] < o; )
        h += 1;
    let d = -1;
    return h < a && n[h] === o && (d = ir(r[h], e.span.end, rr)[0]), {
      touchingLevel: l,
      touchingLateral: c,
      touchingEntry: u,
      stackCnt: m,
      levelCoord: o,
      level: h,
      lateral: d
    };
  }
  toRects() {
    let { entriesByLevel: e, levelCoords: n } = this, r = e.length, i = [];
    for (let s = 0; s < r; s += 1) {
      let a = e[s], o = n[s];
      for (let l of a)
        i.push(Object.assign(Object.assign({}, l), { levelCoord: o }));
    }
    return i;
  }
}
function rr(t) {
  return t.span.end;
}
function Oe(t) {
  return t.index + ":" + t.span.start;
}
function yh(t) {
  let e = [];
  for (let n of t) {
    let r = [], i = {
      span: n.span,
      entries: [n]
    };
    for (let s of e)
      Pr(s.span, i.span) ? i = {
        entries: s.entries.concat(i.entries),
        span: bh(s.span, i.span)
      } : r.push(s);
    r.push(i), e = r;
  }
  return e;
}
function bh(t, e) {
  return {
    start: Math.min(t.start, e.start),
    end: Math.max(t.end, e.end)
  };
}
function Pr(t, e) {
  let n = Math.max(t.start, e.start), r = Math.min(t.end, e.end);
  return n < r ? { start: n, end: r } : null;
}
function Fn(t, e, n) {
  t.splice(e, 0, n);
}
function ir(t, e, n) {
  let r = 0, i = t.length;
  if (!i || e < n(t[r]))
    return [0, 0];
  if (e > n(t[i - 1]))
    return [i, 0];
  for (; r < i; ) {
    let s = Math.floor(r + (i - r) / 2), a = n(t[s]);
    if (e < a)
      i = s;
    else if (e > a)
      r = s + 1;
    else
      return [s, 1];
  }
  return [r, 0];
}
function wh(t, e) {
  return !t || e > 10 ? H({ weekday: "short" }) : e > 1 ? H({ weekday: "short", month: "numeric", day: "numeric", omitCommas: !0 }) : H({ weekday: "long" });
}
const ho = "fc-col-header-cell";
function mo(t) {
  return t.text;
}
class Eh extends N {
  render() {
    let { dateEnv: e, options: n, theme: r, viewApi: i } = this.context, { props: s } = this, { date: a, dateProfile: o } = s, l = Hr(a, s.todayRange, null, o), c = [ho].concat(gn(l, r)), u = e.format(a, s.dayHeaderFormat), m = !l.isDisabled && s.colCnt > 1 ? Ke(this.context, a) : {}, h = Object.assign(Object.assign(Object.assign({ date: e.toDate(a), view: i }, s.extraRenderProps), { text: u }), l);
    return f(j, { elTag: "th", elClasses: c, elAttrs: Object.assign({ role: "columnheader", colSpan: s.colSpan, "data-date": l.isDisabled ? void 0 : hn(a) }, s.extraDataAttrs), renderProps: h, generatorName: "dayHeaderContent", generator: n.dayHeaderContent || mo, classNameGenerator: n.dayHeaderClassNames, didMount: n.dayHeaderDidMount, willUnmount: n.dayHeaderWillUnmount }, (d) => f("div", { className: "fc-scrollgrid-sync-inner" }, !l.isDisabled && f(d, { elTag: "a", elAttrs: m, elClasses: [
      "fc-col-header-cell-cushion",
      s.isSticky && "fc-sticky"
    ] })));
  }
}
const Ah = H({ weekday: "long" });
class Sh extends N {
  render() {
    let { props: e } = this, { dateEnv: n, theme: r, viewApi: i, options: s } = this.context, a = W(new Date(2592e5), e.dow), o = {
      dow: e.dow,
      isDisabled: !1,
      isFuture: !1,
      isPast: !1,
      isToday: !1,
      isOther: !1
    }, l = n.format(a, e.dayHeaderFormat), c = Object.assign(Object.assign(Object.assign(Object.assign({
      date: a
    }, o), { view: i }), e.extraRenderProps), { text: l });
    return f(j, { elTag: "th", elClasses: [
      ho,
      ...gn(o, r),
      ...e.extraClassNames || []
    ], elAttrs: Object.assign({ role: "columnheader", colSpan: e.colSpan }, e.extraDataAttrs), renderProps: c, generatorName: "dayHeaderContent", generator: s.dayHeaderContent || mo, classNameGenerator: s.dayHeaderClassNames, didMount: s.dayHeaderDidMount, willUnmount: s.dayHeaderWillUnmount }, (u) => f(
      "div",
      { className: "fc-scrollgrid-sync-inner" },
      f(u, { elTag: "a", elClasses: [
        "fc-col-header-cell-cushion",
        e.isSticky && "fc-sticky"
      ], elAttrs: {
        "aria-label": n.format(a, Ah)
      } })
    ));
  }
}
class rt extends $ {
  constructor(e, n) {
    super(e, n), this.initialNowDate = Tt(n.options.now, n.dateEnv), this.initialNowQueriedMs = new Date().valueOf(), this.state = this.computeTiming().currentState;
  }
  render() {
    let { props: e, state: n } = this;
    return e.children(n.nowDate, n.todayRange);
  }
  componentDidMount() {
    this.setTimeout();
  }
  componentDidUpdate(e) {
    e.unit !== this.props.unit && (this.clearTimeout(), this.setTimeout());
  }
  componentWillUnmount() {
    this.clearTimeout();
  }
  computeTiming() {
    let { props: e, context: n } = this, r = Pe(this.initialNowDate, new Date().valueOf() - this.initialNowQueriedMs), i = n.dateEnv.startOf(r, e.unit), s = n.dateEnv.add(i, k(1, e.unit)), a = s.valueOf() - r.valueOf();
    return a = Math.min(1e3 * 60 * 60 * 24, a), {
      currentState: { nowDate: i, todayRange: ns(i) },
      nextState: { nowDate: s, todayRange: ns(s) },
      waitMs: a
    };
  }
  setTimeout() {
    let { nextState: e, waitMs: n } = this.computeTiming();
    this.timeoutId = setTimeout(() => {
      this.setState(e, () => {
        this.setTimeout();
      });
    }, n);
  }
  clearTimeout() {
    this.timeoutId && clearTimeout(this.timeoutId);
  }
}
rt.contextType = ve;
function ns(t) {
  let e = F(t), n = W(e, 1);
  return { start: e, end: n };
}
class go extends N {
  constructor() {
    super(...arguments), this.createDayHeaderFormatter = A(Dh);
  }
  render() {
    let { context: e } = this, { dates: n, dateProfile: r, datesRepDistinctDays: i, renderIntro: s } = this.props, a = this.createDayHeaderFormatter(e.options.dayHeaderFormat, i, n.length);
    return f(rt, { unit: "day" }, (o, l) => f(
      "tr",
      { role: "row" },
      s && s("day"),
      n.map((c) => i ? f(Eh, { key: c.toISOString(), date: c, dateProfile: r, todayRange: l, colCnt: n.length, dayHeaderFormat: a }) : f(Sh, { key: c.getUTCDay(), dow: c.getUTCDay(), dayHeaderFormat: a }))
    ));
  }
}
function Dh(t, e, n) {
  return t || wh(e, n);
}
class po {
  constructor(e, n) {
    let r = e.start, { end: i } = e, s = [], a = [], o = -1;
    for (; r < i; )
      n.isHiddenDay(r) ? s.push(o + 0.5) : (o += 1, s.push(o), a.push(r)), r = W(r, 1);
    this.dates = a, this.indices = s, this.cnt = a.length;
  }
  sliceRange(e) {
    let n = this.getDateDayIndex(e.start), r = this.getDateDayIndex(W(e.end, -1)), i = Math.max(0, n), s = Math.min(this.cnt - 1, r);
    return i = Math.ceil(i), s = Math.floor(s), i <= s ? {
      firstIndex: i,
      lastIndex: s,
      isStart: n === i,
      isEnd: r === s
    } : null;
  }
  getDateDayIndex(e) {
    let { indices: n } = this, r = Math.floor(Te(this.dates[0], e));
    return r < 0 ? n[0] - 1 : r >= n.length ? n[n.length - 1] + 1 : n[r];
  }
}
class vo {
  constructor(e, n) {
    let { dates: r } = e, i, s, a;
    if (n) {
      for (s = r[0].getUTCDay(), i = 1; i < r.length && r[i].getUTCDay() !== s; i += 1)
        ;
      a = Math.ceil(r.length / i);
    } else
      a = 1, i = r.length;
    this.rowCnt = a, this.colCnt = i, this.daySeries = e, this.cells = this.buildCells(), this.headerDates = this.buildHeaderDates();
  }
  buildCells() {
    let e = [];
    for (let n = 0; n < this.rowCnt; n += 1) {
      let r = [];
      for (let i = 0; i < this.colCnt; i += 1)
        r.push(this.buildCell(n, i));
      e.push(r);
    }
    return e;
  }
  buildCell(e, n) {
    let r = this.daySeries.dates[e * this.colCnt + n];
    return {
      key: r.toISOString(),
      date: r
    };
  }
  buildHeaderDates() {
    let e = [];
    for (let n = 0; n < this.colCnt; n += 1)
      e.push(this.cells[0][n].date);
    return e;
  }
  sliceRange(e) {
    let { colCnt: n } = this, r = this.daySeries.sliceRange(e), i = [];
    if (r) {
      let { firstIndex: s, lastIndex: a } = r, o = s;
      for (; o <= a; ) {
        let l = Math.floor(o / n), c = Math.min((l + 1) * n, a + 1);
        i.push({
          row: l,
          firstCol: o % n,
          lastCol: (c - 1) % n,
          isStart: r.isStart && o === s,
          isEnd: r.isEnd && c - 1 === a
        }), o = c;
      }
    }
    return i;
  }
}
class yo {
  constructor() {
    this.sliceBusinessHours = A(this._sliceBusinessHours), this.sliceDateSelection = A(this._sliceDateSpan), this.sliceEventStore = A(this._sliceEventStore), this.sliceEventDrag = A(this._sliceInteraction), this.sliceEventResize = A(this._sliceInteraction), this.forceDayIfListItem = !1;
  }
  sliceProps(e, n, r, i, ...s) {
    let { eventUiBases: a } = e, o = this.sliceEventStore(e.eventStore, a, n, r, ...s);
    return {
      dateSelectionSegs: this.sliceDateSelection(e.dateSelection, a, i, ...s),
      businessHourSegs: this.sliceBusinessHours(e.businessHours, n, r, i, ...s),
      fgEventSegs: o.fg,
      bgEventSegs: o.bg,
      eventDrag: this.sliceEventDrag(e.eventDrag, a, n, r, ...s),
      eventResize: this.sliceEventResize(e.eventResize, a, n, r, ...s),
      eventSelection: e.eventSelection
    };
  }
  sliceNowDate(e, n, ...r) {
    return this._sliceDateSpan(
      { range: { start: e, end: Pe(e, 1) }, allDay: !1 },
      {},
      n,
      ...r
    );
  }
  _sliceBusinessHours(e, n, r, i, ...s) {
    return e ? this._sliceEventStore(mn(e, Hn(n, Boolean(r)), i), {}, n, r, ...s).bg : [];
  }
  _sliceEventStore(e, n, r, i, ...s) {
    if (e) {
      let a = tr(e, n, Hn(r, Boolean(i)), i);
      return {
        bg: this.sliceEventRanges(a.bg, s),
        fg: this.sliceEventRanges(a.fg, s)
      };
    }
    return { bg: [], fg: [] };
  }
  _sliceInteraction(e, n, r, i, ...s) {
    if (!e)
      return null;
    let a = tr(e.mutatedEvents, n, Hn(r, Boolean(i)), i);
    return {
      segs: this.sliceEventRanges(a.fg, s),
      affectedInstances: e.affectedEvents.instances,
      isEvent: e.isEvent
    };
  }
  _sliceDateSpan(e, n, r, ...i) {
    if (!e)
      return [];
    let s = zf(e, n, r), a = this.sliceRange(e.range, ...i);
    for (let o of a)
      o.eventRange = s;
    return a;
  }
  sliceEventRanges(e, n) {
    let r = [];
    for (let i of e)
      r.push(...this.sliceEventRange(i, n));
    return r;
  }
  sliceEventRange(e, n) {
    let r = e.range;
    this.forceDayIfListItem && e.ui.display === "list-item" && (r = {
      start: r.start,
      end: W(r.start, 1)
    });
    let i = this.sliceRange(r, ...n);
    for (let s of i)
      s.eventRange = e, s.isStart = e.isStart && s.isStart, s.isEnd = e.isEnd && s.isEnd;
    return i;
  }
}
function Hn(t, e) {
  let n = t.activeRange;
  return e ? n : {
    start: Pe(n.start, t.slotMinTime.milliseconds),
    end: Pe(n.end, t.slotMaxTime.milliseconds - 864e5)
  };
}
const Ft = /^(visible|hidden)$/;
class bo extends N {
  constructor() {
    super(...arguments), this.handleEl = (e) => {
      this.el = e, Be(this.props.elRef, e);
    };
  }
  render() {
    let { props: e } = this, { liquid: n, liquidIsAbsolute: r } = e, i = n && r, s = ["fc-scroller"];
    return n && (r ? s.push("fc-scroller-liquid-absolute") : s.push("fc-scroller-liquid")), f("div", { ref: this.handleEl, className: s.join(" "), style: {
      overflowX: e.overflowX,
      overflowY: e.overflowY,
      left: i && -(e.overcomeLeft || 0) || "",
      right: i && -(e.overcomeRight || 0) || "",
      bottom: i && -(e.overcomeBottom || 0) || "",
      marginLeft: !i && -(e.overcomeLeft || 0) || "",
      marginRight: !i && -(e.overcomeRight || 0) || "",
      marginBottom: !i && -(e.overcomeBottom || 0) || "",
      maxHeight: e.maxHeight || ""
    } }, e.children);
  }
  needsXScrolling() {
    if (Ft.test(this.props.overflowX))
      return !1;
    let { el: e } = this, n = this.el.getBoundingClientRect().width - this.getYScrollbarWidth(), { children: r } = e;
    for (let i = 0; i < r.length; i += 1)
      if (r[i].getBoundingClientRect().width > n)
        return !0;
    return !1;
  }
  needsYScrolling() {
    if (Ft.test(this.props.overflowY))
      return !1;
    let { el: e } = this, n = this.el.getBoundingClientRect().height - this.getXScrollbarWidth(), { children: r } = e;
    for (let i = 0; i < r.length; i += 1)
      if (r[i].getBoundingClientRect().height > n)
        return !0;
    return !1;
  }
  getXScrollbarWidth() {
    return Ft.test(this.props.overflowX) ? 0 : this.el.offsetHeight - this.el.clientHeight;
  }
  getYScrollbarWidth() {
    return Ft.test(this.props.overflowY) ? 0 : this.el.offsetWidth - this.el.clientWidth;
  }
}
class he {
  constructor(e) {
    this.masterCallback = e, this.currentMap = {}, this.depths = {}, this.callbackMap = {}, this.handleValue = (n, r) => {
      let { depths: i, currentMap: s } = this, a = !1, o = !1;
      n !== null ? (a = r in s, s[r] = n, i[r] = (i[r] || 0) + 1, o = !0) : (i[r] -= 1, i[r] || (delete s[r], delete this.callbackMap[r], a = !0)), this.masterCallback && (a && this.masterCallback(null, String(r)), o && this.masterCallback(n, String(r)));
    };
  }
  createRef(e) {
    let n = this.callbackMap[e];
    return n || (n = this.callbackMap[e] = (r) => {
      this.handleValue(r, String(e));
    }), n;
  }
  collect(e, n, r) {
    return Eu(this.currentMap, e, n, r);
  }
  getAll() {
    return Ar(this.currentMap);
  }
}
function Ch(t) {
  let e = Cu(t, ".fc-scrollgrid-shrink"), n = 0;
  for (let r of e)
    n = Math.max(n, Fu(r));
  return Math.ceil(n);
}
function wo(t, e) {
  return t.liquid && e.liquid;
}
function Th(t, e) {
  return e.maxHeight != null || wo(t, e);
}
function _h(t, e, n, r) {
  let { expandRows: i } = n;
  return typeof e.content == "function" ? e.content(n) : f("table", {
    role: "presentation",
    className: [
      e.tableClassName,
      t.syncRowHeights ? "fc-scrollgrid-sync-table" : ""
    ].join(" "),
    style: {
      minWidth: n.tableMinWidth,
      width: n.clientWidth,
      height: i ? n.clientHeight : ""
    }
  }, n.tableColGroupNode, f(r ? "thead" : "tbody", {
    role: "presentation"
  }, typeof e.rowContent == "function" ? e.rowContent(n) : e.rowContent));
}
function Rh(t, e) {
  return He(t, e, se);
}
function xh(t, e) {
  let n = [];
  for (let r of t) {
    let i = r.span || 1;
    for (let s = 0; s < i; s += 1)
      n.push(f("col", { style: {
        width: r.width === "shrink" ? kh(e) : r.width || "",
        minWidth: r.minWidth || ""
      } }));
  }
  return f("colgroup", {}, ...n);
}
function kh(t) {
  return t ?? 4;
}
function Ih(t) {
  for (let e of t)
    if (e.width === "shrink")
      return !0;
  return !1;
}
function Mh(t, e) {
  let n = [
    "fc-scrollgrid",
    e.theme.getClass("table")
  ];
  return t && n.push("fc-scrollgrid-liquid"), n;
}
function Nh(t, e) {
  let n = [
    "fc-scrollgrid-section",
    `fc-scrollgrid-section-${t.type}`,
    t.className
  ];
  return e && t.liquid && t.maxHeight == null && n.push("fc-scrollgrid-section-liquid"), t.isSticky && n.push("fc-scrollgrid-section-sticky"), n;
}
function sr(t) {
  return f("div", { className: "fc-scrollgrid-sticky-shim", style: {
    width: t.clientWidth,
    minWidth: t.tableMinWidth
  } });
}
function on(t) {
  let { stickyHeaderDates: e } = t;
  return (e == null || e === "auto") && (e = t.height === "auto" || t.viewHeight === "auto"), e;
}
function Eo(t) {
  let { stickyFooterScrollbar: e } = t;
  return (e == null || e === "auto") && (e = t.height === "auto" || t.viewHeight === "auto"), e;
}
class Br extends N {
  constructor() {
    super(...arguments), this.processCols = A((e) => e, Rh), this.renderMicroColGroup = A(xh), this.scrollerRefs = new he(), this.scrollerElRefs = new he(this._handleScrollerEl.bind(this)), this.state = {
      shrinkWidth: null,
      forceYScrollbars: !1,
      scrollerClientWidths: {},
      scrollerClientHeights: {}
    }, this.handleSizing = () => {
      this.safeSetState(Object.assign({ shrinkWidth: this.computeShrinkWidth() }, this.computeScrollerDims()));
    };
  }
  render() {
    let { props: e, state: n, context: r } = this, i = e.sections || [], s = this.processCols(e.cols), a = this.renderMicroColGroup(s, n.shrinkWidth), o = Mh(e.liquid, r);
    e.collapsibleWidth && o.push("fc-scrollgrid-collapsible");
    let l = i.length, c = 0, u, m = [], h = [], d = [];
    for (; c < l && (u = i[c]).type === "header"; )
      m.push(this.renderSection(u, a, !0)), c += 1;
    for (; c < l && (u = i[c]).type === "body"; )
      h.push(this.renderSection(u, a, !1)), c += 1;
    for (; c < l && (u = i[c]).type === "footer"; )
      d.push(this.renderSection(u, a, !0)), c += 1;
    let p = !co();
    const y = { role: "rowgroup" };
    return f("table", {
      role: "grid",
      className: o.join(" "),
      style: { height: e.height }
    }, Boolean(!p && m.length) && f("thead", y, ...m), Boolean(!p && h.length) && f("tbody", y, ...h), Boolean(!p && d.length) && f("tfoot", y, ...d), p && f("tbody", y, ...m, ...h, ...d));
  }
  renderSection(e, n, r) {
    return "outerContent" in e ? f(O, { key: e.key }, e.outerContent) : f("tr", { key: e.key, role: "presentation", className: Nh(e, this.props.liquid).join(" ") }, this.renderChunkTd(e, n, e.chunk, r));
  }
  renderChunkTd(e, n, r, i) {
    if ("outerContent" in r)
      return r.outerContent;
    let { props: s } = this, { forceYScrollbars: a, scrollerClientWidths: o, scrollerClientHeights: l } = this.state, c = Th(s, e), u = wo(s, e), m = s.liquid ? a ? "scroll" : c ? "auto" : "hidden" : "visible", h = e.key, d = _h(e, r, {
      tableColGroupNode: n,
      tableMinWidth: "",
      clientWidth: !s.collapsibleWidth && o[h] !== void 0 ? o[h] : null,
      clientHeight: l[h] !== void 0 ? l[h] : null,
      expandRows: e.expandRows,
      syncRowHeights: !1,
      rowSyncHeights: [],
      reportRowHeightChange: () => {
      }
    }, i);
    return f(i ? "th" : "td", {
      ref: r.elRef,
      role: "presentation"
    }, f(
      "div",
      { className: `fc-scroller-harness${u ? " fc-scroller-harness-liquid" : ""}` },
      f(bo, { ref: this.scrollerRefs.createRef(h), elRef: this.scrollerElRefs.createRef(h), overflowY: m, overflowX: s.liquid ? "hidden" : "visible", maxHeight: e.maxHeight, liquid: u, liquidIsAbsolute: !0 }, d)
    ));
  }
  _handleScrollerEl(e, n) {
    let r = Oh(this.props.sections, n);
    r && Be(r.chunk.scrollerElRef, e);
  }
  componentDidMount() {
    this.handleSizing(), this.context.addResizeHandler(this.handleSizing);
  }
  componentDidUpdate() {
    this.handleSizing();
  }
  componentWillUnmount() {
    this.context.removeResizeHandler(this.handleSizing);
  }
  computeShrinkWidth() {
    return Ih(this.props.cols) ? Ch(this.scrollerElRefs.getAll()) : 0;
  }
  computeScrollerDims() {
    let e = fh(), { scrollerRefs: n, scrollerElRefs: r } = this, i = !1, s = {}, a = {};
    for (let o in n.currentMap) {
      let l = n.currentMap[o];
      if (l && l.needsYScrolling()) {
        i = !0;
        break;
      }
    }
    for (let o of this.props.sections) {
      let l = o.key, c = r.currentMap[l];
      if (c) {
        let u = c.parentNode;
        s[l] = Math.floor(u.getBoundingClientRect().width - (i ? e.y : 0)), a[l] = Math.floor(u.getBoundingClientRect().height);
      }
    }
    return { forceYScrollbars: i, scrollerClientWidths: s, scrollerClientHeights: a };
  }
}
Br.addStateEquality({
  scrollerClientWidths: se,
  scrollerClientHeights: se
});
function Oh(t, e) {
  for (let n of t)
    if (n.key === e)
      return n;
  return null;
}
class pn extends N {
  constructor() {
    super(...arguments), this.handleEl = (e) => {
      e && kf(e, this.props.seg);
    };
  }
  render() {
    const { props: e, context: n } = this, { options: r } = n, { seg: i } = e, { eventRange: s } = i, { ui: a } = s, o = {
      event: new ee(n, s.def, s.instance),
      view: n.viewApi,
      timeText: e.timeText,
      textColor: a.textColor,
      backgroundColor: a.backgroundColor,
      borderColor: a.borderColor,
      isDraggable: !e.disableDragging && Mf(i, n),
      isStartResizable: !e.disableResizing && Nf(i, n),
      isEndResizable: !e.disableResizing && Of(i),
      isMirror: Boolean(e.isDragging || e.isResizing || e.isDateSelecting),
      isStart: Boolean(i.isStart),
      isEnd: Boolean(i.isEnd),
      isPast: Boolean(e.isPast),
      isFuture: Boolean(e.isFuture),
      isToday: Boolean(e.isToday),
      isSelected: Boolean(e.isSelected),
      isDragging: Boolean(e.isDragging),
      isResizing: Boolean(e.isResizing)
    };
    return f(j, Object.assign({}, e, { elRef: this.handleEl, elClasses: [
      ...Ff(o),
      ...i.eventRange.ui.classNames,
      ...e.elClasses || []
    ], renderProps: o, generatorName: "eventContent", generator: r.eventContent || e.defaultGenerator, classNameGenerator: r.eventClassNames, didMount: r.eventDidMount, willUnmount: r.eventWillUnmount }));
  }
}
class Ao extends N {
  render() {
    let { props: e, context: n } = this, { options: r } = n, { seg: i } = e, { ui: s } = i.eventRange, a = r.eventTimeFormat || e.defaultTimeFormat, o = pt(i, a, n, e.defaultDisplayEventTime, e.defaultDisplayEventEnd);
    return f(pn, Object.assign({}, e, { elTag: "a", elStyle: {
      borderColor: s.borderColor,
      backgroundColor: s.backgroundColor
    }, elAttrs: Fr(i, n), defaultGenerator: Fh, timeText: o }), (l, c) => f(
      O,
      null,
      f(l, { elTag: "div", elClasses: ["fc-event-main"], elStyle: { color: c.textColor } }),
      Boolean(c.isStartResizable) && f("div", { className: "fc-event-resizer fc-event-resizer-start" }),
      Boolean(c.isEndResizable) && f("div", { className: "fc-event-resizer fc-event-resizer-end" })
    ));
  }
}
function Fh(t) {
  return f(
    "div",
    { className: "fc-event-main-frame" },
    t.timeText && f("div", { className: "fc-event-time" }, t.timeText),
    f(
      "div",
      { className: "fc-event-title-container" },
      f("div", { className: "fc-event-title fc-sticky" }, t.event.title || f(O, null, " "))
    )
  );
}
const Lr = (t) => f(ve.Consumer, null, (e) => {
  let { options: n } = e, r = {
    isAxis: t.isAxis,
    date: e.dateEnv.toDate(t.date),
    view: e.viewApi
  };
  return f(j, Object.assign({}, t, { elTag: t.elTag || "div", renderProps: r, generatorName: "nowIndicatorContent", generator: n.nowIndicatorContent, classNameGenerator: n.nowIndicatorClassNames, didMount: n.nowIndicatorDidMount, willUnmount: n.nowIndicatorWillUnmount }));
}), Hh = H({ day: "numeric" });
class zr extends N {
  constructor() {
    super(...arguments), this.refineRenderProps = Vt(Ph);
  }
  render() {
    let { props: e, context: n } = this, { options: r } = n, i = this.refineRenderProps({
      date: e.date,
      dateProfile: e.dateProfile,
      todayRange: e.todayRange,
      showDayNumber: e.showDayNumber,
      extraRenderProps: e.extraRenderProps,
      viewApi: n.viewApi,
      dateEnv: n.dateEnv
    });
    return f(j, Object.assign({}, e, { elClasses: [
      ...gn(i, n.theme),
      ...e.elClasses || []
    ], elAttrs: Object.assign(Object.assign({}, e.elAttrs), i.isDisabled ? {} : { "data-date": hn(e.date) }), renderProps: i, generatorName: "dayCellContent", generator: r.dayCellContent || e.defaultGenerator, classNameGenerator: i.isDisabled ? void 0 : r.dayCellClassNames, didMount: r.dayCellDidMount, willUnmount: r.dayCellWillUnmount }));
  }
}
function Ur(t) {
  return Boolean(t.dayCellContent || La("dayCellContent", t));
}
function Ph(t) {
  let { date: e, dateEnv: n } = t, r = Hr(e, t.todayRange, null, t.dateProfile);
  return Object.assign(Object.assign(Object.assign({ date: n.toDate(e), view: t.viewApi }, r), { dayNumberText: t.showDayNumber ? n.format(e, Hh) : "" }), t.extraRenderProps);
}
class So extends N {
  render() {
    let { props: e } = this, { seg: n } = e;
    return f(pn, { elTag: "div", elClasses: ["fc-bg-event"], elStyle: { backgroundColor: n.eventRange.ui.backgroundColor }, defaultGenerator: Bh, seg: n, timeText: "", isDragging: !1, isResizing: !1, isDateSelecting: !1, isSelected: !1, isPast: e.isPast, isFuture: e.isFuture, isToday: e.isToday, disableDragging: !0, disableResizing: !0 });
  }
}
function Bh(t) {
  let { title: e } = t.event;
  return e && f("div", { className: "fc-event-title" }, t.event.title);
}
function Do(t) {
  return f("div", { className: `fc-${t}` });
}
const Co = (t) => f(ve.Consumer, null, (e) => {
  let { dateEnv: n, options: r } = e, { date: i } = t, s = r.weekNumberFormat || t.defaultFormat, a = n.computeWeekNumber(i), o = n.format(i, s);
  return f(
    j,
    Object.assign({}, t, { renderProps: { num: a, text: o, date: i }, generatorName: "weekNumberContent", generator: r.weekNumberContent || Lh, classNameGenerator: r.weekNumberClassNames, didMount: r.weekNumberDidMount, willUnmount: r.weekNumberWillUnmount })
  );
});
function Lh(t) {
  return t.text;
}
const Pn = 10;
class zh extends N {
  constructor() {
    super(...arguments), this.state = {
      titleId: De()
    }, this.handleRootEl = (e) => {
      this.rootEl = e, this.props.elRef && Be(this.props.elRef, e);
    }, this.handleDocumentMouseDown = (e) => {
      const n = Ru(e);
      this.rootEl.contains(n) || this.handleCloseClick();
    }, this.handleDocumentKeyDown = (e) => {
      e.key === "Escape" && this.handleCloseClick();
    }, this.handleCloseClick = () => {
      let { onClose: e } = this.props;
      e && e();
    };
  }
  render() {
    let { theme: e, options: n } = this.context, { props: r, state: i } = this, s = [
      "fc-popover",
      e.getClass("popover")
    ].concat(r.extraClassNames || []);
    return fu(f(
      "div",
      Object.assign({}, r.extraAttrs, { id: r.id, className: s.join(" "), "aria-labelledby": i.titleId, ref: this.handleRootEl }),
      f(
        "div",
        { className: "fc-popover-header " + e.getClass("popoverHeader") },
        f("span", { className: "fc-popover-title", id: i.titleId }, r.title),
        f("span", { className: "fc-popover-close " + e.getIconClass("close"), title: n.closeHint, onClick: this.handleCloseClick })
      ),
      f("div", { className: "fc-popover-body " + e.getClass("popoverContent") }, r.children)
    ), r.parentEl);
  }
  componentDidMount() {
    document.addEventListener("mousedown", this.handleDocumentMouseDown), document.addEventListener("keydown", this.handleDocumentKeyDown), this.updateSize();
  }
  componentWillUnmount() {
    document.removeEventListener("mousedown", this.handleDocumentMouseDown), document.removeEventListener("keydown", this.handleDocumentKeyDown);
  }
  updateSize() {
    let { isRtl: e } = this.context, { alignmentEl: n, alignGridTop: r } = this.props, { rootEl: i } = this, s = gh(n);
    if (s) {
      let a = i.getBoundingClientRect(), o = r ? de(n, ".fc-scrollgrid").getBoundingClientRect().top : s.top, l = e ? s.right - a.width : s.left;
      o = Math.max(o, Pn), l = Math.min(l, document.documentElement.clientWidth - Pn - a.width), l = Math.max(l, Pn);
      let c = i.offsetParent.getBoundingClientRect();
      _u(i, {
        top: o - c.top,
        left: l - c.left
      });
    }
  }
}
class Uh extends ue {
  constructor() {
    super(...arguments), this.handleRootEl = (e) => {
      this.rootEl = e, e ? this.context.registerInteractiveComponent(this, {
        el: e,
        useEventCenter: !1
      }) : this.context.unregisterInteractiveComponent(this);
    };
  }
  render() {
    let { options: e, dateEnv: n } = this.context, { props: r } = this, { startDate: i, todayRange: s, dateProfile: a } = r, o = n.format(i, e.dayPopoverFormat);
    return f(zr, { elRef: this.handleRootEl, date: i, dateProfile: a, todayRange: s }, (l, c, u) => f(
      zh,
      { elRef: u.ref, id: r.id, title: o, extraClassNames: ["fc-more-popover"].concat(u.className || []), extraAttrs: u, parentEl: r.parentEl, alignmentEl: r.alignmentEl, alignGridTop: r.alignGridTop, onClose: r.onClose },
      Ur(e) && f(l, { elTag: "div", elClasses: ["fc-more-popover-misc"] }),
      r.children
    ));
  }
  queryHit(e, n, r, i) {
    let { rootEl: s, props: a } = this;
    return e >= 0 && e < r && n >= 0 && n < i ? {
      dateProfile: a.dateProfile,
      dateSpan: Object.assign({ allDay: !0, range: {
        start: a.startDate,
        end: a.endDate
      } }, a.extraDateSpan),
      dayEl: s,
      rect: {
        left: 0,
        top: 0,
        right: r,
        bottom: i
      },
      layer: 1
    } : null;
  }
}
class To extends N {
  constructor() {
    super(...arguments), this.linkElRef = q(), this.state = {
      isPopoverOpen: !1,
      popoverId: De()
    }, this.handleClick = (e) => {
      let { props: n, context: r } = this, { moreLinkClick: i } = r.options, s = rs(n).start;
      function a(o) {
        let { def: l, instance: c, range: u } = o.eventRange;
        return {
          event: new ee(r, l, c),
          start: r.dateEnv.toDate(u.start),
          end: r.dateEnv.toDate(u.end),
          isStart: o.isStart,
          isEnd: o.isEnd
        };
      }
      typeof i == "function" && (i = i({
        date: s,
        allDay: Boolean(n.allDayDate),
        allSegs: n.allSegs.map(a),
        hiddenSegs: n.hiddenSegs.map(a),
        jsEvent: e,
        view: r.viewApi
      })), !i || i === "popover" ? this.setState({ isPopoverOpen: !0 }) : typeof i == "string" && r.calendarApi.zoomTo(s, i);
    }, this.handlePopoverClose = () => {
      this.setState({ isPopoverOpen: !1 });
    };
  }
  render() {
    let { props: e, state: n } = this;
    return f(ve.Consumer, null, (r) => {
      let { viewApi: i, options: s, calendarApi: a } = r, { moreLinkText: o } = s, { moreCnt: l } = e, c = rs(e), u = typeof o == "function" ? o.call(a, l) : `+${l} ${o}`, m = mt(s.moreLinkHint, [l], u), h = {
        num: l,
        shortText: `+${l}`,
        text: u,
        view: i
      };
      return f(
        O,
        null,
        Boolean(e.moreCnt) && f(j, { elTag: e.elTag || "a", elRef: this.linkElRef, elClasses: [
          ...e.elClasses || [],
          "fc-more-link"
        ], elAttrs: Object.assign(Object.assign(Object.assign({}, e.elAttrs), Na(this.handleClick)), { title: m, "aria-expanded": n.isPopoverOpen, "aria-controls": n.isPopoverOpen ? n.popoverId : "" }), renderProps: h, generatorName: "moreLinkContent", generator: s.moreLinkContent || e.defaultGenerator || Vh, classNameGenerator: s.moreLinkClassNames, didMount: s.moreLinkDidMount, willUnmount: s.moreLinkWillUnmount }, e.children),
        n.isPopoverOpen && f(Uh, { id: n.popoverId, startDate: c.start, endDate: c.end, dateProfile: e.dateProfile, todayRange: e.todayRange, extraDateSpan: e.extraDateSpan, parentEl: this.parentEl, alignmentEl: e.alignmentElRef ? e.alignmentElRef.current : this.linkElRef.current, alignGridTop: e.alignGridTop, onClose: this.handlePopoverClose }, e.popoverContent())
      );
    });
  }
  componentDidMount() {
    this.updateParentEl();
  }
  componentDidUpdate() {
    this.updateParentEl();
  }
  updateParentEl() {
    this.linkElRef.current && (this.parentEl = de(this.linkElRef.current, ".fc-view-harness"));
  }
}
function Vh(t) {
  return t.text;
}
function rs(t) {
  if (t.allDayDate)
    return {
      start: t.allDayDate,
      end: W(t.allDayDate, 1)
    };
  let { hiddenSegs: e } = t;
  return {
    start: _o(e),
    end: jh(e)
  };
}
function _o(t) {
  return t.reduce(Wh).eventRange.range.start;
}
function Wh(t, e) {
  return t.eventRange.range.start < e.eventRange.range.start ? t : e;
}
function jh(t) {
  return t.reduce(Gh).eventRange.range.end;
}
function Gh(t, e) {
  return t.eventRange.range.end > e.eventRange.range.end ? t : e;
}
var qh = ':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-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-unselectable{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:none;user-select:none}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@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;-webkit-user-select: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 .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button::-moz-focus-inner{border-style:none;padding:0}.fc .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;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .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 .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 .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .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 .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .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 .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.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 .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-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-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius: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 .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .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)}';
fn(qh);
const Ro = {
  code: "en",
  week: {
    dow: 0,
    doy: 4
  },
  direction: "ltr",
  buttonText: {
    prev: "prev",
    next: "next",
    prevYear: "prev year",
    nextYear: "next year",
    year: "year",
    today: "today",
    month: "month",
    week: "week",
    day: "day",
    list: "list"
  },
  weekText: "W",
  weekTextLong: "Week",
  closeHint: "Close",
  timeHint: "Time",
  eventHint: "Event",
  allDayText: "all-day",
  moreLinkText: "more",
  noEventsText: "No events to display"
}, xo = Object.assign(Object.assign({}, Ro), {
  buttonHints: {
    prev: "Previous $0",
    next: "Next $0",
    today(t, e) {
      return e === "day" ? "Today" : `This ${t}`;
    }
  },
  viewHint: "$0 view",
  navLinkHint: "Go to $0",
  moreLinkHint(t) {
    return `Show ${t} more event${t === 1 ? "" : "s"}`;
  }
});
function Zh(t) {
  let e = t.length > 0 ? t[0].code : "en", n = Au.concat(t), r = {
    en: xo
  };
  for (let i of n)
    r[i.code] = i;
  return {
    map: r,
    defaultCode: e
  };
}
function ko(t, e) {
  return typeof t == "object" && !Array.isArray(t) ? Io(t.code, [t.code], t) : Qh(t, e);
}
function Qh(t, e) {
  let n = [].concat(t || []), r = Yh(n, e) || xo;
  return Io(t, n, r);
}
function Yh(t, e) {
  for (let n = 0; n < t.length; n += 1) {
    let r = t[n].toLocaleLowerCase().split("-");
    for (let i = r.length; i > 0; i -= 1) {
      let s = r.slice(0, i).join("-");
      if (e[s])
        return e[s];
    }
  }
  return null;
}
function Io(t, e, n) {
  let r = Er([Ro, n], ["buttonText"]);
  delete r.code;
  let { week: i } = r;
  return delete r.week, {
    codeArg: t,
    codes: e,
    week: i,
    simpleNumberFormat: new Intl.NumberFormat(t),
    options: r
  };
}
class _e extends Ct {
}
_e.prototype.classes = {
  root: "fc-theme-standard",
  tableCellShaded: "fc-cell-shaded",
  buttonGroup: "fc-button-group",
  button: "fc-button fc-button-primary",
  buttonActive: "fc-button-active"
};
_e.prototype.baseIconClass = "fc-icon";
_e.prototype.iconClasses = {
  close: "fc-icon-x",
  prev: "fc-icon-chevron-left",
  next: "fc-icon-chevron-right",
  prevYear: "fc-icon-chevrons-left",
  nextYear: "fc-icon-chevrons-right"
};
_e.prototype.rtlIconClasses = {
  prev: "fc-icon-chevron-right",
  next: "fc-icon-chevron-left",
  prevYear: "fc-icon-chevrons-right",
  nextYear: "fc-icon-chevrons-left"
};
_e.prototype.iconOverrideOption = "buttonIcons";
_e.prototype.iconOverrideCustomButtonOption = "icon";
_e.prototype.iconOverridePrefix = "fc-icon-";
function $h(t, e) {
  let n = {}, r;
  for (r in t)
    ar(r, n, t, e);
  for (r in e)
    ar(r, n, t, e);
  return n;
}
function ar(t, e, n, r) {
  if (e[t])
    return e[t];
  let i = Jh(t, e, n, r);
  return i && (e[t] = i), i;
}
function Jh(t, e, n, r) {
  let i = n[t], s = r[t], a = (u) => i && i[u] !== null ? i[u] : s && s[u] !== null ? s[u] : null, o = a("component"), l = a("superType"), c = null;
  if (l) {
    if (l === t)
      throw new Error("Can't have a custom view type that references itself");
    c = ar(l, e, n, r);
  }
  return !o && c && (o = c.component), o ? {
    type: t,
    component: o,
    defaults: Object.assign(Object.assign({}, c ? c.defaults : {}), i ? i.rawOptions : {}),
    overrides: Object.assign(Object.assign({}, c ? c.overrides : {}), s ? s.rawOptions : {})
  } : null;
}
function is(t) {
  return Fe(t, Kh);
}
function Kh(t) {
  let e = typeof t == "function" ? { component: t } : t, { component: n } = e;
  return e.content && (n = Xh(e)), {
    superType: e.type,
    component: n,
    rawOptions: e
  };
}
function Xh(t) {
  return (e) => f(ve.Consumer, null, (n) => f(j, { elTag: "div", elClasses: Va(n.viewSpec), renderProps: Object.assign(Object.assign({}, e), { nextDayThreshold: n.options.nextDayThreshold }), generatorName: void 0, generator: t.content, classNameGenerator: t.classNames, didMount: t.didMount, willUnmount: t.willUnmount }));
}
function em(t, e, n, r) {
  let i = is(t), s = is(e.views), a = $h(i, s);
  return Fe(a, (o) => tm(o, s, e, n, r));
}
function tm(t, e, n, r, i) {
  let s = t.overrides.duration || t.defaults.duration || r.duration || n.duration, a = null, o = "", l = "", c = {};
  if (s && (a = nm(s), a)) {
    let h = Kn(a);
    o = h.unit, h.value === 1 && (l = o, c = e[o] ? e[o].rawOptions : {});
  }
  let u = (h) => {
    let d = h.buttonText || {}, p = t.defaults.buttonTextKey;
    return p != null && d[p] != null ? d[p] : d[t.type] != null ? d[t.type] : d[l] != null ? d[l] : null;
  }, m = (h) => {
    let d = h.buttonHints || {}, p = t.defaults.buttonTextKey;
    return p != null && d[p] != null ? d[p] : d[t.type] != null ? d[t.type] : d[l] != null ? d[l] : null;
  };
  return {
    type: t.type,
    component: t.component,
    duration: a,
    durationUnit: o,
    singleUnit: l,
    optionDefaults: t.defaults,
    optionOverrides: Object.assign(Object.assign({}, c), t.overrides),
    buttonTextOverride: u(r) || u(n) || t.overrides.buttonText,
    buttonTextDefault: u(i) || t.defaults.buttonText || u(gt) || t.type,
    buttonTitleOverride: m(r) || m(n) || t.overrides.buttonHint,
    buttonTitleDefault: m(i) || t.defaults.buttonHint || m(gt)
  };
}
let ss = {};
function nm(t) {
  let e = JSON.stringify(t), n = ss[e];
  return n === void 0 && (n = k(t), ss[e] = n), n;
}
function rm(t, e) {
  switch (e.type) {
    case "CHANGE_VIEW_TYPE":
      t = e.viewType;
  }
  return t;
}
function im(t, e) {
  switch (e.type) {
    case "SET_OPTION":
      return Object.assign(Object.assign({}, t), { [e.optionName]: e.rawOptionValue });
    default:
      return t;
  }
}
function sm(t, e, n, r) {
  let i;
  switch (e.type) {
    case "CHANGE_VIEW_TYPE":
      return r.build(e.dateMarker || n);
    case "CHANGE_DATE":
      return r.build(e.dateMarker);
    case "PREV":
      if (i = r.buildPrev(t, n), i.isValid)
        return i;
      break;
    case "NEXT":
      if (i = r.buildNext(t, n), i.isValid)
        return i;
      break;
  }
  return t;
}
function am(t, e) {
  switch (e.type) {
    case "UNSELECT_DATES":
      return null;
    case "SELECT_DATES":
      return e.selection;
    default:
      return t;
  }
}
function om(t, e) {
  switch (e.type) {
    case "UNSELECT_EVENT":
      return "";
    case "SELECT_EVENT":
      return e.eventInstanceId;
    default:
      return t;
  }
}
function lm(t, e) {
  let n;
  switch (e.type) {
    case "UNSET_EVENT_DRAG":
      return null;
    case "SET_EVENT_DRAG":
      return n = e.state, {
        affectedEvents: n.affectedEvents,
        mutatedEvents: n.mutatedEvents,
        isEvent: n.isEvent
      };
    default:
      return t;
  }
}
function cm(t, e) {
  let n;
  switch (e.type) {
    case "UNSET_EVENT_RESIZE":
      return null;
    case "SET_EVENT_RESIZE":
      return n = e.state, {
        affectedEvents: n.affectedEvents,
        mutatedEvents: n.mutatedEvents,
        isEvent: n.isEvent
      };
    default:
      return t;
  }
}
function um(t, e, n, r, i) {
  let s = t.headerToolbar ? as(t.headerToolbar, t, e, n, r, i) : null, a = t.footerToolbar ? as(t.footerToolbar, t, e, n, r, i) : null;
  return { header: s, footer: a };
}
function as(t, e, n, r, i, s) {
  let a = {}, o = [], l = !1;
  for (let c in t) {
    let u = t[c], m = dm(u, e, n, r, i, s);
    a[c] = m.widgets, o.push(...m.viewsWithButtons), l = l || m.hasTitle;
  }
  return { sectionWidgets: a, viewsWithButtons: o, hasTitle: l };
}
function dm(t, e, n, r, i, s) {
  let a = e.direction === "rtl", o = e.customButtons || {}, l = n.buttonText || {}, c = e.buttonText || {}, u = n.buttonHints || {}, m = e.buttonHints || {}, h = t ? t.split(" ") : [], d = [], p = !1;
  return { widgets: h.map((v) => v.split(",").map((b) => {
    if (b === "title")
      return p = !0, { buttonName: b };
    let E, T, C, I, P, z;
    if (E = o[b])
      C = (_) => {
        E.click && E.click.call(_.target, _, _.target);
      }, (I = r.getCustomButtonIconClass(E)) || (I = r.getIconClass(b, a)) || (P = E.text), z = E.hint || E.text;
    else if (T = i[b]) {
      d.push(b), C = () => {
        s.changeView(b);
      }, (P = T.buttonTextOverride) || (I = r.getIconClass(b, a)) || (P = T.buttonTextDefault);
      let _ = T.buttonTextOverride || T.buttonTextDefault;
      z = mt(
        T.buttonTitleOverride || T.buttonTitleDefault || e.viewHint,
        [_, b],
        _
      );
    } else if (s[b])
      if (C = () => {
        s[b]();
      }, (P = l[b]) || (I = r.getIconClass(b, a)) || (P = c[b]), b === "prevYear" || b === "nextYear") {
        let _ = b === "prevYear" ? "prev" : "next";
        z = mt(u[_] || m[_], [
          c.year || "year",
          "year"
        ], c[b]);
      } else
        z = (_) => mt(u[b] || m[b], [
          c[_] || _,
          _
        ], c[b]);
    return { buttonName: b, buttonClick: C, buttonIcon: I, buttonText: P, buttonHint: z };
  })), viewsWithButtons: d, hasTitle: p };
}
class fm {
  constructor(e, n, r) {
    this.type = e, this.getCurrentData = n, this.dateEnv = r;
  }
  get calendar() {
    return this.getCurrentData().calendarApi;
  }
  get title() {
    return this.getCurrentData().viewTitle;
  }
  get activeStart() {
    return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start);
  }
  get activeEnd() {
    return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end);
  }
  get currentStart() {
    return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start);
  }
  get currentEnd() {
    return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end);
  }
  getOption(e) {
    return this.getCurrentData().options[e];
  }
}
class hm {
  constructor(e, n) {
    this.runTaskOption = e, this.drainedOption = n, this.queue = [], this.delayedRunner = new wr(this.drain.bind(this));
  }
  request(e, n) {
    this.queue.push(e), this.delayedRunner.request(n);
  }
  pause(e) {
    this.delayedRunner.pause(e);
  }
  resume(e, n) {
    this.delayedRunner.resume(e, n);
  }
  drain() {
    let { queue: e } = this;
    for (; e.length; ) {
      let n = [], r;
      for (; r = e.shift(); )
        this.runTask(r), n.push(r);
      this.drained(n);
    }
  }
  runTask(e) {
    this.runTaskOption && this.runTaskOption(e);
  }
  drained(e) {
    this.drainedOption && this.drainedOption(e);
  }
}
function mm(t, e, n) {
  let r;
  return /^(year|month)$/.test(t.currentRangeUnit) ? r = t.currentRange : r = t.activeRange, n.formatRange(r.start, r.end, H(e.titleFormat || gm(t)), {
    isEndExclusive: t.isRangeAllDay,
    defaultSeparator: e.titleRangeSeparator
  });
}
function gm(t) {
  let { currentRangeUnit: e } = t;
  if (e === "year")
    return { year: "numeric" };
  if (e === "month")
    return { year: "numeric", month: "long" };
  let n = en(t.currentRange.start, t.currentRange.end);
  return n !== null && n > 1 ? { year: "numeric", month: "short", day: "numeric" } : { year: "numeric", month: "long", day: "numeric" };
}
class pm {
  constructor(e) {
    this.computeOptionsData = A(this._computeOptionsData), this.computeCurrentViewData = A(this._computeCurrentViewData), this.organizeRawLocales = A(Zh), this.buildLocale = A(ko), this.buildPluginHooks = Pu(), this.buildDateEnv = A(vm), this.buildTheme = A(ym), this.parseToolbars = A(um), this.buildViewSpecs = A(em), this.buildDateProfileGenerator = Vt(bm), this.buildViewApi = A(wm), this.buildViewUiProps = Vt(Sm), this.buildEventUiBySource = A(Em, se), this.buildEventUiBases = A(Am), this.parseContextBusinessHours = Vt(Dm), this.buildTitle = A(mm), this.emitter = new gf(), this.actionRunner = new hm(this._handleAction.bind(this), this.updateData.bind(this)), this.currentCalendarOptionsInput = {}, this.currentCalendarOptionsRefined = {}, this.currentViewOptionsInput = {}, this.currentViewOptionsRefined = {}, this.currentCalendarOptionsRefiners = {}, this.getCurrentData = () => this.data, this.dispatch = (h) => {
      this.actionRunner.request(h);
    }, this.props = e, this.actionRunner.pause();
    let n = {}, r = this.computeOptionsData(e.optionOverrides, n, e.calendarApi), i = r.calendarOptions.initialView || r.pluginHooks.initialView, s = this.computeCurrentViewData(i, r, e.optionOverrides, n);
    e.calendarApi.currentDataManager = this, this.emitter.setThisContext(e.calendarApi), this.emitter.setOptions(s.options);
    let a = Ud(r.calendarOptions, r.dateEnv), o = s.dateProfileGenerator.build(a);
    Ce(o.activeRange, a) || (a = o.currentRange.start);
    let l = {
      dateEnv: r.dateEnv,
      options: r.calendarOptions,
      pluginHooks: r.pluginHooks,
      calendarApi: e.calendarApi,
      dispatch: this.dispatch,
      emitter: this.emitter,
      getCurrentData: this.getCurrentData
    };
    for (let h of r.pluginHooks.contextInit)
      h(l);
    let c = tf(r.calendarOptions, o, l), u = {
      dynamicOptionOverrides: n,
      currentViewType: i,
      currentDate: a,
      dateProfile: o,
      businessHours: this.parseContextBusinessHours(l),
      eventSources: c,
      eventUiBases: {},
      eventStore: pe(),
      renderableEventStore: pe(),
      dateSelection: null,
      eventSelection: "",
      eventDrag: null,
      eventResize: null,
      selectionConfig: this.buildViewUiProps(l).selectionConfig
    }, m = Object.assign(Object.assign({}, l), u);
    for (let h of r.pluginHooks.reducers)
      Object.assign(u, h(null, null, m));
    Bn(u, l) && this.emitter.trigger("loading", !0), this.state = u, this.updateData(), this.actionRunner.resume();
  }
  resetOptions(e, n) {
    let { props: r } = this;
    r.optionOverrides = n ? Object.assign(Object.assign({}, r.optionOverrides), e) : e, this.actionRunner.request({
      type: "NOTHING"
    });
  }
  _handleAction(e) {
    let { props: n, state: r, emitter: i } = this, s = im(r.dynamicOptionOverrides, e), a = this.computeOptionsData(n.optionOverrides, s, n.calendarApi), o = rm(r.currentViewType, e), l = this.computeCurrentViewData(o, a, n.optionOverrides, s);
    n.calendarApi.currentDataManager = this, i.setThisContext(n.calendarApi), i.setOptions(l.options);
    let c = {
      dateEnv: a.dateEnv,
      options: a.calendarOptions,
      pluginHooks: a.pluginHooks,
      calendarApi: n.calendarApi,
      dispatch: this.dispatch,
      emitter: i,
      getCurrentData: this.getCurrentData
    }, { currentDate: u, dateProfile: m } = r;
    this.data && this.data.dateProfileGenerator !== l.dateProfileGenerator && (m = l.dateProfileGenerator.build(u)), u = zd(u, e), m = sm(m, e, u, l.dateProfileGenerator), (e.type === "PREV" || e.type === "NEXT" || !Ce(m.currentRange, u)) && (u = m.currentRange.start);
    let h = nf(r.eventSources, e, m, c), d = uf(r.eventStore, e, h, m, c), y = Ja(h) && !l.options.progressiveEventRendering && r.renderableEventStore || d, { eventUiSingleBase: v, selectionConfig: b } = this.buildViewUiProps(c), E = this.buildEventUiBySource(h), T = this.buildEventUiBases(y.defs, v, E), C = {
      dynamicOptionOverrides: s,
      currentViewType: o,
      currentDate: u,
      dateProfile: m,
      eventSources: h,
      eventStore: d,
      renderableEventStore: y,
      selectionConfig: b,
      eventUiBases: T,
      businessHours: this.parseContextBusinessHours(c),
      dateSelection: am(r.dateSelection, e),
      eventSelection: om(r.eventSelection, e),
      eventDrag: lm(r.eventDrag, e),
      eventResize: cm(r.eventResize, e)
    }, I = Object.assign(Object.assign({}, c), C);
    for (let _ of a.pluginHooks.reducers)
      Object.assign(C, _(r, e, I));
    let P = Bn(r, c), z = Bn(C, c);
    !P && z ? i.trigger("loading", !0) : P && !z && i.trigger("loading", !1), this.state = C, n.onAction && n.onAction(e);
  }
  updateData() {
    let { props: e, state: n } = this, r = this.data, i = this.computeOptionsData(e.optionOverrides, n.dynamicOptionOverrides, e.calendarApi), s = this.computeCurrentViewData(n.currentViewType, i, e.optionOverrides, n.dynamicOptionOverrides), a = this.data = Object.assign(Object.assign(Object.assign({ viewTitle: this.buildTitle(n.dateProfile, s.options, i.dateEnv), calendarApi: e.calendarApi, dispatch: this.dispatch, emitter: this.emitter, getCurrentData: this.getCurrentData }, i), s), n), o = i.pluginHooks.optionChangeHandlers, l = r && r.calendarOptions, c = i.calendarOptions;
    if (l && l !== c) {
      l.timeZone !== c.timeZone && (n.eventSources = a.eventSources = rf(a.eventSources, n.dateProfile, a), n.eventStore = a.eventStore = mf(a.eventStore, r.dateEnv, a.dateEnv));
      for (let u in o)
        l[u] !== c[u] && o[u](c[u], a);
    }
    e.onData && e.onData(a);
  }
  _computeOptionsData(e, n, r) {
    let { refinedOptions: i, pluginHooks: s, localeDefaults: a, availableLocaleData: o, extra: l } = this.processRawCalendarOptions(e, n);
    os(l);
    let c = this.buildDateEnv(i.timeZone, i.locale, i.weekNumberCalculation, i.firstDay, i.weekText, s, o, i.defaultRangeSeparator), u = this.buildViewSpecs(s.views, e, n, a), m = this.buildTheme(i, s), h = this.parseToolbars(i, e, m, u, r);
    return {
      calendarOptions: i,
      pluginHooks: s,
      dateEnv: c,
      viewSpecs: u,
      theme: m,
      toolbarConfig: h,
      localeDefaults: a,
      availableRawLocales: o.map
    };
  }
  processRawCalendarOptions(e, n) {
    let { locales: r, locale: i } = In([
      gt,
      e,
      n
    ]), s = this.organizeRawLocales(r), a = s.map, o = this.buildLocale(i || s.defaultCode, a).options, l = this.buildPluginHooks(e.plugins || [], nh), c = this.currentCalendarOptionsRefiners = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Gi), qi), Zi), l.listenerRefiners), l.optionRefiners), u = {}, m = In([
      gt,
      o,
      e,
      n
    ]), h = {}, d = this.currentCalendarOptionsInput, p = this.currentCalendarOptionsRefined, y = !1;
    for (let v in m)
      v !== "plugins" && (m[v] === d[v] || Ie[v] && v in d && Ie[v](d[v], m[v]) ? h[v] = p[v] : c[v] ? (h[v] = c[v](m[v]), y = !0) : u[v] = d[v]);
    return y && (this.currentCalendarOptionsInput = m, this.currentCalendarOptionsRefined = h), {
      rawOptions: this.currentCalendarOptionsInput,
      refinedOptions: this.currentCalendarOptionsRefined,
      pluginHooks: l,
      availableLocaleData: s,
      localeDefaults: o,
      extra: u
    };
  }
  _computeCurrentViewData(e, n, r, i) {
    let s = n.viewSpecs[e];
    if (!s)
      throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);
    let { refinedOptions: a, extra: o } = this.processRawViewOptions(s, n.pluginHooks, n.localeDefaults, r, i);
    os(o);
    let l = this.buildDateProfileGenerator({
      dateProfileGeneratorClass: s.optionDefaults.dateProfileGeneratorClass,
      duration: s.duration,
      durationUnit: s.durationUnit,
      usesMinMaxTime: s.optionDefaults.usesMinMaxTime,
      dateEnv: n.dateEnv,
      calendarApi: this.props.calendarApi,
      slotMinTime: a.slotMinTime,
      slotMaxTime: a.slotMaxTime,
      showNonCurrentDates: a.showNonCurrentDates,
      dayCount: a.dayCount,
      dateAlignment: a.dateAlignment,
      dateIncrement: a.dateIncrement,
      hiddenDays: a.hiddenDays,
      weekends: a.weekends,
      nowInput: a.now,
      validRangeInput: a.validRange,
      visibleRangeInput: a.visibleRange,
      monthMode: a.monthMode,
      fixedWeekCount: a.fixedWeekCount
    }), c = this.buildViewApi(e, this.getCurrentData, n.dateEnv);
    return { viewSpec: s, options: a, dateProfileGenerator: l, viewApi: c };
  }
  processRawViewOptions(e, n, r, i, s) {
    let a = In([
      gt,
      e.optionDefaults,
      r,
      i,
      e.optionOverrides,
      s
    ]), o = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Gi), qi), Zi), _d), n.listenerRefiners), n.optionRefiners), l = {}, c = this.currentViewOptionsInput, u = this.currentViewOptionsRefined, m = !1, h = {};
    for (let d in a)
      a[d] === c[d] || Ie[d] && Ie[d](a[d], c[d]) ? l[d] = u[d] : (a[d] === this.currentCalendarOptionsInput[d] || Ie[d] && Ie[d](a[d], this.currentCalendarOptionsInput[d]) ? d in this.currentCalendarOptionsRefined && (l[d] = this.currentCalendarOptionsRefined[d]) : o[d] ? l[d] = o[d](a[d]) : h[d] = a[d], m = !0);
    return m && (this.currentViewOptionsInput = a, this.currentViewOptionsRefined = l), {
      rawOptions: this.currentViewOptionsInput,
      refinedOptions: this.currentViewOptionsRefined,
      extra: h
    };
  }
}
function vm(t, e, n, r, i, s, a, o) {
  let l = ko(e || a.defaultCode, a.map);
  return new dd({
    calendarSystem: "gregory",
    timeZone: t,
    namedTimeZoneImpl: s.namedTimeZonedImpl,
    locale: l,
    weekNumberCalculation: n,
    firstDay: r,
    weekText: i,
    cmdFormatter: s.cmdFormatter,
    defaultSeparator: o
  });
}
function ym(t, e) {
  let n = e.themeClasses[t.themeSystem] || _e;
  return new n(t);
}
function bm(t) {
  let e = t.dateProfileGeneratorClass || ja;
  return new e(t);
}
function wm(t, e, n) {
  return new fm(t, e, n);
}
function Em(t) {
  return Fe(t, (e) => e.ui);
}
function Am(t, e, n) {
  let r = { "": e };
  for (let i in t) {
    let s = t[i];
    s.sourceId && n[s.sourceId] && (r[i] = n[s.sourceId]);
  }
  return r;
}
function Sm(t) {
  let { options: e } = t;
  return {
    eventUiSingleBase: an({
      display: e.eventDisplay,
      editable: e.editable,
      startEditable: e.eventStartEditable,
      durationEditable: e.eventDurationEditable,
      constraint: e.eventConstraint,
      overlap: typeof e.eventOverlap == "boolean" ? e.eventOverlap : void 0,
      allow: e.eventAllow,
      backgroundColor: e.eventBackgroundColor,
      borderColor: e.eventBorderColor,
      textColor: e.eventTextColor,
      color: e.eventColor
    }, t),
    selectionConfig: an({
      constraint: e.selectConstraint,
      overlap: typeof e.selectOverlap == "boolean" ? e.selectOverlap : void 0,
      allow: e.selectAllow
    }, t)
  };
}
function Bn(t, e) {
  for (let n of e.pluginHooks.isLoadingFuncs)
    if (n(t))
      return !0;
  return !1;
}
function Dm(t) {
  return bf(t.options.businessHours, t);
}
function os(t, e) {
  for (let n in t)
    console.warn(`Unknown option '${n}'` + (e ? ` for view '${e}'` : ""));
}
class Cm extends N {
  render() {
    let e = this.props.widgetGroups.map((n) => this.renderWidgetGroup(n));
    return f("div", { className: "fc-toolbar-chunk" }, ...e);
  }
  renderWidgetGroup(e) {
    let { props: n } = this, { theme: r } = this.context, i = [], s = !0;
    for (let a of e) {
      let { buttonName: o, buttonClick: l, buttonText: c, buttonIcon: u, buttonHint: m } = a;
      if (o === "title")
        s = !1, i.push(f("h2", { className: "fc-toolbar-title", id: n.titleId }, n.title));
      else {
        let h = o === n.activeButton, d = !n.isTodayEnabled && o === "today" || !n.isPrevEnabled && o === "prev" || !n.isNextEnabled && o === "next", p = [`fc-${o}-button`, r.getClass("button")];
        h && p.push(r.getClass("buttonActive")), i.push(f("button", { type: "button", title: typeof m == "function" ? m(n.navUnit) : m, disabled: d, "aria-pressed": h, className: p.join(" "), onClick: l }, c || (u ? f("span", { className: u }) : "")));
      }
    }
    if (i.length > 1) {
      let a = s && r.getClass("buttonGroup") || "";
      return f("div", { className: a }, ...i);
    }
    return i[0];
  }
}
class ls extends N {
  render() {
    let { model: e, extraClassName: n } = this.props, r = !1, i, s, a = e.sectionWidgets, o = a.center;
    return a.left ? (r = !0, i = a.left) : i = a.start, a.right ? (r = !0, s = a.right) : s = a.end, f(
      "div",
      { className: [
        n || "",
        "fc-toolbar",
        r ? "fc-toolbar-ltr" : ""
      ].join(" ") },
      this.renderSection("start", i || []),
      this.renderSection("center", o || []),
      this.renderSection("end", s || [])
    );
  }
  renderSection(e, n) {
    let { props: r } = this;
    return f(Cm, { key: e, widgetGroups: n, title: r.title, navUnit: r.navUnit, activeButton: r.activeButton, isTodayEnabled: r.isTodayEnabled, isPrevEnabled: r.isPrevEnabled, isNextEnabled: r.isNextEnabled, titleId: r.titleId });
  }
}
class Tm extends N {
  constructor() {
    super(...arguments), this.state = {
      availableWidth: null
    }, this.handleEl = (e) => {
      this.el = e, Be(this.props.elRef, e), this.updateAvailableWidth();
    }, this.handleResize = () => {
      this.updateAvailableWidth();
    };
  }
  render() {
    let { props: e, state: n } = this, { aspectRatio: r } = e, i = [
      "fc-view-harness",
      r || e.liquid || e.height ? "fc-view-harness-active" : "fc-view-harness-passive"
    ], s = "", a = "";
    return r ? n.availableWidth !== null ? s = n.availableWidth / r : a = `${1 / r * 100}%` : s = e.height || "", f("div", { "aria-labelledby": e.labeledById, ref: this.handleEl, className: i.join(" "), style: { height: s, paddingBottom: a } }, e.children);
  }
  componentDidMount() {
    this.context.addResizeHandler(this.handleResize);
  }
  componentWillUnmount() {
    this.context.removeResizeHandler(this.handleResize);
  }
  updateAvailableWidth() {
    this.el && this.props.aspectRatio && this.setState({ availableWidth: this.el.offsetWidth });
  }
}
class _m extends uo {
  constructor(e) {
    super(e), this.handleSegClick = (n, r) => {
      let { component: i } = this, { context: s } = i, a = nr(r);
      if (a && i.isValidSegDownEl(n.target)) {
        let o = de(n.target, ".fc-event-forced-url"), l = o ? o.querySelector("a[href]").href : "";
        s.emitter.trigger("eventClick", {
          el: r,
          event: new ee(i.context, a.eventRange.def, a.eventRange.instance),
          jsEvent: n,
          view: s.viewApi
        }), l && !n.defaultPrevented && (window.location.href = l);
      }
    }, this.destroy = Ma(
      e.el,
      "click",
      ".fc-event",
      this.handleSegClick
    );
  }
}
class Rm extends uo {
  constructor(e) {
    super(e), this.handleEventElRemove = (n) => {
      n === this.currentSegEl && this.handleSegLeave(null, this.currentSegEl);
    }, this.handleSegEnter = (n, r) => {
      nr(r) && (this.currentSegEl = r, this.triggerEvent("eventMouseEnter", n, r));
    }, this.handleSegLeave = (n, r) => {
      this.currentSegEl && (this.currentSegEl = null, this.triggerEvent("eventMouseLeave", n, r));
    }, this.removeHoverListeners = ku(
      e.el,
      ".fc-event",
      this.handleSegEnter,
      this.handleSegLeave
    );
  }
  destroy() {
    this.removeHoverListeners();
  }
  triggerEvent(e, n, r) {
    let { component: i } = this, { context: s } = i, a = nr(r);
    (!n || i.isValidSegDownEl(n.target)) && s.emitter.trigger(e, {
      el: r,
      event: new ee(s, a.eventRange.def, a.eventRange.instance),
      jsEvent: n,
      view: s.viewApi
    });
  }
}
class xm extends Ve {
  constructor() {
    super(...arguments), this.buildViewContext = A(kd), this.buildViewPropTransformers = A(Im), this.buildToolbarProps = A(km), this.headerRef = q(), this.footerRef = q(), this.interactionsStore = {}, this.state = {
      viewLabelId: De()
    }, this.registerInteractiveComponent = (e, n) => {
      let r = sh(e, n), a = [
        _m,
        Rm
      ].concat(this.props.pluginHooks.componentInteractions).map((o) => new o(r));
      this.interactionsStore[e.uid] = a, ts[e.uid] = r;
    }, this.unregisterInteractiveComponent = (e) => {
      let n = this.interactionsStore[e.uid];
      if (n) {
        for (let r of n)
          r.destroy();
        delete this.interactionsStore[e.uid];
      }
      delete ts[e.uid];
    }, this.resizeRunner = new wr(() => {
      this.props.emitter.trigger("_resize", !0), this.props.emitter.trigger("windowResize", { view: this.props.viewApi });
    }), this.handleWindowResize = (e) => {
      let { options: n } = this.props;
      n.handleWindowResize && e.target === window && this.resizeRunner.request(n.windowResizeDelay);
    };
  }
  render() {
    let { props: e } = this, { toolbarConfig: n, options: r } = e, i = this.buildToolbarProps(
      e.viewSpec,
      e.dateProfile,
      e.dateProfileGenerator,
      e.currentDate,
      Tt(e.options.now, e.dateEnv),
      e.viewTitle
    ), s = !1, a = "", o;
    e.isHeightAuto || e.forPrint ? a = "" : r.height != null ? s = !0 : r.contentHeight != null ? a = r.contentHeight : o = Math.max(r.aspectRatio, 0.5);
    let l = this.buildViewContext(e.viewSpec, e.viewApi, e.options, e.dateProfileGenerator, e.dateEnv, e.theme, e.pluginHooks, e.dispatch, e.getCurrentData, e.emitter, e.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent), c = n.header && n.header.hasTitle ? this.state.viewLabelId : "";
    return f(
      ve.Provider,
      { value: l },
      n.header && f(ls, Object.assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: n.header, titleId: c }, i)),
      f(
        Tm,
        { liquid: s, height: a, aspectRatio: o, labeledById: c },
        this.renderView(e),
        this.buildAppendContent()
      ),
      n.footer && f(ls, Object.assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: n.footer, titleId: "" }, i))
    );
  }
  componentDidMount() {
    let { props: e } = this;
    this.calendarInteractions = e.pluginHooks.calendarInteractions.map((r) => new r(e)), window.addEventListener("resize", this.handleWindowResize);
    let { propSetHandlers: n } = e.pluginHooks;
    for (let r in n)
      n[r](e[r], e);
  }
  componentDidUpdate(e) {
    let { props: n } = this, { propSetHandlers: r } = n.pluginHooks;
    for (let i in r)
      n[i] !== e[i] && r[i](n[i], n);
  }
  componentWillUnmount() {
    window.removeEventListener("resize", this.handleWindowResize), this.resizeRunner.clear();
    for (let e of this.calendarInteractions)
      e.destroy();
    this.props.emitter.trigger("_unmount");
  }
  buildAppendContent() {
    let { props: e } = this, n = e.pluginHooks.viewContainerAppends.map((r) => r(e));
    return f(O, {}, ...n);
  }
  renderView(e) {
    let { pluginHooks: n } = e, { viewSpec: r } = e, i = {
      dateProfile: e.dateProfile,
      businessHours: e.businessHours,
      eventStore: e.renderableEventStore,
      eventUiBases: e.eventUiBases,
      dateSelection: e.dateSelection,
      eventSelection: e.eventSelection,
      eventDrag: e.eventDrag,
      eventResize: e.eventResize,
      isHeightAuto: e.isHeightAuto,
      forPrint: e.forPrint
    }, s = this.buildViewPropTransformers(n.viewPropsTransformers);
    for (let o of s)
      Object.assign(i, o.transform(i, e));
    let a = r.component;
    return f(a, Object.assign({}, i));
  }
}
function km(t, e, n, r, i, s) {
  let a = n.build(i, void 0, !1), o = n.buildPrev(e, r, !1), l = n.buildNext(e, r, !1);
  return {
    title: s,
    activeButton: t.type,
    navUnit: t.singleUnit,
    isTodayEnabled: a.isValid && !Ce(e.currentRange, i),
    isPrevEnabled: o.isValid,
    isNextEnabled: l.isValid
  };
}
function Im(t) {
  return t.map((e) => new e());
}
class Mm extends ah {
  constructor(e, n = {}) {
    super(), this.isRendering = !1, this.isRendered = !1, this.currentClassNames = [], this.customContentRenderId = 0, this.handleAction = (r) => {
      switch (r.type) {
        case "SET_EVENT_DRAG":
        case "SET_EVENT_RESIZE":
          this.renderRunner.tryDrain();
      }
    }, this.handleData = (r) => {
      this.currentData = r, this.renderRunner.request(r.calendarOptions.rerenderDelay);
    }, this.handleRenderRequest = () => {
      if (this.isRendering) {
        this.isRendered = !0;
        let { currentData: r } = this;
        Qi(() => {
          yt(f(ih, { options: r.calendarOptions, theme: r.theme, emitter: r.emitter }, (i, s, a, o) => (this.setClassNames(i), this.setHeight(s), f(
            Ua.Provider,
            { value: this.customContentRenderId },
            f(xm, Object.assign({ isHeightAuto: a, forPrint: o }, r))
          ))), this.el);
        });
      } else
        this.isRendered && (this.isRendered = !1, yt(null, this.el), this.setClassNames([]), this.setHeight(""));
    }, this.el = e, this.renderRunner = new wr(this.handleRenderRequest), new pm({
      optionOverrides: n,
      calendarApi: this,
      onAction: this.handleAction,
      onData: this.handleData
    });
  }
  render() {
    let e = this.isRendering;
    e ? this.customContentRenderId += 1 : this.isRendering = !0, this.renderRunner.request(), e && this.updateSize();
  }
  destroy() {
    this.isRendering && (this.isRendering = !1, this.renderRunner.request());
  }
  updateSize() {
    Qi(() => {
      super.updateSize();
    });
  }
  batchRendering(e) {
    this.renderRunner.pause("batchRendering"), e(), this.renderRunner.resume("batchRendering");
  }
  pauseRendering() {
    this.renderRunner.pause("pauseRendering");
  }
  resumeRendering() {
    this.renderRunner.resume("pauseRendering", !0);
  }
  resetOptions(e, n) {
    this.currentDataManager.resetOptions(e, n);
  }
  setClassNames(e) {
    if (!He(e, this.currentClassNames)) {
      let { classList: n } = this.el;
      for (let r of this.currentClassNames)
        n.remove(r);
      for (let r of e)
        n.add(r);
      this.currentClassNames = e;
    }
  }
  setHeight(e) {
    Ia(this.el, "height", e);
  }
}
class Nm extends ue {
  constructor() {
    super(...arguments), this.headerElRef = q();
  }
  renderSimpleLayout(e, n) {
    let { props: r, context: i } = this, s = [], a = on(i.options);
    return e && s.push({
      type: "header",
      key: "header",
      isSticky: a,
      chunk: {
        elRef: this.headerElRef,
        tableClassName: "fc-col-header",
        rowContent: e
      }
    }), s.push({
      type: "body",
      key: "body",
      liquid: !0,
      chunk: { content: n }
    }), f(
      bt,
      { elClasses: ["fc-daygrid"], viewSpec: i.viewSpec },
      f(Br, { liquid: !r.isHeightAuto && !r.forPrint, collapsibleWidth: r.forPrint, cols: [], sections: s })
    );
  }
  renderHScrollLayout(e, n, r, i) {
    let s = this.context.pluginHooks.scrollGridImpl;
    if (!s)
      throw new Error("No ScrollGrid implementation");
    let { props: a, context: o } = this, l = !a.forPrint && on(o.options), c = !a.forPrint && Eo(o.options), u = [];
    return e && u.push({
      type: "header",
      key: "header",
      isSticky: l,
      chunks: [{
        key: "main",
        elRef: this.headerElRef,
        tableClassName: "fc-col-header",
        rowContent: e
      }]
    }), u.push({
      type: "body",
      key: "body",
      liquid: !0,
      chunks: [{
        key: "main",
        content: n
      }]
    }), c && u.push({
      type: "footer",
      key: "footer",
      isSticky: !0,
      chunks: [{
        key: "main",
        content: sr
      }]
    }), f(
      bt,
      { elClasses: ["fc-daygrid"], viewSpec: o.viewSpec },
      f(s, { liquid: !a.isHeightAuto && !a.forPrint, collapsibleWidth: a.forPrint, colGroups: [{ cols: [{ span: r, minWidth: i }] }], sections: u })
    );
  }
}
function Ht(t, e) {
  let n = [];
  for (let r = 0; r < e; r += 1)
    n[r] = [];
  for (let r of t)
    n[r.row].push(r);
  return n;
}
function Pt(t, e) {
  let n = [];
  for (let r = 0; r < e; r += 1)
    n[r] = [];
  for (let r of t)
    n[r.firstCol].push(r);
  return n;
}
function cs(t, e) {
  let n = [];
  if (t) {
    for (let r = 0; r < e; r += 1)
      n[r] = {
        affectedInstances: t.affectedInstances,
        isEvent: t.isEvent,
        segs: []
      };
    for (let r of t.segs)
      n[r.row].segs.push(r);
  } else
    for (let r = 0; r < e; r += 1)
      n[r] = null;
  return n;
}
const Mo = H({
  hour: "numeric",
  minute: "2-digit",
  omitZeroMinute: !0,
  meridiem: "narrow"
});
function No(t) {
  let { display: e } = t.eventRange.ui;
  return e === "list-item" || e === "auto" && !t.eventRange.def.allDay && t.firstCol === t.lastCol && t.isStart && t.isEnd;
}
class Oo extends N {
  render() {
    let { props: e } = this;
    return f(Ao, Object.assign({}, e, { elClasses: ["fc-daygrid-event", "fc-daygrid-block-event", "fc-h-event"], defaultTimeFormat: Mo, defaultDisplayEventEnd: e.defaultDisplayEventEnd, disableResizing: !e.seg.eventRange.def.allDay }));
  }
}
class Fo extends N {
  render() {
    let { props: e, context: n } = this, { options: r } = n, { seg: i } = e, s = r.eventTimeFormat || Mo, a = pt(i, s, n, !0, e.defaultDisplayEventEnd);
    return f(pn, Object.assign({}, e, { elTag: "a", elClasses: ["fc-daygrid-event", "fc-daygrid-dot-event"], elAttrs: Fr(e.seg, n), defaultGenerator: Om, timeText: a, isResizing: !1, isDateSelecting: !1 }));
  }
}
function Om(t) {
  return f(
    O,
    null,
    f("div", { className: "fc-daygrid-event-dot", style: { borderColor: t.borderColor || t.backgroundColor } }),
    t.timeText && f("div", { className: "fc-event-time" }, t.timeText),
    f("div", { className: "fc-event-title" }, t.event.title || f(O, null, " "))
  );
}
class Fm extends N {
  constructor() {
    super(...arguments), this.compileSegs = A(Hm);
  }
  render() {
    let { props: e } = this, { allSegs: n, invisibleSegs: r } = this.compileSegs(e.singlePlacements);
    return f(To, { elClasses: ["fc-daygrid-more-link"], dateProfile: e.dateProfile, todayRange: e.todayRange, allDayDate: e.allDayDate, moreCnt: e.moreCnt, allSegs: n, hiddenSegs: r, alignmentElRef: e.alignmentElRef, alignGridTop: e.alignGridTop, extraDateSpan: e.extraDateSpan, popoverContent: () => {
      let i = (e.eventDrag ? e.eventDrag.affectedInstances : null) || (e.eventResize ? e.eventResize.affectedInstances : null) || {};
      return f(O, null, n.map((s) => {
        let a = s.eventRange.instance.instanceId;
        return f("div", { className: "fc-daygrid-event-harness", key: a, style: {
          visibility: i[a] ? "hidden" : ""
        } }, No(s) ? f(Fo, Object.assign({ seg: s, isDragging: !1, isSelected: a === e.eventSelection, defaultDisplayEventEnd: !1 }, me(s, e.todayRange))) : f(Oo, Object.assign({ seg: s, isDragging: !1, isResizing: !1, isDateSelecting: !1, isSelected: a === e.eventSelection, defaultDisplayEventEnd: !1 }, me(s, e.todayRange))));
      }));
    } });
  }
}
function Hm(t) {
  let e = [], n = [];
  for (let r of t)
    e.push(r.seg), r.isVisible || n.push(r.seg);
  return { allSegs: e, invisibleSegs: n };
}
const Pm = H({ week: "narrow" });
class Bm extends ue {
  constructor() {
    super(...arguments), this.rootElRef = q(), this.state = {
      dayNumberId: De()
    }, this.handleRootEl = (e) => {
      Be(this.rootElRef, e), Be(this.props.elRef, e);
    };
  }
  render() {
    let { context: e, props: n, state: r, rootElRef: i } = this, { options: s } = e, { date: a, dateProfile: o } = n;
    return f(zr, { elTag: "td", elRef: this.handleRootEl, elClasses: [
      "fc-daygrid-day",
      ...n.extraClassNames || []
    ], elAttrs: Object.assign(Object.assign(Object.assign({}, n.extraDataAttrs), n.showDayNumber ? { "aria-labelledby": r.dayNumberId } : {}), { role: "gridcell" }), defaultGenerator: Lm, date: a, dateProfile: o, todayRange: n.todayRange, showDayNumber: n.showDayNumber, extraRenderProps: n.extraRenderProps }, (l, c) => f(
      "div",
      { className: "fc-daygrid-day-frame fc-scrollgrid-sync-inner", ref: n.innerElRef },
      n.showWeekNumber && f(Co, { elTag: "a", elClasses: ["fc-daygrid-week-number"], elAttrs: Ke(e, a, "week"), date: a, defaultFormat: Pm }),
      Boolean(!c.isDisabled && (n.showDayNumber || Ur(s) || n.forceDayTop)) && f(
        "div",
        { className: "fc-daygrid-day-top" },
        f(l, { elTag: "a", elClasses: ["fc-daygrid-day-number"], elAttrs: Object.assign(Object.assign({}, Ke(e, a)), { id: r.dayNumberId }) })
      ),
      f(
        "div",
        { className: "fc-daygrid-day-events", ref: n.fgContentElRef },
        n.fgContent,
        f(
          "div",
          { className: "fc-daygrid-day-bottom", style: { marginTop: n.moreMarginTop } },
          f(Fm, { allDayDate: a, singlePlacements: n.singlePlacements, moreCnt: n.moreCnt, alignmentElRef: i, alignGridTop: !n.showDayNumber, extraDateSpan: n.extraDateSpan, dateProfile: n.dateProfile, eventSelection: n.eventSelection, eventDrag: n.eventDrag, eventResize: n.eventResize, todayRange: n.todayRange })
        )
      ),
      f("div", { className: "fc-daygrid-day-bg" }, n.bgContent)
    ));
  }
}
function Lm(t) {
  return t.dayNumberText || f(O, null, " ");
}
function zm(t, e, n, r, i, s, a) {
  let o = new Wm();
  o.allowReslicing = !0, o.strictOrder = r, e === !0 || n === !0 ? (o.maxCoord = s, o.hiddenConsumes = !0) : typeof e == "number" ? o.maxStackCnt = e : typeof n == "number" && (o.maxStackCnt = n, o.hiddenConsumes = !0);
  let l = [], c = [];
  for (let b = 0; b < t.length; b += 1) {
    let E = t[b], { instanceId: T } = E.eventRange.instance, C = i[T];
    C != null ? l.push({
      index: b,
      thickness: C,
      span: {
        start: E.firstCol,
        end: E.lastCol + 1
      }
    }) : c.push(E);
  }
  let u = o.addSegs(l), m = o.toRects(), { singleColPlacements: h, multiColPlacements: d, leftoverMargins: p } = Um(m, t, a), y = [], v = [];
  for (let b of c) {
    d[b.firstCol].push({
      seg: b,
      isVisible: !1,
      isAbsolute: !0,
      absoluteTop: 0,
      marginTop: 0
    });
    for (let E = b.firstCol; E <= b.lastCol; E += 1)
      h[E].push({
        seg: Ye(b, E, E + 1, a),
        isVisible: !1,
        isAbsolute: !1,
        absoluteTop: 0,
        marginTop: 0
      });
  }
  for (let b = 0; b < a.length; b += 1)
    y.push(0);
  for (let b of u) {
    let E = t[b.index], T = b.span;
    d[T.start].push({
      seg: Ye(E, T.start, T.end, a),
      isVisible: !1,
      isAbsolute: !0,
      absoluteTop: 0,
      marginTop: 0
    });
    for (let C = T.start; C < T.end; C += 1)
      y[C] += 1, h[C].push({
        seg: Ye(E, C, C + 1, a),
        isVisible: !1,
        isAbsolute: !1,
        absoluteTop: 0,
        marginTop: 0
      });
  }
  for (let b = 0; b < a.length; b += 1)
    v.push(p[b]);
  return { singleColPlacements: h, multiColPlacements: d, moreCnts: y, moreMarginTops: v };
}
function Um(t, e, n) {
  let r = Vm(t, n.length), i = [], s = [], a = [];
  for (let o = 0; o < n.length; o += 1) {
    let l = r[o], c = [], u = 0, m = 0;
    for (let d of l) {
      let p = e[d.index];
      c.push({
        seg: Ye(p, o, o + 1, n),
        isVisible: !0,
        isAbsolute: !1,
        absoluteTop: d.levelCoord,
        marginTop: d.levelCoord - u
      }), u = d.levelCoord + d.thickness;
    }
    let h = [];
    u = 0, m = 0;
    for (let d of l) {
      let p = e[d.index], y = d.span.end - d.span.start > 1, v = d.span.start === o;
      m += d.levelCoord - u, u = d.levelCoord + d.thickness, y ? (m += d.thickness, v && h.push({
        seg: Ye(p, d.span.start, d.span.end, n),
        isVisible: !0,
        isAbsolute: !0,
        absoluteTop: d.levelCoord,
        marginTop: 0
      })) : v && (h.push({
        seg: Ye(p, d.span.start, d.span.end, n),
        isVisible: !0,
        isAbsolute: !1,
        absoluteTop: d.levelCoord,
        marginTop: m
      }), m = 0);
    }
    i.push(c), s.push(h), a.push(m);
  }
  return { singleColPlacements: i, multiColPlacements: s, leftoverMargins: a };
}
function Vm(t, e) {
  let n = [];
  for (let r = 0; r < e; r += 1)
    n.push([]);
  for (let r of t)
    for (let i = r.span.start; i < r.span.end; i += 1)
      n[i].push(r);
  return n;
}
function Ye(t, e, n, r) {
  if (t.firstCol === e && t.lastCol === n - 1)
    return t;
  let i = t.eventRange, s = i.range, a = Le(s, {
    start: r[e].date,
    end: W(r[n - 1].date, 1)
  });
  return Object.assign(Object.assign({}, t), { firstCol: e, lastCol: n - 1, eventRange: {
    def: i.def,
    ui: Object.assign(Object.assign({}, i.ui), { durationEditable: !1 }),
    instance: i.instance,
    range: a
  }, isStart: t.isStart && a.start.valueOf() === s.start.valueOf(), isEnd: t.isEnd && a.end.valueOf() === s.end.valueOf() });
}
class Wm extends fo {
  constructor() {
    super(...arguments), this.hiddenConsumes = !1, this.forceHidden = {};
  }
  addSegs(e) {
    const n = super.addSegs(e), { entriesByLevel: r } = this, i = (s) => !this.forceHidden[Oe(s)];
    for (let s = 0; s < r.length; s += 1)
      r[s] = r[s].filter(i);
    return n;
  }
  handleInvalidInsertion(e, n, r) {
    const { entriesByLevel: i, forceHidden: s } = this, { touchingEntry: a, touchingLevel: o, touchingLateral: l } = e;
    if (this.hiddenConsumes && a) {
      const c = Oe(a);
      if (!s[c])
        if (this.allowReslicing) {
          const u = Object.assign(Object.assign({}, a), { span: Pr(a.span, n.span) }), m = Oe(u);
          s[m] = !0, i[o][l] = u, this.splitEntry(a, n, r);
        } else
          s[c] = !0, r.push(a);
    }
    return super.handleInvalidInsertion(e, n, r);
  }
}
class Ho extends ue {
  constructor() {
    super(...arguments), this.cellElRefs = new he(), this.frameElRefs = new he(), this.fgElRefs = new he(), this.segHarnessRefs = new he(), this.rootElRef = q(), this.state = {
      framePositions: null,
      maxContentHeight: null,
      eventInstanceHeights: {}
    }, this.handleResize = (e) => {
      e && this.updateSizing(!0);
    };
  }
  render() {
    let { props: e, state: n, context: r } = this, { options: i } = r, s = e.cells.length, a = Pt(e.businessHourSegs, s), o = Pt(e.bgEventSegs, s), l = Pt(this.getHighlightSegs(), s), c = Pt(this.getMirrorSegs(), s), { singleColPlacements: u, multiColPlacements: m, moreCnts: h, moreMarginTops: d } = zm(Or(e.fgEventSegs, i.eventOrder), e.dayMaxEvents, e.dayMaxEventRows, i.eventOrderStrict, n.eventInstanceHeights, n.maxContentHeight, e.cells), p = e.eventDrag && e.eventDrag.affectedInstances || e.eventResize && e.eventResize.affectedInstances || {};
    return f(
      "tr",
      { ref: this.rootElRef, role: "row" },
      e.renderIntro && e.renderIntro(),
      e.cells.map((y, v) => {
        let b = this.renderFgSegs(v, e.forPrint ? u[v] : m[v], e.todayRange, p), E = this.renderFgSegs(v, jm(c[v], m), e.todayRange, {}, Boolean(e.eventDrag), Boolean(e.eventResize), !1);
        return f(Bm, { key: y.key, elRef: this.cellElRefs.createRef(y.key), innerElRef: this.frameElRefs.createRef(y.key), dateProfile: e.dateProfile, date: y.date, showDayNumber: e.showDayNumbers, showWeekNumber: e.showWeekNumbers && v === 0, forceDayTop: e.showWeekNumbers, todayRange: e.todayRange, eventSelection: e.eventSelection, eventDrag: e.eventDrag, eventResize: e.eventResize, extraRenderProps: y.extraRenderProps, extraDataAttrs: y.extraDataAttrs, extraClassNames: y.extraClassNames, extraDateSpan: y.extraDateSpan, moreCnt: h[v], moreMarginTop: d[v], singlePlacements: u[v], fgContentElRef: this.fgElRefs.createRef(y.key), fgContent: f(
          O,
          null,
          f(O, null, b),
          f(O, null, E)
        ), bgContent: f(
          O,
          null,
          this.renderFillSegs(l[v], "highlight"),
          this.renderFillSegs(a[v], "non-business"),
          this.renderFillSegs(o[v], "bg-event")
        ) });
      })
    );
  }
  componentDidMount() {
    this.updateSizing(!0), this.context.addResizeHandler(this.handleResize);
  }
  componentDidUpdate(e, n) {
    let r = this.props;
    this.updateSizing(!se(e, r));
  }
  componentWillUnmount() {
    this.context.removeResizeHandler(this.handleResize);
  }
  getHighlightSegs() {
    let { props: e } = this;
    return e.eventDrag && e.eventDrag.segs.length ? e.eventDrag.segs : e.eventResize && e.eventResize.segs.length ? e.eventResize.segs : e.dateSelectionSegs;
  }
  getMirrorSegs() {
    let { props: e } = this;
    return e.eventResize && e.eventResize.segs.length ? e.eventResize.segs : [];
  }
  renderFgSegs(e, n, r, i, s, a, o) {
    let { context: l } = this, { eventSelection: c } = this.props, { framePositions: u } = this.state, m = this.props.cells.length === 1, h = s || a || o, d = [];
    if (u)
      for (let p of n) {
        let { seg: y } = p, { instanceId: v } = y.eventRange.instance, b = v + ":" + e, E = p.isVisible && !i[v], T = p.isAbsolute, C = "", I = "";
        T && (l.isRtl ? (I = 0, C = u.lefts[y.lastCol] - u.lefts[y.firstCol]) : (C = 0, I = u.rights[y.firstCol] - u.rights[y.lastCol])), d.push(f("div", { className: "fc-daygrid-event-harness" + (T ? " fc-daygrid-event-harness-abs" : ""), key: b, ref: h ? null : this.segHarnessRefs.createRef(b), style: {
          visibility: E ? "" : "hidden",
          marginTop: T ? "" : p.marginTop,
          top: T ? p.absoluteTop : "",
          left: C,
          right: I
        } }, No(y) ? f(Fo, Object.assign({ seg: y, isDragging: s, isSelected: v === c, defaultDisplayEventEnd: m }, me(y, r))) : f(Oo, Object.assign({ seg: y, isDragging: s, isResizing: a, isDateSelecting: o, isSelected: v === c, defaultDisplayEventEnd: m }, me(y, r)))));
      }
    return d;
  }
  renderFillSegs(e, n) {
    let { isRtl: r } = this.context, { todayRange: i } = this.props, { framePositions: s } = this.state, a = [];
    if (s)
      for (let o of e) {
        let l = r ? {
          right: 0,
          left: s.lefts[o.lastCol] - s.lefts[o.firstCol]
        } : {
          left: 0,
          right: s.rights[o.firstCol] - s.rights[o.lastCol]
        };
        a.push(f("div", { key: ao(o.eventRange), className: "fc-daygrid-bg-harness", style: l }, n === "bg-event" ? f(So, Object.assign({ seg: o }, me(o, i))) : Do(n)));
      }
    return f(O, {}, ...a);
  }
  updateSizing(e) {
    let { props: n, frameElRefs: r } = this;
    if (!n.forPrint && n.clientWidth !== null) {
      if (e) {
        let o = n.cells.map((l) => r.currentMap[l.key]);
        if (o.length) {
          let l = this.rootElRef.current;
          this.setState({
            framePositions: new wt(
              l,
              o,
              !0,
              !1
            )
          });
        }
      }
      const i = this.state.eventInstanceHeights, s = this.queryEventInstanceHeights(), a = n.dayMaxEvents === !0 || n.dayMaxEventRows === !0;
      this.safeSetState({
        eventInstanceHeights: Object.assign(Object.assign({}, i), s),
        maxContentHeight: a ? this.computeMaxContentHeight() : null
      });
    }
  }
  queryEventInstanceHeights() {
    let e = this.segHarnessRefs.currentMap, n = {};
    for (let r in e) {
      let i = Math.round(e[r].getBoundingClientRect().height), s = r.split(":")[0];
      n[s] = Math.max(n[s] || 0, i);
    }
    return n;
  }
  computeMaxContentHeight() {
    let e = this.props.cells[0].key, n = this.cellElRefs.currentMap[e], r = this.fgElRefs.currentMap[e];
    return n.getBoundingClientRect().bottom - r.getBoundingClientRect().top;
  }
  getCellEls() {
    let e = this.cellElRefs.currentMap;
    return this.props.cells.map((n) => e[n.key]);
  }
}
Ho.addStateEquality({
  eventInstanceHeights: se
});
function jm(t, e) {
  if (!t.length)
    return [];
  let n = Gm(e);
  return t.map((r) => ({
    seg: r,
    isVisible: !0,
    isAbsolute: !0,
    absoluteTop: n[r.eventRange.instance.instanceId],
    marginTop: 0
  }));
}
function Gm(t) {
  let e = {};
  for (let n of t)
    for (let r of n)
      e[r.seg.eventRange.instance.instanceId] = r.absoluteTop;
  return e;
}
class qm extends ue {
  constructor() {
    super(...arguments), this.splitBusinessHourSegs = A(Ht), this.splitBgEventSegs = A(Ht), this.splitFgEventSegs = A(Ht), this.splitDateSelectionSegs = A(Ht), this.splitEventDrag = A(cs), this.splitEventResize = A(cs), this.rowRefs = new he(), this.handleRootEl = (e) => {
      this.rootEl = e, e ? this.context.registerInteractiveComponent(this, {
        el: e,
        isHitComboAllowed: this.props.isHitComboAllowed
      }) : this.context.unregisterInteractiveComponent(this);
    };
  }
  render() {
    let { props: e } = this, { dateProfile: n, dayMaxEventRows: r, dayMaxEvents: i, expandRows: s } = e, a = e.cells.length, o = this.splitBusinessHourSegs(e.businessHourSegs, a), l = this.splitBgEventSegs(e.bgEventSegs, a), c = this.splitFgEventSegs(e.fgEventSegs, a), u = this.splitDateSelectionSegs(e.dateSelectionSegs, a), m = this.splitEventDrag(e.eventDrag, a), h = this.splitEventResize(e.eventResize, a), d = i === !0 || r === !0;
    return d && !s && (d = !1, r = null, i = null), f(
      "div",
      { className: [
        "fc-daygrid-body",
        d ? "fc-daygrid-body-balanced" : "fc-daygrid-body-unbalanced",
        s ? "" : "fc-daygrid-body-natural"
      ].join(" "), ref: this.handleRootEl, style: {
        width: e.clientWidth,
        minWidth: e.tableMinWidth
      } },
      f(rt, { unit: "day" }, (y, v) => f(
        O,
        null,
        f(
          "table",
          { role: "presentation", className: "fc-scrollgrid-sync-table", style: {
            width: e.clientWidth,
            minWidth: e.tableMinWidth,
            height: s ? e.clientHeight : ""
          } },
          e.colGroupNode,
          f("tbody", { role: "presentation" }, e.cells.map((b, E) => f(Ho, {
            ref: this.rowRefs.createRef(E),
            key: b.length ? b[0].date.toISOString() : E,
            showDayNumbers: a > 1,
            showWeekNumbers: e.showWeekNumbers,
            todayRange: v,
            dateProfile: n,
            cells: b,
            renderIntro: e.renderRowIntro,
            businessHourSegs: o[E],
            eventSelection: e.eventSelection,
            bgEventSegs: l[E].filter(Zm),
            fgEventSegs: c[E],
            dateSelectionSegs: u[E],
            eventDrag: m[E],
            eventResize: h[E],
            dayMaxEvents: i,
            dayMaxEventRows: r,
            clientWidth: e.clientWidth,
            clientHeight: e.clientHeight,
            forPrint: e.forPrint
          })))
        )
      ))
    );
  }
  prepareHits() {
    this.rowPositions = new wt(
      this.rootEl,
      this.rowRefs.collect().map((e) => e.getCellEls()[0]),
      !1,
      !0
    ), this.colPositions = new wt(
      this.rootEl,
      this.rowRefs.currentMap[0].getCellEls(),
      !0,
      !1
    );
  }
  queryHit(e, n) {
    let { colPositions: r, rowPositions: i } = this, s = r.leftToIndex(e), a = i.topToIndex(n);
    if (a != null && s != null) {
      let o = this.props.cells[a][s];
      return {
        dateProfile: this.props.dateProfile,
        dateSpan: Object.assign({ range: this.getCellRange(a, s), allDay: !0 }, o.extraDateSpan),
        dayEl: this.getCellEl(a, s),
        rect: {
          left: r.lefts[s],
          right: r.rights[s],
          top: i.tops[a],
          bottom: i.bottoms[a]
        },
        layer: 0
      };
    }
    return null;
  }
  getCellEl(e, n) {
    return this.rowRefs.currentMap[e].getCellEls()[n];
  }
  getCellRange(e, n) {
    let r = this.props.cells[e][n].date, i = W(r, 1);
    return { start: r, end: i };
  }
}
function Zm(t) {
  return t.eventRange.def.allDay;
}
class Qm extends yo {
  constructor() {
    super(...arguments), this.forceDayIfListItem = !0;
  }
  sliceRange(e, n) {
    return n.sliceRange(e);
  }
}
class Po extends ue {
  constructor() {
    super(...arguments), this.slicer = new Qm(), this.tableRef = q();
  }
  render() {
    let { props: e, context: n } = this;
    return f(qm, Object.assign({ ref: this.tableRef }, this.slicer.sliceProps(e, e.dateProfile, e.nextDayThreshold, n, e.dayTableModel), { dateProfile: e.dateProfile, cells: e.dayTableModel.cells, colGroupNode: e.colGroupNode, tableMinWidth: e.tableMinWidth, renderRowIntro: e.renderRowIntro, dayMaxEvents: e.dayMaxEvents, dayMaxEventRows: e.dayMaxEventRows, showWeekNumbers: e.showWeekNumbers, expandRows: e.expandRows, headerAlignElRef: e.headerAlignElRef, clientWidth: e.clientWidth, clientHeight: e.clientHeight, forPrint: e.forPrint }));
  }
}
class Ym extends Nm {
  constructor() {
    super(...arguments), this.buildDayTableModel = A($m), this.headerRef = q(), this.tableRef = q();
  }
  render() {
    let { options: e, dateProfileGenerator: n } = this.context, { props: r } = this, i = this.buildDayTableModel(r.dateProfile, n), s = e.dayHeaders && f(go, { ref: this.headerRef, dateProfile: r.dateProfile, dates: i.headerDates, datesRepDistinctDays: i.rowCnt === 1 }), a = (o) => f(Po, { ref: this.tableRef, dateProfile: r.dateProfile, dayTableModel: i, businessHours: r.businessHours, dateSelection: r.dateSelection, eventStore: r.eventStore, eventUiBases: r.eventUiBases, eventSelection: r.eventSelection, eventDrag: r.eventDrag, eventResize: r.eventResize, nextDayThreshold: e.nextDayThreshold, colGroupNode: o.tableColGroupNode, tableMinWidth: o.tableMinWidth, dayMaxEvents: e.dayMaxEvents, dayMaxEventRows: e.dayMaxEventRows, showWeekNumbers: e.weekNumbers, expandRows: !r.isHeightAuto, headerAlignElRef: this.headerElRef, clientWidth: o.clientWidth, clientHeight: o.clientHeight, forPrint: r.forPrint });
    return e.dayMinWidth ? this.renderHScrollLayout(s, a, i.colCnt, e.dayMinWidth) : this.renderSimpleLayout(s, a);
  }
}
function $m(t, e) {
  let n = new po(t.renderRange, e);
  return new vo(n, /year|month|week/.test(t.currentRangeUnit));
}
class Jm extends ja {
  buildRenderRange(e, n, r) {
    let { dateEnv: i } = this.props, s = super.buildRenderRange(e, n, r), a = s.start, o = s.end, l;
    if (/^(year|month)$/.test(n) && (a = i.startOfWeek(a), l = i.startOfWeek(o), l.valueOf() !== o.valueOf() && (o = Pi(l, 1))), this.props.monthMode && this.props.fixedWeekCount) {
      let c = Math.ceil(
        Uu(a, o)
      );
      o = Pi(o, 6 - c);
    }
    return { start: a, end: o };
  }
}
var Km = ':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;padding:2px 3px 0}.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{cursor:pointer;position:relative;z-index:4}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';
fn(Km);
var Xm = ce({
  name: "@fullcalendar/daygrid",
  initialView: "dayGridMonth",
  views: {
    dayGrid: {
      component: Ym,
      dateProfileGeneratorClass: Jm
    },
    dayGridDay: {
      type: "dayGrid",
      duration: { days: 1 }
    },
    dayGridWeek: {
      type: "dayGrid",
      duration: { weeks: 1 }
    },
    dayGridMonth: {
      type: "dayGrid",
      duration: { months: 1 },
      monthMode: !0,
      fixedWeekCount: !0
    }
  }
});
class eg extends lh {
  getKeyInfo() {
    return {
      allDay: {},
      timed: {}
    };
  }
  getKeysForDateSpan(e) {
    return e.allDay ? ["allDay"] : ["timed"];
  }
  getKeysForEventDef(e) {
    return e.allDay ? xf(e) ? ["timed", "allDay"] : ["allDay"] : ["timed"];
  }
}
const ng = H({
  hour: "numeric",
  minute: "2-digit",
  omitZeroMinute: !0,
  meridiem: "short"
});
function Bo(t) {
  let e = [
    "fc-timegrid-slot",
    "fc-timegrid-slot-label",
    t.isLabeled ? "fc-scrollgrid-shrink" : "fc-timegrid-slot-minor"
  ];
  return f(ve.Consumer, null, (n) => {
    if (!t.isLabeled)
      return f("td", { className: e.join(" "), "data-time": t.isoTimeStr });
    let { dateEnv: r, options: i, viewApi: s } = n, a = i.slotLabelFormat == null ? ng : Array.isArray(i.slotLabelFormat) ? H(i.slotLabelFormat[0]) : H(i.slotLabelFormat), o = {
      level: 0,
      time: t.time,
      date: r.toDate(t.date),
      view: s,
      text: r.format(t.date, a)
    };
    return f(j, { elTag: "td", elClasses: e, elAttrs: {
      "data-time": t.isoTimeStr
    }, renderProps: o, generatorName: "slotLabelContent", generator: i.slotLabelContent || rg, classNameGenerator: i.slotLabelClassNames, didMount: i.slotLabelDidMount, willUnmount: i.slotLabelWillUnmount }, (l) => f(
      "div",
      { className: "fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame" },
      f(l, { elTag: "div", elClasses: [
        "fc-timegrid-slot-label-cushion",
        "fc-scrollgrid-shrink-cushion"
      ] })
    ));
  });
}
function rg(t) {
  return t.text;
}
class ig extends N {
  render() {
    return this.props.slatMetas.map((e) => f(
      "tr",
      { key: e.key },
      f(Bo, Object.assign({}, e))
    ));
  }
}
const sg = H({ week: "short" }), ag = 5;
class og extends ue {
  constructor() {
    super(...arguments), this.allDaySplitter = new eg(), this.headerElRef = q(), this.rootElRef = q(), this.scrollerElRef = q(), this.state = {
      slatCoords: null
    }, this.handleScrollTopRequest = (e) => {
      let n = this.scrollerElRef.current;
      n && (n.scrollTop = e);
    }, this.renderHeadAxis = (e, n = "") => {
      let { options: r } = this.context, { dateProfile: i } = this.props, s = i.renderRange, o = Te(s.start, s.end) === 1 ? Ke(this.context, s.start, "week") : {};
      return r.weekNumbers && e === "day" ? f(Co, { elTag: "th", elClasses: [
        "fc-timegrid-axis",
        "fc-scrollgrid-shrink"
      ], elAttrs: {
        "aria-hidden": !0
      }, date: s.start, defaultFormat: sg }, (l) => f(
        "div",
        { className: [
          "fc-timegrid-axis-frame",
          "fc-scrollgrid-shrink-frame",
          "fc-timegrid-axis-frame-liquid"
        ].join(" "), style: { height: n } },
        f(l, { elTag: "a", elClasses: [
          "fc-timegrid-axis-cushion",
          "fc-scrollgrid-shrink-cushion",
          "fc-scrollgrid-sync-inner"
        ], elAttrs: o })
      )) : f(
        "th",
        { "aria-hidden": !0, className: "fc-timegrid-axis" },
        f("div", { className: "fc-timegrid-axis-frame", style: { height: n } })
      );
    }, this.renderTableRowAxis = (e) => {
      let { options: n, viewApi: r } = this.context, i = {
        text: n.allDayText,
        view: r
      };
      return f(j, { elTag: "td", elClasses: [
        "fc-timegrid-axis",
        "fc-scrollgrid-shrink"
      ], elAttrs: {
        "aria-hidden": !0
      }, renderProps: i, generatorName: "allDayContent", generator: n.allDayContent || lg, classNameGenerator: n.allDayClassNames, didMount: n.allDayDidMount, willUnmount: n.allDayWillUnmount }, (s) => f(
        "div",
        { className: [
          "fc-timegrid-axis-frame",
          "fc-scrollgrid-shrink-frame",
          e == null ? " fc-timegrid-axis-frame-liquid" : ""
        ].join(" "), style: { height: e } },
        f(s, { elTag: "span", elClasses: [
          "fc-timegrid-axis-cushion",
          "fc-scrollgrid-shrink-cushion",
          "fc-scrollgrid-sync-inner"
        ] })
      ));
    }, this.handleSlatCoords = (e) => {
      this.setState({ slatCoords: e });
    };
  }
  renderSimpleLayout(e, n, r) {
    let { context: i, props: s } = this, a = [], o = on(i.options);
    return e && a.push({
      type: "header",
      key: "header",
      isSticky: o,
      chunk: {
        elRef: this.headerElRef,
        tableClassName: "fc-col-header",
        rowContent: e
      }
    }), n && (a.push({
      type: "body",
      key: "all-day",
      chunk: { content: n }
    }), a.push({
      type: "body",
      key: "all-day-divider",
      outerContent: f(
        "tr",
        { role: "presentation", className: "fc-scrollgrid-section" },
        f("td", { className: "fc-timegrid-divider " + i.theme.getClass("tableCellShaded") })
      )
    })), a.push({
      type: "body",
      key: "body",
      liquid: !0,
      expandRows: Boolean(i.options.expandRows),
      chunk: {
        scrollerElRef: this.scrollerElRef,
        content: r
      }
    }), f(
      bt,
      { elRef: this.rootElRef, elClasses: ["fc-timegrid"], viewSpec: i.viewSpec },
      f(Br, { liquid: !s.isHeightAuto && !s.forPrint, collapsibleWidth: s.forPrint, cols: [{ width: "shrink" }], sections: a })
    );
  }
  renderHScrollLayout(e, n, r, i, s, a, o) {
    let l = this.context.pluginHooks.scrollGridImpl;
    if (!l)
      throw new Error("No ScrollGrid implementation");
    let { context: c, props: u } = this, m = !u.forPrint && on(c.options), h = !u.forPrint && Eo(c.options), d = [];
    e && d.push({
      type: "header",
      key: "header",
      isSticky: m,
      syncRowHeights: !0,
      chunks: [
        {
          key: "axis",
          rowContent: (y) => f("tr", { role: "presentation" }, this.renderHeadAxis("day", y.rowSyncHeights[0]))
        },
        {
          key: "cols",
          elRef: this.headerElRef,
          tableClassName: "fc-col-header",
          rowContent: e
        }
      ]
    }), n && (d.push({
      type: "body",
      key: "all-day",
      syncRowHeights: !0,
      chunks: [
        {
          key: "axis",
          rowContent: (y) => f("tr", { role: "presentation" }, this.renderTableRowAxis(y.rowSyncHeights[0]))
        },
        {
          key: "cols",
          content: n
        }
      ]
    }), d.push({
      key: "all-day-divider",
      type: "body",
      outerContent: f(
        "tr",
        { role: "presentation", className: "fc-scrollgrid-section" },
        f("td", { colSpan: 2, className: "fc-timegrid-divider " + c.theme.getClass("tableCellShaded") })
      )
    }));
    let p = c.options.nowIndicator;
    return d.push({
      type: "body",
      key: "body",
      liquid: !0,
      expandRows: Boolean(c.options.expandRows),
      chunks: [
        {
          key: "axis",
          content: (y) => f(
            "div",
            { className: "fc-timegrid-axis-chunk" },
            f(
              "table",
              { "aria-hidden": !0, style: { height: y.expandRows ? y.clientHeight : "" } },
              y.tableColGroupNode,
              f(
                "tbody",
                null,
                f(ig, { slatMetas: a })
              )
            ),
            f(
              "div",
              { className: "fc-timegrid-now-indicator-container" },
              f(rt, { unit: p ? "minute" : "day" }, (v) => {
                let b = p && o && o.safeComputeTop(v);
                return typeof b == "number" ? f(Lr, { elClasses: ["fc-timegrid-now-indicator-arrow"], elStyle: { top: b }, isAxis: !0, date: v }) : null;
              })
            )
          )
        },
        {
          key: "cols",
          scrollerElRef: this.scrollerElRef,
          content: r
        }
      ]
    }), h && d.push({
      key: "footer",
      type: "footer",
      isSticky: !0,
      chunks: [
        {
          key: "axis",
          content: sr
        },
        {
          key: "cols",
          content: sr
        }
      ]
    }), f(
      bt,
      { elRef: this.rootElRef, elClasses: ["fc-timegrid"], viewSpec: c.viewSpec },
      f(l, { liquid: !u.isHeightAuto && !u.forPrint, collapsibleWidth: !1, colGroups: [
        { width: "shrink", cols: [{ width: "shrink" }] },
        { cols: [{ span: i, minWidth: s }] }
      ], sections: d })
    );
  }
  getAllDayMaxEventProps() {
    let { dayMaxEvents: e, dayMaxEventRows: n } = this.context.options;
    return (e === !0 || n === !0) && (e = void 0, n = ag), { dayMaxEvents: e, dayMaxEventRows: n };
  }
}
function lg(t) {
  return t.text;
}
class cg {
  constructor(e, n, r) {
    this.positions = e, this.dateProfile = n, this.slotDuration = r;
  }
  safeComputeTop(e) {
    let { dateProfile: n } = this;
    if (Ce(n.currentRange, e)) {
      let r = F(e), i = e.valueOf() - r.valueOf();
      if (i >= ie(n.slotMinTime) && i < ie(n.slotMaxTime))
        return this.computeTimeTop(k(i));
    }
    return null;
  }
  computeDateTop(e, n) {
    return n || (n = F(e)), this.computeTimeTop(k(e.valueOf() - n.valueOf()));
  }
  computeTimeTop(e) {
    let { positions: n, dateProfile: r } = this, i = n.els.length, s = (e.milliseconds - ie(r.slotMinTime)) / ie(this.slotDuration), a, o;
    return s = Math.max(0, s), s = Math.min(i, s), a = Math.floor(s), a = Math.min(a, i - 1), o = s - a, n.tops[a] + n.getHeight(a) * o;
  }
}
class ug extends N {
  render() {
    let { props: e, context: n } = this, { options: r } = n, { slatElRefs: i } = e;
    return f("tbody", null, e.slatMetas.map((s, a) => {
      let o = {
        time: s.time,
        date: n.dateEnv.toDate(s.date),
        view: n.viewApi
      };
      return f(
        "tr",
        { key: s.key, ref: i.createRef(s.key) },
        e.axis && f(Bo, Object.assign({}, s)),
        f(j, { elTag: "td", elClasses: [
          "fc-timegrid-slot",
          "fc-timegrid-slot-lane",
          !s.isLabeled && "fc-timegrid-slot-minor"
        ], elAttrs: {
          "data-time": s.isoTimeStr
        }, renderProps: o, generatorName: "slotLaneContent", generator: r.slotLaneContent, classNameGenerator: r.slotLaneClassNames, didMount: r.slotLaneDidMount, willUnmount: r.slotLaneWillUnmount })
      );
    }));
  }
}
class dg extends N {
  constructor() {
    super(...arguments), this.rootElRef = q(), this.slatElRefs = new he();
  }
  render() {
    let { props: e, context: n } = this;
    return f(
      "div",
      { ref: this.rootElRef, className: "fc-timegrid-slots" },
      f(
        "table",
        { "aria-hidden": !0, className: n.theme.getClass("table"), style: {
          minWidth: e.tableMinWidth,
          width: e.clientWidth,
          height: e.minHeight
        } },
        e.tableColGroupNode,
        f(ug, { slatElRefs: this.slatElRefs, axis: e.axis, slatMetas: e.slatMetas })
      )
    );
  }
  componentDidMount() {
    this.updateSizing();
  }
  componentDidUpdate() {
    this.updateSizing();
  }
  componentWillUnmount() {
    this.props.onCoords && this.props.onCoords(null);
  }
  updateSizing() {
    let { context: e, props: n } = this;
    n.onCoords && n.clientWidth !== null && this.rootElRef.current.offsetHeight && n.onCoords(new cg(new wt(this.rootElRef.current, fg(this.slatElRefs.currentMap, n.slatMetas), !1, !0), this.props.dateProfile, e.options.slotDuration));
  }
}
function fg(t, e) {
  return e.map((n) => t[n.key]);
}
function lt(t, e) {
  let n = [], r;
  for (r = 0; r < e; r += 1)
    n.push([]);
  if (t)
    for (r = 0; r < t.length; r += 1)
      n[t[r].col].push(t[r]);
  return n;
}
function us(t, e) {
  let n = [];
  if (t) {
    for (let r = 0; r < e; r += 1)
      n[r] = {
        affectedInstances: t.affectedInstances,
        isEvent: t.isEvent,
        segs: []
      };
    for (let r of t.segs)
      n[r.col].segs.push(r);
  } else
    for (let r = 0; r < e; r += 1)
      n[r] = null;
  return n;
}
class hg extends N {
  render() {
    let { props: e } = this;
    return f(To, { elClasses: ["fc-timegrid-more-link"], elStyle: {
      top: e.top,
      bottom: e.bottom
    }, allDayDate: null, moreCnt: e.hiddenSegs.length, allSegs: e.hiddenSegs, hiddenSegs: e.hiddenSegs, extraDateSpan: e.extraDateSpan, dateProfile: e.dateProfile, todayRange: e.todayRange, popoverContent: () => zo(e.hiddenSegs, e), defaultGenerator: mg }, (n) => f(n, { elTag: "div", elClasses: ["fc-timegrid-more-link-inner", "fc-sticky"] }));
  }
}
function mg(t) {
  return t.shortText;
}
function gg(t, e, n) {
  let r = new fo();
  e != null && (r.strictOrder = e), n != null && (r.maxStackCnt = n);
  let i = r.addSegs(t), s = yh(i), a = pg(r);
  return a = wg(a, 1), { segRects: Eg(a), hiddenGroups: s };
}
function pg(t) {
  const { entriesByLevel: e } = t, n = Vr((r, i) => r + ":" + i, (r, i) => {
    let s = bg(t, r, i), a = ds(s, n), o = e[r][i];
    return [
      Object.assign(Object.assign({}, o), { nextLevelNodes: a[0] }),
      o.thickness + a[1]
    ];
  });
  return ds(e.length ? { level: 0, lateralStart: 0, lateralEnd: e[0].length } : null, n)[0];
}
function ds(t, e) {
  if (!t)
    return [[], 0];
  let { level: n, lateralStart: r, lateralEnd: i } = t, s = r, a = [];
  for (; s < i; )
    a.push(e(n, s)), s += 1;
  return a.sort(vg), [
    a.map(yg),
    a[0][1]
  ];
}
function vg(t, e) {
  return e[1] - t[1];
}
function yg(t) {
  return t[0];
}
function bg(t, e, n) {
  let { levelCoords: r, entriesByLevel: i } = t, s = i[e][n], a = r[e] + s.thickness, o = r.length, l = e;
  for (; l < o && r[l] < a; l += 1)
    ;
  for (; l < o; l += 1) {
    let c = i[l], u, m = ir(c, s.span.start, rr), h = m[0] + m[1], d = h;
    for (; (u = c[d]) && u.span.start < s.span.end; )
      d += 1;
    if (h < d)
      return { level: l, lateralStart: h, lateralEnd: d };
  }
  return null;
}
function wg(t, e) {
  const n = Vr((r, i, s) => Oe(r), (r, i, s) => {
    let { nextLevelNodes: a, thickness: o } = r, l = o + s, c = o / l, u, m = [];
    if (!a.length)
      u = e;
    else
      for (let d of a)
        if (u === void 0) {
          let p = n(d, i, l);
          u = p[0], m.push(p[1]);
        } else {
          let p = n(d, u, 0);
          m.push(p[1]);
        }
    let h = (u - i) * c;
    return [u - h, Object.assign(Object.assign({}, r), { thickness: h, nextLevelNodes: m })];
  });
  return t.map((r) => n(r, 0, 0)[1]);
}
function Eg(t) {
  let e = [];
  const n = Vr((i, s, a) => Oe(i), (i, s, a) => {
    let o = Object.assign(Object.assign({}, i), {
      levelCoord: s,
      stackDepth: a,
      stackForward: 0
    });
    return e.push(o), o.stackForward = r(i.nextLevelNodes, s + i.thickness, a + 1) + 1;
  });
  function r(i, s, a) {
    let o = 0;
    for (let l of i)
      o = Math.max(n(l, s, a), o);
    return o;
  }
  return r(t, 0, 0), e;
}
function Vr(t, e) {
  const n = {};
  return (...r) => {
    let i = t(...r);
    return i in n ? n[i] : n[i] = e(...r);
  };
}
function fs(t, e, n = null, r = 0) {
  let i = [];
  if (n)
    for (let s = 0; s < t.length; s += 1) {
      let a = t[s], o = n.computeDateTop(a.start, e), l = Math.max(
        o + (r || 0),
        n.computeDateTop(a.end, e)
      );
      i.push({
        start: Math.round(o),
        end: Math.round(l)
      });
    }
  return i;
}
function Ag(t, e, n, r) {
  let i = [], s = [];
  for (let c = 0; c < t.length; c += 1) {
    let u = e[c];
    u ? i.push({
      index: c,
      thickness: 1,
      span: u
    }) : s.push(t[c]);
  }
  let { segRects: a, hiddenGroups: o } = gg(i, n, r), l = [];
  for (let c of a)
    l.push({
      seg: t[c.index],
      rect: c
    });
  for (let c of s)
    l.push({ seg: c, rect: null });
  return { segPlacements: l, hiddenGroups: o };
}
const Sg = H({
  hour: "numeric",
  minute: "2-digit",
  meridiem: !1
});
class Lo extends N {
  render() {
    return f(Ao, Object.assign({}, this.props, { elClasses: [
      "fc-timegrid-event",
      "fc-v-event",
      this.props.isShort && "fc-timegrid-event-short"
    ], defaultTimeFormat: Sg }));
  }
}
class Dg extends N {
  constructor() {
    super(...arguments), this.sortEventSegs = A(Or);
  }
  render() {
    let { props: e, context: n } = this, { options: r } = n, i = r.selectMirror, s = e.eventDrag && e.eventDrag.segs || e.eventResize && e.eventResize.segs || i && e.dateSelectionSegs || [], a = e.eventDrag && e.eventDrag.affectedInstances || e.eventResize && e.eventResize.affectedInstances || {}, o = this.sortEventSegs(e.fgEventSegs, r.eventOrder);
    return f(zr, { elTag: "td", elRef: e.elRef, elClasses: [
      "fc-timegrid-col",
      ...e.extraClassNames || []
    ], elAttrs: Object.assign({ role: "gridcell" }, e.extraDataAttrs), date: e.date, dateProfile: e.dateProfile, todayRange: e.todayRange, extraRenderProps: e.extraRenderProps }, (l) => f(
      "div",
      { className: "fc-timegrid-col-frame" },
      f(
        "div",
        { className: "fc-timegrid-col-bg" },
        this.renderFillSegs(e.businessHourSegs, "non-business"),
        this.renderFillSegs(e.bgEventSegs, "bg-event"),
        this.renderFillSegs(e.dateSelectionSegs, "highlight")
      ),
      f("div", { className: "fc-timegrid-col-events" }, this.renderFgSegs(o, a, !1, !1, !1)),
      f("div", { className: "fc-timegrid-col-events" }, this.renderFgSegs(s, {}, Boolean(e.eventDrag), Boolean(e.eventResize), Boolean(i))),
      f("div", { className: "fc-timegrid-now-indicator-container" }, this.renderNowIndicator(e.nowIndicatorSegs)),
      Ur(r) && f(l, { elTag: "div", elClasses: ["fc-timegrid-col-misc"] })
    ));
  }
  renderFgSegs(e, n, r, i, s) {
    let { props: a } = this;
    return a.forPrint ? zo(e, a) : this.renderPositionedFgSegs(e, n, r, i, s);
  }
  renderPositionedFgSegs(e, n, r, i, s) {
    let { eventMaxStack: a, eventShortHeight: o, eventOrderStrict: l, eventMinHeight: c } = this.context.options, { date: u, slatCoords: m, eventSelection: h, todayRange: d, nowDate: p } = this.props, y = r || i || s, v = fs(e, u, m, c), { segPlacements: b, hiddenGroups: E } = Ag(e, v, l, a);
    return f(
      O,
      null,
      this.renderHiddenGroups(E, e),
      b.map((T) => {
        let { seg: C, rect: I } = T, P = C.eventRange.instance.instanceId, z = y || Boolean(!n[P] && I), _ = Ln(I && I.span), oe = !y && I ? this.computeSegHStyle(I) : { left: 0, right: 0 }, qo = Boolean(I) && I.stackForward > 0, Zo = Boolean(I) && I.span.end - I.span.start < o;
        return f(
          "div",
          { className: "fc-timegrid-event-harness" + (qo ? " fc-timegrid-event-harness-inset" : ""), key: P, style: Object.assign(Object.assign({ visibility: z ? "" : "hidden" }, _), oe) },
          f(Lo, Object.assign({ seg: C, isDragging: r, isResizing: i, isDateSelecting: s, isSelected: P === h, isShort: Zo }, me(C, d, p)))
        );
      })
    );
  }
  renderHiddenGroups(e, n) {
    let { extraDateSpan: r, dateProfile: i, todayRange: s, nowDate: a, eventSelection: o, eventDrag: l, eventResize: c } = this.props;
    return f(O, null, e.map((u) => {
      let m = Ln(u.span), h = Cg(u.entries, n);
      return f(hg, { key: Pa(_o(h)), hiddenSegs: h, top: m.top, bottom: m.bottom, extraDateSpan: r, dateProfile: i, todayRange: s, nowDate: a, eventSelection: o, eventDrag: l, eventResize: c });
    }));
  }
  renderFillSegs(e, n) {
    let { props: r, context: i } = this, a = fs(e, r.date, r.slatCoords, i.options.eventMinHeight).map((o, l) => {
      let c = e[l];
      return f("div", { key: ao(c.eventRange), className: "fc-timegrid-bg-harness", style: Ln(o) }, n === "bg-event" ? f(So, Object.assign({ seg: c }, me(c, r.todayRange, r.nowDate))) : Do(n));
    });
    return f(O, null, a);
  }
  renderNowIndicator(e) {
    let { slatCoords: n, date: r } = this.props;
    return n ? e.map((i, s) => f(
      Lr,
      {
        key: s,
        elClasses: ["fc-timegrid-now-indicator-line"],
        elStyle: {
          top: n.computeDateTop(i.start, r)
        },
        isAxis: !1,
        date: r
      }
    )) : null;
  }
  computeSegHStyle(e) {
    let { isRtl: n, options: r } = this.context, i = r.slotEventOverlap, s = e.levelCoord, a = e.levelCoord + e.thickness, o, l;
    i && (a = Math.min(1, s + (a - s) * 2)), n ? (o = 1 - a, l = s) : (o = s, l = 1 - a);
    let c = {
      zIndex: e.stackDepth + 1,
      left: o * 100 + "%",
      right: l * 100 + "%"
    };
    return i && !e.stackForward && (c[n ? "marginLeft" : "marginRight"] = 10 * 2), c;
  }
}
function zo(t, { todayRange: e, nowDate: n, eventSelection: r, eventDrag: i, eventResize: s }) {
  let a = (i ? i.affectedInstances : null) || (s ? s.affectedInstances : null) || {};
  return f(O, null, t.map((o) => {
    let l = o.eventRange.instance.instanceId;
    return f(
      "div",
      { key: l, style: { visibility: a[l] ? "hidden" : "" } },
      f(Lo, Object.assign({ seg: o, isDragging: !1, isResizing: !1, isDateSelecting: !1, isSelected: l === r, isShort: !1 }, me(o, e, n)))
    );
  }));
}
function Ln(t) {
  return t ? {
    top: t.start,
    bottom: -t.end
  } : { top: "", bottom: "" };
}
function Cg(t, e) {
  return t.map((n) => e[n.index]);
}
class Tg extends N {
  constructor() {
    super(...arguments), this.splitFgEventSegs = A(lt), this.splitBgEventSegs = A(lt), this.splitBusinessHourSegs = A(lt), this.splitNowIndicatorSegs = A(lt), this.splitDateSelectionSegs = A(lt), this.splitEventDrag = A(us), this.splitEventResize = A(us), this.rootElRef = q(), this.cellElRefs = new he();
  }
  render() {
    let { props: e, context: n } = this, r = n.options.nowIndicator && e.slatCoords && e.slatCoords.safeComputeTop(e.nowDate), i = e.cells.length, s = this.splitFgEventSegs(e.fgEventSegs, i), a = this.splitBgEventSegs(e.bgEventSegs, i), o = this.splitBusinessHourSegs(e.businessHourSegs, i), l = this.splitNowIndicatorSegs(e.nowIndicatorSegs, i), c = this.splitDateSelectionSegs(e.dateSelectionSegs, i), u = this.splitEventDrag(e.eventDrag, i), m = this.splitEventResize(e.eventResize, i);
    return f(
      "div",
      { className: "fc-timegrid-cols", ref: this.rootElRef },
      f(
        "table",
        { role: "presentation", style: {
          minWidth: e.tableMinWidth,
          width: e.clientWidth
        } },
        e.tableColGroupNode,
        f(
          "tbody",
          { role: "presentation" },
          f(
            "tr",
            { role: "row" },
            e.axis && f(
              "td",
              { "aria-hidden": !0, className: "fc-timegrid-col fc-timegrid-axis" },
              f(
                "div",
                { className: "fc-timegrid-col-frame" },
                f("div", { className: "fc-timegrid-now-indicator-container" }, typeof r == "number" && f(Lr, { elClasses: ["fc-timegrid-now-indicator-arrow"], elStyle: { top: r }, isAxis: !0, date: e.nowDate }))
              )
            ),
            e.cells.map((h, d) => f(Dg, { key: h.key, elRef: this.cellElRefs.createRef(h.key), dateProfile: e.dateProfile, date: h.date, nowDate: e.nowDate, todayRange: e.todayRange, extraRenderProps: h.extraRenderProps, extraDataAttrs: h.extraDataAttrs, extraClassNames: h.extraClassNames, extraDateSpan: h.extraDateSpan, fgEventSegs: s[d], bgEventSegs: a[d], businessHourSegs: o[d], nowIndicatorSegs: l[d], dateSelectionSegs: c[d], eventDrag: u[d], eventResize: m[d], slatCoords: e.slatCoords, eventSelection: e.eventSelection, forPrint: e.forPrint }))
          )
        )
      )
    );
  }
  componentDidMount() {
    this.updateCoords();
  }
  componentDidUpdate() {
    this.updateCoords();
  }
  updateCoords() {
    let { props: e } = this;
    e.onColCoords && e.clientWidth !== null && e.onColCoords(new wt(
      this.rootElRef.current,
      _g(this.cellElRefs.currentMap, e.cells),
      !0,
      !1
    ));
  }
}
function _g(t, e) {
  return e.map((n) => t[n.key]);
}
class Rg extends ue {
  constructor() {
    super(...arguments), this.processSlotOptions = A(xg), this.state = {
      slatCoords: null
    }, this.handleRootEl = (e) => {
      e ? this.context.registerInteractiveComponent(this, {
        el: e,
        isHitComboAllowed: this.props.isHitComboAllowed
      }) : this.context.unregisterInteractiveComponent(this);
    }, this.handleScrollRequest = (e) => {
      let { onScrollTopRequest: n } = this.props, { slatCoords: r } = this.state;
      if (n && r) {
        if (e.time) {
          let i = r.computeTimeTop(e.time);
          i = Math.ceil(i), i && (i += 1), n(i);
        }
        return !0;
      }
      return !1;
    }, this.handleColCoords = (e) => {
      this.colCoords = e;
    }, this.handleSlatCoords = (e) => {
      this.setState({ slatCoords: e }), this.props.onSlatCoords && this.props.onSlatCoords(e);
    };
  }
  render() {
    let { props: e, state: n } = this;
    return f(
      "div",
      { className: "fc-timegrid-body", ref: this.handleRootEl, style: {
        width: e.clientWidth,
        minWidth: e.tableMinWidth
      } },
      f(dg, { axis: e.axis, dateProfile: e.dateProfile, slatMetas: e.slatMetas, clientWidth: e.clientWidth, minHeight: e.expandRows ? e.clientHeight : "", tableMinWidth: e.tableMinWidth, tableColGroupNode: e.axis ? e.tableColGroupNode : null, onCoords: this.handleSlatCoords }),
      f(Tg, { cells: e.cells, axis: e.axis, dateProfile: e.dateProfile, businessHourSegs: e.businessHourSegs, bgEventSegs: e.bgEventSegs, fgEventSegs: e.fgEventSegs, dateSelectionSegs: e.dateSelectionSegs, eventSelection: e.eventSelection, eventDrag: e.eventDrag, eventResize: e.eventResize, todayRange: e.todayRange, nowDate: e.nowDate, nowIndicatorSegs: e.nowIndicatorSegs, clientWidth: e.clientWidth, tableMinWidth: e.tableMinWidth, tableColGroupNode: e.tableColGroupNode, slatCoords: n.slatCoords, onColCoords: this.handleColCoords, forPrint: e.forPrint })
    );
  }
  componentDidMount() {
    this.scrollResponder = this.context.createScrollResponder(this.handleScrollRequest);
  }
  componentDidUpdate(e) {
    this.scrollResponder.update(e.dateProfile !== this.props.dateProfile);
  }
  componentWillUnmount() {
    this.scrollResponder.detach();
  }
  queryHit(e, n) {
    let { dateEnv: r, options: i } = this.context, { colCoords: s } = this, { dateProfile: a } = this.props, { slatCoords: o } = this.state, { snapDuration: l, snapsPerSlot: c } = this.processSlotOptions(this.props.slotDuration, i.snapDuration), u = s.leftToIndex(e), m = o.positions.topToIndex(n);
    if (u != null && m != null) {
      let h = this.props.cells[u], d = o.positions.tops[m], p = o.positions.getHeight(m), y = (n - d) / p, v = Math.floor(y * c), b = m * c + v, E = this.props.cells[u].date, T = Jn(a.slotMinTime, sd(l, b)), C = r.add(E, T), I = r.add(C, l);
      return {
        dateProfile: a,
        dateSpan: Object.assign({ range: { start: C, end: I }, allDay: !1 }, h.extraDateSpan),
        dayEl: s.els[u],
        rect: {
          left: s.lefts[u],
          right: s.rights[u],
          top: d,
          bottom: d + p
        },
        layer: 0
      };
    }
    return null;
  }
}
function xg(t, e) {
  let n = e || t, r = Sr(t, n);
  return r === null && (n = t, r = 1), { snapDuration: n, snapsPerSlot: r };
}
class kg extends yo {
  sliceRange(e, n) {
    let r = [];
    for (let i = 0; i < n.length; i += 1) {
      let s = Le(e, n[i]);
      s && r.push({
        start: s.start,
        end: s.end,
        isStart: s.start.valueOf() === e.start.valueOf(),
        isEnd: s.end.valueOf() === e.end.valueOf(),
        col: i
      });
    }
    return r;
  }
}
class Ig extends ue {
  constructor() {
    super(...arguments), this.buildDayRanges = A(Mg), this.slicer = new kg(), this.timeColsRef = q();
  }
  render() {
    let { props: e, context: n } = this, { dateProfile: r, dayTableModel: i } = e, s = n.options.nowIndicator, a = this.buildDayRanges(i, r, n.dateEnv);
    return f(rt, { unit: s ? "minute" : "day" }, (o, l) => f(Rg, Object.assign({ ref: this.timeColsRef }, this.slicer.sliceProps(e, r, null, n, a), { forPrint: e.forPrint, axis: e.axis, dateProfile: r, slatMetas: e.slatMetas, slotDuration: e.slotDuration, cells: i.cells[0], tableColGroupNode: e.tableColGroupNode, tableMinWidth: e.tableMinWidth, clientWidth: e.clientWidth, clientHeight: e.clientHeight, expandRows: e.expandRows, nowDate: o, nowIndicatorSegs: s && this.slicer.sliceNowDate(o, n, a), todayRange: l, onScrollTopRequest: e.onScrollTopRequest, onSlatCoords: e.onSlatCoords })));
  }
}
function Mg(t, e, n) {
  let r = [];
  for (let i of t.headerDates)
    r.push({
      start: n.add(i, e.slotMinTime),
      end: n.add(i, e.slotMaxTime)
    });
  return r;
}
const hs = [
  { hours: 1 },
  { minutes: 30 },
  { minutes: 15 },
  { seconds: 30 },
  { seconds: 15 }
];
function Ng(t, e, n, r, i) {
  let s = new Date(0), a = t, o = k(0), l = n || Og(r), c = [];
  for (; ie(a) < ie(e); ) {
    let u = i.add(s, a), m = Sr(o, l) !== null;
    c.push({
      date: u,
      time: a,
      key: u.toISOString(),
      isoTimeStr: ld(u),
      isLabeled: m
    }), a = Jn(a, r), o = Jn(o, r);
  }
  return c;
}
function Og(t) {
  let e, n, r;
  for (e = hs.length - 1; e >= 0; e -= 1)
    if (n = k(hs[e]), r = Sr(n, t), r !== null && r > 1)
      return n;
  return t;
}
class Fg extends og {
  constructor() {
    super(...arguments), this.buildTimeColsModel = A(Hg), this.buildSlatMetas = A(Ng);
  }
  render() {
    let { options: e, dateEnv: n, dateProfileGenerator: r } = this.context, { props: i } = this, { dateProfile: s } = i, a = this.buildTimeColsModel(s, r), o = this.allDaySplitter.splitProps(i), l = this.buildSlatMetas(s.slotMinTime, s.slotMaxTime, e.slotLabelInterval, e.slotDuration, n), { dayMinWidth: c } = e, u = !c, m = c, h = e.dayHeaders && f(go, { dates: a.headerDates, dateProfile: s, datesRepDistinctDays: !0, renderIntro: u ? this.renderHeadAxis : null }), d = e.allDaySlot !== !1 && ((y) => f(Po, Object.assign({}, o.allDay, { dateProfile: s, dayTableModel: a, nextDayThreshold: e.nextDayThreshold, tableMinWidth: y.tableMinWidth, colGroupNode: y.tableColGroupNode, renderRowIntro: u ? this.renderTableRowAxis : null, showWeekNumbers: !1, expandRows: !1, headerAlignElRef: this.headerElRef, clientWidth: y.clientWidth, clientHeight: y.clientHeight, forPrint: i.forPrint }, this.getAllDayMaxEventProps()))), p = (y) => f(Ig, Object.assign({}, o.timed, { dayTableModel: a, dateProfile: s, axis: u, slotDuration: e.slotDuration, slatMetas: l, forPrint: i.forPrint, tableColGroupNode: y.tableColGroupNode, tableMinWidth: y.tableMinWidth, clientWidth: y.clientWidth, clientHeight: y.clientHeight, onSlatCoords: this.handleSlatCoords, expandRows: y.expandRows, onScrollTopRequest: this.handleScrollTopRequest }));
    return m ? this.renderHScrollLayout(h, d, p, a.colCnt, c, l, this.state.slatCoords) : this.renderSimpleLayout(h, d, p);
  }
}
function Hg(t, e) {
  let n = new po(t.renderRange, e);
  return new vo(n, !1);
}
const Pg = {
  allDaySlot: Boolean
};
var Bg = '.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';
fn(Bg);
var Lg = ce({
  name: "@fullcalendar/timegrid",
  initialView: "timeGridWeek",
  optionRefiners: Pg,
  views: {
    timeGrid: {
      component: Fg,
      usesMinMaxTime: !0,
      allDaySlot: !0,
      slotDuration: "00:30:00",
      slotEventOverlap: !0
    },
    timeGridDay: {
      type: "timeGrid",
      duration: { days: 1 }
    },
    timeGridWeek: {
      type: "timeGrid",
      duration: { weeks: 1 }
    }
  }
});
class zg extends N {
  constructor() {
    super(...arguments), this.state = {
      textId: De()
    };
  }
  render() {
    let { theme: e, dateEnv: n, options: r, viewApi: i } = this.context, { cellId: s, dayDate: a, todayRange: o } = this.props, { textId: l } = this.state, c = Hr(a, o), u = r.listDayFormat ? n.format(a, r.listDayFormat) : "", m = r.listDaySideFormat ? n.format(a, r.listDaySideFormat) : "", h = Object.assign({
      date: n.toDate(a),
      view: i,
      textId: l,
      text: u,
      sideText: m,
      navLinkAttrs: Ke(this.context, a),
      sideNavLinkAttrs: Ke(this.context, a, "day", !1)
    }, c);
    return f(j, { elTag: "tr", elClasses: [
      "fc-list-day",
      ...gn(c, e)
    ], elAttrs: {
      "data-date": hn(a)
    }, renderProps: h, generatorName: "dayHeaderContent", generator: r.dayHeaderContent || Ug, classNameGenerator: r.dayHeaderClassNames, didMount: r.dayHeaderDidMount, willUnmount: r.dayHeaderWillUnmount }, (d) => f(
      "th",
      { scope: "colgroup", colSpan: 3, id: s, "aria-labelledby": l },
      f(d, { elTag: "div", elClasses: [
        "fc-list-day-cushion",
        e.getClass("tableCellShaded")
      ] })
    ));
  }
}
function Ug(t) {
  return f(
    O,
    null,
    t.text && f("a", Object.assign({ id: t.textId, className: "fc-list-day-text" }, t.navLinkAttrs), t.text),
    t.sideText && f("a", Object.assign({ "aria-hidden": !0, className: "fc-list-day-side-text" }, t.sideNavLinkAttrs), t.sideText)
  );
}
const Vg = H({
  hour: "numeric",
  minute: "2-digit",
  meridiem: "short"
});
class Wg extends N {
  render() {
    let { props: e, context: n } = this, { options: r } = n, { seg: i, timeHeaderId: s, eventHeaderId: a, dateHeaderId: o } = e, l = r.eventTimeFormat || Vg;
    return f(pn, Object.assign({}, e, { elTag: "tr", elClasses: [
      "fc-list-event",
      i.eventRange.def.url && "fc-event-forced-url"
    ], defaultGenerator: () => jg(i, n), seg: i, timeText: "", disableDragging: !0, disableResizing: !0 }), (c, u) => f(
      O,
      null,
      Gg(i, l, n, s, o),
      f(
        "td",
        { "aria-hidden": !0, className: "fc-list-event-graphic" },
        f("span", { className: "fc-list-event-dot", style: {
          borderColor: u.borderColor || u.backgroundColor
        } })
      ),
      f(c, { elTag: "td", elClasses: ["fc-list-event-title"], elAttrs: { headers: `${a} ${o}` } })
    ));
  }
}
function jg(t, e) {
  let n = Fr(t, e);
  return f("a", Object.assign({}, n), t.eventRange.def.title);
}
function Gg(t, e, n, r, i) {
  let { options: s } = n;
  if (s.displayEventTime !== !1) {
    let a = t.eventRange.def, o = t.eventRange.instance, l = !1, c;
    if (a.allDay ? l = !0 : Ld(t.eventRange.range) ? t.isStart ? c = pt(t, e, n, null, null, o.range.start, t.end) : t.isEnd ? c = pt(t, e, n, null, null, t.start, o.range.end) : l = !0 : c = pt(t, e, n), l) {
      let u = {
        text: n.options.allDayText,
        view: n.viewApi
      };
      return f(j, { elTag: "td", elClasses: ["fc-list-event-time"], elAttrs: {
        headers: `${r} ${i}`
      }, renderProps: u, generatorName: "allDayContent", generator: s.allDayContent || qg, classNameGenerator: s.allDayClassNames, didMount: s.allDayDidMount, willUnmount: s.allDayWillUnmount });
    }
    return f("td", { className: "fc-list-event-time" }, c);
  }
  return null;
}
function qg(t) {
  return t.text;
}
class Zg extends ue {
  constructor() {
    super(...arguments), this.computeDateVars = A(Yg), this.eventStoreToSegs = A(this._eventStoreToSegs), this.state = {
      timeHeaderId: De(),
      eventHeaderId: De(),
      dateHeaderIdRoot: De()
    }, this.setRootEl = (e) => {
      e ? this.context.registerInteractiveComponent(this, {
        el: e
      }) : this.context.unregisterInteractiveComponent(this);
    };
  }
  render() {
    let { props: e, context: n } = this, { dayDates: r, dayRanges: i } = this.computeDateVars(e.dateProfile), s = this.eventStoreToSegs(e.eventStore, e.eventUiBases, i);
    return f(
      bt,
      { elRef: this.setRootEl, elClasses: [
        "fc-list",
        n.theme.getClass("table"),
        n.options.stickyHeaderDates !== !1 ? "fc-list-sticky" : ""
      ], viewSpec: n.viewSpec },
      f(bo, { liquid: !e.isHeightAuto, overflowX: e.isHeightAuto ? "visible" : "hidden", overflowY: e.isHeightAuto ? "visible" : "auto" }, s.length > 0 ? this.renderSegList(s, r) : this.renderEmptyMessage())
    );
  }
  renderEmptyMessage() {
    let { options: e, viewApi: n } = this.context, r = {
      text: e.noEventsText,
      view: n
    };
    return f(j, { elTag: "div", elClasses: ["fc-list-empty"], renderProps: r, generatorName: "noEventsContent", generator: e.noEventsContent || Qg, classNameGenerator: e.noEventsClassNames, didMount: e.noEventsDidMount, willUnmount: e.noEventsWillUnmount }, (i) => f(i, { elTag: "div", elClasses: ["fc-list-empty-cushion"] }));
  }
  renderSegList(e, n) {
    let { theme: r, options: i } = this.context, { timeHeaderId: s, eventHeaderId: a, dateHeaderIdRoot: o } = this.state, l = $g(e);
    return f(rt, { unit: "day" }, (c, u) => {
      let m = [];
      for (let h = 0; h < l.length; h += 1) {
        let d = l[h];
        if (d) {
          let p = hn(n[h]), y = o + "-" + p;
          m.push(f(zg, { key: p, cellId: y, dayDate: n[h], todayRange: u })), d = Or(d, i.eventOrder);
          for (let v of d)
            m.push(f(Wg, Object.assign({ key: p + ":" + v.eventRange.instance.instanceId, seg: v, isDragging: !1, isResizing: !1, isDateSelecting: !1, isSelected: !1, timeHeaderId: s, eventHeaderId: a, dateHeaderId: y }, me(v, u, c))));
        }
      }
      return f(
        "table",
        { className: "fc-list-table " + r.getClass("table") },
        f(
          "thead",
          null,
          f(
            "tr",
            null,
            f("th", { scope: "col", id: s }, i.timeHint),
            f("th", { scope: "col", "aria-hidden": !0 }),
            f("th", { scope: "col", id: a }, i.eventHint)
          )
        ),
        f("tbody", null, m)
      );
    });
  }
  _eventStoreToSegs(e, n, r) {
    return this.eventRangesToSegs(tr(e, n, this.props.dateProfile.activeRange, this.context.options.nextDayThreshold).fg, r);
  }
  eventRangesToSegs(e, n) {
    let r = [];
    for (let i of e)
      r.push(...this.eventRangeToSegs(i, n));
    return r;
  }
  eventRangeToSegs(e, n) {
    let { dateEnv: r } = this.context, { nextDayThreshold: i } = this.context.options, s = e.range, a = e.def.allDay, o, l, c, u = [];
    for (o = 0; o < n.length; o += 1)
      if (l = Le(s, n[o]), l && (c = {
        component: this,
        eventRange: e,
        start: l.start,
        end: l.end,
        isStart: e.isStart && l.start.valueOf() === s.start.valueOf(),
        isEnd: e.isEnd && l.end.valueOf() === s.end.valueOf(),
        dayIndex: o
      }, u.push(c), !c.isEnd && !a && o + 1 < n.length && s.end < r.add(n[o + 1].start, i))) {
        c.end = s.end, c.isEnd = !0;
        break;
      }
    return u;
  }
}
function Qg(t) {
  return t.text;
}
function Yg(t) {
  let e = F(t.renderRange.start), n = t.renderRange.end, r = [], i = [];
  for (; e < n; )
    r.push(e), i.push({
      start: e,
      end: W(e, 1)
    }), e = W(e, 1);
  return { dayDates: r, dayRanges: i };
}
function $g(t) {
  let e = [], n, r;
  for (n = 0; n < t.length; n += 1)
    r = t[n], (e[r.dayIndex] || (e[r.dayIndex] = [])).push(r);
  return e;
}
const Jg = {
  listDayFormat: ms,
  listDaySideFormat: ms,
  noEventsClassNames: g,
  noEventsContent: g,
  noEventsDidMount: g,
  noEventsWillUnmount: g
};
function ms(t) {
  return t === !1 ? null : H(t);
}
var Kg = ':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}';
fn(Kg);
var Xg = ce({
  name: "@fullcalendar/list",
  optionRefiners: Jg,
  views: {
    list: {
      component: Zg,
      buttonTextKey: "list",
      listDayFormat: { month: "long", day: "numeric", year: "numeric" }
    },
    listDay: {
      type: "list",
      duration: { days: 1 },
      listDayFormat: { weekday: "long" }
    },
    listWeek: {
      type: "list",
      duration: { weeks: 1 },
      listDayFormat: { weekday: "long" },
      listDaySideFormat: { month: "long", day: "numeric", year: "numeric" }
    },
    listMonth: {
      type: "list",
      duration: { month: 1 },
      listDaySideFormat: { weekday: "long" }
    },
    listYear: {
      type: "list",
      duration: { year: 1 },
      listDaySideFormat: { weekday: "long" }
    }
  }
});
function ep(t) {
  return [
    t.year,
    t.month - 1,
    t.day,
    t.hour,
    t.minute,
    t.second,
    t.millisecond
  ];
}
function Gt(t, e, n) {
  return D.fromObject({
    year: t[0],
    month: t[1] + 1,
    day: t[2],
    hour: t[3],
    minute: t[4],
    second: t[5],
    millisecond: t[6]
  }, {
    locale: n,
    zone: e
  });
}
class tp extends vh {
  offsetForArray(e) {
    return Gt(e, this.timeZoneName).offset;
  }
  timestampToArray(e) {
    return ep(D.fromMillis(e, {
      zone: this.timeZoneName
    }));
  }
}
function np(t, e) {
  let n = Uo(t);
  if (e.end) {
    let r = Gt(e.start.array, e.timeZone, e.localeCodes[0]), i = Gt(e.end.array, e.timeZone, e.localeCodes[0]);
    return or(n, r.toFormat.bind(r), i.toFormat.bind(i), e.defaultSeparator);
  }
  return Gt(e.date.array, e.timeZone, e.localeCodes[0]).toFormat(n.whole);
}
function Uo(t) {
  let e = t.match(/^(.*?)\{(.*)\}(.*)$/);
  if (e) {
    let n = Uo(e[2]);
    return {
      head: e[1],
      middle: n,
      tail: e[3],
      whole: e[1] + n.whole + e[3]
    };
  }
  return {
    head: null,
    middle: null,
    tail: null,
    whole: t
  };
}
function or(t, e, n, r) {
  if (t.middle) {
    let a = e(t.head), o = or(t.middle, e, n, r), l = e(t.tail), c = n(t.head), u = or(t.middle, e, n, r), m = n(t.tail);
    if (a === c && l === m)
      return a + (o === u ? o : o + r + u) + l;
  }
  let i = e(t.whole), s = n(t.whole);
  return i === s ? i : i + r + s;
}
var rp = ce({
  name: "@fullcalendar/luxon2",
  cmdFormatter: np,
  namedTimeZonedImpl: tp
});
function Vo() {
  return {
    de: "de",
    en: "en",
    fr: "fr",
    es: "es",
    cs: "cs",
    cn: "zh"
  }[(navigator.language || navigator.userLanguage).split("-")[0]] || "de";
}
typeof window.tg > "u" && (window.tg = function(t) {
  var e, n;
  return (n = (e = document.getElementById(`ed_wp_${t}`)) == null ? void 0 : e.innerText) == null ? void 0 : n.trim();
});
window.array_key_exists = function(e, n) {
  return n.hasOwnProperty(e);
};
window.getLogError = function(e) {
  console.error(`Translation key missing: ${e}`);
};
function ip(t) {
  return {
    normal: {
      iconName: "ok-circle text-primary",
      offerStatusText: tg("N7520"),
      secondButtonText: tg("N4929"),
      secondButtonStatus: "success"
    },
    guaranteed: {
      iconName: "ok-sign text-success",
      offerStatusText: tg("N3832"),
      secondButtonText: tg("N4929"),
      secondButtonStatus: "success"
    },
    alreadystarted: {
      iconName: "exclamation-sign text-warning",
      offerStatusText: tg("N850"),
      secondButtonText: tg("N4929"),
      secondButtonStatus: "success"
    },
    waitinglist: {
      iconName: "hourglass text-info",
      offerStatusText: tg("N13104"),
      secondButtonText: tg("N63385"),
      secondButtonStatus: "warning"
    },
    full: {
      iconName: "ban-circle text-danger",
      offerStatusText: tg("N72446")
    }
  }[t];
}
const lr = {
  offers: {}
}, Me = [
  {
    keyEdoobox: "month",
    keyFullCalendar: "dayGridMonth"
  },
  {
    keyEdoobox: "agendaWeek",
    keyFullCalendar: "timeGridWeek"
  },
  {
    keyEdoobox: "agendaDay",
    keyFullCalendar: "timeGridDay"
  },
  {
    keyEdoobox: "listMonth",
    keyFullCalendar: "listWeek"
  }
], cr = {
  v1: Me[0].keyFullCalendar,
  v2: Me[1].keyFullCalendar,
  v3: Me[2].keyFullCalendar,
  v4: Me[3].keyFullCalendar
};
function sp(t) {
  var e = document.getElementById("calendar"), n = new Mm(e, {
    allDaySlot: !1,
    aspectRatio: 1.75,
    expandRows: !0,
    plugins: [
      Xm,
      Lg,
      Xg,
      rp
    ],
    buttonText: {
      today: tg("N88771"),
      month: tg("N33644"),
      week: tg("N17274"),
      day: tg("N6351"),
      list: tg("N91117")
    },
    dayMaxEventRows: 4,
    headerToolbar: {
      start: "prev,next today",
      center: "title",
      end: dp().map((r) => r.keyFullCalendar).join(",")
    },
    editable: !1,
    eventTimeFormat: "HH:mm",
    firstDay: 1,
    initialDate: op(),
    initialView: ap(),
    locale: Vo(),
    moreLinkText: tg("N39246"),
    navLinks: !0,
    scrollTime: t("#calendar").data("scrolltime"),
    slotDuration: t("#calendar").data("slottime"),
    minTime: t("#calendar").data("mintime"),
    maxTime: t("#calendar").data("maxtime"),
    slotLabelFormat: {
      hour: "2-digit",
      hour12: !1,
      minute: "2-digit"
    },
    themeSystem: "bootstrap3",
    weekends: !!+e.dataset.weekend,
    allDayDidMount: zn,
    dayCellDidMount: zn,
    events: up,
    eventDidMount: function(r) {
      var i = r.el, s = r.event.extendedProps.offerid, a = lr.offers[s], {
        iconName: o,
        offerStatusText: l,
        secondButtonStatus: c,
        secondButtonText: u
      } = ip(a.booking_status), m = t('<span class="offer_status glyphicon glyphicon-' + o + '" style="margin-right: 4px"></span>');
      t(i).find(".fc-daygrid-event-dot").replaceWith(m), t(i).addClass("edevents_" + s), t(i).addClass("edevents"), i.title = r.event.title, t(".edevents").popover({
        placement: "top",
        trigger: "click",
        container: ".edoobox-plugin",
        content: function() {
          var h = '<div style="max-width: 300px"><span class="close">&times;</span>';
          return a.image && (h += "<div>", h += '<div><img src="' + a.image + '" class="img-rounded img-responsive"></div>', h += "</div>"), h += "<div>", h += '<dl class="dl-horizontal ed-cal-dl">', a.shortdescription.length > 4 && (h += '<dt><span class="glyphicon glyphicon-info-sign"></span></dt><dd>' + a.shortdescription + "</dd>"), h += '<dt><span class="glyphicon glyphicon-calendar"></span></dt>', D.fromISO(a.start_date).toFormat("LLLL d, yyyy") == D.fromISO(a.end_date).toFormat("LLLL d, yyyy") ? h += "<dd>" + D.fromISO(a.start_date).toFormat("LLLL d, yyyy t") + " – " + D.fromISO(a.end_date).toFormat("HH:mm") + "</dd>" : h += "<dd>" + D.fromISO(a.start_date).toFormat("LLLL d, yyyy t") + " – " + D.fromISO(a.end_date).toFormat("LLLL d, yyyy t") + "</dd>", h += '<dt><span class="offer_status glyphicon glyphicon-' + o + '"></span></dt><dd>' + l + "</dd></dl>", h += '<div class="ed-cal-btns-grp"><a class="ed-cal-btn btn btn-info" href="' + a.offer_details_url + '">' + tg("N3238") + "</a>", u && (h += '<a class="ed-cal-btn btn btn-' + c + '" href="' + a.booking_start_url + '">' + u + "</a></div>"), h += "</div></div>", h;
        },
        html: !0
      }), t(".edevents").on("click", function() {
        t(".edevents").not(this).popover("hide");
      }), t(".edevents").on("shown.bs.popover", function(h) {
        t(".close").on("click", function(d) {
          t(".edoobox-plugin .popover").remove();
        });
      });
    },
    viewDidMount: zn
  });
  n.render();
}
function Wo(t) {
  return t instanceof Date && !isNaN(t.getTime());
}
function ap() {
  return cr[ha("edview")] || fp() || Me[0].keyFullCalendar;
}
function op() {
  const e = cp() || new Date(ha("edstart") || Date.now());
  return Wo(e) ? e : new Date();
}
function lp(t) {
  return Object.keys(cr).find((e) => cr[e] === t);
}
function cp() {
  var r, i, s;
  const t = (i = (r = vn("#calendar")) == null ? void 0 : r.dataset) == null ? void 0 : i.events, e = (s = new URLSearchParams(t).get("edstart")) == null ? void 0 : s.split("?")[0], n = new Date(e);
  return Wo(n) ? new Date(n) : void 0;
}
function up(t) {
  const e = (s) => {
    const a = s.getFullYear(), o = String(s.getMonth() + 1).padStart(2, "0"), l = String(s.getDate()).padStart(2, "0");
    return `${a}-${o}-${l}`;
  }, n = e(new Date(t.start)), r = e(new Date(t.end)), i = new URLSearchParams();
  return i.append("start", n), i.append("end", r), fetch(vn().dataset.events, {
    method: "POST",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    body: i.toString()
  }).then((s) => s.json()).then((s) => {
    var a;
    return lr.offers = { ...lr.offers || {}, ...s.offers || {} }, (a = Object.values(s.rsl)) == null ? void 0 : a.map((o) => ({
      id: o.id,
      classNames: [o.id],
      title: s.offers[o.offerid].name,
      start: o.start,
      end: o.end,
      borderColor: o.color,
      allDay: !1,
      offerid: o.offerid
    }));
  });
}
function zn(t) {
  const e = D.fromJSDate(t.view.currentStart).toFormat("yyyy-LL-dd"), n = lp(t.view.type);
  hi("edstart", e), hi("edview", n), document.querySelectorAll(".popover").forEach((r) => r.remove());
}
function vn(t = "#calendar") {
  return document.querySelector(t);
}
function dp() {
  var e, n;
  const t = (n = (e = vn()) == null ? void 0 : e.dataset) == null ? void 0 : n.views;
  return Me.filter((r) => t.includes(r.keyEdoobox));
}
function fp() {
  var e, n, r;
  const t = ((n = (e = vn()) == null ? void 0 : e.dataset) == null ? void 0 : n.defaultview) || "";
  return ((r = Me.find((i) => i.keyEdoobox === t)) == null ? void 0 : r.keyFullCalendar) || "";
}
function hp(t) {
  let e = {
    filters: {
      price: {
        fields: {
          i: "price_min",
          x: "price_max"
        }
      },
      date: {
        fields: {
          i: "date_min",
          x: "date_max"
        }
      },
      leader: {
        select: "leaders",
        field: "l"
      },
      place: {
        select: "places",
        field: "p"
      },
      status: {
        select: "status",
        field: "s"
      },
      search: {
        fields: {
          q: "search"
        }
      },
      tag: {
        select: "tag",
        field: "t"
      },
      category: {
        select: "category",
        field: "c"
      }
    },
    popovers_open: null,
    popovers: [],
    createFilterString: function(n) {
      var r = e.filters[n], i = n + "=";
      if (r.fields)
        for (var s in r.fields) {
          var a = t(".popover-content .f-" + r.fields[s]).val();
          i += s + ":" + encodeURIComponent(a) + ",";
        }
      else if (r.select) {
        if (n == "tag")
          var o = /* @__PURE__ */ new Set();
        t(".popover-content .f-" + r.select + "-v:checked").each(function() {
          i += t(this).val() + ",", n == "tag" && t(this).data("tags").split("..").forEach((c) => {
            o.add(c);
          });
        }), n == "tag" && (t(".f-form-tag").val([...o].join("..")), console.info(t(".f-form-tag").val()));
      }
      return i.slice(0, -1);
    },
    removeFilterFromString: function(n, r) {
      var i = new RegExp(r + "=[^|]*\\|?");
      return n.replace(i, "");
    },
    addFilterToString: function(n, r) {
      var i = e.createFilterString(r);
      return n = e.removeFilterFromString(n, r), n ? n + "|" + i : i;
    },
    filterExists: function(n, r) {
      var i = new RegExp(r + "=[^|]*");
      return i.test(n);
    },
    getPopoverContent: function(n) {
      var r = t(".ed-filter-templates .f-default").clone(), i = t(".ed-filter-templates .f-" + n).html();
      return r.find(".filter-slot").html(i), r.html();
    },
    initPopover: function(n, r) {
      e.popovers.includes(r) || (t(n).popover({
        placement: "auto",
        sanitize: !1,
        container: !1,
        template: '<div class="popover ed-filter-popover col-xs-12 col-sm-10 col-md-10" role="tooltip"><div class="arrow"></div><div class="popover-header"><h3 class="popover-title"></h3></div><div class="popover-content"></div></div>',
        content: function() {
          return e.getPopoverContent(r);
        },
        title: t(n).find(".filter-name").text() + '<span class="close">&times;</span>',
        html: !0
      }), e.popovers.push(r));
    }
  };
  window.widget_func = {
    ufilterData: e
  }, t(".ed-filter").click(function() {
    var n = t(this), r = n.data("filter");
    if (e.initPopover(n, r), e.popovers_open != null && (t(e.popovers_open).popover("hide"), e.popovers_open == n)) {
      e.popovers_open = null;
      return;
    }
    e.popovers_open = n, t(n).popover("show");
  }), t(document).on("click", ".popover-header .close", function() {
    t(e.popovers_open).popover("hide"), e.popovers_open = null;
  }), t(document).on("click", "a.f-success", function() {
    var n = e.popovers_open.data("filter");
    if (n == "search")
      t(".f-form-q").val(t(".popover-content .f-search-v").val());
    else if (t(".f-form-field").val(e.addFilterToString(
      t(".f-form-field").val(),
      n
    )), n == "category") {
      let r = t(".f-category-v-baseurl").data("baseurl") + "/" + t('input[type="radio"].f-category-v:checked').data("url");
      console.info(r), t("#ed_filter_form").attr("action", r);
    }
    t("#ed_filter_form").submit();
  }), t(document).on("click", "a.f-destroy", function() {
    var n = e.popovers_open.data("filter");
    n == "search" ? (t(".f-form-q").val(""), t("#ed_filter_form").submit()) : n == "category" || (e.filterExists(t(".f-form-field").val(), n) === !1 ? (t(e.popovers_open).popover("hide"), e.popovers_open = null) : (t(".f-form-field").val(
      e.removeFilterFromString(
        t(".f-form-field").val(),
        n
      )
    ), n == "tag" && t(".f-form-tag").val(""), t("#ed_filter_form").submit()));
  });
}
function jo(t) {
  var r;
  const e = document.querySelector(".utable1");
  ((r = e == null ? void 0 : e.dataset) == null ? void 0 : r.responsive) === "1" && gp(t);
}
function mp(t) {
  document.querySelectorAll(".utable1 tbody tr.angebot_row:not(.btn)").forEach((n) => n.addEventListener("click", function() {
    const r = document.querySelectorAll(".utable1 tbody tr.wgd_tableview_beschr"), i = document.querySelectorAll(".utable1 tbody tr.angebot_row, .utable1 tbody tr.wgd_tableview_beschr");
    r.forEach((s) => s.style.display = "none"), i.forEach((s) => s.classList.remove("selected")), n.classList.remove("selected"), n.classList.add("selected"), this.nextElementSibling.classList.remove("selected"), this.nextElementSibling.style.display = "table-row";
  })), jo(t);
}
function gp(t) {
  t(".utable1").stacktable({ headIndex: t(".utable1").data("nameindex") }), t(".utable1.small-only .wgd_tableview_beschr").hide();
}
function pp(t, e) {
  if (!vp())
    return;
  document.querySelectorAll(`${t} a[href*=".edoobox.com/"]`).forEach((r) => {
    r.dataset.edooboxListener !== "true" && (r.dataset.edooboxListener = "true", r.addEventListener("click", function(i) {
      i.preventDefault(), e(r.closest(".edoobox-plugin"), r.getAttribute("href"));
    }));
  });
}
function vp(t) {
  var n;
  const e = document.querySelector(".edoobox-plugin");
  return ((n = e == null ? void 0 : e.dataset) == null ? void 0 : n.noframe) === "0";
}
function Go(t) {
  !t || (Un(t), setTimeout(() => Un(t), 50), setTimeout(() => Un(t), 150));
}
function Un(t) {
  try {
    window.parent.postMessage(["setheight", document.body.clientHeight, t], "*");
  } catch {
  }
}
function yp(t, e) {
  var n;
  t(".alektionen").first().data("responsive") == "1" && (t(".alektionen").stacktable(), Go((n = e == null ? void 0 : e.data) == null ? void 0 : n.id));
}
function bp(t) {
  let e = 0;
  t(".sameheight").each(function() {
    var n = t(this).innerHeight();
    n > e && (e = n);
  }), t(".sameheight").find(".thumbnail").css("min-height", e + "px");
}
function gs(t, e) {
  return {
    alektionen: () => yp(t, e),
    facebook: Qo,
    googlemap: Yo,
    googlemapinit: () => "",
    sameHeight: () => bp(t),
    social_xing: el,
    social_googleplus: tl,
    ucalendar: () => sp(t),
    ufilter: () => hp(t),
    utable: () => jo(t),
    utableclick: () => mp(t)
  };
}
U.defaultLocale = Vo();
if (typeof ur > "u")
  var ur = !1;
jQuery(function(e) {
  const n = {
    data: {
      id: "",
      autoh3: 0,
      interval1: 0,
      t2: 0
    },
    set: function(r, i) {
      n.data.id = "ediframe" + Math.round(new Date().getTime());
      var s = '<iframe id="' + n.data.id + '" src="' + i + '" seamless="seamless" style="width:100%; height:300px; border:0 none;" frameborder="0" hspace="0" vspace="0" marginheight="0" marginwidth="0" allowtransparency="true"></iframe>';
      e(s).insertBefore(r), e(r).hide(), window.location.hash = "#edinframe", "onhashchange" in window && (window.onhashchange = function(o) {
        if (window.location.hash != "#edinframe") {
          e("#" + n.data.id).remove(), e(r).show();
          try {
            window.addEventListener ? window.removeEventListener("message", n.iFrameListener, !1) : window.detachEvent("onmessage", n.iFrameListener);
          } catch {
          }
        }
      });
      try {
        window.addEventListener ? window.addEventListener("message", n.iFrameListener, !1) : window.attachEvent("onmessage", n.iFrameListener);
      } catch {
      }
      var a = document.getElementById(n.data.id);
      a.onload = function() {
        n.data.interval1 = setInterval(function() {
          n.data.t2 < 20 ? e("#" + n.data.id).length == 1 && typeof a.attributes.seamless < "u" && typeof a.contentWindow != null && (a.contentWindow.postMessage(["getheight", 1, n.data.id], "*"), n.data.t2++) : (n.data.t2 = 0, clearInterval(n.data.interval1), a.style.overflow = "auto");
        }, 100);
      };
    },
    iFrameListener: function(r) {
      var c, u, m, h, d, p, y, v;
      var i = r.data[0], s = r.data[1], a = document.getElementById(n.data.id);
      if (a != null)
        switch (i) {
          case "gtmedoobox":
            window.dataLayer = window.dataLayer || [], dataLayer.push({ ecommerce: null }), dataLayer.push(s);
            return;
          case "setheight":
            (n.data.autoh3 == 0 || s > n.data.autoh3 + 30 || s < n.data.autoh3 - 100) && (a.style.height = s + 50 + "px", n.data.autoh3 = s);
            break;
        }
      var o = (h = (m = (u = (c = r.currentTarget) == null ? void 0 : c.frames) == null ? void 0 : u.iframe) == null ? void 0 : m.data) == null ? void 0 : h.interval1;
      if (typeof l > "u")
        var l = null;
      l !== o && (function() {
        var T, C, I, P;
        var E = (P = (I = (C = (T = r.currentTarget) == null ? void 0 : T.frames) == null ? void 0 : C.iframe) == null ? void 0 : I.data) == null ? void 0 : P.id;
        document.getElementById(E) && function(_) {
          let oe = location.href;
          location.href = "#" + _, history.replaceState(null, null, oe);
        }(E);
      }(), l = (v = (y = (p = (d = r.currentTarget) == null ? void 0 : d.frames) == null ? void 0 : p.iframe) == null ? void 0 : y.data) == null ? void 0 : v.interval1);
    }
  };
  ur || (ur = !0, pp(".edoobox-plugin", n.set), e(".edoobox-plugin .hidden").removeClass("hidden"), e(".edoobox-plugin .edoobox-func").each(function() {
    var s;
    if (Array.isArray(window.placeholderImageURL)) {
      document.querySelectorAll(".thumbnail img[src*='placeholder_200x300.jpg']");
      for (var r of window.placeholderImages || []) {
        if (r.src.includes("plugins/booking-system-edoobox"))
          return;
        r.src = window.placeholderImageURL[0];
      }
    }
    const i = (s = this.dataset) == null ? void 0 : s.func;
    typeof gs(e, n)[i] == "function" && gs(e, n)[i](e(this));
  }), Go(n.data.id), window.initialiseGoogleMaps = $o);
});
//# sourceMappingURL=main.js.map
