@feedmepos/mf-connect 0.1.38-beta.2 → 0.1.39-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Analytic-D8WCDkga.js +427 -0
- package/dist/{App-D11A2JY1.js → App-CTnXtg1W.js} +352 -364
- package/dist/{Bin-9wV4Ah3M.js → Bin-BY6-bvFj.js} +8 -8
- package/dist/{Broadcast-I3BtSk8V.js → Broadcast-5VTEIQAr.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BuAQxEM4.js} +18 -18
- package/dist/{Card-CqALG5RM.js → Card-8ivdV-Qz.js} +159 -159
- package/dist/{Collections-rg3SzoUb.js → Collections-CFszRHmE.js} +91 -103
- package/dist/{Credit-BNn1sYZv.js → Credit-DFslY__4.js} +74 -74
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BvCLYtJ3.js} +488 -489
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js → EffectSheet.vue_vue_type_style_index_0_lang-Ci_bp7GH.js} +94 -94
- package/dist/{Experience-D_Qm8SUj.js → Experience-BxfiZNlY.js} +41 -41
- package/dist/{Game-CKXgXm6Q.js → Game-0FZJcLmj.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{Index-D4DGfUHd.js → Index-ByeKKbuM.js} +10 -10
- package/dist/Marketing-C7F4abzg.js +319 -0
- package/dist/{Member-B55vWHDd.js → Member-DP0fLSIV.js} +64 -64
- package/dist/MemberList-DFW2bMbr.js +1606 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-CP5EI-W0.js → MemberTransactions-CW62fvgx.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-iJXNbgsB.js +455 -0
- package/dist/{Mission-CFvhROuB.js → Mission-DEgQHJw6.js} +21 -21
- package/dist/{Overview-4273yNwL.js → Overview-5jDtZKi8.js} +335 -335
- package/dist/{Point-B_-_C919.js → Point-D2lB1-xB.js} +41 -41
- package/dist/{Promotion-D2S3COxk.js → Promotion-Diz1gIa0.js} +42 -42
- package/dist/{Queue-BmS1Oi-C.js → Queue-DIAuq7HG.js} +51 -51
- package/dist/{Record-DRBl0M8g.js → Record-T608yda1.js} +9 -9
- package/dist/{Reward-8056NmfK.js → Reward-fZzHrHCW.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js → RewardGroup.vue_vue_type_script_setup_true_lang-YOKVfimM.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js → RuleGroup.vue_vue_type_script_setup_true_lang-C3_lmBe5.js} +431 -431
- package/dist/Segment-DDQIzsrk.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js → SelectItems.vue_vue_type_script_setup_true_lang-B5oUf91Q.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C2U6Kzvx.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRmqgxES.js} +3 -3
- package/dist/{Setting-BrJfYoru.js → Setting-CQNyXmp4.js} +432 -432
- package/dist/{Store-Bpl_4yZW.js → Store-CIA1Rtsg.js} +210 -210
- package/dist/StoreRewards-D5zlE6cE.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BkTYngJ_.js +995 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D8l3fQyz.js} +1 -1
- package/dist/{Tier-_LnXg3n6.js → Tier-jFXVOje_.js} +106 -106
- package/dist/{Title-B7AGStvx.js → Title-DVpZ1YMK.js} +131 -133
- package/dist/{Transaction-Chxv6V7u.js → Transaction-BF_wmok6.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cex1Z43W.js} +6 -6
- package/dist/{Voucher-C5z2kOq9.js → Voucher-CaBMU5w0.js} +37 -37
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BXt2fLOD.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js → ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js} +1 -1
- package/dist/{app-BVojNX0w.js → app-CPhyKlyf.js} +1 -1
- package/dist/{app-7cvPyHJ7.js → app-DuIzRGvb.js} +124 -161
- package/dist/app.js +3 -4
- package/dist/{business-CmxV69wT.js → business-TTvv3aTz.js} +1 -1
- package/dist/{campaign-Dq5C_no-.js → campaign-BiMCoAzx.js} +3 -5
- package/dist/{campaign-CT_cNJEL.js → campaign-CjEVStN1.js} +9 -9
- package/dist/{campaign.enum-dp7yHKzF.js → campaign.enum-DpYmj9jp.js} +1 -1
- package/dist/campaign.fn-DJ6J98jS.js +758 -0
- package/dist/{collectible.enum-DxbB4DxT.js → collectible.enum-Cgmm_s-C.js} +1 -1
- package/dist/{collection.fn-CNZRdUgy.js → collection.fn-BsYCNgfJ.js} +2 -2
- package/dist/{dto-CT9zZbv9.js → dto-DgmHIlZ2.js} +4 -4
- package/dist/{effect-FIlOEC4H.js → effect-DnAVIDFy.js} +1 -1
- package/dist/{email-addresses-Ba7xImfX.js → email-addresses-CMRgb6Uv.js} +1 -1
- package/dist/{export-uzjZFNF9.js → export-DtarK6IJ.js} +3 -3
- package/dist/{helper-D4sAZde0.js → helper-BKZghMbF.js} +1 -1
- package/dist/{index-l2F5MnLF.js → index-2OAcPmuQ.js} +1 -1
- package/dist/{index-BI3m1Ehv.js → index-B0YZKHyu.js} +3 -3
- package/dist/{index-CH3z92VV.js → index-B5oXFFlO.js} +1 -1
- package/dist/{index-CvBcve-r.js → index-BQ3KHJXX.js} +1 -1
- package/dist/{index-B9pl4zRZ.js → index-B_893fH7.js} +79 -179
- package/dist/{index-CNJLP3D5.js → index-BoR-BOFw.js} +1 -1
- package/dist/{index-DNxa8Rqx.js → index-C7rl1eHp.js} +449 -516
- package/dist/{index-BXz54M1s.js → index-CBcbwf0k.js} +1 -1
- package/dist/{index-CS3Jmojj.js → index-CIztuDE4.js} +2462 -2453
- package/dist/{index-D5rvMvzx.js → index-CK67enPK.js} +1 -1
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-D2uZzjpn.js +44 -0
- package/dist/{index-CUfS9Kp1.js → index-DWdAUovq.js} +9 -9
- package/dist/{index-CONvJfKv.js → index-DkWcEDHA.js} +1 -1
- package/dist/{index-BjU8LVUC.js → index-VHu8hYtE.js} +385 -376
- package/dist/{index.esm2017-ATcsD5N4.js → index.esm2017-DkwLmmR_.js} +127 -127
- package/dist/{loading-BWGQSrCB.js → loading-BFkEqWR6.js} +1 -1
- package/dist/{membership-Cc4OZ8-U.js → membership-D0eN3i_T.js} +3 -3
- package/dist/{money-D7p8nfun.js → money-DS9ZQwSP.js} +1 -1
- package/dist/{number-CMJjC4qz.js → number-C8Gt93v9.js} +1 -1
- package/dist/objectid-Cr99eTPd.js +145 -0
- package/dist/{plugins-eQis66QR.js → plugins-DK_ue6Xa.js} +2 -2
- package/dist/{reward-DrnzbG20.js → reward-CW2dSLDW.js} +1 -1
- package/dist/{rule-CtRxkYXB.js → rule-CebKyXSm.js} +3 -3
- package/dist/{rule-builder-Di9RIYHF.js → rule-builder-kQq14RfN.js} +17 -17
- package/dist/style.css +1 -1
- package/dist/{template-C3UfY0v5.js → template-CxUxlb6-.js} +64 -64
- package/dist/{trigger-C9U7Zgad.js → trigger-RqJo06KA.js} +4 -4
- package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
- package/dist/{user-D7n9yYmO.js → user-DhV5Iy52.js} +1 -1
- package/dist/{vue-i18n-Bz45zC04.js → vue-i18n-BtvUK9hI.js} +419 -419
- package/dist/{xlsx-D4S4qbcZ.js → xlsx-WnLDq4qn.js} +381 -381
- package/package.json +3 -9
- package/dist/Analytic-BjSfI2Ff.js +0 -761
- package/dist/AuditLogs-DWCFYoRg.js +0 -1887
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +0 -58
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
- package/dist/Marketing-Dn9A1vgH.js +0 -20073
- package/dist/MemberList-BWTG9Ohy.js +0 -1606
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +0 -60279
- package/dist/Segment-Bzq-pyhc.js +0 -882
- package/dist/StoreRewards-Cu7n7Pjz.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +0 -1029
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +0 -419
- package/dist/campaign.fn-BYZgKDN7.js +0 -758
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-CwsMG2cV.js +0 -56
- package/dist/objectid-D5T27iny.js +0 -145
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
|
@@ -1,127 +1,122 @@
|
|
|
1
|
-
import { defineComponent as lt, ref as
|
|
1
|
+
import { defineComponent as lt, ref as te, h as G, watch as ut, resolveComponent as Yt, openBlock as ne, createBlock as dt, unref as P, computed as Ve, onMounted as Xt, createElementBlock as $e, Fragment as Qt, createCommentVNode as He, createVNode as Zt, createElementVNode as en, nextTick as tn } from "vue";
|
|
2
2
|
import { useRouter as nn, useRoute as ht, RouterView as rn } from "vue-router";
|
|
3
3
|
import { useCoreStore as We, FeedMeAuth as sn } from "@feedmepos/mf-common";
|
|
4
4
|
import { u as on } from "./app-wDQR6dpb.js";
|
|
5
|
-
import { u as an } from "./business-
|
|
6
|
-
import "./index-
|
|
5
|
+
import { u as an } from "./business-TTvv3aTz.js";
|
|
6
|
+
import "./index-BoR-BOFw.js";
|
|
7
7
|
import { components as q, useSnackbar as cn, useDialog as ln } from "@feedmepos/ui-library";
|
|
8
|
-
import { u as un } from "./vue-i18n-
|
|
9
|
-
import { R as
|
|
8
|
+
import { u as un } from "./vue-i18n-BtvUK9hI.js";
|
|
9
|
+
import { R as f } from "./app-DuIzRGvb.js";
|
|
10
10
|
import { J as dn } from "./JsonViewer-v8_C7l5N.js";
|
|
11
|
-
import { r as ye, L as hn, g as ft, i as fn, a as pn, _ as je, C as
|
|
11
|
+
import { r as ye, L as hn, g as ft, i as fn, a as pn, _ as je, C as Be, b as mn, S as J, c as w, d as j, E as Se, e as gn, f as pt, h as _n, j as vn, k as mt, l as g, m as In, F as Re, n as Tn, q as Y, o as wn, p as yn, s as En, t as kn, u as bn } from "./index.esm2017-DkwLmmR_.js";
|
|
12
12
|
import { _ as Pe } from "./tslib.es6-BCqqvLQ_.js";
|
|
13
|
-
import { S as
|
|
14
|
-
|
|
15
|
-
const Pn = /* @__PURE__ */ lt({
|
|
13
|
+
import { S as Ge, c as Sn } from "./index-VHu8hYtE.js";
|
|
14
|
+
const Rn = /* @__PURE__ */ lt({
|
|
16
15
|
__name: "NavigationTab",
|
|
17
16
|
setup(n) {
|
|
18
|
-
const { t: e } = un(), t =
|
|
17
|
+
const { t: e } = un(), t = te(), i = [
|
|
19
18
|
{
|
|
20
19
|
label: e("connect.navigation.analytic"),
|
|
21
|
-
value:
|
|
20
|
+
value: f["$connect-ANALYTIC"]
|
|
22
21
|
},
|
|
23
22
|
{
|
|
24
23
|
label: e("connect.navigation.campaign"),
|
|
25
|
-
value:
|
|
24
|
+
value: f["$connect-CAMPAIGN"],
|
|
26
25
|
children: [
|
|
27
26
|
{
|
|
28
27
|
label: e("connect.navigation.promotion"),
|
|
29
|
-
value:
|
|
28
|
+
value: f["$connect-CAMPAIGN_PROMOTION"]
|
|
30
29
|
},
|
|
31
30
|
{
|
|
32
31
|
label: e("connect.navigation.voucher"),
|
|
33
|
-
value:
|
|
32
|
+
value: f["$connect-CAMPAIGN_VOUCHER"]
|
|
34
33
|
},
|
|
35
34
|
{
|
|
36
35
|
label: e("connect.navigation.broadcast"),
|
|
37
|
-
value:
|
|
36
|
+
value: f["$connect-CAMPAIGN_BROADCAST"]
|
|
38
37
|
}
|
|
39
38
|
]
|
|
40
39
|
},
|
|
41
40
|
{
|
|
42
41
|
label: e("connect.navigation.program"),
|
|
43
|
-
value:
|
|
42
|
+
value: f["$connect-PROGRAM"],
|
|
44
43
|
children: [
|
|
45
44
|
{
|
|
46
45
|
label: e("connect.navigation.tier"),
|
|
47
|
-
value:
|
|
46
|
+
value: f["$connect-PROGRAM_TIER"]
|
|
48
47
|
},
|
|
49
48
|
{
|
|
50
49
|
label: e("connect.navigation.title"),
|
|
51
|
-
value:
|
|
50
|
+
value: f["$connect-PROGRAM_TITLE"]
|
|
52
51
|
},
|
|
53
52
|
{
|
|
54
53
|
label: e("connect.navigation.experience"),
|
|
55
|
-
value:
|
|
54
|
+
value: f["$connect-PROGRAM_EXPERIENCE"]
|
|
56
55
|
},
|
|
57
56
|
{
|
|
58
57
|
label: e("connect.navigation.point"),
|
|
59
|
-
value:
|
|
60
|
-
badge: () =>
|
|
58
|
+
value: f["$connect-PROGRAM_POINT"],
|
|
59
|
+
badge: () => G(q.FmPill, { variant: "premium" })
|
|
61
60
|
},
|
|
62
61
|
{
|
|
63
62
|
label: e("connect.navigation.credit"),
|
|
64
|
-
value:
|
|
63
|
+
value: f["$connect-PROGRAM_CREDIT"]
|
|
65
64
|
},
|
|
66
65
|
{
|
|
67
66
|
label: e("connect.navigation.game"),
|
|
68
|
-
value:
|
|
69
|
-
badge: () =>
|
|
67
|
+
value: f["$connect-PROGRAM_GAME"],
|
|
68
|
+
badge: () => G(q.FmPill, { variant: "premium" })
|
|
70
69
|
},
|
|
71
70
|
{
|
|
72
71
|
label: "Mission",
|
|
73
|
-
value:
|
|
72
|
+
value: f["$connect-PROGRAM_MISSION"]
|
|
74
73
|
}
|
|
75
74
|
]
|
|
76
75
|
},
|
|
77
76
|
{
|
|
78
77
|
label: e("connect.navigation.loyalty"),
|
|
79
|
-
value:
|
|
78
|
+
value: f["$connect-LOYALTY"],
|
|
80
79
|
children: [
|
|
81
80
|
{
|
|
82
81
|
label: e("connect.navigation.member"),
|
|
83
|
-
value:
|
|
82
|
+
value: f["$connect-LOYALTY_MEMBER_LIST"]
|
|
84
83
|
},
|
|
85
84
|
{
|
|
86
85
|
label: e("connect.navigation.segments"),
|
|
87
|
-
value:
|
|
88
|
-
badge: () =>
|
|
86
|
+
value: f["$connect-LOYALTY_SEGMENT"],
|
|
87
|
+
badge: () => G(q.FmPill, { variant: "premium" })
|
|
89
88
|
},
|
|
90
89
|
{
|
|
91
90
|
label: e("connect.navigation.card"),
|
|
92
|
-
value:
|
|
93
|
-
badge: () =>
|
|
91
|
+
value: f["$connect-LOYALTY_CARD"],
|
|
92
|
+
badge: () => G(q.FmPill, { variant: "premium" })
|
|
94
93
|
}
|
|
95
94
|
]
|
|
96
95
|
},
|
|
97
96
|
{
|
|
98
97
|
label: e("connect.navigation.referral"),
|
|
99
|
-
value:
|
|
100
|
-
badge: () =>
|
|
98
|
+
value: f["$connect-REFERRAL"],
|
|
99
|
+
badge: () => G(q.FmPill, { variant: "premium" })
|
|
101
100
|
},
|
|
102
101
|
{
|
|
103
102
|
label: e("connect.navigation.store"),
|
|
104
|
-
value:
|
|
103
|
+
value: f["$connect-STORE"]
|
|
105
104
|
},
|
|
106
105
|
{
|
|
107
106
|
label: e("connect.navigation.transaction"),
|
|
108
|
-
value:
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
label: "Marketing material",
|
|
112
|
-
value: h["$connect-MARKETING"]
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
label: e("connect.navigation.auditLogs"),
|
|
116
|
-
value: h["$connect-AUDIT_LOGS"]
|
|
107
|
+
value: f["$connect-TRANSACTION"]
|
|
117
108
|
},
|
|
109
|
+
// {
|
|
110
|
+
// label: 'Marketing material',
|
|
111
|
+
// value: ROUTE_NAME['$connect-MARKETING'],
|
|
112
|
+
// },
|
|
118
113
|
{
|
|
119
114
|
label: e("connect.navigation.setting"),
|
|
120
|
-
value:
|
|
115
|
+
value: f["$connect-SETTING"]
|
|
121
116
|
},
|
|
122
117
|
{
|
|
123
118
|
label: e("connect.navigation.bin"),
|
|
124
|
-
value:
|
|
119
|
+
value: f["$connect-BIN"]
|
|
125
120
|
}
|
|
126
121
|
], r = nn(), s = ht(), o = i.reduce((a, l) => [...(l.children ?? []).map((d) => d.value), ...a, l.value], []);
|
|
127
122
|
ut(
|
|
@@ -136,18 +131,18 @@ const Pn = /* @__PURE__ */ lt({
|
|
|
136
131
|
await r.push({ name: a });
|
|
137
132
|
}
|
|
138
133
|
return (a, l) => {
|
|
139
|
-
var
|
|
134
|
+
var h;
|
|
140
135
|
const d = Yt("FmCollapsibleTabs");
|
|
141
|
-
return
|
|
136
|
+
return ne(), dt(d, {
|
|
142
137
|
class: "border-fm-color-neutral-gray-100 border-r py-16 px-4",
|
|
143
|
-
"model-value": (
|
|
138
|
+
"model-value": (h = P(t)) == null ? void 0 : h.toString(),
|
|
144
139
|
items: i,
|
|
145
140
|
"onUpdate:modelValue": c
|
|
146
141
|
}, null, 8, ["model-value"]);
|
|
147
142
|
};
|
|
148
143
|
}
|
|
149
144
|
});
|
|
150
|
-
var
|
|
145
|
+
var Pn = "firebase", An = "10.12.4";
|
|
151
146
|
/**
|
|
152
147
|
* @license
|
|
153
148
|
* Copyright 2020 Google LLC
|
|
@@ -164,13 +159,13 @@ var An = "firebase", Cn = "10.12.4";
|
|
|
164
159
|
* See the License for the specific language governing permissions and
|
|
165
160
|
* limitations under the License.
|
|
166
161
|
*/
|
|
167
|
-
ye(
|
|
162
|
+
ye(Pn, An, "app");
|
|
168
163
|
function gt() {
|
|
169
164
|
return {
|
|
170
165
|
"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."
|
|
171
166
|
};
|
|
172
167
|
}
|
|
173
|
-
const
|
|
168
|
+
const Cn = gt, _t = new Se("auth", "Firebase", gt());
|
|
174
169
|
/**
|
|
175
170
|
* @license
|
|
176
171
|
* Copyright 2020 Google LLC
|
|
@@ -187,12 +182,12 @@ const On = gt, _t = new Se("auth", "Firebase", gt());
|
|
|
187
182
|
* See the License for the specific language governing permissions and
|
|
188
183
|
* limitations under the License.
|
|
189
184
|
*/
|
|
190
|
-
const
|
|
191
|
-
function
|
|
192
|
-
|
|
185
|
+
const ae = new hn("@firebase/auth");
|
|
186
|
+
function On(n, ...e) {
|
|
187
|
+
ae.logLevel <= mt.WARN && ae.warn(`Auth (${J}): ${n}`, ...e);
|
|
193
188
|
}
|
|
194
|
-
function
|
|
195
|
-
|
|
189
|
+
function ie(n, ...e) {
|
|
190
|
+
ae.logLevel <= mt.ERROR && ae.error(`Auth (${J}): ${n}`, ...e);
|
|
196
191
|
}
|
|
197
192
|
/**
|
|
198
193
|
* @license
|
|
@@ -217,7 +212,7 @@ function I(n, ...e) {
|
|
|
217
212
|
return Ae(n, ...e);
|
|
218
213
|
}
|
|
219
214
|
function vt(n, e, t) {
|
|
220
|
-
const i = Object.assign(Object.assign({},
|
|
215
|
+
const i = Object.assign(Object.assign({}, Cn()), { [e]: t });
|
|
221
216
|
return new Se("auth", "Firebase", i).create(e, {
|
|
222
217
|
appName: n.name
|
|
223
218
|
});
|
|
@@ -238,7 +233,7 @@ function u(n, e, ...t) {
|
|
|
238
233
|
}
|
|
239
234
|
function y(n) {
|
|
240
235
|
const e = "INTERNAL ASSERTION FAILED: " + n;
|
|
241
|
-
throw
|
|
236
|
+
throw ie(e), new Error(e);
|
|
242
237
|
}
|
|
243
238
|
function S(n, e) {
|
|
244
239
|
n || y(e);
|
|
@@ -263,7 +258,7 @@ function Ee() {
|
|
|
263
258
|
var n;
|
|
264
259
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
265
260
|
}
|
|
266
|
-
function
|
|
261
|
+
function Nn() {
|
|
267
262
|
return qe() === "http:" || qe() === "https:";
|
|
268
263
|
}
|
|
269
264
|
function qe() {
|
|
@@ -286,15 +281,15 @@ function qe() {
|
|
|
286
281
|
* See the License for the specific language governing permissions and
|
|
287
282
|
* limitations under the License.
|
|
288
283
|
*/
|
|
289
|
-
function
|
|
284
|
+
function Ln() {
|
|
290
285
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
291
286
|
// This is especially true for Cordova apps which have unreliable
|
|
292
287
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
293
288
|
// installed which overwrites the native navigator.onLine value and
|
|
294
289
|
// defines navigator.connection.
|
|
295
|
-
(
|
|
290
|
+
(Nn() || mn() || "connection" in navigator) ? navigator.onLine : !0;
|
|
296
291
|
}
|
|
297
|
-
function
|
|
292
|
+
function Mn() {
|
|
298
293
|
if (typeof navigator > "u")
|
|
299
294
|
return null;
|
|
300
295
|
const n = navigator;
|
|
@@ -327,7 +322,7 @@ class X {
|
|
|
327
322
|
this.shortDelay = e, this.longDelay = t, S(t > e, "Short delay should be less than long delay!"), this.isMobile = fn() || pn();
|
|
328
323
|
}
|
|
329
324
|
get() {
|
|
330
|
-
return
|
|
325
|
+
return Ln() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
331
326
|
}
|
|
332
327
|
}
|
|
333
328
|
/**
|
|
@@ -421,7 +416,7 @@ class It {
|
|
|
421
416
|
* See the License for the specific language governing permissions and
|
|
422
417
|
* limitations under the License.
|
|
423
418
|
*/
|
|
424
|
-
const
|
|
419
|
+
const Un = {
|
|
425
420
|
// Custom token errors.
|
|
426
421
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
|
427
422
|
// This can only happen if the SDK sends a bad request.
|
|
@@ -512,11 +507,11 @@ const Dn = {
|
|
|
512
507
|
* See the License for the specific language governing permissions and
|
|
513
508
|
* limitations under the License.
|
|
514
509
|
*/
|
|
515
|
-
const
|
|
516
|
-
function
|
|
510
|
+
const Dn = new X(3e4, 6e4);
|
|
511
|
+
function he(n, e) {
|
|
517
512
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
518
513
|
}
|
|
519
|
-
async function
|
|
514
|
+
async function B(n, e, t, i, r = {}) {
|
|
520
515
|
return Tt(n, r, async () => {
|
|
521
516
|
let s = {}, o = {};
|
|
522
517
|
i && (e === "GET" ? o = i : s = {
|
|
@@ -538,26 +533,26 @@ async function G(n, e, t, i, r = {}) {
|
|
|
538
533
|
}
|
|
539
534
|
async function Tt(n, e, t) {
|
|
540
535
|
n._canInitEmulator = !1;
|
|
541
|
-
const i = Object.assign(Object.assign({},
|
|
536
|
+
const i = Object.assign(Object.assign({}, Un), e);
|
|
542
537
|
try {
|
|
543
|
-
const r = new
|
|
538
|
+
const r = new Fn(n), s = await Promise.race([
|
|
544
539
|
t(),
|
|
545
540
|
r.promise
|
|
546
541
|
]);
|
|
547
542
|
r.clearNetworkTimeout();
|
|
548
543
|
const o = await s.json();
|
|
549
544
|
if ("needConfirmation" in o)
|
|
550
|
-
throw
|
|
545
|
+
throw ee(n, "account-exists-with-different-credential", o);
|
|
551
546
|
if (s.ok && !("errorMessage" in o))
|
|
552
547
|
return o;
|
|
553
548
|
{
|
|
554
549
|
const c = s.ok ? o.errorMessage : o.error.message, [a, l] = c.split(" : ");
|
|
555
550
|
if (a === "FEDERATED_USER_ID_ALREADY_LINKED")
|
|
556
|
-
throw
|
|
551
|
+
throw ee(n, "credential-already-in-use", o);
|
|
557
552
|
if (a === "EMAIL_EXISTS")
|
|
558
|
-
throw
|
|
553
|
+
throw ee(n, "email-already-in-use", o);
|
|
559
554
|
if (a === "USER_DISABLED")
|
|
560
|
-
throw
|
|
555
|
+
throw ee(n, "user-disabled", o);
|
|
561
556
|
const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
|
|
562
557
|
if (l)
|
|
563
558
|
throw vt(n, d, l);
|
|
@@ -570,7 +565,7 @@ async function Tt(n, e, t) {
|
|
|
570
565
|
}
|
|
571
566
|
}
|
|
572
567
|
async function wt(n, e, t, i, r = {}) {
|
|
573
|
-
const s = await
|
|
568
|
+
const s = await B(n, e, t, i, r);
|
|
574
569
|
return "mfaPendingCredential" in s && b(n, "multi-factor-auth-required", {
|
|
575
570
|
_serverResponse: s
|
|
576
571
|
}), s;
|
|
@@ -579,21 +574,21 @@ function yt(n, e, t, i) {
|
|
|
579
574
|
const r = `${e}${t}?${i}`;
|
|
580
575
|
return n.config.emulator ? Ce(n.config, r) : `${n.config.apiScheme}://${r}`;
|
|
581
576
|
}
|
|
582
|
-
class
|
|
577
|
+
class Fn {
|
|
583
578
|
constructor(e) {
|
|
584
579
|
this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
|
|
585
580
|
this.timer = setTimeout(() => i(I(
|
|
586
581
|
this.auth,
|
|
587
582
|
"network-request-failed"
|
|
588
583
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
589
|
-
)),
|
|
584
|
+
)), Dn.get());
|
|
590
585
|
});
|
|
591
586
|
}
|
|
592
587
|
clearNetworkTimeout() {
|
|
593
588
|
clearTimeout(this.timer);
|
|
594
589
|
}
|
|
595
590
|
}
|
|
596
|
-
function
|
|
591
|
+
function ee(n, e, t) {
|
|
597
592
|
const i = {
|
|
598
593
|
appName: n.name
|
|
599
594
|
};
|
|
@@ -617,11 +612,11 @@ function te(n, e, t) {
|
|
|
617
612
|
* See the License for the specific language governing permissions and
|
|
618
613
|
* limitations under the License.
|
|
619
614
|
*/
|
|
620
|
-
async function
|
|
621
|
-
return
|
|
615
|
+
async function xn(n, e) {
|
|
616
|
+
return B(n, "POST", "/v1/accounts:delete", e);
|
|
622
617
|
}
|
|
623
618
|
async function Et(n, e) {
|
|
624
|
-
return
|
|
619
|
+
return B(n, "POST", "/v1/accounts:lookup", e);
|
|
625
620
|
}
|
|
626
621
|
/**
|
|
627
622
|
* @license
|
|
@@ -648,7 +643,7 @@ function z(n) {
|
|
|
648
643
|
} catch {
|
|
649
644
|
}
|
|
650
645
|
}
|
|
651
|
-
async function
|
|
646
|
+
async function Vn(n, e = !1) {
|
|
652
647
|
const t = j(n), i = await t.getIdToken(e), r = Oe(i);
|
|
653
648
|
u(
|
|
654
649
|
r && r.exp && r.auth_time && r.iat,
|
|
@@ -673,12 +668,12 @@ function Te(n) {
|
|
|
673
668
|
function Oe(n) {
|
|
674
669
|
const [e, t, i] = n.split(".");
|
|
675
670
|
if (e === void 0 || t === void 0 || i === void 0)
|
|
676
|
-
return
|
|
671
|
+
return ie("JWT malformed, contained fewer than 3 sections"), null;
|
|
677
672
|
try {
|
|
678
673
|
const r = Tn(t);
|
|
679
|
-
return r ? JSON.parse(r) : (
|
|
674
|
+
return r ? JSON.parse(r) : (ie("Failed to decode base64 JWT payload"), null);
|
|
680
675
|
} catch (r) {
|
|
681
|
-
return
|
|
676
|
+
return ie("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
|
|
682
677
|
}
|
|
683
678
|
}
|
|
684
679
|
function ze(n) {
|
|
@@ -719,10 +714,10 @@ async function K(n, e, t = !1) {
|
|
|
719
714
|
try {
|
|
720
715
|
return await e;
|
|
721
716
|
} catch (i) {
|
|
722
|
-
throw i instanceof Re &&
|
|
717
|
+
throw i instanceof Re && $n(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
|
|
723
718
|
}
|
|
724
719
|
}
|
|
725
|
-
function
|
|
720
|
+
function $n({ code: n }) {
|
|
726
721
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
727
722
|
}
|
|
728
723
|
/**
|
|
@@ -741,7 +736,7 @@ function Hn({ code: n }) {
|
|
|
741
736
|
* See the License for the specific language governing permissions and
|
|
742
737
|
* limitations under the License.
|
|
743
738
|
*/
|
|
744
|
-
class
|
|
739
|
+
class Hn {
|
|
745
740
|
constructor(e) {
|
|
746
741
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
747
742
|
}
|
|
@@ -836,7 +831,7 @@ class ke {
|
|
|
836
831
|
* See the License for the specific language governing permissions and
|
|
837
832
|
* limitations under the License.
|
|
838
833
|
*/
|
|
839
|
-
async function
|
|
834
|
+
async function ce(n) {
|
|
840
835
|
var e;
|
|
841
836
|
const t = n.auth, i = await n.getIdToken(), r = await K(n, Et(t, { idToken: i }));
|
|
842
837
|
u(
|
|
@@ -847,7 +842,7 @@ async function le(n) {
|
|
|
847
842
|
);
|
|
848
843
|
const s = r.users[0];
|
|
849
844
|
n._notifyReloadListener(s);
|
|
850
|
-
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c =
|
|
845
|
+
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c = jn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
|
|
851
846
|
uid: s.localId,
|
|
852
847
|
displayName: s.displayName || null,
|
|
853
848
|
photoURL: s.photoUrl || null,
|
|
@@ -859,13 +854,13 @@ async function le(n) {
|
|
|
859
854
|
metadata: new ke(s.createdAt, s.lastLoginAt),
|
|
860
855
|
isAnonymous: d
|
|
861
856
|
};
|
|
862
|
-
Object.assign(n,
|
|
857
|
+
Object.assign(n, h);
|
|
863
858
|
}
|
|
864
|
-
async function
|
|
859
|
+
async function Wn(n) {
|
|
865
860
|
const e = j(n);
|
|
866
|
-
await
|
|
861
|
+
await ce(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
867
862
|
}
|
|
868
|
-
function
|
|
863
|
+
function jn(n, e) {
|
|
869
864
|
return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
|
|
870
865
|
}
|
|
871
866
|
function kt(n) {
|
|
@@ -918,8 +913,8 @@ async function Bn(n, e) {
|
|
|
918
913
|
refreshToken: t.refresh_token
|
|
919
914
|
};
|
|
920
915
|
}
|
|
921
|
-
async function
|
|
922
|
-
return
|
|
916
|
+
async function Gn(n, e) {
|
|
917
|
+
return B(n, "POST", "/v2/accounts:revokeToken", he(n, e));
|
|
923
918
|
}
|
|
924
919
|
/**
|
|
925
920
|
* @license
|
|
@@ -1037,7 +1032,7 @@ function R(n, e) {
|
|
|
1037
1032
|
class E {
|
|
1038
1033
|
constructor(e) {
|
|
1039
1034
|
var { uid: t, auth: i, stsTokenManager: r } = e, s = Pe(e, ["uid", "auth", "stsTokenManager"]);
|
|
1040
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
1035
|
+
this.providerId = "firebase", this.proactiveRefresh = new Hn(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 ke(s.createdAt || void 0, s.lastLoginAt || void 0);
|
|
1041
1036
|
}
|
|
1042
1037
|
async getIdToken(e) {
|
|
1043
1038
|
const t = await K(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -1049,10 +1044,10 @@ class E {
|
|
|
1049
1044
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
1050
1045
|
}
|
|
1051
1046
|
getIdTokenResult(e) {
|
|
1052
|
-
return
|
|
1047
|
+
return Vn(this, e);
|
|
1053
1048
|
}
|
|
1054
1049
|
reload() {
|
|
1055
|
-
return
|
|
1050
|
+
return Wn(this);
|
|
1056
1051
|
}
|
|
1057
1052
|
_assign(e) {
|
|
1058
1053
|
this !== e && (u(
|
|
@@ -1085,13 +1080,13 @@ class E {
|
|
|
1085
1080
|
}
|
|
1086
1081
|
async _updateTokensIfNecessary(e, t = !1) {
|
|
1087
1082
|
let i = !1;
|
|
1088
|
-
e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await
|
|
1083
|
+
e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await ce(this), await this.auth._persistUserIfCurrent(this), i && this.auth._notifyListenersIfCurrent(this);
|
|
1089
1084
|
}
|
|
1090
1085
|
async delete() {
|
|
1091
1086
|
if (w(this.auth.app))
|
|
1092
1087
|
return Promise.reject(L(this.auth));
|
|
1093
1088
|
const e = await this.getIdToken();
|
|
1094
|
-
return await K(this,
|
|
1089
|
+
return await K(this, xn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
1095
1090
|
}
|
|
1096
1091
|
toJSON() {
|
|
1097
1092
|
return Object.assign(Object.assign({
|
|
@@ -1119,20 +1114,20 @@ class E {
|
|
|
1119
1114
|
}
|
|
1120
1115
|
static _fromJSON(e, t) {
|
|
1121
1116
|
var i, r, s, o, c, a, l, d;
|
|
1122
|
-
const
|
|
1117
|
+
const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, _ = (r = t.email) !== null && r !== void 0 ? r : void 0, F = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, M = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, p = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, m = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, v = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, x = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: _e, emailVerified: De, isAnonymous: Fe, providerData: ve, stsTokenManager: xe } = t;
|
|
1123
1118
|
u(
|
|
1124
|
-
|
|
1119
|
+
_e && xe,
|
|
1125
1120
|
e,
|
|
1126
1121
|
"internal-error"
|
|
1127
1122
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1128
1123
|
);
|
|
1129
1124
|
const Kt = $.fromJSON(this.name, xe);
|
|
1130
1125
|
u(
|
|
1131
|
-
typeof
|
|
1126
|
+
typeof _e == "string",
|
|
1132
1127
|
e,
|
|
1133
1128
|
"internal-error"
|
|
1134
1129
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1135
|
-
), R(
|
|
1130
|
+
), R(h, e.name), R(_, e.name), u(
|
|
1136
1131
|
typeof De == "boolean",
|
|
1137
1132
|
e,
|
|
1138
1133
|
"internal-error"
|
|
@@ -1142,22 +1137,22 @@ class E {
|
|
|
1142
1137
|
e,
|
|
1143
1138
|
"internal-error"
|
|
1144
1139
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1145
|
-
), R(
|
|
1140
|
+
), R(F, e.name), R(M, e.name), R(p, e.name), R(m, e.name), R(v, e.name), R(x, e.name);
|
|
1146
1141
|
const Ie = new E({
|
|
1147
|
-
uid:
|
|
1142
|
+
uid: _e,
|
|
1148
1143
|
auth: e,
|
|
1149
1144
|
email: _,
|
|
1150
1145
|
emailVerified: De,
|
|
1151
|
-
displayName:
|
|
1146
|
+
displayName: h,
|
|
1152
1147
|
isAnonymous: Fe,
|
|
1153
1148
|
photoURL: M,
|
|
1154
|
-
phoneNumber:
|
|
1155
|
-
tenantId:
|
|
1149
|
+
phoneNumber: F,
|
|
1150
|
+
tenantId: p,
|
|
1156
1151
|
stsTokenManager: Kt,
|
|
1157
|
-
createdAt:
|
|
1158
|
-
lastLoginAt:
|
|
1152
|
+
createdAt: v,
|
|
1153
|
+
lastLoginAt: x
|
|
1159
1154
|
});
|
|
1160
|
-
return ve && Array.isArray(ve) && (Ie.providerData = ve.map((Jt) => Object.assign({}, Jt))),
|
|
1155
|
+
return ve && Array.isArray(ve) && (Ie.providerData = ve.map((Jt) => Object.assign({}, Jt))), m && (Ie._redirectEventId = m), Ie;
|
|
1161
1156
|
}
|
|
1162
1157
|
/**
|
|
1163
1158
|
* Initialize a User from an idToken server response
|
|
@@ -1173,7 +1168,7 @@ class E {
|
|
|
1173
1168
|
stsTokenManager: r,
|
|
1174
1169
|
isAnonymous: i
|
|
1175
1170
|
});
|
|
1176
|
-
return await
|
|
1171
|
+
return await ce(s), s;
|
|
1177
1172
|
}
|
|
1178
1173
|
/**
|
|
1179
1174
|
* Initialize a User from an idToken server response
|
|
@@ -1287,14 +1282,14 @@ const Je = bt;
|
|
|
1287
1282
|
* See the License for the specific language governing permissions and
|
|
1288
1283
|
* limitations under the License.
|
|
1289
1284
|
*/
|
|
1290
|
-
function
|
|
1285
|
+
function re(n, e, t) {
|
|
1291
1286
|
return `firebase:${n}:${e}:${t}`;
|
|
1292
1287
|
}
|
|
1293
1288
|
class H {
|
|
1294
1289
|
constructor(e, t, i) {
|
|
1295
1290
|
this.persistence = e, this.auth = t, this.userKey = i;
|
|
1296
1291
|
const { config: r, name: s } = this.auth;
|
|
1297
|
-
this.fullUserKey =
|
|
1292
|
+
this.fullUserKey = re(this.userKey, r.apiKey, s), this.fullPersistenceKey = re("persistence", r.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
|
|
1298
1293
|
}
|
|
1299
1294
|
setCurrentUser(e) {
|
|
1300
1295
|
return this.persistence._set(this.fullUserKey, e.toJSON());
|
|
@@ -1327,14 +1322,14 @@ class H {
|
|
|
1327
1322
|
return l;
|
|
1328
1323
|
}))).filter((l) => l);
|
|
1329
1324
|
let s = r[0] || k(Je);
|
|
1330
|
-
const o =
|
|
1325
|
+
const o = re(i, e.config.apiKey, e.name);
|
|
1331
1326
|
let c = null;
|
|
1332
1327
|
for (const l of t)
|
|
1333
1328
|
try {
|
|
1334
1329
|
const d = await l._get(o);
|
|
1335
1330
|
if (d) {
|
|
1336
|
-
const
|
|
1337
|
-
l !== s && (c =
|
|
1331
|
+
const h = E._fromJSON(e, d);
|
|
1332
|
+
l !== s && (c = h), s = l;
|
|
1338
1333
|
break;
|
|
1339
1334
|
}
|
|
1340
1335
|
} catch {
|
|
@@ -1418,20 +1413,20 @@ function Ct(n = g()) {
|
|
|
1418
1413
|
function Ot(n = g()) {
|
|
1419
1414
|
return /webos/i.test(n);
|
|
1420
1415
|
}
|
|
1421
|
-
function
|
|
1416
|
+
function fe(n = g()) {
|
|
1422
1417
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
1423
1418
|
}
|
|
1424
|
-
function
|
|
1419
|
+
function qn(n = g()) {
|
|
1425
1420
|
var e;
|
|
1426
|
-
return
|
|
1421
|
+
return fe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
1427
1422
|
}
|
|
1428
|
-
function
|
|
1423
|
+
function zn() {
|
|
1429
1424
|
return wn() && document.documentMode === 10;
|
|
1430
1425
|
}
|
|
1431
1426
|
function Nt(n = g()) {
|
|
1432
|
-
return
|
|
1427
|
+
return fe(n) || At(n) || Ot(n) || Ct(n) || /windows phone/i.test(n) || Pt(n);
|
|
1433
1428
|
}
|
|
1434
|
-
function
|
|
1429
|
+
function Kn() {
|
|
1435
1430
|
try {
|
|
1436
1431
|
return !!(window && window !== window.top);
|
|
1437
1432
|
} catch {
|
|
@@ -1485,7 +1480,7 @@ function Lt(n, e = []) {
|
|
|
1485
1480
|
* See the License for the specific language governing permissions and
|
|
1486
1481
|
* limitations under the License.
|
|
1487
1482
|
*/
|
|
1488
|
-
class
|
|
1483
|
+
class Jn {
|
|
1489
1484
|
constructor(e) {
|
|
1490
1485
|
this.auth = e, this.queue = [];
|
|
1491
1486
|
}
|
|
@@ -1540,8 +1535,8 @@ class Yn {
|
|
|
1540
1535
|
* See the License for the specific language governing permissions and
|
|
1541
1536
|
* limitations under the License.
|
|
1542
1537
|
*/
|
|
1543
|
-
async function
|
|
1544
|
-
return
|
|
1538
|
+
async function Yn(n, e = {}) {
|
|
1539
|
+
return B(n, "GET", "/v2/passwordPolicy", he(n, e));
|
|
1545
1540
|
}
|
|
1546
1541
|
/**
|
|
1547
1542
|
* @license
|
|
@@ -1559,12 +1554,12 @@ async function Xn(n, e = {}) {
|
|
|
1559
1554
|
* See the License for the specific language governing permissions and
|
|
1560
1555
|
* limitations under the License.
|
|
1561
1556
|
*/
|
|
1562
|
-
const
|
|
1563
|
-
class
|
|
1557
|
+
const Xn = 6;
|
|
1558
|
+
class Qn {
|
|
1564
1559
|
constructor(e) {
|
|
1565
1560
|
var t, i, r, s;
|
|
1566
1561
|
const o = e.customStrengthOptions;
|
|
1567
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t :
|
|
1562
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : Xn, 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;
|
|
1568
1563
|
}
|
|
1569
1564
|
validatePassword(e) {
|
|
1570
1565
|
var t, i, r, s, o, c;
|
|
@@ -1647,9 +1642,9 @@ class Zn {
|
|
|
1647
1642
|
* See the License for the specific language governing permissions and
|
|
1648
1643
|
* limitations under the License.
|
|
1649
1644
|
*/
|
|
1650
|
-
class
|
|
1645
|
+
class Zn {
|
|
1651
1646
|
constructor(e, t, i, r) {
|
|
1652
|
-
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 Xe(this), this.idTokenSubscription = new Xe(this), this.beforeStateQueue = new
|
|
1647
|
+
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 Xe(this), this.idTokenSubscription = new Xe(this), this.beforeStateQueue = new Jn(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 = _t, 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;
|
|
1653
1648
|
}
|
|
1654
1649
|
_initializeWithPersistence(e, t) {
|
|
1655
1650
|
return t && (this._popupRedirectResolver = k(t)), this._initializationPromise = this.queue(async () => {
|
|
@@ -1735,7 +1730,7 @@ class ei {
|
|
|
1735
1730
|
}
|
|
1736
1731
|
async reloadAndSetCurrentUserOrClear(e) {
|
|
1737
1732
|
try {
|
|
1738
|
-
await
|
|
1733
|
+
await ce(e);
|
|
1739
1734
|
} catch (t) {
|
|
1740
1735
|
if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
|
|
1741
1736
|
return this.directlySetCurrentUser(null);
|
|
@@ -1743,7 +1738,7 @@ class ei {
|
|
|
1743
1738
|
return this.directlySetCurrentUser(e);
|
|
1744
1739
|
}
|
|
1745
1740
|
useDeviceLanguage() {
|
|
1746
|
-
this.languageCode =
|
|
1741
|
+
this.languageCode = Mn();
|
|
1747
1742
|
}
|
|
1748
1743
|
async _delete() {
|
|
1749
1744
|
this._deleted = !0;
|
|
@@ -1794,7 +1789,7 @@ class ei {
|
|
|
1794
1789
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
1795
1790
|
}
|
|
1796
1791
|
async _updatePasswordPolicy() {
|
|
1797
|
-
const e = await
|
|
1792
|
+
const e = await Yn(this), t = new Qn(e);
|
|
1798
1793
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
1799
1794
|
}
|
|
1800
1795
|
_getPersistence() {
|
|
@@ -1834,7 +1829,7 @@ class ei {
|
|
|
1834
1829
|
token: e,
|
|
1835
1830
|
idToken: t
|
|
1836
1831
|
};
|
|
1837
|
-
this.tenantId != null && (i.tenantId = this.tenantId), await
|
|
1832
|
+
this.tenantId != null && (i.tenantId = this.tenantId), await Gn(this, i);
|
|
1838
1833
|
}
|
|
1839
1834
|
}
|
|
1840
1835
|
toJSON() {
|
|
@@ -1977,10 +1972,10 @@ class ei {
|
|
|
1977
1972
|
async _getAppCheckToken() {
|
|
1978
1973
|
var e;
|
|
1979
1974
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
|
1980
|
-
return t != null && t.error &&
|
|
1975
|
+
return t != null && t.error && On(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
|
1981
1976
|
}
|
|
1982
1977
|
}
|
|
1983
|
-
function
|
|
1978
|
+
function pe(n) {
|
|
1984
1979
|
return j(n);
|
|
1985
1980
|
}
|
|
1986
1981
|
class Xe {
|
|
@@ -2020,16 +2015,16 @@ let Le = {
|
|
|
2020
2015
|
recaptchaEnterpriseScript: "",
|
|
2021
2016
|
gapiScript: ""
|
|
2022
2017
|
};
|
|
2023
|
-
function
|
|
2018
|
+
function ei(n) {
|
|
2024
2019
|
Le = n;
|
|
2025
2020
|
}
|
|
2026
|
-
function
|
|
2021
|
+
function ti(n) {
|
|
2027
2022
|
return Le.loadJS(n);
|
|
2028
2023
|
}
|
|
2029
|
-
function
|
|
2024
|
+
function ni() {
|
|
2030
2025
|
return Le.gapiScript;
|
|
2031
2026
|
}
|
|
2032
|
-
function
|
|
2027
|
+
function ii(n) {
|
|
2033
2028
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
2034
2029
|
}
|
|
2035
2030
|
/**
|
|
@@ -2048,7 +2043,7 @@ function ri(n) {
|
|
|
2048
2043
|
* See the License for the specific language governing permissions and
|
|
2049
2044
|
* limitations under the License.
|
|
2050
2045
|
*/
|
|
2051
|
-
function
|
|
2046
|
+
function ri(n, e) {
|
|
2052
2047
|
const t = pt(n, "auth");
|
|
2053
2048
|
if (t.isInitialized()) {
|
|
2054
2049
|
const r = t.getImmediate(), s = t.getOptions();
|
|
@@ -2062,12 +2057,12 @@ function si(n, e) {
|
|
|
2062
2057
|
}
|
|
2063
2058
|
return t.initialize({ options: e });
|
|
2064
2059
|
}
|
|
2065
|
-
function
|
|
2060
|
+
function si(n, e) {
|
|
2066
2061
|
const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(k);
|
|
2067
2062
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
|
|
2068
2063
|
}
|
|
2069
|
-
function
|
|
2070
|
-
const i =
|
|
2064
|
+
function oi(n, e, t) {
|
|
2065
|
+
const i = pe(n);
|
|
2071
2066
|
u(
|
|
2072
2067
|
i._canInitEmulator,
|
|
2073
2068
|
i,
|
|
@@ -2079,19 +2074,19 @@ function ai(n, e, t) {
|
|
|
2079
2074
|
"invalid-emulator-scheme"
|
|
2080
2075
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
2081
2076
|
);
|
|
2082
|
-
const r = !1, s = Mt(e), { host: o, port: c } =
|
|
2077
|
+
const r = !1, s = Mt(e), { host: o, port: c } = ai(e), a = c === null ? "" : `:${c}`;
|
|
2083
2078
|
i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
|
|
2084
2079
|
host: o,
|
|
2085
2080
|
port: c,
|
|
2086
2081
|
protocol: s.replace(":", ""),
|
|
2087
2082
|
options: Object.freeze({ disableWarnings: r })
|
|
2088
|
-
}),
|
|
2083
|
+
}), ci();
|
|
2089
2084
|
}
|
|
2090
2085
|
function Mt(n) {
|
|
2091
2086
|
const e = n.indexOf(":");
|
|
2092
2087
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
2093
2088
|
}
|
|
2094
|
-
function
|
|
2089
|
+
function ai(n) {
|
|
2095
2090
|
const e = Mt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
2096
2091
|
if (!t)
|
|
2097
2092
|
return { host: "", port: null };
|
|
@@ -2110,7 +2105,7 @@ function Qe(n) {
|
|
|
2110
2105
|
const e = Number(n);
|
|
2111
2106
|
return isNaN(e) ? null : e;
|
|
2112
2107
|
}
|
|
2113
|
-
function
|
|
2108
|
+
function ci() {
|
|
2114
2109
|
function n() {
|
|
2115
2110
|
const e = document.createElement("p"), t = e.style;
|
|
2116
2111
|
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);
|
|
@@ -2176,7 +2171,7 @@ class Ut {
|
|
|
2176
2171
|
* limitations under the License.
|
|
2177
2172
|
*/
|
|
2178
2173
|
async function W(n, e) {
|
|
2179
|
-
return wt(n, "POST", "/v1/accounts:signInWithIdp",
|
|
2174
|
+
return wt(n, "POST", "/v1/accounts:signInWithIdp", he(n, e));
|
|
2180
2175
|
}
|
|
2181
2176
|
/**
|
|
2182
2177
|
* @license
|
|
@@ -2194,14 +2189,14 @@ async function W(n, e) {
|
|
|
2194
2189
|
* See the License for the specific language governing permissions and
|
|
2195
2190
|
* limitations under the License.
|
|
2196
2191
|
*/
|
|
2197
|
-
const
|
|
2198
|
-
class
|
|
2192
|
+
const li = "http://localhost";
|
|
2193
|
+
class U extends Ut {
|
|
2199
2194
|
constructor() {
|
|
2200
2195
|
super(...arguments), this.pendingToken = null;
|
|
2201
2196
|
}
|
|
2202
2197
|
/** @internal */
|
|
2203
2198
|
static _fromParams(e) {
|
|
2204
|
-
const t = new
|
|
2199
|
+
const t = new U(e.providerId, e.signInMethod);
|
|
2205
2200
|
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) : b(
|
|
2206
2201
|
"argument-error"
|
|
2207
2202
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
@@ -2232,7 +2227,7 @@ class D extends Ut {
|
|
|
2232
2227
|
const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Pe(t, ["providerId", "signInMethod"]);
|
|
2233
2228
|
if (!i || !r)
|
|
2234
2229
|
return null;
|
|
2235
|
-
const o = new
|
|
2230
|
+
const o = new U(i, r);
|
|
2236
2231
|
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;
|
|
2237
2232
|
}
|
|
2238
2233
|
/** @internal */
|
|
@@ -2252,7 +2247,7 @@ class D extends Ut {
|
|
|
2252
2247
|
}
|
|
2253
2248
|
buildRequest() {
|
|
2254
2249
|
const e = {
|
|
2255
|
-
requestUri:
|
|
2250
|
+
requestUri: li,
|
|
2256
2251
|
returnSecureToken: !0
|
|
2257
2252
|
};
|
|
2258
2253
|
if (this.pendingToken)
|
|
@@ -2388,7 +2383,7 @@ class A extends Q {
|
|
|
2388
2383
|
* @param accessToken - Facebook access token.
|
|
2389
2384
|
*/
|
|
2390
2385
|
static credential(e) {
|
|
2391
|
-
return
|
|
2386
|
+
return U._fromParams({
|
|
2392
2387
|
providerId: A.PROVIDER_ID,
|
|
2393
2388
|
signInMethod: A.FACEBOOK_SIGN_IN_METHOD,
|
|
2394
2389
|
accessToken: e
|
|
@@ -2460,7 +2455,7 @@ class C extends Q {
|
|
|
2460
2455
|
* @param accessToken - Google access token.
|
|
2461
2456
|
*/
|
|
2462
2457
|
static credential(e, t) {
|
|
2463
|
-
return
|
|
2458
|
+
return U._fromParams({
|
|
2464
2459
|
providerId: C.PROVIDER_ID,
|
|
2465
2460
|
signInMethod: C.GOOGLE_SIGN_IN_METHOD,
|
|
2466
2461
|
idToken: e,
|
|
@@ -2528,7 +2523,7 @@ class O extends Q {
|
|
|
2528
2523
|
* @param accessToken - Github access token.
|
|
2529
2524
|
*/
|
|
2530
2525
|
static credential(e) {
|
|
2531
|
-
return
|
|
2526
|
+
return U._fromParams({
|
|
2532
2527
|
providerId: O.PROVIDER_ID,
|
|
2533
2528
|
signInMethod: O.GITHUB_SIGN_IN_METHOD,
|
|
2534
2529
|
accessToken: e
|
|
@@ -2593,7 +2588,7 @@ class N extends Q {
|
|
|
2593
2588
|
* @param secret - Twitter secret.
|
|
2594
2589
|
*/
|
|
2595
2590
|
static credential(e, t) {
|
|
2596
|
-
return
|
|
2591
|
+
return U._fromParams({
|
|
2597
2592
|
providerId: N.PROVIDER_ID,
|
|
2598
2593
|
signInMethod: N.TWITTER_SIGN_IN_METHOD,
|
|
2599
2594
|
oauthToken: e,
|
|
@@ -2648,13 +2643,13 @@ N.PROVIDER_ID = "twitter.com";
|
|
|
2648
2643
|
* See the License for the specific language governing permissions and
|
|
2649
2644
|
* limitations under the License.
|
|
2650
2645
|
*/
|
|
2651
|
-
class
|
|
2646
|
+
class D {
|
|
2652
2647
|
constructor(e) {
|
|
2653
2648
|
this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
|
|
2654
2649
|
}
|
|
2655
2650
|
static async _fromIdTokenResponse(e, t, i, r = !1) {
|
|
2656
2651
|
const s = await E._fromIdTokenResponse(e, i, r), o = Ze(i);
|
|
2657
|
-
return new
|
|
2652
|
+
return new D({
|
|
2658
2653
|
user: s,
|
|
2659
2654
|
providerId: o,
|
|
2660
2655
|
_tokenResponse: i,
|
|
@@ -2668,7 +2663,7 @@ class F {
|
|
|
2668
2663
|
!0
|
|
2669
2664
|
);
|
|
2670
2665
|
const r = Ze(i);
|
|
2671
|
-
return new
|
|
2666
|
+
return new D({
|
|
2672
2667
|
user: e,
|
|
2673
2668
|
providerId: r,
|
|
2674
2669
|
_tokenResponse: i,
|
|
@@ -2695,10 +2690,10 @@ function Ze(n) {
|
|
|
2695
2690
|
* See the License for the specific language governing permissions and
|
|
2696
2691
|
* limitations under the License.
|
|
2697
2692
|
*/
|
|
2698
|
-
class
|
|
2693
|
+
class le extends Re {
|
|
2699
2694
|
constructor(e, t, i, r) {
|
|
2700
2695
|
var s;
|
|
2701
|
-
super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this,
|
|
2696
|
+
super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, le.prototype), this.customData = {
|
|
2702
2697
|
appName: e.name,
|
|
2703
2698
|
tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
|
|
2704
2699
|
_serverResponse: t.customData._serverResponse,
|
|
@@ -2706,17 +2701,17 @@ class ue extends Re {
|
|
|
2706
2701
|
};
|
|
2707
2702
|
}
|
|
2708
2703
|
static _fromErrorAndOperation(e, t, i, r) {
|
|
2709
|
-
return new
|
|
2704
|
+
return new le(e, t, i, r);
|
|
2710
2705
|
}
|
|
2711
2706
|
}
|
|
2712
2707
|
function Ft(n, e, t, i) {
|
|
2713
2708
|
return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
|
|
2714
|
-
throw s.code === "auth/multi-factor-auth-required" ?
|
|
2709
|
+
throw s.code === "auth/multi-factor-auth-required" ? le._fromErrorAndOperation(n, s, e, i) : s;
|
|
2715
2710
|
});
|
|
2716
2711
|
}
|
|
2717
|
-
async function
|
|
2712
|
+
async function ui(n, e, t = !1) {
|
|
2718
2713
|
const i = await K(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
2719
|
-
return
|
|
2714
|
+
return D._forOperation(n, "link", i);
|
|
2720
2715
|
}
|
|
2721
2716
|
/**
|
|
2722
2717
|
* @license
|
|
@@ -2734,7 +2729,7 @@ async function di(n, e, t = !1) {
|
|
|
2734
2729
|
* See the License for the specific language governing permissions and
|
|
2735
2730
|
* limitations under the License.
|
|
2736
2731
|
*/
|
|
2737
|
-
async function
|
|
2732
|
+
async function di(n, e, t = !1) {
|
|
2738
2733
|
const { auth: i } = n;
|
|
2739
2734
|
if (w(i.app))
|
|
2740
2735
|
return Promise.reject(L(i));
|
|
@@ -2760,7 +2755,7 @@ async function hi(n, e, t = !1) {
|
|
|
2760
2755
|
i,
|
|
2761
2756
|
"user-mismatch"
|
|
2762
2757
|
/* AuthErrorCode.USER_MISMATCH */
|
|
2763
|
-
),
|
|
2758
|
+
), D._forOperation(n, r, s);
|
|
2764
2759
|
} catch (s) {
|
|
2765
2760
|
throw (s == null ? void 0 : s.code) === "auth/user-not-found" && b(
|
|
2766
2761
|
i,
|
|
@@ -2785,10 +2780,10 @@ async function hi(n, e, t = !1) {
|
|
|
2785
2780
|
* See the License for the specific language governing permissions and
|
|
2786
2781
|
* limitations under the License.
|
|
2787
2782
|
*/
|
|
2788
|
-
async function
|
|
2783
|
+
async function hi(n, e, t = !1) {
|
|
2789
2784
|
if (w(n.app))
|
|
2790
2785
|
return Promise.reject(L(n));
|
|
2791
|
-
const i = "signIn", r = await Ft(n, i, e), s = await
|
|
2786
|
+
const i = "signIn", r = await Ft(n, i, e), s = await D._fromIdTokenResponse(n, i, r);
|
|
2792
2787
|
return t || await n._updateCurrentUser(s.user), s;
|
|
2793
2788
|
}
|
|
2794
2789
|
/**
|
|
@@ -2807,8 +2802,8 @@ async function fi(n, e, t = !1) {
|
|
|
2807
2802
|
* See the License for the specific language governing permissions and
|
|
2808
2803
|
* limitations under the License.
|
|
2809
2804
|
*/
|
|
2810
|
-
async function
|
|
2811
|
-
return wt(n, "POST", "/v1/accounts:signInWithCustomToken",
|
|
2805
|
+
async function fi(n, e) {
|
|
2806
|
+
return wt(n, "POST", "/v1/accounts:signInWithCustomToken", he(n, e));
|
|
2812
2807
|
}
|
|
2813
2808
|
/**
|
|
2814
2809
|
* @license
|
|
@@ -2826,22 +2821,22 @@ async function pi(n, e) {
|
|
|
2826
2821
|
* See the License for the specific language governing permissions and
|
|
2827
2822
|
* limitations under the License.
|
|
2828
2823
|
*/
|
|
2829
|
-
async function
|
|
2824
|
+
async function pi(n, e) {
|
|
2830
2825
|
if (w(n.app))
|
|
2831
2826
|
return Promise.reject(L(n));
|
|
2832
|
-
const t =
|
|
2827
|
+
const t = pe(n), i = await fi(t, {
|
|
2833
2828
|
token: e,
|
|
2834
2829
|
returnSecureToken: !0
|
|
2835
|
-
}), r = await
|
|
2830
|
+
}), r = await D._fromIdTokenResponse(t, "signIn", i);
|
|
2836
2831
|
return await t._updateCurrentUser(r.user), r;
|
|
2837
2832
|
}
|
|
2838
|
-
function
|
|
2833
|
+
function mi(n, e, t, i) {
|
|
2839
2834
|
return j(n).onIdTokenChanged(e, t, i);
|
|
2840
2835
|
}
|
|
2841
|
-
function
|
|
2836
|
+
function gi(n, e, t) {
|
|
2842
2837
|
return j(n).beforeAuthStateChanged(e, t);
|
|
2843
2838
|
}
|
|
2844
|
-
const
|
|
2839
|
+
const ue = "__sak";
|
|
2845
2840
|
/**
|
|
2846
2841
|
* @license
|
|
2847
2842
|
* Copyright 2019 Google LLC
|
|
@@ -2864,7 +2859,7 @@ class xt {
|
|
|
2864
2859
|
}
|
|
2865
2860
|
_isAvailable() {
|
|
2866
2861
|
try {
|
|
2867
|
-
return this.storage ? (this.storage.setItem(
|
|
2862
|
+
return this.storage ? (this.storage.setItem(ue, "1"), this.storage.removeItem(ue), Promise.resolve(!0)) : Promise.resolve(!1);
|
|
2868
2863
|
} catch {
|
|
2869
2864
|
return Promise.resolve(!1);
|
|
2870
2865
|
}
|
|
@@ -2899,18 +2894,18 @@ class xt {
|
|
|
2899
2894
|
* See the License for the specific language governing permissions and
|
|
2900
2895
|
* limitations under the License.
|
|
2901
2896
|
*/
|
|
2902
|
-
function
|
|
2897
|
+
function _i() {
|
|
2903
2898
|
const n = g();
|
|
2904
|
-
return Ne(n) ||
|
|
2899
|
+
return Ne(n) || fe(n);
|
|
2905
2900
|
}
|
|
2906
|
-
const
|
|
2901
|
+
const vi = 1e3, Ii = 10;
|
|
2907
2902
|
class Vt extends xt {
|
|
2908
2903
|
constructor() {
|
|
2909
2904
|
super(
|
|
2910
2905
|
() => window.localStorage,
|
|
2911
2906
|
"LOCAL"
|
|
2912
2907
|
/* PersistenceType.LOCAL */
|
|
2913
|
-
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced =
|
|
2908
|
+
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = _i() && Kn(), this.fallbackToPolling = Nt(), this._shouldAllowMigration = !0;
|
|
2914
2909
|
}
|
|
2915
2910
|
forAllChangedKeys(e) {
|
|
2916
2911
|
for (const t of Object.keys(this.listeners)) {
|
|
@@ -2937,7 +2932,7 @@ class Vt extends xt {
|
|
|
2937
2932
|
const o = this.storage.getItem(i);
|
|
2938
2933
|
!t && this.localCache[i] === o || this.notifyListeners(i, o);
|
|
2939
2934
|
}, s = this.storage.getItem(i);
|
|
2940
|
-
|
|
2935
|
+
zn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Ii) : r();
|
|
2941
2936
|
}
|
|
2942
2937
|
notifyListeners(e, t) {
|
|
2943
2938
|
this.localCache[e] = t;
|
|
@@ -2959,7 +2954,7 @@ class Vt extends xt {
|
|
|
2959
2954
|
!0
|
|
2960
2955
|
);
|
|
2961
2956
|
});
|
|
2962
|
-
},
|
|
2957
|
+
}, vi);
|
|
2963
2958
|
}
|
|
2964
2959
|
stopPolling() {
|
|
2965
2960
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -2989,7 +2984,7 @@ class Vt extends xt {
|
|
|
2989
2984
|
}
|
|
2990
2985
|
}
|
|
2991
2986
|
Vt.type = "LOCAL";
|
|
2992
|
-
const
|
|
2987
|
+
const Ti = Vt;
|
|
2993
2988
|
/**
|
|
2994
2989
|
* @license
|
|
2995
2990
|
* Copyright 2020 Google LLC
|
|
@@ -3037,7 +3032,7 @@ const Ht = $t;
|
|
|
3037
3032
|
* See the License for the specific language governing permissions and
|
|
3038
3033
|
* limitations under the License.
|
|
3039
3034
|
*/
|
|
3040
|
-
function
|
|
3035
|
+
function wi(n) {
|
|
3041
3036
|
return Promise.all(n.map(async (e) => {
|
|
3042
3037
|
try {
|
|
3043
3038
|
return {
|
|
@@ -3068,7 +3063,7 @@ function yi(n) {
|
|
|
3068
3063
|
* See the License for the specific language governing permissions and
|
|
3069
3064
|
* limitations under the License.
|
|
3070
3065
|
*/
|
|
3071
|
-
class
|
|
3066
|
+
class me {
|
|
3072
3067
|
constructor(e) {
|
|
3073
3068
|
this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
|
|
3074
3069
|
}
|
|
@@ -3082,7 +3077,7 @@ class ge {
|
|
|
3082
3077
|
const t = this.receivers.find((r) => r.isListeningto(e));
|
|
3083
3078
|
if (t)
|
|
3084
3079
|
return t;
|
|
3085
|
-
const i = new
|
|
3080
|
+
const i = new me(e);
|
|
3086
3081
|
return this.receivers.push(i), i;
|
|
3087
3082
|
}
|
|
3088
3083
|
isListeningto(e) {
|
|
@@ -3107,7 +3102,7 @@ class ge {
|
|
|
3107
3102
|
eventId: i,
|
|
3108
3103
|
eventType: r
|
|
3109
3104
|
});
|
|
3110
|
-
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await
|
|
3105
|
+
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await wi(c);
|
|
3111
3106
|
t.ports[0].postMessage({
|
|
3112
3107
|
status: "done",
|
|
3113
3108
|
eventId: i,
|
|
@@ -3136,7 +3131,7 @@ class ge {
|
|
|
3136
3131
|
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);
|
|
3137
3132
|
}
|
|
3138
3133
|
}
|
|
3139
|
-
|
|
3134
|
+
me.receivers = [];
|
|
3140
3135
|
/**
|
|
3141
3136
|
* @license
|
|
3142
3137
|
* Copyright 2020 Google LLC
|
|
@@ -3175,7 +3170,7 @@ function Me(n = "", e = 10) {
|
|
|
3175
3170
|
* See the License for the specific language governing permissions and
|
|
3176
3171
|
* limitations under the License.
|
|
3177
3172
|
*/
|
|
3178
|
-
class
|
|
3173
|
+
class yi {
|
|
3179
3174
|
constructor(e) {
|
|
3180
3175
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
|
3181
3176
|
}
|
|
@@ -3219,8 +3214,8 @@ class Ei {
|
|
|
3219
3214
|
}, i);
|
|
3220
3215
|
o = {
|
|
3221
3216
|
messageChannel: r,
|
|
3222
|
-
onMessage(
|
|
3223
|
-
const _ =
|
|
3217
|
+
onMessage(h) {
|
|
3218
|
+
const _ = h;
|
|
3224
3219
|
if (_.data.eventId === l)
|
|
3225
3220
|
switch (_.data.status) {
|
|
3226
3221
|
case "ack":
|
|
@@ -3275,7 +3270,7 @@ class Ei {
|
|
|
3275
3270
|
function T() {
|
|
3276
3271
|
return window;
|
|
3277
3272
|
}
|
|
3278
|
-
function
|
|
3273
|
+
function Ei(n) {
|
|
3279
3274
|
T().location.href = n;
|
|
3280
3275
|
}
|
|
3281
3276
|
/**
|
|
@@ -3297,7 +3292,7 @@ function ki(n) {
|
|
|
3297
3292
|
function Wt() {
|
|
3298
3293
|
return typeof T().WorkerGlobalScope < "u" && typeof T().importScripts == "function";
|
|
3299
3294
|
}
|
|
3300
|
-
async function
|
|
3295
|
+
async function ki() {
|
|
3301
3296
|
if (!(navigator != null && navigator.serviceWorker))
|
|
3302
3297
|
return null;
|
|
3303
3298
|
try {
|
|
@@ -3306,11 +3301,11 @@ async function bi() {
|
|
|
3306
3301
|
return null;
|
|
3307
3302
|
}
|
|
3308
3303
|
}
|
|
3309
|
-
function
|
|
3304
|
+
function bi() {
|
|
3310
3305
|
var n;
|
|
3311
3306
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
3312
3307
|
}
|
|
3313
|
-
function
|
|
3308
|
+
function Si() {
|
|
3314
3309
|
return Wt() ? self : null;
|
|
3315
3310
|
}
|
|
3316
3311
|
/**
|
|
@@ -3329,7 +3324,7 @@ function Ri() {
|
|
|
3329
3324
|
* See the License for the specific language governing permissions and
|
|
3330
3325
|
* limitations under the License.
|
|
3331
3326
|
*/
|
|
3332
|
-
const jt = "firebaseLocalStorageDb",
|
|
3327
|
+
const jt = "firebaseLocalStorageDb", Ri = 1, de = "firebaseLocalStorage", Bt = "fbase_key";
|
|
3333
3328
|
class Z {
|
|
3334
3329
|
constructor(e) {
|
|
3335
3330
|
this.request = e;
|
|
@@ -3344,48 +3339,48 @@ class Z {
|
|
|
3344
3339
|
});
|
|
3345
3340
|
}
|
|
3346
3341
|
}
|
|
3347
|
-
function
|
|
3348
|
-
return n.transaction([
|
|
3342
|
+
function ge(n, e) {
|
|
3343
|
+
return n.transaction([de], e ? "readwrite" : "readonly").objectStore(de);
|
|
3349
3344
|
}
|
|
3350
|
-
function
|
|
3345
|
+
function Pi() {
|
|
3351
3346
|
const n = indexedDB.deleteDatabase(jt);
|
|
3352
3347
|
return new Z(n).toPromise();
|
|
3353
3348
|
}
|
|
3354
3349
|
function be() {
|
|
3355
|
-
const n = indexedDB.open(jt,
|
|
3350
|
+
const n = indexedDB.open(jt, Ri);
|
|
3356
3351
|
return new Promise((e, t) => {
|
|
3357
3352
|
n.addEventListener("error", () => {
|
|
3358
3353
|
t(n.error);
|
|
3359
3354
|
}), n.addEventListener("upgradeneeded", () => {
|
|
3360
3355
|
const i = n.result;
|
|
3361
3356
|
try {
|
|
3362
|
-
i.createObjectStore(
|
|
3357
|
+
i.createObjectStore(de, { keyPath: Bt });
|
|
3363
3358
|
} catch (r) {
|
|
3364
3359
|
t(r);
|
|
3365
3360
|
}
|
|
3366
3361
|
}), n.addEventListener("success", async () => {
|
|
3367
3362
|
const i = n.result;
|
|
3368
|
-
i.objectStoreNames.contains(
|
|
3363
|
+
i.objectStoreNames.contains(de) ? e(i) : (i.close(), await Pi(), e(await be()));
|
|
3369
3364
|
});
|
|
3370
3365
|
});
|
|
3371
3366
|
}
|
|
3372
3367
|
async function et(n, e, t) {
|
|
3373
|
-
const i =
|
|
3374
|
-
[
|
|
3368
|
+
const i = ge(n, !0).put({
|
|
3369
|
+
[Bt]: e,
|
|
3375
3370
|
value: t
|
|
3376
3371
|
});
|
|
3377
3372
|
return new Z(i).toPromise();
|
|
3378
3373
|
}
|
|
3379
|
-
async function
|
|
3380
|
-
const t =
|
|
3374
|
+
async function Ai(n, e) {
|
|
3375
|
+
const t = ge(n, !1).get(e), i = await new Z(t).toPromise();
|
|
3381
3376
|
return i === void 0 ? null : i.value;
|
|
3382
3377
|
}
|
|
3383
3378
|
function tt(n, e) {
|
|
3384
|
-
const t =
|
|
3379
|
+
const t = ge(n, !0).delete(e);
|
|
3385
3380
|
return new Z(t).toPromise();
|
|
3386
3381
|
}
|
|
3387
|
-
const
|
|
3388
|
-
class
|
|
3382
|
+
const Ci = 800, Oi = 3;
|
|
3383
|
+
class Gt {
|
|
3389
3384
|
constructor() {
|
|
3390
3385
|
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(() => {
|
|
3391
3386
|
}, () => {
|
|
@@ -3401,7 +3396,7 @@ class Bt {
|
|
|
3401
3396
|
const i = await this._openDb();
|
|
3402
3397
|
return await e(i);
|
|
3403
3398
|
} catch (i) {
|
|
3404
|
-
if (t++ >
|
|
3399
|
+
if (t++ > Oi)
|
|
3405
3400
|
throw i;
|
|
3406
3401
|
this.db && (this.db.close(), this.db = void 0);
|
|
3407
3402
|
}
|
|
@@ -3417,7 +3412,7 @@ class Bt {
|
|
|
3417
3412
|
* As the worker we should listen to events from the main window.
|
|
3418
3413
|
*/
|
|
3419
3414
|
async initializeReceiver() {
|
|
3420
|
-
this.receiver =
|
|
3415
|
+
this.receiver = me._getInstance(Si()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
3421
3416
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
3422
3417
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
3423
3418
|
"keyChanged"
|
|
@@ -3433,9 +3428,9 @@ class Bt {
|
|
|
3433
3428
|
*/
|
|
3434
3429
|
async initializeSender() {
|
|
3435
3430
|
var e, t;
|
|
3436
|
-
if (this.activeServiceWorker = await
|
|
3431
|
+
if (this.activeServiceWorker = await ki(), !this.activeServiceWorker)
|
|
3437
3432
|
return;
|
|
3438
|
-
this.sender = new
|
|
3433
|
+
this.sender = new yi(this.activeServiceWorker);
|
|
3439
3434
|
const i = await this.sender._send(
|
|
3440
3435
|
"ping",
|
|
3441
3436
|
{},
|
|
@@ -3457,7 +3452,7 @@ class Bt {
|
|
|
3457
3452
|
* @param key - Storage key which changed.
|
|
3458
3453
|
*/
|
|
3459
3454
|
async notifyServiceWorker(e) {
|
|
3460
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
3455
|
+
if (!(!this.sender || !this.activeServiceWorker || bi() !== this.activeServiceWorker))
|
|
3461
3456
|
try {
|
|
3462
3457
|
await this.sender._send(
|
|
3463
3458
|
"keyChanged",
|
|
@@ -3474,7 +3469,7 @@ class Bt {
|
|
|
3474
3469
|
if (!indexedDB)
|
|
3475
3470
|
return !1;
|
|
3476
3471
|
const e = await be();
|
|
3477
|
-
return await et(e,
|
|
3472
|
+
return await et(e, ue, "1"), await tt(e, ue), !0;
|
|
3478
3473
|
} catch {
|
|
3479
3474
|
}
|
|
3480
3475
|
return !1;
|
|
@@ -3491,7 +3486,7 @@ class Bt {
|
|
|
3491
3486
|
return this._withPendingWrite(async () => (await this._withRetries((i) => et(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
3492
3487
|
}
|
|
3493
3488
|
async _get(e) {
|
|
3494
|
-
const t = await this._withRetries((i) =>
|
|
3489
|
+
const t = await this._withRetries((i) => Ai(i, e));
|
|
3495
3490
|
return this.localCache[e] = t, t;
|
|
3496
3491
|
}
|
|
3497
3492
|
async _remove(e) {
|
|
@@ -3499,7 +3494,7 @@ class Bt {
|
|
|
3499
3494
|
}
|
|
3500
3495
|
async _poll() {
|
|
3501
3496
|
const e = await this._withRetries((r) => {
|
|
3502
|
-
const s =
|
|
3497
|
+
const s = ge(r, !1).getAll();
|
|
3503
3498
|
return new Z(s).toPromise();
|
|
3504
3499
|
});
|
|
3505
3500
|
if (!e)
|
|
@@ -3522,7 +3517,7 @@ class Bt {
|
|
|
3522
3517
|
r(t);
|
|
3523
3518
|
}
|
|
3524
3519
|
startPolling() {
|
|
3525
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
3520
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ci);
|
|
3526
3521
|
}
|
|
3527
3522
|
stopPolling() {
|
|
3528
3523
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -3534,8 +3529,8 @@ class Bt {
|
|
|
3534
3529
|
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();
|
|
3535
3530
|
}
|
|
3536
3531
|
}
|
|
3537
|
-
|
|
3538
|
-
const
|
|
3532
|
+
Gt.type = "LOCAL";
|
|
3533
|
+
const Ni = Gt;
|
|
3539
3534
|
new X(3e4, 6e4);
|
|
3540
3535
|
/**
|
|
3541
3536
|
* @license
|
|
@@ -3553,7 +3548,7 @@ new X(3e4, 6e4);
|
|
|
3553
3548
|
* See the License for the specific language governing permissions and
|
|
3554
3549
|
* limitations under the License.
|
|
3555
3550
|
*/
|
|
3556
|
-
function
|
|
3551
|
+
function Li(n, e) {
|
|
3557
3552
|
return e ? k(e) : (u(
|
|
3558
3553
|
n._popupRedirectResolver,
|
|
3559
3554
|
n,
|
|
@@ -3607,26 +3602,26 @@ class Ue extends Ut {
|
|
|
3607
3602
|
return e && (t.idToken = e), t;
|
|
3608
3603
|
}
|
|
3609
3604
|
}
|
|
3610
|
-
function
|
|
3611
|
-
return
|
|
3605
|
+
function Mi(n) {
|
|
3606
|
+
return hi(n.auth, new Ue(n), n.bypassAuthState);
|
|
3612
3607
|
}
|
|
3613
|
-
function
|
|
3608
|
+
function Ui(n) {
|
|
3614
3609
|
const { auth: e, user: t } = n;
|
|
3615
3610
|
return u(
|
|
3616
3611
|
t,
|
|
3617
3612
|
e,
|
|
3618
3613
|
"internal-error"
|
|
3619
3614
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3620
|
-
),
|
|
3615
|
+
), di(t, new Ue(n), n.bypassAuthState);
|
|
3621
3616
|
}
|
|
3622
|
-
async function
|
|
3617
|
+
async function Di(n) {
|
|
3623
3618
|
const { auth: e, user: t } = n;
|
|
3624
3619
|
return u(
|
|
3625
3620
|
t,
|
|
3626
3621
|
e,
|
|
3627
3622
|
"internal-error"
|
|
3628
3623
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3629
|
-
),
|
|
3624
|
+
), ui(t, new Ue(n), n.bypassAuthState);
|
|
3630
3625
|
}
|
|
3631
3626
|
/**
|
|
3632
3627
|
* @license
|
|
@@ -3686,13 +3681,13 @@ class qt {
|
|
|
3686
3681
|
switch (e) {
|
|
3687
3682
|
case "signInViaPopup":
|
|
3688
3683
|
case "signInViaRedirect":
|
|
3689
|
-
return
|
|
3684
|
+
return Mi;
|
|
3690
3685
|
case "linkViaPopup":
|
|
3691
3686
|
case "linkViaRedirect":
|
|
3692
|
-
return
|
|
3687
|
+
return Di;
|
|
3693
3688
|
case "reauthViaPopup":
|
|
3694
3689
|
case "reauthViaRedirect":
|
|
3695
|
-
return
|
|
3690
|
+
return Ui;
|
|
3696
3691
|
default:
|
|
3697
3692
|
b(
|
|
3698
3693
|
this.auth,
|
|
@@ -3727,7 +3722,7 @@ class qt {
|
|
|
3727
3722
|
* See the License for the specific language governing permissions and
|
|
3728
3723
|
* limitations under the License.
|
|
3729
3724
|
*/
|
|
3730
|
-
const
|
|
3725
|
+
const Fi = new X(2e3, 1e4);
|
|
3731
3726
|
class V extends qt {
|
|
3732
3727
|
constructor(e, t, i, r, s) {
|
|
3733
3728
|
super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
|
|
@@ -3791,7 +3786,7 @@ class V extends qt {
|
|
|
3791
3786
|
);
|
|
3792
3787
|
return;
|
|
3793
3788
|
}
|
|
3794
|
-
this.pollId = window.setTimeout(e,
|
|
3789
|
+
this.pollId = window.setTimeout(e, Fi.get());
|
|
3795
3790
|
};
|
|
3796
3791
|
e();
|
|
3797
3792
|
}
|
|
@@ -3813,8 +3808,8 @@ V.currentPopupAction = null;
|
|
|
3813
3808
|
* See the License for the specific language governing permissions and
|
|
3814
3809
|
* limitations under the License.
|
|
3815
3810
|
*/
|
|
3816
|
-
const
|
|
3817
|
-
class
|
|
3811
|
+
const xi = "pendingRedirect", se = /* @__PURE__ */ new Map();
|
|
3812
|
+
class Vi extends qt {
|
|
3818
3813
|
constructor(e, t, i = !1) {
|
|
3819
3814
|
super(e, [
|
|
3820
3815
|
"signInViaRedirect",
|
|
@@ -3829,17 +3824,17 @@ class $i extends qt {
|
|
|
3829
3824
|
* just return it.
|
|
3830
3825
|
*/
|
|
3831
3826
|
async execute() {
|
|
3832
|
-
let e =
|
|
3827
|
+
let e = se.get(this.auth._key());
|
|
3833
3828
|
if (!e) {
|
|
3834
3829
|
try {
|
|
3835
|
-
const i = await
|
|
3830
|
+
const i = await $i(this.resolver, this.auth) ? await super.execute() : null;
|
|
3836
3831
|
e = () => Promise.resolve(i);
|
|
3837
3832
|
} catch (t) {
|
|
3838
3833
|
e = () => Promise.reject(t);
|
|
3839
3834
|
}
|
|
3840
|
-
|
|
3835
|
+
se.set(this.auth._key(), e);
|
|
3841
3836
|
}
|
|
3842
|
-
return this.bypassAuthState ||
|
|
3837
|
+
return this.bypassAuthState || se.set(this.auth._key(), () => Promise.resolve(null)), e();
|
|
3843
3838
|
}
|
|
3844
3839
|
async onAuthEvent(e) {
|
|
3845
3840
|
if (e.type === "signInViaRedirect")
|
|
@@ -3860,26 +3855,26 @@ class $i extends qt {
|
|
|
3860
3855
|
cleanUp() {
|
|
3861
3856
|
}
|
|
3862
3857
|
}
|
|
3863
|
-
async function
|
|
3864
|
-
const t =
|
|
3858
|
+
async function $i(n, e) {
|
|
3859
|
+
const t = ji(e), i = Wi(n);
|
|
3865
3860
|
if (!await i._isAvailable())
|
|
3866
3861
|
return !1;
|
|
3867
3862
|
const r = await i._get(t) === "true";
|
|
3868
3863
|
return await i._remove(t), r;
|
|
3869
3864
|
}
|
|
3870
|
-
function
|
|
3871
|
-
|
|
3865
|
+
function Hi(n, e) {
|
|
3866
|
+
se.set(n._key(), e);
|
|
3872
3867
|
}
|
|
3873
|
-
function
|
|
3868
|
+
function Wi(n) {
|
|
3874
3869
|
return k(n._redirectPersistence);
|
|
3875
3870
|
}
|
|
3876
|
-
function
|
|
3877
|
-
return
|
|
3871
|
+
function ji(n) {
|
|
3872
|
+
return re(xi, n.config.apiKey, n.name);
|
|
3878
3873
|
}
|
|
3879
3874
|
async function Bi(n, e, t = !1) {
|
|
3880
3875
|
if (w(n.app))
|
|
3881
3876
|
return Promise.reject(L(n));
|
|
3882
|
-
const i =
|
|
3877
|
+
const i = pe(n), r = Li(i, e), o = await new Vi(i, r, t).execute();
|
|
3883
3878
|
return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
|
|
3884
3879
|
}
|
|
3885
3880
|
/**
|
|
@@ -3898,8 +3893,8 @@ async function Bi(n, e, t = !1) {
|
|
|
3898
3893
|
* See the License for the specific language governing permissions and
|
|
3899
3894
|
* limitations under the License.
|
|
3900
3895
|
*/
|
|
3901
|
-
const
|
|
3902
|
-
class
|
|
3896
|
+
const Gi = 10 * 60 * 1e3;
|
|
3897
|
+
class qi {
|
|
3903
3898
|
constructor(e) {
|
|
3904
3899
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
3905
3900
|
}
|
|
@@ -3915,7 +3910,7 @@ class zi {
|
|
|
3915
3910
|
let t = !1;
|
|
3916
3911
|
return this.consumers.forEach((i) => {
|
|
3917
3912
|
this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
|
|
3918
|
-
}), this.hasHandledPotentialRedirect || !
|
|
3913
|
+
}), this.hasHandledPotentialRedirect || !zi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
3919
3914
|
}
|
|
3920
3915
|
sendToConsumer(e, t) {
|
|
3921
3916
|
var i;
|
|
@@ -3930,7 +3925,7 @@ class zi {
|
|
|
3930
3925
|
return t.filter.includes(e.type) && i;
|
|
3931
3926
|
}
|
|
3932
3927
|
hasEventBeenHandled(e) {
|
|
3933
|
-
return Date.now() - this.lastProcessedEventTime >=
|
|
3928
|
+
return Date.now() - this.lastProcessedEventTime >= Gi && this.cachedEventUids.clear(), this.cachedEventUids.has(nt(e));
|
|
3934
3929
|
}
|
|
3935
3930
|
saveEventToCache(e) {
|
|
3936
3931
|
this.cachedEventUids.add(nt(e)), this.lastProcessedEventTime = Date.now();
|
|
@@ -3942,7 +3937,7 @@ function nt(n) {
|
|
|
3942
3937
|
function zt({ type: n, error: e }) {
|
|
3943
3938
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
3944
3939
|
}
|
|
3945
|
-
function
|
|
3940
|
+
function zi(n) {
|
|
3946
3941
|
switch (n.type) {
|
|
3947
3942
|
case "signInViaRedirect":
|
|
3948
3943
|
case "linkViaRedirect":
|
|
@@ -3970,8 +3965,8 @@ function Ki(n) {
|
|
|
3970
3965
|
* See the License for the specific language governing permissions and
|
|
3971
3966
|
* limitations under the License.
|
|
3972
3967
|
*/
|
|
3973
|
-
async function
|
|
3974
|
-
return
|
|
3968
|
+
async function Ki(n, e = {}) {
|
|
3969
|
+
return B(n, "GET", "/v1/projects", e);
|
|
3975
3970
|
}
|
|
3976
3971
|
/**
|
|
3977
3972
|
* @license
|
|
@@ -3989,14 +3984,14 @@ async function Ji(n, e = {}) {
|
|
|
3989
3984
|
* See the License for the specific language governing permissions and
|
|
3990
3985
|
* limitations under the License.
|
|
3991
3986
|
*/
|
|
3992
|
-
const
|
|
3993
|
-
async function
|
|
3987
|
+
const Ji = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Yi = /^https?/;
|
|
3988
|
+
async function Xi(n) {
|
|
3994
3989
|
if (n.config.emulator)
|
|
3995
3990
|
return;
|
|
3996
|
-
const { authorizedDomains: e } = await
|
|
3991
|
+
const { authorizedDomains: e } = await Ki(n);
|
|
3997
3992
|
for (const t of e)
|
|
3998
3993
|
try {
|
|
3999
|
-
if (
|
|
3994
|
+
if (Qi(t))
|
|
4000
3995
|
return;
|
|
4001
3996
|
} catch {
|
|
4002
3997
|
}
|
|
@@ -4006,15 +4001,15 @@ async function Qi(n) {
|
|
|
4006
4001
|
/* AuthErrorCode.INVALID_ORIGIN */
|
|
4007
4002
|
);
|
|
4008
4003
|
}
|
|
4009
|
-
function
|
|
4004
|
+
function Qi(n) {
|
|
4010
4005
|
const e = Ee(), { protocol: t, hostname: i } = new URL(e);
|
|
4011
4006
|
if (n.startsWith("chrome-extension://")) {
|
|
4012
4007
|
const o = new URL(n);
|
|
4013
4008
|
return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
|
|
4014
4009
|
}
|
|
4015
|
-
if (!
|
|
4010
|
+
if (!Yi.test(t))
|
|
4016
4011
|
return !1;
|
|
4017
|
-
if (
|
|
4012
|
+
if (Ji.test(n))
|
|
4018
4013
|
return i === n;
|
|
4019
4014
|
const r = n.replace(/\./g, "\\.");
|
|
4020
4015
|
return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
|
|
@@ -4035,7 +4030,7 @@ function Zi(n) {
|
|
|
4035
4030
|
* See the License for the specific language governing permissions and
|
|
4036
4031
|
* limitations under the License.
|
|
4037
4032
|
*/
|
|
4038
|
-
const
|
|
4033
|
+
const Zi = new X(3e4, 6e4);
|
|
4039
4034
|
function it() {
|
|
4040
4035
|
const n = T().___jsl;
|
|
4041
4036
|
if (n != null && n.H) {
|
|
@@ -4045,7 +4040,7 @@ function it() {
|
|
|
4045
4040
|
n.CP[t] = null;
|
|
4046
4041
|
}
|
|
4047
4042
|
}
|
|
4048
|
-
function
|
|
4043
|
+
function er(n) {
|
|
4049
4044
|
return new Promise((e, t) => {
|
|
4050
4045
|
var i, r, s;
|
|
4051
4046
|
function o() {
|
|
@@ -4060,7 +4055,7 @@ function tr(n) {
|
|
|
4060
4055
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4061
4056
|
));
|
|
4062
4057
|
},
|
|
4063
|
-
timeout:
|
|
4058
|
+
timeout: Zi.get()
|
|
4064
4059
|
});
|
|
4065
4060
|
}
|
|
4066
4061
|
if (!((r = (i = T().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
|
|
@@ -4068,22 +4063,22 @@ function tr(n) {
|
|
|
4068
4063
|
else if (!((s = T().gapi) === null || s === void 0) && s.load)
|
|
4069
4064
|
o();
|
|
4070
4065
|
else {
|
|
4071
|
-
const c =
|
|
4066
|
+
const c = ii("iframefcb");
|
|
4072
4067
|
return T()[c] = () => {
|
|
4073
4068
|
gapi.load ? o() : t(I(
|
|
4074
4069
|
n,
|
|
4075
4070
|
"network-request-failed"
|
|
4076
4071
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4077
4072
|
));
|
|
4078
|
-
},
|
|
4073
|
+
}, ti(`${ni()}?onload=${c}`).catch((a) => t(a));
|
|
4079
4074
|
}
|
|
4080
4075
|
}).catch((e) => {
|
|
4081
|
-
throw
|
|
4076
|
+
throw oe = null, e;
|
|
4082
4077
|
});
|
|
4083
4078
|
}
|
|
4084
|
-
let
|
|
4085
|
-
function
|
|
4086
|
-
return
|
|
4079
|
+
let oe = null;
|
|
4080
|
+
function tr(n) {
|
|
4081
|
+
return oe = oe || er(n), oe;
|
|
4087
4082
|
}
|
|
4088
4083
|
/**
|
|
4089
4084
|
* @license
|
|
@@ -4101,7 +4096,7 @@ function nr(n) {
|
|
|
4101
4096
|
* See the License for the specific language governing permissions and
|
|
4102
4097
|
* limitations under the License.
|
|
4103
4098
|
*/
|
|
4104
|
-
const
|
|
4099
|
+
const nr = new X(5e3, 15e3), ir = "__/auth/iframe", rr = "emulator/auth/iframe", sr = {
|
|
4105
4100
|
style: {
|
|
4106
4101
|
position: "absolute",
|
|
4107
4102
|
top: "-100px",
|
|
@@ -4110,13 +4105,13 @@ const ir = new X(5e3, 15e3), rr = "__/auth/iframe", sr = "emulator/auth/iframe",
|
|
|
4110
4105
|
},
|
|
4111
4106
|
"aria-hidden": "true",
|
|
4112
4107
|
tabindex: "-1"
|
|
4113
|
-
},
|
|
4108
|
+
}, or = /* @__PURE__ */ new Map([
|
|
4114
4109
|
["identitytoolkit.googleapis.com", "p"],
|
|
4115
4110
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
|
4116
4111
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
|
4117
4112
|
// test
|
|
4118
4113
|
]);
|
|
4119
|
-
function
|
|
4114
|
+
function ar(n) {
|
|
4120
4115
|
const e = n.config;
|
|
4121
4116
|
u(
|
|
4122
4117
|
e.authDomain,
|
|
@@ -4124,17 +4119,17 @@ function cr(n) {
|
|
|
4124
4119
|
"auth-domain-config-required"
|
|
4125
4120
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
4126
4121
|
);
|
|
4127
|
-
const t = e.emulator ? Ce(e,
|
|
4122
|
+
const t = e.emulator ? Ce(e, rr) : `https://${n.config.authDomain}/${ir}`, i = {
|
|
4128
4123
|
apiKey: e.apiKey,
|
|
4129
4124
|
appName: n.name,
|
|
4130
4125
|
v: J
|
|
4131
|
-
}, r =
|
|
4126
|
+
}, r = or.get(n.config.apiHost);
|
|
4132
4127
|
r && (i.eid = r);
|
|
4133
4128
|
const s = n._getFrameworks();
|
|
4134
4129
|
return s.length && (i.fw = s.join(",")), `${t}?${Y(i).slice(1)}`;
|
|
4135
4130
|
}
|
|
4136
|
-
async function
|
|
4137
|
-
const e = await
|
|
4131
|
+
async function cr(n) {
|
|
4132
|
+
const e = await tr(n), t = T().gapi;
|
|
4138
4133
|
return u(
|
|
4139
4134
|
t,
|
|
4140
4135
|
n,
|
|
@@ -4142,9 +4137,9 @@ async function lr(n) {
|
|
|
4142
4137
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4143
4138
|
), e.open({
|
|
4144
4139
|
where: document.body,
|
|
4145
|
-
url:
|
|
4140
|
+
url: ar(n),
|
|
4146
4141
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
|
4147
|
-
attributes:
|
|
4142
|
+
attributes: sr,
|
|
4148
4143
|
dontclear: !0
|
|
4149
4144
|
}, (i) => new Promise(async (r, s) => {
|
|
4150
4145
|
await i.restyle({
|
|
@@ -4157,7 +4152,7 @@ async function lr(n) {
|
|
|
4157
4152
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4158
4153
|
), c = T().setTimeout(() => {
|
|
4159
4154
|
s(o);
|
|
4160
|
-
},
|
|
4155
|
+
}, nr.get());
|
|
4161
4156
|
function a() {
|
|
4162
4157
|
T().clearTimeout(c), r(i);
|
|
4163
4158
|
}
|
|
@@ -4182,12 +4177,12 @@ async function lr(n) {
|
|
|
4182
4177
|
* See the License for the specific language governing permissions and
|
|
4183
4178
|
* limitations under the License.
|
|
4184
4179
|
*/
|
|
4185
|
-
const
|
|
4180
|
+
const lr = {
|
|
4186
4181
|
location: "yes",
|
|
4187
4182
|
resizable: "yes",
|
|
4188
4183
|
statusbar: "yes",
|
|
4189
4184
|
toolbar: "no"
|
|
4190
|
-
},
|
|
4185
|
+
}, ur = 500, dr = 600, hr = "_blank", fr = "http://localhost";
|
|
4191
4186
|
class rt {
|
|
4192
4187
|
constructor(e) {
|
|
4193
4188
|
this.window = e, this.associatedEvent = null;
|
|
@@ -4200,33 +4195,33 @@ class rt {
|
|
|
4200
4195
|
}
|
|
4201
4196
|
}
|
|
4202
4197
|
}
|
|
4203
|
-
function
|
|
4198
|
+
function pr(n, e, t, i = ur, r = dr) {
|
|
4204
4199
|
const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
|
|
4205
4200
|
let c = "";
|
|
4206
|
-
const a = Object.assign(Object.assign({},
|
|
4201
|
+
const a = Object.assign(Object.assign({}, lr), {
|
|
4207
4202
|
width: i.toString(),
|
|
4208
4203
|
height: r.toString(),
|
|
4209
4204
|
top: s,
|
|
4210
4205
|
left: o
|
|
4211
4206
|
}), l = g().toLowerCase();
|
|
4212
|
-
t && (c = Rt(l) ?
|
|
4213
|
-
const d = Object.entries(a).reduce((_, [
|
|
4214
|
-
if (
|
|
4215
|
-
return
|
|
4216
|
-
const
|
|
4207
|
+
t && (c = Rt(l) ? hr : t), St(l) && (e = e || fr, a.scrollbars = "yes");
|
|
4208
|
+
const d = Object.entries(a).reduce((_, [F, M]) => `${_}${F}=${M},`, "");
|
|
4209
|
+
if (qn(l) && c !== "_self")
|
|
4210
|
+
return mr(e || "", c), new rt(null);
|
|
4211
|
+
const h = window.open(e || "", c, d);
|
|
4217
4212
|
u(
|
|
4218
|
-
|
|
4213
|
+
h,
|
|
4219
4214
|
n,
|
|
4220
4215
|
"popup-blocked"
|
|
4221
4216
|
/* AuthErrorCode.POPUP_BLOCKED */
|
|
4222
4217
|
);
|
|
4223
4218
|
try {
|
|
4224
|
-
|
|
4219
|
+
h.focus();
|
|
4225
4220
|
} catch {
|
|
4226
4221
|
}
|
|
4227
|
-
return new rt(
|
|
4222
|
+
return new rt(h);
|
|
4228
4223
|
}
|
|
4229
|
-
function
|
|
4224
|
+
function mr(n, e) {
|
|
4230
4225
|
const t = document.createElement("a");
|
|
4231
4226
|
t.href = n, t.target = e;
|
|
4232
4227
|
const i = document.createEvent("MouseEvent");
|
|
@@ -4248,7 +4243,7 @@ function gr(n, e) {
|
|
|
4248
4243
|
* See the License for the specific language governing permissions and
|
|
4249
4244
|
* limitations under the License.
|
|
4250
4245
|
*/
|
|
4251
|
-
const
|
|
4246
|
+
const gr = "__/auth/handler", _r = "emulator/auth/handler", vr = encodeURIComponent("fac");
|
|
4252
4247
|
async function st(n, e, t, i, r, s) {
|
|
4253
4248
|
u(
|
|
4254
4249
|
n.config.authDomain,
|
|
@@ -4271,22 +4266,22 @@ async function st(n, e, t, i, r, s) {
|
|
|
4271
4266
|
};
|
|
4272
4267
|
if (e instanceof Dt) {
|
|
4273
4268
|
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", yn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
4274
|
-
for (const [d,
|
|
4275
|
-
o[d] =
|
|
4269
|
+
for (const [d, h] of Object.entries({}))
|
|
4270
|
+
o[d] = h;
|
|
4276
4271
|
}
|
|
4277
4272
|
if (e instanceof Q) {
|
|
4278
|
-
const d = e.getScopes().filter((
|
|
4273
|
+
const d = e.getScopes().filter((h) => h !== "");
|
|
4279
4274
|
d.length > 0 && (o.scopes = d.join(","));
|
|
4280
4275
|
}
|
|
4281
4276
|
n.tenantId && (o.tid = n.tenantId);
|
|
4282
4277
|
const c = o;
|
|
4283
4278
|
for (const d of Object.keys(c))
|
|
4284
4279
|
c[d] === void 0 && delete c[d];
|
|
4285
|
-
const a = await n._getAppCheckToken(), l = a ? `#${
|
|
4286
|
-
return `${
|
|
4280
|
+
const a = await n._getAppCheckToken(), l = a ? `#${vr}=${encodeURIComponent(a)}` : "";
|
|
4281
|
+
return `${Ir(n)}?${Y(c).slice(1)}${l}`;
|
|
4287
4282
|
}
|
|
4288
|
-
function
|
|
4289
|
-
return n.emulator ? Ce(n,
|
|
4283
|
+
function Ir({ config: n }) {
|
|
4284
|
+
return n.emulator ? Ce(n, _r) : `https://${n.authDomain}/${gr}`;
|
|
4290
4285
|
}
|
|
4291
4286
|
/**
|
|
4292
4287
|
* @license
|
|
@@ -4305,9 +4300,9 @@ function Tr({ config: n }) {
|
|
|
4305
4300
|
* limitations under the License.
|
|
4306
4301
|
*/
|
|
4307
4302
|
const we = "webStorageSupport";
|
|
4308
|
-
class
|
|
4303
|
+
class Tr {
|
|
4309
4304
|
constructor() {
|
|
4310
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Ht, this._completeRedirectFn = Bi, this._overrideRedirectResult =
|
|
4305
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Ht, this._completeRedirectFn = Bi, this._overrideRedirectResult = Hi;
|
|
4311
4306
|
}
|
|
4312
4307
|
// Wrapping in async even though we don't await anywhere in order
|
|
4313
4308
|
// to make sure errors are raised as promise rejections
|
|
@@ -4315,12 +4310,12 @@ class wr {
|
|
|
4315
4310
|
var s;
|
|
4316
4311
|
S((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4317
4312
|
const o = await st(e, t, i, Ee(), r);
|
|
4318
|
-
return
|
|
4313
|
+
return pr(e, o, Me());
|
|
4319
4314
|
}
|
|
4320
4315
|
async _openRedirect(e, t, i, r) {
|
|
4321
4316
|
await this._originValidation(e);
|
|
4322
4317
|
const s = await st(e, t, i, Ee(), r);
|
|
4323
|
-
return
|
|
4318
|
+
return Ei(s), new Promise(() => {
|
|
4324
4319
|
});
|
|
4325
4320
|
}
|
|
4326
4321
|
_initialize(e) {
|
|
@@ -4335,7 +4330,7 @@ class wr {
|
|
|
4335
4330
|
}), i;
|
|
4336
4331
|
}
|
|
4337
4332
|
async initAndGetManager(e) {
|
|
4338
|
-
const t = await
|
|
4333
|
+
const t = await cr(e), i = new qi(e);
|
|
4339
4334
|
return t.register("authEvent", (r) => (u(
|
|
4340
4335
|
r == null ? void 0 : r.authEvent,
|
|
4341
4336
|
e,
|
|
@@ -4359,13 +4354,13 @@ class wr {
|
|
|
4359
4354
|
}
|
|
4360
4355
|
_originValidation(e) {
|
|
4361
4356
|
const t = e._key();
|
|
4362
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
|
4357
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Xi(e)), this.originValidationPromises[t];
|
|
4363
4358
|
}
|
|
4364
4359
|
get _shouldInitProactively() {
|
|
4365
|
-
return Nt() || Ne() ||
|
|
4360
|
+
return Nt() || Ne() || fe();
|
|
4366
4361
|
}
|
|
4367
4362
|
}
|
|
4368
|
-
const
|
|
4363
|
+
const wr = Tr;
|
|
4369
4364
|
var ot = "@firebase/auth", at = "1.7.5";
|
|
4370
4365
|
/**
|
|
4371
4366
|
* @license
|
|
@@ -4383,7 +4378,7 @@ var ot = "@firebase/auth", at = "1.7.5";
|
|
|
4383
4378
|
* See the License for the specific language governing permissions and
|
|
4384
4379
|
* limitations under the License.
|
|
4385
4380
|
*/
|
|
4386
|
-
class
|
|
4381
|
+
class yr {
|
|
4387
4382
|
constructor(e) {
|
|
4388
4383
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
4389
4384
|
}
|
|
@@ -4434,7 +4429,7 @@ class Er {
|
|
|
4434
4429
|
* See the License for the specific language governing permissions and
|
|
4435
4430
|
* limitations under the License.
|
|
4436
4431
|
*/
|
|
4437
|
-
function
|
|
4432
|
+
function Er(n) {
|
|
4438
4433
|
switch (n) {
|
|
4439
4434
|
case "Node":
|
|
4440
4435
|
return "node";
|
|
@@ -4450,8 +4445,8 @@ function kr(n) {
|
|
|
4450
4445
|
return;
|
|
4451
4446
|
}
|
|
4452
4447
|
}
|
|
4453
|
-
function
|
|
4454
|
-
je(new
|
|
4448
|
+
function kr(n) {
|
|
4449
|
+
je(new Be(
|
|
4455
4450
|
"auth",
|
|
4456
4451
|
(e, { options: t }) => {
|
|
4457
4452
|
const i = e.getProvider("app").getImmediate(), r = e.getProvider("heartbeat"), s = e.getProvider("app-check-internal"), { apiKey: o, authDomain: c } = i.options;
|
|
@@ -4464,8 +4459,8 @@ function br(n) {
|
|
|
4464
4459
|
tokenApiHost: "securetoken.googleapis.com",
|
|
4465
4460
|
apiScheme: "https",
|
|
4466
4461
|
sdkClientVersion: Lt(n)
|
|
4467
|
-
}, l = new
|
|
4468
|
-
return
|
|
4462
|
+
}, l = new Zn(i, r, s, a);
|
|
4463
|
+
return si(l, t), l;
|
|
4469
4464
|
},
|
|
4470
4465
|
"PUBLIC"
|
|
4471
4466
|
/* ComponentType.PUBLIC */
|
|
@@ -4477,21 +4472,21 @@ function br(n) {
|
|
|
4477
4472
|
"auth-internal"
|
|
4478
4473
|
/* _ComponentName.AUTH_INTERNAL */
|
|
4479
4474
|
).initialize();
|
|
4480
|
-
})), je(new
|
|
4475
|
+
})), je(new Be(
|
|
4481
4476
|
"auth-internal",
|
|
4482
4477
|
(e) => {
|
|
4483
|
-
const t =
|
|
4478
|
+
const t = pe(e.getProvider(
|
|
4484
4479
|
"auth"
|
|
4485
4480
|
/* _ComponentName.AUTH */
|
|
4486
4481
|
).getImmediate());
|
|
4487
|
-
return ((i) => new
|
|
4482
|
+
return ((i) => new yr(i))(t);
|
|
4488
4483
|
},
|
|
4489
4484
|
"PRIVATE"
|
|
4490
4485
|
/* ComponentType.PRIVATE */
|
|
4491
4486
|
).setInstantiationMode(
|
|
4492
4487
|
"EXPLICIT"
|
|
4493
4488
|
/* InstantiationMode.EXPLICIT */
|
|
4494
|
-
)), ye(ot, at,
|
|
4489
|
+
)), ye(ot, at, Er(n)), ye(ot, at, "esm2017");
|
|
4495
4490
|
}
|
|
4496
4491
|
/**
|
|
4497
4492
|
* @license
|
|
@@ -4509,11 +4504,11 @@ function br(n) {
|
|
|
4509
4504
|
* See the License for the specific language governing permissions and
|
|
4510
4505
|
* limitations under the License.
|
|
4511
4506
|
*/
|
|
4512
|
-
const
|
|
4507
|
+
const br = 5 * 60, Sr = ft("authIdTokenMaxAge") || br;
|
|
4513
4508
|
let ct = null;
|
|
4514
|
-
const
|
|
4509
|
+
const Rr = (n) => async (e) => {
|
|
4515
4510
|
const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
4516
|
-
if (i && i >
|
|
4511
|
+
if (i && i > Sr)
|
|
4517
4512
|
return;
|
|
4518
4513
|
const r = t == null ? void 0 : t.token;
|
|
4519
4514
|
ct !== r && (ct = r, await fetch(n, {
|
|
@@ -4523,33 +4518,33 @@ const Pr = (n) => async (e) => {
|
|
|
4523
4518
|
} : {}
|
|
4524
4519
|
}));
|
|
4525
4520
|
};
|
|
4526
|
-
function
|
|
4521
|
+
function Pr(n = vn()) {
|
|
4527
4522
|
const e = pt(n, "auth");
|
|
4528
4523
|
if (e.isInitialized())
|
|
4529
4524
|
return e.getImmediate();
|
|
4530
|
-
const t =
|
|
4531
|
-
popupRedirectResolver:
|
|
4525
|
+
const t = ri(n, {
|
|
4526
|
+
popupRedirectResolver: wr,
|
|
4532
4527
|
persistence: [
|
|
4533
|
-
|
|
4534
|
-
|
|
4528
|
+
Ni,
|
|
4529
|
+
Ti,
|
|
4535
4530
|
Ht
|
|
4536
4531
|
]
|
|
4537
4532
|
}), i = ft("authTokenSyncURL");
|
|
4538
4533
|
if (i && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
4539
4534
|
const s = new URL(i, location.origin);
|
|
4540
4535
|
if (location.origin === s.origin) {
|
|
4541
|
-
const o =
|
|
4542
|
-
|
|
4536
|
+
const o = Rr(s.toString());
|
|
4537
|
+
gi(t, o, () => o(t.currentUser)), mi(t, (c) => o(c));
|
|
4543
4538
|
}
|
|
4544
4539
|
}
|
|
4545
4540
|
const r = _n("auth");
|
|
4546
|
-
return r &&
|
|
4541
|
+
return r && oi(t, `http://${r}`), t;
|
|
4547
4542
|
}
|
|
4548
|
-
function
|
|
4543
|
+
function Ar() {
|
|
4549
4544
|
var n, e;
|
|
4550
4545
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
|
4551
4546
|
}
|
|
4552
|
-
|
|
4547
|
+
ei({
|
|
4553
4548
|
loadJS(n) {
|
|
4554
4549
|
return new Promise((e, t) => {
|
|
4555
4550
|
const i = document.createElement("script");
|
|
@@ -4559,60 +4554,53 @@ ti({
|
|
|
4559
4554
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4560
4555
|
);
|
|
4561
4556
|
s.customData = r, t(s);
|
|
4562
|
-
}, i.type = "text/javascript", i.charset = "UTF-8",
|
|
4557
|
+
}, i.type = "text/javascript", i.charset = "UTF-8", Ar().appendChild(i);
|
|
4563
4558
|
});
|
|
4564
4559
|
},
|
|
4565
4560
|
gapiScript: "https://apis.google.com/js/api.js",
|
|
4566
4561
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
4567
4562
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
4568
4563
|
});
|
|
4569
|
-
|
|
4564
|
+
kr(
|
|
4570
4565
|
"Browser"
|
|
4571
4566
|
/* ClientPlatform.BROWSER */
|
|
4572
4567
|
);
|
|
4573
|
-
var
|
|
4574
|
-
const
|
|
4568
|
+
var Cr = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, assetBucketUrl: "static.feedme.cc", importFilesBucketUrl: "feedme-253402.appspot.com", clientId: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476" }, Or = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc" };
|
|
4569
|
+
const Nr = {
|
|
4575
4570
|
key: 1,
|
|
4576
4571
|
class: "h-full w-full"
|
|
4577
|
-
},
|
|
4572
|
+
}, Lr = ["src"], zr = /* @__PURE__ */ lt({
|
|
4578
4573
|
__name: "App",
|
|
4579
4574
|
setup(n) {
|
|
4580
|
-
const e = We(), t = on(), i = an(), r = cn(), s = ln(), o = ht(), c =
|
|
4581
|
-
const p = e.currentCountry.value || "MY", m =
|
|
4582
|
-
return `${
|
|
4575
|
+
const e = We(), t = on(), i = an(), r = cn(), s = ln(), o = ht(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = We(), d = te(!1), h = Ve(() => i.version), _ = Ve(() => {
|
|
4576
|
+
const p = e.currentCountry.value || "MY", m = Ge.getIdToken(), v = l.value._id;
|
|
4577
|
+
return `${Or.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${m}`;
|
|
4583
4578
|
});
|
|
4584
|
-
async function
|
|
4579
|
+
async function F() {
|
|
4585
4580
|
if (En().length) {
|
|
4586
4581
|
console.warn("CONNECT: initFirebase: Firebase already initialized");
|
|
4587
4582
|
return;
|
|
4588
4583
|
}
|
|
4589
|
-
const p = kn(
|
|
4590
|
-
await
|
|
4584
|
+
const p = kn(Cr.firebase), m = await sn.getCustomToken(), v = Pr();
|
|
4585
|
+
await pi(v, m), bn(p), console.log("initFirebase", p);
|
|
4591
4586
|
}
|
|
4592
4587
|
const M = async () => {
|
|
4593
|
-
d.value = !1, await tn(), console.log("forceRerender"),
|
|
4588
|
+
d.value = !1, await tn(), console.log("forceRerender"), Ge.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(Rn) : e.hideSidebarToggle(!0), await F(), a.value = !0, d.value = !0;
|
|
4594
4589
|
};
|
|
4595
|
-
async function ee() {
|
|
4596
|
-
var p;
|
|
4597
|
-
console.log("initRemyClient.."), await Rn.init({
|
|
4598
|
-
token: ((p = e.sessionUser.value) == null ? void 0 : p.token) || "",
|
|
4599
|
-
dev: Lr.mode === "development"
|
|
4600
|
-
});
|
|
4601
|
-
}
|
|
4602
4590
|
return Xt(() => {
|
|
4603
4591
|
if (Sn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
|
|
4604
|
-
const p = document.getElementsByClassName("app-header")[0], m = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0],
|
|
4605
|
-
p == null || p.classList.add("!hidden"), m == null || m.classList.add("!pt-0"), v == null || v.classList.add("!pt-0"),
|
|
4592
|
+
const p = document.getElementsByClassName("app-header")[0], m = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
|
|
4593
|
+
p == null || p.classList.add("!hidden"), m == null || m.classList.add("!pt-0"), v == null || v.classList.add("!pt-0"), x == null || x.classList.add("!pt-0"), e.hideSidebarToggle(!0);
|
|
4606
4594
|
}
|
|
4607
|
-
l.value != null && (console.log("App mounted, forceRerender"), M())
|
|
4595
|
+
l.value != null && (console.log("App mounted, forceRerender"), M());
|
|
4608
4596
|
}), ut(
|
|
4609
4597
|
() => e.currentBusiness.value,
|
|
4610
4598
|
async (p, m) => {
|
|
4611
4599
|
console.log("Current business changed"), p != null && p._id != m._id && (console.log("forceRerender when business changes", p, m), M());
|
|
4612
4600
|
}
|
|
4613
|
-
), (p, m) => (
|
|
4614
|
-
P(d) && P(
|
|
4615
|
-
P(d) && P(
|
|
4601
|
+
), (p, m) => (ne(), $e(Qt, null, [
|
|
4602
|
+
P(d) && P(h) === "v2" ? (ne(), dt(P(rn), { key: 0 })) : He("", !0),
|
|
4603
|
+
P(d) && P(h) !== "v2" ? (ne(), $e("div", Nr, [
|
|
4616
4604
|
Zt(dn, {
|
|
4617
4605
|
json: { url: P(_) }
|
|
4618
4606
|
}, null, 8, ["json"]),
|
|
@@ -4622,11 +4610,11 @@ const Mr = {
|
|
|
4622
4610
|
height: "100%",
|
|
4623
4611
|
width: "100%",
|
|
4624
4612
|
src: P(_)
|
|
4625
|
-
}, null, 8,
|
|
4613
|
+
}, null, 8, Lr)
|
|
4626
4614
|
])) : He("", !0)
|
|
4627
4615
|
], 64));
|
|
4628
4616
|
}
|
|
4629
4617
|
});
|
|
4630
4618
|
export {
|
|
4631
|
-
|
|
4619
|
+
zr as default
|
|
4632
4620
|
};
|