@feedmepos/mf-connect 0.1.0-beta.8 → 0.1.0-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Analytic-D1vIDmhJ.js +620 -0
- package/dist/{App-SRz4257n.js → App-DHrfWG8l.js} +249 -250
- package/dist/Broadcast-B2rxZAZi.js +216 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CZXSxA9u.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D2a9rcXK.js} +20 -20
- package/dist/Card-Dr6pTTM0.js +824 -0
- package/dist/Collections-0tbg0MFt.js +441 -0
- package/dist/Credit-KbB_7Jq-.js +214 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cuklmxur.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-we7ADwFk.js} +999 -1018
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-VBNyvZCJ.js +344 -0
- package/dist/Experience-C_Q9Iml8.js +211 -0
- package/dist/Game-BwODw7M6.js +250 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → MainLayout-DpZC6o3R.js} +53 -19
- package/dist/Marketing-QOKTAS_T.js +309 -0
- package/dist/Member-d7RIGRm1.js +92 -0
- package/dist/MemberList-CK9629ew.js +1737 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-BwT3zE2a.js → MemberTransactions-D-pnlXiP.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-3VS7JnK6.js +203 -0
- package/dist/Mission-BAKDm4VZ.js +248 -0
- package/dist/Point-Puu0jKz0.js +220 -0
- package/dist/Promotion-DRIaUvJi.js +244 -0
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BkFm7tXq.js → RuleGroup.vue_vue_type_script_setup_true_lang-DTdfYGya.js} +557 -557
- package/dist/Segment-DpBxGuuu.js +435 -0
- package/dist/Setting-DLB2ywCp.js +1870 -0
- package/dist/Store-8DO6ITWc.js +1513 -0
- package/dist/StoreRewards-DZfqUeYR.js +429 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BqpsMcl1.js → StoreTransactions.vue_vue_type_script_setup_true_lang-RTfozD01.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrzmjYmU.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BGI78ycg.js} +1 -1
- package/dist/{Tier-CJ9-d8Zg.js → Tier-BnQRujpX.js} +453 -481
- package/dist/{Title-DZCpvg4q.js → Title-BPf1tUFx.js} +295 -314
- package/dist/Transaction-ese0oNrz.js +36 -0
- package/dist/Voucher--gtOZQx1.js +485 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
- package/dist/app-Bt59niI-.js +2974 -0
- package/dist/{app-Cg2pTZJK.js → app-DHE61XdR.js} +1 -1
- package/dist/app.js +3 -5
- package/dist/{business-Cw_qGw8y.js → business-BSo7EPan.js} +1 -1
- package/dist/{campaign-winsqufa.js → campaign-CsOje3Ap.js} +3 -5
- package/dist/{collection.fn-CI5Llblg.js → collection.fn-BYQfFJOr.js} +2 -2
- package/dist/dto-CfEXSCq6.js +1145 -0
- package/dist/{effect-CdkrIYgX.js → effect-Bn_ofYS3.js} +9 -9
- package/dist/{export-DGxfief1.js → export-CMR243CF.js} +3 -3
- package/dist/{helper-B8RqcTNu.js → helper-BqOQRtvW.js} +1 -1
- package/dist/index-BLDYTxnc.js +28058 -0
- package/dist/{index-Cw_aXFH6.js → index-BWnFs-Cb.js} +281 -299
- package/dist/{index-wzdbEEcZ.js → index-BaBNmzUb.js} +1 -1
- package/dist/{index-CjVmULNd.js → index-Boo5np6l.js} +1 -1
- package/dist/{index-HZC9LLAX.js → index-CC1GV8OW.js} +1 -1
- package/dist/{index-OzicErwL.js → index-CHO4_zsT.js} +1 -1
- package/dist/{index-DAEmawcj.js → index-DEZsrQ2f.js} +3 -3
- package/dist/{index-9w43_U1v.js → index-D_f2lmK2.js} +1 -1
- package/dist/{index-BaozRfWB.js → index-Da142OER.js} +66 -78
- package/dist/index-DbP04yeg.js +11 -0
- package/dist/{index-A34xEz20.js → index-DtPe-TEm.js} +3 -3
- package/dist/{index-BLACZ3-L.js → index-FvlaxwGB.js} +20 -20
- package/dist/{index.esm2017-CppSMh_U.js → index.esm2017-ePm--Atp.js} +55 -55
- package/dist/{loading-DuEFUCwF.js → loading-KNmEMBUB.js} +460 -469
- package/dist/{membership-nsMtWeTC.js → membership-DKoVIS1a.js} +3 -3
- package/dist/money-CkD3zl5C.js +15 -0
- package/dist/number-BDsGpOXm.js +12 -0
- package/dist/{rule-CPIMqt1h.js → rule-CzamI50_.js} +2 -2
- package/dist/{rule-builder-CSs5XRKP.js → rule-builder-DHf6wfaQ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CJZoYavu.js → template-CFAIPoD7.js} +63 -63
- package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
- package/dist/{xlsx-BZlnYinX.js → xlsx-BDJMaozs.js} +517 -517
- package/package.json +4 -7
- package/dist/Analytic-5QztrYSp.js +0 -622
- package/dist/Broadcast-DmkrJGp2.js +0 -223
- package/dist/Card-BsjFTVsH.js +0 -825
- package/dist/Collections-7wqZHOax.js +0 -453
- package/dist/Credit-CcNrq9qk.js +0 -220
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BIZDiLns.js +0 -345
- package/dist/Experience-DNsQLzDH.js +0 -221
- package/dist/Game-DlzDerT7.js +0 -255
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
- package/dist/MainLayout-B1aJoR95.js +0 -41
- package/dist/Marketing-BqhpaG4o.js +0 -316
- package/dist/Member-AFgZcdtz.js +0 -69
- package/dist/MemberList-BKgrLz2C.js +0 -1733
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-GCEQCVOt.js +0 -432
- package/dist/Mission-BTAia7AS.js +0 -261
- package/dist/Point-Ck8EG_3k.js +0 -222
- package/dist/Promotion-0v3kvsK3.js +0 -247
- package/dist/Segment-BenLupqV.js +0 -437
- package/dist/Setting-0fpREqpJ.js +0 -1901
- package/dist/Store-BDGwe4ar.js +0 -1511
- package/dist/StoreRewards-TDZt9H1V.js +0 -401
- package/dist/Transaction-DpnTxlbf.js +0 -39
- package/dist/Voucher-DsP_rh8I.js +0 -490
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-SukfoJpU.js +0 -56
- package/dist/app-DzAexOqx.js +0 -5639
- package/dist/dto-ozu1smC3.js +0 -2770
- package/dist/index-CZgQVRsm.js +0 -3
- package/dist/index-Oxr-mU6h.js +0 -29193
- package/dist/money-BGZPFtUc.js +0 -15
- package/dist/number-4J0xvXP9.js +0 -12
- package/dist/vue-i18n-CCyiVzOE.js +0 -2365
- package/dist/zod-Bg2FbC-D.js +0 -90
|
@@ -2,68 +2,67 @@ import { defineComponent as lt, ref as te, h as Q, watch as ut, resolveComponent
|
|
|
2
2
|
import { useRouter as nn, useRoute as ht, RouterView as rn } from "vue-router";
|
|
3
3
|
import { useCoreStore as We, FeedMeAuth as sn } from "@feedmepos/mf-common";
|
|
4
4
|
import { u as on } from "./app-wDQR6dpb.js";
|
|
5
|
-
import { u as an } from "./business-
|
|
6
|
-
import "./index-
|
|
5
|
+
import { u as an } from "./business-BSo7EPan.js";
|
|
6
|
+
import "./index-DbP04yeg.js";
|
|
7
7
|
import { components as Z, useSnackbar as cn, useDialog as ln } from "@feedmepos/ui-library";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { r as ye, L as hn, g as ft, i as fn, a as pn, _ as je, C as Ge, b as mn, S as z, c as w, d as j, E as be, e as gn, f as pt, h as _n, j as vn, k as mt, l as g, m as In, F as Re, n as Tn, q as K, o as wn, p as yn, s as En, t as kn, u as Sn } from "./index.esm2017-CppSMh_U.js";
|
|
8
|
+
import { R as f } from "./app-Bt59niI-.js";
|
|
9
|
+
import { J as un } from "./JsonViewer-v8_C7l5N.js";
|
|
10
|
+
import { r as ye, L as dn, g as ft, i as hn, a as fn, _ as je, C as Ge, b as pn, S as z, c as w, d as j, E as be, e as mn, f as pt, h as gn, j as _n, k as mt, l as g, m as vn, F as Re, n as In, q as K, o as Tn, p as wn, s as yn, t as En, u as kn } from "./index.esm2017-ePm--Atp.js";
|
|
12
11
|
import { _ as Pe } from "./tslib.es6-BCqqvLQ_.js";
|
|
13
|
-
import { S as Be } from "./index-
|
|
14
|
-
const
|
|
12
|
+
import { S as Be } from "./index-BLDYTxnc.js";
|
|
13
|
+
const Sn = /* @__PURE__ */ lt({
|
|
15
14
|
__name: "NavigationTab",
|
|
16
15
|
setup(n) {
|
|
17
|
-
const
|
|
16
|
+
const e = te(), t = [
|
|
18
17
|
{
|
|
19
|
-
label:
|
|
18
|
+
label: "Analytic",
|
|
20
19
|
value: f["$connect-ANALYTIC"]
|
|
21
20
|
},
|
|
22
21
|
{
|
|
23
|
-
label:
|
|
22
|
+
label: "Campaign",
|
|
24
23
|
value: f["$connect-CAMPAIGN"],
|
|
25
24
|
children: [
|
|
26
25
|
{
|
|
27
|
-
label:
|
|
26
|
+
label: "Promotion",
|
|
28
27
|
value: f["$connect-CAMPAIGN_PROMOTION"]
|
|
29
28
|
},
|
|
30
29
|
{
|
|
31
|
-
label:
|
|
30
|
+
label: "Voucher",
|
|
32
31
|
value: f["$connect-CAMPAIGN_VOUCHER"]
|
|
33
32
|
},
|
|
34
33
|
{
|
|
35
|
-
label:
|
|
34
|
+
label: "Broadcast",
|
|
36
35
|
value: f["$connect-CAMPAIGN_BROADCAST"]
|
|
37
36
|
}
|
|
38
37
|
]
|
|
39
38
|
},
|
|
40
39
|
{
|
|
41
|
-
label:
|
|
40
|
+
label: "Program",
|
|
42
41
|
value: f["$connect-PROGRAM"],
|
|
43
42
|
children: [
|
|
44
43
|
{
|
|
45
|
-
label:
|
|
44
|
+
label: "Tier",
|
|
46
45
|
value: f["$connect-PROGRAM_TIER"]
|
|
47
46
|
},
|
|
48
47
|
{
|
|
49
|
-
label:
|
|
48
|
+
label: "Title",
|
|
50
49
|
value: f["$connect-PROGRAM_TITLE"]
|
|
51
50
|
},
|
|
52
51
|
{
|
|
53
|
-
label:
|
|
52
|
+
label: "Experience",
|
|
54
53
|
value: f["$connect-PROGRAM_EXPERIENCE"]
|
|
55
54
|
},
|
|
56
55
|
{
|
|
57
|
-
label:
|
|
56
|
+
label: "Point",
|
|
58
57
|
value: f["$connect-PROGRAM_POINT"],
|
|
59
58
|
badge: () => Q(Z.FmPill, { variant: "premium" })
|
|
60
59
|
},
|
|
61
60
|
{
|
|
62
|
-
label:
|
|
61
|
+
label: "Credit",
|
|
63
62
|
value: f["$connect-PROGRAM_CREDIT"]
|
|
64
63
|
},
|
|
65
64
|
{
|
|
66
|
-
label:
|
|
65
|
+
label: "Game",
|
|
67
66
|
value: f["$connect-PROGRAM_GAME"],
|
|
68
67
|
badge: () => Q(Z.FmPill, { variant: "premium" })
|
|
69
68
|
},
|
|
@@ -74,31 +73,31 @@ const bn = /* @__PURE__ */ lt({
|
|
|
74
73
|
]
|
|
75
74
|
},
|
|
76
75
|
{
|
|
77
|
-
label:
|
|
76
|
+
label: "Loyalty",
|
|
78
77
|
value: f["$connect-LOYALTY"],
|
|
79
78
|
children: [
|
|
80
79
|
{
|
|
81
|
-
label:
|
|
80
|
+
label: "Member",
|
|
82
81
|
value: f["$connect-LOYALTY_MEMBER_LIST"]
|
|
83
82
|
},
|
|
84
83
|
{
|
|
85
|
-
label:
|
|
84
|
+
label: "Segments",
|
|
86
85
|
value: f["$connect-LOYALTY_SEGMENT"],
|
|
87
86
|
badge: () => Q(Z.FmPill, { variant: "premium" })
|
|
88
87
|
},
|
|
89
88
|
{
|
|
90
|
-
label:
|
|
89
|
+
label: "Card",
|
|
91
90
|
value: f["$connect-LOYALTY_CARD"],
|
|
92
91
|
badge: () => Q(Z.FmPill, { variant: "premium" })
|
|
93
92
|
}
|
|
94
93
|
]
|
|
95
94
|
},
|
|
96
95
|
{
|
|
97
|
-
label:
|
|
96
|
+
label: "Store",
|
|
98
97
|
value: f["$connect-STORE"]
|
|
99
98
|
},
|
|
100
99
|
{
|
|
101
|
-
label:
|
|
100
|
+
label: "Transaction",
|
|
102
101
|
value: f["$connect-TRANSACTION"]
|
|
103
102
|
},
|
|
104
103
|
// {
|
|
@@ -106,34 +105,34 @@ const bn = /* @__PURE__ */ lt({
|
|
|
106
105
|
// value: ROUTE_NAME['$connect-MARKETING'],
|
|
107
106
|
// },
|
|
108
107
|
{
|
|
109
|
-
label:
|
|
108
|
+
label: "Setting",
|
|
110
109
|
value: f["$connect-SETTING"]
|
|
111
110
|
}
|
|
112
|
-
],
|
|
111
|
+
], i = nn(), r = ht(), s = t.reduce((c, a) => [...(a.children ?? []).map((l) => l.value), ...c, a.value], []);
|
|
113
112
|
ut(
|
|
114
|
-
() =>
|
|
115
|
-
(
|
|
116
|
-
const
|
|
117
|
-
|
|
113
|
+
() => r,
|
|
114
|
+
(c) => {
|
|
115
|
+
const a = c.matched.map((l) => l.name).reverse();
|
|
116
|
+
e.value = a.find((l) => s.includes(l));
|
|
118
117
|
},
|
|
119
118
|
{ immediate: !0 }
|
|
120
119
|
);
|
|
121
|
-
async function c
|
|
122
|
-
await
|
|
120
|
+
async function o(c) {
|
|
121
|
+
await i.push({ name: c });
|
|
123
122
|
}
|
|
124
|
-
return (
|
|
125
|
-
var
|
|
126
|
-
const
|
|
127
|
-
return ne(), dt(
|
|
123
|
+
return (c, a) => {
|
|
124
|
+
var d;
|
|
125
|
+
const l = Yt("FmCollapsibleTabs");
|
|
126
|
+
return ne(), dt(l, {
|
|
128
127
|
class: "border-fm-color-neutral-gray-100 border-r py-16 px-4",
|
|
129
|
-
"model-value": (
|
|
130
|
-
items:
|
|
131
|
-
"onUpdate:modelValue":
|
|
128
|
+
"model-value": (d = P(e)) == null ? void 0 : d.toString(),
|
|
129
|
+
items: t,
|
|
130
|
+
"onUpdate:modelValue": o
|
|
132
131
|
}, null, 8, ["model-value"]);
|
|
133
132
|
};
|
|
134
133
|
}
|
|
135
134
|
});
|
|
136
|
-
var
|
|
135
|
+
var bn = "firebase", Rn = "10.12.4";
|
|
137
136
|
/**
|
|
138
137
|
* @license
|
|
139
138
|
* Copyright 2020 Google LLC
|
|
@@ -150,13 +149,13 @@ var Rn = "firebase", Pn = "10.12.4";
|
|
|
150
149
|
* See the License for the specific language governing permissions and
|
|
151
150
|
* limitations under the License.
|
|
152
151
|
*/
|
|
153
|
-
ye(
|
|
152
|
+
ye(bn, Rn, "app");
|
|
154
153
|
function gt() {
|
|
155
154
|
return {
|
|
156
155
|
"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
156
|
};
|
|
158
157
|
}
|
|
159
|
-
const
|
|
158
|
+
const Pn = gt, _t = new be("auth", "Firebase", gt());
|
|
160
159
|
/**
|
|
161
160
|
* @license
|
|
162
161
|
* Copyright 2020 Google LLC
|
|
@@ -173,8 +172,8 @@ const An = gt, _t = new be("auth", "Firebase", gt());
|
|
|
173
172
|
* See the License for the specific language governing permissions and
|
|
174
173
|
* limitations under the License.
|
|
175
174
|
*/
|
|
176
|
-
const ae = new
|
|
177
|
-
function
|
|
175
|
+
const ae = new dn("@firebase/auth");
|
|
176
|
+
function An(n, ...e) {
|
|
178
177
|
ae.logLevel <= mt.WARN && ae.warn(`Auth (${z}): ${n}`, ...e);
|
|
179
178
|
}
|
|
180
179
|
function ie(n, ...e) {
|
|
@@ -203,7 +202,7 @@ function I(n, ...e) {
|
|
|
203
202
|
return Ae(n, ...e);
|
|
204
203
|
}
|
|
205
204
|
function vt(n, e, t) {
|
|
206
|
-
const i = Object.assign(Object.assign({},
|
|
205
|
+
const i = Object.assign(Object.assign({}, Pn()), { [e]: t });
|
|
207
206
|
return new be("auth", "Firebase", i).create(e, {
|
|
208
207
|
appName: n.name
|
|
209
208
|
});
|
|
@@ -249,7 +248,7 @@ function Ee() {
|
|
|
249
248
|
var n;
|
|
250
249
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
251
250
|
}
|
|
252
|
-
function
|
|
251
|
+
function Cn() {
|
|
253
252
|
return qe() === "http:" || qe() === "https:";
|
|
254
253
|
}
|
|
255
254
|
function qe() {
|
|
@@ -272,15 +271,15 @@ function qe() {
|
|
|
272
271
|
* See the License for the specific language governing permissions and
|
|
273
272
|
* limitations under the License.
|
|
274
273
|
*/
|
|
275
|
-
function
|
|
274
|
+
function On() {
|
|
276
275
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
277
276
|
// This is especially true for Cordova apps which have unreliable
|
|
278
277
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
279
278
|
// installed which overwrites the native navigator.onLine value and
|
|
280
279
|
// defines navigator.connection.
|
|
281
|
-
(
|
|
280
|
+
(Cn() || pn() || "connection" in navigator) ? navigator.onLine : !0;
|
|
282
281
|
}
|
|
283
|
-
function
|
|
282
|
+
function Nn() {
|
|
284
283
|
if (typeof navigator > "u")
|
|
285
284
|
return null;
|
|
286
285
|
const n = navigator;
|
|
@@ -310,10 +309,10 @@ function Ln() {
|
|
|
310
309
|
*/
|
|
311
310
|
class J {
|
|
312
311
|
constructor(e, t) {
|
|
313
|
-
this.shortDelay = e, this.longDelay = t, b(t > e, "Short delay should be less than long delay!"), this.isMobile =
|
|
312
|
+
this.shortDelay = e, this.longDelay = t, b(t > e, "Short delay should be less than long delay!"), this.isMobile = hn() || fn();
|
|
314
313
|
}
|
|
315
314
|
get() {
|
|
316
|
-
return
|
|
315
|
+
return On() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
317
316
|
}
|
|
318
317
|
}
|
|
319
318
|
/**
|
|
@@ -407,7 +406,7 @@ class It {
|
|
|
407
406
|
* See the License for the specific language governing permissions and
|
|
408
407
|
* limitations under the License.
|
|
409
408
|
*/
|
|
410
|
-
const
|
|
409
|
+
const Ln = {
|
|
411
410
|
// Custom token errors.
|
|
412
411
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
|
413
412
|
// This can only happen if the SDK sends a bad request.
|
|
@@ -498,7 +497,7 @@ const Mn = {
|
|
|
498
497
|
* See the License for the specific language governing permissions and
|
|
499
498
|
* limitations under the License.
|
|
500
499
|
*/
|
|
501
|
-
const
|
|
500
|
+
const Mn = new J(3e4, 6e4);
|
|
502
501
|
function he(n, e) {
|
|
503
502
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
504
503
|
}
|
|
@@ -524,9 +523,9 @@ async function G(n, e, t, i, r = {}) {
|
|
|
524
523
|
}
|
|
525
524
|
async function Tt(n, e, t) {
|
|
526
525
|
n._canInitEmulator = !1;
|
|
527
|
-
const i = Object.assign(Object.assign({},
|
|
526
|
+
const i = Object.assign(Object.assign({}, Ln), e);
|
|
528
527
|
try {
|
|
529
|
-
const r = new
|
|
528
|
+
const r = new Un(n), s = await Promise.race([
|
|
530
529
|
t(),
|
|
531
530
|
r.promise
|
|
532
531
|
]);
|
|
@@ -565,14 +564,14 @@ function yt(n, e, t, i) {
|
|
|
565
564
|
const r = `${e}${t}?${i}`;
|
|
566
565
|
return n.config.emulator ? Ce(n.config, r) : `${n.config.apiScheme}://${r}`;
|
|
567
566
|
}
|
|
568
|
-
class
|
|
567
|
+
class Un {
|
|
569
568
|
constructor(e) {
|
|
570
569
|
this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
|
|
571
570
|
this.timer = setTimeout(() => i(I(
|
|
572
571
|
this.auth,
|
|
573
572
|
"network-request-failed"
|
|
574
573
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
575
|
-
)),
|
|
574
|
+
)), Mn.get());
|
|
576
575
|
});
|
|
577
576
|
}
|
|
578
577
|
clearNetworkTimeout() {
|
|
@@ -603,7 +602,7 @@ function ee(n, e, t) {
|
|
|
603
602
|
* See the License for the specific language governing permissions and
|
|
604
603
|
* limitations under the License.
|
|
605
604
|
*/
|
|
606
|
-
async function
|
|
605
|
+
async function Dn(n, e) {
|
|
607
606
|
return G(n, "POST", "/v1/accounts:delete", e);
|
|
608
607
|
}
|
|
609
608
|
async function Et(n, e) {
|
|
@@ -634,7 +633,7 @@ function B(n) {
|
|
|
634
633
|
} catch {
|
|
635
634
|
}
|
|
636
635
|
}
|
|
637
|
-
async function
|
|
636
|
+
async function Fn(n, e = !1) {
|
|
638
637
|
const t = j(n), i = await t.getIdToken(e), r = Oe(i);
|
|
639
638
|
u(
|
|
640
639
|
r && r.exp && r.auth_time && r.iat,
|
|
@@ -661,7 +660,7 @@ function Oe(n) {
|
|
|
661
660
|
if (e === void 0 || t === void 0 || i === void 0)
|
|
662
661
|
return ie("JWT malformed, contained fewer than 3 sections"), null;
|
|
663
662
|
try {
|
|
664
|
-
const r =
|
|
663
|
+
const r = In(t);
|
|
665
664
|
return r ? JSON.parse(r) : (ie("Failed to decode base64 JWT payload"), null);
|
|
666
665
|
} catch (r) {
|
|
667
666
|
return ie("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
|
|
@@ -705,10 +704,10 @@ async function q(n, e, t = !1) {
|
|
|
705
704
|
try {
|
|
706
705
|
return await e;
|
|
707
706
|
} catch (i) {
|
|
708
|
-
throw i instanceof Re &&
|
|
707
|
+
throw i instanceof Re && xn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
|
|
709
708
|
}
|
|
710
709
|
}
|
|
711
|
-
function
|
|
710
|
+
function xn({ code: n }) {
|
|
712
711
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
713
712
|
}
|
|
714
713
|
/**
|
|
@@ -727,7 +726,7 @@ function Vn({ code: n }) {
|
|
|
727
726
|
* See the License for the specific language governing permissions and
|
|
728
727
|
* limitations under the License.
|
|
729
728
|
*/
|
|
730
|
-
class
|
|
729
|
+
class Vn {
|
|
731
730
|
constructor(e) {
|
|
732
731
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
733
732
|
}
|
|
@@ -833,7 +832,7 @@ async function ce(n) {
|
|
|
833
832
|
);
|
|
834
833
|
const s = r.users[0];
|
|
835
834
|
n._notifyReloadListener(s);
|
|
836
|
-
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c =
|
|
835
|
+
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c = $n(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
|
|
837
836
|
uid: s.localId,
|
|
838
837
|
displayName: s.displayName || null,
|
|
839
838
|
photoURL: s.photoUrl || null,
|
|
@@ -847,11 +846,11 @@ async function ce(n) {
|
|
|
847
846
|
};
|
|
848
847
|
Object.assign(n, h);
|
|
849
848
|
}
|
|
850
|
-
async function
|
|
849
|
+
async function Hn(n) {
|
|
851
850
|
const e = j(n);
|
|
852
851
|
await ce(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
853
852
|
}
|
|
854
|
-
function
|
|
853
|
+
function $n(n, e) {
|
|
855
854
|
return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
|
|
856
855
|
}
|
|
857
856
|
function kt(n) {
|
|
@@ -883,7 +882,7 @@ function kt(n) {
|
|
|
883
882
|
* See the License for the specific language governing permissions and
|
|
884
883
|
* limitations under the License.
|
|
885
884
|
*/
|
|
886
|
-
async function
|
|
885
|
+
async function Wn(n, e) {
|
|
887
886
|
const t = await Tt(n, {}, async () => {
|
|
888
887
|
const i = K({
|
|
889
888
|
grant_type: "refresh_token",
|
|
@@ -904,7 +903,7 @@ async function jn(n, e) {
|
|
|
904
903
|
refreshToken: t.refresh_token
|
|
905
904
|
};
|
|
906
905
|
}
|
|
907
|
-
async function
|
|
906
|
+
async function jn(n, e) {
|
|
908
907
|
return G(n, "POST", "/v2/accounts:revokeToken", he(n, e));
|
|
909
908
|
}
|
|
910
909
|
/**
|
|
@@ -968,7 +967,7 @@ class H {
|
|
|
968
967
|
this.refreshToken = null;
|
|
969
968
|
}
|
|
970
969
|
async refresh(e, t) {
|
|
971
|
-
const { accessToken: i, refreshToken: r, expiresIn: s } = await
|
|
970
|
+
const { accessToken: i, refreshToken: r, expiresIn: s } = await Wn(e, t);
|
|
972
971
|
this.updateTokensAndExpiration(i, r, Number(s));
|
|
973
972
|
}
|
|
974
973
|
updateTokensAndExpiration(e, t, i) {
|
|
@@ -1023,7 +1022,7 @@ function R(n, e) {
|
|
|
1023
1022
|
class E {
|
|
1024
1023
|
constructor(e) {
|
|
1025
1024
|
var { uid: t, auth: i, stsTokenManager: r } = e, s = Pe(e, ["uid", "auth", "stsTokenManager"]);
|
|
1026
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
1025
|
+
this.providerId = "firebase", this.proactiveRefresh = new Vn(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
1026
|
}
|
|
1028
1027
|
async getIdToken(e) {
|
|
1029
1028
|
const t = await q(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -1035,10 +1034,10 @@ class E {
|
|
|
1035
1034
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
1036
1035
|
}
|
|
1037
1036
|
getIdTokenResult(e) {
|
|
1038
|
-
return
|
|
1037
|
+
return Fn(this, e);
|
|
1039
1038
|
}
|
|
1040
1039
|
reload() {
|
|
1041
|
-
return
|
|
1040
|
+
return Hn(this);
|
|
1042
1041
|
}
|
|
1043
1042
|
_assign(e) {
|
|
1044
1043
|
this !== e && (u(
|
|
@@ -1077,7 +1076,7 @@ class E {
|
|
|
1077
1076
|
if (w(this.auth.app))
|
|
1078
1077
|
return Promise.reject(L(this.auth));
|
|
1079
1078
|
const e = await this.getIdToken();
|
|
1080
|
-
return await q(this,
|
|
1079
|
+
return await q(this, Dn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
1081
1080
|
}
|
|
1082
1081
|
toJSON() {
|
|
1083
1082
|
return Object.assign(Object.assign({
|
|
@@ -1407,17 +1406,17 @@ function Ot(n = g()) {
|
|
|
1407
1406
|
function fe(n = g()) {
|
|
1408
1407
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
1409
1408
|
}
|
|
1410
|
-
function
|
|
1409
|
+
function Gn(n = g()) {
|
|
1411
1410
|
var e;
|
|
1412
1411
|
return fe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
1413
1412
|
}
|
|
1414
|
-
function
|
|
1415
|
-
return
|
|
1413
|
+
function Bn() {
|
|
1414
|
+
return Tn() && document.documentMode === 10;
|
|
1416
1415
|
}
|
|
1417
1416
|
function Nt(n = g()) {
|
|
1418
1417
|
return fe(n) || At(n) || Ot(n) || Ct(n) || /windows phone/i.test(n) || Pt(n);
|
|
1419
1418
|
}
|
|
1420
|
-
function
|
|
1419
|
+
function qn() {
|
|
1421
1420
|
try {
|
|
1422
1421
|
return !!(window && window !== window.top);
|
|
1423
1422
|
} catch {
|
|
@@ -1471,7 +1470,7 @@ function Lt(n, e = []) {
|
|
|
1471
1470
|
* See the License for the specific language governing permissions and
|
|
1472
1471
|
* limitations under the License.
|
|
1473
1472
|
*/
|
|
1474
|
-
class
|
|
1473
|
+
class zn {
|
|
1475
1474
|
constructor(e) {
|
|
1476
1475
|
this.auth = e, this.queue = [];
|
|
1477
1476
|
}
|
|
@@ -1526,7 +1525,7 @@ class Kn {
|
|
|
1526
1525
|
* See the License for the specific language governing permissions and
|
|
1527
1526
|
* limitations under the License.
|
|
1528
1527
|
*/
|
|
1529
|
-
async function
|
|
1528
|
+
async function Kn(n, e = {}) {
|
|
1530
1529
|
return G(n, "GET", "/v2/passwordPolicy", he(n, e));
|
|
1531
1530
|
}
|
|
1532
1531
|
/**
|
|
@@ -1545,12 +1544,12 @@ async function Jn(n, e = {}) {
|
|
|
1545
1544
|
* See the License for the specific language governing permissions and
|
|
1546
1545
|
* limitations under the License.
|
|
1547
1546
|
*/
|
|
1548
|
-
const
|
|
1549
|
-
class
|
|
1547
|
+
const Jn = 6;
|
|
1548
|
+
class Yn {
|
|
1550
1549
|
constructor(e) {
|
|
1551
1550
|
var t, i, r, s;
|
|
1552
1551
|
const o = e.customStrengthOptions;
|
|
1553
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t :
|
|
1552
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : Jn, 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
1553
|
}
|
|
1555
1554
|
validatePassword(e) {
|
|
1556
1555
|
var t, i, r, s, o, c;
|
|
@@ -1633,9 +1632,9 @@ class Xn {
|
|
|
1633
1632
|
* See the License for the specific language governing permissions and
|
|
1634
1633
|
* limitations under the License.
|
|
1635
1634
|
*/
|
|
1636
|
-
class
|
|
1635
|
+
class Xn {
|
|
1637
1636
|
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 Xe(this), this.idTokenSubscription = new Xe(this), this.beforeStateQueue = new
|
|
1637
|
+
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new Xe(this), this.idTokenSubscription = new Xe(this), this.beforeStateQueue = new zn(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = _t, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = r.sdkClientVersion;
|
|
1639
1638
|
}
|
|
1640
1639
|
_initializeWithPersistence(e, t) {
|
|
1641
1640
|
return t && (this._popupRedirectResolver = k(t)), this._initializationPromise = this.queue(async () => {
|
|
@@ -1729,7 +1728,7 @@ class Qn {
|
|
|
1729
1728
|
return this.directlySetCurrentUser(e);
|
|
1730
1729
|
}
|
|
1731
1730
|
useDeviceLanguage() {
|
|
1732
|
-
this.languageCode =
|
|
1731
|
+
this.languageCode = Nn();
|
|
1733
1732
|
}
|
|
1734
1733
|
async _delete() {
|
|
1735
1734
|
this._deleted = !0;
|
|
@@ -1780,7 +1779,7 @@ class Qn {
|
|
|
1780
1779
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
1781
1780
|
}
|
|
1782
1781
|
async _updatePasswordPolicy() {
|
|
1783
|
-
const e = await
|
|
1782
|
+
const e = await Kn(this), t = new Yn(e);
|
|
1784
1783
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
1785
1784
|
}
|
|
1786
1785
|
_getPersistence() {
|
|
@@ -1820,7 +1819,7 @@ class Qn {
|
|
|
1820
1819
|
token: e,
|
|
1821
1820
|
idToken: t
|
|
1822
1821
|
};
|
|
1823
|
-
this.tenantId != null && (i.tenantId = this.tenantId), await
|
|
1822
|
+
this.tenantId != null && (i.tenantId = this.tenantId), await jn(this, i);
|
|
1824
1823
|
}
|
|
1825
1824
|
}
|
|
1826
1825
|
toJSON() {
|
|
@@ -1963,7 +1962,7 @@ class Qn {
|
|
|
1963
1962
|
async _getAppCheckToken() {
|
|
1964
1963
|
var e;
|
|
1965
1964
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
|
1966
|
-
return t != null && t.error &&
|
|
1965
|
+
return t != null && t.error && An(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
|
1967
1966
|
}
|
|
1968
1967
|
}
|
|
1969
1968
|
function pe(n) {
|
|
@@ -1971,7 +1970,7 @@ function pe(n) {
|
|
|
1971
1970
|
}
|
|
1972
1971
|
class Xe {
|
|
1973
1972
|
constructor(e) {
|
|
1974
|
-
this.auth = e, this.observer = null, this.addObserver =
|
|
1973
|
+
this.auth = e, this.observer = null, this.addObserver = mn((t) => this.observer = t);
|
|
1975
1974
|
}
|
|
1976
1975
|
get next() {
|
|
1977
1976
|
return u(
|
|
@@ -2006,16 +2005,16 @@ let Le = {
|
|
|
2006
2005
|
recaptchaEnterpriseScript: "",
|
|
2007
2006
|
gapiScript: ""
|
|
2008
2007
|
};
|
|
2009
|
-
function
|
|
2008
|
+
function Qn(n) {
|
|
2010
2009
|
Le = n;
|
|
2011
2010
|
}
|
|
2012
|
-
function
|
|
2011
|
+
function Zn(n) {
|
|
2013
2012
|
return Le.loadJS(n);
|
|
2014
2013
|
}
|
|
2015
|
-
function
|
|
2014
|
+
function ei() {
|
|
2016
2015
|
return Le.gapiScript;
|
|
2017
2016
|
}
|
|
2018
|
-
function
|
|
2017
|
+
function ti(n) {
|
|
2019
2018
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
2020
2019
|
}
|
|
2021
2020
|
/**
|
|
@@ -2034,11 +2033,11 @@ function ni(n) {
|
|
|
2034
2033
|
* See the License for the specific language governing permissions and
|
|
2035
2034
|
* limitations under the License.
|
|
2036
2035
|
*/
|
|
2037
|
-
function
|
|
2036
|
+
function ni(n, e) {
|
|
2038
2037
|
const t = pt(n, "auth");
|
|
2039
2038
|
if (t.isInitialized()) {
|
|
2040
2039
|
const r = t.getImmediate(), s = t.getOptions();
|
|
2041
|
-
if (
|
|
2040
|
+
if (vn(s, e ?? {}))
|
|
2042
2041
|
return r;
|
|
2043
2042
|
S(
|
|
2044
2043
|
r,
|
|
@@ -2048,11 +2047,11 @@ function ii(n, e) {
|
|
|
2048
2047
|
}
|
|
2049
2048
|
return t.initialize({ options: e });
|
|
2050
2049
|
}
|
|
2051
|
-
function
|
|
2050
|
+
function ii(n, e) {
|
|
2052
2051
|
const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(k);
|
|
2053
2052
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
|
|
2054
2053
|
}
|
|
2055
|
-
function
|
|
2054
|
+
function ri(n, e, t) {
|
|
2056
2055
|
const i = pe(n);
|
|
2057
2056
|
u(
|
|
2058
2057
|
i._canInitEmulator,
|
|
@@ -2065,19 +2064,19 @@ function si(n, e, t) {
|
|
|
2065
2064
|
"invalid-emulator-scheme"
|
|
2066
2065
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
2067
2066
|
);
|
|
2068
|
-
const r = !1, s = Mt(e), { host: o, port: c } =
|
|
2067
|
+
const r = !1, s = Mt(e), { host: o, port: c } = si(e), a = c === null ? "" : `:${c}`;
|
|
2069
2068
|
i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
|
|
2070
2069
|
host: o,
|
|
2071
2070
|
port: c,
|
|
2072
2071
|
protocol: s.replace(":", ""),
|
|
2073
2072
|
options: Object.freeze({ disableWarnings: r })
|
|
2074
|
-
}),
|
|
2073
|
+
}), oi();
|
|
2075
2074
|
}
|
|
2076
2075
|
function Mt(n) {
|
|
2077
2076
|
const e = n.indexOf(":");
|
|
2078
2077
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
2079
2078
|
}
|
|
2080
|
-
function
|
|
2079
|
+
function si(n) {
|
|
2081
2080
|
const e = Mt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
2082
2081
|
if (!t)
|
|
2083
2082
|
return { host: "", port: null };
|
|
@@ -2096,7 +2095,7 @@ function Qe(n) {
|
|
|
2096
2095
|
const e = Number(n);
|
|
2097
2096
|
return isNaN(e) ? null : e;
|
|
2098
2097
|
}
|
|
2099
|
-
function
|
|
2098
|
+
function oi() {
|
|
2100
2099
|
function n() {
|
|
2101
2100
|
const e = document.createElement("p"), t = e.style;
|
|
2102
2101
|
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);
|
|
@@ -2180,7 +2179,7 @@ async function W(n, e) {
|
|
|
2180
2179
|
* See the License for the specific language governing permissions and
|
|
2181
2180
|
* limitations under the License.
|
|
2182
2181
|
*/
|
|
2183
|
-
const
|
|
2182
|
+
const ai = "http://localhost";
|
|
2184
2183
|
class U extends Ut {
|
|
2185
2184
|
constructor() {
|
|
2186
2185
|
super(...arguments), this.pendingToken = null;
|
|
@@ -2238,7 +2237,7 @@ class U extends Ut {
|
|
|
2238
2237
|
}
|
|
2239
2238
|
buildRequest() {
|
|
2240
2239
|
const e = {
|
|
2241
|
-
requestUri:
|
|
2240
|
+
requestUri: ai,
|
|
2242
2241
|
returnSecureToken: !0
|
|
2243
2242
|
};
|
|
2244
2243
|
if (this.pendingToken)
|
|
@@ -2700,7 +2699,7 @@ function Ft(n, e, t, i) {
|
|
|
2700
2699
|
throw s.code === "auth/multi-factor-auth-required" ? le._fromErrorAndOperation(n, s, e, i) : s;
|
|
2701
2700
|
});
|
|
2702
2701
|
}
|
|
2703
|
-
async function
|
|
2702
|
+
async function ci(n, e, t = !1) {
|
|
2704
2703
|
const i = await q(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
2705
2704
|
return D._forOperation(n, "link", i);
|
|
2706
2705
|
}
|
|
@@ -2720,7 +2719,7 @@ async function li(n, e, t = !1) {
|
|
|
2720
2719
|
* See the License for the specific language governing permissions and
|
|
2721
2720
|
* limitations under the License.
|
|
2722
2721
|
*/
|
|
2723
|
-
async function
|
|
2722
|
+
async function li(n, e, t = !1) {
|
|
2724
2723
|
const { auth: i } = n;
|
|
2725
2724
|
if (w(i.app))
|
|
2726
2725
|
return Promise.reject(L(i));
|
|
@@ -2771,7 +2770,7 @@ async function ui(n, e, t = !1) {
|
|
|
2771
2770
|
* See the License for the specific language governing permissions and
|
|
2772
2771
|
* limitations under the License.
|
|
2773
2772
|
*/
|
|
2774
|
-
async function
|
|
2773
|
+
async function ui(n, e, t = !1) {
|
|
2775
2774
|
if (w(n.app))
|
|
2776
2775
|
return Promise.reject(L(n));
|
|
2777
2776
|
const i = "signIn", r = await Ft(n, i, e), s = await D._fromIdTokenResponse(n, i, r);
|
|
@@ -2793,7 +2792,7 @@ async function di(n, e, t = !1) {
|
|
|
2793
2792
|
* See the License for the specific language governing permissions and
|
|
2794
2793
|
* limitations under the License.
|
|
2795
2794
|
*/
|
|
2796
|
-
async function
|
|
2795
|
+
async function di(n, e) {
|
|
2797
2796
|
return wt(n, "POST", "/v1/accounts:signInWithCustomToken", he(n, e));
|
|
2798
2797
|
}
|
|
2799
2798
|
/**
|
|
@@ -2812,19 +2811,19 @@ async function hi(n, e) {
|
|
|
2812
2811
|
* See the License for the specific language governing permissions and
|
|
2813
2812
|
* limitations under the License.
|
|
2814
2813
|
*/
|
|
2815
|
-
async function
|
|
2814
|
+
async function hi(n, e) {
|
|
2816
2815
|
if (w(n.app))
|
|
2817
2816
|
return Promise.reject(L(n));
|
|
2818
|
-
const t = pe(n), i = await
|
|
2817
|
+
const t = pe(n), i = await di(t, {
|
|
2819
2818
|
token: e,
|
|
2820
2819
|
returnSecureToken: !0
|
|
2821
2820
|
}), r = await D._fromIdTokenResponse(t, "signIn", i);
|
|
2822
2821
|
return await t._updateCurrentUser(r.user), r;
|
|
2823
2822
|
}
|
|
2824
|
-
function
|
|
2823
|
+
function fi(n, e, t, i) {
|
|
2825
2824
|
return j(n).onIdTokenChanged(e, t, i);
|
|
2826
2825
|
}
|
|
2827
|
-
function
|
|
2826
|
+
function pi(n, e, t) {
|
|
2828
2827
|
return j(n).beforeAuthStateChanged(e, t);
|
|
2829
2828
|
}
|
|
2830
2829
|
const ue = "__sak";
|
|
@@ -2885,18 +2884,18 @@ class xt {
|
|
|
2885
2884
|
* See the License for the specific language governing permissions and
|
|
2886
2885
|
* limitations under the License.
|
|
2887
2886
|
*/
|
|
2888
|
-
function
|
|
2887
|
+
function mi() {
|
|
2889
2888
|
const n = g();
|
|
2890
2889
|
return Ne(n) || fe(n);
|
|
2891
2890
|
}
|
|
2892
|
-
const
|
|
2891
|
+
const gi = 1e3, _i = 10;
|
|
2893
2892
|
class Vt extends xt {
|
|
2894
2893
|
constructor() {
|
|
2895
2894
|
super(
|
|
2896
2895
|
() => window.localStorage,
|
|
2897
2896
|
"LOCAL"
|
|
2898
2897
|
/* PersistenceType.LOCAL */
|
|
2899
|
-
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced =
|
|
2898
|
+
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = mi() && qn(), this.fallbackToPolling = Nt(), this._shouldAllowMigration = !0;
|
|
2900
2899
|
}
|
|
2901
2900
|
forAllChangedKeys(e) {
|
|
2902
2901
|
for (const t of Object.keys(this.listeners)) {
|
|
@@ -2923,7 +2922,7 @@ class Vt extends xt {
|
|
|
2923
2922
|
const o = this.storage.getItem(i);
|
|
2924
2923
|
!t && this.localCache[i] === o || this.notifyListeners(i, o);
|
|
2925
2924
|
}, s = this.storage.getItem(i);
|
|
2926
|
-
|
|
2925
|
+
Bn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, _i) : r();
|
|
2927
2926
|
}
|
|
2928
2927
|
notifyListeners(e, t) {
|
|
2929
2928
|
this.localCache[e] = t;
|
|
@@ -2945,7 +2944,7 @@ class Vt extends xt {
|
|
|
2945
2944
|
!0
|
|
2946
2945
|
);
|
|
2947
2946
|
});
|
|
2948
|
-
},
|
|
2947
|
+
}, gi);
|
|
2949
2948
|
}
|
|
2950
2949
|
stopPolling() {
|
|
2951
2950
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -2975,7 +2974,7 @@ class Vt extends xt {
|
|
|
2975
2974
|
}
|
|
2976
2975
|
}
|
|
2977
2976
|
Vt.type = "LOCAL";
|
|
2978
|
-
const
|
|
2977
|
+
const vi = Vt;
|
|
2979
2978
|
/**
|
|
2980
2979
|
* @license
|
|
2981
2980
|
* Copyright 2020 Google LLC
|
|
@@ -3023,7 +3022,7 @@ const $t = Ht;
|
|
|
3023
3022
|
* See the License for the specific language governing permissions and
|
|
3024
3023
|
* limitations under the License.
|
|
3025
3024
|
*/
|
|
3026
|
-
function
|
|
3025
|
+
function Ii(n) {
|
|
3027
3026
|
return Promise.all(n.map(async (e) => {
|
|
3028
3027
|
try {
|
|
3029
3028
|
return {
|
|
@@ -3093,7 +3092,7 @@ class me {
|
|
|
3093
3092
|
eventId: i,
|
|
3094
3093
|
eventType: r
|
|
3095
3094
|
});
|
|
3096
|
-
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await
|
|
3095
|
+
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Ii(c);
|
|
3097
3096
|
t.ports[0].postMessage({
|
|
3098
3097
|
status: "done",
|
|
3099
3098
|
eventId: i,
|
|
@@ -3161,7 +3160,7 @@ function Me(n = "", e = 10) {
|
|
|
3161
3160
|
* See the License for the specific language governing permissions and
|
|
3162
3161
|
* limitations under the License.
|
|
3163
3162
|
*/
|
|
3164
|
-
class
|
|
3163
|
+
class Ti {
|
|
3165
3164
|
constructor(e) {
|
|
3166
3165
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
|
3167
3166
|
}
|
|
@@ -3261,7 +3260,7 @@ class wi {
|
|
|
3261
3260
|
function T() {
|
|
3262
3261
|
return window;
|
|
3263
3262
|
}
|
|
3264
|
-
function
|
|
3263
|
+
function wi(n) {
|
|
3265
3264
|
T().location.href = n;
|
|
3266
3265
|
}
|
|
3267
3266
|
/**
|
|
@@ -3283,7 +3282,7 @@ function yi(n) {
|
|
|
3283
3282
|
function Wt() {
|
|
3284
3283
|
return typeof T().WorkerGlobalScope < "u" && typeof T().importScripts == "function";
|
|
3285
3284
|
}
|
|
3286
|
-
async function
|
|
3285
|
+
async function yi() {
|
|
3287
3286
|
if (!(navigator != null && navigator.serviceWorker))
|
|
3288
3287
|
return null;
|
|
3289
3288
|
try {
|
|
@@ -3292,11 +3291,11 @@ async function Ei() {
|
|
|
3292
3291
|
return null;
|
|
3293
3292
|
}
|
|
3294
3293
|
}
|
|
3295
|
-
function
|
|
3294
|
+
function Ei() {
|
|
3296
3295
|
var n;
|
|
3297
3296
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
3298
3297
|
}
|
|
3299
|
-
function
|
|
3298
|
+
function ki() {
|
|
3300
3299
|
return Wt() ? self : null;
|
|
3301
3300
|
}
|
|
3302
3301
|
/**
|
|
@@ -3315,7 +3314,7 @@ function Si() {
|
|
|
3315
3314
|
* See the License for the specific language governing permissions and
|
|
3316
3315
|
* limitations under the License.
|
|
3317
3316
|
*/
|
|
3318
|
-
const jt = "firebaseLocalStorageDb",
|
|
3317
|
+
const jt = "firebaseLocalStorageDb", Si = 1, de = "firebaseLocalStorage", Gt = "fbase_key";
|
|
3319
3318
|
class X {
|
|
3320
3319
|
constructor(e) {
|
|
3321
3320
|
this.request = e;
|
|
@@ -3333,12 +3332,12 @@ class X {
|
|
|
3333
3332
|
function ge(n, e) {
|
|
3334
3333
|
return n.transaction([de], e ? "readwrite" : "readonly").objectStore(de);
|
|
3335
3334
|
}
|
|
3336
|
-
function
|
|
3335
|
+
function bi() {
|
|
3337
3336
|
const n = indexedDB.deleteDatabase(jt);
|
|
3338
3337
|
return new X(n).toPromise();
|
|
3339
3338
|
}
|
|
3340
3339
|
function Se() {
|
|
3341
|
-
const n = indexedDB.open(jt,
|
|
3340
|
+
const n = indexedDB.open(jt, Si);
|
|
3342
3341
|
return new Promise((e, t) => {
|
|
3343
3342
|
n.addEventListener("error", () => {
|
|
3344
3343
|
t(n.error);
|
|
@@ -3351,7 +3350,7 @@ function Se() {
|
|
|
3351
3350
|
}
|
|
3352
3351
|
}), n.addEventListener("success", async () => {
|
|
3353
3352
|
const i = n.result;
|
|
3354
|
-
i.objectStoreNames.contains(de) ? e(i) : (i.close(), await
|
|
3353
|
+
i.objectStoreNames.contains(de) ? e(i) : (i.close(), await bi(), e(await Se()));
|
|
3355
3354
|
});
|
|
3356
3355
|
});
|
|
3357
3356
|
}
|
|
@@ -3362,7 +3361,7 @@ async function et(n, e, t) {
|
|
|
3362
3361
|
});
|
|
3363
3362
|
return new X(i).toPromise();
|
|
3364
3363
|
}
|
|
3365
|
-
async function
|
|
3364
|
+
async function Ri(n, e) {
|
|
3366
3365
|
const t = ge(n, !1).get(e), i = await new X(t).toPromise();
|
|
3367
3366
|
return i === void 0 ? null : i.value;
|
|
3368
3367
|
}
|
|
@@ -3370,7 +3369,7 @@ function tt(n, e) {
|
|
|
3370
3369
|
const t = ge(n, !0).delete(e);
|
|
3371
3370
|
return new X(t).toPromise();
|
|
3372
3371
|
}
|
|
3373
|
-
const
|
|
3372
|
+
const Pi = 800, Ai = 3;
|
|
3374
3373
|
class Bt {
|
|
3375
3374
|
constructor() {
|
|
3376
3375
|
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(() => {
|
|
@@ -3387,7 +3386,7 @@ class Bt {
|
|
|
3387
3386
|
const i = await this._openDb();
|
|
3388
3387
|
return await e(i);
|
|
3389
3388
|
} catch (i) {
|
|
3390
|
-
if (t++ >
|
|
3389
|
+
if (t++ > Ai)
|
|
3391
3390
|
throw i;
|
|
3392
3391
|
this.db && (this.db.close(), this.db = void 0);
|
|
3393
3392
|
}
|
|
@@ -3403,7 +3402,7 @@ class Bt {
|
|
|
3403
3402
|
* As the worker we should listen to events from the main window.
|
|
3404
3403
|
*/
|
|
3405
3404
|
async initializeReceiver() {
|
|
3406
|
-
this.receiver = me._getInstance(
|
|
3405
|
+
this.receiver = me._getInstance(ki()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
3407
3406
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
3408
3407
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
3409
3408
|
"keyChanged"
|
|
@@ -3419,9 +3418,9 @@ class Bt {
|
|
|
3419
3418
|
*/
|
|
3420
3419
|
async initializeSender() {
|
|
3421
3420
|
var e, t;
|
|
3422
|
-
if (this.activeServiceWorker = await
|
|
3421
|
+
if (this.activeServiceWorker = await yi(), !this.activeServiceWorker)
|
|
3423
3422
|
return;
|
|
3424
|
-
this.sender = new
|
|
3423
|
+
this.sender = new Ti(this.activeServiceWorker);
|
|
3425
3424
|
const i = await this.sender._send(
|
|
3426
3425
|
"ping",
|
|
3427
3426
|
{},
|
|
@@ -3443,7 +3442,7 @@ class Bt {
|
|
|
3443
3442
|
* @param key - Storage key which changed.
|
|
3444
3443
|
*/
|
|
3445
3444
|
async notifyServiceWorker(e) {
|
|
3446
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
3445
|
+
if (!(!this.sender || !this.activeServiceWorker || Ei() !== this.activeServiceWorker))
|
|
3447
3446
|
try {
|
|
3448
3447
|
await this.sender._send(
|
|
3449
3448
|
"keyChanged",
|
|
@@ -3477,7 +3476,7 @@ class Bt {
|
|
|
3477
3476
|
return this._withPendingWrite(async () => (await this._withRetries((i) => et(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
3478
3477
|
}
|
|
3479
3478
|
async _get(e) {
|
|
3480
|
-
const t = await this._withRetries((i) =>
|
|
3479
|
+
const t = await this._withRetries((i) => Ri(i, e));
|
|
3481
3480
|
return this.localCache[e] = t, t;
|
|
3482
3481
|
}
|
|
3483
3482
|
async _remove(e) {
|
|
@@ -3508,7 +3507,7 @@ class Bt {
|
|
|
3508
3507
|
r(t);
|
|
3509
3508
|
}
|
|
3510
3509
|
startPolling() {
|
|
3511
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
3510
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Pi);
|
|
3512
3511
|
}
|
|
3513
3512
|
stopPolling() {
|
|
3514
3513
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -3521,7 +3520,7 @@ class Bt {
|
|
|
3521
3520
|
}
|
|
3522
3521
|
}
|
|
3523
3522
|
Bt.type = "LOCAL";
|
|
3524
|
-
const
|
|
3523
|
+
const Ci = Bt;
|
|
3525
3524
|
new J(3e4, 6e4);
|
|
3526
3525
|
/**
|
|
3527
3526
|
* @license
|
|
@@ -3539,7 +3538,7 @@ new J(3e4, 6e4);
|
|
|
3539
3538
|
* See the License for the specific language governing permissions and
|
|
3540
3539
|
* limitations under the License.
|
|
3541
3540
|
*/
|
|
3542
|
-
function
|
|
3541
|
+
function Oi(n, e) {
|
|
3543
3542
|
return e ? k(e) : (u(
|
|
3544
3543
|
n._popupRedirectResolver,
|
|
3545
3544
|
n,
|
|
@@ -3593,26 +3592,26 @@ class Ue extends Ut {
|
|
|
3593
3592
|
return e && (t.idToken = e), t;
|
|
3594
3593
|
}
|
|
3595
3594
|
}
|
|
3596
|
-
function
|
|
3597
|
-
return
|
|
3595
|
+
function Ni(n) {
|
|
3596
|
+
return ui(n.auth, new Ue(n), n.bypassAuthState);
|
|
3598
3597
|
}
|
|
3599
|
-
function
|
|
3598
|
+
function Li(n) {
|
|
3600
3599
|
const { auth: e, user: t } = n;
|
|
3601
3600
|
return u(
|
|
3602
3601
|
t,
|
|
3603
3602
|
e,
|
|
3604
3603
|
"internal-error"
|
|
3605
3604
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3606
|
-
),
|
|
3605
|
+
), li(t, new Ue(n), n.bypassAuthState);
|
|
3607
3606
|
}
|
|
3608
|
-
async function
|
|
3607
|
+
async function Mi(n) {
|
|
3609
3608
|
const { auth: e, user: t } = n;
|
|
3610
3609
|
return u(
|
|
3611
3610
|
t,
|
|
3612
3611
|
e,
|
|
3613
3612
|
"internal-error"
|
|
3614
3613
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3615
|
-
),
|
|
3614
|
+
), ci(t, new Ue(n), n.bypassAuthState);
|
|
3616
3615
|
}
|
|
3617
3616
|
/**
|
|
3618
3617
|
* @license
|
|
@@ -3672,13 +3671,13 @@ class qt {
|
|
|
3672
3671
|
switch (e) {
|
|
3673
3672
|
case "signInViaPopup":
|
|
3674
3673
|
case "signInViaRedirect":
|
|
3675
|
-
return
|
|
3674
|
+
return Ni;
|
|
3676
3675
|
case "linkViaPopup":
|
|
3677
3676
|
case "linkViaRedirect":
|
|
3678
|
-
return
|
|
3677
|
+
return Mi;
|
|
3679
3678
|
case "reauthViaPopup":
|
|
3680
3679
|
case "reauthViaRedirect":
|
|
3681
|
-
return
|
|
3680
|
+
return Li;
|
|
3682
3681
|
default:
|
|
3683
3682
|
S(
|
|
3684
3683
|
this.auth,
|
|
@@ -3713,7 +3712,7 @@ class qt {
|
|
|
3713
3712
|
* See the License for the specific language governing permissions and
|
|
3714
3713
|
* limitations under the License.
|
|
3715
3714
|
*/
|
|
3716
|
-
const
|
|
3715
|
+
const Ui = new J(2e3, 1e4);
|
|
3717
3716
|
class V extends qt {
|
|
3718
3717
|
constructor(e, t, i, r, s) {
|
|
3719
3718
|
super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
|
|
@@ -3777,7 +3776,7 @@ class V extends qt {
|
|
|
3777
3776
|
);
|
|
3778
3777
|
return;
|
|
3779
3778
|
}
|
|
3780
|
-
this.pollId = window.setTimeout(e,
|
|
3779
|
+
this.pollId = window.setTimeout(e, Ui.get());
|
|
3781
3780
|
};
|
|
3782
3781
|
e();
|
|
3783
3782
|
}
|
|
@@ -3799,8 +3798,8 @@ V.currentPopupAction = null;
|
|
|
3799
3798
|
* See the License for the specific language governing permissions and
|
|
3800
3799
|
* limitations under the License.
|
|
3801
3800
|
*/
|
|
3802
|
-
const
|
|
3803
|
-
class
|
|
3801
|
+
const Di = "pendingRedirect", se = /* @__PURE__ */ new Map();
|
|
3802
|
+
class Fi extends qt {
|
|
3804
3803
|
constructor(e, t, i = !1) {
|
|
3805
3804
|
super(e, [
|
|
3806
3805
|
"signInViaRedirect",
|
|
@@ -3818,7 +3817,7 @@ class xi extends qt {
|
|
|
3818
3817
|
let e = se.get(this.auth._key());
|
|
3819
3818
|
if (!e) {
|
|
3820
3819
|
try {
|
|
3821
|
-
const i = await
|
|
3820
|
+
const i = await xi(this.resolver, this.auth) ? await super.execute() : null;
|
|
3822
3821
|
e = () => Promise.resolve(i);
|
|
3823
3822
|
} catch (t) {
|
|
3824
3823
|
e = () => Promise.reject(t);
|
|
@@ -3846,26 +3845,26 @@ class xi extends qt {
|
|
|
3846
3845
|
cleanUp() {
|
|
3847
3846
|
}
|
|
3848
3847
|
}
|
|
3849
|
-
async function
|
|
3850
|
-
const t =
|
|
3848
|
+
async function xi(n, e) {
|
|
3849
|
+
const t = $i(e), i = Hi(n);
|
|
3851
3850
|
if (!await i._isAvailable())
|
|
3852
3851
|
return !1;
|
|
3853
3852
|
const r = await i._get(t) === "true";
|
|
3854
3853
|
return await i._remove(t), r;
|
|
3855
3854
|
}
|
|
3856
|
-
function
|
|
3855
|
+
function Vi(n, e) {
|
|
3857
3856
|
se.set(n._key(), e);
|
|
3858
3857
|
}
|
|
3859
|
-
function
|
|
3858
|
+
function Hi(n) {
|
|
3860
3859
|
return k(n._redirectPersistence);
|
|
3861
3860
|
}
|
|
3862
|
-
function
|
|
3863
|
-
return re(
|
|
3861
|
+
function $i(n) {
|
|
3862
|
+
return re(Di, n.config.apiKey, n.name);
|
|
3864
3863
|
}
|
|
3865
|
-
async function
|
|
3864
|
+
async function Wi(n, e, t = !1) {
|
|
3866
3865
|
if (w(n.app))
|
|
3867
3866
|
return Promise.reject(L(n));
|
|
3868
|
-
const i = pe(n), r =
|
|
3867
|
+
const i = pe(n), r = Oi(i, e), o = await new Fi(i, r, t).execute();
|
|
3869
3868
|
return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
|
|
3870
3869
|
}
|
|
3871
3870
|
/**
|
|
@@ -3884,8 +3883,8 @@ async function ji(n, e, t = !1) {
|
|
|
3884
3883
|
* See the License for the specific language governing permissions and
|
|
3885
3884
|
* limitations under the License.
|
|
3886
3885
|
*/
|
|
3887
|
-
const
|
|
3888
|
-
class
|
|
3886
|
+
const ji = 10 * 60 * 1e3;
|
|
3887
|
+
class Gi {
|
|
3889
3888
|
constructor(e) {
|
|
3890
3889
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
3891
3890
|
}
|
|
@@ -3901,7 +3900,7 @@ class Bi {
|
|
|
3901
3900
|
let t = !1;
|
|
3902
3901
|
return this.consumers.forEach((i) => {
|
|
3903
3902
|
this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
|
|
3904
|
-
}), this.hasHandledPotentialRedirect || !
|
|
3903
|
+
}), this.hasHandledPotentialRedirect || !Bi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
3905
3904
|
}
|
|
3906
3905
|
sendToConsumer(e, t) {
|
|
3907
3906
|
var i;
|
|
@@ -3916,7 +3915,7 @@ class Bi {
|
|
|
3916
3915
|
return t.filter.includes(e.type) && i;
|
|
3917
3916
|
}
|
|
3918
3917
|
hasEventBeenHandled(e) {
|
|
3919
|
-
return Date.now() - this.lastProcessedEventTime >=
|
|
3918
|
+
return Date.now() - this.lastProcessedEventTime >= ji && this.cachedEventUids.clear(), this.cachedEventUids.has(nt(e));
|
|
3920
3919
|
}
|
|
3921
3920
|
saveEventToCache(e) {
|
|
3922
3921
|
this.cachedEventUids.add(nt(e)), this.lastProcessedEventTime = Date.now();
|
|
@@ -3928,7 +3927,7 @@ function nt(n) {
|
|
|
3928
3927
|
function zt({ type: n, error: e }) {
|
|
3929
3928
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
3930
3929
|
}
|
|
3931
|
-
function
|
|
3930
|
+
function Bi(n) {
|
|
3932
3931
|
switch (n.type) {
|
|
3933
3932
|
case "signInViaRedirect":
|
|
3934
3933
|
case "linkViaRedirect":
|
|
@@ -3956,7 +3955,7 @@ function qi(n) {
|
|
|
3956
3955
|
* See the License for the specific language governing permissions and
|
|
3957
3956
|
* limitations under the License.
|
|
3958
3957
|
*/
|
|
3959
|
-
async function
|
|
3958
|
+
async function qi(n, e = {}) {
|
|
3960
3959
|
return G(n, "GET", "/v1/projects", e);
|
|
3961
3960
|
}
|
|
3962
3961
|
/**
|
|
@@ -3975,14 +3974,14 @@ async function zi(n, e = {}) {
|
|
|
3975
3974
|
* See the License for the specific language governing permissions and
|
|
3976
3975
|
* limitations under the License.
|
|
3977
3976
|
*/
|
|
3978
|
-
const
|
|
3979
|
-
async function
|
|
3977
|
+
const zi = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Ki = /^https?/;
|
|
3978
|
+
async function Ji(n) {
|
|
3980
3979
|
if (n.config.emulator)
|
|
3981
3980
|
return;
|
|
3982
|
-
const { authorizedDomains: e } = await
|
|
3981
|
+
const { authorizedDomains: e } = await qi(n);
|
|
3983
3982
|
for (const t of e)
|
|
3984
3983
|
try {
|
|
3985
|
-
if (
|
|
3984
|
+
if (Yi(t))
|
|
3986
3985
|
return;
|
|
3987
3986
|
} catch {
|
|
3988
3987
|
}
|
|
@@ -3992,15 +3991,15 @@ async function Yi(n) {
|
|
|
3992
3991
|
/* AuthErrorCode.INVALID_ORIGIN */
|
|
3993
3992
|
);
|
|
3994
3993
|
}
|
|
3995
|
-
function
|
|
3994
|
+
function Yi(n) {
|
|
3996
3995
|
const e = Ee(), { protocol: t, hostname: i } = new URL(e);
|
|
3997
3996
|
if (n.startsWith("chrome-extension://")) {
|
|
3998
3997
|
const o = new URL(n);
|
|
3999
3998
|
return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
|
|
4000
3999
|
}
|
|
4001
|
-
if (!
|
|
4000
|
+
if (!Ki.test(t))
|
|
4002
4001
|
return !1;
|
|
4003
|
-
if (
|
|
4002
|
+
if (zi.test(n))
|
|
4004
4003
|
return i === n;
|
|
4005
4004
|
const r = n.replace(/\./g, "\\.");
|
|
4006
4005
|
return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
|
|
@@ -4021,7 +4020,7 @@ function Xi(n) {
|
|
|
4021
4020
|
* See the License for the specific language governing permissions and
|
|
4022
4021
|
* limitations under the License.
|
|
4023
4022
|
*/
|
|
4024
|
-
const
|
|
4023
|
+
const Xi = new J(3e4, 6e4);
|
|
4025
4024
|
function it() {
|
|
4026
4025
|
const n = T().___jsl;
|
|
4027
4026
|
if (n != null && n.H) {
|
|
@@ -4031,7 +4030,7 @@ function it() {
|
|
|
4031
4030
|
n.CP[t] = null;
|
|
4032
4031
|
}
|
|
4033
4032
|
}
|
|
4034
|
-
function
|
|
4033
|
+
function Qi(n) {
|
|
4035
4034
|
return new Promise((e, t) => {
|
|
4036
4035
|
var i, r, s;
|
|
4037
4036
|
function o() {
|
|
@@ -4046,7 +4045,7 @@ function Zi(n) {
|
|
|
4046
4045
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4047
4046
|
));
|
|
4048
4047
|
},
|
|
4049
|
-
timeout:
|
|
4048
|
+
timeout: Xi.get()
|
|
4050
4049
|
});
|
|
4051
4050
|
}
|
|
4052
4051
|
if (!((r = (i = T().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
|
|
@@ -4054,22 +4053,22 @@ function Zi(n) {
|
|
|
4054
4053
|
else if (!((s = T().gapi) === null || s === void 0) && s.load)
|
|
4055
4054
|
o();
|
|
4056
4055
|
else {
|
|
4057
|
-
const c =
|
|
4056
|
+
const c = ti("iframefcb");
|
|
4058
4057
|
return T()[c] = () => {
|
|
4059
4058
|
gapi.load ? o() : t(I(
|
|
4060
4059
|
n,
|
|
4061
4060
|
"network-request-failed"
|
|
4062
4061
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4063
4062
|
));
|
|
4064
|
-
},
|
|
4063
|
+
}, Zn(`${ei()}?onload=${c}`).catch((a) => t(a));
|
|
4065
4064
|
}
|
|
4066
4065
|
}).catch((e) => {
|
|
4067
4066
|
throw oe = null, e;
|
|
4068
4067
|
});
|
|
4069
4068
|
}
|
|
4070
4069
|
let oe = null;
|
|
4071
|
-
function
|
|
4072
|
-
return oe = oe ||
|
|
4070
|
+
function Zi(n) {
|
|
4071
|
+
return oe = oe || Qi(n), oe;
|
|
4073
4072
|
}
|
|
4074
4073
|
/**
|
|
4075
4074
|
* @license
|
|
@@ -4087,7 +4086,7 @@ function er(n) {
|
|
|
4087
4086
|
* See the License for the specific language governing permissions and
|
|
4088
4087
|
* limitations under the License.
|
|
4089
4088
|
*/
|
|
4090
|
-
const
|
|
4089
|
+
const er = new J(5e3, 15e3), tr = "__/auth/iframe", nr = "emulator/auth/iframe", ir = {
|
|
4091
4090
|
style: {
|
|
4092
4091
|
position: "absolute",
|
|
4093
4092
|
top: "-100px",
|
|
@@ -4096,13 +4095,13 @@ const tr = new J(5e3, 15e3), nr = "__/auth/iframe", ir = "emulator/auth/iframe",
|
|
|
4096
4095
|
},
|
|
4097
4096
|
"aria-hidden": "true",
|
|
4098
4097
|
tabindex: "-1"
|
|
4099
|
-
},
|
|
4098
|
+
}, rr = /* @__PURE__ */ new Map([
|
|
4100
4099
|
["identitytoolkit.googleapis.com", "p"],
|
|
4101
4100
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
|
4102
4101
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
|
4103
4102
|
// test
|
|
4104
4103
|
]);
|
|
4105
|
-
function
|
|
4104
|
+
function sr(n) {
|
|
4106
4105
|
const e = n.config;
|
|
4107
4106
|
u(
|
|
4108
4107
|
e.authDomain,
|
|
@@ -4110,17 +4109,17 @@ function or(n) {
|
|
|
4110
4109
|
"auth-domain-config-required"
|
|
4111
4110
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
4112
4111
|
);
|
|
4113
|
-
const t = e.emulator ? Ce(e,
|
|
4112
|
+
const t = e.emulator ? Ce(e, nr) : `https://${n.config.authDomain}/${tr}`, i = {
|
|
4114
4113
|
apiKey: e.apiKey,
|
|
4115
4114
|
appName: n.name,
|
|
4116
4115
|
v: z
|
|
4117
|
-
}, r =
|
|
4116
|
+
}, r = rr.get(n.config.apiHost);
|
|
4118
4117
|
r && (i.eid = r);
|
|
4119
4118
|
const s = n._getFrameworks();
|
|
4120
4119
|
return s.length && (i.fw = s.join(",")), `${t}?${K(i).slice(1)}`;
|
|
4121
4120
|
}
|
|
4122
|
-
async function
|
|
4123
|
-
const e = await
|
|
4121
|
+
async function or(n) {
|
|
4122
|
+
const e = await Zi(n), t = T().gapi;
|
|
4124
4123
|
return u(
|
|
4125
4124
|
t,
|
|
4126
4125
|
n,
|
|
@@ -4128,9 +4127,9 @@ async function ar(n) {
|
|
|
4128
4127
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4129
4128
|
), e.open({
|
|
4130
4129
|
where: document.body,
|
|
4131
|
-
url:
|
|
4130
|
+
url: sr(n),
|
|
4132
4131
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
|
4133
|
-
attributes:
|
|
4132
|
+
attributes: ir,
|
|
4134
4133
|
dontclear: !0
|
|
4135
4134
|
}, (i) => new Promise(async (r, s) => {
|
|
4136
4135
|
await i.restyle({
|
|
@@ -4143,7 +4142,7 @@ async function ar(n) {
|
|
|
4143
4142
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4144
4143
|
), c = T().setTimeout(() => {
|
|
4145
4144
|
s(o);
|
|
4146
|
-
},
|
|
4145
|
+
}, er.get());
|
|
4147
4146
|
function a() {
|
|
4148
4147
|
T().clearTimeout(c), r(i);
|
|
4149
4148
|
}
|
|
@@ -4168,12 +4167,12 @@ async function ar(n) {
|
|
|
4168
4167
|
* See the License for the specific language governing permissions and
|
|
4169
4168
|
* limitations under the License.
|
|
4170
4169
|
*/
|
|
4171
|
-
const
|
|
4170
|
+
const ar = {
|
|
4172
4171
|
location: "yes",
|
|
4173
4172
|
resizable: "yes",
|
|
4174
4173
|
statusbar: "yes",
|
|
4175
4174
|
toolbar: "no"
|
|
4176
|
-
},
|
|
4175
|
+
}, cr = 500, lr = 600, ur = "_blank", dr = "http://localhost";
|
|
4177
4176
|
class rt {
|
|
4178
4177
|
constructor(e) {
|
|
4179
4178
|
this.window = e, this.associatedEvent = null;
|
|
@@ -4186,19 +4185,19 @@ class rt {
|
|
|
4186
4185
|
}
|
|
4187
4186
|
}
|
|
4188
4187
|
}
|
|
4189
|
-
function
|
|
4188
|
+
function hr(n, e, t, i = cr, r = lr) {
|
|
4190
4189
|
const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
|
|
4191
4190
|
let c = "";
|
|
4192
|
-
const a = Object.assign(Object.assign({},
|
|
4191
|
+
const a = Object.assign(Object.assign({}, ar), {
|
|
4193
4192
|
width: i.toString(),
|
|
4194
4193
|
height: r.toString(),
|
|
4195
4194
|
top: s,
|
|
4196
4195
|
left: o
|
|
4197
4196
|
}), l = g().toLowerCase();
|
|
4198
|
-
t && (c = Rt(l) ?
|
|
4197
|
+
t && (c = Rt(l) ? ur : t), bt(l) && (e = e || dr, a.scrollbars = "yes");
|
|
4199
4198
|
const d = Object.entries(a).reduce((_, [F, M]) => `${_}${F}=${M},`, "");
|
|
4200
|
-
if (
|
|
4201
|
-
return
|
|
4199
|
+
if (Gn(l) && c !== "_self")
|
|
4200
|
+
return fr(e || "", c), new rt(null);
|
|
4202
4201
|
const h = window.open(e || "", c, d);
|
|
4203
4202
|
u(
|
|
4204
4203
|
h,
|
|
@@ -4212,7 +4211,7 @@ function fr(n, e, t, i = lr, r = ur) {
|
|
|
4212
4211
|
}
|
|
4213
4212
|
return new rt(h);
|
|
4214
4213
|
}
|
|
4215
|
-
function
|
|
4214
|
+
function fr(n, e) {
|
|
4216
4215
|
const t = document.createElement("a");
|
|
4217
4216
|
t.href = n, t.target = e;
|
|
4218
4217
|
const i = document.createEvent("MouseEvent");
|
|
@@ -4234,7 +4233,7 @@ function pr(n, e) {
|
|
|
4234
4233
|
* See the License for the specific language governing permissions and
|
|
4235
4234
|
* limitations under the License.
|
|
4236
4235
|
*/
|
|
4237
|
-
const
|
|
4236
|
+
const pr = "__/auth/handler", mr = "emulator/auth/handler", gr = encodeURIComponent("fac");
|
|
4238
4237
|
async function st(n, e, t, i, r, s) {
|
|
4239
4238
|
u(
|
|
4240
4239
|
n.config.authDomain,
|
|
@@ -4256,7 +4255,7 @@ async function st(n, e, t, i, r, s) {
|
|
|
4256
4255
|
eventId: r
|
|
4257
4256
|
};
|
|
4258
4257
|
if (e instanceof Dt) {
|
|
4259
|
-
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "",
|
|
4258
|
+
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", wn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
4260
4259
|
for (const [d, h] of Object.entries({}))
|
|
4261
4260
|
o[d] = h;
|
|
4262
4261
|
}
|
|
@@ -4268,11 +4267,11 @@ async function st(n, e, t, i, r, s) {
|
|
|
4268
4267
|
const c = o;
|
|
4269
4268
|
for (const d of Object.keys(c))
|
|
4270
4269
|
c[d] === void 0 && delete c[d];
|
|
4271
|
-
const a = await n._getAppCheckToken(), l = a ? `#${
|
|
4272
|
-
return `${
|
|
4270
|
+
const a = await n._getAppCheckToken(), l = a ? `#${gr}=${encodeURIComponent(a)}` : "";
|
|
4271
|
+
return `${_r(n)}?${K(c).slice(1)}${l}`;
|
|
4273
4272
|
}
|
|
4274
|
-
function
|
|
4275
|
-
return n.emulator ? Ce(n,
|
|
4273
|
+
function _r({ config: n }) {
|
|
4274
|
+
return n.emulator ? Ce(n, mr) : `https://${n.authDomain}/${pr}`;
|
|
4276
4275
|
}
|
|
4277
4276
|
/**
|
|
4278
4277
|
* @license
|
|
@@ -4291,9 +4290,9 @@ function vr({ config: n }) {
|
|
|
4291
4290
|
* limitations under the License.
|
|
4292
4291
|
*/
|
|
4293
4292
|
const we = "webStorageSupport";
|
|
4294
|
-
class
|
|
4293
|
+
class vr {
|
|
4295
4294
|
constructor() {
|
|
4296
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = $t, this._completeRedirectFn =
|
|
4295
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = $t, this._completeRedirectFn = Wi, this._overrideRedirectResult = Vi;
|
|
4297
4296
|
}
|
|
4298
4297
|
// Wrapping in async even though we don't await anywhere in order
|
|
4299
4298
|
// to make sure errors are raised as promise rejections
|
|
@@ -4301,12 +4300,12 @@ class Ir {
|
|
|
4301
4300
|
var s;
|
|
4302
4301
|
b((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4303
4302
|
const o = await st(e, t, i, Ee(), r);
|
|
4304
|
-
return
|
|
4303
|
+
return hr(e, o, Me());
|
|
4305
4304
|
}
|
|
4306
4305
|
async _openRedirect(e, t, i, r) {
|
|
4307
4306
|
await this._originValidation(e);
|
|
4308
4307
|
const s = await st(e, t, i, Ee(), r);
|
|
4309
|
-
return
|
|
4308
|
+
return wi(s), new Promise(() => {
|
|
4310
4309
|
});
|
|
4311
4310
|
}
|
|
4312
4311
|
_initialize(e) {
|
|
@@ -4321,7 +4320,7 @@ class Ir {
|
|
|
4321
4320
|
}), i;
|
|
4322
4321
|
}
|
|
4323
4322
|
async initAndGetManager(e) {
|
|
4324
|
-
const t = await
|
|
4323
|
+
const t = await or(e), i = new Gi(e);
|
|
4325
4324
|
return t.register("authEvent", (r) => (u(
|
|
4326
4325
|
r == null ? void 0 : r.authEvent,
|
|
4327
4326
|
e,
|
|
@@ -4345,13 +4344,13 @@ class Ir {
|
|
|
4345
4344
|
}
|
|
4346
4345
|
_originValidation(e) {
|
|
4347
4346
|
const t = e._key();
|
|
4348
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
|
4347
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Ji(e)), this.originValidationPromises[t];
|
|
4349
4348
|
}
|
|
4350
4349
|
get _shouldInitProactively() {
|
|
4351
4350
|
return Nt() || Ne() || fe();
|
|
4352
4351
|
}
|
|
4353
4352
|
}
|
|
4354
|
-
const
|
|
4353
|
+
const Ir = vr;
|
|
4355
4354
|
var ot = "@firebase/auth", at = "1.7.5";
|
|
4356
4355
|
/**
|
|
4357
4356
|
* @license
|
|
@@ -4369,7 +4368,7 @@ var ot = "@firebase/auth", at = "1.7.5";
|
|
|
4369
4368
|
* See the License for the specific language governing permissions and
|
|
4370
4369
|
* limitations under the License.
|
|
4371
4370
|
*/
|
|
4372
|
-
class
|
|
4371
|
+
class Tr {
|
|
4373
4372
|
constructor(e) {
|
|
4374
4373
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
4375
4374
|
}
|
|
@@ -4420,7 +4419,7 @@ class wr {
|
|
|
4420
4419
|
* See the License for the specific language governing permissions and
|
|
4421
4420
|
* limitations under the License.
|
|
4422
4421
|
*/
|
|
4423
|
-
function
|
|
4422
|
+
function wr(n) {
|
|
4424
4423
|
switch (n) {
|
|
4425
4424
|
case "Node":
|
|
4426
4425
|
return "node";
|
|
@@ -4436,7 +4435,7 @@ function yr(n) {
|
|
|
4436
4435
|
return;
|
|
4437
4436
|
}
|
|
4438
4437
|
}
|
|
4439
|
-
function
|
|
4438
|
+
function yr(n) {
|
|
4440
4439
|
je(new Ge(
|
|
4441
4440
|
"auth",
|
|
4442
4441
|
(e, { options: t }) => {
|
|
@@ -4450,8 +4449,8 @@ function Er(n) {
|
|
|
4450
4449
|
tokenApiHost: "securetoken.googleapis.com",
|
|
4451
4450
|
apiScheme: "https",
|
|
4452
4451
|
sdkClientVersion: Lt(n)
|
|
4453
|
-
}, l = new
|
|
4454
|
-
return
|
|
4452
|
+
}, l = new Xn(i, r, s, a);
|
|
4453
|
+
return ii(l, t), l;
|
|
4455
4454
|
},
|
|
4456
4455
|
"PUBLIC"
|
|
4457
4456
|
/* ComponentType.PUBLIC */
|
|
@@ -4470,14 +4469,14 @@ function Er(n) {
|
|
|
4470
4469
|
"auth"
|
|
4471
4470
|
/* _ComponentName.AUTH */
|
|
4472
4471
|
).getImmediate());
|
|
4473
|
-
return ((i) => new
|
|
4472
|
+
return ((i) => new Tr(i))(t);
|
|
4474
4473
|
},
|
|
4475
4474
|
"PRIVATE"
|
|
4476
4475
|
/* ComponentType.PRIVATE */
|
|
4477
4476
|
).setInstantiationMode(
|
|
4478
4477
|
"EXPLICIT"
|
|
4479
4478
|
/* InstantiationMode.EXPLICIT */
|
|
4480
|
-
)), ye(ot, at,
|
|
4479
|
+
)), ye(ot, at, wr(n)), ye(ot, at, "esm2017");
|
|
4481
4480
|
}
|
|
4482
4481
|
/**
|
|
4483
4482
|
* @license
|
|
@@ -4495,11 +4494,11 @@ function Er(n) {
|
|
|
4495
4494
|
* See the License for the specific language governing permissions and
|
|
4496
4495
|
* limitations under the License.
|
|
4497
4496
|
*/
|
|
4498
|
-
const
|
|
4497
|
+
const Er = 5 * 60, kr = ft("authIdTokenMaxAge") || Er;
|
|
4499
4498
|
let ct = null;
|
|
4500
|
-
const
|
|
4499
|
+
const Sr = (n) => async (e) => {
|
|
4501
4500
|
const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
4502
|
-
if (i && i >
|
|
4501
|
+
if (i && i > kr)
|
|
4503
4502
|
return;
|
|
4504
4503
|
const r = t == null ? void 0 : t.token;
|
|
4505
4504
|
ct !== r && (ct = r, await fetch(n, {
|
|
@@ -4509,33 +4508,33 @@ const br = (n) => async (e) => {
|
|
|
4509
4508
|
} : {}
|
|
4510
4509
|
}));
|
|
4511
4510
|
};
|
|
4512
|
-
function
|
|
4511
|
+
function br(n = _n()) {
|
|
4513
4512
|
const e = pt(n, "auth");
|
|
4514
4513
|
if (e.isInitialized())
|
|
4515
4514
|
return e.getImmediate();
|
|
4516
|
-
const t =
|
|
4517
|
-
popupRedirectResolver:
|
|
4515
|
+
const t = ni(n, {
|
|
4516
|
+
popupRedirectResolver: Ir,
|
|
4518
4517
|
persistence: [
|
|
4519
|
-
|
|
4520
|
-
|
|
4518
|
+
Ci,
|
|
4519
|
+
vi,
|
|
4521
4520
|
$t
|
|
4522
4521
|
]
|
|
4523
4522
|
}), i = ft("authTokenSyncURL");
|
|
4524
4523
|
if (i && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
4525
4524
|
const s = new URL(i, location.origin);
|
|
4526
4525
|
if (location.origin === s.origin) {
|
|
4527
|
-
const o =
|
|
4528
|
-
|
|
4526
|
+
const o = Sr(s.toString());
|
|
4527
|
+
pi(t, o, () => o(t.currentUser)), fi(t, (c) => o(c));
|
|
4529
4528
|
}
|
|
4530
4529
|
}
|
|
4531
|
-
const r =
|
|
4532
|
-
return r &&
|
|
4530
|
+
const r = gn("auth");
|
|
4531
|
+
return r && ri(t, `http://${r}`), t;
|
|
4533
4532
|
}
|
|
4534
|
-
function
|
|
4533
|
+
function Rr() {
|
|
4535
4534
|
var n, e;
|
|
4536
4535
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
|
4537
4536
|
}
|
|
4538
|
-
|
|
4537
|
+
Qn({
|
|
4539
4538
|
loadJS(n) {
|
|
4540
4539
|
return new Promise((e, t) => {
|
|
4541
4540
|
const i = document.createElement("script");
|
|
@@ -4545,38 +4544,38 @@ Zn({
|
|
|
4545
4544
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4546
4545
|
);
|
|
4547
4546
|
s.customData = r, t(s);
|
|
4548
|
-
}, i.type = "text/javascript", i.charset = "UTF-8",
|
|
4547
|
+
}, i.type = "text/javascript", i.charset = "UTF-8", Rr().appendChild(i);
|
|
4549
4548
|
});
|
|
4550
4549
|
},
|
|
4551
4550
|
gapiScript: "https://apis.google.com/js/api.js",
|
|
4552
4551
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
4553
4552
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
4554
4553
|
});
|
|
4555
|
-
|
|
4554
|
+
yr(
|
|
4556
4555
|
"Browser"
|
|
4557
4556
|
/* ClientPlatform.BROWSER */
|
|
4558
4557
|
);
|
|
4559
|
-
var
|
|
4560
|
-
const
|
|
4558
|
+
var Pr = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, assetBucketUrl: "static.feedme.cc", clientId: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476" }, Ar = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedme.cc" };
|
|
4559
|
+
const Cr = {
|
|
4561
4560
|
key: 1,
|
|
4562
4561
|
class: "h-full w-full"
|
|
4563
|
-
},
|
|
4562
|
+
}, Or = ["src"], Gr = /* @__PURE__ */ lt({
|
|
4564
4563
|
__name: "App",
|
|
4565
4564
|
setup(n) {
|
|
4566
4565
|
const e = We(), t = on(), i = an(), r = cn(), s = ln(), o = ht(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = We(), d = te(!1), h = Ve(() => i.version), _ = Ve(() => {
|
|
4567
4566
|
const p = e.currentCountry.value || "MY", m = Be.getIdToken(), v = l.value._id;
|
|
4568
|
-
return `${
|
|
4567
|
+
return `${Ar.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${m}`;
|
|
4569
4568
|
});
|
|
4570
4569
|
async function F() {
|
|
4571
|
-
if (
|
|
4570
|
+
if (yn().length) {
|
|
4572
4571
|
console.warn("CONNECT: initFirebase: Firebase already initialized");
|
|
4573
4572
|
return;
|
|
4574
4573
|
}
|
|
4575
|
-
const p =
|
|
4576
|
-
await
|
|
4574
|
+
const p = En(Pr.firebase), m = await sn.getCustomToken(), v = br();
|
|
4575
|
+
await hi(v, m), kn(p), console.log("initFirebase", p);
|
|
4577
4576
|
}
|
|
4578
4577
|
const M = async () => {
|
|
4579
|
-
d.value = !1, await tn(), console.log("forceRerender"), Be.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(
|
|
4578
|
+
d.value = !1, await tn(), console.log("forceRerender"), Be.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(Sn) : e.hideSidebarToggle(!0), await F(), a.value = !0, d.value = !0;
|
|
4580
4579
|
};
|
|
4581
4580
|
return Xt(() => {
|
|
4582
4581
|
if (t.initProvider(r, s), !c.value) {
|
|
@@ -4591,8 +4590,8 @@ const Or = {
|
|
|
4591
4590
|
}
|
|
4592
4591
|
), (p, m) => (ne(), He(Qt, null, [
|
|
4593
4592
|
P(d) && P(h) === "v2" ? (ne(), dt(P(rn), { key: 0 })) : $e("", !0),
|
|
4594
|
-
P(d) && P(h) !== "v2" ? (ne(), He("div",
|
|
4595
|
-
Zt(
|
|
4593
|
+
P(d) && P(h) !== "v2" ? (ne(), He("div", Cr, [
|
|
4594
|
+
Zt(un, {
|
|
4596
4595
|
json: { url: P(_) }
|
|
4597
4596
|
}, null, 8, ["json"]),
|
|
4598
4597
|
en("iframe", {
|
|
@@ -4601,11 +4600,11 @@ const Or = {
|
|
|
4601
4600
|
height: "100%",
|
|
4602
4601
|
width: "100%",
|
|
4603
4602
|
src: P(_)
|
|
4604
|
-
}, null, 8,
|
|
4603
|
+
}, null, 8, Or)
|
|
4605
4604
|
])) : $e("", !0)
|
|
4606
4605
|
], 64));
|
|
4607
4606
|
}
|
|
4608
4607
|
});
|
|
4609
4608
|
export {
|
|
4610
|
-
|
|
4609
|
+
Gr as default
|
|
4611
4610
|
};
|