superapp-miniapp-invoke-native 1.11.0 → 1.11.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/lib/main.js CHANGED
@@ -1,34 +1,36 @@
1
- var Fr = Object.defineProperty, Ur = Object.defineProperties;
2
- var Wr = Object.getOwnPropertyDescriptors;
3
- var Ke = Object.getOwnPropertySymbols;
4
- var Dr = Object.prototype.hasOwnProperty, xr = Object.prototype.propertyIsEnumerable;
5
- var Le = (t, e, r) => e in t ? Fr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
1
+ /* eslint-disable no-restricted-globals */
2
+ /* global globalThis */
3
+ var Vr = Object.defineProperty, Hr = Object.defineProperties;
4
+ var Ur = Object.getOwnPropertyDescriptors;
5
+ var qe = Object.getOwnPropertySymbols;
6
+ var Fr = Object.prototype.hasOwnProperty, Wr = Object.prototype.propertyIsEnumerable;
7
+ var Le = (t, e, r) => e in t ? Vr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
6
8
  for (var r in e || (e = {}))
7
- Dr.call(e, r) && Le(t, r, e[r]);
8
- if (Ke)
9
- for (var r of Ke(e))
10
- xr.call(e, r) && Le(t, r, e[r]);
9
+ Fr.call(e, r) && Le(t, r, e[r]);
10
+ if (qe)
11
+ for (var r of qe(e))
12
+ Wr.call(e, r) && Le(t, r, e[r]);
11
13
  return t;
12
- }, T = (t, e) => Ur(t, Wr(e));
14
+ }, T = (t, e) => Hr(t, Ur(e));
13
15
  var P = (t, e, r) => (Le(t, typeof e != "symbol" ? e + "" : e, r), r);
14
16
  var a = (t, e, r) => new Promise((n, o) => {
15
17
  var i = (l) => {
16
18
  try {
17
19
  s(r.next(l));
18
- } catch (u) {
19
- o(u);
20
+ } catch (w) {
21
+ o(w);
20
22
  }
21
23
  }, c = (l) => {
22
24
  try {
23
25
  s(r.throw(l));
24
- } catch (u) {
25
- o(u);
26
+ } catch (w) {
27
+ o(w);
26
28
  }
27
29
  }, s = (l) => l.done ? n(l.value) : Promise.resolve(l.value).then(i, c);
28
30
  s((r = r.apply(t, e)).next());
29
31
  });
30
32
  /*! Capacitor: https://capacitorjs.com/ - MIT License */
31
- const $r = (t) => t.CapacitorPlatforms = ((e) => {
33
+ const Dr = (t) => t.CapacitorPlatforms = ((e) => {
32
34
  const r = /* @__PURE__ */ new Map();
33
35
  r.set("web", { name: "web" });
34
36
  const n = e.CapacitorPlatforms || { currentPlatform: { name: "web" }, platforms: r };
@@ -37,32 +39,32 @@ const $r = (t) => t.CapacitorPlatforms = ((e) => {
37
39
  }, n.setPlatform = (o) => {
38
40
  n.platforms.has(o) && (n.currentPlatform = n.platforms.get(o));
39
41
  }, n;
40
- })(t), ze = $r(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
41
- var $;
42
- ze.addPlatform, ze.setPlatform, function(t) {
42
+ })(t), Ke = Dr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
43
+ var j;
44
+ Ke.addPlatform, Ke.setPlatform, function(t) {
43
45
  t.Unimplemented = "UNIMPLEMENTED", t.Unavailable = "UNAVAILABLE";
44
- }($ || ($ = {}));
46
+ }(j || (j = {}));
45
47
  class ve extends Error {
46
48
  constructor(e, r, n) {
47
49
  super(e), this.message = e, this.code = r, this.data = n;
48
50
  }
49
51
  }
50
- const jr = (t) => {
52
+ const xr = (t) => {
51
53
  var e, r, n, o, i;
52
- const c = t.CapacitorCustomPlatform || null, s = t.Capacitor || {}, l = s.Plugins = s.Plugins || {}, u = t.CapacitorPlatforms, _ = ((e = u == null ? void 0 : u.currentPlatform) === null || e === void 0 ? void 0 : e.getPlatform) || (() => c !== null ? c.name : ((p) => {
54
+ const c = t.CapacitorCustomPlatform || null, s = t.Capacitor || {}, l = s.Plugins = s.Plugins || {}, w = t.CapacitorPlatforms, _ = ((e = w == null ? void 0 : w.currentPlatform) === null || e === void 0 ? void 0 : e.getPlatform) || (() => c !== null ? c.name : ((h) => {
53
55
  var m, N;
54
- return p != null && p.androidBridge ? "android" : !((N = (m = p == null ? void 0 : p.webkit) === null || m === void 0 ? void 0 : m.messageHandlers) === null || N === void 0) && N.bridge ? "ios" : "web";
55
- })(t)), h = ((r = u == null ? void 0 : u.currentPlatform) === null || r === void 0 ? void 0 : r.isNativePlatform) || (() => _() !== "web"), M = ((n = u == null ? void 0 : u.currentPlatform) === null || n === void 0 ? void 0 : n.isPluginAvailable) || ((p) => {
56
- const m = I.get(p);
57
- return !!(m != null && m.platforms.has(_())) || !!v(p);
58
- }), v = ((o = u == null ? void 0 : u.currentPlatform) === null || o === void 0 ? void 0 : o.getPluginHeader) || ((p) => {
56
+ return h != null && h.androidBridge ? "android" : !((N = (m = h == null ? void 0 : h.webkit) === null || m === void 0 ? void 0 : m.messageHandlers) === null || N === void 0) && N.bridge ? "ios" : "web";
57
+ })(t)), p = ((r = w == null ? void 0 : w.currentPlatform) === null || r === void 0 ? void 0 : r.isNativePlatform) || (() => _() !== "web"), M = ((n = w == null ? void 0 : w.currentPlatform) === null || n === void 0 ? void 0 : n.isPluginAvailable) || ((h) => {
58
+ const m = I.get(h);
59
+ return !!(m != null && m.platforms.has(_())) || !!v(h);
60
+ }), v = ((o = w == null ? void 0 : w.currentPlatform) === null || o === void 0 ? void 0 : o.getPluginHeader) || ((h) => {
59
61
  var m;
60
- return (m = s.PluginHeaders) === null || m === void 0 ? void 0 : m.find((N) => N.name === p);
61
- }), I = /* @__PURE__ */ new Map(), C = ((i = u == null ? void 0 : u.currentPlatform) === null || i === void 0 ? void 0 : i.registerPlugin) || ((p, m = {}) => {
62
- const N = I.get(p);
62
+ return (m = s.PluginHeaders) === null || m === void 0 ? void 0 : m.find((N) => N.name === h);
63
+ }), I = /* @__PURE__ */ new Map(), C = ((i = w == null ? void 0 : w.currentPlatform) === null || i === void 0 ? void 0 : i.registerPlugin) || ((h, m = {}) => {
64
+ const N = I.get(h);
63
65
  if (N)
64
- return console.warn(`Capacitor plugin "${p}" already registered. Cannot register plugins twice.`), N.proxy;
65
- const O = _(), j = v(p);
66
+ return console.warn(`Capacitor plugin "${h}" already registered. Cannot register plugins twice.`), N.proxy;
67
+ const O = _(), $ = v(h);
66
68
  let k;
67
69
  const Me = (A) => {
68
70
  let R;
@@ -72,15 +74,15 @@ const jr = (t) => {
72
74
  }))().then((K) => {
73
75
  const je = ((L, z) => {
74
76
  var Ce, Oe;
75
- if (!j) {
77
+ if (!$) {
76
78
  if (L)
77
79
  return (Oe = L[z]) === null || Oe === void 0 ? void 0 : Oe.bind(L);
78
- throw new ve(`"${p}" plugin is not implemented on ${O}`, $.Unimplemented);
80
+ throw new ve(`"${h}" plugin is not implemented on ${O}`, j.Unimplemented);
79
81
  }
80
82
  {
81
- const qe = j == null ? void 0 : j.methods.find((G) => z === G.name);
82
- if (qe)
83
- return qe.rtype === "promise" ? (G) => s.nativePromise(p, z.toString(), G) : (G, Hr) => s.nativeCallback(p, z.toString(), G, Hr);
83
+ const $e = $ == null ? void 0 : $.methods.find((G) => z === G.name);
84
+ if ($e)
85
+ return $e.rtype === "promise" ? (G) => s.nativePromise(h, z.toString(), G) : (G, Br) => s.nativeCallback(h, z.toString(), G, Br);
84
86
  if (L)
85
87
  return (Ce = L[z]) === null || Ce === void 0 ? void 0 : Ce.bind(L);
86
88
  }
@@ -89,17 +91,17 @@ const jr = (t) => {
89
91
  const L = je(...Z);
90
92
  return R = L == null ? void 0 : L.remove, L;
91
93
  }
92
- throw new ve(`"${p}.${A}()" is not implemented on ${O}`, $.Unimplemented);
94
+ throw new ve(`"${h}.${A}()" is not implemented on ${O}`, j.Unimplemented);
93
95
  });
94
96
  return A === "addListener" && (q.remove = () => a(void 0, null, function* () {
95
97
  return R();
96
98
  })), q;
97
99
  };
98
100
  return x.toString = () => `${A.toString()}() { [capacitor code] }`, Object.defineProperty(x, "name", { value: A, writable: !1, configurable: !1 }), x;
99
- }, xe = Me("addListener"), $e = Me("removeListener"), Vr = (A, R) => {
100
- const x = xe({ eventName: A }, R), Z = () => a(void 0, null, function* () {
101
+ }, De = Me("addListener"), xe = Me("removeListener"), Tr = (A, R) => {
102
+ const x = De({ eventName: A }, R), Z = () => a(void 0, null, function* () {
101
103
  const K = yield x;
102
- $e({ eventName: A, callbackId: K }, R);
104
+ xe({ eventName: A, callbackId: K }, R);
103
105
  }), q = new Promise((K) => x.then(() => K({ remove: Z })));
104
106
  return q.remove = () => a(void 0, null, function* () {
105
107
  console.warn("Using addListener() without 'await' is deprecated."), yield Z();
@@ -111,18 +113,18 @@ const jr = (t) => {
111
113
  case "toJSON":
112
114
  return () => ({});
113
115
  case "addListener":
114
- return j ? Vr : xe;
116
+ return $ ? Tr : De;
115
117
  case "removeListener":
116
- return $e;
118
+ return xe;
117
119
  default:
118
120
  return Me(R);
119
121
  }
120
122
  } });
121
- return l[p] = Ie, I.set(p, { name: p, proxy: Ie, platforms: /* @__PURE__ */ new Set([...Object.keys(m), ...j ? [O] : []]) }), Ie;
123
+ return l[h] = Ie, I.set(h, { name: h, proxy: Ie, platforms: /* @__PURE__ */ new Set([...Object.keys(m), ...$ ? [O] : []]) }), Ie;
122
124
  });
123
- return s.convertFileSrc || (s.convertFileSrc = (p) => p), s.getPlatform = _, s.handleError = (p) => t.console.error(p), s.isNativePlatform = h, s.isPluginAvailable = M, s.pluginMethodNoop = (p, m, N) => Promise.reject(`${N} does not have an implementation of "${m}".`), s.registerPlugin = C, s.Exception = ve, s.DEBUG = !!s.DEBUG, s.isLoggingEnabled = !!s.isLoggingEnabled, s.platform = s.getPlatform(), s.isNative = s.isNativePlatform(), s;
124
- }, qr = (t) => t.Capacitor = jr(t), d = qr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), Ue = d.registerPlugin;
125
- d.Plugins;
125
+ return s.convertFileSrc || (s.convertFileSrc = (h) => h), s.getPlatform = _, s.handleError = (h) => t.console.error(h), s.isNativePlatform = p, s.isPluginAvailable = M, s.pluginMethodNoop = (h, m, N) => Promise.reject(`${N} does not have an implementation of "${m}".`), s.registerPlugin = C, s.Exception = ve, s.DEBUG = !!s.DEBUG, s.isLoggingEnabled = !!s.isLoggingEnabled, s.platform = s.getPlatform(), s.isNative = s.isNativePlatform(), s;
126
+ }, jr = (t) => t.Capacitor = xr(t), u = jr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), Fe = u.registerPlugin;
127
+ u.Plugins;
126
128
  class y {
127
129
  constructor(e) {
128
130
  this.listeners = {}, this.windowListeners = {}, e && (console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`), this.config = e);
@@ -159,10 +161,10 @@ class y {
159
161
  } };
160
162
  }
161
163
  unimplemented(e = "not implemented") {
162
- return new d.Exception(e, $.Unimplemented);
164
+ return new u.Exception(e, j.Unimplemented);
163
165
  }
164
166
  unavailable(e = "not available") {
165
- return new d.Exception(e, $.Unavailable);
167
+ return new u.Exception(e, j.Unavailable);
166
168
  }
167
169
  removeListener(e, r) {
168
170
  return a(this, null, function* () {
@@ -180,8 +182,8 @@ class y {
180
182
  e && (window.removeEventListener(e.windowEventName, e.handler), e.registered = !1);
181
183
  }
182
184
  }
183
- const Ge = (t) => encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), Je = (t) => t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
184
- class Kr extends y {
185
+ const ze = (t) => encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), Ge = (t) => t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
186
+ class $r extends y {
185
187
  getCookies() {
186
188
  return a(this, null, function* () {
187
189
  const e = document.cookie, r = {};
@@ -189,14 +191,14 @@ class Kr extends y {
189
191
  if (n.length <= 0)
190
192
  return;
191
193
  let [o, i] = n.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
192
- o = Je(o).trim(), i = Je(i).trim(), r[o] = i;
194
+ o = Ge(o).trim(), i = Ge(i).trim(), r[o] = i;
193
195
  }), r;
194
196
  });
195
197
  }
196
198
  setCookie(e) {
197
199
  return a(this, null, function* () {
198
200
  try {
199
- const r = Ge(e.key), n = Ge(e.value), o = `; expires=${(e.expires || "").replace("expires=", "")}`, i = (e.path || "/").replace("path=", ""), c = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
201
+ const r = ze(e.key), n = ze(e.value), o = `; expires=${(e.expires || "").replace("expires=", "")}`, i = (e.path || "/").replace("path=", ""), c = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
200
202
  document.cookie = `${r}=${n || ""}${o}; path=${i}; ${c};`;
201
203
  } catch (r) {
202
204
  return Promise.reject(r);
@@ -233,8 +235,8 @@ class Kr extends y {
233
235
  });
234
236
  }
235
237
  }
236
- Ue("CapacitorCookies", { web: () => new Kr() });
237
- const zr = (t, e = {}) => {
238
+ Fe("CapacitorCookies", { web: () => new $r() });
239
+ const qr = (t, e = {}) => {
238
240
  const r = Object.assign({ method: t.method || "GET", headers: t.headers }, e), n = ((o = {}) => {
239
241
  const i = Object.keys(o);
240
242
  return Object.keys(o).map((c) => c.toLocaleLowerCase()).reduce((c, s, l) => (c[s] = o[i[l]], c), {});
@@ -262,27 +264,27 @@ const zr = (t, e = {}) => {
262
264
  (n.includes("application/json") || typeof t.data == "object") && (r.body = JSON.stringify(t.data));
263
265
  return r;
264
266
  };
265
- class Gr extends y {
267
+ class Kr extends y {
266
268
  request(e) {
267
269
  return a(this, null, function* () {
268
- const r = zr(e, e.webFetchExtra), n = ((h, M = !0) => h ? Object.entries(h).reduce((v, I) => {
269
- const [C, p] = I;
270
+ const r = qr(e, e.webFetchExtra), n = ((p, M = !0) => p ? Object.entries(p).reduce((v, I) => {
271
+ const [C, h] = I;
270
272
  let m, N;
271
- return Array.isArray(p) ? (N = "", p.forEach((O) => {
273
+ return Array.isArray(h) ? (N = "", h.forEach((O) => {
272
274
  m = M ? encodeURIComponent(O) : O, N += `${C}=${m}&`;
273
- }), N.slice(0, -1)) : (m = M ? encodeURIComponent(p) : p, N = `${C}=${m}`), `${v}&${N}`;
275
+ }), N.slice(0, -1)) : (m = M ? encodeURIComponent(h) : h, N = `${C}=${m}`), `${v}&${N}`;
274
276
  }, "").substr(1) : null)(e.params, e.shouldEncodeUrlParams), o = n ? `${e.url}?${n}` : e.url, i = yield fetch(o, r), c = i.headers.get("content-type") || "";
275
- let s, l, { responseType: u = "text" } = i.ok ? e : {};
276
- switch (c.includes("application/json") && (u = "json"), u) {
277
+ let s, l, { responseType: w = "text" } = i.ok ? e : {};
278
+ switch (c.includes("application/json") && (w = "json"), w) {
277
279
  case "arraybuffer":
278
280
  case "blob":
279
- l = yield i.blob(), s = yield ((h) => a(this, null, function* () {
281
+ l = yield i.blob(), s = yield ((p) => a(this, null, function* () {
280
282
  return new Promise((M, v) => {
281
283
  const I = new FileReader();
282
284
  I.onload = () => {
283
285
  const C = I.result;
284
286
  M(C.indexOf(",") >= 0 ? C.split(",")[1] : C);
285
- }, I.onerror = (C) => v(C), I.readAsDataURL(h);
287
+ }, I.onerror = (C) => v(C), I.readAsDataURL(p);
286
288
  });
287
289
  }))(l);
288
290
  break;
@@ -293,8 +295,8 @@ class Gr extends y {
293
295
  s = yield i.text();
294
296
  }
295
297
  const _ = {};
296
- return i.headers.forEach((h, M) => {
297
- _[M] = h;
298
+ return i.headers.forEach((p, M) => {
299
+ _[M] = p;
298
300
  }), { data: s, headers: _, status: i.status, url: i.url };
299
301
  });
300
302
  }
@@ -325,13 +327,13 @@ class Gr extends y {
325
327
  }
326
328
  }
327
329
  function Ae() {
328
- return d.getPlatform() === "android" ? JSON.parse(AndroidInitialContext.initialContext()) : window.portalInitialContext;
330
+ return u.getPlatform() === "android" ? JSON.parse(AndroidInitialContext.initialContext()) : window.portalInitialContext;
329
331
  }
330
- Ue("CapacitorHttp", { web: () => new Gr() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
331
- Ue("Portals", { web: () => Promise.resolve().then(function() {
332
- return Jr;
332
+ Fe("CapacitorHttp", { web: () => new Kr() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
333
+ Fe("Portals", { web: () => Promise.resolve().then(function() {
334
+ return zr;
333
335
  }).then((t) => new t.PortalsWeb()) });
334
- const Jr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
336
+ const zr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
335
337
  publishNative(t) {
336
338
  return a(this, null, function* () {
337
339
  });
@@ -353,7 +355,7 @@ const Jr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
353
355
  throw console.error("getInitialContextHandle error", o), o;
354
356
  }
355
357
  };
356
- class Qr {
358
+ class Gr {
357
359
  isNative() {
358
360
  try {
359
361
  return (() => {
@@ -435,9 +437,9 @@ const f = () => {
435
437
  } catch (t) {
436
438
  throw console.error("isWinHandle error", t), t;
437
439
  }
438
- }, E = "CommunicatePlugin", g = d.registerPlugin(E, { web: () => Promise.resolve().then(() => Nt).then((t) => new t.PluginsWeb()) }), te = f();
440
+ }, E = "CommunicatePlugin", g = u.registerPlugin(E, { web: () => Promise.resolve().then(() => Pt).then((t) => new t.PluginsWeb()) }), te = f();
439
441
  te.removeAddListenerFab = () => null;
440
- const Yr = (t, e) => {
442
+ const Jr = (t, e) => {
441
443
  var r, n;
442
444
  try {
443
445
  te.removeAddListenerFab && te.removeAddListenerFab();
@@ -445,8 +447,8 @@ const Yr = (t, e) => {
445
447
  if ((r = g.showFABMenu) == null || r.call(g, { fabMenu: o, position: null }), !t || !((n = Object.keys(t)) != null && n.length))
446
448
  return;
447
449
  Object.keys(t).forEach((i) => {
448
- var c, s, l, u, _, h, M, v;
449
- o.push({ disable: (s = (c = t == null ? void 0 : t[i]) == null ? void 0 : c.disable) != null ? s : !1, icon: (u = (l = t == null ? void 0 : t[i]) == null ? void 0 : l.icon) != null ? u : "", id: (h = (_ = t == null ? void 0 : t[i]) == null ? void 0 : _.id) != null ? h : "", name: (v = (M = t == null ? void 0 : t[i]) == null ? void 0 : M.title) != null ? v : "" });
450
+ var c, s, l, w, _, p, M, v;
451
+ o.push({ disable: (s = (c = t == null ? void 0 : t[i]) == null ? void 0 : c.disable) != null ? s : !1, icon: (w = (l = t == null ? void 0 : t[i]) == null ? void 0 : l.icon) != null ? w : "", id: (p = (_ = t == null ? void 0 : t[i]) == null ? void 0 : _.id) != null ? p : "", name: (v = (M = t == null ? void 0 : t[i]) == null ? void 0 : M.title) != null ? v : "" });
450
452
  }), queueMicrotask(() => {
451
453
  var i;
452
454
  (i = g.showFABMenu) == null || i.call(g, { fabMenu: o, position: e != null ? e : null });
@@ -454,8 +456,8 @@ const Yr = (t, e) => {
454
456
  ((i) => a(void 0, null, function* () {
455
457
  i && (te.removeAddListenerFab = yield ((c) => a(void 0, null, function* () {
456
458
  try {
457
- if (d.addListener) {
458
- const s = yield d.addListener(E, "nativeSendFab", (l) => c && c(l));
459
+ if (u.addListener) {
460
+ const s = yield u.addListener(E, "nativeSendFab", (l) => c && c(l));
459
461
  return s != null && s.remove ? s.remove : () => null;
460
462
  }
461
463
  } catch (s) {
@@ -465,8 +467,8 @@ const Yr = (t, e) => {
465
467
  }))((i) => {
466
468
  let c;
467
469
  i != null && i.disable || i != null && i.id && (Object.keys(t).forEach((s) => {
468
- var l, u, _;
469
- (l = t == null ? void 0 : t[s]) != null && l.id && i.id === t[s].id && (c = (_ = (u = t[s]) == null ? void 0 : u.fn) != null ? _ : () => null);
470
+ var l, w, _;
471
+ (l = t == null ? void 0 : t[s]) != null && l.id && i.id === t[s].id && (c = (_ = (w = t[s]) == null ? void 0 : w.fn) != null ? _ : () => null);
470
472
  }), typeof c == "function" && c());
471
473
  });
472
474
  });
@@ -475,12 +477,12 @@ const Yr = (t, e) => {
475
477
  }
476
478
  }, B = f();
477
479
  B.addListenerBackRemoveHandle = () => null;
478
- const Qe = (t = () => null) => a(void 0, null, function* () {
480
+ const Je = (t = () => null) => a(void 0, null, function* () {
479
481
  try {
480
482
  B != null && B.addListenerBackRemoveHandle && typeof B.addListenerBackRemoveHandle == "function" && B.addListenerBackRemoveHandle(), B.addListenerBackRemoveHandle = yield ((e) => a(void 0, null, function* () {
481
483
  try {
482
- if (d.addListener) {
483
- const r = yield d.addListener(E, "nativeSendBack", (n) => e && e(n));
484
+ if (u.addListener) {
485
+ const r = yield u.addListener(E, "nativeSendBack", (n) => e && e(n));
484
486
  return r != null && r.remove ? r.remove : () => null;
485
487
  }
486
488
  } catch (r) {
@@ -492,14 +494,14 @@ const Qe = (t = () => null) => a(void 0, null, function* () {
492
494
  }
493
495
  }), ne = f();
494
496
  ne.addListenerHomeHandle = () => null;
495
- const Zr = (t) => {
497
+ const Qr = (t) => {
496
498
  try {
497
499
  ne.addListenerHomeHandle && ne.addListenerHomeHandle(), setTimeout(() => {
498
500
  ((e) => a(void 0, null, function* () {
499
501
  e && (ne.addListenerHomeHandle = yield ((r) => a(void 0, null, function* () {
500
502
  try {
501
- if (d.addListener) {
502
- const n = yield d.addListener(E, "nativeSendHome", (o) => r && r(o));
503
+ if (u.addListener) {
504
+ const n = yield u.addListener(E, "nativeSendHome", (o) => r && r(o));
503
505
  return n != null && n.remove ? n.remove : () => null;
504
506
  }
505
507
  } catch (n) {
@@ -513,12 +515,12 @@ const Zr = (t) => {
513
515
  }
514
516
  }, V = f();
515
517
  V.addListenerTouchRemoveHandle = () => null;
516
- const Ye = (t = () => null) => a(void 0, null, function* () {
518
+ const Qe = (t = () => null) => a(void 0, null, function* () {
517
519
  try {
518
520
  V != null && V.addListenerTouchRemoveHandle && typeof V.addListenerTouchRemoveHandle == "function" && V.addListenerTouchRemoveHandle(), V.addListenerTouchRemoveHandle = yield ((e) => a(void 0, null, function* () {
519
521
  try {
520
- if (d.addListener) {
521
- const r = yield d.addListener(E, "nativeTouchListener", (n) => e && e(n));
522
+ if (u.addListener) {
523
+ const r = yield u.addListener(E, "nativeTouchListener", (n) => e && e(n));
522
524
  return r != null && r.remove ? r.remove : () => null;
523
525
  }
524
526
  } catch (r) {
@@ -530,14 +532,14 @@ const Ye = (t = () => null) => a(void 0, null, function* () {
530
532
  }
531
533
  }), H = f();
532
534
  H.addListenerSendDeepLinkRemoveHandle = () => null;
533
- const Ze = (t = () => null) => a(void 0, null, function* () {
535
+ const Ye = (t = () => null) => a(void 0, null, function* () {
534
536
  try {
535
537
  H != null && H.addListenerSendDeepLinkRemoveHandle && typeof H.addListenerSendDeepLinkRemoveHandle == "function" && H.addListenerSendDeepLinkRemoveHandle(), H.addListenerSendDeepLinkRemoveHandle = yield ((e) => a(void 0, null, function* () {
536
538
  try {
537
539
  if (window.__MICRO_APP_ENVIRONMENT__)
538
540
  return e && window.rawWindow.__mini_app_hook__.getDeeplinkParams(e), { remove: () => null };
539
- if (d.addListener) {
540
- const r = yield d.addListener(E, "nativeSendDeeplinkCallbackListener", (n) => e && e(n));
541
+ if (u.addListener) {
542
+ const r = yield u.addListener(E, "nativeSendDeeplinkCallbackListener", (n) => e && e(n));
541
543
  return r != null && r.remove ? r.remove : () => null;
542
544
  }
543
545
  } catch (r) {
@@ -547,14 +549,14 @@ const Ze = (t = () => null) => a(void 0, null, function* () {
547
549
  } catch (e) {
548
550
  throw console.error("initTouchFn error", e), e;
549
551
  }
550
- }), F = f();
551
- F.addListenerSwitchLanguageRemoveHandle = () => null;
552
- const Xe = (t = () => null) => a(void 0, null, function* () {
552
+ }), U = f();
553
+ U.addListenerSwitchLanguageRemoveHandle = () => null;
554
+ const Ze = (t = () => null) => a(void 0, null, function* () {
553
555
  try {
554
- F != null && F.addListenerSwitchLanguageRemoveHandle && typeof F.addListenerSwitchLanguageRemoveHandle == "function" && F.addListenerSwitchLanguageRemoveHandle(), F.addListenerSwitchLanguageRemoveHandle = yield ((e) => a(void 0, null, function* () {
556
+ U != null && U.addListenerSwitchLanguageRemoveHandle && typeof U.addListenerSwitchLanguageRemoveHandle == "function" && U.addListenerSwitchLanguageRemoveHandle(), U.addListenerSwitchLanguageRemoveHandle = yield ((e) => a(void 0, null, function* () {
555
557
  try {
556
- if (d.addListener) {
557
- const r = yield d.addListener(E, "nativeSendSwitchLanguage", (n) => e && e(n));
558
+ if (u.addListener) {
559
+ const r = yield u.addListener(E, "nativeSendSwitchLanguage", (n) => e && e(n));
558
560
  return r != null && r.remove ? r.remove : () => null;
559
561
  }
560
562
  if (window.__MICRO_APP_ENVIRONMENT__)
@@ -568,14 +570,14 @@ const Xe = (t = () => null) => a(void 0, null, function* () {
568
570
  } catch (e) {
569
571
  throw console.error("initSwitchLanguageFn error", e), e;
570
572
  }
571
- }), U = f();
572
- U.addListenerSetupMiniAppRemoveHandle = () => null;
573
- const er = (t = () => null) => a(void 0, null, function* () {
573
+ }), F = f();
574
+ F.addListenerSetupMiniAppRemoveHandle = () => null;
575
+ const Xe = (t = () => null) => a(void 0, null, function* () {
574
576
  try {
575
- U != null && U.addListenerSetupMiniAppRemoveHandle && typeof U.addListenerSetupMiniAppRemoveHandle == "function" && U.addListenerSetupMiniAppRemoveHandle(), U.addListenerSetupMiniAppRemoveHandle = yield ((e) => a(void 0, null, function* () {
577
+ F != null && F.addListenerSetupMiniAppRemoveHandle && typeof F.addListenerSetupMiniAppRemoveHandle == "function" && F.addListenerSetupMiniAppRemoveHandle(), F.addListenerSetupMiniAppRemoveHandle = yield ((e) => a(void 0, null, function* () {
576
578
  try {
577
- if (d.addListener) {
578
- const r = yield d.addListener(E, "nativeSetupMiniApp", (n) => e && e(n));
579
+ if (u.addListener) {
580
+ const r = yield u.addListener(E, "nativeSetupMiniApp", (n) => e && e(n));
579
581
  return r != null && r.remove ? r.remove : () => null;
580
582
  }
581
583
  } catch (r) {
@@ -587,12 +589,12 @@ const er = (t = () => null) => a(void 0, null, function* () {
587
589
  }
588
590
  }), W = f();
589
591
  W.addListenerSwitchStoreRemoveHandle = () => null;
590
- const rr = (t = () => null) => a(void 0, null, function* () {
592
+ const er = (t = () => null) => a(void 0, null, function* () {
591
593
  try {
592
594
  W != null && W.addListenerSwitchStoreRemoveHandle && typeof W.addListenerSwitchStoreRemoveHandle == "function" && W.addListenerSwitchStoreRemoveHandle(), W.addListenerSwitchStoreRemoveHandle = yield ((e) => a(void 0, null, function* () {
593
595
  try {
594
- if (d.addListener) {
595
- const r = yield d.addListener(E, "nativeSendSwitchStore", (n) => e && e(n));
596
+ if (u.addListener) {
597
+ const r = yield u.addListener(E, "nativeSendSwitchStore", (n) => e && e(n));
596
598
  return r != null && r.remove ? r.remove : () => null;
597
599
  }
598
600
  if (window.__MICRO_APP_ENVIRONMENT__)
@@ -607,7 +609,7 @@ const rr = (t = () => null) => a(void 0, null, function* () {
607
609
  throw console.error("initSwitchStoreFn error", e), e;
608
610
  }
609
611
  });
610
- class Xr {
612
+ class Yr {
611
613
  constructor() {
612
614
  this.homeBtnSwitch({ isClick: !0 });
613
615
  }
@@ -627,9 +629,9 @@ class Xr {
627
629
  try {
628
630
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
629
631
  n(() => {
630
- Qe(i);
632
+ Je(i);
631
633
  }), o(() => {
632
- Qe();
634
+ Je();
633
635
  });
634
636
  } catch (n) {
635
637
  throw console.error("backBtnHandle error", n), n;
@@ -641,14 +643,14 @@ class Xr {
641
643
  }
642
644
  setHomeBtn(e) {
643
645
  try {
644
- window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setHomeBtn = e : Zr(e);
646
+ window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setHomeBtn = e : Qr(e);
645
647
  } catch (r) {
646
648
  throw console.error("setHomeBtn error", r), r;
647
649
  }
648
650
  }
649
651
  setFabBtn(e, r) {
650
652
  try {
651
- window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setFabBtn(e, r) : Yr(e, r);
653
+ window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setFabBtn(e, r) : Jr(e, r);
652
654
  } catch (n) {
653
655
  throw console.error("setFabBtn error", n), n;
654
656
  }
@@ -659,9 +661,9 @@ class Xr {
659
661
  try {
660
662
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
661
663
  n(() => {
662
- Ye(i);
664
+ Qe(i);
663
665
  }), o(() => {
664
- Ye();
666
+ Qe();
665
667
  });
666
668
  } catch (n) {
667
669
  throw console.error("touchListenerHandle error", n), n;
@@ -758,9 +760,9 @@ class Xr {
758
760
  try {
759
761
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
760
762
  n(() => {
761
- Ze(i);
763
+ Ye(i);
762
764
  }), o(() => {
763
- Ze();
765
+ Ye();
764
766
  });
765
767
  } catch (n) {
766
768
  throw console.error("sendDeepLinkListenerHandle error", n), n;
@@ -776,9 +778,9 @@ class Xr {
776
778
  try {
777
779
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
778
780
  n(() => {
779
- Xe(i);
781
+ Ze(i);
780
782
  }), o(() => {
781
- Xe();
783
+ Ze();
782
784
  });
783
785
  } catch (n) {
784
786
  throw console.error("sendSwitchLanguageHandle error", n), n;
@@ -794,9 +796,9 @@ class Xr {
794
796
  try {
795
797
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
796
798
  n(() => {
797
- er(i);
799
+ Xe(i);
798
800
  }), o(() => {
799
- er();
801
+ Xe();
800
802
  });
801
803
  } catch (n) {
802
804
  throw console.error("setupMiniAppHandle error", n), n;
@@ -812,9 +814,9 @@ class Xr {
812
814
  try {
813
815
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
814
816
  n(() => {
815
- rr(i);
817
+ er(i);
816
818
  }), o(() => {
817
- rr();
819
+ er();
818
820
  });
819
821
  } catch (n) {
820
822
  throw console.error("sendSwitchStoreHandle error", n), n;
@@ -862,9 +864,9 @@ class Xr {
862
864
  }
863
865
  }
864
866
  let oe = null;
865
- var _r;
866
- window.__MICRO_APP_ENVIRONMENT__ && (oe = (_r = window.rawWindow.__mini_app_status_hook__) != null ? _r : {});
867
- const Ee = d.registerPlugin("CameraScanPlugin", { web: new class extends y {
867
+ var ur;
868
+ window.__MICRO_APP_ENVIRONMENT__ && (oe = (ur = window.rawWindow.__mini_app_status_hook__) != null ? ur : {});
869
+ const Ee = u.registerPlugin("CameraScanPlugin", { web: new class extends y {
868
870
  pickCameraScan(t) {
869
871
  return a(this, null, function* () {
870
872
  return new Promise((e) => {
@@ -890,7 +892,7 @@ const Ee = d.registerPlugin("CameraScanPlugin", { web: new class extends y {
890
892
  }
891
893
  }() });
892
894
  window.removeAddListenerCameraScan = () => null;
893
- class et {
895
+ class Zr {
894
896
  pickCameraScan(e) {
895
897
  return a(this, null, function* () {
896
898
  try {
@@ -920,9 +922,9 @@ class et {
920
922
  }
921
923
  }
922
924
  let ae = null;
923
- var pr;
924
- window.__MICRO_APP_ENVIRONMENT__ && (ae = (pr = window.rawWindow.__mini_app_status_hook__) != null ? pr : {});
925
- const Re = d.registerPlugin("CameraScanMultiplePlugin", { web: new class extends y {
925
+ var _r;
926
+ window.__MICRO_APP_ENVIRONMENT__ && (ae = (_r = window.rawWindow.__mini_app_status_hook__) != null ? _r : {});
927
+ const Re = u.registerPlugin("CameraScanMultiplePlugin", { web: new class extends y {
926
928
  pickCameraScanMultiple() {
927
929
  return a(this, null, function* () {
928
930
  });
@@ -944,7 +946,7 @@ const Re = d.registerPlugin("CameraScanMultiplePlugin", { web: new class extends
944
946
  }
945
947
  }
946
948
  }() });
947
- class rt {
949
+ class Xr {
948
950
  pickCameraScanMultiple(e) {
949
951
  return a(this, null, function* () {
950
952
  try {
@@ -976,7 +978,7 @@ class rt {
976
978
  let ie = null;
977
979
  var hr;
978
980
  window.__MICRO_APP_ENVIRONMENT__ && (ie = (hr = window.rawWindow.__mini_app_status_hook__) != null ? hr : {});
979
- const ke = d.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
981
+ const ke = u.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
980
982
  pickCameraScanMultipleNoCount() {
981
983
  return a(this, null, function* () {
982
984
  });
@@ -998,7 +1000,7 @@ const ke = d.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class
998
1000
  }
999
1001
  }
1000
1002
  }() });
1001
- class tt {
1003
+ class et {
1002
1004
  pickCameraScanMultipleNoCount(e) {
1003
1005
  return a(this, null, function* () {
1004
1006
  try {
@@ -1028,9 +1030,9 @@ class tt {
1028
1030
  }
1029
1031
  }
1030
1032
  let se = null;
1031
- var mr;
1032
- window.__MICRO_APP_ENVIRONMENT__ && (se = (mr = window.rawWindow.__mini_app_status_hook__) != null ? mr : {});
1033
- const be = d.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends y {
1033
+ var pr;
1034
+ window.__MICRO_APP_ENVIRONMENT__ && (se = (pr = window.rawWindow.__mini_app_status_hook__) != null ? pr : {});
1035
+ const be = u.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends y {
1034
1036
  pickCameraScanSingleOrDual() {
1035
1037
  return a(this, null, function* () {
1036
1038
  });
@@ -1052,7 +1054,7 @@ const be = d.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class ext
1052
1054
  }
1053
1055
  }
1054
1056
  }() });
1055
- class nt {
1057
+ class rt {
1056
1058
  pickCameraScanSingleOrDual(e) {
1057
1059
  return a(this, null, function* () {
1058
1060
  try {
@@ -1081,11 +1083,11 @@ class nt {
1081
1083
  });
1082
1084
  }
1083
1085
  }
1084
- const Er = "LaserScanPlugin";
1086
+ const Ar = "LaserScanPlugin";
1085
1087
  let ce = null;
1086
- var gr;
1087
- window.__MICRO_APP_ENVIRONMENT__ && (ce = (gr = window.rawWindow.__mini_app_status_hook__) != null ? gr : {});
1088
- const X = d.registerPlugin(Er, { web: new class extends y {
1088
+ var mr;
1089
+ window.__MICRO_APP_ENVIRONMENT__ && (ce = (mr = window.rawWindow.__mini_app_status_hook__) != null ? mr : {});
1090
+ const X = u.registerPlugin(Ar, { web: new class extends y {
1089
1091
  pickLaserScan() {
1090
1092
  return a(this, null, function* () {
1091
1093
  });
@@ -1112,14 +1114,14 @@ const X = d.registerPlugin(Er, { web: new class extends y {
1112
1114
  }
1113
1115
  }() }), le = f();
1114
1116
  le.removeAddListenerLaserScan = () => null;
1115
- const tr = (t = () => null) => {
1117
+ const rr = (t = () => null) => {
1116
1118
  try {
1117
1119
  le.removeAddListenerLaserScan && le.removeAddListenerLaserScan();
1118
1120
  const e = (r) => a(void 0, null, function* () {
1119
1121
  r && (le.removeAddListenerLaserScan = yield ((n) => a(void 0, null, function* () {
1120
1122
  try {
1121
- if (d.addListener) {
1122
- const o = yield d.addListener(Er, "nativeSendLaser", (i) => n && n(i));
1123
+ if (u.addListener) {
1124
+ const o = yield u.addListener(Ar, "nativeSendLaser", (i) => n && n(i));
1123
1125
  return o != null && o.remove ? o.remove : () => null;
1124
1126
  }
1125
1127
  } catch (o) {
@@ -1134,7 +1136,7 @@ const tr = (t = () => null) => {
1134
1136
  throw console.error("laserScanFn error", e), e;
1135
1137
  }
1136
1138
  };
1137
- class ot {
1139
+ class tt {
1138
1140
  constructor() {
1139
1141
  this.pickLaserScan();
1140
1142
  }
@@ -1168,9 +1170,9 @@ class ot {
1168
1170
  try {
1169
1171
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
1170
1172
  n(() => {
1171
- tr(i);
1173
+ rr(i);
1172
1174
  }), o(() => {
1173
- tr();
1175
+ rr();
1174
1176
  });
1175
1177
  } catch (n) {
1176
1178
  throw console.error("laserScanApiParams error", n), n;
@@ -1187,11 +1189,11 @@ class ot {
1187
1189
  });
1188
1190
  }
1189
1191
  }
1190
- const Rr = "CountAssistPlugin";
1192
+ const Er = "CountAssistPlugin";
1191
1193
  let we = null;
1192
- var Pr;
1193
- window.__MICRO_APP_ENVIRONMENT__ && (we = (Pr = window.rawWindow.__mini_app_status_hook__) != null ? Pr : {});
1194
- const ee = d.registerPlugin(Rr, { web: new class extends y {
1194
+ var gr;
1195
+ window.__MICRO_APP_ENVIRONMENT__ && (we = (gr = window.rawWindow.__mini_app_status_hook__) != null ? gr : {});
1196
+ const ee = u.registerPlugin(Er, { web: new class extends y {
1195
1197
  setCountAssistState(t) {
1196
1198
  return a(this, null, function* () {
1197
1199
  try {
@@ -1239,12 +1241,12 @@ const ee = d.registerPlugin(Rr, { web: new class extends y {
1239
1241
  }
1240
1242
  }() }), D = f();
1241
1243
  D.addListenerCountAssistRemoveHandle = () => null;
1242
- const nr = (t = () => null) => a(void 0, null, function* () {
1244
+ const tr = (t = () => null) => a(void 0, null, function* () {
1243
1245
  try {
1244
1246
  D != null && D.addListenerCountAssistRemoveHandle && typeof D.addListenerCountAssistRemoveHandle == "function" && D.addListenerCountAssistRemoveHandle(), D.addListenerCountAssistRemoveHandle = yield ((e) => a(void 0, null, function* () {
1245
1247
  try {
1246
- if (d.addListener) {
1247
- const r = yield d.addListener(Rr, "nativeSendCountAssist", (n) => e && e(n));
1248
+ if (u.addListener) {
1249
+ const r = yield u.addListener(Er, "nativeSendCountAssist", (n) => e && e(n));
1248
1250
  return r != null && r.remove ? r.remove : () => null;
1249
1251
  }
1250
1252
  } catch (r) {
@@ -1255,7 +1257,7 @@ const nr = (t = () => null) => a(void 0, null, function* () {
1255
1257
  throw console.error("initCountAssistFn error", e), e;
1256
1258
  }
1257
1259
  });
1258
- class at {
1260
+ class nt {
1259
1261
  setCountAssistState(e) {
1260
1262
  return a(this, null, function* () {
1261
1263
  return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCountAssistState(e) : yield ee.setCountAssistState(e);
@@ -1278,9 +1280,9 @@ class at {
1278
1280
  try {
1279
1281
  const { mounted: n, beforeUnmount: o, callBack: i } = r;
1280
1282
  n(() => {
1281
- nr(i);
1283
+ tr(i);
1282
1284
  }), o(() => {
1283
- nr();
1285
+ tr();
1284
1286
  });
1285
1287
  } catch (n) {
1286
1288
  throw console.error("setCountAssistBtnHandle error", n), n;
@@ -1308,9 +1310,9 @@ class at {
1308
1310
  }
1309
1311
  }
1310
1312
  let de = null;
1311
- var yr;
1312
- window.__MICRO_APP_ENVIRONMENT__ && (de = (yr = window.rawWindow.__mini_app_status_hook__) != null ? yr : {});
1313
- const Te = d.registerPlugin("ClickStreamPlugin", { web: new class extends y {
1313
+ var Pr;
1314
+ window.__MICRO_APP_ENVIRONMENT__ && (de = (Pr = window.rawWindow.__mini_app_status_hook__) != null ? Pr : {});
1315
+ const Te = u.registerPlugin("ClickStreamPlugin", { web: new class extends y {
1314
1316
  init() {
1315
1317
  return a(this, null, function* () {
1316
1318
  return new Promise((t) => {
@@ -1343,7 +1345,7 @@ const Te = d.registerPlugin("ClickStreamPlugin", { web: new class extends y {
1343
1345
  }
1344
1346
  }
1345
1347
  }() });
1346
- class it {
1348
+ class ot {
1347
1349
  constructor() {
1348
1350
  this.init();
1349
1351
  }
@@ -1375,12 +1377,12 @@ class it {
1375
1377
  });
1376
1378
  }
1377
1379
  }
1378
- const kr = "MiniAppLifecyclePlugin";
1380
+ const Rr = "MiniAppLifecyclePlugin";
1379
1381
  let ue = null;
1380
- var Sr;
1381
- window.__MICRO_APP_ENVIRONMENT__ && (ue = (Sr = window.rawWindow.__mini_app_status_hook__) != null ? Sr : {});
1382
+ var yr;
1383
+ window.__MICRO_APP_ENVIRONMENT__ && (ue = (yr = window.rawWindow.__mini_app_status_hook__) != null ? yr : {});
1382
1384
  var Q = ((t) => (t.MINI_APP_BEFORE_UNMOUNT_PERMISSION = "mini_app_before_unmount_permission", t.MINI_APP_BEFORE_UNMOUNT_COMPLETION = "mini_app_before_unmount_completion", t))(Q || {});
1383
- const Be = d.registerPlugin(kr, { web: new class extends y {
1385
+ const Be = u.registerPlugin(Rr, { web: new class extends y {
1384
1386
  setNativeUsagePermission() {
1385
1387
  return a(this, null, function* () {
1386
1388
  });
@@ -1403,14 +1405,14 @@ const Be = d.registerPlugin(kr, { web: new class extends y {
1403
1405
  }
1404
1406
  }() }), _e = f();
1405
1407
  _e.removeAddListenerLifecycleMiniAppBeforeUnmount = () => null;
1406
- const or = (t = () => null) => {
1408
+ const nr = (t = () => null) => {
1407
1409
  try {
1408
1410
  _e.removeAddListenerLifecycleMiniAppBeforeUnmount && _e.removeAddListenerLifecycleMiniAppBeforeUnmount();
1409
1411
  const e = (r) => a(void 0, null, function* () {
1410
1412
  r && (_e.removeAddListenerLifecycleMiniAppBeforeUnmount = yield ((n) => a(void 0, null, function* () {
1411
1413
  try {
1412
- if (d.addListener) {
1413
- const o = yield d.addListener(kr, "miniAppBeforeUnmount", (i) => n && n(i));
1414
+ if (u.addListener) {
1415
+ const o = yield u.addListener(Rr, "miniAppBeforeUnmount", (i) => n && n(i));
1414
1416
  return o != null && o.remove ? o.remove : () => null;
1415
1417
  }
1416
1418
  } catch (o) {
@@ -1425,7 +1427,7 @@ const or = (t = () => null) => {
1425
1427
  throw console.error("laserScanFn error", e), e;
1426
1428
  }
1427
1429
  };
1428
- class st {
1430
+ class at {
1429
1431
  constructor() {
1430
1432
  }
1431
1433
  setNativeUsagePermission(e) {
@@ -1451,21 +1453,21 @@ class st {
1451
1453
  try {
1452
1454
  const { mounted: o, beforeUnmount: i, callBack: c } = r;
1453
1455
  o(() => {
1454
- or((s) => a(this, null, function* () {
1456
+ nr((s) => a(this, null, function* () {
1455
1457
  var l;
1456
1458
  if (c && c instanceof Function)
1457
1459
  try {
1458
1460
  (l = c(s)) == null || l.then(() => a(this, null, function* () {
1459
1461
  yield n.setNativeUsagePermission({ action: Q.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 }), yield n.authorizeWebCallback({ action: Q.MINI_APP_BEFORE_UNMOUNT_COMPLETION });
1460
1462
  }));
1461
- } catch (u) {
1463
+ } catch (w) {
1462
1464
  console.error("miniAppBeforeUnmount error callBack is not a function or promise");
1463
1465
  }
1464
1466
  else
1465
1467
  console.error("miniAppBeforeUnmount error callBack is not a function or promise");
1466
1468
  }));
1467
1469
  }), i(() => a(this, null, function* () {
1468
- or(), n.setNativeUsagePermission({ action: Q.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
1470
+ nr(), n.setNativeUsagePermission({ action: Q.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
1469
1471
  }));
1470
1472
  } catch (o) {
1471
1473
  throw console.error("miniAppBeforeUnmount error", o), o;
@@ -1482,10 +1484,10 @@ class st {
1482
1484
  });
1483
1485
  }
1484
1486
  }
1485
- let pe = null;
1486
- var Nr;
1487
- window.__MICRO_APP_ENVIRONMENT__ && (pe = (Nr = window.rawWindow.__mini_app_status_hook__) != null ? Nr : {});
1488
- const Ve = d.registerPlugin("DeviceInteractionPlugin", { web: new class extends y {
1487
+ let he = null;
1488
+ var Sr;
1489
+ window.__MICRO_APP_ENVIRONMENT__ && (he = (Sr = window.rawWindow.__mini_app_status_hook__) != null ? Sr : {});
1490
+ const Ve = u.registerPlugin("DeviceInteractionPlugin", { web: new class extends y {
1489
1491
  callVibrate() {
1490
1492
  return a(this, null, function* () {
1491
1493
  });
@@ -1498,7 +1500,7 @@ const Ve = d.registerPlugin("DeviceInteractionPlugin", { web: new class extends
1498
1500
  try {
1499
1501
  return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1500
1502
  var e, r;
1501
- t((yield (r = (e = pe == null ? void 0 : pe.deviceInteraction) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1503
+ t((yield (r = (e = he == null ? void 0 : he.deviceInteraction) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1502
1504
  })) : new Promise((t) => {
1503
1505
  t(null);
1504
1506
  });
@@ -1507,7 +1509,7 @@ const Ve = d.registerPlugin("DeviceInteractionPlugin", { web: new class extends
1507
1509
  }
1508
1510
  }
1509
1511
  }() });
1510
- class ct {
1512
+ class it {
1511
1513
  callVibrate() {
1512
1514
  return a(this, null, function* () {
1513
1515
  try {
@@ -1536,11 +1538,11 @@ class ct {
1536
1538
  });
1537
1539
  }
1538
1540
  }
1539
- const br = "PollingPlugin";
1540
- let he = null;
1541
- var fr;
1542
- window.__MICRO_APP_ENVIRONMENT__ && (he = (fr = window.rawWindow.__mini_app_status_hook__) != null ? fr : {});
1543
- const He = d.registerPlugin(br, { web: new class extends y {
1541
+ const kr = "PollingPlugin";
1542
+ let pe = null;
1543
+ var Nr;
1544
+ window.__MICRO_APP_ENVIRONMENT__ && (pe = (Nr = window.rawWindow.__mini_app_status_hook__) != null ? Nr : {});
1545
+ const He = u.registerPlugin(kr, { web: new class extends y {
1544
1546
  create() {
1545
1547
  return a(this, null, function* () {
1546
1548
  });
@@ -1553,7 +1555,7 @@ const He = d.registerPlugin(br, { web: new class extends y {
1553
1555
  try {
1554
1556
  return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1555
1557
  var e, r;
1556
- t((yield (r = (e = he == null ? void 0 : he.polling) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1558
+ t((yield (r = (e = pe == null ? void 0 : pe.polling) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1557
1559
  })) : new Promise((t) => {
1558
1560
  t(null);
1559
1561
  });
@@ -1563,15 +1565,15 @@ const He = d.registerPlugin(br, { web: new class extends y {
1563
1565
  }
1564
1566
  }() }), me = f();
1565
1567
  me.removeAddListenerPolling = () => null;
1566
- const lt = (t, e) => {
1568
+ const st = (t, e) => {
1567
1569
  try {
1568
1570
  me.removeAddListenerPolling && me.removeAddListenerPolling();
1569
1571
  const r = e.pollingId;
1570
1572
  ((n) => a(void 0, null, function* () {
1571
1573
  return n && (me.removeAddListenerPolling = yield ((o) => a(void 0, null, function* () {
1572
1574
  try {
1573
- if (d.addListener) {
1574
- const i = yield d.addListener(br, "nativeSendPolling", (c) => o && o(c));
1575
+ if (u.addListener) {
1576
+ const i = yield u.addListener(kr, "nativeSendPolling", (c) => o && o(c));
1575
1577
  return i != null && i.remove ? i.remove : () => null;
1576
1578
  }
1577
1579
  } catch (i) {
@@ -1587,7 +1589,7 @@ const lt = (t, e) => {
1587
1589
  throw console.error("pollingFn error", r), r;
1588
1590
  }
1589
1591
  };
1590
- class wt {
1592
+ class ct {
1591
1593
  constructor() {
1592
1594
  P(this, "pollingList");
1593
1595
  this.pollingList = [];
@@ -1597,19 +1599,19 @@ class wt {
1597
1599
  if (window.__MICRO_APP_ENVIRONMENT__) {
1598
1600
  const { mounted: i, pollingParams: c, callBack: s } = e;
1599
1601
  return i(() => {
1600
- var l, u;
1601
- (u = (l = window.rawWindow.__mini_app_hook__) == null ? void 0 : l.addPolling) == null || u.call(l, c, s);
1602
+ var l, w;
1603
+ (w = (l = window.rawWindow.__mini_app_hook__) == null ? void 0 : l.addPolling) == null || w.call(l, c, s);
1602
1604
  }), () => {
1603
1605
  this.destroy({ pollingId: c.pollingId });
1604
1606
  };
1605
1607
  }
1606
1608
  try {
1607
- (r = e == null ? void 0 : e.pollingParams) != null && r.pollingId && this.pollingList.push({ pollingId: (n = e == null ? void 0 : e.pollingParams) == null ? void 0 : n.pollingId, callBack: e == null ? void 0 : e.callBack }), this.pollingList = this.pollingList.filter((c, s, l) => s === l.findIndex((u) => u.pollingId === c.pollingId));
1609
+ (r = e == null ? void 0 : e.pollingParams) != null && r.pollingId && this.pollingList.push({ pollingId: (n = e == null ? void 0 : e.pollingParams) == null ? void 0 : n.pollingId, callBack: e == null ? void 0 : e.callBack }), this.pollingList = this.pollingList.filter((c, s, l) => s === l.findIndex((w) => w.pollingId === c.pollingId));
1608
1610
  const i = ((o = e == null ? void 0 : e.pollingParams) == null ? void 0 : o.delay) / 1e3;
1609
1611
  return He.create(T(b({}, e == null ? void 0 : e.pollingParams), { delay: i })), ((c, s) => {
1610
1612
  try {
1611
- const { mounted: l, pollingParams: u } = c;
1612
- l(() => lt(s, u));
1613
+ const { mounted: l, pollingParams: w } = c;
1614
+ l(() => st(s, w));
1613
1615
  } catch (l) {
1614
1616
  throw console.error("createPolling error", l), l;
1615
1617
  }
@@ -1645,9 +1647,9 @@ class wt {
1645
1647
  }
1646
1648
  }
1647
1649
  let ge = null;
1648
- var Mr;
1649
- window.__MICRO_APP_ENVIRONMENT__ && (ge = (Mr = window.rawWindow.__mini_app_status_hook__) != null ? Mr : {});
1650
- const ar = d.registerPlugin("PaymentPlugin", { web: new class extends y {
1650
+ var fr;
1651
+ window.__MICRO_APP_ENVIRONMENT__ && (ge = (fr = window.rawWindow.__mini_app_status_hook__) != null ? fr : {});
1652
+ const or = u.registerPlugin("PaymentPlugin", { web: new class extends y {
1651
1653
  process(t) {
1652
1654
  return a(this, null, function* () {
1653
1655
  try {
@@ -1672,11 +1674,11 @@ const ar = d.registerPlugin("PaymentPlugin", { web: new class extends y {
1672
1674
  }
1673
1675
  }
1674
1676
  }() });
1675
- class dt {
1677
+ class lt {
1676
1678
  process(e) {
1677
1679
  return a(this, null, function* () {
1678
1680
  try {
1679
- return yield ar.process(e);
1681
+ return yield or.process(e);
1680
1682
  } catch (r) {
1681
1683
  throw console.error("paymentPlugins.process error", r), r;
1682
1684
  }
@@ -1685,7 +1687,7 @@ class dt {
1685
1687
  getStatus() {
1686
1688
  return a(this, null, function* () {
1687
1689
  try {
1688
- return yield ar.getStatus();
1690
+ return yield or.getStatus();
1689
1691
  } catch (e) {
1690
1692
  throw console.error("getStatus error", e), e;
1691
1693
  }
@@ -1693,9 +1695,9 @@ class dt {
1693
1695
  }
1694
1696
  }
1695
1697
  let Pe = null;
1696
- var Ir;
1697
- window.__MICRO_APP_ENVIRONMENT__ && (Pe = (Ir = window.rawWindow.__mini_app_status_hook__) != null ? Ir : {});
1698
- const Fe = d.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends y {
1698
+ var Mr;
1699
+ window.__MICRO_APP_ENVIRONMENT__ && (Pe = (Mr = window.rawWindow.__mini_app_status_hook__) != null ? Mr : {});
1700
+ const Ue = u.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends y {
1699
1701
  pickCameraForTakePhoto() {
1700
1702
  return a(this, null, function* () {
1701
1703
  });
@@ -1717,11 +1719,11 @@ const Fe = d.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends
1717
1719
  }
1718
1720
  }
1719
1721
  }() });
1720
- class ut {
1722
+ class wt {
1721
1723
  pickCameraForTakePhoto() {
1722
1724
  return a(this, null, function* () {
1723
1725
  try {
1724
- return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraForTakePhoto() : yield Fe.pickCameraForTakePhoto();
1726
+ return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraForTakePhoto() : yield Ue.pickCameraForTakePhoto();
1725
1727
  } catch (e) {
1726
1728
  throw console.error("pickCameraForTakePhoto error", e), e;
1727
1729
  }
@@ -1730,7 +1732,7 @@ class ut {
1730
1732
  setCameraForTakePhotoState(e) {
1731
1733
  return a(this, null, function* () {
1732
1734
  try {
1733
- return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraForTakePhotoState(e) : yield Fe.setCameraForTakePhotoState(e);
1735
+ return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraForTakePhotoState(e) : yield Ue.setCameraForTakePhotoState(e);
1734
1736
  } catch (r) {
1735
1737
  throw console.error("setCameraForTakePhotoState error", r), r;
1736
1738
  }
@@ -1739,7 +1741,7 @@ class ut {
1739
1741
  getStatus() {
1740
1742
  return a(this, null, function* () {
1741
1743
  try {
1742
- return yield Fe.getStatus();
1744
+ return yield Ue.getStatus();
1743
1745
  } catch (e) {
1744
1746
  throw console.error("cameraForTakePhotoPlugin getStatus error", e), e;
1745
1747
  }
@@ -1747,9 +1749,9 @@ class ut {
1747
1749
  }
1748
1750
  }
1749
1751
  let ye = null;
1750
- var Cr;
1751
- window.__MICRO_APP_ENVIRONMENT__ && (ye = (Cr = window.rawWindow.__mini_app_status_hook__) != null ? Cr : {});
1752
- const ir = d.registerPlugin("HttpPlugin", { web: new class extends y {
1752
+ var Ir;
1753
+ window.__MICRO_APP_ENVIRONMENT__ && (ye = (Ir = window.rawWindow.__mini_app_status_hook__) != null ? Ir : {});
1754
+ const ar = u.registerPlugin("HttpPlugin", { web: new class extends y {
1753
1755
  request(t) {
1754
1756
  return a(this, null, function* () {
1755
1757
  return new Promise((e) => {
@@ -1770,7 +1772,7 @@ const ir = d.registerPlugin("HttpPlugin", { web: new class extends y {
1770
1772
  }
1771
1773
  }
1772
1774
  }() });
1773
- class _t {
1775
+ class dt {
1774
1776
  request(e) {
1775
1777
  return a(this, null, function* () {
1776
1778
  try {
@@ -1778,7 +1780,7 @@ class _t {
1778
1780
  return window.rawWindow.__mini_app_hook__.requestHttp(e);
1779
1781
  {
1780
1782
  let r = {};
1781
- return e.url && (r.url = e.url), e.method && (r.method = e.method), e.headers && (r.headers = e.headers), e.params && (r.urlParams = e.params), e.data && (typeof e.data == "string" ? r.bodyData = e.data : r.bodyParams = e.data), e.upload && (r.upload = e.upload), yield ir.request(r);
1783
+ return e.url && (r.url = e.url), e.method && (r.method = e.method), e.headers && (r.headers = e.headers), e.params && (r.urlParams = e.params), e.data && (typeof e.data == "string" ? r.bodyData = e.data : r.bodyParams = e.data), e.upload && (r.upload = e.upload), yield ar.request(r);
1782
1784
  }
1783
1785
  } catch (r) {
1784
1786
  throw console.error("HttpPlugin, trace error", r), r;
@@ -1788,7 +1790,7 @@ class _t {
1788
1790
  getStatus() {
1789
1791
  return a(this, null, function* () {
1790
1792
  try {
1791
- return yield ir.getStatus();
1793
+ return yield ar.getStatus();
1792
1794
  } catch (e) {
1793
1795
  throw console.error("HttpPlugin getStatus error", e), e;
1794
1796
  }
@@ -1798,12 +1800,12 @@ class _t {
1798
1800
  const S = [];
1799
1801
  for (let t = 0; t < 256; ++t)
1800
1802
  S.push((t + 256).toString(16).slice(1));
1801
- const pt = new Uint8Array(16);
1802
- function ht(t, e, r) {
1803
+ const ut = new Uint8Array(16);
1804
+ function _t(t, e, r) {
1803
1805
  return e || t || !crypto.randomUUID ? function(n, o, i) {
1804
- var s, l, u;
1806
+ var s, l, w;
1805
1807
  n = n || {};
1806
- const c = (u = (l = n.random) != null ? l : (s = n.rng) == null ? void 0 : s.call(n)) != null ? u : crypto.getRandomValues(pt);
1808
+ const c = (w = (l = n.random) != null ? l : (s = n.rng) == null ? void 0 : s.call(n)) != null ? w : crypto.getRandomValues(ut);
1807
1809
  if (c.length < 16)
1808
1810
  throw new Error("Random bytes length must be >= 16");
1809
1811
  if (c[6] = 15 & c[6] | 64, c[8] = 63 & c[8] | 128, o) {
@@ -1813,16 +1815,16 @@ function ht(t, e, r) {
1813
1815
  o[i + _] = c[_];
1814
1816
  return o;
1815
1817
  }
1816
- return function(_, h = 0) {
1817
- return (S[_[h + 0]] + S[_[h + 1]] + S[_[h + 2]] + S[_[h + 3]] + "-" + S[_[h + 4]] + S[_[h + 5]] + "-" + S[_[h + 6]] + S[_[h + 7]] + "-" + S[_[h + 8]] + S[_[h + 9]] + "-" + S[_[h + 10]] + S[_[h + 11]] + S[_[h + 12]] + S[_[h + 13]] + S[_[h + 14]] + S[_[h + 15]]).toLowerCase();
1818
+ return function(_, p = 0) {
1819
+ return (S[_[p + 0]] + S[_[p + 1]] + S[_[p + 2]] + S[_[p + 3]] + "-" + S[_[p + 4]] + S[_[p + 5]] + "-" + S[_[p + 6]] + S[_[p + 7]] + "-" + S[_[p + 8]] + S[_[p + 9]] + "-" + S[_[p + 10]] + S[_[p + 11]] + S[_[p + 12]] + S[_[p + 13]] + S[_[p + 14]] + S[_[p + 15]]).toLowerCase();
1818
1820
  }(c);
1819
1821
  }(t, e, r) : crypto.randomUUID();
1820
1822
  }
1821
- const Tr = "PrintPlugin";
1823
+ const br = "PrintPlugin";
1822
1824
  let Se = null;
1823
- var Or;
1824
- window.__MICRO_APP_ENVIRONMENT__ && (Se = (Or = window.rawWindow.__mini_app_status_hook__) != null ? Or : {});
1825
- const sr = d.registerPlugin(Tr, { web: new class extends y {
1825
+ var Cr;
1826
+ window.__MICRO_APP_ENVIRONMENT__ && (Se = (Cr = window.rawWindow.__mini_app_status_hook__) != null ? Cr : {});
1827
+ const ir = u.registerPlugin(br, { web: new class extends y {
1826
1828
  print() {
1827
1829
  }
1828
1830
  getStatus() {
@@ -1839,15 +1841,15 @@ const sr = d.registerPlugin(Tr, { web: new class extends y {
1839
1841
  }
1840
1842
  }() }), Y = f();
1841
1843
  Y.removeAddListenerPrintList = {};
1842
- const mt = (t, e) => {
1844
+ const ht = (t, e) => {
1843
1845
  try {
1844
1846
  const r = e.printId;
1845
1847
  Y.removeAddListenerPrintList = T(b({}, Y.removeAddListenerPrintList), { printId: () => {
1846
1848
  } }), ((n) => a(void 0, null, function* () {
1847
1849
  return n && (Y.removeAddListenerPrintList[r] = yield ((o) => a(void 0, null, function* () {
1848
1850
  try {
1849
- if (d.addListener) {
1850
- const i = yield d.addListener(Tr, "nativeSendPrint", (c) => o && o(c));
1851
+ if (u.addListener) {
1852
+ const i = yield u.addListener(br, "nativeSendPrint", (c) => o && o(c));
1851
1853
  return i != null && i.remove ? i.remove : () => null;
1852
1854
  }
1853
1855
  } catch (i) {
@@ -1864,25 +1866,25 @@ const mt = (t, e) => {
1864
1866
  throw console.error("printFn error", r), r;
1865
1867
  }
1866
1868
  };
1867
- class gt {
1869
+ class pt {
1868
1870
  constructor() {
1869
1871
  P(this, "printList");
1870
1872
  this.printList = [];
1871
1873
  }
1872
1874
  print(e) {
1873
1875
  var n, o, i, c;
1874
- const r = ((o = (n = e == null ? void 0 : e.printParams) == null ? void 0 : n.functionId) != null ? o : "") + ht().replace(/-/g, "");
1875
- if (this.printList.push({ printId: r, callBack: e == null ? void 0 : e.callBack }), this.printList = this.printList.filter((s, l, u) => l === u.findIndex((_) => _.printId === s.printId)), window.__MICRO_APP_ENVIRONMENT__) {
1876
+ const r = ((o = (n = e == null ? void 0 : e.printParams) == null ? void 0 : n.functionId) != null ? o : "") + _t().replace(/-/g, "");
1877
+ if (this.printList.push({ printId: r, callBack: e == null ? void 0 : e.callBack }), this.printList = this.printList.filter((s, l, w) => l === w.findIndex((_) => _.printId === s.printId)), window.__MICRO_APP_ENVIRONMENT__) {
1876
1878
  const { printParams: s, callBack: l } = e;
1877
1879
  return (c = (i = window.rawWindow.__mini_app_hook__) == null ? void 0 : i.print) == null || c.call(i, T(b({}, s), { printId: r }), l), { id: r };
1878
1880
  }
1879
1881
  try {
1880
- return sr.print(T(b({}, e == null ? void 0 : e.printParams), { printId: r })), ((s, l) => {
1882
+ return ir.print(T(b({}, e == null ? void 0 : e.printParams), { printId: r })), ((s, l) => {
1881
1883
  try {
1882
- const { printParams: u } = s;
1883
- mt(l, u);
1884
- } catch (u) {
1885
- throw console.error("createPrint error", u), u;
1884
+ const { printParams: w } = s;
1885
+ ht(l, w);
1886
+ } catch (w) {
1887
+ throw console.error("createPrint error", w), w;
1886
1888
  }
1887
1889
  })(T(b({}, e), { printParams: T(b({}, e.printParams), { printId: r }) }), this), { id: r };
1888
1890
  } catch (s) {
@@ -1892,7 +1894,7 @@ class gt {
1892
1894
  getStatus() {
1893
1895
  return a(this, null, function* () {
1894
1896
  try {
1895
- return yield sr.getStatus();
1897
+ return yield ir.getStatus();
1896
1898
  } catch (e) {
1897
1899
  throw console.error("getStatus error", e), e;
1898
1900
  }
@@ -1900,27 +1902,24 @@ class gt {
1900
1902
  }
1901
1903
  }
1902
1904
  let Ne = null;
1903
- var Lr;
1904
- window.__MICRO_APP_ENVIRONMENT__ && (Ne = (Lr = window.rawWindow.__mini_app_status_hook__) != null ? Lr : {});
1905
+ var Or;
1906
+ window.__MICRO_APP_ENVIRONMENT__ && (Ne = (Or = window.rawWindow.__mini_app_status_hook__) != null ? Or : {});
1905
1907
  const J = (t, e, r = "", n = "") => ({ success: t, message: e, type: r, fileName: n }), We = (t) => {
1906
1908
  var e;
1907
1909
  return (e = t == null ? void 0 : t.trim().replace(/^\.+/, "").toLowerCase()) != null ? e : "";
1908
- }, Br = (t, e) => {
1909
- const r = ((n) => {
1910
- var c, s, l;
1911
- const o = We(n);
1912
- return o ? o.includes("/") ? (l = (s = ((c = o.split("/").pop()) != null ? c : "").split("+").pop()) == null ? void 0 : s.split(".").pop()) != null ? l : "" : o : "";
1913
- })(e);
1910
+ }, sr = (t, e) => {
1911
+ const r = We(e);
1914
1912
  return !r || t.toLowerCase().endsWith(`.${r}`) ? t : `${t}.${r}`;
1915
1913
  }, cr = (t) => {
1916
- var i;
1917
- const e = (i = t == null ? void 0 : t.trim()) != null ? i : "", r = e.lastIndexOf(".");
1918
- if (r <= 0 || r === e.length - 1)
1919
- return { name: e, type: "", fileName: e };
1920
- const n = e.slice(0, r), o = We(e.slice(r + 1));
1921
- return { name: n, type: o, fileName: o ? Br(n, o) : e };
1922
- }, lr = (t) => {
1923
- const e = cr(t == null ? void 0 : t.fileName), r = cr(((i) => {
1914
+ var o;
1915
+ const e = ((i) => {
1916
+ var _;
1917
+ const c = (_ = i == null ? void 0 : i.trim()) != null ? _ : "", s = c.lastIndexOf(".");
1918
+ if (s <= 0 || s === c.length - 1)
1919
+ return { name: c, type: "", fileName: c };
1920
+ const l = c.slice(0, s), w = We(c.slice(s + 1));
1921
+ return { name: l, type: w, fileName: w ? sr(l, w) : c };
1922
+ })(((i) => {
1924
1923
  if (!i)
1925
1924
  return "";
1926
1925
  try {
@@ -1929,26 +1928,26 @@ const J = (t, e, r = "", n = "") => ({ success: t, message: e, type: r, fileName
1929
1928
  } catch (c) {
1930
1929
  return "";
1931
1930
  }
1932
- })(t == null ? void 0 : t.url)), n = We(t == null ? void 0 : t.type) || e.type || r.type, o = e.name || r.name || `path_${Date.now()}`;
1933
- return { type: n, fileName: n ? Br(o, n) : o };
1934
- }, wr = d.registerPlugin("DownloadFilePlugin", { web: new class extends y {
1931
+ })(t == null ? void 0 : t.url)), r = e.type || We(t == null ? void 0 : t.type), n = ((o = t == null ? void 0 : t.fileName) == null ? void 0 : o.trim()) || e.name || `path_${Date.now()}`;
1932
+ return { type: r, fileName: n, downloadFileName: r ? sr(n, r) : n };
1933
+ }, lr = u.registerPlugin("DownloadFilePlugin", { web: new class extends y {
1935
1934
  downloadFile(t) {
1936
1935
  return a(this, null, function* () {
1937
1936
  var e;
1938
1937
  try {
1939
- const { type: r, fileName: n } = lr(t), o = (e = t == null ? void 0 : t.url) == null ? void 0 : e.trim();
1938
+ const { type: r, fileName: n, downloadFileName: o } = cr(t), i = (e = t == null ? void 0 : t.url) == null ? void 0 : e.trim();
1940
1939
  if (!r)
1941
1940
  return J(!1, "Missing required parameter: type", r, n);
1942
- if (!o)
1941
+ if (!i)
1943
1942
  return J(!1, "Missing required parameter: url", r, n);
1944
- const i = yield fetch(o, t == null ? void 0 : t.fetchOptions);
1945
- if (!i.ok)
1946
- return J(!1, `HTTP error! status: ${i.status}`, r, n);
1947
- const c = yield i.blob(), s = window.URL.createObjectURL(c), l = document.createElement("a");
1948
- return l.href = s, l.download = n, document.body.appendChild(l), l.click(), l.remove(), window.setTimeout(() => window.URL.revokeObjectURL(s), 0), J(!0, "download success", r, n);
1943
+ const c = yield fetch(i, t == null ? void 0 : t.fetchOptions);
1944
+ if (!c.ok)
1945
+ return J(!1, `HTTP error! status: ${c.status}`, r, n);
1946
+ const s = yield c.blob(), l = window.URL.createObjectURL(s), w = document.createElement("a");
1947
+ return w.href = l, w.download = o, document.body.appendChild(w), w.click(), w.remove(), window.setTimeout(() => window.URL.revokeObjectURL(l), 0), J(!0, "download success", r, n);
1949
1948
  } catch (r) {
1950
1949
  console.error("downloadFile error", r);
1951
- const { type: n, fileName: o } = lr(t);
1950
+ const { type: n, fileName: o } = cr(t);
1952
1951
  return J(!1, r instanceof Error ? r.message : "download failed", n, o);
1953
1952
  }
1954
1953
  });
@@ -1965,94 +1964,88 @@ const J = (t, e, r = "", n = "") => ({ success: t, message: e, type: r, fileName
1965
1964
  throw console.error("downloadFile getStatus error", t), t;
1966
1965
  }
1967
1966
  }
1968
- }() }), De = (t) => {
1967
+ }() }), wr = (t) => {
1969
1968
  var e;
1970
1969
  return (e = t == null ? void 0 : t.trim().replace(/^\.+/, "").toLowerCase()) != null ? e : "";
1971
- }, Pt = (t, e) => {
1972
- const r = ((n) => {
1973
- var c, s, l;
1974
- const o = De(n);
1975
- return o ? o.includes("/") ? (l = (s = ((c = o.split("/").pop()) != null ? c : "").split("+").pop()) == null ? void 0 : s.split(".").pop()) != null ? l : "" : o : "";
1976
- })(e);
1977
- return !r || t.toLowerCase().endsWith(`.${r}`) ? t : `${t}.${r}`;
1978
- }, dr = (t) => {
1970
+ }, dr = (t, e) => {
1979
1971
  var n;
1980
- const e = (n = t == null ? void 0 : t.trim()) != null ? n : "", r = e.lastIndexOf(".");
1981
- return r <= 0 || r === e.length - 1 ? { name: e, type: "" } : { name: e.slice(0, r), type: De(e.slice(r + 1)) };
1982
- }, ur = (t, e) => {
1983
- const r = dr(t == null ? void 0 : t.fileName), n = dr(((c) => {
1984
- if (!c)
1972
+ const r = ((o) => {
1973
+ var s;
1974
+ const i = (s = o == null ? void 0 : o.trim()) != null ? s : "", c = i.lastIndexOf(".");
1975
+ return c <= 0 || c === i.length - 1 ? { name: i, type: "" } : { name: i.slice(0, c), type: wr(i.slice(c + 1)) };
1976
+ })(((o) => {
1977
+ if (!o)
1985
1978
  return "";
1986
1979
  try {
1987
- const s = new URL(c, window.location.href).pathname.split("/").filter(Boolean).pop();
1988
- return s ? decodeURIComponent(s) : "";
1989
- } catch (s) {
1980
+ const i = new URL(o, window.location.href).pathname.split("/").filter(Boolean).pop();
1981
+ return i ? decodeURIComponent(i) : "";
1982
+ } catch (i) {
1990
1983
  return "";
1991
1984
  }
1992
- })(t == null ? void 0 : t.url)), o = De(t == null ? void 0 : t.type) || r.type || n.type, i = r.name || n.name || `path_${Date.now()}`;
1993
- return { success: !1, message: e, type: o, fileName: o ? Pt(i, o) : i };
1985
+ })(t == null ? void 0 : t.url));
1986
+ return { success: !1, message: e, type: r.type || wr(t == null ? void 0 : t.type), fileName: ((n = t == null ? void 0 : t.fileName) == null ? void 0 : n.trim()) || r.name || `path_${Date.now()}` };
1994
1987
  };
1995
- class yt {
1988
+ class mt {
1996
1989
  downloadFile(e) {
1997
1990
  return a(this, null, function* () {
1998
1991
  try {
1999
1992
  if (window.__MICRO_APP_ENVIRONMENT__) {
2000
1993
  const r = window.rawWindow.__mini_app_hook__.downloadFile;
2001
- return r ? yield r(e) : ur(e, "DownloadFilePlugin is not available");
1994
+ return r ? yield r(e) : dr(e, "DownloadFilePlugin is not available");
2002
1995
  }
2003
- return yield wr.downloadFile(e);
1996
+ return yield lr.downloadFile(e);
2004
1997
  } catch (r) {
2005
- return console.error("downloadFile error", r), ur(e, r instanceof Error ? r.message : "download failed");
1998
+ return console.error("downloadFile error", r), dr(e, r instanceof Error ? r.message : "download failed");
2006
1999
  }
2007
2000
  });
2008
2001
  }
2009
2002
  getStatus() {
2010
2003
  return a(this, null, function* () {
2011
2004
  try {
2012
- return yield wr.getStatus();
2005
+ return yield lr.getStatus();
2013
2006
  } catch (e) {
2014
2007
  throw console.error("downloadFile getStatus error", e), e;
2015
2008
  }
2016
2009
  });
2017
2010
  }
2018
2011
  }
2019
- class St {
2012
+ class gt {
2020
2013
  constructor() {
2021
- P(this, "initialContextPlugins", new Qr());
2022
- P(this, "communicatePlugins", new Xr());
2023
- P(this, "cameraScanPlugins", new et());
2024
- P(this, "cameraScanMultiplePlugins", new rt());
2025
- P(this, "cameraScanMultipleNoCountPlugins", new tt());
2026
- P(this, "cameraScanSingleOrDualPlugins", new nt());
2027
- P(this, "laserScanPlugins", new ot());
2028
- P(this, "countAssistPlugins", new at());
2029
- P(this, "clickStreamPlugins", new it());
2030
- P(this, "lifecyclePlugins", new st());
2031
- P(this, "deviceInteractionPlugins", new ct());
2032
- P(this, "pollingPlugins", new wt());
2033
- P(this, "paymentPlugins", new dt());
2034
- P(this, "cameraForTakePhotoPlugin", new ut());
2035
- P(this, "httpPlugin", new _t());
2036
- P(this, "printPlugins", new gt());
2037
- P(this, "downloadFilePlugin", new yt());
2014
+ P(this, "initialContextPlugins", new Gr());
2015
+ P(this, "communicatePlugins", new Yr());
2016
+ P(this, "cameraScanPlugins", new Zr());
2017
+ P(this, "cameraScanMultiplePlugins", new Xr());
2018
+ P(this, "cameraScanMultipleNoCountPlugins", new et());
2019
+ P(this, "cameraScanSingleOrDualPlugins", new rt());
2020
+ P(this, "laserScanPlugins", new tt());
2021
+ P(this, "countAssistPlugins", new nt());
2022
+ P(this, "clickStreamPlugins", new ot());
2023
+ P(this, "lifecyclePlugins", new at());
2024
+ P(this, "deviceInteractionPlugins", new it());
2025
+ P(this, "pollingPlugins", new ct());
2026
+ P(this, "paymentPlugins", new lt());
2027
+ P(this, "cameraForTakePhotoPlugin", new wt());
2028
+ P(this, "httpPlugin", new dt());
2029
+ P(this, "printPlugins", new pt());
2030
+ P(this, "downloadFilePlugin", new mt());
2038
2031
  }
2039
2032
  }
2040
- const Mt = new St();
2041
- let w = null, fe = null;
2042
- var vr, Ar;
2043
- window.__MICRO_APP_ENVIRONMENT__ && (w = (vr = window.rawWindow.__mini_app_hook__) != null ? vr : {}, fe = (Ar = window.rawWindow.__mini_app_status_hook__) != null ? Ar : {});
2044
- const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: class extends y {
2033
+ const St = new gt();
2034
+ let d = null, fe = null;
2035
+ var Lr, vr;
2036
+ window.__MICRO_APP_ENVIRONMENT__ && (d = (Lr = window.rawWindow.__mini_app_hook__) != null ? Lr : {}, fe = (vr = window.rawWindow.__mini_app_status_hook__) != null ? vr : {});
2037
+ const Pt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: class extends y {
2045
2038
  homeIsClick(t) {
2046
2039
  return a(this, null, function* () {
2047
2040
  var e;
2048
- window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e = w.disabledMenu) == null || e.call(w, t));
2041
+ window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e = d.disabledMenu) == null || e.call(d, t));
2049
2042
  });
2050
2043
  }
2051
2044
  openMiniApp(t) {
2052
2045
  return a(this, null, function* () {
2053
2046
  var e;
2054
2047
  try {
2055
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.openMiniApp) == null || e.call(w, t)), new Promise((r) => {
2048
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.openMiniApp) == null || e.call(d, t)), new Promise((r) => {
2056
2049
  r(t);
2057
2050
  });
2058
2051
  } catch (r) {
@@ -2064,7 +2057,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2064
2057
  return a(this, null, function* () {
2065
2058
  var e;
2066
2059
  try {
2067
- return window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch showTitle", t), (e = w.showTitle) == null || e.call(w, t)), new Promise((r) => {
2060
+ return window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch showTitle", t), (e = d.showTitle) == null || e.call(d, t)), new Promise((r) => {
2068
2061
  r(t);
2069
2062
  });
2070
2063
  } catch (r) {
@@ -2076,7 +2069,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2076
2069
  return a(this, null, function* () {
2077
2070
  var e;
2078
2071
  try {
2079
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.showFABMenu) == null || e.call(w, t)), new Promise((r) => {
2072
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.showFABMenu) == null || e.call(d, t)), new Promise((r) => {
2080
2073
  r(t);
2081
2074
  });
2082
2075
  } catch (r) {
@@ -2088,7 +2081,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2088
2081
  return a(this, null, function* () {
2089
2082
  var e;
2090
2083
  try {
2091
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.disableFAB) == null || e.call(w, t)), new Promise((r) => {
2084
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.disableFAB) == null || e.call(d, t)), new Promise((r) => {
2092
2085
  r(t);
2093
2086
  });
2094
2087
  } catch (r) {
@@ -2100,7 +2093,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2100
2093
  return a(this, null, function* () {
2101
2094
  var e;
2102
2095
  try {
2103
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.disableBack) == null || e.call(w, t)), new Promise((r) => {
2096
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.disableBack) == null || e.call(d, t)), new Promise((r) => {
2104
2097
  r(t);
2105
2098
  });
2106
2099
  } catch (r) {
@@ -2112,7 +2105,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2112
2105
  return a(this, null, function* () {
2113
2106
  var e;
2114
2107
  try {
2115
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.showSubMask) == null || e.call(w, t)), new Promise((r) => {
2108
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.showSubMask) == null || e.call(d, t)), new Promise((r) => {
2116
2109
  r(t);
2117
2110
  });
2118
2111
  } catch (r) {
@@ -2124,7 +2117,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2124
2117
  return a(this, null, function* () {
2125
2118
  var e;
2126
2119
  try {
2127
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = w.setMiniAppVersion) == null || e.call(w, t)), new Promise((r) => {
2120
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.setMiniAppVersion) == null || e.call(d, t)), new Promise((r) => {
2128
2121
  r(t);
2129
2122
  });
2130
2123
  } catch (r) {
@@ -2135,13 +2128,13 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2135
2128
  showDialog() {
2136
2129
  return a(this, null, function* () {
2137
2130
  var t;
2138
- window.__MICRO_APP_ENVIRONMENT__ && ((t = w.showDialog) == null || t.call(w));
2131
+ window.__MICRO_APP_ENVIRONMENT__ && ((t = d.showDialog) == null || t.call(d));
2139
2132
  });
2140
2133
  }
2141
2134
  cancelDialog() {
2142
2135
  return a(this, null, function* () {
2143
2136
  var t;
2144
- window.__MICRO_APP_ENVIRONMENT__ && ((t = w.cancelDialog) == null || t.call(w));
2137
+ window.__MICRO_APP_ENVIRONMENT__ && ((t = d.cancelDialog) == null || t.call(d));
2145
2138
  });
2146
2139
  }
2147
2140
  getMiniAppKong(t) {
@@ -2149,7 +2142,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2149
2142
  var e, r;
2150
2143
  try {
2151
2144
  if (window.__MICRO_APP_ENVIRONMENT__) {
2152
- const n = (r = (e = w.getMiniAppKong) == null ? void 0 : e.call(w, t)) != null ? r : {};
2145
+ const n = (r = (e = d.getMiniAppKong) == null ? void 0 : e.call(d, t)) != null ? r : {};
2153
2146
  return new Promise((o) => {
2154
2147
  o(n);
2155
2148
  });
@@ -2165,7 +2158,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2165
2158
  closeMiniApp() {
2166
2159
  return a(this, null, function* () {
2167
2160
  var t;
2168
- window.__MICRO_APP_ENVIRONMENT__ && ((t = w.closeMiniApp) == null || t.call(w));
2161
+ window.__MICRO_APP_ENVIRONMENT__ && ((t = d.closeMiniApp) == null || t.call(d));
2169
2162
  });
2170
2163
  }
2171
2164
  getStatus() {
@@ -2184,7 +2177,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2184
2177
  try {
2185
2178
  return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => a(this, null, function* () {
2186
2179
  var r;
2187
- e((yield (r = w == null ? void 0 : w.dispatchToShell) == null ? void 0 : r.call(w, t)) || {});
2180
+ e((yield (r = d == null ? void 0 : d.dispatchToShell) == null ? void 0 : r.call(d, t)) || {});
2188
2181
  })) : new Promise((e) => {
2189
2182
  e(t);
2190
2183
  });
@@ -2196,7 +2189,7 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2196
2189
  try {
2197
2190
  return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => a(this, null, function* () {
2198
2191
  var r;
2199
- e((yield (r = w == null ? void 0 : w.getMiniAppInfo) == null ? void 0 : r.call(w, t)) || {});
2192
+ e((yield (r = d == null ? void 0 : d.getMiniAppInfo) == null ? void 0 : r.call(d, t)) || {});
2200
2193
  })) : new Promise((e) => {
2201
2194
  e({});
2202
2195
  });
@@ -2206,6 +2199,6 @@ const Nt = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2206
2199
  }
2207
2200
  } }, Symbol.toStringTag, { value: "Module" }));
2208
2201
  export {
2209
- St as NativeApi,
2210
- Mt as default
2202
+ gt as NativeApi,
2203
+ St as default
2211
2204
  };