@vbotma/sdk 3.2.9 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.iife.js +3 -3
- package/dist/index.iife.js.map +1 -1
- package/dist/index.js +182 -182
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { throwifyFpFn as he, throwifyAnyEither as Ue, setStorageValue as bt, get
|
|
|
8
8
|
import { BetterPromise as Qe } from "better-promises";
|
|
9
9
|
import { toRGBFullFp as mt, isRGB as be, pipeQueryToSchema as wt, pipeJsonToSchema as Ft } from "@vbotma/transformers";
|
|
10
10
|
import { isAnyRGB as Co, isRGB as vo, isRGBA as ko, isRGBAShort as yo, isRGBShort as qo, parseInitDataQuery as Io, parseInitDataQueryFp as Eo, parseLaunchParamsQuery as Bo, parseLaunchParamsQueryFp as Ao, serializeInitDataQuery as xo, serializeLaunchParamsQuery as Mo, toRGB as Ro, toRGBFp as To, toRGBFull as Vo, toRGBFullFp as Lo } from "@vbotma/transformers";
|
|
11
|
-
import { either as m, function as
|
|
11
|
+
import { either as m, function as p, option as N, taskEither as u } from "fp-ts";
|
|
12
12
|
import { errorClass as G, errorClassWithData as Ie } from "error-kid";
|
|
13
13
|
import { parse as Oe, record as St, string as z, array as Ct, safeParse as Fe, looseObject as De, pipe as Ke, transform as ze, date as Ne, optional as vt, number as Je, integer as kt } from "valibot";
|
|
14
14
|
function P(n) {
|
|
@@ -38,8 +38,8 @@ class ie {
|
|
|
38
38
|
this.mount = () => {
|
|
39
39
|
if (this.isMounted())
|
|
40
40
|
return m.right(void 0);
|
|
41
|
-
const
|
|
42
|
-
return
|
|
41
|
+
const c = P(o) ? s() : void 0, a = c ? m.right(c) : typeof r == "function" ? r() : m.right(r);
|
|
42
|
+
return p.pipe(a, m.map((l) => {
|
|
43
43
|
ue(() => {
|
|
44
44
|
this._isMounted.set(!0), e == null || e(l);
|
|
45
45
|
});
|
|
@@ -102,7 +102,7 @@ function U(n, e) {
|
|
|
102
102
|
function h(n) {
|
|
103
103
|
return Object.assign(he(n), {
|
|
104
104
|
ifAvailable(...e) {
|
|
105
|
-
return
|
|
105
|
+
return p.pipe(
|
|
106
106
|
n.ifAvailable(...e),
|
|
107
107
|
N.match(
|
|
108
108
|
() => ({ ok: !1 }),
|
|
@@ -184,15 +184,15 @@ class Mt extends (/* @__PURE__ */ G(
|
|
|
184
184
|
)) {
|
|
185
185
|
}
|
|
186
186
|
function A(n, e) {
|
|
187
|
-
const s = S(() => P(e.version) || "100"), r = S(() => P(e.isVBma)), { requires: i, returns: o } = e,
|
|
187
|
+
const s = S(() => P(e.version) || "100"), r = S(() => P(e.isVBma)), { requires: i, returns: o } = e, c = i ? typeof i == "object" ? i : { every: [i] } : void 0, a = (g) => {
|
|
188
188
|
if (!e.supports)
|
|
189
189
|
return !0;
|
|
190
190
|
const w = e.supports[g];
|
|
191
191
|
return te(w.method, w.param, s());
|
|
192
192
|
}, l = () => {
|
|
193
|
-
if (!
|
|
193
|
+
if (!c)
|
|
194
194
|
return;
|
|
195
|
-
const [g, w] = "every" in
|
|
195
|
+
const [g, w] = "every" in c ? ["every", c.every] : ["some", c.some];
|
|
196
196
|
for (let _ = 0; _ < w.length; _++) {
|
|
197
197
|
const x = w[_], V = typeof x == "function" ? x() : te(x, s()) ? void 0 : `it is unsupported in Mini Apps version ${s()}`;
|
|
198
198
|
if (V && (g === "every" || _ === w.length - 1))
|
|
@@ -235,7 +235,7 @@ function A(n, e) {
|
|
|
235
235
|
return C() ? N.some(I(...g)) : N.none;
|
|
236
236
|
}
|
|
237
237
|
},
|
|
238
|
-
|
|
238
|
+
c ? { isSupported: F } : {},
|
|
239
239
|
e.supports ? { supports: a } : {}
|
|
240
240
|
);
|
|
241
241
|
}
|
|
@@ -249,7 +249,7 @@ class _e {
|
|
|
249
249
|
onClick: r,
|
|
250
250
|
offClick: i,
|
|
251
251
|
initialState: o,
|
|
252
|
-
isPageReload:
|
|
252
|
+
isPageReload: c,
|
|
253
253
|
postEvent: a,
|
|
254
254
|
payload: l,
|
|
255
255
|
method: f,
|
|
@@ -341,7 +341,7 @@ class _e {
|
|
|
341
341
|
}
|
|
342
342
|
}), k = new ie({
|
|
343
343
|
initialState: o,
|
|
344
|
-
isPageReload:
|
|
344
|
+
isPageReload: c,
|
|
345
345
|
onMounted: b.setState,
|
|
346
346
|
restoreState: s.get
|
|
347
347
|
}), C = { version: F, requires: f, isVBma: e }, q = E({
|
|
@@ -354,7 +354,7 @@ class _e {
|
|
|
354
354
|
});
|
|
355
355
|
this.isMounted = k.isMounted, this.isSupported = U(f, F), this.state = b.state, this.setStateFp = I((g) => {
|
|
356
356
|
const w = { ...this.state(), ...Se(g) };
|
|
357
|
-
return b.hasDiff(w) ?
|
|
357
|
+
return b.hasDiff(w) ? p.pipe(
|
|
358
358
|
a(f, l(w)),
|
|
359
359
|
m.map(() => {
|
|
360
360
|
b.setState(w);
|
|
@@ -363,7 +363,7 @@ class _e {
|
|
|
363
363
|
}), this.setState = /* @__PURE__ */ h(this.setStateFp), this.onClickFp = q(r), this.onClick = /* @__PURE__ */ h(this.onClickFp), this.offClickFp = q(i), this.offClick = /* @__PURE__ */ h(this.offClickFp), this.mountFp = q(() => {
|
|
364
364
|
const g = () => {
|
|
365
365
|
};
|
|
366
|
-
return
|
|
366
|
+
return p.pipe(k.mount(), m.match(g, g));
|
|
367
367
|
}), this.mount = /* @__PURE__ */ h(this.mountFp), this.unmount = k.unmount, this.stateSetters = (g) => {
|
|
368
368
|
const w = I((_) => this.setStateFp({ [g]: _ }));
|
|
369
369
|
return [/* @__PURE__ */ h(w), w];
|
|
@@ -513,7 +513,7 @@ const Ce = /* @__PURE__ */ oe("0.0"), y = se({ version: Ce });
|
|
|
513
513
|
// @__NO_SIDE_EFFECTS__
|
|
514
514
|
function Ae(n, e) {
|
|
515
515
|
return {
|
|
516
|
-
...
|
|
516
|
+
...p.pipe(
|
|
517
517
|
v(),
|
|
518
518
|
T,
|
|
519
519
|
y,
|
|
@@ -552,12 +552,12 @@ class xe {
|
|
|
552
552
|
* Unmounts the component.
|
|
553
553
|
*/
|
|
554
554
|
t(this, "unmount");
|
|
555
|
-
this.mount = (
|
|
555
|
+
this.mount = (c) => {
|
|
556
556
|
if (this._isMounted())
|
|
557
557
|
return u.right(void 0);
|
|
558
558
|
const a = P(o) ? r() : void 0;
|
|
559
|
-
return
|
|
560
|
-
a ? u.right(a) : e(
|
|
559
|
+
return p.pipe(
|
|
560
|
+
a ? u.right(a) : e(c),
|
|
561
561
|
u.map((l) => {
|
|
562
562
|
this._isMounted() || ue(() => {
|
|
563
563
|
this._isMounted.set(!0), s == null || s(l);
|
|
@@ -575,8 +575,8 @@ function je() {
|
|
|
575
575
|
return new It("Biometry is not available");
|
|
576
576
|
}
|
|
577
577
|
function ge(n) {
|
|
578
|
-
let e = !1, s = !1, r = "", i = !1, o = "",
|
|
579
|
-
return n.available && (e = !0, s = n.token_saved, r = n.device_id, i = n.access_requested, o = n.type,
|
|
578
|
+
let e = !1, s = !1, r = "", i = !1, o = "", c = !1;
|
|
579
|
+
return n.available && (e = !0, s = n.token_saved, r = n.device_id, i = n.access_requested, o = n.type, c = n.access_granted), { available: e, tokenSaved: s, deviceId: r, type: o, accessGranted: c, accessRequested: i };
|
|
580
580
|
}
|
|
581
581
|
class Pt {
|
|
582
582
|
constructor({
|
|
@@ -585,7 +585,7 @@ class Pt {
|
|
|
585
585
|
postEvent: r,
|
|
586
586
|
storage: i,
|
|
587
587
|
onInfoReceived: o,
|
|
588
|
-
offInfoReceived:
|
|
588
|
+
offInfoReceived: c,
|
|
589
589
|
isVBma: a,
|
|
590
590
|
isPageReload: l
|
|
591
591
|
}) {
|
|
@@ -690,7 +690,7 @@ class Pt {
|
|
|
690
690
|
onChange: i.set
|
|
691
691
|
}), b = new xe({
|
|
692
692
|
initialState(g) {
|
|
693
|
-
return
|
|
693
|
+
return p.pipe(
|
|
694
694
|
s("web_app_biometry_get_info", "biometry_info_received", g),
|
|
695
695
|
u.map(ge)
|
|
696
696
|
);
|
|
@@ -700,7 +700,7 @@ class Pt {
|
|
|
700
700
|
F.setState(g), o(f);
|
|
701
701
|
},
|
|
702
702
|
onUnmounted() {
|
|
703
|
-
|
|
703
|
+
c(f);
|
|
704
704
|
},
|
|
705
705
|
restoreState: i.get
|
|
706
706
|
}), k = { version: e, requires: "web_app_biometry_request_auth", isVBma: a }, C = E({
|
|
@@ -714,13 +714,13 @@ class Pt {
|
|
|
714
714
|
isMounted: b.isMounted,
|
|
715
715
|
returns: "task"
|
|
716
716
|
});
|
|
717
|
-
this.isAvailable = F.getter("available"), this.isMounted = b.isMounted, this.isSupported = U("web_app_biometry_request_auth", e), this.state = F.state, this.unmount = b.unmount, this.mountFp = q(b.mount), this.authenticateFp = I((g) => this.isAvailable() ?
|
|
717
|
+
this.isAvailable = F.getter("available"), this.isMounted = b.isMounted, this.isSupported = U("web_app_biometry_request_auth", e), this.state = F.state, this.unmount = b.unmount, this.mountFp = q(b.mount), this.authenticateFp = I((g) => this.isAvailable() ? p.pipe(
|
|
718
718
|
s("web_app_biometry_request_auth", "biometry_auth_requested", {
|
|
719
719
|
...g,
|
|
720
720
|
params: { reason: ((g || {}).reason || "").trim() }
|
|
721
721
|
}),
|
|
722
722
|
u.map((w) => (F.setState({ token: w.token }), w))
|
|
723
|
-
) : u.left(je())), this.openSettingsFp = C(() => r("web_app_biometry_open_settings")), this.requestAccessFp = I((g) =>
|
|
723
|
+
) : u.left(je())), this.openSettingsFp = C(() => r("web_app_biometry_open_settings")), this.requestAccessFp = I((g) => p.pipe(
|
|
724
724
|
s("web_app_biometry_request_access", "biometry_info_received", {
|
|
725
725
|
...g,
|
|
726
726
|
params: { reason: ((g || {}).reason || "").trim() }
|
|
@@ -731,7 +731,7 @@ class Pt {
|
|
|
731
731
|
})
|
|
732
732
|
)), this.updateTokenFp = I((g = {}) => {
|
|
733
733
|
var w;
|
|
734
|
-
return
|
|
734
|
+
return p.pipe(
|
|
735
735
|
s("web_app_biometry_update_token", "biometry_token_updated", {
|
|
736
736
|
...g,
|
|
737
737
|
params: { token: g.token || "", reason: (w = g.reason) == null ? void 0 : w.trim() }
|
|
@@ -750,7 +750,7 @@ const Ht = (n, e, s) => lt(n, e, {
|
|
|
750
750
|
}), fn = (...n) => Qe.fn(() => Ht(...n)()), gn = (...n) => Qe.fn(() => Xe(...n)()), L = se({ request: Xe });
|
|
751
751
|
function Ot() {
|
|
752
752
|
return new Pt({
|
|
753
|
-
...
|
|
753
|
+
...p.pipe(
|
|
754
754
|
v(),
|
|
755
755
|
T,
|
|
756
756
|
y,
|
|
@@ -809,7 +809,7 @@ class Dt {
|
|
|
809
809
|
onChange(b) {
|
|
810
810
|
s.set(b);
|
|
811
811
|
}
|
|
812
|
-
}),
|
|
812
|
+
}), c = new ie({
|
|
813
813
|
onMounted: o.setState,
|
|
814
814
|
restoreState: s.get,
|
|
815
815
|
initialState: { isConfirmationEnabled: !1 },
|
|
@@ -820,19 +820,19 @@ class Dt {
|
|
|
820
820
|
}), f = E({
|
|
821
821
|
...a,
|
|
822
822
|
returns: "either",
|
|
823
|
-
isMounted:
|
|
823
|
+
isMounted: c.isMounted
|
|
824
824
|
}), F = (b) => b === this.isConfirmationEnabled() ? m.right(void 0) : (o.setState({ isConfirmationEnabled: b }), e("web_app_setup_closing_behavior", {
|
|
825
825
|
need_confirmation: b
|
|
826
826
|
}));
|
|
827
|
-
this.isConfirmationEnabled = o.getter("isConfirmationEnabled"), this.isMounted =
|
|
827
|
+
this.isConfirmationEnabled = o.getter("isConfirmationEnabled"), this.isMounted = c.isMounted, this.disableConfirmationFp = f(() => F(!1)), this.enableConfirmationFp = f(() => F(!0)), this.mountFp = l(() => {
|
|
828
828
|
const b = () => {
|
|
829
829
|
};
|
|
830
|
-
return
|
|
831
|
-
}), this.unmount =
|
|
830
|
+
return p.pipe(c.mount(), m.match(b, b));
|
|
831
|
+
}), this.unmount = c.unmount, this.disableConfirmation = /* @__PURE__ */ h(this.disableConfirmationFp), this.enableConfirmation = /* @__PURE__ */ h(this.enableConfirmationFp), this.mount = /* @__PURE__ */ h(this.mountFp);
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
function jt() {
|
|
835
|
-
return new Dt(
|
|
835
|
+
return new Dt(p.pipe(
|
|
836
836
|
v(),
|
|
837
837
|
Z("closingBehavior"),
|
|
838
838
|
T
|
|
@@ -916,31 +916,31 @@ class Gt {
|
|
|
916
916
|
isVBma: s,
|
|
917
917
|
returns: "task"
|
|
918
918
|
});
|
|
919
|
-
this.isSupported = U("web_app_invoke_custom_method", e), this.deleteItemFp = i((o,
|
|
919
|
+
this.isSupported = U("web_app_invoke_custom_method", e), this.deleteItemFp = i((o, c) => {
|
|
920
920
|
const a = Array.isArray(o) ? o : [o];
|
|
921
|
-
return
|
|
922
|
-
a.length ? r("deleteStorageValues", { keys: a },
|
|
921
|
+
return p.pipe(
|
|
922
|
+
a.length ? r("deleteStorageValues", { keys: a }, c) : u.right(void 0),
|
|
923
923
|
u.map(() => {
|
|
924
924
|
})
|
|
925
925
|
);
|
|
926
|
-
}), this.getItemFp = i((o,
|
|
927
|
-
this.getItemsFp([o],
|
|
926
|
+
}), this.getItemFp = i((o, c) => p.pipe(
|
|
927
|
+
this.getItemsFp([o], c),
|
|
928
928
|
u.map((a) => a[o] || "")
|
|
929
|
-
)), this.getItemsFp = i((o,
|
|
930
|
-
o.length ? r("getStorageValues", { keys: o },
|
|
929
|
+
)), this.getItemsFp = i((o, c) => p.pipe(
|
|
930
|
+
o.length ? r("getStorageValues", { keys: o }, c) : u.right({}),
|
|
931
931
|
u.map((a) => ({
|
|
932
932
|
// Fulfill the response with probably missing keys.
|
|
933
933
|
...o.reduce((l, f) => (l[f] = "", l), {}),
|
|
934
934
|
...Oe(St(z(), z()), a)
|
|
935
935
|
}))
|
|
936
|
-
)), this.getKeysFp = i((o) =>
|
|
936
|
+
)), this.getKeysFp = i((o) => p.pipe(
|
|
937
937
|
r("getStorageKeys", {}, o),
|
|
938
|
-
u.map((
|
|
939
|
-
)), this.setItemFp = i((o,
|
|
940
|
-
r("saveStorageValue", { key: o, value:
|
|
938
|
+
u.map((c) => Oe(Ct(z()), c))
|
|
939
|
+
)), this.setItemFp = i((o, c, a) => p.pipe(
|
|
940
|
+
r("saveStorageValue", { key: o, value: c }, a),
|
|
941
941
|
u.map(() => {
|
|
942
942
|
})
|
|
943
|
-
)), this.clearFp = i((o) =>
|
|
943
|
+
)), this.clearFp = i((o) => p.pipe(this.getKeysFp(o), u.chain(this.deleteItemFp))), this.deleteItem = /* @__PURE__ */ h(this.deleteItemFp), this.getItem = /* @__PURE__ */ h(this.getItemFp), this.getItems = /* @__PURE__ */ h(this.getItemsFp), this.getKeys = /* @__PURE__ */ h(this.getKeysFp), this.setItem = /* @__PURE__ */ h(this.setItemFp), this.clear = /* @__PURE__ */ h(this.clearFp);
|
|
944
944
|
}
|
|
945
945
|
}
|
|
946
946
|
const me = /* @__PURE__ */ oe(0);
|
|
@@ -957,7 +957,7 @@ const Re = se({
|
|
|
957
957
|
invokeCustomMethod: Ut
|
|
958
958
|
});
|
|
959
959
|
function Wt() {
|
|
960
|
-
return new Gt(
|
|
960
|
+
return new Gt(p.pipe(
|
|
961
961
|
v(),
|
|
962
962
|
y,
|
|
963
963
|
Re
|
|
@@ -1007,9 +1007,9 @@ class Qt {
|
|
|
1007
1007
|
requires: "web_app_device_storage_get_key",
|
|
1008
1008
|
isVBma: e,
|
|
1009
1009
|
returns: "task"
|
|
1010
|
-
}),
|
|
1010
|
+
}), c = (a, l, f) => {
|
|
1011
1011
|
const F = i();
|
|
1012
|
-
return
|
|
1012
|
+
return p.pipe(
|
|
1013
1013
|
s(a, ["device_storage_failed", l], {
|
|
1014
1014
|
params: { ...f, req_id: F },
|
|
1015
1015
|
capture: ((b) => "payload" in b ? b.payload.req_id === F : !0)
|
|
@@ -1017,15 +1017,15 @@ class Qt {
|
|
|
1017
1017
|
u.chain((b) => b.event === "device_storage_failed" ? u.left(new yt(b.payload.error || "UNKNOWN_ERROR")) : u.right(b.payload))
|
|
1018
1018
|
);
|
|
1019
1019
|
};
|
|
1020
|
-
this.getItemFp = o((a) =>
|
|
1021
|
-
|
|
1020
|
+
this.getItemFp = o((a) => p.pipe(
|
|
1021
|
+
c("web_app_device_storage_get_key", "device_storage_key_received", { key: a }),
|
|
1022
1022
|
u.map((l) => l.value)
|
|
1023
|
-
)), this.setItemFp = o((a, l) =>
|
|
1024
|
-
|
|
1023
|
+
)), this.setItemFp = o((a, l) => p.pipe(
|
|
1024
|
+
c("web_app_device_storage_save_key", "device_storage_key_saved", { key: a, value: l }),
|
|
1025
1025
|
u.map(() => {
|
|
1026
1026
|
})
|
|
1027
|
-
)), this.deleteItemFp = o((a) => this.setItemFp(a, null)), this.clearFp = o(() =>
|
|
1028
|
-
|
|
1027
|
+
)), this.deleteItemFp = o((a) => this.setItemFp(a, null)), this.clearFp = o(() => p.pipe(
|
|
1028
|
+
c("web_app_device_storage_clear", "device_storage_cleared", {}),
|
|
1029
1029
|
u.map(() => {
|
|
1030
1030
|
})
|
|
1031
1031
|
)), this.getItem = /* @__PURE__ */ h(this.getItemFp), this.setItem = /* @__PURE__ */ h(this.setItemFp), this.deleteItem = /* @__PURE__ */ h(this.deleteItemFp), this.clear = /* @__PURE__ */ h(this.clearFp);
|
|
@@ -1033,7 +1033,7 @@ class Qt {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
const et = se({ createRequestId: Me });
|
|
1035
1035
|
function Kt() {
|
|
1036
|
-
return new Qt(
|
|
1036
|
+
return new Qt(p.pipe(
|
|
1037
1037
|
v(),
|
|
1038
1038
|
y,
|
|
1039
1039
|
L,
|
|
@@ -1042,14 +1042,14 @@ function Kt() {
|
|
|
1042
1042
|
}
|
|
1043
1043
|
const Sn = /* @__PURE__ */ Kt();
|
|
1044
1044
|
function zt({ request: n, ...e }) {
|
|
1045
|
-
return A((s) =>
|
|
1045
|
+
return A((s) => p.pipe(
|
|
1046
1046
|
n("web_app_request_emoji_status_access", "emoji_status_access_requested", s),
|
|
1047
1047
|
u.map((r) => r.status)
|
|
1048
1048
|
), { ...e, requires: "web_app_request_emoji_status_access", returns: "task" });
|
|
1049
1049
|
}
|
|
1050
1050
|
// @__NO_SIDE_EFFECTS__
|
|
1051
1051
|
function Nt() {
|
|
1052
|
-
return zt(
|
|
1052
|
+
return zt(p.pipe(
|
|
1053
1053
|
v(),
|
|
1054
1054
|
y,
|
|
1055
1055
|
L
|
|
@@ -1057,7 +1057,7 @@ function Nt() {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
const Jt = /* @__PURE__ */ Nt(), Cn = /* @__PURE__ */ h(Jt);
|
|
1059
1059
|
function Yt({ request: n, ...e }) {
|
|
1060
|
-
return A((s, r) =>
|
|
1060
|
+
return A((s, r) => p.pipe(
|
|
1061
1061
|
n("web_app_set_emoji_status", ["emoji_status_set", "emoji_status_failed"], {
|
|
1062
1062
|
params: {
|
|
1063
1063
|
custom_emoji_id: s,
|
|
@@ -1074,7 +1074,7 @@ function Yt({ request: n, ...e }) {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
// @__NO_SIDE_EFFECTS__
|
|
1076
1076
|
function Zt() {
|
|
1077
|
-
return Yt(
|
|
1077
|
+
return Yt(p.pipe(
|
|
1078
1078
|
v(),
|
|
1079
1079
|
L,
|
|
1080
1080
|
y
|
|
@@ -1129,11 +1129,11 @@ class es {
|
|
|
1129
1129
|
version: r,
|
|
1130
1130
|
returns: "plain"
|
|
1131
1131
|
});
|
|
1132
|
-
this.isSupported = U(i, r), this.impactOccurredFp = o((
|
|
1132
|
+
this.isSupported = U(i, r), this.impactOccurredFp = o((c) => e(i, { type: "impact", impact_style: c })), this.notificationOccurredFp = o((c) => e(i, { type: "notification", notification_type: c })), this.selectionChangedFp = o(() => e(i, { type: "selection_change" })), this.impactOccurred = /* @__PURE__ */ h(this.impactOccurredFp), this.notificationOccurred = /* @__PURE__ */ h(this.notificationOccurredFp), this.selectionChanged = /* @__PURE__ */ h(this.selectionChangedFp);
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
1135
|
function ts() {
|
|
1136
|
-
return new es(
|
|
1136
|
+
return new es(p.pipe(
|
|
1137
1137
|
v(),
|
|
1138
1138
|
T,
|
|
1139
1139
|
y
|
|
@@ -1145,7 +1145,7 @@ function ss({ postEvent: n, ...e }) {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
// @__NO_SIDE_EFFECTS__
|
|
1147
1147
|
function rs() {
|
|
1148
|
-
return ss(
|
|
1148
|
+
return ss(p.pipe(
|
|
1149
1149
|
v(),
|
|
1150
1150
|
y,
|
|
1151
1151
|
T
|
|
@@ -1153,14 +1153,14 @@ function rs() {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
const ns = /* @__PURE__ */ rs(), yn = /* @__PURE__ */ h(ns);
|
|
1155
1155
|
function is({ request: n, ...e }) {
|
|
1156
|
-
return A((s) =>
|
|
1156
|
+
return A((s) => p.pipe(
|
|
1157
1157
|
n("web_app_check_home_screen", "home_screen_checked", s),
|
|
1158
1158
|
u.map((r) => r.status || "unknown")
|
|
1159
1159
|
), { ...e, requires: "web_app_check_home_screen", returns: "task" });
|
|
1160
1160
|
}
|
|
1161
1161
|
// @__NO_SIDE_EFFECTS__
|
|
1162
1162
|
function os() {
|
|
1163
|
-
return is(
|
|
1163
|
+
return is(p.pipe(
|
|
1164
1164
|
v(),
|
|
1165
1165
|
y,
|
|
1166
1166
|
L
|
|
@@ -1243,7 +1243,7 @@ class cs {
|
|
|
1243
1243
|
* @see restoreFp
|
|
1244
1244
|
*/
|
|
1245
1245
|
t(this, "restore");
|
|
1246
|
-
this.restoreFp = () =>
|
|
1246
|
+
this.restoreFp = () => p.pipe(
|
|
1247
1247
|
e(),
|
|
1248
1248
|
m.map(N.match(() => {
|
|
1249
1249
|
}, ({ raw: s, obj: r }) => {
|
|
@@ -1261,14 +1261,14 @@ class cs {
|
|
|
1261
1261
|
function ps() {
|
|
1262
1262
|
return new cs({
|
|
1263
1263
|
retrieveInitData() {
|
|
1264
|
-
return
|
|
1264
|
+
return p.pipe(
|
|
1265
1265
|
m.Do,
|
|
1266
|
-
m.bindW("obj", () =>
|
|
1266
|
+
m.bindW("obj", () => p.pipe(
|
|
1267
1267
|
le(),
|
|
1268
1268
|
m.map(({ vbWebAppData: n }) => n ? N.some(n) : N.none)
|
|
1269
1269
|
)),
|
|
1270
1270
|
m.bindW("raw", ht),
|
|
1271
|
-
m.map(({ obj: n, raw: e }) =>
|
|
1271
|
+
m.map(({ obj: n, raw: e }) => p.pipe(
|
|
1272
1272
|
N.Do,
|
|
1273
1273
|
N.bind("obj", () => n),
|
|
1274
1274
|
N.bind("raw", () => e)
|
|
@@ -1319,17 +1319,17 @@ class us {
|
|
|
1319
1319
|
isVBma: r,
|
|
1320
1320
|
requires: "web_app_open_invoice",
|
|
1321
1321
|
returns: "task"
|
|
1322
|
-
}), o = O(!1),
|
|
1322
|
+
}), o = O(!1), c = () => {
|
|
1323
1323
|
o.set(!1);
|
|
1324
1324
|
};
|
|
1325
|
-
this.isSupported = U("web_app_open_invoice", e), this.isOpened = S(o), this.openSlugFp = i((a, l) =>
|
|
1325
|
+
this.isSupported = U("web_app_open_invoice", e), this.isOpened = S(o), this.openSlugFp = i((a, l) => p.pipe(
|
|
1326
1326
|
this.isOpened() ? u.left(new Be("Invoice is already opened")) : u.right(void 0),
|
|
1327
1327
|
u.chain(() => (o.set(!0), s("web_app_open_invoice", "invoice_closed", {
|
|
1328
1328
|
...l,
|
|
1329
1329
|
params: { slug: a },
|
|
1330
1330
|
capture: (f) => a === f.slug
|
|
1331
1331
|
}))),
|
|
1332
|
-
u.mapBoth((f) => (
|
|
1332
|
+
u.mapBoth((f) => (c(), f), (f) => (c(), f.status))
|
|
1333
1333
|
)), this.openUrlFp = i((a, l) => {
|
|
1334
1334
|
const { hostname: f, pathname: F } = new URL(a, window.location.href);
|
|
1335
1335
|
if (f !== "t.me")
|
|
@@ -1342,7 +1342,7 @@ class us {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
}
|
|
1344
1344
|
function ls() {
|
|
1345
|
-
return new us(
|
|
1345
|
+
return new us(p.pipe(v(), L, y));
|
|
1346
1346
|
}
|
|
1347
1347
|
const En = /* @__PURE__ */ ls();
|
|
1348
1348
|
function ds({ postEvent: n, ...e }) {
|
|
@@ -1362,7 +1362,7 @@ function ds({ postEvent: n, ...e }) {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
// @__NO_SIDE_EFFECTS__
|
|
1364
1364
|
function hs() {
|
|
1365
|
-
return ds(
|
|
1365
|
+
return ds(p.pipe(v(), T));
|
|
1366
1366
|
}
|
|
1367
1367
|
const _s = /* @__PURE__ */ hs(), Bn = /* @__PURE__ */ h(_s);
|
|
1368
1368
|
function bs({ postEvent: n, version: e, ...s }) {
|
|
@@ -1373,7 +1373,7 @@ function bs({ postEvent: n, version: e, ...s }) {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
// @__NO_SIDE_EFFECTS__
|
|
1375
1375
|
function fs() {
|
|
1376
|
-
return bs(
|
|
1376
|
+
return bs(p.pipe(
|
|
1377
1377
|
v(),
|
|
1378
1378
|
T,
|
|
1379
1379
|
y
|
|
@@ -1408,7 +1408,7 @@ class Ss {
|
|
|
1408
1408
|
postEvent: r,
|
|
1409
1409
|
storage: i,
|
|
1410
1410
|
isVBma: o,
|
|
1411
|
-
isPageReload:
|
|
1411
|
+
isPageReload: c
|
|
1412
1412
|
}) {
|
|
1413
1413
|
/**
|
|
1414
1414
|
* Complete location manager state.
|
|
@@ -1478,11 +1478,11 @@ class Ss {
|
|
|
1478
1478
|
},
|
|
1479
1479
|
onChange: i.set
|
|
1480
1480
|
}), l = new xe({
|
|
1481
|
-
isPageReload:
|
|
1481
|
+
isPageReload: c,
|
|
1482
1482
|
restoreState: i.get,
|
|
1483
1483
|
onMounted: a.setState,
|
|
1484
1484
|
initialState(C) {
|
|
1485
|
-
return
|
|
1485
|
+
return p.pipe(
|
|
1486
1486
|
s("web_app_check_location", "location_checked", C),
|
|
1487
1487
|
u.map(Fs)
|
|
1488
1488
|
);
|
|
@@ -1498,7 +1498,7 @@ class Ss {
|
|
|
1498
1498
|
returns: "task",
|
|
1499
1499
|
isMounted: l.isMounted
|
|
1500
1500
|
});
|
|
1501
|
-
this.isAvailable = a.getter("available"), this.isAccessRequested = a.getter("accessRequested"), this.isAccessGranted = a.getter("accessGranted"), this.isSupported = U("web_app_check_location", e), this.isMounted = l.isMounted, this.state = a.state, this.unmount = l.unmount, this.mountFp = b(l.mount), this.openSettingsFp = F(() => r("web_app_open_location_settings")), this.requestLocationFp = k((C) =>
|
|
1501
|
+
this.isAvailable = a.getter("available"), this.isAccessRequested = a.getter("accessRequested"), this.isAccessGranted = a.getter("accessGranted"), this.isSupported = U("web_app_check_location", e), this.isMounted = l.isMounted, this.state = a.state, this.unmount = l.unmount, this.mountFp = b(l.mount), this.openSettingsFp = F(() => r("web_app_open_location_settings")), this.requestLocationFp = k((C) => p.pipe(
|
|
1502
1502
|
s("web_app_request_location", "location_requested", C),
|
|
1503
1503
|
u.map((q) => {
|
|
1504
1504
|
if (!q.available)
|
|
@@ -1510,7 +1510,7 @@ class Ss {
|
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
function Cs() {
|
|
1513
|
-
return new Ss(
|
|
1513
|
+
return new Ss(p.pipe(
|
|
1514
1514
|
v(),
|
|
1515
1515
|
T,
|
|
1516
1516
|
y,
|
|
@@ -1728,9 +1728,9 @@ class vs {
|
|
|
1728
1728
|
color: o.bgColor,
|
|
1729
1729
|
text_color: o.textColor
|
|
1730
1730
|
})
|
|
1731
|
-
}), i = (o,
|
|
1731
|
+
}), i = (o, c) => {
|
|
1732
1732
|
const a = r.stateGetter(o);
|
|
1733
|
-
return S(() => a() || P(
|
|
1733
|
+
return S(() => a() || P(c));
|
|
1734
1734
|
};
|
|
1735
1735
|
this.bgColor = i("bgColor", e.bgColor), this.textColor = i("textColor", e.textColor), this.hasShineEffect = r.stateGetter("hasShineEffect"), this.isEnabled = r.stateGetter("isEnabled"), this.isLoaderVisible = r.stateGetter("isLoaderVisible"), this.text = r.stateGetter("text"), this.isVisible = r.stateGetter("isVisible"), this.isMounted = r.isMounted, this.state = r.state, [this.setBgColor, this.setBgColorFp] = r.stateSetters("bgColor"), [this.setTextColor, this.setTextColorFp] = r.stateSetters("textColor"), [
|
|
1736
1736
|
[this.disableShineEffect, this.disableShineEffectFp],
|
|
@@ -1752,7 +1752,7 @@ function Ve(n) {
|
|
|
1752
1752
|
document.documentElement.style.removeProperty(n);
|
|
1753
1753
|
}
|
|
1754
1754
|
function ks(n) {
|
|
1755
|
-
return
|
|
1755
|
+
return p.pipe(
|
|
1756
1756
|
mt(n),
|
|
1757
1757
|
m.map((e) => Math.sqrt(
|
|
1758
1758
|
[0.299, 0.587, 0.114].reduce((s, r, i) => {
|
|
@@ -1770,7 +1770,7 @@ class ys {
|
|
|
1770
1770
|
offChange: r,
|
|
1771
1771
|
isVBma: i,
|
|
1772
1772
|
storage: o,
|
|
1773
|
-
isPageReload:
|
|
1773
|
+
isPageReload: c
|
|
1774
1774
|
}) {
|
|
1775
1775
|
//#region Colors.
|
|
1776
1776
|
/**
|
|
@@ -1879,7 +1879,7 @@ class ys {
|
|
|
1879
1879
|
a.setState(C.theme_params);
|
|
1880
1880
|
}, f = new ie({
|
|
1881
1881
|
initialState: () => m.right(P(e)),
|
|
1882
|
-
isPageReload:
|
|
1882
|
+
isPageReload: c,
|
|
1883
1883
|
onMounted(C) {
|
|
1884
1884
|
a.setState(C), s(l);
|
|
1885
1885
|
},
|
|
@@ -1914,7 +1914,7 @@ class ys {
|
|
|
1914
1914
|
const ve = /* @__PURE__ */ oe({});
|
|
1915
1915
|
function qs() {
|
|
1916
1916
|
return new ys({
|
|
1917
|
-
...
|
|
1917
|
+
...p.pipe(
|
|
1918
1918
|
v(),
|
|
1919
1919
|
Z("themeParams")
|
|
1920
1920
|
),
|
|
@@ -1930,7 +1930,7 @@ function qs() {
|
|
|
1930
1930
|
const de = /* @__PURE__ */ qs();
|
|
1931
1931
|
// @__NO_SIDE_EFFECTS__
|
|
1932
1932
|
function rt(n, e, s) {
|
|
1933
|
-
return
|
|
1933
|
+
return p.pipe(
|
|
1934
1934
|
/* @__PURE__ */ Ae(n, e),
|
|
1935
1935
|
(r) => ({ ...r, defaults: s })
|
|
1936
1936
|
);
|
|
@@ -1948,7 +1948,7 @@ class Is {
|
|
|
1948
1948
|
version: r,
|
|
1949
1949
|
postEvent: i,
|
|
1950
1950
|
isVBma: o,
|
|
1951
|
-
theme:
|
|
1951
|
+
theme: c,
|
|
1952
1952
|
onVisibilityChanged: a,
|
|
1953
1953
|
offVisibilityChanged: l
|
|
1954
1954
|
}) {
|
|
@@ -2145,17 +2145,17 @@ class Is {
|
|
|
2145
2145
|
},
|
|
2146
2146
|
isPageReload: s,
|
|
2147
2147
|
onMounted: (_) => {
|
|
2148
|
-
a(f),
|
|
2148
|
+
a(f), c.sub(F), k.setState(_);
|
|
2149
2149
|
},
|
|
2150
2150
|
onUnmounted() {
|
|
2151
|
-
l(f),
|
|
2151
|
+
l(f), c.unsub(F);
|
|
2152
2152
|
},
|
|
2153
2153
|
restoreState: e.get
|
|
2154
2154
|
});
|
|
2155
2155
|
this.isMounted = b.isMounted, this.mountFp = A(() => {
|
|
2156
2156
|
const _ = () => {
|
|
2157
2157
|
};
|
|
2158
|
-
return
|
|
2158
|
+
return p.pipe(b.mount(), m.match(_, _));
|
|
2159
2159
|
}, { isVBma: o, returns: "plain" }), this.mount = /* @__PURE__ */ h(this.mountFp), this.unmount = b.unmount;
|
|
2160
2160
|
const k = new Y({
|
|
2161
2161
|
initialState: {
|
|
@@ -2167,7 +2167,7 @@ class Is {
|
|
|
2167
2167
|
onChange: e.set
|
|
2168
2168
|
});
|
|
2169
2169
|
this.state = k.state;
|
|
2170
|
-
const C = (_) => be(_) ? _ : P(
|
|
2170
|
+
const C = (_) => be(_) ? _ : P(c)[_], q = (_) => S(() => C(_()));
|
|
2171
2171
|
this.isActive = k.getter("isActive"), this.isSupported = S(() => [
|
|
2172
2172
|
"web_app_set_header_color",
|
|
2173
2173
|
"web_app_set_background_color",
|
|
@@ -2197,14 +2197,14 @@ class Is {
|
|
|
2197
2197
|
if ($ === x())
|
|
2198
2198
|
return m.right(void 0);
|
|
2199
2199
|
if (R === "web_app_set_header_color" && ($ === "bg_color" || $ === "secondary_bg_color"))
|
|
2200
|
-
return
|
|
2200
|
+
return p.pipe(
|
|
2201
2201
|
i("web_app_set_header_color", { color_key: $ }),
|
|
2202
2202
|
m.map(() => {
|
|
2203
2203
|
k.setState({ [_]: $ });
|
|
2204
2204
|
})
|
|
2205
2205
|
);
|
|
2206
2206
|
const W = C($);
|
|
2207
|
-
return
|
|
2207
|
+
return p.pipe(
|
|
2208
2208
|
W ? i(R, { color: W }) : m.left(new Mt($)),
|
|
2209
2209
|
m.map(() => {
|
|
2210
2210
|
k.setState({ [_]: $ });
|
|
@@ -2251,7 +2251,7 @@ class Is {
|
|
|
2251
2251
|
}
|
|
2252
2252
|
function Es() {
|
|
2253
2253
|
return new Is({
|
|
2254
|
-
...
|
|
2254
|
+
...p.pipe(
|
|
2255
2255
|
v(),
|
|
2256
2256
|
T,
|
|
2257
2257
|
y,
|
|
@@ -2293,7 +2293,7 @@ class xs {
|
|
|
2293
2293
|
requires: "web_app_send_notification",
|
|
2294
2294
|
returns: "task"
|
|
2295
2295
|
});
|
|
2296
|
-
this.isSupported = U("web_app_send_notification", e), this.sendFp = r((i) =>
|
|
2296
|
+
this.isSupported = U("web_app_send_notification", e), this.sendFp = r((i) => p.pipe(
|
|
2297
2297
|
u.fromEither(ye("web_app_send_notification", {
|
|
2298
2298
|
id: As(),
|
|
2299
2299
|
message: i.message,
|
|
@@ -2302,15 +2302,15 @@ class xs {
|
|
|
2302
2302
|
})),
|
|
2303
2303
|
u.map(() => {
|
|
2304
2304
|
})
|
|
2305
|
-
)), this.send = (i) => this.sendFp(i)().then((
|
|
2306
|
-
if (
|
|
2307
|
-
throw
|
|
2308
|
-
return
|
|
2305
|
+
)), this.send = (i) => this.sendFp(i)().then((c) => {
|
|
2306
|
+
if (c._tag === "Left")
|
|
2307
|
+
throw c.left;
|
|
2308
|
+
return c.right;
|
|
2309
2309
|
});
|
|
2310
2310
|
}
|
|
2311
2311
|
}
|
|
2312
2312
|
function Ms() {
|
|
2313
|
-
return new xs(
|
|
2313
|
+
return new xs(y(v()));
|
|
2314
2314
|
}
|
|
2315
2315
|
const Tn = /* @__PURE__ */ Ms();
|
|
2316
2316
|
function Rs(n) {
|
|
@@ -2326,16 +2326,16 @@ function Rs(n) {
|
|
|
2326
2326
|
i.push({ type: "close", id: "" });
|
|
2327
2327
|
else
|
|
2328
2328
|
for (let o = 0; o < r.length; o++) {
|
|
2329
|
-
const
|
|
2329
|
+
const c = r[o], a = c.id || "";
|
|
2330
2330
|
if (a.length > 64)
|
|
2331
2331
|
return m.left(new Q(`Button with index ${o} has invalid id: ${a}`));
|
|
2332
|
-
if (!
|
|
2333
|
-
const l =
|
|
2332
|
+
if (!c.type || c.type === "default" || c.type === "destructive") {
|
|
2333
|
+
const l = c.text.trim();
|
|
2334
2334
|
if (!l || l.length > 64)
|
|
2335
2335
|
return m.left(new Q(`Button with index ${o} has invalid text: ${l}`));
|
|
2336
|
-
i.push({ type:
|
|
2336
|
+
i.push({ type: c.type, text: l, id: a });
|
|
2337
2337
|
} else
|
|
2338
|
-
i.push({ type:
|
|
2338
|
+
i.push({ type: c.type, id: a });
|
|
2339
2339
|
}
|
|
2340
2340
|
return m.right({ title: s, message: e, buttons: i });
|
|
2341
2341
|
}
|
|
@@ -2381,13 +2381,13 @@ class Ts {
|
|
|
2381
2381
|
t(this, "show");
|
|
2382
2382
|
const i = O(!1), o = () => {
|
|
2383
2383
|
i.set(!1);
|
|
2384
|
-
},
|
|
2384
|
+
}, c = E({
|
|
2385
2385
|
version: e,
|
|
2386
2386
|
isVBma: s,
|
|
2387
2387
|
requires: "web_app_open_popup",
|
|
2388
2388
|
returns: "task"
|
|
2389
2389
|
});
|
|
2390
|
-
this.isSupported = U("web_app_open_popup", e), this.isOpened = S(i), this.showFp =
|
|
2390
|
+
this.isSupported = U("web_app_open_popup", e), this.isOpened = S(i), this.showFp = c((a) => p.pipe(
|
|
2391
2391
|
this.isOpened() ? u.left(new Be("A popup is already opened")) : u.right(void 0),
|
|
2392
2392
|
u.chainW(() => u.fromEither(Rs(a))),
|
|
2393
2393
|
u.chain((l) => (i.set(!0), r("web_app_open_popup", "popup_closed", {
|
|
@@ -2402,18 +2402,18 @@ class Ts {
|
|
|
2402
2402
|
}
|
|
2403
2403
|
}
|
|
2404
2404
|
function Vs() {
|
|
2405
|
-
return new Ts(
|
|
2405
|
+
return new Ts(p.pipe(v(), L, y));
|
|
2406
2406
|
}
|
|
2407
2407
|
const Vn = /* @__PURE__ */ Vs();
|
|
2408
2408
|
function Ls({ request: n, ...e }) {
|
|
2409
|
-
return A((s) =>
|
|
2409
|
+
return A((s) => p.pipe(
|
|
2410
2410
|
n("web_app_request_phone", "phone_requested", s),
|
|
2411
2411
|
u.map((r) => r.status)
|
|
2412
2412
|
), { ...e, requires: "web_app_request_phone", returns: "task" });
|
|
2413
2413
|
}
|
|
2414
2414
|
// @__NO_SIDE_EFFECTS__
|
|
2415
2415
|
function $s() {
|
|
2416
|
-
return Ls(
|
|
2416
|
+
return Ls(p.pipe(
|
|
2417
2417
|
v(),
|
|
2418
2418
|
y,
|
|
2419
2419
|
L
|
|
@@ -2425,10 +2425,10 @@ function Ps({
|
|
|
2425
2425
|
requestPhoneAccess: e,
|
|
2426
2426
|
...s
|
|
2427
2427
|
}) {
|
|
2428
|
-
const r = (
|
|
2428
|
+
const r = (c) => p.pipe(
|
|
2429
2429
|
n("getRequestedContact", {}, {
|
|
2430
|
-
...
|
|
2431
|
-
timeout: (
|
|
2430
|
+
...c,
|
|
2431
|
+
timeout: (c || {}).timeout || 5e3
|
|
2432
2432
|
}),
|
|
2433
2433
|
u.chainW((a) => {
|
|
2434
2434
|
const l = Fe(z(), a);
|
|
@@ -2457,8 +2457,8 @@ function Ps({
|
|
|
2457
2457
|
);
|
|
2458
2458
|
return f.success ? u.right({ raw: l.output, parsed: f.output }) : u.left(new pe(l.output, f.issues));
|
|
2459
2459
|
})
|
|
2460
|
-
), i = (
|
|
2461
|
-
r(
|
|
2460
|
+
), i = (c) => p.pipe(
|
|
2461
|
+
r(c),
|
|
2462
2462
|
u.match(
|
|
2463
2463
|
// All other errors except validation ones should be ignored. Receiving validation error
|
|
2464
2464
|
// means that we have some data, but we are unable to parse it properly. So, there is no
|
|
@@ -2466,7 +2466,7 @@ function Ps({
|
|
|
2466
2466
|
(a) => pe.is(a) ? m.left(a) : m.right(void 0),
|
|
2467
2467
|
(a) => m.right(a)
|
|
2468
2468
|
)
|
|
2469
|
-
), o = (
|
|
2469
|
+
), o = (c) => we(
|
|
2470
2470
|
async (a, l, f) => {
|
|
2471
2471
|
let F = 50;
|
|
2472
2472
|
for (; !f.isRejected; ) {
|
|
@@ -2478,21 +2478,21 @@ function Ps({
|
|
|
2478
2478
|
await new Promise((k) => setTimeout(k, F)), F += 50;
|
|
2479
2479
|
}
|
|
2480
2480
|
},
|
|
2481
|
-
|
|
2481
|
+
c
|
|
2482
2482
|
);
|
|
2483
|
-
return A((
|
|
2483
|
+
return A((c) => we.fn((a) => p.pipe(
|
|
2484
2484
|
// Try to get the requested contact. Probably, we already requested it before.
|
|
2485
2485
|
i(a),
|
|
2486
|
-
u.chain((l) => l ? u.right(l) :
|
|
2486
|
+
u.chain((l) => l ? u.right(l) : p.pipe(
|
|
2487
2487
|
e(a),
|
|
2488
2488
|
u.chainW((f) => f === "sent" ? o(a) : u.left(new Ye("User denied access")))
|
|
2489
2489
|
))
|
|
2490
|
-
),
|
|
2490
|
+
), c), { ...s, returns: "task", requires: "web_app_request_phone" });
|
|
2491
2491
|
}
|
|
2492
2492
|
// @__NO_SIDE_EFFECTS__
|
|
2493
2493
|
function Hs() {
|
|
2494
2494
|
return Ps({
|
|
2495
|
-
...
|
|
2495
|
+
...p.pipe(v(), Re, y),
|
|
2496
2496
|
requestPhoneAccess: nt
|
|
2497
2497
|
});
|
|
2498
2498
|
}
|
|
@@ -2505,9 +2505,9 @@ function Os({ requestContact: n, ...e }) {
|
|
|
2505
2505
|
// @__NO_SIDE_EFFECTS__
|
|
2506
2506
|
function Ds() {
|
|
2507
2507
|
return Os({
|
|
2508
|
-
...
|
|
2508
|
+
...p.pipe(v(), y),
|
|
2509
2509
|
requestContact(n) {
|
|
2510
|
-
return
|
|
2510
|
+
return p.pipe(
|
|
2511
2511
|
it(n),
|
|
2512
2512
|
u.map((e) => e.parsed)
|
|
2513
2513
|
);
|
|
@@ -2516,14 +2516,14 @@ function Ds() {
|
|
|
2516
2516
|
}
|
|
2517
2517
|
const it = /* @__PURE__ */ Hs(), $n = /* @__PURE__ */ h(it), js = /* @__PURE__ */ Ds(), Pn = /* @__PURE__ */ h(js);
|
|
2518
2518
|
function Gs({ request: n, ...e }) {
|
|
2519
|
-
return A((s) =>
|
|
2519
|
+
return A((s) => p.pipe(
|
|
2520
2520
|
n("web_app_request_write_access", "write_access_requested", s),
|
|
2521
2521
|
u.map((r) => r.status)
|
|
2522
2522
|
), { ...e, requires: "web_app_request_write_access", returns: "task" });
|
|
2523
2523
|
}
|
|
2524
2524
|
// @__NO_SIDE_EFFECTS__
|
|
2525
2525
|
function Us() {
|
|
2526
|
-
return Gs(
|
|
2526
|
+
return Gs(p.pipe(
|
|
2527
2527
|
v(),
|
|
2528
2528
|
y,
|
|
2529
2529
|
L
|
|
@@ -2617,12 +2617,12 @@ class Qs {
|
|
|
2617
2617
|
* @see openFp
|
|
2618
2618
|
*/
|
|
2619
2619
|
t(this, "open");
|
|
2620
|
-
const
|
|
2620
|
+
const c = { version: e, requires: "web_app_open_scan_qr_popup", isVBma: i }, a = E({ ...c, returns: "either" }), l = E({ ...c, returns: "task" }), f = O(!1), F = () => {
|
|
2621
2621
|
f.set(!1);
|
|
2622
2622
|
};
|
|
2623
2623
|
this.isSupported = U("web_app_open_scan_qr_popup", e), this.isOpened = S(f), this.captureFp = l((b) => {
|
|
2624
2624
|
let k;
|
|
2625
|
-
return
|
|
2625
|
+
return p.pipe(
|
|
2626
2626
|
this.openFp({
|
|
2627
2627
|
...b,
|
|
2628
2628
|
onCaptured: (C) => {
|
|
@@ -2631,12 +2631,12 @@ class Qs {
|
|
|
2631
2631
|
}),
|
|
2632
2632
|
u.map(() => k)
|
|
2633
2633
|
);
|
|
2634
|
-
}), this.closeFp = a(() =>
|
|
2634
|
+
}), this.closeFp = a(() => p.pipe(o("web_app_close_scan_qr_popup"), m.map(F))), this.openFp = l((b) => p.pipe(
|
|
2635
2635
|
f() ? u.left(new Be("The QR Scanner is already opened")) : async () => o("web_app_open_scan_qr_popup", { text: b.text }),
|
|
2636
2636
|
u.chainW(() => {
|
|
2637
2637
|
f.set(!0);
|
|
2638
2638
|
const [k, C] = qe(), q = (I) => (C(), f.set(!1), I);
|
|
2639
|
-
return
|
|
2639
|
+
return p.pipe(
|
|
2640
2640
|
we((I) => {
|
|
2641
2641
|
k(
|
|
2642
2642
|
// The scanner was closed externally.
|
|
@@ -2656,7 +2656,7 @@ class Qs {
|
|
|
2656
2656
|
}
|
|
2657
2657
|
function Ks() {
|
|
2658
2658
|
return new Qs({
|
|
2659
|
-
...
|
|
2659
|
+
...p.pipe(v(), T, y),
|
|
2660
2660
|
onClosed(n) {
|
|
2661
2661
|
return j("scan_qr_popup_closed", n);
|
|
2662
2662
|
},
|
|
@@ -2700,7 +2700,7 @@ class zs {
|
|
|
2700
2700
|
const e = O(!1);
|
|
2701
2701
|
j("refresh_requested", () => {
|
|
2702
2702
|
e.set(!0);
|
|
2703
|
-
}), this.isRefreshing = S(e), this.finishRefreshFp = () =>
|
|
2703
|
+
}), this.isRefreshing = S(e), this.finishRefreshFp = () => p.pipe(
|
|
2704
2704
|
u.fromEither(ye("web_app_finish_refresh")),
|
|
2705
2705
|
u.map(() => {
|
|
2706
2706
|
e.set(!1);
|
|
@@ -2715,7 +2715,7 @@ class zs {
|
|
|
2715
2715
|
}
|
|
2716
2716
|
}
|
|
2717
2717
|
function Ns() {
|
|
2718
|
-
return new zs(
|
|
2718
|
+
return new zs(p.pipe(v()));
|
|
2719
2719
|
}
|
|
2720
2720
|
const Dn = /* @__PURE__ */ Ns();
|
|
2721
2721
|
class Js {
|
|
@@ -2963,9 +2963,9 @@ class Js {
|
|
|
2963
2963
|
text_color: o.textColor,
|
|
2964
2964
|
position: o.position
|
|
2965
2965
|
})
|
|
2966
|
-
}), i = (o,
|
|
2966
|
+
}), i = (o, c) => {
|
|
2967
2967
|
const a = r.stateGetter(o);
|
|
2968
|
-
return S(() => a() || P(
|
|
2968
|
+
return S(() => a() || P(c));
|
|
2969
2969
|
};
|
|
2970
2970
|
this.isSupported = U("web_app_setup_secondary_button", s.version), this.bgColor = i("bgColor", e.bgColor), this.textColor = i("textColor", e.textColor), this.position = r.stateGetter("position"), this.hasShineEffect = r.stateGetter("hasShineEffect"), this.isEnabled = r.stateGetter("isEnabled"), this.isLoaderVisible = r.stateGetter("isLoaderVisible"), this.text = r.stateGetter("text"), this.isVisible = r.stateGetter("isVisible"), this.isMounted = r.isMounted, this.state = r.state, [this.setPosition, this.setPositionFp] = r.stateSetters("position"), [this.setBgColor, this.setBgColorFp] = r.stateSetters("bgColor"), [this.setTextColor, this.setTextColorFp] = r.stateSetters("textColor"), [
|
|
2971
2971
|
[this.disableShineEffect, this.disableShineEffectFp],
|
|
@@ -3041,9 +3041,9 @@ class Zs {
|
|
|
3041
3041
|
requires: "web_app_secure_storage_get_key",
|
|
3042
3042
|
isVBma: e,
|
|
3043
3043
|
returns: "task"
|
|
3044
|
-
}),
|
|
3044
|
+
}), c = (a, l, f) => {
|
|
3045
3045
|
const F = i();
|
|
3046
|
-
return
|
|
3046
|
+
return p.pipe(
|
|
3047
3047
|
s(a, ["secure_storage_failed", l], {
|
|
3048
3048
|
params: { ...f, req_id: F },
|
|
3049
3049
|
capture: ((b) => "payload" in b ? b.payload.req_id === F : !0)
|
|
@@ -3051,28 +3051,28 @@ class Zs {
|
|
|
3051
3051
|
u.chain((b) => b.event === "secure_storage_failed" ? u.left(new qt(b.payload.error || "UNKNOWN_ERROR")) : u.right(b.payload))
|
|
3052
3052
|
);
|
|
3053
3053
|
};
|
|
3054
|
-
this.getItemFp = o((a) =>
|
|
3055
|
-
|
|
3054
|
+
this.getItemFp = o((a) => p.pipe(
|
|
3055
|
+
c("web_app_secure_storage_get_key", "secure_storage_key_received", { key: a }),
|
|
3056
3056
|
u.map((l) => ({
|
|
3057
3057
|
value: l.value,
|
|
3058
3058
|
canRestore: !!l.can_restore
|
|
3059
3059
|
}))
|
|
3060
|
-
)), this.setItemFp = o((a, l) =>
|
|
3061
|
-
|
|
3060
|
+
)), this.setItemFp = o((a, l) => p.pipe(
|
|
3061
|
+
c("web_app_secure_storage_save_key", "secure_storage_key_saved", { key: a, value: l }),
|
|
3062
3062
|
u.map(() => {
|
|
3063
3063
|
})
|
|
3064
|
-
)), this.deleteItemFp = o((a) => this.setItemFp(a, null)), this.clearFp = o(() =>
|
|
3065
|
-
|
|
3064
|
+
)), this.deleteItemFp = o((a) => this.setItemFp(a, null)), this.clearFp = o(() => p.pipe(
|
|
3065
|
+
c("web_app_secure_storage_clear", "secure_storage_cleared", {}),
|
|
3066
3066
|
u.map(() => {
|
|
3067
3067
|
})
|
|
3068
|
-
)), this.restoreItemFp = o((a) =>
|
|
3069
|
-
|
|
3068
|
+
)), this.restoreItemFp = o((a) => p.pipe(
|
|
3069
|
+
c("web_app_secure_storage_restore_key", "secure_storage_key_restored", { key: a }),
|
|
3070
3070
|
u.map((l) => l.value)
|
|
3071
3071
|
)), this.getItem = /* @__PURE__ */ h(this.getItemFp), this.setItem = /* @__PURE__ */ h(this.setItemFp), this.deleteItem = /* @__PURE__ */ h(this.deleteItemFp), this.clear = /* @__PURE__ */ h(this.clearFp), this.restoreItem = /* @__PURE__ */ h(this.restoreItemFp);
|
|
3072
3072
|
}
|
|
3073
3073
|
}
|
|
3074
3074
|
function Xs() {
|
|
3075
|
-
return new Zs(
|
|
3075
|
+
return new Zs(p.pipe(
|
|
3076
3076
|
v(),
|
|
3077
3077
|
y,
|
|
3078
3078
|
L,
|
|
@@ -3220,13 +3220,13 @@ class tr {
|
|
|
3220
3220
|
* @see enableVerticalFp
|
|
3221
3221
|
*/
|
|
3222
3222
|
t(this, "enableVertical");
|
|
3223
|
-
const
|
|
3224
|
-
initialState:
|
|
3223
|
+
const c = { isVerticalEnabled: !0 }, a = new Y({
|
|
3224
|
+
initialState: c,
|
|
3225
3225
|
onChange(C) {
|
|
3226
3226
|
s.set(C);
|
|
3227
3227
|
}
|
|
3228
3228
|
}), l = new ie({
|
|
3229
|
-
initialState:
|
|
3229
|
+
initialState: c,
|
|
3230
3230
|
isPageReload: i,
|
|
3231
3231
|
onMounted: a.setState,
|
|
3232
3232
|
restoreState: s.get
|
|
@@ -3239,7 +3239,7 @@ class tr {
|
|
|
3239
3239
|
returns: "either"
|
|
3240
3240
|
}), k = (C) => {
|
|
3241
3241
|
const q = { isVerticalEnabled: C };
|
|
3242
|
-
return a.hasDiff(q) ?
|
|
3242
|
+
return a.hasDiff(q) ? p.pipe(
|
|
3243
3243
|
e("web_app_setup_swipe_behavior", { allow_vertical_swipe: C }),
|
|
3244
3244
|
m.map(() => {
|
|
3245
3245
|
a.setState(q);
|
|
@@ -3249,12 +3249,12 @@ class tr {
|
|
|
3249
3249
|
this.isSupported = U("web_app_setup_swipe_behavior", o), this.isVerticalEnabled = a.getter("isVerticalEnabled"), this.isMounted = l.isMounted, this.disableVerticalFp = b(() => k(!1)), this.enableVerticalFp = b(() => k(!0)), this.mountFp = F(() => {
|
|
3250
3250
|
const C = () => {
|
|
3251
3251
|
};
|
|
3252
|
-
return
|
|
3252
|
+
return p.pipe(l.mount(), m.match(C, C));
|
|
3253
3253
|
}), this.unmount = l.unmount, this.disableVertical = /* @__PURE__ */ h(this.disableVerticalFp), this.enableVertical = /* @__PURE__ */ h(this.enableVerticalFp), this.mount = /* @__PURE__ */ h(this.mountFp);
|
|
3254
3254
|
}
|
|
3255
3255
|
}
|
|
3256
3256
|
function sr() {
|
|
3257
|
-
return new tr(
|
|
3257
|
+
return new tr(p.pipe(
|
|
3258
3258
|
v(),
|
|
3259
3259
|
T,
|
|
3260
3260
|
y,
|
|
@@ -3278,7 +3278,7 @@ async function Qn(n) {
|
|
|
3278
3278
|
}
|
|
3279
3279
|
}
|
|
3280
3280
|
function rr({ request: n, ...e }) {
|
|
3281
|
-
return A((s, r, i) =>
|
|
3281
|
+
return A((s, r, i) => p.pipe(
|
|
3282
3282
|
n(
|
|
3283
3283
|
"web_app_request_file_download",
|
|
3284
3284
|
"file_download_requested",
|
|
@@ -3289,7 +3289,7 @@ function rr({ request: n, ...e }) {
|
|
|
3289
3289
|
}
|
|
3290
3290
|
// @__NO_SIDE_EFFECTS__
|
|
3291
3291
|
function nr() {
|
|
3292
|
-
return rr(
|
|
3292
|
+
return rr(p.pipe(
|
|
3293
3293
|
v(),
|
|
3294
3294
|
L,
|
|
3295
3295
|
y
|
|
@@ -3297,7 +3297,7 @@ function nr() {
|
|
|
3297
3297
|
}
|
|
3298
3298
|
const ir = /* @__PURE__ */ nr(), Kn = /* @__PURE__ */ h(ir);
|
|
3299
3299
|
function or({ invokeCustomMethod: n, ...e }) {
|
|
3300
|
-
return A((s) =>
|
|
3300
|
+
return A((s) => p.pipe(
|
|
3301
3301
|
n("getCurrentTime", {}, s),
|
|
3302
3302
|
u.chain((r) => {
|
|
3303
3303
|
const i = Fe(
|
|
@@ -3310,7 +3310,7 @@ function or({ invokeCustomMethod: n, ...e }) {
|
|
|
3310
3310
|
}
|
|
3311
3311
|
// @__NO_SIDE_EFFECTS__
|
|
3312
3312
|
function ar() {
|
|
3313
|
-
return or(
|
|
3313
|
+
return or(p.pipe(
|
|
3314
3314
|
v(),
|
|
3315
3315
|
Re,
|
|
3316
3316
|
y
|
|
@@ -3322,7 +3322,7 @@ function pr({ postEvent: n, ...e }) {
|
|
|
3322
3322
|
}
|
|
3323
3323
|
// @__NO_SIDE_EFFECTS__
|
|
3324
3324
|
function ur() {
|
|
3325
|
-
return pr(
|
|
3325
|
+
return pr(p.pipe(
|
|
3326
3326
|
v(),
|
|
3327
3327
|
T,
|
|
3328
3328
|
y
|
|
@@ -3332,7 +3332,7 @@ const lr = /* @__PURE__ */ ur(), Nn = /* @__PURE__ */ h(lr);
|
|
|
3332
3332
|
function dr({ request: n, createRequestId: e, ...s }) {
|
|
3333
3333
|
return A((r) => {
|
|
3334
3334
|
const i = e();
|
|
3335
|
-
return
|
|
3335
|
+
return p.pipe(
|
|
3336
3336
|
n("web_app_read_text_from_clipboard", "clipboard_text_received", {
|
|
3337
3337
|
...r,
|
|
3338
3338
|
params: { req_id: i },
|
|
@@ -3345,7 +3345,7 @@ function dr({ request: n, createRequestId: e, ...s }) {
|
|
|
3345
3345
|
// @__NO_SIDE_EFFECTS__
|
|
3346
3346
|
function hr() {
|
|
3347
3347
|
return dr({
|
|
3348
|
-
...
|
|
3348
|
+
...p.pipe(
|
|
3349
3349
|
v(),
|
|
3350
3350
|
y,
|
|
3351
3351
|
L
|
|
@@ -3359,13 +3359,13 @@ function br(n) {
|
|
|
3359
3359
|
if (s) {
|
|
3360
3360
|
const [, r, i] = s;
|
|
3361
3361
|
r && (e.appVersion = r), i && i.slice(1, i.length - 1).split(";").forEach((o) => {
|
|
3362
|
-
const [
|
|
3363
|
-
if (
|
|
3362
|
+
const [c, a] = o.trim().split(" ");
|
|
3363
|
+
if (c === "Android")
|
|
3364
3364
|
e.androidVersion = a;
|
|
3365
|
-
else if (
|
|
3365
|
+
else if (c === "SDK") {
|
|
3366
3366
|
const l = parseInt(a, 10);
|
|
3367
3367
|
l && (e.sdkVersion = l);
|
|
3368
|
-
} else a ? (e.manufacturer =
|
|
3368
|
+
} else a ? (e.manufacturer = c, e.model = a) : e.performanceClass = c;
|
|
3369
3369
|
});
|
|
3370
3370
|
}
|
|
3371
3371
|
return e;
|
|
@@ -3383,11 +3383,11 @@ function fr({ postEvent: n, ...e }) {
|
|
|
3383
3383
|
}
|
|
3384
3384
|
// @__NO_SIDE_EFFECTS__
|
|
3385
3385
|
function gr() {
|
|
3386
|
-
return fr(
|
|
3386
|
+
return fr(p.pipe(v(), T));
|
|
3387
3387
|
}
|
|
3388
3388
|
const mr = /* @__PURE__ */ gr(), Zn = /* @__PURE__ */ h(mr);
|
|
3389
3389
|
function wr({ request: n, ...e }) {
|
|
3390
|
-
return A((s, r) =>
|
|
3390
|
+
return A((s, r) => p.pipe(
|
|
3391
3391
|
n(
|
|
3392
3392
|
"web_app_send_prepared_message",
|
|
3393
3393
|
["prepared_message_failed", "prepared_message_sent"],
|
|
@@ -3401,7 +3401,7 @@ function wr({ request: n, ...e }) {
|
|
|
3401
3401
|
}
|
|
3402
3402
|
// @__NO_SIDE_EFFECTS__
|
|
3403
3403
|
function Fr() {
|
|
3404
|
-
return wr(
|
|
3404
|
+
return wr(p.pipe(
|
|
3405
3405
|
v(),
|
|
3406
3406
|
L,
|
|
3407
3407
|
y
|
|
@@ -3417,7 +3417,7 @@ function Cr({ postEvent: n, ...e }) {
|
|
|
3417
3417
|
}
|
|
3418
3418
|
// @__NO_SIDE_EFFECTS__
|
|
3419
3419
|
function vr() {
|
|
3420
|
-
return Cr(
|
|
3420
|
+
return Cr(p.pipe(
|
|
3421
3421
|
v(),
|
|
3422
3422
|
T,
|
|
3423
3423
|
y
|
|
@@ -3439,7 +3439,7 @@ function yr({ isInlineMode: n, postEvent: e, ...s }) {
|
|
|
3439
3439
|
// @__NO_SIDE_EFFECTS__
|
|
3440
3440
|
function qr() {
|
|
3441
3441
|
return yr({
|
|
3442
|
-
...
|
|
3442
|
+
...p.pipe(
|
|
3443
3443
|
v(),
|
|
3444
3444
|
T,
|
|
3445
3445
|
y
|
|
@@ -3455,7 +3455,7 @@ class Er {
|
|
|
3455
3455
|
onContentSafeAreaInsetsChanged: r,
|
|
3456
3456
|
onSafeAreaInsetsChanged: i,
|
|
3457
3457
|
onViewportChanged: o,
|
|
3458
|
-
onFullscreenChanged:
|
|
3458
|
+
onFullscreenChanged: c,
|
|
3459
3459
|
offContentSafeAreaInsetsChanged: a,
|
|
3460
3460
|
offFullscreenChanged: l,
|
|
3461
3461
|
offSafeAreaInsetsChanged: f,
|
|
@@ -3684,7 +3684,7 @@ class Er {
|
|
|
3684
3684
|
const [J, D] = K === "safe-area" ? ["web_app_request_safe_area", "safe_area_changed"] : ["web_app_request_content_safe_area", "content_safe_area_changed"];
|
|
3685
3685
|
return te(J, P(I)) ? b(J, D, B) : u.right({ top: 0, left: 0, right: 0, bottom: 0 });
|
|
3686
3686
|
}, M = (K) => () => typeof K == "boolean" ? u.right(K) : u.fromEither(K());
|
|
3687
|
-
return
|
|
3687
|
+
return p.pipe(
|
|
3688
3688
|
u.Do,
|
|
3689
3689
|
u.bindW("safeAreaInsets", X("safe-area")),
|
|
3690
3690
|
u.bindW("contentSafeAreaInsets", X("content-safe-area")),
|
|
@@ -3696,7 +3696,7 @@ class Er {
|
|
|
3696
3696
|
isExpanded: !0,
|
|
3697
3697
|
stableHeight: window.innerHeight,
|
|
3698
3698
|
width: window.innerWidth
|
|
3699
|
-
}) :
|
|
3699
|
+
}) : p.pipe(
|
|
3700
3700
|
b("web_app_request_viewport", "viewport_changed", B),
|
|
3701
3701
|
u.map((D) => ({
|
|
3702
3702
|
...J,
|
|
@@ -3710,7 +3710,7 @@ class Er {
|
|
|
3710
3710
|
},
|
|
3711
3711
|
isPageReload: s,
|
|
3712
3712
|
onMounted(B) {
|
|
3713
|
-
o(x),
|
|
3713
|
+
o(x), c(V), i(R), r(H), _.setState(B);
|
|
3714
3714
|
},
|
|
3715
3715
|
onUnmounted() {
|
|
3716
3716
|
F(x), l(V), f(R), a(H);
|
|
@@ -3726,7 +3726,7 @@ class Er {
|
|
|
3726
3726
|
requires: "web_app_request_fullscreen",
|
|
3727
3727
|
version: I,
|
|
3728
3728
|
returns: "task"
|
|
3729
|
-
}), $e = (B) => at((X) =>
|
|
3729
|
+
}), $e = (B) => at((X) => p.pipe(
|
|
3730
3730
|
b(
|
|
3731
3731
|
B ? "web_app_request_fullscreen" : "web_app_exit_fullscreen",
|
|
3732
3732
|
["fullscreen_changed", "fullscreen_failed"],
|
|
@@ -3779,15 +3779,15 @@ class Er {
|
|
|
3779
3779
|
}
|
|
3780
3780
|
function Br() {
|
|
3781
3781
|
const n = (o) => ({
|
|
3782
|
-
on: (
|
|
3783
|
-
j(o,
|
|
3782
|
+
on: (c) => {
|
|
3783
|
+
j(o, c);
|
|
3784
3784
|
},
|
|
3785
|
-
off: (
|
|
3786
|
-
ne(o,
|
|
3785
|
+
off: (c) => {
|
|
3786
|
+
ne(o, c);
|
|
3787
3787
|
}
|
|
3788
3788
|
}), e = n("viewport_changed"), s = n("fullscreen_changed"), r = n("safe_area_changed"), i = n("content_safe_area_changed");
|
|
3789
3789
|
return new Er({
|
|
3790
|
-
...
|
|
3790
|
+
...p.pipe(
|
|
3791
3791
|
v(),
|
|
3792
3792
|
Z("viewport"),
|
|
3793
3793
|
y,
|
|
@@ -3795,10 +3795,10 @@ function Br() {
|
|
|
3795
3795
|
L
|
|
3796
3796
|
),
|
|
3797
3797
|
isFullscreen() {
|
|
3798
|
-
return
|
|
3798
|
+
return p.pipe(le(), m.map((o) => !!o.vbWebAppFullscreen));
|
|
3799
3799
|
},
|
|
3800
3800
|
isViewportStable() {
|
|
3801
|
-
return
|
|
3801
|
+
return p.pipe(le(), m.map((o) => ["macos", "tdesktop", "unigram", "webk", "weba", "web"].includes(o.vbWebAppPlatform)));
|
|
3802
3802
|
},
|
|
3803
3803
|
offContentSafeAreaInsetsChanged: i.off,
|
|
3804
3804
|
offFullscreenChanged: s.off,
|
|
@@ -3838,7 +3838,7 @@ class Ar {
|
|
|
3838
3838
|
* Convenience method to select a folder.
|
|
3839
3839
|
*/
|
|
3840
3840
|
t(this, "selectFolder");
|
|
3841
|
-
this.requestAccessFp = (s) =>
|
|
3841
|
+
this.requestAccessFp = (s) => p.pipe(
|
|
3842
3842
|
e("web_app_request_storage_access", "storage_access_granted", {
|
|
3843
3843
|
params: {
|
|
3844
3844
|
access_type: s.accessType,
|
|
@@ -4599,7 +4599,7 @@ function rn(n = {}) {
|
|
|
4599
4599
|
if (e && typeof s == "boolean" && r)
|
|
4600
4600
|
Ce.set(e), ke.set(s), ve.set(r);
|
|
4601
4601
|
else {
|
|
4602
|
-
const a =
|
|
4602
|
+
const a = p.pipe(le(), m.matchW(
|
|
4603
4603
|
(l) => l,
|
|
4604
4604
|
(l) => {
|
|
4605
4605
|
Ce.set(e || l.vbWebAppVersion), ke.set(typeof s == "boolean" ? s : !!l.vbWebAppBotInline), ve.set(r || l.vbWebAppThemeParams);
|
|
@@ -4613,8 +4613,8 @@ function rn(n = {}) {
|
|
|
4613
4613
|
j("reload_iframe", () => {
|
|
4614
4614
|
He().log("Received a request to reload the page"), Tt("iframe_will_reload"), window.location.reload();
|
|
4615
4615
|
})
|
|
4616
|
-
), { acceptCustomStyles:
|
|
4617
|
-
if (
|
|
4616
|
+
), { acceptCustomStyles: c = !0 } = n;
|
|
4617
|
+
if (c) {
|
|
4618
4618
|
const a = document.createElement("style");
|
|
4619
4619
|
a.id = "telegram-custom-styles", document.head.appendChild(a), i(
|
|
4620
4620
|
j("set_custom_style", (l) => {
|
|
@@ -4625,7 +4625,7 @@ function rn(n = {}) {
|
|
|
4625
4625
|
}
|
|
4626
4626
|
);
|
|
4627
4627
|
}
|
|
4628
|
-
return
|
|
4628
|
+
return p.pipe(
|
|
4629
4629
|
re("iframe_ready", { reload_supported: !0 }),
|
|
4630
4630
|
m.map(() => (He().log("The package was initialized"), o))
|
|
4631
4631
|
);
|