sm-click-library-ui 0.0.22 → 0.0.24

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.
@@ -1,246 +1,2281 @@
1
- import { getCurrentScope as F, onScopeDispose as W, unref as H, watch as D, ref as S, computed as k, openBlock as _, createElementBlock as m, createElementVNode as l, toDisplayString as $, normalizeClass as C, renderSlot as b, createCommentVNode as g, pushScopeId as E, popScopeId as I } from "vue";
2
- function N(e) {
3
- return F() ? (W(e), !0) : !1;
1
+ import { getCurrentScope as bt, onScopeDispose as _t, unref as Ct, watch as ce, ref as j, computed as je, openBlock as b, createElementBlock as _, createElementVNode as p, toDisplayString as P, normalizeClass as M, renderSlot as J, createCommentVNode as O, pushScopeId as Me, popScopeId as Ue, onMounted as Et, createTextVNode as xt, Fragment as St, renderList as vt } from "vue";
2
+ function Rt(e) {
3
+ return bt() ? (_t(e), !0) : !1;
4
4
  }
5
- function L(e) {
6
- return typeof e == "function" ? e() : H(e);
5
+ function Ie(e) {
6
+ return typeof e == "function" ? e() : Ct(e);
7
7
  }
8
- const z = typeof window < "u" && typeof document < "u";
8
+ const $e = typeof window < "u" && typeof document < "u";
9
9
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
10
- const T = Object.prototype.toString, G = (e) => T.call(e) === "[object Object]", y = () => {
11
- }, q = /* @__PURE__ */ R();
12
- function R() {
13
- var e, i;
14
- return z && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((i = window == null ? void 0 : window.navigator) == null ? void 0 : i.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
15
- }
16
- function w(e) {
17
- var i;
18
- const n = L(e);
19
- return (i = n == null ? void 0 : n.$el) != null ? i : n;
20
- }
21
- const M = z ? window : void 0;
22
- function x(...e) {
23
- let i, n, s, c;
24
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, s, c] = e, i = M) : [i, n, s, c] = e, !i)
25
- return y;
26
- Array.isArray(n) || (n = [n]), Array.isArray(s) || (s = [s]);
27
- const r = [], p = () => {
28
- r.forEach((d) => d()), r.length = 0;
29
- }, f = (d, u, o, t) => (d.addEventListener(u, o, t), () => d.removeEventListener(u, o, t)), v = D(
30
- () => [w(i), L(c)],
31
- ([d, u]) => {
32
- if (p(), !d)
10
+ const Ot = Object.prototype.toString, At = (e) => Ot.call(e) === "[object Object]", W = () => {
11
+ }, Tt = /* @__PURE__ */ kt();
12
+ function kt() {
13
+ var e, t;
14
+ return $e && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
15
+ }
16
+ function z(e) {
17
+ var t;
18
+ const s = Ie(e);
19
+ return (t = s == null ? void 0 : s.$el) != null ? t : s;
20
+ }
21
+ const qe = $e ? window : void 0;
22
+ function re(...e) {
23
+ let t, s, n, r;
24
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([s, n, r] = e, t = qe) : [t, s, n, r] = e, !t)
25
+ return W;
26
+ Array.isArray(s) || (s = [s]), Array.isArray(n) || (n = [n]);
27
+ const o = [], i = () => {
28
+ o.forEach((c) => c()), o.length = 0;
29
+ }, l = (c, d, w, m) => (c.addEventListener(d, w, m), () => c.removeEventListener(d, w, m)), f = ce(
30
+ () => [z(t), Ie(r)],
31
+ ([c, d]) => {
32
+ if (i(), !c)
33
33
  return;
34
- const o = G(u) ? { ...u } : u;
35
- r.push(
36
- ...n.flatMap((t) => s.map((a) => f(d, t, a, o)))
34
+ const w = At(d) ? { ...d } : d;
35
+ o.push(
36
+ ...s.flatMap((m) => n.map((h) => l(c, m, h, w)))
37
37
  );
38
38
  },
39
39
  { immediate: !0, flush: "post" }
40
- ), h = () => {
41
- v(), p();
42
- };
43
- return N(h), h;
44
- }
45
- let A = !1;
46
- function U(e, i, n = {}) {
47
- const { window: s = M, ignore: c = [], capture: r = !0, detectIframe: p = !1 } = n;
48
- if (!s)
49
- return y;
50
- q && !A && (A = !0, Array.from(s.document.body.children).forEach((o) => o.addEventListener("click", y)), s.document.documentElement.addEventListener("click", y));
51
- let f = !0;
52
- const v = (o) => c.some((t) => {
53
- if (typeof t == "string")
54
- return Array.from(s.document.querySelectorAll(t)).some((a) => a === o.target || o.composedPath().includes(a));
40
+ ), u = () => {
41
+ f(), i();
42
+ };
43
+ return Rt(u), u;
44
+ }
45
+ let xe = !1;
46
+ function Lt(e, t, s = {}) {
47
+ const { window: n = qe, ignore: r = [], capture: o = !0, detectIframe: i = !1 } = s;
48
+ if (!n)
49
+ return W;
50
+ Tt && !xe && (xe = !0, Array.from(n.document.body.children).forEach((w) => w.addEventListener("click", W)), n.document.documentElement.addEventListener("click", W));
51
+ let l = !0;
52
+ const f = (w) => r.some((m) => {
53
+ if (typeof m == "string")
54
+ return Array.from(n.document.querySelectorAll(m)).some((h) => h === w.target || w.composedPath().includes(h));
55
55
  {
56
- const a = w(t);
57
- return a && (o.target === a || o.composedPath().includes(a));
58
- }
59
- }), d = [
60
- x(s, "click", (o) => {
61
- const t = w(e);
62
- if (!(!t || t === o.target || o.composedPath().includes(t))) {
63
- if (o.detail === 0 && (f = !v(o)), !f) {
64
- f = !0;
56
+ const h = z(m);
57
+ return h && (w.target === h || w.composedPath().includes(h));
58
+ }
59
+ }), c = [
60
+ re(n, "click", (w) => {
61
+ const m = z(e);
62
+ if (!(!m || m === w.target || w.composedPath().includes(m))) {
63
+ if (w.detail === 0 && (l = !f(w)), !l) {
64
+ l = !0;
65
65
  return;
66
66
  }
67
- i(o);
67
+ t(w);
68
68
  }
69
- }, { passive: !0, capture: r }),
70
- x(s, "pointerdown", (o) => {
71
- const t = w(e);
72
- f = !v(o) && !!(t && !o.composedPath().includes(t));
69
+ }, { passive: !0, capture: o }),
70
+ re(n, "pointerdown", (w) => {
71
+ const m = z(e);
72
+ l = !f(w) && !!(m && !w.composedPath().includes(m));
73
73
  }, { passive: !0 }),
74
- p && x(s, "blur", (o) => {
74
+ i && re(n, "blur", (w) => {
75
75
  setTimeout(() => {
76
- var t;
77
- const a = w(e);
78
- ((t = s.document.activeElement) == null ? void 0 : t.tagName) === "IFRAME" && !(a != null && a.contains(s.document.activeElement)) && i(o);
76
+ var m;
77
+ const h = z(e);
78
+ ((m = n.document.activeElement) == null ? void 0 : m.tagName) === "IFRAME" && !(h != null && h.contains(n.document.activeElement)) && t(w);
79
79
  }, 0);
80
80
  })
81
81
  ].filter(Boolean);
82
- return () => d.forEach((o) => o());
82
+ return () => c.forEach((w) => w());
83
83
  }
84
- const j = (e, i) => {
85
- const n = e.__vccOpts || e;
86
- for (const [s, c] of i)
87
- n[s] = c;
88
- return n;
89
- }, O = (e) => (E("data-v-a8f8c201"), e = e(), I(), e), Z = {
90
- key: 0,
91
- class: "line-clamp-2 uppercase text-xs truncate text-white"
92
- }, J = {
93
- key: 1,
94
- class: "line-clamp-2 uppercase text-xs truncate text-white"
95
- }, K = /* @__PURE__ */ O(() => /* @__PURE__ */ l("path", {
84
+ const ze = (e, t) => {
85
+ const s = e.__vccOpts || e;
86
+ for (const [n, r] of t)
87
+ s[n] = r;
88
+ return s;
89
+ }, Nt = (e) => (Me("data-v-af0111a4"), e = e(), Ue(), e), Pt = { class: "line-clamp-2 uppercase text-xs truncate text-white" }, Bt = /* @__PURE__ */ Nt(() => /* @__PURE__ */ p("path", {
96
90
  "fill-rule": "evenodd",
97
91
  d: "M18.4 10.3A2 2 0 0 0 17 7H7a2 2 0 0 0-1.5 3.3l4.9 5.9a2 2 0 0 0 3 0l5-6Z",
98
92
  "clip-rule": "evenodd"
99
- }, null, -1)), Q = [
100
- K
101
- ], X = {
93
+ }, null, -1)), Dt = [
94
+ Bt
95
+ ], Ft = {
102
96
  key: 0,
103
97
  class: "select_widget_lib"
104
- }, Y = { key: 0 }, ee = {
105
- key: 1,
106
- class: "space-y-2"
107
- }, te = /* @__PURE__ */ O(() => /* @__PURE__ */ l("p", { class: "line-clamp-2 uppercase text-xs truncate" }, "Vertical", -1)), oe = [
108
- te
109
- ], se = /* @__PURE__ */ O(() => /* @__PURE__ */ l("p", { class: "line-clamp-2 uppercase text-xs truncate" }, "Horizontal", -1)), ne = [
110
- se
111
- ], le = {
98
+ }, jt = {
112
99
  __name: "primary_select",
113
100
  props: {
114
- titleFreeSlot: {
115
- type: String,
116
- default: "Free Slot"
117
- },
118
- selectConfig: {
101
+ config: {
119
102
  type: Object,
120
- default: () => ({
121
- chartsConfig: !1,
122
- freeSlot: !1
123
- })
103
+ default: {
104
+ title: "select_primary"
105
+ }
124
106
  }
125
107
  },
126
108
  emits: ["closeSelect"],
127
- setup(e, { emit: i }) {
128
- const n = e, s = i, c = S(!1), r = S("Horizontal"), p = S(null), f = k(() => n.selectConfig.length > 0), v = k(
129
- () => n.selectConfig.some((t) => t.chartsConfig)
130
- ), h = k(
131
- () => n.selectConfig.some((t) => t.freeSlot)
132
- ), d = () => {
133
- c.value = !c.value;
134
- }, u = (t) => {
135
- c.value = !1, r.value = t === "horizontal" ? "Vertical" : "Horizontal", s("closeSelect", t);
109
+ setup(e, { emit: t }) {
110
+ const s = e, n = j(!1), r = j(null);
111
+ je(
112
+ () => s.selectConfig.some((l) => l.freeSlot)
113
+ );
114
+ const o = () => {
115
+ n.value = !n.value;
136
116
  };
137
- return U(p, () => {
138
- c.value && (c.value = !1);
139
- }), (t, a) => f.value ? (_(), m("div", {
140
- key: 0,
117
+ return Lt(r, () => {
118
+ n.value && (n.value = !1);
119
+ }), (l, f) => (b(), _("div", {
141
120
  ref_key: "target",
142
- ref: p,
121
+ ref: r,
143
122
  class: "relative w-full"
144
123
  }, [
145
- l("button", {
146
- onClick: d,
124
+ p("button", {
125
+ onClick: o,
147
126
  class: "bg-base-100 z-10 truncate flex items-center justify-between gap-6 p-2 rounded-md lg:mt-0 w-full shadow-md shadow-base-300"
148
127
  }, [
149
- l("div", null, [
150
- v.value ? (_(), m("p", Z, $(r.value), 1)) : (_(), m("p", J, $(e.titleFreeSlot), 1))
128
+ p("div", null, [
129
+ p("p", Pt, P(e.config.title), 1)
151
130
  ]),
152
- l("div", null, [
153
- (_(), m("svg", {
154
- class: C([c.value ? "rotate-180 transition-transform ease-in-out" : "", "w-3 h-3 text-white"]),
131
+ p("div", null, [
132
+ (b(), _("svg", {
133
+ class: M([n.value ? "rotate-180 transition-transform ease-in-out" : "", "w-3 h-3 text-white"]),
155
134
  xmlns: "http://www.w3.org/2000/svg",
156
135
  fill: "currentColor",
157
136
  viewBox: "0 0 24 24"
158
- }, Q, 2))
137
+ }, Dt, 2))
159
138
  ])
160
139
  ]),
161
- c.value ? (_(), m("section", X, [
162
- h.value ? (_(), m("div", Y, [
163
- b(t.$slots, "free-slot", {}, void 0, !0)
164
- ])) : g("", !0),
165
- v.value ? (_(), m("div", ee, [
166
- l("button", {
167
- class: C([r.value === "Vertical" ? "bg-green-500" : "", "btn_select_widget_lib"]),
168
- onClick: a[0] || (a[0] = () => u("horizontal"))
169
- }, oe, 2),
170
- l("button", {
171
- class: C([r.value !== "Vertical" ? "bg-green-500" : "", "btn_select_widget_lib"]),
172
- onClick: a[1] || (a[1] = () => u("vertical"))
173
- }, ne, 2)
174
- ])) : g("", !0)
175
- ])) : g("", !0)
176
- ], 512)) : g("", !0);
177
- }
178
- }, P = /* @__PURE__ */ j(le, [["__scopeId", "data-v-a8f8c201"]]), B = (e) => (E("data-v-4c81a5bf"), e = e(), I(), e), ie = {
140
+ n.value ? (b(), _("section", Ft, [
141
+ p("div", null, [
142
+ J(l.$slots, "free-slot", {}, void 0, !0)
143
+ ])
144
+ ])) : O("", !0)
145
+ ], 512));
146
+ }
147
+ }, He = /* @__PURE__ */ ze(jt, [["__scopeId", "data-v-af0111a4"]]), Ve = (e) => (Me("data-v-4c81a5bf"), e = e(), Ue(), e), Mt = {
179
148
  key: 0,
180
149
  class: "modal_head_lib"
181
- }, ce = /* @__PURE__ */ B(() => /* @__PURE__ */ l("div", { class: "modal-overlay_lib absolute h-full bg-gray-600 w-full opacity-70" }, null, -1)), ae = { class: "modal_responsive_lib" }, re = { class: "flex min-h-full items-center justify-center text-center sm:p-0" }, de = { class: "modal_size_lib lg:w-2/6" }, ue = { class: "modal_background_lib" }, pe = { class: "modal_tittle_lib text-current" }, fe = /* @__PURE__ */ B(() => /* @__PURE__ */ l("svg", {
150
+ }, Ut = /* @__PURE__ */ Ve(() => /* @__PURE__ */ p("div", { class: "modal-overlay_lib absolute h-full bg-gray-600 w-full opacity-70" }, null, -1)), It = { class: "modal_responsive_lib" }, $t = { class: "flex min-h-full items-center justify-center text-center sm:p-0" }, qt = { class: "modal_size_lib lg:w-2/6" }, zt = { class: "modal_background_lib" }, Ht = { class: "modal_tittle_lib text-current" }, Vt = /* @__PURE__ */ Ve(() => /* @__PURE__ */ p("svg", {
182
151
  class: "h-5 w-5",
183
152
  fill: "currentColor",
184
153
  viewBox: "0 0 20 20",
185
154
  xmlns: "http://www.w3.org/2000/svg"
186
155
  }, [
187
- /* @__PURE__ */ l("path", {
156
+ /* @__PURE__ */ p("path", {
188
157
  "fill-rule": "evenodd",
189
158
  d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
190
159
  "clip-rule": "evenodd"
191
160
  })
192
- ], -1)), _e = [
193
- fe
194
- ], me = { class: "p-4" }, ve = { class: "w-full" }, he = { class: "block" }, ge = { class: "modal_end_button_lib sm" }, we = {
161
+ ], -1)), Zt = [
162
+ Vt
163
+ ], Jt = { class: "p-4" }, Wt = { class: "w-full" }, Kt = { class: "block" }, Gt = { class: "modal_end_button_lib sm" }, Xt = {
195
164
  __name: "simple_modal",
196
165
  props: {
197
166
  isOpen: Boolean,
198
167
  default: !1
199
168
  },
200
169
  emits: ["update:isOpen"],
201
- setup(e, { emit: i }) {
202
- const n = e, s = i, c = () => {
203
- s("update:isOpen", !n.isOpen);
170
+ setup(e, { emit: t }) {
171
+ const s = e, n = t, r = () => {
172
+ n("update:isOpen", !s.isOpen);
204
173
  };
205
- return (r, p) => e.isOpen ? (_(), m("div", ie, [
206
- ce,
207
- l("div", ae, [
208
- l("div", re, [
209
- l("div", de, [
210
- l("div", ue, [
211
- l("div", pe, [
212
- b(r.$slots, "header", {}, void 0, !0),
213
- l("button", {
214
- onClick: c,
174
+ return (o, i) => e.isOpen ? (b(), _("div", Mt, [
175
+ Ut,
176
+ p("div", It, [
177
+ p("div", $t, [
178
+ p("div", qt, [
179
+ p("div", zt, [
180
+ p("div", Ht, [
181
+ J(o.$slots, "header", {}, void 0, !0),
182
+ p("button", {
183
+ onClick: r,
215
184
  class: "modal_close_button_lib",
216
185
  "data-modal-toggle": "editUserModal"
217
- }, _e)
186
+ }, Zt)
218
187
  ]),
219
- l("div", me, [
220
- l("div", ve, [
221
- l("label", he, [
222
- b(r.$slots, "body", {}, void 0, !0)
188
+ p("div", Jt, [
189
+ p("div", Wt, [
190
+ p("label", Kt, [
191
+ J(o.$slots, "body", {}, void 0, !0)
223
192
  ])
224
193
  ])
225
194
  ]),
226
- l("div", ge, [
227
- b(r.$slots, "footer", {}, void 0, !0)
195
+ p("div", Gt, [
196
+ J(o.$slots, "footer", {}, void 0, !0)
228
197
  ])
229
198
  ])
230
199
  ])
231
200
  ])
232
201
  ])
233
- ])) : g("", !0);
202
+ ])) : O("", !0);
203
+ }
204
+ }, Ze = /* @__PURE__ */ ze(Xt, [["__scopeId", "data-v-4c81a5bf"]]), Yt = { class: "flex items-center gap-3 mb-2" }, Qt = {
205
+ key: 0,
206
+ class: "text-green-500",
207
+ xmlns: "http://www.w3.org/2000/svg",
208
+ width: "20",
209
+ height: "20",
210
+ viewBox: "0 0 20 20",
211
+ fill: "none"
212
+ }, en = /* @__PURE__ */ p("path", {
213
+ "fill-rule": "evenodd",
214
+ "clip-rule": "evenodd",
215
+ d: "M0.25 10C0.25 4.61522 4.61522 0.25 10 0.25C15.3848 0.25 19.75 4.61522 19.75 10C19.75 15.3848 15.3848 19.75 10 19.75C4.61522 19.75 0.25 15.3848 0.25 10ZM13.6103 8.18593C13.8511 7.84887 13.773 7.38046 13.4359 7.1397C13.0989 6.89894 12.6305 6.97701 12.3897 7.31407L9.1543 11.8436L7.53033 10.2197C7.23744 9.92678 6.76256 9.92678 6.46967 10.2197C6.17678 10.5126 6.17678 10.9874 6.46967 11.2803L8.71967 13.5303C8.87556 13.6862 9.09215 13.7656 9.31186 13.7474C9.53157 13.7293 9.73216 13.6153 9.8603 13.4359L13.6103 8.18593Z",
216
+ fill: "currentColor"
217
+ }, null, -1), tn = [
218
+ en
219
+ ], nn = {
220
+ key: 1,
221
+ class: "text-blue-400",
222
+ xmlns: "http://www.w3.org/2000/svg",
223
+ width: "20",
224
+ height: "20",
225
+ viewBox: "0 0 20 20",
226
+ fill: "none"
227
+ }, sn = /* @__PURE__ */ p("path", {
228
+ "fill-rule": "evenodd",
229
+ "clip-rule": "evenodd",
230
+ d: "M0.25 10C0.25 4.61522 4.61522 0.25 10 0.25C15.3848 0.25 19.75 4.61522 19.75 10C19.75 15.3848 15.3848 19.75 10 19.75C4.61522 19.75 0.25 15.3848 0.25 10ZM10 6.25C10.4142 6.25 10.75 6.58579 10.75 7V10.75C10.75 11.1642 10.4142 11.5 10 11.5C9.58579 11.5 9.25 11.1642 9.25 10.75V7C9.25 6.58579 9.58579 6.25 10 6.25ZM10 14.5C10.4142 14.5 10.75 14.1642 10.75 13.75C10.75 13.3358 10.4142 13 10 13C9.58579 13 9.25 13.3358 9.25 13.75C9.25 14.1642 9.58579 14.5 10 14.5Z",
231
+ fill: "currentColor"
232
+ }, null, -1), rn = [
233
+ sn
234
+ ], on = {
235
+ key: 2,
236
+ class: "text-yellow-400",
237
+ xmlns: "http://www.w3.org/2000/svg",
238
+ width: "22",
239
+ height: "20",
240
+ viewBox: "0 0 22 20",
241
+ fill: "none"
242
+ }, an = /* @__PURE__ */ p("path", {
243
+ "fill-rule": "evenodd",
244
+ "clip-rule": "evenodd",
245
+ d: "M8.40123 2.0034C9.55572 0.0022862 12.4439 0.0022856 13.5983 2.0034L20.9527 14.7509C22.1065 16.7509 20.6631 19.2501 18.3541 19.2501H3.64546C1.33649 19.2501 -0.106939 16.7509 1.04691 14.7509L8.40123 2.0034ZM11 7.25C11.4142 7.25 11.75 7.58579 11.75 8V11.75C11.75 12.1642 11.4142 12.5 11 12.5C10.5858 12.5 10.25 12.1642 10.25 11.75V8C10.25 7.58579 10.5858 7.25 11 7.25ZM11 15.5C11.4142 15.5 11.75 15.1642 11.75 14.75C11.75 14.3358 11.4142 14 11 14C10.5858 14 10.25 14.3358 10.25 14.75C10.25 15.1642 10.5858 15.5 11 15.5Z",
246
+ fill: "currentColor"
247
+ }, null, -1), ln = [
248
+ an
249
+ ], cn = {
250
+ key: 3,
251
+ class: "w-6 h-6 text-red-500",
252
+ "aria-hidden": "true",
253
+ xmlns: "http://www.w3.org/2000/svg",
254
+ width: "24",
255
+ height: "24",
256
+ fill: "currentColor",
257
+ viewBox: "0 0 24 24"
258
+ }, un = /* @__PURE__ */ p("path", {
259
+ "fill-rule": "evenodd",
260
+ d: "M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm7.707-3.707a1 1 0 0 0-1.414 1.414L10.586 12l-2.293 2.293a1 1 0 1 0 1.414 1.414L12 13.414l2.293 2.293a1 1 0 0 0 1.414-1.414L13.414 12l2.293-2.293a1 1 0 0 0-1.414-1.414L12 10.586 9.707 8.293Z",
261
+ "clip-rule": "evenodd"
262
+ }, null, -1), dn = [
263
+ un
264
+ ], fn = { class: "font-bold" }, hn = { class: "text-white flex text-left" }, Je = {
265
+ __name: "simple_card",
266
+ props: {
267
+ content: {
268
+ type: Object,
269
+ default: {
270
+ title: "Title",
271
+ description: "Garanta que essas informações acima esteja configuradas no Webhook do seu aplicativo META."
272
+ }
273
+ },
274
+ success: {
275
+ type: Boolean,
276
+ default: !1
277
+ },
278
+ info: {
279
+ type: Boolean,
280
+ default: !1
281
+ },
282
+ alert: {
283
+ type: Boolean,
284
+ default: !1
285
+ },
286
+ error: {
287
+ type: Boolean,
288
+ default: !1
289
+ }
290
+ },
291
+ setup(e) {
292
+ const t = e, s = je(() => t.success ? "border-green-500 text-green-500 shadow-md shadow-green-700" : t.info ? "border-blue-400 text-blue-400 shadow-md shadow-blue-700" : t.alert ? "border-yellow-400 text-yellow-400 shadow-md shadow-yellow-700" : t.error ? "border-red-500 text-red-500 shadow-md shadow-red-700" : "border-white text-white");
293
+ return (n, r) => (b(), _("div", {
294
+ class: M([s.value, "bg-base-300 border-2 p-2 rounded-lg flex-col items-center"])
295
+ }, [
296
+ p("div", Yt, [
297
+ e.success ? (b(), _("svg", Qt, tn)) : O("", !0),
298
+ e.info ? (b(), _("svg", nn, rn)) : O("", !0),
299
+ e.alert ? (b(), _("svg", on, ln)) : O("", !0),
300
+ e.error ? (b(), _("svg", cn, dn)) : O("", !0),
301
+ p("span", null, [
302
+ p("p", fn, P(e.content.title), 1)
303
+ ])
304
+ ]),
305
+ p("section", hn, P(e.content.description), 1)
306
+ ], 2));
307
+ }
308
+ };
309
+ function We(e, t) {
310
+ return function() {
311
+ return e.apply(t, arguments);
312
+ };
313
+ }
314
+ const { toString: pn } = Object.prototype, { getPrototypeOf: ge } = Object, Q = /* @__PURE__ */ ((e) => (t) => {
315
+ const s = pn.call(t);
316
+ return e[s] || (e[s] = s.slice(8, -1).toLowerCase());
317
+ })(/* @__PURE__ */ Object.create(null)), T = (e) => (e = e.toLowerCase(), (t) => Q(t) === e), ee = (e) => (t) => typeof t === e, { isArray: U } = Array, H = ee("undefined");
318
+ function mn(e) {
319
+ return e !== null && !H(e) && e.constructor !== null && !H(e.constructor) && R(e.constructor.isBuffer) && e.constructor.isBuffer(e);
320
+ }
321
+ const Ke = T("ArrayBuffer");
322
+ function wn(e) {
323
+ let t;
324
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ke(e.buffer), t;
325
+ }
326
+ const gn = ee("string"), R = ee("function"), Ge = ee("number"), te = (e) => e !== null && typeof e == "object", yn = (e) => e === !0 || e === !1, K = (e) => {
327
+ if (Q(e) !== "object")
328
+ return !1;
329
+ const t = ge(e);
330
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
331
+ }, bn = T("Date"), _n = T("File"), Cn = T("Blob"), En = T("FileList"), xn = (e) => te(e) && R(e.pipe), Sn = (e) => {
332
+ let t;
333
+ return e && (typeof FormData == "function" && e instanceof FormData || R(e.append) && ((t = Q(e)) === "formdata" || // detect form-data instance
334
+ t === "object" && R(e.toString) && e.toString() === "[object FormData]"));
335
+ }, vn = T("URLSearchParams"), [Rn, On, An, Tn] = ["ReadableStream", "Request", "Response", "Headers"].map(T), kn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
336
+ function V(e, t, { allOwnKeys: s = !1 } = {}) {
337
+ if (e === null || typeof e > "u")
338
+ return;
339
+ let n, r;
340
+ if (typeof e != "object" && (e = [e]), U(e))
341
+ for (n = 0, r = e.length; n < r; n++)
342
+ t.call(null, e[n], n, e);
343
+ else {
344
+ const o = s ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
345
+ let l;
346
+ for (n = 0; n < i; n++)
347
+ l = o[n], t.call(null, e[l], l, e);
348
+ }
349
+ }
350
+ function Xe(e, t) {
351
+ t = t.toLowerCase();
352
+ const s = Object.keys(e);
353
+ let n = s.length, r;
354
+ for (; n-- > 0; )
355
+ if (r = s[n], t === r.toLowerCase())
356
+ return r;
357
+ return null;
358
+ }
359
+ const Ye = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Qe = (e) => !H(e) && e !== Ye;
360
+ function ue() {
361
+ const { caseless: e } = Qe(this) && this || {}, t = {}, s = (n, r) => {
362
+ const o = e && Xe(t, r) || r;
363
+ K(t[o]) && K(n) ? t[o] = ue(t[o], n) : K(n) ? t[o] = ue({}, n) : U(n) ? t[o] = n.slice() : t[o] = n;
364
+ };
365
+ for (let n = 0, r = arguments.length; n < r; n++)
366
+ arguments[n] && V(arguments[n], s);
367
+ return t;
368
+ }
369
+ const Ln = (e, t, s, { allOwnKeys: n } = {}) => (V(t, (r, o) => {
370
+ s && R(r) ? e[o] = We(r, s) : e[o] = r;
371
+ }, { allOwnKeys: n }), e), Nn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Pn = (e, t, s, n) => {
372
+ e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
373
+ value: t.prototype
374
+ }), s && Object.assign(e.prototype, s);
375
+ }, Bn = (e, t, s, n) => {
376
+ let r, o, i;
377
+ const l = {};
378
+ if (t = t || {}, e == null) return t;
379
+ do {
380
+ for (r = Object.getOwnPropertyNames(e), o = r.length; o-- > 0; )
381
+ i = r[o], (!n || n(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0);
382
+ e = s !== !1 && ge(e);
383
+ } while (e && (!s || s(e, t)) && e !== Object.prototype);
384
+ return t;
385
+ }, Dn = (e, t, s) => {
386
+ e = String(e), (s === void 0 || s > e.length) && (s = e.length), s -= t.length;
387
+ const n = e.indexOf(t, s);
388
+ return n !== -1 && n === s;
389
+ }, Fn = (e) => {
390
+ if (!e) return null;
391
+ if (U(e)) return e;
392
+ let t = e.length;
393
+ if (!Ge(t)) return null;
394
+ const s = new Array(t);
395
+ for (; t-- > 0; )
396
+ s[t] = e[t];
397
+ return s;
398
+ }, jn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ge(Uint8Array)), Mn = (e, t) => {
399
+ const n = (e && e[Symbol.iterator]).call(e);
400
+ let r;
401
+ for (; (r = n.next()) && !r.done; ) {
402
+ const o = r.value;
403
+ t.call(e, o[0], o[1]);
404
+ }
405
+ }, Un = (e, t) => {
406
+ let s;
407
+ const n = [];
408
+ for (; (s = e.exec(t)) !== null; )
409
+ n.push(s);
410
+ return n;
411
+ }, In = T("HTMLFormElement"), $n = (e) => e.toLowerCase().replace(
412
+ /[-_\s]([a-z\d])(\w*)/g,
413
+ function(s, n, r) {
414
+ return n.toUpperCase() + r;
415
+ }
416
+ ), Se = (({ hasOwnProperty: e }) => (t, s) => e.call(t, s))(Object.prototype), qn = T("RegExp"), et = (e, t) => {
417
+ const s = Object.getOwnPropertyDescriptors(e), n = {};
418
+ V(s, (r, o) => {
419
+ let i;
420
+ (i = t(r, o, e)) !== !1 && (n[o] = i || r);
421
+ }), Object.defineProperties(e, n);
422
+ }, zn = (e) => {
423
+ et(e, (t, s) => {
424
+ if (R(e) && ["arguments", "caller", "callee"].indexOf(s) !== -1)
425
+ return !1;
426
+ const n = e[s];
427
+ if (R(n)) {
428
+ if (t.enumerable = !1, "writable" in t) {
429
+ t.writable = !1;
430
+ return;
431
+ }
432
+ t.set || (t.set = () => {
433
+ throw Error("Can not rewrite read-only method '" + s + "'");
434
+ });
435
+ }
436
+ });
437
+ }, Hn = (e, t) => {
438
+ const s = {}, n = (r) => {
439
+ r.forEach((o) => {
440
+ s[o] = !0;
441
+ });
442
+ };
443
+ return U(e) ? n(e) : n(String(e).split(t)), s;
444
+ }, Vn = () => {
445
+ }, Zn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, oe = "abcdefghijklmnopqrstuvwxyz", ve = "0123456789", tt = {
446
+ DIGIT: ve,
447
+ ALPHA: oe,
448
+ ALPHA_DIGIT: oe + oe.toUpperCase() + ve
449
+ }, Jn = (e = 16, t = tt.ALPHA_DIGIT) => {
450
+ let s = "";
451
+ const { length: n } = t;
452
+ for (; e--; )
453
+ s += t[Math.random() * n | 0];
454
+ return s;
455
+ };
456
+ function Wn(e) {
457
+ return !!(e && R(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
458
+ }
459
+ const Kn = (e) => {
460
+ const t = new Array(10), s = (n, r) => {
461
+ if (te(n)) {
462
+ if (t.indexOf(n) >= 0)
463
+ return;
464
+ if (!("toJSON" in n)) {
465
+ t[r] = n;
466
+ const o = U(n) ? [] : {};
467
+ return V(n, (i, l) => {
468
+ const f = s(i, r + 1);
469
+ !H(f) && (o[l] = f);
470
+ }), t[r] = void 0, o;
471
+ }
472
+ }
473
+ return n;
474
+ };
475
+ return s(e, 0);
476
+ }, Gn = T("AsyncFunction"), Xn = (e) => e && (te(e) || R(e)) && R(e.then) && R(e.catch), a = {
477
+ isArray: U,
478
+ isArrayBuffer: Ke,
479
+ isBuffer: mn,
480
+ isFormData: Sn,
481
+ isArrayBufferView: wn,
482
+ isString: gn,
483
+ isNumber: Ge,
484
+ isBoolean: yn,
485
+ isObject: te,
486
+ isPlainObject: K,
487
+ isReadableStream: Rn,
488
+ isRequest: On,
489
+ isResponse: An,
490
+ isHeaders: Tn,
491
+ isUndefined: H,
492
+ isDate: bn,
493
+ isFile: _n,
494
+ isBlob: Cn,
495
+ isRegExp: qn,
496
+ isFunction: R,
497
+ isStream: xn,
498
+ isURLSearchParams: vn,
499
+ isTypedArray: jn,
500
+ isFileList: En,
501
+ forEach: V,
502
+ merge: ue,
503
+ extend: Ln,
504
+ trim: kn,
505
+ stripBOM: Nn,
506
+ inherits: Pn,
507
+ toFlatObject: Bn,
508
+ kindOf: Q,
509
+ kindOfTest: T,
510
+ endsWith: Dn,
511
+ toArray: Fn,
512
+ forEachEntry: Mn,
513
+ matchAll: Un,
514
+ isHTMLForm: In,
515
+ hasOwnProperty: Se,
516
+ hasOwnProp: Se,
517
+ // an alias to avoid ESLint no-prototype-builtins detection
518
+ reduceDescriptors: et,
519
+ freezeMethods: zn,
520
+ toObjectSet: Hn,
521
+ toCamelCase: $n,
522
+ noop: Vn,
523
+ toFiniteNumber: Zn,
524
+ findKey: Xe,
525
+ global: Ye,
526
+ isContextDefined: Qe,
527
+ ALPHABET: tt,
528
+ generateString: Jn,
529
+ isSpecCompliantForm: Wn,
530
+ toJSONObject: Kn,
531
+ isAsyncFn: Gn,
532
+ isThenable: Xn
533
+ };
534
+ function g(e, t, s, n, r) {
535
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), s && (this.config = s), n && (this.request = n), r && (this.response = r);
536
+ }
537
+ a.inherits(g, Error, {
538
+ toJSON: function() {
539
+ return {
540
+ // Standard
541
+ message: this.message,
542
+ name: this.name,
543
+ // Microsoft
544
+ description: this.description,
545
+ number: this.number,
546
+ // Mozilla
547
+ fileName: this.fileName,
548
+ lineNumber: this.lineNumber,
549
+ columnNumber: this.columnNumber,
550
+ stack: this.stack,
551
+ // Axios
552
+ config: a.toJSONObject(this.config),
553
+ code: this.code,
554
+ status: this.response && this.response.status ? this.response.status : null
555
+ };
556
+ }
557
+ });
558
+ const nt = g.prototype, st = {};
559
+ [
560
+ "ERR_BAD_OPTION_VALUE",
561
+ "ERR_BAD_OPTION",
562
+ "ECONNABORTED",
563
+ "ETIMEDOUT",
564
+ "ERR_NETWORK",
565
+ "ERR_FR_TOO_MANY_REDIRECTS",
566
+ "ERR_DEPRECATED",
567
+ "ERR_BAD_RESPONSE",
568
+ "ERR_BAD_REQUEST",
569
+ "ERR_CANCELED",
570
+ "ERR_NOT_SUPPORT",
571
+ "ERR_INVALID_URL"
572
+ // eslint-disable-next-line func-names
573
+ ].forEach((e) => {
574
+ st[e] = { value: e };
575
+ });
576
+ Object.defineProperties(g, st);
577
+ Object.defineProperty(nt, "isAxiosError", { value: !0 });
578
+ g.from = (e, t, s, n, r, o) => {
579
+ const i = Object.create(nt);
580
+ return a.toFlatObject(e, i, function(f) {
581
+ return f !== Error.prototype;
582
+ }, (l) => l !== "isAxiosError"), g.call(i, e.message, t, s, n, r), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
583
+ };
584
+ const Yn = null;
585
+ function de(e) {
586
+ return a.isPlainObject(e) || a.isArray(e);
587
+ }
588
+ function rt(e) {
589
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
590
+ }
591
+ function Re(e, t, s) {
592
+ return e ? e.concat(t).map(function(r, o) {
593
+ return r = rt(r), !s && o ? "[" + r + "]" : r;
594
+ }).join(s ? "." : "") : t;
595
+ }
596
+ function Qn(e) {
597
+ return a.isArray(e) && !e.some(de);
598
+ }
599
+ const es = a.toFlatObject(a, {}, null, function(t) {
600
+ return /^is[A-Z]/.test(t);
601
+ });
602
+ function ne(e, t, s) {
603
+ if (!a.isObject(e))
604
+ throw new TypeError("target must be an object");
605
+ t = t || new FormData(), s = a.toFlatObject(s, {
606
+ metaTokens: !0,
607
+ dots: !1,
608
+ indexes: !1
609
+ }, !1, function(y, x) {
610
+ return !a.isUndefined(x[y]);
611
+ });
612
+ const n = s.metaTokens, r = s.visitor || c, o = s.dots, i = s.indexes, f = (s.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
613
+ if (!a.isFunction(r))
614
+ throw new TypeError("visitor must be a function");
615
+ function u(h) {
616
+ if (h === null) return "";
617
+ if (a.isDate(h))
618
+ return h.toISOString();
619
+ if (!f && a.isBlob(h))
620
+ throw new g("Blob is not supported. Use a Buffer instead.");
621
+ return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
622
+ }
623
+ function c(h, y, x) {
624
+ let S = h;
625
+ if (h && !x && typeof h == "object") {
626
+ if (a.endsWith(y, "{}"))
627
+ y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
628
+ else if (a.isArray(h) && Qn(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (S = a.toArray(h)))
629
+ return y = rt(y), S.forEach(function(C, $) {
630
+ !(a.isUndefined(C) || C === null) && t.append(
631
+ // eslint-disable-next-line no-nested-ternary
632
+ i === !0 ? Re([y], $, o) : i === null ? y : y + "[]",
633
+ u(C)
634
+ );
635
+ }), !1;
636
+ }
637
+ return de(h) ? !0 : (t.append(Re(x, y, o), u(h)), !1);
638
+ }
639
+ const d = [], w = Object.assign(es, {
640
+ defaultVisitor: c,
641
+ convertValue: u,
642
+ isVisitable: de
643
+ });
644
+ function m(h, y) {
645
+ if (!a.isUndefined(h)) {
646
+ if (d.indexOf(h) !== -1)
647
+ throw Error("Circular reference detected in " + y.join("."));
648
+ d.push(h), a.forEach(h, function(S, k) {
649
+ (!(a.isUndefined(S) || S === null) && r.call(
650
+ t,
651
+ S,
652
+ a.isString(k) ? k.trim() : k,
653
+ y,
654
+ w
655
+ )) === !0 && m(S, y ? y.concat(k) : [k]);
656
+ }), d.pop();
657
+ }
658
+ }
659
+ if (!a.isObject(e))
660
+ throw new TypeError("data must be an object");
661
+ return m(e), t;
662
+ }
663
+ function Oe(e) {
664
+ const t = {
665
+ "!": "%21",
666
+ "'": "%27",
667
+ "(": "%28",
668
+ ")": "%29",
669
+ "~": "%7E",
670
+ "%20": "+",
671
+ "%00": "\0"
672
+ };
673
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
674
+ return t[n];
675
+ });
676
+ }
677
+ function ye(e, t) {
678
+ this._pairs = [], e && ne(e, this, t);
679
+ }
680
+ const ot = ye.prototype;
681
+ ot.append = function(t, s) {
682
+ this._pairs.push([t, s]);
683
+ };
684
+ ot.toString = function(t) {
685
+ const s = t ? function(n) {
686
+ return t.call(this, n, Oe);
687
+ } : Oe;
688
+ return this._pairs.map(function(r) {
689
+ return s(r[0]) + "=" + s(r[1]);
690
+ }, "").join("&");
691
+ };
692
+ function ts(e) {
693
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
694
+ }
695
+ function it(e, t, s) {
696
+ if (!t)
697
+ return e;
698
+ const n = s && s.encode || ts, r = s && s.serialize;
699
+ let o;
700
+ if (r ? o = r(t, s) : o = a.isURLSearchParams(t) ? t.toString() : new ye(t, s).toString(n), o) {
701
+ const i = e.indexOf("#");
702
+ i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
703
+ }
704
+ return e;
705
+ }
706
+ class Ae {
707
+ constructor() {
708
+ this.handlers = [];
709
+ }
710
+ /**
711
+ * Add a new interceptor to the stack
712
+ *
713
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
714
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
715
+ *
716
+ * @return {Number} An ID used to remove interceptor later
717
+ */
718
+ use(t, s, n) {
719
+ return this.handlers.push({
720
+ fulfilled: t,
721
+ rejected: s,
722
+ synchronous: n ? n.synchronous : !1,
723
+ runWhen: n ? n.runWhen : null
724
+ }), this.handlers.length - 1;
725
+ }
726
+ /**
727
+ * Remove an interceptor from the stack
728
+ *
729
+ * @param {Number} id The ID that was returned by `use`
730
+ *
731
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
732
+ */
733
+ eject(t) {
734
+ this.handlers[t] && (this.handlers[t] = null);
735
+ }
736
+ /**
737
+ * Clear all interceptors from the stack
738
+ *
739
+ * @returns {void}
740
+ */
741
+ clear() {
742
+ this.handlers && (this.handlers = []);
743
+ }
744
+ /**
745
+ * Iterate over all the registered interceptors
746
+ *
747
+ * This method is particularly useful for skipping over any
748
+ * interceptors that may have become `null` calling `eject`.
749
+ *
750
+ * @param {Function} fn The function to call for each interceptor
751
+ *
752
+ * @returns {void}
753
+ */
754
+ forEach(t) {
755
+ a.forEach(this.handlers, function(n) {
756
+ n !== null && t(n);
757
+ });
758
+ }
759
+ }
760
+ const at = {
761
+ silentJSONParsing: !0,
762
+ forcedJSONParsing: !0,
763
+ clarifyTimeoutError: !1
764
+ }, ns = typeof URLSearchParams < "u" ? URLSearchParams : ye, ss = typeof FormData < "u" ? FormData : null, rs = typeof Blob < "u" ? Blob : null, os = {
765
+ isBrowser: !0,
766
+ classes: {
767
+ URLSearchParams: ns,
768
+ FormData: ss,
769
+ Blob: rs
770
+ },
771
+ protocols: ["http", "https", "file", "blob", "url", "data"]
772
+ }, be = typeof window < "u" && typeof document < "u", is = ((e) => be && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), as = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
773
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ls = be && window.location.href || "http://localhost", cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
774
+ __proto__: null,
775
+ hasBrowserEnv: be,
776
+ hasStandardBrowserEnv: is,
777
+ hasStandardBrowserWebWorkerEnv: as,
778
+ origin: ls
779
+ }, Symbol.toStringTag, { value: "Module" })), A = {
780
+ ...cs,
781
+ ...os
782
+ };
783
+ function us(e, t) {
784
+ return ne(e, new A.classes.URLSearchParams(), Object.assign({
785
+ visitor: function(s, n, r, o) {
786
+ return A.isNode && a.isBuffer(s) ? (this.append(n, s.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
787
+ }
788
+ }, t));
789
+ }
790
+ function ds(e) {
791
+ return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
792
+ }
793
+ function fs(e) {
794
+ const t = {}, s = Object.keys(e);
795
+ let n;
796
+ const r = s.length;
797
+ let o;
798
+ for (n = 0; n < r; n++)
799
+ o = s[n], t[o] = e[o];
800
+ return t;
801
+ }
802
+ function lt(e) {
803
+ function t(s, n, r, o) {
804
+ let i = s[o++];
805
+ if (i === "__proto__") return !0;
806
+ const l = Number.isFinite(+i), f = o >= s.length;
807
+ return i = !i && a.isArray(r) ? r.length : i, f ? (a.hasOwnProp(r, i) ? r[i] = [r[i], n] : r[i] = n, !l) : ((!r[i] || !a.isObject(r[i])) && (r[i] = []), t(s, n, r[i], o) && a.isArray(r[i]) && (r[i] = fs(r[i])), !l);
808
+ }
809
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
810
+ const s = {};
811
+ return a.forEachEntry(e, (n, r) => {
812
+ t(ds(n), r, s, 0);
813
+ }), s;
814
+ }
815
+ return null;
816
+ }
817
+ function hs(e, t, s) {
818
+ if (a.isString(e))
819
+ try {
820
+ return (t || JSON.parse)(e), a.trim(e);
821
+ } catch (n) {
822
+ if (n.name !== "SyntaxError")
823
+ throw n;
824
+ }
825
+ return (s || JSON.stringify)(e);
826
+ }
827
+ const Z = {
828
+ transitional: at,
829
+ adapter: ["xhr", "http", "fetch"],
830
+ transformRequest: [function(t, s) {
831
+ const n = s.getContentType() || "", r = n.indexOf("application/json") > -1, o = a.isObject(t);
832
+ if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
833
+ return r ? JSON.stringify(lt(t)) : t;
834
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
835
+ return t;
836
+ if (a.isArrayBufferView(t))
837
+ return t.buffer;
838
+ if (a.isURLSearchParams(t))
839
+ return s.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
840
+ let l;
841
+ if (o) {
842
+ if (n.indexOf("application/x-www-form-urlencoded") > -1)
843
+ return us(t, this.formSerializer).toString();
844
+ if ((l = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
845
+ const f = this.env && this.env.FormData;
846
+ return ne(
847
+ l ? { "files[]": t } : t,
848
+ f && new f(),
849
+ this.formSerializer
850
+ );
851
+ }
852
+ }
853
+ return o || r ? (s.setContentType("application/json", !1), hs(t)) : t;
854
+ }],
855
+ transformResponse: [function(t) {
856
+ const s = this.transitional || Z.transitional, n = s && s.forcedJSONParsing, r = this.responseType === "json";
857
+ if (a.isResponse(t) || a.isReadableStream(t))
858
+ return t;
859
+ if (t && a.isString(t) && (n && !this.responseType || r)) {
860
+ const i = !(s && s.silentJSONParsing) && r;
861
+ try {
862
+ return JSON.parse(t);
863
+ } catch (l) {
864
+ if (i)
865
+ throw l.name === "SyntaxError" ? g.from(l, g.ERR_BAD_RESPONSE, this, null, this.response) : l;
866
+ }
867
+ }
868
+ return t;
869
+ }],
870
+ /**
871
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
872
+ * timeout is not created.
873
+ */
874
+ timeout: 0,
875
+ xsrfCookieName: "XSRF-TOKEN",
876
+ xsrfHeaderName: "X-XSRF-TOKEN",
877
+ maxContentLength: -1,
878
+ maxBodyLength: -1,
879
+ env: {
880
+ FormData: A.classes.FormData,
881
+ Blob: A.classes.Blob
882
+ },
883
+ validateStatus: function(t) {
884
+ return t >= 200 && t < 300;
885
+ },
886
+ headers: {
887
+ common: {
888
+ Accept: "application/json, text/plain, */*",
889
+ "Content-Type": void 0
890
+ }
891
+ }
892
+ };
893
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
894
+ Z.headers[e] = {};
895
+ });
896
+ const ps = a.toObjectSet([
897
+ "age",
898
+ "authorization",
899
+ "content-length",
900
+ "content-type",
901
+ "etag",
902
+ "expires",
903
+ "from",
904
+ "host",
905
+ "if-modified-since",
906
+ "if-unmodified-since",
907
+ "last-modified",
908
+ "location",
909
+ "max-forwards",
910
+ "proxy-authorization",
911
+ "referer",
912
+ "retry-after",
913
+ "user-agent"
914
+ ]), ms = (e) => {
915
+ const t = {};
916
+ let s, n, r;
917
+ return e && e.split(`
918
+ `).forEach(function(i) {
919
+ r = i.indexOf(":"), s = i.substring(0, r).trim().toLowerCase(), n = i.substring(r + 1).trim(), !(!s || t[s] && ps[s]) && (s === "set-cookie" ? t[s] ? t[s].push(n) : t[s] = [n] : t[s] = t[s] ? t[s] + ", " + n : n);
920
+ }), t;
921
+ }, Te = Symbol("internals");
922
+ function q(e) {
923
+ return e && String(e).trim().toLowerCase();
924
+ }
925
+ function G(e) {
926
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(G) : String(e);
927
+ }
928
+ function ws(e) {
929
+ const t = /* @__PURE__ */ Object.create(null), s = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
930
+ let n;
931
+ for (; n = s.exec(e); )
932
+ t[n[1]] = n[2];
933
+ return t;
934
+ }
935
+ const gs = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
936
+ function ie(e, t, s, n, r) {
937
+ if (a.isFunction(n))
938
+ return n.call(this, t, s);
939
+ if (r && (t = s), !!a.isString(t)) {
940
+ if (a.isString(n))
941
+ return t.indexOf(n) !== -1;
942
+ if (a.isRegExp(n))
943
+ return n.test(t);
944
+ }
945
+ }
946
+ function ys(e) {
947
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, s, n) => s.toUpperCase() + n);
948
+ }
949
+ function bs(e, t) {
950
+ const s = a.toCamelCase(" " + t);
951
+ ["get", "set", "has"].forEach((n) => {
952
+ Object.defineProperty(e, n + s, {
953
+ value: function(r, o, i) {
954
+ return this[n].call(this, t, r, o, i);
955
+ },
956
+ configurable: !0
957
+ });
958
+ });
959
+ }
960
+ class v {
961
+ constructor(t) {
962
+ t && this.set(t);
963
+ }
964
+ set(t, s, n) {
965
+ const r = this;
966
+ function o(l, f, u) {
967
+ const c = q(f);
968
+ if (!c)
969
+ throw new Error("header name must be a non-empty string");
970
+ const d = a.findKey(r, c);
971
+ (!d || r[d] === void 0 || u === !0 || u === void 0 && r[d] !== !1) && (r[d || f] = G(l));
972
+ }
973
+ const i = (l, f) => a.forEach(l, (u, c) => o(u, c, f));
974
+ if (a.isPlainObject(t) || t instanceof this.constructor)
975
+ i(t, s);
976
+ else if (a.isString(t) && (t = t.trim()) && !gs(t))
977
+ i(ms(t), s);
978
+ else if (a.isHeaders(t))
979
+ for (const [l, f] of t.entries())
980
+ o(f, l, n);
981
+ else
982
+ t != null && o(s, t, n);
983
+ return this;
984
+ }
985
+ get(t, s) {
986
+ if (t = q(t), t) {
987
+ const n = a.findKey(this, t);
988
+ if (n) {
989
+ const r = this[n];
990
+ if (!s)
991
+ return r;
992
+ if (s === !0)
993
+ return ws(r);
994
+ if (a.isFunction(s))
995
+ return s.call(this, r, n);
996
+ if (a.isRegExp(s))
997
+ return s.exec(r);
998
+ throw new TypeError("parser must be boolean|regexp|function");
999
+ }
1000
+ }
1001
+ }
1002
+ has(t, s) {
1003
+ if (t = q(t), t) {
1004
+ const n = a.findKey(this, t);
1005
+ return !!(n && this[n] !== void 0 && (!s || ie(this, this[n], n, s)));
1006
+ }
1007
+ return !1;
1008
+ }
1009
+ delete(t, s) {
1010
+ const n = this;
1011
+ let r = !1;
1012
+ function o(i) {
1013
+ if (i = q(i), i) {
1014
+ const l = a.findKey(n, i);
1015
+ l && (!s || ie(n, n[l], l, s)) && (delete n[l], r = !0);
1016
+ }
1017
+ }
1018
+ return a.isArray(t) ? t.forEach(o) : o(t), r;
1019
+ }
1020
+ clear(t) {
1021
+ const s = Object.keys(this);
1022
+ let n = s.length, r = !1;
1023
+ for (; n--; ) {
1024
+ const o = s[n];
1025
+ (!t || ie(this, this[o], o, t, !0)) && (delete this[o], r = !0);
1026
+ }
1027
+ return r;
1028
+ }
1029
+ normalize(t) {
1030
+ const s = this, n = {};
1031
+ return a.forEach(this, (r, o) => {
1032
+ const i = a.findKey(n, o);
1033
+ if (i) {
1034
+ s[i] = G(r), delete s[o];
1035
+ return;
1036
+ }
1037
+ const l = t ? ys(o) : String(o).trim();
1038
+ l !== o && delete s[o], s[l] = G(r), n[l] = !0;
1039
+ }), this;
1040
+ }
1041
+ concat(...t) {
1042
+ return this.constructor.concat(this, ...t);
1043
+ }
1044
+ toJSON(t) {
1045
+ const s = /* @__PURE__ */ Object.create(null);
1046
+ return a.forEach(this, (n, r) => {
1047
+ n != null && n !== !1 && (s[r] = t && a.isArray(n) ? n.join(", ") : n);
1048
+ }), s;
1049
+ }
1050
+ [Symbol.iterator]() {
1051
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1052
+ }
1053
+ toString() {
1054
+ return Object.entries(this.toJSON()).map(([t, s]) => t + ": " + s).join(`
1055
+ `);
1056
+ }
1057
+ get [Symbol.toStringTag]() {
1058
+ return "AxiosHeaders";
1059
+ }
1060
+ static from(t) {
1061
+ return t instanceof this ? t : new this(t);
1062
+ }
1063
+ static concat(t, ...s) {
1064
+ const n = new this(t);
1065
+ return s.forEach((r) => n.set(r)), n;
1066
+ }
1067
+ static accessor(t) {
1068
+ const n = (this[Te] = this[Te] = {
1069
+ accessors: {}
1070
+ }).accessors, r = this.prototype;
1071
+ function o(i) {
1072
+ const l = q(i);
1073
+ n[l] || (bs(r, i), n[l] = !0);
1074
+ }
1075
+ return a.isArray(t) ? t.forEach(o) : o(t), this;
1076
+ }
1077
+ }
1078
+ v.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1079
+ a.reduceDescriptors(v.prototype, ({ value: e }, t) => {
1080
+ let s = t[0].toUpperCase() + t.slice(1);
1081
+ return {
1082
+ get: () => e,
1083
+ set(n) {
1084
+ this[s] = n;
1085
+ }
1086
+ };
1087
+ });
1088
+ a.freezeMethods(v);
1089
+ function ae(e, t) {
1090
+ const s = this || Z, n = t || s, r = v.from(n.headers);
1091
+ let o = n.data;
1092
+ return a.forEach(e, function(l) {
1093
+ o = l.call(s, o, r.normalize(), t ? t.status : void 0);
1094
+ }), r.normalize(), o;
1095
+ }
1096
+ function ct(e) {
1097
+ return !!(e && e.__CANCEL__);
1098
+ }
1099
+ function I(e, t, s) {
1100
+ g.call(this, e ?? "canceled", g.ERR_CANCELED, t, s), this.name = "CanceledError";
1101
+ }
1102
+ a.inherits(I, g, {
1103
+ __CANCEL__: !0
1104
+ });
1105
+ function ut(e, t, s) {
1106
+ const n = s.config.validateStatus;
1107
+ !s.status || !n || n(s.status) ? e(s) : t(new g(
1108
+ "Request failed with status code " + s.status,
1109
+ [g.ERR_BAD_REQUEST, g.ERR_BAD_RESPONSE][Math.floor(s.status / 100) - 4],
1110
+ s.config,
1111
+ s.request,
1112
+ s
1113
+ ));
1114
+ }
1115
+ function _s(e) {
1116
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1117
+ return t && t[1] || "";
1118
+ }
1119
+ function Cs(e, t) {
1120
+ e = e || 10;
1121
+ const s = new Array(e), n = new Array(e);
1122
+ let r = 0, o = 0, i;
1123
+ return t = t !== void 0 ? t : 1e3, function(f) {
1124
+ const u = Date.now(), c = n[o];
1125
+ i || (i = u), s[r] = f, n[r] = u;
1126
+ let d = o, w = 0;
1127
+ for (; d !== r; )
1128
+ w += s[d++], d = d % e;
1129
+ if (r = (r + 1) % e, r === o && (o = (o + 1) % e), u - i < t)
1130
+ return;
1131
+ const m = c && u - c;
1132
+ return m ? Math.round(w * 1e3 / m) : void 0;
1133
+ };
1134
+ }
1135
+ function Es(e, t) {
1136
+ let s = 0;
1137
+ const n = 1e3 / t;
1138
+ let r = null;
1139
+ return function() {
1140
+ const i = this === !0, l = Date.now();
1141
+ if (i || l - s > n)
1142
+ return r && (clearTimeout(r), r = null), s = l, e.apply(null, arguments);
1143
+ r || (r = setTimeout(() => (r = null, s = Date.now(), e.apply(null, arguments)), n - (l - s)));
1144
+ };
1145
+ }
1146
+ const X = (e, t, s = 3) => {
1147
+ let n = 0;
1148
+ const r = Cs(50, 250);
1149
+ return Es((o) => {
1150
+ const i = o.loaded, l = o.lengthComputable ? o.total : void 0, f = i - n, u = r(f), c = i <= l;
1151
+ n = i;
1152
+ const d = {
1153
+ loaded: i,
1154
+ total: l,
1155
+ progress: l ? i / l : void 0,
1156
+ bytes: f,
1157
+ rate: u || void 0,
1158
+ estimated: u && l && c ? (l - i) / u : void 0,
1159
+ event: o,
1160
+ lengthComputable: l != null
1161
+ };
1162
+ d[t ? "download" : "upload"] = !0, e(d);
1163
+ }, s);
1164
+ }, xs = A.hasStandardBrowserEnv ? (
1165
+ // Standard browser envs have full support of the APIs needed to test
1166
+ // whether the request URL is of the same origin as current location.
1167
+ function() {
1168
+ const t = /(msie|trident)/i.test(navigator.userAgent), s = document.createElement("a");
1169
+ let n;
1170
+ function r(o) {
1171
+ let i = o;
1172
+ return t && (s.setAttribute("href", i), i = s.href), s.setAttribute("href", i), {
1173
+ href: s.href,
1174
+ protocol: s.protocol ? s.protocol.replace(/:$/, "") : "",
1175
+ host: s.host,
1176
+ search: s.search ? s.search.replace(/^\?/, "") : "",
1177
+ hash: s.hash ? s.hash.replace(/^#/, "") : "",
1178
+ hostname: s.hostname,
1179
+ port: s.port,
1180
+ pathname: s.pathname.charAt(0) === "/" ? s.pathname : "/" + s.pathname
1181
+ };
1182
+ }
1183
+ return n = r(window.location.href), function(i) {
1184
+ const l = a.isString(i) ? r(i) : i;
1185
+ return l.protocol === n.protocol && l.host === n.host;
1186
+ };
1187
+ }()
1188
+ ) : (
1189
+ // Non standard browser envs (web workers, react-native) lack needed support.
1190
+ /* @__PURE__ */ function() {
1191
+ return function() {
1192
+ return !0;
1193
+ };
1194
+ }()
1195
+ ), Ss = A.hasStandardBrowserEnv ? (
1196
+ // Standard browser envs support document.cookie
1197
+ {
1198
+ write(e, t, s, n, r, o) {
1199
+ const i = [e + "=" + encodeURIComponent(t)];
1200
+ a.isNumber(s) && i.push("expires=" + new Date(s).toGMTString()), a.isString(n) && i.push("path=" + n), a.isString(r) && i.push("domain=" + r), o === !0 && i.push("secure"), document.cookie = i.join("; ");
1201
+ },
1202
+ read(e) {
1203
+ const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
1204
+ return t ? decodeURIComponent(t[3]) : null;
1205
+ },
1206
+ remove(e) {
1207
+ this.write(e, "", Date.now() - 864e5);
1208
+ }
1209
+ }
1210
+ ) : (
1211
+ // Non-standard browser env (web workers, react-native) lack needed support.
1212
+ {
1213
+ write() {
1214
+ },
1215
+ read() {
1216
+ return null;
1217
+ },
1218
+ remove() {
1219
+ }
1220
+ }
1221
+ );
1222
+ function vs(e) {
1223
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1224
+ }
1225
+ function Rs(e, t) {
1226
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1227
+ }
1228
+ function dt(e, t) {
1229
+ return e && !vs(t) ? Rs(e, t) : t;
1230
+ }
1231
+ const ke = (e) => e instanceof v ? { ...e } : e;
1232
+ function D(e, t) {
1233
+ t = t || {};
1234
+ const s = {};
1235
+ function n(u, c, d) {
1236
+ return a.isPlainObject(u) && a.isPlainObject(c) ? a.merge.call({ caseless: d }, u, c) : a.isPlainObject(c) ? a.merge({}, c) : a.isArray(c) ? c.slice() : c;
1237
+ }
1238
+ function r(u, c, d) {
1239
+ if (a.isUndefined(c)) {
1240
+ if (!a.isUndefined(u))
1241
+ return n(void 0, u, d);
1242
+ } else return n(u, c, d);
1243
+ }
1244
+ function o(u, c) {
1245
+ if (!a.isUndefined(c))
1246
+ return n(void 0, c);
1247
+ }
1248
+ function i(u, c) {
1249
+ if (a.isUndefined(c)) {
1250
+ if (!a.isUndefined(u))
1251
+ return n(void 0, u);
1252
+ } else return n(void 0, c);
1253
+ }
1254
+ function l(u, c, d) {
1255
+ if (d in t)
1256
+ return n(u, c);
1257
+ if (d in e)
1258
+ return n(void 0, u);
1259
+ }
1260
+ const f = {
1261
+ url: o,
1262
+ method: o,
1263
+ data: o,
1264
+ baseURL: i,
1265
+ transformRequest: i,
1266
+ transformResponse: i,
1267
+ paramsSerializer: i,
1268
+ timeout: i,
1269
+ timeoutMessage: i,
1270
+ withCredentials: i,
1271
+ withXSRFToken: i,
1272
+ adapter: i,
1273
+ responseType: i,
1274
+ xsrfCookieName: i,
1275
+ xsrfHeaderName: i,
1276
+ onUploadProgress: i,
1277
+ onDownloadProgress: i,
1278
+ decompress: i,
1279
+ maxContentLength: i,
1280
+ maxBodyLength: i,
1281
+ beforeRedirect: i,
1282
+ transport: i,
1283
+ httpAgent: i,
1284
+ httpsAgent: i,
1285
+ cancelToken: i,
1286
+ socketPath: i,
1287
+ responseEncoding: i,
1288
+ validateStatus: l,
1289
+ headers: (u, c) => r(ke(u), ke(c), !0)
1290
+ };
1291
+ return a.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
1292
+ const d = f[c] || r, w = d(e[c], t[c], c);
1293
+ a.isUndefined(w) && d !== l || (s[c] = w);
1294
+ }), s;
1295
+ }
1296
+ const ft = (e) => {
1297
+ const t = D({}, e);
1298
+ let { data: s, withXSRFToken: n, xsrfHeaderName: r, xsrfCookieName: o, headers: i, auth: l } = t;
1299
+ t.headers = i = v.from(i), t.url = it(dt(t.baseURL, t.url), e.params, e.paramsSerializer), l && i.set(
1300
+ "Authorization",
1301
+ "Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
1302
+ );
1303
+ let f;
1304
+ if (a.isFormData(s)) {
1305
+ if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
1306
+ i.setContentType(void 0);
1307
+ else if ((f = i.getContentType()) !== !1) {
1308
+ const [u, ...c] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
1309
+ i.setContentType([u || "multipart/form-data", ...c].join("; "));
1310
+ }
1311
+ }
1312
+ if (A.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && xs(t.url))) {
1313
+ const u = r && o && Ss.read(o);
1314
+ u && i.set(r, u);
1315
+ }
1316
+ return t;
1317
+ }, Os = typeof XMLHttpRequest < "u", As = Os && function(e) {
1318
+ return new Promise(function(s, n) {
1319
+ const r = ft(e);
1320
+ let o = r.data;
1321
+ const i = v.from(r.headers).normalize();
1322
+ let { responseType: l } = r, f;
1323
+ function u() {
1324
+ r.cancelToken && r.cancelToken.unsubscribe(f), r.signal && r.signal.removeEventListener("abort", f);
1325
+ }
1326
+ let c = new XMLHttpRequest();
1327
+ c.open(r.method.toUpperCase(), r.url, !0), c.timeout = r.timeout;
1328
+ function d() {
1329
+ if (!c)
1330
+ return;
1331
+ const m = v.from(
1332
+ "getAllResponseHeaders" in c && c.getAllResponseHeaders()
1333
+ ), y = {
1334
+ data: !l || l === "text" || l === "json" ? c.responseText : c.response,
1335
+ status: c.status,
1336
+ statusText: c.statusText,
1337
+ headers: m,
1338
+ config: e,
1339
+ request: c
1340
+ };
1341
+ ut(function(S) {
1342
+ s(S), u();
1343
+ }, function(S) {
1344
+ n(S), u();
1345
+ }, y), c = null;
1346
+ }
1347
+ "onloadend" in c ? c.onloadend = d : c.onreadystatechange = function() {
1348
+ !c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(d);
1349
+ }, c.onabort = function() {
1350
+ c && (n(new g("Request aborted", g.ECONNABORTED, r, c)), c = null);
1351
+ }, c.onerror = function() {
1352
+ n(new g("Network Error", g.ERR_NETWORK, r, c)), c = null;
1353
+ }, c.ontimeout = function() {
1354
+ let h = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
1355
+ const y = r.transitional || at;
1356
+ r.timeoutErrorMessage && (h = r.timeoutErrorMessage), n(new g(
1357
+ h,
1358
+ y.clarifyTimeoutError ? g.ETIMEDOUT : g.ECONNABORTED,
1359
+ r,
1360
+ c
1361
+ )), c = null;
1362
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in c && a.forEach(i.toJSON(), function(h, y) {
1363
+ c.setRequestHeader(y, h);
1364
+ }), a.isUndefined(r.withCredentials) || (c.withCredentials = !!r.withCredentials), l && l !== "json" && (c.responseType = r.responseType), typeof r.onDownloadProgress == "function" && c.addEventListener("progress", X(r.onDownloadProgress, !0)), typeof r.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", X(r.onUploadProgress)), (r.cancelToken || r.signal) && (f = (m) => {
1365
+ c && (n(!m || m.type ? new I(null, e, c) : m), c.abort(), c = null);
1366
+ }, r.cancelToken && r.cancelToken.subscribe(f), r.signal && (r.signal.aborted ? f() : r.signal.addEventListener("abort", f)));
1367
+ const w = _s(r.url);
1368
+ if (w && A.protocols.indexOf(w) === -1) {
1369
+ n(new g("Unsupported protocol " + w + ":", g.ERR_BAD_REQUEST, e));
1370
+ return;
1371
+ }
1372
+ c.send(o || null);
1373
+ });
1374
+ }, Ts = (e, t) => {
1375
+ let s = new AbortController(), n;
1376
+ const r = function(f) {
1377
+ if (!n) {
1378
+ n = !0, i();
1379
+ const u = f instanceof Error ? f : this.reason;
1380
+ s.abort(u instanceof g ? u : new I(u instanceof Error ? u.message : u));
1381
+ }
1382
+ };
1383
+ let o = t && setTimeout(() => {
1384
+ r(new g(`timeout ${t} of ms exceeded`, g.ETIMEDOUT));
1385
+ }, t);
1386
+ const i = () => {
1387
+ e && (o && clearTimeout(o), o = null, e.forEach((f) => {
1388
+ f && (f.removeEventListener ? f.removeEventListener("abort", r) : f.unsubscribe(r));
1389
+ }), e = null);
1390
+ };
1391
+ e.forEach((f) => f && f.addEventListener && f.addEventListener("abort", r));
1392
+ const { signal: l } = s;
1393
+ return l.unsubscribe = i, [l, () => {
1394
+ o && clearTimeout(o), o = null;
1395
+ }];
1396
+ }, ks = function* (e, t) {
1397
+ let s = e.byteLength;
1398
+ if (!t || s < t) {
1399
+ yield e;
1400
+ return;
1401
+ }
1402
+ let n = 0, r;
1403
+ for (; n < s; )
1404
+ r = n + t, yield e.slice(n, r), n = r;
1405
+ }, Ls = async function* (e, t, s) {
1406
+ for await (const n of e)
1407
+ yield* ks(ArrayBuffer.isView(n) ? n : await s(String(n)), t);
1408
+ }, Le = (e, t, s, n, r) => {
1409
+ const o = Ls(e, t, r);
1410
+ let i = 0;
1411
+ return new ReadableStream({
1412
+ type: "bytes",
1413
+ async pull(l) {
1414
+ const { done: f, value: u } = await o.next();
1415
+ if (f) {
1416
+ l.close(), n();
1417
+ return;
1418
+ }
1419
+ let c = u.byteLength;
1420
+ s && s(i += c), l.enqueue(new Uint8Array(u));
1421
+ },
1422
+ cancel(l) {
1423
+ return n(l), o.return();
1424
+ }
1425
+ }, {
1426
+ highWaterMark: 2
1427
+ });
1428
+ }, Ne = (e, t) => {
1429
+ const s = e != null;
1430
+ return (n) => setTimeout(() => t({
1431
+ lengthComputable: s,
1432
+ total: e,
1433
+ loaded: n
1434
+ }));
1435
+ }, se = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", ht = se && typeof ReadableStream == "function", fe = se && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ns = ht && (() => {
1436
+ let e = !1;
1437
+ const t = new Request(A.origin, {
1438
+ body: new ReadableStream(),
1439
+ method: "POST",
1440
+ get duplex() {
1441
+ return e = !0, "half";
1442
+ }
1443
+ }).headers.has("Content-Type");
1444
+ return e && !t;
1445
+ })(), Pe = 64 * 1024, he = ht && !!(() => {
1446
+ try {
1447
+ return a.isReadableStream(new Response("").body);
1448
+ } catch {
1449
+ }
1450
+ })(), Y = {
1451
+ stream: he && ((e) => e.body)
1452
+ };
1453
+ se && ((e) => {
1454
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1455
+ !Y[t] && (Y[t] = a.isFunction(e[t]) ? (s) => s[t]() : (s, n) => {
1456
+ throw new g(`Response type '${t}' is not supported`, g.ERR_NOT_SUPPORT, n);
1457
+ });
1458
+ });
1459
+ })(new Response());
1460
+ const Ps = async (e) => {
1461
+ if (e == null)
1462
+ return 0;
1463
+ if (a.isBlob(e))
1464
+ return e.size;
1465
+ if (a.isSpecCompliantForm(e))
1466
+ return (await new Request(e).arrayBuffer()).byteLength;
1467
+ if (a.isArrayBufferView(e))
1468
+ return e.byteLength;
1469
+ if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
1470
+ return (await fe(e)).byteLength;
1471
+ }, Bs = async (e, t) => {
1472
+ const s = a.toFiniteNumber(e.getContentLength());
1473
+ return s ?? Ps(t);
1474
+ }, Ds = se && (async (e) => {
1475
+ let {
1476
+ url: t,
1477
+ method: s,
1478
+ data: n,
1479
+ signal: r,
1480
+ cancelToken: o,
1481
+ timeout: i,
1482
+ onDownloadProgress: l,
1483
+ onUploadProgress: f,
1484
+ responseType: u,
1485
+ headers: c,
1486
+ withCredentials: d = "same-origin",
1487
+ fetchOptions: w
1488
+ } = ft(e);
1489
+ u = u ? (u + "").toLowerCase() : "text";
1490
+ let [m, h] = r || o || i ? Ts([r, o], i) : [], y, x;
1491
+ const S = () => {
1492
+ !y && setTimeout(() => {
1493
+ m && m.unsubscribe();
1494
+ }), y = !0;
1495
+ };
1496
+ let k;
1497
+ try {
1498
+ if (f && Ns && s !== "get" && s !== "head" && (k = await Bs(c, n)) !== 0) {
1499
+ let L = new Request(t, {
1500
+ method: "POST",
1501
+ body: n,
1502
+ duplex: "half"
1503
+ }), F;
1504
+ a.isFormData(n) && (F = L.headers.get("content-type")) && c.setContentType(F), L.body && (n = Le(L.body, Pe, Ne(
1505
+ k,
1506
+ X(f)
1507
+ ), null, fe));
1508
+ }
1509
+ a.isString(d) || (d = d ? "cors" : "omit"), x = new Request(t, {
1510
+ ...w,
1511
+ signal: m,
1512
+ method: s.toUpperCase(),
1513
+ headers: c.normalize().toJSON(),
1514
+ body: n,
1515
+ duplex: "half",
1516
+ withCredentials: d
1517
+ });
1518
+ let C = await fetch(x);
1519
+ const $ = he && (u === "stream" || u === "response");
1520
+ if (he && (l || $)) {
1521
+ const L = {};
1522
+ ["status", "statusText", "headers"].forEach((Ee) => {
1523
+ L[Ee] = C[Ee];
1524
+ });
1525
+ const F = a.toFiniteNumber(C.headers.get("content-length"));
1526
+ C = new Response(
1527
+ Le(C.body, Pe, l && Ne(
1528
+ F,
1529
+ X(l, !0)
1530
+ ), $ && S, fe),
1531
+ L
1532
+ );
1533
+ }
1534
+ u = u || "text";
1535
+ let yt = await Y[a.findKey(Y, u) || "text"](C, e);
1536
+ return !$ && S(), h && h(), await new Promise((L, F) => {
1537
+ ut(L, F, {
1538
+ data: yt,
1539
+ headers: v.from(C.headers),
1540
+ status: C.status,
1541
+ statusText: C.statusText,
1542
+ config: e,
1543
+ request: x
1544
+ });
1545
+ });
1546
+ } catch (C) {
1547
+ throw S(), C && C.name === "TypeError" && /fetch/i.test(C.message) ? Object.assign(
1548
+ new g("Network Error", g.ERR_NETWORK, e, x),
1549
+ {
1550
+ cause: C.cause || C
1551
+ }
1552
+ ) : g.from(C, C && C.code, e, x);
1553
+ }
1554
+ }), pe = {
1555
+ http: Yn,
1556
+ xhr: As,
1557
+ fetch: Ds
1558
+ };
1559
+ a.forEach(pe, (e, t) => {
1560
+ if (e) {
1561
+ try {
1562
+ Object.defineProperty(e, "name", { value: t });
1563
+ } catch {
1564
+ }
1565
+ Object.defineProperty(e, "adapterName", { value: t });
1566
+ }
1567
+ });
1568
+ const Be = (e) => `- ${e}`, Fs = (e) => a.isFunction(e) || e === null || e === !1, pt = {
1569
+ getAdapter: (e) => {
1570
+ e = a.isArray(e) ? e : [e];
1571
+ const { length: t } = e;
1572
+ let s, n;
1573
+ const r = {};
1574
+ for (let o = 0; o < t; o++) {
1575
+ s = e[o];
1576
+ let i;
1577
+ if (n = s, !Fs(s) && (n = pe[(i = String(s)).toLowerCase()], n === void 0))
1578
+ throw new g(`Unknown adapter '${i}'`);
1579
+ if (n)
1580
+ break;
1581
+ r[i || "#" + o] = n;
1582
+ }
1583
+ if (!n) {
1584
+ const o = Object.entries(r).map(
1585
+ ([l, f]) => `adapter ${l} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1586
+ );
1587
+ let i = t ? o.length > 1 ? `since :
1588
+ ` + o.map(Be).join(`
1589
+ `) : " " + Be(o[0]) : "as no adapter specified";
1590
+ throw new g(
1591
+ "There is no suitable adapter to dispatch the request " + i,
1592
+ "ERR_NOT_SUPPORT"
1593
+ );
1594
+ }
1595
+ return n;
1596
+ },
1597
+ adapters: pe
1598
+ };
1599
+ function le(e) {
1600
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1601
+ throw new I(null, e);
1602
+ }
1603
+ function De(e) {
1604
+ return le(e), e.headers = v.from(e.headers), e.data = ae.call(
1605
+ e,
1606
+ e.transformRequest
1607
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), pt.getAdapter(e.adapter || Z.adapter)(e).then(function(n) {
1608
+ return le(e), n.data = ae.call(
1609
+ e,
1610
+ e.transformResponse,
1611
+ n
1612
+ ), n.headers = v.from(n.headers), n;
1613
+ }, function(n) {
1614
+ return ct(n) || (le(e), n && n.response && (n.response.data = ae.call(
1615
+ e,
1616
+ e.transformResponse,
1617
+ n.response
1618
+ ), n.response.headers = v.from(n.response.headers))), Promise.reject(n);
1619
+ });
1620
+ }
1621
+ const mt = "1.7.2", _e = {};
1622
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1623
+ _e[e] = function(n) {
1624
+ return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
1625
+ };
1626
+ });
1627
+ const Fe = {};
1628
+ _e.transitional = function(t, s, n) {
1629
+ function r(o, i) {
1630
+ return "[Axios v" + mt + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
1631
+ }
1632
+ return (o, i, l) => {
1633
+ if (t === !1)
1634
+ throw new g(
1635
+ r(i, " has been removed" + (s ? " in " + s : "")),
1636
+ g.ERR_DEPRECATED
1637
+ );
1638
+ return s && !Fe[i] && (Fe[i] = !0, console.warn(
1639
+ r(
1640
+ i,
1641
+ " has been deprecated since v" + s + " and will be removed in the near future"
1642
+ )
1643
+ )), t ? t(o, i, l) : !0;
1644
+ };
1645
+ };
1646
+ function js(e, t, s) {
1647
+ if (typeof e != "object")
1648
+ throw new g("options must be an object", g.ERR_BAD_OPTION_VALUE);
1649
+ const n = Object.keys(e);
1650
+ let r = n.length;
1651
+ for (; r-- > 0; ) {
1652
+ const o = n[r], i = t[o];
1653
+ if (i) {
1654
+ const l = e[o], f = l === void 0 || i(l, o, e);
1655
+ if (f !== !0)
1656
+ throw new g("option " + o + " must be " + f, g.ERR_BAD_OPTION_VALUE);
1657
+ continue;
1658
+ }
1659
+ if (s !== !0)
1660
+ throw new g("Unknown option " + o, g.ERR_BAD_OPTION);
234
1661
  }
235
- }, V = /* @__PURE__ */ j(we, [["__scopeId", "data-v-4c81a5bf"]]);
236
- function be(e) {
237
- e.component("primarySelect", P), e.component("simpleModal", V);
238
1662
  }
239
- const Se = {
240
- install: be,
241
- primarySelect: P,
242
- simpleModal: V
1663
+ const me = {
1664
+ assertOptions: js,
1665
+ validators: _e
1666
+ }, N = me.validators;
1667
+ class B {
1668
+ constructor(t) {
1669
+ this.defaults = t, this.interceptors = {
1670
+ request: new Ae(),
1671
+ response: new Ae()
1672
+ };
1673
+ }
1674
+ /**
1675
+ * Dispatch a request
1676
+ *
1677
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1678
+ * @param {?Object} config
1679
+ *
1680
+ * @returns {Promise} The Promise to be fulfilled
1681
+ */
1682
+ async request(t, s) {
1683
+ try {
1684
+ return await this._request(t, s);
1685
+ } catch (n) {
1686
+ if (n instanceof Error) {
1687
+ let r;
1688
+ Error.captureStackTrace ? Error.captureStackTrace(r = {}) : r = new Error();
1689
+ const o = r.stack ? r.stack.replace(/^.+\n/, "") : "";
1690
+ try {
1691
+ n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (n.stack += `
1692
+ ` + o) : n.stack = o;
1693
+ } catch {
1694
+ }
1695
+ }
1696
+ throw n;
1697
+ }
1698
+ }
1699
+ _request(t, s) {
1700
+ typeof t == "string" ? (s = s || {}, s.url = t) : s = t || {}, s = D(this.defaults, s);
1701
+ const { transitional: n, paramsSerializer: r, headers: o } = s;
1702
+ n !== void 0 && me.assertOptions(n, {
1703
+ silentJSONParsing: N.transitional(N.boolean),
1704
+ forcedJSONParsing: N.transitional(N.boolean),
1705
+ clarifyTimeoutError: N.transitional(N.boolean)
1706
+ }, !1), r != null && (a.isFunction(r) ? s.paramsSerializer = {
1707
+ serialize: r
1708
+ } : me.assertOptions(r, {
1709
+ encode: N.function,
1710
+ serialize: N.function
1711
+ }, !0)), s.method = (s.method || this.defaults.method || "get").toLowerCase();
1712
+ let i = o && a.merge(
1713
+ o.common,
1714
+ o[s.method]
1715
+ );
1716
+ o && a.forEach(
1717
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1718
+ (h) => {
1719
+ delete o[h];
1720
+ }
1721
+ ), s.headers = v.concat(i, o);
1722
+ const l = [];
1723
+ let f = !0;
1724
+ this.interceptors.request.forEach(function(y) {
1725
+ typeof y.runWhen == "function" && y.runWhen(s) === !1 || (f = f && y.synchronous, l.unshift(y.fulfilled, y.rejected));
1726
+ });
1727
+ const u = [];
1728
+ this.interceptors.response.forEach(function(y) {
1729
+ u.push(y.fulfilled, y.rejected);
1730
+ });
1731
+ let c, d = 0, w;
1732
+ if (!f) {
1733
+ const h = [De.bind(this), void 0];
1734
+ for (h.unshift.apply(h, l), h.push.apply(h, u), w = h.length, c = Promise.resolve(s); d < w; )
1735
+ c = c.then(h[d++], h[d++]);
1736
+ return c;
1737
+ }
1738
+ w = l.length;
1739
+ let m = s;
1740
+ for (d = 0; d < w; ) {
1741
+ const h = l[d++], y = l[d++];
1742
+ try {
1743
+ m = h(m);
1744
+ } catch (x) {
1745
+ y.call(this, x);
1746
+ break;
1747
+ }
1748
+ }
1749
+ try {
1750
+ c = De.call(this, m);
1751
+ } catch (h) {
1752
+ return Promise.reject(h);
1753
+ }
1754
+ for (d = 0, w = u.length; d < w; )
1755
+ c = c.then(u[d++], u[d++]);
1756
+ return c;
1757
+ }
1758
+ getUri(t) {
1759
+ t = D(this.defaults, t);
1760
+ const s = dt(t.baseURL, t.url);
1761
+ return it(s, t.params, t.paramsSerializer);
1762
+ }
1763
+ }
1764
+ a.forEach(["delete", "get", "head", "options"], function(t) {
1765
+ B.prototype[t] = function(s, n) {
1766
+ return this.request(D(n || {}, {
1767
+ method: t,
1768
+ url: s,
1769
+ data: (n || {}).data
1770
+ }));
1771
+ };
1772
+ });
1773
+ a.forEach(["post", "put", "patch"], function(t) {
1774
+ function s(n) {
1775
+ return function(o, i, l) {
1776
+ return this.request(D(l || {}, {
1777
+ method: t,
1778
+ headers: n ? {
1779
+ "Content-Type": "multipart/form-data"
1780
+ } : {},
1781
+ url: o,
1782
+ data: i
1783
+ }));
1784
+ };
1785
+ }
1786
+ B.prototype[t] = s(), B.prototype[t + "Form"] = s(!0);
1787
+ });
1788
+ class Ce {
1789
+ constructor(t) {
1790
+ if (typeof t != "function")
1791
+ throw new TypeError("executor must be a function.");
1792
+ let s;
1793
+ this.promise = new Promise(function(o) {
1794
+ s = o;
1795
+ });
1796
+ const n = this;
1797
+ this.promise.then((r) => {
1798
+ if (!n._listeners) return;
1799
+ let o = n._listeners.length;
1800
+ for (; o-- > 0; )
1801
+ n._listeners[o](r);
1802
+ n._listeners = null;
1803
+ }), this.promise.then = (r) => {
1804
+ let o;
1805
+ const i = new Promise((l) => {
1806
+ n.subscribe(l), o = l;
1807
+ }).then(r);
1808
+ return i.cancel = function() {
1809
+ n.unsubscribe(o);
1810
+ }, i;
1811
+ }, t(function(o, i, l) {
1812
+ n.reason || (n.reason = new I(o, i, l), s(n.reason));
1813
+ });
1814
+ }
1815
+ /**
1816
+ * Throws a `CanceledError` if cancellation has been requested.
1817
+ */
1818
+ throwIfRequested() {
1819
+ if (this.reason)
1820
+ throw this.reason;
1821
+ }
1822
+ /**
1823
+ * Subscribe to the cancel signal
1824
+ */
1825
+ subscribe(t) {
1826
+ if (this.reason) {
1827
+ t(this.reason);
1828
+ return;
1829
+ }
1830
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
1831
+ }
1832
+ /**
1833
+ * Unsubscribe from the cancel signal
1834
+ */
1835
+ unsubscribe(t) {
1836
+ if (!this._listeners)
1837
+ return;
1838
+ const s = this._listeners.indexOf(t);
1839
+ s !== -1 && this._listeners.splice(s, 1);
1840
+ }
1841
+ /**
1842
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1843
+ * cancels the `CancelToken`.
1844
+ */
1845
+ static source() {
1846
+ let t;
1847
+ return {
1848
+ token: new Ce(function(r) {
1849
+ t = r;
1850
+ }),
1851
+ cancel: t
1852
+ };
1853
+ }
1854
+ }
1855
+ function Ms(e) {
1856
+ return function(s) {
1857
+ return e.apply(null, s);
1858
+ };
1859
+ }
1860
+ function Us(e) {
1861
+ return a.isObject(e) && e.isAxiosError === !0;
1862
+ }
1863
+ const we = {
1864
+ Continue: 100,
1865
+ SwitchingProtocols: 101,
1866
+ Processing: 102,
1867
+ EarlyHints: 103,
1868
+ Ok: 200,
1869
+ Created: 201,
1870
+ Accepted: 202,
1871
+ NonAuthoritativeInformation: 203,
1872
+ NoContent: 204,
1873
+ ResetContent: 205,
1874
+ PartialContent: 206,
1875
+ MultiStatus: 207,
1876
+ AlreadyReported: 208,
1877
+ ImUsed: 226,
1878
+ MultipleChoices: 300,
1879
+ MovedPermanently: 301,
1880
+ Found: 302,
1881
+ SeeOther: 303,
1882
+ NotModified: 304,
1883
+ UseProxy: 305,
1884
+ Unused: 306,
1885
+ TemporaryRedirect: 307,
1886
+ PermanentRedirect: 308,
1887
+ BadRequest: 400,
1888
+ Unauthorized: 401,
1889
+ PaymentRequired: 402,
1890
+ Forbidden: 403,
1891
+ NotFound: 404,
1892
+ MethodNotAllowed: 405,
1893
+ NotAcceptable: 406,
1894
+ ProxyAuthenticationRequired: 407,
1895
+ RequestTimeout: 408,
1896
+ Conflict: 409,
1897
+ Gone: 410,
1898
+ LengthRequired: 411,
1899
+ PreconditionFailed: 412,
1900
+ PayloadTooLarge: 413,
1901
+ UriTooLong: 414,
1902
+ UnsupportedMediaType: 415,
1903
+ RangeNotSatisfiable: 416,
1904
+ ExpectationFailed: 417,
1905
+ ImATeapot: 418,
1906
+ MisdirectedRequest: 421,
1907
+ UnprocessableEntity: 422,
1908
+ Locked: 423,
1909
+ FailedDependency: 424,
1910
+ TooEarly: 425,
1911
+ UpgradeRequired: 426,
1912
+ PreconditionRequired: 428,
1913
+ TooManyRequests: 429,
1914
+ RequestHeaderFieldsTooLarge: 431,
1915
+ UnavailableForLegalReasons: 451,
1916
+ InternalServerError: 500,
1917
+ NotImplemented: 501,
1918
+ BadGateway: 502,
1919
+ ServiceUnavailable: 503,
1920
+ GatewayTimeout: 504,
1921
+ HttpVersionNotSupported: 505,
1922
+ VariantAlsoNegotiates: 506,
1923
+ InsufficientStorage: 507,
1924
+ LoopDetected: 508,
1925
+ NotExtended: 510,
1926
+ NetworkAuthenticationRequired: 511
1927
+ };
1928
+ Object.entries(we).forEach(([e, t]) => {
1929
+ we[t] = e;
1930
+ });
1931
+ function wt(e) {
1932
+ const t = new B(e), s = We(B.prototype.request, t);
1933
+ return a.extend(s, B.prototype, t, { allOwnKeys: !0 }), a.extend(s, t, null, { allOwnKeys: !0 }), s.create = function(r) {
1934
+ return wt(D(e, r));
1935
+ }, s;
1936
+ }
1937
+ const E = wt(Z);
1938
+ E.Axios = B;
1939
+ E.CanceledError = I;
1940
+ E.CancelToken = Ce;
1941
+ E.isCancel = ct;
1942
+ E.VERSION = mt;
1943
+ E.toFormData = ne;
1944
+ E.AxiosError = g;
1945
+ E.Cancel = E.CanceledError;
1946
+ E.all = function(t) {
1947
+ return Promise.all(t);
1948
+ };
1949
+ E.spread = Ms;
1950
+ E.isAxiosError = Us;
1951
+ E.mergeConfig = D;
1952
+ E.AxiosHeaders = v;
1953
+ E.formToJSON = (e) => lt(a.isHTMLForm(e) ? new FormData(e) : e);
1954
+ E.getAdapter = pt.getAdapter;
1955
+ E.HttpStatusCode = we;
1956
+ E.default = E;
1957
+ const Is = { class: "w-full relative text-white" }, $s = { class: "flex cursor-pointer justify-between items-center" }, qs = { class: "w-full select-none" }, zs = { key: 0 }, Hs = { key: 0 }, Vs = {
1958
+ key: 1,
1959
+ class: "flex items-center gap-2"
1960
+ }, Zs = { class: "flex gap-3 items-center flex-shrink-0" }, Js = {
1961
+ key: 0,
1962
+ xmlns: "http://www.w3.org/2000/svg",
1963
+ fill: "currentColor",
1964
+ class: "w-[18px] h-[18px] text-green-400",
1965
+ viewBox: "0 0 16 16"
1966
+ }, Ws = /* @__PURE__ */ p("path", { d: "M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z" }, null, -1), Ks = [
1967
+ Ws
1968
+ ], Gs = {
1969
+ key: 1,
1970
+ class: "w-5 h-5 text-red-200 bg-red-500/80 p-[3px] rounded-full",
1971
+ "aria-hidden": "true",
1972
+ xmlns: "http://www.w3.org/2000/svg",
1973
+ width: "24",
1974
+ height: "24",
1975
+ fill: "none",
1976
+ viewBox: "0 0 24 24"
1977
+ }, Xs = /* @__PURE__ */ p("path", {
1978
+ stroke: "currentColor",
1979
+ "stroke-linecap": "round",
1980
+ "stroke-linejoin": "round",
1981
+ "stroke-width": "2",
1982
+ d: "M6 18 17.94 6M18 18 6.06 6"
1983
+ }, null, -1), Ys = [
1984
+ Xs
1985
+ ], Qs = {
1986
+ key: 2,
1987
+ class: "w-5 h-5 text-green-500",
1988
+ "aria-hidden": "true",
1989
+ xmlns: "http://www.w3.org/2000/svg",
1990
+ width: "24",
1991
+ height: "24",
1992
+ fill: "currentColor",
1993
+ viewBox: "0 0 24 24"
1994
+ }, er = /* @__PURE__ */ p("path", {
1995
+ "fill-rule": "evenodd",
1996
+ d: "M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm13.707-1.293a1 1 0 0 0-1.414-1.414L11 12.586l-1.793-1.793a1 1 0 0 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l4-4Z",
1997
+ "clip-rule": "evenodd"
1998
+ }, null, -1), tr = [
1999
+ er
2000
+ ], nr = {
2001
+ key: 3,
2002
+ class: "w-[18px] h-[18px] bg-purple-500 rounded-full"
2003
+ }, sr = { class: "w-full" }, rr = {
2004
+ key: 1,
2005
+ class: "flex items-center gap-2 justify-center"
2006
+ }, or = /* @__PURE__ */ p("svg", {
2007
+ "aria-hidden": "true",
2008
+ class: "inline w-5 h-5 text-blue-300 animate-spin fill-gray-600",
2009
+ viewBox: "0 0 100 101",
2010
+ fill: "none",
2011
+ xmlns: "http://www.w3.org/2000/svg"
2012
+ }, [
2013
+ /* @__PURE__ */ p("path", {
2014
+ d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
2015
+ fill: "currentColor"
2016
+ }),
2017
+ /* @__PURE__ */ p("path", {
2018
+ d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
2019
+ fill: "currentFill"
2020
+ })
2021
+ ], -1), ir = { class: "flex items-center gap-2" }, ar = /* @__PURE__ */ p("svg", {
2022
+ class: "w-4 h-4",
2023
+ "aria-hidden": "true",
2024
+ xmlns: "http://www.w3.org/2000/svg",
2025
+ width: "24",
2026
+ height: "24",
2027
+ fill: "none",
2028
+ viewBox: "0 0 24 24"
2029
+ }, [
2030
+ /* @__PURE__ */ p("path", {
2031
+ stroke: "currentColor",
2032
+ "stroke-linecap": "round",
2033
+ "stroke-linejoin": "round",
2034
+ "stroke-width": "2",
2035
+ d: "M6 18 17.94 6M18 18 6.06 6"
2036
+ })
2037
+ ], -1), lr = [
2038
+ ar
2039
+ ], cr = /* @__PURE__ */ p("path", {
2040
+ stroke: "currentColor",
2041
+ "stroke-linecap": "round",
2042
+ "stroke-linejoin": "round",
2043
+ "stroke-width": "2",
2044
+ d: "m19 9-7 7-7-7"
2045
+ }, null, -1), ur = [
2046
+ cr
2047
+ ], dr = {
2048
+ key: 0,
2049
+ class: "rounded-b-lg absolute top-8 w-full z-20 text-sm mt-2 shadow shadow-gray-900 bg-base-300 p-2"
2050
+ }, fr = { class: "gap-2 flex flex-col" }, hr = ["onClick"], pr = { class: "flex w-full items-center px-2 gap-3 justify-between" }, mr = {
2051
+ key: 0,
2052
+ xmlns: "http://www.w3.org/2000/svg",
2053
+ fill: "currentColor",
2054
+ class: "w-5 h-5 text-green-400",
2055
+ viewBox: "0 0 16 16"
2056
+ }, wr = /* @__PURE__ */ p("path", { d: "M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z" }, null, -1), gr = [
2057
+ wr
2058
+ ], yr = { key: 1 }, br = {
2059
+ key: 0,
2060
+ class: "relative group"
2061
+ }, _r = /* @__PURE__ */ p("svg", {
2062
+ class: "w-5 h-5 text-red-200 bg-red-500/80 p-[3px] rounded-full",
2063
+ "aria-hidden": "true",
2064
+ xmlns: "http://www.w3.org/2000/svg",
2065
+ width: "24",
2066
+ height: "24",
2067
+ fill: "none",
2068
+ viewBox: "0 0 24 24"
2069
+ }, [
2070
+ /* @__PURE__ */ p("path", {
2071
+ stroke: "currentColor",
2072
+ "stroke-linecap": "round",
2073
+ "stroke-linejoin": "round",
2074
+ "stroke-width": "2",
2075
+ d: "M6 18 17.94 6M18 18 6.06 6"
2076
+ })
2077
+ ], -1), Cr = /* @__PURE__ */ p("span", { class: "shadow shadow-gray-700 absolute bg-red-500 px-3 font-semibold rounded-lg p-1 -top-8 -translate-x-11 group-hover:opacity-100 opacity-0" }, "Desconectada", -1), Er = [
2078
+ _r,
2079
+ Cr
2080
+ ], xr = {
2081
+ key: 1,
2082
+ class: "relative group"
2083
+ }, Sr = /* @__PURE__ */ p("svg", {
2084
+ class: "w-5 h-5 text-green-500",
2085
+ "aria-hidden": "true",
2086
+ xmlns: "http://www.w3.org/2000/svg",
2087
+ width: "24",
2088
+ height: "24",
2089
+ fill: "currentColor",
2090
+ viewBox: "0 0 24 24"
2091
+ }, [
2092
+ /* @__PURE__ */ p("path", {
2093
+ "fill-rule": "evenodd",
2094
+ d: "M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm13.707-1.293a1 1 0 0 0-1.414-1.414L11 12.586l-1.793-1.793a1 1 0 0 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l4-4Z",
2095
+ "clip-rule": "evenodd"
2096
+ })
2097
+ ], -1), vr = /* @__PURE__ */ p("span", { class: "shadow shadow-gray-700 absolute bg-green-500 px-3 font-semibold rounded-lg p-1 -top-8 -translate-x-9 group-hover:opacity-100 opacity-0" }, "Conectado", -1), Rr = [
2098
+ Sr,
2099
+ vr
2100
+ ], Or = {
2101
+ key: 2,
2102
+ class: "relative group"
2103
+ }, Ar = /* @__PURE__ */ p("div", { class: "w-4 h-4 bg-purple-500 rounded-full" }, [
2104
+ /* @__PURE__ */ p("span", { class: "shadow shadow-gray-700 absolute bg-purple-500 px-3 font-semibold rounded-lg p-1 -top-8 -translate-x-9 group-hover:opacity-100 opacity-0" }, "Indefinido")
2105
+ ], -1), Tr = [
2106
+ Ar
2107
+ ], kr = { key: 2 }, Lr = /* @__PURE__ */ p("svg", {
2108
+ "aria-hidden": "true",
2109
+ class: "inline w-4 h-4 text-blue-300 animate-spin fill-gray-600",
2110
+ viewBox: "0 0 100 101",
2111
+ fill: "none",
2112
+ xmlns: "http://www.w3.org/2000/svg"
2113
+ }, [
2114
+ /* @__PURE__ */ p("path", {
2115
+ d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
2116
+ fill: "currentColor"
2117
+ }),
2118
+ /* @__PURE__ */ p("path", {
2119
+ d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
2120
+ fill: "currentFill"
2121
+ })
2122
+ ], -1), Nr = [
2123
+ Lr
2124
+ ], Pr = /* @__PURE__ */ p("path", {
2125
+ "fill-rule": "evenodd",
2126
+ d: "M18.458 3.11A1 1 0 0 1 19 4v16a1 1 0 0 1-1.581.814L12 16.944V7.056l5.419-3.87a1 1 0 0 1 1.039-.076ZM22 12c0 1.48-.804 2.773-2 3.465v-6.93c1.196.692 2 1.984 2 3.465ZM10 8H4a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6V8Zm0 9H5v3a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-3Z",
2127
+ "clip-rule": "evenodd"
2128
+ }, null, -1), Br = [
2129
+ Pr
2130
+ ], Dr = { class: "flex w-full px-2 justify-center" }, Fr = {
2131
+ key: 1,
2132
+ class: "p-4"
2133
+ }, gt = {
2134
+ __name: "index",
2135
+ props: {
2136
+ modelValue: {
2137
+ type: Object,
2138
+ default: null
2139
+ },
2140
+ token: {
2141
+ type: String,
2142
+ default: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzIxNzMzMjg3LCJpYXQiOjE3MjE2NDY4ODcsImp0aSI6ImUyZDQ3NDUxMThjYTQ1ZjA4YjkzZGY1YTViYWQ0Yzk3IiwidXNlcl9pZCI6IjYyNGRmZTIzLTkyZDAtNDNmMS04MDYxLWEyMzIxZjJiNWViYiJ9.sWCrBDEbR8GVD8X4EyzDzULWL6MhaeCPYWR2SMs-dLU"
2143
+ },
2144
+ type: String,
2145
+ webhooks: Boolean,
2146
+ client: {
2147
+ type: String,
2148
+ default: "624dfe23-92d0-43f1-8061-a2321f2b5ebb"
2149
+ },
2150
+ url: {
2151
+ type: String,
2152
+ default: "http://localhost:8000/v1/api/instances/instance/"
2153
+ },
2154
+ status_url: {
2155
+ type: String,
2156
+ default: "http://localhost:8000/v1/api/instances/status_instance/"
2157
+ }
2158
+ },
2159
+ emits: ["update:modelValue"],
2160
+ setup(e, { emit: t }) {
2161
+ const s = j(!1), n = j(null), r = j(!0), o = e, i = t, l = j(null);
2162
+ async function f() {
2163
+ try {
2164
+ let u = o.url, c = o.status_url, d = `?client=${o.client}`;
2165
+ o.type && (d += `&type=${o.type}`), o.webhooks && (d += `&webhooks=${o.webhooks}`);
2166
+ const w = await E.get(`${u}`, {
2167
+ headers: {
2168
+ Authorization: `Bearer ${o.token}`
2169
+ }
2170
+ });
2171
+ l.value = w.data.results, l.value.forEach(async (m) => {
2172
+ m.isLoading = !0;
2173
+ try {
2174
+ (await E.get(
2175
+ `${c}?instance=${m.id}`,
2176
+ { headers: { Authorization: `Bearer ${o.token}` } }
2177
+ )).data.instance_status !== "Disconnected" ? m.status = !0 : m.status = !1;
2178
+ } catch {
2179
+ m.status = "Offline";
2180
+ }
2181
+ m.isLoading = !1;
2182
+ });
2183
+ } catch (u) {
2184
+ console.log(u);
2185
+ }
2186
+ r.value = !1;
2187
+ }
2188
+ return ce(
2189
+ () => o.modelValue,
2190
+ (u) => {
2191
+ n.value = u;
2192
+ },
2193
+ { immediate: !0 }
2194
+ ), ce(n, (u) => {
2195
+ i("update:modelValue", u);
2196
+ }), Et(async () => {
2197
+ await f();
2198
+ }), (u, c) => (b(), _("main", Is, [
2199
+ p("div", {
2200
+ onClick: c[1] || (c[1] = (d) => s.value = !s.value),
2201
+ class: M([{ "rounded-b-none": s.value }, "rounded-lg shadow shadow-gray-900 bg-base-300 p-2 px-4 text-center"])
2202
+ }, [
2203
+ p("div", $s, [
2204
+ p("p", qs, [
2205
+ r.value ? (b(), _("div", rr, [
2206
+ or,
2207
+ xt("Carregando instâncias...")
2208
+ ])) : (b(), _("div", zs, [
2209
+ n.value ? (b(), _("span", Vs, [
2210
+ p("header", Zs, [
2211
+ n.value.type === "whatsapp-qrcode" ? (b(), _("svg", Js, Ks)) : O("", !0),
2212
+ n.value.status === !1 ? (b(), _("svg", Gs, Ys)) : n.value.status === !0 ? (b(), _("svg", Qs, tr)) : n.value.status === "Offline" ? (b(), _("div", nr)) : O("", !0)
2213
+ ]),
2214
+ p("div", sr, P(n.value.name), 1)
2215
+ ])) : (b(), _("span", Hs, P(l.value ? l.value.length : "Sem") + " Instâncias disponíveis", 1))
2216
+ ]))
2217
+ ]),
2218
+ p("footer", ir, [
2219
+ p("button", {
2220
+ onClick: c[0] || (c[0] = (d) => n.value = null)
2221
+ }, lr),
2222
+ p("button", null, [
2223
+ (b(), _("svg", {
2224
+ class: M([{ "rotate-180": s.value }, "w-4 h-4 ease-out transition"]),
2225
+ "aria-hidden": "true",
2226
+ xmlns: "http://www.w3.org/2000/svg",
2227
+ width: "24",
2228
+ height: "24",
2229
+ fill: "none",
2230
+ viewBox: "0 0 24 24"
2231
+ }, ur, 2))
2232
+ ])
2233
+ ])
2234
+ ])
2235
+ ], 2),
2236
+ s.value ? (b(), _("nav", dr, [
2237
+ p("ul", fr, [
2238
+ l.value.length > 0 ? (b(!0), _(St, { key: 0 }, vt(l.value, (d, w) => (b(), _("li", {
2239
+ class: M([n.value && n.value.id === d.id ? "bg-base-100/70" : "bg-base-100/50", "hover:bg-base-200/90 select-none cursor-pointer w-full rounded-lg"])
2240
+ }, [
2241
+ p("main", {
2242
+ onClick: (m) => (n.value = d, s.value = !1),
2243
+ class: "flex p-2 justify-between gap-2 divide-x-2 divide-gray-500 w-full"
2244
+ }, [
2245
+ p("div", pr, [
2246
+ d.type === "whatsapp-qrcode" ? (b(), _("svg", mr, gr)) : O("", !0),
2247
+ p("p", null, P(d.name) + " " + P(w + 1), 1),
2248
+ d.isLoading ? (b(), _("div", kr, Nr)) : (b(), _("div", yr, [
2249
+ d.status === !1 ? (b(), _("figure", br, Er)) : d.status === !0 ? (b(), _("figure", xr, Rr)) : d.status === "Offline" ? (b(), _("figure", Or, Tr)) : O("", !0)
2250
+ ])),
2251
+ (b(), _("svg", {
2252
+ class: M([d.webhooks ? "text-green-500" : "text-red-600", "w-5 h-5"]),
2253
+ "aria-hidden": "true",
2254
+ xmlns: "http://www.w3.org/2000/svg",
2255
+ width: "24",
2256
+ height: "24",
2257
+ fill: "currentColor",
2258
+ viewBox: "0 0 24 24"
2259
+ }, Br, 2))
2260
+ ]),
2261
+ p("div", Dr, P(d.telephone), 1)
2262
+ ], 8, hr)
2263
+ ], 2))), 256)) : (b(), _("div", Fr, " Sem instâncias disponíveis"))
2264
+ ])
2265
+ ])) : O("", !0)
2266
+ ]));
2267
+ }
2268
+ };
2269
+ function jr(e) {
2270
+ e.component("primarySelect", He), e.component("simpleModal", Ze), e.component("simpleCard", Je), e.component("instanceSelect", gt);
2271
+ }
2272
+ const Ur = {
2273
+ install: jr,
2274
+ primarySelect: He,
2275
+ simpleModal: Ze,
2276
+ simpleCard: Je,
2277
+ instanceSelect: gt
243
2278
  };
244
2279
  export {
245
- Se as default
2280
+ Ur as default
246
2281
  };