mvframe 1.1.9 → 1.1.11

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,26 +1,26 @@
1
- import { M as q, g as z, s as D } from "./vendor.js";
2
- import { a as He, m as Ve, b as je, c as Ue, p as Be, u as Ne } from "./vendor.js";
1
+ import { M as q, g as D, s as z } from "./vendor.js";
2
+ import { a as je, m as Ue, b as Be, c as Ne, p as Fe, u as We } from "./vendor.js";
3
3
  import H from "axios";
4
- const G = "lang", ve = (e, t) => {
4
+ const G = "lang", Se = (e, t) => {
5
5
  var i, a;
6
6
  const n = typeof window < "u", r = () => {
7
- var g;
7
+ var p;
8
8
  if (!n)
9
9
  return { innerWidth: 1920, innerHeight: 1080 };
10
- const s = window, l = typeof navigator < "u" ? s.navigator : {}, u = s.screen || {}, m = s.visualViewport, c = {
11
- innerWidth: s.innerWidth,
12
- innerHeight: s.innerHeight,
13
- outerWidth: s.outerWidth,
14
- outerHeight: s.outerHeight,
15
- screenWidth: u.width ?? s.innerWidth,
16
- screenHeight: u.height ?? s.innerHeight,
17
- availWidth: u.availWidth ?? s.innerWidth,
18
- availHeight: u.availHeight ?? s.innerHeight,
19
- devicePixelRatio: s.devicePixelRatio || 1,
20
- bodyHeight: s.innerHeight - ((g = t.pinia) != null && g.useTab ? 36 : 0) - 64 - 32,
21
- drawerHeight: parseInt(s.innerHeight * 0.9),
22
- pageHeight: s.innerHeight - 64 - 32,
23
- pageWidth: s.innerWidth
10
+ const o = window, l = typeof navigator < "u" ? o.navigator : {}, u = o.screen || {}, m = o.visualViewport, c = {
11
+ innerWidth: o.innerWidth,
12
+ innerHeight: o.innerHeight,
13
+ outerWidth: o.outerWidth,
14
+ outerHeight: o.outerHeight,
15
+ screenWidth: u.width ?? o.innerWidth,
16
+ screenHeight: u.height ?? o.innerHeight,
17
+ availWidth: u.availWidth ?? o.innerWidth,
18
+ availHeight: u.availHeight ?? o.innerHeight,
19
+ devicePixelRatio: o.devicePixelRatio || 1,
20
+ bodyHeight: o.innerHeight - ((p = t.pinia) != null && p.useTab ? 36 : 0) - 64 - 32,
21
+ drawerHeight: parseInt(o.innerHeight * 0.9),
22
+ pageHeight: o.innerHeight - 64 - 32,
23
+ pageWidth: o.innerWidth
24
24
  };
25
25
  m && (c.visualViewportWidth = m.width, c.visualViewportHeight = m.height, c.visualViewportScale = m.scale);
26
26
  const f = l.userAgent || "";
@@ -32,23 +32,23 @@ const G = "lang", ve = (e, t) => {
32
32
  cookieEnabled: !!l.cookieEnabled,
33
33
  onLine: l.onLine !== !1,
34
34
  maxTouchPoints: l.maxTouchPoints || 0,
35
- isTouch: "ontouchstart" in s || (l.maxTouchPoints || 0) > 0,
35
+ isTouch: "ontouchstart" in o || (l.maxTouchPoints || 0) > 0,
36
36
  isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile/i.test(
37
37
  f
38
38
  )
39
39
  }, console.info(c), c;
40
- }, o = () => {
40
+ }, s = () => {
41
41
  var l;
42
- const s = r();
42
+ const o = r();
43
43
  globalThis.$config = globalThis.$config || {}, globalThis.$config.options = {
44
44
  ...globalThis.$config.options || {},
45
- ...s
45
+ ...o
46
46
  }, (l = e == null ? void 0 : e.config) != null && l.globalProperties && (e.config.globalProperties.$config = globalThis.$config);
47
47
  };
48
- o(), n && (window.addEventListener("resize", o, { passive: !0 }), (a = (i = window.visualViewport) == null ? void 0 : i.addEventListener) == null || a.call(i, "resize", o, {
48
+ s(), n && (window.addEventListener("resize", s, { passive: !0 }), (a = (i = window.visualViewport) == null ? void 0 : i.addEventListener) == null || a.call(i, "resize", s, {
49
49
  passive: !0
50
50
  }));
51
- }, Re = (e, t) => {
51
+ }, $e = (e, t) => {
52
52
  var l, u, m;
53
53
  const n = t || {}, r = Array.isArray(n.use) && n.use.length > 0 ? n.use : q;
54
54
  globalThis.$config = globalThis.$config || {}, globalThis.$config.langUse = r.filter(
@@ -56,16 +56,16 @@ const G = "lang", ve = (e, t) => {
56
56
  ), (l = e == null ? void 0 : e.config) != null && l.globalProperties && (e.config.globalProperties.$config = globalThis.$config);
57
57
  const i = (typeof localStorage < "u" ? localStorage.getItem(G) : null) || ((u = globalThis.$config) == null ? void 0 : u.lang) || "en_us", a = Object.assign(
58
58
  {},
59
- z(i),
59
+ D(i),
60
60
  ((m = globalThis.$config) == null ? void 0 : m.langMaps) || {},
61
61
  n.langMaps || {}
62
- ), s = (c, f) => {
62
+ ), o = (c, f) => {
63
63
  if (c)
64
64
  if (f && globalThis.$getType(f) === "Object") {
65
- let g = a[c] || c;
65
+ let p = a[c] || c;
66
66
  return Object.keys(f).forEach((d) => {
67
- g[`{${d}}`] = f[d];
68
- }), g;
67
+ p[`{${d}}`] = f[d];
68
+ }), p;
69
69
  } else
70
70
  return a[c] || c;
71
71
  else
@@ -73,24 +73,24 @@ const G = "lang", ve = (e, t) => {
73
73
  };
74
74
  globalThis.$patchLangMaps = (c) => {
75
75
  c && globalThis.$getType(c) === "Object" && Object.assign(a, c);
76
- }, globalThis.$l = s, e.config.globalProperties.$l = s, e.config.globalProperties.$patchLangMaps = globalThis.$patchLangMaps, String.prototype.$l = function() {
76
+ }, globalThis.$l = o, e.config.globalProperties.$l = o, e.config.globalProperties.$patchLangMaps = globalThis.$patchLangMaps, String.prototype.$l = function() {
77
77
  return $l(this);
78
78
  };
79
- }, Se = (e, t) => {
79
+ }, Le = (e, t) => {
80
80
  if (!e || !t) return !1;
81
- const n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), o = r.right > n.left && r.left < n.right, i = r.bottom > n.top && r.top < n.bottom;
82
- return o && i;
81
+ const n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), s = r.right > n.left && r.left < n.right, i = r.bottom > n.top && r.top < n.bottom;
82
+ return s && i;
83
83
  }, Y = (e, t) => {
84
84
  if (e === t) return !0;
85
85
  if (e == null || t == null || typeof e != "object" || typeof t != "object")
86
86
  return JSON.stringify(e) === JSON.stringify(t);
87
87
  const n = Object.keys(e), r = Object.keys(t);
88
88
  if (n.length !== r.length) return !1;
89
- for (const o of n)
90
- if (!r.includes(o) || !Y(e[o], t[o])) return !1;
89
+ for (const s of n)
90
+ if (!r.includes(s) || !Y(e[s], t[s])) return !1;
91
91
  return !0;
92
- }, x = "download", K = 150, X = (e, t = x) => {
93
- const n = t || x, r = String(e ?? "").trim();
92
+ }, k = "download", K = 150, X = (e, t = k) => {
93
+ const n = t || k, r = String(e ?? "").trim();
94
94
  if (!r) return n;
95
95
  const i = r.replace(/[/\\?%*:|"<>]/g, "_").replace(/\.\./g, "_").split(/[/\\]/).pop() || n, a = 200;
96
96
  return i.length > a ? i.slice(0, a) : i;
@@ -98,17 +98,17 @@ const G = "lang", ve = (e, t) => {
98
98
  const t = ((e == null ? void 0 : e.type) || "").toLowerCase();
99
99
  return t ? t.includes("spreadsheet") || t.includes("ms-excel") || t.includes("excel") && t.includes("application") : !1;
100
100
  }, S = (e, t) => {
101
- const n = URL.createObjectURL(e), r = X(t), o = document.createElement("a");
102
- o.href = n, o.download = r, o.style.display = "none", document.body.appendChild(o);
101
+ const n = URL.createObjectURL(e), r = X(t), s = document.createElement("a");
102
+ s.href = n, s.download = r, s.style.display = "none", document.body.appendChild(s);
103
103
  try {
104
- o.click();
104
+ s.click();
105
105
  } finally {
106
- document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(n), K);
106
+ document.body.removeChild(s), setTimeout(() => URL.revokeObjectURL(n), K);
107
107
  }
108
108
  }, Q = (e) => {
109
109
  if (!e || e.source !== void 0 || e.type === void 0)
110
110
  return e;
111
- const { type: t, data: n, url: r, headers: o, name: i, filename: a, init: s, ...l } = e, u = a ?? i;
111
+ const { type: t, data: n, url: r, headers: s, name: i, filename: a, init: o, ...l } = e, u = a ?? i;
112
112
  return t === "csv" ? {
113
113
  ...l,
114
114
  source: "inline",
@@ -119,37 +119,37 @@ const G = "lang", ve = (e, t) => {
119
119
  ...l,
120
120
  source: "fetch",
121
121
  url: r,
122
- init: { ...s || {}, headers: o ?? (s == null ? void 0 : s.headers) },
122
+ init: { ...o || {}, headers: s ?? (o == null ? void 0 : o.headers) },
123
123
  response: "blob",
124
124
  expectExcel: !0,
125
125
  filename: u
126
126
  } : e;
127
- }, $e = async (e = {}) => {
127
+ }, Ae = async (e = {}) => {
128
128
  const t = Q(e), {
129
129
  source: n = "inline",
130
130
  content: r,
131
- blob: o,
131
+ blob: s,
132
132
  bom: i = !0,
133
133
  mime: a,
134
- url: s,
134
+ url: o,
135
135
  init: l,
136
136
  response: u = "blob",
137
137
  openIn: m = "self",
138
138
  expectExcel: c,
139
139
  filename: f,
140
- name: g,
140
+ name: p,
141
141
  error: d = () => {
142
142
  },
143
143
  // 避免 legacy 字段渗入后续逻辑
144
- type: be,
145
- data: Ee,
146
- headers: _e,
147
- ...Te
148
- } = t, M = f ?? g;
144
+ type: _e,
145
+ data: Te,
146
+ headers: we,
147
+ ...Me
148
+ } = t, M = f ?? p;
149
149
  try {
150
150
  if (n === "inline") {
151
- if (o instanceof Blob) {
152
- S(o, M);
151
+ if (s instanceof Blob) {
152
+ S(s, M);
153
153
  return;
154
154
  }
155
155
  if (r == null) {
@@ -161,18 +161,18 @@ const G = "lang", ve = (e, t) => {
161
161
  return;
162
162
  }
163
163
  if (n === "fetch") {
164
- if (!s) {
164
+ if (!o) {
165
165
  d(new Error("url is required for fetch"));
166
166
  return;
167
167
  }
168
- const h = await fetch(s, l);
168
+ const h = await fetch(o, l);
169
169
  if (!h.ok) {
170
170
  d(new Error(`fetch failed: ${h.status}`));
171
171
  return;
172
172
  }
173
173
  if (u === "text") {
174
- const R = await h.text(), W = i ? "\uFEFF" + R : R, F = a || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
175
- S(new Blob([W], { type: F }), M);
174
+ const R = await h.text(), F = i ? "\uFEFF" + R : R, W = a || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
175
+ S(new Blob([F], { type: W }), M);
176
176
  return;
177
177
  }
178
178
  const v = await h.blob();
@@ -184,11 +184,11 @@ const G = "lang", ve = (e, t) => {
184
184
  return;
185
185
  }
186
186
  if (n === "open") {
187
- if (!s) {
187
+ if (!o) {
188
188
  d(new Error("url is required for open"));
189
189
  return;
190
190
  }
191
- m === "blank" ? window.open(s, "_blank", "noopener,noreferrer") : window.location.href = s;
191
+ m === "blank" ? window.open(o, "_blank", "noopener,noreferrer") : window.location.href = o;
192
192
  return;
193
193
  }
194
194
  d(new Error(`unknown source: ${n}`));
@@ -199,20 +199,20 @@ const G = "lang", ve = (e, t) => {
199
199
  function Z(e, t, n) {
200
200
  if (t === "" || t === void 0 || t === null)
201
201
  return "";
202
- const r = globalThis.$fa, o = globalThis.$fu, i = (n == null ? void 0 : n.precision) ?? 2, a = n == null ? void 0 : n.unit;
203
- if ((a === "currency" || a === "%") && o) {
204
- const s = {
202
+ const r = globalThis.$fa, s = globalThis.$fu, i = (n == null ? void 0 : n.precision) ?? 2, a = n == null ? void 0 : n.unit;
203
+ if ((a === "currency" || a === "%") && s) {
204
+ const o = {
205
205
  [e]: {
206
206
  unit: a === "currency" ? "currency" : "%",
207
207
  precision: i
208
208
  }
209
209
  };
210
210
  try {
211
- return o({
211
+ return s({
212
212
  prop: e,
213
213
  currency: n == null ? void 0 : n.currency,
214
214
  value: t,
215
- obj: s
215
+ obj: o
216
216
  });
217
217
  } catch {
218
218
  }
@@ -226,33 +226,33 @@ function Z(e, t, n) {
226
226
  return String(t);
227
227
  }
228
228
  function Pe(e, t, n = {}) {
229
- const { columns: r = [] } = e || {}, { resolveMetric: o } = n;
229
+ const { columns: r = [] } = e || {}, { resolveMetric: s } = n;
230
230
  return !r.length || !t || typeof t != "object" ? [] : r.map((i) => {
231
231
  const a = i.property ?? i.prop ?? "";
232
232
  if (!a)
233
233
  return "";
234
- let s = t[a];
235
- if (s === void 0 && (s = ""), s === "")
234
+ let o = t[a];
235
+ if (o === void 0 && (o = ""), o === "")
236
236
  return "";
237
- const l = typeof o == "function" ? o(a) : void 0;
237
+ const l = typeof s == "function" ? s(a) : void 0;
238
238
  try {
239
- return Z(a, s, l);
239
+ return Z(a, o, l);
240
240
  } catch {
241
- return String(s);
241
+ return String(o);
242
242
  }
243
243
  });
244
244
  }
245
- const I = "mvframe_primary", V = "mvframe_theme", C = "mvframe_theme_name", $ = "main", P = "mv-theme-", T = { r: 255, g: 255, b: 255 }, ee = { r: 0, g: 0, b: 0 }, j = [1, 3, 5, 7, 9], te = [
245
+ const C = "mvframe_primary", V = "mvframe_theme", I = "mvframe_theme_name", ee = "dark", $ = "main", L = "mv-theme-", T = { r: 255, g: 255, b: 255 }, te = { r: 0, g: 0, b: 0 }, j = [1, 3, 5, 7, 9], ne = [
246
246
  "--el-color-primary-light-3",
247
247
  "--el-color-primary-light-5",
248
248
  "--el-color-primary-light-7",
249
249
  "--el-color-primary-light-8",
250
250
  "--el-color-primary-light-9",
251
251
  "--el-color-primary-dark-2"
252
- ], ne = j.map(
252
+ ], re = j.map(
253
253
  (e) => `--color-primary${e}`
254
254
  );
255
- function L(e) {
255
+ function A(e) {
256
256
  let t = String(e).trim().replace(/^#/, "");
257
257
  if (t.length === 3 && (t = t.split("").map((r) => r + r).join("")), t.length >= 8 && (t = t.slice(0, 6)), t.length !== 6 || Number.isNaN(parseInt(t, 16)))
258
258
  return null;
@@ -264,44 +264,44 @@ function L(e) {
264
264
  };
265
265
  }
266
266
  function y(e, t, n) {
267
- const r = (o) => Math.max(0, Math.min(255, Math.round(o)));
268
- return `#${[r(e), r(t), r(n)].map((o) => o.toString(16).padStart(2, "0")).join("")}`;
267
+ const r = (s) => Math.max(0, Math.min(255, Math.round(s)));
268
+ return `#${[r(e), r(t), r(n)].map((s) => s.toString(16).padStart(2, "0")).join("")}`;
269
269
  }
270
270
  function U(e, t, n, r) {
271
- const o = (a) => Math.max(0, Math.min(255, Math.round(a))), i = Math.max(0, Math.min(1, r));
272
- return `rgba(${o(e)}, ${o(t)}, ${o(n)}, ${i})`;
271
+ const s = (a) => Math.max(0, Math.min(255, Math.round(a))), i = Math.max(0, Math.min(1, r));
272
+ return `rgba(${s(e)}, ${s(t)}, ${s(n)}, ${i})`;
273
273
  }
274
- function re(e) {
274
+ function se(e) {
275
275
  const t = [e.r, e.g, e.b].map((n) => (n /= 255, n <= 0.03928 ? n / 12.92 : ((n + 0.055) / 1.055) ** 2.4));
276
276
  return 0.2126 * t[0] + 0.7152 * t[1] + 0.0722 * t[2];
277
277
  }
278
278
  function B(e) {
279
- return re(e) > 0.5 ? "#1a1a1a" : "#ffffff";
279
+ return se(e) > 0.5 ? "#1a1a1a" : "#ffffff";
280
280
  }
281
281
  function b(e, t, n) {
282
- const r = n / 100, o = 1 - r;
282
+ const r = n / 100, s = 1 - r;
283
283
  return {
284
- r: e.r * r + t.r * o,
285
- g: e.g * r + t.g * o,
286
- b: e.b * r + t.b * o
284
+ r: e.r * r + t.r * s,
285
+ g: e.g * r + t.g * s,
286
+ b: e.b * r + t.b * s
287
287
  };
288
288
  }
289
289
  function oe(e, t = "light") {
290
- const n = L(e);
290
+ const n = A(e);
291
291
  if (!n)
292
292
  return null;
293
- const r = b(T, n, 30), o = b(T, n, 50), i = b(T, n, 70), a = b(T, n, 80), s = b(T, n, 90), l = b(ee, n, 20);
293
+ const r = b(T, n, 30), s = b(T, n, 50), i = b(T, n, 70), a = b(T, n, 80), o = b(T, n, 90), l = b(te, n, 20);
294
294
  return {
295
295
  "--el-color-primary-light-3": y(r.r, r.g, r.b),
296
- "--el-color-primary-light-5": y(o.r, o.g, o.b),
296
+ "--el-color-primary-light-5": y(s.r, s.g, s.b),
297
297
  "--el-color-primary-light-7": t === "dark" ? U(n.r, n.g, n.b, 0.7) : y(i.r, i.g, i.b),
298
298
  "--el-color-primary-light-8": y(a.r, a.g, a.b),
299
- "--el-color-primary-light-9": y(s.r, s.g, s.b),
299
+ "--el-color-primary-light-9": y(o.r, o.g, o.b),
300
300
  "--el-color-primary-dark-2": y(l.r, l.g, l.b)
301
301
  };
302
302
  }
303
- function se(e) {
304
- const t = L(e);
303
+ function ie(e) {
304
+ const t = A(e);
305
305
  return t ? Object.fromEntries(
306
306
  j.map((n) => [
307
307
  `--color-primary${n}`,
@@ -309,102 +309,105 @@ function se(e) {
309
309
  ])
310
310
  ) : null;
311
311
  }
312
- function ie(e) {
312
+ function ae(e) {
313
313
  e.style.removeProperty("--el-color-primary"), e.style.removeProperty("--color-on-primary-text");
314
- for (const t of ne)
314
+ for (const t of re)
315
315
  e.style.removeProperty(t);
316
- for (const t of te)
316
+ for (const t of ne)
317
317
  e.style.removeProperty(t);
318
318
  }
319
319
  function N(e) {
320
320
  const t = String(e ?? "").trim().toLowerCase();
321
321
  return t && t.replace(/[^a-z0-9_-]/g, "-").replace(/-+/g, "-") || $;
322
322
  }
323
- function ae(e) {
323
+ function le(e) {
324
324
  const t = [...e.classList].find(
325
- (n) => n.startsWith(P)
325
+ (n) => n.startsWith(L)
326
326
  );
327
- return t ? t.slice(P.length) : $;
327
+ return t ? t.slice(L.length) : $;
328
328
  }
329
- function le(e) {
330
- [...e.classList].filter((t) => t.startsWith(P)).forEach((t) => e.classList.remove(t));
329
+ function ce(e) {
330
+ [...e.classList].filter((t) => t.startsWith(L)).forEach((t) => e.classList.remove(t));
331
+ }
332
+ function ue(e) {
333
+ return e.classList.contains("light") ? "light" : e.classList.contains("dark") ? "dark" : ee;
331
334
  }
332
- function ce(e, t) {
335
+ function he(e, t) {
333
336
  const n = N(t);
334
- return le(e), e.classList.add(`${P}${n}`), n;
337
+ return ce(e), e.classList.add(`${L}${n}`), n;
335
338
  }
336
- function ue(e, t, n = "light") {
337
- const r = L(t.startsWith("#") ? t : `#${t}`);
339
+ function de(e, t, n = "light") {
340
+ const r = A(t.startsWith("#") ? t : `#${t}`);
338
341
  if (!r)
339
342
  return !1;
340
- const o = y(r.r, r.g, r.b);
341
- e.style.setProperty("--color-primary", o), e.style.setProperty("--el-color-primary", o), e.style.setProperty("--color-on-primary-text", B(r));
342
- const i = se(o);
343
- i && Object.entries(i).forEach(([s, l]) => e.style.setProperty(s, l));
344
- const a = oe(o, n);
345
- return a && Object.entries(a).forEach(([s, l]) => e.style.setProperty(s, l)), !0;
343
+ const s = y(r.r, r.g, r.b);
344
+ e.style.setProperty("--color-primary", s), e.style.setProperty("--el-color-primary", s), e.style.setProperty("--color-on-primary-text", B(r));
345
+ const i = ie(s);
346
+ i && Object.entries(i).forEach(([o, l]) => e.style.setProperty(o, l));
347
+ const a = oe(s, n);
348
+ return a && Object.entries(a).forEach(([o, l]) => e.style.setProperty(o, l)), !0;
346
349
  }
347
- function he(e = {}) {
348
- const t = document.documentElement, n = (e.mode ?? (t.classList.contains("dark") ? "dark" : "light")) === "dark" ? "dark" : "light", r = e.theme ?? ae(t);
349
- if (ce(t, r), e.primary != null && e.primary !== "") {
350
- const o = String(e.primary).trim();
351
- if (!ue(t, o, n)) {
352
- t.style.setProperty("--color-primary", o), t.style.setProperty("--el-color-primary", o);
353
- const i = L(o.startsWith("#") ? o : `#${o}`);
350
+ function me(e = {}) {
351
+ const t = document.documentElement, n = (e.mode ?? ue(t)) === "light" ? "light" : "dark", r = e.theme ?? le(t);
352
+ if (he(t, r), e.primary != null && e.primary !== "") {
353
+ const s = String(e.primary).trim();
354
+ if (!de(t, s, n)) {
355
+ t.style.setProperty("--color-primary", s), t.style.setProperty("--el-color-primary", s);
356
+ const i = A(s.startsWith("#") ? s : `#${s}`);
354
357
  i && t.style.setProperty("--color-on-primary-text", B(i));
355
358
  }
356
- } else (e.primary === null || e.primary === "") && (t.style.removeProperty("--color-primary"), ie(t));
359
+ } else (e.primary === null || e.primary === "") && (t.style.removeProperty("--color-primary"), ae(t));
357
360
  t.classList.toggle("light", n === "light"), t.classList.toggle("dark", n === "dark");
358
361
  }
359
- function Le(e) {
360
- e.primary !== void 0 && (e.primary == null || e.primary === "" ? localStorage.removeItem(I) : localStorage.setItem(I, String(e.primary))), e.mode !== void 0 && localStorage.setItem(V, e.mode), e.theme !== void 0 && (e.theme == null || e.theme === "" ? localStorage.removeItem(C) : localStorage.setItem(
361
- C,
362
+ function Ce(e) {
363
+ e.primary !== void 0 && (e.primary == null || e.primary === "" ? localStorage.removeItem(C) : localStorage.setItem(C, String(e.primary))), e.mode !== void 0 && localStorage.setItem(V, e.mode), e.theme !== void 0 && (e.theme == null || e.theme === "" ? localStorage.removeItem(I) : localStorage.setItem(
364
+ I,
362
365
  N(e.theme)
363
366
  ));
364
367
  }
365
- function Ae() {
366
- var o;
367
- const e = localStorage.getItem(I), t = localStorage.getItem(V), n = localStorage.getItem(C) || ((o = globalThis.$config) == null ? void 0 : o.theme) || $, r = t === "dark" ? "dark" : "light";
368
- he({
368
+ function Ie() {
369
+ var s;
370
+ const e = localStorage.getItem(C), t = localStorage.getItem(V), n = localStorage.getItem(I) || ((s = globalThis.$config) == null ? void 0 : s.theme) || $, r = t === "light" ? "light" : "dark";
371
+ me({
369
372
  primary: e != null && e !== "" ? e : null,
370
373
  mode: r,
371
374
  theme: n
372
375
  });
373
376
  }
374
- const de = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
377
+ const fe = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
375
378
  let w = null;
376
379
  function O(e) {
377
- D("error", e);
380
+ z("error", e);
378
381
  }
379
- function Ie(e) {
382
+ function xe(e) {
380
383
  w = e && typeof e == "object" ? e : null;
381
384
  }
382
- function A(e) {
385
+ function P(e) {
383
386
  if (w && w[e] != null && w[e] !== "")
384
387
  return String(w[e]);
385
388
  const t = typeof globalThis < "u" ? globalThis.__MVFRAME_ENV__ : null;
386
389
  if (t && t[e] != null && t[e] !== "")
387
390
  return String(t[e]);
388
- const n = typeof import.meta < "u" ? de : null;
391
+ const n = typeof import.meta < "u" ? fe : null;
389
392
  return n && n[e] != null && n[e] !== "" ? String(n[e]) : "";
390
393
  }
391
394
  const _ = H.create({
392
395
  timeout: 0,
393
396
  withCredentials: !1
394
397
  });
395
- let p = [];
396
- const me = H.CancelToken, fe = (e) => {
398
+ let g = [];
399
+ const ge = H.CancelToken, pe = (e) => {
397
400
  const t = e.url + "_" + e.headers["Content-HI"] + "_" + e.ex, n = [];
398
- if (p.length)
399
- for (let r in p)
400
- p[r].v === t && n.push(r);
401
- n.length > 0 && (p[n[0]].cb(), p.splice(n[0], 1));
401
+ if (g.length)
402
+ for (let r in g)
403
+ g[r].v === t && n.push(r);
404
+ n.length > 0 && (g[n[0]].cb(), g.splice(n[0], 1));
402
405
  }, E = (e) => {
403
406
  if (e != null && e.url) {
404
407
  const t = e.url + "_" + e.headers["Content-HI"] + "_" + e.ex;
405
- for (let n in p)
406
- if (p[n].v === t) {
407
- p.splice(n, 1);
408
+ for (let n in g)
409
+ if (g[n].v === t) {
410
+ g.splice(n, 1);
408
411
  break;
409
412
  }
410
413
  }
@@ -413,10 +416,10 @@ _.interceptors.request.use(
413
416
  (e) => {
414
417
  e.headers = e.headers || {};
415
418
  const { login: t, accountInfo: n = {} } = window.$store.launch(), { access_token: r } = t.info;
416
- return r && e.headers["Content-HI"] && (e.headers.Authorization = `Bearer ${r}`), n.partner_org_id && noaccount !== !0 && (e.data ? e.method.toLowerCase() === "get" ? e.params.accountId = n.partner_org_id : e.data.accountId = n.partner_org_id : e.method.toLowerCase() === "get" ? e.params = { accountId: n.partner_org_id } : e.data = { accountId: n.partner_org_id }), fe(e), e.cancelToken = new me((o) => {
417
- p.push({
419
+ return r && e.headers["Content-HI"] && (e.headers.Authorization = `Bearer ${r}`), n.partner_org_id && noaccount !== !0 && (e.data ? e.method.toLowerCase() === "get" ? e.params.accountId = n.partner_org_id : e.data.accountId = n.partner_org_id : e.method.toLowerCase() === "get" ? e.params = { accountId: n.partner_org_id } : e.data = { accountId: n.partner_org_id }), pe(e), e.cancelToken = new ge((s) => {
420
+ g.push({
418
421
  v: e.url + "_" + e.headers["Content-HI"] + "_" + e.ex,
419
- cb: o
422
+ cb: s
420
423
  });
421
424
  }), e;
422
425
  },
@@ -427,8 +430,8 @@ _.interceptors.response.use(
427
430
  var i;
428
431
  if (e == null || typeof e != "object" || Array.isArray(e))
429
432
  return E(t), e;
430
- let { code: n, message: r, msg: o } = e;
431
- if (o = o || r, n === 200)
433
+ let { code: n, message: r, msg: s } = e;
434
+ if (s = s || r, n === 200)
432
435
  E(t);
433
436
  else if (n === 500) {
434
437
  if (t.showMsg !== !1) {
@@ -437,7 +440,7 @@ _.interceptors.response.use(
437
440
  grouping: !0,
438
441
  showClose: !0,
439
442
  duration: 0,
440
- message: [o, a].filter(Boolean).join(" ")
443
+ message: [s, a].filter(Boolean).join(" ")
441
444
  });
442
445
  }
443
446
  E(t);
@@ -445,7 +448,7 @@ _.interceptors.response.use(
445
448
  return e;
446
449
  },
447
450
  (e) => {
448
- var n, r, o, i, a;
451
+ var n, r, s, i, a;
449
452
  let t = !1;
450
453
  if (e && e.response)
451
454
  switch (e.response.status) {
@@ -468,92 +471,93 @@ _.interceptors.response.use(
468
471
  (n = e.stack) != null && n.includes("timeout") ? e.message = window.$l("Timeout, Please Refresh") : (e.message = window.$l("Connect Failed"), t = !0);
469
472
  return t || ((r = e == null ? void 0 : e.response) == null ? void 0 : r.status) !== 403 && O({
470
473
  grouping: !0,
471
- message: `${e.message} ${(i = (o = e.config) == null ? void 0 : o.headers) == null ? void 0 : i["Content-HI"]}`
474
+ message: `${e.message} ${(i = (s = e.config) == null ? void 0 : s.headers) == null ? void 0 : i["Content-HI"]}`
472
475
  }), E(e.config), e.code === "ERR_CANCELED" ? Promise.resolve({ code: e.code, msg: e.message }) : Promise.resolve({
473
476
  code: (a = e.response) == null ? void 0 : a.status,
474
477
  msg: e.message
475
478
  });
476
479
  }
477
480
  );
478
- function pe(e) {
479
- return e.baseURL = A("VITE_APP_BASEURL"), e.method = "get", e.headers = { "Content-Type": "application/x-www-form-urlencoded" }, e.data && (e.params = e.data), _(e);
481
+ function ye(e) {
482
+ return e.baseURL = P("VITE_APP_BASEURL"), e.method = "get", e.headers = { "Content-Type": "application/x-www-form-urlencoded" }, e.data && (e.params = e.data), _(e);
480
483
  }
481
- function ge(e) {
482
- return e.baseURL = A("VITE_APP_BASEURL"), e.method = "get", e.headers = {
484
+ function be(e) {
485
+ return e.baseURL = P("VITE_APP_BASEURL"), e.method = "get", e.headers = {
483
486
  ...e.headers,
484
487
  "Content-HI": e.url
485
488
  }, e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", e.data && (e.params = e.data), _(e);
486
489
  }
487
- function ye(e) {
488
- if (e.baseURL = A("VITE_APP_BASEURL"), e.method = "post", e.headers = {
490
+ function Ee(e) {
491
+ if (e.baseURL = P("VITE_APP_BASEURL"), e.method = "post", e.headers = {
489
492
  ...e.headers,
490
493
  "Content-HI": e.url
491
494
  }, e.data && window.$getType(e.data) === "Object") {
492
495
  const n = {};
493
496
  Object.keys(e.data).forEach((r) => {
494
- const o = e.data[r];
495
- [null, "", void 0].includes(o) || (n[r] = o);
497
+ const s = e.data[r];
498
+ [null, "", void 0].includes(s) || (n[r] = s);
496
499
  }), e.data = n;
497
500
  }
498
501
  return e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", _(e);
499
502
  }
500
- function k({
503
+ function x({
501
504
  data: e,
502
505
  url: t,
503
506
  ex: n,
504
507
  method: r = "post",
505
- emptyString: o = !1
508
+ emptyString: s = !1
506
509
  }) {
507
510
  const i = {}, a = [void 0, null];
508
- o === !1 && a.push("");
511
+ s === !1 && a.push("");
509
512
  for (let u in e)
510
513
  a.indexOf(e[u]) === -1 && (i[u] = e[u]);
511
- const { login: s } = window.$store.launch(), { access_token: l } = s.info || {};
514
+ const { login: o } = window.$store.launch(), { access_token: l } = o.info || {};
512
515
  return _({
513
516
  headers: {
514
517
  "Content-Type": "application/json",
515
518
  token: l != null ? String(l) : ""
516
519
  },
517
- baseURL: A("VITE_APP_AIURL"),
520
+ baseURL: P("VITE_APP_AIURL"),
518
521
  url: t,
519
522
  method: r,
520
523
  data: i,
521
524
  ex: n
522
525
  });
523
526
  }
524
- const Ce = k;
525
- function ke(e) {
526
- globalThis.$login = pe, globalThis.$get = ge, globalThis.$post = ye, globalThis.$form = k, globalThis.$xform = k;
527
+ const ke = x;
528
+ function Oe(e) {
529
+ globalThis.$login = ye, globalThis.$get = be, globalThis.$post = Ee, globalThis.$form = x, globalThis.$xform = x;
527
530
  }
528
531
  export {
532
+ ee as MVFRAME_DEFAULT_THEME_MODE,
529
533
  $ as MVFRAME_DEFAULT_THEME_NAME,
530
534
  G as MVFRAME_STORAGE_LANG,
531
- I as MVFRAME_STORAGE_PRIMARY,
535
+ C as MVFRAME_STORAGE_PRIMARY,
532
536
  V as MVFRAME_STORAGE_THEME,
533
- C as MVFRAME_STORAGE_THEME_NAME,
534
- P as MVFRAME_THEME_CLASS_PREFIX,
535
- he as applyMvframeTheme,
537
+ I as MVFRAME_STORAGE_THEME_NAME,
538
+ L as MVFRAME_THEME_CLASS_PREFIX,
539
+ me as applyMvframeTheme,
536
540
  Y as deepEqual,
537
- $e as download,
541
+ Ae as download,
538
542
  Z as formatSummaryCell,
539
- He as getMaps,
540
- ke as installRq,
541
- Se as isInView,
542
- Ae as loadMvframeTheme,
543
- Ve as mapLang,
544
- je as mapLangPath,
545
- Ue as mergeMaps,
546
- Be as patchMaps,
547
- Le as persistMvframeTheme,
543
+ je as getMaps,
544
+ Oe as installRq,
545
+ Le as isInView,
546
+ Ie as loadMvframeTheme,
547
+ Ue as mapLang,
548
+ Be as mapLangPath,
549
+ Ne as mergeMaps,
550
+ Fe as patchMaps,
551
+ Ce as persistMvframeTheme,
548
552
  X as sanitizeDownloadFileName,
549
- Ie as setMvframeRqEnv,
550
- k as useForm,
551
- ge as useGet,
552
- Re as useLang,
553
- pe as useLogin,
554
- Ne as useMap,
555
- ve as useOptions,
556
- ye as usePost,
553
+ xe as setMvframeRqEnv,
554
+ x as useForm,
555
+ be as useGet,
556
+ $e as useLang,
557
+ ye as useLogin,
558
+ We as useMap,
559
+ Se as useOptions,
560
+ Ee as usePost,
557
561
  Pe as useRemoteSummary,
558
- Ce as useXform
562
+ ke as useXform
559
563
  };