superapp-miniapp-invoke-native 1.9.2 → 1.9.3

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.d.ts CHANGED
@@ -116,6 +116,7 @@ declare class CommunicatePlugins implements CommunicatePluginsHookType {
116
116
  showNativeLoading(): Promise<void>;
117
117
  cancelNativeLoading(): Promise<void>;
118
118
  getMiniAppKong(miniAppKong: MiniAppKongType): Promise<MiniAppKongType | undefined>;
119
+ getDeeplinkParams(sendDeepLinkListenerParams: SendDeepLinkListenerParamsType): void;
119
120
  }
120
121
 
121
122
  declare interface CommunicatePluginsHookType {
@@ -343,6 +344,12 @@ declare interface RedirectType {
343
344
  [key: string]: string;
344
345
  }
345
346
 
347
+ declare interface SendDeepLinkListenerParamsType {
348
+ mounted: (fn: () => void) => void;
349
+ beforeUnmount: (fn: () => void) => void;
350
+ callBack?: PluginCallback;
351
+ }
352
+
346
353
  declare interface SetCountAssistBtnParamsType {
347
354
  mounted: (fn: () => void) => void;
348
355
  beforeUnmount: (fn: () => void) => void;
package/lib/main.js CHANGED
@@ -1,16 +1,16 @@
1
- var He = Object.defineProperty, xe = Object.defineProperties;
2
- var Te = Object.getOwnPropertyDescriptors;
3
- var le = Object.getOwnPropertySymbols;
4
- var _e = Object.prototype.hasOwnProperty, Fe = Object.prototype.propertyIsEnumerable;
5
- var Z = (t, e, r) => e in t ? He(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, de = (t, e) => {
1
+ var xe = Object.defineProperty, _e = Object.defineProperties;
2
+ var Fe = Object.getOwnPropertyDescriptors;
3
+ var de = Object.getOwnPropertySymbols;
4
+ var Re = Object.prototype.hasOwnProperty, je = Object.prototype.propertyIsEnumerable;
5
+ var ee = (t, e, r) => e in t ? xe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, ue = (t, e) => {
6
6
  for (var r in e || (e = {}))
7
- _e.call(e, r) && Z(t, r, e[r]);
8
- if (le)
9
- for (var r of le(e))
10
- Fe.call(e, r) && Z(t, r, e[r]);
7
+ Re.call(e, r) && ee(t, r, e[r]);
8
+ if (de)
9
+ for (var r of de(e))
10
+ je.call(e, r) && ee(t, r, e[r]);
11
11
  return t;
12
- }, ue = (t, e) => xe(t, Te(e));
13
- var g = (t, e, r) => (Z(t, typeof e != "symbol" ? e + "" : e, r), r);
12
+ }, he = (t, e) => _e(t, Fe(e));
13
+ var y = (t, e, r) => (ee(t, typeof e != "symbol" ? e + "" : e, r), r);
14
14
  var a = (t, e, r) => new Promise((n, o) => {
15
15
  var s = (d) => {
16
16
  try {
@@ -28,7 +28,7 @@ var a = (t, e, r) => new Promise((n, o) => {
28
28
  i((r = r.apply(t, e)).next());
29
29
  });
30
30
  /*! Capacitor: https://capacitorjs.com/ - MIT License */
31
- const je = (t) => t.CapacitorPlatforms = ((e) => {
31
+ const De = (t) => t.CapacitorPlatforms = ((e) => {
32
32
  const r = /* @__PURE__ */ new Map();
33
33
  r.set("web", { name: "web" });
34
34
  const n = e.CapacitorPlatforms || { currentPlatform: { name: "web" }, platforms: r };
@@ -37,93 +37,93 @@ const je = (t) => t.CapacitorPlatforms = ((e) => {
37
37
  }, n.setPlatform = (o) => {
38
38
  n.platforms.has(o) && (n.currentPlatform = n.platforms.get(o));
39
39
  }, n;
40
- })(t), he = je(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
41
- var H;
42
- he.addPlatform, he.setPlatform, function(t) {
40
+ })(t), me = De(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {});
41
+ var T;
42
+ me.addPlatform, me.setPlatform, function(t) {
43
43
  t.Unimplemented = "UNIMPLEMENTED", t.Unavailable = "UNAVAILABLE";
44
- }(H || (H = {}));
45
- class ee extends Error {
44
+ }(T || (T = {}));
45
+ class re extends Error {
46
46
  constructor(e, r, n) {
47
47
  super(e), this.message = e, this.code = r, this.data = n;
48
48
  }
49
49
  }
50
- const Re = (t) => {
50
+ const $e = (t) => {
51
51
  var e, r, n, o, s;
52
52
  const c = t.CapacitorCustomPlatform || null, i = t.Capacitor || {}, d = i.Plugins = i.Plugins || {}, h = t.CapacitorPlatforms, P = ((e = h == null ? void 0 : h.currentPlatform) === null || e === void 0 ? void 0 : e.getPlatform) || (() => c !== null ? c.name : ((u) => {
53
53
  var m, p;
54
54
  return u != null && u.androidBridge ? "android" : !((p = (m = u == null ? void 0 : u.webkit) === null || m === void 0 ? void 0 : m.messageHandlers) === null || p === void 0) && p.bridge ? "ios" : "web";
55
55
  })(t)), f = ((r = h == null ? void 0 : h.currentPlatform) === null || r === void 0 ? void 0 : r.isNativePlatform) || (() => P() !== "web"), v = ((n = h == null ? void 0 : h.currentPlatform) === null || n === void 0 ? void 0 : n.isPluginAvailable) || ((u) => {
56
- const m = b.get(u);
57
- return !!(m != null && m.platforms.has(P())) || !!I(u);
58
- }), I = ((o = h == null ? void 0 : h.currentPlatform) === null || o === void 0 ? void 0 : o.getPluginHeader) || ((u) => {
56
+ const m = L.get(u);
57
+ return !!(m != null && m.platforms.has(P())) || !!H(u);
58
+ }), H = ((o = h == null ? void 0 : h.currentPlatform) === null || o === void 0 ? void 0 : o.getPluginHeader) || ((u) => {
59
59
  var m;
60
60
  return (m = i.PluginHeaders) === null || m === void 0 ? void 0 : m.find((p) => p.name === u);
61
- }), b = /* @__PURE__ */ new Map(), S = ((s = h == null ? void 0 : h.currentPlatform) === null || s === void 0 ? void 0 : s.registerPlugin) || ((u, m = {}) => {
62
- const p = b.get(u);
61
+ }), L = /* @__PURE__ */ new Map(), b = ((s = h == null ? void 0 : h.currentPlatform) === null || s === void 0 ? void 0 : s.registerPlugin) || ((u, m = {}) => {
62
+ const p = L.get(u);
63
63
  if (p)
64
64
  return console.warn(`Capacitor plugin "${u}" already registered. Cannot register plugins twice.`), p.proxy;
65
- const L = P(), x = I(u);
65
+ const S = P(), _ = H(u);
66
66
  let M;
67
- const J = (k) => {
68
- let A;
69
- const U = (...D) => {
70
- const T = (() => a(void 0, null, function* () {
71
- return !M && L in m ? M = M = typeof m[L] == "function" ? yield m[L]() : m[L] : c !== null && !M && "web" in m && (M = M = typeof m.web == "function" ? yield m.web() : m.web), M;
72
- }))().then((_) => {
73
- const ie = ((C, F) => {
74
- var X, Y;
75
- if (!x) {
67
+ const Q = (k) => {
68
+ let B;
69
+ const U = (...W) => {
70
+ const F = (() => a(void 0, null, function* () {
71
+ return !M && S in m ? M = M = typeof m[S] == "function" ? yield m[S]() : m[S] : c !== null && !M && "web" in m && (M = M = typeof m.web == "function" ? yield m.web() : m.web), M;
72
+ }))().then((R) => {
73
+ const ce = ((C, j) => {
74
+ var Y, Z;
75
+ if (!_) {
76
76
  if (C)
77
- return (Y = C[F]) === null || Y === void 0 ? void 0 : Y.bind(C);
78
- throw new ee(`"${u}" plugin is not implemented on ${L}`, H.Unimplemented);
77
+ return (Z = C[j]) === null || Z === void 0 ? void 0 : Z.bind(C);
78
+ throw new re(`"${u}" plugin is not implemented on ${S}`, T.Unimplemented);
79
79
  }
80
80
  {
81
- const ce = x == null ? void 0 : x.methods.find((j) => F === j.name);
82
- if (ce)
83
- return ce.rtype === "promise" ? (j) => i.nativePromise(u, F.toString(), j) : (j, Ue) => i.nativeCallback(u, F.toString(), j, Ue);
81
+ const le = _ == null ? void 0 : _.methods.find((D) => j === D.name);
82
+ if (le)
83
+ return le.rtype === "promise" ? (D) => i.nativePromise(u, j.toString(), D) : (D, Te) => i.nativeCallback(u, j.toString(), D, Te);
84
84
  if (C)
85
- return (X = C[F]) === null || X === void 0 ? void 0 : X.bind(C);
85
+ return (Y = C[j]) === null || Y === void 0 ? void 0 : Y.bind(C);
86
86
  }
87
- })(_, k);
88
- if (ie) {
89
- const C = ie(...D);
90
- return A = C == null ? void 0 : C.remove, C;
87
+ })(R, k);
88
+ if (ce) {
89
+ const C = ce(...W);
90
+ return B = C == null ? void 0 : C.remove, C;
91
91
  }
92
- throw new ee(`"${u}.${k}()" is not implemented on ${L}`, H.Unimplemented);
92
+ throw new re(`"${u}.${k}()" is not implemented on ${S}`, T.Unimplemented);
93
93
  });
94
- return k === "addListener" && (T.remove = () => a(void 0, null, function* () {
95
- return A();
96
- })), T;
94
+ return k === "addListener" && (F.remove = () => a(void 0, null, function* () {
95
+ return B();
96
+ })), F;
97
97
  };
98
98
  return U.toString = () => `${k.toString()}() { [capacitor code] }`, Object.defineProperty(U, "name", { value: k, writable: !1, configurable: !1 }), U;
99
- }, ae = J("addListener"), se = J("removeListener"), Ie = (k, A) => {
100
- const U = ae({ eventName: k }, A), D = () => a(void 0, null, function* () {
101
- const _ = yield U;
102
- se({ eventName: k, callbackId: _ }, A);
103
- }), T = new Promise((_) => U.then(() => _({ remove: D })));
104
- return T.remove = () => a(void 0, null, function* () {
105
- console.warn("Using addListener() without 'await' is deprecated."), yield D();
106
- }), T;
107
- }, Q = new Proxy({}, { get(k, A) {
108
- switch (A) {
99
+ }, se = Q("addListener"), ie = Q("removeListener"), Ue = (k, B) => {
100
+ const U = se({ eventName: k }, B), W = () => a(void 0, null, function* () {
101
+ const R = yield U;
102
+ ie({ eventName: k, callbackId: R }, B);
103
+ }), F = new Promise((R) => U.then(() => R({ remove: W })));
104
+ return F.remove = () => a(void 0, null, function* () {
105
+ console.warn("Using addListener() without 'await' is deprecated."), yield W();
106
+ }), F;
107
+ }, X = new Proxy({}, { get(k, B) {
108
+ switch (B) {
109
109
  case "$$typeof":
110
110
  return;
111
111
  case "toJSON":
112
112
  return () => ({});
113
113
  case "addListener":
114
- return x ? Ie : ae;
114
+ return _ ? Ue : se;
115
115
  case "removeListener":
116
- return se;
116
+ return ie;
117
117
  default:
118
- return J(A);
118
+ return Q(B);
119
119
  }
120
120
  } });
121
- return d[u] = Q, b.set(u, { name: u, proxy: Q, platforms: /* @__PURE__ */ new Set([...Object.keys(m), ...x ? [L] : []]) }), Q;
121
+ return d[u] = X, L.set(u, { name: u, proxy: X, platforms: /* @__PURE__ */ new Set([...Object.keys(m), ..._ ? [S] : []]) }), X;
122
122
  });
123
- return i.convertFileSrc || (i.convertFileSrc = (u) => u), i.getPlatform = P, i.handleError = (u) => t.console.error(u), i.isNativePlatform = f, i.isPluginAvailable = v, i.pluginMethodNoop = (u, m, p) => Promise.reject(`${p} does not have an implementation of "${m}".`), i.registerPlugin = S, i.Exception = ee, i.DEBUG = !!i.DEBUG, i.isLoggingEnabled = !!i.isLoggingEnabled, i.platform = i.getPlatform(), i.isNative = i.isNativePlatform(), i;
124
- }, $e = (t) => t.Capacitor = Re(t), l = $e(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), oe = l.registerPlugin;
123
+ return i.convertFileSrc || (i.convertFileSrc = (u) => u), i.getPlatform = P, i.handleError = (u) => t.console.error(u), i.isNativePlatform = f, i.isPluginAvailable = v, i.pluginMethodNoop = (u, m, p) => Promise.reject(`${p} does not have an implementation of "${m}".`), i.registerPlugin = b, i.Exception = re, i.DEBUG = !!i.DEBUG, i.isLoggingEnabled = !!i.isLoggingEnabled, i.platform = i.getPlatform(), i.isNative = i.isNativePlatform(), i;
124
+ }, We = (t) => t.Capacitor = $e(t), l = We(typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : typeof global != "undefined" ? global : {}), ae = l.registerPlugin;
125
125
  l.Plugins;
126
- class y {
126
+ class g {
127
127
  constructor(e) {
128
128
  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);
129
129
  }
@@ -159,10 +159,10 @@ class y {
159
159
  } };
160
160
  }
161
161
  unimplemented(e = "not implemented") {
162
- return new l.Exception(e, H.Unimplemented);
162
+ return new l.Exception(e, T.Unimplemented);
163
163
  }
164
164
  unavailable(e = "not available") {
165
- return new l.Exception(e, H.Unavailable);
165
+ return new l.Exception(e, T.Unavailable);
166
166
  }
167
167
  removeListener(e, r) {
168
168
  return a(this, null, function* () {
@@ -180,8 +180,8 @@ class y {
180
180
  e && (window.removeEventListener(e.windowEventName, e.handler), e.registered = !1);
181
181
  }
182
182
  }
183
- const me = (t) => encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), we = (t) => t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
184
- class De extends y {
183
+ const we = (t) => encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape), pe = (t) => t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
184
+ class Ve extends g {
185
185
  getCookies() {
186
186
  return a(this, null, function* () {
187
187
  const e = document.cookie, r = {};
@@ -189,14 +189,14 @@ class De extends y {
189
189
  if (n.length <= 0)
190
190
  return;
191
191
  let [o, s] = n.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
192
- o = we(o).trim(), s = we(s).trim(), r[o] = s;
192
+ o = pe(o).trim(), s = pe(s).trim(), r[o] = s;
193
193
  }), r;
194
194
  });
195
195
  }
196
196
  setCookie(e) {
197
197
  return a(this, null, function* () {
198
198
  try {
199
- const r = me(e.key), n = me(e.value), o = `; expires=${(e.expires || "").replace("expires=", "")}`, s = (e.path || "/").replace("path=", ""), c = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
199
+ const r = we(e.key), n = we(e.value), o = `; expires=${(e.expires || "").replace("expires=", "")}`, s = (e.path || "/").replace("path=", ""), c = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
200
200
  document.cookie = `${r}=${n || ""}${o}; path=${s}; ${c};`;
201
201
  } catch (r) {
202
202
  return Promise.reject(r);
@@ -233,8 +233,8 @@ class De extends y {
233
233
  });
234
234
  }
235
235
  }
236
- oe("CapacitorCookies", { web: () => new De() });
237
- const We = (t, e = {}) => {
236
+ ae("CapacitorCookies", { web: () => new Ve() });
237
+ const qe = (t, e = {}) => {
238
238
  const r = Object.assign({ method: t.method || "GET", headers: t.headers }, e), n = ((o = {}) => {
239
239
  const s = Object.keys(o);
240
240
  return Object.keys(o).map((c) => c.toLocaleLowerCase()).reduce((c, i, d) => (c[i] = o[s[d]], c), {});
@@ -262,27 +262,27 @@ const We = (t, e = {}) => {
262
262
  (n.includes("application/json") || typeof t.data == "object") && (r.body = JSON.stringify(t.data));
263
263
  return r;
264
264
  };
265
- class Ve extends y {
265
+ class ze extends g {
266
266
  request(e) {
267
267
  return a(this, null, function* () {
268
- const r = We(e, e.webFetchExtra), n = ((f, v = !0) => f ? Object.entries(f).reduce((I, b) => {
269
- const [S, u] = b;
268
+ const r = qe(e, e.webFetchExtra), n = ((f, v = !0) => f ? Object.entries(f).reduce((H, L) => {
269
+ const [b, u] = L;
270
270
  let m, p;
271
- return Array.isArray(u) ? (p = "", u.forEach((L) => {
272
- m = v ? encodeURIComponent(L) : L, p += `${S}=${m}&`;
273
- }), p.slice(0, -1)) : (m = v ? encodeURIComponent(u) : u, p = `${S}=${m}`), `${I}&${p}`;
271
+ return Array.isArray(u) ? (p = "", u.forEach((S) => {
272
+ m = v ? encodeURIComponent(S) : S, p += `${b}=${m}&`;
273
+ }), p.slice(0, -1)) : (m = v ? encodeURIComponent(u) : u, p = `${b}=${m}`), `${H}&${p}`;
274
274
  }, "").substr(1) : null)(e.params, e.shouldEncodeUrlParams), o = n ? `${e.url}?${n}` : e.url, s = yield fetch(o, r), c = s.headers.get("content-type") || "";
275
275
  let i, d, { responseType: h = "text" } = s.ok ? e : {};
276
276
  switch (c.includes("application/json") && (h = "json"), h) {
277
277
  case "arraybuffer":
278
278
  case "blob":
279
279
  d = yield s.blob(), i = yield ((f) => a(this, null, function* () {
280
- return new Promise((v, I) => {
281
- const b = new FileReader();
282
- b.onload = () => {
283
- const S = b.result;
284
- v(S.indexOf(",") >= 0 ? S.split(",")[1] : S);
285
- }, b.onerror = (S) => I(S), b.readAsDataURL(f);
280
+ return new Promise((v, H) => {
281
+ const L = new FileReader();
282
+ L.onload = () => {
283
+ const b = L.result;
284
+ v(b.indexOf(",") >= 0 ? b.split(",")[1] : b);
285
+ }, L.onerror = (b) => H(b), L.readAsDataURL(f);
286
286
  });
287
287
  }))(d);
288
288
  break;
@@ -324,25 +324,25 @@ class Ve extends y {
324
324
  });
325
325
  }
326
326
  }
327
- function re() {
327
+ function te() {
328
328
  return l.getPlatform() === "android" ? JSON.parse(AndroidInitialContext.initialContext()) : window.portalInitialContext;
329
329
  }
330
- oe("CapacitorHttp", { web: () => new Ve() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
331
- oe("Portals", { web: () => Promise.resolve().then(function() {
332
- return ze;
330
+ ae("CapacitorHttp", { web: () => new ze() }), /*! Ionic Portals: https://ionic.io/portals - Commercial License */
331
+ ae("Portals", { web: () => Promise.resolve().then(function() {
332
+ return Ke;
333
333
  }).then((t) => new t.PortalsWeb()) });
334
- const ze = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
334
+ const Ke = Object.freeze({ __proto__: null, PortalsWeb: class extends g {
335
335
  publishNative(t) {
336
336
  return a(this, null, function* () {
337
337
  });
338
338
  }
339
- } }), W = (t) => {
339
+ } }), V = (t) => {
340
340
  var e, r, n;
341
341
  try {
342
342
  if (typeof window == "undefined")
343
343
  return;
344
- if (re && ((e = re()) != null && e.value)) {
345
- const o = (n = (r = re()) == null ? void 0 : r.value) != null ? n : null;
344
+ if (te && ((e = te()) != null && e.value)) {
345
+ const o = (n = (r = te()) == null ? void 0 : r.value) != null ? n : null;
346
346
  if (!o)
347
347
  return void console.error("native initialContext is undefine");
348
348
  if (!t)
@@ -353,13 +353,13 @@ const ze = Object.freeze({ __proto__: null, PortalsWeb: class extends y {
353
353
  throw console.error("getInitialContextHandle error", o), o;
354
354
  }
355
355
  };
356
- class Ke {
356
+ class Ge {
357
357
  isNative() {
358
358
  try {
359
359
  return (() => {
360
360
  try {
361
361
  let e = !1;
362
- return W((r) => {
362
+ return V((r) => {
363
363
  e = !!(r != null && r.isNative);
364
364
  }), e;
365
365
  } catch (e) {
@@ -373,7 +373,7 @@ class Ke {
373
373
  redirectPage(e) {
374
374
  try {
375
375
  (({ callBack: r }) => {
376
- W((n) => {
376
+ V((n) => {
377
377
  var o;
378
378
  try {
379
379
  if (!(n != null && n.params))
@@ -398,7 +398,7 @@ class Ke {
398
398
  return this.isNative() ? (() => {
399
399
  try {
400
400
  let r = null;
401
- return W((n) => {
401
+ return V((n) => {
402
402
  r = n != null ? n : null;
403
403
  }), r;
404
404
  } catch (r) {
@@ -413,19 +413,19 @@ class Ke {
413
413
  }
414
414
  }
415
415
  }
416
- const B = () => {
416
+ const A = () => {
417
417
  try {
418
418
  let t = {};
419
419
  return typeof window != "undefined" && (t = window), t;
420
420
  } catch (t) {
421
421
  throw console.error("isWinHandle error", t), t;
422
422
  }
423
- }, $ = "CommunicatePlugin", w = l.registerPlugin($, { web: () => Promise.resolve().then(() => dr).then((t) => new t.PluginsWeb()) }), V = B();
424
- V.removeAddListenerFab = () => null;
425
- const qe = (t) => {
423
+ }, x = "CommunicatePlugin", w = l.registerPlugin(x, { web: () => Promise.resolve().then(() => hr).then((t) => new t.PluginsWeb()) }), q = A();
424
+ q.removeAddListenerFab = () => null;
425
+ const Je = (t) => {
426
426
  var e, r;
427
427
  try {
428
- V.removeAddListenerFab && V.removeAddListenerFab();
428
+ q.removeAddListenerFab && q.removeAddListenerFab();
429
429
  const n = [];
430
430
  if ((e = w.showFABMenu) == null || e.call(w, { fabMenu: n }), !t || !((r = Object.keys(t)) != null && r.length))
431
431
  return;
@@ -437,10 +437,10 @@ const qe = (t) => {
437
437
  (o = w.showFABMenu) == null || o.call(w, { fabMenu: n });
438
438
  }), setTimeout(() => {
439
439
  ((o) => a(void 0, null, function* () {
440
- o && (V.removeAddListenerFab = yield ((s) => a(void 0, null, function* () {
440
+ o && (q.removeAddListenerFab = yield ((s) => a(void 0, null, function* () {
441
441
  try {
442
442
  if (l.addListener) {
443
- const c = yield l.addListener($, "nativeSendFab", (i) => s && s(i));
443
+ const c = yield l.addListener(x, "nativeSendFab", (i) => s && s(i));
444
444
  return c != null && c.remove ? c.remove : () => null;
445
445
  }
446
446
  } catch (c) {
@@ -458,14 +458,14 @@ const qe = (t) => {
458
458
  } catch (n) {
459
459
  throw console.error("fabBtnHandle error", n), n;
460
460
  }
461
- }, N = B();
461
+ }, N = A();
462
462
  N.addListenerBackRemoveHandle = () => null;
463
- const pe = (t = () => null) => a(void 0, null, function* () {
463
+ const ye = (t = () => null) => a(void 0, null, function* () {
464
464
  try {
465
465
  N != null && N.addListenerBackRemoveHandle && typeof N.addListenerBackRemoveHandle == "function" && N.addListenerBackRemoveHandle(), N.addListenerBackRemoveHandle = yield ((e) => a(void 0, null, function* () {
466
466
  try {
467
467
  if (l.addListener) {
468
- const r = yield l.addListener($, "nativeSendBack", (n) => e && e(n));
468
+ const r = yield l.addListener(x, "nativeSendBack", (n) => e && e(n));
469
469
  return r != null && r.remove ? r.remove : () => null;
470
470
  }
471
471
  } catch (r) {
@@ -475,16 +475,16 @@ const pe = (t = () => null) => a(void 0, null, function* () {
475
475
  } catch (e) {
476
476
  throw console.error("initBackBtnFn error", e), e;
477
477
  }
478
- }), z = B();
478
+ }), z = A();
479
479
  z.addListenerHomeHandle = () => null;
480
- const Ge = (t) => {
480
+ const Qe = (t) => {
481
481
  try {
482
482
  z.addListenerHomeHandle && z.addListenerHomeHandle(), setTimeout(() => {
483
483
  ((e) => a(void 0, null, function* () {
484
484
  e && (z.addListenerHomeHandle = yield ((r) => a(void 0, null, function* () {
485
485
  try {
486
486
  if (l.addListener) {
487
- const n = yield l.addListener($, "nativeSendHome", (o) => r && r(o));
487
+ const n = yield l.addListener(x, "nativeSendHome", (o) => r && r(o));
488
488
  return n != null && n.remove ? n.remove : () => null;
489
489
  }
490
490
  } catch (n) {
@@ -496,14 +496,14 @@ const Ge = (t) => {
496
496
  } catch (e) {
497
497
  throw console.error("homeFn error", e), e;
498
498
  }
499
- }, O = B();
499
+ }, O = A();
500
500
  O.addListenerTouchRemoveHandle = () => null;
501
501
  const ge = (t = () => null) => a(void 0, null, function* () {
502
502
  try {
503
503
  O != null && O.addListenerTouchRemoveHandle && typeof O.addListenerTouchRemoveHandle == "function" && O.addListenerTouchRemoveHandle(), O.addListenerTouchRemoveHandle = yield ((e) => a(void 0, null, function* () {
504
504
  try {
505
505
  if (l.addListener) {
506
- const r = yield l.addListener($, "nativeTouchListener", (n) => e && e(n));
506
+ const r = yield l.addListener(x, "nativeTouchListener", (n) => e && e(n));
507
507
  return r != null && r.remove ? r.remove : () => null;
508
508
  }
509
509
  } catch (r) {
@@ -513,8 +513,25 @@ const ge = (t = () => null) => a(void 0, null, function* () {
513
513
  } catch (e) {
514
514
  throw console.error("initTouchFn error", e), e;
515
515
  }
516
+ }), E = A();
517
+ E.addListenerSendDeepLinkRemoveHandle = () => null;
518
+ const fe = (t = () => null) => a(void 0, null, function* () {
519
+ try {
520
+ E != null && E.addListenerSendDeepLinkRemoveHandle && typeof E.addListenerSendDeepLinkRemoveHandle == "function" && E.addListenerSendDeepLinkRemoveHandle(), E.addListenerSendDeepLinkRemoveHandle = yield ((e) => a(void 0, null, function* () {
521
+ try {
522
+ if (l.addListener) {
523
+ const r = yield l.addListener(x, "nativeSendDeeplinkCallbackListener", (n) => e && e(n));
524
+ return r != null && r.remove ? r.remove : () => null;
525
+ }
526
+ } catch (r) {
527
+ throw console.error("addListenerSendDeepLinkHandle error", r), r;
528
+ }
529
+ }))(t);
530
+ } catch (e) {
531
+ throw console.error("initTouchFn error", e), e;
532
+ }
516
533
  });
517
- class Je {
534
+ class Xe {
518
535
  constructor() {
519
536
  this.homeBtnSwitch({ isClick: !0 });
520
537
  }
@@ -534,9 +551,9 @@ class Je {
534
551
  try {
535
552
  const { mounted: n, beforeUnmount: o, callBack: s } = r;
536
553
  n(() => {
537
- pe(s);
554
+ ye(s);
538
555
  }), o(() => {
539
- pe();
556
+ ye();
540
557
  });
541
558
  } catch (n) {
542
559
  throw console.error("backBtnHandle error", n), n;
@@ -548,14 +565,14 @@ class Je {
548
565
  }
549
566
  setHomeBtn(e) {
550
567
  try {
551
- Ge(e);
568
+ Qe(e);
552
569
  } catch (r) {
553
570
  throw console.error("setHomeBtn error", r), r;
554
571
  }
555
572
  }
556
573
  setFabBtn(e) {
557
574
  try {
558
- qe(e);
575
+ Je(e);
559
576
  } catch (r) {
560
577
  throw console.error("setFabBtn error", r), r;
561
578
  }
@@ -659,8 +676,26 @@ class Je {
659
676
  }
660
677
  });
661
678
  }
679
+ getDeeplinkParams(e) {
680
+ try {
681
+ ((r) => {
682
+ try {
683
+ const { mounted: n, beforeUnmount: o, callBack: s } = r;
684
+ n(() => {
685
+ fe(s);
686
+ }), o(() => {
687
+ fe();
688
+ });
689
+ } catch (n) {
690
+ throw console.error("sendDeepLinkListenerHandle error", n), n;
691
+ }
692
+ })(e);
693
+ } catch (r) {
694
+ throw console.error("getDeeplinkParams error", r), r;
695
+ }
696
+ }
662
697
  }
663
- const ye = l.registerPlugin("CameraScanPlugin", { web: new class extends y {
698
+ const ve = l.registerPlugin("CameraScanPlugin", { web: new class extends g {
664
699
  pickCameraScan(t) {
665
700
  return a(this, null, function* () {
666
701
  return new Promise((e) => {
@@ -674,11 +709,11 @@ const ye = l.registerPlugin("CameraScanPlugin", { web: new class extends y {
674
709
  }
675
710
  }() });
676
711
  window.removeAddListenerCameraScan = () => null;
677
- class Qe {
712
+ class Ye {
678
713
  pickCameraScan(e) {
679
714
  return a(this, null, function* () {
680
715
  try {
681
- return yield ye.pickCameraScan(e);
716
+ return yield ve.pickCameraScan(e);
682
717
  } catch (r) {
683
718
  throw console.error("pickCameraScan error", r), r;
684
719
  }
@@ -687,14 +722,14 @@ class Qe {
687
722
  setCameraScanState(e) {
688
723
  return a(this, null, function* () {
689
724
  try {
690
- return yield ye.setCameraScanState(e);
725
+ return yield ve.setCameraScanState(e);
691
726
  } catch (r) {
692
727
  throw console.error("setCameraScanState error", r), r;
693
728
  }
694
729
  });
695
730
  }
696
731
  }
697
- const fe = l.registerPlugin("CameraScanMultiplePlugin", { web: new class extends y {
732
+ const Pe = l.registerPlugin("CameraScanMultiplePlugin", { web: new class extends g {
698
733
  pickCameraScanMultiple() {
699
734
  return a(this, null, function* () {
700
735
  });
@@ -704,11 +739,11 @@ const fe = l.registerPlugin("CameraScanMultiplePlugin", { web: new class extends
704
739
  });
705
740
  }
706
741
  }() });
707
- class Xe {
742
+ class Ze {
708
743
  pickCameraScanMultiple(e) {
709
744
  return a(this, null, function* () {
710
745
  try {
711
- return yield fe.pickCameraScanMultiple(e);
746
+ return yield Pe.pickCameraScanMultiple(e);
712
747
  } catch (r) {
713
748
  throw console.error("pickCameraScanMultiple error", r), r;
714
749
  }
@@ -717,14 +752,14 @@ class Xe {
717
752
  setCameraScanMultipleState(e) {
718
753
  return a(this, null, function* () {
719
754
  try {
720
- return yield fe.setCameraScanMultipleState(e);
755
+ return yield Pe.setCameraScanMultipleState(e);
721
756
  } catch (r) {
722
757
  throw console.error("setCameraScanMultipleState error", r), r;
723
758
  }
724
759
  });
725
760
  }
726
761
  }
727
- const ve = l.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends y {
762
+ const Le = l.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class extends g {
728
763
  pickCameraScanMultipleNoCount() {
729
764
  return a(this, null, function* () {
730
765
  });
@@ -734,11 +769,11 @@ const ve = l.registerPlugin("CameraScanMultipleNoCountPlugin", { web: new class
734
769
  });
735
770
  }
736
771
  }() });
737
- class Ye {
772
+ class er {
738
773
  pickCameraScanMultipleNoCount(e) {
739
774
  return a(this, null, function* () {
740
775
  try {
741
- return yield ve.pickCameraScanMultipleNoCount(e);
776
+ return yield Le.pickCameraScanMultipleNoCount(e);
742
777
  } catch (r) {
743
778
  throw console.error("pickCameraScanMultipleNoCount error", r), r;
744
779
  }
@@ -747,14 +782,14 @@ class Ye {
747
782
  setCameraScanMultipleNoCountState(e) {
748
783
  return a(this, null, function* () {
749
784
  try {
750
- return yield ve.setCameraScanMultipleNoCountState(e);
785
+ return yield Le.setCameraScanMultipleNoCountState(e);
751
786
  } catch (r) {
752
787
  throw console.error("setCameraScanMultipleNoCountState error", r), r;
753
788
  }
754
789
  });
755
790
  }
756
791
  }
757
- const Pe = l.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends y {
792
+ const be = l.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class extends g {
758
793
  pickCameraScanSingleOrDual() {
759
794
  return a(this, null, function* () {
760
795
  });
@@ -764,11 +799,11 @@ const Pe = l.registerPlugin("CameraScanSingleOrDualPlugin", { web: new class ext
764
799
  });
765
800
  }
766
801
  }() });
767
- class Ze {
802
+ class rr {
768
803
  pickCameraScanSingleOrDual(e) {
769
804
  return a(this, null, function* () {
770
805
  try {
771
- return yield Pe.pickCameraScanSingleOrDual(e);
806
+ return yield be.pickCameraScanSingleOrDual(e);
772
807
  } catch (r) {
773
808
  throw console.error("pickCameraScanSingleOrDual error", r), r;
774
809
  }
@@ -777,14 +812,14 @@ class Ze {
777
812
  setCameraScanSingleOrDualState(e) {
778
813
  return a(this, null, function* () {
779
814
  try {
780
- return yield Pe.setCameraScanSingleOrDualState(e);
815
+ return yield be.setCameraScanSingleOrDualState(e);
781
816
  } catch (r) {
782
817
  throw console.error("setCameraScanSingleOrDualState error", r), r;
783
818
  }
784
819
  });
785
820
  }
786
821
  }
787
- const Me = "LaserScanPlugin", te = l.registerPlugin(Me, { web: new class extends y {
822
+ const Oe = "LaserScanPlugin", ne = l.registerPlugin(Oe, { web: new class extends g {
788
823
  pickLaserScan() {
789
824
  return a(this, null, function* () {
790
825
  });
@@ -797,16 +832,16 @@ const Me = "LaserScanPlugin", te = l.registerPlugin(Me, { web: new class extends
797
832
  return a(this, null, function* () {
798
833
  });
799
834
  }
800
- }() }), K = B();
835
+ }() }), K = A();
801
836
  K.removeAddListenerLaserScan = () => null;
802
- const be = (t = () => null) => {
837
+ const Se = (t = () => null) => {
803
838
  try {
804
839
  K.removeAddListenerLaserScan && K.removeAddListenerLaserScan();
805
840
  const e = (r) => a(void 0, null, function* () {
806
841
  r && (K.removeAddListenerLaserScan = yield ((n) => a(void 0, null, function* () {
807
842
  try {
808
843
  if (l.addListener) {
809
- const o = yield l.addListener(Me, "nativeSendLaser", (s) => n && n(s));
844
+ const o = yield l.addListener(Oe, "nativeSendLaser", (s) => n && n(s));
810
845
  return o != null && o.remove ? o.remove : () => null;
811
846
  }
812
847
  } catch (o) {
@@ -821,14 +856,14 @@ const be = (t = () => null) => {
821
856
  throw console.error("laserScanFn error", e), e;
822
857
  }
823
858
  };
824
- class er {
859
+ class tr {
825
860
  constructor() {
826
861
  this.pickLaserScan();
827
862
  }
828
863
  pickLaserScan() {
829
864
  return a(this, null, function* () {
830
865
  try {
831
- return yield te.pickLaserScan({ isContinue: !1 });
866
+ return yield ne.pickLaserScan({ isContinue: !1 });
832
867
  } catch (e) {
833
868
  throw console.error("pickLaserScan error", e), e;
834
869
  }
@@ -837,7 +872,7 @@ class er {
837
872
  unPickLaserScan() {
838
873
  return a(this, null, function* () {
839
874
  try {
840
- return yield te.unPickLaserScan();
875
+ return yield ne.unPickLaserScan();
841
876
  } catch (e) {
842
877
  throw console.error("unPickLaserScan error", e), e;
843
878
  }
@@ -845,7 +880,7 @@ class er {
845
880
  }
846
881
  setLaserState(e) {
847
882
  try {
848
- te.setLaserState(e);
883
+ ne.setLaserState(e);
849
884
  } catch (r) {
850
885
  throw console.error("setLaserState error", r), r;
851
886
  }
@@ -855,9 +890,9 @@ class er {
855
890
  try {
856
891
  const { mounted: n, beforeUnmount: o, callBack: s } = r;
857
892
  n(() => {
858
- be(s);
893
+ Se(s);
859
894
  }), o(() => {
860
- be();
895
+ Se();
861
896
  });
862
897
  } catch (n) {
863
898
  throw console.error("laserScanApiParams error", n), n;
@@ -865,7 +900,7 @@ class er {
865
900
  })(e);
866
901
  }
867
902
  }
868
- const Ne = "CountAssistPlugin", ne = l.registerPlugin(Ne, { web: new class extends y {
903
+ const Ee = "CountAssistPlugin", oe = l.registerPlugin(Ee, { web: new class extends g {
869
904
  setCountAssistState(t) {
870
905
  return a(this, null, function* () {
871
906
  try {
@@ -899,14 +934,14 @@ const Ne = "CountAssistPlugin", ne = l.registerPlugin(Ne, { web: new class exten
899
934
  }
900
935
  });
901
936
  }
902
- }() }), E = B();
903
- E.addListenerCountAssistRemoveHandle = () => null;
904
- const Se = (t = () => null) => a(void 0, null, function* () {
937
+ }() }), I = A();
938
+ I.addListenerCountAssistRemoveHandle = () => null;
939
+ const Ce = (t = () => null) => a(void 0, null, function* () {
905
940
  try {
906
- E != null && E.addListenerCountAssistRemoveHandle && typeof E.addListenerCountAssistRemoveHandle == "function" && E.addListenerCountAssistRemoveHandle(), E.addListenerCountAssistRemoveHandle = yield ((e) => a(void 0, null, function* () {
941
+ I != null && I.addListenerCountAssistRemoveHandle && typeof I.addListenerCountAssistRemoveHandle == "function" && I.addListenerCountAssistRemoveHandle(), I.addListenerCountAssistRemoveHandle = yield ((e) => a(void 0, null, function* () {
907
942
  try {
908
943
  if (l.addListener) {
909
- const r = yield l.addListener(Ne, "nativeSendCountAssist", (n) => e && e(n));
944
+ const r = yield l.addListener(Ee, "nativeSendCountAssist", (n) => e && e(n));
910
945
  return r != null && r.remove ? r.remove : () => null;
911
946
  }
912
947
  } catch (r) {
@@ -917,17 +952,17 @@ const Se = (t = () => null) => a(void 0, null, function* () {
917
952
  throw console.error("initCountAssistFn error", e), e;
918
953
  }
919
954
  });
920
- class rr {
955
+ class nr {
921
956
  setCountAssistState(e) {
922
957
  return a(this, null, function* () {
923
- return yield ne.setCountAssistState(e);
958
+ return yield oe.setCountAssistState(e);
924
959
  });
925
960
  }
926
961
  getCountAssistState(e) {
927
962
  return ((r) => {
928
963
  try {
929
964
  let n = r != null ? r : !1;
930
- return W((o) => {
965
+ return V((o) => {
931
966
  n = !!(o != null && o.countAssistState);
932
967
  }), n;
933
968
  } catch (n) {
@@ -940,9 +975,9 @@ class rr {
940
975
  try {
941
976
  const { mounted: n, beforeUnmount: o, callBack: s } = r;
942
977
  n(() => {
943
- Se(s);
978
+ Ce(s);
944
979
  }), o(() => {
945
- Se();
980
+ Ce();
946
981
  });
947
982
  } catch (n) {
948
983
  throw console.error("setCountAssistBtnHandle error", n), n;
@@ -951,16 +986,16 @@ class rr {
951
986
  }
952
987
  toggleCountAssist(e) {
953
988
  return a(this, null, function* () {
954
- return yield ne.toggleCountAssist(e);
989
+ return yield oe.toggleCountAssist(e);
955
990
  });
956
991
  }
957
992
  getCountAssistToggleState() {
958
993
  return a(this, null, function* () {
959
- return yield ne.getCountAssistToggleState();
994
+ return yield oe.getCountAssistToggleState();
960
995
  });
961
996
  }
962
997
  }
963
- const Le = l.registerPlugin("ClickStreamPlugin", { web: new class extends y {
998
+ const ke = l.registerPlugin("ClickStreamPlugin", { web: new class extends g {
964
999
  init() {
965
1000
  return a(this, null, function* () {
966
1001
  return new Promise((t) => {
@@ -980,14 +1015,14 @@ const Le = l.registerPlugin("ClickStreamPlugin", { web: new class extends y {
980
1015
  });
981
1016
  }
982
1017
  }() });
983
- class tr {
1018
+ class or {
984
1019
  constructor() {
985
1020
  this.init();
986
1021
  }
987
1022
  init() {
988
1023
  return a(this, null, function* () {
989
1024
  try {
990
- return yield Le.init();
1025
+ return yield ke.init();
991
1026
  } catch (e) {
992
1027
  throw console.error("clickStreamPlugin, init error", e), e;
993
1028
  }
@@ -996,16 +1031,16 @@ class tr {
996
1031
  trace(e) {
997
1032
  return a(this, null, function* () {
998
1033
  try {
999
- return yield Le.trace(e);
1034
+ return yield ke.trace(e);
1000
1035
  } catch (r) {
1001
1036
  throw console.error("clickStreamPlugin, trace error", r), r;
1002
1037
  }
1003
1038
  });
1004
1039
  }
1005
1040
  }
1006
- const Oe = "MiniAppLifecyclePlugin";
1007
- var R = ((t) => (t.MINI_APP_BEFORE_UNMOUNT_PERMISSION = "mini_app_before_unmount_permission", t.MINI_APP_BEFORE_UNMOUNT_COMPLETION = "mini_app_before_unmount_completion", t))(R || {});
1008
- const Ce = l.registerPlugin(Oe, { web: new class extends y {
1041
+ const Ie = "MiniAppLifecyclePlugin";
1042
+ var $ = ((t) => (t.MINI_APP_BEFORE_UNMOUNT_PERMISSION = "mini_app_before_unmount_permission", t.MINI_APP_BEFORE_UNMOUNT_COMPLETION = "mini_app_before_unmount_completion", t))($ || {});
1043
+ const Ae = l.registerPlugin(Ie, { web: new class extends g {
1009
1044
  setNativeUsagePermission() {
1010
1045
  return a(this, null, function* () {
1011
1046
  });
@@ -1014,16 +1049,16 @@ const Ce = l.registerPlugin(Oe, { web: new class extends y {
1014
1049
  return a(this, null, function* () {
1015
1050
  });
1016
1051
  }
1017
- }() }), q = B();
1018
- q.removeAddListenerLifecycleMiniAppBeforeUnmount = () => null;
1019
- const ke = (t = () => null) => {
1052
+ }() }), G = A();
1053
+ G.removeAddListenerLifecycleMiniAppBeforeUnmount = () => null;
1054
+ const Be = (t = () => null) => {
1020
1055
  try {
1021
- q.removeAddListenerLifecycleMiniAppBeforeUnmount && q.removeAddListenerLifecycleMiniAppBeforeUnmount();
1056
+ G.removeAddListenerLifecycleMiniAppBeforeUnmount && G.removeAddListenerLifecycleMiniAppBeforeUnmount();
1022
1057
  const e = (r) => a(void 0, null, function* () {
1023
- r && (q.removeAddListenerLifecycleMiniAppBeforeUnmount = yield ((n) => a(void 0, null, function* () {
1058
+ r && (G.removeAddListenerLifecycleMiniAppBeforeUnmount = yield ((n) => a(void 0, null, function* () {
1024
1059
  try {
1025
1060
  if (l.addListener) {
1026
- const o = yield l.addListener(Oe, "miniAppBeforeUnmount", (s) => n && n(s));
1061
+ const o = yield l.addListener(Ie, "miniAppBeforeUnmount", (s) => n && n(s));
1027
1062
  return o != null && o.remove ? o.remove : () => null;
1028
1063
  }
1029
1064
  } catch (o) {
@@ -1038,13 +1073,13 @@ const ke = (t = () => null) => {
1038
1073
  throw console.error("laserScanFn error", e), e;
1039
1074
  }
1040
1075
  };
1041
- class nr {
1076
+ class ar {
1042
1077
  constructor() {
1043
1078
  }
1044
1079
  setNativeUsagePermission(e) {
1045
1080
  return a(this, null, function* () {
1046
1081
  try {
1047
- return yield Ce.setNativeUsagePermission(e);
1082
+ return yield Ae.setNativeUsagePermission(e);
1048
1083
  } catch (r) {
1049
1084
  throw console.error("lifecyclePlugin.setNativeUsagePermission error", r), r;
1050
1085
  }
@@ -1053,23 +1088,23 @@ class nr {
1053
1088
  authorizeWebCallback(e) {
1054
1089
  return a(this, null, function* () {
1055
1090
  try {
1056
- return yield Ce.authorizeWebCallback(e);
1091
+ return yield Ae.authorizeWebCallback(e);
1057
1092
  } catch (r) {
1058
1093
  throw console.error("lifecyclePlugin.authorizeWebCallback error", r), r;
1059
1094
  }
1060
1095
  });
1061
1096
  }
1062
1097
  miniAppBeforeUnmount(e) {
1063
- this.setNativeUsagePermission({ action: R.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !0 }), ((r, n) => {
1098
+ this.setNativeUsagePermission({ action: $.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !0 }), ((r, n) => {
1064
1099
  try {
1065
1100
  const { mounted: o, beforeUnmount: s, callBack: c } = r;
1066
1101
  o(() => {
1067
- ke((i) => a(this, null, function* () {
1102
+ Be((i) => a(this, null, function* () {
1068
1103
  var d;
1069
1104
  if (c && c instanceof Function)
1070
1105
  try {
1071
1106
  (d = c(i)) == null || d.then(() => a(this, null, function* () {
1072
- yield n.setNativeUsagePermission({ action: R.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 }), yield n.authorizeWebCallback({ action: R.MINI_APP_BEFORE_UNMOUNT_COMPLETION });
1107
+ yield n.setNativeUsagePermission({ action: $.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 }), yield n.authorizeWebCallback({ action: $.MINI_APP_BEFORE_UNMOUNT_COMPLETION });
1073
1108
  }));
1074
1109
  } catch (h) {
1075
1110
  console.error("miniAppBeforeUnmount error callBack is not a function or promise");
@@ -1078,7 +1113,7 @@ class nr {
1078
1113
  console.error("miniAppBeforeUnmount error callBack is not a function or promise");
1079
1114
  }));
1080
1115
  }), s(() => a(this, null, function* () {
1081
- ke(), n.setNativeUsagePermission({ action: R.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
1116
+ Be(), n.setNativeUsagePermission({ action: $.MINI_APP_BEFORE_UNMOUNT_PERMISSION, value: !1 });
1082
1117
  }));
1083
1118
  } catch (o) {
1084
1119
  throw console.error("miniAppBeforeUnmount error", o), o;
@@ -1086,7 +1121,7 @@ class nr {
1086
1121
  })(e, this);
1087
1122
  }
1088
1123
  }
1089
- const Ae = l.registerPlugin("DeviceInteractionPlugin", { web: new class extends y {
1124
+ const Me = l.registerPlugin("DeviceInteractionPlugin", { web: new class extends g {
1090
1125
  callVibrate() {
1091
1126
  return a(this, null, function* () {
1092
1127
  });
@@ -1096,11 +1131,11 @@ const Ae = l.registerPlugin("DeviceInteractionPlugin", { web: new class extends
1096
1131
  });
1097
1132
  }
1098
1133
  }() });
1099
- class or {
1134
+ class sr {
1100
1135
  callVibrate() {
1101
1136
  return a(this, null, function* () {
1102
1137
  try {
1103
- return yield Ae.callVibrate();
1138
+ return yield Me.callVibrate();
1104
1139
  } catch (e) {
1105
1140
  throw console.error("callVibrate error", e), e;
1106
1141
  }
@@ -1109,14 +1144,14 @@ class or {
1109
1144
  callErrorBeep() {
1110
1145
  return a(this, null, function* () {
1111
1146
  try {
1112
- return yield Ae.callErrorBeep();
1147
+ return yield Me.callErrorBeep();
1113
1148
  } catch (e) {
1114
1149
  throw console.error("callErrorBeep error", e), e;
1115
1150
  }
1116
1151
  });
1117
1152
  }
1118
1153
  }
1119
- const Ee = "PollingPlugin", Be = l.registerPlugin(Ee, { web: new class extends y {
1154
+ const He = "PollingPlugin", Ne = l.registerPlugin(He, { web: new class extends g {
1120
1155
  create() {
1121
1156
  return a(this, null, function* () {
1122
1157
  });
@@ -1125,17 +1160,17 @@ const Ee = "PollingPlugin", Be = l.registerPlugin(Ee, { web: new class extends y
1125
1160
  return a(this, null, function* () {
1126
1161
  });
1127
1162
  }
1128
- }() }), G = B();
1129
- G.removeAddListenerPolling = () => null;
1130
- const ar = (t, e) => {
1163
+ }() }), J = A();
1164
+ J.removeAddListenerPolling = () => null;
1165
+ const ir = (t, e) => {
1131
1166
  try {
1132
- G.removeAddListenerPolling && G.removeAddListenerPolling();
1167
+ J.removeAddListenerPolling && J.removeAddListenerPolling();
1133
1168
  const r = e.pollingId;
1134
1169
  ((n) => a(void 0, null, function* () {
1135
- return n && (G.removeAddListenerPolling = yield ((o) => a(void 0, null, function* () {
1170
+ return n && (J.removeAddListenerPolling = yield ((o) => a(void 0, null, function* () {
1136
1171
  try {
1137
1172
  if (l.addListener) {
1138
- const s = yield l.addListener(Ee, "nativeSendPolling", (c) => o && o(c));
1173
+ const s = yield l.addListener(He, "nativeSendPolling", (c) => o && o(c));
1139
1174
  return s != null && s.remove ? s.remove : () => null;
1140
1175
  }
1141
1176
  } catch (s) {
@@ -1151,9 +1186,9 @@ const ar = (t, e) => {
1151
1186
  throw console.error("pollingFn error", r), r;
1152
1187
  }
1153
1188
  };
1154
- class sr {
1189
+ class cr {
1155
1190
  constructor() {
1156
- g(this, "pollingList");
1191
+ y(this, "pollingList");
1157
1192
  this.pollingList = [];
1158
1193
  }
1159
1194
  create(e) {
@@ -1161,10 +1196,10 @@ class sr {
1161
1196
  try {
1162
1197
  (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, i, d) => i === d.findIndex((h) => h.pollingId === c.pollingId));
1163
1198
  const s = ((o = e == null ? void 0 : e.pollingParams) == null ? void 0 : o.delay) / 1e3;
1164
- return Be.create(ue(de({}, e == null ? void 0 : e.pollingParams), { delay: s })), ((c, i) => {
1199
+ return Ne.create(he(ue({}, e == null ? void 0 : e.pollingParams), { delay: s })), ((c, i) => {
1165
1200
  try {
1166
1201
  const { mounted: d, pollingParams: h } = c;
1167
- d(() => ar(i, h));
1202
+ d(() => ir(i, h));
1168
1203
  } catch (d) {
1169
1204
  throw console.error("createPolling error", d), d;
1170
1205
  }
@@ -1180,13 +1215,13 @@ class sr {
1180
1215
  var r;
1181
1216
  try {
1182
1217
  const n = this.pollingList.map((o) => o.pollingId).indexOf(e.pollingId);
1183
- return (r = this.pollingList) != null && r.length && (Number(n) || Number(n) >= 0) && this.pollingList.splice(Number(n), 1), Be.destroy(e);
1218
+ return (r = this.pollingList) != null && r.length && (Number(n) || Number(n) >= 0) && this.pollingList.splice(Number(n), 1), Ne.destroy(e);
1184
1219
  } catch (n) {
1185
1220
  throw console.error("pollingPlugin destroy error", n), n;
1186
1221
  }
1187
1222
  }
1188
1223
  }
1189
- const ir = l.registerPlugin("PaymentPlugin", { web: new class extends y {
1224
+ const lr = l.registerPlugin("PaymentPlugin", { web: new class extends g {
1190
1225
  process(t) {
1191
1226
  return a(this, null, function* () {
1192
1227
  try {
@@ -1199,35 +1234,35 @@ const ir = l.registerPlugin("PaymentPlugin", { web: new class extends y {
1199
1234
  });
1200
1235
  }
1201
1236
  }() });
1202
- class cr {
1237
+ class dr {
1203
1238
  process(e) {
1204
1239
  return a(this, null, function* () {
1205
1240
  try {
1206
- return yield ir.process(e);
1241
+ return yield lr.process(e);
1207
1242
  } catch (r) {
1208
1243
  throw console.error("clickStreamPlugin, trace error", r), r;
1209
1244
  }
1210
1245
  });
1211
1246
  }
1212
1247
  }
1213
- class lr {
1248
+ class ur {
1214
1249
  constructor() {
1215
- g(this, "initialContextPlugins", new Ke());
1216
- g(this, "communicatePlugins", new Je());
1217
- g(this, "cameraScanPlugins", new Qe());
1218
- g(this, "cameraScanMultiplePlugins", new Xe());
1219
- g(this, "cameraScanMultipleNoCountPlugins", new Ye());
1220
- g(this, "cameraScanSingleOrDualPlugins", new Ze());
1221
- g(this, "laserScanPlugins", new er());
1222
- g(this, "countAssistPlugins", new rr());
1223
- g(this, "clickStreamPlugins", new tr());
1224
- g(this, "lifecyclePlugins", new nr());
1225
- g(this, "deviceInteractionPlugins", new or());
1226
- g(this, "pollingPlugins", new sr());
1227
- g(this, "paymentPlugins", new cr());
1250
+ y(this, "initialContextPlugins", new Ge());
1251
+ y(this, "communicatePlugins", new Xe());
1252
+ y(this, "cameraScanPlugins", new Ye());
1253
+ y(this, "cameraScanMultiplePlugins", new Ze());
1254
+ y(this, "cameraScanMultipleNoCountPlugins", new er());
1255
+ y(this, "cameraScanSingleOrDualPlugins", new rr());
1256
+ y(this, "laserScanPlugins", new tr());
1257
+ y(this, "countAssistPlugins", new nr());
1258
+ y(this, "clickStreamPlugins", new or());
1259
+ y(this, "lifecyclePlugins", new ar());
1260
+ y(this, "deviceInteractionPlugins", new sr());
1261
+ y(this, "pollingPlugins", new cr());
1262
+ y(this, "paymentPlugins", new dr());
1228
1263
  }
1229
1264
  }
1230
- const hr = new lr(), dr = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: class extends y {
1265
+ const wr = new ur(), hr = Object.freeze(Object.defineProperty({ __proto__: null, PluginsWeb: class extends g {
1231
1266
  homeIsClick() {
1232
1267
  return a(this, null, function* () {
1233
1268
  });
@@ -1330,6 +1365,6 @@ const hr = new lr(), dr = Object.freeze(Object.defineProperty({ __proto__: null,
1330
1365
  }
1331
1366
  } }, Symbol.toStringTag, { value: "Module" }));
1332
1367
  export {
1333
- lr as NativeApi,
1334
- hr as default
1368
+ ur as NativeApi,
1369
+ wr as default
1335
1370
  };
package/lib/main.umd.cjs CHANGED
@@ -1 +1 @@
1
- (function(y,h){typeof exports=="object"&&typeof module!="undefined"?h(exports):typeof define=="function"&&define.amd?define(["exports"],h):h((y=typeof globalThis!="undefined"?globalThis:y||self).main={})})(this,function(y){"use strict";var cr=Object.defineProperty,lr=Object.defineProperties;var dr=Object.getOwnPropertyDescriptors;var He=Object.getOwnPropertySymbols;var ur=Object.prototype.hasOwnProperty,hr=Object.prototype.propertyIsEnumerable;var le=(y,h,p)=>h in y?cr(y,h,{enumerable:!0,configurable:!0,writable:!0,value:p}):y[h]=p,Te=(y,h)=>{for(var p in h||(h={}))ur.call(h,p)&&le(y,p,h[p]);if(He)for(var p of He(h))hr.call(h,p)&&le(y,p,h[p]);return y},xe=(y,h)=>lr(y,dr(h));var P=(y,h,p)=>(le(y,typeof h!="symbol"?h+"":h,p),p);var a=(y,h,p)=>new Promise((O,_)=>{var ee=b=>{try{l(p.next(b))}catch(g){_(g)}},re=b=>{try{l(p.throw(b))}catch(g){_(g)}},l=b=>b.done?O(b.value):Promise.resolve(b.value).then(ee,re);l((p=p.apply(y,h)).next())});/*! Capacitor: https://capacitorjs.com/ - MIT License */const h=n=>n.CapacitorPlatforms=(e=>{const r=new Map;r.set("web",{name:"web"});const t=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:r};return t.addPlatform=(o,s)=>{t.platforms.set(o,s)},t.setPlatform=o=>{t.platforms.has(o)&&(t.currentPlatform=t.platforms.get(o))},t})(n),p=h(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});var O;p.addPlatform,p.setPlatform,function(n){n.Unimplemented="UNIMPLEMENTED",n.Unavailable="UNAVAILABLE"}(O||(O={}));class _ extends Error{constructor(e,r,t){super(e),this.message=e,this.code=r,this.data=t}}const ee=n=>{var e,r,t,o,s;const c=n.CapacitorCustomPlatform||null,i=n.Capacitor||{},w=i.Plugins=i.Plugins||{},m=n.CapacitorPlatforms,C=((e=m==null?void 0:m.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||(()=>c!==null?c.name:(d=>{var u,v;return d!=null&&d.androidBridge?"android":!((v=(u=d==null?void 0:d.webkit)===null||u===void 0?void 0:u.messageHandlers)===null||v===void 0)&&v.bridge?"ios":"web"})(n)),S=((r=m==null?void 0:m.currentPlatform)===null||r===void 0?void 0:r.isNativePlatform)||(()=>C()!=="web"),L=((t=m==null?void 0:m.currentPlatform)===null||t===void 0?void 0:t.isPluginAvailable)||(d=>{const u=k.get(d);return!!(u!=null&&u.platforms.has(C()))||!!j(d)}),j=((o=m==null?void 0:m.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||(d=>{var u;return(u=i.PluginHeaders)===null||u===void 0?void 0:u.find(v=>v.name===d)}),k=new Map,A=((s=m==null?void 0:m.currentPlatform)===null||s===void 0?void 0:s.registerPlugin)||((d,u={})=>{const v=k.get(d);if(v)return console.warn(`Capacitor plugin "${d}" already registered. Cannot register plugins twice.`),v.proxy;const M=C(),D=j(d);let x;const ae=B=>{let I;const F=(...Z)=>{const W=(()=>a(this,null,function*(){return!x&&M in u?x=x=typeof u[M]=="function"?yield u[M]():u[M]:c!==null&&!x&&"web"in u&&(x=x=typeof u.web=="function"?yield u.web():u.web),x}))().then(V=>{const Ie=((N,q)=>{var ie,ce;if(!D){if(N)return(ce=N[q])===null||ce===void 0?void 0:ce.bind(N);throw new _(`"${d}" plugin is not implemented on ${M}`,O.Unimplemented)}{const Ue=D==null?void 0:D.methods.find(K=>q===K.name);if(Ue)return Ue.rtype==="promise"?K=>i.nativePromise(d,q.toString(),K):(K,ir)=>i.nativeCallback(d,q.toString(),K,ir);if(N)return(ie=N[q])===null||ie===void 0?void 0:ie.bind(N)}})(V,B);if(Ie){const N=Ie(...Z);return I=N==null?void 0:N.remove,N}throw new _(`"${d}.${B}()" is not implemented on ${M}`,O.Unimplemented)});return B==="addListener"&&(W.remove=()=>a(this,null,function*(){return I()})),W};return F.toString=()=>`${B.toString()}() { [capacitor code] }`,Object.defineProperty(F,"name",{value:B,writable:!1,configurable:!1}),F},Oe=ae("addListener"),Ee=ae("removeListener"),sr=(B,I)=>{const F=Oe({eventName:B},I),Z=()=>a(this,null,function*(){const V=yield F;Ee({eventName:B,callbackId:V},I)}),W=new Promise(V=>F.then(()=>V({remove:Z})));return W.remove=()=>a(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield Z()}),W},se=new Proxy({},{get(B,I){switch(I){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return D?sr:Oe;case"removeListener":return Ee;default:return ae(I)}}});return w[d]=se,k.set(d,{name:d,proxy:se,platforms:new Set([...Object.keys(u),...D?[M]:[]])}),se});return i.convertFileSrc||(i.convertFileSrc=d=>d),i.getPlatform=C,i.handleError=d=>n.console.error(d),i.isNativePlatform=S,i.isPluginAvailable=L,i.pluginMethodNoop=(d,u,v)=>Promise.reject(`${v} does not have an implementation of "${u}".`),i.registerPlugin=A,i.Exception=_,i.DEBUG=!!i.DEBUG,i.isLoggingEnabled=!!i.isLoggingEnabled,i.platform=i.getPlatform(),i.isNative=i.isNativePlatform(),i},re=n=>n.Capacitor=ee(n),l=re(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}),b=l.registerPlugin;l.Plugins;class g{constructor(e){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)}addListener(e,r){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(r);const t=this.windowListeners[e];t&&!t.registered&&this.addWindowListener(t);const o=()=>a(this,null,function*(){return this.removeListener(e,r)}),s=Promise.resolve({remove:o});return Object.defineProperty(s,"remove",{value:()=>a(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield o()})}),s}removeAllListeners(){return a(this,null,function*(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}})}notifyListeners(e,r){const t=this.listeners[e];t&&t.forEach(o=>o(r))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,r){this.windowListeners[r]={registered:!1,windowEventName:e,pluginEventName:r,handler:t=>{this.notifyListeners(r,t)}}}unimplemented(e="not implemented"){return new l.Exception(e,O.Unimplemented)}unavailable(e="not available"){return new l.Exception(e,O.Unavailable)}removeListener(e,r){return a(this,null,function*(){const t=this.listeners[e];if(!t)return;const o=t.indexOf(r);this.listeners[e].splice(o,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])})}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const de=n=>encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),ue=n=>n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class _e extends g{getCookies(){return a(this,null,function*(){const e=document.cookie,r={};return e.split(";").forEach(t=>{if(t.length<=0)return;let[o,s]=t.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=ue(o).trim(),s=ue(s).trim(),r[o]=s}),r})}setCookie(e){return a(this,null,function*(){try{const r=de(e.key),t=de(e.value),o=`; expires=${(e.expires||"").replace("expires=","")}`,s=(e.path||"/").replace("path=",""),c=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${r}=${t||""}${o}; path=${s}; ${c};`}catch(r){return Promise.reject(r)}})}deleteCookie(e){return a(this,null,function*(){try{document.cookie=`${e.key}=; Max-Age=0`}catch(r){return Promise.reject(r)}})}clearCookies(){return a(this,null,function*(){try{const e=document.cookie.split(";")||[];for(const r of e)document.cookie=r.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}})}clearAllCookies(){return a(this,null,function*(){try{yield this.clearCookies()}catch(e){return Promise.reject(e)}})}}b("CapacitorCookies",{web:()=>new _e});const je=(n,e={})=>{const r=Object.assign({method:n.method||"GET",headers:n.headers},e),t=((o={})=>{const s=Object.keys(o);return Object.keys(o).map(c=>c.toLocaleLowerCase()).reduce((c,i,w)=>(c[i]=o[s[w]],c),{})})(n.headers)["content-type"]||"";if(typeof n.data=="string")r.body=n.data;else if(t.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[s,c]of Object.entries(n.data||{}))o.set(s,c);r.body=o.toString()}else if(t.includes("multipart/form-data")){const o=new FormData;if(n.data instanceof FormData)n.data.forEach((c,i)=>{o.append(i,c)});else for(const c of Object.keys(n.data))o.append(c,n.data[c]);r.body=o;const s=new Headers(r.headers);s.delete("content-type"),r.headers=s}else(t.includes("application/json")||typeof n.data=="object")&&(r.body=JSON.stringify(n.data));return r};class Fe extends g{request(e){return a(this,null,function*(){const r=je(e,e.webFetchExtra),t=((S,L=!0)=>S?Object.entries(S).reduce((j,k)=>{const[A,d]=k;let u,v;return Array.isArray(d)?(v="",d.forEach(M=>{u=L?encodeURIComponent(M):M,v+=`${A}=${u}&`}),v.slice(0,-1)):(u=L?encodeURIComponent(d):d,v=`${A}=${u}`),`${j}&${v}`},"").substr(1):null)(e.params,e.shouldEncodeUrlParams),o=t?`${e.url}?${t}`:e.url,s=yield fetch(o,r),c=s.headers.get("content-type")||"";let i,w,{responseType:m="text"}=s.ok?e:{};switch(c.includes("application/json")&&(m="json"),m){case"arraybuffer":case"blob":w=yield s.blob(),i=yield(S=>a(this,null,function*(){return new Promise((L,j)=>{const k=new FileReader;k.onload=()=>{const A=k.result;L(A.indexOf(",")>=0?A.split(",")[1]:A)},k.onerror=A=>j(A),k.readAsDataURL(S)})}))(w);break;case"json":i=yield s.json();break;default:i=yield s.text()}const C={};return s.headers.forEach((S,L)=>{C[L]=S}),{data:i,headers:C,status:s.status,url:s.url}})}get(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))})}post(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))})}put(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))})}patch(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))})}delete(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))})}}function te(){return l.getPlatform()==="android"?JSON.parse(AndroidInitialContext.initialContext()):window.portalInitialContext}b("CapacitorHttp",{web:()=>new Fe}),b("Portals",{web:()=>Promise.resolve().then(function(){return Re}).then(n=>new n.PortalsWeb)});const Re=Object.freeze({__proto__:null,PortalsWeb:class extends g{publishNative(n){return a(this,null,function*(){})}}}),z=n=>{var e,r,t;try{if(typeof window=="undefined")return;if(te&&((e=te())!=null&&e.value)){const o=(t=(r=te())==null?void 0:r.value)!=null?t:null;if(!o)return void console.error("native initialContext is undefine");if(!n)return void console.error("initialContext call back is undefine");n(o)}}catch(o){throw console.error("getInitialContextHandle error",o),o}};class $e{isNative(){try{return(()=>{try{let e=!1;return z(r=>{e=!!(r!=null&&r.isNative)}),e}catch(e){throw console.error("isNative error",e),e}})()}catch(e){throw console.error("isNative error",e),e}}redirectPage(e){try{(({callBack:r})=>{z(t=>{var o;try{if(!(t!=null&&t.params))return void console.info("initial context native params is undefine");const s=(o=t==null?void 0:t.params)!=null?o:null;if(!s)return;if(!r)return void console.error("initial context call back is undefine");r(s)}catch(s){throw console.error("redirectPageHandle error",s),s}})})(e)}catch(r){throw console.error("redirectPage error",r),r}}getNativeInfo(e){try{return this.isNative()?(()=>{try{let r=null;return z(t=>{r=t!=null?t:null}),r}catch(r){throw console.error("getNativeInfoHandle error",r),r}})():(r=>{var t;return(t=r==null?void 0:r.mockData)!=null?t:null})(e)}catch(r){throw console.error("getNativeInfo error",r),r}}}const E=()=>{try{let n={};return typeof window!="undefined"&&(n=window),n}catch(n){throw console.error("isWinHandle error",n),n}},R="CommunicatePlugin",f=l.registerPlugin(R,{web:()=>Promise.resolve().then(()=>ar).then(n=>new n.PluginsWeb)}),G=E();G.removeAddListenerFab=()=>null;const De=n=>{var e,r;try{G.removeAddListenerFab&&G.removeAddListenerFab();const t=[];if((e=f.showFABMenu)==null||e.call(f,{fabMenu:t}),!n||!((r=Object.keys(n))!=null&&r.length))return;Object.keys(n).forEach(o=>{var s,c,i,w,m,C,S,L;t.push({disable:(c=(s=n==null?void 0:n[o])==null?void 0:s.disable)!=null?c:!1,icon:(w=(i=n==null?void 0:n[o])==null?void 0:i.icon)!=null?w:"",id:(C=(m=n==null?void 0:n[o])==null?void 0:m.id)!=null?C:"",name:(L=(S=n==null?void 0:n[o])==null?void 0:S.title)!=null?L:""})}),queueMicrotask(()=>{var o;(o=f.showFABMenu)==null||o.call(f,{fabMenu:t})}),setTimeout(()=>{(o=>a(this,null,function*(){o&&(G.removeAddListenerFab=yield(s=>a(this,null,function*(){try{if(l.addListener){const c=yield l.addListener(R,"nativeSendFab",i=>s&&s(i));return c!=null&&c.remove?c.remove:()=>null}}catch(c){throw console.error("addListenerFabHandle error",c),c}}))(o))}))(o=>{let s;o!=null&&o.disable||o!=null&&o.id&&(Object.keys(n).forEach(c=>{var i,w,m;(i=n==null?void 0:n[c])!=null&&i.id&&o.id===n[c].id&&(s=(m=(w=n[c])==null?void 0:w.fn)!=null?m:()=>null)}),typeof s=="function"&&s())})})}catch(t){throw console.error("fabBtnHandle error",t),t}},U=E();U.addListenerBackRemoveHandle=()=>null;const he=(n=()=>null)=>a(this,null,function*(){try{U!=null&&U.addListenerBackRemoveHandle&&typeof U.addListenerBackRemoveHandle=="function"&&U.addListenerBackRemoveHandle(),U.addListenerBackRemoveHandle=yield(e=>a(this,null,function*(){try{if(l.addListener){const r=yield l.addListener(R,"nativeSendBack",t=>e&&e(t));return r!=null&&r.remove?r.remove:()=>null}}catch(r){throw console.error("addListenerBackHandle error",r),r}}))(n)}catch(e){throw console.error("initBackBtnFn error",e),e}}),J=E();J.addListenerHomeHandle=()=>null;const We=n=>{try{J.addListenerHomeHandle&&J.addListenerHomeHandle(),setTimeout(()=>{(e=>a(this,null,function*(){e&&(J.addListenerHomeHandle=yield(r=>a(this,null,function*(){try{if(l.addListener){const t=yield l.addListener(R,"nativeSendHome",o=>r&&r(o));return t!=null&&t.remove?t.remove:()=>null}}catch(t){throw console.error("addListenerHomeHandle error",t),t}}))(e))}))(n)})}catch(e){throw console.error("homeFn error",e),e}},H=E();H.addListenerTouchRemoveHandle=()=>null;const me=(n=()=>null)=>a(this,null,function*(){try{H!=null&&H.addListenerTouchRemoveHandle&&typeof H.addListenerTouchRemoveHandle=="function"&&H.addListenerTouchRemoveHandle(),H.addListenerTouchRemoveHandle=yield(e=>a(this,null,function*(){try{if(l.addListener){const r=yield l.addListener(R,"nativeTouchListener",t=>e&&e(t));return r!=null&&r.remove?r.remove:()=>null}}catch(r){throw console.error("addListenerTouchHandle error",r),r}}))(n)}catch(e){throw console.error("initTouchFn error",e),e}});class Ve{constructor(){this.homeBtnSwitch({isClick:!0})}homeBtnSwitch(e){return a(this,null,function*(){var r;try{return yield(r=f.homeIsClick)==null?void 0:r.call(f,e)}catch(t){throw console.error("homeBtnSwitch error",t),t}})}setBackBtn(e){try{(r=>{try{const{mounted:t,beforeUnmount:o,callBack:s}=r;t(()=>{he(s)}),o(()=>{he()})}catch(t){throw console.error("backBtnHandle error",t),t}})(e)}catch(r){throw console.error("setBackBtn error",r),r}}setHomeBtn(e){try{We(e)}catch(r){throw console.error("setHomeBtn error",r),r}}setFabBtn(e){try{De(e)}catch(r){throw console.error("setFabBtn error",r),r}}touchListener(e){try{(r=>{try{const{mounted:t,beforeUnmount:o,callBack:s}=r;t(()=>{me(s)}),o(()=>{me()})}catch(t){throw console.error("touchListenerHandle error",t),t}})(e)}catch(r){throw console.error("listenerTouch error",r),r}}disableFAB(e){return a(this,null,function*(){try{return yield f.disableFAB(e)}catch(r){throw console.error("disableFAB error",r),r}})}disableBack(e){return a(this,null,function*(){try{return yield f.disableBack(e)}catch(r){throw console.error("disableBack error",r),r}})}openMiniApp(e){return a(this,null,function*(){try{return yield f.openMiniApp(e)}catch(r){throw console.error("openMiniApp error",r),r}})}showTitle(e){return a(this,null,function*(){try{return yield f.showTitle(e)}catch(r){throw console.error("showTitle error",r),r}})}showSubMask(e){return a(this,null,function*(){try{return yield f.showSubMask(e)}catch(r){throw console.error("showSubMask error",r),r}})}setMiniAppVersion(e){return a(this,null,function*(){try{return yield f.setMiniAppVersion(e)}catch(r){throw console.error("setMiniAppVersion error",r),r}})}showNativeLoading(){return a(this,null,function*(){try{return yield f.showDialog()}catch(e){throw console.error("showNativeLoading error",e),e}})}cancelNativeLoading(){return a(this,null,function*(){try{return yield f.cancelDialog()}catch(e){throw console.error("cancelNativeLoading error",e),e}})}getMiniAppKong(e){return a(this,null,function*(){try{return yield f.getMiniAppKong(e)}catch(r){throw console.error("getMiniAppKong error",r),r}})}}const we=l.registerPlugin("CameraScanPlugin",{web:new class extends g{pickCameraScan(n){return a(this,null,function*(){return new Promise(e=>{e(n)})})}setCameraScanState(){return a(this,null,function*(){})}}});window.removeAddListenerCameraScan=()=>null;class qe{pickCameraScan(e){return a(this,null,function*(){try{return yield we.pickCameraScan(e)}catch(r){throw console.error("pickCameraScan error",r),r}})}setCameraScanState(e){return a(this,null,function*(){try{return yield we.setCameraScanState(e)}catch(r){throw console.error("setCameraScanState error",r),r}})}}const pe=l.registerPlugin("CameraScanMultiplePlugin",{web:new class extends g{pickCameraScanMultiple(){return a(this,null,function*(){})}setCameraScanMultipleState(){return a(this,null,function*(){})}}});class Ke{pickCameraScanMultiple(e){return a(this,null,function*(){try{return yield pe.pickCameraScanMultiple(e)}catch(r){throw console.error("pickCameraScanMultiple error",r),r}})}setCameraScanMultipleState(e){return a(this,null,function*(){try{return yield pe.setCameraScanMultipleState(e)}catch(r){throw console.error("setCameraScanMultipleState error",r),r}})}}const ye=l.registerPlugin("CameraScanMultipleNoCountPlugin",{web:new class extends g{pickCameraScanMultipleNoCount(){return a(this,null,function*(){})}setCameraScanMultipleNoCountState(){return a(this,null,function*(){})}}});class ze{pickCameraScanMultipleNoCount(e){return a(this,null,function*(){try{return yield ye.pickCameraScanMultipleNoCount(e)}catch(r){throw console.error("pickCameraScanMultipleNoCount error",r),r}})}setCameraScanMultipleNoCountState(e){return a(this,null,function*(){try{return yield ye.setCameraScanMultipleNoCountState(e)}catch(r){throw console.error("setCameraScanMultipleNoCountState error",r),r}})}}const ge=l.registerPlugin("CameraScanSingleOrDualPlugin",{web:new class extends g{pickCameraScanSingleOrDual(){return a(this,null,function*(){})}setCameraScanSingleOrDualState(){return a(this,null,function*(){})}}});class Ge{pickCameraScanSingleOrDual(e){return a(this,null,function*(){try{return yield ge.pickCameraScanSingleOrDual(e)}catch(r){throw console.error("pickCameraScanSingleOrDual error",r),r}})}setCameraScanSingleOrDualState(e){return a(this,null,function*(){try{return yield ge.setCameraScanSingleOrDualState(e)}catch(r){throw console.error("setCameraScanSingleOrDualState error",r),r}})}}const fe="LaserScanPlugin",ne=l.registerPlugin(fe,{web:new class extends g{pickLaserScan(){return a(this,null,function*(){})}unPickLaserScan(){return a(this,null,function*(){})}setLaserState(){return a(this,null,function*(){})}}}),Q=E();Q.removeAddListenerLaserScan=()=>null;const ve=(n=()=>null)=>{try{Q.removeAddListenerLaserScan&&Q.removeAddListenerLaserScan();const e=r=>a(this,null,function*(){r&&(Q.removeAddListenerLaserScan=yield(t=>a(this,null,function*(){try{if(l.addListener){const o=yield l.addListener(fe,"nativeSendLaser",s=>t&&t(s));return o!=null&&o.remove?o.remove:()=>null}}catch(o){throw console.error("addListenerLaserHandle error",o),o}}))(r))});setTimeout(()=>{e(n)})}catch(e){throw console.error("laserScanFn error",e),e}};class Je{constructor(){this.pickLaserScan()}pickLaserScan(){return a(this,null,function*(){try{return yield ne.pickLaserScan({isContinue:!1})}catch(e){throw console.error("pickLaserScan error",e),e}})}unPickLaserScan(){return a(this,null,function*(){try{return yield ne.unPickLaserScan()}catch(e){throw console.error("unPickLaserScan error",e),e}})}setLaserState(e){try{ne.setLaserState(e)}catch(r){throw console.error("setLaserState error",r),r}}setLaserScan(e){(r=>{try{const{mounted:t,beforeUnmount:o,callBack:s}=r;t(()=>{ve(s)}),o(()=>{ve()})}catch(t){throw console.error("laserScanApiParams error",t),t}})(e)}}const Pe="CountAssistPlugin",oe=l.registerPlugin(Pe,{web:new class extends g{setCountAssistState(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("setCountAssistState error",e),e}})}toggleCountAssist(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("hideCountAssist error",e),e}})}getCountAssistToggleState(){return a(this,null,function*(){try{return new Promise(n=>{n(void 0)})}catch(n){throw console.error("getCountAssistToggleState error",n),n}})}}}),T=E();T.addListenerCountAssistRemoveHandle=()=>null;const be=(n=()=>null)=>a(this,null,function*(){try{T!=null&&T.addListenerCountAssistRemoveHandle&&typeof T.addListenerCountAssistRemoveHandle=="function"&&T.addListenerCountAssistRemoveHandle(),T.addListenerCountAssistRemoveHandle=yield(e=>a(this,null,function*(){try{if(l.addListener){const r=yield l.addListener(Pe,"nativeSendCountAssist",t=>e&&e(t));return r!=null&&r.remove?r.remove:()=>null}}catch(r){throw console.error("addListenerCountAssistHandle error",r),r}}))(n)}catch(e){throw console.error("initCountAssistFn error",e),e}});class Qe{setCountAssistState(e){return a(this,null,function*(){return yield oe.setCountAssistState(e)})}getCountAssistState(e){return(r=>{try{let t=r!=null?r:!1;return z(o=>{t=!!(o!=null&&o.countAssistState)}),t}catch(t){throw console.error("getCountAssistStateHandle error",t),t}})(e)}setCountAssistBtn(e){(r=>{try{const{mounted:t,beforeUnmount:o,callBack:s}=r;t(()=>{be(s)}),o(()=>{be()})}catch(t){throw console.error("setCountAssistBtnHandle error",t),t}})(e)}toggleCountAssist(e){return a(this,null,function*(){return yield oe.toggleCountAssist(e)})}getCountAssistToggleState(){return a(this,null,function*(){return yield oe.getCountAssistToggleState()})}}const Se=l.registerPlugin("ClickStreamPlugin",{web:new class extends g{init(){return a(this,null,function*(){return new Promise(n=>{n(null)})})}trace(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("clickStreamTraceParams error",e),e}})}}});class Xe{constructor(){this.init()}init(){return a(this,null,function*(){try{return yield Se.init()}catch(e){throw console.error("clickStreamPlugin, init error",e),e}})}trace(e){return a(this,null,function*(){try{return yield Se.trace(e)}catch(r){throw console.error("clickStreamPlugin, trace error",r),r}})}}const Le="MiniAppLifecyclePlugin";var $=(n=>(n.MINI_APP_BEFORE_UNMOUNT_PERMISSION="mini_app_before_unmount_permission",n.MINI_APP_BEFORE_UNMOUNT_COMPLETION="mini_app_before_unmount_completion",n))($||{});const Ce=l.registerPlugin(Le,{web:new class extends g{setNativeUsagePermission(){return a(this,null,function*(){})}authorizeWebCallback(){return a(this,null,function*(){})}}}),X=E();X.removeAddListenerLifecycleMiniAppBeforeUnmount=()=>null;const ke=(n=()=>null)=>{try{X.removeAddListenerLifecycleMiniAppBeforeUnmount&&X.removeAddListenerLifecycleMiniAppBeforeUnmount();const e=r=>a(this,null,function*(){r&&(X.removeAddListenerLifecycleMiniAppBeforeUnmount=yield(t=>a(this,null,function*(){try{if(l.addListener){const o=yield l.addListener(Le,"miniAppBeforeUnmount",s=>t&&t(s));return o!=null&&o.remove?o.remove:()=>null}}catch(o){throw console.error("miniAppBeforeUnmountHandle error",o),o}}))(r))});setTimeout(()=>a(this,null,function*(){yield e(n)}))}catch(e){throw console.error("laserScanFn error",e),e}};class Ye{constructor(){}setNativeUsagePermission(e){return a(this,null,function*(){try{return yield Ce.setNativeUsagePermission(e)}catch(r){throw console.error("lifecyclePlugin.setNativeUsagePermission error",r),r}})}authorizeWebCallback(e){return a(this,null,function*(){try{return yield Ce.authorizeWebCallback(e)}catch(r){throw console.error("lifecyclePlugin.authorizeWebCallback error",r),r}})}miniAppBeforeUnmount(e){this.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!0}),((r,t)=>{try{const{mounted:o,beforeUnmount:s,callBack:c}=r;o(()=>{ke(i=>a(this,null,function*(){var w;if(c&&c instanceof Function)try{(w=c(i))==null||w.then(()=>a(this,null,function*(){yield t.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!1}),yield t.authorizeWebCallback({action:$.MINI_APP_BEFORE_UNMOUNT_COMPLETION})}))}catch(m){console.error("miniAppBeforeUnmount error callBack is not a function or promise")}else console.error("miniAppBeforeUnmount error callBack is not a function or promise")}))}),s(()=>a(this,null,function*(){ke(),t.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!1})}))}catch(o){throw console.error("miniAppBeforeUnmount error",o),o}})(e,this)}}const Ae=l.registerPlugin("DeviceInteractionPlugin",{web:new class extends g{callVibrate(){return a(this,null,function*(){})}callErrorBeep(){return a(this,null,function*(){})}}});class Ze{callVibrate(){return a(this,null,function*(){try{return yield Ae.callVibrate()}catch(e){throw console.error("callVibrate error",e),e}})}callErrorBeep(){return a(this,null,function*(){try{return yield Ae.callErrorBeep()}catch(e){throw console.error("callErrorBeep error",e),e}})}}const Me="PollingPlugin",Ne=l.registerPlugin(Me,{web:new class extends g{create(){return a(this,null,function*(){})}destroy(){return a(this,null,function*(){})}}}),Y=E();Y.removeAddListenerPolling=()=>null;const er=(n,e)=>{try{Y.removeAddListenerPolling&&Y.removeAddListenerPolling();const r=e.pollingId;(t=>a(this,null,function*(){return t&&(Y.removeAddListenerPolling=yield(o=>a(this,null,function*(){try{if(l.addListener){const s=yield l.addListener(Me,"nativeSendPolling",c=>o&&o(c));return s!=null&&s.remove?s.remove:()=>null}}catch(s){throw console.error("addListenerPollingHandle error",s),s}}))(t))}))(t=>{(t==null?void 0:t.pollingId)===r&&(t!=null&&t.pollingId)&&n.pollingList.forEach(o=>{o!=null&&o.pollingId&&(t==null?void 0:t.pollingId)===(o==null?void 0:o.pollingId)&&typeof(o==null?void 0:o.callBack)=="function"&&o.callBack(t)})})}catch(r){throw console.error("pollingFn error",r),r}};class rr{constructor(){P(this,"pollingList");this.pollingList=[]}create(e){var r,t,o;try{(r=e==null?void 0:e.pollingParams)!=null&&r.pollingId&&this.pollingList.push({pollingId:(t=e==null?void 0:e.pollingParams)==null?void 0:t.pollingId,callBack:e==null?void 0:e.callBack}),this.pollingList=this.pollingList.filter((c,i,w)=>i===w.findIndex(m=>m.pollingId===c.pollingId));const s=((o=e==null?void 0:e.pollingParams)==null?void 0:o.delay)/1e3;return Ne.create(xe(Te({},e==null?void 0:e.pollingParams),{delay:s})),((c,i)=>{try{const{mounted:w,pollingParams:m}=c;w(()=>er(i,m))}catch(w){throw console.error("createPolling error",w),w}})(e,this),()=>{var c,i;return(c=e==null?void 0:e.pollingParams)!=null&&c.pollingId?this.destroy({pollingId:(i=e==null?void 0:e.pollingParams)==null?void 0:i.pollingId}):null}}catch(s){throw console.error("pollingPlugin create error",s),s}}destroy(e){var r;try{const t=this.pollingList.map(o=>o.pollingId).indexOf(e.pollingId);return(r=this.pollingList)!=null&&r.length&&(Number(t)||Number(t)>=0)&&this.pollingList.splice(Number(t),1),Ne.destroy(e)}catch(t){throw console.error("pollingPlugin destroy error",t),t}}}const tr=l.registerPlugin("PaymentPlugin",{web:new class extends g{process(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("process error",e),e}})}}});class nr{process(e){return a(this,null,function*(){try{return yield tr.process(e)}catch(r){throw console.error("clickStreamPlugin, trace error",r),r}})}}class Be{constructor(){P(this,"initialContextPlugins",new $e);P(this,"communicatePlugins",new Ve);P(this,"cameraScanPlugins",new qe);P(this,"cameraScanMultiplePlugins",new Ke);P(this,"cameraScanMultipleNoCountPlugins",new ze);P(this,"cameraScanSingleOrDualPlugins",new Ge);P(this,"laserScanPlugins",new Je);P(this,"countAssistPlugins",new Qe);P(this,"clickStreamPlugins",new Xe);P(this,"lifecyclePlugins",new Ye);P(this,"deviceInteractionPlugins",new Ze);P(this,"pollingPlugins",new rr);P(this,"paymentPlugins",new nr)}}const or=new Be,ar=Object.freeze(Object.defineProperty({__proto__:null,PluginsWeb:class extends g{homeIsClick(){return a(this,null,function*(){})}openMiniApp(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("openMiniApp error",e),e}})}showTitle(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("showTitle error",e),e}})}showFABMenu(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("showFABMenu error",e),e}})}disableFAB(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("disableFAB error",e),e}})}disableBack(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("disableBack error",e),e}})}showSubMask(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("showSubMask error",e),e}})}setMiniAppVersion(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("setMiniAppVersion error",e),e}})}showDialog(){return a(this,null,function*(){})}cancelDialog(){return a(this,null,function*(){})}getMiniAppKong(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("getMiniAppKong error",e),e}})}}},Symbol.toStringTag,{value:"Module"}));y.NativeApi=Be,y.default=or,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(y,h){typeof exports=="object"&&typeof module!="undefined"?h(exports):typeof define=="function"&&define.amd?define(["exports"],h):h((y=typeof globalThis!="undefined"?globalThis:y||self).main={})})(this,function(y){"use strict";var dr=Object.defineProperty,ur=Object.defineProperties;var hr=Object.getOwnPropertyDescriptors;var xe=Object.getOwnPropertySymbols;var mr=Object.prototype.hasOwnProperty,wr=Object.prototype.propertyIsEnumerable;var de=(y,h,p)=>h in y?dr(y,h,{enumerable:!0,configurable:!0,writable:!0,value:p}):y[h]=p,_e=(y,h)=>{for(var p in h||(h={}))mr.call(h,p)&&de(y,p,h[p]);if(xe)for(var p of xe(h))wr.call(h,p)&&de(y,p,h[p]);return y},je=(y,h)=>ur(y,hr(h));var P=(y,h,p)=>(de(y,typeof h!="symbol"?h+"":h,p),p);var a=(y,h,p)=>new Promise((E,j)=>{var re=L=>{try{l(p.next(L))}catch(g){j(g)}},te=L=>{try{l(p.throw(L))}catch(g){j(g)}},l=L=>L.done?E(L.value):Promise.resolve(L.value).then(re,te);l((p=p.apply(y,h)).next())});/*! Capacitor: https://capacitorjs.com/ - MIT License */const h=n=>n.CapacitorPlatforms=(e=>{const r=new Map;r.set("web",{name:"web"});const t=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:r};return t.addPlatform=(o,s)=>{t.platforms.set(o,s)},t.setPlatform=o=>{t.platforms.has(o)&&(t.currentPlatform=t.platforms.get(o))},t})(n),p=h(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});var E;p.addPlatform,p.setPlatform,function(n){n.Unimplemented="UNIMPLEMENTED",n.Unavailable="UNAVAILABLE"}(E||(E={}));class j extends Error{constructor(e,r,t){super(e),this.message=e,this.code=r,this.data=t}}const re=n=>{var e,r,t,o,s;const c=n.CapacitorCustomPlatform||null,i=n.Capacitor||{},w=i.Plugins=i.Plugins||{},m=n.CapacitorPlatforms,C=((e=m==null?void 0:m.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||(()=>c!==null?c.name:(d=>{var u,v;return d!=null&&d.androidBridge?"android":!((v=(u=d==null?void 0:d.webkit)===null||u===void 0?void 0:u.messageHandlers)===null||v===void 0)&&v.bridge?"ios":"web"})(n)),S=((r=m==null?void 0:m.currentPlatform)===null||r===void 0?void 0:r.isNativePlatform)||(()=>C()!=="web"),b=((t=m==null?void 0:m.currentPlatform)===null||t===void 0?void 0:t.isPluginAvailable)||(d=>{const u=k.get(d);return!!(u!=null&&u.platforms.has(C()))||!!R(d)}),R=((o=m==null?void 0:m.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||(d=>{var u;return(u=i.PluginHeaders)===null||u===void 0?void 0:u.find(v=>v.name===d)}),k=new Map,A=((s=m==null?void 0:m.currentPlatform)===null||s===void 0?void 0:s.registerPlugin)||((d,u={})=>{const v=k.get(d);if(v)return console.warn(`Capacitor plugin "${d}" already registered. Cannot register plugins twice.`),v.proxy;const M=C(),W=R(d);let _;const se=O=>{let I;const D=(...ee)=>{const V=(()=>a(this,null,function*(){return!_&&M in u?_=_=typeof u[M]=="function"?yield u[M]():u[M]:c!==null&&!_&&"web"in u&&(_=_=typeof u.web=="function"?yield u.web():u.web),_}))().then(q=>{const Ue=((N,z)=>{var ce,le;if(!W){if(N)return(le=N[z])===null||le===void 0?void 0:le.bind(N);throw new j(`"${d}" plugin is not implemented on ${M}`,E.Unimplemented)}{const Te=W==null?void 0:W.methods.find(K=>z===K.name);if(Te)return Te.rtype==="promise"?K=>i.nativePromise(d,z.toString(),K):(K,lr)=>i.nativeCallback(d,z.toString(),K,lr);if(N)return(ce=N[z])===null||ce===void 0?void 0:ce.bind(N)}})(q,O);if(Ue){const N=Ue(...ee);return I=N==null?void 0:N.remove,N}throw new j(`"${d}.${O}()" is not implemented on ${M}`,E.Unimplemented)});return O==="addListener"&&(V.remove=()=>a(this,null,function*(){return I()})),V};return D.toString=()=>`${O.toString()}() { [capacitor code] }`,Object.defineProperty(D,"name",{value:O,writable:!1,configurable:!1}),D},Ie=se("addListener"),He=se("removeListener"),cr=(O,I)=>{const D=Ie({eventName:O},I),ee=()=>a(this,null,function*(){const q=yield D;He({eventName:O,callbackId:q},I)}),V=new Promise(q=>D.then(()=>q({remove:ee})));return V.remove=()=>a(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield ee()}),V},ie=new Proxy({},{get(O,I){switch(I){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return W?cr:Ie;case"removeListener":return He;default:return se(I)}}});return w[d]=ie,k.set(d,{name:d,proxy:ie,platforms:new Set([...Object.keys(u),...W?[M]:[]])}),ie});return i.convertFileSrc||(i.convertFileSrc=d=>d),i.getPlatform=C,i.handleError=d=>n.console.error(d),i.isNativePlatform=S,i.isPluginAvailable=b,i.pluginMethodNoop=(d,u,v)=>Promise.reject(`${v} does not have an implementation of "${u}".`),i.registerPlugin=A,i.Exception=j,i.DEBUG=!!i.DEBUG,i.isLoggingEnabled=!!i.isLoggingEnabled,i.platform=i.getPlatform(),i.isNative=i.isNativePlatform(),i},te=n=>n.Capacitor=re(n),l=te(typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}),L=l.registerPlugin;l.Plugins;class g{constructor(e){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)}addListener(e,r){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(r);const t=this.windowListeners[e];t&&!t.registered&&this.addWindowListener(t);const o=()=>a(this,null,function*(){return this.removeListener(e,r)}),s=Promise.resolve({remove:o});return Object.defineProperty(s,"remove",{value:()=>a(this,null,function*(){console.warn("Using addListener() without 'await' is deprecated."),yield o()})}),s}removeAllListeners(){return a(this,null,function*(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}})}notifyListeners(e,r){const t=this.listeners[e];t&&t.forEach(o=>o(r))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,r){this.windowListeners[r]={registered:!1,windowEventName:e,pluginEventName:r,handler:t=>{this.notifyListeners(r,t)}}}unimplemented(e="not implemented"){return new l.Exception(e,E.Unimplemented)}unavailable(e="not available"){return new l.Exception(e,E.Unavailable)}removeListener(e,r){return a(this,null,function*(){const t=this.listeners[e];if(!t)return;const o=t.indexOf(r);this.listeners[e].splice(o,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])})}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const ue=n=>encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),he=n=>n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Fe extends g{getCookies(){return a(this,null,function*(){const e=document.cookie,r={};return e.split(";").forEach(t=>{if(t.length<=0)return;let[o,s]=t.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=he(o).trim(),s=he(s).trim(),r[o]=s}),r})}setCookie(e){return a(this,null,function*(){try{const r=ue(e.key),t=ue(e.value),o=`; expires=${(e.expires||"").replace("expires=","")}`,s=(e.path||"/").replace("path=",""),c=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${r}=${t||""}${o}; path=${s}; ${c};`}catch(r){return Promise.reject(r)}})}deleteCookie(e){return a(this,null,function*(){try{document.cookie=`${e.key}=; Max-Age=0`}catch(r){return Promise.reject(r)}})}clearCookies(){return a(this,null,function*(){try{const e=document.cookie.split(";")||[];for(const r of e)document.cookie=r.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}})}clearAllCookies(){return a(this,null,function*(){try{yield this.clearCookies()}catch(e){return Promise.reject(e)}})}}L("CapacitorCookies",{web:()=>new Fe});const Re=(n,e={})=>{const r=Object.assign({method:n.method||"GET",headers:n.headers},e),t=((o={})=>{const s=Object.keys(o);return Object.keys(o).map(c=>c.toLocaleLowerCase()).reduce((c,i,w)=>(c[i]=o[s[w]],c),{})})(n.headers)["content-type"]||"";if(typeof n.data=="string")r.body=n.data;else if(t.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[s,c]of Object.entries(n.data||{}))o.set(s,c);r.body=o.toString()}else if(t.includes("multipart/form-data")){const o=new FormData;if(n.data instanceof FormData)n.data.forEach((c,i)=>{o.append(i,c)});else for(const c of Object.keys(n.data))o.append(c,n.data[c]);r.body=o;const s=new Headers(r.headers);s.delete("content-type"),r.headers=s}else(t.includes("application/json")||typeof n.data=="object")&&(r.body=JSON.stringify(n.data));return r};class De extends g{request(e){return a(this,null,function*(){const r=Re(e,e.webFetchExtra),t=((S,b=!0)=>S?Object.entries(S).reduce((R,k)=>{const[A,d]=k;let u,v;return Array.isArray(d)?(v="",d.forEach(M=>{u=b?encodeURIComponent(M):M,v+=`${A}=${u}&`}),v.slice(0,-1)):(u=b?encodeURIComponent(d):d,v=`${A}=${u}`),`${R}&${v}`},"").substr(1):null)(e.params,e.shouldEncodeUrlParams),o=t?`${e.url}?${t}`:e.url,s=yield fetch(o,r),c=s.headers.get("content-type")||"";let i,w,{responseType:m="text"}=s.ok?e:{};switch(c.includes("application/json")&&(m="json"),m){case"arraybuffer":case"blob":w=yield s.blob(),i=yield(S=>a(this,null,function*(){return new Promise((b,R)=>{const k=new FileReader;k.onload=()=>{const A=k.result;b(A.indexOf(",")>=0?A.split(",")[1]:A)},k.onerror=A=>R(A),k.readAsDataURL(S)})}))(w);break;case"json":i=yield s.json();break;default:i=yield s.text()}const C={};return s.headers.forEach((S,b)=>{C[b]=S}),{data:i,headers:C,status:s.status,url:s.url}})}get(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))})}post(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))})}put(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))})}patch(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))})}delete(e){return a(this,null,function*(){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))})}}function ne(){return l.getPlatform()==="android"?JSON.parse(AndroidInitialContext.initialContext()):window.portalInitialContext}L("CapacitorHttp",{web:()=>new De}),L("Portals",{web:()=>Promise.resolve().then(function(){return $e}).then(n=>new n.PortalsWeb)});const $e=Object.freeze({__proto__:null,PortalsWeb:class extends g{publishNative(n){return a(this,null,function*(){})}}}),J=n=>{var e,r,t;try{if(typeof window=="undefined")return;if(ne&&((e=ne())!=null&&e.value)){const o=(t=(r=ne())==null?void 0:r.value)!=null?t:null;if(!o)return void console.error("native initialContext is undefine");if(!n)return void console.error("initialContext call back is undefine");n(o)}}catch(o){throw console.error("getInitialContextHandle error",o),o}};class We{isNative(){try{return(()=>{try{let e=!1;return J(r=>{e=!!(r!=null&&r.isNative)}),e}catch(e){throw console.error("isNative error",e),e}})()}catch(e){throw console.error("isNative error",e),e}}redirectPage(e){try{(({callBack:r})=>{J(t=>{var o;try{if(!(t!=null&&t.params))return void console.info("initial context native params is undefine");const s=(o=t==null?void 0:t.params)!=null?o:null;if(!s)return;if(!r)return void console.error("initial context call back is undefine");r(s)}catch(s){throw console.error("redirectPageHandle error",s),s}})})(e)}catch(r){throw console.error("redirectPage error",r),r}}getNativeInfo(e){try{return this.isNative()?(()=>{try{let r=null;return J(t=>{r=t!=null?t:null}),r}catch(r){throw console.error("getNativeInfoHandle error",r),r}})():(r=>{var t;return(t=r==null?void 0:r.mockData)!=null?t:null})(e)}catch(r){throw console.error("getNativeInfo error",r),r}}}const B=()=>{try{let n={};return typeof window!="undefined"&&(n=window),n}catch(n){throw console.error("isWinHandle error",n),n}},F="CommunicatePlugin",f=l.registerPlugin(F,{web:()=>Promise.resolve().then(()=>ir).then(n=>new n.PluginsWeb)}),G=B();G.removeAddListenerFab=()=>null;const Ve=n=>{var e,r;try{G.removeAddListenerFab&&G.removeAddListenerFab();const t=[];if((e=f.showFABMenu)==null||e.call(f,{fabMenu:t}),!n||!((r=Object.keys(n))!=null&&r.length))return;Object.keys(n).forEach(o=>{var s,c,i,w,m,C,S,b;t.push({disable:(c=(s=n==null?void 0:n[o])==null?void 0:s.disable)!=null?c:!1,icon:(w=(i=n==null?void 0:n[o])==null?void 0:i.icon)!=null?w:"",id:(C=(m=n==null?void 0:n[o])==null?void 0:m.id)!=null?C:"",name:(b=(S=n==null?void 0:n[o])==null?void 0:S.title)!=null?b:""})}),queueMicrotask(()=>{var o;(o=f.showFABMenu)==null||o.call(f,{fabMenu:t})}),setTimeout(()=>{(o=>a(this,null,function*(){o&&(G.removeAddListenerFab=yield(s=>a(this,null,function*(){try{if(l.addListener){const c=yield l.addListener(F,"nativeSendFab",i=>s&&s(i));return c!=null&&c.remove?c.remove:()=>null}}catch(c){throw console.error("addListenerFabHandle error",c),c}}))(o))}))(o=>{let s;o!=null&&o.disable||o!=null&&o.id&&(Object.keys(n).forEach(c=>{var i,w,m;(i=n==null?void 0:n[c])!=null&&i.id&&o.id===n[c].id&&(s=(m=(w=n[c])==null?void 0:w.fn)!=null?m:()=>null)}),typeof s=="function"&&s())})})}catch(t){throw console.error("fabBtnHandle error",t),t}},H=B();H.addListenerBackRemoveHandle=()=>null;const me=(n=()=>null)=>a(this,null,function*(){try{H!=null&&H.addListenerBackRemoveHandle&&typeof H.addListenerBackRemoveHandle=="function"&&H.addListenerBackRemoveHandle(),H.addListenerBackRemoveHandle=yield(e=>a(this,null,function*(){try{if(l.addListener){const r=yield l.addListener(F,"nativeSendBack",t=>e&&e(t));return r!=null&&r.remove?r.remove:()=>null}}catch(r){throw console.error("addListenerBackHandle error",r),r}}))(n)}catch(e){throw console.error("initBackBtnFn error",e),e}}),Q=B();Q.addListenerHomeHandle=()=>null;const qe=n=>{try{Q.addListenerHomeHandle&&Q.addListenerHomeHandle(),setTimeout(()=>{(e=>a(this,null,function*(){e&&(Q.addListenerHomeHandle=yield(r=>a(this,null,function*(){try{if(l.addListener){const t=yield l.addListener(F,"nativeSendHome",o=>r&&r(o));return t!=null&&t.remove?t.remove:()=>null}}catch(t){throw console.error("addListenerHomeHandle error",t),t}}))(e))}))(n)})}catch(e){throw console.error("homeFn error",e),e}},U=B();U.addListenerTouchRemoveHandle=()=>null;const we=(n=()=>null)=>a(this,null,function*(){try{U!=null&&U.addListenerTouchRemoveHandle&&typeof U.addListenerTouchRemoveHandle=="function"&&U.addListenerTouchRemoveHandle(),U.addListenerTouchRemoveHandle=yield(e=>a(this,null,function*(){try{if(l.addListener){const r=yield l.addListener(F,"nativeTouchListener",t=>e&&e(t));return r!=null&&r.remove?r.remove:()=>null}}catch(r){throw console.error("addListenerTouchHandle error",r),r}}))(n)}catch(e){throw console.error("initTouchFn error",e),e}}),T=B();T.addListenerSendDeepLinkRemoveHandle=()=>null;const pe=(n=()=>null)=>a(this,null,function*(){try{T!=null&&T.addListenerSendDeepLinkRemoveHandle&&typeof T.addListenerSendDeepLinkRemoveHandle=="function"&&T.addListenerSendDeepLinkRemoveHandle(),T.addListenerSendDeepLinkRemoveHandle=yield(e=>a(this,null,function*(){try{if(l.addListener){const r=yield l.addListener(F,"nativeSendDeeplinkCallbackListener",t=>e&&e(t));return r!=null&&r.remove?r.remove:()=>null}}catch(r){throw console.error("addListenerSendDeepLinkHandle error",r),r}}))(n)}catch(e){throw console.error("initTouchFn error",e),e}});class ze{constructor(){this.homeBtnSwitch({isClick:!0})}homeBtnSwitch(e){return a(this,null,function*(){var r;try{return yield(r=f.homeIsClick)==null?void 0:r.call(f,e)}catch(t){throw console.error("homeBtnSwitch error",t),t}})}setBackBtn(e){try{(r=>{try{const{mounted:t,beforeUnmount:o,callBack:s}=r;t(()=>{me(s)}),o(()=>{me()})}catch(t){throw console.error("backBtnHandle error",t),t}})(e)}catch(r){throw console.error("setBackBtn error",r),r}}setHomeBtn(e){try{qe(e)}catch(r){throw console.error("setHomeBtn error",r),r}}setFabBtn(e){try{Ve(e)}catch(r){throw console.error("setFabBtn error",r),r}}touchListener(e){try{(r=>{try{const{mounted:t,beforeUnmount:o,callBack:s}=r;t(()=>{we(s)}),o(()=>{we()})}catch(t){throw console.error("touchListenerHandle error",t),t}})(e)}catch(r){throw console.error("listenerTouch error",r),r}}disableFAB(e){return a(this,null,function*(){try{return yield f.disableFAB(e)}catch(r){throw console.error("disableFAB error",r),r}})}disableBack(e){return a(this,null,function*(){try{return yield f.disableBack(e)}catch(r){throw console.error("disableBack error",r),r}})}openMiniApp(e){return a(this,null,function*(){try{return yield f.openMiniApp(e)}catch(r){throw console.error("openMiniApp error",r),r}})}showTitle(e){return a(this,null,function*(){try{return yield f.showTitle(e)}catch(r){throw console.error("showTitle error",r),r}})}showSubMask(e){return a(this,null,function*(){try{return yield f.showSubMask(e)}catch(r){throw console.error("showSubMask error",r),r}})}setMiniAppVersion(e){return a(this,null,function*(){try{return yield f.setMiniAppVersion(e)}catch(r){throw console.error("setMiniAppVersion error",r),r}})}showNativeLoading(){return a(this,null,function*(){try{return yield f.showDialog()}catch(e){throw console.error("showNativeLoading error",e),e}})}cancelNativeLoading(){return a(this,null,function*(){try{return yield f.cancelDialog()}catch(e){throw console.error("cancelNativeLoading error",e),e}})}getMiniAppKong(e){return a(this,null,function*(){try{return yield f.getMiniAppKong(e)}catch(r){throw console.error("getMiniAppKong error",r),r}})}getDeeplinkParams(e){try{(r=>{try{const{mounted:t,beforeUnmount:o,callBack:s}=r;t(()=>{pe(s)}),o(()=>{pe()})}catch(t){throw console.error("sendDeepLinkListenerHandle error",t),t}})(e)}catch(r){throw console.error("getDeeplinkParams error",r),r}}}const ye=l.registerPlugin("CameraScanPlugin",{web:new class extends g{pickCameraScan(n){return a(this,null,function*(){return new Promise(e=>{e(n)})})}setCameraScanState(){return a(this,null,function*(){})}}});window.removeAddListenerCameraScan=()=>null;class Ke{pickCameraScan(e){return a(this,null,function*(){try{return yield ye.pickCameraScan(e)}catch(r){throw console.error("pickCameraScan error",r),r}})}setCameraScanState(e){return a(this,null,function*(){try{return yield ye.setCameraScanState(e)}catch(r){throw console.error("setCameraScanState error",r),r}})}}const ge=l.registerPlugin("CameraScanMultiplePlugin",{web:new class extends g{pickCameraScanMultiple(){return a(this,null,function*(){})}setCameraScanMultipleState(){return a(this,null,function*(){})}}});class Je{pickCameraScanMultiple(e){return a(this,null,function*(){try{return yield ge.pickCameraScanMultiple(e)}catch(r){throw console.error("pickCameraScanMultiple error",r),r}})}setCameraScanMultipleState(e){return a(this,null,function*(){try{return yield ge.setCameraScanMultipleState(e)}catch(r){throw console.error("setCameraScanMultipleState error",r),r}})}}const fe=l.registerPlugin("CameraScanMultipleNoCountPlugin",{web:new class extends g{pickCameraScanMultipleNoCount(){return a(this,null,function*(){})}setCameraScanMultipleNoCountState(){return a(this,null,function*(){})}}});class Ge{pickCameraScanMultipleNoCount(e){return a(this,null,function*(){try{return yield fe.pickCameraScanMultipleNoCount(e)}catch(r){throw console.error("pickCameraScanMultipleNoCount error",r),r}})}setCameraScanMultipleNoCountState(e){return a(this,null,function*(){try{return yield fe.setCameraScanMultipleNoCountState(e)}catch(r){throw console.error("setCameraScanMultipleNoCountState error",r),r}})}}const ve=l.registerPlugin("CameraScanSingleOrDualPlugin",{web:new class extends g{pickCameraScanSingleOrDual(){return a(this,null,function*(){})}setCameraScanSingleOrDualState(){return a(this,null,function*(){})}}});class Qe{pickCameraScanSingleOrDual(e){return a(this,null,function*(){try{return yield ve.pickCameraScanSingleOrDual(e)}catch(r){throw console.error("pickCameraScanSingleOrDual error",r),r}})}setCameraScanSingleOrDualState(e){return a(this,null,function*(){try{return yield ve.setCameraScanSingleOrDualState(e)}catch(r){throw console.error("setCameraScanSingleOrDualState error",r),r}})}}const Pe="LaserScanPlugin",oe=l.registerPlugin(Pe,{web:new class extends g{pickLaserScan(){return a(this,null,function*(){})}unPickLaserScan(){return a(this,null,function*(){})}setLaserState(){return a(this,null,function*(){})}}}),X=B();X.removeAddListenerLaserScan=()=>null;const Le=(n=()=>null)=>{try{X.removeAddListenerLaserScan&&X.removeAddListenerLaserScan();const e=r=>a(this,null,function*(){r&&(X.removeAddListenerLaserScan=yield(t=>a(this,null,function*(){try{if(l.addListener){const o=yield l.addListener(Pe,"nativeSendLaser",s=>t&&t(s));return o!=null&&o.remove?o.remove:()=>null}}catch(o){throw console.error("addListenerLaserHandle error",o),o}}))(r))});setTimeout(()=>{e(n)})}catch(e){throw console.error("laserScanFn error",e),e}};class Xe{constructor(){this.pickLaserScan()}pickLaserScan(){return a(this,null,function*(){try{return yield oe.pickLaserScan({isContinue:!1})}catch(e){throw console.error("pickLaserScan error",e),e}})}unPickLaserScan(){return a(this,null,function*(){try{return yield oe.unPickLaserScan()}catch(e){throw console.error("unPickLaserScan error",e),e}})}setLaserState(e){try{oe.setLaserState(e)}catch(r){throw console.error("setLaserState error",r),r}}setLaserScan(e){(r=>{try{const{mounted:t,beforeUnmount:o,callBack:s}=r;t(()=>{Le(s)}),o(()=>{Le()})}catch(t){throw console.error("laserScanApiParams error",t),t}})(e)}}const Se="CountAssistPlugin",ae=l.registerPlugin(Se,{web:new class extends g{setCountAssistState(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("setCountAssistState error",e),e}})}toggleCountAssist(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("hideCountAssist error",e),e}})}getCountAssistToggleState(){return a(this,null,function*(){try{return new Promise(n=>{n(void 0)})}catch(n){throw console.error("getCountAssistToggleState error",n),n}})}}}),x=B();x.addListenerCountAssistRemoveHandle=()=>null;const be=(n=()=>null)=>a(this,null,function*(){try{x!=null&&x.addListenerCountAssistRemoveHandle&&typeof x.addListenerCountAssistRemoveHandle=="function"&&x.addListenerCountAssistRemoveHandle(),x.addListenerCountAssistRemoveHandle=yield(e=>a(this,null,function*(){try{if(l.addListener){const r=yield l.addListener(Se,"nativeSendCountAssist",t=>e&&e(t));return r!=null&&r.remove?r.remove:()=>null}}catch(r){throw console.error("addListenerCountAssistHandle error",r),r}}))(n)}catch(e){throw console.error("initCountAssistFn error",e),e}});class Ye{setCountAssistState(e){return a(this,null,function*(){return yield ae.setCountAssistState(e)})}getCountAssistState(e){return(r=>{try{let t=r!=null?r:!1;return J(o=>{t=!!(o!=null&&o.countAssistState)}),t}catch(t){throw console.error("getCountAssistStateHandle error",t),t}})(e)}setCountAssistBtn(e){(r=>{try{const{mounted:t,beforeUnmount:o,callBack:s}=r;t(()=>{be(s)}),o(()=>{be()})}catch(t){throw console.error("setCountAssistBtnHandle error",t),t}})(e)}toggleCountAssist(e){return a(this,null,function*(){return yield ae.toggleCountAssist(e)})}getCountAssistToggleState(){return a(this,null,function*(){return yield ae.getCountAssistToggleState()})}}const Ce=l.registerPlugin("ClickStreamPlugin",{web:new class extends g{init(){return a(this,null,function*(){return new Promise(n=>{n(null)})})}trace(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("clickStreamTraceParams error",e),e}})}}});class Ze{constructor(){this.init()}init(){return a(this,null,function*(){try{return yield Ce.init()}catch(e){throw console.error("clickStreamPlugin, init error",e),e}})}trace(e){return a(this,null,function*(){try{return yield Ce.trace(e)}catch(r){throw console.error("clickStreamPlugin, trace error",r),r}})}}const ke="MiniAppLifecyclePlugin";var $=(n=>(n.MINI_APP_BEFORE_UNMOUNT_PERMISSION="mini_app_before_unmount_permission",n.MINI_APP_BEFORE_UNMOUNT_COMPLETION="mini_app_before_unmount_completion",n))($||{});const Ae=l.registerPlugin(ke,{web:new class extends g{setNativeUsagePermission(){return a(this,null,function*(){})}authorizeWebCallback(){return a(this,null,function*(){})}}}),Y=B();Y.removeAddListenerLifecycleMiniAppBeforeUnmount=()=>null;const Me=(n=()=>null)=>{try{Y.removeAddListenerLifecycleMiniAppBeforeUnmount&&Y.removeAddListenerLifecycleMiniAppBeforeUnmount();const e=r=>a(this,null,function*(){r&&(Y.removeAddListenerLifecycleMiniAppBeforeUnmount=yield(t=>a(this,null,function*(){try{if(l.addListener){const o=yield l.addListener(ke,"miniAppBeforeUnmount",s=>t&&t(s));return o!=null&&o.remove?o.remove:()=>null}}catch(o){throw console.error("miniAppBeforeUnmountHandle error",o),o}}))(r))});setTimeout(()=>a(this,null,function*(){yield e(n)}))}catch(e){throw console.error("laserScanFn error",e),e}};class er{constructor(){}setNativeUsagePermission(e){return a(this,null,function*(){try{return yield Ae.setNativeUsagePermission(e)}catch(r){throw console.error("lifecyclePlugin.setNativeUsagePermission error",r),r}})}authorizeWebCallback(e){return a(this,null,function*(){try{return yield Ae.authorizeWebCallback(e)}catch(r){throw console.error("lifecyclePlugin.authorizeWebCallback error",r),r}})}miniAppBeforeUnmount(e){this.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!0}),((r,t)=>{try{const{mounted:o,beforeUnmount:s,callBack:c}=r;o(()=>{Me(i=>a(this,null,function*(){var w;if(c&&c instanceof Function)try{(w=c(i))==null||w.then(()=>a(this,null,function*(){yield t.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!1}),yield t.authorizeWebCallback({action:$.MINI_APP_BEFORE_UNMOUNT_COMPLETION})}))}catch(m){console.error("miniAppBeforeUnmount error callBack is not a function or promise")}else console.error("miniAppBeforeUnmount error callBack is not a function or promise")}))}),s(()=>a(this,null,function*(){Me(),t.setNativeUsagePermission({action:$.MINI_APP_BEFORE_UNMOUNT_PERMISSION,value:!1})}))}catch(o){throw console.error("miniAppBeforeUnmount error",o),o}})(e,this)}}const Ne=l.registerPlugin("DeviceInteractionPlugin",{web:new class extends g{callVibrate(){return a(this,null,function*(){})}callErrorBeep(){return a(this,null,function*(){})}}});class rr{callVibrate(){return a(this,null,function*(){try{return yield Ne.callVibrate()}catch(e){throw console.error("callVibrate error",e),e}})}callErrorBeep(){return a(this,null,function*(){try{return yield Ne.callErrorBeep()}catch(e){throw console.error("callErrorBeep error",e),e}})}}const Be="PollingPlugin",Oe=l.registerPlugin(Be,{web:new class extends g{create(){return a(this,null,function*(){})}destroy(){return a(this,null,function*(){})}}}),Z=B();Z.removeAddListenerPolling=()=>null;const tr=(n,e)=>{try{Z.removeAddListenerPolling&&Z.removeAddListenerPolling();const r=e.pollingId;(t=>a(this,null,function*(){return t&&(Z.removeAddListenerPolling=yield(o=>a(this,null,function*(){try{if(l.addListener){const s=yield l.addListener(Be,"nativeSendPolling",c=>o&&o(c));return s!=null&&s.remove?s.remove:()=>null}}catch(s){throw console.error("addListenerPollingHandle error",s),s}}))(t))}))(t=>{(t==null?void 0:t.pollingId)===r&&(t!=null&&t.pollingId)&&n.pollingList.forEach(o=>{o!=null&&o.pollingId&&(t==null?void 0:t.pollingId)===(o==null?void 0:o.pollingId)&&typeof(o==null?void 0:o.callBack)=="function"&&o.callBack(t)})})}catch(r){throw console.error("pollingFn error",r),r}};class nr{constructor(){P(this,"pollingList");this.pollingList=[]}create(e){var r,t,o;try{(r=e==null?void 0:e.pollingParams)!=null&&r.pollingId&&this.pollingList.push({pollingId:(t=e==null?void 0:e.pollingParams)==null?void 0:t.pollingId,callBack:e==null?void 0:e.callBack}),this.pollingList=this.pollingList.filter((c,i,w)=>i===w.findIndex(m=>m.pollingId===c.pollingId));const s=((o=e==null?void 0:e.pollingParams)==null?void 0:o.delay)/1e3;return Oe.create(je(_e({},e==null?void 0:e.pollingParams),{delay:s})),((c,i)=>{try{const{mounted:w,pollingParams:m}=c;w(()=>tr(i,m))}catch(w){throw console.error("createPolling error",w),w}})(e,this),()=>{var c,i;return(c=e==null?void 0:e.pollingParams)!=null&&c.pollingId?this.destroy({pollingId:(i=e==null?void 0:e.pollingParams)==null?void 0:i.pollingId}):null}}catch(s){throw console.error("pollingPlugin create error",s),s}}destroy(e){var r;try{const t=this.pollingList.map(o=>o.pollingId).indexOf(e.pollingId);return(r=this.pollingList)!=null&&r.length&&(Number(t)||Number(t)>=0)&&this.pollingList.splice(Number(t),1),Oe.destroy(e)}catch(t){throw console.error("pollingPlugin destroy error",t),t}}}const or=l.registerPlugin("PaymentPlugin",{web:new class extends g{process(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("process error",e),e}})}}});class ar{process(e){return a(this,null,function*(){try{return yield or.process(e)}catch(r){throw console.error("clickStreamPlugin, trace error",r),r}})}}class Ee{constructor(){P(this,"initialContextPlugins",new We);P(this,"communicatePlugins",new ze);P(this,"cameraScanPlugins",new Ke);P(this,"cameraScanMultiplePlugins",new Je);P(this,"cameraScanMultipleNoCountPlugins",new Ge);P(this,"cameraScanSingleOrDualPlugins",new Qe);P(this,"laserScanPlugins",new Xe);P(this,"countAssistPlugins",new Ye);P(this,"clickStreamPlugins",new Ze);P(this,"lifecyclePlugins",new er);P(this,"deviceInteractionPlugins",new rr);P(this,"pollingPlugins",new nr);P(this,"paymentPlugins",new ar)}}const sr=new Ee,ir=Object.freeze(Object.defineProperty({__proto__:null,PluginsWeb:class extends g{homeIsClick(){return a(this,null,function*(){})}openMiniApp(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("openMiniApp error",e),e}})}showTitle(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("showTitle error",e),e}})}showFABMenu(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("showFABMenu error",e),e}})}disableFAB(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("disableFAB error",e),e}})}disableBack(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("disableBack error",e),e}})}showSubMask(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("showSubMask error",e),e}})}setMiniAppVersion(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("setMiniAppVersion error",e),e}})}showDialog(){return a(this,null,function*(){})}cancelDialog(){return a(this,null,function*(){})}getMiniAppKong(n){return a(this,null,function*(){try{return new Promise(e=>{e(n)})}catch(e){throw console.error("getMiniAppKong error",e),e}})}}},Symbol.toStringTag,{value:"Module"}));y.NativeApi=Ee,y.default=sr,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "superapp-miniapp-invoke-native",
3
3
  "type": "module",
4
- "version": "1.9.2",
4
+ "version": "1.9.3",
5
5
  "description": "In Superapp, the encapsulation of calling Native interfaces by mini-programs.",
6
6
  "scripts": {
7
7
  "dev": "vite",