UNPKG

@insightphp/insight

Version:

Laravel package for building control panels.

1,323 lines (1,322 loc) 48.8 kB
import { openBlock as x, createElementBlock as j, createElementVNode as A, ref as Ae, computed as Me, watch as se, customRef as _r, defineComponent as Nr, unref as h, createBlock as ye, withCtx as z, createVNode as oe, createCommentVNode as ie, createSlots as Rr, withModifiers as Tr, toDisplayString as Ye, Fragment as Mr, renderList as Dr, withDirectives as Cr, vModelText as kr, createTextVNode as Br } from "vue"; import { usePage as Ur } from "@inertiajs/inertia-vue3"; import { Portal as Pe } from "@insightphp/inertia-view"; import { r as Wr, a as Lr } from "./main.9f3b0dd7.mjs"; import { Inertia as Gr } from "@inertiajs/inertia"; import { Breadcrumbs as Qr, Menu as Vr, MenuItem as zr } from "@insightphp/elements"; function Hr(r, e) { return x(), j("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [ A("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" }) ]); } function Jr(r, e) { return x(), j("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [ A("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 010 1.971l-11.54 6.347a1.125 1.125 0 01-1.667-.985V5.653z" }) ]); } var jr = function() { if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1; if (typeof Symbol.iterator == "symbol") return !0; var e = {}, t = Symbol("test"), n = Object(t); if (typeof t == "string" || Object.prototype.toString.call(t) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]") return !1; var o = 42; e[t] = o; for (t 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] !== t || !Object.prototype.propertyIsEnumerable.call(e, t)) return !1; if (typeof Object.getOwnPropertyDescriptor == "function") { var l = Object.getOwnPropertyDescriptor(e, t); if (l.value !== o || l.enumerable !== !0) return !1; } return !0; }, Xe = typeof Symbol < "u" && Symbol, qr = jr, Kr = function() { return typeof Xe != "function" || typeof Symbol != "function" || typeof Xe("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : qr(); }, Yr = "Function.prototype.bind called on incompatible ", Oe = Array.prototype.slice, Xr = Object.prototype.toString, Zr = "[object Function]", et = function(e) { var t = this; if (typeof t != "function" || Xr.call(t) !== Zr) throw new TypeError(Yr + t); for (var n = Oe.call(arguments, 1), o, a = function() { if (this instanceof o) { var p = t.apply( this, n.concat(Oe.call(arguments)) ); return Object(p) === p ? p : this; } else return t.apply( e, n.concat(Oe.call(arguments)) ); }, l = Math.max(0, t.length - n.length), i = [], f = 0; f < l; f++) i.push("$" + f); if (o = Function("binder", "return function (" + i.join(",") + "){ return binder.apply(this,arguments); }")(a), t.prototype) { var c = function() { }; c.prototype = t.prototype, o.prototype = new c(), c.prototype = null; } return o; }, rt = et, Ge = Function.prototype.bind || rt, tt = Ge, nt = tt.call(Function.call, Object.prototype.hasOwnProperty), y, Y = SyntaxError, dr = Function, q = TypeError, xe = function(r) { try { return dr('"use strict"; return (' + r + ").constructor;")(); } catch { } }, L = Object.getOwnPropertyDescriptor; if (L) try { L({}, ""); } catch { L = null; } var Ee = function() { throw new q(); }, at = L ? function() { try { return arguments.callee, Ee; } catch { try { return L(arguments, "callee").get; } catch { return Ee; } } }() : Ee, H = Kr(), M = Object.getPrototypeOf || function(r) { return r.__proto__; }, J = {}, ot = typeof Uint8Array > "u" ? y : M(Uint8Array), K = { "%AggregateError%": typeof AggregateError > "u" ? y : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer > "u" ? y : ArrayBuffer, "%ArrayIteratorPrototype%": H ? M([][Symbol.iterator]()) : y, "%AsyncFromSyncIteratorPrototype%": y, "%AsyncFunction%": J, "%AsyncGenerator%": J, "%AsyncGeneratorFunction%": J, "%AsyncIteratorPrototype%": J, "%Atomics%": typeof Atomics > "u" ? y : Atomics, "%BigInt%": typeof BigInt > "u" ? y : BigInt, "%Boolean%": Boolean, "%DataView%": typeof DataView > "u" ? y : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": Error, "%eval%": eval, "%EvalError%": EvalError, "%Float32Array%": typeof Float32Array > "u" ? y : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? y : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? y : FinalizationRegistry, "%Function%": dr, "%GeneratorFunction%": J, "%Int8Array%": typeof Int8Array > "u" ? y : Int8Array, "%Int16Array%": typeof Int16Array > "u" ? y : Int16Array, "%Int32Array%": typeof Int32Array > "u" ? y : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": H ? M(M([][Symbol.iterator]())) : y, "%JSON%": typeof JSON == "object" ? JSON : y, "%Map%": typeof Map > "u" ? y : Map, "%MapIteratorPrototype%": typeof Map > "u" || !H ? y : M((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise > "u" ? y : Promise, "%Proxy%": typeof Proxy > "u" ? y : Proxy, "%RangeError%": RangeError, "%ReferenceError%": ReferenceError, "%Reflect%": typeof Reflect > "u" ? y : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? y : Set, "%SetIteratorPrototype%": typeof Set > "u" || !H ? y : M((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? y : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": H ? M(""[Symbol.iterator]()) : y, "%Symbol%": H ? Symbol : y, "%SyntaxError%": Y, "%ThrowTypeError%": at, "%TypedArray%": ot, "%TypeError%": q, "%Uint8Array%": typeof Uint8Array > "u" ? y : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? y : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array > "u" ? y : Uint16Array, "%Uint32Array%": typeof Uint32Array > "u" ? y : Uint32Array, "%URIError%": URIError, "%WeakMap%": typeof WeakMap > "u" ? y : WeakMap, "%WeakRef%": typeof WeakRef > "u" ? y : WeakRef, "%WeakSet%": typeof WeakSet > "u" ? y : WeakSet }, it = function r(e) { var t; if (e === "%AsyncFunction%") t = xe("async function () {}"); else if (e === "%GeneratorFunction%") t = xe("function* () {}"); else if (e === "%AsyncGeneratorFunction%") t = xe("async function* () {}"); else if (e === "%AsyncGenerator%") { var n = r("%AsyncGeneratorFunction%"); n && (t = n.prototype); } else if (e === "%AsyncIteratorPrototype%") { var o = r("%AsyncGenerator%"); o && (t = M(o.prototype)); } return K[e] = t, t; }, Ze = { "%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"] }, pe = Ge, he = nt, lt = pe.call(Function.call, Array.prototype.concat), ft = pe.call(Function.apply, Array.prototype.splice), er = pe.call(Function.call, String.prototype.replace), ge = pe.call(Function.call, String.prototype.slice), ct = pe.call(Function.call, RegExp.prototype.exec), ut = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, pt = /\\(\\)?/g, st = function(e) { var t = ge(e, 0, 1), n = ge(e, -1); if (t === "%" && n !== "%") throw new Y("invalid intrinsic syntax, expected closing `%`"); if (n === "%" && t !== "%") throw new Y("invalid intrinsic syntax, expected opening `%`"); var o = []; return er(e, ut, function(a, l, i, f) { o[o.length] = i ? er(f, pt, "$1") : l || a; }), o; }, yt = function(e, t) { var n = e, o; if (he(Ze, n) && (o = Ze[n], n = "%" + o[0] + "%"), he(K, n)) { var a = K[n]; if (a === J && (a = it(n)), typeof a > "u" && !t) throw new q("intrinsic " + e + " exists, but is not available. Please file an issue!"); return { alias: o, name: n, value: a }; } throw new Y("intrinsic " + e + " does not exist!"); }, Qe = function(e, t) { if (typeof e != "string" || e.length === 0) throw new q("intrinsic name must be a non-empty string"); if (arguments.length > 1 && typeof t != "boolean") throw new q('"allowMissing" argument must be a boolean'); if (ct(/^%?[^%]*%?$/, e) === null) throw new Y("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); var n = st(e), o = n.length > 0 ? n[0] : "", a = yt("%" + o + "%", t), l = a.name, i = a.value, f = !1, c = a.alias; c && (o = c[0], ft(n, lt([0, 1], c))); for (var p = 1, u = !0; p < n.length; p += 1) { var s = n[p], d = ge(s, 0, 1), m = ge(s, -1); if ((d === '"' || d === "'" || d === "`" || m === '"' || m === "'" || m === "`") && d !== m) throw new Y("property names with quotes must have matching quotes"); if ((s === "constructor" || !u) && (f = !0), o += "." + s, l = "%" + o + "%", he(K, l)) i = K[l]; else if (i != null) { if (!(s in i)) { if (!t) throw new q("base intrinsic for " + e + " exists, but the property is not available."); return; } if (L && p + 1 >= n.length) { var w = L(i, s); u = !!w, u && "get" in w && !("originalValue" in w.get) ? i = w.get : i = i[s]; } else u = he(i, s), i = i[s]; u && !f && (K[l] = i); } } return i; }, vr = { exports: {} }; (function(r) { var e = Ge, t = Qe, n = t("%Function.prototype.apply%"), o = t("%Function.prototype.call%"), a = t("%Reflect.apply%", !0) || e.call(o, n), l = t("%Object.getOwnPropertyDescriptor%", !0), i = t("%Object.defineProperty%", !0), f = t("%Math.max%"); if (i) try { i({}, "a", { value: 1 }); } catch { i = null; } r.exports = function(u) { var s = a(e, o, arguments); if (l && i) { var d = l(s, "length"); d.configurable && i( s, "length", { value: 1 + f(0, u.length - (arguments.length - 1)) } ); } return s; }; var c = function() { return a(e, n, arguments); }; i ? i(r.exports, "apply", { value: c }) : r.exports.apply = c; })(vr); var mr = Qe, hr = vr.exports, dt = hr(mr("String.prototype.indexOf")), vt = function(e, t) { var n = mr(e, !!t); return typeof n == "function" && dt(e, ".prototype.") > -1 ? hr(n) : n; }, Ve = typeof Map == "function" && Map.prototype, $e = Object.getOwnPropertyDescriptor && Ve ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Se = Ve && $e && typeof $e.get == "function" ? $e.get : null, mt = Ve && Map.prototype.forEach, ze = typeof Set == "function" && Set.prototype, Fe = Object.getOwnPropertyDescriptor && ze ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, be = ze && Fe && typeof Fe.get == "function" ? Fe.get : null, ht = ze && Set.prototype.forEach, gt = typeof WeakMap == "function" && WeakMap.prototype, fe = gt ? WeakMap.prototype.has : null, St = typeof WeakSet == "function" && WeakSet.prototype, ce = St ? WeakSet.prototype.has : null, bt = typeof WeakRef == "function" && WeakRef.prototype, rr = bt ? WeakRef.prototype.deref : null, wt = Boolean.prototype.valueOf, At = Object.prototype.toString, Pt = Function.prototype.toString, Ot = String.prototype.match, He = String.prototype.slice, C = String.prototype.replace, xt = String.prototype.toUpperCase, tr = String.prototype.toLowerCase, gr = RegExp.prototype.test, nr = Array.prototype.concat, E = Array.prototype.join, Et = Array.prototype.slice, ar = Math.floor, De = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, Ie = Object.getOwnPropertySymbols, Ce = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, X = typeof Symbol == "function" && typeof Symbol.iterator == "object", b = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === X ? "object" : "symbol") ? Symbol.toStringTag : null, Sr = Object.prototype.propertyIsEnumerable, or = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) { return r.__proto__; } : null); function ir(r, e) { if (r === 1 / 0 || r === -1 / 0 || r !== r || r && r > -1e3 && r < 1e3 || gr.call(/e/, e)) return e; var t = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; if (typeof r == "number") { var n = r < 0 ? -ar(-r) : ar(r); if (n !== r) { var o = String(n), a = He.call(e, o.length + 1); return C.call(o, t, "$&_") + "." + C.call(C.call(a, /([0-9]{3})/g, "$&_"), /_$/, ""); } } return C.call(e, t, "$&_"); } var ke = Wr, lr = ke.custom, fr = wr(lr) ? lr : null, $t = function r(e, t, n, o) { var a = t || {}; if (D(a, "quoteStyle") && a.quoteStyle !== "single" && a.quoteStyle !== "double") throw new TypeError('option "quoteStyle" must be "single" or "double"'); if (D(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 l = D(a, "customInspect") ? a.customInspect : !0; if (typeof l != "boolean" && l !== "symbol") throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); if (D(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 (D(a, "numericSeparator") && typeof a.numericSeparator != "boolean") throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); var i = 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 Pr(e, a); if (typeof e == "number") { if (e === 0) return 1 / 0 / e > 0 ? "0" : "-0"; var f = String(e); return i ? ir(e, f) : f; } if (typeof e == "bigint") { var c = String(e) + "n"; return i ? ir(e, c) : c; } var p = typeof a.depth > "u" ? 5 : a.depth; if (typeof n > "u" && (n = 0), n >= p && p > 0 && typeof e == "object") return Be(e) ? "[Array]" : "[Object]"; var u = zt(a, n); if (typeof o > "u") o = []; else if (Ar(o, e) >= 0) return "[Circular]"; function s(P, T, I) { if (T && (o = Et.call(o), o.push(T)), I) { var ae = { depth: a.depth }; return D(a, "quoteStyle") && (ae.quoteStyle = a.quoteStyle), r(P, ae, n + 1, o); } return r(P, a, n + 1, o); } if (typeof e == "function" && !cr(e)) { var d = Ct(e), m = de(e, s); return "[Function" + (d ? ": " + d : " (anonymous)") + "]" + (m.length > 0 ? " { " + E.call(m, ", ") + " }" : ""); } if (wr(e)) { var w = X ? C.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : Ce.call(e); return typeof e == "object" && !X ? le(w) : w; } if (Gt(e)) { for (var $ = "<" + tr.call(String(e.nodeName)), v = e.attributes || [], F = 0; F < v.length; F++) $ += " " + v[F].name + "=" + br(Ft(v[F].value), "double", a); return $ += ">", e.childNodes && e.childNodes.length && ($ += "..."), $ += "</" + tr.call(String(e.nodeName)) + ">", $; } if (Be(e)) { if (e.length === 0) return "[]"; var N = de(e, s); return u && !Vt(N) ? "[" + Ue(N, u) + "]" : "[ " + E.call(N, ", ") + " ]"; } if (_t(e)) { var G = de(e, s); return !("cause" in Error.prototype) && "cause" in e && !Sr.call(e, "cause") ? "{ [" + String(e) + "] " + E.call(nr.call("[cause]: " + s(e.cause), G), ", ") + " }" : G.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + E.call(G, ", ") + " }"; } if (typeof e == "object" && l) { if (fr && typeof e[fr] == "function" && ke) return ke(e, { depth: p - n }); if (l !== "symbol" && typeof e.inspect == "function") return e.inspect(); } if (kt(e)) { var re = []; return mt.call(e, function(P, T) { re.push(s(T, e, !0) + " => " + s(P, e)); }), ur("Map", Se.call(e), re, u); } if (Wt(e)) { var te = []; return ht.call(e, function(P) { te.push(s(P, e)); }), ur("Set", be.call(e), te, u); } if (Bt(e)) return _e("WeakMap"); if (Lt(e)) return _e("WeakSet"); if (Ut(e)) return _e("WeakRef"); if (Rt(e)) return le(s(Number(e))); if (Mt(e)) return le(s(De.call(e))); if (Tt(e)) return le(wt.call(e)); if (Nt(e)) return le(s(String(e))); if (!It(e) && !cr(e)) { var B = de(e, s), ne = or ? or(e) === Object.prototype : e instanceof Object || e.constructor === Object, R = e instanceof Object ? "" : "null prototype", Q = !ne && b && Object(e) === e && b in e ? He.call(k(e), 8, -1) : R ? "Object" : "", U = ne || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", V = U + (Q || R ? "[" + E.call(nr.call([], Q || [], R || []), ": ") + "] " : ""); return B.length === 0 ? V + "{}" : u ? V + "{" + Ue(B, u) + "}" : V + "{ " + E.call(B, ", ") + " }"; } return String(e); }; function br(r, e, t) { var n = (t.quoteStyle || e) === "double" ? '"' : "'"; return n + r + n; } function Ft(r) { return C.call(String(r), /"/g, "&quot;"); } function Be(r) { return k(r) === "[object Array]" && (!b || !(typeof r == "object" && b in r)); } function It(r) { return k(r) === "[object Date]" && (!b || !(typeof r == "object" && b in r)); } function cr(r) { return k(r) === "[object RegExp]" && (!b || !(typeof r == "object" && b in r)); } function _t(r) { return k(r) === "[object Error]" && (!b || !(typeof r == "object" && b in r)); } function Nt(r) { return k(r) === "[object String]" && (!b || !(typeof r == "object" && b in r)); } function Rt(r) { return k(r) === "[object Number]" && (!b || !(typeof r == "object" && b in r)); } function Tt(r) { return k(r) === "[object Boolean]" && (!b || !(typeof r == "object" && b in r)); } function wr(r) { if (X) return r && typeof r == "object" && r instanceof Symbol; if (typeof r == "symbol") return !0; if (!r || typeof r != "object" || !Ce) return !1; try { return Ce.call(r), !0; } catch { } return !1; } function Mt(r) { if (!r || typeof r != "object" || !De) return !1; try { return De.call(r), !0; } catch { } return !1; } var Dt = Object.prototype.hasOwnProperty || function(r) { return r in this; }; function D(r, e) { return Dt.call(r, e); } function k(r) { return At.call(r); } function Ct(r) { if (r.name) return r.name; var e = Ot.call(Pt.call(r), /^function\s*([\w$]+)/); return e ? e[1] : null; } function Ar(r, e) { if (r.indexOf) return r.indexOf(e); for (var t = 0, n = r.length; t < n; t++) if (r[t] === e) return t; return -1; } function kt(r) { if (!Se || !r || typeof r != "object") return !1; try { Se.call(r); try { be.call(r); } catch { return !0; } return r instanceof Map; } catch { } return !1; } function Bt(r) { if (!fe || !r || typeof r != "object") return !1; try { fe.call(r, fe); try { ce.call(r, ce); } catch { return !0; } return r instanceof WeakMap; } catch { } return !1; } function Ut(r) { if (!rr || !r || typeof r != "object") return !1; try { return rr.call(r), !0; } catch { } return !1; } function Wt(r) { if (!be || !r || typeof r != "object") return !1; try { be.call(r); try { Se.call(r); } catch { return !0; } return r instanceof Set; } catch { } return !1; } function Lt(r) { if (!ce || !r || typeof r != "object") return !1; try { ce.call(r, ce); try { fe.call(r, fe); } catch { return !0; } return r instanceof WeakSet; } catch { } return !1; } function Gt(r) { return !r || typeof r != "object" ? !1 : typeof HTMLElement < "u" && r instanceof HTMLElement ? !0 : typeof r.nodeName == "string" && typeof r.getAttribute == "function"; } function Pr(r, e) { if (r.length > e.maxStringLength) { var t = r.length - e.maxStringLength, n = "... " + t + " more character" + (t > 1 ? "s" : ""); return Pr(He.call(r, 0, e.maxStringLength), e) + n; } var o = C.call(C.call(r, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, Qt); return br(o, "single", e); } function Qt(r) { var e = r.charCodeAt(0), t = { 8: "b", 9: "t", 10: "n", 12: "f", 13: "r" }[e]; return t ? "\\" + t : "\\x" + (e < 16 ? "0" : "") + xt.call(e.toString(16)); } function le(r) { return "Object(" + r + ")"; } function _e(r) { return r + " { ? }"; } function ur(r, e, t, n) { var o = n ? Ue(t, n) : E.call(t, ", "); return r + " (" + e + ") {" + o + "}"; } function Vt(r) { for (var e = 0; e < r.length; e++) if (Ar(r[e], ` `) >= 0) return !1; return !0; } function zt(r, e) { var t; if (r.indent === " ") t = " "; else if (typeof r.indent == "number" && r.indent > 0) t = E.call(Array(r.indent + 1), " "); else return null; return { base: t, prev: E.call(Array(e + 1), t) }; } function Ue(r, e) { if (r.length === 0) return ""; var t = ` ` + e.prev + e.base; return t + E.call(r, "," + t) + ` ` + e.prev; } function de(r, e) { var t = Be(r), n = []; if (t) { n.length = r.length; for (var o = 0; o < r.length; o++) n[o] = D(r, o) ? e(r[o], r) : ""; } var a = typeof Ie == "function" ? Ie(r) : [], l; if (X) { l = {}; for (var i = 0; i < a.length; i++) l["$" + a[i]] = a[i]; } for (var f in r) !D(r, f) || t && String(Number(f)) === f && f < r.length || X && l["$" + f] instanceof Symbol || (gr.call(/[^\w$]/, f) ? n.push(e(f, r) + ": " + e(r[f], r)) : n.push(f + ": " + e(r[f], r))); if (typeof Ie == "function") for (var c = 0; c < a.length; c++) Sr.call(r, a[c]) && n.push("[" + e(a[c]) + "]: " + e(r[a[c]], r)); return n; } var Je = Qe, ee = vt, Ht = $t, Jt = Je("%TypeError%"), ve = Je("%WeakMap%", !0), me = Je("%Map%", !0), jt = ee("WeakMap.prototype.get", !0), qt = ee("WeakMap.prototype.set", !0), Kt = ee("WeakMap.prototype.has", !0), Yt = ee("Map.prototype.get", !0), Xt = ee("Map.prototype.set", !0), Zt = ee("Map.prototype.has", !0), je = function(r, e) { for (var t = r, n; (n = t.next) !== null; t = n) if (n.key === e) return t.next = n.next, n.next = r.next, r.next = n, n; }, en = function(r, e) { var t = je(r, e); return t && t.value; }, rn = function(r, e, t) { var n = je(r, e); n ? n.value = t : r.next = { key: e, next: r.next, value: t }; }, tn = function(r, e) { return !!je(r, e); }, nn = function() { var e, t, n, o = { assert: function(a) { if (!o.has(a)) throw new Jt("Side channel does not contain " + Ht(a)); }, get: function(a) { if (ve && a && (typeof a == "object" || typeof a == "function")) { if (e) return jt(e, a); } else if (me) { if (t) return Yt(t, a); } else if (n) return en(n, a); }, has: function(a) { if (ve && a && (typeof a == "object" || typeof a == "function")) { if (e) return Kt(e, a); } else if (me) { if (t) return Zt(t, a); } else if (n) return tn(n, a); return !1; }, set: function(a, l) { ve && a && (typeof a == "object" || typeof a == "function") ? (e || (e = new ve()), qt(e, a, l)) : me ? (t || (t = new me()), Xt(t, a, l)) : (n || (n = { key: {}, next: null }), rn(n, a, l)); } }; return o; }, an = String.prototype.replace, on = /%20/g, Ne = { RFC1738: "RFC1738", RFC3986: "RFC3986" }, qe = { default: Ne.RFC3986, formatters: { RFC1738: function(r) { return an.call(r, on, "+"); }, RFC3986: function(r) { return String(r); } }, RFC1738: Ne.RFC1738, RFC3986: Ne.RFC3986 }, ln = qe, Re = Object.prototype.hasOwnProperty, W = Array.isArray, O = function() { for (var r = [], e = 0; e < 256; ++e) r.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase()); return r; }(), fn = function(e) { for (; e.length > 1; ) { var t = e.pop(), n = t.obj[t.prop]; if (W(n)) { for (var o = [], a = 0; a < n.length; ++a) typeof n[a] < "u" && o.push(n[a]); t.obj[t.prop] = o; } } }, Or = function(e, t) { for (var n = t && t.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, o = 0; o < e.length; ++o) typeof e[o] < "u" && (n[o] = e[o]); return n; }, cn = function r(e, t, n) { if (!t) return e; if (typeof t != "object") { if (W(e)) e.push(t); else if (e && typeof e == "object") (n && (n.plainObjects || n.allowPrototypes) || !Re.call(Object.prototype, t)) && (e[t] = !0); else return [e, t]; return e; } if (!e || typeof e != "object") return [e].concat(t); var o = e; return W(e) && !W(t) && (o = Or(e, n)), W(e) && W(t) ? (t.forEach(function(a, l) { if (Re.call(e, l)) { var i = e[l]; i && typeof i == "object" && a && typeof a == "object" ? e[l] = r(i, a, n) : e.push(a); } else e[l] = a; }), e) : Object.keys(t).reduce(function(a, l) { var i = t[l]; return Re.call(a, l) ? a[l] = r(a[l], i, n) : a[l] = i, a; }, o); }, un = function(e, t) { return Object.keys(t).reduce(function(n, o) { return n[o] = t[o], n; }, e); }, pn = function(r, e, t) { var n = r.replace(/\+/g, " "); if (t === "iso-8859-1") return n.replace(/%[0-9a-f]{2}/gi, unescape); try { return decodeURIComponent(n); } catch { return n; } }, sn = function(e, t, n, o, a) { if (e.length === 0) return e; var l = e; if (typeof e == "symbol" ? l = Symbol.prototype.toString.call(e) : typeof e != "string" && (l = String(e)), n === "iso-8859-1") return escape(l).replace(/%u[0-9a-f]{4}/gi, function(p) { return "%26%23" + parseInt(p.slice(2), 16) + "%3B"; }); for (var i = "", f = 0; f < l.length; ++f) { var c = l.charCodeAt(f); if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || a === ln.RFC1738 && (c === 40 || c === 41)) { i += l.charAt(f); continue; } if (c < 128) { i = i + O[c]; continue; } if (c < 2048) { i = i + (O[192 | c >> 6] + O[128 | c & 63]); continue; } if (c < 55296 || c >= 57344) { i = i + (O[224 | c >> 12] + O[128 | c >> 6 & 63] + O[128 | c & 63]); continue; } f += 1, c = 65536 + ((c & 1023) << 10 | l.charCodeAt(f) & 1023), i += O[240 | c >> 18] + O[128 | c >> 12 & 63] + O[128 | c >> 6 & 63] + O[128 | c & 63]; } return i; }, yn = function(e) { for (var t = [{ obj: { o: e }, prop: "o" }], n = [], o = 0; o < t.length; ++o) for (var a = t[o], l = a.obj[a.prop], i = Object.keys(l), f = 0; f < i.length; ++f) { var c = i[f], p = l[c]; typeof p == "object" && p !== null && n.indexOf(p) === -1 && (t.push({ obj: l, prop: c }), n.push(p)); } return fn(t), e; }, dn = function(e) { return Object.prototype.toString.call(e) === "[object RegExp]"; }, vn = function(e) { return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e)); }, mn = function(e, t) { return [].concat(e, t); }, hn = function(e, t) { if (W(e)) { for (var n = [], o = 0; o < e.length; o += 1) n.push(t(e[o])); return n; } return t(e); }, xr = { arrayToObject: Or, assign: un, combine: mn, compact: yn, decode: pn, encode: sn, isBuffer: vn, isRegExp: dn, maybeMap: hn, merge: cn }, Er = nn, We = xr, ue = qe, gn = Object.prototype.hasOwnProperty, pr = { brackets: function(e) { return e + "[]"; }, comma: "comma", indices: function(e, t) { return e + "[" + t + "]"; }, repeat: function(e) { return e; } }, _ = Array.isArray, Sn = String.prototype.split, bn = Array.prototype.push, $r = function(r, e) { bn.apply(r, _(e) ? e : [e]); }, wn = Date.prototype.toISOString, sr = ue.default, S = { addQueryPrefix: !1, allowDots: !1, charset: "utf-8", charsetSentinel: !1, delimiter: "&", encode: !0, encoder: We.encode, encodeValuesOnly: !1, format: sr, formatter: ue.formatters[sr], indices: !1, serializeDate: function(e) { return wn.call(e); }, skipNulls: !1, strictNullHandling: !1 }, An = function(e) { return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint"; }, Te = {}, Pn = function r(e, t, n, o, a, l, i, f, c, p, u, s, d, m, w, $) { for (var v = e, F = $, N = 0, G = !1; (F = F.get(Te)) !== void 0 && !G; ) { var re = F.get(e); if (N += 1, typeof re < "u") { if (re === N) throw new RangeError("Cyclic object value"); G = !0; } typeof F.get(Te) > "u" && (N = 0); } if (typeof f == "function" ? v = f(t, v) : v instanceof Date ? v = u(v) : n === "comma" && _(v) && (v = We.maybeMap(v, function(we) { return we instanceof Date ? u(we) : we; })), v === null) { if (a) return i && !m ? i(t, S.encoder, w, "key", s) : t; v = ""; } if (An(v) || We.isBuffer(v)) { if (i) { var te = m ? t : i(t, S.encoder, w, "key", s); if (n === "comma" && m) { for (var B = Sn.call(String(v), ","), ne = "", R = 0; R < B.length; ++R) ne += (R === 0 ? "" : ",") + d(i(B[R], S.encoder, w, "value", s)); return [d(te) + (o && _(v) && B.length === 1 ? "[]" : "") + "=" + ne]; } return [d(te) + "=" + d(i(v, S.encoder, w, "value", s))]; } return [d(t) + "=" + d(String(v))]; } var Q = []; if (typeof v > "u") return Q; var U; if (n === "comma" && _(v)) U = [{ value: v.length > 0 ? v.join(",") || null : void 0 }]; else if (_(f)) U = f; else { var V = Object.keys(v); U = c ? V.sort(c) : V; } for (var P = o && _(v) && v.length === 1 ? t + "[]" : t, T = 0; T < U.length; ++T) { var I = U[T], ae = typeof I == "object" && typeof I.value < "u" ? I.value : v[I]; if (!(l && ae === null)) { var Ir = _(v) ? typeof n == "function" ? n(P, I) : P : P + (p ? "." + I : "[" + I + "]"); $.set(e, N); var Ke = Er(); Ke.set(Te, $), $r(Q, r( ae, Ir, n, o, a, l, i, f, c, p, u, s, d, m, w, Ke )); } } return Q; }, On = function(e) { if (!e) return S; if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function") throw new TypeError("Encoder has to be a function."); var t = e.charset || S.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 = ue.default; if (typeof e.format < "u") { if (!gn.call(ue.formatters, e.format)) throw new TypeError("Unknown format option provided."); n = e.format; } var o = ue.formatters[n], a = S.filter; return (typeof e.filter == "function" || _(e.filter)) && (a = e.filter), { addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : S.addQueryPrefix, allowDots: typeof e.allowDots > "u" ? S.allowDots : !!e.allowDots, charset: t, charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : S.charsetSentinel, delimiter: typeof e.delimiter > "u" ? S.delimiter : e.delimiter, encode: typeof e.encode == "boolean" ? e.encode : S.encode, encoder: typeof e.encoder == "function" ? e.encoder : S.encoder, encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : S.encodeValuesOnly, filter: a, format: n, formatter: o, serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : S.serializeDate, skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : S.skipNulls, sort: typeof e.sort == "function" ? e.sort : null, strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : S.strictNullHandling }; }, xn = function(r, e) { var t = r, n = On(e), o, a; typeof n.filter == "function" ? (a = n.filter, t = a("", t)) : _(n.filter) && (a = n.filter, o = a); var l = []; if (typeof t != "object" || t === null) return ""; var i; e && e.arrayFormat in pr ? i = e.arrayFormat : e && "indices" in e ? i = e.indices ? "indices" : "repeat" : i = "indices"; var f = pr[i]; if (e && "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean") throw new TypeError("`commaRoundTrip` must be a boolean, or absent"); var c = f === "comma" && e && e.commaRoundTrip; o || (o = Object.keys(t)), n.sort && o.sort(n.sort); for (var p = Er(), u = 0; u < o.length; ++u) { var s = o[u]; n.skipNulls && t[s] === null || $r(l, Pn( t[s], s, f, c, n.strictNullHandling, n.skipNulls, n.encode ? n.encoder : null, n.filter, n.sort, n.allowDots, n.serializeDate, n.format, n.formatter, n.encodeValuesOnly, n.charset, p )); } var d = l.join(n.delimiter), m = n.addQueryPrefix === !0 ? "?" : ""; return n.charsetSentinel && (n.charset === "iso-8859-1" ? m += "utf8=%26%2310003%3B&" : m += "utf8=%E2%9C%93&"), d.length > 0 ? m + d : ""; }, Z = xr, Le = Object.prototype.hasOwnProperty, En = Array.isArray, g = { allowDots: !1, allowPrototypes: !1, allowSparse: !1, arrayLimit: 20, charset: "utf-8", charsetSentinel: !1, comma: !1, decoder: Z.decode, delimiter: "&", depth: 5, ignoreQueryPrefix: !1, interpretNumericEntities: !1, parameterLimit: 1e3, parseArrays: !0, plainObjects: !1, strictNullHandling: !1 }, $n = function(r) { return r.replace(/&#(\d+);/g, function(e, t) { return String.fromCharCode(parseInt(t, 10)); }); }, Fr = function(r, e) { return r && typeof r == "string" && e.comma && r.indexOf(",") > -1 ? r.split(",") : r; }, Fn = "utf8=%26%2310003%3B", In = "utf8=%E2%9C%93", _n = function(e, t) { var n = {}, o = t.ignoreQueryPrefix ? e.replace(/^\?/, "") : e, a = t.parameterLimit === 1 / 0 ? void 0 : t.parameterLimit, l = o.split(t.delimiter, a), i = -1, f, c = t.charset; if (t.charsetSentinel) for (f = 0; f < l.length; ++f) l[f].indexOf("utf8=") === 0 && (l[f] === In ? c = "utf-8" : l[f] === Fn && (c = "iso-8859-1"), i = f, f = l.length); for (f = 0; f < l.length; ++f) if (f !== i) { var p = l[f], u = p.indexOf("]="), s = u === -1 ? p.indexOf("=") : u + 1, d, m; s === -1 ? (d = t.decoder(p, g.decoder, c, "key"), m = t.strictNullHandling ? null : "") : (d = t.decoder(p.slice(0, s), g.decoder, c, "key"), m = Z.maybeMap( Fr(p.slice(s + 1), t), function(w) { return t.decoder(w, g.decoder, c, "value"); } )), m && t.interpretNumericEntities && c === "iso-8859-1" && (m = $n(m)), p.indexOf("[]=") > -1 && (m = En(m) ? [m] : m), Le.call(n, d) ? n[d] = Z.combine(n[d], m) : n[d] = m; } return n; }, Nn = function(r, e, t, n) { for (var o = n ? e : Fr(e, t), a = r.length - 1; a >= 0; --a) { var l, i = r[a]; if (i === "[]" && t.parseArrays) l = [].concat(o); else { l = t.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; var f = i.charAt(0) === "[" && i.charAt(i.length - 1) === "]" ? i.slice(1, -1) : i, c = parseInt(f, 10); !t.parseArrays && f === "" ? l = { 0: o } : !isNaN(c) && i !== f && String(c) === f && c >= 0 && t.parseArrays && c <= t.arrayLimit ? (l = [], l[c] = o) : f !== "__proto__" && (l[f] = o); } o = l; } return o; }, Rn = function(e, t, n, o) { if (!!e) { var a = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, l = /(\[[^[\]]*])/, i = /(\[[^[\]]*])/g, f = n.depth > 0 && l.exec(a), c = f ? a.slice(0, f.index) : a, p = []; if (c) { if (!n.plainObjects && Le.call(Object.prototype, c) && !n.allowPrototypes) return; p.push(c); } for (var u = 0; n.depth > 0 && (f = i.exec(a)) !== null && u < n.depth; ) { if (u += 1, !n.plainObjects && Le.call(Object.prototype, f[1].slice(1, -1)) && !n.allowPrototypes) return; p.push(f[1]); } return f && p.push("[" + a.slice(f.index) + "]"), Nn(p, t, n, o); } }, Tn = function(e) { if (!e) return g; if (e.decoder !== null && e.decoder !== void 0 && 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 t = typeof e.charset > "u" ? g.charset : e.charset; return { allowDots: typeof e.allowDots > "u" ? g.allowDots : !!e.allowDots, allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : g.allowPrototypes, allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : g.allowSparse, arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : g.arrayLimit, charset: t, charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : g.charsetSentinel, comma: typeof e.comma == "boolean" ? e.comma : g.comma, decoder: typeof e.decoder == "function" ? e.decoder : g.decoder, delimiter: typeof e.delimiter == "string" || Z.isRegExp(e.delimiter) ? e.delimiter : g.delimiter, depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : g.depth, ignoreQueryPrefix: e.ignoreQueryPrefix === !0, interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : g.interpretNumericEntities, parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : g.parameterLimit, parseArrays: e.parseArrays !== !1, plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : g.plainObjects, strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : g.strictNullHandling }; }, Mn = function(r, e) { var t = Tn(e); if (r === "" || r === null || typeof r > "u") return t.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; for (var n = typeof r == "string" ? _n(r, t) : r, o = t.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, a = Object.keys(n), l = 0; l < a.length; ++l) { var i = a[l], f = Rn(i, n[i], t, typeof r == "string"); o = Z.merge(o, f, t); } return t.allowSparse === !0 ? o : Z.compact(o); }, Dn = xn, Cn = Mn, kn = qe, yr = { formats: kn, parse: Cn, stringify: Dn }; function Bn(r, e = 400) { let t; return _r((n, o) => ({ get() { return n(), r; }, set(a) { clearTimeout(t), t = setTimeout(() => { r = a, o(); }, e); } })); } function Un(r) { if (r.includes(":")) { const [e, t] = r.split(":"); return { sortAs: e, direction: t }; } return { sortAs: "", direction: "asc" }; } function Wn(r, e, t, n) { const o = `${n}${t}`; if (e.hasOwnProperty(o)) { const a = parseInt(`${e[o]}`); if (!isNaN(a) && a > 0) return a; } return r; } function Ln(r, e, t, n, o) { const a = `${o}${n}`; r === e ? delete t[a] : t[a] = `${r}`; } function Gn(r, e, t) { const n = `${t}${e}`; return r.hasOwnProperty(n) ? `${r[n]}` : ""; } function Qn(r, e, t, n, o) { const a = `${o}${n}`; r === e ? delete t[a] : t[a] = `${r}`; } function Vn(r, e, t, n, o) { const a = `${o}${t}`; if (r.hasOwnProperty(a)) { const l = r[a]; if (typeof l == "string" && l.length > 0) { const i = `${o}${n}`, f = r[i]; return `${l}:${f === "asc" || f === "desc" ? f : e}`; } } return ""; } function zn(r, e, t, n, o) { const a = `${o}${t}`, l = `${o}${n}`, i = Un(r); i.sortAs.length > 0 ? (e[a] = i.sortAs, e[l] = i.direction) : (delete e[a], delete e[l]); } function Hn(r = { prefix: "", perPageParam: "limit", searchParam: "s", sortAsParam: "sort_by", sortDirectionParam: "sort_as" }) { const e = Ae(25), t = Ae(""), n = Ae(""), o = Bn(""), a = (u) => { e.value = Wn(25, u, r.perPageParam, r.prefix), t.value = Gn(u, r.searchParam, r.prefix), n.value = Vn(u, "desc", r.sortAsParam, r.sortDirectionParam, r.prefix); }, l = Me(() => t.value.length > 0), i = () => { let u = window.location.search; return u.startsWith("?") && (u = u.slice(1, u.length)), yr.parse(u); }, f = (u) => { const s = yr.stringify(u, { encode: !0 }), d = window.location.href.split("?")[0]; return s.length > 0 ? `${d}?${s}` : d; }; let c = i(); a(c); const p = () => { const u = i(); JSON.stringify(u).split("").sort().join() != JSON.stringify(c).split("").sort().join() && Gr.visit(f(c), { preserveState: !0 }); }; return se(e, (u) => { Ln(u, 25, c, r.perPageParam, r.prefix), p(); }), se(t, (u) => { o.value = u; }), se(o, (u) => { Qn(u, "", c, r.searchParam, r.prefix), p(); }), se(n, (u) => { zn(u, c, r.sortAsParam, r.sortDirectionParam, r.prefix), p(); }), { perPage: e, searchTerm: t, sortAs: n, isSearching: l }; } const Jn = { class: "w-full max-w-7xl mx-auto px-4 pt-12 pb-16" }, jn = { class: "w-full flex flex-row items-center justify-between" }, qn = /* @__PURE__ */ A("div", { class: "inline-flex" }, null, -1), Kn = { class: "inline-flex flex-row gap-3" }, Yn = { key: 0, class: "block relative" }, Xn = ["onUpdate:modelValue"], Zn = { class: "w-full flex flex-row items-center justify-between" }, ea = { class: "inline-flex items-center gap-3" }, ra = ["onClick"], ta = { class: "font-medium text-primary-700 text-sm" }, na = { key: 0, class: "inline-flex flex-row gap-3" }, aa = { class: "btn primary gap-2" }, oa = /* @__PURE__ */ Br(" Actions "), sa = /* @__PURE__ */ Nr({ __name: "ListResourcesPage", setup(r) { const e = Ur(), t = Me(() => e.props.value.resources), n = Hn(), o = Me(() => e.props.value.isSearchable || !!e.props.value.filter); return (a, l) => (x(), j("div", Jn, [ h(e).props.value.breadcrumbItems ? (x(), ye(h(Qr), { key: 0, items: h(e).props.value.breadcrumbItems, class: "mb-4" }, { separator: z(() => [ oe(h(Lr), { class: "w-4 h-4 mx-2 text-gray-300" }) ]), _: 1 }, 8, ["items"])) : ie("", !0), h(t) ? (x(), ye(h(Pe), { key: 1, class: "w-full", component: h(t), handler: h(n) }, Rr({ bulkActions: z(({ selection: i, total: f, clear: c }) => [ A("div", Zn, [ A("div", ea, [ A("button", { class: "btn-link danger", onClick: Tr(c, ["prevent"]) }, " Clear ", 8, ra), A("span", ta, "Selected " + Ye(i.length) + " of " + Ye(f), 1) ]), h(e).props.value.bulkActions.length > 0 ? (x(), j("div", na, [ oe(h(Vr), { class: "w-48", placement: "bottom-right" }, { toggle: z(() => [ A("button", aa, [ oe(h(Jr), { class: "w-4 h-4" }), oa ]) ]), default: z(() => [ (x(!0), j(Mr, null, Dr(h(e).props.value.bulkActions, (p) => (x(), ye(h(zr), { as: "template" }, { default: z(({ active: u, close: s }) => [ oe(h(Pe), { onClick: s, class: "menu-item flex w-full", component: p, "additional-data": { resources: i } }, null, 8, ["onClick", "component", "additional-data"]) ]), _: 2 }, 1024))), 256)) ]), _: 2 }, 1024) ])) : ie("", !0) ]) ]), _: 2 }, [ h(o) ? { name: "actions", fn: z(({ handler: i }) => [ A("div", jn, [ qn, A("div", Kn, [ h(e).props.value.isSearchable ? (x(), j("div", Yn, [ Cr(A("input", { "onUpdate:modelValue": (f) => i.searchTerm.value = f, type: "text", placeholder: "Search\u2026", class: "pl-7" }, null, 8, Xn), [ [kr, i.searchTerm.value] ]), oe(h(Hr), { class: "text-gray-500 absolute top-1/2 -mt-2 left-2 w-4 h-4" }) ])) : ie("", !0), h(e).props.value.filter ? (x(), ye(h(Pe), { key: 1, component: h(e).props.value.filter }, null, 8, ["component"])) : ie("", !0) ]) ]) ]) } : void 0 ]), 1032, ["component", "handler"])) : ie("", !0) ])); } }); export { sa as default };