@buzztech/boi-ui 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/boi-ui.js CHANGED
@@ -1,47 +1,47 @@
1
- import { defineComponent as q, openBlock as c, createElementBlock as p, normalizeClass as X, renderSlot as ne, createTextVNode as H, toDisplayString as M, unref as z, ref as I, computed as V, Fragment as W, createElementVNode as l, renderList as te, createVNode as ee, withDirectives as oe, vModelText as re, createCommentVNode as P, watch as de, onMounted as he, onUnmounted as ke, nextTick as Ue, vShow as Pe, withCtx as Oe } from "vue";
2
- const Ee = /* @__PURE__ */ q({
1
+ import { defineComponent as Y, openBlock as p, createElementBlock as m, normalizeClass as R, renderSlot as ne, createTextVNode as W, toDisplayString as T, unref as M, ref as A, computed as I, Fragment as J, createElementVNode as l, renderList as ae, createVNode as te, withDirectives as oe, vModelText as re, createCommentVNode as O, watch as de, onMounted as ke, onUnmounted as xe, nextTick as Ee, vShow as Oe, withCtx as Fe } from "vue";
2
+ const De = /* @__PURE__ */ Y({
3
3
  __name: "BoiButton",
4
4
  props: {
5
5
  label: {},
6
6
  variant: {}
7
7
  },
8
8
  setup(n) {
9
- return (k, e) => (c(), p("button", {
9
+ return (h, e) => (p(), m("button", {
10
10
  type: "button",
11
- class: X(["boi-button", [n.variant ? `boi-button--${n.variant}` : "boi-button--primary"]])
11
+ class: R(["boi-button", [n.variant ? `boi-button--${n.variant}` : "boi-button--primary"]])
12
12
  }, [
13
- ne(k.$slots, "default", {}, () => [
14
- H(M(n.label), 1)
13
+ ne(h.$slots, "default", {}, () => [
14
+ W(T(n.label), 1)
15
15
  ], !0)
16
16
  ], 2));
17
17
  }
18
- }), Fe = (n, k) => {
18
+ }), Te = (n, h) => {
19
19
  const e = n.__vccOpts || n;
20
- for (const [f, d] of k)
21
- e[f] = d;
20
+ for (const [g, d] of h)
21
+ e[g] = d;
22
22
  return e;
23
- }, De = /* @__PURE__ */ Fe(Ee, [["__scopeId", "data-v-96425342"]]);
23
+ }, je = /* @__PURE__ */ Te(De, [["__scopeId", "data-v-96425342"]]);
24
24
  function ie(...n) {
25
25
  return n.flat(1 / 0).filter(Boolean).join(" ");
26
26
  }
27
- const Te = "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", je = {
27
+ const Me = "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", Le = {
28
28
  default: "bg-primary text-white shadow-xs hover:bg-primary/90",
29
29
  destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
30
30
  outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
31
31
  secondary: "bg-secondary text-white shadow-xs hover:bg-secondary/80",
32
32
  ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
33
33
  link: "text-primary underline-offset-4 hover:underline"
34
- }, Me = {
34
+ }, ze = {
35
35
  default: "h-9 px-4 py-2 has-[>svg]:px-3",
36
36
  sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
37
37
  lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
38
38
  icon: "size-9"
39
39
  };
40
- function Le(n = {}) {
41
- const k = n.variant ?? "default", e = n.size ?? "default";
42
- return [Te, je[k], Me[e]].join(" ");
40
+ function Re(n = {}) {
41
+ const h = n.variant ?? "default", e = n.size ?? "default";
42
+ return [Me, Le[h], ze[e]].join(" ");
43
43
  }
44
- const ze = ["type", "disabled"], Re = /* @__PURE__ */ q({
44
+ const Ne = ["type", "disabled"], Ke = /* @__PURE__ */ Y({
45
45
  __name: "Button",
46
46
  props: {
47
47
  type: { default: "button" },
@@ -51,35 +51,35 @@ const ze = ["type", "disabled"], Re = /* @__PURE__ */ q({
51
51
  disabled: { type: Boolean, default: !1 }
52
52
  },
53
53
  setup(n) {
54
- const k = n;
55
- return (e, f) => (c(), p("button", {
54
+ const h = n;
55
+ return (e, g) => (p(), m("button", {
56
56
  type: n.type,
57
57
  disabled: n.disabled,
58
58
  "data-slot": "button",
59
- class: X(z(ie)(
60
- z(Le)({ variant: k.variant, size: k.size }),
61
- k.class
59
+ class: R(M(ie)(
60
+ M(Re)({ variant: h.variant, size: h.size }),
61
+ h.class
62
62
  ))
63
63
  }, [
64
64
  ne(e.$slots, "default")
65
- ], 10, ze));
65
+ ], 10, Ne));
66
66
  }
67
- }), Q = {
67
+ }), q = {
68
68
  getBanks: () => "/api/edoc/banks",
69
69
  initializeConsent: () => "/api/edoc/consent/initialize",
70
70
  attachAccount: () => "/api/edoc/consent/attach-account",
71
71
  getTransactions: () => "/api/edoc/consent/transactions",
72
72
  manualUpload: () => "/api/edoc/manual-upload"
73
- }, Ne = { class: "boi-emts-integration space-y-4" }, Ke = { key: 0 }, Xe = { class: "boi-emts-instructions rounded-lg border border-amber-200 bg-amber-50 p-4 text-sm" }, We = { class: "list-inside list-decimal space-y-1 text-amber-800" }, Ge = ["disabled"], He = {
73
+ }, Xe = { class: "boi-emts-integration space-y-4" }, We = { key: 0 }, Ge = { class: "boi-emts-instructions rounded-lg border border-amber-200 bg-amber-50 p-4 text-sm" }, He = { class: "list-inside list-decimal space-y-1 text-amber-800" }, Je = ["disabled"], Qe = {
74
74
  key: 1,
75
75
  class: "boi-emts-otp space-y-3 rounded-lg border-2 border-primary bg-primary/5 p-4"
76
- }, Je = { class: "flex flex-wrap items-end gap-3" }, Qe = { class: "min-w-[140px]" }, qe = ["disabled"], Ye = {
76
+ }, qe = { class: "flex flex-wrap items-end gap-3" }, Ye = { class: "min-w-[140px]" }, Ze = ["disabled"], et = {
77
77
  key: 1,
78
78
  class: "text-sm text-red-600"
79
- }, Ze = {
79
+ }, tt = {
80
80
  key: 2,
81
81
  class: "text-sm text-amber-600"
82
- }, ve = "inline-flex items-center justify-center rounded-md bg-black px-3 py-1.5 text-xs font-medium text-white shadow-sm hover:bg-neutral-900 focus:outline-none focus:ring-2 focus:ring-black focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", et = /* @__PURE__ */ q({
82
+ }, be = "inline-flex items-center justify-center rounded-md bg-black px-3 py-1.5 text-xs font-medium text-white shadow-sm hover:bg-neutral-900 focus:outline-none focus:ring-2 focus:ring-black focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", at = /* @__PURE__ */ Y({
83
83
  __name: "EmtsIntegration",
84
84
  props: {
85
85
  account: {},
@@ -93,42 +93,42 @@ const ze = ["type", "disabled"], Re = /* @__PURE__ */ q({
93
93
  integrationBaseUrl: { default: "" }
94
94
  },
95
95
  emits: ["update:consentId", "statement-retrieved", "error"],
96
- setup(n, { emit: k }) {
96
+ setup(n, { emit: h }) {
97
97
  const e = n;
98
- function f(o) {
99
- const i = (e.integrationBaseUrl ?? "").replace(/\/$/, "");
100
- if (!i) return o;
101
- const b = o.startsWith("/") ? o : `/${o}`;
102
- return `${i}${b}`;
98
+ function g(i) {
99
+ const s = (e.integrationBaseUrl ?? "").replace(/\/$/, "");
100
+ if (!s) return i;
101
+ const c = i.startsWith("/") ? i : `/${i}`;
102
+ return `${s}${c}`;
103
103
  }
104
- const d = k, $ = I(!1), B = I(!1);
105
- function u(o) {
106
- const i = e.bankOptions.find((b) => b.value === o);
107
- return [(i == null ? void 0 : i.label) ?? "", ...(i == null ? void 0 : i.searchKeywords) ?? []].filter(Boolean);
104
+ const d = h, _ = A(!1), $ = A(!1);
105
+ function v(i) {
106
+ const s = e.bankOptions.find((c) => c.value === i);
107
+ return [(s == null ? void 0 : s.label) ?? "", ...(s == null ? void 0 : s.searchKeywords) ?? []].filter(Boolean);
108
108
  }
109
- function x(o, i = !1) {
110
- if (!o || !e.edocBanks.length) return;
111
- const b = u(o);
112
- return e.edocBanks.find((g) => {
113
- const D = g.bankCode === o || g.code === o, T = b.some((N) => {
114
- var K;
115
- return (K = g.name) == null ? void 0 : K.toLowerCase().includes(N.toLowerCase());
109
+ function w(i, s = !1) {
110
+ if (!i || !e.edocBanks.length) return;
111
+ const c = v(i);
112
+ return e.edocBanks.find((y) => {
113
+ const j = y.bankCode === i || y.code === i, P = c.some((K) => {
114
+ var X;
115
+ return (X = y.name) == null ? void 0 : X.toLowerCase().includes(K.toLowerCase());
116
116
  });
117
- return (D || T) && (!i || g.enabled !== !1);
117
+ return (j || P) && (!s || y.enabled !== !1);
118
118
  });
119
119
  }
120
- const A = (o) => x(o, !1), _ = (o) => !!x(o, !0), O = V(() => {
121
- var o, i;
122
- return !!((i = (o = A(e.account.bank)) == null ? void 0 : o.bankInstructions) != null && i.length);
123
- }), S = V(() => {
124
- var i;
125
- const o = e.account;
126
- return !!o.bank && ((i = o.account_number) == null ? void 0 : i.length) === 10 && !$.value && !B.value;
127
- }), C = V(() => !!e.account.otp && !B.value), F = (o) => {
128
- var i, b, g;
129
- return ((b = (i = o == null ? void 0 : o.response) == null ? void 0 : i.data) == null ? void 0 : b.message) ?? ((g = o == null ? void 0 : o.data) == null ? void 0 : g.message) ?? (o == null ? void 0 : o.message) ?? "An unexpected error occurred";
130
- }, G = (o) => ({
131
- email: o,
120
+ const V = (i) => w(i, !1), C = (i) => !!w(i, !0), U = I(() => {
121
+ var i, s;
122
+ return !!((s = (i = V(e.account.bank)) == null ? void 0 : i.bankInstructions) != null && s.length);
123
+ }), x = I(() => {
124
+ var s;
125
+ const i = e.account;
126
+ return !!i.bank && ((s = i.account_number) == null ? void 0 : s.length) === 10 && !_.value && !$.value;
127
+ }), S = I(() => !!e.account.otp && !$.value), B = (i) => {
128
+ var s, c, y;
129
+ return ((c = (s = i == null ? void 0 : i.response) == null ? void 0 : s.data) == null ? void 0 : c.message) ?? ((y = i == null ? void 0 : i.data) == null ? void 0 : y.message) ?? (i == null ? void 0 : i.message) ?? "An unexpected error occurred";
130
+ }, G = (i) => ({
131
+ email: i,
132
132
  referenceId: `loan_${e.applicationId ?? "new"}_${e.account.id}`,
133
133
  firstName: "Company",
134
134
  lastName: "Account",
@@ -138,101 +138,101 @@ const ze = ["type", "disabled"], Re = /* @__PURE__ */ q({
138
138
  redirectionUrl: typeof window < "u" ? window.location.origin + "/loan-application" : "",
139
139
  industrialSector: e.industrialSector ?? void 0
140
140
  });
141
- async function y(o) {
142
- var T, N;
143
- const i = e.account.email || e.companyEmail || "", b = await e.api.post(f(Q.initializeConsent()), G(i)), g = b == null ? void 0 : b.data;
144
- if (!(g != null && g.success)) throw new Error((g == null ? void 0 : g.message) ?? "Failed to initialize consent");
145
- const D = (N = (T = g == null ? void 0 : g.data) == null ? void 0 : T.data) == null ? void 0 : N.consentId;
146
- if (!D) throw new Error("No consent ID returned");
147
- return d("update:consentId", D), await e.api.post(f(Q.attachAccount()), {
148
- consentId: D,
149
- bankId: o.bankId,
141
+ async function N(i) {
142
+ var P, K;
143
+ const s = e.account.email || e.companyEmail || "", c = await e.api.post(g(q.initializeConsent()), G(s)), y = c == null ? void 0 : c.data;
144
+ if (!(y != null && y.success)) throw new Error((y == null ? void 0 : y.message) ?? "Failed to initialize consent");
145
+ const j = (K = (P = y == null ? void 0 : y.data) == null ? void 0 : P.data) == null ? void 0 : K.consentId;
146
+ if (!j) throw new Error("No consent ID returned");
147
+ return d("update:consentId", j), await e.api.post(g(q.attachAccount()), {
148
+ consentId: j,
149
+ bankId: i.bankId,
150
150
  accountNumber: e.account.account_number,
151
151
  accountType: "Business",
152
152
  statementDuration: "12",
153
153
  monthType: "Period",
154
154
  uploadType: "Digital"
155
- }), D;
155
+ }), j;
156
156
  }
157
- async function h() {
158
- var i;
159
- const o = A(e.account.bank);
157
+ async function k() {
158
+ var s;
159
+ const i = V(e.account.bank);
160
160
  if (!e.account.bank) return d("error", "Please select a bank");
161
- if (((i = e.account.account_number) == null ? void 0 : i.length) !== 10) return d("error", "Please provide a valid 10-digit account number");
162
- if (!o) return d("error", "Selected bank does not support electronic statement retrieval");
163
- $.value = !0;
161
+ if (((s = e.account.account_number) == null ? void 0 : s.length) !== 10) return d("error", "Please provide a valid 10-digit account number");
162
+ if (!i) return d("error", "Selected bank does not support electronic statement retrieval");
163
+ _.value = !0;
164
164
  try {
165
- await y(o);
166
- } catch (b) {
167
- d("error", F(b));
165
+ await N(i);
166
+ } catch (c) {
167
+ d("error", B(c));
168
168
  } finally {
169
- $.value = !1;
169
+ _.value = !1;
170
170
  }
171
171
  }
172
- async function w() {
173
- var o;
172
+ async function u() {
173
+ var i;
174
174
  if (!e.account.otp || !e.account.consent_id) return d("error", "Please enter OTP");
175
- B.value = !0;
175
+ $.value = !0;
176
176
  try {
177
- const i = await e.api.post(f(Q.getTransactions()), {
177
+ const s = await e.api.post(g(q.getTransactions()), {
178
178
  consentId: e.account.consent_id,
179
179
  verificationCode: e.account.otp,
180
180
  bankStatementId: e.account.id
181
- }), b = i == null ? void 0 : i.data;
182
- if (!(b != null && b.success)) return d("error", (b == null ? void 0 : b.message) ?? "Failed to retrieve transactions");
183
- (o = b.data) != null && o.statement && d("statement-retrieved", b.data.statement);
184
- } catch (i) {
185
- d("error", F(i));
181
+ }), c = s == null ? void 0 : s.data;
182
+ if (!(c != null && c.success)) return d("error", (c == null ? void 0 : c.message) ?? "Failed to retrieve transactions");
183
+ (i = c.data) != null && i.statement && d("statement-retrieved", c.data.statement);
184
+ } catch (s) {
185
+ d("error", B(s));
186
186
  } finally {
187
- B.value = !1;
187
+ $.value = !1;
188
188
  }
189
189
  }
190
- async function v() {
191
- var i, b;
192
- const o = A(e.account.bank);
193
- if (!e.account.bank || ((i = e.account.account_number) == null ? void 0 : i.length) !== 10)
190
+ async function b() {
191
+ var s, c;
192
+ const i = V(e.account.bank);
193
+ if (!e.account.bank || ((s = e.account.account_number) == null ? void 0 : s.length) !== 10)
194
194
  return d("error", "Please select a bank and provide a valid 10-digit account number");
195
- if (!o) return d("error", "Selected bank does not support electronic statement retrieval");
196
- B.value = !0;
195
+ if (!i) return d("error", "Selected bank does not support electronic statement retrieval");
196
+ $.value = !0;
197
197
  try {
198
- const g = await y(o), D = await e.api.post(f(Q.getTransactions()), {
199
- consentId: g,
198
+ const y = await N(i), j = await e.api.post(g(q.getTransactions()), {
199
+ consentId: y,
200
200
  verificationCode: "",
201
201
  bankStatementId: e.account.id
202
- }), T = D == null ? void 0 : D.data;
203
- if (!(T != null && T.success)) return d("error", (T == null ? void 0 : T.message) ?? "Failed to retrieve transactions");
204
- (b = T.data) != null && b.statement && d("statement-retrieved", T.data.statement);
205
- } catch (g) {
206
- d("error", F(g));
202
+ }), P = j == null ? void 0 : j.data;
203
+ if (!(P != null && P.success)) return d("error", (P == null ? void 0 : P.message) ?? "Failed to retrieve transactions");
204
+ (c = P.data) != null && c.statement && d("statement-retrieved", P.data.statement);
205
+ } catch (y) {
206
+ d("error", B(y));
207
207
  } finally {
208
- B.value = !1;
208
+ $.value = !1;
209
209
  }
210
210
  }
211
- return (o, i) => {
212
- var b;
213
- return c(), p("div", Ne, [
214
- _(n.account.bank) ? (c(), p("div", Ke, [
215
- O.value && !n.account.statement_generated ? (c(), p(W, { key: 0 }, [
216
- l("div", Xe, [
217
- i[1] || (i[1] = l("p", { class: "mb-2 font-semibold text-amber-900" }, "Bank-specific instructions", -1)),
218
- l("ol", We, [
219
- (c(!0), p(W, null, te((b = A(n.account.bank)) == null ? void 0 : b.bankInstructions, (g, D) => (c(), p("li", { key: D }, M(g), 1))), 128))
211
+ return (i, s) => {
212
+ var c;
213
+ return p(), m("div", Xe, [
214
+ C(n.account.bank) ? (p(), m("div", We, [
215
+ U.value && !n.account.statement_generated ? (p(), m(J, { key: 0 }, [
216
+ l("div", Ge, [
217
+ s[1] || (s[1] = l("p", { class: "mb-2 font-semibold text-amber-900" }, "Bank-specific instructions", -1)),
218
+ l("ol", He, [
219
+ (p(!0), m(J, null, ae((c = V(n.account.bank)) == null ? void 0 : c.bankInstructions, (y, j) => (p(), m("li", { key: j }, T(y), 1))), 128))
220
220
  ])
221
221
  ]),
222
- ee(De, {
223
- label: B.value ? "Retrieving…" : "Retrieve statement",
222
+ te(je, {
223
+ label: $.value ? "Retrieving…" : "Retrieve statement",
224
224
  variant: "primary",
225
- disabled: !S.value || n.disabled,
226
- onClick: v
225
+ disabled: !x.value || n.disabled,
226
+ onClick: b
227
227
  }, null, 8, ["label", "disabled"])
228
- ], 64)) : !O.value && !n.account.statement_generated ? (c(), p(W, { key: 1 }, [
229
- n.account.showOtpInput ? (c(), p("div", He, [
230
- i[3] || (i[3] = l("p", { class: "text-sm font-medium text-gray-700" }, "Enter the OTP sent to your bank-registered email.", -1)),
231
- l("div", Je, [
232
- l("div", Qe, [
233
- i[2] || (i[2] = l("label", { class: "mb-1 block text-xs font-medium text-gray-600" }, "OTP code", -1)),
228
+ ], 64)) : !U.value && !n.account.statement_generated ? (p(), m(J, { key: 1 }, [
229
+ n.account.showOtpInput ? (p(), m("div", Qe, [
230
+ s[3] || (s[3] = l("p", { class: "text-sm font-medium text-gray-700" }, "Enter the OTP sent to your bank-registered email.", -1)),
231
+ l("div", qe, [
232
+ l("div", Ye, [
233
+ s[2] || (s[2] = l("label", { class: "mb-1 block text-xs font-medium text-gray-600" }, "OTP code", -1)),
234
234
  oe(l("input", {
235
- "onUpdate:modelValue": i[0] || (i[0] = (g) => n.account.otp = g),
235
+ "onUpdate:modelValue": s[0] || (s[0] = (y) => n.account.otp = y),
236
236
  type: "text",
237
237
  maxlength: "6",
238
238
  placeholder: "6-digit OTP",
@@ -243,132 +243,132 @@ const ze = ["type", "disabled"], Re = /* @__PURE__ */ q({
243
243
  ]),
244
244
  l("button", {
245
245
  type: "button",
246
- class: X(ve),
247
- disabled: !C.value || n.disabled,
248
- onClick: w
249
- }, " Verify OTP ", 8, qe)
246
+ class: R(be),
247
+ disabled: !S.value || n.disabled,
248
+ onClick: u
249
+ }, " Verify OTP ", 8, Ze)
250
250
  ])
251
- ])) : (c(), p("button", {
251
+ ])) : (p(), m("button", {
252
252
  key: 0,
253
253
  type: "button",
254
- class: X(ve),
255
- disabled: !S.value || n.disabled,
256
- onClick: h
257
- }, M($.value ? "Sending OTP…" : "Send OTP"), 9, Ge))
258
- ], 64)) : P("", !0)
259
- ])) : P("", !0),
260
- n.account.edoc_status === "failed" ? (c(), p("div", Ye, "Statement retrieval failed. Please try again or upload manually.")) : P("", !0),
261
- n.account.edoc_status === "processing" ? (c(), p("div", Ze, "Processing…")) : P("", !0)
254
+ class: R(be),
255
+ disabled: !x.value || n.disabled,
256
+ onClick: k
257
+ }, T(_.value ? "Sending OTP…" : "Send OTP"), 9, Je))
258
+ ], 64)) : O("", !0)
259
+ ])) : O("", !0),
260
+ n.account.edoc_status === "failed" ? (p(), m("div", et, "Statement retrieval failed. Please try again or upload manually.")) : O("", !0),
261
+ n.account.edoc_status === "processing" ? (p(), m("div", tt, "Processing…")) : O("", !0)
262
262
  ]);
263
263
  };
264
264
  }
265
265
  });
266
- function tt(n) {
266
+ function nt(n) {
267
267
  if (!n || typeof n != "object") return [];
268
- const k = n, e = k.success ? k.data : k.data ?? k;
268
+ const h = n, e = h.success ? h.data : h.data ?? h;
269
269
  return Array.isArray(e) ? e : e && typeof e == "object" && Array.isArray(e.data) ? e.data : [];
270
270
  }
271
- function be(n, k) {
272
- return n === void 0 ? k : typeof n == "function" ? n() : n;
271
+ function ge(n, h) {
272
+ return n === void 0 ? h : typeof n == "function" ? n() : n;
273
273
  }
274
- function at(n) {
275
- const { get: k, getBanksUrl: e, fallbackBanksUrl: f } = n, d = I([]), $ = I([]), B = I(!1), u = I(null);
276
- let x = null;
274
+ function ot(n) {
275
+ const { get: h, getBanksUrl: e, fallbackBanksUrl: g } = n, d = A([]), _ = A([]), $ = A(!1), v = A(null);
276
+ let w = null;
277
277
  return {
278
278
  edocBanks: d,
279
- banks: $,
280
- loading: B,
281
- error: u,
282
- loadBanksForStatement: async () => d.value.length > 0 ? d.value : x || (B.value = !0, u.value = null, x = (async () => {
283
- var O, S;
279
+ banks: _,
280
+ loading: $,
281
+ error: v,
282
+ loadBanksForStatement: async () => d.value.length > 0 ? d.value : w || ($.value = !0, v.value = null, w = (async () => {
283
+ var U, x;
284
284
  try {
285
- const C = await k(be(e, Q.getBanks())), F = tt(C == null ? void 0 : C.data);
286
- if (F.length)
287
- return d.value = $.value = F, F;
285
+ const S = await h(ge(e, q.getBanks())), B = nt(S == null ? void 0 : S.data);
286
+ if (B.length)
287
+ return d.value = _.value = B, B;
288
288
  } catch {
289
289
  }
290
- const _ = f != null ? be(f, "") : "";
291
- if (_)
290
+ const C = g != null ? ge(g, "") : "";
291
+ if (C)
292
292
  try {
293
- const C = await k(_), F = Array.isArray(C == null ? void 0 : C.data) ? C.data : [];
294
- return d.value = $.value = F, F;
295
- } catch (C) {
296
- throw u.value = ((S = (O = C == null ? void 0 : C.response) == null ? void 0 : O.data) == null ? void 0 : S.message) ?? "Failed to load banks", C;
293
+ const S = await h(C), B = Array.isArray(S == null ? void 0 : S.data) ? S.data : [];
294
+ return d.value = _.value = B, B;
295
+ } catch (S) {
296
+ throw v.value = ((x = (U = S == null ? void 0 : S.response) == null ? void 0 : U.data) == null ? void 0 : x.message) ?? "Failed to load banks", S;
297
297
  }
298
298
  return [];
299
299
  })().finally(() => {
300
- B.value = !1, x = null;
301
- }), x),
300
+ $.value = !1, w = null;
301
+ }), w),
302
302
  invalidateCache: () => {
303
- d.value = $.value = [], x = null, u.value = null;
303
+ d.value = _.value = [], w = null, v.value = null;
304
304
  }
305
305
  };
306
306
  }
307
- const J = I({});
308
- function nt(n) {
309
- const k = () => typeof n == "function" && n.length === 0 ? n() : n, e = (u) => `${u.bank ?? ""}_${u.account_number ?? ""}`, f = (u) => {
310
- const x = e(u);
311
- return J.value[x] ?? {
307
+ const Q = A({});
308
+ function st(n) {
309
+ const h = () => typeof n == "function" && n.length === 0 ? n() : n, e = (v) => `${v.bank ?? ""}_${v.account_number ?? ""}`, g = (v) => {
310
+ const w = e(v);
311
+ return Q.value[w] ?? {
312
312
  isLoading: !1,
313
313
  isSuccess: !1,
314
314
  isError: !1
315
315
  };
316
- }, d = (u) => {
317
- u.account_name = "";
318
- }, $ = async (u) => {
319
- const x = u.bank, A = u.account_number, _ = e(u), O = k();
320
- if (!O || !x || !A || A.length !== 10) {
321
- delete J.value[_], (A == null ? void 0 : A.length) !== 10 && d(u);
316
+ }, d = (v) => {
317
+ v.account_name = "";
318
+ }, _ = async (v) => {
319
+ const w = v.bank, V = v.account_number, C = e(v), U = h();
320
+ if (!U || !w || !V || V.length !== 10) {
321
+ delete Q.value[C], (V == null ? void 0 : V.length) !== 10 && d(v);
322
322
  return;
323
323
  }
324
- d(u), J.value[_] = { isLoading: !0, isSuccess: !1, isError: !1 };
324
+ d(v), Q.value[C] = { isLoading: !0, isSuccess: !1, isError: !1 };
325
325
  try {
326
- const S = await O(A, x), C = (S == null ? void 0 : S.account_name) ?? (S == null ? void 0 : S.accountName) ?? "";
327
- C ? (u.account_name = C, J.value[_] = { isLoading: !1, isSuccess: !0, isError: !1 }) : J.value[_] = {
326
+ const x = await U(V, w), S = (x == null ? void 0 : x.account_name) ?? (x == null ? void 0 : x.accountName) ?? "";
327
+ S ? (v.account_name = S, Q.value[C] = { isLoading: !1, isSuccess: !0, isError: !1 }) : Q.value[C] = {
328
328
  isLoading: !1,
329
329
  isSuccess: !1,
330
330
  isError: !0,
331
331
  errorMessage: "Account verification failed"
332
332
  };
333
- } catch (S) {
334
- J.value[_] = {
333
+ } catch (x) {
334
+ Q.value[C] = {
335
335
  isLoading: !1,
336
336
  isSuccess: !1,
337
337
  isError: !0,
338
- errorMessage: S instanceof Error ? S.message : "Verification failed"
338
+ errorMessage: x instanceof Error ? x.message : "Verification failed"
339
339
  };
340
340
  }
341
341
  };
342
342
  return {
343
- handleAccountVerification: $,
344
- retryVerification: (u) => $(u),
345
- getVerificationState: f,
343
+ handleAccountVerification: _,
344
+ retryVerification: (v) => _(v),
345
+ getVerificationState: g,
346
346
  clearAccountName: d
347
347
  };
348
348
  }
349
- const ge = "/api/loan-applications";
350
- function ot(n, k = "") {
351
- const e = k ? `${k.replace(/\/$/, "")}${ge}` : ge, f = String(n);
349
+ const ye = "/api/loan-applications";
350
+ function it(n, h = "") {
351
+ const e = h ? `${h.replace(/\/$/, "")}${ye}` : ye, g = String(n);
352
352
  return {
353
- index: `${e}/${f}/bank-statements`,
354
- store: `${e}/${f}/bank-statements`,
355
- update: (d) => `${e}/${f}/bank-statements/${d}`,
356
- destroy: (d) => `${e}/${f}/bank-statements/${d}`,
357
- uploadToEdoc: (d) => `${e}/${f}/bank-statements/${d}/upload-to-edoc`
353
+ index: `${e}/${g}/bank-statements`,
354
+ store: `${e}/${g}/bank-statements`,
355
+ update: (d) => `${e}/${g}/bank-statements/${d}`,
356
+ destroy: (d) => `${e}/${g}/bank-statements/${d}`,
357
+ uploadToEdoc: (d) => `${e}/${g}/bank-statements/${d}/upload-to-edoc`
358
358
  };
359
359
  }
360
- const st = {
361
- urls: ot
362
- }, ye = "", le = {
363
- upload: () => `${ye}/api/files/upload`,
364
- view: (n) => `${ye}/api/files/view?path=${encodeURIComponent(n)}`
365
- }, it = ["id", "disabled"], lt = { class: "truncate text-left" }, rt = {
360
+ const lt = {
361
+ urls: it
362
+ }, he = "", le = {
363
+ upload: () => `${he}/api/files/upload`,
364
+ view: (n) => `${he}/api/files/view?path=${encodeURIComponent(n)}`
365
+ }, rt = ["id", "disabled"], dt = { class: "truncate text-left" }, ut = {
366
366
  key: 0,
367
367
  class: "absolute z-[1000] mt-1 w-full rounded-lg border border-gray-200 bg-white shadow-lg"
368
- }, dt = { class: "border-b border-gray-100 p-2" }, ut = { class: "relative" }, ct = { class: "max-h-48 overflow-auto py-1" }, pt = ["onClick"], mt = {
368
+ }, ct = { class: "border-b border-gray-100 p-2" }, pt = { class: "relative" }, mt = { class: "max-h-48 overflow-auto py-1" }, ft = ["onClick"], vt = {
369
369
  key: 0,
370
370
  class: "px-3 py-2 text-center text-sm italic text-gray-500"
371
- }, ft = /* @__PURE__ */ q({
371
+ }, bt = /* @__PURE__ */ Y({
372
372
  __name: "BankSelect",
373
373
  props: {
374
374
  modelValue: {},
@@ -378,94 +378,94 @@ const st = {
378
378
  id: {}
379
379
  },
380
380
  emits: ["update:modelValue"],
381
- setup(n, { emit: k }) {
382
- const e = n, f = k, d = I(!1), $ = I(null), B = I(null), u = I(""), x = I(-1);
383
- function A(h, w) {
384
- if (!w) return !0;
385
- const v = [
386
- h.label,
387
- h.shortName,
388
- ...h.searchKeywords ?? []
389
- ].filter((i) => i != null && String(i).trim() !== "").map((i) => String(i).toLowerCase());
390
- if (v.some((i) => i.includes(w))) return !0;
391
- const o = w.split(/\s+/).filter(Boolean);
392
- return o.length > 1 ? o.every((i) => v.some((b) => b.includes(i))) : v.some((i) => i.startsWith(w));
381
+ setup(n, { emit: h }) {
382
+ const e = n, g = h, d = A(!1), _ = A(null), $ = A(null), v = A(""), w = A(-1);
383
+ function V(k, u) {
384
+ if (!u) return !0;
385
+ const b = [
386
+ k.label,
387
+ k.shortName,
388
+ ...k.searchKeywords ?? []
389
+ ].filter((s) => s != null && String(s).trim() !== "").map((s) => String(s).toLowerCase());
390
+ if (b.some((s) => s.includes(u))) return !0;
391
+ const i = u.split(/\s+/).filter(Boolean);
392
+ return i.length > 1 ? i.every((s) => b.some((c) => c.includes(s))) : b.some((s) => s.startsWith(u));
393
393
  }
394
- const _ = V(() => {
395
- var w;
396
- if (!((w = e.options) != null && w.length)) return [];
397
- if (!u.value.trim()) return e.options;
398
- const h = u.value.toLowerCase().trim();
399
- return e.options.filter((v) => A(v, h));
400
- }), O = V(
394
+ const C = I(() => {
395
+ var u;
396
+ if (!((u = e.options) != null && u.length)) return [];
397
+ if (!v.value.trim()) return e.options;
398
+ const k = v.value.toLowerCase().trim();
399
+ return e.options.filter((b) => V(b, k));
400
+ }), U = I(
401
401
  () => {
402
- var h;
403
- return ((h = e.options) == null ? void 0 : h.find((w) => String(w.value) === String(e.modelValue))) ?? null;
402
+ var k;
403
+ return ((k = e.options) == null ? void 0 : k.find((u) => String(u.value) === String(e.modelValue))) ?? null;
404
404
  }
405
- ), S = V(() => {
406
- var h;
407
- return ((h = O.value) == null ? void 0 : h.label) ?? e.placeholder;
405
+ ), x = I(() => {
406
+ var k;
407
+ return ((k = U.value) == null ? void 0 : k.label) ?? e.placeholder;
408
408
  });
409
- function C() {
410
- e.disabled || (d.value = !d.value, d.value && (u.value = "", x.value = _.value.length ? 0 : -1, Ue(() => {
411
- var h;
412
- return (h = B.value) == null ? void 0 : h.focus();
409
+ function S() {
410
+ e.disabled || (d.value = !d.value, d.value && (v.value = "", w.value = C.value.length ? 0 : -1, Ee(() => {
411
+ var k;
412
+ return (k = $.value) == null ? void 0 : k.focus();
413
413
  })));
414
414
  }
415
- function F(h) {
416
- f("update:modelValue", String(h.value)), d.value = !1, u.value = "";
415
+ function B(k) {
416
+ g("update:modelValue", String(k.value)), d.value = !1, v.value = "";
417
417
  }
418
- function G(h) {
418
+ function G(k) {
419
419
  if (!d.value) return;
420
- const w = _.value;
421
- switch (h.key) {
420
+ const u = C.value;
421
+ switch (k.key) {
422
422
  case "ArrowDown":
423
- h.preventDefault(), x.value = Math.min(x.value + 1, w.length - 1);
423
+ k.preventDefault(), w.value = Math.min(w.value + 1, u.length - 1);
424
424
  break;
425
425
  case "ArrowUp":
426
- h.preventDefault(), x.value = Math.max(x.value - 1, 0);
426
+ k.preventDefault(), w.value = Math.max(w.value - 1, 0);
427
427
  break;
428
428
  case "Enter":
429
- h.preventDefault(), x.value >= 0 && w[x.value] && F(w[x.value]);
429
+ k.preventDefault(), w.value >= 0 && u[w.value] && B(u[w.value]);
430
430
  break;
431
431
  case "Escape":
432
- h.preventDefault(), d.value = !1;
432
+ k.preventDefault(), d.value = !1;
433
433
  break;
434
434
  }
435
435
  }
436
- function y(h) {
437
- $.value && !$.value.contains(h.target) && (d.value = !1);
436
+ function N(k) {
437
+ _.value && !_.value.contains(k.target) && (d.value = !1);
438
438
  }
439
- return de(u, () => {
440
- x.value = _.value.length ? 0 : -1;
441
- }), he(() => {
442
- typeof document < "u" && document.addEventListener("click", y);
439
+ return de(v, () => {
440
+ w.value = C.value.length ? 0 : -1;
443
441
  }), ke(() => {
444
- typeof document < "u" && document.removeEventListener("click", y);
445
- }), (h, w) => (c(), p("div", {
442
+ typeof document < "u" && document.addEventListener("click", N);
443
+ }), xe(() => {
444
+ typeof document < "u" && document.removeEventListener("click", N);
445
+ }), (k, u) => (p(), m("div", {
446
446
  ref_key: "selectRef",
447
- ref: $,
447
+ ref: _,
448
448
  class: "relative"
449
449
  }, [
450
450
  l("button", {
451
451
  type: "button",
452
452
  id: n.id,
453
453
  disabled: n.disabled,
454
- class: X(z(ie)(
454
+ class: R(M(ie)(
455
455
  "flex h-9 w-full min-w-0 items-center justify-between rounded-lg border border-gray-300 bg-white px-3 py-2.5 text-sm transition-colors outline-none",
456
456
  "focus:border-[var(--boi-primary)] focus:ring-1 focus:ring-[var(--boi-primary)]",
457
457
  "disabled:cursor-not-allowed disabled:opacity-50",
458
- !O.value && "text-gray-500"
458
+ !U.value && "text-gray-500"
459
459
  )),
460
- onClick: C
460
+ onClick: S
461
461
  }, [
462
- l("span", lt, M(S.value), 1),
463
- (c(), p("svg", {
464
- class: X(["h-4 w-4 shrink-0 text-gray-400", { "rotate-180": d.value }]),
462
+ l("span", dt, T(x.value), 1),
463
+ (p(), m("svg", {
464
+ class: R(["h-4 w-4 shrink-0 text-gray-400", { "rotate-180": d.value }]),
465
465
  fill: "none",
466
466
  stroke: "currentColor",
467
467
  viewBox: "0 0 24 24"
468
- }, [...w[1] || (w[1] = [
468
+ }, [...u[1] || (u[1] = [
469
469
  l("path", {
470
470
  "stroke-linecap": "round",
471
471
  "stroke-linejoin": "round",
@@ -473,11 +473,11 @@ const st = {
473
473
  d: "M19 9l-7 7-7-7"
474
474
  }, null, -1)
475
475
  ])], 2))
476
- ], 10, it),
477
- d.value ? (c(), p("div", rt, [
478
- l("div", dt, [
479
- l("div", ut, [
480
- w[2] || (w[2] = l("svg", {
476
+ ], 10, rt),
477
+ d.value ? (p(), m("div", ut, [
478
+ l("div", ct, [
479
+ l("div", pt, [
480
+ u[2] || (u[2] = l("svg", {
481
481
  class: "absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400",
482
482
  fill: "none",
483
483
  stroke: "currentColor",
@@ -492,40 +492,40 @@ const st = {
492
492
  ], -1)),
493
493
  oe(l("input", {
494
494
  ref_key: "searchRef",
495
- ref: B,
496
- "onUpdate:modelValue": w[0] || (w[0] = (v) => u.value = v),
495
+ ref: $,
496
+ "onUpdate:modelValue": u[0] || (u[0] = (b) => v.value = b),
497
497
  type: "text",
498
498
  placeholder: "Type to search...",
499
499
  class: "w-full rounded-md border-0 bg-gray-50 py-2 pl-9 pr-3 text-sm focus:bg-white focus:ring-1 focus:ring-[var(--boi-primary)]",
500
500
  onKeydown: G
501
501
  }, null, 544), [
502
- [re, u.value]
502
+ [re, v.value]
503
503
  ])
504
504
  ])
505
505
  ]),
506
- l("div", ct, [
507
- (c(!0), p(W, null, te(_.value, (v, o) => (c(), p("button", {
508
- key: v.value,
506
+ l("div", mt, [
507
+ (p(!0), m(J, null, ae(C.value, (b, i) => (p(), m("button", {
508
+ key: b.value,
509
509
  type: "button",
510
- class: X(z(ie)(
510
+ class: R(M(ie)(
511
511
  "w-full cursor-pointer px-3 py-2.5 text-left text-sm transition-colors text-gray-900",
512
- o === x.value ? "bg-gray-100" : "hover:bg-gray-50",
513
- String(v.value) === String(n.modelValue) && n.modelValue !== "" && n.modelValue !== void 0 && "font-semibold text-[#016837]"
512
+ i === w.value ? "bg-gray-100" : "hover:bg-gray-50",
513
+ String(b.value) === String(n.modelValue) && n.modelValue !== "" && n.modelValue !== void 0 && "font-semibold text-[#016837]"
514
514
  )),
515
- onClick: (i) => F(v)
516
- }, M(v.label), 11, pt))), 128)),
517
- _.value.length === 0 ? (c(), p("p", mt, ' No options found for "' + M(u.value) + '" ', 1)) : P("", !0)
515
+ onClick: (s) => B(b)
516
+ }, T(b.label), 11, ft))), 128)),
517
+ C.value.length === 0 ? (p(), m("p", vt, ' No options found for "' + T(v.value) + '" ', 1)) : O("", !0)
518
518
  ])
519
- ])) : P("", !0)
519
+ ])) : O("", !0)
520
520
  ], 512));
521
521
  }
522
- }), vt = { class: "boi-file-input w-full space-y-2" }, bt = ["accept", "disabled", "id"], gt = { class: "truncate text-sm text-gray-600" }, yt = {
522
+ }), gt = { class: "boi-file-input w-full space-y-2" }, yt = ["accept", "disabled", "id"], ht = { class: "truncate text-sm text-gray-600" }, kt = {
523
523
  key: 0,
524
524
  class: "text-sm text-red-600"
525
- }, ht = {
525
+ }, xt = {
526
526
  key: 1,
527
527
  class: "text-xs text-gray-500"
528
- }, kt = ["href"], xt = /* @__PURE__ */ q({
528
+ }, wt = ["href"], _t = /* @__PURE__ */ Y({
529
529
  __name: "FileInput",
530
530
  props: {
531
531
  modelValue: { default: "" },
@@ -556,8 +556,8 @@ const st = {
556
556
  post: {}
557
557
  },
558
558
  emits: ["update:modelValue", "validation-error", "validation-success", "uploaded"],
559
- setup(n, { emit: k }) {
560
- const e = n, f = k, d = I(), $ = I(!1), B = I(""), u = I(""), x = {
559
+ setup(n, { emit: h }) {
560
+ const e = n, g = h, d = A(), _ = A(!1), $ = A(""), v = A(""), w = {
561
561
  "application/pdf": "PDF",
562
562
  "image/jpeg": "JPG",
563
563
  "image/jpg": "JPG",
@@ -568,7 +568,7 @@ const st = {
568
568
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
569
569
  "text/plain": "TXT",
570
570
  "text/csv": "CSV"
571
- }, A = {
571
+ }, V = {
572
572
  pdf: ["application/pdf"],
573
573
  jpg: ["image/jpeg", "image/jpg"],
574
574
  jpeg: ["image/jpeg", "image/jpg"],
@@ -579,153 +579,159 @@ const st = {
579
579
  xlsx: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
580
580
  txt: ["text/plain"],
581
581
  csv: ["text/csv"]
582
- }, _ = V(
583
- () => [...new Set(e.allowedTypes.map((v) => {
584
- var o;
585
- return x[v] || ((o = v.split("/")[1]) == null ? void 0 : o.toUpperCase()) || v;
582
+ }, C = I(
583
+ () => [...new Set(e.allowedTypes.map((b) => {
584
+ var i;
585
+ return w[b] || ((i = b.split("/")[1]) == null ? void 0 : i.toUpperCase()) || b;
586
586
  }))].join(", ")
587
- ), O = V(() => Math.round(e.maxSize / (1024 * 1024))), S = V(() => e.disabled || $.value), C = V(() => String(e.viewApiBase ?? "").trim().replace(/\/$/, "")), F = V(() => {
588
- const v = String(e.viewStoragePath ?? "").trim();
589
- return v || String(e.modelValue ?? "").trim();
590
- }), G = V(() => {
591
- const v = F.value;
592
- if (!v || !e.uploadToServer) return "#";
593
- const o = encodeURIComponent(v), i = C.value;
594
- return i ? `${i}/api/files/view?path=${o}` : le.view(v);
587
+ ), U = I(() => Math.round(e.maxSize / (1024 * 1024))), x = I(() => e.disabled || _.value), S = I(() => String(e.viewApiBase ?? "").trim().replace(/\/$/, "")), B = I(() => {
588
+ const b = String(e.viewStoragePath ?? "").trim();
589
+ return b || String(e.modelValue ?? "").trim();
590
+ }), G = I(() => {
591
+ const b = B.value;
592
+ if (!b || !e.uploadToServer) return "#";
593
+ const i = encodeURIComponent(b), s = S.value;
594
+ return s ? `${s}/api/files/view?path=${i}` : le.view(b);
595
595
  });
596
- function y(v) {
597
- var o;
598
- if (u.value = "", v.size > e.maxSize) {
599
- const i = `File size must be less than ${O.value}MB`;
600
- return u.value = i, f("validation-error", i), !1;
596
+ function N(b) {
597
+ var i;
598
+ if (v.value = "", b.size > e.maxSize) {
599
+ const s = `File size must be less than ${U.value}MB`;
600
+ return v.value = s, g("validation-error", s), !1;
601
601
  }
602
602
  if (e.allowedTypes.length) {
603
- const i = ((o = v.name.split(".").pop()) == null ? void 0 : o.toLowerCase()) || "";
604
- if (!(e.allowedTypes.includes(v.type) || (A[i] || []).some((g) => e.allowedTypes.includes(g)))) {
605
- const g = `Only ${_.value} files are allowed`;
606
- return u.value = g, f("validation-error", g), !1;
603
+ const s = ((i = b.name.split(".").pop()) == null ? void 0 : i.toLowerCase()) || "";
604
+ if (!(e.allowedTypes.includes(b.type) || (V[s] || []).some((y) => e.allowedTypes.includes(y)))) {
605
+ const y = `Only ${C.value} files are allowed`;
606
+ return v.value = y, g("validation-error", y), !1;
607
607
  }
608
608
  }
609
609
  return !0;
610
610
  }
611
- async function h(v) {
612
- var b, g, D, T;
613
- u.value = "";
614
- const o = v.target, i = (b = o.files) == null ? void 0 : b[0];
615
- if (!i) {
616
- B.value = "", f("update:modelValue", "");
611
+ async function k(b) {
612
+ var c, y, j, P;
613
+ v.value = "";
614
+ const i = b.target, s = (c = i.files) == null ? void 0 : c[0];
615
+ if (!s) {
616
+ $.value = "", g("update:modelValue", "");
617
617
  return;
618
618
  }
619
- if (!y(i)) {
620
- o.value = "", B.value = "", f("update:modelValue", "");
619
+ if (!N(s)) {
620
+ i.value = "", $.value = "", g("update:modelValue", "");
621
621
  return;
622
622
  }
623
623
  if (e.uploadToServer && e.post) {
624
- $.value = !0;
625
- const N = e.uploadUrl ?? le.upload(), K = new FormData();
626
- K.append("file", i), K.append("folder", "documents"), e.uploadContext && K.append("context", e.uploadContext);
624
+ _.value = !0;
625
+ const K = e.uploadUrl ?? le.upload(), X = new FormData();
626
+ X.append("file", s), X.append("folder", "documents"), e.uploadContext && X.append("context", e.uploadContext);
627
627
  try {
628
- const L = await e.post(N, K, { headers: { "Content-Type": "multipart/form-data" } }), U = L == null ? void 0 : L.data;
629
- if (U != null && U.success && (U != null && U.path))
630
- B.value = i.name, U.url && console.log("[FileInput] S3 URL:", U.url), f("update:modelValue", U.path), f("validation-success", "File uploaded successfully"), f("uploaded", U.path), (g = e.afterUpload) == null || g.call(e, U.path);
628
+ const L = await e.post(K, X, { headers: { "Content-Type": "multipart/form-data" } }), E = L == null ? void 0 : L.data;
629
+ if (E != null && E.success && (E != null && E.path))
630
+ $.value = s.name, E.url && console.log("[FileInput] S3 URL:", E.url), g("update:modelValue", E.path), g("validation-success", "File uploaded successfully"), g("uploaded", E.path), (y = e.afterUpload) == null || y.call(e, E.path);
631
631
  else {
632
- const ae = (U == null ? void 0 : U.message) ?? "Upload failed";
633
- u.value = ae, f("validation-error", ae), o.value = "", B.value = "", f("update:modelValue", "");
632
+ const H = (E == null ? void 0 : E.message) ?? "Upload failed";
633
+ v.value = H, g("validation-error", H), i.value = "", $.value = "", g("update:modelValue", "");
634
634
  }
635
635
  } catch (L) {
636
- const U = ((T = (D = L == null ? void 0 : L.response) == null ? void 0 : D.data) == null ? void 0 : T.message) ?? (L == null ? void 0 : L.message) ?? "Upload failed";
637
- u.value = U, f("validation-error", U), o.value = "", B.value = "", f("update:modelValue", "");
636
+ const E = ((P = (j = L == null ? void 0 : L.response) == null ? void 0 : j.data) == null ? void 0 : P.message) ?? (L == null ? void 0 : L.message) ?? "Upload failed";
637
+ v.value = E, g("validation-error", E), i.value = "", $.value = "", g("update:modelValue", "");
638
638
  } finally {
639
- $.value = !1;
639
+ _.value = !1;
640
640
  }
641
641
  } else
642
- B.value = i.name, f("update:modelValue", i.name), f("uploaded", i.name);
642
+ $.value = s.name, g("update:modelValue", s.name), g("uploaded", s.name);
643
643
  }
644
- function w() {
645
- !S.value && d.value && d.value.click();
644
+ function u() {
645
+ !x.value && d.value && d.value.click();
646
646
  }
647
- return de(() => e.modelValue, (v) => {
648
- B.value = (typeof v == "string" && v ? v.split("/").pop() : "") || "";
649
- }, { immediate: !0 }), (v, o) => (c(), p("div", vt, [
647
+ return de(() => e.modelValue, (b) => {
648
+ $.value = (typeof b == "string" && b ? b.split("/").pop() : "") || "";
649
+ }, { immediate: !0 }), (b, i) => (p(), m("div", gt, [
650
650
  l("input", {
651
651
  ref_key: "fileInput",
652
652
  ref: d,
653
653
  type: "file",
654
654
  accept: n.accept,
655
- disabled: S.value,
655
+ disabled: x.value,
656
656
  id: n.id,
657
657
  class: "hidden",
658
- onChange: h
659
- }, null, 40, bt),
658
+ onChange: k
659
+ }, null, 40, yt),
660
660
  l("div", {
661
- class: X([
661
+ class: R([
662
662
  "flex w-full items-center justify-between rounded-md border border-gray-300 bg-white px-3 py-2 transition-colors",
663
- S.value ? "cursor-not-allowed opacity-50" : "cursor-pointer hover:bg-gray-50",
664
- u.value ? "border-red-500" : ""
663
+ x.value ? "cursor-not-allowed opacity-50" : "cursor-pointer hover:bg-gray-50",
664
+ v.value ? "border-red-500" : ""
665
665
  ]),
666
- onClick: w
666
+ onClick: u
667
667
  }, [
668
- l("span", gt, M($.value ? "Uploading..." : B.value || n.placeholder), 1),
669
- o[0] || (o[0] = l("span", { class: "text-gray-400" }, "📎", -1))
668
+ l("span", ht, T(_.value ? "Uploading..." : $.value || n.placeholder), 1),
669
+ i[0] || (i[0] = l("span", { class: "text-gray-400" }, "📎", -1))
670
670
  ], 2),
671
- u.value ? (c(), p("p", yt, M(u.value), 1)) : P("", !0),
672
- n.showRequirements ? (c(), p("p", ht, "Max " + M(O.value) + " MB. Allowed: " + M(_.value) + ".", 1)) : P("", !0),
673
- F.value && !$.value && n.uploadToServer ? (c(), p("a", {
671
+ v.value ? (p(), m("p", kt, T(v.value), 1)) : O("", !0),
672
+ n.showRequirements ? (p(), m("p", xt, "Max " + T(U.value) + " MB. Allowed: " + T(C.value) + ".", 1)) : O("", !0),
673
+ B.value && !_.value && n.uploadToServer ? (p(), m("a", {
674
674
  key: 2,
675
675
  href: G.value,
676
676
  target: "_blank",
677
677
  rel: "noopener noreferrer",
678
678
  class: "text-sm text-blue-600 hover:underline"
679
- }, " View document >>> ", 8, kt)) : P("", !0)
679
+ }, " View document >>> ", 8, wt)) : O("", !0)
680
680
  ]));
681
681
  }
682
- }), wt = ["disabled"], _t = { class: "px-4 pb-4 md:px-6 md:pb-6" }, St = { class: "mb-6 rounded-lg border border-blue-200 bg-blue-50 p-4 text-sm" }, $t = { class: "text-blue-900" }, Bt = {
682
+ }), St = ["disabled"], $t = { class: "px-4 pb-4 md:px-6 md:pb-6" }, Bt = { class: "mb-6 rounded-lg border border-blue-200 bg-blue-50 p-4 text-sm" }, Ct = { class: "text-blue-900" }, At = {
683
683
  key: 0,
684
684
  class: "mt-3 rounded-md bg-white/80 border border-blue-100 p-3"
685
- }, Ct = { class: "list-inside list-disc space-y-0.5 text-xs text-blue-800 columns-2 gap-x-4" }, At = {
685
+ }, It = { class: "list-inside list-disc space-y-0.5 text-xs text-blue-800 columns-2 gap-x-4" }, Vt = {
686
686
  key: 1,
687
687
  class: "mt-2 text-xs text-blue-700"
688
- }, It = {
688
+ }, Ut = {
689
+ key: 2,
690
+ class: "mt-2 text-xs text-red-700"
691
+ }, Pt = {
692
+ key: 3,
693
+ class: "mt-2 text-xs text-blue-700"
694
+ }, Et = {
689
695
  key: 0,
690
696
  class: "flex items-center justify-center py-10"
691
- }, Vt = {
697
+ }, Ot = {
692
698
  key: 0,
693
699
  class: "flex overflow-x-auto pb-2 gap-1 -mx-1"
694
- }, Ut = ["onClick"], Pt = { class: "flex items-center justify-between gap-4" }, Ot = { class: "border-b-2 border-primary pb-1 text-base font-semibold text-slate-900" }, Et = ["disabled", "onClick"], Ft = { class: "grid grid-cols-1 gap-4 md:grid-cols-3" }, Dt = ["onUpdate:modelValue", "onBlur"], Tt = ["value"], jt = {
700
+ }, Ft = ["onClick"], Dt = { class: "flex items-center justify-between gap-4" }, Tt = { class: "border-b-2 border-primary pb-1 text-base font-semibold text-slate-900" }, jt = ["disabled", "onClick"], Mt = { class: "grid grid-cols-1 gap-4 md:grid-cols-3" }, Lt = ["onUpdate:modelValue", "onBlur"], zt = ["value"], Rt = {
695
701
  key: 0,
696
702
  class: "mt-1.5 flex flex-wrap items-center gap-2 text-xs"
697
- }, Mt = {
703
+ }, Nt = {
698
704
  key: 0,
699
705
  class: "text-blue-600"
700
- }, Lt = {
706
+ }, Kt = {
701
707
  key: 1,
702
708
  class: "text-green-600"
703
- }, zt = {
709
+ }, Xt = {
704
710
  key: 2,
705
711
  class: "flex items-center gap-1"
706
- }, Rt = { class: "text-red-600" }, Nt = ["onClick"], Kt = {
712
+ }, Wt = { class: "text-red-600" }, Gt = ["onClick"], Ht = {
707
713
  key: 0,
708
714
  class: "boi-emts-wrapper"
709
- }, Xt = {
715
+ }, Jt = {
710
716
  key: 0,
711
717
  class: "mt-3 text-sm font-medium text-green-800"
712
- }, Wt = {
718
+ }, Qt = {
713
719
  key: 1,
714
720
  class: "rounded-lg border border-gray-200 bg-white p-4"
715
- }, Gt = { class: "rounded-lg py-3" }, Ht = { class: "flex items-center gap-2" }, Jt = {
721
+ }, qt = { class: "rounded-lg py-3" }, Yt = { class: "flex items-center gap-2" }, Zt = {
716
722
  key: 0,
717
723
  class: "inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent",
718
724
  "aria-hidden": "true"
719
- }, Qt = {
725
+ }, ea = {
720
726
  key: 0,
721
727
  class: "mt-1.5 text-sm text-amber-700"
722
- }, qt = {
728
+ }, ta = {
723
729
  key: 1,
724
730
  class: "mt-1.5 text-sm text-red-600"
725
- }, Yt = {
731
+ }, aa = {
726
732
  key: 2,
727
733
  class: "rounded-lg border border-red-200 bg-red-50 p-4 flex items-start gap-3"
728
- }, Zt = { class: "flex-1 text-sm text-red-800" }, ea = { class: "flex justify-center" }, na = /* @__PURE__ */ q({
734
+ }, na = { class: "flex-1 text-sm text-red-800" }, oa = { class: "flex justify-center" }, la = /* @__PURE__ */ Y({
729
735
  __name: "BankStatementIntegration",
730
736
  props: {
731
737
  applicationId: {},
@@ -743,84 +749,89 @@ const st = {
743
749
  pollEdocStatus: { type: Boolean, default: !0 }
744
750
  },
745
751
  emits: ["error"],
746
- setup(n, { emit: k }) {
747
- const e = n, f = k;
752
+ setup(n, { emit: h }) {
753
+ const e = n, g = h;
748
754
  function d(t) {
749
755
  const a = (e.integrationBaseUrl ?? "").replace(/\/$/, "");
750
756
  if (!a) return t;
751
- const s = t.startsWith("/") ? t : `/${t}`;
752
- return `${a}${s}`;
757
+ const o = t.startsWith("/") ? t : `/${t}`;
758
+ return `${a}${o}`;
753
759
  }
754
- const { edocBanks: $, loadBanksForStatement: B } = at({
760
+ const {
761
+ edocBanks: _,
762
+ loadBanksForStatement: $,
763
+ loading: v,
764
+ error: w
765
+ } = ot({
755
766
  get: e.api.get,
756
- getBanksUrl: () => d(Q.getBanks())
767
+ getBanksUrl: () => d(q.getBanks())
757
768
  }), {
758
- handleAccountVerification: u,
759
- retryVerification: x,
760
- getVerificationState: A
761
- } = nt(() => e.verifyBankAccount), _ = I(0), O = I(""), S = I(!1), C = I(null);
762
- function F() {
769
+ handleAccountVerification: V,
770
+ retryVerification: C,
771
+ getVerificationState: U
772
+ } = st(() => e.verifyBankAccount), x = A(0), S = A(""), B = A(!1), G = A(null);
773
+ function N() {
763
774
  var t;
764
775
  (t = e.blockAutoSave) == null || t.call(e);
765
776
  }
766
- function G() {
777
+ function k() {
767
778
  setTimeout(() => {
768
779
  var a;
769
- const t = C.value;
780
+ const t = G.value;
770
781
  t && !t.contains(document.activeElement) && ((a = e.unblockAutoSave) == null || a.call(e));
771
782
  }, 0);
772
783
  }
773
- const y = I([]), h = I(!1);
774
- let w = null;
775
- const v = V(
784
+ const u = A([]), b = A(!1);
785
+ let i = null;
786
+ const s = I(
776
787
  () => {
777
788
  var t, a;
778
789
  return ((t = e.integrationBaseUrl) == null ? void 0 : t.replace(/\/$/, "")) || ((a = e.baseUrl) == null ? void 0 : a.replace(/\/$/, "")) || "";
779
790
  }
780
- ), o = V(
781
- () => e.applicationId ? st.urls(e.applicationId, v.value) : null
782
- ), i = V(
791
+ ), c = I(
792
+ () => e.applicationId ? lt.urls(e.applicationId, s.value) : null
793
+ ), y = I(
783
794
  () => e.integrationBaseUrl ? d(le.upload()) : void 0
784
- ), b = V(() => (e.integrationBaseUrl ?? "").trim().replace(/\/$/, "")), g = V(
785
- () => y.value.slice(0, e.maxAccounts)
786
- ), D = V(() => y.value.length < e.maxAccounts), T = V(() => y.value.length > 0), N = V(() => {
795
+ ), j = I(() => (e.integrationBaseUrl ?? "").trim().replace(/\/$/, "")), P = I(
796
+ () => u.value.slice(0, e.maxAccounts)
797
+ ), K = I(() => u.value.length < e.maxAccounts), X = I(() => u.value.length > 0), L = I(() => {
787
798
  var t;
788
799
  return ((t = e.formData) == null ? void 0 : t.email) ?? "";
789
800
  });
790
- function K() {
791
- var s, m;
792
- const t = (s = e.formData) == null ? void 0 : s.industrial_sector_id;
801
+ function E() {
802
+ var o, f;
803
+ const t = (o = e.formData) == null ? void 0 : o.industrial_sector_id;
793
804
  if (t == null) return;
794
- const a = (m = e.industrialSectorOptions) == null ? void 0 : m.find(
805
+ const a = (f = e.industrialSectorOptions) == null ? void 0 : f.find(
795
806
  (r) => r.value === t || r.id === t || r.value === String(t)
796
807
  );
797
808
  return (a == null ? void 0 : a.label) ?? (a == null ? void 0 : a.name);
798
809
  }
799
- function L(t) {
810
+ function H(t) {
800
811
  if (t == null || t === "") return !1;
801
812
  const a = t.trim().toLowerCase();
802
813
  return a.includes("edoc/statements/") && a.endsWith(".csv");
803
814
  }
804
- function U(t) {
815
+ function ue(t) {
805
816
  const a = (t ?? "").trim();
806
- return !a || L(a) ? "" : a;
817
+ return !a || H(a) ? "" : a;
807
818
  }
808
- function ae(t) {
809
- var m, r;
810
- const a = (m = t.uploaded_statement_path) == null ? void 0 : m.trim();
819
+ function we(t) {
820
+ var f, r;
821
+ const a = (f = t.uploaded_statement_path) == null ? void 0 : f.trim();
811
822
  if (a) return a;
812
- const s = ((r = t.bank_statement) == null ? void 0 : r.trim()) ?? "";
813
- return s && !L(s) ? s : "";
823
+ const o = ((r = t.bank_statement) == null ? void 0 : r.trim()) ?? "";
824
+ return o && !H(o) ? o : "";
814
825
  }
815
- function xe(t, a) {
816
- t.uploaded_statement_path = a.trim(), Z(t);
826
+ function _e(t, a) {
827
+ t.uploaded_statement_path = a.trim(), ee(t);
817
828
  }
818
- function ue(t, a) {
829
+ function ce(t, a) {
819
830
  var r;
820
- const s = ((r = e.bankOptions.find((E) => E.value === t.bank)) == null ? void 0 : r.label) ?? "", m = t.account_number ?? "";
821
- return s && m ? `${s} (${m})` : s || (m ? `Account (${m})` : `Account ${a + 1}`);
831
+ const o = ((r = e.bankOptions.find((F) => F.value === t.bank)) == null ? void 0 : r.label) ?? "", f = t.account_number ?? "";
832
+ return o && f ? `${o} (${f})` : o || (f ? `Account (${f})` : `Account ${a + 1}`);
822
833
  }
823
- function we(t) {
834
+ function Se(t) {
824
835
  const a = {
825
836
  pending: "bg-gray-100 text-gray-800",
826
837
  processing: "bg-amber-100 text-amber-800",
@@ -829,72 +840,72 @@ const st = {
829
840
  };
830
841
  return a[t] ?? a.pending;
831
842
  }
832
- async function _e() {
833
- if (o.value)
843
+ async function $e() {
844
+ if (c.value)
834
845
  try {
835
- h.value = !0;
836
- const t = await e.api.get(o.value.index), a = t == null ? void 0 : t.data;
837
- a != null && a.success && Array.isArray(a.data) && (y.value = a.data.map((s) => ({
838
- ...s,
846
+ b.value = !0;
847
+ const t = await e.api.get(c.value.index), a = t == null ? void 0 : t.data;
848
+ a != null && a.success && Array.isArray(a.data) && (u.value = a.data.map((o) => ({
849
+ ...o,
839
850
  otp: "",
840
851
  showOtpInput: !1,
841
- uploaded_statement_path: U(s.bank_statement)
852
+ uploaded_statement_path: ue(o.bank_statement)
842
853
  })));
843
854
  } catch (t) {
844
855
  console.error("Failed to load bank statements", t);
845
856
  } finally {
846
- h.value = !1;
857
+ b.value = !1;
847
858
  }
848
859
  }
849
- async function Se() {
850
- if (o.value)
860
+ async function Be() {
861
+ if (c.value)
851
862
  try {
852
- const t = await e.api.get(o.value.index), a = t == null ? void 0 : t.data;
863
+ const t = await e.api.get(c.value.index), a = t == null ? void 0 : t.data;
853
864
  if (!(a != null && a.success) || !Array.isArray(a.data)) return;
854
- const s = ["edoc_status", "consent_id", "csv_url", "statement_generated"];
855
- y.value = y.value.map((m) => {
856
- const r = a.data.find((j) => j.id === m.id);
857
- if (!r) return m;
858
- const E = {};
859
- for (const j of s)
860
- j in r && (E[j] = r[j]);
861
- let R = m.uploaded_statement_path ?? "";
865
+ const o = ["edoc_status", "consent_id", "csv_url", "statement_generated"];
866
+ u.value = u.value.map((f) => {
867
+ const r = a.data.find((D) => D.id === f.id);
868
+ if (!r) return f;
869
+ const F = {};
870
+ for (const D of o)
871
+ D in r && (F[D] = r[D]);
872
+ let z = f.uploaded_statement_path ?? "";
862
873
  if ("bank_statement" in r && r.bank_statement !== void 0) {
863
- const j = String(r.bank_statement ?? "");
864
- E.bank_statement = r.bank_statement, j && !L(j) ? R = j : j && L(j) && R || j || (R = "");
874
+ const D = String(r.bank_statement ?? "");
875
+ F.bank_statement = r.bank_statement, D && !H(D) ? z = D : D && H(D) && z || D || (z = "");
865
876
  }
866
- return E.uploaded_statement_path = R, { ...m, ...E };
877
+ return F.uploaded_statement_path = z, { ...f, ...F };
867
878
  });
868
879
  } catch (t) {
869
880
  console.error("Sync statements failed", t);
870
881
  }
871
882
  }
872
- function ce() {
873
- Y(), w = setInterval(() => {
874
- if (!y.value.some((a) => a.edoc_status === "processing")) {
875
- Y();
883
+ function pe() {
884
+ Z(), i = setInterval(() => {
885
+ if (!u.value.some((a) => a.edoc_status === "processing")) {
886
+ Z();
876
887
  return;
877
888
  }
878
- Se();
889
+ Be();
879
890
  }, 5e3);
880
891
  }
881
- function Y() {
882
- w && (clearInterval(w), w = null);
892
+ function Z() {
893
+ i && (clearInterval(i), i = null);
883
894
  }
884
895
  de(
885
- () => y.value.some((t) => t.edoc_status === "processing"),
896
+ () => u.value.some((t) => t.edoc_status === "processing"),
886
897
  (t) => {
887
898
  if (!e.pollEdocStatus) {
888
- Y();
899
+ Z();
889
900
  return;
890
901
  }
891
- t ? ce() : Y();
902
+ t ? pe() : Z();
892
903
  }
893
904
  );
894
- async function Z(t) {
895
- if (!(!o.value || t.id < 0))
905
+ async function ee(t) {
906
+ if (!(!c.value || t.id < 0))
896
907
  try {
897
- await e.api.put(o.value.update(t.id), {
908
+ await e.api.put(c.value.update(t.id), {
898
909
  bank: t.bank,
899
910
  account_number: t.account_number,
900
911
  account_name: t.account_name,
@@ -907,8 +918,8 @@ const st = {
907
918
  console.error("Failed to save bank statement", a);
908
919
  }
909
920
  }
910
- async function $e() {
911
- if (!o.value || !D.value) return;
921
+ async function Ce() {
922
+ if (!c.value || !K.value) return;
912
923
  const t = -Date.now(), a = {
913
924
  id: t,
914
925
  loan_application_id: Number(e.applicationId),
@@ -917,7 +928,7 @@ const st = {
917
928
  account_name: "",
918
929
  account_type: "",
919
930
  bvn: "",
920
- email: N.value,
931
+ email: L.value,
921
932
  bank_statement: "",
922
933
  csv_url: "",
923
934
  consent_id: "",
@@ -927,144 +938,148 @@ const st = {
927
938
  showOtpInput: !1,
928
939
  uploaded_statement_path: ""
929
940
  };
930
- y.value.push(a), _.value = y.value.length - 1;
941
+ u.value.push(a), x.value = u.value.length - 1;
931
942
  try {
932
- const s = await e.api.post(o.value.store, { email: N.value }), m = s == null ? void 0 : s.data;
933
- if (m != null && m.success && m.data) {
934
- const r = y.value.findIndex((E) => E.id === t);
935
- r !== -1 && (y.value[r] = {
936
- ...m.data,
943
+ const o = await e.api.post(c.value.store, { email: L.value }), f = o == null ? void 0 : o.data;
944
+ if (f != null && f.success && f.data) {
945
+ const r = u.value.findIndex((F) => F.id === t);
946
+ r !== -1 && (u.value[r] = {
947
+ ...f.data,
937
948
  otp: "",
938
949
  showOtpInput: !1,
939
- uploaded_statement_path: U(m.data.bank_statement)
950
+ uploaded_statement_path: ue(f.data.bank_statement)
940
951
  });
941
952
  } else
942
- y.value = y.value.filter((r) => r.id !== t), _.value = Math.max(0, y.value.length - 1);
943
- } catch (s) {
944
- y.value = y.value.filter((m) => m.id !== t), _.value = Math.max(0, y.value.length - 1), f("error", (s == null ? void 0 : s.message) ?? "Failed to add account");
953
+ u.value = u.value.filter((r) => r.id !== t), x.value = Math.max(0, u.value.length - 1);
954
+ } catch (o) {
955
+ u.value = u.value.filter((f) => f.id !== t), x.value = Math.max(0, u.value.length - 1), g("error", (o == null ? void 0 : o.message) ?? "Failed to add account");
945
956
  }
946
957
  }
947
- async function Be(t) {
948
- if (!o.value) return;
949
- const a = y.value.findIndex((r) => r.id === t.id), s = { ...t }, m = t.id < 0;
950
- if (y.value = y.value.filter((r) => r.id !== t.id), _.value = Math.min(_.value, Math.max(0, y.value.length - 1)), !m)
958
+ async function Ae(t) {
959
+ if (!c.value) return;
960
+ const a = u.value.findIndex((r) => r.id === t.id), o = { ...t }, f = t.id < 0;
961
+ if (u.value = u.value.filter((r) => r.id !== t.id), x.value = Math.min(x.value, Math.max(0, u.value.length - 1)), !f)
951
962
  try {
952
- await e.api.delete(o.value.destroy(t.id));
963
+ await e.api.delete(c.value.destroy(t.id));
953
964
  } catch (r) {
954
- y.value = y.value.slice(0, a).concat(s, y.value.slice(a)), f("error", (r == null ? void 0 : r.message) ?? "Failed to remove account");
965
+ u.value = u.value.slice(0, a).concat(o, u.value.slice(a)), g("error", (r == null ? void 0 : r.message) ?? "Failed to remove account");
955
966
  }
956
967
  }
957
- function Ce(t, a) {
958
- t.consent_id = a, t.showOtpInput = !0, Z(t);
968
+ function Ie(t, a) {
969
+ t.consent_id = a, t.showOtpInput = !0, ee(t);
959
970
  }
960
- function Ae(t, a) {
961
- Object.assign(t, a), Z(t);
971
+ function Ve(t, a) {
972
+ Object.assign(t, a), ee(t);
962
973
  }
963
- function Ie(t) {
964
- O.value = t, f("error", t);
974
+ function Ue(t) {
975
+ S.value = t, g("error", t);
965
976
  }
966
- function Ve() {
967
- O.value = "";
977
+ function Pe() {
978
+ S.value = "";
968
979
  }
969
- function pe(t) {
980
+ function me(t) {
970
981
  return (a) => {
971
982
  var r;
972
- if (!o.value) return;
983
+ if (!c.value) return;
973
984
  (r = e.blockAutoSave) == null || r.call(e), t.edoc_status = "processing";
974
- const s = K(), m = () => {
985
+ const o = E(), f = () => {
975
986
  setTimeout(() => {
976
- var E;
977
- return (E = e.unblockAutoSave) == null ? void 0 : E.call(e);
987
+ var F;
988
+ return (F = e.unblockAutoSave) == null ? void 0 : F.call(e);
978
989
  }, 3e3);
979
990
  };
980
- e.api.post(o.value.uploadToEdoc(t.id), { filePath: a, industrialSector: s }).then((E) => {
981
- var j;
982
- const R = (j = E == null ? void 0 : E.data) == null ? void 0 : j.data;
983
- if (R) {
984
- const fe = t.uploaded_statement_path ?? "";
985
- Object.assign(t, R), fe && R.bank_statement && L(String(R.bank_statement)) && (t.uploaded_statement_path = fe);
991
+ e.api.post(c.value.uploadToEdoc(t.id), { filePath: a, industrialSector: o }).then((F) => {
992
+ var D;
993
+ const z = (D = F == null ? void 0 : F.data) == null ? void 0 : D.data;
994
+ if (z) {
995
+ const ve = t.uploaded_statement_path ?? "";
996
+ Object.assign(t, z), ve && z.bank_statement && H(String(z.bank_statement)) && (t.uploaded_statement_path = ve);
986
997
  }
987
- ce();
998
+ pe();
988
999
  }).catch(() => {
989
1000
  t.edoc_status = "failed";
990
- }).finally(m);
1001
+ }).finally(f);
991
1002
  };
992
1003
  }
993
- const me = (t) => {
994
- if (!t || !$.value.length) return !1;
995
- const a = e.bankOptions.find((m) => m.value === t), s = [(a == null ? void 0 : a.label) ?? "", ...(a == null ? void 0 : a.searchKeywords) ?? []].filter(Boolean);
996
- return $.value.some((m) => {
997
- const r = m.bankCode === t || m.code === t, E = s.some((R) => {
998
- var j;
999
- return (j = m.name) == null ? void 0 : j.toLowerCase().includes(R.toLowerCase());
1004
+ const fe = (t) => {
1005
+ if (!t || !_.value.length) return !1;
1006
+ const a = e.bankOptions.find((f) => f.value === t), o = [(a == null ? void 0 : a.label) ?? "", ...(a == null ? void 0 : a.searchKeywords) ?? []].filter(Boolean);
1007
+ return _.value.some((f) => {
1008
+ const r = f.bankCode === t || f.code === t, F = o.some((z) => {
1009
+ var D;
1010
+ return (D = f.name) == null ? void 0 : D.toLowerCase().includes(z.toLowerCase());
1000
1011
  });
1001
- return (r || E) && m.enabled !== !1;
1012
+ return (r || F) && f.enabled !== !1;
1002
1013
  });
1003
- }, se = V(
1004
- () => ($.value || []).filter((t) => t.enabled !== !1).map((t) => t.name || t.bankCode || "Unknown").sort((t, a) => t.localeCompare(a))
1014
+ }, se = I(
1015
+ () => (_.value || []).filter((t) => t.enabled !== !1).map((t) => t.name || t.bankCode || "Unknown").sort((t, a) => t.localeCompare(a))
1005
1016
  );
1006
- return he(async () => {
1007
- B(), e.applicationId && await _e();
1008
- }), ke(() => {
1009
- Y();
1010
- }), (t, a) => (c(), p("fieldset", {
1017
+ return ke(async () => {
1018
+ $(), e.applicationId && await $e();
1019
+ }), xe(() => {
1020
+ Z();
1021
+ }), (t, a) => (p(), m("fieldset", {
1011
1022
  ref_key: "rootRef",
1012
- ref: C,
1023
+ ref: G,
1013
1024
  disabled: n.isFormDisabled,
1014
1025
  class: "boi-bank-statement-integration rounded-xl border border-gray-200 bg-white shadow-sm",
1015
- onFocusin: F,
1016
- onFocusout: G
1026
+ onFocusin: N,
1027
+ onFocusout: k
1017
1028
  }, [
1018
- a[13] || (a[13] = l("div", { class: "border-b border-gray-100 px-4 py-3 md:px-6 md:py-4" }, [
1029
+ a[14] || (a[14] = l("div", { class: "border-b border-gray-100 px-4 py-3 md:px-6 md:py-4" }, [
1019
1030
  l("h2", { class: "text-lg font-bold text-slate-900" }, "Company Bank Statements")
1020
1031
  ], -1)),
1021
- l("div", _t, [
1022
- l("div", St, [
1023
- l("p", $t, [
1024
- a[1] || (a[1] = H(" Some banks support ", -1)),
1032
+ l("div", $t, [
1033
+ l("div", Bt, [
1034
+ l("p", Ct, [
1035
+ a[1] || (a[1] = W(" Some banks support ", -1)),
1025
1036
  a[2] || (a[2] = l("strong", null, "Electronic Bank Statement Retrieval", -1)),
1026
- a[3] || (a[3] = H(", so you may not need to upload a PDF. ", -1)),
1037
+ a[3] || (a[3] = W(", so you may not need to upload a PDF. ", -1)),
1027
1038
  l("button", {
1028
1039
  type: "button",
1029
- onClick: a[0] || (a[0] = (s) => S.value = !S.value),
1040
+ onClick: a[0] || (a[0] = (o) => B.value = !B.value),
1030
1041
  class: "ml-1 font-semibold text-blue-700 underline hover:text-blue-800 focus:outline-none focus:ring-2 focus:ring-blue-300 rounded"
1031
- }, M(S.value ? "Hide" : "See"), 1),
1032
- H(" " + M(S.value ? "" : " supported banks."), 1)
1042
+ }, T(B.value ? "Hide" : "See"), 1),
1043
+ W(" " + T(B.value ? "" : " supported banks."), 1)
1033
1044
  ]),
1034
- S.value && se.value.length ? (c(), p("div", Bt, [
1045
+ B.value && se.value.length ? (p(), m("div", At, [
1035
1046
  a[4] || (a[4] = l("p", { class: "mb-2 text-xs font-semibold text-blue-900" }, "Banks that support electronic statement retrieval:", -1)),
1036
- l("ul", Ct, [
1037
- (c(!0), p(W, null, te(se.value, (s, m) => (c(), p("li", { key: m }, M(s), 1))), 128))
1047
+ l("ul", It, [
1048
+ (p(!0), m(J, null, ae(se.value, (o, f) => (p(), m("li", { key: f }, T(o), 1))), 128))
1038
1049
  ])
1039
- ])) : S.value && !se.value.length ? (c(), p("p", At, " Loading supported banks… ")) : P("", !0)
1050
+ ])) : B.value && M(v) ? (p(), m("p", Vt, " Loading supported banks… ")) : B.value && M(w) ? (p(), m("p", Ut, [...a[5] || (a[5] = [
1051
+ W(" Could not load the EDOC bank list. Check boi-api / ", -1),
1052
+ l("code", { class: "rounded bg-red-50 px-0.5" }, "/api/boi-api", -1),
1053
+ W(" proxy and network errors. ", -1)
1054
+ ])])) : B.value && !se.value.length ? (p(), m("p", Pt, " No banks are returned for electronic retrieval (EDOC list is empty on the API). ")) : O("", !0)
1040
1055
  ]),
1041
- h.value ? (c(), p("div", It, [...a[5] || (a[5] = [
1056
+ b.value ? (p(), m("div", Et, [...a[6] || (a[6] = [
1042
1057
  l("span", {
1043
1058
  class: "inline-block h-5 w-5 animate-spin rounded-full border-2 border-slate-300 border-t-slate-600 mr-2",
1044
1059
  "aria-hidden": "true"
1045
1060
  }, null, -1),
1046
1061
  l("span", { class: "text-sm text-slate-600" }, "Loading bank statements…", -1)
1047
- ])])) : (c(), p(W, { key: 1 }, [
1048
- g.value.length ? (c(), p("div", Vt, [
1049
- (c(!0), p(W, null, te(g.value, (s, m) => (c(), p("button", {
1050
- key: s.id,
1062
+ ])])) : (p(), m(J, { key: 1 }, [
1063
+ P.value.length ? (p(), m("div", Ot, [
1064
+ (p(!0), m(J, null, ae(P.value, (o, f) => (p(), m("button", {
1065
+ key: o.id,
1051
1066
  type: "button",
1052
- class: X(["shrink-0 rounded-lg px-4 py-2 text-sm font-medium whitespace-nowrap transition-colors", _.value === m ? "bg-primary text-white shadow-sm" : "bg-slate-100 text-slate-700 hover:bg-slate-200"]),
1053
- onClick: (r) => _.value = m
1054
- }, M(ue(s, m)), 11, Ut))), 128))
1055
- ])) : P("", !0),
1056
- (c(!0), p(W, null, te(g.value, (s, m) => oe((c(), p("div", {
1057
- key: s.id,
1067
+ class: R(["shrink-0 rounded-lg px-4 py-2 text-sm font-medium whitespace-nowrap transition-colors", x.value === f ? "bg-primary text-white shadow-sm" : "bg-slate-100 text-slate-700 hover:bg-slate-200"]),
1068
+ onClick: (r) => x.value = f
1069
+ }, T(ce(o, f)), 11, Ft))), 128))
1070
+ ])) : O("", !0),
1071
+ (p(!0), m(J, null, ae(P.value, (o, f) => oe((p(), m("div", {
1072
+ key: o.id,
1058
1073
  class: "mt-6 space-y-6 rounded-xl border border-gray-100 bg-gray-50/50 p-4 md:p-6"
1059
1074
  }, [
1060
- l("div", Pt, [
1061
- l("h4", Ot, M(ue(s, m)), 1),
1075
+ l("div", Dt, [
1076
+ l("h4", Tt, T(ce(o, f)), 1),
1062
1077
  l("button", {
1063
1078
  type: "button",
1064
1079
  class: "inline-flex items-center rounded-lg px-3 py-2 text-sm font-medium text-red-600 hover:bg-red-50 disabled:opacity-50 transition-colors",
1065
- disabled: !T.value || n.isFormDisabled,
1066
- onClick: (r) => Be(s)
1067
- }, [...a[6] || (a[6] = [
1080
+ disabled: !X.value || n.isFormDisabled,
1081
+ onClick: (r) => Ae(o)
1082
+ }, [...a[7] || (a[7] = [
1068
1083
  l("svg", {
1069
1084
  class: "w-4 h-4 mr-1.5",
1070
1085
  fill: "none",
@@ -1078,142 +1093,142 @@ const st = {
1078
1093
  d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
1079
1094
  })
1080
1095
  ], -1),
1081
- H(" Remove account ", -1)
1082
- ])], 8, Et)
1096
+ W(" Remove account ", -1)
1097
+ ])], 8, jt)
1083
1098
  ]),
1084
1099
  ne(t.$slots, "account-fields", {
1085
- account: s,
1100
+ account: o,
1086
1101
  bankOptions: n.bankOptions,
1087
- verificationState: z(A)(s),
1088
- onVerify: () => z(u)(s),
1089
- onRetry: () => z(x)(s)
1102
+ verificationState: M(U)(o),
1103
+ onVerify: () => M(V)(o),
1104
+ onRetry: () => M(C)(o)
1090
1105
  }, () => [
1091
- l("div", Ft, [
1106
+ l("div", Mt, [
1092
1107
  l("div", null, [
1093
- a[7] || (a[7] = l("label", { class: "mb-1.5 block text-sm font-medium text-gray-700" }, "Bank", -1)),
1094
- ee(ft, {
1095
- "model-value": s.bank,
1108
+ a[8] || (a[8] = l("label", { class: "mb-1.5 block text-sm font-medium text-gray-700" }, "Bank", -1)),
1109
+ te(bt, {
1110
+ "model-value": o.bank,
1096
1111
  options: n.bankOptions,
1097
1112
  placeholder: "Select bank",
1098
1113
  disabled: !!n.isFormDisabled,
1099
1114
  "onUpdate:modelValue": (r) => {
1100
- s.bank = r, z(u)(s), Z(s);
1115
+ o.bank = r, M(V)(o), ee(o);
1101
1116
  }
1102
1117
  }, null, 8, ["model-value", "options", "disabled", "onUpdate:modelValue"])
1103
1118
  ]),
1104
1119
  l("div", null, [
1105
- a[8] || (a[8] = l("label", { class: "mb-1.5 block text-sm font-medium text-gray-700" }, "Account number", -1)),
1120
+ a[9] || (a[9] = l("label", { class: "mb-1.5 block text-sm font-medium text-gray-700" }, "Account number", -1)),
1106
1121
  oe(l("input", {
1107
- "onUpdate:modelValue": (r) => s.account_number = r,
1122
+ "onUpdate:modelValue": (r) => o.account_number = r,
1108
1123
  type: "text",
1109
1124
  maxlength: "10",
1110
1125
  inputmode: "numeric",
1111
1126
  class: "w-full rounded-lg border border-gray-300 bg-white px-3 py-2.5 text-sm focus:border-primary focus:ring-1 focus:ring-primary",
1112
1127
  placeholder: "10 digits",
1113
1128
  onBlur: (r) => {
1114
- z(u)(s), Z(s);
1129
+ M(V)(o), ee(o);
1115
1130
  }
1116
- }, null, 40, Dt), [
1117
- [re, s.account_number]
1131
+ }, null, 40, Lt), [
1132
+ [re, o.account_number]
1118
1133
  ])
1119
1134
  ]),
1120
1135
  l("div", null, [
1121
- a[9] || (a[9] = l("label", { class: "mb-1.5 block text-sm font-medium text-gray-700" }, "Account name", -1)),
1136
+ a[10] || (a[10] = l("label", { class: "mb-1.5 block text-sm font-medium text-gray-700" }, "Account name", -1)),
1122
1137
  l("input", {
1123
- value: s.account_name,
1138
+ value: o.account_name,
1124
1139
  type: "text",
1125
1140
  readonly: "",
1126
1141
  class: "w-full cursor-default rounded-lg border border-gray-200 bg-gray-50 px-3 py-2.5 text-sm text-gray-700",
1127
1142
  placeholder: "Enter bank and account number to verify"
1128
- }, null, 8, Tt),
1129
- n.verifyBankAccount ? (c(), p("div", jt, [
1130
- z(A)(s).isLoading ? (c(), p("span", Mt, "Verifying…")) : z(A)(s).isSuccess ? (c(), p("span", Lt, "Account verified")) : z(A)(s).isError ? (c(), p("span", zt, [
1131
- l("span", Rt, M(z(A)(s).errorMessage), 1),
1143
+ }, null, 8, zt),
1144
+ n.verifyBankAccount ? (p(), m("div", Rt, [
1145
+ M(U)(o).isLoading ? (p(), m("span", Nt, "Verifying…")) : M(U)(o).isSuccess ? (p(), m("span", Kt, "Account verified")) : M(U)(o).isError ? (p(), m("span", Xt, [
1146
+ l("span", Wt, T(M(U)(o).errorMessage), 1),
1132
1147
  l("button", {
1133
1148
  type: "button",
1134
1149
  class: "rounded px-2 py-0.5 text-gray-600 hover:bg-gray-100",
1135
- onClick: (r) => z(x)(s)
1136
- }, "Retry", 8, Nt)
1137
- ])) : P("", !0)
1138
- ])) : P("", !0)
1150
+ onClick: (r) => M(C)(o)
1151
+ }, "Retry", 8, Gt)
1152
+ ])) : O("", !0)
1153
+ ])) : O("", !0)
1139
1154
  ])
1140
1155
  ])
1141
1156
  ]),
1142
- me(s.bank) ? (c(), p("div", Kt, [
1143
- ee(et, {
1144
- account: s,
1145
- "edoc-banks": z($),
1157
+ fe(o.bank) ? (p(), m("div", Ht, [
1158
+ te(at, {
1159
+ account: o,
1160
+ "edoc-banks": M(_),
1146
1161
  "bank-options": n.bankOptions,
1147
1162
  api: { get: n.api.get, post: n.api.post },
1148
- "company-email": N.value,
1149
- "industrial-sector": K(),
1163
+ "company-email": L.value,
1164
+ "industrial-sector": E(),
1150
1165
  "application-id": n.applicationId,
1151
1166
  "integration-base-url": n.integrationBaseUrl,
1152
1167
  disabled: n.isFormDisabled,
1153
- "onUpdate:consentId": (r) => Ce(s, r),
1154
- onStatementRetrieved: (r) => Ae(s, r),
1155
- onError: Ie
1168
+ "onUpdate:consentId": (r) => Ie(o, r),
1169
+ onStatementRetrieved: (r) => Ve(o, r),
1170
+ onError: Ue
1156
1171
  }, null, 8, ["account", "edoc-banks", "bank-options", "api", "company-email", "industrial-sector", "application-id", "integration-base-url", "disabled", "onUpdate:consentId", "onStatementRetrieved"]),
1157
- s.statement_generated || s.edoc_status === "completed" ? (c(), p("p", Xt, " Succeeded. ")) : P("", !0)
1158
- ])) : P("", !0),
1159
- me(s.bank) ? P("", !0) : (c(), p("div", Wt, [
1160
- a[11] || (a[11] = l("p", { class: "mb-3 text-sm font-medium text-gray-700" }, "Upload bank statement (PDF)", -1)),
1172
+ o.statement_generated || o.edoc_status === "completed" ? (p(), m("p", Jt, " Succeeded. ")) : O("", !0)
1173
+ ])) : O("", !0),
1174
+ fe(o.bank) ? O("", !0) : (p(), m("div", Qt, [
1175
+ a[12] || (a[12] = l("p", { class: "mb-3 text-sm font-medium text-gray-700" }, "Upload bank statement (PDF)", -1)),
1161
1176
  ne(t.$slots, "file-upload", {
1162
- account: s,
1163
- afterUpload: pe(s)
1177
+ account: o,
1178
+ afterUpload: me(o)
1164
1179
  }, () => [
1165
- ee(xt, {
1166
- modelValue: s.bank_statement,
1167
- "onUpdate:modelValue": (r) => s.bank_statement = r,
1168
- "view-storage-path": ae(s),
1169
- post: (r, E, R) => n.api.post(r, E, R),
1170
- "upload-url": i.value,
1171
- "view-api-base": b.value || void 0,
1180
+ te(_t, {
1181
+ modelValue: o.bank_statement,
1182
+ "onUpdate:modelValue": (r) => o.bank_statement = r,
1183
+ "view-storage-path": we(o),
1184
+ post: (r, F, z) => n.api.post(r, F, z),
1185
+ "upload-url": y.value,
1186
+ "view-api-base": j.value || void 0,
1172
1187
  placeholder: "Choose 12 months bank statement (PDF)",
1173
1188
  accept: ".pdf",
1174
1189
  "max-size": 20 * 1024 * 1024,
1175
1190
  "allowed-types": ["application/pdf"],
1176
1191
  "upload-context": "bank_statement",
1177
- "after-upload": pe(s),
1192
+ "after-upload": me(o),
1178
1193
  disabled: n.isFormDisabled,
1179
- onUploaded: (r) => xe(s, String(r))
1194
+ onUploaded: (r) => _e(o, String(r))
1180
1195
  }, null, 8, ["modelValue", "onUpdate:modelValue", "view-storage-path", "post", "upload-url", "view-api-base", "after-upload", "disabled", "onUploaded"]),
1181
- l("div", Gt, [
1182
- l("div", Ht, [
1183
- a[10] || (a[10] = l("span", { class: "text-sm font-medium text-gray-600" }, "Bank statement status:", -1)),
1196
+ l("div", qt, [
1197
+ l("div", Yt, [
1198
+ a[11] || (a[11] = l("span", { class: "text-sm font-medium text-gray-600" }, "Bank statement status:", -1)),
1184
1199
  l("span", {
1185
- class: X([we(s.edoc_status || "pending"), "inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium capitalize"])
1200
+ class: R([Se(o.edoc_status || "pending"), "inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium capitalize"])
1186
1201
  }, [
1187
- s.edoc_status === "processing" ? (c(), p("span", Jt)) : P("", !0),
1188
- H(" " + M(s.edoc_status || "pending"), 1)
1202
+ o.edoc_status === "processing" ? (p(), m("span", Zt)) : O("", !0),
1203
+ W(" " + T(o.edoc_status || "pending"), 1)
1189
1204
  ], 2)
1190
1205
  ]),
1191
- s.edoc_status === "processing" ? (c(), p("p", Qt, " Processing in progress. Please wait… ")) : P("", !0),
1192
- s.edoc_status === "failed" ? (c(), p("p", qt, " Processing failed. Please re-upload a valid bank statement or try another method. ")) : P("", !0)
1206
+ o.edoc_status === "processing" ? (p(), m("p", ea, " Processing in progress. Please wait… ")) : O("", !0),
1207
+ o.edoc_status === "failed" ? (p(), m("p", ta, " Processing failed. Please re-upload a valid bank statement or try another method. ")) : O("", !0)
1193
1208
  ])
1194
1209
  ])
1195
1210
  ])),
1196
- O.value ? (c(), p("div", Yt, [
1197
- l("p", Zt, M(O.value), 1),
1211
+ S.value ? (p(), m("div", aa, [
1212
+ l("p", na, T(S.value), 1),
1198
1213
  l("button", {
1199
1214
  type: "button",
1200
1215
  class: "shrink-0 rounded p-1 text-red-600 hover:bg-red-100",
1201
- onClick: Ve,
1216
+ onClick: Pe,
1202
1217
  "aria-label": "Dismiss"
1203
1218
  }, "×")
1204
- ])) : P("", !0)
1219
+ ])) : O("", !0)
1205
1220
  ])), [
1206
- [Pe, _.value === m]
1221
+ [Oe, x.value === f]
1207
1222
  ])), 128)),
1208
- l("div", ea, [
1209
- ee(Re, {
1223
+ l("div", oa, [
1224
+ te(Ke, {
1210
1225
  type: "button",
1211
1226
  variant: "default",
1212
1227
  size: "lg",
1213
- disabled: !D.value || n.isFormDisabled || !n.applicationId,
1214
- onClick: $e
1228
+ disabled: !K.value || n.isFormDisabled || !n.applicationId,
1229
+ onClick: Ce
1215
1230
  }, {
1216
- default: Oe(() => [...a[12] || (a[12] = [
1231
+ default: Fe(() => [...a[13] || (a[13] = [
1217
1232
  l("svg", {
1218
1233
  class: "w-4 h-4",
1219
1234
  fill: "none",
@@ -1227,35 +1242,35 @@ const st = {
1227
1242
  d: "M12 4v16m8-8H4"
1228
1243
  })
1229
1244
  ], -1),
1230
- H(" Add account ", -1)
1245
+ W(" Add account ", -1)
1231
1246
  ])]),
1232
1247
  _: 1
1233
1248
  }, 8, ["disabled"])
1234
1249
  ])
1235
1250
  ], 64))
1236
1251
  ])
1237
- ], 40, wt));
1252
+ ], 40, St));
1238
1253
  }
1239
1254
  });
1240
- function ta(n) {
1255
+ function sa(n) {
1241
1256
  }
1242
- const oa = {
1243
- install: ta
1257
+ const ra = {
1258
+ install: sa
1244
1259
  };
1245
1260
  export {
1246
- ft as BankSelect,
1247
- na as BankStatementIntegration,
1248
- De as BoiButton,
1249
- Re as Button,
1250
- et as EmtsIntegration,
1251
- xt as FileInput,
1252
- st as bankStatementsApi,
1253
- ot as bankStatementsUrls,
1254
- oa as default,
1255
- Q as edocApi,
1261
+ bt as BankSelect,
1262
+ la as BankStatementIntegration,
1263
+ je as BoiButton,
1264
+ Ke as Button,
1265
+ at as EmtsIntegration,
1266
+ _t as FileInput,
1267
+ lt as bankStatementsApi,
1268
+ it as bankStatementsUrls,
1269
+ ra as default,
1270
+ q as edocApi,
1256
1271
  le as filesApi,
1257
- ta as install,
1258
- nt as useAccountVerification,
1259
- at as useEdocBanks
1272
+ sa as install,
1273
+ st as useAccountVerification,
1274
+ ot as useEdocBanks
1260
1275
  };
1261
1276
  //# sourceMappingURL=boi-ui.js.map