inertia-bootstrap-forms 3.0.2 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.fa.md +86 -6
  2. package/README.md +95 -8
  3. package/dist/chunks/UppyInput-Dt8CPfgC.js +210 -0
  4. package/dist/chunks/UppyInput-ldc834tZ.cjs +1 -0
  5. package/dist/chunks/_plugin-vue_export-helper-13TPlHFF.js +81 -0
  6. package/dist/chunks/_plugin-vue_export-helper-BHyUve4F.cjs +1 -0
  7. package/dist/chunks/http-CDPNmbjF.cjs +1 -0
  8. package/dist/chunks/http-DV3dRBe5.js +158 -0
  9. package/dist/country-codes.cjs +1 -0
  10. package/dist/country-codes.js +245 -0
  11. package/dist/dropzone.cjs +1 -0
  12. package/dist/dropzone.js +81 -0
  13. package/dist/editor.cjs +1 -0
  14. package/dist/editor.js +52 -0
  15. package/dist/index.cjs +1 -0
  16. package/dist/index.js +3230 -0
  17. package/dist/location.cjs +1 -0
  18. package/dist/location.js +84 -0
  19. package/dist/persian-date.cjs +1 -0
  20. package/dist/persian-date.js +73 -0
  21. package/dist/style.css +1 -0
  22. package/dist/tel.cjs +1 -0
  23. package/dist/tel.js +85 -0
  24. package/dist/uppy-dashboard.cjs +1 -0
  25. package/dist/uppy-dashboard.js +31 -0
  26. package/dist/uppy.cjs +1 -0
  27. package/dist/uppy.js +4 -0
  28. package/index.d.ts +50 -30
  29. package/package.json +101 -17
  30. package/src/CheckboxToggle.vue +1 -1
  31. package/src/ComboboxInput.vue +495 -496
  32. package/src/PasswordInput.vue +124 -123
  33. package/src/StarRatingInput.vue +1 -1
  34. package/src/UppyDashboardInput.vue +45 -0
  35. package/src/UppyInput.vue +36 -3
  36. package/src/VoiceRecorderInput.vue +660 -0
  37. package/src/VoiceRecorderResultArea.vue +109 -0
  38. package/src/composables/useVoiceChannel.js +31 -0
  39. package/src/entries/country-codes.js +1 -0
  40. package/src/entries/dropzone.js +1 -0
  41. package/src/entries/editor.js +1 -0
  42. package/src/entries/location.js +1 -0
  43. package/src/entries/persian-date.js +1 -0
  44. package/src/entries/tel.js +1 -0
  45. package/src/entries/uppy-dashboard.js +1 -0
  46. package/src/entries/uppy.js +1 -0
  47. package/src/index.js +6 -19
  48. package/types/country-codes.d.ts +1 -0
  49. package/types/dropzone.d.ts +2 -0
  50. package/types/editor.d.ts +2 -0
  51. package/types/location.d.ts +2 -0
  52. package/types/persian-date.d.ts +2 -0
  53. package/types/tel.d.ts +2 -0
  54. package/types/uppy-dashboard.d.ts +12 -0
  55. package/types/uppy.d.ts +10 -0
  56. package/dist/inertia-bootstrap-forms.cjs.js +0 -1
  57. package/dist/inertia-bootstrap-forms.es.js +0 -3536
  58. package/src/RangeSliderInput.vue +0 -103
  59. package/src/Select2Input.vue +0 -251
@@ -1,3536 +0,0 @@
1
- import * as he from "vue";
2
- import { inject as Z, computed as S, ref as B, watch as q, reactive as $e, defineComponent as E, createElementBlock as b, openBlock as v, normalizeClass as D, renderSlot as j, createElementVNode as $, createCommentVNode as A, toDisplayString as N, onBeforeUnmount as Ze, withDirectives as ee, vModelText as Ye, normalizeStyle as le, onMounted as K, vModelDynamic as me, createTextVNode as ue, shallowRef as Qe, nextTick as X, Fragment as Y, renderList as oe, resolveComponent as U, createBlock as Q, defineAsyncComponent as x, mergeProps as ve, withModifiers as Ue, provide as ge, withCtx as pe, createVNode as te, h as fn, vModelCheckbox as mn } from "vue";
3
- import { useForm as pn } from "@inertiajs/vue3";
4
- let yn = 0;
5
- const R = {
6
- /** Key of the field inside the FormContainer's v-model object. */
7
- name: { type: String, default: null },
8
- /** Standalone v-model (only used when the field is NOT inside a FormContainer). */
9
- modelValue: { type: null, default: void 0 },
10
- id: { type: String, default: null },
11
- disabled: { type: Boolean, default: !1 },
12
- readonly: { type: Boolean, default: !1 },
13
- required: { type: Boolean, default: !1 },
14
- /** Force the invalid state. By default it follows the server-side errors of the form. */
15
- invalid: { type: Boolean, default: null }
16
- };
17
- function P(e, n, o = {}) {
18
- const l = Z("form", null), r = Z("group", null), d = Z("formField", null), t = Z("formApi", null), a = S(() => (l == null ? void 0 : l.value) ?? null), f = S(() => {
19
- var k;
20
- return (k = r == null ? void 0 : r.value) != null && k.name ? r.value : null;
21
- }), m = S(() => !a.value), p = B(
22
- e.modelValue === void 0 ? o.defaultValue ?? null : e.modelValue
23
- );
24
- q(
25
- () => e.modelValue,
26
- (k) => {
27
- m.value && k !== void 0 && (p.value = k);
28
- }
29
- );
30
- const h = S({
31
- get() {
32
- return m.value ? p.value : f.value ? f.value.getData(e.name) : a.value[e.name];
33
- },
34
- set(k) {
35
- m.value ? p.value = k : f.value ? f.value.setData(e.name, k) : a.value[e.name] = k, n("update:modelValue", k);
36
- }
37
- }), g = S(() => {
38
- const k = [];
39
- return f.value && (k.push(`${f.value.name}.${f.value.index}.${e.name}`), k.push(`${f.value.name}.${e.name}`)), k.push(e.name), k;
40
- }), I = S(() => {
41
- var T;
42
- const k = (T = a.value) == null ? void 0 : T.errors;
43
- if (!k) return null;
44
- for (const M of g.value)
45
- if (M && k[M] !== void 0) return k[M];
46
- return null;
47
- }), s = S(() => e.invalid === !0 || e.invalid === null && I.value !== null), c = S(() => {
48
- var k;
49
- return e.disabled || !!((k = a.value) != null && k.processing);
50
- }), i = he.useId ? he.useId() : `ibf-${++yn}`, u = S(() => {
51
- var k;
52
- return e.id ? e.id : d != null && d.id && !o.valued ? d.id : (k = a.value) != null && k.getID && e.name ? a.value.getID({
53
- name: e.name,
54
- value: o.valued ? o.valued() : void 0,
55
- group: f.value
56
- }) : e.name ? `${e.name}-${i}` : i;
57
- });
58
- return {
59
- form: a,
60
- group: f,
61
- standalone: m,
62
- model: h,
63
- error: I,
64
- isInvalid: s,
65
- isDisabled: c,
66
- inputId: u,
67
- emitChange: (k, T) => n("change", k, T),
68
- formApi: t,
69
- fieldCtx: d
70
- };
71
- }
72
- const ne = $e({
73
- locale: "auto",
74
- messages: {
75
- en: {
76
- "select.placeholder": "Select an option…",
77
- "select.search": "Type to search…",
78
- "select.noResults": "No results found",
79
- "select.loading": "Searching…",
80
- "select.selectedCount": "{count} selected",
81
- "select.clear": "— Clear selection —",
82
- "select.error": "Search failed",
83
- "submit.default": "Submit",
84
- "chips.placeholder": "Type and press Enter…",
85
- "chips.remove": "Remove",
86
- "email.placeholder": "Enter your email",
87
- "password.placeholder": "Enter your password",
88
- "password.show": "Show password",
89
- "password.hide": "Hide password",
90
- "mobile.placeholder": "Enter your mobile number",
91
- "amount.placeholder": "Enter a number",
92
- "amount.unit": "pcs",
93
- "quantity.unit": "pcs",
94
- "quantity.increase": "Increase",
95
- "quantity.decrease": "Decrease",
96
- "captcha.placeholder": "Enter the code shown",
97
- "captcha.refresh": "Refresh code",
98
- "captcha.alt": "captcha",
99
- "file.retry": "Retry",
100
- "file.remove": "Remove",
101
- "upload.failed": "Upload failed",
102
- "uppy.types": "Only {types} files",
103
- "uppy.maxFiles": "up to {count} files",
104
- "uppy.minFiles": "at least {count} files required",
105
- "uppy.maxSize": "max {size} per file",
106
- "uppy.minSize": "min {size} per file",
107
- "uppy.maxTotal": "max {size} in total",
108
- "uppy.suffix": "are allowed."
109
- },
110
- fa: {
111
- "select.placeholder": "انتخاب کنید…",
112
- "select.search": "برای جستجو تایپ کنید…",
113
- "select.noResults": "نتیجه‌ای یافت نشد",
114
- "select.loading": "در حال جستجو…",
115
- "select.selectedCount": "{count} مورد انتخاب شده",
116
- "select.clear": "— پاک کردن انتخاب —",
117
- "select.error": "جستجو با خطا مواجه شد",
118
- "submit.default": "تایید و ثبت اطلاعات",
119
- "chips.placeholder": "تایپ کنید و Enter بزنید…",
120
- "chips.remove": "حذف",
121
- "email.placeholder": "ایمیل خود را وارد کنید",
122
- "password.placeholder": "گذرواژه خود را وارد کنید",
123
- "password.show": "نمایش گذرواژه",
124
- "password.hide": "مخفی کردن گذرواژه",
125
- "mobile.placeholder": "موبایل خود را وارد کنید",
126
- "amount.placeholder": "عدد را وارد کنید",
127
- "amount.unit": "عدد",
128
- "quantity.unit": "عدد",
129
- "quantity.increase": "افزایش",
130
- "quantity.decrease": "کاهش",
131
- "captcha.placeholder": "کد امنیتی روبرو را وارد کنید",
132
- "captcha.refresh": "کد جدید",
133
- "captcha.alt": "کد امنیتی",
134
- "file.retry": "تلاش مجدد",
135
- "file.remove": "حذف",
136
- "upload.failed": "خطا در آپلود",
137
- "uppy.types": "فقط فایل‌های {types}",
138
- "uppy.maxFiles": "امکان انتخاب حداکثر {count} فایل",
139
- "uppy.minFiles": "حداقل {count} فایل نیاز است",
140
- "uppy.maxSize": "با حداکثر حجم {size} برای هر فایل",
141
- "uppy.minSize": "با حداقل حجم {size} برای هر فایل",
142
- "uppy.maxTotal": "و مجموع حجم کل حداکثر {size}",
143
- "uppy.suffix": "مجاز است."
144
- }
145
- }
146
- });
147
- function hn({ locale: e, messages: n } = {}) {
148
- e && (ne.locale = e), n && Object.keys(n).forEach((o) => {
149
- ne.messages[o] = { ...ne.messages[o] || {}, ...n[o] };
150
- });
151
- }
152
- function vn() {
153
- var e;
154
- if (typeof document < "u") {
155
- const n = document.documentElement;
156
- if ((n == null ? void 0 : n.dir) === "rtl" || (e = n == null ? void 0 : n.getAttribute("lang")) != null && e.startsWith("fa")) return "fa";
157
- }
158
- return "en";
159
- }
160
- function G(e = () => null) {
161
- const n = S(() => {
162
- const l = e() || ne.locale;
163
- return l === "auto" ? vn() : l;
164
- });
165
- return { t: (l, r = {}) => {
166
- let t = (ne.messages[n.value] || ne.messages.en)[l] ?? ne.messages.en[l] ?? l;
167
- return Object.keys(r).forEach((a) => {
168
- t = t.replace(new RegExp(`\\{${a}\\}`, "g"), r[a]);
169
- }), t;
170
- }, locale: n };
171
- }
172
- const gn = "۰۱۲۳۴۵۶۷۸۹", bn = "٠١٢٣٤٥٦٧٨٩";
173
- function Fe(e) {
174
- return String(e ?? "").replace(/[۰-۹٠-٩]/g, (n) => {
175
- const o = gn.indexOf(n);
176
- return String(o !== -1 ? o : bn.indexOf(n));
177
- });
178
- }
179
- function be(e) {
180
- if (e == null || e === "") return "";
181
- const n = Number(e);
182
- return Number.isNaN(n) ? "" : n.toLocaleString("en-US");
183
- }
184
- function xe(e) {
185
- const n = Fe(e).replace(/\D/g, "");
186
- return n === "" ? null : parseInt(n, 10);
187
- }
188
- const O = (e, n) => {
189
- const o = e.__vccOpts || e;
190
- for (const [l, r] of n)
191
- o[l] = r;
192
- return o;
193
- }, $n = E({
194
- name: "AmountInput",
195
- emits: ["update:modelValue", "change", "input", "focus", "blur"],
196
- props: {
197
- ...R,
198
- placeholder: { type: String, default: null },
199
- unit: { type: String, default: null },
200
- min: { type: Number, default: null },
201
- max: { type: Number, default: null },
202
- inputClass: { type: [String, Array, Object], default: null },
203
- size: { type: String, default: null },
204
- locale: { type: String, default: null }
205
- },
206
- setup(e, { emit: n }) {
207
- const o = P(e, n), { t: l } = G(() => e.locale), r = S(() => be(o.model.value)), d = S(() => e.unit ?? l("amount.unit")), t = S(() => e.size ? `form-control-${e.size}` : null);
208
- function a(m) {
209
- const p = m.target, h = p.value.slice(0, p.selectionStart ?? 0), g = Fe(h).replace(/\D/g, "").length, I = xe(p.value);
210
- o.model.value = I;
211
- const s = be(I);
212
- p.value = s;
213
- let c = 0, i = 0;
214
- for (; c < s.length && i < g; )
215
- /\d/.test(s[c]) && i++, c++;
216
- document.activeElement === p && p.setSelectionRange(c, c), n("input", I, m);
217
- }
218
- function f(m) {
219
- let p = o.model.value;
220
- p != null && (e.max !== null && p > e.max && (p = e.max), e.min !== null && p < e.min && (p = e.min), p !== o.model.value && (o.model.value = p)), o.emitChange(p, m);
221
- }
222
- return { ...o, displayValue: r, unitText: d, sizeClass: t, onInput: a, clamp: f, t: l };
223
- }
224
- }), Sn = ["name", "id", "value", "placeholder", "required", "readonly", "disabled", "aria-invalid"], In = {
225
- key: 0,
226
- class: "input-group-text fanum"
227
- };
228
- function Cn(e, n, o, l, r, d) {
229
- return v(), b("div", {
230
- class: D(["input-group", { "is-invalid": e.isInvalid }])
231
- }, [
232
- j(e.$slots, "prefix"),
233
- $("input", {
234
- name: e.name,
235
- id: e.inputId,
236
- value: e.displayValue,
237
- placeholder: e.placeholder ?? e.t("amount.placeholder"),
238
- required: e.required,
239
- readonly: e.readonly,
240
- disabled: e.isDisabled,
241
- "aria-invalid": e.isInvalid || void 0,
242
- type: "tel",
243
- inputmode: "numeric",
244
- autocomplete: "off",
245
- class: D(["form-control fanum", [e.sizeClass, e.inputClass, { "is-invalid": e.isInvalid }]]),
246
- onInput: n[0] || (n[0] = (...t) => e.onInput && e.onInput(...t)),
247
- onChange: n[1] || (n[1] = (...t) => e.clamp && e.clamp(...t)),
248
- onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
249
- onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
250
- }, null, 42, Sn),
251
- e.unitText ? (v(), b("span", In, N(e.unitText), 1)) : A("", !0),
252
- j(e.$slots, "suffix")
253
- ], 2);
254
- }
255
- const wn = /* @__PURE__ */ O($n, [["render", Cn]]);
256
- function ye() {
257
- const e = [];
258
- let n = !1;
259
- const o = (a) => {
260
- if (n) {
261
- try {
262
- a();
263
- } catch {
264
- }
265
- return () => {
266
- };
267
- }
268
- return e.push(a), () => {
269
- const f = e.indexOf(a);
270
- f !== -1 && e.splice(f, 1);
271
- };
272
- }, l = (a, f, m, p) => a ? (a.addEventListener(f, m, p), o(() => a.removeEventListener(f, m, p))) : () => {
273
- }, r = (a, f) => {
274
- const m = setTimeout(a, f);
275
- return o(() => clearTimeout(m)), m;
276
- }, d = () => {
277
- const a = new AbortController();
278
- return o(() => a.abort()), a;
279
- }, t = () => {
280
- for (n = !0; e.length; )
281
- try {
282
- e.pop()();
283
- } catch {
284
- }
285
- };
286
- return Ze(t), {
287
- add: o,
288
- listen: l,
289
- timeout: r,
290
- abortable: d,
291
- dispose: t,
292
- isDisposed: () => n
293
- };
294
- }
295
- const kn = E({
296
- name: "CaptchaInput",
297
- emits: ["update:modelValue", "change", "input", "refresh"],
298
- props: {
299
- ...R,
300
- name: { type: String, default: "captcha" },
301
- /** Endpoint that returns the captcha image. */
302
- url: { type: String, default: "/captcha/default" },
303
- placeholder: { type: String, default: null },
304
- /** Reload the image (and clear the input) when a submit finishes. */
305
- refreshOnSubmit: { type: Boolean, default: !0 },
306
- imageWidth: { type: [Number, String], default: 82 },
307
- imageHeight: { type: [Number, String], default: 38 },
308
- locale: { type: String, default: null }
309
- },
310
- setup(e, { emit: n, expose: o }) {
311
- const l = P(e, n), { t: r } = G(() => e.locale), d = ye(), t = B(null), a = B(!0);
312
- function f() {
313
- a.value = !0, t.value = `${e.url}${e.url.includes("?") ? "&" : "?"}t=${Date.now()}`, d.timeout(() => {
314
- a.value = !1;
315
- }, 500), n("refresh");
316
- }
317
- return K(f), q(
318
- () => {
319
- var m;
320
- return (m = l.form.value) == null ? void 0 : m.processing;
321
- },
322
- (m, p) => {
323
- e.refreshOnSubmit && p && !m && (l.model.value = null, f());
324
- }
325
- ), o({ refresh: f }), { ...l, t: r, src: t, loading: a, refresh: f };
326
- }
327
- }), Mn = ["name", "id", "placeholder", "required", "readonly", "disabled", "aria-invalid"], Bn = ["src", "alt", "width", "height"], Tn = {
328
- key: 1,
329
- class: "placeholder-wave w-100",
330
- "aria-hidden": "true"
331
- }, An = ["disabled", "aria-label"];
332
- function Nn(e, n, o, l, r, d) {
333
- return v(), b("div", {
334
- class: D(["input-group captcha", { "is-invalid": e.isInvalid }])
335
- }, [
336
- ee($("input", {
337
- "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
338
- name: e.name,
339
- id: e.inputId,
340
- type: "text",
341
- inputmode: "numeric",
342
- autocomplete: "off",
343
- placeholder: e.placeholder ?? e.t("captcha.placeholder"),
344
- required: e.required,
345
- readonly: e.readonly,
346
- disabled: e.isDisabled,
347
- "aria-invalid": e.isInvalid || void 0,
348
- class: D(["form-control text-start", { "is-invalid": e.isInvalid }]),
349
- onInput: n[1] || (n[1] = (t) => e.$emit("input", e.model, t)),
350
- onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t))
351
- }, null, 42, Mn), [
352
- [Ye, e.model]
353
- ]),
354
- $("span", {
355
- class: "input-group-text p-0 overflow-hidden",
356
- style: le({ width: e.imageWidth + "px", height: "auto" })
357
- }, [
358
- e.src && !e.loading ? (v(), b("img", {
359
- key: 0,
360
- src: e.src,
361
- alt: e.t("captcha.alt"),
362
- width: e.imageWidth,
363
- height: e.imageHeight,
364
- class: "captcha-holder",
365
- style: { cursor: "pointer", objectFit: "contain" },
366
- onClick: n[3] || (n[3] = (...t) => e.refresh && e.refresh(...t))
367
- }, null, 8, Bn)) : (v(), b("span", Tn, [
368
- $("span", {
369
- class: "placeholder w-100",
370
- style: le({ height: e.imageHeight + "px" })
371
- }, null, 4)
372
- ]))
373
- ], 4),
374
- $("button", {
375
- type: "button",
376
- class: "btn-outline theme-secondary btn-icon",
377
- disabled: e.isDisabled || e.loading,
378
- "aria-label": e.t("captcha.refresh"),
379
- onClick: n[4] || (n[4] = (...t) => e.refresh && e.refresh(...t))
380
- }, n[5] || (n[5] = [
381
- $("svg", {
382
- width: "16",
383
- height: "16",
384
- viewBox: "0 0 16 16",
385
- fill: "none",
386
- stroke: "currentColor",
387
- "stroke-width": "1.5",
388
- "stroke-linecap": "round",
389
- "stroke-linejoin": "round",
390
- "aria-hidden": "true"
391
- }, [
392
- $("path", { d: "M13.5 3v3.5H10M2.5 13V9.5H6" }),
393
- $("path", { d: "M3.2 6.5A5.5 5.5 0 0 1 13 6.5M12.8 9.5A5.5 5.5 0 0 1 3 9.5" })
394
- ], -1)
395
- ]), 8, An)
396
- ], 2);
397
- }
398
- const En = /* @__PURE__ */ O(kn, [["render", Nn]]);
399
- function Se(e, n, o, { type: l = () => e.type } = {}) {
400
- function r() {
401
- if (!e.checked) return;
402
- const t = n.model.value;
403
- l() === "radio" ? (t == null || t === "") && (n.model.value = e.value) : Array.isArray(t) ? t.includes(e.value) || (n.model.value = [...t, e.value]) : t || (n.model.value = e.trueValue !== void 0 ? e.trueValue : !0);
404
- }
405
- function d() {
406
- o.value && (o.value.indeterminate = !!e.indeterminate);
407
- }
408
- return K(() => {
409
- r(), d();
410
- }), q(() => e.indeterminate, d), { applyInitialChecked: r };
411
- }
412
- const On = E({
413
- name: "CheckboxButtonInput",
414
- emits: ["update:modelValue", "change", "focus", "blur"],
415
- props: {
416
- ...R,
417
- type: { type: String, default: "radio", validator: (e) => ["checkbox", "radio"].includes(e) },
418
- value: { type: [String, Number, Boolean, Object], default: "yes" },
419
- trueValue: { type: null, default: !0 },
420
- falseValue: { type: null, default: !1 },
421
- checked: { type: Boolean, default: !1 },
422
- /** solid | outline | subtle | text | styled */
423
- variant: { type: String, default: "outline" },
424
- theme: { type: String, default: "primary" }
425
- },
426
- setup(e, { emit: n }) {
427
- const o = B(null), l = P(e, n, { valued: () => e.value });
428
- return Se(e, l, o), { ...l, input: o, onChange: (r) => l.emitChange(l.model.value, r) };
429
- },
430
- expose: ["input"]
431
- }), Vn = ["name", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"];
432
- function Fn(e, n, o, l, r, d) {
433
- return v(), b("label", {
434
- class: D(["btn-check", [`btn-${e.variant}`, `theme-${e.theme}`, { "is-invalid": e.isInvalid, disabled: e.isDisabled }]])
435
- }, [
436
- ee($("input", {
437
- ref: "input",
438
- "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
439
- name: e.name,
440
- type: e.type,
441
- value: e.value,
442
- "true-value": e.trueValue,
443
- "false-value": e.falseValue,
444
- required: e.required,
445
- disabled: e.isDisabled,
446
- "aria-invalid": e.isInvalid || void 0,
447
- autocomplete: "off",
448
- class: D({ "is-invalid": e.isInvalid }),
449
- onChange: n[1] || (n[1] = (...t) => e.onChange && e.onChange(...t)),
450
- onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
451
- onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
452
- }, null, 42, Vn), [
453
- [me, e.model]
454
- ]),
455
- j(e.$slots, "default")
456
- ], 2);
457
- }
458
- const Dn = /* @__PURE__ */ O(On, [["render", Fn]]), Ln = E({
459
- name: "CheckboxInput",
460
- emits: ["update:modelValue", "change", "focus", "blur"],
461
- props: {
462
- ...R,
463
- /** checkbox | radio */
464
- type: { type: String, default: "checkbox", validator: (e) => ["checkbox", "radio"].includes(e) },
465
- /** Value added to the model (arrays / radios) when this option is checked. */
466
- value: { type: [String, Number, Boolean, Object], default: "yes" },
467
- trueValue: { type: null, default: !0 },
468
- falseValue: { type: null, default: !1 },
469
- /** Initial checked state (applied only when the model is still empty). */
470
- checked: { type: Boolean, default: !1 },
471
- indeterminate: { type: Boolean, default: !1 },
472
- label: { type: String, default: null }
473
- },
474
- setup(e, { emit: n }) {
475
- const o = B(null), l = P(e, n, { valued: () => e.value });
476
- Se(e, l, o);
477
- function r(d) {
478
- l.emitChange(l.model.value, d);
479
- }
480
- return { ...l, input: o, onChange: r };
481
- },
482
- expose: ["input"]
483
- }), zn = { class: "form-field" }, qn = ["name", "id", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], Rn = ["for"];
484
- function Pn(e, n, o, l, r, d) {
485
- return v(), b("div", zn, [
486
- ee($("input", {
487
- ref: "input",
488
- "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
489
- name: e.name,
490
- id: e.inputId,
491
- type: e.type,
492
- value: e.value,
493
- "true-value": e.trueValue,
494
- "false-value": e.falseValue,
495
- required: e.required,
496
- disabled: e.isDisabled,
497
- "aria-invalid": e.isInvalid || void 0,
498
- class: D([e.type === "radio" ? "radio" : "check", { "is-invalid": e.isInvalid }]),
499
- onClick: n[1] || (n[1] = (t) => e.readonly && t.preventDefault()),
500
- onChange: n[2] || (n[2] = (...t) => e.onChange && e.onChange(...t)),
501
- onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
502
- onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
503
- }, null, 42, qn), [
504
- [me, e.model]
505
- ]),
506
- $("label", { for: e.inputId }, [
507
- j(e.$slots, "default", {}, () => [
508
- ue(N(e.label), 1)
509
- ])
510
- ], 8, Rn)
511
- ]);
512
- }
513
- const jn = /* @__PURE__ */ O(Ln, [["render", Pn]]), Un = E({
514
- name: "CheckboxToggle",
515
- emits: ["update:modelValue", "change", "focus", "blur"],
516
- props: {
517
- ...R,
518
- type: { type: String, default: "checkbox", validator: (e) => ["checkbox", "radio"].includes(e) },
519
- value: { type: [String, Number, Boolean, Object], default: "yes" },
520
- trueValue: { type: null, default: !0 },
521
- falseValue: { type: null, default: !1 },
522
- checked: { type: Boolean, default: !1 },
523
- /** Visually hide the check mark (the card highlight is the only indicator). */
524
- hideInput: { type: Boolean, default: !1 },
525
- formField: { type: Boolean, default: !0 },
526
- formFieldCard: { type: Boolean, default: !0 }
527
- },
528
- setup(e, { emit: n }) {
529
- const o = B(null), l = P(e, n, { valued: () => e.value });
530
- return Se(e, l, o), { ...l, input: o, onChange: (r) => l.emitChange(l.model.value, r) };
531
- },
532
- expose: ["input"]
533
- }), Kn = ["name", "id", "type", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], Gn = ["for"];
534
- function Hn(e, n, o, l, r, d) {
535
- return v(), b("div", {
536
- class: D({
537
- "form-field": e.formField,
538
- "form-field-card": e.formFieldCard,
539
- "is-invalid": e.isInvalid,
540
- disabled: e.isDisabled || e.readonly
541
- })
542
- }, [
543
- ee($("input", {
544
- ref: "input",
545
- "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
546
- name: e.name,
547
- id: e.inputId,
548
- type: e.type,
549
- value: e.value,
550
- "true-value": e.trueValue,
551
- "false-value": e.falseValue,
552
- required: e.required,
553
- disabled: e.isDisabled,
554
- "aria-invalid": e.isInvalid || void 0,
555
- class: D([e.type === "radio" ? "radio" : "check", { "is-invalid": e.isInvalid, "visually-hidden": e.hideInput }]),
556
- onClick: n[1] || (n[1] = (t) => e.readonly && t.preventDefault()),
557
- onChange: n[2] || (n[2] = (...t) => e.onChange && e.onChange(...t)),
558
- onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
559
- onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
560
- }, null, 42, Kn), [
561
- [me, e.model]
562
- ]),
563
- $("label", { for: e.inputId }, [
564
- j(e.$slots, "default")
565
- ], 8, Gn)
566
- ], 2);
567
- }
568
- const Xn = /* @__PURE__ */ O(Un, [["render", Hn]]), Oe = {}, fe = /* @__PURE__ */ new Map(), Ke = {
569
- Combobox: () => import("bootstrap/js/dist/combobox.js"),
570
- Menu: () => import("bootstrap/js/dist/menu.js"),
571
- Strength: () => import("bootstrap/js/dist/strength.js"),
572
- Chips: () => import("bootstrap/js/dist/chips.js"),
573
- OtpInput: () => import("bootstrap/js/dist/otp-input.js"),
574
- Range: () => import("bootstrap/js/dist/range.js")
575
- };
576
- function Jn(e = {}) {
577
- Object.assign(Oe, e), fe.clear();
578
- }
579
- function Wn(e) {
580
- return Oe[e] ? Promise.resolve(Oe[e]) : Ke[e] ? (fe.has(e) || fe.set(
581
- e,
582
- Ke[e]().then((n) => n.default ?? n[e]).catch((n) => {
583
- throw fe.delete(e), n;
584
- })
585
- ), fe.get(e)) : Promise.reject(new Error(`[inertia-bootstrap-forms] Unknown Bootstrap plugin "${e}"`));
586
- }
587
- function se(e, n, o, l = {}) {
588
- const r = Qe(null);
589
- let d = 0, t = !1, a = null;
590
- function f() {
591
- var h;
592
- d++;
593
- const p = r.value;
594
- if (r.value = null, p) {
595
- try {
596
- (h = l.onDestroy) == null || h.call(l, p, a);
597
- } catch {
598
- }
599
- try {
600
- p.dispose();
601
- } catch {
602
- }
603
- }
604
- a = null;
605
- }
606
- async function m() {
607
- var s, c, i;
608
- f();
609
- const p = d, h = await Wn(e);
610
- if (t || p !== d) return null;
611
- const g = n();
612
- if (!g) return null;
613
- (c = (s = h.getInstance) == null ? void 0 : s.call(h, g)) == null || c.dispose(), a = g;
614
- const I = new h(g, o());
615
- return r.value = I, (i = l.onCreate) == null || i.call(l, I, g), I;
616
- }
617
- return K(() => {
618
- t = !1, m().catch((p) => {
619
- console.error(`[inertia-bootstrap-forms] Could not start Bootstrap ${e}.`, p);
620
- });
621
- }), Ze(() => {
622
- t = !0, f();
623
- }), { instance: r, create: m, destroy: f };
624
- }
625
- const Ge = (e, n) => e.length === n.length && e.every((o, l) => o === n[l]), Zn = E({
626
- name: "ChipsInput",
627
- emits: ["update:modelValue", "change", "add", "remove", "select", "rejected", "focus", "blur"],
628
- props: {
629
- ...R,
630
- placeholder: { type: String, default: null },
631
- /** Character that splits typed / pasted text into chips. Use null to disable. */
632
- separator: { type: String, default: "," },
633
- allowDuplicates: { type: Boolean, default: !1 },
634
- maxChips: { type: Number, default: null },
635
- dismissible: { type: Boolean, default: !0 },
636
- /** HTML / SVG of the remove icon (sanitised by Bootstrap). */
637
- dismissIcon: { type: String, default: null },
638
- /** Turn the pending text into a chip when the input loses focus. */
639
- createOnBlur: { type: Boolean, default: !0 },
640
- /** (value: string) => boolean — return false to reject a chip. */
641
- validator: { type: Function, default: null },
642
- locale: { type: String, default: null }
643
- },
644
- setup(e, { emit: n, expose: o }) {
645
- const l = P(e, n), { t: r } = G(() => e.locale), d = B(null), t = B(null);
646
- let a = !1, f = [];
647
- const m = (s) => Array.isArray(s) ? s.map(String) : typeof s == "string" && s !== "" ? e.separator ? s.split(e.separator).map((c) => c.trim()).filter(Boolean) : [s] : [];
648
- function p() {
649
- const s = g.value;
650
- if (!s) return;
651
- const c = m(l.model.value);
652
- if (Ge(s.getValues(), c)) return;
653
- a = !0;
654
- try {
655
- s.clear(), c.forEach((u) => s.add(u));
656
- } finally {
657
- a = !1;
658
- }
659
- const i = s.getValues();
660
- !Ge(i, c) && Array.isArray(l.model.value) && (l.model.value = i);
661
- }
662
- const h = () => e.readonly || l.isDisabled.value, { instance: g, create: I } = se(
663
- "Chips",
664
- () => d.value,
665
- () => {
666
- const s = {
667
- separator: e.separator,
668
- allowDuplicates: e.allowDuplicates,
669
- maxChips: e.maxChips,
670
- dismissible: e.dismissible && !h(),
671
- createOnBlur: e.createOnBlur,
672
- placeholder: e.placeholder ?? r("chips.placeholder")
673
- };
674
- return e.dismissIcon && (s.dismissIcon = e.dismissIcon), s;
675
- },
676
- {
677
- onCreate(s, c) {
678
- const i = (u, w) => {
679
- c.addEventListener(u, w), f.push(() => c.removeEventListener(u, w));
680
- };
681
- i("add.bs.chips", (u) => {
682
- if (!a) {
683
- if (e.validator && !e.validator(u.value)) {
684
- u.preventDefault(), n("rejected", u.value);
685
- return;
686
- }
687
- n("add", u.value);
688
- }
689
- }), i("remove.bs.chips", (u) => !a && n("remove", u.value)), i("select.bs.chips", (u) => n("select", u.selected)), i("change.bs.chips", (u) => {
690
- a || (l.model.value = u.values, l.emitChange(u.values, u));
691
- }), p();
692
- },
693
- onDestroy() {
694
- f.forEach((s) => s()), f = [];
695
- }
696
- }
697
- );
698
- return q(() => l.model.value, p, { deep: !0 }), q(
699
- () => [e.separator, e.allowDuplicates, e.maxChips, e.dismissible, e.createOnBlur, e.dismissIcon, e.readonly, l.isDisabled.value],
700
- async () => {
701
- await X(), I();
702
- }
703
- ), o({
704
- add: (s) => {
705
- var c;
706
- return (c = g.value) == null ? void 0 : c.add(s);
707
- },
708
- remove: (s) => {
709
- var c;
710
- return (c = g.value) == null ? void 0 : c.remove(s);
711
- },
712
- clear: () => {
713
- var s;
714
- return (s = g.value) == null ? void 0 : s.clear();
715
- },
716
- focus: () => {
717
- var s;
718
- return (s = t.value) == null ? void 0 : s.focus();
719
- }
720
- }), { ...l, t: r, el: d, ghost: t, locked: h };
721
- }
722
- }), Yn = ["aria-disabled"], Qn = ["id", "placeholder", "disabled", "readonly", "aria-invalid"];
723
- function xn(e, n, o, l, r, d) {
724
- return v(), b("div", {
725
- ref: "el",
726
- class: "chip-input",
727
- "aria-disabled": e.isDisabled || void 0
728
- }, [
729
- $("input", {
730
- ref: "ghost",
731
- type: "text",
732
- class: D(["form-ghost", { "is-invalid": e.isInvalid }]),
733
- id: e.inputId,
734
- placeholder: e.placeholder ?? e.t("chips.placeholder"),
735
- disabled: e.isDisabled,
736
- readonly: e.readonly,
737
- "aria-invalid": e.isInvalid || void 0,
738
- autocomplete: "off",
739
- onFocus: n[0] || (n[0] = (t) => e.$emit("focus", t)),
740
- onBlur: n[1] || (n[1] = (t) => e.$emit("blur", t))
741
- }, null, 42, Qn)
742
- ], 8, Yn);
743
- }
744
- const _n = /* @__PURE__ */ O(Zn, [["render", xn]]), ie = (e) => e !== null && typeof e == "object", He = (e) => e == null || e === "";
745
- function et() {
746
- if (typeof document > "u") return null;
747
- const e = document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]+)/);
748
- return e ? decodeURIComponent(e[1]) : null;
749
- }
750
- const nt = E({
751
- name: "ComboboxInput",
752
- emits: [
753
- "update:modelValue",
754
- "change",
755
- "selected",
756
- "clear",
757
- "search",
758
- "search-success",
759
- "search-error",
760
- "show",
761
- "shown",
762
- "hide",
763
- "hidden"
764
- ],
765
- props: {
766
- ...R,
767
- /** Strings, numbers or objects ({ id | value, name | label, description, disabled }). */
768
- options: { type: Array, default: () => [] },
769
- /** Property that holds the value of an option object (default: id → value → name → label). */
770
- valueKey: { type: String, default: null },
771
- /** Property that holds the label of an option object (default: name → label → title → value). */
772
- labelKey: { type: String, default: null },
773
- /** Legacy alias of `labelKey`. */
774
- label: { type: String, default: null },
775
- descriptionKey: { type: String, default: "description" },
776
- multiple: { type: Boolean, default: !1 },
777
- placeholder: { type: String, default: null },
778
- /** Show a client-side search box. */
779
- searchEnabled: { type: Boolean, default: !1 },
780
- searchPlaceholder: { type: String, default: null },
781
- /**
782
- * Remote search: { url, method = 'POST', param = 'query', debounce = 400, minChars = 0, headers = {}, resultsKey }.
783
- * The endpoint must answer with a JSON array (or { data: [] }).
784
- */
785
- search: { type: Object, default: () => ({ url: null }) },
786
- /** Add an entry at the top of a single select that clears the value. */
787
- clearable: { type: Boolean, default: !1 },
788
- clearText: { type: String, default: null },
789
- noResultsText: { type: String, default: null },
790
- loadingText: { type: String, default: null },
791
- /** Text of a multiple select when more than one item is chosen. `{count}` is replaced. */
792
- selectedText: { type: String, default: null },
793
- /**
794
- * Multiple select only: show the chosen options themselves (true) instead of the
795
- * "N selected" counter (false, default).
796
- */
797
- showSelected: { type: Boolean, default: !0 },
798
- /** With `showSelected`: above this many chosen options the counter is shown instead. */
799
- maxVisible: { type: Number, default: null },
800
- /** Separator between the chosen labels (default: "، " for fa, ", " otherwise). */
801
- selectedSeparator: { type: String, default: null },
802
- searchNormalize: { type: Boolean, default: !1 },
803
- /** Floating UI placement of the menu. */
804
- placement: { type: String, default: "bottom-start" },
805
- size: { type: String, default: null },
806
- /** Hide the caret icon. */
807
- hideDropdown: { type: Boolean, default: !1 },
808
- locale: { type: String, default: null }
809
- },
810
- setup(e, { emit: n, expose: o, slots: l }) {
811
- const r = P(e, n), { t: d, locale: t } = G(() => e.locale), a = ye(), f = B(null), m = B(null), p = B(null), h = B(null), g = B(null), I = B({}), s = $e({ results: null, loading: !1, error: !1 }), c = S(() => {
812
- var y;
813
- return ((y = e.search) == null ? void 0 : y.url) || null;
814
- }), i = S(() => e.searchEnabled || !!c.value), u = (y) => ie(y) ? e.valueKey ? y[e.valueKey] : y.id ?? y.value ?? y.name ?? y.label : y, w = (y) => {
815
- if (!ie(y)) return y;
816
- const C = e.labelKey || e.label;
817
- return (C ? y[C] : y.name ?? y.label ?? y.title ?? y.value) ?? u(y);
818
- }, k = (y) => ie(y) ? y[e.descriptionKey] ?? null : null, T = (y) => String(u(y));
819
- function M(y) {
820
- const C = { ...I.value };
821
- (y || []).forEach((V) => {
822
- C[T(V)] = V;
823
- }), I.value = C;
824
- }
825
- q(() => e.options, (y) => M(y), { immediate: !0, deep: !0 });
826
- const L = S(() => {
827
- const y = r.model.value;
828
- return e.multiple ? Array.isArray(y) ? y : ie(y) ? Object.values(y) : He(y) ? [] : [y] : He(y) ? [] : [y];
829
- }), z = S(() => L.value.map((y) => ie(y) ? T(y) : String(y))), H = (y) => {
830
- const C = I.value[y];
831
- return C !== void 0 ? String(w(C)) : y;
832
- }, de = S(
833
- () => z.value.map((y) => {
834
- const C = I.value[y];
835
- return {
836
- key: y,
837
- raw: C,
838
- label: C !== void 0 ? String(w(C)) : y,
839
- description: C !== void 0 ? k(C) : null
840
- };
841
- })
842
- ), Ce = S(() => e.selectedSeparator ?? (t.value === "fa" ? "، " : ", ")), Le = S(
843
- () => e.multiple && e.showSelected && z.value.length > 1 && (e.maxVisible === null || z.value.length <= e.maxVisible)
844
- ), ze = S(
845
- () => !!l.selection && z.value.length > 0 && (!e.multiple || z.value.length === 1 || Le.value)
846
- ), qe = S(() => {
847
- const y = z.value;
848
- return y.length ? e.multiple && y.length > 1 ? Le.value ? de.value.map((C) => C.label).join(Ce.value) : (e.selectedText ?? d("select.selectedCount")).replace("{count}", y.length) : H(y[0]) : e.placeholder ?? d("select.placeholder");
849
- }), we = S(() => ze.value ? "" : qe.value), Re = S(() => z.value.length === 0), ke = S(() => {
850
- let y = s.results ?? e.options;
851
- if (s.results && e.multiple) {
852
- const C = new Set(y.map(T));
853
- y = [...z.value.filter((F) => !C.has(F) && I.value[F] !== void 0).map((F) => I.value[F]), ...y];
854
- }
855
- return y.map((C) => ({
856
- raw: C,
857
- key: T(C),
858
- label: w(C),
859
- description: k(C),
860
- disabled: ie(C) && !!C.disabled
861
- }));
862
- });
863
- function an() {
864
- if (!p.value) return;
865
- const y = new Set(z.value);
866
- p.value.querySelectorAll(".menu-item[data-bs-value]").forEach((C) => {
867
- const V = y.has(C.dataset.bsValue) && C.dataset.bsValue !== "";
868
- C.classList.toggle("selected", V), C.setAttribute("aria-selected", V ? "true" : "false");
869
- });
870
- }
871
- function Pe() {
872
- h.value && (h.value.textContent = we.value, h.value.classList.toggle("combobox-placeholder", Re.value));
873
- }
874
- function rn() {
875
- var y;
876
- (y = m.value) == null || y.classList.toggle("is-invalid", r.isInvalid.value);
877
- }
878
- function ce() {
879
- an(), Pe(), rn();
880
- }
881
- q([() => r.model.value, ke, we, r.isInvalid], () => X(ce), { flush: "post" });
882
- function je(y) {
883
- const C = I.value[y];
884
- return C !== void 0 ? u(C) : y;
885
- }
886
- function un(y) {
887
- let C, V;
888
- if (e.multiple) {
889
- const F = y.value || [];
890
- C = F.map(je), V = F.map((W) => I.value[W]);
891
- } else y.value === "" || y.value === void 0 ? (C = null, V = null) : (C = je(y.value), V = I.value[y.value]);
892
- r.model.value = C, C === null && n("clear"), n("selected", V), r.emitChange(C, y), X(ce), Pe();
893
- }
894
- let Me = null, J = null;
895
- a.add(() => {
896
- clearTimeout(Me), J == null || J.abort();
897
- });
898
- function Be() {
899
- var y;
900
- p.value && (p.value.querySelectorAll(".menu-item[data-bs-value]").forEach((C) => {
901
- C.style.display = "";
902
- }), (y = p.value.querySelector(".combobox-no-results")) == null || y.classList.toggle("d-none", ke.value.length > 0));
903
- }
904
- async function sn(y) {
905
- const C = e.search || {};
906
- if (C.url) {
907
- J == null || J.abort(), J = new AbortController(), s.loading = !0, s.error = !1;
908
- try {
909
- const V = new URL(C.url, window.location.origin);
910
- V.searchParams.set(C.param || "query", y);
911
- const F = {
912
- Accept: "application/json",
913
- "X-Requested-With": "XMLHttpRequest",
914
- ...C.headers || {}
915
- }, W = et();
916
- W && !F["X-XSRF-TOKEN"] && (F["X-XSRF-TOKEN"] = W);
917
- const ae = await fetch(V, {
918
- method: (C.method || "POST").toUpperCase(),
919
- headers: F,
920
- credentials: "same-origin",
921
- signal: J.signal
922
- });
923
- if (!ae.ok) throw new Error(`HTTP ${ae.status}`);
924
- const _ = await ae.json(), Ne = Array.isArray(_) ? _ : (_ == null ? void 0 : _[C.resultsKey || "data"]) ?? (_ == null ? void 0 : _.results) ?? [];
925
- M(Ne), s.results = Ne, s.loading = !1, n("search-success", Ne), await X(), Be(), ce();
926
- } catch (V) {
927
- if ((V == null ? void 0 : V.name) === "AbortError") return;
928
- s.loading = !1, s.error = !0, s.results = [], n("search-error", V), await X(), Be();
929
- }
930
- }
931
- }
932
- function dn(y) {
933
- var F, W;
934
- const C = y.target.value;
935
- if (n("search", C), !c.value) return;
936
- clearTimeout(Me);
937
- const V = ((F = e.search) == null ? void 0 : F.minChars) ?? 0;
938
- if (C.length < V) {
939
- J == null || J.abort(), s.results = null, s.loading = !1;
940
- return;
941
- }
942
- s.loading = !0, Me = setTimeout(() => sn(C), ((W = e.search) == null ? void 0 : W.debounce) ?? 400);
943
- }
944
- let Te = [];
945
- const { instance: Ae, create: cn } = se(
946
- "Combobox",
947
- () => m.value,
948
- () => ({
949
- multiple: e.multiple,
950
- placeholder: e.placeholder ?? d("select.placeholder"),
951
- placement: e.placement,
952
- search: i.value,
953
- searchNormalize: e.searchNormalize
954
- }),
955
- {
956
- onCreate(y, C) {
957
- const V = (F, W, ae) => {
958
- F.addEventListener(W, ae), Te.push(() => F.removeEventListener(W, ae));
959
- };
960
- V(C, "change.bs.combobox", un), V(C, "show.bs.combobox", (F) => n("show", F)), V(C, "shown.bs.combobox", (F) => n("shown", F)), V(C, "hide.bs.combobox", (F) => n("hide", F)), V(C, "hidden.bs.combobox", (F) => {
961
- s.results !== null && (s.results = null, s.error = !1, X(() => {
962
- Be(), ce();
963
- })), n("hidden", F);
964
- }), g.value && (V(g.value, "input", dn), V(g.value, "keydown", (F) => F.key === "Enter" && F.preventDefault())), ce();
965
- },
966
- onDestroy() {
967
- Te.forEach((y) => y()), Te = [];
968
- }
969
- }
970
- );
971
- return q(
972
- () => [e.multiple, i.value, e.placement, e.searchNormalize],
973
- async () => {
974
- await X(), cn();
975
- }
976
- ), o({
977
- show: () => {
978
- var y;
979
- return (y = Ae.value) == null ? void 0 : y.show();
980
- },
981
- hide: () => {
982
- var y;
983
- return (y = Ae.value) == null ? void 0 : y.hide();
984
- },
985
- toggle: () => {
986
- var y;
987
- return (y = Ae.value) == null ? void 0 : y.toggle();
988
- },
989
- clear: () => {
990
- r.model.value = e.multiple ? [] : null, n("clear"), r.emitChange(r.model.value);
991
- },
992
- focus: () => {
993
- var y;
994
- return (y = m.value) == null ? void 0 : y.focus();
995
- }
996
- }), {
997
- ...r,
998
- t: d,
999
- root: f,
1000
- toggle: m,
1001
- menu: p,
1002
- valueEl: h,
1003
- searchInput: g,
1004
- remote: s,
1005
- hasSearch: i,
1006
- rendered: ke,
1007
- displayText: qe,
1008
- plainText: we,
1009
- selectedItems: de,
1010
- customSelection: ze,
1011
- separator: Ce,
1012
- selectedSet: S(() => new Set(z.value)),
1013
- showingPlaceholder: Re,
1014
- sizeClass: S(() => e.size ? `form-control-${e.size}` : null)
1015
- };
1016
- }
1017
- }), tt = {
1018
- ref: "root",
1019
- class: "combobox"
1020
- }, lt = ["id", "disabled", "aria-invalid", "aria-required"], ot = {
1021
- key: 0,
1022
- class: "combobox-selection d-flex align-items-center flex-wrap gap-2 text-start"
1023
- }, at = ["textContent"], it = {
1024
- key: 1,
1025
- class: "combobox-caret",
1026
- width: "16",
1027
- height: "16",
1028
- viewBox: "0 0 16 16",
1029
- fill: "none",
1030
- stroke: "currentColor",
1031
- "stroke-width": "1.5",
1032
- "stroke-linecap": "round",
1033
- "stroke-linejoin": "round",
1034
- "aria-hidden": "true"
1035
- }, rt = ["aria-multiselectable"], ut = {
1036
- key: 0,
1037
- class: "combobox-search"
1038
- }, st = ["placeholder"], dt = {
1039
- key: 1,
1040
- class: "menu-header",
1041
- role: "status"
1042
- }, ct = {
1043
- key: 2,
1044
- class: "menu-header",
1045
- role: "alert"
1046
- }, ft = {
1047
- key: 3,
1048
- type: "button",
1049
- class: "menu-item",
1050
- "data-bs-value": "",
1051
- role: "option"
1052
- }, mt = { class: "menu-item-content" }, pt = ["data-bs-value", "disabled"], yt = { class: "menu-item-content" }, ht = {
1053
- key: 0,
1054
- class: "menu-item-description"
1055
- }, vt = { class: "combobox-no-results d-none" };
1056
- function gt(e, n, o, l, r, d) {
1057
- return v(), b("div", tt, [
1058
- $("button", {
1059
- ref: "toggle",
1060
- type: "button",
1061
- class: D(["combobox-toggle form-control", e.sizeClass]),
1062
- "data-bs-toggle": "combobox",
1063
- id: e.inputId,
1064
- disabled: e.isDisabled || e.readonly,
1065
- "aria-haspopup": "listbox",
1066
- "aria-invalid": e.isInvalid || void 0,
1067
- "aria-required": e.required || void 0
1068
- }, [
1069
- e.customSelection ? (v(), b("span", ot, [
1070
- (v(!0), b(Y, null, oe(e.selectedItems, (t, a) => j(e.$slots, "selection", {
1071
- key: t.key,
1072
- option: t.raw,
1073
- label: t.label,
1074
- description: t.description,
1075
- value: t.key,
1076
- index: a,
1077
- multiple: e.multiple
1078
- }, () => [
1079
- ue(N(t.label), 1)
1080
- ])), 128))
1081
- ])) : A("", !0),
1082
- $("span", {
1083
- ref: "valueEl",
1084
- class: D(["combobox-value", { "combobox-placeholder": e.showingPlaceholder }]),
1085
- textContent: N(e.plainText)
1086
- }, null, 10, at),
1087
- e.hideDropdown ? A("", !0) : (v(), b("svg", it, n[0] || (n[0] = [
1088
- $("path", { d: "m3 6 5 5 5-5" }, null, -1)
1089
- ])))
1090
- ], 10, lt),
1091
- $("div", {
1092
- ref: "menu",
1093
- class: "menu",
1094
- role: "listbox",
1095
- "aria-multiselectable": e.multiple || void 0
1096
- }, [
1097
- e.hasSearch ? (v(), b("div", ut, [
1098
- $("input", {
1099
- ref: "searchInput",
1100
- type: "search",
1101
- class: "form-control combobox-search-input",
1102
- autocomplete: "off",
1103
- placeholder: e.searchPlaceholder ?? e.t("select.search")
1104
- }, null, 8, st)
1105
- ])) : A("", !0),
1106
- e.remote.loading ? (v(), b("div", dt, N(e.loadingText ?? e.t("select.loading")), 1)) : e.remote.error ? (v(), b("div", ct, N(e.t("select.error")), 1)) : A("", !0),
1107
- e.clearable && !e.multiple ? (v(), b("button", ft, [
1108
- $("span", mt, [
1109
- $("span", null, N(e.clearText ?? e.t("select.clear")), 1)
1110
- ])
1111
- ])) : A("", !0),
1112
- (v(!0), b(Y, null, oe(e.rendered, (t) => (v(), b("button", {
1113
- key: t.key,
1114
- type: "button",
1115
- class: "menu-item",
1116
- role: "option",
1117
- "data-bs-value": t.key,
1118
- disabled: t.disabled || void 0
1119
- }, [
1120
- $("span", yt, [
1121
- j(e.$slots, "option", {
1122
- option: t.raw,
1123
- label: t.label,
1124
- description: t.description,
1125
- value: t.key,
1126
- selected: e.selectedSet.has(t.key),
1127
- disabled: t.disabled
1128
- }, () => [
1129
- $("span", null, N(t.label), 1),
1130
- t.description ? (v(), b("span", ht, N(t.description), 1)) : A("", !0)
1131
- ])
1132
- ]),
1133
- n[1] || (n[1] = $("svg", {
1134
- class: "menu-item-check",
1135
- width: "16",
1136
- height: "16",
1137
- viewBox: "0 0 16 16",
1138
- fill: "none",
1139
- stroke: "currentColor",
1140
- "stroke-width": "2",
1141
- "stroke-linecap": "round",
1142
- "stroke-linejoin": "round",
1143
- "aria-hidden": "true"
1144
- }, [
1145
- $("path", { d: "m3.5 8.5 3 3 6-7" })
1146
- ], -1))
1147
- ], 8, pt))), 128)),
1148
- $("div", vt, N(e.noResultsText ?? e.t("select.noResults")), 1)
1149
- ], 8, rt)
1150
- ], 512);
1151
- }
1152
- const _e = /* @__PURE__ */ O(nt, [["render", gt]]);
1153
- function re(e = {}) {
1154
- const n = {
1155
- Accept: "application/json",
1156
- "X-Requested-With": "XMLHttpRequest",
1157
- ...e
1158
- };
1159
- if (typeof document < "u") {
1160
- const o = document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]+)/);
1161
- o && !n["X-XSRF-TOKEN"] && (n["X-XSRF-TOKEN"] = decodeURIComponent(o[1]));
1162
- }
1163
- return n;
1164
- }
1165
- const bt = E({
1166
- name: "DropzoneInput",
1167
- emits: ["update:modelValue", "change", "ready", "added", "success", "error", "removed", "complete"],
1168
- props: {
1169
- ...R,
1170
- multiple: { type: Boolean, default: !1 },
1171
- url: { type: String, default: "/upload" },
1172
- /** Dropzone options (merged over the defaults). */
1173
- options: { type: Object, default: () => ({}) },
1174
- headers: { type: Object, default: () => ({}) },
1175
- locale: { type: String, default: null }
1176
- },
1177
- setup(e, { emit: n, expose: o }) {
1178
- const l = P(e, n), { t: r } = G(() => e.locale), d = ye(), t = B(null);
1179
- let a = null, f = !1;
1180
- const m = () => Array.isArray(l.model.value) ? l.model.value : [];
1181
- return K(async () => {
1182
- const { default: p } = await import("dropzone");
1183
- d.isDisposed() || !t.value || (p.autoDiscover = !1, a = new p(t.value, {
1184
- url: e.url,
1185
- addRemoveLinks: !0,
1186
- maxFiles: e.multiple ? null : 1,
1187
- headers: re(e.headers),
1188
- ...e.options
1189
- }), a.on("addedfile", (h) => n("added", h)), a.on("complete", (h) => n("complete", h)), a.on("error", (h, g) => {
1190
- var c, i;
1191
- let I = r("upload.failed");
1192
- typeof g == "string" && (I = g), g != null && g.message && (I = g.message), (c = h.previewElement) == null || c.classList.add("dz-error");
1193
- const s = (i = h.previewElement) == null ? void 0 : i.querySelector("[data-dz-errormessage]");
1194
- s && (s.textContent = I), n("error", h, I);
1195
- }), a.on("success", (h, g) => {
1196
- const I = (g == null ? void 0 : g.data) ?? g;
1197
- l.model.value = e.multiple ? [...m(), I] : I, l.emitChange(l.model.value), n("success", h, I);
1198
- }), a.on("removedfile", async (h) => {
1199
- var I;
1200
- if (n("removed", h), f) return;
1201
- let g = (I = h.xhr) == null ? void 0 : I.response;
1202
- if (g)
1203
- try {
1204
- g = JSON.parse(g);
1205
- const s = g.data ?? g;
1206
- l.model.value = e.multiple ? m().filter((c) => ((c == null ? void 0 : c.path) ?? c) !== s.path) : null, l.emitChange(l.model.value), await fetch(e.url, {
1207
- method: "DELETE",
1208
- headers: re({ "Content-Type": "application/json", ...e.headers }),
1209
- credentials: "same-origin",
1210
- body: s.path
1211
- });
1212
- } catch (s) {
1213
- console.error("[inertia-bootstrap-forms] Could not delete the uploaded file on the server", s);
1214
- }
1215
- }), d.add(() => {
1216
- f = !0;
1217
- try {
1218
- a == null || a.destroy();
1219
- } catch {
1220
- }
1221
- a = null;
1222
- }), n("ready", a));
1223
- }), q(
1224
- () => l.model.value,
1225
- (p) => {
1226
- var g;
1227
- (p == null || p === "" || Array.isArray(p) && !p.length) && ((g = a == null ? void 0 : a.files) != null && g.length) && (f = !0, a.removeAllFiles(!0), f = !1);
1228
- }
1229
- ), o({ dropzone: () => a }), { ...l, el: t };
1230
- }
1231
- }), $t = ["id"];
1232
- function St(e, n, o, l, r, d) {
1233
- return v(), b("div", {
1234
- ref: "el",
1235
- class: D(["inertia-dropzone-input dropzone", { "is-invalid": e.isInvalid }]),
1236
- id: e.inputId
1237
- }, null, 10, $t);
1238
- }
1239
- const It = /* @__PURE__ */ O(bt, [["render", St]]), Ct = x(() => import("@tinymce/tinymce-vue")), wt = E({
1240
- name: "EditorInput",
1241
- components: { Editor: Ct },
1242
- emits: ["update:modelValue", "change", "init", "focus", "blur"],
1243
- props: {
1244
- ...R,
1245
- placeholder: { type: String, default: "" },
1246
- /** TinyMCE `init` options. */
1247
- options: { type: Object, default: () => ({}) },
1248
- height: { type: [Number, String], default: null },
1249
- /** Self-hosted TinyMCE script (`tinymceScriptSrc`) or Tiny Cloud api key. */
1250
- tinymceScriptSrc: { type: String, default: null },
1251
- apiKey: { type: String, default: null }
1252
- },
1253
- setup(e, { emit: n, expose: o }) {
1254
- const l = P(e, n), r = B(null);
1255
- function d(t, a) {
1256
- var f;
1257
- r.value = a, (f = a.mode) == null || f.set(l.isDisabled.value || e.readonly ? "readonly" : "design"), n("init", a);
1258
- }
1259
- return q(
1260
- () => l.isDisabled.value || e.readonly,
1261
- (t) => {
1262
- var a, f;
1263
- return (f = (a = r.value) == null ? void 0 : a.mode) == null ? void 0 : f.set(t ? "readonly" : "design");
1264
- }
1265
- ), o({ editor: () => r.value }), { ...l, onInit: d };
1266
- }
1267
- });
1268
- function kt(e, n, o, l, r, d) {
1269
- const t = U("Editor");
1270
- return v(), Q(t, {
1271
- modelValue: e.model,
1272
- "onUpdate:modelValue": n[0] || (n[0] = (a) => e.model = a),
1273
- id: e.inputId,
1274
- disabled: e.isDisabled || e.readonly,
1275
- "tinymce-script-src": e.tinymceScriptSrc || void 0,
1276
- "api-key": e.apiKey || void 0,
1277
- init: { placeholder: e.placeholder, ...e.height ? { height: e.height } : {}, ...e.options },
1278
- class: "tiny-editor-input-el",
1279
- onInit: e.onInit,
1280
- onChange: n[1] || (n[1] = (a) => e.emitChange(e.model, a)),
1281
- onFocus: n[2] || (n[2] = (a) => e.$emit("focus", a)),
1282
- onBlur: n[3] || (n[3] = (a) => e.$emit("blur", a))
1283
- }, null, 8, ["modelValue", "id", "disabled", "tinymce-script-src", "api-key", "init", "onInit"]);
1284
- }
1285
- const Mt = /* @__PURE__ */ O(wt, [["render", kt]]), Bt = E({
1286
- name: "TextInput",
1287
- emits: ["update:modelValue", "change", "input", "focus", "blur"],
1288
- props: {
1289
- ...R,
1290
- type: { type: String, default: "text" },
1291
- placeholder: { type: String, default: null },
1292
- /** sm | lg */
1293
- size: { type: String, default: null }
1294
- },
1295
- setup(e, { emit: n }) {
1296
- const o = P(e, n), l = S(() => e.size ? `form-control-${e.size}` : null);
1297
- return { ...o, sizeClass: l, emit: n };
1298
- }
1299
- }), Tt = ["name", "id", "type", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
1300
- function At(e, n, o, l, r, d) {
1301
- return ee((v(), b("input", {
1302
- "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
1303
- name: e.name,
1304
- id: e.inputId,
1305
- type: e.type,
1306
- placeholder: e.placeholder,
1307
- required: e.required,
1308
- readonly: e.readonly,
1309
- disabled: e.isDisabled,
1310
- "aria-invalid": e.isInvalid || void 0,
1311
- class: D(["form-control", [e.sizeClass, { "is-invalid": e.isInvalid }]]),
1312
- onInput: n[1] || (n[1] = (t) => e.emit("input", e.model, t)),
1313
- onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t)),
1314
- onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
1315
- onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
1316
- }, null, 42, Tt)), [
1317
- [me, e.model]
1318
- ]);
1319
- }
1320
- const Ie = /* @__PURE__ */ O(Bt, [["render", At]]), Nt = E({
1321
- name: "EmailInput",
1322
- components: { TextInput: Ie },
1323
- props: {
1324
- name: { type: String, default: "email" },
1325
- placeholder: { type: String, default: null },
1326
- locale: { type: String, default: null }
1327
- },
1328
- setup(e) {
1329
- const { t: n } = G(() => e.locale);
1330
- return { t: n };
1331
- }
1332
- });
1333
- function Et(e, n, o, l, r, d) {
1334
- const t = U("TextInput");
1335
- return v(), Q(t, {
1336
- type: "email",
1337
- autocomplete: "email",
1338
- name: e.name,
1339
- placeholder: e.placeholder ?? e.t("email.placeholder")
1340
- }, null, 8, ["name", "placeholder"]);
1341
- }
1342
- const Ot = /* @__PURE__ */ O(Nt, [["render", Et]]);
1343
- let Vt = 0;
1344
- const Ft = E({
1345
- name: "FileInput",
1346
- emits: ["update:modelValue", "change", "added", "progress", "uploaded", "error", "removed"],
1347
- props: {
1348
- ...R,
1349
- multiple: { type: Boolean, default: !1 },
1350
- endpoint: { type: String, default: "/upload" },
1351
- accept: { type: String, default: null },
1352
- headers: { type: Object, default: () => ({}) },
1353
- /** Name of the multipart field. */
1354
- fieldName: { type: String, default: "file" },
1355
- locale: { type: String, default: null }
1356
- },
1357
- setup(e, { emit: n, expose: o }) {
1358
- const l = P(e, n), { t: r } = G(() => e.locale), d = ye(), t = B(null), a = B([]), f = /* @__PURE__ */ new Map();
1359
- d.add(() => {
1360
- f.forEach((i) => i.abort()), f.clear(), l.form.value && (l.form.value.uploading = null);
1361
- });
1362
- const m = () => a.value.filter((i) => i.path).map((i) => i.path);
1363
- function p(i) {
1364
- const u = e.multiple ? m() : m()[0] ?? null;
1365
- l.model.value = u, l.emitChange(u, i);
1366
- }
1367
- function h() {
1368
- const i = l.form.value;
1369
- if (!i) return;
1370
- const u = a.value.filter((w) => w.uploading);
1371
- i.uploading = u.length ? Math.min(99, Math.round(u.reduce((w, k) => w + k.percent, 0) / u.length)) : null;
1372
- }
1373
- function g(i) {
1374
- i.error = "", i.percent = 0, i.uploading = !0, h();
1375
- const u = new FormData();
1376
- u.append(e.fieldName, i.file);
1377
- const w = new XMLHttpRequest();
1378
- f.set(i.id, w), w.open("POST", e.endpoint), Object.entries(re(e.headers)).forEach(([T, M]) => w.setRequestHeader(T, M)), w.upload.onprogress = (T) => {
1379
- T.lengthComputable && (i.percent = Math.round(T.loaded / T.total * 100), n("progress", i, i.percent), h());
1380
- };
1381
- const k = (T) => {
1382
- i.uploading = !1, i.error = T || r("upload.failed"), f.delete(i.id), h(), n("error", i, i.error);
1383
- };
1384
- w.onerror = () => k(), w.onload = () => {
1385
- var L;
1386
- let T = null;
1387
- try {
1388
- T = JSON.parse(w.responseText);
1389
- } catch {
1390
- }
1391
- if (w.status < 200 || w.status >= 300) {
1392
- const z = T != null && T.errors ? Object.values(T.errors)[0] : null;
1393
- return k((T == null ? void 0 : T.message) || (Array.isArray(z) ? z[0] : z));
1394
- }
1395
- const M = ((L = T == null ? void 0 : T.data) == null ? void 0 : L.path) ?? (T == null ? void 0 : T.path);
1396
- if (!M) return k();
1397
- i.path = M, i.percent = 100, i.uploading = !1, f.delete(i.id), h(), p(), n("uploaded", i);
1398
- }, w.send(u);
1399
- }
1400
- function I(i) {
1401
- const u = $e({ id: `f${++Vt}`, file: i, percent: 0, error: "", path: null, uploading: !1 });
1402
- a.value = e.multiple ? [...a.value, u] : [u], n("added", u), g(u);
1403
- }
1404
- function s(i) {
1405
- Array.from(i.target.files).forEach(I), i.target.value = "";
1406
- }
1407
- async function c(i) {
1408
- var u;
1409
- if ((u = f.get(i.id)) == null || u.abort(), f.delete(i.id), a.value = a.value.filter((w) => w.id !== i.id), h(), i.path) {
1410
- p();
1411
- try {
1412
- await fetch(e.endpoint, {
1413
- method: "DELETE",
1414
- headers: re(e.headers),
1415
- credentials: "same-origin",
1416
- body: i.path
1417
- });
1418
- } catch {
1419
- }
1420
- }
1421
- n("removed", i);
1422
- }
1423
- return q(
1424
- () => l.model.value,
1425
- (i) => {
1426
- (i == null || i === "" || Array.isArray(i) && !i.length) && a.value.some((w) => w.path) && (a.value = a.value.filter((w) => !w.path));
1427
- }
1428
- ), o({ clear: () => a.value.slice().forEach(c) }), { ...l, t: r, input: t, files: a, onSelect: s, remove: c, retry: g, size: (i) => `${Math.round(i / 1024)}KB` };
1429
- }
1430
- }), Dt = { class: "file-input-uploader" }, Lt = ["name", "id", "multiple", "accept", "required", "disabled", "aria-invalid"], zt = {
1431
- key: 0,
1432
- class: "list-group mt-2"
1433
- }, qt = { class: "d-flex align-items-center justify-content-between gap-2" }, Rt = { class: "text-truncate" }, Pt = { class: "d-flex align-items-center gap-2" }, jt = {
1434
- class: "fg-secondary fanum",
1435
- dir: "ltr"
1436
- }, Ut = ["aria-label", "onClick"], Kt = ["aria-label", "onClick"], Gt = ["aria-valuenow"], Ht = {
1437
- key: 1,
1438
- class: "fg-danger mt-1",
1439
- role: "alert"
1440
- };
1441
- function Xt(e, n, o, l, r, d) {
1442
- return v(), b("div", Dt, [
1443
- $("input", {
1444
- ref: "input",
1445
- type: "file",
1446
- class: D(["form-control", { "is-invalid": e.isInvalid }]),
1447
- name: e.name,
1448
- id: e.inputId,
1449
- multiple: e.multiple,
1450
- accept: e.accept || void 0,
1451
- required: e.required && !e.files.length,
1452
- disabled: e.isDisabled || e.readonly,
1453
- "aria-invalid": e.isInvalid || void 0,
1454
- onChange: n[0] || (n[0] = (...t) => e.onSelect && e.onSelect(...t))
1455
- }, null, 42, Lt),
1456
- e.files.length ? (v(), b("ul", zt, [
1457
- (v(!0), b(Y, null, oe(e.files, (t) => (v(), b("li", {
1458
- key: t.id,
1459
- class: "list-group-item"
1460
- }, [
1461
- $("div", qt, [
1462
- $("span", Rt, N(t.file.name), 1),
1463
- $("span", Pt, [
1464
- $("span", jt, N(e.size(t.file.size)), 1),
1465
- t.error ? (v(), b("button", {
1466
- key: 0,
1467
- type: "button",
1468
- class: "btn-text theme-secondary btn-icon",
1469
- "aria-label": e.t("file.retry"),
1470
- onClick: (a) => e.retry(t)
1471
- }, n[1] || (n[1] = [
1472
- $("svg", {
1473
- width: "16",
1474
- height: "16",
1475
- viewBox: "0 0 16 16",
1476
- fill: "none",
1477
- stroke: "currentColor",
1478
- "stroke-width": "1.5",
1479
- "stroke-linecap": "round",
1480
- "stroke-linejoin": "round",
1481
- "aria-hidden": "true"
1482
- }, [
1483
- $("path", { d: "M13.5 3v3.5H10" }),
1484
- $("path", { d: "M3.2 6.5A5.5 5.5 0 0 1 13 6.5M12.8 9.5A5.5 5.5 0 0 1 3 9.5M2.5 13V9.5H6" })
1485
- ], -1)
1486
- ]), 8, Ut)) : A("", !0),
1487
- t.path || t.error ? (v(), b("button", {
1488
- key: 1,
1489
- type: "button",
1490
- class: "btn-text theme-danger btn-icon",
1491
- "aria-label": e.t("file.remove"),
1492
- onClick: (a) => e.remove(t)
1493
- }, n[2] || (n[2] = [
1494
- $("svg", {
1495
- width: "16",
1496
- height: "16",
1497
- viewBox: "0 0 16 16",
1498
- fill: "none",
1499
- stroke: "currentColor",
1500
- "stroke-width": "1.5",
1501
- "stroke-linecap": "round",
1502
- "aria-hidden": "true"
1503
- }, [
1504
- $("path", { d: "m4 4 8 8M12 4l-8 8" })
1505
- ], -1)
1506
- ]), 8, Kt)) : A("", !0)
1507
- ])
1508
- ]),
1509
- t.uploading ? (v(), b("div", {
1510
- key: 0,
1511
- class: "progress mt-2",
1512
- role: "progressbar",
1513
- "aria-valuenow": t.percent,
1514
- "aria-valuemin": "0",
1515
- "aria-valuemax": "100"
1516
- }, [
1517
- $("div", {
1518
- class: "progress-bar",
1519
- style: le({ width: t.percent + "%" })
1520
- }, null, 4)
1521
- ], 8, Gt)) : A("", !0),
1522
- t.error ? (v(), b("div", Ht, N(t.error), 1)) : A("", !0)
1523
- ]))), 128))
1524
- ])) : A("", !0)
1525
- ]);
1526
- }
1527
- const en = /* @__PURE__ */ O(Ft, [["render", Xt]]), Jt = E({
1528
- name: "FormAdornInput",
1529
- inheritAttrs: !1,
1530
- emits: ["update:modelValue", "change", "input", "focus", "blur"],
1531
- props: {
1532
- ...R,
1533
- type: { type: String, default: "text" },
1534
- placeholder: { type: String, default: null },
1535
- /** Text shown before the input. */
1536
- startText: { type: String, default: null },
1537
- /** Text shown after the input. */
1538
- endText: { type: String, default: null },
1539
- size: { type: String, default: null }
1540
- },
1541
- setup(e, { emit: n }) {
1542
- const o = P(e, n), l = B(null), r = S(() => e.size ? `form-control-${e.size}` : null);
1543
- function d(t) {
1544
- var a, f, m;
1545
- (t.target === t.currentTarget || (f = (a = t.target).closest) != null && f.call(a, ".form-adorn-icon, .form-adorn-text")) && ((m = l.value) == null || m.focus());
1546
- }
1547
- return { ...o, input: l, sizeClass: r, focusInput: d, emit: n, focus: () => {
1548
- var t;
1549
- return (t = l.value) == null ? void 0 : t.focus();
1550
- } };
1551
- },
1552
- expose: ["focus"]
1553
- }), Wt = {
1554
- key: 0,
1555
- class: "form-adorn-text"
1556
- }, Zt = ["name", "id", "type", "placeholder", "required", "readonly", "disabled", "aria-invalid"], Yt = {
1557
- key: 0,
1558
- class: "form-adorn-text"
1559
- };
1560
- function Qt(e, n, o, l, r, d) {
1561
- return v(), b("div", {
1562
- class: D(["form-control form-adorn", [e.sizeClass, { "is-invalid": e.isInvalid }, e.$attrs.class]]),
1563
- style: le(e.$attrs.style),
1564
- onClick: n[5] || (n[5] = (...t) => e.focusInput && e.focusInput(...t))
1565
- }, [
1566
- j(e.$slots, "start", {}, () => [
1567
- e.startText ? (v(), b("span", Wt, N(e.startText), 1)) : A("", !0)
1568
- ]),
1569
- ee($("input", ve({
1570
- ref: "input",
1571
- "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t)
1572
- }, { ...e.$attrs, class: void 0, style: void 0 }, {
1573
- name: e.name,
1574
- id: e.inputId,
1575
- type: e.type,
1576
- placeholder: e.placeholder,
1577
- required: e.required,
1578
- readonly: e.readonly,
1579
- disabled: e.isDisabled,
1580
- "aria-invalid": e.isInvalid || void 0,
1581
- class: ["form-ghost", { "is-invalid": e.isInvalid }],
1582
- onInput: n[1] || (n[1] = (t) => e.emit("input", e.model, t)),
1583
- onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t)),
1584
- onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
1585
- onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
1586
- }), null, 16, Zt), [
1587
- [me, e.model]
1588
- ]),
1589
- j(e.$slots, "end", {}, () => [
1590
- e.endText ? (v(), b("span", Yt, N(e.endText), 1)) : A("", !0)
1591
- ])
1592
- ], 6);
1593
- }
1594
- const De = /* @__PURE__ */ O(Jt, [["render", Qt]]), xt = (e) => e !== null && typeof e == "object" && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null);
1595
- function Ve(e) {
1596
- return typeof e == "string" ? Fe(e) : Array.isArray(e) ? e.map(Ve) : xt(e) ? Object.keys(e).reduce((n, o) => (n[o] = Ve(e[o]), n), {}) : e;
1597
- }
1598
- function Xe(e, n) {
1599
- try {
1600
- return JSON.stringify(e) === JSON.stringify(n);
1601
- } catch {
1602
- return !1;
1603
- }
1604
- }
1605
- const _t = E({
1606
- name: "FormContainer",
1607
- emits: [
1608
- "update:modelValue",
1609
- "change",
1610
- "submit",
1611
- "reset",
1612
- "before",
1613
- "start",
1614
- "progress",
1615
- "success",
1616
- "error",
1617
- "cancel",
1618
- "finish",
1619
- // Legacy (v2) event names
1620
- "onStart",
1621
- "onFinish",
1622
- "onSuccess",
1623
- "onError"
1624
- ],
1625
- props: {
1626
- /** The object that holds the value of every field (v-model). */
1627
- modelValue: { type: Object, default: () => ({}) },
1628
- url: { type: String, default: "" },
1629
- method: { type: String, default: "post" },
1630
- /** Only reload these props after a successful visit (Inertia `only`). */
1631
- only: { type: Array, default: () => [] },
1632
- /** Extra form fields that are not part of `modelValue`. */
1633
- options: { type: Object, default: () => ({}) },
1634
- /** Extra Inertia visit options (preserveScroll, preserveState, headers, …). */
1635
- visitOptions: { type: Object, default: () => ({}) },
1636
- autoTab: { type: Boolean, default: !0 },
1637
- resetOnSuccess: { type: Boolean, default: !1 },
1638
- /** Replace the default submit behaviour. Receives (event, form). */
1639
- submitHandler: { type: Function, default: null },
1640
- /** Convert Persian/Arabic digits to English digits before submitting. */
1641
- normalizeDigits: { type: Boolean, default: !0 },
1642
- /** Enable Bootstrap 6 client-side validation (`data-bs-validate`). */
1643
- validate: { type: Boolean, default: !1 },
1644
- /** Render server messages as HTML (only enable for trusted messages). */
1645
- htmlMessages: { type: Boolean, default: !1 },
1646
- /** Hide the built-in error / success alerts. */
1647
- hideAlerts: { type: Boolean, default: !1 }
1648
- },
1649
- setup(e, { emit: n, expose: o }) {
1650
- const l = B(null), r = $e({ hasMessage: !1, successMessage: null }), d = pn({
1651
- ...e.options,
1652
- ...e.modelValue
1653
- });
1654
- d.uploading = null, d.getID = function(s = {}) {
1655
- var i;
1656
- const c = [];
1657
- return (i = l.value) != null && i.id && c.push(l.value.id), typeof s == "string" && c.push(s), s.group && (s.group.name && c.push(s.group.name), s.group.index !== void 0 && s.group.index !== null && c.push(s.group.index)), s.name && c.push(s.name), s.value !== void 0 && s.value !== null && s.value !== "" && c.push(s.value), c.join("-");
1658
- };
1659
- const t = new Set(Object.keys(d)), a = () => Object.keys(d).filter((s) => !t.has(s) && typeof d[s] != "function" && d[s] !== void 0), f = () => {
1660
- const s = typeof d.data == "function" ? { ...d.data() } : Object.keys(d).reduce((c, i) => (t.has(i) && typeof d[i] != "function" && (c[i] = d[i]), c), {});
1661
- return a().forEach((c) => {
1662
- s[c] = d[c];
1663
- }), s;
1664
- }, m = () => {
1665
- a().forEach((s) => delete d[s]), d.reset();
1666
- };
1667
- q(
1668
- () => f(),
1669
- (s) => {
1670
- n("change", s), n("update:modelValue", s);
1671
- },
1672
- { deep: !0 }
1673
- ), q(
1674
- () => e.modelValue,
1675
- (s) => {
1676
- !s || Xe(s, f()) || Object.keys(s).forEach((c) => {
1677
- Xe(d[c], s[c]) || (d[c] = s[c]);
1678
- });
1679
- },
1680
- { deep: !0 }
1681
- );
1682
- function p(s) {
1683
- const c = Array.from(l.value.querySelectorAll("input, select, textarea")).filter(
1684
- (u) => !u.disabled && u.tabIndex !== -1 && u.type !== "hidden" && u.offsetParent !== null
1685
- ), i = c[c.indexOf(s) + 1];
1686
- i && (i.focus(), i.tagName !== "SELECT" && typeof i.select == "function" && i.select());
1687
- }
1688
- function h(s) {
1689
- const c = s.target;
1690
- if (!["INPUT", "TEXTAREA"].includes(c.tagName)) return;
1691
- e.autoTab && c.maxLength > 0 && c.value.length >= c.maxLength && p(c);
1692
- const i = parseInt(c.dataset.autoSubmitLength, 10);
1693
- !isNaN(i) && c.value.length >= i && I();
1694
- }
1695
- function g() {
1696
- m(), d.clearErrors(), r.hasMessage = !1, r.successMessage = null, n("reset");
1697
- }
1698
- async function I(s) {
1699
- if (e.submitHandler)
1700
- return e.submitHandler(s, d);
1701
- n("submit", s), d.transform((c) => {
1702
- const i = { ...e.modelValue, ...c, ...f() };
1703
- return e.normalizeDigits ? Ve(i) : i;
1704
- }).submit((e.method || "post").toString().toLowerCase(), e.url, {
1705
- only: e.only,
1706
- ...e.visitOptions,
1707
- onBefore: (c) => {
1708
- var i, u;
1709
- return n("before", c), (u = (i = e.visitOptions).onBefore) == null ? void 0 : u.call(i, c);
1710
- },
1711
- onStart: (c) => {
1712
- var i, u;
1713
- r.hasMessage = !1, r.successMessage = null, d.clearErrors(), n("start", c), n("onStart", c), (u = (i = e.visitOptions).onStart) == null || u.call(i, c);
1714
- },
1715
- onProgress: (c) => {
1716
- var i, u;
1717
- n("progress", c), (u = (i = e.visitOptions).onProgress) == null || u.call(i, c);
1718
- },
1719
- onCancel: () => {
1720
- var c, i;
1721
- n("cancel"), (i = (c = e.visitOptions).onCancel) == null || i.call(c);
1722
- },
1723
- onFinish: (c) => {
1724
- var i, u;
1725
- n("finish", c), n("onFinish", c), (u = (i = e.visitOptions).onFinish) == null || u.call(i, c);
1726
- },
1727
- onError: (c) => {
1728
- var i, u;
1729
- n("error", c), n("onError", c), (u = (i = e.visitOptions).onError) == null || u.call(i, c);
1730
- },
1731
- onSuccess: (c) => {
1732
- var i, u, w;
1733
- e.resetOnSuccess && m(), (i = c == null ? void 0 : c.props) != null && i.message && (r.hasMessage = !0, r.successMessage = c.props.message), n("success", c), n("onSuccess", c), (w = (u = e.visitOptions).onSuccess) == null || w.call(u, c);
1734
- }
1735
- });
1736
- }
1737
- return ge("form", S(() => d)), ge("formApi", { submit: I, reset: g, el: l }), o({ submit: I, reset: g, form: d, el: l }), { form: d, formEl: l, ui: r, handleInput: h, reset: g, submit: I };
1738
- }
1739
- }), el = ["action", "method", "data-bs-validate", "novalidate"], nl = {
1740
- key: 0,
1741
- class: "alert theme-danger",
1742
- role: "alert"
1743
- }, tl = { class: "list-unstyled p-0 m-0 fanum" }, ll = ["innerHTML"], ol = {
1744
- key: 0,
1745
- class: "alert theme-success",
1746
- role: "status"
1747
- }, al = ["innerHTML"], il = { key: 1 };
1748
- function rl(e, n, o, l, r, d) {
1749
- return v(), b("form", {
1750
- ref: "formEl",
1751
- action: e.url || void 0,
1752
- method: e.method,
1753
- "data-bs-validate": e.validate ? "" : void 0,
1754
- novalidate: !e.validate || e.form.hasErrors ? !0 : void 0,
1755
- class: D({ "form-processing": e.form.processing }),
1756
- onInput: n[0] || (n[0] = (...t) => e.handleInput && e.handleInput(...t)),
1757
- onSubmit: n[1] || (n[1] = Ue((...t) => e.submit && e.submit(...t), ["prevent"])),
1758
- onReset: n[2] || (n[2] = Ue((...t) => e.reset && e.reset(...t), ["prevent"]))
1759
- }, [
1760
- e.hideAlerts ? A("", !0) : (v(), b(Y, { key: 0 }, [
1761
- j(e.$slots, "errors", {
1762
- errors: e.form.errors,
1763
- form: e.form
1764
- }, () => [
1765
- e.form.hasErrors ? (v(), b("div", nl, [
1766
- $("ul", tl, [
1767
- (v(!0), b(Y, null, oe(e.form.errors, (t, a) => (v(), b("li", { key: a }, [
1768
- e.htmlMessages ? (v(), b("span", {
1769
- key: 0,
1770
- innerHTML: t
1771
- }, null, 8, ll)) : (v(), b(Y, { key: 1 }, [
1772
- ue(N(t), 1)
1773
- ], 64))
1774
- ]))), 128))
1775
- ])
1776
- ])) : A("", !0)
1777
- ]),
1778
- j(e.$slots, "message", {
1779
- message: e.ui.successMessage
1780
- }, () => [
1781
- e.ui.hasMessage && e.ui.successMessage ? (v(), b("div", ol, [
1782
- e.htmlMessages ? (v(), b("span", {
1783
- key: 0,
1784
- innerHTML: e.ui.successMessage
1785
- }, null, 8, al)) : (v(), b("span", il, N(e.ui.successMessage), 1))
1786
- ])) : A("", !0)
1787
- ])
1788
- ], 64)),
1789
- j(e.$slots, "default", {
1790
- form: e.form,
1791
- submit: e.submit,
1792
- reset: e.reset
1793
- })
1794
- ], 42, el);
1795
- }
1796
- const ul = /* @__PURE__ */ O(_t, [["render", rl]]), sl = E({
1797
- name: "FormLabel",
1798
- props: {
1799
- /** id of the control. Detected automatically inside <FormField> or from the next element. */
1800
- for: { type: String, default: null },
1801
- required: { type: Boolean, default: !1 }
1802
- },
1803
- setup(e) {
1804
- const n = Z("formField", null), o = B(null), l = B(null);
1805
- K(() => {
1806
- var t, a;
1807
- if (e.for || n != null && n.id) return;
1808
- const d = (t = o.value) == null ? void 0 : t.nextElementSibling;
1809
- d && (l.value = d.id || ((a = d.querySelector("[id]")) == null ? void 0 : a.id) || null);
1810
- });
1811
- const r = S(() => e.for || (n == null ? void 0 : n.id) || l.value || void 0);
1812
- return { el: o, target: r };
1813
- }
1814
- }), dl = ["for"], cl = {
1815
- key: 0,
1816
- class: "fg-danger",
1817
- "aria-hidden": "true"
1818
- };
1819
- function fl(e, n, o, l, r, d) {
1820
- return v(), b("label", {
1821
- ref: "el",
1822
- class: "form-label",
1823
- for: e.target
1824
- }, [
1825
- j(e.$slots, "default"),
1826
- e.required ? (v(), b("span", cl, " *")) : A("", !0)
1827
- ], 8, dl);
1828
- }
1829
- const nn = /* @__PURE__ */ O(sl, [["render", fl]]);
1830
- let ml = 0;
1831
- const pl = E({
1832
- name: "FormField",
1833
- components: { FormLabel: nn },
1834
- props: {
1835
- /** Field key. Used to read the server-side error of the field. */
1836
- name: { type: String, default: null },
1837
- label: { type: String, default: null },
1838
- help: { type: String, default: null },
1839
- /** Override the error text (otherwise it is read from the form errors). */
1840
- error: { type: String, default: null },
1841
- required: { type: Boolean, default: !1 },
1842
- id: { type: String, default: null }
1843
- },
1844
- setup(e) {
1845
- const n = Z("form", null), o = he.useId ? he.useId() : `ff-${++ml}`, l = S(() => e.id || (e.name ? `${e.name}-${o}` : o));
1846
- ge("formField", {
1847
- get id() {
1848
- return l.value;
1849
- },
1850
- get name() {
1851
- return e.name;
1852
- }
1853
- });
1854
- const r = S(() => {
1855
- var d, t;
1856
- return e.error ?? (e.name ? (t = (d = n == null ? void 0 : n.value) == null ? void 0 : d.errors) == null ? void 0 : t[e.name] : null) ?? null;
1857
- });
1858
- return { fieldId: l, errorText: r };
1859
- }
1860
- }), yl = { class: "form-field" }, hl = ["id"], vl = ["id"];
1861
- function gl(e, n, o, l, r, d) {
1862
- const t = U("FormLabel");
1863
- return v(), b("div", yl, [
1864
- j(e.$slots, "label", {}, () => [
1865
- e.label ? (v(), Q(t, {
1866
- key: 0,
1867
- for: e.fieldId,
1868
- required: e.required
1869
- }, {
1870
- default: pe(() => [
1871
- ue(N(e.label), 1)
1872
- ]),
1873
- _: 1
1874
- }, 8, ["for", "required"])) : A("", !0)
1875
- ]),
1876
- j(e.$slots, "default"),
1877
- j(e.$slots, "help", {}, () => [
1878
- e.help ? (v(), b("div", {
1879
- key: 0,
1880
- id: e.fieldId + "-help",
1881
- class: "form-text"
1882
- }, N(e.help), 9, hl)) : A("", !0)
1883
- ]),
1884
- j(e.$slots, "error", { error: e.errorText }, () => [
1885
- e.errorText ? (v(), b("div", {
1886
- key: 0,
1887
- id: e.fieldId + "-error",
1888
- class: "invalid-feedback d-block",
1889
- role: "alert"
1890
- }, N(e.errorText), 9, vl)) : A("", !0)
1891
- ])
1892
- ]);
1893
- }
1894
- const bl = /* @__PURE__ */ O(pl, [["render", gl]]), $l = E({
1895
- name: "GroupControl",
1896
- props: {
1897
- /** Key of the object / array inside the form that holds the grouped values. */
1898
- name: { type: String, required: !0 },
1899
- /** Explicit item index (repeaters). When omitted it is detected from the DOM position. */
1900
- index: { type: [Number, String], default: null }
1901
- },
1902
- setup(e) {
1903
- const n = Z("form", null), o = B(null), l = B("0"), r = S(() => e.index !== null ? String(e.index) : l.value);
1904
- K(() => {
1905
- var a, f, m;
1906
- if (e.index !== null) return;
1907
- const t = (m = (f = (a = o.value) == null ? void 0 : a.parentNode) == null ? void 0 : f.parentNode) == null ? void 0 : m.querySelectorAll(".form-control-group");
1908
- t == null || t.forEach((p, h) => {
1909
- p === o.value && (l.value = String(h));
1910
- });
1911
- });
1912
- const d = {
1913
- get name() {
1914
- return e.name;
1915
- },
1916
- get index() {
1917
- return r.value;
1918
- },
1919
- getData(t) {
1920
- var f, m;
1921
- const a = (f = n == null ? void 0 : n.value) == null ? void 0 : f[e.name];
1922
- return a == null ? null : Array.isArray(a) ? ((m = a[Number(r.value)]) == null ? void 0 : m[t]) ?? null : a[t] ?? null;
1923
- },
1924
- setData(t, a) {
1925
- const f = n == null ? void 0 : n.value;
1926
- if (f)
1927
- if ((f[e.name] === null || f[e.name] === void 0) && (f[e.name] = e.index !== null ? [] : {}), Array.isArray(f[e.name])) {
1928
- const m = Number(r.value);
1929
- f[e.name][m] || (f[e.name][m] = {}), f[e.name][m][t] = a;
1930
- } else
1931
- f[e.name][t] = a;
1932
- }
1933
- };
1934
- return ge("group", S(() => d)), { groupEl: o, index: r };
1935
- }
1936
- }), Sl = ["data-name", "data-group-id"];
1937
- function Il(e, n, o, l, r, d) {
1938
- return v(), b("div", {
1939
- ref: "groupEl",
1940
- class: "form-control-group",
1941
- "data-name": e.name,
1942
- "data-group-id": e.index
1943
- }, [
1944
- j(e.$slots, "default")
1945
- ], 8, Sl);
1946
- }
1947
- const tn = /* @__PURE__ */ O($l, [["render", Il]]), Cl = x(() => import("@vue-leaflet/vue-leaflet").then((e) => e.LMap)), wl = x(() => import("@vue-leaflet/vue-leaflet").then((e) => e.LTileLayer)), kl = x(() => import("@vue-leaflet/vue-leaflet").then((e) => e.LMarker)), Ml = E({
1948
- name: "LocationInput",
1949
- components: { LMap: Cl, LTileLayer: wl, LMarker: kl },
1950
- emits: ["update:modelValue", "change", "ready"],
1951
- props: {
1952
- ...R,
1953
- name: { type: String, default: "location" },
1954
- /** Initial map centre when there is no value yet. */
1955
- center: { type: Object, default: () => ({ lat: 35.69293, lng: 51.36372 }) },
1956
- zoom: { type: Number, default: 13 },
1957
- height: { type: [Number, String], default: 300 },
1958
- tileUrl: { type: String, default: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" },
1959
- attribution: { type: String, default: "&copy; OpenStreetMap contributors" }
1960
- },
1961
- setup(e, { emit: n }) {
1962
- const o = P(e, n), l = B(!1), r = B(e.zoom);
1963
- K(() => {
1964
- l.value = !0;
1965
- });
1966
- const d = S(() => {
1967
- const m = o.model.value;
1968
- return (m == null ? void 0 : m.lat) !== void 0 && (m == null ? void 0 : m.lat) !== null && (m == null ? void 0 : m.lng) !== void 0 && (m == null ? void 0 : m.lng) !== null ? { lat: Number(m.lat), lng: Number(m.lng) } : null;
1969
- }), t = S(() => d.value ?? e.center), a = S(() => e.readonly || o.isDisabled.value);
1970
- q(() => e.zoom, (m) => r.value = m);
1971
- function f(m) {
1972
- var g;
1973
- if (a.value) return;
1974
- const p = (m == null ? void 0 : m.latlng) ?? ((g = m == null ? void 0 : m.target) == null ? void 0 : g._latlng);
1975
- if (!p) return;
1976
- const h = { lat: p.lat, lng: p.lng };
1977
- o.model.value = h, o.emitChange(h, m);
1978
- }
1979
- return {
1980
- ...o,
1981
- ready: l,
1982
- zoomLevel: r,
1983
- marker: d,
1984
- mapCenter: t,
1985
- locked: a,
1986
- setMarker: f,
1987
- heightCss: S(() => typeof e.height == "number" ? `${e.height}px` : e.height)
1988
- };
1989
- }
1990
- }), Bl = ["id"];
1991
- function Tl(e, n, o, l, r, d) {
1992
- const t = U("l-tile-layer"), a = U("l-marker"), f = U("l-map");
1993
- return v(), b("div", {
1994
- class: D(["location-map-container position-relative overflow-hidden", { disabled: e.locked, "is-invalid": e.isInvalid }]),
1995
- id: e.inputId,
1996
- style: le({ width: "100%", height: e.heightCss })
1997
- }, [
1998
- e.ready ? (v(), Q(f, {
1999
- key: 0,
2000
- zoom: e.zoomLevel,
2001
- "onUpdate:zoom": n[0] || (n[0] = (m) => e.zoomLevel = m),
2002
- "use-global-leaflet": !1,
2003
- center: e.mapCenter,
2004
- onClick: e.setMarker,
2005
- onReady: n[1] || (n[1] = (m) => e.$emit("ready", m))
2006
- }, {
2007
- default: pe(() => [
2008
- te(t, {
2009
- url: e.tileUrl,
2010
- attribution: e.attribution,
2011
- "layer-type": "base",
2012
- name: "OpenStreetMap"
2013
- }, null, 8, ["url", "attribution"]),
2014
- e.marker ? (v(), Q(a, {
2015
- key: 0,
2016
- "lat-lng": e.marker,
2017
- draggable: !e.locked,
2018
- onDragend: e.setMarker
2019
- }, null, 8, ["lat-lng", "draggable", "onDragend"])) : A("", !0)
2020
- ]),
2021
- _: 1
2022
- }, 8, ["zoom", "center", "onClick"])) : A("", !0)
2023
- ], 14, Bl);
2024
- }
2025
- const Al = /* @__PURE__ */ O(Ml, [["render", Tl]]), Nl = E({
2026
- name: "MobileInput",
2027
- components: { TextInput: Ie },
2028
- props: {
2029
- name: { type: String, default: "mobile" },
2030
- placeholder: { type: String, default: null },
2031
- locale: { type: String, default: null }
2032
- },
2033
- setup(e) {
2034
- const { t: n } = G(() => e.locale);
2035
- return { t: n };
2036
- }
2037
- });
2038
- function El(e, n, o, l, r, d) {
2039
- const t = U("TextInput");
2040
- return v(), Q(t, {
2041
- type: "tel",
2042
- inputmode: "tel",
2043
- autocomplete: "tel",
2044
- class: "form-control-mobile fanum",
2045
- name: e.name,
2046
- placeholder: e.placeholder ?? e.t("mobile.placeholder")
2047
- }, null, 8, ["name", "placeholder"]);
2048
- }
2049
- const Ol = /* @__PURE__ */ O(Nl, [["render", El]]), Vl = E({
2050
- name: "QuantityInput",
2051
- emits: ["update:modelValue", "change", "input", "increment", "decrement", "focus", "blur"],
2052
- props: {
2053
- ...R,
2054
- min: { type: Number, default: 0 },
2055
- max: { type: Number, default: null },
2056
- step: { type: Number, default: 1 },
2057
- unit: { type: String, default: null },
2058
- size: { type: String, default: null },
2059
- locale: { type: String, default: null }
2060
- },
2061
- setup(e, { emit: n }) {
2062
- const o = P(e, n), { t: l } = G(() => e.locale), r = S(() => {
2063
- const g = Number(o.model.value);
2064
- return Number.isFinite(g) ? g : e.min;
2065
- }), d = S(() => e.unit ?? l("quantity.unit")), t = S(() => be(r.value)), a = S(() => e.readonly || o.isDisabled.value), f = S(() => !a.value && (e.max === null || r.value + e.step <= e.max)), m = S(() => !a.value && r.value - e.step >= e.min);
2066
- function p(g, I, s) {
2067
- let c = g;
2068
- e.max !== null && (c = Math.min(c, e.max)), c = Math.max(c, e.min), o.model.value = c, s && n(s, c), o.emitChange(c, I);
2069
- }
2070
- function h(g) {
2071
- const I = xe(g.target.value);
2072
- o.model.value = I === null ? e.min : I, g.target.value = be(o.model.value), n("input", o.model.value, g);
2073
- }
2074
- return K(() => {
2075
- const g = o.model.value;
2076
- (g == null || g === "") && (o.model.value = e.min);
2077
- }), {
2078
- ...o,
2079
- t: l,
2080
- unitText: d,
2081
- display: t,
2082
- canIncrement: f,
2083
- canDecrement: m,
2084
- lock: a,
2085
- increment: (g) => f.value && p(r.value + e.step, g, "increment"),
2086
- decrement: (g) => m.value && p(r.value - e.step, g, "decrement"),
2087
- onInput: h,
2088
- clampOnBlur: (g) => p(r.value, g)
2089
- };
2090
- }
2091
- }), Fl = ["disabled", "aria-label"], Dl = ["name", "id", "value", "readonly", "disabled", "aria-invalid"], Ll = ["disabled", "aria-label"], zl = {
2092
- key: 0,
2093
- class: "input-group-text fanum"
2094
- };
2095
- function ql(e, n, o, l, r, d) {
2096
- return v(), b("div", {
2097
- class: D(["input-group input-group-quantity", { "is-invalid": e.isInvalid }])
2098
- }, [
2099
- $("button", {
2100
- type: "button",
2101
- class: "btn-outline theme-secondary btn-icon",
2102
- disabled: !e.canIncrement,
2103
- "aria-label": e.t("quantity.increase"),
2104
- onClick: n[0] || (n[0] = (...t) => e.increment && e.increment(...t))
2105
- }, n[6] || (n[6] = [
2106
- $("svg", {
2107
- width: "14",
2108
- height: "14",
2109
- viewBox: "0 0 16 16",
2110
- fill: "none",
2111
- stroke: "currentColor",
2112
- "stroke-width": "2",
2113
- "stroke-linecap": "round",
2114
- "aria-hidden": "true"
2115
- }, [
2116
- $("path", { d: "M8 3v10M3 8h10" })
2117
- ], -1)
2118
- ]), 8, Fl),
2119
- $("input", {
2120
- name: e.name,
2121
- id: e.inputId,
2122
- value: e.display,
2123
- readonly: e.readonly,
2124
- disabled: e.isDisabled,
2125
- "aria-invalid": e.isInvalid || void 0,
2126
- type: "tel",
2127
- inputmode: "numeric",
2128
- autocomplete: "off",
2129
- class: D(["form-control fanum text-center", { "is-invalid": e.isInvalid }]),
2130
- onInput: n[1] || (n[1] = (...t) => e.onInput && e.onInput(...t)),
2131
- onChange: n[2] || (n[2] = (...t) => e.clampOnBlur && e.clampOnBlur(...t)),
2132
- onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
2133
- onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
2134
- }, null, 42, Dl),
2135
- $("button", {
2136
- type: "button",
2137
- class: "btn-outline theme-secondary btn-icon",
2138
- disabled: !e.canDecrement,
2139
- "aria-label": e.t("quantity.decrease"),
2140
- onClick: n[5] || (n[5] = (...t) => e.decrement && e.decrement(...t))
2141
- }, n[7] || (n[7] = [
2142
- $("svg", {
2143
- width: "14",
2144
- height: "14",
2145
- viewBox: "0 0 16 16",
2146
- fill: "none",
2147
- stroke: "currentColor",
2148
- "stroke-width": "2",
2149
- "stroke-linecap": "round",
2150
- "aria-hidden": "true"
2151
- }, [
2152
- $("path", { d: "M3 8h10" })
2153
- ], -1)
2154
- ]), 8, Ll),
2155
- e.unitText ? (v(), b("span", zl, N(e.unitText), 1)) : A("", !0),
2156
- j(e.$slots, "suffix")
2157
- ], 2);
2158
- }
2159
- const ln = /* @__PURE__ */ O(Vl, [["render", ql]]), Rl = E({
2160
- name: "MultiQuantityInput",
2161
- components: { GroupControl: tn, QuantityInput: ln },
2162
- emits: ["update:modelValue", "change", "show", "shown", "hide", "hidden"],
2163
- props: {
2164
- ...R,
2165
- /** Array of strings or { name, min, max, description, html }. */
2166
- options: { type: Array, default: () => [] },
2167
- min: { type: Number, default: 0 },
2168
- max: { type: Number, default: null },
2169
- totalMin: { type: Number, default: null },
2170
- totalMax: { type: Number, default: null },
2171
- unit: { type: String, default: null },
2172
- placement: { type: String, default: "bottom-start" },
2173
- locale: { type: String, default: null }
2174
- },
2175
- setup(e, { emit: n }) {
2176
- const o = P(e, n), { t: l } = G(() => e.locale), r = B(null), d = S(() => {
2177
- const m = o.model.value;
2178
- return m && typeof m == "object" ? m : {};
2179
- }), t = S(
2180
- () => e.options.reduce((m, p, h) => m + (Number(d.value[h]) || 0), 0)
2181
- ), a = S(() => e.unit ?? l("quantity.unit")), f = S(
2182
- () => e.options.map((m, p) => {
2183
- const h = typeof m == "object" && m !== null ? m : { name: m }, g = Number(d.value[p]) || 0, I = h.max ?? e.max, s = e.totalMax === null ? 1 / 0 : g + (e.totalMax - t.value);
2184
- return {
2185
- key: p,
2186
- name: h.name ?? h.label ?? String(m),
2187
- description: h.description ?? null,
2188
- html: !!h.html,
2189
- min: h.min ?? e.min,
2190
- max: Math.min(I ?? 1 / 0, s) === 1 / 0 ? null : Math.min(I ?? 1 / 0, s)
2191
- };
2192
- })
2193
- );
2194
- return K(() => {
2195
- (!o.model.value || typeof o.model.value != "object") && (o.model.value = e.options.reduce((m, p, h) => (m[h] = typeof p == "object" && (p == null ? void 0 : p.min) || e.min, m), {}));
2196
- }), se(
2197
- "Menu",
2198
- () => r.value,
2199
- () => ({ autoClose: "outside", placement: e.placement }),
2200
- {
2201
- onCreate(m, p) {
2202
- ["show", "shown", "hide", "hidden"].forEach(
2203
- (h) => p.addEventListener(`${h}.bs.menu`, (g) => n(h, g))
2204
- );
2205
- }
2206
- }
2207
- ), { ...o, t: l, toggle: r, total: t, unitText: a, normalized: f };
2208
- }
2209
- }), Pl = { class: "multi-quantity-input fanum" }, jl = ["disabled"], Ul = { class: "combobox-value" }, Kl = { class: "menu p-3" }, Gl = ["innerHTML"], Hl = { key: 1 }, Xl = {
2210
- key: 2,
2211
- class: "form-text mt-0"
2212
- };
2213
- function Jl(e, n, o, l, r, d) {
2214
- const t = U("QuantityInput"), a = U("GroupControl");
2215
- return v(), b("div", Pl, [
2216
- $("button", {
2217
- ref: "toggle",
2218
- type: "button",
2219
- class: D(["form-control combobox-toggle", { "is-invalid": e.isInvalid }]),
2220
- "data-bs-toggle": "menu",
2221
- "aria-haspopup": "true",
2222
- disabled: e.isDisabled || e.readonly
2223
- }, [
2224
- $("span", Ul, N(e.total) + " " + N(e.unitText), 1)
2225
- ], 10, jl),
2226
- $("div", Kl, [
2227
- te(a, { name: e.name }, {
2228
- default: pe(() => [
2229
- (v(!0), b(Y, null, oe(e.normalized, (f) => (v(), b("div", {
2230
- key: f.key,
2231
- class: "d-flex align-items-center justify-content-between gap-3 py-1"
2232
- }, [
2233
- $("div", null, [
2234
- f.html ? (v(), b("span", {
2235
- key: 0,
2236
- innerHTML: f.name
2237
- }, null, 8, Gl)) : (v(), b("span", Hl, N(f.name), 1)),
2238
- f.description ? (v(), b("div", Xl, N(f.description), 1)) : A("", !0)
2239
- ]),
2240
- te(t, {
2241
- name: String(f.key),
2242
- min: f.min,
2243
- max: f.max,
2244
- readonly: e.readonly,
2245
- unit: ""
2246
- }, null, 8, ["name", "min", "max", "readonly"])
2247
- ]))), 128))
2248
- ]),
2249
- _: 1
2250
- }, 8, ["name"])
2251
- ])
2252
- ]);
2253
- }
2254
- const Wl = /* @__PURE__ */ O(Rl, [["render", Jl]]), Zl = E({
2255
- name: "OTPInput",
2256
- emits: ["update:modelValue", "change", "input", "complete", "focus", "blur"],
2257
- props: {
2258
- ...R,
2259
- /** Number of characters. */
2260
- length: { type: Number, default: null },
2261
- /** Legacy alias of `length`. */
2262
- maxLength: { type: Number, default: null },
2263
- /** numeric | alphanumeric | alpha */
2264
- type: { type: String, default: "numeric", validator: (e) => ["numeric", "alphanumeric", "alpha"].includes(e) },
2265
- /** Show • instead of the typed character. */
2266
- mask: { type: Boolean, default: !1 },
2267
- /** Visual grouping, e.g. [3, 3] renders `123 · 456`. */
2268
- groups: { type: Array, default: null },
2269
- separator: { type: String, default: "·" },
2270
- /** Submit the surrounding FormContainer as soon as the code is complete. */
2271
- autoSubmit: { type: Boolean, default: !1 },
2272
- autofocus: { type: Boolean, default: !1 }
2273
- },
2274
- setup(e, { emit: n, expose: o }) {
2275
- const l = P(e, n), r = B(null), d = B(null);
2276
- let t = !1, a = [];
2277
- const f = () => e.length ?? e.maxLength ?? 6, m = (s) => s == null ? "" : String(s);
2278
- function p() {
2279
- var s;
2280
- (s = d.value) == null || s.classList.toggle("is-invalid", l.isInvalid.value);
2281
- }
2282
- function h() {
2283
- const s = g.value;
2284
- if (!s) return;
2285
- const c = m(l.model.value);
2286
- if (s.getValue() !== c) {
2287
- t = !0;
2288
- try {
2289
- s.setValue(c);
2290
- } finally {
2291
- t = !1;
2292
- }
2293
- }
2294
- }
2295
- const { instance: g, create: I } = se(
2296
- "OtpInput",
2297
- () => r.value,
2298
- () => ({
2299
- length: f(),
2300
- type: e.type,
2301
- mask: e.mask,
2302
- groups: e.groups,
2303
- separator: e.separator
2304
- }),
2305
- {
2306
- onCreate(s, c) {
2307
- const i = (u, w) => {
2308
- c.addEventListener(u, w), a.push(() => c.removeEventListener(u, w));
2309
- };
2310
- i("input.bs.otpInput", (u) => {
2311
- t || (l.model.value = u.value, n("input", u.value, u), l.emitChange(u.value, u));
2312
- }), i("complete.bs.otpInput", (u) => {
2313
- var w, k;
2314
- t || (n("complete", u.value), e.autoSubmit && ((k = (w = l.formApi) == null ? void 0 : w.submit) == null || k.call(w)));
2315
- }), h(), p(), e.autofocus && s.focus();
2316
- },
2317
- onDestroy() {
2318
- a.forEach((s) => s()), a = [];
2319
- }
2320
- }
2321
- );
2322
- return K(() => {
2323
- d.value && (d.value.value = m(l.model.value));
2324
- }), q(() => l.model.value, h), q(l.isInvalid, p, { flush: "post" }), q(
2325
- () => [f(), e.type, e.mask, e.groups, e.separator],
2326
- async () => {
2327
- await X(), I();
2328
- },
2329
- { deep: !0 }
2330
- ), o({
2331
- focus: () => {
2332
- var s;
2333
- return (s = g.value) == null ? void 0 : s.focus();
2334
- },
2335
- clear: () => {
2336
- var s;
2337
- (s = g.value) == null || s.clear(), l.model.value = "";
2338
- }
2339
- }), { ...l, el: r, input: d };
2340
- }
2341
- }), Yl = {
2342
- ref: "el",
2343
- class: "otp fanum"
2344
- }, Ql = ["name", "id", "disabled", "readonly", "required", "aria-invalid"];
2345
- function xl(e, n, o, l, r, d) {
2346
- return v(), b("div", Yl, [
2347
- $("input", {
2348
- ref: "input",
2349
- type: "text",
2350
- name: e.name,
2351
- id: e.inputId,
2352
- disabled: e.isDisabled,
2353
- readonly: e.readonly,
2354
- required: e.required,
2355
- "aria-invalid": e.isInvalid || void 0,
2356
- onFocus: n[0] || (n[0] = (t) => e.$emit("focus", t)),
2357
- onBlur: n[1] || (n[1] = (t) => e.$emit("blur", t))
2358
- }, null, 40, Ql)
2359
- ], 512);
2360
- }
2361
- const _l = /* @__PURE__ */ O(Zl, [["render", xl]]), Je = {
2362
- en: { weak: "Weak", fair: "Fair", good: "Good", strong: "Strong" },
2363
- fa: { weak: "ضعیف", fair: "متوسط", good: "خوب", strong: "قوی" }
2364
- }, eo = E({
2365
- name: "PasswordInput",
2366
- components: { TextInput: Ie, FormAdornInput: De },
2367
- inheritAttrs: !1,
2368
- emits: ["toggle", "strength"],
2369
- props: {
2370
- ...R,
2371
- name: { type: String, default: "password" },
2372
- placeholder: { type: String, default: null },
2373
- /** Show a "reveal password" button. */
2374
- toggle: { type: Boolean, default: !1 },
2375
- /** Show the password strength meter. */
2376
- strength: { type: Boolean, default: !1 },
2377
- /** Show the text feedback ("Weak", "Strong", …) under the meter. */
2378
- strengthText: { type: Boolean, default: !0 },
2379
- /** Override the labels: { weak, fair, good, strong }. */
2380
- strengthMessages: { type: Object, default: null },
2381
- /** Bootstrap Strength options: { minLength, thresholds: [2, 4, 6], weights, scorer(password) => number }. */
2382
- strengthOptions: { type: Object, default: () => ({}) },
2383
- size: { type: String, default: null },
2384
- locale: { type: String, default: null }
2385
- },
2386
- setup(e, { emit: n, expose: o }) {
2387
- const { t: l, locale: r } = G(() => e.locale), d = P(e, () => {
2388
- }), t = B(null), a = B(null), f = B(!1), m = S(() => ({
2389
- ...Je[r.value] || Je.en,
2390
- ...e.strengthMessages || {}
2391
- }));
2392
- function p() {
2393
- f.value = !f.value, n("toggle", f.value);
2394
- }
2395
- let h = [];
2396
- const { instance: g, create: I } = se(
2397
- "Strength",
2398
- () => e.strength ? a.value : null,
2399
- () => {
2400
- var c;
2401
- return {
2402
- ...e.strengthOptions,
2403
- input: (c = t.value) == null ? void 0 : c.querySelector("input"),
2404
- messages: m.value
2405
- };
2406
- },
2407
- {
2408
- onCreate(c, i) {
2409
- const u = (w) => n("strength", w.strength ?? null, w.score ?? 0);
2410
- i.addEventListener("strengthChange.bs.strength", u), h.push(() => i.removeEventListener("strengthChange.bs.strength", u));
2411
- },
2412
- onDestroy() {
2413
- h.forEach((c) => c()), h = [];
2414
- }
2415
- }
2416
- );
2417
- q(
2418
- () => d.model.value,
2419
- () => X(() => {
2420
- var c;
2421
- return (c = g.value) == null ? void 0 : c.evaluate();
2422
- })
2423
- ), q(
2424
- () => [e.strength, e.toggle, e.strengthText, m.value, e.strengthOptions],
2425
- async () => {
2426
- await X(), e.strength && I();
2427
- },
2428
- { deep: !0 }
2429
- ), o({ strength: () => {
2430
- var c, i;
2431
- return ((i = (c = g.value) == null ? void 0 : c.getStrength) == null ? void 0 : i.call(c)) ?? null;
2432
- } });
2433
- const s = S(() => ({
2434
- name: e.name,
2435
- modelValue: e.modelValue,
2436
- id: e.id,
2437
- disabled: e.disabled,
2438
- readonly: e.readonly,
2439
- required: e.required,
2440
- invalid: e.invalid,
2441
- size: e.size,
2442
- placeholder: e.placeholder ?? l("password.placeholder")
2443
- }));
2444
- return { t: l, root: t, meter: a, visible: f, toggleVisible: p, forwarded: s };
2445
- }
2446
- }), no = {
2447
- ref: "root",
2448
- class: "password-input"
2449
- }, to = ["aria-label", "aria-pressed"], lo = {
2450
- key: 0,
2451
- width: "16",
2452
- height: "16",
2453
- viewBox: "0 0 16 16",
2454
- fill: "none",
2455
- stroke: "currentColor",
2456
- "stroke-width": "1.5",
2457
- "stroke-linecap": "round",
2458
- "stroke-linejoin": "round",
2459
- "aria-hidden": "true"
2460
- }, oo = {
2461
- key: 1,
2462
- width: "16",
2463
- height: "16",
2464
- viewBox: "0 0 16 16",
2465
- fill: "none",
2466
- stroke: "currentColor",
2467
- "stroke-width": "1.5",
2468
- "stroke-linecap": "round",
2469
- "stroke-linejoin": "round",
2470
- "aria-hidden": "true"
2471
- }, ao = {
2472
- ref: "meter",
2473
- class: "strength",
2474
- "aria-hidden": "true"
2475
- }, io = {
2476
- key: 0,
2477
- class: "strength-text",
2478
- "aria-live": "polite"
2479
- };
2480
- function ro(e, n, o, l, r, d) {
2481
- const t = U("FormAdornInput"), a = U("TextInput");
2482
- return v(), b("div", no, [
2483
- e.toggle ? (v(), Q(t, ve({ key: 0 }, { ...e.$attrs, ...e.forwarded }, {
2484
- type: e.visible ? "text" : "password",
2485
- autocomplete: "current-password"
2486
- }), {
2487
- end: pe(() => [
2488
- $("button", {
2489
- type: "button",
2490
- class: "btn-text theme-secondary btn-icon",
2491
- "aria-label": e.visible ? e.t("password.hide") : e.t("password.show"),
2492
- "aria-pressed": e.visible,
2493
- onClick: n[0] || (n[0] = (...f) => e.toggleVisible && e.toggleVisible(...f))
2494
- }, [
2495
- e.visible ? (v(), b("svg", oo, n[2] || (n[2] = [
2496
- $("path", { d: "M2 2l12 12M6.6 3.7A7 7 0 0 1 8 3.5C12.5 3.5 15 8 15 8a11 11 0 0 1-2.2 2.6M4 5.4A11 11 0 0 0 1 8s2.5 4.5 7 4.5c1 0 1.9-.2 2.7-.6" }, null, -1)
2497
- ]))) : (v(), b("svg", lo, n[1] || (n[1] = [
2498
- $("path", { d: "M1 8s2.5-4.5 7-4.5S15 8 15 8s-2.5 4.5-7 4.5S1 8 1 8Z" }, null, -1),
2499
- $("circle", {
2500
- cx: "8",
2501
- cy: "8",
2502
- r: "2"
2503
- }, null, -1)
2504
- ])))
2505
- ], 8, to)
2506
- ]),
2507
- _: 1
2508
- }, 16, ["type"])) : (v(), Q(a, ve({ key: 1 }, { ...e.$attrs, ...e.forwarded }, {
2509
- type: "password",
2510
- autocomplete: "current-password"
2511
- }), null, 16)),
2512
- e.strength ? (v(), b(Y, { key: 2 }, [
2513
- $("div", ao, n[3] || (n[3] = [
2514
- $("div", { class: "strength-segment" }, null, -1),
2515
- $("div", { class: "strength-segment" }, null, -1),
2516
- $("div", { class: "strength-segment" }, null, -1),
2517
- $("div", { class: "strength-segment" }, null, -1)
2518
- ]), 512),
2519
- e.strengthText ? (v(), b("div", io)) : A("", !0)
2520
- ], 64)) : A("", !0)
2521
- ], 512);
2522
- }
2523
- const uo = /* @__PURE__ */ O(eo, [["render", ro]]), so = x(() => import("vue3-persian-datetime-picker")), co = E({
2524
- name: "PersianDatePickerInput",
2525
- components: { Vue3PersianDatetimePicker: so },
2526
- emits: ["update:modelValue", "change", "open", "close"],
2527
- props: {
2528
- ...R,
2529
- /** date | datetime | time | year-month | month */
2530
- calendar: { type: String, default: "date" },
2531
- view: { type: String, default: "date" },
2532
- min: { type: String, default: null },
2533
- max: { type: String, default: null },
2534
- range: { type: Boolean, default: !1 },
2535
- locale: { type: String, default: "fa" },
2536
- /** Format of the stored value. */
2537
- format: { type: String, default: "jYYYY/jMM/jDD" },
2538
- /** Format shown in the input (defaults to `format`). */
2539
- inputFormat: { type: String, default: null },
2540
- placeholder: { type: String, default: null },
2541
- inputClass: { type: String, default: "form-control fanum" },
2542
- /** Extra props forwarded to vue3-persian-datetime-picker. */
2543
- pickerOptions: { type: Object, default: () => ({}) }
2544
- },
2545
- setup(e, { emit: n, expose: o }) {
2546
- const l = P(e, n), r = B(!1);
2547
- return K(() => {
2548
- r.value = !0;
2549
- }), q(
2550
- () => l.model.value,
2551
- (d, t) => n("change", d, t)
2552
- ), o({ clear: () => l.model.value = null }), { ...l, ready: r };
2553
- }
2554
- }), fo = ["placeholder"];
2555
- function mo(e, n, o, l, r, d) {
2556
- const t = U("Vue3PersianDatetimePicker");
2557
- return e.ready ? (v(), Q(t, ve({
2558
- key: 0,
2559
- modelValue: e.model,
2560
- "onUpdate:modelValue": n[0] || (n[0] = (a) => e.model = a),
2561
- name: e.name,
2562
- id: e.inputId,
2563
- type: e.calendar,
2564
- view: e.view,
2565
- min: e.min,
2566
- max: e.max,
2567
- range: e.range,
2568
- locale: e.locale,
2569
- format: e.format,
2570
- "input-format": e.inputFormat || e.format,
2571
- placeholder: e.placeholder,
2572
- disabled: e.isDisabled || e.readonly,
2573
- "input-class": [e.inputClass, { "is-invalid": e.isInvalid }],
2574
- editable: "",
2575
- jumpminute: "15",
2576
- roundminute: !0,
2577
- "show-now-btn": !0,
2578
- "auto-submit": !0
2579
- }, e.pickerOptions, {
2580
- onOpen: n[1] || (n[1] = (a) => e.$emit("open")),
2581
- onClose: n[2] || (n[2] = (a) => e.$emit("close"))
2582
- }), null, 16, ["modelValue", "name", "id", "type", "view", "min", "max", "range", "locale", "format", "input-format", "placeholder", "disabled", "input-class"])) : (v(), b("input", {
2583
- key: 1,
2584
- type: "text",
2585
- class: D(["form-control", { "is-invalid": e.isInvalid }]),
2586
- placeholder: e.placeholder,
2587
- disabled: ""
2588
- }, null, 10, fo));
2589
- }
2590
- const po = /* @__PURE__ */ O(co, [["render", mo]]), yo = E({
2591
- name: "RangeInput",
2592
- emits: ["update:modelValue", "change", "input", "focus", "blur"],
2593
- props: {
2594
- ...R,
2595
- min: { type: Number, default: 0 },
2596
- max: { type: Number, default: 100 },
2597
- step: { type: Number, default: 1 },
2598
- /** Show the current value above the thumb. */
2599
- bubble: { type: Boolean, default: !1 },
2600
- /** (value:number) => string — formats the bubble and the tick labels. */
2601
- formatter: { type: Function, default: null },
2602
- /** Tick marks: numbers or { value, label } objects. */
2603
- ticks: { type: Array, default: () => [] }
2604
- },
2605
- setup(e, { emit: n }) {
2606
- const o = P(e, n), l = B(null), r = B(null), d = S(() => {
2607
- const h = Number(o.model.value);
2608
- return o.model.value === null || o.model.value === void 0 || Number.isNaN(h) ? e.min : h;
2609
- }), t = S(() => e.ticks.length ? `${o.inputId.value}-ticks` : void 0), a = S(
2610
- () => e.ticks.map((h) => typeof h == "object" && h !== null ? h : { value: h, label: e.formatter ? e.formatter(h) : String(h) })
2611
- );
2612
- function f(h) {
2613
- const g = Number(h.target.value);
2614
- o.model.value = g, n("input", g, h);
2615
- }
2616
- const { instance: m, create: p } = se(
2617
- "Range",
2618
- () => l.value,
2619
- () => ({ bubble: e.bubble, formatter: e.formatter })
2620
- );
2621
- return q(
2622
- () => [o.model.value, e.min, e.max],
2623
- () => X(() => {
2624
- var h;
2625
- return (h = m.value) == null ? void 0 : h.update();
2626
- }),
2627
- { flush: "post" }
2628
- ), q(
2629
- () => [e.bubble, e.formatter, e.ticks, e.min, e.max],
2630
- async () => {
2631
- await X(), p();
2632
- },
2633
- { deep: !0 }
2634
- ), { ...o, el: l, input: r, current: d, listId: t, tickItems: a, onInput: f };
2635
- }
2636
- }), ho = {
2637
- ref: "el",
2638
- class: "form-range"
2639
- }, vo = ["name", "id", "min", "max", "step", "list", "disabled", "aria-invalid", "value"], go = ["id"], bo = ["value", "label"];
2640
- function $o(e, n, o, l, r, d) {
2641
- return v(), b("div", ho, [
2642
- $("input", {
2643
- ref: "input",
2644
- type: "range",
2645
- class: D(["form-range-input", { "is-invalid": e.isInvalid }]),
2646
- name: e.name,
2647
- id: e.inputId,
2648
- min: e.min,
2649
- max: e.max,
2650
- step: e.step,
2651
- list: e.listId,
2652
- disabled: e.isDisabled || e.readonly,
2653
- "aria-invalid": e.isInvalid || void 0,
2654
- value: e.current,
2655
- onInput: n[0] || (n[0] = (...t) => e.onInput && e.onInput(...t)),
2656
- onChange: n[1] || (n[1] = (t) => e.emitChange(Number(t.target.value), t)),
2657
- onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
2658
- onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
2659
- }, null, 42, vo),
2660
- e.listId ? (v(), b("datalist", {
2661
- key: 0,
2662
- id: e.listId
2663
- }, [
2664
- (v(!0), b(Y, null, oe(e.tickItems, (t) => (v(), b("option", {
2665
- key: t.value,
2666
- value: t.value,
2667
- label: t.label
2668
- }, null, 8, bo))), 128))
2669
- ], 8, go)) : A("", !0)
2670
- ], 512);
2671
- }
2672
- const on = /* @__PURE__ */ O(yo, [["render", $o]]), So = E({
2673
- name: "SimpleUploader",
2674
- inheritAttrs: !0,
2675
- setup(e, { attrs: n, slots: o }) {
2676
- return () => fn(en, n, o);
2677
- }
2678
- }), Io = E({
2679
- name: "StarRatingInput",
2680
- emits: ["update:modelValue", "change", "hover"],
2681
- props: {
2682
- ...R,
2683
- /** Initial rating used when the model is empty. */
2684
- value: { type: Number, default: 0 },
2685
- maxStars: { type: Number, default: 5 },
2686
- /** Steps per star: 1 = whole stars, 2 = half stars, 4 = quarter stars… */
2687
- precision: { type: Number, default: 2 },
2688
- showValue: { type: Boolean, default: !0 },
2689
- /** Allow clicking the current rating again to reset it to 0. */
2690
- clearable: { type: Boolean, default: !1 }
2691
- },
2692
- setup(e, { emit: n }) {
2693
- const o = P(e, n), l = B(null), r = B(null), d = B(!1);
2694
- K(() => {
2695
- l.value && (d.value = getComputedStyle(l.value).direction === "rtl");
2696
- });
2697
- const t = S(() => e.readonly || o.isDisabled.value), a = S(() => {
2698
- const u = Number(o.model.value);
2699
- return o.model.value === null || o.model.value === void 0 || Number.isNaN(u) ? e.value : u;
2700
- }), f = S(() => r.value ?? a.value), m = S(() => 1 / e.precision), p = (u) => Math.max(0, Math.min(1, f.value - (u - 1))) * 100;
2701
- function h(u) {
2702
- const w = l.value.getBoundingClientRect(), k = d.value ? w.right - u.clientX : u.clientX - w.left, T = w.width / e.maxStars, M = Math.ceil(k / T * e.precision) / e.precision;
2703
- return Math.min(e.maxStars, Math.max(m.value, M));
2704
- }
2705
- function g(u) {
2706
- t.value || (r.value = h(u), n("hover", r.value));
2707
- }
2708
- function I() {
2709
- r.value = null;
2710
- }
2711
- function s(u, w) {
2712
- if (t.value) return;
2713
- const k = e.clearable && u === a.value ? 0 : u;
2714
- o.model.value = k, o.emitChange(k, w);
2715
- }
2716
- function c(u) {
2717
- t.value || s(h(u), u);
2718
- }
2719
- function i(u) {
2720
- if (t.value) return;
2721
- const w = d.value ? "ArrowLeft" : "ArrowRight", k = d.value ? "ArrowRight" : "ArrowLeft";
2722
- let T = null;
2723
- u.key === w || u.key === "ArrowUp" ? T = a.value + m.value : u.key === k || u.key === "ArrowDown" ? T = a.value - m.value : u.key === "Home" ? T = 0 : u.key === "End" && (T = e.maxStars), T !== null && (u.preventDefault(), s(Math.min(e.maxStars, Math.max(0, Number(T.toFixed(4)))), u));
2724
- }
2725
- return {
2726
- ...o,
2727
- container: l,
2728
- rating: f,
2729
- stored: a,
2730
- fillOf: p,
2731
- onMove: g,
2732
- leave: I,
2733
- onClick: c,
2734
- onKeydown: i,
2735
- locked: t,
2736
- display: S(() => {
2737
- var u;
2738
- return (u = f.value) == null ? void 0 : u.toFixed(1);
2739
- })
2740
- };
2741
- }
2742
- }), Co = ["tabindex", "aria-valuemax", "aria-valuenow", "aria-readonly", "aria-invalid"], wo = ["name", "value"], ko = {
2743
- key: 1,
2744
- class: "rating-value fanum"
2745
- };
2746
- function Mo(e, n, o, l, r, d) {
2747
- return v(), b("div", {
2748
- class: D(["star-rating d-flex align-items-center gap-2", { "is-invalid": e.isInvalid }])
2749
- }, [
2750
- $("div", {
2751
- ref: "container",
2752
- class: "star-rating-container d-flex position-relative",
2753
- role: "slider",
2754
- tabindex: e.locked ? -1 : 0,
2755
- "aria-valuemin": 0,
2756
- "aria-valuemax": e.maxStars,
2757
- "aria-valuenow": e.stored,
2758
- "aria-readonly": e.locked || void 0,
2759
- "aria-invalid": e.isInvalid || void 0,
2760
- style: le({ cursor: e.locked ? "default" : "pointer" }),
2761
- onPointermove: n[0] || (n[0] = (...t) => e.onMove && e.onMove(...t)),
2762
- onPointerleave: n[1] || (n[1] = (...t) => e.leave && e.leave(...t)),
2763
- onClick: n[2] || (n[2] = (...t) => e.onClick && e.onClick(...t)),
2764
- onKeydown: n[3] || (n[3] = (...t) => e.onKeydown && e.onKeydown(...t))
2765
- }, [
2766
- (v(!0), b(Y, null, oe(e.maxStars, (t) => (v(), b("span", {
2767
- key: t,
2768
- class: "star-wrapper position-relative d-inline-block fs-2xl lh-1"
2769
- }, [
2770
- n[4] || (n[4] = $("span", {
2771
- class: "star-bg fg-secondary opacity-50",
2772
- "aria-hidden": "true"
2773
- }, "★", -1)),
2774
- $("span", {
2775
- class: "star-overlay fg-warning",
2776
- "aria-hidden": "true",
2777
- style: le({ position: "absolute", top: 0, insetInlineStart: 0, overflow: "hidden", whiteSpace: "nowrap", width: e.fillOf(t) + "%" })
2778
- }, "★", 4)
2779
- ]))), 128))
2780
- ], 44, Co),
2781
- e.name ? (v(), b("input", {
2782
- key: 0,
2783
- type: "hidden",
2784
- name: e.name,
2785
- value: e.stored
2786
- }, null, 8, wo)) : A("", !0),
2787
- e.showValue && e.rating > 0 ? (v(), b("span", ko, N(e.display), 1)) : A("", !0)
2788
- ], 2);
2789
- }
2790
- const Bo = /* @__PURE__ */ O(Io, [["render", Mo]]), To = E({
2791
- name: "SubmitButton",
2792
- emits: ["click"],
2793
- props: {
2794
- disabled: { type: Boolean, default: !1 },
2795
- /** Force the loading state (otherwise it follows form.processing / form.uploading). */
2796
- loading: { type: Boolean, default: null },
2797
- /** Bootstrap 6 button variant: solid | outline | subtle | text | styled | link. Use null to supply your own classes. */
2798
- variant: { type: String, default: "solid" },
2799
- /** Bootstrap 6 theme: primary | secondary | accent | success | danger | warning | info | inverse. */
2800
- theme: { type: String, default: "primary" },
2801
- locale: { type: String, default: null }
2802
- },
2803
- setup(e, { emit: n }) {
2804
- const o = Z("form", null), l = S(() => (o == null ? void 0 : o.value) ?? null), { t: r } = G(() => e.locale), d = S(
2805
- () => {
2806
- var a, f;
2807
- return e.loading !== null ? e.loading : !!((a = l.value) != null && a.processing || (f = l.value) != null && f.uploading);
2808
- }
2809
- ), t = S(() => [
2810
- e.variant ? `btn-${e.variant}` : null,
2811
- e.theme && e.variant ? `theme-${e.theme}` : null
2812
- ]);
2813
- return { form: l, busy: d, classes: t, t: r, onClick: (a) => n("click", a) };
2814
- }
2815
- }), Ao = ["disabled", "aria-busy"], No = {
2816
- key: 0,
2817
- class: "spinner-border spinner-sm me-2",
2818
- role: "status",
2819
- "aria-hidden": "true"
2820
- }, Eo = {
2821
- key: 0,
2822
- class: "fanum"
2823
- };
2824
- function Oo(e, n, o, l, r, d) {
2825
- var t;
2826
- return v(), b("button", {
2827
- type: "submit",
2828
- class: D(e.classes),
2829
- disabled: e.disabled || e.busy,
2830
- "aria-busy": e.busy || void 0,
2831
- onClick: n[0] || (n[0] = (...a) => e.onClick && e.onClick(...a))
2832
- }, [
2833
- e.busy ? (v(), b("span", No)) : A("", !0),
2834
- j(e.$slots, "default", {
2835
- form: e.form,
2836
- loading: e.busy
2837
- }, () => [
2838
- ue(N(e.t("submit.default")), 1)
2839
- ]),
2840
- j(e.$slots, "progress", {
2841
- progress: (t = e.form) == null ? void 0 : t.uploading
2842
- }, () => {
2843
- var a;
2844
- return [
2845
- (a = e.form) != null && a.uploading ? (v(), b("span", Eo, N(e.form.uploading) + "%", 1)) : A("", !0)
2846
- ];
2847
- })
2848
- ], 10, Ao);
2849
- }
2850
- const Vo = /* @__PURE__ */ O(To, [["render", Oo]]), Fo = E({
2851
- name: "SwitchInput",
2852
- emits: ["update:modelValue", "change", "focus", "blur"],
2853
- props: {
2854
- ...R,
2855
- value: { type: [String, Number, Boolean, Object], default: null },
2856
- trueValue: { type: null, default: !0 },
2857
- falseValue: { type: null, default: !1 },
2858
- checked: { type: Boolean, default: !1 },
2859
- label: { type: String, default: null }
2860
- },
2861
- setup(e, { emit: n }) {
2862
- const o = B(null), l = P(e, n, { valued: () => e.value });
2863
- return Se(e, l, o, { type: () => "checkbox" }), {
2864
- ...l,
2865
- input: o,
2866
- onChange: (r) => l.emitChange(l.model.value, r)
2867
- };
2868
- },
2869
- expose: ["input"]
2870
- }), Do = { class: "form-field" }, Lo = { class: "switch" }, zo = ["name", "id", "value", "true-value", "false-value", "required", "disabled", "aria-invalid"], qo = ["for"];
2871
- function Ro(e, n, o, l, r, d) {
2872
- return v(), b("div", Do, [
2873
- $("div", Lo, [
2874
- ee($("input", {
2875
- ref: "input",
2876
- "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
2877
- name: e.name,
2878
- id: e.inputId,
2879
- type: "checkbox",
2880
- role: "switch",
2881
- switch: "",
2882
- value: e.value ?? void 0,
2883
- "true-value": e.trueValue,
2884
- "false-value": e.falseValue,
2885
- required: e.required,
2886
- disabled: e.isDisabled,
2887
- "aria-invalid": e.isInvalid || void 0,
2888
- class: D({ "is-invalid": e.isInvalid }),
2889
- onChange: n[1] || (n[1] = (...t) => e.onChange && e.onChange(...t)),
2890
- onFocus: n[2] || (n[2] = (t) => e.$emit("focus", t)),
2891
- onBlur: n[3] || (n[3] = (t) => e.$emit("blur", t))
2892
- }, null, 42, zo), [
2893
- [mn, e.model]
2894
- ])
2895
- ]),
2896
- $("label", { for: e.inputId }, [
2897
- j(e.$slots, "default", {}, () => [
2898
- ue(N(e.label), 1)
2899
- ])
2900
- ], 8, qo)
2901
- ]);
2902
- }
2903
- const Po = /* @__PURE__ */ O(Fo, [["render", Ro]]), jo = x(() => import("vue-tel-input").then((e) => e.VueTelInput)), Uo = E({
2904
- name: "TelInput",
2905
- components: { VueTelInput: jo },
2906
- emits: ["update:modelValue", "change", "validate", "country-changed", "focus", "blur"],
2907
- props: {
2908
- ...R,
2909
- placeholder: { type: String, default: "000 000 0000" },
2910
- /** Legacy alias of `placeholder`. */
2911
- placeHolder: { type: String, default: null },
2912
- defaultCountry: { type: String, default: "ir" },
2913
- preferredCountries: { type: Array, default: () => ["ir", "us", "tr", "ca"] },
2914
- mode: { type: String, default: "national" },
2915
- validCharactersOnly: { type: Boolean, default: !0 },
2916
- /** Mark the field invalid as soon as the typed number is not valid. */
2917
- validate: { type: Boolean, default: !0 },
2918
- searchPlaceholder: { type: String, default: "Search…" },
2919
- dropdownOptions: { type: Object, default: () => ({}) },
2920
- inputOptions: { type: Object, default: () => ({}) }
2921
- },
2922
- setup(e, { emit: n }) {
2923
- const o = P(e, n), l = B(o.model.value ?? ""), r = B(null);
2924
- let d = o.model.value ?? "";
2925
- q(
2926
- () => o.model.value,
2927
- (a) => {
2928
- (a ?? "") !== d && (l.value = a ?? "");
2929
- }
2930
- );
2931
- function t(a, f) {
2932
- d = (f == null ? void 0 : f.number) ?? "", o.model.value = d, r.value = (f == null ? void 0 : f.valid) ?? null, n("validate", r.value, f), o.emitChange(d);
2933
- }
2934
- return {
2935
- ...o,
2936
- text: l,
2937
- valid: r,
2938
- onInput: t,
2939
- dropdown: S(() => ({
2940
- showDialCodeInList: !0,
2941
- showDialCodeInSelection: !0,
2942
- showSearchBox: !0,
2943
- searchBoxPlaceholder: e.searchPlaceholder,
2944
- showFlags: !1,
2945
- ...e.dropdownOptions
2946
- })),
2947
- inputOpts: S(() => ({
2948
- placeholder: e.placeHolder ?? e.placeholder,
2949
- id: o.inputId.value,
2950
- name: e.name,
2951
- readonly: e.readonly,
2952
- ...e.inputOptions
2953
- })),
2954
- invalidClass: S(() => o.isInvalid.value || e.validate && r.value === !1)
2955
- };
2956
- }
2957
- }), Ko = {
2958
- class: "telephone-input input-group fanum",
2959
- dir: "ltr"
2960
- };
2961
- function Go(e, n, o, l, r, d) {
2962
- const t = U("VueTelInput");
2963
- return v(), b("div", Ko, [
2964
- te(t, {
2965
- modelValue: e.text,
2966
- "onUpdate:modelValue": n[0] || (n[0] = (a) => e.text = a),
2967
- mode: e.mode,
2968
- "valid-characters-only": e.validCharactersOnly,
2969
- "default-country": e.defaultCountry,
2970
- "preferred-countries": e.preferredCountries,
2971
- disabled: e.isDisabled,
2972
- "dropdown-options": e.dropdown,
2973
- "input-options": e.inputOpts,
2974
- "style-classes": "form-control form-control-tel fanum" + (e.invalidClass ? " is-invalid" : ""),
2975
- onOnInput: e.onInput,
2976
- onCountryChanged: n[1] || (n[1] = (a) => e.$emit("country-changed", a)),
2977
- onFocus: n[2] || (n[2] = (a) => e.$emit("focus", a)),
2978
- onBlur: n[3] || (n[3] = (a) => e.$emit("blur", a))
2979
- }, null, 8, ["modelValue", "mode", "valid-characters-only", "default-country", "preferred-countries", "disabled", "dropdown-options", "input-options", "style-classes", "onOnInput"])
2980
- ]);
2981
- }
2982
- const Ho = /* @__PURE__ */ O(Uo, [["render", Go]]), Xo = E({
2983
- name: "TextAreaInput",
2984
- emits: ["update:modelValue", "change", "input", "focus", "blur"],
2985
- props: {
2986
- ...R,
2987
- rows: { type: [Number, String], default: 3 },
2988
- placeholder: { type: String, default: null },
2989
- size: { type: String, default: null }
2990
- },
2991
- setup(e, { emit: n }) {
2992
- const o = P(e, n), l = S(() => e.size ? `form-control-${e.size}` : null);
2993
- return { ...o, sizeClass: l, emit: n };
2994
- }
2995
- }), Jo = ["name", "id", "rows", "placeholder", "required", "readonly", "disabled", "aria-invalid"];
2996
- function Wo(e, n, o, l, r, d) {
2997
- return ee((v(), b("textarea", {
2998
- "onUpdate:modelValue": n[0] || (n[0] = (t) => e.model = t),
2999
- name: e.name,
3000
- id: e.inputId,
3001
- rows: e.rows,
3002
- placeholder: e.placeholder,
3003
- required: e.required,
3004
- readonly: e.readonly,
3005
- disabled: e.isDisabled,
3006
- "aria-invalid": e.isInvalid || void 0,
3007
- class: D(["form-control", [e.sizeClass, { "is-invalid": e.isInvalid }]]),
3008
- onInput: n[1] || (n[1] = (t) => e.emit("input", e.model, t)),
3009
- onChange: n[2] || (n[2] = (t) => e.emitChange(e.model, t)),
3010
- onFocus: n[3] || (n[3] = (t) => e.$emit("focus", t)),
3011
- onBlur: n[4] || (n[4] = (t) => e.$emit("blur", t))
3012
- }, null, 42, Jo)), [
3013
- [Ye, e.model]
3014
- ]);
3015
- }
3016
- const Zo = /* @__PURE__ */ O(Xo, [["render", Wo]]), Yo = x(() => import("@uppy/vue").then((e) => e.UppyContextProvider)), Qo = x(() => import("@uppy/vue").then((e) => e.FilesList)), xo = x(() => import("@uppy/vue").then((e) => e.Dropzone)), We = ["bytes", "KB", "MB", "GB", "TB"];
3017
- function Ee(e) {
3018
- let n = 0, o = parseInt(e, 10) || 0;
3019
- for (; o >= 1024 && n < We.length - 1; )
3020
- o /= 1024, n++;
3021
- return `${o.toFixed(o < 10 && n > 0 ? 1 : 0)}${We[n]}`;
3022
- }
3023
- const _o = E({
3024
- name: "UppyInput",
3025
- components: { UppyContextProvider: Yo, FilesList: Qo, UppyDropzone: xo },
3026
- emits: [
3027
- "update:modelValue",
3028
- "change",
3029
- "ready",
3030
- "file-added",
3031
- "file-removed",
3032
- "beforeUpload",
3033
- "progress",
3034
- "upload",
3035
- "upload-progress",
3036
- "upload-error",
3037
- "upload-success",
3038
- "upload-pause",
3039
- "complete",
3040
- "error",
3041
- "upload-retry",
3042
- "upload-stalled",
3043
- "retry-all",
3044
- "cancel-all",
3045
- "restriction-failed"
3046
- ],
3047
- props: {
3048
- ...R,
3049
- multiple: { type: Boolean, default: !1 },
3050
- useXHR: { type: Boolean, default: !0 },
3051
- XHRConfig: { type: Object, default: () => ({}) },
3052
- url: { type: String, default: "/upload" },
3053
- /** Uppy core options. */
3054
- config: { type: Object, default: () => ({}) },
3055
- errorHandler: { type: Function, default: null },
3056
- showRestrictionCaption: { type: Boolean, default: !0 },
3057
- locale: { type: String, default: null }
3058
- },
3059
- setup(e, { emit: n, expose: o }) {
3060
- const l = P(e, n), { t: r } = G(() => e.locale), d = ye(), t = Qe(null), a = B(null), f = B(null), m = B(null), p = B(0);
3061
- let h = !1, g = !1;
3062
- const I = (i) => {
3063
- l.form.value && (l.form.value.uploading = i);
3064
- };
3065
- function s(i) {
3066
- if (e.errorHandler) return e.errorHandler(i);
3067
- i && (m.value = i, d.timeout(() => m.value = null, 3e3));
3068
- }
3069
- function c(i) {
3070
- var w;
3071
- if (!i) return "";
3072
- const u = [];
3073
- return (w = i.allowedFileTypes) != null && w.length && u.push(r("uppy.types", { types: i.allowedFileTypes.map((k) => k.replace(".", "")).join(", ") })), i.maxNumberOfFiles && i.maxNumberOfFiles > 1 && u.push(r("uppy.maxFiles", { count: i.maxNumberOfFiles })), i.minNumberOfFiles && u.push(r("uppy.minFiles", { count: i.minNumberOfFiles })), i.maxFileSize && u.push(r("uppy.maxSize", { size: Ee(i.maxFileSize) })), i.minFileSize && u.push(r("uppy.minSize", { size: Ee(i.minFileSize) })), i.maxTotalFileSize && u.push(r("uppy.maxTotal", { size: Ee(i.maxTotalFileSize) })), u.length ? `${u.join(", ")} ${r("uppy.suffix")}` : "";
3074
- }
3075
- return K(async () => {
3076
- var w, k, T;
3077
- const { default: i } = await import("@uppy/core");
3078
- if (d.isDisposed()) return;
3079
- const u = new i({
3080
- id: e.name ?? "uppy",
3081
- autoProceed: !0,
3082
- ...e.config,
3083
- restrictions: {
3084
- maxNumberOfFiles: e.multiple ? null : 1,
3085
- ...((w = e.config) == null ? void 0 : w.restrictions) || {}
3086
- }
3087
- });
3088
- if (u.on("upload", () => {
3089
- p.value = u.getFiles().filter((M) => !M.progress.uploadComplete).length, n("upload");
3090
- }), u.on("before-upload", (M) => n("beforeUpload", M)), u.on("upload-success", (M, L) => {
3091
- p.value = Math.max(0, p.value - 1);
3092
- const z = L.body ?? L;
3093
- if (e.multiple) {
3094
- const H = Array.isArray(l.model.value) ? l.model.value : [];
3095
- l.model.value = [...H, z];
3096
- } else
3097
- l.model.value = z;
3098
- l.emitChange(l.model.value), n("upload-success", M, L);
3099
- }), u.on("file-added", (M) => n("file-added", M)), u.on("file-removed", (M) => {
3100
- var z;
3101
- const L = ((z = M.response) == null ? void 0 : z.body) ?? M.response;
3102
- e.multiple && Array.isArray(l.model.value) ? l.model.value = l.model.value.filter((H) => JSON.stringify(H) !== JSON.stringify(L)) : l.model.value = null, l.emitChange(l.model.value), L && !h && !g && fetch(e.url, {
3103
- method: "DELETE",
3104
- headers: re({ "Content-Type": "application/json" }),
3105
- credentials: "same-origin",
3106
- body: JSON.stringify(L)
3107
- }).catch(() => {
3108
- }), n("file-removed", M);
3109
- }), u.on("progress", (M) => {
3110
- M <= 0 ? I(null) : M >= 100 ? I(p.value > 0 ? 99 : null) : I(M), n("progress", M);
3111
- }), u.on("upload-progress", (M, L) => n("upload-progress", M, L)), u.on("upload-pause", (M, L) => n("upload-pause", M, L)), u.on("cancel-all", () => n("cancel-all")), u.on("retry-all", () => n("retry-all")), u.on("upload-stalled", (M, L) => n("upload-stalled", M, L)), u.on("upload-retry", (M) => n("upload-retry", M)), u.on("complete", (M) => {
3112
- p.value = 0, I(null), n("complete", M);
3113
- }), u.on("error", (M) => n("error", M)), u.on("upload-error", (M, L, z) => {
3114
- var de;
3115
- p.value = Math.max(0, p.value - 1);
3116
- let H = L;
3117
- try {
3118
- H = ((de = JSON.parse(z.response)) == null ? void 0 : de.message) ?? L;
3119
- } catch {
3120
- }
3121
- s((H == null ? void 0 : H.message) ?? H), n("upload-error", M, L, z, H);
3122
- }), u.on("restriction-failed", (M, L) => {
3123
- s(L.message), n("restriction-failed", M, L);
3124
- }), e.useXHR) {
3125
- const { default: M } = await import("@uppy/xhr-upload");
3126
- if (d.isDisposed()) {
3127
- (k = u.destroy) == null || k.call(u);
3128
- return;
3129
- }
3130
- u.use(M, {
3131
- method: "POST",
3132
- endpoint: e.url,
3133
- headers: re(),
3134
- ...e.XHRConfig
3135
- });
3136
- }
3137
- d.add(() => {
3138
- var M;
3139
- g = !0, I(null);
3140
- try {
3141
- (M = u.destroy) == null || M.call(u);
3142
- } catch {
3143
- }
3144
- t.value = null;
3145
- }), t.value = u, e.showRestrictionCaption && (f.value = c((T = u.opts) == null ? void 0 : T.restrictions)), n("ready", u);
3146
- }), q(
3147
- () => {
3148
- var i;
3149
- return (i = l.form.value) == null ? void 0 : i.wasSuccessful;
3150
- },
3151
- (i, u) => {
3152
- i === !0 && u === !1 && t.value && (h = !0, t.value.cancelAll(), h = !1, l.model.value = e.multiple ? [] : null);
3153
- }
3154
- ), o({ uppy: () => t.value }), { ...l, uppy: t, area: a, caption: f, errorMessage: m };
3155
- }
3156
- }), ea = ["id"], na = {
3157
- key: 0,
3158
- class: "alert theme-danger text-center py-1 mb-2",
3159
- role: "alert"
3160
- }, ta = {
3161
- key: 1,
3162
- class: "uppy-input-area--caption form-text text-center fst-italic"
3163
- }, la = {
3164
- key: 2,
3165
- class: "invalid-feedback d-block"
3166
- };
3167
- function oa(e, n, o, l, r, d) {
3168
- const t = U("FilesList"), a = U("UppyDropzone"), f = U("UppyContextProvider");
3169
- return e.uppy ? (v(), b("div", {
3170
- key: 0,
3171
- ref: "area",
3172
- class: "uppy-input-area",
3173
- id: e.inputId
3174
- }, [
3175
- e.errorMessage ? (v(), b("div", na, N(e.errorMessage), 1)) : A("", !0),
3176
- te(f, {
3177
- name: "uu" + (e.name ?? "uppy"),
3178
- uppy: e.uppy
3179
- }, {
3180
- default: pe(() => [
3181
- j(e.$slots, "default", { uppy: e.uppy }, () => [
3182
- te(t, { class: "uppy-file-lists" }),
3183
- te(a, { class: "uppy-drop-zone" })
3184
- ])
3185
- ]),
3186
- _: 3
3187
- }, 8, ["name", "uppy"]),
3188
- e.caption ? (v(), b("div", ta, N(e.caption), 1)) : A("", !0),
3189
- e.isInvalid ? (v(), b("div", la, N(e.error), 1)) : A("", !0)
3190
- ], 8, ea)) : A("", !0);
3191
- }
3192
- const aa = /* @__PURE__ */ O(_o, [["render", oa]]);
3193
- function fa() {
3194
- const e = Z("form", null), n = Z("formApi", null);
3195
- return {
3196
- form: e,
3197
- submit: (...o) => {
3198
- var l;
3199
- return (l = n == null ? void 0 : n.submit) == null ? void 0 : l.call(n, ...o);
3200
- },
3201
- reset: () => {
3202
- var o;
3203
- return (o = n == null ? void 0 : n.reset) == null ? void 0 : o.call(n);
3204
- }
3205
- };
3206
- }
3207
- const ma = [
3208
- { country: "Afghanistan", code: "93", iso: "AF" },
3209
- { country: "Albania", code: "355", iso: "AL" },
3210
- { country: "Algeria", code: "213", iso: "DZ" },
3211
- { country: "American Samoa", code: "1-684", iso: "AS" },
3212
- { country: "Andorra", code: "376", iso: "AD" },
3213
- { country: "Angola", code: "244", iso: "AO" },
3214
- { country: "Anguilla", code: "1-264", iso: "AI" },
3215
- { country: "Antarctica", code: "672", iso: "AQ" },
3216
- { country: "Antigua and Barbuda", code: "1-268", iso: "AG" },
3217
- { country: "Argentina", code: "54", iso: "AR" },
3218
- { country: "Armenia", code: "374", iso: "AM" },
3219
- { country: "Aruba", code: "297", iso: "AW" },
3220
- { country: "Australia", code: "61", iso: "AU" },
3221
- { country: "Austria", code: "43", iso: "AT" },
3222
- { country: "Azerbaijan", code: "994", iso: "AZ" },
3223
- { country: "Bahamas", code: "1-242", iso: "BS" },
3224
- { country: "Bahrain", code: "973", iso: "BH" },
3225
- { country: "Bangladesh", code: "880", iso: "BD" },
3226
- { country: "Barbados", code: "1-246", iso: "BB" },
3227
- { country: "Belarus", code: "375", iso: "BY" },
3228
- { country: "Belgium", code: "32", iso: "BE" },
3229
- { country: "Belize", code: "501", iso: "BZ" },
3230
- { country: "Benin", code: "229", iso: "BJ" },
3231
- { country: "Bermuda", code: "1-441", iso: "BM" },
3232
- { country: "Bhutan", code: "975", iso: "BT" },
3233
- { country: "Bolivia", code: "591", iso: "BO" },
3234
- { country: "Bosnia and Herzegovina", code: "387", iso: "BA" },
3235
- { country: "Botswana", code: "267", iso: "BW" },
3236
- { country: "Brazil", code: "55", iso: "BR" },
3237
- { country: "British Indian Ocean Territory", code: "246", iso: "IO" },
3238
- { country: "British Virgin Islands", code: "1-284", iso: "VG" },
3239
- { country: "Brunei", code: "673", iso: "BN" },
3240
- { country: "Bulgaria", code: "359", iso: "BG" },
3241
- { country: "Burkina Faso", code: "226", iso: "BF" },
3242
- { country: "Burundi", code: "257", iso: "BI" },
3243
- { country: "Cambodia", code: "855", iso: "KH" },
3244
- { country: "Cameroon", code: "237", iso: "CM" },
3245
- { country: "Canada", code: "1", iso: "CA" },
3246
- { country: "Cape Verde", code: "238", iso: "CV" },
3247
- { country: "Cayman Islands", code: "1-345", iso: "KY" },
3248
- { country: "Central African Republic", code: "236", iso: "CF" },
3249
- { country: "Chad", code: "235", iso: "TD" },
3250
- { country: "Chile", code: "56", iso: "CL" },
3251
- { country: "China", code: "86", iso: "CN" },
3252
- { country: "Christmas Island", code: "61", iso: "CX" },
3253
- { country: "Cocos Islands", code: "61", iso: "CC" },
3254
- { country: "Colombia", code: "57", iso: "CO" },
3255
- { country: "Comoros", code: "269", iso: "KM" },
3256
- { country: "Cook Islands", code: "682", iso: "CK" },
3257
- { country: "Costa Rica", code: "506", iso: "CR" },
3258
- { country: "Croatia", code: "385", iso: "HR" },
3259
- { country: "Cuba", code: "53", iso: "CU" },
3260
- { country: "Curacao", code: "599", iso: "CW" },
3261
- { country: "Cyprus", code: "357", iso: "CY" },
3262
- { country: "Czech Republic", code: "420", iso: "CZ" },
3263
- { country: "Democratic Republic of the Congo", code: "243", iso: "CD" },
3264
- { country: "Denmark", code: "45", iso: "DK" },
3265
- { country: "Djibouti", code: "253", iso: "DJ" },
3266
- { country: "Dominica", code: "1-767", iso: "DM" },
3267
- { country: "Dominican Republic", code: "1-809, 1-829, 1-849", iso: "DO" },
3268
- { country: "East Timor", code: "670", iso: "TL" },
3269
- { country: "Ecuador", code: "593", iso: "EC" },
3270
- { country: "Egypt", code: "20", iso: "EG" },
3271
- { country: "El Salvador", code: "503", iso: "SV" },
3272
- { country: "Equatorial Guinea", code: "240", iso: "GQ" },
3273
- { country: "Eritrea", code: "291", iso: "ER" },
3274
- { country: "Estonia", code: "372", iso: "EE" },
3275
- { country: "Ethiopia", code: "251", iso: "ET" },
3276
- { country: "Falkland Islands", code: "500", iso: "FK" },
3277
- { country: "Faroe Islands", code: "298", iso: "FO" },
3278
- { country: "Fiji", code: "679", iso: "FJ" },
3279
- { country: "Finland", code: "358", iso: "FI" },
3280
- { country: "France", code: "33", iso: "FR" },
3281
- { country: "French Polynesia", code: "689", iso: "PF" },
3282
- { country: "Gabon", code: "241", iso: "GA" },
3283
- { country: "Gambia", code: "220", iso: "GM" },
3284
- { country: "Georgia", code: "995", iso: "GE" },
3285
- { country: "Germany", code: "49", iso: "DE" },
3286
- { country: "Ghana", code: "233", iso: "GH" },
3287
- { country: "Gibraltar", code: "350", iso: "GI" },
3288
- { country: "Greece", code: "30", iso: "GR" },
3289
- { country: "Greenland", code: "299", iso: "GL" },
3290
- { country: "Grenada", code: "1-473", iso: "GD" },
3291
- { country: "Guam", code: "1-671", iso: "GU" },
3292
- { country: "Guatemala", code: "502", iso: "GT" },
3293
- { country: "Guernsey", code: "44-1481", iso: "GG" },
3294
- { country: "Guinea", code: "224", iso: "GN" },
3295
- { country: "Guinea-Bissau", code: "245", iso: "GW" },
3296
- { country: "Guyana", code: "592", iso: "GY" },
3297
- { country: "Haiti", code: "509", iso: "HT" },
3298
- { country: "Honduras", code: "504", iso: "HN" },
3299
- { country: "Hong Kong", code: "852", iso: "HK" },
3300
- { country: "Hungary", code: "36", iso: "HU" },
3301
- { country: "Iceland", code: "354", iso: "IS" },
3302
- { country: "India", code: "91", iso: "IN" },
3303
- { country: "Indonesia", code: "62", iso: "ID" },
3304
- { country: "ایران", code: "98", iso: "IR" },
3305
- { country: "Iraq", code: "964", iso: "IQ" },
3306
- { country: "Ireland", code: "353", iso: "IE" },
3307
- { country: "Isle of Man", code: "44-1624", iso: "IM" },
3308
- { country: "Israel", code: "972", iso: "IL" },
3309
- { country: "Italy", code: "39", iso: "IT" },
3310
- { country: "Ivory Coast", code: "225", iso: "CI" },
3311
- { country: "Jamaica", code: "1-876", iso: "JM" },
3312
- { country: "Japan", code: "81", iso: "JP" },
3313
- { country: "Jersey", code: "44-1534", iso: "JE" },
3314
- { country: "Jordan", code: "962", iso: "JO" },
3315
- { country: "Kazakhstan", code: "7", iso: "KZ" },
3316
- { country: "Kenya", code: "254", iso: "KE" },
3317
- { country: "Kiribati", code: "686", iso: "KI" },
3318
- { country: "Kosovo", code: "383", iso: "XK" },
3319
- { country: "Kuwait", code: "965", iso: "KW" },
3320
- { country: "Kyrgyzstan", code: "996", iso: "KG" },
3321
- { country: "Laos", code: "856", iso: "LA" },
3322
- { country: "Latvia", code: "371", iso: "LV" },
3323
- { country: "Lebanon", code: "961", iso: "LB" },
3324
- { country: "Lesotho", code: "266", iso: "LS" },
3325
- { country: "Liberia", code: "231", iso: "LR" },
3326
- { country: "Libya", code: "218", iso: "LY" },
3327
- { country: "Liechtenstein", code: "423", iso: "LI" },
3328
- { country: "Lithuania", code: "370", iso: "LT" },
3329
- { country: "Luxembourg", code: "352", iso: "LU" },
3330
- { country: "Macao", code: "853", iso: "MO" },
3331
- { country: "Macedonia", code: "389", iso: "MK" },
3332
- { country: "Madagascar", code: "261", iso: "MG" },
3333
- { country: "Malawi", code: "265", iso: "MW" },
3334
- { country: "Malaysia", code: "60", iso: "MY" },
3335
- { country: "Maldives", code: "960", iso: "MV" },
3336
- { country: "Mali", code: "223", iso: "ML" },
3337
- { country: "Malta", code: "356", iso: "MT" },
3338
- { country: "Marshall Islands", code: "692", iso: "MH" },
3339
- { country: "Mauritania", code: "222", iso: "MR" },
3340
- { country: "Mauritius", code: "230", iso: "MU" },
3341
- { country: "Mayotte", code: "262", iso: "YT" },
3342
- { country: "Mexico", code: "52", iso: "MX" },
3343
- { country: "Micronesia", code: "691", iso: "FM" },
3344
- { country: "Moldova", code: "373", iso: "MD" },
3345
- { country: "Monaco", code: "377", iso: "MC" },
3346
- { country: "Mongolia", code: "976", iso: "MN" },
3347
- { country: "Montenegro", code: "382", iso: "ME" },
3348
- { country: "Montserrat", code: "1-664", iso: "MS" },
3349
- { country: "Morocco", code: "212", iso: "MA" },
3350
- { country: "Mozambique", code: "258", iso: "MZ" },
3351
- { country: "Myanmar", code: "95", iso: "MM" },
3352
- { country: "Namibia", code: "264", iso: "NA" },
3353
- { country: "Nauru", code: "674", iso: "NR" },
3354
- { country: "Nepal", code: "977", iso: "NP" },
3355
- { country: "Netherlands", code: "31", iso: "NL" },
3356
- { country: "Netherlands Antilles", code: "599", iso: "AN" },
3357
- { country: "New Caledonia", code: "687", iso: "NC" },
3358
- { country: "New Zealand", code: "64", iso: "NZ" },
3359
- { country: "Nicaragua", code: "505", iso: "NI" },
3360
- { country: "Niger", code: "227", iso: "NE" },
3361
- { country: "Nigeria", code: "234", iso: "NG" },
3362
- { country: "Niue", code: "683", iso: "NU" },
3363
- { country: "North Korea", code: "850", iso: "KP" },
3364
- { country: "Northern Mariana Islands", code: "1-670", iso: "MP" },
3365
- { country: "Norway", code: "47", iso: "NO" },
3366
- { country: "Oman", code: "968", iso: "OM" },
3367
- { country: "Pakistan", code: "92", iso: "PK" },
3368
- { country: "Palau", code: "680", iso: "PW" },
3369
- { country: "Palestine", code: "970", iso: "PS" },
3370
- { country: "Panama", code: "507", iso: "PA" },
3371
- { country: "Papua New Guinea", code: "675", iso: "PG" },
3372
- { country: "Paraguay", code: "595", iso: "PY" },
3373
- { country: "Peru", code: "51", iso: "PE" },
3374
- { country: "Philippines", code: "63", iso: "PH" },
3375
- { country: "Pitcairn", code: "64", iso: "PN" },
3376
- { country: "Poland", code: "48", iso: "PL" },
3377
- { country: "Portugal", code: "351", iso: "PT" },
3378
- { country: "Puerto Rico", code: "1-787, 1-939", iso: "PR" },
3379
- { country: "Qatar", code: "974", iso: "QA" },
3380
- { country: "Republic of the Congo", code: "242", iso: "CG" },
3381
- { country: "Reunion", code: "262", iso: "RE" },
3382
- { country: "Romania", code: "40", iso: "RO" },
3383
- { country: "Russia", code: "7", iso: "RU" },
3384
- { country: "Rwanda", code: "250", iso: "RW" },
3385
- { country: "Saint Barthelemy", code: "590", iso: "BL" },
3386
- { country: "Saint Helena", code: "290", iso: "SH" },
3387
- { country: "Saint Kitts and Nevis", code: "1-869", iso: "KN" },
3388
- { country: "Saint Lucia", code: "1-758", iso: "LC" },
3389
- { country: "Saint Martin", code: "590", iso: "MF" },
3390
- { country: "Saint Pierre and Miquelon", code: "508", iso: "PM" },
3391
- { country: "Saint Vincent and the Grenadines", code: "1-784", iso: "VC" },
3392
- { country: "Samoa", code: "685", iso: "WS" },
3393
- { country: "San Marino", code: "378", iso: "SM" },
3394
- { country: "Sao Tome and Principe", code: "239", iso: "ST" },
3395
- { country: "Saudi Arabia", code: "966", iso: "SA" },
3396
- { country: "Senegal", code: "221", iso: "SN" },
3397
- { country: "Serbia", code: "381", iso: "RS" },
3398
- { country: "Seychelles", code: "248", iso: "SC" },
3399
- { country: "Sierra Leone", code: "232", iso: "SL" },
3400
- { country: "Singapore", code: "65", iso: "SG" },
3401
- { country: "Sint Maarten", code: "1-721", iso: "SX" },
3402
- { country: "Slovakia", code: "421", iso: "SK" },
3403
- { country: "Slovenia", code: "386", iso: "SI" },
3404
- { country: "Solomon Islands", code: "677", iso: "SB" },
3405
- { country: "Somalia", code: "252", iso: "SO" },
3406
- { country: "South Africa", code: "27", iso: "ZA" },
3407
- { country: "South Korea", code: "82", iso: "KR" },
3408
- { country: "South Sudan", code: "211", iso: "SS" },
3409
- { country: "Spain", code: "34", iso: "ES" },
3410
- { country: "Sri Lanka", code: "94", iso: "LK" },
3411
- { country: "Sudan", code: "249", iso: "SD" },
3412
- { country: "Suriname", code: "597", iso: "SR" },
3413
- { country: "Svalbard and Jan Mayen", code: "47", iso: "SJ" },
3414
- { country: "Swaziland", code: "268", iso: "SZ" },
3415
- { country: "Sweden", code: "46", iso: "SE" },
3416
- { country: "Switzerland", code: "41", iso: "CH" },
3417
- { country: "Syria", code: "963", iso: "SY" },
3418
- { country: "Taiwan", code: "886", iso: "TW" },
3419
- { country: "Tajikistan", code: "992", iso: "TJ" },
3420
- { country: "Tanzania", code: "255", iso: "TZ" },
3421
- { country: "Thailand", code: "66", iso: "TH" },
3422
- { country: "Togo", code: "228", iso: "TG" },
3423
- { country: "Tokelau", code: "690", iso: "TK" },
3424
- { country: "Tonga", code: "676", iso: "TO" },
3425
- { country: "Trinidad and Tobago", code: "1-868", iso: "TT" },
3426
- { country: "Tunisia", code: "216", iso: "TN" },
3427
- { country: "Turkey", code: "90", iso: "TR" },
3428
- { country: "Turkmenistan", code: "993", iso: "TM" },
3429
- { country: "Turks and Caicos Islands", code: "1-649", iso: "TC" },
3430
- { country: "Tuvalu", code: "688", iso: "TV" },
3431
- { country: "U.S. Virgin Islands", code: "1-340", iso: "VI" },
3432
- { country: "Uganda", code: "256", iso: "UG" },
3433
- { country: "Ukraine", code: "380", iso: "UA" },
3434
- { country: "United Arab Emirates", code: "971", iso: "AE" },
3435
- { country: "United Kingdom", code: "44", iso: "GB" },
3436
- { country: "United States", code: "1", iso: "US" },
3437
- { country: "Uruguay", code: "598", iso: "UY" },
3438
- { country: "Uzbekistan", code: "998", iso: "UZ" },
3439
- { country: "Vanuatu", code: "678", iso: "VU" },
3440
- { country: "Vatican", code: "379", iso: "VA" },
3441
- { country: "Venezuela", code: "58", iso: "VE" },
3442
- { country: "Vietnam", code: "84", iso: "VN" },
3443
- { country: "Wallis and Futuna", code: "681", iso: "WF" },
3444
- { country: "Western Sahara", code: "212", iso: "EH" },
3445
- { country: "Yemen", code: "967", iso: "YE" },
3446
- { country: "Zambia", code: "260", iso: "ZM" },
3447
- { country: "Zimbabwe", code: "263", iso: "ZW" }
3448
- ], ia = _e, ra = on, ua = De, sa = {
3449
- AmountInput: wn,
3450
- CaptchaInput: En,
3451
- CheckboxButtonInput: Dn,
3452
- CheckboxInput: jn,
3453
- CheckboxToggle: Xn,
3454
- ChipsInput: _n,
3455
- ComboboxInput: _e,
3456
- DropzoneInput: It,
3457
- EditorInput: Mt,
3458
- EmailInput: Ot,
3459
- FileInput: en,
3460
- FormAdornInput: De,
3461
- FormContainer: ul,
3462
- FormField: bl,
3463
- FormLabel: nn,
3464
- GroupControl: tn,
3465
- LocationInput: Al,
3466
- MobileInput: Ol,
3467
- MultiQuantityInput: Wl,
3468
- OTPInput: _l,
3469
- PasswordInput: uo,
3470
- PersianDatePickerInput: po,
3471
- QuantityInput: ln,
3472
- RangeInput: on,
3473
- SimpleUploader: So,
3474
- StarRatingInput: Bo,
3475
- SubmitButton: Vo,
3476
- SwitchInput: Po,
3477
- TelInput: Ho,
3478
- TextAreaInput: Zo,
3479
- TextInput: Ie,
3480
- UppyInput: aa,
3481
- // aliases
3482
- Select2Input: ia,
3483
- RangeSliderInput: ra,
3484
- FormAdorn: ua
3485
- }, pa = {
3486
- install(e, n = {}) {
3487
- (n.locale || n.messages) && hn(n), n.bootstrap && Jn(n.bootstrap), Object.entries(sa).forEach(([o, l]) => e.component(o, l));
3488
- }
3489
- };
3490
- export {
3491
- wn as AmountInput,
3492
- En as CaptchaInput,
3493
- Dn as CheckboxButtonInput,
3494
- jn as CheckboxInput,
3495
- Xn as CheckboxToggle,
3496
- _n as ChipsInput,
3497
- _e as ComboboxInput,
3498
- It as DropzoneInput,
3499
- Mt as EditorInput,
3500
- Ot as EmailInput,
3501
- en as FileInput,
3502
- ua as FormAdorn,
3503
- De as FormAdornInput,
3504
- ul as FormContainer,
3505
- bl as FormField,
3506
- nn as FormLabel,
3507
- tn as GroupControl,
3508
- Al as LocationInput,
3509
- Ol as MobileInput,
3510
- Wl as MultiQuantityInput,
3511
- _l as OTPInput,
3512
- uo as PasswordInput,
3513
- po as PersianDatePickerInput,
3514
- ln as QuantityInput,
3515
- on as RangeInput,
3516
- ra as RangeSliderInput,
3517
- ia as Select2Input,
3518
- So as SimpleUploader,
3519
- Bo as StarRatingInput,
3520
- Vo as SubmitButton,
3521
- Po as SwitchInput,
3522
- Ho as TelInput,
3523
- Zo as TextAreaInput,
3524
- Ie as TextInput,
3525
- aa as UppyInput,
3526
- Jn as configureBootstrap,
3527
- hn as configureI18n,
3528
- ma as countryCodes,
3529
- pa as default,
3530
- R as fieldProps,
3531
- Fe as toEnglishDigits,
3532
- se as useBsInstance,
3533
- ye as useDisposables,
3534
- P as useField,
3535
- fa as useFormApi
3536
- };