superapp-miniapp-invoke-native 1.10.4 → 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,45 +1,47 @@
1
- var Lr = Object.defineProperty, Ar = Object.defineProperties;
2
- var Or = Object.getOwnPropertyDescriptors;
3
- var xe = Object.getOwnPropertySymbols;
4
- var Er = Object.prototype.hasOwnProperty, Rr = Object.prototype.propertyIsEnumerable;
5
- var Ce = (t, e, r) => e in t ? Lr(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
- Er.call(e, r) && Ce(t, r, e[r]);
8
- if (xe)
9
- for (var r of xe(e))
10
- Rr.call(e, r) && Ce(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) => Ar(t, Or(e));
13
- var P = (t, e, r) => (Ce(t, typeof e != "symbol" ? e + "" : e, r), r);
14
- var o = (t, e, r) => new Promise((n, a) => {
15
- var i = (w) => {
14
+ }, T = (t, e) => Hr(t, Ur(e));
15
+ var P = (t, e, r) => (Le(t, typeof e != "symbol" ? e + "" : e, r), r);
16
+ var a = (t, e, r) => new Promise((n, o) => {
17
+ var i = (l) => {
16
18
  try {
17
- s(r.next(w));
18
- } catch (u) {
19
- a(u);
19
+ s(r.next(l));
20
+ } catch (w) {
21
+ o(w);
20
22
  }
21
- }, c = (w) => {
23
+ }, c = (l) => {
22
24
  try {
23
- s(r.throw(w));
24
- } catch (u) {
25
- a(u);
25
+ s(r.throw(l));
26
+ } catch (w) {
27
+ o(w);
26
28
  }
27
- }, s = (w) => w.done ? n(w.value) : Promise.resolve(w.value).then(i, c);
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 kr = (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 };
35
- return n.addPlatform = (a, i) => {
36
- n.platforms.set(a, i);
37
- }, n.setPlatform = (a) => {
38
- n.platforms.has(a) && (n.currentPlatform = n.platforms.get(a));
37
+ return n.addPlatform = (o, i) => {
38
+ n.platforms.set(o, i);
39
+ }, n.setPlatform = (o) => {
40
+ n.platforms.has(o) && (n.currentPlatform = n.platforms.get(o));
39
41
  }, n;
40
- })(t), je = kr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
42
+ })(t), Ke = Dr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
41
43
  var j;
42
- je.addPlatform, je.setPlatform, function(t) {
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 {
@@ -47,82 +49,82 @@ class ve extends Error {
47
49
  super(e), this.message = e, this.code = r, this.data = n;
48
50
  }
49
51
  }
50
- const br = (t) => {
51
- var e, r, n, a, i;
52
- const c = t.CapacitorCustomPlatform || null, s = t.Capacitor || {}, w = 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 : ((h) => {
52
+ const xr = (t) => {
53
+ var e, r, n, o, i;
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
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";
55
- })(t)), p = ((r = u == null ? void 0 : u.currentPlatform) === null || r === void 0 ? void 0 : r.isNativePlatform) || (() => _() !== "web"), f = ((n = u == null ? void 0 : u.currentPlatform) === null || n === void 0 ? void 0 : n.isPluginAvailable) || ((h) => {
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) => {
56
58
  const m = I.get(h);
57
- return !!(m != null && m.platforms.has(_())) || !!A(h);
58
- }), A = ((a = u == null ? void 0 : u.currentPlatform) === null || a === void 0 ? void 0 : a.getPluginHeader) || ((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
62
  return (m = s.PluginHeaders) === null || m === void 0 ? void 0 : m.find((N) => N.name === h);
61
- }), I = /* @__PURE__ */ new Map(), C = ((i = u == null ? void 0 : u.currentPlatform) === null || i === void 0 ? void 0 : i.registerPlugin) || ((h, m = {}) => {
63
+ }), I = /* @__PURE__ */ new Map(), C = ((i = w == null ? void 0 : w.currentPlatform) === null || i === void 0 ? void 0 : i.registerPlugin) || ((h, m = {}) => {
62
64
  const N = I.get(h);
63
65
  if (N)
64
66
  return console.warn(`Capacitor plugin "${h}" already registered. Cannot register plugins twice.`), N.proxy;
65
- const v = _(), $ = A(h);
67
+ const O = _(), $ = v(h);
66
68
  let k;
67
- const Ne = (O) => {
69
+ const Me = (A) => {
68
70
  let R;
69
71
  const x = (...Z) => {
70
- const q = (() => o(void 0, null, function* () {
71
- return !k && v in m ? k = k = typeof m[v] == "function" ? yield m[v]() : m[v] : c !== null && !k && "web" in m && (k = k = typeof m.web == "function" ? yield m.web() : m.web), k;
72
+ const q = (() => a(void 0, null, function* () {
73
+ return !k && O in m ? k = k = typeof m[O] == "function" ? yield m[O]() : m[O] : c !== null && !k && "web" in m && (k = k = typeof m.web == "function" ? yield m.web() : m.web), k;
72
74
  }))().then((K) => {
73
- const Fe = ((L, J) => {
74
- var fe, Ie;
75
+ const je = ((L, z) => {
76
+ var Ce, Oe;
75
77
  if (!$) {
76
78
  if (L)
77
- return (Ie = L[J]) === null || Ie === void 0 ? void 0 : Ie.bind(L);
78
- throw new ve(`"${h}" plugin is not implemented on ${v}`, j.Unimplemented);
79
+ return (Oe = L[z]) === null || Oe === void 0 ? void 0 : Oe.bind(L);
80
+ throw new ve(`"${h}" plugin is not implemented on ${O}`, j.Unimplemented);
79
81
  }
80
82
  {
81
- const De = $ == null ? void 0 : $.methods.find((G) => J === G.name);
82
- if (De)
83
- return De.rtype === "promise" ? (G) => s.nativePromise(h, J.toString(), G) : (G, vr) => s.nativeCallback(h, J.toString(), G, vr);
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
- return (fe = L[J]) === null || fe === void 0 ? void 0 : fe.bind(L);
87
+ return (Ce = L[z]) === null || Ce === void 0 ? void 0 : Ce.bind(L);
86
88
  }
87
- })(K, O);
88
- if (Fe) {
89
- const L = Fe(...Z);
89
+ })(K, A);
90
+ if (je) {
91
+ const L = je(...Z);
90
92
  return R = L == null ? void 0 : L.remove, L;
91
93
  }
92
- throw new ve(`"${h}.${O}()" is not implemented on ${v}`, j.Unimplemented);
94
+ throw new ve(`"${h}.${A}()" is not implemented on ${O}`, j.Unimplemented);
93
95
  });
94
- return O === "addListener" && (q.remove = () => o(void 0, null, function* () {
96
+ return A === "addListener" && (q.remove = () => a(void 0, null, function* () {
95
97
  return R();
96
98
  })), q;
97
99
  };
98
- return x.toString = () => `${O.toString()}() { [capacitor code] }`, Object.defineProperty(x, "name", { value: O, writable: !1, configurable: !1 }), x;
99
- }, Ue = Ne("addListener"), We = Ne("removeListener"), Cr = (O, R) => {
100
- const x = Ue({ eventName: O }, R), Z = () => o(void 0, null, function* () {
100
+ return x.toString = () => `${A.toString()}() { [capacitor code] }`, Object.defineProperty(x, "name", { value: A, writable: !1, configurable: !1 }), x;
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
- We({ eventName: O, callbackId: K }, R);
104
+ xe({ eventName: A, callbackId: K }, R);
103
105
  }), q = new Promise((K) => x.then(() => K({ remove: Z })));
104
- return q.remove = () => o(void 0, null, function* () {
106
+ return q.remove = () => a(void 0, null, function* () {
105
107
  console.warn("Using addListener() without 'await' is deprecated."), yield Z();
106
108
  }), q;
107
- }, Me = new Proxy({}, { get(O, R) {
109
+ }, Ie = new Proxy({}, { get(A, R) {
108
110
  switch (R) {
109
111
  case "$$typeof":
110
112
  return;
111
113
  case "toJSON":
112
114
  return () => ({});
113
115
  case "addListener":
114
- return $ ? Cr : Ue;
116
+ return $ ? Tr : De;
115
117
  case "removeListener":
116
- return We;
118
+ return xe;
117
119
  default:
118
- return Ne(R);
120
+ return Me(R);
119
121
  }
120
122
  } });
121
- return w[h] = Me, I.set(h, { name: h, proxy: Me, platforms: /* @__PURE__ */ new Set([...Object.keys(m), ...$ ? [v] : []]) }), Me;
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 = (h) => h), s.getPlatform = _, s.handleError = (h) => t.console.error(h), s.isNativePlatform = p, s.isPluginAvailable = f, 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;
124
- }, Tr = (t) => t.Capacitor = br(t), d = Tr(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), He = 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);
@@ -131,15 +133,15 @@ class y {
131
133
  this.listeners[e] || (this.listeners[e] = []), this.listeners[e].push(r);
132
134
  const n = this.windowListeners[e];
133
135
  n && !n.registered && this.addWindowListener(n);
134
- const a = () => o(this, null, function* () {
136
+ const o = () => a(this, null, function* () {
135
137
  return this.removeListener(e, r);
136
- }), i = Promise.resolve({ remove: a });
137
- return Object.defineProperty(i, "remove", { value: () => o(this, null, function* () {
138
- console.warn("Using addListener() without 'await' is deprecated."), yield a();
138
+ }), i = Promise.resolve({ remove: o });
139
+ return Object.defineProperty(i, "remove", { value: () => a(this, null, function* () {
140
+ console.warn("Using addListener() without 'await' is deprecated."), yield o();
139
141
  }) }), i;
140
142
  }
141
143
  removeAllListeners() {
142
- return o(this, null, function* () {
144
+ return a(this, null, function* () {
143
145
  this.listeners = {};
144
146
  for (const e in this.windowListeners)
145
147
  this.removeWindowListener(this.windowListeners[e]);
@@ -148,7 +150,7 @@ class y {
148
150
  }
149
151
  notifyListeners(e, r) {
150
152
  const n = this.listeners[e];
151
- n && n.forEach((a) => a(r));
153
+ n && n.forEach((o) => o(r));
152
154
  }
153
155
  hasListeners(e) {
154
156
  return !!this.listeners[e].length;
@@ -159,18 +161,18 @@ class y {
159
161
  } };
160
162
  }
161
163
  unimplemented(e = "not implemented") {
162
- return new d.Exception(e, j.Unimplemented);
164
+ return new u.Exception(e, j.Unimplemented);
163
165
  }
164
166
  unavailable(e = "not available") {
165
- return new d.Exception(e, j.Unavailable);
167
+ return new u.Exception(e, j.Unavailable);
166
168
  }
167
169
  removeListener(e, r) {
168
- return o(this, null, function* () {
170
+ return a(this, null, function* () {
169
171
  const n = this.listeners[e];
170
172
  if (!n)
171
173
  return;
172
- const a = n.indexOf(r);
173
- this.listeners[e].splice(a, 1), this.listeners[e].length || this.removeWindowListener(this.windowListeners[e]);
174
+ const o = n.indexOf(r);
175
+ this.listeners[e].splice(o, 1), this.listeners[e].length || this.removeWindowListener(this.windowListeners[e]);
174
176
  });
175
177
  }
176
178
  addWindowListener(e) {
@@ -180,31 +182,31 @@ class y {
180
182
  e && (window.removeEventListener(e.windowEventName, e.handler), e.registered = !1);
181
183
  }
182
184
  }
183
- const $e = (t) => encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), qe = (t) => t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
184
- class Br 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
- return o(this, null, function* () {
188
+ return a(this, null, function* () {
187
189
  const e = document.cookie, r = {};
188
190
  return e.split(";").forEach((n) => {
189
191
  if (n.length <= 0)
190
192
  return;
191
- let [a, i] = n.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
192
- a = qe(a).trim(), i = qe(i).trim(), r[a] = i;
193
+ let [o, i] = n.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
194
+ o = Ge(o).trim(), i = Ge(i).trim(), r[o] = i;
193
195
  }), r;
194
196
  });
195
197
  }
196
198
  setCookie(e) {
197
- return o(this, null, function* () {
199
+ return a(this, null, function* () {
198
200
  try {
199
- const r = $e(e.key), n = $e(e.value), a = `; expires=${(e.expires || "").replace("expires=", "")}`, i = (e.path || "/").replace("path=", ""), c = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
200
- document.cookie = `${r}=${n || ""}${a}; path=${i}; ${c};`;
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}` : "";
202
+ document.cookie = `${r}=${n || ""}${o}; path=${i}; ${c};`;
201
203
  } catch (r) {
202
204
  return Promise.reject(r);
203
205
  }
204
206
  });
205
207
  }
206
208
  deleteCookie(e) {
207
- return o(this, null, function* () {
209
+ return a(this, null, function* () {
208
210
  try {
209
211
  document.cookie = `${e.key}=; Max-Age=0`;
210
212
  } catch (r) {
@@ -213,7 +215,7 @@ class Br extends y {
213
215
  });
214
216
  }
215
217
  clearCookies() {
216
- return o(this, null, function* () {
218
+ return a(this, null, function* () {
217
219
  try {
218
220
  const e = document.cookie.split(";") || [];
219
221
  for (const r of e)
@@ -224,7 +226,7 @@ class Br extends y {
224
226
  });
225
227
  }
226
228
  clearAllCookies() {
227
- return o(this, null, function* () {
229
+ return a(this, null, function* () {
228
230
  try {
229
231
  yield this.clearCookies();
230
232
  } catch (e) {
@@ -233,58 +235,58 @@ class Br extends y {
233
235
  });
234
236
  }
235
237
  }
236
- He("CapacitorCookies", { web: () => new Br() });
237
- const Vr = (t, e = {}) => {
238
- const r = Object.assign({ method: t.method || "GET", headers: t.headers }, e), n = ((a = {}) => {
239
- const i = Object.keys(a);
240
- return Object.keys(a).map((c) => c.toLocaleLowerCase()).reduce((c, s, w) => (c[s] = a[i[w]], c), {});
238
+ Fe("CapacitorCookies", { web: () => new $r() });
239
+ const qr = (t, e = {}) => {
240
+ const r = Object.assign({ method: t.method || "GET", headers: t.headers }, e), n = ((o = {}) => {
241
+ const i = Object.keys(o);
242
+ return Object.keys(o).map((c) => c.toLocaleLowerCase()).reduce((c, s, l) => (c[s] = o[i[l]], c), {});
241
243
  })(t.headers)["content-type"] || "";
242
244
  if (typeof t.data == "string")
243
245
  r.body = t.data;
244
246
  else if (n.includes("application/x-www-form-urlencoded")) {
245
- const a = new URLSearchParams();
247
+ const o = new URLSearchParams();
246
248
  for (const [i, c] of Object.entries(t.data || {}))
247
- a.set(i, c);
248
- r.body = a.toString();
249
+ o.set(i, c);
250
+ r.body = o.toString();
249
251
  } else if (n.includes("multipart/form-data")) {
250
- const a = new FormData();
252
+ const o = new FormData();
251
253
  if (t.data instanceof FormData)
252
254
  t.data.forEach((c, s) => {
253
- a.append(s, c);
255
+ o.append(s, c);
254
256
  });
255
257
  else
256
258
  for (const c of Object.keys(t.data))
257
- a.append(c, t.data[c]);
258
- r.body = a;
259
+ o.append(c, t.data[c]);
260
+ r.body = o;
259
261
  const i = new Headers(r.headers);
260
262
  i.delete("content-type"), r.headers = i;
261
263
  } else
262
264
  (n.includes("application/json") || typeof t.data == "object") && (r.body = JSON.stringify(t.data));
263
265
  return r;
264
266
  };
265
- class Hr extends y {
267
+ class Kr extends y {
266
268
  request(e) {
267
- return o(this, null, function* () {
268
- const r = Vr(e, e.webFetchExtra), n = ((p, f = !0) => p ? Object.entries(p).reduce((A, I) => {
269
+ return a(this, null, function* () {
270
+ const r = qr(e, e.webFetchExtra), n = ((p, M = !0) => p ? Object.entries(p).reduce((v, I) => {
269
271
  const [C, h] = I;
270
272
  let m, N;
271
- return Array.isArray(h) ? (N = "", h.forEach((v) => {
272
- m = f ? encodeURIComponent(v) : v, N += `${C}=${m}&`;
273
- }), N.slice(0, -1)) : (m = f ? encodeURIComponent(h) : h, N = `${C}=${m}`), `${A}&${N}`;
274
- }, "").substr(1) : null)(e.params, e.shouldEncodeUrlParams), a = n ? `${e.url}?${n}` : e.url, i = yield fetch(a, r), c = i.headers.get("content-type") || "";
275
- let s, w, { responseType: u = "text" } = i.ok ? e : {};
276
- switch (c.includes("application/json") && (u = "json"), u) {
273
+ return Array.isArray(h) ? (N = "", h.forEach((O) => {
274
+ m = M ? encodeURIComponent(O) : O, N += `${C}=${m}&`;
275
+ }), N.slice(0, -1)) : (m = M ? encodeURIComponent(h) : h, N = `${C}=${m}`), `${v}&${N}`;
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") || "";
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
- w = yield i.blob(), s = yield ((p) => o(this, null, function* () {
280
- return new Promise((f, A) => {
281
+ l = yield i.blob(), s = yield ((p) => a(this, null, function* () {
282
+ return new Promise((M, v) => {
281
283
  const I = new FileReader();
282
284
  I.onload = () => {
283
285
  const C = I.result;
284
- f(C.indexOf(",") >= 0 ? C.split(",")[1] : C);
285
- }, I.onerror = (C) => A(C), I.readAsDataURL(p);
286
+ M(C.indexOf(",") >= 0 ? C.split(",")[1] : C);
287
+ }, I.onerror = (C) => v(C), I.readAsDataURL(p);
286
288
  });
287
- }))(w);
289
+ }))(l);
288
290
  break;
289
291
  case "json":
290
292
  s = yield i.json();
@@ -293,67 +295,67 @@ class Hr extends y {
293
295
  s = yield i.text();
294
296
  }
295
297
  const _ = {};
296
- return i.headers.forEach((p, f) => {
297
- _[f] = p;
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
  }
301
303
  get(e) {
302
- return o(this, null, function* () {
304
+ return a(this, null, function* () {
303
305
  return this.request(Object.assign(Object.assign({}, e), { method: "GET" }));
304
306
  });
305
307
  }
306
308
  post(e) {
307
- return o(this, null, function* () {
309
+ return a(this, null, function* () {
308
310
  return this.request(Object.assign(Object.assign({}, e), { method: "POST" }));
309
311
  });
310
312
  }
311
313
  put(e) {
312
- return o(this, null, function* () {
314
+ return a(this, null, function* () {
313
315
  return this.request(Object.assign(Object.assign({}, e), { method: "PUT" }));
314
316
  });
315
317
  }
316
318
  patch(e) {
317
- return o(this, null, function* () {
319
+ return a(this, null, function* () {
318
320
  return this.request(Object.assign(Object.assign({}, e), { method: "PATCH" }));
319
321
  });
320
322
  }
321
323
  delete(e) {
322
- return o(this, null, function* () {
324
+ return a(this, null, function* () {
323
325
  return this.request(Object.assign(Object.assign({}, e), { method: "DELETE" }));
324
326
  });
325
327
  }
326
328
  }
327
- function Le() {
328
- return d.getPlatform() === "android" ? JSON.parse(AndroidInitialContext.initialContext()) : window.portalInitialContext;
329
+ function Ae() {
330
+ return u.getPlatform() === "android" ? JSON.parse(AndroidInitialContext.initialContext()) : window.portalInitialContext;
329
331
  }
330
- He("CapacitorHttp", { web: () => new Hr() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
331
- He("Portals", { web: () => Promise.resolve().then(function() {
332
- return Ur;
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 Ur = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
336
+ const zr = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
335
337
  publishNative(t) {
336
- return o(this, null, function* () {
338
+ return a(this, null, function* () {
337
339
  });
338
340
  }
339
- } }), ee = (t) => {
341
+ } }), re = (t) => {
340
342
  var e, r, n;
341
343
  try {
342
344
  if (typeof window == "undefined")
343
345
  return;
344
- if (Le && ((e = Le()) != null && e.value)) {
345
- const a = (n = (r = Le()) == null ? void 0 : r.value) != null ? n : null;
346
- if (!a)
346
+ if (Ae && ((e = Ae()) != null && e.value)) {
347
+ const o = (n = (r = Ae()) == null ? void 0 : r.value) != null ? n : null;
348
+ if (!o)
347
349
  return void console.error("native initialContext is undefine");
348
350
  if (!t)
349
351
  return void console.error("initialContext call back is undefine");
350
- t(a);
352
+ t(o);
351
353
  }
352
- } catch (a) {
353
- throw console.error("getInitialContextHandle error", a), a;
354
+ } catch (o) {
355
+ throw console.error("getInitialContextHandle error", o), o;
354
356
  }
355
357
  };
356
- class Wr {
358
+ class Gr {
357
359
  isNative() {
358
360
  try {
359
361
  return (() => {
@@ -362,7 +364,7 @@ class Wr {
362
364
  return window.rawWindow.__mini_app_hook__.isNative();
363
365
  {
364
366
  let e = !1;
365
- return ee((r) => {
367
+ return re((r) => {
366
368
  e = !!(r != null && r.isNative);
367
369
  }), e;
368
370
  }
@@ -382,12 +384,12 @@ class Wr {
382
384
  return e.callBack(r);
383
385
  } else
384
386
  (({ callBack: r }) => {
385
- ee((n) => {
386
- var a;
387
+ re((n) => {
388
+ var o;
387
389
  try {
388
390
  if (!(n != null && n.params))
389
391
  return void console.info("initial context native params is undefine");
390
- const i = (a = n == null ? void 0 : n.params) != null ? a : null;
392
+ const i = (o = n == null ? void 0 : n.params) != null ? o : null;
391
393
  if (!i)
392
394
  return;
393
395
  if (!r)
@@ -408,15 +410,15 @@ class Wr {
408
410
  return this.isNative() ? window.__MICRO_APP_ENVIRONMENT__ ? (r = window.rawWindow.__mini_app_hook__.getNativeInfo(e)) != null ? r : {} : (() => {
409
411
  try {
410
412
  let n = null;
411
- return ee((a) => {
412
- n = a != null ? a : null;
413
+ return re((o) => {
414
+ n = o != null ? o : null;
413
415
  }), n;
414
416
  } catch (n) {
415
417
  throw console.error("getNativeInfoHandle error", n), n;
416
418
  }
417
419
  })() : ((n) => {
418
- var a;
419
- return (a = n == null ? void 0 : n.mockData) != null ? a : null;
420
+ var o;
421
+ return (o = n == null ? void 0 : n.mockData) != null ? o : null;
420
422
  })(e);
421
423
  } catch (n) {
422
424
  throw console.error("getNativeInfo error", n), n;
@@ -428,34 +430,34 @@ class Wr {
428
430
  });
429
431
  }
430
432
  }
431
- const M = () => {
433
+ const f = () => {
432
434
  try {
433
435
  let t = {};
434
436
  return typeof window != "undefined" && (t = window), t;
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(() => ct).then((t) => new t.PluginsWeb()) }), re = M();
439
- re.removeAddListenerFab = () => null;
440
- const Fr = (t, e) => {
440
+ }, E = "CommunicatePlugin", g = u.registerPlugin(E, { web: () => Promise.resolve().then(() => Pt).then((t) => new t.PluginsWeb()) }), te = f();
441
+ te.removeAddListenerFab = () => null;
442
+ const Jr = (t, e) => {
441
443
  var r, n;
442
444
  try {
443
- re.removeAddListenerFab && re.removeAddListenerFab();
444
- const a = [];
445
- if ((r = g.showFABMenu) == null || r.call(g, { fabMenu: a, position: null }), !t || !((n = Object.keys(t)) != null && n.length))
445
+ te.removeAddListenerFab && te.removeAddListenerFab();
446
+ const o = [];
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, w, u, _, p, f, A;
449
- a.push({ disable: (s = (c = t == null ? void 0 : t[i]) == null ? void 0 : c.disable) != null ? s : !1, icon: (u = (w = t == null ? void 0 : t[i]) == null ? void 0 : w.icon) != null ? u : "", id: (p = (_ = t == null ? void 0 : t[i]) == null ? void 0 : _.id) != null ? p : "", name: (A = (f = t == null ? void 0 : t[i]) == null ? void 0 : f.title) != null ? A : "" });
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
- (i = g.showFABMenu) == null || i.call(g, { fabMenu: a, position: e != null ? e : null });
454
+ (i = g.showFABMenu) == null || i.call(g, { fabMenu: o, position: e != null ? e : null });
453
455
  }), setTimeout(() => {
454
- ((i) => o(void 0, null, function* () {
455
- i && (re.removeAddListenerFab = yield ((c) => o(void 0, null, function* () {
456
+ ((i) => a(void 0, null, function* () {
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", (w) => c && c(w));
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,22 +467,22 @@ const Fr = (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 w, u, _;
469
- (w = t == null ? void 0 : t[s]) != null && w.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
  });
473
- } catch (a) {
474
- throw console.error("fabBtnHandle error", a), a;
475
+ } catch (o) {
476
+ throw console.error("fabBtnHandle error", o), o;
475
477
  }
476
- }, B = M();
478
+ }, B = f();
477
479
  B.addListenerBackRemoveHandle = () => null;
478
- const Ke = (t = () => null) => o(void 0, null, function* () {
480
+ const Je = (t = () => null) => a(void 0, null, function* () {
479
481
  try {
480
- B != null && B.addListenerBackRemoveHandle && typeof B.addListenerBackRemoveHandle == "function" && B.addListenerBackRemoveHandle(), B.addListenerBackRemoveHandle = yield ((e) => o(void 0, null, function* () {
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) {
@@ -490,16 +492,16 @@ const Ke = (t = () => null) => o(void 0, null, function* () {
490
492
  } catch (e) {
491
493
  throw console.error("initBackBtnFn error", e), e;
492
494
  }
493
- }), te = M();
494
- te.addListenerHomeHandle = () => null;
495
- const Dr = (t) => {
495
+ }), ne = f();
496
+ ne.addListenerHomeHandle = () => null;
497
+ const Qr = (t) => {
496
498
  try {
497
- te.addListenerHomeHandle && te.addListenerHomeHandle(), setTimeout(() => {
498
- ((e) => o(void 0, null, function* () {
499
- e && (te.addListenerHomeHandle = yield ((r) => o(void 0, null, function* () {
499
+ ne.addListenerHomeHandle && ne.addListenerHomeHandle(), setTimeout(() => {
500
+ ((e) => a(void 0, null, function* () {
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", (a) => r && r(a));
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) {
@@ -511,14 +513,14 @@ const Dr = (t) => {
511
513
  } catch (e) {
512
514
  throw console.error("homeFn error", e), e;
513
515
  }
514
- }, V = M();
516
+ }, V = f();
515
517
  V.addListenerTouchRemoveHandle = () => null;
516
- const Je = (t = () => null) => o(void 0, null, function* () {
518
+ const Qe = (t = () => null) => a(void 0, null, function* () {
517
519
  try {
518
- V != null && V.addListenerTouchRemoveHandle && typeof V.addListenerTouchRemoveHandle == "function" && V.addListenerTouchRemoveHandle(), V.addListenerTouchRemoveHandle = yield ((e) => o(void 0, null, function* () {
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) {
@@ -528,16 +530,16 @@ const Je = (t = () => null) => o(void 0, null, function* () {
528
530
  } catch (e) {
529
531
  throw console.error("initTouchFn error", e), e;
530
532
  }
531
- }), H = M();
533
+ }), H = f();
532
534
  H.addListenerSendDeepLinkRemoveHandle = () => null;
533
- const Ge = (t = () => null) => o(void 0, null, function* () {
535
+ const Ye = (t = () => null) => a(void 0, null, function* () {
534
536
  try {
535
- H != null && H.addListenerSendDeepLinkRemoveHandle && typeof H.addListenerSendDeepLinkRemoveHandle == "function" && H.addListenerSendDeepLinkRemoveHandle(), H.addListenerSendDeepLinkRemoveHandle = yield ((e) => o(void 0, null, function* () {
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 Ge = (t = () => null) => o(void 0, null, function* () {
547
549
  } catch (e) {
548
550
  throw console.error("initTouchFn error", e), e;
549
551
  }
550
- }), U = M();
552
+ }), U = f();
551
553
  U.addListenerSwitchLanguageRemoveHandle = () => null;
552
- const Qe = (t = () => null) => o(void 0, null, function* () {
554
+ const Ze = (t = () => null) => a(void 0, null, function* () {
553
555
  try {
554
- U != null && U.addListenerSwitchLanguageRemoveHandle && typeof U.addListenerSwitchLanguageRemoveHandle == "function" && U.addListenerSwitchLanguageRemoveHandle(), U.addListenerSwitchLanguageRemoveHandle = yield ((e) => o(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 Qe = (t = () => null) => o(void 0, null, function* () {
568
570
  } catch (e) {
569
571
  throw console.error("initSwitchLanguageFn error", e), e;
570
572
  }
571
- }), W = M();
572
- W.addListenerSetupMiniAppRemoveHandle = () => null;
573
- const Ye = (t = () => null) => o(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
- W != null && W.addListenerSetupMiniAppRemoveHandle && typeof W.addListenerSetupMiniAppRemoveHandle == "function" && W.addListenerSetupMiniAppRemoveHandle(), W.addListenerSetupMiniAppRemoveHandle = yield ((e) => o(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) {
@@ -585,14 +587,14 @@ const Ye = (t = () => null) => o(void 0, null, function* () {
585
587
  } catch (e) {
586
588
  throw console.error("initSetupMiniAppFn error", e), e;
587
589
  }
588
- }), F = M();
589
- F.addListenerSwitchStoreRemoveHandle = () => null;
590
- const Ze = (t = () => null) => o(void 0, null, function* () {
590
+ }), W = f();
591
+ W.addListenerSwitchStoreRemoveHandle = () => null;
592
+ const er = (t = () => null) => a(void 0, null, function* () {
591
593
  try {
592
- F != null && F.addListenerSwitchStoreRemoveHandle && typeof F.addListenerSwitchStoreRemoveHandle == "function" && F.addListenerSwitchStoreRemoveHandle(), F.addListenerSwitchStoreRemoveHandle = yield ((e) => o(void 0, null, function* () {
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,12 +609,12 @@ const Ze = (t = () => null) => o(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
  }
614
616
  homeBtnSwitch(e) {
615
- return o(this, null, function* () {
617
+ return a(this, null, function* () {
616
618
  var r;
617
619
  try {
618
620
  return yield (r = g.homeIsClick) == null ? void 0 : r.call(g, e);
@@ -625,11 +627,11 @@ class xr {
625
627
  try {
626
628
  ((r) => {
627
629
  try {
628
- const { mounted: n, beforeUnmount: a, callBack: i } = r;
630
+ const { mounted: n, beforeUnmount: o, callBack: i } = r;
629
631
  n(() => {
630
- Ke(i);
631
- }), a(() => {
632
- Ke();
632
+ Je(i);
633
+ }), o(() => {
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 : Dr(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) : Fr(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
  }
@@ -657,11 +659,11 @@ class xr {
657
659
  try {
658
660
  ((r) => {
659
661
  try {
660
- const { mounted: n, beforeUnmount: a, callBack: i } = r;
662
+ const { mounted: n, beforeUnmount: o, callBack: i } = r;
661
663
  n(() => {
662
- Je(i);
663
- }), a(() => {
664
- Je();
664
+ Qe(i);
665
+ }), o(() => {
666
+ Qe();
665
667
  });
666
668
  } catch (n) {
667
669
  throw console.error("touchListenerHandle error", n), n;
@@ -672,7 +674,7 @@ class xr {
672
674
  }
673
675
  }
674
676
  disableFAB(e) {
675
- return o(this, null, function* () {
677
+ return a(this, null, function* () {
676
678
  try {
677
679
  return yield g.disableFAB(e);
678
680
  } catch (r) {
@@ -681,7 +683,7 @@ class xr {
681
683
  });
682
684
  }
683
685
  disableBack(e) {
684
- return o(this, null, function* () {
686
+ return a(this, null, function* () {
685
687
  try {
686
688
  return yield g.disableBack(e);
687
689
  } catch (r) {
@@ -690,7 +692,7 @@ class xr {
690
692
  });
691
693
  }
692
694
  openMiniApp(e) {
693
- return o(this, null, function* () {
695
+ return a(this, null, function* () {
694
696
  try {
695
697
  return yield g.openMiniApp(e);
696
698
  } catch (r) {
@@ -699,7 +701,7 @@ class xr {
699
701
  });
700
702
  }
701
703
  showTitle(e) {
702
- return o(this, null, function* () {
704
+ return a(this, null, function* () {
703
705
  try {
704
706
  return yield g.showTitle(e);
705
707
  } catch (r) {
@@ -708,7 +710,7 @@ class xr {
708
710
  });
709
711
  }
710
712
  showSubMask(e) {
711
- return o(this, null, function* () {
713
+ return a(this, null, function* () {
712
714
  try {
713
715
  return yield g.showSubMask(e);
714
716
  } catch (r) {
@@ -717,7 +719,7 @@ class xr {
717
719
  });
718
720
  }
719
721
  setMiniAppVersion(e) {
720
- return o(this, null, function* () {
722
+ return a(this, null, function* () {
721
723
  try {
722
724
  return yield g.setMiniAppVersion(e);
723
725
  } catch (r) {
@@ -726,7 +728,7 @@ class xr {
726
728
  });
727
729
  }
728
730
  showNativeLoading() {
729
- return o(this, null, function* () {
731
+ return a(this, null, function* () {
730
732
  try {
731
733
  return yield g.showDialog();
732
734
  } catch (e) {
@@ -735,7 +737,7 @@ class xr {
735
737
  });
736
738
  }
737
739
  cancelNativeLoading() {
738
- return o(this, null, function* () {
740
+ return a(this, null, function* () {
739
741
  try {
740
742
  return yield g.cancelDialog();
741
743
  } catch (e) {
@@ -744,7 +746,7 @@ class xr {
744
746
  });
745
747
  }
746
748
  getMiniAppKong(e) {
747
- return o(this, null, function* () {
749
+ return a(this, null, function* () {
748
750
  try {
749
751
  return yield g.getMiniAppKong(e);
750
752
  } catch (r) {
@@ -756,11 +758,11 @@ class xr {
756
758
  try {
757
759
  ((r) => {
758
760
  try {
759
- const { mounted: n, beforeUnmount: a, callBack: i } = r;
761
+ const { mounted: n, beforeUnmount: o, callBack: i } = r;
760
762
  n(() => {
761
- Ge(i);
762
- }), a(() => {
763
- Ge();
763
+ Ye(i);
764
+ }), o(() => {
765
+ Ye();
764
766
  });
765
767
  } catch (n) {
766
768
  throw console.error("sendDeepLinkListenerHandle error", n), n;
@@ -774,11 +776,11 @@ class xr {
774
776
  try {
775
777
  ((r) => {
776
778
  try {
777
- const { mounted: n, beforeUnmount: a, callBack: i } = r;
779
+ const { mounted: n, beforeUnmount: o, callBack: i } = r;
778
780
  n(() => {
779
- Qe(i);
780
- }), a(() => {
781
- Qe();
781
+ Ze(i);
782
+ }), o(() => {
783
+ Ze();
782
784
  });
783
785
  } catch (n) {
784
786
  throw console.error("sendSwitchLanguageHandle error", n), n;
@@ -792,11 +794,11 @@ class xr {
792
794
  try {
793
795
  ((r) => {
794
796
  try {
795
- const { mounted: n, beforeUnmount: a, callBack: i } = r;
797
+ const { mounted: n, beforeUnmount: o, callBack: i } = r;
796
798
  n(() => {
797
- Ye(i);
798
- }), a(() => {
799
- Ye();
799
+ Xe(i);
800
+ }), o(() => {
801
+ Xe();
800
802
  });
801
803
  } catch (n) {
802
804
  throw console.error("setupMiniAppHandle error", n), n;
@@ -810,11 +812,11 @@ class xr {
810
812
  try {
811
813
  ((r) => {
812
814
  try {
813
- const { mounted: n, beforeUnmount: a, callBack: i } = r;
815
+ const { mounted: n, beforeUnmount: o, callBack: i } = r;
814
816
  n(() => {
815
- Ze(i);
816
- }), a(() => {
817
- Ze();
817
+ er(i);
818
+ }), o(() => {
819
+ er();
818
820
  });
819
821
  } catch (n) {
820
822
  throw console.error("sendSwitchStoreHandle error", n), n;
@@ -825,7 +827,7 @@ class xr {
825
827
  }
826
828
  }
827
829
  closeMiniApp() {
828
- return o(this, null, function* () {
830
+ return a(this, null, function* () {
829
831
  try {
830
832
  return yield g.closeMiniApp();
831
833
  } catch (e) {
@@ -834,7 +836,7 @@ class xr {
834
836
  });
835
837
  }
836
838
  getStatus() {
837
- return o(this, null, function* () {
839
+ return a(this, null, function* () {
838
840
  try {
839
841
  return yield g.getStatus();
840
842
  } catch (e) {
@@ -843,7 +845,7 @@ class xr {
843
845
  });
844
846
  }
845
847
  dispatchToShell(e) {
846
- return o(this, null, function* () {
848
+ return a(this, null, function* () {
847
849
  try {
848
850
  return yield g.dispatchToShell(e);
849
851
  } catch (r) {
@@ -852,7 +854,7 @@ class xr {
852
854
  });
853
855
  }
854
856
  getMiniAppInfo(e) {
855
- return o(this, null, function* () {
857
+ return a(this, null, function* () {
856
858
  try {
857
859
  return yield g.getMiniAppInfo(e);
858
860
  } catch (r) {
@@ -861,26 +863,26 @@ class xr {
861
863
  });
862
864
  }
863
865
  }
864
- let ne = null;
865
- var or;
866
- window.__MICRO_APP_ENVIRONMENT__ && (ne = (or = window.rawWindow.__mini_app_status_hook__) != null ? or : {});
867
- const Ae = d.registerPlugin("CameraScanPlugin", { web: new class extends y {
866
+ let oe = null;
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
- return o(this, null, function* () {
871
+ return a(this, null, function* () {
870
872
  return new Promise((e) => {
871
873
  e(t);
872
874
  });
873
875
  });
874
876
  }
875
877
  setCameraScanState() {
876
- return o(this, null, function* () {
878
+ return a(this, null, function* () {
877
879
  });
878
880
  }
879
881
  getStatus() {
880
882
  try {
881
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
883
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
882
884
  var e, r;
883
- t((yield (r = (e = ne == null ? void 0 : ne.cameraScan) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
885
+ t((yield (r = (e = oe == null ? void 0 : oe.cameraScan) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
884
886
  })) : new Promise((t) => {
885
887
  t(null);
886
888
  });
@@ -890,52 +892,52 @@ const Ae = d.registerPlugin("CameraScanPlugin", { web: new class extends y {
890
892
  }
891
893
  }() });
892
894
  window.removeAddListenerCameraScan = () => null;
893
- class jr {
895
+ class Zr {
894
896
  pickCameraScan(e) {
895
- return o(this, null, function* () {
897
+ return a(this, null, function* () {
896
898
  try {
897
- return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScan(e) : yield Ae.pickCameraScan(e);
899
+ return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScan(e) : yield Ee.pickCameraScan(e);
898
900
  } catch (r) {
899
901
  throw console.error("pickCameraScan error", r), r;
900
902
  }
901
903
  });
902
904
  }
903
905
  setCameraScanState(e) {
904
- return o(this, null, function* () {
906
+ return a(this, null, function* () {
905
907
  try {
906
- return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanState(e) : yield Ae.setCameraScanState(e);
908
+ return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanState(e) : yield Ee.setCameraScanState(e);
907
909
  } catch (r) {
908
910
  throw console.error("setCameraScanState error", r), r;
909
911
  }
910
912
  });
911
913
  }
912
914
  getStatus() {
913
- return o(this, null, function* () {
915
+ return a(this, null, function* () {
914
916
  try {
915
- return yield Ae.getStatus();
917
+ return yield Ee.getStatus();
916
918
  } catch (e) {
917
919
  throw console.error("cameraScanPlugin getStatus error", e), e;
918
920
  }
919
921
  });
920
922
  }
921
923
  }
922
- let oe = null;
923
- var ar;
924
- window.__MICRO_APP_ENVIRONMENT__ && (oe = (ar = window.rawWindow.__mini_app_status_hook__) != null ? ar : {});
925
- const Oe = d.registerPlugin("CameraScanMultiplePlugin", { web: new class extends y {
924
+ let ae = null;
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
- return o(this, null, function* () {
929
+ return a(this, null, function* () {
928
930
  });
929
931
  }
930
932
  setCameraScanMultipleState() {
931
- return o(this, null, function* () {
933
+ return a(this, null, function* () {
932
934
  });
933
935
  }
934
936
  getStatus() {
935
937
  try {
936
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
938
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
937
939
  var e, r;
938
- t((yield (r = (e = oe == null ? void 0 : oe.cameraScanMultiple) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
940
+ t((yield (r = (e = ae == null ? void 0 : ae.cameraScanMultiple) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
939
941
  })) : new Promise((t) => {
940
942
  t(null);
941
943
  });
@@ -944,52 +946,52 @@ const Oe = d.registerPlugin("CameraScanMultiplePlugin", { web: new class extends
944
946
  }
945
947
  }
946
948
  }() });
947
- class $r {
949
+ class Xr {
948
950
  pickCameraScanMultiple(e) {
949
- return o(this, null, function* () {
951
+ return a(this, null, function* () {
950
952
  try {
951
- return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultiple(e) : yield Oe.pickCameraScanMultiple(e);
953
+ return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultiple(e) : yield Re.pickCameraScanMultiple(e);
952
954
  } catch (r) {
953
955
  throw console.error("pickCameraScanMultiple error", r), r;
954
956
  }
955
957
  });
956
958
  }
957
959
  setCameraScanMultipleState(e) {
958
- return o(this, null, function* () {
960
+ return a(this, null, function* () {
959
961
  try {
960
- return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleState(e) : yield Oe.setCameraScanMultipleState(e);
962
+ return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleState(e) : yield Re.setCameraScanMultipleState(e);
961
963
  } catch (r) {
962
964
  throw console.error("setCameraScanMultipleState error", r), r;
963
965
  }
964
966
  });
965
967
  }
966
968
  getStatus() {
967
- return o(this, null, function* () {
969
+ return a(this, null, function* () {
968
970
  try {
969
- return yield Oe.getStatus();
971
+ return yield Re.getStatus();
970
972
  } catch (e) {
971
973
  throw console.error("cameraScanMultiplePlugin getStatus error", e), e;
972
974
  }
973
975
  });
974
976
  }
975
977
  }
976
- let ae = null;
977
- var ir;
978
- window.__MICRO_APP_ENVIRONMENT__ && (ae = (ir = window.rawWindow.__mini_app_status_hook__) != null ? ir : {});
979
- const Ee = d.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
978
+ let ie = null;
979
+ var hr;
980
+ window.__MICRO_APP_ENVIRONMENT__ && (ie = (hr = window.rawWindow.__mini_app_status_hook__) != null ? hr : {});
981
+ const ke = u.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
980
982
  pickCameraScanMultipleNoCount() {
981
- return o(this, null, function* () {
983
+ return a(this, null, function* () {
982
984
  });
983
985
  }
984
986
  setCameraScanMultipleNoCountState() {
985
- return o(this, null, function* () {
987
+ return a(this, null, function* () {
986
988
  });
987
989
  }
988
990
  getStatus() {
989
991
  try {
990
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
992
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
991
993
  var e, r;
992
- t((yield (r = (e = ae == null ? void 0 : ae.cameraScanMultipleNoCount) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
994
+ t((yield (r = (e = ie == null ? void 0 : ie.cameraScanMultipleNoCount) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
993
995
  })) : new Promise((t) => {
994
996
  t(null);
995
997
  });
@@ -998,52 +1000,52 @@ const Ee = d.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class
998
1000
  }
999
1001
  }
1000
1002
  }() });
1001
- class qr {
1003
+ class et {
1002
1004
  pickCameraScanMultipleNoCount(e) {
1003
- return o(this, null, function* () {
1005
+ return a(this, null, function* () {
1004
1006
  try {
1005
- return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultipleNoCount(e) : yield Ee.pickCameraScanMultipleNoCount(e);
1007
+ return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanMultipleNoCount(e) : yield ke.pickCameraScanMultipleNoCount(e);
1006
1008
  } catch (r) {
1007
1009
  throw console.error("pickCameraScanMultipleNoCount error", r), r;
1008
1010
  }
1009
1011
  });
1010
1012
  }
1011
1013
  setCameraScanMultipleNoCountState(e) {
1012
- return o(this, null, function* () {
1014
+ return a(this, null, function* () {
1013
1015
  try {
1014
- return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleNoCountState(e) : yield Ee.setCameraScanMultipleNoCountState(e);
1016
+ return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraScanMultipleNoCountState(e) : yield ke.setCameraScanMultipleNoCountState(e);
1015
1017
  } catch (r) {
1016
1018
  throw console.error("setCameraScanMultipleNoCountState error", r), r;
1017
1019
  }
1018
1020
  });
1019
1021
  }
1020
1022
  getStatus() {
1021
- return o(this, null, function* () {
1023
+ return a(this, null, function* () {
1022
1024
  try {
1023
- return yield Ee.getStatus();
1025
+ return yield ke.getStatus();
1024
1026
  } catch (e) {
1025
1027
  throw console.error("cameraScanMultipleNoCountPlugin getStatus error", e), e;
1026
1028
  }
1027
1029
  });
1028
1030
  }
1029
1031
  }
1030
- let ie = null;
1031
- var sr;
1032
- window.__MICRO_APP_ENVIRONMENT__ && (ie = (sr = window.rawWindow.__mini_app_status_hook__) != null ? sr : {});
1033
- const Re = d.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends y {
1032
+ let se = null;
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
- return o(this, null, function* () {
1037
+ return a(this, null, function* () {
1036
1038
  });
1037
1039
  }
1038
1040
  setCameraScanSingleOrDualState() {
1039
- return o(this, null, function* () {
1041
+ return a(this, null, function* () {
1040
1042
  });
1041
1043
  }
1042
1044
  getStatus() {
1043
1045
  try {
1044
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
1046
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1045
1047
  var e, r;
1046
- t((yield (r = (e = ie == null ? void 0 : ie.cameraScanSingleOrDual) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1048
+ t((yield (r = (e = se == null ? void 0 : se.cameraScanSingleOrDual) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1047
1049
  })) : new Promise((t) => {
1048
1050
  t(null);
1049
1051
  });
@@ -1052,57 +1054,57 @@ const Re = d.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class ext
1052
1054
  }
1053
1055
  }
1054
1056
  }() });
1055
- class Kr {
1057
+ class rt {
1056
1058
  pickCameraScanSingleOrDual(e) {
1057
- return o(this, null, function* () {
1059
+ return a(this, null, function* () {
1058
1060
  try {
1059
- return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanSingleOrDual(e) : yield Re.pickCameraScanSingleOrDual(e);
1061
+ return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraScanSingleOrDual(e) : yield be.pickCameraScanSingleOrDual(e);
1060
1062
  } catch (r) {
1061
1063
  throw console.error("pickCameraScanSingleOrDual error", r), r;
1062
1064
  }
1063
1065
  });
1064
1066
  }
1065
1067
  setCameraScanSingleOrDualState(e) {
1066
- return o(this, null, function* () {
1068
+ return a(this, null, function* () {
1067
1069
  try {
1068
- return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCameraScanSingleOrDualState(e) : yield Re.setCameraScanSingleOrDualState(e);
1070
+ return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCameraScanSingleOrDualState(e) : yield be.setCameraScanSingleOrDualState(e);
1069
1071
  } catch (r) {
1070
1072
  throw console.error("setCameraScanSingleOrDualState error", r), r;
1071
1073
  }
1072
1074
  });
1073
1075
  }
1074
1076
  getStatus() {
1075
- return o(this, null, function* () {
1077
+ return a(this, null, function* () {
1076
1078
  try {
1077
- return yield Re.getStatus();
1079
+ return yield be.getStatus();
1078
1080
  } catch (e) {
1079
1081
  throw console.error("cameraScanSingleOrDualPlugin getStatus error", e), e;
1080
1082
  }
1081
1083
  });
1082
1084
  }
1083
1085
  }
1084
- const Sr = "LaserScanPlugin";
1085
- let se = null;
1086
- var cr;
1087
- window.__MICRO_APP_ENVIRONMENT__ && (se = (cr = window.rawWindow.__mini_app_status_hook__) != null ? cr : {});
1088
- const X = d.registerPlugin(Sr, { web: new class extends y {
1086
+ const Ar = "LaserScanPlugin";
1087
+ let ce = null;
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
- return o(this, null, function* () {
1092
+ return a(this, null, function* () {
1091
1093
  });
1092
1094
  }
1093
1095
  unPickLaserScan() {
1094
- return o(this, null, function* () {
1096
+ return a(this, null, function* () {
1095
1097
  });
1096
1098
  }
1097
1099
  setLaserState() {
1098
- return o(this, null, function* () {
1100
+ return a(this, null, function* () {
1099
1101
  });
1100
1102
  }
1101
1103
  getStatus() {
1102
1104
  try {
1103
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
1105
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1104
1106
  var e, r;
1105
- t((yield (r = (e = se == null ? void 0 : se.laserScan) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1107
+ t((yield (r = (e = ce == null ? void 0 : ce.laserScan) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1106
1108
  })) : new Promise((t) => {
1107
1109
  t(null);
1108
1110
  });
@@ -1110,20 +1112,20 @@ const X = d.registerPlugin(Sr, { web: new class extends y {
1110
1112
  throw console.error("laserScan getStatus error", t), t;
1111
1113
  }
1112
1114
  }
1113
- }() }), ce = M();
1114
- ce.removeAddListenerLaserScan = () => null;
1115
- const Xe = (t = () => null) => {
1115
+ }() }), le = f();
1116
+ le.removeAddListenerLaserScan = () => null;
1117
+ const rr = (t = () => null) => {
1116
1118
  try {
1117
- ce.removeAddListenerLaserScan && ce.removeAddListenerLaserScan();
1118
- const e = (r) => o(void 0, null, function* () {
1119
- r && (ce.removeAddListenerLaserScan = yield ((n) => o(void 0, null, function* () {
1119
+ le.removeAddListenerLaserScan && le.removeAddListenerLaserScan();
1120
+ const e = (r) => a(void 0, null, function* () {
1121
+ r && (le.removeAddListenerLaserScan = yield ((n) => a(void 0, null, function* () {
1120
1122
  try {
1121
- if (d.addListener) {
1122
- const a = yield d.addListener(Sr, "nativeSendLaser", (i) => n && n(i));
1123
- return a != null && a.remove ? a.remove : () => null;
1123
+ if (u.addListener) {
1124
+ const o = yield u.addListener(Ar, "nativeSendLaser", (i) => n && n(i));
1125
+ return o != null && o.remove ? o.remove : () => null;
1124
1126
  }
1125
- } catch (a) {
1126
- throw console.error("addListenerLaserHandle error", a), a;
1127
+ } catch (o) {
1128
+ throw console.error("addListenerLaserHandle error", o), o;
1127
1129
  }
1128
1130
  }))(r));
1129
1131
  });
@@ -1134,12 +1136,12 @@ const Xe = (t = () => null) => {
1134
1136
  throw console.error("laserScanFn error", e), e;
1135
1137
  }
1136
1138
  };
1137
- class Jr {
1139
+ class tt {
1138
1140
  constructor() {
1139
1141
  this.pickLaserScan();
1140
1142
  }
1141
1143
  pickLaserScan() {
1142
- return o(this, null, function* () {
1144
+ return a(this, null, function* () {
1143
1145
  try {
1144
1146
  return yield X.pickLaserScan({ isContinue: !1 });
1145
1147
  } catch (e) {
@@ -1148,7 +1150,7 @@ class Jr {
1148
1150
  });
1149
1151
  }
1150
1152
  unPickLaserScan() {
1151
- return o(this, null, function* () {
1153
+ return a(this, null, function* () {
1152
1154
  try {
1153
1155
  return yield X.unPickLaserScan();
1154
1156
  } catch (e) {
@@ -1166,11 +1168,11 @@ class Jr {
1166
1168
  setLaserScan(e) {
1167
1169
  ((r) => {
1168
1170
  try {
1169
- const { mounted: n, beforeUnmount: a, callBack: i } = r;
1171
+ const { mounted: n, beforeUnmount: o, callBack: i } = r;
1170
1172
  n(() => {
1171
- Xe(i);
1172
- }), a(() => {
1173
- Xe();
1173
+ rr(i);
1174
+ }), o(() => {
1175
+ rr();
1174
1176
  });
1175
1177
  } catch (n) {
1176
1178
  throw console.error("laserScanApiParams error", n), n;
@@ -1178,7 +1180,7 @@ class Jr {
1178
1180
  })(e);
1179
1181
  }
1180
1182
  getStatus() {
1181
- return o(this, null, function* () {
1183
+ return a(this, null, function* () {
1182
1184
  try {
1183
1185
  return yield X.getStatus();
1184
1186
  } catch (e) {
@@ -1187,13 +1189,13 @@ class Jr {
1187
1189
  });
1188
1190
  }
1189
1191
  }
1190
- const Nr = "CountAssistPlugin";
1191
- let le = null;
1192
- var lr;
1193
- window.__MICRO_APP_ENVIRONMENT__ && (le = (lr = window.rawWindow.__mini_app_status_hook__) != null ? lr : {});
1194
- const z = d.registerPlugin(Nr, { web: new class extends y {
1192
+ const Er = "CountAssistPlugin";
1193
+ let we = null;
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
- return o(this, null, function* () {
1198
+ return a(this, null, function* () {
1197
1199
  try {
1198
1200
  return new Promise((e) => {
1199
1201
  e(t);
@@ -1204,7 +1206,7 @@ const z = d.registerPlugin(Nr, { web: new class extends y {
1204
1206
  });
1205
1207
  }
1206
1208
  toggleCountAssist(t) {
1207
- return o(this, null, function* () {
1209
+ return a(this, null, function* () {
1208
1210
  try {
1209
1211
  return new Promise((e) => {
1210
1212
  e(t);
@@ -1215,7 +1217,7 @@ const z = d.registerPlugin(Nr, { web: new class extends y {
1215
1217
  });
1216
1218
  }
1217
1219
  getCountAssistToggleState() {
1218
- return o(this, null, function* () {
1220
+ return a(this, null, function* () {
1219
1221
  try {
1220
1222
  return new Promise((t) => {
1221
1223
  t(void 0);
@@ -1227,9 +1229,9 @@ const z = d.registerPlugin(Nr, { web: new class extends y {
1227
1229
  }
1228
1230
  getStatus() {
1229
1231
  try {
1230
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
1232
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1231
1233
  var e, r;
1232
- t((yield (r = (e = le == null ? void 0 : le.countAssist) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1234
+ t((yield (r = (e = we == null ? void 0 : we.countAssist) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1233
1235
  })) : new Promise((t) => {
1234
1236
  t(null);
1235
1237
  });
@@ -1237,14 +1239,14 @@ const z = d.registerPlugin(Nr, { web: new class extends y {
1237
1239
  throw console.error("countAssist getStatus error", t), t;
1238
1240
  }
1239
1241
  }
1240
- }() }), D = M();
1242
+ }() }), D = f();
1241
1243
  D.addListenerCountAssistRemoveHandle = () => null;
1242
- const ze = (t = () => null) => o(void 0, null, function* () {
1244
+ const tr = (t = () => null) => a(void 0, null, function* () {
1243
1245
  try {
1244
- D != null && D.addListenerCountAssistRemoveHandle && typeof D.addListenerCountAssistRemoveHandle == "function" && D.addListenerCountAssistRemoveHandle(), D.addListenerCountAssistRemoveHandle = yield ((e) => o(void 0, null, function* () {
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(Nr, "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,18 +1257,18 @@ const ze = (t = () => null) => o(void 0, null, function* () {
1255
1257
  throw console.error("initCountAssistFn error", e), e;
1256
1258
  }
1257
1259
  });
1258
- class Gr {
1260
+ class nt {
1259
1261
  setCountAssistState(e) {
1260
- return o(this, null, function* () {
1261
- return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCountAssistState(e) : yield z.setCountAssistState(e);
1262
+ return a(this, null, function* () {
1263
+ return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.setCountAssistState(e) : yield ee.setCountAssistState(e);
1262
1264
  });
1263
1265
  }
1264
1266
  getCountAssistState(e) {
1265
1267
  return ((r) => {
1266
1268
  try {
1267
1269
  let n = r != null ? r : !1;
1268
- return ee((a) => {
1269
- n = !!(a != null && a.countAssistState);
1270
+ return re((o) => {
1271
+ n = !!(o != null && o.countAssistState);
1270
1272
  }), n;
1271
1273
  } catch (n) {
1272
1274
  throw console.error("getCountAssistStateHandle error", n), n;
@@ -1276,11 +1278,11 @@ class Gr {
1276
1278
  setCountAssistBtn(e) {
1277
1279
  ((r) => {
1278
1280
  try {
1279
- const { mounted: n, beforeUnmount: a, callBack: i } = r;
1281
+ const { mounted: n, beforeUnmount: o, callBack: i } = r;
1280
1282
  n(() => {
1281
- ze(i);
1282
- }), a(() => {
1283
- ze();
1283
+ tr(i);
1284
+ }), o(() => {
1285
+ tr();
1284
1286
  });
1285
1287
  } catch (n) {
1286
1288
  throw console.error("setCountAssistBtnHandle error", n), n;
@@ -1288,38 +1290,38 @@ class Gr {
1288
1290
  })(e);
1289
1291
  }
1290
1292
  toggleCountAssist(e) {
1291
- return o(this, null, function* () {
1292
- return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.toggleCountAssist(e) : yield z.toggleCountAssist(e);
1293
+ return a(this, null, function* () {
1294
+ return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.toggleCountAssist(e) : yield ee.toggleCountAssist(e);
1293
1295
  });
1294
1296
  }
1295
1297
  getCountAssistToggleState() {
1296
- return o(this, null, function* () {
1297
- return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.getCountAssistToggleState() : yield z.getCountAssistToggleState();
1298
+ return a(this, null, function* () {
1299
+ return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.getCountAssistToggleState() : yield ee.getCountAssistToggleState();
1298
1300
  });
1299
1301
  }
1300
1302
  getStatus() {
1301
- return o(this, null, function* () {
1303
+ return a(this, null, function* () {
1302
1304
  try {
1303
- return yield z.getStatus();
1305
+ return yield ee.getStatus();
1304
1306
  } catch (e) {
1305
1307
  throw console.error("countAssistPlugin getStatus error", e), e;
1306
1308
  }
1307
1309
  });
1308
1310
  }
1309
1311
  }
1310
- let we = null;
1311
- var wr;
1312
- window.__MICRO_APP_ENVIRONMENT__ && (we = (wr = window.rawWindow.__mini_app_status_hook__) != null ? wr : {});
1313
- const ke = d.registerPlugin("ClickStreamPlugin", { web: new class extends y {
1312
+ let de = null;
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
- return o(this, null, function* () {
1317
+ return a(this, null, function* () {
1316
1318
  return new Promise((t) => {
1317
1319
  t(null);
1318
1320
  });
1319
1321
  });
1320
1322
  }
1321
1323
  trace(t) {
1322
- return o(this, null, function* () {
1324
+ return a(this, null, function* () {
1323
1325
  var e, r;
1324
1326
  try {
1325
1327
  return window.__MICRO_APP_ENVIRONMENT__ && ((r = (e = window.rawWindow.__mini_app_hook__).clickStream) == null || r.call(e, t.data)), new Promise((n) => {
@@ -1332,9 +1334,9 @@ const ke = d.registerPlugin("ClickStreamPlugin", { web: new class extends y {
1332
1334
  }
1333
1335
  getStatus() {
1334
1336
  try {
1335
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
1337
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1336
1338
  var e, r;
1337
- t((yield (r = (e = we == null ? void 0 : we.clickStream) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1339
+ t((yield (r = (e = de == null ? void 0 : de.clickStream) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1338
1340
  })) : new Promise((t) => {
1339
1341
  t(null);
1340
1342
  });
@@ -1343,57 +1345,57 @@ const ke = d.registerPlugin("ClickStreamPlugin", { web: new class extends y {
1343
1345
  }
1344
1346
  }
1345
1347
  }() });
1346
- class Qr {
1348
+ class ot {
1347
1349
  constructor() {
1348
1350
  this.init();
1349
1351
  }
1350
1352
  init() {
1351
- return o(this, null, function* () {
1353
+ return a(this, null, function* () {
1352
1354
  try {
1353
- return yield ke.init();
1355
+ return yield Te.init();
1354
1356
  } catch (e) {
1355
1357
  throw console.error("clickStreamPlugin, init error", e), e;
1356
1358
  }
1357
1359
  });
1358
1360
  }
1359
1361
  trace(e) {
1360
- return o(this, null, function* () {
1362
+ return a(this, null, function* () {
1361
1363
  try {
1362
- return yield ke.trace(e);
1364
+ return yield Te.trace(e);
1363
1365
  } catch (r) {
1364
1366
  throw console.error("clickStreamPlugin, trace error", r), r;
1365
1367
  }
1366
1368
  });
1367
1369
  }
1368
1370
  getStatus() {
1369
- return o(this, null, function* () {
1371
+ return a(this, null, function* () {
1370
1372
  try {
1371
- return yield ke.getStatus();
1373
+ return yield Te.getStatus();
1372
1374
  } catch (e) {
1373
1375
  throw console.error("clickStreamPlugin getStatus error", e), e;
1374
1376
  }
1375
1377
  });
1376
1378
  }
1377
1379
  }
1378
- const Mr = "MiniAppLifecyclePlugin";
1379
- let de = null;
1380
- var dr;
1381
- window.__MICRO_APP_ENVIRONMENT__ && (de = (dr = window.rawWindow.__mini_app_status_hook__) != null ? dr : {});
1380
+ const Rr = "MiniAppLifecyclePlugin";
1381
+ let ue = null;
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(Mr, { web: new class extends y {
1385
+ const Be = u.registerPlugin(Rr, { web: new class extends y {
1384
1386
  setNativeUsagePermission() {
1385
- return o(this, null, function* () {
1387
+ return a(this, null, function* () {
1386
1388
  });
1387
1389
  }
1388
1390
  authorizeWebCallback() {
1389
- return o(this, null, function* () {
1391
+ return a(this, null, function* () {
1390
1392
  });
1391
1393
  }
1392
1394
  getStatus() {
1393
1395
  try {
1394
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
1396
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1395
1397
  var e, r;
1396
- t((yield (r = (e = de == null ? void 0 : de.lifecycle) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1398
+ t((yield (r = (e = ue == null ? void 0 : ue.lifecycle) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1397
1399
  })) : new Promise((t) => {
1398
1400
  t(null);
1399
1401
  });
@@ -1401,46 +1403,46 @@ const be = d.registerPlugin(Mr, { web: new class extends y {
1401
1403
  throw console.error("lifecycle getStatus error", t), t;
1402
1404
  }
1403
1405
  }
1404
- }() }), ue = M();
1405
- ue.removeAddListenerLifecycleMiniAppBeforeUnmount = () => null;
1406
- const er = (t = () => null) => {
1406
+ }() }), _e = f();
1407
+ _e.removeAddListenerLifecycleMiniAppBeforeUnmount = () => null;
1408
+ const nr = (t = () => null) => {
1407
1409
  try {
1408
- ue.removeAddListenerLifecycleMiniAppBeforeUnmount && ue.removeAddListenerLifecycleMiniAppBeforeUnmount();
1409
- const e = (r) => o(void 0, null, function* () {
1410
- r && (ue.removeAddListenerLifecycleMiniAppBeforeUnmount = yield ((n) => o(void 0, null, function* () {
1410
+ _e.removeAddListenerLifecycleMiniAppBeforeUnmount && _e.removeAddListenerLifecycleMiniAppBeforeUnmount();
1411
+ const e = (r) => a(void 0, null, function* () {
1412
+ r && (_e.removeAddListenerLifecycleMiniAppBeforeUnmount = yield ((n) => a(void 0, null, function* () {
1411
1413
  try {
1412
- if (d.addListener) {
1413
- const a = yield d.addListener(Mr, "miniAppBeforeUnmount", (i) => n && n(i));
1414
- return a != null && a.remove ? a.remove : () => null;
1414
+ if (u.addListener) {
1415
+ const o = yield u.addListener(Rr, "miniAppBeforeUnmount", (i) => n && n(i));
1416
+ return o != null && o.remove ? o.remove : () => null;
1415
1417
  }
1416
- } catch (a) {
1417
- throw console.error("miniAppBeforeUnmountHandle error", a), a;
1418
+ } catch (o) {
1419
+ throw console.error("miniAppBeforeUnmountHandle error", o), o;
1418
1420
  }
1419
1421
  }))(r));
1420
1422
  });
1421
- setTimeout(() => o(void 0, null, function* () {
1423
+ setTimeout(() => a(void 0, null, function* () {
1422
1424
  yield e(t);
1423
1425
  }));
1424
1426
  } catch (e) {
1425
1427
  throw console.error("laserScanFn error", e), e;
1426
1428
  }
1427
1429
  };
1428
- class Yr {
1430
+ class at {
1429
1431
  constructor() {
1430
1432
  }
1431
1433
  setNativeUsagePermission(e) {
1432
- return o(this, null, function* () {
1434
+ return a(this, null, function* () {
1433
1435
  try {
1434
- return yield be.setNativeUsagePermission(e);
1436
+ return yield Be.setNativeUsagePermission(e);
1435
1437
  } catch (r) {
1436
1438
  throw console.error("lifecyclePlugin.setNativeUsagePermission error", r), r;
1437
1439
  }
1438
1440
  });
1439
1441
  }
1440
1442
  authorizeWebCallback(e) {
1441
- return o(this, null, function* () {
1443
+ return a(this, null, function* () {
1442
1444
  try {
1443
- return yield be.authorizeWebCallback(e);
1445
+ return yield Be.authorizeWebCallback(e);
1444
1446
  } catch (r) {
1445
1447
  throw console.error("lifecyclePlugin.authorizeWebCallback error", r), r;
1446
1448
  }
@@ -1449,56 +1451,56 @@ class Yr {
1449
1451
  miniAppBeforeUnmount(e) {
1450
1452
  this.setNativeUsagePermission({ action: Q.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !0 }), ((r, n) => {
1451
1453
  try {
1452
- const { mounted: a, beforeUnmount: i, callBack: c } = r;
1453
- a(() => {
1454
- er((s) => o(this, null, function* () {
1455
- var w;
1454
+ const { mounted: o, beforeUnmount: i, callBack: c } = r;
1455
+ o(() => {
1456
+ nr((s) => a(this, null, function* () {
1457
+ var l;
1456
1458
  if (c && c instanceof Function)
1457
1459
  try {
1458
- (w = c(s)) == null || w.then(() => o(this, null, function* () {
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
- }), i(() => o(this, null, function* () {
1468
- er(), n.setNativeUsagePermission({ action: Q.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
1469
+ }), i(() => a(this, null, function* () {
1470
+ nr(), n.setNativeUsagePermission({ action: Q.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
1469
1471
  }));
1470
- } catch (a) {
1471
- throw console.error("miniAppBeforeUnmount error", a), a;
1472
+ } catch (o) {
1473
+ throw console.error("miniAppBeforeUnmount error", o), o;
1472
1474
  }
1473
1475
  })(e, this);
1474
1476
  }
1475
1477
  getStatus() {
1476
- return o(this, null, function* () {
1478
+ return a(this, null, function* () {
1477
1479
  try {
1478
- return yield be.getStatus();
1480
+ return yield Be.getStatus();
1479
1481
  } catch (e) {
1480
1482
  throw console.error("getStatus error", e), e;
1481
1483
  }
1482
1484
  });
1483
1485
  }
1484
1486
  }
1485
- let _e = null;
1486
- var ur;
1487
- window.__MICRO_APP_ENVIRONMENT__ && (_e = (ur = window.rawWindow.__mini_app_status_hook__) != null ? ur : {});
1488
- const Te = 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
- return o(this, null, function* () {
1492
+ return a(this, null, function* () {
1491
1493
  });
1492
1494
  }
1493
1495
  callErrorBeep() {
1494
- return o(this, null, function* () {
1496
+ return a(this, null, function* () {
1495
1497
  });
1496
1498
  }
1497
1499
  getStatus() {
1498
1500
  try {
1499
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
1501
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1500
1502
  var e, r;
1501
- t((yield (r = (e = _e == null ? void 0 : _e.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,53 +1509,53 @@ const Te = d.registerPlugin("DeviceInteractionPlugin", { web: new class extends
1507
1509
  }
1508
1510
  }
1509
1511
  }() });
1510
- class Zr {
1512
+ class it {
1511
1513
  callVibrate() {
1512
- return o(this, null, function* () {
1514
+ return a(this, null, function* () {
1513
1515
  try {
1514
- return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.callVibrate() : yield Te.callVibrate();
1516
+ return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.callVibrate() : yield Ve.callVibrate();
1515
1517
  } catch (e) {
1516
1518
  throw console.error("callVibrate error", e), e;
1517
1519
  }
1518
1520
  });
1519
1521
  }
1520
1522
  callErrorBeep() {
1521
- return o(this, null, function* () {
1523
+ return a(this, null, function* () {
1522
1524
  try {
1523
- return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.callErrorBeep() : yield Te.callErrorBeep();
1525
+ return window.__MICRO_APP_ENVIRONMENT__ ? yield window.rawWindow.__mini_app_hook__.callErrorBeep() : yield Ve.callErrorBeep();
1524
1526
  } catch (e) {
1525
1527
  throw console.error("callErrorBeep error", e), e;
1526
1528
  }
1527
1529
  });
1528
1530
  }
1529
1531
  getStatus() {
1530
- return o(this, null, function* () {
1532
+ return a(this, null, function* () {
1531
1533
  try {
1532
- return yield Te.getStatus();
1534
+ return yield Ve.getStatus();
1533
1535
  } catch (e) {
1534
1536
  throw console.error("deviceInteractionPlugin getStatus error", e), e;
1535
1537
  }
1536
1538
  });
1537
1539
  }
1538
1540
  }
1539
- const fr = "PollingPlugin";
1540
- let he = null;
1541
- var _r;
1542
- window.__MICRO_APP_ENVIRONMENT__ && (he = (_r = window.rawWindow.__mini_app_status_hook__) != null ? _r : {});
1543
- const Be = d.registerPlugin(fr, { 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
- return o(this, null, function* () {
1547
+ return a(this, null, function* () {
1546
1548
  });
1547
1549
  }
1548
1550
  destroy() {
1549
- return o(this, null, function* () {
1551
+ return a(this, null, function* () {
1550
1552
  });
1551
1553
  }
1552
1554
  getStatus() {
1553
1555
  try {
1554
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
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
  });
@@ -1561,17 +1563,17 @@ const Be = d.registerPlugin(fr, { web: new class extends y {
1561
1563
  throw console.error("polling getStatus error", t), t;
1562
1564
  }
1563
1565
  }
1564
- }() }), pe = M();
1565
- pe.removeAddListenerPolling = () => null;
1566
- const Xr = (t, e) => {
1566
+ }() }), me = f();
1567
+ me.removeAddListenerPolling = () => null;
1568
+ const st = (t, e) => {
1567
1569
  try {
1568
- pe.removeAddListenerPolling && pe.removeAddListenerPolling();
1570
+ me.removeAddListenerPolling && me.removeAddListenerPolling();
1569
1571
  const r = e.pollingId;
1570
- ((n) => o(void 0, null, function* () {
1571
- return n && (pe.removeAddListenerPolling = yield ((a) => o(void 0, null, function* () {
1572
+ ((n) => a(void 0, null, function* () {
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(fr, "nativeSendPolling", (c) => a && a(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) {
@@ -1579,39 +1581,39 @@ const Xr = (t, e) => {
1579
1581
  }
1580
1582
  }))(n));
1581
1583
  }))((n) => {
1582
- (n == null ? void 0 : n.pollingId) === r && (n != null && n.pollingId) && t.pollingList.forEach((a) => {
1583
- a != null && a.pollingId && (n == null ? void 0 : n.pollingId) === (a == null ? void 0 : a.pollingId) && typeof (a == null ? void 0 : a.callBack) == "function" && a.callBack(n);
1584
+ (n == null ? void 0 : n.pollingId) === r && (n != null && n.pollingId) && t.pollingList.forEach((o) => {
1585
+ o != null && o.pollingId && (n == null ? void 0 : n.pollingId) === (o == null ? void 0 : o.pollingId) && typeof (o == null ? void 0 : o.callBack) == "function" && o.callBack(n);
1584
1586
  });
1585
1587
  });
1586
1588
  } catch (r) {
1587
1589
  throw console.error("pollingFn error", r), r;
1588
1590
  }
1589
1591
  };
1590
- class zr {
1592
+ class ct {
1591
1593
  constructor() {
1592
1594
  P(this, "pollingList");
1593
1595
  this.pollingList = [];
1594
1596
  }
1595
1597
  create(e) {
1596
- var r, n, a;
1598
+ var r, n, o;
1597
1599
  if (window.__MICRO_APP_ENVIRONMENT__) {
1598
1600
  const { mounted: i, pollingParams: c, callBack: s } = e;
1599
1601
  return i(() => {
1600
- var w, u;
1601
- (u = (w = window.rawWindow.__mini_app_hook__) == null ? void 0 : w.addPolling) == null || u.call(w, 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, w) => s === w.findIndex((u) => u.pollingId === c.pollingId));
1608
- const i = ((a = e == null ? void 0 : e.pollingParams) == null ? void 0 : a.delay) / 1e3;
1609
- return Be.create(T(b({}, e == null ? void 0 : e.pollingParams), { delay: i })), ((c, s) => {
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));
1610
+ const i = ((o = e == null ? void 0 : e.pollingParams) == null ? void 0 : o.delay) / 1e3;
1611
+ return He.create(T(b({}, e == null ? void 0 : e.pollingParams), { delay: i })), ((c, s) => {
1610
1612
  try {
1611
- const { mounted: w, pollingParams: u } = c;
1612
- w(() => Xr(s, u));
1613
- } catch (w) {
1614
- throw console.error("createPolling error", w), w;
1613
+ const { mounted: l, pollingParams: w } = c;
1614
+ l(() => st(s, w));
1615
+ } catch (l) {
1616
+ throw console.error("createPolling error", l), l;
1615
1617
  }
1616
1618
  })(e, this), () => {
1617
1619
  var c, s;
@@ -1622,34 +1624,34 @@ class zr {
1622
1624
  }
1623
1625
  }
1624
1626
  destroy(e) {
1625
- var r, n, a;
1627
+ var r, n, o;
1626
1628
  if (window.__MICRO_APP_ENVIRONMENT__) {
1627
1629
  const { pollingId: i } = e;
1628
1630
  (n = (r = window.rawWindow.__mini_app_hook__) == null ? void 0 : r.deletePolling) == null || n.call(r, i);
1629
1631
  } else
1630
1632
  try {
1631
1633
  const i = this.pollingList.map((c) => c.pollingId).indexOf(e.pollingId);
1632
- return (a = this.pollingList) != null && a.length && (Number(i) || Number(i) >= 0) && this.pollingList.splice(Number(i), 1), Be.destroy(e);
1634
+ return (o = this.pollingList) != null && o.length && (Number(i) || Number(i) >= 0) && this.pollingList.splice(Number(i), 1), He.destroy(e);
1633
1635
  } catch (i) {
1634
1636
  throw console.error("pollingPlugin destroy error", i), i;
1635
1637
  }
1636
1638
  }
1637
1639
  getStatus() {
1638
- return o(this, null, function* () {
1640
+ return a(this, null, function* () {
1639
1641
  try {
1640
- return yield Be.getStatus();
1642
+ return yield He.getStatus();
1641
1643
  } catch (e) {
1642
1644
  throw console.error("getStatus error", e), e;
1643
1645
  }
1644
1646
  });
1645
1647
  }
1646
1648
  }
1647
- let me = null;
1648
- var hr;
1649
- window.__MICRO_APP_ENVIRONMENT__ && (me = (hr = window.rawWindow.__mini_app_status_hook__) != null ? hr : {});
1650
- const rr = d.registerPlugin("PaymentPlugin", { web: new class extends y {
1649
+ let ge = null;
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
- return o(this, null, function* () {
1654
+ return a(this, null, function* () {
1653
1655
  try {
1654
1656
  return new Promise((e) => {
1655
1657
  e(t);
@@ -1661,9 +1663,9 @@ const rr = d.registerPlugin("PaymentPlugin", { web: new class extends y {
1661
1663
  }
1662
1664
  getStatus() {
1663
1665
  try {
1664
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
1666
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1665
1667
  var e, r;
1666
- t((yield (r = (e = me == null ? void 0 : me.payment) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1668
+ t((yield (r = (e = ge == null ? void 0 : ge.payment) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1667
1669
  })) : new Promise((t) => {
1668
1670
  t(null);
1669
1671
  });
@@ -1672,43 +1674,43 @@ const rr = d.registerPlugin("PaymentPlugin", { web: new class extends y {
1672
1674
  }
1673
1675
  }
1674
1676
  }() });
1675
- class et {
1677
+ class lt {
1676
1678
  process(e) {
1677
- return o(this, null, function* () {
1679
+ return a(this, null, function* () {
1678
1680
  try {
1679
- return yield rr.process(e);
1681
+ return yield or.process(e);
1680
1682
  } catch (r) {
1681
1683
  throw console.error("paymentPlugins.process error", r), r;
1682
1684
  }
1683
1685
  });
1684
1686
  }
1685
1687
  getStatus() {
1686
- return o(this, null, function* () {
1688
+ return a(this, null, function* () {
1687
1689
  try {
1688
- return yield rr.getStatus();
1690
+ return yield or.getStatus();
1689
1691
  } catch (e) {
1690
1692
  throw console.error("getStatus error", e), e;
1691
1693
  }
1692
1694
  });
1693
1695
  }
1694
1696
  }
1695
- let ge = null;
1696
- var pr;
1697
- window.__MICRO_APP_ENVIRONMENT__ && (ge = (pr = window.rawWindow.__mini_app_status_hook__) != null ? pr : {});
1698
- const Ve = d.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends y {
1697
+ let Pe = null;
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
- return o(this, null, function* () {
1702
+ return a(this, null, function* () {
1701
1703
  });
1702
1704
  }
1703
1705
  setCameraForTakePhotoState() {
1704
- return o(this, null, function* () {
1706
+ return a(this, null, function* () {
1705
1707
  });
1706
1708
  }
1707
1709
  getStatus() {
1708
1710
  try {
1709
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
1711
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1710
1712
  var e, r;
1711
- t((yield (r = (e = ge == null ? void 0 : ge.cameraForTakePhoto) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1713
+ t((yield (r = (e = Pe == null ? void 0 : Pe.cameraForTakePhoto) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1712
1714
  })) : new Promise((t) => {
1713
1715
  t(null);
1714
1716
  });
@@ -1717,41 +1719,41 @@ const Ve = d.registerPlugin("CameraForTakePhotoPlugin", { web: new class extends
1717
1719
  }
1718
1720
  }
1719
1721
  }() });
1720
- class rt {
1722
+ class wt {
1721
1723
  pickCameraForTakePhoto() {
1722
- return o(this, null, function* () {
1724
+ return a(this, null, function* () {
1723
1725
  try {
1724
- return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.pickCameraForTakePhoto() : yield Ve.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
  }
1728
1730
  });
1729
1731
  }
1730
1732
  setCameraForTakePhotoState(e) {
1731
- return o(this, null, function* () {
1733
+ return a(this, null, function* () {
1732
1734
  try {
1733
- return window.__MICRO_APP_ENVIRONMENT__ ? window.rawWindow.__mini_app_hook__.setCameraForTakePhotoState(e) : yield Ve.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
  }
1737
1739
  });
1738
1740
  }
1739
1741
  getStatus() {
1740
- return o(this, null, function* () {
1742
+ return a(this, null, function* () {
1741
1743
  try {
1742
- return yield Ve.getStatus();
1744
+ return yield Ue.getStatus();
1743
1745
  } catch (e) {
1744
1746
  throw console.error("cameraForTakePhotoPlugin getStatus error", e), e;
1745
1747
  }
1746
1748
  });
1747
1749
  }
1748
1750
  }
1749
- let Pe = null;
1750
- var mr;
1751
- window.__MICRO_APP_ENVIRONMENT__ && (Pe = (mr = window.rawWindow.__mini_app_status_hook__) != null ? mr : {});
1752
- const tr = d.registerPlugin("HttpPlugin", { web: new class extends y {
1751
+ let ye = null;
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
- return o(this, null, function* () {
1756
+ return a(this, null, function* () {
1755
1757
  return new Promise((e) => {
1756
1758
  e(t);
1757
1759
  });
@@ -1759,9 +1761,9 @@ const tr = d.registerPlugin("HttpPlugin", { web: new class extends y {
1759
1761
  }
1760
1762
  getStatus() {
1761
1763
  try {
1762
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
1764
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1763
1765
  var e, r;
1764
- t((yield (r = (e = Pe == null ? void 0 : Pe.http) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1766
+ t((yield (r = (e = ye == null ? void 0 : ye.http) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1765
1767
  })) : new Promise((t) => {
1766
1768
  t(null);
1767
1769
  });
@@ -1770,15 +1772,15 @@ const tr = d.registerPlugin("HttpPlugin", { web: new class extends y {
1770
1772
  }
1771
1773
  }
1772
1774
  }() });
1773
- class tt {
1775
+ class dt {
1774
1776
  request(e) {
1775
- return o(this, null, function* () {
1777
+ return a(this, null, function* () {
1776
1778
  try {
1777
1779
  if (window.__MICRO_APP_ENVIRONMENT__)
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 tr.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;
@@ -1786,9 +1788,9 @@ class tt {
1786
1788
  });
1787
1789
  }
1788
1790
  getStatus() {
1789
- return o(this, null, function* () {
1791
+ return a(this, null, function* () {
1790
1792
  try {
1791
- return yield tr.getStatus();
1793
+ return yield ar.getStatus();
1792
1794
  } catch (e) {
1793
1795
  throw console.error("HttpPlugin getStatus error", e), e;
1794
1796
  }
@@ -1798,38 +1800,38 @@ class tt {
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 nt = new Uint8Array(16);
1802
- function ot(t, e, r) {
1803
- return e || t || !crypto.randomUUID ? function(n, a, i) {
1804
- var s, w, u;
1803
+ const ut = new Uint8Array(16);
1804
+ function _t(t, e, r) {
1805
+ return e || t || !crypto.randomUUID ? function(n, o, i) {
1806
+ var s, l, w;
1805
1807
  n = n || {};
1806
- const c = (u = (w = n.random) != null ? w : (s = n.rng) == null ? void 0 : s.call(n)) != null ? u : crypto.getRandomValues(nt);
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
- if (c[6] = 15 & c[6] | 64, c[8] = 63 & c[8] | 128, a) {
1810
- if ((i = i || 0) < 0 || i + 16 > a.length)
1811
+ if (c[6] = 15 & c[6] | 64, c[8] = 63 & c[8] | 128, o) {
1812
+ if ((i = i || 0) < 0 || i + 16 > o.length)
1811
1813
  throw new RangeError(`UUID byte range ${i}:${i + 15} is out of buffer bounds`);
1812
1814
  for (let _ = 0; _ < 16; ++_)
1813
- a[i + _] = c[_];
1814
- return a;
1815
+ o[i + _] = c[_];
1816
+ return o;
1815
1817
  }
1816
1818
  return function(_, p = 0) {
1817
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 Ir = "PrintPlugin";
1822
- let ye = null;
1823
- var gr;
1824
- window.__MICRO_APP_ENVIRONMENT__ && (ye = (gr = window.rawWindow.__mini_app_status_hook__) != null ? gr : {});
1825
- const nr = d.registerPlugin(Ir, { web: new class extends y {
1823
+ const br = "PrintPlugin";
1824
+ let Se = null;
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() {
1829
1831
  try {
1830
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
1832
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1831
1833
  var e, r;
1832
- t((yield (r = (e = ye == null ? void 0 : ye.print) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1834
+ t((yield (r = (e = Se == null ? void 0 : Se.print) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1833
1835
  })) : new Promise((t) => {
1834
1836
  t(null);
1835
1837
  });
@@ -1837,17 +1839,17 @@ const nr = d.registerPlugin(Ir, { web: new class extends y {
1837
1839
  throw console.error("print getStatus error", t), t;
1838
1840
  }
1839
1841
  }
1840
- }() }), Y = M();
1842
+ }() }), Y = f();
1841
1843
  Y.removeAddListenerPrintList = {};
1842
- const at = (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
- } }), ((n) => o(void 0, null, function* () {
1847
- return n && (Y.removeAddListenerPrintList[r] = yield ((a) => o(void 0, null, function* () {
1848
+ } }), ((n) => a(void 0, null, function* () {
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(Ir, "nativeSendPrint", (c) => a && a(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) {
@@ -1855,34 +1857,34 @@ const at = (t, e) => {
1855
1857
  }
1856
1858
  }))(n));
1857
1859
  }))((n) => {
1858
- (n == null ? void 0 : n.printId) === r && (n != null && n.printId) && t.printList.forEach((a) => {
1860
+ (n == null ? void 0 : n.printId) === r && (n != null && n.printId) && t.printList.forEach((o) => {
1859
1861
  var i, c, s;
1860
- a != null && a.printId && (n == null ? void 0 : n.printId) === (a == null ? void 0 : a.printId) && (typeof (a == null ? void 0 : a.callBack) == "function" && a.callBack(n), (s = a.state == 5 || a.state == 6) != null || (c = (i = Y.removeAddListenerPrintList) == null ? void 0 : i[a == null ? void 0 : a.printId]) == null || c.call(i));
1862
+ o != null && o.printId && (n == null ? void 0 : n.printId) === (o == null ? void 0 : o.printId) && (typeof (o == null ? void 0 : o.callBack) == "function" && o.callBack(n), (s = o.state == 5 || o.state == 6) != null || (c = (i = Y.removeAddListenerPrintList) == null ? void 0 : i[o == null ? void 0 : o.printId]) == null || c.call(i));
1861
1863
  });
1862
1864
  });
1863
1865
  } catch (r) {
1864
1866
  throw console.error("printFn error", r), r;
1865
1867
  }
1866
1868
  };
1867
- class it {
1869
+ class pt {
1868
1870
  constructor() {
1869
1871
  P(this, "printList");
1870
1872
  this.printList = [];
1871
1873
  }
1872
1874
  print(e) {
1873
- var n, a, i, c;
1874
- const r = ((a = (n = e == null ? void 0 : e.printParams) == null ? void 0 : n.functionId) != null ? a : "") + ot().replace(/-/g, "");
1875
- if (this.printList.push({ printId: r, callBack: e == null ? void 0 : e.callBack }), this.printList = this.printList.filter((s, w, u) => w === u.findIndex((_) => _.printId === s.printId)), window.__MICRO_APP_ENVIRONMENT__) {
1876
- const { printParams: s, callBack: w } = e;
1877
- return (c = (i = window.rawWindow.__mini_app_hook__) == null ? void 0 : i.print) == null || c.call(i, T(b({}, s), { printId: r }), w), { id: r };
1875
+ var n, o, i, c;
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__) {
1878
+ const { printParams: s, callBack: l } = e;
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 nr.print(T(b({}, e == null ? void 0 : e.printParams), { printId: r })), ((s, w) => {
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
- at(w, 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) {
@@ -1890,51 +1892,160 @@ class it {
1890
1892
  }
1891
1893
  }
1892
1894
  getStatus() {
1893
- return o(this, null, function* () {
1895
+ return a(this, null, function* () {
1894
1896
  try {
1895
- return yield nr.getStatus();
1897
+ return yield ir.getStatus();
1896
1898
  } catch (e) {
1897
1899
  throw console.error("getStatus error", e), e;
1898
1900
  }
1899
1901
  });
1900
1902
  }
1901
1903
  }
1902
- class st {
1904
+ let Ne = null;
1905
+ var Or;
1906
+ window.__MICRO_APP_ENVIRONMENT__ && (Ne = (Or = window.rawWindow.__mini_app_status_hook__) != null ? Or : {});
1907
+ const J = (t, e, r = "", n = "") => ({ success: t, message: e, type: r, fileName: n }), We = (t) => {
1908
+ var e;
1909
+ return (e = t == null ? void 0 : t.trim().replace(/^\.+/, "").toLowerCase()) != null ? e : "";
1910
+ }, sr = (t, e) => {
1911
+ const r = We(e);
1912
+ return !r || t.toLowerCase().endsWith(`.${r}`) ? t : `${t}.${r}`;
1913
+ }, cr = (t) => {
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) => {
1923
+ if (!i)
1924
+ return "";
1925
+ try {
1926
+ const c = new URL(i, window.location.href).pathname.split("/").filter(Boolean).pop();
1927
+ return c ? decodeURIComponent(c) : "";
1928
+ } catch (c) {
1929
+ return "";
1930
+ }
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 {
1934
+ downloadFile(t) {
1935
+ return a(this, null, function* () {
1936
+ var e;
1937
+ try {
1938
+ const { type: r, fileName: n, downloadFileName: o } = cr(t), i = (e = t == null ? void 0 : t.url) == null ? void 0 : e.trim();
1939
+ if (!r)
1940
+ return J(!1, "Missing required parameter: type", r, n);
1941
+ if (!i)
1942
+ return J(!1, "Missing required parameter: url", 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);
1948
+ } catch (r) {
1949
+ console.error("downloadFile error", r);
1950
+ const { type: n, fileName: o } = cr(t);
1951
+ return J(!1, r instanceof Error ? r.message : "download failed", n, o);
1952
+ }
1953
+ });
1954
+ }
1955
+ getStatus() {
1956
+ try {
1957
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
1958
+ var e, r;
1959
+ t((yield (r = (e = Ne == null ? void 0 : Ne.downloadFile) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
1960
+ })) : new Promise((t) => {
1961
+ t(null);
1962
+ });
1963
+ } catch (t) {
1964
+ throw console.error("downloadFile getStatus error", t), t;
1965
+ }
1966
+ }
1967
+ }() }), wr = (t) => {
1968
+ var e;
1969
+ return (e = t == null ? void 0 : t.trim().replace(/^\.+/, "").toLowerCase()) != null ? e : "";
1970
+ }, dr = (t, e) => {
1971
+ var n;
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)
1978
+ return "";
1979
+ try {
1980
+ const i = new URL(o, window.location.href).pathname.split("/").filter(Boolean).pop();
1981
+ return i ? decodeURIComponent(i) : "";
1982
+ } catch (i) {
1983
+ return "";
1984
+ }
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()}` };
1987
+ };
1988
+ class mt {
1989
+ downloadFile(e) {
1990
+ return a(this, null, function* () {
1991
+ try {
1992
+ if (window.__MICRO_APP_ENVIRONMENT__) {
1993
+ const r = window.rawWindow.__mini_app_hook__.downloadFile;
1994
+ return r ? yield r(e) : dr(e, "DownloadFilePlugin is not available");
1995
+ }
1996
+ return yield lr.downloadFile(e);
1997
+ } catch (r) {
1998
+ return console.error("downloadFile error", r), dr(e, r instanceof Error ? r.message : "download failed");
1999
+ }
2000
+ });
2001
+ }
2002
+ getStatus() {
2003
+ return a(this, null, function* () {
2004
+ try {
2005
+ return yield lr.getStatus();
2006
+ } catch (e) {
2007
+ throw console.error("downloadFile getStatus error", e), e;
2008
+ }
2009
+ });
2010
+ }
2011
+ }
2012
+ class gt {
1903
2013
  constructor() {
1904
- P(this, "initialContextPlugins", new Wr());
1905
- P(this, "communicatePlugins", new xr());
1906
- P(this, "cameraScanPlugins", new jr());
1907
- P(this, "cameraScanMultiplePlugins", new $r());
1908
- P(this, "cameraScanMultipleNoCountPlugins", new qr());
1909
- P(this, "cameraScanSingleOrDualPlugins", new Kr());
1910
- P(this, "laserScanPlugins", new Jr());
1911
- P(this, "countAssistPlugins", new Gr());
1912
- P(this, "clickStreamPlugins", new Qr());
1913
- P(this, "lifecyclePlugins", new Yr());
1914
- P(this, "deviceInteractionPlugins", new Zr());
1915
- P(this, "pollingPlugins", new zr());
1916
- P(this, "paymentPlugins", new et());
1917
- P(this, "cameraForTakePhotoPlugin", new rt());
1918
- P(this, "httpPlugin", new tt());
1919
- P(this, "printPlugins", new it());
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());
1920
2031
  }
1921
2032
  }
1922
- const wt = new st();
1923
- let l = null, Se = null;
1924
- var Pr, yr;
1925
- window.__MICRO_APP_ENVIRONMENT__ && (l = (Pr = window.rawWindow.__mini_app_hook__) != null ? Pr : {}, Se = (yr = window.rawWindow.__mini_app_status_hook__) != null ? yr : {});
1926
- const ct = 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 {
1927
2038
  homeIsClick(t) {
1928
- return o(this, null, function* () {
2039
+ return a(this, null, function* () {
1929
2040
  var e;
1930
- window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e = l.disabledMenu) == null || e.call(l, t));
2041
+ window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch homeIsClick", t), (e = d.disabledMenu) == null || e.call(d, t));
1931
2042
  });
1932
2043
  }
1933
2044
  openMiniApp(t) {
1934
- return o(this, null, function* () {
2045
+ return a(this, null, function* () {
1935
2046
  var e;
1936
2047
  try {
1937
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.openMiniApp) == null || e.call(l, t)), new Promise((r) => {
2048
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.openMiniApp) == null || e.call(d, t)), new Promise((r) => {
1938
2049
  r(t);
1939
2050
  });
1940
2051
  } catch (r) {
@@ -1943,10 +2054,10 @@ const ct = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
1943
2054
  });
1944
2055
  }
1945
2056
  showTitle(t) {
1946
- return o(this, null, function* () {
2057
+ return a(this, null, function* () {
1947
2058
  var e;
1948
2059
  try {
1949
- return window.__MICRO_APP_ENVIRONMENT__ && (console.log("window.microApp.forceDispatch showTitle", t), (e = l.showTitle) == null || e.call(l, 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) => {
1950
2061
  r(t);
1951
2062
  });
1952
2063
  } catch (r) {
@@ -1955,10 +2066,10 @@ const ct = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
1955
2066
  });
1956
2067
  }
1957
2068
  showFABMenu(t) {
1958
- return o(this, null, function* () {
2069
+ return a(this, null, function* () {
1959
2070
  var e;
1960
2071
  try {
1961
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.showFABMenu) == null || e.call(l, t)), new Promise((r) => {
2072
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.showFABMenu) == null || e.call(d, t)), new Promise((r) => {
1962
2073
  r(t);
1963
2074
  });
1964
2075
  } catch (r) {
@@ -1967,10 +2078,10 @@ const ct = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
1967
2078
  });
1968
2079
  }
1969
2080
  disableFAB(t) {
1970
- return o(this, null, function* () {
2081
+ return a(this, null, function* () {
1971
2082
  var e;
1972
2083
  try {
1973
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.disableFAB) == null || e.call(l, t)), new Promise((r) => {
2084
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.disableFAB) == null || e.call(d, t)), new Promise((r) => {
1974
2085
  r(t);
1975
2086
  });
1976
2087
  } catch (r) {
@@ -1979,10 +2090,10 @@ const ct = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
1979
2090
  });
1980
2091
  }
1981
2092
  disableBack(t) {
1982
- return o(this, null, function* () {
2093
+ return a(this, null, function* () {
1983
2094
  var e;
1984
2095
  try {
1985
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.disableBack) == null || e.call(l, t)), new Promise((r) => {
2096
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.disableBack) == null || e.call(d, t)), new Promise((r) => {
1986
2097
  r(t);
1987
2098
  });
1988
2099
  } catch (r) {
@@ -1991,10 +2102,10 @@ const ct = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
1991
2102
  });
1992
2103
  }
1993
2104
  showSubMask(t) {
1994
- return o(this, null, function* () {
2105
+ return a(this, null, function* () {
1995
2106
  var e;
1996
2107
  try {
1997
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.showSubMask) == null || e.call(l, t)), new Promise((r) => {
2108
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.showSubMask) == null || e.call(d, t)), new Promise((r) => {
1998
2109
  r(t);
1999
2110
  });
2000
2111
  } catch (r) {
@@ -2003,10 +2114,10 @@ const ct = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2003
2114
  });
2004
2115
  }
2005
2116
  setMiniAppVersion(t) {
2006
- return o(this, null, function* () {
2117
+ return a(this, null, function* () {
2007
2118
  var e;
2008
2119
  try {
2009
- return window.__MICRO_APP_ENVIRONMENT__ && ((e = l.setMiniAppVersion) == null || e.call(l, t)), new Promise((r) => {
2120
+ return window.__MICRO_APP_ENVIRONMENT__ && ((e = d.setMiniAppVersion) == null || e.call(d, t)), new Promise((r) => {
2010
2121
  r(t);
2011
2122
  });
2012
2123
  } catch (r) {
@@ -2015,25 +2126,25 @@ const ct = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2015
2126
  });
2016
2127
  }
2017
2128
  showDialog() {
2018
- return o(this, null, function* () {
2129
+ return a(this, null, function* () {
2019
2130
  var t;
2020
- window.__MICRO_APP_ENVIRONMENT__ && ((t = l.showDialog) == null || t.call(l));
2131
+ window.__MICRO_APP_ENVIRONMENT__ && ((t = d.showDialog) == null || t.call(d));
2021
2132
  });
2022
2133
  }
2023
2134
  cancelDialog() {
2024
- return o(this, null, function* () {
2135
+ return a(this, null, function* () {
2025
2136
  var t;
2026
- window.__MICRO_APP_ENVIRONMENT__ && ((t = l.cancelDialog) == null || t.call(l));
2137
+ window.__MICRO_APP_ENVIRONMENT__ && ((t = d.cancelDialog) == null || t.call(d));
2027
2138
  });
2028
2139
  }
2029
2140
  getMiniAppKong(t) {
2030
- return o(this, null, function* () {
2141
+ return a(this, null, function* () {
2031
2142
  var e, r;
2032
2143
  try {
2033
2144
  if (window.__MICRO_APP_ENVIRONMENT__) {
2034
- const n = (r = (e = l.getMiniAppKong) == null ? void 0 : e.call(l, t)) != null ? r : {};
2035
- return new Promise((a) => {
2036
- a(n);
2145
+ const n = (r = (e = d.getMiniAppKong) == null ? void 0 : e.call(d, t)) != null ? r : {};
2146
+ return new Promise((o) => {
2147
+ o(n);
2037
2148
  });
2038
2149
  }
2039
2150
  return new Promise((n) => {
@@ -2045,16 +2156,16 @@ const ct = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2045
2156
  });
2046
2157
  }
2047
2158
  closeMiniApp() {
2048
- return o(this, null, function* () {
2159
+ return a(this, null, function* () {
2049
2160
  var t;
2050
- window.__MICRO_APP_ENVIRONMENT__ && ((t = l.closeMiniApp) == null || t.call(l));
2161
+ window.__MICRO_APP_ENVIRONMENT__ && ((t = d.closeMiniApp) == null || t.call(d));
2051
2162
  });
2052
2163
  }
2053
2164
  getStatus() {
2054
2165
  try {
2055
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => o(this, null, function* () {
2166
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((t) => a(this, null, function* () {
2056
2167
  var e, r;
2057
- t((yield (r = (e = Se == null ? void 0 : Se.communicate) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
2168
+ t((yield (r = (e = fe == null ? void 0 : fe.communicate) == null ? void 0 : e.getStatus) == null ? void 0 : r.call(e)) || {});
2058
2169
  })) : new Promise((t) => {
2059
2170
  t(null);
2060
2171
  });
@@ -2064,9 +2175,9 @@ const ct = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2064
2175
  }
2065
2176
  dispatchToShell(t) {
2066
2177
  try {
2067
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => o(this, null, function* () {
2178
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => a(this, null, function* () {
2068
2179
  var r;
2069
- e((yield (r = l == null ? void 0 : l.dispatchToShell) == null ? void 0 : r.call(l, t)) || {});
2180
+ e((yield (r = d == null ? void 0 : d.dispatchToShell) == null ? void 0 : r.call(d, t)) || {});
2070
2181
  })) : new Promise((e) => {
2071
2182
  e(t);
2072
2183
  });
@@ -2076,9 +2187,9 @@ const ct = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2076
2187
  }
2077
2188
  getMiniAppInfo(t) {
2078
2189
  try {
2079
- return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => o(this, null, function* () {
2190
+ return window.__MICRO_APP_ENVIRONMENT__ ? new Promise((e) => a(this, null, function* () {
2080
2191
  var r;
2081
- e((yield (r = l == null ? void 0 : l.getMiniAppInfo) == null ? void 0 : r.call(l, t)) || {});
2192
+ e((yield (r = d == null ? void 0 : d.getMiniAppInfo) == null ? void 0 : r.call(d, t)) || {});
2082
2193
  })) : new Promise((e) => {
2083
2194
  e({});
2084
2195
  });
@@ -2088,6 +2199,6 @@ const ct = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: cl
2088
2199
  }
2089
2200
  } }, Symbol.toStringTag, { value: "Module" }));
2090
2201
  export {
2091
- st as NativeApi,
2092
- wt as default
2202
+ gt as NativeApi,
2203
+ St as default
2093
2204
  };