@bagelink/vue 0.0.511 → 0.0.522

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 (33) hide show
  1. package/dist/components/Btn.vue.d.ts +2 -0
  2. package/dist/components/Btn.vue.d.ts.map +1 -1
  3. package/dist/components/Carousel.vue.d.ts +29 -2
  4. package/dist/components/Carousel.vue.d.ts.map +1 -1
  5. package/dist/components/MapEmbed.vue.d.ts.map +1 -1
  6. package/dist/components/form/inputs/CheckInput.vue.d.ts.map +1 -1
  7. package/dist/components/form/inputs/DateInput.vue.d.ts +8 -0
  8. package/dist/components/form/inputs/DateInput.vue.d.ts.map +1 -1
  9. package/dist/components/layout/TabsNav.vue.d.ts +3 -1
  10. package/dist/components/layout/TabsNav.vue.d.ts.map +1 -1
  11. package/dist/index.cjs +262 -357
  12. package/dist/index.mjs +262 -357
  13. package/dist/style.css +247 -187
  14. package/dist/utils/BagelFormUtils.d.ts +2 -0
  15. package/dist/utils/BagelFormUtils.d.ts.map +1 -1
  16. package/package.json +1 -1
  17. package/src/components/Btn.vue +8 -1
  18. package/src/components/Card.vue +0 -1
  19. package/src/components/Carousel.vue +134 -117
  20. package/src/components/ListItem.vue +2 -2
  21. package/src/components/ListView.vue +1 -1
  22. package/src/components/MapEmbed.vue +6 -4
  23. package/src/components/Modal.vue +1 -2
  24. package/src/components/TableSchema.vue +4 -4
  25. package/src/components/form/inputs/CheckInput.vue +46 -70
  26. package/src/components/form/inputs/DateInput.vue +9 -0
  27. package/src/components/layout/TabsNav.vue +2 -2
  28. package/src/styles/appearance.css +66 -0
  29. package/src/styles/bagel.css +1 -1
  30. package/src/styles/layout.css +14 -0
  31. package/src/styles/mobilLayout.css +14 -0
  32. package/src/styles/scrollbar.css +2 -4
  33. package/src/utils/BagelFormUtils.ts +23 -0
package/dist/index.mjs CHANGED
@@ -110,21 +110,12 @@ function getPaddingObject(padding) {
110
110
  };
111
111
  }
112
112
  function rectToClientRect$1(rect) {
113
- const {
114
- x: x2,
115
- y: y2,
116
- width,
117
- height
118
- } = rect;
119
113
  return {
120
- width,
121
- height,
122
- top: y2,
123
- left: x2,
124
- right: x2 + width,
125
- bottom: y2 + height,
126
- x: x2,
127
- y: y2
114
+ ...rect,
115
+ top: rect.y,
116
+ left: rect.x,
117
+ right: rect.x + rect.width,
118
+ bottom: rect.y + rect.height
128
119
  };
129
120
  }
130
121
  function computeCoordsFromPlacement(_ref, placement, rtl) {
@@ -295,10 +286,9 @@ async function detectOverflow$1(state2, options) {
295
286
  strategy
296
287
  }));
297
288
  const rect = elementContext === "floating" ? {
289
+ ...rects.floating,
298
290
  x: x2,
299
- y: y2,
300
- width: rects.floating.width,
301
- height: rects.floating.height
291
+ y: y2
302
292
  } : rects.reference;
303
293
  const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
304
294
  const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
@@ -745,16 +735,16 @@ const size = function(options) {
745
735
  widthSide = side;
746
736
  heightSide = alignment === "end" ? "top" : "bottom";
747
737
  }
748
- const maximumClippingHeight = height - overflow.top - overflow.bottom;
749
- const maximumClippingWidth = width - overflow.left - overflow.right;
750
- const overflowAvailableHeight = min$3(height - overflow[heightSide], maximumClippingHeight);
751
- const overflowAvailableWidth = min$3(width - overflow[widthSide], maximumClippingWidth);
738
+ const overflowAvailableHeight = height - overflow[heightSide];
739
+ const overflowAvailableWidth = width - overflow[widthSide];
752
740
  const noShift = !state2.middlewareData.shift;
753
741
  let availableHeight = overflowAvailableHeight;
754
742
  let availableWidth = overflowAvailableWidth;
755
743
  if (isYAxis) {
744
+ const maximumClippingWidth = width - overflow.left - overflow.right;
756
745
  availableWidth = alignment || noShift ? min$3(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
757
746
  } else {
747
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
758
748
  availableHeight = alignment || noShift ? min$3(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
759
749
  }
760
750
  if (noShift && !alignment) {
@@ -5128,6 +5118,7 @@ function txtField(id, label, options) {
5128
5118
  required: options == null ? void 0 : options.required,
5129
5119
  id,
5130
5120
  label,
5121
+ disabled: options == null ? void 0 : options.disabled,
5131
5122
  placeholder: options == null ? void 0 : options.placeholder,
5132
5123
  defaultValue: options == null ? void 0 : options.defaultValue,
5133
5124
  attrs: {
@@ -5163,6 +5154,20 @@ function checkField(id, label, options) {
5163
5154
  label
5164
5155
  };
5165
5156
  }
5157
+ function dateField(id, label, options) {
5158
+ return {
5159
+ $el: "date",
5160
+ class: options == null ? void 0 : options.class,
5161
+ required: options == null ? void 0 : options.required,
5162
+ id,
5163
+ disabled: options == null ? void 0 : options.disabled,
5164
+ label,
5165
+ defaultValue: options == null ? void 0 : options.defaultValue,
5166
+ attrs: {
5167
+ disabled: options == null ? void 0 : options.disabled
5168
+ }
5169
+ };
5170
+ }
5166
5171
  function numField(id, label, options) {
5167
5172
  return {
5168
5173
  $el: "text",
@@ -5171,6 +5176,7 @@ function numField(id, label, options) {
5171
5176
  defaultValue: options == null ? void 0 : options.defaultValue,
5172
5177
  id,
5173
5178
  label,
5179
+ disabled: options == null ? void 0 : options.disabled,
5174
5180
  placeholder: options == null ? void 0 : options.placeholder,
5175
5181
  helptext: options == null ? void 0 : options.helptext,
5176
5182
  attrs: {
@@ -5193,6 +5199,7 @@ function frmRow(...children2) {
5193
5199
  const bagelFormUtils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5194
5200
  __proto__: null,
5195
5201
  checkField,
5202
+ dateField,
5196
5203
  frmRow,
5197
5204
  numField,
5198
5205
  richText,
@@ -5379,7 +5386,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
5379
5386
  const _hoisted_1$H = { class: "full-nav" };
5380
5387
  const _hoisted_2$y = { class: "nav-scroll" };
5381
5388
  const _hoisted_3$n = { class: "nav-links-wrapper" };
5382
- const _hoisted_4$g = { class: "tooltip" };
5389
+ const _hoisted_4$f = { class: "tooltip" };
5383
5390
  const _hoisted_5$c = { class: "bot-buttons-wrapper" };
5384
5391
  const _hoisted_6$8 = { class: "tooltip" };
5385
5392
  const _sfc_main$L = /* @__PURE__ */ defineComponent({
@@ -5428,7 +5435,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
5428
5435
  createVNode(unref(_sfc_main$M), {
5429
5436
  icon: link.icon
5430
5437
  }, null, 8, ["icon"]),
5431
- createElementVNode("div", _hoisted_4$g, toDisplayString(link.label), 1)
5438
+ createElementVNode("div", _hoisted_4$f, toDisplayString(link.label), 1)
5432
5439
  ]),
5433
5440
  _: 2
5434
5441
  }, 1032, ["to", "onClick"]);
@@ -5494,16 +5501,22 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
5494
5501
  role: { default: "button" },
5495
5502
  value: {},
5496
5503
  to: {},
5504
+ href: {},
5497
5505
  round: { type: Boolean, default: false },
5498
5506
  is: { default: "button" },
5499
5507
  onClick: { type: Function, default: () => "" }
5500
5508
  },
5501
5509
  setup(__props) {
5502
5510
  useCssVars((_ctx) => ({
5503
- "23db5d74": computedBackgroundColor.value,
5504
- "82322962": cumputedTextColor.value
5511
+ "38764c20": computedBackgroundColor.value,
5512
+ "63554afb": cumputedTextColor.value
5505
5513
  }));
5506
5514
  const props2 = __props;
5515
+ const isComponent = computed(() => {
5516
+ if (props2.to) return "router-link";
5517
+ if (props2.href) return "a";
5518
+ return props2.is;
5519
+ });
5507
5520
  const slots = useSlots();
5508
5521
  const computedTheme = computed(
5509
5522
  () => {
@@ -5548,7 +5561,8 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
5548
5561
  }
5549
5562
  );
5550
5563
  return (_ctx, _cache) => {
5551
- return openBlock(), createBlock(resolveDynamicComponent(_ctx.to ? "router-link" : _ctx.is), {
5564
+ return openBlock(), createBlock(resolveDynamicComponent(isComponent.value), {
5565
+ href: _ctx.href,
5552
5566
  to: _ctx.to,
5553
5567
  type: _ctx.type,
5554
5568
  role: _ctx.role,
@@ -5580,11 +5594,11 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
5580
5594
  ]))
5581
5595
  ]),
5582
5596
  _: 3
5583
- }, 8, ["to", "type", "role", "disabled", "class", "onClick"]);
5597
+ }, 8, ["href", "to", "type", "role", "disabled", "class", "onClick"]);
5584
5598
  };
5585
5599
  }
5586
5600
  });
5587
- const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-957b4083"]]);
5601
+ const Btn = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["__scopeId", "data-v-d5201df6"]]);
5588
5602
  const _hoisted_1$F = {
5589
5603
  key: 0,
5590
5604
  class: "tool-bar"
@@ -5678,13 +5692,12 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
5678
5692
  }, null, 8, ["label"])) : createCommentVNode("", true)
5679
5693
  ])) : (openBlock(), createElementBlock("div", _hoisted_2$w, [
5680
5694
  createVNode(unref(Btn), {
5681
- class: "color-black",
5682
- style: normalizeStyle({ float: _ctx.side ? "left" : "right" }),
5695
+ class: "color-black position-start",
5683
5696
  icon: "close",
5684
5697
  thin: "",
5685
5698
  color: "white",
5686
5699
  onClick: closeModal
5687
- }, null, 8, ["style"])
5700
+ })
5688
5701
  ])),
5689
5702
  renderSlot(_ctx.$slots, "default"),
5690
5703
  unref(slots).footer || ((_a2 = _ctx.actions) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("footer", _hoisted_3$m, [
@@ -5819,7 +5832,7 @@ const ModalForm = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-
5819
5832
  const _hoisted_1$E = { class: "accordion-item" };
5820
5833
  const _hoisted_2$v = ["aria-expanded", "aria-controls"];
5821
5834
  const _hoisted_3$l = { class: "accordion-label" };
5822
- const _hoisted_4$f = ["id", "aria-hidden"];
5835
+ const _hoisted_4$e = ["id", "aria-hidden"];
5823
5836
  const _sfc_main$H = /* @__PURE__ */ defineComponent({
5824
5837
  __name: "AccordionItem",
5825
5838
  props: {
@@ -5882,7 +5895,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5882
5895
  "aria-hidden": unref(isOpen) ? "false" : "true"
5883
5896
  }, [
5884
5897
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
5885
- ], 8, _hoisted_4$f)) : createCommentVNode("", true)
5898
+ ], 8, _hoisted_4$e)) : createCommentVNode("", true)
5886
5899
  ]),
5887
5900
  _: 3
5888
5901
  })
@@ -5892,7 +5905,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
5892
5905
  });
5893
5906
  const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-b862dfb8"]]);
5894
5907
  const _sfc_main$G = {};
5895
- const _hoisted_1$D = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
5908
+ const _hoisted_1$D = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 pt-0 pb-05 px-0" };
5896
5909
  const _hoisted_2$u = { class: "p-1" };
5897
5910
  const _hoisted_3$k = { class: "list-content auto-flow-rows align-items-start overflow-y h-100" };
5898
5911
  function _sfc_render$2(_ctx, _cache) {
@@ -5906,8 +5919,8 @@ function _sfc_render$2(_ctx, _cache) {
5906
5919
  ]);
5907
5920
  }
5908
5921
  const ListView = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$2]]);
5909
- const _hoisted_1$C = { class: "txt16 no-margin ellipsis line-height-14" };
5910
- const _hoisted_2$t = { class: "txt14 no-margin txt-gray ellipsis" };
5922
+ const _hoisted_1$C = { class: "no-margin ellipsis line-height-14 pb-025" };
5923
+ const _hoisted_2$t = { class: "txt12 no-margin txt-gray ellipsis" };
5911
5924
  const _sfc_main$F = /* @__PURE__ */ defineComponent({
5912
5925
  __name: "ListItem",
5913
5926
  props: {
@@ -5971,7 +5984,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
5971
5984
  const _hoisted_1$A = { class: "table-list-wrap h-100" };
5972
5985
  const _hoisted_2$r = { class: "infinite-wrapper" };
5973
5986
  const _hoisted_3$j = { class: "row first-row" };
5974
- const _hoisted_4$e = ["onClick"];
5987
+ const _hoisted_4$d = ["onClick"];
5975
5988
  const _hoisted_5$b = { class: "flex" };
5976
5989
  const _hoisted_6$7 = ["onClick"];
5977
5990
  const _hoisted_7$2 = { key: 1 };
@@ -6094,7 +6107,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
6094
6107
  }, null, 8, ["class"])
6095
6108
  ], 2)
6096
6109
  ])
6097
- ], 8, _hoisted_4$e);
6110
+ ], 8, _hoisted_4$d);
6098
6111
  }), 128))
6099
6112
  ]),
6100
6113
  createElementVNode("tbody", {
@@ -6137,7 +6150,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
6137
6150
  };
6138
6151
  }
6139
6152
  });
6140
- const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-ae8770a6"]]);
6153
+ const TableSchema = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-8113163b"]]);
6141
6154
  const _sfc_main$C = {};
6142
6155
  const _hoisted_1$z = { class: "flex space-between" };
6143
6156
  function _sfc_render$1(_ctx, _cache) {
@@ -6178,7 +6191,7 @@ const _hoisted_2$q = {
6178
6191
  class: "data-row"
6179
6192
  };
6180
6193
  const _hoisted_3$i = { class: "key" };
6181
- const _hoisted_4$d = { key: 1 };
6194
+ const _hoisted_4$c = { key: 1 };
6182
6195
  const _hoisted_5$a = { class: "key" };
6183
6196
  const _hoisted_6$6 = { class: "vlue" };
6184
6197
  const _sfc_main$A = /* @__PURE__ */ defineComponent({
@@ -6230,7 +6243,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
6230
6243
  ])) : createCommentVNode("", true)
6231
6244
  ], 64);
6232
6245
  }), 128)),
6233
- !((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_4$d, [
6246
+ !((_a2 = _ctx.schema) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_4$c, [
6234
6247
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(computedSchema.value, (key) => {
6235
6248
  return openBlock(), createElementBlock("div", {
6236
6249
  key,
@@ -6509,37 +6522,28 @@ const _hoisted_2$n = { class: "Handlers" };
6509
6522
  const _sfc_main$s = /* @__PURE__ */ defineComponent({
6510
6523
  __name: "Carousel",
6511
6524
  props: {
6512
- autoHeight: {
6513
- type: Boolean,
6514
- default: false
6515
- },
6516
- allowScroll: {
6517
- type: Boolean,
6518
- default: true
6519
- },
6520
- freeDrag: {
6521
- type: Boolean,
6522
- default: true
6523
- },
6524
- items: {
6525
- type: Number,
6526
- default: 4
6527
- },
6528
- index: {
6529
- type: Number,
6530
- default: 0
6531
- }
6525
+ autoHeight: { type: Boolean, default: false },
6526
+ allowScroll: { type: Boolean, default: true },
6527
+ freeDrag: { type: Boolean, default: true },
6528
+ items: { type: Number, default: 4 },
6529
+ index: { type: Number, default: 0 },
6530
+ autoplay: { type: Boolean, default: false },
6531
+ autoplaySpeed: { type: Number, default: 3e3 },
6532
+ loop: { type: Boolean, default: false }
6532
6533
  },
6533
6534
  emits: ["update:index"],
6534
6535
  setup(__props, { emit: __emit }) {
6535
6536
  const props2 = __props;
6536
6537
  const emit2 = __emit;
6537
- const bglSlider = ref();
6538
+ const bglSlider = ref(null);
6538
6539
  let activeSlideIndex = ref(0);
6539
6540
  let isDragging = ref(false);
6540
6541
  let startX = ref(0);
6541
6542
  let scrollLeft = ref(0);
6542
6543
  let isPressed = ref(false);
6544
+ let yHeight = ref("auto");
6545
+ let autoplayInterval = ref(null);
6546
+ let originalSlideCount = ref(0);
6543
6547
  function disableDrag() {
6544
6548
  var _a2, _b;
6545
6549
  (_a2 = bglSlider.value) == null ? void 0 : _a2.querySelectorAll("img").forEach((e) => {
@@ -6547,36 +6551,40 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
6547
6551
  });
6548
6552
  for (const e of ((_b = bglSlider.value) == null ? void 0 : _b.children) || []) {
6549
6553
  e.setAttribute("draggable", "false");
6550
- e.addEventListener("click", (e22) => e22.preventDefault());
6554
+ e.addEventListener("click", (el) => el.preventDefault());
6551
6555
  }
6552
6556
  }
6553
- let yHeight = ref("auto");
6554
6557
  function evalHeight() {
6555
6558
  if (!props2.autoHeight || !bglSlider.value) return;
6556
- const slidChildren = bglSlider.value.children[activeSlideIndex.value].children;
6557
- const height = Array.from(slidChildren).map((el) => el.clientHeight).reduce((a2, b2) => a2 + b2, 0);
6559
+ const height = Array.from(bglSlider.value.children[activeSlideIndex.value].children).map((el) => el.clientHeight).reduce((a2, b2) => a2 + b2, 0);
6558
6560
  yHeight.value = `${height}px`;
6559
6561
  }
6560
- function goToSlide(index2) {
6561
- if (!bglSlider.value || index2 < 0 || index2 > bglSlider.value.children.length - 1) return;
6562
- const slider = bglSlider.value;
6562
+ function goToSlide(index2, behavior = "smooth") {
6563
+ if (!bglSlider.value) return;
6564
+ if (props2.loop) {
6565
+ if (index2 >= originalSlideCount.value) {
6566
+ index2 = index2 % originalSlideCount.value;
6567
+ behavior = "auto";
6568
+ } else if (index2 < 0) {
6569
+ index2 = originalSlideCount.value - -index2 % originalSlideCount.value;
6570
+ behavior = "auto";
6571
+ }
6572
+ }
6563
6573
  const isRTL = getComputedStyle(bglSlider.value).direction === "rtl";
6564
- const scrollX = slider.offsetWidth * index2 * (isRTL ? -1 : 1);
6565
- slider.scrollTo({ left: scrollX, behavior: "smooth" });
6574
+ const scrollX = bglSlider.value.offsetWidth * index2 * (isRTL ? -1 : 1);
6575
+ bglSlider.value.scrollTo({ left: scrollX, behavior });
6566
6576
  activeSlideIndex.value = index2;
6567
6577
  evalHeight();
6568
6578
  }
6569
- watch(() => props2.index, goToSlide);
6570
- watch(
6571
- () => activeSlideIndex.value,
6572
- (index2) => {
6573
- emit2("update:index", index2);
6574
- }
6575
- );
6579
+ watch(() => props2.index, (index2) => {
6580
+ goToSlide(index2);
6581
+ });
6582
+ watch(() => activeSlideIndex.value, (index2) => {
6583
+ emit2("update:index", index2);
6584
+ });
6576
6585
  function scrollEnd() {
6577
- const slider = bglSlider.value;
6578
- if (!slider || props2.items !== 1) return;
6579
- const nextSlide = Math.round(slider.scrollLeft / slider.offsetWidth);
6586
+ if (props2.items !== 1 || !bglSlider.value) return;
6587
+ const nextSlide = Math.round(bglSlider.value.scrollLeft / bglSlider.value.offsetWidth);
6580
6588
  goToSlide(nextSlide);
6581
6589
  }
6582
6590
  function stopDragging(e) {
@@ -6584,11 +6592,8 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
6584
6592
  const slider = bglSlider.value;
6585
6593
  if (!slider) return;
6586
6594
  const isDragForward = startX.value > e.pageX + slider.offsetLeft;
6587
- if (isDragForward)
6588
- activeSlideIndex.value = Math.ceil(slider.scrollLeft / slider.offsetWidth);
6589
- else activeSlideIndex.value = Math.floor(slider.scrollLeft / slider.offsetWidth);
6595
+ activeSlideIndex.value = isDragForward ? Math.ceil(slider.scrollLeft / slider.offsetWidth) : Math.floor(slider.scrollLeft / slider.offsetWidth);
6590
6596
  if (props2.items === 1) goToSlide(activeSlideIndex.value);
6591
- startX.value = 0;
6592
6597
  document.removeEventListener("mousemove", move);
6593
6598
  document.removeEventListener("mouseup", stopDragging);
6594
6599
  document.removeEventListener("dragend", stopDragging);
@@ -6597,11 +6602,9 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
6597
6602
  function move(e) {
6598
6603
  if (!bglSlider.value) return;
6599
6604
  const x2 = e.pageX - bglSlider.value.offsetLeft;
6600
- const walk = x2 - startX.value;
6601
- if (walk > 20 || walk < -20) isDragging.value = true;
6605
+ if (Math.abs(x2 - startX.value) > 20) isDragging.value = true;
6602
6606
  if (!isDragging.value) return;
6603
- const scroll = x2 - startX.value;
6604
- bglSlider.value.scrollLeft = scrollLeft.value - scroll;
6607
+ bglSlider.value.scrollLeft = scrollLeft.value - (x2 - startX.value);
6605
6608
  }
6606
6609
  function startDragging(e) {
6607
6610
  if (e.button !== 0 || !props2.freeDrag || !bglSlider.value) return;
@@ -6613,46 +6616,70 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
6613
6616
  document.addEventListener("dragend", stopDragging);
6614
6617
  }
6615
6618
  function next() {
6616
- if (!bglSlider.value) return;
6617
- const slideCount = bglSlider.value.children.length;
6618
- const isLastSlide = activeSlideIndex.value >= slideCount - 1;
6619
- if (isLastSlide) goToSlide(0);
6620
- else goToSlide(activeSlideIndex.value + 1);
6619
+ if (bglSlider.value) {
6620
+ goToSlide(activeSlideIndex.value + 1);
6621
+ }
6621
6622
  }
6622
6623
  function prev() {
6623
- if (!bglSlider.value) return;
6624
- const slideCount = bglSlider.value.children.length;
6625
- if (activeSlideIndex.value === 0) goToSlide(slideCount - 1);
6626
- else goToSlide(activeSlideIndex.value - 1);
6624
+ if (bglSlider.value) {
6625
+ goToSlide(activeSlideIndex.value - 1);
6626
+ }
6627
6627
  }
6628
6628
  function evalWidth() {
6629
- if (!bglSlider.value) return;
6630
- goToSlide(activeSlideIndex.value);
6629
+ if (bglSlider.value) goToSlide(activeSlideIndex.value);
6630
+ }
6631
+ function startAutoplay() {
6632
+ if (props2.autoplay) {
6633
+ autoplayInterval.value = setInterval(next, props2.autoplaySpeed);
6634
+ }
6635
+ }
6636
+ function stopAutoplay() {
6637
+ if (autoplayInterval.value) {
6638
+ clearInterval(autoplayInterval.value);
6639
+ autoplayInterval.value = null;
6640
+ }
6641
+ }
6642
+ function cloneSlides() {
6643
+ if (!bglSlider.value || !props2.loop) return;
6644
+ const slides = Array.from(bglSlider.value.children);
6645
+ originalSlideCount.value = slides.length;
6646
+ slides.forEach((slide) => {
6647
+ const clone2 = slide.cloneNode(true);
6648
+ bglSlider.value.appendChild(clone2);
6649
+ });
6650
+ slides.forEach((slide) => {
6651
+ const clone2 = slide.cloneNode(true);
6652
+ bglSlider.value.insertBefore(clone2, bglSlider.value.firstChild);
6653
+ });
6631
6654
  }
6632
6655
  onMounted(() => {
6656
+ cloneSlides();
6633
6657
  window.addEventListener("resize", evalWidth);
6634
6658
  evalHeight();
6635
6659
  disableDrag();
6660
+ startAutoplay();
6636
6661
  });
6637
6662
  onUnmounted(() => {
6638
6663
  window.removeEventListener("resize", evalWidth);
6664
+ stopAutoplay();
6639
6665
  });
6640
6666
  return (_ctx, _cache) => {
6641
6667
  return openBlock(), createElementBlock("div", {
6642
- class: normalizeClass(["BglCarousel", { autoHeight: __props.autoHeight }]),
6668
+ class: normalizeClass(["BglCarousel", { autoHeight: props2.autoHeight }]),
6643
6669
  style: normalizeStyle({ height: unref(yHeight) })
6644
6670
  }, [
6645
6671
  createElementVNode("div", {
6646
6672
  ref_key: "bglSlider",
6647
6673
  ref: bglSlider,
6648
- class: normalizeClass([{
6649
- dragging: unref(isDragging),
6650
- clicking: unref(isPressed),
6651
- [`slides-${__props.items}`]: true,
6652
- allowScroll: __props.allowScroll
6653
- }, "bgl-slider"]),
6674
+ class: normalizeClass(["bgl-slider", [
6675
+ { dragging: unref(isDragging), clicking: unref(isPressed), [`slides-${props2.items}`]: true, allowScroll: props2.allowScroll }
6676
+ ]]),
6654
6677
  onScrollend: scrollEnd,
6655
- onMousedown: startDragging
6678
+ onMousedown: startDragging,
6679
+ onMouseenter: stopAutoplay,
6680
+ onMouseleave: startAutoplay,
6681
+ onFocusin: stopAutoplay,
6682
+ onFocusout: startAutoplay
6656
6683
  }, [
6657
6684
  unref(isDragging) ? (openBlock(), createElementBlock("div", _hoisted_1$t)) : createCommentVNode("", true),
6658
6685
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
@@ -6660,14 +6687,14 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
6660
6687
  createElementVNode("div", _hoisted_2$n, [
6661
6688
  createElementVNode("span", { onClick: prev }, [
6662
6689
  renderSlot(_ctx.$slots, "prev", {
6663
- prev,
6664
- index: unref(activeSlideIndex)
6690
+ index: unref(activeSlideIndex),
6691
+ prev
6665
6692
  }, void 0, true)
6666
6693
  ]),
6667
6694
  createElementVNode("span", { onClick: next }, [
6668
6695
  renderSlot(_ctx.$slots, "next", {
6669
- next,
6670
- index: unref(activeSlideIndex)
6696
+ index: unref(activeSlideIndex),
6697
+ next
6671
6698
  }, void 0, true)
6672
6699
  ])
6673
6700
  ])
@@ -6675,7 +6702,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
6675
6702
  };
6676
6703
  }
6677
6704
  });
6678
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-1f9c6644"]]);
6705
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-f21373a1"]]);
6679
6706
  const _sfc_main$r = /* @__PURE__ */ defineComponent({
6680
6707
  __name: "ModalConfirm",
6681
6708
  props: {
@@ -16300,6 +16327,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
16300
16327
  iconUrl: `data:image/svg+xml;utf8,${encodeURIComponent(markerSVG)}`,
16301
16328
  iconSize: [32, 32]
16302
16329
  });
16330
+ if (!map4.value) initializeMap();
16303
16331
  const marker = L$1.marker(latlng, { icon: customIcon }).addTo(map4.value);
16304
16332
  markers.value.push(marker);
16305
16333
  }
@@ -16563,20 +16591,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
16563
16591
  };
16564
16592
  }
16565
16593
  });
16566
- const _withScopeId$3 = (n2) => (pushScopeId("data-v-62e7637b"), n2 = n2(), popScopeId(), n2);
16567
16594
  const _hoisted_1$r = ["title"];
16568
- const _hoisted_2$m = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("svg", {
16569
- xmlns: "http://www.w3.org/2000/svg",
16570
- height: "24",
16571
- viewBox: "0 -960 960 960",
16572
- width: "24"
16573
- }, [
16574
- /* @__PURE__ */ createElementVNode("path", { d: "M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" })
16575
- ], -1));
16576
- const _hoisted_3$h = [
16577
- _hoisted_2$m
16578
- ];
16579
- const _hoisted_4$c = ["id", "required"];
16595
+ const _hoisted_2$m = ["id", "required"];
16596
+ const _hoisted_3$h = ["for"];
16580
16597
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
16581
16598
  __name: "CheckInput",
16582
16599
  props: /* @__PURE__ */ mergeModels({
@@ -16591,34 +16608,33 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
16591
16608
  }),
16592
16609
  emits: ["update:modelValue"],
16593
16610
  setup(__props) {
16611
+ const props2 = __props;
16612
+ const inputId = ref(props2.id || Math.random().toString(36).substring(7));
16594
16613
  const checked = useModel(__props, "modelValue");
16595
16614
  return (_ctx, _cache) => {
16596
16615
  return openBlock(), createElementBlock("div", {
16597
- class: normalizeClass(["bagel-input bgl-checkbox", { small: _ctx.small }]),
16616
+ class: normalizeClass(["bagel-input bgl-checkbox align-items-center ps-025", { small: _ctx.small }]),
16598
16617
  title: _ctx.title
16599
16618
  }, [
16600
- createElementVNode("div", {
16601
- class: normalizeClass(["check-square", { checked: checked.value }]),
16602
- onClick: _cache[0] || (_cache[0] = ($event) => checked.value = !checked.value)
16603
- }, _hoisted_3$h, 2),
16604
- createElementVNode("label", null, [
16605
- withDirectives(createElementVNode("input", {
16606
- id: _ctx.id,
16607
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => checked.value = $event),
16608
- required: _ctx.required,
16609
- type: "checkbox"
16610
- }, null, 8, _hoisted_4$c), [
16611
- [vModelCheckbox, checked.value]
16612
- ]),
16619
+ withDirectives(createElementVNode("input", {
16620
+ id: inputId.value,
16621
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checked.value = $event),
16622
+ required: _ctx.required,
16623
+ type: "checkbox",
16624
+ class: "me-05"
16625
+ }, null, 8, _hoisted_2$m), [
16626
+ [vModelCheckbox, checked.value]
16627
+ ]),
16628
+ createElementVNode("label", { for: inputId.value }, [
16613
16629
  renderSlot(_ctx.$slots, "label", {}, () => [
16614
16630
  createTextVNode(toDisplayString(_ctx.label), 1)
16615
16631
  ], true)
16616
- ])
16632
+ ], 8, _hoisted_3$h)
16617
16633
  ], 10, _hoisted_1$r);
16618
16634
  };
16619
16635
  }
16620
16636
  });
16621
- const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-62e7637b"]]);
16637
+ const CheckInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-ac068f18"]]);
16622
16638
  function toDate(argument) {
16623
16639
  const argStr = Object.prototype.toString.call(argument);
16624
16640
  if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") {
@@ -25053,7 +25069,11 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
25053
25069
  enableTime: { type: Boolean, default: false },
25054
25070
  modelValue: {},
25055
25071
  defaultValue: {},
25056
- extraProps: {}
25072
+ extraProps: {},
25073
+ allowedDates: {},
25074
+ timePickerInline: { type: Boolean },
25075
+ minutesIncrement: {},
25076
+ minutesGridIncrement: {}
25057
25077
  },
25058
25078
  emits: ["update:modelValue"],
25059
25079
  setup(__props, { emit: __emit }) {
@@ -25088,8 +25108,14 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
25088
25108
  modelValue: date2.value,
25089
25109
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => date2.value = $event),
25090
25110
  "auto-apply": true,
25091
- "enable-time-picker": _ctx.enableTime
25092
- }, _ctx.extraProps), null, 16, ["modelValue", "enable-time-picker"])
25111
+ "enable-time-picker": _ctx.enableTime,
25112
+ "allowed-dates": _ctx.allowedDates
25113
+ }, _ctx.extraProps, {
25114
+ "time-picker-inline": _ctx.timePickerInline,
25115
+ "minutes-increment": _ctx.minutesIncrement,
25116
+ "minutes-grid-increment": _ctx.minutesGridIncrement,
25117
+ "start-time": { hours: 8, minutes: 0 }
25118
+ }), null, 16, ["modelValue", "enable-time-picker", "allowed-dates", "time-picker-inline", "minutes-increment", "minutes-grid-increment"])
25093
25119
  ], 10, _hoisted_1$q);
25094
25120
  };
25095
25121
  }
@@ -30742,7 +30768,7 @@ let NodeType$1 = class NodeType2 {
30742
30768
  }
30743
30769
  /**
30744
30770
  Returns true if the given fragment is valid content for this node
30745
- type.
30771
+ type with the given attributes.
30746
30772
  */
30747
30773
  validContent(content) {
30748
30774
  let result2 = this.contentMatch.matchFragment(content);
@@ -30886,7 +30912,6 @@ class Schema {
30886
30912
  Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
30887
30913
  */
30888
30914
  constructor(spec) {
30889
- this.linebreakReplacement = null;
30890
30915
  this.cached = /* @__PURE__ */ Object.create(null);
30891
30916
  let instanceSpec = this.spec = {};
30892
30917
  for (let prop3 in spec)
@@ -30900,13 +30925,6 @@ class Schema {
30900
30925
  let type3 = this.nodes[prop3], contentExpr = type3.spec.content || "", markExpr = type3.spec.marks;
30901
30926
  type3.contentMatch = contentExprCache[contentExpr] || (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));
30902
30927
  type3.inlineContent = type3.contentMatch.inlineContent;
30903
- if (type3.spec.linebreakReplacement) {
30904
- if (this.linebreakReplacement)
30905
- throw new RangeError("Multiple linebreak nodes defined");
30906
- if (!type3.isInline || !type3.isLeaf)
30907
- throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");
30908
- this.linebreakReplacement = type3;
30909
- }
30910
30928
  type3.markSet = markExpr == "_" ? null : markExpr ? gatherMarks(this, markExpr.split(" ")) : markExpr == "" || !type3.inlineContent ? [] : null;
30911
30929
  }
30912
30930
  for (let prop3 in this.marks) {
@@ -30991,12 +31009,6 @@ function gatherMarks(schema, marks) {
30991
31009
  }
30992
31010
  return found2;
30993
31011
  }
30994
- function isTagRule(rule) {
30995
- return rule.tag != null;
30996
- }
30997
- function isStyleRule(rule) {
30998
- return rule.style != null;
30999
- }
31000
31012
  class DOMParser {
31001
31013
  /**
31002
31014
  Create a parser that targets the given schema, using the given
@@ -31008,9 +31020,9 @@ class DOMParser {
31008
31020
  this.tags = [];
31009
31021
  this.styles = [];
31010
31022
  rules.forEach((rule) => {
31011
- if (isTagRule(rule))
31023
+ if (rule.tag)
31012
31024
  this.tags.push(rule);
31013
- else if (isStyleRule(rule))
31025
+ else if (rule.style)
31014
31026
  this.styles.push(rule);
31015
31027
  });
31016
31028
  this.normalizeLists = !this.tags.some((r2) => {
@@ -31271,10 +31283,10 @@ class ParseContext {
31271
31283
  this.addElement(dom);
31272
31284
  }
31273
31285
  withStyleRules(dom, f2) {
31274
- let style2 = dom.style;
31275
- if (!style2 || !style2.length)
31286
+ let style2 = dom.getAttribute("style");
31287
+ if (!style2)
31276
31288
  return f2();
31277
- let marks = this.readStyles(dom.style);
31289
+ let marks = this.readStyles(parseStyles(style2));
31278
31290
  if (!marks)
31279
31291
  return;
31280
31292
  let [addMarks, removeMarks] = marks, top2 = this.top;
@@ -31368,10 +31380,9 @@ class ParseContext {
31368
31380
  // had a rule with `ignore` set.
31369
31381
  readStyles(styles) {
31370
31382
  let add2 = Mark$1.none, remove2 = Mark$1.none;
31371
- for (let i2 = 0, l2 = styles.length; i2 < l2; i2++) {
31372
- let name = styles.item(i2);
31383
+ for (let i2 = 0; i2 < styles.length; i2 += 2) {
31373
31384
  for (let after = void 0; ; ) {
31374
- let rule = this.parser.matchStyle(name, styles.getPropertyValue(name), this, after);
31385
+ let rule = this.parser.matchStyle(styles[i2], styles[i2 + 1], this, after);
31375
31386
  if (!rule)
31376
31387
  break;
31377
31388
  if (rule.ignore)
@@ -31658,6 +31669,12 @@ function normalizeList(dom) {
31658
31669
  function matches(dom, selector2) {
31659
31670
  return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector2);
31660
31671
  }
31672
+ function parseStyles(style2) {
31673
+ let re2 = /\s*([\w-]+)\s*:\s*([^;]+)/g, m2, result2 = [];
31674
+ while (m2 = re2.exec(style2))
31675
+ result2.push(m2[1], m2[2].trim());
31676
+ return result2;
31677
+ }
31661
31678
  function copy$2(obj) {
31662
31679
  let copy2 = {};
31663
31680
  for (let prop3 in obj)
@@ -32525,8 +32542,7 @@ class ReplaceAroundStep extends Step$1 {
32525
32542
  }
32526
32543
  map(mapping) {
32527
32544
  let from2 = mapping.mapResult(this.from, 1), to2 = mapping.mapResult(this.to, -1);
32528
- let gapFrom = this.from == this.gapFrom ? from2.pos : mapping.map(this.gapFrom, -1);
32529
- let gapTo = this.to == this.gapTo ? to2.pos : mapping.map(this.gapTo, 1);
32545
+ let gapFrom = mapping.map(this.gapFrom, -1), gapTo = mapping.map(this.gapTo, 1);
32530
32546
  if (from2.deletedAcross && to2.deletedAcross || gapFrom < from2.pos || gapTo > to2.pos)
32531
32547
  return null;
32532
32548
  return new ReplaceAroundStep(from2.pos, to2.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);
@@ -32639,7 +32655,7 @@ function removeMark(tr2, from2, to2, mark) {
32639
32655
  });
32640
32656
  matched.forEach((m2) => tr2.step(new RemoveMarkStep(m2.from, m2.to, m2.style)));
32641
32657
  }
32642
- function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatch, clearNewlines = true) {
32658
+ function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatch) {
32643
32659
  let node = tr2.doc.nodeAt(pos);
32644
32660
  let replSteps = [], cur = pos + 1;
32645
32661
  for (let i2 = 0; i2 < node.childCount; i2++) {
@@ -32652,7 +32668,7 @@ function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatc
32652
32668
  for (let j = 0; j < child.marks.length; j++)
32653
32669
  if (!parentType.allowsMarkType(child.marks[j].type))
32654
32670
  tr2.step(new RemoveMarkStep(cur, end2, child.marks[j]));
32655
- if (clearNewlines && child.isText && parentType.whitespace != "pre") {
32671
+ if (child.isText && !parentType.spec.code) {
32656
32672
  let m2, newline = /\r?\n|\r/g, slice4;
32657
32673
  while (m2 = newline.exec(child.text)) {
32658
32674
  if (!slice4)
@@ -32761,45 +32777,14 @@ function setBlockType$1(tr2, from2, to2, type3, attrs) {
32761
32777
  let mapFrom = tr2.steps.length;
32762
32778
  tr2.doc.nodesBetween(from2, to2, (node, pos) => {
32763
32779
  if (node.isTextblock && !node.hasMarkup(type3, attrs) && canChangeType(tr2.doc, tr2.mapping.slice(mapFrom).map(pos), type3)) {
32764
- let convertNewlines = null;
32765
- if (type3.schema.linebreakReplacement) {
32766
- let pre = type3.whitespace == "pre", supportLinebreak = !!type3.contentMatch.matchType(type3.schema.linebreakReplacement);
32767
- if (pre && !supportLinebreak)
32768
- convertNewlines = false;
32769
- else if (!pre && supportLinebreak)
32770
- convertNewlines = true;
32771
- }
32772
- if (convertNewlines === false)
32773
- replaceLinebreaks(tr2, node, pos, mapFrom);
32774
- clearIncompatible(tr2, tr2.mapping.slice(mapFrom).map(pos, 1), type3, void 0, convertNewlines === null);
32780
+ tr2.clearIncompatible(tr2.mapping.slice(mapFrom).map(pos, 1), type3);
32775
32781
  let mapping = tr2.mapping.slice(mapFrom);
32776
32782
  let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);
32777
32783
  tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice(Fragment.from(type3.create(attrs, null, node.marks)), 0, 0), 1, true));
32778
- if (convertNewlines === true)
32779
- replaceNewlines(tr2, node, pos, mapFrom);
32780
32784
  return false;
32781
32785
  }
32782
32786
  });
32783
32787
  }
32784
- function replaceNewlines(tr2, node, pos, mapFrom) {
32785
- node.forEach((child, offset2) => {
32786
- if (child.isText) {
32787
- let m2, newline = /\r?\n|\r/g;
32788
- while (m2 = newline.exec(child.text)) {
32789
- let start2 = tr2.mapping.slice(mapFrom).map(pos + 1 + offset2 + m2.index);
32790
- tr2.replaceWith(start2, start2 + 1, node.type.schema.linebreakReplacement.create());
32791
- }
32792
- }
32793
- });
32794
- }
32795
- function replaceLinebreaks(tr2, node, pos, mapFrom) {
32796
- node.forEach((child, offset2) => {
32797
- if (child.type == child.type.schema.linebreakReplacement) {
32798
- let start2 = tr2.mapping.slice(mapFrom).map(pos + 1 + offset2);
32799
- tr2.replaceWith(start2, start2 + 1, node.type.schema.text("\n"));
32800
- }
32801
- });
32802
- }
32803
32788
  function canChangeType(doc2, pos, type3) {
32804
32789
  let $pos = doc2.resolve(pos), index2 = $pos.index();
32805
32790
  return $pos.parent.canReplaceWith(index2, index2 + 1, type3);
@@ -34565,9 +34550,6 @@ const textRange = function(node, from2, to2) {
34565
34550
  range2.setStart(node, from2 || 0);
34566
34551
  return range2;
34567
34552
  };
34568
- const clearReusedRange = function() {
34569
- reusedRange = null;
34570
- };
34571
34553
  const isEquivalentPosition = function(node, off2, targetNode, targetOff) {
34572
34554
  return targetNode && (scanFor(node, off2, targetNode, targetOff, -1) || scanFor(node, off2, targetNode, targetOff, 1));
34573
34555
  };
@@ -34595,40 +34577,6 @@ function scanFor(node, off2, targetNode, targetOff, dir) {
34595
34577
  function nodeSize(node) {
34596
34578
  return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length;
34597
34579
  }
34598
- function textNodeBefore$1(node, offset2) {
34599
- for (; ; ) {
34600
- if (node.nodeType == 3 && offset2)
34601
- return node;
34602
- if (node.nodeType == 1 && offset2 > 0) {
34603
- if (node.contentEditable == "false")
34604
- return null;
34605
- node = node.childNodes[offset2 - 1];
34606
- offset2 = nodeSize(node);
34607
- } else if (node.parentNode && !hasBlockDesc(node)) {
34608
- offset2 = domIndex(node);
34609
- node = node.parentNode;
34610
- } else {
34611
- return null;
34612
- }
34613
- }
34614
- }
34615
- function textNodeAfter$1(node, offset2) {
34616
- for (; ; ) {
34617
- if (node.nodeType == 3 && offset2 < node.nodeValue.length)
34618
- return node;
34619
- if (node.nodeType == 1 && offset2 < node.childNodes.length) {
34620
- if (node.contentEditable == "false")
34621
- return null;
34622
- node = node.childNodes[offset2];
34623
- offset2 = 0;
34624
- } else if (node.parentNode && !hasBlockDesc(node)) {
34625
- offset2 = domIndex(node) + 1;
34626
- node = node.parentNode;
34627
- } else {
34628
- return null;
34629
- }
34630
- }
34631
- }
34632
34580
  function isOnEdge(node, offset2, parent) {
34633
34581
  for (let atStart = offset2 == 0, atEnd = offset2 == nodeSize(node); atStart || atEnd; ) {
34634
34582
  if (node == parent)
@@ -34700,14 +34648,6 @@ const android = /Android \d/.test(agent);
34700
34648
  const webkit = !!doc && "webkitFontSmoothing" in doc.documentElement.style;
34701
34649
  const webkit_version = webkit ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
34702
34650
  function windowRect(doc2) {
34703
- let vp = doc2.defaultView && doc2.defaultView.visualViewport;
34704
- if (vp)
34705
- return {
34706
- left: 0,
34707
- right: vp.width,
34708
- top: 0,
34709
- bottom: vp.height
34710
- };
34711
34651
  return {
34712
34652
  left: 0,
34713
34653
  right: doc2.documentElement.clientWidth,
@@ -34909,14 +34849,14 @@ function posFromCaret(view, node, offset2, coords) {
34909
34849
  let desc = view.docView.nearestDesc(cur, true);
34910
34850
  if (!desc)
34911
34851
  return null;
34912
- if (desc.dom.nodeType == 1 && (desc.node.isBlock && desc.parent || !desc.contentDOM)) {
34852
+ if (desc.dom.nodeType == 1 && (desc.node.isBlock && desc.parent && !sawBlock || !desc.contentDOM)) {
34913
34853
  let rect = desc.dom.getBoundingClientRect();
34914
- if (desc.node.isBlock && desc.parent) {
34915
- if (!sawBlock && rect.left > coords.left || rect.top > coords.top)
34854
+ if (desc.node.isBlock && desc.parent && !sawBlock) {
34855
+ sawBlock = true;
34856
+ if (rect.left > coords.left || rect.top > coords.top)
34916
34857
  outsideBlock = desc.posBefore;
34917
- else if (!sawBlock && rect.right < coords.left || rect.bottom < coords.top)
34858
+ else if (rect.right < coords.left || rect.bottom < coords.top)
34918
34859
  outsideBlock = desc.posAfter;
34919
- sawBlock = true;
34920
34860
  }
34921
34861
  if (!desc.contentDOM && outsideBlock < 0 && !desc.node.isText) {
34922
34862
  let before = desc.node.isBlock ? coords.top < (rect.top + rect.bottom) / 2 : coords.left < (rect.left + rect.right) / 2;
@@ -35531,9 +35471,6 @@ class ViewDesc {
35531
35471
  get ignoreForCoords() {
35532
35472
  return false;
35533
35473
  }
35534
- isText(text) {
35535
- return false;
35536
- }
35537
35474
  }
35538
35475
  class WidgetViewDesc extends ViewDesc {
35539
35476
  constructor(parent, widget, view, pos) {
@@ -35772,7 +35709,8 @@ class NodeViewDesc extends ViewDesc {
35772
35709
  let { from: from2, to: to2 } = view.state.selection;
35773
35710
  if (!(view.state.selection instanceof TextSelection) || from2 < pos || to2 > pos + this.node.content.size)
35774
35711
  return null;
35775
- let textNode = view.input.compositionNode;
35712
+ let sel = view.domSelectionRange();
35713
+ let textNode = nearbyTextNode(sel.focusNode, sel.focusOffset);
35776
35714
  if (!textNode || !this.dom.contains(textNode.parentNode))
35777
35715
  return null;
35778
35716
  if (this.node.inlineContent) {
@@ -35838,11 +35776,10 @@ class NodeViewDesc extends ViewDesc {
35838
35776
  }
35839
35777
  // Remove selected node marking from this node.
35840
35778
  deselectNode() {
35841
- if (this.nodeDOM.nodeType == 1) {
35779
+ if (this.nodeDOM.nodeType == 1)
35842
35780
  this.nodeDOM.classList.remove("ProseMirror-selectednode");
35843
- if (this.contentDOM || !this.node.type.spec.draggable)
35844
- this.dom.removeAttribute("draggable");
35845
- }
35781
+ if (this.contentDOM || !this.node.type.spec.draggable)
35782
+ this.dom.removeAttribute("draggable");
35846
35783
  }
35847
35784
  get domAtom() {
35848
35785
  return this.node.isAtom;
@@ -35908,9 +35845,6 @@ class TextViewDesc extends NodeViewDesc {
35908
35845
  get domAtom() {
35909
35846
  return false;
35910
35847
  }
35911
- isText(text) {
35912
- return this.node.text == text;
35913
- }
35914
35848
  }
35915
35849
  class TrailingHackViewDesc extends ViewDesc {
35916
35850
  parseRule() {
@@ -36426,6 +36360,23 @@ function iosHacks(dom) {
36426
36360
  dom.style.cssText = oldCSS;
36427
36361
  }
36428
36362
  }
36363
+ function nearbyTextNode(node, offset2) {
36364
+ for (; ; ) {
36365
+ if (node.nodeType == 3)
36366
+ return node;
36367
+ if (node.nodeType == 1 && offset2 > 0) {
36368
+ if (node.childNodes.length > offset2 && node.childNodes[offset2].nodeType == 3)
36369
+ return node.childNodes[offset2];
36370
+ node = node.childNodes[offset2 - 1];
36371
+ offset2 = nodeSize(node);
36372
+ } else if (node.nodeType == 1 && offset2 < node.childNodes.length) {
36373
+ node = node.childNodes[offset2];
36374
+ offset2 = 0;
36375
+ } else {
36376
+ return null;
36377
+ }
36378
+ }
36379
+ }
36429
36380
  function findTextInFragment(frag, text, from2, to2) {
36430
36381
  for (let i2 = 0, pos = 0; i2 < frag.childCount && pos <= to2; ) {
36431
36382
  let child = frag.child(i2++), childStart = pos;
@@ -37000,7 +36951,7 @@ function serializeForClipboard(view, slice4) {
37000
36951
  if (firstChild && firstChild.nodeType == 1)
37001
36952
  firstChild.setAttribute("data-pm-slice", `${openStart} ${openEnd}${wrappers ? ` -${wrappers}` : ""} ${JSON.stringify(context)}`);
37002
36953
  let text = view.someProp("clipboardTextSerializer", (f2) => f2(slice4, view)) || slice4.content.textBetween(0, slice4.content.size, "\n\n");
37003
- return { dom: wrap2, text, slice: slice4 };
36954
+ return { dom: wrap2, text };
37004
36955
  }
37005
36956
  function parseFromClipboard(view, text, html, plainText, $context) {
37006
36957
  let inCode = $context.parent.type.spec.code;
@@ -37220,7 +37171,6 @@ class InputState {
37220
37171
  this.lastTouch = 0;
37221
37172
  this.lastAndroidDelete = 0;
37222
37173
  this.composing = false;
37223
- this.compositionNode = null;
37224
37174
  this.composingTimeout = -1;
37225
37175
  this.compositionNodes = [];
37226
37176
  this.compositionEndedAt = -2e8;
@@ -37469,7 +37419,7 @@ class MouseDown {
37469
37419
  }
37470
37420
  const target = flushed ? null : event.target;
37471
37421
  const targetDesc = target ? view.docView.nearestDesc(target, true) : null;
37472
- this.target = targetDesc && targetDesc.dom.nodeType == 1 ? targetDesc.dom : null;
37422
+ this.target = targetDesc ? targetDesc.dom : null;
37473
37423
  let { selection } = view.state;
37474
37424
  if (event.button == 0 && targetNode.type.spec.draggable && targetNode.type.spec.selectable !== false || selection instanceof NodeSelection && selection.from <= targetPos && selection.to > targetPos)
37475
37425
  this.mightDrag = {
@@ -37601,7 +37551,6 @@ editHandlers.compositionend = (view, event) => {
37601
37551
  view.input.composing = false;
37602
37552
  view.input.compositionEndedAt = event.timeStamp;
37603
37553
  view.input.compositionPendingChanges = view.domObserver.pendingRecords().length ? view.input.compositionID : 0;
37604
- view.input.compositionNode = null;
37605
37554
  if (view.input.compositionPendingChanges)
37606
37555
  Promise.resolve().then(() => view.domObserver.flush());
37607
37556
  view.input.compositionID++;
@@ -37621,24 +37570,6 @@ function clearComposition(view) {
37621
37570
  while (view.input.compositionNodes.length > 0)
37622
37571
  view.input.compositionNodes.pop().markParentsDirty();
37623
37572
  }
37624
- function findCompositionNode(view) {
37625
- let sel = view.domSelectionRange();
37626
- if (!sel.focusNode)
37627
- return null;
37628
- let textBefore = textNodeBefore$1(sel.focusNode, sel.focusOffset);
37629
- let textAfter = textNodeAfter$1(sel.focusNode, sel.focusOffset);
37630
- if (textBefore && textAfter && textBefore != textAfter) {
37631
- let descAfter = textAfter.pmViewDesc;
37632
- if (!descAfter || !descAfter.isText(textAfter.nodeValue)) {
37633
- return textAfter;
37634
- } else if (view.input.compositionNode == textAfter) {
37635
- let descBefore = textBefore.pmViewDesc;
37636
- if (!(!descBefore || !descBefore.isText(textBefore.nodeValue)))
37637
- return textAfter;
37638
- }
37639
- }
37640
- return textBefore || textAfter;
37641
- }
37642
37573
  function timestampFromCustomEvent() {
37643
37574
  let event = document.createEvent("Event");
37644
37575
  event.initEvent("event", true, true);
@@ -37773,8 +37704,7 @@ handlers.dragstart = (view, _event) => {
37773
37704
  if (desc && desc.node.type.spec.draggable && desc != view.docView)
37774
37705
  node = NodeSelection.create(view.state.doc, desc.posBefore);
37775
37706
  }
37776
- let draggedSlice = (node || view.state.selection).content();
37777
- let { dom, text, slice: slice4 } = serializeForClipboard(view, draggedSlice);
37707
+ let slice4 = (node || view.state.selection).content(), { dom, text } = serializeForClipboard(view, slice4);
37778
37708
  event.dataTransfer.clearData();
37779
37709
  event.dataTransfer.setData(brokenClipboardAPI ? "Text" : "text/html", dom.innerHTML);
37780
37710
  event.dataTransfer.effectAllowed = "copyMove";
@@ -38194,6 +38124,9 @@ class DecorationSet {
38194
38124
  return this;
38195
38125
  return local.length || children2.length ? new DecorationSet(local, children2) : empty$1;
38196
38126
  }
38127
+ /**
38128
+ @internal
38129
+ */
38197
38130
  forChild(offset2, node) {
38198
38131
  if (this == empty$1)
38199
38132
  return this;
@@ -38672,21 +38605,14 @@ class DOMObserver {
38672
38605
  }
38673
38606
  }
38674
38607
  }
38675
- if (gecko && added.length) {
38608
+ if (gecko && added.length > 1) {
38676
38609
  let brs = added.filter((n2) => n2.nodeName == "BR");
38677
38610
  if (brs.length == 2) {
38678
- let [a2, b2] = brs;
38611
+ let a2 = brs[0], b2 = brs[1];
38679
38612
  if (a2.parentNode && a2.parentNode.parentNode == b2.parentNode)
38680
38613
  b2.remove();
38681
38614
  else
38682
38615
  a2.remove();
38683
- } else {
38684
- let { focusNode } = this.currentSelection;
38685
- for (let br2 of brs) {
38686
- let parent = br2.parentNode;
38687
- if (parent && parent.nodeName == "LI" && (!focusNode || blockParent(view, focusNode) != parent))
38688
- br2.remove();
38689
- }
38690
38616
  }
38691
38617
  }
38692
38618
  let readSel = null;
@@ -38766,20 +38692,7 @@ function checkCSS(view) {
38766
38692
  cssCheckWarned = true;
38767
38693
  }
38768
38694
  }
38769
- function rangeToSelectionRange(view, range2) {
38770
- let anchorNode = range2.startContainer, anchorOffset = range2.startOffset;
38771
- let focusNode = range2.endContainer, focusOffset = range2.endOffset;
38772
- let currentAnchor = view.domAtPos(view.state.selection.anchor);
38773
- if (isEquivalentPosition(currentAnchor.node, currentAnchor.offset, focusNode, focusOffset))
38774
- [anchorNode, anchorOffset, focusNode, focusOffset] = [focusNode, focusOffset, anchorNode, anchorOffset];
38775
- return { anchorNode, anchorOffset, focusNode, focusOffset };
38776
- }
38777
- function safariShadowSelectionRange(view, selection) {
38778
- if (selection.getComposedRanges) {
38779
- let range2 = selection.getComposedRanges(view.root)[0];
38780
- if (range2)
38781
- return rangeToSelectionRange(view, range2);
38782
- }
38695
+ function safariShadowSelectionRange(view) {
38783
38696
  let found2;
38784
38697
  function read2(event) {
38785
38698
  event.preventDefault();
@@ -38789,15 +38702,12 @@ function safariShadowSelectionRange(view, selection) {
38789
38702
  view.dom.addEventListener("beforeinput", read2, true);
38790
38703
  document.execCommand("indent");
38791
38704
  view.dom.removeEventListener("beforeinput", read2, true);
38792
- return found2 ? rangeToSelectionRange(view, found2) : null;
38793
- }
38794
- function blockParent(view, node) {
38795
- for (let p2 = node.parentNode; p2 && p2 != view.dom; p2 = p2.parentNode) {
38796
- let desc = view.docView.nearestDesc(p2, true);
38797
- if (desc && desc.node.isBlock)
38798
- return p2;
38799
- }
38800
- return null;
38705
+ let anchorNode = found2.startContainer, anchorOffset = found2.startOffset;
38706
+ let focusNode = found2.endContainer, focusOffset = found2.endOffset;
38707
+ let currentAnchor = view.domAtPos(view.state.selection.anchor);
38708
+ if (isEquivalentPosition(currentAnchor.node, currentAnchor.offset, focusNode, focusOffset))
38709
+ [anchorNode, anchorOffset, focusNode, focusOffset] = [focusNode, focusOffset, anchorNode, anchorOffset];
38710
+ return { anchorNode, anchorOffset, focusNode, focusOffset };
38801
38711
  }
38802
38712
  function parseBetween(view, from_, to_) {
38803
38713
  let { node: parent, fromOffset, toOffset, from: from2, to: to2 } = view.docView.parseRange(from_, to_);
@@ -38917,6 +38827,10 @@ function readDOMChange(view, from2, to2, typeOver, addedNodes) {
38917
38827
  return;
38918
38828
  }
38919
38829
  }
38830
+ if (chrome && view.cursorWrapper && parse2.sel && parse2.sel.anchor == view.cursorWrapper.deco.from && parse2.sel.head == parse2.sel.anchor) {
38831
+ let size2 = change.endB - change.start;
38832
+ parse2.sel = { anchor: parse2.sel.anchor + size2, head: parse2.sel.anchor + size2 };
38833
+ }
38920
38834
  view.input.domChangeCount++;
38921
38835
  if (view.state.selection.from < view.state.selection.to && change.start == change.endB && view.state.selection instanceof TextSelection) {
38922
38836
  if (change.start > view.state.selection.from && change.start <= view.state.selection.from + 2 && view.state.selection.from >= parse2.from) {
@@ -38940,7 +38854,7 @@ function readDOMChange(view, from2, to2, typeOver, addedNodes) {
38940
38854
  view.input.lastIOSEnter = 0;
38941
38855
  return;
38942
38856
  }
38943
- if (view.state.selection.anchor > change.start && looksLikeBackspace(doc2, change.start, change.endA, $from, $to) && view.someProp("handleKeyDown", (f2) => f2(view, keyEvent(8, "Backspace")))) {
38857
+ if (view.state.selection.anchor > change.start && looksLikeJoin(doc2, change.start, change.endA, $from, $to) && view.someProp("handleKeyDown", (f2) => f2(view, keyEvent(8, "Backspace")))) {
38944
38858
  if (android && chrome)
38945
38859
  view.domObserver.suppressSelectionUpdates();
38946
38860
  return;
@@ -39024,18 +38938,12 @@ function isMarkChange(cur, prev) {
39024
38938
  if (Fragment.from(updated).eq(cur))
39025
38939
  return { mark, type: type3 };
39026
38940
  }
39027
- function looksLikeBackspace(old, start2, end2, $newStart, $newEnd) {
39028
- if (
39029
- // The content must have shrunk
39030
- end2 - start2 <= $newEnd.pos - $newStart.pos || // newEnd must point directly at or after the end of the block that newStart points into
39031
- skipClosingAndOpening($newStart, true, false) < $newEnd.pos
39032
- )
38941
+ function looksLikeJoin(old, start2, end2, $newStart, $newEnd) {
38942
+ if (!$newStart.parent.isTextblock || // The content must have shrunk
38943
+ end2 - start2 <= $newEnd.pos - $newStart.pos || // newEnd must point directly at or after the end of the block that newStart points into
38944
+ skipClosingAndOpening($newStart, true, false) < $newEnd.pos)
39033
38945
  return false;
39034
38946
  let $start = old.resolve(start2);
39035
- if (!$newStart.parent.isTextblock) {
39036
- let after = $start.nodeAfter;
39037
- return after != null && end2 == start2 + after.nodeSize;
39038
- }
39039
38947
  if ($start.parentOffset < $start.parent.content.size || !$start.parent.isTextblock)
39040
38948
  return false;
39041
38949
  let $next = old.resolve(skipClosingAndOpening($start, true, true));
@@ -39224,10 +39132,8 @@ class EditorView {
39224
39132
  let forceSelUpdate = updateDoc && (ie$1 || chrome) && !this.composing && !prev.selection.empty && !state2.selection.empty && selectionContextChanged(prev.selection, state2.selection);
39225
39133
  if (updateDoc) {
39226
39134
  let chromeKludge = chrome ? this.trackWrites = this.domSelectionRange().focusNode : null;
39227
- if (this.composing)
39228
- this.input.compositionNode = findCompositionNode(this);
39229
39135
  if (redraw || !this.docView.update(state2.doc, outerDeco, innerDeco, this)) {
39230
- this.docView.updateOuterDeco(outerDeco);
39136
+ this.docView.updateOuterDeco([]);
39231
39137
  this.docView.destroy();
39232
39138
  this.docView = docViewDesc(state2.doc, outerDeco, innerDeco, this.dom, this);
39233
39139
  }
@@ -39486,7 +39392,6 @@ class EditorView {
39486
39392
  }
39487
39393
  this.docView.destroy();
39488
39394
  this.docView = null;
39489
- clearReusedRange();
39490
39395
  }
39491
39396
  /**
39492
39397
  This is true when the view has been
@@ -39522,8 +39427,7 @@ class EditorView {
39522
39427
  @internal
39523
39428
  */
39524
39429
  domSelectionRange() {
39525
- let sel = this.domSelection();
39526
- return safari && this.root.nodeType === 11 && deepActiveElement(this.dom.ownerDocument) == this.dom && safariShadowSelectionRange(this, sel) || sel;
39430
+ return safari && this.root.nodeType === 11 && deepActiveElement(this.dom.ownerDocument) == this.dom ? safariShadowSelectionRange(this) : this.domSelection();
39527
39431
  }
39528
39432
  /**
39529
39433
  @internal
@@ -45486,16 +45390,16 @@ function mapRanges(ranges, mapping) {
45486
45390
  }
45487
45391
  return result2;
45488
45392
  }
45489
- function histTransaction(history2, state2, redo2) {
45393
+ function histTransaction(history2, state2, dispatch, redo2) {
45490
45394
  let preserveItems = mustPreserveItems(state2);
45491
45395
  let histOptions = historyKey.get(state2).spec.config;
45492
45396
  let pop = (redo2 ? history2.undone : history2.done).popEvent(state2, preserveItems);
45493
45397
  if (!pop)
45494
- return null;
45398
+ return;
45495
45399
  let selection = pop.selection.resolve(pop.transform.doc);
45496
45400
  let added = (redo2 ? history2.done : history2.undone).addTransform(pop.transform, state2.selection.getBookmark(), histOptions, preserveItems);
45497
45401
  let newHist = new HistoryState(redo2 ? added : pop.remaining, redo2 ? pop.remaining : added, null, 0, -1);
45498
- return pop.transform.setSelection(selection).setMeta(historyKey, { redo: redo2, historyState: newHist });
45402
+ dispatch(pop.transform.setSelection(selection).setMeta(historyKey, { redo: redo2, historyState: newHist }).scrollIntoView());
45499
45403
  }
45500
45404
  let cachedPreserveItems = false, cachedPreserveItemsPlugins = null;
45501
45405
  function mustPreserveItems(state2) {
@@ -45543,21 +45447,22 @@ function history(config = {}) {
45543
45447
  }
45544
45448
  });
45545
45449
  }
45546
- function buildCommand(redo2, scroll) {
45547
- return (state2, dispatch) => {
45548
- let hist = historyKey.getState(state2);
45549
- if (!hist || (redo2 ? hist.undone : hist.done).eventCount == 0)
45550
- return false;
45551
- if (dispatch) {
45552
- let tr2 = histTransaction(hist, state2, redo2);
45553
- if (tr2)
45554
- dispatch(scroll ? tr2.scrollIntoView() : tr2);
45555
- }
45556
- return true;
45557
- };
45558
- }
45559
- const undo = buildCommand(false, true);
45560
- const redo = buildCommand(true, true);
45450
+ const undo = (state2, dispatch) => {
45451
+ let hist = historyKey.getState(state2);
45452
+ if (!hist || hist.done.eventCount == 0)
45453
+ return false;
45454
+ if (dispatch)
45455
+ histTransaction(hist, state2, dispatch, false);
45456
+ return true;
45457
+ };
45458
+ const redo = (state2, dispatch) => {
45459
+ let hist = historyKey.getState(state2);
45460
+ if (!hist || hist.undone.eventCount == 0)
45461
+ return false;
45462
+ if (dispatch)
45463
+ histTransaction(hist, state2, dispatch, true);
45464
+ return true;
45465
+ };
45561
45466
  const History = Extension.create({
45562
45467
  name: "history",
45563
45468
  addOptions() {
@@ -61978,7 +61883,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
61978
61883
  };
61979
61884
  }
61980
61885
  });
61981
- const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b6feec19"]]);
61886
+ const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-718e118e"]]);
61982
61887
  const _hoisted_1$1 = { key: 0 };
61983
61888
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
61984
61889
  __name: "TabsBody",