@bagelink/vue 0.0.322 → 0.0.335

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/components/ComboBox.vue.d.ts.map +1 -1
  2. package/dist/components/MaterialIcon.vue.d.ts +4 -2
  3. package/dist/components/MaterialIcon.vue.d.ts.map +1 -1
  4. package/dist/components/Modal.vue.d.ts +0 -1
  5. package/dist/components/ModalBglForm.vue.d.ts.map +1 -1
  6. package/dist/components/Popover.vue.d.ts +10 -0
  7. package/dist/components/Popover.vue.d.ts.map +1 -0
  8. package/dist/components/form/BglForm.vue.d.ts +1 -9
  9. package/dist/components/form/BglForm.vue.d.ts.map +1 -1
  10. package/dist/components/form/inputs/DateInput.vue.d.ts +0 -1
  11. package/dist/components/form/inputs/SelectInput.vue.d.ts +22 -16
  12. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  13. package/dist/components/form/inputs/TextArea.vue.d.ts +3 -1
  14. package/dist/components/form/inputs/TextArea.vue.d.ts.map +1 -1
  15. package/dist/components/form/inputs/TextInput.vue.d.ts.map +1 -1
  16. package/dist/components/formkit/index.d.ts +1 -14
  17. package/dist/components/formkit/index.d.ts.map +1 -1
  18. package/dist/components/index.d.ts +0 -2
  19. package/dist/components/index.d.ts.map +1 -1
  20. package/dist/components/layout/Layout.vue.d.ts +8 -0
  21. package/dist/components/layout/Layout.vue.d.ts.map +1 -1
  22. package/dist/components/layout/SidebarMenu.vue.d.ts.map +1 -1
  23. package/dist/components/layout/TabbedLayout.vue.d.ts +38 -0
  24. package/dist/components/layout/TabbedLayout.vue.d.ts.map +1 -0
  25. package/dist/components/layout/Tabs.vue.d.ts +24 -0
  26. package/dist/components/layout/Tabs.vue.d.ts.map +1 -0
  27. package/dist/components/layout/TabsBody.vue.d.ts +21 -0
  28. package/dist/components/layout/TabsBody.vue.d.ts.map +1 -0
  29. package/dist/components/layout/TabsNav.vue.d.ts +25 -0
  30. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -0
  31. package/dist/components/layout/index.d.ts +4 -0
  32. package/dist/components/layout/index.d.ts.map +1 -1
  33. package/dist/components/layout/tabsManager.d.ts +4 -0
  34. package/dist/components/layout/tabsManager.d.ts.map +1 -0
  35. package/dist/index.cjs +783 -2035
  36. package/dist/index.d.ts +0 -1
  37. package/dist/index.mjs +785 -2037
  38. package/dist/style.css +2129 -695
  39. package/dist/types/index.d.ts +7 -1
  40. package/dist/types/index.d.ts.map +1 -1
  41. package/dist/types/materialIcon.d.ts +2 -0
  42. package/dist/types/materialIcon.d.ts.map +1 -0
  43. package/dist/types/materialIcons.d.ts +1 -1
  44. package/dist/types/materialIcons.d.ts.map +1 -1
  45. package/dist/utils/index.d.ts.map +1 -1
  46. package/package.json +1 -1
  47. package/src/components/MaterialIcon.vue +3 -2
  48. package/src/components/PageTitle.vue +10 -20
  49. package/src/components/form/BglField.vue +2 -2
  50. package/src/components/form/BglForm.vue +49 -53
  51. package/src/components/form/inputs/SelectInput.vue +128 -484
  52. package/src/components/form/inputs/TextInput.vue +158 -112
  53. package/src/components/index.ts +0 -2
  54. package/src/components/layout/Layout.vue +34 -13
  55. package/src/components/layout/SidebarMenu.vue +22 -22
  56. package/src/components/layout/TabbedLayout.vue +79 -0
  57. package/src/components/layout/Tabs.vue +19 -0
  58. package/src/components/layout/TabsBody.vue +15 -0
  59. package/src/components/layout/TabsNav.vue +48 -0
  60. package/src/components/layout/index.ts +4 -0
  61. package/src/components/layout/tabsManager.ts +18 -0
  62. package/src/styles/appearance.css +81 -0
  63. package/src/styles/bagel.css +2 -0
  64. package/src/styles/layout.css +162 -17
  65. package/src/styles/mobilLayout.css +1476 -0
  66. package/src/styles/text.css +153 -1
  67. package/src/types/index.ts +9 -1
  68. package/src/types/materialIcons.ts +1180 -1178
  69. package/src/utils/BagelFormUtils.ts +1 -1
  70. package/src/utils/index.ts +0 -1
  71. package/src/components/ComboBox.vue +0 -165
  72. package/src/components/TabbedLayout.vue +0 -87
package/dist/index.cjs CHANGED
@@ -262,7 +262,7 @@ const computePosition = async (reference, floating, config) => {
262
262
  middlewareData
263
263
  };
264
264
  };
265
- async function detectOverflow(state, options) {
265
+ async function detectOverflow(state2, options) {
266
266
  var _await$platform$isEle;
267
267
  if (options === void 0) {
268
268
  options = {};
@@ -274,14 +274,14 @@ async function detectOverflow(state, options) {
274
274
  rects,
275
275
  elements,
276
276
  strategy
277
- } = state;
277
+ } = state2;
278
278
  const {
279
279
  boundary = "clippingAncestors",
280
280
  rootBoundary = "viewport",
281
281
  elementContext = "floating",
282
282
  altBoundary = false,
283
283
  padding = 0
284
- } = evaluate(options, state);
284
+ } = evaluate(options, state2);
285
285
  const paddingObject = getPaddingObject(padding);
286
286
  const altContext = elementContext === "floating" ? "reference" : "floating";
287
287
  const element = elements[altBoundary ? altContext : elementContext];
@@ -320,7 +320,7 @@ async function detectOverflow(state, options) {
320
320
  const arrow = (options) => ({
321
321
  name: "arrow",
322
322
  options,
323
- async fn(state) {
323
+ async fn(state2) {
324
324
  const {
325
325
  x: x2,
326
326
  y: y2,
@@ -329,11 +329,11 @@ const arrow = (options) => ({
329
329
  platform: platform2,
330
330
  elements,
331
331
  middlewareData
332
- } = state;
332
+ } = state2;
333
333
  const {
334
334
  element,
335
335
  padding = 0
336
- } = evaluate(options, state) || {};
336
+ } = evaluate(options, state2) || {};
337
337
  if (element == null) {
338
338
  return {};
339
339
  }
@@ -395,7 +395,7 @@ const autoPlacement = function(options) {
395
395
  return {
396
396
  name: "autoPlacement",
397
397
  options,
398
- async fn(state) {
398
+ async fn(state2) {
399
399
  var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
400
400
  const {
401
401
  rects,
@@ -403,16 +403,16 @@ const autoPlacement = function(options) {
403
403
  placement,
404
404
  platform: platform2,
405
405
  elements
406
- } = state;
406
+ } = state2;
407
407
  const {
408
408
  crossAxis = false,
409
409
  alignment,
410
410
  allowedPlacements = placements,
411
411
  autoAlignment = true,
412
412
  ...detectOverflowOptions
413
- } = evaluate(options, state);
413
+ } = evaluate(options, state2);
414
414
  const placements$1 = alignment !== void 0 || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
415
- const overflow = await detectOverflow(state, detectOverflowOptions);
415
+ const overflow = await detectOverflow(state2, detectOverflowOptions);
416
416
  const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
417
417
  const currentPlacement = placements$1[currentIndex];
418
418
  if (currentPlacement == null) {
@@ -482,7 +482,7 @@ const flip = function(options) {
482
482
  return {
483
483
  name: "flip",
484
484
  options,
485
- async fn(state) {
485
+ async fn(state2) {
486
486
  var _middlewareData$arrow, _middlewareData$flip;
487
487
  const {
488
488
  placement,
@@ -491,7 +491,7 @@ const flip = function(options) {
491
491
  initialPlacement,
492
492
  platform: platform2,
493
493
  elements
494
- } = state;
494
+ } = state2;
495
495
  const {
496
496
  mainAxis: checkMainAxis = true,
497
497
  crossAxis: checkCrossAxis = true,
@@ -500,7 +500,7 @@ const flip = function(options) {
500
500
  fallbackAxisSideDirection = "none",
501
501
  flipAlignment = true,
502
502
  ...detectOverflowOptions
503
- } = evaluate(options, state);
503
+ } = evaluate(options, state2);
504
504
  if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
505
505
  return {};
506
506
  }
@@ -512,7 +512,7 @@ const flip = function(options) {
512
512
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
513
513
  }
514
514
  const placements2 = [initialPlacement, ...fallbackPlacements];
515
- const overflow = await detectOverflow(state, detectOverflowOptions);
515
+ const overflow = await detectOverflow(state2, detectOverflowOptions);
516
516
  const overflows = [];
517
517
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
518
518
  if (checkMainAxis) {
@@ -569,19 +569,19 @@ const flip = function(options) {
569
569
  }
570
570
  };
571
571
  };
572
- async function convertValueToCoords(state, options) {
572
+ async function convertValueToCoords(state2, options) {
573
573
  const {
574
574
  placement,
575
575
  platform: platform2,
576
576
  elements
577
- } = state;
577
+ } = state2;
578
578
  const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
579
579
  const side = getSide$1(placement);
580
580
  const alignment = getAlignment(placement);
581
581
  const isVertical = getSideAxis(placement) === "y";
582
582
  const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
583
583
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
584
- const rawValue = evaluate(options, state);
584
+ const rawValue = evaluate(options, state2);
585
585
  let {
586
586
  mainAxis,
587
587
  crossAxis,
@@ -614,15 +614,15 @@ const offset = function(options) {
614
614
  return {
615
615
  name: "offset",
616
616
  options,
617
- async fn(state) {
617
+ async fn(state2) {
618
618
  var _middlewareData$offse, _middlewareData$arrow;
619
619
  const {
620
620
  x: x2,
621
621
  y: y2,
622
622
  placement,
623
623
  middlewareData
624
- } = state;
625
- const diffCoords = await convertValueToCoords(state, options);
624
+ } = state2;
625
+ const diffCoords = await convertValueToCoords(state2, options);
626
626
  if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
627
627
  return {};
628
628
  }
@@ -644,12 +644,12 @@ const shift$1 = function(options) {
644
644
  return {
645
645
  name: "shift",
646
646
  options,
647
- async fn(state) {
647
+ async fn(state2) {
648
648
  const {
649
649
  x: x2,
650
650
  y: y2,
651
651
  placement
652
- } = state;
652
+ } = state2;
653
653
  const {
654
654
  mainAxis: checkMainAxis = true,
655
655
  crossAxis: checkCrossAxis = false,
@@ -666,12 +666,12 @@ const shift$1 = function(options) {
666
666
  }
667
667
  },
668
668
  ...detectOverflowOptions
669
- } = evaluate(options, state);
669
+ } = evaluate(options, state2);
670
670
  const coords = {
671
671
  x: x2,
672
672
  y: y2
673
673
  };
674
- const overflow = await detectOverflow(state, detectOverflowOptions);
674
+ const overflow = await detectOverflow(state2, detectOverflowOptions);
675
675
  const crossAxis = getSideAxis(getSide$1(placement));
676
676
  const mainAxis = getOppositeAxis(crossAxis);
677
677
  let mainAxisCoord = coords[mainAxis];
@@ -691,7 +691,7 @@ const shift$1 = function(options) {
691
691
  crossAxisCoord = clamp(min2, crossAxisCoord, max2);
692
692
  }
693
693
  const limitedCoords = limiter.fn({
694
- ...state,
694
+ ...state2,
695
695
  [mainAxis]: mainAxisCoord,
696
696
  [crossAxis]: crossAxisCoord
697
697
  });
@@ -712,19 +712,19 @@ const size = function(options) {
712
712
  return {
713
713
  name: "size",
714
714
  options,
715
- async fn(state) {
715
+ async fn(state2) {
716
716
  const {
717
717
  placement,
718
718
  rects,
719
719
  platform: platform2,
720
720
  elements
721
- } = state;
721
+ } = state2;
722
722
  const {
723
723
  apply: apply2 = () => {
724
724
  },
725
725
  ...detectOverflowOptions
726
- } = evaluate(options, state);
727
- const overflow = await detectOverflow(state, detectOverflowOptions);
726
+ } = evaluate(options, state2);
727
+ const overflow = await detectOverflow(state2, detectOverflowOptions);
728
728
  const side = getSide$1(placement);
729
729
  const alignment = getAlignment(placement);
730
730
  const isYAxis = getSideAxis(placement) === "y";
@@ -743,7 +743,7 @@ const size = function(options) {
743
743
  }
744
744
  const overflowAvailableHeight = height - overflow[heightSide];
745
745
  const overflowAvailableWidth = width - overflow[widthSide];
746
- const noShift = !state.middlewareData.shift;
746
+ const noShift = !state2.middlewareData.shift;
747
747
  let availableHeight = overflowAvailableHeight;
748
748
  let availableWidth = overflowAvailableWidth;
749
749
  if (isYAxis) {
@@ -765,7 +765,7 @@ const size = function(options) {
765
765
  }
766
766
  }
767
767
  await apply2({
768
- ...state,
768
+ ...state2,
769
769
  availableWidth,
770
770
  availableHeight
771
771
  });
@@ -4019,7 +4019,7 @@ const adapters = {
4019
4019
  }
4020
4020
  if (!adapter) {
4021
4021
  const reasons = Object.entries(rejectedReasons).map(
4022
- ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
4022
+ ([id, state2]) => `adapter ${id} ` + (state2 === false ? "is not supported by the environment" : "is not available in the build")
4023
4023
  );
4024
4024
  let s2 = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
4025
4025
  throw new AxiosError(
@@ -4880,7 +4880,7 @@ const ModalPlugin = {
4880
4880
  const props2 = { ...modal.modalOptions, visible: true, "onUpdate:visible": () => hideModal(index2) };
4881
4881
  if (modal.modalType === "modalForm")
4882
4882
  return vue.h(ModalForm, props2, modal.componentSlots);
4883
- return vue.h(_sfc_main$C, props2, modal.componentSlots);
4883
+ return vue.h(_sfc_main$E, props2, modal.componentSlots);
4884
4884
  });
4885
4885
  }
4886
4886
  });
@@ -4945,7 +4945,7 @@ function numField(id, label, options) {
4945
4945
  function frmRow(...children2) {
4946
4946
  return {
4947
4947
  $el: "div",
4948
- class: "flex gap-1",
4948
+ class: "flex gap-1 m_block",
4949
4949
  children: children2
4950
4950
  };
4951
4951
  }
@@ -4991,8 +4991,6 @@ function bindAttrs(attrs, fieldVal, row) {
4991
4991
  key,
4992
4992
  typeof value === "function" ? value(fieldVal, row) : value
4993
4993
  ]);
4994
- if (attrs.options)
4995
- console.log("arr", arr);
4996
4994
  const resolvedAttrs = Object.fromEntries(arr);
4997
4995
  return resolvedAttrs;
4998
4996
  }
@@ -6970,19 +6968,19 @@ function dfa(nfa2) {
6970
6968
  });
6971
6969
  });
6972
6970
  });
6973
- let state = labeled[states.join(",")] = new ContentMatch(states.indexOf(nfa2.length - 1) > -1);
6971
+ let state2 = labeled[states.join(",")] = new ContentMatch(states.indexOf(nfa2.length - 1) > -1);
6974
6972
  for (let i2 = 0; i2 < out.length; i2++) {
6975
6973
  let states2 = out[i2][1].sort(cmp);
6976
- state.next.push({ type: out[i2][0], next: labeled[states2.join(",")] || explore(states2) });
6974
+ state2.next.push({ type: out[i2][0], next: labeled[states2.join(",")] || explore(states2) });
6977
6975
  }
6978
- return state;
6976
+ return state2;
6979
6977
  }
6980
6978
  }
6981
6979
  function checkForDeadEnds(match2, stream) {
6982
6980
  for (let i2 = 0, work = [match2]; i2 < work.length; i2++) {
6983
- let state = work[i2], dead = !state.validEnd, nodes2 = [];
6984
- for (let j = 0; j < state.next.length; j++) {
6985
- let { type: type3, next } = state.next[j];
6981
+ let state2 = work[i2], dead = !state2.validEnd, nodes2 = [];
6982
+ for (let j = 0; j < state2.next.length; j++) {
6983
+ let { type: type3, next } = state2.next[j];
6986
6984
  nodes2.push(type3.name);
6987
6985
  if (dead && !(type3.isText || type3.hasRequiredAttrs()))
6988
6986
  dead = false;
@@ -10379,14 +10377,14 @@ class Transaction extends Transform {
10379
10377
  /**
10380
10378
  @internal
10381
10379
  */
10382
- constructor(state) {
10383
- super(state.doc);
10380
+ constructor(state2) {
10381
+ super(state2.doc);
10384
10382
  this.curSelectionFor = 0;
10385
10383
  this.updated = 0;
10386
10384
  this.meta = /* @__PURE__ */ Object.create(null);
10387
10385
  this.time = Date.now();
10388
- this.curSelection = state.selection;
10389
- this.storedMarks = state.storedMarks;
10386
+ this.curSelection = state2.selection;
10387
+ this.storedMarks = state2.storedMarks;
10390
10388
  }
10391
10389
  /**
10392
10390
  The transaction's current selection. This defaults to the editor
@@ -10593,8 +10591,8 @@ const baseFields = [
10593
10591
  init(config) {
10594
10592
  return config.storedMarks || null;
10595
10593
  },
10596
- apply(tr2, _marks, _old, state) {
10597
- return state.selection.$cursor ? tr2.storedMarks : null;
10594
+ apply(tr2, _marks, _old, state2) {
10595
+ return state2.selection.$cursor ? tr2.storedMarks : null;
10598
10596
  }
10599
10597
  }),
10600
10598
  new FieldDesc("scrollToSelection", {
@@ -10758,9 +10756,9 @@ class EditorState {
10758
10756
  for (let prop3 in pluginFields) {
10759
10757
  if (prop3 == "doc" || prop3 == "selection")
10760
10758
  throw new RangeError("The JSON fields `doc` and `selection` are reserved");
10761
- let plugin = pluginFields[prop3], state = plugin.spec.state;
10762
- if (state && state.toJSON)
10763
- result[prop3] = state.toJSON.call(plugin, this[plugin.key]);
10759
+ let plugin = pluginFields[prop3], state2 = plugin.spec.state;
10760
+ if (state2 && state2.toJSON)
10761
+ result[prop3] = state2.toJSON.call(plugin, this[plugin.key]);
10764
10762
  }
10765
10763
  return result;
10766
10764
  }
@@ -10789,9 +10787,9 @@ class EditorState {
10789
10787
  } else {
10790
10788
  if (pluginFields)
10791
10789
  for (let prop3 in pluginFields) {
10792
- let plugin = pluginFields[prop3], state = plugin.spec.state;
10793
- if (plugin.key == field.name && state && state.fromJSON && Object.prototype.hasOwnProperty.call(json, prop3)) {
10794
- instance[field.name] = state.fromJSON.call(plugin, config, json[prop3], instance);
10790
+ let plugin = pluginFields[prop3], state2 = plugin.spec.state;
10791
+ if (plugin.key == field.name && state2 && state2.fromJSON && Object.prototype.hasOwnProperty.call(json, prop3)) {
10792
+ instance[field.name] = state2.fromJSON.call(plugin, config, json[prop3], instance);
10795
10793
  return;
10796
10794
  }
10797
10795
  }
@@ -10826,8 +10824,8 @@ class Plugin {
10826
10824
  /**
10827
10825
  Extract the plugin's state field from an editor state.
10828
10826
  */
10829
- getState(state) {
10830
- return state[this.key];
10827
+ getState(state2) {
10828
+ return state2[this.key];
10831
10829
  }
10832
10830
  }
10833
10831
  const keys$1 = /* @__PURE__ */ Object.create(null);
@@ -10848,14 +10846,14 @@ class PluginKey {
10848
10846
  Get the active plugin with this key, if any, from an editor
10849
10847
  state.
10850
10848
  */
10851
- get(state) {
10852
- return state.config.pluginsByKey[this.key];
10849
+ get(state2) {
10850
+ return state2.config.pluginsByKey[this.key];
10853
10851
  }
10854
10852
  /**
10855
10853
  Get the plugin's state from an editor state.
10856
10854
  */
10857
- getState(state) {
10858
- return state[this.key];
10855
+ getState(state2) {
10856
+ return state2[this.key];
10859
10857
  }
10860
10858
  }
10861
10859
  const domIndex = function(node) {
@@ -11341,25 +11339,25 @@ function flattenH(rect, top2) {
11341
11339
  let y2 = top2 ? rect.top : rect.bottom;
11342
11340
  return { top: y2, bottom: y2, left: rect.left, right: rect.right };
11343
11341
  }
11344
- function withFlushedState(view, state, f2) {
11342
+ function withFlushedState(view, state2, f2) {
11345
11343
  let viewState = view.state, active = view.root.activeElement;
11346
- if (viewState != state)
11347
- view.updateState(state);
11344
+ if (viewState != state2)
11345
+ view.updateState(state2);
11348
11346
  if (active != view.dom)
11349
11347
  view.focus();
11350
11348
  try {
11351
11349
  return f2();
11352
11350
  } finally {
11353
- if (viewState != state)
11351
+ if (viewState != state2)
11354
11352
  view.updateState(viewState);
11355
11353
  if (active != view.dom && active)
11356
11354
  active.focus();
11357
11355
  }
11358
11356
  }
11359
- function endOfTextblockVertical(view, state, dir) {
11360
- let sel = state.selection;
11357
+ function endOfTextblockVertical(view, state2, dir) {
11358
+ let sel = state2.selection;
11361
11359
  let $pos = dir == "up" ? sel.$from : sel.$to;
11362
- return withFlushedState(view, state, () => {
11360
+ return withFlushedState(view, state2, () => {
11363
11361
  let { node: dom } = view.docView.domFromPos($pos.pos, dir == "up" ? -1 : 1);
11364
11362
  for (; ; ) {
11365
11363
  let nearest = view.docView.nearestDesc(dom, true);
@@ -11390,15 +11388,15 @@ function endOfTextblockVertical(view, state, dir) {
11390
11388
  });
11391
11389
  }
11392
11390
  const maybeRTL = /[\u0590-\u08ac]/;
11393
- function endOfTextblockHorizontal(view, state, dir) {
11394
- let { $head } = state.selection;
11391
+ function endOfTextblockHorizontal(view, state2, dir) {
11392
+ let { $head } = state2.selection;
11395
11393
  if (!$head.parent.isTextblock)
11396
11394
  return false;
11397
11395
  let offset2 = $head.parentOffset, atStart = !offset2, atEnd = offset2 == $head.parent.content.size;
11398
11396
  let sel = view.domSelection();
11399
11397
  if (!maybeRTL.test($head.parent.textContent) || !sel.modify)
11400
11398
  return dir == "left" || dir == "backward" ? atStart : atEnd;
11401
- return withFlushedState(view, state, () => {
11399
+ return withFlushedState(view, state2, () => {
11402
11400
  let { focusNode: oldNode, focusOffset: oldOff, anchorNode, anchorOffset } = view.domSelectionRange();
11403
11401
  let oldBidiLevel = sel.caretBidiLevel;
11404
11402
  sel.modify("move", dir, "character");
@@ -11419,12 +11417,12 @@ function endOfTextblockHorizontal(view, state, dir) {
11419
11417
  let cachedState = null;
11420
11418
  let cachedDir = null;
11421
11419
  let cachedResult = false;
11422
- function endOfTextblock(view, state, dir) {
11423
- if (cachedState == state && cachedDir == dir)
11420
+ function endOfTextblock(view, state2, dir) {
11421
+ if (cachedState == state2 && cachedDir == dir)
11424
11422
  return cachedResult;
11425
- cachedState = state;
11423
+ cachedState = state2;
11426
11424
  cachedDir = dir;
11427
- return cachedResult = dir == "up" || dir == "down" ? endOfTextblockVertical(view, state, dir) : endOfTextblockHorizontal(view, state, dir);
11425
+ return cachedResult = dir == "up" || dir == "down" ? endOfTextblockVertical(view, state2, dir) : endOfTextblockHorizontal(view, state2, dir);
11428
11426
  }
11429
11427
  const NOT_DIRTY = 0, CHILD_DIRTY = 1, CONTENT_DIRTY = 2, NODE_DIRTY = 3;
11430
11428
  class ViewDesc {
@@ -12929,10 +12927,10 @@ function anchorInRightPlace(view) {
12929
12927
  let domSel = view.domSelectionRange();
12930
12928
  return isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset);
12931
12929
  }
12932
- function moveSelectionBlock(state, dir) {
12933
- let { $anchor, $head } = state.selection;
12930
+ function moveSelectionBlock(state2, dir) {
12931
+ let { $anchor, $head } = state2.selection;
12934
12932
  let $side = dir > 0 ? $anchor.max($head) : $anchor.min($head);
12935
- let $start = !$side.parent.inlineContent ? $side : $side.depth ? state.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;
12933
+ let $start = !$side.parent.inlineContent ? $side : $side.depth ? state2.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;
12936
12934
  return $start && Selection$1.findFrom($start, dir);
12937
12935
  }
12938
12936
  function apply(view, sel) {
@@ -13134,9 +13132,9 @@ function setSelFocus(view, node, offset2) {
13134
13132
  sel.extend(node, offset2);
13135
13133
  }
13136
13134
  view.domObserver.setCurSelection();
13137
- let { state } = view;
13135
+ let { state: state2 } = view;
13138
13136
  setTimeout(() => {
13139
- if (view.state == state)
13137
+ if (view.state == state2)
13140
13138
  selectionToDOM(view);
13141
13139
  }, 50);
13142
13140
  }
@@ -13201,9 +13199,9 @@ function stopNativeHorizontalDelete(view, dir) {
13201
13199
  }
13202
13200
  return false;
13203
13201
  }
13204
- function switchEditable(view, node, state) {
13202
+ function switchEditable(view, node, state2) {
13205
13203
  view.domObserver.stop();
13206
- node.contentEditable = state;
13204
+ node.contentEditable = state2;
13207
13205
  view.domObserver.start();
13208
13206
  }
13209
13207
  function safariDownArrowBug(view) {
@@ -13850,14 +13848,14 @@ const timeoutComposition = android ? 5e3 : -1;
13850
13848
  editHandlers.compositionstart = editHandlers.compositionupdate = (view) => {
13851
13849
  if (!view.composing) {
13852
13850
  view.domObserver.flush();
13853
- let { state } = view, $pos = state.selection.$from;
13854
- if (state.selection.empty && (state.storedMarks || !$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some((m2) => m2.type.spec.inclusive === false))) {
13851
+ let { state: state2 } = view, $pos = state2.selection.$from;
13852
+ if (state2.selection.empty && (state2.storedMarks || !$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some((m2) => m2.type.spec.inclusive === false))) {
13855
13853
  view.markCursor = view.state.storedMarks || $pos.marks();
13856
13854
  endComposition(view, true);
13857
13855
  view.markCursor = null;
13858
13856
  } else {
13859
13857
  endComposition(view);
13860
- if (gecko && state.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {
13858
+ if (gecko && state2.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {
13861
13859
  let sel = view.domSelectionRange();
13862
13860
  for (let node = sel.focusNode, offset2 = sel.focusOffset; node && node.nodeType == 1 && offset2 != 0; ) {
13863
13861
  let before = offset2 < 0 ? node.lastChild : node.childNodes[offset2 - 1];
@@ -15429,18 +15427,18 @@ class EditorView {
15429
15427
  Update the editor's `state` prop, without touching any of the
15430
15428
  other props.
15431
15429
  */
15432
- updateState(state) {
15433
- this.updateStateInner(state, this._props);
15430
+ updateState(state2) {
15431
+ this.updateStateInner(state2, this._props);
15434
15432
  }
15435
- updateStateInner(state, prevProps) {
15433
+ updateStateInner(state2, prevProps) {
15436
15434
  var _a2;
15437
15435
  let prev = this.state, redraw = false, updateSel = false;
15438
- if (state.storedMarks && this.composing) {
15436
+ if (state2.storedMarks && this.composing) {
15439
15437
  clearComposition(this);
15440
15438
  updateSel = true;
15441
15439
  }
15442
- this.state = state;
15443
- let pluginsChanged = prev.plugins != state.plugins || this._props.plugins != prevProps.plugins;
15440
+ this.state = state2;
15441
+ let pluginsChanged = prev.plugins != state2.plugins || this._props.plugins != prevProps.plugins;
15444
15442
  if (pluginsChanged || this._props.plugins != prevProps.plugins || this._props.nodeViews != prevProps.nodeViews) {
15445
15443
  let nodeViews = buildNodeViews(this);
15446
15444
  if (changedNodeViews(nodeViews, this.nodeViews)) {
@@ -15454,20 +15452,20 @@ class EditorView {
15454
15452
  this.editable = getEditable(this);
15455
15453
  updateCursorWrapper(this);
15456
15454
  let innerDeco = viewDecorations(this), outerDeco = computeDocDeco(this);
15457
- let scroll = prev.plugins != state.plugins && !prev.doc.eq(state.doc) ? "reset" : state.scrollToSelection > prev.scrollToSelection ? "to selection" : "preserve";
15458
- let updateDoc = redraw || !this.docView.matchesNode(state.doc, outerDeco, innerDeco);
15459
- if (updateDoc || !state.selection.eq(prev.selection))
15455
+ let scroll = prev.plugins != state2.plugins && !prev.doc.eq(state2.doc) ? "reset" : state2.scrollToSelection > prev.scrollToSelection ? "to selection" : "preserve";
15456
+ let updateDoc = redraw || !this.docView.matchesNode(state2.doc, outerDeco, innerDeco);
15457
+ if (updateDoc || !state2.selection.eq(prev.selection))
15460
15458
  updateSel = true;
15461
15459
  let oldScrollPos = scroll == "preserve" && updateSel && this.dom.style.overflowAnchor == null && storeScrollPos(this);
15462
15460
  if (updateSel) {
15463
15461
  this.domObserver.stop();
15464
- let forceSelUpdate = updateDoc && (ie$1 || chrome) && !this.composing && !prev.selection.empty && !state.selection.empty && selectionContextChanged(prev.selection, state.selection);
15462
+ let forceSelUpdate = updateDoc && (ie$1 || chrome) && !this.composing && !prev.selection.empty && !state2.selection.empty && selectionContextChanged(prev.selection, state2.selection);
15465
15463
  if (updateDoc) {
15466
15464
  let chromeKludge = chrome ? this.trackWrites = this.domSelectionRange().focusNode : null;
15467
- if (redraw || !this.docView.update(state.doc, outerDeco, innerDeco, this)) {
15465
+ if (redraw || !this.docView.update(state2.doc, outerDeco, innerDeco, this)) {
15468
15466
  this.docView.updateOuterDeco([]);
15469
15467
  this.docView.destroy();
15470
- this.docView = docViewDesc(state.doc, outerDeco, innerDeco, this.dom, this);
15468
+ this.docView = docViewDesc(state2.doc, outerDeco, innerDeco, this.dom, this);
15471
15469
  }
15472
15470
  if (chromeKludge && !this.trackWrites)
15473
15471
  forceSelUpdate = true;
@@ -15475,13 +15473,13 @@ class EditorView {
15475
15473
  if (forceSelUpdate || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && anchorInRightPlace(this))) {
15476
15474
  selectionToDOM(this, forceSelUpdate);
15477
15475
  } else {
15478
- syncNodeSelection(this, state.selection);
15476
+ syncNodeSelection(this, state2.selection);
15479
15477
  this.domObserver.setCurSelection();
15480
15478
  }
15481
15479
  this.domObserver.start();
15482
15480
  }
15483
15481
  this.updatePluginViews(prev);
15484
- if (((_a2 = this.dragging) === null || _a2 === void 0 ? void 0 : _a2.node) && !prev.doc.eq(state.doc))
15482
+ if (((_a2 = this.dragging) === null || _a2 === void 0 ? void 0 : _a2.node) && !prev.doc.eq(state2.doc))
15485
15483
  this.updateDraggedNode(this.dragging, prev);
15486
15484
  if (scroll == "reset") {
15487
15485
  this.dom.scrollTop = 0;
@@ -15691,8 +15689,8 @@ class EditorView {
15691
15689
  to the view's current state by default, but it is possible to
15692
15690
  pass a different state.
15693
15691
  */
15694
- endOfTextblock(dir, state) {
15695
- return endOfTextblock(this, state || this.state, dir);
15692
+ endOfTextblock(dir, state2) {
15693
+ return endOfTextblock(this, state2 || this.state, dir);
15696
15694
  }
15697
15695
  /**
15698
15696
  Run the editor's paste logic with the given HTML string. The
@@ -16019,21 +16017,21 @@ function keydownHandler(bindings) {
16019
16017
  return false;
16020
16018
  };
16021
16019
  }
16022
- const deleteSelection = (state, dispatch) => {
16023
- if (state.selection.empty)
16020
+ const deleteSelection = (state2, dispatch) => {
16021
+ if (state2.selection.empty)
16024
16022
  return false;
16025
16023
  if (dispatch)
16026
- dispatch(state.tr.deleteSelection().scrollIntoView());
16024
+ dispatch(state2.tr.deleteSelection().scrollIntoView());
16027
16025
  return true;
16028
16026
  };
16029
- function atBlockStart(state, view) {
16030
- let { $cursor } = state.selection;
16031
- if (!$cursor || (view ? !view.endOfTextblock("backward", state) : $cursor.parentOffset > 0))
16027
+ function atBlockStart(state2, view) {
16028
+ let { $cursor } = state2.selection;
16029
+ if (!$cursor || (view ? !view.endOfTextblock("backward", state2) : $cursor.parentOffset > 0))
16032
16030
  return null;
16033
16031
  return $cursor;
16034
16032
  }
16035
- const joinBackward = (state, dispatch, view) => {
16036
- let $cursor = atBlockStart(state, view);
16033
+ const joinBackward = (state2, dispatch, view) => {
16034
+ let $cursor = atBlockStart(state2, view);
16037
16035
  if (!$cursor)
16038
16036
  return false;
16039
16037
  let $cut = findCutBefore($cursor);
@@ -16042,17 +16040,17 @@ const joinBackward = (state, dispatch, view) => {
16042
16040
  if (target == null)
16043
16041
  return false;
16044
16042
  if (dispatch)
16045
- dispatch(state.tr.lift(range2, target).scrollIntoView());
16043
+ dispatch(state2.tr.lift(range2, target).scrollIntoView());
16046
16044
  return true;
16047
16045
  }
16048
16046
  let before = $cut.nodeBefore;
16049
- if (!before.type.spec.isolating && deleteBarrier(state, $cut, dispatch))
16047
+ if (!before.type.spec.isolating && deleteBarrier(state2, $cut, dispatch))
16050
16048
  return true;
16051
16049
  if ($cursor.parent.content.size == 0 && (textblockAt(before, "end") || NodeSelection.isSelectable(before))) {
16052
- let delStep = replaceStep(state.doc, $cursor.before(), $cursor.after(), Slice.empty);
16050
+ let delStep = replaceStep(state2.doc, $cursor.before(), $cursor.after(), Slice.empty);
16053
16051
  if (delStep && delStep.slice.size < delStep.to - delStep.from) {
16054
16052
  if (dispatch) {
16055
- let tr2 = state.tr.step(delStep);
16053
+ let tr2 = state2.tr.step(delStep);
16056
16054
  tr2.setSelection(textblockAt(before, "end") ? Selection$1.findFrom(tr2.doc.resolve(tr2.mapping.map($cut.pos, -1)), -1) : NodeSelection.create(tr2.doc, $cut.pos - before.nodeSize));
16057
16055
  dispatch(tr2.scrollIntoView());
16058
16056
  }
@@ -16061,7 +16059,7 @@ const joinBackward = (state, dispatch, view) => {
16061
16059
  }
16062
16060
  if (before.isAtom && $cut.depth == $cursor.depth - 1) {
16063
16061
  if (dispatch)
16064
- dispatch(state.tr.delete($cut.pos - before.nodeSize, $cut.pos).scrollIntoView());
16062
+ dispatch(state2.tr.delete($cut.pos - before.nodeSize, $cut.pos).scrollIntoView());
16065
16063
  return true;
16066
16064
  }
16067
16065
  return false;
@@ -16075,12 +16073,12 @@ function textblockAt(node, side, only = false) {
16075
16073
  }
16076
16074
  return false;
16077
16075
  }
16078
- const selectNodeBackward = (state, dispatch, view) => {
16079
- let { $head, empty: empty2 } = state.selection, $cut = $head;
16076
+ const selectNodeBackward = (state2, dispatch, view) => {
16077
+ let { $head, empty: empty2 } = state2.selection, $cut = $head;
16080
16078
  if (!empty2)
16081
16079
  return false;
16082
16080
  if ($head.parent.isTextblock) {
16083
- if (view ? !view.endOfTextblock("backward", state) : $head.parentOffset > 0)
16081
+ if (view ? !view.endOfTextblock("backward", state2) : $head.parentOffset > 0)
16084
16082
  return false;
16085
16083
  $cut = findCutBefore($head);
16086
16084
  }
@@ -16088,7 +16086,7 @@ const selectNodeBackward = (state, dispatch, view) => {
16088
16086
  if (!node || !NodeSelection.isSelectable(node))
16089
16087
  return false;
16090
16088
  if (dispatch)
16091
- dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut.pos - node.nodeSize)).scrollIntoView());
16089
+ dispatch(state2.tr.setSelection(NodeSelection.create(state2.doc, $cut.pos - node.nodeSize)).scrollIntoView());
16092
16090
  return true;
16093
16091
  };
16094
16092
  function findCutBefore($pos) {
@@ -16101,27 +16099,27 @@ function findCutBefore($pos) {
16101
16099
  }
16102
16100
  return null;
16103
16101
  }
16104
- function atBlockEnd(state, view) {
16105
- let { $cursor } = state.selection;
16106
- if (!$cursor || (view ? !view.endOfTextblock("forward", state) : $cursor.parentOffset < $cursor.parent.content.size))
16102
+ function atBlockEnd(state2, view) {
16103
+ let { $cursor } = state2.selection;
16104
+ if (!$cursor || (view ? !view.endOfTextblock("forward", state2) : $cursor.parentOffset < $cursor.parent.content.size))
16107
16105
  return null;
16108
16106
  return $cursor;
16109
16107
  }
16110
- const joinForward = (state, dispatch, view) => {
16111
- let $cursor = atBlockEnd(state, view);
16108
+ const joinForward = (state2, dispatch, view) => {
16109
+ let $cursor = atBlockEnd(state2, view);
16112
16110
  if (!$cursor)
16113
16111
  return false;
16114
16112
  let $cut = findCutAfter($cursor);
16115
16113
  if (!$cut)
16116
16114
  return false;
16117
16115
  let after = $cut.nodeAfter;
16118
- if (deleteBarrier(state, $cut, dispatch))
16116
+ if (deleteBarrier(state2, $cut, dispatch))
16119
16117
  return true;
16120
16118
  if ($cursor.parent.content.size == 0 && (textblockAt(after, "start") || NodeSelection.isSelectable(after))) {
16121
- let delStep = replaceStep(state.doc, $cursor.before(), $cursor.after(), Slice.empty);
16119
+ let delStep = replaceStep(state2.doc, $cursor.before(), $cursor.after(), Slice.empty);
16122
16120
  if (delStep && delStep.slice.size < delStep.to - delStep.from) {
16123
16121
  if (dispatch) {
16124
- let tr2 = state.tr.step(delStep);
16122
+ let tr2 = state2.tr.step(delStep);
16125
16123
  tr2.setSelection(textblockAt(after, "start") ? Selection$1.findFrom(tr2.doc.resolve(tr2.mapping.map($cut.pos)), 1) : NodeSelection.create(tr2.doc, tr2.mapping.map($cut.pos)));
16126
16124
  dispatch(tr2.scrollIntoView());
16127
16125
  }
@@ -16130,17 +16128,17 @@ const joinForward = (state, dispatch, view) => {
16130
16128
  }
16131
16129
  if (after.isAtom && $cut.depth == $cursor.depth - 1) {
16132
16130
  if (dispatch)
16133
- dispatch(state.tr.delete($cut.pos, $cut.pos + after.nodeSize).scrollIntoView());
16131
+ dispatch(state2.tr.delete($cut.pos, $cut.pos + after.nodeSize).scrollIntoView());
16134
16132
  return true;
16135
16133
  }
16136
16134
  return false;
16137
16135
  };
16138
- const selectNodeForward = (state, dispatch, view) => {
16139
- let { $head, empty: empty2 } = state.selection, $cut = $head;
16136
+ const selectNodeForward = (state2, dispatch, view) => {
16137
+ let { $head, empty: empty2 } = state2.selection, $cut = $head;
16140
16138
  if (!empty2)
16141
16139
  return false;
16142
16140
  if ($head.parent.isTextblock) {
16143
- if (view ? !view.endOfTextblock("forward", state) : $head.parentOffset < $head.parent.content.size)
16141
+ if (view ? !view.endOfTextblock("forward", state2) : $head.parentOffset < $head.parent.content.size)
16144
16142
  return false;
16145
16143
  $cut = findCutAfter($head);
16146
16144
  }
@@ -16148,7 +16146,7 @@ const selectNodeForward = (state, dispatch, view) => {
16148
16146
  if (!node || !NodeSelection.isSelectable(node))
16149
16147
  return false;
16150
16148
  if (dispatch)
16151
- dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut.pos)).scrollIntoView());
16149
+ dispatch(state2.tr.setSelection(NodeSelection.create(state2.doc, $cut.pos)).scrollIntoView());
16152
16150
  return true;
16153
16151
  };
16154
16152
  function findCutAfter($pos) {
@@ -16162,12 +16160,12 @@ function findCutAfter($pos) {
16162
16160
  }
16163
16161
  return null;
16164
16162
  }
16165
- const newlineInCode = (state, dispatch) => {
16166
- let { $head, $anchor } = state.selection;
16163
+ const newlineInCode = (state2, dispatch) => {
16164
+ let { $head, $anchor } = state2.selection;
16167
16165
  if (!$head.parent.type.spec.code || !$head.sameParent($anchor))
16168
16166
  return false;
16169
16167
  if (dispatch)
16170
- dispatch(state.tr.insertText("\n").scrollIntoView());
16168
+ dispatch(state2.tr.insertText("\n").scrollIntoView());
16171
16169
  return true;
16172
16170
  };
16173
16171
  function defaultBlockAt(match2) {
@@ -16178,22 +16176,22 @@ function defaultBlockAt(match2) {
16178
16176
  }
16179
16177
  return null;
16180
16178
  }
16181
- const exitCode = (state, dispatch) => {
16182
- let { $head, $anchor } = state.selection;
16179
+ const exitCode = (state2, dispatch) => {
16180
+ let { $head, $anchor } = state2.selection;
16183
16181
  if (!$head.parent.type.spec.code || !$head.sameParent($anchor))
16184
16182
  return false;
16185
16183
  let above = $head.node(-1), after = $head.indexAfter(-1), type3 = defaultBlockAt(above.contentMatchAt(after));
16186
16184
  if (!type3 || !above.canReplaceWith(after, after, type3))
16187
16185
  return false;
16188
16186
  if (dispatch) {
16189
- let pos = $head.after(), tr2 = state.tr.replaceWith(pos, pos, type3.createAndFill());
16187
+ let pos = $head.after(), tr2 = state2.tr.replaceWith(pos, pos, type3.createAndFill());
16190
16188
  tr2.setSelection(Selection$1.near(tr2.doc.resolve(pos), 1));
16191
16189
  dispatch(tr2.scrollIntoView());
16192
16190
  }
16193
16191
  return true;
16194
16192
  };
16195
- const createParagraphNear = (state, dispatch) => {
16196
- let sel = state.selection, { $from, $to } = sel;
16193
+ const createParagraphNear = (state2, dispatch) => {
16194
+ let sel = state2.selection, { $from, $to } = sel;
16197
16195
  if (sel instanceof AllSelection || $from.parent.inlineContent || $to.parent.inlineContent)
16198
16196
  return false;
16199
16197
  let type3 = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter()));
@@ -16201,21 +16199,21 @@ const createParagraphNear = (state, dispatch) => {
16201
16199
  return false;
16202
16200
  if (dispatch) {
16203
16201
  let side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos;
16204
- let tr2 = state.tr.insert(side, type3.createAndFill());
16202
+ let tr2 = state2.tr.insert(side, type3.createAndFill());
16205
16203
  tr2.setSelection(TextSelection.create(tr2.doc, side + 1));
16206
16204
  dispatch(tr2.scrollIntoView());
16207
16205
  }
16208
16206
  return true;
16209
16207
  };
16210
- const liftEmptyBlock = (state, dispatch) => {
16211
- let { $cursor } = state.selection;
16208
+ const liftEmptyBlock = (state2, dispatch) => {
16209
+ let { $cursor } = state2.selection;
16212
16210
  if (!$cursor || $cursor.parent.content.size)
16213
16211
  return false;
16214
16212
  if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) {
16215
16213
  let before = $cursor.before();
16216
- if (canSplit(state.doc, before)) {
16214
+ if (canSplit(state2.doc, before)) {
16217
16215
  if (dispatch)
16218
- dispatch(state.tr.split(before).scrollIntoView());
16216
+ dispatch(state2.tr.split(before).scrollIntoView());
16219
16217
  return true;
16220
16218
  }
16221
16219
  }
@@ -16223,25 +16221,25 @@ const liftEmptyBlock = (state, dispatch) => {
16223
16221
  if (target == null)
16224
16222
  return false;
16225
16223
  if (dispatch)
16226
- dispatch(state.tr.lift(range2, target).scrollIntoView());
16224
+ dispatch(state2.tr.lift(range2, target).scrollIntoView());
16227
16225
  return true;
16228
16226
  };
16229
16227
  function splitBlockAs(splitNode) {
16230
- return (state, dispatch) => {
16231
- let { $from, $to } = state.selection;
16232
- if (state.selection instanceof NodeSelection && state.selection.node.isBlock) {
16233
- if (!$from.parentOffset || !canSplit(state.doc, $from.pos))
16228
+ return (state2, dispatch) => {
16229
+ let { $from, $to } = state2.selection;
16230
+ if (state2.selection instanceof NodeSelection && state2.selection.node.isBlock) {
16231
+ if (!$from.parentOffset || !canSplit(state2.doc, $from.pos))
16234
16232
  return false;
16235
16233
  if (dispatch)
16236
- dispatch(state.tr.split($from.pos).scrollIntoView());
16234
+ dispatch(state2.tr.split($from.pos).scrollIntoView());
16237
16235
  return true;
16238
16236
  }
16239
16237
  if (!$from.parent.isBlock)
16240
16238
  return false;
16241
16239
  if (dispatch) {
16242
16240
  let atEnd = $to.parentOffset == $to.parent.content.size;
16243
- let tr2 = state.tr;
16244
- if (state.selection instanceof TextSelection || state.selection instanceof AllSelection)
16241
+ let tr2 = state2.tr;
16242
+ if (state2.selection instanceof TextSelection || state2.selection instanceof AllSelection)
16245
16243
  tr2.deleteSelection();
16246
16244
  let deflt = $from.depth == 0 ? null : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)));
16247
16245
  let splitType = splitNode && splitNode($to.parent, atEnd);
@@ -16266,31 +16264,31 @@ function splitBlockAs(splitNode) {
16266
16264
  };
16267
16265
  }
16268
16266
  const splitBlock = splitBlockAs();
16269
- const selectAll = (state, dispatch) => {
16267
+ const selectAll = (state2, dispatch) => {
16270
16268
  if (dispatch)
16271
- dispatch(state.tr.setSelection(new AllSelection(state.doc)));
16269
+ dispatch(state2.tr.setSelection(new AllSelection(state2.doc)));
16272
16270
  return true;
16273
16271
  };
16274
- function joinMaybeClear(state, $pos, dispatch) {
16272
+ function joinMaybeClear(state2, $pos, dispatch) {
16275
16273
  let before = $pos.nodeBefore, after = $pos.nodeAfter, index2 = $pos.index();
16276
16274
  if (!before || !after || !before.type.compatibleContent(after.type))
16277
16275
  return false;
16278
16276
  if (!before.content.size && $pos.parent.canReplace(index2 - 1, index2)) {
16279
16277
  if (dispatch)
16280
- dispatch(state.tr.delete($pos.pos - before.nodeSize, $pos.pos).scrollIntoView());
16278
+ dispatch(state2.tr.delete($pos.pos - before.nodeSize, $pos.pos).scrollIntoView());
16281
16279
  return true;
16282
16280
  }
16283
- if (!$pos.parent.canReplace(index2, index2 + 1) || !(after.isTextblock || canJoin(state.doc, $pos.pos)))
16281
+ if (!$pos.parent.canReplace(index2, index2 + 1) || !(after.isTextblock || canJoin(state2.doc, $pos.pos)))
16284
16282
  return false;
16285
16283
  if (dispatch)
16286
- dispatch(state.tr.clearIncompatible($pos.pos, before.type, before.contentMatchAt(before.childCount)).join($pos.pos).scrollIntoView());
16284
+ dispatch(state2.tr.clearIncompatible($pos.pos, before.type, before.contentMatchAt(before.childCount)).join($pos.pos).scrollIntoView());
16287
16285
  return true;
16288
16286
  }
16289
- function deleteBarrier(state, $cut, dispatch) {
16287
+ function deleteBarrier(state2, $cut, dispatch) {
16290
16288
  let before = $cut.nodeBefore, after = $cut.nodeAfter, conn, match2;
16291
16289
  if (before.type.spec.isolating || after.type.spec.isolating)
16292
16290
  return false;
16293
- if (joinMaybeClear(state, $cut, dispatch))
16291
+ if (joinMaybeClear(state2, $cut, dispatch))
16294
16292
  return true;
16295
16293
  let canDelAfter = $cut.parent.canReplace($cut.index(), $cut.index() + 1);
16296
16294
  if (canDelAfter && (conn = (match2 = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match2.matchType(conn[0] || after.type).validEnd) {
@@ -16299,7 +16297,7 @@ function deleteBarrier(state, $cut, dispatch) {
16299
16297
  for (let i2 = conn.length - 1; i2 >= 0; i2--)
16300
16298
  wrap2 = Fragment.from(conn[i2].create(null, wrap2));
16301
16299
  wrap2 = Fragment.from(before.copy(wrap2));
16302
- let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap2, 1, 0), conn.length, true));
16300
+ let tr2 = state2.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap2, 1, 0), conn.length, true));
16303
16301
  let joinAt = end + 2 * conn.length;
16304
16302
  if (canJoin(tr2.doc, joinAt))
16305
16303
  tr2.join(joinAt);
@@ -16311,7 +16309,7 @@ function deleteBarrier(state, $cut, dispatch) {
16311
16309
  let range2 = selAfter && selAfter.$from.blockRange(selAfter.$to), target = range2 && liftTarget(range2);
16312
16310
  if (target != null && target >= $cut.depth) {
16313
16311
  if (dispatch)
16314
- dispatch(state.tr.lift(range2, target).scrollIntoView());
16312
+ dispatch(state2.tr.lift(range2, target).scrollIntoView());
16315
16313
  return true;
16316
16314
  }
16317
16315
  if (canDelAfter && textblockAt(after, "start", true) && textblockAt(before, "end")) {
@@ -16330,7 +16328,7 @@ function deleteBarrier(state, $cut, dispatch) {
16330
16328
  let end = Fragment.empty;
16331
16329
  for (let i2 = wrap2.length - 1; i2 >= 0; i2--)
16332
16330
  end = Fragment.from(wrap2[i2].copy(end));
16333
- let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end, wrap2.length, 0), 0, true));
16331
+ let tr2 = state2.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice(end, wrap2.length, 0), 0, true));
16334
16332
  dispatch(tr2.scrollIntoView());
16335
16333
  }
16336
16334
  return true;
@@ -16339,8 +16337,8 @@ function deleteBarrier(state, $cut, dispatch) {
16339
16337
  return false;
16340
16338
  }
16341
16339
  function selectTextblockSide(side) {
16342
- return function(state, dispatch) {
16343
- let sel = state.selection, $pos = side < 0 ? sel.$from : sel.$to;
16340
+ return function(state2, dispatch) {
16341
+ let sel = state2.selection, $pos = side < 0 ? sel.$from : sel.$to;
16344
16342
  let depth = $pos.depth;
16345
16343
  while ($pos.node(depth).isInline) {
16346
16344
  if (!depth)
@@ -16350,16 +16348,16 @@ function selectTextblockSide(side) {
16350
16348
  if (!$pos.node(depth).isTextblock)
16351
16349
  return false;
16352
16350
  if (dispatch)
16353
- dispatch(state.tr.setSelection(TextSelection.create(state.doc, side < 0 ? $pos.start(depth) : $pos.end(depth))));
16351
+ dispatch(state2.tr.setSelection(TextSelection.create(state2.doc, side < 0 ? $pos.start(depth) : $pos.end(depth))));
16354
16352
  return true;
16355
16353
  };
16356
16354
  }
16357
16355
  const selectTextblockStart = selectTextblockSide(-1);
16358
16356
  const selectTextblockEnd = selectTextblockSide(1);
16359
16357
  function chainCommands(...commands) {
16360
- return function(state, dispatch, view) {
16358
+ return function(state2, dispatch, view) {
16361
16359
  for (let i2 = 0; i2 < commands.length; i2++)
16362
- if (commands[i2](state, dispatch, view))
16360
+ if (commands[i2](state2, dispatch, view))
16363
16361
  return true;
16364
16362
  return false;
16365
16363
  };
@@ -16586,7 +16584,7 @@ class Branch {
16586
16584
  }
16587
16585
  // Pop the latest event off the branch's history and apply it
16588
16586
  // to a document transform.
16589
- popEvent(state, preserveItems) {
16587
+ popEvent(state2, preserveItems) {
16590
16588
  if (this.eventCount == 0)
16591
16589
  return null;
16592
16590
  let end = this.items.length;
@@ -16602,7 +16600,7 @@ class Branch {
16602
16600
  remap = this.remapping(end, this.items.length);
16603
16601
  mapFrom = remap.maps.length;
16604
16602
  }
16605
- let transform = state.tr;
16603
+ let transform = state2.tr;
16606
16604
  let selection, remaining;
16607
16605
  let addAfter = [], addBefore = [];
16608
16606
  this.items.forEach((item, i2) => {
@@ -16799,7 +16797,7 @@ class HistoryState {
16799
16797
  }
16800
16798
  }
16801
16799
  const DEPTH_OVERFLOW = 20;
16802
- function applyTransaction(history2, state, tr2, options) {
16800
+ function applyTransaction(history2, state2, tr2, options) {
16803
16801
  let historyTr = tr2.getMeta(historyKey), rebased;
16804
16802
  if (historyTr)
16805
16803
  return historyTr.historyState;
@@ -16810,14 +16808,14 @@ function applyTransaction(history2, state, tr2, options) {
16810
16808
  return history2;
16811
16809
  } else if (appended && appended.getMeta(historyKey)) {
16812
16810
  if (appended.getMeta(historyKey).redo)
16813
- return new HistoryState(history2.done.addTransform(tr2, void 0, options, mustPreserveItems(state)), history2.undone, rangesFor(tr2.mapping.maps[tr2.steps.length - 1]), history2.prevTime, history2.prevComposition);
16811
+ return new HistoryState(history2.done.addTransform(tr2, void 0, options, mustPreserveItems(state2)), history2.undone, rangesFor(tr2.mapping.maps[tr2.steps.length - 1]), history2.prevTime, history2.prevComposition);
16814
16812
  else
16815
- return new HistoryState(history2.done, history2.undone.addTransform(tr2, void 0, options, mustPreserveItems(state)), null, history2.prevTime, history2.prevComposition);
16813
+ return new HistoryState(history2.done, history2.undone.addTransform(tr2, void 0, options, mustPreserveItems(state2)), null, history2.prevTime, history2.prevComposition);
16816
16814
  } else if (tr2.getMeta("addToHistory") !== false && !(appended && appended.getMeta("addToHistory") === false)) {
16817
16815
  let composition = tr2.getMeta("composition");
16818
16816
  let newGroup = history2.prevTime == 0 || !appended && history2.prevComposition != composition && (history2.prevTime < (tr2.time || 0) - options.newGroupDelay || !isAdjacentTo(tr2, history2.prevRanges));
16819
16817
  let prevRanges = appended ? mapRanges(history2.prevRanges, tr2.mapping) : rangesFor(tr2.mapping.maps[tr2.steps.length - 1]);
16820
- return new HistoryState(history2.done.addTransform(tr2, newGroup ? state.selection.getBookmark() : void 0, options, mustPreserveItems(state)), Branch.empty, prevRanges, tr2.time, composition == null ? history2.prevComposition : composition);
16818
+ return new HistoryState(history2.done.addTransform(tr2, newGroup ? state2.selection.getBookmark() : void 0, options, mustPreserveItems(state2)), Branch.empty, prevRanges, tr2.time, composition == null ? history2.prevComposition : composition);
16821
16819
  } else if (rebased = tr2.getMeta("rebased")) {
16822
16820
  return new HistoryState(history2.done.rebased(tr2, rebased), history2.undone.rebased(tr2, rebased), mapRanges(history2.prevRanges, tr2.mapping), history2.prevTime, history2.prevComposition);
16823
16821
  } else {
@@ -16853,20 +16851,20 @@ function mapRanges(ranges, mapping) {
16853
16851
  }
16854
16852
  return result;
16855
16853
  }
16856
- function histTransaction(history2, state, dispatch, redo2) {
16857
- let preserveItems = mustPreserveItems(state);
16858
- let histOptions = historyKey.get(state).spec.config;
16859
- let pop = (redo2 ? history2.undone : history2.done).popEvent(state, preserveItems);
16854
+ function histTransaction(history2, state2, dispatch, redo2) {
16855
+ let preserveItems = mustPreserveItems(state2);
16856
+ let histOptions = historyKey.get(state2).spec.config;
16857
+ let pop = (redo2 ? history2.undone : history2.done).popEvent(state2, preserveItems);
16860
16858
  if (!pop)
16861
16859
  return;
16862
16860
  let selection = pop.selection.resolve(pop.transform.doc);
16863
- let added = (redo2 ? history2.done : history2.undone).addTransform(pop.transform, state.selection.getBookmark(), histOptions, preserveItems);
16861
+ let added = (redo2 ? history2.done : history2.undone).addTransform(pop.transform, state2.selection.getBookmark(), histOptions, preserveItems);
16864
16862
  let newHist = new HistoryState(redo2 ? added : pop.remaining, redo2 ? pop.remaining : added, null, 0, -1);
16865
16863
  dispatch(pop.transform.setSelection(selection).setMeta(historyKey, { redo: redo2, historyState: newHist }).scrollIntoView());
16866
16864
  }
16867
16865
  let cachedPreserveItems = false, cachedPreserveItemsPlugins = null;
16868
- function mustPreserveItems(state) {
16869
- let plugins2 = state.plugins;
16866
+ function mustPreserveItems(state2) {
16867
+ let plugins2 = state2.plugins;
16870
16868
  if (cachedPreserveItemsPlugins != plugins2) {
16871
16869
  cachedPreserveItems = false;
16872
16870
  cachedPreserveItemsPlugins = plugins2;
@@ -16891,8 +16889,8 @@ function history(config = {}) {
16891
16889
  init() {
16892
16890
  return new HistoryState(Branch.empty, Branch.empty, null, 0, -1);
16893
16891
  },
16894
- apply(tr2, hist, state) {
16895
- return applyTransaction(hist, state, tr2, config);
16892
+ apply(tr2, hist, state2) {
16893
+ return applyTransaction(hist, state2, tr2, config);
16896
16894
  }
16897
16895
  },
16898
16896
  config,
@@ -16910,20 +16908,20 @@ function history(config = {}) {
16910
16908
  }
16911
16909
  });
16912
16910
  }
16913
- const undo = (state, dispatch) => {
16914
- let hist = historyKey.getState(state);
16911
+ const undo = (state2, dispatch) => {
16912
+ let hist = historyKey.getState(state2);
16915
16913
  if (!hist || hist.done.eventCount == 0)
16916
16914
  return false;
16917
16915
  if (dispatch)
16918
- histTransaction(hist, state, dispatch, false);
16916
+ histTransaction(hist, state2, dispatch, false);
16919
16917
  return true;
16920
16918
  };
16921
- const redo = (state, dispatch) => {
16922
- let hist = historyKey.getState(state);
16919
+ const redo = (state2, dispatch) => {
16920
+ let hist = historyKey.getState(state2);
16923
16921
  if (!hist || hist.undone.eventCount == 0)
16924
16922
  return false;
16925
16923
  if (dispatch)
16926
- histTransaction(hist, state, dispatch, true);
16924
+ histTransaction(hist, state2, dispatch, true);
16927
16925
  return true;
16928
16926
  };
16929
16927
  const pDOM = ["p", 0], blockquoteDOM = ["blockquote", 0], hrDOM = ["hr"], preDOM = ["pre", ["code", 0]], brDOM = ["br"];
@@ -17116,8 +17114,8 @@ const marks = {
17116
17114
  }
17117
17115
  };
17118
17116
  const schema = new Schema({ nodes, marks });
17119
- const _hoisted_1$I = ["id"];
17120
- const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
17117
+ const _hoisted_1$F = ["id"];
17118
+ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
17121
17119
  __name: "RTXEditor",
17122
17120
  props: {
17123
17121
  elementId: { default: Math.random().toString(36).substr(2, 9) },
@@ -17138,7 +17136,7 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
17138
17136
  } catch (err) {
17139
17137
  content = { type: "doc", content: [] };
17140
17138
  }
17141
- const state = EditorState.create({
17139
+ const state2 = EditorState.create({
17142
17140
  doc: DOMParser.fromSchema(schema).schema.nodeFromJSON(content),
17143
17141
  plugins: [
17144
17142
  history(),
@@ -17146,7 +17144,7 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
17146
17144
  keymap(baseKeymap)
17147
17145
  ]
17148
17146
  });
17149
- return state;
17147
+ return state2;
17150
17148
  };
17151
17149
  function handleChange(newState) {
17152
17150
  const dom = document.createElement("div");
@@ -17155,10 +17153,10 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
17155
17153
  html.value = (dom == null ? void 0 : dom.innerHTML) || "";
17156
17154
  emit2("update:modelValue", html.value);
17157
17155
  }
17158
- const createEditorView = (state) => {
17156
+ const createEditorView = (state2) => {
17159
17157
  const editorDiv = document.getElementById(`canvas-${props2.elementId}`);
17160
17158
  view = new EditorView(editorDiv, {
17161
- state,
17159
+ state: state2,
17162
17160
  // editable: () => props.editable,
17163
17161
  dispatchTransaction(transaction) {
17164
17162
  const newState = view.state.apply(transaction);
@@ -17171,8 +17169,8 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
17171
17169
  });
17172
17170
  };
17173
17171
  function loadContent() {
17174
- const state = createEditorStateFromHTML(props2.modelValue);
17175
- createEditorView(state);
17172
+ const state2 = createEditorStateFromHTML(props2.modelValue);
17173
+ createEditorView(state2);
17176
17174
  }
17177
17175
  vue.watch(
17178
17176
  () => props2.modelValue,
@@ -17194,14 +17192,15 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
17194
17192
  onClick: focusEditor,
17195
17193
  id: `canvas-${_ctx.elementId}`,
17196
17194
  onKeydown: _cache[0] || (_cache[0] = vue.withKeys(vue.withModifiers(($event) => _ctx.$emit("keydown.meta.enter"), ["meta"]), ["enter"]))
17197
- }, null, 40, _hoisted_1$I);
17195
+ }, null, 40, _hoisted_1$F);
17198
17196
  };
17199
17197
  }
17200
17198
  });
17201
- const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
17199
+ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
17202
17200
  __name: "MaterialIcon",
17203
17201
  props: {
17204
17202
  icon: {},
17203
+ name: {},
17205
17204
  size: {},
17206
17205
  color: {}
17207
17206
  },
@@ -17210,17 +17209,17 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
17210
17209
  return vue.openBlock(), vue.createElementBlock("div", {
17211
17210
  class: "bgl_icon-font",
17212
17211
  style: vue.normalizeStyle({ fontSize: `${_ctx.size}rem`, color: _ctx.color })
17213
- }, vue.toDisplayString(_ctx.icon), 5);
17212
+ }, vue.toDisplayString(_ctx.icon || _ctx.name), 5);
17214
17213
  };
17215
17214
  }
17216
17215
  });
17217
- const _hoisted_1$H = { class: "full-nav" };
17218
- const _hoisted_2$y = { class: "nav-scroll" };
17219
- const _hoisted_3$o = { class: "nav-links-wrapper" };
17220
- const _hoisted_4$g = { class: "tooltip" };
17221
- const _hoisted_5$d = { class: "bot-buttons-wrapper" };
17222
- const _hoisted_6$9 = { class: "tooltip" };
17223
- const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
17216
+ const _hoisted_1$E = { class: "full-nav" };
17217
+ const _hoisted_2$x = { class: "nav-scroll" };
17218
+ const _hoisted_3$n = { class: "nav-links-wrapper" };
17219
+ const _hoisted_4$f = { class: "tooltip" };
17220
+ const _hoisted_5$c = { class: "bot-buttons-wrapper" };
17221
+ const _hoisted_6$8 = { class: "tooltip" };
17222
+ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
17224
17223
  __name: "NavBar",
17225
17224
  props: {
17226
17225
  footerLinks: { default: () => [] },
@@ -17244,14 +17243,14 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
17244
17243
  "aria-label": "Toggle Navigation",
17245
17244
  tabindex: "0"
17246
17245
  }, [
17247
- vue.createVNode(vue.unref(_sfc_main$F), {
17246
+ vue.createVNode(vue.unref(_sfc_main$H), {
17248
17247
  icon: "chevron_right",
17249
17248
  class: "top-arrow"
17250
17249
  })
17251
17250
  ], 32),
17252
- vue.createElementVNode("div", _hoisted_1$H, [
17253
- vue.createElementVNode("div", _hoisted_2$y, [
17254
- vue.createElementVNode("div", _hoisted_3$o, [
17251
+ vue.createElementVNode("div", _hoisted_1$E, [
17252
+ vue.createElementVNode("div", _hoisted_2$x, [
17253
+ vue.createElementVNode("div", _hoisted_3$n, [
17255
17254
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.links, (link) => {
17256
17255
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(link.to ? "router-link" : "div"), {
17257
17256
  class: "nav-button",
@@ -17263,17 +17262,17 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
17263
17262
  }
17264
17263
  }, {
17265
17264
  default: vue.withCtx(() => [
17266
- vue.createVNode(vue.unref(_sfc_main$F), {
17265
+ vue.createVNode(vue.unref(_sfc_main$H), {
17267
17266
  icon: link.icon
17268
17267
  }, null, 8, ["icon"]),
17269
- vue.createElementVNode("div", _hoisted_4$g, vue.toDisplayString(link.label), 1)
17268
+ vue.createElementVNode("div", _hoisted_4$f, vue.toDisplayString(link.label), 1)
17270
17269
  ]),
17271
17270
  _: 2
17272
17271
  }, 1032, ["to", "onClick"]);
17273
17272
  }), 128))
17274
17273
  ])
17275
17274
  ]),
17276
- vue.createElementVNode("div", _hoisted_5$d, [
17275
+ vue.createElementVNode("div", _hoisted_5$c, [
17277
17276
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.footerLinks, (link) => {
17278
17277
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(link.to ? "router-link" : "div"), {
17279
17278
  class: "nav-button",
@@ -17285,10 +17284,10 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
17285
17284
  key: link.label
17286
17285
  }, {
17287
17286
  default: vue.withCtx(() => [
17288
- vue.createVNode(vue.unref(_sfc_main$F), {
17287
+ vue.createVNode(vue.unref(_sfc_main$H), {
17289
17288
  icon: link.icon
17290
17289
  }, null, 8, ["icon"]),
17291
- vue.createElementVNode("div", _hoisted_6$9, vue.toDisplayString(link.label), 1)
17290
+ vue.createElementVNode("div", _hoisted_6$8, vue.toDisplayString(link.label), 1)
17292
17291
  ]),
17293
17292
  _: 2
17294
17293
  }, 1032, ["to", "onClick"]);
@@ -17307,16 +17306,16 @@ const _export_sfc = (sfc, props2) => {
17307
17306
  }
17308
17307
  return target;
17309
17308
  };
17310
- const NavBar = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-727b754a"]]);
17311
- const _hoisted_1$G = {
17309
+ const NavBar = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-727b754a"]]);
17310
+ const _hoisted_1$D = {
17312
17311
  key: 0,
17313
17312
  class: "loading"
17314
17313
  };
17315
- const _hoisted_2$x = {
17314
+ const _hoisted_2$w = {
17316
17315
  key: 1,
17317
17316
  class: "bgl_btn-flex"
17318
17317
  };
17319
- const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
17318
+ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
17320
17319
  __name: "Btn",
17321
17320
  props: {
17322
17321
  disabled: { type: Boolean, default: false },
@@ -17402,8 +17401,8 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
17402
17401
  })
17403
17402
  }, {
17404
17403
  default: vue.withCtx(() => [
17405
- _ctx.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$G)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$x, [
17406
- _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$F), {
17404
+ _ctx.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$D)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$w, [
17405
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$H), {
17407
17406
  key: 0,
17408
17407
  icon: _ctx.icon
17409
17408
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
@@ -17411,7 +17410,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
17411
17410
  !vue.unref(slots)["default"] && _ctx.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
17412
17411
  vue.createTextVNode(vue.toDisplayString(_ctx.value), 1)
17413
17412
  ], 64)) : vue.createCommentVNode("", true),
17414
- props2["icon.end"] ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$F), {
17413
+ props2["icon.end"] ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$H), {
17415
17414
  key: 2,
17416
17415
  icon: props2["icon.end"]
17417
17416
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true)
@@ -17422,10 +17421,10 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
17422
17421
  };
17423
17422
  }
17424
17423
  });
17425
- const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-0c8d9a95"]]);
17426
- const _hoisted_1$F = { class: "tool-bar" };
17427
- const _hoisted_2$w = { class: "modal-footer mt-3" };
17428
- const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
17424
+ const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-0c8d9a95"]]);
17425
+ const _hoisted_1$C = { class: "tool-bar" };
17426
+ const _hoisted_2$v = { class: "modal-footer mt-3" };
17427
+ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
17429
17428
  __name: "Modal",
17430
17429
  props: {
17431
17430
  side: { type: Boolean },
@@ -17466,13 +17465,13 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
17466
17465
  onClick: _cache[1] || (_cache[1] = () => _ctx.dismissable ? closeModal() : ""),
17467
17466
  onKeydown: vue.withKeys(closeModal, ["esc"])
17468
17467
  }, [
17469
- vue.createVNode(vue.unref(_sfc_main$q), {
17468
+ vue.createVNode(vue.unref(_sfc_main$t), {
17470
17469
  class: "modal",
17471
17470
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => {
17472
17471
  }, ["stop"]))
17473
17472
  }, {
17474
17473
  default: vue.withCtx(() => [
17475
- vue.createElementVNode("header", _hoisted_1$F, [
17474
+ vue.createElementVNode("header", _hoisted_1$C, [
17476
17475
  vue.renderSlot(_ctx.$slots, "toolbar"),
17477
17476
  vue.createVNode(vue.unref(Btn), {
17478
17477
  style: vue.normalizeStyle({ float: _ctx.side ? "left" : "right" }),
@@ -17480,7 +17479,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
17480
17479
  icon: "close",
17481
17480
  onClick: closeModal
17482
17481
  }, null, 8, ["style"]),
17483
- _ctx.title ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$o), {
17482
+ _ctx.title ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$r), {
17484
17483
  key: 0,
17485
17484
  class: "modal-title",
17486
17485
  tag: "h3",
@@ -17488,7 +17487,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
17488
17487
  }, null, 8, ["label"])) : vue.createCommentVNode("", true)
17489
17488
  ]),
17490
17489
  vue.renderSlot(_ctx.$slots, "default"),
17491
- vue.createElementVNode("footer", _hoisted_2$w, [
17490
+ vue.createElementVNode("footer", _hoisted_2$v, [
17492
17491
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.actions, (action, i2) => {
17493
17492
  return vue.openBlock(), vue.createBlock(vue.unref(Btn), vue.mergeProps({
17494
17493
  key: i2,
@@ -17505,7 +17504,7 @@ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
17505
17504
  };
17506
17505
  }
17507
17506
  });
17508
- const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
17507
+ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
17509
17508
  __name: "ModalForm",
17510
17509
  props: /* @__PURE__ */ vue.mergeModels({
17511
17510
  side: { type: Boolean },
@@ -17562,7 +17561,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
17562
17561
  }
17563
17562
  __expose({ setFormValues });
17564
17563
  return (_ctx, _cache) => {
17565
- return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$C), {
17564
+ return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$E), {
17566
17565
  "onOnUpdate:isModalVisible": props2["onUpdate:isModalVisible"],
17567
17566
  side: _ctx.side,
17568
17567
  ref_key: "modal",
@@ -17571,7 +17570,7 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
17571
17570
  title: _ctx.title
17572
17571
  }, vue.createSlots({
17573
17572
  default: vue.withCtx(() => [
17574
- vue.createVNode(vue.unref(_sfc_main$h), {
17573
+ vue.createVNode(vue.unref(_sfc_main$l), {
17575
17574
  onSubmit: runSubmit,
17576
17575
  ref_key: "form",
17577
17576
  ref: form,
@@ -17613,12 +17612,12 @@ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
17613
17612
  };
17614
17613
  }
17615
17614
  });
17616
- const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-7e6899c7"]]);
17617
- const _hoisted_1$E = { class: "accordion-item" };
17618
- const _hoisted_2$v = ["aria-expanded", "aria-controls"];
17619
- const _hoisted_3$n = { class: "accordion-label" };
17620
- const _hoisted_4$f = ["id", "aria-hidden"];
17621
- const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
17615
+ const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-7e6899c7"]]);
17616
+ const _hoisted_1$B = { class: "accordion-item" };
17617
+ const _hoisted_2$u = ["aria-expanded", "aria-controls"];
17618
+ const _hoisted_3$m = { class: "accordion-label" };
17619
+ const _hoisted_4$e = ["id", "aria-hidden"];
17620
+ const _sfc_main$C = /* @__PURE__ */ vue.defineComponent({
17622
17621
  __name: "AccordionItem",
17623
17622
  props: {
17624
17623
  label: {},
@@ -17642,20 +17641,20 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
17642
17641
  accordionState.openItem = null;
17643
17642
  }
17644
17643
  return (_ctx, _cache) => {
17645
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$E, [
17644
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$B, [
17646
17645
  vue.createElementVNode("button", {
17647
17646
  onClick: _cache[0] || (_cache[0] = ($event) => toggle()),
17648
17647
  "aria-expanded": vue.unref(open) ? "true" : "false",
17649
17648
  class: "accordion-head",
17650
17649
  "aria-controls": `accordion-body-${vue.unref(id)}`
17651
17650
  }, [
17652
- vue.createElementVNode("span", _hoisted_3$n, vue.toDisplayString(_ctx.label), 1),
17651
+ vue.createElementVNode("span", _hoisted_3$m, vue.toDisplayString(_ctx.label), 1),
17653
17652
  vue.createElementVNode("div", {
17654
17653
  class: vue.normalizeClass(["accordion-icon", { open: vue.unref(open) }])
17655
17654
  }, [
17656
- vue.createVNode(vue.unref(_sfc_main$F), { icon: "expand_more" })
17655
+ vue.createVNode(vue.unref(_sfc_main$H), { icon: "expand_more" })
17657
17656
  ], 2)
17658
- ], 8, _hoisted_2$v),
17657
+ ], 8, _hoisted_2$u),
17659
17658
  vue.createVNode(vue.Transition, { name: "expand" }, {
17660
17659
  default: vue.withCtx(() => [
17661
17660
  vue.unref(open) ? (vue.openBlock(), vue.createElementBlock("div", {
@@ -17665,7 +17664,7 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
17665
17664
  "aria-hidden": vue.unref(open) ? "false" : "true"
17666
17665
  }, [
17667
17666
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
17668
- ], 8, _hoisted_4$f)) : vue.createCommentVNode("", true)
17667
+ ], 8, _hoisted_4$e)) : vue.createCommentVNode("", true)
17669
17668
  ]),
17670
17669
  _: 3
17671
17670
  })
@@ -17673,28 +17672,28 @@ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
17673
17672
  };
17674
17673
  }
17675
17674
  });
17676
- const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-bf74738b"]]);
17677
- const _hoisted_1$D = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
17678
- const _hoisted_2$u = { class: "p-1" };
17679
- const _hoisted_3$m = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
17680
- const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
17675
+ const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-bf74738b"]]);
17676
+ const _hoisted_1$A = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
17677
+ const _hoisted_2$t = { class: "p-1" };
17678
+ const _hoisted_3$l = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
17679
+ const _sfc_main$B = /* @__PURE__ */ vue.defineComponent({
17681
17680
  __name: "ListView",
17682
17681
  setup(__props) {
17683
17682
  return (_ctx, _cache) => {
17684
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$D, [
17685
- vue.createElementVNode("div", _hoisted_2$u, [
17683
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$A, [
17684
+ vue.createElementVNode("div", _hoisted_2$t, [
17686
17685
  vue.renderSlot(_ctx.$slots, "header")
17687
17686
  ]),
17688
- vue.createElementVNode("div", _hoisted_3$m, [
17687
+ vue.createElementVNode("div", _hoisted_3$l, [
17689
17688
  vue.renderSlot(_ctx.$slots, "default")
17690
17689
  ])
17691
17690
  ]);
17692
17691
  };
17693
17692
  }
17694
17693
  });
17695
- const _hoisted_1$C = { class: "txt16 no-margin ellipsis" };
17696
- const _hoisted_2$t = { class: "txt14 no-margin txt-gray ellipsis" };
17697
- const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
17694
+ const _hoisted_1$z = { class: "txt16 no-margin ellipsis" };
17695
+ const _hoisted_2$s = { class: "txt14 no-margin txt-gray ellipsis" };
17696
+ const _sfc_main$A = /* @__PURE__ */ vue.defineComponent({
17698
17697
  __name: "ListItem",
17699
17698
  props: {
17700
17699
  src: {},
@@ -17718,11 +17717,11 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
17718
17717
  size: 40
17719
17718
  }, null, 8, ["name", "src"])) : vue.createCommentVNode("", true),
17720
17719
  vue.createElementVNode("div", null, [
17721
- vue.createElementVNode("p", _hoisted_1$C, [
17720
+ vue.createElementVNode("p", _hoisted_1$z, [
17722
17721
  vue.createTextVNode(vue.toDisplayString(_ctx.title) + " ", 1),
17723
17722
  vue.renderSlot(_ctx.$slots, "default")
17724
17723
  ]),
17725
- vue.createElementVNode("p", _hoisted_2$t, [
17724
+ vue.createElementVNode("p", _hoisted_2$s, [
17726
17725
  vue.createTextVNode(vue.toDisplayString(_ctx.subtitle) + " ", 1),
17727
17726
  vue.renderSlot(_ctx.$slots, "subtitle")
17728
17727
  ])
@@ -17733,81 +17732,15 @@ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
17733
17732
  };
17734
17733
  }
17735
17734
  });
17736
- const _hoisted_1$B = { class: "bgl_card tabs-top" };
17737
- const _hoisted_2$s = { class: "tabs grid auto-flow-columns fit-content" };
17738
- const _hoisted_3$l = ["onClick"];
17739
- const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
17740
- __name: "TabbedLayout",
17741
- props: {
17742
- title: {},
17743
- tabs: {},
17744
- modelValue: {},
17745
- router: {},
17746
- sideTabs: { type: Boolean }
17747
- },
17748
- emits: ["update:modelValue"],
17749
- setup(__props, { emit: __emit }) {
17750
- const emit2 = __emit;
17751
- let activeTab = vue.ref();
17752
- const props2 = __props;
17753
- function changeTab(tab) {
17754
- var _a2;
17755
- activeTab.value = tab;
17756
- emit2("update:modelValue", activeTab.value);
17757
- if (!props2.router)
17758
- return;
17759
- void ((_a2 = props2.router) == null ? void 0 : _a2.push({
17760
- path: props2.router.currentRoute.value.path,
17761
- query: { ...props2.router.currentRoute.value.query, t: tab },
17762
- hash: props2.router.currentRoute.value.hash
17763
- }));
17764
- }
17765
- vue.onMounted(() => {
17766
- var _a2;
17767
- const firstTab = props2.modelValue || ((_a2 = props2.router) == null ? void 0 : _a2.currentRoute.value.query.t) || props2.tabs[0];
17768
- activeTab.value = firstTab;
17769
- });
17770
- return (_ctx, _cache) => {
17771
- return vue.openBlock(), vue.createElementBlock("div", {
17772
- class: vue.normalizeClass(["h-100 grid list-view gap-1", { "side-tabs": _ctx.sideTabs }])
17773
- }, [
17774
- vue.createElementVNode("div", _hoisted_1$B, [
17775
- vue.renderSlot(_ctx.$slots, "top-section", {}, void 0, true),
17776
- vue.createElementVNode("div", _hoisted_2$s, [
17777
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tabs, (tab) => {
17778
- var _a2;
17779
- return vue.openBlock(), vue.createElementBlock("div", {
17780
- class: vue.normalizeClass([{
17781
- active: tab === vue.unref(activeTab) || tab === ((_a2 = _ctx.router) == null ? void 0 : _a2.currentRoute.value.path.split("/").slice(-1)[0])
17782
- }, "tab"]),
17783
- key: tab,
17784
- onClick: ($event) => changeTab(tab)
17785
- }, vue.toDisplayString(tab), 11, _hoisted_3$l);
17786
- }), 128))
17787
- ])
17788
- ]),
17789
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tabs.filter((item) => item === vue.unref(activeTab)), (tab) => {
17790
- return vue.openBlock(), vue.createElementBlock("div", {
17791
- class: "list-content",
17792
- key: tab
17793
- }, [
17794
- vue.renderSlot(_ctx.$slots, tab, { key: tab }, void 0, true)
17795
- ]);
17796
- }), 128))
17797
- ], 2);
17798
- };
17799
- }
17800
- });
17801
- const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-37337215"]]);
17802
- const _hoisted_1$A = { class: "comments-wrap" };
17735
+ const _hoisted_1$y = { class: "comments-wrap" };
17803
17736
  const _hoisted_2$r = { class: "comment-list" };
17804
17737
  const _hoisted_3$k = { class: "comment-top" };
17805
- const _hoisted_4$e = { class: "comment-owner" };
17806
- const _hoisted_5$c = { class: "comment-time" };
17807
- const _hoisted_6$8 = { class: "comment-actions" };
17808
- const _hoisted_7$4 = ["innerHTML"];
17809
- const _hoisted_8$2 = { class: "new-comment" };
17810
- const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
17738
+ const _hoisted_4$d = { class: "comment-owner" };
17739
+ const _hoisted_5$b = { class: "comment-time" };
17740
+ const _hoisted_6$7 = { class: "comment-actions" };
17741
+ const _hoisted_7$3 = ["innerHTML"];
17742
+ const _hoisted_8$1 = { class: "new-comment" };
17743
+ const _sfc_main$z = /* @__PURE__ */ vue.defineComponent({
17811
17744
  __name: "Comments",
17812
17745
  props: {
17813
17746
  ref_table: {},
@@ -17850,7 +17783,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
17850
17783
  void fetchData();
17851
17784
  };
17852
17785
  return (_ctx, _cache) => {
17853
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$A, [
17786
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$y, [
17854
17787
  vue.createElementVNode("div", _hoisted_2$r, [
17855
17788
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(comments), (comment) => {
17856
17789
  var _a2, _b, _c;
@@ -17862,22 +17795,22 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
17862
17795
  key: comment.id
17863
17796
  }, [
17864
17797
  vue.createElementVNode("div", _hoisted_3$k, [
17865
- vue.createElementVNode("div", _hoisted_4$e, vue.toDisplayString(comment.sender.first_name) + " " + vue.toDisplayString(comment.sender.last_name), 1),
17866
- vue.createElementVNode("div", _hoisted_5$c, vue.toDisplayString(comment.updated_at.split("T")[0]), 1),
17867
- vue.createElementVNode("div", _hoisted_6$8, [
17868
- vue.createVNode(vue.unref(_sfc_main$F), {
17798
+ vue.createElementVNode("div", _hoisted_4$d, vue.toDisplayString(comment.sender.first_name) + " " + vue.toDisplayString(comment.sender.last_name), 1),
17799
+ vue.createElementVNode("div", _hoisted_5$b, vue.toDisplayString(comment.updated_at.split("T")[0]), 1),
17800
+ vue.createElementVNode("div", _hoisted_6$7, [
17801
+ vue.createVNode(vue.unref(_sfc_main$H), {
17869
17802
  size: 1,
17870
17803
  class: "edit",
17871
17804
  icon: "edit",
17872
17805
  onClick: ($event) => vue.isRef(editComment) ? editComment.value = comment : editComment = comment
17873
17806
  }, null, 8, ["onClick"]),
17874
- vue.createVNode(vue.unref(_sfc_main$F), {
17807
+ vue.createVNode(vue.unref(_sfc_main$H), {
17875
17808
  size: 1.2,
17876
17809
  class: "delete",
17877
17810
  icon: "delete",
17878
17811
  onClick: ($event) => deleteComment(comment.id)
17879
17812
  }, null, 8, ["onClick"]),
17880
- vue.createVNode(vue.unref(_sfc_main$F), {
17813
+ vue.createVNode(vue.unref(_sfc_main$H), {
17881
17814
  size: 1.2,
17882
17815
  class: "save",
17883
17816
  icon: "save",
@@ -17885,7 +17818,7 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
17885
17818
  })
17886
17819
  ])
17887
17820
  ]),
17888
- vue.unref(editComment) !== null && ((_c = vue.unref(editComment)) == null ? void 0 : _c.id) === comment.id ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$G), {
17821
+ vue.unref(editComment) !== null && ((_c = vue.unref(editComment)) == null ? void 0 : _c.id) === comment.id ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$I), {
17889
17822
  key: 0,
17890
17823
  modelValue: vue.unref(editComment).body_html,
17891
17824
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.unref(editComment).body_html = $event),
@@ -17894,12 +17827,12 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
17894
17827
  key: 1,
17895
17828
  class: "editor-wrapper",
17896
17829
  innerHTML: comment.body_html
17897
- }, null, 8, _hoisted_7$4))
17830
+ }, null, 8, _hoisted_7$3))
17898
17831
  ], 2);
17899
17832
  }), 128))
17900
17833
  ]),
17901
- vue.createElementVNode("div", _hoisted_8$2, [
17902
- vue.createVNode(vue.unref(_sfc_main$G), {
17834
+ vue.createElementVNode("div", _hoisted_8$1, [
17835
+ vue.createVNode(vue.unref(_sfc_main$I), {
17903
17836
  class: "comment-input",
17904
17837
  modelValue: vue.unref(bodyHtml),
17905
17838
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(bodyHtml) ? bodyHtml.value = $event : bodyHtml = $event),
@@ -17919,10 +17852,10 @@ const _sfc_main$w = /* @__PURE__ */ vue.defineComponent({
17919
17852
  };
17920
17853
  }
17921
17854
  });
17922
- const Comments = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-c4b41dc0"]]);
17923
- const _hoisted_1$z = { class: "page-top" };
17855
+ const Comments = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-c4b41dc0"]]);
17856
+ const _hoisted_1$x = { class: "page-top" };
17924
17857
  const _hoisted_2$q = { class: "top-title" };
17925
- const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
17858
+ const _sfc_main$y = /* @__PURE__ */ vue.defineComponent({
17926
17859
  __name: "PageTitle",
17927
17860
  props: {
17928
17861
  value: {
@@ -17932,7 +17865,7 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
17932
17865
  },
17933
17866
  setup(__props) {
17934
17867
  return (_ctx, _cache) => {
17935
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$z, [
17868
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$x, [
17936
17869
  vue.createElementVNode("h1", _hoisted_2$q, [
17937
17870
  vue.renderSlot(_ctx.$slots, "default"),
17938
17871
  vue.createTextVNode(" " + vue.toDisplayString(__props.value), 1)
@@ -17941,14 +17874,14 @@ const _sfc_main$v = /* @__PURE__ */ vue.defineComponent({
17941
17874
  };
17942
17875
  }
17943
17876
  });
17944
- const _hoisted_1$y = { class: "table-list-wrap h-100" };
17877
+ const _hoisted_1$w = { class: "table-list-wrap h-100" };
17945
17878
  const _hoisted_2$p = { class: "infinite-wrapper" };
17946
17879
  const _hoisted_3$j = { class: "row first-row" };
17947
- const _hoisted_4$d = ["onClick"];
17948
- const _hoisted_5$b = { class: "flex" };
17949
- const _hoisted_6$7 = ["onClick"];
17950
- const _hoisted_7$3 = { key: 1 };
17951
- const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
17880
+ const _hoisted_4$c = ["onClick"];
17881
+ const _hoisted_5$a = { class: "flex" };
17882
+ const _hoisted_6$6 = ["onClick"];
17883
+ const _hoisted_7$2 = { key: 1 };
17884
+ const _sfc_main$x = /* @__PURE__ */ vue.defineComponent({
17952
17885
  __name: "TableSchema",
17953
17886
  props: {
17954
17887
  data: {},
@@ -17982,7 +17915,7 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
17982
17915
  emit2("orderBy", `${fieldname} ${sortDirection.value}`.trim());
17983
17916
  };
17984
17917
  return (_ctx, _cache) => {
17985
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$y, [
17918
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [
17986
17919
  vue.createElementVNode("table", _hoisted_2$p, [
17987
17920
  vue.createElementVNode("thead", _hoisted_3$j, [
17988
17921
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedSchema.value, (field) => {
@@ -17991,18 +17924,18 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
17991
17924
  key: field.id,
17992
17925
  onClick: ($event) => sort2((field == null ? void 0 : field.id) || "")
17993
17926
  }, [
17994
- vue.createElementVNode("div", _hoisted_5$b, [
17927
+ vue.createElementVNode("div", _hoisted_5$a, [
17995
17928
  vue.createTextVNode(vue.toDisplayString(field.label || vue.unref(keyToLabel)(field.id)) + " ", 1),
17996
17929
  vue.createElementVNode("div", {
17997
17930
  class: vue.normalizeClass(["list-arrows", { sorted: vue.unref(sortField) === field.id }])
17998
17931
  }, [
17999
- vue.createVNode(vue.unref(_sfc_main$F), {
17932
+ vue.createVNode(vue.unref(_sfc_main$H), {
18000
17933
  class: vue.normalizeClass({ desc: vue.unref(sortDirection) === "DESC" }),
18001
17934
  icon: "keyboard_arrow_up"
18002
17935
  }, null, 8, ["class"])
18003
17936
  ], 2)
18004
17937
  ])
18005
- ], 8, _hoisted_4$d);
17938
+ ], 8, _hoisted_4$c);
18006
17939
  }), 128))
18007
17940
  ]),
18008
17941
  vue.createElementVNode("tbody", {
@@ -18024,15 +17957,15 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
18024
17957
  key: 0,
18025
17958
  row,
18026
17959
  field
18027
- }, void 0, true) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$3, [
18028
- vue.createVNode(vue.unref(_sfc_main$g), {
17960
+ }, void 0, true) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_7$2, [
17961
+ vue.createVNode(vue.unref(_sfc_main$k), {
18029
17962
  field,
18030
17963
  modelValue: row
18031
17964
  }, null, 8, ["field", "modelValue"])
18032
17965
  ]))
18033
17966
  ]);
18034
17967
  }), 128))
18035
- ], 8, _hoisted_6$7);
17968
+ ], 8, _hoisted_6$6);
18036
17969
  }), 128))
18037
17970
  ], 2)
18038
17971
  ])
@@ -18040,16 +17973,16 @@ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
18040
17973
  };
18041
17974
  }
18042
17975
  });
18043
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-f3641508"]]);
18044
- const _sfc_main$t = {};
18045
- const _hoisted_1$x = { class: "flex space-between" };
17976
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-f3641508"]]);
17977
+ const _sfc_main$w = {};
17978
+ const _hoisted_1$v = { class: "flex space-between" };
18046
17979
  function _sfc_render$1(_ctx, _cache) {
18047
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$x, [
17980
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$v, [
18048
17981
  vue.renderSlot(_ctx.$slots, "default")
18049
17982
  ]);
18050
17983
  }
18051
- const TopBar = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$1]]);
18052
- const _sfc_main$s = {};
17984
+ const TopBar = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$1]]);
17985
+ const _sfc_main$v = {};
18053
17986
  function _sfc_render(_ctx, _cache) {
18054
17987
  const _component_router_view = vue.resolveComponent("router-view");
18055
17988
  return vue.openBlock(), vue.createBlock(_component_router_view, null, {
@@ -18071,8 +18004,8 @@ function _sfc_render(_ctx, _cache) {
18071
18004
  _: 1
18072
18005
  });
18073
18006
  }
18074
- const RouterWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render]]);
18075
- const _hoisted_1$w = {
18007
+ const RouterWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render]]);
18008
+ const _hoisted_1$u = {
18076
18009
  key: 0,
18077
18010
  class: "data"
18078
18011
  };
@@ -18081,10 +18014,10 @@ const _hoisted_2$o = {
18081
18014
  class: "data-row"
18082
18015
  };
18083
18016
  const _hoisted_3$i = { class: "key" };
18084
- const _hoisted_4$c = { key: 1 };
18085
- const _hoisted_5$a = { class: "key" };
18086
- const _hoisted_6$6 = { class: "vlue" };
18087
- const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
18017
+ const _hoisted_4$b = { key: 1 };
18018
+ const _hoisted_5$9 = { class: "key" };
18019
+ const _hoisted_6$5 = { class: "vlue" };
18020
+ const _sfc_main$u = /* @__PURE__ */ vue.defineComponent({
18088
18021
  __name: "DataPreview",
18089
18022
  props: /* @__PURE__ */ vue.mergeModels({
18090
18023
  schema: {},
@@ -18098,8 +18031,8 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
18098
18031
  const itemData = vue.useModel(__props, "data");
18099
18032
  return (_ctx, _cache) => {
18100
18033
  var _a2;
18101
- return __props.data ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$w, [
18102
- _ctx.title ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$o), {
18034
+ return __props.data ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$u, [
18035
+ _ctx.title ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$r), {
18103
18036
  key: 0,
18104
18037
  label: _ctx.title
18105
18038
  }, null, 8, ["label"])) : vue.createCommentVNode("", true),
@@ -18109,7 +18042,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
18109
18042
  }, [
18110
18043
  vue.unref(iffer)(field, itemData.value) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$o, [
18111
18044
  vue.createElementVNode("div", _hoisted_3$i, vue.toDisplayString((field == null ? void 0 : field.label) || vue.unref(keyToLabel)(field.id)), 1),
18112
- vue.createVNode(vue.unref(_sfc_main$g), {
18045
+ vue.createVNode(vue.unref(_sfc_main$k), {
18113
18046
  field,
18114
18047
  modelValue: itemData.value,
18115
18048
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => itemData.value = $event)
@@ -18117,14 +18050,14 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
18117
18050
  ])) : vue.createCommentVNode("", true)
18118
18051
  ], 64);
18119
18052
  }), 128)),
18120
- !((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$c, [
18053
+ !((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$b, [
18121
18054
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(Object.entries(itemData.value), ([key, value]) => {
18122
18055
  return vue.openBlock(), vue.createElementBlock("div", {
18123
18056
  class: "data-row",
18124
18057
  key
18125
18058
  }, [
18126
- vue.createElementVNode("div", _hoisted_5$a, vue.toDisplayString(vue.unref(keyToLabel)(key)), 1),
18127
- vue.createElementVNode("div", _hoisted_6$6, vue.toDisplayString(value), 1)
18059
+ vue.createElementVNode("div", _hoisted_5$9, vue.toDisplayString(vue.unref(keyToLabel)(key)), 1),
18060
+ vue.createElementVNode("div", _hoisted_6$5, vue.toDisplayString(value), 1)
18128
18061
  ]);
18129
18062
  }), 128))
18130
18063
  ])) : vue.createCommentVNode("", true),
@@ -18133,8 +18066,8 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
18133
18066
  };
18134
18067
  }
18135
18068
  });
18136
- const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-bb2526f9"]]);
18137
- const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
18069
+ const DataPreview = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-bb2526f9"]]);
18070
+ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
18138
18071
  __name: "Card",
18139
18072
  props: {
18140
18073
  thin: { type: Boolean },
@@ -18161,8 +18094,8 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
18161
18094
  };
18162
18095
  }
18163
18096
  });
18164
- const _hoisted_1$v = ["src", "alt"];
18165
- const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
18097
+ const _hoisted_1$t = ["src", "alt"];
18098
+ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
18166
18099
  __name: "Avatar",
18167
18100
  props: {
18168
18101
  fallback: {},
@@ -18180,7 +18113,7 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
18180
18113
  key: 0,
18181
18114
  src: _ctx.src,
18182
18115
  alt: _ctx.name
18183
- }, null, 8, _hoisted_1$v)) : (vue.openBlock(), vue.createElementBlock("p", {
18116
+ }, null, 8, _hoisted_1$t)) : (vue.openBlock(), vue.createElementBlock("p", {
18184
18117
  key: 1,
18185
18118
  style: vue.normalizeStyle({ "line-height": `${_ctx.size}px`, "font-size": `calc(1.5rem * ${_ctx.size} / 50)` })
18186
18119
  }, vue.toDisplayString(_ctx.fallback || vue.unref(initials)(_ctx.name || "")), 5))
@@ -18188,8 +18121,8 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
18188
18121
  };
18189
18122
  }
18190
18123
  });
18191
- const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-c38bc02a"]]);
18192
- const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
18124
+ const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-c38bc02a"]]);
18125
+ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
18193
18126
  __name: "Title",
18194
18127
  props: {
18195
18128
  value: {
@@ -18217,13 +18150,13 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
18217
18150
  };
18218
18151
  }
18219
18152
  });
18220
- const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
18153
+ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
18221
18154
  __name: "Accordion",
18222
18155
  setup(__props) {
18223
- const state = vue.reactive({
18156
+ const state2 = vue.reactive({
18224
18157
  openItem: null
18225
18158
  });
18226
- vue.provide("accordionState", state);
18159
+ vue.provide("accordionState", state2);
18227
18160
  return (_ctx, _cache) => {
18228
18161
  return vue.openBlock(), vue.createElementBlock("div", null, [
18229
18162
  vue.renderSlot(_ctx.$slots, "default")
@@ -18231,155 +18164,8 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
18231
18164
  };
18232
18165
  }
18233
18166
  });
18234
- const _hoisted_1$u = ["onClick"];
18235
- const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
18236
- __name: "ComboBox",
18237
- props: {
18238
- options: {},
18239
- placeholder: {},
18240
- disabled: { type: Boolean },
18241
- modelValue: {},
18242
- searchable: { type: Boolean },
18243
- required: { type: Boolean },
18244
- label: {},
18245
- fullWidth: { type: Boolean }
18246
- },
18247
- emits: ["update:modelValue"],
18248
- setup(__props, { emit: __emit }) {
18249
- let open = vue.ref(false);
18250
- const searchInput = vue.ref(null);
18251
- const props2 = __props;
18252
- let selectedItem = vue.ref();
18253
- let search = vue.ref("");
18254
- const toggle = () => {
18255
- open.value = !open.value;
18256
- if (!open.value)
18257
- search.value = "";
18258
- if (open.value)
18259
- setTimeout(() => {
18260
- var _a2, _b, _c;
18261
- return (_c = (_b = (_a2 = searchInput.value) == null ? void 0 : _a2.$el) == null ? void 0 : _b.querySelector("input")) == null ? void 0 : _c.focus();
18262
- }, 100);
18263
- };
18264
- const valueToLabel = (value) => {
18265
- if (!value)
18266
- return "";
18267
- const option2 = props2.options.find((option22) => {
18268
- if (typeof option22 === "string" || typeof option22 === "number")
18269
- return option22 === value;
18270
- return option22.value === value;
18271
- });
18272
- if (!option2)
18273
- return value;
18274
- return getLabel(option2);
18275
- };
18276
- const emit2 = __emit;
18277
- const getLabel = (option2) => {
18278
- if (typeof option2 === "string")
18279
- return option2;
18280
- if (typeof option2 === "number")
18281
- return `${option2}`;
18282
- return option2.label;
18283
- };
18284
- const isSelected = (option2) => {
18285
- if (typeof option2 === "string" || typeof option2 === "number")
18286
- return option2 === selectedItem.value;
18287
- return option2.value === selectedItem.value;
18288
- };
18289
- const filteredOptions = vue.computed(() => props2.options.filter((option2) => {
18290
- const searchTerm = new RegExp(search.value, "gi");
18291
- if (typeof option2 === "string")
18292
- return option2.match(searchTerm);
18293
- if (typeof option2 === "number")
18294
- return `${option2}`.match(searchTerm);
18295
- return option2.label.match(searchTerm);
18296
- }));
18297
- const select2 = (option2) => {
18298
- if (typeof option2 === "string")
18299
- selectedItem.value = option2;
18300
- else if (typeof option2 === "number")
18301
- selectedItem.value = option2;
18302
- else
18303
- selectedItem.value = option2.value;
18304
- emit2("update:modelValue", selectedItem.value);
18305
- open.value = false;
18306
- };
18307
- vue.watch(() => props2.modelValue, (value) => {
18308
- if (value !== selectedItem.value)
18309
- selectedItem.value = value;
18310
- }, { immediate: true });
18311
- return (_ctx, _cache) => {
18312
- return vue.openBlock(), vue.createBlock(vue.unref(kt$1), {
18313
- placement: "bottom-start",
18314
- class: "bagel-input combobox"
18315
- }, {
18316
- popper: vue.withCtx(({ hide }) => [
18317
- vue.createVNode(vue.unref(_sfc_main$q), {
18318
- thin: "",
18319
- class: "combobox-options",
18320
- style: vue.normalizeStyle({ width: _ctx.fullWidth ? "100%" : "auto" })
18321
- }, {
18322
- default: vue.withCtx(() => [
18323
- _ctx.searchable ? (vue.openBlock(), vue.createBlock(vue.unref(TextInput), {
18324
- key: 0,
18325
- ref_key: "searchInput",
18326
- ref: searchInput,
18327
- dense: "",
18328
- placeholder: "Search",
18329
- icon: "search",
18330
- modelValue: vue.unref(search),
18331
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(search) ? search.value = $event : search = $event)
18332
- }, null, 8, ["modelValue"])) : vue.createCommentVNode("", true),
18333
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filteredOptions.value, (option2, i2) => {
18334
- return vue.openBlock(), vue.createElementBlock("div", {
18335
- class: vue.normalizeClass(["combobox-option", { selected: option2 === vue.unref(selectedItem) }]),
18336
- key: `${option2}${i2}`,
18337
- onClick: () => {
18338
- select2(option2);
18339
- hide();
18340
- }
18341
- }, [
18342
- vue.createElementVNode("span", null, vue.toDisplayString(getLabel(option2)), 1),
18343
- isSelected(option2) ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$F), {
18344
- key: 0,
18345
- icon: "check"
18346
- })) : vue.createCommentVNode("", true)
18347
- ], 10, _hoisted_1$u);
18348
- }), 128)),
18349
- vue.renderSlot(_ctx.$slots, "last", {}, void 0, true)
18350
- ]),
18351
- _: 2
18352
- }, 1032, ["style"])
18353
- ]),
18354
- default: vue.withCtx(() => [
18355
- vue.createElementVNode("label", null, [
18356
- vue.createTextVNode(vue.toDisplayString(_ctx.label) + " ", 1),
18357
- vue.createElementVNode("button", {
18358
- type: "button",
18359
- class: "combobox-btn",
18360
- onClick: toggle
18361
- }, [
18362
- vue.createTextVNode(vue.toDisplayString(valueToLabel(vue.unref(selectedItem)) || _ctx.placeholder || "Select") + " ", 1),
18363
- vue.createVNode(vue.unref(_sfc_main$F), vue.normalizeProps(vue.guardReactiveProps({ "icon": vue.unref(open) ? "unfold_less" : "unfold_more" })), null, 16)
18364
- ]),
18365
- _ctx.required ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
18366
- key: 0,
18367
- style: { "width": "0", "height": "0", "position": "absolute", "opacity": "0", "z-index": "-1" },
18368
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(selectedItem) ? selectedItem.value = $event : selectedItem = $event),
18369
- required: ""
18370
- }, null, 512)), [
18371
- [vue.vModelText, vue.unref(selectedItem)]
18372
- ]) : vue.createCommentVNode("", true)
18373
- ])
18374
- ]),
18375
- _: 3
18376
- });
18377
- };
18378
- }
18379
- });
18380
- const ComboBox = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-220e98d7"]]);
18381
- const _hoisted_1$t = ["dismissable"];
18382
- const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
18167
+ const _hoisted_1$s = ["dismissable"];
18168
+ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
18383
18169
  __name: "Alert",
18384
18170
  props: {
18385
18171
  message: {},
@@ -18399,7 +18185,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
18399
18185
  class: vue.normalizeClass(["alert", [_ctx.type]]),
18400
18186
  dismissable: _ctx.dismissable
18401
18187
  }, [
18402
- vue.createVNode(vue.unref(_sfc_main$F), {
18188
+ vue.createVNode(vue.unref(_sfc_main$H), {
18403
18189
  class: "alert_icon",
18404
18190
  icon: _ctx.type,
18405
18191
  size: 2,
@@ -18413,12 +18199,12 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
18413
18199
  class: "alert_close",
18414
18200
  icon: "close"
18415
18201
  })
18416
- ], 10, _hoisted_1$t)) : vue.createCommentVNode("", true);
18202
+ ], 10, _hoisted_1$s)) : vue.createCommentVNode("", true);
18417
18203
  };
18418
18204
  }
18419
18205
  });
18420
- const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-94bfcb05"]]);
18421
- const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
18206
+ const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-94bfcb05"]]);
18207
+ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
18422
18208
  __name: "Badge",
18423
18209
  props: {
18424
18210
  color: {},
@@ -18433,13 +18219,13 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
18433
18219
  return vue.openBlock(), vue.createElementBlock("div", {
18434
18220
  class: vue.normalizeClass(["pill", [_ctx.color]])
18435
18221
  }, [
18436
- _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$F), {
18222
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$H), {
18437
18223
  key: 0,
18438
18224
  class: "inline",
18439
18225
  icon: _ctx.icon
18440
18226
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
18441
18227
  vue.createTextVNode(" " + vue.toDisplayString(_ctx.text) + " ", 1),
18442
- props2["icon.end"] ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$F), {
18228
+ props2["icon.end"] ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$H), {
18443
18229
  key: 1,
18444
18230
  class: "inline",
18445
18231
  icon: props2["icon.end"]
@@ -18448,11 +18234,11 @@ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
18448
18234
  };
18449
18235
  }
18450
18236
  });
18451
- const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-10743b06"]]);
18452
- const _hoisted_1$s = { class: "bgl_vid" };
18237
+ const Badge = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-10743b06"]]);
18238
+ const _hoisted_1$r = { class: "bgl_vid" };
18453
18239
  const _hoisted_2$n = ["src"];
18454
18240
  const _hoisted_3$h = ["src", "autoplay", "muted", "loop", "controls"];
18455
- const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
18241
+ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
18456
18242
  __name: "BglVideo",
18457
18243
  props: {
18458
18244
  src: {},
@@ -18491,7 +18277,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
18491
18277
  });
18492
18278
  console.log("Video URL:", videoUrl.value);
18493
18279
  return (_ctx, _cache) => {
18494
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$s, [
18280
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$r, [
18495
18281
  embedType.value ? (vue.openBlock(), vue.createElementBlock("iframe", {
18496
18282
  key: 0,
18497
18283
  src: videoUrl.value,
@@ -18513,13 +18299,13 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
18513
18299
  };
18514
18300
  }
18515
18301
  });
18516
- const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-23835d69"]]);
18517
- const _hoisted_1$r = {
18302
+ const BglVideo = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-23835d69"]]);
18303
+ const _hoisted_1$q = {
18518
18304
  key: 0,
18519
18305
  class: "blocker"
18520
18306
  };
18521
18307
  const _hoisted_2$m = { class: "Handlers" };
18522
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
18308
+ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
18523
18309
  __name: "Carousel",
18524
18310
  props: {
18525
18311
  autoHeight: {
@@ -18669,7 +18455,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
18669
18455
  ref_key: "bglSlider",
18670
18456
  ref: bglSlider
18671
18457
  }, [
18672
- vue.unref(isDragging) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$r)) : vue.createCommentVNode("", true),
18458
+ vue.unref(isDragging) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$q)) : vue.createCommentVNode("", true),
18673
18459
  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
18674
18460
  ], 34),
18675
18461
  vue.createElementVNode("div", _hoisted_2$m, [
@@ -18684,8 +18470,8 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
18684
18470
  };
18685
18471
  }
18686
18472
  });
18687
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-7e8d16cb"]]);
18688
- const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
18473
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-7e8d16cb"]]);
18474
+ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
18689
18475
  __name: "BglForm",
18690
18476
  props: {
18691
18477
  label: {},
@@ -18724,10 +18510,10 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
18724
18510
  const clearForm = () => Object.assign(data2.value, {});
18725
18511
  let formStatus = vue.ref("idle");
18726
18512
  const runSubmit = () => {
18727
- console.log("runSubmit");
18513
+ var _a2;
18728
18514
  try {
18729
18515
  validateForm();
18730
- props2.onSubmit(data2.value);
18516
+ (_a2 = props2.onSubmit) == null ? void 0 : _a2.call(props2, data2.value);
18731
18517
  clearForm();
18732
18518
  formStatus.value = "success";
18733
18519
  } catch (e) {
@@ -18759,7 +18545,7 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
18759
18545
  return (_ctx, _cache) => {
18760
18546
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
18761
18547
  _ctx.id ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_ctx.schema, (field, i2) => {
18762
- return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$g), {
18548
+ return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$k), {
18763
18549
  key: field.id || `${i2}p`,
18764
18550
  field,
18765
18551
  modelValue: data2.value,
@@ -18771,32 +18557,28 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
18771
18557
  ref: form,
18772
18558
  onSubmit: vue.withModifiers(runSubmit, ["prevent"])
18773
18559
  }, [
18774
- _ctx.label ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$o), {
18560
+ _ctx.label ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$r), {
18775
18561
  key: 0,
18776
18562
  tag: "h4",
18777
18563
  label: _ctx.label
18778
18564
  }, null, 8, ["label"])) : vue.createCommentVNode("", true),
18779
18565
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.schema, (field, i2) => {
18780
- return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$g), {
18566
+ return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$k), {
18781
18567
  key: field.id || `${i2}p`,
18782
18568
  field,
18783
18569
  modelValue: data2.value,
18784
18570
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => data2.value = $event)
18785
18571
  }, null, 8, ["field", "modelValue"]);
18786
18572
  }), 128)),
18787
- vue.renderSlot(_ctx.$slots, "submit"),
18788
- vue.createElementVNode("button", { onClick: runSubmit }, " Click ")
18573
+ vue.renderSlot(_ctx.$slots, "submit")
18789
18574
  ], 544)) : vue.createCommentVNode("", true),
18790
18575
  vue.unref(formStatus) === "success" ? vue.renderSlot(_ctx.$slots, "success", { key: 2 }) : vue.createCommentVNode("", true),
18791
- vue.unref(formStatus) === "error" ? vue.renderSlot(_ctx.$slots, "error", {
18792
- key: 3,
18793
- message: _ctx.error
18794
- }) : vue.createCommentVNode("", true)
18576
+ vue.unref(formStatus) === "error" ? vue.renderSlot(_ctx.$slots, "error", { key: 3 }) : vue.createCommentVNode("", true)
18795
18577
  ], 64);
18796
18578
  };
18797
18579
  }
18798
18580
  });
18799
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
18581
+ const _sfc_main$k = /* @__PURE__ */ vue.defineComponent({
18800
18582
  __name: "BglField",
18801
18583
  props: {
18802
18584
  field: {},
@@ -18809,7 +18591,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
18809
18591
  if (props2.field.$el === "text")
18810
18592
  return TextInput;
18811
18593
  if (props2.field.$el === "select")
18812
- return ComboBox;
18594
+ return SelectInput;
18813
18595
  if (props2.field.$el === "toggle")
18814
18596
  return ToggleInput;
18815
18597
  if (props2.field.$el === "check")
@@ -18887,7 +18669,7 @@ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
18887
18669
  }
18888
18670
  });
18889
18671
  const _withScopeId$1 = (n2) => (vue.pushScopeId("data-v-e8219826"), n2 = n2(), vue.popScopeId(), n2);
18890
- const _hoisted_1$q = ["title"];
18672
+ const _hoisted_1$p = ["title"];
18891
18673
  const _hoisted_2$l = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("svg", {
18892
18674
  xmlns: "http://www.w3.org/2000/svg",
18893
18675
  height: "24",
@@ -18899,8 +18681,8 @@ const _hoisted_2$l = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.cr
18899
18681
  const _hoisted_3$g = [
18900
18682
  _hoisted_2$l
18901
18683
  ];
18902
- const _hoisted_4$b = ["required", "id"];
18903
- const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
18684
+ const _hoisted_4$a = ["required", "id"];
18685
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
18904
18686
  __name: "CheckInput",
18905
18687
  props: /* @__PURE__ */ vue.mergeModels({
18906
18688
  label: {},
@@ -18930,18 +18712,18 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
18930
18712
  id: _ctx.id,
18931
18713
  type: "checkbox",
18932
18714
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => checked.value = $event)
18933
- }, null, 8, _hoisted_4$b), [
18715
+ }, null, 8, _hoisted_4$a), [
18934
18716
  [vue.vModelCheckbox, checked.value]
18935
18717
  ]),
18936
18718
  vue.renderSlot(_ctx.$slots, "label", {}, () => [
18937
18719
  vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
18938
18720
  ], true)
18939
18721
  ])
18940
- ], 10, _hoisted_1$q);
18722
+ ], 10, _hoisted_1$p);
18941
18723
  };
18942
18724
  }
18943
18725
  });
18944
- const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-e8219826"]]);
18726
+ const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-e8219826"]]);
18945
18727
  function toDate(argument) {
18946
18728
  const argStr = Object.prototype.toString.call(argument);
18947
18729
  if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
@@ -27550,9 +27332,9 @@ const ar = ({
27550
27332
  Object.entries(Mo).forEach(([e, t]) => {
27551
27333
  e !== "default" && (Va[e] = t);
27552
27334
  });
27553
- const _hoisted_1$p = ["title"];
27335
+ const _hoisted_1$o = ["title"];
27554
27336
  const _hoisted_2$k = { key: 0 };
27555
- const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
27337
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
27556
27338
  __name: "DateInput",
27557
27339
  props: {
27558
27340
  label: {},
@@ -27598,14 +27380,14 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
27598
27380
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => date2.value = $event),
27599
27381
  "enable-time-picker": _ctx.enableTime
27600
27382
  }, _ctx.extraProps), null, 16, ["modelValue", "enable-time-picker"])
27601
- ], 10, _hoisted_1$p);
27383
+ ], 10, _hoisted_1$o);
27602
27384
  };
27603
27385
  }
27604
27386
  });
27605
- const _hoisted_1$o = ["title"];
27387
+ const _hoisted_1$n = ["title"];
27606
27388
  const _hoisted_2$j = { key: 0 };
27607
27389
  const _hoisted_3$f = ["value", "placeholder"];
27608
- const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
27390
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
27609
27391
  __name: "JSONInput",
27610
27392
  props: {
27611
27393
  description: { default: "" },
@@ -27637,1384 +27419,168 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
27637
27419
  class: vue.normalizeClass({ "no-edit": !_ctx.editMode }),
27638
27420
  placeholder: _ctx.placeholder
27639
27421
  }, null, 42, _hoisted_3$f)
27640
- ], 10, _hoisted_1$o);
27422
+ ], 10, _hoisted_1$n);
27641
27423
  };
27642
27424
  }
27643
27425
  });
27644
- const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-1fc4f739"]]);
27645
- function isEmpty(opt) {
27646
- if (opt === 0)
27647
- return false;
27648
- if (Array.isArray(opt) && opt.length === 0)
27649
- return true;
27650
- return !opt;
27651
- }
27652
- function not(fun) {
27653
- return (...params) => !fun(...params);
27654
- }
27655
- function includes(str, query) {
27656
- if (str === void 0)
27657
- str = "undefined";
27658
- if (str === null)
27659
- str = "null";
27660
- if (str === false)
27661
- str = "false";
27662
- const text = str.toString().toLowerCase();
27663
- return text.indexOf(query.trim()) !== -1;
27664
- }
27665
- function filterOptions(options, search, label, customLabel) {
27666
- return search ? options.filter((option2) => includes(customLabel(option2, label), search)).sort((a2, b2) => customLabel(a2, label).length - customLabel(b2, label).length) : options;
27667
- }
27668
- function stripGroups(options) {
27669
- return options.filter((option2) => !option2.$isLabel);
27670
- }
27671
- function flattenOptions(values3, label) {
27672
- return (options) => options.reduce((prev, curr) => {
27673
- if (curr[values3] && curr[values3].length) {
27674
- prev.push({
27675
- $groupLabel: curr[label],
27676
- $isLabel: true
27677
- });
27678
- return prev.concat(curr[values3]);
27679
- }
27680
- return prev;
27681
- }, []);
27682
- }
27683
- function filterGroups(search, label, values3, groupLabel, customLabel) {
27684
- return (groups) => groups.map((group) => {
27685
- if (!group[values3]) {
27686
- console.warn(`Options passed to vue-multiselect do not contain groups, despite the config.`);
27687
- return [];
27688
- }
27689
- const groupOptions = filterOptions(group[values3], search, label, customLabel);
27690
- return groupOptions.length ? {
27691
- [groupLabel]: group[groupLabel],
27692
- [values3]: groupOptions
27693
- } : [];
27694
- });
27695
- }
27696
- const flow = (...fns) => (x2) => fns.reduce((v2, f2) => f2(v2), x2);
27697
- var multiselectMixin = {
27698
- data() {
27699
- return {
27700
- search: "",
27701
- isOpen: false,
27702
- preferredOpenDirection: "below",
27703
- optimizedHeight: this.maxHeight
27704
- };
27705
- },
27706
- props: {
27707
- /**
27708
- * Decide whether to filter the results based on search query.
27709
- * Useful for async filtering, where we search through more complex data.
27710
- * @type {Boolean}
27711
- */
27712
- internalSearch: {
27713
- type: Boolean,
27714
- default: true
27715
- },
27716
- /**
27717
- * Array of available options: Objects, Strings or Integers.
27718
- * If array of objects, visible label will default to option.label.
27719
- * If `labal` prop is passed, label will equal option['label']
27720
- * @type {Array}
27721
- */
27722
- options: {
27723
- type: Array,
27724
- required: true
27725
- },
27726
- /**
27727
- * Equivalent to the `multiple` attribute on a `<select>` input.
27728
- * @default false
27729
- * @type {Boolean}
27730
- */
27731
- multiple: {
27732
- type: Boolean,
27733
- default: false
27734
- },
27735
- /**
27736
- * Key to compare objects
27737
- * @default 'id'
27738
- * @type {String}
27739
- */
27740
- trackBy: {
27741
- type: String
27742
- },
27743
- /**
27744
- * Label to look for in option Object
27745
- * @default 'label'
27746
- * @type {String}
27747
- */
27748
- label: {
27749
- type: String
27750
- },
27751
- /**
27752
- * Enable/disable search in options
27753
- * @default true
27754
- * @type {Boolean}
27755
- */
27756
- searchable: {
27757
- type: Boolean,
27758
- default: true
27759
- },
27760
- /**
27761
- * Clear the search input after `)
27762
- * @default true
27763
- * @type {Boolean}
27764
- */
27765
- clearOnSelect: {
27766
- type: Boolean,
27767
- default: true
27768
- },
27769
- /**
27770
- * Hide already selected options
27771
- * @default false
27772
- * @type {Boolean}
27773
- */
27774
- hideSelected: {
27775
- type: Boolean,
27776
- default: false
27777
- },
27778
- /**
27779
- * Equivalent to the `placeholder` attribute on a `<select>` input.
27780
- * @default 'Select option'
27781
- * @type {String}
27782
- */
27783
- placeholder: {
27784
- type: String,
27785
- default: "Select option"
27786
- },
27787
- /**
27788
- * Allow to remove all selected values
27789
- * @default true
27790
- * @type {Boolean}
27791
- */
27792
- allowEmpty: {
27793
- type: Boolean,
27794
- default: true
27795
- },
27796
- /**
27797
- * Reset this.internalValue, this.search after this.internalValue changes.
27798
- * Useful if want to create a stateless dropdown.
27799
- * @default false
27800
- * @type {Boolean}
27801
- */
27802
- resetAfter: {
27803
- type: Boolean,
27804
- default: false
27805
- },
27806
- /**
27807
- * Enable/disable closing after selecting an option
27808
- * @default true
27809
- * @type {Boolean}
27810
- */
27811
- closeOnSelect: {
27812
- type: Boolean,
27813
- default: true
27814
- },
27815
- /**
27816
- * Function to interpolate the custom label
27817
- * @default false
27818
- * @type {Function}
27819
- */
27820
- customLabel: {
27821
- type: Function,
27822
- default(option2, label) {
27823
- if (isEmpty(option2))
27824
- return "";
27825
- return label ? option2[label] : option2;
27826
- }
27827
- },
27828
- /**
27829
- * Disable / Enable tagging
27830
- * @default false
27831
- * @type {Boolean}
27832
- */
27833
- taggable: {
27834
- type: Boolean,
27835
- default: false
27836
- },
27837
- /**
27838
- * String to show when highlighting a potential tag
27839
- * @default 'Press enter to create a tag'
27840
- * @type {String}
27841
- */
27842
- tagPlaceholder: {
27843
- type: String,
27844
- default: "Press enter to create a tag"
27845
- },
27846
- /**
27847
- * By default new tags will appear above the search results.
27848
- * Changing to 'bottom' will revert this behaviour
27849
- * and will proritize the search results
27850
- * @default 'top'
27851
- * @type {String}
27852
- */
27853
- tagPosition: {
27854
- type: String,
27855
- default: "top"
27856
- },
27857
- /**
27858
- * Number of allowed selected options. No limit if 0.
27859
- * @default 0
27860
- * @type {Number}
27861
- */
27862
- max: {
27863
- type: [Number, Boolean],
27864
- default: false
27865
- },
27866
- /**
27867
- * Will be passed with all events as second param.
27868
- * Useful for identifying events origin.
27869
- * @default null
27870
- * @type {String|Integer}
27871
- */
27872
- id: {
27873
- default: null
27874
- },
27875
- /**
27876
- * Limits the options displayed in the dropdown
27877
- * to the first X options.
27878
- * @default 1000
27879
- * @type {Integer}
27880
- */
27881
- optionsLimit: {
27882
- type: Number,
27883
- default: 1e3
27884
- },
27885
- /**
27886
- * Name of the property containing
27887
- * the group values
27888
- * @default 1000
27889
- * @type {String}
27890
- */
27891
- groupValues: {
27892
- type: String
27893
- },
27894
- /**
27895
- * Name of the property containing
27896
- * the group label
27897
- * @default 1000
27898
- * @type {String}
27899
- */
27900
- groupLabel: {
27901
- type: String
27902
- },
27903
- /**
27904
- * Allow to select all group values
27905
- * by selecting the group label
27906
- * @default false
27907
- * @type {Boolean}
27908
- */
27909
- groupSelect: {
27910
- type: Boolean,
27911
- default: false
27912
- },
27913
- /**
27914
- * Array of keyboard keys to block
27915
- * when selecting
27916
- * @default 1000
27917
- * @type {String}
27918
- */
27919
- blockKeys: {
27920
- type: Array,
27921
- default() {
27922
- return [];
27923
- }
27924
- },
27925
- /**
27926
- * Prevent from wiping up the search value
27927
- * @default false
27928
- * @type {Boolean}
27929
- */
27930
- preserveSearch: {
27931
- type: Boolean,
27932
- default: false
27933
- },
27934
- /**
27935
- * Select 1st options if value is empty
27936
- * @default false
27937
- * @type {Boolean}
27938
- */
27939
- preselectFirst: {
27940
- type: Boolean,
27941
- default: false
27942
- },
27943
- /**
27944
- * Prevent autofocus
27945
- * @default false
27946
- * @type {Boolean}
27947
- */
27948
- preventAutofocus: {
27949
- type: Boolean,
27950
- default: false
27951
- }
27952
- },
27953
- mounted() {
27954
- if (!this.multiple && this.max) {
27955
- console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false.");
27956
- }
27957
- if (this.preselectFirst && !this.internalValue.length && this.options.length) {
27958
- this.select(this.filteredOptions[0]);
27959
- }
27960
- },
27961
- computed: {
27962
- internalValue() {
27963
- return this.modelValue || this.modelValue === 0 ? Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue] : [];
27964
- },
27965
- filteredOptions() {
27966
- const search = this.search || "";
27967
- const normalizedSearch = search.toLowerCase().trim();
27968
- let options = this.options.concat();
27969
- if (this.internalSearch) {
27970
- options = this.groupValues ? this.filterAndFlat(options, normalizedSearch, this.label) : filterOptions(options, normalizedSearch, this.label, this.customLabel);
27971
- } else {
27972
- options = this.groupValues ? flattenOptions(this.groupValues, this.groupLabel)(options) : options;
27973
- }
27974
- options = this.hideSelected ? options.filter(not(this.isSelected)) : options;
27975
- if (this.taggable && normalizedSearch.length && !this.isExistingOption(normalizedSearch)) {
27976
- if (this.tagPosition === "bottom") {
27977
- options.push({ isTag: true, label: search });
27978
- } else {
27979
- options.unshift({ isTag: true, label: search });
27980
- }
27981
- }
27982
- return options.slice(0, this.optionsLimit);
27983
- },
27984
- valueKeys() {
27985
- if (this.trackBy) {
27986
- return this.internalValue.map((element) => element[this.trackBy]);
27987
- } else {
27988
- return this.internalValue;
27989
- }
27990
- },
27991
- optionKeys() {
27992
- const options = this.groupValues ? this.flatAndStrip(this.options) : this.options;
27993
- return options.map((element) => this.customLabel(element, this.label).toString().toLowerCase());
27994
- },
27995
- currentOptionLabel() {
27996
- return this.multiple ? this.searchable ? "" : this.placeholder : this.internalValue.length ? this.getOptionLabel(this.internalValue[0]) : this.searchable ? "" : this.placeholder;
27997
- }
27998
- },
27999
- watch: {
28000
- internalValue: {
28001
- handler() {
28002
- if (this.resetAfter && this.internalValue.length) {
28003
- this.search = "";
28004
- this.$emit("update:modelValue", this.multiple ? [] : null);
28005
- }
28006
- },
28007
- deep: true
28008
- },
28009
- search() {
28010
- this.$emit("search-change", this.search);
28011
- }
28012
- },
28013
- emits: ["open", "search-change", "close", "select", "update:modelValue", "remove", "tag"],
28014
- methods: {
28015
- /**
28016
- * Returns the internalValue in a way it can be emited to the parent
28017
- * @returns {Object||Array||String||Integer}
28018
- */
28019
- getValue() {
28020
- return this.multiple ? this.internalValue : this.internalValue.length === 0 ? null : this.internalValue[0];
28021
- },
28022
- /**
28023
- * Filters and then flattens the options list
28024
- * @param {Array}
28025
- * @return {Array} returns a filtered and flat options list
28026
- */
28027
- filterAndFlat(options, search, label) {
28028
- return flow(
28029
- filterGroups(search, label, this.groupValues, this.groupLabel, this.customLabel),
28030
- flattenOptions(this.groupValues, this.groupLabel)
28031
- )(options);
28032
- },
28033
- /**
28034
- * Flattens and then strips the group labels from the options list
28035
- * @param {Array}
28036
- * @return {Array} returns a flat options list without group labels
28037
- */
28038
- flatAndStrip(options) {
28039
- return flow(
28040
- flattenOptions(this.groupValues, this.groupLabel),
28041
- stripGroups
28042
- )(options);
28043
- },
28044
- /**
28045
- * Updates the search value
28046
- * @param {String}
28047
- */
28048
- updateSearch(query) {
28049
- this.search = query;
28050
- },
28051
- /**
28052
- * Finds out if the given query is already present
28053
- * in the available options
28054
- * @param {String}
28055
- * @return {Boolean} returns true if element is available
28056
- */
28057
- isExistingOption(query) {
28058
- return !this.options ? false : this.optionKeys.indexOf(query) > -1;
28059
- },
28060
- /**
28061
- * Finds out if the given element is already present
28062
- * in the result value
28063
- * @param {Object||String||Integer} option passed element to check
28064
- * @returns {Boolean} returns true if element is selected
28065
- */
28066
- isSelected(option2) {
28067
- const opt = this.trackBy ? option2[this.trackBy] : option2;
28068
- return this.valueKeys.indexOf(opt) > -1;
28069
- },
28070
- /**
28071
- * Finds out if the given option is disabled
28072
- * @param {Object||String||Integer} option passed element to check
28073
- * @returns {Boolean} returns true if element is disabled
28074
- */
28075
- isOptionDisabled(option2) {
28076
- return !!option2.$isDisabled;
28077
- },
28078
- /**
28079
- * Returns empty string when options is null/undefined
28080
- * Returns tag query if option is tag.
28081
- * Returns the customLabel() results and casts it to string.
28082
- *
28083
- * @param {Object||String||Integer} Passed option
28084
- * @returns {Object||String}
28085
- */
28086
- getOptionLabel(option2) {
28087
- if (isEmpty(option2))
28088
- return "";
28089
- if (option2.isTag)
28090
- return option2.label;
28091
- if (option2.$isLabel)
28092
- return option2.$groupLabel;
28093
- const label = this.customLabel(option2, this.label);
28094
- if (isEmpty(label))
28095
- return "";
28096
- return label;
28097
- },
28098
- /**
28099
- * Add the given option to the list of selected options
28100
- * or sets the option as the selected option.
28101
- * If option is already selected -> remove it from the results.
28102
- *
28103
- * @param {Object||String||Integer} option to select/deselect
28104
- * @param {Boolean} block removing
28105
- */
28106
- select(option2, key) {
28107
- if (option2.$isLabel && this.groupSelect) {
28108
- this.selectGroup(option2);
28109
- return;
28110
- }
28111
- if (this.blockKeys.indexOf(key) !== -1 || this.disabled || option2.$isDisabled || option2.$isLabel)
28112
- return;
28113
- if (this.max && this.multiple && this.internalValue.length === this.max)
28114
- return;
28115
- if (key === "Tab" && !this.pointerDirty)
28116
- return;
28117
- if (option2.isTag) {
28118
- this.$emit("tag", option2.label, this.id);
28119
- this.search = "";
28120
- if (this.closeOnSelect && !this.multiple)
28121
- this.deactivate();
28122
- } else {
28123
- const isSelected = this.isSelected(option2);
28124
- if (isSelected) {
28125
- if (key !== "Tab")
28126
- this.removeElement(option2);
28127
- return;
28128
- }
28129
- if (this.multiple) {
28130
- this.$emit("update:modelValue", this.internalValue.concat([option2]));
28131
- } else {
28132
- this.$emit("update:modelValue", option2);
28133
- }
28134
- this.$emit("select", option2, this.id);
28135
- if (this.clearOnSelect)
28136
- this.search = "";
28137
- }
28138
- if (this.closeOnSelect)
28139
- this.deactivate();
28140
- },
28141
- /**
28142
- * Add the given group options to the list of selected options
28143
- * If all group optiona are already selected -> remove it from the results.
28144
- *
28145
- * @param {Object||String||Integer} group to select/deselect
28146
- */
28147
- selectGroup(selectedGroup) {
28148
- const group = this.options.find((option2) => {
28149
- return option2[this.groupLabel] === selectedGroup.$groupLabel;
28150
- });
28151
- if (!group)
28152
- return;
28153
- if (this.wholeGroupSelected(group)) {
28154
- this.$emit("remove", group[this.groupValues], this.id);
28155
- const newValue = this.internalValue.filter(
28156
- (option2) => group[this.groupValues].indexOf(option2) === -1
28157
- );
28158
- this.$emit("update:modelValue", newValue);
28159
- } else {
28160
- let optionsToAdd = group[this.groupValues].filter(
28161
- (option2) => !(this.isOptionDisabled(option2) || this.isSelected(option2))
28162
- );
28163
- if (this.max) {
28164
- optionsToAdd.splice(this.max - this.internalValue.length);
28165
- }
28166
- this.$emit("select", optionsToAdd, this.id);
28167
- this.$emit(
28168
- "update:modelValue",
28169
- this.internalValue.concat(optionsToAdd)
28170
- );
28171
- }
28172
- if (this.closeOnSelect)
28173
- this.deactivate();
28174
- },
28175
- /**
28176
- * Helper to identify if all values in a group are selected
28177
- *
28178
- * @param {Object} group to validated selected values against
28179
- */
28180
- wholeGroupSelected(group) {
28181
- return group[this.groupValues].every(
28182
- (option2) => this.isSelected(option2) || this.isOptionDisabled(option2)
28183
- );
28184
- },
28185
- /**
28186
- * Helper to identify if all values in a group are disabled
28187
- *
28188
- * @param {Object} group to check for disabled values
28189
- */
28190
- wholeGroupDisabled(group) {
28191
- return group[this.groupValues].every(this.isOptionDisabled);
28192
- },
28193
- /**
28194
- * Removes the given option from the selected options.
28195
- * Additionally checks this.allowEmpty prop if option can be removed when
28196
- * it is the last selected option.
28197
- *
28198
- * @param {type} option description
28199
- * @return {type} description
28200
- */
28201
- removeElement(option2, shouldClose = true) {
28202
- if (this.disabled)
28203
- return;
28204
- if (option2.$isDisabled)
28205
- return;
28206
- if (!this.allowEmpty && this.internalValue.length <= 1) {
28207
- this.deactivate();
28208
- return;
28209
- }
28210
- const index2 = typeof option2 === "object" ? this.valueKeys.indexOf(option2[this.trackBy]) : this.valueKeys.indexOf(option2);
28211
- if (this.multiple) {
28212
- const newValue = this.internalValue.slice(0, index2).concat(this.internalValue.slice(index2 + 1));
28213
- this.$emit("update:modelValue", newValue);
28214
- } else {
28215
- this.$emit("update:modelValue", null);
28216
- }
28217
- this.$emit("remove", option2, this.id);
28218
- if (this.closeOnSelect && shouldClose)
28219
- this.deactivate();
28220
- },
28221
- /**
28222
- * Calls this.removeElement() with the last element
28223
- * from this.internalValue (selected element Array)
28224
- *
28225
- * @fires this#removeElement
28226
- */
28227
- removeLastElement() {
28228
- if (this.blockKeys.indexOf("Delete") !== -1)
28229
- return;
28230
- if (this.search.length === 0 && Array.isArray(this.internalValue) && this.internalValue.length) {
28231
- this.removeElement(this.internalValue[this.internalValue.length - 1], false);
28232
- }
28233
- },
28234
- /**
28235
- * Opens the multiselect’s dropdown.
28236
- * Sets this.isOpen to TRUE
28237
- */
28238
- activate() {
28239
- if (this.isOpen || this.disabled)
28240
- return;
28241
- this.adjustPosition();
28242
- if (this.groupValues && this.pointer === 0 && this.filteredOptions.length) {
28243
- this.pointer = 1;
28244
- }
28245
- this.isOpen = true;
28246
- if (this.searchable) {
28247
- if (!this.preserveSearch)
28248
- this.search = "";
28249
- if (!this.preventAutofocus)
28250
- this.$nextTick(() => this.$refs.search && this.$refs.search.focus());
28251
- } else if (!this.preventAutofocus) {
28252
- if (typeof this.$el !== "undefined")
28253
- this.$el.focus();
28254
- }
28255
- this.$emit("open", this.id);
28256
- },
28257
- /**
28258
- * Closes the multiselect’s dropdown.
28259
- * Sets this.isOpen to FALSE
28260
- */
28261
- deactivate() {
28262
- if (!this.isOpen)
28263
- return;
28264
- this.isOpen = false;
28265
- if (this.searchable) {
28266
- if (this.$refs.search !== null && typeof this.$refs.search !== "undefined")
28267
- this.$refs.search.blur();
28268
- } else {
28269
- if (typeof this.$el !== "undefined")
28270
- this.$el.blur();
28271
- }
28272
- if (!this.preserveSearch)
28273
- this.search = "";
28274
- this.$emit("close", this.getValue(), this.id);
28275
- },
28276
- /**
28277
- * Call this.activate() or this.deactivate()
28278
- * depending on this.isOpen value.
28279
- *
28280
- * @fires this#activate || this#deactivate
28281
- * @property {Boolean} isOpen indicates if dropdown is open
28282
- */
28283
- toggle() {
28284
- this.isOpen ? this.deactivate() : this.activate();
28285
- },
28286
- /**
28287
- * Updates the hasEnoughSpace variable used for
28288
- * detecting where to expand the dropdown
28289
- */
28290
- adjustPosition() {
28291
- if (typeof window === "undefined")
28292
- return;
28293
- const spaceAbove = this.$el.getBoundingClientRect().top;
28294
- const spaceBelow = window.innerHeight - this.$el.getBoundingClientRect().bottom;
28295
- const hasEnoughSpaceBelow = spaceBelow > this.maxHeight;
28296
- if (hasEnoughSpaceBelow || spaceBelow > spaceAbove || this.openDirection === "below" || this.openDirection === "bottom") {
28297
- this.preferredOpenDirection = "below";
28298
- this.optimizedHeight = Math.min(spaceBelow - 40, this.maxHeight);
28299
- } else {
28300
- this.preferredOpenDirection = "above";
28301
- this.optimizedHeight = Math.min(spaceAbove - 40, this.maxHeight);
28302
- }
28303
- }
28304
- }
28305
- };
28306
- var pointerMixin = {
28307
- data() {
28308
- return {
28309
- pointer: 0,
28310
- pointerDirty: false
28311
- };
28312
- },
28313
- props: {
28314
- /**
28315
- * Enable/disable highlighting of the pointed value.
28316
- * @type {Boolean}
28317
- * @default true
28318
- */
28319
- showPointer: {
28320
- type: Boolean,
28321
- default: true
28322
- },
28323
- optionHeight: {
28324
- type: Number,
28325
- default: 40
28326
- }
28327
- },
28328
- computed: {
28329
- pointerPosition() {
28330
- return this.pointer * this.optionHeight;
28331
- },
28332
- visibleElements() {
28333
- return this.optimizedHeight / this.optionHeight;
28334
- }
28335
- },
28336
- watch: {
28337
- filteredOptions() {
28338
- this.pointerAdjust();
28339
- },
28340
- isOpen() {
28341
- this.pointerDirty = false;
28342
- },
28343
- pointer() {
28344
- this.$refs.search && this.$refs.search.setAttribute("aria-activedescendant", this.id + "-" + this.pointer.toString());
28345
- }
28346
- },
28347
- methods: {
28348
- optionHighlight(index2, option2) {
28349
- return {
28350
- "multiselect__option--highlight": index2 === this.pointer && this.showPointer,
28351
- "multiselect__option--selected": this.isSelected(option2)
28352
- };
28353
- },
28354
- groupHighlight(index2, selectedGroup) {
28355
- if (!this.groupSelect) {
28356
- return [
28357
- "multiselect__option--disabled",
28358
- { "multiselect__option--group": selectedGroup.$isLabel }
28359
- ];
28360
- }
28361
- const group = this.options.find((option2) => {
28362
- return option2[this.groupLabel] === selectedGroup.$groupLabel;
28363
- });
28364
- return group && !this.wholeGroupDisabled(group) ? [
28365
- "multiselect__option--group",
28366
- { "multiselect__option--highlight": index2 === this.pointer && this.showPointer },
28367
- { "multiselect__option--group-selected": this.wholeGroupSelected(group) }
28368
- ] : "multiselect__option--disabled";
28369
- },
28370
- addPointerElement({ key } = "Enter") {
28371
- if (this.filteredOptions.length > 0) {
28372
- this.select(this.filteredOptions[this.pointer], key);
28373
- }
28374
- this.pointerReset();
28375
- },
28376
- pointerForward() {
28377
- if (this.pointer < this.filteredOptions.length - 1) {
28378
- this.pointer++;
28379
- if (this.$refs.list.scrollTop <= this.pointerPosition - (this.visibleElements - 1) * this.optionHeight) {
28380
- this.$refs.list.scrollTop = this.pointerPosition - (this.visibleElements - 1) * this.optionHeight;
28381
- }
28382
- if (this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect)
28383
- this.pointerForward();
28384
- }
28385
- this.pointerDirty = true;
28386
- },
28387
- pointerBackward() {
28388
- if (this.pointer > 0) {
28389
- this.pointer--;
28390
- if (this.$refs.list.scrollTop >= this.pointerPosition) {
28391
- this.$refs.list.scrollTop = this.pointerPosition;
28392
- }
28393
- if (this.filteredOptions[this.pointer] && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect)
28394
- this.pointerBackward();
28395
- } else {
28396
- if (this.filteredOptions[this.pointer] && this.filteredOptions[0].$isLabel && !this.groupSelect)
28397
- this.pointerForward();
28398
- }
28399
- this.pointerDirty = true;
28400
- },
28401
- pointerReset() {
28402
- if (!this.closeOnSelect)
28403
- return;
28404
- this.pointer = 0;
28405
- if (this.$refs.list) {
28406
- this.$refs.list.scrollTop = 0;
28407
- }
28408
- },
28409
- pointerAdjust() {
28410
- if (this.pointer >= this.filteredOptions.length - 1) {
28411
- this.pointer = this.filteredOptions.length ? this.filteredOptions.length - 1 : 0;
28412
- }
28413
- if (this.filteredOptions.length > 0 && this.filteredOptions[this.pointer].$isLabel && !this.groupSelect) {
28414
- this.pointerForward();
28415
- }
28416
- },
28417
- pointerSet(index2) {
28418
- this.pointer = index2;
28419
- this.pointerDirty = true;
28420
- }
28421
- }
28422
- };
28423
- var script$e = {
28424
- name: "vue-multiselect",
28425
- mixins: [multiselectMixin, pointerMixin],
28426
- compatConfig: {
28427
- MODE: 3,
28428
- ATTR_ENUMERATED_COERCION: false
28429
- },
28430
- props: {
28431
- /**
28432
- * name attribute to match optional label element
28433
- * @default ''
28434
- * @type {String}
28435
- */
28436
- name: {
28437
- type: String,
28438
- default: ""
28439
- },
28440
- /**
28441
- * Presets the selected options value.
28442
- * @type {Object||Array||String||Integer}
28443
- */
28444
- modelValue: {
28445
- type: null,
28446
- default() {
28447
- return [];
28448
- }
28449
- },
28450
- /**
28451
- * String to show when pointing to an option
28452
- * @default 'Press enter to select'
28453
- * @type {String}
28454
- */
28455
- selectLabel: {
28456
- type: String,
28457
- default: "Press enter to select"
28458
- },
28459
- /**
28460
- * String to show when pointing to an option
28461
- * @default 'Press enter to select'
28462
- * @type {String}
28463
- */
28464
- selectGroupLabel: {
28465
- type: String,
28466
- default: "Press enter to select group"
28467
- },
28468
- /**
28469
- * String to show next to selected option
28470
- * @default 'Selected'
28471
- * @type {String}
28472
- */
28473
- selectedLabel: {
28474
- type: String,
28475
- default: "Selected"
28476
- },
28477
- /**
28478
- * String to show when pointing to an already selected option
28479
- * @default 'Press enter to remove'
28480
- * @type {String}
28481
- */
28482
- deselectLabel: {
28483
- type: String,
28484
- default: "Press enter to remove"
28485
- },
28486
- /**
28487
- * String to show when pointing to an already selected option
28488
- * @default 'Press enter to remove'
28489
- * @type {String}
28490
- */
28491
- deselectGroupLabel: {
28492
- type: String,
28493
- default: "Press enter to deselect group"
28494
- },
28495
- /**
28496
- * Decide whether to show pointer labels
28497
- * @default true
28498
- * @type {Boolean}
28499
- */
28500
- showLabels: {
28501
- type: Boolean,
28502
- default: true
28503
- },
28504
- /**
28505
- * Limit the display of selected options. The rest will be hidden within the limitText string.
28506
- * @default 99999
28507
- * @type {Integer}
28508
- */
28509
- limit: {
28510
- type: Number,
28511
- default: 99999
28512
- },
28513
- /**
28514
- * Sets maxHeight style value of the dropdown
28515
- * @default 300
28516
- * @type {Integer}
28517
- */
28518
- maxHeight: {
28519
- type: Number,
28520
- default: 300
28521
- },
28522
- /**
28523
- * Function that process the message shown when selected
28524
- * elements pass the defined limit.
28525
- * @default 'and * more'
28526
- * @param {Int} count Number of elements more than limit
28527
- * @type {Function}
28528
- */
28529
- limitText: {
28530
- type: Function,
28531
- default: (count2) => `and ${count2} more`
28532
- },
28533
- /**
28534
- * Set true to trigger the loading spinner.
28535
- * @default False
28536
- * @type {Boolean}
28537
- */
28538
- loading: {
28539
- type: Boolean,
28540
- default: false
28541
- },
28542
- /**
28543
- * Disables the multiselect if true.
28544
- * @default false
28545
- * @type {Boolean}
28546
- */
28547
- disabled: {
28548
- type: Boolean,
28549
- default: false
28550
- },
28551
- /**
28552
- * Fixed opening direction
28553
- * @default ''
28554
- * @type {String}
28555
- */
28556
- openDirection: {
28557
- type: String,
28558
- default: ""
28559
- },
28560
- /**
28561
- * Shows slot with message about empty options
28562
- * @default true
28563
- * @type {Boolean}
28564
- */
28565
- showNoOptions: {
28566
- type: Boolean,
28567
- default: true
28568
- },
28569
- showNoResults: {
28570
- type: Boolean,
28571
- default: true
28572
- },
28573
- tabindex: {
28574
- type: Number,
28575
- default: 0
28576
- }
28577
- },
28578
- computed: {
28579
- hasOptionGroup() {
28580
- return this.groupValues && this.groupLabel && this.groupSelect;
28581
- },
28582
- isSingleLabelVisible() {
28583
- return (this.singleValue || this.singleValue === 0) && (!this.isOpen || !this.searchable) && !this.visibleValues.length;
28584
- },
28585
- isPlaceholderVisible() {
28586
- return !this.internalValue.length && (!this.searchable || !this.isOpen);
28587
- },
28588
- visibleValues() {
28589
- return this.multiple ? this.internalValue.slice(0, this.limit) : [];
28590
- },
28591
- singleValue() {
28592
- return this.internalValue[0];
28593
- },
28594
- deselectLabelText() {
28595
- return this.showLabels ? this.deselectLabel : "";
28596
- },
28597
- deselectGroupLabelText() {
28598
- return this.showLabels ? this.deselectGroupLabel : "";
28599
- },
28600
- selectLabelText() {
28601
- return this.showLabels ? this.selectLabel : "";
28602
- },
28603
- selectGroupLabelText() {
28604
- return this.showLabels ? this.selectGroupLabel : "";
28605
- },
28606
- selectedLabelText() {
28607
- return this.showLabels ? this.selectedLabel : "";
28608
- },
28609
- inputStyle() {
28610
- if (this.searchable || this.multiple && this.modelValue && this.modelValue.length) {
28611
- return this.isOpen ? { width: "100%" } : { width: "0", position: "absolute", padding: "0" };
28612
- }
28613
- return "";
28614
- },
28615
- contentStyle() {
28616
- return this.options.length ? { display: "inline-block" } : { display: "block" };
28617
- },
28618
- isAbove() {
28619
- if (this.openDirection === "above" || this.openDirection === "top") {
28620
- return true;
28621
- } else if (this.openDirection === "below" || this.openDirection === "bottom") {
28622
- return false;
28623
- } else {
28624
- return this.preferredOpenDirection === "above";
28625
- }
28626
- },
28627
- showSearchInput() {
28628
- return this.searchable && (this.hasSingleSelectedSlot && (this.visibleSingleValue || this.visibleSingleValue === 0) ? this.isOpen : true);
28629
- }
28630
- }
28631
- };
28632
- const _hoisted_1$n = {
28633
- ref: "tags",
28634
- class: "multiselect__tags"
28635
- };
28636
- const _hoisted_2$i = { class: "multiselect__tags-wrap" };
28637
- const _hoisted_3$e = { class: "multiselect__spinner" };
28638
- const _hoisted_4$a = { key: 0 };
28639
- const _hoisted_5$9 = { class: "multiselect__option" };
28640
- const _hoisted_6$5 = { class: "multiselect__option" };
28641
- const _hoisted_7$2 = /* @__PURE__ */ vue.createTextVNode("No elements found. Consider changing the search query.");
28642
- const _hoisted_8$1 = { class: "multiselect__option" };
28643
- const _hoisted_9$1 = /* @__PURE__ */ vue.createTextVNode("List is empty.");
28644
- function render$e(_ctx, _cache, $props, $setup, $data, $options) {
28645
- return vue.openBlock(), vue.createBlock("div", {
28646
- tabindex: _ctx.searchable ? -1 : $props.tabindex,
28647
- class: [{ "multiselect--active": _ctx.isOpen, "multiselect--disabled": $props.disabled, "multiselect--above": $options.isAbove, "multiselect--has-options-group": $options.hasOptionGroup }, "multiselect"],
28648
- onFocus: _cache[14] || (_cache[14] = ($event) => _ctx.activate()),
28649
- onBlur: _cache[15] || (_cache[15] = ($event) => _ctx.searchable ? false : _ctx.deactivate()),
28650
- onKeydown: [
28651
- _cache[16] || (_cache[16] = vue.withKeys(vue.withModifiers(($event) => _ctx.pointerForward(), ["self", "prevent"]), ["down"])),
28652
- _cache[17] || (_cache[17] = vue.withKeys(vue.withModifiers(($event) => _ctx.pointerBackward(), ["self", "prevent"]), ["up"]))
28653
- ],
28654
- onKeypress: _cache[18] || (_cache[18] = vue.withKeys(vue.withModifiers(($event) => _ctx.addPointerElement($event), ["stop", "self"]), ["enter", "tab"])),
28655
- onKeyup: _cache[19] || (_cache[19] = vue.withKeys(($event) => _ctx.deactivate(), ["esc"])),
28656
- role: "combobox",
28657
- "aria-owns": "listbox-" + _ctx.id
28658
- }, [
28659
- vue.renderSlot(_ctx.$slots, "caret", { toggle: _ctx.toggle }, () => [
28660
- vue.createVNode(
28661
- "div",
28662
- {
28663
- onMousedown: _cache[1] || (_cache[1] = vue.withModifiers(($event) => _ctx.toggle(), ["prevent", "stop"])),
28664
- class: "multiselect__select"
28665
- },
28666
- null,
28667
- 32
28668
- /* HYDRATE_EVENTS */
28669
- )
28670
- ]),
28671
- vue.renderSlot(_ctx.$slots, "clear", { search: _ctx.search }),
28672
- vue.createVNode(
28673
- "div",
28674
- _hoisted_1$n,
28675
- [
28676
- vue.renderSlot(_ctx.$slots, "selection", {
28677
- search: _ctx.search,
28678
- remove: _ctx.removeElement,
28679
- values: $options.visibleValues,
28680
- isOpen: _ctx.isOpen
28681
- }, () => [
28682
- vue.withDirectives(vue.createVNode(
28683
- "div",
28684
- _hoisted_2$i,
28685
- [
28686
- (vue.openBlock(true), vue.createBlock(
28687
- vue.Fragment,
28688
- null,
28689
- vue.renderList($options.visibleValues, (option2, index2) => {
28690
- return vue.renderSlot(_ctx.$slots, "tag", {
28691
- option: option2,
28692
- search: _ctx.search,
28693
- remove: _ctx.removeElement
28694
- }, () => [
28695
- (vue.openBlock(), vue.createBlock("span", {
28696
- class: "multiselect__tag",
28697
- key: index2
28698
- }, [
28699
- vue.createVNode("span", {
28700
- textContent: vue.toDisplayString(_ctx.getOptionLabel(option2))
28701
- }, null, 8, ["textContent"]),
28702
- vue.createVNode("i", {
28703
- tabindex: "1",
28704
- onKeypress: vue.withKeys(vue.withModifiers(($event) => _ctx.removeElement(option2), ["prevent"]), ["enter"]),
28705
- onMousedown: vue.withModifiers(($event) => _ctx.removeElement(option2), ["prevent"]),
28706
- class: "multiselect__tag-icon"
28707
- }, null, 40, ["onKeypress", "onMousedown"])
28708
- ]))
28709
- ]);
28710
- }),
28711
- 256
28712
- /* UNKEYED_FRAGMENT */
28713
- ))
28714
- ],
28715
- 512
28716
- /* NEED_PATCH */
28717
- ), [
28718
- [vue.vShow, $options.visibleValues.length > 0]
28719
- ]),
28720
- _ctx.internalValue && _ctx.internalValue.length > $props.limit ? vue.renderSlot(_ctx.$slots, "limit", { key: 0 }, () => [
28721
- vue.createVNode("strong", {
28722
- class: "multiselect__strong",
28723
- textContent: vue.toDisplayString($props.limitText(_ctx.internalValue.length - $props.limit))
28724
- }, null, 8, ["textContent"])
28725
- ]) : vue.createCommentVNode("v-if", true)
28726
- ]),
28727
- vue.createVNode(vue.Transition, { name: "multiselect__loading" }, {
28728
- default: vue.withCtx(() => [
28729
- vue.renderSlot(_ctx.$slots, "loading", {}, () => [
28730
- vue.withDirectives(vue.createVNode(
28731
- "div",
28732
- _hoisted_3$e,
28733
- null,
28734
- 512
28735
- /* NEED_PATCH */
28736
- ), [
28737
- [vue.vShow, $props.loading]
28738
- ])
28739
- ])
28740
- ]),
28741
- _: 3
28742
- /* FORWARDED */
28743
- }),
28744
- _ctx.searchable ? (vue.openBlock(), vue.createBlock("input", {
28745
- key: 0,
28746
- ref: "search",
28747
- name: $props.name,
28748
- id: _ctx.id,
28749
- type: "text",
28750
- autocomplete: "off",
28751
- spellcheck: false,
28752
- placeholder: _ctx.placeholder,
28753
- style: $options.inputStyle,
28754
- value: _ctx.search,
28755
- disabled: $props.disabled,
28756
- tabindex: $props.tabindex,
28757
- onInput: _cache[2] || (_cache[2] = ($event) => _ctx.updateSearch($event.target.value)),
28758
- onFocus: _cache[3] || (_cache[3] = vue.withModifiers(($event) => _ctx.activate(), ["prevent"])),
28759
- onBlur: _cache[4] || (_cache[4] = vue.withModifiers(($event) => _ctx.deactivate(), ["prevent"])),
28760
- onKeyup: _cache[5] || (_cache[5] = vue.withKeys(($event) => _ctx.deactivate(), ["esc"])),
28761
- onKeydown: [
28762
- _cache[6] || (_cache[6] = vue.withKeys(vue.withModifiers(($event) => _ctx.pointerForward(), ["prevent"]), ["down"])),
28763
- _cache[7] || (_cache[7] = vue.withKeys(vue.withModifiers(($event) => _ctx.pointerBackward(), ["prevent"]), ["up"])),
28764
- _cache[9] || (_cache[9] = vue.withKeys(vue.withModifiers(($event) => _ctx.removeLastElement(), ["stop"]), ["delete"]))
28765
- ],
28766
- onKeypress: _cache[8] || (_cache[8] = vue.withKeys(vue.withModifiers(($event) => _ctx.addPointerElement($event), ["prevent", "stop", "self"]), ["enter"])),
28767
- class: "multiselect__input",
28768
- "aria-controls": "listbox-" + _ctx.id
28769
- }, null, 44, ["name", "id", "placeholder", "value", "disabled", "tabindex", "aria-controls"])) : vue.createCommentVNode("v-if", true),
28770
- $options.isSingleLabelVisible ? (vue.openBlock(), vue.createBlock(
28771
- "span",
28772
- {
28773
- key: 1,
28774
- class: "multiselect__single",
28775
- onMousedown: _cache[10] || (_cache[10] = vue.withModifiers((...args) => _ctx.toggle && _ctx.toggle(...args), ["prevent"]))
28776
- },
28777
- [
28778
- vue.renderSlot(_ctx.$slots, "singleLabel", { option: $options.singleValue }, () => [
28779
- vue.createTextVNode(
28780
- vue.toDisplayString(_ctx.currentOptionLabel),
28781
- 1
28782
- /* TEXT */
28783
- )
28784
- ])
28785
- ],
28786
- 32
28787
- /* HYDRATE_EVENTS */
28788
- )) : vue.createCommentVNode("v-if", true),
28789
- $options.isPlaceholderVisible ? (vue.openBlock(), vue.createBlock(
28790
- "span",
28791
- {
28792
- key: 2,
28793
- class: "multiselect__placeholder",
28794
- onMousedown: _cache[11] || (_cache[11] = vue.withModifiers((...args) => _ctx.toggle && _ctx.toggle(...args), ["prevent"]))
28795
- },
28796
- [
28797
- vue.renderSlot(_ctx.$slots, "placeholder", {}, () => [
28798
- vue.createTextVNode(
28799
- vue.toDisplayString(_ctx.placeholder),
28800
- 1
28801
- /* TEXT */
28802
- )
28803
- ])
28804
- ],
28805
- 32
28806
- /* HYDRATE_EVENTS */
28807
- )) : vue.createCommentVNode("v-if", true)
28808
- ],
28809
- 512
28810
- /* NEED_PATCH */
28811
- ),
28812
- vue.createVNode(vue.Transition, { name: "multiselect" }, {
28813
- default: vue.withCtx(() => [
28814
- vue.withDirectives(vue.createVNode(
28815
- "div",
28816
- {
28817
- class: "multiselect__content-wrapper",
28818
- onFocus: _cache[12] || (_cache[12] = (...args) => _ctx.activate && _ctx.activate(...args)),
28819
- tabindex: "-1",
28820
- onMousedown: _cache[13] || (_cache[13] = vue.withModifiers(() => {
28821
- }, ["prevent"])),
28822
- style: { maxHeight: _ctx.optimizedHeight + "px" },
28823
- ref: "list"
28824
- },
28825
- [
28826
- vue.createVNode("ul", {
28827
- class: "multiselect__content",
28828
- style: $options.contentStyle,
28829
- role: "listbox",
28830
- id: "listbox-" + _ctx.id
28831
- }, [
28832
- vue.renderSlot(_ctx.$slots, "beforeList"),
28833
- _ctx.multiple && _ctx.max === _ctx.internalValue.length ? (vue.openBlock(), vue.createBlock("li", _hoisted_4$a, [
28834
- vue.createVNode("span", _hoisted_5$9, [
28835
- vue.renderSlot(_ctx.$slots, "maxElements", {}, () => [
28836
- vue.createTextVNode(
28837
- "Maximum of " + vue.toDisplayString(_ctx.max) + " options selected. First remove a selected option to select another.",
28838
- 1
28839
- /* TEXT */
28840
- )
28841
- ])
28842
- ])
28843
- ])) : vue.createCommentVNode("v-if", true),
28844
- !_ctx.max || _ctx.internalValue.length < _ctx.max ? (vue.openBlock(true), vue.createBlock(
28845
- vue.Fragment,
28846
- { key: 1 },
28847
- vue.renderList(_ctx.filteredOptions, (option2, index2) => {
28848
- return vue.openBlock(), vue.createBlock("li", {
28849
- class: "multiselect__element",
28850
- key: index2,
28851
- id: _ctx.id + "-" + index2,
28852
- role: !(option2 && (option2.$isLabel || option2.$isDisabled)) ? "option" : null
28853
- }, [
28854
- !(option2 && (option2.$isLabel || option2.$isDisabled)) ? (vue.openBlock(), vue.createBlock("span", {
28855
- key: 0,
28856
- class: [_ctx.optionHighlight(index2, option2), "multiselect__option"],
28857
- onClick: vue.withModifiers(($event) => _ctx.select(option2), ["stop"]),
28858
- onMouseenter: vue.withModifiers(($event) => _ctx.pointerSet(index2), ["self"]),
28859
- "data-select": option2 && option2.isTag ? _ctx.tagPlaceholder : $options.selectLabelText,
28860
- "data-selected": $options.selectedLabelText,
28861
- "data-deselect": $options.deselectLabelText
28862
- }, [
28863
- vue.renderSlot(_ctx.$slots, "option", {
28864
- option: option2,
28865
- search: _ctx.search,
28866
- index: index2
28867
- }, () => [
28868
- vue.createVNode(
28869
- "span",
28870
- null,
28871
- vue.toDisplayString(_ctx.getOptionLabel(option2)),
28872
- 1
28873
- /* TEXT */
28874
- )
28875
- ])
28876
- ], 42, ["onClick", "onMouseenter", "data-select", "data-selected", "data-deselect"])) : vue.createCommentVNode("v-if", true),
28877
- option2 && (option2.$isLabel || option2.$isDisabled) ? (vue.openBlock(), vue.createBlock("span", {
28878
- key: 1,
28879
- "data-select": _ctx.groupSelect && $options.selectGroupLabelText,
28880
- "data-deselect": _ctx.groupSelect && $options.deselectGroupLabelText,
28881
- class: [_ctx.groupHighlight(index2, option2), "multiselect__option"],
28882
- onMouseenter: vue.withModifiers(($event) => _ctx.groupSelect && _ctx.pointerSet(index2), ["self"]),
28883
- onMousedown: vue.withModifiers(($event) => _ctx.selectGroup(option2), ["prevent"])
28884
- }, [
28885
- vue.renderSlot(_ctx.$slots, "option", {
28886
- option: option2,
28887
- search: _ctx.search,
28888
- index: index2
28889
- }, () => [
28890
- vue.createVNode(
28891
- "span",
28892
- null,
28893
- vue.toDisplayString(_ctx.getOptionLabel(option2)),
28894
- 1
28895
- /* TEXT */
28896
- )
28897
- ])
28898
- ], 42, ["data-select", "data-deselect", "onMouseenter", "onMousedown"])) : vue.createCommentVNode("v-if", true)
28899
- ], 8, ["id", "role"]);
28900
- }),
28901
- 128
28902
- /* KEYED_FRAGMENT */
28903
- )) : vue.createCommentVNode("v-if", true),
28904
- vue.withDirectives(vue.createVNode(
28905
- "li",
28906
- null,
28907
- [
28908
- vue.createVNode("span", _hoisted_6$5, [
28909
- vue.renderSlot(_ctx.$slots, "noResult", { search: _ctx.search }, () => [
28910
- _hoisted_7$2
28911
- ])
28912
- ])
28913
- ],
28914
- 512
28915
- /* NEED_PATCH */
28916
- ), [
28917
- [vue.vShow, $props.showNoResults && (_ctx.filteredOptions.length === 0 && _ctx.search && !$props.loading)]
28918
- ]),
28919
- vue.withDirectives(vue.createVNode(
28920
- "li",
28921
- null,
28922
- [
28923
- vue.createVNode("span", _hoisted_8$1, [
28924
- vue.renderSlot(_ctx.$slots, "noOptions", {}, () => [
28925
- _hoisted_9$1
28926
- ])
28927
- ])
28928
- ],
28929
- 512
28930
- /* NEED_PATCH */
28931
- ), [
28932
- [vue.vShow, $props.showNoOptions && ((_ctx.options.length === 0 || $options.hasOptionGroup === true && _ctx.filteredOptions.length === 0) && !_ctx.search && !$props.loading)]
28933
- ]),
28934
- vue.renderSlot(_ctx.$slots, "afterList")
28935
- ], 12, ["id"])
28936
- ],
28937
- 36
28938
- /* STYLE, HYDRATE_EVENTS */
28939
- ), [
28940
- [vue.vShow, _ctx.isOpen]
28941
- ])
28942
- ]),
28943
- _: 3
28944
- /* FORWARDED */
28945
- })
28946
- ], 42, ["tabindex", "aria-owns"]);
28947
- }
28948
- script$e.render = render$e;
28949
- const Multiselect = script$e;
28950
- const _hoisted_1$m = ["for"];
28951
- const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
27426
+ const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-1fc4f739"]]);
27427
+ const _hoisted_1$m = ["disabled"];
27428
+ const _hoisted_2$i = ["onClick"];
27429
+ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
28952
27430
  __name: "SelectInput",
28953
27431
  props: {
27432
+ options: {},
27433
+ placeholder: {},
27434
+ disabled: { type: Boolean },
27435
+ modelValue: {},
27436
+ searchable: { type: Boolean },
28954
27437
  required: { type: Boolean },
28955
27438
  label: {},
28956
- id: {},
28957
- modelValue: {},
28958
- placeholder: {},
28959
- defaultValue: {},
28960
- options: {},
28961
- extraProps: {}
27439
+ fullWidth: { type: Boolean }
28962
27440
  },
28963
27441
  emits: ["update:modelValue"],
28964
27442
  setup(__props, { emit: __emit }) {
27443
+ let open = vue.ref(false);
27444
+ const searchInput = vue.ref(null);
28965
27445
  const props2 = __props;
28966
- let dataValue = vue.ref(props2.modelValue || props2.defaultValue);
28967
- const multiselect = vue.ref();
27446
+ let selectedItem = vue.ref();
27447
+ let search = vue.ref("");
27448
+ const toggle = () => {
27449
+ open.value = !open.value;
27450
+ if (!open.value)
27451
+ search.value = "";
27452
+ if (open.value)
27453
+ setTimeout(() => {
27454
+ var _a2, _b, _c;
27455
+ return (_c = (_b = (_a2 = searchInput.value) == null ? void 0 : _a2.$el) == null ? void 0 : _b.querySelector("input")) == null ? void 0 : _c.focus();
27456
+ }, 100);
27457
+ };
27458
+ const valueToLabel = (value) => {
27459
+ if (!value)
27460
+ return "";
27461
+ const option2 = props2.options.find((option22) => {
27462
+ if (typeof option22 === "string" || typeof option22 === "number")
27463
+ return option22 === value;
27464
+ return option22.value === value;
27465
+ });
27466
+ if (!option2)
27467
+ return value;
27468
+ return getLabel(option2);
27469
+ };
28968
27470
  const emit2 = __emit;
28969
- const optionList = vue.ref([]);
28970
- const seletValue = vue.computed({
28971
- get: () => optionList.value.find((opt) => opt.value === dataValue.value),
28972
- set: (val) => {
28973
- dataValue.value = val == null ? void 0 : val.value;
28974
- emit2("update:modelValue", dataValue.value);
28975
- }
28976
- });
28977
- function optnToValueLabel(option2) {
28978
- if (typeof option2 === "string" || typeof option2 === "number") {
28979
- return { label: `${option2}`, value: option2 };
28980
- }
28981
- return option2;
28982
- }
28983
- function updateOptionList() {
28984
- const { options } = props2;
28985
- const optnLst = typeof options === "string" ? options.split("\n|,") : options || [];
28986
- optionList.value.push(...optnLst.map(optnToValueLabel));
28987
- }
28988
- vue.watch(() => props2.options, updateOptionList, { immediate: true });
27471
+ const getLabel = (option2) => {
27472
+ if (typeof option2 === "string")
27473
+ return option2;
27474
+ if (typeof option2 === "number")
27475
+ return `${option2}`;
27476
+ return option2.label;
27477
+ };
27478
+ const isSelected = (option2) => {
27479
+ if (typeof option2 === "string" || typeof option2 === "number")
27480
+ return option2 === selectedItem.value;
27481
+ return option2.value === selectedItem.value;
27482
+ };
27483
+ const filteredOptions = vue.computed(() => props2.options.filter((option2) => {
27484
+ const searchTerm = new RegExp(search.value, "gi");
27485
+ if (typeof option2 === "string")
27486
+ return option2.match(searchTerm);
27487
+ if (typeof option2 === "number")
27488
+ return `${option2}`.match(searchTerm);
27489
+ return option2.label.match(searchTerm);
27490
+ }));
27491
+ const select2 = (option2) => {
27492
+ if (typeof option2 === "string")
27493
+ selectedItem.value = option2;
27494
+ else if (typeof option2 === "number")
27495
+ selectedItem.value = option2;
27496
+ else
27497
+ selectedItem.value = option2.value;
27498
+ emit2("update:modelValue", selectedItem.value);
27499
+ open.value = false;
27500
+ };
27501
+ vue.watch(() => props2.modelValue, (value) => {
27502
+ if (value !== selectedItem.value)
27503
+ selectedItem.value = value;
27504
+ }, { immediate: true });
28989
27505
  return (_ctx, _cache) => {
28990
- return vue.openBlock(), vue.createElementBlock("div", null, [
28991
- vue.createElementVNode("label", {
28992
- class: "txt-start",
28993
- for: _ctx.id
28994
- }, [
28995
- vue.createTextVNode(vue.toDisplayString(_ctx.label) + " ", 1),
28996
- vue.createVNode(vue.unref(Multiselect), vue.mergeProps({
28997
- ref_key: "multiselect",
28998
- ref: multiselect,
28999
- id: _ctx.id,
29000
- label: "label",
29001
- trackBy: "value",
29002
- options: optionList.value,
29003
- required: _ctx.required,
29004
- placeholder: _ctx.placeholder,
29005
- modelValue: seletValue.value,
29006
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seletValue.value = $event),
29007
- "close-on-select": true
29008
- }, _ctx.extraProps), null, 16, ["id", "options", "required", "placeholder", "modelValue"])
29009
- ], 8, _hoisted_1$m)
29010
- ]);
27506
+ return vue.openBlock(), vue.createBlock(vue.unref(kt$1), {
27507
+ placement: "bottom-start",
27508
+ class: "bagel-input selectinput"
27509
+ }, {
27510
+ popper: vue.withCtx(({ hide }) => [
27511
+ vue.createVNode(vue.unref(_sfc_main$t), {
27512
+ class: "selectinput-options p-05",
27513
+ style: vue.normalizeStyle({ width: _ctx.fullWidth ? "100%" : "auto" })
27514
+ }, {
27515
+ default: vue.withCtx(() => [
27516
+ _ctx.searchable ? (vue.openBlock(), vue.createBlock(vue.unref(TextInput), {
27517
+ key: 0,
27518
+ ref_key: "searchInput",
27519
+ ref: searchInput,
27520
+ dense: "",
27521
+ placeholder: "Search",
27522
+ icon: "search",
27523
+ modelValue: vue.unref(search),
27524
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vue.isRef(search) ? search.value = $event : search = $event)
27525
+ }, null, 8, ["modelValue"])) : vue.createCommentVNode("", true),
27526
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filteredOptions.value, (option2, i2) => {
27527
+ return vue.openBlock(), vue.createElementBlock("div", {
27528
+ class: vue.normalizeClass(["selectinput-option hover gap-1", { selected: option2 === vue.unref(selectedItem) }]),
27529
+ key: `${option2}${i2}`,
27530
+ onClick: () => {
27531
+ select2(option2);
27532
+ hide();
27533
+ }
27534
+ }, [
27535
+ isSelected(option2) ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$H), {
27536
+ key: 0,
27537
+ icon: "check"
27538
+ })) : vue.createCommentVNode("", true),
27539
+ !isSelected(option2) ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$H), {
27540
+ key: 1,
27541
+ class: "opacity-3",
27542
+ icon: "fiber_manual_record"
27543
+ })) : vue.createCommentVNode("", true),
27544
+ vue.createElementVNode("span", null, vue.toDisplayString(getLabel(option2)), 1)
27545
+ ], 10, _hoisted_2$i);
27546
+ }), 128)),
27547
+ vue.renderSlot(_ctx.$slots, "last", {}, void 0, true)
27548
+ ]),
27549
+ _: 2
27550
+ }, 1032, ["style"])
27551
+ ]),
27552
+ default: vue.withCtx(() => [
27553
+ vue.createElementVNode("label", null, [
27554
+ vue.createTextVNode(vue.toDisplayString(_ctx.label) + " ", 1),
27555
+ vue.createElementVNode("button", {
27556
+ disabled: _ctx.disabled,
27557
+ type: "button",
27558
+ class: "selectinput-btn",
27559
+ onClick: toggle
27560
+ }, [
27561
+ vue.createTextVNode(vue.toDisplayString(valueToLabel(vue.unref(selectedItem)) || _ctx.placeholder || "Select") + " ", 1),
27562
+ vue.createVNode(vue.unref(_sfc_main$H), vue.normalizeProps(vue.guardReactiveProps({ "icon": vue.unref(open) ? "unfold_less" : "unfold_more" })), null, 16)
27563
+ ], 8, _hoisted_1$m),
27564
+ _ctx.required ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
27565
+ key: 0,
27566
+ style: { "width": "0", "height": "0", "position": "absolute", "opacity": "0", "z-index": "-1" },
27567
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(selectedItem) ? selectedItem.value = $event : selectedItem = $event),
27568
+ required: ""
27569
+ }, null, 512)), [
27570
+ [vue.vModelText, vue.unref(selectedItem)]
27571
+ ]) : vue.createCommentVNode("", true)
27572
+ ])
27573
+ ]),
27574
+ _: 3
27575
+ });
29011
27576
  };
29012
27577
  }
29013
27578
  });
27579
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-8845266b"]]);
29014
27580
  const _hoisted_1$l = ["title"];
29015
27581
  const _hoisted_2$h = { key: 0 };
29016
- const _hoisted_3$d = ["value", "placeholder"];
29017
- const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
27582
+ const _hoisted_3$e = ["value", "placeholder"];
27583
+ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
29018
27584
  __name: "RichTextEditor",
29019
27585
  props: {
29020
27586
  description: { default: "" },
@@ -29045,12 +27611,12 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
29045
27611
  onInput: handleInput,
29046
27612
  placeholder: _ctx.placeholder,
29047
27613
  class: vue.normalizeClass({ "no-edit": !_ctx.editMode })
29048
- }, null, 42, _hoisted_3$d)
27614
+ }, null, 42, _hoisted_3$e)
29049
27615
  ], 10, _hoisted_1$l);
29050
27616
  };
29051
27617
  }
29052
27618
  });
29053
- const RichTextEditor = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-69a60381"]]);
27619
+ const RichTextEditor = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-69a60381"]]);
29054
27620
  /*!
29055
27621
  * vue-draggable-next v2.2.0
29056
27622
  * (c) 2023 Anish George
@@ -29222,13 +27788,13 @@ function closest(el, selector2, ctx, includeCTX) {
29222
27788
  return null;
29223
27789
  }
29224
27790
  var R_SPACE = /\s+/g;
29225
- function toggleClass(el, name, state) {
27791
+ function toggleClass(el, name, state2) {
29226
27792
  if (el && name) {
29227
27793
  if (el.classList) {
29228
- el.classList[state ? "add" : "remove"](name);
27794
+ el.classList[state2 ? "add" : "remove"](name);
29229
27795
  } else {
29230
27796
  var className = (" " + el.className + " ").replace(R_SPACE, " ").replace(" " + name + " ", " ");
29231
- el.className = (className + (state ? " " + name : "")).replace(R_SPACE, " ");
27797
+ el.className = (className + (state2 ? " " + name : "")).replace(R_SPACE, " ");
29232
27798
  }
29233
27799
  }
29234
27800
  }
@@ -29505,8 +28071,8 @@ function AnimationStateManager() {
29505
28071
  child.fromRect = fromRect;
29506
28072
  });
29507
28073
  },
29508
- addAnimationState: function addAnimationState(state) {
29509
- animationStates.push(state);
28074
+ addAnimationState: function addAnimationState(state2) {
28075
+ animationStates.push(state2);
29510
28076
  },
29511
28077
  removeAnimationState: function removeAnimationState(target) {
29512
28078
  animationStates.splice(indexOfObject(animationStates, {
@@ -29522,8 +28088,8 @@ function AnimationStateManager() {
29522
28088
  return;
29523
28089
  }
29524
28090
  var animating = false, animationTime = 0;
29525
- animationStates.forEach(function(state) {
29526
- var time = 0, target = state.target, fromRect = target.fromRect, toRect = getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state.rect, targetMatrix = matrix(target, true);
28091
+ animationStates.forEach(function(state2) {
28092
+ var time = 0, target = state2.target, fromRect = target.fromRect, toRect = getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state2.rect, targetMatrix = matrix(target, true);
29527
28093
  if (targetMatrix) {
29528
28094
  toRect.top -= targetMatrix.f;
29529
28095
  toRect.left -= targetMatrix.e;
@@ -31575,11 +30141,11 @@ const VueDraggableNext = vue.defineComponent({
31575
30141
  });
31576
30142
  const _hoisted_1$k = ["title"];
31577
30143
  const _hoisted_2$g = { class: "bagel-input" };
31578
- const _hoisted_3$c = { class: "table-side-scroll" };
30144
+ const _hoisted_3$d = { class: "table-side-scroll" };
31579
30145
  const _hoisted_4$9 = { class: "table-header" };
31580
30146
  const _hoisted_5$8 = { class: "table-reorder" };
31581
30147
  const _hoisted_6$4 = { class: "table-action" };
31582
- const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
30148
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
31583
30149
  __name: "TableField",
31584
30150
  props: {
31585
30151
  description: { default: "" },
@@ -31647,7 +30213,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
31647
30213
  vue.createElementVNode("div", _hoisted_2$g, [
31648
30214
  vue.createElementVNode("label", null, vue.toDisplayString((_a2 = vue.unref(fieldMeta)) == null ? void 0 : _a2.label), 1)
31649
30215
  ]),
31650
- vue.createElementVNode("div", _hoisted_3$c, [
30216
+ vue.createElementVNode("div", _hoisted_3$d, [
31651
30217
  vue.createElementVNode("div", _hoisted_4$9, [
31652
30218
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_b = vue.unref(entityMeta)) == null ? void 0 : _b.fields, (field) => {
31653
30219
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -31676,7 +30242,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
31676
30242
  key: row.id
31677
30243
  }, [
31678
30244
  vue.createElementVNode("div", _hoisted_5$8, [
31679
- vue.createVNode(vue.unref(_sfc_main$F), { icon: "more_vert" })
30245
+ vue.createVNode(vue.unref(_sfc_main$H), { icon: "more_vert" })
31680
30246
  ]),
31681
30247
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList((_a3 = vue.unref(entityMeta)) == null ? void 0 : _a3.fields, (field) => {
31682
30248
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -31693,7 +30259,7 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
31693
30259
  ], 2);
31694
30260
  }), 128)),
31695
30261
  vue.createElementVNode("div", _hoisted_6$4, [
31696
- vue.createVNode(vue.unref(_sfc_main$F), {
30262
+ vue.createVNode(vue.unref(_sfc_main$H), {
31697
30263
  icon: "delete",
31698
30264
  onClick: ($event) => removeRow(index2)
31699
30265
  }, null, 8, ["onClick"])
@@ -31723,13 +30289,13 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
31723
30289
  };
31724
30290
  }
31725
30291
  });
31726
- const TableField = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-cdacf10e"]]);
30292
+ const TableField = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-cdacf10e"]]);
31727
30293
  const _hoisted_1$j = ["title"];
31728
30294
  const _hoisted_2$f = ["for"];
31729
- const _hoisted_3$b = ["title", "autocomplete", "id", "type", "placeholder", "disabled", "required", "pattern"];
30295
+ const _hoisted_3$c = ["title", "autocomplete", "id", "type", "placeholder", "disabled", "required", "pattern"];
31730
30296
  const _hoisted_4$8 = ["title", "id", "type", "rows", "placeholder", "disabled", "required", "pattern"];
31731
30297
  const _hoisted_5$7 = { key: 2 };
31732
- const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
30298
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
31733
30299
  __name: "TextInput",
31734
30300
  props: {
31735
30301
  id: {},
@@ -31843,7 +30409,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
31843
30409
  disabled: !vue.unref(editMode),
31844
30410
  required: _ctx.required,
31845
30411
  pattern: _ctx.pattern
31846
- }, _ctx.nativeInputAttrs, { onDblclick: toggleEditAction }), null, 16, _hoisted_3$b)), [
30412
+ }, _ctx.nativeInputAttrs, { onDblclick: toggleEditAction }), null, 16, _hoisted_3$c)), [
31847
30413
  [vue.vModelDynamic, vue.unref(inputVal)]
31848
30414
  ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", vue.mergeProps({
31849
30415
  key: 1,
@@ -31863,12 +30429,12 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
31863
30429
  ]),
31864
30430
  _ctx.helptext ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_5$7, vue.toDisplayString(_ctx.helptext), 1)) : vue.createCommentVNode("", true)
31865
30431
  ], 8, _hoisted_2$f),
31866
- _ctx.iconStart ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$F), {
30432
+ _ctx.iconStart ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$H), {
31867
30433
  key: 0,
31868
30434
  class: "iconStart",
31869
30435
  icon: _ctx.iconStart
31870
30436
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
31871
- _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$F), {
30437
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$H), {
31872
30438
  key: 1,
31873
30439
  icon: _ctx.icon
31874
30440
  }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
@@ -31884,9 +30450,9 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
31884
30450
  };
31885
30451
  }
31886
30452
  });
31887
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-25f868b2"]]);
30453
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-cd4c27ad"]]);
31888
30454
  const _hoisted_1$i = { class: "primary-checkbox" };
31889
- const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
30455
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
31890
30456
  __name: "Checkbox",
31891
30457
  props: {
31892
30458
  "modelValue": {
@@ -31907,16 +30473,16 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
31907
30473
  [vue.vModelCheckbox, val.value]
31908
30474
  ]),
31909
30475
  vue.createElementVNode("span", null, [
31910
- vue.createVNode(vue.unref(_sfc_main$F), { icon: "check" })
30476
+ vue.createVNode(vue.unref(_sfc_main$H), { icon: "check" })
31911
30477
  ])
31912
30478
  ]);
31913
30479
  };
31914
30480
  }
31915
30481
  });
31916
- const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-e4cbb088"]]);
30482
+ const Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-e4cbb088"]]);
31917
30483
  const _hoisted_1$h = ["title"];
31918
30484
  const _hoisted_2$e = ["id", "placeholder", "required"];
31919
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
30485
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
31920
30486
  __name: "ColorPicker",
31921
30487
  props: {
31922
30488
  label: {},
@@ -31962,13 +30528,13 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
31962
30528
  });
31963
30529
  const _hoisted_1$g = { class: "datetime-wrap" };
31964
30530
  const _hoisted_2$d = { class: "date-wrap" };
31965
- const _hoisted_3$a = {
30531
+ const _hoisted_3$b = {
31966
30532
  key: 0,
31967
30533
  class: "time-wrap"
31968
30534
  };
31969
30535
  const _hoisted_4$7 = ["id", "name", "value"];
31970
30536
  const _hoisted_5$6 = ["for"];
31971
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
30537
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
31972
30538
  __name: "DatePicker",
31973
30539
  props: {
31974
30540
  name: {},
@@ -32000,7 +30566,7 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
32000
30566
  _: 1
32001
30567
  }, 16, ["modelValue"])
32002
30568
  ]),
32003
- _ctx.showTimeWrap ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$a, [
30569
+ _ctx.showTimeWrap ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$b, [
32004
30570
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(hours), (hr2) => {
32005
30571
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: hr2 }, [
32006
30572
  vue.withDirectives(vue.createElementVNode("input", {
@@ -32024,10 +30590,10 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
32024
30590
  });
32025
30591
  const _hoisted_1$f = { class: "bagel-input" };
32026
30592
  const _hoisted_2$c = { class: "pb-025" };
32027
- const _hoisted_3$9 = { class: "flex gap-05 flex-wrap" };
30593
+ const _hoisted_3$a = { class: "flex gap-05 flex-wrap" };
32028
30594
  const _hoisted_4$6 = ["id", "name", "value", "checked"];
32029
30595
  const _hoisted_5$5 = ["for"];
32030
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
30596
+ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
32031
30597
  __name: "RadioPillsInput",
32032
30598
  props: {
32033
30599
  options: {},
@@ -32068,7 +30634,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
32068
30634
  return (_ctx, _cache) => {
32069
30635
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
32070
30636
  vue.createElementVNode("label", _hoisted_2$c, vue.toDisplayString(_ctx.label), 1),
32071
- vue.createElementVNode("div", _hoisted_3$9, [
30637
+ vue.createElementVNode("div", _hoisted_3$a, [
32072
30638
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(cumputedOptions.value, ({ optioId, label, value }, index2) => {
32073
30639
  return vue.openBlock(), vue.createElementBlock("div", {
32074
30640
  class: "radio-pill",
@@ -32090,13 +30656,13 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
32090
30656
  };
32091
30657
  }
32092
30658
  });
32093
- const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-e47ae8b5"]]);
30659
+ const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-e47ae8b5"]]);
32094
30660
  const _hoisted_1$e = { class: "bagel-input" };
32095
30661
  const _hoisted_2$b = {
32096
30662
  key: 0,
32097
30663
  class: "imagePreviewWrap"
32098
30664
  };
32099
- const _hoisted_3$8 = ["src"];
30665
+ const _hoisted_3$9 = ["src"];
32100
30666
  const _hoisted_4$5 = { class: "previewName" };
32101
30667
  const _hoisted_5$4 = ["src"];
32102
30668
  const _hoisted_6$3 = { class: "no-margin" };
@@ -32112,7 +30678,7 @@ const _hoisted_12 = {
32112
30678
  key: 0,
32113
30679
  class: "progress"
32114
30680
  };
32115
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
30681
+ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
32116
30682
  __name: "FileUpload",
32117
30683
  props: /* @__PURE__ */ vue.mergeModels({
32118
30684
  label: {},
@@ -32226,7 +30792,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
32226
30792
  class: "preview",
32227
30793
  src: file.url,
32228
30794
  alt: ""
32229
- }, null, 8, _hoisted_3$8)
30795
+ }, null, 8, _hoisted_3$9)
32230
30796
  ])) : vue.createCommentVNode("", true),
32231
30797
  vue.createElementVNode("div", _hoisted_4$5, [
32232
30798
  _ctx.multiple ? (vue.openBlock(), vue.createElementBlock("img", {
@@ -32272,7 +30838,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
32272
30838
  style: vue.normalizeStyle([`--p:${fileQ.progress}`, { "--b": "2px" }])
32273
30839
  }, [
32274
30840
  fileQ.progress < 100 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_12, vue.toDisplayString(`${fileQ.progress.toFixed(0)}`), 1)) : vue.createCommentVNode("", true),
32275
- vue.createVNode(vue.unref(_sfc_main$F), {
30841
+ vue.createVNode(vue.unref(_sfc_main$H), {
32276
30842
  class: "success",
32277
30843
  icon: "check"
32278
30844
  })
@@ -32285,15 +30851,15 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
32285
30851
  };
32286
30852
  }
32287
30853
  });
32288
- const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-1be8d7b1"]]);
30854
+ const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-1be8d7b1"]]);
32289
30855
  const _withScopeId = (n2) => (vue.pushScopeId("data-v-b87221d6"), n2 = n2(), vue.popScopeId(), n2);
32290
30856
  const _hoisted_1$d = ["title"];
32291
30857
  const _hoisted_2$a = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("span", { class: "slider round" }, null, -1));
32292
- const _hoisted_3$7 = [
30858
+ const _hoisted_3$8 = [
32293
30859
  _hoisted_2$a
32294
30860
  ];
32295
30861
  const _hoisted_4$4 = ["id"];
32296
- const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
30862
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
32297
30863
  __name: "ToggleInput",
32298
30864
  props: /* @__PURE__ */ vue.mergeModels({
32299
30865
  label: {},
@@ -32314,7 +30880,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
32314
30880
  }, [
32315
30881
  vue.createElementVNode("div", {
32316
30882
  class: vue.normalizeClass(["switch", { checked: checked.value }])
32317
- }, _hoisted_3$7, 2),
30883
+ }, _hoisted_3$8, 2),
32318
30884
  vue.createElementVNode("label", null, [
32319
30885
  vue.createTextVNode(vue.toDisplayString(_ctx.label) + " ", 1),
32320
30886
  vue.withDirectives(vue.createElementVNode("input", {
@@ -32329,7 +30895,7 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
32329
30895
  };
32330
30896
  }
32331
30897
  });
32332
- const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b87221d6"]]);
30898
+ const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-b87221d6"]]);
32333
30899
  function _isPlaceholder(a2) {
32334
30900
  return a2 != null && typeof a2 === "object" && a2["@@functional/placeholder"] === true;
32335
30901
  }
@@ -37360,11 +35926,11 @@ var script$6 = vue.defineComponent({
37360
35926
  return { el, width, height };
37361
35927
  }
37362
35928
  });
37363
- const _hoisted_1$5 = { ref: "el" };
35929
+ const _hoisted_1$5$1 = { ref: "el" };
37364
35930
  function render$6(_ctx, _cache, $props, $setup, $data, $options) {
37365
35931
  return vue.openBlock(), vue.createElementBlock(
37366
35932
  "div",
37367
- _hoisted_1$5,
35933
+ _hoisted_1$5$1,
37368
35934
  [
37369
35935
  vue.renderSlot(_ctx.$slots, "main", {
37370
35936
  width: _ctx.width,
@@ -37436,7 +36002,7 @@ var script$5 = vue.defineComponent({
37436
36002
  return { data: data2, canvas, xLines, yLines };
37437
36003
  }
37438
36004
  });
37439
- const _hoisted_1$4 = ["stroke-dasharray"];
36005
+ const _hoisted_1$4$1 = ["stroke-dasharray"];
37440
36006
  const _hoisted_2$3 = {
37441
36007
  key: 0,
37442
36008
  class: "grid-x"
@@ -37506,7 +36072,7 @@ function render$5(_ctx, _cache, $props, $setup, $data, $options) {
37506
36072
  y2: _ctx.canvas.height
37507
36073
  }, null, 8, _hoisted_7)
37508
36074
  ])
37509
- ], 8, _hoisted_1$4)) : vue.createCommentVNode("v-if", true);
36075
+ ], 8, _hoisted_1$4$1)) : vue.createCommentVNode("v-if", true);
37510
36076
  }
37511
36077
  script$5.render = render$5;
37512
36078
  script$5.__file = "src/components/Grid/index.vue";
@@ -37599,7 +36165,7 @@ var script$4 = vue.defineComponent({
37599
36165
  return { el, show, canvas, direction, style, styleContent, position, items, isRight };
37600
36166
  }
37601
36167
  });
37602
- const _hoisted_1$3 = { key: 0 };
36168
+ const _hoisted_1$3$1 = { key: 0 };
37603
36169
  function render$4(_ctx, _cache, $props, $setup, $data, $options) {
37604
36170
  return _ctx.show ? (vue.openBlock(), vue.createElementBlock(
37605
36171
  "div",
@@ -37664,7 +36230,7 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
37664
36230
  4
37665
36231
  /* STYLE */
37666
36232
  ),
37667
- !_ctx.hideLine ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
36233
+ !_ctx.hideLine ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3$1, [
37668
36234
  _ctx.direction === "horizontal" ? (vue.openBlock(), vue.createElementBlock(
37669
36235
  "div",
37670
36236
  {
@@ -37768,11 +36334,11 @@ var script$2 = vue.defineComponent({
37768
36334
  return { y: y2, canvas, direction };
37769
36335
  }
37770
36336
  });
37771
- const _hoisted_1$2 = {
36337
+ const _hoisted_1$2$1 = {
37772
36338
  key: 0,
37773
36339
  class: "layer-marker"
37774
36340
  };
37775
- const _hoisted_2$2 = ["x", "y", "fill"];
36341
+ const _hoisted_2$2$1 = ["x", "y", "fill"];
37776
36342
  const _hoisted_3$1 = ["x1", "y1", "x2", "y2", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray"];
37777
36343
  const _hoisted_4$1 = {
37778
36344
  key: 1,
@@ -37781,13 +36347,13 @@ const _hoisted_4$1 = {
37781
36347
  const _hoisted_5$1 = ["x", "y", "fill"];
37782
36348
  const _hoisted_6$1 = ["x1", "y1", "x2", "y2", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray"];
37783
36349
  function render$2(_ctx, _cache, $props, $setup, $data, $options) {
37784
- return _ctx.direction === "horizontal" ? (vue.openBlock(), vue.createElementBlock("g", _hoisted_1$2, [
36350
+ return _ctx.direction === "horizontal" ? (vue.openBlock(), vue.createElementBlock("g", _hoisted_1$2$1, [
37785
36351
  vue.createElementVNode("text", {
37786
36352
  x: _ctx.canvas.x + 5,
37787
36353
  y: _ctx.y - 5,
37788
36354
  "text-anchor": "start",
37789
36355
  fill: _ctx.color
37790
- }, vue.toDisplayString(_ctx.label), 9, _hoisted_2$2),
36356
+ }, vue.toDisplayString(_ctx.label), 9, _hoisted_2$2$1),
37791
36357
  vue.createElementVNode("line", {
37792
36358
  x1: _ctx.canvas.x,
37793
36359
  y1: _ctx.y,
@@ -38401,8 +36967,8 @@ const _hoisted_1$1$1 = {
38401
36967
  class: "treemap",
38402
36968
  style: { display: "flex", position: "relative" }
38403
36969
  };
38404
- const _hoisted_2$1 = ["width", "height", "viewBox"];
38405
- const _hoisted_3 = { class: "layer-rectangles" };
36970
+ const _hoisted_2$1$1 = ["width", "height", "viewBox"];
36971
+ const _hoisted_3$7 = { class: "layer-rectangles" };
38406
36972
  const _hoisted_4 = ["transform", "onMouseover"];
38407
36973
  const _hoisted_5 = ["width", "height"];
38408
36974
  const _hoisted_6 = {
@@ -38420,7 +36986,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
38420
36986
  viewBox: `0 0 ${_ctx.size.width} ${_ctx.size.height}`,
38421
36987
  ref: "el"
38422
36988
  }, [
38423
- vue.createElementVNode("g", _hoisted_3, [
36989
+ vue.createElementVNode("g", _hoisted_3$7, [
38424
36990
  (vue.openBlock(true), vue.createElementBlock(
38425
36991
  vue.Fragment,
38426
36992
  null,
@@ -38461,7 +37027,7 @@ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
38461
37027
  /* KEYED_FRAGMENT */
38462
37028
  ))
38463
37029
  ])
38464
- ], 8, _hoisted_2$1)),
37030
+ ], 8, _hoisted_2$1$1)),
38465
37031
  vue.renderSlot(_ctx.$slots, "widgets")
38466
37032
  ]);
38467
37033
  }
@@ -38529,13 +37095,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
38529
37095
  }
38530
37096
  script.render = render;
38531
37097
  script.__file = "src/components/HoverBar/index.vue";
38532
- const _hoisted_1$1 = /* @__PURE__ */ vue.createElementVNode("stop", {
37098
+ const _hoisted_1$5 = /* @__PURE__ */ vue.createElementVNode("stop", {
38533
37099
  offset: "100%",
38534
37100
  "stop-color": "white",
38535
37101
  "stop-opacity": "0.4"
38536
37102
  }, null, -1);
38537
37103
  const BRAND_COLOR = "var(--bgl-primary)";
38538
- const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
37104
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
38539
37105
  __name: "Lineart",
38540
37106
  props: {
38541
37107
  data: {},
@@ -38664,7 +37230,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
38664
37230
  "stop-color": BRAND_COLOR,
38665
37231
  "stop-opacity": "1"
38666
37232
  }),
38667
- _hoisted_1$1
37233
+ _hoisted_1$5
38668
37234
  ])
38669
37235
  ])
38670
37236
  ]),
@@ -38680,37 +37246,53 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
38680
37246
  };
38681
37247
  }
38682
37248
  });
38683
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
37249
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
38684
37250
  __name: "Layout",
38685
37251
  props: {
38686
37252
  gap: { default: 1 },
38687
37253
  h100: { type: Boolean, default: false },
38688
37254
  columns: { default: () => [] },
37255
+ mColumns: { default: () => [] },
37256
+ mRows: { default: () => [] },
38689
37257
  rows: { default: () => [] }
38690
37258
  },
38691
37259
  setup(__props) {
37260
+ vue.useCssVars((_ctx) => ({
37261
+ "7a00a82c": gapSize.value,
37262
+ "30493178": gridTemplateRows.value,
37263
+ "5b203692": gridTemplateColumns.value,
37264
+ "7cba085b": mGridTemplateRows.value,
37265
+ "7abc6a1b": mGridTemplateColumns.value
37266
+ }));
38692
37267
  const props2 = __props;
38693
- const style = vue.computed(() => {
38694
- const obj = { gap: `${props2.gap}rem` };
38695
- if (props2.columns.length)
38696
- obj["grid-template-columns"] = props2.columns.join(" ");
38697
- if (props2.rows.length)
38698
- obj["grid-template-rows"] = props2.rows.join(" ");
38699
- return obj;
37268
+ const gridTemplateRows = vue.computed(() => props2.rows.length ? props2.rows.join(" ") : "auto");
37269
+ const gapSize = vue.computed(() => `${props2.gap}rem`);
37270
+ const mGridTemplateRows = vue.computed(() => {
37271
+ var _a2;
37272
+ if ((_a2 = props2.mRows) == null ? void 0 : _a2.length)
37273
+ return props2.mRows.join(" ");
37274
+ return gridTemplateRows.value;
37275
+ });
37276
+ const gridTemplateColumns = vue.computed(() => props2.columns.length ? props2.columns.join(" ") : "auto");
37277
+ const mGridTemplateColumns = vue.computed(() => {
37278
+ var _a2;
37279
+ if ((_a2 = props2.mColumns) == null ? void 0 : _a2.length)
37280
+ return props2.mColumns.join(" ");
37281
+ return gridTemplateColumns.value;
38700
37282
  });
38701
37283
  return (_ctx, _cache) => {
38702
37284
  return vue.openBlock(), vue.createElementBlock("div", {
38703
- class: vue.normalizeClass(["layout", { "layout-h-100": _ctx.h100 }]),
38704
- style: vue.normalizeStyle(style.value)
37285
+ class: vue.normalizeClass(["layout", { "layout-h-100": _ctx.h100 }])
38705
37286
  }, [
38706
- vue.renderSlot(_ctx.$slots, "default")
38707
- ], 6);
37287
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
37288
+ ], 2);
38708
37289
  };
38709
37290
  }
38710
37291
  });
38711
- const _hoisted_1 = { class: "w-100 px-075" };
38712
- const _hoisted_2 = { key: 0 };
38713
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
37292
+ const Layout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-977dfbf4"]]);
37293
+ const _hoisted_1$4 = { class: "w-100 px-075" };
37294
+ const _hoisted_2$2 = { key: 0 };
37295
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
38714
37296
  __name: "SidebarMenu",
38715
37297
  props: {
38716
37298
  navLinks: {},
@@ -38728,13 +37310,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
38728
37310
  emit2("update:open", isOpen.value);
38729
37311
  }
38730
37312
  return (_ctx, _cache) => {
38731
- const _component_Card = vue.resolveComponent("Card");
38732
37313
  const _directive_tooltip = vue.resolveDirective("tooltip");
38733
- return vue.openBlock(), vue.createBlock(_component_Card, {
37314
+ return vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$t), {
38734
37315
  class: vue.normalizeClass(["flex column gap-05 pt-1 bgl_sidebar", { "wideNav": vue.unref(isOpen) }])
38735
37316
  }, {
38736
37317
  default: vue.withCtx(() => [
38737
- vue.createElementVNode("div", _hoisted_1, [
37318
+ vue.createElementVNode("div", _hoisted_1$4, [
38738
37319
  vue.createVNode(vue.unref(Btn), {
38739
37320
  thin: "",
38740
37321
  color: "light",
@@ -38743,7 +37324,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
38743
37324
  onClick: toggleMenu
38744
37325
  })
38745
37326
  ]),
38746
- vue.createTextVNode(),
38747
37327
  !vue.unref(isOpen) || !vue.unref(slots)["brand-open"] ? vue.renderSlot(_ctx.$slots, "brand", { key: 0 }, void 0, true) : vue.createCommentVNode("", true),
38748
37328
  vue.unref(isOpen) ? vue.renderSlot(_ctx.$slots, "brand-open", { key: 1 }, void 0, true) : vue.createCommentVNode("", true),
38749
37329
  !_ctx.navLinks ? vue.renderSlot(_ctx.$slots, "default", { key: 2 }, void 0, true) : vue.createCommentVNode("", true),
@@ -38754,11 +37334,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
38754
37334
  class: "nav-button px-075"
38755
37335
  }, {
38756
37336
  default: vue.withCtx(() => [
38757
- vue.createVNode(vue.unref(_sfc_main$F), {
37337
+ vue.createVNode(vue.unref(_sfc_main$H), {
38758
37338
  icon: nav2.icon,
38759
37339
  size: 1.4
38760
37340
  }, null, 8, ["icon"]),
38761
- _ctx.open ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2, vue.toDisplayString(nav2.label), 1)) : vue.createCommentVNode("", true)
37341
+ _ctx.open ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2$2, vue.toDisplayString(nav2.label), 1)) : vue.createCommentVNode("", true)
38762
37342
  ]),
38763
37343
  _: 2
38764
37344
  }, 1032, ["to"])), [
@@ -38777,52 +37357,220 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
38777
37357
  };
38778
37358
  }
38779
37359
  });
38780
- const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8d6bd3d8"]]);
38781
- exports.Accordion = _sfc_main$n;
37360
+ const SidebarMenu = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-8713ae4a"]]);
37361
+ const state = vue.reactive(/* @__PURE__ */ new Map());
37362
+ function useTabs(group) {
37363
+ if (!state.has(group)) {
37364
+ state.set(group, vue.reactive({ currentTab: null }));
37365
+ }
37366
+ const currentTab = vue.computed({
37367
+ get: () => state.get(group).currentTab,
37368
+ set: (val) => {
37369
+ state.get(group).currentTab = val;
37370
+ }
37371
+ });
37372
+ return { currentTab };
37373
+ }
37374
+ const _hoisted_1$3 = { key: 0 };
37375
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
37376
+ __name: "Tabs",
37377
+ props: {
37378
+ tabs: {},
37379
+ modelValue: {}
37380
+ },
37381
+ setup(__props) {
37382
+ const group = Math.random().toString(36).substring(7);
37383
+ const { currentTab } = useTabs(group);
37384
+ return (_ctx, _cache) => {
37385
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
37386
+ vue.createVNode(vue.unref(TabsNav), {
37387
+ tabs: _ctx.tabs,
37388
+ group: vue.unref(group)
37389
+ }, null, 8, ["tabs", "group"]),
37390
+ vue.unref(currentTab) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
37391
+ vue.renderSlot(_ctx.$slots, vue.unref(currentTab))
37392
+ ])) : vue.createCommentVNode("", true)
37393
+ ], 64);
37394
+ };
37395
+ }
37396
+ });
37397
+ const _hoisted_1$2 = { class: "tabs grid auto-flow-columns fit-content" };
37398
+ const _hoisted_2$1 = ["onClick"];
37399
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
37400
+ __name: "TabsNav",
37401
+ props: {
37402
+ title: {},
37403
+ tabs: {},
37404
+ modelValue: {},
37405
+ sideTabs: { type: Boolean },
37406
+ group: {}
37407
+ },
37408
+ setup(__props) {
37409
+ const props2 = __props;
37410
+ const { currentTab } = useTabs(props2.group);
37411
+ currentTab.value = props2.modelValue || typeof props2.tabs[0] === "string" ? props2.tabs[0] : props2.tabs[0].id;
37412
+ const selectTab = (tab) => {
37413
+ currentTab.value = typeof tab === "string" ? tab : tab.id;
37414
+ };
37415
+ const isActive = (tab) => {
37416
+ if (typeof tab === "string")
37417
+ return currentTab.value === tab;
37418
+ return currentTab.value === tab.id;
37419
+ };
37420
+ const tabLabel = (tab) => {
37421
+ if (typeof tab === "string")
37422
+ return tab;
37423
+ return tab.label;
37424
+ };
37425
+ return (_ctx, _cache) => {
37426
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
37427
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tabs, (tab, i2) => {
37428
+ return vue.openBlock(), vue.createElementBlock("button", {
37429
+ class: vue.normalizeClass([{ active: isActive(tab) }, "tab"]),
37430
+ onClick: ($event) => selectTab(tab),
37431
+ key: i2
37432
+ }, [
37433
+ typeof tab !== "string" && tab.icon ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$H), {
37434
+ key: 0,
37435
+ icon: tab.icon
37436
+ }, null, 8, ["icon"])) : vue.createCommentVNode("", true),
37437
+ vue.createTextVNode(" " + vue.toDisplayString(tabLabel(tab)), 1)
37438
+ ], 10, _hoisted_2$1);
37439
+ }), 128))
37440
+ ]);
37441
+ };
37442
+ }
37443
+ });
37444
+ const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f737d297"]]);
37445
+ const _hoisted_1$1 = { key: 0 };
37446
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
37447
+ __name: "TabsBody",
37448
+ props: {
37449
+ group: {}
37450
+ },
37451
+ setup(__props) {
37452
+ const props2 = __props;
37453
+ const { currentTab } = useTabs(props2.group);
37454
+ return (_ctx, _cache) => {
37455
+ return vue.unref(currentTab) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
37456
+ vue.renderSlot(_ctx.$slots, vue.unref(currentTab))
37457
+ ])) : vue.createCommentVNode("", true);
37458
+ };
37459
+ }
37460
+ });
37461
+ const _hoisted_1 = { class: "bgl_card tabs-top" };
37462
+ const _hoisted_2 = { class: "tabs grid auto-flow-columns fit-content" };
37463
+ const _hoisted_3 = ["onClick"];
37464
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
37465
+ __name: "TabbedLayout",
37466
+ props: {
37467
+ title: {},
37468
+ tabs: {},
37469
+ modelValue: {},
37470
+ router: {},
37471
+ sideTabs: { type: Boolean }
37472
+ },
37473
+ emits: ["update:modelValue"],
37474
+ setup(__props, { emit: __emit }) {
37475
+ const emit2 = __emit;
37476
+ let activeTab = vue.ref();
37477
+ const props2 = __props;
37478
+ function changeTab(tab) {
37479
+ var _a2;
37480
+ activeTab.value = tab;
37481
+ emit2("update:modelValue", activeTab.value);
37482
+ if (!props2.router)
37483
+ return;
37484
+ void ((_a2 = props2.router) == null ? void 0 : _a2.push({
37485
+ path: props2.router.currentRoute.value.path,
37486
+ query: { ...props2.router.currentRoute.value.query, t: tab },
37487
+ hash: props2.router.currentRoute.value.hash
37488
+ }));
37489
+ }
37490
+ vue.onMounted(() => {
37491
+ var _a2;
37492
+ const firstTab = props2.modelValue || ((_a2 = props2.router) == null ? void 0 : _a2.currentRoute.value.query.t) || props2.tabs[0];
37493
+ activeTab.value = firstTab;
37494
+ });
37495
+ return (_ctx, _cache) => {
37496
+ return vue.openBlock(), vue.createElementBlock("div", {
37497
+ class: vue.normalizeClass(["h-100 grid list-view gap-1", { "side-tabs": _ctx.sideTabs }])
37498
+ }, [
37499
+ vue.createElementVNode("div", _hoisted_1, [
37500
+ vue.renderSlot(_ctx.$slots, "top-section", {}, void 0, true),
37501
+ vue.createElementVNode("div", _hoisted_2, [
37502
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tabs, (tab) => {
37503
+ var _a2;
37504
+ return vue.openBlock(), vue.createElementBlock("div", {
37505
+ class: vue.normalizeClass([{
37506
+ active: tab === vue.unref(activeTab) || tab === ((_a2 = _ctx.router) == null ? void 0 : _a2.currentRoute.value.path.split("/").slice(-1)[0])
37507
+ }, "tab"]),
37508
+ key: tab,
37509
+ onClick: ($event) => changeTab(tab)
37510
+ }, vue.toDisplayString(tab), 11, _hoisted_3);
37511
+ }), 128))
37512
+ ])
37513
+ ]),
37514
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.tabs.filter((item) => item === vue.unref(activeTab)), (tab) => {
37515
+ return vue.openBlock(), vue.createElementBlock("div", {
37516
+ class: "list-content",
37517
+ key: tab
37518
+ }, [
37519
+ vue.renderSlot(_ctx.$slots, tab, { key: tab }, void 0, true)
37520
+ ]);
37521
+ }), 128))
37522
+ ], 2);
37523
+ };
37524
+ }
37525
+ });
37526
+ const TabbedLayout = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fd61196d"]]);
37527
+ exports.Accordion = _sfc_main$q;
38782
37528
  exports.AccordionItem = AccordionItem;
38783
37529
  exports.Alert = Alert;
38784
37530
  exports.Avatar = Avatar;
38785
37531
  exports.Badge = Badge;
38786
- exports.BagelForm = _sfc_main$h;
37532
+ exports.BagelForm = _sfc_main$l;
38787
37533
  exports.BagelVue = BagelVue;
38788
- exports.BglField = _sfc_main$g;
38789
- exports.BglForm = _sfc_main$h;
37534
+ exports.BglField = _sfc_main$k;
37535
+ exports.BglForm = _sfc_main$l;
38790
37536
  exports.BglVideo = BglVideo;
38791
37537
  exports.Btn = Btn;
38792
- exports.Card = _sfc_main$q;
37538
+ exports.Card = _sfc_main$t;
38793
37539
  exports.Carousel = Carousel;
38794
37540
  exports.CheckInput = CheckInput;
38795
37541
  exports.Checkbox = Checkbox;
38796
- exports.ColorPicker = _sfc_main$7;
38797
- exports.ComboBox = ComboBox;
37542
+ exports.ColorPicker = _sfc_main$b;
38798
37543
  exports.Comments = Comments;
38799
37544
  exports.DataPreview = DataPreview;
38800
- exports.DateInput = _sfc_main$e;
38801
- exports.DatePicker = _sfc_main$6;
37545
+ exports.DateInput = _sfc_main$i;
37546
+ exports.DatePicker = _sfc_main$a;
38802
37547
  exports.FileUpload = FileUpload;
38803
- exports.Icon = _sfc_main$F;
37548
+ exports.Icon = _sfc_main$H;
38804
37549
  exports.JSONInput = JSONInput;
38805
- exports.Layout = _sfc_main$1;
38806
- exports.Lineart = _sfc_main$2;
38807
- exports.ListItem = _sfc_main$y;
38808
- exports.ListView = _sfc_main$z;
38809
- exports.MaterialIcon = _sfc_main$F;
38810
- exports.Modal = _sfc_main$C;
37550
+ exports.Layout = Layout;
37551
+ exports.Lineart = _sfc_main$6;
37552
+ exports.ListItem = _sfc_main$A;
37553
+ exports.ListView = _sfc_main$B;
37554
+ exports.MaterialIcon = _sfc_main$H;
37555
+ exports.Modal = _sfc_main$E;
38811
37556
  exports.ModalForm = ModalForm;
38812
37557
  exports.ModalPlugin = ModalPlugin;
38813
37558
  exports.NavBar = NavBar;
38814
- exports.PageTitle = _sfc_main$v;
38815
- exports.RTXEditor = _sfc_main$G;
37559
+ exports.PageTitle = _sfc_main$y;
37560
+ exports.RTXEditor = _sfc_main$I;
38816
37561
  exports.RadioPillsInput = RadioPillsInput;
38817
37562
  exports.RichTextEditor = RichTextEditor;
38818
37563
  exports.RouterWrapper = RouterWrapper;
38819
- exports.SelectInput = _sfc_main$c;
37564
+ exports.SelectInput = SelectInput;
38820
37565
  exports.SidebarMenu = SidebarMenu;
38821
37566
  exports.TabbedLayout = TabbedLayout;
38822
37567
  exports.TableField = TableField;
38823
37568
  exports.TableSchema = TableSchema;
37569
+ exports.Tabs = _sfc_main$3;
37570
+ exports.TabsBody = _sfc_main$1;
37571
+ exports.TabsNav = TabsNav;
38824
37572
  exports.TextInput = TextInput;
38825
- exports.Title = _sfc_main$o;
37573
+ exports.Title = _sfc_main$r;
38826
37574
  exports.ToggleInput = ToggleInput;
38827
37575
  exports.TopBar = TopBar;
38828
37576
  exports.bagelFormUtils = BagelFormUtils;