@opengis/form 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent, createElementBlock, openBlock, createCommentVNode, renderSlot, createElementVNode, toDisplayString, normalizeProps, guardReactiveProps, createTextVNode, computed, mergeModels, useModel, withDirectives, normalizeClass, unref, vModelText, vModelCheckbox, createVNode, ref, createBlock, resolveDynamicComponent, normalizeStyle, withCtx, withModifiers, vModelRadio, Fragment, renderList, mergeProps, reactive, watch, onMounted, createStaticVNode, Transition, vShow, inject, nextTick, onUnmounted, Teleport, useAttrs, provide } from "vue";
2
- const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
1
+ import { defineComponent, createElementBlock, openBlock, createCommentVNode, renderSlot, createElementVNode, toDisplayString, normalizeProps, guardReactiveProps, createTextVNode, computed, mergeModels, useModel, withDirectives, normalizeClass, unref, vModelText, vModelCheckbox, createVNode, ref, createBlock, resolveDynamicComponent, normalizeStyle, withCtx, withModifiers, createStaticVNode, vModelRadio, Fragment, renderList, mergeProps, reactive, watch, onMounted, createApp, h, Transition, vShow, inject, nextTick, onUnmounted, Teleport, useAttrs, provide } from "vue";
2
+ const _hoisted_1$A = { class: "w-full relative" }, _hoisted_2$d = {
3
3
  key: 0,
4
4
  class: "text-[14px] font-medium text-gray-900 mb-2"
5
5
  }, _hoisted_3$6 = {
@@ -8,7 +8,7 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
8
8
  }, _hoisted_4$5 = {
9
9
  key: 1,
10
10
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
11
- }, _sfc_main$E = /* @__PURE__ */ defineComponent({
11
+ }, _sfc_main$F = /* @__PURE__ */ defineComponent({
12
12
  __name: "vs-layout-default",
13
13
  props: {
14
14
  ua: {
@@ -29,8 +29,8 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
29
29
  }
30
30
  },
31
31
  setup(e) {
32
- return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$z, [
33
- e.ua || e.label ? (openBlock(), createElementBlock("div", _hoisted_2$c, [
32
+ return (t, o) => (openBlock(), createElementBlock("div", _hoisted_1$A, [
33
+ e.ua || e.label ? (openBlock(), createElementBlock("div", _hoisted_2$d, [
34
34
  createElementVNode("span", null, toDisplayString(e.ua || e.label), 1),
35
35
  e.item?.rules?.includes("required") ? (openBlock(), createElementBlock("span", _hoisted_3$6, "*")) : createCommentVNode("", !0)
36
36
  ])) : createCommentVNode("", !0),
@@ -38,16 +38,16 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
38
38
  e.error ? (openBlock(), createElementBlock("span", _hoisted_4$5, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
39
39
  ]));
40
40
  }
41
- }), _hoisted_1$y = { class: "w-full relative flex flex-row items-center gap-2" }, _hoisted_2$b = {
41
+ }), _hoisted_1$z = { class: "w-full relative flex flex-row items-center gap-2" }, _hoisted_2$c = {
42
42
  key: 0,
43
- class: "text-sm text-gray-900 font-medium flex shrink-0 w-3/12"
43
+ class: "text-sm text-gray-900 font-medium flex shrink-0 w-3/12 max-w-[250px]"
44
44
  }, _hoisted_3$5 = {
45
45
  key: 0,
46
46
  class: "text-red-500 text-[14px]"
47
47
  }, _hoisted_4$4 = {
48
48
  key: 1,
49
49
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
50
- }, _sfc_main$D = /* @__PURE__ */ defineComponent({
50
+ }, _sfc_main$E = /* @__PURE__ */ defineComponent({
51
51
  __name: "vs-layout-horizontal",
52
52
  props: {
53
53
  ua: {
@@ -68,8 +68,8 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
68
68
  }
69
69
  },
70
70
  setup(e) {
71
- return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$y, [
72
- e.item?.type !== "html" ? (openBlock(), createElementBlock("span", _hoisted_2$b, [
71
+ return (t, o) => (openBlock(), createElementBlock("div", _hoisted_1$z, [
72
+ e.item?.type !== "html" ? (openBlock(), createElementBlock("span", _hoisted_2$c, [
73
73
  createTextVNode(toDisplayString(e.ua || e.label) + " ", 1),
74
74
  e.item?.rules?.includes("required") && (e.ua || e.label) ? (openBlock(), createElementBlock("span", _hoisted_3$5, "*")) : createCommentVNode("", !0)
75
75
  ])) : createCommentVNode("", !0),
@@ -77,10 +77,10 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
77
77
  e.error ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
78
78
  ]));
79
79
  }
80
- }), _hoisted_1$x = { class: "w-full relative" }, _hoisted_2$a = {
80
+ }), _hoisted_1$y = { class: "w-full relative" }, _hoisted_2$b = {
81
81
  key: 0,
82
82
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
83
- }, _sfc_main$C = /* @__PURE__ */ defineComponent({
83
+ }, _sfc_main$D = /* @__PURE__ */ defineComponent({
84
84
  __name: "vs-layout-inline",
85
85
  props: {
86
86
  ua: {
@@ -101,25 +101,25 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
101
101
  }
102
102
  },
103
103
  setup(e) {
104
- return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$x, [
104
+ return (t, o) => (openBlock(), createElementBlock("div", _hoisted_1$y, [
105
105
  renderSlot(t.$slots, "default", normalizeProps(guardReactiveProps(t.$attrs))),
106
- e.error ? (openBlock(), createElementBlock("span", _hoisted_2$a, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
106
+ e.error ? (openBlock(), createElementBlock("span", _hoisted_2$b, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
107
107
  ]));
108
108
  }
109
109
  }), layouts$1 = {
110
- default: _sfc_main$E,
111
- horizontal: _sfc_main$D,
112
- inline: _sfc_main$C
110
+ default: _sfc_main$F,
111
+ horizontal: _sfc_main$E,
112
+ inline: _sfc_main$D
113
113
  };
114
114
  function useStyle(e) {
115
115
  return {
116
116
  inputClass: computed(() => {
117
- const n = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${e?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
118
- return e?.size === "sm" ? n + "h-[32px]" : n + "h-[38px]";
117
+ const o = `disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${e?.primaryColor || "blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;
118
+ return e?.size === "sm" ? o + "h-[32px]" : o + "h-[38px]";
119
119
  })
120
120
  };
121
121
  }
122
- const _hoisted_1$w = ["placeholder", "disabled"], _sfc_main$B = /* @__PURE__ */ defineComponent({
122
+ const _hoisted_1$x = ["placeholder", "disabled"], _sfc_main$C = /* @__PURE__ */ defineComponent({
123
123
  __name: "vs-input-text",
124
124
  props: /* @__PURE__ */ mergeModels({
125
125
  style: {
@@ -148,21 +148,21 @@ const _hoisted_1$w = ["placeholder", "disabled"], _sfc_main$B = /* @__PURE__ */
148
148
  }),
149
149
  emits: ["update:modelValue"],
150
150
  setup(e) {
151
- const t = e, { inputClass: n } = useStyle(t.style), o = useModel(e, "modelValue");
151
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue");
152
152
  return (r, s) => withDirectives((openBlock(), createElementBlock("input", {
153
153
  type: "text",
154
- "onUpdate:modelValue": s[0] || (s[0] = (l) => o.value = l),
154
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
155
155
  placeholder: e.placeholder,
156
156
  disabled: e.disabled,
157
- class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(n), { "!border-red-600": e.error }]]),
157
+ class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(o), { "!border-red-600": e.error }]]),
158
158
  style: {
159
159
  border: "1px solid #CFD9E0"
160
160
  }
161
- }, null, 10, _hoisted_1$w)), [
162
- [vModelText, o.value]
161
+ }, null, 10, _hoisted_1$x)), [
162
+ [vModelText, n.value]
163
163
  ]);
164
164
  }
165
- }), _hoisted_1$v = ["placeholder"], _sfc_main$A = /* @__PURE__ */ defineComponent({
165
+ }), _hoisted_1$w = ["placeholder"], _sfc_main$B = /* @__PURE__ */ defineComponent({
166
166
  __name: "vs-input-number",
167
167
  props: /* @__PURE__ */ mergeModels({
168
168
  style: {
@@ -179,25 +179,25 @@ const _hoisted_1$w = ["placeholder", "disabled"], _sfc_main$B = /* @__PURE__ */
179
179
  }),
180
180
  emits: ["update:modelValue"],
181
181
  setup(e) {
182
- const t = e, { inputClass: n } = useStyle(t.style), o = useModel(e, "modelValue");
182
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue");
183
183
  return (r, s) => withDirectives((openBlock(), createElementBlock("input", {
184
184
  type: "number",
185
- "onUpdate:modelValue": s[0] || (s[0] = (l) => o.value = l),
185
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
186
186
  placeholder: e.placeholder,
187
- class: normalizeClass(["py-1.5 px-3 block w-full", [unref(n)]]),
187
+ class: normalizeClass(["py-1.5 px-3 block w-full", [unref(o)]]),
188
188
  style: {
189
189
  border: "1px solid #CFD9E0"
190
190
  }
191
- }, null, 10, _hoisted_1$v)), [
192
- [vModelText, o.value]
191
+ }, null, 10, _hoisted_1$w)), [
192
+ [vModelText, n.value]
193
193
  ]);
194
194
  }
195
195
  }), _export_sfc = (e, t) => {
196
- const n = e.__vccOpts || e;
197
- for (const [o, r] of t)
198
- n[o] = r;
199
- return n;
200
- }, _sfc_main$z = {}, _hoisted_1$u = {
196
+ const o = e.__vccOpts || e;
197
+ for (const [n, r] of t)
198
+ o[n] = r;
199
+ return o;
200
+ }, _sfc_main$A = {}, _hoisted_1$v = {
201
201
  xmlns: "http://www.w3.org/2000/svg",
202
202
  viewBox: "0 0 24 24",
203
203
  fill: "none",
@@ -208,7 +208,7 @@ const _hoisted_1$w = ["placeholder", "disabled"], _sfc_main$B = /* @__PURE__ */
208
208
  class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
209
209
  };
210
210
  function _sfc_render$d(e, t) {
211
- return openBlock(), createElementBlock("svg", _hoisted_1$u, t[0] || (t[0] = [
211
+ return openBlock(), createElementBlock("svg", _hoisted_1$v, t[0] || (t[0] = [
212
212
  createElementVNode("path", {
213
213
  stroke: "none",
214
214
  d: "M0 0h24v24H0z",
@@ -217,7 +217,7 @@ function _sfc_render$d(e, t) {
217
217
  createElementVNode("path", { d: "M5 12l5 5l10 -10" }, null, -1)
218
218
  ]));
219
219
  }
220
- const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$d]]), _hoisted_1$t = { class: "flex items-center gap-[4px]" }, _hoisted_2$9 = ["value", "id", "disabled"], _hoisted_3$4 = ["for"], _hoisted_4$3 = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, _sfc_main$y = /* @__PURE__ */ defineComponent({
220
+ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$d]]), _hoisted_1$u = { class: "flex items-center gap-[4px]" }, _hoisted_2$a = ["value", "id", "disabled"], _hoisted_3$4 = ["for"], _hoisted_4$3 = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, _sfc_main$z = /* @__PURE__ */ defineComponent({
221
221
  __name: "vs-checkbox-default",
222
222
  props: {
223
223
  value: { type: [String, Number], default: "" },
@@ -230,11 +230,11 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
230
230
  },
231
231
  emits: ["update:modelValue"],
232
232
  setup(e, { emit: t }) {
233
- const n = t, o = e, r = computed({
234
- get: () => o.modelValue,
235
- set: (s) => n("update:modelValue", s)
233
+ const o = t, n = e, r = computed({
234
+ get: () => n.modelValue,
235
+ set: (s) => o("update:modelValue", s)
236
236
  });
237
- return (s, l) => (openBlock(), createElementBlock("div", _hoisted_1$t, [
237
+ return (s, l) => (openBlock(), createElementBlock("div", _hoisted_1$u, [
238
238
  withDirectives(createElementVNode("input", {
239
239
  type: "checkbox",
240
240
  value: e.value,
@@ -242,7 +242,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
242
242
  class: normalizeClass(["shrink-0 border border-solid hidden border-gray-700 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer", { "!cursor-not-allowed": e.disabled }]),
243
243
  id: e.id,
244
244
  disabled: e.disabled
245
- }, null, 10, _hoisted_2$9), [
245
+ }, null, 10, _hoisted_2$a), [
246
246
  [vModelCheckbox, r.value]
247
247
  ]),
248
248
  createElementVNode("label", {
@@ -265,10 +265,10 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
265
265
  ], 10, _hoisted_3$4)
266
266
  ]));
267
267
  }
268
- }), _hoisted_1$s = ["name", "value", "disabled"], _hoisted_2$8 = { class: "flex items-center gap-[6px] text-[14px]" }, _hoisted_3$3 = {
268
+ }), _hoisted_1$t = ["name", "value", "disabled"], _hoisted_2$9 = { class: "flex items-center gap-[6px] text-[14px]" }, _hoisted_3$3 = {
269
269
  key: 0,
270
270
  class: "text-[16px]"
271
- }, _hoisted_4$2 = ["src"], _sfc_main$x = /* @__PURE__ */ defineComponent({
271
+ }, _hoisted_4$2 = ["src"], _sfc_main$y = /* @__PURE__ */ defineComponent({
272
272
  __name: "vs-checkbox-buttons",
273
273
  props: {
274
274
  value: { type: [String, Number, Boolean], default: "" },
@@ -285,12 +285,12 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
285
285
  },
286
286
  emits: ["update:modelValue"],
287
287
  setup(e, { emit: t }) {
288
- const n = e, o = t, r = computed({
289
- get: () => n.modelValue,
288
+ const o = e, n = t, r = computed({
289
+ get: () => o.modelValue,
290
290
  set: (i) => {
291
- o("update:modelValue", i);
291
+ n("update:modelValue", i);
292
292
  }
293
- }), s = computed(() => Array.isArray(r.value) ? r.value.includes(n.value) : r.value === !0 || r.value === n.value), l = computed(() => n.style?.size === "xs" ? "p-1.5 text-xs" : n.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
293
+ }), s = computed(() => Array.isArray(r.value) ? r.value.includes(o.value) : r.value === !0 || r.value === o.value), l = computed(() => o.style?.size === "xs" ? "p-1.5 text-xs" : o.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
294
294
  return (i, u) => (openBlock(), createElementBlock("label", {
295
295
  class: normalizeClass(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg", [l.value, s.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
296
296
  }, [
@@ -301,10 +301,10 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
301
301
  value: e.value,
302
302
  "onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
303
303
  disabled: e.disabled
304
- }, null, 8, _hoisted_1$s), [
304
+ }, null, 8, _hoisted_1$t), [
305
305
  [vModelCheckbox, r.value]
306
306
  ]),
307
- createElementVNode("span", _hoisted_2$8, [
307
+ createElementVNode("span", _hoisted_2$9, [
308
308
  e.icon || e.imgUrl ? (openBlock(), createElementBlock("span", _hoisted_3$3, [
309
309
  e.icon ? (openBlock(), createElementBlock("i", {
310
310
  key: 0,
@@ -325,9 +325,9 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
325
325
  ], 2));
326
326
  }
327
327
  }), VsCheckboxViews = {
328
- "vs-checkbox-default": _sfc_main$y,
329
- "vs-checkbox-buttons": _sfc_main$x
330
- }, _hoisted_1$r = { class: "flex items-center" }, _sfc_main$w = /* @__PURE__ */ defineComponent({
328
+ "vs-checkbox-default": _sfc_main$z,
329
+ "vs-checkbox-buttons": _sfc_main$y
330
+ }, _hoisted_1$s = { class: "flex items-center" }, _sfc_main$x = /* @__PURE__ */ defineComponent({
331
331
  __name: "vs-input-checkbox-item",
332
332
  props: {
333
333
  value: { type: [String, Number], default: "" },
@@ -347,17 +347,17 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
347
347
  },
348
348
  emits: ["update:modelValue"],
349
349
  setup(e, { emit: t }) {
350
- const n = e, o = t, r = `radio-${Math.floor(Math.random() * 1e4)}`, s = computed({
351
- get: () => Array.isArray(n.modelValue) ? Array.isArray(n.modelValue) && n.modelValue.includes(n.value) : n.modelValue,
350
+ const o = e, n = t, r = `radio-${Math.floor(Math.random() * 1e4)}`, s = computed({
351
+ get: () => Array.isArray(o.modelValue) ? Array.isArray(o.modelValue) && o.modelValue.includes(o.value) : o.modelValue,
352
352
  set: (i) => {
353
- if (Array.isArray(n.modelValue)) {
354
- let u = [...n.modelValue];
355
- i ? u.includes(n.value) || u.push(n.value) : u = u.filter((c) => c !== n.value), o("update:modelValue", u);
353
+ if (Array.isArray(o.modelValue)) {
354
+ let u = [...o.modelValue];
355
+ i ? u.includes(o.value) || u.push(o.value) : u = u.filter((c) => c !== o.value), n("update:modelValue", u);
356
356
  } else
357
- o("update:modelValue", i);
357
+ n("update:modelValue", i);
358
358
  }
359
- }), l = ref(`vs-checkbox-${n.view || "default"}`);
360
- return (i, u) => (openBlock(), createElementBlock("div", _hoisted_1$r, [
359
+ }), l = ref(`vs-checkbox-${o.view || "default"}`);
360
+ return (i, u) => (openBlock(), createElementBlock("div", _hoisted_1$s, [
361
361
  (openBlock(), createBlock(resolveDynamicComponent(unref(VsCheckboxViews)?.[l.value]), {
362
362
  value: e.value,
363
363
  label: e.label,
@@ -378,7 +378,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
378
378
  }, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
379
379
  ]));
380
380
  }
381
- }), _sfc_main$v = {}, _hoisted_1$q = {
381
+ }), _sfc_main$w = {}, _hoisted_1$r = {
382
382
  xmlns: "http://www.w3.org/2000/svg",
383
383
  viewBox: "0 0 24 24",
384
384
  fill: "none",
@@ -389,7 +389,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
389
389
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
390
390
  };
391
391
  function _sfc_render$c(e, t) {
392
- return openBlock(), createElementBlock("svg", _hoisted_1$q, t[0] || (t[0] = [
392
+ return openBlock(), createElementBlock("svg", _hoisted_1$r, t[0] || (t[0] = [
393
393
  createElementVNode("path", {
394
394
  stroke: "none",
395
395
  d: "M0 0h24v24H0z",
@@ -398,7 +398,7 @@ function _sfc_render$c(e, t) {
398
398
  createElementVNode("path", { d: "M6 9l6 6l6 -6" }, null, -1)
399
399
  ]));
400
400
  }
401
- const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$c]]), _sfc_main$u = {}, _hoisted_1$p = {
401
+ const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$c]]), _sfc_main$v = {}, _hoisted_1$q = {
402
402
  xmlns: "http://www.w3.org/2000/svg",
403
403
  viewBox: "0 0 24 24",
404
404
  fill: "none",
@@ -408,12 +408,12 @@ const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sf
408
408
  "stroke-linejoin": "round"
409
409
  };
410
410
  function _sfc_render$b(e, t) {
411
- return openBlock(), createElementBlock("svg", _hoisted_1$p, t[0] || (t[0] = [
411
+ return openBlock(), createElementBlock("svg", _hoisted_1$q, t[0] || (t[0] = [
412
412
  createElementVNode("path", { d: "m7 15 5 5 5-5" }, null, -1),
413
413
  createElementVNode("path", { d: "m7 9 5-5 5 5" }, null, -1)
414
414
  ]));
415
415
  }
416
- const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$b]]), _sfc_main$t = {}, _hoisted_1$o = {
416
+ const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$b]]), _sfc_main$u = {}, _hoisted_1$p = {
417
417
  xmlns: "http://www.w3.org/2000/svg",
418
418
  viewBox: "0 0 24 24",
419
419
  fill: "none",
@@ -424,7 +424,7 @@ const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render"
424
424
  class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
425
425
  };
426
426
  function _sfc_render$a(e, t) {
427
- return openBlock(), createElementBlock("svg", _hoisted_1$o, t[0] || (t[0] = [
427
+ return openBlock(), createElementBlock("svg", _hoisted_1$p, t[0] || (t[0] = [
428
428
  createElementVNode("path", {
429
429
  stroke: "none",
430
430
  d: "M0 0h24v24H0z",
@@ -434,7 +434,7 @@ function _sfc_render$a(e, t) {
434
434
  createElementVNode("path", { d: "M6 6l12 12" }, null, -1)
435
435
  ]));
436
436
  }
437
- const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]]), _sfc_main$s = {}, _hoisted_1$n = {
437
+ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$a]]), _sfc_main$t = {}, _hoisted_1$o = {
438
438
  xmlns: "http://www.w3.org/2000/svg",
439
439
  width: "24",
440
440
  height: "24",
@@ -446,7 +446,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_rend
446
446
  "stroke-linejoin": "round"
447
447
  };
448
448
  function _sfc_render$9(e, t) {
449
- return openBlock(), createElementBlock("svg", _hoisted_1$n, t[0] || (t[0] = [
449
+ return openBlock(), createElementBlock("svg", _hoisted_1$o, t[0] || (t[0] = [
450
450
  createElementVNode("path", {
451
451
  stroke: "none",
452
452
  d: "M0 0h24v24H0z",
@@ -457,13 +457,13 @@ function _sfc_render$9(e, t) {
457
457
  createElementVNode("path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z" }, null, -1)
458
458
  ]));
459
459
  }
460
- const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$9]]), _hoisted_1$m = {
460
+ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$9]]), _hoisted_1$n = {
461
461
  key: 0,
462
462
  class: "flex items-start gap-x-1"
463
- }, _hoisted_2$7 = {
463
+ }, _hoisted_2$8 = {
464
464
  key: 0,
465
465
  class: "text-red-500 text-[14px]"
466
- }, _hoisted_3$2 = ["title"], _hoisted_4$1 = ["disabled"], _sfc_main$r = /* @__PURE__ */ defineComponent({
466
+ }, _hoisted_3$2 = ["title"], _hoisted_4$1 = ["disabled"], _sfc_main$s = /* @__PURE__ */ defineComponent({
467
467
  __name: "vs-input-switcher",
468
468
  props: /* @__PURE__ */ mergeModels({
469
469
  view: {
@@ -509,19 +509,19 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
509
509
  emits: ["update:modelValue"],
510
510
  setup(e) {
511
511
  const t = useModel(e, "modelValue");
512
- return (n, o) => e.view === "checkbox" ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
513
- createVNode(_sfc_main$w, {
512
+ return (o, n) => e.view === "checkbox" ? (openBlock(), createElementBlock("div", _hoisted_1$n, [
513
+ createVNode(_sfc_main$x, {
514
514
  modelValue: t.value,
515
- "onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r),
515
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
516
516
  label: e.text,
517
517
  error: e.error
518
518
  }, null, 8, ["modelValue", "label", "error"]),
519
- e.rules?.includes("required") ? (openBlock(), createElementBlock("span", _hoisted_2$7, "*")) : createCommentVNode("", !0),
519
+ e.rules?.includes("required") ? (openBlock(), createElementBlock("span", _hoisted_2$8, "*")) : createCommentVNode("", !0),
520
520
  e.i ? (openBlock(), createElementBlock("button", {
521
521
  key: 1,
522
522
  class: "cursor-pointer",
523
523
  title: e.i,
524
- onClick: o[1] || (o[1] = withModifiers(() => {
524
+ onClick: n[1] || (n[1] = withModifiers(() => {
525
525
  }, ["prevent"]))
526
526
  }, [
527
527
  createVNode(unref(IconInfo), { class: "text-gray-500 w-[14px] h-[14px]" })
@@ -529,9 +529,9 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
529
529
  ])) : (openBlock(), createElementBlock("button", {
530
530
  key: 1,
531
531
  type: "button",
532
- class: normalizeClass(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [`bg-${e.style?.primaryColor || "blue"}-500`, e.customClass]]),
532
+ class: normalizeClass(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50", [t.value ? `bg-${e.style?.primaryColor || "blue"}-500` : "bg-stone-200", e.customClass]]),
533
533
  disabled: e.disabled,
534
- onClick: o[2] || (o[2] = (r) => t.value = !t.value)
534
+ onClick: n[2] || (n[2] = (r) => t.value = !t.value)
535
535
  }, [
536
536
  createElementVNode("span", {
537
537
  "data-state": "checked",
@@ -539,25 +539,29 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
539
539
  }, null, 2)
540
540
  ], 10, _hoisted_4$1));
541
541
  }
542
- }), _hoisted_1$l = ["innerHTML"], _sfc_main$q = /* @__PURE__ */ defineComponent({
542
+ }), _hoisted_1$m = ["innerHTML"], _sfc_main$r = /* @__PURE__ */ defineComponent({
543
543
  __name: "vs-input-static",
544
544
  props: {
545
545
  html: {
546
546
  type: String,
547
547
  default: ""
548
548
  },
549
+ text: {
550
+ type: String,
551
+ default: ""
552
+ },
549
553
  customClass: {
550
554
  type: String,
551
555
  default: ""
552
556
  }
553
557
  },
554
558
  setup(e) {
555
- return (t, n) => (openBlock(), createElementBlock("div", {
559
+ return (t, o) => (openBlock(), createElementBlock("div", {
556
560
  class: normalizeClass(e.customClass),
557
- innerHTML: e.html
558
- }, null, 10, _hoisted_1$l));
561
+ innerHTML: (e.html === "", e.text)
562
+ }, null, 10, _hoisted_1$m));
559
563
  }
560
- }), _hoisted_1$k = ["placeholder", "disabled"], _sfc_main$p = /* @__PURE__ */ defineComponent({
564
+ }), _hoisted_1$l = ["placeholder", "disabled"], _sfc_main$q = /* @__PURE__ */ defineComponent({
561
565
  __name: "vs-input-mask",
562
566
  props: /* @__PURE__ */ mergeModels({
563
567
  style: {
@@ -575,28 +579,86 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
575
579
  disabled: {
576
580
  type: Boolean,
577
581
  default: !1
578
- }
582
+ },
583
+ mask: {
584
+ type: String,
585
+ default: ""
586
+ },
587
+ placeholderChar: { type: String, default: "_" }
579
588
  }, {
580
589
  modelValue: { default: "" },
581
590
  modelModifiers: {}
582
591
  }),
583
592
  emits: ["update:modelValue"],
584
593
  setup(e) {
585
- const t = e, { inputClass: n } = useStyle(t.style), o = useModel(e, "modelValue");
586
- return (r, s) => withDirectives((openBlock(), createElementBlock("input", {
594
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue"), r = ref(""), s = {
595
+ 9: /\d/,
596
+ A: /[a-zA-Z]/,
597
+ "*": /[a-zA-Z0-9]/
598
+ }, l = computed(() => t.mask.split("")), i = computed(() => l.value.filter((d) => s[d]).length), u = computed({
599
+ get() {
600
+ let d = "", f = 0;
601
+ const m = i.value, p = r.value.slice(0, m);
602
+ for (const g of l.value)
603
+ s[g] ? f < p.length ? (d += p[f], f++) : d += t.placeholderChar : d += g;
604
+ return d;
605
+ },
606
+ set(d) {
607
+ const f = [], m = l.value, p = i.value;
608
+ let g = 0;
609
+ for (let y = 0; y < m.length; y++) {
610
+ const x = m[y];
611
+ if (s[x]) {
612
+ for (; g < d.length; ) {
613
+ const w = d[g];
614
+ if (g++, s[x].test(w)) {
615
+ f.push(w);
616
+ break;
617
+ }
618
+ }
619
+ if (f.length >= p) break;
620
+ }
621
+ }
622
+ r.value = f.join(""), n.value = d;
623
+ }
624
+ });
625
+ function c(d) {
626
+ const f = d.target, m = [], p = l.value, g = i.value;
627
+ let y = 0;
628
+ for (let x = 0; x < p.length; x++) {
629
+ const w = p[x];
630
+ if (s[w]) {
631
+ for (; y < f.value.length; ) {
632
+ const E = f.value[y];
633
+ if (y++, s[w].test(E)) {
634
+ m.push(E);
635
+ break;
636
+ }
637
+ }
638
+ if (m.length >= g) break;
639
+ }
640
+ }
641
+ r.value = m.join(""), console.log(r.value), n.value = u.value;
642
+ }
643
+ function a(d) {
644
+ d.key === "Backspace" && (d.preventDefault(), r.value = r.value.slice(0, -1), n.value = u.value);
645
+ }
646
+ return (d, f) => withDirectives((openBlock(), createElementBlock("input", {
587
647
  type: "text",
588
- "onUpdate:modelValue": s[0] || (s[0] = (l) => o.value = l),
648
+ "onUpdate:modelValue": f[0] || (f[0] = (m) => u.value = m),
589
649
  placeholder: e.placeholder,
590
650
  disabled: e.disabled,
591
- class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(n)]]),
651
+ class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(o)]]),
592
652
  style: {
593
653
  border: "1px solid #CFD9E0"
594
- }
595
- }, null, 10, _hoisted_1$k)), [
596
- [vModelText, o.value]
654
+ },
655
+ onInput: c,
656
+ onKeydown: a
657
+ }, null, 42, _hoisted_1$l)), [
658
+ [vModelText, u.value]
597
659
  ]);
598
660
  }
599
- }), _hoisted_1$j = ["innerHTML"], _sfc_main$o = /* @__PURE__ */ defineComponent({
661
+ }), _hoisted_1$k = ["innerHTML"], _sfc_main$p = /* @__PURE__ */ defineComponent({
600
662
  __name: "vs-input-html",
601
663
  props: {
602
664
  text: {
@@ -606,10 +668,56 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
606
668
  },
607
669
  setup(e) {
608
670
  const t = e;
609
- return (n, o) => (openBlock(), createElementBlock("div", null, [
671
+ return (o, n) => (openBlock(), createElementBlock("div", null, [
610
672
  createElementVNode("div", {
611
673
  innerHTML: t?.text
612
- }, null, 8, _hoisted_1$j)
674
+ }, null, 8, _hoisted_1$k)
675
+ ]));
676
+ }
677
+ }), _hoisted_1$j = { class: "relative w-full bg-white rounded-lg" }, _hoisted_2$7 = ["placeholder", "disabled"], _sfc_main$o = /* @__PURE__ */ defineComponent({
678
+ __name: "vs-input-email",
679
+ props: /* @__PURE__ */ mergeModels({
680
+ style: {
681
+ type: Object,
682
+ default: () => ({})
683
+ },
684
+ customClass: {
685
+ type: String,
686
+ default: ""
687
+ },
688
+ placeholder: {
689
+ type: String,
690
+ default: ""
691
+ },
692
+ disabled: {
693
+ type: Boolean,
694
+ default: !1
695
+ },
696
+ error: {
697
+ type: String,
698
+ default: null
699
+ }
700
+ }, {
701
+ modelValue: { default: "" },
702
+ modelModifiers: {}
703
+ }),
704
+ emits: ["update:modelValue"],
705
+ setup(e) {
706
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue");
707
+ return (r, s) => (openBlock(), createElementBlock("div", _hoisted_1$j, [
708
+ s[1] || (s[1] = createStaticVNode('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>', 1)),
709
+ withDirectives(createElementVNode("input", {
710
+ type: "email",
711
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
712
+ placeholder: e.placeholder,
713
+ disabled: e.disabled,
714
+ class: normalizeClass(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(o), { "!border-red-600": e.error }]]),
715
+ style: {
716
+ border: "1px solid #CFD9E0"
717
+ }
718
+ }, null, 10, _hoisted_2$7), [
719
+ [vModelText, n.value]
720
+ ])
613
721
  ]));
614
722
  }
615
723
  }), _hoisted_1$i = ["value", "disabled"], _hoisted_2$6 = { class: "text-[13px] text-gray-700" }, _sfc_main$n = /* @__PURE__ */ defineComponent({
@@ -642,11 +750,11 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
642
750
  emits: ["update:modelValue"],
643
751
  setup(e) {
644
752
  const t = useModel(e, "modelValue");
645
- return (n, o) => (openBlock(), createElementBlock("label", {
753
+ return (o, n) => (openBlock(), createElementBlock("label", {
646
754
  class: normalizeClass(["flex items-center gap-0", [e.customClass]])
647
755
  }, [
648
756
  withDirectives(createElementVNode("input", {
649
- "onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r),
757
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
650
758
  type: "radio",
651
759
  value: e.value,
652
760
  disabled: e.disabled,
@@ -698,14 +806,14 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
698
806
  emits: ["update:modelValue"],
699
807
  setup(e) {
700
808
  const t = useModel(e, "modelValue");
701
- return (n, o) => (openBlock(), createElementBlock("label", {
809
+ return (o, n) => (openBlock(), createElementBlock("label", {
702
810
  class: normalizeClass(["flex items-center border rounded-lg px-2 py-1", [
703
811
  t.value == e.value ? `ring-2 ring-ring ring-${e.style?.primaryColor || "blue"}-500` : "",
704
812
  e.customClass
705
813
  ]])
706
814
  }, [
707
815
  withDirectives(createElementVNode("input", {
708
- "onUpdate:modelValue": o[0] || (o[0] = (r) => t.value = r),
816
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
709
817
  type: "radio",
710
818
  value: e.value,
711
819
  disabled: e.disabled,
@@ -740,17 +848,17 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
740
848
  }),
741
849
  emits: ["update:modelValue"],
742
850
  setup(e) {
743
- const t = e, n = useModel(e, "modelValue"), o = computed(() => layouts[`vs-input-radio-${t.view}`]);
851
+ const t = e, o = useModel(e, "modelValue"), n = computed(() => layouts[`vs-input-radio-${t.view}`]);
744
852
  return (r, s) => (openBlock(), createElementBlock("div", {
745
853
  class: normalizeClass([e.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
746
854
  }, [
747
- (openBlock(!0), createElementBlock(Fragment, null, renderList(e.options, (l) => (openBlock(), createBlock(resolveDynamicComponent(o.value), mergeProps({
855
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(e.options, (l) => (openBlock(), createBlock(resolveDynamicComponent(n.value), mergeProps({
748
856
  key: l?.id,
749
857
  text: l.text,
750
858
  value: l.id.toString(),
751
- checked: n.value === l.id,
752
- modelValue: n.value,
753
- "onUpdate:modelValue": s[0] || (s[0] = (i) => n.value = i)
859
+ checked: o.value === l.id,
860
+ modelValue: o.value,
861
+ "onUpdate:modelValue": s[0] || (s[0] = (i) => o.value = i)
754
862
  }, { ref_for: !0 }, r.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
755
863
  ], 2));
756
864
  }
@@ -761,8 +869,8 @@ function bind(e, t) {
761
869
  };
762
870
  }
763
871
  const { toString } = Object.prototype, { getPrototypeOf } = Object, { iterator, toStringTag } = Symbol, kindOf = /* @__PURE__ */ ((e) => (t) => {
764
- const n = toString.call(t);
765
- return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
872
+ const o = toString.call(t);
873
+ return e[o] || (e[o] = o.slice(8, -1).toLowerCase());
766
874
  })(/* @__PURE__ */ Object.create(null)), kindOfTest = (e) => (e = e.toLowerCase(), (t) => kindOf(t) === e), typeOfTest = (e) => (t) => typeof t === e, { isArray } = Array, isUndefined = typeOfTest("undefined");
767
875
  function isBuffer(e) {
768
876
  return e !== null && !isUndefined(e) && e.constructor !== null && !isUndefined(e.constructor) && isFunction(e.constructor.isBuffer) && e.constructor.isBuffer(e);
@@ -777,146 +885,160 @@ const isString = typeOfTest("string"), isFunction = typeOfTest("function"), isNu
777
885
  return !1;
778
886
  const t = getPrototypeOf(e);
779
887
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(toStringTag in e) && !(iterator in e);
888
+ }, isEmptyObject = (e) => {
889
+ if (!isObject(e) || isBuffer(e))
890
+ return !1;
891
+ try {
892
+ return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
893
+ } catch {
894
+ return !1;
895
+ }
780
896
  }, isDate = kindOfTest("Date"), isFile = kindOfTest("File"), isBlob = kindOfTest("Blob"), isFileList = kindOfTest("FileList"), isStream = (e) => isObject(e) && isFunction(e.pipe), isFormData = (e) => {
781
897
  let t;
782
898
  return e && (typeof FormData == "function" && e instanceof FormData || isFunction(e.append) && ((t = kindOf(e)) === "formdata" || // detect form-data instance
783
899
  t === "object" && isFunction(e.toString) && e.toString() === "[object FormData]"));
784
900
  }, isURLSearchParams = kindOfTest("URLSearchParams"), [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest), trim = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
785
- function forEach(e, t, { allOwnKeys: n = !1 } = {}) {
901
+ function forEach(e, t, { allOwnKeys: o = !1 } = {}) {
786
902
  if (e === null || typeof e > "u")
787
903
  return;
788
- let o, r;
904
+ let n, r;
789
905
  if (typeof e != "object" && (e = [e]), isArray(e))
790
- for (o = 0, r = e.length; o < r; o++)
791
- t.call(null, e[o], o, e);
906
+ for (n = 0, r = e.length; n < r; n++)
907
+ t.call(null, e[n], n, e);
792
908
  else {
793
- const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), l = s.length;
909
+ if (isBuffer(e))
910
+ return;
911
+ const s = o ? Object.getOwnPropertyNames(e) : Object.keys(e), l = s.length;
794
912
  let i;
795
- for (o = 0; o < l; o++)
796
- i = s[o], t.call(null, e[i], i, e);
913
+ for (n = 0; n < l; n++)
914
+ i = s[n], t.call(null, e[i], i, e);
797
915
  }
798
916
  }
799
917
  function findKey(e, t) {
918
+ if (isBuffer(e))
919
+ return null;
800
920
  t = t.toLowerCase();
801
- const n = Object.keys(e);
802
- let o = n.length, r;
803
- for (; o-- > 0; )
804
- if (r = n[o], t === r.toLowerCase())
921
+ const o = Object.keys(e);
922
+ let n = o.length, r;
923
+ for (; n-- > 0; )
924
+ if (r = o[n], t === r.toLowerCase())
805
925
  return r;
806
926
  return null;
807
927
  }
808
928
  const _global = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, isContextDefined = (e) => !isUndefined(e) && e !== _global;
809
929
  function merge() {
810
- const { caseless: e } = isContextDefined(this) && this || {}, t = {}, n = (o, r) => {
930
+ const { caseless: e } = isContextDefined(this) && this || {}, t = {}, o = (n, r) => {
811
931
  const s = e && findKey(t, r) || r;
812
- isPlainObject(t[s]) && isPlainObject(o) ? t[s] = merge(t[s], o) : isPlainObject(o) ? t[s] = merge({}, o) : isArray(o) ? t[s] = o.slice() : t[s] = o;
932
+ isPlainObject(t[s]) && isPlainObject(n) ? t[s] = merge(t[s], n) : isPlainObject(n) ? t[s] = merge({}, n) : isArray(n) ? t[s] = n.slice() : t[s] = n;
813
933
  };
814
- for (let o = 0, r = arguments.length; o < r; o++)
815
- arguments[o] && forEach(arguments[o], n);
934
+ for (let n = 0, r = arguments.length; n < r; n++)
935
+ arguments[n] && forEach(arguments[n], o);
816
936
  return t;
817
937
  }
818
- const extend = (e, t, n, { allOwnKeys: o } = {}) => (forEach(t, (r, s) => {
819
- n && isFunction(r) ? e[s] = bind(r, n) : e[s] = r;
820
- }, { allOwnKeys: o }), e), stripBOM = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), inherits = (e, t, n, o) => {
821
- e.prototype = Object.create(t.prototype, o), e.prototype.constructor = e, Object.defineProperty(e, "super", {
938
+ const extend = (e, t, o, { allOwnKeys: n } = {}) => (forEach(t, (r, s) => {
939
+ o && isFunction(r) ? e[s] = bind(r, o) : e[s] = r;
940
+ }, { allOwnKeys: n }), e), stripBOM = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), inherits = (e, t, o, n) => {
941
+ e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
822
942
  value: t.prototype
823
- }), n && Object.assign(e.prototype, n);
824
- }, toFlatObject = (e, t, n, o) => {
943
+ }), o && Object.assign(e.prototype, o);
944
+ }, toFlatObject = (e, t, o, n) => {
825
945
  let r, s, l;
826
946
  const i = {};
827
947
  if (t = t || {}, e == null) return t;
828
948
  do {
829
949
  for (r = Object.getOwnPropertyNames(e), s = r.length; s-- > 0; )
830
- l = r[s], (!o || o(l, e, t)) && !i[l] && (t[l] = e[l], i[l] = !0);
831
- e = n !== !1 && getPrototypeOf(e);
832
- } while (e && (!n || n(e, t)) && e !== Object.prototype);
950
+ l = r[s], (!n || n(l, e, t)) && !i[l] && (t[l] = e[l], i[l] = !0);
951
+ e = o !== !1 && getPrototypeOf(e);
952
+ } while (e && (!o || o(e, t)) && e !== Object.prototype);
833
953
  return t;
834
- }, endsWith = (e, t, n) => {
835
- e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
836
- const o = e.indexOf(t, n);
837
- return o !== -1 && o === n;
954
+ }, endsWith = (e, t, o) => {
955
+ e = String(e), (o === void 0 || o > e.length) && (o = e.length), o -= t.length;
956
+ const n = e.indexOf(t, o);
957
+ return n !== -1 && n === o;
838
958
  }, toArray = (e) => {
839
959
  if (!e) return null;
840
960
  if (isArray(e)) return e;
841
961
  let t = e.length;
842
962
  if (!isNumber(t)) return null;
843
- const n = new Array(t);
963
+ const o = new Array(t);
844
964
  for (; t-- > 0; )
845
- n[t] = e[t];
846
- return n;
965
+ o[t] = e[t];
966
+ return o;
847
967
  }, isTypedArray = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && getPrototypeOf(Uint8Array)), forEachEntry = (e, t) => {
848
- const o = (e && e[iterator]).call(e);
968
+ const n = (e && e[iterator]).call(e);
849
969
  let r;
850
- for (; (r = o.next()) && !r.done; ) {
970
+ for (; (r = n.next()) && !r.done; ) {
851
971
  const s = r.value;
852
972
  t.call(e, s[0], s[1]);
853
973
  }
854
974
  }, matchAll = (e, t) => {
855
- let n;
856
- const o = [];
857
- for (; (n = e.exec(t)) !== null; )
858
- o.push(n);
859
- return o;
975
+ let o;
976
+ const n = [];
977
+ for (; (o = e.exec(t)) !== null; )
978
+ n.push(o);
979
+ return n;
860
980
  }, isHTMLForm = kindOfTest("HTMLFormElement"), toCamelCase = (e) => e.toLowerCase().replace(
861
981
  /[-_\s]([a-z\d])(\w*)/g,
862
- function(n, o, r) {
863
- return o.toUpperCase() + r;
982
+ function(o, n, r) {
983
+ return n.toUpperCase() + r;
864
984
  }
865
- ), hasOwnProperty = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), isRegExp = kindOfTest("RegExp"), reduceDescriptors = (e, t) => {
866
- const n = Object.getOwnPropertyDescriptors(e), o = {};
867
- forEach(n, (r, s) => {
985
+ ), hasOwnProperty = (({ hasOwnProperty: e }) => (t, o) => e.call(t, o))(Object.prototype), isRegExp = kindOfTest("RegExp"), reduceDescriptors = (e, t) => {
986
+ const o = Object.getOwnPropertyDescriptors(e), n = {};
987
+ forEach(o, (r, s) => {
868
988
  let l;
869
- (l = t(r, s, e)) !== !1 && (o[s] = l || r);
870
- }), Object.defineProperties(e, o);
989
+ (l = t(r, s, e)) !== !1 && (n[s] = l || r);
990
+ }), Object.defineProperties(e, n);
871
991
  }, freezeMethods = (e) => {
872
- reduceDescriptors(e, (t, n) => {
873
- if (isFunction(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
992
+ reduceDescriptors(e, (t, o) => {
993
+ if (isFunction(e) && ["arguments", "caller", "callee"].indexOf(o) !== -1)
874
994
  return !1;
875
- const o = e[n];
876
- if (isFunction(o)) {
995
+ const n = e[o];
996
+ if (isFunction(n)) {
877
997
  if (t.enumerable = !1, "writable" in t) {
878
998
  t.writable = !1;
879
999
  return;
880
1000
  }
881
1001
  t.set || (t.set = () => {
882
- throw Error("Can not rewrite read-only method '" + n + "'");
1002
+ throw Error("Can not rewrite read-only method '" + o + "'");
883
1003
  });
884
1004
  }
885
1005
  });
886
1006
  }, toObjectSet = (e, t) => {
887
- const n = {}, o = (r) => {
1007
+ const o = {}, n = (r) => {
888
1008
  r.forEach((s) => {
889
- n[s] = !0;
1009
+ o[s] = !0;
890
1010
  });
891
1011
  };
892
- return isArray(e) ? o(e) : o(String(e).split(t)), n;
1012
+ return isArray(e) ? n(e) : n(String(e).split(t)), o;
893
1013
  }, noop = () => {
894
1014
  }, toFiniteNumber = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
895
1015
  function isSpecCompliantForm(e) {
896
1016
  return !!(e && isFunction(e.append) && e[toStringTag] === "FormData" && e[iterator]);
897
1017
  }
898
1018
  const toJSONObject = (e) => {
899
- const t = new Array(10), n = (o, r) => {
900
- if (isObject(o)) {
901
- if (t.indexOf(o) >= 0)
1019
+ const t = new Array(10), o = (n, r) => {
1020
+ if (isObject(n)) {
1021
+ if (t.indexOf(n) >= 0)
902
1022
  return;
903
- if (!("toJSON" in o)) {
904
- t[r] = o;
905
- const s = isArray(o) ? [] : {};
906
- return forEach(o, (l, i) => {
907
- const u = n(l, r + 1);
1023
+ if (isBuffer(n))
1024
+ return n;
1025
+ if (!("toJSON" in n)) {
1026
+ t[r] = n;
1027
+ const s = isArray(n) ? [] : {};
1028
+ return forEach(n, (l, i) => {
1029
+ const u = o(l, r + 1);
908
1030
  !isUndefined(u) && (s[i] = u);
909
1031
  }), t[r] = void 0, s;
910
1032
  }
911
1033
  }
912
- return o;
1034
+ return n;
913
1035
  };
914
- return n(e, 0);
915
- }, isAsyncFn = kindOfTest("AsyncFunction"), isThenable = (e) => e && (isObject(e) || isFunction(e)) && isFunction(e.then) && isFunction(e.catch), _setImmediate = ((e, t) => e ? setImmediate : t ? ((n, o) => (_global.addEventListener("message", ({ source: r, data: s }) => {
916
- r === _global && s === n && o.length && o.shift()();
1036
+ return o(e, 0);
1037
+ }, isAsyncFn = kindOfTest("AsyncFunction"), isThenable = (e) => e && (isObject(e) || isFunction(e)) && isFunction(e.then) && isFunction(e.catch), _setImmediate = ((e, t) => e ? setImmediate : t ? ((o, n) => (_global.addEventListener("message", ({ source: r, data: s }) => {
1038
+ r === _global && s === o && n.length && n.shift()();
917
1039
  }, !1), (r) => {
918
- o.push(r), _global.postMessage(n, "*");
919
- }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
1040
+ n.push(r), _global.postMessage(o, "*");
1041
+ }))(`axios@${Math.random()}`, []) : (o) => setTimeout(o))(
920
1042
  typeof setImmediate == "function",
921
1043
  isFunction(_global.postMessage)
922
1044
  ), asap = typeof queueMicrotask < "u" ? queueMicrotask.bind(_global) : typeof process < "u" && process.nextTick || _setImmediate, isIterable = (e) => e != null && isFunction(e[iterator]), utils$1 = {
@@ -930,6 +1052,7 @@ const toJSONObject = (e) => {
930
1052
  isBoolean,
931
1053
  isObject,
932
1054
  isPlainObject,
1055
+ isEmptyObject,
933
1056
  isReadableStream,
934
1057
  isRequest,
935
1058
  isResponse,
@@ -978,8 +1101,8 @@ const toJSONObject = (e) => {
978
1101
  asap,
979
1102
  isIterable
980
1103
  };
981
- function AxiosError$1(e, t, n, o, r) {
982
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), o && (this.request = o), r && (this.response = r, this.status = r.status ? r.status : null);
1104
+ function AxiosError$1(e, t, o, n, r) {
1105
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), o && (this.config = o), n && (this.request = n), r && (this.response = r, this.status = r.status ? r.status : null);
983
1106
  }
984
1107
  utils$1.inherits(AxiosError$1, Error, {
985
1108
  toJSON: function() {
@@ -1022,11 +1145,11 @@ const prototype$1 = AxiosError$1.prototype, descriptors = {};
1022
1145
  });
1023
1146
  Object.defineProperties(AxiosError$1, descriptors);
1024
1147
  Object.defineProperty(prototype$1, "isAxiosError", { value: !0 });
1025
- AxiosError$1.from = (e, t, n, o, r, s) => {
1148
+ AxiosError$1.from = (e, t, o, n, r, s) => {
1026
1149
  const l = Object.create(prototype$1);
1027
1150
  return utils$1.toFlatObject(e, l, function(u) {
1028
1151
  return u !== Error.prototype;
1029
- }, (i) => i !== "isAxiosError"), AxiosError$1.call(l, e.message, t, n, o, r), l.cause = e, l.name = e.name, s && Object.assign(l, s), l;
1152
+ }, (i) => i !== "isAxiosError"), AxiosError$1.call(l, e.message, t, o, n, r), l.cause = e, l.name = e.name, s && Object.assign(l, s), l;
1030
1153
  };
1031
1154
  const httpAdapter = null;
1032
1155
  function isVisitable(e) {
@@ -1035,10 +1158,10 @@ function isVisitable(e) {
1035
1158
  function removeBrackets(e) {
1036
1159
  return utils$1.endsWith(e, "[]") ? e.slice(0, -2) : e;
1037
1160
  }
1038
- function renderKey(e, t, n) {
1161
+ function renderKey(e, t, o) {
1039
1162
  return e ? e.concat(t).map(function(r, s) {
1040
- return r = removeBrackets(r), !n && s ? "[" + r + "]" : r;
1041
- }).join(n ? "." : "") : t;
1163
+ return r = removeBrackets(r), !o && s ? "[" + r + "]" : r;
1164
+ }).join(o ? "." : "") : t;
1042
1165
  }
1043
1166
  function isFlatArray(e) {
1044
1167
  return utils$1.isArray(e) && !e.some(isVisitable);
@@ -1046,17 +1169,17 @@ function isFlatArray(e) {
1046
1169
  const predicates = utils$1.toFlatObject(utils$1, {}, null, function(t) {
1047
1170
  return /^is[A-Z]/.test(t);
1048
1171
  });
1049
- function toFormData$1(e, t, n) {
1172
+ function toFormData$1(e, t, o) {
1050
1173
  if (!utils$1.isObject(e))
1051
1174
  throw new TypeError("target must be an object");
1052
- t = t || new FormData(), n = utils$1.toFlatObject(n, {
1175
+ t = t || new FormData(), o = utils$1.toFlatObject(o, {
1053
1176
  metaTokens: !0,
1054
1177
  dots: !1,
1055
1178
  indexes: !1
1056
- }, !1, function(y, m) {
1057
- return !utils$1.isUndefined(m[y]);
1179
+ }, !1, function(g, y) {
1180
+ return !utils$1.isUndefined(y[g]);
1058
1181
  });
1059
- const o = n.metaTokens, r = n.visitor || a, s = n.dots, l = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && utils$1.isSpecCompliantForm(t);
1182
+ const n = o.metaTokens, r = o.visitor || a, s = o.dots, l = o.indexes, u = (o.Blob || typeof Blob < "u" && Blob) && utils$1.isSpecCompliantForm(t);
1060
1183
  if (!utils$1.isFunction(r))
1061
1184
  throw new TypeError("visitor must be a function");
1062
1185
  function c(p) {
@@ -1069,45 +1192,45 @@ function toFormData$1(e, t, n) {
1069
1192
  throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
1070
1193
  return utils$1.isArrayBuffer(p) || utils$1.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
1071
1194
  }
1072
- function a(p, y, m) {
1195
+ function a(p, g, y) {
1073
1196
  let x = p;
1074
- if (p && !m && typeof p == "object") {
1075
- if (utils$1.endsWith(y, "{}"))
1076
- y = o ? y : y.slice(0, -2), p = JSON.stringify(p);
1077
- else if (utils$1.isArray(p) && isFlatArray(p) || (utils$1.isFileList(p) || utils$1.endsWith(y, "[]")) && (x = utils$1.toArray(p)))
1078
- return y = removeBrackets(y), x.forEach(function($, _) {
1079
- !(utils$1.isUndefined($) || $ === null) && t.append(
1197
+ if (p && !y && typeof p == "object") {
1198
+ if (utils$1.endsWith(g, "{}"))
1199
+ g = n ? g : g.slice(0, -2), p = JSON.stringify(p);
1200
+ else if (utils$1.isArray(p) && isFlatArray(p) || (utils$1.isFileList(p) || utils$1.endsWith(g, "[]")) && (x = utils$1.toArray(p)))
1201
+ return g = removeBrackets(g), x.forEach(function(E, C) {
1202
+ !(utils$1.isUndefined(E) || E === null) && t.append(
1080
1203
  // eslint-disable-next-line no-nested-ternary
1081
- l === !0 ? renderKey([y], _, s) : l === null ? y : y + "[]",
1082
- c($)
1204
+ l === !0 ? renderKey([g], C, s) : l === null ? g : g + "[]",
1205
+ c(E)
1083
1206
  );
1084
1207
  }), !1;
1085
1208
  }
1086
- return isVisitable(p) ? !0 : (t.append(renderKey(m, y, s), c(p)), !1);
1209
+ return isVisitable(p) ? !0 : (t.append(renderKey(y, g, s), c(p)), !1);
1087
1210
  }
1088
1211
  const d = [], f = Object.assign(predicates, {
1089
1212
  defaultVisitor: a,
1090
1213
  convertValue: c,
1091
1214
  isVisitable
1092
1215
  });
1093
- function h(p, y) {
1216
+ function m(p, g) {
1094
1217
  if (!utils$1.isUndefined(p)) {
1095
1218
  if (d.indexOf(p) !== -1)
1096
- throw Error("Circular reference detected in " + y.join("."));
1097
- d.push(p), utils$1.forEach(p, function(x, v) {
1219
+ throw Error("Circular reference detected in " + g.join("."));
1220
+ d.push(p), utils$1.forEach(p, function(x, w) {
1098
1221
  (!(utils$1.isUndefined(x) || x === null) && r.call(
1099
1222
  t,
1100
1223
  x,
1101
- utils$1.isString(v) ? v.trim() : v,
1102
- y,
1224
+ utils$1.isString(w) ? w.trim() : w,
1225
+ g,
1103
1226
  f
1104
- )) === !0 && h(x, y ? y.concat(v) : [v]);
1227
+ )) === !0 && m(x, g ? g.concat(w) : [w]);
1105
1228
  }), d.pop();
1106
1229
  }
1107
1230
  }
1108
1231
  if (!utils$1.isObject(e))
1109
1232
  throw new TypeError("data must be an object");
1110
- return h(e), t;
1233
+ return m(e), t;
1111
1234
  }
1112
1235
  function encode$1(e) {
1113
1236
  const t = {
@@ -1119,38 +1242,38 @@ function encode$1(e) {
1119
1242
  "%20": "+",
1120
1243
  "%00": "\0"
1121
1244
  };
1122
- return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(o) {
1123
- return t[o];
1245
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
1246
+ return t[n];
1124
1247
  });
1125
1248
  }
1126
1249
  function AxiosURLSearchParams(e, t) {
1127
1250
  this._pairs = [], e && toFormData$1(e, this, t);
1128
1251
  }
1129
1252
  const prototype = AxiosURLSearchParams.prototype;
1130
- prototype.append = function(t, n) {
1131
- this._pairs.push([t, n]);
1253
+ prototype.append = function(t, o) {
1254
+ this._pairs.push([t, o]);
1132
1255
  };
1133
1256
  prototype.toString = function(t) {
1134
- const n = t ? function(o) {
1135
- return t.call(this, o, encode$1);
1257
+ const o = t ? function(n) {
1258
+ return t.call(this, n, encode$1);
1136
1259
  } : encode$1;
1137
1260
  return this._pairs.map(function(r) {
1138
- return n(r[0]) + "=" + n(r[1]);
1261
+ return o(r[0]) + "=" + o(r[1]);
1139
1262
  }, "").join("&");
1140
1263
  };
1141
1264
  function encode(e) {
1142
1265
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
1143
1266
  }
1144
- function buildURL(e, t, n) {
1267
+ function buildURL(e, t, o) {
1145
1268
  if (!t)
1146
1269
  return e;
1147
- const o = n && n.encode || encode;
1148
- utils$1.isFunction(n) && (n = {
1149
- serialize: n
1270
+ const n = o && o.encode || encode;
1271
+ utils$1.isFunction(o) && (o = {
1272
+ serialize: o
1150
1273
  });
1151
- const r = n && n.serialize;
1274
+ const r = o && o.serialize;
1152
1275
  let s;
1153
- if (r ? s = r(t, n) : s = utils$1.isURLSearchParams(t) ? t.toString() : new AxiosURLSearchParams(t, n).toString(o), s) {
1276
+ if (r ? s = r(t, o) : s = utils$1.isURLSearchParams(t) ? t.toString() : new AxiosURLSearchParams(t, o).toString(n), s) {
1154
1277
  const l = e.indexOf("#");
1155
1278
  l !== -1 && (e = e.slice(0, l)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
1156
1279
  }
@@ -1168,12 +1291,12 @@ class InterceptorManager {
1168
1291
  *
1169
1292
  * @return {Number} An ID used to remove interceptor later
1170
1293
  */
1171
- use(t, n, o) {
1294
+ use(t, o, n) {
1172
1295
  return this.handlers.push({
1173
1296
  fulfilled: t,
1174
- rejected: n,
1175
- synchronous: o ? o.synchronous : !1,
1176
- runWhen: o ? o.runWhen : null
1297
+ rejected: o,
1298
+ synchronous: n ? n.synchronous : !1,
1299
+ runWhen: n ? n.runWhen : null
1177
1300
  }), this.handlers.length - 1;
1178
1301
  }
1179
1302
  /**
@@ -1205,8 +1328,8 @@ class InterceptorManager {
1205
1328
  * @returns {void}
1206
1329
  */
1207
1330
  forEach(t) {
1208
- utils$1.forEach(this.handlers, function(o) {
1209
- o !== null && t(o);
1331
+ utils$1.forEach(this.handlers, function(n) {
1332
+ n !== null && t(n);
1210
1333
  });
1211
1334
  }
1212
1335
  }
@@ -1235,54 +1358,55 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", or
1235
1358
  ...platform$1
1236
1359
  };
1237
1360
  function toURLEncodedForm(e, t) {
1238
- return toFormData$1(e, new platform.classes.URLSearchParams(), Object.assign({
1239
- visitor: function(n, o, r, s) {
1240
- return platform.isNode && utils$1.isBuffer(n) ? (this.append(o, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1241
- }
1242
- }, t));
1361
+ return toFormData$1(e, new platform.classes.URLSearchParams(), {
1362
+ visitor: function(o, n, r, s) {
1363
+ return platform.isNode && utils$1.isBuffer(o) ? (this.append(n, o.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1364
+ },
1365
+ ...t
1366
+ });
1243
1367
  }
1244
1368
  function parsePropPath(e) {
1245
1369
  return utils$1.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1246
1370
  }
1247
1371
  function arrayToObject(e) {
1248
- const t = {}, n = Object.keys(e);
1249
- let o;
1250
- const r = n.length;
1372
+ const t = {}, o = Object.keys(e);
1373
+ let n;
1374
+ const r = o.length;
1251
1375
  let s;
1252
- for (o = 0; o < r; o++)
1253
- s = n[o], t[s] = e[s];
1376
+ for (n = 0; n < r; n++)
1377
+ s = o[n], t[s] = e[s];
1254
1378
  return t;
1255
1379
  }
1256
1380
  function formDataToJSON(e) {
1257
- function t(n, o, r, s) {
1258
- let l = n[s++];
1381
+ function t(o, n, r, s) {
1382
+ let l = o[s++];
1259
1383
  if (l === "__proto__") return !0;
1260
- const i = Number.isFinite(+l), u = s >= n.length;
1261
- return l = !l && utils$1.isArray(r) ? r.length : l, u ? (utils$1.hasOwnProp(r, l) ? r[l] = [r[l], o] : r[l] = o, !i) : ((!r[l] || !utils$1.isObject(r[l])) && (r[l] = []), t(n, o, r[l], s) && utils$1.isArray(r[l]) && (r[l] = arrayToObject(r[l])), !i);
1384
+ const i = Number.isFinite(+l), u = s >= o.length;
1385
+ return l = !l && utils$1.isArray(r) ? r.length : l, u ? (utils$1.hasOwnProp(r, l) ? r[l] = [r[l], n] : r[l] = n, !i) : ((!r[l] || !utils$1.isObject(r[l])) && (r[l] = []), t(o, n, r[l], s) && utils$1.isArray(r[l]) && (r[l] = arrayToObject(r[l])), !i);
1262
1386
  }
1263
1387
  if (utils$1.isFormData(e) && utils$1.isFunction(e.entries)) {
1264
- const n = {};
1265
- return utils$1.forEachEntry(e, (o, r) => {
1266
- t(parsePropPath(o), r, n, 0);
1267
- }), n;
1388
+ const o = {};
1389
+ return utils$1.forEachEntry(e, (n, r) => {
1390
+ t(parsePropPath(n), r, o, 0);
1391
+ }), o;
1268
1392
  }
1269
1393
  return null;
1270
1394
  }
1271
- function stringifySafely(e, t, n) {
1395
+ function stringifySafely(e, t, o) {
1272
1396
  if (utils$1.isString(e))
1273
1397
  try {
1274
1398
  return (t || JSON.parse)(e), utils$1.trim(e);
1275
- } catch (o) {
1276
- if (o.name !== "SyntaxError")
1277
- throw o;
1399
+ } catch (n) {
1400
+ if (n.name !== "SyntaxError")
1401
+ throw n;
1278
1402
  }
1279
- return (n || JSON.stringify)(e);
1403
+ return (o || JSON.stringify)(e);
1280
1404
  }
1281
1405
  const defaults = {
1282
1406
  transitional: transitionalDefaults,
1283
1407
  adapter: ["xhr", "http", "fetch"],
1284
- transformRequest: [function(t, n) {
1285
- const o = n.getContentType() || "", r = o.indexOf("application/json") > -1, s = utils$1.isObject(t);
1408
+ transformRequest: [function(t, o) {
1409
+ const n = o.getContentType() || "", r = n.indexOf("application/json") > -1, s = utils$1.isObject(t);
1286
1410
  if (s && utils$1.isHTMLForm(t) && (t = new FormData(t)), utils$1.isFormData(t))
1287
1411
  return r ? JSON.stringify(formDataToJSON(t)) : t;
1288
1412
  if (utils$1.isArrayBuffer(t) || utils$1.isBuffer(t) || utils$1.isStream(t) || utils$1.isFile(t) || utils$1.isBlob(t) || utils$1.isReadableStream(t))
@@ -1290,12 +1414,12 @@ const defaults = {
1290
1414
  if (utils$1.isArrayBufferView(t))
1291
1415
  return t.buffer;
1292
1416
  if (utils$1.isURLSearchParams(t))
1293
- return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1417
+ return o.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1294
1418
  let i;
1295
1419
  if (s) {
1296
- if (o.indexOf("application/x-www-form-urlencoded") > -1)
1420
+ if (n.indexOf("application/x-www-form-urlencoded") > -1)
1297
1421
  return toURLEncodedForm(t, this.formSerializer).toString();
1298
- if ((i = utils$1.isFileList(t)) || o.indexOf("multipart/form-data") > -1) {
1422
+ if ((i = utils$1.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
1299
1423
  const u = this.env && this.env.FormData;
1300
1424
  return toFormData$1(
1301
1425
  i ? { "files[]": t } : t,
@@ -1304,14 +1428,14 @@ const defaults = {
1304
1428
  );
1305
1429
  }
1306
1430
  }
1307
- return s || r ? (n.setContentType("application/json", !1), stringifySafely(t)) : t;
1431
+ return s || r ? (o.setContentType("application/json", !1), stringifySafely(t)) : t;
1308
1432
  }],
1309
1433
  transformResponse: [function(t) {
1310
- const n = this.transitional || defaults.transitional, o = n && n.forcedJSONParsing, r = this.responseType === "json";
1434
+ const o = this.transitional || defaults.transitional, n = o && o.forcedJSONParsing, r = this.responseType === "json";
1311
1435
  if (utils$1.isResponse(t) || utils$1.isReadableStream(t))
1312
1436
  return t;
1313
- if (t && utils$1.isString(t) && (o && !this.responseType || r)) {
1314
- const l = !(n && n.silentJSONParsing) && r;
1437
+ if (t && utils$1.isString(t) && (n && !this.responseType || r)) {
1438
+ const l = !(o && o.silentJSONParsing) && r;
1315
1439
  try {
1316
1440
  return JSON.parse(t);
1317
1441
  } catch (i) {
@@ -1367,10 +1491,10 @@ const ignoreDuplicateOf = utils$1.toObjectSet([
1367
1491
  "user-agent"
1368
1492
  ]), parseHeaders = (e) => {
1369
1493
  const t = {};
1370
- let n, o, r;
1494
+ let o, n, r;
1371
1495
  return e && e.split(`
1372
1496
  `).forEach(function(l) {
1373
- r = l.indexOf(":"), n = l.substring(0, r).trim().toLowerCase(), o = l.substring(r + 1).trim(), !(!n || t[n] && ignoreDuplicateOf[n]) && (n === "set-cookie" ? t[n] ? t[n].push(o) : t[n] = [o] : t[n] = t[n] ? t[n] + ", " + o : o);
1497
+ r = l.indexOf(":"), o = l.substring(0, r).trim().toLowerCase(), n = l.substring(r + 1).trim(), !(!o || t[o] && ignoreDuplicateOf[o]) && (o === "set-cookie" ? t[o] ? t[o].push(n) : t[o] = [n] : t[o] = t[o] ? t[o] + ", " + n : n);
1374
1498
  }), t;
1375
1499
  }, $internals = Symbol("internals");
1376
1500
  function normalizeHeader(e) {
@@ -1380,32 +1504,32 @@ function normalizeValue(e) {
1380
1504
  return e === !1 || e == null ? e : utils$1.isArray(e) ? e.map(normalizeValue) : String(e);
1381
1505
  }
1382
1506
  function parseTokens(e) {
1383
- const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1384
- let o;
1385
- for (; o = n.exec(e); )
1386
- t[o[1]] = o[2];
1507
+ const t = /* @__PURE__ */ Object.create(null), o = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1508
+ let n;
1509
+ for (; n = o.exec(e); )
1510
+ t[n[1]] = n[2];
1387
1511
  return t;
1388
1512
  }
1389
1513
  const isValidHeaderName = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1390
- function matchHeaderValue(e, t, n, o, r) {
1391
- if (utils$1.isFunction(o))
1392
- return o.call(this, t, n);
1393
- if (r && (t = n), !!utils$1.isString(t)) {
1394
- if (utils$1.isString(o))
1395
- return t.indexOf(o) !== -1;
1396
- if (utils$1.isRegExp(o))
1397
- return o.test(t);
1514
+ function matchHeaderValue(e, t, o, n, r) {
1515
+ if (utils$1.isFunction(n))
1516
+ return n.call(this, t, o);
1517
+ if (r && (t = o), !!utils$1.isString(t)) {
1518
+ if (utils$1.isString(n))
1519
+ return t.indexOf(n) !== -1;
1520
+ if (utils$1.isRegExp(n))
1521
+ return n.test(t);
1398
1522
  }
1399
1523
  }
1400
1524
  function formatHeader(e) {
1401
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, o) => n.toUpperCase() + o);
1525
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, o, n) => o.toUpperCase() + n);
1402
1526
  }
1403
1527
  function buildAccessors(e, t) {
1404
- const n = utils$1.toCamelCase(" " + t);
1405
- ["get", "set", "has"].forEach((o) => {
1406
- Object.defineProperty(e, o + n, {
1528
+ const o = utils$1.toCamelCase(" " + t);
1529
+ ["get", "set", "has"].forEach((n) => {
1530
+ Object.defineProperty(e, n + o, {
1407
1531
  value: function(r, s, l) {
1408
- return this[o].call(this, t, r, s, l);
1532
+ return this[n].call(this, t, r, s, l);
1409
1533
  },
1410
1534
  configurable: !0
1411
1535
  });
@@ -1415,7 +1539,7 @@ let AxiosHeaders$1 = class {
1415
1539
  constructor(t) {
1416
1540
  t && this.set(t);
1417
1541
  }
1418
- set(t, n, o) {
1542
+ set(t, o, n) {
1419
1543
  const r = this;
1420
1544
  function s(i, u, c) {
1421
1545
  const a = normalizeHeader(u);
@@ -1426,9 +1550,9 @@ let AxiosHeaders$1 = class {
1426
1550
  }
1427
1551
  const l = (i, u) => utils$1.forEach(i, (c, a) => s(c, a, u));
1428
1552
  if (utils$1.isPlainObject(t) || t instanceof this.constructor)
1429
- l(t, n);
1553
+ l(t, o);
1430
1554
  else if (utils$1.isString(t) && (t = t.trim()) && !isValidHeaderName(t))
1431
- l(parseHeaders(t), n);
1555
+ l(parseHeaders(t), o);
1432
1556
  else if (utils$1.isObject(t) && utils$1.isIterable(t)) {
1433
1557
  let i = {}, u, c;
1434
1558
  for (const a of t) {
@@ -1436,81 +1560,81 @@ let AxiosHeaders$1 = class {
1436
1560
  throw TypeError("Object iterator must return a key-value pair");
1437
1561
  i[c = a[0]] = (u = i[c]) ? utils$1.isArray(u) ? [...u, a[1]] : [u, a[1]] : a[1];
1438
1562
  }
1439
- l(i, n);
1563
+ l(i, o);
1440
1564
  } else
1441
- t != null && s(n, t, o);
1565
+ t != null && s(o, t, n);
1442
1566
  return this;
1443
1567
  }
1444
- get(t, n) {
1568
+ get(t, o) {
1445
1569
  if (t = normalizeHeader(t), t) {
1446
- const o = utils$1.findKey(this, t);
1447
- if (o) {
1448
- const r = this[o];
1449
- if (!n)
1570
+ const n = utils$1.findKey(this, t);
1571
+ if (n) {
1572
+ const r = this[n];
1573
+ if (!o)
1450
1574
  return r;
1451
- if (n === !0)
1575
+ if (o === !0)
1452
1576
  return parseTokens(r);
1453
- if (utils$1.isFunction(n))
1454
- return n.call(this, r, o);
1455
- if (utils$1.isRegExp(n))
1456
- return n.exec(r);
1577
+ if (utils$1.isFunction(o))
1578
+ return o.call(this, r, n);
1579
+ if (utils$1.isRegExp(o))
1580
+ return o.exec(r);
1457
1581
  throw new TypeError("parser must be boolean|regexp|function");
1458
1582
  }
1459
1583
  }
1460
1584
  }
1461
- has(t, n) {
1585
+ has(t, o) {
1462
1586
  if (t = normalizeHeader(t), t) {
1463
- const o = utils$1.findKey(this, t);
1464
- return !!(o && this[o] !== void 0 && (!n || matchHeaderValue(this, this[o], o, n)));
1587
+ const n = utils$1.findKey(this, t);
1588
+ return !!(n && this[n] !== void 0 && (!o || matchHeaderValue(this, this[n], n, o)));
1465
1589
  }
1466
1590
  return !1;
1467
1591
  }
1468
- delete(t, n) {
1469
- const o = this;
1592
+ delete(t, o) {
1593
+ const n = this;
1470
1594
  let r = !1;
1471
1595
  function s(l) {
1472
1596
  if (l = normalizeHeader(l), l) {
1473
- const i = utils$1.findKey(o, l);
1474
- i && (!n || matchHeaderValue(o, o[i], i, n)) && (delete o[i], r = !0);
1597
+ const i = utils$1.findKey(n, l);
1598
+ i && (!o || matchHeaderValue(n, n[i], i, o)) && (delete n[i], r = !0);
1475
1599
  }
1476
1600
  }
1477
1601
  return utils$1.isArray(t) ? t.forEach(s) : s(t), r;
1478
1602
  }
1479
1603
  clear(t) {
1480
- const n = Object.keys(this);
1481
- let o = n.length, r = !1;
1482
- for (; o--; ) {
1483
- const s = n[o];
1604
+ const o = Object.keys(this);
1605
+ let n = o.length, r = !1;
1606
+ for (; n--; ) {
1607
+ const s = o[n];
1484
1608
  (!t || matchHeaderValue(this, this[s], s, t, !0)) && (delete this[s], r = !0);
1485
1609
  }
1486
1610
  return r;
1487
1611
  }
1488
1612
  normalize(t) {
1489
- const n = this, o = {};
1613
+ const o = this, n = {};
1490
1614
  return utils$1.forEach(this, (r, s) => {
1491
- const l = utils$1.findKey(o, s);
1615
+ const l = utils$1.findKey(n, s);
1492
1616
  if (l) {
1493
- n[l] = normalizeValue(r), delete n[s];
1617
+ o[l] = normalizeValue(r), delete o[s];
1494
1618
  return;
1495
1619
  }
1496
1620
  const i = t ? formatHeader(s) : String(s).trim();
1497
- i !== s && delete n[s], n[i] = normalizeValue(r), o[i] = !0;
1621
+ i !== s && delete o[s], o[i] = normalizeValue(r), n[i] = !0;
1498
1622
  }), this;
1499
1623
  }
1500
1624
  concat(...t) {
1501
1625
  return this.constructor.concat(this, ...t);
1502
1626
  }
1503
1627
  toJSON(t) {
1504
- const n = /* @__PURE__ */ Object.create(null);
1505
- return utils$1.forEach(this, (o, r) => {
1506
- o != null && o !== !1 && (n[r] = t && utils$1.isArray(o) ? o.join(", ") : o);
1507
- }), n;
1628
+ const o = /* @__PURE__ */ Object.create(null);
1629
+ return utils$1.forEach(this, (n, r) => {
1630
+ n != null && n !== !1 && (o[r] = t && utils$1.isArray(n) ? n.join(", ") : n);
1631
+ }), o;
1508
1632
  }
1509
1633
  [Symbol.iterator]() {
1510
1634
  return Object.entries(this.toJSON())[Symbol.iterator]();
1511
1635
  }
1512
1636
  toString() {
1513
- return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
1637
+ return Object.entries(this.toJSON()).map(([t, o]) => t + ": " + o).join(`
1514
1638
  `);
1515
1639
  }
1516
1640
  getSetCookie() {
@@ -1522,56 +1646,56 @@ let AxiosHeaders$1 = class {
1522
1646
  static from(t) {
1523
1647
  return t instanceof this ? t : new this(t);
1524
1648
  }
1525
- static concat(t, ...n) {
1526
- const o = new this(t);
1527
- return n.forEach((r) => o.set(r)), o;
1649
+ static concat(t, ...o) {
1650
+ const n = new this(t);
1651
+ return o.forEach((r) => n.set(r)), n;
1528
1652
  }
1529
1653
  static accessor(t) {
1530
- const o = (this[$internals] = this[$internals] = {
1654
+ const n = (this[$internals] = this[$internals] = {
1531
1655
  accessors: {}
1532
1656
  }).accessors, r = this.prototype;
1533
1657
  function s(l) {
1534
1658
  const i = normalizeHeader(l);
1535
- o[i] || (buildAccessors(r, l), o[i] = !0);
1659
+ n[i] || (buildAccessors(r, l), n[i] = !0);
1536
1660
  }
1537
1661
  return utils$1.isArray(t) ? t.forEach(s) : s(t), this;
1538
1662
  }
1539
1663
  };
1540
1664
  AxiosHeaders$1.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1541
1665
  utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value: e }, t) => {
1542
- let n = t[0].toUpperCase() + t.slice(1);
1666
+ let o = t[0].toUpperCase() + t.slice(1);
1543
1667
  return {
1544
1668
  get: () => e,
1545
- set(o) {
1546
- this[n] = o;
1669
+ set(n) {
1670
+ this[o] = n;
1547
1671
  }
1548
1672
  };
1549
1673
  });
1550
1674
  utils$1.freezeMethods(AxiosHeaders$1);
1551
1675
  function transformData(e, t) {
1552
- const n = this || defaults, o = t || n, r = AxiosHeaders$1.from(o.headers);
1553
- let s = o.data;
1676
+ const o = this || defaults, n = t || o, r = AxiosHeaders$1.from(n.headers);
1677
+ let s = n.data;
1554
1678
  return utils$1.forEach(e, function(i) {
1555
- s = i.call(n, s, r.normalize(), t ? t.status : void 0);
1679
+ s = i.call(o, s, r.normalize(), t ? t.status : void 0);
1556
1680
  }), r.normalize(), s;
1557
1681
  }
1558
1682
  function isCancel$1(e) {
1559
1683
  return !!(e && e.__CANCEL__);
1560
1684
  }
1561
- function CanceledError$1(e, t, n) {
1562
- AxiosError$1.call(this, e ?? "canceled", AxiosError$1.ERR_CANCELED, t, n), this.name = "CanceledError";
1685
+ function CanceledError$1(e, t, o) {
1686
+ AxiosError$1.call(this, e ?? "canceled", AxiosError$1.ERR_CANCELED, t, o), this.name = "CanceledError";
1563
1687
  }
1564
1688
  utils$1.inherits(CanceledError$1, AxiosError$1, {
1565
1689
  __CANCEL__: !0
1566
1690
  });
1567
- function settle(e, t, n) {
1568
- const o = n.config.validateStatus;
1569
- !n.status || !o || o(n.status) ? e(n) : t(new AxiosError$1(
1570
- "Request failed with status code " + n.status,
1571
- [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1572
- n.config,
1573
- n.request,
1574
- n
1691
+ function settle(e, t, o) {
1692
+ const n = o.config.validateStatus;
1693
+ !o.status || !n || n(o.status) ? e(o) : t(new AxiosError$1(
1694
+ "Request failed with status code " + o.status,
1695
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(o.status / 100) - 4],
1696
+ o.config,
1697
+ o.request,
1698
+ o
1575
1699
  ));
1576
1700
  }
1577
1701
  function parseProtocol(e) {
@@ -1580,38 +1704,38 @@ function parseProtocol(e) {
1580
1704
  }
1581
1705
  function speedometer(e, t) {
1582
1706
  e = e || 10;
1583
- const n = new Array(e), o = new Array(e);
1707
+ const o = new Array(e), n = new Array(e);
1584
1708
  let r = 0, s = 0, l;
1585
1709
  return t = t !== void 0 ? t : 1e3, function(u) {
1586
- const c = Date.now(), a = o[s];
1587
- l || (l = c), n[r] = u, o[r] = c;
1710
+ const c = Date.now(), a = n[s];
1711
+ l || (l = c), o[r] = u, n[r] = c;
1588
1712
  let d = s, f = 0;
1589
1713
  for (; d !== r; )
1590
- f += n[d++], d = d % e;
1714
+ f += o[d++], d = d % e;
1591
1715
  if (r = (r + 1) % e, r === s && (s = (s + 1) % e), c - l < t)
1592
1716
  return;
1593
- const h = a && c - a;
1594
- return h ? Math.round(f * 1e3 / h) : void 0;
1717
+ const m = a && c - a;
1718
+ return m ? Math.round(f * 1e3 / m) : void 0;
1595
1719
  };
1596
1720
  }
1597
1721
  function throttle(e, t) {
1598
- let n = 0, o = 1e3 / t, r, s;
1722
+ let o = 0, n = 1e3 / t, r, s;
1599
1723
  const l = (c, a = Date.now()) => {
1600
- n = a, r = null, s && (clearTimeout(s), s = null), e.apply(null, c);
1724
+ o = a, r = null, s && (clearTimeout(s), s = null), e(...c);
1601
1725
  };
1602
1726
  return [(...c) => {
1603
- const a = Date.now(), d = a - n;
1604
- d >= o ? l(c, a) : (r = c, s || (s = setTimeout(() => {
1727
+ const a = Date.now(), d = a - o;
1728
+ d >= n ? l(c, a) : (r = c, s || (s = setTimeout(() => {
1605
1729
  s = null, l(r);
1606
- }, o - d)));
1730
+ }, n - d)));
1607
1731
  }, () => r && l(r)];
1608
1732
  }
1609
- const progressEventReducer = (e, t, n = 3) => {
1610
- let o = 0;
1733
+ const progressEventReducer = (e, t, o = 3) => {
1734
+ let n = 0;
1611
1735
  const r = speedometer(50, 250);
1612
1736
  return throttle((s) => {
1613
- const l = s.loaded, i = s.lengthComputable ? s.total : void 0, u = l - o, c = r(u), a = l <= i;
1614
- o = l;
1737
+ const l = s.loaded, i = s.lengthComputable ? s.total : void 0, u = l - n, c = r(u), a = l <= i;
1738
+ n = l;
1615
1739
  const d = {
1616
1740
  loaded: l,
1617
1741
  total: i,
@@ -1624,23 +1748,23 @@ const progressEventReducer = (e, t, n = 3) => {
1624
1748
  [t ? "download" : "upload"]: !0
1625
1749
  };
1626
1750
  e(d);
1627
- }, n);
1751
+ }, o);
1628
1752
  }, progressEventDecorator = (e, t) => {
1629
- const n = e != null;
1630
- return [(o) => t[0]({
1631
- lengthComputable: n,
1753
+ const o = e != null;
1754
+ return [(n) => t[0]({
1755
+ lengthComputable: o,
1632
1756
  total: e,
1633
- loaded: o
1757
+ loaded: n
1634
1758
  }), t[1]];
1635
- }, asyncDecorator = (e) => (...t) => utils$1.asap(() => e(...t)), isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, platform.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1759
+ }, asyncDecorator = (e) => (...t) => utils$1.asap(() => e(...t)), isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (o) => (o = new URL(o, platform.origin), e.protocol === o.protocol && e.host === o.host && (t || e.port === o.port)))(
1636
1760
  new URL(platform.origin),
1637
1761
  platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
1638
1762
  ) : () => !0, cookies = platform.hasStandardBrowserEnv ? (
1639
1763
  // Standard browser envs support document.cookie
1640
1764
  {
1641
- write(e, t, n, o, r, s) {
1765
+ write(e, t, o, n, r, s) {
1642
1766
  const l = [e + "=" + encodeURIComponent(t)];
1643
- utils$1.isNumber(n) && l.push("expires=" + new Date(n).toGMTString()), utils$1.isString(o) && l.push("path=" + o), utils$1.isString(r) && l.push("domain=" + r), s === !0 && l.push("secure"), document.cookie = l.join("; ");
1767
+ utils$1.isNumber(o) && l.push("expires=" + new Date(o).toGMTString()), utils$1.isString(n) && l.push("path=" + n), utils$1.isString(r) && l.push("domain=" + r), s === !0 && l.push("secure"), document.cookie = l.join("; ");
1644
1768
  },
1645
1769
  read(e) {
1646
1770
  const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
@@ -1668,38 +1792,38 @@ function isAbsoluteURL(e) {
1668
1792
  function combineURLs(e, t) {
1669
1793
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1670
1794
  }
1671
- function buildFullPath(e, t, n) {
1672
- let o = !isAbsoluteURL(t);
1673
- return e && (o || n == !1) ? combineURLs(e, t) : t;
1795
+ function buildFullPath(e, t, o) {
1796
+ let n = !isAbsoluteURL(t);
1797
+ return e && (n || o == !1) ? combineURLs(e, t) : t;
1674
1798
  }
1675
1799
  const headersToObject = (e) => e instanceof AxiosHeaders$1 ? { ...e } : e;
1676
1800
  function mergeConfig$1(e, t) {
1677
1801
  t = t || {};
1678
- const n = {};
1679
- function o(c, a, d, f) {
1802
+ const o = {};
1803
+ function n(c, a, d, f) {
1680
1804
  return utils$1.isPlainObject(c) && utils$1.isPlainObject(a) ? utils$1.merge.call({ caseless: f }, c, a) : utils$1.isPlainObject(a) ? utils$1.merge({}, a) : utils$1.isArray(a) ? a.slice() : a;
1681
1805
  }
1682
1806
  function r(c, a, d, f) {
1683
1807
  if (utils$1.isUndefined(a)) {
1684
1808
  if (!utils$1.isUndefined(c))
1685
- return o(void 0, c, d, f);
1686
- } else return o(c, a, d, f);
1809
+ return n(void 0, c, d, f);
1810
+ } else return n(c, a, d, f);
1687
1811
  }
1688
1812
  function s(c, a) {
1689
1813
  if (!utils$1.isUndefined(a))
1690
- return o(void 0, a);
1814
+ return n(void 0, a);
1691
1815
  }
1692
1816
  function l(c, a) {
1693
1817
  if (utils$1.isUndefined(a)) {
1694
1818
  if (!utils$1.isUndefined(c))
1695
- return o(void 0, c);
1696
- } else return o(void 0, a);
1819
+ return n(void 0, c);
1820
+ } else return n(void 0, a);
1697
1821
  }
1698
1822
  function i(c, a, d) {
1699
1823
  if (d in t)
1700
- return o(c, a);
1824
+ return n(c, a);
1701
1825
  if (d in e)
1702
- return o(void 0, c);
1826
+ return n(void 0, c);
1703
1827
  }
1704
1828
  const u = {
1705
1829
  url: s,
@@ -1732,20 +1856,20 @@ function mergeConfig$1(e, t) {
1732
1856
  validateStatus: i,
1733
1857
  headers: (c, a, d) => r(headersToObject(c), headersToObject(a), d, !0)
1734
1858
  };
1735
- return utils$1.forEach(Object.keys(Object.assign({}, e, t)), function(a) {
1859
+ return utils$1.forEach(Object.keys({ ...e, ...t }), function(a) {
1736
1860
  const d = u[a] || r, f = d(e[a], t[a], a);
1737
- utils$1.isUndefined(f) && d !== i || (n[a] = f);
1738
- }), n;
1861
+ utils$1.isUndefined(f) && d !== i || (o[a] = f);
1862
+ }), o;
1739
1863
  }
1740
1864
  const resolveConfig = (e) => {
1741
1865
  const t = mergeConfig$1({}, e);
1742
- let { data: n, withXSRFToken: o, xsrfHeaderName: r, xsrfCookieName: s, headers: l, auth: i } = t;
1866
+ let { data: o, withXSRFToken: n, xsrfHeaderName: r, xsrfCookieName: s, headers: l, auth: i } = t;
1743
1867
  t.headers = l = AxiosHeaders$1.from(l), t.url = buildURL(buildFullPath(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), i && l.set(
1744
1868
  "Authorization",
1745
1869
  "Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
1746
1870
  );
1747
1871
  let u;
1748
- if (utils$1.isFormData(n)) {
1872
+ if (utils$1.isFormData(o)) {
1749
1873
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv)
1750
1874
  l.setContentType(void 0);
1751
1875
  else if ((u = l.getContentType()) !== !1) {
@@ -1753,77 +1877,77 @@ const resolveConfig = (e) => {
1753
1877
  l.setContentType([c || "multipart/form-data", ...a].join("; "));
1754
1878
  }
1755
1879
  }
1756
- if (platform.hasStandardBrowserEnv && (o && utils$1.isFunction(o) && (o = o(t)), o || o !== !1 && isURLSameOrigin(t.url))) {
1880
+ if (platform.hasStandardBrowserEnv && (n && utils$1.isFunction(n) && (n = n(t)), n || n !== !1 && isURLSameOrigin(t.url))) {
1757
1881
  const c = r && s && cookies.read(s);
1758
1882
  c && l.set(r, c);
1759
1883
  }
1760
1884
  return t;
1761
1885
  }, isXHRAdapterSupported = typeof XMLHttpRequest < "u", xhrAdapter = isXHRAdapterSupported && function(e) {
1762
- return new Promise(function(n, o) {
1886
+ return new Promise(function(o, n) {
1763
1887
  const r = resolveConfig(e);
1764
1888
  let s = r.data;
1765
1889
  const l = AxiosHeaders$1.from(r.headers).normalize();
1766
- let { responseType: i, onUploadProgress: u, onDownloadProgress: c } = r, a, d, f, h, p;
1767
- function y() {
1768
- h && h(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(a), r.signal && r.signal.removeEventListener("abort", a);
1890
+ let { responseType: i, onUploadProgress: u, onDownloadProgress: c } = r, a, d, f, m, p;
1891
+ function g() {
1892
+ m && m(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(a), r.signal && r.signal.removeEventListener("abort", a);
1769
1893
  }
1770
- let m = new XMLHttpRequest();
1771
- m.open(r.method.toUpperCase(), r.url, !0), m.timeout = r.timeout;
1894
+ let y = new XMLHttpRequest();
1895
+ y.open(r.method.toUpperCase(), r.url, !0), y.timeout = r.timeout;
1772
1896
  function x() {
1773
- if (!m)
1897
+ if (!y)
1774
1898
  return;
1775
- const $ = AxiosHeaders$1.from(
1776
- "getAllResponseHeaders" in m && m.getAllResponseHeaders()
1777
- ), k = {
1778
- data: !i || i === "text" || i === "json" ? m.responseText : m.response,
1779
- status: m.status,
1780
- statusText: m.statusText,
1781
- headers: $,
1899
+ const E = AxiosHeaders$1.from(
1900
+ "getAllResponseHeaders" in y && y.getAllResponseHeaders()
1901
+ ), _ = {
1902
+ data: !i || i === "text" || i === "json" ? y.responseText : y.response,
1903
+ status: y.status,
1904
+ statusText: y.statusText,
1905
+ headers: E,
1782
1906
  config: e,
1783
- request: m
1907
+ request: y
1784
1908
  };
1785
- settle(function(S) {
1786
- n(S), y();
1787
- }, function(S) {
1788
- o(S), y();
1789
- }, k), m = null;
1909
+ settle(function(B) {
1910
+ o(B), g();
1911
+ }, function(B) {
1912
+ n(B), g();
1913
+ }, _), y = null;
1790
1914
  }
1791
- "onloadend" in m ? m.onloadend = x : m.onreadystatechange = function() {
1792
- !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(x);
1793
- }, m.onabort = function() {
1794
- m && (o(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, e, m)), m = null);
1795
- }, m.onerror = function() {
1796
- o(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, e, m)), m = null;
1797
- }, m.ontimeout = function() {
1798
- let _ = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
1799
- const k = r.transitional || transitionalDefaults;
1800
- r.timeoutErrorMessage && (_ = r.timeoutErrorMessage), o(new AxiosError$1(
1801
- _,
1802
- k.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
1915
+ "onloadend" in y ? y.onloadend = x : y.onreadystatechange = function() {
1916
+ !y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(x);
1917
+ }, y.onabort = function() {
1918
+ y && (n(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, e, y)), y = null);
1919
+ }, y.onerror = function() {
1920
+ n(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, e, y)), y = null;
1921
+ }, y.ontimeout = function() {
1922
+ let C = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
1923
+ const _ = r.transitional || transitionalDefaults;
1924
+ r.timeoutErrorMessage && (C = r.timeoutErrorMessage), n(new AxiosError$1(
1925
+ C,
1926
+ _.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
1803
1927
  e,
1804
- m
1805
- )), m = null;
1806
- }, s === void 0 && l.setContentType(null), "setRequestHeader" in m && utils$1.forEach(l.toJSON(), function(_, k) {
1807
- m.setRequestHeader(k, _);
1808
- }), utils$1.isUndefined(r.withCredentials) || (m.withCredentials = !!r.withCredentials), i && i !== "json" && (m.responseType = r.responseType), c && ([f, p] = progressEventReducer(c, !0), m.addEventListener("progress", f)), u && m.upload && ([d, h] = progressEventReducer(u), m.upload.addEventListener("progress", d), m.upload.addEventListener("loadend", h)), (r.cancelToken || r.signal) && (a = ($) => {
1809
- m && (o(!$ || $.type ? new CanceledError$1(null, e, m) : $), m.abort(), m = null);
1928
+ y
1929
+ )), y = null;
1930
+ }, s === void 0 && l.setContentType(null), "setRequestHeader" in y && utils$1.forEach(l.toJSON(), function(C, _) {
1931
+ y.setRequestHeader(_, C);
1932
+ }), utils$1.isUndefined(r.withCredentials) || (y.withCredentials = !!r.withCredentials), i && i !== "json" && (y.responseType = r.responseType), c && ([f, p] = progressEventReducer(c, !0), y.addEventListener("progress", f)), u && y.upload && ([d, m] = progressEventReducer(u), y.upload.addEventListener("progress", d), y.upload.addEventListener("loadend", m)), (r.cancelToken || r.signal) && (a = (E) => {
1933
+ y && (n(!E || E.type ? new CanceledError$1(null, e, y) : E), y.abort(), y = null);
1810
1934
  }, r.cancelToken && r.cancelToken.subscribe(a), r.signal && (r.signal.aborted ? a() : r.signal.addEventListener("abort", a)));
1811
- const v = parseProtocol(r.url);
1812
- if (v && platform.protocols.indexOf(v) === -1) {
1813
- o(new AxiosError$1("Unsupported protocol " + v + ":", AxiosError$1.ERR_BAD_REQUEST, e));
1935
+ const w = parseProtocol(r.url);
1936
+ if (w && platform.protocols.indexOf(w) === -1) {
1937
+ n(new AxiosError$1("Unsupported protocol " + w + ":", AxiosError$1.ERR_BAD_REQUEST, e));
1814
1938
  return;
1815
1939
  }
1816
- m.send(s || null);
1940
+ y.send(s || null);
1817
1941
  });
1818
1942
  }, composeSignals = (e, t) => {
1819
- const { length: n } = e = e ? e.filter(Boolean) : [];
1820
- if (t || n) {
1821
- let o = new AbortController(), r;
1943
+ const { length: o } = e = e ? e.filter(Boolean) : [];
1944
+ if (t || o) {
1945
+ let n = new AbortController(), r;
1822
1946
  const s = function(c) {
1823
1947
  if (!r) {
1824
1948
  r = !0, i();
1825
1949
  const a = c instanceof Error ? c : this.reason;
1826
- o.abort(a instanceof AxiosError$1 ? a : new CanceledError$1(a instanceof Error ? a.message : a));
1950
+ n.abort(a instanceof AxiosError$1 ? a : new CanceledError$1(a instanceof Error ? a.message : a));
1827
1951
  }
1828
1952
  };
1829
1953
  let l = t && setTimeout(() => {
@@ -1835,21 +1959,21 @@ const resolveConfig = (e) => {
1835
1959
  }), e = null);
1836
1960
  };
1837
1961
  e.forEach((c) => c.addEventListener("abort", s));
1838
- const { signal: u } = o;
1962
+ const { signal: u } = n;
1839
1963
  return u.unsubscribe = () => utils$1.asap(i), u;
1840
1964
  }
1841
1965
  }, streamChunk = function* (e, t) {
1842
- let n = e.byteLength;
1843
- if (n < t) {
1966
+ let o = e.byteLength;
1967
+ if (o < t) {
1844
1968
  yield e;
1845
1969
  return;
1846
1970
  }
1847
- let o = 0, r;
1848
- for (; o < n; )
1849
- r = o + t, yield e.slice(o, r), o = r;
1971
+ let n = 0, r;
1972
+ for (; n < o; )
1973
+ r = n + t, yield e.slice(n, r), n = r;
1850
1974
  }, readBytes = async function* (e, t) {
1851
- for await (const n of readStream(e))
1852
- yield* streamChunk(n, t);
1975
+ for await (const o of readStream(e))
1976
+ yield* streamChunk(o, t);
1853
1977
  }, readStream = async function* (e) {
1854
1978
  if (e[Symbol.asyncIterator]) {
1855
1979
  yield* e;
@@ -1858,18 +1982,18 @@ const resolveConfig = (e) => {
1858
1982
  const t = e.getReader();
1859
1983
  try {
1860
1984
  for (; ; ) {
1861
- const { done: n, value: o } = await t.read();
1862
- if (n)
1985
+ const { done: o, value: n } = await t.read();
1986
+ if (o)
1863
1987
  break;
1864
- yield o;
1988
+ yield n;
1865
1989
  }
1866
1990
  } finally {
1867
1991
  await t.cancel();
1868
1992
  }
1869
- }, trackStream = (e, t, n, o) => {
1993
+ }, trackStream = (e, t, o, n) => {
1870
1994
  const r = readBytes(e, t);
1871
1995
  let s = 0, l, i = (u) => {
1872
- l || (l = !0, o && o(u));
1996
+ l || (l = !0, n && n(u));
1873
1997
  };
1874
1998
  return new ReadableStream({
1875
1999
  async pull(u) {
@@ -1880,9 +2004,9 @@ const resolveConfig = (e) => {
1880
2004
  return;
1881
2005
  }
1882
2006
  let d = a.byteLength;
1883
- if (n) {
2007
+ if (o) {
1884
2008
  let f = s += d;
1885
- n(f);
2009
+ o(f);
1886
2010
  }
1887
2011
  u.enqueue(new Uint8Array(a));
1888
2012
  } catch (c) {
@@ -1916,8 +2040,8 @@ const resolveConfig = (e) => {
1916
2040
  };
1917
2041
  isFetchSupported && ((e) => {
1918
2042
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1919
- !resolvers[t] && (resolvers[t] = utils$1.isFunction(e[t]) ? (n) => n[t]() : (n, o) => {
1920
- throw new AxiosError$1(`Response type '${t}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, o);
2043
+ !resolvers[t] && (resolvers[t] = utils$1.isFunction(e[t]) ? (o) => o[t]() : (o, n) => {
2044
+ throw new AxiosError$1(`Response type '${t}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, n);
1921
2045
  });
1922
2046
  });
1923
2047
  })(new Response());
@@ -1936,13 +2060,13 @@ const getBodyLength = async (e) => {
1936
2060
  if (utils$1.isURLSearchParams(e) && (e = e + ""), utils$1.isString(e))
1937
2061
  return (await encodeText(e)).byteLength;
1938
2062
  }, resolveBodyLength = async (e, t) => {
1939
- const n = utils$1.toFiniteNumber(e.getContentLength());
1940
- return n ?? getBodyLength(t);
2063
+ const o = utils$1.toFiniteNumber(e.getContentLength());
2064
+ return o ?? getBodyLength(t);
1941
2065
  }, fetchAdapter = isFetchSupported && (async (e) => {
1942
2066
  let {
1943
2067
  url: t,
1944
- method: n,
1945
- data: o,
2068
+ method: o,
2069
+ data: n,
1946
2070
  signal: r,
1947
2071
  cancelToken: s,
1948
2072
  timeout: l,
@@ -1954,69 +2078,69 @@ const getBodyLength = async (e) => {
1954
2078
  fetchOptions: f
1955
2079
  } = resolveConfig(e);
1956
2080
  c = c ? (c + "").toLowerCase() : "text";
1957
- let h = composeSignals([r, s && s.toAbortSignal()], l), p;
1958
- const y = h && h.unsubscribe && (() => {
1959
- h.unsubscribe();
2081
+ let m = composeSignals([r, s && s.toAbortSignal()], l), p;
2082
+ const g = m && m.unsubscribe && (() => {
2083
+ m.unsubscribe();
1960
2084
  });
1961
- let m;
2085
+ let y;
1962
2086
  try {
1963
- if (u && supportsRequestStream && n !== "get" && n !== "head" && (m = await resolveBodyLength(a, o)) !== 0) {
1964
- let k = new Request(t, {
2087
+ if (u && supportsRequestStream && o !== "get" && o !== "head" && (y = await resolveBodyLength(a, n)) !== 0) {
2088
+ let _ = new Request(t, {
1965
2089
  method: "POST",
1966
- body: o,
2090
+ body: n,
1967
2091
  duplex: "half"
1968
- }), E;
1969
- if (utils$1.isFormData(o) && (E = k.headers.get("content-type")) && a.setContentType(E), k.body) {
1970
- const [S, C] = progressEventDecorator(
1971
- m,
2092
+ }), S;
2093
+ if (utils$1.isFormData(n) && (S = _.headers.get("content-type")) && a.setContentType(S), _.body) {
2094
+ const [B, V] = progressEventDecorator(
2095
+ y,
1972
2096
  progressEventReducer(asyncDecorator(u))
1973
2097
  );
1974
- o = trackStream(k.body, DEFAULT_CHUNK_SIZE, S, C);
2098
+ n = trackStream(_.body, DEFAULT_CHUNK_SIZE, B, V);
1975
2099
  }
1976
2100
  }
1977
2101
  utils$1.isString(d) || (d = d ? "include" : "omit");
1978
2102
  const x = "credentials" in Request.prototype;
1979
2103
  p = new Request(t, {
1980
2104
  ...f,
1981
- signal: h,
1982
- method: n.toUpperCase(),
2105
+ signal: m,
2106
+ method: o.toUpperCase(),
1983
2107
  headers: a.normalize().toJSON(),
1984
- body: o,
2108
+ body: n,
1985
2109
  duplex: "half",
1986
2110
  credentials: x ? d : void 0
1987
2111
  });
1988
- let v = await fetch(p, f);
1989
- const $ = supportsResponseStream && (c === "stream" || c === "response");
1990
- if (supportsResponseStream && (i || $ && y)) {
1991
- const k = {};
1992
- ["status", "statusText", "headers"].forEach((B) => {
1993
- k[B] = v[B];
2112
+ let w = await fetch(p, f);
2113
+ const E = supportsResponseStream && (c === "stream" || c === "response");
2114
+ if (supportsResponseStream && (i || E && g)) {
2115
+ const _ = {};
2116
+ ["status", "statusText", "headers"].forEach((A) => {
2117
+ _[A] = w[A];
1994
2118
  });
1995
- const E = utils$1.toFiniteNumber(v.headers.get("content-length")), [S, C] = i && progressEventDecorator(
1996
- E,
2119
+ const S = utils$1.toFiniteNumber(w.headers.get("content-length")), [B, V] = i && progressEventDecorator(
2120
+ S,
1997
2121
  progressEventReducer(asyncDecorator(i), !0)
1998
2122
  ) || [];
1999
- v = new Response(
2000
- trackStream(v.body, DEFAULT_CHUNK_SIZE, S, () => {
2001
- C && C(), y && y();
2123
+ w = new Response(
2124
+ trackStream(w.body, DEFAULT_CHUNK_SIZE, B, () => {
2125
+ V && V(), g && g();
2002
2126
  }),
2003
- k
2127
+ _
2004
2128
  );
2005
2129
  }
2006
2130
  c = c || "text";
2007
- let _ = await resolvers[utils$1.findKey(resolvers, c) || "text"](v, e);
2008
- return !$ && y && y(), await new Promise((k, E) => {
2009
- settle(k, E, {
2010
- data: _,
2011
- headers: AxiosHeaders$1.from(v.headers),
2012
- status: v.status,
2013
- statusText: v.statusText,
2131
+ let C = await resolvers[utils$1.findKey(resolvers, c) || "text"](w, e);
2132
+ return !E && g && g(), await new Promise((_, S) => {
2133
+ settle(_, S, {
2134
+ data: C,
2135
+ headers: AxiosHeaders$1.from(w.headers),
2136
+ status: w.status,
2137
+ statusText: w.statusText,
2014
2138
  config: e,
2015
2139
  request: p
2016
2140
  });
2017
2141
  });
2018
2142
  } catch (x) {
2019
- throw y && y(), x && x.name === "TypeError" && /Load failed|fetch/i.test(x.message) ? Object.assign(
2143
+ throw g && g(), x && x.name === "TypeError" && /Load failed|fetch/i.test(x.message) ? Object.assign(
2020
2144
  new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, e, p),
2021
2145
  {
2022
2146
  cause: x.cause || x
@@ -2041,18 +2165,18 @@ const renderReason = (e) => `- ${e}`, isResolvedHandle = (e) => utils$1.isFuncti
2041
2165
  getAdapter: (e) => {
2042
2166
  e = utils$1.isArray(e) ? e : [e];
2043
2167
  const { length: t } = e;
2044
- let n, o;
2168
+ let o, n;
2045
2169
  const r = {};
2046
2170
  for (let s = 0; s < t; s++) {
2047
- n = e[s];
2171
+ o = e[s];
2048
2172
  let l;
2049
- if (o = n, !isResolvedHandle(n) && (o = knownAdapters[(l = String(n)).toLowerCase()], o === void 0))
2173
+ if (n = o, !isResolvedHandle(o) && (n = knownAdapters[(l = String(o)).toLowerCase()], n === void 0))
2050
2174
  throw new AxiosError$1(`Unknown adapter '${l}'`);
2051
- if (o)
2175
+ if (n)
2052
2176
  break;
2053
- r[l || "#" + s] = o;
2177
+ r[l || "#" + s] = n;
2054
2178
  }
2055
- if (!o) {
2179
+ if (!n) {
2056
2180
  const s = Object.entries(r).map(
2057
2181
  ([i, u]) => `adapter ${i} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
2058
2182
  );
@@ -2064,7 +2188,7 @@ const renderReason = (e) => `- ${e}`, isResolvedHandle = (e) => utils$1.isFuncti
2064
2188
  "ERR_NOT_SUPPORT"
2065
2189
  );
2066
2190
  }
2067
- return o;
2191
+ return n;
2068
2192
  },
2069
2193
  adapters: knownAdapters
2070
2194
  };
@@ -2076,62 +2200,62 @@ function dispatchRequest(e) {
2076
2200
  return throwIfCancellationRequested(e), e.headers = AxiosHeaders$1.from(e.headers), e.data = transformData.call(
2077
2201
  e,
2078
2202
  e.transformRequest
2079
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), adapters.getAdapter(e.adapter || defaults.adapter)(e).then(function(o) {
2080
- return throwIfCancellationRequested(e), o.data = transformData.call(
2203
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), adapters.getAdapter(e.adapter || defaults.adapter)(e).then(function(n) {
2204
+ return throwIfCancellationRequested(e), n.data = transformData.call(
2081
2205
  e,
2082
2206
  e.transformResponse,
2083
- o
2084
- ), o.headers = AxiosHeaders$1.from(o.headers), o;
2085
- }, function(o) {
2086
- return isCancel$1(o) || (throwIfCancellationRequested(e), o && o.response && (o.response.data = transformData.call(
2207
+ n
2208
+ ), n.headers = AxiosHeaders$1.from(n.headers), n;
2209
+ }, function(n) {
2210
+ return isCancel$1(n) || (throwIfCancellationRequested(e), n && n.response && (n.response.data = transformData.call(
2087
2211
  e,
2088
2212
  e.transformResponse,
2089
- o.response
2090
- ), o.response.headers = AxiosHeaders$1.from(o.response.headers))), Promise.reject(o);
2213
+ n.response
2214
+ ), n.response.headers = AxiosHeaders$1.from(n.response.headers))), Promise.reject(n);
2091
2215
  });
2092
2216
  }
2093
- const VERSION$1 = "1.10.0", validators$1 = {};
2217
+ const VERSION$1 = "1.11.0", validators$1 = {};
2094
2218
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
2095
- validators$1[e] = function(o) {
2096
- return typeof o === e || "a" + (t < 1 ? "n " : " ") + e;
2219
+ validators$1[e] = function(n) {
2220
+ return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
2097
2221
  };
2098
2222
  });
2099
2223
  const deprecatedWarnings = {};
2100
- validators$1.transitional = function(t, n, o) {
2224
+ validators$1.transitional = function(t, o, n) {
2101
2225
  function r(s, l) {
2102
- return "[Axios v" + VERSION$1 + "] Transitional option '" + s + "'" + l + (o ? ". " + o : "");
2226
+ return "[Axios v" + VERSION$1 + "] Transitional option '" + s + "'" + l + (n ? ". " + n : "");
2103
2227
  }
2104
2228
  return (s, l, i) => {
2105
2229
  if (t === !1)
2106
2230
  throw new AxiosError$1(
2107
- r(l, " has been removed" + (n ? " in " + n : "")),
2231
+ r(l, " has been removed" + (o ? " in " + o : "")),
2108
2232
  AxiosError$1.ERR_DEPRECATED
2109
2233
  );
2110
- return n && !deprecatedWarnings[l] && (deprecatedWarnings[l] = !0, console.warn(
2234
+ return o && !deprecatedWarnings[l] && (deprecatedWarnings[l] = !0, console.warn(
2111
2235
  r(
2112
2236
  l,
2113
- " has been deprecated since v" + n + " and will be removed in the near future"
2237
+ " has been deprecated since v" + o + " and will be removed in the near future"
2114
2238
  )
2115
2239
  )), t ? t(s, l, i) : !0;
2116
2240
  };
2117
2241
  };
2118
2242
  validators$1.spelling = function(t) {
2119
- return (n, o) => (console.warn(`${o} is likely a misspelling of ${t}`), !0);
2243
+ return (o, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
2120
2244
  };
2121
- function assertOptions(e, t, n) {
2245
+ function assertOptions(e, t, o) {
2122
2246
  if (typeof e != "object")
2123
2247
  throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
2124
- const o = Object.keys(e);
2125
- let r = o.length;
2248
+ const n = Object.keys(e);
2249
+ let r = n.length;
2126
2250
  for (; r-- > 0; ) {
2127
- const s = o[r], l = t[s];
2251
+ const s = n[r], l = t[s];
2128
2252
  if (l) {
2129
2253
  const i = e[s], u = i === void 0 || l(i, s, e);
2130
2254
  if (u !== !0)
2131
2255
  throw new AxiosError$1("option " + s + " must be " + u, AxiosError$1.ERR_BAD_OPTION_VALUE);
2132
2256
  continue;
2133
2257
  }
2134
- if (n !== !0)
2258
+ if (o !== !0)
2135
2259
  throw new AxiosError$1("Unknown option " + s, AxiosError$1.ERR_BAD_OPTION);
2136
2260
  }
2137
2261
  }
@@ -2154,78 +2278,78 @@ let Axios$1 = class {
2154
2278
  *
2155
2279
  * @returns {Promise} The Promise to be fulfilled
2156
2280
  */
2157
- async request(t, n) {
2281
+ async request(t, o) {
2158
2282
  try {
2159
- return await this._request(t, n);
2160
- } catch (o) {
2161
- if (o instanceof Error) {
2283
+ return await this._request(t, o);
2284
+ } catch (n) {
2285
+ if (n instanceof Error) {
2162
2286
  let r = {};
2163
2287
  Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error();
2164
2288
  const s = r.stack ? r.stack.replace(/^.+\n/, "") : "";
2165
2289
  try {
2166
- o.stack ? s && !String(o.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (o.stack += `
2167
- ` + s) : o.stack = s;
2290
+ n.stack ? s && !String(n.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (n.stack += `
2291
+ ` + s) : n.stack = s;
2168
2292
  } catch {
2169
2293
  }
2170
2294
  }
2171
- throw o;
2295
+ throw n;
2172
2296
  }
2173
2297
  }
2174
- _request(t, n) {
2175
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = mergeConfig$1(this.defaults, n);
2176
- const { transitional: o, paramsSerializer: r, headers: s } = n;
2177
- o !== void 0 && validator.assertOptions(o, {
2298
+ _request(t, o) {
2299
+ typeof t == "string" ? (o = o || {}, o.url = t) : o = t || {}, o = mergeConfig$1(this.defaults, o);
2300
+ const { transitional: n, paramsSerializer: r, headers: s } = o;
2301
+ n !== void 0 && validator.assertOptions(n, {
2178
2302
  silentJSONParsing: validators.transitional(validators.boolean),
2179
2303
  forcedJSONParsing: validators.transitional(validators.boolean),
2180
2304
  clarifyTimeoutError: validators.transitional(validators.boolean)
2181
- }, !1), r != null && (utils$1.isFunction(r) ? n.paramsSerializer = {
2305
+ }, !1), r != null && (utils$1.isFunction(r) ? o.paramsSerializer = {
2182
2306
  serialize: r
2183
2307
  } : validator.assertOptions(r, {
2184
2308
  encode: validators.function,
2185
2309
  serialize: validators.function
2186
- }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), validator.assertOptions(n, {
2310
+ }, !0)), o.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? o.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : o.allowAbsoluteUrls = !0), validator.assertOptions(o, {
2187
2311
  baseUrl: validators.spelling("baseURL"),
2188
2312
  withXsrfToken: validators.spelling("withXSRFToken")
2189
- }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
2313
+ }, !0), o.method = (o.method || this.defaults.method || "get").toLowerCase();
2190
2314
  let l = s && utils$1.merge(
2191
2315
  s.common,
2192
- s[n.method]
2316
+ s[o.method]
2193
2317
  );
2194
2318
  s && utils$1.forEach(
2195
2319
  ["delete", "get", "head", "post", "put", "patch", "common"],
2196
2320
  (p) => {
2197
2321
  delete s[p];
2198
2322
  }
2199
- ), n.headers = AxiosHeaders$1.concat(l, s);
2323
+ ), o.headers = AxiosHeaders$1.concat(l, s);
2200
2324
  const i = [];
2201
2325
  let u = !0;
2202
- this.interceptors.request.forEach(function(y) {
2203
- typeof y.runWhen == "function" && y.runWhen(n) === !1 || (u = u && y.synchronous, i.unshift(y.fulfilled, y.rejected));
2326
+ this.interceptors.request.forEach(function(g) {
2327
+ typeof g.runWhen == "function" && g.runWhen(o) === !1 || (u = u && g.synchronous, i.unshift(g.fulfilled, g.rejected));
2204
2328
  });
2205
2329
  const c = [];
2206
- this.interceptors.response.forEach(function(y) {
2207
- c.push(y.fulfilled, y.rejected);
2330
+ this.interceptors.response.forEach(function(g) {
2331
+ c.push(g.fulfilled, g.rejected);
2208
2332
  });
2209
2333
  let a, d = 0, f;
2210
2334
  if (!u) {
2211
2335
  const p = [dispatchRequest.bind(this), void 0];
2212
- for (p.unshift.apply(p, i), p.push.apply(p, c), f = p.length, a = Promise.resolve(n); d < f; )
2336
+ for (p.unshift(...i), p.push(...c), f = p.length, a = Promise.resolve(o); d < f; )
2213
2337
  a = a.then(p[d++], p[d++]);
2214
2338
  return a;
2215
2339
  }
2216
2340
  f = i.length;
2217
- let h = n;
2341
+ let m = o;
2218
2342
  for (d = 0; d < f; ) {
2219
- const p = i[d++], y = i[d++];
2343
+ const p = i[d++], g = i[d++];
2220
2344
  try {
2221
- h = p(h);
2222
- } catch (m) {
2223
- y.call(this, m);
2345
+ m = p(m);
2346
+ } catch (y) {
2347
+ g.call(this, y);
2224
2348
  break;
2225
2349
  }
2226
2350
  }
2227
2351
  try {
2228
- a = dispatchRequest.call(this, h);
2352
+ a = dispatchRequest.call(this, m);
2229
2353
  } catch (p) {
2230
2354
  return Promise.reject(p);
2231
2355
  }
@@ -2235,25 +2359,25 @@ let Axios$1 = class {
2235
2359
  }
2236
2360
  getUri(t) {
2237
2361
  t = mergeConfig$1(this.defaults, t);
2238
- const n = buildFullPath(t.baseURL, t.url, t.allowAbsoluteUrls);
2239
- return buildURL(n, t.params, t.paramsSerializer);
2362
+ const o = buildFullPath(t.baseURL, t.url, t.allowAbsoluteUrls);
2363
+ return buildURL(o, t.params, t.paramsSerializer);
2240
2364
  }
2241
2365
  };
2242
2366
  utils$1.forEach(["delete", "get", "head", "options"], function(t) {
2243
- Axios$1.prototype[t] = function(n, o) {
2244
- return this.request(mergeConfig$1(o || {}, {
2367
+ Axios$1.prototype[t] = function(o, n) {
2368
+ return this.request(mergeConfig$1(n || {}, {
2245
2369
  method: t,
2246
- url: n,
2247
- data: (o || {}).data
2370
+ url: o,
2371
+ data: (n || {}).data
2248
2372
  }));
2249
2373
  };
2250
2374
  });
2251
2375
  utils$1.forEach(["post", "put", "patch"], function(t) {
2252
- function n(o) {
2376
+ function o(n) {
2253
2377
  return function(s, l, i) {
2254
2378
  return this.request(mergeConfig$1(i || {}, {
2255
2379
  method: t,
2256
- headers: o ? {
2380
+ headers: n ? {
2257
2381
  "Content-Type": "multipart/form-data"
2258
2382
  } : {},
2259
2383
  url: s,
@@ -2261,33 +2385,33 @@ utils$1.forEach(["post", "put", "patch"], function(t) {
2261
2385
  }));
2262
2386
  };
2263
2387
  }
2264
- Axios$1.prototype[t] = n(), Axios$1.prototype[t + "Form"] = n(!0);
2388
+ Axios$1.prototype[t] = o(), Axios$1.prototype[t + "Form"] = o(!0);
2265
2389
  });
2266
- let CancelToken$1 = class R {
2390
+ let CancelToken$1 = class M {
2267
2391
  constructor(t) {
2268
2392
  if (typeof t != "function")
2269
2393
  throw new TypeError("executor must be a function.");
2270
- let n;
2394
+ let o;
2271
2395
  this.promise = new Promise(function(s) {
2272
- n = s;
2396
+ o = s;
2273
2397
  });
2274
- const o = this;
2398
+ const n = this;
2275
2399
  this.promise.then((r) => {
2276
- if (!o._listeners) return;
2277
- let s = o._listeners.length;
2400
+ if (!n._listeners) return;
2401
+ let s = n._listeners.length;
2278
2402
  for (; s-- > 0; )
2279
- o._listeners[s](r);
2280
- o._listeners = null;
2403
+ n._listeners[s](r);
2404
+ n._listeners = null;
2281
2405
  }), this.promise.then = (r) => {
2282
2406
  let s;
2283
2407
  const l = new Promise((i) => {
2284
- o.subscribe(i), s = i;
2408
+ n.subscribe(i), s = i;
2285
2409
  }).then(r);
2286
2410
  return l.cancel = function() {
2287
- o.unsubscribe(s);
2411
+ n.unsubscribe(s);
2288
2412
  }, l;
2289
2413
  }, t(function(s, l, i) {
2290
- o.reason || (o.reason = new CanceledError$1(s, l, i), n(o.reason));
2414
+ n.reason || (n.reason = new CanceledError$1(s, l, i), o(n.reason));
2291
2415
  });
2292
2416
  }
2293
2417
  /**
@@ -2313,14 +2437,14 @@ let CancelToken$1 = class R {
2313
2437
  unsubscribe(t) {
2314
2438
  if (!this._listeners)
2315
2439
  return;
2316
- const n = this._listeners.indexOf(t);
2317
- n !== -1 && this._listeners.splice(n, 1);
2440
+ const o = this._listeners.indexOf(t);
2441
+ o !== -1 && this._listeners.splice(o, 1);
2318
2442
  }
2319
2443
  toAbortSignal() {
2320
- const t = new AbortController(), n = (o) => {
2321
- t.abort(o);
2444
+ const t = new AbortController(), o = (n) => {
2445
+ t.abort(n);
2322
2446
  };
2323
- return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
2447
+ return this.subscribe(o), t.signal.unsubscribe = () => this.unsubscribe(o), t.signal;
2324
2448
  }
2325
2449
  /**
2326
2450
  * Returns an object that contains a new `CancelToken` and a function that, when called,
@@ -2329,7 +2453,7 @@ let CancelToken$1 = class R {
2329
2453
  static source() {
2330
2454
  let t;
2331
2455
  return {
2332
- token: new R(function(r) {
2456
+ token: new M(function(r) {
2333
2457
  t = r;
2334
2458
  }),
2335
2459
  cancel: t
@@ -2337,8 +2461,8 @@ let CancelToken$1 = class R {
2337
2461
  }
2338
2462
  };
2339
2463
  function spread$1(e) {
2340
- return function(n) {
2341
- return e.apply(null, n);
2464
+ return function(o) {
2465
+ return e.apply(null, o);
2342
2466
  };
2343
2467
  }
2344
2468
  function isAxiosError$1(e) {
@@ -2413,10 +2537,10 @@ Object.entries(HttpStatusCode$1).forEach(([e, t]) => {
2413
2537
  HttpStatusCode$1[t] = e;
2414
2538
  });
2415
2539
  function createInstance(e) {
2416
- const t = new Axios$1(e), n = bind(Axios$1.prototype.request, t);
2417
- return utils$1.extend(n, Axios$1.prototype, t, { allOwnKeys: !0 }), utils$1.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
2540
+ const t = new Axios$1(e), o = bind(Axios$1.prototype.request, t);
2541
+ return utils$1.extend(o, Axios$1.prototype, t, { allOwnKeys: !0 }), utils$1.extend(o, t, null, { allOwnKeys: !0 }), o.create = function(r) {
2418
2542
  return createInstance(mergeConfig$1(e, r));
2419
- }, n;
2543
+ }, o;
2420
2544
  }
2421
2545
  const axios = createInstance(defaults);
2422
2546
  axios.Axios = Axios$1;
@@ -2475,16 +2599,16 @@ const {
2475
2599
  },
2476
2600
  emits: ["update:modelValue"],
2477
2601
  setup(e, { emit: t }) {
2478
- const n = e, o = t, r = ref([]), s = reactive({}), l = (a) => a?.value || a?.id || a?.text || a, i = (a) => a.text || String(a), u = (a) => `lg:col-span-${a || 12}`, c = async () => {
2602
+ const o = e, n = t, r = ref([]), s = reactive({}), l = (a) => a?.value || a?.id || a?.text || a, i = (a) => a.text || String(a), u = (a) => `lg:col-span-${a || 12}`, c = async () => {
2479
2603
  try {
2480
- const { data: a } = await axios.get(`/api/suggest/${n.data}`);
2604
+ const { data: a } = await axios.get(`/api/suggest/${o.data}`);
2481
2605
  r.value = a?.data || a;
2482
2606
  } catch (a) {
2483
2607
  console.error(a);
2484
2608
  }
2485
2609
  };
2486
2610
  return watch(
2487
- () => n.modelValue,
2611
+ () => o.modelValue,
2488
2612
  (a) => {
2489
2613
  if (typeof a == "boolean" && r.value.length === 1) {
2490
2614
  const d = l(r.value[0]);
@@ -2493,8 +2617,8 @@ const {
2493
2617
  const d = new Set(a);
2494
2618
  r.value.forEach((f) => {
2495
2619
  if (!f.disabled) {
2496
- const h = l(f);
2497
- s[h] = d.has(h);
2620
+ const m = l(f);
2621
+ s[m] = d.has(m);
2498
2622
  }
2499
2623
  });
2500
2624
  }
@@ -2504,21 +2628,21 @@ const {
2504
2628
  s,
2505
2629
  () => {
2506
2630
  if (!r.value.length) {
2507
- o("update:modelValue", null);
2631
+ n("update:modelValue", null);
2508
2632
  return;
2509
2633
  }
2510
2634
  const a = Object.entries(s).filter(([, d]) => d).map(([d]) => d);
2511
- o("update:modelValue", a.length === 0 ? null : a);
2635
+ n("update:modelValue", a.length === 0 ? null : a);
2512
2636
  },
2513
2637
  { deep: !0 }
2514
2638
  ), onMounted(() => {
2515
- if (n.data)
2639
+ if (o.data)
2516
2640
  c().then(() => {
2517
- if (typeof n.modelValue == "boolean" && r.value.length === 1) {
2641
+ if (typeof o.modelValue == "boolean" && r.value.length === 1) {
2518
2642
  const a = l(r.value[0]);
2519
- s[a] = n.modelValue;
2520
- } else if (Array.isArray(n.modelValue)) {
2521
- const a = new Set(n.modelValue);
2643
+ s[a] = o.modelValue;
2644
+ } else if (Array.isArray(o.modelValue)) {
2645
+ const a = new Set(o.modelValue);
2522
2646
  r.value.forEach((d) => {
2523
2647
  if (!d.disabled) {
2524
2648
  const f = l(d);
@@ -2527,11 +2651,11 @@ const {
2527
2651
  });
2528
2652
  }
2529
2653
  });
2530
- else if (r.value = n.options, typeof n.modelValue == "boolean" && r.value.length === 1) {
2654
+ else if (r.value = o.options, typeof o.modelValue == "boolean" && r.value.length === 1) {
2531
2655
  const a = l(r.value[0]);
2532
- s[a] = n.modelValue;
2533
- } else if (Array.isArray(n.modelValue)) {
2534
- const a = new Set(n.modelValue);
2656
+ s[a] = o.modelValue;
2657
+ } else if (Array.isArray(o.modelValue)) {
2658
+ const a = new Set(o.modelValue);
2535
2659
  r.value.forEach((d) => {
2536
2660
  if (!d.disabled) {
2537
2661
  const f = l(d);
@@ -2542,9 +2666,9 @@ const {
2542
2666
  }), (a, d) => (openBlock(), createElementBlock("div", {
2543
2667
  class: normalizeClass(["p-0 w-full gap-[6px]", [e.position === "vertical" ? "flex-col" : "", e.colSpan ? "grid" : "flex justify-start"]])
2544
2668
  }, [
2545
- (openBlock(!0), createElementBlock(Fragment, null, renderList(r.value, (f) => (openBlock(), createBlock(_sfc_main$w, {
2669
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(r.value, (f) => (openBlock(), createBlock(_sfc_main$x, {
2546
2670
  modelValue: s[l(f)],
2547
- "onUpdate:modelValue": (h) => s[l(f)] = h,
2671
+ "onUpdate:modelValue": (m) => s[l(f)] = m,
2548
2672
  value: l(f),
2549
2673
  class: normalizeClass(u(e.colSpan)),
2550
2674
  disabled: f.disabled,
@@ -2583,31 +2707,237 @@ const {
2583
2707
  }),
2584
2708
  emits: ["update:modelValue"],
2585
2709
  setup(e) {
2586
- const t = e, { inputClass: n } = useStyle(t.style), o = useModel(e, "modelValue");
2710
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue");
2587
2711
  return (r, s) => withDirectives((openBlock(), createElementBlock("input", {
2588
2712
  type: "date",
2589
- "onUpdate:modelValue": s[0] || (s[0] = (l) => o.value = l),
2713
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
2590
2714
  placeholder: e.placeholder,
2591
2715
  disabled: e.disabled,
2592
- class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(n)]]),
2716
+ class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(o)]]),
2593
2717
  style: {
2594
2718
  border: "1px solid #CFD9E0"
2595
2719
  }
2596
2720
  }, null, 10, _hoisted_1$g)), [
2597
- [vModelText, o.value]
2721
+ [vModelText, n.value]
2598
2722
  ]);
2599
2723
  }
2600
- }), fileUpload = async (e, t, n, o) => {
2724
+ }), $ = (e, t) => {
2725
+ const o = e.__vccOpts || e;
2726
+ for (const [n, r] of t)
2727
+ o[n] = r;
2728
+ return o;
2729
+ };
2730
+ defineComponent({
2731
+ props: {
2732
+ modelValue: { type: Boolean, default: () => !1 },
2733
+ title: { type: String, default: () => "" },
2734
+ disabled: { type: Boolean, default: () => !1 }
2735
+ },
2736
+ data() {
2737
+ return {};
2738
+ },
2739
+ mounted() {
2740
+ this.modelValue || this.$emit("update:modelValue", !1);
2741
+ },
2742
+ computed: {
2743
+ modelState: {
2744
+ get() {
2745
+ return this.modelValue;
2746
+ },
2747
+ set(e) {
2748
+ this.$emit("update:modelValue", e);
2749
+ }
2750
+ },
2751
+ labelCursorClasses() {
2752
+ return [
2753
+ { "cursor-not-allowed": this.disabled },
2754
+ { "cursor-pointer": !this.disabled }
2755
+ ];
2756
+ }
2757
+ },
2758
+ methods: {
2759
+ handleEnterDown(e) {
2760
+ const { keyCode: t } = e;
2761
+ t === 13 && (this.modelState = !this.modelState);
2762
+ },
2763
+ addKeyHandler() {
2764
+ window.addEventListener("keydown", this.handleEnterDown);
2765
+ },
2766
+ removeKeyHandler() {
2767
+ window.removeEventListener("keydown", this.handleEnterDown);
2768
+ }
2769
+ }
2770
+ });
2771
+ const Vt = {}, zt = {
2772
+ xmlns: "http://www.w3.org/2000/svg",
2773
+ fill: "none",
2774
+ viewBox: "0 0 24 24",
2775
+ "stroke-width": "1.5",
2776
+ stroke: "currentColor",
2777
+ class: "size-6 text-green-600"
2778
+ };
2779
+ function Et(e, t) {
2780
+ return openBlock(), createElementBlock("svg", zt, t[0] || (t[0] = [
2781
+ createElementVNode("path", {
2782
+ "stroke-linecap": "round",
2783
+ "stroke-linejoin": "round",
2784
+ d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
2785
+ }, null, -1)
2786
+ ]));
2787
+ }
2788
+ const Lt = /* @__PURE__ */ $(Vt, [["render", Et]]), jt = {}, Mt = {
2789
+ xmlns: "http://www.w3.org/2000/svg",
2790
+ fill: "none",
2791
+ viewBox: "0 0 24 24",
2792
+ "stroke-width": "1.5",
2793
+ stroke: "orange",
2794
+ class: "size-6 text-orange-600"
2795
+ };
2796
+ function Pt(e, t) {
2797
+ return openBlock(), createElementBlock("svg", Mt, t[0] || (t[0] = [
2798
+ createElementVNode("path", {
2799
+ "stroke-linecap": "round",
2800
+ "stroke-linejoin": "round",
2801
+ d: "M12 9v3m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
2802
+ }, null, -1)
2803
+ ]));
2804
+ }
2805
+ const Tt = /* @__PURE__ */ $(jt, [["render", Pt]]), It = {}, Rt = {
2806
+ xmlns: "http://www.w3.org/2000/svg",
2807
+ fill: "none",
2808
+ viewBox: "0 0 24 24",
2809
+ "stroke-width": "1.5",
2810
+ stroke: "currentColor",
2811
+ class: "size-6 text-blue-600"
2812
+ };
2813
+ function Ot(e, t) {
2814
+ return openBlock(), createElementBlock("svg", Rt, t[0] || (t[0] = [
2815
+ createElementVNode("path", {
2816
+ "stroke-linecap": "round",
2817
+ "stroke-linejoin": "round",
2818
+ d: "m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"
2819
+ }, null, -1)
2820
+ ]));
2821
+ }
2822
+ const Dt = /* @__PURE__ */ $(It, [["render", Ot]]), Ht = {}, Nt = {
2823
+ xmlns: "http://www.w3.org/2000/svg",
2824
+ fill: "none",
2825
+ viewBox: "0 0 24 24",
2826
+ "stroke-width": "1.5",
2827
+ stroke: "red",
2828
+ class: "size-6 text-red-600"
2829
+ };
2830
+ function At(e, t) {
2831
+ return openBlock(), createElementBlock("svg", Nt, t[0] || (t[0] = [
2832
+ createElementVNode("path", {
2833
+ "stroke-linecap": "round",
2834
+ "stroke-linejoin": "round",
2835
+ d: "M6 18L18 6M6 6l12 12"
2836
+ }, null, -1)
2837
+ ]));
2838
+ }
2839
+ const Kt = /* @__PURE__ */ $(Ht, [["render", At]]), qt = { class: "rounded-md border border-gray-300 bg-white p-4 shadow-sm" }, Ut = { class: "flex items-start gap-4 opacity-100 scale-5 transition-all duration-300" }, Wt = { class: "flex-1" }, Gt = { class: "font-medium text-gray-900" }, Zt = { class: "mt-0.5 text-sm text-gray-700" }, le = /* @__PURE__ */ defineComponent({
2840
+ __name: "vs-notify",
2841
+ props: {
2842
+ type: {},
2843
+ title: {},
2844
+ message: {}
2845
+ },
2846
+ setup(e) {
2847
+ const t = {
2848
+ success: Lt,
2849
+ warning: Tt,
2850
+ error: Kt,
2851
+ info: Dt
2852
+ };
2853
+ return (o, n) => (openBlock(), createElementBlock("div", qt, [
2854
+ createElementVNode("div", Ut, [
2855
+ (openBlock(), createBlock(resolveDynamicComponent(t[o.type]))),
2856
+ createElementVNode("div", Wt, [
2857
+ createElementVNode("strong", Gt, toDisplayString(o.title), 1),
2858
+ createElementVNode("p", Zt, toDisplayString(o.message), 1)
2859
+ ]),
2860
+ n[0] || (n[0] = createElementVNode("button", {
2861
+ class: "m-3 rounded-full p-1.5 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700",
2862
+ type: "button",
2863
+ "aria-label": "Dismiss notify"
2864
+ }, [
2865
+ createElementVNode("span", { class: "sr-only" }, "Dismiss popup"),
2866
+ createElementVNode("svg", {
2867
+ xmlns: "http://www.w3.org/2000/svg",
2868
+ fill: "none",
2869
+ viewBox: "0 0 24 24",
2870
+ "stroke-width": "1.5",
2871
+ stroke: "currentColor",
2872
+ class: "size-5"
2873
+ }, [
2874
+ createElementVNode("path", {
2875
+ "stroke-linecap": "round",
2876
+ "stroke-linejoin": "round",
2877
+ d: "M6 18L18 6M6 6l12 12"
2878
+ })
2879
+ ])
2880
+ ], -1))
2881
+ ])
2882
+ ]));
2883
+ }
2884
+ });
2885
+ reactive({ visible: !0 });
2886
+ const H = {
2887
+ top: "top-4 left-1/2 transform -translate-x-1/2",
2888
+ "left-bottom": "bottom-4 left-4 transform",
2889
+ "right-bottom": "bottom-4 right-4 transform",
2890
+ bottom: "bottom-4 left-1/2 transform -translate-x-1/2"
2891
+ }, jo = (e) => {
2892
+ const {
2893
+ type: t = "info",
2894
+ title: o,
2895
+ message: n,
2896
+ position: r = "right-bottom"
2897
+ } = e || {};
2898
+ let s = document.querySelector("#notify-root");
2899
+ s || (s = document.createElement("div"), s.id = "notify-root", s.className = `fixed z-[100] flex flex-col gap-3 ${H[r]} p-6 max-w-md mx-auto font-sans antialiased`, document.body.appendChild(s)), s.className.includes(H[r]) || (Object.values(H).forEach((u) => {
2900
+ s.classList.remove(...u.split(" "));
2901
+ }), s.classList.add(...H[r].split(" ")));
2902
+ const l = document.createElement("div");
2903
+ s.appendChild(l);
2904
+ const i = createApp({
2905
+ render() {
2906
+ return h(le, {
2907
+ type: t,
2908
+ title: o,
2909
+ message: n,
2910
+ onClose: () => {
2911
+ i.unmount(), l.remove();
2912
+ }
2913
+ });
2914
+ }
2915
+ });
2916
+ i.mount(l), l.querySelector("button")?.addEventListener("click", () => {
2917
+ l.classList.add("opacity-0", "scale-95", "transition-all", "duration-300"), setTimeout(() => {
2918
+ i.unmount(), l.remove();
2919
+ }, 350);
2920
+ }), setTimeout(() => {
2921
+ l.classList.add("opacity-0", "scale-95", "transition-all", "duration-300"), setTimeout(() => {
2922
+ i.unmount(), l.remove();
2923
+ }, 350);
2924
+ }, 3500);
2925
+ }, fileUpload = async (e, t, o, n) => {
2601
2926
  try {
2602
2927
  const r = new FormData();
2603
2928
  r.append("unique", "true"), r.append("file", e);
2604
2929
  const { data: s } = await axios.post(
2605
- `/file/upload/uploads?id=${t || ""}&form=${n || ""}&table=${o || ""}`,
2930
+ `/file/upload/uploads?id=${t || ""}&form=${o || ""}&table=${n || ""}`,
2606
2931
  r
2607
2932
  );
2608
2933
  return s;
2609
2934
  } catch (r) {
2610
- console.error(r);
2935
+ jo({
2936
+ type: "error",
2937
+ title: "Помилка!",
2938
+ message: "Сталась помилка під час завантаження файлу",
2939
+ position: "right-bottom"
2940
+ }), console.error("Сталась помилка завантаження файлу", r);
2611
2941
  }
2612
2942
  }, fileDelete = async (e) => {
2613
2943
  try {
@@ -2622,7 +2952,7 @@ const {
2622
2952
  headers: {
2623
2953
  "Content-Type": "application/json"
2624
2954
  }
2625
- }), n = t.headers["content-type"], o = new TextDecoder("utf-8").decode(t.data), r = new Blob([o], { type: n }), s = document.createElement("a");
2955
+ }), o = t.headers["content-type"], n = new TextDecoder("utf-8").decode(t.data), r = new Blob([n], { type: o }), s = document.createElement("a");
2626
2956
  s.setAttribute("download", e), s.href = window.URL.createObjectURL(r), s.click();
2627
2957
  } catch (t) {
2628
2958
  console.error(t.message);
@@ -2656,7 +2986,7 @@ const IconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rende
2656
2986
  "stroke-linecap": "round",
2657
2987
  "stroke-linejoin": "round"
2658
2988
  };
2659
- function _sfc_render$7(e, t, n, o, r, s) {
2989
+ function _sfc_render$7(e, t, o, n, r, s) {
2660
2990
  return openBlock(), createElementBlock("svg", _hoisted_1$e, t[0] || (t[0] = [
2661
2991
  createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>', 6)
2662
2992
  ]));
@@ -2673,7 +3003,7 @@ const iconPdf = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render
2673
3003
  "stroke-linecap": "round",
2674
3004
  "stroke-linejoin": "round"
2675
3005
  };
2676
- function _sfc_render$6(e, t, n, o, r, s) {
3006
+ function _sfc_render$6(e, t, o, n, r, s) {
2677
3007
  return openBlock(), createElementBlock("svg", _hoisted_1$d, t[0] || (t[0] = [
2678
3008
  createElementVNode("path", {
2679
3009
  stroke: "none",
@@ -2713,7 +3043,7 @@ const IconCsv = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
2713
3043
  "stroke-linejoin": "round",
2714
3044
  class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
2715
3045
  };
2716
- function _sfc_render$5(e, t, n, o, r, s) {
3046
+ function _sfc_render$5(e, t, o, n, r, s) {
2717
3047
  return openBlock(), createElementBlock("svg", _hoisted_1$c, t[0] || (t[0] = [
2718
3048
  createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>', 5)
2719
3049
  ]));
@@ -2730,7 +3060,7 @@ const IconFile = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_rende
2730
3060
  "stroke-linecap": "round",
2731
3061
  "stroke-linejoin": "round"
2732
3062
  };
2733
- function _sfc_render$4(e, t, n, o, r, s) {
3063
+ function _sfc_render$4(e, t, o, n, r, s) {
2734
3064
  return openBlock(), createElementBlock("svg", _hoisted_1$b, t[0] || (t[0] = [
2735
3065
  createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>', 9)
2736
3066
  ]));
@@ -2747,7 +3077,7 @@ const IconZip = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render
2747
3077
  "stroke-linecap": "round",
2748
3078
  "stroke-linejoin": "round"
2749
3079
  };
2750
- function _sfc_render$3(e, t, n, o, r, s) {
3080
+ function _sfc_render$3(e, t, o, n, r, s) {
2751
3081
  return openBlock(), createElementBlock("svg", _hoisted_1$a, t[0] || (t[0] = [
2752
3082
  createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>', 5)
2753
3083
  ]));
@@ -2757,14 +3087,14 @@ const IconGeojson = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_re
2757
3087
  const t = e?.split(".");
2758
3088
  return t[t.length - 1];
2759
3089
  }, fileFormatPreview = (e) => {
2760
- const t = getFileType(e), n = {
3090
+ const t = getFileType(e), o = {
2761
3091
  imageFormat: ["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"],
2762
3092
  sheetsFormat: ["xls", "csv", "xlsx"],
2763
3093
  archivesFormat: ["zip", "rar"],
2764
3094
  textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
2765
3095
  documentsFormat: ["pdf"]
2766
3096
  };
2767
- return n.imageFormat.includes(t) ? "img" : n.sheetsFormat.includes(t) ? IconCsv : n.textsFormat.includes(t) ? IconGeojson : n.documentsFormat.includes(t) ? iconPdf : n.archivesFormat.includes(t) ? IconZip : IconFile;
3097
+ return o.imageFormat.includes(t) ? "img" : o.sheetsFormat.includes(t) ? IconCsv : o.textsFormat.includes(t) ? IconGeojson : o.documentsFormat.includes(t) ? iconPdf : o.archivesFormat.includes(t) ? IconZip : IconFile;
2768
3098
  }, _sfc_main$c = {}, _hoisted_1$9 = {
2769
3099
  xmlns: "http://www.w3.org/2000/svg",
2770
3100
  width: "24",
@@ -2818,19 +3148,19 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
2818
3148
  }),
2819
3149
  emits: ["update:value", "update:item"],
2820
3150
  setup(e) {
2821
- const t = useModel(e, "value"), n = useModel(e, "item"), o = e;
3151
+ const t = useModel(e, "value"), o = useModel(e, "item"), n = e;
2822
3152
  return (r, s) => (openBlock(), createElementBlock("div", _hoisted_1$7, [
2823
- (openBlock(), createBlock(resolveDynamicComponent(unref(fileFormatPreview)(n.value)), {
2824
- src: n.value,
3153
+ (openBlock(), createBlock(resolveDynamicComponent(unref(fileFormatPreview)(o.value)), {
3154
+ src: o.value,
2825
3155
  alt: "file",
2826
3156
  class: "w-full h-full object-cover cursor-pointer",
2827
- onClick: s[0] || (s[0] = (l) => unref(fileDownload)(n.value))
3157
+ onClick: s[0] || (s[0] = (l) => unref(fileDownload)(o.value))
2828
3158
  }, null, 8, ["src"])),
2829
3159
  createElementVNode("div", _hoisted_2$4, [
2830
3160
  createElementVNode("button", {
2831
3161
  type: "button",
2832
3162
  onClick: s[1] || (s[1] = (l) => {
2833
- unref(fileDelete)(n.value), t.value = o.multiple ? t.value?.filter((i) => i !== n.value) : "";
3163
+ unref(fileDelete)(o.value), t.value = n.multiple ? t.value?.filter((i) => i !== o.value) : "";
2834
3164
  }),
2835
3165
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
2836
3166
  }, [
@@ -2838,7 +3168,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
2838
3168
  ]),
2839
3169
  createElementVNode("button", {
2840
3170
  type: "button",
2841
- onClick: s[2] || (s[2] = (l) => unref(fileDownload)(n.value)),
3171
+ onClick: s[2] || (s[2] = (l) => unref(fileDownload)(o.value)),
2842
3172
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
2843
3173
  }, [
2844
3174
  createVNode(IconDownload, { class: "w-4 h-4" })
@@ -2861,7 +3191,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
2861
3191
  }),
2862
3192
  emits: ["update:modelValue"],
2863
3193
  setup(e) {
2864
- const t = e, n = useModel(e, "modelValue"), o = ref(null), r = (l) => Array.isArray(n.value) && n.value[l] || "", s = async (l) => {
3194
+ const t = e, o = useModel(e, "modelValue"), n = ref(null), r = (l) => Array.isArray(o.value) && o.value[l] || "", s = async (l) => {
2865
3195
  if (t.format) {
2866
3196
  const c = l.target.files?.[0];
2867
3197
  if (!c || !c.name.endsWith(t.format))
@@ -2870,32 +3200,32 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
2870
3200
  const i = l.target.files?.[0];
2871
3201
  if (!i) return;
2872
3202
  const u = await fileUpload(i, "1", "form", "table");
2873
- n.value = t.multiple ? [...n.value || [], u.result?.file_path] : u.result?.file_path;
3203
+ o.value = t.multiple ? [...o.value || [], u.result?.file_path] : u.result?.file_path;
2874
3204
  };
2875
3205
  return (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
2876
3206
  createElementVNode("input", {
2877
3207
  class: "hidden",
2878
3208
  ref_key: "fileInput",
2879
- ref: o,
3209
+ ref: n,
2880
3210
  type: "file",
2881
3211
  onChange: s
2882
3212
  }, null, 544),
2883
- !l.multiple && n.value ? (openBlock(), createBlock(VsInputFileListItem, {
3213
+ !l.multiple && o.value ? (openBlock(), createBlock(VsInputFileListItem, {
2884
3214
  key: 0,
2885
- item: n.value,
2886
- "onUpdate:item": i[0] || (i[0] = (u) => n.value = u),
2887
- value: n.value,
2888
- "onUpdate:value": i[1] || (i[1] = (u) => n.value = u)
3215
+ item: o.value,
3216
+ "onUpdate:item": i[0] || (i[0] = (u) => o.value = u),
3217
+ value: o.value,
3218
+ "onUpdate:value": i[1] || (i[1] = (u) => o.value = u)
2889
3219
  }, null, 8, ["item", "value"])) : l.multiple ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
2890
- (openBlock(!0), createElementBlock(Fragment, null, renderList(n.value, (u, c) => (openBlock(), createBlock(VsInputFileListItem, {
3220
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (u, c) => (openBlock(), createBlock(VsInputFileListItem, {
2891
3221
  multiple: l.multiple,
2892
3222
  key: c,
2893
- value: n.value,
2894
- "onUpdate:value": i[2] || (i[2] = (a) => n.value = a),
3223
+ value: o.value,
3224
+ "onUpdate:value": i[2] || (i[2] = (a) => o.value = a),
2895
3225
  item: r(c)
2896
3226
  }, null, 8, ["multiple", "value", "item"]))), 128)),
2897
3227
  createElementVNode("div", {
2898
- onClick: i[3] || (i[3] = (u) => !l.disabled && o.value?.click()),
3228
+ onClick: i[3] || (i[3] = (u) => !l.disabled && n.value?.click()),
2899
3229
  class: normalizeClass([
2900
3230
  "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",
2901
3231
  l.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
@@ -2906,7 +3236,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
2906
3236
  ])) : createCommentVNode("", !0),
2907
3237
  l.multiple ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", {
2908
3238
  key: 2,
2909
- onClick: i[4] || (i[4] = (u) => o.value?.click()),
3239
+ onClick: i[4] || (i[4] = (u) => n.value?.click()),
2910
3240
  class: normalizeClass([l.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500", "h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])
2911
3241
  }, [
2912
3242
  createVNode(IconPlus, { class: "w-6 h-6" })
@@ -2930,27 +3260,27 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
2930
3260
  }
2931
3261
  },
2932
3262
  setup(e) {
2933
- const t = e, n = ref(t.isOpen);
3263
+ const t = e, o = ref(t.isOpen);
2934
3264
  return watch(
2935
3265
  () => t.isOpen,
2936
- (o) => {
2937
- n.value = o;
3266
+ (n) => {
3267
+ o.value = n;
2938
3268
  }
2939
- ), (o, r) => (openBlock(), createElementBlock("div", null, [
3269
+ ), (n, r) => (openBlock(), createElementBlock("div", null, [
2940
3270
  createElementVNode("div", _hoisted_1$5, [
2941
3271
  createElementVNode("p", _hoisted_2$2, toDisplayString(e.title), 1),
2942
- createVNode(_sfc_main$r, {
2943
- modelValue: n.value,
2944
- "onUpdate:modelValue": r[0] || (r[0] = (s) => n.value = s),
3272
+ createVNode(_sfc_main$s, {
3273
+ modelValue: o.value,
3274
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => o.value = s),
2945
3275
  style: normalizeStyle(e.style)
2946
3276
  }, null, 8, ["modelValue", "style"])
2947
3277
  ]),
2948
3278
  createVNode(Transition, { name: "slide-fade" }, {
2949
3279
  default: withCtx(() => [
2950
3280
  withDirectives(createElementVNode("div", _hoisted_3$1, [
2951
- renderSlot(o.$slots, "default", {}, void 0, !0)
3281
+ renderSlot(n.$slots, "default", {}, void 0, !0)
2952
3282
  ], 512), [
2953
- [vShow, n.value]
3283
+ [vShow, o.value]
2954
3284
  ])
2955
3285
  ]),
2956
3286
  _: 3
@@ -2974,29 +3304,29 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
2974
3304
  }
2975
3305
  },
2976
3306
  setup(e) {
2977
- const t = e, n = ref(t.isOpen);
3307
+ const t = e, o = ref(t.isOpen);
2978
3308
  return watch(
2979
3309
  () => t.isOpen,
2980
- (o) => {
2981
- n.value = o;
3310
+ (n) => {
3311
+ o.value = n;
2982
3312
  }
2983
- ), (o, r) => (openBlock(), createElementBlock("div", null, [
3313
+ ), (n, r) => (openBlock(), createElementBlock("div", null, [
2984
3314
  createElementVNode("button", {
2985
3315
  type: "button",
2986
- onClick: r[0] || (r[0] = (s) => n.value = !n.value),
3316
+ onClick: r[0] || (r[0] = (s) => o.value = !o.value),
2987
3317
  class: "flex items-center gap-2"
2988
3318
  }, [
2989
3319
  createVNode(unref(IconChevronDown), {
2990
- class: normalizeClass(["h-4 w-4 duration-300", [n.value ? "-rotate-180" : ""]])
3320
+ class: normalizeClass(["h-4 w-4 duration-300", [o.value ? "-rotate-180" : ""]])
2991
3321
  }, null, 8, ["class"]),
2992
3322
  createElementVNode("span", _hoisted_1$4, toDisplayString(e.title), 1)
2993
3323
  ]),
2994
3324
  createVNode(Transition, { name: "slide-fade" }, {
2995
3325
  default: withCtx(() => [
2996
3326
  withDirectives(createElementVNode("div", _hoisted_2$1, [
2997
- renderSlot(o.$slots, "default", {}, void 0, !0)
3327
+ renderSlot(n.$slots, "default", {}, void 0, !0)
2998
3328
  ], 512), [
2999
- [vShow, n.value]
3329
+ [vShow, o.value]
3000
3330
  ])
3001
3331
  ]),
3002
3332
  _: 3
@@ -3016,7 +3346,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3016
3346
  }
3017
3347
  },
3018
3348
  setup(e) {
3019
- return (t, n) => (openBlock(), createElementBlock("div", null, [
3349
+ return (t, o) => (openBlock(), createElementBlock("div", null, [
3020
3350
  createElementVNode("div", _hoisted_1$3, [
3021
3351
  createElementVNode("p", null, toDisplayString(e.title), 1)
3022
3352
  ]),
@@ -3091,10 +3421,10 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3091
3421
  }
3092
3422
  },
3093
3423
  setup(e) {
3094
- const t = e, n = inject("formValues", { default: {} }), o = inject("form"), r = computed(() => t.schema?.filter((l) => {
3424
+ const t = e, o = inject("formValues", { default: {} }), n = inject("form"), r = computed(() => t.schema?.filter((l) => {
3095
3425
  const i = l?.conditions;
3096
3426
  if (!i) return !0;
3097
- const u = Array.isArray(i) ? i[0] : i, c = n?.value?.[u];
3427
+ const u = Array.isArray(i) ? i[0] : i, c = o?.value?.[u];
3098
3428
  return isVisible(c, i);
3099
3429
  })), s = computed(() => views[t.view]);
3100
3430
  return (l, i) => e.schema?.length ? (openBlock(), createBlock(resolveDynamicComponent(s.value), {
@@ -3107,56 +3437,56 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3107
3437
  key: u.name
3108
3438
  }, { ref_for: !0 }, u, {
3109
3439
  item: u,
3110
- modelValue: unref(n)[u.name],
3111
- "onUpdate:modelValue": (c) => unref(n)[u.name] = c,
3440
+ modelValue: unref(o)[u.name],
3441
+ "onUpdate:modelValue": (c) => unref(o)[u.name] = c,
3112
3442
  style: e.style,
3113
- error: unref(o)?.errors?.[u.name]
3443
+ error: unref(n)?.errors?.[u.name]
3114
3444
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
3115
3445
  ]),
3116
3446
  _: 1
3117
3447
  }, 8, ["title", "style"])) : createCommentVNode("", !0);
3118
3448
  }
3119
- }), dynamicPosition = async (e, t, n, o = 10) => {
3120
- if (!t || !n) return;
3449
+ }), dynamicPosition = async (e, t, o, n = 10) => {
3450
+ if (!t || !o) return;
3121
3451
  await nextTick();
3122
- const r = await n?.getBoundingClientRect(), s = await t?.getBoundingClientRect();
3452
+ const r = await o?.getBoundingClientRect(), s = await t?.getBoundingClientRect();
3123
3453
  if (!s || !r) return;
3124
- const l = await parseInt(t?.getBoundingClientRect()?.height.toString()), i = await parseInt(t?.getBoundingClientRect()?.width.toString()), u = await parseInt(n?.getBoundingClientRect()?.height.toString()), c = await parseInt(n?.getBoundingClientRect()?.width.toString()), a = await window.innerHeight, d = await window.innerWidth;
3125
- let f = 0, h = 0;
3126
- const p = s.bottom + o + u;
3454
+ const l = await parseInt(t?.getBoundingClientRect()?.height.toString()), i = await parseInt(t?.getBoundingClientRect()?.width.toString()), u = await parseInt(o?.getBoundingClientRect()?.height.toString()), c = await parseInt(o?.getBoundingClientRect()?.width.toString()), a = await window.innerHeight, d = await window.innerWidth;
3455
+ let f = 0, m = 0;
3456
+ const p = s.bottom + n + u;
3127
3457
  switch (e) {
3128
3458
  case "top":
3129
- s.top - r.height - o < 0 ? f = s.top - r.height + o + u + l : f = s.top - r.height - o, d > c + s.right + 30 ? h = s.left - r.width / 2 + s.width / 2 : h = d - 30 - c;
3459
+ s.top - r.height - n < 0 ? f = s.top - r.height + n + u + l : f = s.top - r.height - n, d > c + s.right + 30 ? m = s.left - r.width / 2 + s.width / 2 : m = d - 30 - c;
3130
3460
  break;
3131
3461
  case "bottom":
3132
- a > p ? f = s.bottom + o : f = s.bottom - o - u - l, h = s.left - r.width / 2 + s.width / 2;
3462
+ a > p ? f = s.bottom + n : f = s.bottom - n - u - l, m = s.left - r.width / 2 + s.width / 2;
3133
3463
  break;
3134
3464
  case "left":
3135
- f = s.top - r.height / 2 + s.height / 2, s.left - r.width - o > 0 ? h = s.left - r.width - o : h = 10;
3465
+ f = s.top - r.height / 2 + s.height / 2, s.left - r.width - n > 0 ? m = s.left - r.width - n : m = 10;
3136
3466
  break;
3137
3467
  case "right":
3138
- f = s.top - r.height / 2 + s.height / 2, d - i > c ? h = s.right + o : h = d - 30 - c;
3468
+ f = s.top - r.height / 2 + s.height / 2, d - i > c ? m = s.right + n : m = d - 30 - c;
3139
3469
  break;
3140
3470
  case "top-right":
3141
- s.top - r.height - o < 0 ? f = s.top - r.height + o + u + l : f = s.top - r.height - o, d - i > c ? h = s.right + o : h = d - 30 - c;
3471
+ s.top - r.height - n < 0 ? f = s.top - r.height + n + u + l : f = s.top - r.height - n, d - i > c ? m = s.right + n : m = d - 30 - c;
3142
3472
  break;
3143
3473
  case "top-left":
3144
- s.top - r.height - o < 0 ? f = s.top - r.height + o + u + l : f = s.top - r.height - o, s.left - r.width - o > 0 ? h = s.left - r.width - o : h = 10;
3474
+ s.top - r.height - n < 0 ? f = s.top - r.height + n + u + l : f = s.top - r.height - n, s.left - r.width - n > 0 ? m = s.left - r.width - n : m = 10;
3145
3475
  break;
3146
3476
  case "top-start":
3147
- s.top - r.height - o < 0 ? f = s.top - r.height + o + u + l : f = s.top - r.height - o, s.left > 0 ? h = s.left : h = 10;
3477
+ s.top - r.height - n < 0 ? f = s.top - r.height + n + u + l : f = s.top - r.height - n, s.left > 0 ? m = s.left : m = 10;
3148
3478
  break;
3149
3479
  case "bottom-right":
3150
- a > p ? f = s.bottom + o : f = s.bottom - o - u - l, d - i > c ? h = s.left : h = d - 30 - c;
3480
+ a > p ? f = s.bottom + n : f = s.bottom - n - u - l, d - i > c ? m = s.left : m = d - 30 - c;
3151
3481
  break;
3152
3482
  case "bottom-left":
3153
- a > p ? f = s.bottom + o : f = s.bottom - o - u - l, s.left > 0 ? h = s.right - c : h = 10;
3483
+ a > p ? f = s.bottom + n : f = s.bottom - n - u - l, s.left > 0 ? m = s.right - c : m = 10;
3154
3484
  break;
3155
3485
  case "bottom-start":
3156
- a > p ? f = s.bottom + o : f = s.bottom - o - u - l, s.left > 0 ? h = s.left : h = 10;
3486
+ a > p ? f = s.bottom + n : f = s.bottom - n - u - l, s.left > 0 ? m = s.left : m = 10;
3157
3487
  break;
3158
3488
  }
3159
- f + u > a ? f = a - u - o : f < 0 && (f = o), h + c > d ? h = d - c - o : h < 0 && (h = o), n instanceof HTMLElement && (n.style.top = `${f}px`, n.style.left = `${h}px`, n.style.position = "fixed");
3489
+ f + u > a ? f = a - u - n : f < 0 && (f = n), m + c > d ? m = d - c - n : m < 0 && (m = n), o instanceof HTMLElement && (o.style.top = `${f}px`, o.style.left = `${m}px`, o.style.position = "fixed");
3160
3490
  }, _sfc_main$4 = {}, _hoisted_1$2 = {
3161
3491
  xmlns: "http://www.w3.org/2000/svg",
3162
3492
  viewBox: "0 0 24 24",
@@ -3184,7 +3514,7 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3184
3514
  }, _hoisted_4 = { class: "absolute top-[50%] text-gray-500 translate-y-[-50%] right-[10px] pointer-events-none" }, _hoisted_5 = {
3185
3515
  key: 0,
3186
3516
  class: "sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400"
3187
- }, _hoisted_6 = { class: "h-[30px] shrink-0 flex items-center relative justify-center" }, _hoisted_7 = ["onClick"], _hoisted_8 = { class: "flex items-center gap-[8px] w-full" }, _hoisted_9 = { key: 2 }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
3517
+ }, _hoisted_6 = { class: "h-[30px] shrink-0 flex items-center relative justify-center" }, _hoisted_7 = ["onClick"], _hoisted_8 = { class: "flex items-center gap-[8px] w-full" }, _hoisted_9 = { key: 2 }, _hoisted_10 = { class: "relative" }, _hoisted_11 = { class: "w-full h-full fixed top-0 start-0 z-[80] bg-black bg-opacity-50" }, _hoisted_12 = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, _hoisted_13 = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, _hoisted_14 = { class: "p-4 mim-h-0 h-full overflow-auto" }, _hoisted_15 = { class: "vs-form__head mb-5 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
3188
3518
  __name: "vs-input-select",
3189
3519
  props: /* @__PURE__ */ mergeModels({
3190
3520
  placeholder: { default: "Оберіть значення" },
@@ -3198,6 +3528,7 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3198
3528
  style: { default: () => ({}) },
3199
3529
  disabled: { type: Boolean },
3200
3530
  mode: {},
3531
+ add: {},
3201
3532
  api: {},
3202
3533
  search: { type: Boolean },
3203
3534
  error: { default: null }
@@ -3210,183 +3541,278 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3210
3541
  }),
3211
3542
  emits: ["update:modelValue"],
3212
3543
  setup(e) {
3213
- const t = e, n = computed(() => t.mode || (t.api || t.search ? "search" : null)), { inputClass: o } = useStyle(t.style), r = useModel(e, "modelValue"), s = ref({}), l = ref(null), i = ref(null), u = ref(!1), c = ref(null), a = ref([]), d = ref(-1), f = ref([]), h = ref(""), p = ref(null);
3214
- let y = null;
3215
- const m = computed(() => {
3544
+ const t = e, o = computed(() => t.mode || (t.api || t.search ? "search" : null)), { inputClass: n } = useStyle(t.style), r = useModel(e, "modelValue"), s = ref({}), l = ref(null), i = ref(null), u = ref(!1), c = ref(null), a = ref([]), d = ref(-1), f = ref([]), m = ref(""), p = ref(null);
3545
+ let g = null;
3546
+ const y = ref(!1), x = ref(null), w = ref({}), E = ref({}), C = computed(() => {
3216
3547
  if (a.value?.length) {
3217
- const b = a.value?.filter((g) => g?.id !== c.value?.id);
3548
+ const v = a.value?.filter((b) => b?.id !== c.value?.id);
3218
3549
  return [
3219
3550
  c.value
3220
- ].concat(b)?.filter((g) => g !== null);
3551
+ ].concat(v)?.filter((b) => b !== null);
3221
3552
  }
3222
3553
  return [];
3223
- }), x = async () => {
3554
+ }), _ = async () => {
3224
3555
  try {
3225
- const { data: b } = await axios.get(
3226
- `${t.host}/${t.prefix}/suggest/${t.data}?json=1&key=${h.value}`
3556
+ const { data: v } = await axios.get(
3557
+ `${t.host}/${t.prefix}/suggest/${t.data}?json=1&key=${m.value}`
3227
3558
  );
3228
- return b.data;
3559
+ return v.data;
3229
3560
  } catch {
3230
3561
  return [];
3231
3562
  }
3232
- }, v = async (b) => {
3233
- document.body.click(), u.value = b !== void 0 ? b : !u.value, u.value && !a.value?.length && (!t.options?.length && t.data ? a.value = await x() : t.options?.length && (a.value = [...t.options])), u.value && l.value ? (s.value.width = `${l.value.getBoundingClientRect()?.width}px`, t.mode === "search" && p.value?.focus(), i.value && dynamicPosition("bottom-start", l.value, i.value)) : d.value = -1;
3234
- }, $ = () => u.value ? v(!1) : null, _ = (b) => {
3235
- c.value = b, r.value = b.id, v(!1);
3236
- }, k = (b, g) => {
3237
- if (!b || !g) return;
3238
- const w = b.offsetTop, A = w + b.offsetHeight, V = g.scrollTop, O = V + g.clientHeight;
3239
- w < V ? Object.assign(g, { scrollTop: w - 80 }) : A > O && Object.assign(g, { scrollTop: A - g.clientHeight + 4 });
3240
- }, E = (b) => {
3563
+ }, S = async (v) => {
3564
+ document.body.click(), u.value = v !== void 0 ? v : !u.value, u.value && !a.value?.length && (!t.options?.length && t.data ? a.value = await _() : t.options?.length && (a.value = [...t.options])), u.value && l.value ? (s.value.width = `${l.value.getBoundingClientRect()?.width}px`, t.mode === "search" && p.value?.focus(), i.value && dynamicPosition("bottom-start", l.value, i.value)) : d.value = -1;
3565
+ }, B = () => u.value ? S(!1) : null, V = (v) => {
3566
+ c.value = v, r.value = v.id, S(!1);
3567
+ }, A = (v, b) => {
3568
+ if (!v || !b) return;
3569
+ const k = v.offsetTop, N = k + v.offsetHeight, O = b.scrollTop, U = O + b.clientHeight;
3570
+ k < O ? Object.assign(b, { scrollTop: k - 80 }) : N > U && Object.assign(b, { scrollTop: N - b.clientHeight + 4 });
3571
+ }, R = (v) => {
3241
3572
  if (!u.value) return;
3242
- const { keyCode: g } = b;
3243
- if ([38, 40, 13].includes(g) && b.preventDefault(), g === 38) {
3573
+ const { keyCode: b } = v;
3574
+ if ([38, 40, 13].includes(b) && v.preventDefault(), b === 38) {
3244
3575
  if (d.value === 0) return;
3245
- d.value -= 1, k(f.value[d.value], i.value);
3246
- } else if (g === 40) {
3247
- if (d.value + 1 >= m.value?.length) return;
3248
- d.value += 1, k(f.value[d.value], i.value);
3249
- } else if (g === 13) {
3250
- const w = m.value[d.value];
3251
- w && _(w);
3576
+ d.value -= 1, A(f.value[d.value], i.value);
3577
+ } else if (b === 40) {
3578
+ if (d.value + 1 >= C.value?.length) return;
3579
+ d.value += 1, A(f.value[d.value], i.value);
3580
+ } else if (b === 13) {
3581
+ const k = C.value[d.value];
3582
+ k && V(k);
3252
3583
  }
3253
- }, S = async (b) => {
3584
+ }, D = async (v) => {
3254
3585
  if (u.value) return;
3255
- const { keyCode: g } = b;
3256
- [38, 40].includes(g) && (await b.preventDefault(), d.value = 0, setTimeout(() => v()));
3257
- }, C = (b) => {
3258
- u.value && l.value && i.value && !i.value.contains(b.target) && (u.value = !1);
3259
- }, B = (b) => {
3260
- b?.key === "Escape" && u.value && v(!1);
3586
+ const { keyCode: b } = v;
3587
+ [38, 40].includes(b) && (await v.preventDefault(), d.value = 0, setTimeout(() => S()));
3588
+ }, T = (v) => {
3589
+ u.value && l.value && i.value && !i.value.contains(v.target) && (u.value = !1);
3590
+ }, F = (v) => {
3591
+ v?.key === "Escape" && u.value && S(!1);
3261
3592
  };
3262
- return onMounted(async () => {
3263
- addEventListener("click", $), addEventListener("keydown", E), addEventListener("scroll", C, !0), addEventListener("keydown", B), t.options && (a.value = t.options), r.value && !t.options?.length && t.data && (a.value = await x()), c.value = a.value?.find((b) => b?.id.toString() === r.value?.toString()) || null;
3593
+ onMounted(async () => {
3594
+ addEventListener("click", B), addEventListener("keydown", R), addEventListener("scroll", T, !0), addEventListener("keydown", F), t.options && (a.value = t.options), r.value && !t.options?.length && t.data && (a.value = await _()), c.value = a.value?.find((v) => v?.id.toString() === r.value?.toString()) || null;
3264
3595
  }), onUnmounted(() => {
3265
- removeEventListener("click", $), removeEventListener("keydown", E), removeEventListener("scroll", C, !0), removeEventListener("keydown", B);
3266
- }), watch(h, (b) => {
3267
- let g = !1;
3268
- (b === "" || b.trimStart().length !== 0) && (g = !0), g && (y && clearTimeout(y), y = setTimeout(async () => {
3269
- !t.options?.length && t.data ? a.value = await x() : a.value = t.options.filter((w) => w.text.toLowerCase().includes(b.toLowerCase()));
3596
+ removeEventListener("click", B), removeEventListener("keydown", R), removeEventListener("scroll", T, !0), removeEventListener("keydown", F);
3597
+ }), watch(m, (v) => {
3598
+ let b = !1;
3599
+ (v === "" || v.trimStart().length !== 0) && (b = !0), b && (g && clearTimeout(g), g = setTimeout(async () => {
3600
+ !t.options?.length && t.data ? a.value = await _() : a.value = t.options.filter((k) => k.text.toLowerCase().includes(v.toLowerCase()));
3270
3601
  }, 200));
3271
- }), (b, g) => (openBlock(), createElementBlock("div", {
3272
- class: "relative w-full",
3273
- ref_key: "select",
3274
- ref: l,
3275
- onClick: g[5] || (g[5] = withModifiers(() => {
3276
- }, ["stop"]))
3277
- }, [
3278
- createElementVNode("button", {
3279
- type: "button",
3280
- class: normalizeClass(["block w-full flex items-center gap-[8px] pl-[16px] py-[5px] bg-white w-[calc(100%)] overflow-ellipsis", [
3281
- u.value ? `ring-rind ring-2 ring-${b.style?.primaryColor || "blue"}-500` : "",
3282
- c.value?.text ? "pr-[50px]" : "pr-[25px]",
3283
- unref(o),
3284
- b.customClass,
3285
- { "!border-red-600": b.error }
3286
- ]]),
3287
- onKeydown: S,
3288
- onClick: g[0] || (g[0] = (w) => v(!u.value)),
3289
- disabled: b.disabled,
3290
- style: {
3291
- border: "1px solid #CFD9E0"
3292
- }
3602
+ });
3603
+ async function j() {
3604
+ y.value = !0;
3605
+ const v = await fetch(`/api/template/form/${t.add.form}`).then((b) => b.json());
3606
+ x.value = v.schema;
3607
+ }
3608
+ async function L() {
3609
+ E.value.validate() || (await fetch("/api/table/" + t.add.token, {
3610
+ method: "POST",
3611
+ headers: {
3612
+ "Content-Type": "application/json"
3613
+ },
3614
+ body: JSON.stringify(w.value)
3615
+ }).then((b) => b.json()), y.value = !1);
3616
+ }
3617
+ return (v, b) => (openBlock(), createElementBlock(Fragment, null, [
3618
+ createElementVNode("div", {
3619
+ class: "relative w-full",
3620
+ ref_key: "select",
3621
+ ref: l,
3622
+ onClick: b[5] || (b[5] = withModifiers(() => {
3623
+ }, ["stop"]))
3293
3624
  }, [
3294
- c.value?.color ? (openBlock(), createElementBlock("span", {
3625
+ createElementVNode("button", {
3626
+ type: "button",
3627
+ class: normalizeClass(["block w-full flex items-center gap-[8px] pl-[16px] py-[5px] bg-white w-[calc(100%)] overflow-ellipsis", [
3628
+ u.value ? `ring-rind ring-2 ring-${v.style?.primaryColor || "blue"}-500` : "",
3629
+ c.value?.text ? "pr-[50px]" : "pr-[25px]",
3630
+ unref(n),
3631
+ v.customClass,
3632
+ { "!border-red-600": v.error }
3633
+ ]]),
3634
+ onKeydown: D,
3635
+ onClick: b[0] || (b[0] = (k) => S(!u.value)),
3636
+ disabled: v.disabled,
3637
+ style: {
3638
+ border: "1px solid #CFD9E0"
3639
+ }
3640
+ }, [
3641
+ c.value?.color ? (openBlock(), createElementBlock("span", {
3642
+ key: 0,
3643
+ class: "w-[16px] h-[16px] rounded-md block",
3644
+ style: normalizeStyle({ backgroundColor: c.value?.color })
3645
+ }, null, 4)) : createCommentVNode("", !0),
3646
+ c.value?.text ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(c.value?.text), 1)) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(v.placeholder), 1))
3647
+ ], 42, _hoisted_1$1),
3648
+ createElementVNode("span", _hoisted_4, [
3649
+ createVNode(unref(IconChevronTopBottom), {
3650
+ height: "14",
3651
+ width: "14"
3652
+ })
3653
+ ]),
3654
+ c.value?.text ? (openBlock(), createElementBlock("button", {
3295
3655
  key: 0,
3296
- class: "w-[16px] h-[16px] rounded-md block",
3297
- style: normalizeStyle({ backgroundColor: c.value?.color })
3298
- }, null, 4)) : createCommentVNode("", !0),
3299
- c.value?.text ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(c.value?.text), 1)) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(b.placeholder), 1))
3300
- ], 42, _hoisted_1$1),
3301
- createElementVNode("span", _hoisted_4, [
3302
- createVNode(unref(IconChevronTopBottom), {
3303
- height: "14",
3304
- width: "14"
3305
- })
3306
- ]),
3307
- c.value?.text ? (openBlock(), createElementBlock("button", {
3308
- key: 0,
3309
- type: "button",
3310
- onClick: g[1] || (g[1] = (w) => {
3311
- r.value = null, c.value = null;
3312
- }),
3313
- class: "absolute top-[50%] text-gray-500 translate-y-[-50%] hover:text-red-600 right-[30px]"
3314
- }, [
3315
- createVNode(unref(IconClose), {
3316
- height: "14",
3317
- width: "14"
3318
- })
3319
- ])) : createCommentVNode("", !0),
3320
- (openBlock(), createBlock(Teleport, { to: "body" }, [
3321
- withDirectives(createElementVNode("ul", {
3322
- class: "z-[90] border rounded-lg fixed flex flex-col gap-[2px] p-1 bg-white overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-[6px] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",
3323
- ref_key: "list",
3324
- ref: i,
3325
- style: normalizeStyle({
3326
- width: s.value.width,
3327
- maxHeight: b.maxHeight + "px",
3328
- backgroundColor: "white"
3656
+ type: "button",
3657
+ onClick: b[1] || (b[1] = (k) => {
3658
+ r.value = null, c.value = null;
3329
3659
  }),
3330
- onClick: g[4] || (g[4] = withModifiers(() => {
3331
- }, ["stop"]))
3660
+ class: "absolute top-[50%] text-gray-500 translate-y-[-50%] hover:text-red-600 right-[30px]"
3332
3661
  }, [
3333
- n.value === "search" ? (openBlock(), createElementBlock("li", _hoisted_5, [
3334
- createElementVNode("div", _hoisted_6, [
3335
- withDirectives(createElementVNode("input", {
3336
- "onUpdate:modelValue": g[2] || (g[2] = (w) => h.value = w),
3337
- class: "w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",
3338
- placeholder: "Пошук",
3339
- type: "text",
3340
- ref_key: "inputRef",
3341
- ref: p
3342
- }, null, 512), [
3343
- [vModelText, h.value]
3344
- ]),
3345
- createVNode(IconMagnifyingGlass, {
3346
- width: "15px",
3347
- height: "15px",
3348
- class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2"
3349
- }),
3350
- h.value != "" ? (openBlock(), createBlock(unref(IconClose), {
3351
- key: 0,
3352
- width: "15px",
3353
- height: "15px",
3354
- onClick: g[3] || (g[3] = (w) => h.value = ""),
3355
- class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
3356
- })) : createCommentVNode("", !0)
3357
- ])
3358
- ])) : createCommentVNode("", !0),
3359
- m.value?.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3360
- g[6] || (g[6] = createElementVNode("li", { class: "sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400" }, " Натисніть Enter для вибору, ↑↓ для навігації, Esc для закриття ", -1)),
3361
- (openBlock(!0), createElementBlock(Fragment, null, renderList(m.value, (w, A) => (openBlock(), createElementBlock("li", {
3362
- onClick: (V) => _(w),
3363
- key: w?.id,
3364
- ref_for: !0,
3365
- ref: (V) => f.value[A] = V,
3366
- class: normalizeClass(["cursor-pointer relative py-2 px-4 w-full text-[14px] text-gray-700 hover:bg-gray-100 rounded-lg", [d.value == A ? "bg-gray-100" : ""]])
3367
- }, [
3368
- createElementVNode("span", _hoisted_8, [
3369
- w?.color ? (openBlock(), createElementBlock("span", {
3662
+ createVNode(unref(IconClose), {
3663
+ height: "14",
3664
+ width: "14"
3665
+ })
3666
+ ])) : createCommentVNode("", !0),
3667
+ (openBlock(), createBlock(Teleport, { to: "body" }, [
3668
+ withDirectives(createElementVNode("ul", {
3669
+ class: "z-[90] border rounded-lg fixed flex flex-col gap-[2px] p-1 bg-white overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-[6px] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",
3670
+ ref_key: "list",
3671
+ ref: i,
3672
+ style: normalizeStyle({
3673
+ width: s.value.width,
3674
+ maxHeight: v.maxHeight + "px",
3675
+ backgroundColor: "white"
3676
+ }),
3677
+ onClick: b[4] || (b[4] = withModifiers(() => {
3678
+ }, ["stop"]))
3679
+ }, [
3680
+ o.value === "search" ? (openBlock(), createElementBlock("li", _hoisted_5, [
3681
+ createElementVNode("div", _hoisted_6, [
3682
+ withDirectives(createElementVNode("input", {
3683
+ "onUpdate:modelValue": b[2] || (b[2] = (k) => m.value = k),
3684
+ class: "w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",
3685
+ placeholder: "Пошук",
3686
+ type: "text",
3687
+ ref_key: "inputRef",
3688
+ ref: p
3689
+ }, null, 512), [
3690
+ [vModelText, m.value]
3691
+ ]),
3692
+ createVNode(IconMagnifyingGlass, {
3693
+ width: "15px",
3694
+ height: "15px",
3695
+ class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2"
3696
+ }),
3697
+ m.value != "" ? (openBlock(), createBlock(unref(IconClose), {
3370
3698
  key: 0,
3371
- class: "w-[16px] h-[16px] rounded-md block",
3372
- style: normalizeStyle({ backgroundColor: w?.color })
3373
- }, null, 4)) : createCommentVNode("", !0),
3374
- createTextVNode(" " + toDisplayString(w?.text), 1)
3699
+ width: "15px",
3700
+ height: "15px",
3701
+ onClick: b[3] || (b[3] = (k) => m.value = ""),
3702
+ class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
3703
+ })) : createCommentVNode("", !0)
3704
+ ])
3705
+ ])) : createCommentVNode("", !0),
3706
+ C.value?.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3707
+ b[10] || (b[10] = createElementVNode("li", { class: "sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400" }, " Натисніть Enter для вибору, ↑↓ для навігації, Esc для закриття ", -1)),
3708
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(C.value, (k, N) => (openBlock(), createElementBlock("li", {
3709
+ onClick: (O) => V(k),
3710
+ key: k?.id,
3711
+ ref_for: !0,
3712
+ ref: (O) => f.value[N] = O,
3713
+ class: normalizeClass(["cursor-pointer relative py-2 px-4 w-full text-[14px] text-gray-700 hover:bg-gray-100 rounded-lg", [d.value == N ? "bg-gray-100" : ""]])
3714
+ }, [
3715
+ createElementVNode("span", _hoisted_8, [
3716
+ k?.color ? (openBlock(), createElementBlock("span", {
3717
+ key: 0,
3718
+ class: "w-[16px] h-[16px] rounded-md block",
3719
+ style: normalizeStyle({ backgroundColor: k?.color })
3720
+ }, null, 4)) : createCommentVNode("", !0),
3721
+ createTextVNode(" " + toDisplayString(k?.text), 1)
3722
+ ]),
3723
+ r.value == k?.id ? (openBlock(), createBlock(unref(IconCheck), {
3724
+ key: 0,
3725
+ height: "14",
3726
+ width: "14",
3727
+ "stroke-width": "2",
3728
+ class: "absolute right-[16px] top-[50%] translate-y-[-50%] text-blue-600"
3729
+ })) : createCommentVNode("", !0)
3730
+ ], 10, _hoisted_7))), 128))
3731
+ ], 64)) : (openBlock(), createElementBlock("li", _hoisted_9, "Дані відсутні"))
3732
+ ], 4), [
3733
+ [vShow, u.value]
3734
+ ])
3735
+ ]))
3736
+ ], 512),
3737
+ t.add ? (openBlock(), createElementBlock("button", {
3738
+ key: 0,
3739
+ onClick: j,
3740
+ class: "ml-auto bg-white hover:bg-gray-100 text-sm text-gray-900 leadig-[18.5px] py-[10px] px-[12px] border border-solid border-stone-200 rounded-md h-[38px] max-h-[40px] gap-[8px] flex items-center"
3741
+ }, b[11] || (b[11] = [
3742
+ createElementVNode("svg", {
3743
+ class: "vpbnr cp61q",
3744
+ xmlns: "http://www.w3.org/2000/svg",
3745
+ width: "16",
3746
+ height: "16",
3747
+ fill: "currentColor",
3748
+ viewBox: "0 0 16 16"
3749
+ }, [
3750
+ createElementVNode("path", {
3751
+ "fill-rule": "evenodd",
3752
+ "clip-rule": "evenodd",
3753
+ d: "M8 1C8.55228 1 9 1.44772 9 2V7L14 7C14.5523 7 15 7.44771 15 8C15 8.55228 14.5523 9 14 9L9 9V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V9.00001L2 9.00001C1.44772 9.00001 1 8.5523 1 8.00001C0.999999 7.44773 1.44771 7.00001 2 7.00001L7 7.00001V2C7 1.44772 7.44772 1 8 1Z"
3754
+ })
3755
+ ], -1),
3756
+ createElementVNode("span", null, "Додати", -1)
3757
+ ]))) : createCommentVNode("", !0),
3758
+ (openBlock(), createBlock(Teleport, { to: "body" }, [
3759
+ withDirectives(createElementVNode("div", _hoisted_10, [
3760
+ createElementVNode("div", _hoisted_11, [
3761
+ createElementVNode("div", _hoisted_12, [
3762
+ createElementVNode("div", _hoisted_13, [
3763
+ b[13] || (b[13] = createElementVNode("h3", { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, "Додати", -1)),
3764
+ createElementVNode("button", {
3765
+ onClick: b[6] || (b[6] = (k) => y.value = !1),
3766
+ type: "button",
3767
+ class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"
3768
+ }, b[12] || (b[12] = [
3769
+ createElementVNode("span", { class: "sr-only" }, "Close", -1),
3770
+ createElementVNode("svg", {
3771
+ class: "flex-shrink-0 w-4 h-4",
3772
+ xmlns: "http://www.w3.org/2000/svg",
3773
+ width: "24",
3774
+ height: "24",
3775
+ viewBox: "0 0 24 24",
3776
+ fill: "none",
3777
+ stroke: "currentColor",
3778
+ "stroke-width": "2",
3779
+ "stroke-linecap": "round",
3780
+ "stroke-linejoin": "round"
3781
+ }, [
3782
+ createElementVNode("path", { d: "M18 6 6 18" }),
3783
+ createElementVNode("path", { d: "m6 6 12 12" })
3784
+ ], -1)
3785
+ ]))
3375
3786
  ]),
3376
- r.value == w?.id ? (openBlock(), createBlock(unref(IconCheck), {
3377
- key: 0,
3378
- height: "14",
3379
- width: "14",
3380
- "stroke-width": "2",
3381
- class: "absolute right-[16px] top-[50%] translate-y-[-50%] text-blue-600"
3382
- })) : createCommentVNode("", !0)
3383
- ], 10, _hoisted_7))), 128))
3384
- ], 64)) : (openBlock(), createElementBlock("li", _hoisted_9, "Дані відсутні"))
3385
- ], 4), [
3386
- [vShow, u.value]
3787
+ createElementVNode("div", _hoisted_14, [
3788
+ x.value ? (openBlock(), createBlock(_sfc_main, {
3789
+ key: 0,
3790
+ schema: x.value,
3791
+ values: w.value,
3792
+ "onUpdate:values": b[7] || (b[7] = (k) => w.value = k),
3793
+ form: E.value,
3794
+ "onUpdate:form": b[8] || (b[8] = (k) => E.value = k)
3795
+ }, null, 8, ["schema", "values", "form"])) : createCommentVNode("", !0),
3796
+ createElementVNode("div", _hoisted_15, [
3797
+ createElementVNode("button", {
3798
+ type: "button",
3799
+ onClick: b[9] || (b[9] = (k) => y.value = !1),
3800
+ class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
3801
+ }, " Скасувати "),
3802
+ createElementVNode("button", {
3803
+ onClick: L,
3804
+ type: "button",
3805
+ class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"
3806
+ }, " Зберегти ")
3807
+ ])
3808
+ ])
3809
+ ])
3810
+ ])
3811
+ ], 512), [
3812
+ [vShow, y.value]
3387
3813
  ])
3388
3814
  ]))
3389
- ], 512));
3815
+ ], 64));
3390
3816
  }
3391
3817
  }), _hoisted_1 = ["placeholder", "disabled"], _sfc_main$2 = /* @__PURE__ */ defineComponent({
3392
3818
  __name: "vs-input-textarea",
@@ -3413,36 +3839,37 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3413
3839
  }),
3414
3840
  emits: ["update:modelValue"],
3415
3841
  setup(e) {
3416
- const t = e, { inputClass: n } = useStyle(t.style), o = useModel(e, "modelValue");
3842
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue");
3417
3843
  return (r, s) => withDirectives((openBlock(), createElementBlock("textarea", {
3418
- "onUpdate:modelValue": s[0] || (s[0] = (l) => o.value = l),
3844
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
3419
3845
  placeholder: e.placeholder,
3420
3846
  disabled: e.disabled,
3421
3847
  row: "2",
3422
- class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [unref(n)]]),
3848
+ class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [unref(o)]]),
3423
3849
  style: {
3424
3850
  border: "1px solid #CFD9E0"
3425
3851
  }
3426
3852
  }, null, 10, _hoisted_1)), [
3427
- [vModelText, o.value]
3853
+ [vModelText, n.value]
3428
3854
  ]);
3429
3855
  }
3430
3856
  }), inputs = {
3431
- VsInputText: _sfc_main$B,
3857
+ VsInputText: _sfc_main$C,
3432
3858
  VsInputRadio: _sfc_main$l,
3433
- "vs-input-text": _sfc_main$B,
3859
+ "vs-input-text": _sfc_main$C,
3434
3860
  "vs-input-textarea": _sfc_main$2,
3435
- "vs-input-mask": _sfc_main$p,
3436
- "vs-input-number": _sfc_main$A,
3861
+ "vs-input-mask": _sfc_main$q,
3862
+ "vs-input-number": _sfc_main$B,
3437
3863
  "vs-input-radio": _sfc_main$l,
3438
3864
  "vs-input-select": _sfc_main$3,
3439
- "vs-input-switcher": _sfc_main$r,
3440
- "vs-input-static": _sfc_main$q,
3865
+ "vs-input-switcher": _sfc_main$s,
3866
+ "vs-input-static": _sfc_main$r,
3441
3867
  "vs-input-container": _sfc_main$5,
3442
3868
  "vs-input-date": _sfc_main$j,
3443
3869
  "vs-input-checkbox": VsInputCheckbox,
3444
3870
  "vs-input-file": _sfc_main$9,
3445
- "vs-input-html": _sfc_main$o
3871
+ "vs-input-html": _sfc_main$p,
3872
+ "vs-input-email": _sfc_main$o
3446
3873
  }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
3447
3874
  __name: "vs-compact-form-layout",
3448
3875
  props: {
@@ -3464,13 +3891,13 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3464
3891
  }
3465
3892
  },
3466
3893
  setup(e) {
3467
- const t = e, n = computed(() => layouts$1[`${t.layout}`]), o = computed(() => inputs?.[`vs-input-${t.type}`]);
3468
- return (r, s) => (openBlock(), createBlock(resolveDynamicComponent(n.value), mergeProps(r.$attrs, {
3894
+ const t = e, o = computed(() => layouts$1[`${t.layout}`]), n = computed(() => inputs?.[`vs-input-${t.type}`]);
3895
+ return (r, s) => (openBlock(), createBlock(resolveDynamicComponent(o.value), mergeProps(r.$attrs, {
3469
3896
  style: e.style,
3470
3897
  item: e.item
3471
3898
  }), {
3472
3899
  default: withCtx(() => [
3473
- (openBlock(), createBlock(resolveDynamicComponent(o.value), mergeProps(r.$attrs, { style: e.style }), null, 16, ["style"]))
3900
+ (openBlock(), createBlock(resolveDynamicComponent(n.value), mergeProps(r.$attrs, { style: e.style }), null, 16, ["style"]))
3474
3901
  ]),
3475
3902
  _: 1
3476
3903
  }, 16, ["style", "item"]));
@@ -3497,9 +3924,10 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3497
3924
  }, mathTable = {
3498
3925
  autocomplete: "select",
3499
3926
  combobox: "select",
3500
- email: "text",
3501
3927
  datepicker: "date",
3502
- markedtext: "text"
3928
+ markedtext: "mask",
3929
+ html: "static",
3930
+ filelist: "file"
3503
3931
  // mask: 'text',
3504
3932
  };
3505
3933
  function convertType(e) {
@@ -3509,43 +3937,43 @@ function convertType(e) {
3509
3937
  function convertSchema(e) {
3510
3938
  if (Array.isArray(e)) return e;
3511
3939
  const t = [];
3512
- return Object.entries(e).forEach((n) => {
3513
- const o = {
3514
- name: n[0],
3515
- ...n[1],
3516
- type: convertType(n[1].type),
3517
- label: n[1].label || n[1].ua,
3518
- rules: n[1].rules || n[1].validators
3940
+ return Object.entries(e).forEach((o) => {
3941
+ const n = {
3942
+ name: o[0],
3943
+ ...o[1],
3944
+ type: convertType(o[1].type),
3945
+ label: o[1].label || o[1].ua,
3946
+ rules: o[1].rules || o[1].validators
3519
3947
  };
3520
- n[1].data && (o.api = `/api/suggest/${n[1].data}`), t.push(o);
3948
+ o[1].type.includes("list") && (n.multiple = !0), o[1].data && (n.api = `/api/suggest/${o[1].data}`), t.push(n);
3521
3949
  }), t;
3522
3950
  }
3523
3951
  function useForm(e, t) {
3524
- const n = convertSchema(t), o = ref({});
3952
+ const o = convertSchema(t), n = ref({});
3525
3953
  function r(u) {
3526
3954
  const c = u?.conditions;
3527
3955
  if (!c) return !0;
3528
3956
  const a = Array.isArray(c) ? c[0] : c, d = e?.value?.[a];
3529
3957
  return isVisible(d, c);
3530
3958
  }
3531
- const s = (u = n, c = !0) => (u.forEach((a) => {
3959
+ const s = (u = o, c = !0) => (u.forEach((a) => {
3532
3960
  if (a.rules) {
3533
3961
  if (!r(a)) {
3534
- console.log(a.name, "skip hidden"), delete o.value[a.name];
3962
+ console.log(a.name, "skip hidden"), delete n.value[a.name];
3535
3963
  return;
3536
3964
  }
3537
3965
  a.rules.forEach((d) => {
3538
3966
  const f = checkFormRules(e.value[a.name], d);
3539
- f ? o.value[a.name] = f : delete o.value[a.name];
3967
+ f ? n.value[a.name] = f : delete n.value[a.name];
3540
3968
  });
3541
3969
  }
3542
3970
  a.schema && s(a.schema, !1);
3543
- }), c && Object.values(o.value).some(Boolean) ? o.value : null), l = computed(() => n?.filter((u) => r(u)));
3971
+ }), c && Object.values(n.value).some(Boolean) ? n.value : null), l = computed(() => o?.filter((u) => r(u)));
3544
3972
  return {
3545
- errors: o,
3973
+ errors: n,
3546
3974
  validate: s,
3547
3975
  reset: () => {
3548
- e.value = {}, o.value = {};
3976
+ e.value = {}, n.value = {};
3549
3977
  },
3550
3978
  visibleSchema: l
3551
3979
  };
@@ -3564,17 +3992,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3564
3992
  }),
3565
3993
  emits: /* @__PURE__ */ mergeModels(["handle-submit"], ["update:form", "update:values"]),
3566
3994
  setup(e, { emit: t }) {
3567
- const n = t, o = e, r = useAttrs(), s = useModel(e, "form"), l = useModel(e, "values"), {
3995
+ const o = t, n = e, r = useAttrs(), s = useModel(e, "form"), l = useModel(e, "values"), {
3568
3996
  errors: i,
3569
3997
  validate: u,
3570
3998
  reset: c,
3571
3999
  visibleSchema: a
3572
- } = useForm(l, o.schema), d = () => {
3573
- u(), n("handle-submit", l.value);
4000
+ } = useForm(l, n.schema), d = () => {
4001
+ u(), o("handle-submit", l.value);
3574
4002
  };
3575
4003
  return onMounted(() => {
3576
4004
  s.value.value = l.value, s.value.errors = i.value, s.value.reset = c, s.value.validate = u;
3577
- }), provide("form", s), provide("values", l), (f, h) => (openBlock(), createElementBlock("form", {
4005
+ }), provide("form", s), provide("values", l), (f, m) => (openBlock(), createElementBlock("form", {
3578
4006
  onSubmit: withModifiers(d, ["prevent"]),
3579
4007
  class: normalizeClass(["grid grid-cols-12", f.layout === "default" ? "gap-6" : "gap-4"])
3580
4008
  }, [
@@ -3585,7 +4013,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3585
4013
  item: p,
3586
4014
  layout: f.layout,
3587
4015
  modelValue: l.value[p.name],
3588
- "onUpdate:modelValue": (y) => l.value[p.name] = y,
4016
+ "onUpdate:modelValue": (g) => l.value[p.name] = g,
3589
4017
  style: f.style,
3590
4018
  error: unref(i)[p.name]
3591
4019
  }), null, 16, ["class", "item", "layout", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
@@ -3597,6 +4025,6 @@ _sfc_main.install = function e(t) {
3597
4025
  };
3598
4026
  export {
3599
4027
  _sfc_main as VForm,
3600
- _sfc_main$B as VsInputText,
4028
+ _sfc_main$C as VsInputText,
3601
4029
  _sfc_main as default
3602
4030
  };