@vbotma/sdk 3.3.9 → 5.0.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/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
- var pt = Object.defineProperty;
2
- var ut = (n, e, s) => e in n ? pt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[e] = s;
3
- var t = (n, e, s) => ut(n, typeof e != "symbol" ? e + "" : e, s);
1
+ var ct = Object.defineProperty;
2
+ var pt = (n, e, s) => e in n ? ct(n, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[e] = s;
3
+ var t = (n, e, s) => pt(n, typeof e != "symbol" ? e + "" : e, s);
4
4
  import { batch as ue, signal as O, computed as S } from "@vbotma/signals";
5
- import { supports as te, isVBmaFp as lt, postEventFp as qe, off as ne, on as j, request2Fp as Ge, requestFp as dt, invokeCustomMethodFp as ht, retrieveLaunchParamsFp as le, retrieveRawInitDataFp as _t, captureSameReq as bt, getHostBridge as d, LATEST_VERSION as be, compareVersions as ft, logger as fe } from "@vbotma/bridge";
6
- import { CancelledError as Vi, InvalidLaunchParamsError as Ti, InvokeCustomMethodFailedError as Li, LaunchParamsRetrieveError as $i, MethodParameterUnsupportedError as Pi, MethodUnsupportedError as Hi, TimeoutError as Oi, UnknownEnvError as Di, applyPolyfills as ji, createLogger as Gi, createPostEvent as Wi, createStartParam as Ui, createStartParamFp as Ki, debug as Qi, decodeBase64Url as Ni, decodeBase64UrlFp as zi, decodeStartParam as Ji, decodeStartParamFp as Yi, deepSnakeToCamelObjKeys as Zi, defineHostBridge as Xi, defineWebComponentBridge as eo, emitEvent as to, encodeBase64Url as so, getHostBridge as ro, getReleaseVersion as no, isSafeToCreateStartParam as io, isVBma as oo, isVBmaFp as ao, logger as co, mockVBotEnv as po, off as uo, offAll as lo, on as ho, retrieveLaunchParams as _o, retrieveLaunchParamsFp as bo, retrieveRawInitData as fo, retrieveRawInitDataFp as go, retrieveRawLaunchParams as mo, retrieveRawLaunchParamsFp as wo, setDebug as Fo, setLaunchParams as So, setTargetOrigin as Co, supports as vo, targetOrigin as ko } from "@vbotma/bridge";
7
- import { throwifyFpFn as he, throwifyAnyEither as We, setStorageValue as gt, getStorageValue as mt, snakeToKebab as wt, createCbCollector as Ie, camelToKebab as Ue, BetterTaskEither as Se } from "@vbotma/toolkit";
8
- import { BetterPromise as Ke } from "better-promises";
9
- import { toRGBFullFp as Ft, isRGB as ge, pipeQueryToSchema as St, pipeJsonToSchema as Ct } from "@vbotma/transformers";
10
- import { isAnyRGB as qo, isRGB as Io, isRGBA as Eo, isRGBAShort as Bo, isRGBShort as Ao, parseInitDataQuery as xo, parseInitDataQueryFp as Mo, parseLaunchParamsQuery as Ro, parseLaunchParamsQueryFp as Vo, serializeInitDataQuery as To, serializeLaunchParamsQuery as Lo, toRGB as $o, toRGBFp as Po, toRGBFull as Ho, toRGBFullFp as Oo } from "@vbotma/transformers";
5
+ import { supports as te, isVBmaFp as ut, postEventFp as ye, off as ne, on as j, request2Fp as Ge, requestFp as lt, invokeCustomMethodFp as dt, retrieveLaunchParamsFp as le, retrieveRawInitDataFp as ht, captureSameReq as _t, getHostBridge as d, LATEST_VERSION as bt, logger as He } from "@vbotma/bridge";
6
+ import { CancelledError as Ri, InvalidLaunchParamsError as Ti, InvokeCustomMethodFailedError as Vi, LaunchParamsRetrieveError as Li, MethodParameterUnsupportedError as $i, MethodUnsupportedError as Pi, TimeoutError as Hi, UnknownEnvError as Oi, applyPolyfills as Di, createLogger as ji, createPostEvent as Gi, createStartParam as Wi, createStartParamFp as Ui, debug as Qi, decodeBase64Url as Ki, decodeBase64UrlFp as Ni, decodeStartParam as zi, decodeStartParamFp as Ji, deepSnakeToCamelObjKeys as Yi, defineHostBridge as Zi, defineWebComponentBridge as Xi, emitEvent as eo, encodeBase64Url as to, getHostBridge as so, getReleaseVersion as ro, isSafeToCreateStartParam as no, isVBma as io, isVBmaFp as oo, logger as ao, mockVBotEnv as co, off as po, offAll as uo, on as lo, retrieveLaunchParams as ho, retrieveLaunchParamsFp as _o, retrieveRawInitData as bo, retrieveRawInitDataFp as fo, retrieveRawLaunchParams as go, retrieveRawLaunchParamsFp as mo, setDebug as wo, setLaunchParams as Fo, setTargetOrigin as So, supports as Co, targetOrigin as vo } from "@vbotma/bridge";
7
+ import { throwifyFpFn as he, throwifyAnyEither as We, setStorageValue as ft, getStorageValue as gt, snakeToKebab as mt, createCbCollector as qe, camelToKebab as Ue, BetterTaskEither as we } from "@vbotma/toolkit";
8
+ import { BetterPromise as Qe } from "better-promises";
9
+ import { toRGBFullFp as wt, isRGB as be, pipeQueryToSchema as Ft, pipeJsonToSchema as St } from "@vbotma/transformers";
10
+ import { isAnyRGB as yo, isRGB as qo, isRGBA as Io, isRGBAShort as Eo, isRGBShort as Bo, parseInitDataQuery as Ao, parseInitDataQueryFp as xo, parseLaunchParamsQuery as Mo, parseLaunchParamsQueryFp as Ro, serializeInitDataQuery as To, serializeLaunchParamsQuery as Vo, toRGB as Lo, toRGBFp as $o, toRGBFull as Po, toRGBFullFp as Ho } from "@vbotma/transformers";
11
11
  import { either as m, function as p, option as z, taskEither as u } from "fp-ts";
12
- import { errorClass as G, errorClassWithData as Ee } from "error-kid";
13
- import { parse as Oe, record as vt, string as N, array as kt, safeParse as Ce, looseObject as De, pipe as Qe, transform as Ne, date as ze, optional as yt, number as Je, integer as qt } from "valibot";
12
+ import { errorClass as G, errorClassWithData as Ie } from "error-kid";
13
+ import { parse as Oe, record as Ct, string as N, array as vt, safeParse as Fe, looseObject as De, pipe as Ke, transform as Ne, date as ze, optional as kt, number as Je, integer as yt } from "valibot";
14
14
  function P(n) {
15
15
  return typeof n == "function" ? n() : n;
16
16
  }
@@ -51,7 +51,7 @@ class ie {
51
51
  };
52
52
  }
53
53
  }
54
- function ve(n) {
54
+ function Se(n) {
55
55
  const e = {};
56
56
  for (const s in n) {
57
57
  const r = n[s];
@@ -59,7 +59,7 @@ function ve(n) {
59
59
  }
60
60
  return e;
61
61
  }
62
- function me(n, e) {
62
+ function fe(n, e) {
63
63
  const s = Object.keys(n), r = Object.keys(e);
64
64
  return s.length !== r.length ? !1 : s.every((i) => Object.prototype.hasOwnProperty.call(e, i) && n[i] === e[i]);
65
65
  }
@@ -75,10 +75,10 @@ class Y {
75
75
  * @param state - updates to apply.
76
76
  */
77
77
  t(this, "setState", (e) => {
78
- const s = { ...this.state(), ...ve(e) };
79
- me(s, this.state()) || this._state.set(s);
78
+ const s = { ...this.state(), ...Se(e) };
79
+ fe(s, this.state()) || this._state.set(s);
80
80
  });
81
- this._state = O(e, { equals: me }), this.state = S(this._state), this.state.sub(s);
81
+ this._state = O(e, { equals: fe }), this.state = S(this._state), this.state.sub(s);
82
82
  }
83
83
  /**
84
84
  * Creates a computed signal based on the state.
@@ -92,7 +92,7 @@ class Y {
92
92
  * @param state
93
93
  */
94
94
  hasDiff(e) {
95
- return !me({ ...this.state(), ...ve(e) }, this.state());
95
+ return !fe({ ...this.state(), ...Se(e) }, this.state());
96
96
  }
97
97
  }
98
98
  function W(n, e) {
@@ -118,47 +118,47 @@ function h(n) {
118
118
  function ee(n) {
119
119
  return [n];
120
120
  }
121
- class pe extends (/* @__PURE__ */ Ee(
121
+ class pe extends (/* @__PURE__ */ Ie(
122
122
  "ValidationError",
123
123
  (e, s) => ({ input: e, issues: s }),
124
124
  "Validation error"
125
125
  )) {
126
126
  }
127
- class Be extends (/* @__PURE__ */ G(
127
+ class Ee extends (/* @__PURE__ */ G(
128
128
  "CSSVarsBoundError",
129
129
  "CSS variables are already bound"
130
130
  )) {
131
131
  }
132
- class It extends (/* @__PURE__ */ Ee("DeviceStorageMethodError", (e) => ({ error: e }), (e) => [e])) {
132
+ class qt extends (/* @__PURE__ */ Ie("DeviceStorageMethodError", (e) => ({ error: e }), (e) => [e])) {
133
133
  }
134
- class Et extends (/* @__PURE__ */ Ee("SecureStorageMethodError", (e) => ({ error: e }), (e) => [e])) {
134
+ class It extends (/* @__PURE__ */ Ie("SecureStorageMethodError", (e) => ({ error: e }), (e) => [e])) {
135
135
  }
136
- class Bt extends (/* @__PURE__ */ G(
136
+ class Et extends (/* @__PURE__ */ G(
137
137
  "NotAvailableError",
138
138
  ee
139
139
  )) {
140
140
  }
141
- class fn extends (/* @__PURE__ */ G(
141
+ class bn extends (/* @__PURE__ */ G(
142
142
  "InvalidEnvError",
143
143
  ee
144
144
  )) {
145
145
  }
146
- class At extends (/* @__PURE__ */ G(
146
+ class Bt extends (/* @__PURE__ */ G(
147
147
  "FunctionNotAvailableError",
148
148
  ee
149
149
  )) {
150
150
  }
151
- class K extends (/* @__PURE__ */ G(
151
+ class Q extends (/* @__PURE__ */ G(
152
152
  "InvalidArgumentsError",
153
153
  (e, s) => [e, { cause: s }]
154
154
  )) {
155
155
  }
156
- class Ae extends (/* @__PURE__ */ G(
156
+ class Be extends (/* @__PURE__ */ G(
157
157
  "ConcurrentCallError",
158
158
  ee
159
159
  )) {
160
160
  }
161
- class xt extends (/* @__PURE__ */ G(
161
+ class At extends (/* @__PURE__ */ G(
162
162
  "SetEmojiStatusError",
163
163
  (e) => [`Failed to set emoji status: ${e}`]
164
164
  )) {
@@ -168,17 +168,17 @@ class Ye extends (/* @__PURE__ */ G(
168
168
  ee
169
169
  )) {
170
170
  }
171
- class Mt extends (/* @__PURE__ */ G(
171
+ class xt extends (/* @__PURE__ */ G(
172
172
  "FullscreenFailedError",
173
173
  ee
174
174
  )) {
175
175
  }
176
- class Rt extends (/* @__PURE__ */ G(
176
+ class Mt extends (/* @__PURE__ */ G(
177
177
  "ShareMessageError",
178
178
  ee
179
179
  )) {
180
180
  }
181
- class Vt extends (/* @__PURE__ */ G(
181
+ class Rt extends (/* @__PURE__ */ G(
182
182
  "UnknownThemeParamsKeyError",
183
183
  (e) => [`Unknown theme params key passed: ${e}`]
184
184
  )) {
@@ -193,37 +193,37 @@ function A(n, e) {
193
193
  if (!c)
194
194
  return;
195
195
  const [g, w] = "every" in c ? ["every", c.every] : ["some", c.some];
196
- for (let b = 0; b < w.length; b++) {
197
- const x = w[b], T = typeof x == "function" ? x() : te(x, s()) ? void 0 : `it is unsupported in Mini Apps version ${s()}`;
198
- if (T && (g === "every" || b === w.length - 1))
199
- return T;
196
+ for (let _ = 0; _ < w.length; _++) {
197
+ const x = w[_], V = typeof x == "function" ? x() : te(x, s()) ? void 0 : `it is unsupported in Mini Apps version ${s()}`;
198
+ if (V && (g === "every" || _ === w.length - 1))
199
+ return V;
200
200
  }
201
- }, _ = (...g) => {
201
+ }, f = (...g) => {
202
202
  for (const w in e.supports)
203
203
  if (e.supports[w].shouldCheck(...g) && !a(w))
204
204
  return `option ${w} is not supported in Mini Apps version ${s()}`;
205
- }, F = S(() => !l()), f = S(() => s() !== "0.0"), k = S(() => e.isMounted ? e.isMounted() : !0), C = S(
206
- () => r() && f() && F() && k()
205
+ }, F = S(() => !l()), b = S(() => s() !== "0.0"), k = S(() => e.isMounted ? e.isMounted() : !0), C = S(
206
+ () => r() && b() && F() && k()
207
207
  ), q = (g) => {
208
- const w = new At(g);
208
+ const w = new Bt(g);
209
209
  return ["task", "promise"].includes(e.returns) ? u.left(w) : m.left(w);
210
210
  }, I = (...g) => o === "plain" ? m.tryCatch(() => n(...g), (w) => w) : o === "promise" ? u.tryCatch(() => n(...g), (w) => w) : n(...g);
211
211
  return Object.assign(
212
212
  (...g) => {
213
- var T;
213
+ var V;
214
214
  const w = "Unable to call function:";
215
215
  if (!r())
216
216
  return q(`${w} it can't be called outside Mini Apps`);
217
- if (!f())
217
+ if (!b())
218
218
  return q(`${w} the SDK was not initialized. Use the SDK init() function`);
219
- const b = l();
220
- if (b)
221
- return q(`${w} ${b}`);
222
- const x = _(...g);
219
+ const _ = l();
220
+ if (_)
221
+ return q(`${w} ${_}`);
222
+ const x = f(...g);
223
223
  if (x)
224
224
  return q(`${w} ${x}`);
225
225
  if (!k()) {
226
- const R = (T = e.isMounting) != null && T.call(e) ? "mounting. Wait for the mount completion" : "unmounted. Use the mount() method";
226
+ const R = (V = e.isMounting) != null && V.call(e) ? "mounting. Wait for the mount completion" : "unmounted. Use the mount() method";
227
227
  return q(`${w} the component is ${R}`);
228
228
  }
229
229
  return I(...g);
@@ -252,7 +252,7 @@ class _e {
252
252
  isPageReload: c,
253
253
  postEvent: a,
254
254
  payload: l,
255
- method: _,
255
+ method: f,
256
256
  version: F
257
257
  }) {
258
258
  /**
@@ -334,7 +334,7 @@ class _e {
334
334
  * @see onClick
335
335
  */
336
336
  t(this, "unmount");
337
- const f = new Y({
337
+ const b = new Y({
338
338
  initialState: o,
339
339
  onChange(g) {
340
340
  s.set(g);
@@ -342,9 +342,9 @@ class _e {
342
342
  }), k = new ie({
343
343
  initialState: o,
344
344
  isPageReload: c,
345
- onMounted: f.setState,
345
+ onMounted: b.setState,
346
346
  restoreState: s.get
347
- }), C = { version: F, requires: _, isVBma: e }, q = E({
347
+ }), C = { version: F, requires: f, isVBma: e }, q = E({
348
348
  ...C,
349
349
  returns: "plain"
350
350
  }), I = E({
@@ -352,12 +352,12 @@ class _e {
352
352
  returns: "either",
353
353
  isMounted: k.isMounted
354
354
  });
355
- this.isMounted = k.isMounted, this.isSupported = W(_, F), this.state = f.state, this.setStateFp = I((g) => {
356
- const w = { ...this.state(), ...ve(g) };
357
- return f.hasDiff(w) ? p.pipe(
358
- a(_, l(w)),
355
+ this.isMounted = k.isMounted, this.isSupported = W(f, F), this.state = b.state, this.setStateFp = I((g) => {
356
+ const w = { ...this.state(), ...Se(g) };
357
+ return b.hasDiff(w) ? p.pipe(
358
+ a(f, l(w)),
359
359
  m.map(() => {
360
- f.setState(w);
360
+ b.setState(w);
361
361
  })
362
362
  ) : m.right(void 0);
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(() => {
@@ -365,12 +365,12 @@ class _e {
365
365
  };
366
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
- const w = I((b) => this.setStateFp({ [g]: b }));
368
+ const w = I((_) => this.setStateFp({ [g]: _ }));
369
369
  return [/* @__PURE__ */ h(w), w];
370
370
  }, this.stateBoolSetters = (g) => {
371
- const [, w] = this.stateSetters(g), b = I(() => w(!1)), x = I(() => w(!0));
371
+ const [, w] = this.stateSetters(g), _ = I(() => w(!1)), x = I(() => w(!0));
372
372
  return [
373
- [/* @__PURE__ */ h(b), b],
373
+ [/* @__PURE__ */ h(_), _],
374
374
  [/* @__PURE__ */ h(x), x]
375
375
  ];
376
376
  };
@@ -476,7 +476,7 @@ class Tt {
476
476
  }
477
477
  }
478
478
  function v() {
479
- return { isVBma: S(() => lt()) };
479
+ return { isVBma: S(() => ut()) };
480
480
  }
481
481
  function se(n) {
482
482
  return (e) => ({ ...e, ...P(n) });
@@ -485,37 +485,37 @@ function se(n) {
485
485
  function oe(n, e) {
486
486
  return O(n, e);
487
487
  }
488
- const Ze = /* @__PURE__ */ oe(qe), re = (...n) => Ze()(...n), Lt = (...n) => We(re(...n)), V = se({
488
+ const Ze = /* @__PURE__ */ oe(ye), re = (...n) => Ze()(...n), Vt = (...n) => We(re(...n)), T = se({
489
489
  postEvent: re
490
490
  });
491
- function $t(n) {
491
+ function Lt(n) {
492
492
  return {
493
- get: () => mt(n),
493
+ get: () => gt(n),
494
494
  set(e) {
495
- gt(n, e);
495
+ ft(n, e);
496
496
  }
497
497
  };
498
498
  }
499
- function Pt() {
499
+ function $t() {
500
500
  return performance.getEntriesByType("navigation")[0];
501
501
  }
502
- function Ht() {
503
- const n = Pt();
502
+ function Pt() {
503
+ const n = $t();
504
504
  return !!n && n.type === "reload";
505
505
  }
506
506
  function Z(n) {
507
507
  return se({
508
- storage: $t(n),
509
- isPageReload: Ht
508
+ storage: Lt(n),
509
+ isPageReload: Pt
510
510
  });
511
511
  }
512
- const Xe = /* @__PURE__ */ oe("0.0"), y = se({ version: Xe });
512
+ const Ce = /* @__PURE__ */ oe("0.0"), y = se({ version: Ce });
513
513
  // @__NO_SIDE_EFFECTS__
514
- function xe(n, e) {
514
+ function Ae(n, e) {
515
515
  return {
516
516
  ...p.pipe(
517
517
  v(),
518
- V,
518
+ T,
519
519
  y,
520
520
  Z(n)
521
521
  ),
@@ -527,10 +527,10 @@ function xe(n, e) {
527
527
  }
528
528
  };
529
529
  }
530
- const gn = /* @__PURE__ */ new Tt(
531
- /* @__PURE__ */ xe("backButton", "back_button_pressed")
530
+ const fn = /* @__PURE__ */ new Tt(
531
+ /* @__PURE__ */ Ae("backButton", "back_button_pressed")
532
532
  );
533
- class Me {
533
+ class xe {
534
534
  constructor({
535
535
  initialState: e,
536
536
  onMounted: s,
@@ -572,13 +572,13 @@ class Me {
572
572
  }
573
573
  }
574
574
  function je() {
575
- return new Bt("Biometry is not available");
575
+ return new Et("Biometry is not available");
576
576
  }
577
- function we(n) {
577
+ function ge(n) {
578
578
  let e = !1, s = !1, r = "", i = !1, o = "", c = !1;
579
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
- class Ot {
581
+ class Ht {
582
582
  constructor({
583
583
  version: e,
584
584
  request: s,
@@ -676,8 +676,8 @@ class Ot {
676
676
  * Unmounts the component.
677
677
  */
678
678
  t(this, "unmount");
679
- const _ = (g) => {
680
- F.setState(we(g));
679
+ const f = (g) => {
680
+ F.setState(ge(g));
681
681
  }, F = new Y({
682
682
  initialState: {
683
683
  available: !1,
@@ -688,19 +688,19 @@ class Ot {
688
688
  tokenSaved: !1
689
689
  },
690
690
  onChange: i.set
691
- }), f = new Me({
691
+ }), b = new xe({
692
692
  initialState(g) {
693
693
  return p.pipe(
694
694
  s("web_app_biometry_get_info", "biometry_info_received", g),
695
- u.map(we)
695
+ u.map(ge)
696
696
  );
697
697
  },
698
698
  isPageReload: l,
699
699
  onMounted(g) {
700
- F.setState(g), o(_);
700
+ F.setState(g), o(f);
701
701
  },
702
702
  onUnmounted() {
703
- c(_);
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({
@@ -711,10 +711,10 @@ class Ot {
711
711
  returns: "task"
712
712
  }), I = E({
713
713
  ...k,
714
- isMounted: f.isMounted,
714
+ isMounted: b.isMounted,
715
715
  returns: "task"
716
716
  });
717
- this.isAvailable = F.getter("available"), this.isMounted = f.isMounted, this.isSupported = W("web_app_biometry_request_auth", e), this.state = F.state, this.unmount = f.unmount, this.mountFp = q(f.mount), this.authenticateFp = I((g) => this.isAvailable() ? p.pipe(
717
+ this.isAvailable = F.getter("available"), this.isMounted = b.isMounted, this.isSupported = W("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() }
@@ -726,8 +726,8 @@ class Ot {
726
726
  params: { reason: ((g || {}).reason || "").trim() }
727
727
  }),
728
728
  u.chain((w) => {
729
- const b = we(w);
730
- return b.available ? (F.setState(b), u.right(b.accessRequested)) : u.left(je());
729
+ const _ = ge(w);
730
+ return _.available ? (F.setState(_), u.right(_.accessRequested)) : u.left(je());
731
731
  })
732
732
  )), this.updateTokenFp = I((g = {}) => {
733
733
  var w;
@@ -736,23 +736,23 @@ class Ot {
736
736
  ...g,
737
737
  params: { token: g.token || "", reason: (w = g.reason) == null ? void 0 : w.trim() }
738
738
  }),
739
- u.map((b) => b.status)
739
+ u.map((_) => _.status)
740
740
  );
741
741
  }), this.authenticate = /* @__PURE__ */ h(this.authenticateFp), this.openSettings = /* @__PURE__ */ h(this.openSettingsFp), this.requestAccess = /* @__PURE__ */ h(this.requestAccessFp), this.updateToken = /* @__PURE__ */ h(this.updateTokenFp), this.mount = /* @__PURE__ */ h(this.mountFp);
742
742
  }
743
743
  }
744
- const Dt = (n, e, s) => dt(n, e, {
744
+ const Ot = (n, e, s) => lt(n, e, {
745
745
  postEvent: re,
746
746
  ...s
747
- }), et = (n, e, s) => Ge(n, e, {
747
+ }), Xe = (n, e, s) => Ge(n, e, {
748
748
  postEvent: re,
749
749
  ...s
750
- }), mn = (...n) => Ke.fn(() => Dt(...n)()), wn = (...n) => Ke.fn(() => et(...n)()), L = se({ request: et });
751
- function jt() {
752
- return new Ot({
750
+ }), gn = (...n) => Qe.fn(() => Ot(...n)()), mn = (...n) => Qe.fn(() => Xe(...n)()), L = se({ request: Xe });
751
+ function Dt() {
752
+ return new Ht({
753
753
  ...p.pipe(
754
754
  v(),
755
- V,
755
+ T,
756
756
  y,
757
757
  L,
758
758
  Z("biometry")
@@ -765,8 +765,8 @@ function jt() {
765
765
  }
766
766
  });
767
767
  }
768
- const Fn = /* @__PURE__ */ jt();
769
- class Gt {
768
+ const wn = /* @__PURE__ */ Dt();
769
+ class jt {
770
770
  constructor({ postEvent: e, storage: s, isVBma: r, isPageReload: i }) {
771
771
  /**
772
772
  * Signal indicating if closing confirmation dialog is currently enabled.
@@ -806,8 +806,8 @@ class Gt {
806
806
  t(this, "enableConfirmation");
807
807
  const o = new Y({
808
808
  initialState: { isConfirmationEnabled: !1 },
809
- onChange(f) {
810
- s.set(f);
809
+ onChange(b) {
810
+ s.set(b);
811
811
  }
812
812
  }), c = new ie({
813
813
  onMounted: o.setState,
@@ -817,29 +817,29 @@ class Gt {
817
817
  }), a = { requires: "web_app_setup_closing_behavior", isVBma: r }, l = E({
818
818
  ...a,
819
819
  returns: "plain"
820
- }), _ = E({
820
+ }), f = E({
821
821
  ...a,
822
822
  returns: "either",
823
823
  isMounted: c.isMounted
824
- }), F = (f) => f === this.isConfirmationEnabled() ? m.right(void 0) : (o.setState({ isConfirmationEnabled: f }), e("web_app_setup_closing_behavior", {
825
- need_confirmation: f
824
+ }), F = (b) => b === this.isConfirmationEnabled() ? m.right(void 0) : (o.setState({ isConfirmationEnabled: b }), e("web_app_setup_closing_behavior", {
825
+ need_confirmation: b
826
826
  }));
827
- this.isConfirmationEnabled = o.getter("isConfirmationEnabled"), this.isMounted = c.isMounted, this.disableConfirmationFp = _(() => F(!1)), this.enableConfirmationFp = _(() => F(!0)), this.mountFp = l(() => {
828
- const f = () => {
827
+ this.isConfirmationEnabled = o.getter("isConfirmationEnabled"), this.isMounted = c.isMounted, this.disableConfirmationFp = f(() => F(!1)), this.enableConfirmationFp = f(() => F(!0)), this.mountFp = l(() => {
828
+ const b = () => {
829
829
  };
830
- return p.pipe(c.mount(), m.match(f, f));
830
+ return p.pipe(c.mount(), m.match(b, b));
831
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
- function Wt() {
835
- return new Gt(p.pipe(
834
+ function Gt() {
835
+ return new jt(p.pipe(
836
836
  v(),
837
837
  Z("closingBehavior"),
838
- V
838
+ T
839
839
  ));
840
840
  }
841
- const Sn = /* @__PURE__ */ Wt();
842
- class Ut {
841
+ const Fn = /* @__PURE__ */ Gt();
842
+ class Wt {
843
843
  constructor({ version: e, isVBma: s, invokeCustomMethod: r }) {
844
844
  /**
845
845
  * Signal indicating if the component is supported.
@@ -930,12 +930,12 @@ class Ut {
930
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
- ...o.reduce((l, _) => (l[_] = "", l), {}),
934
- ...Oe(vt(N(), N()), a)
933
+ ...o.reduce((l, f) => (l[f] = "", l), {}),
934
+ ...Oe(Ct(N(), N()), a)
935
935
  }))
936
936
  )), this.getKeysFp = i((o) => p.pipe(
937
937
  r("getStorageKeys", {}, o),
938
- u.map((c) => Oe(kt(N()), c))
938
+ u.map((c) => Oe(vt(N()), c))
939
939
  )), this.setItemFp = i((o, c, a) => p.pipe(
940
940
  r("saveStorageValue", { key: o, value: c }, a),
941
941
  u.map(() => {
@@ -943,28 +943,28 @@ class Ut {
943
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
- const Fe = /* @__PURE__ */ oe(0);
947
- function Re() {
948
- return Fe.set(Fe() + 1), Fe().toString();
946
+ const me = /* @__PURE__ */ oe(0);
947
+ function Me() {
948
+ return me.set(me() + 1), me().toString();
949
949
  }
950
- function Kt(n, e, s) {
951
- return ht(n, e, Re(), {
950
+ function Ut(n, e, s) {
951
+ return dt(n, e, Me(), {
952
952
  ...s || {},
953
953
  postEvent: re
954
954
  });
955
955
  }
956
- const Ve = se({
957
- invokeCustomMethod: Kt
956
+ const Re = se({
957
+ invokeCustomMethod: Ut
958
958
  });
959
959
  function Qt() {
960
- return new Ut(p.pipe(
960
+ return new Wt(p.pipe(
961
961
  v(),
962
962
  y,
963
- Ve
963
+ Re
964
964
  ));
965
965
  }
966
- const Cn = /* @__PURE__ */ Qt();
967
- class Nt {
966
+ const Sn = /* @__PURE__ */ Qt();
967
+ class Kt {
968
968
  constructor({ isVBma: e, request: s, version: r, createRequestId: i }) {
969
969
  /**
970
970
  * Retrieves an item using its key.
@@ -1007,14 +1007,14 @@ class Nt {
1007
1007
  requires: "web_app_device_storage_get_key",
1008
1008
  isVBma: e,
1009
1009
  returns: "task"
1010
- }), c = (a, l, _) => {
1010
+ }), c = (a, l, f) => {
1011
1011
  const F = i();
1012
1012
  return p.pipe(
1013
1013
  s(a, ["device_storage_failed", l], {
1014
- params: { ..._, req_id: F },
1015
- capture: ((f) => "payload" in f ? f.payload.req_id === F : !0)
1014
+ params: { ...f, req_id: F },
1015
+ capture: ((b) => "payload" in b ? b.payload.req_id === F : !0)
1016
1016
  }),
1017
- u.chain((f) => f.event === "device_storage_failed" ? u.left(new It(f.payload.error || "UNKNOWN_ERROR")) : u.right(f.payload))
1017
+ u.chain((b) => b.event === "device_storage_failed" ? u.left(new qt(b.payload.error || "UNKNOWN_ERROR")) : u.right(b.payload))
1018
1018
  );
1019
1019
  };
1020
1020
  this.getItemFp = o((a) => p.pipe(
@@ -1031,32 +1031,32 @@ class Nt {
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);
1032
1032
  }
1033
1033
  }
1034
- const tt = se({ createRequestId: Re });
1035
- function zt() {
1036
- return new Nt(p.pipe(
1034
+ const et = se({ createRequestId: Me });
1035
+ function Nt() {
1036
+ return new Kt(p.pipe(
1037
1037
  v(),
1038
1038
  y,
1039
1039
  L,
1040
- tt
1040
+ et
1041
1041
  ));
1042
1042
  }
1043
- const vn = /* @__PURE__ */ zt();
1044
- function Jt({ request: n, ...e }) {
1043
+ const Cn = /* @__PURE__ */ Nt();
1044
+ function zt({ request: n, ...e }) {
1045
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
- function Yt() {
1052
- return Jt(p.pipe(
1051
+ function Jt() {
1052
+ return zt(p.pipe(
1053
1053
  v(),
1054
1054
  y,
1055
1055
  L
1056
1056
  ));
1057
1057
  }
1058
- const Zt = /* @__PURE__ */ Yt(), kn = /* @__PURE__ */ h(Zt);
1059
- function Xt({ request: n, ...e }) {
1058
+ const Yt = /* @__PURE__ */ Jt(), vn = /* @__PURE__ */ h(Yt);
1059
+ function Zt({ request: n, ...e }) {
1060
1060
  return A((s, r) => p.pipe(
1061
1061
  n("web_app_set_emoji_status", ["emoji_status_set", "emoji_status_failed"], {
1062
1062
  params: {
@@ -1065,7 +1065,7 @@ function Xt({ request: n, ...e }) {
1065
1065
  },
1066
1066
  ...r
1067
1067
  }),
1068
- u.chainW((i) => i.event === "emoji_status_failed" ? u.left(new xt(i.payload.error)) : u.right(void 0))
1068
+ u.chainW((i) => i.event === "emoji_status_failed" ? u.left(new At(i.payload.error)) : u.right(void 0))
1069
1069
  ), {
1070
1070
  ...e,
1071
1071
  requires: "web_app_set_emoji_status",
@@ -1073,15 +1073,15 @@ function Xt({ request: n, ...e }) {
1073
1073
  });
1074
1074
  }
1075
1075
  // @__NO_SIDE_EFFECTS__
1076
- function es() {
1077
- return Xt(p.pipe(
1076
+ function Xt() {
1077
+ return Zt(p.pipe(
1078
1078
  v(),
1079
1079
  L,
1080
1080
  y
1081
1081
  ));
1082
1082
  }
1083
- const ts = /* @__PURE__ */ es(), yn = /* @__PURE__ */ h(ts);
1084
- class ss {
1083
+ const es = /* @__PURE__ */ Xt(), kn = /* @__PURE__ */ h(es);
1084
+ class ts {
1085
1085
  constructor({ postEvent: e, isVBma: s, version: r }) {
1086
1086
  /**
1087
1087
  * Signal indicating if the component is supported.
@@ -1132,42 +1132,42 @@ class ss {
1132
1132
  this.isSupported = W(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
- function rs() {
1136
- return new ss(p.pipe(
1135
+ function ss() {
1136
+ return new ts(p.pipe(
1137
1137
  v(),
1138
- V,
1138
+ T,
1139
1139
  y
1140
1140
  ));
1141
1141
  }
1142
- const qn = /* @__PURE__ */ rs();
1143
- function ns({ postEvent: n, ...e }) {
1142
+ const yn = /* @__PURE__ */ ss();
1143
+ function rs({ postEvent: n, ...e }) {
1144
1144
  return A(() => n("web_app_add_to_home_screen"), { ...e, requires: "web_app_add_to_home_screen", returns: "either" });
1145
1145
  }
1146
1146
  // @__NO_SIDE_EFFECTS__
1147
- function is() {
1148
- return ns(p.pipe(
1147
+ function ns() {
1148
+ return rs(p.pipe(
1149
1149
  v(),
1150
1150
  y,
1151
- V
1151
+ T
1152
1152
  ));
1153
1153
  }
1154
- const os = /* @__PURE__ */ is(), In = /* @__PURE__ */ h(os);
1155
- function as({ request: n, ...e }) {
1154
+ const is = /* @__PURE__ */ ns(), qn = /* @__PURE__ */ h(is);
1155
+ function os({ request: n, ...e }) {
1156
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
- function cs() {
1163
- return as(p.pipe(
1162
+ function as() {
1163
+ return os(p.pipe(
1164
1164
  v(),
1165
1165
  y,
1166
1166
  L
1167
1167
  ));
1168
1168
  }
1169
- const ps = /* @__PURE__ */ cs(), En = /* @__PURE__ */ h(ps);
1170
- class us {
1169
+ const cs = /* @__PURE__ */ as(), In = /* @__PURE__ */ h(cs);
1170
+ class ps {
1171
1171
  constructor({ retrieveInitData: e }) {
1172
1172
  t(this, "_state", O());
1173
1173
  t(this, "_raw", O());
@@ -1257,8 +1257,8 @@ class us {
1257
1257
  });
1258
1258
  }
1259
1259
  }
1260
- function ls() {
1261
- return new us({
1260
+ function us() {
1261
+ return new ps({
1262
1262
  retrieveInitData() {
1263
1263
  return p.pipe(
1264
1264
  m.Do,
@@ -1266,7 +1266,7 @@ function ls() {
1266
1266
  le(),
1267
1267
  m.map(({ vbWebAppData: n }) => n ? z.some(n) : z.none)
1268
1268
  )),
1269
- m.bindW("raw", _t),
1269
+ m.bindW("raw", ht),
1270
1270
  m.map(({ obj: n, raw: e }) => p.pipe(
1271
1271
  z.Do,
1272
1272
  z.bind("obj", () => n),
@@ -1276,8 +1276,8 @@ function ls() {
1276
1276
  }
1277
1277
  });
1278
1278
  }
1279
- const Bn = /* @__PURE__ */ ls();
1280
- class ds {
1279
+ const En = /* @__PURE__ */ us();
1280
+ class ls {
1281
1281
  constructor({ version: e, request: s, isVBma: r }) {
1282
1282
  /**
1283
1283
  * Signal indicating if any invoice is currently opened.
@@ -1322,35 +1322,35 @@ class ds {
1322
1322
  o.set(!1);
1323
1323
  };
1324
1324
  this.isSupported = W("web_app_open_invoice", e), this.isOpened = S(o), this.openSlugFp = i((a, l) => p.pipe(
1325
- this.isOpened() ? u.left(new Ae("Invoice is already opened")) : u.right(void 0),
1325
+ this.isOpened() ? u.left(new Be("Invoice is already opened")) : u.right(void 0),
1326
1326
  u.chain(() => (o.set(!0), s("web_app_open_invoice", "invoice_closed", {
1327
1327
  ...l,
1328
1328
  params: { slug: a },
1329
- capture: (_) => a === _.slug
1329
+ capture: (f) => a === f.slug
1330
1330
  }))),
1331
- u.mapBoth((_) => (c(), _), (_) => (c(), _.status))
1331
+ u.mapBoth((f) => (c(), f), (f) => (c(), f.status))
1332
1332
  )), this.openUrlFp = i((a, l) => {
1333
- const { hostname: _, pathname: F } = new URL(a, window.location.href);
1334
- if (_ !== "vbot.vn")
1335
- return u.left(new K(`Link has unexpected hostname: ${_}`));
1336
- const f = F.match(/^\/(\$|invoice\/)([A-Za-z0-9\-_=]+)$/);
1337
- return f ? this.openSlugFp(f[2], l) : u.left(new K(
1333
+ const { hostname: f, pathname: F } = new URL(a, window.location.href);
1334
+ if (f !== "vbot.vn")
1335
+ return u.left(new Q(`Link has unexpected hostname: ${f}`));
1336
+ const b = F.match(/^\/(\$|invoice\/)([A-Za-z0-9\-_=]+)$/);
1337
+ return b ? this.openSlugFp(b[2], l) : u.left(new Q(
1338
1338
  'Expected to receive a link with a pathname in format "/invoice/{slug}" or "/${slug}"'
1339
1339
  ));
1340
1340
  }), this.openUrl = /* @__PURE__ */ h(this.openUrlFp), this.openSlug = /* @__PURE__ */ h(this.openSlugFp);
1341
1341
  }
1342
1342
  }
1343
- function hs() {
1344
- return new ds(p.pipe(v(), L, y));
1343
+ function ds() {
1344
+ return new ls(p.pipe(v(), L, y));
1345
1345
  }
1346
- const An = /* @__PURE__ */ hs();
1347
- function _s({ postEvent: n, ...e }) {
1346
+ const Bn = /* @__PURE__ */ ds();
1347
+ function hs({ postEvent: n, ...e }) {
1348
1348
  return A((s, r = {}) => {
1349
1349
  if (typeof s == "string")
1350
1350
  try {
1351
1351
  s = new URL(s);
1352
1352
  } catch (i) {
1353
- return m.left(new K(`"${s.toString()}" is invalid URL`, i));
1353
+ return m.left(new Q(`"${s.toString()}" is invalid URL`, i));
1354
1354
  }
1355
1355
  return n("web_app_open_link", {
1356
1356
  url: s.toString(),
@@ -1360,39 +1360,39 @@ function _s({ postEvent: n, ...e }) {
1360
1360
  }, { ...e, returns: "either" });
1361
1361
  }
1362
1362
  // @__NO_SIDE_EFFECTS__
1363
- function bs() {
1364
- return _s(p.pipe(v(), V));
1363
+ function _s() {
1364
+ return hs(p.pipe(v(), T));
1365
1365
  }
1366
- const fs = /* @__PURE__ */ bs(), xn = /* @__PURE__ */ h(fs);
1367
- function gs({ postEvent: n, version: e, ...s }) {
1366
+ const bs = /* @__PURE__ */ _s(), An = /* @__PURE__ */ h(bs);
1367
+ function fs({ postEvent: n, version: e, ...s }) {
1368
1368
  return A((r) => {
1369
1369
  const i = r.toString();
1370
- return i.match(/^https:\/\/vbot\.vn\/.+/) ? te("web_app_open_vb_link", P(e)) ? (r = new URL(r), n("web_app_open_vb_link", { path_full: r.pathname + r.search })) : (window.location.href = i, m.right(void 0)) : m.left(new K(`"${i}" is invalid URL`));
1370
+ return i.match(/^https:\/\/vbot\.vn\/.+/) ? te("web_app_open_vb_link", P(e)) ? (r = new URL(r), n("web_app_open_vb_link", { path_full: r.pathname + r.search })) : (window.location.href = i, m.right(void 0)) : m.left(new Q(`"${i}" is invalid URL`));
1371
1371
  }, { ...s, returns: "either" });
1372
1372
  }
1373
1373
  // @__NO_SIDE_EFFECTS__
1374
- function ms() {
1375
- return gs(p.pipe(
1374
+ function gs() {
1375
+ return fs(p.pipe(
1376
1376
  v(),
1377
- V,
1377
+ T,
1378
1378
  y
1379
1379
  ));
1380
1380
  }
1381
- const st = /* @__PURE__ */ ms(), Mn = /* @__PURE__ */ h(st);
1382
- function ws({ openVbotLink: n, ...e }) {
1381
+ const tt = /* @__PURE__ */ gs(), xn = /* @__PURE__ */ h(tt);
1382
+ function ms({ openVbotLink: n, ...e }) {
1383
1383
  return A((s, r) => n(
1384
1384
  "https://vbot.vn/share/url?" + new URLSearchParams({ url: s, text: r || "" }).toString().replace(/\+/g, "%20")
1385
1385
  ), { ...e, returns: "either" });
1386
1386
  }
1387
1387
  // @__NO_SIDE_EFFECTS__
1388
- function Fs() {
1389
- return ws({
1388
+ function ws() {
1389
+ return ms({
1390
1390
  ...v(),
1391
- openVbotLink: st
1391
+ openVbotLink: tt
1392
1392
  });
1393
1393
  }
1394
- const Ss = /* @__PURE__ */ Fs(), Rn = /* @__PURE__ */ h(Ss);
1395
- function Cs(n) {
1394
+ const Fs = /* @__PURE__ */ ws(), Mn = /* @__PURE__ */ h(Fs);
1395
+ function Ss(n) {
1396
1396
  let e = !1, s, r;
1397
1397
  return n.available && (e = !0, s = n.access_requested, r = n.access_granted), {
1398
1398
  available: e,
@@ -1400,7 +1400,7 @@ function Cs(n) {
1400
1400
  accessRequested: s || !1
1401
1401
  };
1402
1402
  }
1403
- class vs {
1403
+ class Cs {
1404
1404
  constructor({
1405
1405
  version: e,
1406
1406
  request: s,
@@ -1476,28 +1476,28 @@ class vs {
1476
1476
  accessRequested: !1
1477
1477
  },
1478
1478
  onChange: i.set
1479
- }), l = new Me({
1479
+ }), l = new xe({
1480
1480
  isPageReload: c,
1481
1481
  restoreState: i.get,
1482
1482
  onMounted: a.setState,
1483
1483
  initialState(C) {
1484
1484
  return p.pipe(
1485
1485
  s("web_app_check_location", "location_checked", C),
1486
- u.map(Cs)
1486
+ u.map(Ss)
1487
1487
  );
1488
1488
  }
1489
- }), _ = { version: e, requires: "web_app_check_location", isVBma: o }, F = E({
1490
- ..._,
1489
+ }), f = { version: e, requires: "web_app_check_location", isVBma: o }, F = E({
1490
+ ...f,
1491
1491
  returns: "either"
1492
- }), f = E({
1493
- ..._,
1492
+ }), b = E({
1493
+ ...f,
1494
1494
  returns: "task"
1495
1495
  }), k = E({
1496
- ..._,
1496
+ ...f,
1497
1497
  returns: "task",
1498
1498
  isMounted: l.isMounted
1499
1499
  });
1500
- this.isAvailable = a.getter("available"), this.isAccessRequested = a.getter("accessRequested"), this.isAccessGranted = a.getter("accessGranted"), this.isSupported = W("web_app_check_location", e), this.isMounted = l.isMounted, this.state = a.state, this.unmount = l.unmount, this.mountFp = f(l.mount), this.openSettingsFp = F(() => r("web_app_open_location_settings")), this.requestLocationFp = k((C) => p.pipe(
1500
+ this.isAvailable = a.getter("available"), this.isAccessRequested = a.getter("accessRequested"), this.isAccessGranted = a.getter("accessGranted"), this.isSupported = W("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(
1501
1501
  s("web_app_request_location", "location_requested", C),
1502
1502
  u.map((q) => {
1503
1503
  if (!q.available)
@@ -1508,17 +1508,17 @@ class vs {
1508
1508
  )), this.mount = /* @__PURE__ */ h(this.mountFp), this.openSettings = /* @__PURE__ */ h(this.openSettingsFp), this.requestLocation = /* @__PURE__ */ h(this.requestLocationFp);
1509
1509
  }
1510
1510
  }
1511
- function ks() {
1512
- return new vs(p.pipe(
1511
+ function vs() {
1512
+ return new Cs(p.pipe(
1513
1513
  v(),
1514
- V,
1514
+ T,
1515
1515
  y,
1516
1516
  L,
1517
1517
  Z("locationManager")
1518
1518
  ));
1519
1519
  }
1520
- const Vn = /* @__PURE__ */ ks();
1521
- class ys {
1520
+ const Rn = /* @__PURE__ */ vs();
1521
+ class ks {
1522
1522
  constructor({ defaults: e, ...s }) {
1523
1523
  //#region Properties.
1524
1524
  /**
@@ -1747,12 +1747,12 @@ class ys {
1747
1747
  function Te(n, e) {
1748
1748
  document.documentElement.style.setProperty(n, e);
1749
1749
  }
1750
- function Le(n) {
1750
+ function Ve(n) {
1751
1751
  document.documentElement.style.removeProperty(n);
1752
1752
  }
1753
- function qs(n) {
1753
+ function ys(n) {
1754
1754
  return p.pipe(
1755
- Ft(n),
1755
+ wt(n),
1756
1756
  m.map((e) => Math.sqrt(
1757
1757
  [0.299, 0.587, 0.114].reduce((s, r, i) => {
1758
1758
  const o = parseInt(e.slice(1 + i * 2, 1 + (i + 1) * 2), 16);
@@ -1761,8 +1761,8 @@ function qs(n) {
1761
1761
  ) < 120)
1762
1762
  );
1763
1763
  }
1764
- const rt = he(qs);
1765
- class Is {
1764
+ const st = he(ys);
1765
+ class qs {
1766
1766
  constructor({
1767
1767
  initialState: e,
1768
1768
  onChange: s,
@@ -1851,7 +1851,7 @@ class Is {
1851
1851
  */
1852
1852
  t(this, "isDark", S(() => {
1853
1853
  const e = this.bgColor();
1854
- return !e || rt(e);
1854
+ return !e || st(e);
1855
1855
  }));
1856
1856
  //#endregion
1857
1857
  //#region Mounting.
@@ -1876,7 +1876,7 @@ class Is {
1876
1876
  onChange: o.set
1877
1877
  }), l = (C) => {
1878
1878
  a.setState(C.theme_params);
1879
- }, _ = new ie({
1879
+ }, f = new ie({
1880
1880
  initialState: () => m.right(P(e)),
1881
1881
  isPageReload: c,
1882
1882
  onMounted(C) {
@@ -1886,17 +1886,17 @@ class Is {
1886
1886
  r(l);
1887
1887
  },
1888
1888
  restoreState: o.get
1889
- }), F = { isVBma: i, returns: "either" }, f = E(F), k = E({
1889
+ }), F = { isVBma: i, returns: "either" }, b = E(F), k = E({
1890
1890
  ...F,
1891
- isMounted: _.isMounted
1891
+ isMounted: f.isMounted
1892
1892
  });
1893
- this.accentTextColor = a.getter("accent_text_color"), this.bgColor = a.getter("bg_color"), this.buttonColor = a.getter("button_color"), this.buttonTextColor = a.getter("button_text_color"), this.bottomBarBgColor = a.getter("bottom_bar_bg_color"), this.destructiveTextColor = a.getter("destructive_text_color"), this.headerBgColor = a.getter("header_bg_color"), this.hintColor = a.getter("hint_color"), this.linkColor = a.getter("link_color"), this.secondaryBgColor = a.getter("secondary_bg_color"), this.sectionBgColor = a.getter("section_bg_color"), this.sectionHeaderTextColor = a.getter("section_header_text_color"), this.sectionSeparatorColor = a.getter("section_separator_color"), this.subtitleTextColor = a.getter("subtitle_text_color"), this.textColor = a.getter("text_color"), this.state = a.state, this.isMounted = _.isMounted, this.bindCssVarsFp = k((C) => {
1893
+ this.accentTextColor = a.getter("accent_text_color"), this.bgColor = a.getter("bg_color"), this.buttonColor = a.getter("button_color"), this.buttonTextColor = a.getter("button_text_color"), this.bottomBarBgColor = a.getter("bottom_bar_bg_color"), this.destructiveTextColor = a.getter("destructive_text_color"), this.headerBgColor = a.getter("header_bg_color"), this.hintColor = a.getter("hint_color"), this.linkColor = a.getter("link_color"), this.secondaryBgColor = a.getter("secondary_bg_color"), this.sectionBgColor = a.getter("section_bg_color"), this.sectionHeaderTextColor = a.getter("section_header_text_color"), this.sectionSeparatorColor = a.getter("section_separator_color"), this.subtitleTextColor = a.getter("subtitle_text_color"), this.textColor = a.getter("text_color"), this.state = a.state, this.isMounted = f.isMounted, this.bindCssVarsFp = k((C) => {
1894
1894
  if (this._isCssVarsBound())
1895
- return m.left(new Be());
1896
- C || (C = (g) => `--vb-theme-${wt(g)}`);
1895
+ return m.left(new Ee());
1896
+ C || (C = (g) => `--vb-theme-${mt(g)}`);
1897
1897
  const q = (g) => {
1898
- Object.entries(a.state()).forEach(([w, b]) => {
1899
- b && g(w, b);
1898
+ Object.entries(a.state()).forEach(([w, _]) => {
1899
+ _ && g(w, _);
1900
1900
  });
1901
1901
  }, I = () => {
1902
1902
  q((g, w) => {
@@ -1904,15 +1904,15 @@ class Is {
1904
1904
  });
1905
1905
  };
1906
1906
  return I(), a.state.sub(I), this._isCssVarsBound.set(!0), m.right(() => {
1907
- q(Le), a.state.unsub(I), this._isCssVarsBound.set(!1);
1907
+ q(Ve), a.state.unsub(I), this._isCssVarsBound.set(!1);
1908
1908
  });
1909
- }), this.mountFp = f(_.mount), this.unmount = _.unmount, this.bindCssVars = /* @__PURE__ */ h(this.bindCssVarsFp), this.mount = /* @__PURE__ */ h(this.mountFp);
1909
+ }), this.mountFp = b(f.mount), this.unmount = f.unmount, this.bindCssVars = /* @__PURE__ */ h(this.bindCssVarsFp), this.mount = /* @__PURE__ */ h(this.mountFp);
1910
1910
  }
1911
1911
  //#endregion
1912
1912
  }
1913
- const ke = /* @__PURE__ */ oe({});
1914
- function Es() {
1915
- return new Is({
1913
+ const ve = /* @__PURE__ */ oe({});
1914
+ function Is() {
1915
+ return new qs({
1916
1916
  ...p.pipe(
1917
1917
  v(),
1918
1918
  Z("themeParams")
@@ -1923,24 +1923,24 @@ function Es() {
1923
1923
  onChange(n) {
1924
1924
  j("theme_changed", n);
1925
1925
  },
1926
- initialState: ke
1926
+ initialState: ve
1927
1927
  });
1928
1928
  }
1929
- const de = /* @__PURE__ */ Es();
1929
+ const de = /* @__PURE__ */ Is();
1930
1930
  // @__NO_SIDE_EFFECTS__
1931
- function nt(n, e, s) {
1931
+ function rt(n, e, s) {
1932
1932
  return p.pipe(
1933
- /* @__PURE__ */ xe(n, e),
1933
+ /* @__PURE__ */ Ae(n, e),
1934
1934
  (r) => ({ ...r, defaults: s })
1935
1935
  );
1936
1936
  }
1937
- const Tn = /* @__PURE__ */ new ys(
1938
- /* @__PURE__ */ nt("mainButton", "main_button_pressed", {
1937
+ const Tn = /* @__PURE__ */ new ks(
1938
+ /* @__PURE__ */ rt("mainButton", "main_button_pressed", {
1939
1939
  bgColor: S(() => de.buttonColor() || "#2481cc"),
1940
1940
  textColor: S(() => de.buttonTextColor() || "#ffffff")
1941
1941
  })
1942
1942
  );
1943
- class Bs {
1943
+ class Es {
1944
1944
  constructor({
1945
1945
  storage: e,
1946
1946
  isPageReload: s,
@@ -1961,7 +1961,7 @@ class Bs {
1961
1961
  */
1962
1962
  t(this, "isDark", S(() => {
1963
1963
  const e = this.bgColorRgb();
1964
- return e ? rt(e) : !1;
1964
+ return e ? st(e) : !1;
1965
1965
  }));
1966
1966
  /**
1967
1967
  * Signal indicating if the mini app is currently active.
@@ -2119,21 +2119,21 @@ class Bs {
2119
2119
  * @see readyFp
2120
2120
  */
2121
2121
  t(this, "ready");
2122
- const _ = (b) => {
2123
- k.setState({ isActive: b.is_visible });
2124
- }, F = (b) => {
2122
+ const f = (_) => {
2123
+ k.setState({ isActive: _.is_visible });
2124
+ }, F = (_) => {
2125
2125
  [
2126
2126
  [this.headerColor, "web_app_set_header_color"],
2127
2127
  [this.bgColor, "web_app_set_background_color"],
2128
2128
  [this.bottomBarColor, "web_app_set_bottom_bar_color"]
2129
- ].forEach(([x, T]) => {
2129
+ ].forEach(([x, V]) => {
2130
2130
  const R = x();
2131
- if (!ge(R) && (T !== "web_app_set_header_color" || !["bg_color", "secondary_bg_color"].includes(R))) {
2132
- const H = b[R];
2133
- H && i(T, { color: H });
2131
+ if (!be(R) && (V !== "web_app_set_header_color" || !["bg_color", "secondary_bg_color"].includes(R))) {
2132
+ const H = _[R];
2133
+ H && i(V, { color: H });
2134
2134
  }
2135
2135
  });
2136
- }, f = new ie({
2136
+ }, b = new ie({
2137
2137
  initialState() {
2138
2138
  return m.right({
2139
2139
  bgColor: "bg_color",
@@ -2143,19 +2143,19 @@ class Bs {
2143
2143
  });
2144
2144
  },
2145
2145
  isPageReload: s,
2146
- onMounted: (b) => {
2147
- a(_), c.sub(F), k.setState(b);
2146
+ onMounted: (_) => {
2147
+ a(f), c.sub(F), k.setState(_);
2148
2148
  },
2149
2149
  onUnmounted() {
2150
- l(_), c.unsub(F);
2150
+ l(f), c.unsub(F);
2151
2151
  },
2152
2152
  restoreState: e.get
2153
2153
  });
2154
- this.isMounted = f.isMounted, this.mountFp = A(() => {
2155
- const b = () => {
2154
+ this.isMounted = b.isMounted, this.mountFp = A(() => {
2155
+ const _ = () => {
2156
2156
  };
2157
- return p.pipe(f.mount(), m.match(b, b));
2158
- }, { isVBma: o, returns: "plain" }), this.mount = /* @__PURE__ */ h(this.mountFp), this.unmount = f.unmount;
2157
+ return p.pipe(b.mount(), m.match(_, _));
2158
+ }, { isVBma: o, returns: "plain" }), this.mount = /* @__PURE__ */ h(this.mountFp), this.unmount = b.unmount;
2159
2159
  const k = new Y({
2160
2160
  initialState: {
2161
2161
  bgColor: "bg_color",
@@ -2166,32 +2166,32 @@ class Bs {
2166
2166
  onChange: e.set
2167
2167
  });
2168
2168
  this.state = k.state;
2169
- const C = (b) => ge(b) ? b : P(c)[b], q = (b) => S(() => C(b()));
2169
+ const C = (_) => be(_) ? _ : P(c)[_], q = (_) => S(() => C(_()));
2170
2170
  this.isActive = k.getter("isActive"), this.isSupported = S(() => [
2171
2171
  "web_app_set_header_color",
2172
2172
  "web_app_set_background_color",
2173
2173
  "web_app_set_bottom_bar_color"
2174
- ].some((b) => te(b, P(r))));
2174
+ ].some((_) => te(_, P(r))));
2175
2175
  const I = O(!1);
2176
- this.isCssVarsBound = S(I), this.bindCssVarsFp = A((b) => {
2176
+ this.isCssVarsBound = S(I), this.bindCssVarsFp = A((_) => {
2177
2177
  if (I())
2178
- return m.left(new Be());
2179
- const [x, T] = Ie(() => {
2178
+ return m.left(new Ee());
2179
+ const [x, V] = qe(() => {
2180
2180
  I.set(!1);
2181
2181
  }), R = (H, $) => {
2182
2182
  const U = () => {
2183
2183
  Te(H, $() || null);
2184
2184
  };
2185
- U(), x($.sub(U), Le.bind(null, H));
2185
+ U(), x($.sub(U), Ve.bind(null, H));
2186
2186
  };
2187
- return b || (b = (H) => `--tg-${Ue(H)}`), R(b("bgColor"), this.bgColorRgb), R(b("bottomBarColor"), this.bottomBarColorRgb), R(b("headerColor"), this.headerColorRgb), I.set(!0), m.right(T);
2187
+ return _ || (_ = (H) => `--tg-${Ue(H)}`), R(_("bgColor"), this.bgColorRgb), R(_("bottomBarColor"), this.bottomBarColorRgb), R(_("headerColor"), this.headerColorRgb), I.set(!0), m.right(V);
2188
2188
  }, { isVBma: o, returns: "either", isMounted: this.isMounted }), this.bindCssVars = /* @__PURE__ */ h(this.bindCssVarsFp);
2189
- const g = (b) => {
2190
- const x = k.getter(b), T = q(x), R = {
2189
+ const g = (_) => {
2190
+ const x = k.getter(_), V = q(x), R = {
2191
2191
  headerColor: "web_app_set_header_color",
2192
2192
  bgColor: "web_app_set_background_color",
2193
2193
  bottomBarColor: "web_app_set_bottom_bar_color"
2194
- }[b], H = A(
2194
+ }[_], H = A(
2195
2195
  ($) => {
2196
2196
  if ($ === x())
2197
2197
  return m.right(void 0);
@@ -2199,14 +2199,14 @@ class Bs {
2199
2199
  return p.pipe(
2200
2200
  i("web_app_set_header_color", { color_key: $ }),
2201
2201
  m.map(() => {
2202
- k.setState({ [b]: $ });
2202
+ k.setState({ [_]: $ });
2203
2203
  })
2204
2204
  );
2205
2205
  const U = C($);
2206
2206
  return p.pipe(
2207
- U ? i(R, { color: U }) : m.left(new Vt($)),
2207
+ U ? i(R, { color: U }) : m.left(new Rt($)),
2208
2208
  m.map(() => {
2209
- k.setState({ [b]: $ });
2209
+ k.setState({ [_]: $ });
2210
2210
  })
2211
2211
  );
2212
2212
  },
@@ -2216,16 +2216,16 @@ class Bs {
2216
2216
  requires: R,
2217
2217
  isMounted: this.isMounted,
2218
2218
  returns: "either",
2219
- supports: b === "headerColor" ? {
2219
+ supports: _ === "headerColor" ? {
2220
2220
  rgb: {
2221
2221
  method: "web_app_set_header_color",
2222
2222
  param: "color",
2223
- shouldCheck: ge
2223
+ shouldCheck: be
2224
2224
  }
2225
2225
  } : void 0
2226
2226
  }
2227
2227
  );
2228
- return [x, T, /* @__PURE__ */ h(H), H];
2228
+ return [x, V, /* @__PURE__ */ h(H), H];
2229
2229
  };
2230
2230
  [
2231
2231
  this.bgColor,
@@ -2244,15 +2244,15 @@ class Bs {
2244
2244
  this.setBottomBarColorFp
2245
2245
  ] = g("bottomBarColor");
2246
2246
  const w = E({ isVBma: o, returns: "either" });
2247
- this.closeFp = w((b) => i("web_app_close", { return_back: b })), this.close = /* @__PURE__ */ h(this.closeFp), this.readyFp = w(() => i("web_app_ready")), this.ready = /* @__PURE__ */ h(this.readyFp);
2247
+ this.closeFp = w((_) => i("web_app_close", { return_back: _ })), this.close = /* @__PURE__ */ h(this.closeFp), this.readyFp = w(() => i("web_app_ready")), this.ready = /* @__PURE__ */ h(this.readyFp);
2248
2248
  }
2249
2249
  //#endregion
2250
2250
  }
2251
- function As() {
2252
- return new Bs({
2251
+ function Bs() {
2252
+ return new Es({
2253
2253
  ...p.pipe(
2254
2254
  v(),
2255
- V,
2255
+ T,
2256
2256
  y,
2257
2257
  Z("miniApp")
2258
2258
  ),
@@ -2265,12 +2265,12 @@ function As() {
2265
2265
  theme: de.state
2266
2266
  });
2267
2267
  }
2268
- const xs = /* @__PURE__ */ As();
2269
- function Ms() {
2268
+ const As = /* @__PURE__ */ Bs();
2269
+ function xs() {
2270
2270
  const n = Date.now(), e = Math.random().toString(36).substring(2, 9);
2271
2271
  return `notif_${n}_${e}`;
2272
2272
  }
2273
- class Rs {
2273
+ class Ms {
2274
2274
  constructor({ version: e, isVBma: s }) {
2275
2275
  /**
2276
2276
  * Signal indicating if the component is supported.
@@ -2293,8 +2293,8 @@ class Rs {
2293
2293
  returns: "task"
2294
2294
  });
2295
2295
  this.isSupported = W("web_app_send_notification", e), this.sendFp = r((i) => p.pipe(
2296
- u.fromEither(qe("web_app_send_notification", {
2297
- id: Ms(),
2296
+ u.fromEither(ye("web_app_send_notification", {
2297
+ id: xs(),
2298
2298
  message: i.message,
2299
2299
  title: i.title,
2300
2300
  type: i.type ?? "default"
@@ -2308,18 +2308,18 @@ class Rs {
2308
2308
  });
2309
2309
  }
2310
2310
  }
2311
- function Vs() {
2312
- return new Rs(y(v()));
2311
+ function Rs() {
2312
+ return new Ms(y(v()));
2313
2313
  }
2314
- const Ln = /* @__PURE__ */ Vs();
2314
+ const Vn = /* @__PURE__ */ Rs();
2315
2315
  function Ts(n) {
2316
2316
  const e = n.message.trim(), s = (n.title || "").trim(), r = n.buttons || [];
2317
2317
  if (s.length > 64)
2318
- return m.left(new K(`Invalid title: ${s}`));
2318
+ return m.left(new Q(`Invalid title: ${s}`));
2319
2319
  if (!e || e.length > 256)
2320
- return m.left(new K(`Invalid message: ${e}`));
2320
+ return m.left(new Q(`Invalid message: ${e}`));
2321
2321
  if (r.length > 3)
2322
- return m.left(new K(`Invalid buttons count: ${r.length}`));
2322
+ return m.left(new Q(`Invalid buttons count: ${r.length}`));
2323
2323
  const i = [];
2324
2324
  if (!r.length)
2325
2325
  i.push({ type: "close", id: "" });
@@ -2327,18 +2327,18 @@ function Ts(n) {
2327
2327
  for (let o = 0; o < r.length; o++) {
2328
2328
  const c = r[o], a = c.id || "";
2329
2329
  if (a.length > 64)
2330
- return m.left(new K(`Button with index ${o} has invalid id: ${a}`));
2330
+ return m.left(new Q(`Button with index ${o} has invalid id: ${a}`));
2331
2331
  if (!c.type || c.type === "default" || c.type === "destructive") {
2332
2332
  const l = c.text.trim();
2333
2333
  if (!l || l.length > 64)
2334
- return m.left(new K(`Button with index ${o} has invalid text: ${l}`));
2334
+ return m.left(new Q(`Button with index ${o} has invalid text: ${l}`));
2335
2335
  i.push({ type: c.type, text: l, id: a });
2336
2336
  } else
2337
2337
  i.push({ type: c.type, id: a });
2338
2338
  }
2339
2339
  return m.right({ title: s, message: e, buttons: i });
2340
2340
  }
2341
- class Ls {
2341
+ class Vs {
2342
2342
  constructor({ version: e, isVBma: s, request: r }) {
2343
2343
  /**
2344
2344
  * Signal indicating if any popup is currently opened.
@@ -2387,7 +2387,7 @@ class Ls {
2387
2387
  returns: "task"
2388
2388
  });
2389
2389
  this.isSupported = W("web_app_open_popup", e), this.isOpened = S(i), this.showFp = c((a) => p.pipe(
2390
- this.isOpened() ? u.left(new Ae("A popup is already opened")) : u.right(void 0),
2390
+ this.isOpened() ? u.left(new Be("A popup is already opened")) : u.right(void 0),
2391
2391
  u.chainW(() => u.fromEither(Ts(a))),
2392
2392
  u.chain((l) => (i.set(!0), r("web_app_open_popup", "popup_closed", {
2393
2393
  ...a,
@@ -2400,26 +2400,26 @@ class Ls {
2400
2400
  )), this.show = /* @__PURE__ */ h(this.showFp);
2401
2401
  }
2402
2402
  }
2403
- function $s() {
2404
- return new Ls(p.pipe(v(), L, y));
2403
+ function Ls() {
2404
+ return new Vs(p.pipe(v(), L, y));
2405
2405
  }
2406
- const $n = /* @__PURE__ */ $s();
2407
- function Ps({ request: n, ...e }) {
2406
+ const Ln = /* @__PURE__ */ Ls();
2407
+ function $s({ request: n, ...e }) {
2408
2408
  return A((s) => p.pipe(
2409
2409
  n("web_app_request_phone", "phone_requested", s),
2410
2410
  u.map((r) => r.status)
2411
2411
  ), { ...e, requires: "web_app_request_phone", returns: "task" });
2412
2412
  }
2413
2413
  // @__NO_SIDE_EFFECTS__
2414
- function Hs() {
2415
- return Ps(p.pipe(
2414
+ function Ps() {
2415
+ return $s(p.pipe(
2416
2416
  v(),
2417
2417
  y,
2418
2418
  L
2419
2419
  ));
2420
2420
  }
2421
- const it = /* @__PURE__ */ Hs(), Pn = /* @__PURE__ */ h(it);
2422
- function Os({
2421
+ const nt = /* @__PURE__ */ Ps(), $n = /* @__PURE__ */ h(nt);
2422
+ function Hs({
2423
2423
  invokeCustomMethod: n,
2424
2424
  requestPhoneAccess: e,
2425
2425
  ...s
@@ -2430,21 +2430,21 @@ function Os({
2430
2430
  timeout: (c || {}).timeout || 5e3
2431
2431
  }),
2432
2432
  u.chainW((a) => {
2433
- const l = Ce(N(), a);
2433
+ const l = Fe(N(), a);
2434
2434
  if (!l.success)
2435
2435
  return u.left(new pe(a, l.issues));
2436
2436
  if (!l.output)
2437
2437
  return u.right(void 0);
2438
- const _ = Ce(
2439
- St(
2438
+ const f = Fe(
2439
+ Ft(
2440
2440
  De({
2441
- contact: Ct(De({
2441
+ contact: St(De({
2442
2442
  user_id: Je(),
2443
2443
  phone_number: N(),
2444
2444
  first_name: N(),
2445
- last_name: yt(N())
2445
+ last_name: kt(N())
2446
2446
  })),
2447
- auth_date: Qe(
2447
+ auth_date: Ke(
2448
2448
  N(),
2449
2449
  Ne((F) => new Date(Number(F) * 1e3)),
2450
2450
  ze()
@@ -2454,7 +2454,7 @@ function Os({
2454
2454
  ),
2455
2455
  l.output
2456
2456
  );
2457
- return _.success ? u.right({ raw: l.output, parsed: _.output }) : u.left(new pe(l.output, _.issues));
2457
+ return f.success ? u.right({ raw: l.output, parsed: f.output }) : u.left(new pe(l.output, f.issues));
2458
2458
  })
2459
2459
  ), i = (c) => p.pipe(
2460
2460
  r(c),
@@ -2465,71 +2465,71 @@ function Os({
2465
2465
  (a) => pe.is(a) ? m.left(a) : m.right(void 0),
2466
2466
  (a) => m.right(a)
2467
2467
  )
2468
- ), o = (c) => Se(
2469
- async (a, l, _) => {
2468
+ ), o = (c) => we(
2469
+ async (a, l, f) => {
2470
2470
  let F = 50;
2471
- for (; !_.isRejected; ) {
2472
- const f = await i(_)();
2473
- if (f._tag === "Left")
2474
- return l(f.left);
2475
- if (f.right)
2476
- return a(f.right);
2471
+ for (; !f.isRejected; ) {
2472
+ const b = await i(f)();
2473
+ if (b._tag === "Left")
2474
+ return l(b.left);
2475
+ if (b.right)
2476
+ return a(b.right);
2477
2477
  await new Promise((k) => setTimeout(k, F)), F += 50;
2478
2478
  }
2479
2479
  },
2480
2480
  c
2481
2481
  );
2482
- return A((c) => Se.fn((a) => p.pipe(
2482
+ return A((c) => we.fn((a) => p.pipe(
2483
2483
  // Try to get the requested contact. Probably, we already requested it before.
2484
2484
  i(a),
2485
2485
  u.chain((l) => l ? u.right(l) : p.pipe(
2486
2486
  e(a),
2487
- u.chainW((_) => _ === "sent" ? o(a) : u.left(new Ye("User denied access")))
2487
+ u.chainW((f) => f === "sent" ? o(a) : u.left(new Ye("User denied access")))
2488
2488
  ))
2489
2489
  ), c), { ...s, returns: "task", requires: "web_app_request_phone" });
2490
2490
  }
2491
2491
  // @__NO_SIDE_EFFECTS__
2492
- function Ds() {
2493
- return Os({
2494
- ...p.pipe(v(), Ve, y),
2495
- requestPhoneAccess: it
2492
+ function Os() {
2493
+ return Hs({
2494
+ ...p.pipe(v(), Re, y),
2495
+ requestPhoneAccess: nt
2496
2496
  });
2497
2497
  }
2498
- function js({ requestContact: n, ...e }) {
2498
+ function Ds({ requestContact: n, ...e }) {
2499
2499
  return A(
2500
2500
  n,
2501
2501
  { ...e, returns: "task", requires: "web_app_request_phone" }
2502
2502
  );
2503
2503
  }
2504
2504
  // @__NO_SIDE_EFFECTS__
2505
- function Gs() {
2506
- return js({
2505
+ function js() {
2506
+ return Ds({
2507
2507
  ...p.pipe(v(), y),
2508
2508
  requestContact(n) {
2509
2509
  return p.pipe(
2510
- ot(n),
2510
+ it(n),
2511
2511
  u.map((e) => e.parsed)
2512
2512
  );
2513
2513
  }
2514
2514
  });
2515
2515
  }
2516
- const ot = /* @__PURE__ */ Ds(), Hn = /* @__PURE__ */ h(ot), Ws = /* @__PURE__ */ Gs(), On = /* @__PURE__ */ h(Ws);
2517
- function Us({ request: n, ...e }) {
2516
+ const it = /* @__PURE__ */ Os(), Pn = /* @__PURE__ */ h(it), Gs = /* @__PURE__ */ js(), Hn = /* @__PURE__ */ h(Gs);
2517
+ function Ws({ request: n, ...e }) {
2518
2518
  return A((s) => p.pipe(
2519
2519
  n("web_app_request_write_access", "write_access_requested", s),
2520
2520
  u.map((r) => r.status)
2521
2521
  ), { ...e, requires: "web_app_request_write_access", returns: "task" });
2522
2522
  }
2523
2523
  // @__NO_SIDE_EFFECTS__
2524
- function Ks() {
2525
- return Us(p.pipe(
2524
+ function Us() {
2525
+ return Ws(p.pipe(
2526
2526
  v(),
2527
2527
  y,
2528
2528
  L
2529
2529
  ));
2530
2530
  }
2531
- const Qs = /* @__PURE__ */ Ks(), Dn = /* @__PURE__ */ h(Qs);
2532
- class Ns {
2531
+ const Qs = /* @__PURE__ */ Us(), On = /* @__PURE__ */ h(Qs);
2532
+ class Ks {
2533
2533
  constructor({
2534
2534
  version: e,
2535
2535
  onClosed: s,
@@ -2616,46 +2616,46 @@ class Ns {
2616
2616
  * @see openFp
2617
2617
  */
2618
2618
  t(this, "open");
2619
- const c = { version: e, requires: "web_app_open_scan_qr_popup", isVBma: i }, a = E({ ...c, returns: "either" }), l = E({ ...c, returns: "task" }), _ = O(!1), F = () => {
2620
- _.set(!1);
2619
+ 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 = () => {
2620
+ f.set(!1);
2621
2621
  };
2622
- this.isSupported = W("web_app_open_scan_qr_popup", e), this.isOpened = S(_), this.captureFp = l((f) => {
2622
+ this.isSupported = W("web_app_open_scan_qr_popup", e), this.isOpened = S(f), this.captureFp = l((b) => {
2623
2623
  let k;
2624
2624
  return p.pipe(
2625
2625
  this.openFp({
2626
- ...f,
2626
+ ...b,
2627
2627
  onCaptured: (C) => {
2628
- f.capture(C) && (k = C, this.close());
2628
+ b.capture(C) && (k = C, this.close());
2629
2629
  }
2630
2630
  }),
2631
2631
  u.map(() => k)
2632
2632
  );
2633
- }), this.closeFp = a(() => p.pipe(o("web_app_close_scan_qr_popup"), m.map(F))), this.openFp = l((f) => p.pipe(
2634
- _() ? u.left(new Ae("The QR Scanner is already opened")) : async () => o("web_app_open_scan_qr_popup", { text: f.text }),
2633
+ }), this.closeFp = a(() => p.pipe(o("web_app_close_scan_qr_popup"), m.map(F))), this.openFp = l((b) => p.pipe(
2634
+ f() ? u.left(new Be("The QR Scanner is already opened")) : async () => o("web_app_open_scan_qr_popup", { text: b.text }),
2635
2635
  u.chainW(() => {
2636
- _.set(!0);
2637
- const [k, C] = Ie(), q = (I) => (C(), _.set(!1), I);
2636
+ f.set(!0);
2637
+ const [k, C] = qe(), q = (I) => (C(), f.set(!1), I);
2638
2638
  return p.pipe(
2639
- Se((I) => {
2639
+ we((I) => {
2640
2640
  k(
2641
2641
  // The scanner was closed externally.
2642
2642
  s(I),
2643
2643
  // The scanner was closed internally.
2644
- _.sub((g) => {
2644
+ f.sub((g) => {
2645
2645
  g || I();
2646
2646
  }),
2647
- r(f.onCaptured)
2647
+ r(b.onCaptured)
2648
2648
  );
2649
- }, f),
2649
+ }, b),
2650
2650
  u.mapBoth(q, q)
2651
2651
  );
2652
2652
  })
2653
2653
  )), this.open = /* @__PURE__ */ h(this.openFp), this.capture = /* @__PURE__ */ h(this.captureFp), this.close = /* @__PURE__ */ h(this.closeFp);
2654
2654
  }
2655
2655
  }
2656
- function zs() {
2657
- return new Ns({
2658
- ...p.pipe(v(), V, y),
2656
+ function Ns() {
2657
+ return new Ks({
2658
+ ...p.pipe(v(), T, y),
2659
2659
  onClosed(n) {
2660
2660
  return j("scan_qr_popup_closed", n);
2661
2661
  },
@@ -2666,8 +2666,8 @@ function zs() {
2666
2666
  }
2667
2667
  });
2668
2668
  }
2669
- const jn = /* @__PURE__ */ zs();
2670
- class Js {
2669
+ const Dn = /* @__PURE__ */ Ns();
2670
+ class zs {
2671
2671
  constructor({}) {
2672
2672
  /**
2673
2673
  * Signal indicating if refresh is currently in progress.
@@ -2700,7 +2700,7 @@ class Js {
2700
2700
  j("refresh_requested", () => {
2701
2701
  e.set(!0);
2702
2702
  }), this.isRefreshing = S(e), this.finishRefreshFp = () => p.pipe(
2703
- u.fromEither(qe("web_app_finish_refresh")),
2703
+ u.fromEither(ye("web_app_finish_refresh")),
2704
2704
  u.map(() => {
2705
2705
  e.set(!1);
2706
2706
  })
@@ -2713,11 +2713,11 @@ class Js {
2713
2713
  });
2714
2714
  }
2715
2715
  }
2716
- function Ys() {
2717
- return new Js(p.pipe(v()));
2716
+ function Js() {
2717
+ return new zs(p.pipe(v()));
2718
2718
  }
2719
- const Gn = /* @__PURE__ */ Ys();
2720
- class Zs {
2719
+ const jn = /* @__PURE__ */ Js();
2720
+ class Ys {
2721
2721
  constructor({ defaults: e, ...s }) {
2722
2722
  //#region Properties.
2723
2723
  /**
@@ -2979,16 +2979,16 @@ class Zs {
2979
2979
  }
2980
2980
  //#endregion
2981
2981
  }
2982
- function Xs() {
2983
- return new Zs(
2984
- /* @__PURE__ */ nt("secondaryButton", "secondary_button_pressed", {
2985
- bgColor: S(() => xs.bottomBarColorRgb() || "#000000"),
2982
+ function Zs() {
2983
+ return new Ys(
2984
+ /* @__PURE__ */ rt("secondaryButton", "secondary_button_pressed", {
2985
+ bgColor: S(() => As.bottomBarColorRgb() || "#000000"),
2986
2986
  textColor: S(() => de.buttonColor() || "#2481cc")
2987
2987
  })
2988
2988
  );
2989
2989
  }
2990
- const Wn = /* @__PURE__ */ Xs();
2991
- class er {
2990
+ const Gn = /* @__PURE__ */ Zs();
2991
+ class Xs {
2992
2992
  constructor({ isVBma: e, request: s, version: r, createRequestId: i }) {
2993
2993
  /**
2994
2994
  * Retrieves an item using its key.
@@ -3040,14 +3040,14 @@ class er {
3040
3040
  requires: "web_app_secure_storage_get_key",
3041
3041
  isVBma: e,
3042
3042
  returns: "task"
3043
- }), c = (a, l, _) => {
3043
+ }), c = (a, l, f) => {
3044
3044
  const F = i();
3045
3045
  return p.pipe(
3046
3046
  s(a, ["secure_storage_failed", l], {
3047
- params: { ..._, req_id: F },
3048
- capture: ((f) => "payload" in f ? f.payload.req_id === F : !0)
3047
+ params: { ...f, req_id: F },
3048
+ capture: ((b) => "payload" in b ? b.payload.req_id === F : !0)
3049
3049
  }),
3050
- u.chain((f) => f.event === "secure_storage_failed" ? u.left(new Et(f.payload.error || "UNKNOWN_ERROR")) : u.right(f.payload))
3050
+ u.chain((b) => b.event === "secure_storage_failed" ? u.left(new It(b.payload.error || "UNKNOWN_ERROR")) : u.right(b.payload))
3051
3051
  );
3052
3052
  };
3053
3053
  this.getItemFp = o((a) => p.pipe(
@@ -3070,16 +3070,16 @@ class er {
3070
3070
  )), 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);
3071
3071
  }
3072
3072
  }
3073
- function tr() {
3074
- return new er(p.pipe(
3073
+ function er() {
3074
+ return new Xs(p.pipe(
3075
3075
  v(),
3076
3076
  y,
3077
3077
  L,
3078
- tt
3078
+ et
3079
3079
  ));
3080
3080
  }
3081
- const Un = /* @__PURE__ */ tr();
3082
- class sr {
3081
+ const Wn = /* @__PURE__ */ er();
3082
+ class tr {
3083
3083
  constructor(e) {
3084
3084
  /**
3085
3085
  * Signal indicating if the component is currently visible.
@@ -3171,10 +3171,10 @@ class sr {
3171
3171
  this.isVisible = s.stateGetter("isVisible"), this.isMounted = s.isMounted, this.isSupported = s.isSupported, [[this.hide, this.hideFp], [this.show, this.showFp]] = s.stateBoolSetters("isVisible"), this.onClick = s.onClick, this.onClickFp = s.onClickFp, this.offClick = s.offClick, this.offClickFp = s.offClickFp, this.mount = s.mount, this.mountFp = s.mountFp, this.unmount = s.unmount;
3172
3172
  }
3173
3173
  }
3174
- const Kn = /* @__PURE__ */ new sr(
3175
- /* @__PURE__ */ xe("settingsButton", "settings_button_pressed")
3174
+ const Un = /* @__PURE__ */ new tr(
3175
+ /* @__PURE__ */ Ae("settingsButton", "settings_button_pressed")
3176
3176
  );
3177
- class rr {
3177
+ class sr {
3178
3178
  constructor({ postEvent: e, storage: s, isVBma: r, isPageReload: i, version: o }) {
3179
3179
  /**
3180
3180
  * Signal indicating if the component is supported.
@@ -3229,11 +3229,11 @@ class rr {
3229
3229
  isPageReload: i,
3230
3230
  onMounted: a.setState,
3231
3231
  restoreState: s.get
3232
- }), _ = { requires: "web_app_setup_swipe_behavior", isVBma: r, version: o }, F = E({
3233
- ..._,
3232
+ }), f = { requires: "web_app_setup_swipe_behavior", isVBma: r, version: o }, F = E({
3233
+ ...f,
3234
3234
  returns: "plain"
3235
- }), f = E({
3236
- ..._,
3235
+ }), b = E({
3236
+ ...f,
3237
3237
  isMounted: l.isMounted,
3238
3238
  returns: "either"
3239
3239
  }), k = (C) => {
@@ -3245,23 +3245,23 @@ class rr {
3245
3245
  })
3246
3246
  ) : m.right(void 0);
3247
3247
  };
3248
- this.isSupported = W("web_app_setup_swipe_behavior", o), this.isVerticalEnabled = a.getter("isVerticalEnabled"), this.isMounted = l.isMounted, this.disableVerticalFp = f(() => k(!1)), this.enableVerticalFp = f(() => k(!0)), this.mountFp = F(() => {
3248
+ this.isSupported = W("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(() => {
3249
3249
  const C = () => {
3250
3250
  };
3251
3251
  return p.pipe(l.mount(), m.match(C, C));
3252
3252
  }), this.unmount = l.unmount, this.disableVertical = /* @__PURE__ */ h(this.disableVerticalFp), this.enableVertical = /* @__PURE__ */ h(this.enableVerticalFp), this.mount = /* @__PURE__ */ h(this.mountFp);
3253
3253
  }
3254
3254
  }
3255
- function nr() {
3256
- return new rr(p.pipe(
3255
+ function rr() {
3256
+ return new sr(p.pipe(
3257
3257
  v(),
3258
- V,
3258
+ T,
3259
3259
  y,
3260
3260
  Z("swipeBehavior")
3261
3261
  ));
3262
3262
  }
3263
- const Qn = /* @__PURE__ */ nr();
3264
- async function Nn(n) {
3263
+ const Qn = /* @__PURE__ */ rr();
3264
+ async function Kn(n) {
3265
3265
  try {
3266
3266
  const { clipboard: s } = navigator;
3267
3267
  if (s)
@@ -3276,7 +3276,7 @@ async function Nn(n) {
3276
3276
  document.body.removeChild(e);
3277
3277
  }
3278
3278
  }
3279
- function ir({ request: n, ...e }) {
3279
+ function nr({ request: n, ...e }) {
3280
3280
  return A((s, r, i) => p.pipe(
3281
3281
  n(
3282
3282
  "web_app_request_file_download",
@@ -3287,20 +3287,20 @@ function ir({ request: n, ...e }) {
3287
3287
  ), { ...e, requires: "web_app_request_file_download", returns: "task" });
3288
3288
  }
3289
3289
  // @__NO_SIDE_EFFECTS__
3290
- function or() {
3291
- return ir(p.pipe(
3290
+ function ir() {
3291
+ return nr(p.pipe(
3292
3292
  v(),
3293
3293
  L,
3294
3294
  y
3295
3295
  ));
3296
3296
  }
3297
- const ar = /* @__PURE__ */ or(), zn = /* @__PURE__ */ h(ar);
3298
- function cr({ invokeCustomMethod: n, ...e }) {
3297
+ const or = /* @__PURE__ */ ir(), Nn = /* @__PURE__ */ h(or);
3298
+ function ar({ invokeCustomMethod: n, ...e }) {
3299
3299
  return A((s) => p.pipe(
3300
3300
  n("getCurrentTime", {}, s),
3301
3301
  u.chain((r) => {
3302
- const i = Ce(
3303
- Qe(Je(), qt(), Ne((o) => new Date(o * 1e3)), ze()),
3302
+ const i = Fe(
3303
+ Ke(Je(), yt(), Ne((o) => new Date(o * 1e3)), ze()),
3304
3304
  r
3305
3305
  );
3306
3306
  return i.success ? u.right(i.output) : u.left(new pe(r, i.issues));
@@ -3308,52 +3308,52 @@ function cr({ invokeCustomMethod: n, ...e }) {
3308
3308
  ), { ...e, requires: "web_app_invoke_custom_method", returns: "task" });
3309
3309
  }
3310
3310
  // @__NO_SIDE_EFFECTS__
3311
- function pr() {
3312
- return cr(p.pipe(
3311
+ function cr() {
3312
+ return ar(p.pipe(
3313
3313
  v(),
3314
- Ve,
3314
+ Re,
3315
3315
  y
3316
3316
  ));
3317
3317
  }
3318
- const ur = /* @__PURE__ */ pr(), Jn = /* @__PURE__ */ h(ur);
3319
- function lr({ postEvent: n, ...e }) {
3318
+ const pr = /* @__PURE__ */ cr(), zn = /* @__PURE__ */ h(pr);
3319
+ function ur({ postEvent: n, ...e }) {
3320
3320
  return A(() => n("web_app_hide_keyboard"), { ...e, returns: "either", requires: "web_app_hide_keyboard" });
3321
3321
  }
3322
3322
  // @__NO_SIDE_EFFECTS__
3323
- function dr() {
3324
- return lr(p.pipe(
3323
+ function lr() {
3324
+ return ur(p.pipe(
3325
3325
  v(),
3326
- V,
3326
+ T,
3327
3327
  y
3328
3328
  ));
3329
3329
  }
3330
- const hr = /* @__PURE__ */ dr(), Yn = /* @__PURE__ */ h(hr);
3331
- function _r({ request: n, createRequestId: e, ...s }) {
3330
+ const dr = /* @__PURE__ */ lr(), Jn = /* @__PURE__ */ h(dr);
3331
+ function hr({ request: n, createRequestId: e, ...s }) {
3332
3332
  return A((r) => {
3333
3333
  const i = e();
3334
3334
  return p.pipe(
3335
3335
  n("web_app_read_text_from_clipboard", "clipboard_text_received", {
3336
3336
  ...r,
3337
3337
  params: { req_id: i },
3338
- capture: bt(i)
3338
+ capture: _t(i)
3339
3339
  }),
3340
3340
  u.map(({ data: o = null }) => o)
3341
3341
  );
3342
3342
  }, { ...s, requires: "web_app_read_text_from_clipboard", returns: "task" });
3343
3343
  }
3344
3344
  // @__NO_SIDE_EFFECTS__
3345
- function br() {
3346
- return _r({
3345
+ function _r() {
3346
+ return hr({
3347
3347
  ...p.pipe(
3348
3348
  v(),
3349
3349
  y,
3350
3350
  L
3351
3351
  ),
3352
- createRequestId: Re
3352
+ createRequestId: Me
3353
3353
  });
3354
3354
  }
3355
- const fr = /* @__PURE__ */ br(), Zn = /* @__PURE__ */ h(fr);
3356
- function gr(n) {
3355
+ const br = /* @__PURE__ */ _r(), Yn = /* @__PURE__ */ h(br);
3356
+ function fr(n) {
3357
3357
  const e = {}, s = n.match(/VBot-Android(?:\/([^ ]+))?(?: (\([^)]+\))?|$)/);
3358
3358
  if (s) {
3359
3359
  const [, r, i] = s;
@@ -3369,23 +3369,23 @@ function gr(n) {
3369
3369
  }
3370
3370
  return e;
3371
3371
  }
3372
- function Xn() {
3373
- return gr(navigator.userAgent);
3372
+ function Zn() {
3373
+ return fr(navigator.userAgent);
3374
3374
  }
3375
- function mr({ postEvent: n, ...e }) {
3375
+ function gr({ postEvent: n, ...e }) {
3376
3376
  return A((s) => {
3377
3377
  const { size: r } = new Blob([s]);
3378
3378
  return !r || r > 4096 ? m.left(
3379
- new K(r ? "Maximum size of data to send is 4096 bytes" : "Attempted to send empty data")
3379
+ new Q(r ? "Maximum size of data to send is 4096 bytes" : "Attempted to send empty data")
3380
3380
  ) : n("web_app_data_send", { data: s });
3381
3381
  }, { ...e, returns: "either" });
3382
3382
  }
3383
3383
  // @__NO_SIDE_EFFECTS__
3384
- function wr() {
3385
- return mr(p.pipe(v(), V));
3384
+ function mr() {
3385
+ return gr(p.pipe(v(), T));
3386
3386
  }
3387
- const Fr = /* @__PURE__ */ wr(), ei = /* @__PURE__ */ h(Fr);
3388
- function Sr({ request: n, ...e }) {
3387
+ const wr = /* @__PURE__ */ mr(), Xn = /* @__PURE__ */ h(wr);
3388
+ function Fr({ request: n, ...e }) {
3389
3389
  return A((s, r) => p.pipe(
3390
3390
  n(
3391
3391
  "web_app_send_prepared_message",
@@ -3395,19 +3395,19 @@ function Sr({ request: n, ...e }) {
3395
3395
  params: { id: s }
3396
3396
  }
3397
3397
  ),
3398
- u.chain((i) => i.event === "prepared_message_failed" ? u.left(new Rt(i.payload.error)) : u.right(void 0))
3398
+ u.chain((i) => i.event === "prepared_message_failed" ? u.left(new Mt(i.payload.error)) : u.right(void 0))
3399
3399
  ), { ...e, requires: "web_app_send_prepared_message", returns: "task" });
3400
3400
  }
3401
3401
  // @__NO_SIDE_EFFECTS__
3402
- function Cr() {
3403
- return Sr(p.pipe(
3402
+ function Sr() {
3403
+ return Fr(p.pipe(
3404
3404
  v(),
3405
3405
  L,
3406
3406
  y
3407
3407
  ));
3408
3408
  }
3409
- const vr = /* @__PURE__ */ Cr(), ti = /* @__PURE__ */ h(vr);
3410
- function kr({ postEvent: n, ...e }) {
3409
+ const Cr = /* @__PURE__ */ Sr(), ei = /* @__PURE__ */ h(Cr);
3410
+ function vr({ postEvent: n, ...e }) {
3411
3411
  return A((s, r = {}) => n("web_app_share_to_story", {
3412
3412
  text: r.text,
3413
3413
  media_url: s,
@@ -3415,15 +3415,15 @@ function kr({ postEvent: n, ...e }) {
3415
3415
  }), { ...e, requires: "web_app_share_to_story", returns: "either" });
3416
3416
  }
3417
3417
  // @__NO_SIDE_EFFECTS__
3418
- function yr() {
3419
- return kr(p.pipe(
3418
+ function kr() {
3419
+ return vr(p.pipe(
3420
3420
  v(),
3421
- V,
3421
+ T,
3422
3422
  y
3423
3423
  ));
3424
3424
  }
3425
- const qr = /* @__PURE__ */ yr(), si = /* @__PURE__ */ h(qr), ye = /* @__PURE__ */ oe(!1);
3426
- function Ir({ isInlineMode: n, postEvent: e, ...s }) {
3425
+ const yr = /* @__PURE__ */ kr(), ti = /* @__PURE__ */ h(yr), ke = /* @__PURE__ */ oe(!1);
3426
+ function qr({ isInlineMode: n, postEvent: e, ...s }) {
3427
3427
  return A((r, i) => e("web_app_switch_inline_query", {
3428
3428
  query: r,
3429
3429
  chat_types: i || []
@@ -3436,18 +3436,18 @@ function Ir({ isInlineMode: n, postEvent: e, ...s }) {
3436
3436
  });
3437
3437
  }
3438
3438
  // @__NO_SIDE_EFFECTS__
3439
- function Er() {
3440
- return Ir({
3439
+ function Ir() {
3440
+ return qr({
3441
3441
  ...p.pipe(
3442
3442
  v(),
3443
- V,
3443
+ T,
3444
3444
  y
3445
3445
  ),
3446
- isInlineMode: ye
3446
+ isInlineMode: ke
3447
3447
  });
3448
3448
  }
3449
- const Br = /* @__PURE__ */ Er(), ri = /* @__PURE__ */ h(Br);
3450
- class Ar {
3449
+ const Er = /* @__PURE__ */ Ir(), si = /* @__PURE__ */ h(Er);
3450
+ class Br {
3451
3451
  constructor({
3452
3452
  storage: e,
3453
3453
  isPageReload: s,
@@ -3457,9 +3457,9 @@ class Ar {
3457
3457
  onFullscreenChanged: c,
3458
3458
  offContentSafeAreaInsetsChanged: a,
3459
3459
  offFullscreenChanged: l,
3460
- offSafeAreaInsetsChanged: _,
3460
+ offSafeAreaInsetsChanged: f,
3461
3461
  offViewportChanged: F,
3462
- request: f,
3462
+ request: b,
3463
3463
  isViewportStable: k,
3464
3464
  isFullscreen: C,
3465
3465
  isVBma: q,
@@ -3653,7 +3653,7 @@ class Ar {
3653
3653
  * @see expandFp
3654
3654
  */
3655
3655
  t(this, "expand");
3656
- const w = { top: 0, right: 0, left: 0, bottom: 0 }, b = new Y({
3656
+ const w = { top: 0, right: 0, left: 0, bottom: 0 }, _ = new Y({
3657
3657
  initialState: {
3658
3658
  contentSafeAreaInsets: w,
3659
3659
  height: 0,
@@ -3665,38 +3665,38 @@ class Ar {
3665
3665
  },
3666
3666
  onChange: e.set
3667
3667
  }), x = (B) => {
3668
- b.setState({
3668
+ _.setState({
3669
3669
  isExpanded: B.is_expanded,
3670
3670
  height: B.height,
3671
3671
  width: B.width,
3672
3672
  stableHeight: B.is_state_stable ? B.height : void 0
3673
3673
  });
3674
- }, T = (B) => {
3675
- b.setState({ isFullscreen: B.is_fullscreen });
3674
+ }, V = (B) => {
3675
+ _.setState({ isFullscreen: B.is_fullscreen });
3676
3676
  }, R = (B) => {
3677
- b.setState({ safeAreaInsets: B });
3677
+ _.setState({ safeAreaInsets: B });
3678
3678
  }, H = (B) => {
3679
- b.setState({ contentSafeAreaInsets: B });
3680
- }, $ = new Me({
3679
+ _.setState({ contentSafeAreaInsets: B });
3680
+ }, $ = new xe({
3681
3681
  initialState(B) {
3682
- const X = (Q) => () => {
3683
- const [J, D] = Q === "safe-area" ? ["web_app_request_safe_area", "safe_area_changed"] : ["web_app_request_content_safe_area", "content_safe_area_changed"];
3684
- return te(J, P(I)) ? f(J, D, B) : u.right({ top: 0, left: 0, right: 0, bottom: 0 });
3685
- }, M = (Q) => () => typeof Q == "boolean" ? u.right(Q) : u.fromEither(Q());
3682
+ const X = (K) => () => {
3683
+ const [J, D] = K === "safe-area" ? ["web_app_request_safe_area", "safe_area_changed"] : ["web_app_request_content_safe_area", "content_safe_area_changed"];
3684
+ return te(J, P(I)) ? b(J, D, B) : u.right({ top: 0, left: 0, right: 0, bottom: 0 });
3685
+ }, M = (K) => () => typeof K == "boolean" ? u.right(K) : u.fromEither(K());
3686
3686
  return p.pipe(
3687
3687
  u.Do,
3688
3688
  u.bindW("safeAreaInsets", X("safe-area")),
3689
3689
  u.bindW("contentSafeAreaInsets", X("content-safe-area")),
3690
3690
  u.bindW("isFullscreen", M(C)),
3691
3691
  u.bindW("isViewportStable", M(k)),
3692
- u.chainW(({ isViewportStable: Q, ...J }) => Q ? u.right({
3692
+ u.chainW(({ isViewportStable: K, ...J }) => K ? u.right({
3693
3693
  ...J,
3694
3694
  height: window.innerHeight,
3695
3695
  isExpanded: !0,
3696
3696
  stableHeight: window.innerHeight,
3697
3697
  width: window.innerWidth
3698
3698
  }) : p.pipe(
3699
- f("web_app_request_viewport", "viewport_changed", B),
3699
+ b("web_app_request_viewport", "viewport_changed", B),
3700
3700
  u.map((D) => ({
3701
3701
  ...J,
3702
3702
  height: D.height,
@@ -3709,38 +3709,38 @@ class Ar {
3709
3709
  },
3710
3710
  isPageReload: s,
3711
3711
  onMounted(B) {
3712
- o(x), c(T), i(R), r(H), b.setState(B);
3712
+ o(x), c(V), i(R), r(H), _.setState(B);
3713
3713
  },
3714
3714
  onUnmounted() {
3715
- F(x), l(T), _(R), a(H);
3715
+ F(x), l(V), f(R), a(H);
3716
3716
  },
3717
3717
  restoreState: e.get
3718
3718
  }), U = (B) => S(() => this.safeAreaInsets()[B]), ae = (B) => S(() => this.contentSafeAreaInsets()[B]);
3719
- this.state = b.state, this.height = b.getter("height"), this.stableHeight = b.getter("stableHeight"), this.width = b.getter("width"), this.isExpanded = b.getter("isExpanded"), this.safeAreaInsets = b.getter("safeAreaInsets"), this.safeAreaInsetTop = U("top"), this.safeAreaInsetBottom = U("bottom"), this.safeAreaInsetLeft = U("left"), this.safeAreaInsetRight = U("right"), this.contentSafeAreaInsets = b.getter("contentSafeAreaInsets"), this.contentSafeAreaInsetTop = ae("top"), this.contentSafeAreaInsetBottom = ae("bottom"), this.contentSafeAreaInsetLeft = ae("left"), this.contentSafeAreaInsetRight = ae("right");
3720
- const at = E({ isVBma: q, returns: "task" }), $e = E({
3719
+ this.state = _.state, this.height = _.getter("height"), this.stableHeight = _.getter("stableHeight"), this.width = _.getter("width"), this.isExpanded = _.getter("isExpanded"), this.safeAreaInsets = _.getter("safeAreaInsets"), this.safeAreaInsetTop = U("top"), this.safeAreaInsetBottom = U("bottom"), this.safeAreaInsetLeft = U("left"), this.safeAreaInsetRight = U("right"), this.contentSafeAreaInsets = _.getter("contentSafeAreaInsets"), this.contentSafeAreaInsetTop = ae("top"), this.contentSafeAreaInsetBottom = ae("bottom"), this.contentSafeAreaInsetLeft = ae("left"), this.contentSafeAreaInsetRight = ae("right");
3720
+ const ot = E({ isVBma: q, returns: "task" }), Le = E({
3721
3721
  isVBma: q,
3722
3722
  returns: "either"
3723
- }), ct = E({
3723
+ }), at = E({
3724
3724
  isVBma: q,
3725
3725
  requires: "web_app_request_fullscreen",
3726
3726
  version: I,
3727
3727
  returns: "task"
3728
- }), Pe = (B) => ct((X) => p.pipe(
3729
- f(
3728
+ }), $e = (B) => at((X) => p.pipe(
3729
+ b(
3730
3730
  B ? "web_app_request_fullscreen" : "web_app_exit_fullscreen",
3731
3731
  ["fullscreen_changed", "fullscreen_failed"],
3732
3732
  X
3733
3733
  ),
3734
- u.chain((M) => M.event === "fullscreen_failed" && M.payload.error !== "ALREADY_FULLSCREEN" ? u.left(new Mt(M.payload.error)) : (b.setState({
3734
+ u.chain((M) => M.event === "fullscreen_failed" && M.payload.error !== "ALREADY_FULLSCREEN" ? u.left(new xt(M.payload.error)) : (_.setState({
3735
3735
  isFullscreen: "is_fullscreen" in M.payload ? M.payload.is_fullscreen : !0
3736
3736
  }), u.right(void 0)))
3737
3737
  ));
3738
- this.isMounted = $.isMounted, this.mountFp = at($.mount), this.mount = /* @__PURE__ */ h(this.mountFp), this.isFullscreen = b.getter("isFullscreen"), this.requestFullscreenFp = Pe(!0), this.requestFullscreen = /* @__PURE__ */ h(this.requestFullscreenFp), this.exitFullscreenFp = Pe(!1), this.exitFullscreen = /* @__PURE__ */ h(this.exitFullscreenFp);
3738
+ this.isMounted = $.isMounted, this.mountFp = ot($.mount), this.mount = /* @__PURE__ */ h(this.mountFp), this.isFullscreen = _.getter("isFullscreen"), this.requestFullscreenFp = $e(!0), this.requestFullscreen = /* @__PURE__ */ h(this.requestFullscreenFp), this.exitFullscreenFp = $e(!1), this.exitFullscreen = /* @__PURE__ */ h(this.exitFullscreenFp);
3739
3739
  const ce = O(!1);
3740
- this.isCssVarsBound = S(ce), this.bindCssVarsFp = $e(
3740
+ this.isCssVarsBound = S(ce), this.bindCssVarsFp = Le(
3741
3741
  (B) => {
3742
3742
  if (ce())
3743
- return m.left(new Be());
3743
+ return m.left(new Ee());
3744
3744
  B || (B = (M) => `--vb-viewport-${Ue(M)}`);
3745
3745
  const X = [
3746
3746
  ["height", this.height],
@@ -3754,13 +3754,13 @@ class Ar {
3754
3754
  ["contentSafeAreaInsetBottom", this.contentSafeAreaInsetBottom],
3755
3755
  ["contentSafeAreaInsetLeft", this.contentSafeAreaInsetLeft],
3756
3756
  ["contentSafeAreaInsetRight", this.contentSafeAreaInsetRight]
3757
- ].reduce((M, [Q, J]) => {
3758
- const D = B(Q);
3757
+ ].reduce((M, [K, J]) => {
3758
+ const D = B(K);
3759
3759
  if (D) {
3760
- const He = () => {
3760
+ const Pe = () => {
3761
3761
  Te(D, `${J()}px`);
3762
3762
  };
3763
- M.push({ update: He, removeListener: J.sub(He), cssVar: D });
3763
+ M.push({ update: Pe, removeListener: J.sub(Pe), cssVar: D });
3764
3764
  }
3765
3765
  return M;
3766
3766
  }, []);
@@ -3768,15 +3768,15 @@ class Ar {
3768
3768
  M.update();
3769
3769
  }), ce.set(!0), m.right(() => {
3770
3770
  X.forEach((M) => {
3771
- M.removeListener(), Le(M.cssVar);
3771
+ M.removeListener(), Ve(M.cssVar);
3772
3772
  }), ce.set(!1);
3773
3773
  });
3774
3774
  }
3775
- ), this.bindCssVars = /* @__PURE__ */ h(this.bindCssVarsFp), this.expandFp = $e(() => g("web_app_expand")), this.expand = /* @__PURE__ */ h(this.expandFp);
3775
+ ), this.bindCssVars = /* @__PURE__ */ h(this.bindCssVarsFp), this.expandFp = Le(() => g("web_app_expand")), this.expand = /* @__PURE__ */ h(this.expandFp);
3776
3776
  }
3777
3777
  //#endregion
3778
3778
  }
3779
- function xr() {
3779
+ function Ar() {
3780
3780
  const n = (o) => ({
3781
3781
  on: (c) => {
3782
3782
  j(o, c);
@@ -3785,12 +3785,12 @@ function xr() {
3785
3785
  ne(o, c);
3786
3786
  }
3787
3787
  }), e = n("viewport_changed"), s = n("fullscreen_changed"), r = n("safe_area_changed"), i = n("content_safe_area_changed");
3788
- return new Ar({
3788
+ return new Br({
3789
3789
  ...p.pipe(
3790
3790
  v(),
3791
3791
  Z("viewport"),
3792
3792
  y,
3793
- V,
3793
+ T,
3794
3794
  L
3795
3795
  ),
3796
3796
  isFullscreen() {
@@ -3809,8 +3809,8 @@ function xr() {
3809
3809
  onViewportChanged: e.on
3810
3810
  });
3811
3811
  }
3812
- const ni = /* @__PURE__ */ xr();
3813
- class Mr {
3812
+ const ri = /* @__PURE__ */ Ar();
3813
+ class xr {
3814
3814
  constructor({ request: e }) {
3815
3815
  /**
3816
3816
  * Requests storage access with specified options.
@@ -3875,13 +3875,13 @@ class Mr {
3875
3875
  });
3876
3876
  }
3877
3877
  }
3878
- function Rr() {
3879
- return new Mr({
3878
+ function Mr() {
3879
+ return new xr({
3880
3880
  request: Ge
3881
3881
  });
3882
3882
  }
3883
- const ii = /* @__PURE__ */ Rr();
3884
- class Vr {
3883
+ const ni = /* @__PURE__ */ Mr();
3884
+ class Rr {
3885
3885
  /**
3886
3886
  * Listens to 'web_app_setup_back_button' methods calls from Mini App.
3887
3887
  */
@@ -3898,7 +3898,7 @@ class Vr {
3898
3898
  d().send("back_button_pressed");
3899
3899
  }
3900
3900
  }
3901
- const oi = new Vr();
3901
+ const ii = new Rr();
3902
3902
  class Tr {
3903
3903
  /**
3904
3904
  * Listens to 'web_app_setup_main_button' methods calls from Mini App.
@@ -3916,8 +3916,8 @@ class Tr {
3916
3916
  d().send("main_button_pressed");
3917
3917
  }
3918
3918
  }
3919
- const ai = new Tr();
3920
- class Lr {
3919
+ const oi = new Tr();
3920
+ class Vr {
3921
3921
  /**
3922
3922
  * Listens to 'web_app_setup_secondary_button' methods calls from Mini App.
3923
3923
  */
@@ -3934,8 +3934,8 @@ class Lr {
3934
3934
  d().send("secondary_button_pressed");
3935
3935
  }
3936
3936
  }
3937
- const ci = new Lr();
3938
- class $r {
3937
+ const ai = new Vr();
3938
+ class Lr {
3939
3939
  /**
3940
3940
  * Listens to 'web_app_setup_settings_button' methods calls from Mini App.
3941
3941
  */
@@ -3952,8 +3952,8 @@ class $r {
3952
3952
  d().send("settings_button_pressed");
3953
3953
  }
3954
3954
  }
3955
- const pi = new $r();
3956
- class Pr {
3955
+ const ci = new Lr();
3956
+ class $r {
3957
3957
  /**
3958
3958
  * Listens to 'web_app_open_popup' methods calls from Mini App.
3959
3959
  */
@@ -3971,8 +3971,8 @@ class Pr {
3971
3971
  d().send("popup_closed", { button_id: e });
3972
3972
  }
3973
3973
  }
3974
- const ui = new Pr();
3975
- class Hr {
3974
+ const pi = new $r();
3975
+ class Pr {
3976
3976
  /**
3977
3977
  * Listens to 'web_app_expand' methods calls from Mini App.
3978
3978
  */
@@ -4060,8 +4060,8 @@ class Hr {
4060
4060
  d().send("viewport_changed", e);
4061
4061
  }
4062
4062
  }
4063
- const li = new Hr();
4064
- class Or {
4063
+ const ui = new Pr();
4064
+ class Hr {
4065
4065
  /**
4066
4066
  * Listens to 'iframe_ready' methods calls from Mini App.
4067
4067
  */
@@ -4153,8 +4153,8 @@ class Or {
4153
4153
  d().send("visibility_changed", { is_visible: e });
4154
4154
  }
4155
4155
  }
4156
- const di = new Or();
4157
- class Dr {
4156
+ const li = new Hr();
4157
+ class Or {
4158
4158
  /**
4159
4159
  * Listens to 'web_app_trigger_haptic_feedback' methods calls from Mini App.
4160
4160
  */
@@ -4164,8 +4164,8 @@ class Dr {
4164
4164
  });
4165
4165
  }
4166
4166
  }
4167
- const hi = new Dr();
4168
- class jr {
4167
+ const di = new Or();
4168
+ class Dr {
4169
4169
  /**
4170
4170
  * Listens to 'web_app_biometry_get_info' methods calls from Mini App.
4171
4171
  */
@@ -4225,8 +4225,8 @@ class jr {
4225
4225
  d().send("biometry_token_updated", e);
4226
4226
  }
4227
4227
  }
4228
- const _i = new jr();
4229
- class Gr {
4228
+ const hi = new Dr();
4229
+ class jr {
4230
4230
  /**
4231
4231
  * Listens to 'web_app_open_invoice' methods calls from Mini App.
4232
4232
  */
@@ -4242,8 +4242,8 @@ class Gr {
4242
4242
  d().send("invoice_closed", e);
4243
4243
  }
4244
4244
  }
4245
- const bi = new Gr();
4246
- class Wr {
4245
+ const _i = new jr();
4246
+ class Gr {
4247
4247
  /**
4248
4248
  * Listens to 'web_app_open_scan_qr_popup' methods calls from Mini App.
4249
4249
  */
@@ -4273,8 +4273,8 @@ class Wr {
4273
4273
  d().send("scan_qr_popup_closed");
4274
4274
  }
4275
4275
  }
4276
- const fi = new Wr();
4277
- class Ur {
4276
+ const bi = new Gr();
4277
+ class Wr {
4278
4278
  /**
4279
4279
  * Listens to 'web_app_check_location' methods calls from Mini App.
4280
4280
  */
@@ -4312,8 +4312,8 @@ class Ur {
4312
4312
  d().send("location_requested", e);
4313
4313
  }
4314
4314
  }
4315
- const gi = new Ur();
4316
- class Kr {
4315
+ const fi = new Wr();
4316
+ class Ur {
4317
4317
  /**
4318
4318
  * Listens to 'web_app_open_link' methods calls from Mini App.
4319
4319
  */
@@ -4331,7 +4331,7 @@ class Kr {
4331
4331
  });
4332
4332
  }
4333
4333
  }
4334
- const mi = new Kr();
4334
+ const gi = new Ur();
4335
4335
  class Qr {
4336
4336
  /**
4337
4337
  * Listens to 'web_app_request_emoji_status_access' methods calls from Mini App.
@@ -4368,8 +4368,8 @@ class Qr {
4368
4368
  d().send("emoji_status_failed", e);
4369
4369
  }
4370
4370
  }
4371
- const wi = new Qr();
4372
- class Nr {
4371
+ const mi = new Qr();
4372
+ class Kr {
4373
4373
  /**
4374
4374
  * Listens to 'web_app_add_to_home_screen' methods calls from Mini App.
4375
4375
  */
@@ -4405,8 +4405,8 @@ class Nr {
4405
4405
  d().send("home_screen_failed", e);
4406
4406
  }
4407
4407
  }
4408
- const Fi = new Nr();
4409
- class zr {
4408
+ const wi = new Kr();
4409
+ class Nr {
4410
4410
  /**
4411
4411
  * Listens to 'web_app_request_phone' methods calls from Mini App.
4412
4412
  */
@@ -4436,8 +4436,8 @@ class zr {
4436
4436
  d().send("write_access_requested", e);
4437
4437
  }
4438
4438
  }
4439
- const Si = new zr();
4440
- class Jr {
4439
+ const Fi = new Nr();
4440
+ class zr {
4441
4441
  /**
4442
4442
  * Listens to 'web_app_setup_closing_behavior' methods calls from Mini App.
4443
4443
  */
@@ -4447,8 +4447,8 @@ class Jr {
4447
4447
  });
4448
4448
  }
4449
4449
  }
4450
- const Ci = new Jr();
4451
- class Yr {
4450
+ const Si = new zr();
4451
+ class Jr {
4452
4452
  /**
4453
4453
  * Listens to 'web_app_setup_swipe_behavior' methods calls from Mini App.
4454
4454
  */
@@ -4458,8 +4458,8 @@ class Yr {
4458
4458
  });
4459
4459
  }
4460
4460
  }
4461
- const vi = new Yr();
4462
- class Zr {
4461
+ const Ci = new Jr();
4462
+ class Yr {
4463
4463
  /**
4464
4464
  * Listens to 'web_app_read_text_from_clipboard' methods calls from Mini App.
4465
4465
  */
@@ -4475,8 +4475,8 @@ class Zr {
4475
4475
  d().send("clipboard_text_received", e);
4476
4476
  }
4477
4477
  }
4478
- const ki = new Zr();
4479
- class Xr {
4478
+ const vi = new Yr();
4479
+ class Zr {
4480
4480
  /**
4481
4481
  * Listens to 'web_app_request_file_download' methods calls from Mini App.
4482
4482
  */
@@ -4492,8 +4492,8 @@ class Xr {
4492
4492
  d().send("file_download_requested", e);
4493
4493
  }
4494
4494
  }
4495
- const yi = new Xr();
4496
- class en {
4495
+ const ki = new Zr();
4496
+ class Xr {
4497
4497
  /**
4498
4498
  * Listens to 'web_app_send_prepared_message' methods calls from Mini App.
4499
4499
  */
@@ -4523,8 +4523,8 @@ class en {
4523
4523
  d().send("prepared_message_sent");
4524
4524
  }
4525
4525
  }
4526
- const qi = new en();
4527
- class tn {
4526
+ const yi = new Xr();
4527
+ class en {
4528
4528
  /**
4529
4529
  * Listens to 'web_app_data_send' methods calls from Mini App.
4530
4530
  */
@@ -4542,8 +4542,8 @@ class tn {
4542
4542
  });
4543
4543
  }
4544
4544
  }
4545
- const Ii = new tn();
4546
- class sn {
4545
+ const qi = new en();
4546
+ class tn {
4547
4547
  /**
4548
4548
  * Listens to 'web_app_invoke_custom_method' methods calls from Mini App.
4549
4549
  */
@@ -4559,8 +4559,8 @@ class sn {
4559
4559
  d().send("custom_method_invoked", e);
4560
4560
  }
4561
4561
  }
4562
- const Ei = new sn();
4563
- class rn {
4562
+ const Ii = new tn();
4563
+ class sn {
4564
4564
  /**
4565
4565
  * Listens to 'web_app_send_notification' method call from Mini App.
4566
4566
  */
@@ -4570,8 +4570,8 @@ class rn {
4570
4570
  });
4571
4571
  }
4572
4572
  }
4573
- const Bi = new rn();
4574
- class nn {
4573
+ const Ei = new sn();
4574
+ class rn {
4575
4575
  /**
4576
4576
  * Sets the theme params of the Mini App.
4577
4577
  * Sends 'theme_changed' event to the Mini App.
@@ -4588,269 +4588,268 @@ class nn {
4588
4588
  });
4589
4589
  }
4590
4590
  }
4591
- const Ai = new nn();
4592
- function on(n = {}) {
4591
+ const Bi = new rn();
4592
+ function nn(n = {}) {
4593
4593
  const {
4594
4594
  version: e,
4595
4595
  isInlineMode: s,
4596
4596
  themeParams: r
4597
4597
  } = n;
4598
- let i = "0.0";
4599
4598
  if (e && typeof s == "boolean" && r)
4600
- i = e, ye.set(s), ke.set(r);
4599
+ Ce.set(e), ke.set(s), ve.set(r);
4601
4600
  else {
4602
- const l = p.pipe(le(), m.matchW(
4603
- (_) => _,
4604
- (_) => {
4605
- i = e || _.vbWebAppVersion || (_.vbWebAppPlatform === "web" ? be : "0.0"), ye.set(typeof s == "boolean" ? s : !!_.vbWebAppBotInline), ke.set(r || _.vbWebAppThemeParams);
4601
+ const a = p.pipe(le(), m.matchW(
4602
+ (l) => l,
4603
+ (l) => {
4604
+ Ce.set(e || l.vbWebAppVersion || (l.vbWebAppPlatform === "web" ? bt : "0.0")), ke.set(typeof s == "boolean" ? s : !!l.vbWebAppBotInline), ve.set(r || l.vbWebAppThemeParams);
4606
4605
  }
4607
4606
  ));
4608
- if (l)
4609
- return m.left(l);
4607
+ if (a)
4608
+ return m.left(a);
4610
4609
  }
4611
- ft(i, be) === 1 && fe().warn(`The VBot Mini Apps version ${i} is higher than the maximum supported by this SDK version. The latest supported version is ${be}. Some features might not work as expected. Please consider updating the SDK.`), Xe.set(i), n.postEvent && Ze.set(n.postEvent);
4612
- const [o, c] = Ie(
4610
+ n.postEvent && Ze.set(n.postEvent);
4611
+ const [i, o] = qe(
4613
4612
  j("reload_iframe", () => {
4614
- fe().log("Received a request to reload the page"), Lt("iframe_will_reload"), window.location.reload();
4613
+ He().log("Received a request to reload the page"), Vt("iframe_will_reload"), window.location.reload();
4615
4614
  })
4616
- ), { acceptCustomStyles: a = !0 } = n;
4617
- if (a) {
4618
- const l = document.createElement("style");
4619
- l.id = "vbot-custom-styles", document.head.appendChild(l), o(
4620
- j("set_custom_style", (_) => {
4621
- l.innerHTML = _;
4615
+ ), { acceptCustomStyles: c = !0 } = n;
4616
+ if (c) {
4617
+ const a = document.createElement("style");
4618
+ a.id = "vbot-custom-styles", document.head.appendChild(a), i(
4619
+ j("set_custom_style", (l) => {
4620
+ a.innerHTML = l;
4622
4621
  }),
4623
4622
  () => {
4624
- document.head.removeChild(l);
4623
+ document.head.removeChild(a);
4625
4624
  }
4626
4625
  );
4627
4626
  }
4628
4627
  return p.pipe(
4629
4628
  re("iframe_ready", { reload_supported: !0 }),
4630
- m.map(() => (fe().log("The package was initialized"), c))
4629
+ m.map(() => (He().log("The package was initialized"), o))
4631
4630
  );
4632
4631
  }
4633
- const xi = he(on);
4632
+ const Ai = he(nn);
4634
4633
  export {
4635
4634
  Ye as AccessDeniedError,
4636
4635
  Tt as BackButton,
4637
- Ot as Biometry,
4638
- Be as CSSVarsBoundError,
4639
- Vi as CancelledError,
4640
- Gt as ClosingBehavior,
4641
- Ut as CloudStorage,
4642
- Ae as ConcurrentCallError,
4643
- Nt as DeviceStorage,
4644
- It as DeviceStorageMethodError,
4645
- Mt as FullscreenFailedError,
4646
- At as FunctionUnavailableError,
4647
- ss as HapticFeedback,
4648
- Vr as HostBackButton,
4649
- jr as HostBiometry,
4650
- tn as HostChat,
4651
- Zr as HostClipboard,
4652
- Jr as HostClosingBehavior,
4653
- sn as HostCustomMethod,
4636
+ Ht as Biometry,
4637
+ Ee as CSSVarsBoundError,
4638
+ Ri as CancelledError,
4639
+ jt as ClosingBehavior,
4640
+ Wt as CloudStorage,
4641
+ Be as ConcurrentCallError,
4642
+ Kt as DeviceStorage,
4643
+ qt as DeviceStorageMethodError,
4644
+ xt as FullscreenFailedError,
4645
+ Bt as FunctionUnavailableError,
4646
+ ts as HapticFeedback,
4647
+ Rr as HostBackButton,
4648
+ Dr as HostBiometry,
4649
+ en as HostChat,
4650
+ Yr as HostClipboard,
4651
+ zr as HostClosingBehavior,
4652
+ tn as HostCustomMethod,
4654
4653
  Qr as HostEmojiStatus,
4655
- Xr as HostFiles,
4656
- Dr as HostHapticFeedback,
4657
- Nr as HostHomeScreen,
4658
- Gr as HostInvoice,
4659
- Kr as HostLink,
4660
- Ur as HostLocationManager,
4654
+ Zr as HostFiles,
4655
+ Or as HostHapticFeedback,
4656
+ Kr as HostHomeScreen,
4657
+ jr as HostInvoice,
4658
+ Ur as HostLink,
4659
+ Wr as HostLocationManager,
4661
4660
  Tr as HostMainButton,
4662
- Or as HostMiniApp,
4663
- rn as HostNotification,
4664
- Pr as HostPopup,
4665
- zr as HostPrivacy,
4666
- Wr as HostQrScanner,
4667
- Lr as HostSecondaryButton,
4668
- $r as HostSettingsButton,
4669
- en as HostSharing,
4670
- Yr as HostSwipeBehavior,
4671
- nn as HostThemeParams,
4672
- Hr as HostViewport,
4673
- us as InitData,
4674
- K as InvalidArgumentsError,
4675
- fn as InvalidEnvError,
4661
+ Hr as HostMiniApp,
4662
+ sn as HostNotification,
4663
+ $r as HostPopup,
4664
+ Nr as HostPrivacy,
4665
+ Gr as HostQrScanner,
4666
+ Vr as HostSecondaryButton,
4667
+ Lr as HostSettingsButton,
4668
+ Xr as HostSharing,
4669
+ Jr as HostSwipeBehavior,
4670
+ rn as HostThemeParams,
4671
+ Pr as HostViewport,
4672
+ ps as InitData,
4673
+ Q as InvalidArgumentsError,
4674
+ bn as InvalidEnvError,
4676
4675
  Ti as InvalidLaunchParamsError,
4677
- ds as Invoice,
4678
- Li as InvokeCustomMethodFailedError,
4679
- $i as LaunchParamsRetrieveError,
4680
- vs as LocationManager,
4681
- ys as MainButton,
4682
- Pi as MethodParameterUnsupportedError,
4683
- Hi as MethodUnsupportedError,
4684
- Bs as MiniApp,
4685
- Bt as NotAvailableError,
4686
- Rs as Notification,
4687
- Ls as Popup,
4688
- Ns as QrScanner,
4689
- Js as Refresh,
4690
- Zs as SecondaryButton,
4691
- er as SecureStorage,
4692
- Et as SecureStorageMethodError,
4693
- xt as SetEmojiStatusError,
4694
- sr as SettingsButton,
4695
- Rt as ShareMessageError,
4696
- Mr as StoragePermission,
4697
- rr as SwipeBehavior,
4698
- Is as ThemeParams,
4699
- Oi as TimeoutError,
4700
- Di as UnknownEnvError,
4701
- Vt as UnknownThemeParamsKeyError,
4676
+ ls as Invoice,
4677
+ Vi as InvokeCustomMethodFailedError,
4678
+ Li as LaunchParamsRetrieveError,
4679
+ Cs as LocationManager,
4680
+ ks as MainButton,
4681
+ $i as MethodParameterUnsupportedError,
4682
+ Pi as MethodUnsupportedError,
4683
+ Es as MiniApp,
4684
+ Et as NotAvailableError,
4685
+ Ms as Notification,
4686
+ Vs as Popup,
4687
+ Ks as QrScanner,
4688
+ zs as Refresh,
4689
+ Ys as SecondaryButton,
4690
+ Xs as SecureStorage,
4691
+ It as SecureStorageMethodError,
4692
+ At as SetEmojiStatusError,
4693
+ tr as SettingsButton,
4694
+ Mt as ShareMessageError,
4695
+ xr as StoragePermission,
4696
+ sr as SwipeBehavior,
4697
+ qs as ThemeParams,
4698
+ Hi as TimeoutError,
4699
+ Oi as UnknownEnvError,
4700
+ Rt as UnknownThemeParamsKeyError,
4702
4701
  pe as ValidationError,
4703
- Ar as Viewport,
4704
- In as addToHomeScreen,
4705
- os as addToHomeScreenFp,
4706
- ji as applyPolyfills,
4707
- gn as backButton,
4708
- Fn as biometry,
4709
- En as checkHomeScreenStatus,
4710
- ps as checkHomeScreenStatusFp,
4711
- Sn as closingBehavior,
4712
- Cn as cloudStorage,
4713
- Nn as copyTextToClipboard,
4714
- Gi as createLogger,
4715
- Wi as createPostEvent,
4716
- Re as createRequestId,
4717
- Ui as createStartParam,
4718
- Ki as createStartParamFp,
4702
+ Br as Viewport,
4703
+ qn as addToHomeScreen,
4704
+ is as addToHomeScreenFp,
4705
+ Di as applyPolyfills,
4706
+ fn as backButton,
4707
+ wn as biometry,
4708
+ In as checkHomeScreenStatus,
4709
+ cs as checkHomeScreenStatusFp,
4710
+ Fn as closingBehavior,
4711
+ Sn as cloudStorage,
4712
+ Kn as copyTextToClipboard,
4713
+ ji as createLogger,
4714
+ Gi as createPostEvent,
4715
+ Me as createRequestId,
4716
+ Wi as createStartParam,
4717
+ Ui as createStartParamFp,
4719
4718
  Qi as debug,
4720
- Ni as decodeBase64Url,
4721
- zi as decodeBase64UrlFp,
4722
- Ji as decodeStartParam,
4723
- Yi as decodeStartParamFp,
4724
- Zi as deepSnakeToCamelObjKeys,
4725
- Xi as defineHostBridge,
4726
- eo as defineWebComponentBridge,
4727
- vn as deviceStorage,
4728
- zn as downloadFile,
4729
- ar as downloadFileFp,
4730
- to as emitEvent,
4731
- so as encodeBase64Url,
4732
- Jn as getCurrentTime,
4733
- ur as getCurrentTimeFp,
4734
- ro as getHostBridge,
4735
- no as getReleaseVersion,
4736
- qn as hapticFeedback,
4737
- Yn as hideKeyboard,
4738
- hr as hideKeyboardFp,
4739
- oi as hostBackButton,
4740
- _i as hostBiometry,
4741
- Ii as hostChat,
4742
- ki as hostClipboard,
4743
- Ci as hostClosingBehavior,
4744
- Ei as hostCustomMethod,
4745
- wi as hostEmojiStatus,
4746
- yi as hostFiles,
4747
- hi as hostHapticFeedback,
4748
- Fi as hostHomeScreen,
4749
- bi as hostInvoice,
4750
- mi as hostLink,
4751
- gi as hostLocationManager,
4752
- ai as hostMainButton,
4753
- di as hostMiniApp,
4754
- Bi as hostNotification,
4755
- ui as hostPopup,
4756
- Si as hostPrivacy,
4757
- fi as hostQrScanner,
4758
- ci as hostSecondaryButton,
4759
- pi as hostSettingsButton,
4760
- qi as hostSharing,
4761
- vi as hostSwipeBehavior,
4762
- Ai as hostThemeParams,
4763
- li as hostViewport,
4764
- xi as init,
4765
- Bn as initData,
4766
- on as initFp,
4767
- An as invoice,
4768
- Kt as invokeCustomMethod,
4769
- qo as isAnyRGB,
4770
- rt as isColorDark,
4771
- qs as isColorDarkFp,
4772
- Io as isRGB,
4773
- Eo as isRGBA,
4774
- Bo as isRGBAShort,
4775
- Ao as isRGBShort,
4776
- io as isSafeToCreateStartParam,
4777
- oo as isVBma,
4778
- ao as isVBmaFp,
4779
- Vn as locationManager,
4780
- co as logger,
4719
+ Ki as decodeBase64Url,
4720
+ Ni as decodeBase64UrlFp,
4721
+ zi as decodeStartParam,
4722
+ Ji as decodeStartParamFp,
4723
+ Yi as deepSnakeToCamelObjKeys,
4724
+ Zi as defineHostBridge,
4725
+ Xi as defineWebComponentBridge,
4726
+ Cn as deviceStorage,
4727
+ Nn as downloadFile,
4728
+ or as downloadFileFp,
4729
+ eo as emitEvent,
4730
+ to as encodeBase64Url,
4731
+ zn as getCurrentTime,
4732
+ pr as getCurrentTimeFp,
4733
+ so as getHostBridge,
4734
+ ro as getReleaseVersion,
4735
+ yn as hapticFeedback,
4736
+ Jn as hideKeyboard,
4737
+ dr as hideKeyboardFp,
4738
+ ii as hostBackButton,
4739
+ hi as hostBiometry,
4740
+ qi as hostChat,
4741
+ vi as hostClipboard,
4742
+ Si as hostClosingBehavior,
4743
+ Ii as hostCustomMethod,
4744
+ mi as hostEmojiStatus,
4745
+ ki as hostFiles,
4746
+ di as hostHapticFeedback,
4747
+ wi as hostHomeScreen,
4748
+ _i as hostInvoice,
4749
+ gi as hostLink,
4750
+ fi as hostLocationManager,
4751
+ oi as hostMainButton,
4752
+ li as hostMiniApp,
4753
+ Ei as hostNotification,
4754
+ pi as hostPopup,
4755
+ Fi as hostPrivacy,
4756
+ bi as hostQrScanner,
4757
+ ai as hostSecondaryButton,
4758
+ ci as hostSettingsButton,
4759
+ yi as hostSharing,
4760
+ Ci as hostSwipeBehavior,
4761
+ Bi as hostThemeParams,
4762
+ ui as hostViewport,
4763
+ Ai as init,
4764
+ En as initData,
4765
+ nn as initFp,
4766
+ Bn as invoice,
4767
+ Ut as invokeCustomMethod,
4768
+ yo as isAnyRGB,
4769
+ st as isColorDark,
4770
+ ys as isColorDarkFp,
4771
+ qo as isRGB,
4772
+ Io as isRGBA,
4773
+ Eo as isRGBAShort,
4774
+ Bo as isRGBShort,
4775
+ no as isSafeToCreateStartParam,
4776
+ io as isVBma,
4777
+ oo as isVBmaFp,
4778
+ Rn as locationManager,
4779
+ ao as logger,
4781
4780
  Tn as mainButton,
4782
- xs as miniApp,
4783
- po as mockVBotEnv,
4784
- Ln as notification,
4785
- uo as off,
4786
- lo as offAll,
4787
- ho as on,
4788
- xn as openLink,
4789
- fs as openLinkFp,
4790
- Mn as openVBotLink,
4791
- st as openVBotLinkFp,
4792
- xo as parseInitDataQuery,
4793
- Mo as parseInitDataQueryFp,
4794
- Ro as parseLaunchParamsQuery,
4795
- Vo as parseLaunchParamsQueryFp,
4796
- $n as popup,
4797
- Lt as postEvent,
4781
+ As as miniApp,
4782
+ co as mockVBotEnv,
4783
+ Vn as notification,
4784
+ po as off,
4785
+ uo as offAll,
4786
+ lo as on,
4787
+ An as openLink,
4788
+ bs as openLinkFp,
4789
+ xn as openVBotLink,
4790
+ tt as openVBotLinkFp,
4791
+ Ao as parseInitDataQuery,
4792
+ xo as parseInitDataQueryFp,
4793
+ Mo as parseLaunchParamsQuery,
4794
+ Ro as parseLaunchParamsQueryFp,
4795
+ Ln as popup,
4796
+ Vt as postEvent,
4798
4797
  re as postEventFp,
4799
- jn as qrScanner,
4800
- Zn as readTextFromClipboard,
4801
- fr as readTextFromClipboardFp,
4802
- Gn as refresh,
4803
- mn as request,
4804
- wn as request2,
4805
- et as request2Fp,
4806
- On as requestContact,
4807
- Hn as requestContactComplete,
4808
- ot as requestContactCompleteFp,
4809
- Ws as requestContactFp,
4810
- kn as requestEmojiStatusAccess,
4811
- Zt as requestEmojiStatusAccessFp,
4812
- Dt as requestFp,
4813
- Pn as requestPhoneAccess,
4814
- it as requestPhoneAccessFp,
4815
- Dn as requestWriteAccess,
4798
+ Dn as qrScanner,
4799
+ Yn as readTextFromClipboard,
4800
+ br as readTextFromClipboardFp,
4801
+ jn as refresh,
4802
+ gn as request,
4803
+ mn as request2,
4804
+ Xe as request2Fp,
4805
+ Hn as requestContact,
4806
+ Pn as requestContactComplete,
4807
+ it as requestContactCompleteFp,
4808
+ Gs as requestContactFp,
4809
+ vn as requestEmojiStatusAccess,
4810
+ Yt as requestEmojiStatusAccessFp,
4811
+ Ot as requestFp,
4812
+ $n as requestPhoneAccess,
4813
+ nt as requestPhoneAccessFp,
4814
+ On as requestWriteAccess,
4816
4815
  Qs as requestWriteAccessFp,
4817
- Xn as retrieveAndroidDeviceData,
4818
- gr as retrieveAndroidDeviceDataFrom,
4819
- _o as retrieveLaunchParams,
4820
- bo as retrieveLaunchParamsFp,
4821
- fo as retrieveRawInitData,
4822
- go as retrieveRawInitDataFp,
4823
- mo as retrieveRawLaunchParams,
4824
- wo as retrieveRawLaunchParamsFp,
4825
- Wn as secondaryButton,
4826
- Un as secureStorage,
4827
- ei as sendData,
4828
- Fr as sendDataFp,
4816
+ Zn as retrieveAndroidDeviceData,
4817
+ fr as retrieveAndroidDeviceDataFrom,
4818
+ ho as retrieveLaunchParams,
4819
+ _o as retrieveLaunchParamsFp,
4820
+ bo as retrieveRawInitData,
4821
+ fo as retrieveRawInitDataFp,
4822
+ go as retrieveRawLaunchParams,
4823
+ mo as retrieveRawLaunchParamsFp,
4824
+ Gn as secondaryButton,
4825
+ Wn as secureStorage,
4826
+ Xn as sendData,
4827
+ wr as sendDataFp,
4829
4828
  To as serializeInitDataQuery,
4830
- Lo as serializeLaunchParamsQuery,
4831
- Fo as setDebug,
4832
- yn as setEmojiStatus,
4833
- ts as setEmojiStatusFp,
4834
- So as setLaunchParams,
4835
- Co as setTargetOrigin,
4836
- Kn as settingsButton,
4837
- ti as shareMessage,
4838
- vr as shareMessageFp,
4839
- si as shareStory,
4840
- qr as shareStoryFp,
4841
- Rn as shareURL,
4842
- Ss as shareURLFp,
4843
- ii as storagePermission,
4844
- vo as supports,
4829
+ Vo as serializeLaunchParamsQuery,
4830
+ wo as setDebug,
4831
+ kn as setEmojiStatus,
4832
+ es as setEmojiStatusFp,
4833
+ Fo as setLaunchParams,
4834
+ So as setTargetOrigin,
4835
+ Un as settingsButton,
4836
+ ei as shareMessage,
4837
+ Cr as shareMessageFp,
4838
+ ti as shareStory,
4839
+ yr as shareStoryFp,
4840
+ Mn as shareURL,
4841
+ Fs as shareURLFp,
4842
+ ni as storagePermission,
4843
+ Co as supports,
4845
4844
  Qn as swipeBehavior,
4846
- ri as switchInlineQuery,
4847
- Br as switchInlineQueryFp,
4848
- ko as targetOrigin,
4845
+ si as switchInlineQuery,
4846
+ Er as switchInlineQueryFp,
4847
+ vo as targetOrigin,
4849
4848
  de as themeParams,
4850
- $o as toRGB,
4851
- Po as toRGBFp,
4852
- Ho as toRGBFull,
4853
- Oo as toRGBFullFp,
4854
- ni as viewport
4849
+ Lo as toRGB,
4850
+ $o as toRGBFp,
4851
+ Po as toRGBFull,
4852
+ Ho as toRGBFullFp,
4853
+ ri as viewport
4855
4854
  };
4856
4855
  //# sourceMappingURL=index.js.map