UNPKG

@agendize/vue-event-booking-widget

Version:
8,385 lines 261 kB
var Ji = Object.defineProperty;
var qi = (t, e, n) => e in t ? Ji(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
var K = (t, e, n) => (qi(t, typeof e != "symbol" ? e + "" : e, n), n);
import { defineComponent as ge, h as ma, getCurrentInstance as hn, effectScope as Qi, inject as Xi, onMounted as st, onUnmounted as ha, shallowRef as ga, ref as A, computed as Me, onBeforeMount as eo, watch as zt, Fragment as tt, isRef as qe, createVNode as Xe, Text as to, openBlock as j, createElementBlock as re, createElementVNode as x, normalizeStyle as no, createCommentVNode as ee, createTextVNode as Ut, toDisplayString as ce, renderSlot as so, createBlock as ae, unref as k, withCtx as Ne, nextTick as Wn, renderList as fs, withKeys as Pn, createSlots as ro, resolveDynamicComponent as ao, mergeProps as io, toHandlers as oo, normalizeClass as lo } from "vue";
import { messages as co } from "@agendize/az-i18n";
import { Avatar as Ks, FieldInput as Js, Mandatory as ct, FieldEmail as uo, FieldPhone as fo, FieldToggle as xn, FormFields as mo, Panel as ho } from "@agendize/design-system";
import { Bloc as go, useAccountStore as po } from "@agendize/vue-tools";
import { CompanySearch as _o, StaffSearch as Eo, ServiceSearch as yo, ContactSearch as vo } from "@agendize/vue-search";
import { ContactEntity as No, applyValueToField as To, EventEntity as Io, EventType as bo, ApiErrors as Lt, FormItemEntity as So } from "@agendize/js-calendar-api";
/*!
  * shared v9.5.0
  * (c) 2023 kazuya kawaguchi
  * Released under the MIT License.
  */
const Ye = typeof window < "u";
let Le, bt;
if (process.env.NODE_ENV !== "production") {
  const t = Ye && window.performance;
  t && t.mark && t.measure && t.clearMarks && t.clearMeasures && (Le = (e) => {
    t.mark(e);
  }, bt = (e, n, s) => {
    t.measure(e, n, s), t.clearMarks(n), t.clearMarks(s);
  });
}
const Oo = /\{([0-9a-zA-Z]+)\}/g;
function Ds(t, ...e) {
  return e.length === 1 && q(e[0]) && (e = e[0]), (!e || !e.hasOwnProperty) && (e = {}), t.replace(Oo, (n, s) => e.hasOwnProperty(s) ? e[s] : "");
}
const je = (t, e = !1) => e ? Symbol.for(t) : Symbol(t), ko = (t, e, n) => Lo({ l: t, k: e, s: n }), Lo = (t) => JSON.stringify(t).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), me = (t) => typeof t == "number" && isFinite(t), wo = (t) => _a(t) === "[object Date]", dt = (t) => _a(t) === "[object RegExp]", jn = (t) => H(t) && Object.keys(t).length === 0, pe = Object.assign;
let qs;
const Qe = () => qs || (qs = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
function Qs(t) {
  return t.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
}
const Co = Object.prototype.hasOwnProperty;
function Ms(t, e) {
  return Co.call(t, e);
}
const te = Array.isArray, se = (t) => typeof t == "function", w = (t) => typeof t == "string", Z = (t) => typeof t == "boolean", q = (t) => t !== null && typeof t == "object", pa = Object.prototype.toString, _a = (t) => pa.call(t), H = (t) => {
  if (!q(t))
    return !1;
  const e = Object.getPrototypeOf(t);
  return e === null || e.constructor === Object;
}, Do = (t) => t == null ? "" : te(t) || H(t) && t.toString === pa ? JSON.stringify(t, null, 2) : String(t);
function Mo(t, e = "") {
  return t.reduce((n, s, r) => r === 0 ? n + s : n + e + s, "");
}
const Xs = 2;
function Ao(t, e = 0, n = t.length) {
  const s = t.split(/\r?\n/);
  let r = 0;
  const a = [];
  for (let i = 0; i < s.length; i++)
    if (r += s[i].length + 1, r >= e) {
      for (let o = i - Xs; o <= i + Xs || n > r; o++) {
        if (o < 0 || o >= s.length)
          continue;
        const l = o + 1;
        a.push(`${l}${" ".repeat(3 - String(l).length)}|  ${s[o]}`);
        const c = s[o].length;
        if (o === i) {
          const f = e - (r - c) + 1, d = Math.max(1, n > r ? c - f : n - e);
          a.push("   |  " + " ".repeat(f) + "^".repeat(d));
        } else if (o > i) {
          if (n > r) {
            const f = Math.max(Math.min(n - r, c), 1);
            a.push("   |  " + "^".repeat(f));
          }
          r += c + 1;
        }
      }
      break;
    }
  return a.join(`
`);
}
function As(t) {
  let e = t;
  return () => ++e;
}
function he(t, e) {
  typeof console < "u" && (console.warn("[intlify] " + t), e && console.warn(e.stack));
}
const er = {};
function Fo(t) {
  er[t] || (er[t] = !0, he(t));
}
function Fs() {
  const t = /* @__PURE__ */ new Map();
  return {
    events: t,
    on(n, s) {
      const r = t.get(n);
      r && r.push(s) || t.set(n, [s]);
    },
    off(n, s) {
      const r = t.get(n);
      r && r.splice(r.indexOf(s) >>> 0, 1);
    },
    emit(n, s) {
      (t.get(n) || []).slice().map((r) => r(s)), (t.get("*") || []).slice().map((r) => r(n, s));
    }
  };
}
/*!
  * message-compiler v9.5.0
  * (c) 2023 kazuya kawaguchi
  * Released under the MIT License.
  */
function Po(t, e, n) {
  return { line: t, column: e, offset: n };
}
function ds(t, e, n) {
  const s = { start: t, end: e };
  return n != null && (s.source = n), s;
}
const xo = /\{([0-9a-zA-Z]+)\}/g;
function Ro(t, ...e) {
  return e.length === 1 && Vo(e[0]) && (e = e[0]), (!e || !e.hasOwnProperty) && (e = {}), t.replace(xo, (n, s) => e.hasOwnProperty(s) ? e[s] : "");
}
const Ea = Object.assign, tr = (t) => typeof t == "string", Vo = (t) => t !== null && typeof t == "object";
function ya(t, e = "") {
  return t.reduce((n, s, r) => r === 0 ? n + s : n + e + s, "");
}
const U = {
  EXPECTED_TOKEN: 1,
  INVALID_TOKEN_IN_PLACEHOLDER: 2,
  UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
  UNKNOWN_ESCAPE_SEQUENCE: 4,
  INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
  UNBALANCED_CLOSING_BRACE: 6,
  UNTERMINATED_CLOSING_BRACE: 7,
  EMPTY_PLACEHOLDER: 8,
  NOT_ALLOW_NEST_PLACEHOLDER: 9,
  INVALID_LINKED_FORMAT: 10,
  MUST_HAVE_MESSAGES_IN_PLURAL: 11,
  UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
  UNEXPECTED_EMPTY_LINKED_KEY: 13,
  UNEXPECTED_LEXICAL_ANALYSIS: 14,
  UNHANDLED_CODEGEN_NODE_TYPE: 15,
  UNHANDLED_MINIFIER_NODE_TYPE: 16,
  __EXTEND_POINT__: 17
}, Uo = {
  [U.EXPECTED_TOKEN]: "Expected token: '{0}'",
  [U.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
  [U.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder",
  [U.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}",
  [U.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}",
  [U.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace",
  [U.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace",
  [U.EMPTY_PLACEHOLDER]: "Empty placeholder",
  [U.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder",
  [U.INVALID_LINKED_FORMAT]: "Invalid linked format",
  [U.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages",
  [U.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier",
  [U.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key",
  [U.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'",
  [U.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'",
  [U.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
};
function Gt(t, e, n = {}) {
  const { domain: s, messages: r, args: a } = n, i = Ro((r || Uo)[t] || "", ...a || []), o = new SyntaxError(String(i));
  return o.code = t, e && (o.location = e), o.domain = s, o;
}
function $o(t) {
  throw t;
}
const zo = /<\/?[\w\s="/.':;#-\/]+>/, Wo = (t) => zo.test(t), Je = " ", jo = "\r", ye = `
`, Ho = String.fromCharCode(8232), Go = String.fromCharCode(8233);
function Zo(t) {
  const e = t;
  let n = 0, s = 1, r = 1, a = 0;
  const i = (D) => e[D] === jo && e[D + 1] === ye, o = (D) => e[D] === ye, l = (D) => e[D] === Go, c = (D) => e[D] === Ho, f = (D) => i(D) || o(D) || l(D) || c(D), d = () => n, m = () => s, p = () => r, N = () => a, S = (D) => i(D) || l(D) || c(D) ? ye : e[D], v = () => S(n), g = () => S(n + a);
  function E() {
    return a = 0, f(n) && (s++, r = 0), i(n) && n++, n++, r++, e[n];
  }
  function I() {
    return i(n + a) && a++, a++, e[n + a];
  }
  function _() {
    n = 0, s = 1, r = 1, a = 0;
  }
  function O(D = 0) {
    a = D;
  }
  function T() {
    const D = n + a;
    for (; D !== n; )
      E();
    a = 0;
  }
  return {
    index: d,
    line: m,
    column: p,
    peekOffset: N,
    charAt: S,
    currentChar: v,
    currentPeek: g,
    next: E,
    peek: I,
    reset: _,
    resetPeek: O,
    skipToPeek: T
  };
}
const at = void 0, Bo = ".", nr = "'", Yo = "tokenizer";
function Ko(t, e = {}) {
  const n = e.location !== !1, s = Zo(t), r = () => s.index(), a = () => Po(s.line(), s.column(), s.index()), i = a(), o = r(), l = {
    currentType: 14,
    offset: o,
    startLoc: i,
    endLoc: i,
    lastType: 14,
    lastOffset: o,
    lastStartLoc: i,
    lastEndLoc: i,
    braceNest: 0,
    inLinked: !1,
    text: ""
  }, c = () => l, { onError: f } = e;
  function d(h, u, y, ...M) {
    const W = c();
    if (u.column += y, u.offset += y, f) {
      const Q = n ? ds(W.startLoc, u) : null, Ze = Gt(h, Q, {
        domain: Yo,
        args: M
      });
      f(Ze);
    }
  }
  function m(h, u, y) {
    h.endLoc = a(), h.currentType = u;
    const M = { type: u };
    return n && (M.loc = ds(h.startLoc, h.endLoc)), y != null && (M.value = y), M;
  }
  const p = (h) => m(h, 14);
  function N(h, u) {
    return h.currentChar() === u ? (h.next(), u) : (d(U.EXPECTED_TOKEN, a(), 0, u), "");
  }
  function S(h) {
    let u = "";
    for (; h.currentPeek() === Je || h.currentPeek() === ye; )
      u += h.currentPeek(), h.peek();
    return u;
  }
  function v(h) {
    const u = S(h);
    return h.skipToPeek(), u;
  }
  function g(h) {
    if (h === at)
      return !1;
    const u = h.charCodeAt(0);
    return u >= 97 && u <= 122 || u >= 65 && u <= 90 || u === 95;
  }
  function E(h) {
    if (h === at)
      return !1;
    const u = h.charCodeAt(0);
    return u >= 48 && u <= 57;
  }
  function I(h, u) {
    const { currentType: y } = u;
    if (y !== 2)
      return !1;
    S(h);
    const M = g(h.currentPeek());
    return h.resetPeek(), M;
  }
  function _(h, u) {
    const { currentType: y } = u;
    if (y !== 2)
      return !1;
    S(h);
    const M = h.currentPeek() === "-" ? h.peek() : h.currentPeek(), W = E(M);
    return h.resetPeek(), W;
  }
  function O(h, u) {
    const { currentType: y } = u;
    if (y !== 2)
      return !1;
    S(h);
    const M = h.currentPeek() === nr;
    return h.resetPeek(), M;
  }
  function T(h, u) {
    const { currentType: y } = u;
    if (y !== 8)
      return !1;
    S(h);
    const M = h.currentPeek() === ".";
    return h.resetPeek(), M;
  }
  function D(h, u) {
    const { currentType: y } = u;
    if (y !== 9)
      return !1;
    S(h);
    const M = g(h.currentPeek());
    return h.resetPeek(), M;
  }
  function F(h, u) {
    const { currentType: y } = u;
    if (!(y === 8 || y === 12))
      return !1;
    S(h);
    const M = h.currentPeek() === ":";
    return h.resetPeek(), M;
  }
  function z(h, u) {
    const { currentType: y } = u;
    if (y !== 10)
      return !1;
    const M = () => {
      const Q = h.currentPeek();
      return Q === "{" ? g(h.peek()) : Q === "@" || Q === "%" || Q === "|" || Q === ":" || Q === "." || Q === Je || !Q ? !1 : Q === ye ? (h.peek(), M()) : g(Q);
    }, W = M();
    return h.resetPeek(), W;
  }
  function G(h) {
    S(h);
    const u = h.currentPeek() === "|";
    return h.resetPeek(), u;
  }
  function P(h) {
    const u = S(h), y = h.currentPeek() === "%" && h.peek() === "{";
    return h.resetPeek(), {
      isModulo: y,
      hasSpace: u.length > 0
    };
  }
  function R(h, u = !0) {
    const y = (W = !1, Q = "", Ze = !1) => {
      const Ke = h.currentPeek();
      return Ke === "{" ? Q === "%" ? !1 : W : Ke === "@" || !Ke ? Q === "%" ? !0 : W : Ke === "%" ? (h.peek(), y(W, "%", !0)) : Ke === "|" ? Q === "%" || Ze ? !0 : !(Q === Je || Q === ye) : Ke === Je ? (h.peek(), y(!0, Je, Ze)) : Ke === ye ? (h.peek(), y(!0, ye, Ze)) : !0;
    }, M = y();
    return u && h.resetPeek(), M;
  }
  function V(h, u) {
    const y = h.currentChar();
    return y === at ? at : u(y) ? (h.next(), y) : null;
  }
  function be(h) {
    return V(h, (y) => {
      const M = y.charCodeAt(0);
      return M >= 97 && M <= 122 || M >= 65 && M <= 90 || M >= 48 && M <= 57 || M === 95 || M === 36;
    });
  }
  function Jt(h) {
    return V(h, (y) => {
      const M = y.charCodeAt(0);
      return M >= 48 && M <= 57;
    });
  }
  function Ge(h) {
    return V(h, (y) => {
      const M = y.charCodeAt(0);
      return M >= 48 && M <= 57 || M >= 65 && M <= 70 || M >= 97 && M <= 102;
    });
  }
  function Ct(h) {
    let u = "", y = "";
    for (; u = Jt(h); )
      y += u;
    return y;
  }
  function qt(h) {
    v(h);
    const u = h.currentChar();
    return u !== "%" && d(U.EXPECTED_TOKEN, a(), 0, u), h.next(), "%";
  }
  function Re(h) {
    let u = "";
    for (; ; ) {
      const y = h.currentChar();
      if (y === "{" || y === "}" || y === "@" || y === "|" || !y)
        break;
      if (y === "%")
        if (R(h))
          u += y, h.next();
        else
          break;
      else if (y === Je || y === ye)
        if (R(h))
          u += y, h.next();
        else {
          if (G(h))
            break;
          u += y, h.next();
        }
      else
        u += y, h.next();
    }
    return u;
  }
  function Dt(h) {
    v(h);
    let u = "", y = "";
    for (; u = be(h); )
      y += u;
    return h.currentChar() === at && d(U.UNTERMINATED_CLOSING_BRACE, a(), 0), y;
  }
  function Qt(h) {
    v(h);
    let u = "";
    return h.currentChar() === "-" ? (h.next(), u += `-${Ct(h)}`) : u += Ct(h), h.currentChar() === at && d(U.UNTERMINATED_CLOSING_BRACE, a(), 0), u;
  }
  function Xt(h) {
    v(h), N(h, "'");
    let u = "", y = "";
    const M = (Q) => Q !== nr && Q !== ye;
    for (; u = V(h, M); )
      u === "\\" ? y += en(h) : y += u;
    const W = h.currentChar();
    return W === ye || W === at ? (d(U.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, a(), 0), W === ye && (h.next(), N(h, "'")), y) : (N(h, "'"), y);
  }
  function en(h) {
    const u = h.currentChar();
    switch (u) {
      case "\\":
      case "'":
        return h.next(), `\\${u}`;
      case "u":
        return Mt(h, u, 4);
      case "U":
        return Mt(h, u, 6);
      default:
        return d(U.UNKNOWN_ESCAPE_SEQUENCE, a(), 0, u), "";
    }
  }
  function Mt(h, u, y) {
    N(h, u);
    let M = "";
    for (let W = 0; W < y; W++) {
      const Q = Ge(h);
      if (!Q) {
        d(U.INVALID_UNICODE_ESCAPE_SEQUENCE, a(), 0, `\\${u}${M}${h.currentChar()}`);
        break;
      }
      M += Q;
    }
    return `\\${u}${M}`;
  }
  function Tn(h) {
    v(h);
    let u = "", y = "";
    const M = (W) => W !== "{" && W !== "}" && W !== Je && W !== ye;
    for (; u = V(h, M); )
      y += u;
    return y;
  }
  function tn(h) {
    let u = "", y = "";
    for (; u = be(h); )
      y += u;
    return y;
  }
  function nn(h) {
    const u = (y = !1, M) => {
      const W = h.currentChar();
      return W === "{" || W === "%" || W === "@" || W === "|" || W === "(" || W === ")" || !W || W === Je ? M : W === ye || W === Bo ? (M += W, h.next(), u(y, M)) : (M += W, h.next(), u(!0, M));
    };
    return u(!1, "");
  }
  function gt(h) {
    v(h);
    const u = N(h, "|");
    return v(h), u;
  }
  function pt(h, u) {
    let y = null;
    switch (h.currentChar()) {
      case "{":
        return u.braceNest >= 1 && d(U.NOT_ALLOW_NEST_PLACEHOLDER, a(), 0), h.next(), y = m(u, 2, "{"), v(h), u.braceNest++, y;
      case "}":
        return u.braceNest > 0 && u.currentType === 2 && d(U.EMPTY_PLACEHOLDER, a(), 0), h.next(), y = m(u, 3, "}"), u.braceNest--, u.braceNest > 0 && v(h), u.inLinked && u.braceNest === 0 && (u.inLinked = !1), y;
      case "@":
        return u.braceNest > 0 && d(U.UNTERMINATED_CLOSING_BRACE, a(), 0), y = rt(h, u) || p(u), u.braceNest = 0, y;
      default:
        let W = !0, Q = !0, Ze = !0;
        if (G(h))
          return u.braceNest > 0 && d(U.UNTERMINATED_CLOSING_BRACE, a(), 0), y = m(u, 1, gt(h)), u.braceNest = 0, u.inLinked = !1, y;
        if (u.braceNest > 0 && (u.currentType === 5 || u.currentType === 6 || u.currentType === 7))
          return d(U.UNTERMINATED_CLOSING_BRACE, a(), 0), u.braceNest = 0, _t(h, u);
        if (W = I(h, u))
          return y = m(u, 5, Dt(h)), v(h), y;
        if (Q = _(h, u))
          return y = m(u, 6, Qt(h)), v(h), y;
        if (Ze = O(h, u))
          return y = m(u, 7, Xt(h)), v(h), y;
        if (!W && !Q && !Ze)
          return y = m(u, 13, Tn(h)), d(U.INVALID_TOKEN_IN_PLACEHOLDER, a(), 0, y.value), v(h), y;
        break;
    }
    return y;
  }
  function rt(h, u) {
    const { currentType: y } = u;
    let M = null;
    const W = h.currentChar();
    switch ((y === 8 || y === 9 || y === 12 || y === 10) && (W === ye || W === Je) && d(U.INVALID_LINKED_FORMAT, a(), 0), W) {
      case "@":
        return h.next(), M = m(u, 8, "@"), u.inLinked = !0, M;
      case ".":
        return v(h), h.next(), m(u, 9, ".");
      case ":":
        return v(h), h.next(), m(u, 10, ":");
      default:
        return G(h) ? (M = m(u, 1, gt(h)), u.braceNest = 0, u.inLinked = !1, M) : T(h, u) || F(h, u) ? (v(h), rt(h, u)) : D(h, u) ? (v(h), m(u, 12, tn(h))) : z(h, u) ? (v(h), W === "{" ? pt(h, u) || M : m(u, 11, nn(h))) : (y === 8 && d(U.INVALID_LINKED_FORMAT, a(), 0), u.braceNest = 0, u.inLinked = !1, _t(h, u));
    }
  }
  function _t(h, u) {
    let y = { type: 14 };
    if (u.braceNest > 0)
      return pt(h, u) || p(u);
    if (u.inLinked)
      return rt(h, u) || p(u);
    switch (h.currentChar()) {
      case "{":
        return pt(h, u) || p(u);
      case "}":
        return d(U.UNBALANCED_CLOSING_BRACE, a(), 0), h.next(), m(u, 3, "}");
      case "@":
        return rt(h, u) || p(u);
      default:
        if (G(h))
          return y = m(u, 1, gt(h)), u.braceNest = 0, u.inLinked = !1, y;
        const { isModulo: W, hasSpace: Q } = P(h);
        if (W)
          return Q ? m(u, 0, Re(h)) : m(u, 4, qt(h));
        if (R(h))
          return m(u, 0, Re(h));
        break;
    }
    return y;
  }
  function sn() {
    const { currentType: h, offset: u, startLoc: y, endLoc: M } = l;
    return l.lastType = h, l.lastOffset = u, l.lastStartLoc = y, l.lastEndLoc = M, l.offset = r(), l.startLoc = a(), s.currentChar() === at ? m(l, 14) : _t(s, l);
  }
  return {
    nextToken: sn,
    currentOffset: r,
    currentPosition: a,
    context: c
  };
}
const Jo = "parser", qo = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
function Qo(t, e, n) {
  switch (t) {
    case "\\\\":
      return "\\";
    case "\\'":
      return "'";
    default: {
      const s = parseInt(e || n, 16);
      return s <= 55295 || s >= 57344 ? String.fromCodePoint(s) : "\uFFFD";
    }
  }
}
function Xo(t = {}) {
  const e = t.location !== !1, { onError: n } = t;
  function s(g, E, I, _, ...O) {
    const T = g.currentPosition();
    if (T.offset += _, T.column += _, n) {
      const D = e ? ds(I, T) : null, F = Gt(E, D, {
        domain: Jo,
        args: O
      });
      n(F);
    }
  }
  function r(g, E, I) {
    const _ = { type: g };
    return e && (_.start = E, _.end = E, _.loc = { start: I, end: I }), _;
  }
  function a(g, E, I, _) {
    _ && (g.type = _), e && (g.end = E, g.loc && (g.loc.end = I));
  }
  function i(g, E) {
    const I = g.context(), _ = r(3, I.offset, I.startLoc);
    return _.value = E, a(_, g.currentOffset(), g.currentPosition()), _;
  }
  function o(g, E) {
    const I = g.context(), { lastOffset: _, lastStartLoc: O } = I, T = r(5, _, O);
    return T.index = parseInt(E, 10), g.nextToken(), a(T, g.currentOffset(), g.currentPosition()), T;
  }
  function l(g, E) {
    const I = g.context(), { lastOffset: _, lastStartLoc: O } = I, T = r(4, _, O);
    return T.key = E, g.nextToken(), a(T, g.currentOffset(), g.currentPosition()), T;
  }
  function c(g, E) {
    const I = g.context(), { lastOffset: _, lastStartLoc: O } = I, T = r(9, _, O);
    return T.value = E.replace(qo, Qo), g.nextToken(), a(T, g.currentOffset(), g.currentPosition()), T;
  }
  function f(g) {
    const E = g.nextToken(), I = g.context(), { lastOffset: _, lastStartLoc: O } = I, T = r(8, _, O);
    return E.type !== 12 ? (s(g, U.UNEXPECTED_EMPTY_LINKED_MODIFIER, I.lastStartLoc, 0), T.value = "", a(T, _, O), {
      nextConsumeToken: E,
      node: T
    }) : (E.value == null && s(g, U.UNEXPECTED_LEXICAL_ANALYSIS, I.lastStartLoc, 0, Be(E)), T.value = E.value || "", a(T, g.currentOffset(), g.currentPosition()), {
      node: T
    });
  }
  function d(g, E) {
    const I = g.context(), _ = r(7, I.offset, I.startLoc);
    return _.value = E, a(_, g.currentOffset(), g.currentPosition()), _;
  }
  function m(g) {
    const E = g.context(), I = r(6, E.offset, E.startLoc);
    let _ = g.nextToken();
    if (_.type === 9) {
      const O = f(g);
      I.modifier = O.node, _ = O.nextConsumeToken || g.nextToken();
    }
    switch (_.type !== 10 && s(g, U.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, Be(_)), _ = g.nextToken(), _.type === 2 && (_ = g.nextToken()), _.type) {
      case 11:
        _.value == null && s(g, U.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, Be(_)), I.key = d(g, _.value || "");
        break;
      case 5:
        _.value == null && s(g, U.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, Be(_)), I.key = l(g, _.value || "");
        break;
      case 6:
        _.value == null && s(g, U.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, Be(_)), I.key = o(g, _.value || "");
        break;
      case 7:
        _.value == null && s(g, U.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, Be(_)), I.key = c(g, _.value || "");
        break;
      default:
        s(g, U.UNEXPECTED_EMPTY_LINKED_KEY, E.lastStartLoc, 0);
        const O = g.context(), T = r(7, O.offset, O.startLoc);
        return T.value = "", a(T, O.offset, O.startLoc), I.key = T, a(I, O.offset, O.startLoc), {
          nextConsumeToken: _,
          node: I
        };
    }
    return a(I, g.currentOffset(), g.currentPosition()), {
      node: I
    };
  }
  function p(g) {
    const E = g.context(), I = E.currentType === 1 ? g.currentOffset() : E.offset, _ = E.currentType === 1 ? E.endLoc : E.startLoc, O = r(2, I, _);
    O.items = [];
    let T = null;
    do {
      const z = T || g.nextToken();
      switch (T = null, z.type) {
        case 0:
          z.value == null && s(g, U.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, Be(z)), O.items.push(i(g, z.value || ""));
          break;
        case 6:
          z.value == null && s(g, U.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, Be(z)), O.items.push(o(g, z.value || ""));
          break;
        case 5:
          z.value == null && s(g, U.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, Be(z)), O.items.push(l(g, z.value || ""));
          break;
        case 7:
          z.value == null && s(g, U.UNEXPECTED_LEXICAL_ANALYSIS, E.lastStartLoc, 0, Be(z)), O.items.push(c(g, z.value || ""));
          break;
        case 8:
          const G = m(g);
          O.items.push(G.node), T = G.nextConsumeToken || null;
          break;
      }
    } while (E.currentType !== 14 && E.currentType !== 1);
    const D = E.currentType === 1 ? E.lastOffset : g.currentOffset(), F = E.currentType === 1 ? E.lastEndLoc : g.currentPosition();
    return a(O, D, F), O;
  }
  function N(g, E, I, _) {
    const O = g.context();
    let T = _.items.length === 0;
    const D = r(1, E, I);
    D.cases = [], D.cases.push(_);
    do {
      const F = p(g);
      T || (T = F.items.length === 0), D.cases.push(F);
    } while (O.currentType !== 14);
    return T && s(g, U.MUST_HAVE_MESSAGES_IN_PLURAL, I, 0), a(D, g.currentOffset(), g.currentPosition()), D;
  }
  function S(g) {
    const E = g.context(), { offset: I, startLoc: _ } = E, O = p(g);
    return E.currentType === 14 ? O : N(g, I, _, O);
  }
  function v(g) {
    const E = Ko(g, Ea({}, t)), I = E.context(), _ = r(0, I.offset, I.startLoc);
    return e && _.loc && (_.loc.source = g), _.body = S(E), t.onCacheKey && (_.cacheKey = t.onCacheKey(g)), I.currentType !== 14 && s(E, U.UNEXPECTED_LEXICAL_ANALYSIS, I.lastStartLoc, 0, g[I.offset] || ""), a(_, E.currentOffset(), E.currentPosition()), _;
  }
  return { parse: v };
}
function Be(t) {
  if (t.type === 14)
    return "EOF";
  const e = (t.value || "").replace(/\r?\n/gu, "\\n");
  return e.length > 10 ? e.slice(0, 9) + "\u2026" : e;
}
function el(t, e = {}) {
  const n = {
    ast: t,
    helpers: /* @__PURE__ */ new Set()
  };
  return { context: () => n, helper: (a) => (n.helpers.add(a), a) };
}
function sr(t, e) {
  for (let n = 0; n < t.length; n++)
    Ps(t[n], e);
}
function Ps(t, e) {
  switch (t.type) {
    case 1:
      sr(t.cases, e), e.helper("plural");
      break;
    case 2:
      sr(t.items, e);
      break;
    case 6:
      Ps(t.key, e), e.helper("linked"), e.helper("type");
      break;
    case 5:
      e.helper("interpolate"), e.helper("list");
      break;
    case 4:
      e.helper("interpolate"), e.helper("named");
      break;
  }
}
function tl(t, e = {}) {
  const n = el(t);
  n.helper("normalize"), t.body && Ps(t.body, n);
  const s = n.context();
  t.helpers = Array.from(s.helpers);
}
function nl(t) {
  const e = t.body;
  return e.type === 2 ? rr(e) : e.cases.forEach((n) => rr(n)), t;
}
function rr(t) {
  if (t.items.length === 1) {
    const e = t.items[0];
    (e.type === 3 || e.type === 9) && (t.static = e.value, delete e.value);
  } else {
    const e = [];
    for (let n = 0; n < t.items.length; n++) {
      const s = t.items[n];
      if (!(s.type === 3 || s.type === 9) || s.value == null)
        break;
      e.push(s.value);
    }
    if (e.length === t.items.length) {
      t.static = ya(e);
      for (let n = 0; n < t.items.length; n++) {
        const s = t.items[n];
        (s.type === 3 || s.type === 9) && delete s.value;
      }
    }
  }
}
const sl = "minifier";
function xt(t) {
  switch (t.t = t.type, t.type) {
    case 0:
      const e = t;
      xt(e.body), e.b = e.body, delete e.body;
      break;
    case 1:
      const n = t, s = n.cases;
      for (let f = 0; f < s.length; f++)
        xt(s[f]);
      n.c = s, delete n.cases;
      break;
    case 2:
      const r = t, a = r.items;
      for (let f = 0; f < a.length; f++)
        xt(a[f]);
      r.i = a, delete r.items, r.static && (r.s = r.static, delete r.static);
      break;
    case 3:
    case 9:
    case 8:
    case 7:
      const i = t;
      i.value && (i.v = i.value, delete i.value);
      break;
    case 6:
      const o = t;
      xt(o.key), o.k = o.key, delete o.key, o.modifier && (xt(o.modifier), o.m = o.modifier, delete o.modifier);
      break;
    case 5:
      const l = t;
      l.i = l.index, delete l.index;
      break;
    case 4:
      const c = t;
      c.k = c.key, delete c.key;
      break;
    default:
      throw Gt(U.UNHANDLED_MINIFIER_NODE_TYPE, null, {
        domain: sl,
        args: [t.type]
      });
  }
  delete t.type;
}
const rl = "parser";
function al(t, e) {
  const { sourceMap: n, filename: s, breakLineCode: r, needIndent: a } = e, i = e.location !== !1, o = {
    filename: s,
    code: "",
    column: 1,
    line: 1,
    offset: 0,
    map: void 0,
    breakLineCode: r,
    needIndent: a,
    indentLevel: 0
  };
  i && t.loc && (o.source = t.loc.source);
  const l = () => o;
  function c(v, g) {
    o.code += v;
  }
  function f(v, g = !0) {
    const E = g ? r : "";
    c(a ? E + "  ".repeat(v) : E);
  }
  function d(v = !0) {
    const g = ++o.indentLevel;
    v && f(g);
  }
  function m(v = !0) {
    const g = --o.indentLevel;
    v && f(g);
  }
  function p() {
    f(o.indentLevel);
  }
  return {
    context: l,
    push: c,
    indent: d,
    deindent: m,
    newline: p,
    helper: (v) => `_${v}`,
    needIndent: () => o.needIndent
  };
}
function il(t, e) {
  const { helper: n } = t;
  t.push(`${n("linked")}(`), Wt(t, e.key), e.modifier ? (t.push(", "), Wt(t, e.modifier), t.push(", _type")) : t.push(", undefined, _type"), t.push(")");
}
function ol(t, e) {
  const { helper: n, needIndent: s } = t;
  t.push(`${n("normalize")}([`), t.indent(s());
  const r = e.items.length;
  for (let a = 0; a < r && (Wt(t, e.items[a]), a !== r - 1); a++)
    t.push(", ");
  t.deindent(s()), t.push("])");
}
function ll(t, e) {
  const { helper: n, needIndent: s } = t;
  if (e.cases.length > 1) {
    t.push(`${n("plural")}([`), t.indent(s());
    const r = e.cases.length;
    for (let a = 0; a < r && (Wt(t, e.cases[a]), a !== r - 1); a++)
      t.push(", ");
    t.deindent(s()), t.push("])");
  }
}
function cl(t, e) {
  e.body ? Wt(t, e.body) : t.push("null");
}
function Wt(t, e) {
  const { helper: n } = t;
  switch (e.type) {
    case 0:
      cl(t, e);
      break;
    case 1:
      ll(t, e);
      break;
    case 2:
      ol(t, e);
      break;
    case 6:
      il(t, e);
      break;
    case 8:
      t.push(JSON.stringify(e.value), e);
      break;
    case 7:
      t.push(JSON.stringify(e.value), e);
      break;
    case 5:
      t.push(`${n("interpolate")}(${n("list")}(${e.index}))`, e);
      break;
    case 4:
      t.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(e.key)}))`, e);
      break;
    case 9:
      t.push(JSON.stringify(e.value), e);
      break;
    case 3:
      t.push(JSON.stringify(e.value), e);
      break;
    default:
      throw Gt(U.UNHANDLED_CODEGEN_NODE_TYPE, null, {
        domain: rl,
        args: [e.type]
      });
  }
}
const ul = (t, e = {}) => {
  const n = tr(e.mode) ? e.mode : "normal", s = tr(e.filename) ? e.filename : "message.intl", r = !!e.sourceMap, a = e.breakLineCode != null ? e.breakLineCode : n === "arrow" ? ";" : `
`, i = e.needIndent ? e.needIndent : n !== "arrow", o = t.helpers || [], l = al(t, {
    mode: n,
    filename: s,
    sourceMap: r,
    breakLineCode: a,
    needIndent: i
  });
  l.push(n === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), l.indent(i), o.length > 0 && (l.push(`const { ${ya(o.map((d) => `${d}: _${d}`), ", ")} } = ctx`), l.newline()), l.push("return "), Wt(l, t), l.deindent(i), l.push("}"), delete t.helpers;
  const { code: c, map: f } = l.context();
  return {
    ast: t,
    code: c,
    map: f ? f.toJSON() : void 0
  };
};
function fl(t, e = {}) {
  const n = Ea({}, e), s = !!n.jit, r = !!n.minify, a = n.optimize == null ? !0 : n.optimize, o = Xo(n).parse(t);
  return s ? (a && nl(o), r && xt(o), { ast: o, code: "" }) : (tl(o, n), ul(o, n));
}
/*!
  * core-base v9.5.0
  * (c) 2023 kazuya kawaguchi
  * Released under the MIT License.
  */
function dl() {
  typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Qe().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_JIT_COMPILATION__ != "boolean" && (Qe().__INTLIFY_JIT_COMPILATION__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Qe().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1);
}
const mt = [];
mt[0] = {
  w: [0],
  i: [3, 0],
  ["["]: [4],
  o: [7]
};
mt[1] = {
  w: [1],
  ["."]: [2],
  ["["]: [4],
  o: [7]
};
mt[2] = {
  w: [2],
  i: [3, 0],
  [0]: [3, 0]
};
mt[3] = {
  i: [3, 0],
  [0]: [3, 0],
  w: [1, 1],
  ["."]: [2, 1],
  ["["]: [4, 1],
  o: [7, 1]
};
mt[4] = {
  ["'"]: [5, 0],
  ['"']: [6, 0],
  ["["]: [
    4,
    2
  ],
  ["]"]: [1, 3],
  o: 8,
  l: [4, 0]
};
mt[5] = {
  ["'"]: [4, 0],
  o: 8,
  l: [5, 0]
};
mt[6] = {
  ['"']: [4, 0],
  o: 8,
  l: [6, 0]
};
const ml = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
function hl(t) {
  return ml.test(t);
}
function gl(t) {
  const e = t.charCodeAt(0), n = t.charCodeAt(t.length - 1);
  return e === n && (e === 34 || e === 39) ? t.slice(1, -1) : t;
}
function pl(t) {
  if (t == null)
    return "o";
  switch (t.charCodeAt(0)) {
    case 91:
    case 93:
    case 46:
    case 34:
    case 39:
      return t;
    case 95:
    case 36:
    case 45:
      return "i";
    case 9:
    case 10:
    case 13:
    case 160:
    case 65279:
    case 8232:
    case 8233:
      return "w";
  }
  return "i";
}
function _l(t) {
  const e = t.trim();
  return t.charAt(0) === "0" && isNaN(parseInt(t)) ? !1 : hl(e) ? gl(e) : "*" + e;
}
function El(t) {
  const e = [];
  let n = -1, s = 0, r = 0, a, i, o, l, c, f, d;
  const m = [];
  m[0] = () => {
    i === void 0 ? i = o : i += o;
  }, m[1] = () => {
    i !== void 0 && (e.push(i), i = void 0);
  }, m[2] = () => {
    m[0](), r++;
  }, m[3] = () => {
    if (r > 0)
      r--, s = 4, m[0]();
    else {
      if (r = 0, i === void 0 || (i = _l(i), i === !1))
        return !1;
      m[1]();
    }
  };
  function p() {
    const N = t[n + 1];
    if (s === 5 && N === "'" || s === 6 && N === '"')
      return n++, o = "\\" + N, m[0](), !0;
  }
  for (; s !== null; )
    if (n++, a = t[n], !(a === "\\" && p())) {
      if (l = pl(a), d = mt[s], c = d[l] || d.l || 8, c === 8 || (s = c[0], c[1] !== void 0 && (f = m[c[1]], f && (o = a, f() === !1))))
        return;
      if (s === 7)
        return e;
    }
}
const ar = /* @__PURE__ */ new Map();
function yl(t, e) {
  return q(t) ? t[e] : null;
}
function vl(t, e) {
  if (!q(t))
    return null;
  let n = ar.get(e);
  if (n || (n = El(e), n && ar.set(e, n)), !n)
    return null;
  const s = n.length;
  let r = t, a = 0;
  for (; a < s; ) {
    const i = r[n[a]];
    if (i === void 0)
      return null;
    r = i, a++;
  }
  return r;
}
const Nl = (t) => t, Tl = (t) => "", Il = "text", bl = (t) => t.length === 0 ? "" : Mo(t), Sl = Do;
function ir(t, e) {
  return t = Math.abs(t), e === 2 ? t ? t > 1 ? 1 : 0 : 1 : t ? Math.min(t, 2) : 0;
}
function Ol(t) {
  const e = me(t.pluralIndex) ? t.pluralIndex : -1;
  return t.named && (me(t.named.count) || me(t.named.n)) ? me(t.named.count) ? t.named.count : me(t.named.n) ? t.named.n : e : e;
}
function kl(t, e) {
  e.count || (e.count = t), e.n || (e.n = t);
}
function Ll(t = {}) {
  const e = t.locale, n = Ol(t), s = q(t.pluralRules) && w(e) && se(t.pluralRules[e]) ? t.pluralRules[e] : ir, r = q(t.pluralRules) && w(e) && se(t.pluralRules[e]) ? ir : void 0, a = (g) => g[s(n, g.length, r)], i = t.list || [], o = (g) => i[g], l = t.named || {};
  me(t.pluralIndex) && kl(n, l);
  const c = (g) => l[g];
  function f(g) {
    const E = se(t.messages) ? t.messages(g) : q(t.messages) ? t.messages[g] : !1;
    return E || (t.parent ? t.parent.message(g) : Tl);
  }
  const d = (g) => t.modifiers ? t.modifiers[g] : Nl, m = H(t.processor) && se(t.processor.normalize) ? t.processor.normalize : bl, p = H(t.processor) && se(t.processor.interpolate) ? t.processor.interpolate : Sl, N = H(t.processor) && w(t.processor.type) ? t.processor.type : Il, v = {
    list: o,
    named: c,
    plural: a,
    linked: (g, ...E) => {
      const [I, _] = E;
      let O = "text", T = "";
      E.length === 1 ? q(I) ? (T = I.modifier || T, O = I.type || O) : w(I) && (T = I || T) : E.length === 2 && (w(I) && (T = I || T), w(_) && (O = _ || O));
      const D = f(g)(v), F = O === "vnode" && te(D) && T ? D[0] : D;
      return T ? d(T)(F, O) : F;
    },
    message: f,
    type: N,
    interpolate: p,
    normalize: m,
    values: pe({}, i, l)
  };
  return v;
}
let gn = null;
function wl(t) {
  gn = t;
}
function Cl(t, e, n) {
  gn && gn.emit("i18n:init", {
    timestamp: Date.now(),
    i18n: t,
    version: e,
    meta: n
  });
}
const Dl = /* @__PURE__ */ Ml("function:translate");
function Ml(t) {
  return (e) => gn && gn.emit(t, e);
}
const ve = {
  NOT_FOUND_KEY: 1,
  FALLBACK_TO_TRANSLATE: 2,
  CANNOT_FORMAT_NUMBER: 3,
  FALLBACK_TO_NUMBER_FORMAT: 4,
  CANNOT_FORMAT_DATE: 5,
  FALLBACK_TO_DATE_FORMAT: 6,
  EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7,
  __EXTEND_POINT__: 8
}, Al = {
  [ve.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
  [ve.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
  [ve.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
  [ve.FALLBACK_TO_NUMBER_FORMAT]: "Fall back to number format '{key}' key with '{target}' locale.",
  [ve.CANNOT_FORMAT_DATE]: "Cannot format a date value due to not supported Intl.DateTimeFormat.",
  [ve.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
  [ve.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: "This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."
};
function St(t, ...e) {
  return Ds(Al[t], ...e);
}
function xs(t, e) {
  return e.locale != null ? or(e.locale) : or(t.locale);
}
let Xn;
function or(t) {
  return w(t) ? t : Xn != null && t.resolvedOnce ? Xn : Xn = t();
}
function Fl(t, e, n) {
  return [.../* @__PURE__ */ new Set([
    n,
    ...te(e) ? e : q(e) ? Object.keys(e) : w(e) ? [e] : [n]
  ])];
}
function va(t, e, n) {
  const s = w(n) ? n : jt, r = t;
  r.__localeChainCache || (r.__localeChainCache = /* @__PURE__ */ new Map());
  let a = r.__localeChainCache.get(s);
  if (!a) {
    a = [];
    let i = [n];
    for (; te(i); )
      i = lr(a, i, e);
    const o = te(e) || !H(e) ? e : e.default ? e.default : null;
    i = w(o) ? [o] : o, te(i) && lr(a, i, !1), r.__localeChainCache.set(s, a);
  }
  return a;
}
function lr(t, e, n) {
  let s = !0;
  for (let r = 0; r < e.length && Z(s); r++) {
    const a = e[r];
    w(a) && (s = Pl(t, e[r], n));
  }
  return s;
}
function Pl(t, e, n) {
  let s;
  const r = e.split("-");
  do {
    const a = r.join("-");
    s = xl(t, a, n), r.splice(-1, 1);
  } while (r.length && s === !0);
  return s;
}
function xl(t, e, n) {
  let s = !1;
  if (!t.includes(e) && (s = !0, e)) {
    s = e[e.length - 1] !== "!";
    const r = e.replace(/!/g, "");
    t.push(r), (te(n) || H(n)) && n[r] && (s = n[r]);
  }
  return s;
}
const Rl = "9.5.0", Hn = -1, jt = "en-US", Rn = "", cr = (t) => `${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;
function Vl() {
  return {
    upper: (t, e) => e === "text" && w(t) ? t.toUpperCase() : e === "vnode" && q(t) && "__v_isVNode" in t ? t.children.toUpperCase() : t,
    lower: (t, e) => e === "text" && w(t) ? t.toLowerCase() : e === "vnode" && q(t) && "__v_isVNode" in t ? t.children.toLowerCase() : t,
    capitalize: (t, e) => e === "text" && w(t) ? cr(t) : e === "vnode" && q(t) && "__v_isVNode" in t ? cr(t.children) : t
  };
}
let Na;
function ur(t) {
  Na = t;
}
let Ta;
function Ul(t) {
  Ta = t;
}
let Ia;
function $l(t) {
  Ia = t;
}
let ba = null;
const fr = (t) => {
  ba = t;
}, zl = () => ba;
let Sa = null;
const dr = (t) => {
  Sa = t;
}, Wl = () => Sa;
let mr = 0;
function jl(t = {}) {
  const e = se(t.onWarn) ? t.onWarn : he, n = w(t.version) ? t.version : Rl, s = w(t.locale) || se(t.locale) ? t.locale : jt, r = se(s) ? jt : s, a = te(t.fallbackLocale) || H(t.fallbackLocale) || w(t.fallbackLocale) || t.fallbackLocale === !1 ? t.fallbackLocale : r, i = H(t.messages) ? t.messages : { [r]: {} }, o = H(t.datetimeFormats) ? t.datetimeFormats : { [r]: {} }, l = H(t.numberFormats) ? t.numberFormats : { [r]: {} }, c = pe({}, t.modifiers || {}, Vl()), f = t.pluralRules || {}, d = se(t.missing) ? t.missing : null, m = Z(t.missingWarn) || dt(t.missingWarn) ? t.missingWarn : !0, p = Z(t.fallbackWarn) || dt(t.fallbackWarn) ? t.fallbackWarn : !0, N = !!t.fallbackFormat, S = !!t.unresolving, v = se(t.postTranslation) ? t.postTranslation : null, g = H(t.processor) ? t.processor : null, E = Z(t.warnHtmlMessage) ? t.warnHtmlMessage : !0, I = !!t.escapeParameter, _ = se(t.messageCompiler) ? t.messageCompiler : Na;
  process.env.NODE_ENV !== "production" && !0 && !0 && se(t.messageCompiler) && Fo(St(ve.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
  const O = se(t.messageResolver) ? t.messageResolver : Ta || yl, T = se(t.localeFallbacker) ? t.localeFallbacker : Ia || Fl, D = q(t.fallbackContext) ? t.fallbackContext : void 0, F = t, z = q(F.__datetimeFormatters) ? F.__datetimeFormatters : /* @__PURE__ */ new Map(), G = q(F.__numberFormatters) ? F.__numberFormatters : /* @__PURE__ */ new Map(), P = q(F.__meta) ? F.__meta : {};
  mr++;
  const R = {
    version: n,
    cid: mr,
    locale: s,
    fallbackLocale: a,
    messages: i,
    modifiers: c,
    pluralRules: f,
    missing: d,
    missingWarn: m,
    fallbackWarn: p,
    fallbackFormat: N,
    unresolving: S,
    postTranslation: v,
    processor: g,
    warnHtmlMessage: E,
    escapeParameter: I,
    messageCompiler: _,
    messageResolver: O,
    localeFallbacker: T,
    fallbackContext: D,
    onWarn: e,
    __meta: P
  };
  return R.datetimeFormats = o, R.numberFormats = l, R.__datetimeFormatters = z, R.__numberFormatters = G, process.env.NODE_ENV !== "production" && (R.__v_emitter = F.__v_emitter != null ? F.__v_emitter : void 0), (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && Cl(R, n, P), R;
}
function Gn(t, e) {
  return t instanceof RegExp ? t.test(e) : t;
}
function Oa(t, e) {
  return t instanceof RegExp ? t.test(e) : t;
}
function Rs(t, e, n, s, r) {
  const { missing: a, onWarn: i } = t;
  if (process.env.NODE_ENV !== "production") {
    const o = t.__v_emitter;
    o && o.emit("missing", {
      locale: n,
      key: e,
      type: r,
      groupId: `${r}:${e}`
    });
  }
  if (a !== null) {
    const o = a(t, n, e, r);
    return w(o) ? o : e;
  } else
    return process.env.NODE_ENV !== "production" && Oa(s, e) && i(St(ve.NOT_FOUND_KEY, { key: e, locale: n })), e;
}
function an(t, e, n) {
  const s = t;
  s.__localeChainCache = /* @__PURE__ */ new Map(), t.localeFallbacker(t, n, e);
}
function es(t) {
  return (n) => Hl(n, t);
}
function Hl(t, e) {
  const n = e.b || e.body;
  if ((n.t || n.type) === 1) {
    const s = n, r = s.c || s.cases;
    return t.plural(r.reduce((a, i) => [
      ...a,
      hr(t, i)
    ], []));
  } else
    return hr(t, n);
}
function hr(t, e) {
  const n = e.s || e.static;
  if (n)
    return t.type === "text" ? n : t.normalize([n]);
  {
    const s = (e.i || e.items).reduce((r, a) => [...r, ms(t, a)], []);
    return t.normalize(s);
  }
}
function ms(t, e) {
  const n = e.t || e.type;
  switch (n) {
    case 3:
      const s = e;
      return s.v || s.value;
    case 9:
      const r = e;
      return r.v || r.value;
    case 4:
      const a = e;
      return t.interpolate(t.named(a.k || a.key));
    case 5:
      const i = e;
      return t.interpolate(t.list(i.i != null ? i.i : i.index));
    case 6:
      const o = e, l = o.m || o.modifier;
      return t.linked(ms(t, o.k || o.key), l ? ms(t, l) : void 0, t.type);
    case 7:
      const c = e;
      return c.v || c.value;
    case 8:
      const f = e;
      return f.v || f.value;
    default:
      throw new Error(`unhandled node type on format message part: ${n}`);
  }
}
const ka = U.__EXTEND_POINT__, bn = As(ka), Ae = {
  INVALID_ARGUMENT: ka,
  INVALID_DATE_ARGUMENT: bn(),
  INVALID_ISO_DATE_ARGUMENT: bn(),
  NOT_SUPPORT_NON_STRING_MESSAGE: bn(),
  __EXTEND_POINT__: bn()
};
function Nt(t) {
  return Gt(t, null, process.env.NODE_ENV !== "production" ? { messages: Gl } : void 0);
}
const Gl = {
  [Ae.INVALID_ARGUMENT]: "Invalid arguments",
  [Ae.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
  [Ae.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
  [Ae.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message"
}, Zl = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
function La(t, e) {
  e && Wo(t) && he(Ds(Zl, { source: t }));
}
const wa = (t) => t;
let Vt = /* @__PURE__ */ Object.create(null);
const Ot = (t) => q(t) && (t.t === 0 || t.type === 0) && ("b" in t || "body" in t);
function Ca(t, e = {}) {
  let n = !1;
  const s = e.onError || $o;
  return e.onError = (r) => {
    n = !0, s(r);
  }, { ...fl(t, e), detectError: n };
}
const Bl = (t, e) => {
  if (!w(t))
    throw Nt(Ae.NOT_SUPPORT_NON_STRING_MESSAGE);
  {
    const n = Z(e.warnHtmlMessage) ? e.warnHtmlMessage : !0;
    process.env.NODE_ENV !== "production" && La(t, n);
    const r = (e.onCacheKey || wa)(t), a = Vt[r];
    if (a)
      return a;
    const { code: i, detectError: o } = Ca(t, e), l = new Function(`return ${i}`)();
    return o ? l : Vt[r] = l;
  }
};
function Yl(t, e) {
  if (__INTLIFY_JIT_COMPILATION__ && !__INTLIFY_DROP_MESSAGE_COMPILER__ && w(t)) {
    const n = Z(e.warnHtmlMessage) ? e.warnHtmlMessage : !0;
    process.env.NODE_ENV !== "production" && La(t, n);
    const r = (e.onCacheKey || wa)(t), a = Vt[r];
    if (a)
      return a;
    const { ast: i, detectError: o } = Ca(t, {
      ...e,
      location: process.env.NODE_ENV !== "production",
      jit: !0
    }), l = es(i);
    return o ? l : Vt[r] = l;
  } else {
    if (process.env.NODE_ENV !== "production" && !Ot(t))
      return he(`the message that is resolve with key '${e.key}' is not supported for jit compilation`), () => t;
    const n = t.cacheKey;
    if (n) {
      const s = Vt[n];
      return s || (Vt[n] = es(t));
    } else
      return es(t);
  }
}
const gr = () => "", $e = (t) => se(t);
function pr(t, ...e) {
  const { fallbackFormat: n, postTranslation: s, unresolving: r, messageCompiler: a, fallbackLocale: i, messages: o } = t, [l, c] = hs(...e), f = Z(c.missingWarn) ? c.missingWarn : t.missingWarn, d = Z(c.fallbackWarn) ? c.fallbackWarn : t.fallbackWarn, m = Z(c.escapeParameter) ? c.escapeParameter : t.escapeParameter, p = !!c.resolvedMessage, N = w(c.default) || Z(c.default) ? Z(c.default) ? a ? l : () => l : c.default : n ? a ? l : () => l : "", S = n || N !== "", v = xs(t, c);
  m && Kl(c);
  let [g, E, I] = p ? [
    l,
    v,
    o[v] || {}
  ] : Da(t, l, v, i, d, f), _ = g, O = l;
  if (!p && !(w(_) || Ot(_) || $e(_)) && S && (_ = N, O = _), !p && (!(w(_) || Ot(_) || $e(_)) || !w(E)))
    return r ? Hn : l;
  if (process.env.NODE_ENV !== "production" && w(_) && t.messageCompiler == null)
    return he(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${l}'.`), l;
  let T = !1;
  const D = () => {
    T = !0;
  }, F = $e(_) ? _ : Ma(t, l, E, _, O, D);
  if (T)
    return _;
  const z = Xl(t, E, I, c), G = Ll(z), P = Jl(t, F, G), R = s ? s(P, l) : P;
  if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
    const V = {
      timestamp: Date.now(),
      key: w(l) ? l : $e(_) ? _.key : "",
      locale: E || ($e(_) ? _.locale : ""),
      format: w(_) ? _ : $e(_) ? _.source : "",
      message: R
    };
    V.meta = pe({}, t.__meta, zl() || {}), Dl(V);
  }
  return R;
}
function Kl(t) {
  te(t.list) ? t.list = t.list.map((e) => w(e) ? Qs(e) : e) : q(t.named) && Object.keys(t.named).forEach((e) => {
    w(t.named[e]) && (t.named[e] = Qs(t.named[e]));
  });
}
function Da(t, e, n, s, r, a) {
  const { messages: i, onWarn: o, messageResolver: l, localeFallbacker: c } = t, f = c(t, s, n);
  let d = {}, m, p = null, N = n, S = null;
  const v = "translate";
  for (let g = 0; g < f.length; g++) {
    if (m = S = f[g], process.env.NODE_ENV !== "production" && n !== m && Gn(r, e) && o(St(ve.FALLBACK_TO_TRANSLATE, {
      key: e,
      target: m
    })), process.env.NODE_ENV !== "production" && n !== m) {
      const T = t.__v_emitter;
      T && T.emit("fallback", {
        type: v,
        key: e,
        from: N,
        to: S,
        groupId: `${v}:${e}`
      });
    }
    d = i[m] || {};
    let E = null, I, _;
    if (process.env.NODE_ENV !== "production" && Ye && (E = window.performance.now(), I = "intlify-message-resolve-start", _ = "intlify-message-resolve-end", Le && Le(I)), (p = l(d, e)) === null && (p = d[e]), process.env.NODE_ENV !== "production" && Ye) {
      const T = window.performance.now(), D = t.__v_emitter;
      D && E && p && D.emit("message-resolve", {
        type: "message-resolve",
        key: e,
        message: p,
        time: T - E,
        groupId: `${v}:${e}`
      }), I && _ && Le && bt && (Le(_), bt("intlify message resolve", I, _));
    }
    if (w(p) || Ot(p) || $e(p))
      break;
    const O = Rs(
      t,
      e,
      m,
      a,
      v
    );
    O !== e && (p = O), N = S;
  }
  return [p, m, d];
}
function Ma(t, e, n, s, r, a) {
  const { messageCompiler: i, warnHtmlMessage: o } = t;
  if ($e(s)) {
    const m = s;
    return m.locale = m.locale || n, m.key = m.key || e, m;
  }
  if (i == null) {
    const m = () => s;
    return m.locale = n, m.key = e, m;
  }
  let l = null, c, f;
  process.env.NODE_ENV !== "production" && Ye && (l = window.performance.now(), c = "intlify-message-compilation-start", f = "intlify-message-compilation-end", Le && Le(c));
  const d = i(s, ql(t, n, r, s, o, a));
  if (process.env.NODE_ENV !== "production" && Ye) {
    const m = window.performance.now(), p = t.__v_emitter;
    p && l && p.emit("message-compilation", {
      type: "message-compilation",
      message: s,
      time: m - l,
      groupId: `translate:${e}`
    }), c && f && Le && bt && (Le(f), bt("intlify message compilation", c, f));
  }
  return d.locale = n, d.key = e, d.source = s, d;
}
function Jl(t, e, n) {
  let s = null, r, a;
  process.env.NODE_ENV !== "production" && Ye && (s = window.performance.now(), r = "intlify-message-evaluation-start", a = "intlify-message-evaluation-end", Le && Le(r));
  const i = e(n);
  if (process.env.NODE_ENV !== "production" && Ye) {
    const o = window.performance.now(), l = t.__v_emitter;
    l && s && l.emit("message-evaluation", {
      type: "message-evaluation",
      value: i,
      time: o - s,
      groupId: `translate:${e.key}`
    }), r && a && Le && bt && (Le(a), bt("intlify message evaluation", r, a));
  }
  return i;
}
function hs(...t) {
  const [e, n, s] = t, r = {};
  if (!w(e) && !me(e) && !$e(e) && !Ot(e))
    throw Nt(Ae.INVALID_ARGUMENT);
  const a = me(e) ? String(e) : ($e(e), e);
  return me(n) ? r.plural = n : w(n) ? r.default = n : H(n) && !jn(n) ? r.named = n : te(n) && (r.list = n), me(s) ? r.plural = s : w(s) ? r.default = s : H(s) && pe(r, s), [a, r];
}
function ql(t, e, n, s, r, a) {
  return {
    locale: e,
    key: n,
    warnHtmlMessage: r,
    onError: (i) => {
      if (a && a(i), process.env.NODE_ENV !== "production") {
        const o = Ql(s), l = `Message compilation error: ${i.message}`, c = i.location && o && Ao(o, i.location.start.offset, i.location.end.offset), f = t.__v_emitter;
        f && o && f.emit("compile-error", {
          message: o,
          error: i.message,
          start: i.location && i.location.start.offset,
          end: i.location && i.location.end.offset,
          groupId: `translate:${n}`
        }), console.error(c ? `${l}
${c}` : l);
      } else
        throw i;
    },
    onCacheKey: (i) => ko(e, n, i)
  };
}
function Ql(t) {
  var e;
  if (!w(t)) {
    if ((e = t.loc) != null && e.source)
      return t.loc.source;
  }
}
function Xl(t, e, n, s) {
  const { modifiers: r, pluralRules: a, messageResolver: i, fallbackLocale: o, fallbackWarn: l, missingWarn: c, fallbackContext: f } = t, m = {
    locale: e,
    modifiers: r,
    pluralRules: a,
    messages: (p) => {
      let N = i(n, p);
      if (N == null && f) {
        const [, , S] = Da(f, p, e, o, l, c);
        N = i(S, p);
      }
      if (w(N) || Ot(N)) {
        let S = !1;
        const g = Ma(t, p, e, N, p, () => {
          S = !0;
        });
        return S ? gr : g;
      } else
        return $e(N) ? N : gr;
    }
  };
  return t.processor && (m.processor = t.processor), s.list && (m.list = s.list), s.named && (m.named = s.named), me(s.plural) && (m.pluralIndex = s.plural), m;
}
const _r = typeof Intl < "u", Aa = {
  dateTimeFormat: _r && typeof Intl.DateTimeFormat < "u",
  numberFormat: _r && typeof Intl.NumberFormat < "u"
};
function Er(t, ...e) {
  const { datetimeFormats: n, unresolving: s, fallbackLocale: r, onWarn: a, localeFallbacker: i } = t, { __datetimeFormatters: o } = t;
  if (process.env.NODE_ENV !== "production" && !Aa.dateTimeFormat)
    return a(St(ve.CANNOT_FORMAT_DATE)), Rn;
  const [l, c, f, d] = gs(...e), m = Z(f.missingWarn) ? f.missingWarn : t.missingWarn, p = Z(f.fallbackWarn) ? f.fallbackWarn : t.fallbackWarn, N = !!f.part, S = xs(t, f), v = i(
    t,
    r,
    S
  );
  if (!w(l) || l === "")
    return new Intl.DateTimeFormat(S, d).format(c);
  let g = {}, E, I = null, _ = S, O = null;
  const T = "datetime format";
  for (let z = 0; z < v.length; z++) {
    if (E = O = v[z], process.env.NODE_ENV !== "production" && S !== E && Gn(p, l) && a(St(ve.FALLBACK_TO_DATE_FORMAT, {
      key: l,
      target: E
    })), process.env.NODE_ENV !== "production" && S !== E) {
      const G = t.__v_emitter;
      G && G.emit("fallback", {
        type: T,
        key: l,
        from: _,
        to: O,
        groupId: `${T}:${l}`
      });
    }
    if (g = n[E] || {}, I = g[l], H(I))
      break;
    Rs(t, l, E, m, T), _ = O;
  }
  if (!H(I) || !w(E))
    return s ? Hn : l;
  let D = `${E}__${l}`;
  jn(d) || (D = `${D}__${JSON.stringify(d)}`);
  let F = o.get(D);
  return F || (F = new Intl.DateTimeFormat(E, pe({}, I, d)), o.set(D, F)), N ? F.formatToParts(c) : F.format(c);
}
const Fa = [
  "localeMatcher",
  "weekday",
  "era",
  "year",
  "month",
  "day",
  "hour",
  "minute",
  "second",
  "timeZoneName",
  "formatMatcher",
  "hour12",
  "timeZone",
  "dateStyle",
  "timeStyle",
  "calendar",
  "dayPeriod",
  "numberingSystem",
  "hourCycle",
  "fractionalSecondDigits"
];
function gs(...t) {
  const [e, n, s, r] = t, a = {};
  let i = {}, o;
  if (w(e)) {
    const l = e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
    if (!l)
      throw Nt(Ae.INVALID_ISO_DATE_ARGUMENT);
    const c = l[3] ? l[3].trim().startsWith("T") ? `${l[1].trim()}${l[3].trim()}` : `${l[1].trim()}T${l[3].trim()}` : l[1].trim();
    o = new Date(c);
    try {
      o.toISOString();
    } catch {
      throw Nt(Ae.INVALID_ISO_DATE_ARGUMENT);
    }
  } else if (wo(e)) {
    if (isNaN(e.getTime()))
      throw Nt(Ae.INVALID_DATE_ARGUMENT);
    o = e;
  } else if (me(e))
    o = e;
  else
    throw Nt(Ae.INVALID_ARGUMENT);
  return w(n) ? a.key = n : H(n) && Object.keys(n).forEach((l) => {
    Fa.includes(l) ? i[l] = n[l] : a[l] = n[l];
  }), w(s) ? a.locale = s : H(s) && (i = s), H(r) && (i = r), [a.key || "", o, a, i];
}
function yr(t, e, n) {
  const s = t;
  for (const r in n) {
    const a = `${e}__${r}`;
    !s.__datetimeFormatters.has(a) || s.__datetimeFormatters.delete(a);
  }
}
function vr(t, ...e) {
  const { numberFormats: n, unresolving: s, fallbackLocale: r, onWarn: a, localeFallbacker: i } = t, { __numberFormatters: o } = t;
  if (process.env.NODE_ENV !== "production" && !Aa.numberFormat)
    return a(St(ve.CANNOT_FORMAT_NUMBER)), Rn;
  const [l, c, f, d] = ps(...e), m = Z(f.missingWarn) ? f.missingWarn : t.missingWarn, p = Z(f.fallbackWarn) ? f.fallbackWarn : t.fallbackWarn, N = !!f.part, S = xs(t, f), v = i(
    t,
    r,
    S
  );
  if (!w(l) || l === "")
    return new Intl.NumberFormat(S, d).format(c);
  let g = {}, E, I = null, _ = S, O = null;
  const T = "number format";
  for (let z = 0; z < v.length; z++) {
    if (E = O = v[z], process.env.NODE_ENV !== "production" && S !== E && Gn(p, l) && a(St(ve.FALLBACK_TO_NUMBER_FORMAT, {
      key: l,
      target: E
    })), process.env.NODE_ENV !== "production" && S !== E) {
      const G = t.__v_emitter;
      G && G.emit("fallback", {
        type: T,
        key: l,
        from: _,
        to: O,
        groupId: `${T}:${l}`
      });
    }
    if (g = n[E] || {}, I = g[l], H(I))
      break;
    Rs(t, l, E, m, T), _ = O;
  }
  if (!H(I) || !w(E))
    return s ? Hn : l;
  let D = `${E}__${l}`;
  jn(d) || (D = `${D}__${JSON.stringify(d)}`);
  let F = o.get(D);
  return F || (F = new Intl.NumberFormat(E, pe({}, I, d)), o.set(D, F)), N ? F.formatToParts(c) : F.format(c);
}
const Pa = [
  "localeMatcher",
  "style",
  "currency",
  "currencyDisplay",
  "currencySign",
  "useGrouping",
  "minimumIntegerDigits",
  "minimumFractionDigits",
  "maximumFractionDigits",
  "minimumSignificantDigits",
  "maximumSignificantDigits",
  "compactDisplay",
  "notation",
  "signDisplay",
  "unit",
  "unitDisplay",
  "roundingMode",
  "roundingPriority",
  "roundingIncrement",
  "trailingZeroDisplay"
];
function ps(...t) {
  const [e, n, s, r] = t, a = {};
  let i = {};
  if (!me(e))
    throw Nt(Ae.INVALID_ARGUMENT);
  const o = e;
  return w(n) ? a.key = n : H(n) && Object.keys(n).forEach((l) => {
    Pa.includes(l) ? i[l] = n[l] : a[l] = n[l];
  }), w(s) ? a.locale = s : H(s) && (i = s), H(r) && (i = r), [a.key || "", o, a, i];
}
function Nr(t, e, n) {
  const s = t;
  for (const r in n) {
    const a = `${e}__${r}`;
    !s.__numberFormatters.has(a) || s.__numberFormatters.delete(a);
  }
}
dl();
function ec() {
  return xa().__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
function xa() {
  return typeof navigator < "u" && typeof window < "u" ? window : typeof global < "u" ? global : {};
}
const tc = typeof Proxy == "function", nc = "devtools-plugin:setup", sc = "plugin:settings:set";
let At, _s;
function rc() {
  var t;
  return At !== void 0 || (typeof window < "u" && window.performance ? (At = !0, _s = window.performance) : typeof global < "u" && ((t = global.perf_hooks) === null || t === void 0 ? void 0 : t.performance) ? (At = !0, _s = global.perf_hooks.performance) : At = !1), At;
}
function ac() {
  return rc() ? _s.now() : Date.now();
}
class ic {
  constructor(e, n) {
    this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = e, this.hook = n;
    const s = {};
    if (e.settings)
      for (const i in e.settings) {
        const o = e.settings[i];
        s[i] = o.defaultValue;
      }
    const r = `__vue-devtools-plugin-settings__${e.id}`;
    let a = Object.assign({}, s);
    try {
      const i = localStorage.getItem(r), o = JSON.parse(i);
      Object.assign(a, o);
    } catch {
    }
    this.fallbacks = {
      getSettings() {
        return a;
      },
      setSettings(i) {
        try {
          localStorage.setItem(r, JSON.stringify(i));
        } catch {
        }
        a = i;
      },
      now() {
        return ac();
      }
    }, n && n.on(sc, (i, o) => {
      i === this.plugin.id && this.fallbacks.setSettings(o);
    }), this.proxiedOn = new Proxy({}, {
      get: (i, o) => this.target ? this.target.on[o] : (...l) => {
        this.onQueue.push({
          method: o,
          args: l
        });
      }
    }), this.proxiedTarget = new Proxy({}, {
      get: (i, o) => this.target ? this.target[o] : o === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(o) ? (...l) => (this.targetQueue.push({
        method: o,
        args: l,
        resolve: () => {
        }
      }), this.fallbacks[o](...l)) : (...l) => new Promise((c) => {
        this.targetQueue.push({
          method: o,
          args: l,
          resolve: c
        });
      })
    });
  }
  async setRealTarget(e) {
    this.target = e;
    for (const n of this.onQueue)
      this.target.on[n.method](...n.args);
    for (const n of this.targetQueue)
      n.resolve(await this.target[n.method](...n.args));
  }
}
function oc(t, e) {
  const n = t, s = xa(), r = ec(), a = tc && n.enableEarlyProxy;
  if (r && (s.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !a))
    r.emit(nc, t, e);
  else {
    const i = a ? new ic(n, r) : null;
    (s.__VUE_DEVTOOLS_PLUGINS__ = s.__VUE_DEVTOOLS_PLUGINS__ || []).push({
      pluginDescriptor: n,
      setupFn: e,
      proxy: i
    }), i && e(i.proxiedTarget);
  }
}
/*!
  * vue-i18n v9.5.0
  * (c) 2023 kazuya kawaguchi
  * Released under the MIT License.
  */
const lc = "9.5.0";
function cc() {
  typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Qe().__VUE_I18N_FULL_INSTALL__ = !0), typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Qe().__VUE_I18N_LEGACY_API__ = !0), typeof __INTLIFY_JIT_COMPILATION__ != "boolean" && (Qe().__INTLIFY_JIT_COMPILATION__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Qe().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1), typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Qe().__INTLIFY_PROD_DEVTOOLS__ = !1);
}
const Ra = ve.__EXTEND_POINT__, it = As(Ra), oe = {
  FALLBACK_TO_ROOT: Ra,
  NOT_SUPPORTED_PRESERVE: it(),
  NOT_SUPPORTED_FORMATTER: it(),
  NOT_SUPPORTED_PRESERVE_DIRECTIVE: it(),
  NOT_SUPPORTED_GET_CHOICE_INDEX: it(),
  COMPONENT_NAME_LEGACY_COMPATIBLE: it(),
  NOT_FOUND_PARENT_SCOPE: it(),
  IGNORE_OBJ_FLATTEN: it(),
  NOTICE_DROP_ALLOW_COMPOSITION: it()
}, uc = {
  [oe.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
  [oe.NOT_SUPPORTED_PRESERVE]: "Not supported 'preserve'.",
  [oe.NOT_SUPPORTED_FORMATTER]: "Not supported 'formatter'.",
  [oe.NOT_SUPPORTED_PRESERVE_DIRECTIVE]: "Not supported 'preserveDirectiveContent'.",
  [oe.NOT_SUPPORTED_GET_CHOICE_INDEX]: "Not supported 'getChoiceIndex'.",
  [oe.COMPONENT_NAME_LEGACY_COMPATIBLE]: "Component name legacy compatible: '{name}' -> 'i18n'",
  [oe.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
  [oe.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
  [oe.NOTICE_DROP_ALLOW_COMPOSITION]: "'allowComposition' option will be dropped in the next major version. For more information, please see \u{1F449} https://tinyurl.com/2p97mcze"
};
function ke(t, ...e) {
  return Ds(uc[t], ...e);
}
const Va = Ae.__EXTEND_POINT__, Oe = As(Va), Y = {
  UNEXPECTED_RETURN_TYPE: Va,
  INVALID_ARGUMENT: Oe(),
  MUST_BE_CALL_SETUP_TOP: Oe(),
  NOT_INSTALLED: Oe(),
  NOT_AVAILABLE_IN_LEGACY_MODE: Oe(),
  REQUIRED_VALUE: Oe(),
  INVALID_VALUE: Oe(),
  CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: Oe(),
  NOT_INSTALLED_WITH_PROVIDE: Oe(),
  UNEXPECTED_ERROR: Oe(),
  NOT_COMPATIBLE_LEGACY_VUE_I18N: Oe(),
  BRIDGE_SUPPORT_VUE_2_ONLY: Oe(),
  MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION: Oe(),
  NOT_AVAILABLE_COMPOSITION_IN_LEGACY: Oe(),
  __EXTEND_POINT__: Oe()
};
function de(t, ...e) {
  return Gt(t, null, process.env.NODE_ENV !== "production" ? { messages: fc, args: e } : void 0);
}
const fc = {
  [Y.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
  [Y.INVALID_ARGUMENT]: "Invalid argument",
  [Y.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
  [Y.NOT_INSTALLED]: "Need to install with `app.use` function",
  [Y.UNEXPECTED_ERROR]: "Unexpected error",
  [Y.NOT_AVAILABLE_IN_LEGACY_MODE]: "Not available in legacy mode",
  [Y.REQUIRED_VALUE]: "Required in value: {0}",
  [Y.INVALID_VALUE]: "Invalid value",
  [Y.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: "Cannot setup vue-devtools plugin",
  [Y.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
  [Y.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
  [Y.BRIDGE_SUPPORT_VUE_2_ONLY]: "vue-i18n-bridge support Vue 2.x only",
  [Y.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]: "Must define \u2018i18n\u2019 option or custom block in Composition API with using local scope in Legacy API mode",
  [Y.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
}, Es = /* @__PURE__ */ je("__translateVNode"), ys = /* @__PURE__ */ je("__datetimeParts"), vs = /* @__PURE__ */ je("__numberParts"), kt = /* @__PURE__ */ je("__enableEmitter"), pn = /* @__PURE__ */ je("__disableEmitter"), Ua = je("__setPluralRules");
je("__intlifyMeta");
const $a = /* @__PURE__ */ je("__injectWithOption"), Ns = /* @__PURE__ */ je("__dispose");
function Ts(t) {
  if (!q(t))
    return t;
  for (const e in t)
    if (!!Ms(t, e))
      if (!e.includes("."))
        q(t[e]) && Ts(t[e]);
      else {
        const n = e.split("."), s = n.length - 1;
        let r = t, a = !1;
        for (let i = 0; i < s; i++) {
          if (n[i] in r || (r[n[i]] = {}), !q(r[n[i]])) {
            process.env.NODE_ENV !== "production" && he(ke(oe.IGNORE_OBJ_FLATTEN, {
              key: n[i]
            })), a = !0;
            break;
          }
          r = r[n[i]];
        }
        a || (r[n[s]] = t[e], delete t[e]), q(r[n[s]]) && Ts(r[n[s]]);
      }
  return t;
}
function Zn(t, e) {
  const { messages: n, __i18n: s, messageResolver: r, flatJson: a } = e, i = H(n) ? n : te(s) ? {} : { [t]: {} };
  if (te(s) && s.forEach((o) => {
    if ("locale" in o && "resource" in o) {
      const { locale: l, resource: c } = o;
      l ? (i[l] = i[l] || {}, fn(c, i[l])) : fn(c, i);
    } else
      w(o) && fn(JSON.parse(o), i);
  }), r == null && a)
    for (const o in i)
      Ms(i, o) && Ts(i[o]);
  return i;
}
const Sn = (t) => !q(t) || te(t);
function fn(t, e) {
  if (Sn(t) || Sn(e))
    throw de(Y.INVALID_VALUE);
  for (const n in t)
    Ms(t, n) && (Sn(t[n]) || Sn(e[n]) ? e[n] = t[n] : fn(t[n], e[n]));
}
function za(t) {
  return t.type;
}
function Wa(t, e, n) {
  let s = q(e.messages) ? e.messages : {};
  "__i18nGlobal" in n && (s = Zn(t.locale.value, {
    messages: s,
    __i18n: n.__i18nGlobal
  }));
  const r = Object.keys(s);
  r.length && r.forEach((a) => {
    t.mergeLocaleMessage(a, s[a]);
  });
  {
    if (q(e.datetimeFormats)) {
      const a = Object.keys(e.datetimeFormats);
      a.length && a.forEach((i) => {
        t.mergeDateTimeFormat(i, e.datetimeFormats[i]);
      });
    }
    if (q(e.numberFormats)) {
      const a = Object.keys(e.numberFormats);
      a.length && a.forEach((i) => {
        t.mergeNumberFormat(i, e.numberFormats[i]);
      });
    }
  }
}
function Tr(t) {
  return Xe(to, null, t, 0);
}
const Ir = "__INTLIFY_META__";
let br = 0;
function Sr(t) {
  return (e, n, s, r) => t(n, s, hn() || void 0, r);
}
const dc = () => {
  const t = hn();
  let e = null;
  return t && (e = za(t)[Ir]) ? { [Ir]: e } : null;
};
function Vs(t = {}, e) {
  const { __root: n, __injectWithOption: s } = t, r = n === void 0;
  let a = Z(t.inheritLocale) ? t.inheritLocale : !0;
  const i = A(
    n && a ? n.locale.value : w(t.locale) ? t.locale : jt
  ), o = A(
    n && a ? n.fallbackLocale.value : w(t.fallbackLocale) || te(t.fallbackLocale) || H(t.fallbackLocale) || t.fallbackLocale === !1 ? t.fallbackLocale : i.value
  ), l = A(Zn(i.value, t)), c = A(H(t.datetimeFormats) ? t.datetimeFormats : { [i.value]: {} }), f = A(H(t.numberFormats) ? t.numberFormats : { [i.value]: {} });
  let d = n ? n.missingWarn : Z(t.missingWarn) || dt(t.missingWarn) ? t.missingWarn : !0, m = n ? n.fallbackWarn : Z(t.fallbackWarn) || dt(t.fallbackWarn) ? t.fallbackWarn : !0, p = n ? n.fallbackRoot : Z(t.fallbackRoot) ? t.fallbackRoot : !0, N = !!t.fallbackFormat, S = se(t.missing) ? t.missing : null, v = se(t.missing) ? Sr(t.missing) : null, g = se(t.postTranslation) ? t.postTranslation : null, E = n ? n.warnHtmlMessage : Z(t.warnHtmlMessage) ? t.warnHtmlMessage : !0, I = !!t.escapeParameter;
  const _ = n ? n.modifiers : H(t.modifiers) ? t.modifiers : {};
  let O = t.pluralRules || n && n.pluralRules, T;
  T = (() => {
    r && dr(null);
    const b = {
      version: lc,
      locale: i.value,
      fallbackLocale: o.value,
      messages: l.value,
      modifiers: _,
      pluralRules: O,
      missing: v === null ? void 0 : v,
      missingWarn: d,
      fallbackWarn: m,
      fallbackFormat: N,
      unresolving: !0,
      postTranslation: g === null ? void 0 : g,
      warnHtmlMessage: E,
      escapeParameter: I,
      messageResolver: t.messageResolver,
      messageCompiler: t.messageCompiler,
      __meta: { framework: "vue" }
    };
    b.datetimeFormats = c.value, b.numberFormats = f.value, b.__datetimeFormatters = H(T) ? T.__datetimeFormatters : void 0, b.__numberFormatters = H(T) ? T.__numberFormatters : void 0, process.env.NODE_ENV !== "production" && (b.__v_emitter = H(T) ? T.__v_emitter : void 0);
    const L = jl(b);
    return r && dr(L), L;
  })(), an(T, i.value, o.value);
  function F() {
    return [
      i.value,
      o.value,
      l.value,
      c.value,
      f.value
    ];
  }
  const z = Me({
    get: () => i.value,
    set: (b) => {
      i.value = b, T.locale = i.value;
    }
  }), G = Me({
    get: () => o.value,
    set: (b) => {
      o.value = b, T.fallbackLocale = o.value, an(T, i.value, b);
    }
  }), P = Me(() => l.value), R = /* @__PURE__ */ Me(() => c.value), V = /* @__PURE__ */ Me(() => f.value);
  function be() {
    return se(g) ? g : null;
  }
  function Jt(b) {
    g = b, T.postTranslation = b;
  }
  function Ge() {
    return S;
  }
  function Ct(b) {
    b !== null && (v = Sr(b)), S = b, T.missing = v;
  }
  function qt(b, L) {
    return b !== "translate" || !L.resolvedMessage;
  }
  const Re = (b, L, Se, Ee, Qn, In) => {
    F();
    let rn;
    try {
      (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && fr(dc()), r || (T.fallbackContext = n ? Wl() : void 0), rn = b(T);
    } finally {
      (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) && fr(null), r || (T.fallbackContext = void 0);
    }
    if (me(rn) && rn === Hn) {
      const [Et, Ki] = L();
      if (process.env.NODE_ENV !== "production" && n && w(Et) && qt(Se, Ki) && (p && (Gn(m, Et) || Oa(d, Et)) && he(ke(oe.FALLBACK_TO_ROOT, {
        key: Et,
        type: Se
      })), process.env.NODE_ENV !== "production")) {
        const { __v_emitter: Ys } = T;
        Ys && p && Ys.emit("fallback", {
          type: Se,
          key: Et,
          to: "global",
          groupId: `${Se}:${Et}`
        });
      }
      return n && p ? Ee(n) : Qn(Et);
    } else {
      if (In(rn))
        return rn;
      throw de(Y.UNEXPECTED_RETURN_TYPE);
    }
  };
  function Dt(...b) {
    return Re((L) => Reflect.apply(pr, null, [L, ...b]), () => hs(...b), "translate", (L) => Reflect.apply(L.t, L, [...b]), (L) => L, (L) => w(L));
  }
  function Qt(...b) {
    const [L, Se, Ee] = b;
    if (Ee && !q(Ee))
      throw de(Y.INVALID_ARGUMENT);
    return Dt(L, Se, pe({ resolvedMessage: !0 }, Ee || {}));
  }
  function Xt(...b) {
    return Re((L) => Reflect.apply(Er, null, [L, ...b]), () => gs(...b), "datetime format", (L) => Reflect.apply(L.d, L, [...b]), () => Rn, (L) => w(L));
  }
  function en(...b) {
    return Re((L) => Reflect.apply(vr, null, [L, ...b]), () => ps(...b), "number format", (L) => Reflect.apply(L.n, L, [...b]), () => Rn, (L) => w(L));
  }
  function Mt(b) {
    return b.map((L) => w(L) || me(L) || Z(L) ? Tr(String(L)) : L);
  }
  const tn = {
    normalize: Mt,
    interpolate: (b) => b,
    type: "vnode"
  };
  function nn(...b) {
    return Re(
      (L) => {
        let Se;
        const Ee = L;
        try {
          Ee.processor = tn, Se = Reflect.apply(pr, null, [Ee, ...b]);
        } finally {
          Ee.processor = null;
        }
        return Se;
      },
      () => hs(...b),
      "translate",
      (L) => L[Es](...b),
      (L) => [Tr(L)],
      (L) => te(L)
    );
  }
  function gt(...b) {
    return Re(
      (L) => Reflect.apply(vr, null, [L, ...b]),
      () => ps(...b),
      "number format",
      (L) => L[vs](...b),
      () => [],
      (L) => w(L) || te(L)
    );
  }
  function pt(...b) {
    return Re(
      (L) => Reflect.apply(Er, null, [L, ...b]),
      () => gs(...b),
      "datetime format",
      (L) => L[ys](...b),
      () => [],
      (L) => w(L) || te(L)
    );
  }
  function rt(b) {
    O = b, T.pluralRules = O;
  }
  function _t(b, L) {
    if (!b)
      return !1;
    const Se = w(L) ? L : i.value, Ee = u(Se);
    return T.messageResolver(Ee, b) !== null;
  }
  function sn(b) {
    let L = null;
    const Se = va(T, o.value, i.value);
    for (let Ee = 0; Ee < Se.length; Ee++) {
      const Qn = l.value[Se[Ee]] || {}, In = T.messageResolver(Qn, b);
      if (In != null) {
        L = In;
        break;
      }
    }
    return L;
  }
  function h(b) {
    const L = sn(b);
    return L != null ? L : n ? n.tm(b) || {} : {};
  }
  function u(b) {
    return l.value[b] || {};
  }
  function y(b, L) {
    l.value[b] = L, T.messages = l.value;
  }
  function M(b, L) {
    l.value[b] = l.value[b] || {}, fn(L, l.value[b]), T.messages = l.value;
  }
  function W(b) {
    return c.value[b] || {};
  }
  function Q(b, L) {
    c.value[b] = L, T.datetimeFormats = c.value, yr(T, b, L);
  }
  function Ze(b, L) {
    c.value[b] = pe(c.value[b] || {}, L), T.datetimeFormats = c.value, yr(T, b, L);
  }
  function Ke(b) {
    return f.value[b] || {};
  }
  function Bi(b, L) {
    f.value[b] = L, T.numberFormats = f.value, Nr(T, b, L);
  }
  function Yi(b, L) {
    f.value[b] = pe(f.value[b] || {}, L), T.numberFormats = f.value, Nr(T, b, L);
  }
  br++, n && Ye && (zt(n.locale, (b) => {
    a && (i.value = b, T.locale = b, an(T, i.value, o.value));
  }), zt(n.fallbackLocale, (b) => {
    a && (o.value = b, T.fallbackLocale = b, an(T, i.value, o.value));
  }));
  const ue = {
    id: br,
    locale: z,
    fallbackLocale: G,
    get inheritLocale() {
      return a;
    },
    set inheritLocale(b) {
      a = b, b && n && (i.value = n.locale.value, o.value = n.fallbackLocale.value, an(T, i.value, o.value));
    },
    get availableLocales() {
      return Object.keys(l.value).sort();
    },
    messages: P,
    get modifiers() {
      return _;
    },
    get pluralRules() {
      return O || {};
    },
    get isGlobal() {
      return r;
    },
    get missingWarn() {
      return d;
    },
    set missingWarn(b) {
      d = b, T.missingWarn = d;
    },
    get fallbackWarn() {
      return m;
    },
    set fallbackWarn(b) {
      m = b, T.fallbackWarn = m;
    },
    get fallbackRoot() {
      return p;
    },
    set fallbackRoot(b) {
      p = b;
    },
    get fallbackFormat() {
      return N;
    },
    set fallbackFormat(b) {
      N = b, T.fallbackFormat = N;
    },
    get warnHtmlMessage() {
      return E;
    },
    set warnHtmlMessage(b) {
      E = b, T.warnHtmlMessage = b;
    },
    get escapeParameter() {
      return I;
    },
    set escapeParameter(b) {
      I = b, T.escapeParameter = b;
    },
    t: Dt,
    getLocaleMessage: u,
    setLocaleMessage: y,
    mergeLocaleMessage: M,
    getPostTranslationHandler: be,
    setPostTranslationHandler: Jt,
    getMissingHandler: Ge,
    setMissingHandler: Ct,
    [Ua]: rt
  };
  return ue.datetimeFormats = R, ue.numberFormats = V, ue.rt = Qt, ue.te = _t, ue.tm = h, ue.d = Xt, ue.n = en, ue.getDateTimeFormat = W, ue.setDateTimeFormat = Q, ue.mergeDateTimeFormat = Ze, ue.getNumberFormat = Ke, ue.setNumberFormat = Bi, ue.mergeNumberFormat = Yi, ue[$a] = s, ue[Es] = nn, ue[ys] = pt, ue[vs] = gt, process.env.NODE_ENV !== "production" && (ue[kt] = (b) => {
    T.__v_emitter = b;
  }, ue[pn] = () => {
    T.__v_emitter = void 0;
  }), ue;
}
function mc(t) {
  const e = w(t.locale) ? t.locale : jt, n = w(t.fallbackLocale) || te(t.fallbackLocale) || H(t.fallbackLocale) || t.fallbackLocale === !1 ? t.fallbackLocale : e, s = se(t.missing) ? t.missing : void 0, r = Z(t.silentTranslationWarn) || dt(t.silentTranslationWarn) ? !t.silentTranslationWarn : !0, a = Z(t.silentFallbackWarn) || dt(t.silentFallbackWarn) ? !t.silentFallbackWarn : !0, i = Z(t.fallbackRoot) ? t.fallbackRoot : !0, o = !!t.formatFallbackMessages, l = H(t.modifiers) ? t.modifiers : {}, c = t.pluralizationRules, f = se(t.postTranslation) ? t.postTranslation : void 0, d = w(t.warnHtmlInMessage) ? t.warnHtmlInMessage !== "off" : !0, m = !!t.escapeParameterHtml, p = Z(t.sync) ? t.sync : !0;
  process.env.NODE_ENV !== "production" && t.formatter && he(ke(oe.NOT_SUPPORTED_FORMATTER)), process.env.NODE_ENV !== "production" && t.preserveDirectiveContent && he(ke(oe.NOT_SUPPORTED_PRESERVE_DIRECTIVE));
  let N = t.messages;
  if (H(t.sharedMessages)) {
    const O = t.sharedMessages;
    N = Object.keys(O).reduce((D, F) => {
      const z = D[F] || (D[F] = {});
      return pe(z, O[F]), D;
    }, N || {});
  }
  const { __i18n: S, __root: v, __injectWithOption: g } = t, E = t.datetimeFormats, I = t.numberFormats, _ = t.flatJson;
  return {
    locale: e,
    fallbackLocale: n,
    messages: N,
    flatJson: _,
    datetimeFormats: E,
    numberFormats: I,
    missing: s,
    missingWarn: r,
    fallbackWarn: a,
    fallbackRoot: i,
    fallbackFormat: o,
    modifiers: l,
    pluralRules: c,
    postTranslation: f,
    warnHtmlMessage: d,
    escapeParameter: m,
    messageResolver: t.messageResolver,
    inheritLocale: p,
    __i18n: S,
    __root: v,
    __injectWithOption: g
  };
}
function Is(t = {}, e) {
  {
    const n = Vs(mc(t)), { __extender: s } = t, r = {
      id: n.id,
      get locale() {
        return n.locale.value;
      },
      set locale(a) {
        n.locale.value = a;
      },
      get fallbackLocale() {
        return n.fallbackLocale.value;
      },
      set fallbackLocale(a) {
        n.fallbackLocale.value = a;
      },
      get messages() {
        return n.messages.value;
      },
      get datetimeFormats() {
        return n.datetimeFormats.value;
      },
      get numberFormats() {
        return n.numberFormats.value;
      },
      get availableLocales() {
        return n.availableLocales;
      },
      get formatter() {
        return process.env.NODE_ENV !== "production" && he(ke(oe.NOT_SUPPORTED_FORMATTER)), {
          interpolate() {
            return [];
          }
        };
      },
      set formatter(a) {
        process.env.NODE_ENV !== "production" && he(ke(oe.NOT_SUPPORTED_FORMATTER));
      },
      get missing() {
        return n.getMissingHandler();
      },
      set missing(a) {
        n.setMissingHandler(a);
      },
      get silentTranslationWarn() {
        return Z(n.missingWarn) ? !n.missingWarn : n.missingWarn;
      },
      set silentTranslationWarn(a) {
        n.missingWarn = Z(a) ? !a : a;
      },
      get silentFallbackWarn() {
        return Z(n.fallbackWarn) ? !n.fallbackWarn : n.fallbackWarn;
      },
      set silentFallbackWarn(a) {
        n.fallbackWarn = Z(a) ? !a : a;
      },
      get modifiers() {
        return n.modifiers;
      },
      get formatFallbackMessages() {
        return n.fallbackFormat;
      },
      set formatFallbackMessages(a) {
        n.fallbackFormat = a;
      },
      get postTranslation() {
        return n.getPostTranslationHandler();
      },
      set postTranslation(a) {
        n.setPostTranslationHandler(a);
      },
      get sync() {
        return n.inheritLocale;
      },
      set sync(a) {
        n.inheritLocale = a;
      },
      get warnHtmlInMessage() {
        return n.warnHtmlMessage ? "warn" : "off";
      },
      set warnHtmlInMessage(a) {
        n.warnHtmlMessage = a !== "off";
      },
      get escapeParameterHtml() {
        return n.escapeParameter;
      },
      set escapeParameterHtml(a) {
        n.escapeParameter = a;
      },
      get preserveDirectiveContent() {
        return process.env.NODE_ENV !== "production" && he(ke(oe.NOT_SUPPORTED_PRESERVE_DIRECTIVE)), !0;
      },
      set preserveDirectiveContent(a) {
        process.env.NODE_ENV !== "production" && he(ke(oe.NOT_SUPPORTED_PRESERVE_DIRECTIVE));
      },
      get pluralizationRules() {
        return n.pluralRules || {};
      },
      __composer: n,
      t(...a) {
        const [i, o, l] = a, c = {};
        let f = null, d = null;
        if (!w(i))
          throw de(Y.INVALID_ARGUMENT);
        const m = i;
        return w(o) ? c.locale = o : te(o) ? f = o : H(o) && (d = o), te(l) ? f = l : H(l) && (d = l), Reflect.apply(n.t, n, [
          m,
          f || d || {},
          c
        ]);
      },
      rt(...a) {
        return Reflect.apply(n.rt, n, [...a]);
      },
      tc(...a) {
        const [i, o, l] = a, c = { plural: 1 };
        let f = null, d = null;
        if (!w(i))
          throw de(Y.INVALID_ARGUMENT);
        const m = i;
        return w(o) ? c.locale = o : me(o) ? c.plural = o : te(o) ? f = o : H(o) && (d = o), w(l) ? c.locale = l : te(l) ? f = l : H(l) && (d = l), Reflect.apply(n.t, n, [
          m,
          f || d || {},
          c
        ]);
      },
      te(a, i) {
        return n.te(a, i);
      },
      tm(a) {
        return n.tm(a);
      },
      getLocaleMessage(a) {
        return n.getLocaleMessage(a);
      },
      setLocaleMessage(a, i) {
        n.setLocaleMessage(a, i);
      },
      mergeLocaleMessage(a, i) {
        n.mergeLocaleMessage(a, i);
      },
      d(...a) {
        return Reflect.apply(n.d, n, [...a]);
      },
      getDateTimeFormat(a) {
        return n.getDateTimeFormat(a);
      },
      setDateTimeFormat(a, i) {
        n.setDateTimeFormat(a, i);
      },
      mergeDateTimeFormat(a, i) {
        n.mergeDateTimeFormat(a, i);
      },
      n(...a) {
        return Reflect.apply(n.n, n, [...a]);
      },
      getNumberFormat(a) {
        return n.getNumberFormat(a);
      },
      setNumberFormat(a, i) {
        n.setNumberFormat(a, i);
      },
      mergeNumberFormat(a, i) {
        n.mergeNumberFormat(a, i);
      },
      getChoiceIndex(a, i) {
        return process.env.NODE_ENV !== "production" && he(ke(oe.NOT_SUPPORTED_GET_CHOICE_INDEX)), -1;
      }
    };
    return r.__extender = s, process.env.NODE_ENV !== "production" && (r.__enableEmitter = (a) => {
      const i = n;
      i[kt] && i[kt](a);
    }, r.__disableEmitter = () => {
      const a = n;
      a[pn] && a[pn]();
    }), r;
  }
}
const Us = {
  tag: {
    type: [String, Object]
  },
  locale: {
    type: String
  },
  scope: {
    type: String,
    validator: (t) => t === "parent" || t === "global",
    default: "parent"
  },
  i18n: {
    type: Object
  }
};
function hc({ slots: t }, e) {
  return e.length === 1 && e[0] === "default" ? (t.default ? t.default() : []).reduce((s, r) => [
    ...s,
    ...r.type === tt ? r.children : [r]
  ], []) : e.reduce((n, s) => {
    const r = t[s];
    return r && (n[s] = r()), n;
  }, {});
}
function ja(t) {
  return tt;
}
const gc = /* @__PURE__ */ ge({
  name: "i18n-t",
  props: pe({
    keypath: {
      type: String,
      required: !0
    },
    plural: {
      type: [Number, String],
      validator: (t) => me(t) || !isNaN(t)
    }
  }, Us),
  setup(t, e) {
    const { slots: n, attrs: s } = e, r = t.i18n || zs({
      useScope: t.scope,
      __useComponent: !0
    });
    return () => {
      const a = Object.keys(n).filter((d) => d !== "_"), i = {};
      t.locale && (i.locale = t.locale), t.plural !== void 0 && (i.plural = w(t.plural) ? +t.plural : t.plural);
      const o = hc(e, a), l = r[Es](t.keypath, o, i), c = pe({}, s), f = w(t.tag) || q(t.tag) ? t.tag : ja();
      return ma(f, c, l);
    };
  }
}), ts = gc;
function pc(t) {
  return te(t) && !w(t[0]);
}
function Ha(t, e, n, s) {
  const { slots: r, attrs: a } = e;
  return () => {
    const i = { part: !0 };
    let o = {};
    t.locale && (i.locale = t.locale), w(t.format) ? i.key = t.format : q(t.format) && (w(t.format.key) && (i.key = t.format.key), o = Object.keys(t.format).reduce((m, p) => n.includes(p) ? pe({}, m, { [p]: t.format[p] }) : m, {}));
    const l = s(t.value, i, o);
    let c = [i.key];
    te(l) ? c = l.map((m, p) => {
      const N = r[m.type], S = N ? N({ [m.type]: m.value, index: p, parts: l }) : [m.value];
      return pc(S) && (S[0].key = `${m.type}-${p}`), S;
    }) : w(l) && (c = [l]);
    const f = pe({}, a), d = w(t.tag) || q(t.tag) ? t.tag : ja();
    return ma(d, f, c);
  };
}
const _c = /* @__PURE__ */ ge({
  name: "i18n-n",
  props: pe({
    value: {
      type: Number,
      required: !0
    },
    format: {
      type: [String, Object]
    }
  }, Us),
  setup(t, e) {
    const n = t.i18n || zs({
      useScope: "parent",
      __useComponent: !0
    });
    return Ha(t, e, Pa, (...s) => n[vs](...s));
  }
}), Or = _c, Ec = /* @__PURE__ */ ge({
  name: "i18n-d",
  props: pe({
    value: {
      type: [Number, Date],
      required: !0
    },
    format: {
      type: [String, Object]
    }
  }, Us),
  setup(t, e) {
    const n = t.i18n || zs({
      useScope: "parent",
      __useComponent: !0
    });
    return Ha(t, e, Fa, (...s) => n[ys](...s));
  }
}), kr = Ec;
function yc(t, e) {
  const n = t;
  if (t.mode === "composition")
    return n.__getInstance(e) || t.global;
  {
    const s = n.__getInstance(e);
    return s != null ? s.__composer : t.global.__composer;
  }
}
function vc(t) {
  const e = (i) => {
    const { instance: o, modifiers: l, value: c } = i;
    if (!o || !o.$)
      throw de(Y.UNEXPECTED_ERROR);
    const f = yc(t, o.$);
    process.env.NODE_ENV !== "production" && l.preserve && he(ke(oe.NOT_SUPPORTED_PRESERVE));
    const d = Lr(c);
    return [
      Reflect.apply(f.t, f, [...wr(d)]),
      f
    ];
  };
  return {
    created: (i, o) => {
      const [l, c] = e(o);
      Ye && t.global === c && (i.__i18nWatcher = zt(c.locale, () => {
        o.instance && o.instance.$forceUpdate();
      })), i.__composer = c, i.textContent = l;
    },
    unmounted: (i) => {
      Ye && i.__i18nWatcher && (i.__i18nWatcher(), i.__i18nWatcher = void 0, delete i.__i18nWatcher), i.__composer && (i.__composer = void 0, delete i.__composer);
    },
    beforeUpdate: (i, { value: o }) => {
      if (i.__composer) {
        const l = i.__composer, c = Lr(o);
        i.textContent = Reflect.apply(l.t, l, [
          ...wr(c)
        ]);
      }
    },
    getSSRProps: (i) => {
      const [o] = e(i);
      return { textContent: o };
    }
  };
}
function Lr(t) {
  if (w(t))
    return { path: t };
  if (H(t)) {
    if (!("path" in t))
      throw de(Y.REQUIRED_VALUE, "path");
    return t;
  } else
    throw de(Y.INVALID_VALUE);
}
function wr(t) {
  const { path: e, locale: n, args: s, choice: r, plural: a } = t, i = {}, o = s || {};
  return w(n) && (i.locale = n), me(r) && (i.plural = r), me(a) && (i.plural = a), [e, o, i];
}
function Nc(t, e, ...n) {
  const s = H(n[0]) ? n[0] : {}, r = !!s.useI18nComponentName, a = Z(s.globalInstall) ? s.globalInstall : !0;
  process.env.NODE_ENV !== "production" && a && r && he(ke(oe.COMPONENT_NAME_LEGACY_COMPATIBLE, {
    name: ts.name
  })), a && ([r ? "i18n" : ts.name, "I18nT"].forEach((i) => t.component(i, ts)), [Or.name, "I18nN"].forEach((i) => t.component(i, Or)), [kr.name, "I18nD"].forEach((i) => t.component(i, kr))), t.directive("t", vc(e));
}
const ns = {
  ["vue-devtools-plugin-vue-i18n"]: "Vue I18n devtools",
  ["vue-i18n-resource-inspector"]: "I18n Resources",
  ["vue-i18n-timeline"]: "Vue I18n"
}, Tc = {
  ["vue-i18n-resource-inspector"]: "Search for scopes ..."
}, Ic = {
  ["vue-i18n-timeline"]: 16764185
}, Ga = "vue-i18n: composer properties";
let bs;
async function bc(t, e) {
  return new Promise((n, s) => {
    try {
      oc({
        id: "vue-devtools-plugin-vue-i18n",
        label: ns["vue-devtools-plugin-vue-i18n"],
        packageName: "vue-i18n",
        homepage: "https://vue-i18n.intlify.dev",
        logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
        componentStateTypes: [Ga],
        app: t
      }, (r) => {
        bs = r, r.on.visitComponentTree(({ componentInstance: i, treeNode: o }) => {
          Sc(i, o, e);
        }), r.on.inspectComponent(({ componentInstance: i, instanceData: o }) => {
          i.vnode.el && i.vnode.el.__VUE_I18N__ && o && (e.mode === "legacy" ? i.vnode.el.__VUE_I18N__ !== e.global.__composer && Cr(o, i.vnode.el.__VUE_I18N__) : Cr(o, i.vnode.el.__VUE_I18N__));
        }), r.addInspector({
          id: "vue-i18n-resource-inspector",
          label: ns["vue-i18n-resource-inspector"],
          icon: "language",
          treeFilterPlaceholder: Tc["vue-i18n-resource-inspector"]
        }), r.on.getInspectorTree((i) => {
          i.app === t && i.inspectorId === "vue-i18n-resource-inspector" && Cc(i, e);
        });
        const a = /* @__PURE__ */ new Map();
        r.on.getInspectorState(async (i) => {
          if (i.app === t && i.inspectorId === "vue-i18n-resource-inspector")
            if (r.unhighlightElement(), Mc(i, e), i.nodeId === "global") {
              if (!a.has(i.app)) {
                const [o] = await r.getComponentInstances(i.app);
                a.set(i.app, o);
              }
              r.highlightElement(a.get(i.app));
            } else {
              const o = Dc(i.nodeId, e);
              o && r.highlightElement(o);
            }
        }), r.on.editInspectorState((i) => {
          i.app === t && i.inspectorId === "vue-i18n-resource-inspector" && Fc(i, e);
        }), r.addTimelineLayer({
          id: "vue-i18n-timeline",
          label: ns["vue-i18n-timeline"],
          color: Ic["vue-i18n-timeline"]
        }), n(!0);
      });
    } catch (r) {
      console.error(r), s(!1);
    }
  });
}
function Za(t) {
  return t.type.name || t.type.displayName || t.type.__file || "Anonymous";
}
function Sc(t, e, n) {
  const s = n.mode === "composition" ? n.global : n.global.__composer;
  if (t && t.vnode.el && t.vnode.el.__VUE_I18N__ && t.vnode.el.__VUE_I18N__ !== s) {
    const r = {
      label: `i18n (${Za(t)} Scope)`,
      textColor: 0,
      backgroundColor: 16764185
    };
    e.tags.push(r);
  }
}
function Cr(t, e) {
  const n = Ga;
  t.state.push({
    type: n,
    key: "locale",
    editable: !0,
    value: e.locale.value
  }), t.state.push({
    type: n,
    key: "availableLocales",
    editable: !1,
    value: e.availableLocales
  }), t.state.push({
    type: n,
    key: "fallbackLocale",
    editable: !0,
    value: e.fallbackLocale.value
  }), t.state.push({
    type: n,
    key: "inheritLocale",
    editable: !0,
    value: e.inheritLocale
  }), t.state.push({
    type: n,
    key: "messages",
    editable: !1,
    value: $s(e.messages.value)
  }), t.state.push({
    type: n,
    key: "datetimeFormats",
    editable: !1,
    value: e.datetimeFormats.value
  }), t.state.push({
    type: n,
    key: "numberFormats",
    editable: !1,
    value: e.numberFormats.value
  });
}
function $s(t) {
  const e = {};
  return Object.keys(t).forEach((n) => {
    const s = t[n];
    se(s) && "source" in s ? e[n] = wc(s) : Ot(s) && s.loc && s.loc.source ? e[n] = s.loc.source : q(s) ? e[n] = $s(s) : e[n] = s;
  }), e;
}
const Oc = {
  "<": "&lt;",
  ">": "&gt;",
  '"': "&quot;",
  "&": "&amp;"
};
function kc(t) {
  return t.replace(/[<>"&]/g, Lc);
}
function Lc(t) {
  return Oc[t] || t;
}
function wc(t) {
  return {
    _custom: {
      type: "function",
      display: `<span>\u0192</span> ${t.source ? `("${kc(t.source)}")` : "(?)"}`
    }
  };
}
function Cc(t, e) {
  t.rootNodes.push({
    id: "global",
    label: "Global Scope"
  });
  const n = e.mode === "composition" ? e.global : e.global.__composer;
  for (const [s, r] of e.__instances) {
    const a = e.mode === "composition" ? r : r.__composer;
    n !== a && t.rootNodes.push({
      id: a.id.toString(),
      label: `${Za(s)} Scope`
    });
  }
}
function Dc(t, e) {
  let n = null;
  if (t !== "global") {
    for (const [s, r] of e.__instances.entries())
      if (r.id.toString() === t) {
        n = s;
        break;
      }
  }
  return n;
}
function Ba(t, e) {
  if (t === "global")
    return e.mode === "composition" ? e.global : e.global.__composer;
  {
    const n = Array.from(e.__instances.values()).find((s) => s.id.toString() === t);
    return n ? e.mode === "composition" ? n : n.__composer : null;
  }
}
function Mc(t, e) {
  const n = Ba(t.nodeId, e);
  return n && (t.state = Ac(n)), null;
}
function Ac(t) {
  const e = {}, n = "Locale related info", s = [
    {
      type: n,
      key: "locale",
      editable: !0,
      value: t.locale.value
    },
    {
      type: n,
      key: "fallbackLocale",
      editable: !0,
      value: t.fallbackLocale.value
    },
    {
      type: n,
      key: "availableLocales",
      editable: !1,
      value: t.availableLocales
    },
    {
      type: n,
      key: "inheritLocale",
      editable: !0,
      value: t.inheritLocale
    }
  ];
  e[n] = s;
  const r = "Locale messages info", a = [
    {
      type: r,
      key: "messages",
      editable: !1,
      value: $s(t.messages.value)
    }
  ];
  e[r] = a;
  {
    const i = "Datetime formats info", o = [
      {
        type: i,
        key: "datetimeFormats",
        editable: !1,
        value: t.datetimeFormats.value
      }
    ];
    e[i] = o;
    const l = "Datetime formats info", c = [
      {
        type: l,
        key: "numberFormats",
        editable: !1,
        value: t.numberFormats.value
      }
    ];
    e[l] = c;
  }
  return e;
}
function _n(t, e) {
  if (bs) {
    let n;
    e && "groupId" in e && (n = e.groupId, delete e.groupId), bs.addTimelineEvent({
      layerId: "vue-i18n-timeline",
      event: {
        title: t,
        groupId: n,
        time: Date.now(),
        meta: {},
        data: e || {},
        logType: t === "compile-error" ? "error" : t === "fallback" || t === "missing" ? "warning" : "default"
      }
    });
  }
}
function Fc(t, e) {
  const n = Ba(t.nodeId, e);
  if (n) {
    const [s] = t.path;
    s === "locale" && w(t.state.value) ? n.locale.value = t.state.value : s === "fallbackLocale" && (w(t.state.value) || te(t.state.value) || q(t.state.value)) ? n.fallbackLocale.value = t.state.value : s === "inheritLocale" && Z(t.state.value) && (n.inheritLocale = t.state.value);
  }
}
function Pc(t, e, n) {
  return {
    beforeCreate() {
      const s = hn();
      if (!s)
        throw de(Y.UNEXPECTED_ERROR);
      const r = this.$options;
      if (r.i18n) {
        const a = r.i18n;
        if (r.__i18n && (a.__i18n = r.__i18n), a.__root = e, this === this.$root)
          this.$i18n = Dr(t, a);
        else {
          a.__injectWithOption = !0, a.__extender = n.__vueI18nExtend, this.$i18n = Is(a);
          const i = this.$i18n;
          i.__extender && (i.__disposer = i.__extender(this.$i18n));
        }
      } else if (r.__i18n)
        if (this === this.$root)
          this.$i18n = Dr(t, r);
        else {
          this.$i18n = Is({
            __i18n: r.__i18n,
            __injectWithOption: !0,
            __extender: n.__vueI18nExtend,
            __root: e
          });
          const a = this.$i18n;
          a.__extender && (a.__disposer = a.__extender(this.$i18n));
        }
      else
        this.$i18n = t;
      r.__i18nGlobal && Wa(e, r, r), this.$t = (...a) => this.$i18n.t(...a), this.$rt = (...a) => this.$i18n.rt(...a), this.$tc = (...a) => this.$i18n.tc(...a), this.$te = (a, i) => this.$i18n.te(a, i), this.$d = (...a) => this.$i18n.d(...a), this.$n = (...a) => this.$i18n.n(...a), this.$tm = (a) => this.$i18n.tm(a), n.__setInstance(s, this.$i18n);
    },
    mounted() {
      if ((process.env.NODE_ENV !== "production" || !1) && !0 && this.$el && this.$i18n) {
        const s = this.$i18n;
        this.$el.__VUE_I18N__ = s.__composer;
        const r = this.__v_emitter = Fs();
        s.__enableEmitter && s.__enableEmitter(r), r.on("*", _n);
      }
    },
    unmounted() {
      const s = hn();
      if (!s)
        throw de(Y.UNEXPECTED_ERROR);
      const r = this.$i18n;
      (process.env.NODE_ENV !== "production" || !1) && !0 && this.$el && this.$el.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*", _n), delete this.__v_emitter), this.$i18n && (r.__disableEmitter && r.__disableEmitter(), delete this.$el.__VUE_I18N__)), delete this.$t, delete this.$rt, delete this.$tc, delete this.$te, delete this.$d, delete this.$n, delete this.$tm, r.__disposer && (r.__disposer(), delete r.__disposer, delete r.__extender), n.__deleteInstance(s), delete this.$i18n;
    }
  };
}
function Dr(t, e) {
  t.locale = e.locale || t.locale, t.fallbackLocale = e.fallbackLocale || t.fallbackLocale, t.missing = e.missing || t.missing, t.silentTranslationWarn = e.silentTranslationWarn || t.silentFallbackWarn, t.silentFallbackWarn = e.silentFallbackWarn || t.silentFallbackWarn, t.formatFallbackMessages = e.formatFallbackMessages || t.formatFallbackMessages, t.postTranslation = e.postTranslation || t.postTranslation, t.warnHtmlInMessage = e.warnHtmlInMessage || t.warnHtmlInMessage, t.escapeParameterHtml = e.escapeParameterHtml || t.escapeParameterHtml, t.sync = e.sync || t.sync, t.__composer[Ua](e.pluralizationRules || t.pluralizationRules);
  const n = Zn(t.locale, {
    messages: e.messages,
    __i18n: e.__i18n
  });
  return Object.keys(n).forEach((s) => t.mergeLocaleMessage(s, n[s])), e.datetimeFormats && Object.keys(e.datetimeFormats).forEach((s) => t.mergeDateTimeFormat(s, e.datetimeFormats[s])), e.numberFormats && Object.keys(e.numberFormats).forEach((s) => t.mergeNumberFormat(s, e.numberFormats[s])), t;
}
const xc = /* @__PURE__ */ je("global-vue-i18n");
function Rc(t = {}, e) {
  const n = __VUE_I18N_LEGACY_API__ && Z(t.legacy) ? t.legacy : __VUE_I18N_LEGACY_API__, s = Z(t.globalInjection) ? t.globalInjection : !0, r = __VUE_I18N_LEGACY_API__ && n ? !!t.allowComposition : !0, a = /* @__PURE__ */ new Map(), [i, o] = Vc(t, n), l = /* @__PURE__ */ je(process.env.NODE_ENV !== "production" ? "vue-i18n" : "");
  process.env.NODE_ENV !== "production" && n && r && he(ke(oe.NOTICE_DROP_ALLOW_COMPOSITION));
  function c(m) {
    return a.get(m) || null;
  }
  function f(m, p) {
    a.set(m, p);
  }
  function d(m) {
    a.delete(m);
  }
  {
    const m = {
      get mode() {
        return __VUE_I18N_LEGACY_API__ && n ? "legacy" : "composition";
      },
      get allowComposition() {
        return r;
      },
      async install(p, ...N) {
        if (process.env.NODE_ENV !== "production" && (p.__VUE_I18N__ = m), p.__VUE_I18N_SYMBOL__ = l, p.provide(p.__VUE_I18N_SYMBOL__, m), H(N[0])) {
          const g = N[0];
          m.__composerExtend = g.__composerExtend, m.__vueI18nExtend = g.__vueI18nExtend;
        }
        let S = null;
        !n && s && (S = Bc(p, m.global)), __VUE_I18N_FULL_INSTALL__ && Nc(p, m, ...N), __VUE_I18N_LEGACY_API__ && n && p.mixin(Pc(o, o.__composer, m));
        const v = p.unmount;
        if (p.unmount = () => {
          S && S(), m.dispose(), v();
        }, process.env.NODE_ENV !== "production" || !1) {
          if (!await bc(p, m))
            throw de(Y.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
          const E = Fs();
          if (n) {
            const I = o;
            I.__enableEmitter && I.__enableEmitter(E);
          } else {
            const I = o;
            I[kt] && I[kt](E);
          }
          E.on("*", _n);
        }
      },
      get global() {
        return o;
      },
      dispose() {
        i.stop();
      },
      __instances: a,
      __getInstance: c,
      __setInstance: f,
      __deleteInstance: d
    };
    return m;
  }
}
function zs(t = {}) {
  const e = hn();
  if (e == null)
    throw de(Y.MUST_BE_CALL_SETUP_TOP);
  if (!e.isCE && e.appContext.app != null && !e.appContext.app.__VUE_I18N_SYMBOL__)
    throw de(Y.NOT_INSTALLED);
  const n = Uc(e), s = zc(n), r = za(e), a = $c(t, r);
  if (__VUE_I18N_LEGACY_API__ && n.mode === "legacy" && !t.__useComponent) {
    if (!n.allowComposition)
      throw de(Y.NOT_AVAILABLE_IN_LEGACY_MODE);
    return Gc(e, a, s, t);
  }
  if (a === "global")
    return Wa(s, t, r), s;
  if (a === "parent") {
    let l = Wc(n, e, t.__useComponent);
    return l == null && (process.env.NODE_ENV !== "production" && he(ke(oe.NOT_FOUND_PARENT_SCOPE)), l = s), l;
  }
  const i = n;
  let o = i.__getInstance(e);
  if (o == null) {
    const l = pe({}, t);
    "__i18n" in r && (l.__i18n = r.__i18n), s && (l.__root = s), o = Vs(l), i.__composerExtend && (o[Ns] = i.__composerExtend(o)), Hc(i, e, o), i.__setInstance(e, o);
  }
  return o;
}
function Vc(t, e, n) {
  const s = Qi();
  {
    const r = __VUE_I18N_LEGACY_API__ && e ? s.run(() => Is(t)) : s.run(() => Vs(t));
    if (r == null)
      throw de(Y.UNEXPECTED_ERROR);
    return [s, r];
  }
}
function Uc(t) {
  {
    const e = Xi(t.isCE ? xc : t.appContext.app.__VUE_I18N_SYMBOL__);
    if (!e)
      throw de(t.isCE ? Y.NOT_INSTALLED_WITH_PROVIDE : Y.UNEXPECTED_ERROR);
    return e;
  }
}
function $c(t, e) {
  return jn(t) ? "__i18n" in e ? "local" : "global" : t.useScope ? t.useScope : "local";
}
function zc(t) {
  return t.mode === "composition" ? t.global : t.global.__composer;
}
function Wc(t, e, n = !1) {
  let s = null;
  const r = e.root;
  let a = jc(e, n);
  for (; a != null; ) {
    const i = t;
    if (t.mode === "composition")
      s = i.__getInstance(a);
    else if (__VUE_I18N_LEGACY_API__) {
      const o = i.__getInstance(a);
      o != null && (s = o.__composer, n && s && !s[$a] && (s = null));
    }
    if (s != null || r === a)
      break;
    a = a.parent;
  }
  return s;
}
function jc(t, e = !1) {
  return t == null ? null : e && t.vnode.ctx || t.parent;
}
function Hc(t, e, n) {
  let s = null;
  st(() => {
    if ((process.env.NODE_ENV !== "production" || !1) && !0 && e.vnode.el) {
      e.vnode.el.__VUE_I18N__ = n, s = Fs();
      const r = n;
      r[kt] && r[kt](s), s.on("*", _n);
    }
  }, e), ha(() => {
    const r = n;
    (process.env.NODE_ENV !== "production" || !1) && !0 && e.vnode.el && e.vnode.el.__VUE_I18N__ && (s && s.off("*", _n), r[pn] && r[pn](), delete e.vnode.el.__VUE_I18N__), t.__deleteInstance(e);
    const a = r[Ns];
    a && (a(), delete r[Ns]);
  }, e);
}
function Gc(t, e, n, s = {}) {
  const r = e === "local", a = ga(null);
  if (r && t.proxy && !(t.proxy.$options.i18n || t.proxy.$options.__i18n))
    throw de(Y.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);
  const i = Z(s.inheritLocale) ? s.inheritLocale : !w(s.locale), o = A(
    !r || i ? n.locale.value : w(s.locale) ? s.locale : jt
  ), l = A(
    !r || i ? n.fallbackLocale.value : w(s.fallbackLocale) || te(s.fallbackLocale) || H(s.fallbackLocale) || s.fallbackLocale === !1 ? s.fallbackLocale : o.value
  ), c = A(Zn(o.value, s)), f = A(H(s.datetimeFormats) ? s.datetimeFormats : { [o.value]: {} }), d = A(H(s.numberFormats) ? s.numberFormats : { [o.value]: {} }), m = r ? n.missingWarn : Z(s.missingWarn) || dt(s.missingWarn) ? s.missingWarn : !0, p = r ? n.fallbackWarn : Z(s.fallbackWarn) || dt(s.fallbackWarn) ? s.fallbackWarn : !0, N = r ? n.fallbackRoot : Z(s.fallbackRoot) ? s.fallbackRoot : !0, S = !!s.fallbackFormat, v = se(s.missing) ? s.missing : null, g = se(s.postTranslation) ? s.postTranslation : null, E = r ? n.warnHtmlMessage : Z(s.warnHtmlMessage) ? s.warnHtmlMessage : !0, I = !!s.escapeParameter, _ = r ? n.modifiers : H(s.modifiers) ? s.modifiers : {}, O = s.pluralRules || r && n.pluralRules;
  function T() {
    return [
      o.value,
      l.value,
      c.value,
      f.value,
      d.value
    ];
  }
  const D = Me({
    get: () => a.value ? a.value.locale.value : o.value,
    set: (u) => {
      a.value && (a.value.locale.value = u), o.value = u;
    }
  }), F = Me({
    get: () => a.value ? a.value.fallbackLocale.value : l.value,
    set: (u) => {
      a.value && (a.value.fallbackLocale.value = u), l.value = u;
    }
  }), z = Me(() => a.value ? a.value.messages.value : c.value), G = Me(() => f.value), P = Me(() => d.value);
  function R() {
    return a.value ? a.value.getPostTranslationHandler() : g;
  }
  function V(u) {
    a.value && a.value.setPostTranslationHandler(u);
  }
  function be() {
    return a.value ? a.value.getMissingHandler() : v;
  }
  function Jt(u) {
    a.value && a.value.setMissingHandler(u);
  }
  function Ge(u) {
    return T(), u();
  }
  function Ct(...u) {
    return a.value ? Ge(() => Reflect.apply(a.value.t, null, [...u])) : Ge(() => "");
  }
  function qt(...u) {
    return a.value ? Reflect.apply(a.value.rt, null, [...u]) : "";
  }
  function Re(...u) {
    return a.value ? Ge(() => Reflect.apply(a.value.d, null, [...u])) : Ge(() => "");
  }
  function Dt(...u) {
    return a.value ? Ge(() => Reflect.apply(a.value.n, null, [...u])) : Ge(() => "");
  }
  function Qt(u) {
    return a.value ? a.value.tm(u) : {};
  }
  function Xt(u, y) {
    return a.value ? a.value.te(u, y) : !1;
  }
  function en(u) {
    return a.value ? a.value.getLocaleMessage(u) : {};
  }
  function Mt(u, y) {
    a.value && (a.value.setLocaleMessage(u, y), c.value[u] = y);
  }
  function Tn(u, y) {
    a.value && a.value.mergeLocaleMessage(u, y);
  }
  function tn(u) {
    return a.value ? a.value.getDateTimeFormat(u) : {};
  }
  function nn(u, y) {
    a.value && (a.value.setDateTimeFormat(u, y), f.value[u] = y);
  }
  function gt(u, y) {
    a.value && a.value.mergeDateTimeFormat(u, y);
  }
  function pt(u) {
    return a.value ? a.value.getNumberFormat(u) : {};
  }
  function rt(u, y) {
    a.value && (a.value.setNumberFormat(u, y), d.value[u] = y);
  }
  function _t(u, y) {
    a.value && a.value.mergeNumberFormat(u, y);
  }
  const sn = {
    get id() {
      return a.value ? a.value.id : -1;
    },
    locale: D,
    fallbackLocale: F,
    messages: z,
    datetimeFormats: G,
    numberFormats: P,
    get inheritLocale() {
      return a.value ? a.value.inheritLocale : i;
    },
    set inheritLocale(u) {
      a.value && (a.value.inheritLocale = u);
    },
    get availableLocales() {
      return a.value ? a.value.availableLocales : Object.keys(c.value);
    },
    get modifiers() {
      return a.value ? a.value.modifiers : _;
    },
    get pluralRules() {
      return a.value ? a.value.pluralRules : O;
    },
    get isGlobal() {
      return a.value ? a.value.isGlobal : !1;
    },
    get missingWarn() {
      return a.value ? a.value.missingWarn : m;
    },
    set missingWarn(u) {
      a.value && (a.value.missingWarn = u);
    },
    get fallbackWarn() {
      return a.value ? a.value.fallbackWarn : p;
    },
    set fallbackWarn(u) {
      a.value && (a.value.missingWarn = u);
    },
    get fallbackRoot() {
      return a.value ? a.value.fallbackRoot : N;
    },
    set fallbackRoot(u) {
      a.value && (a.value.fallbackRoot = u);
    },
    get fallbackFormat() {
      return a.value ? a.value.fallbackFormat : S;
    },
    set fallbackFormat(u) {
      a.value && (a.value.fallbackFormat = u);
    },
    get warnHtmlMessage() {
      return a.value ? a.value.warnHtmlMessage : E;
    },
    set warnHtmlMessage(u) {
      a.value && (a.value.warnHtmlMessage = u);
    },
    get escapeParameter() {
      return a.value ? a.value.escapeParameter : I;
    },
    set escapeParameter(u) {
      a.value && (a.value.escapeParameter = u);
    },
    t: Ct,
    getPostTranslationHandler: R,
    setPostTranslationHandler: V,
    getMissingHandler: be,
    setMissingHandler: Jt,
    rt: qt,
    d: Re,
    n: Dt,
    tm: Qt,
    te: Xt,
    getLocaleMessage: en,
    setLocaleMessage: Mt,
    mergeLocaleMessage: Tn,
    getDateTimeFormat: tn,
    setDateTimeFormat: nn,
    mergeDateTimeFormat: gt,
    getNumberFormat: pt,
    setNumberFormat: rt,
    mergeNumberFormat: _t
  };
  function h(u) {
    u.locale.value = o.value, u.fallbackLocale.value = l.value, Object.keys(c.value).forEach((y) => {
      u.mergeLocaleMessage(y, c.value[y]);
    }), Object.keys(f.value).forEach((y) => {
      u.mergeDateTimeFormat(y, f.value[y]);
    }), Object.keys(d.value).forEach((y) => {
      u.mergeNumberFormat(y, d.value[y]);
    }), u.escapeParameter = I, u.fallbackFormat = S, u.fallbackRoot = N, u.fallbackWarn = p, u.missingWarn = m, u.warnHtmlMessage = E;
  }
  return eo(() => {
    if (t.proxy == null || t.proxy.$i18n == null)
      throw de(Y.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);
    const u = a.value = t.proxy.$i18n.__composer;
    e === "global" ? (o.value = u.locale.value, l.value = u.fallbackLocale.value, c.value = u.messages.value, f.value = u.datetimeFormats.value, d.value = u.numberFormats.value) : r && h(u);
  }), sn;
}
const Zc = [
  "locale",
  "fallbackLocale",
  "availableLocales"
], Mr = ["t", "rt", "d", "n", "tm", "te"];
function Bc(t, e) {
  const n = /* @__PURE__ */ Object.create(null);
  return Zc.forEach((r) => {
    const a = Object.getOwnPropertyDescriptor(e, r);
    if (!a)
      throw de(Y.UNEXPECTED_ERROR);
    const i = qe(a.value) ? {
      get() {
        return a.value.value;
      },
      set(o) {
        a.value.value = o;
      }
    } : {
      get() {
        return a.get && a.get();
      }
    };
    Object.defineProperty(n, r, i);
  }), t.config.globalProperties.$i18n = n, Mr.forEach((r) => {
    const a = Object.getOwnPropertyDescriptor(e, r);
    if (!a || !a.value)
      throw de(Y.UNEXPECTED_ERROR);
    Object.defineProperty(t.config.globalProperties, `$${r}`, a);
  }), () => {
    delete t.config.globalProperties.$i18n, Mr.forEach((r) => {
      delete t.config.globalProperties[`$${r}`];
    });
  };
}
cc();
__INTLIFY_JIT_COMPILATION__ ? ur(Yl) : ur(Bl);
Ul(vl);
$l(va);
if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
  const t = Qe();
  t.__INTLIFY__ = !0, wl(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__);
}
process.env.NODE_ENV;
const Ie = (t) => Rc({
  legacy: !1,
  locale: t,
  fallbackLocale: "fr",
  globalInjection: !0,
  messages: co
}), Yc = { class: "az-search-container" }, Kc = {
  key: 0,
  class: "az-bg-grey-50 az-rounded-200",
  style: { height: "8px", overflow: "hidden", "margin-bottom": "16px", "min-height": "8px" }
}, Jc = { class: "az-body-2 az-font-medium" }, qc = ["id"], He = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    position: {},
    title: {},
    counter: {},
    pageId: {},
    displayPosition: { type: Boolean, default: !0 },
    displayStepper: { type: Boolean, default: !0 }
  },
  setup(t) {
    const e = Me(() => 100 * (n.position + 1) / n.counter), n = t;
    return (s, r) => (j(), re("div", Yc, [
      n.displayStepper ? (j(), re("div", Kc, [
        x("div", {
          class: "az-bg-primary-500 az-h-full",
          style: no("width:" + e.value + "%")
        }, null, 4)
      ])) : ee("", !0),
      x("div", Jc, [
        n.displayPosition ? (j(), re(tt, { key: 0 }, [
          Ut(ce(n.position + 1) + " -", 1)
        ], 64)) : ee("", !0),
        Ut(" " + ce(n.title), 1)
      ]),
      x("div", {
        id: n.pageId,
        class: "az-h-full az-w-full"
      }, [
        so(s.$slots, "default")
      ], 8, qc)
    ]));
  }
}), Qc = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    api: {},
    organisationEmail: {},
    connectedUser: {},
    acl: {},
    locale: {},
    position: {},
    counter: {},
    possibleCompaniesId: {}
  },
  emits: ["onReady", "onSelect", "onError"],
  setup(t, { expose: e, emit: n }) {
    const s = t, r = Ie(s.locale), a = n;
    async function i(f) {
      let d = f;
      const m = async (p, N) => {
        const S = await Promise.all(p.map(N));
        return p.filter((v, g) => S[g]);
      };
      return s.possibleCompaniesId && (d = d.filter((p) => {
        var N;
        return p.id && ((N = s.possibleCompaniesId) == null ? void 0 : N.includes(p.id));
      })), s.acl && (d = await m(d, async (p) => await s.acl.can("createAppointment", p.id) || await s.acl.can("createStaffAppointment", p.id))), d;
    }
    function o(f) {
      a("onSelect", f);
    }
    const l = A();
    function c() {
      Wn(() => {
        var f, d;
        (f = l == null ? void 0 : l.value) != null && f.focus && ((d = l == null ? void 0 : l.value) == null || d.focus());
      });
    }
    return st(() => {
      c(), a("onReady");
    }), e({ focus: c }), (f, d) => (j(), ae(He, {
      pageId: "booking-widget-page-company-search",
      api: s.api,
      counter: s.counter,
      locale: s.locale,
      position: s.position,
      title: k(r).global.t("event-booking-widget.title.company")
    }, {
      default: Ne(() => [
        Xe(k(_o), {
          id: "booking-widget-company",
          ref_key: "companySearch",
          ref: l,
          api: s.api,
          filter: i,
          locale: s.locale,
          organisationEmail: s.organisationEmail,
          "show-title": !1,
          onSelect: o
        }, null, 8, ["api", "locale", "organisationEmail"])
      ]),
      _: 1
    }, 8, ["api", "counter", "locale", "position", "title"]));
  }
}), Xc = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    api: {},
    acl: {},
    connectedUser: {},
    locale: {},
    position: {},
    counter: {},
    company: {},
    service: {}
  },
  emits: ["onReady", "onSelect", "onError"],
  setup(t, { expose: e, emit: n }) {
    const s = t, r = Ie(s.locale), a = n, i = A(s.service);
    zt(() => s.service, (d) => {
      i.value = d;
    });
    async function o(d) {
      if (s.connectedUser.staffIds === void 0)
        return [];
      let m = d;
      return i.value && d.length > 0 ? (i.value.staffsSkill !== void 0 && i.value.staffsSkill.length > 0 || d.filter((N) => {
        var S;
        return N.servicesSkill !== void 0 && ((S = N.servicesSkill) == null ? void 0 : S.length) > 0;
      }).length > 0) && (m = d.filter((N) => N.servicesSkill.includes(i.value.id) && N.availableForWidget)) : m = d.filter((p) => p.availableForWidget), m.length > 0 && s.acl && !await s.acl.can("createAppointment", s.company.id) && (m = m.filter((p) => s.connectedUser.staffIds.includes(p.id))), m;
    }
    function l(d) {
      a("onSelect", d);
    }
    const c = A();
    function f() {
      var d, m;
      (d = c.value) != null && d.focus && ((m = c.value) == null || m.focus());
    }
    return e({ focus: f }), st(() => {
      f(), a("onReady");
    }), (d, m) => (j(), ae(He, {
      pageId: "booking-widget-page-staff-search",
      position: s.position,
      locale: s.locale,
      counter: s.counter,
      title: k(r).global.t("event-booking-widget.title.staff"),
      api: s.api
    }, {
      default: Ne(() => [
        s.company ? (j(), ae(k(Eo), {
          key: 0,
          id: "booking-widget-staff",
          ref_key: "staffSearch",
          ref: c,
          api: s.api,
          locale: s.locale,
          companyId: s.company.id,
          "show-title": !1,
          filter: o,
          onSelect: l
        }, null, 8, ["api", "locale", "companyId"])) : ee("", !0)
      ]),
      _: 1
    }, 8, ["position", "locale", "counter", "title", "api"]));
  }
}), eu = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    api: {},
    locale: {},
    position: {},
    counter: {},
    company: {},
    staff: {}
  },
  emits: ["onReady", "onSelect", "onError"],
  setup(t, { expose: e, emit: n }) {
    const s = t, r = Ie(s.locale), a = n, i = A(s.staff);
    zt(() => s.staff, (d) => {
      i.value = d;
    });
    async function o(d) {
      return i.value && d.length > 0 && (i.value.servicesSkill !== void 0 && i.value.servicesSkill.length > 0 || d.filter((p) => {
        var N;
        return p.staffsSkill !== void 0 && ((N = p.staffsSkill) == null ? void 0 : N.length) > 0;
      }).length > 0) ? d.filter((p) => {
        var N, S;
        return (S = (N = i.value) == null ? void 0 : N.servicesSkill) == null ? void 0 : S.includes(p.id);
      }) : d;
    }
    function l(d) {
      a("onSelect", d);
    }
    const c = A();
    function f() {
      var d, m;
      (d = c.value) != null && d.focus && ((m = c.value) == null || m.focus());
    }
    return st(() => {
      f(), a("onReady");
    }), e({ focus: f }), (d, m) => (j(), ae(He, {
      pageId: "booking-widget-page-service-search",
      position: s.position,
      locale: s.locale,
      counter: s.counter,
      title: k(r).global.t("event-booking-widget.title.service"),
      api: s.api
    }, {
      default: Ne(() => [
        s.company ? (j(), ae(k(yo), {
          key: 0,
          id: "booking-widget-service",
          ref_key: "serviceSearch",
          ref: c,
          api: s.api,
          "company-id": s.company.id,
          locale: s.locale,
          onSelect: l,
          filter: o,
          "show-title": !1
        }, null, 8, ["api", "company-id", "locale"])) : ee("", !0)
      ]),
      _: 1
    }, 8, ["position", "locale", "counter", "title", "api"]));
  }
}), tu = { class: "az-flex az-gap-2 az-flex-wrap" }, nu = ["onClick"], Ar = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    locale: {},
    hours: {},
    maxDefaultDisplay: { default: 3 },
    timeZone: {}
  },
  emits: ["onDateSelect"],
  setup(t, { emit: e }) {
    const n = t;
    Ie(n.locale);
    const s = e, r = A(!1);
    function a(o) {
      return new Date(o.toLocaleString("en-US", { timeZone: n.timeZone })).toLocaleTimeString(n.locale, { hour: "2-digit", minute: "2-digit" });
    }
    function i(o) {
      s("onDateSelect", o);
    }
    return (o, l) => (j(), re("div", tu, [
      (j(!0), re(tt, null, fs(n.hours, (c, f) => (j(), re(tt, null, [
        f < n.maxDefaultDisplay || r.value ? (j(), re("button", {
          key: 0,
          class: "az-btn az-btn-color-neutral",
          onClick: (d) => i(c)
        }, ce(a(c)), 9, nu)) : ee("", !0)
      ], 64))), 256)),
      !r.value && n.hours.length > n.maxDefaultDisplay ? (j(), re("button", {
        key: 0,
        class: "az-btn az-btn-color-neutral",
        onClick: l[0] || (l[0] = (c) => r.value = !0)
      }, "... ")) : ee("", !0)
    ]));
  }
});
class wt extends Error {
}
class su extends wt {
  constructor(e) {
    super(`Invalid DateTime: ${e.toMessage()}`);
  }
}
class ru extends wt {
  constructor(e) {
    super(`Invalid Interval: ${e.toMessage()}`);
  }
}
class au extends wt {
  constructor(e) {
    super(`Invalid Duration: ${e.toMessage()}`);
  }
}
class cn extends wt {
}
class Ya extends wt {
  constructor(e) {
    super(`Invalid unit ${e}`);
  }
}
class De extends wt {
}
class ot extends wt {
  constructor() {
    super("Zone is an abstract class");
  }
}
const C = "numeric", We = "short", we = "long", Vn = {
  year: C,
  month: C,
  day: C
}, Ka = {
  year: C,
  month: We,
  day: C
}, iu = {
  year: C,
  month: We,
  day: C,
  weekday: We
}, Ja = {
  year: C,
  month: we,
  day: C
}, qa = {
  year: C,
  month: we,
  day: C,
  weekday: we
}, Qa = {
  hour: C,
  minute: C
}, Xa = {
  hour: C,
  minute: C,
  second: C
}, ei = {
  hour: C,
  minute: C,
  second: C,
  timeZoneName: We
}, ti = {
  hour: C,
  minute: C,
  second: C,
  timeZoneName: we
}, ni = {
  hour: C,
  minute: C,
  hourCycle: "h23"
}, si = {
  hour: C,
  minute: C,
  second: C,
  hourCycle: "h23"
}, ri = {
  hour: C,
  minute: C,
  second: C,
  hourCycle: "h23",
  timeZoneName: We
}, ai = {
  hour: C,
  minute: C,
  second: C,
  hourCycle: "h23",
  timeZoneName: we
}, ii = {
  year: C,
  month: C,
  day: C,
  hour: C,
  minute: C
}, oi = {
  year: C,
  month: C,
  day: C,
  hour: C,
  minute: C,
  second: C
}, li = {
  year: C,
  month: We,
  day: C,
  hour: C,
  minute: C
}, ci = {
  year: C,
  month: We,
  day: C,
  hour: C,
  minute: C,
  second: C
}, ou = {
  year: C,
  month: We,
  day: C,
  weekday: We,
  hour: C,
  minute: C
}, ui = {
  year: C,
  month: we,
  day: C,
  hour: C,
  minute: C,
  timeZoneName: We
}, fi = {
  year: C,
  month: we,
  day: C,
  hour: C,
  minute: C,
  second: C,
  timeZoneName: We
}, di = {
  year: C,
  month: we,
  day: C,
  weekday: we,
  hour: C,
  minute: C,
  timeZoneName: we
}, mi = {
  year: C,
  month: we,
  day: C,
  weekday: we,
  hour: C,
  minute: C,
  second: C,
  timeZoneName: we
};
class En {
  get type() {
    throw new ot();
  }
  get name() {
    throw new ot();
  }
  get ianaName() {
    return this.name;
  }
  get isUniversal() {
    throw new ot();
  }
  offsetName(e, n) {
    throw new ot();
  }
  formatOffset(e, n) {
    throw new ot();
  }
  offset(e) {
    throw new ot();
  }
  equals(e) {
    throw new ot();
  }
  get isValid() {
    throw new ot();
  }
}
let ss = null;
class Bn extends En {
  static get instance() {
    return ss === null && (ss = new Bn()), ss;
  }
  get type() {
    return "system";
  }
  get name() {
    return new Intl.DateTimeFormat().resolvedOptions().timeZone;
  }
  get isUniversal() {
    return !1;
  }
  offsetName(e, { format: n, locale: s }) {
    return gi(e, n, s);
  }
  formatOffset(e, n) {
    return mn(this.offset(e), n);
  }
  offset(e) {
    return -new Date(e).getTimezoneOffset();
  }
  equals(e) {
    return e.type === "system";
  }
  get isValid() {
    return !0;
  }
}
let An = {};
function lu(t) {
  return An[t] || (An[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"
  })), An[t];
}
const cu = {
  year: 0,
  month: 1,
  day: 2,
  era: 3,
  hour: 4,
  minute: 5,
  second: 6
};
function uu(t, e) {
  const n = t.format(e).replace(/\u200E/g, ""), s = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n), [, r, a, i, o, l, c, f] = s;
  return [i, r, a, o, l, c, f];
}
function fu(t, e) {
  const n = t.formatToParts(e), s = [];
  for (let r = 0; r < n.length; r++) {
    const { type: a, value: i } = n[r], o = cu[a];
    a === "era" ? s[o] = i : B(o) || (s[o] = parseInt(i, 10));
  }
  return s;
}
let On = {};
class nt extends En {
  static create(e) {
    return On[e] || (On[e] = new nt(e)), On[e];
  }
  static resetCache() {
    On = {}, An = {};
  }
  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 = nt.isValidZone(e);
  }
  get type() {
    return "iana";
  }
  get name() {
    return this.zoneName;
  }
  get isUniversal() {
    return !1;
  }
  offsetName(e, { format: n, locale: s }) {
    return gi(e, n, s, this.name);
  }
  formatOffset(e, n) {
    return mn(this.offset(e), n);
  }
  offset(e) {
    const n = new Date(e);
    if (isNaN(n))
      return NaN;
    const s = lu(this.name);
    let [r, a, i, o, l, c, f] = s.formatToParts ? fu(s, n) : uu(s, n);
    o === "BC" && (r = -Math.abs(r) + 1);
    const m = Kn({
      year: r,
      month: a,
      day: i,
      hour: l === 24 ? 0 : l,
      minute: c,
      second: f,
      millisecond: 0
    });
    let p = +n;
    const N = p % 1e3;
    return p -= N >= 0 ? N : 1e3 + N, (m - p) / (60 * 1e3);
  }
  equals(e) {
    return e.type === "iana" && e.name === this.name;
  }
  get isValid() {
    return this.valid;
  }
}
let Fr = {};
function du(t, e = {}) {
  const n = JSON.stringify([t, e]);
  let s = Fr[n];
  return s || (s = new Intl.ListFormat(t, e), Fr[n] = s), s;
}
let Ss = {};
function Os(t, e = {}) {
  const n = JSON.stringify([t, e]);
  let s = Ss[n];
  return s || (s = new Intl.DateTimeFormat(t, e), Ss[n] = s), s;
}
let ks = {};
function mu(t, e = {}) {
  const n = JSON.stringify([t, e]);
  let s = ks[n];
  return s || (s = new Intl.NumberFormat(t, e), ks[n] = s), s;
}
let Ls = {};
function hu(t, e = {}) {
  const { base: n, ...s } = e, r = JSON.stringify([t, s]);
  let a = Ls[r];
  return a || (a = new Intl.RelativeTimeFormat(t, e), Ls[r] = a), a;
}
let un = null;
function gu() {
  return un || (un = new Intl.DateTimeFormat().resolvedOptions().locale, un);
}
function pu(t) {
  const e = t.indexOf("-x-");
  e !== -1 && (t = t.substring(0, e));
  const n = t.indexOf("-u-");
  if (n === -1)
    return [t];
  {
    let s, r;
    try {
      s = Os(t).resolvedOptions(), r = t;
    } catch {
      const l = t.substring(0, n);
      s = Os(l).resolvedOptions(), r = l;
    }
    const { numberingSystem: a, calendar: i } = s;
    return [r, a, i];
  }
}
function _u(t, e, n) {
  return (n || e) && (t.includes("-u-") || (t += "-u"), n && (t += `-ca-${n}`), e && (t += `-nu-${e}`)), t;
}
function Eu(t) {
  const e = [];
  for (let n = 1; n <= 12; n++) {
    const s = $.utc(2009, n, 1);
    e.push(t(s));
  }
  return e;
}
function yu(t) {
  const e = [];
  for (let n = 1; n <= 7; n++) {
    const s = $.utc(2016, 11, 13 + n);
    e.push(t(s));
  }
  return e;
}
function kn(t, e, n, s) {
  const r = t.listingMode();
  return r === "error" ? null : r === "en" ? n(e) : s(e);
}
function vu(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 Nu {
  constructor(e, n, s) {
    this.padTo = s.padTo || 0, this.floor = s.floor || !1;
    const { padTo: r, floor: a, ...i } = s;
    if (!n || Object.keys(i).length > 0) {
      const o = { useGrouping: !1, ...s };
      s.padTo > 0 && (o.minimumIntegerDigits = s.padTo), this.inf = mu(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) : js(e, 3);
      return fe(n, this.padTo);
    }
  }
}
class Tu {
  constructor(e, n, s) {
    this.opts = s, this.originalZone = void 0;
    let r;
    if (this.opts.timeZone)
      this.dt = e;
    else if (e.zone.type === "fixed") {
      const i = -1 * (e.offset / 60), o = i >= 0 ? `Etc/GMT+${i}` : `Etc/GMT${i}`;
      e.offset !== 0 && nt.create(o).valid ? (r = o, this.dt = e) : (r = "UTC", this.dt = e.offset === 0 ? e : e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
    } else
      e.zone.type === "system" ? this.dt = e : e.zone.type === "iana" ? (this.dt = e, r = e.zone.name) : (r = "UTC", this.dt = e.setZone("UTC").plus({ minutes: e.offset }), this.originalZone = e.zone);
    const a = { ...this.opts };
    a.timeZone = a.timeZone || r, this.dtf = Os(n, a);
  }
  format() {
    return this.originalZone ? this.formatToParts().map(({ value: e }) => e).join("") : this.dtf.format(this.dt.toJSDate());
  }
  formatToParts() {
    const e = this.dtf.formatToParts(this.dt.toJSDate());
    return this.originalZone ? e.map((n) => {
      if (n.type === "timeZoneName") {
        const s = this.originalZone.offsetName(this.dt.ts, {
          locale: this.dt.locale,
          format: this.opts.timeZoneName
        });
        return {
          ...n,
          value: s
        };
      } else
        return n;
    }) : e;
  }
  resolvedOptions() {
    return this.dtf.resolvedOptions();
  }
}
class Iu {
  constructor(e, n, s) {
    this.opts = { style: "long", ...s }, !n && hi() && (this.rtf = hu(e, s));
  }
  format(e, n) {
    return this.rtf ? this.rtf.format(e, n) : $u(n, e, this.opts.numeric, this.opts.style !== "long");
  }
  formatToParts(e, n) {
    return this.rtf ? this.rtf.formatToParts(e, n) : [];
  }
}
class ne {
  static fromOpts(e) {
    return ne.create(e.locale, e.numberingSystem, e.outputCalendar, e.defaultToEN);
  }
  static create(e, n, s, r = !1) {
    const a = e || le.defaultLocale, i = a || (r ? "en-US" : gu()), o = n || le.defaultNumberingSystem, l = s || le.defaultOutputCalendar;
    return new ne(i, o, l, a);
  }
  static resetCache() {
    un = null, Ss = {}, ks = {}, Ls = {};
  }
  static fromObject({ locale: e, numberingSystem: n, outputCalendar: s } = {}) {
    return ne.create(e, n, s);
  }
  constructor(e, n, s, r) {
    const [a, i, o] = pu(e);
    this.locale = a, this.numberingSystem = n || i || null, this.outputCalendar = s || o || null, this.intl = _u(this.locale, this.numberingSystem, this.outputCalendar), this.weekdaysCache = { format: {}, standalone: {} }, this.monthsCache = { format: {}, standalone: {} }, this.meridiemCache = null, this.eraCache = {}, this.specifiedLocale = r, this.fastNumbersCached = null;
  }
  get fastNumbers() {
    return this.fastNumbersCached == null && (this.fastNumbersCached = vu(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 : ne.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) {
    return kn(this, e, Ei, () => {
      const s = n ? { month: e, day: "numeric" } : { month: e }, r = n ? "format" : "standalone";
      return this.monthsCache[r][e] || (this.monthsCache[r][e] = Eu((a) => this.extract(a, s, "month"))), this.monthsCache[r][e];
    });
  }
  weekdays(e, n = !1) {
    return kn(this, e, Ni, () => {
      const s = n ? { weekday: e, year: "numeric", month: "long", day: "numeric" } : { weekday: e }, r = n ? "format" : "standalone";
      return this.weekdaysCache[r][e] || (this.weekdaysCache[r][e] = yu(
        (a) => this.extract(a, s, "weekday")
      )), this.weekdaysCache[r][e];
    });
  }
  meridiems() {
    return kn(
      this,
      void 0,
      () => Ti,
      () => {
        if (!this.meridiemCache) {
          const e = { hour: "numeric", hourCycle: "h12" };
          this.meridiemCache = [$.utc(2016, 11, 13, 9), $.utc(2016, 11, 13, 19)].map(
            (n) => this.extract(n, e, "dayperiod")
          );
        }
        return this.meridiemCache;
      }
    );
  }
  eras(e) {
    return kn(this, e, Ii, () => {
      const n = { era: e };
      return this.eraCache[e] || (this.eraCache[e] = [$.utc(-40, 1, 1), $.utc(2017, 1, 1)].map(
        (s) => this.extract(s, n, "era")
      )), this.eraCache[e];
    });
  }
  extract(e, n, s) {
    const r = this.dtFormatter(e, n), a = r.formatToParts(), i = a.find((o) => o.type.toLowerCase() === s);
    return i ? i.value : null;
  }
  numberFormatter(e = {}) {
    return new Nu(this.intl, e.forceSimple || this.fastNumbers, e);
  }
  dtFormatter(e, n = {}) {
    return new Tu(e, this.intl, n);
  }
  relFormatter(e = {}) {
    return new Iu(this.intl, this.isEnglish(), e);
  }
  listFormatter(e = {}) {
    return du(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;
  }
}
let rs = null;
class Te extends En {
  static get utcInstance() {
    return rs === null && (rs = new Te(0)), rs;
  }
  static instance(e) {
    return e === 0 ? Te.utcInstance : new Te(e);
  }
  static parseSpecifier(e) {
    if (e) {
      const n = e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
      if (n)
        return new Te(Jn(n[1], n[2]));
    }
    return null;
  }
  constructor(e) {
    super(), this.fixed = e;
  }
  get type() {
    return "fixed";
  }
  get name() {
    return this.fixed === 0 ? "UTC" : `UTC${mn(this.fixed, "narrow")}`;
  }
  get ianaName() {
    return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${mn(-this.fixed, "narrow")}`;
  }
  offsetName() {
    return this.name;
  }
  formatOffset(e, n) {
    return mn(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 bu extends En {
  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 ft(t, e) {
  if (B(t) || t === null)
    return e;
  if (t instanceof En)
    return t;
  if (Su(t)) {
    const n = t.toLowerCase();
    return n === "default" ? e : n === "local" || n === "system" ? Bn.instance : n === "utc" || n === "gmt" ? Te.utcInstance : Te.parseSpecifier(n) || nt.create(t);
  } else
    return It(t) ? Te.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new bu(t);
}
let Pr = () => Date.now(), xr = "system", Rr = null, Vr = null, Ur = null, $r = 60, zr;
class le {
  static get now() {
    return Pr;
  }
  static set now(e) {
    Pr = e;
  }
  static set defaultZone(e) {
    xr = e;
  }
  static get defaultZone() {
    return ft(xr, Bn.instance);
  }
  static get defaultLocale() {
    return Rr;
  }
  static set defaultLocale(e) {
    Rr = e;
  }
  static get defaultNumberingSystem() {
    return Vr;
  }
  static set defaultNumberingSystem(e) {
    Vr = e;
  }
  static get defaultOutputCalendar() {
    return Ur;
  }
  static set defaultOutputCalendar(e) {
    Ur = e;
  }
  static get twoDigitCutoffYear() {
    return $r;
  }
  static set twoDigitCutoffYear(e) {
    $r = e % 100;
  }
  static get throwOnInvalid() {
    return zr;
  }
  static set throwOnInvalid(e) {
    zr = e;
  }
  static resetCaches() {
    ne.resetCache(), nt.resetCache();
  }
}
function B(t) {
  return typeof t > "u";
}
function It(t) {
  return typeof t == "number";
}
function Yn(t) {
  return typeof t == "number" && t % 1 === 0;
}
function Su(t) {
  return typeof t == "string";
}
function Ou(t) {
  return Object.prototype.toString.call(t) === "[object Date]";
}
function hi() {
  try {
    return typeof Intl < "u" && !!Intl.RelativeTimeFormat;
  } catch {
    return !1;
  }
}
function ku(t) {
  return Array.isArray(t) ? t : [t];
}
function Wr(t, e, n) {
  if (t.length !== 0)
    return t.reduce((s, r) => {
      const a = [e(r), r];
      return s && n(s[0], a[0]) === s[0] ? s : a;
    }, null)[1];
}
function Lu(t, e) {
  return e.reduce((n, s) => (n[s] = t[s], n), {});
}
function Ht(t, e) {
  return Object.prototype.hasOwnProperty.call(t, e);
}
function et(t, e, n) {
  return Yn(t) && t >= e && t <= n;
}
function wu(t, e) {
  return t - e * Math.floor(t / e);
}
function fe(t, e = 2) {
  const n = t < 0;
  let s;
  return n ? s = "-" + ("" + -t).padStart(e, "0") : s = ("" + t).padStart(e, "0"), s;
}
function ut(t) {
  if (!(B(t) || t === null || t === ""))
    return parseInt(t, 10);
}
function yt(t) {
  if (!(B(t) || t === null || t === ""))
    return parseFloat(t);
}
function Ws(t) {
  if (!(B(t) || t === null || t === "")) {
    const e = parseFloat("0." + t) * 1e3;
    return Math.floor(e);
  }
}
function js(t, e, n = !1) {
  const s = 10 ** e;
  return (n ? Math.trunc : Math.round)(t * s) / s;
}
function yn(t) {
  return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
}
function dn(t) {
  return yn(t) ? 366 : 365;
}
function Un(t, e) {
  const n = wu(e - 1, 12) + 1, s = t + (e - n) / 12;
  return n === 2 ? yn(s) ? 29 : 28 : [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][n - 1];
}
function Kn(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(t.year, t.month - 1, t.day)), +e;
}
function $n(t) {
  const e = (t + Math.floor(t / 4) - Math.floor(t / 100) + Math.floor(t / 400)) % 7, n = t - 1, s = (n + Math.floor(n / 4) - Math.floor(n / 100) + Math.floor(n / 400)) % 7;
  return e === 4 || s === 3 ? 53 : 52;
}
function ws(t) {
  return t > 99 ? t : t > le.twoDigitCutoffYear ? 1900 + t : 2e3 + t;
}
function gi(t, e, n, s = null) {
  const r = new Date(t), a = {
    hourCycle: "h23",
    year: "numeric",
    month: "2-digit",
    day: "2-digit",
    hour: "2-digit",
    minute: "2-digit"
  };
  s && (a.timeZone = s);
  const i = { timeZoneName: e, ...a }, o = new Intl.DateTimeFormat(n, i).formatToParts(r).find((l) => l.type.toLowerCase() === "timezonename");
  return o ? o.value : null;
}
function Jn(t, e) {
  let n = parseInt(t, 10);
  Number.isNaN(n) && (n = 0);
  const s = parseInt(e, 10) || 0, r = n < 0 || Object.is(n, -0) ? -s : s;
  return n * 60 + r;
}
function pi(t) {
  const e = Number(t);
  if (typeof t == "boolean" || t === "" || Number.isNaN(e))
    throw new De(`Invalid unit value ${t}`);
  return e;
}
function zn(t, e) {
  const n = {};
  for (const s in t)
    if (Ht(t, s)) {
      const r = t[s];
      if (r == null)
        continue;
      n[e(s)] = pi(r);
    }
  return n;
}
function mn(t, e) {
  const n = Math.trunc(Math.abs(t / 60)), s = Math.trunc(Math.abs(t % 60)), r = t >= 0 ? "+" : "-";
  switch (e) {
    case "short":
      return `${r}${fe(n, 2)}:${fe(s, 2)}`;
    case "narrow":
      return `${r}${n}${s > 0 ? `:${s}` : ""}`;
    case "techie":
      return `${r}${fe(n, 2)}${fe(s, 2)}`;
    default:
      throw new RangeError(`Value format ${e} is out of range for property format`);
  }
}
function qn(t) {
  return Lu(t, ["hour", "minute", "second", "millisecond"]);
}
const Cu = [
  "January",
  "February",
  "March",
  "April",
  "May",
  "June",
  "July",
  "August",
  "September",
  "October",
  "November",
  "December"
], _i = [
  "Jan",
  "Feb",
  "Mar",
  "Apr",
  "May",
  "Jun",
  "Jul",
  "Aug",
  "Sep",
  "Oct",
  "Nov",
  "Dec"
], Du = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"];
function Ei(t) {
  switch (t) {
    case "narrow":
      return [...Du];
    case "short":
      return [..._i];
    case "long":
      return [...Cu];
    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 yi = [
  "Monday",
  "Tuesday",
  "Wednesday",
  "Thursday",
  "Friday",
  "Saturday",
  "Sunday"
], vi = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], Mu = ["M", "T", "W", "T", "F", "S", "S"];
function Ni(t) {
  switch (t) {
    case "narrow":
      return [...Mu];
    case "short":
      return [...vi];
    case "long":
      return [...yi];
    case "numeric":
      return ["1", "2", "3", "4", "5", "6", "7"];
    default:
      return null;
  }
}
const Ti = ["AM", "PM"], Au = ["Before Christ", "Anno Domini"], Fu = ["BC", "AD"], Pu = ["B", "A"];
function Ii(t) {
  switch (t) {
    case "narrow":
      return [...Pu];
    case "short":
      return [...Fu];
    case "long":
      return [...Au];
    default:
      return null;
  }
}
function xu(t) {
  return Ti[t.hour < 12 ? 0 : 1];
}
function Ru(t, e) {
  return Ni(e)[t.weekday - 1];
}
function Vu(t, e) {
  return Ei(e)[t.month - 1];
}
function Uu(t, e) {
  return Ii(e)[t.year < 0 ? 0 : 1];
}
function $u(t, e, n = "always", s = !1) {
  const r = {
    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."]
  }, a = ["hours", "minutes", "seconds"].indexOf(t) === -1;
  if (n === "auto" && a) {
    const d = t === "days";
    switch (e) {
      case 1:
        return d ? "tomorrow" : `next ${r[t][0]}`;
      case -1:
        return d ? "yesterday" : `last ${r[t][0]}`;
      case 0:
        return d ? "today" : `this ${r[t][0]}`;
    }
  }
  const i = Object.is(e, -0) || e < 0, o = Math.abs(e), l = o === 1, c = r[t], f = s ? l ? c[1] : c[2] || c[1] : l ? r[t][0] : t;
  return i ? `${o} ${f} ago` : `in ${o} ${f}`;
}
function jr(t, e) {
  let n = "";
  for (const s of t)
    s.literal ? n += s.val : n += e(s.val);
  return n;
}
const zu = {
  D: Vn,
  DD: Ka,
  DDD: Ja,
  DDDD: qa,
  t: Qa,
  tt: Xa,
  ttt: ei,
  tttt: ti,
  T: ni,
  TT: si,
  TTT: ri,
  TTTT: ai,
  f: ii,
  ff: li,
  fff: ui,
  ffff: di,
  F: oi,
  FF: ci,
  FFF: fi,
  FFFF: mi
};
class _e {
  static create(e, n = {}) {
    return new _e(e, n);
  }
  static parseFormat(e) {
    let n = null, s = "", r = !1;
    const a = [];
    for (let i = 0; i < e.length; i++) {
      const o = e.charAt(i);
      o === "'" ? (s.length > 0 && a.push({ literal: r || /^\s+$/.test(s), val: s }), n = null, s = "", r = !r) : r || o === n ? s += o : (s.length > 0 && a.push({ literal: /^\s+$/.test(s), val: s }), s = o, n = o);
    }
    return s.length > 0 && a.push({ literal: r || /^\s+$/.test(s), val: s }), a;
  }
  static macroTokenToFormatOpts(e) {
    return zu[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();
  }
  dtFormatter(e, n = {}) {
    return this.loc.dtFormatter(e, { ...this.opts, ...n });
  }
  formatDateTime(e, n) {
    return this.dtFormatter(e, n).format();
  }
  formatDateTimeParts(e, n) {
    return this.dtFormatter(e, n).formatToParts();
  }
  formatInterval(e, n) {
    return this.dtFormatter(e.start, n).dtf.formatRange(e.start.toJSDate(), e.end.toJSDate());
  }
  resolvedOptions(e, n) {
    return this.dtFormatter(e, n).resolvedOptions();
  }
  num(e, n = 0) {
    if (this.opts.forceSimple)
      return fe(e, n);
    const s = { ...this.opts };
    return n > 0 && (s.padTo = n), this.loc.numberFormatter(s).format(e);
  }
  formatDateTimeFromString(e, n) {
    const s = this.loc.listingMode() === "en", r = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", a = (p, N) => this.loc.extract(e, p, N), i = (p) => e.isOffsetFixed && e.offset === 0 && p.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, p.format) : "", o = () => s ? xu(e) : a({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), l = (p, N) => s ? Vu(e, p) : a(N ? { month: p } : { month: p, day: "numeric" }, "month"), c = (p, N) => s ? Ru(e, p) : a(
      N ? { weekday: p } : { weekday: p, month: "long", day: "numeric" },
      "weekday"
    ), f = (p) => {
      const N = _e.macroTokenToFormatOpts(p);
      return N ? this.formatWithSystemDefault(e, N) : p;
    }, d = (p) => s ? Uu(e, p) : a({ era: p }, "era"), m = (p) => {
      switch (p) {
        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 i({ format: "narrow", allowZ: this.opts.allowZ });
        case "ZZ":
          return i({ format: "short", allowZ: this.opts.allowZ });
        case "ZZZ":
          return i({ 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 r ? a({ day: "numeric" }, "day") : this.num(e.day);
        case "dd":
          return r ? a({ 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 r ? a({ month: "numeric", day: "numeric" }, "month") : this.num(e.month);
        case "LL":
          return r ? a({ 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 r ? a({ month: "numeric" }, "month") : this.num(e.month);
        case "MM":
          return r ? a({ 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 r ? a({ year: "numeric" }, "year") : this.num(e.year);
        case "yy":
          return r ? a({ year: "2-digit" }, "year") : this.num(e.year.toString().slice(-2), 2);
        case "yyyy":
          return r ? a({ year: "numeric" }, "year") : this.num(e.year, 4);
        case "yyyyyy":
          return r ? a({ year: "numeric" }, "year") : this.num(e.year, 6);
        case "G":
          return d("short");
        case "GG":
          return d("long");
        case "GGGGG":
          return d("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 f(p);
      }
    };
    return jr(_e.parseFormat(n), m);
  }
  formatDurationFromString(e, n) {
    const s = (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;
      }
    }, r = (l) => (c) => {
      const f = s(c);
      return f ? this.num(l.get(f), c.length) : c;
    }, a = _e.parseFormat(n), i = a.reduce(
      (l, { literal: c, val: f }) => c ? l : l.concat(f),
      []
    ), o = e.shiftTo(...i.map(s).filter((l) => l));
    return jr(a, r(o));
  }
}
class ze {
  constructor(e, n) {
    this.reason = e, this.explanation = n;
  }
  toMessage() {
    return this.explanation ? `${this.reason}: ${this.explanation}` : this.reason;
  }
}
const bi = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
function Zt(...t) {
  const e = t.reduce((n, s) => n + s.source, "");
  return RegExp(`^${e}$`);
}
function Bt(...t) {
  return (e) => t.reduce(
    ([n, s, r], a) => {
      const [i, o, l] = a(e, r);
      return [{ ...n, ...i }, o || s, l];
    },
    [{}, null, 1]
  ).slice(0, 2);
}
function Yt(t, ...e) {
  if (t == null)
    return [null, null];
  for (const [n, s] of e) {
    const r = n.exec(t);
    if (r)
      return s(r);
  }
  return [null, null];
}
function Si(...t) {
  return (e, n) => {
    const s = {};
    let r;
    for (r = 0; r < t.length; r++)
      s[t[r]] = ut(e[n + r]);
    return [s, null, n + r];
  };
}
const Oi = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, Wu = `(?:${Oi.source}?(?:\\[(${bi.source})\\])?)?`, Hs = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, ki = RegExp(`${Hs.source}${Wu}`), Gs = RegExp(`(?:T${ki.source})?`), ju = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, Hu = /(\d{4})-?W(\d\d)(?:-?(\d))?/, Gu = /(\d{4})-?(\d{3})/, Zu = Si("weekYear", "weekNumber", "weekDay"), Bu = Si("year", "ordinal"), Yu = /(\d{4})-(\d\d)-(\d\d)/, Li = RegExp(
  `${Hs.source} ?(?:${Oi.source}|(${bi.source}))?`
), Ku = RegExp(`(?: ${Li.source})?`);
function $t(t, e, n) {
  const s = t[e];
  return B(s) ? n : ut(s);
}
function Ju(t, e) {
  return [{
    year: $t(t, e),
    month: $t(t, e + 1, 1),
    day: $t(t, e + 2, 1)
  }, null, e + 3];
}
function Kt(t, e) {
  return [{
    hours: $t(t, e, 0),
    minutes: $t(t, e + 1, 0),
    seconds: $t(t, e + 2, 0),
    milliseconds: Ws(t[e + 3])
  }, null, e + 4];
}
function vn(t, e) {
  const n = !t[e] && !t[e + 1], s = Jn(t[e + 1], t[e + 2]), r = n ? null : Te.instance(s);
  return [{}, r, e + 3];
}
function Nn(t, e) {
  const n = t[e] ? nt.create(t[e]) : null;
  return [{}, n, e + 1];
}
const qu = RegExp(`^T?${Hs.source}$`), Qu = /^-?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 Xu(t) {
  const [e, n, s, r, a, i, o, l, c] = t, f = e[0] === "-", d = l && l[0] === "-", m = (p, N = !1) => p !== void 0 && (N || p && f) ? -p : p;
  return [
    {
      years: m(yt(n)),
      months: m(yt(s)),
      weeks: m(yt(r)),
      days: m(yt(a)),
      hours: m(yt(i)),
      minutes: m(yt(o)),
      seconds: m(yt(l), l === "-0"),
      milliseconds: m(Ws(c), d)
    }
  ];
}
const ef = {
  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 Zs(t, e, n, s, r, a, i) {
  const o = {
    year: e.length === 2 ? ws(ut(e)) : ut(e),
    month: _i.indexOf(n) + 1,
    day: ut(s),
    hour: ut(r),
    minute: ut(a)
  };
  return i && (o.second = ut(i)), t && (o.weekday = t.length > 3 ? yi.indexOf(t) + 1 : vi.indexOf(t) + 1), o;
}
const tf = /^(?:(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 nf(t) {
  const [
    ,
    e,
    n,
    s,
    r,
    a,
    i,
    o,
    l,
    c,
    f,
    d
  ] = t, m = Zs(e, r, s, n, a, i, o);
  let p;
  return l ? p = ef[l] : c ? p = 0 : p = Jn(f, d), [m, new Te(p)];
}
function sf(t) {
  return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
}
const rf = /^(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$/, af = /^(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$/, of = /^(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 Hr(t) {
  const [, e, n, s, r, a, i, o] = t;
  return [Zs(e, r, s, n, a, i, o), Te.utcInstance];
}
function lf(t) {
  const [, e, n, s, r, a, i, o] = t;
  return [Zs(e, o, n, s, r, a, i), Te.utcInstance];
}
const cf = Zt(ju, Gs), uf = Zt(Hu, Gs), ff = Zt(Gu, Gs), df = Zt(ki), wi = Bt(
  Ju,
  Kt,
  vn,
  Nn
), mf = Bt(
  Zu,
  Kt,
  vn,
  Nn
), hf = Bt(
  Bu,
  Kt,
  vn,
  Nn
), gf = Bt(
  Kt,
  vn,
  Nn
);
function pf(t) {
  return Yt(
    t,
    [cf, wi],
    [uf, mf],
    [ff, hf],
    [df, gf]
  );
}
function _f(t) {
  return Yt(sf(t), [tf, nf]);
}
function Ef(t) {
  return Yt(
    t,
    [rf, Hr],
    [af, Hr],
    [of, lf]
  );
}
function yf(t) {
  return Yt(t, [Qu, Xu]);
}
const vf = Bt(Kt);
function Nf(t) {
  return Yt(t, [qu, vf]);
}
const Tf = Zt(Yu, Ku), If = Zt(Li), bf = Bt(
  Kt,
  vn,
  Nn
);
function Sf(t) {
  return Yt(
    t,
    [Tf, wi],
    [If, bf]
  );
}
const Gr = "Invalid Duration", Ci = {
  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 }
}, Of = {
  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
  },
  ...Ci
}, Ce = 146097 / 400, Ft = 146097 / 4800, kf = {
  years: {
    quarters: 4,
    months: 12,
    weeks: Ce / 7,
    days: Ce,
    hours: Ce * 24,
    minutes: Ce * 24 * 60,
    seconds: Ce * 24 * 60 * 60,
    milliseconds: Ce * 24 * 60 * 60 * 1e3
  },
  quarters: {
    months: 3,
    weeks: Ce / 28,
    days: Ce / 4,
    hours: Ce * 24 / 4,
    minutes: Ce * 24 * 60 / 4,
    seconds: Ce * 24 * 60 * 60 / 4,
    milliseconds: Ce * 24 * 60 * 60 * 1e3 / 4
  },
  months: {
    weeks: Ft / 7,
    days: Ft,
    hours: Ft * 24,
    minutes: Ft * 24 * 60,
    seconds: Ft * 24 * 60 * 60,
    milliseconds: Ft * 24 * 60 * 60 * 1e3
  },
  ...Ci
}, Tt = [
  "years",
  "quarters",
  "months",
  "weeks",
  "days",
  "hours",
  "minutes",
  "seconds",
  "milliseconds"
], Lf = Tt.slice(0).reverse();
function lt(t, e, n = !1) {
  const s = {
    values: n ? e.values : { ...t.values, ...e.values || {} },
    loc: t.loc.clone(e.loc),
    conversionAccuracy: e.conversionAccuracy || t.conversionAccuracy,
    matrix: e.matrix || t.matrix
  };
  return new J(s);
}
function Di(t, e) {
  var s;
  let n = (s = e.milliseconds) != null ? s : 0;
  for (const r of Lf.slice(1))
    e[r] && (n += e[r] * t[r].milliseconds);
  return n;
}
function Zr(t, e) {
  const n = Di(t, e) < 0 ? -1 : 1;
  Tt.reduceRight((s, r) => {
    if (B(e[r]))
      return s;
    if (s) {
      const a = e[s] * n, i = t[r][s], o = Math.floor(a / i);
      e[r] += o * n, e[s] -= o * i * n;
    }
    return r;
  }, null), Tt.reduce((s, r) => {
    if (B(e[r]))
      return s;
    if (s) {
      const a = e[s] % 1;
      e[s] -= a, e[r] += a * t[s][r];
    }
    return r;
  }, null);
}
function wf(t) {
  const e = {};
  for (const [n, s] of Object.entries(t))
    s !== 0 && (e[n] = s);
  return e;
}
class J {
  constructor(e) {
    const n = e.conversionAccuracy === "longterm" || !1;
    let s = n ? kf : Of;
    e.matrix && (s = e.matrix), this.values = e.values, this.loc = e.loc || ne.create(), this.conversionAccuracy = n ? "longterm" : "casual", this.invalid = e.invalid || null, this.matrix = s, this.isLuxonDuration = !0;
  }
  static fromMillis(e, n) {
    return J.fromObject({ milliseconds: e }, n);
  }
  static fromObject(e, n = {}) {
    if (e == null || typeof e != "object")
      throw new De(
        `Duration.fromObject: argument expected to be an object, got ${e === null ? "null" : typeof e}`
      );
    return new J({
      values: zn(e, J.normalizeUnit),
      loc: ne.fromObject(n),
      conversionAccuracy: n.conversionAccuracy,
      matrix: n.matrix
    });
  }
  static fromDurationLike(e) {
    if (It(e))
      return J.fromMillis(e);
    if (J.isDuration(e))
      return e;
    if (typeof e == "object")
      return J.fromObject(e);
    throw new De(
      `Unknown duration argument ${e} of type ${typeof e}`
    );
  }
  static fromISO(e, n) {
    const [s] = yf(e);
    return s ? J.fromObject(s, n) : J.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
  }
  static fromISOTime(e, n) {
    const [s] = Nf(e);
    return s ? J.fromObject(s, n) : J.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
  }
  static invalid(e, n = null) {
    if (!e)
      throw new De("need to specify a reason the Duration is invalid");
    const s = e instanceof ze ? e : new ze(e, n);
    if (le.throwOnInvalid)
      throw new au(s);
    return new J({ invalid: s });
  }
  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 Ya(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 s = {
      ...n,
      floor: n.round !== !1 && n.floor !== !1
    };
    return this.isValid ? _e.create(this.loc, s).formatDurationFromString(this, e) : Gr;
  }
  toHuman(e = {}) {
    if (!this.isValid)
      return Gr;
    const n = Tt.map((s) => {
      const r = this.values[s];
      return B(r) ? null : this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...e, unit: s.slice(0, -1) }).format(r);
    }).filter((s) => s);
    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 += js(this.seconds + this.milliseconds / 1e3, 3) + "S"), e === "P" && (e += "T0S"), e;
  }
  toISOTime(e = {}) {
    if (!this.isValid)
      return null;
    const n = this.toMillis();
    return n < 0 || n >= 864e5 ? null : (e = {
      suppressMilliseconds: !1,
      suppressSeconds: !1,
      includePrefix: !1,
      format: "extended",
      ...e,
      includeOffset: !1
    }, $.fromMillis(n, { zone: "UTC" }).toISOTime(e));
  }
  toJSON() {
    return this.toISO();
  }
  toString() {
    return this.toISO();
  }
  toMillis() {
    return this.isValid ? Di(this.matrix, this.values) : NaN;
  }
  valueOf() {
    return this.toMillis();
  }
  plus(e) {
    if (!this.isValid)
      return this;
    const n = J.fromDurationLike(e), s = {};
    for (const r of Tt)
      (Ht(n.values, r) || Ht(this.values, r)) && (s[r] = n.get(r) + this.get(r));
    return lt(this, { values: s }, !0);
  }
  minus(e) {
    if (!this.isValid)
      return this;
    const n = J.fromDurationLike(e);
    return this.plus(n.negate());
  }
  mapUnits(e) {
    if (!this.isValid)
      return this;
    const n = {};
    for (const s of Object.keys(this.values))
      n[s] = pi(e(this.values[s], s));
    return lt(this, { values: n }, !0);
  }
  get(e) {
    return this[J.normalizeUnit(e)];
  }
  set(e) {
    if (!this.isValid)
      return this;
    const n = { ...this.values, ...zn(e, J.normalizeUnit) };
    return lt(this, { values: n });
  }
  reconfigure({ locale: e, numberingSystem: n, conversionAccuracy: s, matrix: r } = {}) {
    const i = { loc: this.loc.clone({ locale: e, numberingSystem: n }), matrix: r, conversionAccuracy: s };
    return lt(this, i);
  }
  as(e) {
    return this.isValid ? this.shiftTo(e).get(e) : NaN;
  }
  normalize() {
    if (!this.isValid)
      return this;
    const e = this.toObject();
    return Zr(this.matrix, e), lt(this, { values: e }, !0);
  }
  rescale() {
    if (!this.isValid)
      return this;
    const e = wf(this.normalize().shiftToAll().toObject());
    return lt(this, { values: e }, !0);
  }
  shiftTo(...e) {
    if (!this.isValid)
      return this;
    if (e.length === 0)
      return this;
    e = e.map((i) => J.normalizeUnit(i));
    const n = {}, s = {}, r = this.toObject();
    let a;
    for (const i of Tt)
      if (e.indexOf(i) >= 0) {
        a = i;
        let o = 0;
        for (const c in s)
          o += this.matrix[c][i] * s[c], s[c] = 0;
        It(r[i]) && (o += r[i]);
        const l = Math.trunc(o);
        n[i] = l, s[i] = (o * 1e3 - l * 1e3) / 1e3;
      } else
        It(r[i]) && (s[i] = r[i]);
    for (const i in s)
      s[i] !== 0 && (n[a] += i === a ? s[i] : s[i] / this.matrix[a][i]);
    return Zr(this.matrix, n), lt(this, { values: n }, !0);
  }
  shiftToAll() {
    return this.isValid ? this.shiftTo(
      "years",
      "months",
      "weeks",
      "days",
      "hours",
      "minutes",
      "seconds",
      "milliseconds"
    ) : this;
  }
  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 lt(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(s, r) {
      return s === void 0 || s === 0 ? r === void 0 || r === 0 : s === r;
    }
    for (const s of Tt)
      if (!n(this.values[s], e.values[s]))
        return !1;
    return !0;
  }
}
const Pt = "Invalid Interval";
function Cf(t, e) {
  return !t || !t.isValid ? ie.invalid("missing or invalid start") : !e || !e.isValid ? ie.invalid("missing or invalid end") : e < t ? ie.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 ie {
  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 De("need to specify a reason the Interval is invalid");
    const s = e instanceof ze ? e : new ze(e, n);
    if (le.throwOnInvalid)
      throw new ru(s);
    return new ie({ invalid: s });
  }
  static fromDateTimes(e, n) {
    const s = ln(e), r = ln(n), a = Cf(s, r);
    return a == null ? new ie({
      start: s,
      end: r
    }) : a;
  }
  static after(e, n) {
    const s = J.fromDurationLike(n), r = ln(e);
    return ie.fromDateTimes(r, r.plus(s));
  }
  static before(e, n) {
    const s = J.fromDurationLike(n), r = ln(e);
    return ie.fromDateTimes(r.minus(s), r);
  }
  static fromISO(e, n) {
    const [s, r] = (e || "").split("/", 2);
    if (s && r) {
      let a, i;
      try {
        a = $.fromISO(s, n), i = a.isValid;
      } catch {
        i = !1;
      }
      let o, l;
      try {
        o = $.fromISO(r, n), l = o.isValid;
      } catch {
        l = !1;
      }
      if (i && l)
        return ie.fromDateTimes(a, o);
      if (i) {
        const c = J.fromISO(r, n);
        if (c.isValid)
          return ie.after(a, c);
      } else if (l) {
        const c = J.fromISO(s, n);
        if (c.isValid)
          return ie.before(o, c);
      }
    }
    return ie.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), s = this.end.startOf(e);
    return Math.floor(s.diff(n, e).get(e)) + (s.valueOf() !== this.end.valueOf());
  }
  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 ? ie.fromDateTimes(e || this.s, n || this.e) : this;
  }
  splitAt(...e) {
    if (!this.isValid)
      return [];
    const n = e.map(ln).filter((i) => this.contains(i)).sort(), s = [];
    let { s: r } = this, a = 0;
    for (; r < this.e; ) {
      const i = n[a] || this.e, o = +i > +this.e ? this.e : i;
      s.push(ie.fromDateTimes(r, o)), r = o, a += 1;
    }
    return s;
  }
  splitBy(e) {
    const n = J.fromDurationLike(e);
    if (!this.isValid || !n.isValid || n.as("milliseconds") === 0)
      return [];
    let { s } = this, r = 1, a;
    const i = [];
    for (; s < this.e; ) {
      const o = this.start.plus(n.mapUnits((l) => l * r));
      a = +o > +this.e ? this.e : o, i.push(ie.fromDateTimes(s, a)), s = a, r += 1;
    }
    return i;
  }
  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, s = this.e < e.e ? this.e : e.e;
    return n >= s ? null : ie.fromDateTimes(n, s);
  }
  union(e) {
    if (!this.isValid)
      return this;
    const n = this.s < e.s ? this.s : e.s, s = this.e > e.e ? this.e : e.e;
    return ie.fromDateTimes(n, s);
  }
  static merge(e) {
    const [n, s] = e.sort((r, a) => r.s - a.s).reduce(
      ([r, a], i) => a ? a.overlaps(i) || a.abutsStart(i) ? [r, a.union(i)] : [r.concat([a]), i] : [r, i],
      [[], null]
    );
    return s && n.push(s), n;
  }
  static xor(e) {
    let n = null, s = 0;
    const r = [], a = e.map((l) => [
      { time: l.s, type: "s" },
      { time: l.e, type: "e" }
    ]), i = Array.prototype.concat(...a), o = i.sort((l, c) => l.time - c.time);
    for (const l of o)
      s += l.type === "s" ? 1 : -1, s === 1 ? n = l.time : (n && +n != +l.time && r.push(ie.fromDateTimes(n, l.time)), n = null);
    return ie.merge(r);
  }
  difference(...e) {
    return ie.xor([this].concat(e)).map((n) => this.intersection(n)).filter((n) => n && !n.isEmpty());
  }
  toString() {
    return this.isValid ? `[${this.s.toISO()} \u2013 ${this.e.toISO()})` : Pt;
  }
  toLocaleString(e = Vn, n = {}) {
    return this.isValid ? _e.create(this.s.loc.clone(n), e).formatInterval(this) : Pt;
  }
  toISO(e) {
    return this.isValid ? `${this.s.toISO(e)}/${this.e.toISO(e)}` : Pt;
  }
  toISODate() {
    return this.isValid ? `${this.s.toISODate()}/${this.e.toISODate()}` : Pt;
  }
  toISOTime(e) {
    return this.isValid ? `${this.s.toISOTime(e)}/${this.e.toISOTime(e)}` : Pt;
  }
  toFormat(e, { separator: n = " \u2013 " } = {}) {
    return this.isValid ? `${this.s.toFormat(e)}${n}${this.e.toFormat(e)}` : Pt;
  }
  toDuration(e, n) {
    return this.isValid ? this.e.diff(this.s, e, n) : J.invalid(this.invalidReason);
  }
  mapEndpoints(e) {
    return ie.fromDateTimes(e(this.s), e(this.e));
  }
}
class Ln {
  static hasDST(e = le.defaultZone) {
    const n = $.now().setZone(e).set({ month: 12 });
    return !e.isUniversal && n.offset !== n.set({ month: 6 }).offset;
  }
  static isValidIANAZone(e) {
    return nt.isValidZone(e);
  }
  static normalizeZone(e) {
    return ft(e, le.defaultZone);
  }
  static months(e = "long", { locale: n = null, numberingSystem: s = null, locObj: r = null, outputCalendar: a = "gregory" } = {}) {
    return (r || ne.create(n, s, a)).months(e);
  }
  static monthsFormat(e = "long", { locale: n = null, numberingSystem: s = null, locObj: r = null, outputCalendar: a = "gregory" } = {}) {
    return (r || ne.create(n, s, a)).months(e, !0);
  }
  static weekdays(e = "long", { locale: n = null, numberingSystem: s = null, locObj: r = null } = {}) {
    return (r || ne.create(n, s, null)).weekdays(e);
  }
  static weekdaysFormat(e = "long", { locale: n = null, numberingSystem: s = null, locObj: r = null } = {}) {
    return (r || ne.create(n, s, null)).weekdays(e, !0);
  }
  static meridiems({ locale: e = null } = {}) {
    return ne.create(e).meridiems();
  }
  static eras(e = "short", { locale: n = null } = {}) {
    return ne.create(n, null, "gregory").eras(e);
  }
  static features() {
    return { relative: hi() };
  }
}
function Br(t, e) {
  const n = (r) => r.toUTC(0, { keepLocalTime: !0 }).startOf("day").valueOf(), s = n(e) - n(t);
  return Math.floor(J.fromMillis(s).as("days"));
}
function Df(t, e, n) {
  const s = [
    ["years", (l, c) => c.year - l.year],
    ["quarters", (l, c) => c.quarter - l.quarter + (c.year - l.year) * 4],
    ["months", (l, c) => c.month - l.month + (c.year - l.year) * 12],
    [
      "weeks",
      (l, c) => {
        const f = Br(l, c);
        return (f - f % 7) / 7;
      }
    ],
    ["days", Br]
  ], r = {}, a = t;
  let i, o;
  for (const [l, c] of s)
    n.indexOf(l) >= 0 && (i = l, r[l] = c(t, e), o = a.plus(r), o > e ? (r[l]--, t = a.plus(r), t > e && (o = t, r[l]--, t = a.plus(r))) : t = o);
  return [t, r, o, i];
}
function Mf(t, e, n, s) {
  let [r, a, i, o] = Df(t, e, n);
  const l = e - r, c = n.filter(
    (d) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(d) >= 0
  );
  c.length === 0 && (i < e && (i = r.plus({ [o]: 1 })), i !== r && (a[o] = (a[o] || 0) + l / (i - r)));
  const f = J.fromObject(a, s);
  return c.length > 0 ? J.fromMillis(l, s).shiftTo(...c).plus(f) : f;
}
const Bs = {
  arab: "[\u0660-\u0669]",
  arabext: "[\u06F0-\u06F9]",
  bali: "[\u1B50-\u1B59]",
  beng: "[\u09E6-\u09EF]",
  deva: "[\u0966-\u096F]",
  fullwide: "[\uFF10-\uFF19]",
  gujr: "[\u0AE6-\u0AEF]",
  hanidec: "[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",
  khmr: "[\u17E0-\u17E9]",
  knda: "[\u0CE6-\u0CEF]",
  laoo: "[\u0ED0-\u0ED9]",
  limb: "[\u1946-\u194F]",
  mlym: "[\u0D66-\u0D6F]",
  mong: "[\u1810-\u1819]",
  mymr: "[\u1040-\u1049]",
  orya: "[\u0B66-\u0B6F]",
  tamldec: "[\u0BE6-\u0BEF]",
  telu: "[\u0C66-\u0C6F]",
  thai: "[\u0E50-\u0E59]",
  tibt: "[\u0F20-\u0F29]",
  latn: "\\d"
}, Yr = {
  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]
}, Af = Bs.hanidec.replace(/[\[|\]]/g, "").split("");
function Ff(t) {
  let e = parseInt(t, 10);
  if (isNaN(e)) {
    e = "";
    for (let n = 0; n < t.length; n++) {
      const s = t.charCodeAt(n);
      if (t[n].search(Bs.hanidec) !== -1)
        e += Af.indexOf(t[n]);
      else
        for (const r in Yr) {
          const [a, i] = Yr[r];
          s >= a && s <= i && (e += s - a);
        }
    }
    return parseInt(e, 10);
  } else
    return e;
}
function Ve({ numberingSystem: t }, e = "") {
  return new RegExp(`${Bs[t || "latn"]}${e}`);
}
const Pf = "missing Intl.DateTimeFormat.formatToParts support";
function X(t, e = (n) => n) {
  return { regex: t, deser: ([n]) => e(Ff(n)) };
}
const xf = String.fromCharCode(160), Mi = `[ ${xf}]`, Ai = new RegExp(Mi, "g");
function Rf(t) {
  return t.replace(/\./g, "\\.?").replace(Ai, Mi);
}
function Kr(t) {
  return t.replace(/\./g, "").replace(Ai, " ").toLowerCase();
}
function Ue(t, e) {
  return t === null ? null : {
    regex: RegExp(t.map(Rf).join("|")),
    deser: ([n]) => t.findIndex((s) => Kr(n) === Kr(s)) + e
  };
}
function Jr(t, e) {
  return { regex: t, deser: ([, n, s]) => Jn(n, s), groups: e };
}
function wn(t) {
  return { regex: t, deser: ([e]) => e };
}
function Vf(t) {
  return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
}
function Uf(t, e) {
  const n = Ve(e), s = Ve(e, "{2}"), r = Ve(e, "{3}"), a = Ve(e, "{4}"), i = Ve(e, "{6}"), o = Ve(e, "{1,2}"), l = Ve(e, "{1,3}"), c = Ve(e, "{1,6}"), f = Ve(e, "{1,9}"), d = Ve(e, "{2,4}"), m = Ve(e, "{4,6}"), p = (v) => ({ regex: RegExp(Vf(v.val)), deser: ([g]) => g, literal: !0 }), S = ((v) => {
    if (t.literal)
      return p(v);
    switch (v.val) {
      case "G":
        return Ue(e.eras("short"), 0);
      case "GG":
        return Ue(e.eras("long"), 0);
      case "y":
        return X(c);
      case "yy":
        return X(d, ws);
      case "yyyy":
        return X(a);
      case "yyyyy":
        return X(m);
      case "yyyyyy":
        return X(i);
      case "M":
        return X(o);
      case "MM":
        return X(s);
      case "MMM":
        return Ue(e.months("short", !0), 1);
      case "MMMM":
        return Ue(e.months("long", !0), 1);
      case "L":
        return X(o);
      case "LL":
        return X(s);
      case "LLL":
        return Ue(e.months("short", !1), 1);
      case "LLLL":
        return Ue(e.months("long", !1), 1);
      case "d":
        return X(o);
      case "dd":
        return X(s);
      case "o":
        return X(l);
      case "ooo":
        return X(r);
      case "HH":
        return X(s);
      case "H":
        return X(o);
      case "hh":
        return X(s);
      case "h":
        return X(o);
      case "mm":
        return X(s);
      case "m":
        return X(o);
      case "q":
        return X(o);
      case "qq":
        return X(s);
      case "s":
        return X(o);
      case "ss":
        return X(s);
      case "S":
        return X(l);
      case "SSS":
        return X(r);
      case "u":
        return wn(f);
      case "uu":
        return wn(o);
      case "uuu":
        return X(n);
      case "a":
        return Ue(e.meridiems(), 0);
      case "kkkk":
        return X(a);
      case "kk":
        return X(d, ws);
      case "W":
        return X(o);
      case "WW":
        return X(s);
      case "E":
      case "c":
        return X(n);
      case "EEE":
        return Ue(e.weekdays("short", !1), 1);
      case "EEEE":
        return Ue(e.weekdays("long", !1), 1);
      case "ccc":
        return Ue(e.weekdays("short", !0), 1);
      case "cccc":
        return Ue(e.weekdays("long", !0), 1);
      case "Z":
      case "ZZ":
        return Jr(new RegExp(`([+-]${o.source})(?::(${s.source}))?`), 2);
      case "ZZZ":
        return Jr(new RegExp(`([+-]${o.source})(${s.source})?`), 2);
      case "z":
        return wn(/[a-z_+-/]{1,256}?/i);
      case " ":
        return wn(/[^\S\n\r]/);
      default:
        return p(v);
    }
  })(t) || {
    invalidReason: Pf
  };
  return S.token = t, S;
}
const $f = {
  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",
  hour12: {
    numeric: "h",
    "2-digit": "hh"
  },
  hour24: {
    numeric: "H",
    "2-digit": "HH"
  },
  minute: {
    numeric: "m",
    "2-digit": "mm"
  },
  second: {
    numeric: "s",
    "2-digit": "ss"
  },
  timeZoneName: {
    long: "ZZZZZ",
    short: "ZZZ"
  }
};
function zf(t, e, n) {
  const { type: s, value: r } = t;
  if (s === "literal") {
    const l = /^\s+$/.test(r);
    return {
      literal: !l,
      val: l ? " " : r
    };
  }
  const a = e[s];
  let i = s;
  s === "hour" && (e.hour12 != null ? i = e.hour12 ? "hour12" : "hour24" : e.hourCycle != null ? e.hourCycle === "h11" || e.hourCycle === "h12" ? i = "hour12" : i = "hour24" : i = n.hour12 ? "hour12" : "hour24");
  let o = $f[i];
  if (typeof o == "object" && (o = o[a]), o)
    return {
      literal: !1,
      val: o
    };
}
function Wf(t) {
  return [`^${t.map((n) => n.regex).reduce((n, s) => `${n}(${s.source})`, "")}$`, t];
}
function jf(t, e, n) {
  const s = t.match(e);
  if (s) {
    const r = {};
    let a = 1;
    for (const i in n)
      if (Ht(n, i)) {
        const o = n[i], l = o.groups ? o.groups + 1 : 1;
        !o.literal && o.token && (r[o.token.val[0]] = o.deser(s.slice(a, a + l))), a += l;
      }
    return [s, r];
  } else
    return [s, {}];
}
function Hf(t) {
  const e = (a) => {
    switch (a) {
      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, s;
  return B(t.z) || (n = nt.create(t.z)), B(t.Z) || (n || (n = new Te(t.Z)), s = t.Z), B(t.q) || (t.M = (t.q - 1) * 3 + 1), B(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), B(t.u) || (t.S = Ws(t.u)), [Object.keys(t).reduce((a, i) => {
    const o = e(i);
    return o && (a[o] = t[i]), a;
  }, {}), n, s];
}
let as = null;
function Gf() {
  return as || (as = $.fromMillis(1555555555555)), as;
}
function Zf(t, e) {
  if (t.literal)
    return t;
  const n = _e.macroTokenToFormatOpts(t.val), s = xi(n, e);
  return s == null || s.includes(void 0) ? t : s;
}
function Fi(t, e) {
  return Array.prototype.concat(...t.map((n) => Zf(n, e)));
}
function Pi(t, e, n) {
  const s = Fi(_e.parseFormat(n), t), r = s.map((i) => Uf(i, t)), a = r.find((i) => i.invalidReason);
  if (a)
    return { input: e, tokens: s, invalidReason: a.invalidReason };
  {
    const [i, o] = Wf(r), l = RegExp(i, "i"), [c, f] = jf(e, l, o), [d, m, p] = f ? Hf(f) : [null, null, void 0];
    if (Ht(f, "a") && Ht(f, "H"))
      throw new cn(
        "Can't include meridiem when specifying 24-hour format"
      );
    return { input: e, tokens: s, regex: l, rawMatches: c, matches: f, result: d, zone: m, specificOffset: p };
  }
}
function Bf(t, e, n) {
  const { result: s, zone: r, specificOffset: a, invalidReason: i } = Pi(t, e, n);
  return [s, r, a, i];
}
function xi(t, e) {
  if (!t)
    return null;
  const s = _e.create(e, t).dtFormatter(Gf()), r = s.formatToParts(), a = s.resolvedOptions();
  return r.map((i) => zf(i, t, a));
}
const Ri = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], Vi = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
function Fe(t, e) {
  return new ze(
    "unit out of range",
    `you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`
  );
}
function Ui(t, e, n) {
  const s = new Date(Date.UTC(t, e - 1, n));
  t < 100 && t >= 0 && s.setUTCFullYear(s.getUTCFullYear() - 1900);
  const r = s.getUTCDay();
  return r === 0 ? 7 : r;
}
function $i(t, e, n) {
  return n + (yn(t) ? Vi : Ri)[e - 1];
}
function zi(t, e) {
  const n = yn(t) ? Vi : Ri, s = n.findIndex((a) => a < e), r = e - n[s];
  return { month: s + 1, day: r };
}
function Cs(t) {
  const { year: e, month: n, day: s } = t, r = $i(e, n, s), a = Ui(e, n, s);
  let i = Math.floor((r - a + 10) / 7), o;
  return i < 1 ? (o = e - 1, i = $n(o)) : i > $n(e) ? (o = e + 1, i = 1) : o = e, { weekYear: o, weekNumber: i, weekday: a, ...qn(t) };
}
function qr(t) {
  const { weekYear: e, weekNumber: n, weekday: s } = t, r = Ui(e, 1, 4), a = dn(e);
  let i = n * 7 + s - r - 3, o;
  i < 1 ? (o = e - 1, i += dn(o)) : i > a ? (o = e + 1, i -= dn(e)) : o = e;
  const { month: l, day: c } = zi(o, i);
  return { year: o, month: l, day: c, ...qn(t) };
}
function is(t) {
  const { year: e, month: n, day: s } = t, r = $i(e, n, s);
  return { year: e, ordinal: r, ...qn(t) };
}
function Qr(t) {
  const { year: e, ordinal: n } = t, { month: s, day: r } = zi(e, n);
  return { year: e, month: s, day: r, ...qn(t) };
}
function Yf(t) {
  const e = Yn(t.weekYear), n = et(t.weekNumber, 1, $n(t.weekYear)), s = et(t.weekday, 1, 7);
  return e ? n ? s ? !1 : Fe("weekday", t.weekday) : Fe("week", t.week) : Fe("weekYear", t.weekYear);
}
function Kf(t) {
  const e = Yn(t.year), n = et(t.ordinal, 1, dn(t.year));
  return e ? n ? !1 : Fe("ordinal", t.ordinal) : Fe("year", t.year);
}
function Wi(t) {
  const e = Yn(t.year), n = et(t.month, 1, 12), s = et(t.day, 1, Un(t.year, t.month));
  return e ? n ? s ? !1 : Fe("day", t.day) : Fe("month", t.month) : Fe("year", t.year);
}
function ji(t) {
  const { hour: e, minute: n, second: s, millisecond: r } = t, a = et(e, 0, 23) || e === 24 && n === 0 && s === 0 && r === 0, i = et(n, 0, 59), o = et(s, 0, 59), l = et(r, 0, 999);
  return a ? i ? o ? l ? !1 : Fe("millisecond", r) : Fe("second", s) : Fe("minute", n) : Fe("hour", e);
}
const os = "Invalid DateTime", Xr = 864e13;
function Cn(t) {
  return new ze("unsupported zone", `the zone "${t.name}" is not supported`);
}
function ls(t) {
  return t.weekData === null && (t.weekData = Cs(t.c)), t.weekData;
}
function vt(t, e) {
  const n = {
    ts: t.ts,
    zone: t.zone,
    c: t.c,
    o: t.o,
    loc: t.loc,
    invalid: t.invalid
  };
  return new $({ ...n, ...e, old: n });
}
function Hi(t, e, n) {
  let s = t - e * 60 * 1e3;
  const r = n.offset(s);
  if (e === r)
    return [s, e];
  s -= (r - e) * 60 * 1e3;
  const a = n.offset(s);
  return r === a ? [s, r] : [t - Math.min(r, a) * 60 * 1e3, Math.max(r, a)];
}
function Dn(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 Fn(t, e, n) {
  return Hi(Kn(t), e, n);
}
function ea(t, e) {
  const n = t.o, s = t.c.year + Math.trunc(e.years), r = t.c.month + Math.trunc(e.months) + Math.trunc(e.quarters) * 3, a = {
    ...t.c,
    year: s,
    month: r,
    day: Math.min(t.c.day, Un(s, r)) + Math.trunc(e.days) + Math.trunc(e.weeks) * 7
  }, i = J.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 = Kn(a);
  let [l, c] = Hi(o, n, t.zone);
  return i !== 0 && (l += i, c = t.zone.offset(l)), { ts: l, o: c };
}
function on(t, e, n, s, r, a) {
  const { setZone: i, zone: o } = n;
  if (t && Object.keys(t).length !== 0 || e) {
    const l = e || o, c = $.fromObject(t, {
      ...n,
      zone: l,
      specificOffset: a
    });
    return i ? c : c.setZone(o);
  } else
    return $.invalid(
      new ze("unparsable", `the input "${r}" can't be parsed as ${s}`)
    );
}
function Mn(t, e, n = !0) {
  return t.isValid ? _e.create(ne.create("en-US"), {
    allowZ: n,
    forceSimple: !0
  }).formatDateTimeFromString(t, e) : null;
}
function cs(t, e) {
  const n = t.c.year > 9999 || t.c.year < 0;
  let s = "";
  return n && t.c.year >= 0 && (s += "+"), s += fe(t.c.year, n ? 6 : 4), e ? (s += "-", s += fe(t.c.month), s += "-", s += fe(t.c.day)) : (s += fe(t.c.month), s += fe(t.c.day)), s;
}
function ta(t, e, n, s, r, a) {
  let i = fe(t.c.hour);
  return e ? (i += ":", i += fe(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (i += ":")) : i += fe(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (i += fe(t.c.second), (t.c.millisecond !== 0 || !s) && (i += ".", i += fe(t.c.millisecond, 3))), r && (t.isOffsetFixed && t.offset === 0 && !a ? i += "Z" : t.o < 0 ? (i += "-", i += fe(Math.trunc(-t.o / 60)), i += ":", i += fe(Math.trunc(-t.o % 60))) : (i += "+", i += fe(Math.trunc(t.o / 60)), i += ":", i += fe(Math.trunc(t.o % 60)))), a && (i += "[" + t.zone.ianaName + "]"), i;
}
const Gi = {
  month: 1,
  day: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
}, Jf = {
  weekNumber: 1,
  weekday: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
}, qf = {
  ordinal: 1,
  hour: 0,
  minute: 0,
  second: 0,
  millisecond: 0
}, Zi = ["year", "month", "day", "hour", "minute", "second", "millisecond"], Qf = [
  "weekYear",
  "weekNumber",
  "weekday",
  "hour",
  "minute",
  "second",
  "millisecond"
], Xf = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
function na(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 Ya(t);
  return e;
}
function sa(t, e) {
  const n = ft(e.zone, le.defaultZone), s = ne.fromObject(e), r = le.now();
  let a, i;
  if (B(t.year))
    a = r;
  else {
    for (const c of Zi)
      B(t[c]) && (t[c] = Gi[c]);
    const o = Wi(t) || ji(t);
    if (o)
      return $.invalid(o);
    const l = n.offset(r);
    [a, i] = Fn(t, l, n);
  }
  return new $({ ts: a, zone: n, loc: s, o: i });
}
function ra(t, e, n) {
  const s = B(n.round) ? !0 : n.round, r = (i, o) => (i = js(i, s || n.calendary ? 0 : 2, !0), e.loc.clone(n).relFormatter(n).format(i, o)), a = (i) => n.calendary ? e.hasSame(t, i) ? 0 : e.startOf(i).diff(t.startOf(i), i).get(i) : e.diff(t, i).get(i);
  if (n.unit)
    return r(a(n.unit), n.unit);
  for (const i of n.units) {
    const o = a(i);
    if (Math.abs(o) >= 1)
      return r(o, i);
  }
  return r(t > e ? -0 : 0, n.units[n.units.length - 1]);
}
function aa(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 $ {
  constructor(e) {
    const n = e.zone || le.defaultZone;
    let s = e.invalid || (Number.isNaN(e.ts) ? new ze("invalid input") : null) || (n.isValid ? null : Cn(n));
    this.ts = B(e.ts) ? le.now() : e.ts;
    let r = null, a = null;
    if (!s)
      if (e.old && e.old.ts === this.ts && e.old.zone.equals(n))
        [r, a] = [e.old.c, e.old.o];
      else {
        const o = n.offset(this.ts);
        r = Dn(this.ts, o), s = Number.isNaN(r.year) ? new ze("invalid input") : null, r = s ? null : r, a = s ? null : o;
      }
    this._zone = n, this.loc = e.loc || ne.create(), this.invalid = s, this.weekData = null, this.c = r, this.o = a, this.isLuxonDateTime = !0;
  }
  static now() {
    return new $({});
  }
  static local() {
    const [e, n] = aa(arguments), [s, r, a, i, o, l, c] = n;
    return sa({ year: s, month: r, day: a, hour: i, minute: o, second: l, millisecond: c }, e);
  }
  static utc() {
    const [e, n] = aa(arguments), [s, r, a, i, o, l, c] = n;
    return e.zone = Te.utcInstance, sa({ year: s, month: r, day: a, hour: i, minute: o, second: l, millisecond: c }, e);
  }
  static fromJSDate(e, n = {}) {
    const s = Ou(e) ? e.valueOf() : NaN;
    if (Number.isNaN(s))
      return $.invalid("invalid input");
    const r = ft(n.zone, le.defaultZone);
    return r.isValid ? new $({
      ts: s,
      zone: r,
      loc: ne.fromObject(n)
    }) : $.invalid(Cn(r));
  }
  static fromMillis(e, n = {}) {
    if (It(e))
      return e < -Xr || e > Xr ? $.invalid("Timestamp out of range") : new $({
        ts: e,
        zone: ft(n.zone, le.defaultZone),
        loc: ne.fromObject(n)
      });
    throw new De(
      `fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`
    );
  }
  static fromSeconds(e, n = {}) {
    if (It(e))
      return new $({
        ts: e * 1e3,
        zone: ft(n.zone, le.defaultZone),
        loc: ne.fromObject(n)
      });
    throw new De("fromSeconds requires a numerical input");
  }
  static fromObject(e, n = {}) {
    e = e || {};
    const s = ft(n.zone, le.defaultZone);
    if (!s.isValid)
      return $.invalid(Cn(s));
    const r = le.now(), a = B(n.specificOffset) ? s.offset(r) : n.specificOffset, i = zn(e, na), o = !B(i.ordinal), l = !B(i.year), c = !B(i.month) || !B(i.day), f = l || c, d = i.weekYear || i.weekNumber, m = ne.fromObject(n);
    if ((f || o) && d)
      throw new cn(
        "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
      );
    if (c && o)
      throw new cn("Can't mix ordinal dates with month/day");
    const p = d || i.weekday && !f;
    let N, S, v = Dn(r, a);
    p ? (N = Qf, S = Jf, v = Cs(v)) : o ? (N = Xf, S = qf, v = is(v)) : (N = Zi, S = Gi);
    let g = !1;
    for (const F of N) {
      const z = i[F];
      B(z) ? g ? i[F] = S[F] : i[F] = v[F] : g = !0;
    }
    const E = p ? Yf(i) : o ? Kf(i) : Wi(i), I = E || ji(i);
    if (I)
      return $.invalid(I);
    const _ = p ? qr(i) : o ? Qr(i) : i, [O, T] = Fn(_, a, s), D = new $({
      ts: O,
      zone: s,
      o: T,
      loc: m
    });
    return i.weekday && f && e.weekday !== D.weekday ? $.invalid(
      "mismatched weekday",
      `you can't specify both a weekday of ${i.weekday} and a date of ${D.toISO()}`
    ) : D;
  }
  static fromISO(e, n = {}) {
    const [s, r] = pf(e);
    return on(s, r, n, "ISO 8601", e);
  }
  static fromRFC2822(e, n = {}) {
    const [s, r] = _f(e);
    return on(s, r, n, "RFC 2822", e);
  }
  static fromHTTP(e, n = {}) {
    const [s, r] = Ef(e);
    return on(s, r, n, "HTTP", n);
  }
  static fromFormat(e, n, s = {}) {
    if (B(e) || B(n))
      throw new De("fromFormat requires an input string and a format");
    const { locale: r = null, numberingSystem: a = null } = s, i = ne.fromOpts({
      locale: r,
      numberingSystem: a,
      defaultToEN: !0
    }), [o, l, c, f] = Bf(i, e, n);
    return f ? $.invalid(f) : on(o, l, s, `format ${n}`, e, c);
  }
  static fromString(e, n, s = {}) {
    return $.fromFormat(e, n, s);
  }
  static fromSQL(e, n = {}) {
    const [s, r] = Sf(e);
    return on(s, r, n, "SQL", e);
  }
  static invalid(e, n = null) {
    if (!e)
      throw new De("need to specify a reason the DateTime is invalid");
    const s = e instanceof ze ? e : new ze(e, n);
    if (le.throwOnInvalid)
      throw new su(s);
    return new $({ invalid: s });
  }
  static isDateTime(e) {
    return e && e.isLuxonDateTime || !1;
  }
  static parseFormatForOpts(e, n = {}) {
    const s = xi(e, ne.fromObject(n));
    return s ? s.map((r) => r ? r.val : null).join("") : null;
  }
  static expandFormat(e, n = {}) {
    return Fi(_e.parseFormat(e), ne.fromObject(n)).map((r) => r.val).join("");
  }
  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 ? ls(this).weekYear : NaN;
  }
  get weekNumber() {
    return this.isValid ? ls(this).weekNumber : NaN;
  }
  get weekday() {
    return this.isValid ? ls(this).weekday : NaN;
  }
  get ordinal() {
    return this.isValid ? is(this.c).ordinal : NaN;
  }
  get monthShort() {
    return this.isValid ? Ln.months("short", { locObj: this.loc })[this.month - 1] : null;
  }
  get monthLong() {
    return this.isValid ? Ln.months("long", { locObj: this.loc })[this.month - 1] : null;
  }
  get weekdayShort() {
    return this.isValid ? Ln.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
  }
  get weekdayLong() {
    return this.isValid ? Ln.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;
  }
  getPossibleOffsets() {
    if (!this.isValid || this.isOffsetFixed)
      return [this];
    const e = 864e5, n = 6e4, s = Kn(this.c), r = this.zone.offset(s - e), a = this.zone.offset(s + e), i = this.zone.offset(s - r * n), o = this.zone.offset(s - a * n);
    if (i === o)
      return [this];
    const l = s - i * n, c = s - o * n, f = Dn(l, i), d = Dn(c, o);
    return f.hour === d.hour && f.minute === d.minute && f.second === d.second && f.millisecond === d.millisecond ? [vt(this, { ts: l }), vt(this, { ts: c })] : [this];
  }
  get isInLeapYear() {
    return yn(this.year);
  }
  get daysInMonth() {
    return Un(this.year, this.month);
  }
  get daysInYear() {
    return this.isValid ? dn(this.year) : NaN;
  }
  get weeksInWeekYear() {
    return this.isValid ? $n(this.weekYear) : NaN;
  }
  resolvedLocaleOptions(e = {}) {
    const { locale: n, numberingSystem: s, calendar: r } = _e.create(
      this.loc.clone(e),
      e
    ).resolvedOptions(this);
    return { locale: n, numberingSystem: s, outputCalendar: r };
  }
  toUTC(e = 0, n = {}) {
    return this.setZone(Te.instance(e), n);
  }
  toLocal() {
    return this.setZone(le.defaultZone);
  }
  setZone(e, { keepLocalTime: n = !1, keepCalendarTime: s = !1 } = {}) {
    if (e = ft(e, le.defaultZone), e.equals(this.zone))
      return this;
    if (e.isValid) {
      let r = this.ts;
      if (n || s) {
        const a = e.offset(this.ts), i = this.toObject();
        [r] = Fn(i, a, e);
      }
      return vt(this, { ts: r, zone: e });
    } else
      return $.invalid(Cn(e));
  }
  reconfigure({ locale: e, numberingSystem: n, outputCalendar: s } = {}) {
    const r = this.loc.clone({ locale: e, numberingSystem: n, outputCalendar: s });
    return vt(this, { loc: r });
  }
  setLocale(e) {
    return this.reconfigure({ locale: e });
  }
  set(e) {
    if (!this.isValid)
      return this;
    const n = zn(e, na), s = !B(n.weekYear) || !B(n.weekNumber) || !B(n.weekday), r = !B(n.ordinal), a = !B(n.year), i = !B(n.month) || !B(n.day), o = a || i, l = n.weekYear || n.weekNumber;
    if ((o || r) && l)
      throw new cn(
        "Can't mix weekYear/weekNumber units with year/month/day or ordinals"
      );
    if (i && r)
      throw new cn("Can't mix ordinal dates with month/day");
    let c;
    s ? c = qr({ ...Cs(this.c), ...n }) : B(n.ordinal) ? (c = { ...this.toObject(), ...n }, B(n.day) && (c.day = Math.min(Un(c.year, c.month), c.day))) : c = Qr({ ...is(this.c), ...n });
    const [f, d] = Fn(c, this.o, this.zone);
    return vt(this, { ts: f, o: d });
  }
  plus(e) {
    if (!this.isValid)
      return this;
    const n = J.fromDurationLike(e);
    return vt(this, ea(this, n));
  }
  minus(e) {
    if (!this.isValid)
      return this;
    const n = J.fromDurationLike(e).negate();
    return vt(this, ea(this, n));
  }
  startOf(e) {
    if (!this.isValid)
      return this;
    const n = {}, s = J.normalizeUnit(e);
    switch (s) {
      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 (s === "weeks" && (n.weekday = 1), s === "quarters") {
      const r = Math.ceil(this.month / 3);
      n.month = (r - 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 ? _e.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this, e) : os;
  }
  toLocaleString(e = Vn, n = {}) {
    return this.isValid ? _e.create(this.loc.clone(n), e).formatDateTime(this) : os;
  }
  toLocaleParts(e = {}) {
    return this.isValid ? _e.create(this.loc.clone(e), e).formatDateTimeParts(this) : [];
  }
  toISO({
    format: e = "extended",
    suppressSeconds: n = !1,
    suppressMilliseconds: s = !1,
    includeOffset: r = !0,
    extendedZone: a = !1
  } = {}) {
    if (!this.isValid)
      return null;
    const i = e === "extended";
    let o = cs(this, i);
    return o += "T", o += ta(this, i, n, s, r, a), o;
  }
  toISODate({ format: e = "extended" } = {}) {
    return this.isValid ? cs(this, e === "extended") : null;
  }
  toISOWeekDate() {
    return Mn(this, "kkkk-'W'WW-c");
  }
  toISOTime({
    suppressMilliseconds: e = !1,
    suppressSeconds: n = !1,
    includeOffset: s = !0,
    includePrefix: r = !1,
    extendedZone: a = !1,
    format: i = "extended"
  } = {}) {
    return this.isValid ? (r ? "T" : "") + ta(
      this,
      i === "extended",
      n,
      e,
      s,
      a
    ) : null;
  }
  toRFC2822() {
    return Mn(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", !1);
  }
  toHTTP() {
    return Mn(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
  }
  toSQLDate() {
    return this.isValid ? cs(this, !0) : null;
  }
  toSQLTime({ includeOffset: e = !0, includeZone: n = !1, includeOffsetSpace: s = !0 } = {}) {
    let r = "HH:mm:ss.SSS";
    return (n || e) && (s && (r += " "), n ? r += "z" : e && (r += "ZZ")), Mn(this, r, !0);
  }
  toSQL(e = {}) {
    return this.isValid ? `${this.toSQLDate()} ${this.toSQLTime(e)}` : null;
  }
  toString() {
    return this.isValid ? this.toISO() : os;
  }
  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", s = {}) {
    if (!this.isValid || !e.isValid)
      return J.invalid("created by diffing an invalid DateTime");
    const r = { locale: this.locale, numberingSystem: this.numberingSystem, ...s }, a = ku(n).map(J.normalizeUnit), i = e.valueOf() > this.valueOf(), o = i ? this : e, l = i ? e : this, c = Mf(o, l, a, r);
    return i ? c.negate() : c;
  }
  diffNow(e = "milliseconds", n = {}) {
    return this.diff($.now(), e, n);
  }
  until(e) {
    return this.isValid ? ie.fromDateTimes(this, e) : this;
  }
  hasSame(e, n) {
    if (!this.isValid)
      return !1;
    const s = e.valueOf(), r = this.setZone(e.zone, { keepLocalTime: !0 });
    return r.startOf(n) <= s && s <= r.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 || $.fromObject({}, { zone: this.zone }), s = e.padding ? this < n ? -e.padding : e.padding : 0;
    let r = ["years", "months", "days", "hours", "minutes", "seconds"], a = e.unit;
    return Array.isArray(e.unit) && (r = e.unit, a = void 0), ra(n, this.plus(s), {
      ...e,
      numeric: "always",
      units: r,
      unit: a
    });
  }
  toRelativeCalendar(e = {}) {
    return this.isValid ? ra(e.base || $.fromObject({}, { zone: this.zone }), this, {
      ...e,
      numeric: "auto",
      units: ["years", "months", "days"],
      calendary: !0
    }) : null;
  }
  static min(...e) {
    if (!e.every($.isDateTime))
      throw new De("min requires all arguments be DateTimes");
    return Wr(e, (n) => n.valueOf(), Math.min);
  }
  static max(...e) {
    if (!e.every($.isDateTime))
      throw new De("max requires all arguments be DateTimes");
    return Wr(e, (n) => n.valueOf(), Math.max);
  }
  static fromFormatExplain(e, n, s = {}) {
    const { locale: r = null, numberingSystem: a = null } = s, i = ne.fromOpts({
      locale: r,
      numberingSystem: a,
      defaultToEN: !0
    });
    return Pi(i, e, n);
  }
  static fromStringExplain(e, n, s = {}) {
    return $.fromFormatExplain(e, n, s);
  }
  static get DATE_SHORT() {
    return Vn;
  }
  static get DATE_MED() {
    return Ka;
  }
  static get DATE_MED_WITH_WEEKDAY() {
    return iu;
  }
  static get DATE_FULL() {
    return Ja;
  }
  static get DATE_HUGE() {
    return qa;
  }
  static get TIME_SIMPLE() {
    return Qa;
  }
  static get TIME_WITH_SECONDS() {
    return Xa;
  }
  static get TIME_WITH_SHORT_OFFSET() {
    return ei;
  }
  static get TIME_WITH_LONG_OFFSET() {
    return ti;
  }
  static get TIME_24_SIMPLE() {
    return ni;
  }
  static get TIME_24_WITH_SECONDS() {
    return si;
  }
  static get TIME_24_WITH_SHORT_OFFSET() {
    return ri;
  }
  static get TIME_24_WITH_LONG_OFFSET() {
    return ai;
  }
  static get DATETIME_SHORT() {
    return ii;
  }
  static get DATETIME_SHORT_WITH_SECONDS() {
    return oi;
  }
  static get DATETIME_MED() {
    return li;
  }
  static get DATETIME_MED_WITH_SECONDS() {
    return ci;
  }
  static get DATETIME_MED_WITH_WEEKDAY() {
    return ou;
  }
  static get DATETIME_FULL() {
    return ui;
  }
  static get DATETIME_FULL_WITH_SECONDS() {
    return fi;
  }
  static get DATETIME_HUGE() {
    return di;
  }
  static get DATETIME_HUGE_WITH_SECONDS() {
    return mi;
  }
}
function ln(t) {
  if ($.isDateTime(t))
    return t;
  if (t && t.valueOf && It(t.valueOf()))
    return $.fromJSDate(t);
  if (t && typeof t == "object")
    return $.fromObject(t);
  throw new De(
    `Unknown datetime argument: ${t}, of type ${typeof t}`
  );
}
const ed = { class: "az-flex az-gap-2 az-flex-col" }, td = {
  class: "az-font-medium az-uppercase az-text-primary-500",
  style: { "text-transform": "uppercase" }
}, nd = { class: "az-flex az-gap-2 az-flex-col" }, sd = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    locale: {},
    slots: {}
  },
  emits: ["onSelect"],
  setup(t, { emit: e }) {
    const n = t;
    Ie(n.locale);
    const s = e;
    le.defaultLocale = n.locale;
    function r(i) {
      return $.fromISO(i).toFormat("cccc dd MMMM yy");
    }
    function a(i) {
      s("onSelect", i);
    }
    return (i, o) => (j(), re("div", ed, [
      x("div", td, ce(r(n.slots.day)), 1),
      x("div", nd, [
        n.slots.slots.length > 0 ? (j(), re(tt, { key: 0 }, [
          n.slots.getMorningSlots().length > 0 ? (j(), ae(Ar, {
            key: 0,
            hours: n.slots.getMorningSlots(),
            timeZone: n.slots.timeZone,
            locale: n.locale,
            onOnDateSelect: a
          }, null, 8, ["hours", "timeZone", "locale"])) : ee("", !0),
          n.slots.getAfternoonSlots().length > 0 ? (j(), ae(Ar, {
            key: 1,
            hours: n.slots.getAfternoonSlots(),
            timeZone: n.slots.timeZone,
            locale: n.locale,
            onOnDateSelect: a
          }, null, 8, ["hours", "timeZone", "locale"])) : ee("", !0)
        ], 64)) : ee("", !0)
      ])
    ]));
  }
}), ia = "yyyy-MM-dd";
function rd(t, e, n, s, r, a, i) {
  const o = A([]), l = A(!0), c = A(!1), f = A(!0), d = A($.now()), m = A(d.value.plus({ days: s }));
  function p(g = !1) {
    !(r != null && r.id) || !(i != null && i.id) || (g ? c.value = !0 : l.value = !0, e.getFreeSlots(
      r.id,
      d.value.toFormat(ia),
      m.value.toFormat(ia),
      i == null ? void 0 : i.id,
      (a == null ? void 0 : a.id) || "0",
      n
    ).then((E) => {
      var I, _, O;
      (I = E.result) != null && I.items && (o.value = o.value.concat((_ = E.result) == null ? void 0 : _.items)), v((O = E.result) == null ? void 0 : O.items);
    }).finally(() => {
      g ? c.value = !1 : l.value = !1;
    }));
  }
  p();
  function N() {
    d.value = d.value.plus({ days: s + 1 }), m.value = m.value.plus({ days: s + 1 }), p(!0);
  }
  function S(g) {
    return g.slots.length > 0;
  }
  function v(g) {
    f.value = !1, (!g || g.length === 0) && (f.value = !1), g == null || g.forEach((E) => {
      var I;
      f.value = f.value || E.slots && ((I = E.slots) == null ? void 0 : I.length) > 0;
    });
  }
  return {
    freeSlots: o,
    loading: l,
    loadingMore: c,
    hasSlots: f,
    start: d,
    end: m,
    loadMore: N,
    hasHours: S
  };
}
const ad = {
  key: 0,
  class: "az-flex az-flex-col az-gap-4"
}, id = { key: 1 }, od = { class: "az-flex az-justify-center az-p-2" }, ld = {
  key: 0,
  class: "az-btn az-btn-color-primary az-btn-size-large az-btn-loading az-btn-color-transparent",
  disabled: ""
}, cd = ["aria-Label"], ud = {
  key: 1,
  class: "az-flex az-flex-col az-gap-4"
}, fd = /* @__PURE__ */ x("div", { class: "az-card-body" }, [
  /* @__PURE__ */ x("div"),
  /* @__PURE__ */ x("div"),
  /* @__PURE__ */ x("div")
], -1), dd = [
  fd
], md = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    api: {},
    locale: {},
    position: {},
    counter: {},
    timeZone: {},
    company: {},
    staff: {},
    service: {},
    numberOfDays: { default: 5 }
  },
  emits: ["onSelect", "onError"],
  setup(t, { emit: e }) {
    const n = t, s = Ie(n.locale), r = e, {
      freeSlots: a,
      loading: i,
      loadingMore: o,
      start: l,
      end: c,
      loadMore: f,
      hasHours: d,
      hasSlots: m
    } = rd(r, n.api, n.timeZone, n.numberOfDays, n.company, n.staff, n.service);
    function p(N) {
      r("onSelect", N);
    }
    return (N, S) => (j(), ae(He, {
      pageId: "booking-widget-page-date",
      position: n.position,
      locale: n.locale,
      counter: n.counter,
      title: k(s).global.t("event-booking-widget.title.date"),
      api: n.api
    }, {
      default: Ne(() => [
        k(i) ? ee("", !0) : (j(), re("div", ad, [
          k(a) && k(m) ? (j(!0), re(tt, { key: 0 }, fs(k(a), (v) => (j(), re(tt, null, [
            k(d)(v) ? (j(), ae(sd, {
              key: 0,
              slots: v,
              locale: n.locale,
              onOnSelect: p
            }, null, 8, ["slots", "locale"])) : ee("", !0)
          ], 64))), 256)) : ee("", !0),
          k(m) ? ee("", !0) : (j(), re("div", id, ce(k(s).global.t("event-booking-widget.date.empty", {
            start: k(l).toFormat("dd/MM/yyyy"),
            end: k(c).toFormat("dd/MM/yyyy")
          })), 1)),
          x("div", od, [
            k(o) ? (j(), re("button", ld)) : ee("", !0),
            k(o) ? ee("", !0) : (j(), re("a", {
              key: 1,
              class: "az-link",
              onClick: S[0] || (S[0] = (...v) => k(f) && k(f)(...v)),
              "aria-Label": k(s).global.t("event-booking-widget.date.search-more-aria-label")
            }, ce(k(s).global.t("event-booking-widget.date.search-more")), 9, cd))
          ])
        ])),
        k(i) ? (j(), re("div", ud, [
          (j(), re(tt, null, fs(3, (v) => x("div", {
            class: "az-card-content az-card-pulse az-flex az-flex-col",
            key: v
          }, dd)), 64))
        ])) : ee("", !0)
      ]),
      _: 1
    }, 8, ["position", "locale", "counter", "title", "api"]));
  }
});
const hd = { class: "az-list-items-container" }, gd = {
  class: "az-list-items-wrapper az-flex az-flex-col az-gap-2",
  role: "listbox"
}, pd = {
  id: "contact-qualif-yes",
  class: "az-card-content",
  tabindex: "0"
}, _d = { class: "az-card-icon" }, Ed = { class: "az-card-body" }, yd = { class: "az-font-medium" }, vd = {
  id: "contact-qualif-no",
  class: "az-card-content",
  tabindex: "0"
}, Nd = { class: "az-card-icon" }, Td = { class: "az-card-body" }, Id = { class: "az-font-medium" }, bd = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    api: {},
    locale: {},
    counter: {},
    position: {}
  },
  emits: ["onSelect", "onError"],
  setup(t, { expose: e, emit: n }) {
    const s = t, r = Ie(s.locale), a = n, i = A();
    function o(c) {
      a("onSelect", c);
    }
    function l() {
      Wn(() => {
        var c, f;
        (c = i == null ? void 0 : i.value) != null && c.focus && ((f = i == null ? void 0 : i.value) == null || f.focus());
      });
    }
    return e({ focus: l }), (c, f) => (j(), ae(He, {
      pageId: "booking-widget-page-contact-qualif",
      position: s.position,
      locale: s.locale,
      counter: s.counter,
      title: k(r).global.t("event-booking-widget.title.contact-qualif"),
      api: s.api
    }, {
      default: Ne(() => [
        x("div", hd, [
          x("ul", gd, [
            x("li", {
              id: "booking-contact-qualif-new",
              class: "az-list-item az-card",
              ref_key: "widgetContactQualif",
              ref: i,
              role: "option",
              onClick: f[0] || (f[0] = (d) => o(!0)),
              onKeyup: f[1] || (f[1] = Pn((d) => o(!0), ["enter"]))
            }, [
              x("div", pd, [
                x("div", _d, [
                  Xe(k(Ks), {
                    icon: "fa-regular fa-check",
                    size: 40,
                    color: "lightprimary",
                    shape: "circle"
                  })
                ]),
                x("div", Ed, [
                  x("div", yd, ce(k(r).global.t("event-booking-widget.contact.qualif.new-contact")), 1)
                ])
              ])
            ], 544),
            x("li", {
              id: "booking-contact-qualif-search",
              class: "az-list-item az-card",
              role: "option",
              onClick: f[2] || (f[2] = (d) => o(!1)),
              onKeyup: f[3] || (f[3] = Pn((d) => o(!1), ["enter"]))
            }, [
              x("div", vd, [
                x("div", Nd, [
                  Xe(k(Ks), {
                    icon: "fa-regular fa-close",
                    size: 40,
                    color: "lightprimary",
                    shape: "circle"
                  })
                ]),
                x("div", Td, [
                  x("div", Id, ce(k(r).global.t("event-booking-widget.contact.qualif.existing-contact")), 1)
                ])
              ])
            ], 32)
          ])
        ])
      ]),
      _: 1
    }, 8, ["position", "locale", "counter", "title", "api"]));
  }
});
function Sd(t, e, n, s, r, a, i) {
  const o = A(!1), l = A(""), c = A(""), f = A(), d = A(), m = A(!1), p = A(""), N = A(!0), S = A(!1), v = A(""), g = A(!1), E = A(!1), I = A(!1), _ = A(!1), O = A(!1);
  s && !s.id && (l.value = s.firstName || "", c.value = s.lastName || "", f.value = s.email, d.value = s.phone), T();
  function T() {
    if (!r) {
      m.value = !1, p.value = "", N.value = !0, S.value = !1, v.value = "", g.value = !1;
      return;
    }
    e.getPrivacyPolicy(r.owner.id, r.owner.userName).then((G) => {
      const P = G.result;
      if (N.value = !1, P && P.privateData && P.privateData.consentMode === "ON" && P.privateData.consentText)
        switch (m.value = !0, a == null ? void 0 : a.toLowerCase()) {
          case "en":
            p.value = P.privateData.consentText.EN;
            break;
          case "de":
            p.value = P.privateData.consentText.DE;
            break;
          case "es":
            p.value = P.privateData.consentText.ES;
            break;
          case "pt":
            p.value = P.privateData.consentText.PT;
            break;
          case "it":
            p.value = P.privateData.consentText.IT;
            break;
          case "nl":
            p.value = P.privateData.consentText.NL;
            break;
          case "fr":
          default:
            p.value = P.privateData.consentText.FR;
        }
      else
        m.value = !1, N.value = !0, p.value = "";
      if (P && P.marketing && P.marketing.consentMode === "ON" && P.marketing.consentText)
        switch (S.value = !0, a == null ? void 0 : a.toLowerCase()) {
          case "en":
            v.value = P.marketing.consentText.EN;
            break;
          case "de":
            v.value = P.marketing.consentText.DE;
            break;
          case "es":
            v.value = P.marketing.consentText.ES;
            break;
          case "pt":
            v.value = P.marketing.consentText.PT;
            break;
          case "it":
            v.value = P.marketing.consentText.IT;
            break;
          case "nl":
            v.value = P.marketing.consentText.NL;
            break;
          case "fr":
          default:
            v.value = P.marketing.consentText.FR;
        }
      else
        S.value = !1, v.value = "", g.value = !1;
    });
  }
  function D(G, P) {
    const R = typeof P == "boolean" ? P : typeof P == "string" ? P.length > 0 : P.isValid;
    switch (G) {
      case "firstName":
        E.value = R;
        break;
      case "lastName":
        I.value = R;
        break;
      case "email":
        _.value = R;
        break;
      case "phone":
        O.value = R;
        break;
      case "privacyConsent":
        N.value = R;
        break;
    }
    let V = E.value && I.value && _.value && O.value && N.value && !o.value;
    t("onValidate", V, F());
  }
  function F() {
    const G = new No();
    return G.firstName = l.value, G.lastName = c.value, G.email = f.value, G.phone = d.value, G.email && (G.emailAddresses = [{ email: G.email, primary: !0 }]), G.phone && (G.phoneNumbers = [{ number: G.phone, primary: !0 }]), S.value && g.value && (G.marketingConsent = { text: v.value }), G;
  }
  function z() {
    n != null && n.value && (n == null || n.value.focus());
  }
  return st(() => {
    z();
  }), {
    firstName: l,
    lastName: c,
    email: f,
    phone: d,
    hasPrivacyConsent: m,
    privacyConsentText: p,
    privacyConsentValid: N,
    hasMarketingConsent: S,
    marketingConsentText: v,
    marketingConsentValid: g,
    validatedField: D,
    focus: z
  };
}
const Od = { class: "az-flex az-flex-col az-gap-4" }, kd = { class: "az-text-grey-500" }, Ld = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    api: {},
    locale: {},
    position: {},
    counter: {},
    logger: {},
    contact: {},
    company: {}
  },
  emits: ["onValidate", "onLoading", "onError"],
  setup(t, { expose: e, emit: n }) {
    const s = t, r = Ie(s.locale), a = n, i = A(null), {
      firstName: o,
      lastName: l,
      email: c,
      phone: f,
      hasPrivacyConsent: d,
      privacyConsentText: m,
      privacyConsentValid: p,
      hasMarketingConsent: N,
      marketingConsentText: S,
      marketingConsentValid: v,
      validatedField: g,
      focus: E
    } = Sd(a, s.api, i, s.contact, s.company, s.locale, s.logger);
    return e({
      focus: E
    }), (I, _) => (j(), ae(He, {
      pageId: "booking-widget-page-contact-new",
      position: s.position,
      locale: s.locale,
      counter: s.counter,
      title: k(r).global.t("event-booking-widget.title.contact-new"),
      api: s.api
    }, {
      default: Ne(() => [
        x("div", Od, [
          x("span", kd, ce(k(r).global.t("event-booking-widget.contact.createDescription")), 1),
          Xe(k(Js), {
            id: "lastName",
            ref_key: "azContactLastName",
            ref: i,
            modelValue: k(l),
            "onUpdate:modelValue": _[0] || (_[0] = (O) => qe(l) ? l.value = O : null),
            mandatory: k(ct).mandatory,
            label: k(r).global.t("event-booking-widget.contact.lastName.label"),
            placeholder: k(r).global.t("event-booking-widget.contact.lastName.placeholder"),
            onValidated: _[1] || (_[1] = (O) => {
              k(g)("lastName", O);
            }),
            locale: s.locale
          }, null, 8, ["modelValue", "mandatory", "label", "placeholder", "locale"]),
          Xe(k(Js), {
            id: "firstName",
            modelValue: k(o),
            "onUpdate:modelValue": _[2] || (_[2] = (O) => qe(o) ? o.value = O : null),
            mandatory: k(ct).mandatory,
            label: k(r).global.t("event-booking-widget.contact.firstName.label"),
            placeholder: k(r).global.t("event-booking-widget.contact.firstName.placeholder"),
            locale: s.locale,
            onValidated: _[3] || (_[3] = (O) => {
              k(g)("firstName", O);
            })
          }, null, 8, ["modelValue", "mandatory", "label", "placeholder", "locale"]),
          Xe(k(uo), {
            id: "email",
            modelValue: k(c),
            "onUpdate:modelValue": _[4] || (_[4] = (O) => qe(c) ? c.value = O : null),
            mandatory: k(ct).mandatory,
            label: k(r).global.t("event-booking-widget.contact.email.label"),
            placeholder: k(r).global.t("event-booking-widget.contact.email.placeholder"),
            locale: s.locale,
            onValidated: _[5] || (_[5] = (O) => {
              k(g)("email", O);
            })
          }, null, 8, ["modelValue", "mandatory", "label", "placeholder", "locale"]),
          Xe(k(fo), {
            id: "phone",
            modelValue: k(f),
            "onUpdate:modelValue": _[6] || (_[6] = (O) => qe(f) ? f.value = O : null),
            mandatory: k(ct).mandatory,
            label: k(r).global.t("event-booking-widget.contact.phone.label"),
            placeholder: k(r).global.t("event-booking-widget.contact.phone.placeholder"),
            locale: s.locale,
            onValidated: _[7] || (_[7] = (O) => {
              k(g)("phone", O);
            })
          }, null, 8, ["modelValue", "mandatory", "label", "placeholder", "locale"]),
          k(d) ? (j(), ae(k(xn), {
            key: 0,
            id: "privacyConsent",
            modelValue: k(p),
            "onUpdate:modelValue": [
              _[8] || (_[8] = (O) => qe(p) ? p.value = O : null),
              _[9] || (_[9] = (O) => {
                k(g)("privacyConsent", O);
              })
            ],
            label: k(m),
            mandatory: k(ct).mandatory,
            locale: s.locale,
            attributes: { label: { style: "white-space:normal" } },
            class: "exclude-weglot"
          }, null, 8, ["modelValue", "label", "mandatory", "locale"])) : ee("", !0),
          k(N) ? (j(), ae(k(xn), {
            key: 1,
            id: "marketingConsent",
            modelValue: k(v),
            "onUpdate:modelValue": _[10] || (_[10] = (O) => qe(v) ? v.value = O : null),
            label: k(S),
            mandatory: k(ct).optional,
            locale: s.locale,
            attributes: { label: { style: "white-space:normal" } },
            class: "exclude-weglot"
          }, null, 8, ["modelValue", "label", "mandatory", "locale"])) : ee("", !0)
        ])
      ]),
      _: 1
    }, 8, ["position", "locale", "counter", "title", "api"]));
  }
}), wd = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    api: {},
    locale: {},
    position: {},
    counter: {},
    company: {}
  },
  emits: ["onReady", "onSelect", "onError"],
  setup(t, { expose: e, emit: n }) {
    const s = t, r = Ie(s.locale), a = n;
    function i(c) {
      a("onSelect", c);
    }
    const o = A();
    function l() {
      Wn(() => {
        var c, f;
        (c = o.value) != null && c.focus && ((f = o.value) == null || f.focus());
      });
    }
    return st(() => {
      l(), a("onReady");
    }), e({ focus: l }), (c, f) => (j(), ae(He, {
      pageId: "booking-widget-page-contact-search",
      position: s.position,
      locale: s.locale,
      counter: s.counter,
      title: k(r).global.t("event-booking-widget.title.contact-search"),
      api: s.api
    }, {
      default: Ne(() => {
        var d;
        return [
          Xe(k(vo), {
            ref_key: "clientSearch",
            ref: o,
            id: "booking-widget-contact",
            api: s.api,
            locale: s.locale,
            onSelect: i,
            "show-title": !1,
            organisationEmail: (d = s.company.owner) == null ? void 0 : d.userName
          }, null, 8, ["api", "locale", "organisationEmail"])
        ];
      }),
      _: 1
    }, 8, ["position", "locale", "counter", "title", "api"]));
  }
}), Cd = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    api: {},
    locale: {},
    position: {},
    counter: {},
    companyId: {},
    logger: {},
    fields: {},
    additionalFields: {},
    contact: {}
  },
  emits: ["onValidate", "onLoading", "onError"],
  setup(t, { emit: e }) {
    const n = t, s = Ie(n.locale), r = e, a = A([]), i = A(n.additionalFields || []), o = A(!0);
    function l() {
      var m;
      (m = n.fields) == null || m.forEach((p) => {
        p.inputType === "checklist" && (p.value = []), a.value.push(p);
      }), f(), r("onValidate", o.value, i.value);
    }
    function c(m) {
      o.value = m.isValid, m.values.forEach((p) => {
        const N = i.value.find((S) => S.id === p.id);
        N && (N.value = p.values);
      }), r("onValidate", o.value, i.value);
    }
    function f() {
      d(), a.value.forEach((m) => {
        n.contact && To(m, n.contact), o.value = o.value && !m.mandatory;
      });
    }
    function d() {
      a.value.forEach((m) => {
        m.inputType === "checklist" ? m.value = [] : m.value = void 0;
      });
    }
    return st(() => {
      l();
    }), (m, p) => (j(), ae(He, {
      api: n.api,
      counter: n.counter,
      locale: n.locale,
      pageId: "booking-widget-page-fields",
      position: n.position,
      title: k(s).global.t("event-booking-widget.title.form-field")
    }, {
      default: Ne(() => [
        a.value ? (j(), ae(k(mo), {
          key: 0,
          fields: a.value,
          locale: n.locale,
          logger: n.logger,
          onValidated: c
        }, null, 8, ["fields", "locale", "logger"])) : ee("", !0)
      ]),
      _: 1
    }, 8, ["api", "counter", "locale", "position", "title"]));
  }
});
function Dd(t, e, n, s, r, a, i, o, l, c, f) {
  n("onValidate", !1);
  const d = A(), m = Ie(e), p = A(), N = A(), S = A(!1), v = A(""), g = A(!0), E = A(!1), I = A(""), _ = A(!1), O = A(!!(i != null && i.id));
  function T(P) {
    if (!P) {
      S.value = !1, v.value = "", g.value = !0, E.value = !1, I.value = "", _.value = !1, n("onValidate", !0);
      return;
    }
    t.getPrivacyPolicy(P.owner.id, P.owner.userName).then((R) => {
      var be;
      let V = R.result;
      if (g.value = !1, V && V.privateData && V.privateData.consentMode === "ON" && V.privateData.consentText)
        switch (S.value = !0, e == null ? void 0 : e.toLowerCase()) {
          case "en":
            v.value = V.privateData.consentText.EN;
            break;
          case "de":
            v.value = V.privateData.consentText.DE;
            break;
          case "es":
            v.value = V.privateData.consentText.ES;
            break;
          case "pt":
            v.value = V.privateData.consentText.PT;
            break;
          case "it":
            v.value = V.privateData.consentText.IT;
            break;
          case "nl":
            v.value = V.privateData.consentText.NL;
            break;
          case "fr":
          default:
            v.value = V.privateData.consentText.FR;
        }
      else
        S.value = !1, g.value = !0, v.value = "";
      if (V && V.marketing && V.marketing.consentMode === "ON" && V.marketing.consentText) {
        switch (E.value = !0, e == null ? void 0 : e.toLowerCase()) {
          case "en":
            I.value = V.marketing.consentText.EN;
            break;
          case "de":
            I.value = V.marketing.consentText.DE;
            break;
          case "es":
            I.value = V.marketing.consentText.ES;
            break;
          case "pt":
            I.value = V.marketing.consentText.PT;
            break;
          case "it":
            I.value = V.marketing.consentText.IT;
            break;
          case "nl":
            I.value = V.marketing.consentText.NL;
            break;
          case "fr":
          default:
            I.value = V.marketing.consentText.FR;
        }
        (be = i == null ? void 0 : i.marketingConsent) != null && be.text && (_.value = !0);
      } else
        E.value = !1, I.value = "", _.value = !1;
      n("onValidate", !O.value || !S.value);
    });
  }
  function D() {
    const P = $.fromJSDate(o), R = $.fromJSDate(o).plus({ minutes: l == null ? void 0 : l.duration });
    p.value = P, N.value = R;
    const V = $.fromJSDate(new Date(P.toJSDate().toLocaleString("en-US", { timeZone: s }))), be = $.fromJSDate(new Date(R.toJSDate().toLocaleString("en-US", { timeZone: s })));
    return m.global.t("event-booking-widget.recap.date", {
      start: V.toFormat("cccc dd MMMM yyyy - t"),
      end: be.toLocaleString($.TIME_SIMPLE)
    });
  }
  function F() {
    if (!a.id || !s) {
      r == null || r.error("vue-event-booking-widget", "Cannot make appointment (timeZone:" + s + ")");
      return;
    }
    n("onValidate", !1), i != null && i.id ? z(i) : G();
  }
  function z(P) {
    if (!a.id || !s || P && !P.id || !p.value || !N.value || !l || !c || !a) {
      r == null || r.error("vue-event-booking-widget", "Cannot createEvent: timeZone=" + s + ", client=" + P + ", start=" + p.value + ", end=" + N.value);
      return;
    }
    n("onLoading", !0);
    let R = new Io();
    R.client = { id: P.id }, R.start = p.value.toJSDate(), R.end = N.value.toJSDate(), R.company = { id: a.id }, R.staff = { id: c.id }, R.service = { id: l.id }, R.form = f || [], R.type = bo.PRO.toLowerCase(), S.value && (g.value || !O.value) && (R.privacyConsent = { text: v.value }), E.value && _.value && (R.marketingConsent = { text: I.value }), n("onSubmit", !0), t.createEvent(a.id, R, s, !1).then((V) => {
      n("onValidate", !0), n("onBooked", V);
    }).catch((V) => {
      var be;
      d.value = JSON.stringify(V), n("onValidate", !0), n("onError", (be = V == null ? void 0 : V.e) == null ? void 0 : be.errorCode, R, V);
    }).finally(() => {
      n("onLoading", !1);
    });
  }
  function G() {
    var P;
    if (!i) {
      n("onError", "empty contact");
      return;
    }
    n("onLoading", !0), t.createContact((P = a == null ? void 0 : a.owner) == null ? void 0 : P.userName, i).then((R) => {
      z(R);
    }).catch((R) => {
      var V;
      d.value = JSON.stringify(R), n("onError", (V = R == null ? void 0 : R.e) == null ? void 0 : V.errorCode, i, R);
    }).finally(() => {
      n("onLoading", !1);
    });
  }
  return st(() => {
    T(a);
  }), {
    start: p,
    end: N,
    formatDate: D,
    book: F,
    error: d,
    hasPrivacyConsent: S,
    privacyConsentText: v,
    privacyConsentValid: g,
    hasMarketingConsent: E,
    marketingConsentText: I,
    marketingConsentValid: _,
    isOldClient: O
  };
}
const Md = { class: "az-flex az-flex-col az-gap-5 az-align-center" }, Ad = { class: "az-flex az-rounded-200 az-flex-col az-p-4 az-gap-4 az-bg-grey-25" }, Fd = { class: "az-flex az-flex-col az-gap-2" }, Pd = { class: "az-title-h3" }, xd = { class: "az-flex az-flex-row az-gap-4" }, Rd = { class: "az-flex az-flex-row az-gap-2 az-text-grey-500" }, Vd = { class: "az-flex az-flex-col az-gap-1" }, Ud = { class: "az-flex az-gap-4 az-items-center" }, $d = /* @__PURE__ */ x("i", {
  class: "far fa-shop",
  "aria-hidden": "true"
}, null, -1), zd = { class: "az-flex az-gap-4 az-items-center" }, Wd = /* @__PURE__ */ x("i", {
  class: "far fa-briefcase",
  "aria-hidden": "true"
}, null, -1), jd = { class: "az-flex az-gap-4 az-items-center" }, Hd = /* @__PURE__ */ x("i", {
  class: "far fa-address-book",
  "aria-hidden": "true"
}, null, -1), Gd = {
  key: 0,
  class: "az-form-field az-flex az-flex-col az-gap-4 az-align-center"
}, Zd = { style: { display: "none" } }, Bd = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    api: {},
    locale: {},
    position: {},
    counter: {},
    timeZone: {},
    company: {},
    contact: {},
    date: {},
    service: {},
    staff: {},
    additionalFields: {},
    logger: {}
  },
  emits: ["onBooked", "onValidate", "onLoading", "onSubmit", "onError"],
  setup(t, { expose: e, emit: n }) {
    const s = t, r = Ie(s.locale), a = n;
    function i(g) {
      a("onValidate", typeof g == "boolean" ? g : typeof g == "string" ? g.length > 0 : g.isValid);
    }
    const {
      formatDate: o,
      book: l,
      error: c,
      hasPrivacyConsent: f,
      privacyConsentText: d,
      privacyConsentValid: m,
      hasMarketingConsent: p,
      marketingConsentText: N,
      marketingConsentValid: S,
      isOldClient: v
    } = Dd(s.api, s.locale, a, s.timeZone, s.logger, s.company, s.contact, s.date, s.service, s.staff, s.additionalFields);
    return e({
      book: l
    }), (g, E) => (j(), ae(He, {
      pageId: "booking-widget-page-recap",
      position: s.position,
      locale: s.locale,
      counter: s.counter,
      title: k(r).global.t("event-booking-widget.title.recap"),
      api: s.api
    }, {
      default: Ne(() => {
        var I, _, O, T, D, F;
        return [
          x("div", Md, [
            x("div", Ad, [
              x("div", Fd, [
                x("span", Pd, ce((I = s.service) == null ? void 0 : I.name), 1),
                x("div", xd, [
                  x("div", Rd, ce(k(o)()), 1)
                ])
              ]),
              x("div", Vd, [
                x("div", Ud, [
                  $d,
                  Ut(" " + ce((_ = s.company) == null ? void 0 : _.name), 1)
                ]),
                x("div", zd, [
                  Wd,
                  Ut(" " + ce(((O = s.staff) == null ? void 0 : O.firstName) + " " + ((T = s.staff) == null ? void 0 : T.lastName)), 1)
                ]),
                x("div", jd, [
                  Hd,
                  Ut(" " + ce(((D = s.contact) == null ? void 0 : D.firstName) + " " + ((F = s.contact) == null ? void 0 : F.lastName)), 1)
                ])
              ])
            ]),
            k(v) ? (j(), re("div", Gd, [
              k(f) ? (j(), ae(k(xn), {
                key: 0,
                id: "privacyConsent",
                modelValue: k(m),
                "onUpdate:modelValue": [
                  E[0] || (E[0] = (z) => qe(m) ? m.value = z : null),
                  E[1] || (E[1] = (z) => {
                    i(z);
                  })
                ],
                label: k(d),
                mandatory: k(ct).mandatory,
                locale: s.locale,
                attributes: { label: { style: "white-space:normal" } },
                class: "exclude-weglot"
              }, null, 8, ["modelValue", "label", "mandatory", "locale"])) : ee("", !0),
              k(p) ? (j(), ae(k(xn), {
                key: 1,
                id: "marketingConsent",
                modelValue: k(S),
                "onUpdate:modelValue": E[2] || (E[2] = (z) => qe(S) ? S.value = z : null),
                label: k(N),
                mandatory: k(ct).optional,
                locale: s.locale,
                attributes: { label: { style: "white-space:normal" } },
                class: "exclude-weglot"
              }, null, 8, ["modelValue", "label", "mandatory", "locale"])) : ee("", !0)
            ])) : ee("", !0),
            x("div", Zd, ce(k(c)), 1)
          ])
        ];
      }),
      _: 1
    }, 8, ["position", "locale", "counter", "title", "api"]));
  }
}), Yd = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ2IiBoZWlnaHQ9IjEzMCIgdmlld0JveD0iMCAwIDE0NiAxMzAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9Ijc5LjUiIGN5PSI3OS41IiByPSI1MCIgZmlsbD0iI0YxQTM0MyIvPgo8Y2lyY2xlIGN4PSI3NC41IiBjeT0iNzYuNSIgcj0iNDkiIHN0cm9rZT0iIzBBMEIxOSIgc3Ryb2tlLXdpZHRoPSIyIi8+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8yODJfNTUwMSkiPgo8cGF0aCBkPSJNOTguNjE4MyA2MS41NTg2Qzk5Ljc1NjcgNjIuNDc2NiA5OS43NTY3IDYzLjk2MDkgOTguNjE4MyA2NC43OTFMNjkuMTU0IDkwLjU3MjNDNjguMjA1NCA5MS41Njg0IDY2LjUwODkgOTEuNTY4NCA2NS40NTk4IDkwLjU3MjNMNTAuMjg0NSA3Ny4yOTFDNDkuMjM4NSA3Ni40NjA5IDQ5LjIzODUgNzQuOTc2NiA1MC4yODQ1IDc0LjA1ODZDNTEuMzMwNCA3My4xNTA0IDUzLjAyNjggNzMuMTUwNCA1NC4wNzI1IDc0LjA1ODZMNjcuMzU3MSA4NS42ODk1TDk0LjkyNDEgNjEuNTU4NkM5NS45NzMyIDYwLjY0NjUgOTcuNjY5NiA2MC42NDY1IDk4LjYxODMgNjEuNTU4NloiIGZpbGw9ImJsYWNrIi8+CjwvZz4KPGNpcmNsZSByPSI0LjUiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDExOS41IDEwLjUpIiBzdHJva2U9IiMwQTBCMTkiLz4KPGNpcmNsZSByPSI0LjUiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDExOS41IDEwLjUpIiBzdHJva2U9IiMwQTBCMTkiLz4KPGNpcmNsZSByPSI0LjUiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDE0MC41IDQ5LjUpIiBzdHJva2U9IiMwQTBCMTkiLz4KPGNpcmNsZSByPSI0LjUiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDE0MC41IDQ5LjUpIiBzdHJva2U9IiMwQTBCMTkiLz4KPGNpcmNsZSByPSI0LjUiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDUuNSA1MS41KSIgc3Ryb2tlPSIjMEEwQjE5Ii8+CjxyZWN0IHg9Ijg0LjUiIHk9IjEzLjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjgiIHJ4PSIxIiBmaWxsPSIjMEEwQjE5Ii8+CjxyZWN0IHg9IjgxLjUiIHk9IjE4LjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjgiIHJ4PSIxIiB0cmFuc2Zvcm09InJvdGF0ZSgtOTAgODEuNSAxOC41KSIgZmlsbD0iIzBBMEIxOSIvPgo8cmVjdCB4PSIzOS41IiB5PSIwLjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjgiIHJ4PSIxIiBmaWxsPSIjMEEwQjE5Ii8+CjxyZWN0IHg9IjM2LjUiIHk9IjUuNSIgd2lkdGg9IjIiIGhlaWdodD0iOCIgcng9IjEiIHRyYW5zZm9ybT0icm90YXRlKC05MCAzNi41IDUuNSkiIGZpbGw9IiMwQTBCMTkiLz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMjgyXzU1MDEiPgo8cmVjdCB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IndoaXRlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0OS41IDUxLjUpIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==", Kd = {
  class: "az-flex az-flex-col az-h-full az-justify-center az-align-center az-gap-4 az-text-center az-items-center",
  style: { "align-items": "center" }
}, Jd = /* @__PURE__ */ x("img", { src: Yd }, null, -1), qd = { class: "az-font-medium az-title-h3" }, Qd = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    api: {},
    locale: {},
    position: {},
    counter: {},
    event: {}
  },
  emits: ["onBooking", "onError"],
  setup(t, { emit: e }) {
    const n = t, s = Ie(n.locale), r = e;
    return n.event && r("onBooking", n.event), (a, i) => (j(), ae(He, {
      pageId: "booking-widget-page-confirmation",
      position: n.position,
      locale: n.locale,
      title: k(s).global.t("event-booking-widget.title.confirmation"),
      api: n.api,
      counter: n.counter,
      displayStepper: !1,
      displayPosition: !1
    }, {
      default: Ne(() => [
        x("div", Kd, [
          Jd,
          x("span", qd, ce(k(s).global.t("event-booking-widget.confirmation.title")), 1),
          x("span", null, ce(k(s).global.t("event-booking-widget.confirmation.description")), 1)
        ])
      ]),
      _: 1
    }, 8, ["position", "locale", "title", "api", "counter"]));
  }
}), Xd = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQ2IiBoZWlnaHQ9IjEzMCIgdmlld0JveD0iMCAwIDE0NiAxMzAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxjaXJjbGUgY3g9Ijc5LjUiIGN5PSI3OS41IiByPSI1MCIgZmlsbD0iI0RCMTgyMiIvPgo8Y2lyY2xlIGN4PSI3NC41IiBjeT0iNzYuNSIgcj0iNDkiIHN0cm9rZT0iIzBBMEIxOSIgc3Ryb2tlLXdpZHRoPSIyIi8+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8zMTNfMTQ4NDApIj4KPHBhdGggZD0iTTg5LjM1MzUgODguMTIxMUM5MC4yNjg0IDg5LjAzNiA5MC4yNjg0IDkwLjUyMDUgODkuMzUzNSA5MS40MzU1Qzg4LjQzODYgOTIuMzUwNSA4Ni45NTQxIDkyLjM1MDUgODYuMDM5IDkxLjQzNTVMNzQuNSA3OS44MTA1TDYyLjg3ODkgOTEuNDMxNkM2MS45NjM5IDkyLjM0NjUgNjAuNDc5NSA5Mi4zNDY1IDU5LjU2NDQgOTEuNDMxNkM1OC42NDk0IDkwLjUxNjcgNTguNjQ5NSA4OS4wMzIyIDU5LjU2NDQgODguMTE3MUw3MS4xODk0IDc2LjVMNTkuNTYxMiA2NC43OTFDNTguNjQ2MyA2My44NzYgNTguNjQ2MyA2Mi4zOTE2IDU5LjU2MTIgNjEuNDc2NUM2MC40NzYxIDYwLjU2MTUgNjEuOTYwNiA2MC41NjE2IDYyLjg3NTcgNjEuNDc2NUw3NC41IDczLjE4OTRMODYuMTIxMSA2MS41NjgzQzg3LjAzNiA2MC42NTM0IDg4LjUyMDUgNjAuNjUzNCA4OS40MzU1IDYxLjU2ODNDOTAuMzUwNiA2Mi40ODMzIDkwLjM1MDUgNjMuOTY3NyA4OS40MzU1IDY0Ljg4MjhMNzcuODEwNSA3Ni41TDg5LjM1MzUgODguMTIxMVoiIGZpbGw9ImJsYWNrIi8+CjwvZz4KPGNpcmNsZSByPSI0LjUiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDExOS41IDEwLjUpIiBzdHJva2U9IiMwQTBCMTkiLz4KPGNpcmNsZSByPSI0LjUiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDExOS41IDEwLjUpIiBzdHJva2U9IiMwQTBCMTkiLz4KPGNpcmNsZSByPSI0LjUiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDE0MC41IDQ5LjUpIiBzdHJva2U9IiMwQTBCMTkiLz4KPGNpcmNsZSByPSI0LjUiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDE0MC41IDQ5LjUpIiBzdHJva2U9IiMwQTBCMTkiLz4KPGNpcmNsZSByPSI0LjUiIHRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIC0xIDUuNSA1MS41KSIgc3Ryb2tlPSIjMEEwQjE5Ii8+CjxyZWN0IHg9Ijg0LjUiIHk9IjEzLjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjgiIHJ4PSIxIiBmaWxsPSIjMEEwQjE5Ii8+CjxyZWN0IHg9IjgxLjUiIHk9IjE4LjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjgiIHJ4PSIxIiB0cmFuc2Zvcm09InJvdGF0ZSgtOTAgODEuNSAxOC41KSIgZmlsbD0iIzBBMEIxOSIvPgo8cmVjdCB4PSIzOS41IiB5PSIwLjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjgiIHJ4PSIxIiBmaWxsPSIjMEEwQjE5Ii8+CjxyZWN0IHg9IjM2LjUiIHk9IjUuNSIgd2lkdGg9IjIiIGhlaWdodD0iOCIgcng9IjEiIHRyYW5zZm9ybT0icm90YXRlKC05MCAzNi41IDUuNSkiIGZpbGw9IiMwQTBCMTkiLz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDBfMzEzXzE0ODQwIj4KPHJlY3Qgd2lkdGg9IjMxLjI1IiBoZWlnaHQ9IjUwIiBmaWxsPSJ3aGl0ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNTguODc1IDUxLjUpIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==", em = {
  key: 0,
  class: "az-flex az-flex-col az-h-full az-justify-center az-align-center az-gap-4 az-text-center az-items-center",
  style: { "align-items": "center" }
}, tm = /* @__PURE__ */ x("img", { src: Xd }, null, -1), nm = ["src"], sm = { class: "az-font-medium az-title-h3" }, rm = { key: 1 }, am = ["onKeyup"], im = /* @__PURE__ */ ge({
  __name: "View",
  props: {
    api: {},
    locale: {},
    position: {},
    counter: {},
    company: {},
    error: {}
  },
  emits: ["onClose", "onError"],
  setup(t, { emit: e }) {
    const n = t, s = Ie(n.locale), r = e;
    function a() {
      var i, o;
      (i = n.error) != null && i.fallbackStep && r("onClose", (o = n.error) == null ? void 0 : o.fallbackStep);
    }
    return (i, o) => (j(), ae(He, {
      pageId: "booking-widget-page-error",
      position: n.position,
      locale: n.locale,
      title: k(s).global.t("event-booking-widget.title.error"),
      api: n.api,
      counter: n.counter,
      displayStepper: !1,
      displayPosition: !1
    }, {
      default: Ne(() => {
        var l, c, f, d, m, p;
        return [
          n.error ? (j(), re("div", em, [
            tm,
            (l = n.error) != null && l.image ? (j(), re("img", {
              key: 0,
              src: (c = n.error) == null ? void 0 : c.image
            }, null, 8, nm)) : ee("", !0),
            x("span", sm, ce(k(s).global.t((f = n.error) == null ? void 0 : f.title)), 1),
            x("span", null, ce(k(s).global.t((d = n.error) == null ? void 0 : d.description)), 1),
            (m = n.error) != null && m.footerButton ? (j(), re("span", rm, [
              x("button", {
                id: "booking__panel_action",
                class: "az-btn az-btn-stretch az-btn-color-neutral",
                onClick: a,
                onKeyup: Pn(a, ["enter"])
              }, ce(k(s).global.t((p = n.error) == null ? void 0 : p.footerButton)), 41, am)
            ])) : ee("", !0)
          ])) : ee("", !0)
        ];
      }),
      _: 1
    }, 8, ["position", "locale", "title", "api", "counter"]));
  }
}), Pe = {
  company: { component: Qc, pageCount: 1 },
  staff: { component: Xc, pageCount: 1 },
  service: { component: eu, pageCount: 1 },
  date: { component: md, pageCount: 1 },
  contactQualif: { component: bd, pageCount: 2 },
  contactNew: { component: Ld, pageCount: 0 },
  contactSelect: { component: wd, pageCount: 0 },
  field: { component: Cd, pageCount: 1 },
  recap: { component: Bd, pageCount: 1 },
  confirm: { component: Qd, pageCount: 0 },
  error: { component: im, pageCount: 0 }
};
class xe {
  constructor(e, n, s, r, a) {
    K(this, "component");
    K(this, "props");
    K(this, "on");
    K(this, "pageIndex");
    K(this, "hasTitle");
    K(this, "isLoading", !1);
    K(this, "footerButton");
    this.pageIndex = e, this.component = n, this.hasTitle = s, this.props = r, this.on = a;
  }
}
class om extends xe {
  constructor() {
    super(0, void 0, !1, {}, {});
  }
}
class oa extends xe {
  constructor(e, n, s, r, a, i, o, l, c, f) {
    super(
      i,
      Pe.company.component,
      !0,
      { locale: e, api: n, acl: a, organisationEmail: s, connectedUser: r, position: i, counter: o, possibleCompaniesId: l },
      { onSelect: c, onError: f }
    );
  }
}
class la extends xe {
  constructor(n, s, r, a, i, o, l, c, f) {
    super(
      i,
      Pe.staff.component,
      !0,
      { locale: n, api: s, acl: r, connectedUser: a, position: i, counter: o, company: l },
      { onSelect: c, onError: f }
    );
    K(this, "company");
    this.company = l;
  }
}
class ca extends xe {
  constructor(e, n, s, r, a, i, o, l) {
    super(
      s,
      Pe.service.component,
      !0,
      { locale: e, api: n, position: s, counter: r, company: a, staff: i },
      { onSelect: o, onError: l }
    );
  }
}
class ua extends xe {
  constructor(e, n, s, r, a, i, o, l, c) {
    super(
      s,
      Pe.date.component,
      !0,
      { locale: e, api: n, position: s, timeZone: a.timeZone, counter: r, company: a, staff: i, service: o },
      { onSelect: l, onError: c }
    );
  }
}
class us extends xe {
  constructor(e, n, s, r, a, i) {
    super(
      s,
      Pe.contactQualif.component,
      !0,
      { locale: e, api: n, position: s, counter: r },
      { onSelect: a, onError: i }
    );
  }
}
class fa extends xe {
  constructor(e, n, s, r, a, i, o, l, c) {
    super(
      s,
      Pe.contactNew.component,
      !0,
      { locale: e, api: n, position: s, counter: r, company: a, contact: i },
      {
        onValidate: (f, d) => {
          f && o && o(d), this.footerButton.disabled.value = !f;
        },
        onError: c
      }
    ), this.footerButton = { label: "event-booking-widget.contact.save", disabled: A(!0), action: l };
  }
}
class da extends xe {
  constructor(e, n, s, r, a, i, o) {
    super(
      s,
      Pe.contactSelect.component,
      !0,
      { locale: e, api: n, position: s, counter: r, company: a },
      { onSelect: i, onError: o }
    );
  }
}
class lm extends xe {
  constructor(e, n, s, r, a, i, o, l, c, f) {
    super(
      s,
      Pe.field.component,
      !0,
      { locale: e, api: n, position: s, counter: r, fields: a, additionalFields: i, contact: o },
      {
        onValidate: (d, m) => {
          d && l && l(m), this.footerButton.disabled.value = !d;
        },
        onLoading: (d) => {
          this.isLoading = d;
        },
        onError: f
      }
    ), this.footerButton = { label: "event-booking-widget.form-field.validate", disabled: A(!0), action: c };
  }
}
class cm extends xe {
  constructor(e, n, s, r, a, i, o, l, c, f, d, m, p) {
    super(
      s,
      Pe.recap.component,
      !0,
      { locale: e, api: n, position: s, counter: r, timeZone: a.timeZone, company: a, date: i, service: o, staff: l, contact: c, additionalFields: f },
      {
        onValidate: (N) => {
          this.footerButton.disabled.value = !N;
        },
        onBooked: d,
        onLoading: (N) => {
          this.isLoading = N;
        },
        onError: p
      }
    ), this.footerButton = { label: "event-booking-widget.recap.validate", disabled: A(!0), action: m };
  }
}
class um extends xe {
  constructor(e, n, s, r, a) {
    super(
      s,
      Pe.confirm.component,
      !1,
      { locale: e, api: n, position: s, counter: 0, event: r },
      { onError: a }
    );
  }
}
class fm extends xe {
  constructor(e, n, s, r, a, i) {
    super(
      s,
      Pe.error.component,
      !1,
      { locale: e, api: n, position: s, counter: 0, company: r, error: a },
      { onClose: i }
    );
  }
}
const dm = new om(), ht = /* @__PURE__ */ new Map(), Rt = {
  title: "event-booking-widget.error.unknown.title",
  description: "event-booking-widget.error.unknown.description"
};
ht.set(Lt.UNKOWN, Rt);
ht.set(Lt.STAFF_NOT_AVAILABLE, {
  title: "event-booking-widget.error.date-not-found.title",
  description: "event-booking-widget.error.date-not-found.description",
  footerButton: "event-booking-widget.error.date-not-found.footerButton",
  fallbackStep: "DATE_SELECT"
});
ht.set(Lt.APPOINTMENT_PERIOD_RULE, {
  title: "event-booking-widget.error.date-not-found.title",
  description: "event-booking-widget.error.date-not-found.description",
  footerButton: "event-booking-widget.error.date-not-found.footerButton",
  fallbackStep: "DATE_SELECT"
});
ht.set(Lt.MAX_APPOINTMENT_DAILY, {
  title: "event-booking-widget.error.max-daily.title",
  description: "event-booking-widget.error.max-daily.description",
  footerButton: "event-booking-widget.error.max-daily.footerButton",
  fallbackStep: "DATE_SELECT"
});
ht.set(Lt.MAX_APPOINTMENT_WEEKLY, {
  title: "event-booking-widget.error.max-weekly.title",
  description: "event-booking-widget.error.max-weekly.description",
  footerButton: "event-booking-widget.error.max-weekly.footerButton",
  fallbackStep: "DATE_SELECT"
});
ht.set(Lt.DATE_NOT_AVAILABLE, {
  title: "event-booking-widget.error.date-not-found.title",
  description: "event-booking-widget.error.date-not-found.description",
  footerButton: "event-booking-widget.error.date-not-found.footerButton",
  fallbackStep: "DATE_SELECT"
});
ht.set(Lt.USER_BLOCKED, {
  title: "event-booking-widget.error.contact-blocked.title",
  description: "event-booking-widget.error.contact-blocked.description",
  footerButton: "event-booking-widget.error.contact-blocked.footerButton",
  fallbackStep: "QUALIF_CONTACT"
});
class mm extends go {
  constructor(n, s, r, a, i, o, l, c) {
    super(dm);
    K(this, "locale");
    K(this, "api");
    K(this, "organisationEmail");
    K(this, "connectedUser");
    K(this, "acl");
    K(this, "logger");
    K(this, "pageRef");
    K(this, "emitter");
    K(this, "pagesState", {});
    K(this, "visitedPages", []);
    K(this, "preselection");
    K(this, "staffPreselected", !1);
    K(this, "hasWidgetFields", !0);
    K(this, "pageIndex", 0);
    K(this, "company");
    K(this, "possibleCompaniesId");
    K(this, "staff");
    K(this, "service");
    K(this, "date");
    K(this, "contact");
    K(this, "widgetForms");
    K(this, "event");
    K(this, "error");
    K(this, "accountStore", po());
    this.pageRef = n, this.locale = r, this.api = a, this.organisationEmail = i, this.connectedUser = o, this.acl = l, this.logger = c, this.emitter = s;
  }
  dispose() {
  }
  async preselect(n) {
    var r, a;
    this.preselection = n;
    let s = "COMPANY_SELECT";
    if (n && n.employee)
      if (n.employee.user && n.employee.user.staffs && n.employee.user.staffs.length > 1)
        this.possibleCompaniesId = n.employee.user.staffs.map((i) => i.company.id), s = "COMPANY_SELECT";
      else {
        let i;
        if (n.employee.staff ? i = n.employee.staff : n.employee.user && n.employee.user.staffs && n.employee.user.staffs.length === 1 && (i = n.employee.user.staffs[0]), i && ((r = i == null ? void 0 : i.company) == null ? void 0 : r.id)) {
          const o = await this.api.getCompanyById((a = i.company) == null ? void 0 : a.id, this.organisationEmail);
          o.result && (this.staff = i, this.company = o.result, this.staffPreselected = !0, s = "SERVICE_SELECT");
        }
      }
    this.initStates(), this.next(this.pagesState[s]());
  }
  selectCompany(n) {
    var s, r, a, i;
    if (this.company = n, n && this.state instanceof oa) {
      if (this.possibleCompaniesId !== void 0 && ((r = (s = this.preselection) == null ? void 0 : s.employee) == null ? void 0 : r.user)) {
        const o = (i = (a = this.preselection.employee.user) == null ? void 0 : a.staffs) == null ? void 0 : i.find((l) => {
          var c;
          return ((c = l.company) == null ? void 0 : c.id) === n.id;
        });
        if (o) {
          this.selectStaff(o);
          return;
        }
      }
      this.next(this.pagesState.STAFF_SELECT());
    }
  }
  selectStaff(n) {
    this.staff = n, n && (this.state instanceof la || this.possibleCompaniesId != null) && this.next(this.pagesState.SERVICE_SELECT());
  }
  selectService(n) {
    var s;
    this.service = n, this.getWidgetFields(this.company.id, (s = this.service) == null ? void 0 : s.id).then((r) => {
      this.widgetForms = r, this.hasWidgetFields = r.length > 0;
    }).catch(() => {
      this.hasWidgetFields = !1, this.next(this.pagesState.RECAP());
    }), n && this.state instanceof ca && this.next(this.pagesState.DATE_SELECT());
  }
  selectDate(n) {
    var s;
    if (this.date = n, n && this.state instanceof ua)
      if ((s = this.preselection) != null && s.contact)
        this.selectContact(this.preselection.contact);
      else if (this.error && this.contact) {
        const r = this.accountStore.hasAbility("createClient");
        this.hasWidgetFields && this.visitedPages.push(this.pagesState.FILL_FIELDS()), r ? this.visitedPages.push(this.pagesState.QUALIF_CONTACT()) : this.visitedPages.push(this.pagesState.SEARCH_CONTACT()), this.error = void 0, this.selectContact(this.contact, !0);
      } else
        this.accountStore.hasAbility("createClient") ? this.next(this.pagesState.QUALIF_CONTACT()) : this.next(this.pagesState.SEARCH_CONTACT());
  }
  createContact() {
    this.state instanceof us && (this.contact = void 0, this.next(this.pagesState.NEW_CONTACT()));
  }
  searchContact() {
    this.state instanceof us && this.next(this.pagesState.SEARCH_CONTACT());
  }
  selectContact(n, s) {
    var r;
    (n && (this.state instanceof da || this.state instanceof fa) || ((r = this.preselection) == null ? void 0 : r.contact) != null || s === !0) && (this.contact = n, !s && this.hasWidgetFields ? this.next(this.pagesState.FILL_FIELDS()) : this.next(this.pagesState.RECAP()));
  }
  previous() {
    this.visitedPages.pop();
    const n = this.visitedPages[this.visitedPages.length - 1];
    n && (--this.pageIndex, this.changeState(n));
  }
  next(n) {
    this.visitedPages.push(n), this.changeState(n);
  }
  async getWidgetFields(n, s) {
    if (n) {
      const r = await this.api.getWidgetForm(this.organisationEmail, n, s);
      if (r.results)
        return this.hasWidgetFields = r.results.length > 0, r.results;
      this.hasWidgetFields = !1;
    }
    return [];
  }
  getWidgetErrorFromApi(n) {
    let s = {}, r = ht.get(n);
    return s.title = r != null && r.title ? r.title : Rt.title, s.description = r != null && r.description ? r.description : Rt.description, s.image = r != null && r.image ? r.image : Rt.image, s.fallbackStep = r != null && r.fallbackStep ? r.fallbackStep : Rt.fallbackStep, s.footerButton = r != null && r.footerButton ? r.footerButton : Rt.footerButton, s;
  }
  onError(n, s, r) {
    this.emitter("onError", n, s, r), this.error = this.getWidgetErrorFromApi(n), this.changeState(this.pagesState.ERROR());
  }
  initStates() {
    this.pageIndex = 0, this.staffPreselected || (this.pagesState.COMPANY_SELECT = () => new oa(
      this.locale,
      this.api,
      this.organisationEmail,
      this.connectedUser,
      this.acl,
      this.pageIndex++,
      this.getPageCount(),
      this.possibleCompaniesId,
      (n) => this.selectCompany(n),
      (n, s, r) => this.onError(n, s, r)
    ), this.pagesState.STAFF_SELECT = () => new la(
      this.locale,
      this.api,
      this.acl,
      this.connectedUser,
      this.pageIndex++,
      this.getPageCount(),
      this.company,
      (n) => this.selectStaff(n),
      (n, s, r) => this.onError(n, s, r)
    )), this.pagesState.SERVICE_SELECT = () => new ca(
      this.locale,
      this.api,
      this.pageIndex++,
      this.getPageCount(),
      this.company,
      this.staff,
      (n) => this.selectService(n),
      (n, s, r) => this.onError(n, s, r)
    ), this.pagesState.DATE_SELECT = () => new ua(
      this.locale,
      this.api,
      this.pageIndex++,
      this.getPageCount(),
      this.company,
      this.staff,
      this.service,
      (n) => this.selectDate(n),
      (n, s, r) => this.onError(n, s, r)
    ), (this.preselection === void 0 || this.preselection.contact === void 0) && (this.pagesState.QUALIF_CONTACT = () => new us(
      this.locale,
      this.api,
      this.pageIndex++,
      this.getPageCount(),
      (n) => n ? this.createContact() : this.searchContact(),
      (n, s, r) => this.onError(n, s, r)
    ), this.pagesState.NEW_CONTACT = () => new fa(
      this.locale,
      this.api,
      this.pageIndex++,
      this.getPageCount(),
      this.company,
      this.contact,
      (n) => this.contact = n,
      () => this.selectContact(this.contact),
      (n, s, r) => this.onError(n, s, r)
    ), this.pagesState.SEARCH_CONTACT = () => new da(
      this.locale,
      this.api,
      this.pageIndex++,
      this.getPageCount(),
      this.company,
      (n) => this.selectContact(n),
      (n, s, r) => this.onError(n, s, r)
    )), this.pagesState.FILL_FIELDS = () => new lm(
      this.locale,
      this.api,
      this.pageIndex++,
      this.getPageCount(),
      So.formItemsToFormFields(this.widgetForms),
      this.widgetForms,
      this.contact,
      (n) => {
        this.widgetForms = n;
      },
      () => this.next(this.pagesState.RECAP()),
      (n, s, r) => this.onError(n, s, r)
    ), this.pagesState.RECAP = () => new cm(
      this.locale,
      this.api,
      this.pageIndex++,
      this.getPageCount(),
      this.company,
      this.date,
      this.service,
      this.staff,
      this.contact,
      this.widgetForms,
      (n) => {
        this.emitter("onBooking", n), this.event = n, this.next(this.pagesState.CONFIRM());
      },
      () => {
        this.pageRef.value.book();
      },
      (n, s, r) => this.onError(n, s, r)
    ), this.pagesState.CONFIRM = () => new um(
      this.locale,
      this.api,
      this.pageIndex++,
      this.event,
      (n, s, r) => this.onError(n, s, r)
    ), this.pagesState.ERROR = () => {
      if (this.error && this.error.fallbackStep) {
        const n = this.pagesState[this.error.fallbackStep](), s = this.visitedPages.filter((r) => r.component == n.component);
        s && s.length > 0 && (this.visitedPages = this.visitedPages.filter((r) => r.pageIndex <= s[0].pageIndex), this.pageIndex = s[0].pageIndex);
      }
      return new fm(
        this.locale,
        this.api,
        this.pageIndex,
        this.company,
        this.error,
        (n) => this.next(this.pagesState[n.toUpperCase()]())
      );
    };
  }
  getPageCount() {
    let n = Object.values(Pe).reduce((s, r) => s + r.pageCount, 0);
    return this.staffPreselected ? n -= 2 : this.preselection !== void 0 && this.preselection.employee && n--, this.preselection !== void 0 && this.preselection.contact !== void 0 && (n -= 2), this.hasWidgetFields || n--, n;
  }
}
const hm = ["id"], gm = /* @__PURE__ */ x("i", {
  class: "fa fa-chevron-left",
  "aria-hidden": "true"
}, null, -1), pm = [
  gm
], _m = ["id"], Em = /* @__PURE__ */ x("i", {
  class: "fa fa-close",
  "aria-hidden": "true"
}, null, -1), ym = [
  Em
], vm = ["id", "disabled", "onKeyup"], Nm = /* @__PURE__ */ x("i", null, null, -1), wm = /* @__PURE__ */ ge({
  __name: "Widget",
  props: {
    id: { default: Math.random().toString(36) },
    api: {},
    organisationEmail: {},
    connectedUser: {},
    acl: {},
    timeZone: {},
    locale: {},
    logger: {},
    preselection: {}
  },
  emits: ["onClose", "onBooking", "onError"],
  setup(t, { expose: e, emit: n }) {
    const s = t, r = Ie(s.locale), a = n, i = A(), o = A(), l = new mm(i, a, s.locale, s.api, s.organisationEmail, s.connectedUser, s.acl, s.logger), c = ga(l.state);
    function f() {
      Wn(() => {
        var S, v;
        (S = i.value) != null && S.focus ? (v = i.value) == null || v.focus() : o.value.focus();
      });
    }
    function d() {
      c.value.footerButton && c.value.footerButton.action && (m = !0, setTimeout(() => {
        m = !1;
      }, 500), c.value.footerButton.action());
    }
    let m;
    const p = Me(() => {
      const S = c.value.footerButton !== void 0 && c.value.footerButton.disabled.value === !0;
      return m || S;
    }), N = (S) => {
      m = !1, c.value = S;
    };
    return st(() => {
      l.subscribe(N), l.preselect(s.preselection);
    }), ha(() => {
      l.dispose();
    }), zt(() => s.preselection, (S, v) => {
      l.preselect(S);
    }), e({ focus: f }), (S, v) => (j(), ae(k(ho), {
      id: `${s.id}_panel`,
      locale: s.locale,
      title: k(r).global.t("event-booking-widget.title.panel")
    }, ro({
      "header-left": Ne(() => [
        c.value.pageIndex > 0 && c.value.hasTitle ? (j(), re("button", {
          key: 0,
          "aria-label": "retour",
          id: `${s.id}_prev`,
          class: "az-icon az-btn az-btn-icon-alone az-btn-color-transparent",
          onClick: v[0] || (v[0] = (g) => k(l).previous())
        }, pm, 8, hm)) : ee("", !0)
      ]),
      "header-right": Ne(() => [
        x("button", {
          id: `${s.id}_close`,
          "aria-label": "fermer",
          class: "az-icon az-btn az-btn-icon-alone az-btn-color-transparent",
          onClick: v[1] || (v[1] = (g) => a("onClose"))
        }, ym, 8, _m)
      ]),
      content: Ne(() => [
        x("a", {
          ref_key: "widgetPageSkipContent",
          ref: o,
          class: "sr-only focus:not-sr-only",
          href: "#widget_page_component"
        }, null, 512),
        (j(), ae(ao(c.value.component), io({
          ref_key: "widgetPage",
          ref: i,
          id: s.id
        }, c.value.props, oo(c.value.on)), null, 16, ["id"]))
      ]),
      _: 2
    }, [
      c.value.footerButton ? {
        name: "footer",
        fn: Ne(() => [
          x("button", {
            id: `${s.id}_action`,
            class: lo([{ "az-btn-loading": c.value.isLoading }, "az-btn az-btn-stretch"]),
            disabled: p.value,
            onClick: d,
            onKeyup: Pn(d, ["enter"])
          }, [
            Nm,
            Ut(ce(k(r).global.t(c.value.footerButton.label || "")), 1)
          ], 42, vm)
        ]),
        key: "0"
      } : void 0
    ]), 1032, ["id", "locale", "title"]));
  }
});
export {
  wm as EventBookingWidget
};