@feedmepos/mf-connect 0.1.98-beta.4 → 0.1.98-beta.41

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.
Files changed (132) hide show
  1. package/dist/{App-BGv_JihW.js → App-C6JJ9uQ8.js} +808 -665
  2. package/dist/{AuditLogs-53rnjCmD.js → AuditLogs-CAlgtDgx.js} +12 -11
  3. package/dist/{Bin-B0Q_WpuY.js → Bin-D8jwhwER.js} +8 -8
  4. package/dist/{Broadcast-PiJE1Syl.js → Broadcast-CP8DRfkT.js} +39 -36
  5. package/dist/CampaignAnalytic-MVjYBFvu.js +1826 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dz2KsBZl.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DeLURz87.js} +7 -5
  7. package/dist/{Card-DlqMu3Sl.js → Card-QribXJwZ.js} +21 -20
  8. package/dist/{Collections-BWcBlDDR.js → Collections-X9xbt43V.js} +14 -13
  9. package/dist/Credit-QmbsW1eb.js +286 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCvH0lGA.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-ClNieHSo.js} +35 -30
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-B_FyeWq4.js → EffectSheet.vue_vue_type_style_index_0_lang-CrGHTNhg.js} +16 -16
  12. package/dist/{Experience-DacFmPYy.js → Experience-CPGMg847.js} +112 -86
  13. package/dist/{FileSaver.min-CMZKiGkX.js → FileSaver.min-CK67LsPG.js} +1 -1
  14. package/dist/Game-BrkiEFCS.js +356 -0
  15. package/dist/GiftCardSetup-DXNBHF1A.js +542 -0
  16. package/dist/{Grab-DaBL5y3H.js → Grab-BgtDzK1B.js} +32 -31
  17. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BaY_nQio.js → ImageInput.vue_vue_type_script_setup_true_lang-Dzv2AkKN.js} +1 -1
  18. package/dist/{Index-2UrjF35w.js → Index-KJgzalOd.js} +10 -10
  19. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BuVBZsCN.js → LocationPicker.vue_vue_type_script_setup_true_lang-C6SBLJGQ.js} +1 -1
  20. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-6wUxYqWe.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Dj74lJ7b.js} +1 -1
  21. package/dist/LoyaltyDashboard-B2JpbC01.js +1345 -0
  22. package/dist/MainLayout-DlfTKHQ-.js +143 -0
  23. package/dist/{Marketing-DEp--hFd.js → Marketing-Crx_JQpi.js} +7 -6
  24. package/dist/{MarketingMaterialEdit-BHL8Ptsu.js → MarketingMaterialEdit-BfsdcMXJ.js} +15 -14
  25. package/dist/{Member-BU1YxoEV.js → Member-C50Nrsko.js} +14 -13
  26. package/dist/{MemberList-zjvJBYf0.js → MemberList-C9uUKw1o.js} +37 -35
  27. package/dist/{MemberTransactions-BvyLV69V.js → MemberTransactions-DZ7zPOHX.js} +1 -1
  28. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-_YOM1SlS.js → MessageInput.vue_vue_type_script_setup_true_lang-Du_ZGsbX.js} +5434 -5279
  29. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
  30. package/dist/Mission-D_km8zi6.js +360 -0
  31. package/dist/{Overview-BToUlbsH.js → Overview-BBieK6qQ.js} +21 -20
  32. package/dist/Overview-B_kmLOcc.js +1316 -0
  33. package/dist/Point-D0q9N7f9.js +288 -0
  34. package/dist/Promotion-DoFTy-NK.js +423 -0
  35. package/dist/{Queue-D3vUkKN9.js → Queue-Dh5sDRHW.js} +13 -12
  36. package/dist/{Record-BViEbZZ8.js → Record-0owEBKqN.js} +9 -9
  37. package/dist/Review-DV2fnpOH.js +45 -0
  38. package/dist/ReviewFacebookCallback-D8mnAPzR.js +238 -0
  39. package/dist/ReviewGoogleCallback-CLzt_ox2.js +213 -0
  40. package/dist/{Reward-CZsvsYW_.js → Reward-Co20Xrss.js} +35 -35
  41. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BASPLoRa.js → RewardGroup.vue_vue_type_script_setup_true_lang-0qU49c47.js} +14 -13
  42. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B90meAnV.js → RuleGroup.vue_vue_type_script_setup_true_lang-qdvaXPhJ.js} +17 -15
  43. package/dist/{Segment-CN8NEg8w.js → Segment-7dQKeHWK.js} +38 -35
  44. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BGyYQST4.js → SelectItems.vue_vue_type_script_setup_true_lang-BUVrUifO.js} +2 -2
  45. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BxW-Kc6t.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDsV9TD9.js} +37 -36
  46. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-C9dwcEr5.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DqPZpddc.js} +4 -4
  47. package/dist/{Setting-DLPbZW11.js → Setting-Bvahxs-y.js} +14 -14
  48. package/dist/{SettingAdvertisements-BIq8gS5g.js → SettingAdvertisements-fbXLRwfb.js} +12 -12
  49. package/dist/Settings-C_HWDFN8.js +179 -0
  50. package/dist/Store-8yBKDR1b.js +2413 -0
  51. package/dist/{StoreRewards-BoEjVFk6.js → StoreRewards-DKaJvoJs.js} +15 -15
  52. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bv9ABH1K.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D23XzJD7.js} +400 -455
  53. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DNHgSfIg.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-JaFhCK_L.js} +2 -2
  54. package/dist/{Tier-kQ6X9h-t.js → Tier-CD-CjXC3.js} +44 -41
  55. package/dist/{Title-XosVAF2Y.js → Title-C_lcgye8.js} +49 -46
  56. package/dist/{Transaction-CO6oLPKR.js → Transaction-BvUYm-rT.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-McMR2Y7Y.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C3Yacz7K.js} +6 -6
  58. package/dist/{Voucher-CogaCxx2.js → Voucher-CYaG0GLU.js} +156 -133
  59. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DjHwHFBq.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DF2JqzRe.js} +12 -12
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Dor9klZ8.js → ZodTextField.vue_vue_type_script_setup_true_lang-B4UPqSNc.js} +2 -2
  61. package/dist/{app-C9UPXbDs.js → app-CE5hQ4Uq.js} +6656 -5653
  62. package/dist/app.js +1 -1
  63. package/dist/{business-CYpW6-Ls.js → business-CE_4siXc.js} +1 -1
  64. package/dist/{campaign-BtLa7KeF.js → campaign-BP6rvSpg.js} +74 -96
  65. package/dist/campaign-CXQtKpeb.js +100 -0
  66. package/dist/{campaign.enum-DiLhS5il.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  67. package/dist/{campaign.fn-CLB9gBHo.js → campaign.fn-DKnBpE1N.js} +119 -119
  68. package/dist/{collectible.enum-CmwWcfBh.js → collectible.enum-Liy2wH3s.js} +1 -1
  69. package/dist/collection.fn-Cg16QZSp.js +26 -0
  70. package/dist/{duplicateCampaign-DGhOBd5l.js → duplicateCampaign-DbtVAGsT.js} +2 -2
  71. package/dist/{effect-CY5Y6sxy.js → effect-CLI8NI4O.js} +1 -1
  72. package/dist/{email-addresses-BEnOHWj_.js → email-addresses-DlLiZ1io.js} +2 -2
  73. package/dist/{export-BgYu7SCd.js → export-6Hr34dBU.js} +3 -3
  74. package/dist/google-C3S8u0mT.js +4 -0
  75. package/dist/{helper-DTDgoyEh.js → helper-vkjFqj70.js} +1 -1
  76. package/dist/index-BIyKgw4m.js +72 -0
  77. package/dist/{index-C8ehLvXG.js → index-BLQJ-rv3.js} +1 -1
  78. package/dist/{index-CP-7qATP.js → index-BbTIqReL.js} +1 -1
  79. package/dist/index-BuMfQxMf.js +897 -0
  80. package/dist/index-C8cXXcLk.js +45 -0
  81. package/dist/{index-kS20rM5m.js → index-CSVhIZSY.js} +589 -580
  82. package/dist/{index-zF0gIg9H.js → index-CVHacTbc.js} +1 -1
  83. package/dist/index-C_H8jFYf.js +2743 -0
  84. package/dist/{index-goRooQn5.js → index-CmNsGhDf.js} +272 -368
  85. package/dist/index-CnTeeRyJ.js +53 -0
  86. package/dist/{index-Ck3PeOQ5.js → index-CzbNobLv.js} +105 -123
  87. package/dist/index-D06n1h1b.js +146 -0
  88. package/dist/{index-CNKP1_IW.js → index-D4SDAfbP.js} +8027 -10766
  89. package/dist/{index-DntoqWT_.js → index-DVnYQ3Hs.js} +1 -1
  90. package/dist/{index-BZVhi3ZG.js → index-DcjnS5Sv.js} +2 -2
  91. package/dist/{index-DtyWsBgg.js → index-Dx9h0FNH.js} +1 -1
  92. package/dist/{index-CDk0Itu1.js → index-YgP4ihQL.js} +1 -1
  93. package/dist/{index-B4IAURA_.js → index-kedErkLZ.js} +1759 -2480
  94. package/dist/{index-CLZnH782.js → index-lnQT4P3d.js} +10 -9
  95. package/dist/{index.esm2017-C79fd6cz.js → index.esm2017-Jhv2lkrq.js} +105 -105
  96. package/dist/{loading-Dfr_97Ri.js → loading-NY-FPxVY.js} +1 -1
  97. package/dist/{lodash-BX2mJOxF.js → lodash-BC_P6kLg.js} +1 -1
  98. package/dist/{membership-ncNOUJwj.js → membership-BWaK-9FY.js} +3 -3
  99. package/dist/{money-vEtTzt04.js → money-COoh4GXK.js} +1 -1
  100. package/dist/{number-BjgTlMsp.js → number-BX5OEXgq.js} +1 -1
  101. package/dist/objectid-1SUSRtmY.js +145 -0
  102. package/dist/{plugins-BVGqEmE1.js → plugins-ur-FAoye.js} +3 -3
  103. package/dist/remy-Qz_pNsUS.js +13 -0
  104. package/dist/{reward-BGTLhhzT.js → reward-DSsylZ22.js} +1 -1
  105. package/dist/{rule-BB2VX3Gy.js → rule-BM9GUd1C.js} +3 -3
  106. package/dist/rule-builder-gC9LH2AC.js +126 -0
  107. package/dist/{template-DLiHnpjK.js → template-CUV3AMFI.js} +6 -6
  108. package/dist/timezone-BFZhekOU.js +20 -0
  109. package/dist/transaction.fn-C5MlkEIC.js +64 -0
  110. package/dist/{trigger-DrKnfSoi.js → trigger-CbjiuoSo.js} +14 -14
  111. package/dist/useMarketingMaterialActions-BLisTieA.js +96 -0
  112. package/dist/{usePagination-Dgd-onzU.js → usePagination-Caah4sJr.js} +1 -1
  113. package/dist/{user-BcDUmNrZ.js → user-BZC4P_jL.js} +1 -1
  114. package/dist/{vue-i18n-DNBGmwox.js → vue-i18n-BYz7XAr_.js} +390 -390
  115. package/dist/{xlsx-BX-U0_Au.js → xlsx-Bn7BqUFA.js} +1 -1
  116. package/dist/{zod-Mx51GBPY.js → zod-DHH42rXG.js} +1 -1
  117. package/package.json +3 -3
  118. package/dist/Credit-CMfcuj5n.js +0 -260
  119. package/dist/Game-DXKnGuhR.js +0 -330
  120. package/dist/LoyaltyDashboard-DIArPp71.js +0 -1082
  121. package/dist/MainLayout-BjvTxTPG.js +0 -41
  122. package/dist/Mission-BNYk_aPM.js +0 -334
  123. package/dist/Point-B-L2326L.js +0 -262
  124. package/dist/Promotion-sMKGkL4w.js +0 -397
  125. package/dist/Review-CMBAk-Qu.js +0 -1067
  126. package/dist/ReviewFacebookCallback-BCJTFy3b.js +0 -243
  127. package/dist/ReviewGoogleCallback-DKUG075r.js +0 -208
  128. package/dist/Store-DNB3gUIR.js +0 -1996
  129. package/dist/campaign-CtoHyXVT.js +0 -219
  130. package/dist/index-P8Qh2yIP.js +0 -52
  131. package/dist/objectid-C9DiLwge.js +0 -145
  132. package/dist/useMarketingMaterialActions-B6zaDbNE.js +0 -107
@@ -1,21 +1,22 @@
1
- import { defineComponent as ht, ref as te, h as B, computed as Ee, watch as ft, resolveComponent as Zt, openBlock as ne, createElementBlock as ke, createVNode as pt, unref as v, createElementVNode as ie, toDisplayString as je, onMounted as en, Fragment as tn, createBlock as nn, createCommentVNode as Ge, nextTick as rn } from "vue";
2
- import { useRouter as sn, useRoute as mt, RouterView as on } from "vue-router";
3
- import { useCoreStore as be, FeedMeAuth as an } from "@feedmepos/mf-common";
4
- import { u as cn } from "./app-wDQR6dpb.js";
5
- import { u as ln } from "./business-CYpW6-Ls.js";
6
- import "./index-DtyWsBgg.js";
7
- import { components as z, useSnackbar as un, useDialog as dn } from "@feedmepos/ui-library";
8
- import { u as hn } from "./vue-i18n-DNBGmwox.js";
9
- import { C as Be, m as fn } from "./index-Ck3PeOQ5.js";
10
- import { R as f } from "./app-C9UPXbDs.js";
11
- import { J as pn } from "./JsonViewer-v8_C7l5N.js";
12
- import { r as Se, L as mn, g as gt, i as gn, a as _n, _ as ze, C as qe, b as vn, S as J, c as E, d as j, E as Ce, e as In, f as _t, h as Tn, j as yn, k as vt, l as _, m as wn, F as Oe, n as En, q as Y, o as kn, p as bn, s as Sn, t as Rn, u as An } from "./index.esm2017-C79fd6cz.js";
13
- import { _ as Ne } from "./tslib.es6-BCqqvLQ_.js";
14
- import { S as Ke, c as Pn } from "./index-BZVhi3ZG.js";
15
- const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Nn = /* @__PURE__ */ ht({
1
+ import { defineComponent as De, ref as ee, h as Y, computed as ne, watch as xe, resolveComponent as Z, openBlock as H, createElementBlock as pe, createVNode as S, unref as p, createElementVNode as _, toDisplayString as R, createBlock as Ne, withCtx as X, Fragment as It, renderList as cn, onMounted as ln, createCommentVNode as Ae, nextTick as un } from "vue";
2
+ import { useRouter as yt, useRoute as wt, RouterView as dn } from "vue-router";
3
+ import { useCoreStore as me, FeedMeAuth as hn } from "@feedmepos/mf-common";
4
+ import { u as fn } from "./app-wDQR6dpb.js";
5
+ import { u as pn } from "./business-CE_4siXc.js";
6
+ import "./index-Dx9h0FNH.js";
7
+ import { components as Q, useSnackbar as mn, useDialog as gn } from "@feedmepos/ui-library";
8
+ import { u as Tt } from "./vue-i18n-BYz7XAr_.js";
9
+ import { m as _n } from "./index-CzbNobLv.js";
10
+ import { C as Xe } from "./timezone-BFZhekOU.js";
11
+ import { R as f, A as vn, a as Qe } from "./app-CE5hQ4Uq.js";
12
+ import { J as In } from "./JsonViewer-v8_C7l5N.js";
13
+ import { r as Oe, L as yn, g as kt, i as wn, a as Tn, _ as Ze, C as et, b as kn, S as re, c as A, d as K, E as Fe, e as En, f as Et, h as bn, j as Sn, k as bt, l as y, m as Rn, F as Ve, n as An, q as se, o as Pn, p as Cn, s as Nn, t as On, u as Ln } from "./index.esm2017-Jhv2lkrq.js";
14
+ import { _ as $e } from "./tslib.es6-BCqqvLQ_.js";
15
+ import { S as tt, c as Mn } from "./index-DcjnS5Sv.js";
16
+ const Un = { class: "flex flex-col h-full justify-between py-16" }, Dn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, xn = /* @__PURE__ */ De({
16
17
  __name: "NavigationTab",
17
18
  setup(n) {
18
- const { t: e } = hn(), t = te(), i = [
19
+ const { t: e } = Tt(), t = ee(), i = [
19
20
  {
20
21
  label: e("connect.navigation.analytic"),
21
22
  value: f["$connect-ANALYTIC"]
@@ -61,7 +62,7 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
61
62
  {
62
63
  label: e("connect.navigation.point"),
63
64
  value: f["$connect-PROGRAM_POINT"],
64
- badge: () => B(z.FmPill, { variant: "premium" })
65
+ badge: () => Y(Q.FmPill, { variant: "premium" })
65
66
  },
66
67
  {
67
68
  label: e("connect.navigation.credit"),
@@ -70,7 +71,7 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
70
71
  {
71
72
  label: e("connect.navigation.game"),
72
73
  value: f["$connect-PROGRAM_GAME"],
73
- badge: () => B(z.FmPill, { variant: "premium" })
74
+ badge: () => Y(Q.FmPill, { variant: "premium" })
74
75
  },
75
76
  {
76
77
  label: "Mission",
@@ -89,19 +90,19 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
89
90
  {
90
91
  label: e("connect.navigation.segments"),
91
92
  value: f["$connect-LOYALTY_SEGMENT"],
92
- badge: () => B(z.FmPill, { variant: "premium" })
93
+ badge: () => Y(Q.FmPill, { variant: "premium" })
93
94
  },
94
95
  {
95
96
  label: e("connect.navigation.card"),
96
97
  value: f["$connect-LOYALTY_CARD"],
97
- badge: () => B(z.FmPill, { variant: "premium" })
98
+ badge: () => Y(Q.FmPill, { variant: "premium" })
98
99
  }
99
100
  ]
100
101
  },
101
102
  {
102
103
  label: e("connect.navigation.referral"),
103
104
  value: f["$connect-REFERRAL"],
104
- badge: () => B(z.FmPill, { variant: "premium" })
105
+ badge: () => Y(Q.FmPill, { variant: "premium" })
105
106
  },
106
107
  {
107
108
  label: e("connect.navigation.store"),
@@ -131,15 +132,15 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
131
132
  label: e("connect.navigation.bin"),
132
133
  value: f["$connect-BIN"]
133
134
  }
134
- ], r = sn(), s = mt(), o = i.reduce((d, h) => [...(h.children ?? []).map((p) => p.value), ...d, h.value], []), c = be(), a = Ee(() => {
135
+ ], r = yt(), s = wt(), o = i.reduce((d, h) => [...(h.children ?? []).map((m) => m.value), ...d, h.value], []), c = me(), a = ne(() => {
135
136
  const d = c.currentCountry.value || "MY";
136
- return console.log(`[MF] Timezone set to: ${Be[d]}`), Be[d];
137
+ return console.log(`[MF] Timezone set to: ${Xe[d]}`), Xe[d];
137
138
  });
138
- ft(
139
+ xe(
139
140
  () => s,
140
141
  (d) => {
141
- const h = d.matched.map((p) => p.name).reverse();
142
- t.value = h.find((p) => o.includes(p));
142
+ const h = d.matched.map((m) => m.name).reverse();
143
+ t.value = h.find((m) => o.includes(m));
143
144
  },
144
145
  { immediate: !0 }
145
146
  );
@@ -147,24 +148,165 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
147
148
  await r.push({ name: d });
148
149
  }
149
150
  return (d, h) => {
150
- var w;
151
- const p = Zt("FmCollapsibleTabs");
152
- return ne(), ke("div", Cn, [
153
- pt(p, {
151
+ var I;
152
+ const m = Z("FmCollapsibleTabs");
153
+ return H(), pe("div", Un, [
154
+ S(m, {
154
155
  class: "border-fm-color-neutral-gray-100 border-r px-4",
155
- "model-value": (w = v(t)) == null ? void 0 : w.toString(),
156
+ "model-value": (I = p(t)) == null ? void 0 : I.toString(),
156
157
  items: i,
157
158
  "onUpdate:modelValue": l
158
159
  }, null, 8, ["model-value"]),
159
- ie("div", On, [
160
- ie("div", null, "Timezone: " + je(v(a).split("/")[1].replace("_", " ")), 1),
161
- ie("div", null, "(UTC" + je(v(fn).tz(v(a)).format("Z")) + ")", 1)
160
+ _("div", Dn, [
161
+ _("div", null, "Timezone: " + R(p(a).split("/")[1].replace("_", " ")), 1),
162
+ _("div", null, "(UTC" + R(p(_n).tz(p(a)).format("Z")) + ")", 1)
162
163
  ])
163
164
  ]);
164
165
  };
165
166
  }
167
+ }), St = "feedme_connect_marketing_promo_hidden";
168
+ function Fn() {
169
+ try {
170
+ return localStorage.getItem(St) !== null;
171
+ } catch {
172
+ return !1;
173
+ }
174
+ }
175
+ function Vn() {
176
+ try {
177
+ localStorage.setItem(St, (/* @__PURE__ */ new Date()).toISOString());
178
+ } catch {
179
+ }
180
+ }
181
+ const $n = { class: "flex flex-col gap-12" }, Hn = { class: "fm-corner-radius-xxl bg-fm-color-primary-oats flex items-start gap-4 self-start px-12 py-4" }, jn = { class: "fm-typo-en-body-sm-600 text-fm-color-primary" }, Wn = { class: "fm-typo-en-title-sm-800 max-w-[560px] leading-[42px]" }, Gn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary max-w-[600px]" }, Bn = { class: "flex flex-col gap-24 pb-8" }, zn = { class: "grid grid-cols-1 gap-16 sm:grid-cols-3 md:grid-cols-3 lg:grid-cols-3" }, qn = { class: "fm-corner-radius-sm bg-fm-color-primary-oats flex h-40 w-40 shrink-0 items-center justify-center" }, Kn = { class: "fm-typo-en-body-lg-600" }, Jn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Yn = { class: "shrink-0" }, Xn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qn = { class: "flex w-full flex-col gap-12 px-[16px]" }, Zn = { class: "flex flex-wrap items-center gap-12" }, ei = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, ti = /* @__PURE__ */ De({
182
+ __name: "AiMarketingPromoDialog",
183
+ setup(n) {
184
+ let e = !1;
185
+ const { t } = Tt(), i = yt(), { sessionUser: r, currentCountry: s } = me(), o = ee(!1), c = [
186
+ { key: "completeContent", icon: "layers" },
187
+ { key: "realContext", icon: "storefront" },
188
+ { key: "socialFormat", icon: "aspect_ratio" }
189
+ ], a = ne(() => {
190
+ var w;
191
+ const I = ((w = r.value) == null ? void 0 : w.permissions) ?? [];
192
+ return vn(
193
+ [
194
+ {
195
+ action: Qe.Action.manage,
196
+ subject: Qe.Subject.Business.crm_marketingMaterial
197
+ }
198
+ ],
199
+ I
200
+ ).granted;
201
+ }), l = ne(
202
+ () => s.value === "MY" && a.value
203
+ );
204
+ let d = !1;
205
+ xe(
206
+ l,
207
+ (I) => {
208
+ d || !I || (d = !0, !(Fn() || e) && (e = !0, o.value = !0));
209
+ },
210
+ { immediate: !0 }
211
+ );
212
+ async function h() {
213
+ o.value = !1, await i.push({ name: f["$connect-MARKETING"] });
214
+ }
215
+ function m() {
216
+ Vn(), o.value = !1;
217
+ }
218
+ return (I, w) => {
219
+ const g = Z("FmIcon"), v = Z("FmCard"), T = Z("FmButton"), M = Z("FmDialog");
220
+ return H(), Ne(M, {
221
+ modelValue: o.value,
222
+ "onUpdate:modelValue": w[0] || (w[0] = (k) => o.value = k),
223
+ "min-width": "min(500px, calc(100% - 48px))",
224
+ "max-width": "min(860px, calc(100% - 48px))",
225
+ "max-height": "90vh",
226
+ "dismiss-away": ""
227
+ }, {
228
+ "dialog-header": X(() => [
229
+ _("div", $n, [
230
+ _("div", Hn, [
231
+ S(g, {
232
+ name: "auto_awesome",
233
+ size: "sm",
234
+ color: "primary"
235
+ }),
236
+ _("span", jn, R(p(t)("connect.marketing.whatsNew.badge")), 1)
237
+ ]),
238
+ _("h1", Wn, R(p(t)("connect.marketing.whatsNew.title")), 1),
239
+ _("p", Gn, R(p(t)("connect.marketing.whatsNew.subtitle")), 1)
240
+ ])
241
+ ]),
242
+ "dialog-footer": X(() => [
243
+ _("div", Qn, [
244
+ _("div", Zn, [
245
+ S(T, {
246
+ variant: "primary",
247
+ size: "lg",
248
+ label: p(t)("connect.marketing.whatsNew.cta"),
249
+ "append-icon": "arrow_forward",
250
+ onClick: h
251
+ }, null, 8, ["label"]),
252
+ S(T, {
253
+ variant: "tertiary",
254
+ size: "lg",
255
+ label: p(t)("connect.marketing.whatsNew.dismiss"),
256
+ onClick: m
257
+ }, null, 8, ["label"])
258
+ ]),
259
+ _("div", ei, R(p(t)("connect.marketing.whatsNew.footnote")), 1)
260
+ ])
261
+ ]),
262
+ default: X(() => [
263
+ _("div", Bn, [
264
+ _("div", zn, [
265
+ (H(), pe(It, null, cn(c, (k) => S(v, {
266
+ key: k.key,
267
+ variant: "outlined",
268
+ class: "!h-full flex flex-col gap-8 p-16"
269
+ }, {
270
+ default: X(() => [
271
+ _("div", qn, [
272
+ S(g, {
273
+ name: k.icon,
274
+ size: "md",
275
+ color: "primary"
276
+ }, null, 8, ["name"])
277
+ ]),
278
+ _("div", Kn, R(p(t)(`connect.marketing.whatsNew.benefits.${k.key}.title`)), 1),
279
+ _("div", Jn, R(p(t)(
280
+ `connect.marketing.whatsNew.benefits.${k.key}.description`
281
+ )), 1)
282
+ ]),
283
+ _: 2
284
+ }, 1024)), 64))
285
+ ]),
286
+ S(v, {
287
+ variant: "outlined",
288
+ class: "flex items-start gap-12 p-16"
289
+ }, {
290
+ default: X(() => [
291
+ _("div", Yn, [
292
+ S(g, {
293
+ name: "lightbulb",
294
+ size: "md",
295
+ color: "primary"
296
+ })
297
+ ]),
298
+ _("p", Xn, R(p(t)("connect.marketing.whatsNew.callout")), 1)
299
+ ]),
300
+ _: 1
301
+ })
302
+ ])
303
+ ]),
304
+ _: 1
305
+ }, 8, ["modelValue"]);
306
+ };
307
+ }
166
308
  });
167
- var Ln = "firebase", Mn = "10.12.4";
309
+ var ni = "firebase", ii = "10.12.4";
168
310
  /**
169
311
  * @license
170
312
  * Copyright 2020 Google LLC
@@ -181,13 +323,13 @@ var Ln = "firebase", Mn = "10.12.4";
181
323
  * See the License for the specific language governing permissions and
182
324
  * limitations under the License.
183
325
  */
184
- Se(Ln, Mn, "app");
185
- function It() {
326
+ Oe(ni, ii, "app");
327
+ function Rt() {
186
328
  return {
187
329
  "dependent-sdk-initialized-before-auth": "Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."
188
330
  };
189
331
  }
190
- const Un = It, Tt = new Ce("auth", "Firebase", It());
332
+ const ri = Rt, At = new Fe("auth", "Firebase", Rt());
191
333
  /**
192
334
  * @license
193
335
  * Copyright 2020 Google LLC
@@ -204,12 +346,12 @@ const Un = It, Tt = new Ce("auth", "Firebase", It());
204
346
  * See the License for the specific language governing permissions and
205
347
  * limitations under the License.
206
348
  */
207
- const ce = new mn("@firebase/auth");
208
- function Dn(n, ...e) {
209
- ce.logLevel <= vt.WARN && ce.warn(`Auth (${J}): ${n}`, ...e);
349
+ const ge = new yn("@firebase/auth");
350
+ function si(n, ...e) {
351
+ ge.logLevel <= bt.WARN && ge.warn(`Auth (${re}): ${n}`, ...e);
210
352
  }
211
- function re(n, ...e) {
212
- ce.logLevel <= vt.ERROR && ce.error(`Auth (${J}): ${n}`, ...e);
353
+ function ue(n, ...e) {
354
+ ge.logLevel <= bt.ERROR && ge.error(`Auth (${re}): ${n}`, ...e);
213
355
  }
214
356
  /**
215
357
  * @license
@@ -227,38 +369,38 @@ function re(n, ...e) {
227
369
  * See the License for the specific language governing permissions and
228
370
  * limitations under the License.
229
371
  */
230
- function R(n, ...e) {
231
- throw Le(n, ...e);
372
+ function O(n, ...e) {
373
+ throw He(n, ...e);
232
374
  }
233
- function T(n, ...e) {
234
- return Le(n, ...e);
375
+ function E(n, ...e) {
376
+ return He(n, ...e);
235
377
  }
236
- function yt(n, e, t) {
237
- const i = Object.assign(Object.assign({}, Un()), { [e]: t });
238
- return new Ce("auth", "Firebase", i).create(e, {
378
+ function Pt(n, e, t) {
379
+ const i = Object.assign(Object.assign({}, ri()), { [e]: t });
380
+ return new Fe("auth", "Firebase", i).create(e, {
239
381
  appName: n.name
240
382
  });
241
383
  }
242
- function M(n) {
243
- return yt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
384
+ function $(n) {
385
+ return Pt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
244
386
  }
245
- function Le(n, ...e) {
387
+ function He(n, ...e) {
246
388
  if (typeof n != "string") {
247
389
  const t = e[0], i = [...e.slice(1)];
248
390
  return i[0] && (i[0].appName = n.name), n._errorFactory.create(t, ...i);
249
391
  }
250
- return Tt.create(n, ...e);
392
+ return At.create(n, ...e);
251
393
  }
252
394
  function u(n, e, ...t) {
253
395
  if (!n)
254
- throw Le(e, ...t);
396
+ throw He(e, ...t);
255
397
  }
256
- function k(n) {
398
+ function P(n) {
257
399
  const e = "INTERNAL ASSERTION FAILED: " + n;
258
- throw re(e), new Error(e);
400
+ throw ue(e), new Error(e);
259
401
  }
260
- function A(n, e) {
261
- n || k(e);
402
+ function L(n, e) {
403
+ n || P(e);
262
404
  }
263
405
  /**
264
406
  * @license
@@ -276,14 +418,14 @@ function A(n, e) {
276
418
  * See the License for the specific language governing permissions and
277
419
  * limitations under the License.
278
420
  */
279
- function Re() {
421
+ function Le() {
280
422
  var n;
281
423
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
282
424
  }
283
- function Fn() {
284
- return Je() === "http:" || Je() === "https:";
425
+ function oi() {
426
+ return nt() === "http:" || nt() === "https:";
285
427
  }
286
- function Je() {
428
+ function nt() {
287
429
  var n;
288
430
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
289
431
  }
@@ -303,15 +445,15 @@ function Je() {
303
445
  * See the License for the specific language governing permissions and
304
446
  * limitations under the License.
305
447
  */
306
- function xn() {
448
+ function ai() {
307
449
  return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
308
450
  // This is especially true for Cordova apps which have unreliable
309
451
  // navigator.onLine behavior unless cordova-plugin-network-information is
310
452
  // installed which overwrites the native navigator.onLine value and
311
453
  // defines navigator.connection.
312
- (Fn() || vn() || "connection" in navigator) ? navigator.onLine : !0;
454
+ (oi() || kn() || "connection" in navigator) ? navigator.onLine : !0;
313
455
  }
314
- function Vn() {
456
+ function ci() {
315
457
  if (typeof navigator > "u")
316
458
  return null;
317
459
  const n = navigator;
@@ -339,12 +481,12 @@ function Vn() {
339
481
  * See the License for the specific language governing permissions and
340
482
  * limitations under the License.
341
483
  */
342
- class X {
484
+ class oe {
343
485
  constructor(e, t) {
344
- this.shortDelay = e, this.longDelay = t, A(t > e, "Short delay should be less than long delay!"), this.isMobile = gn() || _n();
486
+ this.shortDelay = e, this.longDelay = t, L(t > e, "Short delay should be less than long delay!"), this.isMobile = wn() || Tn();
345
487
  }
346
488
  get() {
347
- return xn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
489
+ return ai() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
348
490
  }
349
491
  }
350
492
  /**
@@ -363,8 +505,8 @@ class X {
363
505
  * See the License for the specific language governing permissions and
364
506
  * limitations under the License.
365
507
  */
366
- function Me(n, e) {
367
- A(n.emulator, "Emulator should always be set here");
508
+ function je(n, e) {
509
+ L(n.emulator, "Emulator should always be set here");
368
510
  const { url: t } = n.emulator;
369
511
  return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
370
512
  }
@@ -384,7 +526,7 @@ function Me(n, e) {
384
526
  * See the License for the specific language governing permissions and
385
527
  * limitations under the License.
386
528
  */
387
- class wt {
529
+ class Ct {
388
530
  static initialize(e, t, i) {
389
531
  this.fetchImpl = e, t && (this.headersImpl = t), i && (this.responseImpl = i);
390
532
  }
@@ -397,7 +539,7 @@ class wt {
397
539
  return globalThis.fetch;
398
540
  if (typeof fetch < "u")
399
541
  return fetch;
400
- k("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
542
+ P("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
401
543
  }
402
544
  static headers() {
403
545
  if (this.headersImpl)
@@ -408,7 +550,7 @@ class wt {
408
550
  return globalThis.Headers;
409
551
  if (typeof Headers < "u")
410
552
  return Headers;
411
- k("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
553
+ P("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
412
554
  }
413
555
  static response() {
414
556
  if (this.responseImpl)
@@ -419,7 +561,7 @@ class wt {
419
561
  return globalThis.Response;
420
562
  if (typeof Response < "u")
421
563
  return Response;
422
- k("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
564
+ P("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
423
565
  }
424
566
  }
425
567
  /**
@@ -438,7 +580,7 @@ class wt {
438
580
  * See the License for the specific language governing permissions and
439
581
  * limitations under the License.
440
582
  */
441
- const $n = {
583
+ const li = {
442
584
  // Custom token errors.
443
585
  CREDENTIAL_MISMATCH: "custom-token-mismatch",
444
586
  // This can only happen if the SDK sends a bad request.
@@ -529,93 +671,93 @@ const $n = {
529
671
  * See the License for the specific language governing permissions and
530
672
  * limitations under the License.
531
673
  */
532
- const Hn = new X(3e4, 6e4);
533
- function fe(n, e) {
674
+ const ui = new oe(3e4, 6e4);
675
+ function we(n, e) {
534
676
  return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
535
677
  }
536
- async function G(n, e, t, i, r = {}) {
537
- return Et(n, r, async () => {
678
+ async function J(n, e, t, i, r = {}) {
679
+ return Nt(n, r, async () => {
538
680
  let s = {}, o = {};
539
681
  i && (e === "GET" ? o = i : s = {
540
682
  body: JSON.stringify(i)
541
683
  });
542
- const c = Y(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
684
+ const c = se(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
543
685
  return a[
544
686
  "Content-Type"
545
687
  /* HttpHeader.CONTENT_TYPE */
546
688
  ] = "application/json", n.languageCode && (a[
547
689
  "X-Firebase-Locale"
548
690
  /* HttpHeader.X_FIREBASE_LOCALE */
549
- ] = n.languageCode), wt.fetch()(bt(n, n.config.apiHost, t, c), Object.assign({
691
+ ] = n.languageCode), Ct.fetch()(Lt(n, n.config.apiHost, t, c), Object.assign({
550
692
  method: e,
551
693
  headers: a,
552
694
  referrerPolicy: "no-referrer"
553
695
  }, s));
554
696
  });
555
697
  }
556
- async function Et(n, e, t) {
698
+ async function Nt(n, e, t) {
557
699
  n._canInitEmulator = !1;
558
- const i = Object.assign(Object.assign({}, $n), e);
700
+ const i = Object.assign(Object.assign({}, li), e);
559
701
  try {
560
- const r = new Wn(n), s = await Promise.race([
702
+ const r = new di(n), s = await Promise.race([
561
703
  t(),
562
704
  r.promise
563
705
  ]);
564
706
  r.clearNetworkTimeout();
565
707
  const o = await s.json();
566
708
  if ("needConfirmation" in o)
567
- throw ee(n, "account-exists-with-different-credential", o);
709
+ throw le(n, "account-exists-with-different-credential", o);
568
710
  if (s.ok && !("errorMessage" in o))
569
711
  return o;
570
712
  {
571
713
  const c = s.ok ? o.errorMessage : o.error.message, [a, l] = c.split(" : ");
572
714
  if (a === "FEDERATED_USER_ID_ALREADY_LINKED")
573
- throw ee(n, "credential-already-in-use", o);
715
+ throw le(n, "credential-already-in-use", o);
574
716
  if (a === "EMAIL_EXISTS")
575
- throw ee(n, "email-already-in-use", o);
717
+ throw le(n, "email-already-in-use", o);
576
718
  if (a === "USER_DISABLED")
577
- throw ee(n, "user-disabled", o);
719
+ throw le(n, "user-disabled", o);
578
720
  const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
579
721
  if (l)
580
- throw yt(n, d, l);
581
- R(n, d);
722
+ throw Pt(n, d, l);
723
+ O(n, d);
582
724
  }
583
725
  } catch (r) {
584
- if (r instanceof Oe)
726
+ if (r instanceof Ve)
585
727
  throw r;
586
- R(n, "network-request-failed", { message: String(r) });
728
+ O(n, "network-request-failed", { message: String(r) });
587
729
  }
588
730
  }
589
- async function kt(n, e, t, i, r = {}) {
590
- const s = await G(n, e, t, i, r);
591
- return "mfaPendingCredential" in s && R(n, "multi-factor-auth-required", {
731
+ async function Ot(n, e, t, i, r = {}) {
732
+ const s = await J(n, e, t, i, r);
733
+ return "mfaPendingCredential" in s && O(n, "multi-factor-auth-required", {
592
734
  _serverResponse: s
593
735
  }), s;
594
736
  }
595
- function bt(n, e, t, i) {
737
+ function Lt(n, e, t, i) {
596
738
  const r = `${e}${t}?${i}`;
597
- return n.config.emulator ? Me(n.config, r) : `${n.config.apiScheme}://${r}`;
739
+ return n.config.emulator ? je(n.config, r) : `${n.config.apiScheme}://${r}`;
598
740
  }
599
- class Wn {
741
+ class di {
600
742
  constructor(e) {
601
743
  this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
602
- this.timer = setTimeout(() => i(T(
744
+ this.timer = setTimeout(() => i(E(
603
745
  this.auth,
604
746
  "network-request-failed"
605
747
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
606
- )), Hn.get());
748
+ )), ui.get());
607
749
  });
608
750
  }
609
751
  clearNetworkTimeout() {
610
752
  clearTimeout(this.timer);
611
753
  }
612
754
  }
613
- function ee(n, e, t) {
755
+ function le(n, e, t) {
614
756
  const i = {
615
757
  appName: n.name
616
758
  };
617
759
  t.email && (i.email = t.email), t.phoneNumber && (i.phoneNumber = t.phoneNumber);
618
- const r = T(n, e, i);
760
+ const r = E(n, e, i);
619
761
  return r.customData._tokenResponse = t, r;
620
762
  }
621
763
  /**
@@ -634,11 +776,11 @@ function ee(n, e, t) {
634
776
  * See the License for the specific language governing permissions and
635
777
  * limitations under the License.
636
778
  */
637
- async function jn(n, e) {
638
- return G(n, "POST", "/v1/accounts:delete", e);
779
+ async function hi(n, e) {
780
+ return J(n, "POST", "/v1/accounts:delete", e);
639
781
  }
640
- async function St(n, e) {
641
- return G(n, "POST", "/v1/accounts:lookup", e);
782
+ async function Mt(n, e) {
783
+ return J(n, "POST", "/v1/accounts:lookup", e);
642
784
  }
643
785
  /**
644
786
  * @license
@@ -656,7 +798,7 @@ async function St(n, e) {
656
798
  * See the License for the specific language governing permissions and
657
799
  * limitations under the License.
658
800
  */
659
- function q(n) {
801
+ function te(n) {
660
802
  if (n)
661
803
  try {
662
804
  const e = new Date(Number(n));
@@ -665,8 +807,8 @@ function q(n) {
665
807
  } catch {
666
808
  }
667
809
  }
668
- async function Gn(n, e = !1) {
669
- const t = j(n), i = await t.getIdToken(e), r = Ue(i);
810
+ async function fi(n, e = !1) {
811
+ const t = K(n), i = await t.getIdToken(e), r = We(i);
670
812
  u(
671
813
  r && r.exp && r.auth_time && r.iat,
672
814
  t.auth,
@@ -677,29 +819,29 @@ async function Gn(n, e = !1) {
677
819
  return {
678
820
  claims: r,
679
821
  token: i,
680
- authTime: q(ye(r.auth_time)),
681
- issuedAtTime: q(ye(r.iat)),
682
- expirationTime: q(ye(r.exp)),
822
+ authTime: te(Pe(r.auth_time)),
823
+ issuedAtTime: te(Pe(r.iat)),
824
+ expirationTime: te(Pe(r.exp)),
683
825
  signInProvider: o || null,
684
826
  signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
685
827
  };
686
828
  }
687
- function ye(n) {
829
+ function Pe(n) {
688
830
  return Number(n) * 1e3;
689
831
  }
690
- function Ue(n) {
832
+ function We(n) {
691
833
  const [e, t, i] = n.split(".");
692
834
  if (e === void 0 || t === void 0 || i === void 0)
693
- return re("JWT malformed, contained fewer than 3 sections"), null;
835
+ return ue("JWT malformed, contained fewer than 3 sections"), null;
694
836
  try {
695
- const r = En(t);
696
- return r ? JSON.parse(r) : (re("Failed to decode base64 JWT payload"), null);
837
+ const r = An(t);
838
+ return r ? JSON.parse(r) : (ue("Failed to decode base64 JWT payload"), null);
697
839
  } catch (r) {
698
- return re("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
840
+ return ue("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
699
841
  }
700
842
  }
701
- function Ye(n) {
702
- const e = Ue(n);
843
+ function it(n) {
844
+ const e = We(n);
703
845
  return u(
704
846
  e,
705
847
  "internal-error"
@@ -730,16 +872,16 @@ function Ye(n) {
730
872
  * See the License for the specific language governing permissions and
731
873
  * limitations under the License.
732
874
  */
733
- async function K(n, e, t = !1) {
875
+ async function ie(n, e, t = !1) {
734
876
  if (t)
735
877
  return e;
736
878
  try {
737
879
  return await e;
738
880
  } catch (i) {
739
- throw i instanceof Oe && Bn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
881
+ throw i instanceof Ve && pi(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
740
882
  }
741
883
  }
742
- function Bn({ code: n }) {
884
+ function pi({ code: n }) {
743
885
  return n === "auth/user-disabled" || n === "auth/user-token-expired";
744
886
  }
745
887
  /**
@@ -758,7 +900,7 @@ function Bn({ code: n }) {
758
900
  * See the License for the specific language governing permissions and
759
901
  * limitations under the License.
760
902
  */
761
- class zn {
903
+ class mi {
762
904
  constructor(e) {
763
905
  this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
764
906
  }
@@ -820,12 +962,12 @@ class zn {
820
962
  * See the License for the specific language governing permissions and
821
963
  * limitations under the License.
822
964
  */
823
- class Ae {
965
+ class Me {
824
966
  constructor(e, t) {
825
967
  this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
826
968
  }
827
969
  _initializeTime() {
828
- this.lastSignInTime = q(this.lastLoginAt), this.creationTime = q(this.createdAt);
970
+ this.lastSignInTime = te(this.lastLoginAt), this.creationTime = te(this.createdAt);
829
971
  }
830
972
  _copy(e) {
831
973
  this.createdAt = e.createdAt, this.lastLoginAt = e.lastLoginAt, this._initializeTime();
@@ -853,9 +995,9 @@ class Ae {
853
995
  * See the License for the specific language governing permissions and
854
996
  * limitations under the License.
855
997
  */
856
- async function le(n) {
998
+ async function _e(n) {
857
999
  var e;
858
- const t = n.auth, i = await n.getIdToken(), r = await K(n, St(t, { idToken: i }));
1000
+ const t = n.auth, i = await n.getIdToken(), r = await ie(n, Mt(t, { idToken: i }));
859
1001
  u(
860
1002
  r == null ? void 0 : r.users.length,
861
1003
  t,
@@ -864,7 +1006,7 @@ async function le(n) {
864
1006
  );
865
1007
  const s = r.users[0];
866
1008
  n._notifyReloadListener(s);
867
- const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Rt(s.providerUserInfo) : [], c = Kn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
1009
+ const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Ut(s.providerUserInfo) : [], c = _i(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
868
1010
  uid: s.localId,
869
1011
  displayName: s.displayName || null,
870
1012
  photoURL: s.photoUrl || null,
@@ -873,21 +1015,21 @@ async function le(n) {
873
1015
  phoneNumber: s.phoneNumber || null,
874
1016
  tenantId: s.tenantId || null,
875
1017
  providerData: c,
876
- metadata: new Ae(s.createdAt, s.lastLoginAt),
1018
+ metadata: new Me(s.createdAt, s.lastLoginAt),
877
1019
  isAnonymous: d
878
1020
  };
879
1021
  Object.assign(n, h);
880
1022
  }
881
- async function qn(n) {
882
- const e = j(n);
883
- await le(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
1023
+ async function gi(n) {
1024
+ const e = K(n);
1025
+ await _e(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
884
1026
  }
885
- function Kn(n, e) {
1027
+ function _i(n, e) {
886
1028
  return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
887
1029
  }
888
- function Rt(n) {
1030
+ function Ut(n) {
889
1031
  return n.map((e) => {
890
- var { providerId: t } = e, i = Ne(e, ["providerId"]);
1032
+ var { providerId: t } = e, i = $e(e, ["providerId"]);
891
1033
  return {
892
1034
  providerId: t,
893
1035
  uid: i.rawId || "",
@@ -914,16 +1056,16 @@ function Rt(n) {
914
1056
  * See the License for the specific language governing permissions and
915
1057
  * limitations under the License.
916
1058
  */
917
- async function Jn(n, e) {
918
- const t = await Et(n, {}, async () => {
919
- const i = Y({
1059
+ async function vi(n, e) {
1060
+ const t = await Nt(n, {}, async () => {
1061
+ const i = se({
920
1062
  grant_type: "refresh_token",
921
1063
  refresh_token: e
922
- }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = bt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
1064
+ }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = Lt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
923
1065
  return c[
924
1066
  "Content-Type"
925
1067
  /* HttpHeader.CONTENT_TYPE */
926
- ] = "application/x-www-form-urlencoded", wt.fetch()(o, {
1068
+ ] = "application/x-www-form-urlencoded", Ct.fetch()(o, {
927
1069
  method: "POST",
928
1070
  headers: c,
929
1071
  body: i
@@ -935,8 +1077,8 @@ async function Jn(n, e) {
935
1077
  refreshToken: t.refresh_token
936
1078
  };
937
1079
  }
938
- async function Yn(n, e) {
939
- return G(n, "POST", "/v2/accounts:revokeToken", fe(n, e));
1080
+ async function Ii(n, e) {
1081
+ return J(n, "POST", "/v2/accounts:revokeToken", we(n, e));
940
1082
  }
941
1083
  /**
942
1084
  * @license
@@ -954,7 +1096,7 @@ async function Yn(n, e) {
954
1096
  * See the License for the specific language governing permissions and
955
1097
  * limitations under the License.
956
1098
  */
957
- class $ {
1099
+ class B {
958
1100
  constructor() {
959
1101
  this.refreshToken = null, this.accessToken = null, this.expirationTime = null;
960
1102
  }
@@ -975,7 +1117,7 @@ class $ {
975
1117
  "internal-error"
976
1118
  /* AuthErrorCode.INTERNAL_ERROR */
977
1119
  );
978
- const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : Ye(e.idToken);
1120
+ const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : it(e.idToken);
979
1121
  this.updateTokensAndExpiration(e.idToken, e.refreshToken, t);
980
1122
  }
981
1123
  updateFromIdToken(e) {
@@ -984,7 +1126,7 @@ class $ {
984
1126
  "internal-error"
985
1127
  /* AuthErrorCode.INTERNAL_ERROR */
986
1128
  );
987
- const t = Ye(e);
1129
+ const t = it(e);
988
1130
  this.updateTokensAndExpiration(e, null, t);
989
1131
  }
990
1132
  async getToken(e, t = !1) {
@@ -999,14 +1141,14 @@ class $ {
999
1141
  this.refreshToken = null;
1000
1142
  }
1001
1143
  async refresh(e, t) {
1002
- const { accessToken: i, refreshToken: r, expiresIn: s } = await Jn(e, t);
1144
+ const { accessToken: i, refreshToken: r, expiresIn: s } = await vi(e, t);
1003
1145
  this.updateTokensAndExpiration(i, r, Number(s));
1004
1146
  }
1005
1147
  updateTokensAndExpiration(e, t, i) {
1006
1148
  this.refreshToken = t || null, this.accessToken = e || null, this.expirationTime = Date.now() + i * 1e3;
1007
1149
  }
1008
1150
  static fromJSON(e, t) {
1009
- const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new $();
1151
+ const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new B();
1010
1152
  return i && (u(typeof i == "string", "internal-error", {
1011
1153
  appName: e
1012
1154
  }), o.refreshToken = i), r && (u(typeof r == "string", "internal-error", {
@@ -1026,10 +1168,10 @@ class $ {
1026
1168
  this.accessToken = e.accessToken, this.refreshToken = e.refreshToken, this.expirationTime = e.expirationTime;
1027
1169
  }
1028
1170
  _clone() {
1029
- return Object.assign(new $(), this.toJSON());
1171
+ return Object.assign(new B(), this.toJSON());
1030
1172
  }
1031
1173
  _performRefresh() {
1032
- return k("not implemented");
1174
+ return P("not implemented");
1033
1175
  }
1034
1176
  }
1035
1177
  /**
@@ -1048,16 +1190,16 @@ class $ {
1048
1190
  * See the License for the specific language governing permissions and
1049
1191
  * limitations under the License.
1050
1192
  */
1051
- function P(n, e) {
1193
+ function U(n, e) {
1052
1194
  u(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
1053
1195
  }
1054
- class b {
1196
+ class C {
1055
1197
  constructor(e) {
1056
- var { uid: t, auth: i, stsTokenManager: r } = e, s = Ne(e, ["uid", "auth", "stsTokenManager"]);
1057
- this.providerId = "firebase", this.proactiveRefresh = new zn(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = i, this.stsTokenManager = r, this.accessToken = r.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new Ae(s.createdAt || void 0, s.lastLoginAt || void 0);
1198
+ var { uid: t, auth: i, stsTokenManager: r } = e, s = $e(e, ["uid", "auth", "stsTokenManager"]);
1199
+ this.providerId = "firebase", this.proactiveRefresh = new mi(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = i, this.stsTokenManager = r, this.accessToken = r.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new Me(s.createdAt || void 0, s.lastLoginAt || void 0);
1058
1200
  }
1059
1201
  async getIdToken(e) {
1060
- const t = await K(this, this.stsTokenManager.getToken(this.auth, e));
1202
+ const t = await ie(this, this.stsTokenManager.getToken(this.auth, e));
1061
1203
  return u(
1062
1204
  t,
1063
1205
  this.auth,
@@ -1066,10 +1208,10 @@ class b {
1066
1208
  ), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
1067
1209
  }
1068
1210
  getIdTokenResult(e) {
1069
- return Gn(this, e);
1211
+ return fi(this, e);
1070
1212
  }
1071
1213
  reload() {
1072
- return qn(this);
1214
+ return gi(this);
1073
1215
  }
1074
1216
  _assign(e) {
1075
1217
  this !== e && (u(
@@ -1080,7 +1222,7 @@ class b {
1080
1222
  ), this.displayName = e.displayName, this.photoURL = e.photoURL, this.email = e.email, this.emailVerified = e.emailVerified, this.phoneNumber = e.phoneNumber, this.isAnonymous = e.isAnonymous, this.tenantId = e.tenantId, this.providerData = e.providerData.map((t) => Object.assign({}, t)), this.metadata._copy(e.metadata), this.stsTokenManager._assign(e.stsTokenManager));
1081
1223
  }
1082
1224
  _clone(e) {
1083
- const t = new b(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
1225
+ const t = new C(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
1084
1226
  return t.metadata._copy(this.metadata), t;
1085
1227
  }
1086
1228
  _onReload(e) {
@@ -1102,13 +1244,13 @@ class b {
1102
1244
  }
1103
1245
  async _updateTokensIfNecessary(e, t = !1) {
1104
1246
  let i = !1;
1105
- e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await le(this), await this.auth._persistUserIfCurrent(this), i && this.auth._notifyListenersIfCurrent(this);
1247
+ e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await _e(this), await this.auth._persistUserIfCurrent(this), i && this.auth._notifyListenersIfCurrent(this);
1106
1248
  }
1107
1249
  async delete() {
1108
- if (E(this.auth.app))
1109
- return Promise.reject(M(this.auth));
1250
+ if (A(this.auth.app))
1251
+ return Promise.reject($(this.auth));
1110
1252
  const e = await this.getIdToken();
1111
- return await K(this, jn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1253
+ return await ie(this, hi(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1112
1254
  }
1113
1255
  toJSON() {
1114
1256
  return Object.assign(Object.assign({
@@ -1136,45 +1278,45 @@ class b {
1136
1278
  }
1137
1279
  static _fromJSON(e, t) {
1138
1280
  var i, r, s, o, c, a, l, d;
1139
- const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, p = (r = t.email) !== null && r !== void 0 ? r : void 0, w = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, U = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, m = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, g = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, I = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, x = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: ve, emailVerified: $e, isAnonymous: He, providerData: Ie, stsTokenManager: We } = t;
1281
+ const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, m = (r = t.email) !== null && r !== void 0 ? r : void 0, I = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, w = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, g = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, v = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, T = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, M = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: k, emailVerified: Ke, isAnonymous: Je, providerData: Se, stsTokenManager: Ye } = t;
1140
1282
  u(
1141
- ve && We,
1283
+ k && Ye,
1142
1284
  e,
1143
1285
  "internal-error"
1144
1286
  /* AuthErrorCode.INTERNAL_ERROR */
1145
1287
  );
1146
- const Xt = $.fromJSON(this.name, We);
1288
+ const on = B.fromJSON(this.name, Ye);
1147
1289
  u(
1148
- typeof ve == "string",
1290
+ typeof k == "string",
1149
1291
  e,
1150
1292
  "internal-error"
1151
1293
  /* AuthErrorCode.INTERNAL_ERROR */
1152
- ), P(h, e.name), P(p, e.name), u(
1153
- typeof $e == "boolean",
1294
+ ), U(h, e.name), U(m, e.name), u(
1295
+ typeof Ke == "boolean",
1154
1296
  e,
1155
1297
  "internal-error"
1156
1298
  /* AuthErrorCode.INTERNAL_ERROR */
1157
1299
  ), u(
1158
- typeof He == "boolean",
1300
+ typeof Je == "boolean",
1159
1301
  e,
1160
1302
  "internal-error"
1161
1303
  /* AuthErrorCode.INTERNAL_ERROR */
1162
- ), P(w, e.name), P(U, e.name), P(m, e.name), P(g, e.name), P(I, e.name), P(x, e.name);
1163
- const Te = new b({
1164
- uid: ve,
1304
+ ), U(I, e.name), U(w, e.name), U(g, e.name), U(v, e.name), U(T, e.name), U(M, e.name);
1305
+ const Re = new C({
1306
+ uid: k,
1165
1307
  auth: e,
1166
- email: p,
1167
- emailVerified: $e,
1308
+ email: m,
1309
+ emailVerified: Ke,
1168
1310
  displayName: h,
1169
- isAnonymous: He,
1170
- photoURL: U,
1171
- phoneNumber: w,
1172
- tenantId: m,
1173
- stsTokenManager: Xt,
1174
- createdAt: I,
1175
- lastLoginAt: x
1311
+ isAnonymous: Je,
1312
+ photoURL: w,
1313
+ phoneNumber: I,
1314
+ tenantId: g,
1315
+ stsTokenManager: on,
1316
+ createdAt: T,
1317
+ lastLoginAt: M
1176
1318
  });
1177
- return Ie && Array.isArray(Ie) && (Te.providerData = Ie.map((Qt) => Object.assign({}, Qt))), g && (Te._redirectEventId = g), Te;
1319
+ return Se && Array.isArray(Se) && (Re.providerData = Se.map((an) => Object.assign({}, an))), v && (Re._redirectEventId = v), Re;
1178
1320
  }
1179
1321
  /**
1180
1322
  * Initialize a User from an idToken server response
@@ -1182,15 +1324,15 @@ class b {
1182
1324
  * @param idTokenResponse
1183
1325
  */
1184
1326
  static async _fromIdTokenResponse(e, t, i = !1) {
1185
- const r = new $();
1327
+ const r = new B();
1186
1328
  r.updateFromServerResponse(t);
1187
- const s = new b({
1329
+ const s = new C({
1188
1330
  uid: t.localId,
1189
1331
  auth: e,
1190
1332
  stsTokenManager: r,
1191
1333
  isAnonymous: i
1192
1334
  });
1193
- return await le(s), s;
1335
+ return await _e(s), s;
1194
1336
  }
1195
1337
  /**
1196
1338
  * Initialize a User from an idToken server response
@@ -1204,9 +1346,9 @@ class b {
1204
1346
  "internal-error"
1205
1347
  /* AuthErrorCode.INTERNAL_ERROR */
1206
1348
  );
1207
- const s = r.providerUserInfo !== void 0 ? Rt(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new $();
1349
+ const s = r.providerUserInfo !== void 0 ? Ut(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new B();
1208
1350
  c.updateFromIdToken(i);
1209
- const a = new b({
1351
+ const a = new C({
1210
1352
  uid: r.localId,
1211
1353
  auth: e,
1212
1354
  stsTokenManager: c,
@@ -1220,7 +1362,7 @@ class b {
1220
1362
  phoneNumber: r.phoneNumber || null,
1221
1363
  tenantId: r.tenantId || null,
1222
1364
  providerData: s,
1223
- metadata: new Ae(r.createdAt, r.lastLoginAt),
1365
+ metadata: new Me(r.createdAt, r.lastLoginAt),
1224
1366
  isAnonymous: !(r.email && r.passwordHash) && !(s != null && s.length)
1225
1367
  };
1226
1368
  return Object.assign(a, l), a;
@@ -1242,11 +1384,11 @@ class b {
1242
1384
  * See the License for the specific language governing permissions and
1243
1385
  * limitations under the License.
1244
1386
  */
1245
- const Xe = /* @__PURE__ */ new Map();
1246
- function S(n) {
1247
- A(n instanceof Function, "Expected a class definition");
1248
- let e = Xe.get(n);
1249
- return e ? (A(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Xe.set(n, e), e);
1387
+ const rt = /* @__PURE__ */ new Map();
1388
+ function N(n) {
1389
+ L(n instanceof Function, "Expected a class definition");
1390
+ let e = rt.get(n);
1391
+ return e ? (L(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), rt.set(n, e), e);
1250
1392
  }
1251
1393
  /**
1252
1394
  * @license
@@ -1264,7 +1406,7 @@ function S(n) {
1264
1406
  * See the License for the specific language governing permissions and
1265
1407
  * limitations under the License.
1266
1408
  */
1267
- class At {
1409
+ class Dt {
1268
1410
  constructor() {
1269
1411
  this.type = "NONE", this.storage = {};
1270
1412
  }
@@ -1286,8 +1428,8 @@ class At {
1286
1428
  _removeListener(e, t) {
1287
1429
  }
1288
1430
  }
1289
- At.type = "NONE";
1290
- const Qe = At;
1431
+ Dt.type = "NONE";
1432
+ const st = Dt;
1291
1433
  /**
1292
1434
  * @license
1293
1435
  * Copyright 2019 Google LLC
@@ -1304,21 +1446,21 @@ const Qe = At;
1304
1446
  * See the License for the specific language governing permissions and
1305
1447
  * limitations under the License.
1306
1448
  */
1307
- function se(n, e, t) {
1449
+ function de(n, e, t) {
1308
1450
  return `firebase:${n}:${e}:${t}`;
1309
1451
  }
1310
- class H {
1452
+ class z {
1311
1453
  constructor(e, t, i) {
1312
1454
  this.persistence = e, this.auth = t, this.userKey = i;
1313
1455
  const { config: r, name: s } = this.auth;
1314
- this.fullUserKey = se(this.userKey, r.apiKey, s), this.fullPersistenceKey = se("persistence", r.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
1456
+ this.fullUserKey = de(this.userKey, r.apiKey, s), this.fullPersistenceKey = de("persistence", r.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
1315
1457
  }
1316
1458
  setCurrentUser(e) {
1317
1459
  return this.persistence._set(this.fullUserKey, e.toJSON());
1318
1460
  }
1319
1461
  async getCurrentUser() {
1320
1462
  const e = await this.persistence._get(this.fullUserKey);
1321
- return e ? b._fromJSON(this.auth, e) : null;
1463
+ return e ? C._fromJSON(this.auth, e) : null;
1322
1464
  }
1323
1465
  removeCurrentUser() {
1324
1466
  return this.persistence._remove(this.fullUserKey);
@@ -1338,32 +1480,32 @@ class H {
1338
1480
  }
1339
1481
  static async create(e, t, i = "authUser") {
1340
1482
  if (!t.length)
1341
- return new H(S(Qe), e, i);
1483
+ return new z(N(st), e, i);
1342
1484
  const r = (await Promise.all(t.map(async (l) => {
1343
1485
  if (await l._isAvailable())
1344
1486
  return l;
1345
1487
  }))).filter((l) => l);
1346
- let s = r[0] || S(Qe);
1347
- const o = se(i, e.config.apiKey, e.name);
1488
+ let s = r[0] || N(st);
1489
+ const o = de(i, e.config.apiKey, e.name);
1348
1490
  let c = null;
1349
1491
  for (const l of t)
1350
1492
  try {
1351
1493
  const d = await l._get(o);
1352
1494
  if (d) {
1353
- const h = b._fromJSON(e, d);
1495
+ const h = C._fromJSON(e, d);
1354
1496
  l !== s && (c = h), s = l;
1355
1497
  break;
1356
1498
  }
1357
1499
  } catch {
1358
1500
  }
1359
1501
  const a = r.filter((l) => l._shouldAllowMigration);
1360
- return !s._shouldAllowMigration || !a.length ? new H(s, e, i) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (l) => {
1502
+ return !s._shouldAllowMigration || !a.length ? new z(s, e, i) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (l) => {
1361
1503
  if (l !== s)
1362
1504
  try {
1363
1505
  await l._remove(o);
1364
1506
  } catch {
1365
1507
  }
1366
- })), new H(s, e, i));
1508
+ })), new z(s, e, i));
1367
1509
  }
1368
1510
  }
1369
1511
  /**
@@ -1382,29 +1524,29 @@ class H {
1382
1524
  * See the License for the specific language governing permissions and
1383
1525
  * limitations under the License.
1384
1526
  */
1385
- function Ze(n) {
1527
+ function ot(n) {
1386
1528
  const e = n.toLowerCase();
1387
1529
  if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
1388
1530
  return "Opera";
1389
- if (Ot(e))
1531
+ if (Vt(e))
1390
1532
  return "IEMobile";
1391
1533
  if (e.includes("msie") || e.includes("trident/"))
1392
1534
  return "IE";
1393
1535
  if (e.includes("edge/"))
1394
1536
  return "Edge";
1395
- if (Pt(e))
1537
+ if (xt(e))
1396
1538
  return "Firefox";
1397
1539
  if (e.includes("silk/"))
1398
1540
  return "Silk";
1399
- if (Lt(e))
1541
+ if (Ht(e))
1400
1542
  return "Blackberry";
1401
- if (Mt(e))
1543
+ if (jt(e))
1402
1544
  return "Webos";
1403
- if (De(e))
1545
+ if (Ge(e))
1404
1546
  return "Safari";
1405
- if ((e.includes("chrome/") || Ct(e)) && !e.includes("edge/"))
1547
+ if ((e.includes("chrome/") || Ft(e)) && !e.includes("edge/"))
1406
1548
  return "Chrome";
1407
- if (Nt(e))
1549
+ if ($t(e))
1408
1550
  return "Android";
1409
1551
  {
1410
1552
  const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, i = n.match(t);
@@ -1413,42 +1555,42 @@ function Ze(n) {
1413
1555
  }
1414
1556
  return "Other";
1415
1557
  }
1416
- function Pt(n = _()) {
1558
+ function xt(n = y()) {
1417
1559
  return /firefox\//i.test(n);
1418
1560
  }
1419
- function De(n = _()) {
1561
+ function Ge(n = y()) {
1420
1562
  const e = n.toLowerCase();
1421
1563
  return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
1422
1564
  }
1423
- function Ct(n = _()) {
1565
+ function Ft(n = y()) {
1424
1566
  return /crios\//i.test(n);
1425
1567
  }
1426
- function Ot(n = _()) {
1568
+ function Vt(n = y()) {
1427
1569
  return /iemobile/i.test(n);
1428
1570
  }
1429
- function Nt(n = _()) {
1571
+ function $t(n = y()) {
1430
1572
  return /android/i.test(n);
1431
1573
  }
1432
- function Lt(n = _()) {
1574
+ function Ht(n = y()) {
1433
1575
  return /blackberry/i.test(n);
1434
1576
  }
1435
- function Mt(n = _()) {
1577
+ function jt(n = y()) {
1436
1578
  return /webos/i.test(n);
1437
1579
  }
1438
- function pe(n = _()) {
1580
+ function Te(n = y()) {
1439
1581
  return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
1440
1582
  }
1441
- function Xn(n = _()) {
1583
+ function yi(n = y()) {
1442
1584
  var e;
1443
- return pe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1585
+ return Te(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1444
1586
  }
1445
- function Qn() {
1446
- return kn() && document.documentMode === 10;
1587
+ function wi() {
1588
+ return Pn() && document.documentMode === 10;
1447
1589
  }
1448
- function Ut(n = _()) {
1449
- return pe(n) || Nt(n) || Mt(n) || Lt(n) || /windows phone/i.test(n) || Ot(n);
1590
+ function Wt(n = y()) {
1591
+ return Te(n) || $t(n) || jt(n) || Ht(n) || /windows phone/i.test(n) || Vt(n);
1450
1592
  }
1451
- function Zn() {
1593
+ function Ti() {
1452
1594
  try {
1453
1595
  return !!(window && window !== window.top);
1454
1596
  } catch {
@@ -1471,20 +1613,20 @@ function Zn() {
1471
1613
  * See the License for the specific language governing permissions and
1472
1614
  * limitations under the License.
1473
1615
  */
1474
- function Dt(n, e = []) {
1616
+ function Gt(n, e = []) {
1475
1617
  let t;
1476
1618
  switch (n) {
1477
1619
  case "Browser":
1478
- t = Ze(_());
1620
+ t = ot(y());
1479
1621
  break;
1480
1622
  case "Worker":
1481
- t = `${Ze(_())}-${n}`;
1623
+ t = `${ot(y())}-${n}`;
1482
1624
  break;
1483
1625
  default:
1484
1626
  t = n;
1485
1627
  }
1486
1628
  const i = e.length ? e.join(",") : "FirebaseCore-web";
1487
- return `${t}/JsCore/${J}/${i}`;
1629
+ return `${t}/JsCore/${re}/${i}`;
1488
1630
  }
1489
1631
  /**
1490
1632
  * @license
@@ -1502,7 +1644,7 @@ function Dt(n, e = []) {
1502
1644
  * See the License for the specific language governing permissions and
1503
1645
  * limitations under the License.
1504
1646
  */
1505
- class ei {
1647
+ class ki {
1506
1648
  constructor(e) {
1507
1649
  this.auth = e, this.queue = [];
1508
1650
  }
@@ -1557,8 +1699,8 @@ class ei {
1557
1699
  * See the License for the specific language governing permissions and
1558
1700
  * limitations under the License.
1559
1701
  */
1560
- async function ti(n, e = {}) {
1561
- return G(n, "GET", "/v2/passwordPolicy", fe(n, e));
1702
+ async function Ei(n, e = {}) {
1703
+ return J(n, "GET", "/v2/passwordPolicy", we(n, e));
1562
1704
  }
1563
1705
  /**
1564
1706
  * @license
@@ -1576,12 +1718,12 @@ async function ti(n, e = {}) {
1576
1718
  * See the License for the specific language governing permissions and
1577
1719
  * limitations under the License.
1578
1720
  */
1579
- const ni = 6;
1580
- class ii {
1721
+ const bi = 6;
1722
+ class Si {
1581
1723
  constructor(e) {
1582
1724
  var t, i, r, s;
1583
1725
  const o = e.customStrengthOptions;
1584
- this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : ni, o.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = o.maxPasswordLength), o.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = o.containsLowercaseCharacter), o.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = o.containsUppercaseCharacter), o.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = o.containsNumericCharacter), o.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = o.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (r = (i = e.allowedNonAlphanumericCharacters) === null || i === void 0 ? void 0 : i.join("")) !== null && r !== void 0 ? r : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
1726
+ this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : bi, o.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = o.maxPasswordLength), o.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = o.containsLowercaseCharacter), o.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = o.containsUppercaseCharacter), o.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = o.containsNumericCharacter), o.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = o.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (r = (i = e.allowedNonAlphanumericCharacters) === null || i === void 0 ? void 0 : i.join("")) !== null && r !== void 0 ? r : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
1585
1727
  }
1586
1728
  validatePassword(e) {
1587
1729
  var t, i, r, s, o, c;
@@ -1664,14 +1806,14 @@ class ii {
1664
1806
  * See the License for the specific language governing permissions and
1665
1807
  * limitations under the License.
1666
1808
  */
1667
- class ri {
1809
+ class Ri {
1668
1810
  constructor(e, t, i, r) {
1669
- this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new et(this), this.idTokenSubscription = new et(this), this.beforeStateQueue = new ei(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = Tt, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = r.sdkClientVersion;
1811
+ this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new at(this), this.idTokenSubscription = new at(this), this.beforeStateQueue = new ki(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = At, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = r.sdkClientVersion;
1670
1812
  }
1671
1813
  _initializeWithPersistence(e, t) {
1672
- return t && (this._popupRedirectResolver = S(t)), this._initializationPromise = this.queue(async () => {
1814
+ return t && (this._popupRedirectResolver = N(t)), this._initializationPromise = this.queue(async () => {
1673
1815
  var i, r;
1674
- if (!this._deleted && (this.persistenceManager = await H.create(this, e), !this._deleted)) {
1816
+ if (!this._deleted && (this.persistenceManager = await z.create(this, e), !this._deleted)) {
1675
1817
  if (!((i = this._popupRedirectResolver) === null || i === void 0) && i._shouldInitProactively)
1676
1818
  try {
1677
1819
  await this._popupRedirectResolver._initialize(this);
@@ -1702,7 +1844,7 @@ class ri {
1702
1844
  }
1703
1845
  async initializeCurrentUserFromIdToken(e) {
1704
1846
  try {
1705
- const t = await St(this, { idToken: e }), i = await b._fromGetAccountInfoResponse(this, t, e);
1847
+ const t = await Mt(this, { idToken: e }), i = await C._fromGetAccountInfoResponse(this, t, e);
1706
1848
  await this.directlySetCurrentUser(i);
1707
1849
  } catch (t) {
1708
1850
  console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
@@ -1710,7 +1852,7 @@ class ri {
1710
1852
  }
1711
1853
  async initializeCurrentUser(e) {
1712
1854
  var t;
1713
- if (E(this.app)) {
1855
+ if (A(this.app)) {
1714
1856
  const o = this.app.settings.authIdToken;
1715
1857
  return o ? new Promise((c) => {
1716
1858
  setTimeout(() => this.initializeCurrentUserFromIdToken(o).then(c, c));
@@ -1752,7 +1894,7 @@ class ri {
1752
1894
  }
1753
1895
  async reloadAndSetCurrentUserOrClear(e) {
1754
1896
  try {
1755
- await le(e);
1897
+ await _e(e);
1756
1898
  } catch (t) {
1757
1899
  if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
1758
1900
  return this.directlySetCurrentUser(null);
@@ -1760,15 +1902,15 @@ class ri {
1760
1902
  return this.directlySetCurrentUser(e);
1761
1903
  }
1762
1904
  useDeviceLanguage() {
1763
- this.languageCode = Vn();
1905
+ this.languageCode = ci();
1764
1906
  }
1765
1907
  async _delete() {
1766
1908
  this._deleted = !0;
1767
1909
  }
1768
1910
  async updateCurrentUser(e) {
1769
- if (E(this.app))
1770
- return Promise.reject(M(this));
1771
- const t = e ? j(e) : null;
1911
+ if (A(this.app))
1912
+ return Promise.reject($(this));
1913
+ const t = e ? K(e) : null;
1772
1914
  return t && u(
1773
1915
  t.auth.config.apiKey === this.config.apiKey,
1774
1916
  this,
@@ -1788,15 +1930,15 @@ class ri {
1788
1930
  });
1789
1931
  }
1790
1932
  async signOut() {
1791
- return E(this.app) ? Promise.reject(M(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
1933
+ return A(this.app) ? Promise.reject($(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
1792
1934
  null,
1793
1935
  /* skipBeforeStateCallbacks */
1794
1936
  !0
1795
1937
  ));
1796
1938
  }
1797
1939
  setPersistence(e) {
1798
- return E(this.app) ? Promise.reject(M(this)) : this.queue(async () => {
1799
- await this.assertedPersistence.setPersistence(S(e));
1940
+ return A(this.app) ? Promise.reject($(this)) : this.queue(async () => {
1941
+ await this.assertedPersistence.setPersistence(N(e));
1800
1942
  });
1801
1943
  }
1802
1944
  _getRecaptchaConfig() {
@@ -1811,14 +1953,14 @@ class ri {
1811
1953
  return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
1812
1954
  }
1813
1955
  async _updatePasswordPolicy() {
1814
- const e = await ti(this), t = new ii(e);
1956
+ const e = await Ei(this), t = new Si(e);
1815
1957
  this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
1816
1958
  }
1817
1959
  _getPersistence() {
1818
1960
  return this.assertedPersistence.persistence.type;
1819
1961
  }
1820
1962
  _updateErrorMap(e) {
1821
- this._errorFactory = new Ce("auth", "Firebase", e());
1963
+ this._errorFactory = new Fe("auth", "Firebase", e());
1822
1964
  }
1823
1965
  onAuthStateChanged(e, t, i) {
1824
1966
  return this.registerStateListener(this.authStateSubscription, e, t, i);
@@ -1851,7 +1993,7 @@ class ri {
1851
1993
  token: e,
1852
1994
  idToken: t
1853
1995
  };
1854
- this.tenantId != null && (i.tenantId = this.tenantId), await Yn(this, i);
1996
+ this.tenantId != null && (i.tenantId = this.tenantId), await Ii(this, i);
1855
1997
  }
1856
1998
  }
1857
1999
  toJSON() {
@@ -1869,15 +2011,15 @@ class ri {
1869
2011
  }
1870
2012
  async getOrInitRedirectPersistenceManager(e) {
1871
2013
  if (!this.redirectPersistenceManager) {
1872
- const t = e && S(e) || this._popupRedirectResolver;
2014
+ const t = e && N(e) || this._popupRedirectResolver;
1873
2015
  u(
1874
2016
  t,
1875
2017
  this,
1876
2018
  "argument-error"
1877
2019
  /* AuthErrorCode.ARGUMENT_ERROR */
1878
- ), this.redirectPersistenceManager = await H.create(
2020
+ ), this.redirectPersistenceManager = await z.create(
1879
2021
  this,
1880
- [S(t._redirectPersistence)],
2022
+ [N(t._redirectPersistence)],
1881
2023
  "redirectUser"
1882
2024
  /* KeyName.REDIRECT_USER */
1883
2025
  ), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
@@ -1964,7 +2106,7 @@ class ri {
1964
2106
  ), this.persistenceManager;
1965
2107
  }
1966
2108
  _logFramework(e) {
1967
- !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Dt(this.config.clientPlatform, this._getFrameworks()));
2109
+ !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Gt(this.config.clientPlatform, this._getFrameworks()));
1968
2110
  }
1969
2111
  _getFrameworks() {
1970
2112
  return this.frameworks;
@@ -1994,15 +2136,15 @@ class ri {
1994
2136
  async _getAppCheckToken() {
1995
2137
  var e;
1996
2138
  const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
1997
- return t != null && t.error && Dn(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
2139
+ return t != null && t.error && si(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
1998
2140
  }
1999
2141
  }
2000
- function me(n) {
2001
- return j(n);
2142
+ function ke(n) {
2143
+ return K(n);
2002
2144
  }
2003
- class et {
2145
+ class at {
2004
2146
  constructor(e) {
2005
- this.auth = e, this.observer = null, this.addObserver = In((t) => this.observer = t);
2147
+ this.auth = e, this.observer = null, this.addObserver = En((t) => this.observer = t);
2006
2148
  }
2007
2149
  get next() {
2008
2150
  return u(
@@ -2029,7 +2171,7 @@ class et {
2029
2171
  * See the License for the specific language governing permissions and
2030
2172
  * limitations under the License.
2031
2173
  */
2032
- let Fe = {
2174
+ let Be = {
2033
2175
  async loadJS() {
2034
2176
  throw new Error("Unable to load external scripts");
2035
2177
  },
@@ -2037,16 +2179,16 @@ let Fe = {
2037
2179
  recaptchaEnterpriseScript: "",
2038
2180
  gapiScript: ""
2039
2181
  };
2040
- function si(n) {
2041
- Fe = n;
2182
+ function Ai(n) {
2183
+ Be = n;
2042
2184
  }
2043
- function oi(n) {
2044
- return Fe.loadJS(n);
2185
+ function Pi(n) {
2186
+ return Be.loadJS(n);
2045
2187
  }
2046
- function ai() {
2047
- return Fe.gapiScript;
2188
+ function Ci() {
2189
+ return Be.gapiScript;
2048
2190
  }
2049
- function ci(n) {
2191
+ function Ni(n) {
2050
2192
  return `__${n}${Math.floor(Math.random() * 1e6)}`;
2051
2193
  }
2052
2194
  /**
@@ -2065,13 +2207,13 @@ function ci(n) {
2065
2207
  * See the License for the specific language governing permissions and
2066
2208
  * limitations under the License.
2067
2209
  */
2068
- function li(n, e) {
2069
- const t = _t(n, "auth");
2210
+ function Oi(n, e) {
2211
+ const t = Et(n, "auth");
2070
2212
  if (t.isInitialized()) {
2071
2213
  const r = t.getImmediate(), s = t.getOptions();
2072
- if (wn(s, e ?? {}))
2214
+ if (Rn(s, e ?? {}))
2073
2215
  return r;
2074
- R(
2216
+ O(
2075
2217
  r,
2076
2218
  "already-initialized"
2077
2219
  /* AuthErrorCode.ALREADY_INITIALIZED */
@@ -2079,12 +2221,12 @@ function li(n, e) {
2079
2221
  }
2080
2222
  return t.initialize({ options: e });
2081
2223
  }
2082
- function ui(n, e) {
2083
- const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(S);
2224
+ function Li(n, e) {
2225
+ const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(N);
2084
2226
  e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
2085
2227
  }
2086
- function di(n, e, t) {
2087
- const i = me(n);
2228
+ function Mi(n, e, t) {
2229
+ const i = ke(n);
2088
2230
  u(
2089
2231
  i._canInitEmulator,
2090
2232
  i,
@@ -2096,38 +2238,38 @@ function di(n, e, t) {
2096
2238
  "invalid-emulator-scheme"
2097
2239
  /* AuthErrorCode.INVALID_EMULATOR_SCHEME */
2098
2240
  );
2099
- const r = !1, s = Ft(e), { host: o, port: c } = hi(e), a = c === null ? "" : `:${c}`;
2241
+ const r = !1, s = Bt(e), { host: o, port: c } = Ui(e), a = c === null ? "" : `:${c}`;
2100
2242
  i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
2101
2243
  host: o,
2102
2244
  port: c,
2103
2245
  protocol: s.replace(":", ""),
2104
2246
  options: Object.freeze({ disableWarnings: r })
2105
- }), fi();
2247
+ }), Di();
2106
2248
  }
2107
- function Ft(n) {
2249
+ function Bt(n) {
2108
2250
  const e = n.indexOf(":");
2109
2251
  return e < 0 ? "" : n.substr(0, e + 1);
2110
2252
  }
2111
- function hi(n) {
2112
- const e = Ft(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2253
+ function Ui(n) {
2254
+ const e = Bt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2113
2255
  if (!t)
2114
2256
  return { host: "", port: null };
2115
2257
  const i = t[2].split("@").pop() || "", r = /^(\[[^\]]+\])(:|$)/.exec(i);
2116
2258
  if (r) {
2117
2259
  const s = r[1];
2118
- return { host: s, port: tt(i.substr(s.length + 1)) };
2260
+ return { host: s, port: ct(i.substr(s.length + 1)) };
2119
2261
  } else {
2120
2262
  const [s, o] = i.split(":");
2121
- return { host: s, port: tt(o) };
2263
+ return { host: s, port: ct(o) };
2122
2264
  }
2123
2265
  }
2124
- function tt(n) {
2266
+ function ct(n) {
2125
2267
  if (!n)
2126
2268
  return null;
2127
2269
  const e = Number(n);
2128
2270
  return isNaN(e) ? null : e;
2129
2271
  }
2130
- function fi() {
2272
+ function Di() {
2131
2273
  function n() {
2132
2274
  const e = document.createElement("p"), t = e.style;
2133
2275
  e.innerText = "Running in emulator mode. Do not use with production credentials.", t.position = "fixed", t.width = "100%", t.backgroundColor = "#ffffff", t.border = ".1em solid #000000", t.color = "#b50000", t.bottom = "0px", t.left = "0px", t.margin = "0px", t.zIndex = "10000", t.textAlign = "center", e.classList.add("firebase-emulator-warning"), document.body.appendChild(e);
@@ -2150,7 +2292,7 @@ function fi() {
2150
2292
  * See the License for the specific language governing permissions and
2151
2293
  * limitations under the License.
2152
2294
  */
2153
- class xt {
2295
+ class zt {
2154
2296
  /** @internal */
2155
2297
  constructor(e, t) {
2156
2298
  this.providerId = e, this.signInMethod = t;
@@ -2161,19 +2303,19 @@ class xt {
2161
2303
  * @returns a JSON-serializable representation of this object.
2162
2304
  */
2163
2305
  toJSON() {
2164
- return k("not implemented");
2306
+ return P("not implemented");
2165
2307
  }
2166
2308
  /** @internal */
2167
2309
  _getIdTokenResponse(e) {
2168
- return k("not implemented");
2310
+ return P("not implemented");
2169
2311
  }
2170
2312
  /** @internal */
2171
2313
  _linkToIdToken(e, t) {
2172
- return k("not implemented");
2314
+ return P("not implemented");
2173
2315
  }
2174
2316
  /** @internal */
2175
2317
  _getReauthenticationResolver(e) {
2176
- return k("not implemented");
2318
+ return P("not implemented");
2177
2319
  }
2178
2320
  }
2179
2321
  /**
@@ -2192,8 +2334,8 @@ class xt {
2192
2334
  * See the License for the specific language governing permissions and
2193
2335
  * limitations under the License.
2194
2336
  */
2195
- async function W(n, e) {
2196
- return kt(n, "POST", "/v1/accounts:signInWithIdp", fe(n, e));
2337
+ async function q(n, e) {
2338
+ return Ot(n, "POST", "/v1/accounts:signInWithIdp", we(n, e));
2197
2339
  }
2198
2340
  /**
2199
2341
  * @license
@@ -2211,15 +2353,15 @@ async function W(n, e) {
2211
2353
  * See the License for the specific language governing permissions and
2212
2354
  * limitations under the License.
2213
2355
  */
2214
- const pi = "http://localhost";
2215
- class D extends xt {
2356
+ const xi = "http://localhost";
2357
+ class j extends zt {
2216
2358
  constructor() {
2217
2359
  super(...arguments), this.pendingToken = null;
2218
2360
  }
2219
2361
  /** @internal */
2220
2362
  static _fromParams(e) {
2221
- const t = new D(e.providerId, e.signInMethod);
2222
- return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : R(
2363
+ const t = new j(e.providerId, e.signInMethod);
2364
+ return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : O(
2223
2365
  "argument-error"
2224
2366
  /* AuthErrorCode.ARGUMENT_ERROR */
2225
2367
  ), t;
@@ -2246,37 +2388,37 @@ class D extends xt {
2246
2388
  * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
2247
2389
  */
2248
2390
  static fromJSON(e) {
2249
- const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Ne(t, ["providerId", "signInMethod"]);
2391
+ const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = $e(t, ["providerId", "signInMethod"]);
2250
2392
  if (!i || !r)
2251
2393
  return null;
2252
- const o = new D(i, r);
2394
+ const o = new j(i, r);
2253
2395
  return o.idToken = s.idToken || void 0, o.accessToken = s.accessToken || void 0, o.secret = s.secret, o.nonce = s.nonce, o.pendingToken = s.pendingToken || null, o;
2254
2396
  }
2255
2397
  /** @internal */
2256
2398
  _getIdTokenResponse(e) {
2257
2399
  const t = this.buildRequest();
2258
- return W(e, t);
2400
+ return q(e, t);
2259
2401
  }
2260
2402
  /** @internal */
2261
2403
  _linkToIdToken(e, t) {
2262
2404
  const i = this.buildRequest();
2263
- return i.idToken = t, W(e, i);
2405
+ return i.idToken = t, q(e, i);
2264
2406
  }
2265
2407
  /** @internal */
2266
2408
  _getReauthenticationResolver(e) {
2267
2409
  const t = this.buildRequest();
2268
- return t.autoCreate = !1, W(e, t);
2410
+ return t.autoCreate = !1, q(e, t);
2269
2411
  }
2270
2412
  buildRequest() {
2271
2413
  const e = {
2272
- requestUri: pi,
2414
+ requestUri: xi,
2273
2415
  returnSecureToken: !0
2274
2416
  };
2275
2417
  if (this.pendingToken)
2276
2418
  e.pendingToken = this.pendingToken;
2277
2419
  else {
2278
2420
  const t = {};
2279
- this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = Y(t);
2421
+ this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = se(t);
2280
2422
  }
2281
2423
  return e;
2282
2424
  }
@@ -2297,7 +2439,7 @@ class D extends xt {
2297
2439
  * See the License for the specific language governing permissions and
2298
2440
  * limitations under the License.
2299
2441
  */
2300
- class Vt {
2442
+ class qt {
2301
2443
  /**
2302
2444
  * Constructor for generic OAuth providers.
2303
2445
  *
@@ -2350,7 +2492,7 @@ class Vt {
2350
2492
  * See the License for the specific language governing permissions and
2351
2493
  * limitations under the License.
2352
2494
  */
2353
- class Q extends Vt {
2495
+ class ae extends qt {
2354
2496
  constructor() {
2355
2497
  super(...arguments), this.scopes = [];
2356
2498
  }
@@ -2385,7 +2527,7 @@ class Q extends Vt {
2385
2527
  * See the License for the specific language governing permissions and
2386
2528
  * limitations under the License.
2387
2529
  */
2388
- class C extends Q {
2530
+ class D extends ae {
2389
2531
  constructor() {
2390
2532
  super(
2391
2533
  "facebook.com"
@@ -2405,9 +2547,9 @@ class C extends Q {
2405
2547
  * @param accessToken - Facebook access token.
2406
2548
  */
2407
2549
  static credential(e) {
2408
- return D._fromParams({
2409
- providerId: C.PROVIDER_ID,
2410
- signInMethod: C.FACEBOOK_SIGN_IN_METHOD,
2550
+ return j._fromParams({
2551
+ providerId: D.PROVIDER_ID,
2552
+ signInMethod: D.FACEBOOK_SIGN_IN_METHOD,
2411
2553
  accessToken: e
2412
2554
  });
2413
2555
  }
@@ -2417,7 +2559,7 @@ class C extends Q {
2417
2559
  * @param userCredential - The user credential.
2418
2560
  */
2419
2561
  static credentialFromResult(e) {
2420
- return C.credentialFromTaggedObject(e);
2562
+ return D.credentialFromTaggedObject(e);
2421
2563
  }
2422
2564
  /**
2423
2565
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2426,20 +2568,20 @@ class C extends Q {
2426
2568
  * @param userCredential - The user credential.
2427
2569
  */
2428
2570
  static credentialFromError(e) {
2429
- return C.credentialFromTaggedObject(e.customData || {});
2571
+ return D.credentialFromTaggedObject(e.customData || {});
2430
2572
  }
2431
2573
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2432
2574
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
2433
2575
  return null;
2434
2576
  try {
2435
- return C.credential(e.oauthAccessToken);
2577
+ return D.credential(e.oauthAccessToken);
2436
2578
  } catch {
2437
2579
  return null;
2438
2580
  }
2439
2581
  }
2440
2582
  }
2441
- C.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
2442
- C.PROVIDER_ID = "facebook.com";
2583
+ D.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
2584
+ D.PROVIDER_ID = "facebook.com";
2443
2585
  /**
2444
2586
  * @license
2445
2587
  * Copyright 2020 Google LLC
@@ -2456,7 +2598,7 @@ C.PROVIDER_ID = "facebook.com";
2456
2598
  * See the License for the specific language governing permissions and
2457
2599
  * limitations under the License.
2458
2600
  */
2459
- class O extends Q {
2601
+ class x extends ae {
2460
2602
  constructor() {
2461
2603
  super(
2462
2604
  "google.com"
@@ -2477,9 +2619,9 @@ class O extends Q {
2477
2619
  * @param accessToken - Google access token.
2478
2620
  */
2479
2621
  static credential(e, t) {
2480
- return D._fromParams({
2481
- providerId: O.PROVIDER_ID,
2482
- signInMethod: O.GOOGLE_SIGN_IN_METHOD,
2622
+ return j._fromParams({
2623
+ providerId: x.PROVIDER_ID,
2624
+ signInMethod: x.GOOGLE_SIGN_IN_METHOD,
2483
2625
  idToken: e,
2484
2626
  accessToken: t
2485
2627
  });
@@ -2490,7 +2632,7 @@ class O extends Q {
2490
2632
  * @param userCredential - The user credential.
2491
2633
  */
2492
2634
  static credentialFromResult(e) {
2493
- return O.credentialFromTaggedObject(e);
2635
+ return x.credentialFromTaggedObject(e);
2494
2636
  }
2495
2637
  /**
2496
2638
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2499,7 +2641,7 @@ class O extends Q {
2499
2641
  * @param userCredential - The user credential.
2500
2642
  */
2501
2643
  static credentialFromError(e) {
2502
- return O.credentialFromTaggedObject(e.customData || {});
2644
+ return x.credentialFromTaggedObject(e.customData || {});
2503
2645
  }
2504
2646
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2505
2647
  if (!e)
@@ -2508,14 +2650,14 @@ class O extends Q {
2508
2650
  if (!t && !i)
2509
2651
  return null;
2510
2652
  try {
2511
- return O.credential(t, i);
2653
+ return x.credential(t, i);
2512
2654
  } catch {
2513
2655
  return null;
2514
2656
  }
2515
2657
  }
2516
2658
  }
2517
- O.GOOGLE_SIGN_IN_METHOD = "google.com";
2518
- O.PROVIDER_ID = "google.com";
2659
+ x.GOOGLE_SIGN_IN_METHOD = "google.com";
2660
+ x.PROVIDER_ID = "google.com";
2519
2661
  /**
2520
2662
  * @license
2521
2663
  * Copyright 2020 Google LLC
@@ -2532,7 +2674,7 @@ O.PROVIDER_ID = "google.com";
2532
2674
  * See the License for the specific language governing permissions and
2533
2675
  * limitations under the License.
2534
2676
  */
2535
- class N extends Q {
2677
+ class F extends ae {
2536
2678
  constructor() {
2537
2679
  super(
2538
2680
  "github.com"
@@ -2545,9 +2687,9 @@ class N extends Q {
2545
2687
  * @param accessToken - Github access token.
2546
2688
  */
2547
2689
  static credential(e) {
2548
- return D._fromParams({
2549
- providerId: N.PROVIDER_ID,
2550
- signInMethod: N.GITHUB_SIGN_IN_METHOD,
2690
+ return j._fromParams({
2691
+ providerId: F.PROVIDER_ID,
2692
+ signInMethod: F.GITHUB_SIGN_IN_METHOD,
2551
2693
  accessToken: e
2552
2694
  });
2553
2695
  }
@@ -2557,7 +2699,7 @@ class N extends Q {
2557
2699
  * @param userCredential - The user credential.
2558
2700
  */
2559
2701
  static credentialFromResult(e) {
2560
- return N.credentialFromTaggedObject(e);
2702
+ return F.credentialFromTaggedObject(e);
2561
2703
  }
2562
2704
  /**
2563
2705
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2566,20 +2708,20 @@ class N extends Q {
2566
2708
  * @param userCredential - The user credential.
2567
2709
  */
2568
2710
  static credentialFromError(e) {
2569
- return N.credentialFromTaggedObject(e.customData || {});
2711
+ return F.credentialFromTaggedObject(e.customData || {});
2570
2712
  }
2571
2713
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2572
2714
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
2573
2715
  return null;
2574
2716
  try {
2575
- return N.credential(e.oauthAccessToken);
2717
+ return F.credential(e.oauthAccessToken);
2576
2718
  } catch {
2577
2719
  return null;
2578
2720
  }
2579
2721
  }
2580
2722
  }
2581
- N.GITHUB_SIGN_IN_METHOD = "github.com";
2582
- N.PROVIDER_ID = "github.com";
2723
+ F.GITHUB_SIGN_IN_METHOD = "github.com";
2724
+ F.PROVIDER_ID = "github.com";
2583
2725
  /**
2584
2726
  * @license
2585
2727
  * Copyright 2020 Google LLC
@@ -2596,7 +2738,7 @@ N.PROVIDER_ID = "github.com";
2596
2738
  * See the License for the specific language governing permissions and
2597
2739
  * limitations under the License.
2598
2740
  */
2599
- class L extends Q {
2741
+ class V extends ae {
2600
2742
  constructor() {
2601
2743
  super(
2602
2744
  "twitter.com"
@@ -2610,9 +2752,9 @@ class L extends Q {
2610
2752
  * @param secret - Twitter secret.
2611
2753
  */
2612
2754
  static credential(e, t) {
2613
- return D._fromParams({
2614
- providerId: L.PROVIDER_ID,
2615
- signInMethod: L.TWITTER_SIGN_IN_METHOD,
2755
+ return j._fromParams({
2756
+ providerId: V.PROVIDER_ID,
2757
+ signInMethod: V.TWITTER_SIGN_IN_METHOD,
2616
2758
  oauthToken: e,
2617
2759
  oauthTokenSecret: t
2618
2760
  });
@@ -2623,7 +2765,7 @@ class L extends Q {
2623
2765
  * @param userCredential - The user credential.
2624
2766
  */
2625
2767
  static credentialFromResult(e) {
2626
- return L.credentialFromTaggedObject(e);
2768
+ return V.credentialFromTaggedObject(e);
2627
2769
  }
2628
2770
  /**
2629
2771
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2632,7 +2774,7 @@ class L extends Q {
2632
2774
  * @param userCredential - The user credential.
2633
2775
  */
2634
2776
  static credentialFromError(e) {
2635
- return L.credentialFromTaggedObject(e.customData || {});
2777
+ return V.credentialFromTaggedObject(e.customData || {});
2636
2778
  }
2637
2779
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2638
2780
  if (!e)
@@ -2641,14 +2783,14 @@ class L extends Q {
2641
2783
  if (!t || !i)
2642
2784
  return null;
2643
2785
  try {
2644
- return L.credential(t, i);
2786
+ return V.credential(t, i);
2645
2787
  } catch {
2646
2788
  return null;
2647
2789
  }
2648
2790
  }
2649
2791
  }
2650
- L.TWITTER_SIGN_IN_METHOD = "twitter.com";
2651
- L.PROVIDER_ID = "twitter.com";
2792
+ V.TWITTER_SIGN_IN_METHOD = "twitter.com";
2793
+ V.PROVIDER_ID = "twitter.com";
2652
2794
  /**
2653
2795
  * @license
2654
2796
  * Copyright 2020 Google LLC
@@ -2665,13 +2807,13 @@ L.PROVIDER_ID = "twitter.com";
2665
2807
  * See the License for the specific language governing permissions and
2666
2808
  * limitations under the License.
2667
2809
  */
2668
- class F {
2810
+ class W {
2669
2811
  constructor(e) {
2670
2812
  this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
2671
2813
  }
2672
2814
  static async _fromIdTokenResponse(e, t, i, r = !1) {
2673
- const s = await b._fromIdTokenResponse(e, i, r), o = nt(i);
2674
- return new F({
2815
+ const s = await C._fromIdTokenResponse(e, i, r), o = lt(i);
2816
+ return new W({
2675
2817
  user: s,
2676
2818
  providerId: o,
2677
2819
  _tokenResponse: i,
@@ -2684,8 +2826,8 @@ class F {
2684
2826
  /* reload */
2685
2827
  !0
2686
2828
  );
2687
- const r = nt(i);
2688
- return new F({
2829
+ const r = lt(i);
2830
+ return new W({
2689
2831
  user: e,
2690
2832
  providerId: r,
2691
2833
  _tokenResponse: i,
@@ -2693,7 +2835,7 @@ class F {
2693
2835
  });
2694
2836
  }
2695
2837
  }
2696
- function nt(n) {
2838
+ function lt(n) {
2697
2839
  return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
2698
2840
  }
2699
2841
  /**
@@ -2712,10 +2854,10 @@ function nt(n) {
2712
2854
  * See the License for the specific language governing permissions and
2713
2855
  * limitations under the License.
2714
2856
  */
2715
- class ue extends Oe {
2857
+ class ve extends Ve {
2716
2858
  constructor(e, t, i, r) {
2717
2859
  var s;
2718
- super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, ue.prototype), this.customData = {
2860
+ super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, ve.prototype), this.customData = {
2719
2861
  appName: e.name,
2720
2862
  tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
2721
2863
  _serverResponse: t.customData._serverResponse,
@@ -2723,17 +2865,17 @@ class ue extends Oe {
2723
2865
  };
2724
2866
  }
2725
2867
  static _fromErrorAndOperation(e, t, i, r) {
2726
- return new ue(e, t, i, r);
2868
+ return new ve(e, t, i, r);
2727
2869
  }
2728
2870
  }
2729
- function $t(n, e, t, i) {
2871
+ function Kt(n, e, t, i) {
2730
2872
  return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
2731
- throw s.code === "auth/multi-factor-auth-required" ? ue._fromErrorAndOperation(n, s, e, i) : s;
2873
+ throw s.code === "auth/multi-factor-auth-required" ? ve._fromErrorAndOperation(n, s, e, i) : s;
2732
2874
  });
2733
2875
  }
2734
- async function mi(n, e, t = !1) {
2735
- const i = await K(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2736
- return F._forOperation(n, "link", i);
2876
+ async function Fi(n, e, t = !1) {
2877
+ const i = await ie(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2878
+ return W._forOperation(n, "link", i);
2737
2879
  }
2738
2880
  /**
2739
2881
  * @license
@@ -2751,20 +2893,20 @@ async function mi(n, e, t = !1) {
2751
2893
  * See the License for the specific language governing permissions and
2752
2894
  * limitations under the License.
2753
2895
  */
2754
- async function gi(n, e, t = !1) {
2896
+ async function Vi(n, e, t = !1) {
2755
2897
  const { auth: i } = n;
2756
- if (E(i.app))
2757
- return Promise.reject(M(i));
2898
+ if (A(i.app))
2899
+ return Promise.reject($(i));
2758
2900
  const r = "reauthenticate";
2759
2901
  try {
2760
- const s = await K(n, $t(i, r, e, n), t);
2902
+ const s = await ie(n, Kt(i, r, e, n), t);
2761
2903
  u(
2762
2904
  s.idToken,
2763
2905
  i,
2764
2906
  "internal-error"
2765
2907
  /* AuthErrorCode.INTERNAL_ERROR */
2766
2908
  );
2767
- const o = Ue(s.idToken);
2909
+ const o = We(s.idToken);
2768
2910
  u(
2769
2911
  o,
2770
2912
  i,
@@ -2777,9 +2919,9 @@ async function gi(n, e, t = !1) {
2777
2919
  i,
2778
2920
  "user-mismatch"
2779
2921
  /* AuthErrorCode.USER_MISMATCH */
2780
- ), F._forOperation(n, r, s);
2922
+ ), W._forOperation(n, r, s);
2781
2923
  } catch (s) {
2782
- throw (s == null ? void 0 : s.code) === "auth/user-not-found" && R(
2924
+ throw (s == null ? void 0 : s.code) === "auth/user-not-found" && O(
2783
2925
  i,
2784
2926
  "user-mismatch"
2785
2927
  /* AuthErrorCode.USER_MISMATCH */
@@ -2802,10 +2944,10 @@ async function gi(n, e, t = !1) {
2802
2944
  * See the License for the specific language governing permissions and
2803
2945
  * limitations under the License.
2804
2946
  */
2805
- async function _i(n, e, t = !1) {
2806
- if (E(n.app))
2807
- return Promise.reject(M(n));
2808
- const i = "signIn", r = await $t(n, i, e), s = await F._fromIdTokenResponse(n, i, r);
2947
+ async function $i(n, e, t = !1) {
2948
+ if (A(n.app))
2949
+ return Promise.reject($(n));
2950
+ const i = "signIn", r = await Kt(n, i, e), s = await W._fromIdTokenResponse(n, i, r);
2809
2951
  return t || await n._updateCurrentUser(s.user), s;
2810
2952
  }
2811
2953
  /**
@@ -2824,8 +2966,8 @@ async function _i(n, e, t = !1) {
2824
2966
  * See the License for the specific language governing permissions and
2825
2967
  * limitations under the License.
2826
2968
  */
2827
- async function vi(n, e) {
2828
- return kt(n, "POST", "/v1/accounts:signInWithCustomToken", fe(n, e));
2969
+ async function Hi(n, e) {
2970
+ return Ot(n, "POST", "/v1/accounts:signInWithCustomToken", we(n, e));
2829
2971
  }
2830
2972
  /**
2831
2973
  * @license
@@ -2843,22 +2985,22 @@ async function vi(n, e) {
2843
2985
  * See the License for the specific language governing permissions and
2844
2986
  * limitations under the License.
2845
2987
  */
2846
- async function Ii(n, e) {
2847
- if (E(n.app))
2848
- return Promise.reject(M(n));
2849
- const t = me(n), i = await vi(t, {
2988
+ async function ji(n, e) {
2989
+ if (A(n.app))
2990
+ return Promise.reject($(n));
2991
+ const t = ke(n), i = await Hi(t, {
2850
2992
  token: e,
2851
2993
  returnSecureToken: !0
2852
- }), r = await F._fromIdTokenResponse(t, "signIn", i);
2994
+ }), r = await W._fromIdTokenResponse(t, "signIn", i);
2853
2995
  return await t._updateCurrentUser(r.user), r;
2854
2996
  }
2855
- function Ti(n, e, t, i) {
2856
- return j(n).onIdTokenChanged(e, t, i);
2997
+ function Wi(n, e, t, i) {
2998
+ return K(n).onIdTokenChanged(e, t, i);
2857
2999
  }
2858
- function yi(n, e, t) {
2859
- return j(n).beforeAuthStateChanged(e, t);
3000
+ function Gi(n, e, t) {
3001
+ return K(n).beforeAuthStateChanged(e, t);
2860
3002
  }
2861
- const de = "__sak";
3003
+ const Ie = "__sak";
2862
3004
  /**
2863
3005
  * @license
2864
3006
  * Copyright 2019 Google LLC
@@ -2875,13 +3017,13 @@ const de = "__sak";
2875
3017
  * See the License for the specific language governing permissions and
2876
3018
  * limitations under the License.
2877
3019
  */
2878
- class Ht {
3020
+ class Jt {
2879
3021
  constructor(e, t) {
2880
3022
  this.storageRetriever = e, this.type = t;
2881
3023
  }
2882
3024
  _isAvailable() {
2883
3025
  try {
2884
- return this.storage ? (this.storage.setItem(de, "1"), this.storage.removeItem(de), Promise.resolve(!0)) : Promise.resolve(!1);
3026
+ return this.storage ? (this.storage.setItem(Ie, "1"), this.storage.removeItem(Ie), Promise.resolve(!0)) : Promise.resolve(!1);
2885
3027
  } catch {
2886
3028
  return Promise.resolve(!1);
2887
3029
  }
@@ -2916,18 +3058,18 @@ class Ht {
2916
3058
  * See the License for the specific language governing permissions and
2917
3059
  * limitations under the License.
2918
3060
  */
2919
- function wi() {
2920
- const n = _();
2921
- return De(n) || pe(n);
3061
+ function Bi() {
3062
+ const n = y();
3063
+ return Ge(n) || Te(n);
2922
3064
  }
2923
- const Ei = 1e3, ki = 10;
2924
- class Wt extends Ht {
3065
+ const zi = 1e3, qi = 10;
3066
+ class Yt extends Jt {
2925
3067
  constructor() {
2926
3068
  super(
2927
3069
  () => window.localStorage,
2928
3070
  "LOCAL"
2929
3071
  /* PersistenceType.LOCAL */
2930
- ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = wi() && Zn(), this.fallbackToPolling = Ut(), this._shouldAllowMigration = !0;
3072
+ ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = Bi() && Ti(), this.fallbackToPolling = Wt(), this._shouldAllowMigration = !0;
2931
3073
  }
2932
3074
  forAllChangedKeys(e) {
2933
3075
  for (const t of Object.keys(this.listeners)) {
@@ -2954,7 +3096,7 @@ class Wt extends Ht {
2954
3096
  const o = this.storage.getItem(i);
2955
3097
  !t && this.localCache[i] === o || this.notifyListeners(i, o);
2956
3098
  }, s = this.storage.getItem(i);
2957
- Qn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, ki) : r();
3099
+ wi() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, qi) : r();
2958
3100
  }
2959
3101
  notifyListeners(e, t) {
2960
3102
  this.localCache[e] = t;
@@ -2976,7 +3118,7 @@ class Wt extends Ht {
2976
3118
  !0
2977
3119
  );
2978
3120
  });
2979
- }, Ei);
3121
+ }, zi);
2980
3122
  }
2981
3123
  stopPolling() {
2982
3124
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -3005,8 +3147,8 @@ class Wt extends Ht {
3005
3147
  await super._remove(e), delete this.localCache[e];
3006
3148
  }
3007
3149
  }
3008
- Wt.type = "LOCAL";
3009
- const bi = Wt;
3150
+ Yt.type = "LOCAL";
3151
+ const Ki = Yt;
3010
3152
  /**
3011
3153
  * @license
3012
3154
  * Copyright 2020 Google LLC
@@ -3023,7 +3165,7 @@ const bi = Wt;
3023
3165
  * See the License for the specific language governing permissions and
3024
3166
  * limitations under the License.
3025
3167
  */
3026
- class jt extends Ht {
3168
+ class Xt extends Jt {
3027
3169
  constructor() {
3028
3170
  super(
3029
3171
  () => window.sessionStorage,
@@ -3036,8 +3178,8 @@ class jt extends Ht {
3036
3178
  _removeListener(e, t) {
3037
3179
  }
3038
3180
  }
3039
- jt.type = "SESSION";
3040
- const Gt = jt;
3181
+ Xt.type = "SESSION";
3182
+ const Qt = Xt;
3041
3183
  /**
3042
3184
  * @license
3043
3185
  * Copyright 2019 Google LLC
@@ -3054,7 +3196,7 @@ const Gt = jt;
3054
3196
  * See the License for the specific language governing permissions and
3055
3197
  * limitations under the License.
3056
3198
  */
3057
- function Si(n) {
3199
+ function Ji(n) {
3058
3200
  return Promise.all(n.map(async (e) => {
3059
3201
  try {
3060
3202
  return {
@@ -3085,7 +3227,7 @@ function Si(n) {
3085
3227
  * See the License for the specific language governing permissions and
3086
3228
  * limitations under the License.
3087
3229
  */
3088
- class ge {
3230
+ class Ee {
3089
3231
  constructor(e) {
3090
3232
  this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
3091
3233
  }
@@ -3099,7 +3241,7 @@ class ge {
3099
3241
  const t = this.receivers.find((r) => r.isListeningto(e));
3100
3242
  if (t)
3101
3243
  return t;
3102
- const i = new ge(e);
3244
+ const i = new Ee(e);
3103
3245
  return this.receivers.push(i), i;
3104
3246
  }
3105
3247
  isListeningto(e) {
@@ -3124,7 +3266,7 @@ class ge {
3124
3266
  eventId: i,
3125
3267
  eventType: r
3126
3268
  });
3127
- const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Si(c);
3269
+ const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Ji(c);
3128
3270
  t.ports[0].postMessage({
3129
3271
  status: "done",
3130
3272
  eventId: i,
@@ -3153,7 +3295,7 @@ class ge {
3153
3295
  this.handlersMap[e] && t && this.handlersMap[e].delete(t), (!t || this.handlersMap[e].size === 0) && delete this.handlersMap[e], Object.keys(this.handlersMap).length === 0 && this.eventTarget.removeEventListener("message", this.boundEventHandler);
3154
3296
  }
3155
3297
  }
3156
- ge.receivers = [];
3298
+ Ee.receivers = [];
3157
3299
  /**
3158
3300
  * @license
3159
3301
  * Copyright 2020 Google LLC
@@ -3170,7 +3312,7 @@ ge.receivers = [];
3170
3312
  * See the License for the specific language governing permissions and
3171
3313
  * limitations under the License.
3172
3314
  */
3173
- function xe(n = "", e = 10) {
3315
+ function ze(n = "", e = 10) {
3174
3316
  let t = "";
3175
3317
  for (let i = 0; i < e; i++)
3176
3318
  t += Math.floor(Math.random() * 10);
@@ -3192,7 +3334,7 @@ function xe(n = "", e = 10) {
3192
3334
  * See the License for the specific language governing permissions and
3193
3335
  * limitations under the License.
3194
3336
  */
3195
- class Ri {
3337
+ class Yi {
3196
3338
  constructor(e) {
3197
3339
  this.target = e, this.handlers = /* @__PURE__ */ new Set();
3198
3340
  }
@@ -3226,7 +3368,7 @@ class Ri {
3226
3368
  );
3227
3369
  let s, o;
3228
3370
  return new Promise((c, a) => {
3229
- const l = xe("", 20);
3371
+ const l = ze("", 20);
3230
3372
  r.port1.start();
3231
3373
  const d = setTimeout(() => {
3232
3374
  a(new Error(
@@ -3237,9 +3379,9 @@ class Ri {
3237
3379
  o = {
3238
3380
  messageChannel: r,
3239
3381
  onMessage(h) {
3240
- const p = h;
3241
- if (p.data.eventId === l)
3242
- switch (p.data.status) {
3382
+ const m = h;
3383
+ if (m.data.eventId === l)
3384
+ switch (m.data.status) {
3243
3385
  case "ack":
3244
3386
  clearTimeout(d), s = setTimeout(
3245
3387
  () => {
@@ -3253,7 +3395,7 @@ class Ri {
3253
3395
  );
3254
3396
  break;
3255
3397
  case "done":
3256
- clearTimeout(s), c(p.data.response);
3398
+ clearTimeout(s), c(m.data.response);
3257
3399
  break;
3258
3400
  default:
3259
3401
  clearTimeout(d), clearTimeout(s), a(new Error(
@@ -3289,11 +3431,11 @@ class Ri {
3289
3431
  * See the License for the specific language governing permissions and
3290
3432
  * limitations under the License.
3291
3433
  */
3292
- function y() {
3434
+ function b() {
3293
3435
  return window;
3294
3436
  }
3295
- function Ai(n) {
3296
- y().location.href = n;
3437
+ function Xi(n) {
3438
+ b().location.href = n;
3297
3439
  }
3298
3440
  /**
3299
3441
  * @license
@@ -3311,10 +3453,10 @@ function Ai(n) {
3311
3453
  * See the License for the specific language governing permissions and
3312
3454
  * limitations under the License.
3313
3455
  */
3314
- function Bt() {
3315
- return typeof y().WorkerGlobalScope < "u" && typeof y().importScripts == "function";
3456
+ function Zt() {
3457
+ return typeof b().WorkerGlobalScope < "u" && typeof b().importScripts == "function";
3316
3458
  }
3317
- async function Pi() {
3459
+ async function Qi() {
3318
3460
  if (!(navigator != null && navigator.serviceWorker))
3319
3461
  return null;
3320
3462
  try {
@@ -3323,12 +3465,12 @@ async function Pi() {
3323
3465
  return null;
3324
3466
  }
3325
3467
  }
3326
- function Ci() {
3468
+ function Zi() {
3327
3469
  var n;
3328
3470
  return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
3329
3471
  }
3330
- function Oi() {
3331
- return Bt() ? self : null;
3472
+ function er() {
3473
+ return Zt() ? self : null;
3332
3474
  }
3333
3475
  /**
3334
3476
  * @license
@@ -3346,8 +3488,8 @@ function Oi() {
3346
3488
  * See the License for the specific language governing permissions and
3347
3489
  * limitations under the License.
3348
3490
  */
3349
- const zt = "firebaseLocalStorageDb", Ni = 1, he = "firebaseLocalStorage", qt = "fbase_key";
3350
- class Z {
3491
+ const en = "firebaseLocalStorageDb", tr = 1, ye = "firebaseLocalStorage", tn = "fbase_key";
3492
+ class ce {
3351
3493
  constructor(e) {
3352
3494
  this.request = e;
3353
3495
  }
@@ -3361,55 +3503,55 @@ class Z {
3361
3503
  });
3362
3504
  }
3363
3505
  }
3364
- function _e(n, e) {
3365
- return n.transaction([he], e ? "readwrite" : "readonly").objectStore(he);
3506
+ function be(n, e) {
3507
+ return n.transaction([ye], e ? "readwrite" : "readonly").objectStore(ye);
3366
3508
  }
3367
- function Li() {
3368
- const n = indexedDB.deleteDatabase(zt);
3369
- return new Z(n).toPromise();
3509
+ function nr() {
3510
+ const n = indexedDB.deleteDatabase(en);
3511
+ return new ce(n).toPromise();
3370
3512
  }
3371
- function Pe() {
3372
- const n = indexedDB.open(zt, Ni);
3513
+ function Ue() {
3514
+ const n = indexedDB.open(en, tr);
3373
3515
  return new Promise((e, t) => {
3374
3516
  n.addEventListener("error", () => {
3375
3517
  t(n.error);
3376
3518
  }), n.addEventListener("upgradeneeded", () => {
3377
3519
  const i = n.result;
3378
3520
  try {
3379
- i.createObjectStore(he, { keyPath: qt });
3521
+ i.createObjectStore(ye, { keyPath: tn });
3380
3522
  } catch (r) {
3381
3523
  t(r);
3382
3524
  }
3383
3525
  }), n.addEventListener("success", async () => {
3384
3526
  const i = n.result;
3385
- i.objectStoreNames.contains(he) ? e(i) : (i.close(), await Li(), e(await Pe()));
3527
+ i.objectStoreNames.contains(ye) ? e(i) : (i.close(), await nr(), e(await Ue()));
3386
3528
  });
3387
3529
  });
3388
3530
  }
3389
- async function it(n, e, t) {
3390
- const i = _e(n, !0).put({
3391
- [qt]: e,
3531
+ async function ut(n, e, t) {
3532
+ const i = be(n, !0).put({
3533
+ [tn]: e,
3392
3534
  value: t
3393
3535
  });
3394
- return new Z(i).toPromise();
3536
+ return new ce(i).toPromise();
3395
3537
  }
3396
- async function Mi(n, e) {
3397
- const t = _e(n, !1).get(e), i = await new Z(t).toPromise();
3538
+ async function ir(n, e) {
3539
+ const t = be(n, !1).get(e), i = await new ce(t).toPromise();
3398
3540
  return i === void 0 ? null : i.value;
3399
3541
  }
3400
- function rt(n, e) {
3401
- const t = _e(n, !0).delete(e);
3402
- return new Z(t).toPromise();
3542
+ function dt(n, e) {
3543
+ const t = be(n, !0).delete(e);
3544
+ return new ce(t).toPromise();
3403
3545
  }
3404
- const Ui = 800, Di = 3;
3405
- class Kt {
3546
+ const rr = 800, sr = 3;
3547
+ class nn {
3406
3548
  constructor() {
3407
3549
  this.type = "LOCAL", this._shouldAllowMigration = !0, this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.pendingWrites = 0, this.receiver = null, this.sender = null, this.serviceWorkerReceiverAvailable = !1, this.activeServiceWorker = null, this._workerInitializationPromise = this.initializeServiceWorkerMessaging().then(() => {
3408
3550
  }, () => {
3409
3551
  });
3410
3552
  }
3411
3553
  async _openDb() {
3412
- return this.db ? this.db : (this.db = await Pe(), this.db);
3554
+ return this.db ? this.db : (this.db = await Ue(), this.db);
3413
3555
  }
3414
3556
  async _withRetries(e) {
3415
3557
  let t = 0;
@@ -3418,7 +3560,7 @@ class Kt {
3418
3560
  const i = await this._openDb();
3419
3561
  return await e(i);
3420
3562
  } catch (i) {
3421
- if (t++ > Di)
3563
+ if (t++ > sr)
3422
3564
  throw i;
3423
3565
  this.db && (this.db.close(), this.db = void 0);
3424
3566
  }
@@ -3428,13 +3570,13 @@ class Kt {
3428
3570
  * postMessage interface to send these events to the worker ourselves.
3429
3571
  */
3430
3572
  async initializeServiceWorkerMessaging() {
3431
- return Bt() ? this.initializeReceiver() : this.initializeSender();
3573
+ return Zt() ? this.initializeReceiver() : this.initializeSender();
3432
3574
  }
3433
3575
  /**
3434
3576
  * As the worker we should listen to events from the main window.
3435
3577
  */
3436
3578
  async initializeReceiver() {
3437
- this.receiver = ge._getInstance(Oi()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3579
+ this.receiver = Ee._getInstance(er()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3438
3580
  keyProcessed: (await this._poll()).includes(t.key)
3439
3581
  })), this.receiver._subscribe("ping", async (e, t) => [
3440
3582
  "keyChanged"
@@ -3450,9 +3592,9 @@ class Kt {
3450
3592
  */
3451
3593
  async initializeSender() {
3452
3594
  var e, t;
3453
- if (this.activeServiceWorker = await Pi(), !this.activeServiceWorker)
3595
+ if (this.activeServiceWorker = await Qi(), !this.activeServiceWorker)
3454
3596
  return;
3455
- this.sender = new Ri(this.activeServiceWorker);
3597
+ this.sender = new Yi(this.activeServiceWorker);
3456
3598
  const i = await this.sender._send(
3457
3599
  "ping",
3458
3600
  {},
@@ -3474,7 +3616,7 @@ class Kt {
3474
3616
  * @param key - Storage key which changed.
3475
3617
  */
3476
3618
  async notifyServiceWorker(e) {
3477
- if (!(!this.sender || !this.activeServiceWorker || Ci() !== this.activeServiceWorker))
3619
+ if (!(!this.sender || !this.activeServiceWorker || Zi() !== this.activeServiceWorker))
3478
3620
  try {
3479
3621
  await this.sender._send(
3480
3622
  "keyChanged",
@@ -3490,8 +3632,8 @@ class Kt {
3490
3632
  try {
3491
3633
  if (!indexedDB)
3492
3634
  return !1;
3493
- const e = await Pe();
3494
- return await it(e, de, "1"), await rt(e, de), !0;
3635
+ const e = await Ue();
3636
+ return await ut(e, Ie, "1"), await dt(e, Ie), !0;
3495
3637
  } catch {
3496
3638
  }
3497
3639
  return !1;
@@ -3505,19 +3647,19 @@ class Kt {
3505
3647
  }
3506
3648
  }
3507
3649
  async _set(e, t) {
3508
- return this._withPendingWrite(async () => (await this._withRetries((i) => it(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3650
+ return this._withPendingWrite(async () => (await this._withRetries((i) => ut(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3509
3651
  }
3510
3652
  async _get(e) {
3511
- const t = await this._withRetries((i) => Mi(i, e));
3653
+ const t = await this._withRetries((i) => ir(i, e));
3512
3654
  return this.localCache[e] = t, t;
3513
3655
  }
3514
3656
  async _remove(e) {
3515
- return this._withPendingWrite(async () => (await this._withRetries((t) => rt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3657
+ return this._withPendingWrite(async () => (await this._withRetries((t) => dt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3516
3658
  }
3517
3659
  async _poll() {
3518
3660
  const e = await this._withRetries((r) => {
3519
- const s = _e(r, !1).getAll();
3520
- return new Z(s).toPromise();
3661
+ const s = be(r, !1).getAll();
3662
+ return new ce(s).toPromise();
3521
3663
  });
3522
3664
  if (!e)
3523
3665
  return [];
@@ -3539,7 +3681,7 @@ class Kt {
3539
3681
  r(t);
3540
3682
  }
3541
3683
  startPolling() {
3542
- this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ui);
3684
+ this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), rr);
3543
3685
  }
3544
3686
  stopPolling() {
3545
3687
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -3551,9 +3693,9 @@ class Kt {
3551
3693
  this.listeners[e] && (this.listeners[e].delete(t), this.listeners[e].size === 0 && delete this.listeners[e]), Object.keys(this.listeners).length === 0 && this.stopPolling();
3552
3694
  }
3553
3695
  }
3554
- Kt.type = "LOCAL";
3555
- const Fi = Kt;
3556
- new X(3e4, 6e4);
3696
+ nn.type = "LOCAL";
3697
+ const or = nn;
3698
+ new oe(3e4, 6e4);
3557
3699
  /**
3558
3700
  * @license
3559
3701
  * Copyright 2021 Google LLC
@@ -3570,8 +3712,8 @@ new X(3e4, 6e4);
3570
3712
  * See the License for the specific language governing permissions and
3571
3713
  * limitations under the License.
3572
3714
  */
3573
- function xi(n, e) {
3574
- return e ? S(e) : (u(
3715
+ function ar(n, e) {
3716
+ return e ? N(e) : (u(
3575
3717
  n._popupRedirectResolver,
3576
3718
  n,
3577
3719
  "argument-error"
@@ -3594,7 +3736,7 @@ function xi(n, e) {
3594
3736
  * See the License for the specific language governing permissions and
3595
3737
  * limitations under the License.
3596
3738
  */
3597
- class Ve extends xt {
3739
+ class qe extends zt {
3598
3740
  constructor(e) {
3599
3741
  super(
3600
3742
  "custom",
@@ -3603,13 +3745,13 @@ class Ve extends xt {
3603
3745
  ), this.params = e;
3604
3746
  }
3605
3747
  _getIdTokenResponse(e) {
3606
- return W(e, this._buildIdpRequest());
3748
+ return q(e, this._buildIdpRequest());
3607
3749
  }
3608
3750
  _linkToIdToken(e, t) {
3609
- return W(e, this._buildIdpRequest(t));
3751
+ return q(e, this._buildIdpRequest(t));
3610
3752
  }
3611
3753
  _getReauthenticationResolver(e) {
3612
- return W(e, this._buildIdpRequest());
3754
+ return q(e, this._buildIdpRequest());
3613
3755
  }
3614
3756
  _buildIdpRequest(e) {
3615
3757
  const t = {
@@ -3624,26 +3766,26 @@ class Ve extends xt {
3624
3766
  return e && (t.idToken = e), t;
3625
3767
  }
3626
3768
  }
3627
- function Vi(n) {
3628
- return _i(n.auth, new Ve(n), n.bypassAuthState);
3769
+ function cr(n) {
3770
+ return $i(n.auth, new qe(n), n.bypassAuthState);
3629
3771
  }
3630
- function $i(n) {
3772
+ function lr(n) {
3631
3773
  const { auth: e, user: t } = n;
3632
3774
  return u(
3633
3775
  t,
3634
3776
  e,
3635
3777
  "internal-error"
3636
3778
  /* AuthErrorCode.INTERNAL_ERROR */
3637
- ), gi(t, new Ve(n), n.bypassAuthState);
3779
+ ), Vi(t, new qe(n), n.bypassAuthState);
3638
3780
  }
3639
- async function Hi(n) {
3781
+ async function ur(n) {
3640
3782
  const { auth: e, user: t } = n;
3641
3783
  return u(
3642
3784
  t,
3643
3785
  e,
3644
3786
  "internal-error"
3645
3787
  /* AuthErrorCode.INTERNAL_ERROR */
3646
- ), mi(t, new Ve(n), n.bypassAuthState);
3788
+ ), Fi(t, new qe(n), n.bypassAuthState);
3647
3789
  }
3648
3790
  /**
3649
3791
  * @license
@@ -3661,7 +3803,7 @@ async function Hi(n) {
3661
3803
  * See the License for the specific language governing permissions and
3662
3804
  * limitations under the License.
3663
3805
  */
3664
- class Jt {
3806
+ class rn {
3665
3807
  constructor(e, t, i, r, s = !1) {
3666
3808
  this.auth = e, this.resolver = i, this.user = r, this.bypassAuthState = s, this.pendingPromise = null, this.eventManager = null, this.filter = Array.isArray(t) ? t : [t];
3667
3809
  }
@@ -3703,15 +3845,15 @@ class Jt {
3703
3845
  switch (e) {
3704
3846
  case "signInViaPopup":
3705
3847
  case "signInViaRedirect":
3706
- return Vi;
3848
+ return cr;
3707
3849
  case "linkViaPopup":
3708
3850
  case "linkViaRedirect":
3709
- return Hi;
3851
+ return ur;
3710
3852
  case "reauthViaPopup":
3711
3853
  case "reauthViaRedirect":
3712
- return $i;
3854
+ return lr;
3713
3855
  default:
3714
- R(
3856
+ O(
3715
3857
  this.auth,
3716
3858
  "internal-error"
3717
3859
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -3719,10 +3861,10 @@ class Jt {
3719
3861
  }
3720
3862
  }
3721
3863
  resolve(e) {
3722
- A(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3864
+ L(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3723
3865
  }
3724
3866
  reject(e) {
3725
- A(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3867
+ L(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3726
3868
  }
3727
3869
  unregisterAndCleanUp() {
3728
3870
  this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
@@ -3744,10 +3886,10 @@ class Jt {
3744
3886
  * See the License for the specific language governing permissions and
3745
3887
  * limitations under the License.
3746
3888
  */
3747
- const Wi = new X(2e3, 1e4);
3748
- class V extends Jt {
3889
+ const dr = new oe(2e3, 1e4);
3890
+ class G extends rn {
3749
3891
  constructor(e, t, i, r, s) {
3750
- super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
3892
+ super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, G.currentPopupAction && G.currentPopupAction.cancel(), G.currentPopupAction = this;
3751
3893
  }
3752
3894
  async executeNotNull() {
3753
3895
  const e = await this.execute();
@@ -3759,8 +3901,8 @@ class V extends Jt {
3759
3901
  ), e;
3760
3902
  }
3761
3903
  async onExecution() {
3762
- A(this.filter.length === 1, "Popup operations only handle one event");
3763
- const e = xe();
3904
+ L(this.filter.length === 1, "Popup operations only handle one event");
3905
+ const e = ze();
3764
3906
  this.authWindow = await this.resolver._openPopup(
3765
3907
  this.auth,
3766
3908
  this.provider,
@@ -3770,7 +3912,7 @@ class V extends Jt {
3770
3912
  ), this.authWindow.associatedEvent = e, this.resolver._originValidation(this.auth).catch((t) => {
3771
3913
  this.reject(t);
3772
3914
  }), this.resolver._isIframeWebStorageSupported(this.auth, (t) => {
3773
- t || this.reject(T(
3915
+ t || this.reject(E(
3774
3916
  this.auth,
3775
3917
  "web-storage-unsupported"
3776
3918
  /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */
@@ -3782,14 +3924,14 @@ class V extends Jt {
3782
3924
  return ((e = this.authWindow) === null || e === void 0 ? void 0 : e.associatedEvent) || null;
3783
3925
  }
3784
3926
  cancel() {
3785
- this.reject(T(
3927
+ this.reject(E(
3786
3928
  this.auth,
3787
3929
  "cancelled-popup-request"
3788
3930
  /* AuthErrorCode.EXPIRED_POPUP_REQUEST */
3789
3931
  ));
3790
3932
  }
3791
3933
  cleanUp() {
3792
- this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null, V.currentPopupAction = null;
3934
+ this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null, G.currentPopupAction = null;
3793
3935
  }
3794
3936
  pollUserCancellation() {
3795
3937
  const e = () => {
@@ -3797,7 +3939,7 @@ class V extends Jt {
3797
3939
  if (!((i = (t = this.authWindow) === null || t === void 0 ? void 0 : t.window) === null || i === void 0) && i.closed) {
3798
3940
  this.pollId = window.setTimeout(
3799
3941
  () => {
3800
- this.pollId = null, this.reject(T(
3942
+ this.pollId = null, this.reject(E(
3801
3943
  this.auth,
3802
3944
  "popup-closed-by-user"
3803
3945
  /* AuthErrorCode.POPUP_CLOSED_BY_USER */
@@ -3808,12 +3950,12 @@ class V extends Jt {
3808
3950
  );
3809
3951
  return;
3810
3952
  }
3811
- this.pollId = window.setTimeout(e, Wi.get());
3953
+ this.pollId = window.setTimeout(e, dr.get());
3812
3954
  };
3813
3955
  e();
3814
3956
  }
3815
3957
  }
3816
- V.currentPopupAction = null;
3958
+ G.currentPopupAction = null;
3817
3959
  /**
3818
3960
  * @license
3819
3961
  * Copyright 2020 Google LLC
@@ -3830,8 +3972,8 @@ V.currentPopupAction = null;
3830
3972
  * See the License for the specific language governing permissions and
3831
3973
  * limitations under the License.
3832
3974
  */
3833
- const ji = "pendingRedirect", oe = /* @__PURE__ */ new Map();
3834
- class Gi extends Jt {
3975
+ const hr = "pendingRedirect", he = /* @__PURE__ */ new Map();
3976
+ class fr extends rn {
3835
3977
  constructor(e, t, i = !1) {
3836
3978
  super(e, [
3837
3979
  "signInViaRedirect",
@@ -3846,17 +3988,17 @@ class Gi extends Jt {
3846
3988
  * just return it.
3847
3989
  */
3848
3990
  async execute() {
3849
- let e = oe.get(this.auth._key());
3991
+ let e = he.get(this.auth._key());
3850
3992
  if (!e) {
3851
3993
  try {
3852
- const i = await Bi(this.resolver, this.auth) ? await super.execute() : null;
3994
+ const i = await pr(this.resolver, this.auth) ? await super.execute() : null;
3853
3995
  e = () => Promise.resolve(i);
3854
3996
  } catch (t) {
3855
3997
  e = () => Promise.reject(t);
3856
3998
  }
3857
- oe.set(this.auth._key(), e);
3999
+ he.set(this.auth._key(), e);
3858
4000
  }
3859
- return this.bypassAuthState || oe.set(this.auth._key(), () => Promise.resolve(null)), e();
4001
+ return this.bypassAuthState || he.set(this.auth._key(), () => Promise.resolve(null)), e();
3860
4002
  }
3861
4003
  async onAuthEvent(e) {
3862
4004
  if (e.type === "signInViaRedirect")
@@ -3877,26 +4019,26 @@ class Gi extends Jt {
3877
4019
  cleanUp() {
3878
4020
  }
3879
4021
  }
3880
- async function Bi(n, e) {
3881
- const t = Ki(e), i = qi(n);
4022
+ async function pr(n, e) {
4023
+ const t = _r(e), i = gr(n);
3882
4024
  if (!await i._isAvailable())
3883
4025
  return !1;
3884
4026
  const r = await i._get(t) === "true";
3885
4027
  return await i._remove(t), r;
3886
4028
  }
3887
- function zi(n, e) {
3888
- oe.set(n._key(), e);
4029
+ function mr(n, e) {
4030
+ he.set(n._key(), e);
3889
4031
  }
3890
- function qi(n) {
3891
- return S(n._redirectPersistence);
4032
+ function gr(n) {
4033
+ return N(n._redirectPersistence);
3892
4034
  }
3893
- function Ki(n) {
3894
- return se(ji, n.config.apiKey, n.name);
4035
+ function _r(n) {
4036
+ return de(hr, n.config.apiKey, n.name);
3895
4037
  }
3896
- async function Ji(n, e, t = !1) {
3897
- if (E(n.app))
3898
- return Promise.reject(M(n));
3899
- const i = me(n), r = xi(i, e), o = await new Gi(i, r, t).execute();
4038
+ async function vr(n, e, t = !1) {
4039
+ if (A(n.app))
4040
+ return Promise.reject($(n));
4041
+ const i = ke(n), r = ar(i, e), o = await new fr(i, r, t).execute();
3900
4042
  return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
3901
4043
  }
3902
4044
  /**
@@ -3915,8 +4057,8 @@ async function Ji(n, e, t = !1) {
3915
4057
  * See the License for the specific language governing permissions and
3916
4058
  * limitations under the License.
3917
4059
  */
3918
- const Yi = 10 * 60 * 1e3;
3919
- class Xi {
4060
+ const Ir = 10 * 60 * 1e3;
4061
+ class yr {
3920
4062
  constructor(e) {
3921
4063
  this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
3922
4064
  }
@@ -3932,13 +4074,13 @@ class Xi {
3932
4074
  let t = !1;
3933
4075
  return this.consumers.forEach((i) => {
3934
4076
  this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
3935
- }), this.hasHandledPotentialRedirect || !Qi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
4077
+ }), this.hasHandledPotentialRedirect || !wr(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
3936
4078
  }
3937
4079
  sendToConsumer(e, t) {
3938
4080
  var i;
3939
- if (e.error && !Yt(e)) {
4081
+ if (e.error && !sn(e)) {
3940
4082
  const r = ((i = e.error.code) === null || i === void 0 ? void 0 : i.split("auth/")[1]) || "internal-error";
3941
- t.onError(T(this.auth, r));
4083
+ t.onError(E(this.auth, r));
3942
4084
  } else
3943
4085
  t.onAuthEvent(e);
3944
4086
  }
@@ -3947,26 +4089,26 @@ class Xi {
3947
4089
  return t.filter.includes(e.type) && i;
3948
4090
  }
3949
4091
  hasEventBeenHandled(e) {
3950
- return Date.now() - this.lastProcessedEventTime >= Yi && this.cachedEventUids.clear(), this.cachedEventUids.has(st(e));
4092
+ return Date.now() - this.lastProcessedEventTime >= Ir && this.cachedEventUids.clear(), this.cachedEventUids.has(ht(e));
3951
4093
  }
3952
4094
  saveEventToCache(e) {
3953
- this.cachedEventUids.add(st(e)), this.lastProcessedEventTime = Date.now();
4095
+ this.cachedEventUids.add(ht(e)), this.lastProcessedEventTime = Date.now();
3954
4096
  }
3955
4097
  }
3956
- function st(n) {
4098
+ function ht(n) {
3957
4099
  return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
3958
4100
  }
3959
- function Yt({ type: n, error: e }) {
4101
+ function sn({ type: n, error: e }) {
3960
4102
  return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
3961
4103
  }
3962
- function Qi(n) {
4104
+ function wr(n) {
3963
4105
  switch (n.type) {
3964
4106
  case "signInViaRedirect":
3965
4107
  case "linkViaRedirect":
3966
4108
  case "reauthViaRedirect":
3967
4109
  return !0;
3968
4110
  case "unknown":
3969
- return Yt(n);
4111
+ return sn(n);
3970
4112
  default:
3971
4113
  return !1;
3972
4114
  }
@@ -3987,8 +4129,8 @@ function Qi(n) {
3987
4129
  * See the License for the specific language governing permissions and
3988
4130
  * limitations under the License.
3989
4131
  */
3990
- async function Zi(n, e = {}) {
3991
- return G(n, "GET", "/v1/projects", e);
4132
+ async function Tr(n, e = {}) {
4133
+ return J(n, "GET", "/v1/projects", e);
3992
4134
  }
3993
4135
  /**
3994
4136
  * @license
@@ -4006,32 +4148,32 @@ async function Zi(n, e = {}) {
4006
4148
  * See the License for the specific language governing permissions and
4007
4149
  * limitations under the License.
4008
4150
  */
4009
- const er = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, tr = /^https?/;
4010
- async function nr(n) {
4151
+ const kr = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Er = /^https?/;
4152
+ async function br(n) {
4011
4153
  if (n.config.emulator)
4012
4154
  return;
4013
- const { authorizedDomains: e } = await Zi(n);
4155
+ const { authorizedDomains: e } = await Tr(n);
4014
4156
  for (const t of e)
4015
4157
  try {
4016
- if (ir(t))
4158
+ if (Sr(t))
4017
4159
  return;
4018
4160
  } catch {
4019
4161
  }
4020
- R(
4162
+ O(
4021
4163
  n,
4022
4164
  "unauthorized-domain"
4023
4165
  /* AuthErrorCode.INVALID_ORIGIN */
4024
4166
  );
4025
4167
  }
4026
- function ir(n) {
4027
- const e = Re(), { protocol: t, hostname: i } = new URL(e);
4168
+ function Sr(n) {
4169
+ const e = Le(), { protocol: t, hostname: i } = new URL(e);
4028
4170
  if (n.startsWith("chrome-extension://")) {
4029
4171
  const o = new URL(n);
4030
4172
  return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
4031
4173
  }
4032
- if (!tr.test(t))
4174
+ if (!Er.test(t))
4033
4175
  return !1;
4034
- if (er.test(n))
4176
+ if (kr.test(n))
4035
4177
  return i === n;
4036
4178
  const r = n.replace(/\./g, "\\.");
4037
4179
  return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
@@ -4052,9 +4194,9 @@ function ir(n) {
4052
4194
  * See the License for the specific language governing permissions and
4053
4195
  * limitations under the License.
4054
4196
  */
4055
- const rr = new X(3e4, 6e4);
4056
- function ot() {
4057
- const n = y().___jsl;
4197
+ const Rr = new oe(3e4, 6e4);
4198
+ function ft() {
4199
+ const n = b().___jsl;
4058
4200
  if (n != null && n.H) {
4059
4201
  for (const e of Object.keys(n.H))
4060
4202
  if (n.H[e].r = n.H[e].r || [], n.H[e].L = n.H[e].L || [], n.H[e].r = [...n.H[e].L], n.CP)
@@ -4062,45 +4204,45 @@ function ot() {
4062
4204
  n.CP[t] = null;
4063
4205
  }
4064
4206
  }
4065
- function sr(n) {
4207
+ function Ar(n) {
4066
4208
  return new Promise((e, t) => {
4067
4209
  var i, r, s;
4068
4210
  function o() {
4069
- ot(), gapi.load("gapi.iframes", {
4211
+ ft(), gapi.load("gapi.iframes", {
4070
4212
  callback: () => {
4071
4213
  e(gapi.iframes.getContext());
4072
4214
  },
4073
4215
  ontimeout: () => {
4074
- ot(), t(T(
4216
+ ft(), t(E(
4075
4217
  n,
4076
4218
  "network-request-failed"
4077
4219
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4078
4220
  ));
4079
4221
  },
4080
- timeout: rr.get()
4222
+ timeout: Rr.get()
4081
4223
  });
4082
4224
  }
4083
- if (!((r = (i = y().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4225
+ if (!((r = (i = b().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4084
4226
  e(gapi.iframes.getContext());
4085
- else if (!((s = y().gapi) === null || s === void 0) && s.load)
4227
+ else if (!((s = b().gapi) === null || s === void 0) && s.load)
4086
4228
  o();
4087
4229
  else {
4088
- const c = ci("iframefcb");
4089
- return y()[c] = () => {
4090
- gapi.load ? o() : t(T(
4230
+ const c = Ni("iframefcb");
4231
+ return b()[c] = () => {
4232
+ gapi.load ? o() : t(E(
4091
4233
  n,
4092
4234
  "network-request-failed"
4093
4235
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4094
4236
  ));
4095
- }, oi(`${ai()}?onload=${c}`).catch((a) => t(a));
4237
+ }, Pi(`${Ci()}?onload=${c}`).catch((a) => t(a));
4096
4238
  }
4097
4239
  }).catch((e) => {
4098
- throw ae = null, e;
4240
+ throw fe = null, e;
4099
4241
  });
4100
4242
  }
4101
- let ae = null;
4102
- function or(n) {
4103
- return ae = ae || sr(n), ae;
4243
+ let fe = null;
4244
+ function Pr(n) {
4245
+ return fe = fe || Ar(n), fe;
4104
4246
  }
4105
4247
  /**
4106
4248
  * @license
@@ -4118,7 +4260,7 @@ function or(n) {
4118
4260
  * See the License for the specific language governing permissions and
4119
4261
  * limitations under the License.
4120
4262
  */
4121
- const ar = new X(5e3, 15e3), cr = "__/auth/iframe", lr = "emulator/auth/iframe", ur = {
4263
+ const Cr = new oe(5e3, 15e3), Nr = "__/auth/iframe", Or = "emulator/auth/iframe", Lr = {
4122
4264
  style: {
4123
4265
  position: "absolute",
4124
4266
  top: "-100px",
@@ -4127,13 +4269,13 @@ const ar = new X(5e3, 15e3), cr = "__/auth/iframe", lr = "emulator/auth/iframe",
4127
4269
  },
4128
4270
  "aria-hidden": "true",
4129
4271
  tabindex: "-1"
4130
- }, dr = /* @__PURE__ */ new Map([
4272
+ }, Mr = /* @__PURE__ */ new Map([
4131
4273
  ["identitytoolkit.googleapis.com", "p"],
4132
4274
  ["staging-identitytoolkit.sandbox.googleapis.com", "s"],
4133
4275
  ["test-identitytoolkit.sandbox.googleapis.com", "t"]
4134
4276
  // test
4135
4277
  ]);
4136
- function hr(n) {
4278
+ function Ur(n) {
4137
4279
  const e = n.config;
4138
4280
  u(
4139
4281
  e.authDomain,
@@ -4141,17 +4283,17 @@ function hr(n) {
4141
4283
  "auth-domain-config-required"
4142
4284
  /* AuthErrorCode.MISSING_AUTH_DOMAIN */
4143
4285
  );
4144
- const t = e.emulator ? Me(e, lr) : `https://${n.config.authDomain}/${cr}`, i = {
4286
+ const t = e.emulator ? je(e, Or) : `https://${n.config.authDomain}/${Nr}`, i = {
4145
4287
  apiKey: e.apiKey,
4146
4288
  appName: n.name,
4147
- v: J
4148
- }, r = dr.get(n.config.apiHost);
4289
+ v: re
4290
+ }, r = Mr.get(n.config.apiHost);
4149
4291
  r && (i.eid = r);
4150
4292
  const s = n._getFrameworks();
4151
- return s.length && (i.fw = s.join(",")), `${t}?${Y(i).slice(1)}`;
4293
+ return s.length && (i.fw = s.join(",")), `${t}?${se(i).slice(1)}`;
4152
4294
  }
4153
- async function fr(n) {
4154
- const e = await or(n), t = y().gapi;
4295
+ async function Dr(n) {
4296
+ const e = await Pr(n), t = b().gapi;
4155
4297
  return u(
4156
4298
  t,
4157
4299
  n,
@@ -4159,24 +4301,24 @@ async function fr(n) {
4159
4301
  /* AuthErrorCode.INTERNAL_ERROR */
4160
4302
  ), e.open({
4161
4303
  where: document.body,
4162
- url: hr(n),
4304
+ url: Ur(n),
4163
4305
  messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
4164
- attributes: ur,
4306
+ attributes: Lr,
4165
4307
  dontclear: !0
4166
4308
  }, (i) => new Promise(async (r, s) => {
4167
4309
  await i.restyle({
4168
4310
  // Prevent iframe from closing on mouse out.
4169
4311
  setHideOnLeave: !1
4170
4312
  });
4171
- const o = T(
4313
+ const o = E(
4172
4314
  n,
4173
4315
  "network-request-failed"
4174
4316
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4175
- ), c = y().setTimeout(() => {
4317
+ ), c = b().setTimeout(() => {
4176
4318
  s(o);
4177
- }, ar.get());
4319
+ }, Cr.get());
4178
4320
  function a() {
4179
- y().clearTimeout(c), r(i);
4321
+ b().clearTimeout(c), r(i);
4180
4322
  }
4181
4323
  i.ping(a).then(a, () => {
4182
4324
  s(o);
@@ -4199,13 +4341,13 @@ async function fr(n) {
4199
4341
  * See the License for the specific language governing permissions and
4200
4342
  * limitations under the License.
4201
4343
  */
4202
- const pr = {
4344
+ const xr = {
4203
4345
  location: "yes",
4204
4346
  resizable: "yes",
4205
4347
  statusbar: "yes",
4206
4348
  toolbar: "no"
4207
- }, mr = 500, gr = 600, _r = "_blank", vr = "http://localhost";
4208
- class at {
4349
+ }, Fr = 500, Vr = 600, $r = "_blank", Hr = "http://localhost";
4350
+ class pt {
4209
4351
  constructor(e) {
4210
4352
  this.window = e, this.associatedEvent = null;
4211
4353
  }
@@ -4217,19 +4359,19 @@ class at {
4217
4359
  }
4218
4360
  }
4219
4361
  }
4220
- function Ir(n, e, t, i = mr, r = gr) {
4362
+ function jr(n, e, t, i = Fr, r = Vr) {
4221
4363
  const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
4222
4364
  let c = "";
4223
- const a = Object.assign(Object.assign({}, pr), {
4365
+ const a = Object.assign(Object.assign({}, xr), {
4224
4366
  width: i.toString(),
4225
4367
  height: r.toString(),
4226
4368
  top: s,
4227
4369
  left: o
4228
- }), l = _().toLowerCase();
4229
- t && (c = Ct(l) ? _r : t), Pt(l) && (e = e || vr, a.scrollbars = "yes");
4230
- const d = Object.entries(a).reduce((p, [w, U]) => `${p}${w}=${U},`, "");
4231
- if (Xn(l) && c !== "_self")
4232
- return Tr(e || "", c), new at(null);
4370
+ }), l = y().toLowerCase();
4371
+ t && (c = Ft(l) ? $r : t), xt(l) && (e = e || Hr, a.scrollbars = "yes");
4372
+ const d = Object.entries(a).reduce((m, [I, w]) => `${m}${I}=${w},`, "");
4373
+ if (yi(l) && c !== "_self")
4374
+ return Wr(e || "", c), new pt(null);
4233
4375
  const h = window.open(e || "", c, d);
4234
4376
  u(
4235
4377
  h,
@@ -4241,9 +4383,9 @@ function Ir(n, e, t, i = mr, r = gr) {
4241
4383
  h.focus();
4242
4384
  } catch {
4243
4385
  }
4244
- return new at(h);
4386
+ return new pt(h);
4245
4387
  }
4246
- function Tr(n, e) {
4388
+ function Wr(n, e) {
4247
4389
  const t = document.createElement("a");
4248
4390
  t.href = n, t.target = e;
4249
4391
  const i = document.createEvent("MouseEvent");
@@ -4265,8 +4407,8 @@ function Tr(n, e) {
4265
4407
  * See the License for the specific language governing permissions and
4266
4408
  * limitations under the License.
4267
4409
  */
4268
- const yr = "__/auth/handler", wr = "emulator/auth/handler", Er = encodeURIComponent("fac");
4269
- async function ct(n, e, t, i, r, s) {
4410
+ const Gr = "__/auth/handler", Br = "emulator/auth/handler", zr = encodeURIComponent("fac");
4411
+ async function mt(n, e, t, i, r, s) {
4270
4412
  u(
4271
4413
  n.config.authDomain,
4272
4414
  n,
@@ -4283,15 +4425,15 @@ async function ct(n, e, t, i, r, s) {
4283
4425
  appName: n.name,
4284
4426
  authType: t,
4285
4427
  redirectUrl: i,
4286
- v: J,
4428
+ v: re,
4287
4429
  eventId: r
4288
4430
  };
4289
- if (e instanceof Vt) {
4290
- e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", bn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4431
+ if (e instanceof qt) {
4432
+ e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", Cn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4291
4433
  for (const [d, h] of Object.entries({}))
4292
4434
  o[d] = h;
4293
4435
  }
4294
- if (e instanceof Q) {
4436
+ if (e instanceof ae) {
4295
4437
  const d = e.getScopes().filter((h) => h !== "");
4296
4438
  d.length > 0 && (o.scopes = d.join(","));
4297
4439
  }
@@ -4299,11 +4441,11 @@ async function ct(n, e, t, i, r, s) {
4299
4441
  const c = o;
4300
4442
  for (const d of Object.keys(c))
4301
4443
  c[d] === void 0 && delete c[d];
4302
- const a = await n._getAppCheckToken(), l = a ? `#${Er}=${encodeURIComponent(a)}` : "";
4303
- return `${kr(n)}?${Y(c).slice(1)}${l}`;
4444
+ const a = await n._getAppCheckToken(), l = a ? `#${zr}=${encodeURIComponent(a)}` : "";
4445
+ return `${qr(n)}?${se(c).slice(1)}${l}`;
4304
4446
  }
4305
- function kr({ config: n }) {
4306
- return n.emulator ? Me(n, wr) : `https://${n.authDomain}/${yr}`;
4447
+ function qr({ config: n }) {
4448
+ return n.emulator ? je(n, Br) : `https://${n.authDomain}/${Gr}`;
4307
4449
  }
4308
4450
  /**
4309
4451
  * @license
@@ -4321,30 +4463,30 @@ function kr({ config: n }) {
4321
4463
  * See the License for the specific language governing permissions and
4322
4464
  * limitations under the License.
4323
4465
  */
4324
- const we = "webStorageSupport";
4325
- class br {
4466
+ const Ce = "webStorageSupport";
4467
+ class Kr {
4326
4468
  constructor() {
4327
- this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Gt, this._completeRedirectFn = Ji, this._overrideRedirectResult = zi;
4469
+ this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Qt, this._completeRedirectFn = vr, this._overrideRedirectResult = mr;
4328
4470
  }
4329
4471
  // Wrapping in async even though we don't await anywhere in order
4330
4472
  // to make sure errors are raised as promise rejections
4331
4473
  async _openPopup(e, t, i, r) {
4332
4474
  var s;
4333
- A((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
4334
- const o = await ct(e, t, i, Re(), r);
4335
- return Ir(e, o, xe());
4475
+ L((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
4476
+ const o = await mt(e, t, i, Le(), r);
4477
+ return jr(e, o, ze());
4336
4478
  }
4337
4479
  async _openRedirect(e, t, i, r) {
4338
4480
  await this._originValidation(e);
4339
- const s = await ct(e, t, i, Re(), r);
4340
- return Ai(s), new Promise(() => {
4481
+ const s = await mt(e, t, i, Le(), r);
4482
+ return Xi(s), new Promise(() => {
4341
4483
  });
4342
4484
  }
4343
4485
  _initialize(e) {
4344
4486
  const t = e._key();
4345
4487
  if (this.eventManagers[t]) {
4346
4488
  const { manager: r, promise: s } = this.eventManagers[t];
4347
- return r ? Promise.resolve(r) : (A(s, "If manager is not set, promise should be"), s);
4489
+ return r ? Promise.resolve(r) : (L(s, "If manager is not set, promise should be"), s);
4348
4490
  }
4349
4491
  const i = this.initAndGetManager(e);
4350
4492
  return this.eventManagers[t] = { promise: i }, i.catch(() => {
@@ -4352,7 +4494,7 @@ class br {
4352
4494
  }), i;
4353
4495
  }
4354
4496
  async initAndGetManager(e) {
4355
- const t = await fr(e), i = new Xi(e);
4497
+ const t = await Dr(e), i = new yr(e);
4356
4498
  return t.register("authEvent", (r) => (u(
4357
4499
  r == null ? void 0 : r.authEvent,
4358
4500
  e,
@@ -4364,10 +4506,10 @@ class br {
4364
4506
  }), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: i }, this.iframes[e._key()] = t, i;
4365
4507
  }
4366
4508
  _isIframeWebStorageSupported(e, t) {
4367
- this.iframes[e._key()].send(we, { type: we }, (r) => {
4509
+ this.iframes[e._key()].send(Ce, { type: Ce }, (r) => {
4368
4510
  var s;
4369
- const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[we];
4370
- o !== void 0 && t(!!o), R(
4511
+ const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[Ce];
4512
+ o !== void 0 && t(!!o), O(
4371
4513
  e,
4372
4514
  "internal-error"
4373
4515
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -4376,14 +4518,14 @@ class br {
4376
4518
  }
4377
4519
  _originValidation(e) {
4378
4520
  const t = e._key();
4379
- return this.originValidationPromises[t] || (this.originValidationPromises[t] = nr(e)), this.originValidationPromises[t];
4521
+ return this.originValidationPromises[t] || (this.originValidationPromises[t] = br(e)), this.originValidationPromises[t];
4380
4522
  }
4381
4523
  get _shouldInitProactively() {
4382
- return Ut() || De() || pe();
4524
+ return Wt() || Ge() || Te();
4383
4525
  }
4384
4526
  }
4385
- const Sr = br;
4386
- var lt = "@firebase/auth", ut = "1.7.5";
4527
+ const Jr = Kr;
4528
+ var gt = "@firebase/auth", _t = "1.7.5";
4387
4529
  /**
4388
4530
  * @license
4389
4531
  * Copyright 2020 Google LLC
@@ -4400,7 +4542,7 @@ var lt = "@firebase/auth", ut = "1.7.5";
4400
4542
  * See the License for the specific language governing permissions and
4401
4543
  * limitations under the License.
4402
4544
  */
4403
- class Rr {
4545
+ class Yr {
4404
4546
  constructor(e) {
4405
4547
  this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
4406
4548
  }
@@ -4451,7 +4593,7 @@ class Rr {
4451
4593
  * See the License for the specific language governing permissions and
4452
4594
  * limitations under the License.
4453
4595
  */
4454
- function Ar(n) {
4596
+ function Xr(n) {
4455
4597
  switch (n) {
4456
4598
  case "Node":
4457
4599
  return "node";
@@ -4467,8 +4609,8 @@ function Ar(n) {
4467
4609
  return;
4468
4610
  }
4469
4611
  }
4470
- function Pr(n) {
4471
- ze(new qe(
4612
+ function Qr(n) {
4613
+ Ze(new et(
4472
4614
  "auth",
4473
4615
  (e, { options: t }) => {
4474
4616
  const i = e.getProvider("app").getImmediate(), r = e.getProvider("heartbeat"), s = e.getProvider("app-check-internal"), { apiKey: o, authDomain: c } = i.options;
@@ -4480,9 +4622,9 @@ function Pr(n) {
4480
4622
  apiHost: "identitytoolkit.googleapis.com",
4481
4623
  tokenApiHost: "securetoken.googleapis.com",
4482
4624
  apiScheme: "https",
4483
- sdkClientVersion: Dt(n)
4484
- }, l = new ri(i, r, s, a);
4485
- return ui(l, t), l;
4625
+ sdkClientVersion: Gt(n)
4626
+ }, l = new Ri(i, r, s, a);
4627
+ return Li(l, t), l;
4486
4628
  },
4487
4629
  "PUBLIC"
4488
4630
  /* ComponentType.PUBLIC */
@@ -4494,21 +4636,21 @@ function Pr(n) {
4494
4636
  "auth-internal"
4495
4637
  /* _ComponentName.AUTH_INTERNAL */
4496
4638
  ).initialize();
4497
- })), ze(new qe(
4639
+ })), Ze(new et(
4498
4640
  "auth-internal",
4499
4641
  (e) => {
4500
- const t = me(e.getProvider(
4642
+ const t = ke(e.getProvider(
4501
4643
  "auth"
4502
4644
  /* _ComponentName.AUTH */
4503
4645
  ).getImmediate());
4504
- return ((i) => new Rr(i))(t);
4646
+ return ((i) => new Yr(i))(t);
4505
4647
  },
4506
4648
  "PRIVATE"
4507
4649
  /* ComponentType.PRIVATE */
4508
4650
  ).setInstantiationMode(
4509
4651
  "EXPLICIT"
4510
4652
  /* InstantiationMode.EXPLICIT */
4511
- )), Se(lt, ut, Ar(n)), Se(lt, ut, "esm2017");
4653
+ )), Oe(gt, _t, Xr(n)), Oe(gt, _t, "esm2017");
4512
4654
  }
4513
4655
  /**
4514
4656
  * @license
@@ -4526,117 +4668,118 @@ function Pr(n) {
4526
4668
  * See the License for the specific language governing permissions and
4527
4669
  * limitations under the License.
4528
4670
  */
4529
- const Cr = 5 * 60, Or = gt("authIdTokenMaxAge") || Cr;
4530
- let dt = null;
4531
- const Nr = (n) => async (e) => {
4671
+ const Zr = 5 * 60, es = kt("authIdTokenMaxAge") || Zr;
4672
+ let vt = null;
4673
+ const ts = (n) => async (e) => {
4532
4674
  const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
4533
- if (i && i > Or)
4675
+ if (i && i > es)
4534
4676
  return;
4535
4677
  const r = t == null ? void 0 : t.token;
4536
- dt !== r && (dt = r, await fetch(n, {
4678
+ vt !== r && (vt = r, await fetch(n, {
4537
4679
  method: r ? "POST" : "DELETE",
4538
4680
  headers: r ? {
4539
4681
  Authorization: `Bearer ${r}`
4540
4682
  } : {}
4541
4683
  }));
4542
4684
  };
4543
- function Lr(n = yn()) {
4544
- const e = _t(n, "auth");
4685
+ function ns(n = Sn()) {
4686
+ const e = Et(n, "auth");
4545
4687
  if (e.isInitialized())
4546
4688
  return e.getImmediate();
4547
- const t = li(n, {
4548
- popupRedirectResolver: Sr,
4689
+ const t = Oi(n, {
4690
+ popupRedirectResolver: Jr,
4549
4691
  persistence: [
4550
- Fi,
4551
- bi,
4552
- Gt
4692
+ or,
4693
+ Ki,
4694
+ Qt
4553
4695
  ]
4554
- }), i = gt("authTokenSyncURL");
4696
+ }), i = kt("authTokenSyncURL");
4555
4697
  if (i && typeof isSecureContext == "boolean" && isSecureContext) {
4556
4698
  const s = new URL(i, location.origin);
4557
4699
  if (location.origin === s.origin) {
4558
- const o = Nr(s.toString());
4559
- yi(t, o, () => o(t.currentUser)), Ti(t, (c) => o(c));
4700
+ const o = ts(s.toString());
4701
+ Gi(t, o, () => o(t.currentUser)), Wi(t, (c) => o(c));
4560
4702
  }
4561
4703
  }
4562
- const r = Tn("auth");
4563
- return r && di(t, `http://${r}`), t;
4704
+ const r = bn("auth");
4705
+ return r && Mi(t, `http://${r}`), t;
4564
4706
  }
4565
- function Mr() {
4707
+ function is() {
4566
4708
  var n, e;
4567
4709
  return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
4568
4710
  }
4569
- si({
4711
+ Ai({
4570
4712
  loadJS(n) {
4571
4713
  return new Promise((e, t) => {
4572
4714
  const i = document.createElement("script");
4573
4715
  i.setAttribute("src", n), i.onload = e, i.onerror = (r) => {
4574
- const s = T(
4716
+ const s = E(
4575
4717
  "internal-error"
4576
4718
  /* AuthErrorCode.INTERNAL_ERROR */
4577
4719
  );
4578
4720
  s.customData = r, t(s);
4579
- }, i.type = "text/javascript", i.charset = "UTF-8", Mr().appendChild(i);
4721
+ }, i.type = "text/javascript", i.charset = "UTF-8", is().appendChild(i);
4580
4722
  });
4581
4723
  },
4582
4724
  gapiScript: "https://apis.google.com/js/api.js",
4583
4725
  recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
4584
4726
  recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
4585
4727
  });
4586
- Pr(
4728
+ Qr(
4587
4729
  "Browser"
4588
4730
  /* ClientPlatform.BROWSER */
4589
4731
  );
4590
- var Ur = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, Dr = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
4591
- const Fr = {
4592
- key: 1,
4732
+ var rs = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, ss = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
4733
+ const os = {
4734
+ key: 2,
4593
4735
  class: "h-full w-full"
4594
- }, xr = ["src"], Zr = /* @__PURE__ */ ht({
4736
+ }, as = ["src"], ks = /* @__PURE__ */ De({
4595
4737
  __name: "App",
4596
4738
  setup(n) {
4597
- const e = be(), t = cn(), i = ln(), r = un(), s = dn(), o = mt(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = be(), d = te(!1), h = Ee(() => i.version), p = Ee(() => {
4598
- const m = e.currentCountry.value || "MY", g = Ke.getIdToken(), I = l.value._id;
4599
- return `${Dr.marketingV1Portal}/b/${I}/marketing/overview?showHeader=false&country=${m}&token=${g}`;
4739
+ const e = me(), t = fn(), i = pn(), r = mn(), s = gn(), o = wt(), c = ee(o.query.showHeader !== "false"), a = ee(!1), { currentBusiness: l } = me(), d = ee(!1), h = ne(() => i.version), m = ne(() => {
4740
+ const g = e.currentCountry.value || "MY", v = tt.getIdToken(), T = l.value._id;
4741
+ return `${ss.marketingV1Portal}/b/${T}/marketing/overview?showHeader=false&country=${g}&token=${v}`;
4600
4742
  });
4601
- async function w() {
4602
- if (Sn().length) {
4743
+ async function I() {
4744
+ if (Nn().length) {
4603
4745
  console.warn("CONNECT: initFirebase: Firebase already initialized");
4604
4746
  return;
4605
4747
  }
4606
- const m = Rn(Ur.firebase), g = await an.getCustomToken(), I = Lr();
4607
- await Ii(I, g), An(m), console.log("initFirebase", m);
4748
+ const g = On(rs.firebase), v = await hn.getCustomToken(), T = ns();
4749
+ await ji(T, v), Ln(g), console.log("initFirebase", g);
4608
4750
  }
4609
- const U = async () => {
4610
- d.value = !1, await rn(), console.log("forceRerender"), Ke.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(Nn) : e.hideSidebarToggle(!0), await w(), a.value = !0, d.value = !0;
4751
+ const w = async () => {
4752
+ d.value = !1, await un(), console.log("forceRerender"), tt.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(xn) : e.hideSidebarToggle(!0), await I(), a.value = !0, d.value = !0;
4611
4753
  };
4612
- return en(() => {
4613
- if (Pn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
4614
- const m = document.getElementsByClassName("app-header")[0], g = document.getElementsByClassName("app-sidebar")[0], I = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
4615
- m == null || m.classList.add("!hidden"), g == null || g.classList.add("!pt-0"), I == null || I.classList.add("!pt-0"), x == null || x.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4754
+ return ln(() => {
4755
+ if (Mn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
4756
+ const g = document.getElementsByClassName("app-header")[0], v = document.getElementsByClassName("app-sidebar")[0], T = document.getElementsByClassName("app-container")[0], M = document.getElementsByTagName("main")[0];
4757
+ g == null || g.classList.add("!hidden"), v == null || v.classList.add("!pt-0"), T == null || T.classList.add("!pt-0"), M == null || M.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4616
4758
  }
4617
- l.value != null && (console.log("App mounted, forceRerender"), U());
4618
- }), ft(
4759
+ l.value != null && (console.log("App mounted, forceRerender"), w());
4760
+ }), xe(
4619
4761
  () => e.currentBusiness.value,
4620
- async (m, g) => {
4621
- console.log("Current business changed"), m != null && m._id != g._id && (console.log("forceRerender when business changes", m, g), U());
4762
+ async (g, v) => {
4763
+ console.log("Current business changed"), g != null && g._id != v._id && (console.log("forceRerender when business changes", g, v), w());
4622
4764
  }
4623
- ), (m, g) => (ne(), ke(tn, null, [
4624
- v(d) && v(h) === "v2" ? (ne(), nn(v(on), { key: 0 })) : Ge("", !0),
4625
- v(d) && v(h) !== "v2" ? (ne(), ke("div", Fr, [
4626
- pt(pn, {
4627
- json: { url: v(p) }
4765
+ ), (g, v) => (H(), pe(It, null, [
4766
+ p(d) && p(h) === "v2" ? (H(), Ne(p(dn), { key: 0 })) : Ae("", !0),
4767
+ p(d) && p(h) === "v2" && p(c) ? (H(), Ne(ti, { key: 1 })) : Ae("", !0),
4768
+ p(d) && p(h) !== "v2" ? (H(), pe("div", os, [
4769
+ S(In, {
4770
+ json: { url: p(m) }
4628
4771
  }, null, 8, ["json"]),
4629
- ie("iframe", {
4772
+ _("iframe", {
4630
4773
  allow: "clipboard-read; clipboard-write",
4631
4774
  frameBorder: "0",
4632
4775
  height: "100%",
4633
4776
  width: "100%",
4634
- src: v(p)
4635
- }, null, 8, xr)
4636
- ])) : Ge("", !0)
4777
+ src: p(m)
4778
+ }, null, 8, as)
4779
+ ])) : Ae("", !0)
4637
4780
  ], 64));
4638
4781
  }
4639
4782
  });
4640
4783
  export {
4641
- Zr as default
4784
+ ks as default
4642
4785
  };