@ebrains/vue 0.4.0-alpha.0 → 0.5.0-alpha.0
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/analytics-1cde8e4a-BDRcCMlV.mjs +24 -0
- package/analytics-1cde8e4a-B_MD-9qW.js +1 -0
- package/color-2554aad6-CCcV5UJZ.mjs +131 -0
- package/color-2554aad6-D1hFGX4H.js +1 -0
- package/{color-primary-palette_6.entry-CSDWEKLH.mjs → color-primary-palette_6.entry-CgeStD0V.mjs} +21 -21
- package/color-primary-palette_6.entry-c_K7930i.js +1 -0
- package/correct-use-of-colors.entry-De5Tcxdm.mjs +59 -0
- package/correct-use-of-colors.entry-DpmXW_CD.js +1 -0
- package/eds-accordion.entry-B8TjhnWX.mjs +49 -0
- package/eds-accordion.entry-BySfMYU2.js +4 -0
- package/eds-alert_17.entry-BfpBSBVW.js +14999 -0
- package/eds-alert_17.entry-IJq6baZd.mjs +16075 -0
- package/eds-avatar_4.entry-B7CV7v_n.mjs +283 -0
- package/eds-avatar_4.entry-D1CDRW_R.js +149 -0
- package/eds-card-generic.entry-BhLK-nyp.js +1 -0
- package/eds-card-generic.entry-DIHPUjbI.mjs +63 -0
- package/{eds-card-project.entry-C3eyu1U0.mjs → eds-card-project.entry-C2dWgXXW.mjs} +12 -11
- package/eds-card-project.entry-CunHqbYK.js +1 -0
- package/{eds-card-section.entry-DU-1TB0I.js → eds-card-section.entry-0n2V-MH6.js} +1 -1
- package/{eds-card-section.entry-Dxk-Ob_Y.mjs → eds-card-section.entry-Ccjil38X.mjs} +4 -4
- package/eds-card-tags.entry-C6jjLiGA.mjs +13 -0
- package/{eds-card-tags.entry-YPPBWdFq.js → eds-card-tags.entry-CQS5AtAg.js} +1 -1
- package/{eds-card-tool.entry-1_RNWh8n.mjs → eds-card-tool.entry-Bi8w0xds.mjs} +7 -7
- package/eds-card-tool.entry-DJA23zJf.js +1 -0
- package/{eds-card-wrapper.entry-BfCDGeFs.js → eds-card-wrapper.entry-BKPCc7ci.js} +1 -1
- package/{eds-card-wrapper.entry-C4pNRjIj.mjs → eds-card-wrapper.entry-UPnkq2JI.mjs} +4 -4
- package/{eds-code-block.entry-B2xATQ7r.mjs → eds-code-block.entry-BZTLGjqq.mjs} +47 -47
- package/{eds-code-block.entry-DQEDpAjn.js → eds-code-block.entry-Ckb3jisn.js} +3 -3
- package/{eds-components-section.entry-D08woahG.js → eds-components-section.entry-B3WrdIfL.js} +45 -36
- package/{eds-components-section.entry-DR-984-3.mjs → eds-components-section.entry-D1ovrn93.mjs} +56 -37
- package/{eds-docs-palettes.entry-qKOj3XU9.js → eds-docs-palettes.entry-Bk77Xn04.js} +1 -1
- package/{eds-docs-palettes.entry-B0yU2ZpL.mjs → eds-docs-palettes.entry-lpT0ypSs.mjs} +2 -2
- package/{eds-docs-tokens.entry-BVHiM7cK.mjs → eds-docs-tokens.entry-Bi35zxEM.mjs} +2 -2
- package/{eds-docs-tokens.entry-BtRXzjrp.js → eds-docs-tokens.entry-DCHw-jrS.js} +1 -1
- package/eds-dropdown_2.entry-Bamjbo1o.mjs +115 -0
- package/eds-dropdown_2.entry-YEBzyKJu.js +1 -0
- package/eds-form.entry-a52cYx3b.js +7153 -0
- package/eds-form.entry-xm937wbh.mjs +7340 -0
- package/eds-frame.entry-BnT9nQwa.js +1 -0
- package/eds-frame.entry-CU7GoLj6.mjs +74 -0
- package/eds-icon-arrow-diagonal.entry-fzsCJiPP.js +1 -0
- package/eds-icon-arrow-diagonal.entry-kClkB8LF.mjs +13 -0
- package/eds-icon-arrow-right.entry-B75Ra6OD.js +1 -0
- package/eds-icon-arrow-right.entry-DX6A-VKL.mjs +13 -0
- package/{eds-icon-bluesky.entry-Dppj9cuC.js → eds-icon-bluesky.entry-7tzCZSoL.js} +1 -1
- package/eds-icon-bluesky.entry-BNSdVu2K.mjs +13 -0
- package/eds-icon-chevron-down.entry-BLvZ3e_N.mjs +13 -0
- package/{eds-icon-chevron-down.entry-CidjiGQS.js → eds-icon-chevron-down.entry-BUG6E9eR.js} +1 -1
- package/eds-icon-chevron-left.entry-BT-KYjSo.js +1 -0
- package/eds-icon-chevron-left.entry-Vq-R3b59.mjs +13 -0
- package/{eds-icon-chevron-right.entry-iy6d6tux.mjs → eds-icon-chevron-right.entry-B1qzmGrD.mjs} +2 -2
- package/eds-icon-chevron-right.entry-BmU_I0Y1.js +1 -0
- package/eds-icon-chevron-up.entry-DXXRgw1V.js +1 -0
- package/eds-icon-chevron-up.entry-DuySJU_i.mjs +13 -0
- package/eds-icon-close.entry-DDxUAr21.mjs +13 -0
- package/{eds-icon-close.entry-CE-Nory7.js → eds-icon-close.entry-DS7BLTzl.js} +1 -1
- package/eds-icon-copy.entry-DNa1wI4F.mjs +13 -0
- package/{eds-icon-copy.entry-Bpe3I5b6.js → eds-icon-copy.entry-Nz_P5A7p.js} +1 -1
- package/eds-icon-eu.entry-CLQcoimB.js +1 -0
- package/eds-icon-eu.entry-DTdf6Skc.mjs +13 -0
- package/eds-icon-facebook.entry-B9szoikj.mjs +13 -0
- package/eds-icon-facebook.entry-knUdck2t.js +1 -0
- package/eds-icon-gitlab.entry-IO7f4hgL.mjs +13 -0
- package/eds-icon-gitlab.entry-pKxaKA0B.js +1 -0
- package/{eds-icon-linkedin.entry-CstoPbTS.js → eds-icon-linkedin.entry-BD__kbDV.js} +1 -1
- package/eds-icon-linkedin.entry-CryUW1Er.mjs +13 -0
- package/{eds-icon-loader.entry-CaGFh0gM.js → eds-icon-loader.entry-B_3Sd6PB.js} +1 -1
- package/eds-icon-loader.entry-CxizdRT8.mjs +13 -0
- package/eds-icon-mastodon.entry-7152lwgd.js +1 -0
- package/eds-icon-mastodon.entry-MyM74vvm.mjs +13 -0
- package/eds-icon-menu.entry-5RRmRTxa.mjs +13 -0
- package/eds-icon-menu.entry-BVU8htgo.js +1 -0
- package/eds-icon-more.entry-KE6_EsAg.mjs +13 -0
- package/{eds-icon-more.entry-68jT9AEw.js → eds-icon-more.entry-lossstHZ.js} +1 -1
- package/eds-icon-search.entry-Dg0wabdP.mjs +13 -0
- package/eds-icon-search.entry-DiYaxnYX.js +1 -0
- package/{eds-icon-success.entry-CACuZjP6.js → eds-icon-success.entry-CRu9Ssdi.js} +1 -1
- package/eds-icon-success.entry-_fWfddhX.mjs +13 -0
- package/eds-icon-twitter.entry-B4xPE3Vz.js +1 -0
- package/eds-icon-twitter.entry-DHFpeStb.mjs +13 -0
- package/eds-icon-user.entry-BOv2lInW.mjs +13 -0
- package/eds-icon-user.entry-DkRLDrdp.js +1 -0
- package/eds-icon-youtube.entry-CRRGbDsw.mjs +13 -0
- package/eds-icon-youtube.entry-DL5fWU8k.js +1 -0
- package/eds-input_7.entry-BZ9afXqe.js +7167 -0
- package/eds-input_7.entry-WvoE_Mue.mjs +7373 -0
- package/eds-login.entry-BRWK6otG.js +1 -0
- package/eds-login.entry-C0eOhlEq.mjs +58 -0
- package/{eds-logo-variations.entry-CUD-M_Fd.js → eds-logo-variations.entry-BnB25dDH.js} +1 -1
- package/eds-logo-variations.entry-Cw44vuQE.mjs +22 -0
- package/eds-matomo-notice.entry-BpwE1vQ3.js +1 -0
- package/{eds-matomo-notice.entry-kSuLDx9K.mjs → eds-matomo-notice.entry-DsLbzeqQ.mjs} +2 -2
- package/eds-modal.entry-B9gXEOjT.js +1 -0
- package/eds-modal.entry-CCy9SRVR.mjs +84 -0
- package/{eds-navigator.entry-BJTqtqld.js → eds-navigator.entry-B9scz8p_.js} +1 -1
- package/{eds-navigator.entry-DdzcXSRW.mjs → eds-navigator.entry-Dk-4UW_d.mjs} +2 -2
- package/eds-pagination_2.entry-D_sngThL.js +1 -0
- package/{eds-pagination_2.entry-B5PLo2Uu.mjs → eds-pagination_2.entry-M3CLFGN_.mjs} +9 -9
- package/{eds-progress-bar.entry-DdqH0plT.mjs → eds-progress-bar.entry-BtI2_94Z.mjs} +5 -5
- package/{eds-progress-bar.entry-BBFsASiy.js → eds-progress-bar.entry-D56TNSGj.js} +1 -1
- package/{eds-section-core_2.entry-D_nLUa29.js → eds-section-core_2.entry-BmbK_RfT.js} +1 -1
- package/{eds-section-core_2.entry-D3HYngR_.mjs → eds-section-core_2.entry-pmUkAIz7.mjs} +6 -6
- package/{eds-svg-repository.entry-C-kayEdW.mjs → eds-svg-repository.entry-B3xCCFOp.mjs} +2 -2
- package/{eds-svg-repository.entry-in72TP_1.js → eds-svg-repository.entry-DZ1FMRrQ.js} +2 -2
- package/{eds-tab.entry-BKYSiEkl.mjs → eds-tab.entry-Bpv6R_M0.mjs} +2 -2
- package/{eds-tab.entry-BUzZWKac.js → eds-tab.entry-DjpVgaDN.js} +1 -1
- package/eds-tabs-content.entry-Bj5wNmkr.js +1 -0
- package/{eds-tabs-content.entry-3cyCQAth.mjs → eds-tabs-content.entry-CzwoLZzR.mjs} +4 -4
- package/{eds-tabs.entry-B8q09in2.mjs → eds-tabs.entry-BYBPkYRs.mjs} +5 -5
- package/eds-tabs.entry-Cbc9yhHL.js +1 -0
- package/{eds-timeline.entry-DEcov8mq.js → eds-timeline.entry-Bq-eo4Og.js} +1 -1
- package/{eds-timeline.entry-DhHSQScv.mjs → eds-timeline.entry-DJYcN7rN.mjs} +2 -2
- package/{eds-tooltip.entry-BTunlfGS.mjs → eds-tooltip.entry-CTCdKTKM.mjs} +3 -3
- package/eds-tooltip.entry-eiFlYpfl.js +1 -0
- package/{eds-trl.entry-Bt28XH55.mjs → eds-trl.entry-8BXrp9SK.mjs} +8 -8
- package/{eds-trl.entry-BHrlC_5O.js → eds-trl.entry-DtffM-e5.js} +1 -1
- package/eds-user.entry-DfBE6LuF.js +1 -0
- package/eds-user.entry-ybggwcts.mjs +66 -0
- package/eds-vertical-stepper.entry-DpcwvOst.mjs +27 -0
- package/eds-vertical-stepper.entry-O_GJNo8B.js +1 -0
- package/generated/components.d.ts +3 -0
- package/incorrect-use-of-colors.entry-CDHLoNBa.js +1 -0
- package/incorrect-use-of-colors.entry-DbwiJCH0.mjs +42 -0
- package/{index-I5Asbjce.mjs → index-C-Gy1Lax.mjs} +555 -497
- package/index-D_kZU_4I.js +21 -0
- package/index.js +1 -1
- package/index.mjs +30 -27
- package/{keycloak-13893af6-BLzE1H6E.mjs → keycloak-d502ec16-Ce0iGqyk.mjs} +259 -247
- package/keycloak-d502ec16-m7LwS-Gh.js +9 -0
- package/{logo-space.entry-DsM5jXgX.js → logo-space.entry-D56IaLNE.js} +1 -1
- package/{logo-space.entry-GnVq-srD.mjs → logo-space.entry-DERJLkyL.mjs} +7 -7
- package/logo-variations-horizontal_2.entry-OY3Zka_7.js +7 -0
- package/logo-variations-horizontal_2.entry-wp9D1MMl.mjs +29 -0
- package/logo-wrong-usage.entry-BniBpQrN.js +1 -0
- package/logo-wrong-usage.entry-RgKFDObE.mjs +14 -0
- package/package.json +1 -1
- package/{token-list_3.entry-DaIOT7_R.js → token-list_3.entry-C0Tohj1W.js} +1 -1
- package/{token-list_3.entry-CReCwFzO.mjs → token-list_3.entry-Zgzwbhio.mjs} +4 -4
- package/{token-ratios.entry-Dh8kvz8R.mjs → token-ratios.entry-B7ZwRluK.mjs} +2 -2
- package/token-ratios.entry-bO5CkZ9D.js +1 -0
- package/token-spacing.entry-BTYazF9c.js +1 -0
- package/token-spacing.entry-_yyMlwbO.mjs +12 -0
- package/{token-typography.entry-DG-4k5gY.js → token-typography.entry-D-PPtDvs.js} +1 -1
- package/{token-typography.entry-CIETKadf.mjs → token-typography.entry-D4bxbB2m.mjs} +2 -2
- package/color-bb472c37-CKu54kOY.js +0 -1
- package/color-bb472c37-DDERsxdk.mjs +0 -207
- package/color-primary-palette_6.entry-BB6740d4.js +0 -1
- package/correct-use-of-colors.entry-LuyuqIQ9.js +0 -1
- package/correct-use-of-colors.entry-hvZ1z3tc.mjs +0 -59
- package/eds-accordion_33.entry-DFgdjlJE.mjs +0 -31360
- package/eds-accordion_33.entry-DlnbmQ6R.js +0 -29468
- package/eds-card-project.entry-BQ-dH8vM.js +0 -1
- package/eds-card-tags.entry-CIu6lD0P.mjs +0 -13
- package/eds-card-tool.entry-DgBqQucY.js +0 -1
- package/eds-icon-arrow-diagonal.entry-DjDB--sU.js +0 -1
- package/eds-icon-arrow-diagonal.entry-E5xC3m8H.mjs +0 -13
- package/eds-icon-arrow-right.entry-DaXIkUew.mjs +0 -13
- package/eds-icon-arrow-right.entry-odZ8U-W2.js +0 -1
- package/eds-icon-bluesky.entry-B3yW2mUC.mjs +0 -13
- package/eds-icon-chevron-down.entry-xWODzTE-.mjs +0 -13
- package/eds-icon-chevron-left.entry-CJyHE01I.mjs +0 -13
- package/eds-icon-chevron-left.entry-DjJj-hmG.js +0 -1
- package/eds-icon-chevron-right.entry-D8RyOADq.js +0 -1
- package/eds-icon-chevron-up.entry-TKCdY_T3.mjs +0 -13
- package/eds-icon-chevron-up.entry-ezV-v92v.js +0 -1
- package/eds-icon-close.entry-Brv3Uxu1.mjs +0 -13
- package/eds-icon-copy.entry-DQioS3t7.mjs +0 -13
- package/eds-icon-eu.entry-BzmYOiKL.js +0 -1
- package/eds-icon-eu.entry-KylDo55P.mjs +0 -13
- package/eds-icon-facebook.entry-DWZ02rD5.js +0 -1
- package/eds-icon-facebook.entry-DpS2m4v2.mjs +0 -13
- package/eds-icon-gitlab.entry-D8PM12SK.js +0 -1
- package/eds-icon-gitlab.entry-JX-5azIw.mjs +0 -13
- package/eds-icon-linkedin.entry-BylIVu8G.mjs +0 -13
- package/eds-icon-loader.entry-DZyUa8Na.mjs +0 -13
- package/eds-icon-mastodon.entry-BIckHn_q.mjs +0 -13
- package/eds-icon-mastodon.entry-DxNG__-Y.js +0 -1
- package/eds-icon-menu.entry-C9N6s8Oa.mjs +0 -13
- package/eds-icon-menu.entry-DwN-ZAWi.js +0 -1
- package/eds-icon-more.entry-MUkUL_e2.mjs +0 -13
- package/eds-icon-search.entry-CcwwFnns.mjs +0 -13
- package/eds-icon-search.entry-CrfMqbyi.js +0 -1
- package/eds-icon-success.entry-BUzsze9h.mjs +0 -13
- package/eds-icon-twitter.entry-B1Iw69NW.mjs +0 -13
- package/eds-icon-twitter.entry-BbStwaGv.js +0 -1
- package/eds-icon-user.entry-CNo6pger.mjs +0 -13
- package/eds-icon-user.entry-vYVsxfK7.js +0 -1
- package/eds-icon-youtube.entry-CBU7Dvkh.mjs +0 -13
- package/eds-icon-youtube.entry-CmCAFp7D.js +0 -1
- package/eds-login.entry-Bfztcsrc.js +0 -1
- package/eds-login.entry-XqWPWCDL.mjs +0 -46
- package/eds-logo-variations.entry-Cy_fbJLx.mjs +0 -22
- package/eds-matomo-notice.entry-CytVSgYS.js +0 -1
- package/eds-pagination_2.entry-DUsG8tcv.js +0 -1
- package/eds-rating.entry-CErokyKU.mjs +0 -38
- package/eds-rating.entry-p9oWKCkQ.js +0 -1
- package/eds-tabs-content.entry-Cg7U8c5D.js +0 -1
- package/eds-tabs.entry-DS6qBEo7.js +0 -1
- package/eds-tooltip.entry-sjwuhdKF.js +0 -1
- package/incorrect-use-of-colors.entry-DkY89xG1.mjs +0 -42
- package/incorrect-use-of-colors.entry-e4VhTVHS.js +0 -1
- package/index-D2H_BflF.js +0 -21
- package/keycloak-13893af6-NiM3zoVg.js +0 -9
- package/logo-variations-horizontal_2.entry-BeQ_r9Li.js +0 -7
- package/logo-variations-horizontal_2.entry-CC7tj8Hr.mjs +0 -29
- package/logo-wrong-usage.entry-Ct1Ae63m.mjs +0 -14
- package/logo-wrong-usage.entry-DkqcMaqp.js +0 -1
- package/token-ratios.entry-aBiRsmfr.js +0 -1
- package/token-spacing.entry-C5HX4qPq.mjs +0 -12
- package/token-spacing.entry-DDiMRsNO.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
function Y(f) {
|
|
2
2
|
if (!(this instanceof Y))
|
|
3
3
|
throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");
|
|
4
|
-
if (typeof f != "string" && !
|
|
4
|
+
if (typeof f != "string" && !z(f))
|
|
5
5
|
throw new Error("The 'Keycloak' constructor must be provided with a configuration object, or a URL to a JSON configuration file.");
|
|
6
|
-
if (
|
|
6
|
+
if (z(f)) {
|
|
7
7
|
const r = "oidcProvider" in f ? ["clientId"] : ["url", "realm", "clientId"];
|
|
8
8
|
for (const t of r)
|
|
9
9
|
if (!f[t])
|
|
@@ -15,80 +15,77 @@ function Y(f) {
|
|
|
15
15
|
interval: 5
|
|
16
16
|
};
|
|
17
17
|
e.didInitialize = !1;
|
|
18
|
-
var
|
|
19
|
-
globalThis.isSecureContext ||
|
|
18
|
+
var R = !0, _ = F(console.info), x = F(console.warn);
|
|
19
|
+
globalThis.isSecureContext || x(
|
|
20
20
|
`[KEYCLOAK] Keycloak JS must be used in a 'secure context' to function properly as it relies on browser APIs that are otherwise not available.
|
|
21
21
|
Continuing to run your application insecurely will lead to unexpected behavior and breakage.
|
|
22
22
|
|
|
23
23
|
For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts`
|
|
24
|
-
), e.init = function(r) {
|
|
24
|
+
), e.init = function(r = {}) {
|
|
25
25
|
if (e.didInitialize)
|
|
26
26
|
throw new Error("A 'Keycloak' instance can only be initialized once.");
|
|
27
|
-
e.didInitialize = !0, e.authenticated = !1, U =
|
|
27
|
+
e.didInitialize = !0, e.authenticated = !1, U = te();
|
|
28
28
|
var t = ["default", "cordova", "cordova-native"];
|
|
29
|
-
if (
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
throw "Invalid value for flow";
|
|
48
|
-
}
|
|
49
|
-
e.flow = r.flow;
|
|
29
|
+
if (t.indexOf(r.adapter) > -1 ? h = K(r.adapter) : typeof r.adapter == "object" ? h = r.adapter : window.Cordova || window.cordova ? h = K("cordova") : h = K(), typeof r.useNonce < "u" && (R = r.useNonce), typeof r.checkLoginIframe < "u" && (p.enable = r.checkLoginIframe), r.checkLoginIframeInterval && (p.interval = r.checkLoginIframeInterval), r.onLoad === "login-required" && (e.loginRequired = !0), r.responseMode)
|
|
30
|
+
if (r.responseMode === "query" || r.responseMode === "fragment")
|
|
31
|
+
e.responseMode = r.responseMode;
|
|
32
|
+
else
|
|
33
|
+
throw "Invalid value for responseMode";
|
|
34
|
+
if (r.flow) {
|
|
35
|
+
switch (r.flow) {
|
|
36
|
+
case "standard":
|
|
37
|
+
e.responseType = "code";
|
|
38
|
+
break;
|
|
39
|
+
case "implicit":
|
|
40
|
+
e.responseType = "id_token token";
|
|
41
|
+
break;
|
|
42
|
+
case "hybrid":
|
|
43
|
+
e.responseType = "code id_token token";
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
throw "Invalid value for flow";
|
|
50
47
|
}
|
|
51
|
-
|
|
52
|
-
if (r.pkceMethod !== "S256" && r.pkceMethod !== !1)
|
|
53
|
-
throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${r.pkceMethod}.`);
|
|
54
|
-
e.pkceMethod = r.pkceMethod;
|
|
55
|
-
} else
|
|
56
|
-
e.pkceMethod = "S256";
|
|
57
|
-
typeof r.enableLogging == "boolean" ? e.enableLogging = r.enableLogging : e.enableLogging = !1, r.logoutMethod === "POST" ? e.logoutMethod = "POST" : e.logoutMethod = "GET", typeof r.scope == "string" && (e.scope = r.scope), typeof r.acrValues == "string" && (e.acrValues = r.acrValues), typeof r.messageReceiveTimeout == "number" && r.messageReceiveTimeout > 0 ? e.messageReceiveTimeout = r.messageReceiveTimeout : e.messageReceiveTimeout = 1e4;
|
|
48
|
+
e.flow = r.flow;
|
|
58
49
|
}
|
|
59
|
-
|
|
50
|
+
if (r.timeSkew != null && (e.timeSkew = r.timeSkew), r.redirectUri && (e.redirectUri = r.redirectUri), r.silentCheckSsoRedirectUri && (e.silentCheckSsoRedirectUri = r.silentCheckSsoRedirectUri), typeof r.silentCheckSsoFallback == "boolean" ? e.silentCheckSsoFallback = r.silentCheckSsoFallback : e.silentCheckSsoFallback = !0, typeof r.pkceMethod < "u") {
|
|
51
|
+
if (r.pkceMethod !== "S256" && r.pkceMethod !== !1)
|
|
52
|
+
throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${r.pkceMethod}.`);
|
|
53
|
+
e.pkceMethod = r.pkceMethod;
|
|
54
|
+
} else
|
|
55
|
+
e.pkceMethod = "S256";
|
|
56
|
+
typeof r.enableLogging == "boolean" ? e.enableLogging = r.enableLogging : e.enableLogging = !1, r.logoutMethod === "POST" ? e.logoutMethod = "POST" : e.logoutMethod = "GET", typeof r.scope == "string" && (e.scope = r.scope), typeof r.acrValues == "string" && (e.acrValues = r.acrValues), typeof r.messageReceiveTimeout == "number" && r.messageReceiveTimeout > 0 ? e.messageReceiveTimeout = r.messageReceiveTimeout : e.messageReceiveTimeout = 1e4, e.responseMode || (e.responseMode = "fragment"), e.responseType || (e.responseType = "code", e.flow = "standard");
|
|
60
57
|
var s = g(), i = g();
|
|
61
58
|
i.promise.then(function() {
|
|
62
59
|
e.onReady && e.onReady(e.authenticated), s.setSuccess(e.authenticated);
|
|
63
60
|
}).catch(function(o) {
|
|
64
61
|
s.setError(o);
|
|
65
62
|
});
|
|
66
|
-
var a =
|
|
63
|
+
var a = Q();
|
|
67
64
|
function c() {
|
|
68
|
-
var o = function(
|
|
69
|
-
|
|
65
|
+
var o = function(u) {
|
|
66
|
+
u || (d.prompt = "none"), r.locale && (d.locale = r.locale), e.login(d).then(function() {
|
|
70
67
|
i.setSuccess();
|
|
71
|
-
}).catch(function(
|
|
72
|
-
i.setError(
|
|
68
|
+
}).catch(function(m) {
|
|
69
|
+
i.setError(m);
|
|
73
70
|
});
|
|
74
71
|
}, l = async function() {
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
var
|
|
78
|
-
if (!(S.origin !== window.location.origin ||
|
|
79
|
-
var
|
|
80
|
-
I(
|
|
72
|
+
var u = document.createElement("iframe"), m = await e.createLoginUrl({ prompt: "none", redirectUri: e.silentCheckSsoRedirectUri });
|
|
73
|
+
u.setAttribute("src", m), u.setAttribute("sandbox", "allow-storage-access-by-user-activation allow-scripts allow-same-origin"), u.setAttribute("title", "keycloak-silent-check-sso"), u.style.display = "none", document.body.appendChild(u);
|
|
74
|
+
var w = function(S) {
|
|
75
|
+
if (!(S.origin !== window.location.origin || u.contentWindow !== S.source)) {
|
|
76
|
+
var b = T(S.data);
|
|
77
|
+
I(b, i), document.body.removeChild(u), window.removeEventListener("message", w);
|
|
81
78
|
}
|
|
82
79
|
};
|
|
83
|
-
window.addEventListener("message",
|
|
84
|
-
},
|
|
80
|
+
window.addEventListener("message", w);
|
|
81
|
+
}, d = {};
|
|
85
82
|
switch (r.onLoad) {
|
|
86
83
|
case "check-sso":
|
|
87
|
-
p.enable ?
|
|
88
|
-
C().then(function(
|
|
89
|
-
|
|
90
|
-
}).catch(function(
|
|
91
|
-
i.setError(
|
|
84
|
+
p.enable ? P().then(function() {
|
|
85
|
+
C().then(function(u) {
|
|
86
|
+
u ? i.setSuccess() : e.silentCheckSsoRedirectUri ? l() : o(!1);
|
|
87
|
+
}).catch(function(u) {
|
|
88
|
+
i.setError(u);
|
|
92
89
|
});
|
|
93
90
|
}) : e.silentCheckSsoRedirectUri ? l() : o(!1);
|
|
94
91
|
break;
|
|
@@ -102,14 +99,14 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
102
99
|
function n() {
|
|
103
100
|
var o = T(window.location.href);
|
|
104
101
|
if (o && window.history.replaceState(window.history.state, null, o.newUrl), o && o.valid)
|
|
105
|
-
return
|
|
102
|
+
return P().then(function() {
|
|
106
103
|
I(o, i);
|
|
107
104
|
}).catch(function(l) {
|
|
108
105
|
i.setError(l);
|
|
109
106
|
});
|
|
110
|
-
r
|
|
107
|
+
r.token && r.refreshToken ? (A(r.token, r.refreshToken, r.idToken), p.enable ? P().then(function() {
|
|
111
108
|
C().then(function(l) {
|
|
112
|
-
l ? (e.onAuthSuccess && e.onAuthSuccess(), i.setSuccess(),
|
|
109
|
+
l ? (e.onAuthSuccess && e.onAuthSuccess(), i.setSuccess(), M()) : i.setSuccess();
|
|
113
110
|
}).catch(function(l) {
|
|
114
111
|
i.setError(l);
|
|
115
112
|
});
|
|
@@ -117,10 +114,10 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
117
114
|
e.onAuthSuccess && e.onAuthSuccess(), i.setSuccess();
|
|
118
115
|
}).catch(function(l) {
|
|
119
116
|
e.onAuthError && e.onAuthError(), r.onLoad ? c() : i.setError(l);
|
|
120
|
-
})) : r.onLoad ? c() : i.setSuccess()
|
|
117
|
+
})) : r.onLoad ? c() : i.setSuccess();
|
|
121
118
|
}
|
|
122
119
|
return a.then(function() {
|
|
123
|
-
|
|
120
|
+
re().then(n).catch(function(o) {
|
|
124
121
|
s.setError(o);
|
|
125
122
|
});
|
|
126
123
|
}), a.catch(function(o) {
|
|
@@ -129,26 +126,26 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
129
126
|
}, e.login = function(r) {
|
|
130
127
|
return h.login(r);
|
|
131
128
|
};
|
|
132
|
-
function
|
|
129
|
+
function G(r) {
|
|
133
130
|
if (typeof crypto > "u" || typeof crypto.getRandomValues > "u")
|
|
134
131
|
throw new Error("Web Crypto API is not available.");
|
|
135
132
|
return crypto.getRandomValues(new Uint8Array(r));
|
|
136
133
|
}
|
|
137
|
-
function
|
|
134
|
+
function X(r) {
|
|
138
135
|
return q(r, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
|
|
139
136
|
}
|
|
140
137
|
function q(r, t) {
|
|
141
|
-
for (var s =
|
|
138
|
+
for (var s = G(r), i = new Array(r), a = 0; a < r; a++)
|
|
142
139
|
i[a] = t.charCodeAt(s[a] % t.length);
|
|
143
140
|
return String.fromCharCode.apply(null, i);
|
|
144
141
|
}
|
|
145
142
|
async function B(r, t) {
|
|
146
143
|
if (r !== "S256")
|
|
147
144
|
throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${r}'.`);
|
|
148
|
-
const s = new Uint8Array(await
|
|
149
|
-
return
|
|
145
|
+
const s = new Uint8Array(await oe(t));
|
|
146
|
+
return ne(s).replace(/\+/g, "-").replace(/\//g, "_").replace(/\=/g, "");
|
|
150
147
|
}
|
|
151
|
-
function
|
|
148
|
+
function W(r) {
|
|
152
149
|
var t = {
|
|
153
150
|
id_token: {
|
|
154
151
|
acr: r
|
|
@@ -157,7 +154,7 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
157
154
|
return JSON.stringify(t);
|
|
158
155
|
}
|
|
159
156
|
e.createLoginUrl = async function(r) {
|
|
160
|
-
var t =
|
|
157
|
+
var t = J(), s = J(), i = h.redirectUri(r), a = {
|
|
161
158
|
state: t,
|
|
162
159
|
nonce: s,
|
|
163
160
|
redirectUri: encodeURIComponent(i),
|
|
@@ -169,16 +166,16 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
169
166
|
var n = r && r.scope || e.scope;
|
|
170
167
|
n ? n.indexOf("openid") === -1 && (n = "openid " + n) : n = "openid";
|
|
171
168
|
var o = c + "?client_id=" + encodeURIComponent(e.clientId) + "&redirect_uri=" + encodeURIComponent(i) + "&state=" + encodeURIComponent(t) + "&response_mode=" + encodeURIComponent(e.responseMode) + "&response_type=" + encodeURIComponent(e.responseType) + "&scope=" + encodeURIComponent(n);
|
|
172
|
-
if (
|
|
173
|
-
var l =
|
|
169
|
+
if (R && (o = o + "&nonce=" + encodeURIComponent(s)), r && r.prompt && (o += "&prompt=" + encodeURIComponent(r.prompt)), r && typeof r.maxAge == "number" && (o += "&max_age=" + encodeURIComponent(r.maxAge)), r && r.loginHint && (o += "&login_hint=" + encodeURIComponent(r.loginHint)), r && r.idpHint && (o += "&kc_idp_hint=" + encodeURIComponent(r.idpHint)), r && r.action && r.action != "register" && (o += "&kc_action=" + encodeURIComponent(r.action)), r && r.locale && (o += "&ui_locales=" + encodeURIComponent(r.locale)), r && r.acr) {
|
|
170
|
+
var l = W(r.acr);
|
|
174
171
|
o += "&claims=" + encodeURIComponent(l);
|
|
175
172
|
}
|
|
176
173
|
if ((r && r.acrValues || e.acrValues) && (o += "&acr_values=" + encodeURIComponent(r.acrValues || e.acrValues)), e.pkceMethod)
|
|
177
174
|
try {
|
|
178
|
-
const
|
|
179
|
-
a.pkceCodeVerifier =
|
|
180
|
-
} catch (
|
|
181
|
-
throw new Error("Failed to generate PKCE challenge.", { cause:
|
|
175
|
+
const d = X(96), u = await B(e.pkceMethod, d);
|
|
176
|
+
a.pkceCodeVerifier = d, o += "&code_challenge=" + u, o += "&code_challenge_method=" + e.pkceMethod;
|
|
177
|
+
} catch (d) {
|
|
178
|
+
throw new Error("Failed to generate PKCE challenge.", { cause: d });
|
|
182
179
|
}
|
|
183
180
|
return U.add(a), o;
|
|
184
181
|
}, e.logout = function(r) {
|
|
@@ -193,7 +190,7 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
193
190
|
}, e.createRegisterUrl = async function(r) {
|
|
194
191
|
return r || (r = {}), r.action = "register", await e.createLoginUrl(r);
|
|
195
192
|
}, e.createAccountUrl = function(r) {
|
|
196
|
-
var t =
|
|
193
|
+
var t = y(), s = void 0;
|
|
197
194
|
return typeof t < "u" && (s = t + "/account?referrer=" + encodeURIComponent(e.clientId) + "&referrer_uri=" + encodeURIComponent(h.redirectUri(r))), s;
|
|
198
195
|
}, e.accountManagement = function() {
|
|
199
196
|
return h.accountManagement();
|
|
@@ -206,7 +203,7 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
206
203
|
var s = e.resourceAccess[t || e.clientId];
|
|
207
204
|
return !!s && s.roles.indexOf(r) >= 0;
|
|
208
205
|
}, e.loadUserProfile = function() {
|
|
209
|
-
var r =
|
|
206
|
+
var r = y() + "/account", t = new XMLHttpRequest();
|
|
210
207
|
t.open("GET", r, !0), t.setRequestHeader("Accept", "application/json"), t.setRequestHeader("Authorization", "bearer " + e.token);
|
|
211
208
|
var s = g();
|
|
212
209
|
return t.onreadystatechange = function() {
|
|
@@ -250,14 +247,14 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
250
247
|
if (o.readyState == 4)
|
|
251
248
|
if (o.status == 200) {
|
|
252
249
|
_("[KEYCLOAK] Token refreshed"), l = (l + (/* @__PURE__ */ new Date()).getTime()) / 2;
|
|
253
|
-
var
|
|
254
|
-
|
|
255
|
-
for (var
|
|
256
|
-
|
|
250
|
+
var d = JSON.parse(o.responseText);
|
|
251
|
+
A(d.access_token, d.refresh_token, d.id_token, l), e.onAuthRefreshSuccess && e.onAuthRefreshSuccess();
|
|
252
|
+
for (var u = v.pop(); u != null; u = v.pop())
|
|
253
|
+
u.setSuccess(!0);
|
|
257
254
|
} else {
|
|
258
|
-
|
|
259
|
-
for (var
|
|
260
|
-
|
|
255
|
+
x("[KEYCLOAK] Failed to refresh token"), o.status == 400 && e.clearToken(), e.onAuthRefreshError && e.onAuthRefreshError();
|
|
256
|
+
for (var u = v.pop(); u != null; u = v.pop())
|
|
257
|
+
u.setError("Failed to refresh token: An unexpected HTTP error occurred while attempting to refresh the token.");
|
|
261
258
|
}
|
|
262
259
|
}, o.send(c);
|
|
263
260
|
}
|
|
@@ -274,13 +271,13 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
274
271
|
s();
|
|
275
272
|
return t.promise;
|
|
276
273
|
}, e.clearToken = function() {
|
|
277
|
-
e.token && (
|
|
274
|
+
e.token && (A(null, null, null), e.onAuthLogout && e.onAuthLogout(), e.loginRequired && e.login());
|
|
278
275
|
};
|
|
279
|
-
function
|
|
276
|
+
function y() {
|
|
280
277
|
if (typeof e.authServerUrl < "u")
|
|
281
278
|
return e.authServerUrl.charAt(e.authServerUrl.length - 1) == "/" ? e.authServerUrl + "realms/" + encodeURIComponent(e.realm) : e.authServerUrl + "/realms/" + encodeURIComponent(e.realm);
|
|
282
279
|
}
|
|
283
|
-
function
|
|
280
|
+
function $() {
|
|
284
281
|
return window.location.origin ? window.location.origin : window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : "");
|
|
285
282
|
}
|
|
286
283
|
function I(r, t) {
|
|
@@ -296,23 +293,23 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
296
293
|
else
|
|
297
294
|
t && t.setSuccess();
|
|
298
295
|
return;
|
|
299
|
-
} else e.flow != "standard" && (r.access_token || r.id_token) &&
|
|
296
|
+
} else e.flow != "standard" && (r.access_token || r.id_token) && u(r.access_token, null, r.id_token, !0);
|
|
300
297
|
if (e.flow != "implicit" && s) {
|
|
301
|
-
var o = "code=" + s + "&grant_type=authorization_code", l = e.endpoints.token(),
|
|
302
|
-
|
|
303
|
-
if (
|
|
304
|
-
if (
|
|
305
|
-
var
|
|
306
|
-
|
|
298
|
+
var o = "code=" + s + "&grant_type=authorization_code", l = e.endpoints.token(), d = new XMLHttpRequest();
|
|
299
|
+
d.open("POST", l, !0), d.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), o += "&client_id=" + encodeURIComponent(e.clientId), o += "&redirect_uri=" + r.redirectUri, r.pkceCodeVerifier && (o += "&code_verifier=" + r.pkceCodeVerifier), d.withCredentials = !0, d.onreadystatechange = function() {
|
|
300
|
+
if (d.readyState == 4)
|
|
301
|
+
if (d.status == 200) {
|
|
302
|
+
var m = JSON.parse(d.responseText);
|
|
303
|
+
u(m.access_token, m.refresh_token, m.id_token, e.flow === "standard"), M();
|
|
307
304
|
} else
|
|
308
305
|
e.onAuthError && e.onAuthError(), t && t.setError();
|
|
309
|
-
},
|
|
306
|
+
}, d.send(o);
|
|
310
307
|
}
|
|
311
|
-
function
|
|
312
|
-
c = (c + (/* @__PURE__ */ new Date()).getTime()) / 2,
|
|
308
|
+
function u(m, w, S, b) {
|
|
309
|
+
c = (c + (/* @__PURE__ */ new Date()).getTime()) / 2, A(m, w, S, c), R && e.idTokenParsed && e.idTokenParsed.nonce != r.storedNonce ? (_("[KEYCLOAK] Invalid nonce, clearing token"), e.clearToken(), t && t.setError()) : b && (e.onAuthSuccess && e.onAuthSuccess(), t && t.setSuccess());
|
|
313
310
|
}
|
|
314
311
|
}
|
|
315
|
-
function
|
|
312
|
+
function Q() {
|
|
316
313
|
var r = g(), t;
|
|
317
314
|
typeof f == "string" && (t = f);
|
|
318
315
|
function s(n) {
|
|
@@ -343,25 +340,25 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
343
340
|
}
|
|
344
341
|
} : e.endpoints = {
|
|
345
342
|
authorize: function() {
|
|
346
|
-
return
|
|
343
|
+
return y() + "/protocol/openid-connect/auth";
|
|
347
344
|
},
|
|
348
345
|
token: function() {
|
|
349
|
-
return
|
|
346
|
+
return y() + "/protocol/openid-connect/token";
|
|
350
347
|
},
|
|
351
348
|
logout: function() {
|
|
352
|
-
return
|
|
349
|
+
return y() + "/protocol/openid-connect/logout";
|
|
353
350
|
},
|
|
354
351
|
checkSessionIframe: function() {
|
|
355
|
-
return
|
|
352
|
+
return y() + "/protocol/openid-connect/login-status-iframe.html";
|
|
356
353
|
},
|
|
357
354
|
thirdPartyCookiesIframe: function() {
|
|
358
|
-
return
|
|
355
|
+
return y() + "/protocol/openid-connect/3p-cookies/step1.html";
|
|
359
356
|
},
|
|
360
357
|
register: function() {
|
|
361
|
-
return
|
|
358
|
+
return y() + "/protocol/openid-connect/registrations";
|
|
362
359
|
},
|
|
363
360
|
userinfo: function() {
|
|
364
|
-
return
|
|
361
|
+
return y() + "/protocol/openid-connect/userinfo";
|
|
365
362
|
}
|
|
366
363
|
};
|
|
367
364
|
}
|
|
@@ -369,7 +366,7 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
369
366
|
var i = new XMLHttpRequest();
|
|
370
367
|
i.open("GET", t, !0), i.setRequestHeader("Accept", "application/json"), i.onreadystatechange = function() {
|
|
371
368
|
if (i.readyState == 4)
|
|
372
|
-
if (i.status == 200 ||
|
|
369
|
+
if (i.status == 200 || O(i)) {
|
|
373
370
|
var n = JSON.parse(i.responseText);
|
|
374
371
|
e.authServerUrl = n["auth-server-url"], e.realm = n.realm, e.clientId = n.resource, s(null), r.setSuccess();
|
|
375
372
|
} else
|
|
@@ -386,7 +383,7 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
386
383
|
var i = new XMLHttpRequest();
|
|
387
384
|
i.open("GET", c, !0), i.setRequestHeader("Accept", "application/json"), i.onreadystatechange = function() {
|
|
388
385
|
if (i.readyState == 4)
|
|
389
|
-
if (i.status == 200 ||
|
|
386
|
+
if (i.status == 200 || O(i)) {
|
|
390
387
|
var o = JSON.parse(i.responseText);
|
|
391
388
|
s(o), r.setSuccess();
|
|
392
389
|
} else
|
|
@@ -397,31 +394,31 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
397
394
|
}
|
|
398
395
|
return r.promise;
|
|
399
396
|
}
|
|
400
|
-
function
|
|
397
|
+
function O(r) {
|
|
401
398
|
return r.status == 0 && r.responseText && r.responseURL.startsWith("file:");
|
|
402
399
|
}
|
|
403
|
-
function
|
|
404
|
-
if (e.tokenTimeoutHandle && (clearTimeout(e.tokenTimeoutHandle), e.tokenTimeoutHandle = null), t ? (e.refreshToken = t, e.refreshTokenParsed =
|
|
405
|
-
if (e.token = r, e.tokenParsed =
|
|
400
|
+
function A(r, t, s, i) {
|
|
401
|
+
if (e.tokenTimeoutHandle && (clearTimeout(e.tokenTimeoutHandle), e.tokenTimeoutHandle = null), t ? (e.refreshToken = t, e.refreshTokenParsed = j(t)) : (delete e.refreshToken, delete e.refreshTokenParsed), s ? (e.idToken = s, e.idTokenParsed = j(s)) : (delete e.idToken, delete e.idTokenParsed), r) {
|
|
402
|
+
if (e.token = r, e.tokenParsed = j(r), e.sessionId = e.tokenParsed.sid, e.authenticated = !0, e.subject = e.tokenParsed.sub, e.realmAccess = e.tokenParsed.realm_access, e.resourceAccess = e.tokenParsed.resource_access, i && (e.timeSkew = Math.floor(i / 1e3) - e.tokenParsed.iat), e.timeSkew != null && (_("[KEYCLOAK] Estimated time difference between browser and server is " + e.timeSkew + " seconds"), e.onTokenExpired)) {
|
|
406
403
|
var a = (e.tokenParsed.exp - (/* @__PURE__ */ new Date()).getTime() / 1e3 + e.timeSkew) * 1e3;
|
|
407
404
|
_("[KEYCLOAK] Token expires in " + Math.round(a / 1e3) + " s"), a <= 0 ? e.onTokenExpired() : e.tokenTimeoutHandle = setTimeout(e.onTokenExpired, a);
|
|
408
405
|
}
|
|
409
406
|
} else
|
|
410
407
|
delete e.token, delete e.tokenParsed, delete e.subject, delete e.realmAccess, delete e.resourceAccess, e.authenticated = !1;
|
|
411
408
|
}
|
|
412
|
-
function
|
|
409
|
+
function J() {
|
|
413
410
|
if (typeof crypto > "u" || typeof crypto.randomUUID > "u")
|
|
414
411
|
throw new Error("Web Crypto API is not available.");
|
|
415
412
|
return crypto.randomUUID();
|
|
416
413
|
}
|
|
417
414
|
function T(r) {
|
|
418
|
-
var t =
|
|
415
|
+
var t = Z(r);
|
|
419
416
|
if (t) {
|
|
420
417
|
var s = U.get(t.state);
|
|
421
418
|
return s && (t.valid = !0, t.redirectUri = s.redirectUri, t.storedNonce = s.nonce, t.prompt = s.prompt, t.pkceCodeVerifier = s.pkceCodeVerifier, t.loginOptions = s.loginOptions), t;
|
|
422
419
|
}
|
|
423
420
|
}
|
|
424
|
-
function
|
|
421
|
+
function Z(r) {
|
|
425
422
|
var t;
|
|
426
423
|
switch (e.flow) {
|
|
427
424
|
case "standard":
|
|
@@ -436,7 +433,7 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
436
433
|
}
|
|
437
434
|
t.push("error"), t.push("error_description"), t.push("error_uri");
|
|
438
435
|
var s = r.indexOf("?"), i = r.indexOf("#"), a, c;
|
|
439
|
-
if (e.responseMode === "query" && s !== -1 ? (a = r.substring(0, s), c =
|
|
436
|
+
if (e.responseMode === "query" && s !== -1 ? (a = r.substring(0, s), c = V(r.substring(s + 1, i !== -1 ? i : r.length), t), c.paramsString !== "" && (a += "?" + c.paramsString), i !== -1 && (a += r.substring(i))) : e.responseMode === "fragment" && i !== -1 && (a = r.substring(0, i), c = V(r.substring(i + 1), t), c.paramsString !== "" && (a += "#" + c.paramsString)), c && c.oauthParams) {
|
|
440
437
|
if (e.flow === "standard" || e.flow === "hybrid") {
|
|
441
438
|
if ((c.oauthParams.code || c.oauthParams.error) && c.oauthParams.state)
|
|
442
439
|
return c.oauthParams.newUrl = a, c.oauthParams;
|
|
@@ -444,7 +441,7 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
444
441
|
return c.oauthParams.newUrl = a, c.oauthParams;
|
|
445
442
|
}
|
|
446
443
|
}
|
|
447
|
-
function
|
|
444
|
+
function V(r, t) {
|
|
448
445
|
for (var s = r.split("&"), i = {
|
|
449
446
|
paramsString: "",
|
|
450
447
|
oauthParams: {}
|
|
@@ -467,7 +464,7 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
467
464
|
r.resolve = t, r.reject = s;
|
|
468
465
|
}), r;
|
|
469
466
|
}
|
|
470
|
-
function
|
|
467
|
+
function ee(r, t, s) {
|
|
471
468
|
var i = null, a = new Promise(function(c, n) {
|
|
472
469
|
i = setTimeout(function() {
|
|
473
470
|
n({ error: s });
|
|
@@ -477,14 +474,14 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
477
474
|
clearTimeout(i);
|
|
478
475
|
});
|
|
479
476
|
}
|
|
480
|
-
function
|
|
477
|
+
function P() {
|
|
481
478
|
var r = g();
|
|
482
479
|
if (!p.enable || p.iframe)
|
|
483
480
|
return r.setSuccess(), r.promise;
|
|
484
481
|
var t = document.createElement("iframe");
|
|
485
482
|
p.iframe = t, t.onload = function() {
|
|
486
483
|
var a = e.endpoints.authorize();
|
|
487
|
-
a.charAt(0) === "/" ? p.iframeOrigin =
|
|
484
|
+
a.charAt(0) === "/" ? p.iframeOrigin = $() : p.iframeOrigin = a.substring(0, a.indexOf("/", 8)), r.setSuccess();
|
|
488
485
|
};
|
|
489
486
|
var s = e.endpoints.checkSessionIframe();
|
|
490
487
|
t.setAttribute("src", s), t.setAttribute("sandbox", "allow-storage-access-by-user-activation allow-scripts allow-same-origin"), t.setAttribute("title", "keycloak-session-iframe"), t.style.display = "none", document.body.appendChild(t);
|
|
@@ -499,10 +496,10 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
499
496
|
};
|
|
500
497
|
return window.addEventListener("message", i, !1), r.promise;
|
|
501
498
|
}
|
|
502
|
-
function
|
|
499
|
+
function M() {
|
|
503
500
|
p.enable && e.token && setTimeout(function() {
|
|
504
501
|
C().then(function(r) {
|
|
505
|
-
r &&
|
|
502
|
+
r && M();
|
|
506
503
|
});
|
|
507
504
|
}, p.interval * 1e3);
|
|
508
505
|
}
|
|
@@ -517,27 +514,27 @@ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/
|
|
|
517
514
|
r.setSuccess();
|
|
518
515
|
return r.promise;
|
|
519
516
|
}
|
|
520
|
-
function
|
|
517
|
+
function re() {
|
|
521
518
|
var r = g();
|
|
522
|
-
if (p.enable || e.silentCheckSsoRedirectUri) {
|
|
519
|
+
if ((p.enable || e.silentCheckSsoRedirectUri) && typeof e.endpoints.thirdPartyCookiesIframe == "function") {
|
|
523
520
|
var t = document.createElement("iframe");
|
|
524
521
|
t.setAttribute("src", e.endpoints.thirdPartyCookiesIframe()), t.setAttribute("sandbox", "allow-storage-access-by-user-activation allow-scripts allow-same-origin"), t.setAttribute("title", "keycloak-3p-check-iframe"), t.style.display = "none", document.body.appendChild(t);
|
|
525
522
|
var s = function(i) {
|
|
526
|
-
t.contentWindow === i.source && (i.data !== "supported" && i.data !== "unsupported" || (i.data === "unsupported" && (
|
|
523
|
+
t.contentWindow === i.source && (i.data !== "supported" && i.data !== "unsupported" || (i.data === "unsupported" && (x(
|
|
527
524
|
`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
|
|
528
525
|
|
|
529
526
|
- It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
|
|
530
527
|
- It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
|
|
531
528
|
|
|
532
|
-
For more information see: https://www.keycloak.org/
|
|
529
|
+
For more information see: https://www.keycloak.org/securing-apps/javascript-adapter#_modern_browsers`
|
|
533
530
|
), p.enable = !1, e.silentCheckSsoFallback && (e.silentCheckSsoRedirectUri = !1)), document.body.removeChild(t), window.removeEventListener("message", s), r.setSuccess()));
|
|
534
531
|
};
|
|
535
532
|
window.addEventListener("message", s, !1);
|
|
536
533
|
} else
|
|
537
534
|
r.setSuccess();
|
|
538
|
-
return
|
|
535
|
+
return ee(r.promise, e.messageReceiveTimeout, "Timeout when waiting for 3rd party check iframe message.");
|
|
539
536
|
}
|
|
540
|
-
function
|
|
537
|
+
function K(r) {
|
|
541
538
|
if (!r || r == "default")
|
|
542
539
|
return {
|
|
543
540
|
login: async function(n) {
|
|
@@ -548,29 +545,21 @@ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_m
|
|
|
548
545
|
window.location.replace(e.createLogoutUrl(n));
|
|
549
546
|
return;
|
|
550
547
|
}
|
|
551
|
-
const l =
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
});
|
|
562
|
-
if (u.redirected) {
|
|
563
|
-
window.location.href = u.url;
|
|
564
|
-
return;
|
|
565
|
-
}
|
|
566
|
-
if (u.ok) {
|
|
567
|
-
window.location.reload();
|
|
568
|
-
return;
|
|
548
|
+
const l = document.createElement("form");
|
|
549
|
+
l.setAttribute("method", "POST"), l.setAttribute("action", e.createLogoutUrl(n)), l.style.display = "none";
|
|
550
|
+
const d = {
|
|
551
|
+
id_token_hint: e.idToken,
|
|
552
|
+
client_id: e.clientId,
|
|
553
|
+
post_logout_redirect_uri: h.redirectUri(n, !1)
|
|
554
|
+
};
|
|
555
|
+
for (const [u, m] of Object.entries(d)) {
|
|
556
|
+
const w = document.createElement("input");
|
|
557
|
+
w.setAttribute("type", "hidden"), w.setAttribute("name", u), w.setAttribute("value", m), l.appendChild(w);
|
|
569
558
|
}
|
|
570
|
-
|
|
559
|
+
document.body.appendChild(l), l.submit();
|
|
571
560
|
},
|
|
572
|
-
register: function(n) {
|
|
573
|
-
return window.location.assign(e.createRegisterUrl(n)), g().promise;
|
|
561
|
+
register: async function(n) {
|
|
562
|
+
return window.location.assign(await e.createRegisterUrl(n)), g().promise;
|
|
574
563
|
},
|
|
575
564
|
accountManagement: function() {
|
|
576
565
|
var n = e.createAccountUrl();
|
|
@@ -604,44 +593,44 @@ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_m
|
|
|
604
593
|
};
|
|
605
594
|
return {
|
|
606
595
|
login: async function(n) {
|
|
607
|
-
var o = g(), l = a(n),
|
|
608
|
-
|
|
596
|
+
var o = g(), l = a(n), d = await e.createLoginUrl(n), u = t(d, "_blank", l), m = !1, w = !1, S = function() {
|
|
597
|
+
w = !0, u.close();
|
|
609
598
|
};
|
|
610
|
-
return
|
|
611
|
-
if (
|
|
612
|
-
var
|
|
613
|
-
I(
|
|
599
|
+
return u.addEventListener("loadstart", function(b) {
|
|
600
|
+
if (b.url.indexOf(c()) == 0) {
|
|
601
|
+
var D = T(b.url);
|
|
602
|
+
I(D, o), S(), m = !0;
|
|
614
603
|
}
|
|
615
|
-
}),
|
|
616
|
-
if (!
|
|
617
|
-
if (
|
|
618
|
-
var
|
|
619
|
-
I(
|
|
604
|
+
}), u.addEventListener("loaderror", function(b) {
|
|
605
|
+
if (!m)
|
|
606
|
+
if (b.url.indexOf(c()) == 0) {
|
|
607
|
+
var D = T(b.url);
|
|
608
|
+
I(D, o), S(), m = !0;
|
|
620
609
|
} else
|
|
621
610
|
o.setError(), S();
|
|
622
|
-
}),
|
|
623
|
-
|
|
611
|
+
}), u.addEventListener("exit", function(b) {
|
|
612
|
+
w || o.setError({
|
|
624
613
|
reason: "closed_by_user"
|
|
625
614
|
});
|
|
626
615
|
}), o.promise;
|
|
627
616
|
},
|
|
628
617
|
logout: function(n) {
|
|
629
|
-
var o = g(), l = e.createLogoutUrl(n),
|
|
630
|
-
return
|
|
631
|
-
|
|
632
|
-
}),
|
|
633
|
-
|
|
634
|
-
}),
|
|
635
|
-
|
|
618
|
+
var o = g(), l = e.createLogoutUrl(n), d = t(l, "_blank", "location=no,hidden=yes,clearcache=yes"), u;
|
|
619
|
+
return d.addEventListener("loadstart", function(m) {
|
|
620
|
+
m.url.indexOf(c()) == 0 && d.close();
|
|
621
|
+
}), d.addEventListener("loaderror", function(m) {
|
|
622
|
+
m.url.indexOf(c()) == 0 || (u = !0), d.close();
|
|
623
|
+
}), d.addEventListener("exit", function(m) {
|
|
624
|
+
u ? o.setError() : (e.clearToken(), o.setSuccess());
|
|
636
625
|
}), o.promise;
|
|
637
626
|
},
|
|
638
|
-
register: function(n) {
|
|
639
|
-
var o = g(), l = e.createRegisterUrl(),
|
|
640
|
-
return
|
|
641
|
-
if (
|
|
642
|
-
|
|
643
|
-
var
|
|
644
|
-
I(
|
|
627
|
+
register: async function(n) {
|
|
628
|
+
var o = g(), l = await e.createRegisterUrl(), d = a(n), u = t(l, "_blank", d);
|
|
629
|
+
return u.addEventListener("loadstart", function(m) {
|
|
630
|
+
if (m.url.indexOf(c()) == 0) {
|
|
631
|
+
u.close();
|
|
632
|
+
var w = T(m.url);
|
|
633
|
+
I(w, o);
|
|
645
634
|
}
|
|
646
635
|
}), o.promise;
|
|
647
636
|
},
|
|
@@ -664,24 +653,24 @@ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_m
|
|
|
664
653
|
return p.enable = !1, {
|
|
665
654
|
login: async function(n) {
|
|
666
655
|
var o = g(), l = await e.createLoginUrl(n);
|
|
667
|
-
return universalLinks.subscribe("keycloak", function(
|
|
656
|
+
return universalLinks.subscribe("keycloak", function(d) {
|
|
668
657
|
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close();
|
|
669
|
-
var
|
|
670
|
-
I(
|
|
658
|
+
var u = T(d.url);
|
|
659
|
+
I(u, o);
|
|
671
660
|
}), window.cordova.plugins.browsertab.openUrl(l), o.promise;
|
|
672
661
|
},
|
|
673
662
|
logout: function(n) {
|
|
674
663
|
var o = g(), l = e.createLogoutUrl(n);
|
|
675
|
-
return universalLinks.subscribe("keycloak", function(
|
|
664
|
+
return universalLinks.subscribe("keycloak", function(d) {
|
|
676
665
|
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close(), e.clearToken(), o.setSuccess();
|
|
677
666
|
}), window.cordova.plugins.browsertab.openUrl(l), o.promise;
|
|
678
667
|
},
|
|
679
|
-
register: function(n) {
|
|
680
|
-
var o = g(), l = e.createRegisterUrl(n);
|
|
681
|
-
return universalLinks.subscribe("keycloak", function(
|
|
668
|
+
register: async function(n) {
|
|
669
|
+
var o = g(), l = await e.createRegisterUrl(n);
|
|
670
|
+
return universalLinks.subscribe("keycloak", function(d) {
|
|
682
671
|
universalLinks.unsubscribe("keycloak"), window.cordova.plugins.browsertab.close();
|
|
683
|
-
var
|
|
684
|
-
I(
|
|
672
|
+
var u = T(d.url);
|
|
673
|
+
I(u, o);
|
|
685
674
|
}), window.cordova.plugins.browsertab.openUrl(l), o.promise;
|
|
686
675
|
},
|
|
687
676
|
accountManagement: function() {
|
|
@@ -697,48 +686,65 @@ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_m
|
|
|
697
686
|
};
|
|
698
687
|
throw "invalid adapter type: " + r;
|
|
699
688
|
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
689
|
+
const E = "kc-callback-";
|
|
690
|
+
var H = function() {
|
|
691
|
+
if (!(this instanceof H))
|
|
692
|
+
return new H();
|
|
703
693
|
localStorage.setItem("kc-test", "test"), localStorage.removeItem("kc-test");
|
|
704
694
|
var r = this;
|
|
705
695
|
function t() {
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
if (c)
|
|
711
|
-
try {
|
|
712
|
-
var n = JSON.parse(c).expires;
|
|
713
|
-
(!n || n < s) && localStorage.removeItem(a);
|
|
714
|
-
} catch {
|
|
715
|
-
localStorage.removeItem(a);
|
|
716
|
-
}
|
|
717
|
-
}
|
|
696
|
+
const c = Date.now();
|
|
697
|
+
for (const [n, o] of i()) {
|
|
698
|
+
const l = a(o);
|
|
699
|
+
(l === null || l < c) && localStorage.removeItem(n);
|
|
718
700
|
}
|
|
719
701
|
}
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
702
|
+
function s() {
|
|
703
|
+
for (const [c] of i())
|
|
704
|
+
localStorage.removeItem(c);
|
|
705
|
+
}
|
|
706
|
+
function i() {
|
|
707
|
+
return Object.entries(localStorage).filter(([c]) => c.startsWith(E));
|
|
708
|
+
}
|
|
709
|
+
function a(c) {
|
|
710
|
+
let n;
|
|
711
|
+
try {
|
|
712
|
+
n = JSON.parse(c);
|
|
713
|
+
} catch {
|
|
714
|
+
return null;
|
|
724
715
|
}
|
|
725
|
-
|
|
716
|
+
return z(n) && "expires" in n && typeof n.expires == "number" ? n.expires : null;
|
|
717
|
+
}
|
|
718
|
+
r.get = function(c) {
|
|
719
|
+
if (c) {
|
|
720
|
+
var n = E + c, o = localStorage.getItem(n);
|
|
721
|
+
return o && (localStorage.removeItem(n), o = JSON.parse(o)), t(), o;
|
|
722
|
+
}
|
|
723
|
+
}, r.add = function(c) {
|
|
726
724
|
t();
|
|
727
|
-
|
|
728
|
-
|
|
725
|
+
const n = E + c.state, o = JSON.stringify({
|
|
726
|
+
...c,
|
|
727
|
+
// Set the expiry time to 1 hour from now.
|
|
728
|
+
expires: Date.now() + 60 * 60 * 1e3
|
|
729
|
+
});
|
|
730
|
+
try {
|
|
731
|
+
localStorage.setItem(n, o);
|
|
732
|
+
} catch {
|
|
733
|
+
s(), localStorage.setItem(n, o);
|
|
734
|
+
}
|
|
729
735
|
};
|
|
730
|
-
},
|
|
731
|
-
if (!(this instanceof
|
|
732
|
-
return new
|
|
736
|
+
}, N = function() {
|
|
737
|
+
if (!(this instanceof N))
|
|
738
|
+
return new N();
|
|
733
739
|
var r = this;
|
|
734
740
|
r.get = function(a) {
|
|
735
741
|
if (a) {
|
|
736
|
-
var c = s(
|
|
737
|
-
if (i(
|
|
742
|
+
var c = s(E + a);
|
|
743
|
+
if (i(E + a, "", t(-100)), c)
|
|
738
744
|
return JSON.parse(c);
|
|
739
745
|
}
|
|
740
746
|
}, r.add = function(a) {
|
|
741
|
-
i(
|
|
747
|
+
i(E + a.state, JSON.stringify(a), t(60));
|
|
742
748
|
}, r.removeItem = function(a) {
|
|
743
749
|
i(a, "", t(-100));
|
|
744
750
|
};
|
|
@@ -758,36 +764,36 @@ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_m
|
|
|
758
764
|
document.cookie = o;
|
|
759
765
|
};
|
|
760
766
|
};
|
|
761
|
-
function
|
|
767
|
+
function te() {
|
|
762
768
|
try {
|
|
763
|
-
return new
|
|
769
|
+
return new H();
|
|
764
770
|
} catch {
|
|
765
771
|
}
|
|
766
|
-
return new
|
|
772
|
+
return new N();
|
|
767
773
|
}
|
|
768
|
-
function
|
|
774
|
+
function F(r) {
|
|
769
775
|
return function() {
|
|
770
776
|
e.enableLogging && r.apply(console, Array.prototype.slice.call(arguments));
|
|
771
777
|
};
|
|
772
778
|
}
|
|
773
779
|
}
|
|
774
|
-
function
|
|
780
|
+
function ne(f) {
|
|
775
781
|
const e = String.fromCodePoint(...f);
|
|
776
782
|
return btoa(e);
|
|
777
783
|
}
|
|
778
|
-
async function
|
|
784
|
+
async function oe(f) {
|
|
779
785
|
const h = new TextEncoder().encode(f);
|
|
780
786
|
if (typeof crypto > "u" || typeof crypto.subtle > "u")
|
|
781
787
|
throw new Error("Web Crypto API is not available.");
|
|
782
788
|
return await crypto.subtle.digest("SHA-256", h);
|
|
783
789
|
}
|
|
784
|
-
function
|
|
790
|
+
function j(f) {
|
|
785
791
|
const [e, h] = f.split(".");
|
|
786
792
|
if (typeof h != "string")
|
|
787
793
|
throw new Error("Unable to decode token, payload not found.");
|
|
788
794
|
let v;
|
|
789
795
|
try {
|
|
790
|
-
v =
|
|
796
|
+
v = ae(h);
|
|
791
797
|
} catch (U) {
|
|
792
798
|
throw new Error("Unable to decode token, payload is not a valid Base64URL value.", { cause: U });
|
|
793
799
|
}
|
|
@@ -797,7 +803,7 @@ function N(f) {
|
|
|
797
803
|
throw new Error("Unable to decode token, payload is not a valid JSON value.", { cause: U });
|
|
798
804
|
}
|
|
799
805
|
}
|
|
800
|
-
function
|
|
806
|
+
function ae(f) {
|
|
801
807
|
let e = f.replaceAll("-", "+").replaceAll("_", "/");
|
|
802
808
|
switch (e.length % 4) {
|
|
803
809
|
case 0:
|
|
@@ -812,55 +818,61 @@ function ne(f) {
|
|
|
812
818
|
throw new Error("Input is not of the correct length.");
|
|
813
819
|
}
|
|
814
820
|
try {
|
|
815
|
-
return
|
|
821
|
+
return ie(e);
|
|
816
822
|
} catch {
|
|
817
823
|
return atob(e);
|
|
818
824
|
}
|
|
819
825
|
}
|
|
820
|
-
function
|
|
826
|
+
function ie(f) {
|
|
821
827
|
return decodeURIComponent(atob(f).replace(/(.)/g, (e, h) => {
|
|
822
828
|
let v = h.charCodeAt(0).toString(16).toUpperCase();
|
|
823
829
|
return v.length < 2 && (v = "0" + v), "%" + v;
|
|
824
830
|
}));
|
|
825
831
|
}
|
|
826
|
-
function
|
|
832
|
+
function z(f) {
|
|
827
833
|
return typeof f == "object" && f !== null;
|
|
828
834
|
}
|
|
829
|
-
let
|
|
830
|
-
function
|
|
831
|
-
return
|
|
835
|
+
let k = null, L = null;
|
|
836
|
+
function se(f, e = !0) {
|
|
837
|
+
return L ? (console.log("Keycloak already initialized, returning from cache"), L) : (k || (k = new Y({
|
|
832
838
|
url: f.url,
|
|
833
839
|
realm: f.realm,
|
|
834
840
|
clientId: f.clientId
|
|
835
|
-
})),
|
|
841
|
+
})), L = k.init({
|
|
836
842
|
onLoad: e ? "check-sso" : "login-required",
|
|
837
843
|
checkLoginIframe: !1
|
|
838
844
|
//silentCheckSsoRedirectUri: `${window.location.origin}/silent-check-sso.html`, // Ensure this file is set up
|
|
839
|
-
}).then((h) => h).catch((h) => (console.error("Failed to initialize Keycloak:", h), !1));
|
|
845
|
+
}).then((h) => h).catch((h) => (console.error("Failed to initialize Keycloak:", h), !1)), L);
|
|
840
846
|
}
|
|
841
|
-
function
|
|
842
|
-
return
|
|
843
|
-
fullname:
|
|
844
|
-
email:
|
|
845
|
-
lastname:
|
|
846
|
-
firstname:
|
|
847
|
-
username:
|
|
847
|
+
function ce() {
|
|
848
|
+
return k != null && k.authenticated && (k != null && k.idTokenParsed) ? {
|
|
849
|
+
fullname: k.idTokenParsed.name,
|
|
850
|
+
email: k.idTokenParsed.email,
|
|
851
|
+
lastname: k.idTokenParsed.family_name,
|
|
852
|
+
firstname: k.idTokenParsed.given_name,
|
|
853
|
+
username: k.idTokenParsed.preferred_username,
|
|
848
854
|
background: "grey",
|
|
849
855
|
// Optional custom value
|
|
850
|
-
token:
|
|
851
|
-
sub:
|
|
856
|
+
token: k.token,
|
|
857
|
+
sub: k.idTokenParsed.sub
|
|
852
858
|
} : {};
|
|
853
859
|
}
|
|
854
|
-
function
|
|
855
|
-
|
|
860
|
+
function le() {
|
|
861
|
+
if (k)
|
|
862
|
+
k.login();
|
|
863
|
+
else
|
|
864
|
+
throw new Error("Keycloak is not initialized.");
|
|
856
865
|
}
|
|
857
|
-
function
|
|
858
|
-
|
|
866
|
+
function ue() {
|
|
867
|
+
if (k)
|
|
868
|
+
k.logout();
|
|
869
|
+
else
|
|
870
|
+
throw new Error("Keycloak is not initialized.");
|
|
859
871
|
}
|
|
860
|
-
function
|
|
861
|
-
return !!(
|
|
872
|
+
function de() {
|
|
873
|
+
return !!(k != null && k.authenticated);
|
|
862
874
|
}
|
|
863
|
-
async function
|
|
875
|
+
async function fe(f) {
|
|
864
876
|
try {
|
|
865
877
|
const e = await fetch(f, { method: "HEAD", mode: "no-cors" });
|
|
866
878
|
return e.ok || e.type === "opaque";
|
|
@@ -869,10 +881,10 @@ async function ue(f) {
|
|
|
869
881
|
}
|
|
870
882
|
}
|
|
871
883
|
export {
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
884
|
+
ue as a,
|
|
885
|
+
de as b,
|
|
886
|
+
fe as c,
|
|
887
|
+
ce as g,
|
|
888
|
+
se as i,
|
|
889
|
+
le as l
|
|
878
890
|
};
|