@bagelink/vue 0.0.1104 → 0.0.1111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -9809,91 +9809,6 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
9809
9809
  }
9810
9810
  });
9811
9811
  const Flag = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["__scopeId", "data-v-f99f1900"]]);
9812
- const FORM_STATE_KEY = Symbol("bagelFormState");
9813
- function safeClone(obj) {
9814
- if (obj === null || typeof obj !== "object") return obj;
9815
- const seen = /* @__PURE__ */ new WeakSet();
9816
- return JSON.parse(JSON.stringify(obj, (key, value) => {
9817
- if (typeof value === "object" && value !== null) {
9818
- if (seen.has(value)) {
9819
- return void 0;
9820
- }
9821
- seen.add(value);
9822
- }
9823
- return value;
9824
- }));
9825
- }
9826
- function provideBagelFormState(initialData) {
9827
- const data2 = ref(initialData);
9828
- const isDirty = ref(false);
9829
- const getFieldData = (path) => {
9830
- if (!path) return "";
9831
- const keys4 = path.split(/[.[]/);
9832
- let current = data2.value;
9833
- for (let i2 = 0; i2 < keys4.length; i2++) {
9834
- const key = keys4[i2];
9835
- if (!current || typeof current !== "object" || !(key in current)) {
9836
- return "";
9837
- }
9838
- current = current[key];
9839
- }
9840
- return current ?? "";
9841
- };
9842
- const updateField = (path, value) => {
9843
- const keys4 = path.split(/[.[]/);
9844
- if (typeof data2.value !== "object" || data2.value === null) {
9845
- data2.value = {};
9846
- }
9847
- let current = data2.value;
9848
- for (let i2 = 0; i2 < keys4.length - 1; i2++) {
9849
- const key = keys4[i2];
9850
- if (!(key in current) || typeof current[key] !== "object" || current[key] === null) {
9851
- current[key] = {};
9852
- }
9853
- current = current[key];
9854
- }
9855
- const safeValue = safeClone(value);
9856
- current[keys4[keys4.length - 1]] = safeValue;
9857
- isDirty.value = true;
9858
- };
9859
- const state2 = {
9860
- data: data2,
9861
- getFieldData,
9862
- updateField,
9863
- isDirty
9864
- };
9865
- provide(FORM_STATE_KEY, state2);
9866
- return state2;
9867
- }
9868
- function useBagelFormState() {
9869
- const state2 = inject(FORM_STATE_KEY);
9870
- if (!state2) throw new Error("BagelFormState must be provided");
9871
- return state2;
9872
- }
9873
- function useFormField(props2) {
9874
- const formState = inject(FORM_STATE_KEY);
9875
- const fieldData = computed({
9876
- get: () => {
9877
- if (!props2.fieldID || !formState) return props2.modelValue ?? props2.field.defaultValue ?? "";
9878
- const value = formState.getFieldData(props2.fieldID);
9879
- if (props2.field.$el === "form" && !value) return {};
9880
- return value ?? "";
9881
- },
9882
- set: (val) => {
9883
- if (!props2.fieldID || !formState) return;
9884
- const currentValue = formState.getFieldData(props2.fieldID);
9885
- if (JSON.stringify(val) === JSON.stringify(currentValue)) return;
9886
- if (props2.field.onUpdate) {
9887
- props2.field.onUpdate(val, currentValue);
9888
- }
9889
- formState.updateField(props2.fieldID, val);
9890
- }
9891
- });
9892
- return {
9893
- fieldData,
9894
- formState
9895
- };
9896
- }
9897
9812
  const state$1 = reactive(/* @__PURE__ */ new Map());
9898
9813
  function useTabs(group) {
9899
9814
  if (!state$1.has(group)) {
@@ -9998,6 +9913,67 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
9998
9913
  }
9999
9914
  });
10000
9915
  const TabsNav = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-307612a9"]]);
9916
+ const FORM_STATE_KEY = Symbol("bagelFormState");
9917
+ function safeClone(obj) {
9918
+ if (obj === null || typeof obj !== "object") return obj;
9919
+ const seen = /* @__PURE__ */ new WeakSet();
9920
+ return JSON.parse(JSON.stringify(obj, (key, value) => {
9921
+ if (typeof value === "object" && value !== null) {
9922
+ if (seen.has(value)) {
9923
+ return void 0;
9924
+ }
9925
+ seen.add(value);
9926
+ }
9927
+ return value;
9928
+ }));
9929
+ }
9930
+ function provideBagelFormState(initialData) {
9931
+ const data2 = ref(initialData);
9932
+ const isDirty = ref(false);
9933
+ const getFieldData = (path) => {
9934
+ if (!path) return "";
9935
+ const keys4 = path.split(/[.[]/);
9936
+ let current = data2.value;
9937
+ for (let i2 = 0; i2 < keys4.length; i2++) {
9938
+ const key = keys4[i2];
9939
+ if (!current || typeof current !== "object" || !(key in current)) {
9940
+ return "";
9941
+ }
9942
+ current = current[key];
9943
+ }
9944
+ return current ?? "";
9945
+ };
9946
+ const updateField = (path, value) => {
9947
+ const keys4 = path.split(/[.[]/);
9948
+ if (typeof data2.value !== "object" || data2.value === null) {
9949
+ data2.value = {};
9950
+ }
9951
+ let current = data2.value;
9952
+ for (let i2 = 0; i2 < keys4.length - 1; i2++) {
9953
+ const key = keys4[i2];
9954
+ if (!(key in current) || typeof current[key] !== "object" || current[key] === null) {
9955
+ current[key] = {};
9956
+ }
9957
+ current = current[key];
9958
+ }
9959
+ const safeValue = safeClone(value);
9960
+ current[keys4[keys4.length - 1]] = safeValue;
9961
+ isDirty.value = true;
9962
+ };
9963
+ const state2 = {
9964
+ data: data2,
9965
+ getFieldData,
9966
+ updateField,
9967
+ isDirty
9968
+ };
9969
+ provide(FORM_STATE_KEY, state2);
9970
+ return state2;
9971
+ }
9972
+ function useBagelFormState() {
9973
+ const state2 = inject(FORM_STATE_KEY);
9974
+ if (!state2) throw new Error("BagelFormState must be provided");
9975
+ return state2;
9976
+ }
10001
9977
  const _hoisted_1$K = { key: 1 };
10002
9978
  const _sfc_main$T = /* @__PURE__ */ defineComponent({
10003
9979
  __name: "BglField",
@@ -10010,7 +9986,8 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
10010
9986
  emits: ["update:modelValue"],
10011
9987
  setup(__props, { emit: __emit }) {
10012
9988
  const props2 = __props;
10013
- const { fieldData } = useFormField(props2);
9989
+ const emit2 = __emit;
9990
+ const formState = inject(FORM_STATE_KEY) ?? provideBagelFormState(props2.modelValue);
10014
9991
  const customAttrs = ref({});
10015
9992
  const is4 = computed(() => {
10016
9993
  if (props2.field.$el === "text") return TextInput;
@@ -10031,24 +10008,50 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
10031
10008
  if (props2.field.$el === "bglform") return _sfc_main$S;
10032
10009
  return props2.field.$el ?? "div";
10033
10010
  });
10011
+ const fieldData = computed({
10012
+ get: () => {
10013
+ if (!props2.fieldID) return props2.field.defaultValue ?? (props2.field.$el === "form" ? {} : "");
10014
+ const value = formState.getFieldData(props2.fieldID);
10015
+ if (props2.field.$el === "form" && !value) return {};
10016
+ return value ?? "";
10017
+ },
10018
+ set: (val) => {
10019
+ if (!props2.fieldID) return;
10020
+ const currentValue = formState.getFieldData(props2.fieldID);
10021
+ if (JSON.stringify(val) === JSON.stringify(currentValue)) return;
10022
+ emit2("update:modelValue", val);
10023
+ if (props2.field.onUpdate) {
10024
+ props2.field.onUpdate(val, currentValue);
10025
+ }
10026
+ formState.updateField(props2.fieldID, val);
10027
+ }
10028
+ });
10029
+ const vIf = computed(() => {
10030
+ if (props2.field["v-if"] === void 0 && props2.field.vIf === void 0) return true;
10031
+ if (typeof props2.field["v-if"] === "boolean" || typeof props2.field.vIf === "boolean") return props2.field["v-if"];
10032
+ if (typeof props2.field["v-if"] === "string" || typeof props2.field.vIf === "string") return true;
10033
+ if (typeof props2.field["v-if"] === "function") return props2.field["v-if"](fieldData.value, formState.data.value);
10034
+ if (typeof props2.field.vIf === "function") return props2.field.vIf(fieldData.value, formState.data.value);
10035
+ return true;
10036
+ });
10034
10037
  const computedOptions = computed(
10035
- () => bindAttrs({ options: props2.field.options }, fieldData, props2.modelValue).options
10038
+ () => bindAttrs({ options: props2.field.options }, fieldData.value, formState.data.value).options
10036
10039
  );
10037
10040
  const computedAttrs = computed(() => {
10038
10041
  const attrs = { ...customAttrs.value, ...props2.field.attrs };
10039
- return bindAttrs(attrs, fieldData, props2.modelValue);
10042
+ return bindAttrs(attrs, fieldData.value, formState.data.value);
10040
10043
  });
10041
10044
  const computedClass = computed(
10042
10045
  () => {
10043
10046
  var _a2;
10044
- return classify(fieldData, props2.modelValue, props2.field.class, (_a2 = props2.field.attrs) == null ? void 0 : _a2.class);
10047
+ return classify(fieldData.value, formState.data.value, props2.field.class, (_a2 = props2.field.attrs) == null ? void 0 : _a2.class);
10045
10048
  }
10046
10049
  );
10047
10050
  return (_ctx, _cache) => {
10048
10051
  const _component_BglField = resolveComponent("BglField", true);
10049
- return _ctx.field.vIf === void 0 || _ctx.field.vIf ? (openBlock(), createBlock(resolveDynamicComponent(is4.value), mergeProps({ key: 0 }, computedAttrs.value, {
10050
- modelValue: unref(fieldData),
10051
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(fieldData) ? fieldData.value = $event : null),
10052
+ return vIf.value ? (openBlock(), createBlock(resolveDynamicComponent(is4.value), mergeProps({ key: 0 }, computedAttrs.value, {
10053
+ modelValue: fieldData.value,
10054
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fieldData.value = $event),
10052
10055
  fieldID: props2.fieldID,
10053
10056
  required: _ctx.field.required,
10054
10057
  class: computedClass.value,
@@ -19751,114 +19754,15 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
19751
19754
  };
19752
19755
  }
19753
19756
  });
19754
- const _hoisted_1$A = { key: 0 };
19755
- const _hoisted_2$p = ["src", "alt", "width", "height"];
19756
- const _hoisted_3$k = ["src", "alt", "width", "height"];
19757
- const _sfc_main$I = /* @__PURE__ */ defineComponent({
19758
- __name: "Image",
19759
- props: {
19760
- src: {},
19761
- pathKey: {},
19762
- alt: { default: "" },
19763
- width: {},
19764
- height: {},
19765
- caption: {}
19766
- },
19767
- setup(__props) {
19768
- let imageSrc = ref(null);
19769
- const fileBaseUrl = computed(() => "https://files.bagel.design".replace(/\/$/, ""));
19770
- function pathToUrl() {
19771
- var _a2;
19772
- if ((_a2 = __props.pathKey) == null ? void 0 : _a2.startsWith("static/")) return `${void 0}/${__props.pathKey}`;
19773
- return `${fileBaseUrl.value}/${__props.pathKey}`;
19774
- }
19775
- async function loadImage() {
19776
- var _a2;
19777
- const url = __props.src || pathToUrl();
19778
- console.log(url);
19779
- if (!url) {
19780
- imageSrc.value = null;
19781
- return;
19782
- }
19783
- const ext = (_a2 = url.split(".").pop()) == null ? void 0 : _a2.toLowerCase().split("?").shift();
19784
- if (ext === "heic") {
19785
- if (!("caches" in window)) {
19786
- console.warn("Caching is not available. Proceeding without cache.");
19787
- } else {
19788
- try {
19789
- const imgCache = await window.caches.open("img-cache");
19790
- const cachedResponse = await imgCache.match(url);
19791
- if (cachedResponse) {
19792
- imageSrc.value = URL.createObjectURL(await cachedResponse.blob());
19793
- return;
19794
- }
19795
- } catch (error) {
19796
- console.warn("Error accessing cache:", error);
19797
- }
19798
- }
19799
- try {
19800
- await appendScript("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");
19801
- const response = await fetch(url);
19802
- const blob = await response.blob();
19803
- const convertedBlob = await window.heic2any({ blob });
19804
- imageSrc.value = URL.createObjectURL(convertedBlob);
19805
- if ("caches" in window) {
19806
- try {
19807
- const imgCache = await window.caches.open("img-cache");
19808
- imgCache.put(url, new Response(convertedBlob));
19809
- } catch (cacheError) {
19810
- console.warn("Failed to cache the image:", cacheError);
19811
- }
19812
- }
19813
- } catch (error) {
19814
- console.error("Error converting HEIC file:", error);
19815
- }
19816
- } else {
19817
- imageSrc.value = url;
19818
- }
19819
- }
19820
- watch(() => [__props.src, __props.pathKey], loadImage, { immediate: true });
19821
- return (_ctx, _cache) => {
19822
- return _ctx.caption ? (openBlock(), createElementBlock("figcaption", _hoisted_1$A, [
19823
- unref(imageSrc) ? (openBlock(), createElementBlock("img", mergeProps({
19824
- key: 0,
19825
- src: unref(imageSrc)
19826
- }, _ctx.$attrs, {
19827
- alt: _ctx.alt,
19828
- width: unref(normalizeDimension)(_ctx.width),
19829
- height: unref(normalizeDimension)(_ctx.height)
19830
- }), null, 16, _hoisted_2$p)) : (openBlock(), createBlock(unref(Skeleton), {
19831
- key: 1,
19832
- class: "img-web-kit",
19833
- width: unref(normalizeDimension)(_ctx.width),
19834
- height: unref(normalizeDimension)(_ctx.height)
19835
- }, null, 8, ["width", "height"]))
19836
- ])) : unref(imageSrc) ? (openBlock(), createElementBlock("img", mergeProps({
19837
- key: 1,
19838
- src: unref(imageSrc)
19839
- }, _ctx.$attrs, {
19840
- alt: _ctx.alt,
19841
- width: unref(normalizeDimension)(_ctx.width),
19842
- height: unref(normalizeDimension)(_ctx.height)
19843
- }), null, 16, _hoisted_3$k)) : (openBlock(), createBlock(unref(Skeleton), {
19844
- key: 2,
19845
- class: "img-web-kit",
19846
- width: unref(normalizeDimension)(_ctx.width),
19847
- height: unref(normalizeDimension)(_ctx.height)
19848
- }, null, 8, ["width", "height"]));
19849
- };
19850
- }
19851
- });
19852
- const Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-29509e85"]]);
19853
- const _hoisted_1$z = { class: "bagel-input" };
19854
- const _hoisted_2$o = {
19757
+ const _hoisted_1$A = { class: "bagel-input" };
19758
+ const _hoisted_2$p = {
19855
19759
  key: 0,
19856
19760
  placeholder: "required",
19857
19761
  type: "text",
19858
19762
  required: "",
19859
19763
  class: "pixel"
19860
19764
  };
19861
- const _hoisted_3$j = { class: "m-05 flex opacity-7 z-99" };
19765
+ const _hoisted_3$k = { class: "m-05 flex opacity-7 z-99" };
19862
19766
  const _hoisted_4$d = { class: "ellipsis-1 word-break-all h-20 m-0" };
19863
19767
  const _hoisted_5$c = {
19864
19768
  key: 1,
@@ -19888,7 +19792,7 @@ const _hoisted_13$2 = {
19888
19792
  class: "progress"
19889
19793
  };
19890
19794
  const _hoisted_14$1 = { class: "p-1 flex column hover fileUploadPlaceHolder justify-content-center mb-05" };
19891
- const _sfc_main$H = /* @__PURE__ */ defineComponent({
19795
+ const _sfc_main$I = /* @__PURE__ */ defineComponent({
19892
19796
  __name: "FileUpload",
19893
19797
  props: /* @__PURE__ */ mergeModels({
19894
19798
  label: {},
@@ -20060,9 +19964,9 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
20060
19964
  return (_ctx, _cache) => {
20061
19965
  const _directive_tooltip = resolveDirective("tooltip");
20062
19966
  const _directive_lightbox = resolveDirective("lightbox");
20063
- return openBlock(), createElementBlock("div", _hoisted_1$z, [
19967
+ return openBlock(), createElementBlock("div", _hoisted_1$A, [
20064
19968
  createElementVNode("label", null, toDisplayString(_ctx.label), 1),
20065
- _ctx.required && !storageFiles.value.length ? (openBlock(), createElementBlock("input", _hoisted_2$o)) : createCommentVNode("", true),
19969
+ _ctx.required && !storageFiles.value.length ? (openBlock(), createElementBlock("input", _hoisted_2$p)) : createCommentVNode("", true),
20066
19970
  _ctx.theme === "basic" ? (openBlock(), createBlock(unref(_sfc_main$$), {
20067
19971
  key: 1,
20068
19972
  outline: "",
@@ -20088,7 +19992,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
20088
19992
  key: file.id,
20089
19993
  class: "txt-gray txt-12 flex"
20090
19994
  }, [
20091
- createElementVNode("div", _hoisted_3$j, [
19995
+ createElementVNode("div", _hoisted_3$k, [
20092
19996
  withDirectives(createVNode(unref(Btn), {
20093
19997
  color: "gray",
20094
19998
  thin: "",
@@ -20158,7 +20062,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
20158
20062
  key: file.id,
20159
20063
  class: "multi-image-item-preview"
20160
20064
  }, [
20161
- isImage(file.extension || file.url) ? (openBlock(), createBlock(Image$1, {
20065
+ isImage(file.extension || file.url) ? (openBlock(), createBlock(unref(Image$1), {
20162
20066
  key: 0,
20163
20067
  class: "multi-preview",
20164
20068
  src: file.url,
@@ -20186,7 +20090,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
20186
20090
  class: "multi-image-item-preview"
20187
20091
  }, [
20188
20092
  isImage(fileQ.file.type) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
20189
- _ctx.multiple ? (openBlock(), createBlock(Image$1, {
20093
+ _ctx.multiple ? (openBlock(), createBlock(unref(Image$1), {
20190
20094
  key: 0,
20191
20095
  width: _ctx.width || "220",
20192
20096
  class: "multi-preview",
@@ -20249,7 +20153,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
20249
20153
  ])
20250
20154
  ]),
20251
20155
  isImage(file.extension || file.url) ? (openBlock(), createElementBlock("div", _hoisted_12$2, [
20252
- withDirectives(createVNode(Image$1, {
20156
+ withDirectives(createVNode(unref(Image$1), {
20253
20157
  class: "single-preview",
20254
20158
  src: file.url,
20255
20159
  alt: ""
@@ -20282,7 +20186,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
20282
20186
  icon: "check"
20283
20187
  })
20284
20188
  ], 6),
20285
- isImage(fileQ.file.type) ? (openBlock(), createBlock(Image$1, {
20189
+ isImage(fileQ.file.type) ? (openBlock(), createBlock(unref(Image$1), {
20286
20190
  key: 0,
20287
20191
  class: "single-preview",
20288
20192
  src: fileToUrl(fileQ.file),
@@ -20308,11 +20212,11 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
20308
20212
  };
20309
20213
  }
20310
20214
  });
20311
- const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-438b09e8"]]);
20312
- const _hoisted_1$y = ["title"];
20313
- const _hoisted_2$n = { key: 0 };
20314
- const _hoisted_3$i = ["value", "placeholder"];
20315
- const _sfc_main$G = /* @__PURE__ */ defineComponent({
20215
+ const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-133a8c7a"]]);
20216
+ const _hoisted_1$z = ["title"];
20217
+ const _hoisted_2$o = { key: 0 };
20218
+ const _hoisted_3$j = ["value", "placeholder"];
20219
+ const _sfc_main$H = /* @__PURE__ */ defineComponent({
20316
20220
  __name: "JSONInput",
20317
20221
  props: {
20318
20222
  description: { default: "" },
@@ -20335,7 +20239,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
20335
20239
  class: normalizeClass(["bagel-input", { small: _ctx.small }]),
20336
20240
  title: _ctx.description
20337
20241
  }, [
20338
- _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$n, [
20242
+ _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$o, [
20339
20243
  createVNode(_component_LangText, { input: _ctx.label }, null, 8, ["input"])
20340
20244
  ])) : createCommentVNode("", true),
20341
20245
  createElementVNode("textarea", {
@@ -20343,20 +20247,20 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
20343
20247
  class: normalizeClass({ "no-edit": !_ctx.editMode }),
20344
20248
  placeholder: _ctx.placeholder,
20345
20249
  onInput: handleInput
20346
- }, null, 42, _hoisted_3$i)
20347
- ], 10, _hoisted_1$y);
20250
+ }, null, 42, _hoisted_3$j)
20251
+ ], 10, _hoisted_1$z);
20348
20252
  };
20349
20253
  }
20350
20254
  });
20351
- const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-1cbaeab2"]]);
20352
- const _hoisted_1$x = ["for"];
20353
- const _hoisted_2$m = ["id", "placeholder", "disabled", "required", "readonly", "onKeydown"];
20354
- const _hoisted_3$h = { key: 1 };
20255
+ const JSONInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-1cbaeab2"]]);
20256
+ const _hoisted_1$y = ["for"];
20257
+ const _hoisted_2$n = ["id", "placeholder", "disabled", "required", "readonly", "onKeydown"];
20258
+ const _hoisted_3$i = { key: 1 };
20355
20259
  const _hoisted_4$c = {
20356
20260
  key: 5,
20357
20261
  class: "flex column spinner"
20358
20262
  };
20359
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
20263
+ const _sfc_main$G = /* @__PURE__ */ defineComponent({
20360
20264
  __name: "NumberInput",
20361
20265
  props: {
20362
20266
  modelValue: {},
@@ -20434,6 +20338,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20434
20338
  flat: "",
20435
20339
  icon: "add",
20436
20340
  class: normalizeClass(["radius", [{ "bgl-big-ctrl-num-btn": _ctx.layout === "vertical" }]]),
20341
+ tabindex: "-1",
20437
20342
  onClick: increment
20438
20343
  }, null, 8, ["class"])) : createCommentVNode("", true),
20439
20344
  withDirectives(createElementVNode("input", {
@@ -20458,7 +20363,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20458
20363
  withKeys(withModifiers(increment, ["prevent"]), ["up"]),
20459
20364
  withKeys(withModifiers(decrement, ["prevent"]), ["down"])
20460
20365
  ]
20461
- }, null, 42, _hoisted_2$m), [
20366
+ }, null, 42, _hoisted_2$n), [
20462
20367
  [
20463
20368
  vModelText,
20464
20369
  unref(formattedValue),
@@ -20472,7 +20377,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20472
20377
  { number: true }
20473
20378
  ]
20474
20379
  ]),
20475
- _ctx.helptext ? (openBlock(), createElementBlock("p", _hoisted_3$h, toDisplayString(_ctx.helptext), 1)) : createCommentVNode("", true),
20380
+ _ctx.helptext ? (openBlock(), createElementBlock("p", _hoisted_3$i, toDisplayString(_ctx.helptext), 1)) : createCommentVNode("", true),
20476
20381
  _ctx.iconStart ? (openBlock(), createBlock(unref(_sfc_main$d), {
20477
20382
  key: 2,
20478
20383
  class: "iconStart",
@@ -20487,6 +20392,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20487
20392
  flat: "",
20488
20393
  icon: "remove",
20489
20394
  class: normalizeClass(["radius", [{ "bgl-big-ctrl-num-btn": _ctx.layout === "vertical" }]]),
20395
+ tabindex: "-1",
20490
20396
  onClick: decrement
20491
20397
  }, null, 8, ["class"])) : createCommentVNode("", true),
20492
20398
  _ctx.spinner && (!_ctx.layout || !btnLayouts.includes(_ctx.layout)) ? (openBlock(), createElementBlock("div", _hoisted_4$c, [
@@ -20496,6 +20402,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20496
20402
  thin: "",
20497
20403
  class: "bgl-ctrl-num-btn ctrl-add color-gray top-bgl-ctrl-num-btn",
20498
20404
  disabled: !canAdd.value,
20405
+ tabindex: "-1",
20499
20406
  onClick: increment
20500
20407
  }, null, 8, ["disabled"]),
20501
20408
  createVNode(unref(Btn), {
@@ -20504,18 +20411,19 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20504
20411
  thin: "",
20505
20412
  class: "bgl-ctrl-num-btn ctrl-remove color-gray",
20506
20413
  disabled: !canDecrement.value,
20414
+ tabindex: "-1",
20507
20415
  onClick: decrement
20508
20416
  }, null, 8, ["disabled"])
20509
20417
  ])) : createCommentVNode("", true)
20510
20418
  ], 2)
20511
- ], 8, _hoisted_1$x)
20419
+ ], 8, _hoisted_1$y)
20512
20420
  ], 2);
20513
20421
  };
20514
20422
  }
20515
20423
  });
20516
- const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-3a20cf4a"]]);
20517
- const _hoisted_1$w = ["value", "autofocus", "onKeydown", "onPaste"];
20518
- const _sfc_main$E = /* @__PURE__ */ defineComponent({
20424
+ const NumberInput = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["__scopeId", "data-v-f265687e"]]);
20425
+ const _hoisted_1$x = ["value", "autofocus", "onKeydown", "onPaste"];
20426
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
20519
20427
  __name: "OTP",
20520
20428
  props: {
20521
20429
  digitCount: {},
@@ -20613,16 +20521,16 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
20613
20521
  oninput: "this.value = this.value.slice(0, 1);",
20614
20522
  onKeydown: ($event) => handleKeyDown($event, ind),
20615
20523
  onPaste: ($event) => handlePaste($event, ind)
20616
- }, null, 40, _hoisted_1$w);
20524
+ }, null, 40, _hoisted_1$x);
20617
20525
  }), 128))
20618
20526
  ], 512);
20619
20527
  };
20620
20528
  }
20621
20529
  });
20622
- const OTP = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["__scopeId", "data-v-5c22c199"]]);
20623
- const _hoisted_1$v = { class: "relative" };
20624
- const _hoisted_2$l = { class: "m-password position-bottom-end flex column justify-content-center" };
20625
- const _sfc_main$D = /* @__PURE__ */ defineComponent({
20530
+ const OTP = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-5c22c199"]]);
20531
+ const _hoisted_1$w = { class: "relative" };
20532
+ const _hoisted_2$m = { class: "m-password position-bottom-end flex column justify-content-center" };
20533
+ const _sfc_main$E = /* @__PURE__ */ defineComponent({
20626
20534
  __name: "PasswordInput",
20627
20535
  props: /* @__PURE__ */ mergeModels({
20628
20536
  id: {},
@@ -20663,7 +20571,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
20663
20571
  );
20664
20572
  const inputType = computed(() => showPwd.value ? "text" : "password");
20665
20573
  return (_ctx, _cache) => {
20666
- return openBlock(), createElementBlock("div", _hoisted_1$v, [
20574
+ return openBlock(), createElementBlock("div", _hoisted_1$w, [
20667
20575
  createVNode(unref(TextInput), mergeProps({
20668
20576
  modelValue: password.value,
20669
20577
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => password.value = $event)
@@ -20671,7 +20579,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
20671
20579
  type: inputType.value,
20672
20580
  class: "mb-0"
20673
20581
  }), null, 16, ["modelValue", "type"]),
20674
- createElementVNode("div", _hoisted_2$l, [
20582
+ createElementVNode("div", _hoisted_2$m, [
20675
20583
  createVNode(unref(Btn), {
20676
20584
  flat: "",
20677
20585
  thin: "",
@@ -20684,9 +20592,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
20684
20592
  };
20685
20593
  }
20686
20594
  });
20687
- const _hoisted_1$u = ["for"];
20688
- const _hoisted_2$k = ["id", "name", "value", "required"];
20689
- const _hoisted_3$g = { class: "flex w-100 gap-1 flex-wrap m_gap-05 m_gap-row-025" };
20595
+ const _hoisted_1$v = ["for"];
20596
+ const _hoisted_2$l = ["id", "name", "value", "required"];
20597
+ const _hoisted_3$h = { class: "flex w-100 gap-1 flex-wrap m_gap-05 m_gap-row-025" };
20690
20598
  const _hoisted_4$b = ["src", "alt"];
20691
20599
  const _hoisted_5$b = { class: "" };
20692
20600
  const _hoisted_6$9 = {
@@ -20697,7 +20605,7 @@ const _hoisted_7$6 = {
20697
20605
  key: 1,
20698
20606
  class: "txt-gray txt-12 m-0"
20699
20607
  };
20700
- const _sfc_main$C = /* @__PURE__ */ defineComponent({
20608
+ const _sfc_main$D = /* @__PURE__ */ defineComponent({
20701
20609
  __name: "RadioGroup",
20702
20610
  props: /* @__PURE__ */ mergeModels({
20703
20611
  groupName: {},
@@ -20727,10 +20635,10 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
20727
20635
  name: _ctx.groupName,
20728
20636
  value: opt.value,
20729
20637
  required: _ctx.required
20730
- }, null, 8, _hoisted_2$k), [
20638
+ }, null, 8, _hoisted_2$l), [
20731
20639
  [vModelRadio, selectedOption.value]
20732
20640
  ]),
20733
- createElementVNode("div", _hoisted_3$g, [
20641
+ createElementVNode("div", _hoisted_3$h, [
20734
20642
  opt.imgSrc ? (openBlock(), createElementBlock("img", {
20735
20643
  key: 0,
20736
20644
  class: "bg-popup shadow-light py-025 radius-05 m_w40",
@@ -20752,19 +20660,19 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
20752
20660
  icon: "delete",
20753
20661
  onClick: ($event) => _ctx.$emit("delete", opt)
20754
20662
  }, null, 8, ["onClick"])) : createCommentVNode("", true)
20755
- ], 8, _hoisted_1$u);
20663
+ ], 8, _hoisted_1$v);
20756
20664
  }), 128))
20757
20665
  ]);
20758
20666
  };
20759
20667
  }
20760
20668
  });
20761
- const RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-3c77be46"]]);
20762
- const _hoisted_1$t = { class: "bagel-input" };
20763
- const _hoisted_2$j = { class: "pb-025" };
20764
- const _hoisted_3$f = { class: "flex gap-05 flex-wrap" };
20669
+ const RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-3c77be46"]]);
20670
+ const _hoisted_1$u = { class: "bagel-input" };
20671
+ const _hoisted_2$k = { class: "pb-025" };
20672
+ const _hoisted_3$g = { class: "flex gap-05 flex-wrap" };
20765
20673
  const _hoisted_4$a = ["id", "name", "value", "checked"];
20766
20674
  const _hoisted_5$a = ["for"];
20767
- const _sfc_main$B = /* @__PURE__ */ defineComponent({
20675
+ const _sfc_main$C = /* @__PURE__ */ defineComponent({
20768
20676
  __name: "RadioPillsInput",
20769
20677
  props: {
20770
20678
  options: {},
@@ -20805,9 +20713,9 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
20805
20713
  selectedValue.value = props2.modelValue;
20806
20714
  });
20807
20715
  return (_ctx, _cache) => {
20808
- return openBlock(), createElementBlock("div", _hoisted_1$t, [
20809
- createElementVNode("label", _hoisted_2$j, toDisplayString(_ctx.label), 1),
20810
- createElementVNode("div", _hoisted_3$f, [
20716
+ return openBlock(), createElementBlock("div", _hoisted_1$u, [
20717
+ createElementVNode("label", _hoisted_2$k, toDisplayString(_ctx.label), 1),
20718
+ createElementVNode("div", _hoisted_3$g, [
20811
20719
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option2, index2) => {
20812
20720
  return openBlock(), createElementBlock("div", {
20813
20721
  key: index2,
@@ -20831,18 +20739,18 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
20831
20739
  };
20832
20740
  }
20833
20741
  });
20834
- const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-cf892d71"]]);
20835
- const _hoisted_1$s = ["dir"];
20836
- const _hoisted_2$i = {
20742
+ const RadioPillsInput = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-cf892d71"]]);
20743
+ const _hoisted_1$t = ["dir"];
20744
+ const _hoisted_2$j = {
20837
20745
  key: 0,
20838
20746
  class: "label"
20839
20747
  };
20840
- const _hoisted_3$e = { class: "range-slider relative w-100" };
20748
+ const _hoisted_3$f = { class: "range-slider relative w-100" };
20841
20749
  const _hoisted_4$9 = ["id", "value", "min", "max", "step", "required", "disabled", "aria-label"];
20842
20750
  const _hoisted_5$9 = ["value", "min", "max", "step", "required", "disabled"];
20843
20751
  const _hoisted_6$8 = { class: "track absolute pointer-events-none overflow-hidden round" };
20844
20752
  const _hoisted_7$5 = { class: "txt-center txt-14 user-select-none range-slider-txt flex space-between opacity-4 mx-05" };
20845
- const _sfc_main$A = /* @__PURE__ */ defineComponent({
20753
+ const _sfc_main$B = /* @__PURE__ */ defineComponent({
20846
20754
  __name: "RangeInput",
20847
20755
  props: {
20848
20756
  modelValue: {},
@@ -20910,8 +20818,8 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
20910
20818
  return openBlock(), createElementBlock("div", {
20911
20819
  dir: unref(rtl) ? "rtl" : "ltr"
20912
20820
  }, [
20913
- unref(label) ? (openBlock(), createElementBlock("label", _hoisted_2$i, toDisplayString(unref(label)), 1)) : createCommentVNode("", true),
20914
- createElementVNode("div", _hoisted_3$e, [
20821
+ unref(label) ? (openBlock(), createElementBlock("label", _hoisted_2$j, toDisplayString(unref(label)), 1)) : createCommentVNode("", true),
20822
+ createElementVNode("div", _hoisted_3$f, [
20915
20823
  createElementVNode("input", {
20916
20824
  id: unref(id),
20917
20825
  value: validFrom.value,
@@ -21002,11 +20910,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
21002
20910
  createElementVNode("span", null, toDisplayString(unref(formatValue)(unref(max2))), 1)
21003
20911
  ], true)
21004
20912
  ])
21005
- ], 8, _hoisted_1$s);
20913
+ ], 8, _hoisted_1$t);
21006
20914
  };
21007
20915
  }
21008
20916
  });
21009
- const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-e606435a"]]);
20917
+ const RangeInput = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["__scopeId", "data-v-e606435a"]]);
21010
20918
  const tableTools = [
21011
20919
  "mergeCells",
21012
20920
  "splitCells",
@@ -21096,12 +21004,12 @@ const toolbarOptions = [
21096
21004
  { name: "separator" },
21097
21005
  { name: "fullScreen", label: "Full Screen", icon: "fullscreen", class: "ms-auto" }
21098
21006
  ];
21099
- const _hoisted_1$r = { class: "grid grid-wrap p-05" };
21100
- const _hoisted_2$h = ["onMousemove", "onClick"];
21101
- const _hoisted_3$d = { class: "txt-center txt-12 color-gray" };
21007
+ const _hoisted_1$s = { class: "grid grid-wrap p-05" };
21008
+ const _hoisted_2$i = ["onMousemove", "onClick"];
21009
+ const _hoisted_3$e = { class: "txt-center txt-12 color-gray" };
21102
21010
  const fb = 1;
21103
21011
  const base = 5;
21104
- const _sfc_main$z = /* @__PURE__ */ defineComponent({
21012
+ const _sfc_main$A = /* @__PURE__ */ defineComponent({
21105
21013
  __name: "gridBox",
21106
21014
  emits: ["select"],
21107
21015
  setup(__props, { emit: __emit }) {
@@ -21117,7 +21025,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
21117
21025
  return hoveredCol.value > base - 1 ? enlarge : base;
21118
21026
  });
21119
21027
  return (_ctx, _cache) => {
21120
- return openBlock(), createElementBlock("div", _hoisted_1$r, [
21028
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
21121
21029
  (openBlock(true), createElementBlock(Fragment, null, renderList(rowSize.value, (row) => {
21122
21030
  return openBlock(), createElementBlock("div", {
21123
21031
  key: `row-${row}`,
@@ -21144,21 +21052,21 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
21144
21052
  hoveredCol.value = col;
21145
21053
  },
21146
21054
  onClick: ($event) => emit2("select", `${row}x${col}`)
21147
- }, null, 42, _hoisted_2$h);
21055
+ }, null, 42, _hoisted_2$i);
21148
21056
  }), 128))
21149
21057
  ], 32);
21150
21058
  }), 128)),
21151
- createElementVNode("p", _hoisted_3$d, toDisplayString(hoveredRow.value) + "x" + toDisplayString(hoveredCol.value), 1)
21059
+ createElementVNode("p", _hoisted_3$e, toDisplayString(hoveredRow.value) + "x" + toDisplayString(hoveredCol.value), 1)
21152
21060
  ]);
21153
21061
  };
21154
21062
  }
21155
21063
  });
21156
- const GridBox = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-4548b70f"]]);
21157
- const _hoisted_1$q = {
21064
+ const GridBox = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-4548b70f"]]);
21065
+ const _hoisted_1$r = {
21158
21066
  class: "toolbar flex gap-025 pb-05 flex-wrap",
21159
21067
  role: "toolbar"
21160
21068
  };
21161
- const _sfc_main$y = /* @__PURE__ */ defineComponent({
21069
+ const _sfc_main$z = /* @__PURE__ */ defineComponent({
21162
21070
  __name: "EditorToolbar",
21163
21071
  props: {
21164
21072
  config: { default: defaultToolbarConfig },
@@ -21173,7 +21081,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
21173
21081
  }
21174
21082
  return (_ctx, _cache) => {
21175
21083
  const _directive_tooltip = resolveDirective("tooltip");
21176
- return openBlock(), createElementBlock("div", _hoisted_1$q, [
21084
+ return openBlock(), createElementBlock("div", _hoisted_1$r, [
21177
21085
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.map(configToOption).filter(Boolean), (action, index2) => {
21178
21086
  return openBlock(), createElementBlock(Fragment, { key: index2 }, [
21179
21087
  action.name === "insertTable" ? (openBlock(), createBlock(unref(_sfc_main$X), {
@@ -21215,7 +21123,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
21215
21123
  };
21216
21124
  }
21217
21125
  });
21218
- const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-33dff8fa"]]);
21126
+ const EditorToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-33dff8fa"]]);
21219
21127
  function createCommandExecutor(state2, commands) {
21220
21128
  return {
21221
21129
  execute(command, value) {
@@ -22135,12 +22043,12 @@ function useEditorKeyboard(doc, handleToolbarAction) {
22135
22043
  }
22136
22044
  });
22137
22045
  }
22138
- const _hoisted_1$p = { class: "content-area radius-05" };
22139
- const _hoisted_2$g = {
22046
+ const _hoisted_1$q = { class: "content-area radius-05" };
22047
+ const _hoisted_2$h = {
22140
22048
  key: 1,
22141
22049
  class: "flex"
22142
22050
  };
22143
- const _sfc_main$x = /* @__PURE__ */ defineComponent({
22051
+ const _sfc_main$y = /* @__PURE__ */ defineComponent({
22144
22052
  __name: "index",
22145
22053
  props: {
22146
22054
  modelValue: {},
@@ -22224,7 +22132,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
22224
22132
  createElementVNode("div", {
22225
22133
  class: normalizeClass(["editor-container", { "split-view": unref(editor).state.isSplitView }])
22226
22134
  }, [
22227
- createElementVNode("div", _hoisted_1$p, [
22135
+ createElementVNode("div", _hoisted_1$q, [
22228
22136
  createElementVNode("iframe", {
22229
22137
  id: "rich-text-iframe",
22230
22138
  ref_key: "iframe",
@@ -22244,7 +22152,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
22244
22152
  language: "html"
22245
22153
  }, null, 8, ["modelValue"])) : createCommentVNode("", true)
22246
22154
  ], 2),
22247
- _ctx.debug ? (openBlock(), createElementBlock("div", _hoisted_2$g, [
22155
+ _ctx.debug ? (openBlock(), createElementBlock("div", _hoisted_2$h, [
22248
22156
  _cache[6] || (_cache[6] = createElementVNode("p", { class: "text12 txt-gray mb-0 p-0" }, " Debug ", -1)),
22249
22157
  createVNode(unref(Btn), {
22250
22158
  thin: "",
@@ -22287,10 +22195,10 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
22287
22195
  };
22288
22196
  }
22289
22197
  });
22290
- const RichText = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-2e74943d"]]);
22291
- const _hoisted_1$o = { class: "flex gap-05" };
22292
- const _hoisted_2$f = ["disabled"];
22293
- const _hoisted_3$c = { key: 1 };
22198
+ const RichText = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-2e74943d"]]);
22199
+ const _hoisted_1$p = { class: "flex gap-05" };
22200
+ const _hoisted_2$g = ["disabled"];
22201
+ const _hoisted_3$d = { key: 1 };
22294
22202
  const _hoisted_4$8 = {
22295
22203
  key: 2,
22296
22204
  class: "ms-auto ps-05 me-05"
@@ -22298,7 +22206,7 @@ const _hoisted_4$8 = {
22298
22206
  const _hoisted_5$8 = ["value"];
22299
22207
  const _hoisted_6$7 = ["aria-selected", "onClick", "onKeydown"];
22300
22208
  const _hoisted_7$4 = { class: "block" };
22301
- const _sfc_main$w = /* @__PURE__ */ defineComponent({
22209
+ const _sfc_main$x = /* @__PURE__ */ defineComponent({
22302
22210
  __name: "SelectInput",
22303
22211
  props: {
22304
22212
  options: {},
@@ -22486,7 +22394,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
22486
22394
  trigger: withCtx(() => [
22487
22395
  createElementVNode("label", null, [
22488
22396
  createTextVNode(toDisplayString(_ctx.label) + " ", 1),
22489
- createElementVNode("div", _hoisted_1$o, [
22397
+ createElementVNode("div", _hoisted_1$p, [
22490
22398
  _ctx.searchable && unref(open) ? (openBlock(), createBlock(unref(TextInput), {
22491
22399
  key: 0,
22492
22400
  ref_key: "searchInput",
@@ -22517,7 +22425,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
22517
22425
  key: 0,
22518
22426
  icon: _ctx.icon
22519
22427
  }, null, 8, ["icon"])) : createCommentVNode("", true),
22520
- !_ctx.hideLabel ? (openBlock(), createElementBlock("p", _hoisted_3$c, toDisplayString(selectedLabel.value), 1)) : createCommentVNode("", true),
22428
+ !_ctx.hideLabel ? (openBlock(), createElementBlock("p", _hoisted_3$d, toDisplayString(selectedLabel.value), 1)) : createCommentVNode("", true),
22521
22429
  _ctx.clearable && selectedItemCount.value > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$8, [
22522
22430
  createVNode(unref(Btn), {
22523
22431
  flat: "",
@@ -22534,7 +22442,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
22534
22442
  key: 3,
22535
22443
  thin: ""
22536
22444
  }, { icon: unref(open) ? "unfold_less" : "unfold_more" }), null, 16)) : createCommentVNode("", true)
22537
- ], 42, _hoisted_2$f)),
22445
+ ], 42, _hoisted_2$g)),
22538
22446
  _ctx.required ? (openBlock(), createElementBlock("input", {
22539
22447
  key: 2,
22540
22448
  tabindex: "-1",
@@ -22604,7 +22512,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
22604
22512
  };
22605
22513
  }
22606
22514
  });
22607
- const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-77b2541f"]]);
22515
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-77b2541f"]]);
22608
22516
  /*!
22609
22517
  * Signature Pad v5.0.4 | https://github.com/szimek/signature_pad
22610
22518
  * (c) 2024 Szymon Nowak | Released under the MIT license
@@ -23201,15 +23109,15 @@ class SignaturePad extends SignatureEventTarget {
23201
23109
  return svg.outerHTML;
23202
23110
  }
23203
23111
  }
23204
- const _hoisted_1$n = ["disabled"];
23205
- const _hoisted_2$e = {
23112
+ const _hoisted_1$o = ["disabled"];
23113
+ const _hoisted_2$f = {
23206
23114
  key: 1,
23207
23115
  placeholder: "required",
23208
23116
  type: "text",
23209
23117
  required: "",
23210
23118
  class: "pixel"
23211
23119
  };
23212
- const _sfc_main$v = /* @__PURE__ */ defineComponent({
23120
+ const _sfc_main$w = /* @__PURE__ */ defineComponent({
23213
23121
  __name: "SignaturePad",
23214
23122
  props: /* @__PURE__ */ mergeModels({
23215
23123
  sigOption: {},
@@ -23362,8 +23270,8 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
23362
23270
  ref: vCanvas,
23363
23271
  class: "canvas",
23364
23272
  disabled: _ctx.disabled
23365
- }, null, 8, _hoisted_1$n),
23366
- _ctx.required && unref(_isEmpty) ? (openBlock(), createElementBlock("input", _hoisted_2$e)) : createCommentVNode("", true)
23273
+ }, null, 8, _hoisted_1$o),
23274
+ _ctx.required && unref(_isEmpty) ? (openBlock(), createElementBlock("input", _hoisted_2$f)) : createCommentVNode("", true)
23367
23275
  ], 34);
23368
23276
  };
23369
23277
  }
@@ -25847,13 +25755,13 @@ const VueDraggableNext = defineComponent({
25847
25755
  }
25848
25756
  }
25849
25757
  });
25850
- const _hoisted_1$m = ["title"];
25851
- const _hoisted_2$d = { class: "bagel-input" };
25852
- const _hoisted_3$b = { class: "table-side-scroll" };
25758
+ const _hoisted_1$n = ["title"];
25759
+ const _hoisted_2$e = { class: "bagel-input" };
25760
+ const _hoisted_3$c = { class: "table-side-scroll" };
25853
25761
  const _hoisted_4$7 = { class: "table-header" };
25854
25762
  const _hoisted_5$7 = { class: "table-reorder" };
25855
25763
  const _hoisted_6$6 = { class: "table-action" };
25856
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
25764
+ const _sfc_main$v = /* @__PURE__ */ defineComponent({
25857
25765
  __name: "TableField",
25858
25766
  props: {
25859
25767
  description: { default: "" },
@@ -25918,10 +25826,10 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
25918
25826
  class: "table-field-wrap",
25919
25827
  title: _ctx.description
25920
25828
  }, [
25921
- createElementVNode("div", _hoisted_2$d, [
25829
+ createElementVNode("div", _hoisted_2$e, [
25922
25830
  createElementVNode("label", null, toDisplayString((_a2 = unref(fieldMeta)) == null ? void 0 : _a2.label), 1)
25923
25831
  ]),
25924
- createElementVNode("div", _hoisted_3$b, [
25832
+ createElementVNode("div", _hoisted_3$c, [
25925
25833
  createElementVNode("div", _hoisted_4$7, [
25926
25834
  (openBlock(true), createElementBlock(Fragment, null, renderList((_b = unref(entityMeta)) == null ? void 0 : _b.fields, (field) => {
25927
25835
  return openBlock(), createElementBlock("div", {
@@ -25993,11 +25901,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
25993
25901
  ])),
25994
25902
  _: 1
25995
25903
  })
25996
- ], 8, _hoisted_1$m);
25904
+ ], 8, _hoisted_1$n);
25997
25905
  };
25998
25906
  }
25999
25907
  });
26000
- const TableField = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-a65c658c"]]);
25908
+ const TableField = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["__scopeId", "data-v-a65c658c"]]);
26001
25909
  function bind(fn2, thisArg) {
26002
25910
  return function wrap() {
26003
25911
  return fn2.apply(thisArg, arguments);
@@ -30444,13 +30352,13 @@ function parsePhoneNumber$1() {
30444
30352
  function parsePhoneNumber() {
30445
30353
  return withMetadataArgument(parsePhoneNumber$1, arguments);
30446
30354
  }
30447
- const _hoisted_1$l = ["aria-expanded"];
30448
- const _hoisted_2$c = { class: "p-075 tel-countryp-dropdown" };
30449
- const _hoisted_3$a = ["aria-selected", "onClick", "onMousemove"];
30355
+ const _hoisted_1$m = ["aria-expanded"];
30356
+ const _hoisted_2$d = { class: "p-075 tel-countryp-dropdown" };
30357
+ const _hoisted_3$b = ["aria-selected", "onClick", "onMousemove"];
30450
30358
  const _hoisted_4$6 = { class: "tel-country" };
30451
30359
  const _hoisted_5$6 = { key: 1 };
30452
30360
  const _hoisted_6$5 = ["id", "required", "placeholder", "disabled", "autocomplete", "pattern", "minlength", "maxlength", "name", "readonly", "tabindex", "aria-describedby"];
30453
- const _sfc_main$t = /* @__PURE__ */ defineComponent({
30361
+ const _sfc_main$u = /* @__PURE__ */ defineComponent({
30454
30362
  __name: "TelInput",
30455
30363
  props: /* @__PURE__ */ mergeModels({
30456
30364
  label: {},
@@ -30735,7 +30643,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30735
30643
  ])
30736
30644
  ]),
30737
30645
  default: withCtx(() => [
30738
- createElementVNode("div", _hoisted_2$c, [
30646
+ createElementVNode("div", _hoisted_2$d, [
30739
30647
  _ctx.searchable ? (openBlock(), createBlock(unref(TextInput), {
30740
30648
  key: 0,
30741
30649
  modelValue: searchQuery.value,
@@ -30765,7 +30673,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30765
30673
  }, null, 8, ["country"])) : createCommentVNode("", true),
30766
30674
  createElementVNode("p", _hoisted_4$6, toDisplayString(pb.name), 1),
30767
30675
  computedDropDownOptions.value.showDialCodeInList ? (openBlock(), createElementBlock("span", _hoisted_5$6, " +" + toDisplayString(pb.dialCode), 1)) : createCommentVNode("", true)
30768
- ], 40, _hoisted_3$a);
30676
+ ], 40, _hoisted_3$b);
30769
30677
  }), 128))
30770
30678
  ], 2)
30771
30679
  ])
@@ -30799,19 +30707,19 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30799
30707
  }, null, 44, _hoisted_6$5), [
30800
30708
  [vModelText, phone.value]
30801
30709
  ])
30802
- ], 40, _hoisted_1$l)
30710
+ ], 40, _hoisted_1$m)
30803
30711
  ])
30804
30712
  ], 2);
30805
30713
  };
30806
30714
  }
30807
30715
  });
30808
- const TelInput = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-cfcf054d"]]);
30809
- const _hoisted_1$k = ["title"];
30810
- const _hoisted_2$b = ["for"];
30811
- const _hoisted_3$9 = ["id", "title", "autocomplete", "type", "placeholder", "disabled", "required", "pattern"];
30716
+ const TelInput = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-cfcf054d"]]);
30717
+ const _hoisted_1$l = ["title"];
30718
+ const _hoisted_2$c = ["for"];
30719
+ const _hoisted_3$a = ["id", "title", "autocomplete", "type", "placeholder", "disabled", "required", "pattern"];
30812
30720
  const _hoisted_4$5 = ["id", "title", "type", "rows", "placeholder", "disabled", "required", "pattern"];
30813
30721
  const _hoisted_5$5 = { key: 2 };
30814
- const _sfc_main$s = /* @__PURE__ */ defineComponent({
30722
+ const _sfc_main$t = /* @__PURE__ */ defineComponent({
30815
30723
  __name: "TextInput",
30816
30724
  props: {
30817
30725
  id: {},
@@ -30909,7 +30817,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
30909
30817
  onFocusout: _cache[1] || (_cache[1] = //@ts-ignore
30910
30818
  (...args) => _ctx.onFocusout && _ctx.onFocusout(...args)),
30911
30819
  onInput: updateInputVal
30912
- }), null, 16, _hoisted_3$9)), [
30820
+ }), null, 16, _hoisted_3$a)), [
30913
30821
  [
30914
30822
  vModelDynamic,
30915
30823
  unref(inputVal),
@@ -30946,16 +30854,16 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
30946
30854
  key: 4,
30947
30855
  icon: _ctx.icon
30948
30856
  }, null, 8, ["icon"])) : createCommentVNode("", true)
30949
- ], 8, _hoisted_2$b)
30950
- ], 10, _hoisted_1$k);
30857
+ ], 8, _hoisted_2$c)
30858
+ ], 10, _hoisted_1$l);
30951
30859
  };
30952
30860
  }
30953
30861
  });
30954
- const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-52ac6dc3"]]);
30955
- const _hoisted_1$j = ["title"];
30956
- const _hoisted_2$a = ["id", "required"];
30957
- const _hoisted_3$8 = ["for"];
30958
- const _sfc_main$r = /* @__PURE__ */ defineComponent({
30862
+ const TextInput = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-52ac6dc3"]]);
30863
+ const _hoisted_1$k = ["title"];
30864
+ const _hoisted_2$b = ["id", "required"];
30865
+ const _hoisted_3$9 = ["for"];
30866
+ const _sfc_main$s = /* @__PURE__ */ defineComponent({
30959
30867
  __name: "ToggleInput",
30960
30868
  props: /* @__PURE__ */ mergeModels({
30961
30869
  label: {},
@@ -30991,19 +30899,19 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
30991
30899
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checked.value = $event),
30992
30900
  type: "checkbox",
30993
30901
  required: _ctx.required
30994
- }, null, 8, _hoisted_2$a), [
30902
+ }, null, 8, _hoisted_2$b), [
30995
30903
  [vModelCheckbox, checked.value]
30996
30904
  ]),
30997
30905
  createElementVNode("label", { for: inputId.value }, [
30998
30906
  renderSlot(_ctx.$slots, "label", {}, () => [
30999
30907
  createTextVNode(toDisplayString(_ctx.label), 1)
31000
30908
  ], true)
31001
- ], 8, _hoisted_3$8)
31002
- ], 10, _hoisted_1$j);
30909
+ ], 8, _hoisted_3$9)
30910
+ ], 10, _hoisted_1$k);
31003
30911
  };
31004
30912
  }
31005
30913
  });
31006
- const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-ebe691ee"]]);
30914
+ const ToggleInput = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-ebe691ee"]]);
31007
30915
  const files = {
31008
30916
  setBaseUrl: (baseUrl) => {
31009
30917
  if (!baseUrl) return;
@@ -31029,9 +30937,9 @@ const files = {
31029
30937
  });
31030
30938
  }
31031
30939
  };
31032
- const _hoisted_1$i = { class: "bagel-input" };
31033
- const _hoisted_2$9 = { key: 0 };
31034
- const _hoisted_3$7 = {
30940
+ const _hoisted_1$j = { class: "bagel-input" };
30941
+ const _hoisted_2$a = { key: 0 };
30942
+ const _hoisted_3$8 = {
31035
30943
  key: 1,
31036
30944
  placeholder: "required",
31037
30945
  type: "text",
@@ -31068,7 +30976,7 @@ const _hoisted_14 = {
31068
30976
  class: "progress"
31069
30977
  };
31070
30978
  const _hoisted_15 = { class: "p-1 flex column hover fileUploadPlaceHolder justify-content-center mb-05" };
31071
- const _sfc_main$q = /* @__PURE__ */ defineComponent({
30979
+ const _sfc_main$r = /* @__PURE__ */ defineComponent({
31072
30980
  __name: "UploadInput",
31073
30981
  props: {
31074
30982
  label: {},
@@ -31176,9 +31084,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
31176
31084
  return (_ctx, _cache) => {
31177
31085
  const _directive_tooltip = resolveDirective("tooltip");
31178
31086
  const _directive_lightbox = resolveDirective("lightbox");
31179
- return openBlock(), createElementBlock("div", _hoisted_1$i, [
31180
- _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$9, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
31181
- _ctx.required && !pathKeys.value.length ? (openBlock(), createElementBlock("input", _hoisted_3$7)) : createCommentVNode("", true),
31087
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
31088
+ _ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2$a, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
31089
+ _ctx.required && !pathKeys.value.length ? (openBlock(), createElementBlock("input", _hoisted_3$8)) : createCommentVNode("", true),
31182
31090
  _ctx.theme === "basic" ? (openBlock(), createBlock(unref(_sfc_main$$), {
31183
31091
  key: 2,
31184
31092
  outline: "",
@@ -31402,9 +31310,9 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
31402
31310
  };
31403
31311
  }
31404
31312
  });
31405
- const UploadInput = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-bd972fe8"]]);
31406
- const _hoisted_1$h = ["src", "title", "width", "height", "marginwidth", "marginheight", "csp", "scrolling", "srcset"];
31407
- const _sfc_main$p = /* @__PURE__ */ defineComponent({
31313
+ const UploadInput = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-bd972fe8"]]);
31314
+ const _hoisted_1$i = ["src", "title", "width", "height", "marginwidth", "marginheight", "csp", "scrolling", "srcset"];
31315
+ const _sfc_main$q = /* @__PURE__ */ defineComponent({
31408
31316
  __name: "IframeVue",
31409
31317
  props: {
31410
31318
  src: {},
@@ -31463,10 +31371,109 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
31463
31371
  scrolling: _ctx.scrolling,
31464
31372
  srcset: _ctx.srcset,
31465
31373
  onLoad: _cache[0] || (_cache[0] = ($event) => emit2("load", $event))
31466
- }, null, 40, _hoisted_1$h);
31374
+ }, null, 40, _hoisted_1$i);
31375
+ };
31376
+ }
31377
+ });
31378
+ const _hoisted_1$h = { key: 0 };
31379
+ const _hoisted_2$9 = ["src", "alt", "width", "height"];
31380
+ const _hoisted_3$7 = ["src", "alt", "width", "height"];
31381
+ const _sfc_main$p = /* @__PURE__ */ defineComponent({
31382
+ __name: "Image",
31383
+ props: {
31384
+ src: {},
31385
+ pathKey: {},
31386
+ alt: { default: "" },
31387
+ width: {},
31388
+ height: {},
31389
+ caption: {}
31390
+ },
31391
+ setup(__props) {
31392
+ let imageSrc = ref(null);
31393
+ const fileBaseUrl = computed(() => "https://files.bagel.design".replace(/\/$/, ""));
31394
+ function pathToUrl() {
31395
+ var _a2;
31396
+ if ((_a2 = __props.pathKey) == null ? void 0 : _a2.startsWith("static/")) return `${void 0}/${__props.pathKey}`;
31397
+ return `${fileBaseUrl.value}/${__props.pathKey}`;
31398
+ }
31399
+ async function loadImage() {
31400
+ var _a2;
31401
+ const url = __props.src || pathToUrl();
31402
+ console.log(url);
31403
+ if (!url) {
31404
+ imageSrc.value = null;
31405
+ return;
31406
+ }
31407
+ const ext = (_a2 = url.split(".").pop()) == null ? void 0 : _a2.toLowerCase().split("?").shift();
31408
+ if (ext === "heic") {
31409
+ if (!("caches" in window)) {
31410
+ console.warn("Caching is not available. Proceeding without cache.");
31411
+ } else {
31412
+ try {
31413
+ const imgCache = await window.caches.open("img-cache");
31414
+ const cachedResponse = await imgCache.match(url);
31415
+ if (cachedResponse) {
31416
+ imageSrc.value = URL.createObjectURL(await cachedResponse.blob());
31417
+ return;
31418
+ }
31419
+ } catch (error) {
31420
+ console.warn("Error accessing cache:", error);
31421
+ }
31422
+ }
31423
+ try {
31424
+ await appendScript("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");
31425
+ const response = await fetch(url);
31426
+ const blob = await response.blob();
31427
+ const convertedBlob = await window.heic2any({ blob });
31428
+ imageSrc.value = URL.createObjectURL(convertedBlob);
31429
+ if ("caches" in window) {
31430
+ try {
31431
+ const imgCache = await window.caches.open("img-cache");
31432
+ imgCache.put(url, new Response(convertedBlob));
31433
+ } catch (cacheError) {
31434
+ console.warn("Failed to cache the image:", cacheError);
31435
+ }
31436
+ }
31437
+ } catch (error) {
31438
+ console.error("Error converting HEIC file:", error);
31439
+ }
31440
+ } else {
31441
+ imageSrc.value = url;
31442
+ }
31443
+ }
31444
+ watch(() => [__props.src, __props.pathKey], loadImage, { immediate: true });
31445
+ return (_ctx, _cache) => {
31446
+ return _ctx.caption ? (openBlock(), createElementBlock("figcaption", _hoisted_1$h, [
31447
+ unref(imageSrc) ? (openBlock(), createElementBlock("img", mergeProps({
31448
+ key: 0,
31449
+ src: unref(imageSrc)
31450
+ }, _ctx.$attrs, {
31451
+ alt: _ctx.alt,
31452
+ width: unref(normalizeDimension)(_ctx.width),
31453
+ height: unref(normalizeDimension)(_ctx.height)
31454
+ }), null, 16, _hoisted_2$9)) : (openBlock(), createBlock(unref(Skeleton), {
31455
+ key: 1,
31456
+ class: "img-web-kit",
31457
+ width: unref(normalizeDimension)(_ctx.width),
31458
+ height: unref(normalizeDimension)(_ctx.height)
31459
+ }, null, 8, ["width", "height"]))
31460
+ ])) : unref(imageSrc) ? (openBlock(), createElementBlock("img", mergeProps({
31461
+ key: 1,
31462
+ src: unref(imageSrc)
31463
+ }, _ctx.$attrs, {
31464
+ alt: _ctx.alt,
31465
+ width: unref(normalizeDimension)(_ctx.width),
31466
+ height: unref(normalizeDimension)(_ctx.height)
31467
+ }), null, 16, _hoisted_3$7)) : (openBlock(), createBlock(unref(Skeleton), {
31468
+ key: 2,
31469
+ class: "img-web-kit",
31470
+ width: unref(normalizeDimension)(_ctx.width),
31471
+ height: unref(normalizeDimension)(_ctx.height)
31472
+ }, null, 8, ["width", "height"]));
31467
31473
  };
31468
31474
  }
31469
31475
  });
31476
+ const Image$1 = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-29509e85"]]);
31470
31477
  const _hoisted_1$g = { class: "m-0 pb-025 txt14 line-height-1 w60 menu-text" };
31471
31478
  const _sfc_main$o = /* @__PURE__ */ defineComponent({
31472
31479
  __name: "BottomMenu",
@@ -35554,7 +35561,7 @@ export {
35554
35561
  IMAGE_FORMATS,
35555
35562
  IMAGE_FORMATS_REGEXP,
35556
35563
  _sfc_main$d as Icon,
35557
- _sfc_main$p as IframeVue,
35564
+ _sfc_main$q as IframeVue,
35558
35565
  Image$1 as Image,
35559
35566
  JSONInput,
35560
35567
  Layout,
@@ -35572,7 +35579,7 @@ export {
35572
35579
  NumberInput,
35573
35580
  OTP,
35574
35581
  _sfc_main$8 as PageTitle,
35575
- _sfc_main$D as PasswordInput,
35582
+ _sfc_main$E as PasswordInput,
35576
35583
  Pill,
35577
35584
  RadioGroup,
35578
35585
  RadioPillsInput,
@@ -35581,7 +35588,7 @@ export {
35581
35588
  RouterWrapper,
35582
35589
  SelectInput,
35583
35590
  SidebarMenu,
35584
- _sfc_main$v as SignaturePad,
35591
+ _sfc_main$w as SignaturePad,
35585
35592
  Skeleton,
35586
35593
  TabbedLayout,
35587
35594
  TableField,