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