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