@illinois-grad/grad-vue 7.2.4 → 7.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,10 @@
18
18
  *
19
19
  * When `storage-key` is provided, the sidebar remembers and restores its own
20
20
  * scroll position from `sessionStorage`.
21
+ *
22
+ * The dark theme has no background image by default. Set the
23
+ * `--g-sidebar-background-image` CSS variable (or the `background-image`
24
+ * prop) to add one.
21
25
  */
22
26
  declare const _default: typeof __VLS_export;
23
27
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, getCurrentInstance as d, getCurrentScope as f, inject as p, mergeModels as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onBeforeMount as y, onBeforeUnmount as b, onMounted as x, onScopeDispose as S, onUnmounted as C, openBlock as w, provide as T, reactive as E, readonly as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as j, shallowReactive as M, shallowRef as N, toDisplayString as P, toRaw as F, toRef as I, toValue as L, unref as R, useAttrs as z, useId as B, useModel as V, useSlots as H, useTemplateRef as U, vShow as ee, watch as W, watchEffect as G, withCtx as K, withDirectives as te, withModifiers as q } from "vue";
2
2
  import { createEventHook as ne, toArray as re, tryOnScopeDispose as ie, unrefElement as J, useClipboard as ae, useDebounceFn as Y, useFocusWithin as X, useIntersectionObserver as oe, useLocalStorage as se, useMediaQuery as ce, useMutationObserver as Z, useResizeObserver as le, useSessionStorage as ue } from "@vueuse/core";
3
3
  import { createFocusTrap as de } from "focus-trap";
4
- //#region src/compose/useCustomElementAttrs.ts
4
+ // src/compose/useCustomElementAttrs.ts
5
5
  function fe() {
6
6
  return globalThis.__GRAD_VUE_IS_WEB_COMPONENTS_BUILD__ === !0;
7
7
  }
@@ -18,8 +18,7 @@ function pe(e = {}) {
18
18
  })
19
19
  };
20
20
  }
21
- //#endregion
22
- //#region src/components/GButton.vue?vue&type=script&setup=true&lang.ts
21
+ // src/components/GButton.vue?vue&type=script&setup=true&lang.ts
23
22
  var me = { class: "g-btn--icon" }, he = { class: "g-btn--label" }, Q = /* @__PURE__ */ u({
24
23
  inheritAttrs: !1,
25
24
  __name: "GButton",
@@ -306,8 +305,7 @@ var me = { class: "g-btn--icon" }, he = { class: "g-btn--label" }, Q = /* @__PUR
306
305
  }, 16, ["role", "data-tree-expandable"]));
307
306
  }
308
307
  });
309
- //#endregion
310
- //#region src/compose/useForm.ts
308
+ // src/compose/useForm.ts
311
309
  function Oe() {
312
310
  let e = M({}), t = O(!1), n = r(() => {
313
311
  let t = {};
@@ -348,8 +346,7 @@ function Oe() {
348
346
  submit: c
349
347
  };
350
348
  }
351
- //#endregion
352
- //#region src/compose/useWebComponentForm.ts
349
+ // src/compose/useWebComponentForm.ts
353
350
  function ke() {
354
351
  let e = globalThis;
355
352
  return e.__GRAD_VUE_WC_FORMS__ ||= /* @__PURE__ */ new Map(), e.__GRAD_VUE_WC_FORMS__;
@@ -358,8 +355,7 @@ function Ae(e = "default") {
358
355
  let t = ke(), n = e || "default";
359
356
  return t.has(n) || t.set(n, Oe()), t.get(n);
360
357
  }
361
- //#endregion
362
- //#region src/compose/useFormField.ts
358
+ // src/compose/useFormField.ts
363
359
  function $(e) {
364
360
  let t = z(), n = typeof t["form-key"] == "string" ? t["form-key"] : void 0, i = e.formKey ?? n ?? "default", a = p("form", null) ?? (fe() ? Ae(i) : null), o = r(() => {
365
361
  let t = [];
@@ -378,8 +374,7 @@ function $(e) {
378
374
  hasErrors: s
379
375
  };
380
376
  }
381
- //#endregion
382
- //#region src/components/form/GFormErrorMessages.vue?vue&type=script&setup=true&lang.ts
377
+ // src/components/form/GFormErrorMessages.vue?vue&type=script&setup=true&lang.ts
383
378
  var je = ["id"], Me = /* @__PURE__ */ u({
384
379
  __name: "GFormErrorMessages",
385
380
  props: {
@@ -568,8 +563,7 @@ function Ye() {
568
563
  }
569
564
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
570
565
  var Xe = (e) => e != null;
571
- //#endregion
572
- //#region ../../node_modules/@vueuse/integrations/dist/useFocusTrap.js
566
+ // ../../node_modules/@vueuse/integrations/dist/useFocusTrap.js
573
567
  function Ze(e, t = {}) {
574
568
  let n, { immediate: i, ...a } = t, o = N(!1), s = N(!1), c = (e) => n && n.activate(e), l = (e) => n && n.deactivate(e), u = () => {
575
569
  n && (n.pause(), s.value = !0);
@@ -607,17 +601,8 @@ function Ze(e, t = {}) {
607
601
  unpause: d
608
602
  };
609
603
  }
610
- //#endregion
611
- //#region src/compose/focusable.ts
612
- var Qe = [
613
- "a[href]",
614
- "button:not([disabled])",
615
- "input:not([disabled])",
616
- "select:not([disabled])",
617
- "textarea:not([disabled])",
618
- "[tabindex]:not([tabindex='-1'])",
619
- "[contenteditable='true']"
620
- ].join(",");
604
+ // src/compose/focusable.ts
605
+ var Qe = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1']),[contenteditable='true']";
621
606
  function $e(e) {
622
607
  return e ? Array.from(e.querySelectorAll(Qe)) : [];
623
608
  }
@@ -625,8 +610,7 @@ function et(e) {
625
610
  let t = document.activeElement;
626
611
  return t ? e.findIndex((e) => e === t || e.contains(t)) : -1;
627
612
  }
628
- //#endregion
629
- //#region src/compose/useOverlayFocus.ts
613
+ // src/compose/useOverlayFocus.ts
630
614
  function tt(e, t, n = !1) {
631
615
  let r = O(!1), i = () => !!e.value?.querySelector(Qe), { activate: a, deactivate: o, pause: s, unpause: c } = Ze(e, {
632
616
  immediate: !1,
@@ -670,8 +654,7 @@ function tt(e, t, n = !1) {
670
654
  unpause: c
671
655
  };
672
656
  }
673
- //#endregion
674
- //#region src/compose/useOverlayEscape.ts
657
+ // src/compose/useOverlayEscape.ts
675
658
  function nt(e, t, n, r, i) {
676
659
  function a(i) {
677
660
  if (n.value && t.value) {
@@ -690,8 +673,7 @@ function nt(e, t, n, r, i) {
690
673
  document.removeEventListener("mousedown", a), document.removeEventListener("keydown", o), i();
691
674
  });
692
675
  }
693
- //#endregion
694
- //#region src/compose/popoverPosition.ts
676
+ // src/compose/popoverPosition.ts
695
677
  function rt(e, t, n, r) {
696
678
  let i = r?.gap ?? 8, a = r?.margin ?? 16, o = r?.preferAbove ?? !1, s = !1, c = !1, l;
697
679
  o ? e.top - t.height - i > n.top + a ? (l = e.top - t.height - i, s = !0) : e.bottom + t.height + i <= n.bottom - a ? l = e.bottom + i : (l = n.top + a, c = !0) : e.bottom + t.height + i > n.bottom - a && e.top - t.height - i > n.top + a ? (l = e.top - t.height - i, s = !0) : e.bottom + t.height + i > n.bottom - a && e.top - t.height - i <= n.top + a ? (l = n.top + a, c = !0) : l = e.bottom + i;
@@ -706,8 +688,7 @@ function rt(e, t, n, r) {
706
688
  overlay: c
707
689
  };
708
690
  }
709
- //#endregion
710
- //#region src/components/GClientOnly.vue
691
+ // src/components/GClientOnly.vue
711
692
  var it = /* @__PURE__ */ u({
712
693
  __name: "GClientOnly",
713
694
  setup(e) {
@@ -902,8 +883,7 @@ function mt(e, t) {
902
883
  function ht(e) {
903
884
  e.style.opacity = "0", e.style.visibility = "hidden";
904
885
  }
905
- //#endregion
906
- //#region src/components/GTooltip.vue
886
+ // src/components/GTooltip.vue
907
887
  var gt = /* @__PURE__ */ u({
908
888
  __name: "GTooltip",
909
889
  props: { text: {} },
@@ -1198,8 +1178,7 @@ var gt = /* @__PURE__ */ u({
1198
1178
  })]));
1199
1179
  }
1200
1180
  });
1201
- //#endregion
1202
- //#region src/compose/useSelectDropdown.ts
1181
+ // src/compose/useSelectDropdown.ts
1203
1182
  function Ft(e) {
1204
1183
  return e.map((e) => typeof e == "string" ? {
1205
1184
  label: e,
@@ -1248,8 +1227,7 @@ function It({ open: e, anchorRef: t, listboxRef: n, baseId: i, activeIndex: a })
1248
1227
  scrollOptionIntoView: _
1249
1228
  };
1250
1229
  }
1251
- //#endregion
1252
- //#region src/components/GSelect.vue?vue&type=script&setup=true&lang.ts
1230
+ // src/components/GSelect.vue?vue&type=script&setup=true&lang.ts
1253
1231
  var Lt = ["id"], Rt = {
1254
1232
  key: 0,
1255
1233
  class: "g-select-required",
@@ -1699,8 +1677,7 @@ var Lt = ["id"], Rt = {
1699
1677
  }, [A(t.$slots, "option", { option: e }, () => [c(P(e.title), 1)])], 42, rn))), 128)) : a("", !0)], 8, $t)])) : a("", !0)], 8, Yt));
1700
1678
  }
1701
1679
  });
1702
- //#endregion
1703
- //#region src/compose/useWebComponentSidebar.ts
1680
+ // src/compose/useWebComponentSidebar.ts
1704
1681
  function on(e) {
1705
1682
  return e.replace(/[^a-zA-Z0-9_-]/g, "-");
1706
1683
  }
@@ -1746,8 +1723,7 @@ function cn(e = "default", t) {
1746
1723
  document.removeEventListener("mousedown", s), document.removeEventListener("focusin", c);
1747
1724
  }), o;
1748
1725
  }
1749
- //#endregion
1750
- //#region src/components/hamburger/GHamburgerMenuButton.vue?vue&type=script&setup=true&lang.ts
1726
+ // src/components/hamburger/GHamburgerMenuButton.vue?vue&type=script&setup=true&lang.ts
1751
1727
  var ln = [
1752
1728
  "id",
1753
1729
  "aria-controls",
@@ -1983,8 +1959,7 @@ var ln = [
1983
1959
  ], 2));
1984
1960
  }
1985
1961
  });
1986
- //#endregion
1987
- //#region src/compose/useScrollRestore.ts
1962
+ // src/compose/useScrollRestore.ts
1988
1963
  function Sn(e, t) {
1989
1964
  let n = t ? ue(`${t}:scroll`, 0, { writeDefaults: !1 }) : null, r = O(!!(n?.value && n.value > 0)), i = null, a = null, o = null, s = !1;
1990
1965
  function c(e) {
@@ -2040,8 +2015,7 @@ function Sn(e, t) {
2040
2015
  d(), i &&= (i.removeEventListener("scroll", u), null), s = !1;
2041
2016
  }), { isPendingScrollRestore: r };
2042
2017
  }
2043
- //#endregion
2044
- //#region src/components/GSidebar.vue?vue&type=script&setup=true&lang.ts
2018
+ // src/components/GSidebar.vue?vue&type=script&setup=true&lang.ts
2045
2019
  var Cn = ["id"], wn = /* @__PURE__ */ u({
2046
2020
  __name: "GSidebar",
2047
2021
  props: {
@@ -2056,7 +2030,7 @@ var Cn = ["id"], wn = /* @__PURE__ */ u({
2056
2030
  storageKey: {}
2057
2031
  },
2058
2032
  setup(e) {
2059
- let t = e, n = p("sidebar", () => void 0, !0) ?? (fe() ? cn(t.sidebarKey, I(t, "mediaQuery")) : void 0), i = r(() => t.backgroundImage ? t.backgroundImage : t.theme === "light" ? "none" : "url('https://gradcdn.blob.core.windows.net/public/sidebar-bg2.jpg')"), a = r(() => t.backgroundColor ? t.backgroundColor : t.theme === "light" ? "#f9f9f9" : "#030913"), s = r(() => t.topOffsetVar ? `var(${t.topOffsetVar})` : t.topOffset ? t.topOffset : "var(--g-toolbar-height)"), c = B(), { isPendingScrollRestore: l } = Sn(U("sidebar-ref"), t.storageKey);
2033
+ let t = e, n = p("sidebar", () => void 0, !0) ?? (fe() ? cn(t.sidebarKey, I(t, "mediaQuery")) : void 0), i = r(() => t.backgroundImage ? t.backgroundImage : t.theme === "light" ? "none" : "var(--g-sidebar-background-image, none)"), a = r(() => t.backgroundColor ? t.backgroundColor : t.theme === "light" ? "#f9f9f9" : "#030913"), s = r(() => t.topOffsetVar ? `var(${t.topOffsetVar})` : t.topOffset ? t.topOffset : "var(--g-toolbar-height)"), c = B(), { isPendingScrollRestore: l } = Sn(U("sidebar-ref"), t.storageKey);
2060
2034
  function u(e) {
2061
2035
  e.key === "Escape" && n?.isCollapsible?.value && n?.open?.value && (n.open.value = !1, document.getElementById(`${n.id}-hamburger`)?.focus());
2062
2036
  }
@@ -2626,8 +2600,7 @@ var Cn = ["id"], wn = /* @__PURE__ */ u({
2626
2600
  }, P(E(n, r)), 9, dr)) : a("", !0)], 10, ir))), 128))], 42, nr)], 64))), 128))], 512));
2627
2601
  }
2628
2602
  });
2629
- //#endregion
2630
- //#region src/components/table/columnFilters.ts
2603
+ // src/components/table/columnFilters.ts
2631
2604
  function pr(e) {
2632
2605
  return e.filter?.key ?? e.key;
2633
2606
  }
@@ -2695,8 +2668,7 @@ function Sr(e, t) {
2695
2668
  case "toggle": return yr(e, t) === !0 ? !e.transform || e.transform(!0) : void 0;
2696
2669
  }
2697
2670
  }
2698
- //#endregion
2699
- //#region src/components/GMultiSelect.vue?vue&type=script&setup=true&lang.ts
2671
+ // src/components/GMultiSelect.vue?vue&type=script&setup=true&lang.ts
2700
2672
  var Cr = ["id", "for"], wr = {
2701
2673
  key: 0,
2702
2674
  class: "g-multiselect-required",
@@ -3355,8 +3327,7 @@ var Cr = ["id", "for"], wr = {
3355
3327
  ]));
3356
3328
  }
3357
3329
  });
3358
- //#endregion
3359
- //#region src/compose/useFiltering.ts
3330
+ // src/compose/useFiltering.ts
3360
3331
  function bi(e) {
3361
3332
  if (!(Array.isArray(e) && e.length === 0) && e !== null && e !== !1 && e !== "") return e;
3362
3333
  }
@@ -3491,8 +3462,7 @@ function Ri(e, t = {}) {
3491
3462
  })
3492
3463
  };
3493
3464
  }
3494
- //#endregion
3495
- //#region src/components/GTable.vue?vue&type=script&setup=true&lang.ts
3465
+ // src/components/GTable.vue?vue&type=script&setup=true&lang.ts
3496
3466
  var zi = { class: "g-table-inner-wrap" }, Bi = { class: "g-table-control-actions" }, Vi = {
3497
3467
  key: 0,
3498
3468
  class: "g-sort-builder-wrap"
@@ -5175,15 +5145,25 @@ var zi = { class: "g-table-inner-wrap" }, Bi = { class: "g-table-control-actions
5175
5145
  function rs(e) {
5176
5146
  return document.getElementById(e) ?? document.querySelector("main");
5177
5147
  }
5178
- function is(e = "main-content", t = !0) {
5148
+ function is(e) {
5149
+ e.hasAttribute("tabindex") || (e.setAttribute("tabindex", "-1"), e.addEventListener("blur", () => {
5150
+ e.getAttribute("tabindex") === "-1" && e.removeAttribute("tabindex");
5151
+ }, { once: !0 }));
5152
+ }
5153
+ function as(e = "main-content", t = !0) {
5179
5154
  if (typeof document > "u") return !1;
5180
5155
  let n = rs(e);
5181
5156
  if (!n) return !1;
5182
5157
  let r = t ? n.querySelector("h1") : null;
5183
- for (let e of [r, n]) if (e && (e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1"), e.focus({ preventScroll: t }), document.activeElement === e)) return !0;
5158
+ for (let e of [r, n]) {
5159
+ if (!e) continue;
5160
+ let n = e.hasAttribute("tabindex");
5161
+ if (is(e), e.focus({ preventScroll: t }), document.activeElement === e) return !0;
5162
+ n || e.removeAttribute("tabindex");
5163
+ }
5184
5164
  return !1;
5185
5165
  }
5186
- function as() {
5166
+ function os() {
5187
5167
  let e = document.getElementById(ns);
5188
5168
  if (e) return {
5189
5169
  el: e,
@@ -5205,10 +5185,10 @@ function as() {
5205
5185
  created: !0
5206
5186
  };
5207
5187
  }
5208
- function os() {
5188
+ function ss() {
5209
5189
  return new Promise((e) => requestAnimationFrame(() => e()));
5210
5190
  }
5211
- function ss(e, t = {}) {
5191
+ function cs(e, t = {}) {
5212
5192
  let n = O(""), { mainId: r = "main-content", isNewPage: i = (e, t) => e.path !== t.path, focus: a = !0, ready: o, message: s = (e, t) => t ? `Navigated to ${t}` : "" } = t;
5213
5193
  if (typeof window > "u") return {
5214
5194
  message: D(n),
@@ -5217,7 +5197,7 @@ function ss(e, t = {}) {
5217
5197
  };
5218
5198
  let c = null, l, u = 0;
5219
5199
  function d(e) {
5220
- n.value = e, c ??= as();
5200
+ n.value = e, c ??= os();
5221
5201
  let t = c.el;
5222
5202
  t.textContent = "", clearTimeout(l), l = setTimeout(() => {
5223
5203
  t.textContent = e;
@@ -5226,9 +5206,9 @@ function ss(e, t = {}) {
5226
5206
  let p = e.afterEach(async (e, t, n) => {
5227
5207
  if (n || !t.matched?.length || !i(e, t)) return;
5228
5208
  let c = ++u, l = document.activeElement;
5229
- if (await g(), await os(), o && (await o(e, t), await g(), await os()), c !== u) return;
5209
+ if (await g(), await ss(), o && (await o(e, t), await g(), await ss()), c !== u) return;
5230
5210
  let f = typeof a == "function" ? a(e, t) : a, p = document.activeElement, m = !!p && p !== l && !!rs(r)?.contains(p);
5231
- f && !e.hash && !m && is(r);
5211
+ f && !e.hash && !m && as(r);
5232
5212
  let h = s(e, document.title);
5233
5213
  h && d(h);
5234
5214
  });
@@ -5241,9 +5221,8 @@ function ss(e, t = {}) {
5241
5221
  stop: m
5242
5222
  };
5243
5223
  }
5244
- //#endregion
5245
- //#region src/components/GSkipLink.vue?vue&type=script&setup=true&lang.ts
5246
- var cs = ["href"], ls = /*@__PURE__*/ u({
5224
+ // src/components/GSkipLink.vue?vue&type=script&setup=true&lang.ts
5225
+ var ls = ["href"], us = /*@__PURE__*/ u({
5247
5226
  __name: "GSkipLink",
5248
5227
  props: {
5249
5228
  target: { default: "main-content" },
@@ -5252,33 +5231,31 @@ var cs = ["href"], ls = /*@__PURE__*/ u({
5252
5231
  setup(e) {
5253
5232
  let t = e;
5254
5233
  function n(e) {
5255
- is(t.target, !1) && e.preventDefault();
5234
+ as(t.target, !1) && e.preventDefault();
5256
5235
  }
5257
5236
  return (e, r) => (w(), o("a", {
5258
5237
  class: "g-skip-link",
5259
5238
  href: `#${t.target}`,
5260
5239
  onClick: n
5261
- }, [A(e.$slots, "default", {}, () => [c(P(t.label), 1)], !0)], 8, cs));
5240
+ }, [A(e.$slots, "default", {}, () => [c(P(t.label), 1)], !0)], 8, ls));
5262
5241
  }
5263
- }), us = (e, t) => {
5242
+ }), ds = (e, t) => {
5264
5243
  let n = e.__vccOpts || e;
5265
5244
  for (let [e, r] of t) n[e] = r;
5266
5245
  return n;
5267
- }, ds = /*#__PURE__*/ us(ls, [["__scopeId", "data-v-1d350630"]]), fs = ["id"], ps = /*#__PURE__*/ us(/* @__PURE__ */ u({
5246
+ }, fs = /*#__PURE__*/ ds(us, [["__scopeId", "data-v-1d350630"]]), ps = ["id"], ms = /*#__PURE__*/ ds(/* @__PURE__ */ u({
5268
5247
  __name: "GMain",
5269
5248
  props: { id: { default: "main-content" } },
5270
5249
  setup(e) {
5271
5250
  let t = e;
5272
5251
  return (e, n) => (w(), o("main", {
5273
5252
  id: t.id,
5274
- class: "g-main",
5275
- tabindex: "-1"
5276
- }, [A(e.$slots, "default", {}, void 0, !0)], 8, fs));
5253
+ class: "g-main"
5254
+ }, [A(e.$slots, "default", {}, void 0, !0)], 8, ps));
5277
5255
  }
5278
- }), [["__scopeId", "data-v-84dc2f3f"]]);
5279
- //#endregion
5280
- //#region src/compose/useActiveLink.ts
5281
- function ms(e, t, n) {
5256
+ }), [["__scopeId", "data-v-139f5ef2"]]);
5257
+ // src/compose/useActiveLink.ts
5258
+ function hs(e, t, n) {
5282
5259
  let r = [
5283
5260
  0,
5284
5261
  .25,
@@ -5313,9 +5290,8 @@ function ms(e, t, n) {
5313
5290
  });
5314
5291
  return { stop: c };
5315
5292
  }
5316
- //#endregion
5317
- //#region src/compose/useSidebar.ts
5318
- function hs(e = "(max-width: 800px)") {
5293
+ // src/compose/useSidebar.ts
5294
+ function gs(e = "(max-width: 800px)") {
5319
5295
  let t = B(), n = O(!1), r = ce(e, { ssrWidth: 1e3 });
5320
5296
  function i(e) {
5321
5297
  if (!r.value || !n.value) return;
@@ -5344,43 +5320,42 @@ function hs(e = "(max-width: 800px)") {
5344
5320
  toggle: () => n.value = !n.value
5345
5321
  };
5346
5322
  }
5347
- //#endregion
5348
- //#region src/compose/usePaging.ts
5349
- function gs(e) {
5323
+ // src/compose/usePaging.ts
5324
+ function _s(e) {
5350
5325
  let t = /* @__PURE__ */ new Set();
5351
5326
  return (e ?? []).filter((e) => !e?.key || t.has(e.key) || e.order !== 1 && e.order !== -1 ? !1 : (t.add(e.key), !0));
5352
5327
  }
5353
- function _s(e) {
5354
- return e == null ? [] : gs((typeof e == "string" ? e.split(",") : e).filter((e) => e !== null).map((e) => e.trim()).filter(Boolean).map((e) => ({
5328
+ function vs(e) {
5329
+ return e == null ? [] : _s((typeof e == "string" ? e.split(",") : e).filter((e) => e !== null).map((e) => e.trim()).filter(Boolean).map((e) => ({
5355
5330
  key: e.replace(/^-/, ""),
5356
5331
  order: e.startsWith("-") ? -1 : 1
5357
5332
  })));
5358
5333
  }
5359
- function vs(e) {
5360
- let t = gs(e);
5334
+ function ys(e) {
5335
+ let t = _s(e);
5361
5336
  if (t.length !== 0) return t.map(({ key: e, order: t }) => `${t === -1 ? "-" : ""}${e}`);
5362
5337
  }
5363
- function ys(e, t = []) {
5364
- let n = gs(e);
5338
+ function bs(e, t = []) {
5339
+ let n = _s(e);
5365
5340
  if (n.length === 0) return;
5366
5341
  let r = n.map(({ key: e, order: t }) => `${t === -1 ? "-" : ""}${e}`), i = new Set(n.map(({ key: e }) => String(e))), a = n.length === 1 && n[0].order === -1 ? "-" : "";
5367
5342
  return t.forEach((e) => {
5368
5343
  i.has(e) || r.push(`${a}${e}`);
5369
5344
  }), r.join(",");
5370
5345
  }
5371
- function bs(e) {
5346
+ function xs(e) {
5372
5347
  return Array.isArray(e) ? [...e] : e;
5373
5348
  }
5374
- function xs(e, t) {
5349
+ function Ss(e, t) {
5375
5350
  return Array.isArray(e) || Array.isArray(t) ? !Array.isArray(e) || !Array.isArray(t) ? !1 : e.length === t.length && e.every((e, n) => e === t[n]) : e === t;
5376
5351
  }
5377
- function Ss(e, t) {
5352
+ function Cs(e, t) {
5378
5353
  return e.length === t.length && e.every((e, n) => {
5379
5354
  let r = t[n];
5380
5355
  return e.key === r?.key && e.order === r?.order;
5381
5356
  });
5382
5357
  }
5383
- function Cs(e, t) {
5358
+ function ws(e, t) {
5384
5359
  if (typeof e == "string") return Number(e);
5385
5360
  if (Array.isArray(e)) {
5386
5361
  let n = e.find((e) => e !== null);
@@ -5388,44 +5363,43 @@ function Cs(e, t) {
5388
5363
  }
5389
5364
  return t;
5390
5365
  }
5391
- function ws(e = {}) {
5366
+ function Ts(e = {}) {
5392
5367
  let t = e.defaultPageSize ?? 50, n = e.defaultPageOffset ?? 0, i = e.sortKey ?? "sort", a = e.pageSizeKey ?? "pageSize", o = e.pageOffsetKey ?? "pageOffset", s = N([]), c = O(t), l = O(n);
5393
5368
  return e.route && e.router && (W(() => e.route?.query[i], (e) => {
5394
- let t = _s(e);
5395
- Ss(s.value, t) || (s.value = t);
5369
+ let t = vs(e);
5370
+ Cs(s.value, t) || (s.value = t);
5396
5371
  }, { immediate: !0 }), W(() => e.route?.query[a], (e) => {
5397
- let n = Cs(e, t);
5372
+ let n = ws(e, t);
5398
5373
  c.value !== n && (c.value = n);
5399
5374
  }, { immediate: !0 }), W(() => e.route?.query[o], (e) => {
5400
- let t = Cs(e, n);
5375
+ let t = ws(e, n);
5401
5376
  l.value !== t && (l.value = t);
5402
5377
  }, { immediate: !0 }), W([
5403
5378
  s,
5404
5379
  c,
5405
5380
  l
5406
5381
  ], ([r, s, c]) => {
5407
- let l = { ...e.route.query }, u = vs(r);
5408
- u === void 0 ? delete l[i] : l[i] = bs(u), s === t || s === void 0 ? delete l[a] : l[a] = String(s), c === n || c === void 0 ? delete l[o] : l[o] = String(c);
5382
+ let l = { ...e.route.query }, u = ys(r);
5383
+ u === void 0 ? delete l[i] : l[i] = xs(u), s === t || s === void 0 ? delete l[a] : l[a] = String(s), c === n || c === void 0 ? delete l[o] : l[o] = String(c);
5409
5384
  let d = /* @__PURE__ */ new Set([...Object.keys(e.route.query), ...Object.keys(l)]), f = !1;
5410
- for (let t of d) if (!xs(e.route.query[t], l[t])) {
5385
+ for (let t of d) if (!Ss(e.route.query[t], l[t])) {
5411
5386
  f = !0;
5412
5387
  break;
5413
5388
  }
5414
5389
  f && e.router.replace({ query: l });
5415
5390
  })), {
5416
5391
  sort: r({
5417
- get: () => gs(s.value),
5392
+ get: () => _s(s.value),
5418
5393
  set: (e) => {
5419
- s.value = gs(e);
5394
+ s.value = _s(e);
5420
5395
  }
5421
5396
  }),
5422
5397
  pageSize: c,
5423
5398
  pageOffset: l
5424
5399
  };
5425
5400
  }
5426
- //#endregion
5427
- //#region src/compose/useTableChanges.ts
5428
- function Ts() {
5401
+ // src/compose/useTableChanges.ts
5402
+ function Es() {
5429
5403
  let e = M(/* @__PURE__ */ new Map()), t = ne(), n = (n) => {
5430
5404
  let r = n.column.key, i = n.row.key, a = n.value, o = n.previousValue;
5431
5405
  e.has(i) || e.set(i, M(/* @__PURE__ */ new Map()));
@@ -5527,9 +5501,8 @@ function Ts() {
5527
5501
  onChange: t.on
5528
5502
  };
5529
5503
  }
5530
- //#endregion
5531
- //#region src/compose/usePersistentTableColumnState.ts
5532
- function Es(e, t) {
5504
+ // src/compose/usePersistentTableColumnState.ts
5505
+ function Ds(e, t) {
5533
5506
  if (!e || typeof e != "object" || Array.isArray(e)) return {};
5534
5507
  let n = new Set(t.map(({ key: e }) => String(e))), r = {};
5535
5508
  for (let [t, i] of Object.entries(e)) {
@@ -5539,13 +5512,12 @@ function Es(e, t) {
5539
5512
  }
5540
5513
  return r;
5541
5514
  }
5542
- function Ds(e, t) {
5515
+ function Os(e, t) {
5543
5516
  let n = se(e, {});
5544
5517
  return W(() => L(t).map(({ key: e }) => String(e)), () => {
5545
- n.value = Es(n.value, L(t));
5518
+ n.value = Ds(n.value, L(t));
5546
5519
  }, { immediate: !0 }), { columnState: n };
5547
5520
  }
5548
- //#endregion
5549
- export { pn as $, Qa as A, Ri as B, wo as C, lo as D, fo as E, ji as F, Zn as G, Yr as H, xi as I, kn as J, In as K, Mi as L, Ai as M, bi as N, ao as O, Fi as P, xn as Q, Ii as R, To as S, go as T, Rr as U, Li as V, fr as W, wn as X, On as Y, Sn as Z, Uo as _, De as _t, _s as a, Ct as at, No as b, Q as bt, hs as c, rt as ct, ds as d, qe as dt, cn as et, is as f, Je as ft, Wo as g, Oe as gt, Xo as h, Ae as ht, gs as i, Ot as it, Si as j, io as k, ms as l, nt as lt, ts as m, $ as mt, Ts as n, Jt as nt, vs as o, gt as ot, ss as p, ze as pt, jn as q, ys as r, Pt as rt, ws as s, ct as st, Ds as t, an as tt, ps as u, tt as ut, Vo as v, xe as vt, yo as w, Eo as x, Po as y, be as yt, Ci as z };
5521
+ export { pn as $, Qa as A, Ri as B, wo as C, lo as D, fo as E, ji as F, Zn as G, Yr as H, xi as I, kn as J, In as K, Mi as L, Ai as M, bi as N, ao as O, Fi as P, xn as Q, Ii as R, To as S, go as T, Rr as U, Li as V, fr as W, wn as X, On as Y, Sn as Z, Uo as _, De as _t, vs as a, Ct as at, No as b, Q as bt, gs as c, rt as ct, fs as d, qe as dt, cn as et, as as f, Je as ft, Wo as g, Oe as gt, Xo as h, Ae as ht, _s as i, Ot as it, Si as j, io as k, hs as l, nt as lt, ts as m, $ as mt, Es as n, Jt as nt, ys as o, gt as ot, cs as p, ze as pt, jn as q, bs as r, Pt as rt, Ts as s, ct as st, Os as t, an as tt, ms as u, tt as ut, Vo as v, xe as vt, yo as w, Eo as x, Po as y, be as yt, Ci as z };
5550
5522
 
5551
- //# sourceMappingURL=grad-vue-TtZgUEXw.js.map
5523
+ //# sourceMappingURL=grad-vue-D37PBcCc.js.map