qmap-forms 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.es.js CHANGED
@@ -1,27 +1,110 @@
1
- import { n as e, r as t, t as n } from "./FieldControl-D0e9k9sx.mjs";
2
- import { Fragment as r, Teleport as i, computed as a, createApp as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, defineAsyncComponent as m, defineComponent as h, h as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onBeforeMount as b, onBeforeUnmount as x, onMounted as S, onUnmounted as C, openBlock as w, ref as T, renderList as E, renderSlot as D, resolveComponent as O, resolveDynamicComponent as k, toDisplayString as A, unref as j, vModelCheckbox as M, vModelRadio as N, vModelSelect as P, vModelText as F, vShow as I, watch as L, withCtx as R, withDirectives as z, withKeys as B, withModifiers as V } from "vue";
3
- import { DateTime as H } from "luxon";
4
- import { BehaviorSubject as U, Subject as W } from "rxjs";
5
- //#region src/components/qArray.vue?vue&type=script&setup=true&lang.ts
6
- var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1
+ import { Fragment as e, Teleport as t, computed as n, createApp as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineAsyncComponent as d, defineComponent as f, h as p, inject as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeMount as v, onBeforeUnmount as y, onMounted as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, renderSlot as E, resolveComponent as D, resolveDynamicComponent as O, toDisplayString as k, unref as A, vModelCheckbox as j, vModelRadio as M, vModelSelect as N, vModelText as P, vShow as F, watch as I, withCtx as L, withDirectives as R, withKeys as z, withModifiers as B } from "vue";
2
+ import { DateTime as V } from "luxon";
3
+ import { BehaviorSubject as H, Subject as U } from "rxjs";
4
+ import "leaflet-editable";
5
+ import "leaflet";
6
+ //#region \0rolldown/runtime.js
7
+ var ee = /* @__PURE__ */ f({
8
+ __name: "BtnTooltip",
9
+ props: { label: {} },
10
+ setup(n) {
11
+ let r = w(!1), c = w({
12
+ top: "50px",
13
+ left: "50px",
14
+ position: "absolute",
15
+ zIndex: "999"
16
+ });
17
+ w(null);
18
+ let l = w(null), u = w(null), d = `info-btn-tooltip-${Math.random().toString(36).slice(2)}`;
19
+ function f() {
20
+ r.value || (r.value = !0, h(() => {
21
+ g();
22
+ }), document.addEventListener("mousedown", m));
23
+ }
24
+ function p() {
25
+ r.value = !1, document.removeEventListener("mousedown", m);
26
+ }
27
+ function m(e) {
28
+ u.value && l.value && !u.value.contains(e.target) && !l.value.contains(e.target) && p();
29
+ }
30
+ function g() {
31
+ if (l.value && u.value) {
32
+ let e = l.value.getBoundingClientRect(), t = u.value.getBoundingClientRect(), n = e.bottom + window.scrollY + 8, r = Math.max(e.left + window.scrollX + e.width / 2 - t.width / 2, 0);
33
+ c.value = {
34
+ top: `${n}px`,
35
+ left: `${r}px`,
36
+ position: "absolute",
37
+ zIndex: "999"
38
+ };
39
+ }
40
+ }
41
+ return y(() => {
42
+ document.removeEventListener("mousedown", m);
43
+ }), (m, h) => (S(), o(e, null, [s("button", {
44
+ ref_key: "button",
45
+ ref: l,
46
+ onClick: f,
47
+ onBlur: p,
48
+ onMouseover: f,
49
+ class: "qmap-button",
50
+ onMouseleave: p,
51
+ onKeydown: z(p, ["esc"]),
52
+ style: {
53
+ border: "none",
54
+ background: "none"
55
+ },
56
+ "aria-describedby": d
57
+ }, [E(m.$slots, "default")], 544), (S(), i(t, { to: "body" }, [r.value ? (S(), o("div", {
58
+ key: 0,
59
+ id: d,
60
+ class: "tooltip",
61
+ style: _(c.value),
62
+ ref_key: "tooltip",
63
+ ref: u,
64
+ tabindex: "-1"
65
+ }, k(n.label), 5)) : a("", !0)]))], 64));
66
+ }
67
+ }), W = /* @__PURE__ */ f({
68
+ __name: "subtitle-button",
69
+ props: { qMap: {} },
70
+ setup(e) {
71
+ return (t, n) => e.qMap.subtitle ? (S(), i(ee, {
72
+ key: 0,
73
+ label: e.qMap.subtitle
74
+ }, {
75
+ default: L(() => [...n[0] ||= [s("i", { class: "fa fa-question-circle" }, null, -1)]]),
76
+ _: 1
77
+ }, 8, ["label"])) : a("", !0);
78
+ }
79
+ }), G = { class: "block" }, K = /* @__PURE__ */ f({
80
+ __name: "title-block",
81
+ props: { qMap: {} },
82
+ setup(e) {
83
+ return (t, n) => (S(), o("span", G, [
84
+ l(k(e.qMap.title || (e.qMap.id !== "#" && e.qMap.type !== "col" && e.qMap.type !== "group" ? e.qMap.id : "")) + " ", 1),
85
+ E(t.$slots, "default"),
86
+ u(W, { "q-map": e.qMap }, null, 8, ["q-map"])
87
+ ]));
88
+ }
89
+ }), q = { class: "my-2 flex flex-row items-center justify-between" }, te = {
7
90
  key: 0,
8
91
  class: "qmap_array--unset"
9
- }, K = {
92
+ }, J = {
10
93
  key: 1,
11
94
  class: "qmap_array--set"
12
- }, q = {
95
+ }, ne = {
13
96
  key: 0,
14
97
  class: "qmap-card min-w-0 p-6 text-center qmap-empty"
15
- }, J = {
98
+ }, re = {
16
99
  key: 1,
17
100
  class: ""
18
- }, te = {
101
+ }, ie = {
19
102
  key: 0,
20
103
  class: "qmap-card min-w-0 p-3"
21
- }, Y = { class: "flex flex-col" }, ne = { class: "flex items-center gap-3 py-2 qmap-list-row" }, re = { class: "flex-1 min-w-0" }, ie = ["onClick"], X = {
104
+ }, Y = { class: "flex flex-col" }, ae = { class: "flex items-center gap-3 py-2 qmap-list-row" }, oe = { class: "flex-1 min-w-0" }, se = ["onClick"], ce = {
22
105
  key: 1,
23
106
  class: "mt-2 flex flex-col gap-2"
24
- }, ae = { class: "qmap-card min-w-0 p-3 flex flex-row items-center gap-2" }, oe = { class: "flex-1 min-w-0 flex flex-col gap-2 qmap_sub_group mt-2" }, se = ["onClick"], ce = /* @__PURE__ */ h({
107
+ }, le = { class: "qmap-card min-w-0 p-3 flex flex-row items-center gap-2" }, ue = { class: "flex-1 min-w-0 flex flex-col gap-2 qmap_sub_group mt-2" }, de = ["onClick"], fe = /* @__PURE__ */ f({
25
108
  __name: "qArray",
26
109
  props: {
27
110
  qMap: {},
@@ -35,46 +118,46 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
35
118
  },
36
119
  emits: ["qmap_change", "qmap_subquestions"],
37
120
  setup(t, { emit: n }) {
38
- let i = t, a = n, o = T();
39
- b(() => {
40
- let e = i.model[i.qMap.id];
41
- e && i.qMap.item ? o.value = e.slice().map((e) => ({ "#": e })) : e ? o.value = e : !e && i.qMap.required && (o.value = []);
42
- }), L(o, (e) => {
43
- m(e);
121
+ let r = t, c = n, l = w();
122
+ v(() => {
123
+ let e = r.model[r.qMap.id];
124
+ e && r.qMap.item ? l.value = e.slice().map((e) => ({ "#": e })) : e ? l.value = e : !e && r.qMap.required && (l.value = []);
125
+ }), I(l, (e) => {
126
+ p(e);
44
127
  });
45
128
  function d() {
46
- var e = o.value.slice();
47
- i.qMap.item ? e.push({ "#": "" }) : e.push({}), o.value = e, m(o.value);
129
+ var e = l.value.slice();
130
+ r.qMap.item ? e.push({ "#": "" }) : e.push({}), l.value = e, p(l.value);
48
131
  }
49
132
  function f(e, t) {
50
- m(o.value);
133
+ p(l.value);
51
134
  }
52
- function m(e) {
53
- i.qMap.item ? i.model[i.qMap.id] = e.map((e) => e["#"]) : i.model[i.qMap.id] = e.slice(), a("qmap_change", {
54
- qMap: i.qMap,
55
- value: i.model[i.qMap.id]
135
+ function p(e) {
136
+ r.qMap.item ? r.model[r.qMap.id] = e.map((e) => e["#"]) : r.model[r.qMap.id] = e.slice(), c("qmap_change", {
137
+ qMap: r.qMap,
138
+ value: r.model[r.qMap.id]
56
139
  });
57
140
  }
58
- function h(e) {
59
- var t = o.value.slice();
60
- t.splice(e, 1), o.value = t;
141
+ function m(e) {
142
+ var t = l.value.slice();
143
+ t.splice(e, 1), l.value = t;
61
144
  }
62
- return (n, i) => (w(), l("div", null, [u("div", G, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), o.value ? (w(), l("div", K, [u("button", {
145
+ return (n, r) => (S(), o("div", null, [s("div", q, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), l.value ? (S(), o("div", J, [s("button", {
63
146
  type: "button",
64
147
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
65
148
  "aria-label": "Add item",
66
- onClick: i[1] ||= (e) => d()
67
- }, "+")])) : (w(), l("div", ee, [u("button", {
149
+ onClick: r[1] ||= (e) => d()
150
+ }, "+")])) : (S(), o("div", te, [s("button", {
68
151
  type: "button",
69
152
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
70
153
  "aria-label": "Add item",
71
- onClick: i[0] ||= (e) => {
72
- o.value = [], d();
154
+ onClick: r[0] ||= (e) => {
155
+ l.value = [], d();
73
156
  }
74
- }, "+")]))]), !o.value || !o.value.length ? (w(), l("div", q, [...i[2] ||= [u("i", null, "Not set", -1)]])) : (w(), l("div", J, [t.qMap.item ? (w(), l("div", te, [u("div", Y, [(w(!0), l(r, null, E(o.value, (e, n) => (w(), l("div", ne, [u("div", re, [p(Q, {
157
+ }, "+")]))]), !l.value || !l.value.length ? (S(), o("div", ne, [...r[2] ||= [s("i", null, "Not set", -1)]])) : (S(), o("div", re, [t.qMap.item ? (S(), o("div", ie, [s("div", Y, [(S(!0), o(e, null, T(l.value, (e, n) => (S(), o("div", ae, [s("div", oe, [u(Q, {
75
158
  qMap: t.qMap.item,
76
- modelValue: o.value[n],
77
- "onUpdate:modelValue": [(e) => o.value[n] = e, (e) => f(n, e)],
159
+ modelValue: l.value[n],
160
+ "onUpdate:modelValue": [(e) => l.value[n] = e, (e) => f(n, e)],
78
161
  extras: t.extras,
79
162
  provider: t.provider,
80
163
  readOnly: t.readOnly || t.qMap.readOnly
@@ -85,15 +168,15 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
85
168
  "extras",
86
169
  "provider",
87
170
  "readOnly"
88
- ])]), u("button", {
171
+ ])]), s("button", {
89
172
  type: "button",
90
173
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
91
174
  "aria-label": "Remove item",
92
- onClick: (e) => h(n)
93
- }, [...i[3] ||= [u("i", { class: "fa fa-trash" }, null, -1)]], 8, ie)]))), 256))])])) : t.qMap.items ? (w(), l("div", X, [(w(!0), l(r, null, E(o.value, (e, n) => (w(), l("div", ae, [u("div", oe, [(w(!0), l(r, null, E(t.qMap.items, (e) => (w(), s(Q, {
175
+ onClick: (e) => m(n)
176
+ }, [...r[3] ||= [s("i", { class: "fa fa-trash" }, null, -1)]], 8, se)]))), 256))])])) : t.qMap.items ? (S(), o("div", ce, [(S(!0), o(e, null, T(l.value, (n, a) => (S(), o("div", le, [s("div", ue, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), i(Q, {
94
177
  qMap: e,
95
- modelValue: o.value[n],
96
- "onUpdate:modelValue": [(e) => o.value[n] = e, (e) => f(n, e)],
178
+ modelValue: l.value[a],
179
+ "onUpdate:modelValue": [(e) => l.value[a] = e, (e) => f(a, e)],
97
180
  extras: t.extras,
98
181
  provider: t.provider,
99
182
  lite: t.lite,
@@ -106,18 +189,18 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
106
189
  "provider",
107
190
  "lite",
108
191
  "readOnly"
109
- ]))), 256))]), u("button", {
192
+ ]))), 256))]), s("button", {
110
193
  type: "button",
111
194
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
112
195
  "aria-label": "Remove item",
113
- onClick: (e) => h(n)
114
- }, [...i[4] ||= [u("i", { class: "fa fa-times" }, null, -1)]], 8, se)]))), 256))])) : c("", !0)]))]));
196
+ onClick: (e) => m(a)
197
+ }, [...r[4] ||= [s("i", { class: "fa fa-times" }, null, -1)]], 8, de)]))), 256))])) : a("", !0)]))]));
115
198
  }
116
- }), le = { class: "flex items-center gap-1" }, ue = [
199
+ }), pe = { class: "flex items-center gap-1" }, me = [
117
200
  "aria-checked",
118
201
  "aria-label",
119
202
  "disabled"
120
- ], de = /*@__PURE__*/ h({
203
+ ], he = /*@__PURE__*/ f({
121
204
  __name: "ToggleSwitch",
122
205
  props: {
123
206
  modelValue: { type: Boolean },
@@ -127,58 +210,58 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
127
210
  },
128
211
  emits: ["update:modelValue"],
129
212
  setup(e, { emit: t }) {
130
- let n = e, r = t, i = a(() => n.modelValue);
131
- function o() {
132
- n.allowUndefined ? i.value === void 0 ? r("update:modelValue", !1) : i.value === !1 ? r("update:modelValue", !0) : r("update:modelValue", void 0) : r("update:modelValue", i.value !== !0);
213
+ let r = e, i = t, a = n(() => r.modelValue);
214
+ function c() {
215
+ r.allowUndefined ? a.value === void 0 ? i("update:modelValue", !1) : a.value === !1 ? i("update:modelValue", !0) : i("update:modelValue", void 0) : i("update:modelValue", a.value !== !0);
133
216
  }
134
- let s = a(() => [
135
- i.value === !0 && "toggle-checked",
136
- i.value === !1 && "toggle-unchecked",
137
- i.value === void 0 && "toggle-indeterminate",
138
- n.disabled === !0 && "toggle-disabled"
139
- ].filter(Boolean).join(" ")), c = a(() => [
140
- i.value === !0 && "slider-checked",
141
- i.value === !1 && "slider-unchecked",
142
- i.value === void 0 && "slider-indeterminate"
217
+ let l = n(() => [
218
+ a.value === !0 && "toggle-checked",
219
+ a.value === !1 && "toggle-unchecked",
220
+ a.value === void 0 && "toggle-indeterminate",
221
+ r.disabled === !0 && "toggle-disabled"
222
+ ].filter(Boolean).join(" ")), u = n(() => [
223
+ a.value === !0 && "slider-checked",
224
+ a.value === !1 && "slider-unchecked",
225
+ a.value === void 0 && "slider-indeterminate"
143
226
  ].filter(Boolean).join(" "));
144
- return (t, n) => (w(), l("span", le, [u("button", {
227
+ return (t, n) => (S(), o("span", pe, [s("button", {
145
228
  type: "button",
146
- class: v(["toggle-root", s.value]),
147
- onClick: o,
148
- "aria-checked": String(i.value),
229
+ class: g(["toggle-root", l.value]),
230
+ onClick: c,
231
+ "aria-checked": String(a.value),
149
232
  "aria-label": e.ariaLabel,
150
233
  disabled: e.disabled
151
- }, [u("span", { class: v(["toggle-slider", c.value]) }, null, 2)], 10, ue), D(t.$slots, "default", {}, void 0, !0)]));
234
+ }, [s("span", { class: g(["toggle-slider", u.value]) }, null, 2)], 10, me), E(t.$slots, "default", {}, void 0, !0)]));
152
235
  }
153
- }), fe = (e, t) => {
236
+ }), ge = (e, t) => {
154
237
  let n = e.__vccOpts || e;
155
238
  for (let [e, r] of t) n[e] = r;
156
239
  return n;
157
- }, pe = /*#__PURE__*/ fe(de, [["__scopeId", "data-v-edf9fc7d"]]), me = {
240
+ }, _e = /*#__PURE__*/ ge(he, [["__scopeId", "data-v-edf9fc7d"]]), ve = {
158
241
  key: 0,
159
242
  class: "inline-flex items-center gap-2"
160
- }, he = ["for"], ge = {
243
+ }, ye = ["for"], be = {
161
244
  key: 0,
162
245
  class: "qmap-required"
163
- }, _e = {
246
+ }, xe = {
164
247
  key: 1,
165
248
  class: "qmap-required"
166
- }, ve = {
249
+ }, Se = {
167
250
  key: 2,
168
251
  class: "qmap-button-field sm:flex items-center"
169
- }, ye = { class: "sm:w-1/2 md:w-1/4 lg:w-1/5" }, be = {
252
+ }, Ce = { class: "sm:w-1/2 md:w-1/4 lg:w-1/5" }, we = {
170
253
  key: 0,
171
254
  class: "qmap-required"
172
- }, xe = {
255
+ }, Te = {
173
256
  class: "btn-group sm:w-1/2 md:w-2/4 lg:w-1/4 flex",
174
257
  role: "group"
175
- }, Se = ["aria-pressed", "disabled"], Ce = ["aria-pressed", "disabled"], we = ["for"], Te = ["id", "disabled"], Ee = {
258
+ }, Ee = ["aria-pressed", "disabled"], De = ["aria-pressed", "disabled"], Oe = ["for"], ke = ["id", "disabled"], Ae = {
176
259
  key: 0,
177
260
  class: "qmap-required"
178
- }, De = {
261
+ }, je = {
179
262
  key: 1,
180
263
  class: "qmap-required"
181
- }, Oe = /* @__PURE__ */ h({
264
+ }, Me = /* @__PURE__ */ f({
182
265
  __name: "qBool",
183
266
  props: {
184
267
  qMap: {},
@@ -191,94 +274,118 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
191
274
  style: {}
192
275
  },
193
276
  emits: ["qmap_change", "qmap_subquestions"],
194
- setup(t, { emit: n }) {
195
- let r = t, i = n, a = T(r.model[r.qMap.id]);
196
- L(a, (e) => i("qmap_subquestions", e === !0 ? r.qMap.onPos : e === !1 ? r.qMap.onNeg : void 0)), L(() => r.model, (e) => a.value = e[r.qMap.id]), b(() => i("qmap_subquestions", a.value === !0 ? r.qMap.onPos : a.value === !1 ? r.qMap.onNeg : void 0));
197
- function o(e) {
198
- r.model[r.qMap.id] = e, i("qmap_change", {
199
- qMap: r.qMap,
277
+ setup(e, { emit: t }) {
278
+ let n = e, r = t, c = w(n.model[n.qMap.id]);
279
+ I(c, (e) => r("qmap_subquestions", e === !0 ? n.qMap.onPos : e === !1 ? n.qMap.onNeg : void 0)), I(() => n.model, (e) => c.value = e[n.qMap.id]), v(() => r("qmap_subquestions", c.value === !0 ? n.qMap.onPos : c.value === !1 ? n.qMap.onNeg : void 0));
280
+ function l(e) {
281
+ n.model[n.qMap.id] = e, r("qmap_change", {
282
+ qMap: n.qMap,
200
283
  value: e
201
284
  });
202
285
  }
203
286
  function d(e) {
204
- a.value = e, o(e);
287
+ c.value = e, l(e);
205
288
  }
206
- return (n, r) => t.lite && t.readOnly ? (w(), l("span", me, A(a.value ? "✓" : "□"), 1)) : t.qMap.style === "switch" ? (w(), l("label", {
289
+ return (t, n) => e.lite && e.readOnly ? (S(), o("span", ve, k(c.value ? "✓" : "□"), 1)) : e.qMap.style === "switch" ? (S(), o("label", {
207
290
  key: 1,
208
291
  class: "inline-flex items-center gap-2 min-h-8 qmap-check-row",
209
- for: t.qMap.id
210
- }, [p(pe, {
211
- modelValue: a.value,
212
- "onUpdate:modelValue": [r[0] ||= (e) => a.value = e, d],
213
- disabled: t.readOnly
214
- }, null, 8, ["modelValue", "disabled"]), t.lite ? t.qMap.required ? (w(), l("span", _e, [...r[6] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0) : (w(), s(e, {
292
+ for: e.qMap.id
293
+ }, [u(_e, {
294
+ modelValue: c.value,
295
+ "onUpdate:modelValue": [n[0] ||= (e) => c.value = e, d],
296
+ disabled: e.readOnly
297
+ }, null, 8, ["modelValue", "disabled"]), e.lite ? e.qMap.required ? (S(), o("span", xe, [...n[6] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0) : (S(), i(K, {
215
298
  key: 0,
216
- "q-map": t.qMap
299
+ "q-map": e.qMap
217
300
  }, {
218
- default: R(() => [t.qMap.required ? (w(), l("span", ge, [...r[5] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0)]),
301
+ default: L(() => [e.qMap.required ? (S(), o("span", be, [...n[5] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
219
302
  _: 1
220
- }, 8, ["q-map"]))], 8, he)) : t.qMap.style === "button" ? (w(), l("div", ve, [u("div", ye, [p(e, { "q-map": t.qMap }, {
221
- default: R(() => [t.qMap.required ? (w(), l("span", be, [...r[7] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0)]),
303
+ }, 8, ["q-map"]))], 8, ye)) : e.qMap.style === "button" ? (S(), o("div", Se, [s("div", Ce, [u(K, { "q-map": e.qMap }, {
304
+ default: L(() => [e.qMap.required ? (S(), o("span", we, [...n[7] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
222
305
  _: 1
223
- }, 8, ["q-map"])]), u("div", xe, [u("button", {
306
+ }, 8, ["q-map"])]), s("div", Te, [s("button", {
224
307
  type: "button",
225
- "aria-pressed": a.value === !0,
226
- class: v(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": a.value === !0 }]),
227
- disabled: t.readOnly,
228
- onClick: r[1] ||= (e) => d(!0)
229
- }, A(t.qMap.pos || "Yes"), 11, Se), u("button", {
308
+ "aria-pressed": c.value === !0,
309
+ class: g(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": c.value === !0 }]),
310
+ disabled: e.readOnly,
311
+ onClick: n[1] ||= (e) => d(!0)
312
+ }, k(e.qMap.pos || "Yes"), 11, Ee), s("button", {
230
313
  type: "button",
231
- "aria-pressed": a.value === !1,
232
- class: v(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": a.value === !1 }]),
233
- disabled: t.readOnly,
234
- onClick: r[2] ||= (e) => d(!1)
235
- }, A(t.qMap.neg || "No"), 11, Ce)])])) : (w(), l("label", {
314
+ "aria-pressed": c.value === !1,
315
+ class: g(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": c.value === !1 }]),
316
+ disabled: e.readOnly,
317
+ onClick: n[2] ||= (e) => d(!1)
318
+ }, k(e.qMap.neg || "No"), 11, De)])])) : (S(), o("label", {
236
319
  key: 3,
237
320
  class: "inline-flex items-center gap-2 min-h-8 my-2 qmap-check-row",
238
- for: t.qMap.id
239
- }, [z(u("input", {
240
- id: t.qMap.id,
241
- "onUpdate:modelValue": r[3] ||= (e) => a.value = e,
321
+ for: e.qMap.id
322
+ }, [R(s("input", {
323
+ id: e.qMap.id,
324
+ "onUpdate:modelValue": n[3] ||= (e) => c.value = e,
242
325
  type: "checkbox",
243
326
  class: "qmap-checkbox",
244
- disabled: t.readOnly,
245
- onChange: r[4] ||= (e) => o(a.value)
246
- }, null, 40, Te), [[M, a.value]]), t.lite ? t.qMap.required && !a.value ? (w(), l("span", De, [...r[9] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0) : (w(), s(e, {
327
+ disabled: e.readOnly,
328
+ onChange: n[4] ||= (e) => l(c.value)
329
+ }, null, 40, ke), [[j, c.value]]), e.lite ? e.qMap.required && !c.value ? (S(), o("span", je, [...n[9] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0) : (S(), i(K, {
247
330
  key: 0,
248
- "q-map": t.qMap
331
+ "q-map": e.qMap
249
332
  }, {
250
- default: R(() => [t.qMap.required && !a.value ? (w(), l("span", Ee, [...r[8] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0)]),
333
+ default: L(() => [e.qMap.required && !c.value ? (S(), o("span", Ae, [...n[8] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
251
334
  _: 1
252
- }, 8, ["q-map"]))], 8, we));
335
+ }, 8, ["q-map"]))], 8, Oe));
336
+ }
337
+ }), Ne = {
338
+ key: 0,
339
+ class: "inline-flex shrink-0 items-center gap-1 qmap-control-prepend"
340
+ }, Pe = {
341
+ key: 1,
342
+ class: "inline-flex shrink-0 items-center gap-1 qmap-control-append"
343
+ }, X = /* @__PURE__ */ f({
344
+ __name: "FieldControl",
345
+ props: {
346
+ invalid: { type: Boolean },
347
+ disabled: { type: Boolean },
348
+ multiline: { type: Boolean }
349
+ },
350
+ setup(e) {
351
+ return (t, n) => (S(), o("div", { class: g(["flex items-center gap-2 min-w-0 min-h-10 px-3 qmap-control", {
352
+ "items-start": e.multiline,
353
+ "qmap-control-invalid": e.invalid,
354
+ "qmap-control-disabled": e.disabled
355
+ }]) }, [
356
+ t.$slots.prepend ? (S(), o("div", Ne, [E(t.$slots, "prepend")])) : a("", !0),
357
+ E(t.$slots, "default"),
358
+ t.$slots.append ? (S(), o("div", Pe, [E(t.$slots, "append")])) : a("", !0)
359
+ ], 2));
253
360
  }
254
- }), ke = {
361
+ }), Fe = {
255
362
  key: 0,
256
363
  class: "inline-flex items-center gap-2"
257
- }, Ae = { class: "qmap-field flex flex-col gap-1.5 min-w-0 text-sm" }, je = [
364
+ }, Ie = { class: "qmap-field flex flex-col gap-1.5 min-w-0 text-sm" }, Le = [
258
365
  "aria-expanded",
259
366
  "aria-label",
260
367
  "disabled",
261
368
  "onKeydown"
262
- ], Me = {
369
+ ], Re = {
263
370
  key: 0,
264
371
  class: "qmap-required",
265
372
  "aria-hidden": "true"
266
- }, Ne = {
373
+ }, ze = {
267
374
  key: 1,
268
375
  class: "absolute z-50 top-full left-0 mt-1 w-9/10 overflow-hidden qmap-select-dropdown"
269
- }, Pe = { class: "flex items-center gap-2 px-3 py-2 qmap-select-search-wrap" }, Fe = ["aria-multiselectable"], Ie = [
376
+ }, Be = { class: "flex items-center gap-2 px-3 py-2 qmap-select-search-wrap" }, Ve = ["aria-multiselectable"], He = [
270
377
  "aria-selected",
271
378
  "onMouseenter",
272
379
  "onKeydown",
273
380
  "onClick"
274
- ], Le = {
381
+ ], Ue = {
275
382
  key: 0,
276
383
  class: "inline-flex w-4 justify-center",
277
384
  "aria-hidden": "true"
278
- }, Re = { class: "flex-1 min-w-0" }, ze = {
385
+ }, We = { class: "flex-1 min-w-0" }, Ge = {
279
386
  key: 0,
280
387
  class: "m-0 p-3 text-center qmap-select-empty"
281
- }, Be = /* @__PURE__ */ h({
388
+ }, Ke = /* @__PURE__ */ f({
282
389
  __name: "SimpleChoice",
283
390
  props: {
284
391
  modelValue: {},
@@ -289,214 +396,214 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
289
396
  required: { type: Boolean }
290
397
  },
291
398
  emits: ["update:model-value"],
292
- setup(t, { emit: i }) {
293
- let o = t, m = i, h = T(), g = T(), b = [], C = T(!1), O = T(""), k = T(0), j = T([]), M = T(o.multi ? [] : void 0), N = `qmap-select-${Math.random().toString(36).slice(2)}`, P = {
399
+ setup(t, { emit: r }) {
400
+ let d = t, f = r, p = w(), m = w(), v = [], x = w(!1), C = w(""), D = w(0), O = w([]), A = w(d.multi ? [] : void 0), j = `qmap-select-${Math.random().toString(36).slice(2)}`, M = {
294
401
  title: "Not set",
295
402
  value: null,
296
403
  icon: "fa fa-ban",
297
404
  colour: "#71717a"
298
- }, I = a(() => {
299
- let e = O.value.trim().toLocaleLowerCase();
300
- return e ? j.value.filter((t) => G(t).toLocaleLowerCase().includes(e)) : j.value;
301
- }), H = a(() => o.multi ? I.value : [P, ...I.value]), U = a(() => o.multi ? o.qMap.icon : M.value?.icon), W = a(() => o.multi ? (M.value || []).map((e) => G(e)).join(", ") || "Select…" : M.value?.value == null ? "Not set" : G(M.value));
302
- L(() => o.qMap.values, ee, {
405
+ }, N = n(() => {
406
+ let e = C.value.trim().toLocaleLowerCase();
407
+ return e ? O.value.filter((t) => U(t).toLocaleLowerCase().includes(e)) : O.value;
408
+ }), F = n(() => d.multi ? N.value : [M, ...N.value]), V = n(() => d.multi ? d.qMap.icon : A.value?.icon), H = n(() => d.multi ? (A.value || []).map((e) => U(e)).join(", ") || "Select…" : A.value?.value == null ? "Not set" : U(A.value));
409
+ I(() => d.qMap.values, ee, {
303
410
  immediate: !0,
304
411
  deep: !0
305
- }), L(() => o.modelValue, (e) => {
306
- M.value = K(e);
307
- }, { immediate: !0 }), L(() => o.multi, () => {
308
- M.value = K(o.modelValue), J();
309
- }), L(I, (e) => {
310
- k.value = Math.min(k.value, Math.max(0, H.value.length - 1));
311
- }), L(O, () => {
312
- k.value = 0;
412
+ }), I(() => d.modelValue, (e) => {
413
+ A.value = W(e);
414
+ }, { immediate: !0 }), I(() => d.multi, () => {
415
+ A.value = W(d.modelValue), q();
416
+ }), I(N, (e) => {
417
+ D.value = Math.min(D.value, Math.max(0, F.value.length - 1));
418
+ }), I(C, () => {
419
+ D.value = 0;
313
420
  });
314
- function G(e) {
421
+ function U(e) {
315
422
  return String(e.title ?? e.value ?? "Not set");
316
423
  }
317
424
  function ee() {
318
- j.value = (o.qMap.values || []).map((e) => ({
425
+ O.value = (d.qMap.values || []).map((e) => ({
319
426
  ...e,
320
427
  title: e.title || String(e.value ?? "Not set")
321
- })), M.value = K(o.modelValue);
428
+ })), A.value = W(d.modelValue);
322
429
  }
323
- function K(e) {
324
- return o.multi ? Array.isArray(e) ? j.value.filter((t) => e.some((e) => Object.is(e, t.value))) : [] : j.value.find((t) => Object.is(t.value, e)) || P;
430
+ function W(e) {
431
+ return d.multi ? Array.isArray(e) ? O.value.filter((t) => e.some((e) => Object.is(e, t.value))) : [] : O.value.find((t) => Object.is(t.value, e)) || M;
325
432
  }
326
- function q(e) {
327
- return o.multi ? (M.value || []).some((t) => Object.is(t.value, e.value)) : e.value == null ? M.value?.value == null : Object.is(M.value?.value, e.value);
433
+ function G(e) {
434
+ return d.multi ? (A.value || []).some((t) => Object.is(t.value, e.value)) : e.value == null ? A.value?.value == null : Object.is(A.value?.value, e.value);
328
435
  }
329
- function J() {
330
- m("update:model-value", o.multi ? (M.value || []).map((e) => e.value) : M.value?.value);
436
+ function q() {
437
+ f("update:model-value", d.multi ? (A.value || []).map((e) => e.value) : A.value?.value);
331
438
  }
332
439
  function te() {
333
- o.readOnly || C.value || (C.value = !0, O.value = "", k.value = 0, _(() => g.value?.focus()));
440
+ d.readOnly || x.value || (x.value = !0, C.value = "", D.value = 0, h(() => m.value?.focus()));
334
441
  }
335
- function Y() {
336
- C.value = !1, O.value = "";
442
+ function J() {
443
+ x.value = !1, C.value = "";
337
444
  }
338
445
  function ne(e) {
339
- if (o.multi) {
340
- let t = M.value || [];
341
- M.value = q(e) ? t.filter((t) => !Object.is(t.value, e.value)) : [...t, e], J();
446
+ if (d.multi) {
447
+ let t = A.value || [];
448
+ A.value = G(e) ? t.filter((t) => !Object.is(t.value, e.value)) : [...t, e], q();
342
449
  return;
343
450
  }
344
- M.value = e, J(), Y();
451
+ A.value = e, q(), J();
345
452
  }
346
453
  function re() {
347
- M.value = o.multi ? [] : {
454
+ A.value = d.multi ? [] : {
348
455
  title: "Not set",
349
456
  value: null
350
- }, J(), o.multi || Y();
457
+ }, q(), d.multi || J();
351
458
  }
352
459
  function ie(e, t) {
353
- t instanceof HTMLButtonElement && (b[e] = t);
460
+ t instanceof HTMLButtonElement && (v[e] = t);
354
461
  }
355
- function X(e) {
356
- H.value.length && (k.value = (e + H.value.length) % H.value.length, _(() => b[k.value]?.focus()));
462
+ function Y(e) {
463
+ F.value.length && (D.value = (e + F.value.length) % F.value.length, h(() => v[D.value]?.focus()));
357
464
  }
358
465
  function ae(e) {
359
- e.key === "ArrowDown" ? (e.preventDefault(), X(k.value)) : e.key === "Escape" ? (e.preventDefault(), Y()) : e.key === "Enter" && H.value[k.value] && (e.preventDefault(), ne(H.value[k.value]));
466
+ e.key === "ArrowDown" ? (e.preventDefault(), Y(D.value)) : e.key === "Escape" ? (e.preventDefault(), J()) : e.key === "Enter" && F.value[D.value] && (e.preventDefault(), ne(F.value[D.value]));
360
467
  }
361
468
  function oe(e, t) {
362
- e.key === "ArrowDown" ? (e.preventDefault(), X(t + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), X(t - 1)) : e.key === "Escape" ? (e.preventDefault(), Y()) : e.key === "Tab" && !e.shiftKey && t === H.value.length - 1 && Y();
469
+ e.key === "ArrowDown" ? (e.preventDefault(), Y(t + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), Y(t - 1)) : e.key === "Escape" ? (e.preventDefault(), J()) : e.key === "Tab" && !e.shiftKey && t === F.value.length - 1 && J();
363
470
  }
364
471
  function se(e) {
365
- h.value && !h.value.contains(e.target) && Y();
472
+ p.value && !p.value.contains(e.target) && J();
366
473
  }
367
- return S(() => document.addEventListener("pointerdown", se)), x(() => document.removeEventListener("pointerdown", se)), (i, a) => t.lite && t.readOnly ? (w(), l("div", ke, [M.value?.icon ? (w(), l("i", {
474
+ return b(() => document.addEventListener("pointerdown", se)), y(() => document.removeEventListener("pointerdown", se)), (n, r) => t.lite && t.readOnly ? (S(), o("div", Fe, [A.value?.icon ? (S(), o("i", {
368
475
  key: 0,
369
- class: v(M.value.icon),
370
- style: y({ color: M.value.colour }),
476
+ class: g(A.value.icon),
477
+ style: _({ color: A.value.colour }),
371
478
  "aria-hidden": "true"
372
- }, null, 6)) : c("", !0), f(" " + A(W.value), 1)])) : (w(), l("div", {
479
+ }, null, 6)) : a("", !0), l(" " + k(H.value), 1)])) : (S(), o("div", {
373
480
  key: 1,
374
481
  ref_key: "root",
375
- ref: h,
482
+ ref: p,
376
483
  class: "flex flex-col relative w-full gap-1 min-w-0 min-h-10"
377
484
  }, [
378
- t.lite ? c("", !0) : (w(), s(e, {
485
+ t.lite ? a("", !0) : (S(), i(K, {
379
486
  key: 0,
380
487
  "q-map": t.qMap
381
488
  }, null, 8, ["q-map"])),
382
- u("label", Ae, [p(n, { disabled: t.readOnly }, d({
383
- append: R(() => [
384
- t.required && (!M.value || M.value?.value == null) ? (w(), l("span", Me, [...a[2] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0),
385
- (t.multi ? M.value?.length : M.value?.value != null) && !t.readOnly ? (w(), l("button", {
489
+ s("label", Ie, [u(X, { disabled: t.readOnly }, c({
490
+ append: L(() => [
491
+ t.required && (!A.value || A.value?.value == null) ? (S(), o("span", Re, [...r[2] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0),
492
+ (t.multi ? A.value?.length : A.value?.value != null) && !t.readOnly ? (S(), o("button", {
386
493
  key: 1,
387
494
  type: "button",
388
495
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-select-clear",
389
496
  "aria-label": "Clear selection",
390
- onClick: V(re, ["stop"])
391
- }, [...a[3] ||= [u("i", { class: "fa fa-times" }, null, -1)]])) : c("", !0),
392
- u("i", {
393
- class: v(["fa fa-chevron-down qmap-select-chevron", { "qmap-select-chevron-open": C.value }]),
497
+ onClick: B(re, ["stop"])
498
+ }, [...r[3] ||= [s("i", { class: "fa fa-times" }, null, -1)]])) : a("", !0),
499
+ s("i", {
500
+ class: g(["fa fa-chevron-down qmap-select-chevron", { "qmap-select-chevron-open": x.value }]),
394
501
  "aria-hidden": "true"
395
502
  }, null, 2)
396
503
  ]),
397
- default: R(() => [u("button", {
504
+ default: L(() => [s("button", {
398
505
  type: "button",
399
506
  class: "qmap-input qmap-select-trigger flex flex-1 min-w-0 min-h-0 items-center justify-start px-0 py-2 text-left",
400
507
  role: "combobox",
401
- "aria-expanded": C.value,
402
- "aria-controls": N,
508
+ "aria-expanded": x.value,
509
+ "aria-controls": j,
403
510
  "aria-label": t.qMap.title || t.qMap.id,
404
511
  disabled: t.readOnly,
405
- onClick: a[0] ||= (e) => C.value ? Y() : te(),
406
- onKeydown: [B(V(te, ["prevent"]), ["down"]), B(V(Y, ["prevent"]), ["esc"])]
407
- }, [u("span", { class: v(["flex flex-1 min-w-0 items-center flex-wrap gap-1 overflow-hidden", { "qmap-select-placeholder": !o.multi && M.value?.value == null }]) }, [t.multi && M.value?.length ? (w(!0), l(r, { key: 0 }, E(M.value, (e) => (w(), l("span", {
512
+ onClick: r[0] ||= (e) => x.value ? J() : te(),
513
+ onKeydown: [z(B(te, ["prevent"]), ["down"]), z(B(J, ["prevent"]), ["esc"])]
514
+ }, [s("span", { class: g(["flex flex-1 min-w-0 items-center flex-wrap gap-1 overflow-hidden", { "qmap-select-placeholder": !d.multi && A.value?.value == null }]) }, [t.multi && A.value?.length ? (S(!0), o(e, { key: 0 }, T(A.value, (e) => (S(), o("span", {
408
515
  key: String(e.value),
409
516
  class: "inline-flex max-w-full items-center qmap-select-chip"
410
- }, A(G(e)), 1))), 128)) : (w(), l(r, { key: 1 }, [f(A(W.value), 1)], 64))], 2)], 40, je)]),
517
+ }, k(U(e)), 1))), 128)) : (S(), o(e, { key: 1 }, [l(k(H.value), 1)], 64))], 2)], 40, Le)]),
411
518
  _: 2
412
- }, [U.value || t.qMap.icon ? {
519
+ }, [V.value || t.qMap.icon ? {
413
520
  name: "prepend",
414
- fn: R(() => [D(i.$slots, "default"), u("i", {
415
- class: v(U.value),
416
- style: y({ color: M.value?.colour }),
521
+ fn: L(() => [E(n.$slots, "default"), s("i", {
522
+ class: g(V.value),
523
+ style: _({ color: A.value?.colour }),
417
524
  "aria-hidden": "true"
418
525
  }, null, 6)]),
419
526
  key: "0"
420
527
  } : void 0]), 1032, ["disabled"])]),
421
- C.value ? (w(), l("div", Ne, [u("div", Pe, [a[4] ||= u("i", {
528
+ x.value ? (S(), o("div", ze, [s("div", Be, [r[4] ||= s("i", {
422
529
  class: "fa fa-search qmap-select-search-icon",
423
530
  "aria-hidden": "true"
424
- }, null, -1), z(u("input", {
531
+ }, null, -1), R(s("input", {
425
532
  ref_key: "searchInput",
426
- ref: g,
427
- "onUpdate:modelValue": a[1] ||= (e) => O.value = e,
533
+ ref: m,
534
+ "onUpdate:modelValue": r[1] ||= (e) => C.value = e,
428
535
  type: "search",
429
536
  class: "flex-1 min-w-0 qmap-select-search",
430
537
  placeholder: "Search…",
431
538
  autocomplete: "off",
432
539
  "aria-label": "Search options",
433
540
  onKeydown: ae
434
- }, null, 544), [[F, O.value]])]), u("div", {
435
- id: N,
541
+ }, null, 544), [[P, C.value]])]), s("div", {
542
+ id: j,
436
543
  class: "max-h-64 overflow-auto p-1",
437
544
  role: "listbox",
438
545
  "aria-multiselectable": t.multi || void 0
439
- }, [(w(!0), l(r, null, E(H.value, (e, n) => (w(), l("button", {
440
- key: `${n}-${String(e.value)}`,
546
+ }, [(S(!0), o(e, null, T(F.value, (e, r) => (S(), o("button", {
547
+ key: `${r}-${String(e.value)}`,
441
548
  ref_for: !0,
442
- ref: (e) => ie(n, e),
549
+ ref: (e) => ie(r, e),
443
550
  type: "button",
444
551
  role: "option",
445
- class: v(["flex w-full min-h-9 items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm qmap-select-option", {
446
- "qmap-select-option-active": k.value === n,
447
- "qmap-select-option-selected": q(e)
552
+ class: g(["flex w-full min-h-9 items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm qmap-select-option", {
553
+ "qmap-select-option-active": D.value === r,
554
+ "qmap-select-option-selected": G(e)
448
555
  }]),
449
- "aria-selected": q(e),
450
- onMouseenter: (e) => k.value = n,
451
- onKeydown: (e) => oe(e, n),
556
+ "aria-selected": G(e),
557
+ onMouseenter: (e) => D.value = r,
558
+ onKeydown: (e) => oe(e, r),
452
559
  onClick: (t) => ne(e)
453
- }, [D(i.$slots, "option", {
560
+ }, [E(n.$slots, "option", {
454
561
  option: e,
455
- selected: q(e),
456
- active: k.value === n
562
+ selected: G(e),
563
+ active: D.value === r
457
564
  }, () => [
458
- t.multi ? (w(), l("span", Le, A(q(e) ? "✓" : ""), 1)) : c("", !0),
459
- e.icon ? (w(), l("i", {
565
+ t.multi ? (S(), o("span", Ue, k(G(e) ? "✓" : ""), 1)) : a("", !0),
566
+ e.icon ? (S(), o("i", {
460
567
  key: 1,
461
- class: v([e.icon, "w-4 text-center"]),
462
- style: y({ color: e.colour }),
568
+ class: g([e.icon, "w-4 text-center"]),
569
+ style: _({ color: e.colour }),
463
570
  "aria-hidden": "true"
464
- }, null, 6)) : c("", !0),
465
- u("span", Re, A(G(e)), 1)
466
- ])], 42, Ie))), 128)), H.value.length ? c("", !0) : (w(), l("p", ze, "No options found."))], 8, Fe)])) : c("", !0)
571
+ }, null, 6)) : a("", !0),
572
+ s("span", We, k(U(e)), 1)
573
+ ])], 42, He))), 128)), F.value.length ? a("", !0) : (S(), o("p", Ge, "No options found."))], 8, Ve)])) : a("", !0)
467
574
  ], 512));
468
575
  }
469
- }), Ve = {
576
+ }), qe = {
470
577
  key: 0,
471
578
  class: "block"
472
- }, He = /* @__PURE__ */ h({
579
+ }, Je = /* @__PURE__ */ f({
473
580
  __name: "icon-block",
474
581
  props: { qMap: {} },
475
582
  setup(e) {
476
- let t = e, n = a(() => [t.qMap.icon || "", t.qMap.colour || ""].reduce((e, t) => e + " " + t));
477
- return (t, r) => e.qMap.icon ? (w(), l("span", Ve, [u("i", { class: v(n.value) }, null, 2)])) : c("", !0);
583
+ let t = e, r = n(() => [t.qMap.icon || "", t.qMap.colour || ""].reduce((e, t) => e + " " + t));
584
+ return (t, n) => e.qMap.icon ? (S(), o("span", qe, [s("i", { class: g(r.value) }, null, 2)])) : a("", !0);
478
585
  }
479
- }), Ue = { key: 0 }, We = { class: "inline-flex items-center gap-2" }, Ge = [
586
+ }), Ye = { key: 0 }, Xe = { class: "inline-flex items-center gap-2" }, Ze = [
480
587
  "name",
481
588
  "value",
482
589
  "disabled",
483
590
  "onChange"
484
- ], Ke = { class: "mt-1 inline-flex items-center gap-1" }, qe = { key: 1 }, Je = { class: "inline-flex items-center gap-2 min-h-8 qmap-check-row" }, Ye = [
591
+ ], Qe = { class: "mt-1 inline-flex items-center gap-1" }, $e = { key: 1 }, et = { class: "inline-flex items-center gap-2 min-h-8 qmap-check-row" }, tt = [
485
592
  "name",
486
593
  "value",
487
594
  "disabled",
488
595
  "onChange"
489
- ], Xe = { class: "mt-1" }, Ze = {
596
+ ], nt = { class: "mt-1" }, rt = {
490
597
  key: 2,
491
598
  class: "sm:flex items-center"
492
- }, Qe = { class: "sm:w-1/2 md:w-1/4" }, $e = {
599
+ }, it = { class: "sm:w-1/2 md:w-1/4" }, at = {
493
600
  class: "btn-group sm:w-1/2 md:w-3/4 flex",
494
601
  role: "group"
495
- }, et = [
602
+ }, ot = [
496
603
  "aria-pressed",
497
604
  "disabled",
498
605
  "onClick"
499
- ], tt = /* @__PURE__ */ h({
606
+ ], st = /* @__PURE__ */ f({
500
607
  __name: "qChoice",
501
608
  props: {
502
609
  qMap: {},
@@ -510,68 +617,68 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
510
617
  },
511
618
  emits: ["qmap_change", "qmap_subquestions"],
512
619
  setup(t, { emit: n }) {
513
- let i = t, a = n, o = T();
514
- L(() => i.model, (e) => o.value = i.model[i.qMap.id]), b(() => {
515
- o.value = i.model[i.qMap.id], d(o.value);
620
+ let r = t, c = n, d = w();
621
+ I(() => r.model, (e) => d.value = r.model[r.qMap.id]), v(() => {
622
+ d.value = r.model[r.qMap.id], f(d.value);
516
623
  });
517
- function d(e) {
518
- let t = i.qMap.values?.find((t) => t.value == e);
519
- a("qmap_subquestions", t?.onSelect);
624
+ function f(e) {
625
+ let t = r.qMap.values?.find((t) => t.value == e);
626
+ c("qmap_subquestions", t?.onSelect);
520
627
  }
521
- function m(e) {
522
- a("qmap_change", {
523
- qMap: i.qMap,
628
+ function p(e) {
629
+ c("qmap_change", {
630
+ qMap: r.qMap,
524
631
  value: e
525
- }), d(e);
632
+ }), f(e);
526
633
  }
527
- return (n, i) => t.qMap.style == "radio" ? (w(), l("div", Ue, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), u("div", We, [(w(!0), l(r, null, E(t.qMap.values, (e) => (w(), l("div", {
634
+ return (n, r) => t.qMap.style == "radio" ? (S(), o("div", Ye, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", Xe, [(S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("div", {
528
635
  key: String(e.value),
529
636
  class: "inline-flex items-center gap-0 min-h-8 qmap-check-row"
530
- }, [z(u("input", {
531
- "onUpdate:modelValue": i[0] ||= (e) => o.value = e,
637
+ }, [R(s("input", {
638
+ "onUpdate:modelValue": r[0] ||= (e) => d.value = e,
532
639
  type: "radio",
533
640
  name: t.qMap.id,
534
641
  value: e.value,
535
642
  disabled: t.readOnly,
536
- onChange: (t) => m(e.value)
537
- }, null, 40, Ge), [[N, o.value]]), u("div", Ke, [e.icon ? (w(), l("i", {
643
+ onChange: (t) => p(e.value)
644
+ }, null, 40, Ze), [[M, d.value]]), s("div", Qe, [e.icon ? (S(), o("i", {
538
645
  key: 0,
539
- class: v(e.icon),
646
+ class: g(e.icon),
540
647
  "aria-hidden": "true"
541
- }, null, 2)) : c("", !0), f(A(e.title || e.value), 1)])]))), 128))])])) : t.qMap.style == "v-radio" ? (w(), l("div", qe, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), (w(!0), l(r, null, E(t.qMap.values, (e) => (w(), l("div", null, [u("label", Je, [z(u("input", {
542
- "onUpdate:modelValue": i[1] ||= (e) => o.value = e,
648
+ }, null, 2)) : a("", !0), l(k(e.title || e.value), 1)])]))), 128))])])) : t.qMap.style == "v-radio" ? (S(), o("div", $e, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), (S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("div", null, [s("label", et, [R(s("input", {
649
+ "onUpdate:modelValue": r[1] ||= (e) => d.value = e,
543
650
  type: "radio",
544
651
  name: t.qMap.id,
545
652
  value: e.value,
546
653
  disabled: t.readOnly,
547
- onChange: (t) => m(e.value)
548
- }, null, 40, Ye), [[N, o.value]]), u("div", Xe, [e.icon ? (w(), l("i", {
654
+ onChange: (t) => p(e.value)
655
+ }, null, 40, tt), [[M, d.value]]), s("div", nt, [e.icon ? (S(), o("i", {
549
656
  key: 0,
550
- class: v(e.icon),
657
+ class: g(e.icon),
551
658
  "aria-hidden": "true"
552
- }, null, 2)) : c("", !0), f(A(e.title || e.value), 1)])])]))), 256))])) : t.qMap.style == "buttons" ? (w(), l("div", Ze, [u("div", Qe, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"])]), u("div", $e, [(w(!0), l(r, null, E(t.qMap.values, (e) => (w(), l("button", {
659
+ }, null, 2)) : a("", !0), l(k(e.title || e.value), 1)])])]))), 256))])) : t.qMap.style == "buttons" ? (S(), o("div", rt, [s("div", it, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"])]), s("div", at, [(S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("button", {
553
660
  key: String(e.value),
554
661
  type: "button",
555
- class: v(["flex-1 inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": o.value === e.value }]),
556
- "aria-pressed": o.value === e.value,
662
+ class: g(["flex-1 inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": d.value === e.value }]),
663
+ "aria-pressed": d.value === e.value,
557
664
  disabled: t.readOnly,
558
665
  onClick: (t) => {
559
- o.value = e.value, m(e.value);
666
+ d.value = e.value, p(e.value);
560
667
  }
561
- }, [e.icon ? (w(), l("i", {
668
+ }, [e.icon ? (S(), o("i", {
562
669
  key: 0,
563
- class: v(e.icon),
670
+ class: g(e.icon),
564
671
  "aria-hidden": "true"
565
- }, null, 2)) : c("", !0), f(A(e.title || e.value), 1)], 10, et))), 128))])])) : (w(), s(Be, {
672
+ }, null, 2)) : a("", !0), l(k(e.title || e.value), 1)], 10, ot))), 128))])])) : (S(), i(Ke, {
566
673
  key: 3,
567
- modelValue: o.value,
568
- "onUpdate:modelValue": [i[2] ||= (e) => o.value = e, m],
674
+ modelValue: d.value,
675
+ "onUpdate:modelValue": [r[2] ||= (e) => d.value = e, p],
569
676
  "q-map": t.qMap,
570
677
  readOnly: t.readOnly,
571
678
  lite: t.lite,
572
679
  required: t.qMap.required
573
680
  }, {
574
- default: R(() => [p(He, { qMap: t.qMap }, null, 8, ["qMap"])]),
681
+ default: L(() => [u(Je, { qMap: t.qMap }, null, 8, ["qMap"])]),
575
682
  _: 1
576
683
  }, 8, [
577
684
  "modelValue",
@@ -581,14 +688,14 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
581
688
  "required"
582
689
  ]));
583
690
  }
584
- }), nt = {
691
+ }), ct = {
585
692
  key: 0,
586
693
  class: "inline-flex items-center gap-2"
587
- }, rt = ["for"], it = ["value", "disabled"], at = [
694
+ }, lt = ["for"], ut = ["value", "disabled"], dt = [
588
695
  "id",
589
696
  "value",
590
697
  "readonly"
591
- ], ot = /* @__PURE__ */ h({
698
+ ], ft = /* @__PURE__ */ f({
592
699
  __name: "qColour",
593
700
  props: {
594
701
  qMap: {},
@@ -601,65 +708,65 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
601
708
  style: {}
602
709
  },
603
710
  emits: ["qmap_change", "qmap_subquestions"],
604
- setup(t, { emit: r }) {
605
- let i = t, o = r, s = a(() => i.model[i.qMap.id]);
606
- function c(e) {
607
- o("qmap_change", {
608
- qMap: i.qMap,
711
+ setup(e, { emit: t }) {
712
+ let r = e, i = t, a = n(() => r.model[r.qMap.id]);
713
+ function d(e) {
714
+ i("qmap_change", {
715
+ qMap: r.qMap,
609
716
  value: e
610
717
  });
611
718
  }
612
- return (r, i) => t.lite && t.readOnly ? (w(), l("div", nt, [u("span", {
719
+ return (t, n) => e.lite && e.readOnly ? (S(), o("div", ct, [s("span", {
613
720
  class: "inline-block w-4 h-4 rounded-full qmap-colour-swatch",
614
- style: y({ backgroundColor: s.value })
615
- }, null, 4), f(A(s.value), 1)])) : (w(), l("label", {
721
+ style: _({ backgroundColor: a.value })
722
+ }, null, 4), l(k(a.value), 1)])) : (S(), o("label", {
616
723
  key: 1,
617
724
  class: "qmap-field flex flex-col gap-1.5 text-sm",
618
- for: t.qMap.id
619
- }, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), p(n, {
620
- disabled: t.readOnly,
725
+ for: e.qMap.id
726
+ }, [u(K, { "q-map": e.qMap }, null, 8, ["q-map"]), u(X, {
727
+ disabled: e.readOnly,
621
728
  class: ""
622
- }, d({
623
- append: R(() => [u("input", {
624
- value: s.value || "#000000",
729
+ }, c({
730
+ append: L(() => [s("input", {
731
+ value: a.value || "#000000",
625
732
  type: "color",
626
733
  class: "shrink-0 w-7 h-7 p-0.5 qmap-color-picker border-none",
627
734
  "aria-label": "Choose color",
628
- disabled: t.readOnly,
629
- onInput: i[0] ||= (e) => c(e.target.value)
630
- }, null, 40, it)]),
631
- default: R(() => [u("input", {
632
- id: t.qMap.id,
633
- value: s.value,
735
+ disabled: e.readOnly,
736
+ onInput: n[0] ||= (e) => d(e.target.value)
737
+ }, null, 40, ut)]),
738
+ default: L(() => [s("input", {
739
+ id: e.qMap.id,
740
+ value: a.value,
634
741
  type: "text",
635
742
  class: "qmap-input flex-1 px-0 py-2",
636
- readonly: t.readOnly,
637
- onChange: i[1] ||= (e) => c(e.target.value)
638
- }, null, 40, at)]),
743
+ readonly: e.readOnly,
744
+ onChange: n[1] ||= (e) => d(e.target.value)
745
+ }, null, 40, dt)]),
639
746
  _: 2
640
- }, [t.qMap.icon ? {
747
+ }, [e.qMap.icon ? {
641
748
  name: "prepend",
642
- fn: R(() => [p(He, { qMap: t.qMap }, null, 8, ["qMap"])]),
749
+ fn: L(() => [u(Je, { qMap: e.qMap }, null, 8, ["qMap"])]),
643
750
  key: "0"
644
- } : void 0]), 1032, ["disabled"])], 8, rt));
751
+ } : void 0]), 1032, ["disabled"])], 8, lt));
645
752
  }
646
- }), st = {
753
+ }), pt = {
647
754
  key: 0,
648
755
  class: "calendar-modal"
649
- }, ct = { class: "calendar-dialog flex flex-col gap-2" }, lt = { class: "flex justify-between mb-2" }, ut = { class: "flex" }, dt = { class: "grid grid-cols-7" }, ft = ["onClick"], pt = {
756
+ }, mt = { class: "calendar-dialog flex flex-col gap-2" }, ht = { class: "flex justify-between mb-2" }, gt = { class: "flex" }, _t = { class: "grid grid-cols-7" }, vt = ["onClick"], yt = {
650
757
  key: 0,
651
758
  class: "calendar-time"
652
- }, mt = ["value"], ht = ["value"], gt = /* @__PURE__ */ h({
759
+ }, bt = ["value"], xt = ["value"], St = /* @__PURE__ */ f({
653
760
  __name: "CalendarPicker",
654
761
  props: {
655
762
  modelValue: {},
656
763
  withTime: { type: Boolean }
657
764
  },
658
765
  emits: ["update:modelValue"],
659
- setup(e, { emit: t }) {
660
- let n = Array.from({ length: 24 }, (e, t) => t), o = Array.from({ length: 60 }, (e, t) => t), d = e, f = t, p = T(!1);
766
+ setup(r, { emit: c }) {
767
+ let l = Array.from({ length: 24 }, (e, t) => t), u = Array.from({ length: 60 }, (e, t) => t), d = r, f = c, p = w(!1);
661
768
  var m = d.modelValue ? new Date(d.modelValue) : /* @__PURE__ */ new Date();
662
- let h = T(m.getFullYear()), g = T(m.getMonth()), _ = T(m.getDate()), y = T(m.getHours()), b = T(m.getMinutes()), x = [
769
+ let h = w(m.getFullYear()), _ = w(m.getMonth()), v = w(m.getDate()), y = w(m.getHours()), b = w(m.getMinutes()), x = [
663
770
  "Sun",
664
771
  "Mon",
665
772
  "Tue",
@@ -667,112 +774,112 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
667
774
  "Thu",
668
775
  "Fri",
669
776
  "Sat"
670
- ], S = a(() => h.value), C = a(() => g.value), O = a(() => new Date(S.value, C.value).toLocaleString("default", { month: "long" })), k = a(() => new Date(S.value, C.value + 1, 0).getDate()), M = a(() => Array(new Date(S.value, C.value, 1).getDay()).fill(0));
671
- function N(e) {
672
- return console.log(C.value + " " + m.getMonth()), e === _.value && C.value === m.getMonth() && S.value === m.getFullYear();
777
+ ], C = n(() => h.value), D = n(() => _.value), O = n(() => new Date(C.value, D.value).toLocaleString("default", { month: "long" })), j = n(() => new Date(C.value, D.value + 1, 0).getDate()), M = n(() => Array(new Date(C.value, D.value, 1).getDay()).fill(0));
778
+ function P(e) {
779
+ return console.log(D.value + " " + m.getMonth()), e === v.value && D.value === m.getMonth() && C.value === m.getFullYear();
673
780
  }
674
781
  function F(e) {
675
- _.value = e, m = new Date(h.value, g.value, _.value, d.withTime ? y.value : 0, d.withTime ? b.value : 0, 0, 0);
782
+ v.value = e, m = new Date(h.value, _.value, v.value, d.withTime ? y.value : 0, d.withTime ? b.value : 0, 0, 0);
676
783
  }
677
- function I() {
678
- g.value === 0 ? (g.value = 11, --h.value) : --g.value;
784
+ function L() {
785
+ _.value === 0 ? (_.value = 11, --h.value) : --_.value;
679
786
  }
680
- function R() {
681
- g.value === 11 ? (g.value = 0, h.value += 1) : g.value += 1;
787
+ function z() {
788
+ _.value === 11 ? (_.value = 0, h.value += 1) : _.value += 1;
682
789
  }
683
790
  function B() {
684
- let e = new Date(h.value, g.value, _.value, d.withTime ? y.value : 0, d.withTime ? b.value : 0, 0, 0);
791
+ let e = new Date(h.value, _.value, v.value, d.withTime ? y.value : 0, d.withTime ? b.value : 0, 0, 0);
685
792
  f("update:modelValue", e.getTime()), p.value = !1;
686
793
  }
687
794
  function V() {
688
795
  p.value = !1;
689
796
  }
690
- return L(() => d.modelValue, (e) => {
797
+ return I(() => d.modelValue, (e) => {
691
798
  if (e) {
692
799
  let t = new Date(e);
693
- h.value = t.getFullYear(), g.value = t.getMonth(), _.value = t.getDate(), y.value = t.getHours(), b.value = t.getMinutes();
800
+ h.value = t.getFullYear(), _.value = t.getMonth(), v.value = t.getDate(), y.value = t.getHours(), b.value = t.getMinutes();
694
801
  }
695
- }), a(() => {
802
+ }), n(() => {
696
803
  if (!d.modelValue) return "";
697
804
  let e = new Date(d.modelValue), t = e.toLocaleDateString();
698
805
  return d.withTime ? `${t} ${e.getHours().toString().padStart(2, "0") + ":" + e.getMinutes().toString().padStart(2, "0")}` : t;
699
- }), (t, a) => (w(), l(r, null, [u("button", {
700
- onClick: a[0] ||= (e) => p.value = !0,
806
+ }), (n, c) => (S(), o(e, null, [s("button", {
807
+ onClick: c[0] ||= (e) => p.value = !0,
701
808
  style: {
702
809
  border: "none",
703
810
  background: "none"
704
811
  },
705
812
  class: "qmap-button"
706
- }, [D(t.$slots, "default")]), (w(), s(i, { to: "body" }, [p.value ? (w(), l("div", st, [u("div", ct, [
707
- u("div", lt, [
708
- u("button", {
709
- onClick: I,
813
+ }, [E(n.$slots, "default")]), (S(), i(t, { to: "body" }, [p.value ? (S(), o("div", pt, [s("div", mt, [
814
+ s("div", ht, [
815
+ s("button", {
816
+ onClick: L,
710
817
  class: "border-none bg-inherit qmap-button"
711
- }, [...a[3] ||= [u("i", { class: "fa fa-arrow-left" }, null, -1)]]),
712
- u("span", null, A(O.value) + " " + A(S.value), 1),
713
- u("button", {
714
- onClick: R,
818
+ }, [...c[3] ||= [s("i", { class: "fa fa-arrow-left" }, null, -1)]]),
819
+ s("span", null, k(O.value) + " " + k(C.value), 1),
820
+ s("button", {
821
+ onClick: z,
715
822
  class: "border-none bg-inherit qmap-button"
716
- }, [...a[4] ||= [u("i", { class: "fa fa-arrow-right" }, null, -1)]])
823
+ }, [...c[4] ||= [s("i", { class: "fa fa-arrow-right" }, null, -1)]])
717
824
  ]),
718
- u("div", ut, [(w(), l(r, null, E(x, (e) => u("div", {
825
+ s("div", gt, [(S(), o(e, null, T(x, (e) => s("div", {
719
826
  key: e,
720
827
  class: "w-1/7 text-center"
721
- }, A(e), 1)), 64))]),
722
- u("div", dt, [(w(!0), l(r, null, E(M.value, (e) => (w(), l("span", {
828
+ }, k(e), 1)), 64))]),
829
+ s("div", _t, [(S(!0), o(e, null, T(M.value, (e) => (S(), o("span", {
723
830
  key: "blank-" + e,
724
831
  class: ""
725
- }, "\xA0"))), 128)), (w(!0), l(r, null, E(k.value, (e) => (w(), l("button", {
832
+ }, "\xA0"))), 128)), (S(!0), o(e, null, T(j.value, (e) => (S(), o("button", {
726
833
  key: "day-" + e,
727
- class: v(["p-2 border-none", {
728
- "bg-zinc-900 text-zinc-100 dark:bg-zinc-100 dark:text-zinc-900": N(e),
729
- "bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100": !N(e)
834
+ class: g(["p-2 border-none", {
835
+ "bg-zinc-900 text-zinc-100 dark:bg-zinc-100 dark:text-zinc-900": P(e),
836
+ "bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100": !P(e)
730
837
  }]),
731
838
  onClick: (t) => F(e)
732
- }, A(e), 11, ft))), 128))]),
733
- e.withTime ? (w(), l("div", pt, [
734
- z(u("select", {
735
- "onUpdate:modelValue": a[1] ||= (e) => y.value = e,
839
+ }, k(e), 11, vt))), 128))]),
840
+ r.withTime ? (S(), o("div", yt, [
841
+ R(s("select", {
842
+ "onUpdate:modelValue": c[1] ||= (e) => y.value = e,
736
843
  class: "qmap-input px-2 py-1"
737
- }, [(w(!0), l(r, null, E(j(n), (e) => (w(), l("option", {
844
+ }, [(S(!0), o(e, null, T(A(l), (e) => (S(), o("option", {
738
845
  key: e,
739
846
  value: e
740
- }, A(String(e).padStart(2, "0")), 9, mt))), 128))], 512), [[P, y.value]]),
741
- a[5] ||= u("span", null, ":", -1),
742
- z(u("select", {
743
- "onUpdate:modelValue": a[2] ||= (e) => b.value = e,
847
+ }, k(String(e).padStart(2, "0")), 9, bt))), 128))], 512), [[N, y.value]]),
848
+ c[5] ||= s("span", null, ":", -1),
849
+ R(s("select", {
850
+ "onUpdate:modelValue": c[2] ||= (e) => b.value = e,
744
851
  class: "qmap-input px-2 py-1"
745
- }, [(w(!0), l(r, null, E(j(o), (e) => (w(), l("option", {
852
+ }, [(S(!0), o(e, null, T(A(u), (e) => (S(), o("option", {
746
853
  key: e,
747
854
  value: e
748
- }, A(String(e).padStart(2, "0")), 9, ht))), 128))], 512), [[P, b.value]])
749
- ])) : c("", !0),
750
- u("div", { class: "flex justify-between" }, [u("button", {
855
+ }, k(String(e).padStart(2, "0")), 9, xt))), 128))], 512), [[N, b.value]])
856
+ ])) : a("", !0),
857
+ s("div", { class: "flex justify-between" }, [s("button", {
751
858
  onClick: B,
752
859
  class: "qmap-button p-2"
753
- }, "Ok"), u("button", {
860
+ }, "Ok"), s("button", {
754
861
  onClick: V,
755
862
  class: "qmap-button"
756
863
  }, "Cancel")])
757
- ]), u("div", {
864
+ ]), s("div", {
758
865
  class: "calendar-backdrop",
759
866
  onClick: V
760
- })])) : c("", !0)]))], 64));
867
+ })])) : a("", !0)]))], 64));
761
868
  }
762
- }), _t = [
869
+ }), Ct = [
763
870
  "placeholder",
764
871
  "readonly",
765
872
  "aria-invalid",
766
873
  "onKeydown"
767
- ], vt = {
874
+ ], wt = {
768
875
  key: 0,
769
876
  class: "date-error",
770
877
  role: "status"
771
- }, yt = {
878
+ }, Tt = {
772
879
  key: 3,
773
880
  class: "date-required",
774
881
  "aria-hidden": "true"
775
- }, bt = /*#__PURE__*/ fe(/* @__PURE__ */ h({
882
+ }, Et = /*#__PURE__*/ ge(/* @__PURE__ */ f({
776
883
  __name: "SimpleDate",
777
884
  props: {
778
885
  title: {},
@@ -792,74 +899,74 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
792
899
  },
793
900
  emits: ["update:model-value", "change"],
794
901
  setup(e, { emit: t }) {
795
- let r = e, i = t, o = `date-${Math.random().toString(36).slice(2)}`, f = r.dateFormat || "d-MMM-yy", m = r.timeFormat || "HH:mm", h = r.dateOnly ? f : `${m} ${f}`, g = a(() => r.dateOnly ? "Date" : "Time and date"), _ = T(""), y = T(!1), b = T();
796
- function x(e) {
902
+ let r = e, l = t, d = `date-${Math.random().toString(36).slice(2)}`, f = r.dateFormat || "d-MMM-yy", p = r.timeFormat || "HH:mm", m = r.dateOnly ? f : `${p} ${f}`, h = n(() => r.dateOnly ? "Date" : "Time and date"), _ = w(""), v = w(!1), y = w();
903
+ function b(e) {
797
904
  if (e == null) {
798
- _.value = "", y.value = !1;
905
+ _.value = "", v.value = !1;
799
906
  return;
800
907
  }
801
- let t = e instanceof Date ? H.fromJSDate(e) : H.fromMillis(e);
802
- _.value = t.setZone(r.timezone || "local").toFormat(h), y.value = !1, b.value = t.toMillis(), i("update:model-value", t.toMillis());
908
+ let t = e instanceof Date ? V.fromJSDate(e) : V.fromMillis(e);
909
+ _.value = t.setZone(r.timezone || "local").toFormat(m), v.value = !1, y.value = t.toMillis(), l("update:model-value", t.toMillis());
803
910
  }
804
- L(() => r.modelValue, x, { immediate: !0 });
805
- function S() {
911
+ I(() => r.modelValue, b, { immediate: !0 });
912
+ function x() {
806
913
  if (!_.value) {
807
- y.value = !1;
914
+ v.value = !1;
808
915
  return;
809
916
  }
810
- let e = H.fromFormat(_.value, h, { zone: r.timezone || "local" });
811
- y.value = !e.isValid, e.isValid && (x(e.toMillis()), i("update:model-value", e.toMillis()));
917
+ let e = V.fromFormat(_.value, m, { zone: r.timezone || "local" });
918
+ v.value = !e.isValid, e.isValid && (b(e.toMillis()), l("update:model-value", e.toMillis()));
812
919
  }
813
920
  function C() {
814
- _.value = "", y.value = !1, i("update:model-value", void 0);
921
+ _.value = "", v.value = !1, l("update:model-value", void 0);
815
922
  }
816
- return (t, i) => (w(), l("div", { class: v(["relative grid gap-1.5 text-sm date-field", r.class]) }, [p(n, {
923
+ return (t, n) => (S(), o("div", { class: g(["relative grid gap-1.5 text-sm date-field", r.class]) }, [u(X, {
817
924
  class: "date-control",
818
- invalid: y.value,
925
+ invalid: v.value,
819
926
  disabled: e.readOnly
820
- }, d({
821
- append: R(() => [
822
- y.value ? (w(), l("span", vt, "Invalid date")) : c("", !0),
823
- !e.readOnly && !e.lite ? (w(), s(gt, {
927
+ }, c({
928
+ append: L(() => [
929
+ v.value ? (S(), o("span", wt, "Invalid date")) : a("", !0),
930
+ !e.readOnly && !e.lite ? (S(), i(St, {
824
931
  key: 1,
825
932
  withTime: !e.dateOnly,
826
- modelValue: b.value,
827
- "onUpdate:modelValue": [i[1] ||= (e) => b.value = e, x]
933
+ modelValue: y.value,
934
+ "onUpdate:modelValue": [n[1] ||= (e) => y.value = e, b]
828
935
  }, {
829
- default: R(() => [...i[2] ||= [u("i", { class: "fa fa-calendar" }, null, -1)]]),
936
+ default: L(() => [...n[2] ||= [s("i", { class: "fa fa-calendar" }, null, -1)]]),
830
937
  _: 1
831
- }, 8, ["withTime", "modelValue"])) : c("", !0),
832
- e.clearable && _.value && !e.readOnly ? (w(), l("button", {
938
+ }, 8, ["withTime", "modelValue"])) : a("", !0),
939
+ e.clearable && _.value && !e.readOnly ? (S(), o("button", {
833
940
  key: 2,
834
941
  type: "button",
835
942
  class: "date-trigger",
836
943
  "aria-label": "Clear date",
837
944
  onClick: C
838
- }, [...i[3] ||= [u("i", { class: "fa fa-times" }, null, -1)]])) : c("", !0),
839
- e.required ? (w(), l("span", yt, [...i[4] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0)
945
+ }, [...n[3] ||= [s("i", { class: "fa fa-times" }, null, -1)]])) : a("", !0),
946
+ e.required ? (S(), o("span", Tt, [...n[4] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)
840
947
  ]),
841
- default: R(() => [z(u("input", {
842
- id: o,
843
- "onUpdate:modelValue": i[0] ||= (e) => _.value = e,
948
+ default: L(() => [R(s("input", {
949
+ id: d,
950
+ "onUpdate:modelValue": n[0] ||= (e) => _.value = e,
844
951
  type: "text",
845
- placeholder: g.value,
952
+ placeholder: h.value,
846
953
  readonly: e.readOnly,
847
- "aria-invalid": y.value,
954
+ "aria-invalid": v.value,
848
955
  class: "min-w-0 flex-1 border-0 bg-transparent outline-none qmap-input",
849
- onBlur: S,
850
- onKeydown: B(V(S, ["prevent"]), ["enter"])
851
- }, null, 40, _t), [[F, _.value]])]),
956
+ onBlur: x,
957
+ onKeydown: z(B(x, ["prevent"]), ["enter"])
958
+ }, null, 40, Ct), [[P, _.value]])]),
852
959
  _: 2
853
960
  }, [e.icon ? {
854
961
  name: "prepend",
855
- fn: R(() => [u("i", {
856
- class: v(e.icon),
962
+ fn: L(() => [s("i", {
963
+ class: g(e.icon),
857
964
  "aria-hidden": "true"
858
965
  }, null, 2)]),
859
966
  key: "0"
860
- } : void 0]), 1032, ["invalid", "disabled"]), D(t.$slots, "default", {}, void 0, !0)], 2));
967
+ } : void 0]), 1032, ["invalid", "disabled"]), E(t.$slots, "default", {}, void 0, !0)], 2));
861
968
  }
862
- }), [["__scopeId", "data-v-c327521a"]]), xt = /* @__PURE__ */ h({
969
+ }), [["__scopeId", "data-v-c327521a"]]), Dt = /* @__PURE__ */ f({
863
970
  __name: "qDate",
864
971
  props: {
865
972
  qMap: {},
@@ -872,30 +979,30 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
872
979
  style: {}
873
980
  },
874
981
  emits: ["qmap_change", "qmap_subquestions"],
875
- setup(n, { emit: i }) {
876
- let o = n, u = i, d = a(() => o.model[o.qMap.id]);
877
- function f(e) {
878
- u("qmap_change", {
879
- qMap: o.qMap,
982
+ setup(t, { emit: r }) {
983
+ let s = t, c = r, l = n(() => s.model[s.qMap.id]);
984
+ function d(e) {
985
+ c("qmap_change", {
986
+ qMap: s.qMap,
880
987
  value: e
881
988
  });
882
989
  }
883
- return (i, a) => (w(), l(r, null, [n.lite ? c("", !0) : (w(), s(e, {
990
+ return (n, r) => (S(), o(e, null, [t.lite ? a("", !0) : (S(), i(K, {
884
991
  key: 0,
885
- "q-map": n.qMap
886
- }, null, 8, ["q-map"])), p(bt, {
887
- modelValue: d.value,
888
- "onUpdate:modelValue": [a[0] ||= (e) => d.value = e, f],
889
- icon: n.qMap.icon,
890
- id: n.qMap.id,
891
- dateFormat: n.qMap.style,
892
- lite: n.lite,
992
+ "q-map": t.qMap
993
+ }, null, 8, ["q-map"])), u(Et, {
994
+ modelValue: l.value,
995
+ "onUpdate:modelValue": [r[0] ||= (e) => l.value = e, d],
996
+ icon: t.qMap.icon,
997
+ id: t.qMap.id,
998
+ dateFormat: t.qMap.style,
999
+ lite: t.lite,
893
1000
  dense: "",
894
- "read-only": n.readOnly,
895
- dateOnly: n.qMap.type == "date",
896
- required: n.qMap.required && !d.value
1001
+ "read-only": t.readOnly,
1002
+ dateOnly: t.qMap.type == "date",
1003
+ required: t.qMap.required && !l.value
897
1004
  }, {
898
- default: R(() => [p(t, { "q-map": n.qMap }, null, 8, ["q-map"])]),
1005
+ default: L(() => [u(W, { "q-map": t.qMap }, null, 8, ["q-map"])]),
899
1006
  _: 1
900
1007
  }, 8, [
901
1008
  "modelValue",
@@ -908,13 +1015,13 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
908
1015
  "required"
909
1016
  ])], 64));
910
1017
  }
911
- }), St = ["aria-orientation"], Ct = ["aria-selected", "onClick"], wt = ["name"], Tt = {
1018
+ }), Ot = ["aria-orientation"], kt = ["aria-selected", "onClick"], At = ["name"], jt = {
912
1019
  key: 0,
913
1020
  class: "flex flex-1 flex-col min-w-0 relative"
914
- }, Et = {
1021
+ }, Mt = {
915
1022
  key: 1,
916
1023
  class: "flex flex-1 flex-col min-w-0 relative"
917
- }, Dt = { class: "group-scroll flex-1 min-h-0 overflow-auto" }, Ot = { class: "flex flex-col gap-2" }, kt = /* @__PURE__ */ h({
1024
+ }, Nt = { class: "group-scroll flex-1 min-h-0 overflow-auto" }, Pt = { class: "flex flex-col gap-2" }, Ft = /* @__PURE__ */ f({
918
1025
  __name: "qGroup",
919
1026
  props: {
920
1027
  qMap: {},
@@ -927,47 +1034,47 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
927
1034
  style: {}
928
1035
  },
929
1036
  emits: ["qmap_change", "qmap_subquestions"],
930
- setup(t, { emit: n }) {
931
- let i = t, o = T(i.qMap.groups ? i.qMap.groups[0]?.name : "?"), d = n, m = a(() => i.qMap.style == "vertical"), h = T(i.model);
932
- return (n, i) => (w(), l("div", {
933
- class: v({
934
- "flex flex-row": m.value,
935
- "flex flex-col": !m.value,
1037
+ setup(t, { emit: r }) {
1038
+ let c = t, d = w(c.qMap.groups ? c.qMap.groups[0]?.name : "?"), f = r, p = n(() => c.qMap.style == "vertical"), m = w(c.model);
1039
+ return (n, r) => (S(), o("div", {
1040
+ class: g({
1041
+ "flex flex-row": p.value,
1042
+ "flex flex-col": !p.value,
936
1043
  "flex-1 inset-0": t.qMap.ui?.flex
937
1044
  }),
938
- style: y(t.qMap.ui?.flex ? void 0 : { height: (t.qMap.ui?.height || 400) + "px" })
1045
+ style: _(t.qMap.ui?.flex ? void 0 : { height: (t.qMap.ui?.height || 400) + "px" })
939
1046
  }, [
940
- p(e, { "q-map": t.qMap }, null, 8, ["q-map"]),
941
- u("div", {
942
- class: v(["flex flex-wrap gap-1 p-1 group-tabs", { "flex-col group-tabs-vertical pr-2": m.value }]),
1047
+ u(K, { "q-map": t.qMap }, null, 8, ["q-map"]),
1048
+ s("div", {
1049
+ class: g(["flex flex-wrap gap-1 p-1 group-tabs", { "flex-col group-tabs-vertical pr-2": p.value }]),
943
1050
  role: "tablist",
944
- "aria-orientation": m.value ? "vertical" : "horizontal"
945
- }, [(w(!0), l(r, null, E(t.qMap.groups, (e) => (w(), l("button", {
1051
+ "aria-orientation": p.value ? "vertical" : "horizontal"
1052
+ }, [(S(!0), o(e, null, T(t.qMap.groups, (e) => (S(), o("button", {
946
1053
  key: e.name,
947
1054
  type: "button",
948
1055
  role: "tab",
949
- "aria-selected": o.value === e.name,
950
- class: v(["inline-flex items-center gap-2 rounded-md px-3 py-2", { "group-tab-active": o.value === e.name }]),
951
- onClick: (t) => o.value = e.name
952
- }, [e.icon ? (w(), l("i", {
1056
+ "aria-selected": d.value === e.name,
1057
+ class: g(["inline-flex items-center gap-2 rounded-md px-3 py-2", { "group-tab-active": d.value === e.name }]),
1058
+ onClick: (t) => d.value = e.name
1059
+ }, [e.icon ? (S(), o("i", {
953
1060
  key: 0,
954
- class: v(e.icon),
1061
+ class: g(e.icon),
955
1062
  "aria-hidden": "true"
956
- }, null, 2)) : c("", !0), f(A(e.name), 1)], 10, Ct))), 128))], 10, St),
957
- u("div", { class: v(["group-panels flex flex-1 flex-col min-w-0 min-h-0", {
958
- "ml-2": m.value,
959
- "mt-2": !m.value
960
- }]) }, [(w(!0), l(r, null, E(t.qMap.groups, (e) => z((w(), l("section", {
961
- name: e.name,
962
- key: e.name,
1063
+ }, null, 2)) : a("", !0), l(k(e.name), 1)], 10, kt))), 128))], 10, Ot),
1064
+ s("div", { class: g(["group-panels flex flex-1 flex-col min-w-0 min-h-0", {
1065
+ "ml-2": p.value,
1066
+ "mt-2": !p.value
1067
+ }]) }, [(S(!0), o(e, null, T(t.qMap.groups, (n) => R((S(), o("section", {
1068
+ name: n.name,
1069
+ key: n.name,
963
1070
  class: "flex flex-1 flex-col min-w-0 min-h-0",
964
1071
  role: "tabpanel"
965
- }, [e.items?.length == 1 && e.items[0]?.type == "geo_map" ? (w(), l("div", Tt, [(w(!0), l(r, null, E(e.items, (e) => (w(), s(Q, {
1072
+ }, [n.items?.length == 1 && n.items[0]?.type == "geo_map" ? (S(), o("div", jt, [(S(!0), o(e, null, T(n.items, (e) => (S(), i(Q, {
966
1073
  key: e.id,
967
1074
  qMap: e,
968
- modelValue: h.value,
969
- "onUpdate:modelValue": i[0] ||= (e) => h.value = e,
970
- onChange: i[1] ||= (e, t) => d("qmap_change", e),
1075
+ modelValue: m.value,
1076
+ "onUpdate:modelValue": r[0] ||= (e) => m.value = e,
1077
+ onChange: r[1] ||= (e, t) => f("qmap_change", e),
971
1078
  extras: t.extras,
972
1079
  lite: t.lite,
973
1080
  validator: t.validator,
@@ -981,12 +1088,12 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
981
1088
  "validator",
982
1089
  "provider",
983
1090
  "readOnly"
984
- ]))), 128))])) : (w(), l("div", Et, [u("div", Dt, [u("div", Ot, [(w(!0), l(r, null, E(e.items, (e) => (w(), s(Q, {
1091
+ ]))), 128))])) : (S(), o("div", Mt, [s("div", Nt, [s("div", Pt, [(S(!0), o(e, null, T(n.items, (e) => (S(), i(Q, {
985
1092
  key: e.id,
986
1093
  qMap: e,
987
- modelValue: h.value,
988
- "onUpdate:modelValue": i[2] ||= (e) => h.value = e,
989
- onChange: i[3] ||= (e, t) => d("qmap_change", e),
1094
+ modelValue: m.value,
1095
+ "onUpdate:modelValue": r[2] ||= (e) => m.value = e,
1096
+ onChange: r[3] ||= (e, t) => f("qmap_change", e),
990
1097
  extras: t.extras,
991
1098
  lite: t.lite,
992
1099
  validator: t.validator,
@@ -1000,29 +1107,29 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1000
1107
  "validator",
1001
1108
  "provider",
1002
1109
  "readOnly"
1003
- ]))), 128))])])]))], 8, wt)), [[I, o.value === e.name]])), 128))], 2)
1110
+ ]))), 128))])])]))], 8, At)), [[F, d.value === n.name]])), 128))], 2)
1004
1111
  ], 6));
1005
1112
  }
1006
- }), At = {
1113
+ }), It = {
1007
1114
  key: 0,
1008
1115
  class: "inline-flex items-center gap-2"
1009
- }, jt = {
1116
+ }, Lt = {
1010
1117
  key: 1,
1011
1118
  class: "flex flex-col gap-1"
1012
- }, Mt = [
1119
+ }, Rt = [
1013
1120
  "id",
1014
1121
  "value",
1015
1122
  "readonly"
1016
- ], Nt = [
1123
+ ], zt = [
1017
1124
  "id",
1018
1125
  "value",
1019
1126
  "readonly",
1020
1127
  "type"
1021
- ], Pt = {
1128
+ ], Bt = {
1022
1129
  key: 0,
1023
1130
  class: "qmap-required",
1024
1131
  "aria-hidden": "true"
1025
- }, Z = /* @__PURE__ */ h({
1132
+ }, Z = /* @__PURE__ */ f({
1026
1133
  __name: "qString",
1027
1134
  props: {
1028
1135
  qMap: {},
@@ -1035,70 +1142,70 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1035
1142
  style: {}
1036
1143
  },
1037
1144
  emits: ["qmap_change", "qmap_subquestions"],
1038
- setup(t, { emit: r }) {
1039
- let i = t, o = r, f = a(() => i.model[i.qMap.id]);
1040
- function m(e) {
1041
- h(e.target.value);
1145
+ setup(e, { emit: t }) {
1146
+ let r = e, l = t, d = n(() => r.model[r.qMap.id]);
1147
+ function f(e) {
1148
+ p(e.target.value);
1042
1149
  }
1043
- function h(e) {
1044
- i.qMap.type === "number" && typeof e == "string" && (e = parseFloat(e), e = Number.isNaN(e) ? void 0 : e), o("qmap_change", {
1045
- qMap: i.qMap,
1150
+ function p(e) {
1151
+ r.qMap.type === "number" && typeof e == "string" && (e = parseFloat(e), e = Number.isNaN(e) ? void 0 : e), l("qmap_change", {
1152
+ qMap: r.qMap,
1046
1153
  value: e
1047
1154
  });
1048
1155
  }
1049
- return (r, i) => t.lite && t.readOnly ? (w(), l("div", At, A(f.value), 1)) : (w(), l("div", jt, [!t.lite && t.qMap.id !== "#" ? (w(), s(e, {
1156
+ return (t, n) => e.lite && e.readOnly ? (S(), o("div", It, k(d.value), 1)) : (S(), o("div", Lt, [!e.lite && e.qMap.id !== "#" ? (S(), i(K, {
1050
1157
  key: 0,
1051
- "q-map": t.qMap
1052
- }, null, 8, ["q-map"])) : c("", !0), p(n, { multiline: t.qMap.style === "longtext" || t.lite && t.qMap.style === "textarea" }, d({
1053
- append: R(() => [t.qMap.required && !f.value ? (w(), l("span", Pt, [...i[3] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0), !t.qMap.required && f.value && !t.readOnly ? (w(), l("button", {
1158
+ "q-map": e.qMap
1159
+ }, null, 8, ["q-map"])) : a("", !0), u(X, { multiline: e.qMap.style === "longtext" || e.lite && e.qMap.style === "textarea" }, c({
1160
+ append: L(() => [e.qMap.required && !d.value ? (S(), o("span", Bt, [...n[3] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0), !e.qMap.required && d.value && !e.readOnly ? (S(), o("button", {
1054
1161
  key: 1,
1055
1162
  type: "button",
1056
1163
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button",
1057
1164
  "aria-label": "Clear",
1058
- onClick: i[2] ||= (e) => h(void 0)
1059
- }, [...i[4] ||= [u("i", { class: "fa fa-times" }, null, -1)]])) : c("", !0)]),
1060
- default: R(() => [t.qMap.type !== "number" && (t.qMap.style === "longtext" || t.lite && t.qMap.style === "textarea") ? (w(), l("textarea", {
1165
+ onClick: n[2] ||= (e) => p(void 0)
1166
+ }, [...n[4] ||= [s("i", { class: "fa fa-times" }, null, -1)]])) : a("", !0)]),
1167
+ default: L(() => [e.qMap.type !== "number" && (e.qMap.style === "longtext" || e.lite && e.qMap.style === "textarea") ? (S(), o("textarea", {
1061
1168
  key: 0,
1062
- id: t.qMap.id,
1063
- value: f.value,
1064
- readonly: t.readOnly,
1169
+ id: e.qMap.id,
1170
+ value: d.value,
1171
+ readonly: e.readOnly,
1065
1172
  rows: "4",
1066
1173
  class: "qmap-input min-w-0 flex-1 px-0 py-2 min-h-24 resize-y",
1067
- onInput: m,
1068
- onChange: i[0] ||= (e) => h(e.target.value)
1069
- }, null, 40, Mt)) : (w(), l("input", {
1174
+ onInput: f,
1175
+ onChange: n[0] ||= (e) => p(e.target.value)
1176
+ }, null, 40, Rt)) : (S(), o("input", {
1070
1177
  key: 1,
1071
- id: t.qMap.id,
1072
- value: f.value,
1073
- readonly: t.readOnly,
1074
- type: t.qMap.type === "number" ? t.qMap.style || "number" : t.qMap.style || "text",
1178
+ id: e.qMap.id,
1179
+ value: d.value,
1180
+ readonly: e.readOnly,
1181
+ type: e.qMap.type === "number" ? e.qMap.style || "number" : e.qMap.style || "text",
1075
1182
  class: "qmap-input min-w-0 flex-1 px-0 py-2",
1076
- onInput: m,
1077
- onChange: i[1] ||= (e) => h(e.target.value)
1078
- }, null, 40, Nt))]),
1183
+ onInput: f,
1184
+ onChange: n[1] ||= (e) => p(e.target.value)
1185
+ }, null, 40, zt))]),
1079
1186
  _: 2
1080
- }, [t.qMap.icon ? {
1187
+ }, [e.qMap.icon ? {
1081
1188
  name: "prepend",
1082
- fn: R(() => [p(He, { qMap: t.qMap }, null, 8, ["qMap"])]),
1189
+ fn: L(() => [u(Je, { qMap: e.qMap }, null, 8, ["qMap"])]),
1083
1190
  key: "0"
1084
1191
  } : void 0]), 1032, ["multiline"])]));
1085
1192
  }
1086
- }), Ft = { key: 0 }, It = {
1193
+ }), Vt = { key: 0 }, Ht = {
1087
1194
  key: 0,
1088
1195
  class: "flex flex-row items-center"
1089
- }, Lt = ["for"], Rt = ["id", "readonly"], zt = {
1196
+ }, Ut = ["for"], Wt = ["id", "readonly"], Gt = {
1090
1197
  key: 0,
1091
1198
  class: "qmap-required"
1092
- }, Bt = {
1199
+ }, Kt = {
1093
1200
  key: 1,
1094
1201
  class: "text-right text-negative"
1095
- }, Vt = { key: 1 }, Ht = { class: "qmap-card flex min-w-0 gap-3 p-3 bg-zinc-50 dark:bg-zinc-900" }, Ut = { class: "flex-1 min-w-0" }, Wt = { key: 0 }, Gt = {
1202
+ }, qt = { key: 1 }, Jt = { class: "qmap-card flex min-w-0 gap-3 p-3 bg-zinc-50 dark:bg-zinc-900" }, Yt = { class: "flex-1 min-w-0" }, Xt = { key: 0 }, Zt = {
1096
1203
  key: 1,
1097
1204
  class: "flex flex-col gap-2"
1098
- }, Kt = {
1205
+ }, Qt = {
1099
1206
  key: 0,
1100
1207
  class: "flex flex-col justify-center"
1101
- }, qt = /* @__PURE__ */ h({
1208
+ }, $t = /* @__PURE__ */ f({
1102
1209
  __name: "qObject",
1103
1210
  props: {
1104
1211
  qMap: {},
@@ -1111,42 +1218,42 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1111
1218
  style: {}
1112
1219
  },
1113
1220
  emits: ["qmap_change", "qmap_subquestions"],
1114
- setup(i, { emit: a }) {
1115
- let o = i, f = a, m = T(o.model[o.qMap.id] ? JSON.stringify(o.model[o.qMap.id], null, 2) : void 0), h = T(o.model[o.qMap.id] || void 0), g = T();
1116
- function _(e) {
1117
- if (!e) f("qmap_change", {
1118
- qMap: o.qMap,
1221
+ setup(t, { emit: n }) {
1222
+ let r = t, l = n, d = w(r.model[r.qMap.id] ? JSON.stringify(r.model[r.qMap.id], null, 2) : void 0), f = w(r.model[r.qMap.id] || void 0), p = w();
1223
+ function m(e) {
1224
+ if (!e) l("qmap_change", {
1225
+ qMap: r.qMap,
1119
1226
  value: void 0
1120
1227
  });
1121
1228
  else try {
1122
- f("qmap_change", {
1123
- qMap: o.qMap,
1229
+ l("qmap_change", {
1230
+ qMap: r.qMap,
1124
1231
  value: JSON.parse(e)
1125
- }), m.value = JSON.stringify(JSON.parse(e), null, 2), g.value = void 0;
1232
+ }), d.value = JSON.stringify(JSON.parse(e), null, 2), p.value = void 0;
1126
1233
  } catch (e) {
1127
- g.value = e.message;
1234
+ p.value = e.message;
1128
1235
  }
1129
1236
  }
1130
- function y(e) {
1131
- o.model[o.qMap.id] = e, e ? f("qmap_change", {
1132
- qMap: o.qMap,
1237
+ function h(e) {
1238
+ r.model[r.qMap.id] = e, e ? l("qmap_change", {
1239
+ qMap: r.qMap,
1133
1240
  value: e
1134
- }) : f("qmap_change", {
1135
- qMap: o.qMap,
1241
+ }) : l("qmap_change", {
1242
+ qMap: r.qMap,
1136
1243
  value: void 0
1137
1244
  });
1138
1245
  }
1139
- return (a, o) => i.qMap.items ? (w(), l("div", Vt, [!i.lite && i.qMap.id !== "#" ? (w(), s(e, {
1246
+ return (n, r) => t.qMap.items ? (S(), o("div", qt, [!t.lite && t.qMap.id !== "#" ? (S(), i(K, {
1140
1247
  key: 0,
1141
- "q-map": i.qMap
1142
- }, null, 8, ["q-map"])) : c("", !0), u("div", Ht, [u("div", Ut, [h.value ? (w(), l("div", Gt, [(w(!0), l(r, null, E(i.qMap.items, (e) => (w(), s(Q, {
1248
+ "q-map": t.qMap
1249
+ }, null, 8, ["q-map"])) : a("", !0), s("div", Jt, [s("div", Yt, [f.value ? (S(), o("div", Zt, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), i(Q, {
1143
1250
  qMap: e,
1144
- modelValue: h.value,
1145
- "onUpdate:modelValue": [o[4] ||= (e) => h.value = e, y],
1146
- extras: i.extras,
1147
- provider: i.provider,
1148
- lite: i.lite,
1149
- readOnly: i.readOnly || i.qMap.readOnly
1251
+ modelValue: f.value,
1252
+ "onUpdate:modelValue": [r[4] ||= (e) => f.value = e, h],
1253
+ extras: t.extras,
1254
+ provider: t.provider,
1255
+ lite: t.lite,
1256
+ readOnly: t.readOnly || t.qMap.readOnly
1150
1257
  }, null, 8, [
1151
1258
  "qMap",
1152
1259
  "modelValue",
@@ -1154,61 +1261,61 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1154
1261
  "provider",
1155
1262
  "lite",
1156
1263
  "readOnly"
1157
- ]))), 256))])) : (w(), l("div", Wt, [u("button", {
1264
+ ]))), 256))])) : (S(), o("div", Xt, [s("button", {
1158
1265
  type: "button",
1159
1266
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1160
- onClick: o[3] ||= (e) => h.value = {}
1161
- }, "Not set")]))]), !i.qMap.required && h.value != null ? (w(), l("div", Kt, [u("button", {
1267
+ onClick: r[3] ||= (e) => f.value = {}
1268
+ }, "Not set")]))]), !t.qMap.required && f.value != null ? (S(), o("div", Qt, [s("button", {
1162
1269
  type: "button",
1163
1270
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
1164
1271
  "aria-label": "Remove object",
1165
- onClick: o[5] ||= (e) => {
1166
- _(null), h.value = void 0;
1272
+ onClick: r[5] ||= (e) => {
1273
+ m(null), f.value = void 0;
1167
1274
  }
1168
- }, [...o[7] ||= [u("i", {
1275
+ }, [...r[7] ||= [s("i", {
1169
1276
  class: "fa fa-trash",
1170
1277
  "aria-hidden": "true"
1171
- }, null, -1)]])])) : c("", !0)])])) : (w(), l("div", Ft, [
1172
- i.lite && i.readOnly ? (w(), l("div", It, A(m.value), 1)) : c("", !0),
1173
- u("label", {
1278
+ }, null, -1)]])])) : a("", !0)])])) : (S(), o("div", Vt, [
1279
+ t.lite && t.readOnly ? (S(), o("div", Ht, k(d.value), 1)) : a("", !0),
1280
+ s("label", {
1174
1281
  class: "qmap-field flex flex-col gap-1.5 min-w-0 text-sm",
1175
- for: i.qMap.id
1176
- }, [!i.lite && i.qMap.id !== "#" ? (w(), s(e, {
1282
+ for: t.qMap.id
1283
+ }, [!t.lite && t.qMap.id !== "#" ? (S(), i(K, {
1177
1284
  key: 0,
1178
- "q-map": i.qMap
1179
- }, null, 8, ["q-map"])) : c("", !0), p(n, {
1180
- disabled: i.readOnly,
1285
+ "q-map": t.qMap
1286
+ }, null, 8, ["q-map"])) : a("", !0), u(X, {
1287
+ disabled: t.readOnly,
1181
1288
  multiline: ""
1182
- }, d({
1183
- append: R(() => [i.qMap.required && (!i.lite || !m.value) ? (w(), l("span", zt, [...o[6] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0), i.qMap.subtitle ? (w(), s(t, {
1289
+ }, c({
1290
+ append: L(() => [t.qMap.required && (!t.lite || !d.value) ? (S(), o("span", Gt, [...r[6] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0), t.qMap.subtitle ? (S(), i(W, {
1184
1291
  key: 1,
1185
- "q-map": i.qMap
1186
- }, null, 8, ["q-map"])) : c("", !0)]),
1187
- default: R(() => [z(u("textarea", {
1188
- id: i.qMap.id,
1189
- "onUpdate:modelValue": o[0] ||= (e) => m.value = e,
1292
+ "q-map": t.qMap
1293
+ }, null, 8, ["q-map"])) : a("", !0)]),
1294
+ default: L(() => [R(s("textarea", {
1295
+ id: t.qMap.id,
1296
+ "onUpdate:modelValue": r[0] ||= (e) => d.value = e,
1190
1297
  class: "qmap-input min-w-0 flex-1 px-0 py-2 min-h-24 resize-y",
1191
- readonly: i.readOnly,
1298
+ readonly: t.readOnly,
1192
1299
  rows: "5",
1193
- onBlur: o[1] ||= (e) => _(m.value),
1194
- onInput: o[2] ||= (e) => _(m.value)
1195
- }, null, 40, Rt), [[F, m.value]])]),
1300
+ onBlur: r[1] ||= (e) => m(d.value),
1301
+ onInput: r[2] ||= (e) => m(d.value)
1302
+ }, null, 40, Wt), [[P, d.value]])]),
1196
1303
  _: 2
1197
- }, [i.qMap.icon ? {
1304
+ }, [t.qMap.icon ? {
1198
1305
  name: "prepend",
1199
- fn: R(() => [u("i", {
1200
- class: v(i.qMap.icon),
1306
+ fn: L(() => [s("i", {
1307
+ class: g(t.qMap.icon),
1201
1308
  "aria-hidden": "true"
1202
1309
  }, null, 2)]),
1203
1310
  key: "0"
1204
- } : void 0]), 1032, ["disabled"])], 8, Lt),
1205
- g.value ? (w(), l("div", Bt, A(g.value), 1)) : c("", !0)
1311
+ } : void 0]), 1032, ["disabled"])], 8, Ut),
1312
+ p.value ? (S(), o("div", Kt, k(p.value), 1)) : a("", !0)
1206
1313
  ]));
1207
1314
  }
1208
- }), Jt = { class: "text-lg" }, Yt = {
1315
+ }), en = { class: "text-lg" }, tn = {
1209
1316
  key: 0,
1210
1317
  class: "text-md"
1211
- }, Xt = /* @__PURE__ */ h({
1318
+ }, nn = /* @__PURE__ */ f({
1212
1319
  __name: "qCaption",
1213
1320
  props: {
1214
1321
  qMap: {},
@@ -1221,10 +1328,10 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1221
1328
  style: {}
1222
1329
  },
1223
1330
  emits: ["qmap_change", "qmap_subquestions"],
1224
- setup(e, { emit: t }) {
1225
- return (t, n) => (w(), l(r, null, [u("div", Jt, A(e.qMap.title), 1), e.qMap.subtitle ? (w(), l("div", Yt, A(e.qMap.subtitle), 1)) : c("", !0)], 64));
1331
+ setup(t, { emit: n }) {
1332
+ return (n, r) => (S(), o(e, null, [s("div", en, k(t.qMap.title), 1), t.qMap.subtitle ? (S(), o("div", tn, k(t.qMap.subtitle), 1)) : a("", !0)], 64));
1226
1333
  }
1227
- }), Zt = /* @__PURE__ */ h({
1334
+ }), rn = /* @__PURE__ */ f({
1228
1335
  __name: "qGeoMap",
1229
1336
  props: {
1230
1337
  qMap: {},
@@ -1238,32 +1345,32 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1238
1345
  },
1239
1346
  emits: ["qmap_change", "qmap_subquestions"],
1240
1347
  setup(e, { emit: t }) {
1241
- let n = m(() => import("./SimpleGeomEditor-G898Fulb.mjs")), r = e, i = t, o = T(), s = a(() => r.qMap.style == "full-screen");
1242
- L(() => r.model, (e) => o.value = r.model[r.qMap.id]), b(() => {
1243
- o.value = r.model[r.qMap.id] ? JSON.parse(r.model[r.qMap.id]) : void 0, c(o.value);
1348
+ let r = d(() => Promise.resolve().then(() => jn)), i = e, a = t, s = w(), c = n(() => i.qMap.style == "full-screen");
1349
+ I(() => i.model, (e) => s.value = i.model[i.qMap.id]), v(() => {
1350
+ s.value = i.model[i.qMap.id] ? JSON.parse(i.model[i.qMap.id]) : void 0, l(s.value);
1244
1351
  });
1245
- function c(e) {
1246
- let t = r.qMap.values?.find((t) => t.value == e);
1247
- i("qmap_subquestions", t?.onSelect);
1352
+ function l(e) {
1353
+ let t = i.qMap.values?.find((t) => t.value == e);
1354
+ a("qmap_subquestions", t?.onSelect);
1248
1355
  }
1249
- function u(e) {
1250
- i("qmap_change", {
1251
- qMap: r.qMap,
1356
+ function f(e) {
1357
+ a("qmap_change", {
1358
+ qMap: i.qMap,
1252
1359
  value: JSON.stringify(e)
1253
- }), c(e);
1360
+ }), l(e);
1254
1361
  }
1255
- return (t, r) => (w(), l("div", {
1256
- class: v({
1257
- "relative flex-1 min-w-0": s.value,
1258
- "relative flex flex-col": !s.value
1362
+ return (t, n) => (S(), o("div", {
1363
+ class: g({
1364
+ "relative flex-1 min-w-0": c.value,
1365
+ "relative flex flex-col": !c.value
1259
1366
  }),
1260
- style: y({ height: s.value ? "100%" : "400px" })
1261
- }, [p(j(n), {
1262
- modelValue: o.value,
1263
- "onUpdate:modelValue": [r[0] ||= (e) => o.value = e, u],
1367
+ style: _({ height: c.value ? "100%" : "400px" })
1368
+ }, [u(A(r), {
1369
+ modelValue: s.value,
1370
+ "onUpdate:modelValue": [n[0] ||= (e) => s.value = e, f],
1264
1371
  readOnly: e.readOnly,
1265
1372
  lite: e.lite,
1266
- class: v(s.value ? "absolute inset-0" : "flex-1 min-w-0"),
1373
+ class: g(c.value ? "absolute inset-0" : "flex-1 min-w-0"),
1267
1374
  "q-map": e.qMap,
1268
1375
  keys: e.provider?.keyPairs || e.extras || {},
1269
1376
  toolbar: e.qMap.ui
@@ -1277,10 +1384,10 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1277
1384
  "toolbar"
1278
1385
  ])], 6));
1279
1386
  }
1280
- }), Qt = { class: "mb-4" }, $t = { class: "my-2 flex flex-row items-center justify-between" }, en = { class: "qmap-table" }, tn = ["onUpdate:modelValue"], nn = ["onUpdate:modelValue"], rn = ["onClick"], an = { key: 0 }, on = {
1387
+ }), an = { class: "mb-4" }, on = { class: "my-2 flex flex-row items-center justify-between" }, sn = { class: "qmap-table" }, cn = ["onUpdate:modelValue"], ln = ["onUpdate:modelValue"], un = ["onClick"], dn = { key: 0 }, fn = {
1281
1388
  colspan: "2",
1282
1389
  class: "text-center"
1283
- }, sn = /* @__PURE__ */ h({
1390
+ }, pn = /* @__PURE__ */ f({
1284
1391
  __name: "qSimpleMap",
1285
1392
  props: {
1286
1393
  qMap: {},
@@ -1293,71 +1400,71 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1293
1400
  style: {}
1294
1401
  },
1295
1402
  emits: ["qmap_change", "qmap_subquestions"],
1296
- setup(t, { emit: i }) {
1297
- let a = t, o = i, s = T([]);
1298
- L(() => a.model, (e) => d(a.model[a.qMap.id])), b(() => {
1299
- d(a.model[a.qMap.id] || void 0);
1403
+ setup(t, { emit: n }) {
1404
+ let r = t, i = n, c = w([]);
1405
+ I(() => r.model, (e) => l(r.model[r.qMap.id])), v(() => {
1406
+ l(r.model[r.qMap.id] || void 0);
1300
1407
  });
1301
- function d(e) {
1302
- e ? s.value = Object.keys(e).map((t) => ({
1408
+ function l(e) {
1409
+ e ? c.value = Object.keys(e).map((t) => ({
1303
1410
  key: t,
1304
1411
  val: e[t]
1305
- })) : s.value = [];
1412
+ })) : c.value = [];
1306
1413
  }
1307
- function f() {
1308
- let e = s.value.length ? s.value.reduce((e, t) => (e[t.key] = t.val, e), {}) : {};
1309
- o("qmap_change", {
1310
- qMap: a.qMap,
1414
+ function d() {
1415
+ let e = c.value.length ? c.value.reduce((e, t) => (e[t.key] = t.val, e), {}) : {};
1416
+ i("qmap_change", {
1417
+ qMap: r.qMap,
1311
1418
  value: e
1312
1419
  });
1313
1420
  }
1314
- function m() {
1315
- s.value = s.value.concat([{
1421
+ function f() {
1422
+ c.value = c.value.concat([{
1316
1423
  key: "",
1317
1424
  val: ""
1318
- }]), f();
1425
+ }]), d();
1319
1426
  }
1320
- function h(e) {
1321
- s.value = s.value.filter((t) => t != e), f();
1427
+ function p(e) {
1428
+ c.value = c.value.filter((t) => t != e), d();
1322
1429
  }
1323
- return (i, a) => (w(), l("div", Qt, [u("div", $t, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), u("div", null, [u("button", {
1430
+ return (n, r) => (S(), o("div", an, [s("div", on, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", null, [s("button", {
1324
1431
  type: "button",
1325
1432
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1326
1433
  "aria-label": "Add row",
1327
- onClick: a[0] ||= (e) => m()
1328
- }, "+")])]), u("table", en, [a[4] ||= u("thead", null, [u("tr", null, [u("th", null, "Name"), u("th", null, "Value")])], -1), u("tbody", null, [(w(!0), l(r, null, E(s.value, (e, t) => (w(), l("tr", null, [u("td", null, [p(n, null, {
1329
- default: R(() => [z(u("input", {
1330
- "onUpdate:modelValue": (e) => s.value[t].key = e,
1434
+ onClick: r[0] ||= (e) => f()
1435
+ }, "+")])]), s("table", sn, [r[4] ||= s("thead", null, [s("tr", null, [s("th", null, "Name"), s("th", null, "Value")])], -1), s("tbody", null, [(S(!0), o(e, null, T(c.value, (e, t) => (S(), o("tr", null, [s("td", null, [u(X, null, {
1436
+ default: L(() => [R(s("input", {
1437
+ "onUpdate:modelValue": (e) => c.value[t].key = e,
1331
1438
  class: "qmap-input min-w-0 flex-1 px-0 py-2",
1332
- onInput: f
1333
- }, null, 40, tn), [[F, s.value[t].key]])]),
1439
+ onInput: d
1440
+ }, null, 40, cn), [[P, c.value[t].key]])]),
1334
1441
  _: 2
1335
- }, 1024)]), u("td", null, [p(n, null, {
1336
- append: R(() => [u("button", {
1442
+ }, 1024)]), s("td", null, [u(X, null, {
1443
+ append: L(() => [s("button", {
1337
1444
  type: "button",
1338
1445
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
1339
1446
  "aria-label": "Remove row",
1340
- onClick: (t) => h(e)
1341
- }, [...a[2] ||= [u("i", { class: "fa fa-trash" }, null, -1)]], 8, rn)]),
1342
- default: R(() => [z(u("input", {
1343
- "onUpdate:modelValue": (e) => s.value[t].val = e,
1447
+ onClick: (t) => p(e)
1448
+ }, [...r[2] ||= [s("i", { class: "fa fa-trash" }, null, -1)]], 8, un)]),
1449
+ default: L(() => [R(s("input", {
1450
+ "onUpdate:modelValue": (e) => c.value[t].val = e,
1344
1451
  class: "qmap-input min-w-0 flex-1 px-0 py-2",
1345
- onInput: f
1346
- }, null, 40, nn), [[F, s.value[t].val]])]),
1452
+ onInput: d
1453
+ }, null, 40, ln), [[P, c.value[t].val]])]),
1347
1454
  _: 2
1348
- }, 1024)])]))), 256)), s.value.length ? c("", !0) : (w(), l("tr", an, [u("td", on, [a[3] ||= u("div", null, "No values ", -1), u("button", {
1455
+ }, 1024)])]))), 256)), c.value.length ? a("", !0) : (S(), o("tr", dn, [s("td", fn, [r[3] ||= s("div", null, "No values ", -1), s("button", {
1349
1456
  type: "button",
1350
1457
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1351
- onClick: a[1] ||= (e) => m()
1458
+ onClick: r[1] ||= (e) => f()
1352
1459
  }, "Add Row")])]))])])]));
1353
1460
  }
1354
- }), cn = { class: "flex flex-col flex-1 min-w-0" }, ln = { key: 16 }, un = { key: 17 }, dn = { key: 18 }, fn = {
1461
+ }), mn = { class: "flex flex-col flex-1 min-w-0" }, hn = { key: 16 }, gn = { key: 17 }, _n = { key: 18 }, vn = {
1355
1462
  key: 0,
1356
1463
  class: "qmap-separator my-4"
1357
- }, pn = {
1464
+ }, yn = {
1358
1465
  key: 1,
1359
1466
  class: "qmap_nested flex flex-col gap-2"
1360
- }, Q = /* @__PURE__ */ h({
1467
+ }, Q = /* @__PURE__ */ f({
1361
1468
  __name: "Question",
1362
1469
  props: {
1363
1470
  qMap: {},
@@ -1369,21 +1476,21 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1369
1476
  lite: { type: Boolean }
1370
1477
  },
1371
1478
  emits: ["update:model-value", "change"],
1372
- setup(t, { emit: n }) {
1373
- let i = t, o = n, d = a(() => i.modelValue[i.qMap.id] != null), f = a(() => (i.qMap.type || "string").toLowerCase()), m = a(() => i.provider?.questionTypes[f.value]), h = T(!1), g = a(() => h.value && i.qMap.onValue || []), _ = T([]), y = a(() => g.value.concat(_.value));
1374
- b(() => {
1375
- h.value = i.modelValue[i.qMap.id] != null && i.modelValue[i.qMap.id] != "", !d.value && i.qMap.default && !m.value && (i.modelValue[i.qMap.id] = i.qMap.default);
1479
+ setup(t, { emit: r }) {
1480
+ let c = t, l = r, d = n(() => c.modelValue[c.qMap.id] != null), f = n(() => (c.qMap.type || "string").toLowerCase()), p = n(() => c.provider?.questionTypes[f.value]), m = w(!1), h = n(() => m.value && c.qMap.onValue || []), _ = w([]), y = n(() => h.value.concat(_.value));
1481
+ v(() => {
1482
+ m.value = c.modelValue[c.qMap.id] != null && c.modelValue[c.qMap.id] != "", !d.value && c.qMap.default && !p.value && (c.modelValue[c.qMap.id] = c.qMap.default);
1376
1483
  });
1377
- function x(e) {
1378
- i.modelValue[i.qMap.id] = e.value, h.value = i.modelValue[i.qMap.id] != null && i.modelValue[i.qMap.id] != "", i.validator && i.validator.updateEvent(e), o("update:model-value", i.modelValue), o("change", e, i.modelValue);
1484
+ function b(e) {
1485
+ c.modelValue[c.qMap.id] = e.value, m.value = c.modelValue[c.qMap.id] != null && c.modelValue[c.qMap.id] != "", c.validator && c.validator.updateEvent(e), l("update:model-value", c.modelValue), l("change", e, c.modelValue);
1379
1486
  }
1380
- function S(e, t) {
1381
- x(e), h.value = e.value && e.qMap.onValue;
1487
+ function x(e, t) {
1488
+ b(e), m.value = e.value && e.qMap.onValue;
1382
1489
  }
1383
- return (n, i) => {
1384
- let a = O("Question", !0);
1385
- return w(), l(r, null, [
1386
- u("div", cn, [m.value ? (w(), s(k(t.provider?.questionTypes[f.value]), {
1490
+ return (n, r) => {
1491
+ let c = D("Question", !0);
1492
+ return S(), o(e, null, [
1493
+ s("div", mn, [p.value ? (S(), i(O(t.provider?.questionTypes[f.value]), {
1387
1494
  key: 0,
1388
1495
  qMap: t.qMap,
1389
1496
  modelValue: t.modelValue,
@@ -1392,8 +1499,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1392
1499
  validator: t.validator,
1393
1500
  lite: t.lite,
1394
1501
  readOnly: t.readOnly,
1395
- onChange: S,
1396
- "onUpdate:modelValue": i[0] ||= (e) => o("update:model-value", e)
1502
+ onChange: x,
1503
+ "onUpdate:modelValue": r[0] ||= (e) => l("update:model-value", e)
1397
1504
  }, null, 40, [
1398
1505
  "qMap",
1399
1506
  "modelValue",
@@ -1402,7 +1509,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1402
1509
  "validator",
1403
1510
  "lite",
1404
1511
  "readOnly"
1405
- ])) : f.value == "text" || f.value == "string" ? (w(), s(Z, {
1512
+ ])) : f.value == "text" || f.value == "string" ? (S(), i(Z, {
1406
1513
  key: 1,
1407
1514
  qMap: t.qMap,
1408
1515
  model: t.modelValue,
@@ -1410,7 +1517,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1410
1517
  validator: t.validator,
1411
1518
  lite: t.lite,
1412
1519
  readOnly: t.readOnly || t.qMap.readOnly,
1413
- onQmap_change: x
1520
+ onQmap_change: b
1414
1521
  }, null, 8, [
1415
1522
  "qMap",
1416
1523
  "model",
@@ -1418,7 +1525,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1418
1525
  "validator",
1419
1526
  "lite",
1420
1527
  "readOnly"
1421
- ])) : f.value == "object" ? (w(), s(qt, {
1528
+ ])) : f.value == "object" ? (S(), i($t, {
1422
1529
  key: 2,
1423
1530
  qMap: t.qMap,
1424
1531
  model: t.modelValue,
@@ -1427,7 +1534,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1427
1534
  lite: t.lite,
1428
1535
  readOnly: t.readOnly || t.qMap.readOnly,
1429
1536
  provider: t.provider,
1430
- onQmap_change: x
1537
+ onQmap_change: b
1431
1538
  }, null, 8, [
1432
1539
  "qMap",
1433
1540
  "model",
@@ -1436,7 +1543,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1436
1543
  "lite",
1437
1544
  "readOnly",
1438
1545
  "provider"
1439
- ])) : f.value == "number" ? (w(), s(Z, {
1546
+ ])) : f.value == "number" ? (S(), i(Z, {
1440
1547
  key: 3,
1441
1548
  qMap: t.qMap,
1442
1549
  model: t.modelValue,
@@ -1445,7 +1552,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1445
1552
  validator: t.validator,
1446
1553
  lite: t.lite,
1447
1554
  readOnly: t.readOnly || t.qMap.readOnly,
1448
- onQmap_change: x
1555
+ onQmap_change: b
1449
1556
  }, null, 8, [
1450
1557
  "qMap",
1451
1558
  "model",
@@ -1453,7 +1560,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1453
1560
  "validator",
1454
1561
  "lite",
1455
1562
  "readOnly"
1456
- ])) : f.value == "colour" ? (w(), s(ot, {
1563
+ ])) : f.value == "colour" ? (S(), i(ft, {
1457
1564
  key: 4,
1458
1565
  qMap: t.qMap,
1459
1566
  model: t.modelValue,
@@ -1461,7 +1568,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1461
1568
  validator: t.validator,
1462
1569
  lite: t.lite,
1463
1570
  readOnly: t.readOnly || t.qMap.readOnly,
1464
- onQmap_change: x
1571
+ onQmap_change: b
1465
1572
  }, null, 8, [
1466
1573
  "qMap",
1467
1574
  "model",
@@ -1469,7 +1576,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1469
1576
  "validator",
1470
1577
  "lite",
1471
1578
  "readOnly"
1472
- ])) : f.value == "date" ? (w(), s(xt, {
1579
+ ])) : f.value == "date" ? (S(), i(Dt, {
1473
1580
  key: 5,
1474
1581
  qMap: t.qMap,
1475
1582
  model: t.modelValue,
@@ -1478,7 +1585,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1478
1585
  validator: t.validator,
1479
1586
  lite: t.lite,
1480
1587
  readOnly: t.readOnly || t.qMap.readOnly,
1481
- onQmap_change: x
1588
+ onQmap_change: b
1482
1589
  }, null, 8, [
1483
1590
  "qMap",
1484
1591
  "model",
@@ -1486,7 +1593,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1486
1593
  "validator",
1487
1594
  "lite",
1488
1595
  "readOnly"
1489
- ])) : f.value == "datetime" ? (w(), s(xt, {
1596
+ ])) : f.value == "datetime" ? (S(), i(Dt, {
1490
1597
  key: 6,
1491
1598
  qMap: t.qMap,
1492
1599
  model: t.modelValue,
@@ -1495,7 +1602,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1495
1602
  validator: t.validator,
1496
1603
  lite: t.lite,
1497
1604
  readOnly: t.readOnly || t.qMap.readOnly,
1498
- onQmap_change: x
1605
+ onQmap_change: b
1499
1606
  }, null, 8, [
1500
1607
  "qMap",
1501
1608
  "model",
@@ -1503,7 +1610,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1503
1610
  "validator",
1504
1611
  "lite",
1505
1612
  "readOnly"
1506
- ])) : f.value == "time" ? (w(), s(Z, {
1613
+ ])) : f.value == "time" ? (S(), i(Z, {
1507
1614
  key: 7,
1508
1615
  qMap: t.qMap,
1509
1616
  model: t.modelValue,
@@ -1512,7 +1619,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1512
1619
  validator: t.validator,
1513
1620
  lite: t.lite,
1514
1621
  readOnly: t.readOnly || t.qMap.readOnly,
1515
- onQmap_change: x
1622
+ onQmap_change: b
1516
1623
  }, null, 8, [
1517
1624
  "qMap",
1518
1625
  "model",
@@ -1520,7 +1627,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1520
1627
  "validator",
1521
1628
  "lite",
1522
1629
  "readOnly"
1523
- ])) : f.value == "colour" || f.value == "color" ? (w(), s(Z, {
1630
+ ])) : f.value == "colour" || f.value == "color" ? (S(), i(Z, {
1524
1631
  key: 8,
1525
1632
  qMap: t.qMap,
1526
1633
  model: t.modelValue,
@@ -1529,7 +1636,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1529
1636
  readOnly: t.readOnly || t.qMap.readOnly,
1530
1637
  style: "color",
1531
1638
  extras: t.extras,
1532
- onQmap_change: x
1639
+ onQmap_change: b
1533
1640
  }, null, 8, [
1534
1641
  "qMap",
1535
1642
  "model",
@@ -1537,13 +1644,13 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1537
1644
  "lite",
1538
1645
  "readOnly",
1539
1646
  "extras"
1540
- ])) : f.value == "boolean" ? (w(), s(Oe, {
1647
+ ])) : f.value == "boolean" ? (S(), i(Me, {
1541
1648
  key: 9,
1542
1649
  qMap: t.qMap,
1543
1650
  model: t.modelValue,
1544
- onQmap_subquestions: i[1] ||= (e) => _.value = e || [],
1651
+ onQmap_subquestions: r[1] ||= (e) => _.value = e || [],
1545
1652
  extras: t.extras,
1546
- onQmap_change: x,
1653
+ onQmap_change: b,
1547
1654
  validator: t.validator,
1548
1655
  lite: t.lite,
1549
1656
  readOnly: t.readOnly || t.qMap.readOnly
@@ -1554,7 +1661,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1554
1661
  "validator",
1555
1662
  "lite",
1556
1663
  "readOnly"
1557
- ])) : f.value == "caption" ? (w(), s(Xt, {
1664
+ ])) : f.value == "caption" ? (S(), i(nn, {
1558
1665
  key: 10,
1559
1666
  qMap: t.qMap,
1560
1667
  model: t.modelValue,
@@ -1563,7 +1670,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1563
1670
  "qMap",
1564
1671
  "model",
1565
1672
  "lite"
1566
- ])) : f.value == "choice" ? (w(), s(tt, {
1673
+ ])) : f.value == "choice" ? (S(), i(st, {
1567
1674
  key: 11,
1568
1675
  qMap: t.qMap,
1569
1676
  model: t.modelValue,
@@ -1572,8 +1679,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1572
1679
  lite: t.lite,
1573
1680
  readOnly: t.readOnly || t.qMap.readOnly,
1574
1681
  provider: t.provider,
1575
- onQmap_change: x,
1576
- onQmap_subquestions: i[2] ||= (e) => _.value = e || []
1682
+ onQmap_change: b,
1683
+ onQmap_subquestions: r[2] ||= (e) => _.value = e || []
1577
1684
  }, null, 8, [
1578
1685
  "qMap",
1579
1686
  "model",
@@ -1582,7 +1689,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1582
1689
  "lite",
1583
1690
  "readOnly",
1584
1691
  "provider"
1585
- ])) : f.value == "map" ? (w(), s(sn, {
1692
+ ])) : f.value == "map" ? (S(), i(pn, {
1586
1693
  key: 12,
1587
1694
  qMap: t.qMap,
1588
1695
  model: t.modelValue,
@@ -1591,8 +1698,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1591
1698
  lite: t.lite,
1592
1699
  readOnly: t.readOnly,
1593
1700
  provider: t.provider,
1594
- onQmap_change: x,
1595
- onQmap_subquestions: i[3] ||= (e) => _.value = e || []
1701
+ onQmap_change: b,
1702
+ onQmap_subquestions: r[3] ||= (e) => _.value = e || []
1596
1703
  }, null, 8, [
1597
1704
  "qMap",
1598
1705
  "model",
@@ -1601,7 +1708,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1601
1708
  "lite",
1602
1709
  "readOnly",
1603
1710
  "provider"
1604
- ])) : f.value == "geo_map" ? (w(), s(Zt, {
1711
+ ])) : f.value == "geo_map" ? (S(), i(rn, {
1605
1712
  key: 13,
1606
1713
  qMap: t.qMap,
1607
1714
  model: t.modelValue,
@@ -1610,8 +1717,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1610
1717
  lite: t.lite,
1611
1718
  readOnly: t.readOnly,
1612
1719
  provider: t.provider,
1613
- onQmap_change: x,
1614
- onQmap_subquestions: i[4] ||= (e) => _.value = e || []
1720
+ onQmap_change: b,
1721
+ onQmap_subquestions: r[4] ||= (e) => _.value = e || []
1615
1722
  }, null, 8, [
1616
1723
  "qMap",
1617
1724
  "model",
@@ -1620,7 +1727,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1620
1727
  "lite",
1621
1728
  "readOnly",
1622
1729
  "provider"
1623
- ])) : f.value == "array" ? (w(), s(ce, {
1730
+ ])) : f.value == "array" ? (S(), i(fe, {
1624
1731
  key: 14,
1625
1732
  qMap: t.qMap,
1626
1733
  model: t.modelValue,
@@ -1629,7 +1736,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1629
1736
  lite: t.lite,
1630
1737
  provider: t.provider,
1631
1738
  readOnly: t.readOnly || t.qMap.readOnly,
1632
- onQmap_change: x
1739
+ onQmap_change: b
1633
1740
  }, null, 8, [
1634
1741
  "qMap",
1635
1742
  "model",
@@ -1638,7 +1745,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1638
1745
  "lite",
1639
1746
  "provider",
1640
1747
  "readOnly"
1641
- ])) : f.value == "group" ? (w(), s(kt, {
1748
+ ])) : f.value == "group" ? (S(), i(Ft, {
1642
1749
  key: 15,
1643
1750
  qMap: t.qMap,
1644
1751
  model: t.modelValue,
@@ -1647,7 +1754,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1647
1754
  lite: t.lite,
1648
1755
  provider: t.provider,
1649
1756
  readOnly: t.readOnly || t.qMap.readOnly,
1650
- onQmap_change: i[5] ||= (e) => o("change", e, e.value)
1757
+ onQmap_change: r[5] ||= (e) => l("change", e, e.value)
1651
1758
  }, null, 8, [
1652
1759
  "qMap",
1653
1760
  "model",
@@ -1656,15 +1763,15 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1656
1763
  "lite",
1657
1764
  "provider",
1658
1765
  "readOnly"
1659
- ])) : f.value == "col" ? (w(), l("div", ln, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), u("div", { class: v(["flex gap-2", {
1766
+ ])) : f.value == "col" ? (S(), o("div", hn, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", { class: g(["flex gap-2", {
1660
1767
  "flex-row": t.qMap.style != "column",
1661
1768
  "flex-col": t.qMap.style == "column"
1662
- }]) }, [(w(!0), l(r, null, E(t.qMap.items, (e) => (w(), l("div", { class: v(["flex flex-1 flex-col min-w-0", { "gap-2": t.qMap.style != "column" }]) }, [p(a, {
1769
+ }]) }, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), o("div", { class: g(["flex flex-1 flex-col min-w-0", { "gap-2": t.qMap.style != "column" }]) }, [u(c, {
1663
1770
  qMap: e,
1664
1771
  modelValue: t.modelValue,
1665
1772
  extras: t.extras,
1666
- onChange: i[6] ||= (e, t) => o("change", e, t),
1667
- "onUpdate:modelValue": i[7] ||= (e) => o("update:model-value", e),
1773
+ onChange: r[6] ||= (e, t) => l("change", e, t),
1774
+ "onUpdate:modelValue": r[7] ||= (e) => l("update:model-value", e),
1668
1775
  provider: t.provider,
1669
1776
  validator: t.validator,
1670
1777
  lite: t.lite,
@@ -1677,14 +1784,14 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1677
1784
  "validator",
1678
1785
  "lite",
1679
1786
  "readOnly"
1680
- ])], 2))), 256))], 2)])) : f.value == "hidden" ? (w(), l("div", un)) : (w(), l("div", dn, "Unsupported " + A(t.qMap?.id) + " : " + A(f.value), 1))]),
1681
- y.value.length && t.qMap.ui?.separator ? (w(), l("hr", fn)) : c("", !0),
1682
- y.value.length ? (w(), l("div", pn, [(w(!0), l(r, null, E(y.value, (e) => (w(), s(a, {
1787
+ ])], 2))), 256))], 2)])) : f.value == "hidden" ? (S(), o("div", gn)) : (S(), o("div", _n, "Unsupported " + k(t.qMap?.id) + " : " + k(f.value), 1))]),
1788
+ y.value.length && t.qMap.ui?.separator ? (S(), o("hr", vn)) : a("", !0),
1789
+ y.value.length ? (S(), o("div", yn, [(S(!0), o(e, null, T(y.value, (e) => (S(), i(c, {
1683
1790
  qMap: e,
1684
1791
  modelValue: t.modelValue,
1685
1792
  extras: t.extras,
1686
- onChange: i[8] ||= (e, t) => o("change", e, t),
1687
- "onUpdate:modelValue": i[9] ||= (e) => o("update:model-value", e),
1793
+ onChange: r[8] ||= (e, t) => l("change", e, t),
1794
+ "onUpdate:modelValue": r[9] ||= (e) => l("update:model-value", e),
1688
1795
  provider: t.provider,
1689
1796
  validator: t.validator,
1690
1797
  lite: t.lite,
@@ -1697,14 +1804,14 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1697
1804
  "validator",
1698
1805
  "lite",
1699
1806
  "readOnly"
1700
- ]))), 256))])) : c("", !0)
1807
+ ]))), 256))])) : a("", !0)
1701
1808
  ], 64);
1702
1809
  };
1703
1810
  }
1704
- }), mn = ["col", "group"];
1705
- function hn(e, t) {
1811
+ }), bn = ["col", "group"];
1812
+ function xn(e, t) {
1706
1813
  var n = [];
1707
- if (mn.indexOf(e.type) != -1 && (e.items || e.groups) ? e.items ? n = n.concat(e.items) : e.groups && (n = n.concat(e.groups.map((e) => e.items).reduce((e, t) => e.concat(t)).map((e) => hn(e, t)).reduce((e, t) => e.concat(t)))) : n.push(e), e.onValue && (!t || t[e.id] != null && t[e.id] != "") && (n = n.concat($(e.onValue, t))), e.type == "boolean" && (!t || t[e.id] == 1) && e.onPos && (n = n.concat($(e.onPos, t))), e.type == "boolean" && (!t || t[e.id] == 0) && e.onNeg && (n = n.concat($(e.onNeg, t))), e.values) {
1814
+ if (bn.indexOf(e.type) != -1 && (e.items || e.groups) ? e.items ? n = n.concat(e.items) : e.groups && (n = n.concat(e.groups.map((e) => e.items).reduce((e, t) => e.concat(t)).map((e) => xn(e, t)).reduce((e, t) => e.concat(t)))) : n.push(e), e.onValue && (!t || t[e.id] != null && t[e.id] != "") && (n = n.concat($(e.onValue, t))), e.type == "boolean" && (!t || t[e.id] == 1) && e.onPos && (n = n.concat($(e.onPos, t))), e.type == "boolean" && (!t || t[e.id] == 0) && e.onNeg && (n = n.concat($(e.onNeg, t))), e.values) {
1708
1815
  let r = e.values.find((n) => n.value == (!t || t[e.id]));
1709
1816
  r?.onSelect && (n = n.concat($(r.onSelect, t)));
1710
1817
  }
@@ -1714,21 +1821,21 @@ function $(e, t) {
1714
1821
  var n = [];
1715
1822
  return e.forEach((e) => {
1716
1823
  if (e.type != "caption") {
1717
- let r = hn(e, t);
1824
+ let r = xn(e, t);
1718
1825
  n = n.concat(r);
1719
1826
  }
1720
1827
  }), n;
1721
1828
  }
1722
1829
  //#endregion
1723
1830
  //#region src/services/question-validator.ts
1724
- var gn = class {
1725
- invalidFields = new U([]);
1726
- isValid = new U(!0);
1831
+ var Sn = class {
1832
+ invalidFields = new H([]);
1833
+ isValid = new H(!0);
1727
1834
  qMaps = [];
1728
1835
  requiredQMaps = [];
1729
1836
  children = [];
1730
1837
  baseQMaps;
1731
- changeEvents = new W();
1838
+ changeEvents = new U();
1732
1839
  model;
1733
1840
  activeQMAPS = /* @__PURE__ */ new Map();
1734
1841
  constructor(e, t) {
@@ -1758,10 +1865,10 @@ var gn = class {
1758
1865
  get currentQMaps() {
1759
1866
  return this.qMaps;
1760
1867
  }
1761
- }, _n = {
1868
+ }, Cn = {
1762
1869
  key: 0,
1763
1870
  class: "flex-1 min-w-0 overflow-auto"
1764
- }, vn = { class: "flex flex-col gap-2 p-2" }, yn = { class: "flex justify-end gap-2" }, bn = ["disabled"], xn = /* @__PURE__ */ h({
1871
+ }, wn = { class: "flex flex-col gap-2 p-2" }, Tn = { class: "flex justify-end gap-2" }, En = ["disabled"], Dn = /* @__PURE__ */ f({
1765
1872
  __name: "Form",
1766
1873
  props: {
1767
1874
  questions: {},
@@ -1780,99 +1887,108 @@ var gn = class {
1780
1887
  "qmap-change",
1781
1888
  "update:model-value"
1782
1889
  ],
1783
- setup(e, { emit: t }) {
1784
- let n = e, i = t, o = { ...n.modelValue }, d = n.validator || new gn(n.questions, n.modelValue), f = T(!0), p = a(() => !(n.showSubmit || n.showCancel || n.showReset)), m = a({
1785
- get: () => n.modelValue,
1786
- set: (e) => i("update:model-value", e)
1890
+ setup(t, { emit: r }) {
1891
+ let c = t, l = r, u = { ...c.modelValue }, d = c.validator || new Sn(c.questions, c.modelValue), f = w(!0), p = n(() => !(c.showSubmit || c.showCancel || c.showReset)), m = n({
1892
+ get: () => c.modelValue,
1893
+ set: (e) => l("update:model-value", e)
1787
1894
  });
1788
1895
  function h(e, t) {
1789
- i("qmap-change", e, t);
1896
+ l("qmap-change", e, t);
1790
1897
  }
1791
- let g;
1792
- return b(() => {
1793
- g = d.isValid.subscribe((e) => f.value = e);
1794
- }), C(() => g?.unsubscribe()), (t, n) => p.value ? (w(!0), l(r, { key: 0 }, E(e.questions, (t, r) => (w(), s(Q, {
1795
- key: r,
1796
- qMap: t,
1797
- validator: j(d),
1798
- extras: e.extras,
1898
+ let _;
1899
+ return v(() => {
1900
+ _ = d.isValid.subscribe((e) => f.value = e);
1901
+ }), x(() => _?.unsubscribe()), (n, r) => p.value ? (S(!0), o(e, { key: 0 }, T(t.questions, (e, n) => (S(), i(Q, {
1902
+ key: n,
1903
+ qMap: e,
1904
+ validator: A(d),
1905
+ extras: t.extras,
1799
1906
  onChange: h,
1800
1907
  modelValue: m.value,
1801
- "onUpdate:modelValue": n[0] ||= (e) => m.value = e
1908
+ "onUpdate:modelValue": r[0] ||= (e) => m.value = e
1802
1909
  }, null, 8, [
1803
1910
  "qMap",
1804
1911
  "validator",
1805
1912
  "extras",
1806
1913
  "modelValue"
1807
- ]))), 128)) : (w(), l("div", {
1914
+ ]))), 128)) : (S(), o("div", {
1808
1915
  key: 1,
1809
- class: v({
1810
- "flex flex-col flex-1 min-w-0": e.scrollPane,
1811
- "flex flex-col gap-2 p-2": !e.scrollPane
1916
+ class: g({
1917
+ "flex flex-col flex-1 min-w-0": t.scrollPane,
1918
+ "flex flex-col gap-2 p-2": !t.scrollPane
1812
1919
  })
1813
1920
  }, [
1814
- e.scrollPane ? (w(), l("div", _n, [u("div", vn, [(w(!0), l(r, null, E(e.questions, (t, r) => (w(), s(Q, {
1815
- key: r,
1816
- qMap: t,
1817
- validator: j(d),
1818
- extras: e.extras,
1921
+ t.scrollPane ? (S(), o("div", Cn, [s("div", wn, [(S(!0), o(e, null, T(t.questions, (e, n) => (S(), i(Q, {
1922
+ key: n,
1923
+ qMap: e,
1924
+ validator: A(d),
1925
+ extras: t.extras,
1819
1926
  onChange: h,
1820
1927
  modelValue: m.value,
1821
- "onUpdate:modelValue": n[1] ||= (e) => m.value = e
1928
+ "onUpdate:modelValue": r[1] ||= (e) => m.value = e
1822
1929
  }, null, 8, [
1823
1930
  "qMap",
1824
1931
  "validator",
1825
1932
  "extras",
1826
1933
  "modelValue"
1827
- ]))), 128))])])) : (w(!0), l(r, { key: 1 }, E(e.questions, (t, r) => (w(), s(Q, {
1828
- key: r,
1829
- qMap: t,
1830
- validator: j(d),
1831
- extras: e.extras,
1934
+ ]))), 128))])])) : (S(!0), o(e, { key: 1 }, T(t.questions, (e, n) => (S(), i(Q, {
1935
+ key: n,
1936
+ qMap: e,
1937
+ validator: A(d),
1938
+ extras: t.extras,
1832
1939
  onChange: h,
1833
1940
  modelValue: m.value,
1834
- "onUpdate:modelValue": n[2] ||= (e) => m.value = e
1941
+ "onUpdate:modelValue": r[2] ||= (e) => m.value = e
1835
1942
  }, null, 8, [
1836
1943
  "qMap",
1837
1944
  "validator",
1838
1945
  "extras",
1839
1946
  "modelValue"
1840
1947
  ]))), 128)),
1841
- n[6] ||= u("hr", { class: "qmap-separator my-2" }, null, -1),
1842
- u("div", yn, [
1843
- e.showSubmit ? (w(), l("button", {
1948
+ r[6] ||= s("hr", { class: "qmap-separator my-2" }, null, -1),
1949
+ s("div", Tn, [
1950
+ t.showSubmit ? (S(), o("button", {
1844
1951
  key: 0,
1845
1952
  type: "button",
1846
1953
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1847
- onClick: n[3] ||= (e) => i("submit", m.value),
1954
+ onClick: r[3] ||= (e) => l("submit", m.value),
1848
1955
  disabled: !f.value
1849
- }, "Submit", 8, bn)) : c("", !0),
1850
- e.showReset ? (w(), l("button", {
1956
+ }, "Submit", 8, En)) : a("", !0),
1957
+ t.showReset ? (S(), o("button", {
1851
1958
  key: 1,
1852
1959
  type: "button",
1853
1960
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button qmap-button-secondary",
1854
- onClick: n[4] ||= (e) => {
1855
- m.value = o, i("reset");
1961
+ onClick: r[4] ||= (e) => {
1962
+ m.value = u, l("reset");
1856
1963
  }
1857
- }, "Reset")) : c("", !0),
1858
- e.showCancel ? (w(), l("button", {
1964
+ }, "Reset")) : a("", !0),
1965
+ t.showCancel ? (S(), o("button", {
1859
1966
  key: 2,
1860
1967
  type: "button",
1861
1968
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button qmap-button-ghost",
1862
- onClick: n[5] ||= (e) => i("cancel")
1863
- }, "Cancel")) : c("", !0)
1969
+ onClick: r[5] ||= (e) => l("cancel")
1970
+ }, "Cancel")) : a("", !0)
1864
1971
  ])
1865
1972
  ], 2));
1866
1973
  }
1867
1974
  });
1975
+ throw Error("Could not resolve \"leaflet-path-drag\" imported by \"qmap-forms\". Is it installed?");
1976
+ function On(e) {
1977
+ C(Nn, e);
1978
+ }
1979
+ function kn() {
1980
+ let e = m(Nn, null);
1981
+ if (!e) throw Error("useMyService must be called under a provider (comp1)");
1982
+ return e;
1983
+ }
1868
1984
  //#endregion
1869
1985
  //#region src/lib.ts
1870
- function Sn(e, t, n, r) {
1871
- let i = T(n), a = new U(i.value), s = new W(), c = g(xn, {
1986
+ function An(e, t, n, i) {
1987
+ let a = w(n), o = new H(a.value), s = new U(), c = p(Dn, {
1872
1988
  questions: t,
1873
- modelValue: i.value,
1989
+ modelValue: a.value,
1874
1990
  "onUpdate:model-value": (e) => {
1875
- i.value = e, a.next(e);
1991
+ a.value = e, o.next(e);
1876
1992
  },
1877
1993
  onQmapChange: (e, t) => {
1878
1994
  s.next({
@@ -1880,20 +1996,15 @@ function Sn(e, t, n, r) {
1880
1996
  v: t
1881
1997
  });
1882
1998
  },
1883
- ...r
1999
+ ...i
1884
2000
  });
1885
- return o(c).mount(e), {
2001
+ return r(c).mount(e), {
1886
2002
  form: c,
1887
- model: i,
1888
- state: a.asObservable(),
2003
+ model: a,
2004
+ state: o.asObservable(),
1889
2005
  events: s
1890
2006
  };
1891
2007
  }
1892
- var Cn = {
1893
- Question: Q,
1894
- Form: xn,
1895
- QuestionValidator: gn,
1896
- mount: Sn
1897
- };
1898
2008
  //#endregion
1899
- export { xn as Form, Q as Question, gn as QuestionValidator, Cn as default, hn as flattenNode, $ as flattenQMAPs, Sn as mount };
2009
+ export { St as CalendarPicker, Dn as Form, Nn as MyScopeKey, Q as Question, Sn as QuestionValidator, Ke as SimpleChoice, Et as SimpleDate, Mn as SimpleGeomEditor, K as TitleBlock, _e as ToggleSwitch, Pn as default, xn as flattenNode, $ as flattenQMAPs, An as mount, On as provideBadQMAPS, kn as useBadQMAPS };
2010
+ var jn, Mn, Nn, Pn;