@illinois-grad/grad-vue 0.1.0 → 1.0.2

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.
Files changed (40) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +59 -7
  3. package/dist/components/GAlertDialog.vue.d.ts +11 -2
  4. package/dist/components/GAppHeader.vue.d.ts +30 -4
  5. package/dist/components/GButton.vue.d.ts +12 -0
  6. package/dist/components/GClipboard.vue.d.ts +13 -0
  7. package/dist/components/GDetailList.vue.d.ts +35 -0
  8. package/dist/components/GHamburgerMenu.vue.d.ts +15 -0
  9. package/dist/components/GHistoryScroller.vue.d.ts +30 -0
  10. package/dist/components/GModal.vue.d.ts +39 -0
  11. package/dist/components/GOverlay.vue.d.ts +3 -0
  12. package/dist/components/GPopover.vue.d.ts +18 -26
  13. package/dist/components/GProgress.vue.d.ts +13 -4
  14. package/dist/components/GSearch.vue.d.ts +20 -7
  15. package/dist/components/GSelect.vue.d.ts +38 -5
  16. package/dist/components/GSelectButton.vue.d.ts +22 -8
  17. package/dist/components/GSidebar.vue.d.ts +42 -0
  18. package/dist/components/GSidebarMenu.vue.d.ts +39 -0
  19. package/dist/components/GTable.vue.d.ts +74 -0
  20. package/dist/components/GTextInput.vue.d.ts +30 -1
  21. package/dist/components/GThreeWayToggle.vue.d.ts +29 -0
  22. package/dist/components/detail-list/GDetailListItem.vue.d.ts +21 -0
  23. package/dist/components/table/GTableBody.vue.d.ts +36 -0
  24. package/dist/components/table/GTablePagination.vue.d.ts +20 -0
  25. package/dist/components/table/TableColumn.d.ts +35 -0
  26. package/dist/compose/useActiveLink.d.ts +13 -0
  27. package/dist/compose/useFiltering.d.ts +14 -0
  28. package/dist/compose/useOverlayStack.d.ts +20 -6
  29. package/dist/compose/useSidebar.d.ts +12 -0
  30. package/dist/directives/v-gtooltip.d.ts +4 -0
  31. package/dist/grad-vue.css +1 -1
  32. package/dist/grad-vue.d.ts +34 -19
  33. package/dist/grad-vue.js +145 -942
  34. package/dist/grad-vue.js.map +1 -1
  35. package/dist/main-BA2FBasv.js +2427 -0
  36. package/dist/main-BA2FBasv.js.map +1 -0
  37. package/dist/plugin.d.ts +35 -0
  38. package/dist/plugin.js +12 -0
  39. package/dist/plugin.js.map +1 -0
  40. package/package.json +35 -11
@@ -0,0 +1,2427 @@
1
+ import { defineComponent as A, useAttrs as Re, computed as _, createBlock as Z, openBlock as d, resolveDynamicComponent as de, mergeProps as te, unref as b, withCtx as N, renderSlot as D, mergeModels as F, useModel as j, useId as H, ref as M, createElementBlock as f, normalizeClass as T, createCommentVNode as E, createElementVNode as s, toDisplayString as x, createTextVNode as G, onBeforeUnmount as ce, shallowRef as Le, watch as J, toValue as Se, nextTick as K, onMounted as ue, useTemplateRef as ge, createVNode as le, Transition as pe, normalizeStyle as ve, Fragment as V, renderList as W, onBeforeMount as ze, Teleport as Te, withDirectives as be, withModifiers as ae, vShow as Fe, inject as Ve, getCurrentInstance as He, watchEffect as Me, vModelCheckbox as Be } from "vue";
2
+ import { toArray as Ke, unrefElement as We, tryOnScopeDispose as Ne, useFocusWithin as Ue, useDebounceFn as qe, useClipboard as Ze, useResizeObserver as Ie } from "@vueuse/core";
3
+ import { createFocusTrap as je } from "focus-trap";
4
+ const re = /* @__PURE__ */ A({
5
+ __name: "GButton",
6
+ props: {
7
+ size: { default: "medium" },
8
+ theme: { default: "primary" },
9
+ outlined: { type: Boolean, default: !1 },
10
+ text: { type: Boolean, default: !1 },
11
+ to: { default: void 0 },
12
+ component: { default: void 0 }
13
+ },
14
+ emits: [
15
+ "click",
16
+ "focus",
17
+ "blur",
18
+ "keydown",
19
+ "keyup",
20
+ "mousedown",
21
+ "mouseup",
22
+ "mouseenter",
23
+ "mouseleave"
24
+ ],
25
+ setup(e) {
26
+ const l = e, t = Re(), n = _(() => [
27
+ "g-btn",
28
+ `g-btn--${l.size}`,
29
+ `g-btn--${l.theme}`,
30
+ {
31
+ "g-btn--outlined": l.outlined,
32
+ "g-btn--text": l.text,
33
+ "g-btn--primary": l.theme === "primary",
34
+ "g-btn--accent": l.theme === "accent",
35
+ "g-btn-has-text": l.text
36
+ }
37
+ ]);
38
+ return (o, a) => (d(), Z(de(l.component ? l.component : "button"), te(b(t), {
39
+ to: l.to,
40
+ class: n.value,
41
+ type: l.to ? void 0 : "button",
42
+ onClick: a[0] || (a[0] = (u) => o.$emit("click", u)),
43
+ onFocus: a[1] || (a[1] = (u) => o.$emit("focus", u)),
44
+ onBlur: a[2] || (a[2] = (u) => o.$emit("blur", u)),
45
+ onKeydown: a[3] || (a[3] = (u) => o.$emit("keydown", u)),
46
+ onKeyup: a[4] || (a[4] = (u) => o.$emit("keyup", u)),
47
+ onMousedown: a[5] || (a[5] = (u) => o.$emit("mousedown", u)),
48
+ onMouseup: a[6] || (a[6] = (u) => o.$emit("mouseup", u)),
49
+ onMouseenter: a[7] || (a[7] = (u) => o.$emit("mouseenter", u)),
50
+ onMouseleave: a[8] || (a[8] = (u) => o.$emit("mouseleave", u))
51
+ }), {
52
+ default: N(() => [
53
+ D(o.$slots, "default")
54
+ ]),
55
+ _: 3
56
+ }, 16, ["to", "class", "type"]));
57
+ }
58
+ }), Ye = ["for"], Xe = ["id"], Je = ["value", "placeholder", "disabled", "aria-invalid"], Qe = ["id"], et = /* @__PURE__ */ A({
59
+ inheritAttrs: !1,
60
+ __name: "GTextInput",
61
+ props: /* @__PURE__ */ F({
62
+ label: { default: void 0 },
63
+ placeholder: { default: "" },
64
+ disabled: { type: Boolean, default: !1 },
65
+ error: { default: "" },
66
+ instructions: { default: "" }
67
+ }, {
68
+ modelValue: { type: String },
69
+ modelModifiers: {}
70
+ }),
71
+ emits: /* @__PURE__ */ F(["change"], ["update:modelValue"]),
72
+ setup(e, { emit: l }) {
73
+ const t = e, n = j(e, "modelValue"), o = H(), a = l, u = M(n.value ?? "");
74
+ let c = null;
75
+ function r(m) {
76
+ if (m !== n.value) {
77
+ const C = n.value;
78
+ n.value = m, a("change", {
79
+ was: C,
80
+ to: m
81
+ });
82
+ }
83
+ }
84
+ function v(m) {
85
+ const C = m.target.value;
86
+ u.value = C, c && clearTimeout(c), c = setTimeout(() => {
87
+ r(u.value), c = null;
88
+ }, 3e3);
89
+ }
90
+ function i(m) {
91
+ c && (clearTimeout(c), c = null), r(m.target.value);
92
+ }
93
+ function p(m) {
94
+ c && (clearTimeout(c), c = null), setTimeout(() => {
95
+ const C = m.target.value;
96
+ r(C);
97
+ }, 0);
98
+ }
99
+ function g(m) {
100
+ (m.key === "PageUp" || m.key === "PageDown") && (c && (clearTimeout(c), c = null), r(m.target.value)), m.key === "Enter" && r(m.target.value);
101
+ }
102
+ return (m, C) => (d(), f("div", {
103
+ class: T(["g-text-input-wrap", { "g-text-input-has-error": t.error }])
104
+ }, [
105
+ t.label ? (d(), f("label", {
106
+ key: 0,
107
+ for: m.$attrs.id || b(o),
108
+ class: "g-text-input-label"
109
+ }, x(t.label), 9, Ye)) : E("", !0),
110
+ m.$slots.instructions || e.instructions ? (d(), f("div", {
111
+ key: 1,
112
+ id: "instructions-" + b(o),
113
+ class: "g-text-input-instructions"
114
+ }, [
115
+ D(m.$slots, "instructions", {}, () => [
116
+ G(x(e.instructions), 1)
117
+ ], !0)
118
+ ], 8, Xe)) : E("", !0),
119
+ s("input", te({
120
+ value: n.value,
121
+ placeholder: t.placeholder,
122
+ disabled: t.disabled,
123
+ onInput: v,
124
+ onBlur: i,
125
+ onPaste: p,
126
+ onKeydown: g,
127
+ type: "text",
128
+ class: "g-text-input"
129
+ }, {
130
+ ...m.$attrs,
131
+ id: m.$attrs.id || b(o),
132
+ "aria-describedby": m.$slots.instructions || e.instructions ? "instructions-" + b(o) : void 0,
133
+ "aria-errormessage": t.error ? "error-message-" + b(o) : void 0
134
+ }, {
135
+ "aria-invalid": t.error ? "true" : "false"
136
+ }), null, 16, Je),
137
+ t.error ? (d(), f("div", {
138
+ key: 2,
139
+ class: "error-message",
140
+ id: "error-message-" + b(o),
141
+ role: "alert"
142
+ }, [
143
+ C[0] || (C[0] = s("svg", {
144
+ class: "g-text-input-error-icon",
145
+ xmlns: "http://www.w3.org/2000/svg",
146
+ viewBox: "0 0 640 640"
147
+ }, [
148
+ s("path", {
149
+ fill: "currentColor",
150
+ d: "M320 64C334.7 64 348.2 72.1 355.2 85L571.2 485C577.9 497.4 577.6 512.4 570.4 524.5C563.2 536.6 550.1 544 536 544L104 544C89.9 544 76.8 536.6 69.6 524.5C62.4 512.4 62.1 497.4 68.8 485L284.8 85C291.8 72.1 305.3 64 320 64zM320 416C302.3 416 288 430.3 288 448C288 465.7 302.3 480 320 480C337.7 480 352 465.7 352 448C352 430.3 337.7 416 320 416zM320 224C301.8 224 287.3 239.5 288.6 257.7L296 361.7C296.9 374.2 307.4 384 319.9 384C332.5 384 342.9 374.3 343.8 361.7L351.2 257.7C352.5 239.5 338.1 224 319.8 224z"
151
+ })
152
+ ], -1)),
153
+ G(" " + x(t.error), 1)
154
+ ], 8, Qe)) : E("", !0)
155
+ ], 2));
156
+ }
157
+ }), R = (e, l) => {
158
+ const t = e.__vccOpts || e;
159
+ for (const [n, o] of l)
160
+ t[n] = o;
161
+ return t;
162
+ }, Ra = /* @__PURE__ */ R(et, [["__scopeId", "data-v-0f17e81a"]]);
163
+ function Ae() {
164
+ window._g_overlay_stack_state || (window._g_overlay_stack_state = {
165
+ stack: M([]),
166
+ modalStack: M([]),
167
+ scrollLockStack: M([]),
168
+ updateBodyScrollLock() {
169
+ if (typeof document < "u")
170
+ if (t.value.length > 0) {
171
+ const o = window.innerWidth - document.documentElement.clientWidth;
172
+ document.body.classList.add("g-scroll-lock"), document.body.style.paddingRight = `${o}px`, document.body.style.setProperty("--g-scrollbar-width", `${o}px`);
173
+ } else
174
+ document.body.style.paddingRight = "0", document.body.classList.remove("g-scroll-lock"), document.body.style.removeProperty("--g-scrollbar-width");
175
+ }
176
+ });
177
+ const { stack: e, modalStack: l, scrollLockStack: t, updateBodyScrollLock: n } = window._g_overlay_stack_state;
178
+ return { stack: e, modalStack: l, scrollLockStack: t, updateBodyScrollLock: n };
179
+ }
180
+ function me(e, l = !1, t = !1) {
181
+ if (!document)
182
+ return {};
183
+ const { stack: n, modalStack: o, scrollLockStack: a, updateBodyScrollLock: u } = Ae(), c = l ? o : n;
184
+ function r() {
185
+ c.value.push(e), t && !a.value.includes(e) && (a.value.push(e), u());
186
+ }
187
+ function v() {
188
+ const g = c.value.lastIndexOf(e);
189
+ g !== -1 && c.value.splice(g, 1);
190
+ const m = a.value.lastIndexOf(e);
191
+ m !== -1 && (a.value.splice(m, 1), u());
192
+ }
193
+ const i = _(() => !l && o.value.length > 0 ? !1 : c.value.length > 0 && c.value[c.value.length - 1] === e), p = _(() => {
194
+ const g = c.value.indexOf(e);
195
+ return g === -1 ? 0 : (l ? 200 : 100) + g;
196
+ });
197
+ return ce(v), { push: r, pop: v, isTop: i, zIndex: p };
198
+ }
199
+ function tt() {
200
+ if (!document)
201
+ return {};
202
+ const { stack: e, modalStack: l, scrollLockStack: t } = Ae(), n = _(() => l.value.length > 0), o = _(
203
+ () => e.value.length > 0 || l.value.length > 0
204
+ ), a = _(() => t.value.length > 0);
205
+ return { hasModal: n, hasOverlay: o, hasScrollLock: a };
206
+ }
207
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
208
+ const lt = (e) => e != null;
209
+ function at(e, l = {}) {
210
+ let t;
211
+ const { immediate: n, ...o } = l, a = Le(!1), u = Le(!1), c = (p) => t && t.activate(p), r = (p) => t && t.deactivate(p), v = () => {
212
+ t && (t.pause(), u.value = !0);
213
+ }, i = () => {
214
+ t && (t.unpause(), u.value = !1);
215
+ };
216
+ return J(_(() => Ke(Se(e)).map((p) => {
217
+ const g = Se(p);
218
+ return typeof g == "string" ? g : We(g);
219
+ }).filter(lt)), (p) => {
220
+ if (p.length)
221
+ if (!t)
222
+ t = je(p, {
223
+ ...o,
224
+ onActivate() {
225
+ a.value = !0, l.onActivate && l.onActivate();
226
+ },
227
+ onDeactivate() {
228
+ a.value = !1, l.onDeactivate && l.onDeactivate();
229
+ }
230
+ }), n && c();
231
+ else {
232
+ const g = t?.active;
233
+ t?.updateContainerElements(p), !g && n && c();
234
+ }
235
+ }, { flush: "post" }), Ne(() => r()), {
236
+ hasFocus: a,
237
+ isPaused: u,
238
+ activate: c,
239
+ deactivate: r,
240
+ pause: v,
241
+ unpause: i
242
+ };
243
+ }
244
+ function ke(e, l) {
245
+ const t = M(!1), { activate: n, deactivate: o, pause: a, unpause: u } = at(e, {
246
+ immediate: !0,
247
+ initialFocus: () => {
248
+ if (t.value)
249
+ return !1;
250
+ const c = e.value?.querySelector("[popover-focus]");
251
+ if (c)
252
+ return c;
253
+ const r = e.value?.querySelector("h2");
254
+ if (r)
255
+ return r;
256
+ const v = e.value?.querySelector("[aria-selected='true']");
257
+ if (v)
258
+ return v;
259
+ },
260
+ onPostPause: () => t.value = !0,
261
+ onPostUnpause: () => {
262
+ K(() => {
263
+ t.value = !1;
264
+ }).catch((c) => {
265
+ console.error(c);
266
+ });
267
+ }
268
+ });
269
+ return J(l, (c) => {
270
+ c ? K(() => {
271
+ u();
272
+ }).catch((r) => {
273
+ console.error(r);
274
+ }) : a();
275
+ }), { activate: n, deactivate: o, pause: a, unpause: u };
276
+ }
277
+ function we(e, l, t, n, o) {
278
+ function a(c) {
279
+ for (const r of e)
280
+ if (r.value?.contains(c.target))
281
+ return;
282
+ n();
283
+ }
284
+ function u(c) {
285
+ c.key === "Escape" && t.value && l.value && (c.preventDefault(), K(n).catch((r) => {
286
+ console.error(r);
287
+ }));
288
+ }
289
+ ue(() => {
290
+ document.addEventListener("mousedown", a), document.addEventListener("keydown", u);
291
+ }), ce(() => {
292
+ document.removeEventListener("mousedown", a), document.removeEventListener("keydown", u), o();
293
+ });
294
+ }
295
+ function Oe(e, l, t, n) {
296
+ const o = n?.gap ?? 8, a = n?.margin ?? 16, u = n?.preferAbove ?? !1;
297
+ let c = !1, r = !1, v;
298
+ u ? e.top - l.height - o > t.top + a ? (v = e.top - l.height - o, c = !0) : e.bottom + l.height + o <= t.bottom - a ? v = e.bottom + o : (v = t.top + a, r = !0) : e.bottom + l.height + o > t.bottom - a && e.top - l.height - o > t.top + a ? (v = e.top - l.height - o, c = !0) : e.bottom + l.height + o > t.bottom - a && e.top - l.height - o <= t.top + a ? (v = t.top + a, r = !0) : v = e.bottom + o;
299
+ let i = e.left + (e.width - l.width) / 2;
300
+ i < t.left + a && (i = t.left + a), i + l.width > t.right - a && (i = t.right - l.width - a), i < t.left + a && (i = t.left + a);
301
+ const p = e.left + (e.width - l.width) / 2, g = i - p;
302
+ return { top: v, left: i, xOffset: g, placedAbove: c, overlay: r };
303
+ }
304
+ const ot = { class: "g-popover-wrap" }, st = ["id"], nt = ["aria-labelledby"], it = /* @__PURE__ */ A({
305
+ __name: "GPopover",
306
+ props: /* @__PURE__ */ F({
307
+ minimal: { type: Boolean, default: !1 }
308
+ }, {
309
+ modelValue: { type: Boolean, default: !1 },
310
+ modelModifiers: {}
311
+ }),
312
+ emits: /* @__PURE__ */ F(["show", "hide"], ["update:modelValue"]),
313
+ setup(e, { emit: l }) {
314
+ const t = e, n = l, o = j(e, "modelValue"), a = ge("triggerRef"), u = ge("popoverRef"), c = H(), { push: r, pop: v, isTop: i, zIndex: p } = me(c), { activate: g, deactivate: m } = ke(u, i);
315
+ we([u, a], i, o, C, v), J(o, (I) => {
316
+ I ? (K(() => {
317
+ K(() => g());
318
+ }), r(), n("show")) : (m(), v(), n("hide"));
319
+ });
320
+ function C() {
321
+ o.value = !1;
322
+ }
323
+ function $() {
324
+ o.value = !o.value;
325
+ }
326
+ const S = M({ top: 0, left: 0 }), P = M({ left: "50%" }), Y = M(!1), U = M(!1);
327
+ let L = null;
328
+ function O() {
329
+ if (!a.value || !u.value)
330
+ return;
331
+ const I = a.value.getBoundingClientRect(), k = u.value.getBoundingClientRect(), w = window.innerWidth - document.documentElement.clientWidth, h = window.innerWidth - w, z = new DOMRect(0, 0, h, window.innerHeight), { top: Q, left: oe, xOffset: se, placedAbove: ee, overlay: ne } = Oe(I, k, z, {
332
+ gap: t.minimal ? 0 : 8
333
+ });
334
+ S.value = { top: Q, left: oe }, P.value = {
335
+ left: `${k.width / 2 - se}px`,
336
+ top: ee ? "auto" : void 0,
337
+ bottom: ee ? "-8px" : void 0
338
+ }, Y.value = ee, U.value = ne;
339
+ }
340
+ return J(o, (I) => {
341
+ I ? K(() => {
342
+ O(), window.addEventListener("resize", O), u.value && (L && L.disconnect(), L = new ResizeObserver(
343
+ () => O()
344
+ ), L.observe(u.value));
345
+ }) : (window.removeEventListener("resize", O), L && L.disconnect());
346
+ }), ce(() => {
347
+ window.removeEventListener("resize", O), L && L.disconnect();
348
+ }), (I, k) => (d(), f("div", ot, [
349
+ s("div", {
350
+ ref_key: "triggerRef",
351
+ ref: a,
352
+ class: "g-popover-trigger",
353
+ id: `${b(c)}-trigger`
354
+ }, [
355
+ D(I.$slots, "trigger", { toggle: $ }, void 0, !0)
356
+ ], 8, st),
357
+ le(pe, {
358
+ name: "g-popover-expand",
359
+ appear: ""
360
+ }, {
361
+ default: N(() => [
362
+ o.value ? (d(), f("div", {
363
+ key: 0,
364
+ ref_key: "popoverRef",
365
+ ref: u,
366
+ class: T({
367
+ "g-popover": !0,
368
+ "g-popover-above": Y.value,
369
+ "g-popover-below": !Y.value,
370
+ "g-popover-minimal": e.minimal
371
+ }),
372
+ role: "dialog",
373
+ "aria-modal": "true",
374
+ "aria-labelledby": `${b(c)}-trigger`,
375
+ style: ve({
376
+ top: S.value.top + "px",
377
+ left: S.value.left + "px",
378
+ zIndex: b(p)
379
+ })
380
+ }, [
381
+ !U.value && !e.minimal ? (d(), f("div", {
382
+ key: 0,
383
+ class: T(["g-popover-arrow", { "g-popover-arrow-above": Y.value }]),
384
+ style: ve(P.value),
385
+ "aria-hidden": "true"
386
+ }, null, 6)) : E("", !0),
387
+ D(I.$slots, "default", {}, void 0, !0),
388
+ e.minimal ? E("", !0) : (d(), f("button", {
389
+ key: 1,
390
+ class: "g-popover-close",
391
+ type: "button",
392
+ "aria-label": "Close popover",
393
+ onClick: C
394
+ }, [...k[0] || (k[0] = [
395
+ s("svg", {
396
+ class: "g-popover-close-icon",
397
+ xmlns: "http://www.w3.org/2000/svg",
398
+ viewBox: "0 0 51.26 51.26",
399
+ "aria-hidden": "true"
400
+ }, [
401
+ s("path", {
402
+ fill: "currentColor",
403
+ d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
404
+ })
405
+ ], -1)
406
+ ])]))
407
+ ], 14, nt)) : E("", !0)
408
+ ]),
409
+ _: 3
410
+ })
411
+ ]));
412
+ }
413
+ }), rt = /* @__PURE__ */ R(it, [["__scopeId", "data-v-39a92ddd"]]), ut = ["disabled"], dt = { class: "g-select-btn-legend" }, ct = { class: "g-select-btn-row" }, vt = ["id", "name", "value", "checked", "disabled", "onChange"], ft = ["for"], gt = /* @__PURE__ */ A({
414
+ __name: "GSelectButton",
415
+ props: /* @__PURE__ */ F({
416
+ options: {},
417
+ label: {},
418
+ size: { default: "medium" },
419
+ name: { default: void 0 },
420
+ disabled: { type: Boolean, default: !1 }
421
+ }, {
422
+ modelValue: { default: () => "" },
423
+ modelModifiers: {}
424
+ }),
425
+ emits: /* @__PURE__ */ F(["change"], ["update:modelValue"]),
426
+ setup(e, { emit: l }) {
427
+ const t = e, n = l, o = j(e, "modelValue"), a = H(), u = _(() => t.options.map((i) => typeof i == "string" ? { label: i, value: i } : i)), c = _(() => [
428
+ "g-select-btn-group",
429
+ `g-select-btn-group--${t.size}`
430
+ ]), r = (i) => [
431
+ "g-select-btn",
432
+ i ? "g-select-btn--selected" : "",
433
+ { "g-select-btn--disabled": t.disabled }
434
+ ];
435
+ function v(i) {
436
+ !t.disabled && i !== o.value && (o.value = i, n("change", i));
437
+ }
438
+ return (i, p) => (d(), f("fieldset", {
439
+ class: T(c.value),
440
+ disabled: t.disabled
441
+ }, [
442
+ s("legend", dt, x(t.label), 1),
443
+ s("div", ct, [
444
+ (d(!0), f(V, null, W(u.value, (g, m) => (d(), f(V, {
445
+ key: g.value
446
+ }, [
447
+ s("input", {
448
+ class: "g-select-btn-radio",
449
+ type: "radio",
450
+ id: `${b(a)}-${g.value}`,
451
+ name: t.name || b(a),
452
+ value: g.value,
453
+ checked: g.value === o.value,
454
+ disabled: t.disabled,
455
+ onChange: (C) => v(g.value)
456
+ }, null, 40, vt),
457
+ s("label", {
458
+ for: `${b(a)}-${g.value}`,
459
+ class: T(r(g.value === o.value))
460
+ }, x(g.label), 11, ft)
461
+ ], 64))), 128))
462
+ ])
463
+ ], 10, ut));
464
+ }
465
+ }), Fa = /* @__PURE__ */ R(gt, [["__scopeId", "data-v-308c6015"]]), bt = ["width", "height"], pt = ["cx", "cy", "r"], mt = ["cx", "cy", "r", "stroke-dasharray", "stroke-dashoffset"], ht = ["cx", "cy", "r"], X = 4, yt = /* @__PURE__ */ A({
466
+ __name: "GProgress",
467
+ props: {
468
+ label: { default: "Loading" },
469
+ value: { default: void 0 },
470
+ size: { default: "medium" }
471
+ },
472
+ setup(e) {
473
+ const l = e, t = _(
474
+ () => l.value && l.value >= 1 && l.value <= 100
475
+ ), n = _(() => {
476
+ switch (l.size) {
477
+ case "tiny":
478
+ return 9;
479
+ case "small":
480
+ return 12;
481
+ case "large":
482
+ return 24;
483
+ default:
484
+ return 18;
485
+ }
486
+ }), o = _(() => 2 * Math.PI * n.value), a = _(
487
+ () => t.value ? l.value / 100 * o.value : 0
488
+ ), u = _(
489
+ () => t.value ? {
490
+ role: "progressbar",
491
+ "aria-valuenow": l.value,
492
+ "aria-valuemin": 1,
493
+ "aria-valuemax": 100,
494
+ "aria-label": l.label
495
+ } : {
496
+ role: "status",
497
+ "aria-label": l.label
498
+ }
499
+ );
500
+ return (c, r) => (d(), f("span", te({ class: "g-progress" }, u.value), [
501
+ (d(), f("svg", {
502
+ width: n.value * 2 + X,
503
+ height: n.value * 2 + X,
504
+ class: T([
505
+ "g-progress__svg",
506
+ {
507
+ "g-progress--determinate": t.value,
508
+ "g-progress--indeterminate": !t.value
509
+ }
510
+ ]),
511
+ focusable: "false",
512
+ "aria-hidden": "true"
513
+ }, [
514
+ s("circle", {
515
+ class: "g-progress__track",
516
+ cx: n.value + X / 2,
517
+ cy: n.value + X / 2,
518
+ r: n.value,
519
+ "stroke-width": X,
520
+ fill: "none"
521
+ }, null, 8, pt),
522
+ t.value ? (d(), f("circle", {
523
+ key: 0,
524
+ class: "g-progress__value",
525
+ cx: n.value + X / 2,
526
+ cy: n.value + X / 2,
527
+ r: n.value,
528
+ "stroke-width": X,
529
+ fill: "none",
530
+ "stroke-dasharray": o.value,
531
+ "stroke-dashoffset": o.value - a.value,
532
+ style: { transform: "rotate(-90deg)", "transform-origin": "center" }
533
+ }, null, 8, mt)) : (d(), f("circle", {
534
+ key: 1,
535
+ class: "g-progress__spinner",
536
+ cx: n.value + X / 2,
537
+ cy: n.value + X / 2,
538
+ r: n.value,
539
+ "stroke-width": X,
540
+ fill: "none"
541
+ }, null, 8, ht))
542
+ ], 10, bt))
543
+ ], 16));
544
+ }
545
+ }), kt = /* @__PURE__ */ R(yt, [["__scopeId", "data-v-7dccaf49"]]), wt = ["id", "aria-labelledby", "aria-describedby"], Ct = { class: "g-alertdialog-inner" }, $t = ["id"], xt = ["id"], _t = { class: "g-alertdialog-actions" }, Lt = /* @__PURE__ */ A({
546
+ __name: "GAlertDialog",
547
+ props: {
548
+ label: { default: "Confirmation" },
549
+ buttonText: { default: "Continue" },
550
+ buttonColor: { default: "primary" }
551
+ },
552
+ emits: ["cancel", "confirm"],
553
+ setup(e, { emit: l }) {
554
+ const t = e, n = l, o = M(null), a = M(!0), u = H(), { pop: c, push: r, isTop: v, zIndex: i } = me(u, !0, !0), { deactivate: p, activate: g } = ke(o, v);
555
+ function m() {
556
+ n("cancel");
557
+ }
558
+ return we([o], v, a, m, c), ue(() => {
559
+ r(), g();
560
+ }), ze(() => {
561
+ c(), p();
562
+ }), (C, $) => (d(), Z(Te, { to: "#modal-root" }, [
563
+ le(pe, {
564
+ name: "g-fade",
565
+ appear: ""
566
+ }, {
567
+ default: N(() => [
568
+ s("div", {
569
+ id: "alertdialog-" + b(u),
570
+ class: "g-alertdialog",
571
+ role: "alertdialog",
572
+ "aria-modal": "true",
573
+ "aria-labelledby": "alertdialog-label-" + b(u),
574
+ "aria-describedby": "alertdialog-description-" + b(u),
575
+ ref_key: "dialog",
576
+ ref: o,
577
+ style: ve({ zIndex: b(i) })
578
+ }, [
579
+ s("div", Ct, [
580
+ s("h2", {
581
+ id: "alertdialog-label-" + b(u),
582
+ class: "g-alertdialog-label"
583
+ }, x(t.label), 9, $t),
584
+ s("div", {
585
+ id: "alertdialog-description-" + b(u),
586
+ class: "g-alertdialog-content"
587
+ }, [
588
+ D(C.$slots, "default", {}, void 0, !0)
589
+ ], 8, xt),
590
+ s("div", _t, [
591
+ le(re, {
592
+ outlined: "",
593
+ onClick: $[0] || ($[0] = (S) => n("cancel"))
594
+ }, {
595
+ default: N(() => [...$[2] || ($[2] = [
596
+ G("Cancel", -1)
597
+ ])]),
598
+ _: 1
599
+ }),
600
+ le(re, {
601
+ theme: t.buttonColor,
602
+ onClick: $[1] || ($[1] = (S) => n("confirm"))
603
+ }, {
604
+ default: N(() => [
605
+ G(x(t.buttonText), 1)
606
+ ]),
607
+ _: 1
608
+ }, 8, ["theme"])
609
+ ])
610
+ ])
611
+ ], 12, wt)
612
+ ]),
613
+ _: 3
614
+ })
615
+ ]));
616
+ }
617
+ }), Ha = /* @__PURE__ */ R(Lt, [["__scopeId", "data-v-8bac6ffd"]]), St = ["id"], Mt = { class: "g-select-input-wrap" }, Bt = ["id"], It = ["value", "placeholder", "disabled", "aria-controls", "aria-expanded", "aria-activedescendant"], Et = ["id", "aria-controls", "aria-expanded", "aria-activedescendant"], zt = ["id"], Tt = ["id", "aria-selected", "onClick"], Vt = {
618
+ key: 1,
619
+ "aria-live": "polite",
620
+ class: "g-select-combo-option g-select-option g-select-no-results"
621
+ }, At = /* @__PURE__ */ A({
622
+ __name: "GSelect",
623
+ props: /* @__PURE__ */ F({
624
+ options: {},
625
+ label: {},
626
+ hiddenLabel: { type: Boolean },
627
+ placeholder: {},
628
+ disabled: { type: Boolean, default: !1 },
629
+ name: { default: void 0 },
630
+ searchable: { type: Boolean, default: !1 },
631
+ clearButton: { type: Boolean },
632
+ compact: { type: Boolean, default: !1 }
633
+ }, {
634
+ modelValue: {},
635
+ modelModifiers: {}
636
+ }),
637
+ emits: /* @__PURE__ */ F(["change"], ["update:modelValue"]),
638
+ setup(e, { emit: l }) {
639
+ const t = e, n = l, o = j(e, "modelValue"), a = H(), u = M(null), c = M(null), r = M(!1), v = M(0), i = M(!1), p = M(!1), { push: g, pop: m, isTop: C } = me(a), $ = M("below"), S = M(null), P = _(() => {
640
+ const y = {};
641
+ return S.value !== null && (y.maxHeight = `${S.value}px`), $.value === "above" ? (y.top = "auto", y.bottom = "100%") : (y.top = "100%", y.bottom = "auto"), y;
642
+ });
643
+ function Y() {
644
+ if (!r.value || !u.value)
645
+ return;
646
+ const y = u.value.getBoundingClientRect(), B = window.innerHeight - y.bottom, q = y.top, ie = c.value?.scrollHeight ?? 200, he = Math.min(200, ie), ye = 8;
647
+ if (B >= he) {
648
+ $.value = "below", S.value = Math.max(0, Math.floor(B - ye));
649
+ return;
650
+ }
651
+ if (B < he && q > B) {
652
+ $.value = "above", S.value = Math.max(0, Math.floor(q - ye));
653
+ return;
654
+ }
655
+ $.value = "below", S.value = Math.max(0, Math.floor(B - ye));
656
+ }
657
+ let U = null;
658
+ function L() {
659
+ if (U)
660
+ return;
661
+ const y = () => {
662
+ Y();
663
+ };
664
+ window.addEventListener("resize", y, { passive: !0 }), window.addEventListener("scroll", y, {
665
+ passive: !0,
666
+ capture: !0
667
+ }), U = () => {
668
+ window.removeEventListener("resize", y), window.removeEventListener("scroll", y, !0), U = null;
669
+ };
670
+ }
671
+ function O() {
672
+ U && U();
673
+ }
674
+ const I = _(() => t.options.map((y) => typeof y == "string" ? { label: y, value: y } : y)), k = M(""), w = _(() => {
675
+ if (!t.searchable || !r.value || !k.value)
676
+ return I.value;
677
+ const y = k.value.toLowerCase();
678
+ return I.value.filter(
679
+ (B) => B.label.toLowerCase().includes(y)
680
+ );
681
+ }), h = _(() => w.value.findIndex((y) => y.value === o.value));
682
+ J(
683
+ () => o.value,
684
+ (y) => {
685
+ const B = w.value.findIndex((q) => q.value === y);
686
+ B !== -1 && (v.value = B);
687
+ }
688
+ ), J(r, (y) => {
689
+ y ? g() : m();
690
+ }), J(r, (y) => {
691
+ y ? (L(), K(() => {
692
+ Y();
693
+ })) : (O(), $.value = "below", S.value = null);
694
+ });
695
+ function z() {
696
+ if (!t.disabled && (r.value = !0, K(() => {
697
+ Y();
698
+ }), t.searchable)) {
699
+ k.value = "";
700
+ const y = w.value.findIndex(
701
+ (B) => B.value === o.value
702
+ );
703
+ v.value = y !== -1 ? y : 0, K(() => {
704
+ oe.value && oe.value.focus();
705
+ });
706
+ }
707
+ }
708
+ function Q() {
709
+ r.value = !1, t.searchable && (k.value = "");
710
+ }
711
+ ce(() => {
712
+ O();
713
+ });
714
+ const oe = M(null);
715
+ function se(y) {
716
+ if (!t.disabled && t.searchable) {
717
+ if (p.value) {
718
+ p.value = !1;
719
+ return;
720
+ }
721
+ z();
722
+ }
723
+ }
724
+ function ee(y) {
725
+ if (!t.searchable) return;
726
+ r.value || z(), k.value = y.target.value;
727
+ const B = w.value.findIndex(
728
+ (q) => q.value === o.value
729
+ );
730
+ v.value = B !== -1 ? B : 0;
731
+ }
732
+ function ne(y) {
733
+ const B = y.relatedTarget;
734
+ if (i.value) {
735
+ i.value = !1;
736
+ return;
737
+ }
738
+ B && c.value && c.value.contains(B) || (t.searchable && (k.value = ""), Q());
739
+ }
740
+ function Ce(y) {
741
+ const B = w.value[y];
742
+ B && B.value !== o.value && (o.value = B.value, n("change", B.value)), p.value = !0, Q(), setTimeout(() => {
743
+ p.value = !1;
744
+ }, 100);
745
+ }
746
+ function De() {
747
+ t.disabled || (r.value ? Q() : z());
748
+ }
749
+ function $e(y) {
750
+ if (t.disabled)
751
+ return;
752
+ const B = w.value.length - 1;
753
+ if (!r.value && ["ArrowDown", "ArrowUp", "Enter", " "].includes(y.key)) {
754
+ y.preventDefault(), z();
755
+ return;
756
+ }
757
+ switch (y.key) {
758
+ case "ArrowDown":
759
+ y.preventDefault(), r.value ? (v.value = Math.min(B, v.value + 1), fe()) : z();
760
+ break;
761
+ case "ArrowUp":
762
+ y.preventDefault(), r.value ? (v.value = Math.max(0, v.value - 1), fe()) : z();
763
+ break;
764
+ case "Home":
765
+ y.preventDefault(), v.value = 0, fe();
766
+ break;
767
+ case "End":
768
+ y.preventDefault(), v.value = B, fe();
769
+ break;
770
+ case "Enter":
771
+ case " ":
772
+ y.preventDefault(), r.value ? Ce(v.value) : z();
773
+ break;
774
+ case "Escape":
775
+ C.value && (y.preventDefault(), setTimeout(() => {
776
+ Q();
777
+ }, 0));
778
+ break;
779
+ }
780
+ }
781
+ function Ge(y) {
782
+ Ce(y);
783
+ }
784
+ function Pe() {
785
+ i.value = !0;
786
+ }
787
+ function fe() {
788
+ K(() => {
789
+ const y = document.getElementById(
790
+ `${a}-option-${v.value}`
791
+ );
792
+ y && y.scrollIntoView({ block: "nearest" });
793
+ });
794
+ }
795
+ const xe = _(() => t.clearButton && o.value !== null && o.value !== void 0 && !t.disabled);
796
+ function _e() {
797
+ t.disabled || (o.value = null, n("change", null), t.searchable && (k.value = ""));
798
+ }
799
+ return ce(() => {
800
+ m();
801
+ }), (y, B) => (d(), f("div", {
802
+ class: T(["g-select-root g-select-combo", { "g-select-open": r.value, "g-select-compact": e.compact }])
803
+ }, [
804
+ e.hiddenLabel ? E("", !0) : (d(), f("div", {
805
+ key: 0,
806
+ id: b(a) + "-label",
807
+ class: "g-select-combo-label g-select-label"
808
+ }, x(t.label), 9, St)),
809
+ s("div", Mt, [
810
+ t.searchable ? (d(), f("div", {
811
+ key: 0,
812
+ class: "g-select-combo-input g-select-control",
813
+ id: b(a)
814
+ }, [
815
+ s("input", te(
816
+ {
817
+ ref_key: "comboRef",
818
+ ref: u,
819
+ type: "text",
820
+ name: "comboInput",
821
+ class: ["g-select-search-input", { "g-select-clearable": e.clearButton }],
822
+ value: r.value ? k.value : I.value[h.value] ? I.value[h.value].label : "",
823
+ placeholder: r.value ? "" : e.placeholder,
824
+ disabled: t.disabled,
825
+ onFocus: se,
826
+ onInput: ee,
827
+ onKeydown: $e,
828
+ onBlur: ne,
829
+ "aria-autocomplete": "list",
830
+ "aria-controls": b(a) + "-listbox",
831
+ "aria-expanded": r.value ? "true" : "false",
832
+ "aria-haspopup": "listbox",
833
+ "aria-activedescendant": r.value ? b(a) + "-option-" + v.value : void 0
834
+ },
835
+ e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": b(a) + "-label" },
836
+ {
837
+ role: "combobox",
838
+ autocomplete: "off"
839
+ }
840
+ ), null, 16, It),
841
+ xe.value ? (d(), f("button", {
842
+ key: 0,
843
+ type: "button",
844
+ class: "g-select-clear-btn",
845
+ onClick: _e
846
+ }, [...B[0] || (B[0] = [
847
+ s("svg", {
848
+ role: "img",
849
+ "aria-label": "Clear Selection",
850
+ xmlns: "http://www.w3.org/2000/svg",
851
+ viewBox: "0 0 51.26 51.26",
852
+ width: "1.125em"
853
+ }, [
854
+ s("path", {
855
+ fill: "currentColor",
856
+ d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
857
+ })
858
+ ], -1)
859
+ ])])) : E("", !0),
860
+ B[1] || (B[1] = s("svg", {
861
+ class: "g-select-caret",
862
+ xmlns: "http://www.w3.org/2000/svg",
863
+ viewBox: "0 0 51.26 51.26",
864
+ "aria-hidden": "true",
865
+ width: "1.125em"
866
+ }, [
867
+ s("path", {
868
+ fill: "currentColor",
869
+ d: "M38.75 24.13a1.36 1.36 0 0 1 0 2.36l-12.44 7.18-12.43 7.18a1.36 1.36 0 0 1-2.05-1.18V11a1.36 1.36 0 0 1 2.05-1.18L26.31 17Z"
870
+ })
871
+ ], -1))
872
+ ], 8, Bt)) : (d(), f("div", te(
873
+ {
874
+ key: 1,
875
+ ref_key: "comboRef",
876
+ ref: u,
877
+ id: b(a),
878
+ class: ["g-select-combo-button g-select-control", { "g-select-clearable": e.clearButton }],
879
+ role: "combobox",
880
+ "aria-controls": b(a) + "-listbox",
881
+ "aria-expanded": r.value ? "true" : "false",
882
+ "aria-haspopup": "listbox"
883
+ },
884
+ e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": b(a) + "-label" },
885
+ {
886
+ "aria-activedescendant": r.value ? b(a) + "-option-" + v.value : void 0,
887
+ tabindex: "0",
888
+ onClick: De,
889
+ onKeydown: $e,
890
+ onFocus: se,
891
+ onBlur: ne
892
+ }
893
+ ), [
894
+ G(x(I.value[h.value] ? I.value[h.value].label : "") + " ", 1),
895
+ xe.value ? (d(), f("button", {
896
+ key: 0,
897
+ type: "button",
898
+ class: "g-select-clear-btn",
899
+ onClick: ae(_e, ["stop"])
900
+ }, [...B[2] || (B[2] = [
901
+ s("svg", {
902
+ role: "img",
903
+ "aria-label": "Clear Selection",
904
+ xmlns: "http://www.w3.org/2000/svg",
905
+ viewBox: "0 0 51.26 51.26",
906
+ width: "1.125em"
907
+ }, [
908
+ s("path", {
909
+ fill: "currentColor",
910
+ d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
911
+ })
912
+ ], -1)
913
+ ])])) : E("", !0),
914
+ B[3] || (B[3] = s("svg", {
915
+ class: "g-select-caret",
916
+ xmlns: "http://www.w3.org/2000/svg",
917
+ viewBox: "0 0 51.26 51.26",
918
+ "aria-hidden": "true",
919
+ width: "1.125em"
920
+ }, [
921
+ s("path", {
922
+ fill: "currentColor",
923
+ d: "M38.75 24.13a1.36 1.36 0 0 1 0 2.36l-12.44 7.18-12.43 7.18a1.36 1.36 0 0 1-2.05-1.18V11a1.36 1.36 0 0 1 2.05-1.18L26.31 17Z"
924
+ })
925
+ ], -1))
926
+ ], 16, Et)),
927
+ be(s("div", te(
928
+ {
929
+ ref_key: "listboxRef",
930
+ ref: c,
931
+ class: ["g-select-combo-menu g-select-list", {
932
+ "g-select-combo-menu--above": $.value === "above"
933
+ }],
934
+ style: P.value,
935
+ role: "listbox",
936
+ id: b(a) + "-listbox"
937
+ },
938
+ e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": b(a) + "-label" },
939
+ { tabindex: "-1" }
940
+ ), [
941
+ w.value.length > 0 ? (d(!0), f(V, { key: 0 }, W(w.value, (q, ie) => (d(), f("div", {
942
+ key: q.value,
943
+ id: b(a) + "-option-" + ie,
944
+ class: T(["g-select-combo-option g-select-option", {
945
+ "g-select-option-current": ie === v.value,
946
+ "ilw-theme-blue": q.value === o.value
947
+ }]),
948
+ role: "option",
949
+ "aria-selected": q.value === o.value ? "true" : "false",
950
+ onMousedown: Pe,
951
+ onClick: (he) => Ge(ie)
952
+ }, [
953
+ D(y.$slots, "option", {
954
+ option: q,
955
+ selected: q.value === o.value,
956
+ index: ie
957
+ }, () => [
958
+ G(x(q.label), 1)
959
+ ], !0)
960
+ ], 42, Tt))), 128)) : (d(), f("div", Vt, " No results found. "))
961
+ ], 16, zt), [
962
+ [Fe, r.value]
963
+ ])
964
+ ])
965
+ ], 2));
966
+ }
967
+ }), Ot = /* @__PURE__ */ R(At, [["__scopeId", "data-v-bb47a549"]]), Dt = ["aria-label"], Gt = ["placeholder", "value", "aria-expanded", "aria-controls", "aria-activedescendant"], Pt = {
968
+ key: 0,
969
+ class: "g-search-dropdown"
970
+ }, Rt = {
971
+ "aria-live": "polite",
972
+ class: "g-search-result-count"
973
+ }, Ft = ["id"], Ht = ["aria-label"], Kt = { class: "g-search-group-label" }, Wt = ["id", "onMousedown", "aria-selected"], Nt = ["id", "onMousedown", "aria-selected"], Ka = /* @__PURE__ */ A({
974
+ __name: "GSearch",
975
+ props: /* @__PURE__ */ F({
976
+ results: {},
977
+ placeholder: { default: "Search..." },
978
+ label: { default: "Search" },
979
+ auto: { type: Boolean, default: !0 },
980
+ loading: { type: Boolean }
981
+ }, {
982
+ modelValue: { default: () => "" },
983
+ modelModifiers: {}
984
+ }),
985
+ emits: /* @__PURE__ */ F(["select", "submit"], ["update:modelValue"]),
986
+ setup(e, { emit: l }) {
987
+ const t = j(e, "modelValue"), n = e, o = l, a = M(null), u = M(null), c = M(!0), r = M(-1), v = _(() => Array.isArray(n.results) && n.results.length && "items" in n.results[0] ? n.results.flatMap((L) => L.items) : n.results), i = _(() => v.value.length);
988
+ function p(L) {
989
+ const O = L.target.value;
990
+ t.value = O, n.auto && O.length > 1 && (c.value = !1);
991
+ }
992
+ function g() {
993
+ K(() => {
994
+ const L = u.value?.querySelector('[aria-selected="true"]');
995
+ L && L.scrollIntoView({ block: "nearest" });
996
+ });
997
+ }
998
+ const { focused: m } = Ue(a);
999
+ function C(L) {
1000
+ const O = L.altKey;
1001
+ if (L.key === "ArrowDown") {
1002
+ if (!i.value)
1003
+ return;
1004
+ L.preventDefault(), c.value = !1, O || (r.value = (r.value + 1) % i.value, g());
1005
+ } else if (L.key === "ArrowUp") {
1006
+ if (!i.value)
1007
+ return;
1008
+ L.preventDefault(), c.value = !1, r.value = (r.value - 1 + i.value) % i.value, g();
1009
+ } else if (L.key === "Enter")
1010
+ c.value ? (o("submit", t.value), c.value = !1, L.preventDefault()) : $(v.value[r.value]);
1011
+ else if (L.key === "Escape") {
1012
+ if (!i.value)
1013
+ return;
1014
+ L.preventDefault(), P.value || (t.value = ""), c.value = !0, r.value = -1;
1015
+ }
1016
+ ["Backspace", "Delete", "Clear", "Undo"].includes(L.key) && (c.value = !0);
1017
+ }
1018
+ function $(L) {
1019
+ o("select", L), t.value = "", c.value = !0, r.value = -1;
1020
+ }
1021
+ const S = _(() => !!n.loading), P = _(() => m.value && !c.value), Y = qe(() => {
1022
+ o("submit", t.value);
1023
+ }, 300);
1024
+ J(
1025
+ () => t.value,
1026
+ (L) => {
1027
+ L ? n.auto && Y() : r.value = -1;
1028
+ }
1029
+ );
1030
+ const U = H();
1031
+ return (L, O) => (d(), f("div", {
1032
+ class: "g-search",
1033
+ role: "search",
1034
+ "aria-label": n.label
1035
+ }, [
1036
+ s("form", {
1037
+ class: "g-search-form",
1038
+ onSubmit: O[0] || (O[0] = ae((I) => $(null), ["prevent"]))
1039
+ }, [
1040
+ s("input", {
1041
+ ref_key: "inputRef",
1042
+ ref: a,
1043
+ class: "g-search-input",
1044
+ name: "search",
1045
+ type: "search",
1046
+ placeholder: n.placeholder,
1047
+ value: t.value,
1048
+ onInput: p,
1049
+ onKeydown: C,
1050
+ role: "combobox",
1051
+ "aria-expanded": P.value,
1052
+ "aria-autocomplete": "list",
1053
+ "aria-controls": `${b(U)}-list`,
1054
+ "aria-activedescendant": r.value >= 0 ? "g-search-option-" + v.value[r.value].id : void 0
1055
+ }, null, 40, Gt),
1056
+ s("button", {
1057
+ type: "submit",
1058
+ class: "g-search-submit",
1059
+ "aria-label": "Submit search",
1060
+ onKeydown: C
1061
+ }, [
1062
+ S.value ? (d(), Z(kt, {
1063
+ key: 0,
1064
+ size: "tiny"
1065
+ })) : E("", !0),
1066
+ O[1] || (O[1] = s("svg", {
1067
+ role: "img",
1068
+ "aria-label": "Search",
1069
+ xmlns: "http://www.w3.org/2000/svg",
1070
+ viewBox: "0 0 51.26 51.26"
1071
+ }, [
1072
+ s("path", {
1073
+ fill: "currentColor",
1074
+ d: "M30 9.76A14.05 14.05 0 1 0 28.3 31l11.3 13a3.34 3.34 0 0 0 4.72-4.72L31.44 27.86A14.05 14.05 0 0 0 30 9.76ZM27.27 27a10.26 10.26 0 1 1 0-14.5 10.25 10.25 0 0 1 0 14.5Z"
1075
+ })
1076
+ ], -1))
1077
+ ], 32)
1078
+ ], 32),
1079
+ P.value ? (d(), f("div", Pt, [
1080
+ s("div", Rt, [
1081
+ S.value ? E("", !0) : (d(), f(V, { key: 0 }, [
1082
+ G(x(i.value) + " result" + x(i.value === 1 ? "" : "s"), 1)
1083
+ ], 64))
1084
+ ]),
1085
+ s("div", {
1086
+ role: "listbox",
1087
+ id: `${b(U)}-list`,
1088
+ ref_key: "listboxRef",
1089
+ ref: u,
1090
+ "aria-label": "Search results"
1091
+ }, [
1092
+ i.value > 0 && "items" in n.results[0] ? (d(!0), f(V, { key: 0 }, W(n.results, (I, k) => (d(), f("div", {
1093
+ key: I.type,
1094
+ class: "g-search-group",
1095
+ role: "group",
1096
+ "aria-label": I.label
1097
+ }, [
1098
+ D(L.$slots, "group", { group: I }, () => [
1099
+ s("div", Kt, x(I.label), 1)
1100
+ ]),
1101
+ (d(!0), f(V, null, W(I.items, (w, h) => (d(), f("div", {
1102
+ key: w.id,
1103
+ id: "g-search-option-" + w.id,
1104
+ class: T(["g-search-option", {
1105
+ "g-search-option-active": v.value[r.value] && v.value[r.value].id === w.id
1106
+ }]),
1107
+ role: "option",
1108
+ onMousedown: ae((z) => $(w), ["prevent"]),
1109
+ "aria-selected": v.value[r.value] && v.value[r.value].id === w.id
1110
+ }, [
1111
+ D(L.$slots, "option", { option: w }, () => [
1112
+ G(x(w.title), 1)
1113
+ ])
1114
+ ], 42, Wt))), 128))
1115
+ ], 8, Ht))), 128)) : i.value > 0 ? (d(!0), f(V, { key: 1 }, W(v.value, (I, k) => (d(), f("div", {
1116
+ key: I.id,
1117
+ id: "g-search-option-" + I.id,
1118
+ class: T(["g-search-option", {
1119
+ "g-search-option-active": r.value === k
1120
+ }]),
1121
+ role: "option",
1122
+ onMousedown: ae((w) => $(I), ["prevent"]),
1123
+ "aria-selected": r.value === k
1124
+ }, [
1125
+ D(L.$slots, "option", { option: I }, () => [
1126
+ G(x(I.title), 1)
1127
+ ])
1128
+ ], 42, Nt))), 128)) : E("", !0)
1129
+ ], 8, Ft)
1130
+ ])) : E("", !0)
1131
+ ], 8, Dt));
1132
+ }
1133
+ }), Ut = {
1134
+ class: /* @__PURE__ */ T({
1135
+ "g-app-header": !0
1136
+ })
1137
+ }, qt = { class: "g-app-header__brand" }, Zt = {
1138
+ class: "g-app-header__brand-text",
1139
+ href: "/"
1140
+ }, jt = {
1141
+ key: 0,
1142
+ class: "g-app-header__block-i-container"
1143
+ }, Yt = { class: "g-app-header__title" }, Xt = { class: "g-app-header__app-controls-wrap" }, Jt = /* @__PURE__ */ A({
1144
+ __name: "GAppHeader",
1145
+ props: {
1146
+ illinois: { type: Boolean, default: !1 },
1147
+ brand: { default: "GRAD" }
1148
+ },
1149
+ setup(e) {
1150
+ return (l, t) => (d(), f("header", Ut, [
1151
+ t[1] || (t[1] = s("div", { class: "g-app-header__background" }, [
1152
+ s("div", { class: "g-app-header__background-pattern" }),
1153
+ s("div", { class: "g-app-header__background-gradient" })
1154
+ ], -1)),
1155
+ s("div", qt, [
1156
+ D(l.$slots, "left", {}, () => [
1157
+ s("a", Zt, x(e.brand), 1)
1158
+ ], !0)
1159
+ ]),
1160
+ e.illinois ? (d(), f("div", jt, [...t[0] || (t[0] = [
1161
+ s("svg", {
1162
+ class: "g-app-header__block-i",
1163
+ role: "img",
1164
+ width: "55",
1165
+ viewBox: "0 0 55 79",
1166
+ xmlns: "http://www.w3.org/2000/svg"
1167
+ }, [
1168
+ s("title", null, "Block I logo"),
1169
+ s("path", {
1170
+ class: "g-app-header__block-i-outline",
1171
+ d: "M54.2 21.1V0H0v21.1h12v36.1H0v21.1h54.2V57.2h-12V21.1z"
1172
+ }),
1173
+ s("path", {
1174
+ class: "g-app-header__block-i-fill",
1175
+ d: "M42.1 18.1h9V3H3v15h9c1.7 0 3 1.3 3 3v36.1c0 1.7-1.3 3-3 3H3v15h48.1v-15h-9c-1.7 0-3-1.3-3-3v-36c0-1.7 1.4-3 3-3z"
1176
+ })
1177
+ ], -1)
1178
+ ])])) : D(l.$slots, "icon", { key: 1 }, void 0, !0),
1179
+ s("div", Yt, [
1180
+ D(l.$slots, "title", {}, void 0, !0)
1181
+ ]),
1182
+ s("div", Xt, [
1183
+ D(l.$slots, "app-controls", { class: "g-app-header__app-controls" }, void 0, !0)
1184
+ ])
1185
+ ]));
1186
+ }
1187
+ }), Wa = /* @__PURE__ */ R(Jt, [["__scopeId", "data-v-5c3dd169"]]), Qt = ["id"], el = /* @__PURE__ */ A({
1188
+ __name: "GSidebar",
1189
+ props: {
1190
+ backgroundColor: { default: "" },
1191
+ backgroundImage: { default: "none" },
1192
+ theme: { default: "dark" },
1193
+ topOffset: { default: "" },
1194
+ topOffsetVar: { default: "" },
1195
+ width: { default: "300px" }
1196
+ },
1197
+ setup(e) {
1198
+ const l = e, t = Ve(
1199
+ "sidebar",
1200
+ // This isn't required, so the default value just avoids compiler warnings
1201
+ () => {
1202
+ },
1203
+ !0
1204
+ ), n = _(() => l.backgroundImage ? l.backgroundImage : l.theme === "light" ? "none" : "url('https://gradcdn.blob.core.windows.net/public/sidebar-bg2.jpg')"), o = _(() => l.backgroundColor ? l.backgroundColor : l.theme === "light" ? "#f9f9f9" : "#030913"), a = _(() => l.topOffsetVar ? `var(${l.topOffsetVar})` : l.topOffset ? l.topOffset : "var(--g-toolbar-height)"), u = H();
1205
+ function c(r) {
1206
+ r.key === "Escape" && t?.isCollapsible?.value && t?.open?.value && (t.open.value = !1, document.getElementById(`${t.id}-hamburger`)?.focus());
1207
+ }
1208
+ return (r, v) => (d(), f("div", {
1209
+ ref: "sidebar-ref",
1210
+ id: `${b(t)?.id ?? b(u)}-sidebar`,
1211
+ class: T(["g-sidebar", [
1212
+ `g-sidebar__${e.theme}`,
1213
+ {
1214
+ "g-sidebar--collapsible": b(t)?.isCollapsible?.value,
1215
+ "g-sidebar--closed": !b(t)?.open?.value && b(t)?.isCollapsible?.value,
1216
+ "g-sidebar--open": b(t)?.open?.value && b(t)?.isCollapsible?.value
1217
+ }
1218
+ ]]),
1219
+ style: ve({
1220
+ backgroundImage: n.value,
1221
+ backgroundColor: o.value,
1222
+ "--g-sidebar-top-offset": a.value,
1223
+ "--g-sidebar-width": e.width ?? "300px",
1224
+ width: "var(--g-sidebar-width)"
1225
+ }),
1226
+ onKeydown: c
1227
+ }, [
1228
+ D(r.$slots, "default", {}, void 0, !0)
1229
+ ], 46, Qt));
1230
+ }
1231
+ }), Na = /* @__PURE__ */ R(el, [["__scopeId", "data-v-859b6ad5"]]), tl = ["id"], ll = { class: "g-sidebar-menu__list" }, al = ["href", "aria-current", "onClick"], ol = /* @__PURE__ */ A({
1232
+ __name: "GSidebarMenu",
1233
+ props: /* @__PURE__ */ F({
1234
+ title: {},
1235
+ items: {},
1236
+ offset: { default: 70 },
1237
+ spy: { type: Boolean, default: !0 },
1238
+ theme: { default: "light" },
1239
+ compact: { type: Boolean, default: !1 }
1240
+ }, {
1241
+ modelValue: { default: null, type: String },
1242
+ modelModifiers: {}
1243
+ }),
1244
+ emits: ["update:modelValue"],
1245
+ setup(e) {
1246
+ const l = e, t = j(e, "modelValue"), n = _(() => l.spy && t.value ? "#" + t.value : null), o = ge("content");
1247
+ ue(() => {
1248
+ J(
1249
+ t,
1250
+ () => {
1251
+ K(() => {
1252
+ const v = o.value?.querySelector(
1253
+ ".g-sidebar-menu__is-active"
1254
+ );
1255
+ v && v.scrollIntoView({ block: "nearest" });
1256
+ });
1257
+ },
1258
+ { immediate: !0 }
1259
+ );
1260
+ });
1261
+ const a = He(), u = _(() => a?.appContext?.components?.RouterLink ?? null);
1262
+ function c(v, i) {
1263
+ if (!i.href || !i.href.startsWith("#"))
1264
+ return;
1265
+ const p = i.href.slice(1), g = document.getElementById(p)?.querySelector("h2, h3, h4, h5");
1266
+ g && (v.preventDefault(), g.setAttribute("tabindex", "-1"), g.focus(), g.scrollIntoView({ block: "start" }), history.replaceState(null, "", i.href));
1267
+ }
1268
+ const r = H();
1269
+ return (v, i) => (d(), f("nav", te({
1270
+ class: ["g-sidebar-menu", [
1271
+ `g-sidebar-menu__${l.theme}`,
1272
+ { "g-sidebar-menu--compact": l.compact }
1273
+ ]]
1274
+ }, {
1275
+ "aria-labelledby": e.title ? b(r) : void 0,
1276
+ "aria-label": e.title ? void 0 : "Sidebar Menu"
1277
+ }), [
1278
+ e.title ? (d(), f("h2", {
1279
+ key: 0,
1280
+ id: b(r),
1281
+ class: "g-sidebar-menu__title"
1282
+ }, x(e.title), 9, tl)) : E("", !0),
1283
+ i[0] || (i[0] = s("div", { class: "g-sidebar-menu__divider" }, null, -1)),
1284
+ s("div", {
1285
+ class: "g-sidebar-menu__content",
1286
+ ref_key: "content",
1287
+ ref: o
1288
+ }, [
1289
+ s("ul", ll, [
1290
+ (d(!0), f(V, null, W(e.items, (p) => (d(), f("li", {
1291
+ key: p.href || p.to,
1292
+ class: "g-sidebar-menu__item",
1293
+ ref_for: !0,
1294
+ ref: "listItems"
1295
+ }, [
1296
+ p.to && u.value ? (d(), Z(de(u.value), {
1297
+ key: 0,
1298
+ class: "g-sidebar-menu__link",
1299
+ to: p.to
1300
+ }, {
1301
+ default: N(() => [
1302
+ G(x(p.label), 1)
1303
+ ]),
1304
+ _: 2
1305
+ }, 1032, ["to"])) : (d(), f("a", {
1306
+ key: 1,
1307
+ class: T(["g-sidebar-menu__link", {
1308
+ "g-sidebar-menu__is-active": n.value === (p.href || "")
1309
+ }]),
1310
+ href: p.href || p.to || "#",
1311
+ "aria-current": n.value === (p.href || "") ? "location" : void 0,
1312
+ onClick: (g) => c(g, p)
1313
+ }, x(p.label), 11, al))
1314
+ ]))), 128))
1315
+ ])
1316
+ ], 512)
1317
+ ], 16));
1318
+ }
1319
+ }), Ua = /* @__PURE__ */ R(ol, [["__scopeId", "data-v-26c98caa"]]);
1320
+ let sl = 1;
1321
+ function nl(e, l) {
1322
+ const t = document.createElement("div");
1323
+ return t.className = "v-gtooltip", t.textContent = e, t.setAttribute("role", "tooltip"), t.setAttribute("id", l), t;
1324
+ }
1325
+ function Ee(e, l) {
1326
+ const t = e.getBoundingClientRect(), n = l.getBoundingClientRect(), o = new DOMRect(window.scrollX, window.scrollY, window.innerWidth, window.innerHeight), { top: a, left: u, placedAbove: c } = Oe(t, n, o, {
1327
+ gap: 8,
1328
+ margin: 8,
1329
+ preferAbove: !0
1330
+ }), i = (t.left + t.width / 2 - u) / n.width * 100;
1331
+ l.style.setProperty("--v-gtooltip-arrow-x", `${i}%`), l.classList.remove("v-gtooltip-bottom"), c || l.classList.add("v-gtooltip-bottom"), l.style.left = `${u}px`, l.style.top = `${a}px`, l.style.opacity = "1";
1332
+ }
1333
+ function il(e) {
1334
+ e.style.opacity = "0";
1335
+ }
1336
+ const rl = {
1337
+ mounted(e, l) {
1338
+ const t = M(null), n = M(!1), o = M(!1), a = M(l.value);
1339
+ let u = null, c;
1340
+ e.getAttribute("aria-describedby") ? c = e.getAttribute("aria-describedby") : (c = `v-gtooltip-${++sl}`, e.setAttribute("aria-describedby", c));
1341
+ const r = () => {
1342
+ t.value || (t.value = nl(a.value, c), e.parentNode ? e.parentNode.insertBefore(t.value, e.nextSibling) : document.body.appendChild(t.value), u = new ResizeObserver(() => {
1343
+ t.value && (n.value || o.value) && Ee(e, t.value);
1344
+ }), u.observe(t.value));
1345
+ };
1346
+ Me(() => {
1347
+ t.value && (t.value.textContent = a.value);
1348
+ }), Me(() => {
1349
+ n.value || o.value ? (r(), t.value && Ee(e, t.value)) : t.value && (il(t.value), setTimeout(() => {
1350
+ e.dispatchEvent(new CustomEvent("tooltip-hide"));
1351
+ }, 150));
1352
+ });
1353
+ const v = () => {
1354
+ n.value = !0;
1355
+ }, i = () => {
1356
+ n.value = !1;
1357
+ }, p = () => {
1358
+ o.value = !0;
1359
+ }, g = () => {
1360
+ o.value = !1;
1361
+ }, m = (C) => {
1362
+ (C.key === "Escape" || C.key === "Esc") && (n.value = !1, o.value = !1);
1363
+ };
1364
+ e.addEventListener("mouseenter", v), e.addEventListener("mouseleave", i), e.addEventListener("focus", p), e.addEventListener("blur", g), e.addEventListener("keydown", m), r(), e._v_gtooltip = {
1365
+ onMouseEnter: v,
1366
+ onMouseLeave: i,
1367
+ onFocus: p,
1368
+ onBlur: g,
1369
+ onKeyDown: m,
1370
+ tooltip: t,
1371
+ tooltipText: a,
1372
+ isHovered: n,
1373
+ isFocused: o,
1374
+ resizeObserver: u,
1375
+ tooltipId: c
1376
+ };
1377
+ },
1378
+ updated(e, l) {
1379
+ const t = e._v_gtooltip;
1380
+ t && t.tooltipText && (t.tooltipText.value = l.value);
1381
+ },
1382
+ unmounted(e) {
1383
+ const l = e._v_gtooltip;
1384
+ l && l.tooltip && l.tooltip.value && (l.resizeObserver && l.resizeObserver.disconnect(), l.tooltip.value.remove(), l.tooltip.value = null), e.removeEventListener("mouseenter", l.onMouseEnter), e.removeEventListener("mouseleave", l.onMouseLeave), e.removeEventListener("focus", l.onFocus), e.removeEventListener("blur", l.onBlur), e.removeEventListener("keydown", l.onKeyDown), e.removeAttribute("aria-describedby");
1385
+ }
1386
+ }, ul = { class: "g-clipboard-text" }, dl = /* @__PURE__ */ A({
1387
+ __name: "GClipboard",
1388
+ props: {
1389
+ text: {},
1390
+ hideText: { type: Boolean }
1391
+ },
1392
+ setup(e) {
1393
+ const l = e, t = rl, { text: n, copy: o, copied: a, isSupported: u } = Ze({
1394
+ source: l.text
1395
+ }), c = M("Copy to clipboard"), r = () => {
1396
+ u.value ? (o(), c.value = "Copied") : c.value = "Copy not supported";
1397
+ }, v = () => {
1398
+ c.value = "Copy to clipboard";
1399
+ };
1400
+ return (i, p) => (d(), f("div", ul, [
1401
+ e.hideText ? E("", !0) : (d(), f(V, { key: 0 }, [
1402
+ G(x(l.text), 1)
1403
+ ], 64)),
1404
+ be((d(), f("button", {
1405
+ type: "button",
1406
+ "aria-label": "Copy",
1407
+ onClick: r,
1408
+ onTooltipHide: v,
1409
+ class: "g-clipboard-text-button"
1410
+ }, [...p[0] || (p[0] = [
1411
+ s("svg", {
1412
+ class: "g-clipboard-svg",
1413
+ xmlns: "http://www.w3.org/2000/svg",
1414
+ viewBox: "0 0 640 640",
1415
+ height: "1.125rem"
1416
+ }, [
1417
+ s("path", {
1418
+ fill: "currentColor",
1419
+ d: "M480 400L288 400C279.2 400 272 392.8 272 384L272 128C272 119.2 279.2 112 288 112L421.5 112C425.7 112 429.8 113.7 432.8 116.7L491.3 175.2C494.3 178.2 496 182.3 496 186.5L496 384C496 392.8 488.8 400 480 400zM288 448L480 448C515.3 448 544 419.3 544 384L544 186.5C544 169.5 537.3 153.2 525.3 141.2L466.7 82.7C454.7 70.7 438.5 64 421.5 64L288 64C252.7 64 224 92.7 224 128L224 384C224 419.3 252.7 448 288 448zM160 192C124.7 192 96 220.7 96 256L96 512C96 547.3 124.7 576 160 576L352 576C387.3 576 416 547.3 416 512L416 496L368 496L368 512C368 520.8 360.8 528 352 528L160 528C151.2 528 144 520.8 144 512L144 256C144 247.2 151.2 240 160 240L176 240L176 192L160 192z"
1420
+ })
1421
+ ], -1)
1422
+ ])], 32)), [
1423
+ [b(t), c.value]
1424
+ ])
1425
+ ]));
1426
+ }
1427
+ }), qa = /* @__PURE__ */ R(dl, [["__scopeId", "data-v-4c002962"]]), cl = { class: "g-history-scroller-wrapper" }, vl = {
1428
+ key: 0,
1429
+ class: "g-history-shadow g-history-shadow--top",
1430
+ "aria-hidden": "true"
1431
+ }, fl = {
1432
+ key: 1,
1433
+ class: "g-history-shadow g-history-shadow--bottom",
1434
+ "aria-hidden": "true"
1435
+ }, gl = ["role", "aria-label"], bl = /* @__PURE__ */ A({
1436
+ __name: "GHistoryScroller",
1437
+ props: {
1438
+ label: {},
1439
+ entries: { default: () => [] }
1440
+ },
1441
+ setup(e) {
1442
+ const l = e, t = M(null), n = M(null), o = M(!0), a = M(!0);
1443
+ async function u({ focusLast: v = !1 } = {}) {
1444
+ if (t.value && (t.value.scrollTop = t.value.scrollHeight), v && n.value) {
1445
+ const i = n.value.querySelectorAll(".g-history-entry");
1446
+ if (i.length > 0) {
1447
+ const p = i[i.length - 1];
1448
+ await K(), p.focus();
1449
+ }
1450
+ }
1451
+ }
1452
+ function c() {
1453
+ if (!t.value) return;
1454
+ const { scrollTop: v, scrollHeight: i, clientHeight: p } = t.value;
1455
+ o.value = v + p >= i - 2, a.value = v <= 2;
1456
+ }
1457
+ ue(() => {
1458
+ K(u);
1459
+ }), Ie(t, () => {
1460
+ o.value && u();
1461
+ }), Ie(n, () => {
1462
+ o.value && u();
1463
+ }), J(
1464
+ () => l.entries,
1465
+ async () => {
1466
+ o.value && (await K(), u());
1467
+ }
1468
+ );
1469
+ const r = _(() => [...l.entries].reverse());
1470
+ return (v, i) => (d(), f("div", cl, [
1471
+ a.value ? E("", !0) : (d(), f("div", vl)),
1472
+ o.value ? E("", !0) : (d(), f("div", fl)),
1473
+ s("div", {
1474
+ ref_key: "scrollerRef",
1475
+ ref: t,
1476
+ class: "g-history-scroller",
1477
+ role: e.label ? "log" : void 0,
1478
+ "aria-label": e.label,
1479
+ onScroll: c
1480
+ }, [
1481
+ le(re, {
1482
+ class: T(["g-scroll-to-bottom-btn", { "scroll-to-bottom-btn--hidden": o.value }]),
1483
+ size: "small",
1484
+ type: "button",
1485
+ onClick: i[0] || (i[0] = () => u({ focusLast: !0 })),
1486
+ "aria-label": "Jump to Latest"
1487
+ }, {
1488
+ default: N(() => [...i[1] || (i[1] = [
1489
+ s("svg", {
1490
+ "aria-hidden": "true",
1491
+ xmlns: "http://www.w3.org/2000/svg",
1492
+ viewBox: "0 0 640 640",
1493
+ height: "1.25rem"
1494
+ }, [
1495
+ s("path", {
1496
+ fill: "currentColor",
1497
+ d: "M303.5 569C312.9 578.4 328.1 578.4 337.4 569L505.4 401C514.8 391.6 514.8 376.4 505.4 367.1C496 357.8 480.8 357.7 471.5 367.1L344.5 494.1L344.5 88C344.5 74.7 333.8 64 320.5 64C307.2 64 296.5 74.7 296.5 88L296.5 494.1L169.5 367.1C160.1 357.7 144.9 357.7 135.6 367.1C126.3 376.5 126.2 391.7 135.6 401L303.6 569z"
1498
+ })
1499
+ ], -1)
1500
+ ])]),
1501
+ _: 1
1502
+ }, 8, ["class"]),
1503
+ s("div", {
1504
+ role: "list",
1505
+ ref_key: "contentRef",
1506
+ ref: n,
1507
+ class: "g-history-list"
1508
+ }, [
1509
+ (d(!0), f(V, null, W(r.value, (p) => (d(), f("div", {
1510
+ role: "listitem",
1511
+ key: p.id,
1512
+ class: "g-history-entry",
1513
+ tabindex: "-1"
1514
+ }, [
1515
+ D(v.$slots, "default", { entry: p }, void 0, !0)
1516
+ ]))), 128))
1517
+ ], 512)
1518
+ ], 40, gl)
1519
+ ]));
1520
+ }
1521
+ }), Za = /* @__PURE__ */ R(bl, [["__scopeId", "data-v-fa53fd7c"]]), pl = { class: "g-three-way-toggle-wrapper" }, ml = { class: "g-three-way-toggle-control" }, hl = ["id"], yl = ["aria-labelledby", "aria-describedby", "disabled", "aria-invalid", "aria-errormessage"], kl = { key: 0 }, wl = { key: 1 }, Cl = { key: 2 }, $l = ["for"], xl = ["id", "name", "checked", "disabled"], _l = ["for"], Ll = ["id", "name", "checked", "disabled"], Sl = ["for"], Ml = ["id", "name", "checked", "disabled"], Bl = ["id"], Il = /* @__PURE__ */ A({
1522
+ __name: "GThreeWayToggle",
1523
+ props: /* @__PURE__ */ F({
1524
+ label: {},
1525
+ describedby: {},
1526
+ error: {},
1527
+ disabled: { type: Boolean }
1528
+ }, {
1529
+ modelValue: { type: [Boolean, null], default: () => null },
1530
+ modelModifiers: {}
1531
+ }),
1532
+ emits: /* @__PURE__ */ F(["change"], ["update:modelValue"]),
1533
+ setup(e, { emit: l }) {
1534
+ const t = e, n = j(e, "modelValue"), o = l;
1535
+ function a($) {
1536
+ const S = n.value;
1537
+ n.value = $, $ !== S && o("change", {
1538
+ was: S,
1539
+ to: $
1540
+ });
1541
+ }
1542
+ function u($) {
1543
+ t.disabled || (n.value === $ ? a(null) : a($));
1544
+ }
1545
+ function c($) {
1546
+ t.disabled || n.value === $ && a(null);
1547
+ }
1548
+ const r = H(), v = _(() => `g-three-way-toggle-${r}`), i = H(), p = H(), g = H(), m = _(() => n.value === !1 ? "g-left" : n.value === !0 ? "g-right" : "g-center");
1549
+ function C($) {
1550
+ t.disabled || ($.key === "n" || $.key === "N" ? (a(!1), $.preventDefault()) : ($.key === "y" || $.key === "Y") && (a(!0), $.preventDefault()));
1551
+ }
1552
+ return ($, S) => (d(), f("div", pl, [
1553
+ s("div", ml, [
1554
+ s("span", {
1555
+ class: "g-label",
1556
+ id: b(r)
1557
+ }, x(e.label), 9, hl),
1558
+ s("fieldset", {
1559
+ class: T(["g-three-way-toggle", { "g-has-error": e.error }]),
1560
+ role: "radiogroup",
1561
+ "aria-labelledby": b(r),
1562
+ "aria-describedby": e.describedby,
1563
+ disabled: e.disabled,
1564
+ "aria-invalid": e.error ? "true" : void 0,
1565
+ "aria-errormessage": e.error ? b(r) + "-error" : void 0
1566
+ }, [
1567
+ s("div", {
1568
+ class: T(["g-toggle-track", [m.value, { "g-disabled": e.disabled }]])
1569
+ }, [
1570
+ s("span", {
1571
+ class: T(["g-toggle-thumb", m.value]),
1572
+ "aria-hidden": "true"
1573
+ }, [
1574
+ n.value === !1 ? (d(), f("span", kl, "NO")) : n.value === !0 ? (d(), f("span", wl, "YES")) : (d(), f("span", Cl))
1575
+ ], 2),
1576
+ s("label", {
1577
+ for: b(i),
1578
+ class: "g-toggle-option g-left",
1579
+ onClick: S[1] || (S[1] = (P) => c(!1)),
1580
+ onKeydown: C
1581
+ }, [
1582
+ s("input", {
1583
+ type: "radio",
1584
+ id: b(i),
1585
+ name: v.value,
1586
+ checked: n.value === !1,
1587
+ value: "false",
1588
+ disabled: e.disabled,
1589
+ onChange: S[0] || (S[0] = (P) => u(!1))
1590
+ }, null, 40, xl),
1591
+ S[5] || (S[5] = s("span", { class: "ilw-sr-only" }, "No", -1))
1592
+ ], 40, $l),
1593
+ s("label", {
1594
+ for: b(p),
1595
+ class: "g-toggle-option g-center",
1596
+ onKeydown: C
1597
+ }, [
1598
+ s("input", {
1599
+ type: "radio",
1600
+ id: b(p),
1601
+ name: v.value,
1602
+ checked: n.value === null,
1603
+ disabled: e.disabled,
1604
+ onChange: S[2] || (S[2] = (P) => u(null))
1605
+ }, null, 40, Ll),
1606
+ S[6] || (S[6] = s("span", { class: "ilw-sr-only" }, "Unset", -1))
1607
+ ], 40, _l),
1608
+ s("label", {
1609
+ for: b(g),
1610
+ class: "g-toggle-option g-right",
1611
+ onClick: S[4] || (S[4] = (P) => c(!0)),
1612
+ onKeydown: C
1613
+ }, [
1614
+ s("input", {
1615
+ type: "radio",
1616
+ id: b(g),
1617
+ name: v.value,
1618
+ value: "true",
1619
+ checked: n.value === !0,
1620
+ disabled: e.disabled,
1621
+ onChange: S[3] || (S[3] = (P) => u(!0))
1622
+ }, null, 40, Ml),
1623
+ S[7] || (S[7] = s("span", { class: "ilw-sr-only" }, "Yes", -1))
1624
+ ], 40, Sl)
1625
+ ], 2)
1626
+ ], 10, yl)
1627
+ ]),
1628
+ e.error ? (d(), f("div", {
1629
+ key: 0,
1630
+ id: `${b(r)}-error`,
1631
+ class: "g-form-error",
1632
+ role: "alert",
1633
+ "aria-atomic": "true"
1634
+ }, x(e.error), 9, Bl)) : E("", !0)
1635
+ ]));
1636
+ }
1637
+ }), ja = /* @__PURE__ */ R(Il, [["__scopeId", "data-v-e368978a"]]), El = { class: "efficient-table-body" }, zl = ["aria-rowindex"], Tl = {
1638
+ key: 0,
1639
+ class: "table-group-checkbox"
1640
+ }, Vl = ["colspan"], Al = ["aria-rowindex", "onMousedown", "onClick"], Ol = ["checked", "onClick", "aria-label"], Dl = ["aria-rowindex", "onMousedown", "onClick"], Gl = ["checked", "onClick", "aria-label"], Pl = /* @__PURE__ */ A({
1641
+ __name: "GTableBody",
1642
+ props: {
1643
+ data: {},
1644
+ groupBy: {},
1645
+ columns: {},
1646
+ groupRender: { type: Function },
1647
+ rowClickable: { type: Boolean },
1648
+ rowClass: { type: Function },
1649
+ startIndex: {},
1650
+ bulkSelectionEnabled: { type: Boolean },
1651
+ selectedRows: {}
1652
+ },
1653
+ emits: ["row-click", "toggle-row"],
1654
+ setup(e, { emit: l }) {
1655
+ const t = e, n = l;
1656
+ function o(r, v) {
1657
+ t.bulkSelectionEnabled && r.shiftKey && !r.target.closest("a,button,[tabindex],input") && r.preventDefault();
1658
+ }
1659
+ function a(r, v) {
1660
+ if (!t.rowClickable && !t.bulkSelectionEnabled || r.target.closest("a,button,[tabindex],input"))
1661
+ return;
1662
+ const i = r.target.closest(
1663
+ "tr"
1664
+ );
1665
+ if (i) {
1666
+ if (t.bulkSelectionEnabled)
1667
+ i.querySelector(
1668
+ "input[type=checkbox]"
1669
+ ) && c(v, r.shiftKey);
1670
+ else if (t.rowClickable) {
1671
+ const g = i.querySelector("a[href]")?.getAttribute("href");
1672
+ g && n("row-click", g);
1673
+ }
1674
+ }
1675
+ }
1676
+ function u(r) {
1677
+ return t.selectedRows?.includes(r) ?? !1;
1678
+ }
1679
+ function c(r, v = !1) {
1680
+ n("toggle-row", r, v);
1681
+ }
1682
+ return (r, v) => (d(), f("tbody", El, [
1683
+ e.groupBy ? (d(!0), f(V, { key: 0 }, W(e.data, (i, p) => (d(), f(V, {
1684
+ key: i.key
1685
+ }, [
1686
+ p === 0 || i[e.groupBy] !== e.data[p - 1][e.groupBy] ? (d(), f("tr", {
1687
+ key: 0,
1688
+ "aria-rowindex": e.startIndex + p + 2
1689
+ }, [
1690
+ e.bulkSelectionEnabled ? (d(), f("td", Tl)) : E("", !0),
1691
+ s("td", {
1692
+ colspan: e.columns.length,
1693
+ class: "table-group-row"
1694
+ }, [
1695
+ e.groupRender ? (d(), Z(de(e.groupRender(i[e.groupBy], i)), { key: 0 })) : (d(), f(V, { key: 1 }, [
1696
+ G(x(i[e.groupBy]), 1)
1697
+ ], 64))
1698
+ ], 8, Vl)
1699
+ ], 8, zl)) : E("", !0),
1700
+ s("tr", {
1701
+ class: T([
1702
+ "efficient-table-row",
1703
+ {
1704
+ "row-striped": p % 2 === 1,
1705
+ "row-clickable": e.rowClickable || e.bulkSelectionEnabled
1706
+ },
1707
+ e.rowClass ? e.rowClass(i) : void 0
1708
+ ]),
1709
+ "aria-rowindex": e.startIndex + p + 2,
1710
+ onMousedown: (g) => o(g, i.key),
1711
+ onClick: (g) => a(g, i.key)
1712
+ }, [
1713
+ e.bulkSelectionEnabled ? (d(), f("td", {
1714
+ key: 0,
1715
+ class: "td-checkbox",
1716
+ onClick: v[0] || (v[0] = ae(() => {
1717
+ }, ["stop"]))
1718
+ }, [
1719
+ s("input", {
1720
+ type: "checkbox",
1721
+ checked: u(i.key),
1722
+ onClick: (g) => c(i.key, g.shiftKey),
1723
+ "aria-label": `Select row ${i.key}`,
1724
+ class: "g-bulk-select-checkbox"
1725
+ }, null, 8, Ol)
1726
+ ])) : E("", !0),
1727
+ (d(!0), f(V, null, W(e.columns, (g) => (d(), f("td", {
1728
+ key: g.key,
1729
+ class: T(
1730
+ typeof g.tdClass == "function" ? g.tdClass(i) : g.tdClass
1731
+ )
1732
+ }, [
1733
+ g.display ? (d(), Z(de(g.display(i)), { key: 0 })) : (d(), f(V, { key: 1 }, [
1734
+ G(x(i[g.key]), 1)
1735
+ ], 64))
1736
+ ], 2))), 128))
1737
+ ], 42, Al)
1738
+ ], 64))), 128)) : (d(!0), f(V, { key: 1 }, W(e.data, (i, p) => (d(), f("tr", {
1739
+ key: i.key,
1740
+ class: T([
1741
+ "efficient-table-row",
1742
+ {
1743
+ "row-striped": p % 2 === 1,
1744
+ "row-clickable": e.rowClickable || e.bulkSelectionEnabled
1745
+ },
1746
+ e.rowClass ? e.rowClass(i) : void 0
1747
+ ]),
1748
+ "aria-rowindex": e.startIndex + p + 2,
1749
+ onMousedown: (g) => o(g, i.key),
1750
+ onClick: (g) => a(g, i.key)
1751
+ }, [
1752
+ e.bulkSelectionEnabled ? (d(), f("td", {
1753
+ key: 0,
1754
+ class: "td-checkbox",
1755
+ onClick: v[1] || (v[1] = ae(() => {
1756
+ }, ["stop"]))
1757
+ }, [
1758
+ s("input", {
1759
+ type: "checkbox",
1760
+ checked: u(i.key),
1761
+ onClick: (g) => c(i.key, g.shiftKey),
1762
+ "aria-label": `Select row ${i.key}`,
1763
+ class: "g-bulk-select-checkbox"
1764
+ }, null, 8, Gl)
1765
+ ])) : E("", !0),
1766
+ (d(!0), f(V, null, W(e.columns, (g) => (d(), f("td", {
1767
+ key: g.key,
1768
+ class: T(
1769
+ typeof g.tdClass == "function" ? g.tdClass(i) : g.tdClass
1770
+ )
1771
+ }, [
1772
+ g.display ? (d(), Z(de(g.display(i)), { key: 0 })) : (d(), f(V, { key: 1 }, [
1773
+ G(x(i[g.key]), 1)
1774
+ ], 64))
1775
+ ], 2))), 128))
1776
+ ], 42, Dl))), 128))
1777
+ ]));
1778
+ }
1779
+ }), Rl = { class: "g-table-outer-wrap" }, Fl = { class: "g-table-controls" }, Hl = { class: "g-clear-filters-wrap" }, Kl = { class: "pagination" }, Wl = { class: "g-result-count" }, Nl = ["aria-label", "aria-rowcount"], Ul = { class: "g-table-head" }, ql = { "aria-rowindex": "1" }, Zl = {
1780
+ key: 0,
1781
+ scope: "col",
1782
+ class: "g-th g-th-checkbox"
1783
+ }, jl = ["checked", "indeterminate", "aria-label"], Yl = ["aria-sort"], Xl = { class: "th-inner" }, Jl = ["onClick"], Ql = {
1784
+ key: 0,
1785
+ class: "sort-indicator"
1786
+ }, ea = ["aria-label"], ta = {
1787
+ key: 1,
1788
+ class: "g-column-head"
1789
+ }, la = ["onClick", "aria-label"], aa = { key: 1 }, oa = { class: "g-filter-toggle" }, sa = ["onUpdate:modelValue", "id", "aria-describedby"], na = ["for"], ia = ["id"], ra = {
1790
+ key: 2,
1791
+ class: "g-multi-select"
1792
+ }, ua = ["onUpdate:modelValue", "id", "value"], da = ["for"], ca = {
1793
+ key: 0,
1794
+ class: "g-bulk-actions-toolbar"
1795
+ }, va = { class: "g-selected-count" }, fa = { class: "g-bulk-actions" }, ga = /* @__PURE__ */ A({
1796
+ __name: "GTable",
1797
+ props: /* @__PURE__ */ F({
1798
+ label: {},
1799
+ data: {},
1800
+ columns: {},
1801
+ resultCount: {},
1802
+ groupBy: {},
1803
+ filtering: {},
1804
+ groupRender: {},
1805
+ rowClickable: { type: Boolean },
1806
+ rowClass: {},
1807
+ startIndex: {},
1808
+ bulkSelectionEnabled: { type: Boolean, default: !1 },
1809
+ bulkActions: { default: () => [] }
1810
+ }, {
1811
+ sortField: {},
1812
+ sortFieldModifiers: {},
1813
+ sortOrder: {},
1814
+ sortOrderModifiers: {},
1815
+ filter: {
1816
+ required: !0
1817
+ },
1818
+ filterModifiers: {},
1819
+ selectedRows: {
1820
+ default: () => []
1821
+ },
1822
+ selectedRowsModifiers: {}
1823
+ }),
1824
+ emits: /* @__PURE__ */ F(["row-click", "bulk-action"], ["update:sortField", "update:sortOrder", "update:filter", "update:selectedRows"]),
1825
+ setup(e, { emit: l }) {
1826
+ const t = j(e, "sortField"), n = j(e, "sortOrder"), o = j(e, "filter"), a = j(e, "selectedRows"), u = e, c = l;
1827
+ function r(k) {
1828
+ k.sortable && (t.value === k.key ? n.value === 1 ? n.value = -1 : n.value === -1 && (t.value = void 0, n.value = 1) : (t.value = k.key, n.value = 1));
1829
+ }
1830
+ const { filters: v, filteredColumns: i, isFiltered: p, clearFilters: g } = u.filtering, m = _(() => u.data.map((k) => k.key)), C = _(() => a.value.filter((k) => m.value.includes(k))), $ = _(() => !u.bulkSelectionEnabled || u.data.length === 0 ? !1 : C.value.length === m.value.length), S = _(() => !u.bulkSelectionEnabled || u.data.length === 0 ? !1 : C.value.length > 0 && C.value.length < m.value.length), P = M(null);
1831
+ function Y() {
1832
+ if ($.value)
1833
+ a.value = a.value.filter(
1834
+ (k) => !m.value.includes(k)
1835
+ );
1836
+ else {
1837
+ const k = new Set(a.value);
1838
+ m.value.forEach((w) => k.add(w)), a.value = Array.from(k);
1839
+ }
1840
+ }
1841
+ function U(k, w = !1) {
1842
+ if (w && P.value) {
1843
+ const h = m.value.indexOf(P.value), z = m.value.indexOf(k);
1844
+ if (h !== -1 && z !== -1) {
1845
+ const Q = Math.min(h, z), oe = Math.max(h, z), se = m.value.slice(Q, oe + 1), ee = new Set(a.value);
1846
+ se.forEach((ne) => ee.add(ne)), a.value = Array.from(ee);
1847
+ }
1848
+ } else
1849
+ a.value.includes(k) ? a.value = a.value.filter((h) => h !== k) : a.value = [...a.value, k];
1850
+ P.value = k;
1851
+ }
1852
+ function L(k) {
1853
+ c("row-click", k);
1854
+ }
1855
+ function O(k) {
1856
+ c("bulk-action", k, a.value);
1857
+ }
1858
+ const I = H();
1859
+ return ue(() => {
1860
+ u.rowClickable && u.bulkSelectionEnabled && console.warn(
1861
+ "GTable: rowClickable and bulkSelectionEnabled cannot be used together. rowClickable will be ignored."
1862
+ );
1863
+ for (const k of u.columns)
1864
+ if (k.filter && k.filter.type === "multi-select" && !Array.isArray(o.value[k.key])) {
1865
+ let w = o.value[k.key];
1866
+ o.value[k.key] = w ? [w] : [];
1867
+ }
1868
+ }), J(
1869
+ () => u.columns,
1870
+ (k) => {
1871
+ for (const w of k)
1872
+ if (w.filter && w.filter.type === "multi-select" && !Array.isArray(o.value[w.key])) {
1873
+ let h = o.value[w.key];
1874
+ o.value[w.key] = h ? [h] : [];
1875
+ }
1876
+ },
1877
+ { immediate: !0 }
1878
+ ), (k, w) => (d(), f("div", Rl, [
1879
+ s("div", Fl, [
1880
+ s("div", Hl, [
1881
+ b(p) ? (d(), Z(re, {
1882
+ key: 0,
1883
+ outlined: "",
1884
+ size: "small",
1885
+ class: "clear-filters",
1886
+ onClick: b(g)
1887
+ }, {
1888
+ default: N(() => [...w[0] || (w[0] = [
1889
+ s("svg", {
1890
+ xmlns: "http://www.w3.org/2000/svg",
1891
+ viewBox: "0 0 51.26 51.26",
1892
+ height: "1em",
1893
+ "aria-hidden": "true"
1894
+ }, [
1895
+ s("path", {
1896
+ fill: "currentColor",
1897
+ d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
1898
+ })
1899
+ ], -1),
1900
+ s("span", { class: "g-clear-filters-text" }, " Clear Filters ", -1)
1901
+ ])]),
1902
+ _: 1
1903
+ }, 8, ["onClick"])) : E("", !0)
1904
+ ]),
1905
+ s("div", Kl, [
1906
+ D(k.$slots, "pagination", {}, void 0, !0)
1907
+ ]),
1908
+ s("span", Wl, x(u.resultCount || e.data.length) + " results", 1)
1909
+ ]),
1910
+ s("table", {
1911
+ class: "g-table",
1912
+ "aria-label": e.label,
1913
+ "aria-rowcount": u.resultCount || e.data.length
1914
+ }, [
1915
+ s("thead", Ul, [
1916
+ s("tr", ql, [
1917
+ e.bulkSelectionEnabled ? (d(), f("th", Zl, [
1918
+ s("input", {
1919
+ type: "checkbox",
1920
+ checked: $.value,
1921
+ indeterminate: S.value,
1922
+ onChange: Y,
1923
+ "aria-label": $.value ? "Deselect all rows" : "Select all rows",
1924
+ class: "g-bulk-select-checkbox"
1925
+ }, null, 40, jl)
1926
+ ])) : E("", !0),
1927
+ (d(!0), f(V, null, W(e.columns, (h) => (d(), f("th", {
1928
+ key: h.key,
1929
+ "aria-sort": t.value === h.key ? n.value === 1 ? "ascending" : "descending" : "none",
1930
+ class: T([
1931
+ "g-th",
1932
+ { sorted: t.value === h.key },
1933
+ { filtered: b(i)[h.key] }
1934
+ ]),
1935
+ scope: "col"
1936
+ }, [
1937
+ s("div", Xl, [
1938
+ h.sortable ? (d(), f("button", {
1939
+ key: 0,
1940
+ type: "button",
1941
+ class: "g-column-head",
1942
+ onClick: (z) => r(h)
1943
+ }, [
1944
+ G(x(h.label) + " ", 1),
1945
+ t.value === h.key ? (d(), f("span", Ql, [
1946
+ (d(), f("svg", {
1947
+ xmlns: "http://www.w3.org/2000/svg",
1948
+ viewBox: "0 0 640 640",
1949
+ height: "1.5em",
1950
+ role: "img",
1951
+ "aria-label": n.value === 1 ? "Sorted ascending" : "Sorted descending",
1952
+ style: ve({
1953
+ transform: `rotate(${n.value === 1 ? 0 : 180}deg)`
1954
+ })
1955
+ }, [...w[1] || (w[1] = [
1956
+ s("path", {
1957
+ fill: "currentColor",
1958
+ d: "M300.3 199.2C312.9 188.9 331.4 189.7 343.1 201.4L471.1 329.4C480.3 338.6 483 352.3 478 364.3C473 376.3 461.4 384 448.5 384L192.5 384C179.6 384 167.9 376.2 162.9 364.2C157.9 352.2 160.7 338.5 169.9 329.4L297.9 201.4L300.3 199.2z"
1959
+ }, null, -1)
1960
+ ])], 12, ea))
1961
+ ])) : E("", !0)
1962
+ ], 8, Jl)) : (d(), f("span", ta, x(h.label), 1)),
1963
+ h.filter ? (d(), Z(rt, { key: 2 }, {
1964
+ trigger: N(({ toggle: z }) => [
1965
+ s("button", {
1966
+ onClick: ae(z, ["stop"]),
1967
+ "aria-label": b(i)[h.key] ? "Column Filtered" : "Filter Column",
1968
+ class: T(["g-filter-btn", {
1969
+ "g-active": b(i)[h.key]
1970
+ }]),
1971
+ type: "button"
1972
+ }, [...w[2] || (w[2] = [
1973
+ s("svg", {
1974
+ xmlns: "http://www.w3.org/2000/svg",
1975
+ viewBox: "0 0 640 640",
1976
+ height: "1.5em",
1977
+ "aria-hidden": "true"
1978
+ }, [
1979
+ s("path", {
1980
+ fill: "currentColor",
1981
+ d: "M96 128C83.1 128 71.4 135.8 66.4 147.8C61.4 159.8 64.2 173.5 73.4 182.6L256 365.3L256 480C256 488.5 259.4 496.6 265.4 502.6L329.4 566.6C338.6 575.8 352.3 578.5 364.3 573.5C376.3 568.5 384 556.9 384 544L384 365.3L566.6 182.7C575.8 173.5 578.5 159.8 573.5 147.8C568.5 135.8 556.9 128 544 128L96 128z"
1982
+ })
1983
+ ], -1)
1984
+ ])], 10, la)
1985
+ ]),
1986
+ default: N(() => [
1987
+ h.filter.type === "select" ? (d(), Z(Ot, {
1988
+ key: 0,
1989
+ modelValue: o.value[h.key],
1990
+ "onUpdate:modelValue": (z) => o.value[h.key] = z,
1991
+ options: h.filter.options,
1992
+ class: "g-filter-select",
1993
+ label: "Filter select",
1994
+ searchable: "",
1995
+ "clear-button": ""
1996
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : h.filter.type === "toggle" ? (d(), f("div", aa, [
1997
+ s("div", oa, [
1998
+ be(s("input", {
1999
+ type: "checkbox",
2000
+ "onUpdate:modelValue": (z) => o.value[h.key] = z,
2001
+ id: `${b(I)}-filter-${String(h.key)}`,
2002
+ "aria-describedby": h.filter.description ? `${b(I)}-filter-description-${String(h.key)}` : void 0
2003
+ }, null, 8, sa), [
2004
+ [Be, o.value[h.key]]
2005
+ ]),
2006
+ s("label", {
2007
+ for: `${b(I)}-filter-${String(h.key)}`
2008
+ }, x(h.filter.label), 9, na),
2009
+ h.filter.description ? (d(), f("span", {
2010
+ key: 0,
2011
+ class: "g-filter-description",
2012
+ id: `${b(I)}-filter-description-${String(h.key)}`
2013
+ }, x(h.filter.description), 9, ia)) : E("", !0)
2014
+ ])
2015
+ ])) : h.filter.type === "multi-select" ? (d(), f("fieldset", ra, [
2016
+ w[4] || (w[4] = s("legend", { class: "g-multi-select-legend" }, " Include values ", -1)),
2017
+ (d(!0), f(V, null, W(h.filter.options, (z) => (d(), f("div", {
2018
+ key: z.value
2019
+ }, [
2020
+ be(s("input", {
2021
+ type: "checkbox",
2022
+ "onUpdate:modelValue": (Q) => o.value[h.key] = Q,
2023
+ id: `filter-${String(h.key)}-${z.value}`,
2024
+ value: z.value,
2025
+ name: "filter-multiselect"
2026
+ }, null, 8, ua), [
2027
+ [Be, o.value[h.key]]
2028
+ ]),
2029
+ s("label", {
2030
+ for: `filter-${String(h.key)}-${z.value}`
2031
+ }, x(z.label), 9, da)
2032
+ ]))), 128)),
2033
+ o.value[h.key] && o.value[h.key].length ? (d(), Z(re, {
2034
+ key: 0,
2035
+ class: "clear-multiselect-btn",
2036
+ theme: "accent",
2037
+ size: "small",
2038
+ onClick: (z) => o.value[h.key] = []
2039
+ }, {
2040
+ default: N(() => [...w[3] || (w[3] = [
2041
+ G(" Clear ", -1)
2042
+ ])]),
2043
+ _: 1
2044
+ }, 8, ["onClick"])) : E("", !0)
2045
+ ])) : E("", !0)
2046
+ ]),
2047
+ _: 2
2048
+ }, 1024)) : E("", !0)
2049
+ ])
2050
+ ], 10, Yl))), 128))
2051
+ ])
2052
+ ]),
2053
+ le(Pl, {
2054
+ data: e.data,
2055
+ columns: e.columns,
2056
+ "group-by": e.groupBy,
2057
+ "group-render": e.groupRender,
2058
+ "row-clickable": e.rowClickable,
2059
+ "row-class": e.rowClass,
2060
+ "start-index": e.startIndex,
2061
+ "bulk-selection-enabled": e.bulkSelectionEnabled,
2062
+ "selected-rows": a.value,
2063
+ onRowClick: L,
2064
+ onToggleRow: U
2065
+ }, null, 8, ["data", "columns", "group-by", "group-render", "row-clickable", "row-class", "start-index", "bulk-selection-enabled", "selected-rows"])
2066
+ ], 8, Nl),
2067
+ e.bulkSelectionEnabled && a.value.length > 0 ? (d(), f("div", ca, [
2068
+ s("span", va, x(a.value.length) + " row" + x(a.value.length === 1 ? "" : "s") + " selected", 1),
2069
+ s("ul", fa, [
2070
+ (d(!0), f(V, null, W(e.bulkActions, (h) => (d(), f("li", {
2071
+ key: h.id
2072
+ }, [
2073
+ le(re, {
2074
+ theme: h.theme || "accent",
2075
+ onClick: (z) => O(h.id),
2076
+ size: "small"
2077
+ }, {
2078
+ default: N(() => [
2079
+ G(x(h.label) + " " + x(a.value.length) + " row" + x(a.value.length === 1 ? "" : "s"), 1)
2080
+ ]),
2081
+ _: 2
2082
+ }, 1032, ["theme", "onClick"])
2083
+ ]))), 128))
2084
+ ])
2085
+ ])) : E("", !0)
2086
+ ]));
2087
+ }
2088
+ }), Ya = /* @__PURE__ */ R(ga, [["__scopeId", "data-v-21cb845c"]]), ba = {
2089
+ class: "g-pagination",
2090
+ "aria-label": "Pagination"
2091
+ }, pa = ["disabled"], ma = ["disabled"], ha = { class: "page-range" }, ya = ["disabled"], ka = ["disabled"], wa = ["value"], Ca = ["value"], $a = /* @__PURE__ */ A({
2092
+ __name: "GTablePagination",
2093
+ props: /* @__PURE__ */ F({
2094
+ start: {},
2095
+ pageSize: {},
2096
+ total: {},
2097
+ pageSizes: {}
2098
+ }, {
2099
+ start: {},
2100
+ startModifiers: {},
2101
+ pageSize: {},
2102
+ pageSizeModifiers: {}
2103
+ }),
2104
+ emits: ["update:start", "update:pageSize"],
2105
+ setup(e) {
2106
+ const l = e, t = _(() => Math.max(1, Math.ceil(l.total / l.pageSize))), n = j(e, "start"), o = j(e, "pageSize"), a = _(() => n.value ?? l.start), u = _(() => o.value ?? l.pageSize), c = _(() => l.total === 0 ? 0 : a.value + 1), r = _(() => l.total === 0 ? 0 : Math.min(a.value + u.value, l.total)), v = _(() => Math.floor(a.value / u.value) + 1);
2107
+ function i(g) {
2108
+ g < 1 || g > t.value || (n.value = (g - 1) * u.value);
2109
+ }
2110
+ function p(g) {
2111
+ o.value = parseInt(g.target.value, 10);
2112
+ }
2113
+ return (g, m) => (d(), f("nav", ba, [
2114
+ s("button", {
2115
+ class: "first-page g-pagination-button",
2116
+ disabled: v.value === 1,
2117
+ onClick: m[0] || (m[0] = (C) => i(1))
2118
+ }, [...m[4] || (m[4] = [
2119
+ s("svg", {
2120
+ role: "img",
2121
+ "aria-label": "First Page",
2122
+ height: "2em",
2123
+ xmlns: "http://www.w3.org/2000/svg",
2124
+ width: "2em",
2125
+ viewBox: "0 0 24 24",
2126
+ fill: "none",
2127
+ stroke: "currentColor",
2128
+ "stroke-width": "2",
2129
+ "stroke-linecap": "round",
2130
+ "stroke-linejoin": "round"
2131
+ }, [
2132
+ s("path", {
2133
+ stroke: "none",
2134
+ d: "M0 0h24v24H0z",
2135
+ fill: "none"
2136
+ }),
2137
+ s("path", { d: "M11 7l-5 5l5 5" }),
2138
+ s("path", { d: "M17 7l-5 5l5 5" })
2139
+ ], -1)
2140
+ ])], 8, pa),
2141
+ s("button", {
2142
+ class: "prev-page g-pagination-button",
2143
+ disabled: v.value === 1,
2144
+ onClick: m[1] || (m[1] = (C) => i(v.value - 1))
2145
+ }, [...m[5] || (m[5] = [
2146
+ s("svg", {
2147
+ role: "img",
2148
+ "aria-label": "Previous Page",
2149
+ xmlns: "http://www.w3.org/2000/svg",
2150
+ width: "2em",
2151
+ height: "2em",
2152
+ viewBox: "0 0 24 24",
2153
+ fill: "none",
2154
+ stroke: "currentColor",
2155
+ "stroke-width": "2",
2156
+ "stroke-linecap": "round",
2157
+ "stroke-linejoin": "round"
2158
+ }, [
2159
+ s("path", {
2160
+ stroke: "none",
2161
+ d: "M0 0h24v24H0z",
2162
+ fill: "none"
2163
+ }),
2164
+ s("path", { d: "M15 6l-6 6l6 6" })
2165
+ ], -1)
2166
+ ])], 8, ma),
2167
+ s("span", ha, x(c.value) + " to " + x(r.value), 1),
2168
+ s("button", {
2169
+ class: "next-page g-pagination-button",
2170
+ disabled: v.value === t.value,
2171
+ onClick: m[2] || (m[2] = (C) => i(v.value + 1))
2172
+ }, [...m[6] || (m[6] = [
2173
+ s("svg", {
2174
+ role: "img",
2175
+ "aria-label": "Next Page",
2176
+ xmlns: "http://www.w3.org/2000/svg",
2177
+ width: "2em",
2178
+ height: "2em",
2179
+ viewBox: "0 0 24 24",
2180
+ fill: "none",
2181
+ stroke: "currentColor",
2182
+ "stroke-width": "2",
2183
+ "stroke-linecap": "round",
2184
+ "stroke-linejoin": "round"
2185
+ }, [
2186
+ s("path", {
2187
+ stroke: "none",
2188
+ d: "M0 0h24v24H0z",
2189
+ fill: "none"
2190
+ }),
2191
+ s("path", { d: "M9 6l6 6l-6 6" })
2192
+ ], -1)
2193
+ ])], 8, ya),
2194
+ s("button", {
2195
+ class: "last-page g-pagination-button",
2196
+ disabled: v.value === t.value,
2197
+ onClick: m[3] || (m[3] = (C) => i(t.value))
2198
+ }, [...m[7] || (m[7] = [
2199
+ s("svg", {
2200
+ role: "img",
2201
+ "aria-label": "Last Page",
2202
+ xmlns: "http://www.w3.org/2000/svg",
2203
+ width: "2em",
2204
+ height: "2em",
2205
+ viewBox: "0 0 24 24",
2206
+ fill: "none",
2207
+ stroke: "currentColor",
2208
+ "stroke-width": "2",
2209
+ "stroke-linecap": "round",
2210
+ "stroke-linejoin": "round"
2211
+ }, [
2212
+ s("path", {
2213
+ stroke: "none",
2214
+ d: "M0 0h24v24H0z",
2215
+ fill: "none"
2216
+ }),
2217
+ s("path", { d: "M7 7l5 5l-5 5" }),
2218
+ s("path", { d: "M13 7l5 5l-5 5" })
2219
+ ], -1)
2220
+ ])], 8, ka),
2221
+ s("select", {
2222
+ id: "page-size-select",
2223
+ class: "page-size-select",
2224
+ value: o.value,
2225
+ onChange: p
2226
+ }, [
2227
+ (d(!0), f(V, null, W(l.pageSizes || [10, 25, 50, 100], (C) => (d(), f("option", {
2228
+ key: C,
2229
+ value: C
2230
+ }, x(C), 9, Ca))), 128))
2231
+ ], 40, wa),
2232
+ m[8] || (m[8] = s("label", {
2233
+ class: "page-size-label",
2234
+ for: "page-size-select"
2235
+ }, "per page", -1))
2236
+ ]));
2237
+ }
2238
+ }), Xa = /* @__PURE__ */ R($a, [["__scopeId", "data-v-46e71363"]]), xa = ["id"], _a = { class: "g-modal-inner" }, La = { class: "g-modal-header" }, Sa = ["id"], Ma = ["id"], Ba = /* @__PURE__ */ A({
2239
+ __name: "GModal",
2240
+ props: {
2241
+ label: {},
2242
+ describedby: { default: void 0 },
2243
+ hiddenLabel: { type: Boolean, default: !1 },
2244
+ size: { default: "medium" }
2245
+ },
2246
+ emits: ["close"],
2247
+ setup(e, { emit: l }) {
2248
+ const t = l, n = ge("dialog"), o = M(!0), a = H(), { pop: u, push: c, isTop: r, zIndex: v } = me(a, !0, !0), { deactivate: i, activate: p } = ke(n, r);
2249
+ function g() {
2250
+ t("close");
2251
+ }
2252
+ return we([n], r, o, g, u), ue(() => {
2253
+ c(), p();
2254
+ }), ze(() => {
2255
+ u(), i();
2256
+ }), (m, C) => (d(), Z(Te, { to: "#modal-root" }, [
2257
+ le(pe, {
2258
+ name: "g-fade",
2259
+ appear: ""
2260
+ }, {
2261
+ default: N(() => [
2262
+ s("div", te({
2263
+ id: "modal-" + b(a),
2264
+ class: ["g-modal", "g-modal--" + e.size],
2265
+ role: "dialog",
2266
+ "aria-modal": "true"
2267
+ }, {
2268
+ "aria-labelledby": e.hiddenLabel ? void 0 : "modal-label-" + b(a),
2269
+ "aria-label": e.hiddenLabel ? e.label : void 0,
2270
+ "aria-describedby": e.describedby ? e.describedby : void 0
2271
+ }, {
2272
+ ref_key: "dialog",
2273
+ ref: n,
2274
+ style: { zIndex: b(v) }
2275
+ }), [
2276
+ s("div", _a, [
2277
+ s("div", La, [
2278
+ e.hiddenLabel ? E("", !0) : (d(), f("h2", {
2279
+ key: 0,
2280
+ id: "modal-label-" + b(a),
2281
+ class: "g-modal-label",
2282
+ tabindex: "-1"
2283
+ }, x(e.label), 9, Sa)),
2284
+ s("button", {
2285
+ class: "g-modal-close",
2286
+ onClick: g,
2287
+ "aria-label": "Close"
2288
+ }, [...C[0] || (C[0] = [
2289
+ s("svg", {
2290
+ viewBox: "0 0 24 24",
2291
+ width: "24",
2292
+ height: "24",
2293
+ "aria-hidden": "true"
2294
+ }, [
2295
+ s("path", {
2296
+ fill: "currentColor",
2297
+ d: "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
2298
+ })
2299
+ ], -1)
2300
+ ])])
2301
+ ]),
2302
+ s("div", {
2303
+ id: "modal-description-" + b(a),
2304
+ class: "g-modal-content"
2305
+ }, [
2306
+ D(m.$slots, "default", {}, void 0, !0)
2307
+ ], 8, Ma)
2308
+ ])
2309
+ ], 16, xa)
2310
+ ]),
2311
+ _: 3
2312
+ })
2313
+ ]));
2314
+ }
2315
+ }), Ja = /* @__PURE__ */ R(Ba, [["__scopeId", "data-v-d2f3bb35"]]), Ia = ["id", "aria-expanded", "aria-label", "aria-controls"], Ea = /* @__PURE__ */ A({
2316
+ __name: "GHamburgerMenu",
2317
+ props: {
2318
+ label: { default: "Main Navigation" }
2319
+ },
2320
+ emits: ["toggle"],
2321
+ setup(e, { emit: l }) {
2322
+ const t = Ve("sidebar"), n = l;
2323
+ function o() {
2324
+ n("toggle"), t?.toggle();
2325
+ }
2326
+ function a(c) {
2327
+ c.key === "Escape" && t?.open?.value && (t.open.value = !1);
2328
+ }
2329
+ const u = H();
2330
+ return (c, r) => (d(), f("button", {
2331
+ id: `${b(t)?.id ?? b(u)}-hamburger`,
2332
+ class: T(["g-hamburger-button", {
2333
+ "g-hamburger-button--open": b(t)?.open?.value,
2334
+ "g-hamburger-button--collapsible": b(t)?.isCollapsible?.value
2335
+ }]),
2336
+ onClick: o,
2337
+ onKeydown: a,
2338
+ "aria-expanded": b(t)?.open?.value ? "true" : "false",
2339
+ "aria-label": e.label,
2340
+ "aria-controls": b(t) ? `${b(t).id}-sidebar` : void 0
2341
+ }, [...r[0] || (r[0] = [
2342
+ s("svg", {
2343
+ xmlns: "http://www.w3.org/2000/svg",
2344
+ viewBox: "0 0 51.26 51.26"
2345
+ }, [
2346
+ s("g", { fill: "currentColor" }, [
2347
+ s("path", { d: "M11.6 16.52h28.06a3.24 3.24 0 1 0 0-6.48H11.6a3.24 3.24 0 0 0 0 6.48ZM39.66 22.07H11.6a3.24 3.24 0 0 0 0 6.48h28.06a3.24 3.24 0 1 0 0-6.48ZM39.66 34.1H11.6a3.24 3.24 0 0 0 0 6.48h28.06a3.24 3.24 0 1 0 0-6.48Z" })
2348
+ ])
2349
+ ], -1)
2350
+ ])], 42, Ia));
2351
+ }
2352
+ }), Qa = /* @__PURE__ */ R(Ea, [["__scopeId", "data-v-6c69828a"]]), za = /* @__PURE__ */ A({
2353
+ __name: "GDetailList",
2354
+ props: {
2355
+ variant: { default: "grid" }
2356
+ },
2357
+ setup(e) {
2358
+ const l = e;
2359
+ return (t, n) => (d(), f("dl", {
2360
+ class: T(["g-detail-list", `g-detail-list--${l.variant}`])
2361
+ }, [
2362
+ D(t.$slots, "default", {}, void 0, !0)
2363
+ ], 2));
2364
+ }
2365
+ }), eo = /* @__PURE__ */ R(za, [["__scopeId", "data-v-9f983ea6"]]), Ta = { class: "g-detail-list-item" }, Va = { class: "g-detail-list-item__label" }, Aa = { class: "g-detail-list-item__value" }, to = /* @__PURE__ */ A({
2366
+ __name: "GDetailListItem",
2367
+ props: {
2368
+ label: {}
2369
+ },
2370
+ setup(e) {
2371
+ return (l, t) => (d(), f("div", Ta, [
2372
+ s("dt", Va, [
2373
+ D(l.$slots, "label", {}, () => [
2374
+ G(x(e.label), 1)
2375
+ ])
2376
+ ]),
2377
+ s("dd", Aa, [
2378
+ D(l.$slots, "default")
2379
+ ])
2380
+ ]));
2381
+ }
2382
+ }), Oa = {
2383
+ key: 0,
2384
+ class: "g-scroll-lock-overlay"
2385
+ }, lo = /* @__PURE__ */ A({
2386
+ __name: "GOverlay",
2387
+ setup(e) {
2388
+ const { hasScrollLock: l } = tt();
2389
+ return (t, n) => (d(), Z(pe, { name: "g-fade" }, {
2390
+ default: N(() => [
2391
+ b(l) ? (d(), f("div", Oa)) : E("", !0)
2392
+ ]),
2393
+ _: 1
2394
+ }));
2395
+ }
2396
+ });
2397
+ export {
2398
+ Wa as G,
2399
+ rl as V,
2400
+ re as _,
2401
+ Ra as a,
2402
+ rt as b,
2403
+ Fa as c,
2404
+ kt as d,
2405
+ Ha as e,
2406
+ Ot as f,
2407
+ Ka as g,
2408
+ Na as h,
2409
+ Ua as i,
2410
+ qa as j,
2411
+ Za as k,
2412
+ ja as l,
2413
+ Ya as m,
2414
+ Pl as n,
2415
+ Xa as o,
2416
+ Ja as p,
2417
+ lo as q,
2418
+ Qa as r,
2419
+ eo as s,
2420
+ to as t,
2421
+ Oe as u,
2422
+ we as v,
2423
+ ke as w,
2424
+ me as x,
2425
+ tt as y
2426
+ };
2427
+ //# sourceMappingURL=main-BA2FBasv.js.map