import { getCurrentInstance as Gt, provide as br, inject as Sr, getCurrentScope as wr, onScopeDispose as Ar, unref as P, ref as V, readonly as je, watch as Oe, isRef as Er, reactive as ht, shallowRef as Je, computed as se, defineComponent as lt, resolveDirective as Or, openBlock as Xe, createElementBlock as Pr, withDirectives as $r, createBlock as Vt, mergeProps as Fr, withCtx as x, renderSlot as Pe, createVNode as W, createTextVNode as me, toDisplayString as fe, createElementVNode as mt } from "vue";
import { ElTable as Tr, ElPagination as Ir, ElTableColumn as _r, ElButton as ge, ElPopover as Rr } from "element-plus";
import { useRouter as Dr } from "vue-router";
const xr = {
  create: () => Promise.resolve({ data: null }),
  // avoids adding a context in tests
  deleteOne: () => Promise.resolve({ data: null }),
  // avoids adding a context in tests
  getList: () => Promise.resolve({
    data: Array.from({ length: 30 }).map((t, e) => ({
      name: e,
      id: e
    })),
    total: 20
  }),
  // avoids adding a context in tests
  getMany: () => Promise.resolve({ data: [] }),
  // avoids adding a context in tests
  getManyReference: () => Promise.resolve({ data: [], total: 0 }),
  // avoids adding a context in tests
  getOne: () => Promise.resolve({ data: null }),
  // avoids adding a context in tests
  update: () => Promise.resolve({ data: null })
  // avoids adding a context in tests
};
function Cr(t) {
  return wr() ? (Ar(t), !0) : !1;
}
const te = /* @__PURE__ */ new WeakMap(), zt = (t, e) => {
  var r;
  const n = (r = Gt()) == null ? void 0 : r.proxy;
  if (n == null)
    throw new Error("provideLocal must be called in setup");
  te.has(n) || te.set(n, /* @__PURE__ */ Object.create(null));
  const o = te.get(n);
  o[t] = e, br(t, e);
}, _e = (...t) => {
  var e;
  const r = t[0], n = (e = Gt()) == null ? void 0 : e.proxy;
  if (n == null)
    throw new Error("injectLocal must be called in setup");
  return te.has(n) && r in te.get(n) ? te.get(n)[r] : Sr(...t);
};
function H(t) {
  return typeof t == "function" ? t() : P(t);
}
const Nr = typeof window < "u" && typeof document < "u";
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
const Br = Object.prototype.toString, Mr = (t) => Br.call(t) === "[object Object]", Ye = () => {
};
function Ur(t, e) {
  function r(...n) {
    return new Promise((o, a) => {
      Promise.resolve(t(() => e.apply(this, n), { fn: e, thisArg: this, args: n })).then(o).catch(a);
    });
  }
  return r;
}
const qt = (t) => t();
function Lr(t = qt) {
  const e = V(!0);
  function r() {
    e.value = !1;
  }
  function n() {
    e.value = !0;
  }
  const o = (...a) => {
    e.value && t(...a);
  };
  return { isActive: je(e), pause: r, resume: n, eventFilter: o };
}
function gt(t, e = !1, r = "Timeout") {
  return new Promise((n, o) => {
    setTimeout(e ? () => o(r) : n, t);
  });
}
function Wr(t, e, r = {}) {
  const {
    eventFilter: n = qt,
    ...o
  } = r;
  return Oe(
    t,
    Ur(
      n,
      e
    ),
    o
  );
}
function kr(t, e, r = {}) {
  const {
    eventFilter: n,
    ...o
  } = r, { eventFilter: a, pause: i, resume: f, isActive: c } = Lr(n);
  return { stop: Wr(
    t,
    e,
    {
      ...o,
      eventFilter: a
    }
  ), pause: i, resume: f, isActive: c };
}
function Ze(t, e = !1) {
  function r(s, { flush: l = "sync", deep: d = !1, timeout: h, throwOnTimeout: S } = {}) {
    let g = null;
    const m = [new Promise((y) => {
      g = Oe(
        t,
        (w) => {
          s(w) !== e && (g == null || g(), y(w));
        },
        {
          flush: l,
          deep: d,
          immediate: !0
        }
      );
    })];
    return h != null && m.push(
      gt(h, S).then(() => H(t)).finally(() => g == null ? void 0 : g())
    ), Promise.race(m);
  }
  function n(s, l) {
    if (!Er(s))
      return r((w) => w === s, l);
    const { flush: d = "sync", deep: h = !1, timeout: S, throwOnTimeout: g } = l ?? {};
    let v = null;
    const y = [new Promise((w) => {
      v = Oe(
        [t, s],
        ([A, R]) => {
          e !== (A === R) && (v == null || v(), w(A));
        },
        {
          flush: d,
          deep: h,
          immediate: !0
        }
      );
    })];
    return S != null && y.push(
      gt(S, g).then(() => H(t)).finally(() => (v == null || v(), H(t)))
    ), Promise.race(y);
  }
  function o(s) {
    return r((l) => !!l, s);
  }
  function a(s) {
    return n(null, s);
  }
  function i(s) {
    return n(void 0, s);
  }
  function f(s) {
    return r(Number.isNaN, s);
  }
  function c(s, l) {
    return r((d) => {
      const h = Array.from(d);
      return h.includes(s) || h.includes(H(s));
    }, l);
  }
  function p(s) {
    return u(1, s);
  }
  function u(s = 1, l) {
    let d = -1;
    return r(() => (d += 1, d >= s), l);
  }
  return Array.isArray(H(t)) ? {
    toMatch: r,
    toContains: c,
    changed: p,
    changedTimes: u,
    get not() {
      return Ze(t, !e);
    }
  } : {
    toMatch: r,
    toBe: n,
    toBeTruthy: o,
    toBeNull: a,
    toBeNaN: f,
    toBeUndefined: i,
    changed: p,
    changedTimes: u,
    get not() {
      return Ze(t, !e);
    }
  };
}
function Kr(t) {
  return Ze(t);
}
function Gr(t) {
  var e;
  const r = H(t);
  return (e = r == null ? void 0 : r.$el) != null ? e : r;
}
const Ht = Nr ? window : void 0;
function bt(...t) {
  let e, r, n, o;
  if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([r, n, o] = t, e = Ht) : [e, r, n, o] = t, !e)
    return Ye;
  Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
  const a = [], i = () => {
    a.forEach((u) => u()), a.length = 0;
  }, f = (u, s, l, d) => (u.addEventListener(s, l, d), () => u.removeEventListener(s, l, d)), c = Oe(
    () => [Gr(e), H(o)],
    ([u, s]) => {
      if (i(), !u)
        return;
      const l = Mr(s) ? { ...s } : s;
      a.push(
        ...r.flatMap((d) => n.map((h) => f(u, d, h, l)))
      );
    },
    { immediate: !0, flush: "post" }
  ), p = () => {
    c(), i();
  };
  return Cr(p), p;
}
function Vr(t = "history", e = {}) {
  const {
    initialValue: r = {},
    removeNullishValues: n = !0,
    removeFalsyValues: o = !1,
    write: a = !0,
    window: i = Ht
  } = e;
  if (!i)
    return ht(r);
  const f = ht({});
  function c() {
    if (t === "history")
      return i.location.search || "";
    if (t === "hash") {
      const v = i.location.hash || "", m = v.indexOf("?");
      return m > 0 ? v.slice(m) : "";
    } else
      return (i.location.hash || "").replace(/^#/, "");
  }
  function p(v) {
    const m = v.toString();
    if (t === "history")
      return `${m ? `?${m}` : ""}${i.location.hash || ""}`;
    if (t === "hash-params")
      return `${i.location.search || ""}${m ? `#${m}` : ""}`;
    const y = i.location.hash || "#", w = y.indexOf("?");
    return w > 0 ? `${y.slice(0, w)}${m ? `?${m}` : ""}` : `${y}${m ? `?${m}` : ""}`;
  }
  function u() {
    return new URLSearchParams(c());
  }
  function s(v) {
    const m = new Set(Object.keys(f));
    for (const y of v.keys()) {
      const w = v.getAll(y);
      f[y] = w.length > 1 ? w : v.get(y) || "", m.delete(y);
    }
    Array.from(m).forEach((y) => delete f[y]);
  }
  const { pause: l, resume: d } = kr(
    f,
    () => {
      const v = new URLSearchParams("");
      Object.keys(f).forEach((m) => {
        const y = f[m];
        Array.isArray(y) ? y.forEach((w) => v.append(m, w)) : n && y == null || o && !y ? v.delete(m) : v.set(m, y);
      }), h(v);
    },
    { deep: !0 }
  );
  function h(v, m) {
    l(), m && s(v), i.history.replaceState(
      i.history.state,
      i.document.title,
      i.location.pathname + p(v)
    ), d();
  }
  function S() {
    a && h(u(), !0);
  }
  bt(i, "popstate", S, !1), t !== "history" && bt(i, "hashchange", S, !1);
  const g = u();
  return g.keys().next().value ? s(g) : Object.assign(f, r), f;
}
const Qt = Symbol("DATA_PROVIDER_CONTEXT"), zr = (t) => zt(Qt, t), Re = () => _e(Qt, xr), qr = {
  rowKey: "id",
  title: "Fast Start",
  routerMode: "hash",
  basename: "/"
}, Hr = Symbol("FAST_START_CONTEXT"), De = () => _e(Hr, qr), Qr = {};
function jt(t) {
  const {
    initialData: e,
    shallow: r,
    onSuccess: n = Ye,
    onError: o = Ye,
    immediate: a,
    resetOnExecute: i = !1,
    queryFn: f,
    queryKey: c
  } = t, p = (r ? Je : V)(e), u = V(!1), s = V(!1), l = V(!1), d = Je(), h = (A) => {
    s.value = A, u.value = !A;
  }, S = () => {
    i && (p.value = e);
  }, g = () => new Promise((A, R) => {
    Kr(u).toBe(!0).then(() => d.value ? R(d.value) : A(w));
  }), v = {
    then: (...A) => g().then(...A),
    catch: (...A) => g().catch(...A)
  };
  let m = 0;
  const y = (A) => {
    if (d.value = void 0, s.value)
      return v;
    if (f === void 0)
      return u.value = !0, v;
    S(), h(!0), m += 1;
    const R = m;
    return f(A).then((T) => {
      const C = T;
      p.value = C, n(C);
    }).catch((T) => {
      d.value = T, o(T);
    }).finally(() => {
      var T;
      (T = t.onFinish) == null || T.call(t), R === m && h(!1);
    }), v;
  };
  a && y();
  const w = {
    data: p,
    error: d,
    isFinished: u,
    isLoading: s,
    isAborted: l,
    isCanceled: l,
    execute: y
  };
  return {
    ...w,
    ...v
  };
}
const jr = (t, e = {}, r) => {
  const { pagination: n = { page: 1, perPage: 20 }, filter: o = Qr } = e, a = Re();
  De();
  const i = jt({
    immediate: r,
    // queryKey: [filter, resource, pagination],
    queryFn: () => new Promise((p, u) => {
      a.getList(t, {
        pagination: n,
        filter: o
      }).then(({ data: s, total: l }) => ({
        data: s,
        total: l
      })).then(p).catch(u);
    }),
    initialData: {
      data: [],
      total: 0
    }
  }), f = se(() => i.data.value.data), c = se(() => i.data.value.total);
  return {
    ...i,
    data: f,
    total: c
  };
}, Jr = Symbol("RESOURCE_CONTEXT"), Jt = () => _e(Jr, { name: "" });
var Xr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Yr(t) {
  if (t.__esModule)
    return t;
  var e = t.default;
  if (typeof e == "function") {
    var r = function n() {
      return this instanceof n ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
    };
    r.prototype = e.prototype;
  } else
    r = {};
  return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(t).forEach(function(n) {
    var o = Object.getOwnPropertyDescriptor(t, n);
    Object.defineProperty(r, n, o.get ? o : {
      enumerable: !0,
      get: function() {
        return t[n];
      }
    });
  }), r;
}
var Zr = Error, en = EvalError, tn = RangeError, rn = ReferenceError, Xt = SyntaxError, ve = TypeError, nn = URIError, an = function() {
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
    return !1;
  if (typeof Symbol.iterator == "symbol")
    return !0;
  var e = {}, r = Symbol("test"), n = Object(r);
  if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]")
    return !1;
  var o = 42;
  e[r] = o;
  for (r in e)
    return !1;
  if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
    return !1;
  var a = Object.getOwnPropertySymbols(e);
  if (a.length !== 1 || a[0] !== r || !Object.prototype.propertyIsEnumerable.call(e, r))
    return !1;
  if (typeof Object.getOwnPropertyDescriptor == "function") {
    var i = Object.getOwnPropertyDescriptor(e, r);
    if (i.value !== o || i.enumerable !== !0)
      return !1;
  }
  return !0;
}, St = typeof Symbol < "u" && Symbol, on = an, ln = function() {
  return typeof St != "function" || typeof Symbol != "function" || typeof St("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : on();
}, Ne = {
  __proto__: null,
  foo: {}
}, un = Object, fn = function() {
  return { __proto__: Ne }.foo === Ne.foo && !(Ne instanceof un);
}, cn = "Function.prototype.bind called on incompatible ", sn = Object.prototype.toString, pn = Math.max, yn = "[object Function]", wt = function(e, r) {
  for (var n = [], o = 0; o < e.length; o += 1)
    n[o] = e[o];
  for (var a = 0; a < r.length; a += 1)
    n[a + e.length] = r[a];
  return n;
}, dn = function(e, r) {
  for (var n = [], o = r || 0, a = 0; o < e.length; o += 1, a += 1)
    n[a] = e[o];
  return n;
}, vn = function(t, e) {
  for (var r = "", n = 0; n < t.length; n += 1)
    r += t[n], n + 1 < t.length && (r += e);
  return r;
}, hn = function(e) {
  var r = this;
  if (typeof r != "function" || sn.apply(r) !== yn)
    throw new TypeError(cn + r);
  for (var n = dn(arguments, 1), o, a = function() {
    if (this instanceof o) {
      var u = r.apply(
        this,
        wt(n, arguments)
      );
      return Object(u) === u ? u : this;
    }
    return r.apply(
      e,
      wt(n, arguments)
    );
  }, i = pn(0, r.length - n.length), f = [], c = 0; c < i; c++)
    f[c] = "$" + c;
  if (o = Function("binder", "return function (" + vn(f, ",") + "){ return binder.apply(this,arguments); }")(a), r.prototype) {
    var p = function() {
    };
    p.prototype = r.prototype, o.prototype = new p(), p.prototype = null;
  }
  return o;
}, mn = hn, ut = Function.prototype.bind || mn, gn = Function.prototype.call, bn = Object.prototype.hasOwnProperty, Sn = ut, wn = Sn.call(gn, bn), b, An = Zr, En = en, On = tn, Pn = rn, ne = Xt, re = ve, $n = nn, Yt = Function, Be = function(t) {
  try {
    return Yt('"use strict"; return (' + t + ").constructor;")();
  } catch {
  }
}, j = Object.getOwnPropertyDescriptor;
if (j)
  try {
    j({}, "");
  } catch {
    j = null;
  }
var Me = function() {
  throw new re();
}, Fn = j ? function() {
  try {
    return arguments.callee, Me;
  } catch {
    try {
      return j(arguments, "callee").get;
    } catch {
      return Me;
    }
  }
}() : Me, X = ln(), Tn = fn(), F = Object.getPrototypeOf || (Tn ? function(t) {
  return t.__proto__;
} : null), ee = {}, In = typeof Uint8Array > "u" || !F ? b : F(Uint8Array), J = {
  __proto__: null,
  "%AggregateError%": typeof AggregateError > "u" ? b : AggregateError,
  "%Array%": Array,
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? b : ArrayBuffer,
  "%ArrayIteratorPrototype%": X && F ? F([][Symbol.iterator]()) : b,
  "%AsyncFromSyncIteratorPrototype%": b,
  "%AsyncFunction%": ee,
  "%AsyncGenerator%": ee,
  "%AsyncGeneratorFunction%": ee,
  "%AsyncIteratorPrototype%": ee,
  "%Atomics%": typeof Atomics > "u" ? b : Atomics,
  "%BigInt%": typeof BigInt > "u" ? b : BigInt,
  "%BigInt64Array%": typeof BigInt64Array > "u" ? b : BigInt64Array,
  "%BigUint64Array%": typeof BigUint64Array > "u" ? b : BigUint64Array,
  "%Boolean%": Boolean,
  "%DataView%": typeof DataView > "u" ? b : DataView,
  "%Date%": Date,
  "%decodeURI%": decodeURI,
  "%decodeURIComponent%": decodeURIComponent,
  "%encodeURI%": encodeURI,
  "%encodeURIComponent%": encodeURIComponent,
  "%Error%": An,
  "%eval%": eval,
  // eslint-disable-line no-eval
  "%EvalError%": En,
  "%Float32Array%": typeof Float32Array > "u" ? b : Float32Array,
  "%Float64Array%": typeof Float64Array > "u" ? b : Float64Array,
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? b : FinalizationRegistry,
  "%Function%": Yt,
  "%GeneratorFunction%": ee,
  "%Int8Array%": typeof Int8Array > "u" ? b : Int8Array,
  "%Int16Array%": typeof Int16Array > "u" ? b : Int16Array,
  "%Int32Array%": typeof Int32Array > "u" ? b : Int32Array,
  "%isFinite%": isFinite,
  "%isNaN%": isNaN,
  "%IteratorPrototype%": X && F ? F(F([][Symbol.iterator]())) : b,
  "%JSON%": typeof JSON == "object" ? JSON : b,
  "%Map%": typeof Map > "u" ? b : Map,
  "%MapIteratorPrototype%": typeof Map > "u" || !X || !F ? b : F((/* @__PURE__ */ new Map())[Symbol.iterator]()),
  "%Math%": Math,
  "%Number%": Number,
  "%Object%": Object,
  "%parseFloat%": parseFloat,
  "%parseInt%": parseInt,
  "%Promise%": typeof Promise > "u" ? b : Promise,
  "%Proxy%": typeof Proxy > "u" ? b : Proxy,
  "%RangeError%": On,
  "%ReferenceError%": Pn,
  "%Reflect%": typeof Reflect > "u" ? b : Reflect,
  "%RegExp%": RegExp,
  "%Set%": typeof Set > "u" ? b : Set,
  "%SetIteratorPrototype%": typeof Set > "u" || !X || !F ? b : F((/* @__PURE__ */ new Set())[Symbol.iterator]()),
  "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? b : SharedArrayBuffer,
  "%String%": String,
  "%StringIteratorPrototype%": X && F ? F(""[Symbol.iterator]()) : b,
  "%Symbol%": X ? Symbol : b,
  "%SyntaxError%": ne,
  "%ThrowTypeError%": Fn,
  "%TypedArray%": In,
  "%TypeError%": re,
  "%Uint8Array%": typeof Uint8Array > "u" ? b : Uint8Array,
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? b : Uint8ClampedArray,
  "%Uint16Array%": typeof Uint16Array > "u" ? b : Uint16Array,
  "%Uint32Array%": typeof Uint32Array > "u" ? b : Uint32Array,
  "%URIError%": $n,
  "%WeakMap%": typeof WeakMap > "u" ? b : WeakMap,
  "%WeakRef%": typeof WeakRef > "u" ? b : WeakRef,
  "%WeakSet%": typeof WeakSet > "u" ? b : WeakSet
};
if (F)
  try {
    null.error;
  } catch (t) {
    var _n = F(F(t));
    J["%Error.prototype%"] = _n;
  }
var Rn = function t(e) {
  var r;
  if (e === "%AsyncFunction%")
    r = Be("async function () {}");
  else if (e === "%GeneratorFunction%")
    r = Be("function* () {}");
  else if (e === "%AsyncGeneratorFunction%")
    r = Be("async function* () {}");
  else if (e === "%AsyncGenerator%") {
    var n = t("%AsyncGeneratorFunction%");
    n && (r = n.prototype);
  } else if (e === "%AsyncIteratorPrototype%") {
    var o = t("%AsyncGenerator%");
    o && F && (r = F(o.prototype));
  }
  return J[e] = r, r;
}, At = {
  __proto__: null,
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
  "%ArrayPrototype%": ["Array", "prototype"],
  "%ArrayProto_entries%": ["Array", "prototype", "entries"],
  "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
  "%ArrayProto_keys%": ["Array", "prototype", "keys"],
  "%ArrayProto_values%": ["Array", "prototype", "values"],
  "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
  "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
  "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
  "%BooleanPrototype%": ["Boolean", "prototype"],
  "%DataViewPrototype%": ["DataView", "prototype"],
  "%DatePrototype%": ["Date", "prototype"],
  "%ErrorPrototype%": ["Error", "prototype"],
  "%EvalErrorPrototype%": ["EvalError", "prototype"],
  "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
  "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
  "%FunctionPrototype%": ["Function", "prototype"],
  "%Generator%": ["GeneratorFunction", "prototype"],
  "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
  "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
  "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
  "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
  "%JSONParse%": ["JSON", "parse"],
  "%JSONStringify%": ["JSON", "stringify"],
  "%MapPrototype%": ["Map", "prototype"],
  "%NumberPrototype%": ["Number", "prototype"],
  "%ObjectPrototype%": ["Object", "prototype"],
  "%ObjProto_toString%": ["Object", "prototype", "toString"],
  "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
  "%PromisePrototype%": ["Promise", "prototype"],
  "%PromiseProto_then%": ["Promise", "prototype", "then"],
  "%Promise_all%": ["Promise", "all"],
  "%Promise_reject%": ["Promise", "reject"],
  "%Promise_resolve%": ["Promise", "resolve"],
  "%RangeErrorPrototype%": ["RangeError", "prototype"],
  "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
  "%RegExpPrototype%": ["RegExp", "prototype"],
  "%SetPrototype%": ["Set", "prototype"],
  "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
  "%StringPrototype%": ["String", "prototype"],
  "%SymbolPrototype%": ["Symbol", "prototype"],
  "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
  "%TypedArrayPrototype%": ["TypedArray", "prototype"],
  "%TypeErrorPrototype%": ["TypeError", "prototype"],
  "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
  "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
  "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
  "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
  "%URIErrorPrototype%": ["URIError", "prototype"],
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
}, he = ut, $e = wn, Dn = he.call(Function.call, Array.prototype.concat), xn = he.call(Function.apply, Array.prototype.splice), Et = he.call(Function.call, String.prototype.replace), Fe = he.call(Function.call, String.prototype.slice), Cn = he.call(Function.call, RegExp.prototype.exec), Nn = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Bn = /\\(\\)?/g, Mn = function(e) {
  var r = Fe(e, 0, 1), n = Fe(e, -1);
  if (r === "%" && n !== "%")
    throw new ne("invalid intrinsic syntax, expected closing `%`");
  if (n === "%" && r !== "%")
    throw new ne("invalid intrinsic syntax, expected opening `%`");
  var o = [];
  return Et(e, Nn, function(a, i, f, c) {
    o[o.length] = f ? Et(c, Bn, "$1") : i || a;
  }), o;
}, Un = function(e, r) {
  var n = e, o;
  if ($e(At, n) && (o = At[n], n = "%" + o[0] + "%"), $e(J, n)) {
    var a = J[n];
    if (a === ee && (a = Rn(n)), typeof a > "u" && !r)
      throw new re("intrinsic " + e + " exists, but is not available. Please file an issue!");
    return {
      alias: o,
      name: n,
      value: a
    };
  }
  throw new ne("intrinsic " + e + " does not exist!");
}, ie = function(e, r) {
  if (typeof e != "string" || e.length === 0)
    throw new re("intrinsic name must be a non-empty string");
  if (arguments.length > 1 && typeof r != "boolean")
    throw new re('"allowMissing" argument must be a boolean');
  if (Cn(/^%?[^%]*%?$/, e) === null)
    throw new ne("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
  var n = Mn(e), o = n.length > 0 ? n[0] : "", a = Un("%" + o + "%", r), i = a.name, f = a.value, c = !1, p = a.alias;
  p && (o = p[0], xn(n, Dn([0, 1], p)));
  for (var u = 1, s = !0; u < n.length; u += 1) {
    var l = n[u], d = Fe(l, 0, 1), h = Fe(l, -1);
    if ((d === '"' || d === "'" || d === "`" || h === '"' || h === "'" || h === "`") && d !== h)
      throw new ne("property names with quotes must have matching quotes");
    if ((l === "constructor" || !s) && (c = !0), o += "." + l, i = "%" + o + "%", $e(J, i))
      f = J[i];
    else if (f != null) {
      if (!(l in f)) {
        if (!r)
          throw new re("base intrinsic for " + e + " exists, but the property is not available.");
        return;
      }
      if (j && u + 1 >= n.length) {
        var S = j(f, l);
        s = !!S, s && "get" in S && !("originalValue" in S.get) ? f = S.get : f = f[l];
      } else
        s = $e(f, l), f = f[l];
      s && !c && (J[i] = f);
    }
  }
  return f;
}, Zt = { exports: {} }, Ue, Ot;
function ft() {
  if (Ot)
    return Ue;
  Ot = 1;
  var t = ie, e = t("%Object.defineProperty%", !0) || !1;
  if (e)
    try {
      e({}, "a", { value: 1 });
    } catch {
      e = !1;
    }
  return Ue = e, Ue;
}
var Ln = ie, Ae = Ln("%Object.getOwnPropertyDescriptor%", !0);
if (Ae)
  try {
    Ae([], "length");
  } catch {
    Ae = null;
  }
var er = Ae, Pt = ft(), Wn = Xt, Y = ve, $t = er, kn = function(e, r, n) {
  if (!e || typeof e != "object" && typeof e != "function")
    throw new Y("`obj` must be an object or a function`");
  if (typeof r != "string" && typeof r != "symbol")
    throw new Y("`property` must be a string or a symbol`");
  if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
    throw new Y("`nonEnumerable`, if provided, must be a boolean or null");
  if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
    throw new Y("`nonWritable`, if provided, must be a boolean or null");
  if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
    throw new Y("`nonConfigurable`, if provided, must be a boolean or null");
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
    throw new Y("`loose`, if provided, must be a boolean");
  var o = arguments.length > 3 ? arguments[3] : null, a = arguments.length > 4 ? arguments[4] : null, i = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, c = !!$t && $t(e, r);
  if (Pt)
    Pt(e, r, {
      configurable: i === null && c ? c.configurable : !i,
      enumerable: o === null && c ? c.enumerable : !o,
      value: n,
      writable: a === null && c ? c.writable : !a
    });
  else if (f || !o && !a && !i)
    e[r] = n;
  else
    throw new Wn("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
}, et = ft(), tr = function() {
  return !!et;
};
tr.hasArrayLengthDefineBug = function() {
  if (!et)
    return null;
  try {
    return et([], "length", { value: 1 }).length !== 1;
  } catch {
    return !0;
  }
};
var Kn = tr, Gn = ie, Ft = kn, Vn = Kn(), Tt = er, It = ve, zn = Gn("%Math.floor%"), qn = function(e, r) {
  if (typeof e != "function")
    throw new It("`fn` is not a function");
  if (typeof r != "number" || r < 0 || r > 4294967295 || zn(r) !== r)
    throw new It("`length` must be a positive 32-bit integer");
  var n = arguments.length > 2 && !!arguments[2], o = !0, a = !0;
  if ("length" in e && Tt) {
    var i = Tt(e, "length");
    i && !i.configurable && (o = !1), i && !i.writable && (a = !1);
  }
  return (o || a || !n) && (Vn ? Ft(
    /** @type {Parameters<define>[0]} */
    e,
    "length",
    r,
    !0,
    !0
  ) : Ft(
    /** @type {Parameters<define>[0]} */
    e,
    "length",
    r
  )), e;
};
(function(t) {
  var e = ut, r = ie, n = qn, o = ve, a = r("%Function.prototype.apply%"), i = r("%Function.prototype.call%"), f = r("%Reflect.apply%", !0) || e.call(i, a), c = ft(), p = r("%Math.max%");
  t.exports = function(l) {
    if (typeof l != "function")
      throw new o("a function is required");
    var d = f(e, i, arguments);
    return n(
      d,
      1 + p(0, l.length - (arguments.length - 1)),
      !0
    );
  };
  var u = function() {
    return f(e, a, arguments);
  };
  c ? c(t.exports, "apply", { value: u }) : t.exports.apply = u;
})(Zt);
var Hn = Zt.exports, rr = ie, nr = Hn, Qn = nr(rr("String.prototype.indexOf")), jn = function(e, r) {
  var n = rr(e, !!r);
  return typeof n == "function" && Qn(e, ".prototype.") > -1 ? nr(n) : n;
};
const Jn = {}, Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Jn
}, Symbol.toStringTag, { value: "Module" })), Yn = /* @__PURE__ */ Yr(Xn);
var ct = typeof Map == "function" && Map.prototype, Le = Object.getOwnPropertyDescriptor && ct ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Te = ct && Le && typeof Le.get == "function" ? Le.get : null, _t = ct && Map.prototype.forEach, st = typeof Set == "function" && Set.prototype, We = Object.getOwnPropertyDescriptor && st ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Ie = st && We && typeof We.get == "function" ? We.get : null, Rt = st && Set.prototype.forEach, Zn = typeof WeakMap == "function" && WeakMap.prototype, pe = Zn ? WeakMap.prototype.has : null, ea = typeof WeakSet == "function" && WeakSet.prototype, ye = ea ? WeakSet.prototype.has : null, ta = typeof WeakRef == "function" && WeakRef.prototype, Dt = ta ? WeakRef.prototype.deref : null, ra = Boolean.prototype.valueOf, na = Object.prototype.toString, aa = Function.prototype.toString, oa = String.prototype.match, pt = String.prototype.slice, z = String.prototype.replace, ia = String.prototype.toUpperCase, xt = String.prototype.toLowerCase, ar = RegExp.prototype.test, Ct = Array.prototype.concat, U = Array.prototype.join, la = Array.prototype.slice, Nt = Math.floor, tt = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, ke = Object.getOwnPropertySymbols, rt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, ae = typeof Symbol == "function" && typeof Symbol.iterator == "object", I = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === ae || !0) ? Symbol.toStringTag : null, or = Object.prototype.propertyIsEnumerable, Bt = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
  return t.__proto__;
} : null);
function Mt(t, e) {
  if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 || ar.call(/e/, e))
    return e;
  var r = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  if (typeof t == "number") {
    var n = t < 0 ? -Nt(-t) : Nt(t);
    if (n !== t) {
      var o = String(n), a = pt.call(e, o.length + 1);
      return z.call(o, r, "$&_") + "." + z.call(z.call(a, /([0-9]{3})/g, "$&_"), /_$/, "");
    }
  }
  return z.call(e, r, "$&_");
}
var nt = Yn, Ut = nt.custom, Lt = lr(Ut) ? Ut : null, ua = function t(e, r, n, o) {
  var a = r || {};
  if (G(a, "quoteStyle") && a.quoteStyle !== "single" && a.quoteStyle !== "double")
    throw new TypeError('option "quoteStyle" must be "single" or "double"');
  if (G(a, "maxStringLength") && (typeof a.maxStringLength == "number" ? a.maxStringLength < 0 && a.maxStringLength !== 1 / 0 : a.maxStringLength !== null))
    throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  var i = G(a, "customInspect") ? a.customInspect : !0;
  if (typeof i != "boolean" && i !== "symbol")
    throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
  if (G(a, "indent") && a.indent !== null && a.indent !== "	" && !(parseInt(a.indent, 10) === a.indent && a.indent > 0))
    throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  if (G(a, "numericSeparator") && typeof a.numericSeparator != "boolean")
    throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  var f = a.numericSeparator;
  if (typeof e > "u")
    return "undefined";
  if (e === null)
    return "null";
  if (typeof e == "boolean")
    return e ? "true" : "false";
  if (typeof e == "string")
    return fr(e, a);
  if (typeof e == "number") {
    if (e === 0)
      return 1 / 0 / e > 0 ? "0" : "-0";
    var c = String(e);
    return f ? Mt(e, c) : c;
  }
  if (typeof e == "bigint") {
    var p = String(e) + "n";
    return f ? Mt(e, p) : p;
  }
  var u = typeof a.depth > "u" ? 5 : a.depth;
  if (typeof n > "u" && (n = 0), n >= u && u > 0 && typeof e == "object")
    return at(e) ? "[Array]" : "[Object]";
  var s = $a(a, n);
  if (typeof o > "u")
    o = [];
  else if (ur(o, e) >= 0)
    return "[Circular]";
  function l(D, k, K) {
    if (k && (o = la.call(o), o.push(k)), K) {
      var ue = {
        depth: a.depth
      };
      return G(a, "quoteStyle") && (ue.quoteStyle = a.quoteStyle), t(D, ue, n + 1, o);
    }
    return t(D, a, n + 1, o);
  }
  if (typeof e == "function" && !Wt(e)) {
    var d = ma(e), h = be(e, l);
    return "[Function" + (d ? ": " + d : " (anonymous)") + "]" + (h.length > 0 ? " { " + U.call(h, ", ") + " }" : "");
  }
  if (lr(e)) {
    var S = ae ? z.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : rt.call(e);
    return typeof e == "object" && !ae ? ce(S) : S;
  }
  if (Ea(e)) {
    for (var g = "<" + xt.call(String(e.nodeName)), v = e.attributes || [], m = 0; m < v.length; m++)
      g += " " + v[m].name + "=" + ir(fa(v[m].value), "double", a);
    return g += ">", e.childNodes && e.childNodes.length && (g += "..."), g += "</" + xt.call(String(e.nodeName)) + ">", g;
  }
  if (at(e)) {
    if (e.length === 0)
      return "[]";
    var y = be(e, l);
    return s && !Pa(y) ? "[" + ot(y, s) + "]" : "[ " + U.call(y, ", ") + " ]";
  }
  if (sa(e)) {
    var w = be(e, l);
    return !("cause" in Error.prototype) && "cause" in e && !or.call(e, "cause") ? "{ [" + String(e) + "] " + U.call(Ct.call("[cause]: " + l(e.cause), w), ", ") + " }" : w.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + U.call(w, ", ") + " }";
  }
  if (typeof e == "object" && i) {
    if (Lt && typeof e[Lt] == "function" && nt)
      return nt(e, { depth: u - n });
    if (i !== "symbol" && typeof e.inspect == "function")
      return e.inspect();
  }
  if (ga(e)) {
    var A = [];
    return _t && _t.call(e, function(D, k) {
      A.push(l(k, e, !0) + " => " + l(D, e));
    }), kt("Map", Te.call(e), A, s);
  }
  if (wa(e)) {
    var R = [];
    return Rt && Rt.call(e, function(D) {
      R.push(l(D, e));
    }), kt("Set", Ie.call(e), R, s);
  }
  if (ba(e))
    return Ke("WeakMap");
  if (Aa(e))
    return Ke("WeakSet");
  if (Sa(e))
    return Ke("WeakRef");
  if (ya(e))
    return ce(l(Number(e)));
  if (va(e))
    return ce(l(tt.call(e)));
  if (da(e))
    return ce(ra.call(e));
  if (pa(e))
    return ce(l(String(e)));
  if (typeof window < "u" && e === window)
    return "{ [object Window] }";
  if (e === Xr)
    return "{ [object globalThis] }";
  if (!ca(e) && !Wt(e)) {
    var T = be(e, l), C = Bt ? Bt(e) === Object.prototype : e instanceof Object || e.constructor === Object, $ = e instanceof Object ? "" : "null prototype", _ = !C && I && Object(e) === e && I in e ? pt.call(q(e), 8, -1) : $ ? "Object" : "", L = C || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", N = L + (_ || $ ? "[" + U.call(Ct.call([], _ || [], $ || []), ": ") + "] " : "");
    return T.length === 0 ? N + "{}" : s ? N + "{" + ot(T, s) + "}" : N + "{ " + U.call(T, ", ") + " }";
  }
  return String(e);
};
function ir(t, e, r) {
  var n = (r.quoteStyle || e) === "double" ? '"' : "'";
  return n + t + n;
}
function fa(t) {
  return z.call(String(t), /"/g, "&quot;");
}
function at(t) {
  return q(t) === "[object Array]" && (!I || !(typeof t == "object" && I in t));
}
function ca(t) {
  return q(t) === "[object Date]" && (!I || !(typeof t == "object" && I in t));
}
function Wt(t) {
  return q(t) === "[object RegExp]" && (!I || !(typeof t == "object" && I in t));
}
function sa(t) {
  return q(t) === "[object Error]" && (!I || !(typeof t == "object" && I in t));
}
function pa(t) {
  return q(t) === "[object String]" && (!I || !(typeof t == "object" && I in t));
}
function ya(t) {
  return q(t) === "[object Number]" && (!I || !(typeof t == "object" && I in t));
}
function da(t) {
  return q(t) === "[object Boolean]" && (!I || !(typeof t == "object" && I in t));
}
function lr(t) {
  if (ae)
    return t && typeof t == "object" && t instanceof Symbol;
  if (typeof t == "symbol")
    return !0;
  if (!t || typeof t != "object" || !rt)
    return !1;
  try {
    return rt.call(t), !0;
  } catch {
  }
  return !1;
}
function va(t) {
  if (!t || typeof t != "object" || !tt)
    return !1;
  try {
    return tt.call(t), !0;
  } catch {
  }
  return !1;
}
var ha = Object.prototype.hasOwnProperty || function(t) {
  return t in this;
};
function G(t, e) {
  return ha.call(t, e);
}
function q(t) {
  return na.call(t);
}
function ma(t) {
  if (t.name)
    return t.name;
  var e = oa.call(aa.call(t), /^function\s*([\w$]+)/);
  return e ? e[1] : null;
}
function ur(t, e) {
  if (t.indexOf)
    return t.indexOf(e);
  for (var r = 0, n = t.length; r < n; r++)
    if (t[r] === e)
      return r;
  return -1;
}
function ga(t) {
  if (!Te || !t || typeof t != "object")
    return !1;
  try {
    Te.call(t);
    try {
      Ie.call(t);
    } catch {
      return !0;
    }
    return t instanceof Map;
  } catch {
  }
  return !1;
}
function ba(t) {
  if (!pe || !t || typeof t != "object")
    return !1;
  try {
    pe.call(t, pe);
    try {
      ye.call(t, ye);
    } catch {
      return !0;
    }
    return t instanceof WeakMap;
  } catch {
  }
  return !1;
}
function Sa(t) {
  if (!Dt || !t || typeof t != "object")
    return !1;
  try {
    return Dt.call(t), !0;
  } catch {
  }
  return !1;
}
function wa(t) {
  if (!Ie || !t || typeof t != "object")
    return !1;
  try {
    Ie.call(t);
    try {
      Te.call(t);
    } catch {
      return !0;
    }
    return t instanceof Set;
  } catch {
  }
  return !1;
}
function Aa(t) {
  if (!ye || !t || typeof t != "object")
    return !1;
  try {
    ye.call(t, ye);
    try {
      pe.call(t, pe);
    } catch {
      return !0;
    }
    return t instanceof WeakSet;
  } catch {
  }
  return !1;
}
function Ea(t) {
  return !t || typeof t != "object" ? !1 : typeof HTMLElement < "u" && t instanceof HTMLElement ? !0 : typeof t.nodeName == "string" && typeof t.getAttribute == "function";
}
function fr(t, e) {
  if (t.length > e.maxStringLength) {
    var r = t.length - e.maxStringLength, n = "... " + r + " more character" + (r > 1 ? "s" : "");
    return fr(pt.call(t, 0, e.maxStringLength), e) + n;
  }
  var o = z.call(z.call(t, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Oa);
  return ir(o, "single", e);
}
function Oa(t) {
  var e = t.charCodeAt(0), r = {
    8: "b",
    9: "t",
    10: "n",
    12: "f",
    13: "r"
  }[e];
  return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + ia.call(e.toString(16));
}
function ce(t) {
  return "Object(" + t + ")";
}
function Ke(t) {
  return t + " { ? }";
}
function kt(t, e, r, n) {
  var o = n ? ot(r, n) : U.call(r, ", ");
  return t + " (" + e + ") {" + o + "}";
}
function Pa(t) {
  for (var e = 0; e < t.length; e++)
    if (ur(t[e], `
`) >= 0)
      return !1;
  return !0;
}
function $a(t, e) {
  var r;
  if (t.indent === "	")
    r = "	";
  else if (typeof t.indent == "number" && t.indent > 0)
    r = U.call(Array(t.indent + 1), " ");
  else
    return null;
  return {
    base: r,
    prev: U.call(Array(e + 1), r)
  };
}
function ot(t, e) {
  if (t.length === 0)
    return "";
  var r = `
` + e.prev + e.base;
  return r + U.call(t, "," + r) + `
` + e.prev;
}
function be(t, e) {
  var r = at(t), n = [];
  if (r) {
    n.length = t.length;
    for (var o = 0; o < t.length; o++)
      n[o] = G(t, o) ? e(t[o], t) : "";
  }
  var a = typeof ke == "function" ? ke(t) : [], i;
  if (ae) {
    i = {};
    for (var f = 0; f < a.length; f++)
      i["$" + a[f]] = a[f];
  }
  for (var c in t)
    G(t, c) && (r && String(Number(c)) === c && c < t.length || ae && i["$" + c] instanceof Symbol || (ar.call(/[^\w$]/, c) ? n.push(e(c, t) + ": " + e(t[c], t)) : n.push(c + ": " + e(t[c], t))));
  if (typeof ke == "function")
    for (var p = 0; p < a.length; p++)
      or.call(t, a[p]) && n.push("[" + e(a[p]) + "]: " + e(t[a[p]], t));
  return n;
}
var cr = ie, le = jn, Fa = ua, Ta = ve, Se = cr("%WeakMap%", !0), we = cr("%Map%", !0), Ia = le("WeakMap.prototype.get", !0), _a = le("WeakMap.prototype.set", !0), Ra = le("WeakMap.prototype.has", !0), Da = le("Map.prototype.get", !0), xa = le("Map.prototype.set", !0), Ca = le("Map.prototype.has", !0), yt = function(t, e) {
  for (var r = t, n; (n = r.next) !== null; r = n)
    if (n.key === e)
      return r.next = n.next, n.next = /** @type {NonNullable<typeof list.next>} */
      t.next, t.next = n, n;
}, Na = function(t, e) {
  var r = yt(t, e);
  return r && r.value;
}, Ba = function(t, e, r) {
  var n = yt(t, e);
  n ? n.value = r : t.next = /** @type {import('.').ListNode<typeof value>} */
  {
    // eslint-disable-line no-param-reassign, no-extra-parens
    key: e,
    next: t.next,
    value: r
  };
}, Ma = function(t, e) {
  return !!yt(t, e);
}, Ua = function() {
  var e, r, n, o = {
    assert: function(a) {
      if (!o.has(a))
        throw new Ta("Side channel does not contain " + Fa(a));
    },
    get: function(a) {
      if (Se && a && (typeof a == "object" || typeof a == "function")) {
        if (e)
          return Ia(e, a);
      } else if (we) {
        if (r)
          return Da(r, a);
      } else if (n)
        return Na(n, a);
    },
    has: function(a) {
      if (Se && a && (typeof a == "object" || typeof a == "function")) {
        if (e)
          return Ra(e, a);
      } else if (we) {
        if (r)
          return Ca(r, a);
      } else if (n)
        return Ma(n, a);
      return !1;
    },
    set: function(a, i) {
      Se && a && (typeof a == "object" || typeof a == "function") ? (e || (e = new Se()), _a(e, a, i)) : we ? (r || (r = new we()), xa(r, a, i)) : (n || (n = { key: {}, next: null }), Ba(n, a, i));
    }
  };
  return o;
}, La = String.prototype.replace, Wa = /%20/g, Ge = {
  RFC1738: "RFC1738",
  RFC3986: "RFC3986"
}, dt = {
  default: Ge.RFC3986,
  formatters: {
    RFC1738: function(t) {
      return La.call(t, Wa, "+");
    },
    RFC3986: function(t) {
      return String(t);
    }
  },
  RFC1738: Ge.RFC1738,
  RFC3986: Ge.RFC3986
}, ka = dt, Ve = Object.prototype.hasOwnProperty, Q = Array.isArray, B = function() {
  for (var t = [], e = 0; e < 256; ++e)
    t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
  return t;
}(), Ka = function(e) {
  for (; e.length > 1; ) {
    var r = e.pop(), n = r.obj[r.prop];
    if (Q(n)) {
      for (var o = [], a = 0; a < n.length; ++a)
        typeof n[a] < "u" && o.push(n[a]);
      r.obj[r.prop] = o;
    }
  }
}, sr = function(e, r) {
  for (var n = r && r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, o = 0; o < e.length; ++o)
    typeof e[o] < "u" && (n[o] = e[o]);
  return n;
}, Ga = function t(e, r, n) {
  if (!r)
    return e;
  if (typeof r != "object") {
    if (Q(e))
      e.push(r);
    else if (e && typeof e == "object")
      (n && (n.plainObjects || n.allowPrototypes) || !Ve.call(Object.prototype, r)) && (e[r] = !0);
    else
      return [e, r];
    return e;
  }
  if (!e || typeof e != "object")
    return [e].concat(r);
  var o = e;
  return Q(e) && !Q(r) && (o = sr(e, n)), Q(e) && Q(r) ? (r.forEach(function(a, i) {
    if (Ve.call(e, i)) {
      var f = e[i];
      f && typeof f == "object" && a && typeof a == "object" ? e[i] = t(f, a, n) : e.push(a);
    } else
      e[i] = a;
  }), e) : Object.keys(r).reduce(function(a, i) {
    var f = r[i];
    return Ve.call(a, i) ? a[i] = t(a[i], f, n) : a[i] = f, a;
  }, o);
}, Va = function(e, r) {
  return Object.keys(r).reduce(function(n, o) {
    return n[o] = r[o], n;
  }, e);
}, za = function(t, e, r) {
  var n = t.replace(/\+/g, " ");
  if (r === "iso-8859-1")
    return n.replace(/%[0-9a-f]{2}/gi, unescape);
  try {
    return decodeURIComponent(n);
  } catch {
    return n;
  }
}, ze = 1024, qa = function(e, r, n, o, a) {
  if (e.length === 0)
    return e;
  var i = e;
  if (typeof e == "symbol" ? i = Symbol.prototype.toString.call(e) : typeof e != "string" && (i = String(e)), n === "iso-8859-1")
    return escape(i).replace(/%u[0-9a-f]{4}/gi, function(d) {
      return "%26%23" + parseInt(d.slice(2), 16) + "%3B";
    });
  for (var f = "", c = 0; c < i.length; c += ze) {
    for (var p = i.length >= ze ? i.slice(c, c + ze) : i, u = [], s = 0; s < p.length; ++s) {
      var l = p.charCodeAt(s);
      if (l === 45 || l === 46 || l === 95 || l === 126 || l >= 48 && l <= 57 || l >= 65 && l <= 90 || l >= 97 && l <= 122 || a === ka.RFC1738 && (l === 40 || l === 41)) {
        u[u.length] = p.charAt(s);
        continue;
      }
      if (l < 128) {
        u[u.length] = B[l];
        continue;
      }
      if (l < 2048) {
        u[u.length] = B[192 | l >> 6] + B[128 | l & 63];
        continue;
      }
      if (l < 55296 || l >= 57344) {
        u[u.length] = B[224 | l >> 12] + B[128 | l >> 6 & 63] + B[128 | l & 63];
        continue;
      }
      s += 1, l = 65536 + ((l & 1023) << 10 | p.charCodeAt(s) & 1023), u[u.length] = B[240 | l >> 18] + B[128 | l >> 12 & 63] + B[128 | l >> 6 & 63] + B[128 | l & 63];
    }
    f += u.join("");
  }
  return f;
}, Ha = function(e) {
  for (var r = [{ obj: { o: e }, prop: "o" }], n = [], o = 0; o < r.length; ++o)
    for (var a = r[o], i = a.obj[a.prop], f = Object.keys(i), c = 0; c < f.length; ++c) {
      var p = f[c], u = i[p];
      typeof u == "object" && u !== null && n.indexOf(u) === -1 && (r.push({ obj: i, prop: p }), n.push(u));
    }
  return Ka(r), e;
}, Qa = function(e) {
  return Object.prototype.toString.call(e) === "[object RegExp]";
}, ja = function(e) {
  return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
}, Ja = function(e, r) {
  return [].concat(e, r);
}, Xa = function(e, r) {
  if (Q(e)) {
    for (var n = [], o = 0; o < e.length; o += 1)
      n.push(r(e[o]));
    return n;
  }
  return r(e);
}, pr = {
  arrayToObject: sr,
  assign: Va,
  combine: Ja,
  compact: Ha,
  decode: za,
  encode: qa,
  isBuffer: ja,
  isRegExp: Qa,
  maybeMap: Xa,
  merge: Ga
}, yr = Ua, Ee = pr, de = dt, Ya = Object.prototype.hasOwnProperty, dr = {
  brackets: function(e) {
    return e + "[]";
  },
  comma: "comma",
  indices: function(e, r) {
    return e + "[" + r + "]";
  },
  repeat: function(e) {
    return e;
  }
}, M = Array.isArray, Za = Array.prototype.push, vr = function(t, e) {
  Za.apply(t, M(e) ? e : [e]);
}, eo = Date.prototype.toISOString, Kt = de.default, O = {
  addQueryPrefix: !1,
  allowDots: !1,
  allowEmptyArrays: !1,
  arrayFormat: "indices",
  charset: "utf-8",
  charsetSentinel: !1,
  delimiter: "&",
  encode: !0,
  encodeDotInKeys: !1,
  encoder: Ee.encode,
  encodeValuesOnly: !1,
  format: Kt,
  formatter: de.formatters[Kt],
  // deprecated
  indices: !1,
  serializeDate: function(e) {
    return eo.call(e);
  },
  skipNulls: !1,
  strictNullHandling: !1
}, to = function(e) {
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
}, qe = {}, ro = function t(e, r, n, o, a, i, f, c, p, u, s, l, d, h, S, g, v, m) {
  for (var y = e, w = m, A = 0, R = !1; (w = w.get(qe)) !== void 0 && !R; ) {
    var T = w.get(e);
    if (A += 1, typeof T < "u") {
      if (T === A)
        throw new RangeError("Cyclic object value");
      R = !0;
    }
    typeof w.get(qe) > "u" && (A = 0);
  }
  if (typeof u == "function" ? y = u(r, y) : y instanceof Date ? y = d(y) : n === "comma" && M(y) && (y = Ee.maybeMap(y, function(Ce) {
    return Ce instanceof Date ? d(Ce) : Ce;
  })), y === null) {
    if (i)
      return p && !g ? p(r, O.encoder, v, "key", h) : r;
    y = "";
  }
  if (to(y) || Ee.isBuffer(y)) {
    if (p) {
      var C = g ? r : p(r, O.encoder, v, "key", h);
      return [S(C) + "=" + S(p(y, O.encoder, v, "value", h))];
    }
    return [S(r) + "=" + S(String(y))];
  }
  var $ = [];
  if (typeof y > "u")
    return $;
  var _;
  if (n === "comma" && M(y))
    g && p && (y = Ee.maybeMap(y, p)), _ = [{ value: y.length > 0 ? y.join(",") || null : void 0 }];
  else if (M(u))
    _ = u;
  else {
    var L = Object.keys(y);
    _ = s ? L.sort(s) : L;
  }
  var N = c ? r.replace(/\./g, "%2E") : r, D = o && M(y) && y.length === 1 ? N + "[]" : N;
  if (a && M(y) && y.length === 0)
    return D + "[]";
  for (var k = 0; k < _.length; ++k) {
    var K = _[k], ue = typeof K == "object" && typeof K.value < "u" ? K.value : y[K];
    if (!(f && ue === null)) {
      var xe = l && c ? K.replace(/\./g, "%2E") : K, gr = M(y) ? typeof n == "function" ? n(D, xe) : D : D + (l ? "." + xe : "[" + xe + "]");
      m.set(e, A);
      var vt = yr();
      vt.set(qe, m), vr($, t(
        ue,
        gr,
        n,
        o,
        a,
        i,
        f,
        c,
        n === "comma" && g && M(y) ? null : p,
        u,
        s,
        l,
        d,
        h,
        S,
        g,
        v,
        vt
      ));
    }
  }
  return $;
}, no = function(e) {
  if (!e)
    return O;
  if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
    throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
  if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
    throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
  if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
    throw new TypeError("Encoder has to be a function.");
  var r = e.charset || O.charset;
  if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
    throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  var n = de.default;
  if (typeof e.format < "u") {
    if (!Ya.call(de.formatters, e.format))
      throw new TypeError("Unknown format option provided.");
    n = e.format;
  }
  var o = de.formatters[n], a = O.filter;
  (typeof e.filter == "function" || M(e.filter)) && (a = e.filter);
  var i;
  if (e.arrayFormat in dr ? i = e.arrayFormat : "indices" in e ? i = e.indices ? "indices" : "repeat" : i = O.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
    throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
  var f = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : O.allowDots : !!e.allowDots;
  return {
    addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : O.addQueryPrefix,
    allowDots: f,
    allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : O.allowEmptyArrays,
    arrayFormat: i,
    charset: r,
    charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : O.charsetSentinel,
    commaRoundTrip: e.commaRoundTrip,
    delimiter: typeof e.delimiter > "u" ? O.delimiter : e.delimiter,
    encode: typeof e.encode == "boolean" ? e.encode : O.encode,
    encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : O.encodeDotInKeys,
    encoder: typeof e.encoder == "function" ? e.encoder : O.encoder,
    encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : O.encodeValuesOnly,
    filter: a,
    format: n,
    formatter: o,
    serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : O.serializeDate,
    skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : O.skipNulls,
    sort: typeof e.sort == "function" ? e.sort : null,
    strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : O.strictNullHandling
  };
}, ao = function(t, e) {
  var r = t, n = no(e), o, a;
  typeof n.filter == "function" ? (a = n.filter, r = a("", r)) : M(n.filter) && (a = n.filter, o = a);
  var i = [];
  if (typeof r != "object" || r === null)
    return "";
  var f = dr[n.arrayFormat], c = f === "comma" && n.commaRoundTrip;
  o || (o = Object.keys(r)), n.sort && o.sort(n.sort);
  for (var p = yr(), u = 0; u < o.length; ++u) {
    var s = o[u];
    n.skipNulls && r[s] === null || vr(i, ro(
      r[s],
      s,
      f,
      c,
      n.allowEmptyArrays,
      n.strictNullHandling,
      n.skipNulls,
      n.encodeDotInKeys,
      n.encode ? n.encoder : null,
      n.filter,
      n.sort,
      n.allowDots,
      n.serializeDate,
      n.format,
      n.formatter,
      n.encodeValuesOnly,
      n.charset,
      p
    ));
  }
  var l = i.join(n.delimiter), d = n.addQueryPrefix === !0 ? "?" : "";
  return n.charsetSentinel && (n.charset === "iso-8859-1" ? d += "utf8=%26%2310003%3B&" : d += "utf8=%E2%9C%93&"), l.length > 0 ? d + l : "";
}, oe = pr, it = Object.prototype.hasOwnProperty, oo = Array.isArray, E = {
  allowDots: !1,
  allowEmptyArrays: !1,
  allowPrototypes: !1,
  allowSparse: !1,
  arrayLimit: 20,
  charset: "utf-8",
  charsetSentinel: !1,
  comma: !1,
  decodeDotInKeys: !1,
  decoder: oe.decode,
  delimiter: "&",
  depth: 5,
  duplicates: "combine",
  ignoreQueryPrefix: !1,
  interpretNumericEntities: !1,
  parameterLimit: 1e3,
  parseArrays: !0,
  plainObjects: !1,
  strictNullHandling: !1
}, io = function(t) {
  return t.replace(/&#(\d+);/g, function(e, r) {
    return String.fromCharCode(parseInt(r, 10));
  });
}, hr = function(t, e) {
  return t && typeof t == "string" && e.comma && t.indexOf(",") > -1 ? t.split(",") : t;
}, lo = "utf8=%26%2310003%3B", uo = "utf8=%E2%9C%93", fo = function(e, r) {
  var n = { __proto__: null }, o = r.ignoreQueryPrefix ? e.replace(/^\?/, "") : e, a = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, i = o.split(r.delimiter, a), f = -1, c, p = r.charset;
  if (r.charsetSentinel)
    for (c = 0; c < i.length; ++c)
      i[c].indexOf("utf8=") === 0 && (i[c] === uo ? p = "utf-8" : i[c] === lo && (p = "iso-8859-1"), f = c, c = i.length);
  for (c = 0; c < i.length; ++c)
    if (c !== f) {
      var u = i[c], s = u.indexOf("]="), l = s === -1 ? u.indexOf("=") : s + 1, d, h;
      l === -1 ? (d = r.decoder(u, E.decoder, p, "key"), h = r.strictNullHandling ? null : "") : (d = r.decoder(u.slice(0, l), E.decoder, p, "key"), h = oe.maybeMap(
        hr(u.slice(l + 1), r),
        function(g) {
          return r.decoder(g, E.decoder, p, "value");
        }
      )), h && r.interpretNumericEntities && p === "iso-8859-1" && (h = io(h)), u.indexOf("[]=") > -1 && (h = oo(h) ? [h] : h);
      var S = it.call(n, d);
      S && r.duplicates === "combine" ? n[d] = oe.combine(n[d], h) : (!S || r.duplicates === "last") && (n[d] = h);
    }
  return n;
}, co = function(t, e, r, n) {
  for (var o = n ? e : hr(e, r), a = t.length - 1; a >= 0; --a) {
    var i, f = t[a];
    if (f === "[]" && r.parseArrays)
      i = r.allowEmptyArrays && o === "" ? [] : [].concat(o);
    else {
      i = r.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
      var c = f.charAt(0) === "[" && f.charAt(f.length - 1) === "]" ? f.slice(1, -1) : f, p = r.decodeDotInKeys ? c.replace(/%2E/g, ".") : c, u = parseInt(p, 10);
      !r.parseArrays && p === "" ? i = { 0: o } : !isNaN(u) && f !== p && String(u) === p && u >= 0 && r.parseArrays && u <= r.arrayLimit ? (i = [], i[u] = o) : p !== "__proto__" && (i[p] = o);
    }
    o = i;
  }
  return o;
}, so = function(e, r, n, o) {
  if (e) {
    var a = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, i = /(\[[^[\]]*])/, f = /(\[[^[\]]*])/g, c = n.depth > 0 && i.exec(a), p = c ? a.slice(0, c.index) : a, u = [];
    if (p) {
      if (!n.plainObjects && it.call(Object.prototype, p) && !n.allowPrototypes)
        return;
      u.push(p);
    }
    for (var s = 0; n.depth > 0 && (c = f.exec(a)) !== null && s < n.depth; ) {
      if (s += 1, !n.plainObjects && it.call(Object.prototype, c[1].slice(1, -1)) && !n.allowPrototypes)
        return;
      u.push(c[1]);
    }
    return c && u.push("[" + a.slice(c.index) + "]"), co(u, r, n, o);
  }
}, po = function(e) {
  if (!e)
    return E;
  if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
    throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
  if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
    throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
  if (e.decoder !== null && typeof e.decoder < "u" && typeof e.decoder != "function")
    throw new TypeError("Decoder has to be a function.");
  if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
    throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
  var r = typeof e.charset > "u" ? E.charset : e.charset, n = typeof e.duplicates > "u" ? E.duplicates : e.duplicates;
  if (n !== "combine" && n !== "first" && n !== "last")
    throw new TypeError("The duplicates option must be either combine, first, or last");
  var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : E.allowDots : !!e.allowDots;
  return {
    allowDots: o,
    allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : E.allowEmptyArrays,
    allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : E.allowPrototypes,
    allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : E.allowSparse,
    arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : E.arrayLimit,
    charset: r,
    charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : E.charsetSentinel,
    comma: typeof e.comma == "boolean" ? e.comma : E.comma,
    decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : E.decodeDotInKeys,
    decoder: typeof e.decoder == "function" ? e.decoder : E.decoder,
    delimiter: typeof e.delimiter == "string" || oe.isRegExp(e.delimiter) ? e.delimiter : E.delimiter,
    // eslint-disable-next-line no-implicit-coercion, no-extra-parens
    depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : E.depth,
    duplicates: n,
    ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
    interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : E.interpretNumericEntities,
    parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : E.parameterLimit,
    parseArrays: e.parseArrays !== !1,
    plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : E.plainObjects,
    strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : E.strictNullHandling
  };
}, yo = function(t, e) {
  var r = po(e);
  if (t === "" || t === null || typeof t > "u")
    return r.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
  for (var n = typeof t == "string" ? fo(t, r) : t, o = r.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, a = Object.keys(n), i = 0; i < a.length; ++i) {
    var f = a[i], c = so(f, n[f], r, typeof t == "string");
    o = oe.merge(o, c, r);
  }
  return r.allowSparse === !0 ? o : oe.compact(o);
}, vo = ao, ho = yo, mo = dt, He = {
  formats: mo,
  parse: ho,
  stringify: vo
};
const go = {
  ignoreQueryPrefix: !0
}, bo = {
  skipNulls: !0
};
function So(t, e) {
  const { routerMode: r } = De(), n = { ...go, ...e.parseOptions }, o = {
    ...bo,
    ...e.stringifyOptions
  }, a = e.nestedKey ? {
    [e.nestedKey]: He.stringify(t || "{}", o)
  } : t, i = Vr(r || "hash", { initialValue: a }), f = (u) => {
    e != null && e.nestedKey ? i[e.nestedKey] = He.stringify(u, o) : Object.entries(u).forEach(([s, l]) => {
      i[s] = l;
    });
  }, c = (u) => {
    f(u);
  };
  return [e.nestedKey ? He.parse(i[e.nestedKey] || "{}", n) : i, c];
}
const mr = Symbol("FORM_PROVIDER_CONTEXT"), wo = (t) => zt(mr, t), Ao = () => _e(mr), Eo = { class: "fast-start-table" }, Oo = /* @__PURE__ */ lt({
  name: "FsDataTable",
  inheritAttrs: !1,
  __name: "FsDataTable",
  props: {
    tableData: {},
    immediate: { type: Boolean, default: !0 },
    request: {},
    data: {},
    size: {},
    width: {},
    height: {},
    maxHeight: {},
    fit: { type: Boolean },
    stripe: { type: Boolean },
    border: { type: Boolean },
    rowKey: {},
    context: {},
    showHeader: { type: Boolean },
    showSummary: { type: Boolean },
    sumText: {},
    summaryMethod: {},
    rowClassName: {},
    rowStyle: {},
    cellClassName: {},
    cellStyle: {},
    headerRowClassName: {},
    headerRowStyle: {},
    headerCellClassName: {},
    headerCellStyle: {},
    highlightCurrentRow: { type: Boolean },
    currentRowKey: {},
    emptyText: {},
    expandRowKeys: {},
    defaultExpandAll: { type: Boolean },
    defaultSort: {},
    tooltipEffect: {},
    tooltipOptions: {},
    spanMethod: {},
    selectOnIndeterminate: { type: Boolean },
    indent: {},
    treeProps: {},
    lazy: { type: Boolean },
    load: {},
    className: {},
    style: {},
    tableLayout: {},
    scrollbarAlwaysOn: { type: Boolean },
    flexible: { type: Boolean },
    showOverflowTooltip: { type: [Boolean, Object] }
  },
  setup(t, { expose: e }) {
    var T, C;
    const r = t, n = Re();
    r.request && zr({ ...n, getList: r.request });
    const o = V([]), a = Jt(), i = De(), f = Je(), [c, p] = So(
      {
        pagination: {
          page: 1,
          perPage: 10
        },
        filter: {}
      },
      {
        nestedKey: "tableState"
      }
    ), u = V({
      pagination: {
        page: Number((T = c.pagination) == null ? void 0 : T.page) || 1,
        perPage: Number((C = c.pagination) == null ? void 0 : C.perPage) || 10
      },
      filter: {}
    }), { data: s, total: l, isLoading: d, execute: h } = jr(
      a.name,
      u.value,
      r.immediate
    ), S = se(() => r.rowKey || i.rowKey), g = se(() => r.tableData || s.value), v = () => {
      h(), p(u.value);
    }, m = ($) => {
      u.value.filter = $;
    }, y = ($) => {
    }, w = () => {
      var $;
      ($ = f.value) == null || $.clearSelection();
    }, A = ($) => {
      $.forEach((_) => {
        var L;
        (L = f.value) == null || L.toggleRowSelection(_, void 0);
      });
    }, R = se(() => u.value.filter);
    return wo({
      tableInstance: f.value,
      setFilter: m,
      reload: v,
      filter: je(R),
      multipleSelection: o,
      rowKey: S.value,
      clearSelection: w,
      toggleSelection: A
    }), e({
      tableInstance: f.value,
      setFilter: m,
      reload: v,
      filter: je(R),
      multipleSelection: o,
      clearSelection: w,
      toggleSelection: A
    }), ($, _) => {
      const L = Or("loading");
      return Xe(), Pr("div", Eo, [
        $r((Xe(), Vt(P(Tr), Fr({
          onSelectionChange: y,
          ref_key: "tableInstance",
          ref: f,
          "row-key": S.value,
          data: g.value
        }, $.$attrs, {
          "highlight-current-row": "",
          "scrollbar-always-on": ""
        }), {
          default: x(() => [
            Pe($.$slots, "default", {
              data: P(s),
              loading: P(d),
              total: P(l)
            }, void 0, !0)
          ]),
          _: 3
        }, 16, ["row-key", "data"])), [
          [L, P(d)]
        ]),
        W(P(Ir), {
          disabled: P(d),
          class: "fast-start-pagination",
          total: P(l),
          onChange: v,
          "current-page": u.value.pagination.page,
          "onUpdate:currentPage": _[0] || (_[0] = (N) => u.value.pagination.page = N),
          "page-size": u.value.pagination.perPage,
          "onUpdate:pageSize": _[1] || (_[1] = (N) => u.value.pagination.perPage = N)
        }, null, 8, ["disabled", "total", "current-page", "page-size"])
      ]);
    };
  }
}), Po = (t, e) => {
  const r = t.__vccOpts || t;
  for (const [n, o] of e)
    r[n] = o;
  return r;
}, Do = /* @__PURE__ */ Po(Oo, [["__scopeId", "data-v-a86876db"]]), Qe = /* @__PURE__ */ lt({
  name: "If",
  __name: "If",
  props: {
    when: {}
  },
  setup(t) {
    const e = (r) => r;
    return (r, n) => r.when ? Pe(r.$slots, "default", {
      key: 0,
      value: e(r.when)
    }) : Pe(r.$slots, "fallback", { key: 1 });
  }
}), $o = () => {
  const { basename: t } = De();
  return ({ resource: e, id: r, type: n }) => {
    switch (n) {
      case "list":
        return Z(`${t}/${e}`);
      case "create":
        return Z(`${t}/${e}/create`);
      case "edit":
        return r == null ? Z(`${t}/${e}/edit`) : Z(`${t}/${e}/edit/${encodeURIComponent(r)}`);
      case "detail":
        return r == null ? Z(`${t}/${e}/detail`) : Z(
          `${t}/${e}/detail/${encodeURIComponent(r)}`
        );
      default:
        return n;
    }
  };
}, Z = (t) => t.replace("//", "/"), Fo = (t, e = !1) => {
  const { deleteOne: r } = Re(), n = jt({
    immediate: e,
    queryFn: (a) => r(t, a)
  }), o = n.execute;
  return { ...n, sendDelete: o };
}, To = { class: "fast-start-table-delete-button" }, xo = /* @__PURE__ */ lt({
  name: "FsTableActionColumn",
  __name: "FsTableActionColumn",
  props: {
    label: { default: "操作" },
    fixed: { type: [String, Boolean], default: "right" },
    width: { default: "150px" },
    edit: { default: () => ({
      label: "编辑",
      show: !0,
      buttonType: "default",
      type: "view"
    }) },
    detail: { default: () => ({
      label: "详情",
      show: !1,
      type: "view"
    }) },
    delete: { default: () => ({
      label: "删除",
      show: !0,
      buttonType: "danger",
      title: "确认删除该条数据吗?"
    }) }
  },
  emits: ["edit", "delete", "detail"],
  setup(t, { emit: e }) {
    const r = t, n = Ao();
    Re();
    const o = e, a = $o(), { name: i } = Jt(), f = Dr(), c = Fo(i), p = (l) => {
      if (r.edit.type === "view") {
        const d = a({
          resource: i,
          type: "edit",
          id: l[(n == null ? void 0 : n.rowKey) || "id"]
        });
        f.push(d);
      } else
        o("edit", l);
    }, u = (l) => {
      if (r.detail.type === "view") {
        const d = a({
          resource: i,
          type: "detail",
          id: l[(n == null ? void 0 : n.rowKey) || "id"]
        });
        f.push(d);
      } else
        o("detail", l);
    }, s = (l) => {
      r.delete.custom ? o("delete", l) : c.sendDelete({ ...l, id: l[(n == null ? void 0 : n.rowKey) || "id"] }).then(() => {
        n == null || n.reload();
      });
    };
    return (l, d) => (Xe(), Vt(P(_r), {
      label: l.label,
      fixed: l.fixed,
      width: l.width
    }, {
      default: x(({ row: h }) => {
        var S;
        return [
          W(P(Qe), {
            when: l.edit.show
          }, {
            default: x(() => {
              var g;
              return [
                W(P(ge), {
                  size: "small",
                  onClick: (v) => p(h),
                  plain: "",
                  type: (g = l.edit) == null ? void 0 : g.buttonType
                }, {
                  default: x(() => [
                    me(fe(l.edit.label), 1)
                  ]),
                  _: 2
                }, 1032, ["onClick", "type"])
              ];
            }),
            _: 2
          }, 1032, ["when"]),
          W(P(Qe), {
            when: l.detail.show
          }, {
            default: x(() => {
              var g;
              return [
                W(P(ge), {
                  size: "small",
                  onClick: (v) => u(h),
                  plain: "",
                  type: (g = l.edit) == null ? void 0 : g.buttonType
                }, {
                  default: x(() => [
                    me(fe(l.detail.label), 1)
                  ]),
                  _: 2
                }, 1032, ["onClick", "type"])
              ];
            }),
            _: 2
          }, 1032, ["when"]),
          W(P(Qe), {
            when: (S = l.$props.delete) == null ? void 0 : S.show
          }, {
            default: x(() => [
              W(P(Rr), { placement: "top" }, {
                reference: x(() => {
                  var g;
                  return [
                    W(P(ge), {
                      size: "small",
                      plain: "",
                      type: (g = l.$props.delete) == null ? void 0 : g.buttonType
                    }, {
                      default: x(() => {
                        var v;
                        return [
                          me(fe((v = l.$props.delete) == null ? void 0 : v.label), 1)
                        ];
                      }),
                      _: 1
                    }, 8, ["type"])
                  ];
                }),
                default: x(() => {
                  var g;
                  return [
                    mt("div", null, fe((g = l.$props.delete) == null ? void 0 : g.title), 1),
                    mt("div", To, [
                      W(P(ge), {
                        onClick: (v) => s(h),
                        plain: "",
                        type: "danger",
                        size: "small",
                        loading: P(c).isLoading.value
                      }, {
                        default: x(() => {
                          var v;
                          return [
                            me(fe((v = l.$props.delete) == null ? void 0 : v.label), 1)
                          ];
                        }),
                        _: 2
                      }, 1032, ["onClick", "loading"])
                    ])
                  ];
                }),
                _: 2
              }, 1024)
            ]),
            _: 2
          }, 1032, ["when"]),
          Pe(l.$slots, "default", { row: h })
        ];
      }),
      _: 3
    }, 8, ["label", "fixed", "width"]));
  }
}), Co = () => [V()];
export {
  Do as FsDataTable,
  xo as FsTableActionColumn,
  Co as useFsDataTable
};
//# sourceMappingURL=index.mjs.map
