@feedmepos/mf-connect 0.1.0-beta.1 → 0.1.0-beta.11
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-IpLNFnjo.js +622 -0
- package/dist/{App-B1uXIyTX.js → App-D9Bi7WTi.js} +367 -367
- package/dist/{Broadcast-CcpZLSnJ.js → Broadcast-3BNGmPyG.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-2C2AHwnM.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CnVZZnAO.js} +8 -8
- package/dist/{Card-DUCfFEOn.js → Card-CpE7eylY.js} +22 -23
- package/dist/{Collections-a3-roNwC.js → Collections-DFZ_McBC.js} +9 -10
- package/dist/{Credit-xkoO4GA-.js → Credit-Beml9hZH.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bfe4jlcS.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-XZtq7qUh.js} +761 -757
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CXNpRyJu.js → EffectSheet.vue_vue_type_style_index_0_lang-CrViguLt.js} +6 -6
- package/dist/{Experience-En_4HpV5.js → Experience-HYyi__Wf.js} +8 -8
- package/dist/{Game-CPIMY5Rx.js → Game-Dtn11CP_.js} +8 -8
- package/dist/{Marketing-BRojALh8.js → Marketing-BYMpQugE.js} +5 -5
- package/dist/{Member-HM92Pp4V.js → Member-BP5W6ocI.js} +4 -4
- package/dist/MemberList-CBHldoAX.js +1036 -0
- package/dist/{MemberTransactions-BGZTWPO5.js → MemberTransactions-BDuQ2poX.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BhlQe_mh.js → MessageInput.vue_vue_type_script_setup_true_lang-hkK13pIu.js} +2 -2
- package/dist/{Mission-iHEfJLwz.js → Mission-CVPfpXqE.js} +8 -8
- package/dist/{Point-CBmeOjue.js → Point-CNq0UR3i.js} +8 -8
- package/dist/{Promotion-D3szKS2s.js → Promotion-DDGkSEq4.js} +9 -9
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-ClahrluQ.js → RuleGroup.vue_vue_type_script_setup_true_lang-CAmHafWG.js} +14 -14
- package/dist/Segment-BTChC1dG.js +562 -0
- package/dist/{Setting-B89TXHBn.js → Setting-v3mUUrpu.js} +8 -8
- package/dist/Store-C0yfrePX.js +1530 -0
- package/dist/{StoreRewards-Bg6qPCMi.js → StoreRewards-D5iGadfW.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DNRDXAV9.js → StoreTransactions.vue_vue_type_script_setup_true_lang-kfT1Myf8.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-1m8hE_2Q.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CSYS1qZG.js} +1 -1
- package/dist/{Tier-CvgoQbzr.js → Tier-Dm78VvDR.js} +15 -15
- package/dist/{Title-zQ4E7pkb.js → Title-DBFXMOFn.js} +240 -239
- package/dist/{Transaction-Brg2Prn0.js → Transaction-BqxS-rpt.js} +2 -2
- package/dist/{Voucher-M4_C0xA_.js → Voucher-DSe_1GCt.js} +11 -11
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Cg4OkAeV.js → ZodTextField.vue_vue_type_script_setup_true_lang-iV7RhMM0.js} +1 -1
- package/dist/{app-hiS1HZ2Q.js → app-BKZTSa3I.js} +2 -2
- package/dist/{app-BDO6B-dK.js → app-CnclNehS.js} +948 -1071
- package/dist/app.js +1 -1
- package/dist/{business-BU2rimiT.js → business-BhDQlLuP.js} +1 -1
- package/dist/{campaign-Cak59IlT.js → campaign-CQ9Nt5aw.js} +2 -2
- package/dist/{collection.fn-lmTn6OT-.js → collection.fn-CCFKWzrd.js} +2 -2
- package/dist/{dto-EAvP09nY.js → dto-C9p4nlpM.js} +9 -17
- package/dist/{effect-imx80Jez.js → effect-BW2ndqNC.js} +9 -9
- package/dist/email-addresses-f6Qi69T4.js +705 -0
- package/dist/{export-I1QtSXHQ.js → export-BTF1th7Q.js} +3 -3
- package/dist/{helper-B77FMKeg.js → helper-AHY68CPn.js} +1 -1
- package/dist/{index-DY3w0_ua.js → index-BD3B1WsX.js} +20 -20
- package/dist/{index-C7Lp9s7K.js → index-BElfYwE6.js} +5 -5
- package/dist/{index-LRf1G2yC.js → index-Cc2nUHpJ.js} +1 -1
- package/dist/{index-DiS3ZJGm.js → index-Cg9npkzC.js} +71 -66
- package/dist/{index-DSQpb_nd.js → index-CsC5CEEX.js} +3 -3
- package/dist/{index-DEQD6r-F.js → index-D6XbU0Qa.js} +3 -3
- package/dist/{index-Bg5RKEF5.js → index-DX0qEaPU.js} +1 -1
- package/dist/{index-DGu7q6pb.js → index-DtGPRAq2.js} +1 -1
- package/dist/{index-QA2frxkp.js → index-DuLGLnDF.js} +1 -1
- package/dist/{index-Cpont_pY.js → index-WbzCjhRU.js} +1 -1
- package/dist/{index-C8_0ojX4.js → index-t3RW39Z7.js} +1 -1
- package/dist/index-tkSRs4ZW.js +28997 -0
- package/dist/{index.esm2017-DhxrMX-Q.js → index.esm2017-D_SvBpjK.js} +1 -1
- package/dist/{loading-CMVcERFb.js → loading-DYgnbsuc.js} +453 -462
- package/dist/{membership-DIp98t0S.js → membership-DD0hHJl3.js} +3 -3
- package/dist/money-Cgrz-BtT.js +15 -0
- package/dist/number-DnNIyLAO.js +12 -0
- package/dist/{rule-Dkp0gq2R.js → rule-BtuowduB.js} +2 -2
- package/dist/{rule-builder-D87kQH2m.js → rule-builder-CtABwqc_.js} +1 -1
- package/dist/{template-BOtta_xY.js → template-DLkN8BDg.js} +4 -4
- package/dist/type_drinks-D6jnpvwV.js +4 -0
- package/dist/{xlsx-BpU-uByi.js → usePagination-Dt34_eYZ.js} +3183 -2962
- package/dist/{vue-i18n-C1A0vrPS.js → vue-i18n-Bzlk0Afk.js} +2 -2
- package/package.json +3 -3
- package/dist/Analytic-Cz12ieSt.js +0 -763
- package/dist/MemberList-BthUMB4B.js +0 -1732
- package/dist/Segment-LJyUhy6j.js +0 -437
- package/dist/Store-GwzopXoP.js +0 -1511
- package/dist/index-D2yy8eRo.js +0 -29193
- package/dist/money-DFIWDnVe.js +0 -15
- package/dist/number-CoCEX2rq.js +0 -12
- package/dist/usePagination-BeF5K3M7.js +0 -223
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { useCoreStore as We, FeedMeAuth as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import "./index-
|
|
7
|
-
import { components as Z, useSnackbar as
|
|
8
|
-
import { u as
|
|
9
|
-
import { R as f } from "./app-
|
|
10
|
-
import { J as
|
|
11
|
-
import { r as ye, L as
|
|
1
|
+
import { defineComponent as ut, ref as te, h as Q, watch as dt, resolveComponent as Xt, openBlock as ne, createBlock as ht, unref as P, computed as Ve, onMounted as Qt, createElementBlock as He, Fragment as Zt, createCommentVNode as $e, createVNode as en, createElementVNode as tn, nextTick as nn } from "vue";
|
|
2
|
+
import { useRouter as rn, useRoute as ft, RouterView as sn } from "vue-router";
|
|
3
|
+
import { useCoreStore as We, FeedMeAuth as on } from "@feedmepos/mf-common";
|
|
4
|
+
import { u as an } from "./app-wDQR6dpb.js";
|
|
5
|
+
import { u as cn } from "./business-BhDQlLuP.js";
|
|
6
|
+
import "./index-WbzCjhRU.js";
|
|
7
|
+
import { components as Z, useSnackbar as ln, useDialog as un } from "@feedmepos/ui-library";
|
|
8
|
+
import { u as dn } from "./vue-i18n-Bzlk0Afk.js";
|
|
9
|
+
import { R as f } from "./app-CnclNehS.js";
|
|
10
|
+
import { J as hn } from "./JsonViewer-v8_C7l5N.js";
|
|
11
|
+
import { r as ye, L as fn, g as pt, i as pn, a as gn, _ as je, C as Ge, b as mn, S as z, c as w, d as j, E as be, e as _n, f as gt, h as vn, j as In, k as mt, l as m, m as Tn, F as Re, n as wn, q as K, o as yn, p as En, s as kn, t as Sn, u as bn } from "./index.esm2017-D_SvBpjK.js";
|
|
12
12
|
import { _ as Pe } from "./tslib.es6-BCqqvLQ_.js";
|
|
13
|
-
import { S as Be } from "./index-
|
|
14
|
-
const
|
|
13
|
+
import { S as Be, c as qe } from "./index-tkSRs4ZW.js";
|
|
14
|
+
const Rn = /* @__PURE__ */ ut({
|
|
15
15
|
__name: "NavigationTab",
|
|
16
16
|
setup(n) {
|
|
17
|
-
const { t: e } =
|
|
17
|
+
const { t: e } = dn(), t = te(), i = [
|
|
18
18
|
{
|
|
19
19
|
label: e("connect.navigation.analytic"),
|
|
20
20
|
value: f["$connect-ANALYTIC"]
|
|
@@ -109,8 +109,8 @@ const bn = /* @__PURE__ */ lt({
|
|
|
109
109
|
label: e("connect.navigation.setting"),
|
|
110
110
|
value: f["$connect-SETTING"]
|
|
111
111
|
}
|
|
112
|
-
], r =
|
|
113
|
-
|
|
112
|
+
], r = rn(), s = ft(), o = i.reduce((a, l) => [...(l.children ?? []).map((d) => d.value), ...a, l.value], []);
|
|
113
|
+
dt(
|
|
114
114
|
() => s,
|
|
115
115
|
(a) => {
|
|
116
116
|
const l = a.matched.map((d) => d.name).reverse();
|
|
@@ -123,8 +123,8 @@ const bn = /* @__PURE__ */ lt({
|
|
|
123
123
|
}
|
|
124
124
|
return (a, l) => {
|
|
125
125
|
var h;
|
|
126
|
-
const d =
|
|
127
|
-
return ne(),
|
|
126
|
+
const d = Xt("FmCollapsibleTabs");
|
|
127
|
+
return ne(), ht(d, {
|
|
128
128
|
class: "border-fm-color-neutral-gray-100 border-r py-16 px-4",
|
|
129
129
|
"model-value": (h = P(t)) == null ? void 0 : h.toString(),
|
|
130
130
|
items: i,
|
|
@@ -133,7 +133,7 @@ const bn = /* @__PURE__ */ lt({
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
|
-
var
|
|
136
|
+
var Pn = "firebase", An = "10.12.4";
|
|
137
137
|
/**
|
|
138
138
|
* @license
|
|
139
139
|
* Copyright 2020 Google LLC
|
|
@@ -150,13 +150,13 @@ var Rn = "firebase", Pn = "10.12.4";
|
|
|
150
150
|
* See the License for the specific language governing permissions and
|
|
151
151
|
* limitations under the License.
|
|
152
152
|
*/
|
|
153
|
-
ye(
|
|
154
|
-
function
|
|
153
|
+
ye(Pn, An, "app");
|
|
154
|
+
function _t() {
|
|
155
155
|
return {
|
|
156
156
|
"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."
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
const
|
|
159
|
+
const Cn = _t, vt = new be("auth", "Firebase", _t());
|
|
160
160
|
/**
|
|
161
161
|
* @license
|
|
162
162
|
* Copyright 2020 Google LLC
|
|
@@ -173,8 +173,8 @@ const An = gt, _t = new be("auth", "Firebase", gt());
|
|
|
173
173
|
* See the License for the specific language governing permissions and
|
|
174
174
|
* limitations under the License.
|
|
175
175
|
*/
|
|
176
|
-
const ae = new
|
|
177
|
-
function
|
|
176
|
+
const ae = new fn("@firebase/auth");
|
|
177
|
+
function On(n, ...e) {
|
|
178
178
|
ae.logLevel <= mt.WARN && ae.warn(`Auth (${z}): ${n}`, ...e);
|
|
179
179
|
}
|
|
180
180
|
function ie(n, ...e) {
|
|
@@ -202,21 +202,21 @@ function S(n, ...e) {
|
|
|
202
202
|
function I(n, ...e) {
|
|
203
203
|
return Ae(n, ...e);
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
const i = Object.assign(Object.assign({},
|
|
205
|
+
function It(n, e, t) {
|
|
206
|
+
const i = Object.assign(Object.assign({}, Cn()), { [e]: t });
|
|
207
207
|
return new be("auth", "Firebase", i).create(e, {
|
|
208
208
|
appName: n.name
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
function L(n) {
|
|
212
|
-
return
|
|
212
|
+
return It(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
|
|
213
213
|
}
|
|
214
214
|
function Ae(n, ...e) {
|
|
215
215
|
if (typeof n != "string") {
|
|
216
216
|
const t = e[0], i = [...e.slice(1)];
|
|
217
217
|
return i[0] && (i[0].appName = n.name), n._errorFactory.create(t, ...i);
|
|
218
218
|
}
|
|
219
|
-
return
|
|
219
|
+
return vt.create(n, ...e);
|
|
220
220
|
}
|
|
221
221
|
function u(n, e, ...t) {
|
|
222
222
|
if (!n)
|
|
@@ -249,10 +249,10 @@ function Ee() {
|
|
|
249
249
|
var n;
|
|
250
250
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
251
251
|
}
|
|
252
|
-
function
|
|
253
|
-
return
|
|
252
|
+
function Nn() {
|
|
253
|
+
return ze() === "http:" || ze() === "https:";
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function ze() {
|
|
256
256
|
var n;
|
|
257
257
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
|
|
258
258
|
}
|
|
@@ -272,15 +272,15 @@ function qe() {
|
|
|
272
272
|
* See the License for the specific language governing permissions and
|
|
273
273
|
* limitations under the License.
|
|
274
274
|
*/
|
|
275
|
-
function
|
|
275
|
+
function Ln() {
|
|
276
276
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
277
277
|
// This is especially true for Cordova apps which have unreliable
|
|
278
278
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
279
279
|
// installed which overwrites the native navigator.onLine value and
|
|
280
280
|
// defines navigator.connection.
|
|
281
|
-
(
|
|
281
|
+
(Nn() || mn() || "connection" in navigator) ? navigator.onLine : !0;
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function Mn() {
|
|
284
284
|
if (typeof navigator > "u")
|
|
285
285
|
return null;
|
|
286
286
|
const n = navigator;
|
|
@@ -310,10 +310,10 @@ function Ln() {
|
|
|
310
310
|
*/
|
|
311
311
|
class J {
|
|
312
312
|
constructor(e, t) {
|
|
313
|
-
this.shortDelay = e, this.longDelay = t, b(t > e, "Short delay should be less than long delay!"), this.isMobile =
|
|
313
|
+
this.shortDelay = e, this.longDelay = t, b(t > e, "Short delay should be less than long delay!"), this.isMobile = pn() || gn();
|
|
314
314
|
}
|
|
315
315
|
get() {
|
|
316
|
-
return
|
|
316
|
+
return Ln() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
/**
|
|
@@ -353,7 +353,7 @@ function Ce(n, e) {
|
|
|
353
353
|
* See the License for the specific language governing permissions and
|
|
354
354
|
* limitations under the License.
|
|
355
355
|
*/
|
|
356
|
-
class
|
|
356
|
+
class Tt {
|
|
357
357
|
static initialize(e, t, i) {
|
|
358
358
|
this.fetchImpl = e, t && (this.headersImpl = t), i && (this.responseImpl = i);
|
|
359
359
|
}
|
|
@@ -407,7 +407,7 @@ class It {
|
|
|
407
407
|
* See the License for the specific language governing permissions and
|
|
408
408
|
* limitations under the License.
|
|
409
409
|
*/
|
|
410
|
-
const
|
|
410
|
+
const Un = {
|
|
411
411
|
// Custom token errors.
|
|
412
412
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
|
413
413
|
// This can only happen if the SDK sends a bad request.
|
|
@@ -498,12 +498,12 @@ const Mn = {
|
|
|
498
498
|
* See the License for the specific language governing permissions and
|
|
499
499
|
* limitations under the License.
|
|
500
500
|
*/
|
|
501
|
-
const
|
|
501
|
+
const Dn = new J(3e4, 6e4);
|
|
502
502
|
function he(n, e) {
|
|
503
503
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
504
504
|
}
|
|
505
505
|
async function G(n, e, t, i, r = {}) {
|
|
506
|
-
return
|
|
506
|
+
return wt(n, r, async () => {
|
|
507
507
|
let s = {}, o = {};
|
|
508
508
|
i && (e === "GET" ? o = i : s = {
|
|
509
509
|
body: JSON.stringify(i)
|
|
@@ -515,18 +515,18 @@ async function G(n, e, t, i, r = {}) {
|
|
|
515
515
|
] = "application/json", n.languageCode && (a[
|
|
516
516
|
"X-Firebase-Locale"
|
|
517
517
|
/* HttpHeader.X_FIREBASE_LOCALE */
|
|
518
|
-
] = n.languageCode),
|
|
518
|
+
] = n.languageCode), Tt.fetch()(Et(n, n.config.apiHost, t, c), Object.assign({
|
|
519
519
|
method: e,
|
|
520
520
|
headers: a,
|
|
521
521
|
referrerPolicy: "no-referrer"
|
|
522
522
|
}, s));
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
|
-
async function
|
|
525
|
+
async function wt(n, e, t) {
|
|
526
526
|
n._canInitEmulator = !1;
|
|
527
|
-
const i = Object.assign(Object.assign({},
|
|
527
|
+
const i = Object.assign(Object.assign({}, Un), e);
|
|
528
528
|
try {
|
|
529
|
-
const r = new
|
|
529
|
+
const r = new Fn(n), s = await Promise.race([
|
|
530
530
|
t(),
|
|
531
531
|
r.promise
|
|
532
532
|
]);
|
|
@@ -546,7 +546,7 @@ async function Tt(n, e, t) {
|
|
|
546
546
|
throw ee(n, "user-disabled", o);
|
|
547
547
|
const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
|
|
548
548
|
if (l)
|
|
549
|
-
throw
|
|
549
|
+
throw It(n, d, l);
|
|
550
550
|
S(n, d);
|
|
551
551
|
}
|
|
552
552
|
} catch (r) {
|
|
@@ -555,24 +555,24 @@ async function Tt(n, e, t) {
|
|
|
555
555
|
S(n, "network-request-failed", { message: String(r) });
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
async function
|
|
558
|
+
async function yt(n, e, t, i, r = {}) {
|
|
559
559
|
const s = await G(n, e, t, i, r);
|
|
560
560
|
return "mfaPendingCredential" in s && S(n, "multi-factor-auth-required", {
|
|
561
561
|
_serverResponse: s
|
|
562
562
|
}), s;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Et(n, e, t, i) {
|
|
565
565
|
const r = `${e}${t}?${i}`;
|
|
566
566
|
return n.config.emulator ? Ce(n.config, r) : `${n.config.apiScheme}://${r}`;
|
|
567
567
|
}
|
|
568
|
-
class
|
|
568
|
+
class Fn {
|
|
569
569
|
constructor(e) {
|
|
570
570
|
this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
|
|
571
571
|
this.timer = setTimeout(() => i(I(
|
|
572
572
|
this.auth,
|
|
573
573
|
"network-request-failed"
|
|
574
574
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
575
|
-
)),
|
|
575
|
+
)), Dn.get());
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
578
|
clearNetworkTimeout() {
|
|
@@ -603,10 +603,10 @@ function ee(n, e, t) {
|
|
|
603
603
|
* See the License for the specific language governing permissions and
|
|
604
604
|
* limitations under the License.
|
|
605
605
|
*/
|
|
606
|
-
async function
|
|
606
|
+
async function xn(n, e) {
|
|
607
607
|
return G(n, "POST", "/v1/accounts:delete", e);
|
|
608
608
|
}
|
|
609
|
-
async function
|
|
609
|
+
async function kt(n, e) {
|
|
610
610
|
return G(n, "POST", "/v1/accounts:lookup", e);
|
|
611
611
|
}
|
|
612
612
|
/**
|
|
@@ -634,7 +634,7 @@ function B(n) {
|
|
|
634
634
|
} catch {
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
async function
|
|
637
|
+
async function Vn(n, e = !1) {
|
|
638
638
|
const t = j(n), i = await t.getIdToken(e), r = Oe(i);
|
|
639
639
|
u(
|
|
640
640
|
r && r.exp && r.auth_time && r.iat,
|
|
@@ -661,13 +661,13 @@ function Oe(n) {
|
|
|
661
661
|
if (e === void 0 || t === void 0 || i === void 0)
|
|
662
662
|
return ie("JWT malformed, contained fewer than 3 sections"), null;
|
|
663
663
|
try {
|
|
664
|
-
const r =
|
|
664
|
+
const r = wn(t);
|
|
665
665
|
return r ? JSON.parse(r) : (ie("Failed to decode base64 JWT payload"), null);
|
|
666
666
|
} catch (r) {
|
|
667
667
|
return ie("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function Ke(n) {
|
|
671
671
|
const e = Oe(n);
|
|
672
672
|
return u(
|
|
673
673
|
e,
|
|
@@ -705,10 +705,10 @@ async function q(n, e, t = !1) {
|
|
|
705
705
|
try {
|
|
706
706
|
return await e;
|
|
707
707
|
} catch (i) {
|
|
708
|
-
throw i instanceof Re &&
|
|
708
|
+
throw i instanceof Re && Hn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Hn({ code: n }) {
|
|
712
712
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
713
713
|
}
|
|
714
714
|
/**
|
|
@@ -727,7 +727,7 @@ function Vn({ code: n }) {
|
|
|
727
727
|
* See the License for the specific language governing permissions and
|
|
728
728
|
* limitations under the License.
|
|
729
729
|
*/
|
|
730
|
-
class
|
|
730
|
+
class $n {
|
|
731
731
|
constructor(e) {
|
|
732
732
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
733
733
|
}
|
|
@@ -824,7 +824,7 @@ class ke {
|
|
|
824
824
|
*/
|
|
825
825
|
async function ce(n) {
|
|
826
826
|
var e;
|
|
827
|
-
const t = n.auth, i = await n.getIdToken(), r = await q(n,
|
|
827
|
+
const t = n.auth, i = await n.getIdToken(), r = await q(n, kt(t, { idToken: i }));
|
|
828
828
|
u(
|
|
829
829
|
r == null ? void 0 : r.users.length,
|
|
830
830
|
t,
|
|
@@ -833,7 +833,7 @@ async function ce(n) {
|
|
|
833
833
|
);
|
|
834
834
|
const s = r.users[0];
|
|
835
835
|
n._notifyReloadListener(s);
|
|
836
|
-
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ?
|
|
836
|
+
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? St(s.providerUserInfo) : [], c = jn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
|
|
837
837
|
uid: s.localId,
|
|
838
838
|
displayName: s.displayName || null,
|
|
839
839
|
photoURL: s.photoUrl || null,
|
|
@@ -847,14 +847,14 @@ async function ce(n) {
|
|
|
847
847
|
};
|
|
848
848
|
Object.assign(n, h);
|
|
849
849
|
}
|
|
850
|
-
async function
|
|
850
|
+
async function Wn(n) {
|
|
851
851
|
const e = j(n);
|
|
852
852
|
await ce(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function jn(n, e) {
|
|
855
855
|
return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function St(n) {
|
|
858
858
|
return n.map((e) => {
|
|
859
859
|
var { providerId: t } = e, i = Pe(e, ["providerId"]);
|
|
860
860
|
return {
|
|
@@ -883,16 +883,16 @@ function kt(n) {
|
|
|
883
883
|
* See the License for the specific language governing permissions and
|
|
884
884
|
* limitations under the License.
|
|
885
885
|
*/
|
|
886
|
-
async function
|
|
887
|
-
const t = await
|
|
886
|
+
async function Gn(n, e) {
|
|
887
|
+
const t = await wt(n, {}, async () => {
|
|
888
888
|
const i = K({
|
|
889
889
|
grant_type: "refresh_token",
|
|
890
890
|
refresh_token: e
|
|
891
|
-
}).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o =
|
|
891
|
+
}).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = Et(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
|
|
892
892
|
return c[
|
|
893
893
|
"Content-Type"
|
|
894
894
|
/* HttpHeader.CONTENT_TYPE */
|
|
895
|
-
] = "application/x-www-form-urlencoded",
|
|
895
|
+
] = "application/x-www-form-urlencoded", Tt.fetch()(o, {
|
|
896
896
|
method: "POST",
|
|
897
897
|
headers: c,
|
|
898
898
|
body: i
|
|
@@ -904,7 +904,7 @@ async function jn(n, e) {
|
|
|
904
904
|
refreshToken: t.refresh_token
|
|
905
905
|
};
|
|
906
906
|
}
|
|
907
|
-
async function
|
|
907
|
+
async function Bn(n, e) {
|
|
908
908
|
return G(n, "POST", "/v2/accounts:revokeToken", he(n, e));
|
|
909
909
|
}
|
|
910
910
|
/**
|
|
@@ -944,7 +944,7 @@ class H {
|
|
|
944
944
|
"internal-error"
|
|
945
945
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
946
946
|
);
|
|
947
|
-
const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) :
|
|
947
|
+
const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : Ke(e.idToken);
|
|
948
948
|
this.updateTokensAndExpiration(e.idToken, e.refreshToken, t);
|
|
949
949
|
}
|
|
950
950
|
updateFromIdToken(e) {
|
|
@@ -953,7 +953,7 @@ class H {
|
|
|
953
953
|
"internal-error"
|
|
954
954
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
955
955
|
);
|
|
956
|
-
const t =
|
|
956
|
+
const t = Ke(e);
|
|
957
957
|
this.updateTokensAndExpiration(e, null, t);
|
|
958
958
|
}
|
|
959
959
|
async getToken(e, t = !1) {
|
|
@@ -968,7 +968,7 @@ class H {
|
|
|
968
968
|
this.refreshToken = null;
|
|
969
969
|
}
|
|
970
970
|
async refresh(e, t) {
|
|
971
|
-
const { accessToken: i, refreshToken: r, expiresIn: s } = await
|
|
971
|
+
const { accessToken: i, refreshToken: r, expiresIn: s } = await Gn(e, t);
|
|
972
972
|
this.updateTokensAndExpiration(i, r, Number(s));
|
|
973
973
|
}
|
|
974
974
|
updateTokensAndExpiration(e, t, i) {
|
|
@@ -1023,7 +1023,7 @@ function R(n, e) {
|
|
|
1023
1023
|
class E {
|
|
1024
1024
|
constructor(e) {
|
|
1025
1025
|
var { uid: t, auth: i, stsTokenManager: r } = e, s = Pe(e, ["uid", "auth", "stsTokenManager"]);
|
|
1026
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
1026
|
+
this.providerId = "firebase", this.proactiveRefresh = new $n(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);
|
|
1027
1027
|
}
|
|
1028
1028
|
async getIdToken(e) {
|
|
1029
1029
|
const t = await q(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -1035,10 +1035,10 @@ class E {
|
|
|
1035
1035
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
1036
1036
|
}
|
|
1037
1037
|
getIdTokenResult(e) {
|
|
1038
|
-
return
|
|
1038
|
+
return Vn(this, e);
|
|
1039
1039
|
}
|
|
1040
1040
|
reload() {
|
|
1041
|
-
return
|
|
1041
|
+
return Wn(this);
|
|
1042
1042
|
}
|
|
1043
1043
|
_assign(e) {
|
|
1044
1044
|
this !== e && (u(
|
|
@@ -1077,7 +1077,7 @@ class E {
|
|
|
1077
1077
|
if (w(this.auth.app))
|
|
1078
1078
|
return Promise.reject(L(this.auth));
|
|
1079
1079
|
const e = await this.getIdToken();
|
|
1080
|
-
return await q(this,
|
|
1080
|
+
return await q(this, xn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
1081
1081
|
}
|
|
1082
1082
|
toJSON() {
|
|
1083
1083
|
return Object.assign(Object.assign({
|
|
@@ -1105,14 +1105,14 @@ class E {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
static _fromJSON(e, t) {
|
|
1107
1107
|
var i, r, s, o, c, a, l, d;
|
|
1108
|
-
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,
|
|
1108
|
+
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, g = (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;
|
|
1109
1109
|
u(
|
|
1110
1110
|
_e && xe,
|
|
1111
1111
|
e,
|
|
1112
1112
|
"internal-error"
|
|
1113
1113
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1114
1114
|
);
|
|
1115
|
-
const
|
|
1115
|
+
const Jt = H.fromJSON(this.name, xe);
|
|
1116
1116
|
u(
|
|
1117
1117
|
typeof _e == "string",
|
|
1118
1118
|
e,
|
|
@@ -1128,7 +1128,7 @@ class E {
|
|
|
1128
1128
|
e,
|
|
1129
1129
|
"internal-error"
|
|
1130
1130
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1131
|
-
), R(F, e.name), R(M, e.name), R(p, e.name), R(
|
|
1131
|
+
), R(F, e.name), R(M, e.name), R(p, e.name), R(g, e.name), R(v, e.name), R(x, e.name);
|
|
1132
1132
|
const Ie = new E({
|
|
1133
1133
|
uid: _e,
|
|
1134
1134
|
auth: e,
|
|
@@ -1139,11 +1139,11 @@ class E {
|
|
|
1139
1139
|
photoURL: M,
|
|
1140
1140
|
phoneNumber: F,
|
|
1141
1141
|
tenantId: p,
|
|
1142
|
-
stsTokenManager:
|
|
1142
|
+
stsTokenManager: Jt,
|
|
1143
1143
|
createdAt: v,
|
|
1144
1144
|
lastLoginAt: x
|
|
1145
1145
|
});
|
|
1146
|
-
return ve && Array.isArray(ve) && (Ie.providerData = ve.map((
|
|
1146
|
+
return ve && Array.isArray(ve) && (Ie.providerData = ve.map((Yt) => Object.assign({}, Yt))), g && (Ie._redirectEventId = g), Ie;
|
|
1147
1147
|
}
|
|
1148
1148
|
/**
|
|
1149
1149
|
* Initialize a User from an idToken server response
|
|
@@ -1173,7 +1173,7 @@ class E {
|
|
|
1173
1173
|
"internal-error"
|
|
1174
1174
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1175
1175
|
);
|
|
1176
|
-
const s = r.providerUserInfo !== void 0 ?
|
|
1176
|
+
const s = r.providerUserInfo !== void 0 ? St(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new H();
|
|
1177
1177
|
c.updateFromIdToken(i);
|
|
1178
1178
|
const a = new E({
|
|
1179
1179
|
uid: r.localId,
|
|
@@ -1211,11 +1211,11 @@ class E {
|
|
|
1211
1211
|
* See the License for the specific language governing permissions and
|
|
1212
1212
|
* limitations under the License.
|
|
1213
1213
|
*/
|
|
1214
|
-
const
|
|
1214
|
+
const Je = /* @__PURE__ */ new Map();
|
|
1215
1215
|
function k(n) {
|
|
1216
1216
|
b(n instanceof Function, "Expected a class definition");
|
|
1217
|
-
let e =
|
|
1218
|
-
return e ? (b(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(),
|
|
1217
|
+
let e = Je.get(n);
|
|
1218
|
+
return e ? (b(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Je.set(n, e), e);
|
|
1219
1219
|
}
|
|
1220
1220
|
/**
|
|
1221
1221
|
* @license
|
|
@@ -1233,7 +1233,7 @@ function k(n) {
|
|
|
1233
1233
|
* See the License for the specific language governing permissions and
|
|
1234
1234
|
* limitations under the License.
|
|
1235
1235
|
*/
|
|
1236
|
-
class
|
|
1236
|
+
class bt {
|
|
1237
1237
|
constructor() {
|
|
1238
1238
|
this.type = "NONE", this.storage = {};
|
|
1239
1239
|
}
|
|
@@ -1255,8 +1255,8 @@ class St {
|
|
|
1255
1255
|
_removeListener(e, t) {
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
1258
|
-
|
|
1259
|
-
const
|
|
1258
|
+
bt.type = "NONE";
|
|
1259
|
+
const Ye = bt;
|
|
1260
1260
|
/**
|
|
1261
1261
|
* @license
|
|
1262
1262
|
* Copyright 2019 Google LLC
|
|
@@ -1307,12 +1307,12 @@ class $ {
|
|
|
1307
1307
|
}
|
|
1308
1308
|
static async create(e, t, i = "authUser") {
|
|
1309
1309
|
if (!t.length)
|
|
1310
|
-
return new $(k(
|
|
1310
|
+
return new $(k(Ye), e, i);
|
|
1311
1311
|
const r = (await Promise.all(t.map(async (l) => {
|
|
1312
1312
|
if (await l._isAvailable())
|
|
1313
1313
|
return l;
|
|
1314
1314
|
}))).filter((l) => l);
|
|
1315
|
-
let s = r[0] || k(
|
|
1315
|
+
let s = r[0] || k(Ye);
|
|
1316
1316
|
const o = re(i, e.config.apiKey, e.name);
|
|
1317
1317
|
let c = null;
|
|
1318
1318
|
for (const l of t)
|
|
@@ -1351,29 +1351,29 @@ class $ {
|
|
|
1351
1351
|
* See the License for the specific language governing permissions and
|
|
1352
1352
|
* limitations under the License.
|
|
1353
1353
|
*/
|
|
1354
|
-
function
|
|
1354
|
+
function Xe(n) {
|
|
1355
1355
|
const e = n.toLowerCase();
|
|
1356
1356
|
if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
|
|
1357
1357
|
return "Opera";
|
|
1358
|
-
if (
|
|
1358
|
+
if (At(e))
|
|
1359
1359
|
return "IEMobile";
|
|
1360
1360
|
if (e.includes("msie") || e.includes("trident/"))
|
|
1361
1361
|
return "IE";
|
|
1362
1362
|
if (e.includes("edge/"))
|
|
1363
1363
|
return "Edge";
|
|
1364
|
-
if (
|
|
1364
|
+
if (Rt(e))
|
|
1365
1365
|
return "Firefox";
|
|
1366
1366
|
if (e.includes("silk/"))
|
|
1367
1367
|
return "Silk";
|
|
1368
|
-
if (Ct(e))
|
|
1369
|
-
return "Blackberry";
|
|
1370
1368
|
if (Ot(e))
|
|
1369
|
+
return "Blackberry";
|
|
1370
|
+
if (Nt(e))
|
|
1371
1371
|
return "Webos";
|
|
1372
1372
|
if (Ne(e))
|
|
1373
1373
|
return "Safari";
|
|
1374
|
-
if ((e.includes("chrome/") ||
|
|
1374
|
+
if ((e.includes("chrome/") || Pt(e)) && !e.includes("edge/"))
|
|
1375
1375
|
return "Chrome";
|
|
1376
|
-
if (
|
|
1376
|
+
if (Ct(e))
|
|
1377
1377
|
return "Android";
|
|
1378
1378
|
{
|
|
1379
1379
|
const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, i = n.match(t);
|
|
@@ -1382,42 +1382,42 @@ function Ye(n) {
|
|
|
1382
1382
|
}
|
|
1383
1383
|
return "Other";
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1385
|
+
function Rt(n = m()) {
|
|
1386
1386
|
return /firefox\//i.test(n);
|
|
1387
1387
|
}
|
|
1388
|
-
function Ne(n =
|
|
1388
|
+
function Ne(n = m()) {
|
|
1389
1389
|
const e = n.toLowerCase();
|
|
1390
1390
|
return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1392
|
+
function Pt(n = m()) {
|
|
1393
1393
|
return /crios\//i.test(n);
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1395
|
+
function At(n = m()) {
|
|
1396
1396
|
return /iemobile/i.test(n);
|
|
1397
1397
|
}
|
|
1398
|
-
function
|
|
1398
|
+
function Ct(n = m()) {
|
|
1399
1399
|
return /android/i.test(n);
|
|
1400
1400
|
}
|
|
1401
|
-
function
|
|
1401
|
+
function Ot(n = m()) {
|
|
1402
1402
|
return /blackberry/i.test(n);
|
|
1403
1403
|
}
|
|
1404
|
-
function
|
|
1404
|
+
function Nt(n = m()) {
|
|
1405
1405
|
return /webos/i.test(n);
|
|
1406
1406
|
}
|
|
1407
|
-
function fe(n =
|
|
1407
|
+
function fe(n = m()) {
|
|
1408
1408
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function qn(n = m()) {
|
|
1411
1411
|
var e;
|
|
1412
1412
|
return fe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1415
|
-
return
|
|
1414
|
+
function zn() {
|
|
1415
|
+
return yn() && document.documentMode === 10;
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1418
|
-
return fe(n) ||
|
|
1417
|
+
function Lt(n = m()) {
|
|
1418
|
+
return fe(n) || Ct(n) || Nt(n) || Ot(n) || /windows phone/i.test(n) || At(n);
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function Kn() {
|
|
1421
1421
|
try {
|
|
1422
1422
|
return !!(window && window !== window.top);
|
|
1423
1423
|
} catch {
|
|
@@ -1440,14 +1440,14 @@ function zn() {
|
|
|
1440
1440
|
* See the License for the specific language governing permissions and
|
|
1441
1441
|
* limitations under the License.
|
|
1442
1442
|
*/
|
|
1443
|
-
function
|
|
1443
|
+
function Mt(n, e = []) {
|
|
1444
1444
|
let t;
|
|
1445
1445
|
switch (n) {
|
|
1446
1446
|
case "Browser":
|
|
1447
|
-
t =
|
|
1447
|
+
t = Xe(m());
|
|
1448
1448
|
break;
|
|
1449
1449
|
case "Worker":
|
|
1450
|
-
t = `${
|
|
1450
|
+
t = `${Xe(m())}-${n}`;
|
|
1451
1451
|
break;
|
|
1452
1452
|
default:
|
|
1453
1453
|
t = n;
|
|
@@ -1471,7 +1471,7 @@ function Lt(n, e = []) {
|
|
|
1471
1471
|
* See the License for the specific language governing permissions and
|
|
1472
1472
|
* limitations under the License.
|
|
1473
1473
|
*/
|
|
1474
|
-
class
|
|
1474
|
+
class Jn {
|
|
1475
1475
|
constructor(e) {
|
|
1476
1476
|
this.auth = e, this.queue = [];
|
|
1477
1477
|
}
|
|
@@ -1526,7 +1526,7 @@ class Kn {
|
|
|
1526
1526
|
* See the License for the specific language governing permissions and
|
|
1527
1527
|
* limitations under the License.
|
|
1528
1528
|
*/
|
|
1529
|
-
async function
|
|
1529
|
+
async function Yn(n, e = {}) {
|
|
1530
1530
|
return G(n, "GET", "/v2/passwordPolicy", he(n, e));
|
|
1531
1531
|
}
|
|
1532
1532
|
/**
|
|
@@ -1545,12 +1545,12 @@ async function Jn(n, e = {}) {
|
|
|
1545
1545
|
* See the License for the specific language governing permissions and
|
|
1546
1546
|
* limitations under the License.
|
|
1547
1547
|
*/
|
|
1548
|
-
const
|
|
1549
|
-
class
|
|
1548
|
+
const Xn = 6;
|
|
1549
|
+
class Qn {
|
|
1550
1550
|
constructor(e) {
|
|
1551
1551
|
var t, i, r, s;
|
|
1552
1552
|
const o = e.customStrengthOptions;
|
|
1553
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t :
|
|
1553
|
+
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;
|
|
1554
1554
|
}
|
|
1555
1555
|
validatePassword(e) {
|
|
1556
1556
|
var t, i, r, s, o, c;
|
|
@@ -1633,9 +1633,9 @@ class Xn {
|
|
|
1633
1633
|
* See the License for the specific language governing permissions and
|
|
1634
1634
|
* limitations under the License.
|
|
1635
1635
|
*/
|
|
1636
|
-
class
|
|
1636
|
+
class Zn {
|
|
1637
1637
|
constructor(e, t, i, r) {
|
|
1638
|
-
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
|
|
1638
|
+
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 Qe(this), this.idTokenSubscription = new Qe(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 = vt, 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;
|
|
1639
1639
|
}
|
|
1640
1640
|
_initializeWithPersistence(e, t) {
|
|
1641
1641
|
return t && (this._popupRedirectResolver = k(t)), this._initializationPromise = this.queue(async () => {
|
|
@@ -1671,7 +1671,7 @@ class Qn {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
async initializeCurrentUserFromIdToken(e) {
|
|
1673
1673
|
try {
|
|
1674
|
-
const t = await
|
|
1674
|
+
const t = await kt(this, { idToken: e }), i = await E._fromGetAccountInfoResponse(this, t, e);
|
|
1675
1675
|
await this.directlySetCurrentUser(i);
|
|
1676
1676
|
} catch (t) {
|
|
1677
1677
|
console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
|
|
@@ -1729,7 +1729,7 @@ class Qn {
|
|
|
1729
1729
|
return this.directlySetCurrentUser(e);
|
|
1730
1730
|
}
|
|
1731
1731
|
useDeviceLanguage() {
|
|
1732
|
-
this.languageCode =
|
|
1732
|
+
this.languageCode = Mn();
|
|
1733
1733
|
}
|
|
1734
1734
|
async _delete() {
|
|
1735
1735
|
this._deleted = !0;
|
|
@@ -1780,7 +1780,7 @@ class Qn {
|
|
|
1780
1780
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
1781
1781
|
}
|
|
1782
1782
|
async _updatePasswordPolicy() {
|
|
1783
|
-
const e = await
|
|
1783
|
+
const e = await Yn(this), t = new Qn(e);
|
|
1784
1784
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
1785
1785
|
}
|
|
1786
1786
|
_getPersistence() {
|
|
@@ -1820,7 +1820,7 @@ class Qn {
|
|
|
1820
1820
|
token: e,
|
|
1821
1821
|
idToken: t
|
|
1822
1822
|
};
|
|
1823
|
-
this.tenantId != null && (i.tenantId = this.tenantId), await
|
|
1823
|
+
this.tenantId != null && (i.tenantId = this.tenantId), await Bn(this, i);
|
|
1824
1824
|
}
|
|
1825
1825
|
}
|
|
1826
1826
|
toJSON() {
|
|
@@ -1933,7 +1933,7 @@ class Qn {
|
|
|
1933
1933
|
), this.persistenceManager;
|
|
1934
1934
|
}
|
|
1935
1935
|
_logFramework(e) {
|
|
1936
|
-
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion =
|
|
1936
|
+
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Mt(this.config.clientPlatform, this._getFrameworks()));
|
|
1937
1937
|
}
|
|
1938
1938
|
_getFrameworks() {
|
|
1939
1939
|
return this.frameworks;
|
|
@@ -1963,15 +1963,15 @@ class Qn {
|
|
|
1963
1963
|
async _getAppCheckToken() {
|
|
1964
1964
|
var e;
|
|
1965
1965
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
|
1966
|
-
return t != null && t.error &&
|
|
1966
|
+
return t != null && t.error && On(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
|
1967
1967
|
}
|
|
1968
1968
|
}
|
|
1969
1969
|
function pe(n) {
|
|
1970
1970
|
return j(n);
|
|
1971
1971
|
}
|
|
1972
|
-
class
|
|
1972
|
+
class Qe {
|
|
1973
1973
|
constructor(e) {
|
|
1974
|
-
this.auth = e, this.observer = null, this.addObserver =
|
|
1974
|
+
this.auth = e, this.observer = null, this.addObserver = _n((t) => this.observer = t);
|
|
1975
1975
|
}
|
|
1976
1976
|
get next() {
|
|
1977
1977
|
return u(
|
|
@@ -2006,16 +2006,16 @@ let Le = {
|
|
|
2006
2006
|
recaptchaEnterpriseScript: "",
|
|
2007
2007
|
gapiScript: ""
|
|
2008
2008
|
};
|
|
2009
|
-
function
|
|
2009
|
+
function ei(n) {
|
|
2010
2010
|
Le = n;
|
|
2011
2011
|
}
|
|
2012
|
-
function
|
|
2012
|
+
function ti(n) {
|
|
2013
2013
|
return Le.loadJS(n);
|
|
2014
2014
|
}
|
|
2015
|
-
function
|
|
2015
|
+
function ni() {
|
|
2016
2016
|
return Le.gapiScript;
|
|
2017
2017
|
}
|
|
2018
|
-
function
|
|
2018
|
+
function ii(n) {
|
|
2019
2019
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
2020
2020
|
}
|
|
2021
2021
|
/**
|
|
@@ -2034,11 +2034,11 @@ function ni(n) {
|
|
|
2034
2034
|
* See the License for the specific language governing permissions and
|
|
2035
2035
|
* limitations under the License.
|
|
2036
2036
|
*/
|
|
2037
|
-
function
|
|
2038
|
-
const t =
|
|
2037
|
+
function ri(n, e) {
|
|
2038
|
+
const t = gt(n, "auth");
|
|
2039
2039
|
if (t.isInitialized()) {
|
|
2040
2040
|
const r = t.getImmediate(), s = t.getOptions();
|
|
2041
|
-
if (
|
|
2041
|
+
if (Tn(s, e ?? {}))
|
|
2042
2042
|
return r;
|
|
2043
2043
|
S(
|
|
2044
2044
|
r,
|
|
@@ -2048,11 +2048,11 @@ function ii(n, e) {
|
|
|
2048
2048
|
}
|
|
2049
2049
|
return t.initialize({ options: e });
|
|
2050
2050
|
}
|
|
2051
|
-
function
|
|
2051
|
+
function si(n, e) {
|
|
2052
2052
|
const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(k);
|
|
2053
2053
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
|
|
2054
2054
|
}
|
|
2055
|
-
function
|
|
2055
|
+
function oi(n, e, t) {
|
|
2056
2056
|
const i = pe(n);
|
|
2057
2057
|
u(
|
|
2058
2058
|
i._canInitEmulator,
|
|
@@ -2065,38 +2065,38 @@ function si(n, e, t) {
|
|
|
2065
2065
|
"invalid-emulator-scheme"
|
|
2066
2066
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
2067
2067
|
);
|
|
2068
|
-
const r = !1, s =
|
|
2068
|
+
const r = !1, s = Ut(e), { host: o, port: c } = ai(e), a = c === null ? "" : `:${c}`;
|
|
2069
2069
|
i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
|
|
2070
2070
|
host: o,
|
|
2071
2071
|
port: c,
|
|
2072
2072
|
protocol: s.replace(":", ""),
|
|
2073
2073
|
options: Object.freeze({ disableWarnings: r })
|
|
2074
|
-
}),
|
|
2074
|
+
}), ci();
|
|
2075
2075
|
}
|
|
2076
|
-
function
|
|
2076
|
+
function Ut(n) {
|
|
2077
2077
|
const e = n.indexOf(":");
|
|
2078
2078
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
2079
2079
|
}
|
|
2080
|
-
function
|
|
2081
|
-
const e =
|
|
2080
|
+
function ai(n) {
|
|
2081
|
+
const e = Ut(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
2082
2082
|
if (!t)
|
|
2083
2083
|
return { host: "", port: null };
|
|
2084
2084
|
const i = t[2].split("@").pop() || "", r = /^(\[[^\]]+\])(:|$)/.exec(i);
|
|
2085
2085
|
if (r) {
|
|
2086
2086
|
const s = r[1];
|
|
2087
|
-
return { host: s, port:
|
|
2087
|
+
return { host: s, port: Ze(i.substr(s.length + 1)) };
|
|
2088
2088
|
} else {
|
|
2089
2089
|
const [s, o] = i.split(":");
|
|
2090
|
-
return { host: s, port:
|
|
2090
|
+
return { host: s, port: Ze(o) };
|
|
2091
2091
|
}
|
|
2092
2092
|
}
|
|
2093
|
-
function
|
|
2093
|
+
function Ze(n) {
|
|
2094
2094
|
if (!n)
|
|
2095
2095
|
return null;
|
|
2096
2096
|
const e = Number(n);
|
|
2097
2097
|
return isNaN(e) ? null : e;
|
|
2098
2098
|
}
|
|
2099
|
-
function
|
|
2099
|
+
function ci() {
|
|
2100
2100
|
function n() {
|
|
2101
2101
|
const e = document.createElement("p"), t = e.style;
|
|
2102
2102
|
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);
|
|
@@ -2119,7 +2119,7 @@ function ai() {
|
|
|
2119
2119
|
* See the License for the specific language governing permissions and
|
|
2120
2120
|
* limitations under the License.
|
|
2121
2121
|
*/
|
|
2122
|
-
class
|
|
2122
|
+
class Dt {
|
|
2123
2123
|
/** @internal */
|
|
2124
2124
|
constructor(e, t) {
|
|
2125
2125
|
this.providerId = e, this.signInMethod = t;
|
|
@@ -2162,7 +2162,7 @@ class Ut {
|
|
|
2162
2162
|
* limitations under the License.
|
|
2163
2163
|
*/
|
|
2164
2164
|
async function W(n, e) {
|
|
2165
|
-
return
|
|
2165
|
+
return yt(n, "POST", "/v1/accounts:signInWithIdp", he(n, e));
|
|
2166
2166
|
}
|
|
2167
2167
|
/**
|
|
2168
2168
|
* @license
|
|
@@ -2180,8 +2180,8 @@ async function W(n, e) {
|
|
|
2180
2180
|
* See the License for the specific language governing permissions and
|
|
2181
2181
|
* limitations under the License.
|
|
2182
2182
|
*/
|
|
2183
|
-
const
|
|
2184
|
-
class U extends
|
|
2183
|
+
const li = "http://localhost";
|
|
2184
|
+
class U extends Dt {
|
|
2185
2185
|
constructor() {
|
|
2186
2186
|
super(...arguments), this.pendingToken = null;
|
|
2187
2187
|
}
|
|
@@ -2238,7 +2238,7 @@ class U extends Ut {
|
|
|
2238
2238
|
}
|
|
2239
2239
|
buildRequest() {
|
|
2240
2240
|
const e = {
|
|
2241
|
-
requestUri:
|
|
2241
|
+
requestUri: li,
|
|
2242
2242
|
returnSecureToken: !0
|
|
2243
2243
|
};
|
|
2244
2244
|
if (this.pendingToken)
|
|
@@ -2266,7 +2266,7 @@ class U extends Ut {
|
|
|
2266
2266
|
* See the License for the specific language governing permissions and
|
|
2267
2267
|
* limitations under the License.
|
|
2268
2268
|
*/
|
|
2269
|
-
class
|
|
2269
|
+
class Ft {
|
|
2270
2270
|
/**
|
|
2271
2271
|
* Constructor for generic OAuth providers.
|
|
2272
2272
|
*
|
|
@@ -2319,7 +2319,7 @@ class Dt {
|
|
|
2319
2319
|
* See the License for the specific language governing permissions and
|
|
2320
2320
|
* limitations under the License.
|
|
2321
2321
|
*/
|
|
2322
|
-
class Y extends
|
|
2322
|
+
class Y extends Ft {
|
|
2323
2323
|
constructor() {
|
|
2324
2324
|
super(...arguments), this.scopes = [];
|
|
2325
2325
|
}
|
|
@@ -2639,7 +2639,7 @@ class D {
|
|
|
2639
2639
|
this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
|
|
2640
2640
|
}
|
|
2641
2641
|
static async _fromIdTokenResponse(e, t, i, r = !1) {
|
|
2642
|
-
const s = await E._fromIdTokenResponse(e, i, r), o =
|
|
2642
|
+
const s = await E._fromIdTokenResponse(e, i, r), o = et(i);
|
|
2643
2643
|
return new D({
|
|
2644
2644
|
user: s,
|
|
2645
2645
|
providerId: o,
|
|
@@ -2653,7 +2653,7 @@ class D {
|
|
|
2653
2653
|
/* reload */
|
|
2654
2654
|
!0
|
|
2655
2655
|
);
|
|
2656
|
-
const r =
|
|
2656
|
+
const r = et(i);
|
|
2657
2657
|
return new D({
|
|
2658
2658
|
user: e,
|
|
2659
2659
|
providerId: r,
|
|
@@ -2662,7 +2662,7 @@ class D {
|
|
|
2662
2662
|
});
|
|
2663
2663
|
}
|
|
2664
2664
|
}
|
|
2665
|
-
function
|
|
2665
|
+
function et(n) {
|
|
2666
2666
|
return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
|
|
2667
2667
|
}
|
|
2668
2668
|
/**
|
|
@@ -2695,12 +2695,12 @@ class le extends Re {
|
|
|
2695
2695
|
return new le(e, t, i, r);
|
|
2696
2696
|
}
|
|
2697
2697
|
}
|
|
2698
|
-
function
|
|
2698
|
+
function xt(n, e, t, i) {
|
|
2699
2699
|
return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
|
|
2700
2700
|
throw s.code === "auth/multi-factor-auth-required" ? le._fromErrorAndOperation(n, s, e, i) : s;
|
|
2701
2701
|
});
|
|
2702
2702
|
}
|
|
2703
|
-
async function
|
|
2703
|
+
async function ui(n, e, t = !1) {
|
|
2704
2704
|
const i = await q(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
2705
2705
|
return D._forOperation(n, "link", i);
|
|
2706
2706
|
}
|
|
@@ -2720,13 +2720,13 @@ async function li(n, e, t = !1) {
|
|
|
2720
2720
|
* See the License for the specific language governing permissions and
|
|
2721
2721
|
* limitations under the License.
|
|
2722
2722
|
*/
|
|
2723
|
-
async function
|
|
2723
|
+
async function di(n, e, t = !1) {
|
|
2724
2724
|
const { auth: i } = n;
|
|
2725
2725
|
if (w(i.app))
|
|
2726
2726
|
return Promise.reject(L(i));
|
|
2727
2727
|
const r = "reauthenticate";
|
|
2728
2728
|
try {
|
|
2729
|
-
const s = await q(n,
|
|
2729
|
+
const s = await q(n, xt(i, r, e, n), t);
|
|
2730
2730
|
u(
|
|
2731
2731
|
s.idToken,
|
|
2732
2732
|
i,
|
|
@@ -2771,10 +2771,10 @@ async function ui(n, e, t = !1) {
|
|
|
2771
2771
|
* See the License for the specific language governing permissions and
|
|
2772
2772
|
* limitations under the License.
|
|
2773
2773
|
*/
|
|
2774
|
-
async function
|
|
2774
|
+
async function hi(n, e, t = !1) {
|
|
2775
2775
|
if (w(n.app))
|
|
2776
2776
|
return Promise.reject(L(n));
|
|
2777
|
-
const i = "signIn", r = await
|
|
2777
|
+
const i = "signIn", r = await xt(n, i, e), s = await D._fromIdTokenResponse(n, i, r);
|
|
2778
2778
|
return t || await n._updateCurrentUser(s.user), s;
|
|
2779
2779
|
}
|
|
2780
2780
|
/**
|
|
@@ -2793,8 +2793,8 @@ async function di(n, e, t = !1) {
|
|
|
2793
2793
|
* See the License for the specific language governing permissions and
|
|
2794
2794
|
* limitations under the License.
|
|
2795
2795
|
*/
|
|
2796
|
-
async function
|
|
2797
|
-
return
|
|
2796
|
+
async function fi(n, e) {
|
|
2797
|
+
return yt(n, "POST", "/v1/accounts:signInWithCustomToken", he(n, e));
|
|
2798
2798
|
}
|
|
2799
2799
|
/**
|
|
2800
2800
|
* @license
|
|
@@ -2812,16 +2812,16 @@ async function hi(n, e) {
|
|
|
2812
2812
|
* See the License for the specific language governing permissions and
|
|
2813
2813
|
* limitations under the License.
|
|
2814
2814
|
*/
|
|
2815
|
-
async function
|
|
2815
|
+
async function pi(n, e) {
|
|
2816
2816
|
if (w(n.app))
|
|
2817
2817
|
return Promise.reject(L(n));
|
|
2818
|
-
const t = pe(n), i = await
|
|
2818
|
+
const t = pe(n), i = await fi(t, {
|
|
2819
2819
|
token: e,
|
|
2820
2820
|
returnSecureToken: !0
|
|
2821
2821
|
}), r = await D._fromIdTokenResponse(t, "signIn", i);
|
|
2822
2822
|
return await t._updateCurrentUser(r.user), r;
|
|
2823
2823
|
}
|
|
2824
|
-
function
|
|
2824
|
+
function gi(n, e, t, i) {
|
|
2825
2825
|
return j(n).onIdTokenChanged(e, t, i);
|
|
2826
2826
|
}
|
|
2827
2827
|
function mi(n, e, t) {
|
|
@@ -2844,7 +2844,7 @@ const ue = "__sak";
|
|
|
2844
2844
|
* See the License for the specific language governing permissions and
|
|
2845
2845
|
* limitations under the License.
|
|
2846
2846
|
*/
|
|
2847
|
-
class
|
|
2847
|
+
class Vt {
|
|
2848
2848
|
constructor(e, t) {
|
|
2849
2849
|
this.storageRetriever = e, this.type = t;
|
|
2850
2850
|
}
|
|
@@ -2885,18 +2885,18 @@ class xt {
|
|
|
2885
2885
|
* See the License for the specific language governing permissions and
|
|
2886
2886
|
* limitations under the License.
|
|
2887
2887
|
*/
|
|
2888
|
-
function
|
|
2889
|
-
const n =
|
|
2888
|
+
function _i() {
|
|
2889
|
+
const n = m();
|
|
2890
2890
|
return Ne(n) || fe(n);
|
|
2891
2891
|
}
|
|
2892
|
-
const
|
|
2893
|
-
class
|
|
2892
|
+
const vi = 1e3, Ii = 10;
|
|
2893
|
+
class Ht extends Vt {
|
|
2894
2894
|
constructor() {
|
|
2895
2895
|
super(
|
|
2896
2896
|
() => window.localStorage,
|
|
2897
2897
|
"LOCAL"
|
|
2898
2898
|
/* PersistenceType.LOCAL */
|
|
2899
|
-
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced =
|
|
2899
|
+
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = _i() && Kn(), this.fallbackToPolling = Lt(), this._shouldAllowMigration = !0;
|
|
2900
2900
|
}
|
|
2901
2901
|
forAllChangedKeys(e) {
|
|
2902
2902
|
for (const t of Object.keys(this.listeners)) {
|
|
@@ -2923,7 +2923,7 @@ class Vt extends xt {
|
|
|
2923
2923
|
const o = this.storage.getItem(i);
|
|
2924
2924
|
!t && this.localCache[i] === o || this.notifyListeners(i, o);
|
|
2925
2925
|
}, s = this.storage.getItem(i);
|
|
2926
|
-
|
|
2926
|
+
zn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Ii) : r();
|
|
2927
2927
|
}
|
|
2928
2928
|
notifyListeners(e, t) {
|
|
2929
2929
|
this.localCache[e] = t;
|
|
@@ -2945,7 +2945,7 @@ class Vt extends xt {
|
|
|
2945
2945
|
!0
|
|
2946
2946
|
);
|
|
2947
2947
|
});
|
|
2948
|
-
},
|
|
2948
|
+
}, vi);
|
|
2949
2949
|
}
|
|
2950
2950
|
stopPolling() {
|
|
2951
2951
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -2974,8 +2974,8 @@ class Vt extends xt {
|
|
|
2974
2974
|
await super._remove(e), delete this.localCache[e];
|
|
2975
2975
|
}
|
|
2976
2976
|
}
|
|
2977
|
-
|
|
2978
|
-
const
|
|
2977
|
+
Ht.type = "LOCAL";
|
|
2978
|
+
const Ti = Ht;
|
|
2979
2979
|
/**
|
|
2980
2980
|
* @license
|
|
2981
2981
|
* Copyright 2020 Google LLC
|
|
@@ -2992,7 +2992,7 @@ const Ii = Vt;
|
|
|
2992
2992
|
* See the License for the specific language governing permissions and
|
|
2993
2993
|
* limitations under the License.
|
|
2994
2994
|
*/
|
|
2995
|
-
class
|
|
2995
|
+
class $t extends Vt {
|
|
2996
2996
|
constructor() {
|
|
2997
2997
|
super(
|
|
2998
2998
|
() => window.sessionStorage,
|
|
@@ -3005,8 +3005,8 @@ class Ht extends xt {
|
|
|
3005
3005
|
_removeListener(e, t) {
|
|
3006
3006
|
}
|
|
3007
3007
|
}
|
|
3008
|
-
|
|
3009
|
-
const
|
|
3008
|
+
$t.type = "SESSION";
|
|
3009
|
+
const Wt = $t;
|
|
3010
3010
|
/**
|
|
3011
3011
|
* @license
|
|
3012
3012
|
* Copyright 2019 Google LLC
|
|
@@ -3023,7 +3023,7 @@ const $t = Ht;
|
|
|
3023
3023
|
* See the License for the specific language governing permissions and
|
|
3024
3024
|
* limitations under the License.
|
|
3025
3025
|
*/
|
|
3026
|
-
function
|
|
3026
|
+
function wi(n) {
|
|
3027
3027
|
return Promise.all(n.map(async (e) => {
|
|
3028
3028
|
try {
|
|
3029
3029
|
return {
|
|
@@ -3054,7 +3054,7 @@ function Ti(n) {
|
|
|
3054
3054
|
* See the License for the specific language governing permissions and
|
|
3055
3055
|
* limitations under the License.
|
|
3056
3056
|
*/
|
|
3057
|
-
class
|
|
3057
|
+
class ge {
|
|
3058
3058
|
constructor(e) {
|
|
3059
3059
|
this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
|
|
3060
3060
|
}
|
|
@@ -3068,7 +3068,7 @@ class me {
|
|
|
3068
3068
|
const t = this.receivers.find((r) => r.isListeningto(e));
|
|
3069
3069
|
if (t)
|
|
3070
3070
|
return t;
|
|
3071
|
-
const i = new
|
|
3071
|
+
const i = new ge(e);
|
|
3072
3072
|
return this.receivers.push(i), i;
|
|
3073
3073
|
}
|
|
3074
3074
|
isListeningto(e) {
|
|
@@ -3093,7 +3093,7 @@ class me {
|
|
|
3093
3093
|
eventId: i,
|
|
3094
3094
|
eventType: r
|
|
3095
3095
|
});
|
|
3096
|
-
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await
|
|
3096
|
+
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await wi(c);
|
|
3097
3097
|
t.ports[0].postMessage({
|
|
3098
3098
|
status: "done",
|
|
3099
3099
|
eventId: i,
|
|
@@ -3122,7 +3122,7 @@ class me {
|
|
|
3122
3122
|
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);
|
|
3123
3123
|
}
|
|
3124
3124
|
}
|
|
3125
|
-
|
|
3125
|
+
ge.receivers = [];
|
|
3126
3126
|
/**
|
|
3127
3127
|
* @license
|
|
3128
3128
|
* Copyright 2020 Google LLC
|
|
@@ -3161,7 +3161,7 @@ function Me(n = "", e = 10) {
|
|
|
3161
3161
|
* See the License for the specific language governing permissions and
|
|
3162
3162
|
* limitations under the License.
|
|
3163
3163
|
*/
|
|
3164
|
-
class
|
|
3164
|
+
class yi {
|
|
3165
3165
|
constructor(e) {
|
|
3166
3166
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
|
3167
3167
|
}
|
|
@@ -3261,7 +3261,7 @@ class wi {
|
|
|
3261
3261
|
function T() {
|
|
3262
3262
|
return window;
|
|
3263
3263
|
}
|
|
3264
|
-
function
|
|
3264
|
+
function Ei(n) {
|
|
3265
3265
|
T().location.href = n;
|
|
3266
3266
|
}
|
|
3267
3267
|
/**
|
|
@@ -3280,10 +3280,10 @@ function yi(n) {
|
|
|
3280
3280
|
* See the License for the specific language governing permissions and
|
|
3281
3281
|
* limitations under the License.
|
|
3282
3282
|
*/
|
|
3283
|
-
function
|
|
3283
|
+
function jt() {
|
|
3284
3284
|
return typeof T().WorkerGlobalScope < "u" && typeof T().importScripts == "function";
|
|
3285
3285
|
}
|
|
3286
|
-
async function
|
|
3286
|
+
async function ki() {
|
|
3287
3287
|
if (!(navigator != null && navigator.serviceWorker))
|
|
3288
3288
|
return null;
|
|
3289
3289
|
try {
|
|
@@ -3292,12 +3292,12 @@ async function Ei() {
|
|
|
3292
3292
|
return null;
|
|
3293
3293
|
}
|
|
3294
3294
|
}
|
|
3295
|
-
function
|
|
3295
|
+
function Si() {
|
|
3296
3296
|
var n;
|
|
3297
3297
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
3298
3298
|
}
|
|
3299
|
-
function
|
|
3300
|
-
return
|
|
3299
|
+
function bi() {
|
|
3300
|
+
return jt() ? self : null;
|
|
3301
3301
|
}
|
|
3302
3302
|
/**
|
|
3303
3303
|
* @license
|
|
@@ -3315,7 +3315,7 @@ function Si() {
|
|
|
3315
3315
|
* See the License for the specific language governing permissions and
|
|
3316
3316
|
* limitations under the License.
|
|
3317
3317
|
*/
|
|
3318
|
-
const
|
|
3318
|
+
const Gt = "firebaseLocalStorageDb", Ri = 1, de = "firebaseLocalStorage", Bt = "fbase_key";
|
|
3319
3319
|
class X {
|
|
3320
3320
|
constructor(e) {
|
|
3321
3321
|
this.request = e;
|
|
@@ -3330,48 +3330,48 @@ class X {
|
|
|
3330
3330
|
});
|
|
3331
3331
|
}
|
|
3332
3332
|
}
|
|
3333
|
-
function
|
|
3333
|
+
function me(n, e) {
|
|
3334
3334
|
return n.transaction([de], e ? "readwrite" : "readonly").objectStore(de);
|
|
3335
3335
|
}
|
|
3336
|
-
function
|
|
3337
|
-
const n = indexedDB.deleteDatabase(
|
|
3336
|
+
function Pi() {
|
|
3337
|
+
const n = indexedDB.deleteDatabase(Gt);
|
|
3338
3338
|
return new X(n).toPromise();
|
|
3339
3339
|
}
|
|
3340
3340
|
function Se() {
|
|
3341
|
-
const n = indexedDB.open(
|
|
3341
|
+
const n = indexedDB.open(Gt, Ri);
|
|
3342
3342
|
return new Promise((e, t) => {
|
|
3343
3343
|
n.addEventListener("error", () => {
|
|
3344
3344
|
t(n.error);
|
|
3345
3345
|
}), n.addEventListener("upgradeneeded", () => {
|
|
3346
3346
|
const i = n.result;
|
|
3347
3347
|
try {
|
|
3348
|
-
i.createObjectStore(de, { keyPath:
|
|
3348
|
+
i.createObjectStore(de, { keyPath: Bt });
|
|
3349
3349
|
} catch (r) {
|
|
3350
3350
|
t(r);
|
|
3351
3351
|
}
|
|
3352
3352
|
}), n.addEventListener("success", async () => {
|
|
3353
3353
|
const i = n.result;
|
|
3354
|
-
i.objectStoreNames.contains(de) ? e(i) : (i.close(), await
|
|
3354
|
+
i.objectStoreNames.contains(de) ? e(i) : (i.close(), await Pi(), e(await Se()));
|
|
3355
3355
|
});
|
|
3356
3356
|
});
|
|
3357
3357
|
}
|
|
3358
|
-
async function
|
|
3359
|
-
const i =
|
|
3360
|
-
[
|
|
3358
|
+
async function tt(n, e, t) {
|
|
3359
|
+
const i = me(n, !0).put({
|
|
3360
|
+
[Bt]: e,
|
|
3361
3361
|
value: t
|
|
3362
3362
|
});
|
|
3363
3363
|
return new X(i).toPromise();
|
|
3364
3364
|
}
|
|
3365
|
-
async function
|
|
3366
|
-
const t =
|
|
3365
|
+
async function Ai(n, e) {
|
|
3366
|
+
const t = me(n, !1).get(e), i = await new X(t).toPromise();
|
|
3367
3367
|
return i === void 0 ? null : i.value;
|
|
3368
3368
|
}
|
|
3369
|
-
function
|
|
3370
|
-
const t =
|
|
3369
|
+
function nt(n, e) {
|
|
3370
|
+
const t = me(n, !0).delete(e);
|
|
3371
3371
|
return new X(t).toPromise();
|
|
3372
3372
|
}
|
|
3373
|
-
const
|
|
3374
|
-
class
|
|
3373
|
+
const Ci = 800, Oi = 3;
|
|
3374
|
+
class qt {
|
|
3375
3375
|
constructor() {
|
|
3376
3376
|
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(() => {
|
|
3377
3377
|
}, () => {
|
|
@@ -3387,7 +3387,7 @@ class Bt {
|
|
|
3387
3387
|
const i = await this._openDb();
|
|
3388
3388
|
return await e(i);
|
|
3389
3389
|
} catch (i) {
|
|
3390
|
-
if (t++ >
|
|
3390
|
+
if (t++ > Oi)
|
|
3391
3391
|
throw i;
|
|
3392
3392
|
this.db && (this.db.close(), this.db = void 0);
|
|
3393
3393
|
}
|
|
@@ -3397,13 +3397,13 @@ class Bt {
|
|
|
3397
3397
|
* postMessage interface to send these events to the worker ourselves.
|
|
3398
3398
|
*/
|
|
3399
3399
|
async initializeServiceWorkerMessaging() {
|
|
3400
|
-
return
|
|
3400
|
+
return jt() ? this.initializeReceiver() : this.initializeSender();
|
|
3401
3401
|
}
|
|
3402
3402
|
/**
|
|
3403
3403
|
* As the worker we should listen to events from the main window.
|
|
3404
3404
|
*/
|
|
3405
3405
|
async initializeReceiver() {
|
|
3406
|
-
this.receiver =
|
|
3406
|
+
this.receiver = ge._getInstance(bi()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
3407
3407
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
3408
3408
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
3409
3409
|
"keyChanged"
|
|
@@ -3419,9 +3419,9 @@ class Bt {
|
|
|
3419
3419
|
*/
|
|
3420
3420
|
async initializeSender() {
|
|
3421
3421
|
var e, t;
|
|
3422
|
-
if (this.activeServiceWorker = await
|
|
3422
|
+
if (this.activeServiceWorker = await ki(), !this.activeServiceWorker)
|
|
3423
3423
|
return;
|
|
3424
|
-
this.sender = new
|
|
3424
|
+
this.sender = new yi(this.activeServiceWorker);
|
|
3425
3425
|
const i = await this.sender._send(
|
|
3426
3426
|
"ping",
|
|
3427
3427
|
{},
|
|
@@ -3443,7 +3443,7 @@ class Bt {
|
|
|
3443
3443
|
* @param key - Storage key which changed.
|
|
3444
3444
|
*/
|
|
3445
3445
|
async notifyServiceWorker(e) {
|
|
3446
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
3446
|
+
if (!(!this.sender || !this.activeServiceWorker || Si() !== this.activeServiceWorker))
|
|
3447
3447
|
try {
|
|
3448
3448
|
await this.sender._send(
|
|
3449
3449
|
"keyChanged",
|
|
@@ -3460,7 +3460,7 @@ class Bt {
|
|
|
3460
3460
|
if (!indexedDB)
|
|
3461
3461
|
return !1;
|
|
3462
3462
|
const e = await Se();
|
|
3463
|
-
return await
|
|
3463
|
+
return await tt(e, ue, "1"), await nt(e, ue), !0;
|
|
3464
3464
|
} catch {
|
|
3465
3465
|
}
|
|
3466
3466
|
return !1;
|
|
@@ -3474,18 +3474,18 @@ class Bt {
|
|
|
3474
3474
|
}
|
|
3475
3475
|
}
|
|
3476
3476
|
async _set(e, t) {
|
|
3477
|
-
return this._withPendingWrite(async () => (await this._withRetries((i) =>
|
|
3477
|
+
return this._withPendingWrite(async () => (await this._withRetries((i) => tt(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
3478
3478
|
}
|
|
3479
3479
|
async _get(e) {
|
|
3480
|
-
const t = await this._withRetries((i) =>
|
|
3480
|
+
const t = await this._withRetries((i) => Ai(i, e));
|
|
3481
3481
|
return this.localCache[e] = t, t;
|
|
3482
3482
|
}
|
|
3483
3483
|
async _remove(e) {
|
|
3484
|
-
return this._withPendingWrite(async () => (await this._withRetries((t) =>
|
|
3484
|
+
return this._withPendingWrite(async () => (await this._withRetries((t) => nt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
|
|
3485
3485
|
}
|
|
3486
3486
|
async _poll() {
|
|
3487
3487
|
const e = await this._withRetries((r) => {
|
|
3488
|
-
const s =
|
|
3488
|
+
const s = me(r, !1).getAll();
|
|
3489
3489
|
return new X(s).toPromise();
|
|
3490
3490
|
});
|
|
3491
3491
|
if (!e)
|
|
@@ -3508,7 +3508,7 @@ class Bt {
|
|
|
3508
3508
|
r(t);
|
|
3509
3509
|
}
|
|
3510
3510
|
startPolling() {
|
|
3511
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
3511
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ci);
|
|
3512
3512
|
}
|
|
3513
3513
|
stopPolling() {
|
|
3514
3514
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -3520,8 +3520,8 @@ class Bt {
|
|
|
3520
3520
|
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();
|
|
3521
3521
|
}
|
|
3522
3522
|
}
|
|
3523
|
-
|
|
3524
|
-
const
|
|
3523
|
+
qt.type = "LOCAL";
|
|
3524
|
+
const Ni = qt;
|
|
3525
3525
|
new J(3e4, 6e4);
|
|
3526
3526
|
/**
|
|
3527
3527
|
* @license
|
|
@@ -3539,7 +3539,7 @@ new J(3e4, 6e4);
|
|
|
3539
3539
|
* See the License for the specific language governing permissions and
|
|
3540
3540
|
* limitations under the License.
|
|
3541
3541
|
*/
|
|
3542
|
-
function
|
|
3542
|
+
function Li(n, e) {
|
|
3543
3543
|
return e ? k(e) : (u(
|
|
3544
3544
|
n._popupRedirectResolver,
|
|
3545
3545
|
n,
|
|
@@ -3563,7 +3563,7 @@ function Ni(n, e) {
|
|
|
3563
3563
|
* See the License for the specific language governing permissions and
|
|
3564
3564
|
* limitations under the License.
|
|
3565
3565
|
*/
|
|
3566
|
-
class Ue extends
|
|
3566
|
+
class Ue extends Dt {
|
|
3567
3567
|
constructor(e) {
|
|
3568
3568
|
super(
|
|
3569
3569
|
"custom",
|
|
@@ -3593,26 +3593,26 @@ class Ue extends Ut {
|
|
|
3593
3593
|
return e && (t.idToken = e), t;
|
|
3594
3594
|
}
|
|
3595
3595
|
}
|
|
3596
|
-
function Li(n) {
|
|
3597
|
-
return di(n.auth, new Ue(n), n.bypassAuthState);
|
|
3598
|
-
}
|
|
3599
3596
|
function Mi(n) {
|
|
3597
|
+
return hi(n.auth, new Ue(n), n.bypassAuthState);
|
|
3598
|
+
}
|
|
3599
|
+
function Ui(n) {
|
|
3600
3600
|
const { auth: e, user: t } = n;
|
|
3601
3601
|
return u(
|
|
3602
3602
|
t,
|
|
3603
3603
|
e,
|
|
3604
3604
|
"internal-error"
|
|
3605
3605
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3606
|
-
),
|
|
3606
|
+
), di(t, new Ue(n), n.bypassAuthState);
|
|
3607
3607
|
}
|
|
3608
|
-
async function
|
|
3608
|
+
async function Di(n) {
|
|
3609
3609
|
const { auth: e, user: t } = n;
|
|
3610
3610
|
return u(
|
|
3611
3611
|
t,
|
|
3612
3612
|
e,
|
|
3613
3613
|
"internal-error"
|
|
3614
3614
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3615
|
-
),
|
|
3615
|
+
), ui(t, new Ue(n), n.bypassAuthState);
|
|
3616
3616
|
}
|
|
3617
3617
|
/**
|
|
3618
3618
|
* @license
|
|
@@ -3630,7 +3630,7 @@ async function Ui(n) {
|
|
|
3630
3630
|
* See the License for the specific language governing permissions and
|
|
3631
3631
|
* limitations under the License.
|
|
3632
3632
|
*/
|
|
3633
|
-
class
|
|
3633
|
+
class zt {
|
|
3634
3634
|
constructor(e, t, i, r, s = !1) {
|
|
3635
3635
|
this.auth = e, this.resolver = i, this.user = r, this.bypassAuthState = s, this.pendingPromise = null, this.eventManager = null, this.filter = Array.isArray(t) ? t : [t];
|
|
3636
3636
|
}
|
|
@@ -3672,13 +3672,13 @@ class qt {
|
|
|
3672
3672
|
switch (e) {
|
|
3673
3673
|
case "signInViaPopup":
|
|
3674
3674
|
case "signInViaRedirect":
|
|
3675
|
-
return
|
|
3675
|
+
return Mi;
|
|
3676
3676
|
case "linkViaPopup":
|
|
3677
3677
|
case "linkViaRedirect":
|
|
3678
|
-
return
|
|
3678
|
+
return Di;
|
|
3679
3679
|
case "reauthViaPopup":
|
|
3680
3680
|
case "reauthViaRedirect":
|
|
3681
|
-
return
|
|
3681
|
+
return Ui;
|
|
3682
3682
|
default:
|
|
3683
3683
|
S(
|
|
3684
3684
|
this.auth,
|
|
@@ -3713,8 +3713,8 @@ class qt {
|
|
|
3713
3713
|
* See the License for the specific language governing permissions and
|
|
3714
3714
|
* limitations under the License.
|
|
3715
3715
|
*/
|
|
3716
|
-
const
|
|
3717
|
-
class V extends
|
|
3716
|
+
const Fi = new J(2e3, 1e4);
|
|
3717
|
+
class V extends zt {
|
|
3718
3718
|
constructor(e, t, i, r, s) {
|
|
3719
3719
|
super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
|
|
3720
3720
|
}
|
|
@@ -3777,7 +3777,7 @@ class V extends qt {
|
|
|
3777
3777
|
);
|
|
3778
3778
|
return;
|
|
3779
3779
|
}
|
|
3780
|
-
this.pollId = window.setTimeout(e,
|
|
3780
|
+
this.pollId = window.setTimeout(e, Fi.get());
|
|
3781
3781
|
};
|
|
3782
3782
|
e();
|
|
3783
3783
|
}
|
|
@@ -3799,8 +3799,8 @@ V.currentPopupAction = null;
|
|
|
3799
3799
|
* See the License for the specific language governing permissions and
|
|
3800
3800
|
* limitations under the License.
|
|
3801
3801
|
*/
|
|
3802
|
-
const
|
|
3803
|
-
class
|
|
3802
|
+
const xi = "pendingRedirect", se = /* @__PURE__ */ new Map();
|
|
3803
|
+
class Vi extends zt {
|
|
3804
3804
|
constructor(e, t, i = !1) {
|
|
3805
3805
|
super(e, [
|
|
3806
3806
|
"signInViaRedirect",
|
|
@@ -3818,7 +3818,7 @@ class xi extends qt {
|
|
|
3818
3818
|
let e = se.get(this.auth._key());
|
|
3819
3819
|
if (!e) {
|
|
3820
3820
|
try {
|
|
3821
|
-
const i = await
|
|
3821
|
+
const i = await Hi(this.resolver, this.auth) ? await super.execute() : null;
|
|
3822
3822
|
e = () => Promise.resolve(i);
|
|
3823
3823
|
} catch (t) {
|
|
3824
3824
|
e = () => Promise.reject(t);
|
|
@@ -3846,26 +3846,26 @@ class xi extends qt {
|
|
|
3846
3846
|
cleanUp() {
|
|
3847
3847
|
}
|
|
3848
3848
|
}
|
|
3849
|
-
async function
|
|
3850
|
-
const t =
|
|
3849
|
+
async function Hi(n, e) {
|
|
3850
|
+
const t = ji(e), i = Wi(n);
|
|
3851
3851
|
if (!await i._isAvailable())
|
|
3852
3852
|
return !1;
|
|
3853
3853
|
const r = await i._get(t) === "true";
|
|
3854
3854
|
return await i._remove(t), r;
|
|
3855
3855
|
}
|
|
3856
|
-
function
|
|
3856
|
+
function $i(n, e) {
|
|
3857
3857
|
se.set(n._key(), e);
|
|
3858
3858
|
}
|
|
3859
|
-
function
|
|
3859
|
+
function Wi(n) {
|
|
3860
3860
|
return k(n._redirectPersistence);
|
|
3861
3861
|
}
|
|
3862
|
-
function
|
|
3863
|
-
return re(
|
|
3862
|
+
function ji(n) {
|
|
3863
|
+
return re(xi, n.config.apiKey, n.name);
|
|
3864
3864
|
}
|
|
3865
|
-
async function
|
|
3865
|
+
async function Gi(n, e, t = !1) {
|
|
3866
3866
|
if (w(n.app))
|
|
3867
3867
|
return Promise.reject(L(n));
|
|
3868
|
-
const i = pe(n), r =
|
|
3868
|
+
const i = pe(n), r = Li(i, e), o = await new Vi(i, r, t).execute();
|
|
3869
3869
|
return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
|
|
3870
3870
|
}
|
|
3871
3871
|
/**
|
|
@@ -3884,8 +3884,8 @@ async function ji(n, e, t = !1) {
|
|
|
3884
3884
|
* See the License for the specific language governing permissions and
|
|
3885
3885
|
* limitations under the License.
|
|
3886
3886
|
*/
|
|
3887
|
-
const
|
|
3888
|
-
class
|
|
3887
|
+
const Bi = 10 * 60 * 1e3;
|
|
3888
|
+
class qi {
|
|
3889
3889
|
constructor(e) {
|
|
3890
3890
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
3891
3891
|
}
|
|
@@ -3901,11 +3901,11 @@ class Bi {
|
|
|
3901
3901
|
let t = !1;
|
|
3902
3902
|
return this.consumers.forEach((i) => {
|
|
3903
3903
|
this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
|
|
3904
|
-
}), this.hasHandledPotentialRedirect || !
|
|
3904
|
+
}), this.hasHandledPotentialRedirect || !zi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
3905
3905
|
}
|
|
3906
3906
|
sendToConsumer(e, t) {
|
|
3907
3907
|
var i;
|
|
3908
|
-
if (e.error && !
|
|
3908
|
+
if (e.error && !Kt(e)) {
|
|
3909
3909
|
const r = ((i = e.error.code) === null || i === void 0 ? void 0 : i.split("auth/")[1]) || "internal-error";
|
|
3910
3910
|
t.onError(I(this.auth, r));
|
|
3911
3911
|
} else
|
|
@@ -3916,26 +3916,26 @@ class Bi {
|
|
|
3916
3916
|
return t.filter.includes(e.type) && i;
|
|
3917
3917
|
}
|
|
3918
3918
|
hasEventBeenHandled(e) {
|
|
3919
|
-
return Date.now() - this.lastProcessedEventTime >=
|
|
3919
|
+
return Date.now() - this.lastProcessedEventTime >= Bi && this.cachedEventUids.clear(), this.cachedEventUids.has(it(e));
|
|
3920
3920
|
}
|
|
3921
3921
|
saveEventToCache(e) {
|
|
3922
|
-
this.cachedEventUids.add(
|
|
3922
|
+
this.cachedEventUids.add(it(e)), this.lastProcessedEventTime = Date.now();
|
|
3923
3923
|
}
|
|
3924
3924
|
}
|
|
3925
|
-
function
|
|
3925
|
+
function it(n) {
|
|
3926
3926
|
return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
|
|
3927
3927
|
}
|
|
3928
|
-
function
|
|
3928
|
+
function Kt({ type: n, error: e }) {
|
|
3929
3929
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
3930
3930
|
}
|
|
3931
|
-
function
|
|
3931
|
+
function zi(n) {
|
|
3932
3932
|
switch (n.type) {
|
|
3933
3933
|
case "signInViaRedirect":
|
|
3934
3934
|
case "linkViaRedirect":
|
|
3935
3935
|
case "reauthViaRedirect":
|
|
3936
3936
|
return !0;
|
|
3937
3937
|
case "unknown":
|
|
3938
|
-
return
|
|
3938
|
+
return Kt(n);
|
|
3939
3939
|
default:
|
|
3940
3940
|
return !1;
|
|
3941
3941
|
}
|
|
@@ -3956,7 +3956,7 @@ function qi(n) {
|
|
|
3956
3956
|
* See the License for the specific language governing permissions and
|
|
3957
3957
|
* limitations under the License.
|
|
3958
3958
|
*/
|
|
3959
|
-
async function
|
|
3959
|
+
async function Ki(n, e = {}) {
|
|
3960
3960
|
return G(n, "GET", "/v1/projects", e);
|
|
3961
3961
|
}
|
|
3962
3962
|
/**
|
|
@@ -3975,14 +3975,14 @@ async function zi(n, e = {}) {
|
|
|
3975
3975
|
* See the License for the specific language governing permissions and
|
|
3976
3976
|
* limitations under the License.
|
|
3977
3977
|
*/
|
|
3978
|
-
const
|
|
3979
|
-
async function
|
|
3978
|
+
const Ji = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Yi = /^https?/;
|
|
3979
|
+
async function Xi(n) {
|
|
3980
3980
|
if (n.config.emulator)
|
|
3981
3981
|
return;
|
|
3982
|
-
const { authorizedDomains: e } = await
|
|
3982
|
+
const { authorizedDomains: e } = await Ki(n);
|
|
3983
3983
|
for (const t of e)
|
|
3984
3984
|
try {
|
|
3985
|
-
if (
|
|
3985
|
+
if (Qi(t))
|
|
3986
3986
|
return;
|
|
3987
3987
|
} catch {
|
|
3988
3988
|
}
|
|
@@ -3992,15 +3992,15 @@ async function Yi(n) {
|
|
|
3992
3992
|
/* AuthErrorCode.INVALID_ORIGIN */
|
|
3993
3993
|
);
|
|
3994
3994
|
}
|
|
3995
|
-
function
|
|
3995
|
+
function Qi(n) {
|
|
3996
3996
|
const e = Ee(), { protocol: t, hostname: i } = new URL(e);
|
|
3997
3997
|
if (n.startsWith("chrome-extension://")) {
|
|
3998
3998
|
const o = new URL(n);
|
|
3999
3999
|
return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
|
|
4000
4000
|
}
|
|
4001
|
-
if (!
|
|
4001
|
+
if (!Yi.test(t))
|
|
4002
4002
|
return !1;
|
|
4003
|
-
if (
|
|
4003
|
+
if (Ji.test(n))
|
|
4004
4004
|
return i === n;
|
|
4005
4005
|
const r = n.replace(/\./g, "\\.");
|
|
4006
4006
|
return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
|
|
@@ -4021,8 +4021,8 @@ function Xi(n) {
|
|
|
4021
4021
|
* See the License for the specific language governing permissions and
|
|
4022
4022
|
* limitations under the License.
|
|
4023
4023
|
*/
|
|
4024
|
-
const
|
|
4025
|
-
function
|
|
4024
|
+
const Zi = new J(3e4, 6e4);
|
|
4025
|
+
function rt() {
|
|
4026
4026
|
const n = T().___jsl;
|
|
4027
4027
|
if (n != null && n.H) {
|
|
4028
4028
|
for (const e of Object.keys(n.H))
|
|
@@ -4031,22 +4031,22 @@ function it() {
|
|
|
4031
4031
|
n.CP[t] = null;
|
|
4032
4032
|
}
|
|
4033
4033
|
}
|
|
4034
|
-
function
|
|
4034
|
+
function er(n) {
|
|
4035
4035
|
return new Promise((e, t) => {
|
|
4036
4036
|
var i, r, s;
|
|
4037
4037
|
function o() {
|
|
4038
|
-
|
|
4038
|
+
rt(), gapi.load("gapi.iframes", {
|
|
4039
4039
|
callback: () => {
|
|
4040
4040
|
e(gapi.iframes.getContext());
|
|
4041
4041
|
},
|
|
4042
4042
|
ontimeout: () => {
|
|
4043
|
-
|
|
4043
|
+
rt(), t(I(
|
|
4044
4044
|
n,
|
|
4045
4045
|
"network-request-failed"
|
|
4046
4046
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4047
4047
|
));
|
|
4048
4048
|
},
|
|
4049
|
-
timeout:
|
|
4049
|
+
timeout: Zi.get()
|
|
4050
4050
|
});
|
|
4051
4051
|
}
|
|
4052
4052
|
if (!((r = (i = T().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
|
|
@@ -4054,22 +4054,22 @@ function Zi(n) {
|
|
|
4054
4054
|
else if (!((s = T().gapi) === null || s === void 0) && s.load)
|
|
4055
4055
|
o();
|
|
4056
4056
|
else {
|
|
4057
|
-
const c =
|
|
4057
|
+
const c = ii("iframefcb");
|
|
4058
4058
|
return T()[c] = () => {
|
|
4059
4059
|
gapi.load ? o() : t(I(
|
|
4060
4060
|
n,
|
|
4061
4061
|
"network-request-failed"
|
|
4062
4062
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4063
4063
|
));
|
|
4064
|
-
},
|
|
4064
|
+
}, ti(`${ni()}?onload=${c}`).catch((a) => t(a));
|
|
4065
4065
|
}
|
|
4066
4066
|
}).catch((e) => {
|
|
4067
4067
|
throw oe = null, e;
|
|
4068
4068
|
});
|
|
4069
4069
|
}
|
|
4070
4070
|
let oe = null;
|
|
4071
|
-
function
|
|
4072
|
-
return oe = oe ||
|
|
4071
|
+
function tr(n) {
|
|
4072
|
+
return oe = oe || er(n), oe;
|
|
4073
4073
|
}
|
|
4074
4074
|
/**
|
|
4075
4075
|
* @license
|
|
@@ -4087,7 +4087,7 @@ function er(n) {
|
|
|
4087
4087
|
* See the License for the specific language governing permissions and
|
|
4088
4088
|
* limitations under the License.
|
|
4089
4089
|
*/
|
|
4090
|
-
const
|
|
4090
|
+
const nr = new J(5e3, 15e3), ir = "__/auth/iframe", rr = "emulator/auth/iframe", sr = {
|
|
4091
4091
|
style: {
|
|
4092
4092
|
position: "absolute",
|
|
4093
4093
|
top: "-100px",
|
|
@@ -4096,13 +4096,13 @@ const tr = new J(5e3, 15e3), nr = "__/auth/iframe", ir = "emulator/auth/iframe",
|
|
|
4096
4096
|
},
|
|
4097
4097
|
"aria-hidden": "true",
|
|
4098
4098
|
tabindex: "-1"
|
|
4099
|
-
},
|
|
4099
|
+
}, or = /* @__PURE__ */ new Map([
|
|
4100
4100
|
["identitytoolkit.googleapis.com", "p"],
|
|
4101
4101
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
|
4102
4102
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
|
4103
4103
|
// test
|
|
4104
4104
|
]);
|
|
4105
|
-
function
|
|
4105
|
+
function ar(n) {
|
|
4106
4106
|
const e = n.config;
|
|
4107
4107
|
u(
|
|
4108
4108
|
e.authDomain,
|
|
@@ -4110,17 +4110,17 @@ function or(n) {
|
|
|
4110
4110
|
"auth-domain-config-required"
|
|
4111
4111
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
4112
4112
|
);
|
|
4113
|
-
const t = e.emulator ? Ce(e,
|
|
4113
|
+
const t = e.emulator ? Ce(e, rr) : `https://${n.config.authDomain}/${ir}`, i = {
|
|
4114
4114
|
apiKey: e.apiKey,
|
|
4115
4115
|
appName: n.name,
|
|
4116
4116
|
v: z
|
|
4117
|
-
}, r =
|
|
4117
|
+
}, r = or.get(n.config.apiHost);
|
|
4118
4118
|
r && (i.eid = r);
|
|
4119
4119
|
const s = n._getFrameworks();
|
|
4120
4120
|
return s.length && (i.fw = s.join(",")), `${t}?${K(i).slice(1)}`;
|
|
4121
4121
|
}
|
|
4122
|
-
async function
|
|
4123
|
-
const e = await
|
|
4122
|
+
async function cr(n) {
|
|
4123
|
+
const e = await tr(n), t = T().gapi;
|
|
4124
4124
|
return u(
|
|
4125
4125
|
t,
|
|
4126
4126
|
n,
|
|
@@ -4128,9 +4128,9 @@ async function ar(n) {
|
|
|
4128
4128
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4129
4129
|
), e.open({
|
|
4130
4130
|
where: document.body,
|
|
4131
|
-
url:
|
|
4131
|
+
url: ar(n),
|
|
4132
4132
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
|
4133
|
-
attributes:
|
|
4133
|
+
attributes: sr,
|
|
4134
4134
|
dontclear: !0
|
|
4135
4135
|
}, (i) => new Promise(async (r, s) => {
|
|
4136
4136
|
await i.restyle({
|
|
@@ -4143,7 +4143,7 @@ async function ar(n) {
|
|
|
4143
4143
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4144
4144
|
), c = T().setTimeout(() => {
|
|
4145
4145
|
s(o);
|
|
4146
|
-
},
|
|
4146
|
+
}, nr.get());
|
|
4147
4147
|
function a() {
|
|
4148
4148
|
T().clearTimeout(c), r(i);
|
|
4149
4149
|
}
|
|
@@ -4168,13 +4168,13 @@ async function ar(n) {
|
|
|
4168
4168
|
* See the License for the specific language governing permissions and
|
|
4169
4169
|
* limitations under the License.
|
|
4170
4170
|
*/
|
|
4171
|
-
const
|
|
4171
|
+
const lr = {
|
|
4172
4172
|
location: "yes",
|
|
4173
4173
|
resizable: "yes",
|
|
4174
4174
|
statusbar: "yes",
|
|
4175
4175
|
toolbar: "no"
|
|
4176
|
-
},
|
|
4177
|
-
class
|
|
4176
|
+
}, ur = 500, dr = 600, hr = "_blank", fr = "http://localhost";
|
|
4177
|
+
class st {
|
|
4178
4178
|
constructor(e) {
|
|
4179
4179
|
this.window = e, this.associatedEvent = null;
|
|
4180
4180
|
}
|
|
@@ -4186,19 +4186,19 @@ class rt {
|
|
|
4186
4186
|
}
|
|
4187
4187
|
}
|
|
4188
4188
|
}
|
|
4189
|
-
function
|
|
4189
|
+
function pr(n, e, t, i = ur, r = dr) {
|
|
4190
4190
|
const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
|
|
4191
4191
|
let c = "";
|
|
4192
|
-
const a = Object.assign(Object.assign({},
|
|
4192
|
+
const a = Object.assign(Object.assign({}, lr), {
|
|
4193
4193
|
width: i.toString(),
|
|
4194
4194
|
height: r.toString(),
|
|
4195
4195
|
top: s,
|
|
4196
4196
|
left: o
|
|
4197
|
-
}), l =
|
|
4198
|
-
t && (c =
|
|
4197
|
+
}), l = m().toLowerCase();
|
|
4198
|
+
t && (c = Pt(l) ? hr : t), Rt(l) && (e = e || fr, a.scrollbars = "yes");
|
|
4199
4199
|
const d = Object.entries(a).reduce((_, [F, M]) => `${_}${F}=${M},`, "");
|
|
4200
|
-
if (
|
|
4201
|
-
return
|
|
4200
|
+
if (qn(l) && c !== "_self")
|
|
4201
|
+
return gr(e || "", c), new st(null);
|
|
4202
4202
|
const h = window.open(e || "", c, d);
|
|
4203
4203
|
u(
|
|
4204
4204
|
h,
|
|
@@ -4210,9 +4210,9 @@ function fr(n, e, t, i = lr, r = ur) {
|
|
|
4210
4210
|
h.focus();
|
|
4211
4211
|
} catch {
|
|
4212
4212
|
}
|
|
4213
|
-
return new
|
|
4213
|
+
return new st(h);
|
|
4214
4214
|
}
|
|
4215
|
-
function
|
|
4215
|
+
function gr(n, e) {
|
|
4216
4216
|
const t = document.createElement("a");
|
|
4217
4217
|
t.href = n, t.target = e;
|
|
4218
4218
|
const i = document.createEvent("MouseEvent");
|
|
@@ -4234,8 +4234,8 @@ function pr(n, e) {
|
|
|
4234
4234
|
* See the License for the specific language governing permissions and
|
|
4235
4235
|
* limitations under the License.
|
|
4236
4236
|
*/
|
|
4237
|
-
const mr = "__/auth/handler",
|
|
4238
|
-
async function
|
|
4237
|
+
const mr = "__/auth/handler", _r = "emulator/auth/handler", vr = encodeURIComponent("fac");
|
|
4238
|
+
async function ot(n, e, t, i, r, s) {
|
|
4239
4239
|
u(
|
|
4240
4240
|
n.config.authDomain,
|
|
4241
4241
|
n,
|
|
@@ -4255,8 +4255,8 @@ async function st(n, e, t, i, r, s) {
|
|
|
4255
4255
|
v: z,
|
|
4256
4256
|
eventId: r
|
|
4257
4257
|
};
|
|
4258
|
-
if (e instanceof
|
|
4259
|
-
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "",
|
|
4258
|
+
if (e instanceof Ft) {
|
|
4259
|
+
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", En(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
4260
4260
|
for (const [d, h] of Object.entries({}))
|
|
4261
4261
|
o[d] = h;
|
|
4262
4262
|
}
|
|
@@ -4268,11 +4268,11 @@ async function st(n, e, t, i, r, s) {
|
|
|
4268
4268
|
const c = o;
|
|
4269
4269
|
for (const d of Object.keys(c))
|
|
4270
4270
|
c[d] === void 0 && delete c[d];
|
|
4271
|
-
const a = await n._getAppCheckToken(), l = a ? `#${
|
|
4272
|
-
return `${
|
|
4271
|
+
const a = await n._getAppCheckToken(), l = a ? `#${vr}=${encodeURIComponent(a)}` : "";
|
|
4272
|
+
return `${Ir(n)}?${K(c).slice(1)}${l}`;
|
|
4273
4273
|
}
|
|
4274
|
-
function
|
|
4275
|
-
return n.emulator ? Ce(n,
|
|
4274
|
+
function Ir({ config: n }) {
|
|
4275
|
+
return n.emulator ? Ce(n, _r) : `https://${n.authDomain}/${mr}`;
|
|
4276
4276
|
}
|
|
4277
4277
|
/**
|
|
4278
4278
|
* @license
|
|
@@ -4291,22 +4291,22 @@ function vr({ config: n }) {
|
|
|
4291
4291
|
* limitations under the License.
|
|
4292
4292
|
*/
|
|
4293
4293
|
const we = "webStorageSupport";
|
|
4294
|
-
class
|
|
4294
|
+
class Tr {
|
|
4295
4295
|
constructor() {
|
|
4296
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence =
|
|
4296
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Wt, this._completeRedirectFn = Gi, this._overrideRedirectResult = $i;
|
|
4297
4297
|
}
|
|
4298
4298
|
// Wrapping in async even though we don't await anywhere in order
|
|
4299
4299
|
// to make sure errors are raised as promise rejections
|
|
4300
4300
|
async _openPopup(e, t, i, r) {
|
|
4301
4301
|
var s;
|
|
4302
4302
|
b((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4303
|
-
const o = await
|
|
4304
|
-
return
|
|
4303
|
+
const o = await ot(e, t, i, Ee(), r);
|
|
4304
|
+
return pr(e, o, Me());
|
|
4305
4305
|
}
|
|
4306
4306
|
async _openRedirect(e, t, i, r) {
|
|
4307
4307
|
await this._originValidation(e);
|
|
4308
|
-
const s = await
|
|
4309
|
-
return
|
|
4308
|
+
const s = await ot(e, t, i, Ee(), r);
|
|
4309
|
+
return Ei(s), new Promise(() => {
|
|
4310
4310
|
});
|
|
4311
4311
|
}
|
|
4312
4312
|
_initialize(e) {
|
|
@@ -4321,7 +4321,7 @@ class Ir {
|
|
|
4321
4321
|
}), i;
|
|
4322
4322
|
}
|
|
4323
4323
|
async initAndGetManager(e) {
|
|
4324
|
-
const t = await
|
|
4324
|
+
const t = await cr(e), i = new qi(e);
|
|
4325
4325
|
return t.register("authEvent", (r) => (u(
|
|
4326
4326
|
r == null ? void 0 : r.authEvent,
|
|
4327
4327
|
e,
|
|
@@ -4345,14 +4345,14 @@ class Ir {
|
|
|
4345
4345
|
}
|
|
4346
4346
|
_originValidation(e) {
|
|
4347
4347
|
const t = e._key();
|
|
4348
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
|
4348
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Xi(e)), this.originValidationPromises[t];
|
|
4349
4349
|
}
|
|
4350
4350
|
get _shouldInitProactively() {
|
|
4351
|
-
return
|
|
4351
|
+
return Lt() || Ne() || fe();
|
|
4352
4352
|
}
|
|
4353
4353
|
}
|
|
4354
|
-
const
|
|
4355
|
-
var
|
|
4354
|
+
const wr = Tr;
|
|
4355
|
+
var at = "@firebase/auth", ct = "1.7.5";
|
|
4356
4356
|
/**
|
|
4357
4357
|
* @license
|
|
4358
4358
|
* Copyright 2020 Google LLC
|
|
@@ -4369,7 +4369,7 @@ var ot = "@firebase/auth", at = "1.7.5";
|
|
|
4369
4369
|
* See the License for the specific language governing permissions and
|
|
4370
4370
|
* limitations under the License.
|
|
4371
4371
|
*/
|
|
4372
|
-
class
|
|
4372
|
+
class yr {
|
|
4373
4373
|
constructor(e) {
|
|
4374
4374
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
4375
4375
|
}
|
|
@@ -4420,7 +4420,7 @@ class wr {
|
|
|
4420
4420
|
* See the License for the specific language governing permissions and
|
|
4421
4421
|
* limitations under the License.
|
|
4422
4422
|
*/
|
|
4423
|
-
function
|
|
4423
|
+
function Er(n) {
|
|
4424
4424
|
switch (n) {
|
|
4425
4425
|
case "Node":
|
|
4426
4426
|
return "node";
|
|
@@ -4436,7 +4436,7 @@ function yr(n) {
|
|
|
4436
4436
|
return;
|
|
4437
4437
|
}
|
|
4438
4438
|
}
|
|
4439
|
-
function
|
|
4439
|
+
function kr(n) {
|
|
4440
4440
|
je(new Ge(
|
|
4441
4441
|
"auth",
|
|
4442
4442
|
(e, { options: t }) => {
|
|
@@ -4449,9 +4449,9 @@ function Er(n) {
|
|
|
4449
4449
|
apiHost: "identitytoolkit.googleapis.com",
|
|
4450
4450
|
tokenApiHost: "securetoken.googleapis.com",
|
|
4451
4451
|
apiScheme: "https",
|
|
4452
|
-
sdkClientVersion:
|
|
4453
|
-
}, l = new
|
|
4454
|
-
return
|
|
4452
|
+
sdkClientVersion: Mt(n)
|
|
4453
|
+
}, l = new Zn(i, r, s, a);
|
|
4454
|
+
return si(l, t), l;
|
|
4455
4455
|
},
|
|
4456
4456
|
"PUBLIC"
|
|
4457
4457
|
/* ComponentType.PUBLIC */
|
|
@@ -4470,14 +4470,14 @@ function Er(n) {
|
|
|
4470
4470
|
"auth"
|
|
4471
4471
|
/* _ComponentName.AUTH */
|
|
4472
4472
|
).getImmediate());
|
|
4473
|
-
return ((i) => new
|
|
4473
|
+
return ((i) => new yr(i))(t);
|
|
4474
4474
|
},
|
|
4475
4475
|
"PRIVATE"
|
|
4476
4476
|
/* ComponentType.PRIVATE */
|
|
4477
4477
|
).setInstantiationMode(
|
|
4478
4478
|
"EXPLICIT"
|
|
4479
4479
|
/* InstantiationMode.EXPLICIT */
|
|
4480
|
-
)), ye(
|
|
4480
|
+
)), ye(at, ct, Er(n)), ye(at, ct, "esm2017");
|
|
4481
4481
|
}
|
|
4482
4482
|
/**
|
|
4483
4483
|
* @license
|
|
@@ -4495,47 +4495,47 @@ function Er(n) {
|
|
|
4495
4495
|
* See the License for the specific language governing permissions and
|
|
4496
4496
|
* limitations under the License.
|
|
4497
4497
|
*/
|
|
4498
|
-
const
|
|
4499
|
-
let
|
|
4500
|
-
const
|
|
4498
|
+
const Sr = 5 * 60, br = pt("authIdTokenMaxAge") || Sr;
|
|
4499
|
+
let lt = null;
|
|
4500
|
+
const Rr = (n) => async (e) => {
|
|
4501
4501
|
const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
4502
|
-
if (i && i >
|
|
4502
|
+
if (i && i > br)
|
|
4503
4503
|
return;
|
|
4504
4504
|
const r = t == null ? void 0 : t.token;
|
|
4505
|
-
|
|
4505
|
+
lt !== r && (lt = r, await fetch(n, {
|
|
4506
4506
|
method: r ? "POST" : "DELETE",
|
|
4507
4507
|
headers: r ? {
|
|
4508
4508
|
Authorization: `Bearer ${r}`
|
|
4509
4509
|
} : {}
|
|
4510
4510
|
}));
|
|
4511
4511
|
};
|
|
4512
|
-
function
|
|
4513
|
-
const e =
|
|
4512
|
+
function Pr(n = In()) {
|
|
4513
|
+
const e = gt(n, "auth");
|
|
4514
4514
|
if (e.isInitialized())
|
|
4515
4515
|
return e.getImmediate();
|
|
4516
|
-
const t =
|
|
4517
|
-
popupRedirectResolver:
|
|
4516
|
+
const t = ri(n, {
|
|
4517
|
+
popupRedirectResolver: wr,
|
|
4518
4518
|
persistence: [
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4519
|
+
Ni,
|
|
4520
|
+
Ti,
|
|
4521
|
+
Wt
|
|
4522
4522
|
]
|
|
4523
|
-
}), i =
|
|
4523
|
+
}), i = pt("authTokenSyncURL");
|
|
4524
4524
|
if (i && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
4525
4525
|
const s = new URL(i, location.origin);
|
|
4526
4526
|
if (location.origin === s.origin) {
|
|
4527
|
-
const o =
|
|
4528
|
-
mi(t, o, () => o(t.currentUser)),
|
|
4527
|
+
const o = Rr(s.toString());
|
|
4528
|
+
mi(t, o, () => o(t.currentUser)), gi(t, (c) => o(c));
|
|
4529
4529
|
}
|
|
4530
4530
|
}
|
|
4531
|
-
const r =
|
|
4532
|
-
return r &&
|
|
4531
|
+
const r = vn("auth");
|
|
4532
|
+
return r && oi(t, `http://${r}`), t;
|
|
4533
4533
|
}
|
|
4534
|
-
function
|
|
4534
|
+
function Ar() {
|
|
4535
4535
|
var n, e;
|
|
4536
4536
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
|
4537
4537
|
}
|
|
4538
|
-
|
|
4538
|
+
ei({
|
|
4539
4539
|
loadJS(n) {
|
|
4540
4540
|
return new Promise((e, t) => {
|
|
4541
4541
|
const i = document.createElement("script");
|
|
@@ -4545,67 +4545,67 @@ Zn({
|
|
|
4545
4545
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4546
4546
|
);
|
|
4547
4547
|
s.customData = r, t(s);
|
|
4548
|
-
}, i.type = "text/javascript", i.charset = "UTF-8",
|
|
4548
|
+
}, i.type = "text/javascript", i.charset = "UTF-8", Ar().appendChild(i);
|
|
4549
4549
|
});
|
|
4550
4550
|
},
|
|
4551
4551
|
gapiScript: "https://apis.google.com/js/api.js",
|
|
4552
4552
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
4553
4553
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
4554
4554
|
});
|
|
4555
|
-
|
|
4555
|
+
kr(
|
|
4556
4556
|
"Browser"
|
|
4557
4557
|
/* ClientPlatform.BROWSER */
|
|
4558
4558
|
);
|
|
4559
|
-
var
|
|
4560
|
-
const
|
|
4559
|
+
var Cr = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, Or = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
4560
|
+
const Nr = {
|
|
4561
4561
|
key: 1,
|
|
4562
4562
|
class: "h-full w-full"
|
|
4563
|
-
},
|
|
4563
|
+
}, Lr = ["src"], zr = /* @__PURE__ */ ut({
|
|
4564
4564
|
__name: "App",
|
|
4565
4565
|
setup(n) {
|
|
4566
|
-
const e = We(), t =
|
|
4567
|
-
const p = e.currentCountry.value || "MY",
|
|
4568
|
-
return `${
|
|
4566
|
+
const e = We(), t = an(), i = cn(), r = ln(), s = un(), o = ft(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = We(), d = te(!1), h = Ve(() => i.version), _ = Ve(() => {
|
|
4567
|
+
const p = e.currentCountry.value || "MY", g = Be.getIdToken(), v = l.value._id;
|
|
4568
|
+
return `${Or.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${g}`;
|
|
4569
4569
|
});
|
|
4570
4570
|
async function F() {
|
|
4571
|
-
if (
|
|
4571
|
+
if (kn().length) {
|
|
4572
4572
|
console.warn("CONNECT: initFirebase: Firebase already initialized");
|
|
4573
4573
|
return;
|
|
4574
4574
|
}
|
|
4575
|
-
const p =
|
|
4576
|
-
await
|
|
4575
|
+
const p = Sn(Cr.firebase), g = await on.getCustomToken(), v = Pr();
|
|
4576
|
+
await pi(v, g), bn(p), console.log("initFirebase", p);
|
|
4577
4577
|
}
|
|
4578
4578
|
const M = async () => {
|
|
4579
|
-
d.value = !1, await
|
|
4579
|
+
d.value = !1, await nn(), console.log("forceRerender"), Be.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;
|
|
4580
4580
|
};
|
|
4581
|
-
return
|
|
4581
|
+
return Qt(() => {
|
|
4582
4582
|
if (t.initProvider(r, s), !c.value) {
|
|
4583
|
-
const p = document.getElementsByClassName("app-header")[0],
|
|
4584
|
-
p == null || p.classList.add("!hidden"),
|
|
4583
|
+
const p = document.getElementsByClassName("app-header")[0], g = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
|
|
4584
|
+
p == null || p.classList.add("!hidden"), g == null || g.classList.add("!pt-0"), v == null || v.classList.add("!pt-0"), x == null || x.classList.add("!pt-0"), e.hideSidebarToggle(!0);
|
|
4585
4585
|
}
|
|
4586
4586
|
l.value != null && (console.log("App mounted, forceRerender"), M());
|
|
4587
|
-
}),
|
|
4587
|
+
}), dt(
|
|
4588
4588
|
() => e.currentBusiness.value,
|
|
4589
|
-
async (p,
|
|
4590
|
-
console.log("Current business changed"), p != null && p._id !=
|
|
4589
|
+
async (p, g) => {
|
|
4590
|
+
console.log("Current business changed"), p != null && p._id != g._id && (console.log("forceRerender when business changes", p, g), M()), qe.Config.setCountry(e.currentCountry.value || "MY"), console.log(qe.Config.getCountry());
|
|
4591
4591
|
}
|
|
4592
|
-
), (p,
|
|
4593
|
-
P(d) && P(h) === "v2" ? (ne(),
|
|
4594
|
-
P(d) && P(h) !== "v2" ? (ne(), He("div",
|
|
4595
|
-
|
|
4592
|
+
), (p, g) => (ne(), He(Zt, null, [
|
|
4593
|
+
P(d) && P(h) === "v2" ? (ne(), ht(P(sn), { key: 0 })) : $e("", !0),
|
|
4594
|
+
P(d) && P(h) !== "v2" ? (ne(), He("div", Nr, [
|
|
4595
|
+
en(hn, {
|
|
4596
4596
|
json: { url: P(_) }
|
|
4597
4597
|
}, null, 8, ["json"]),
|
|
4598
|
-
|
|
4598
|
+
tn("iframe", {
|
|
4599
4599
|
allow: "clipboard-read; clipboard-write",
|
|
4600
4600
|
frameBorder: "0",
|
|
4601
4601
|
height: "100%",
|
|
4602
4602
|
width: "100%",
|
|
4603
4603
|
src: P(_)
|
|
4604
|
-
}, null, 8,
|
|
4604
|
+
}, null, 8, Lr)
|
|
4605
4605
|
])) : $e("", !0)
|
|
4606
4606
|
], 64));
|
|
4607
4607
|
}
|
|
4608
4608
|
});
|
|
4609
4609
|
export {
|
|
4610
|
-
|
|
4610
|
+
zr as default
|
|
4611
4611
|
};
|