@feedmepos/mf-connect 0.1.115-prod → 0.1.117-dev
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/README.md +64 -1
- package/dist/{App-CvtSY8ZO.js → App-BpcsgH7K.js} +444 -427
- package/dist/AuditLogs-BNnUiVnD.js +2016 -0
- package/dist/{Bin-B3gS9QVZ.js → Bin-Cm0wjQeR.js} +8 -8
- package/dist/{Broadcast-DAeb-HaN.js → Broadcast-BoJaHqnO.js} +22 -21
- package/dist/{CampaignAnalytic-BfTaHVem.js → CampaignAnalytic-Eg4xZW0B.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BXylK6Ze.js} +9 -9
- package/dist/{Card-JFeVIwFs.js → Card-BfkMcFaG.js} +25 -24
- package/dist/{Collections-xcDpEhIm.js → Collections-RXmxQbII.js} +197 -185
- package/dist/{Credit-C9HJZjDS.js → Credit-CsRPM1jv.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js → DateRangeChip.vue_vue_type_script_setup_true_lang-D2tvK7pw.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js +4442 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js → EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js} +32 -32
- package/dist/{Experience-DszS8gto.js → Experience-BC8Pj-v9.js} +32 -31
- package/dist/{FileSaver.min-CFVQKaC-.js → FileSaver.min-DzmoQFA0.js} +1 -1
- package/dist/{Game-DhgeN7E2.js → Game-DJXNHFBs.js} +19 -18
- package/dist/{GiftCardSetup-CWm6IhrS.js → GiftCardSetup-_0n8lU-t.js} +75 -75
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-C-AiJdui.js} +7 -7
- package/dist/{Goals-DtRVierH.js → Goals-DSZwKpds.js} +4 -4
- package/dist/Grab-DDc7e-AC.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js → ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js} +1 -1
- package/dist/{Index-DFRcu_qE.js → Index-Cbi0bquE.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js → LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bt9CO_QR.js} +1 -1
- package/dist/{LoyaltyDashboard-BWHKDPzk.js → LoyaltyDashboard-fK90c27A.js} +15 -15
- package/dist/MainLayout-Bf-l9yL4.js +4 -0
- package/dist/{MainLayout-BmpNNAiE.js → MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js} +5 -4
- package/dist/Marketing-B7cZGsO-.js +269 -0
- package/dist/MarketingMaterialEdit-5IcV2ct6.js +1037 -0
- package/dist/{Member-xEzrBW_p.js → Member-BGTrRVdq.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DJr2hV2W.js} +43 -50
- package/dist/{MemberImportHistory-CEQpBBF8.js → MemberImportHistory--FxkTJmu.js} +7 -7
- package/dist/{MemberList-CCvzkHv8.js → MemberList-EjY5dgwt.js} +103 -105
- package/dist/{MemberTransactions-Bmh39J2W.js → MemberTransactions-Oia7LIFK.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js → MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js} +14 -14
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Ev3bB8cg.js} +1 -1
- package/dist/{Mission-CpUo2Bgw.js → Mission-BFHYb4aT.js} +22 -21
- package/dist/{Overview-DcDZmDXA.js → Overview-BVNyQxFL.js} +23 -22
- package/dist/{Overview-CwQqQ1Tn.js → Overview-d5U37aot.js} +145 -144
- package/dist/{Point-CUNQsQIx.js → Point-CXkqH02Z.js} +22 -21
- package/dist/{Promotion-Cqdim7aW.js → Promotion-DdxNvlOO.js} +137 -131
- package/dist/{Queue-CNBVh1UG.js → Queue-C96oNKyP.js} +46 -45
- package/dist/{Record-BYwz4l4o.js → Record-Bj2e2Y4i.js} +9 -9
- package/dist/{Review-CqLcZFj8.js → Review-CJK5S1oI.js} +2 -2
- package/dist/ReviewFacebookCallback-ChG7TRy5.js +225 -0
- package/dist/{ReviewGoogleCallback-Dg8R7QlO.js → ReviewGoogleCallback-Dmk4VyGA.js} +5 -5
- package/dist/{Reward-M8GZ8eHq.js → Reward-Dh2YI0Xb.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js → RewardGroup.vue_vue_type_script_setup_true_lang-U47m3AAn.js} +16 -15
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js +1923 -0
- package/dist/{Segment-CrMi6xrp.js → Segment-FYvtCkqH.js} +304 -305
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPZZz2e0.js} +31 -30
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8wBgLlS.js} +4 -4
- package/dist/Setting-CUAWjCqa.js +574 -0
- package/dist/{SettingAdvertisements-Dh7v4c1D.js → SettingAdvertisements-COIQwUD6.js} +12 -12
- package/dist/Settings-D2gFPvmW.js +286 -0
- package/dist/{Store-CV-BmK5b.js → Store-BAXwiyvx.js} +31 -30
- package/dist/{StoreRewards-DPhSLvSZ.js → StoreRewards-2mUavtUg.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-5g3yIL1a.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js +7007 -0
- package/dist/{Tier-ChvYps23.js → Tier-BmAOzRHL.js} +2576 -687
- package/dist/{Title-v-Ivswr1.js → Title-DMxiUg30.js} +94 -92
- package/dist/{Transaction-CRqE1Ix0.js → Transaction-CF6hXEpN.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js} +26 -26
- package/dist/{Voucher-Bg8FOuzD.js → Voucher-DrtITxq-.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js → VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js} +16 -16
- package/dist/WhatsappAccount-Bb0Y7ikk.js +159 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CPlyzkp4.js +39 -0
- package/dist/WhatsappBot-DNvvaPey.js +876 -0
- package/dist/WhatsappBotLogs-C8M-1pvv.js +372 -0
- package/dist/WhatsappBotSettings-D6egqUyU.js +705 -0
- package/dist/WhatsappLayout-DeQTPuF6.js +21 -0
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DI0pcHcE.js +253 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js → ZodTextField.vue_vue_type_script_setup_true_lang-CKZscSjU.js} +2 -2
- package/dist/{app-DdNKsn2Q.js → app-BjdLqYQq.js} +8879 -7107
- package/dist/app.js +4 -3
- package/dist/{base.export-R97FrSQL.js → base.export-B68z5BF6.js} +2 -2
- package/dist/browser-BSAOEeIM.js +1478 -0
- package/dist/{business-Ce8vq3wQ.js → business-D9fgkHxb.js} +1 -1
- package/dist/{campaign-C19If7bW.js → campaign-Dw_ujovr.js} +121 -94
- package/dist/{campaign-BTllt2LH.js → campaign-eMaPX8r6.js} +31 -25
- package/dist/{campaign.enum-9CCbalR4.js → campaign.enum-Dx-Zo68Q.js} +3 -2
- package/dist/{campaign.fn-B4g03h0A.js → campaign.fn-DFjGNvmN.js} +78 -78
- package/dist/{collectible.enum-MvqF7mSg.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/{collection.fn-CR0bD33S.js → collection.fn-CCOWtB-c.js} +2 -2
- package/dist/{currency-DmlguGIM.js → currency-CTLKReFC.js} +1 -1
- package/dist/duplicateCampaign-BcpBfUGL.js +51 -0
- package/dist/{effect-Dx3zfl28.js → effect-CTI1ZH57.js} +1 -1
- package/dist/{email-addresses-De5PGOY4.js → email-addresses-B74e3bnB.js} +2 -2
- package/dist/{feature-flag-CD9V1V0h.js → feature-flag-DVdEaChJ.js} +182 -166
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-CEiv7SaO.js → helper-as9K-piK.js} +1 -1
- package/dist/{index-CBJy9bxB.js → index-3LjKJhQa.js} +1 -1
- package/dist/{index-BW6eb3n6.js → index-8mBfDn3M.js} +611 -252
- package/dist/{index-D4d3l0gw.js → index-B0h0iYWP.js} +8 -7
- package/dist/{index-BAXKd9Gg.js → index-BEKMTiFb.js} +198 -198
- package/dist/{index-B8yWVB8P.js → index-BW7FoVEA.js} +4 -3
- package/dist/{index-BVdYxi3l.js → index-B_wRpO02.js} +29 -15
- package/dist/{index-B8meeQoD.js → index-Ba719MYq.js} +1 -1
- package/dist/{index-BDPnyro2.js → index-BbVbqe4Y.js} +19 -6
- package/dist/{index-CqOCJTeR.js → index-BhTrG89b.js} +390 -232
- package/dist/index-C-iwb2Ln.js +109 -0
- package/dist/{index-CPODug8b.js → index-C5V6u2Qd.js} +2700 -2613
- package/dist/{index-CWUrODxL.js → index-CHU3UePP.js} +1 -1
- package/dist/{index-IZRfmmde.js → index-CQxkDpX0.js} +683 -581
- package/dist/{index-DT3S00_Y.js → index-CWLOcQ6j.js} +11 -10
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/{index-__UT3_Ey.js → index-Ckz6u3ac.js} +2 -2
- package/dist/{index-BYI9ttxy.js → index-Czg-2Ni0.js} +8028 -10767
- package/dist/{index-xct3mnu8.js → index-DKI8401o.js} +7 -7
- package/dist/{index-649OZ_e1.js → index-DcZiikOH.js} +2 -2
- package/dist/{index-BquSqx6K.js → index-QHqcSN2q.js} +4 -4
- package/dist/{index-BR9h5DTI.js → index-TAoQpeLQ.js} +1 -1
- package/dist/index-wsCCqwdr.js +74 -0
- package/dist/{index.esm2017-AVbZ9btd.js → index.esm2017-DL6rTGDW.js} +177 -177
- package/dist/{loading-BvHm1m3K.js → loading-x6IScY4K.js} +1 -1
- package/dist/{lodash-Dvrceo7x.js → lodash-nwnDizYo.js} +1 -1
- package/dist/{member-import-c9avpiSS.js → member-import-C-b01Tyd.js} +6 -5
- package/dist/{membership-D-pZS634.js → membership-DfarOMtO.js} +3 -3
- package/dist/{money-D4skwMkD.js → money-CFn-jR4W.js} +1 -1
- package/dist/{number-DJ6ncfT6.js → number-CSlyDL2x.js} +1 -1
- package/dist/objectid-zcT6ESET.js +145 -0
- package/dist/{onboarding-t7R1d3h-.js → onboarding-DyaFaaF2.js} +25 -25
- package/dist/{onboardingSetup-lTaJc0oT.js → onboardingSetup-DQt91O9f.js} +2 -2
- package/dist/{plugins-DQNOWwRC.js → plugins-DEHr0UOe.js} +3 -3
- package/dist/{MarketingMaterialEdit-x3c_N7Gs.js → remy-icon-BhUGu2NI.js} +2 -1031
- package/dist/{reward-BK150pjm.js → reward-Du_Pv-4p.js} +1 -1
- package/dist/{rule-COcdAnUu.js → rule-DfqmQTVK.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-CcbNF4PF.js +188 -0
- package/dist/{timezone-BP6UC4KL.js → timezone-_4tabIaK.js} +1 -1
- package/dist/{transaction.fn-BY0hzon0.js → transaction.fn-C46PHwCV.js} +2 -2
- package/dist/{trigger-DVBjVPbN.js → trigger-Dipr6btC.js} +8 -8
- package/dist/useMarketingMaterialActions-BAw2ZjeF.js +125 -0
- package/dist/{usePagination-QT552XyF.js → usePagination-D6RZ18zS.js} +1 -1
- package/dist/{user-CmAxNc7T.js → user-BCexQj3Q.js} +1 -1
- package/dist/vue-i18n-DXvyTCZf.js +2365 -0
- package/dist/{xlsx-DAczoc8y.js → xlsx-BTxt_Jg6.js} +224 -224
- package/dist/{zod-Aj-GuVQL.js → zod-T4wMYjWT.js} +1 -1
- package/package.json +6 -2
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +0 -3494
- package/dist/Marketing-BKK45Eve.js +0 -236
- package/dist/ReviewFacebookCallback-DbSCILNN.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +0 -1883
- package/dist/Setting-BnFRI0Se.js +0 -2037
- package/dist/Settings-BvT8_tkQ.js +0 -179
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +0 -1264
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +0 -142
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/objectid-DEMM_jdR.js +0 -145
- package/dist/rule-builder-Deufb6h_.js +0 -102
- package/dist/template-DeebIqJ_.js +0 -236
- package/dist/useMarketingMaterialActions-DpQCQHFI.js +0 -96
- package/dist/vue-i18n-Cze706-f.js +0 -2365
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as xe, ref as
|
|
1
|
+
import { defineComponent as xe, ref as te, h as U, Comment as cn, computed as Y, watch as ie, resolveComponent as ee, openBlock as j, createElementBlock as me, createVNode as S, unref as _, createElementVNode as I, toDisplayString as R, createBlock as Oe, withCtx as Z, Fragment as It, renderList as ln, onMounted as un, createCommentVNode as Pe, nextTick as dn } from "vue";
|
|
2
2
|
import { useRouter as yt, useRoute as wt, RouterView as hn } from "vue-router";
|
|
3
3
|
import { useCoreStore as ge, FeedMeAuth as fn } from "@feedmepos/mf-common";
|
|
4
4
|
import { u as pn } from "./app-wDQR6dpb.js";
|
|
5
|
-
import { u as mn } from "./business-
|
|
6
|
-
import {
|
|
7
|
-
import "./index-
|
|
8
|
-
import { components as
|
|
9
|
-
import { u as Tt } from "./vue-i18n-
|
|
10
|
-
import { m as
|
|
11
|
-
import { C as Xe } from "./timezone-
|
|
12
|
-
import { u as
|
|
13
|
-
import { R as p, A as
|
|
14
|
-
import { J as
|
|
15
|
-
import { r as Le, L as
|
|
5
|
+
import { u as mn } from "./business-D9fgkHxb.js";
|
|
6
|
+
import { F as gn, u as _n, l as vn } from "./feature-flag-DVdEaChJ.js";
|
|
7
|
+
import "./index-Ba719MYq.js";
|
|
8
|
+
import { components as W, useSnackbar as In, useDialog as yn } from "@feedmepos/ui-library";
|
|
9
|
+
import { u as Tt } from "./vue-i18n-DXvyTCZf.js";
|
|
10
|
+
import { m as wn } from "./index-TAoQpeLQ.js";
|
|
11
|
+
import { C as Xe } from "./timezone-_4tabIaK.js";
|
|
12
|
+
import { u as Tn } from "./onboarding-DyaFaaF2.js";
|
|
13
|
+
import { R as p, A as kn, a as Qe } from "./app-BjdLqYQq.js";
|
|
14
|
+
import { J as bn } from "./JsonViewer-v8_C7l5N.js";
|
|
15
|
+
import { r as Le, L as En, g as kt, i as Sn, a as Rn, _ as Ze, C as et, b as An, S as se, c as A, d as X, E as Fe, e as Pn, f as bt, h as Cn, j as Nn, k as Et, l as w, m as On, F as Ve, n as Ln, q as oe, o as Mn, p as Un, s as Dn, t as xn, u as Fn } from "./index.esm2017-DL6rTGDW.js";
|
|
16
16
|
import { _ as $e } from "./tslib.es6-BCqqvLQ_.js";
|
|
17
|
-
import { S as tt, c as
|
|
18
|
-
const
|
|
17
|
+
import { S as tt, c as Vn } from "./index-DKI8401o.js";
|
|
18
|
+
const $n = { class: "flex flex-col h-full justify-between py-16" }, Hn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Wn = /* @__PURE__ */ xe({
|
|
19
19
|
__name: "NavigationTab",
|
|
20
20
|
setup(n) {
|
|
21
|
-
const { t: e, locale: t } = Tt(), i =
|
|
21
|
+
const { t: e, locale: t } = Tt(), i = Tn(), r = _n(), s = te(), o = [
|
|
22
22
|
{
|
|
23
23
|
label: e("connect.navigation.analytic"),
|
|
24
24
|
value: p["$connect-ANALYTIC"]
|
|
@@ -38,6 +38,10 @@ const Fn = { class: "flex flex-col h-full justify-between py-16" }, Vn = { class
|
|
|
38
38
|
{
|
|
39
39
|
label: e("connect.navigation.broadcast"),
|
|
40
40
|
value: p["$connect-CAMPAIGN_BROADCAST"]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: e("connect.navigation.grab"),
|
|
44
|
+
value: p["$connect-CAMPAIGN_GRAB"]
|
|
41
45
|
}
|
|
42
46
|
]
|
|
43
47
|
},
|
|
@@ -60,7 +64,7 @@ const Fn = { class: "flex flex-col h-full justify-between py-16" }, Vn = { class
|
|
|
60
64
|
{
|
|
61
65
|
label: e("connect.navigation.point"),
|
|
62
66
|
value: p["$connect-PROGRAM_POINT"],
|
|
63
|
-
badge: () =>
|
|
67
|
+
badge: () => U(W.FmPill, { variant: "premium" })
|
|
64
68
|
},
|
|
65
69
|
{
|
|
66
70
|
label: e("connect.navigation.credit"),
|
|
@@ -69,7 +73,7 @@ const Fn = { class: "flex flex-col h-full justify-between py-16" }, Vn = { class
|
|
|
69
73
|
{
|
|
70
74
|
label: e("connect.navigation.game"),
|
|
71
75
|
value: p["$connect-PROGRAM_GAME"],
|
|
72
|
-
badge: () =>
|
|
76
|
+
badge: () => U(W.FmPill, { variant: "premium" })
|
|
73
77
|
},
|
|
74
78
|
{
|
|
75
79
|
label: "Mission",
|
|
@@ -88,19 +92,24 @@ const Fn = { class: "flex flex-col h-full justify-between py-16" }, Vn = { class
|
|
|
88
92
|
{
|
|
89
93
|
label: e("connect.navigation.segments"),
|
|
90
94
|
value: p["$connect-LOYALTY_SEGMENT"],
|
|
91
|
-
badge: () =>
|
|
95
|
+
badge: () => U(W.FmPill, { variant: "premium" })
|
|
92
96
|
},
|
|
93
97
|
{
|
|
94
98
|
label: e("connect.navigation.card"),
|
|
95
99
|
value: p["$connect-LOYALTY_CARD"],
|
|
96
|
-
badge: () =>
|
|
100
|
+
badge: () => U(W.FmPill, { variant: "premium" })
|
|
97
101
|
}
|
|
98
102
|
]
|
|
99
103
|
},
|
|
104
|
+
{
|
|
105
|
+
label: e("connect.navigation.whatsappBot"),
|
|
106
|
+
value: p["$connect-WHATSAPP"],
|
|
107
|
+
badge: () => U(W.FmPill, { variant: "beta" })
|
|
108
|
+
},
|
|
100
109
|
{
|
|
101
110
|
label: e("connect.navigation.referral"),
|
|
102
111
|
value: p["$connect-REFERRAL"],
|
|
103
|
-
badge: () =>
|
|
112
|
+
badge: () => U(W.FmPill, { variant: "premium" })
|
|
104
113
|
},
|
|
105
114
|
{
|
|
106
115
|
label: e("connect.navigation.store"),
|
|
@@ -114,6 +123,10 @@ const Fn = { class: "flex flex-col h-full justify-between py-16" }, Vn = { class
|
|
|
114
123
|
label: e("connect.navigation.marketingMaterials"),
|
|
115
124
|
value: p["$connect-MARKETING"]
|
|
116
125
|
},
|
|
126
|
+
{
|
|
127
|
+
label: e("connect.navigation.auditLogs"),
|
|
128
|
+
value: p["$connect-AUDIT_LOGS"]
|
|
129
|
+
},
|
|
117
130
|
{
|
|
118
131
|
label: e("connect.navigation.review"),
|
|
119
132
|
value: p["$connect-REVIEW"]
|
|
@@ -121,11 +134,11 @@ const Fn = { class: "flex flex-col h-full justify-between py-16" }, Vn = { class
|
|
|
121
134
|
{
|
|
122
135
|
label: e("connect.navigation.goals"),
|
|
123
136
|
value: p["$connect-GOALS"],
|
|
124
|
-
badge: () => i.goalsRemaining > 0 ?
|
|
137
|
+
badge: () => i.goalsRemaining > 0 ? U(W.FmBadge, {
|
|
125
138
|
variant: "numeric",
|
|
126
139
|
inline: !0,
|
|
127
140
|
value: i.goalsRemaining
|
|
128
|
-
}) :
|
|
141
|
+
}) : U(cn)
|
|
129
142
|
},
|
|
130
143
|
{
|
|
131
144
|
label: e("connect.navigation.setting"),
|
|
@@ -135,182 +148,186 @@ const Fn = { class: "flex flex-col h-full justify-between py-16" }, Vn = { class
|
|
|
135
148
|
label: e("connect.navigation.bin"),
|
|
136
149
|
value: p["$connect-BIN"]
|
|
137
150
|
}
|
|
138
|
-
],
|
|
139
|
-
|
|
140
|
-
|
|
151
|
+
], c = Y(
|
|
152
|
+
() => o.filter(
|
|
153
|
+
(h) => h.value !== p["$connect-WHATSAPP"] || r(gn.whatsappBot) === "on"
|
|
154
|
+
)
|
|
155
|
+
), a = yt(), l = wt(), d = o.reduce((h, f) => [...(f.children ?? []).map((g) => g.value), ...h, f.value], []), m = ge(), y = Y(() => {
|
|
156
|
+
const h = m.currentCountry.value || "MY";
|
|
157
|
+
return console.log(`[MF] Timezone set to: ${Xe[h]}`), Xe[h];
|
|
141
158
|
});
|
|
142
159
|
ie(
|
|
143
160
|
// Watch `route.matched`, not `route`: `useRoute()` returns a reactive object
|
|
144
161
|
// whose identity never changes, so watching it directly fired once via
|
|
145
162
|
// `immediate` and the highlight then stayed on whatever page loaded first.
|
|
146
|
-
() =>
|
|
147
|
-
(
|
|
148
|
-
const
|
|
149
|
-
|
|
163
|
+
() => l.matched,
|
|
164
|
+
(h) => {
|
|
165
|
+
const g = h.map((v) => v.name).reverse().find((v) => d.includes(v));
|
|
166
|
+
g && (s.value = g);
|
|
150
167
|
},
|
|
151
168
|
{ immediate: !0 }
|
|
152
169
|
), ie(
|
|
153
170
|
[() => {
|
|
154
|
-
var
|
|
155
|
-
return (
|
|
156
|
-
}, () =>
|
|
157
|
-
([
|
|
158
|
-
|
|
171
|
+
var h;
|
|
172
|
+
return (h = m.currentBusiness.value) == null ? void 0 : h._id;
|
|
173
|
+
}, () => l.name, t],
|
|
174
|
+
([h]) => {
|
|
175
|
+
h && i.read(t.value, h);
|
|
159
176
|
},
|
|
160
177
|
{ immediate: !0 }
|
|
161
178
|
);
|
|
162
|
-
async function
|
|
163
|
-
await
|
|
179
|
+
async function T(h) {
|
|
180
|
+
await a.push({ name: h });
|
|
164
181
|
}
|
|
165
|
-
return (
|
|
166
|
-
var
|
|
167
|
-
const
|
|
168
|
-
return j(), me("div",
|
|
169
|
-
S(
|
|
182
|
+
return (h, f) => {
|
|
183
|
+
var v;
|
|
184
|
+
const g = ee("FmCollapsibleTabs");
|
|
185
|
+
return j(), me("div", $n, [
|
|
186
|
+
S(g, {
|
|
170
187
|
class: "border-fm-color-neutral-gray-100 border-r px-4",
|
|
171
|
-
"model-value": (
|
|
172
|
-
items:
|
|
173
|
-
"onUpdate:modelValue":
|
|
174
|
-
}, null, 8, ["model-value"]),
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
188
|
+
"model-value": (v = _(s)) == null ? void 0 : v.toString(),
|
|
189
|
+
items: _(c),
|
|
190
|
+
"onUpdate:modelValue": T
|
|
191
|
+
}, null, 8, ["model-value", "items"]),
|
|
192
|
+
I("div", Hn, [
|
|
193
|
+
I("div", null, "Timezone: " + R(_(y).split("/")[1].replace("_", " ")), 1),
|
|
194
|
+
I("div", null, "(UTC" + R(_(wn).tz(_(y)).format("Z")) + ")", 1)
|
|
178
195
|
])
|
|
179
196
|
]);
|
|
180
197
|
};
|
|
181
198
|
}
|
|
182
199
|
}), St = "feedme_connect_marketing_promo_hidden";
|
|
183
|
-
function
|
|
200
|
+
function jn() {
|
|
184
201
|
try {
|
|
185
202
|
return localStorage.getItem(St) !== null;
|
|
186
203
|
} catch {
|
|
187
204
|
return !1;
|
|
188
205
|
}
|
|
189
206
|
}
|
|
190
|
-
function
|
|
207
|
+
function Gn() {
|
|
191
208
|
try {
|
|
192
209
|
localStorage.setItem(St, (/* @__PURE__ */ new Date()).toISOString());
|
|
193
210
|
} catch {
|
|
194
211
|
}
|
|
195
212
|
}
|
|
196
|
-
const
|
|
213
|
+
const Bn = { class: "flex flex-col gap-12" }, zn = { class: "fm-corner-radius-xxl bg-fm-color-primary-oats flex items-start gap-4 self-start px-12 py-4" }, qn = { class: "fm-typo-en-body-sm-600 text-fm-color-primary" }, Kn = { class: "fm-typo-en-title-sm-800 max-w-[560px] leading-[42px]" }, Jn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary max-w-[600px]" }, Yn = { class: "flex flex-col gap-24 pb-8" }, Xn = { class: "grid grid-cols-1 gap-16 sm:grid-cols-3 md:grid-cols-3 lg:grid-cols-3" }, Qn = { class: "fm-corner-radius-sm bg-fm-color-primary-oats flex h-40 w-40 shrink-0 items-center justify-center" }, Zn = { class: "fm-typo-en-body-lg-600" }, ei = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ti = { class: "shrink-0" }, ni = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ii = { class: "flex w-full flex-col gap-12 px-[16px]" }, ri = { class: "flex flex-wrap items-center gap-12" }, si = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, oi = /* @__PURE__ */ xe({
|
|
197
214
|
__name: "AiMarketingPromoDialog",
|
|
198
215
|
setup(n) {
|
|
199
216
|
let e = !1;
|
|
200
|
-
const { t } = Tt(), i = yt(), { sessionUser: r, currentCountry: s } = ge(), o =
|
|
217
|
+
const { t } = Tt(), i = yt(), { sessionUser: r, currentCountry: s } = ge(), o = te(!1), c = [
|
|
201
218
|
{ key: "completeContent", icon: "layers" },
|
|
202
219
|
{ key: "realContext", icon: "storefront" },
|
|
203
220
|
{ key: "socialFormat", icon: "aspect_ratio" }
|
|
204
|
-
], a =
|
|
205
|
-
var
|
|
206
|
-
const
|
|
207
|
-
return
|
|
221
|
+
], a = Y(() => {
|
|
222
|
+
var h;
|
|
223
|
+
const T = ((h = r.value) == null ? void 0 : h.permissions) ?? [];
|
|
224
|
+
return kn(
|
|
208
225
|
[
|
|
209
226
|
{
|
|
210
227
|
action: Qe.Action.manage,
|
|
211
228
|
subject: Qe.Subject.Business.crm_marketingMaterial
|
|
212
229
|
}
|
|
213
230
|
],
|
|
214
|
-
|
|
231
|
+
T
|
|
215
232
|
).granted;
|
|
216
|
-
}), l =
|
|
233
|
+
}), l = Y(
|
|
217
234
|
() => s.value === "MY" && a.value
|
|
218
235
|
);
|
|
219
236
|
let d = !1;
|
|
220
237
|
ie(
|
|
221
238
|
l,
|
|
222
|
-
(
|
|
223
|
-
d || !
|
|
239
|
+
(T) => {
|
|
240
|
+
d || !T || (d = !0, !(jn() || e) && (e = !0, o.value = !0));
|
|
224
241
|
},
|
|
225
242
|
{ immediate: !0 }
|
|
226
243
|
);
|
|
227
244
|
async function m() {
|
|
228
245
|
o.value = !1, await i.push({ name: p["$connect-MARKETING"] });
|
|
229
246
|
}
|
|
230
|
-
function
|
|
231
|
-
|
|
247
|
+
function y() {
|
|
248
|
+
Gn(), o.value = !1;
|
|
232
249
|
}
|
|
233
|
-
return (
|
|
234
|
-
const
|
|
250
|
+
return (T, h) => {
|
|
251
|
+
const f = ee("FmIcon"), g = ee("FmCard"), v = ee("FmButton"), M = ee("FmDialog");
|
|
235
252
|
return j(), Oe(M, {
|
|
236
253
|
modelValue: o.value,
|
|
237
|
-
"onUpdate:modelValue":
|
|
254
|
+
"onUpdate:modelValue": h[0] || (h[0] = (k) => o.value = k),
|
|
238
255
|
"min-width": "min(500px, calc(100% - 48px))",
|
|
239
256
|
"max-width": "min(860px, calc(100% - 48px))",
|
|
240
257
|
"max-height": "90vh",
|
|
241
258
|
"dismiss-away": ""
|
|
242
259
|
}, {
|
|
243
|
-
"dialog-header":
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
S(
|
|
260
|
+
"dialog-header": Z(() => [
|
|
261
|
+
I("div", Bn, [
|
|
262
|
+
I("div", zn, [
|
|
263
|
+
S(f, {
|
|
247
264
|
name: "auto_awesome",
|
|
248
265
|
size: "sm",
|
|
249
266
|
color: "primary"
|
|
250
267
|
}),
|
|
251
|
-
|
|
268
|
+
I("span", qn, R(_(t)("connect.marketing.whatsNew.badge")), 1)
|
|
252
269
|
]),
|
|
253
|
-
|
|
254
|
-
|
|
270
|
+
I("h1", Kn, R(_(t)("connect.marketing.whatsNew.title")), 1),
|
|
271
|
+
I("p", Jn, R(_(t)("connect.marketing.whatsNew.subtitle")), 1)
|
|
255
272
|
])
|
|
256
273
|
]),
|
|
257
|
-
"dialog-footer":
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
S(
|
|
274
|
+
"dialog-footer": Z(() => [
|
|
275
|
+
I("div", ii, [
|
|
276
|
+
I("div", ri, [
|
|
277
|
+
S(v, {
|
|
261
278
|
variant: "primary",
|
|
262
279
|
size: "lg",
|
|
263
|
-
label:
|
|
280
|
+
label: _(t)("connect.marketing.whatsNew.cta"),
|
|
264
281
|
"append-icon": "arrow_forward",
|
|
265
282
|
onClick: m
|
|
266
283
|
}, null, 8, ["label"]),
|
|
267
|
-
S(
|
|
284
|
+
S(v, {
|
|
268
285
|
variant: "tertiary",
|
|
269
286
|
size: "lg",
|
|
270
|
-
label:
|
|
271
|
-
onClick:
|
|
287
|
+
label: _(t)("connect.marketing.whatsNew.dismiss"),
|
|
288
|
+
onClick: y
|
|
272
289
|
}, null, 8, ["label"])
|
|
273
290
|
]),
|
|
274
|
-
|
|
291
|
+
I("div", si, R(_(t)("connect.marketing.whatsNew.footnote")), 1)
|
|
275
292
|
])
|
|
276
293
|
]),
|
|
277
|
-
default:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
(j(), me(It, null, ln(c, (k) => S(
|
|
294
|
+
default: Z(() => [
|
|
295
|
+
I("div", Yn, [
|
|
296
|
+
I("div", Xn, [
|
|
297
|
+
(j(), me(It, null, ln(c, (k) => S(g, {
|
|
281
298
|
key: k.key,
|
|
282
299
|
variant: "outlined",
|
|
283
300
|
class: "!h-full flex flex-col gap-8 p-16"
|
|
284
301
|
}, {
|
|
285
|
-
default:
|
|
286
|
-
|
|
287
|
-
S(
|
|
302
|
+
default: Z(() => [
|
|
303
|
+
I("div", Qn, [
|
|
304
|
+
S(f, {
|
|
288
305
|
name: k.icon,
|
|
289
306
|
size: "md",
|
|
290
307
|
color: "primary"
|
|
291
308
|
}, null, 8, ["name"])
|
|
292
309
|
]),
|
|
293
|
-
|
|
294
|
-
|
|
310
|
+
I("div", Zn, R(_(t)(`connect.marketing.whatsNew.benefits.${k.key}.title`)), 1),
|
|
311
|
+
I("div", ei, R(_(t)(
|
|
295
312
|
`connect.marketing.whatsNew.benefits.${k.key}.description`
|
|
296
313
|
)), 1)
|
|
297
314
|
]),
|
|
298
315
|
_: 2
|
|
299
316
|
}, 1024)), 64))
|
|
300
317
|
]),
|
|
301
|
-
S(
|
|
318
|
+
S(g, {
|
|
302
319
|
variant: "outlined",
|
|
303
320
|
class: "flex items-start gap-12 p-16"
|
|
304
321
|
}, {
|
|
305
|
-
default:
|
|
306
|
-
|
|
307
|
-
S(
|
|
322
|
+
default: Z(() => [
|
|
323
|
+
I("div", ti, [
|
|
324
|
+
S(f, {
|
|
308
325
|
name: "lightbulb",
|
|
309
326
|
size: "md",
|
|
310
327
|
color: "primary"
|
|
311
328
|
})
|
|
312
329
|
]),
|
|
313
|
-
|
|
330
|
+
I("p", ni, R(_(t)("connect.marketing.whatsNew.callout")), 1)
|
|
314
331
|
]),
|
|
315
332
|
_: 1
|
|
316
333
|
})
|
|
@@ -321,7 +338,7 @@ const Wn = { class: "flex flex-col gap-12" }, Bn = { class: "fm-corner-radius-xx
|
|
|
321
338
|
};
|
|
322
339
|
}
|
|
323
340
|
});
|
|
324
|
-
var
|
|
341
|
+
var ai = "firebase", ci = "10.12.4";
|
|
325
342
|
/**
|
|
326
343
|
* @license
|
|
327
344
|
* Copyright 2020 Google LLC
|
|
@@ -338,13 +355,13 @@ var si = "firebase", oi = "10.12.4";
|
|
|
338
355
|
* See the License for the specific language governing permissions and
|
|
339
356
|
* limitations under the License.
|
|
340
357
|
*/
|
|
341
|
-
Le(
|
|
358
|
+
Le(ai, ci, "app");
|
|
342
359
|
function Rt() {
|
|
343
360
|
return {
|
|
344
361
|
"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."
|
|
345
362
|
};
|
|
346
363
|
}
|
|
347
|
-
const
|
|
364
|
+
const li = Rt, At = new Fe("auth", "Firebase", Rt());
|
|
348
365
|
/**
|
|
349
366
|
* @license
|
|
350
367
|
* Copyright 2020 Google LLC
|
|
@@ -361,8 +378,8 @@ const ai = Rt, At = new Fe("auth", "Firebase", Rt());
|
|
|
361
378
|
* See the License for the specific language governing permissions and
|
|
362
379
|
* limitations under the License.
|
|
363
380
|
*/
|
|
364
|
-
const _e = new
|
|
365
|
-
function
|
|
381
|
+
const _e = new En("@firebase/auth");
|
|
382
|
+
function ui(n, ...e) {
|
|
366
383
|
_e.logLevel <= Et.WARN && _e.warn(`Auth (${se}): ${n}`, ...e);
|
|
367
384
|
}
|
|
368
385
|
function de(n, ...e) {
|
|
@@ -391,12 +408,12 @@ function b(n, ...e) {
|
|
|
391
408
|
return He(n, ...e);
|
|
392
409
|
}
|
|
393
410
|
function Pt(n, e, t) {
|
|
394
|
-
const i = Object.assign(Object.assign({},
|
|
411
|
+
const i = Object.assign(Object.assign({}, li()), { [e]: t });
|
|
395
412
|
return new Fe("auth", "Firebase", i).create(e, {
|
|
396
413
|
appName: n.name
|
|
397
414
|
});
|
|
398
415
|
}
|
|
399
|
-
function
|
|
416
|
+
function H(n) {
|
|
400
417
|
return Pt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
|
|
401
418
|
}
|
|
402
419
|
function He(n, ...e) {
|
|
@@ -437,7 +454,7 @@ function Me() {
|
|
|
437
454
|
var n;
|
|
438
455
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
439
456
|
}
|
|
440
|
-
function
|
|
457
|
+
function di() {
|
|
441
458
|
return nt() === "http:" || nt() === "https:";
|
|
442
459
|
}
|
|
443
460
|
function nt() {
|
|
@@ -460,15 +477,15 @@ function nt() {
|
|
|
460
477
|
* See the License for the specific language governing permissions and
|
|
461
478
|
* limitations under the License.
|
|
462
479
|
*/
|
|
463
|
-
function
|
|
480
|
+
function hi() {
|
|
464
481
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
465
482
|
// This is especially true for Cordova apps which have unreliable
|
|
466
483
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
467
484
|
// installed which overwrites the native navigator.onLine value and
|
|
468
485
|
// defines navigator.connection.
|
|
469
|
-
(
|
|
486
|
+
(di() || An() || "connection" in navigator) ? navigator.onLine : !0;
|
|
470
487
|
}
|
|
471
|
-
function
|
|
488
|
+
function fi() {
|
|
472
489
|
if (typeof navigator > "u")
|
|
473
490
|
return null;
|
|
474
491
|
const n = navigator;
|
|
@@ -498,10 +515,10 @@ function di() {
|
|
|
498
515
|
*/
|
|
499
516
|
class ae {
|
|
500
517
|
constructor(e, t) {
|
|
501
|
-
this.shortDelay = e, this.longDelay = t, L(t > e, "Short delay should be less than long delay!"), this.isMobile =
|
|
518
|
+
this.shortDelay = e, this.longDelay = t, L(t > e, "Short delay should be less than long delay!"), this.isMobile = Sn() || Rn();
|
|
502
519
|
}
|
|
503
520
|
get() {
|
|
504
|
-
return
|
|
521
|
+
return hi() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
505
522
|
}
|
|
506
523
|
}
|
|
507
524
|
/**
|
|
@@ -520,7 +537,7 @@ class ae {
|
|
|
520
537
|
* See the License for the specific language governing permissions and
|
|
521
538
|
* limitations under the License.
|
|
522
539
|
*/
|
|
523
|
-
function
|
|
540
|
+
function We(n, e) {
|
|
524
541
|
L(n.emulator, "Emulator should always be set here");
|
|
525
542
|
const { url: t } = n.emulator;
|
|
526
543
|
return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
|
|
@@ -595,7 +612,7 @@ class Ct {
|
|
|
595
612
|
* See the License for the specific language governing permissions and
|
|
596
613
|
* limitations under the License.
|
|
597
614
|
*/
|
|
598
|
-
const
|
|
615
|
+
const pi = {
|
|
599
616
|
// Custom token errors.
|
|
600
617
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
|
601
618
|
// This can only happen if the SDK sends a bad request.
|
|
@@ -686,11 +703,11 @@ const hi = {
|
|
|
686
703
|
* See the License for the specific language governing permissions and
|
|
687
704
|
* limitations under the License.
|
|
688
705
|
*/
|
|
689
|
-
const
|
|
706
|
+
const mi = new ae(3e4, 6e4);
|
|
690
707
|
function Te(n, e) {
|
|
691
708
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
692
709
|
}
|
|
693
|
-
async function
|
|
710
|
+
async function Q(n, e, t, i, r = {}) {
|
|
694
711
|
return Nt(n, r, async () => {
|
|
695
712
|
let s = {}, o = {};
|
|
696
713
|
i && (e === "GET" ? o = i : s = {
|
|
@@ -712,9 +729,9 @@ async function X(n, e, t, i, r = {}) {
|
|
|
712
729
|
}
|
|
713
730
|
async function Nt(n, e, t) {
|
|
714
731
|
n._canInitEmulator = !1;
|
|
715
|
-
const i = Object.assign(Object.assign({},
|
|
732
|
+
const i = Object.assign(Object.assign({}, pi), e);
|
|
716
733
|
try {
|
|
717
|
-
const r = new
|
|
734
|
+
const r = new gi(n), s = await Promise.race([
|
|
718
735
|
t(),
|
|
719
736
|
r.promise
|
|
720
737
|
]);
|
|
@@ -744,23 +761,23 @@ async function Nt(n, e, t) {
|
|
|
744
761
|
}
|
|
745
762
|
}
|
|
746
763
|
async function Ot(n, e, t, i, r = {}) {
|
|
747
|
-
const s = await
|
|
764
|
+
const s = await Q(n, e, t, i, r);
|
|
748
765
|
return "mfaPendingCredential" in s && O(n, "multi-factor-auth-required", {
|
|
749
766
|
_serverResponse: s
|
|
750
767
|
}), s;
|
|
751
768
|
}
|
|
752
769
|
function Lt(n, e, t, i) {
|
|
753
770
|
const r = `${e}${t}?${i}`;
|
|
754
|
-
return n.config.emulator ?
|
|
771
|
+
return n.config.emulator ? We(n.config, r) : `${n.config.apiScheme}://${r}`;
|
|
755
772
|
}
|
|
756
|
-
class
|
|
773
|
+
class gi {
|
|
757
774
|
constructor(e) {
|
|
758
775
|
this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
|
|
759
776
|
this.timer = setTimeout(() => i(b(
|
|
760
777
|
this.auth,
|
|
761
778
|
"network-request-failed"
|
|
762
779
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
763
|
-
)),
|
|
780
|
+
)), mi.get());
|
|
764
781
|
});
|
|
765
782
|
}
|
|
766
783
|
clearNetworkTimeout() {
|
|
@@ -791,11 +808,11 @@ function ue(n, e, t) {
|
|
|
791
808
|
* See the License for the specific language governing permissions and
|
|
792
809
|
* limitations under the License.
|
|
793
810
|
*/
|
|
794
|
-
async function
|
|
795
|
-
return
|
|
811
|
+
async function _i(n, e) {
|
|
812
|
+
return Q(n, "POST", "/v1/accounts:delete", e);
|
|
796
813
|
}
|
|
797
814
|
async function Mt(n, e) {
|
|
798
|
-
return
|
|
815
|
+
return Q(n, "POST", "/v1/accounts:lookup", e);
|
|
799
816
|
}
|
|
800
817
|
/**
|
|
801
818
|
* @license
|
|
@@ -813,7 +830,7 @@ async function Mt(n, e) {
|
|
|
813
830
|
* See the License for the specific language governing permissions and
|
|
814
831
|
* limitations under the License.
|
|
815
832
|
*/
|
|
816
|
-
function
|
|
833
|
+
function ne(n) {
|
|
817
834
|
if (n)
|
|
818
835
|
try {
|
|
819
836
|
const e = new Date(Number(n));
|
|
@@ -822,8 +839,8 @@ function te(n) {
|
|
|
822
839
|
} catch {
|
|
823
840
|
}
|
|
824
841
|
}
|
|
825
|
-
async function
|
|
826
|
-
const t =
|
|
842
|
+
async function vi(n, e = !1) {
|
|
843
|
+
const t = X(n), i = await t.getIdToken(e), r = je(i);
|
|
827
844
|
u(
|
|
828
845
|
r && r.exp && r.auth_time && r.iat,
|
|
829
846
|
t.auth,
|
|
@@ -834,9 +851,9 @@ async function gi(n, e = !1) {
|
|
|
834
851
|
return {
|
|
835
852
|
claims: r,
|
|
836
853
|
token: i,
|
|
837
|
-
authTime:
|
|
838
|
-
issuedAtTime:
|
|
839
|
-
expirationTime:
|
|
854
|
+
authTime: ne(Ce(r.auth_time)),
|
|
855
|
+
issuedAtTime: ne(Ce(r.iat)),
|
|
856
|
+
expirationTime: ne(Ce(r.exp)),
|
|
840
857
|
signInProvider: o || null,
|
|
841
858
|
signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
|
|
842
859
|
};
|
|
@@ -844,19 +861,19 @@ async function gi(n, e = !1) {
|
|
|
844
861
|
function Ce(n) {
|
|
845
862
|
return Number(n) * 1e3;
|
|
846
863
|
}
|
|
847
|
-
function
|
|
864
|
+
function je(n) {
|
|
848
865
|
const [e, t, i] = n.split(".");
|
|
849
866
|
if (e === void 0 || t === void 0 || i === void 0)
|
|
850
867
|
return de("JWT malformed, contained fewer than 3 sections"), null;
|
|
851
868
|
try {
|
|
852
|
-
const r =
|
|
869
|
+
const r = Ln(t);
|
|
853
870
|
return r ? JSON.parse(r) : (de("Failed to decode base64 JWT payload"), null);
|
|
854
871
|
} catch (r) {
|
|
855
872
|
return de("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
|
|
856
873
|
}
|
|
857
874
|
}
|
|
858
875
|
function it(n) {
|
|
859
|
-
const e =
|
|
876
|
+
const e = je(n);
|
|
860
877
|
return u(
|
|
861
878
|
e,
|
|
862
879
|
"internal-error"
|
|
@@ -893,10 +910,10 @@ async function re(n, e, t = !1) {
|
|
|
893
910
|
try {
|
|
894
911
|
return await e;
|
|
895
912
|
} catch (i) {
|
|
896
|
-
throw i instanceof Ve &&
|
|
913
|
+
throw i instanceof Ve && Ii(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
|
|
897
914
|
}
|
|
898
915
|
}
|
|
899
|
-
function
|
|
916
|
+
function Ii({ code: n }) {
|
|
900
917
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
901
918
|
}
|
|
902
919
|
/**
|
|
@@ -915,7 +932,7 @@ function _i({ code: n }) {
|
|
|
915
932
|
* See the License for the specific language governing permissions and
|
|
916
933
|
* limitations under the License.
|
|
917
934
|
*/
|
|
918
|
-
class
|
|
935
|
+
class yi {
|
|
919
936
|
constructor(e) {
|
|
920
937
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
921
938
|
}
|
|
@@ -982,7 +999,7 @@ class Ue {
|
|
|
982
999
|
this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
|
|
983
1000
|
}
|
|
984
1001
|
_initializeTime() {
|
|
985
|
-
this.lastSignInTime =
|
|
1002
|
+
this.lastSignInTime = ne(this.lastLoginAt), this.creationTime = ne(this.createdAt);
|
|
986
1003
|
}
|
|
987
1004
|
_copy(e) {
|
|
988
1005
|
this.createdAt = e.createdAt, this.lastLoginAt = e.lastLoginAt, this._initializeTime();
|
|
@@ -1021,7 +1038,7 @@ async function ve(n) {
|
|
|
1021
1038
|
);
|
|
1022
1039
|
const s = r.users[0];
|
|
1023
1040
|
n._notifyReloadListener(s);
|
|
1024
|
-
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Ut(s.providerUserInfo) : [], c =
|
|
1041
|
+
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Ut(s.providerUserInfo) : [], c = Ti(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, m = {
|
|
1025
1042
|
uid: s.localId,
|
|
1026
1043
|
displayName: s.displayName || null,
|
|
1027
1044
|
photoURL: s.photoUrl || null,
|
|
@@ -1035,11 +1052,11 @@ async function ve(n) {
|
|
|
1035
1052
|
};
|
|
1036
1053
|
Object.assign(n, m);
|
|
1037
1054
|
}
|
|
1038
|
-
async function
|
|
1039
|
-
const e =
|
|
1055
|
+
async function wi(n) {
|
|
1056
|
+
const e = X(n);
|
|
1040
1057
|
await ve(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
1041
1058
|
}
|
|
1042
|
-
function
|
|
1059
|
+
function Ti(n, e) {
|
|
1043
1060
|
return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
|
|
1044
1061
|
}
|
|
1045
1062
|
function Ut(n) {
|
|
@@ -1071,7 +1088,7 @@ function Ut(n) {
|
|
|
1071
1088
|
* See the License for the specific language governing permissions and
|
|
1072
1089
|
* limitations under the License.
|
|
1073
1090
|
*/
|
|
1074
|
-
async function
|
|
1091
|
+
async function ki(n, e) {
|
|
1075
1092
|
const t = await Nt(n, {}, async () => {
|
|
1076
1093
|
const i = oe({
|
|
1077
1094
|
grant_type: "refresh_token",
|
|
@@ -1092,8 +1109,8 @@ async function wi(n, e) {
|
|
|
1092
1109
|
refreshToken: t.refresh_token
|
|
1093
1110
|
};
|
|
1094
1111
|
}
|
|
1095
|
-
async function
|
|
1096
|
-
return
|
|
1112
|
+
async function bi(n, e) {
|
|
1113
|
+
return Q(n, "POST", "/v2/accounts:revokeToken", Te(n, e));
|
|
1097
1114
|
}
|
|
1098
1115
|
/**
|
|
1099
1116
|
* @license
|
|
@@ -1156,7 +1173,7 @@ class q {
|
|
|
1156
1173
|
this.refreshToken = null;
|
|
1157
1174
|
}
|
|
1158
1175
|
async refresh(e, t) {
|
|
1159
|
-
const { accessToken: i, refreshToken: r, expiresIn: s } = await
|
|
1176
|
+
const { accessToken: i, refreshToken: r, expiresIn: s } = await ki(e, t);
|
|
1160
1177
|
this.updateTokensAndExpiration(i, r, Number(s));
|
|
1161
1178
|
}
|
|
1162
1179
|
updateTokensAndExpiration(e, t, i) {
|
|
@@ -1205,13 +1222,13 @@ class q {
|
|
|
1205
1222
|
* See the License for the specific language governing permissions and
|
|
1206
1223
|
* limitations under the License.
|
|
1207
1224
|
*/
|
|
1208
|
-
function
|
|
1225
|
+
function D(n, e) {
|
|
1209
1226
|
u(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
|
|
1210
1227
|
}
|
|
1211
1228
|
class C {
|
|
1212
1229
|
constructor(e) {
|
|
1213
1230
|
var { uid: t, auth: i, stsTokenManager: r } = e, s = $e(e, ["uid", "auth", "stsTokenManager"]);
|
|
1214
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
1231
|
+
this.providerId = "firebase", this.proactiveRefresh = new yi(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 Ue(s.createdAt || void 0, s.lastLoginAt || void 0);
|
|
1215
1232
|
}
|
|
1216
1233
|
async getIdToken(e) {
|
|
1217
1234
|
const t = await re(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -1223,10 +1240,10 @@ class C {
|
|
|
1223
1240
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
1224
1241
|
}
|
|
1225
1242
|
getIdTokenResult(e) {
|
|
1226
|
-
return
|
|
1243
|
+
return vi(this, e);
|
|
1227
1244
|
}
|
|
1228
1245
|
reload() {
|
|
1229
|
-
return
|
|
1246
|
+
return wi(this);
|
|
1230
1247
|
}
|
|
1231
1248
|
_assign(e) {
|
|
1232
1249
|
this !== e && (u(
|
|
@@ -1263,9 +1280,9 @@ class C {
|
|
|
1263
1280
|
}
|
|
1264
1281
|
async delete() {
|
|
1265
1282
|
if (A(this.auth.app))
|
|
1266
|
-
return Promise.reject(
|
|
1283
|
+
return Promise.reject(H(this.auth));
|
|
1267
1284
|
const e = await this.getIdToken();
|
|
1268
|
-
return await re(this,
|
|
1285
|
+
return await re(this, _i(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
1269
1286
|
}
|
|
1270
1287
|
toJSON() {
|
|
1271
1288
|
return Object.assign(Object.assign({
|
|
@@ -1293,7 +1310,7 @@ class C {
|
|
|
1293
1310
|
}
|
|
1294
1311
|
static _fromJSON(e, t) {
|
|
1295
1312
|
var i, r, s, o, c, a, l, d;
|
|
1296
|
-
const m = (i = t.displayName) !== null && i !== void 0 ? i : void 0,
|
|
1313
|
+
const m = (i = t.displayName) !== null && i !== void 0 ? i : void 0, y = (r = t.email) !== null && r !== void 0 ? r : void 0, T = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, h = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, f = (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, M = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: k, emailVerified: Ke, isAnonymous: Je, providerData: Re, stsTokenManager: Ye } = t;
|
|
1297
1314
|
u(
|
|
1298
1315
|
k && Ye,
|
|
1299
1316
|
e,
|
|
@@ -1306,7 +1323,7 @@ class C {
|
|
|
1306
1323
|
e,
|
|
1307
1324
|
"internal-error"
|
|
1308
1325
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1309
|
-
),
|
|
1326
|
+
), D(m, e.name), D(y, e.name), u(
|
|
1310
1327
|
typeof Ke == "boolean",
|
|
1311
1328
|
e,
|
|
1312
1329
|
"internal-error"
|
|
@@ -1316,22 +1333,22 @@ class C {
|
|
|
1316
1333
|
e,
|
|
1317
1334
|
"internal-error"
|
|
1318
1335
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1319
|
-
),
|
|
1336
|
+
), D(T, e.name), D(h, e.name), D(f, e.name), D(g, e.name), D(v, e.name), D(M, e.name);
|
|
1320
1337
|
const Ae = new C({
|
|
1321
1338
|
uid: k,
|
|
1322
1339
|
auth: e,
|
|
1323
|
-
email:
|
|
1340
|
+
email: y,
|
|
1324
1341
|
emailVerified: Ke,
|
|
1325
1342
|
displayName: m,
|
|
1326
1343
|
isAnonymous: Je,
|
|
1327
|
-
photoURL:
|
|
1328
|
-
phoneNumber:
|
|
1329
|
-
tenantId:
|
|
1344
|
+
photoURL: h,
|
|
1345
|
+
phoneNumber: T,
|
|
1346
|
+
tenantId: f,
|
|
1330
1347
|
stsTokenManager: on,
|
|
1331
|
-
createdAt:
|
|
1348
|
+
createdAt: v,
|
|
1332
1349
|
lastLoginAt: M
|
|
1333
1350
|
});
|
|
1334
|
-
return Re && Array.isArray(Re) && (Ae.providerData = Re.map((an) => Object.assign({}, an))),
|
|
1351
|
+
return Re && Array.isArray(Re) && (Ae.providerData = Re.map((an) => Object.assign({}, an))), g && (Ae._redirectEventId = g), Ae;
|
|
1335
1352
|
}
|
|
1336
1353
|
/**
|
|
1337
1354
|
* Initialize a User from an idToken server response
|
|
@@ -1555,9 +1572,9 @@ function ot(n) {
|
|
|
1555
1572
|
return "Silk";
|
|
1556
1573
|
if (Ht(e))
|
|
1557
1574
|
return "Blackberry";
|
|
1558
|
-
if (
|
|
1575
|
+
if (Wt(e))
|
|
1559
1576
|
return "Webos";
|
|
1560
|
-
if (
|
|
1577
|
+
if (Ge(e))
|
|
1561
1578
|
return "Safari";
|
|
1562
1579
|
if ((e.includes("chrome/") || Ft(e)) && !e.includes("edge/"))
|
|
1563
1580
|
return "Chrome";
|
|
@@ -1573,7 +1590,7 @@ function ot(n) {
|
|
|
1573
1590
|
function xt(n = w()) {
|
|
1574
1591
|
return /firefox\//i.test(n);
|
|
1575
1592
|
}
|
|
1576
|
-
function
|
|
1593
|
+
function Ge(n = w()) {
|
|
1577
1594
|
const e = n.toLowerCase();
|
|
1578
1595
|
return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
|
|
1579
1596
|
}
|
|
@@ -1589,23 +1606,23 @@ function $t(n = w()) {
|
|
|
1589
1606
|
function Ht(n = w()) {
|
|
1590
1607
|
return /blackberry/i.test(n);
|
|
1591
1608
|
}
|
|
1592
|
-
function
|
|
1609
|
+
function Wt(n = w()) {
|
|
1593
1610
|
return /webos/i.test(n);
|
|
1594
1611
|
}
|
|
1595
1612
|
function ke(n = w()) {
|
|
1596
1613
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
1597
1614
|
}
|
|
1598
|
-
function
|
|
1615
|
+
function Ei(n = w()) {
|
|
1599
1616
|
var e;
|
|
1600
1617
|
return ke(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
1601
1618
|
}
|
|
1602
|
-
function
|
|
1603
|
-
return
|
|
1619
|
+
function Si() {
|
|
1620
|
+
return Mn() && document.documentMode === 10;
|
|
1604
1621
|
}
|
|
1605
|
-
function
|
|
1606
|
-
return ke(n) || $t(n) ||
|
|
1622
|
+
function jt(n = w()) {
|
|
1623
|
+
return ke(n) || $t(n) || Wt(n) || Ht(n) || /windows phone/i.test(n) || Vt(n);
|
|
1607
1624
|
}
|
|
1608
|
-
function
|
|
1625
|
+
function Ri() {
|
|
1609
1626
|
try {
|
|
1610
1627
|
return !!(window && window !== window.top);
|
|
1611
1628
|
} catch {
|
|
@@ -1628,7 +1645,7 @@ function Ei() {
|
|
|
1628
1645
|
* See the License for the specific language governing permissions and
|
|
1629
1646
|
* limitations under the License.
|
|
1630
1647
|
*/
|
|
1631
|
-
function
|
|
1648
|
+
function Gt(n, e = []) {
|
|
1632
1649
|
let t;
|
|
1633
1650
|
switch (n) {
|
|
1634
1651
|
case "Browser":
|
|
@@ -1659,7 +1676,7 @@ function Bt(n, e = []) {
|
|
|
1659
1676
|
* See the License for the specific language governing permissions and
|
|
1660
1677
|
* limitations under the License.
|
|
1661
1678
|
*/
|
|
1662
|
-
class
|
|
1679
|
+
class Ai {
|
|
1663
1680
|
constructor(e) {
|
|
1664
1681
|
this.auth = e, this.queue = [];
|
|
1665
1682
|
}
|
|
@@ -1714,8 +1731,8 @@ class Si {
|
|
|
1714
1731
|
* See the License for the specific language governing permissions and
|
|
1715
1732
|
* limitations under the License.
|
|
1716
1733
|
*/
|
|
1717
|
-
async function
|
|
1718
|
-
return
|
|
1734
|
+
async function Pi(n, e = {}) {
|
|
1735
|
+
return Q(n, "GET", "/v2/passwordPolicy", Te(n, e));
|
|
1719
1736
|
}
|
|
1720
1737
|
/**
|
|
1721
1738
|
* @license
|
|
@@ -1733,12 +1750,12 @@ async function Ri(n, e = {}) {
|
|
|
1733
1750
|
* See the License for the specific language governing permissions and
|
|
1734
1751
|
* limitations under the License.
|
|
1735
1752
|
*/
|
|
1736
|
-
const
|
|
1737
|
-
class
|
|
1753
|
+
const Ci = 6;
|
|
1754
|
+
class Ni {
|
|
1738
1755
|
constructor(e) {
|
|
1739
1756
|
var t, i, r, s;
|
|
1740
1757
|
const o = e.customStrengthOptions;
|
|
1741
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t :
|
|
1758
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : Ci, 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;
|
|
1742
1759
|
}
|
|
1743
1760
|
validatePassword(e) {
|
|
1744
1761
|
var t, i, r, s, o, c;
|
|
@@ -1821,9 +1838,9 @@ class Pi {
|
|
|
1821
1838
|
* See the License for the specific language governing permissions and
|
|
1822
1839
|
* limitations under the License.
|
|
1823
1840
|
*/
|
|
1824
|
-
class
|
|
1841
|
+
class Oi {
|
|
1825
1842
|
constructor(e, t, i, r) {
|
|
1826
|
-
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new at(this), this.idTokenSubscription = new at(this), this.beforeStateQueue = new
|
|
1843
|
+
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new at(this), this.idTokenSubscription = new at(this), this.beforeStateQueue = new Ai(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = At, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = r.sdkClientVersion;
|
|
1827
1844
|
}
|
|
1828
1845
|
_initializeWithPersistence(e, t) {
|
|
1829
1846
|
return t && (this._popupRedirectResolver = N(t)), this._initializationPromise = this.queue(async () => {
|
|
@@ -1917,15 +1934,15 @@ class Ci {
|
|
|
1917
1934
|
return this.directlySetCurrentUser(e);
|
|
1918
1935
|
}
|
|
1919
1936
|
useDeviceLanguage() {
|
|
1920
|
-
this.languageCode =
|
|
1937
|
+
this.languageCode = fi();
|
|
1921
1938
|
}
|
|
1922
1939
|
async _delete() {
|
|
1923
1940
|
this._deleted = !0;
|
|
1924
1941
|
}
|
|
1925
1942
|
async updateCurrentUser(e) {
|
|
1926
1943
|
if (A(this.app))
|
|
1927
|
-
return Promise.reject(
|
|
1928
|
-
const t = e ?
|
|
1944
|
+
return Promise.reject(H(this));
|
|
1945
|
+
const t = e ? X(e) : null;
|
|
1929
1946
|
return t && u(
|
|
1930
1947
|
t.auth.config.apiKey === this.config.apiKey,
|
|
1931
1948
|
this,
|
|
@@ -1945,14 +1962,14 @@ class Ci {
|
|
|
1945
1962
|
});
|
|
1946
1963
|
}
|
|
1947
1964
|
async signOut() {
|
|
1948
|
-
return A(this.app) ? Promise.reject(
|
|
1965
|
+
return A(this.app) ? Promise.reject(H(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
|
|
1949
1966
|
null,
|
|
1950
1967
|
/* skipBeforeStateCallbacks */
|
|
1951
1968
|
!0
|
|
1952
1969
|
));
|
|
1953
1970
|
}
|
|
1954
1971
|
setPersistence(e) {
|
|
1955
|
-
return A(this.app) ? Promise.reject(
|
|
1972
|
+
return A(this.app) ? Promise.reject(H(this)) : this.queue(async () => {
|
|
1956
1973
|
await this.assertedPersistence.setPersistence(N(e));
|
|
1957
1974
|
});
|
|
1958
1975
|
}
|
|
@@ -1968,7 +1985,7 @@ class Ci {
|
|
|
1968
1985
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
1969
1986
|
}
|
|
1970
1987
|
async _updatePasswordPolicy() {
|
|
1971
|
-
const e = await
|
|
1988
|
+
const e = await Pi(this), t = new Ni(e);
|
|
1972
1989
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
1973
1990
|
}
|
|
1974
1991
|
_getPersistence() {
|
|
@@ -2008,7 +2025,7 @@ class Ci {
|
|
|
2008
2025
|
token: e,
|
|
2009
2026
|
idToken: t
|
|
2010
2027
|
};
|
|
2011
|
-
this.tenantId != null && (i.tenantId = this.tenantId), await
|
|
2028
|
+
this.tenantId != null && (i.tenantId = this.tenantId), await bi(this, i);
|
|
2012
2029
|
}
|
|
2013
2030
|
}
|
|
2014
2031
|
toJSON() {
|
|
@@ -2121,7 +2138,7 @@ class Ci {
|
|
|
2121
2138
|
), this.persistenceManager;
|
|
2122
2139
|
}
|
|
2123
2140
|
_logFramework(e) {
|
|
2124
|
-
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion =
|
|
2141
|
+
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Gt(this.config.clientPlatform, this._getFrameworks()));
|
|
2125
2142
|
}
|
|
2126
2143
|
_getFrameworks() {
|
|
2127
2144
|
return this.frameworks;
|
|
@@ -2151,15 +2168,15 @@ class Ci {
|
|
|
2151
2168
|
async _getAppCheckToken() {
|
|
2152
2169
|
var e;
|
|
2153
2170
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
|
2154
|
-
return t != null && t.error &&
|
|
2171
|
+
return t != null && t.error && ui(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
|
2155
2172
|
}
|
|
2156
2173
|
}
|
|
2157
2174
|
function be(n) {
|
|
2158
|
-
return
|
|
2175
|
+
return X(n);
|
|
2159
2176
|
}
|
|
2160
2177
|
class at {
|
|
2161
2178
|
constructor(e) {
|
|
2162
|
-
this.auth = e, this.observer = null, this.addObserver =
|
|
2179
|
+
this.auth = e, this.observer = null, this.addObserver = Pn((t) => this.observer = t);
|
|
2163
2180
|
}
|
|
2164
2181
|
get next() {
|
|
2165
2182
|
return u(
|
|
@@ -2186,7 +2203,7 @@ class at {
|
|
|
2186
2203
|
* See the License for the specific language governing permissions and
|
|
2187
2204
|
* limitations under the License.
|
|
2188
2205
|
*/
|
|
2189
|
-
let
|
|
2206
|
+
let Be = {
|
|
2190
2207
|
async loadJS() {
|
|
2191
2208
|
throw new Error("Unable to load external scripts");
|
|
2192
2209
|
},
|
|
@@ -2194,16 +2211,16 @@ let Ge = {
|
|
|
2194
2211
|
recaptchaEnterpriseScript: "",
|
|
2195
2212
|
gapiScript: ""
|
|
2196
2213
|
};
|
|
2197
|
-
function
|
|
2198
|
-
|
|
2214
|
+
function Li(n) {
|
|
2215
|
+
Be = n;
|
|
2199
2216
|
}
|
|
2200
|
-
function
|
|
2201
|
-
return
|
|
2217
|
+
function Mi(n) {
|
|
2218
|
+
return Be.loadJS(n);
|
|
2202
2219
|
}
|
|
2203
|
-
function
|
|
2204
|
-
return
|
|
2220
|
+
function Ui() {
|
|
2221
|
+
return Be.gapiScript;
|
|
2205
2222
|
}
|
|
2206
|
-
function
|
|
2223
|
+
function Di(n) {
|
|
2207
2224
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
2208
2225
|
}
|
|
2209
2226
|
/**
|
|
@@ -2222,11 +2239,11 @@ function Mi(n) {
|
|
|
2222
2239
|
* See the License for the specific language governing permissions and
|
|
2223
2240
|
* limitations under the License.
|
|
2224
2241
|
*/
|
|
2225
|
-
function
|
|
2242
|
+
function xi(n, e) {
|
|
2226
2243
|
const t = bt(n, "auth");
|
|
2227
2244
|
if (t.isInitialized()) {
|
|
2228
2245
|
const r = t.getImmediate(), s = t.getOptions();
|
|
2229
|
-
if (
|
|
2246
|
+
if (On(s, e ?? {}))
|
|
2230
2247
|
return r;
|
|
2231
2248
|
O(
|
|
2232
2249
|
r,
|
|
@@ -2236,11 +2253,11 @@ function Ui(n, e) {
|
|
|
2236
2253
|
}
|
|
2237
2254
|
return t.initialize({ options: e });
|
|
2238
2255
|
}
|
|
2239
|
-
function
|
|
2256
|
+
function Fi(n, e) {
|
|
2240
2257
|
const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(N);
|
|
2241
2258
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
|
|
2242
2259
|
}
|
|
2243
|
-
function
|
|
2260
|
+
function Vi(n, e, t) {
|
|
2244
2261
|
const i = be(n);
|
|
2245
2262
|
u(
|
|
2246
2263
|
i._canInitEmulator,
|
|
@@ -2253,20 +2270,20 @@ function xi(n, e, t) {
|
|
|
2253
2270
|
"invalid-emulator-scheme"
|
|
2254
2271
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
2255
2272
|
);
|
|
2256
|
-
const r = !1, s =
|
|
2273
|
+
const r = !1, s = Bt(e), { host: o, port: c } = $i(e), a = c === null ? "" : `:${c}`;
|
|
2257
2274
|
i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
|
|
2258
2275
|
host: o,
|
|
2259
2276
|
port: c,
|
|
2260
2277
|
protocol: s.replace(":", ""),
|
|
2261
2278
|
options: Object.freeze({ disableWarnings: r })
|
|
2262
|
-
}),
|
|
2279
|
+
}), Hi();
|
|
2263
2280
|
}
|
|
2264
|
-
function
|
|
2281
|
+
function Bt(n) {
|
|
2265
2282
|
const e = n.indexOf(":");
|
|
2266
2283
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
2267
2284
|
}
|
|
2268
|
-
function
|
|
2269
|
-
const e =
|
|
2285
|
+
function $i(n) {
|
|
2286
|
+
const e = Bt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
2270
2287
|
if (!t)
|
|
2271
2288
|
return { host: "", port: null };
|
|
2272
2289
|
const i = t[2].split("@").pop() || "", r = /^(\[[^\]]+\])(:|$)/.exec(i);
|
|
@@ -2284,7 +2301,7 @@ function ct(n) {
|
|
|
2284
2301
|
const e = Number(n);
|
|
2285
2302
|
return isNaN(e) ? null : e;
|
|
2286
2303
|
}
|
|
2287
|
-
function
|
|
2304
|
+
function Hi() {
|
|
2288
2305
|
function n() {
|
|
2289
2306
|
const e = document.createElement("p"), t = e.style;
|
|
2290
2307
|
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);
|
|
@@ -2368,14 +2385,14 @@ async function J(n, e) {
|
|
|
2368
2385
|
* See the License for the specific language governing permissions and
|
|
2369
2386
|
* limitations under the License.
|
|
2370
2387
|
*/
|
|
2371
|
-
const
|
|
2372
|
-
class
|
|
2388
|
+
const Wi = "http://localhost";
|
|
2389
|
+
class G extends zt {
|
|
2373
2390
|
constructor() {
|
|
2374
2391
|
super(...arguments), this.pendingToken = null;
|
|
2375
2392
|
}
|
|
2376
2393
|
/** @internal */
|
|
2377
2394
|
static _fromParams(e) {
|
|
2378
|
-
const t = new
|
|
2395
|
+
const t = new G(e.providerId, e.signInMethod);
|
|
2379
2396
|
return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : O(
|
|
2380
2397
|
"argument-error"
|
|
2381
2398
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
@@ -2406,7 +2423,7 @@ class W extends zt {
|
|
|
2406
2423
|
const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = $e(t, ["providerId", "signInMethod"]);
|
|
2407
2424
|
if (!i || !r)
|
|
2408
2425
|
return null;
|
|
2409
|
-
const o = new
|
|
2426
|
+
const o = new G(i, r);
|
|
2410
2427
|
return o.idToken = s.idToken || void 0, o.accessToken = s.accessToken || void 0, o.secret = s.secret, o.nonce = s.nonce, o.pendingToken = s.pendingToken || null, o;
|
|
2411
2428
|
}
|
|
2412
2429
|
/** @internal */
|
|
@@ -2426,7 +2443,7 @@ class W extends zt {
|
|
|
2426
2443
|
}
|
|
2427
2444
|
buildRequest() {
|
|
2428
2445
|
const e = {
|
|
2429
|
-
requestUri:
|
|
2446
|
+
requestUri: Wi,
|
|
2430
2447
|
returnSecureToken: !0
|
|
2431
2448
|
};
|
|
2432
2449
|
if (this.pendingToken)
|
|
@@ -2542,7 +2559,7 @@ class ce extends qt {
|
|
|
2542
2559
|
* See the License for the specific language governing permissions and
|
|
2543
2560
|
* limitations under the License.
|
|
2544
2561
|
*/
|
|
2545
|
-
class
|
|
2562
|
+
class x extends ce {
|
|
2546
2563
|
constructor() {
|
|
2547
2564
|
super(
|
|
2548
2565
|
"facebook.com"
|
|
@@ -2562,9 +2579,9 @@ class D extends ce {
|
|
|
2562
2579
|
* @param accessToken - Facebook access token.
|
|
2563
2580
|
*/
|
|
2564
2581
|
static credential(e) {
|
|
2565
|
-
return
|
|
2566
|
-
providerId:
|
|
2567
|
-
signInMethod:
|
|
2582
|
+
return G._fromParams({
|
|
2583
|
+
providerId: x.PROVIDER_ID,
|
|
2584
|
+
signInMethod: x.FACEBOOK_SIGN_IN_METHOD,
|
|
2568
2585
|
accessToken: e
|
|
2569
2586
|
});
|
|
2570
2587
|
}
|
|
@@ -2574,7 +2591,7 @@ class D extends ce {
|
|
|
2574
2591
|
* @param userCredential - The user credential.
|
|
2575
2592
|
*/
|
|
2576
2593
|
static credentialFromResult(e) {
|
|
2577
|
-
return
|
|
2594
|
+
return x.credentialFromTaggedObject(e);
|
|
2578
2595
|
}
|
|
2579
2596
|
/**
|
|
2580
2597
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -2583,20 +2600,20 @@ class D extends ce {
|
|
|
2583
2600
|
* @param userCredential - The user credential.
|
|
2584
2601
|
*/
|
|
2585
2602
|
static credentialFromError(e) {
|
|
2586
|
-
return
|
|
2603
|
+
return x.credentialFromTaggedObject(e.customData || {});
|
|
2587
2604
|
}
|
|
2588
2605
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
2589
2606
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
|
2590
2607
|
return null;
|
|
2591
2608
|
try {
|
|
2592
|
-
return
|
|
2609
|
+
return x.credential(e.oauthAccessToken);
|
|
2593
2610
|
} catch {
|
|
2594
2611
|
return null;
|
|
2595
2612
|
}
|
|
2596
2613
|
}
|
|
2597
2614
|
}
|
|
2598
|
-
|
|
2599
|
-
|
|
2615
|
+
x.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
|
|
2616
|
+
x.PROVIDER_ID = "facebook.com";
|
|
2600
2617
|
/**
|
|
2601
2618
|
* @license
|
|
2602
2619
|
* Copyright 2020 Google LLC
|
|
@@ -2613,7 +2630,7 @@ D.PROVIDER_ID = "facebook.com";
|
|
|
2613
2630
|
* See the License for the specific language governing permissions and
|
|
2614
2631
|
* limitations under the License.
|
|
2615
2632
|
*/
|
|
2616
|
-
class
|
|
2633
|
+
class F extends ce {
|
|
2617
2634
|
constructor() {
|
|
2618
2635
|
super(
|
|
2619
2636
|
"google.com"
|
|
@@ -2634,9 +2651,9 @@ class x extends ce {
|
|
|
2634
2651
|
* @param accessToken - Google access token.
|
|
2635
2652
|
*/
|
|
2636
2653
|
static credential(e, t) {
|
|
2637
|
-
return
|
|
2638
|
-
providerId:
|
|
2639
|
-
signInMethod:
|
|
2654
|
+
return G._fromParams({
|
|
2655
|
+
providerId: F.PROVIDER_ID,
|
|
2656
|
+
signInMethod: F.GOOGLE_SIGN_IN_METHOD,
|
|
2640
2657
|
idToken: e,
|
|
2641
2658
|
accessToken: t
|
|
2642
2659
|
});
|
|
@@ -2647,7 +2664,7 @@ class x extends ce {
|
|
|
2647
2664
|
* @param userCredential - The user credential.
|
|
2648
2665
|
*/
|
|
2649
2666
|
static credentialFromResult(e) {
|
|
2650
|
-
return
|
|
2667
|
+
return F.credentialFromTaggedObject(e);
|
|
2651
2668
|
}
|
|
2652
2669
|
/**
|
|
2653
2670
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -2656,7 +2673,7 @@ class x extends ce {
|
|
|
2656
2673
|
* @param userCredential - The user credential.
|
|
2657
2674
|
*/
|
|
2658
2675
|
static credentialFromError(e) {
|
|
2659
|
-
return
|
|
2676
|
+
return F.credentialFromTaggedObject(e.customData || {});
|
|
2660
2677
|
}
|
|
2661
2678
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
2662
2679
|
if (!e)
|
|
@@ -2665,14 +2682,14 @@ class x extends ce {
|
|
|
2665
2682
|
if (!t && !i)
|
|
2666
2683
|
return null;
|
|
2667
2684
|
try {
|
|
2668
|
-
return
|
|
2685
|
+
return F.credential(t, i);
|
|
2669
2686
|
} catch {
|
|
2670
2687
|
return null;
|
|
2671
2688
|
}
|
|
2672
2689
|
}
|
|
2673
2690
|
}
|
|
2674
|
-
|
|
2675
|
-
|
|
2691
|
+
F.GOOGLE_SIGN_IN_METHOD = "google.com";
|
|
2692
|
+
F.PROVIDER_ID = "google.com";
|
|
2676
2693
|
/**
|
|
2677
2694
|
* @license
|
|
2678
2695
|
* Copyright 2020 Google LLC
|
|
@@ -2689,7 +2706,7 @@ x.PROVIDER_ID = "google.com";
|
|
|
2689
2706
|
* See the License for the specific language governing permissions and
|
|
2690
2707
|
* limitations under the License.
|
|
2691
2708
|
*/
|
|
2692
|
-
class
|
|
2709
|
+
class V extends ce {
|
|
2693
2710
|
constructor() {
|
|
2694
2711
|
super(
|
|
2695
2712
|
"github.com"
|
|
@@ -2702,9 +2719,9 @@ class F extends ce {
|
|
|
2702
2719
|
* @param accessToken - Github access token.
|
|
2703
2720
|
*/
|
|
2704
2721
|
static credential(e) {
|
|
2705
|
-
return
|
|
2706
|
-
providerId:
|
|
2707
|
-
signInMethod:
|
|
2722
|
+
return G._fromParams({
|
|
2723
|
+
providerId: V.PROVIDER_ID,
|
|
2724
|
+
signInMethod: V.GITHUB_SIGN_IN_METHOD,
|
|
2708
2725
|
accessToken: e
|
|
2709
2726
|
});
|
|
2710
2727
|
}
|
|
@@ -2714,7 +2731,7 @@ class F extends ce {
|
|
|
2714
2731
|
* @param userCredential - The user credential.
|
|
2715
2732
|
*/
|
|
2716
2733
|
static credentialFromResult(e) {
|
|
2717
|
-
return
|
|
2734
|
+
return V.credentialFromTaggedObject(e);
|
|
2718
2735
|
}
|
|
2719
2736
|
/**
|
|
2720
2737
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -2723,20 +2740,20 @@ class F extends ce {
|
|
|
2723
2740
|
* @param userCredential - The user credential.
|
|
2724
2741
|
*/
|
|
2725
2742
|
static credentialFromError(e) {
|
|
2726
|
-
return
|
|
2743
|
+
return V.credentialFromTaggedObject(e.customData || {});
|
|
2727
2744
|
}
|
|
2728
2745
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
2729
2746
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
|
2730
2747
|
return null;
|
|
2731
2748
|
try {
|
|
2732
|
-
return
|
|
2749
|
+
return V.credential(e.oauthAccessToken);
|
|
2733
2750
|
} catch {
|
|
2734
2751
|
return null;
|
|
2735
2752
|
}
|
|
2736
2753
|
}
|
|
2737
2754
|
}
|
|
2738
|
-
|
|
2739
|
-
|
|
2755
|
+
V.GITHUB_SIGN_IN_METHOD = "github.com";
|
|
2756
|
+
V.PROVIDER_ID = "github.com";
|
|
2740
2757
|
/**
|
|
2741
2758
|
* @license
|
|
2742
2759
|
* Copyright 2020 Google LLC
|
|
@@ -2753,7 +2770,7 @@ F.PROVIDER_ID = "github.com";
|
|
|
2753
2770
|
* See the License for the specific language governing permissions and
|
|
2754
2771
|
* limitations under the License.
|
|
2755
2772
|
*/
|
|
2756
|
-
class
|
|
2773
|
+
class $ extends ce {
|
|
2757
2774
|
constructor() {
|
|
2758
2775
|
super(
|
|
2759
2776
|
"twitter.com"
|
|
@@ -2767,9 +2784,9 @@ class V extends ce {
|
|
|
2767
2784
|
* @param secret - Twitter secret.
|
|
2768
2785
|
*/
|
|
2769
2786
|
static credential(e, t) {
|
|
2770
|
-
return
|
|
2771
|
-
providerId:
|
|
2772
|
-
signInMethod:
|
|
2787
|
+
return G._fromParams({
|
|
2788
|
+
providerId: $.PROVIDER_ID,
|
|
2789
|
+
signInMethod: $.TWITTER_SIGN_IN_METHOD,
|
|
2773
2790
|
oauthToken: e,
|
|
2774
2791
|
oauthTokenSecret: t
|
|
2775
2792
|
});
|
|
@@ -2780,7 +2797,7 @@ class V extends ce {
|
|
|
2780
2797
|
* @param userCredential - The user credential.
|
|
2781
2798
|
*/
|
|
2782
2799
|
static credentialFromResult(e) {
|
|
2783
|
-
return
|
|
2800
|
+
return $.credentialFromTaggedObject(e);
|
|
2784
2801
|
}
|
|
2785
2802
|
/**
|
|
2786
2803
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -2789,7 +2806,7 @@ class V extends ce {
|
|
|
2789
2806
|
* @param userCredential - The user credential.
|
|
2790
2807
|
*/
|
|
2791
2808
|
static credentialFromError(e) {
|
|
2792
|
-
return
|
|
2809
|
+
return $.credentialFromTaggedObject(e.customData || {});
|
|
2793
2810
|
}
|
|
2794
2811
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
2795
2812
|
if (!e)
|
|
@@ -2798,14 +2815,14 @@ class V extends ce {
|
|
|
2798
2815
|
if (!t || !i)
|
|
2799
2816
|
return null;
|
|
2800
2817
|
try {
|
|
2801
|
-
return
|
|
2818
|
+
return $.credential(t, i);
|
|
2802
2819
|
} catch {
|
|
2803
2820
|
return null;
|
|
2804
2821
|
}
|
|
2805
2822
|
}
|
|
2806
2823
|
}
|
|
2807
|
-
|
|
2808
|
-
|
|
2824
|
+
$.TWITTER_SIGN_IN_METHOD = "twitter.com";
|
|
2825
|
+
$.PROVIDER_ID = "twitter.com";
|
|
2809
2826
|
/**
|
|
2810
2827
|
* @license
|
|
2811
2828
|
* Copyright 2020 Google LLC
|
|
@@ -2888,7 +2905,7 @@ function Kt(n, e, t, i) {
|
|
|
2888
2905
|
throw s.code === "auth/multi-factor-auth-required" ? Ie._fromErrorAndOperation(n, s, e, i) : s;
|
|
2889
2906
|
});
|
|
2890
2907
|
}
|
|
2891
|
-
async function
|
|
2908
|
+
async function ji(n, e, t = !1) {
|
|
2892
2909
|
const i = await re(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
2893
2910
|
return B._forOperation(n, "link", i);
|
|
2894
2911
|
}
|
|
@@ -2908,10 +2925,10 @@ async function Hi(n, e, t = !1) {
|
|
|
2908
2925
|
* See the License for the specific language governing permissions and
|
|
2909
2926
|
* limitations under the License.
|
|
2910
2927
|
*/
|
|
2911
|
-
async function
|
|
2928
|
+
async function Gi(n, e, t = !1) {
|
|
2912
2929
|
const { auth: i } = n;
|
|
2913
2930
|
if (A(i.app))
|
|
2914
|
-
return Promise.reject(
|
|
2931
|
+
return Promise.reject(H(i));
|
|
2915
2932
|
const r = "reauthenticate";
|
|
2916
2933
|
try {
|
|
2917
2934
|
const s = await re(n, Kt(i, r, e, n), t);
|
|
@@ -2921,7 +2938,7 @@ async function ji(n, e, t = !1) {
|
|
|
2921
2938
|
"internal-error"
|
|
2922
2939
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
2923
2940
|
);
|
|
2924
|
-
const o =
|
|
2941
|
+
const o = je(s.idToken);
|
|
2925
2942
|
u(
|
|
2926
2943
|
o,
|
|
2927
2944
|
i,
|
|
@@ -2959,9 +2976,9 @@ async function ji(n, e, t = !1) {
|
|
|
2959
2976
|
* See the License for the specific language governing permissions and
|
|
2960
2977
|
* limitations under the License.
|
|
2961
2978
|
*/
|
|
2962
|
-
async function
|
|
2979
|
+
async function Bi(n, e, t = !1) {
|
|
2963
2980
|
if (A(n.app))
|
|
2964
|
-
return Promise.reject(
|
|
2981
|
+
return Promise.reject(H(n));
|
|
2965
2982
|
const i = "signIn", r = await Kt(n, i, e), s = await B._fromIdTokenResponse(n, i, r);
|
|
2966
2983
|
return t || await n._updateCurrentUser(s.user), s;
|
|
2967
2984
|
}
|
|
@@ -2981,7 +2998,7 @@ async function Wi(n, e, t = !1) {
|
|
|
2981
2998
|
* See the License for the specific language governing permissions and
|
|
2982
2999
|
* limitations under the License.
|
|
2983
3000
|
*/
|
|
2984
|
-
async function
|
|
3001
|
+
async function zi(n, e) {
|
|
2985
3002
|
return Ot(n, "POST", "/v1/accounts:signInWithCustomToken", Te(n, e));
|
|
2986
3003
|
}
|
|
2987
3004
|
/**
|
|
@@ -3000,20 +3017,20 @@ async function Bi(n, e) {
|
|
|
3000
3017
|
* See the License for the specific language governing permissions and
|
|
3001
3018
|
* limitations under the License.
|
|
3002
3019
|
*/
|
|
3003
|
-
async function
|
|
3020
|
+
async function qi(n, e) {
|
|
3004
3021
|
if (A(n.app))
|
|
3005
|
-
return Promise.reject(
|
|
3006
|
-
const t = be(n), i = await
|
|
3022
|
+
return Promise.reject(H(n));
|
|
3023
|
+
const t = be(n), i = await zi(t, {
|
|
3007
3024
|
token: e,
|
|
3008
3025
|
returnSecureToken: !0
|
|
3009
3026
|
}), r = await B._fromIdTokenResponse(t, "signIn", i);
|
|
3010
3027
|
return await t._updateCurrentUser(r.user), r;
|
|
3011
3028
|
}
|
|
3012
|
-
function
|
|
3013
|
-
return
|
|
3029
|
+
function Ki(n, e, t, i) {
|
|
3030
|
+
return X(n).onIdTokenChanged(e, t, i);
|
|
3014
3031
|
}
|
|
3015
|
-
function
|
|
3016
|
-
return
|
|
3032
|
+
function Ji(n, e, t) {
|
|
3033
|
+
return X(n).beforeAuthStateChanged(e, t);
|
|
3017
3034
|
}
|
|
3018
3035
|
const ye = "__sak";
|
|
3019
3036
|
/**
|
|
@@ -3073,18 +3090,18 @@ class Jt {
|
|
|
3073
3090
|
* See the License for the specific language governing permissions and
|
|
3074
3091
|
* limitations under the License.
|
|
3075
3092
|
*/
|
|
3076
|
-
function
|
|
3093
|
+
function Yi() {
|
|
3077
3094
|
const n = w();
|
|
3078
|
-
return
|
|
3095
|
+
return Ge(n) || ke(n);
|
|
3079
3096
|
}
|
|
3080
|
-
const
|
|
3097
|
+
const Xi = 1e3, Qi = 10;
|
|
3081
3098
|
class Yt extends Jt {
|
|
3082
3099
|
constructor() {
|
|
3083
3100
|
super(
|
|
3084
3101
|
() => window.localStorage,
|
|
3085
3102
|
"LOCAL"
|
|
3086
3103
|
/* PersistenceType.LOCAL */
|
|
3087
|
-
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced =
|
|
3104
|
+
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = Yi() && Ri(), this.fallbackToPolling = jt(), this._shouldAllowMigration = !0;
|
|
3088
3105
|
}
|
|
3089
3106
|
forAllChangedKeys(e) {
|
|
3090
3107
|
for (const t of Object.keys(this.listeners)) {
|
|
@@ -3111,7 +3128,7 @@ class Yt extends Jt {
|
|
|
3111
3128
|
const o = this.storage.getItem(i);
|
|
3112
3129
|
!t && this.localCache[i] === o || this.notifyListeners(i, o);
|
|
3113
3130
|
}, s = this.storage.getItem(i);
|
|
3114
|
-
|
|
3131
|
+
Si() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Qi) : r();
|
|
3115
3132
|
}
|
|
3116
3133
|
notifyListeners(e, t) {
|
|
3117
3134
|
this.localCache[e] = t;
|
|
@@ -3133,7 +3150,7 @@ class Yt extends Jt {
|
|
|
3133
3150
|
!0
|
|
3134
3151
|
);
|
|
3135
3152
|
});
|
|
3136
|
-
},
|
|
3153
|
+
}, Xi);
|
|
3137
3154
|
}
|
|
3138
3155
|
stopPolling() {
|
|
3139
3156
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -3163,7 +3180,7 @@ class Yt extends Jt {
|
|
|
3163
3180
|
}
|
|
3164
3181
|
}
|
|
3165
3182
|
Yt.type = "LOCAL";
|
|
3166
|
-
const
|
|
3183
|
+
const Zi = Yt;
|
|
3167
3184
|
/**
|
|
3168
3185
|
* @license
|
|
3169
3186
|
* Copyright 2020 Google LLC
|
|
@@ -3211,7 +3228,7 @@ const Qt = Xt;
|
|
|
3211
3228
|
* See the License for the specific language governing permissions and
|
|
3212
3229
|
* limitations under the License.
|
|
3213
3230
|
*/
|
|
3214
|
-
function
|
|
3231
|
+
function er(n) {
|
|
3215
3232
|
return Promise.all(n.map(async (e) => {
|
|
3216
3233
|
try {
|
|
3217
3234
|
return {
|
|
@@ -3281,7 +3298,7 @@ class Ee {
|
|
|
3281
3298
|
eventId: i,
|
|
3282
3299
|
eventType: r
|
|
3283
3300
|
});
|
|
3284
|
-
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await
|
|
3301
|
+
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await er(c);
|
|
3285
3302
|
t.ports[0].postMessage({
|
|
3286
3303
|
status: "done",
|
|
3287
3304
|
eventId: i,
|
|
@@ -3349,7 +3366,7 @@ function ze(n = "", e = 10) {
|
|
|
3349
3366
|
* See the License for the specific language governing permissions and
|
|
3350
3367
|
* limitations under the License.
|
|
3351
3368
|
*/
|
|
3352
|
-
class
|
|
3369
|
+
class tr {
|
|
3353
3370
|
constructor(e) {
|
|
3354
3371
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
|
3355
3372
|
}
|
|
@@ -3394,9 +3411,9 @@ class Zi {
|
|
|
3394
3411
|
o = {
|
|
3395
3412
|
messageChannel: r,
|
|
3396
3413
|
onMessage(m) {
|
|
3397
|
-
const
|
|
3398
|
-
if (
|
|
3399
|
-
switch (
|
|
3414
|
+
const y = m;
|
|
3415
|
+
if (y.data.eventId === l)
|
|
3416
|
+
switch (y.data.status) {
|
|
3400
3417
|
case "ack":
|
|
3401
3418
|
clearTimeout(d), s = setTimeout(
|
|
3402
3419
|
() => {
|
|
@@ -3410,7 +3427,7 @@ class Zi {
|
|
|
3410
3427
|
);
|
|
3411
3428
|
break;
|
|
3412
3429
|
case "done":
|
|
3413
|
-
clearTimeout(s), c(
|
|
3430
|
+
clearTimeout(s), c(y.data.response);
|
|
3414
3431
|
break;
|
|
3415
3432
|
default:
|
|
3416
3433
|
clearTimeout(d), clearTimeout(s), a(new Error(
|
|
@@ -3449,7 +3466,7 @@ class Zi {
|
|
|
3449
3466
|
function E() {
|
|
3450
3467
|
return window;
|
|
3451
3468
|
}
|
|
3452
|
-
function
|
|
3469
|
+
function nr(n) {
|
|
3453
3470
|
E().location.href = n;
|
|
3454
3471
|
}
|
|
3455
3472
|
/**
|
|
@@ -3471,7 +3488,7 @@ function er(n) {
|
|
|
3471
3488
|
function Zt() {
|
|
3472
3489
|
return typeof E().WorkerGlobalScope < "u" && typeof E().importScripts == "function";
|
|
3473
3490
|
}
|
|
3474
|
-
async function
|
|
3491
|
+
async function ir() {
|
|
3475
3492
|
if (!(navigator != null && navigator.serviceWorker))
|
|
3476
3493
|
return null;
|
|
3477
3494
|
try {
|
|
@@ -3480,11 +3497,11 @@ async function tr() {
|
|
|
3480
3497
|
return null;
|
|
3481
3498
|
}
|
|
3482
3499
|
}
|
|
3483
|
-
function
|
|
3500
|
+
function rr() {
|
|
3484
3501
|
var n;
|
|
3485
3502
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
3486
3503
|
}
|
|
3487
|
-
function
|
|
3504
|
+
function sr() {
|
|
3488
3505
|
return Zt() ? self : null;
|
|
3489
3506
|
}
|
|
3490
3507
|
/**
|
|
@@ -3503,7 +3520,7 @@ function ir() {
|
|
|
3503
3520
|
* See the License for the specific language governing permissions and
|
|
3504
3521
|
* limitations under the License.
|
|
3505
3522
|
*/
|
|
3506
|
-
const en = "firebaseLocalStorageDb",
|
|
3523
|
+
const en = "firebaseLocalStorageDb", or = 1, we = "firebaseLocalStorage", tn = "fbase_key";
|
|
3507
3524
|
class le {
|
|
3508
3525
|
constructor(e) {
|
|
3509
3526
|
this.request = e;
|
|
@@ -3521,12 +3538,12 @@ class le {
|
|
|
3521
3538
|
function Se(n, e) {
|
|
3522
3539
|
return n.transaction([we], e ? "readwrite" : "readonly").objectStore(we);
|
|
3523
3540
|
}
|
|
3524
|
-
function
|
|
3541
|
+
function ar() {
|
|
3525
3542
|
const n = indexedDB.deleteDatabase(en);
|
|
3526
3543
|
return new le(n).toPromise();
|
|
3527
3544
|
}
|
|
3528
3545
|
function De() {
|
|
3529
|
-
const n = indexedDB.open(en,
|
|
3546
|
+
const n = indexedDB.open(en, or);
|
|
3530
3547
|
return new Promise((e, t) => {
|
|
3531
3548
|
n.addEventListener("error", () => {
|
|
3532
3549
|
t(n.error);
|
|
@@ -3539,7 +3556,7 @@ function De() {
|
|
|
3539
3556
|
}
|
|
3540
3557
|
}), n.addEventListener("success", async () => {
|
|
3541
3558
|
const i = n.result;
|
|
3542
|
-
i.objectStoreNames.contains(we) ? e(i) : (i.close(), await
|
|
3559
|
+
i.objectStoreNames.contains(we) ? e(i) : (i.close(), await ar(), e(await De()));
|
|
3543
3560
|
});
|
|
3544
3561
|
});
|
|
3545
3562
|
}
|
|
@@ -3550,7 +3567,7 @@ async function ut(n, e, t) {
|
|
|
3550
3567
|
});
|
|
3551
3568
|
return new le(i).toPromise();
|
|
3552
3569
|
}
|
|
3553
|
-
async function
|
|
3570
|
+
async function cr(n, e) {
|
|
3554
3571
|
const t = Se(n, !1).get(e), i = await new le(t).toPromise();
|
|
3555
3572
|
return i === void 0 ? null : i.value;
|
|
3556
3573
|
}
|
|
@@ -3558,7 +3575,7 @@ function dt(n, e) {
|
|
|
3558
3575
|
const t = Se(n, !0).delete(e);
|
|
3559
3576
|
return new le(t).toPromise();
|
|
3560
3577
|
}
|
|
3561
|
-
const
|
|
3578
|
+
const lr = 800, ur = 3;
|
|
3562
3579
|
class nn {
|
|
3563
3580
|
constructor() {
|
|
3564
3581
|
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(() => {
|
|
@@ -3575,7 +3592,7 @@ class nn {
|
|
|
3575
3592
|
const i = await this._openDb();
|
|
3576
3593
|
return await e(i);
|
|
3577
3594
|
} catch (i) {
|
|
3578
|
-
if (t++ >
|
|
3595
|
+
if (t++ > ur)
|
|
3579
3596
|
throw i;
|
|
3580
3597
|
this.db && (this.db.close(), this.db = void 0);
|
|
3581
3598
|
}
|
|
@@ -3591,7 +3608,7 @@ class nn {
|
|
|
3591
3608
|
* As the worker we should listen to events from the main window.
|
|
3592
3609
|
*/
|
|
3593
3610
|
async initializeReceiver() {
|
|
3594
|
-
this.receiver = Ee._getInstance(
|
|
3611
|
+
this.receiver = Ee._getInstance(sr()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
3595
3612
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
3596
3613
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
3597
3614
|
"keyChanged"
|
|
@@ -3607,9 +3624,9 @@ class nn {
|
|
|
3607
3624
|
*/
|
|
3608
3625
|
async initializeSender() {
|
|
3609
3626
|
var e, t;
|
|
3610
|
-
if (this.activeServiceWorker = await
|
|
3627
|
+
if (this.activeServiceWorker = await ir(), !this.activeServiceWorker)
|
|
3611
3628
|
return;
|
|
3612
|
-
this.sender = new
|
|
3629
|
+
this.sender = new tr(this.activeServiceWorker);
|
|
3613
3630
|
const i = await this.sender._send(
|
|
3614
3631
|
"ping",
|
|
3615
3632
|
{},
|
|
@@ -3631,7 +3648,7 @@ class nn {
|
|
|
3631
3648
|
* @param key - Storage key which changed.
|
|
3632
3649
|
*/
|
|
3633
3650
|
async notifyServiceWorker(e) {
|
|
3634
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
3651
|
+
if (!(!this.sender || !this.activeServiceWorker || rr() !== this.activeServiceWorker))
|
|
3635
3652
|
try {
|
|
3636
3653
|
await this.sender._send(
|
|
3637
3654
|
"keyChanged",
|
|
@@ -3665,7 +3682,7 @@ class nn {
|
|
|
3665
3682
|
return this._withPendingWrite(async () => (await this._withRetries((i) => ut(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
3666
3683
|
}
|
|
3667
3684
|
async _get(e) {
|
|
3668
|
-
const t = await this._withRetries((i) =>
|
|
3685
|
+
const t = await this._withRetries((i) => cr(i, e));
|
|
3669
3686
|
return this.localCache[e] = t, t;
|
|
3670
3687
|
}
|
|
3671
3688
|
async _remove(e) {
|
|
@@ -3696,7 +3713,7 @@ class nn {
|
|
|
3696
3713
|
r(t);
|
|
3697
3714
|
}
|
|
3698
3715
|
startPolling() {
|
|
3699
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
3716
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), lr);
|
|
3700
3717
|
}
|
|
3701
3718
|
stopPolling() {
|
|
3702
3719
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -3709,7 +3726,7 @@ class nn {
|
|
|
3709
3726
|
}
|
|
3710
3727
|
}
|
|
3711
3728
|
nn.type = "LOCAL";
|
|
3712
|
-
const
|
|
3729
|
+
const dr = nn;
|
|
3713
3730
|
new ae(3e4, 6e4);
|
|
3714
3731
|
/**
|
|
3715
3732
|
* @license
|
|
@@ -3727,7 +3744,7 @@ new ae(3e4, 6e4);
|
|
|
3727
3744
|
* See the License for the specific language governing permissions and
|
|
3728
3745
|
* limitations under the License.
|
|
3729
3746
|
*/
|
|
3730
|
-
function
|
|
3747
|
+
function hr(n, e) {
|
|
3731
3748
|
return e ? N(e) : (u(
|
|
3732
3749
|
n._popupRedirectResolver,
|
|
3733
3750
|
n,
|
|
@@ -3781,26 +3798,26 @@ class qe extends zt {
|
|
|
3781
3798
|
return e && (t.idToken = e), t;
|
|
3782
3799
|
}
|
|
3783
3800
|
}
|
|
3784
|
-
function
|
|
3785
|
-
return
|
|
3801
|
+
function fr(n) {
|
|
3802
|
+
return Bi(n.auth, new qe(n), n.bypassAuthState);
|
|
3786
3803
|
}
|
|
3787
|
-
function
|
|
3804
|
+
function pr(n) {
|
|
3788
3805
|
const { auth: e, user: t } = n;
|
|
3789
3806
|
return u(
|
|
3790
3807
|
t,
|
|
3791
3808
|
e,
|
|
3792
3809
|
"internal-error"
|
|
3793
3810
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3794
|
-
),
|
|
3811
|
+
), Gi(t, new qe(n), n.bypassAuthState);
|
|
3795
3812
|
}
|
|
3796
|
-
async function
|
|
3813
|
+
async function mr(n) {
|
|
3797
3814
|
const { auth: e, user: t } = n;
|
|
3798
3815
|
return u(
|
|
3799
3816
|
t,
|
|
3800
3817
|
e,
|
|
3801
3818
|
"internal-error"
|
|
3802
3819
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3803
|
-
),
|
|
3820
|
+
), ji(t, new qe(n), n.bypassAuthState);
|
|
3804
3821
|
}
|
|
3805
3822
|
/**
|
|
3806
3823
|
* @license
|
|
@@ -3860,13 +3877,13 @@ class rn {
|
|
|
3860
3877
|
switch (e) {
|
|
3861
3878
|
case "signInViaPopup":
|
|
3862
3879
|
case "signInViaRedirect":
|
|
3863
|
-
return
|
|
3880
|
+
return fr;
|
|
3864
3881
|
case "linkViaPopup":
|
|
3865
3882
|
case "linkViaRedirect":
|
|
3866
|
-
return
|
|
3883
|
+
return mr;
|
|
3867
3884
|
case "reauthViaPopup":
|
|
3868
3885
|
case "reauthViaRedirect":
|
|
3869
|
-
return
|
|
3886
|
+
return pr;
|
|
3870
3887
|
default:
|
|
3871
3888
|
O(
|
|
3872
3889
|
this.auth,
|
|
@@ -3901,7 +3918,7 @@ class rn {
|
|
|
3901
3918
|
* See the License for the specific language governing permissions and
|
|
3902
3919
|
* limitations under the License.
|
|
3903
3920
|
*/
|
|
3904
|
-
const
|
|
3921
|
+
const gr = new ae(2e3, 1e4);
|
|
3905
3922
|
class z extends rn {
|
|
3906
3923
|
constructor(e, t, i, r, s) {
|
|
3907
3924
|
super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, z.currentPopupAction && z.currentPopupAction.cancel(), z.currentPopupAction = this;
|
|
@@ -3965,7 +3982,7 @@ class z extends rn {
|
|
|
3965
3982
|
);
|
|
3966
3983
|
return;
|
|
3967
3984
|
}
|
|
3968
|
-
this.pollId = window.setTimeout(e,
|
|
3985
|
+
this.pollId = window.setTimeout(e, gr.get());
|
|
3969
3986
|
};
|
|
3970
3987
|
e();
|
|
3971
3988
|
}
|
|
@@ -3987,8 +4004,8 @@ z.currentPopupAction = null;
|
|
|
3987
4004
|
* See the License for the specific language governing permissions and
|
|
3988
4005
|
* limitations under the License.
|
|
3989
4006
|
*/
|
|
3990
|
-
const
|
|
3991
|
-
class
|
|
4007
|
+
const _r = "pendingRedirect", fe = /* @__PURE__ */ new Map();
|
|
4008
|
+
class vr extends rn {
|
|
3992
4009
|
constructor(e, t, i = !1) {
|
|
3993
4010
|
super(e, [
|
|
3994
4011
|
"signInViaRedirect",
|
|
@@ -4006,7 +4023,7 @@ class gr extends rn {
|
|
|
4006
4023
|
let e = fe.get(this.auth._key());
|
|
4007
4024
|
if (!e) {
|
|
4008
4025
|
try {
|
|
4009
|
-
const i = await
|
|
4026
|
+
const i = await Ir(this.resolver, this.auth) ? await super.execute() : null;
|
|
4010
4027
|
e = () => Promise.resolve(i);
|
|
4011
4028
|
} catch (t) {
|
|
4012
4029
|
e = () => Promise.reject(t);
|
|
@@ -4034,26 +4051,26 @@ class gr extends rn {
|
|
|
4034
4051
|
cleanUp() {
|
|
4035
4052
|
}
|
|
4036
4053
|
}
|
|
4037
|
-
async function
|
|
4038
|
-
const t =
|
|
4054
|
+
async function Ir(n, e) {
|
|
4055
|
+
const t = Tr(e), i = wr(n);
|
|
4039
4056
|
if (!await i._isAvailable())
|
|
4040
4057
|
return !1;
|
|
4041
4058
|
const r = await i._get(t) === "true";
|
|
4042
4059
|
return await i._remove(t), r;
|
|
4043
4060
|
}
|
|
4044
|
-
function
|
|
4061
|
+
function yr(n, e) {
|
|
4045
4062
|
fe.set(n._key(), e);
|
|
4046
4063
|
}
|
|
4047
|
-
function
|
|
4064
|
+
function wr(n) {
|
|
4048
4065
|
return N(n._redirectPersistence);
|
|
4049
4066
|
}
|
|
4050
|
-
function
|
|
4051
|
-
return he(
|
|
4067
|
+
function Tr(n) {
|
|
4068
|
+
return he(_r, n.config.apiKey, n.name);
|
|
4052
4069
|
}
|
|
4053
|
-
async function
|
|
4070
|
+
async function kr(n, e, t = !1) {
|
|
4054
4071
|
if (A(n.app))
|
|
4055
|
-
return Promise.reject(
|
|
4056
|
-
const i = be(n), r =
|
|
4072
|
+
return Promise.reject(H(n));
|
|
4073
|
+
const i = be(n), r = hr(i, e), o = await new vr(i, r, t).execute();
|
|
4057
4074
|
return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
|
|
4058
4075
|
}
|
|
4059
4076
|
/**
|
|
@@ -4072,8 +4089,8 @@ async function wr(n, e, t = !1) {
|
|
|
4072
4089
|
* See the License for the specific language governing permissions and
|
|
4073
4090
|
* limitations under the License.
|
|
4074
4091
|
*/
|
|
4075
|
-
const
|
|
4076
|
-
class
|
|
4092
|
+
const br = 10 * 60 * 1e3;
|
|
4093
|
+
class Er {
|
|
4077
4094
|
constructor(e) {
|
|
4078
4095
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
4079
4096
|
}
|
|
@@ -4089,7 +4106,7 @@ class kr {
|
|
|
4089
4106
|
let t = !1;
|
|
4090
4107
|
return this.consumers.forEach((i) => {
|
|
4091
4108
|
this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
|
|
4092
|
-
}), this.hasHandledPotentialRedirect || !
|
|
4109
|
+
}), this.hasHandledPotentialRedirect || !Sr(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
4093
4110
|
}
|
|
4094
4111
|
sendToConsumer(e, t) {
|
|
4095
4112
|
var i;
|
|
@@ -4104,7 +4121,7 @@ class kr {
|
|
|
4104
4121
|
return t.filter.includes(e.type) && i;
|
|
4105
4122
|
}
|
|
4106
4123
|
hasEventBeenHandled(e) {
|
|
4107
|
-
return Date.now() - this.lastProcessedEventTime >=
|
|
4124
|
+
return Date.now() - this.lastProcessedEventTime >= br && this.cachedEventUids.clear(), this.cachedEventUids.has(ht(e));
|
|
4108
4125
|
}
|
|
4109
4126
|
saveEventToCache(e) {
|
|
4110
4127
|
this.cachedEventUids.add(ht(e)), this.lastProcessedEventTime = Date.now();
|
|
@@ -4116,7 +4133,7 @@ function ht(n) {
|
|
|
4116
4133
|
function sn({ type: n, error: e }) {
|
|
4117
4134
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
4118
4135
|
}
|
|
4119
|
-
function
|
|
4136
|
+
function Sr(n) {
|
|
4120
4137
|
switch (n.type) {
|
|
4121
4138
|
case "signInViaRedirect":
|
|
4122
4139
|
case "linkViaRedirect":
|
|
@@ -4144,8 +4161,8 @@ function br(n) {
|
|
|
4144
4161
|
* See the License for the specific language governing permissions and
|
|
4145
4162
|
* limitations under the License.
|
|
4146
4163
|
*/
|
|
4147
|
-
async function
|
|
4148
|
-
return
|
|
4164
|
+
async function Rr(n, e = {}) {
|
|
4165
|
+
return Q(n, "GET", "/v1/projects", e);
|
|
4149
4166
|
}
|
|
4150
4167
|
/**
|
|
4151
4168
|
* @license
|
|
@@ -4163,14 +4180,14 @@ async function Er(n, e = {}) {
|
|
|
4163
4180
|
* See the License for the specific language governing permissions and
|
|
4164
4181
|
* limitations under the License.
|
|
4165
4182
|
*/
|
|
4166
|
-
const
|
|
4167
|
-
async function
|
|
4183
|
+
const Ar = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Pr = /^https?/;
|
|
4184
|
+
async function Cr(n) {
|
|
4168
4185
|
if (n.config.emulator)
|
|
4169
4186
|
return;
|
|
4170
|
-
const { authorizedDomains: e } = await
|
|
4187
|
+
const { authorizedDomains: e } = await Rr(n);
|
|
4171
4188
|
for (const t of e)
|
|
4172
4189
|
try {
|
|
4173
|
-
if (
|
|
4190
|
+
if (Nr(t))
|
|
4174
4191
|
return;
|
|
4175
4192
|
} catch {
|
|
4176
4193
|
}
|
|
@@ -4180,15 +4197,15 @@ async function Ar(n) {
|
|
|
4180
4197
|
/* AuthErrorCode.INVALID_ORIGIN */
|
|
4181
4198
|
);
|
|
4182
4199
|
}
|
|
4183
|
-
function
|
|
4200
|
+
function Nr(n) {
|
|
4184
4201
|
const e = Me(), { protocol: t, hostname: i } = new URL(e);
|
|
4185
4202
|
if (n.startsWith("chrome-extension://")) {
|
|
4186
4203
|
const o = new URL(n);
|
|
4187
4204
|
return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
|
|
4188
4205
|
}
|
|
4189
|
-
if (!
|
|
4206
|
+
if (!Pr.test(t))
|
|
4190
4207
|
return !1;
|
|
4191
|
-
if (
|
|
4208
|
+
if (Ar.test(n))
|
|
4192
4209
|
return i === n;
|
|
4193
4210
|
const r = n.replace(/\./g, "\\.");
|
|
4194
4211
|
return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
|
|
@@ -4209,7 +4226,7 @@ function Pr(n) {
|
|
|
4209
4226
|
* See the License for the specific language governing permissions and
|
|
4210
4227
|
* limitations under the License.
|
|
4211
4228
|
*/
|
|
4212
|
-
const
|
|
4229
|
+
const Or = new ae(3e4, 6e4);
|
|
4213
4230
|
function ft() {
|
|
4214
4231
|
const n = E().___jsl;
|
|
4215
4232
|
if (n != null && n.H) {
|
|
@@ -4219,7 +4236,7 @@ function ft() {
|
|
|
4219
4236
|
n.CP[t] = null;
|
|
4220
4237
|
}
|
|
4221
4238
|
}
|
|
4222
|
-
function
|
|
4239
|
+
function Lr(n) {
|
|
4223
4240
|
return new Promise((e, t) => {
|
|
4224
4241
|
var i, r, s;
|
|
4225
4242
|
function o() {
|
|
@@ -4234,7 +4251,7 @@ function Nr(n) {
|
|
|
4234
4251
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4235
4252
|
));
|
|
4236
4253
|
},
|
|
4237
|
-
timeout:
|
|
4254
|
+
timeout: Or.get()
|
|
4238
4255
|
});
|
|
4239
4256
|
}
|
|
4240
4257
|
if (!((r = (i = E().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
|
|
@@ -4242,22 +4259,22 @@ function Nr(n) {
|
|
|
4242
4259
|
else if (!((s = E().gapi) === null || s === void 0) && s.load)
|
|
4243
4260
|
o();
|
|
4244
4261
|
else {
|
|
4245
|
-
const c =
|
|
4262
|
+
const c = Di("iframefcb");
|
|
4246
4263
|
return E()[c] = () => {
|
|
4247
4264
|
gapi.load ? o() : t(b(
|
|
4248
4265
|
n,
|
|
4249
4266
|
"network-request-failed"
|
|
4250
4267
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4251
4268
|
));
|
|
4252
|
-
},
|
|
4269
|
+
}, Mi(`${Ui()}?onload=${c}`).catch((a) => t(a));
|
|
4253
4270
|
}
|
|
4254
4271
|
}).catch((e) => {
|
|
4255
4272
|
throw pe = null, e;
|
|
4256
4273
|
});
|
|
4257
4274
|
}
|
|
4258
4275
|
let pe = null;
|
|
4259
|
-
function
|
|
4260
|
-
return pe = pe ||
|
|
4276
|
+
function Mr(n) {
|
|
4277
|
+
return pe = pe || Lr(n), pe;
|
|
4261
4278
|
}
|
|
4262
4279
|
/**
|
|
4263
4280
|
* @license
|
|
@@ -4275,7 +4292,7 @@ function Or(n) {
|
|
|
4275
4292
|
* See the License for the specific language governing permissions and
|
|
4276
4293
|
* limitations under the License.
|
|
4277
4294
|
*/
|
|
4278
|
-
const
|
|
4295
|
+
const Ur = new ae(5e3, 15e3), Dr = "__/auth/iframe", xr = "emulator/auth/iframe", Fr = {
|
|
4279
4296
|
style: {
|
|
4280
4297
|
position: "absolute",
|
|
4281
4298
|
top: "-100px",
|
|
@@ -4284,13 +4301,13 @@ const Lr = new ae(5e3, 15e3), Mr = "__/auth/iframe", Ur = "emulator/auth/iframe"
|
|
|
4284
4301
|
},
|
|
4285
4302
|
"aria-hidden": "true",
|
|
4286
4303
|
tabindex: "-1"
|
|
4287
|
-
},
|
|
4304
|
+
}, Vr = /* @__PURE__ */ new Map([
|
|
4288
4305
|
["identitytoolkit.googleapis.com", "p"],
|
|
4289
4306
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
|
4290
4307
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
|
4291
4308
|
// test
|
|
4292
4309
|
]);
|
|
4293
|
-
function
|
|
4310
|
+
function $r(n) {
|
|
4294
4311
|
const e = n.config;
|
|
4295
4312
|
u(
|
|
4296
4313
|
e.authDomain,
|
|
@@ -4298,17 +4315,17 @@ function Fr(n) {
|
|
|
4298
4315
|
"auth-domain-config-required"
|
|
4299
4316
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
4300
4317
|
);
|
|
4301
|
-
const t = e.emulator ?
|
|
4318
|
+
const t = e.emulator ? We(e, xr) : `https://${n.config.authDomain}/${Dr}`, i = {
|
|
4302
4319
|
apiKey: e.apiKey,
|
|
4303
4320
|
appName: n.name,
|
|
4304
4321
|
v: se
|
|
4305
|
-
}, r =
|
|
4322
|
+
}, r = Vr.get(n.config.apiHost);
|
|
4306
4323
|
r && (i.eid = r);
|
|
4307
4324
|
const s = n._getFrameworks();
|
|
4308
4325
|
return s.length && (i.fw = s.join(",")), `${t}?${oe(i).slice(1)}`;
|
|
4309
4326
|
}
|
|
4310
|
-
async function
|
|
4311
|
-
const e = await
|
|
4327
|
+
async function Hr(n) {
|
|
4328
|
+
const e = await Mr(n), t = E().gapi;
|
|
4312
4329
|
return u(
|
|
4313
4330
|
t,
|
|
4314
4331
|
n,
|
|
@@ -4316,9 +4333,9 @@ async function Vr(n) {
|
|
|
4316
4333
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4317
4334
|
), e.open({
|
|
4318
4335
|
where: document.body,
|
|
4319
|
-
url:
|
|
4336
|
+
url: $r(n),
|
|
4320
4337
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
|
4321
|
-
attributes:
|
|
4338
|
+
attributes: Fr,
|
|
4322
4339
|
dontclear: !0
|
|
4323
4340
|
}, (i) => new Promise(async (r, s) => {
|
|
4324
4341
|
await i.restyle({
|
|
@@ -4331,7 +4348,7 @@ async function Vr(n) {
|
|
|
4331
4348
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4332
4349
|
), c = E().setTimeout(() => {
|
|
4333
4350
|
s(o);
|
|
4334
|
-
},
|
|
4351
|
+
}, Ur.get());
|
|
4335
4352
|
function a() {
|
|
4336
4353
|
E().clearTimeout(c), r(i);
|
|
4337
4354
|
}
|
|
@@ -4356,12 +4373,12 @@ async function Vr(n) {
|
|
|
4356
4373
|
* See the License for the specific language governing permissions and
|
|
4357
4374
|
* limitations under the License.
|
|
4358
4375
|
*/
|
|
4359
|
-
const
|
|
4376
|
+
const Wr = {
|
|
4360
4377
|
location: "yes",
|
|
4361
4378
|
resizable: "yes",
|
|
4362
4379
|
statusbar: "yes",
|
|
4363
4380
|
toolbar: "no"
|
|
4364
|
-
},
|
|
4381
|
+
}, jr = 500, Gr = 600, Br = "_blank", zr = "http://localhost";
|
|
4365
4382
|
class pt {
|
|
4366
4383
|
constructor(e) {
|
|
4367
4384
|
this.window = e, this.associatedEvent = null;
|
|
@@ -4374,19 +4391,19 @@ class pt {
|
|
|
4374
4391
|
}
|
|
4375
4392
|
}
|
|
4376
4393
|
}
|
|
4377
|
-
function
|
|
4394
|
+
function qr(n, e, t, i = jr, r = Gr) {
|
|
4378
4395
|
const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
|
|
4379
4396
|
let c = "";
|
|
4380
|
-
const a = Object.assign(Object.assign({},
|
|
4397
|
+
const a = Object.assign(Object.assign({}, Wr), {
|
|
4381
4398
|
width: i.toString(),
|
|
4382
4399
|
height: r.toString(),
|
|
4383
4400
|
top: s,
|
|
4384
4401
|
left: o
|
|
4385
4402
|
}), l = w().toLowerCase();
|
|
4386
|
-
t && (c = Ft(l) ?
|
|
4387
|
-
const d = Object.entries(a).reduce((
|
|
4388
|
-
if (
|
|
4389
|
-
return
|
|
4403
|
+
t && (c = Ft(l) ? Br : t), xt(l) && (e = e || zr, a.scrollbars = "yes");
|
|
4404
|
+
const d = Object.entries(a).reduce((y, [T, h]) => `${y}${T}=${h},`, "");
|
|
4405
|
+
if (Ei(l) && c !== "_self")
|
|
4406
|
+
return Kr(e || "", c), new pt(null);
|
|
4390
4407
|
const m = window.open(e || "", c, d);
|
|
4391
4408
|
u(
|
|
4392
4409
|
m,
|
|
@@ -4400,7 +4417,7 @@ function Gr(n, e, t, i = Hr, r = jr) {
|
|
|
4400
4417
|
}
|
|
4401
4418
|
return new pt(m);
|
|
4402
4419
|
}
|
|
4403
|
-
function
|
|
4420
|
+
function Kr(n, e) {
|
|
4404
4421
|
const t = document.createElement("a");
|
|
4405
4422
|
t.href = n, t.target = e;
|
|
4406
4423
|
const i = document.createEvent("MouseEvent");
|
|
@@ -4422,7 +4439,7 @@ function zr(n, e) {
|
|
|
4422
4439
|
* See the License for the specific language governing permissions and
|
|
4423
4440
|
* limitations under the License.
|
|
4424
4441
|
*/
|
|
4425
|
-
const
|
|
4442
|
+
const Jr = "__/auth/handler", Yr = "emulator/auth/handler", Xr = encodeURIComponent("fac");
|
|
4426
4443
|
async function mt(n, e, t, i, r, s) {
|
|
4427
4444
|
u(
|
|
4428
4445
|
n.config.authDomain,
|
|
@@ -4444,7 +4461,7 @@ async function mt(n, e, t, i, r, s) {
|
|
|
4444
4461
|
eventId: r
|
|
4445
4462
|
};
|
|
4446
4463
|
if (e instanceof qt) {
|
|
4447
|
-
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "",
|
|
4464
|
+
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", Un(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
4448
4465
|
for (const [d, m] of Object.entries({}))
|
|
4449
4466
|
o[d] = m;
|
|
4450
4467
|
}
|
|
@@ -4456,11 +4473,11 @@ async function mt(n, e, t, i, r, s) {
|
|
|
4456
4473
|
const c = o;
|
|
4457
4474
|
for (const d of Object.keys(c))
|
|
4458
4475
|
c[d] === void 0 && delete c[d];
|
|
4459
|
-
const a = await n._getAppCheckToken(), l = a ? `#${
|
|
4460
|
-
return `${
|
|
4476
|
+
const a = await n._getAppCheckToken(), l = a ? `#${Xr}=${encodeURIComponent(a)}` : "";
|
|
4477
|
+
return `${Qr(n)}?${oe(c).slice(1)}${l}`;
|
|
4461
4478
|
}
|
|
4462
|
-
function
|
|
4463
|
-
return n.emulator ?
|
|
4479
|
+
function Qr({ config: n }) {
|
|
4480
|
+
return n.emulator ? We(n, Yr) : `https://${n.authDomain}/${Jr}`;
|
|
4464
4481
|
}
|
|
4465
4482
|
/**
|
|
4466
4483
|
* @license
|
|
@@ -4479,9 +4496,9 @@ function Yr({ config: n }) {
|
|
|
4479
4496
|
* limitations under the License.
|
|
4480
4497
|
*/
|
|
4481
4498
|
const Ne = "webStorageSupport";
|
|
4482
|
-
class
|
|
4499
|
+
class Zr {
|
|
4483
4500
|
constructor() {
|
|
4484
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Qt, this._completeRedirectFn =
|
|
4501
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Qt, this._completeRedirectFn = kr, this._overrideRedirectResult = yr;
|
|
4485
4502
|
}
|
|
4486
4503
|
// Wrapping in async even though we don't await anywhere in order
|
|
4487
4504
|
// to make sure errors are raised as promise rejections
|
|
@@ -4489,12 +4506,12 @@ class Xr {
|
|
|
4489
4506
|
var s;
|
|
4490
4507
|
L((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4491
4508
|
const o = await mt(e, t, i, Me(), r);
|
|
4492
|
-
return
|
|
4509
|
+
return qr(e, o, ze());
|
|
4493
4510
|
}
|
|
4494
4511
|
async _openRedirect(e, t, i, r) {
|
|
4495
4512
|
await this._originValidation(e);
|
|
4496
4513
|
const s = await mt(e, t, i, Me(), r);
|
|
4497
|
-
return
|
|
4514
|
+
return nr(s), new Promise(() => {
|
|
4498
4515
|
});
|
|
4499
4516
|
}
|
|
4500
4517
|
_initialize(e) {
|
|
@@ -4509,7 +4526,7 @@ class Xr {
|
|
|
4509
4526
|
}), i;
|
|
4510
4527
|
}
|
|
4511
4528
|
async initAndGetManager(e) {
|
|
4512
|
-
const t = await
|
|
4529
|
+
const t = await Hr(e), i = new Er(e);
|
|
4513
4530
|
return t.register("authEvent", (r) => (u(
|
|
4514
4531
|
r == null ? void 0 : r.authEvent,
|
|
4515
4532
|
e,
|
|
@@ -4533,13 +4550,13 @@ class Xr {
|
|
|
4533
4550
|
}
|
|
4534
4551
|
_originValidation(e) {
|
|
4535
4552
|
const t = e._key();
|
|
4536
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
|
4553
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Cr(e)), this.originValidationPromises[t];
|
|
4537
4554
|
}
|
|
4538
4555
|
get _shouldInitProactively() {
|
|
4539
|
-
return
|
|
4556
|
+
return jt() || Ge() || ke();
|
|
4540
4557
|
}
|
|
4541
4558
|
}
|
|
4542
|
-
const
|
|
4559
|
+
const es = Zr;
|
|
4543
4560
|
var gt = "@firebase/auth", _t = "1.7.5";
|
|
4544
4561
|
/**
|
|
4545
4562
|
* @license
|
|
@@ -4557,7 +4574,7 @@ var gt = "@firebase/auth", _t = "1.7.5";
|
|
|
4557
4574
|
* See the License for the specific language governing permissions and
|
|
4558
4575
|
* limitations under the License.
|
|
4559
4576
|
*/
|
|
4560
|
-
class
|
|
4577
|
+
class ts {
|
|
4561
4578
|
constructor(e) {
|
|
4562
4579
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
4563
4580
|
}
|
|
@@ -4608,7 +4625,7 @@ class Zr {
|
|
|
4608
4625
|
* See the License for the specific language governing permissions and
|
|
4609
4626
|
* limitations under the License.
|
|
4610
4627
|
*/
|
|
4611
|
-
function
|
|
4628
|
+
function ns(n) {
|
|
4612
4629
|
switch (n) {
|
|
4613
4630
|
case "Node":
|
|
4614
4631
|
return "node";
|
|
@@ -4624,7 +4641,7 @@ function es(n) {
|
|
|
4624
4641
|
return;
|
|
4625
4642
|
}
|
|
4626
4643
|
}
|
|
4627
|
-
function
|
|
4644
|
+
function is(n) {
|
|
4628
4645
|
Ze(new et(
|
|
4629
4646
|
"auth",
|
|
4630
4647
|
(e, { options: t }) => {
|
|
@@ -4637,9 +4654,9 @@ function ts(n) {
|
|
|
4637
4654
|
apiHost: "identitytoolkit.googleapis.com",
|
|
4638
4655
|
tokenApiHost: "securetoken.googleapis.com",
|
|
4639
4656
|
apiScheme: "https",
|
|
4640
|
-
sdkClientVersion:
|
|
4641
|
-
}, l = new
|
|
4642
|
-
return
|
|
4657
|
+
sdkClientVersion: Gt(n)
|
|
4658
|
+
}, l = new Oi(i, r, s, a);
|
|
4659
|
+
return Fi(l, t), l;
|
|
4643
4660
|
},
|
|
4644
4661
|
"PUBLIC"
|
|
4645
4662
|
/* ComponentType.PUBLIC */
|
|
@@ -4658,14 +4675,14 @@ function ts(n) {
|
|
|
4658
4675
|
"auth"
|
|
4659
4676
|
/* _ComponentName.AUTH */
|
|
4660
4677
|
).getImmediate());
|
|
4661
|
-
return ((i) => new
|
|
4678
|
+
return ((i) => new ts(i))(t);
|
|
4662
4679
|
},
|
|
4663
4680
|
"PRIVATE"
|
|
4664
4681
|
/* ComponentType.PRIVATE */
|
|
4665
4682
|
).setInstantiationMode(
|
|
4666
4683
|
"EXPLICIT"
|
|
4667
4684
|
/* InstantiationMode.EXPLICIT */
|
|
4668
|
-
)), Le(gt, _t,
|
|
4685
|
+
)), Le(gt, _t, ns(n)), Le(gt, _t, "esm2017");
|
|
4669
4686
|
}
|
|
4670
4687
|
/**
|
|
4671
4688
|
* @license
|
|
@@ -4683,11 +4700,11 @@ function ts(n) {
|
|
|
4683
4700
|
* See the License for the specific language governing permissions and
|
|
4684
4701
|
* limitations under the License.
|
|
4685
4702
|
*/
|
|
4686
|
-
const
|
|
4703
|
+
const rs = 5 * 60, ss = kt("authIdTokenMaxAge") || rs;
|
|
4687
4704
|
let vt = null;
|
|
4688
|
-
const
|
|
4705
|
+
const os = (n) => async (e) => {
|
|
4689
4706
|
const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
4690
|
-
if (i && i >
|
|
4707
|
+
if (i && i > ss)
|
|
4691
4708
|
return;
|
|
4692
4709
|
const r = t == null ? void 0 : t.token;
|
|
4693
4710
|
vt !== r && (vt = r, await fetch(n, {
|
|
@@ -4697,33 +4714,33 @@ const rs = (n) => async (e) => {
|
|
|
4697
4714
|
} : {}
|
|
4698
4715
|
}));
|
|
4699
4716
|
};
|
|
4700
|
-
function
|
|
4717
|
+
function as(n = Nn()) {
|
|
4701
4718
|
const e = bt(n, "auth");
|
|
4702
4719
|
if (e.isInitialized())
|
|
4703
4720
|
return e.getImmediate();
|
|
4704
|
-
const t =
|
|
4705
|
-
popupRedirectResolver:
|
|
4721
|
+
const t = xi(n, {
|
|
4722
|
+
popupRedirectResolver: es,
|
|
4706
4723
|
persistence: [
|
|
4707
|
-
|
|
4708
|
-
|
|
4724
|
+
dr,
|
|
4725
|
+
Zi,
|
|
4709
4726
|
Qt
|
|
4710
4727
|
]
|
|
4711
4728
|
}), i = kt("authTokenSyncURL");
|
|
4712
4729
|
if (i && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
4713
4730
|
const s = new URL(i, location.origin);
|
|
4714
4731
|
if (location.origin === s.origin) {
|
|
4715
|
-
const o =
|
|
4716
|
-
|
|
4732
|
+
const o = os(s.toString());
|
|
4733
|
+
Ji(t, o, () => o(t.currentUser)), Ki(t, (c) => o(c));
|
|
4717
4734
|
}
|
|
4718
4735
|
}
|
|
4719
|
-
const r =
|
|
4720
|
-
return r &&
|
|
4736
|
+
const r = Cn("auth");
|
|
4737
|
+
return r && Vi(t, `http://${r}`), t;
|
|
4721
4738
|
}
|
|
4722
|
-
function
|
|
4739
|
+
function cs() {
|
|
4723
4740
|
var n, e;
|
|
4724
4741
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
|
4725
4742
|
}
|
|
4726
|
-
|
|
4743
|
+
Li({
|
|
4727
4744
|
loadJS(n) {
|
|
4728
4745
|
return new Promise((e, t) => {
|
|
4729
4746
|
const i = document.createElement("script");
|
|
@@ -4733,79 +4750,79 @@ Ni({
|
|
|
4733
4750
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4734
4751
|
);
|
|
4735
4752
|
s.customData = r, t(s);
|
|
4736
|
-
}, i.type = "text/javascript", i.charset = "UTF-8",
|
|
4753
|
+
}, i.type = "text/javascript", i.charset = "UTF-8", cs().appendChild(i);
|
|
4737
4754
|
});
|
|
4738
4755
|
},
|
|
4739
4756
|
gapiScript: "https://apis.google.com/js/api.js",
|
|
4740
4757
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
4741
4758
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
4742
4759
|
});
|
|
4743
|
-
|
|
4760
|
+
is(
|
|
4744
4761
|
"Browser"
|
|
4745
4762
|
/* ClientPlatform.BROWSER */
|
|
4746
4763
|
);
|
|
4747
|
-
var
|
|
4748
|
-
const
|
|
4764
|
+
var ls = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", featureFlagApiKey: "MaGoXrEWuEJNpWgKTqseee" }, us = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
|
|
4765
|
+
const ds = {
|
|
4749
4766
|
key: 2,
|
|
4750
4767
|
class: "h-full w-full"
|
|
4751
|
-
},
|
|
4768
|
+
}, hs = ["src"], Cs = /* @__PURE__ */ xe({
|
|
4752
4769
|
__name: "App",
|
|
4753
4770
|
setup(n) {
|
|
4754
|
-
const e = ge(), t = pn(), i = mn(), r =
|
|
4771
|
+
const e = ge(), t = pn(), i = mn(), r = In(), s = yn(), o = wt(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = ge();
|
|
4755
4772
|
ie(
|
|
4756
4773
|
() => {
|
|
4757
|
-
var
|
|
4758
|
-
return (
|
|
4774
|
+
var f;
|
|
4775
|
+
return (f = l.value) == null ? void 0 : f._id;
|
|
4759
4776
|
},
|
|
4760
|
-
(
|
|
4761
|
-
|
|
4777
|
+
(f) => {
|
|
4778
|
+
f && vn(f);
|
|
4762
4779
|
},
|
|
4763
4780
|
{ immediate: !0 }
|
|
4764
4781
|
);
|
|
4765
|
-
const d =
|
|
4766
|
-
const
|
|
4767
|
-
return `${
|
|
4782
|
+
const d = te(!1), m = Y(() => i.version), y = Y(() => {
|
|
4783
|
+
const f = e.currentCountry.value || "MY", g = tt.getIdToken(), v = l.value._id;
|
|
4784
|
+
return `${us.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${f}&token=${g}`;
|
|
4768
4785
|
});
|
|
4769
|
-
async function
|
|
4770
|
-
if (
|
|
4786
|
+
async function T() {
|
|
4787
|
+
if (Dn().length) {
|
|
4771
4788
|
console.warn("CONNECT: initFirebase: Firebase already initialized");
|
|
4772
4789
|
return;
|
|
4773
4790
|
}
|
|
4774
|
-
const
|
|
4775
|
-
await
|
|
4791
|
+
const f = xn(ls.firebase), g = await fn.getCustomToken(), v = as();
|
|
4792
|
+
await qi(v, g), Fn(f), console.log("initFirebase", f);
|
|
4776
4793
|
}
|
|
4777
|
-
const
|
|
4778
|
-
d.value = !1, await dn(), console.log("forceRerender"), tt.setBusinessId(l.value._id), await i.readPremium(), !a.value && m.value === "v2" ? e.registerSidebarComponent(
|
|
4794
|
+
const h = async () => {
|
|
4795
|
+
d.value = !1, await dn(), console.log("forceRerender"), tt.setBusinessId(l.value._id), await i.readPremium(), !a.value && m.value === "v2" ? e.registerSidebarComponent(Wn) : e.hideSidebarToggle(!0), await T(), a.value = !0, d.value = !0;
|
|
4779
4796
|
};
|
|
4780
4797
|
return un(() => {
|
|
4781
|
-
if (
|
|
4782
|
-
const
|
|
4783
|
-
|
|
4798
|
+
if (Vn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
|
|
4799
|
+
const f = document.getElementsByClassName("app-header")[0], g = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0], M = document.getElementsByTagName("main")[0];
|
|
4800
|
+
f == null || f.classList.add("!hidden"), g == null || g.classList.add("!pt-0"), v == null || v.classList.add("!pt-0"), M == null || M.classList.add("!pt-0"), e.hideSidebarToggle(!0);
|
|
4784
4801
|
}
|
|
4785
|
-
l.value != null && (console.log("App mounted, forceRerender"),
|
|
4802
|
+
l.value != null && (console.log("App mounted, forceRerender"), h());
|
|
4786
4803
|
}), ie(
|
|
4787
4804
|
() => e.currentBusiness.value,
|
|
4788
|
-
async (
|
|
4789
|
-
console.log("Current business changed"),
|
|
4805
|
+
async (f, g) => {
|
|
4806
|
+
console.log("Current business changed"), f != null && f._id != g._id && (console.log("forceRerender when business changes", f, g), h());
|
|
4790
4807
|
}
|
|
4791
|
-
), (
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
S(
|
|
4796
|
-
json: { url:
|
|
4808
|
+
), (f, g) => (j(), me(It, null, [
|
|
4809
|
+
_(d) && _(m) === "v2" ? (j(), Oe(_(hn), { key: 0 })) : Pe("", !0),
|
|
4810
|
+
_(d) && _(m) === "v2" && _(c) ? (j(), Oe(oi, { key: 1 })) : Pe("", !0),
|
|
4811
|
+
_(d) && _(m) !== "v2" ? (j(), me("div", ds, [
|
|
4812
|
+
S(bn, {
|
|
4813
|
+
json: { url: _(y) }
|
|
4797
4814
|
}, null, 8, ["json"]),
|
|
4798
|
-
|
|
4815
|
+
I("iframe", {
|
|
4799
4816
|
allow: "clipboard-read; clipboard-write",
|
|
4800
4817
|
frameBorder: "0",
|
|
4801
4818
|
height: "100%",
|
|
4802
4819
|
width: "100%",
|
|
4803
|
-
src:
|
|
4804
|
-
}, null, 8,
|
|
4820
|
+
src: _(y)
|
|
4821
|
+
}, null, 8, hs)
|
|
4805
4822
|
])) : Pe("", !0)
|
|
4806
4823
|
], 64));
|
|
4807
4824
|
}
|
|
4808
4825
|
});
|
|
4809
4826
|
export {
|
|
4810
|
-
|
|
4827
|
+
Cs as default
|
|
4811
4828
|
};
|