@boobooking/dashboard-ui-components 0.20.0 → 0.22.0

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.
package/dist/index.js CHANGED
@@ -58,7 +58,11 @@ var ae = {
58
58
  tabs: "Закладки",
59
59
  selected: "Выбрано",
60
60
  search: "Поиск",
61
- nothingFound: "Ничего не найдено"
61
+ nothingFound: "Ничего не найдено",
62
+ amountFrom: "от",
63
+ amountTo: "до",
64
+ amountFraction: "Копейки",
65
+ currency: "Валюта"
62
66
  },
63
67
  en: {
64
68
  cancel: "Cancel",
@@ -112,7 +116,11 @@ var ae = {
112
116
  tabs: "Tabs",
113
117
  selected: "Selected",
114
118
  search: "Search",
115
- nothingFound: "Nothing found"
119
+ nothingFound: "Nothing found",
120
+ amountFrom: "from",
121
+ amountTo: "to",
122
+ amountFraction: "Fractional part",
123
+ currency: "Currency"
116
124
  }
117
125
  };
118
126
  //#endregion
@@ -150,12 +158,12 @@ function ue(e) {
150
158
  for (let n of e.cards.values()) t = n.window;
151
159
  return t;
152
160
  }
153
- function E(e, t) {
161
+ function de(e, t) {
154
162
  let n = t;
155
163
  for (; n !== null && !T(e, n);) n = n.parent;
156
164
  return n;
157
165
  }
158
- function de(e, t) {
166
+ function fe(e, t) {
159
167
  return e.transition = {
160
168
  number: e.transition.number + 1,
161
169
  fromAddress: e.shown,
@@ -163,11 +171,11 @@ function de(e, t) {
163
171
  assigned: /* @__PURE__ */ new Map()
164
172
  }, e.shown = t, e.transition.number;
165
173
  }
166
- function fe(e, t, n) {
174
+ function pe(e, t, n) {
167
175
  let r = e.transition, i = r.assigned.get(t);
168
176
  if (i !== void 0 && T(e, i)) return i;
169
177
  let a = r.fromWindow, o = r.fromAddress;
170
- a !== null && !T(e, a) && (a = E(e, a), o = null), a !== null && le(a) === e.shown && (e.windows.splice(e.windows.indexOf(a)), a = a.parent === null ? null : E(e, a.parent), o = null);
178
+ a !== null && !T(e, a) && (a = de(e, a), o = null), a !== null && le(a) === e.shown && (e.windows.splice(e.windows.indexOf(a)), a = a.parent === null ? null : de(e, a.parent), o = null);
171
179
  for (let n = a; n !== null; n = n.parent) if (n.key === t && T(e, n)) return e.windows.splice(e.windows.indexOf(n) + 1), n;
172
180
  a === null ? e.windows = [] : e.windows.splice(e.windows.indexOf(a) + 1);
173
181
  let s = {
@@ -179,18 +187,18 @@ function fe(e, t, n) {
179
187
  };
180
188
  return e.nextId += 1, e.windows.push(s), s;
181
189
  }
182
- function D(e, t, n, r) {
183
- let i = fe(e, n, r);
190
+ function E(e, t, n, r) {
191
+ let i = pe(e, n, r);
184
192
  return i.fallbackAddress = r, e.transition.assigned.set(n, i), e.cards.delete(t), e.cards.set(t, {
185
193
  key: n,
186
194
  window: i,
187
195
  processed: e.transition.number
188
196
  }), i;
189
197
  }
190
- function pe(e, t, n, r) {
198
+ function me(e, t, n, r) {
191
199
  let i = e.cards.get(t);
192
200
  return i === void 0 ? {
193
- window: D(e, t, n, r),
201
+ window: E(e, t, n, r),
194
202
  rejected: !1,
195
203
  key: n
196
204
  } : i.key === n ? (i.processed = e.transition.number, {
@@ -202,29 +210,29 @@ function pe(e, t, n, r) {
202
210
  rejected: !0,
203
211
  key: i.key
204
212
  } : (e.cards.delete(t), {
205
- window: D(e, t, n, r),
213
+ window: E(e, t, n, r),
206
214
  rejected: !1,
207
215
  key: n
208
216
  });
209
217
  }
210
- function me(e, t) {
218
+ function he(e, t) {
211
219
  e.cards.delete(t);
212
220
  }
213
- function he(e, t, n) {
221
+ function ge(e, t, n) {
214
222
  let r = e.cards.get(t);
215
223
  r !== void 0 && (r.window.fallbackAddress = n);
216
224
  }
217
225
  //#endregion
218
226
  //#region src/plugin.js
219
- var ge = Symbol("dashboardUi"), _e = Object.freeze({
227
+ var _e = Symbol("dashboardUi"), ve = Object.freeze({
220
228
  lang: "ru",
221
229
  navigate: null,
222
230
  windows: null
223
- }), O = { uiSettings: {
224
- from: ge,
225
- default: () => _e
231
+ }), ye = { uiSettings: {
232
+ from: _e,
233
+ default: () => ve
226
234
  } };
227
- function ve(e, t) {
235
+ function be(e, t) {
228
236
  let n = ce(), r = g({
229
237
  number: 0,
230
238
  address: null
@@ -232,7 +240,7 @@ function ve(e, t) {
232
240
  return i.run(() => {
233
241
  ne(t, (e) => {
234
242
  let t = oe(e, window.location.origin);
235
- t !== null && t !== r.address && (r.number = de(n, t), r.address = t);
243
+ t !== null && t !== r.address && (r.number = fe(n, t), r.address = t);
236
244
  }, {
237
245
  flush: "sync",
238
246
  immediate: !0
@@ -242,21 +250,21 @@ function ve(e, t) {
242
250
  page: r
243
251
  };
244
252
  }
245
- var ye = { install(e, t) {
253
+ var xe = { install(e, t) {
246
254
  let n = t ?? {}, r = Object.hasOwn(n, "lang") ? n.lang : "ru";
247
255
  if (!w(r)) throw Error(`dashboardUi: неизвестный lang «${r}», допустимы: ${ie.join(", ")}`);
248
256
  let i = Object.hasOwn(n, "navigate"), a = i ? n.navigate : null;
249
257
  if (i && typeof a != "function") throw Error("dashboardUi: navigate должен быть функцией (href) => …");
250
258
  let o = Object.hasOwn(n, "currentUrl"), s = o ? n.currentUrl : null;
251
259
  if (o && typeof s != "function") throw Error("dashboardUi: currentUrl должен быть функцией () => адрес страницы");
252
- let c = s !== null && typeof window < "u" ? ve(e, s) : null;
253
- e.provide(ge, Object.freeze({
260
+ let c = s !== null && typeof window < "u" ? be(e, s) : null;
261
+ e.provide(_e, Object.freeze({
254
262
  lang: r,
255
263
  navigate: a,
256
264
  windows: c
257
265
  }));
258
- } }, be = 4e4;
259
- function xe(e) {
266
+ } }, Se = 4e4;
267
+ function Ce(e) {
260
268
  if (typeof e != "string") return null;
261
269
  let t = /filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e);
262
270
  if (t !== null) try {
@@ -267,7 +275,7 @@ function xe(e) {
267
275
  let r = /filename\s*=\s*([^;"\s]+)/i.exec(e);
268
276
  return r === null ? null : r[1];
269
277
  }
270
- function Se(e) {
278
+ function we(e) {
271
279
  try {
272
280
  let t = new URL(e, window.location.href).pathname.split("/").filter((e) => e !== "");
273
281
  return t.length === 0 ? null : decodeURIComponent(t[t.length - 1]);
@@ -275,7 +283,7 @@ function Se(e) {
275
283
  return null;
276
284
  }
277
285
  }
278
- async function Ce(e) {
286
+ async function Te(e) {
279
287
  let t = await fetch(e, { credentials: "same-origin" });
280
288
  if (t.redirected) throw Object.assign(/* @__PURE__ */ Error(`downloadFile: сервер перенаправил запрос ${e}`), {
281
289
  redirectUrl: t.url,
@@ -285,12 +293,12 @@ async function Ce(e) {
285
293
  redirectUrl: null,
286
294
  status: t.status
287
295
  });
288
- let n = xe(t.headers.get("Content-Disposition")) ?? Se(e) ?? "download", r = URL.createObjectURL(await t.blob()), i = document.createElement("a");
289
- i.href = r, i.download = n, i.style.display = "none", document.body.appendChild(i), i.click(), i.remove(), setTimeout(() => URL.revokeObjectURL(r), be);
296
+ let n = Ce(t.headers.get("Content-Disposition")) ?? we(e) ?? "download", r = URL.createObjectURL(await t.blob()), i = document.createElement("a");
297
+ i.href = r, i.download = n, i.style.display = "none", document.body.appendChild(i), i.click(), i.remove(), setTimeout(() => URL.revokeObjectURL(r), Se);
290
298
  }
291
299
  //#endregion
292
300
  //#region src/colors.js
293
- var k = {
301
+ var Ee = {
294
302
  gray: {
295
303
  pill: "bb:bg-gray-100 bb:text-gray-800",
296
304
  pillHover: "bb:hover:text-gray-600",
@@ -333,19 +341,19 @@ var k = {
333
341
  menuItem: "bb:bg-purple-100 bb:text-purple-800 bb:hover:bg-purple-200 bb:focus:bg-purple-200",
334
342
  mark: "bb:text-purple-500"
335
343
  }
336
- }, we = Object.keys(k);
337
- function A(e) {
338
- return we.includes(e);
344
+ }, De = Object.keys(Ee);
345
+ function D(e) {
346
+ return De.includes(e);
339
347
  }
340
- function Te(e, t) {
341
- return A(e) ? k[e][t] ?? "" : "";
348
+ function Oe(e, t) {
349
+ return D(e) ? Ee[e][t] ?? "" : "";
342
350
  }
343
- var j = { methods: { colorClass: Te } }, M = (e, t) => {
351
+ var O = { methods: { colorClass: Oe } }, k = (e, t) => {
344
352
  let n = e.__vccOpts || e;
345
353
  for (let [e, r] of t) n[e] = r;
346
354
  return n;
347
- }, Ee = {
348
- mixins: [j],
355
+ }, ke = {
356
+ mixins: [O],
349
357
  props: {
350
358
  withPulse: {
351
359
  type: Boolean,
@@ -354,11 +362,11 @@ var j = { methods: { colorClass: Te } }, M = (e, t) => {
354
362
  color: {
355
363
  type: String,
356
364
  required: !0,
357
- validator: A
365
+ validator: D
358
366
  }
359
367
  }
360
368
  };
361
- function De(e, t, n, r, o, s) {
369
+ function Ae(e, t, n, r, o, s) {
362
370
  return f(), i("div", { class: u(["bb-dashboard-ui bb:flex bb:h-full bb:items-center bb:leading-none bb:text-4xl", [e.colorClass(n.color, "mark"), { "bb:animate-pulse": n.withPulse }]]) }, [...t[0] ||= [a("svg", {
363
371
  class: "bb:fill-current bb:w-2 bb:h-2",
364
372
  viewBox: "0 0 120 120"
@@ -368,8 +376,8 @@ function De(e, t, n, r, o, s) {
368
376
  r: "45"
369
377
  })], -1)]], 2);
370
378
  }
371
- var N = /*#__PURE__*/ M(Ee, [["render", De]]), Oe = {
372
- components: { Dot: N },
379
+ var A = /*#__PURE__*/ k(ke, [["render", Ae]]), je = {
380
+ components: { Dot: A },
373
381
  props: {
374
382
  text: {
375
383
  type: String,
@@ -384,14 +392,14 @@ var N = /*#__PURE__*/ M(Ee, [["render", De]]), Oe = {
384
392
  default: !1
385
393
  }
386
394
  }
387
- }, ke = { class: "bb:flex bb:h-6 bb:px-3 bb:bg-white bb:items-center bb:justify-between" }, Ae = ["textContent"];
388
- function je(e, t, n, r, o, c) {
395
+ }, Me = { class: "bb:flex bb:h-6 bb:px-3 bb:bg-white bb:items-center bb:justify-between" }, Ne = ["textContent"];
396
+ function Pe(e, t, n, r, o, c) {
389
397
  let l = h("dot");
390
- return f(), i("div", ke, [
398
+ return f(), i("div", Me, [
391
399
  a("div", {
392
400
  class: "bb:flex bb:flex-1 bb:h-full bb:items-center bb:text-xs bb:text-gray-500 bb:whitespace-nowrap bb:truncate bb:leading-tight bb:select-none",
393
401
  textContent: _(n.text)
394
- }, null, 8, Ae),
402
+ }, null, 8, Ne),
395
403
  x(s(l, {
396
404
  color: "red",
397
405
  "with-pulse": !0,
@@ -403,8 +411,8 @@ function je(e, t, n, r, o, c) {
403
411
  }, null, 512), [[y, n.isRequired]])
404
412
  ]);
405
413
  }
406
- var P = /*#__PURE__*/ M(Oe, [["render", je]]), F = {
407
- inject: O,
414
+ var j = /*#__PURE__*/ k(je, [["render", Pe]]), M = {
415
+ inject: ye,
408
416
  props: { lang: {
409
417
  type: String,
410
418
  default: null,
@@ -418,11 +426,11 @@ var P = /*#__PURE__*/ M(Oe, [["render", je]]), F = {
418
426
  return ae[this.resolvedLang];
419
427
  }
420
428
  }
421
- }, Me = [
429
+ }, Fe = [
422
430
  { transform: "scale(1)" },
423
431
  { transform: "scale(0.8)" },
424
432
  { transform: "scale(1)" }
425
- ], Ne = 150, Pe = {
433
+ ], Ie = 150, Le = {
426
434
  created() {
427
435
  this.isPressing = !1, this.isUnmounted = !1;
428
436
  },
@@ -430,39 +438,39 @@ var P = /*#__PURE__*/ M(Oe, [["render", je]]), F = {
430
438
  this.isUnmounted = !0;
431
439
  },
432
440
  methods: { press() {
433
- this.isPressing || (this.isPressing = !0, Fe(this.$el).then(() => {
441
+ this.isPressing || (this.isPressing = !0, Re(this.$el).then(() => {
434
442
  this.isPressing = !1, this.isUnmounted || this.$emit("clicked");
435
443
  }));
436
444
  } }
437
445
  };
438
- function Fe(e) {
439
- if (typeof e.animate != "function" || Ie()) return Promise.resolve();
446
+ function Re(e) {
447
+ if (typeof e.animate != "function" || ze()) return Promise.resolve();
440
448
  let t = () => {};
441
- return e.animate(Me, {
442
- duration: Ne,
449
+ return e.animate(Fe, {
450
+ duration: Ie,
443
451
  easing: "ease-out"
444
452
  }).finished.then(t, t);
445
453
  }
446
- function Ie() {
454
+ function ze() {
447
455
  return typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
448
456
  }
449
457
  //#endregion
450
458
  //#region src/components/CrossButton.vue
451
- var Le = {
452
- mixins: [F, Pe],
459
+ var Be = {
460
+ mixins: [M, Le],
453
461
  props: { size: {
454
462
  type: String,
455
463
  required: !0,
456
464
  validator: (e) => ["small", "large"].includes(e)
457
465
  } },
458
466
  emits: ["clicked"]
459
- }, Re = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" }, ze = { class: "bb:flex bb:rounded-md bb:group-focus-visible:focus-ring bb:pointer-events-none bb:cursor-default" };
460
- function Be(e, t, n, r, s, c) {
467
+ }, Ve = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" }, He = { class: "bb:flex bb:rounded-md bb:group-focus-visible:focus-ring bb:pointer-events-none bb:cursor-default" };
468
+ function Ue(e, t, n, r, s, c) {
461
469
  return f(), i("button", {
462
470
  type: "button",
463
471
  class: "bb-dashboard-ui bb:group bb:flex bb:items-center bb:justify-center bb:bg-transparent bb:cursor-pointer bb:text-gray-400 bb:focus:outline-hidden bb:hover:text-gray-500",
464
472
  onClick: t[0] ||= C((...t) => e.press && e.press(...t), ["prevent"])
465
- }, [a("span", Re, [m(e.$slots, "default", {}, () => [o(_(e.texts.clear), 1)])]), a("span", ze, [(f(), i("svg", {
473
+ }, [a("span", Ve, [m(e.$slots, "default", {}, () => [o(_(e.texts.clear), 1)])]), a("span", He, [(f(), i("svg", {
466
474
  class: u(["bb:stroke-current bb:pointer-events-none bb:cursor-default", {
467
475
  "bb:w-6 bb:h-6": n.size === "small",
468
476
  "bb:w-8 bb:h-8": n.size === "large"
@@ -477,24 +485,24 @@ function Be(e, t, n, r, s, c) {
477
485
  d: "M6 18L18 6M6 6l12 12"
478
486
  }, null, -1)]], 2))])]);
479
487
  }
480
- var I = /*#__PURE__*/ M(Le, [["render", Be]]), Ve = 10;
481
- function He(e) {
488
+ var N = /*#__PURE__*/ k(Be, [["render", Ue]]), We = 10;
489
+ function Ge(e) {
482
490
  let t = e.replace(/\D/g, "");
483
- return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0, Ve);
491
+ return (t.startsWith("7") || t.startsWith("8")) && t[1] === "9" && (t = t.slice(1)), t.slice(0, We);
484
492
  }
485
- function L(e) {
493
+ function P(e) {
486
494
  return e === "" ? "" : `7${e}`;
487
495
  }
488
- function R(e) {
496
+ function F(e) {
489
497
  let t = e ?? "", n = t.startsWith("+") ? t.slice(1) : t;
490
498
  return n.startsWith("7") ? n.slice(1) : n;
491
499
  }
492
500
  //#endregion
493
501
  //#region src/components/RussianMobileFilter.vue
494
- var Ue = 400, We = 3, Ge = {
502
+ var Ke = 400, qe = 3, Je = {
495
503
  components: {
496
- ElementHeader: P,
497
- CrossButton: I
504
+ ElementHeader: j,
505
+ CrossButton: N
498
506
  },
499
507
  emits: ["update:modelValue", "changed"],
500
508
  props: {
@@ -516,10 +524,10 @@ var Ue = 400, We = 3, Ge = {
516
524
  }
517
525
  },
518
526
  data() {
519
- return { digits: R(this.modelValue) };
527
+ return { digits: F(this.modelValue) };
520
528
  },
521
529
  created() {
522
- this.mask = null, this.debounceTimer = null, this.isWritingProgrammatically = !1, this.lastCommitted = R(this.modelValue), this.isUnmounted = !1;
530
+ this.mask = null, this.debounceTimer = null, this.isWritingProgrammatically = !1, this.lastCommitted = F(this.modelValue), this.isUnmounted = !1;
523
531
  },
524
532
  mounted() {
525
533
  this.mask = re(this.$refs.input, {
@@ -527,21 +535,21 @@ var Ue = 400, We = 3, Ge = {
527
535
  lazy: !0,
528
536
  prepare: (e, t) => t.unmaskedValue === "" && (e === "7" || e === "8") ? "" : e
529
537
  }), this.mask.on("accept", () => {
530
- this.isWritingProgrammatically || (this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", L(this.digits)), this.scheduleCommit());
538
+ this.isWritingProgrammatically || (this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", P(this.digits)), this.scheduleCommit());
531
539
  }), this.syncFromModelValue(this.modelValue);
532
540
  },
533
541
  beforeUnmount() {
534
542
  this.isUnmounted = !0, clearTimeout(this.debounceTimer), this.mask?.destroy();
535
543
  },
536
544
  watch: { modelValue(e) {
537
- e !== L(this.digits) && this.syncFromModelValue(e);
545
+ e !== P(this.digits) && this.syncFromModelValue(e);
538
546
  } },
539
547
  methods: {
540
548
  syncFromModelValue(e) {
541
- this.writeToMask(R(e)), this.digits = this.mask.unmaskedValue, this.lastCommitted = this.digits;
549
+ this.writeToMask(F(e)), this.digits = this.mask.unmaskedValue, this.lastCommitted = this.digits;
542
550
  },
543
551
  applyUserDigits(e) {
544
- this.writeToMask(e), this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", L(this.digits));
552
+ this.writeToMask(e), this.digits = this.mask.unmaskedValue, this.$emit("update:modelValue", P(this.digits));
545
553
  },
546
554
  writeToMask(e) {
547
555
  if (this.isWritingProgrammatically = !0, e === "") this.mask.value = "";
@@ -564,7 +572,7 @@ var Ue = 400, We = 3, Ge = {
564
572
  this.isUnmounted || (this.setLazy(!0), this.digits === "" && this.writeToMask(""), this.commit());
565
573
  },
566
574
  onPaste(e) {
567
- this.applyUserDigits(He(e.clipboardData?.getData("text") ?? "")), this.scheduleCommit();
575
+ this.applyUserDigits(Ge(e.clipboardData?.getData("text") ?? "")), this.scheduleCommit();
568
576
  },
569
577
  moveFocusFromEraser() {
570
578
  let e = this.$refs.eraser.$el;
@@ -578,16 +586,16 @@ var Ue = 400, We = 3, Ge = {
578
586
  this.commit();
579
587
  return;
580
588
  }
581
- this.digits.length < We || (this.debounceTimer = setTimeout(() => this.commit(), Ue));
589
+ this.digits.length < qe || (this.debounceTimer = setTimeout(() => this.commit(), Ke));
582
590
  },
583
591
  commit() {
584
592
  clearTimeout(this.debounceTimer), this.digits !== this.lastCommitted && (this.lastCommitted = this.digits, this.$emit("changed"));
585
593
  }
586
594
  }
587
- }, Ke = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, qe = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Je = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Ye = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
588
- function Xe(e, t, n, r, o, c) {
595
+ }, Ye = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, Xe = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, Ze = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, Qe = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
596
+ function $e(e, t, n, r, o, c) {
589
597
  let l = h("element-header"), u = h("cross-button");
590
- return f(), i("div", Ke, [a("div", qe, [s(l, {
598
+ return f(), i("div", Ye, [a("div", Xe, [s(l, {
591
599
  text: n.header,
592
600
  "is-required": n.isRequired,
593
601
  "is-loading": n.isLoading
@@ -595,7 +603,7 @@ function Xe(e, t, n, r, o, c) {
595
603
  "text",
596
604
  "is-required",
597
605
  "is-loading"
598
- ]), a("div", Je, [a("label", Ye, [a("input", {
606
+ ]), a("div", Ze, [a("label", Qe, [a("input", {
599
607
  ref: "input",
600
608
  type: "tel",
601
609
  inputmode: "tel",
@@ -613,10 +621,10 @@ function Xe(e, t, n, r, o, c) {
613
621
  class: "bb:absolute bb:right-0 bb:top-0 bb:pr-2 bb:h-full"
614
622
  }, null, 8, ["onClicked"]), [[y, o.digits.length > 0]])])])]);
615
623
  }
616
- var Ze = /*#__PURE__*/ M(Ge, [["render", Xe]]), Qe = {
624
+ var et = /*#__PURE__*/ k(Je, [["render", $e]]), tt = {
617
625
  components: {
618
- ElementHeader: P,
619
- CrossButton: I
626
+ ElementHeader: j,
627
+ CrossButton: N
620
628
  },
621
629
  emits: ["update:modelValue", "changed"],
622
630
  props: {
@@ -658,10 +666,10 @@ var Ze = /*#__PURE__*/ M(Ge, [["render", Xe]]), Qe = {
658
666
  this.$emit("update:modelValue", this.search), this.$emit("changed");
659
667
  }
660
668
  }
661
- }, $e = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, et = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, tt = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, nt = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
662
- function rt(e, t, n, r, o, c) {
669
+ }, nt = { class: "bb-dashboard-ui bb:flex bb:flex-none" }, rt = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" }, it = { class: "bb:relative bb:flex bb:h-full bb:w-full" }, at = { class: "bb:flex bb:w-full bb:h-full bb:items-center bb:justify-center" };
670
+ function ot(e, t, n, r, o, c) {
663
671
  let l = h("element-header"), u = h("cross-button");
664
- return f(), i("div", $e, [a("div", et, [s(l, {
672
+ return f(), i("div", nt, [a("div", rt, [s(l, {
665
673
  text: n.header,
666
674
  "is-required": n.isRequired,
667
675
  "is-loading": n.isLoading
@@ -669,7 +677,7 @@ function rt(e, t, n, r, o, c) {
669
677
  "text",
670
678
  "is-required",
671
679
  "is-loading"
672
- ]), a("div", tt, [a("label", nt, [x(a("input", {
680
+ ]), a("div", it, [a("label", at, [x(a("input", {
673
681
  ref: "input",
674
682
  class: "bb:flex bb:w-full bb:h-full bb:px-3 bb:py-2 bb:cursor-pointer bb:truncate bb:focus:focus-ring bb:border-none",
675
683
  "onUpdate:modelValue": t[0] ||= (e) => o.search = e,
@@ -686,37 +694,37 @@ function rt(e, t, n, r, o, c) {
686
694
  class: "bb:absolute bb:right-0 bb:top-0 bb:pr-2 bb:h-full"
687
695
  }, null, 8, ["onClicked"]), [[y, c.inputNeedsEraser]])])])]);
688
696
  }
689
- var it = /*#__PURE__*/ M(Qe, [["render", rt]]), z = 4, B = 8;
690
- function V(e) {
697
+ var st = /*#__PURE__*/ k(tt, [["render", ot]]), I = 4, L = 8;
698
+ function ct(e) {
691
699
  return typeof e?.showPopover == "function";
692
700
  }
693
- function H(e) {
694
- return V(e) && e.matches(":popover-open");
701
+ function R(e) {
702
+ return ct(e) && e.matches(":popover-open");
695
703
  }
696
- function U(e, t, { maxWidth: n = null, align: r = "end", fitsBelow: i = !0, fitsRight: a = !0 } = {}) {
697
- let o = e.getBoundingClientRect(), s = document.documentElement.clientWidth, c = document.documentElement.clientHeight, l = Math.max(B, o.left), u = Math.max(B, s - o.right), d = Math.max(0, s - l - B), f = Math.max(0, s - u - B), p = r === "start" && (a || d >= f), m = Math.max(0, c - o.bottom - z - B), h = Math.max(0, o.top - z - B), g = i || m >= h, _ = "";
704
+ function lt(e, t, { maxWidth: n = null, align: r = "end", fitsBelow: i = !0, fitsRight: a = !0 } = {}) {
705
+ let o = e.getBoundingClientRect(), s = document.documentElement.clientWidth, c = document.documentElement.clientHeight, l = Math.max(L, o.left), u = Math.max(L, s - o.right), d = Math.max(0, s - l - L), f = Math.max(0, s - u - L), p = r === "start" && (a || d >= f), m = Math.max(0, c - o.bottom - I - L), h = Math.max(0, o.top - I - L), g = i || m >= h, _ = "";
698
706
  if (r === "start") {
699
707
  let e = p ? d : f;
700
708
  _ = `${n === null ? e : Math.min(n, e)}px`;
701
709
  } else n !== null && (_ = `${Math.min(n, f)}px`);
702
710
  Object.assign(t.style, {
703
- top: g ? `${o.bottom + z}px` : "auto",
704
- bottom: g ? "auto" : `${c - o.top + z}px`,
711
+ top: g ? `${o.bottom + I}px` : "auto",
712
+ bottom: g ? "auto" : `${c - o.top + I}px`,
705
713
  right: p ? "auto" : `${u}px`,
706
714
  left: p ? `${l}px` : "auto",
707
715
  maxHeight: `${g ? m : h}px`,
708
716
  maxWidth: _
709
717
  });
710
718
  }
711
- function at(e, t, n = {}) {
719
+ function ut(e, t, n = {}) {
712
720
  let r = t.scrollHeight <= t.clientHeight + 1, i = t.scrollWidth <= t.clientWidth + 1;
713
- r && i || U(e, t, {
721
+ r && i || lt(e, t, {
714
722
  ...n,
715
723
  fitsBelow: r,
716
724
  fitsRight: i
717
725
  });
718
726
  }
719
- function ot(e, t) {
727
+ function dt(e, t) {
720
728
  let n = (n) => {
721
729
  e.contains(n.target) || t();
722
730
  };
@@ -729,11 +737,11 @@ function ot(e, t) {
729
737
  }
730
738
  //#endregion
731
739
  //#region src/menuFocus.js
732
- var st = "a[href], button";
733
- function ct(e, t = () => null, n = null) {
740
+ var ft = "a[href], button";
741
+ function pt(e, t = () => null, n = null) {
734
742
  let r = (r) => {
735
743
  if (r.key !== "ArrowDown" && r.key !== "ArrowUp") return;
736
- let i = n === null ? [...e.querySelectorAll(st)] : n();
744
+ let i = n === null ? [...e.querySelectorAll(ft)] : n();
737
745
  if (i.length === 0) return;
738
746
  r.preventDefault();
739
747
  let a = r.key === "ArrowDown" ? 1 : -1, o = i.indexOf(document.activeElement);
@@ -743,7 +751,7 @@ function ct(e, t = () => null, n = null) {
743
751
  document.removeEventListener("keydown", r, !0);
744
752
  };
745
753
  }
746
- function lt(e) {
754
+ function mt(e) {
747
755
  let t = (t) => {
748
756
  if (t.key !== "Tab" || t.ctrlKey || t.altKey || t.metaKey) return;
749
757
  let n = e();
@@ -758,7 +766,7 @@ function lt(e) {
758
766
  }
759
767
  //#endregion
760
768
  //#region src/components/PopoverPanel.vue
761
- var ut = {
769
+ var ht = {
762
770
  emits: ["update:modelValue", "toggle"],
763
771
  props: {
764
772
  modelValue: {
@@ -859,11 +867,11 @@ var ut = {
859
867
  methods: {
860
868
  applyPanelState() {
861
869
  let e = this.$refs.panel;
862
- V(e) && e.isConnected && (this.panelIsOpen && !H(e) && e.showPopover(), !this.panelIsOpen && H(e) && e.hidePopover());
870
+ ct(e) && e.isConnected && (this.panelIsOpen && !R(e) && e.showPopover(), !this.panelIsOpen && R(e) && e.hidePopover());
863
871
  },
864
872
  close() {
865
873
  let e = this.$refs.panel;
866
- H(e) && e.hidePopover();
874
+ R(e) && e.hidePopover();
867
875
  },
868
876
  reportPanelShown(e) {
869
877
  this.panelShown !== e && (this.panelShown = e, this.$emit("toggle", e));
@@ -877,9 +885,9 @@ var ut = {
877
885
  maxWidth: this.maxWidth,
878
886
  align: this.align
879
887
  };
880
- this.$refs.panel.style.minWidth = "", this.$refs.panel.style.minHeight = "", this.$refs.panel.style.scrollbarGutter = "", U(e, this.$refs.panel, t), requestAnimationFrame(() => {
888
+ this.$refs.panel.style.minWidth = "", this.$refs.panel.style.minHeight = "", this.$refs.panel.style.scrollbarGutter = "", lt(e, this.$refs.panel, t), requestAnimationFrame(() => {
881
889
  let n = this.$refs.panel;
882
- if (H(n) && (at(e, n, t), this.keepSize)) {
890
+ if (R(n) && (ut(e, n, t), this.keepSize)) {
883
891
  n.scrollHeight > n.clientHeight + 1 && (n.style.scrollbarGutter = "stable");
884
892
  let e = n.getBoundingClientRect();
885
893
  n.style.minWidth = `${e.width}px`, n.style.top === "auto" && (n.style.minHeight = `${e.height}px`);
@@ -892,8 +900,8 @@ var ut = {
892
900
  },
893
901
  onToggle() {
894
902
  this.stopListening();
895
- let e = this.$refs.panel, t = H(e);
896
- t && (this.stopClosing = ot(e, this.close), this.arrows && (this.stopArrows = ct(e, this.findSelected, this.findStops)), this.findTabStops !== null && (this.stopTab = lt(this.findTabStops))), t || this.restoreFocus(e), this.reportPanelShown(t), t !== this.panelIsOpen && (this.panelIsOpen = t, this.$emit("update:modelValue", t));
903
+ let e = this.$refs.panel, t = R(e);
904
+ t && (this.stopClosing = dt(e, this.close), this.arrows && (this.stopArrows = pt(e, this.findSelected, this.findStops)), this.findTabStops !== null && (this.stopTab = mt(this.findTabStops))), t || this.restoreFocus(e), this.reportPanelShown(t), t !== this.panelIsOpen && (this.panelIsOpen = t, this.$emit("update:modelValue", t));
897
905
  },
898
906
  restoreFocus(e) {
899
907
  let t = this.focusWasInside;
@@ -905,10 +913,10 @@ var ut = {
905
913
  this.stopClosing !== null && (this.stopClosing(), this.stopClosing = null), this.stopArrows !== null && (this.stopArrows(), this.stopArrows = null), this.stopTab !== null && (this.stopTab(), this.stopTab = null);
906
914
  }
907
915
  }
908
- }, dt = {
916
+ }, gt = {
909
917
  key: 0,
910
918
  class: "bb:relative"
911
- }, ft = [
919
+ }, _t = [
912
920
  "id",
913
921
  "role",
914
922
  "aria-orientation",
@@ -916,8 +924,8 @@ var ut = {
916
924
  "aria-label",
917
925
  "tabindex"
918
926
  ];
919
- function pt(e, t, n, o, s, c) {
920
- return n.hasContent ? (f(), i("span", dt, [m(e.$slots, "trigger", {
927
+ function vt(e, t, n, o, s, c) {
928
+ return n.hasContent ? (f(), i("span", gt, [m(e.$slots, "trigger", {
921
929
  id: o.buttonId,
922
930
  popovertarget: o.panelId
923
931
  }), a("div", {
@@ -933,15 +941,15 @@ function pt(e, t, n, o, s, c) {
933
941
  onBeforetoggle: t[0] ||= (...e) => c.onBeforeToggle && c.onBeforeToggle(...e),
934
942
  onToggle: t[1] ||= (...e) => c.onToggle && c.onToggle(...e),
935
943
  onClick: t[2] ||= (...e) => c.onClick && c.onClick(...e)
936
- }, [m(e.$slots, "default")], 42, ft)])) : r("", !0);
944
+ }, [m(e.$slots, "default")], 42, _t)])) : r("", !0);
937
945
  }
938
- var W = /*#__PURE__*/ M(ut, [["render", pt]]);
946
+ var z = /*#__PURE__*/ k(ht, [["render", vt]]);
939
947
  //#endregion
940
948
  //#region src/date.js
941
- function G(e) {
949
+ function yt(e) {
942
950
  return `${String(e.getDate()).padStart(2, "0")}.${String(e.getMonth() + 1).padStart(2, "0")}.${String(e.getFullYear()).padStart(4, "0")}`;
943
951
  }
944
- function K(e) {
952
+ function bt(e) {
945
953
  let t = /^(\d{1,2})\.(\d{1,2})\.(\d{4})$/.exec(e);
946
954
  if (t === null) return null;
947
955
  let [, n, r, i] = t.map(Number), a = /* @__PURE__ */ new Date(0);
@@ -949,11 +957,11 @@ function K(e) {
949
957
  }
950
958
  //#endregion
951
959
  //#region src/dayFocus.js
952
- var q = ".pika-button.pika-day", mt = ".pika-button, .pika-prev, .pika-next";
953
- function ht(e, t = () => null) {
960
+ var xt = ".pika-button.pika-day", St = ".pika-button, .pika-prev, .pika-next";
961
+ function Ct(e, t = () => null) {
954
962
  let n = (n) => {
955
963
  if (n.detail !== 0) return;
956
- let r = n.target.closest(mt);
964
+ let r = n.target.closest(St);
957
965
  r !== null && e.contains(r) && setTimeout(() => {
958
966
  let n = document.activeElement === r;
959
967
  if (r.dispatchEvent(new MouseEvent("mousedown", {
@@ -966,46 +974,46 @@ function ht(e, t = () => null) {
966
974
  };
967
975
  return e.addEventListener("click", n), () => e.removeEventListener("click", n);
968
976
  }
969
- var gt = {
977
+ var wt = {
970
978
  ArrowLeft: -1,
971
979
  ArrowRight: 1,
972
980
  ArrowUp: -7,
973
981
  ArrowDown: 7
974
982
  };
975
- function _t(e, t) {
983
+ function Tt(e, t) {
976
984
  let n = (n) => {
977
- let r = gt[n.key];
978
- if (r === void 0 || vt(document.activeElement)) return;
985
+ let r = wt[n.key];
986
+ if (r === void 0 || Et(document.activeElement)) return;
979
987
  n.preventDefault();
980
- let i = document.activeElement?.closest(q) ?? null, a = i !== null && e.contains(i) ? bt(yt(i), r) : t.getDate() ?? xt();
981
- J(e, a) === null && t.gotoDate(a), J(e, a)?.focus();
988
+ let i = document.activeElement?.closest(xt) ?? null, a = i !== null && e.contains(i) ? Ot(Dt(i), r) : t.getDate() ?? kt();
989
+ At(e, a) === null && t.gotoDate(a), At(e, a)?.focus();
982
990
  };
983
991
  return document.addEventListener("keydown", n, !0), () => document.removeEventListener("keydown", n, !0);
984
992
  }
985
- function vt(e) {
993
+ function Et(e) {
986
994
  return e !== null && e.matches("input, select, textarea, [contenteditable]");
987
995
  }
988
- function yt(e) {
996
+ function Dt(e) {
989
997
  return new Date(e.dataset.pikaYear, e.dataset.pikaMonth, e.dataset.pikaDay);
990
998
  }
991
- function bt(e, t) {
999
+ function Ot(e, t) {
992
1000
  return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t);
993
1001
  }
994
- function xt() {
1002
+ function kt() {
995
1003
  let e = /* @__PURE__ */ new Date();
996
1004
  return new Date(e.getFullYear(), e.getMonth(), e.getDate());
997
1005
  }
998
- function J(e, t) {
999
- return e.querySelector(`${q}[data-pika-year="${t.getFullYear()}"][data-pika-month="${t.getMonth()}"][data-pika-day="${t.getDate()}"]`);
1006
+ function At(e, t) {
1007
+ return e.querySelector(`${xt}[data-pika-year="${t.getFullYear()}"][data-pika-month="${t.getMonth()}"][data-pika-day="${t.getDate()}"]`);
1000
1008
  }
1001
1009
  //#endregion
1002
1010
  //#region src/components/SelectDate.vue
1003
- var St = {
1011
+ var jt = {
1004
1012
  components: {
1005
- PopoverPanel: W,
1006
- CrossButton: I
1013
+ PopoverPanel: z,
1014
+ CrossButton: N
1007
1015
  },
1008
- mixins: [F],
1016
+ mixins: [M],
1009
1017
  emits: ["update:modelValue", "changed"],
1010
1018
  props: {
1011
1019
  modelValue: {
@@ -1036,8 +1044,8 @@ var St = {
1036
1044
  keyboardInput: !1,
1037
1045
  bound: !1,
1038
1046
  firstDay: 1,
1039
- parse: (e) => K(e),
1040
- toString: (e) => G(e),
1047
+ parse: (e) => bt(e),
1048
+ toString: (e) => yt(e),
1041
1049
  i18n: {
1042
1050
  previousMonth: this.texts.previousMonth,
1043
1051
  nextMonth: this.texts.nextMonth,
@@ -1046,9 +1054,9 @@ var St = {
1046
1054
  weekdaysShort: this.texts.weekdaysShort
1047
1055
  },
1048
1056
  onSelect: (e) => {
1049
- this.popupIsOpen = !1, this.$emit("update:modelValue", G(e)), this.$emit("changed");
1057
+ this.popupIsOpen = !1, this.$emit("update:modelValue", yt(e)), this.$emit("changed");
1050
1058
  }
1051
- }), this.stopPickOnClick = ht(this.$refs.container, () => this.$refs.trigger), this.syncDayFocus());
1059
+ }), this.stopPickOnClick = Ct(this.$refs.container, () => this.$refs.trigger), this.syncDayFocus());
1052
1060
  },
1053
1061
  beforeUnmount() {
1054
1062
  this.isUnmounted = !0, this.stopPickOnClick?.(), this.stopDayFocus?.(), this.picker?.destroy();
@@ -1077,11 +1085,11 @@ var St = {
1077
1085
  ].includes(e.key) && (e.preventDefault(), this.$refs.trigger.focus({ preventScroll: !0 }), this.popupIsOpen = !0);
1078
1086
  },
1079
1087
  syncDayFocus() {
1080
- this.stopDayFocus?.(), this.stopDayFocus = null, this.popupIsOpen && this.picker !== null && (this.stopDayFocus = _t(this.$refs.container, this.picker));
1088
+ this.stopDayFocus?.(), this.stopDayFocus = null, this.popupIsOpen && this.picker !== null && (this.stopDayFocus = Tt(this.$refs.container, this.picker));
1081
1089
  },
1082
1090
  syncPicker(e) {
1083
1091
  if (this.picker === null) return;
1084
- let t = K(e);
1092
+ let t = bt(e);
1085
1093
  if (t === null) {
1086
1094
  this.picker.clear();
1087
1095
  return;
@@ -1107,22 +1115,22 @@ var St = {
1107
1115
  return !this.withEraser || this.popupIsOpen ? !1 : this.hasValue;
1108
1116
  }
1109
1117
  }
1110
- }, Ct = { class: "bb-dashboard-ui bb:flex bb:flex-col" }, wt = { class: "bb:relative bb:flex bb:h-full" }, Tt = [
1118
+ }, Mt = { class: "bb-dashboard-ui bb:flex bb:flex-col" }, Nt = { class: "bb:relative bb:flex bb:h-full" }, Pt = [
1111
1119
  "id",
1112
1120
  "popovertarget",
1113
1121
  "aria-labelledby"
1114
- ], Et = ["textContent"], Dt = { class: "bb:flex bb:w-full bb:items-center bb:leading-none bb:min-w-24 bb:pointer-events-none" }, Ot = [
1122
+ ], Ft = ["textContent"], It = { class: "bb:flex bb:w-full bb:items-center bb:leading-none bb:min-w-24 bb:pointer-events-none" }, Lt = [
1115
1123
  "disabled",
1116
1124
  "value",
1117
1125
  "placeholder",
1118
1126
  "aria-labelledby"
1119
- ], kt = {
1127
+ ], Rt = {
1120
1128
  ref: "container",
1121
1129
  class: "bb:flex"
1122
1130
  };
1123
- function At(e, t, o, c, l, u) {
1131
+ function zt(e, t, o, c, l, u) {
1124
1132
  let d = h("popover-panel"), p = h("cross-button");
1125
- return f(), i("div", Ct, [a("div", wt, [s(d, {
1133
+ return f(), i("div", Mt, [a("div", Nt, [s(d, {
1126
1134
  class: "bb:flex bb:w-full",
1127
1135
  modelValue: l.popupIsOpen,
1128
1136
  "onUpdate:modelValue": t[1] ||= (e) => l.popupIsOpen = e,
@@ -1140,7 +1148,7 @@ function At(e, t, o, c, l, u) {
1140
1148
  }, [a("span", {
1141
1149
  class: "bb:sr-only bb:pointer-events-none bb:cursor-default",
1142
1150
  textContent: _(u.triggerLabel)
1143
- }, null, 8, Et)], 8, Tt), a("label", Dt, [a("input", {
1151
+ }, null, 8, Ft)], 8, Pt), a("label", It, [a("input", {
1144
1152
  disabled: l.popupIsOpen,
1145
1153
  ref: "field",
1146
1154
  onKeydown: t[0] ||= (...e) => u.openOnKey && u.openOnKey(...e),
@@ -1149,8 +1157,8 @@ function At(e, t, o, c, l, u) {
1149
1157
  placeholder: o.placeholderText,
1150
1158
  "aria-labelledby": o.labelledBy || null,
1151
1159
  class: "bb:w-full bb:h-full bb:py-2 bb:pl-3 bb:pr-3 bb:leading-none bb:border bb:border-transparent bb:whitespace-nowrap bb:bg-transparent bb:placeholder:text-sm bb:placeholder-gray-300 bb:cursor-pointer bb:focus:focus-ring bb:rounded-[var(--bb-field-radius,0)]"
1152
- }, null, 40, Ot)])]),
1153
- default: b(() => [a("div", kt, null, 512)]),
1160
+ }, null, 40, Lt)])]),
1161
+ default: b(() => [a("div", Rt, null, 512)]),
1154
1162
  _: 1
1155
1163
  }, 8, ["modelValue"]), u.needsEraser ? (f(), n(p, {
1156
1164
  key: 0,
@@ -1161,10 +1169,10 @@ function At(e, t, o, c, l, u) {
1161
1169
  lang: e.resolvedLang
1162
1170
  }, null, 8, ["onClicked", "lang"])) : r("", !0)])]);
1163
1171
  }
1164
- var Y = /*#__PURE__*/ M(St, [["render", At]]), jt = {
1172
+ var B = /*#__PURE__*/ k(jt, [["render", zt]]), Bt = {
1165
1173
  components: {
1166
- ElementHeader: P,
1167
- SelectDate: Y
1174
+ ElementHeader: j,
1175
+ SelectDate: B
1168
1176
  },
1169
1177
  emits: ["update:modelValue", "changed"],
1170
1178
  props: {
@@ -1189,10 +1197,10 @@ var Y = /*#__PURE__*/ M(St, [["render", At]]), jt = {
1189
1197
  default: null
1190
1198
  }
1191
1199
  }
1192
- }, Mt = { class: "bb-dashboard-ui bb:flex bb:w-fit bb:h-18 bb:border bb:border-gray-200" }, Nt = { class: "bb:flex bb:border bb:border-white" }, Pt = { class: "bb:flex bb:flex-col bb:w-36 bb:bg-white bb:h-full" };
1193
- function Ft(e, t, n, r, o, c) {
1200
+ }, Vt = { class: "bb-dashboard-ui bb:flex bb:w-fit bb:h-18 bb:border bb:border-gray-200" }, Ht = { class: "bb:flex bb:border bb:border-white" }, Ut = { class: "bb:flex bb:flex-col bb:w-36 bb:bg-white bb:h-full" };
1201
+ function Wt(e, t, n, r, o, c) {
1194
1202
  let l = h("element-header"), u = h("select-date");
1195
- return f(), i("div", Mt, [a("div", Nt, [a("div", Pt, [s(l, {
1203
+ return f(), i("div", Vt, [a("div", Ht, [a("div", Ut, [s(l, {
1196
1204
  text: n.header ?? "",
1197
1205
  "is-required": n.isRequired,
1198
1206
  "is-loading": n.isLoading
@@ -1208,10 +1216,10 @@ function Ft(e, t, n, r, o, c) {
1208
1216
  onChanged: t[1] ||= (t) => e.$emit("changed")
1209
1217
  }, null, 8, ["model-value", "lang"])])])]);
1210
1218
  }
1211
- var It = /*#__PURE__*/ M(jt, [["render", Ft]]), Lt = {
1219
+ var Gt = /*#__PURE__*/ k(Bt, [["render", Wt]]), Kt = {
1212
1220
  components: {
1213
- Dot: N,
1214
- SelectDate: Y
1221
+ Dot: A,
1222
+ SelectDate: B
1215
1223
  },
1216
1224
  emits: ["update:modelValue", "changed"],
1217
1225
  props: {
@@ -1235,17 +1243,17 @@ var It = /*#__PURE__*/ M(jt, [["render", Ft]]), Lt = {
1235
1243
  setup() {
1236
1244
  return { labelId: v() };
1237
1245
  }
1238
- }, Rt = { class: "bb-dashboard-ui" }, zt = { class: "bb:flex bb:items-center" }, Bt = ["id", "textContent"], Vt = { class: "bb:mt-1 bb:flex bb:h-9.5 bb:w-full bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:shadow-xs bb:text-sm bb:[--bb-field-radius:0.375rem]" };
1239
- function Ht(e, t, n, r, o, c) {
1246
+ }, qt = { class: "bb-dashboard-ui" }, Jt = { class: "bb:flex bb:items-center" }, Yt = ["id", "textContent"], Xt = { class: "bb:mt-1 bb:flex bb:h-9.5 bb:w-full bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:shadow-xs bb:text-sm bb:[--bb-field-radius:0.375rem]" };
1247
+ function Zt(e, t, n, r, o, c) {
1240
1248
  let l = h("dot"), u = h("select-date");
1241
- return f(), i("div", Rt, [a("div", zt, [a("span", {
1249
+ return f(), i("div", qt, [a("div", Jt, [a("span", {
1242
1250
  id: r.labelId,
1243
1251
  class: "bb:block bb:text-sm bb:font-medium bb:leading-5 bb:text-gray-700",
1244
1252
  textContent: _(n.label ?? "")
1245
- }, null, 8, Bt), x(s(l, {
1253
+ }, null, 8, Yt), x(s(l, {
1246
1254
  color: "red",
1247
1255
  class: "bb:ml-2"
1248
- }, null, 512), [[y, n.isRequired]])]), a("div", Vt, [s(u, {
1256
+ }, null, 512), [[y, n.isRequired]])]), a("div", Xt, [s(u, {
1249
1257
  class: "bb:flex-1",
1250
1258
  "model-value": n.modelValue,
1251
1259
  "labelled-by": r.labelId,
@@ -1258,9 +1266,9 @@ function Ht(e, t, n, r, o, c) {
1258
1266
  "lang"
1259
1267
  ])])]);
1260
1268
  }
1261
- var Ut = /*#__PURE__*/ M(Lt, [["render", Ht]]), Wt = {
1269
+ var Qt = /*#__PURE__*/ k(Kt, [["render", Zt]]), $t = {
1262
1270
  inheritAttrs: !1,
1263
- mixins: [F],
1271
+ mixins: [M],
1264
1272
  emits: [
1265
1273
  "update:dateFrom",
1266
1274
  "update:dateTo",
@@ -1317,17 +1325,17 @@ var Ut = /*#__PURE__*/ M(Lt, [["render", Ht]]), Wt = {
1317
1325
  }
1318
1326
  }
1319
1327
  };
1320
- function Gt(e, t, n, r, i, a) {
1328
+ function en(e, t, n, r, i, a) {
1321
1329
  return m(e.$slots, "default", {
1322
1330
  from: a.from,
1323
1331
  to: a.to
1324
1332
  });
1325
1333
  }
1326
- var X = /*#__PURE__*/ M(Wt, [["render", Gt]]), Kt = {
1334
+ var tn = /*#__PURE__*/ k($t, [["render", en]]), nn = {
1327
1335
  components: {
1328
- ElementHeader: P,
1329
- SelectDate: Y,
1330
- SelectDateInterval: X
1336
+ ElementHeader: j,
1337
+ SelectDate: B,
1338
+ SelectDateInterval: tn
1331
1339
  },
1332
1340
  emits: [
1333
1341
  "update:dateFrom",
@@ -1360,10 +1368,10 @@ var X = /*#__PURE__*/ M(Wt, [["render", Gt]]), Kt = {
1360
1368
  default: null
1361
1369
  }
1362
1370
  }
1363
- }, qt = { class: "bb-dashboard-ui bb:flex bb:w-fit bb:h-18 bb:border bb:border-gray-200" }, Jt = { class: "bb:flex bb:border bb:border-white" }, Yt = { class: "bb:flex bb:flex-col bb:min-w-72 bb:w-72 bb:bg-white bb:h-full" }, Xt = { class: "bb:flex bb:h-full bb:divide-x bb:divide-gray-200" };
1364
- function Zt(e, t, n, r, o, c) {
1371
+ }, rn = { class: "bb-dashboard-ui bb:flex bb:w-fit bb:h-18 bb:border bb:border-gray-200" }, an = { class: "bb:flex bb:border bb:border-white" }, on = { class: "bb:flex bb:flex-col bb:min-w-72 bb:w-72 bb:bg-white bb:h-full" }, sn = { class: "bb:flex bb:h-full bb:divide-x bb:divide-gray-200" };
1372
+ function cn(e, t, n, r, o, c) {
1365
1373
  let l = h("element-header"), u = h("select-date"), d = h("select-date-interval");
1366
- return f(), i("div", qt, [a("div", Jt, [a("div", Yt, [s(l, {
1374
+ return f(), i("div", rn, [a("div", an, [a("div", on, [s(l, {
1367
1375
  text: n.header ?? "",
1368
1376
  "is-required": n.isRequired,
1369
1377
  "is-loading": n.isLoading
@@ -1379,7 +1387,7 @@ function Zt(e, t, n, r, o, c) {
1379
1387
  "onUpdate:dateTo": t[1] ||= (t) => e.$emit("update:dateTo", t),
1380
1388
  onChanged: t[2] ||= (t) => e.$emit("changed")
1381
1389
  }, {
1382
- default: b(({ from: e, to: t }) => [a("div", Xt, [s(u, {
1390
+ default: b(({ from: e, to: t }) => [a("div", sn, [s(u, {
1383
1391
  class: "bb:flex-1 bb:min-w-36",
1384
1392
  "model-value": e.value,
1385
1393
  "placeholder-text": e.placeholder,
@@ -1409,11 +1417,11 @@ function Zt(e, t, n, r, o, c) {
1409
1417
  "lang"
1410
1418
  ])])])]);
1411
1419
  }
1412
- var Qt = /*#__PURE__*/ M(Kt, [["render", Zt]]), $t = {
1420
+ var ln = /*#__PURE__*/ k(nn, [["render", cn]]), un = {
1413
1421
  components: {
1414
- Dot: N,
1415
- SelectDate: Y,
1416
- SelectDateInterval: X
1422
+ Dot: A,
1423
+ SelectDate: B,
1424
+ SelectDateInterval: tn
1417
1425
  },
1418
1426
  emits: [
1419
1427
  "update:dateFrom",
@@ -1445,14 +1453,14 @@ var Qt = /*#__PURE__*/ M(Kt, [["render", Zt]]), $t = {
1445
1453
  setup() {
1446
1454
  return { labelId: v() };
1447
1455
  }
1448
- }, en = { class: "bb-dashboard-ui" }, tn = { class: "bb:flex bb:items-center" }, nn = ["id", "textContent"], rn = ["aria-labelledby"], an = { class: "bb:flex bb:h-9.5 bb:w-full bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:shadow-xs bb:text-sm bb:[--bb-field-radius:0.375rem]" }, on = { class: "bb:flex bb:h-9.5 bb:w-full bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:shadow-xs bb:text-sm bb:[--bb-field-radius:0.375rem]" };
1449
- function sn(e, t, n, r, o, c) {
1456
+ }, dn = { class: "bb-dashboard-ui" }, fn = { class: "bb:flex bb:items-center" }, pn = ["id", "textContent"], mn = ["aria-labelledby"], hn = { class: "bb:flex bb:h-9.5 bb:w-full bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:shadow-xs bb:text-sm bb:[--bb-field-radius:0.375rem]" }, gn = { class: "bb:flex bb:h-9.5 bb:w-full bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:shadow-xs bb:text-sm bb:[--bb-field-radius:0.375rem]" };
1457
+ function _n(e, t, n, r, o, c) {
1450
1458
  let l = h("dot"), u = h("select-date"), d = h("select-date-interval");
1451
- return f(), i("div", en, [a("div", tn, [a("span", {
1459
+ return f(), i("div", dn, [a("div", fn, [a("span", {
1452
1460
  id: r.labelId,
1453
1461
  class: "bb:block bb:text-sm bb:font-medium bb:leading-5 bb:text-gray-700",
1454
1462
  textContent: _(n.label ?? "")
1455
- }, null, 8, nn), x(s(l, {
1463
+ }, null, 8, pn), x(s(l, {
1456
1464
  color: "red",
1457
1465
  class: "bb:ml-2"
1458
1466
  }, null, 512), [[y, n.isRequired]])]), a("div", {
@@ -1467,7 +1475,7 @@ function sn(e, t, n, r, o, c) {
1467
1475
  "onUpdate:dateTo": t[1] ||= (t) => e.$emit("update:dateTo", t),
1468
1476
  onChanged: t[2] ||= (t) => e.$emit("changed")
1469
1477
  }, {
1470
- default: b(({ from: e, to: t }) => [a("div", an, [s(u, {
1478
+ default: b(({ from: e, to: t }) => [a("div", hn, [s(u, {
1471
1479
  class: "bb:flex-1",
1472
1480
  "model-value": e.value,
1473
1481
  "placeholder-text": e.placeholder,
@@ -1478,7 +1486,7 @@ function sn(e, t, n, r, o, c) {
1478
1486
  "placeholder-text",
1479
1487
  "lang",
1480
1488
  "onUpdate:modelValue"
1481
- ])]), a("div", on, [s(u, {
1489
+ ])]), a("div", gn, [s(u, {
1482
1490
  class: "bb:flex-1",
1483
1491
  "model-value": t.value,
1484
1492
  "placeholder-text": t.placeholder,
@@ -1495,12 +1503,62 @@ function sn(e, t, n, r, o, c) {
1495
1503
  "date-from",
1496
1504
  "date-to",
1497
1505
  "lang"
1498
- ])], 8, rn)]);
1506
+ ])], 8, mn)]);
1499
1507
  }
1500
- var cn = /*#__PURE__*/ M($t, [["render", sn]]), ln = {
1508
+ var vn = /*#__PURE__*/ k(un, [["render", _n]]), yn = {
1509
+ props: { withSearch: {
1510
+ type: Boolean,
1511
+ default: !1
1512
+ } },
1513
+ data() {
1514
+ return { query: "" };
1515
+ },
1516
+ watch: { hasItems(e) {
1517
+ e || (this.query = "");
1518
+ } },
1519
+ computed: { visibleItems() {
1520
+ let e = this.withSearch ? this.query.trim().toLowerCase() : "";
1521
+ return e === "" ? this.itemList : this.itemList.filter((t) => this.itemName(t).toLowerCase().includes(e));
1522
+ } },
1523
+ methods: {
1524
+ itemName(e) {
1525
+ return String(e.name ?? "");
1526
+ },
1527
+ itemElements() {
1528
+ return this.$refs.list ? [...this.$refs.list.querySelectorAll(":scope > button")] : [];
1529
+ },
1530
+ searchInput() {
1531
+ return this.$refs.search?.inputElement() ?? null;
1532
+ },
1533
+ searchStops() {
1534
+ return [...this.$refs.search ? [this.$refs.search.inputElement()] : [], ...this.itemElements()];
1535
+ },
1536
+ tabStops() {
1537
+ let e = this.$refs.search ? [this.$refs.search.inputElement()] : [], t = this.$refs.search && this.query !== "" ? [this.$refs.search.eraserElement()] : [];
1538
+ return [
1539
+ ...e,
1540
+ ...t,
1541
+ ...this.itemElements()
1542
+ ];
1543
+ },
1544
+ onSearchToggle(e) {
1545
+ e && this.withSearch && this.$refs.search.focus(), e || (this.query = "");
1546
+ },
1547
+ onListKeydown(e) {
1548
+ if (!(!this.withSearch || e.ctrlKey || e.metaKey || e.altKey || e.isComposing)) {
1549
+ if (e.key === "Backspace") this.query = this.query.slice(0, -1);
1550
+ else if (e.key.length === 1 && e.key !== " ") this.query += e.key;
1551
+ else return;
1552
+ e.preventDefault(), this.$refs.search.focus(), this.$nextTick(() => {
1553
+ this.$refs.search.moveCaretToEnd();
1554
+ });
1555
+ }
1556
+ }
1557
+ }
1558
+ }, bn = {
1501
1559
  components: {
1502
- PopoverPanel: W,
1503
- CrossButton: I
1560
+ PopoverPanel: z,
1561
+ CrossButton: N
1504
1562
  },
1505
1563
  emits: [
1506
1564
  "update:isOpen",
@@ -1520,6 +1578,10 @@ var cn = /*#__PURE__*/ M($t, [["render", sn]]), ln = {
1520
1578
  type: Boolean,
1521
1579
  default: !0
1522
1580
  },
1581
+ withArrow: {
1582
+ type: Boolean,
1583
+ default: !1
1584
+ },
1523
1585
  findSelected: {
1524
1586
  type: Function,
1525
1587
  default: () => null
@@ -1552,14 +1614,22 @@ var cn = /*#__PURE__*/ M($t, [["render", sn]]), ln = {
1552
1614
  let e = this.$refs.eraser.$el;
1553
1615
  document.activeElement === e && e.matches(":focus-visible") && this.$refs.trigger.focus({ preventScroll: !0 }), this.$emit("erased");
1554
1616
  } }
1555
- }, un = { class: "bb:flex bb:flex-col bb:grow" }, dn = { class: "bb:relative bb:flex bb:w-full bb:h-full" }, fn = [
1617
+ }, xn = { class: "bb:flex bb:flex-col bb:grow" }, Sn = { class: "bb:relative bb:flex bb:w-full bb:h-full" }, Cn = [
1556
1618
  "id",
1557
1619
  "popovertarget",
1558
1620
  "aria-labelledby"
1559
- ], pn = ["textContent"];
1560
- function mn(e, t, o, c, l, u) {
1621
+ ], wn = {
1622
+ key: 0,
1623
+ class: "bb:flex bb:w-full bb:min-w-0 bb:h-full bb:pl-3 bb:pr-7 bb:py-2 bb:items-center bb:whitespace-nowrap bb:leading-none bb:pointer-events-none bb:cursor-default"
1624
+ }, Tn = ["textContent"], En = ["textContent"], Dn = {
1625
+ key: 2,
1626
+ class: "bb:absolute bb:right-3 bb:top-1/2 bb:-translate-y-1/2 bb:w-2 bb:h-1.5 bb:fill-current bb:text-gray-500 bb:pointer-events-none bb:cursor-default",
1627
+ viewBox: "0 0 8 6",
1628
+ "aria-hidden": "true"
1629
+ };
1630
+ function On(e, t, o, c, l, u) {
1561
1631
  let d = h("popover-panel"), p = h("cross-button");
1562
- return f(), i("div", un, [a("div", dn, [s(d, {
1632
+ return f(), i("div", xn, [a("div", Sn, [s(d, {
1563
1633
  class: "bb:flex bb:w-full bb:h-full",
1564
1634
  "model-value": o.isOpen,
1565
1635
  align: "start",
@@ -1580,10 +1650,14 @@ function mn(e, t, o, c, l, u) {
1580
1650
  popovertarget: e.popovertarget,
1581
1651
  "aria-labelledby": o.labelledBy ? o.labelledBy + " " + e.id : null,
1582
1652
  class: "bb:flex bb:w-full bb:h-full bb:items-center bb:focus-visible:focus-ring bb:cursor-pointer bb:rounded-[var(--bb-field-radius,0)]"
1583
- }, [a("span", {
1653
+ }, [o.withArrow ? (f(), i("span", wn, [a("span", {
1654
+ class: "bb:truncate",
1655
+ textContent: _(o.title)
1656
+ }, null, 8, Tn)])) : (f(), i("span", {
1657
+ key: 1,
1584
1658
  class: "bb:flex bb:w-full bb:h-full bb:pl-3 bb:pr-12 bb:py-2 bb:items-center bb:whitespace-nowrap bb:leading-none bb:pointer-events-none bb:cursor-default",
1585
1659
  textContent: _(o.title)
1586
- }, null, 8, pn)], 8, fn)]),
1660
+ }, null, 8, En)), o.withArrow ? (f(), i("svg", Dn, [...t[2] ||= [a("path", { d: "M0 0h8L4 6z" }, null, -1)]])) : r("", !0)], 8, Cn)]),
1587
1661
  default: b(() => [m(e.$slots, "default")]),
1588
1662
  _: 3
1589
1663
  }, 8, [
@@ -1601,7 +1675,7 @@ function mn(e, t, o, c, l, u) {
1601
1675
  class: "bb:absolute bb:right-0 bb:top-0 bb:pr-2 bb:h-full"
1602
1676
  }, null, 8, ["lang", "onClicked"])) : r("", !0)])]);
1603
1677
  }
1604
- var hn = /*#__PURE__*/ M(ln, [["render", mn]]), gn = {
1678
+ var kn = /*#__PURE__*/ k(bn, [["render", On]]), An = {
1605
1679
  props: {
1606
1680
  isChecked: {
1607
1681
  type: Boolean,
@@ -1613,32 +1687,86 @@ var hn = /*#__PURE__*/ M(ln, [["render", mn]]), gn = {
1613
1687
  methods: { toggle() {
1614
1688
  this.$emit("clicked");
1615
1689
  } }
1616
- }, _n = { class: "bb:flex bb:w-9 bb:h-9 bb:items-center bb:justify-center bb:pointer-events-none bb:cursor-default" }, vn = {
1690
+ }, jn = { class: "bb:flex bb:w-9 bb:h-9 bb:items-center bb:justify-center bb:pointer-events-none bb:cursor-default" }, Mn = {
1617
1691
  class: "bb:w-5 bb:h-5 bb:fill-current bb:text-green-300",
1618
1692
  viewBox: "0 0 20 20",
1619
1693
  "aria-hidden": "true"
1620
- }, yn = ["textContent"];
1621
- function bn(e, t, n, r, o, s) {
1694
+ }, Nn = ["textContent"];
1695
+ function Pn(e, t, n, r, o, s) {
1622
1696
  return f(), i("button", {
1623
1697
  type: "button",
1624
1698
  onClick: t[0] ||= C((...e) => s.toggle && s.toggle(...e), ["prevent"]),
1625
1699
  class: "bb:flex bb:w-full bb:bg-white bb:cursor-pointer bb:focus:outline-hidden bb:hover:bg-indigo-100 bb:focus:bg-indigo-100"
1626
- }, [a("span", _n, [x((f(), i("svg", vn, [...t[1] ||= [a("path", {
1700
+ }, [a("span", jn, [x((f(), i("svg", Mn, [...t[1] ||= [a("path", {
1627
1701
  d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
1628
1702
  "clip-rule": "evenodd",
1629
1703
  "fill-rule": "evenodd"
1630
1704
  }, null, -1)]], 512)), [[y, n.isChecked]])]), a("span", {
1631
1705
  class: "bb:flex bb:h-9 bb:justify-center bb:items-center bb:pr-6 bb:whitespace-nowrap bb:select-none bb:pointer-events-none bb:cursor-default",
1632
1706
  textContent: _(n.name)
1633
- }, null, 8, yn)]);
1707
+ }, null, 8, Nn)]);
1708
+ }
1709
+ var Fn = /*#__PURE__*/ k(An, [["render", Pn]]), In = {
1710
+ components: { CrossButton: N },
1711
+ mixins: [M],
1712
+ emits: ["update:modelValue"],
1713
+ props: { modelValue: {
1714
+ type: String,
1715
+ default: ""
1716
+ } },
1717
+ computed: { query: {
1718
+ get() {
1719
+ return this.modelValue;
1720
+ },
1721
+ set(e) {
1722
+ this.$emit("update:modelValue", e);
1723
+ }
1724
+ } },
1725
+ methods: {
1726
+ focus() {
1727
+ this.$refs.input.focus({ preventScroll: !0 });
1728
+ },
1729
+ moveCaretToEnd() {
1730
+ let e = this.$refs.input.value.length;
1731
+ this.$refs.input.setSelectionRange(e, e);
1732
+ },
1733
+ inputElement() {
1734
+ return this.$refs.input;
1735
+ },
1736
+ eraserElement() {
1737
+ return this.$refs.eraser.$el;
1738
+ },
1739
+ clearQuery() {
1740
+ this.query = "", this.$refs.input.focus();
1741
+ }
1742
+ }
1743
+ }, Ln = { class: "bb:sticky bb:top-0 bb:min-w-56 bb:px-2 bb:py-2 bb:bg-white bb:border-b bb:border-gray-200" }, Rn = { class: "bb:relative" }, zn = ["placeholder", "aria-label"];
1744
+ function Bn(e, t, n, r, o, c) {
1745
+ let l = h("cross-button");
1746
+ return f(), i("div", Ln, [a("div", Rn, [x(a("input", {
1747
+ ref: "input",
1748
+ type: "text",
1749
+ autocomplete: "off",
1750
+ "onUpdate:modelValue": t[0] ||= (e) => c.query = e,
1751
+ placeholder: e.texts.search,
1752
+ "aria-label": e.texts.search,
1753
+ class: "bb:w-full bb:pl-3 bb:pr-9 bb:py-2 bb:text-sm bb:bg-white bb:border bb:border-gray-300 bb:rounded-md bb:focus:focus-ring",
1754
+ onKeydown: t[1] ||= S(C(() => {}, ["prevent"]), ["enter"])
1755
+ }, null, 40, zn), [[te, c.query]]), x(s(l, {
1756
+ ref: "eraser",
1757
+ size: "small",
1758
+ lang: e.lang,
1759
+ onClicked: c.clearQuery,
1760
+ class: "bb:absolute bb:right-0 bb:top-0 bb:pr-2 bb:h-full"
1761
+ }, null, 8, ["lang", "onClicked"]), [[y, c.query !== ""]])])]);
1634
1762
  }
1635
- var xn = /*#__PURE__*/ M(gn, [["render", bn]]), Sn = {
1763
+ var Vn = /*#__PURE__*/ k(In, [["render", Bn]]), Hn = {
1636
1764
  components: {
1637
- DropdownButton: hn,
1638
- ListElement: xn,
1639
- CrossButton: I
1765
+ DropdownButton: kn,
1766
+ ListElement: Fn,
1767
+ ListSearchField: Vn
1640
1768
  },
1641
- mixins: [F],
1769
+ mixins: [M, yn],
1642
1770
  emits: ["update:modelValue", "changed"],
1643
1771
  props: {
1644
1772
  items: {
@@ -1649,23 +1777,16 @@ var xn = /*#__PURE__*/ M(gn, [["render", bn]]), Sn = {
1649
1777
  type: Array,
1650
1778
  default: () => []
1651
1779
  },
1652
- withSearch: {
1653
- type: Boolean,
1654
- default: !1
1655
- },
1656
1780
  labelledBy: {
1657
1781
  type: String,
1658
1782
  default: null
1659
1783
  }
1660
1784
  },
1661
1785
  data() {
1662
- return {
1663
- isOpen: !1,
1664
- query: ""
1665
- };
1786
+ return { isOpen: !1 };
1666
1787
  },
1667
1788
  watch: { hasItems(e) {
1668
- e || (this.isOpen = !1, this.query = "");
1789
+ e || (this.isOpen = !1);
1669
1790
  } },
1670
1791
  computed: {
1671
1792
  itemList() {
@@ -1677,10 +1798,6 @@ var xn = /*#__PURE__*/ M(gn, [["render", bn]]), Sn = {
1677
1798
  selectedItems() {
1678
1799
  return this.itemList.filter((e) => this.selectedIds.includes(e.id));
1679
1800
  },
1680
- visibleItems() {
1681
- let e = this.withSearch ? this.query.trim().toLowerCase() : "";
1682
- return e === "" ? this.itemList : this.itemList.filter((t) => this.itemName(t).toLowerCase().includes(e));
1683
- },
1684
1801
  hasItems() {
1685
1802
  return this.itemList.length > 0;
1686
1803
  },
@@ -1689,101 +1806,55 @@ var xn = /*#__PURE__*/ M(gn, [["render", bn]]), Sn = {
1689
1806
  }
1690
1807
  },
1691
1808
  methods: {
1692
- itemName(e) {
1693
- return String(e.name ?? "");
1694
- },
1695
1809
  itemClicked(e) {
1696
1810
  this.itemElements()[this.visibleItems.indexOf(e)]?.focus({ preventScroll: !0 }), this.isOpen = !1, this.$emit("update:modelValue", this.selectedIds.includes(e.id) ? this.selectedIds.filter((t) => t !== e.id) : [...this.selectedIds, e.id]), this.$emit("changed");
1697
1811
  },
1698
1812
  clear() {
1699
1813
  this.$emit("update:modelValue", []), this.$emit("changed");
1700
1814
  },
1701
- itemElements() {
1702
- return this.$refs.list ? [...this.$refs.list.querySelectorAll(":scope > button")] : [];
1703
- },
1704
1815
  firstSelectedElement() {
1705
1816
  let e = this.visibleItems.findIndex((e) => this.selectedIds.includes(e.id));
1706
1817
  return e === -1 ? null : this.itemElements()[e];
1707
1818
  },
1708
1819
  arrowsOrigin() {
1709
- return this.firstSelectedElement() ?? this.$refs.search ?? null;
1710
- },
1711
- onToggle(e) {
1712
- e && this.withSearch && this.$refs.search.focus({ preventScroll: !0 }), e || (this.query = "");
1713
- },
1714
- searchStops() {
1715
- return [...this.$refs.search ? [this.$refs.search] : [], ...this.itemElements()];
1716
- },
1717
- tabStops() {
1718
- let e = this.$refs.search ? [this.$refs.search] : [], t = this.$refs.search && this.query !== "" ? [this.$refs.searchEraser.$el] : [];
1719
- return [
1720
- ...e,
1721
- ...t,
1722
- ...this.itemElements()
1723
- ];
1724
- },
1725
- onListKeydown(e) {
1726
- if (!(!this.withSearch || e.ctrlKey || e.metaKey || e.altKey || e.isComposing)) {
1727
- if (e.key === "Backspace") this.query = this.query.slice(0, -1);
1728
- else if (e.key.length === 1 && e.key !== " ") this.query += e.key;
1729
- else return;
1730
- e.preventDefault(), this.$refs.search.focus({ preventScroll: !0 }), this.$nextTick(() => {
1731
- let e = this.$refs.search.value.length;
1732
- this.$refs.search.setSelectionRange(e, e);
1733
- });
1734
- }
1735
- },
1736
- clearQuery() {
1737
- this.query = "", this.$refs.search.focus();
1820
+ return this.firstSelectedElement() ?? this.searchInput();
1738
1821
  }
1739
1822
  }
1740
- }, Cn = { class: "bb-dashboard-ui bb:flex bb:flex-col bb:grow" }, wn = {
1741
- key: 0,
1742
- class: "bb:sticky bb:top-0 bb:min-w-56 bb:px-2 bb:py-2 bb:bg-white bb:border-b bb:border-gray-200"
1743
- }, Tn = { class: "bb:relative" }, En = ["placeholder", "aria-label"], Dn = ["textContent"];
1744
- function On(t, o, c, l, u, d) {
1745
- let m = h("cross-button"), g = h("list-element"), v = h("dropdown-button");
1746
- return f(), i("div", Cn, [d.hasItems ? (f(), n(v, {
1823
+ }, Un = { class: "bb-dashboard-ui bb:flex bb:flex-col bb:grow" }, Wn = ["textContent"];
1824
+ function Gn(t, a, o, s, c, l) {
1825
+ let u = h("list-search-field"), d = h("list-element"), m = h("dropdown-button");
1826
+ return f(), i("div", Un, [l.hasItems ? (f(), n(m, {
1747
1827
  key: 0,
1748
- title: d.title,
1749
- "is-open": u.isOpen,
1750
- "onUpdate:isOpen": o[3] ||= (e) => u.isOpen = e,
1751
- "has-value": d.selectedItems.length > 0,
1752
- "labelled-by": c.labelledBy,
1753
- "find-selected": d.arrowsOrigin,
1754
- "find-stops": d.searchStops,
1755
- "find-tab-stops": d.tabStops,
1756
- "keep-size": c.withSearch,
1828
+ title: l.title,
1829
+ "is-open": c.isOpen,
1830
+ "onUpdate:isOpen": a[2] ||= (e) => c.isOpen = e,
1831
+ "has-value": l.selectedItems.length > 0,
1832
+ "labelled-by": o.labelledBy,
1833
+ "find-selected": l.arrowsOrigin,
1834
+ "find-stops": t.searchStops,
1835
+ "find-tab-stops": t.tabStops,
1836
+ "keep-size": t.withSearch,
1757
1837
  lang: t.lang,
1758
- onErased: d.clear,
1759
- onToggle: d.onToggle
1838
+ onErased: l.clear,
1839
+ onToggle: t.onSearchToggle
1760
1840
  }, {
1761
- default: b(() => [c.withSearch ? (f(), i("div", wn, [a("div", Tn, [x(a("input", {
1841
+ default: b(() => [t.withSearch ? (f(), n(u, {
1842
+ key: 0,
1762
1843
  ref: "search",
1763
- type: "text",
1764
- autocomplete: "off",
1765
- "onUpdate:modelValue": o[0] ||= (e) => u.query = e,
1766
- placeholder: t.texts.search,
1767
- "aria-label": t.texts.search,
1768
- class: "bb:w-full bb:pl-3 bb:pr-9 bb:py-2 bb:text-sm bb:bg-white bb:border bb:border-gray-300 bb:rounded-md bb:focus:focus-ring",
1769
- onKeydown: o[1] ||= S(C(() => {}, ["prevent"]), ["enter"])
1770
- }, null, 40, En), [[te, u.query]]), x(s(m, {
1771
- ref: "searchEraser",
1772
- size: "small",
1773
- lang: t.lang,
1774
- onClicked: d.clearQuery,
1775
- class: "bb:absolute bb:right-0 bb:top-0 bb:pr-2 bb:h-full"
1776
- }, null, 8, ["lang", "onClicked"]), [[y, u.query !== ""]])])])) : r("", !0), d.visibleItems.length > 0 ? (f(), i("div", {
1844
+ modelValue: t.query,
1845
+ "onUpdate:modelValue": a[0] ||= (e) => t.query = e,
1846
+ lang: t.lang
1847
+ }, null, 8, ["modelValue", "lang"])) : r("", !0), t.visibleItems.length > 0 ? (f(), i("div", {
1777
1848
  key: 1,
1778
1849
  ref: "list",
1779
1850
  class: "bb:flex bb:flex-col bb:py-1 bb:divide-y bb:divide-gray-200 bb:divide-dashed",
1780
- onKeydown: o[2] ||= (...e) => d.onListKeydown && d.onListKeydown(...e)
1781
- }, [(f(!0), i(e, null, p(d.visibleItems, (e) => (f(), n(g, {
1782
- name: d.itemName(e),
1851
+ onKeydown: a[1] ||= (...e) => t.onListKeydown && t.onListKeydown(...e)
1852
+ }, [(f(!0), i(e, null, p(t.visibleItems, (e) => (f(), n(d, {
1853
+ name: t.itemName(e),
1783
1854
  key: e.id,
1784
- "is-checked": d.selectedIds.includes(e.id),
1785
- "aria-pressed": d.selectedIds.includes(e.id),
1786
- onClicked: (t) => d.itemClicked(e)
1855
+ "is-checked": l.selectedIds.includes(e.id),
1856
+ "aria-pressed": l.selectedIds.includes(e.id),
1857
+ onClicked: (t) => l.itemClicked(e)
1787
1858
  }, null, 8, [
1788
1859
  "name",
1789
1860
  "is-checked",
@@ -1793,7 +1864,7 @@ function On(t, o, c, l, u, d) {
1793
1864
  key: 2,
1794
1865
  class: "bb:px-3 bb:py-2 bb:text-sm bb:text-gray-500 bb:text-center",
1795
1866
  textContent: _(t.texts.nothingFound)
1796
- }, null, 8, Dn))]),
1867
+ }, null, 8, Wn))]),
1797
1868
  _: 1
1798
1869
  }, 8, [
1799
1870
  "title",
@@ -1809,10 +1880,10 @@ function On(t, o, c, l, u, d) {
1809
1880
  "onToggle"
1810
1881
  ])) : r("", !0)]);
1811
1882
  }
1812
- var kn = /*#__PURE__*/ M(Sn, [["render", On]]), An = {
1883
+ var Kn = /*#__PURE__*/ k(Hn, [["render", Gn]]), qn = {
1813
1884
  components: {
1814
- ElementHeader: P,
1815
- SelectMultiple: kn
1885
+ ElementHeader: j,
1886
+ SelectMultiple: Kn
1816
1887
  },
1817
1888
  emits: ["update:modelValue", "changed"],
1818
1889
  props: {
@@ -1845,10 +1916,10 @@ var kn = /*#__PURE__*/ M(Sn, [["render", On]]), An = {
1845
1916
  default: null
1846
1917
  }
1847
1918
  }
1848
- }, jn = { class: "bb-dashboard-ui bb:flex bb:flex-none bb:w-fit bb:h-18 bb:border bb:border-gray-200" }, Mn = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" };
1849
- function Nn(e, t, n, r, o, c) {
1919
+ }, Jn = { class: "bb-dashboard-ui bb:flex bb:flex-none bb:w-fit bb:h-18 bb:border bb:border-gray-200" }, Yn = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" };
1920
+ function Xn(e, t, n, r, o, c) {
1850
1921
  let l = h("element-header"), u = h("select-multiple");
1851
- return f(), i("div", jn, [a("div", Mn, [s(l, {
1922
+ return f(), i("div", Jn, [a("div", Yn, [s(l, {
1852
1923
  text: n.header ?? "",
1853
1924
  "is-required": n.isRequired,
1854
1925
  "is-loading": n.isLoading
@@ -1870,10 +1941,10 @@ function Nn(e, t, n, r, o, c) {
1870
1941
  "lang"
1871
1942
  ])])]);
1872
1943
  }
1873
- var Pn = /*#__PURE__*/ M(An, [["render", Nn]]), Fn = {
1944
+ var Zn = /*#__PURE__*/ k(qn, [["render", Xn]]), Qn = {
1874
1945
  components: {
1875
- Dot: N,
1876
- SelectMultiple: kn
1946
+ Dot: A,
1947
+ SelectMultiple: Kn
1877
1948
  },
1878
1949
  emits: ["update:modelValue", "changed"],
1879
1950
  props: {
@@ -1905,17 +1976,17 @@ var Pn = /*#__PURE__*/ M(An, [["render", Nn]]), Fn = {
1905
1976
  setup() {
1906
1977
  return { labelId: v() };
1907
1978
  }
1908
- }, In = { class: "bb-dashboard-ui" }, Ln = { class: "bb:flex bb:items-center" }, Rn = ["id", "textContent"], zn = { class: "bb:mt-1 bb:h-9.5 bb:w-full bb:rounded-md bb:[--bb-field-radius:0.375rem] bb:border bb:border-gray-300 bb:bg-white bb:shadow-xs bb:text-sm bb:flex bb:flex-col" };
1909
- function Bn(e, t, n, r, o, c) {
1979
+ }, $n = { class: "bb-dashboard-ui" }, er = { class: "bb:flex bb:items-center" }, tr = ["id", "textContent"], nr = { class: "bb:mt-1 bb:h-9.5 bb:w-full bb:rounded-md bb:[--bb-field-radius:0.375rem] bb:border bb:border-gray-300 bb:bg-white bb:shadow-xs bb:text-sm bb:flex bb:flex-col" };
1980
+ function rr(e, t, n, r, o, c) {
1910
1981
  let l = h("dot"), u = h("select-multiple");
1911
- return f(), i("div", In, [a("div", Ln, [a("span", {
1982
+ return f(), i("div", $n, [a("div", er, [a("span", {
1912
1983
  id: r.labelId,
1913
1984
  class: "bb:block bb:text-sm bb:font-medium bb:leading-5 bb:text-gray-700",
1914
1985
  textContent: _(n.label ?? "")
1915
- }, null, 8, Rn), x(s(l, {
1986
+ }, null, 8, tr), x(s(l, {
1916
1987
  color: "red",
1917
1988
  class: "bb:ml-2"
1918
- }, null, 512), [[y, n.isRequired]])]), a("div", zn, [s(u, {
1989
+ }, null, 512), [[y, n.isRequired]])]), a("div", nr, [s(u, {
1919
1990
  items: n.items,
1920
1991
  "model-value": n.modelValue,
1921
1992
  "with-search": n.withSearch,
@@ -1931,11 +2002,130 @@ function Bn(e, t, n, r, o, c) {
1931
2002
  "labelled-by"
1932
2003
  ])])]);
1933
2004
  }
1934
- var Vn = /*#__PURE__*/ M(Fn, [["render", Bn]]), Hn = {
2005
+ var ir = /*#__PURE__*/ k(Qn, [["render", rr]]);
2006
+ function V(e) {
2007
+ return Number.isInteger(e) && e >= 1;
2008
+ }
2009
+ function H(e) {
2010
+ return V(e) ? e : 2;
2011
+ }
2012
+ function ar(e) {
2013
+ return { gridTemplateColumns: `repeat(${e}, minmax(0, 1fr))` };
2014
+ }
2015
+ function or(e, t) {
2016
+ let n = Math.floor(e / t), r = e % t, i = [];
2017
+ for (let e = 0; e < t; e++) {
2018
+ let t = e < r ? n + 1 : n;
2019
+ for (let n = 1; n <= t; n++) i.push({
2020
+ gridColumn: e + 1,
2021
+ gridRow: n
2022
+ });
2023
+ }
2024
+ return i;
2025
+ }
2026
+ //#endregion
2027
+ //#region src/components/SelectMultipleList.vue
2028
+ var sr = {
2029
+ components: { Dot: A },
2030
+ emits: ["update:modelValue", "changed"],
2031
+ props: {
2032
+ items: {
2033
+ type: Array,
2034
+ required: !0
2035
+ },
2036
+ modelValue: {
2037
+ type: Array,
2038
+ default: () => []
2039
+ },
2040
+ label: {
2041
+ type: String,
2042
+ required: !0
2043
+ },
2044
+ isRequired: {
2045
+ type: Boolean,
2046
+ default: !1
2047
+ },
2048
+ columns: {
2049
+ type: Number,
2050
+ default: 2,
2051
+ validator: V
2052
+ }
2053
+ },
2054
+ setup() {
2055
+ return { labelId: v() };
2056
+ },
2057
+ computed: {
2058
+ itemList() {
2059
+ return Array.isArray(this.items) ? this.items.filter((e) => typeof e == "object" && !!e) : [];
2060
+ },
2061
+ selectedIds() {
2062
+ return Array.isArray(this.modelValue) ? this.modelValue : [];
2063
+ },
2064
+ gridStyle() {
2065
+ return ar(H(this.columns));
2066
+ },
2067
+ itemStyles() {
2068
+ return or(this.itemList.length, H(this.columns));
2069
+ }
2070
+ },
2071
+ methods: {
2072
+ isChecked(e) {
2073
+ return this.selectedIds.includes(e.id);
2074
+ },
2075
+ itemName(e) {
2076
+ return String(e.name ?? "");
2077
+ },
2078
+ async toggle(e) {
2079
+ this.$emit("update:modelValue", this.isChecked(e) ? this.selectedIds.filter((t) => t !== e.id) : [...this.selectedIds, e.id]), this.$emit("changed"), await this.$nextTick(), this.syncChecked();
2080
+ },
2081
+ syncChecked() {
2082
+ this.$el.querySelectorAll("input").forEach((e, t) => {
2083
+ e.checked = this.isChecked(this.itemList[t]);
2084
+ });
2085
+ }
2086
+ }
2087
+ }, cr = { class: "bb-dashboard-ui" }, lr = { class: "bb:flex bb:items-center" }, ur = ["id", "textContent"], dr = ["aria-labelledby"], fr = { class: "bb:relative bb:flex bb:shrink-0" }, pr = ["checked", "onChange"], mr = {
2088
+ key: 0,
2089
+ class: "bb:pointer-events-none bb:absolute bb:inset-0 bb:size-4 bb:fill-white bb:forced-colors:hidden",
2090
+ viewBox: "0 0 16 16",
2091
+ "aria-hidden": "true"
2092
+ }, hr = ["textContent"];
2093
+ function gr(t, n, o, c, l, m) {
2094
+ let g = h("dot");
2095
+ return f(), i("div", cr, [a("div", lr, [a("span", {
2096
+ id: c.labelId,
2097
+ class: "bb:block bb:text-sm bb:font-medium bb:leading-5 bb:text-gray-700",
2098
+ textContent: _(o.label ?? "")
2099
+ }, null, 8, ur), x(s(g, {
2100
+ color: "red",
2101
+ class: "bb:ml-2"
2102
+ }, null, 512), [[y, o.isRequired]])]), m.itemList.length > 0 ? (f(), i("div", {
2103
+ key: 0,
2104
+ role: "group",
2105
+ "aria-labelledby": c.labelId,
2106
+ class: "bb:mt-1 bb:grid bb:gap-x-4 bb:gap-y-2",
2107
+ style: d(m.gridStyle)
2108
+ }, [(f(!0), i(e, null, p(m.itemList, (e, t) => (f(), i("label", {
2109
+ key: t,
2110
+ style: d(m.itemStyles[t]),
2111
+ class: "bb:flex bb:items-center"
2112
+ }, [a("span", fr, [a("input", {
2113
+ type: "checkbox",
2114
+ checked: m.isChecked(e),
2115
+ class: u(["bb:size-4 bb:rounded bb:border bb:bg-none bb:focus-visible:focus-ring bb:forced-colors:appearance-auto", m.isChecked(e) ? "bb:border-indigo-600 bb:bg-indigo-600" : "bb:border-gray-300 bb:bg-white"]),
2116
+ onChange: (t) => m.toggle(e)
2117
+ }, null, 42, pr), m.isChecked(e) ? (f(), i("svg", mr, [...n[0] ||= [a("path", { d: "M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z" }, null, -1)]])) : r("", !0)]), a("span", {
2118
+ class: "bb:ml-3 bb:text-sm bb:font-medium bb:text-gray-700",
2119
+ textContent: _(m.itemName(e))
2120
+ }, null, 8, hr)], 4))), 128))], 12, dr)) : r("", !0)]);
2121
+ }
2122
+ var _r = /*#__PURE__*/ k(sr, [["render", gr]]), vr = {
1935
2123
  components: {
1936
- DropdownButton: hn,
1937
- ListElement: xn
2124
+ DropdownButton: kn,
2125
+ ListElement: Fn,
2126
+ ListSearchField: Vn
1938
2127
  },
2128
+ mixins: [M, yn],
1939
2129
  emits: ["update:modelValue", "changed"],
1940
2130
  props: {
1941
2131
  items: {
@@ -1949,6 +2139,14 @@ var Vn = /*#__PURE__*/ M(Fn, [["render", Bn]]), Hn = {
1949
2139
  labelledBy: {
1950
2140
  type: String,
1951
2141
  default: null
2142
+ },
2143
+ withClear: {
2144
+ type: Boolean,
2145
+ default: !0
2146
+ },
2147
+ withArrow: {
2148
+ type: Boolean,
2149
+ default: !1
1952
2150
  }
1953
2151
  },
1954
2152
  data() {
@@ -1965,7 +2163,7 @@ var Vn = /*#__PURE__*/ M(Fn, [["render", Bn]]), Hn = {
1965
2163
  return this.itemList.find((e) => e.id === this.modelValue) ?? null;
1966
2164
  },
1967
2165
  activeItemName() {
1968
- return this.activeItem === null ? null : this.activeItem.name;
2166
+ return this.activeItem === null ? null : this.itemName(this.activeItem);
1969
2167
  },
1970
2168
  hasItems() {
1971
2169
  return this.itemList.length > 0;
@@ -1976,61 +2174,83 @@ var Vn = /*#__PURE__*/ M(Fn, [["render", Bn]]), Hn = {
1976
2174
  },
1977
2175
  methods: {
1978
2176
  itemClicked(e) {
1979
- this.$refs.list.querySelectorAll("button")[this.itemList.indexOf(e)]?.focus({ preventScroll: !0 }), this.isOpen = !1, this.$emit("update:modelValue", e.id === this.modelValue ? null : e.id), this.$emit("changed");
2177
+ this.itemElements()[this.visibleItems.indexOf(e)]?.focus({ preventScroll: !0 }), this.isOpen = !1, (this.withClear || e.id !== this.modelValue) && (this.$emit("update:modelValue", e.id === this.modelValue ? null : e.id), this.$emit("changed"));
1980
2178
  },
1981
2179
  clear() {
1982
2180
  this.$emit("update:modelValue", null), this.$emit("changed");
1983
2181
  },
1984
2182
  activeItemElement() {
1985
- let e = this.itemList.indexOf(this.activeItem);
1986
- return e === -1 ? null : this.$refs.list.querySelectorAll("button")[e];
2183
+ let e = this.visibleItems.indexOf(this.activeItem);
2184
+ return e === -1 ? null : this.itemElements()[e];
1987
2185
  },
1988
- itemStops() {
1989
- return this.$refs.list ? [...this.$refs.list.querySelectorAll(":scope > button")] : [];
2186
+ arrowsOrigin() {
2187
+ return this.activeItemElement() ?? this.searchInput();
1990
2188
  }
1991
2189
  }
1992
- }, Un = { class: "bb-dashboard-ui bb:flex bb:flex-col bb:grow" }, Wn = {
1993
- ref: "list",
1994
- class: "bb:flex bb:flex-col bb:py-1 bb:divide-y bb:divide-gray-200 bb:divide-dashed"
1995
- };
1996
- function Gn(t, o, s, c, l, u) {
1997
- let d = h("list-element"), m = h("dropdown-button");
1998
- return f(), i("div", Un, [u.hasItems ? (f(), n(m, {
2190
+ }, yr = { class: "bb-dashboard-ui bb:flex bb:flex-col bb:grow" }, br = ["textContent"];
2191
+ function xr(t, a, o, s, c, l) {
2192
+ let u = h("list-search-field"), d = h("list-element"), m = h("dropdown-button");
2193
+ return f(), i("div", yr, [l.hasItems ? (f(), n(m, {
1999
2194
  key: 0,
2000
- title: u.activeItemName,
2001
- "is-open": l.isOpen,
2002
- "onUpdate:isOpen": o[0] ||= (e) => l.isOpen = e,
2003
- "has-value": u.hasValue,
2004
- "labelled-by": s.labelledBy,
2005
- "find-selected": u.activeItemElement,
2006
- "find-tab-stops": u.itemStops,
2007
- onErased: u.clear
2195
+ title: l.activeItemName,
2196
+ "is-open": c.isOpen,
2197
+ "onUpdate:isOpen": a[2] ||= (e) => c.isOpen = e,
2198
+ "has-value": o.withClear && l.hasValue,
2199
+ "with-arrow": o.withArrow,
2200
+ "labelled-by": o.labelledBy,
2201
+ "find-selected": l.arrowsOrigin,
2202
+ "find-stops": t.searchStops,
2203
+ "find-tab-stops": t.tabStops,
2204
+ "keep-size": t.withSearch,
2205
+ lang: t.lang,
2206
+ onErased: l.clear,
2207
+ onToggle: t.onSearchToggle
2008
2208
  }, {
2009
- default: b(() => [a("div", Wn, [(f(!0), i(e, null, p(u.itemList, (e) => (f(), n(d, {
2010
- name: e.name,
2209
+ default: b(() => [t.withSearch ? (f(), n(u, {
2210
+ key: 0,
2211
+ ref: "search",
2212
+ modelValue: t.query,
2213
+ "onUpdate:modelValue": a[0] ||= (e) => t.query = e,
2214
+ lang: t.lang
2215
+ }, null, 8, ["modelValue", "lang"])) : r("", !0), t.visibleItems.length > 0 ? (f(), i("div", {
2216
+ key: 1,
2217
+ ref: "list",
2218
+ class: "bb:flex bb:flex-col bb:py-1 bb:divide-y bb:divide-gray-200 bb:divide-dashed",
2219
+ onKeydown: a[1] ||= (...e) => t.onListKeydown && t.onListKeydown(...e)
2220
+ }, [(f(!0), i(e, null, p(t.visibleItems, (e) => (f(), n(d, {
2221
+ name: t.itemName(e),
2011
2222
  key: e.id,
2012
- "is-checked": e.id === s.modelValue,
2013
- onClicked: (t) => u.itemClicked(e)
2223
+ "is-checked": e.id === o.modelValue,
2224
+ onClicked: (t) => l.itemClicked(e)
2014
2225
  }, null, 8, [
2015
2226
  "name",
2016
2227
  "is-checked",
2017
2228
  "onClicked"
2018
- ]))), 128))], 512)]),
2229
+ ]))), 128))], 544)) : (f(), i("div", {
2230
+ key: 2,
2231
+ class: "bb:px-3 bb:py-2 bb:text-sm bb:text-gray-500 bb:text-center",
2232
+ textContent: _(t.texts.nothingFound)
2233
+ }, null, 8, br))]),
2019
2234
  _: 1
2020
2235
  }, 8, [
2021
2236
  "title",
2022
2237
  "is-open",
2023
2238
  "has-value",
2239
+ "with-arrow",
2024
2240
  "labelled-by",
2025
2241
  "find-selected",
2242
+ "find-stops",
2026
2243
  "find-tab-stops",
2027
- "onErased"
2244
+ "keep-size",
2245
+ "lang",
2246
+ "onErased",
2247
+ "onToggle"
2028
2248
  ])) : r("", !0)]);
2029
2249
  }
2030
- var Kn = /*#__PURE__*/ M(Hn, [["render", Gn]]), qn = {
2250
+ var U = /*#__PURE__*/ k(vr, [["render", xr]]), Sr = {
2031
2251
  components: {
2032
- ElementHeader: P,
2033
- SelectSingle: Kn
2252
+ ElementHeader: j,
2253
+ SelectSingle: U
2034
2254
  },
2035
2255
  emits: ["update:modelValue", "changed"],
2036
2256
  props: {
@@ -2053,12 +2273,20 @@ var Kn = /*#__PURE__*/ M(Hn, [["render", Gn]]), qn = {
2053
2273
  isLoading: {
2054
2274
  type: Boolean,
2055
2275
  default: !1
2276
+ },
2277
+ withSearch: {
2278
+ type: Boolean,
2279
+ default: !1
2280
+ },
2281
+ lang: {
2282
+ type: String,
2283
+ default: null
2056
2284
  }
2057
2285
  }
2058
- }, Jn = { class: "bb-dashboard-ui bb:flex bb:flex-none bb:w-fit bb:h-18 bb:border bb:border-gray-200" }, Yn = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" };
2059
- function Xn(e, t, n, r, o, c) {
2286
+ }, Cr = { class: "bb-dashboard-ui bb:flex bb:flex-none bb:w-fit bb:h-18 bb:border bb:border-gray-200" }, wr = { class: "bb:flex bb:w-full bb:flex-col bb:border bb:border-white bb:bg-white" };
2287
+ function Tr(e, t, n, r, o, c) {
2060
2288
  let l = h("element-header"), u = h("select-single");
2061
- return f(), i("div", Jn, [a("div", Yn, [s(l, {
2289
+ return f(), i("div", Cr, [a("div", wr, [s(l, {
2062
2290
  text: n.header ?? "",
2063
2291
  "is-required": n.isRequired,
2064
2292
  "is-loading": n.isLoading
@@ -2069,14 +2297,21 @@ function Xn(e, t, n, r, o, c) {
2069
2297
  ]), s(u, {
2070
2298
  items: n.items,
2071
2299
  "model-value": n.modelValue,
2300
+ "with-search": n.withSearch,
2301
+ lang: n.lang,
2072
2302
  "onUpdate:modelValue": t[0] ||= (t) => e.$emit("update:modelValue", t),
2073
2303
  onChanged: t[1] ||= (t) => e.$emit("changed")
2074
- }, null, 8, ["items", "model-value"])])]);
2304
+ }, null, 8, [
2305
+ "items",
2306
+ "model-value",
2307
+ "with-search",
2308
+ "lang"
2309
+ ])])]);
2075
2310
  }
2076
- var Zn = /*#__PURE__*/ M(qn, [["render", Xn]]), Qn = {
2311
+ var Er = /*#__PURE__*/ k(Sr, [["render", Tr]]), Dr = {
2077
2312
  components: {
2078
- Dot: N,
2079
- SelectSingle: Kn
2313
+ Dot: A,
2314
+ SelectSingle: U
2080
2315
  },
2081
2316
  emits: ["update:modelValue", "changed"],
2082
2317
  props: {
@@ -2095,35 +2330,1885 @@ var Zn = /*#__PURE__*/ M(qn, [["render", Xn]]), Qn = {
2095
2330
  isRequired: {
2096
2331
  type: Boolean,
2097
2332
  default: !1
2333
+ },
2334
+ withSearch: {
2335
+ type: Boolean,
2336
+ default: !1
2337
+ },
2338
+ lang: {
2339
+ type: String,
2340
+ default: null
2098
2341
  }
2099
2342
  },
2100
2343
  setup() {
2101
2344
  return { labelId: v() };
2102
2345
  }
2103
- }, $n = { class: "bb-dashboard-ui" }, er = { class: "bb:flex bb:items-center" }, tr = ["id", "textContent"], nr = { class: "bb:mt-1 bb:h-9.5 bb:w-full bb:rounded-md bb:[--bb-field-radius:0.375rem] bb:border bb:border-gray-300 bb:bg-white bb:shadow-xs bb:text-sm bb:flex bb:flex-col" };
2104
- function rr(e, t, n, r, o, c) {
2346
+ }, Or = { class: "bb-dashboard-ui" }, kr = { class: "bb:flex bb:items-center" }, Ar = ["id", "textContent"], jr = { class: "bb:mt-1 bb:h-9.5 bb:w-full bb:rounded-md bb:[--bb-field-radius:0.375rem] bb:border bb:border-gray-300 bb:bg-white bb:shadow-xs bb:text-sm bb:flex bb:flex-col" };
2347
+ function Mr(e, t, n, r, o, c) {
2105
2348
  let l = h("dot"), u = h("select-single");
2106
- return f(), i("div", $n, [a("div", er, [a("span", {
2349
+ return f(), i("div", Or, [a("div", kr, [a("span", {
2107
2350
  id: r.labelId,
2108
2351
  class: "bb:block bb:text-sm bb:font-medium bb:leading-5 bb:text-gray-700",
2109
2352
  textContent: _(n.label ?? "")
2110
- }, null, 8, tr), x(s(l, {
2353
+ }, null, 8, Ar), x(s(l, {
2111
2354
  color: "red",
2112
2355
  class: "bb:ml-2"
2113
- }, null, 512), [[y, n.isRequired]])]), a("div", nr, [s(u, {
2356
+ }, null, 512), [[y, n.isRequired]])]), a("div", jr, [s(u, {
2114
2357
  items: n.items,
2115
2358
  "model-value": n.modelValue,
2359
+ "with-search": n.withSearch,
2360
+ lang: n.lang,
2116
2361
  "labelled-by": r.labelId,
2117
2362
  "onUpdate:modelValue": t[0] ||= (t) => e.$emit("update:modelValue", t),
2118
2363
  onChanged: t[1] ||= (t) => e.$emit("changed")
2119
2364
  }, null, 8, [
2120
2365
  "items",
2121
2366
  "model-value",
2367
+ "with-search",
2368
+ "lang",
2122
2369
  "labelled-by"
2123
2370
  ])])]);
2124
2371
  }
2125
- var ir = /*#__PURE__*/ M(Qn, [["render", rr]]), ar = {
2126
- mixins: [j],
2372
+ var Nr = /*#__PURE__*/ k(Dr, [["render", Mr]]), Pr = {
2373
+ components: { Dot: A },
2374
+ emits: ["update:modelValue", "changed"],
2375
+ props: {
2376
+ items: {
2377
+ type: Array,
2378
+ required: !0
2379
+ },
2380
+ modelValue: {
2381
+ type: [
2382
+ String,
2383
+ Number,
2384
+ Boolean
2385
+ ],
2386
+ default: null
2387
+ },
2388
+ label: {
2389
+ type: String,
2390
+ required: !0
2391
+ },
2392
+ isRequired: {
2393
+ type: Boolean,
2394
+ default: !1
2395
+ },
2396
+ columns: {
2397
+ type: Number,
2398
+ default: 2,
2399
+ validator: V
2400
+ }
2401
+ },
2402
+ setup() {
2403
+ return {
2404
+ labelId: v(),
2405
+ groupName: v()
2406
+ };
2407
+ },
2408
+ computed: {
2409
+ itemList() {
2410
+ return Array.isArray(this.items) ? this.items.filter((e) => typeof e == "object" && !!e) : [];
2411
+ },
2412
+ gridStyle() {
2413
+ return ar(H(this.columns));
2414
+ },
2415
+ itemStyles() {
2416
+ return or(this.itemList.length, H(this.columns));
2417
+ }
2418
+ },
2419
+ methods: {
2420
+ isSelected(e) {
2421
+ return e.id === this.modelValue;
2422
+ },
2423
+ itemName(e) {
2424
+ return String(e.name ?? "");
2425
+ },
2426
+ async select(e) {
2427
+ this.$emit("update:modelValue", e.id), this.$emit("changed"), await this.$nextTick(), this.syncChecked();
2428
+ },
2429
+ syncChecked() {
2430
+ this.$el.querySelectorAll("input").forEach((e, t) => {
2431
+ e.checked = this.isSelected(this.itemList[t]);
2432
+ });
2433
+ }
2434
+ }
2435
+ }, Fr = { class: "bb-dashboard-ui" }, Ir = { class: "bb:flex bb:items-center" }, Lr = ["id", "textContent"], Rr = ["aria-labelledby"], zr = [
2436
+ "name",
2437
+ "checked",
2438
+ "onChange"
2439
+ ], Br = {
2440
+ key: 0,
2441
+ class: "bb:size-2 bb:rounded-full bb:bg-indigo-600 bb:forced-colors:bg-[CanvasText]"
2442
+ }, Vr = ["textContent"];
2443
+ function Hr(t, n, o, c, l, m) {
2444
+ let g = h("dot");
2445
+ return f(), i("div", Fr, [a("div", Ir, [a("span", {
2446
+ id: c.labelId,
2447
+ class: "bb:block bb:text-sm bb:font-medium bb:leading-5 bb:text-gray-700",
2448
+ textContent: _(o.label ?? "")
2449
+ }, null, 8, Lr), x(s(g, {
2450
+ color: "red",
2451
+ class: "bb:ml-2"
2452
+ }, null, 512), [[y, o.isRequired]])]), m.itemList.length > 0 ? (f(), i("div", {
2453
+ key: 0,
2454
+ role: "radiogroup",
2455
+ "aria-labelledby": c.labelId,
2456
+ class: "bb:mt-2 bb:grid bb:gap-3",
2457
+ style: d(m.gridStyle)
2458
+ }, [(f(!0), i(e, null, p(m.itemList, (e, t) => (f(), i("label", {
2459
+ key: t,
2460
+ style: d(m.itemStyles[t]),
2461
+ class: u(["bb:relative bb:flex bb:items-start bb:p-3 bb:border bb:rounded-md bb:cursor-pointer bb:select-none bb:transition-[background-color,border-color] bb:has-focus-visible:focus-ring", m.isSelected(e) ? "bb:border-indigo-500 bb:bg-indigo-50" : "bb:border-gray-300 bb:bg-white bb:hover:bg-gray-50"])
2462
+ }, [
2463
+ a("input", {
2464
+ type: "radio",
2465
+ name: c.groupName,
2466
+ checked: m.isSelected(e),
2467
+ class: "bb:absolute bb:inset-0 bb:size-full bb:cursor-pointer bb:bg-none bb:opacity-0",
2468
+ onChange: (t) => m.select(e)
2469
+ }, null, 40, zr),
2470
+ a("span", { class: u(["bb:pointer-events-none bb:cursor-default bb:shrink-0 bb:mt-0.5 bb:size-4 bb:rounded-full bb:border-2 bb:flex bb:items-center bb:justify-center", m.isSelected(e) ? "bb:border-indigo-600 bb:forced-colors:border-[Highlight]" : "bb:border-gray-400"]) }, [m.isSelected(e) ? (f(), i("span", Br)) : r("", !0)], 2),
2471
+ a("span", {
2472
+ class: "bb:pointer-events-none bb:cursor-default bb:ml-3 bb:text-sm bb:font-medium bb:text-gray-700",
2473
+ textContent: _(m.itemName(e))
2474
+ }, null, 8, Vr)
2475
+ ], 6))), 128))], 12, Rr)) : r("", !0)]);
2476
+ }
2477
+ var Ur = /*#__PURE__*/ k(Pr, [["render", Hr]]), Wr = [
2478
+ {
2479
+ code: "AED",
2480
+ digits: 2,
2481
+ symbol: null
2482
+ },
2483
+ {
2484
+ code: "AFN",
2485
+ digits: 2,
2486
+ symbol: "؋"
2487
+ },
2488
+ {
2489
+ code: "ALL",
2490
+ digits: 2,
2491
+ symbol: null
2492
+ },
2493
+ {
2494
+ code: "AMD",
2495
+ digits: 2,
2496
+ symbol: "֏"
2497
+ },
2498
+ {
2499
+ code: "AOA",
2500
+ digits: 2,
2501
+ symbol: "Kz"
2502
+ },
2503
+ {
2504
+ code: "ARS",
2505
+ digits: 2,
2506
+ symbol: "$"
2507
+ },
2508
+ {
2509
+ code: "AUD",
2510
+ digits: 2,
2511
+ symbol: "$"
2512
+ },
2513
+ {
2514
+ code: "AWG",
2515
+ digits: 2,
2516
+ symbol: null
2517
+ },
2518
+ {
2519
+ code: "AZN",
2520
+ digits: 2,
2521
+ symbol: "₼"
2522
+ },
2523
+ {
2524
+ code: "BAM",
2525
+ digits: 2,
2526
+ symbol: "KM"
2527
+ },
2528
+ {
2529
+ code: "BBD",
2530
+ digits: 2,
2531
+ symbol: "$"
2532
+ },
2533
+ {
2534
+ code: "BDT",
2535
+ digits: 2,
2536
+ symbol: "৳"
2537
+ },
2538
+ {
2539
+ code: "BHD",
2540
+ digits: 3,
2541
+ symbol: null
2542
+ },
2543
+ {
2544
+ code: "BIF",
2545
+ digits: 0,
2546
+ symbol: null
2547
+ },
2548
+ {
2549
+ code: "BMD",
2550
+ digits: 2,
2551
+ symbol: "$"
2552
+ },
2553
+ {
2554
+ code: "BND",
2555
+ digits: 2,
2556
+ symbol: "$"
2557
+ },
2558
+ {
2559
+ code: "BOB",
2560
+ digits: 2,
2561
+ symbol: "Bs"
2562
+ },
2563
+ {
2564
+ code: "BRL",
2565
+ digits: 2,
2566
+ symbol: "R$"
2567
+ },
2568
+ {
2569
+ code: "BSD",
2570
+ digits: 2,
2571
+ symbol: "$"
2572
+ },
2573
+ {
2574
+ code: "BTN",
2575
+ digits: 2,
2576
+ symbol: null
2577
+ },
2578
+ {
2579
+ code: "BWP",
2580
+ digits: 2,
2581
+ symbol: "P"
2582
+ },
2583
+ {
2584
+ code: "BYN",
2585
+ digits: 2,
2586
+ symbol: null
2587
+ },
2588
+ {
2589
+ code: "BZD",
2590
+ digits: 2,
2591
+ symbol: "$"
2592
+ },
2593
+ {
2594
+ code: "CAD",
2595
+ digits: 2,
2596
+ symbol: "$"
2597
+ },
2598
+ {
2599
+ code: "CDF",
2600
+ digits: 2,
2601
+ symbol: null
2602
+ },
2603
+ {
2604
+ code: "CHF",
2605
+ digits: 2,
2606
+ symbol: "Fr."
2607
+ },
2608
+ {
2609
+ code: "CLP",
2610
+ digits: 0,
2611
+ symbol: "$"
2612
+ },
2613
+ {
2614
+ code: "CNY",
2615
+ digits: 2,
2616
+ symbol: "¥"
2617
+ },
2618
+ {
2619
+ code: "COP",
2620
+ digits: 2,
2621
+ symbol: "$"
2622
+ },
2623
+ {
2624
+ code: "CRC",
2625
+ digits: 2,
2626
+ symbol: "₡"
2627
+ },
2628
+ {
2629
+ code: "CUP",
2630
+ digits: 2,
2631
+ symbol: "$"
2632
+ },
2633
+ {
2634
+ code: "CVE",
2635
+ digits: 2,
2636
+ symbol: null
2637
+ },
2638
+ {
2639
+ code: "CZK",
2640
+ digits: 2,
2641
+ symbol: "Kč"
2642
+ },
2643
+ {
2644
+ code: "DJF",
2645
+ digits: 0,
2646
+ symbol: null
2647
+ },
2648
+ {
2649
+ code: "DKK",
2650
+ digits: 2,
2651
+ symbol: "kr"
2652
+ },
2653
+ {
2654
+ code: "DOP",
2655
+ digits: 2,
2656
+ symbol: "$"
2657
+ },
2658
+ {
2659
+ code: "DZD",
2660
+ digits: 2,
2661
+ symbol: null
2662
+ },
2663
+ {
2664
+ code: "EGP",
2665
+ digits: 2,
2666
+ symbol: "E£"
2667
+ },
2668
+ {
2669
+ code: "ERN",
2670
+ digits: 2,
2671
+ symbol: null
2672
+ },
2673
+ {
2674
+ code: "ETB",
2675
+ digits: 2,
2676
+ symbol: null
2677
+ },
2678
+ {
2679
+ code: "EUR",
2680
+ digits: 2,
2681
+ symbol: "€"
2682
+ },
2683
+ {
2684
+ code: "FJD",
2685
+ digits: 2,
2686
+ symbol: "$"
2687
+ },
2688
+ {
2689
+ code: "FKP",
2690
+ digits: 2,
2691
+ symbol: "£"
2692
+ },
2693
+ {
2694
+ code: "GBP",
2695
+ digits: 2,
2696
+ symbol: "£"
2697
+ },
2698
+ {
2699
+ code: "GEL",
2700
+ digits: 2,
2701
+ symbol: "₾"
2702
+ },
2703
+ {
2704
+ code: "GHS",
2705
+ digits: 2,
2706
+ symbol: "GH₵"
2707
+ },
2708
+ {
2709
+ code: "GIP",
2710
+ digits: 2,
2711
+ symbol: "£"
2712
+ },
2713
+ {
2714
+ code: "GMD",
2715
+ digits: 2,
2716
+ symbol: null
2717
+ },
2718
+ {
2719
+ code: "GNF",
2720
+ digits: 0,
2721
+ symbol: "FG"
2722
+ },
2723
+ {
2724
+ code: "GTQ",
2725
+ digits: 2,
2726
+ symbol: "Q"
2727
+ },
2728
+ {
2729
+ code: "GYD",
2730
+ digits: 2,
2731
+ symbol: "$"
2732
+ },
2733
+ {
2734
+ code: "HKD",
2735
+ digits: 2,
2736
+ symbol: "$"
2737
+ },
2738
+ {
2739
+ code: "HNL",
2740
+ digits: 2,
2741
+ symbol: "L"
2742
+ },
2743
+ {
2744
+ code: "HTG",
2745
+ digits: 2,
2746
+ symbol: null
2747
+ },
2748
+ {
2749
+ code: "HUF",
2750
+ digits: 2,
2751
+ symbol: "Ft"
2752
+ },
2753
+ {
2754
+ code: "IDR",
2755
+ digits: 2,
2756
+ symbol: "Rp"
2757
+ },
2758
+ {
2759
+ code: "ILS",
2760
+ digits: 2,
2761
+ symbol: "₪"
2762
+ },
2763
+ {
2764
+ code: "INR",
2765
+ digits: 2,
2766
+ symbol: "₹"
2767
+ },
2768
+ {
2769
+ code: "IQD",
2770
+ digits: 3,
2771
+ symbol: null
2772
+ },
2773
+ {
2774
+ code: "IRR",
2775
+ digits: 2,
2776
+ symbol: null
2777
+ },
2778
+ {
2779
+ code: "ISK",
2780
+ digits: 0,
2781
+ symbol: "kr"
2782
+ },
2783
+ {
2784
+ code: "JMD",
2785
+ digits: 2,
2786
+ symbol: "$"
2787
+ },
2788
+ {
2789
+ code: "JOD",
2790
+ digits: 3,
2791
+ symbol: null
2792
+ },
2793
+ {
2794
+ code: "JPY",
2795
+ digits: 0,
2796
+ symbol: "¥"
2797
+ },
2798
+ {
2799
+ code: "KES",
2800
+ digits: 2,
2801
+ symbol: null
2802
+ },
2803
+ {
2804
+ code: "KGS",
2805
+ digits: 2,
2806
+ symbol: "⃀"
2807
+ },
2808
+ {
2809
+ code: "KHR",
2810
+ digits: 2,
2811
+ symbol: "៛"
2812
+ },
2813
+ {
2814
+ code: "KMF",
2815
+ digits: 0,
2816
+ symbol: "CF"
2817
+ },
2818
+ {
2819
+ code: "KPW",
2820
+ digits: 2,
2821
+ symbol: "₩"
2822
+ },
2823
+ {
2824
+ code: "KRW",
2825
+ digits: 0,
2826
+ symbol: "₩"
2827
+ },
2828
+ {
2829
+ code: "KWD",
2830
+ digits: 3,
2831
+ symbol: null
2832
+ },
2833
+ {
2834
+ code: "KYD",
2835
+ digits: 2,
2836
+ symbol: "$"
2837
+ },
2838
+ {
2839
+ code: "KZT",
2840
+ digits: 2,
2841
+ symbol: "₸"
2842
+ },
2843
+ {
2844
+ code: "LAK",
2845
+ digits: 2,
2846
+ symbol: "₭"
2847
+ },
2848
+ {
2849
+ code: "LBP",
2850
+ digits: 2,
2851
+ symbol: "L£"
2852
+ },
2853
+ {
2854
+ code: "LKR",
2855
+ digits: 2,
2856
+ symbol: "Rs"
2857
+ },
2858
+ {
2859
+ code: "LRD",
2860
+ digits: 2,
2861
+ symbol: "$"
2862
+ },
2863
+ {
2864
+ code: "LSL",
2865
+ digits: 2,
2866
+ symbol: null
2867
+ },
2868
+ {
2869
+ code: "LYD",
2870
+ digits: 3,
2871
+ symbol: null
2872
+ },
2873
+ {
2874
+ code: "MAD",
2875
+ digits: 2,
2876
+ symbol: null
2877
+ },
2878
+ {
2879
+ code: "MDL",
2880
+ digits: 2,
2881
+ symbol: null
2882
+ },
2883
+ {
2884
+ code: "MGA",
2885
+ digits: 2,
2886
+ symbol: "Ar"
2887
+ },
2888
+ {
2889
+ code: "MKD",
2890
+ digits: 2,
2891
+ symbol: null
2892
+ },
2893
+ {
2894
+ code: "MMK",
2895
+ digits: 2,
2896
+ symbol: "K"
2897
+ },
2898
+ {
2899
+ code: "MNT",
2900
+ digits: 2,
2901
+ symbol: "₮"
2902
+ },
2903
+ {
2904
+ code: "MOP",
2905
+ digits: 2,
2906
+ symbol: null
2907
+ },
2908
+ {
2909
+ code: "MRU",
2910
+ digits: 2,
2911
+ symbol: null
2912
+ },
2913
+ {
2914
+ code: "MUR",
2915
+ digits: 2,
2916
+ symbol: "Rs"
2917
+ },
2918
+ {
2919
+ code: "MVR",
2920
+ digits: 2,
2921
+ symbol: null
2922
+ },
2923
+ {
2924
+ code: "MWK",
2925
+ digits: 2,
2926
+ symbol: null
2927
+ },
2928
+ {
2929
+ code: "MXN",
2930
+ digits: 2,
2931
+ symbol: "$"
2932
+ },
2933
+ {
2934
+ code: "MYR",
2935
+ digits: 2,
2936
+ symbol: "RM"
2937
+ },
2938
+ {
2939
+ code: "MZN",
2940
+ digits: 2,
2941
+ symbol: null
2942
+ },
2943
+ {
2944
+ code: "NAD",
2945
+ digits: 2,
2946
+ symbol: "$"
2947
+ },
2948
+ {
2949
+ code: "NGN",
2950
+ digits: 2,
2951
+ symbol: "₦"
2952
+ },
2953
+ {
2954
+ code: "NIO",
2955
+ digits: 2,
2956
+ symbol: "C$"
2957
+ },
2958
+ {
2959
+ code: "NOK",
2960
+ digits: 2,
2961
+ symbol: "kr"
2962
+ },
2963
+ {
2964
+ code: "NPR",
2965
+ digits: 2,
2966
+ symbol: "Rs"
2967
+ },
2968
+ {
2969
+ code: "NZD",
2970
+ digits: 2,
2971
+ symbol: "$"
2972
+ },
2973
+ {
2974
+ code: "OMR",
2975
+ digits: 3,
2976
+ symbol: null
2977
+ },
2978
+ {
2979
+ code: "PAB",
2980
+ digits: 2,
2981
+ symbol: null
2982
+ },
2983
+ {
2984
+ code: "PEN",
2985
+ digits: 2,
2986
+ symbol: null
2987
+ },
2988
+ {
2989
+ code: "PGK",
2990
+ digits: 2,
2991
+ symbol: null
2992
+ },
2993
+ {
2994
+ code: "PHP",
2995
+ digits: 2,
2996
+ symbol: "₱"
2997
+ },
2998
+ {
2999
+ code: "PKR",
3000
+ digits: 2,
3001
+ symbol: "Rs"
3002
+ },
3003
+ {
3004
+ code: "PLN",
3005
+ digits: 2,
3006
+ symbol: "zł"
3007
+ },
3008
+ {
3009
+ code: "PYG",
3010
+ digits: 0,
3011
+ symbol: "₲"
3012
+ },
3013
+ {
3014
+ code: "QAR",
3015
+ digits: 2,
3016
+ symbol: null
3017
+ },
3018
+ {
3019
+ code: "RON",
3020
+ digits: 2,
3021
+ symbol: "lei"
3022
+ },
3023
+ {
3024
+ code: "RSD",
3025
+ digits: 2,
3026
+ symbol: null
3027
+ },
3028
+ {
3029
+ code: "RUB",
3030
+ digits: 2,
3031
+ symbol: "₽"
3032
+ },
3033
+ {
3034
+ code: "RWF",
3035
+ digits: 0,
3036
+ symbol: "RF"
3037
+ },
3038
+ {
3039
+ code: "SAR",
3040
+ digits: 2,
3041
+ symbol: null
3042
+ },
3043
+ {
3044
+ code: "SBD",
3045
+ digits: 2,
3046
+ symbol: "$"
3047
+ },
3048
+ {
3049
+ code: "SCR",
3050
+ digits: 2,
3051
+ symbol: null
3052
+ },
3053
+ {
3054
+ code: "SDG",
3055
+ digits: 2,
3056
+ symbol: null
3057
+ },
3058
+ {
3059
+ code: "SEK",
3060
+ digits: 2,
3061
+ symbol: "kr"
3062
+ },
3063
+ {
3064
+ code: "SGD",
3065
+ digits: 2,
3066
+ symbol: "$"
3067
+ },
3068
+ {
3069
+ code: "SHP",
3070
+ digits: 2,
3071
+ symbol: "£"
3072
+ },
3073
+ {
3074
+ code: "SLE",
3075
+ digits: 2,
3076
+ symbol: null
3077
+ },
3078
+ {
3079
+ code: "SOS",
3080
+ digits: 2,
3081
+ symbol: null
3082
+ },
3083
+ {
3084
+ code: "SRD",
3085
+ digits: 2,
3086
+ symbol: "$"
3087
+ },
3088
+ {
3089
+ code: "SSP",
3090
+ digits: 2,
3091
+ symbol: "£"
3092
+ },
3093
+ {
3094
+ code: "STN",
3095
+ digits: 2,
3096
+ symbol: "Db"
3097
+ },
3098
+ {
3099
+ code: "SVC",
3100
+ digits: 2,
3101
+ symbol: null
3102
+ },
3103
+ {
3104
+ code: "SYP",
3105
+ digits: 2,
3106
+ symbol: "£"
3107
+ },
3108
+ {
3109
+ code: "SZL",
3110
+ digits: 2,
3111
+ symbol: null
3112
+ },
3113
+ {
3114
+ code: "THB",
3115
+ digits: 2,
3116
+ symbol: "฿"
3117
+ },
3118
+ {
3119
+ code: "TJS",
3120
+ digits: 2,
3121
+ symbol: null
3122
+ },
3123
+ {
3124
+ code: "TMT",
3125
+ digits: 2,
3126
+ symbol: null
3127
+ },
3128
+ {
3129
+ code: "TND",
3130
+ digits: 3,
3131
+ symbol: null
3132
+ },
3133
+ {
3134
+ code: "TOP",
3135
+ digits: 2,
3136
+ symbol: "T$"
3137
+ },
3138
+ {
3139
+ code: "TRY",
3140
+ digits: 2,
3141
+ symbol: "₺"
3142
+ },
3143
+ {
3144
+ code: "TTD",
3145
+ digits: 2,
3146
+ symbol: "$"
3147
+ },
3148
+ {
3149
+ code: "TWD",
3150
+ digits: 2,
3151
+ symbol: "$"
3152
+ },
3153
+ {
3154
+ code: "TZS",
3155
+ digits: 2,
3156
+ symbol: null
3157
+ },
3158
+ {
3159
+ code: "UAH",
3160
+ digits: 2,
3161
+ symbol: "₴"
3162
+ },
3163
+ {
3164
+ code: "UGX",
3165
+ digits: 0,
3166
+ symbol: null
3167
+ },
3168
+ {
3169
+ code: "USD",
3170
+ digits: 2,
3171
+ symbol: "$"
3172
+ },
3173
+ {
3174
+ code: "UYU",
3175
+ digits: 2,
3176
+ symbol: "$"
3177
+ },
3178
+ {
3179
+ code: "UZS",
3180
+ digits: 2,
3181
+ symbol: null
3182
+ },
3183
+ {
3184
+ code: "VED",
3185
+ digits: 2,
3186
+ symbol: null
3187
+ },
3188
+ {
3189
+ code: "VES",
3190
+ digits: 2,
3191
+ symbol: null
3192
+ },
3193
+ {
3194
+ code: "VND",
3195
+ digits: 0,
3196
+ symbol: "₫"
3197
+ },
3198
+ {
3199
+ code: "VUV",
3200
+ digits: 0,
3201
+ symbol: null
3202
+ },
3203
+ {
3204
+ code: "WST",
3205
+ digits: 2,
3206
+ symbol: null
3207
+ },
3208
+ {
3209
+ code: "XAD",
3210
+ digits: 2,
3211
+ symbol: null
3212
+ },
3213
+ {
3214
+ code: "XAF",
3215
+ digits: 0,
3216
+ symbol: "FCFA"
3217
+ },
3218
+ {
3219
+ code: "XCD",
3220
+ digits: 2,
3221
+ symbol: "$"
3222
+ },
3223
+ {
3224
+ code: "XCG",
3225
+ digits: 2,
3226
+ symbol: "Cg."
3227
+ },
3228
+ {
3229
+ code: "XOF",
3230
+ digits: 0,
3231
+ symbol: "F CFA"
3232
+ },
3233
+ {
3234
+ code: "XPF",
3235
+ digits: 0,
3236
+ symbol: "CFPF"
3237
+ },
3238
+ {
3239
+ code: "YER",
3240
+ digits: 2,
3241
+ symbol: null
3242
+ },
3243
+ {
3244
+ code: "ZAR",
3245
+ digits: 2,
3246
+ symbol: "R"
3247
+ },
3248
+ {
3249
+ code: "ZMW",
3250
+ digits: 2,
3251
+ symbol: "ZK"
3252
+ },
3253
+ {
3254
+ code: "ZWG",
3255
+ digits: 2,
3256
+ symbol: null
3257
+ }
3258
+ ];
3259
+ function W(e) {
3260
+ if (e == null) return Wr;
3261
+ if (!Array.isArray(e)) return [];
3262
+ let t = [];
3263
+ for (let n of e) {
3264
+ let e = Wr.find((e) => e.code === n);
3265
+ e && !t.includes(e) && t.push(e);
3266
+ }
3267
+ return t;
3268
+ }
3269
+ function Gr(e) {
3270
+ return e.symbol === null ? e.code : `${e.code} ${e.symbol}`;
3271
+ }
3272
+ function G(e) {
3273
+ return e.map((e) => ({
3274
+ id: e.code,
3275
+ name: Gr(e)
3276
+ }));
3277
+ }
3278
+ //#endregion
3279
+ //#region src/components/SelectCurrencyFilter.vue
3280
+ var Kr = {
3281
+ components: { SelectSingleFilter: Er },
3282
+ emits: ["update:modelValue", "changed"],
3283
+ props: {
3284
+ modelValue: {
3285
+ type: String,
3286
+ default: null
3287
+ },
3288
+ currencies: {
3289
+ type: Array,
3290
+ default: null
3291
+ },
3292
+ withSearch: {
3293
+ type: Boolean,
3294
+ default: !0
3295
+ },
3296
+ header: {
3297
+ type: String,
3298
+ required: !0
3299
+ },
3300
+ isRequired: {
3301
+ type: Boolean,
3302
+ default: !1
3303
+ },
3304
+ isLoading: {
3305
+ type: Boolean,
3306
+ default: !1
3307
+ },
3308
+ lang: {
3309
+ type: String,
3310
+ default: null
3311
+ }
3312
+ },
3313
+ computed: { items() {
3314
+ return G(W(this.currencies));
3315
+ } }
3316
+ };
3317
+ function qr(e, t, r, i, a, o) {
3318
+ let s = h("select-single-filter");
3319
+ return f(), n(s, {
3320
+ items: o.items,
3321
+ "model-value": r.modelValue,
3322
+ header: r.header,
3323
+ "is-required": r.isRequired,
3324
+ "is-loading": r.isLoading,
3325
+ "with-search": r.withSearch,
3326
+ lang: r.lang,
3327
+ "onUpdate:modelValue": t[0] ||= (t) => e.$emit("update:modelValue", t),
3328
+ onChanged: t[1] ||= (t) => e.$emit("changed")
3329
+ }, null, 8, [
3330
+ "items",
3331
+ "model-value",
3332
+ "header",
3333
+ "is-required",
3334
+ "is-loading",
3335
+ "with-search",
3336
+ "lang"
3337
+ ]);
3338
+ }
3339
+ var Jr = /*#__PURE__*/ k(Kr, [["render", qr]]), Yr = {
3340
+ components: { SelectSingleForm: Nr },
3341
+ emits: ["update:modelValue", "changed"],
3342
+ props: {
3343
+ modelValue: {
3344
+ type: String,
3345
+ default: null
3346
+ },
3347
+ currencies: {
3348
+ type: Array,
3349
+ default: null
3350
+ },
3351
+ withSearch: {
3352
+ type: Boolean,
3353
+ default: !0
3354
+ },
3355
+ label: {
3356
+ type: String,
3357
+ required: !0
3358
+ },
3359
+ isRequired: {
3360
+ type: Boolean,
3361
+ default: !1
3362
+ },
3363
+ lang: {
3364
+ type: String,
3365
+ default: null
3366
+ }
3367
+ },
3368
+ computed: { items() {
3369
+ return G(W(this.currencies));
3370
+ } }
3371
+ };
3372
+ function Xr(e, t, r, i, a, o) {
3373
+ let s = h("select-single-form");
3374
+ return f(), n(s, {
3375
+ items: o.items,
3376
+ "model-value": r.modelValue,
3377
+ label: r.label,
3378
+ "is-required": r.isRequired,
3379
+ "with-search": r.withSearch,
3380
+ lang: r.lang,
3381
+ "onUpdate:modelValue": t[0] ||= (t) => e.$emit("update:modelValue", t),
3382
+ onChanged: t[1] ||= (t) => e.$emit("changed")
3383
+ }, null, 8, [
3384
+ "items",
3385
+ "model-value",
3386
+ "label",
3387
+ "is-required",
3388
+ "with-search",
3389
+ "lang"
3390
+ ]);
3391
+ }
3392
+ var Zr = /*#__PURE__*/ k(Yr, [["render", Xr]]);
3393
+ function K(e) {
3394
+ return !Number.isInteger(e) || e < 0 || e >= 10 ** 15 ? null : e;
3395
+ }
3396
+ function q(e, t) {
3397
+ if (e === null) return {
3398
+ whole: "",
3399
+ fraction: ""
3400
+ };
3401
+ let n = String(e).padStart(t + 1, "0"), r = n.length - t;
3402
+ return {
3403
+ whole: n.slice(0, r),
3404
+ fraction: n.slice(r)
3405
+ };
3406
+ }
3407
+ function Qr(e, t, n) {
3408
+ return e === "" && t === "" ? null : Number((e || "0") + t.padEnd(n, "0"));
3409
+ }
3410
+ function $r(e) {
3411
+ return e.replace(/\D/g, "");
3412
+ }
3413
+ function ei(e, t) {
3414
+ return $r(e).replace(/^0+(?=\d)/, "").slice(0, 15 - t);
3415
+ }
3416
+ function ti(e, t) {
3417
+ return e.replace(/\B(?=(\d{3})+$)/g, t === "en" ? "," : " ");
3418
+ }
3419
+ function ni(e) {
3420
+ return e === "en" ? "." : ",";
3421
+ }
3422
+ function ri(e, t) {
3423
+ return e === "." || e === "," && t !== "en";
3424
+ }
3425
+ function ii(e, t, n) {
3426
+ let r = e.trim();
3427
+ if (!/^\d+([ \u00a0\u202f.,]\d+)*$/.test(r)) return null;
3428
+ let i = r.match(/[.,]/g) ?? [], a = new Set(i), o = null;
3429
+ if (a.size === 2) {
3430
+ if (o = i[i.length - 1], i.filter((e) => e === o).length > 1) return null;
3431
+ } else i.length === 1 && (i[0] !== "," || t !== "en") && (o = i[0]);
3432
+ let s = r, c = "";
3433
+ if (o !== null) {
3434
+ let e = r.lastIndexOf(o);
3435
+ s = r.slice(0, e), c = r.slice(e + 1);
3436
+ }
3437
+ let l = s.split(/[ \u00a0\u202f.,]/);
3438
+ if (!/^\d*$/.test(c) || l.length > 1 && l[l.length - 1].length !== 3) return null;
3439
+ let u = l.join("").replace(/^0+(?=\d)/, "");
3440
+ return c.length > n || u.length > 15 - n ? null : {
3441
+ whole: u,
3442
+ fraction: c
3443
+ };
3444
+ }
3445
+ //#endregion
3446
+ //#region src/amountCurrency.js
3447
+ var ai = {
3448
+ props: { currencies: {
3449
+ type: Array,
3450
+ default: null
3451
+ } },
3452
+ computed: {
3453
+ currencyList() {
3454
+ return W(this.currencies);
3455
+ },
3456
+ activeCurrency() {
3457
+ return this.currencyList.find((e) => e.code === this.passedCurrency) ?? this.currencyList[0] ?? null;
3458
+ },
3459
+ activeCode() {
3460
+ return this.activeCurrency?.code ?? null;
3461
+ },
3462
+ fractionDigits() {
3463
+ return this.activeCurrency?.digits ?? 2;
3464
+ },
3465
+ isBlocked() {
3466
+ return this.currencyList.length === 0;
3467
+ },
3468
+ currencyKey() {
3469
+ return `${this.passedCurrency}|${this.activeCode}`;
3470
+ }
3471
+ },
3472
+ watch: { currencyKey() {
3473
+ this.syncCurrency();
3474
+ } },
3475
+ mounted() {
3476
+ this.syncCurrency();
3477
+ },
3478
+ methods: { syncCurrency() {
3479
+ !this.isBlocked && this.activeCode !== this.passedCurrency && this.reportCurrency(this.activeCode);
3480
+ } }
3481
+ }, oi = {
3482
+ components: { SelectSingle: U },
3483
+ mixins: [M],
3484
+ emits: ["update:modelValue"],
3485
+ props: {
3486
+ currencies: {
3487
+ type: Array,
3488
+ required: !0
3489
+ },
3490
+ modelValue: {
3491
+ type: String,
3492
+ default: null
3493
+ }
3494
+ },
3495
+ setup() {
3496
+ return { labelId: v() };
3497
+ },
3498
+ computed: { items() {
3499
+ return G(this.currencies);
3500
+ } }
3501
+ }, si = { class: "bb:relative bb:flex bb:flex-col bb:justify-center bb:h-full bb:w-full bb:min-w-0" }, ci = ["textContent"], li = ["id", "textContent"];
3502
+ function ui(t, n, o, c, l, u) {
3503
+ let d = h("select-single");
3504
+ return f(), i("div", si, [u.items.length === 1 ? (f(), i("span", {
3505
+ key: 0,
3506
+ class: "bb:truncate bb:px-3",
3507
+ textContent: _(u.items[0].name)
3508
+ }, null, 8, ci)) : u.items.length > 1 ? (f(), i(e, { key: 1 }, [a("span", {
3509
+ id: c.labelId,
3510
+ class: "bb:sr-only",
3511
+ textContent: _(t.texts.currency)
3512
+ }, null, 8, li), s(d, {
3513
+ items: u.items,
3514
+ "model-value": o.modelValue,
3515
+ "labelled-by": c.labelId,
3516
+ "with-clear": !1,
3517
+ "with-arrow": "",
3518
+ "with-search": "",
3519
+ lang: t.lang,
3520
+ "onUpdate:modelValue": n[0] ||= (e) => t.$emit("update:modelValue", e)
3521
+ }, null, 8, [
3522
+ "items",
3523
+ "model-value",
3524
+ "labelled-by",
3525
+ "lang"
3526
+ ])], 64)) : r("", !0)]);
3527
+ }
3528
+ var J = /*#__PURE__*/ k(oi, [["render", ui]]), di = {
3529
+ components: { CrossButton: N },
3530
+ mixins: [M],
3531
+ emits: ["update:modelValue", "changed"],
3532
+ props: {
3533
+ modelValue: {
3534
+ type: Number,
3535
+ default: null
3536
+ },
3537
+ digits: {
3538
+ type: Number,
3539
+ default: 2
3540
+ },
3541
+ prefix: {
3542
+ type: String,
3543
+ default: null
3544
+ },
3545
+ inputId: {
3546
+ type: String,
3547
+ default: null
3548
+ },
3549
+ withEraser: {
3550
+ type: Boolean,
3551
+ default: !0
3552
+ },
3553
+ isDisabled: {
3554
+ type: Boolean,
3555
+ default: !1
3556
+ }
3557
+ },
3558
+ data() {
3559
+ return {
3560
+ ...q(this.isDisabled ? null : K(this.modelValue), this.digits),
3561
+ hasFocus: !1
3562
+ };
3563
+ },
3564
+ computed: {
3565
+ amount() {
3566
+ return Qr(this.whole, this.fraction, this.digits);
3567
+ },
3568
+ isEmpty() {
3569
+ return this.amount === null;
3570
+ },
3571
+ isCollapsed() {
3572
+ return this.isEmpty && !this.hasFocus;
3573
+ },
3574
+ groupedWhole() {
3575
+ return ti(this.whole, this.resolvedLang);
3576
+ },
3577
+ separator() {
3578
+ return ni(this.resolvedLang);
3579
+ },
3580
+ fullAmount() {
3581
+ if (this.isEmpty) return null;
3582
+ let { whole: e, fraction: t } = q(this.amount, this.digits), n = ti(e, this.resolvedLang);
3583
+ return t === "" ? n : `${n}${this.separator}${t}`;
3584
+ }
3585
+ },
3586
+ created() {
3587
+ this.committed = this.amount, this.isUnmounted = !1, this.$watch(() => [
3588
+ this.modelValue,
3589
+ this.digits,
3590
+ this.isDisabled
3591
+ ], this.syncProps);
3592
+ },
3593
+ beforeUnmount() {
3594
+ this.isUnmounted = !0;
3595
+ },
3596
+ methods: {
3597
+ syncProps([e, t, n], [r, i, a]) {
3598
+ if (n) {
3599
+ this.writeAmount(null, t), this.hasFocus = !1;
3600
+ return;
3601
+ }
3602
+ let o = K(e);
3603
+ if (a) {
3604
+ this.writeAmount(o, t), this.committed = o;
3605
+ return;
3606
+ }
3607
+ let s = Qr(this.whole, this.fraction, i);
3608
+ if (e === r || o === s) {
3609
+ t !== i && this.writeAmount(s, t);
3610
+ return;
3611
+ }
3612
+ this.writeAmount(o, t), this.committed = o;
3613
+ },
3614
+ writeAmount(e, t) {
3615
+ let { whole: n, fraction: r } = q(e, t);
3616
+ this.whole = n, this.fraction = r;
3617
+ },
3618
+ applyParts(e, t) {
3619
+ let n = this.amount;
3620
+ this.whole = e, this.fraction = t, this.amount !== n && this.$emit("update:modelValue", this.amount);
3621
+ },
3622
+ onWholeInput(e) {
3623
+ this.applyParts(ei(e.target.value, this.digits), this.fraction), e.target.value = this.groupedWhole;
3624
+ },
3625
+ onFractionInput(e) {
3626
+ let t = e.target, n = t.value, r = t.selectionStart, i = $r(n).slice(0, this.digits);
3627
+ if (this.applyParts(this.whole, i), t.value = i, i !== n) {
3628
+ let e = Math.max(r - (n.length - i.length), 0);
3629
+ t.setSelectionRange(e, e);
3630
+ }
3631
+ },
3632
+ onWholeFocus() {
3633
+ requestAnimationFrame(() => {
3634
+ let e = this.$refs.wholeInput;
3635
+ document.activeElement === e && (e.setSelectionRange(e.value.length, e.value.length), e.scrollLeft = e.scrollWidth);
3636
+ });
3637
+ },
3638
+ holdCaret() {
3639
+ let e = this.$refs.wholeInput, t = e.value.length;
3640
+ (e.selectionStart !== 0 || e.selectionEnd !== t) && (e.selectionStart !== t && e.setSelectionRange(t, t), e.scrollLeft = e.scrollWidth);
3641
+ },
3642
+ onWholeKeydown(e) {
3643
+ this.holdCaret();
3644
+ let t = e.metaKey || e.ctrlKey || e.altKey;
3645
+ this.digits > 0 && !t && ri(e.key, this.resolvedLang) && (e.preventDefault(), this.$refs.fractionInput.focus());
3646
+ },
3647
+ onFractionBackspace(e) {
3648
+ this.fraction === "" && (e.preventDefault(), this.$refs.wholeInput.focus());
3649
+ },
3650
+ padFraction(e) {
3651
+ return e === "" ? "" : e.padEnd(this.digits, "0");
3652
+ },
3653
+ completeParts() {
3654
+ this.fraction !== "" && (this.fraction = this.padFraction(this.fraction), this.whole = this.whole || "0");
3655
+ },
3656
+ onWholePaste(e) {
3657
+ let t = ii(e.clipboardData?.getData("text") ?? "", this.resolvedLang, this.digits);
3658
+ t !== null && (this.applyParts(t.whole, this.padFraction(t.fraction)), this.onWholeFocus());
3659
+ },
3660
+ onFractionPaste(e) {
3661
+ let t = e.target, n = e.clipboardData?.getData("text") ?? "", { selectionStart: r, selectionEnd: i } = t, a = this.fraction.slice(0, r) + n + this.fraction.slice(i);
3662
+ if (!/^\d+$/.test(n) || a.length > this.digits) return;
3663
+ let o = r + n.length;
3664
+ this.applyParts(this.whole, a), t.value = a, t.setSelectionRange(o, o);
3665
+ },
3666
+ onRootMousedown(e) {
3667
+ e.button === 0 && !e.target.closest("input, button") && (e.preventDefault(), this.$refs.wholeInput.focus());
3668
+ },
3669
+ onFocusOut(e) {
3670
+ this.$el.contains(e.relatedTarget) || (this.hasFocus = !1, this.completeParts(), this.commit());
3671
+ },
3672
+ moveFocusFromEraser() {
3673
+ let e = this.$refs.eraser.$el;
3674
+ document.activeElement === e && e.matches(":focus-visible") && this.$refs.wholeInput.focus({ preventScroll: !0 });
3675
+ },
3676
+ erase() {
3677
+ this.isDisabled || (this.moveFocusFromEraser(), this.applyParts("", ""), this.committed = null, this.$emit("changed"));
3678
+ },
3679
+ commit() {
3680
+ this.isUnmounted || this.isDisabled || this.amount === this.committed || (this.committed = this.amount, this.$emit("changed"));
3681
+ }
3682
+ }
3683
+ }, fi = {
3684
+ key: 0,
3685
+ class: "bb:flex bb:flex-none bb:items-center bb:mr-2 bb:text-gray-400 bb:select-none"
3686
+ }, pi = [
3687
+ "id",
3688
+ "value",
3689
+ "disabled",
3690
+ "aria-label",
3691
+ "title"
3692
+ ], mi = [
3693
+ "value",
3694
+ "disabled",
3695
+ "maxlength",
3696
+ "placeholder",
3697
+ "aria-label"
3698
+ ];
3699
+ function hi(t, o, s, c, l, p) {
3700
+ let m = h("cross-button");
3701
+ return f(), i("div", {
3702
+ class: u(["bb:flex bb:items-stretch bb:h-full bb:w-full bb:min-w-0 bb:pl-3 bb:rounded-[var(--bb-field-radius,0)] bb:has-focus-visible:focus-ring", { "bb:pr-3": !s.withEraser }]),
3703
+ onMousedown: o[18] ||= (...e) => p.onRootMousedown && p.onRootMousedown(...e),
3704
+ onFocusin: o[19] ||= (e) => l.hasFocus = !0,
3705
+ onFocusout: o[20] ||= (...e) => p.onFocusOut && p.onFocusOut(...e)
3706
+ }, [
3707
+ s.prefix ? (f(), i("span", fi, _(s.prefix), 1)) : r("", !0),
3708
+ a("input", {
3709
+ ref: "wholeInput",
3710
+ id: s.inputId,
3711
+ type: "text",
3712
+ inputmode: "decimal",
3713
+ autocomplete: "off",
3714
+ value: p.groupedWhole,
3715
+ disabled: s.isDisabled,
3716
+ "aria-label": s.prefix,
3717
+ title: p.fullAmount,
3718
+ class: "bb:flex-1 bb:w-full bb:min-w-0 bb:bg-transparent bb:text-right bb:text-ellipsis bb:tabular-nums bb:focus:outline-hidden",
3719
+ onInput: o[0] ||= (...e) => p.onWholeInput && p.onWholeInput(...e),
3720
+ onFocus: o[1] ||= (...e) => p.onWholeFocus && p.onWholeFocus(...e),
3721
+ onClick: o[2] ||= (...e) => p.holdCaret && p.holdCaret(...e),
3722
+ onKeydown: [o[3] ||= (...e) => p.onWholeKeydown && p.onWholeKeydown(...e), o[4] ||= S((...e) => p.commit && p.commit(...e), ["enter"])],
3723
+ onKeyup: o[5] ||= (...e) => p.holdCaret && p.holdCaret(...e),
3724
+ onSelect: o[6] ||= (...e) => p.holdCaret && p.holdCaret(...e),
3725
+ onPaste: o[7] ||= C((...e) => p.onWholePaste && p.onWholePaste(...e), ["prevent"]),
3726
+ onDragstart: o[8] ||= C(() => {}, ["prevent"]),
3727
+ onDrop: o[9] ||= C(() => {}, ["prevent"])
3728
+ }, null, 40, pi),
3729
+ s.digits > 0 ? (f(), i(e, { key: 1 }, [x(a("span", { class: "bb:flex bb:items-center bb:text-gray-500" }, _(p.separator), 513), [[y, !p.isCollapsed]]), x(a("input", {
3730
+ ref: "fractionInput",
3731
+ type: "text",
3732
+ inputmode: "numeric",
3733
+ autocomplete: "off",
3734
+ value: t.fraction,
3735
+ disabled: s.isDisabled,
3736
+ maxlength: s.digits,
3737
+ placeholder: "0".repeat(s.digits),
3738
+ "aria-label": t.texts.amountFraction,
3739
+ style: d({ width: `calc(${s.digits}ch + 2px)` }),
3740
+ class: "bb:flex-none bb:bg-transparent bb:tabular-nums bb:placeholder-gray-400 bb:focus:outline-hidden",
3741
+ onInput: o[10] ||= (...e) => p.onFractionInput && p.onFractionInput(...e),
3742
+ onBlur: o[11] ||= (...e) => p.completeParts && p.completeParts(...e),
3743
+ onKeydown: [o[12] ||= S((...e) => p.commit && p.commit(...e), ["enter"]), o[13] ||= S((...e) => p.onFractionBackspace && p.onFractionBackspace(...e), ["backspace"])],
3744
+ onPaste: o[14] ||= C((...e) => p.onFractionPaste && p.onFractionPaste(...e), ["prevent"]),
3745
+ onDragstart: o[15] ||= C(() => {}, ["prevent"]),
3746
+ onDrop: o[16] ||= C(() => {}, ["prevent"])
3747
+ }, null, 44, mi), [[y, !p.isCollapsed]])], 64)) : r("", !0),
3748
+ s.withEraser ? (f(), n(m, {
3749
+ key: 2,
3750
+ ref: "eraser",
3751
+ size: "small",
3752
+ lang: t.lang,
3753
+ class: u(["bb:h-full bb:pr-2 bb:flex-none", { "bb:invisible": p.isEmpty }]),
3754
+ onMousedown: o[17] ||= C(() => {}, ["prevent"]),
3755
+ onClicked: p.erase
3756
+ }, null, 8, [
3757
+ "lang",
3758
+ "class",
3759
+ "onClicked"
3760
+ ])) : r("", !0)
3761
+ ], 34);
3762
+ }
3763
+ var Y = /*#__PURE__*/ k(di, [["render", hi]]), gi = {
3764
+ components: {
3765
+ AmountCurrency: J,
3766
+ AmountInput: Y,
3767
+ Dot: A
3768
+ },
3769
+ mixins: [ai],
3770
+ emits: ["update:modelValue", "changed"],
3771
+ props: {
3772
+ modelValue: {
3773
+ type: Object,
3774
+ default: null
3775
+ },
3776
+ label: {
3777
+ type: String,
3778
+ required: !0
3779
+ },
3780
+ isRequired: {
3781
+ type: Boolean,
3782
+ default: !1
3783
+ },
3784
+ withEraser: {
3785
+ type: Boolean,
3786
+ default: !0
3787
+ },
3788
+ lang: {
3789
+ type: String,
3790
+ default: null
3791
+ }
3792
+ },
3793
+ setup() {
3794
+ return { inputId: v() };
3795
+ },
3796
+ computed: {
3797
+ passedAmount() {
3798
+ return K(this.modelValue?.amount);
3799
+ },
3800
+ passedCurrency() {
3801
+ return this.modelValue?.currency ?? null;
3802
+ }
3803
+ },
3804
+ methods: {
3805
+ reportAmount(e) {
3806
+ this.$emit("update:modelValue", {
3807
+ amount: e,
3808
+ currency: this.activeCode
3809
+ });
3810
+ },
3811
+ reportCurrency(e) {
3812
+ this.$emit("update:modelValue", {
3813
+ amount: this.passedAmount,
3814
+ currency: e
3815
+ });
3816
+ },
3817
+ chooseCurrency(e) {
3818
+ this.reportCurrency(e), this.passedAmount !== null && this.$emit("changed");
3819
+ }
3820
+ }
3821
+ }, _i = { class: "bb-dashboard-ui" }, vi = { class: "bb:flex bb:items-center" }, yi = ["for", "textContent"], bi = { class: "bb:mt-1 bb:flex bb:gap-3" }, xi = { class: "bb:flex-1 bb:min-w-0 bb:h-9.5 bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:text-sm bb:leading-5 bb:shadow-xs bb:[--bb-field-radius:0.375rem]" }, Si = { class: "bb:w-24 bb:flex-none bb:h-9.5 bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:text-sm bb:shadow-xs bb:[--bb-field-radius:0.375rem]" };
3822
+ function Ci(e, t, n, r, o, c) {
3823
+ let l = h("dot"), u = h("amount-input"), d = h("amount-currency");
3824
+ return f(), i("div", _i, [a("div", vi, [a("label", {
3825
+ for: r.inputId,
3826
+ class: "bb:block bb:text-sm bb:font-medium bb:leading-5 bb:text-gray-700",
3827
+ textContent: _(n.label)
3828
+ }, null, 8, yi), x(s(l, {
3829
+ color: "red",
3830
+ class: "bb:ml-2"
3831
+ }, null, 512), [[y, n.isRequired]])]), a("div", bi, [a("div", xi, [s(u, {
3832
+ "model-value": c.passedAmount,
3833
+ digits: e.fractionDigits,
3834
+ "input-id": r.inputId,
3835
+ "with-eraser": n.withEraser,
3836
+ "is-disabled": e.isBlocked,
3837
+ lang: n.lang,
3838
+ "onUpdate:modelValue": c.reportAmount,
3839
+ onChanged: t[0] ||= (t) => e.$emit("changed")
3840
+ }, null, 8, [
3841
+ "model-value",
3842
+ "digits",
3843
+ "input-id",
3844
+ "with-eraser",
3845
+ "is-disabled",
3846
+ "lang",
3847
+ "onUpdate:modelValue"
3848
+ ])]), a("div", Si, [s(d, {
3849
+ currencies: e.currencyList,
3850
+ "model-value": e.activeCode,
3851
+ lang: n.lang,
3852
+ "onUpdate:modelValue": c.chooseCurrency
3853
+ }, null, 8, [
3854
+ "currencies",
3855
+ "model-value",
3856
+ "lang",
3857
+ "onUpdate:modelValue"
3858
+ ])])])]);
3859
+ }
3860
+ var wi = /*#__PURE__*/ k(gi, [["render", Ci]]), Ti = {
3861
+ inheritAttrs: !1,
3862
+ mixins: [M, ai],
3863
+ emits: [
3864
+ "update:amountFrom",
3865
+ "update:amountTo",
3866
+ "update:currency",
3867
+ "changed"
3868
+ ],
3869
+ props: {
3870
+ amountFrom: {
3871
+ type: Number,
3872
+ default: null
3873
+ },
3874
+ amountTo: {
3875
+ type: Number,
3876
+ default: null
3877
+ },
3878
+ currency: {
3879
+ type: String,
3880
+ default: null
3881
+ }
3882
+ },
3883
+ computed: {
3884
+ passedCurrency() {
3885
+ return this.currency;
3886
+ },
3887
+ passedFrom() {
3888
+ return K(this.amountFrom);
3889
+ },
3890
+ passedTo() {
3891
+ return K(this.amountTo);
3892
+ },
3893
+ from() {
3894
+ return {
3895
+ value: this.passedFrom,
3896
+ prefix: this.texts.amountFrom,
3897
+ update: (e) => this.$emit("update:amountFrom", e),
3898
+ changed: () => this.$emit("changed")
3899
+ };
3900
+ },
3901
+ to() {
3902
+ return {
3903
+ value: this.passedTo,
3904
+ prefix: this.texts.amountTo,
3905
+ update: (e) => this.$emit("update:amountTo", e),
3906
+ changed: () => this.$emit("changed")
3907
+ };
3908
+ },
3909
+ currencyField() {
3910
+ return {
3911
+ list: this.currencyList,
3912
+ code: this.activeCode,
3913
+ digits: this.fractionDigits,
3914
+ isBlocked: this.isBlocked,
3915
+ choose: this.chooseCurrency
3916
+ };
3917
+ }
3918
+ },
3919
+ methods: {
3920
+ reportCurrency(e) {
3921
+ this.$emit("update:currency", e);
3922
+ },
3923
+ chooseCurrency(e) {
3924
+ this.reportCurrency(e), (this.passedFrom !== null || this.passedTo !== null) && this.$emit("changed");
3925
+ }
3926
+ }
3927
+ };
3928
+ function Ei(e, t, n, r, i, a) {
3929
+ return m(e.$slots, "default", {
3930
+ from: a.from,
3931
+ to: a.to,
3932
+ currency: a.currencyField
3933
+ });
3934
+ }
3935
+ var Di = /*#__PURE__*/ k(Ti, [["render", Ei]]), Oi = {
3936
+ components: {
3937
+ AmountCurrency: J,
3938
+ AmountInput: Y,
3939
+ AmountInterval: Di,
3940
+ ElementHeader: j
3941
+ },
3942
+ emits: [
3943
+ "update:amountFrom",
3944
+ "update:amountTo",
3945
+ "update:currency",
3946
+ "changed"
3947
+ ],
3948
+ props: {
3949
+ amountFrom: {
3950
+ type: Number,
3951
+ default: null
3952
+ },
3953
+ amountTo: {
3954
+ type: Number,
3955
+ default: null
3956
+ },
3957
+ currency: {
3958
+ type: String,
3959
+ default: null
3960
+ },
3961
+ currencies: {
3962
+ type: Array,
3963
+ default: null
3964
+ },
3965
+ header: {
3966
+ type: String,
3967
+ required: !0
3968
+ },
3969
+ isRequired: {
3970
+ type: Boolean,
3971
+ default: !1
3972
+ },
3973
+ isLoading: {
3974
+ type: Boolean,
3975
+ default: !1
3976
+ },
3977
+ withCurrency: {
3978
+ type: Boolean,
3979
+ default: !0
3980
+ },
3981
+ withEraser: {
3982
+ type: Boolean,
3983
+ default: !0
3984
+ },
3985
+ lang: {
3986
+ type: String,
3987
+ default: null
3988
+ }
3989
+ }
3990
+ }, ki = { class: "bb-dashboard-ui bb:flex bb:w-fit bb:h-18 bb:border bb:border-gray-200" }, Ai = { class: "bb:flex bb:border bb:border-white" }, ji = { class: "bb:flex bb:flex-col bb:bg-white bb:h-full" }, Mi = { class: "bb:flex bb:h-full bb:divide-x bb:divide-gray-200" }, Ni = { class: "bb:w-46 bb:flex-none bb:text-sm" }, Pi = { class: "bb:w-46 bb:flex-none bb:text-sm" }, Fi = {
3991
+ key: 0,
3992
+ class: "bb:w-24 bb:flex-none bb:text-sm"
3993
+ };
3994
+ function Ii(e, t, n, o, c, l) {
3995
+ let u = h("element-header"), d = h("amount-input"), p = h("amount-currency"), m = h("amount-interval");
3996
+ return f(), i("div", ki, [a("div", Ai, [a("div", ji, [s(u, {
3997
+ text: n.header ?? "",
3998
+ "is-required": n.isRequired,
3999
+ "is-loading": n.isLoading
4000
+ }, null, 8, [
4001
+ "text",
4002
+ "is-required",
4003
+ "is-loading"
4004
+ ]), s(m, {
4005
+ "amount-from": n.amountFrom,
4006
+ "amount-to": n.amountTo,
4007
+ currency: n.currency,
4008
+ currencies: n.currencies,
4009
+ lang: n.lang,
4010
+ "onUpdate:amountFrom": t[0] ||= (t) => e.$emit("update:amountFrom", t),
4011
+ "onUpdate:amountTo": t[1] ||= (t) => e.$emit("update:amountTo", t),
4012
+ "onUpdate:currency": t[2] ||= (t) => e.$emit("update:currency", t),
4013
+ onChanged: t[3] ||= (t) => e.$emit("changed")
4014
+ }, {
4015
+ default: b(({ from: e, to: t, currency: o }) => [a("div", Mi, [
4016
+ a("div", Ni, [s(d, {
4017
+ "model-value": e.value,
4018
+ digits: o.digits,
4019
+ prefix: e.prefix,
4020
+ "with-eraser": n.withEraser,
4021
+ "is-disabled": o.isBlocked,
4022
+ lang: n.lang,
4023
+ "onUpdate:modelValue": e.update,
4024
+ onChanged: e.changed
4025
+ }, null, 8, [
4026
+ "model-value",
4027
+ "digits",
4028
+ "prefix",
4029
+ "with-eraser",
4030
+ "is-disabled",
4031
+ "lang",
4032
+ "onUpdate:modelValue",
4033
+ "onChanged"
4034
+ ])]),
4035
+ a("div", Pi, [s(d, {
4036
+ "model-value": t.value,
4037
+ digits: o.digits,
4038
+ prefix: t.prefix,
4039
+ "with-eraser": n.withEraser,
4040
+ "is-disabled": o.isBlocked,
4041
+ lang: n.lang,
4042
+ "onUpdate:modelValue": t.update,
4043
+ onChanged: t.changed
4044
+ }, null, 8, [
4045
+ "model-value",
4046
+ "digits",
4047
+ "prefix",
4048
+ "with-eraser",
4049
+ "is-disabled",
4050
+ "lang",
4051
+ "onUpdate:modelValue",
4052
+ "onChanged"
4053
+ ])]),
4054
+ n.withCurrency ? (f(), i("div", Fi, [s(p, {
4055
+ currencies: o.list,
4056
+ "model-value": o.code,
4057
+ lang: n.lang,
4058
+ "onUpdate:modelValue": o.choose
4059
+ }, null, 8, [
4060
+ "currencies",
4061
+ "model-value",
4062
+ "lang",
4063
+ "onUpdate:modelValue"
4064
+ ])])) : r("", !0)
4065
+ ])]),
4066
+ _: 1
4067
+ }, 8, [
4068
+ "amount-from",
4069
+ "amount-to",
4070
+ "currency",
4071
+ "currencies",
4072
+ "lang"
4073
+ ])])])]);
4074
+ }
4075
+ var Li = /*#__PURE__*/ k(Oi, [["render", Ii]]), Ri = {
4076
+ components: {
4077
+ AmountCurrency: J,
4078
+ AmountInput: Y,
4079
+ AmountInterval: Di,
4080
+ Dot: A
4081
+ },
4082
+ emits: [
4083
+ "update:amountFrom",
4084
+ "update:amountTo",
4085
+ "update:currency",
4086
+ "changed"
4087
+ ],
4088
+ props: {
4089
+ amountFrom: {
4090
+ type: Number,
4091
+ default: null
4092
+ },
4093
+ amountTo: {
4094
+ type: Number,
4095
+ default: null
4096
+ },
4097
+ currency: {
4098
+ type: String,
4099
+ default: null
4100
+ },
4101
+ currencies: {
4102
+ type: Array,
4103
+ default: null
4104
+ },
4105
+ label: {
4106
+ type: String,
4107
+ required: !0
4108
+ },
4109
+ isRequired: {
4110
+ type: Boolean,
4111
+ default: !1
4112
+ },
4113
+ withEraser: {
4114
+ type: Boolean,
4115
+ default: !0
4116
+ },
4117
+ lang: {
4118
+ type: String,
4119
+ default: null
4120
+ }
4121
+ },
4122
+ setup() {
4123
+ return { labelId: v() };
4124
+ }
4125
+ }, zi = { class: "bb-dashboard-ui" }, Bi = { class: "bb:flex bb:items-center" }, Vi = ["id", "textContent"], Hi = ["aria-labelledby"], Ui = { class: "bb:min-w-0 bb:h-9.5 bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:text-sm bb:shadow-xs bb:[--bb-field-radius:0.375rem]" }, Wi = { class: "bb:min-w-0 bb:h-9.5 bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:text-sm bb:shadow-xs bb:[--bb-field-radius:0.375rem]" }, Gi = { class: "bb:h-9.5 bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:text-sm bb:shadow-xs bb:[--bb-field-radius:0.375rem]" };
4126
+ function Ki(e, t, n, r, o, c) {
4127
+ let l = h("dot"), u = h("amount-input"), d = h("amount-currency"), p = h("amount-interval");
4128
+ return f(), i("div", zi, [a("div", Bi, [a("span", {
4129
+ id: r.labelId,
4130
+ class: "bb:block bb:text-sm bb:font-medium bb:leading-5 bb:text-gray-700",
4131
+ textContent: _(n.label ?? "")
4132
+ }, null, 8, Vi), x(s(l, {
4133
+ color: "red",
4134
+ class: "bb:ml-2"
4135
+ }, null, 512), [[y, n.isRequired]])]), a("div", {
4136
+ class: "bb:mt-1 bb:grid bb:grid-cols-[1fr_1fr_6rem] bb:gap-3",
4137
+ role: "group",
4138
+ "aria-labelledby": r.labelId
4139
+ }, [s(p, {
4140
+ "amount-from": n.amountFrom,
4141
+ "amount-to": n.amountTo,
4142
+ currency: n.currency,
4143
+ currencies: n.currencies,
4144
+ lang: n.lang,
4145
+ "onUpdate:amountFrom": t[0] ||= (t) => e.$emit("update:amountFrom", t),
4146
+ "onUpdate:amountTo": t[1] ||= (t) => e.$emit("update:amountTo", t),
4147
+ "onUpdate:currency": t[2] ||= (t) => e.$emit("update:currency", t),
4148
+ onChanged: t[3] ||= (t) => e.$emit("changed")
4149
+ }, {
4150
+ default: b(({ from: e, to: t, currency: r }) => [
4151
+ a("div", Ui, [s(u, {
4152
+ "model-value": e.value,
4153
+ digits: r.digits,
4154
+ prefix: e.prefix,
4155
+ "with-eraser": n.withEraser,
4156
+ "is-disabled": r.isBlocked,
4157
+ lang: n.lang,
4158
+ "onUpdate:modelValue": e.update,
4159
+ onChanged: e.changed
4160
+ }, null, 8, [
4161
+ "model-value",
4162
+ "digits",
4163
+ "prefix",
4164
+ "with-eraser",
4165
+ "is-disabled",
4166
+ "lang",
4167
+ "onUpdate:modelValue",
4168
+ "onChanged"
4169
+ ])]),
4170
+ a("div", Wi, [s(u, {
4171
+ "model-value": t.value,
4172
+ digits: r.digits,
4173
+ prefix: t.prefix,
4174
+ "with-eraser": n.withEraser,
4175
+ "is-disabled": r.isBlocked,
4176
+ lang: n.lang,
4177
+ "onUpdate:modelValue": t.update,
4178
+ onChanged: t.changed
4179
+ }, null, 8, [
4180
+ "model-value",
4181
+ "digits",
4182
+ "prefix",
4183
+ "with-eraser",
4184
+ "is-disabled",
4185
+ "lang",
4186
+ "onUpdate:modelValue",
4187
+ "onChanged"
4188
+ ])]),
4189
+ a("div", Gi, [s(d, {
4190
+ currencies: r.list,
4191
+ "model-value": r.code,
4192
+ lang: n.lang,
4193
+ "onUpdate:modelValue": r.choose
4194
+ }, null, 8, [
4195
+ "currencies",
4196
+ "model-value",
4197
+ "lang",
4198
+ "onUpdate:modelValue"
4199
+ ])])
4200
+ ]),
4201
+ _: 1
4202
+ }, 8, [
4203
+ "amount-from",
4204
+ "amount-to",
4205
+ "currency",
4206
+ "currencies",
4207
+ "lang"
4208
+ ])], 8, Hi)]);
4209
+ }
4210
+ var qi = /*#__PURE__*/ k(Ri, [["render", Ki]]), Ji = {
4211
+ mixins: [O],
2127
4212
  props: {
2128
4213
  text: {
2129
4214
  type: String,
@@ -2132,17 +4217,17 @@ var ir = /*#__PURE__*/ M(Qn, [["render", rr]]), ar = {
2132
4217
  color: {
2133
4218
  type: String,
2134
4219
  required: !0,
2135
- validator: A
4220
+ validator: D
2136
4221
  }
2137
4222
  }
2138
- }, or = ["textContent"];
2139
- function sr(e, t, n, r, a, o) {
4223
+ }, Yi = ["textContent"];
4224
+ function Xi(e, t, n, r, a, o) {
2140
4225
  return f(), i("span", {
2141
4226
  class: u(["bb-dashboard-ui bb:inline-flex bb:items-center bb:px-3 bb:py-2 bb:rounded-full bb:text-xs bb:font-medium bb:leading-none bb:select-none bb:whitespace-nowrap", e.colorClass(n.color, "pill")]),
2142
4227
  textContent: _(n.text)
2143
- }, null, 10, or);
4228
+ }, null, 10, Yi);
2144
4229
  }
2145
- var cr = /*#__PURE__*/ M(ar, [["render", sr]]), lr = {
4230
+ var Zi = /*#__PURE__*/ k(Ji, [["render", Xi]]), Qi = {
2146
4231
  props: {
2147
4232
  messages: {
2148
4233
  type: [Object, Array],
@@ -2162,12 +4247,12 @@ var cr = /*#__PURE__*/ M(ar, [["render", sr]]), lr = {
2162
4247
  return this.type === "dangerous";
2163
4248
  }
2164
4249
  }
2165
- }, ur = { class: "bb:flex" }, dr = { class: "bb:shrink-0" }, fr = { class: "bb:ml-3" }, pr = ["textContent"];
2166
- function mr(t, n, o, s, c, l) {
4250
+ }, $i = { class: "bb:flex" }, ea = { class: "bb:shrink-0" }, ta = { class: "bb:ml-3" }, na = ["textContent"];
4251
+ function ra(t, n, o, s, c, l) {
2167
4252
  return l.hasErrors ? (f(), i("div", {
2168
4253
  key: 0,
2169
4254
  class: u(["bb-dashboard-ui bb:border-l-4 bb:p-4", l.isDangerous ? "bb:bg-red-50 bb:border-red-400" : "bb:bg-yellow-50 bb:border-yellow-400"])
2170
- }, [a("div", ur, [a("div", dr, [(f(), i("svg", {
4255
+ }, [a("div", $i, [a("div", ea, [(f(), i("svg", {
2171
4256
  class: u(["bb:h-5 bb:w-5", l.isDangerous ? "bb:text-red-400" : "bb:text-yellow-400"]),
2172
4257
  viewBox: "0 0 20 20",
2173
4258
  fill: "currentColor"
@@ -2175,21 +4260,21 @@ function mr(t, n, o, s, c, l) {
2175
4260
  "fill-rule": "evenodd",
2176
4261
  d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
2177
4262
  "clip-rule": "evenodd"
2178
- }, null, -1)]], 2))]), a("div", fr, [(f(!0), i(e, null, p(o.messages, (e, t) => (f(), i("p", {
4263
+ }, null, -1)]], 2))]), a("div", ta, [(f(!0), i(e, null, p(o.messages, (e, t) => (f(), i("p", {
2179
4264
  class: u(["bb:text-sm bb:leading-5", l.isDangerous ? "bb:text-red-700" : "bb:text-yellow-700"]),
2180
4265
  key: t,
2181
4266
  textContent: _(e)
2182
- }, null, 10, pr))), 128))])])], 2)) : r("", !0);
4267
+ }, null, 10, na))), 128))])])], 2)) : r("", !0);
2183
4268
  }
2184
- var hr = /*#__PURE__*/ M(lr, [["render", mr]]), gr = [
4269
+ var ia = /*#__PURE__*/ k(Qi, [["render", ra]]), aa = [
2185
4270
  "text",
2186
4271
  "email",
2187
4272
  "password",
2188
4273
  "tel",
2189
4274
  "url",
2190
4275
  "search"
2191
- ], _r = {
2192
- components: { Dot: N },
4276
+ ], oa = {
4277
+ components: { Dot: A },
2193
4278
  inheritAttrs: !1,
2194
4279
  props: {
2195
4280
  modelValue: {
@@ -2203,7 +4288,7 @@ var hr = /*#__PURE__*/ M(lr, [["render", mr]]), gr = [
2203
4288
  type: {
2204
4289
  type: String,
2205
4290
  default: "text",
2206
- validator: (e) => gr.includes(e)
4291
+ validator: (e) => aa.includes(e)
2207
4292
  },
2208
4293
  isRequired: {
2209
4294
  type: Boolean,
@@ -2224,7 +4309,7 @@ var hr = /*#__PURE__*/ M(lr, [["render", mr]]), gr = [
2224
4309
  }
2225
4310
  },
2226
4311
  inputType() {
2227
- return gr.includes(this.type) ? this.type : "text";
4312
+ return aa.includes(this.type) ? this.type : "text";
2228
4313
  }
2229
4314
  },
2230
4315
  methods: {
@@ -2239,26 +4324,26 @@ var hr = /*#__PURE__*/ M(lr, [["render", mr]]), gr = [
2239
4324
  ].includes(e)));
2240
4325
  }
2241
4326
  }
2242
- }, vr = { class: "bb:flex bb:items-center" }, yr = ["for", "textContent"], br = ["id", "type"];
2243
- function xr(e, t, n, r, o, c) {
4327
+ }, sa = { class: "bb:flex bb:items-center" }, ca = ["for", "textContent"], la = ["id", "type"];
4328
+ function ua(e, t, n, r, o, c) {
2244
4329
  let p = h("dot");
2245
4330
  return f(), i("div", {
2246
4331
  class: u(["bb-dashboard-ui", e.$attrs.class]),
2247
4332
  style: d(e.$attrs.style)
2248
- }, [a("div", vr, [a("label", {
4333
+ }, [a("div", sa, [a("label", {
2249
4334
  for: c.inputId(),
2250
4335
  class: "bb:block bb:text-sm bb:font-medium bb:leading-5 bb:text-gray-700",
2251
4336
  textContent: _(n.label)
2252
- }, null, 8, yr), x(s(p, {
4337
+ }, null, 8, ca), x(s(p, {
2253
4338
  color: "red",
2254
4339
  class: "bb:ml-2"
2255
4340
  }, null, 512), [[y, n.isRequired]])]), x(a("input", l({ "onUpdate:modelValue": t[0] ||= (e) => c.value = e }, { ...c.inputAttrs() }, {
2256
4341
  id: c.inputId(),
2257
4342
  type: c.inputType,
2258
4343
  class: "bb:mt-1 bb:block bb:w-full bb:rounded-md bb:border bb:border-gray-300 bb:bg-white bb:px-3 bb:py-2 bb:text-sm bb:leading-5 bb:shadow-xs bb:focus:focus-ring"
2259
- }), null, 16, br), [[ee, c.value]])], 6);
4344
+ }), null, 16, la), [[ee, c.value]])], 6);
2260
4345
  }
2261
- var Sr = /*#__PURE__*/ M(_r, [["render", xr]]), Cr = {}, wr = {
4346
+ var da = /*#__PURE__*/ k(oa, [["render", ua]]), fa = {}, pa = {
2262
4347
  class: "bb:w-4 bb:h-4",
2263
4348
  fill: "none",
2264
4349
  stroke: "currentColor",
@@ -2268,8 +4353,8 @@ var Sr = /*#__PURE__*/ M(_r, [["render", xr]]), Cr = {}, wr = {
2268
4353
  xmlns: "http://www.w3.org/2000/svg",
2269
4354
  "aria-hidden": "true"
2270
4355
  };
2271
- function Tr(e, t, n, r, o, s) {
2272
- return f(), i("svg", wr, [...t[0] ||= [
4356
+ function ma(e, t, n, r, o, s) {
4357
+ return f(), i("svg", pa, [...t[0] ||= [
2273
4358
  a("circle", {
2274
4359
  cx: "12",
2275
4360
  cy: "12",
@@ -2291,7 +4376,7 @@ function Tr(e, t, n, r, o, s) {
2291
4376
  }, null, -1)
2292
4377
  ]]);
2293
4378
  }
2294
- var Er = /*#__PURE__*/ M(Cr, [["render", Tr]]), Dr = {}, Or = {
4379
+ var ha = /*#__PURE__*/ k(fa, [["render", ma]]), ga = {}, _a = {
2295
4380
  class: "bb:w-4 bb:h-4",
2296
4381
  fill: "none",
2297
4382
  stroke: "currentColor",
@@ -2299,15 +4384,15 @@ var Er = /*#__PURE__*/ M(Cr, [["render", Tr]]), Dr = {}, Or = {
2299
4384
  xmlns: "http://www.w3.org/2000/svg",
2300
4385
  "aria-hidden": "true"
2301
4386
  };
2302
- function kr(e, t, n, r, o, s) {
2303
- return f(), i("svg", Or, [...t[0] ||= [a("path", {
4387
+ function va(e, t, n, r, o, s) {
4388
+ return f(), i("svg", _a, [...t[0] ||= [a("path", {
2304
4389
  "stroke-linecap": "round",
2305
4390
  "stroke-linejoin": "round",
2306
4391
  "stroke-width": "2",
2307
4392
  d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
2308
4393
  }, null, -1)]]);
2309
4394
  }
2310
- var Ar = /*#__PURE__*/ M(Dr, [["render", kr]]), jr = {}, Mr = {
4395
+ var ya = /*#__PURE__*/ k(ga, [["render", va]]), ba = {}, xa = {
2311
4396
  class: "bb:w-4 bb:h-4",
2312
4397
  fill: "none",
2313
4398
  stroke: "currentColor",
@@ -2315,21 +4400,21 @@ var Ar = /*#__PURE__*/ M(Dr, [["render", kr]]), jr = {}, Mr = {
2315
4400
  xmlns: "http://www.w3.org/2000/svg",
2316
4401
  "aria-hidden": "true"
2317
4402
  };
2318
- function Nr(e, t, n, r, o, s) {
2319
- return f(), i("svg", Mr, [...t[0] ||= [a("path", {
4403
+ function Sa(e, t, n, r, o, s) {
4404
+ return f(), i("svg", xa, [...t[0] ||= [a("path", {
2320
4405
  "stroke-linecap": "round",
2321
4406
  "stroke-linejoin": "round",
2322
4407
  "stroke-width": "2",
2323
4408
  d: "M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
2324
4409
  }, null, -1)]]);
2325
4410
  }
2326
- var Pr = /*#__PURE__*/ M(jr, [["render", Nr]]), Fr = ["download", "refresh"], Ir = {
4411
+ var Ca = /*#__PURE__*/ k(ba, [["render", Sa]]), wa = ["download", "refresh"], Ta = {
2327
4412
  components: {
2328
- "clock-icon": Er,
2329
- "download-icon": Ar,
2330
- "refresh-icon": Pr
4413
+ "clock-icon": ha,
4414
+ "download-icon": ya,
4415
+ "refresh-icon": Ca
2331
4416
  },
2332
- mixins: [j],
4417
+ mixins: [O],
2333
4418
  emits: ["click"],
2334
4419
  props: {
2335
4420
  title: {
@@ -2339,12 +4424,12 @@ var Pr = /*#__PURE__*/ M(jr, [["render", Nr]]), Fr = ["download", "refresh"], Ir
2339
4424
  icon: {
2340
4425
  type: String,
2341
4426
  required: !0,
2342
- validator: (e) => Fr.includes(e)
4427
+ validator: (e) => wa.includes(e)
2343
4428
  },
2344
4429
  color: {
2345
4430
  type: String,
2346
4431
  default: "purple",
2347
- validator: A
4432
+ validator: D
2348
4433
  },
2349
4434
  isLoading: {
2350
4435
  type: Boolean,
@@ -2359,12 +4444,12 @@ var Pr = /*#__PURE__*/ M(jr, [["render", Nr]]), Fr = ["download", "refresh"], Ir
2359
4444
  let e = this.isLoading && typeof this.loadingText == "string" && this.loadingText !== "" ? this.loadingText : this.title;
2360
4445
  return typeof e == "string" ? e : "";
2361
4446
  } }
2362
- }, Lr = [
4447
+ }, Ea = [
2363
4448
  "title",
2364
4449
  "disabled",
2365
4450
  "aria-busy"
2366
- ], Rr = ["textContent"];
2367
- function zr(e, t, o, s, c, l) {
4451
+ ], Da = ["textContent"];
4452
+ function Oa(e, t, o, s, c, l) {
2368
4453
  let d = h("clock-icon"), p = h("download-icon"), m = h("refresh-icon");
2369
4454
  return f(), i("button", {
2370
4455
  type: "button",
@@ -2389,19 +4474,19 @@ function zr(e, t, o, s, c, l) {
2389
4474
  })) : r("", !0), a("span", {
2390
4475
  class: "bb:ml-1 bb:pointer-events-none bb:cursor-default",
2391
4476
  textContent: _(l.label)
2392
- }, null, 8, Rr)], 10, Lr);
4477
+ }, null, 8, Da)], 10, Ea);
2393
4478
  }
2394
- var Br = /*#__PURE__*/ M(Ir, [["render", zr]]), Vr = "a[href], button:not(:disabled)";
2395
- function Hr(e, t) {
4479
+ var ka = /*#__PURE__*/ k(Ta, [["render", Oa]]), Aa = "a[href], button:not(:disabled)";
4480
+ function ja(e, t) {
2396
4481
  let n = document.activeElement;
2397
- (e.querySelector("[data-dialog-focus]") ?? e.querySelector(Vr))?.focus();
4482
+ (e.querySelector("[data-dialog-focus]") ?? e.querySelector(Aa))?.focus();
2398
4483
  let r = (n) => {
2399
4484
  if (n.key === "Escape") {
2400
4485
  t();
2401
4486
  return;
2402
4487
  }
2403
4488
  if (n.key !== "Tab") return;
2404
- let r = [...e.querySelectorAll(Vr)];
4489
+ let r = [...e.querySelectorAll(Aa)];
2405
4490
  if (r.length === 0) return;
2406
4491
  n.preventDefault();
2407
4492
  let i = n.shiftKey ? -1 : 1, a = r.indexOf(document.activeElement);
@@ -2418,7 +4503,7 @@ function Hr(e, t) {
2418
4503
  }
2419
4504
  //#endregion
2420
4505
  //#region src/components/Modal.vue
2421
- var Ur = {
4506
+ var Ma = {
2422
4507
  emits: ["escape"],
2423
4508
  props: {
2424
4509
  isOpen: {
@@ -2452,16 +4537,16 @@ var Ur = {
2452
4537
  methods: {
2453
4538
  holdFocus() {
2454
4539
  this.focusFrame === null && this.releaseHeldFocus === null && (this.focusFrame = requestAnimationFrame(() => {
2455
- this.focusFrame = null, this.releaseHeldFocus = Hr(this.$refs.panel, () => this.$emit("escape"));
4540
+ this.focusFrame = null, this.releaseHeldFocus = ja(this.$refs.panel, () => this.$emit("escape"));
2456
4541
  }));
2457
4542
  },
2458
4543
  releaseFocus() {
2459
4544
  this.focusFrame !== null && (cancelAnimationFrame(this.focusFrame), this.focusFrame = null), this.releaseHeldFocus !== null && (this.releaseHeldFocus(), this.releaseHeldFocus = null);
2460
4545
  }
2461
4546
  }
2462
- }, Wr = { class: "bb:min-h-screen bb:text-center" }, Gr = { class: "bb:fixed bb:inset-0 bb:transition-opacity" }, Kr = ["aria-labelledby"];
2463
- function qr(e, n, r, o, c, l) {
2464
- return f(), i("div", { class: u(["bb-dashboard-ui bb:fixed bb:inset-0 bb:overflow-y-auto bb:z-20", { "bb:pointer-events-none": !r.isOpen }]) }, [a("div", Wr, [
4547
+ }, Na = { class: "bb:min-h-screen bb:text-center" }, Pa = { class: "bb:fixed bb:inset-0 bb:transition-opacity" }, Fa = ["aria-labelledby"];
4548
+ function Ia(e, n, r, o, c, l) {
4549
+ return f(), i("div", { class: u(["bb-dashboard-ui bb:fixed bb:inset-0 bb:overflow-y-auto bb:z-20", { "bb:pointer-events-none": !r.isOpen }]) }, [a("div", Na, [
2465
4550
  s(t, {
2466
4551
  "enter-active-class": "bb:ease-out bb:duration-300",
2467
4552
  "enter-from-class": "bb:opacity-0",
@@ -2470,7 +4555,7 @@ function qr(e, n, r, o, c, l) {
2470
4555
  "leave-from-class": "bb:opacity-100",
2471
4556
  "leave-to-class": "bb:opacity-0"
2472
4557
  }, {
2473
- default: b(() => [x(a("div", Gr, [...n[0] ||= [a("div", { class: "bb:absolute bb:inset-0 bb:bg-gray-500 bb:opacity-75" }, null, -1)]], 512), [[y, r.isOpen]])]),
4558
+ default: b(() => [x(a("div", Pa, [...n[0] ||= [a("div", { class: "bb:absolute bb:inset-0 bb:bg-gray-500 bb:opacity-75" }, null, -1)]], 512), [[y, r.isOpen]])]),
2474
4559
  _: 1
2475
4560
  }),
2476
4561
  n[1] ||= a("span", { class: "bb:inline-block bb:align-middle bb:h-screen" }, null, -1),
@@ -2488,12 +4573,12 @@ function qr(e, n, r, o, c, l) {
2488
4573
  role: "dialog",
2489
4574
  "aria-modal": "true",
2490
4575
  "aria-labelledby": r.headingId
2491
- }, [m(e.$slots, "default")], 8, Kr), [[y, r.isOpen]])]),
4576
+ }, [m(e.$slots, "default")], 8, Fa), [[y, r.isOpen]])]),
2492
4577
  _: 3
2493
4578
  })
2494
4579
  ])], 2);
2495
4580
  }
2496
- var Jr = /*#__PURE__*/ M(Ur, [["render", qr]]), Yr = {}, Xr = {
4581
+ var La = /*#__PURE__*/ k(Ma, [["render", Ia]]), Ra = {}, za = {
2497
4582
  class: "bb:h-7 bb:w-7 bb:text-red-600",
2498
4583
  xmlns: "http://www.w3.org/2000/svg",
2499
4584
  fill: "none",
@@ -2501,35 +4586,35 @@ var Jr = /*#__PURE__*/ M(Ur, [["render", qr]]), Yr = {}, Xr = {
2501
4586
  stroke: "currentColor",
2502
4587
  "aria-hidden": "true"
2503
4588
  };
2504
- function Zr(e, t, n, r, o, s) {
2505
- return f(), i("svg", Xr, [...t[0] ||= [a("path", {
4589
+ function Ba(e, t, n, r, o, s) {
4590
+ return f(), i("svg", za, [...t[0] ||= [a("path", {
2506
4591
  "stroke-linecap": "round",
2507
4592
  "stroke-linejoin": "round",
2508
4593
  "stroke-width": "2",
2509
4594
  d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
2510
4595
  }, null, -1)]]);
2511
4596
  }
2512
- var Qr = /*#__PURE__*/ M(Yr, [["render", Zr]]), $r = {}, ei = {
4597
+ var X = /*#__PURE__*/ k(Ra, [["render", Ba]]), Va = {}, Ha = {
2513
4598
  class: "bb:h-7 bb:w-7 bb:text-yellow-400",
2514
4599
  xmlns: "http://www.w3.org/2000/svg",
2515
4600
  viewBox: "0 0 20 20",
2516
4601
  fill: "currentColor",
2517
4602
  "aria-hidden": "true"
2518
4603
  };
2519
- function ti(e, t, n, r, o, s) {
2520
- return f(), i("svg", ei, [...t[0] ||= [a("path", {
4604
+ function Ua(e, t, n, r, o, s) {
4605
+ return f(), i("svg", Ha, [...t[0] ||= [a("path", {
2521
4606
  "fill-rule": "evenodd",
2522
4607
  d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",
2523
4608
  "clip-rule": "evenodd"
2524
4609
  }, null, -1)]]);
2525
4610
  }
2526
- var ni = /*#__PURE__*/ M($r, [["render", ti]]), ri = {
4611
+ var Wa = /*#__PURE__*/ k(Va, [["render", Ua]]), Ga = {
2527
4612
  components: {
2528
- Modal: Jr,
2529
- Dangerous: Qr,
2530
- Warning: ni
4613
+ Modal: La,
4614
+ Dangerous: X,
4615
+ Warning: Wa
2531
4616
  },
2532
- mixins: [F],
4617
+ mixins: [M],
2533
4618
  emits: ["actionConfirmed", "actionCanceled"],
2534
4619
  props: {
2535
4620
  isOpen: {
@@ -2569,21 +4654,21 @@ var ni = /*#__PURE__*/ M($r, [["render", ti]]), ri = {
2569
4654
  return this.type === "warning";
2570
4655
  }
2571
4656
  }
2572
- }, ii = { class: "bb:flex bb:bg-white bb:rounded-t-lg bb:p-6 bb:pb-4" }, ai = { class: "bb:flex bb:items-start" }, oi = { class: "bb:ml-4 bb:text-left" }, si = ["id"], ci = { class: "bb:mt-2" }, li = { class: "bb:text-sm bb:text-gray-500" }, ui = { class: "bb:bg-gray-50 bb:rounded-b-lg bb:px-6 bb:py-3 bb:flex bb:flex-row-reverse" };
2573
- function di(e, t, i, o, s, c) {
4657
+ }, Ka = { class: "bb:flex bb:bg-white bb:rounded-t-lg bb:p-6 bb:pb-4" }, qa = { class: "bb:flex bb:items-start" }, Ja = { class: "bb:ml-4 bb:text-left" }, Ya = ["id"], Xa = { class: "bb:mt-2" }, Za = { class: "bb:text-sm bb:text-gray-500" }, Qa = { class: "bb:bg-gray-50 bb:rounded-b-lg bb:px-6 bb:py-3 bb:flex bb:flex-row-reverse" };
4658
+ function $a(e, t, i, o, s, c) {
2574
4659
  let l = h("warning"), d = h("dangerous"), p = h("modal");
2575
4660
  return f(), n(p, {
2576
4661
  "is-open": i.isOpen,
2577
4662
  "heading-id": o.headingId,
2578
4663
  onEscape: t[2] ||= (t) => e.$emit("actionCanceled")
2579
4664
  }, {
2580
- default: b(() => [a("div", ii, [a("div", ai, [a("div", { class: u(["bb:shrink-0 bb:flex bb:items-center bb:justify-center bb:h-10 bb:w-10 bb:rounded-full", {
4665
+ default: b(() => [a("div", Ka, [a("div", qa, [a("div", { class: u(["bb:shrink-0 bb:flex bb:items-center bb:justify-center bb:h-10 bb:w-10 bb:rounded-full", {
2581
4666
  "bb:bg-red-100": c.isDangerous,
2582
4667
  "bb:bg-yellow-100": c.isWarning
2583
- }]) }, [c.isWarning ? (f(), n(l, { key: 0 })) : r("", !0), c.isDangerous ? (f(), n(d, { key: 1 })) : r("", !0)], 2), a("div", oi, [a("h3", {
4668
+ }]) }, [c.isWarning ? (f(), n(l, { key: 0 })) : r("", !0), c.isDangerous ? (f(), n(d, { key: 1 })) : r("", !0)], 2), a("div", Ja, [a("h3", {
2584
4669
  class: "bb:text-lg bb:leading-6 bb:font-medium bb:text-gray-900",
2585
4670
  id: o.headingId
2586
- }, _(i.confirmationHeading), 9, si), a("div", ci, [a("p", li, _(i.confirmationText), 1)])])])]), a("div", ui, [a("button", {
4671
+ }, _(i.confirmationHeading), 9, Ya), a("div", Xa, [a("p", Za, _(i.confirmationText), 1)])])])]), a("div", Qa, [a("button", {
2587
4672
  type: "button",
2588
4673
  class: u(["bb:inline-flex bb:justify-center bb:rounded-md bb:border bb:border-transparent bb:shadow-xs bb:px-4 bb:py-2 bb:text-sm bb:font-medium bb:text-white bb:focus:focus-ring bb:ml-3", {
2589
4674
  "bb:bg-red-600 bb:hover:bg-red-700": c.isDangerous,
@@ -2599,38 +4684,38 @@ function di(e, t, i, o, s, c) {
2599
4684
  _: 1
2600
4685
  }, 8, ["is-open", "heading-id"]);
2601
4686
  }
2602
- var fi = /*#__PURE__*/ M(ri, [["render", di]]);
4687
+ var eo = /*#__PURE__*/ k(Ga, [["render", $a]]);
2603
4688
  //#endregion
2604
4689
  //#region src/menuItems.js
2605
- function pi(e) {
2606
- if (typeof e != "object" || !e || typeof e.label != "string" || e.label === "" || e.color !== void 0 && !A(e.color)) return !1;
4690
+ function to(e) {
4691
+ if (typeof e != "object" || !e || typeof e.label != "string" || e.label === "" || e.color !== void 0 && !D(e.color)) return !1;
2607
4692
  let t = typeof e.href == "string" && e.href !== "" && e.onSelect === void 0, n = typeof e.onSelect == "function" && e.href === void 0;
2608
4693
  return t || n;
2609
4694
  }
2610
- function mi(e) {
4695
+ function no(e) {
2611
4696
  return Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e) : [];
2612
4697
  }
2613
- function hi(e) {
4698
+ function ro(e) {
2614
4699
  return typeof e.href == "string" && e.href !== "";
2615
4700
  }
2616
- function gi(e) {
2617
- return A(e.color) ? e.color : null;
4701
+ function io(e) {
4702
+ return D(e.color) ? e.color : null;
2618
4703
  }
2619
4704
  //#endregion
2620
4705
  //#region src/navigation.js
2621
- function _i(e) {
4706
+ function ao(e) {
2622
4707
  let t = e.currentTarget?.target ?? "";
2623
4708
  return !(e.defaultPrevented || e.target?.isContentEditable === !0 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || t !== "" && t !== "_self" || e.button !== 0);
2624
4709
  }
2625
4710
  var Z = {
2626
- inject: O,
4711
+ inject: ye,
2627
4712
  methods: { followLink(e, t) {
2628
4713
  let n = this.uiSettings.navigate;
2629
- n !== null && _i(e) && (e.preventDefault(), n(t));
4714
+ n !== null && ao(e) && (e.preventDefault(), n(t));
2630
4715
  } }
2631
- }, vi = {
2632
- components: { PopoverPanel: W },
2633
- mixins: [Z, j],
4716
+ }, oo = {
4717
+ components: { PopoverPanel: z },
4718
+ mixins: [Z, O],
2634
4719
  emits: ["update:modelValue"],
2635
4720
  props: {
2636
4721
  actions: { default: () => [] },
@@ -2641,7 +4726,7 @@ var Z = {
2641
4726
  },
2642
4727
  computed: {
2643
4728
  actionItems() {
2644
- return mi(this.actions);
4729
+ return no(this.actions);
2645
4730
  },
2646
4731
  hasActions() {
2647
4732
  return this.actionItems.length > 0;
@@ -2649,10 +4734,10 @@ var Z = {
2649
4734
  },
2650
4735
  methods: {
2651
4736
  color(e) {
2652
- return gi(e);
4737
+ return io(e);
2653
4738
  },
2654
4739
  isLink(e) {
2655
- return hi(e);
4740
+ return ro(e);
2656
4741
  },
2657
4742
  linkClicked(e, t) {
2658
4743
  e.currentTarget.focus({ preventScroll: !0 }), this.followLink(e, t);
@@ -2661,12 +4746,12 @@ var Z = {
2661
4746
  if (t.currentTarget.focus({ preventScroll: !0 }), typeof e.onSelect == "function") return e.onSelect();
2662
4747
  }
2663
4748
  }
2664
- }, yi = [
4749
+ }, so = [
2665
4750
  "href",
2666
4751
  "onClick",
2667
4752
  "textContent"
2668
- ], bi = ["onClick", "textContent"];
2669
- function xi(t, r, a, o, s, c) {
4753
+ ], co = ["onClick", "textContent"];
4754
+ function lo(t, r, a, o, s, c) {
2670
4755
  let l = h("popover-panel");
2671
4756
  return f(), n(l, {
2672
4757
  "model-value": a.modelValue,
@@ -2691,30 +4776,30 @@ function xi(t, r, a, o, s, c) {
2691
4776
  class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", c.color(n) === null ? "bb:text-gray-700 bb:hover:bg-gray-100 bb:hover:text-gray-900 bb:focus:bg-gray-100 bb:focus:text-gray-900" : t.colorClass(c.color(n), "menuItem")]),
2692
4777
  onClick: (e) => c.linkClicked(e, n.href),
2693
4778
  textContent: _(n.label)
2694
- }, null, 10, yi)) : (f(), i("button", {
4779
+ }, null, 10, so)) : (f(), i("button", {
2695
4780
  key: 1,
2696
4781
  type: "button",
2697
4782
  role: "menuitem",
2698
4783
  class: u(["bb:block bb:w-full bb:px-4 bb:py-2 bb:text-sm bb:text-left bb:cursor-pointer bb:focus:outline-hidden", c.color(n) === null ? "bb:text-gray-700 bb:hover:bg-gray-100 bb:hover:text-gray-900 bb:focus:bg-gray-100 bb:focus:text-gray-900" : t.colorClass(c.color(n), "menuItem")]),
2699
4784
  onClick: (e) => c.select(n, e),
2700
4785
  textContent: _(n.label)
2701
- }, null, 10, bi))], 64))), 128))]),
4786
+ }, null, 10, co))], 64))), 128))]),
2702
4787
  _: 3
2703
4788
  }, 8, ["model-value", "has-content"]);
2704
4789
  }
2705
- var Si = /*#__PURE__*/ M(vi, [["render", xi]]), Ci = {
2706
- components: { PopoverMenu: Si },
4790
+ var uo = /*#__PURE__*/ k(oo, [["render", lo]]), fo = {
4791
+ components: { PopoverMenu: uo },
2707
4792
  mixins: [
2708
- F,
4793
+ M,
2709
4794
  Z,
2710
- j
4795
+ O
2711
4796
  ],
2712
4797
  emits: ["update:modelValue"],
2713
4798
  props: {
2714
4799
  actions: {
2715
4800
  type: Array,
2716
4801
  default: () => [],
2717
- validator: (e) => e.every(pi)
4802
+ validator: (e) => e.every(to)
2718
4803
  },
2719
4804
  modelValue: {
2720
4805
  type: Boolean,
@@ -2726,7 +4811,7 @@ var Si = /*#__PURE__*/ M(vi, [["render", xi]]), Ci = {
2726
4811
  },
2727
4812
  computed: {
2728
4813
  items() {
2729
- return mi(this.actions);
4814
+ return no(this.actions);
2730
4815
  },
2731
4816
  hasActions() {
2732
4817
  return this.items.length > 0;
@@ -2735,7 +4820,7 @@ var Si = /*#__PURE__*/ M(vi, [["render", xi]]), Ci = {
2735
4820
  return this.items[0];
2736
4821
  },
2737
4822
  mainColor() {
2738
- return this.hasActions ? gi(this.mainAction) : null;
4823
+ return this.hasActions ? io(this.mainAction) : null;
2739
4824
  },
2740
4825
  menuActions() {
2741
4826
  return this.items.slice(1);
@@ -2757,7 +4842,7 @@ var Si = /*#__PURE__*/ M(vi, [["render", xi]]), Ci = {
2757
4842
  },
2758
4843
  methods: {
2759
4844
  isLink(e) {
2760
- return hi(e);
4845
+ return ro(e);
2761
4846
  },
2762
4847
  select(e) {
2763
4848
  if (typeof e.onSelect == "function") return e.onSelect();
@@ -2766,13 +4851,13 @@ var Si = /*#__PURE__*/ M(vi, [["render", xi]]), Ci = {
2766
4851
  this.menuIsOpen = e, this.$emit("update:modelValue", e);
2767
4852
  }
2768
4853
  }
2769
- }, wi = {
4854
+ }, po = {
2770
4855
  key: 0,
2771
4856
  class: "bb-dashboard-ui bb:relative bb:inline-flex bb:shadow-xs bb:rounded-md"
2772
- }, Ti = ["href", "textContent"], Ei = ["textContent"], Di = ["id", "popovertarget"], Oi = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
2773
- function ki(e, t, n, o, c, l) {
4857
+ }, mo = ["href", "textContent"], ho = ["textContent"], go = ["id", "popovertarget"], _o = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
4858
+ function vo(e, t, n, o, c, l) {
2774
4859
  let d = h("popover-menu");
2775
- return l.hasActions ? (f(), i("span", wi, [l.isLink(l.mainAction) ? (f(), i("a", {
4860
+ return l.hasActions ? (f(), i("span", po, [l.isLink(l.mainAction) ? (f(), i("a", {
2776
4861
  key: 0,
2777
4862
  href: l.mainAction.href,
2778
4863
  class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:focus-ring", [{
@@ -2781,7 +4866,7 @@ function ki(e, t, n, o, c, l) {
2781
4866
  }, l.mainColor === null ? "bb:bg-white bb:border-gray-300 bb:text-gray-700 bb:hover:bg-gray-50" : e.colorClass(l.mainColor, "button")]]),
2782
4867
  onClick: t[0] ||= (t) => e.followLink(t, l.mainAction.href),
2783
4868
  textContent: _(l.mainAction.label)
2784
- }, null, 10, Ti)) : (f(), i("button", {
4869
+ }, null, 10, mo)) : (f(), i("button", {
2785
4870
  key: 1,
2786
4871
  type: "button",
2787
4872
  class: u(["bb:relative bb:inline-flex bb:items-center bb:px-4 bb:py-2 bb:border bb:text-sm bb:font-medium bb:cursor-pointer bb:focus:z-10 bb:focus:focus-ring", [{
@@ -2790,7 +4875,7 @@ function ki(e, t, n, o, c, l) {
2790
4875
  }, l.mainColor === null ? "bb:bg-white bb:border-gray-300 bb:text-gray-700 bb:hover:bg-gray-50" : e.colorClass(l.mainColor, "button")]]),
2791
4876
  onClick: t[1] ||= (e) => l.select(l.mainAction),
2792
4877
  textContent: _(l.mainAction.label)
2793
- }, null, 10, Ei)), s(d, {
4878
+ }, null, 10, ho)), s(d, {
2794
4879
  class: "bb:-ml-px bb:flex",
2795
4880
  actions: l.menuActions,
2796
4881
  "model-value": n.modelValue,
@@ -2801,7 +4886,7 @@ function ki(e, t, n, o, c, l) {
2801
4886
  id: n.id,
2802
4887
  popovertarget: n.popovertarget,
2803
4888
  class: u(["bb:relative bb:inline-flex bb:items-center bb:px-2 bb:py-2 bb:rounded-r-md bb:border bb:text-sm bb:font-medium bb:focus:z-10 bb:focus:focus-ring", l.mainColor === null ? "bb:bg-white bb:border-gray-300 bb:text-gray-500 bb:hover:bg-gray-50" : e.colorClass(l.mainColor, "button")])
2804
- }, [a("span", Oi, _(e.texts.openMenu), 1), t[2] ||= a("svg", {
4889
+ }, [a("span", _o, _(e.texts.openMenu), 1), t[2] ||= a("svg", {
2805
4890
  class: "bb:h-5 bb:w-5 bb:pointer-events-none bb:cursor-default",
2806
4891
  xmlns: "http://www.w3.org/2000/svg",
2807
4892
  viewBox: "0 0 20 20",
@@ -2811,7 +4896,7 @@ function ki(e, t, n, o, c, l) {
2811
4896
  "fill-rule": "evenodd",
2812
4897
  d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
2813
4898
  "clip-rule": "evenodd"
2814
- })], -1)], 10, Di)]),
4899
+ })], -1)], 10, go)]),
2815
4900
  _: 1
2816
4901
  }, 8, [
2817
4902
  "actions",
@@ -2819,16 +4904,16 @@ function ki(e, t, n, o, c, l) {
2819
4904
  "onUpdate:modelValue"
2820
4905
  ])])) : r("", !0);
2821
4906
  }
2822
- var Ai = /*#__PURE__*/ M(Ci, [["render", ki]]), ji = {
2823
- components: { PopoverMenu: Si },
2824
- mixins: [F],
4907
+ var yo = /*#__PURE__*/ k(fo, [["render", vo]]), bo = {
4908
+ components: { PopoverMenu: uo },
4909
+ mixins: [M],
2825
4910
  props: { actions: {
2826
4911
  type: Array,
2827
4912
  default: () => [],
2828
- validator: (e) => e.every(pi)
4913
+ validator: (e) => e.every(to)
2829
4914
  } }
2830
- }, Mi = ["id", "popovertarget"], Ni = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
2831
- function Pi(e, t, r, i, o, s) {
4915
+ }, xo = ["id", "popovertarget"], So = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
4916
+ function Co(e, t, r, i, o, s) {
2832
4917
  let c = h("popover-menu");
2833
4918
  return f(), n(c, {
2834
4919
  class: "bb-dashboard-ui bb:inline-flex",
@@ -2839,7 +4924,7 @@ function Pi(e, t, r, i, o, s) {
2839
4924
  id: n.id,
2840
4925
  popovertarget: n.popovertarget,
2841
4926
  class: "bb:relative bb:inline-flex bb:items-center bb:justify-center bb:p-2 bb:rounded-md bb:text-gray-400 bb:hover:text-gray-500 bb:hover:bg-gray-100 bb:focus:outline-hidden bb:focus:bg-gray-100 bb:focus:text-gray-500 bb:transition bb:duration-150 bb:ease-in-out"
2842
- }, [a("span", Ni, _(e.texts.openMenu), 1), t[0] ||= a("svg", {
4927
+ }, [a("span", So, _(e.texts.openMenu), 1), t[0] ||= a("svg", {
2843
4928
  class: "bb:h-6 bb:w-6 bb:pointer-events-none bb:cursor-default",
2844
4929
  fill: "none",
2845
4930
  viewBox: "0 0 24 24",
@@ -2850,48 +4935,48 @@ function Pi(e, t, r, i, o, s) {
2850
4935
  "stroke-linejoin": "round",
2851
4936
  "stroke-width": "2",
2852
4937
  d: "M4 6h16M4 12h16M4 18h16"
2853
- })], -1)], 8, Mi)]),
4938
+ })], -1)], 8, xo)]),
2854
4939
  _: 1
2855
4940
  }, 8, ["actions"]);
2856
4941
  }
2857
- var Fi = /*#__PURE__*/ M(ji, [["render", Pi]]), Ii = {}, Li = {
4942
+ var wo = /*#__PURE__*/ k(bo, [["render", Co]]), To = {}, Eo = {
2858
4943
  xmlns: "http://www.w3.org/2000/svg",
2859
4944
  viewBox: "0 0 20 20",
2860
4945
  fill: "currentColor",
2861
4946
  "aria-hidden": "true"
2862
4947
  };
2863
- function Ri(e, t, n, r, o, s) {
2864
- return f(), i("svg", Li, [...t[0] ||= [a("path", {
4948
+ function Do(e, t, n, r, o, s) {
4949
+ return f(), i("svg", Eo, [...t[0] ||= [a("path", {
2865
4950
  "fill-rule": "evenodd",
2866
4951
  "clip-rule": "evenodd",
2867
4952
  d: "M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z"
2868
4953
  }, null, -1)]]);
2869
4954
  }
2870
- var zi = /*#__PURE__*/ M(Ii, [["render", Ri]]), Bi = {}, Vi = {
4955
+ var Oo = /*#__PURE__*/ k(To, [["render", Do]]), ko = {}, Ao = {
2871
4956
  xmlns: "http://www.w3.org/2000/svg",
2872
4957
  viewBox: "0 0 20 20",
2873
4958
  fill: "currentColor",
2874
4959
  "aria-hidden": "true"
2875
4960
  };
2876
- function Hi(e, t, n, r, o, s) {
2877
- return f(), i("svg", Vi, [...t[0] ||= [a("path", {
4961
+ function jo(e, t, n, r, o, s) {
4962
+ return f(), i("svg", Ao, [...t[0] ||= [a("path", {
2878
4963
  "fill-rule": "evenodd",
2879
4964
  "clip-rule": "evenodd",
2880
4965
  d: "M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"
2881
4966
  }, null, -1)]]);
2882
4967
  }
2883
- var Ui = /*#__PURE__*/ M(Bi, [["render", Hi]]);
4968
+ var Mo = /*#__PURE__*/ k(ko, [["render", jo]]);
2884
4969
  //#endregion
2885
4970
  //#region src/components/Pagination.vue
2886
- function Wi(e) {
4971
+ function No(e) {
2887
4972
  return typeof e == "string" && e !== "" ? e : null;
2888
4973
  }
2889
- var Gi = {
4974
+ var Po = {
2890
4975
  components: {
2891
- ArrowNarrowLeft: zi,
2892
- ArrowNarrowRight: Ui
4976
+ ArrowNarrowLeft: Oo,
4977
+ ArrowNarrowRight: Mo
2893
4978
  },
2894
- mixins: [F, Z],
4979
+ mixins: [M, Z],
2895
4980
  props: {
2896
4981
  links: {
2897
4982
  type: Object,
@@ -2919,49 +5004,49 @@ var Gi = {
2919
5004
  return typeof this.from == "number" && typeof this.to == "number";
2920
5005
  },
2921
5006
  previousPageUrl() {
2922
- return Wi(this.links?.prev);
5007
+ return No(this.links?.prev);
2923
5008
  },
2924
5009
  nextPageUrl() {
2925
- return Wi(this.links?.next);
5010
+ return No(this.links?.next);
2926
5011
  }
2927
5012
  }
2928
- }, Ki = {
5013
+ }, Fo = {
2929
5014
  key: 0,
2930
5015
  class: "bb-dashboard-ui bb:flex bb:items-center bb:justify-between"
2931
- }, qi = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex" }, Ji = ["href"], Yi = {
5016
+ }, Io = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex" }, Lo = ["href"], Ro = {
2932
5017
  key: 0,
2933
5018
  class: "bb:-mt-px bb:flex bb:text-gray-400 bb:text-sm bb:leading-5"
2934
- }, Xi = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Zi = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Qi = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex bb:justify-end" }, $i = ["href"];
2935
- function ea(e, t, n, c, l, u) {
5019
+ }, zo = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Bo = { class: "bb:font-medium bb:text-gray-900 bb:mx-1" }, Vo = { class: "bb:-mt-px bb:w-0 bb:flex-1 bb:flex bb:justify-end" }, Ho = ["href"];
5020
+ function Uo(e, t, n, c, l, u) {
2936
5021
  let d = h("arrow-narrow-left"), p = h("arrow-narrow-right");
2937
- return u.hasResults ? (f(), i("nav", Ki, [
2938
- a("div", qi, [u.previousPageUrl === null ? r("", !0) : (f(), i("a", {
5022
+ return u.hasResults ? (f(), i("nav", Fo, [
5023
+ a("div", Io, [u.previousPageUrl === null ? r("", !0) : (f(), i("a", {
2939
5024
  key: 0,
2940
5025
  href: u.previousPageUrl,
2941
5026
  class: "bb:border-t-2 bb:border-transparent bb:pt-4 bb:pr-1 bb:inline-flex bb:items-center bb:text-sm bb:font-medium bb:text-gray-500 bb:hover:text-gray-700 bb:hover:border-indigo-700 bb:focus-visible:focus-ring",
2942
5027
  onClick: t[0] ||= (t) => e.followLink(t, u.previousPageUrl)
2943
- }, [s(d, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400 bb:pointer-events-none bb:cursor-default" }), o(" " + _(e.texts.previousPage), 1)], 8, Ji))]),
2944
- u.hasRange ? (f(), i("div", Yi, [
5028
+ }, [s(d, { class: "bb:mr-3 bb:h-5 bb:w-5 bb:text-gray-400 bb:pointer-events-none bb:cursor-default" }), o(" " + _(e.texts.previousPage), 1)], 8, Lo))]),
5029
+ u.hasRange ? (f(), i("div", Ro, [
2945
5030
  o(_(e.texts.resultsBefore) + " ", 1),
2946
- a("span", Xi, _(u.from) + " - " + _(u.to), 1),
5031
+ a("span", zo, _(u.from) + " - " + _(u.to), 1),
2947
5032
  o(" " + _(e.texts.resultsOf) + " ", 1),
2948
- a("span", Zi, _(u.total), 1),
5033
+ a("span", Bo, _(u.total), 1),
2949
5034
  o(" " + _(e.texts.resultsAfter), 1)
2950
5035
  ])) : r("", !0),
2951
- a("div", Qi, [u.nextPageUrl === null ? r("", !0) : (f(), i("a", {
5036
+ a("div", Vo, [u.nextPageUrl === null ? r("", !0) : (f(), i("a", {
2952
5037
  key: 0,
2953
5038
  href: u.nextPageUrl,
2954
5039
  class: "bb:border-t-2 bb:border-transparent bb:pt-4 bb:pl-1 bb:inline-flex bb:items-center bb:text-sm bb:font-medium bb:text-gray-500 bb:hover:text-gray-700 bb:hover:border-indigo-700 bb:focus-visible:focus-ring",
2955
5040
  onClick: t[1] ||= (t) => e.followLink(t, u.nextPageUrl)
2956
- }, [o(_(e.texts.nextPage) + " ", 1), s(p, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400 bb:pointer-events-none bb:cursor-default" })], 8, $i))])
5041
+ }, [o(_(e.texts.nextPage) + " ", 1), s(p, { class: "bb:ml-3 bb:h-5 bb:w-5 bb:text-gray-400 bb:pointer-events-none bb:cursor-default" })], 8, Ho))])
2957
5042
  ])) : r("", !0);
2958
5043
  }
2959
- var ta = /*#__PURE__*/ M(Gi, [["render", ea]]), na = [
5044
+ var Wo = /*#__PURE__*/ k(Po, [["render", Uo]]), Go = [
2960
5045
  "left",
2961
5046
  "center",
2962
5047
  "right"
2963
5048
  ];
2964
- function ra(e) {
5049
+ function Ko(e) {
2965
5050
  if (typeof e != "object" || !e || typeof e.key != "string" || e.key === "") return null;
2966
5051
  let t = e.key;
2967
5052
  return {
@@ -2970,21 +5055,21 @@ function ra(e) {
2970
5055
  value: typeof e.value == "function" ? e.value : (e) => e?.[t],
2971
5056
  secondary: typeof e.secondary == "function" ? e.secondary : null,
2972
5057
  muted: e.muted === !0,
2973
- align: na.includes(e.align) ? e.align : "left",
5058
+ align: Go.includes(e.align) ? e.align : "left",
2974
5059
  wrap: e.wrap === !0,
2975
5060
  narrow: e.narrow === !0,
2976
5061
  visible: e.visible !== !1
2977
5062
  };
2978
5063
  }
2979
- function ia(e) {
5064
+ function qo(e) {
2980
5065
  return typeof e == "string" && e !== "" ? e : null;
2981
5066
  }
2982
- var aa = {
5067
+ var Jo = {
2983
5068
  components: {
2984
- Pagination: ta,
2985
- InfoPill: cr
5069
+ Pagination: Wo,
5070
+ InfoPill: Zi
2986
5071
  },
2987
- mixins: [F, j],
5072
+ mixins: [M, O],
2988
5073
  props: {
2989
5074
  rows: {
2990
5075
  type: Array,
@@ -3029,7 +5114,7 @@ var aa = {
3029
5114
  return Array.isArray(this.rows) ? this.rows : [];
3030
5115
  },
3031
5116
  visibleColumns() {
3032
- return (Array.isArray(this.columns) ? this.columns : []).map(ra).filter((e) => e !== null && e.visible);
5117
+ return (Array.isArray(this.columns) ? this.columns : []).map(Ko).filter((e) => e !== null && e.visible);
3033
5118
  },
3034
5119
  rowStripes() {
3035
5120
  return this.normalizedRows.map((e) => this.stripeOf(e));
@@ -3048,10 +5133,10 @@ var aa = {
3048
5133
  },
3049
5134
  badgeText() {
3050
5135
  if (this.hasRecords) {
3051
- let e = ia(this.foundText);
5136
+ let e = qo(this.foundText);
3052
5137
  return e === null ? null : `${e}: ${this.recordCount}`;
3053
5138
  }
3054
- return ia(this.emptyText);
5139
+ return qo(this.emptyText);
3055
5140
  }
3056
5141
  },
3057
5142
  methods: {
@@ -3071,15 +5156,15 @@ var aa = {
3071
5156
  stripeOf(e) {
3072
5157
  if (typeof this.rowStripe != "function") return null;
3073
5158
  let t = this.rowStripe(e);
3074
- return A(t) ? t : null;
5159
+ return D(t) ? t : null;
3075
5160
  },
3076
5161
  textOf(e, t) {
3077
5162
  let n = e(t);
3078
5163
  return n == null ? "" : String(n);
3079
5164
  }
3080
5165
  }
3081
- }, oa = { class: "bb:min-w-full bb:divide-y bb:divide-gray-200 bb:border-collapse" }, sa = { class: "bb:bg-gray-50" }, ca = ["textContent"], la = { class: "bb:divide-y bb:divide-gray-200" }, ua = ["textContent"], da = ["textContent"];
3082
- function fa(t, o, s, c, l, d) {
5166
+ }, Yo = { class: "bb:min-w-full bb:divide-y bb:divide-gray-200 bb:border-collapse" }, Xo = { class: "bb:bg-gray-50" }, Zo = ["textContent"], Qo = { class: "bb:divide-y bb:divide-gray-200" }, $o = ["textContent"], es = ["textContent"];
5167
+ function ts(t, o, s, c, l, d) {
3083
5168
  let g = h("info-pill"), v = h("pagination");
3084
5169
  return f(), i("div", null, [
3085
5170
  d.hasBadgeRow() ? (f(), i("div", {
@@ -3093,7 +5178,7 @@ function fa(t, o, s, c, l, d) {
3093
5178
  d.normalizedRows.length > 0 ? (f(), i("div", {
3094
5179
  key: 1,
3095
5180
  class: u(d.isCard && d.hasBadgeRow() ? "bb:mt-4" : "")
3096
- }, [a("div", { class: u(["bb:overflow-x-auto", d.isCard ? "bb:border-t bb:border-gray-200" : "bb:shadow-sm bb:border-b bb:border-gray-200 bb:rounded-lg"]) }, [a("table", oa, [a("thead", null, [a("tr", sa, [(f(!0), i(e, null, p(d.visibleColumns, (e) => (f(), i("th", {
5181
+ }, [a("div", { class: u(["bb:overflow-x-auto", d.isCard ? "bb:border-t bb:border-gray-200" : "bb:shadow-sm bb:border-b bb:border-gray-200 bb:rounded-lg"]) }, [a("table", Yo, [a("thead", null, [a("tr", Xo, [(f(!0), i(e, null, p(d.visibleColumns, (e) => (f(), i("th", {
3097
5182
  key: e.key,
3098
5183
  scope: "col",
3099
5184
  class: u(["bb:px-6 bb:py-3 bb:text-xs bb:leading-4 bb:font-medium bb:text-gray-500 bb:uppercase bb:tracking-wider bb:whitespace-nowrap", [{
@@ -3102,7 +5187,7 @@ function fa(t, o, s, c, l, d) {
3102
5187
  "bb:text-right": e.align === "right"
3103
5188
  }, { "bb:w-px": e.narrow }]]),
3104
5189
  textContent: _(e.label)
3105
- }, null, 10, ca))), 128))])]), a("tbody", la, [(f(!0), i(e, null, p(d.normalizedRows, (n, o) => (f(), i("tr", {
5190
+ }, null, 10, Zo))), 128))])]), a("tbody", Qo, [(f(!0), i(e, null, p(d.normalizedRows, (n, o) => (f(), i("tr", {
3106
5191
  key: d.keyOf(n, o),
3107
5192
  class: "bb:bg-white bb:even:bg-gray-50"
3108
5193
  }, [(f(!0), i(e, null, p(d.visibleColumns, (e, s) => (f(), i("td", {
@@ -3126,11 +5211,11 @@ function fa(t, o, s, c, l, d) {
3126
5211
  }, () => [a("div", {
3127
5212
  class: u(["bb:font-medium", e.muted ? "bb:text-gray-400" : "bb:text-gray-900"]),
3128
5213
  textContent: _(d.textOf(e.value, n))
3129
- }, null, 10, ua), e.secondary !== null && d.textOf(e.secondary, n) !== "" ? (f(), i("div", {
5214
+ }, null, 10, $o), e.secondary !== null && d.textOf(e.secondary, n) !== "" ? (f(), i("div", {
3130
5215
  key: 0,
3131
5216
  class: "bb:text-gray-400",
3132
5217
  textContent: _(d.textOf(e.secondary, n))
3133
- }, null, 8, da)) : r("", !0)])], 2))), 128))]))), 128))])])], 2)], 2)) : r("", !0),
5218
+ }, null, 8, es)) : r("", !0)])], 2))), 128))]))), 128))])])], 2)], 2)) : r("", !0),
3134
5219
  d.hasMeta ? (f(), n(v, {
3135
5220
  key: 2,
3136
5221
  meta: s.meta,
@@ -3145,7 +5230,7 @@ function fa(t, o, s, c, l, d) {
3145
5230
  ])) : r("", !0)
3146
5231
  ]);
3147
5232
  }
3148
- var pa = /*#__PURE__*/ M(aa, [["render", fa]]), ma = {
5233
+ var ns = /*#__PURE__*/ k(Jo, [["render", ts]]), rs = {
3149
5234
  mixins: [Z],
3150
5235
  props: {
3151
5236
  url: {
@@ -3161,17 +5246,17 @@ var pa = /*#__PURE__*/ M(aa, [["render", fa]]), ma = {
3161
5246
  default: !1
3162
5247
  }
3163
5248
  }
3164
- }, ha = ["href", "textContent"];
3165
- function ga(e, t, n, r, a, o) {
5249
+ }, is = ["href", "textContent"];
5250
+ function as(e, t, n, r, a, o) {
3166
5251
  return f(), i("a", {
3167
5252
  href: n.url,
3168
5253
  class: u([n.isActive ? "bb:border-indigo-400 bb:text-gray-600 bb:focus:border-indigo-700" : "bb:border-transparent bb:text-gray-500 bb:hover:text-gray-600 bb:hover:border-gray-300 bb:focus:text-gray-700 bb:focus:border-gray-300", "bb-dashboard-ui bb:inline-flex bb:items-center bb:px-1 bb:pt-1 bb:border-b-2 bb:text-sm bb:font-medium bb:leading-5 bb:focus:outline-hidden bb:transition bb:duration-150 bb:ease-in-out"]),
3169
5254
  onClick: t[0] ||= (t) => e.followLink(t, n.url),
3170
5255
  textContent: _(n.name)
3171
- }, null, 10, ha);
5256
+ }, null, 10, is);
3172
5257
  }
3173
- var _a = /*#__PURE__*/ M(ma, [["render", ga]]), va = {
3174
- mixins: [F, Z],
5258
+ var os = /*#__PURE__*/ k(rs, [["render", as]]), ss = {
5259
+ mixins: [M, Z],
3175
5260
  props: {
3176
5261
  tabs: {
3177
5262
  type: Array,
@@ -3185,13 +5270,13 @@ var _a = /*#__PURE__*/ M(ma, [["render", ga]]), va = {
3185
5270
  computed: { tabList() {
3186
5271
  return Array.isArray(this.tabs) ? this.tabs.filter((e) => typeof e == "object" && !!e) : [];
3187
5272
  } }
3188
- }, ya = ["aria-label"], ba = [
5273
+ }, cs = ["aria-label"], ls = [
3189
5274
  "href",
3190
5275
  "aria-current",
3191
5276
  "onClick",
3192
5277
  "textContent"
3193
5278
  ];
3194
- function xa(t, n, r, a, o, s) {
5279
+ function us(t, n, r, a, o, s) {
3195
5280
  return f(), i("nav", {
3196
5281
  class: "bb-dashboard-ui bb:flex bb:space-x-4",
3197
5282
  "aria-label": t.texts.tabs
@@ -3202,21 +5287,21 @@ function xa(t, n, r, a, o, s) {
3202
5287
  class: u(["bb:px-3 bb:py-2 bb:font-medium bb:text-sm bb:rounded-md bb:focus-visible:focus-ring", e.key === r.activeKey ? "bb:bg-indigo-100 bb:text-gray-700" : "bb:text-gray-500 bb:hover:text-gray-700"]),
3203
5288
  onClick: (n) => t.followLink(n, e.url),
3204
5289
  textContent: _(e.name)
3205
- }, null, 10, ba))), 128))], 8, ya);
5290
+ }, null, 10, ls))), 128))], 8, cs);
3206
5291
  }
3207
- var Sa = /*#__PURE__*/ M(va, [["render", xa]]), Ca = [
5292
+ var ds = /*#__PURE__*/ k(ss, [["render", us]]), fs = [
3208
5293
  "xl",
3209
5294
  "4xl",
3210
5295
  "7xl"
3211
- ], wa = {
3212
- components: { CrossButton: I },
3213
- mixins: [F],
5296
+ ], ps = {
5297
+ components: { CrossButton: N },
5298
+ mixins: [M],
3214
5299
  inheritAttrs: !1,
3215
5300
  props: {
3216
5301
  width: {
3217
5302
  type: String,
3218
5303
  default: "xl",
3219
- validator: (e) => Ca.includes(e)
5304
+ validator: (e) => fs.includes(e)
3220
5305
  },
3221
5306
  fallbackUrl: {
3222
5307
  type: String,
@@ -3232,7 +5317,7 @@ var Sa = /*#__PURE__*/ M(va, [["render", xa]]), Ca = [
3232
5317
  },
3233
5318
  computed: {
3234
5319
  resolvedWidth() {
3235
- return Ca.includes(this.width) ? this.width : "xl";
5320
+ return fs.includes(this.width) ? this.width : "xl";
3236
5321
  },
3237
5322
  windows() {
3238
5323
  return this.uiSettings.windows;
@@ -3248,13 +5333,13 @@ var Sa = /*#__PURE__*/ M(va, [["render", xa]]), Ca = [
3248
5333
  }
3249
5334
  },
3250
5335
  watch: { fallbackUrl() {
3251
- this.windows !== null && he(this.windows.state, this, this.fallbackAddress());
5336
+ this.windows !== null && ge(this.windows.state, this, this.fallbackAddress());
3252
5337
  } },
3253
5338
  mounted() {
3254
- this.windows !== null && (this.returnAddress = D(this.windows.state, this, this.resolvedKey, this.fallbackAddress()).returnAddress, this.$watch(() => [this.windows.page.number, this.resolvedKey], () => this.syncWindow(), { flush: "post" }));
5339
+ this.windows !== null && (this.returnAddress = E(this.windows.state, this, this.resolvedKey, this.fallbackAddress()).returnAddress, this.$watch(() => [this.windows.page.number, this.resolvedKey], () => this.syncWindow(), { flush: "post" }));
3255
5340
  },
3256
5341
  beforeUnmount() {
3257
- this.windows !== null && me(this.windows.state, this);
5342
+ this.windows !== null && he(this.windows.state, this);
3258
5343
  },
3259
5344
  methods: {
3260
5345
  fallbackAddress() {
@@ -3264,7 +5349,7 @@ var Sa = /*#__PURE__*/ M(va, [["render", xa]]), Ca = [
3264
5349
  return Object.fromEntries(Object.entries(this.$attrs).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-")));
3265
5350
  },
3266
5351
  syncWindow() {
3267
- let e = pe(this.windows.state, this, this.resolvedKey, this.fallbackAddress());
5352
+ let e = me(this.windows.state, this, this.resolvedKey, this.fallbackAddress());
3268
5353
  e.rejected && console.warn(`PageCard: ключ окна сменился на «${this.resolvedKey}» без смены страницы — карточка остаётся в окне «${e.key}»`), this.returnAddress = e.window.returnAddress;
3269
5354
  },
3270
5355
  close() {
@@ -3279,7 +5364,7 @@ var Sa = /*#__PURE__*/ M(va, [["render", xa]]), Ca = [
3279
5364
  }
3280
5365
  }
3281
5366
  };
3282
- function Ta(e, t, a, s, c, d) {
5367
+ function ms(e, t, a, s, c, d) {
3283
5368
  let p = h("cross-button");
3284
5369
  return f(), i("div", l({
3285
5370
  class: ["bb:box-border bb:relative bb:my-6 bb:mx-auto bb:bg-white bb:shadow-xl bb:rounded-lg", [
@@ -3310,7 +5395,7 @@ function Ta(e, t, a, s, c, d) {
3310
5395
  _: 1
3311
5396
  }, 8, ["class", "onClicked"])) : r("", !0)], 16);
3312
5397
  }
3313
- var Ea = /*#__PURE__*/ M(wa, [["render", Ta]]), Da = {}, Oa = {
5398
+ var hs = /*#__PURE__*/ k(ps, [["render", ms]]), gs = {}, _s = {
3314
5399
  class: "bb:h-7 bb:w-7 bb:text-green-600",
3315
5400
  xmlns: "http://www.w3.org/2000/svg",
3316
5401
  fill: "none",
@@ -3319,22 +5404,22 @@ var Ea = /*#__PURE__*/ M(wa, [["render", Ta]]), Da = {}, Oa = {
3319
5404
  stroke: "currentColor",
3320
5405
  "aria-hidden": "true"
3321
5406
  };
3322
- function ka(e, t, n, r, o, s) {
3323
- return f(), i("svg", Oa, [...t[0] ||= [a("path", {
5407
+ function vs(e, t, n, r, o, s) {
5408
+ return f(), i("svg", _s, [...t[0] ||= [a("path", {
3324
5409
  "stroke-linecap": "round",
3325
5410
  "stroke-linejoin": "round",
3326
5411
  d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
3327
5412
  }, null, -1)]]);
3328
5413
  }
3329
- var Aa = /*#__PURE__*/ M(Da, [["render", ka]]), ja = {}, Ma = {
5414
+ var ys = /*#__PURE__*/ k(gs, [["render", vs]]), bs = {}, xs = {
3330
5415
  class: "bb:h-5 bb:w-5",
3331
5416
  xmlns: "http://www.w3.org/2000/svg",
3332
5417
  viewBox: "0 0 20 20",
3333
5418
  fill: "currentColor",
3334
5419
  "aria-hidden": "true"
3335
5420
  };
3336
- function Na(e, t, n, r, o, s) {
3337
- return f(), i("svg", Ma, [...t[0] ||= [a("path", {
5421
+ function Ss(e, t, n, r, o, s) {
5422
+ return f(), i("svg", xs, [...t[0] ||= [a("path", {
3338
5423
  "fill-rule": "evenodd",
3339
5424
  d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
3340
5425
  "clip-rule": "evenodd"
@@ -3342,14 +5427,14 @@ function Na(e, t, n, r, o, s) {
3342
5427
  }
3343
5428
  //#endregion
3344
5429
  //#region src/components/NotificationMessage.vue
3345
- var Pa = {
5430
+ var Cs = {
3346
5431
  components: {
3347
- Check: Aa,
3348
- Close: /* @__PURE__ */ M(ja, [["render", Na]]),
3349
- Dangerous: Qr,
3350
- Warning: ni
5432
+ Check: ys,
5433
+ Close: /* @__PURE__ */ k(bs, [["render", Ss]]),
5434
+ Dangerous: X,
5435
+ Warning: Wa
3351
5436
  },
3352
- mixins: [F],
5437
+ mixins: [M],
3353
5438
  emits: ["update:modelValue"],
3354
5439
  props: {
3355
5440
  modelValue: {
@@ -3387,8 +5472,8 @@ var Pa = {
3387
5472
  return this.type === "confirmation";
3388
5473
  }
3389
5474
  }
3390
- }, Fa = ["role"], Ia = { class: "bb:p-4" }, La = { class: "bb:flex bb:items-start" }, Ra = { class: "bb:shrink-0" }, za = { class: "bb:ml-3 bb:w-0 bb:flex-1 bb:pt-0.5" }, Ba = { class: "bb:text-sm bb:font-medium bb:text-gray-900" }, Va = { class: "bb:mt-1 bb:text-sm bb:text-gray-500" }, Ha = { class: "bb:ml-4 bb:shrink-0 bb:flex" }, Ua = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
3391
- function Wa(e, t, o, c, l, d) {
5475
+ }, ws = ["role"], Ts = { class: "bb:p-4" }, Es = { class: "bb:flex bb:items-start" }, Ds = { class: "bb:shrink-0" }, Os = { class: "bb:ml-3 bb:w-0 bb:flex-1 bb:pt-0.5" }, ks = { class: "bb:text-sm bb:font-medium bb:text-gray-900" }, As = { class: "bb:mt-1 bb:text-sm bb:text-gray-500" }, js = { class: "bb:ml-4 bb:shrink-0 bb:flex" }, Ms = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
5476
+ function Ns(e, t, o, c, l, d) {
3392
5477
  let p = h("warning"), m = h("dangerous"), g = h("check"), v = h("close");
3393
5478
  return f(), i("div", {
3394
5479
  class: "bb-dashboard-ui bb:fixed bb:inset-0 bb:flex bb:items-start bb:justify-end bb:p-6 bb:pointer-events-none",
@@ -3400,14 +5485,14 @@ function Wa(e, t, o, c, l, d) {
3400
5485
  "bb:bg-yellow-50": d.isWarning,
3401
5486
  "bb:bg-gray-50": d.isConfirmation
3402
5487
  }])
3403
- }, [a("div", Ia, [a("div", La, [
3404
- a("div", Ra, [
5488
+ }, [a("div", Ts, [a("div", Es, [
5489
+ a("div", Ds, [
3405
5490
  d.isWarning ? (f(), n(p, { key: 0 })) : r("", !0),
3406
5491
  d.isDangerous ? (f(), n(m, { key: 1 })) : r("", !0),
3407
5492
  d.isConfirmation ? (f(), n(g, { key: 2 })) : r("", !0)
3408
5493
  ]),
3409
- a("div", za, [a("p", Ba, _(o.notificationHeading), 1), a("p", Va, _(d.text), 1)]),
3410
- a("div", Ha, [a("button", {
5494
+ a("div", Os, [a("p", ks, _(o.notificationHeading), 1), a("p", As, _(d.text), 1)]),
5495
+ a("div", js, [a("button", {
3411
5496
  type: "button",
3412
5497
  class: u(["bb:rounded-md bb:inline-flex bb:text-gray-400 bb:hover:text-gray-500 bb:focus:focus-ring", {
3413
5498
  "bb:bg-red-50": d.isDangerous,
@@ -3415,10 +5500,10 @@ function Wa(e, t, o, c, l, d) {
3415
5500
  "bb:bg-gray-50": d.isConfirmation
3416
5501
  }]),
3417
5502
  onClick: t[0] ||= C((t) => e.$emit("update:modelValue", ""), ["prevent"])
3418
- }, [a("span", Ua, _(e.texts.close), 1), s(v, { class: "bb:pointer-events-none bb:cursor-default" })], 2)])
3419
- ])])], 2)) : r("", !0)], 8, Fa);
5503
+ }, [a("span", Ms, _(e.texts.close), 1), s(v, { class: "bb:pointer-events-none bb:cursor-default" })], 2)])
5504
+ ])])], 2)) : r("", !0)], 8, ws);
3420
5505
  }
3421
- var Ga = /*#__PURE__*/ M(Pa, [["render", Wa]]), Ka = {}, qa = {
5506
+ var Ps = /*#__PURE__*/ k(Cs, [["render", Ns]]), Fs = {}, Is = {
3422
5507
  class: "bb:h-5 bb:w-5",
3423
5508
  xmlns: "http://www.w3.org/2000/svg",
3424
5509
  fill: "none",
@@ -3427,8 +5512,8 @@ var Ga = /*#__PURE__*/ M(Pa, [["render", Wa]]), Ka = {}, qa = {
3427
5512
  "stroke-width": "2",
3428
5513
  "aria-hidden": "true"
3429
5514
  };
3430
- function Ja(e, t, n, r, o, s) {
3431
- return f(), i("svg", qa, [...t[0] ||= [a("path", {
5515
+ function Ls(e, t, n, r, o, s) {
5516
+ return f(), i("svg", Is, [...t[0] ||= [a("path", {
3432
5517
  "stroke-linecap": "round",
3433
5518
  "stroke-linejoin": "round",
3434
5519
  d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
@@ -3438,12 +5523,12 @@ function Ja(e, t, n, r, o, s) {
3438
5523
  d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
3439
5524
  }, null, -1)]]);
3440
5525
  }
3441
- var Ya = /*#__PURE__*/ M(Ka, [["render", Ja]]), Q = 0, $ = null, Xa = {
5526
+ var Rs = /*#__PURE__*/ k(Fs, [["render", Ls]]), Q = 0, $ = null, zs = {
3442
5527
  components: {
3443
- PopoverPanel: W,
3444
- Eye: Ya
5528
+ PopoverPanel: z,
5529
+ Eye: Rs
3445
5530
  },
3446
- mixins: [F],
5531
+ mixins: [M],
3447
5532
  emits: ["update:modelValue"],
3448
5533
  props: {
3449
5534
  text: {
@@ -3486,8 +5571,8 @@ var Ya = /*#__PURE__*/ M(Ka, [["render", Ja]]), Q = 0, $ = null, Xa = {
3486
5571
  this.holdsPageSelectionLock && (this.holdsPageSelectionLock = !1, --Q, Q === 0 && (Object.assign(document.documentElement.style, $), $ = null));
3487
5572
  }
3488
5573
  }
3489
- }, Za = ["id", "popovertarget"], Qa = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
3490
- function $a(e, t, r, i, c, l) {
5574
+ }, Bs = ["id", "popovertarget"], Vs = { class: "bb:sr-only bb:pointer-events-none bb:cursor-default" };
5575
+ function Hs(e, t, r, i, c, l) {
3491
5576
  let u = h("eye"), d = h("popover-panel");
3492
5577
  return f(), n(d, {
3493
5578
  class: "bb-dashboard-ui bb:inline-flex",
@@ -3507,7 +5592,7 @@ function $a(e, t, r, i, c, l) {
3507
5592
  id: t.id,
3508
5593
  popovertarget: t.popovertarget,
3509
5594
  class: "bb:relative bb:inline-flex bb:items-center bb:justify-center bb:self-center bb:text-gray-400 bb:hover:text-gray-600 bb:rounded-md bb:focus-visible:focus-ring"
3510
- }, [a("span", Qa, _(e.texts.showText), 1), s(u, { class: "bb:pointer-events-none bb:cursor-default" })], 8, Za)]),
5595
+ }, [a("span", Vs, _(e.texts.showText), 1), s(u, { class: "bb:pointer-events-none bb:cursor-default" })], 8, Bs)]),
3511
5596
  default: b(() => [o(_(l.normalizedText), 1)]),
3512
5597
  _: 1
3513
5598
  }, 8, [
@@ -3517,6 +5602,6 @@ function $a(e, t, r, i, c, l) {
3517
5602
  "onToggle"
3518
5603
  ]);
3519
5604
  }
3520
- var eo = /*#__PURE__*/ M(Xa, [["render", $a]]);
5605
+ var Us = /*#__PURE__*/ k(zs, [["render", Hs]]);
3521
5606
  //#endregion
3522
- export { Br as ActionPill, fi as ConfirmationModal, pa as DataTable, N as Dot, Ai as DropdownButtonWithAction, hr as ErrorMessages, Sr as FormInput, Fi as HamburgerMenu, cr as InfoPill, _a as NavigationMenuElement, Ga as NotificationMessage, Ea as PageCard, Sa as PageTabs, Ze as RussianMobileFilter, it as Search, It as SelectDateFilter, Ut as SelectDateForm, Qt as SelectDateIntervalFilter, cn as SelectDateIntervalForm, Pn as SelectMultipleFilter, Vn as SelectMultipleForm, Zn as SelectSingleFilter, ir as SelectSingleForm, eo as TextPopover, ye as dashboardUi, Ce as downloadFile };
5607
+ export { ka as ActionPill, wi as AmountForm, Li as AmountIntervalFilter, qi as AmountIntervalForm, eo as ConfirmationModal, ns as DataTable, A as Dot, yo as DropdownButtonWithAction, ia as ErrorMessages, da as FormInput, wo as HamburgerMenu, Zi as InfoPill, os as NavigationMenuElement, Ps as NotificationMessage, hs as PageCard, ds as PageTabs, et as RussianMobileFilter, st as Search, Jr as SelectCurrencyFilter, Zr as SelectCurrencyForm, Gt as SelectDateFilter, Qt as SelectDateForm, ln as SelectDateIntervalFilter, vn as SelectDateIntervalForm, Zn as SelectMultipleFilter, ir as SelectMultipleForm, _r as SelectMultipleList, Ur as SelectSingleCards, Er as SelectSingleFilter, Nr as SelectSingleForm, Us as TextPopover, xe as dashboardUi, Te as downloadFile };