@tma.js/sdk 0.13.1 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,23 +1,23 @@
1
- var ot = Object.defineProperty;
2
- var nt = (s, t, e) => t in s ? ot(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var i = (s, t, e) => (nt(s, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { retrieveLaunchData as z, parse as rt } from "@tma.js/launch-params";
5
- import { EventEmitter as w } from "@tma.js/event-emitter";
6
- import { supports as P, postEvent as g, on as E, off as W, request as f, setDebug as it, setTargetOrigin as at, createPostEvent as ct, isIframe as ht } from "@tma.js/bridge";
7
- import { array as ut, string as U, json as lt } from "@tma.js/parsing";
1
+ var st = Object.defineProperty;
2
+ var rt = (s, t, e) => t in s ? st(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var i = (s, t, e) => (rt(s, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import { retrieveLaunchData as N, parse as ot } from "@tma.js/launch-params";
5
+ import { EventEmitter as f } from "@tma.js/event-emitter";
6
+ import { supports as S, postEvent as g, on as E, off as z, request as _, setDebug as nt, setTargetOrigin as it, createPostEvent as at, isIframe as ct } from "@tma.js/bridge";
7
+ import { array as ht, string as W, json as ut } from "@tma.js/parsing";
8
8
  import { parse as D } from "@tma.js/theme-params";
9
- import { isColorDark as K, isRGB as pt } from "@tma.js/colors";
10
- import { compareVersions as dt, withTimeout as gt } from "@tma.js/utils";
11
- function C(s, t) {
12
- return (e) => P(t[e], s);
9
+ import { isColorDark as U, isRGB as pt } from "@tma.js/colors";
10
+ import { compareVersions as lt, withTimeout as dt } from "@tma.js/utils";
11
+ function m(s, t) {
12
+ return (e) => S(t[e], s);
13
13
  }
14
- function bt(s, t) {
14
+ function gt(s, t) {
15
15
  return (e) => {
16
- const [o, n] = t[e];
17
- return P(o, n, s);
16
+ const [r, o] = t[e];
17
+ return S(r, o, s);
18
18
  };
19
19
  }
20
- class m {
20
+ class b {
21
21
  constructor(t, e) {
22
22
  this.state = t, this.ee = e;
23
23
  }
@@ -25,24 +25,27 @@ class m {
25
25
  this.ee && this.ee.emit(t, e);
26
26
  }
27
27
  internalSet(t, e) {
28
- return this.state[t] === e ? !1 : (this.state[t] = e, this.emit(`${t}Changed`, e), !0);
28
+ return this.state[t] === e ? !1 : (this.state[t] = e, this.emit(`${String(t)}Changed`, e), !0);
29
29
  }
30
30
  set(t, e) {
31
- let o = !1;
31
+ let r = !1;
32
32
  if (typeof t == "string")
33
- o = this.internalSet(t, e);
33
+ r = this.internalSet(t, e);
34
34
  else
35
- for (const n in t)
36
- this.internalSet(n, t[n]) && (o = !0);
37
- o && this.emit("changed");
35
+ for (const o in t)
36
+ this.internalSet(o, t[o]) && (r = !0);
37
+ r && this.emit("changed");
38
38
  }
39
39
  get(t) {
40
40
  return this.state[t];
41
41
  }
42
+ getState() {
43
+ return { ...this.state };
44
+ }
42
45
  }
43
46
  class _t {
44
- constructor(t, e, o = g) {
45
- i(this, "ee", new w());
47
+ constructor(t, e, r = g) {
48
+ i(this, "ee", new f());
46
49
  i(this, "state");
47
50
  /**
48
51
  * Adds event listener.
@@ -57,14 +60,14 @@ class _t {
57
60
  */
58
61
  i(this, "off", (t, e) => {
59
62
  if (t === "click")
60
- return W("back_button_pressed", e);
63
+ return z("back_button_pressed", e);
61
64
  this.ee.off(t, e);
62
65
  });
63
66
  /**
64
67
  * Checks if specified method is supported by current component.
65
68
  */
66
69
  i(this, "supports");
67
- this.postEvent = o, this.state = new m({ isVisible: t }, this.ee), this.supports = C(e, {
70
+ this.postEvent = r, this.state = new b({ isVisible: t }, this.ee), this.supports = m(e, {
68
71
  show: "web_app_setup_back_button",
69
72
  hide: "web_app_setup_back_button"
70
73
  });
@@ -91,9 +94,9 @@ class _t {
91
94
  this.isVisible = !0;
92
95
  }
93
96
  }
94
- class ft {
97
+ class bt {
95
98
  constructor(t, e = g) {
96
- i(this, "ee", new w());
99
+ i(this, "ee", new f());
97
100
  i(this, "state");
98
101
  /**
99
102
  * Adds new event listener.
@@ -103,7 +106,7 @@ class ft {
103
106
  * Removes event listener.
104
107
  */
105
108
  i(this, "off", this.ee.off.bind(this.ee));
106
- this.postEvent = e, this.state = new m({ isConfirmationNeeded: t }, this.ee);
109
+ this.postEvent = e, this.state = new b({ isConfirmationNeeded: t }, this.ee);
107
110
  }
108
111
  set isConfirmationNeeded(t) {
109
112
  this.state.set("isConfirmationNeeded", t), this.postEvent("web_app_setup_closing_behavior", { need_confirmation: t });
@@ -130,17 +133,17 @@ class ft {
130
133
  this.isConfirmationNeeded = !0;
131
134
  }
132
135
  }
133
- const mt = ut().of(U());
136
+ const ft = ht().of(W());
134
137
  function L(s, t) {
135
- return s.reduce((e, o) => (e[o] = t, e), {});
138
+ return s.reduce((e, r) => (e[r] = t, e), {});
136
139
  }
137
140
  class wt {
138
- constructor(t, e, o = g) {
141
+ constructor(t, e, r = g) {
139
142
  /**
140
143
  * Checks if specified method is supported by current component.
141
144
  */
142
145
  i(this, "supports");
143
- this.createRequestId = e, this.postEvent = o, this.supports = C(t, {
146
+ this.createRequestId = e, this.postEvent = r, this.supports = m(t, {
144
147
  deleteKeys: "web_app_invoke_custom_method",
145
148
  getKeys: "web_app_invoke_custom_method",
146
149
  getValues: "web_app_invoke_custom_method",
@@ -153,16 +156,16 @@ class wt {
153
156
  * @param params - method parameters.
154
157
  * @param options - execution options.
155
158
  */
156
- async invokeCustomMethod(t, e, o = {}) {
157
- const { result: n, error: r } = await f(
159
+ async invokeCustomMethod(t, e, r = {}) {
160
+ const { result: o, error: n } = await _(
158
161
  "web_app_invoke_custom_method",
159
162
  { method: t, params: e, req_id: this.createRequestId() },
160
163
  "custom_method_invoked",
161
- { ...o, postEvent: this.postEvent }
164
+ { ...r, postEvent: this.postEvent }
162
165
  );
163
- if (r)
164
- throw new Error(typeof r == "string" ? r : `Unknown error: ${JSON.stringify(r)}`);
165
- return n;
166
+ if (n)
167
+ throw new Error(typeof n == "string" ? n : `Unknown error: ${JSON.stringify(n)}`);
168
+ return o;
166
169
  }
167
170
  /**
168
171
  * Deletes specified keys from the CloudStorage.
@@ -178,7 +181,7 @@ class wt {
178
181
  */
179
182
  async getKeys(t) {
180
183
  const e = await this.invokeCustomMethod("getStorageKeys", {}, t);
181
- return mt.parse(e);
184
+ return ft.parse(e);
182
185
  }
183
186
  /**
184
187
  * Returns map, where key is one of the specified in keys argument, and value is according
@@ -189,11 +192,11 @@ class wt {
189
192
  async getValues(t, e) {
190
193
  if (t.length === 0)
191
194
  return L(t, "");
192
- const o = lt(
193
- L(t, U())
195
+ const r = ut(
196
+ L(t, W())
194
197
  // fixme
195
- ), n = await this.invokeCustomMethod("getStorageValues", { keys: t }, e);
196
- return o.parse(n);
198
+ ), o = await this.invokeCustomMethod("getStorageValues", { keys: t }, e);
199
+ return r.parse(o);
197
200
  }
198
201
  /**
199
202
  * Saves specified value by key.
@@ -201,17 +204,17 @@ class wt {
201
204
  * @param value - storage value.
202
205
  * @param options - request execution options.
203
206
  */
204
- async saveValue(t, e, o) {
205
- await this.invokeCustomMethod("saveStorageValue", { key: t, value: e }, o);
207
+ async saveValue(t, e, r) {
208
+ await this.invokeCustomMethod("saveStorageValue", { key: t, value: e }, r);
206
209
  }
207
210
  }
208
- class Ct {
211
+ class mt {
209
212
  constructor(t, e = g) {
210
213
  /**
211
214
  * Checks if specified method is supported by current component.
212
215
  */
213
216
  i(this, "supports");
214
- this.postEvent = e, this.supports = C(t, {
217
+ this.postEvent = e, this.supports = m(t, {
215
218
  impactOccurred: "web_app_trigger_haptic_feedback",
216
219
  notificationOccurred: "web_app_trigger_haptic_feedback",
217
220
  selectionChanged: "web_app_trigger_haptic_feedback"
@@ -248,29 +251,29 @@ class Ct {
248
251
  this.postEvent("web_app_trigger_haptic_feedback", { type: "selection_change" });
249
252
  }
250
253
  }
251
- class vt {
252
- constructor(t, e, o = {}) {
254
+ class Ct {
255
+ constructor(t, e, r = {}) {
253
256
  i(this, "state");
254
257
  const {
255
- chat: n = null,
256
- canSendAfter: r = null,
258
+ chat: o = null,
259
+ canSendAfter: n = null,
257
260
  chatType: a = null,
258
- chatInstance: h = null,
261
+ chatInstance: u = null,
259
262
  user: c = null,
260
- queryId: l = null,
261
- receiver: u = null,
262
- startParam: p = null
263
- } = o;
264
- this.state = new m({
263
+ queryId: p = null,
264
+ receiver: h = null,
265
+ startParam: d = null
266
+ } = r;
267
+ this.state = new b({
265
268
  authDate: t,
266
- canSendAfter: r === null ? null : new Date(t.getTime() + r * 1e3),
267
- chat: n,
269
+ canSendAfter: n === null ? null : new Date(t.getTime() + n * 1e3),
270
+ chat: o,
268
271
  chatType: a,
269
- chatInstance: h,
272
+ chatInstance: u,
270
273
  user: c,
271
- queryId: l,
272
- receiver: u,
273
- startParam: p,
274
+ queryId: p,
275
+ receiver: h,
276
+ startParam: d,
274
277
  hash: e
275
278
  });
276
279
  }
@@ -347,9 +350,9 @@ class vt {
347
350
  return this.state.get("user");
348
351
  }
349
352
  }
350
- class yt {
351
- constructor(t, e, o, n, r, a, h = g) {
352
- i(this, "ee", new w());
353
+ class vt {
354
+ constructor(t, e, r, o, n, a, u = g) {
355
+ i(this, "ee", new f());
353
356
  i(this, "state");
354
357
  /**
355
358
  * Adds new event listener.
@@ -367,15 +370,15 @@ class yt {
367
370
  */
368
371
  i(this, "off", (t, e) => {
369
372
  if (t === "click")
370
- return W("main_button_pressed", e);
373
+ return z("main_button_pressed", e);
371
374
  this.ee.off(t, e);
372
375
  });
373
- this.postEvent = h, this.state = new m({
376
+ this.postEvent = u, this.state = new b({
374
377
  backgroundColor: t,
375
378
  isEnabled: e,
376
- isVisible: o,
377
- isProgressVisible: n,
378
- text: r,
379
+ isVisible: r,
380
+ isProgressVisible: o,
381
+ text: n,
379
382
  textColor: a
380
383
  }, this.ee);
381
384
  }
@@ -512,33 +515,33 @@ class yt {
512
515
  return this.state.set("backgroundColor", t), this.commit(), this;
513
516
  }
514
517
  }
515
- function kt(s) {
516
- const t = s.message.trim(), e = (s.title || "").trim(), o = s.buttons || [];
517
- let n;
518
+ function yt(s) {
519
+ const t = s.message.trim(), e = (s.title || "").trim(), r = s.buttons || [];
520
+ let o;
518
521
  if (e.length > 64)
519
522
  throw new Error(`Title has incorrect size: ${e.length}`);
520
523
  if (t.length === 0 || t.length > 256)
521
524
  throw new Error(`Message has incorrect size: ${t.length}`);
522
- if (o.length > 3)
523
- throw new Error(`Buttons have incorrect size: ${o.length}`);
524
- return o.length === 0 ? n = [{ type: "close", id: "" }] : n = o.map((r) => {
525
- const { id: a = "" } = r;
525
+ if (r.length > 3)
526
+ throw new Error(`Buttons have incorrect size: ${r.length}`);
527
+ return r.length === 0 ? o = [{ type: "close", id: "" }] : o = r.map((n) => {
528
+ const { id: a = "" } = n;
526
529
  if (a.length > 64)
527
530
  throw new Error(`Button ID has incorrect size: ${a}`);
528
- if (r.type === void 0 || r.type === "default" || r.type === "destructive") {
529
- const h = r.text.trim();
530
- if (h.length === 0 || h.length > 64) {
531
- const c = r.type || "default";
532
- throw new Error(`Button text with type "${c}" has incorrect size: ${r.text.length}`);
531
+ if (n.type === void 0 || n.type === "default" || n.type === "destructive") {
532
+ const u = n.text.trim();
533
+ if (u.length === 0 || u.length > 64) {
534
+ const c = n.type || "default";
535
+ throw new Error(`Button text with type "${c}" has incorrect size: ${n.text.length}`);
533
536
  }
534
- return { ...r, text: h, id: a };
537
+ return { ...n, text: u, id: a };
535
538
  }
536
- return { ...r, id: a };
537
- }), { title: e, message: t, buttons: n };
539
+ return { ...n, id: a };
540
+ }), { title: e, message: t, buttons: o };
538
541
  }
539
542
  class Et {
540
543
  constructor(t, e = g) {
541
- i(this, "ee", new w());
544
+ i(this, "ee", new f());
542
545
  i(this, "state");
543
546
  /**
544
547
  * Adds new event listener.
@@ -552,7 +555,7 @@ class Et {
552
555
  * Checks if specified method is supported by current component.
553
556
  */
554
557
  i(this, "supports");
555
- this.postEvent = e, this.state = new m({ isOpened: !1 }, this.ee), this.supports = C(t, { open: "web_app_open_popup" });
558
+ this.postEvent = e, this.state = new b({ isOpened: !1 }, this.ee), this.supports = m(t, { open: "web_app_open_popup" });
556
559
  }
557
560
  /**
558
561
  * Shows whether popup is currently opened.
@@ -578,9 +581,9 @@ class Et {
578
581
  throw new Error("Popup is already opened.");
579
582
  this.state.set("isOpened", !0);
580
583
  try {
581
- const { button_id: e = null } = await f(
584
+ const { button_id: e = null } = await _(
582
585
  "web_app_open_popup",
583
- kt(t),
586
+ yt(t),
584
587
  "popup_closed",
585
588
  { postEvent: this.postEvent }
586
589
  );
@@ -590,9 +593,9 @@ class Et {
590
593
  }
591
594
  }
592
595
  }
593
- class xt {
596
+ class kt {
594
597
  constructor(t, e = g) {
595
- i(this, "ee", new w());
598
+ i(this, "ee", new f());
596
599
  i(this, "state");
597
600
  /**
598
601
  * Adds new event listener.
@@ -606,7 +609,7 @@ class xt {
606
609
  * Checks if specified method is supported by current component.
607
610
  */
608
611
  i(this, "supports");
609
- this.postEvent = e, this.state = new m({ isOpened: !1 }, this.ee), this.supports = C(t, {
612
+ this.postEvent = e, this.state = new b({ isOpened: !1 }, this.ee), this.supports = m(t, {
610
613
  close: "web_app_close_scan_qr_popup",
611
614
  open: "web_app_open_scan_qr_popup"
612
615
  });
@@ -637,7 +640,7 @@ class xt {
637
640
  throw new Error("QR scanner is already opened.");
638
641
  this.isOpened = !0;
639
642
  try {
640
- const e = await f(
643
+ const e = await _(
641
644
  "web_app_open_scan_qr_popup",
642
645
  { text: t },
643
646
  ["qr_text_received", "scan_qr_popup_closed"],
@@ -649,41 +652,9 @@ class xt {
649
652
  }
650
653
  }
651
654
  }
652
- function M(s) {
653
- const {
654
- accentTextColor: t = null,
655
- backgroundColor: e = null,
656
- buttonColor: o = null,
657
- buttonTextColor: n = null,
658
- destructiveTextColor: r = null,
659
- headerBackgroundColor: a = null,
660
- hintColor: h = null,
661
- linkColor: c = null,
662
- secondaryBackgroundColor: l = null,
663
- sectionBackgroundColor: u = null,
664
- sectionHeaderTextColor: p = null,
665
- subtitleTextColor: b = null,
666
- textColor: S = null
667
- } = s;
668
- return {
669
- accentTextColor: t,
670
- backgroundColor: e,
671
- buttonColor: o,
672
- buttonTextColor: n,
673
- destructiveTextColor: r,
674
- headerBackgroundColor: a,
675
- hintColor: h,
676
- linkColor: c,
677
- secondaryBackgroundColor: l,
678
- sectionBackgroundColor: u,
679
- sectionHeaderTextColor: p,
680
- subtitleTextColor: b,
681
- textColor: S
682
- };
683
- }
684
- class q {
655
+ class V {
685
656
  constructor(t) {
686
- i(this, "ee", new w());
657
+ i(this, "ee", new f());
687
658
  i(this, "state");
688
659
  /**
689
660
  * Adds new event listener.
@@ -693,7 +664,7 @@ class q {
693
664
  * Removes event listener.
694
665
  */
695
666
  i(this, "off", this.ee.off.bind(this.ee));
696
- this.state = new m(M(t), this.ee);
667
+ this.state = new b(t, this.ee);
697
668
  }
698
669
  /**
699
670
  * Requests fresh information about current theme.
@@ -702,11 +673,11 @@ class q {
702
673
  * @param options - method options.
703
674
  */
704
675
  static async request(t = {}) {
705
- const { timeout: e = 1e3, ...o } = t, n = await f("web_app_request_theme", "theme_changed", {
706
- ...o,
676
+ const { timeout: e = 1e3, ...r } = t, o = await _("web_app_request_theme", "theme_changed", {
677
+ ...r,
707
678
  timeout: e
708
679
  });
709
- return D(n.theme_params);
680
+ return D(o.theme_params);
710
681
  }
711
682
  /**
712
683
  * Synchronizes specified instance of ThemeParams with the actual value in the native
@@ -715,7 +686,7 @@ class q {
715
686
  */
716
687
  static sync(t) {
717
688
  E("theme_changed", (e) => {
718
- t.state.set(M(D(e.theme_params)));
689
+ t.state.set(D(e.theme_params));
719
690
  });
720
691
  }
721
692
  /**
@@ -724,65 +695,93 @@ class q {
724
695
  * @param options - method options.
725
696
  */
726
697
  static async synced(t) {
727
- const e = await this.request(t), o = new q(e);
728
- return this.sync(o), o;
698
+ const e = await this.request(t), r = new V(e);
699
+ return this.sync(r), r;
700
+ }
701
+ get accentTextColor() {
702
+ return this.get("accentTextColor");
729
703
  }
730
704
  /**
731
705
  * Returns background color.
732
706
  */
733
707
  get backgroundColor() {
734
- return this.state.get("backgroundColor");
708
+ return this.get("backgroundColor");
735
709
  }
736
710
  /**
737
711
  * Returns button color.
738
712
  */
739
713
  get buttonColor() {
740
- return this.state.get("buttonColor");
714
+ return this.get("buttonColor");
741
715
  }
742
716
  /**
743
717
  * Returns button text color.
744
718
  */
745
719
  get buttonTextColor() {
746
- return this.state.get("buttonTextColor");
720
+ return this.get("buttonTextColor");
721
+ }
722
+ get destructiveTextColor() {
723
+ return this.get("destructiveTextColor");
724
+ }
725
+ /**
726
+ * Retrieves palette color value by its name.
727
+ * @param key - palette key name.
728
+ */
729
+ get(t) {
730
+ return this.state.get(t) || null;
731
+ }
732
+ getState() {
733
+ return this.state.getState();
734
+ }
735
+ get headerBackgroundColor() {
736
+ return this.get("headerBackgroundColor");
747
737
  }
748
738
  /**
749
739
  * Returns hint color.
750
740
  */
751
741
  get hintColor() {
752
- return this.state.get("hintColor");
742
+ return this.get("hintColor");
753
743
  }
754
744
  /**
755
745
  * Returns true in case, current color scheme is recognized as dark. This
756
746
  * value is calculated according to theme background color.
757
747
  */
758
748
  get isDark() {
759
- return this.backgroundColor === null || K(this.backgroundColor);
749
+ return this.backgroundColor === null || U(this.backgroundColor);
760
750
  }
761
751
  /**
762
752
  * Returns current link color.
763
753
  */
764
754
  get linkColor() {
765
- return this.state.get("linkColor");
755
+ return this.get("linkColor");
766
756
  }
767
757
  /**
768
758
  * Returns secondary background color.
769
759
  */
770
760
  get secondaryBackgroundColor() {
771
- return this.state.get("secondaryBackgroundColor");
761
+ return this.get("secondaryBackgroundColor");
762
+ }
763
+ get sectionBackgroundColor() {
764
+ return this.get("sectionBackgroundColor");
765
+ }
766
+ get sectionHeaderTextColor() {
767
+ return this.get("sectionHeaderTextColor");
768
+ }
769
+ get subtitleTextColor() {
770
+ return this.get("subtitleTextColor");
772
771
  }
773
772
  /**
774
773
  * Returns text color.
775
774
  */
776
775
  get textColor() {
777
- return this.state.get("textColor");
776
+ return this.get("textColor");
778
777
  }
779
778
  }
780
- function y(s) {
779
+ function v(s) {
781
780
  return s < 0 ? 0 : s;
782
781
  }
783
- class k {
784
- constructor(t, e, o, n, r = g) {
785
- i(this, "ee", new w());
782
+ class y {
783
+ constructor(t, e, r, o, n = g) {
784
+ i(this, "ee", new f());
786
785
  i(this, "state");
787
786
  /**
788
787
  * Adds new event listener.
@@ -792,11 +791,11 @@ class k {
792
791
  * Removes event listener.
793
792
  */
794
793
  i(this, "off", this.ee.off.bind(this.ee));
795
- this.postEvent = r, this.state = new m({
796
- height: y(t),
797
- isExpanded: n,
798
- stableHeight: y(o),
799
- width: y(e)
794
+ this.postEvent = n, this.state = new b({
795
+ height: v(t),
796
+ isExpanded: o,
797
+ stableHeight: v(r),
798
+ width: v(e)
800
799
  }, this.ee);
801
800
  }
802
801
  /**
@@ -807,15 +806,15 @@ class k {
807
806
  * @param options - method options.
808
807
  */
809
808
  static async request(t = {}) {
810
- const { timeout: e = 1e3, ...o } = t, {
811
- is_expanded: n,
812
- is_state_stable: r,
809
+ const { timeout: e = 1e3, ...r } = t, {
810
+ is_expanded: o,
811
+ is_state_stable: n,
813
812
  ...a
814
- } = await f("web_app_request_viewport", "viewport_changed", {
815
- ...o,
813
+ } = await _("web_app_request_viewport", "viewport_changed", {
814
+ ...r,
816
815
  timeout: e
817
816
  });
818
- return { ...a, isExpanded: n, isStateStable: r };
817
+ return { ...a, isExpanded: o, isStateStable: n };
819
818
  }
820
819
  /**
821
820
  * Synchronizes specified instance of Viewport with the actual value in the native
@@ -825,16 +824,16 @@ class k {
825
824
  static sync(t) {
826
825
  E("viewport_changed", (e) => {
827
826
  const {
828
- height: o,
829
- width: n,
830
- is_expanded: r,
827
+ height: r,
828
+ width: o,
829
+ is_expanded: n,
831
830
  is_state_stable: a
832
- } = e, h = y(o);
831
+ } = e, u = v(r);
833
832
  t.state.set({
834
- height: h,
835
- isExpanded: r,
836
- width: y(n),
837
- stableHeight: a ? h : void 0
833
+ height: u,
834
+ isExpanded: n,
835
+ width: v(o),
836
+ stableHeight: a ? u : void 0
838
837
  });
839
838
  });
840
839
  }
@@ -844,8 +843,8 @@ class k {
844
843
  * @param options - method options.
845
844
  */
846
845
  static async synced(t = {}) {
847
- const { height: e, isExpanded: o, width: n } = await this.request(t), r = new k(e, n, e, o, t.postEvent);
848
- return this.sync(r), r;
846
+ const { height: e, isExpanded: r, width: o } = await this.request(t), n = new y(e, o, e, r, t.postEvent);
847
+ return this.sync(n), n;
849
848
  }
850
849
  /**
851
850
  * The current height of the visible area of the Mini App.
@@ -923,7 +922,7 @@ class k {
923
922
  return this.stableHeight === this.height;
924
923
  }
925
924
  }
926
- function I(s) {
925
+ function T(s) {
927
926
  const t = document.createElement("a");
928
927
  if (t.href = s, t.protocol !== "http:" && t.protocol !== "https:")
929
928
  throw Error(
@@ -931,9 +930,9 @@ function I(s) {
931
930
  );
932
931
  return t.href;
933
932
  }
934
- class Vt {
935
- constructor(t, e, o, n, r, a = g) {
936
- i(this, "ee", new w());
933
+ class xt {
934
+ constructor(t, e, r, o, n, a = g) {
935
+ i(this, "ee", new f());
937
936
  i(this, "state");
938
937
  /**
939
938
  * Adds new event listener.
@@ -951,17 +950,17 @@ class Vt {
951
950
  * Checks if specified method parameter is supported by current component.
952
951
  */
953
952
  i(this, "supportsParam");
954
- this.currentVersion = o, this.currentPlatform = n, this.createRequestId = r, this.postEvent = a, this.state = new m({
953
+ this.currentVersion = r, this.currentPlatform = o, this.createRequestId = n, this.postEvent = a, this.state = new b({
955
954
  backgroundColor: e,
956
955
  headerColor: t
957
- }, this.ee), this.supports = C(o, {
956
+ }, this.ee), this.supports = m(r, {
958
957
  openInvoice: "web_app_open_invoice",
959
958
  readTextFromClipboard: "web_app_read_text_from_clipboard",
960
959
  setHeaderColor: "web_app_set_header_color",
961
960
  setBackgroundColor: "web_app_set_background_color",
962
961
  requestPhoneAccess: "web_app_request_phone",
963
962
  requestWriteAccess: "web_app_request_write_access"
964
- }), this.supportsParam = bt(o, {
963
+ }), this.supportsParam = gt(r, {
965
964
  "setHeaderColor.color": ["web_app_set_header_color", "color"],
966
965
  "openLink.tryInstantView": ["web_app_open_link", "try_instant_view"]
967
966
  });
@@ -977,7 +976,7 @@ class Vt {
977
976
  * computed based on the current background color.
978
977
  */
979
978
  get colorScheme() {
980
- return K(this.backgroundColor) ? "dark" : "light";
979
+ return U(this.backgroundColor) ? "dark" : "light";
981
980
  }
982
981
  /**
983
982
  * Closes the Mini App.
@@ -997,7 +996,7 @@ class Vt {
997
996
  * @param version - compared version.
998
997
  */
999
998
  isVersionAtLeast(t) {
1000
- return dt(t, this.version) >= 0;
999
+ return lt(t, this.version) >= 0;
1001
1000
  }
1002
1001
  /**
1003
1002
  * Opens a link in an external browser. The Mini App will not be closed.
@@ -1009,13 +1008,13 @@ class Vt {
1009
1008
  * @param tryInstantView
1010
1009
  */
1011
1010
  openLink(t, e) {
1012
- const o = I(t);
1013
- if (!P("web_app_open_link", this.version)) {
1014
- window.open(o, "_blank");
1011
+ const r = T(t);
1012
+ if (!S("web_app_open_link", this.version)) {
1013
+ window.open(r, "_blank");
1015
1014
  return;
1016
1015
  }
1017
1016
  return this.postEvent("web_app_open_link", {
1018
- url: o,
1017
+ url: r,
1019
1018
  ...typeof e == "boolean" ? { try_instant_view: e } : {}
1020
1019
  });
1021
1020
  }
@@ -1026,14 +1025,14 @@ class Vt {
1026
1025
  * @throws {Error} URL has not allowed hostname.
1027
1026
  */
1028
1027
  openTelegramLink(t) {
1029
- const { hostname: e, pathname: o, search: n } = new URL(I(t));
1028
+ const { hostname: e, pathname: r, search: o } = new URL(T(t));
1030
1029
  if (e !== "t.me")
1031
1030
  throw new Error(`URL has not allowed hostname: ${e}. Only "t.me" is allowed`);
1032
- if (!P("web_app_open_tg_link", this.version)) {
1031
+ if (!S("web_app_open_tg_link", this.version)) {
1033
1032
  window.location.href = t;
1034
1033
  return;
1035
1034
  }
1036
- return this.postEvent("web_app_open_tg_link", { path_full: o + n });
1035
+ return this.postEvent("web_app_open_tg_link", { path_full: r + o });
1037
1036
  }
1038
1037
  /**
1039
1038
  * Opens an invoice using its url. It expects passing link in full format,
@@ -1041,16 +1040,16 @@ class Vt {
1041
1040
  * @param url - invoice URL.
1042
1041
  */
1043
1042
  async openInvoice(t) {
1044
- const { hostname: e, pathname: o } = new URL(I(t));
1043
+ const { hostname: e, pathname: r } = new URL(T(t));
1045
1044
  if (e !== "t.me")
1046
1045
  throw new Error(`Incorrect hostname: ${e}`);
1047
- const n = o.match(/^\/(\$|invoice\/)([A-Za-z0-9\-_=]+)$/);
1048
- if (n === null)
1046
+ const o = r.match(/^\/(\$|invoice\/)([A-Za-z0-9\-_=]+)$/);
1047
+ if (o === null)
1049
1048
  throw new Error('Link pathname has incorrect format. Expected to receive "/invoice/slug" or "/$slug"');
1050
- const [, , r] = n;
1051
- return (await f("web_app_open_invoice", { slug: r }, "invoice_closed", {
1049
+ const [, , n] = o;
1050
+ return (await _("web_app_open_invoice", { slug: n }, "invoice_closed", {
1052
1051
  postEvent: this.postEvent,
1053
- capture: ({ slug: h }) => r === h
1052
+ capture: ({ slug: u }) => n === u
1054
1053
  })).status;
1055
1054
  }
1056
1055
  /**
@@ -1079,7 +1078,7 @@ class Vt {
1079
1078
  * - Access to clipboard is not allowed
1080
1079
  */
1081
1080
  async readTextFromClipboard() {
1082
- const { data: t = null } = await f(
1081
+ const { data: t = null } = await _(
1083
1082
  "web_app_read_text_from_clipboard",
1084
1083
  { req_id: this.createRequestId() },
1085
1084
  "clipboard_text_received",
@@ -1091,7 +1090,7 @@ class Vt {
1091
1090
  * Requests current user phone access.
1092
1091
  */
1093
1092
  async requestPhoneAccess() {
1094
- const { status: t } = await f("web_app_request_phone", "phone_requested", {
1093
+ const { status: t } = await _("web_app_request_phone", "phone_requested", {
1095
1094
  postEvent: this.postEvent
1096
1095
  });
1097
1096
  return t;
@@ -1100,7 +1099,7 @@ class Vt {
1100
1099
  * Requests write message access to current user.
1101
1100
  */
1102
1101
  async requestWriteAccess() {
1103
- const { status: t } = await f("web_app_request_write_access", "write_access_requested", {
1102
+ const { status: t } = await _("web_app_request_write_access", "write_access_requested", {
1104
1103
  postEvent: this.postEvent
1105
1104
  });
1106
1105
  return t;
@@ -1151,242 +1150,236 @@ class Vt {
1151
1150
  return this.currentVersion;
1152
1151
  }
1153
1152
  }
1154
- class F extends Error {
1153
+ class K extends Error {
1155
1154
  constructor(t, e) {
1156
- super(`Method "${t}" is not supported in the Mini Apps version ${e}.`), Object.setPrototypeOf(this, F.prototype);
1155
+ super(`Method "${t}" is not supported in the Mini Apps version ${e}.`), Object.setPrototypeOf(this, K.prototype);
1157
1156
  }
1158
1157
  }
1159
1158
  class j extends Error {
1160
- constructor(t, e, o) {
1161
- super(`Parameter "${e}" in method "${t}" is not supported in the Mini Apps version ${o}.`), Object.setPrototypeOf(this, j.prototype);
1159
+ constructor(t, e, r) {
1160
+ super(`Parameter "${e}" in method "${t}" is not supported in the Mini Apps version ${r}.`), Object.setPrototypeOf(this, j.prototype);
1162
1161
  }
1163
1162
  }
1164
- function J(s, t) {
1163
+ function F(s, t) {
1165
1164
  document.documentElement.style.setProperty(s, t);
1166
1165
  }
1167
- function _(s, t) {
1168
- t !== null && J(s, t);
1166
+ function B(s, t) {
1167
+ t !== null && F(s, t);
1169
1168
  }
1170
- function N(s, t) {
1171
- J(s, `${t}px`);
1169
+ function M(s, t) {
1170
+ F(s, `${t}px`);
1172
1171
  }
1173
- function St(s) {
1174
- const {
1175
- backgroundColor: t,
1176
- buttonTextColor: e,
1177
- secondaryBackgroundColor: o,
1178
- hintColor: n,
1179
- buttonColor: r,
1180
- linkColor: a,
1181
- textColor: h
1182
- } = s;
1183
- _("--tg-theme-bg-color", t), _("--tg-theme-button-color", r), _("--tg-theme-button-text-color", e), _("--tg-theme-hint-color", n), _("--tg-theme-link-color", a), _("--tg-theme-secondary-bg-color", o), _("--tg-theme-text-color", h);
1184
- }
1185
- function Pt(s, t) {
1186
- const { backgroundColor: e, secondaryBackgroundColor: o } = t, { backgroundColor: n, headerColor: r } = s;
1187
- _("--tg-bg-color", n), _("--tg-header-color", r === "bg_color" ? e : o);
1172
+ function St(s, t) {
1173
+ const { backgroundColor: e, secondaryBackgroundColor: r } = t, { backgroundColor: o, headerColor: n } = s;
1174
+ B("--tg-bg-color", o), B("--tg-header-color", n === "bg_color" ? e : r);
1188
1175
  }
1189
- function qt(s) {
1190
- const t = () => St(s);
1176
+ function Vt(s) {
1177
+ const t = () => {
1178
+ const e = s.getState();
1179
+ Object.entries(e).forEach(([r, o]) => {
1180
+ const n = r.replace(/[A-Z]/g, (a) => `-${a.toLowerCase()}`);
1181
+ B(`--tg-theme-${n}`, o || null);
1182
+ });
1183
+ };
1191
1184
  s.on("changed", t), t();
1192
1185
  }
1193
- function Ot(s, t) {
1194
- const e = () => Pt(s, t);
1186
+ function Pt(s, t) {
1187
+ const e = () => St(s, t);
1195
1188
  t.on("changed", e), s.on("backgroundColorChanged", e), s.on("headerColorChanged", e), e();
1196
1189
  }
1197
- function Tt(s) {
1190
+ function qt(s) {
1198
1191
  const t = () => {
1199
- N("--tg-viewport-height", s.height);
1192
+ M("--tg-viewport-height", s.height);
1200
1193
  }, e = () => {
1201
- N("--tg-viewport-stable-height", s.stableHeight);
1194
+ M("--tg-viewport-stable-height", s.stableHeight);
1202
1195
  };
1203
1196
  s.on("heightChanged", t), s.on("stableHeightChanged", e), t(), e();
1204
1197
  }
1205
- function Bt(s) {
1198
+ function Ot(s) {
1206
1199
  return typeof s == "boolean" ? s ? { themeParams: !0, viewport: !0, webApp: !0 } : {} : s;
1207
1200
  }
1208
- function G(s) {
1201
+ function J(s) {
1209
1202
  return `telegram-mini-apps-${s}`;
1210
1203
  }
1211
- function x(s, t) {
1212
- sessionStorage.setItem(G(s), JSON.stringify(t));
1204
+ function k(s, t) {
1205
+ sessionStorage.setItem(J(s), JSON.stringify(t));
1213
1206
  }
1214
- function V(s) {
1215
- const t = sessionStorage.getItem(G(s));
1207
+ function x(s) {
1208
+ const t = sessionStorage.getItem(J(s));
1216
1209
  return t ? JSON.parse(t) : null;
1217
1210
  }
1218
- function It(s, t, e) {
1219
- const { isVisible: o = !1 } = s ? V("back-button") || {} : {}, n = new _t(o, t, e);
1220
- return n.on("isVisibleChanged", () => {
1221
- x("back-button", { isVisible: n.isVisible });
1222
- }), n;
1211
+ function Tt(s, t, e) {
1212
+ const { isVisible: r = !1 } = s ? x("back-button") || {} : {}, o = new _t(r, t, e);
1213
+ return o.on("isVisibleChanged", () => {
1214
+ k("back-button", { isVisible: o.isVisible });
1215
+ }), o;
1223
1216
  }
1224
- function $t(s, t) {
1225
- const { isConfirmationNeeded: e = !1 } = s ? V("closing-behavior") || {} : {}, o = new ft(e, t);
1226
- return o.on("isConfirmationNeededChanged", () => x("closing-behavior", {
1227
- isConfirmationNeeded: o.isConfirmationNeeded
1228
- })), o;
1217
+ function Bt(s, t) {
1218
+ const { isConfirmationNeeded: e = !1 } = s ? x("closing-behavior") || {} : {}, r = new bt(e, t);
1219
+ return r.on("isConfirmationNeededChanged", () => k("closing-behavior", {
1220
+ isConfirmationNeeded: r.isConfirmationNeeded
1221
+ })), r;
1229
1222
  }
1230
- function At(s, t, e, o) {
1223
+ function $t(s, t, e, r) {
1231
1224
  const {
1232
- backgroundColor: n = t,
1233
- isEnabled: r = !1,
1225
+ backgroundColor: o = t,
1226
+ isEnabled: n = !1,
1234
1227
  isVisible: a = !1,
1235
- isProgressVisible: h = !1,
1228
+ isProgressVisible: u = !1,
1236
1229
  textColor: c = e,
1237
- text: l = ""
1238
- } = s ? V("main-button") || {} : {}, u = new yt(
1230
+ text: p = ""
1231
+ } = s ? x("main-button") || {} : {}, h = new vt(
1232
+ o,
1239
1233
  n,
1240
- r,
1241
1234
  a,
1242
- h,
1243
- l,
1235
+ u,
1236
+ p,
1244
1237
  c,
1245
- o
1246
- ), p = () => x("main-button", {
1247
- backgroundColor: u.backgroundColor,
1248
- isEnabled: u.isEnabled,
1249
- isVisible: u.isVisible,
1250
- isProgressVisible: u.isProgressVisible,
1251
- text: u.text,
1252
- textColor: u.textColor
1238
+ r
1239
+ ), d = () => k("main-button", {
1240
+ backgroundColor: h.backgroundColor,
1241
+ isEnabled: h.isEnabled,
1242
+ isVisible: h.isVisible,
1243
+ isProgressVisible: h.isProgressVisible,
1244
+ text: h.text,
1245
+ textColor: h.textColor
1253
1246
  });
1254
- return u.on("backgroundColorChanged", p), u.on("isEnabledChanged", p), u.on("isVisibleChanged", p), u.on("isProgressVisibleChanged", p), u.on("textColorChanged", p), u.on("textChanged", p), u;
1247
+ return h.on("backgroundColorChanged", d), h.on("isEnabledChanged", d), h.on("isVisibleChanged", d), h.on("isProgressVisibleChanged", d), h.on("textColorChanged", d), h.on("textChanged", d), h;
1255
1248
  }
1256
- function Ht() {
1249
+ function It() {
1257
1250
  let s = 0;
1258
1251
  return () => (s += 1, s.toString());
1259
1252
  }
1260
- function Rt(s) {
1261
- const t = new q(s);
1262
- return q.sync(t), t;
1253
+ function At(s) {
1254
+ const t = new V(s);
1255
+ return V.sync(t), t;
1263
1256
  }
1264
- async function Dt(s, t, e) {
1257
+ async function Ht(s, t, e) {
1265
1258
  const {
1266
- height: o = window.innerHeight,
1267
- stableHeight: n = window.innerHeight,
1268
- width: r = window.innerWidth,
1259
+ height: r = window.innerHeight,
1260
+ stableHeight: o = window.innerHeight,
1261
+ width: n = window.innerWidth,
1269
1262
  isExpanded: a = !1
1270
- } = s ? V("viewport") || {} : {}, c = t === "macos" || t === "web" ? (() => {
1271
- const u = new k(o, r, n, a, e);
1272
- return k.sync(u), u;
1273
- })() : await k.synced({ postEvent: e }), l = () => x("viewport", {
1263
+ } = s ? x("viewport") || {} : {}, c = t === "macos" || t === "web" ? (() => {
1264
+ const h = new y(r, n, o, a, e);
1265
+ return y.sync(h), h;
1266
+ })() : await y.synced({ postEvent: e }), p = () => k("viewport", {
1274
1267
  height: c.height,
1275
1268
  isExpanded: c.isExpanded,
1276
1269
  stableHeight: c.stableHeight,
1277
1270
  width: c.width
1278
1271
  });
1279
- return c.on("heightChanged", l), c.on("isExpandedChanged", l), c.on("stableHeightChanged", l), c.on("widthChanged", l), c;
1272
+ return c.on("heightChanged", p), c.on("isExpandedChanged", p), c.on("stableHeightChanged", p), c.on("widthChanged", p), c;
1280
1273
  }
1281
- function Lt(s, t, e, o, n, r) {
1274
+ function Rt(s, t, e, r, o, n) {
1282
1275
  const {
1283
1276
  backgroundColor: a = t,
1284
- headerColor: h = "bg_color"
1285
- } = s ? V("web-app") || {} : {}, c = new Vt(
1286
- h,
1277
+ headerColor: u = "bg_color"
1278
+ } = s ? x("web-app") || {} : {}, c = new xt(
1279
+ u,
1287
1280
  a,
1288
1281
  e,
1282
+ r,
1289
1283
  o,
1290
- n,
1291
- r
1292
- ), l = () => x("web-app", {
1284
+ n
1285
+ ), p = () => k("web-app", {
1293
1286
  backgroundColor: c.backgroundColor,
1294
1287
  headerColor: c.headerColor
1295
1288
  });
1296
- return c.on("backgroundColorChanged", l), c.on("headerColorChanged", l), c;
1289
+ return c.on("backgroundColorChanged", p), c.on("headerColorChanged", p), c;
1297
1290
  }
1298
- async function Mt(s = {}) {
1291
+ async function Dt(s = {}) {
1299
1292
  const {
1300
1293
  checkCompat: t = !0,
1301
1294
  cssVars: e = !1,
1302
- acceptScrollbarStyle: o = !0,
1303
- acceptCustomStyles: n = o,
1304
- targetOrigin: r,
1295
+ acceptScrollbarStyle: r = !0,
1296
+ acceptCustomStyles: o = r,
1297
+ targetOrigin: n,
1305
1298
  launchParams: a,
1306
- debug: h = !1
1299
+ debug: u = !1
1307
1300
  } = s;
1308
- h && it(h), typeof r == "string" && at(r);
1309
- const { launchParams: c, isPageReload: l } = z({
1310
- currentLaunchParams: typeof a == "string" || a instanceof URLSearchParams ? rt(a) : a
1301
+ u && nt(u), typeof n == "string" && it(n);
1302
+ const { launchParams: c, isPageReload: p } = N({
1303
+ currentLaunchParams: typeof a == "string" || a instanceof URLSearchParams ? ot(a) : a
1311
1304
  }), {
1312
- initData: u,
1313
- initDataRaw: p,
1314
- version: b,
1315
- platform: S,
1316
- themeParams: $
1305
+ initData: h,
1306
+ initDataRaw: d,
1307
+ version: w,
1308
+ platform: $,
1309
+ themeParams: I
1317
1310
  } = c, {
1318
- backgroundColor: Q = "#ffffff",
1319
- buttonColor: Z = "#000000",
1320
- buttonTextColor: X = "#ffffff"
1321
- } = $, A = Ht(), d = t ? ct(b) : g, O = Rt($), H = Lt(
1322
- l,
1323
- Q,
1324
- b,
1325
- S,
1311
+ backgroundColor: G = "#ffffff",
1312
+ buttonColor: Q = "#000000",
1313
+ buttonTextColor: Z = "#ffffff"
1314
+ } = I, A = It(), l = t ? at(w) : g, P = At(I), H = Rt(
1315
+ p,
1316
+ G,
1317
+ w,
1318
+ $,
1326
1319
  A,
1327
- d
1320
+ l
1328
1321
  ), {
1329
- themeParams: Y,
1330
- viewport: tt,
1331
- webApp: et
1332
- } = Bt(e);
1333
- et && Ot(H, O), Y && qt(O);
1334
- const R = await Dt(l, S, d);
1335
- if (tt && Tt(R), n && ht()) {
1336
- const v = document.createElement("style");
1337
- v.id = "telegram-custom-styles", document.head.appendChild(v), E("set_custom_style", (B) => {
1338
- v.innerHTML = B;
1339
- }), d("iframe_ready");
1340
- }
1341
- const T = {
1342
- backButton: It(l, b, d),
1343
- closingBehavior: $t(l, d),
1344
- cloudStorage: new wt(b, A, d),
1345
- haptic: new Ct(b, d),
1346
- mainButton: At(l, Z, X, d),
1347
- popup: new Et(b, d),
1348
- postEvent: d,
1349
- qrScanner: new xt(b, d),
1350
- themeParams: O,
1322
+ themeParams: X,
1323
+ viewport: Y,
1324
+ webApp: tt
1325
+ } = Ot(e);
1326
+ tt && Pt(H, P), X && Vt(P);
1327
+ const R = await Ht(p, $, l);
1328
+ if (Y && qt(R), o && ct()) {
1329
+ const C = document.createElement("style");
1330
+ C.id = "telegram-custom-styles", document.head.appendChild(C), E("set_custom_style", (O) => {
1331
+ C.innerHTML = O;
1332
+ }), l("iframe_ready");
1333
+ }
1334
+ const q = {
1335
+ backButton: Tt(p, w, l),
1336
+ closingBehavior: Bt(p, l),
1337
+ cloudStorage: new wt(w, A, l),
1338
+ haptic: new mt(w, l),
1339
+ mainButton: $t(p, Q, Z, l),
1340
+ popup: new Et(w, l),
1341
+ postEvent: l,
1342
+ qrScanner: new kt(w, l),
1343
+ themeParams: P,
1351
1344
  viewport: R,
1352
1345
  webApp: H
1353
1346
  };
1354
- if (u !== void 0) {
1355
- const { authDate: v, hash: B, ...st } = u;
1356
- T.initData = new vt(v, B, st), T.initDataRaw = p;
1347
+ if (h !== void 0) {
1348
+ const { authDate: C, hash: O, ...et } = h;
1349
+ q.initData = new Ct(C, O, et), q.initDataRaw = d;
1357
1350
  }
1358
- return T;
1351
+ return q;
1359
1352
  }
1360
- function Qt(s = {}) {
1361
- return gt(Mt(s), s.timeout || 1e3);
1353
+ function Jt(s = {}) {
1354
+ return dt(Dt(s), s.timeout || 1e3);
1362
1355
  }
1363
- function Nt() {
1356
+ function Lt() {
1364
1357
  try {
1365
- return z(), !0;
1358
+ return N(), !0;
1366
1359
  } catch {
1367
1360
  return !1;
1368
1361
  }
1369
1362
  }
1370
- function Zt() {
1371
- return Nt();
1363
+ function Gt() {
1364
+ return Lt();
1372
1365
  }
1373
1366
  export {
1374
1367
  _t as BackButton,
1375
- ft as ClosingBehaviour,
1368
+ bt as ClosingBehaviour,
1376
1369
  wt as CloudStorage,
1377
- Ct as HapticFeedback,
1378
- vt as InitData,
1379
- yt as MainButton,
1380
- F as MethodNotSupportedError,
1370
+ mt as HapticFeedback,
1371
+ Ct as InitData,
1372
+ vt as MainButton,
1373
+ K as MethodNotSupportedError,
1381
1374
  j as ParameterUnsupportedError,
1382
1375
  Et as Popup,
1383
- xt as QRScanner,
1384
- q as ThemeParams,
1385
- k as Viewport,
1386
- Vt as WebApp,
1387
- I as formatURL,
1388
- Qt as init,
1389
- Nt as isTMA,
1390
- Zt as isTWA
1376
+ kt as QRScanner,
1377
+ V as ThemeParams,
1378
+ y as Viewport,
1379
+ xt as WebApp,
1380
+ T as formatURL,
1381
+ Jt as init,
1382
+ Lt as isTMA,
1383
+ Gt as isTWA
1391
1384
  };
1392
1385
  //# sourceMappingURL=index.mjs.map