oidc-spa 8.6.19 → 8.7.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/backend.d.ts +3 -20
- package/backend.js +50 -242
- package/backend.js.map +1 -1
- package/core/OidcMetadata.d.ts +2 -2
- package/core/OidcMetadata.js.map +1 -1
- package/core/createOidc.d.ts +2 -4
- package/core/createOidc.js +41 -3
- package/core/createOidc.js.map +1 -1
- package/core/dpop.d.ts +20 -0
- package/core/dpop.js +389 -0
- package/core/dpop.js.map +1 -0
- package/core/earlyInit.js +2 -0
- package/core/earlyInit.js.map +1 -1
- package/core/oidcClientTsUserToTokens.d.ts +1 -0
- package/core/oidcClientTsUserToTokens.js +15 -5
- package/core/oidcClientTsUserToTokens.js.map +1 -1
- package/core/tokenExfiltrationDefense.js +49 -6
- package/core/tokenExfiltrationDefense.js.map +1 -1
- package/esm/angular.d.ts +2 -0
- package/esm/angular.mjs.map +1 -1
- package/esm/backend.d.ts +3 -20
- package/esm/backend.mjs +50 -242
- package/esm/backend.mjs.map +1 -1
- package/esm/core/OidcMetadata.d.ts +2 -2
- package/esm/core/OidcMetadata.mjs.map +1 -1
- package/esm/core/createOidc.d.ts +2 -4
- package/esm/core/createOidc.mjs +41 -3
- package/esm/core/createOidc.mjs.map +1 -1
- package/esm/core/dpop.d.ts +20 -0
- package/esm/core/dpop.mjs +384 -0
- package/esm/core/dpop.mjs.map +1 -0
- package/esm/core/earlyInit.mjs +2 -0
- package/esm/core/earlyInit.mjs.map +1 -1
- package/esm/core/oidcClientTsUserToTokens.d.ts +1 -0
- package/esm/core/oidcClientTsUserToTokens.mjs +15 -5
- package/esm/core/oidcClientTsUserToTokens.mjs.map +1 -1
- package/esm/core/tokenExfiltrationDefense.mjs +49 -6
- package/esm/core/tokenExfiltrationDefense.mjs.map +1 -1
- package/esm/react-spa/createOidcSpaApi.mjs +2 -1
- package/esm/react-spa/createOidcSpaApi.mjs.map +1 -1
- package/esm/react-spa/types.d.ts +2 -0
- package/esm/server/createOidcSpaUtils.d.ts +5 -0
- package/esm/server/createOidcSpaUtils.mjs +639 -0
- package/esm/server/createOidcSpaUtils.mjs.map +1 -0
- package/esm/server/index.d.ts +2 -0
- package/esm/server/index.mjs +3 -0
- package/esm/server/index.mjs.map +1 -0
- package/esm/server/types.d.ts +79 -0
- package/esm/server/types.mjs +2 -0
- package/esm/server/types.mjs.map +1 -0
- package/esm/server/utilsBuilder.d.ts +10 -0
- package/esm/server/utilsBuilder.mjs +13 -0
- package/esm/server/utilsBuilder.mjs.map +1 -0
- package/esm/tanstack-start/react/accessTokenValidation_rfc9068.d.ts +1 -1
- package/esm/tanstack-start/react/accessTokenValidation_rfc9068.mjs +102 -94
- package/esm/tanstack-start/react/accessTokenValidation_rfc9068.mjs.map +1 -1
- package/esm/tanstack-start/react/createOidcSpaApi.d.ts +2 -2
- package/esm/tanstack-start/react/createOidcSpaApi.mjs +60 -51
- package/esm/tanstack-start/react/createOidcSpaApi.mjs.map +1 -1
- package/esm/tanstack-start/react/index.d.ts +1 -1
- package/esm/tanstack-start/react/index.mjs +2 -2
- package/esm/tanstack-start/react/index.mjs.map +1 -1
- package/esm/tanstack-start/react/types.d.ts +36 -11
- package/esm/tanstack-start/react/{apiBuilder.d.ts → utilsBuilder.d.ts} +9 -9
- package/esm/tanstack-start/react/{apiBuilder.mjs → utilsBuilder.mjs} +6 -6
- package/esm/tanstack-start/react/utilsBuilder.mjs.map +1 -0
- package/esm/tools/generateES256DPoPProof.d.ts +8 -0
- package/esm/tools/generateES256DPoPProof.mjs +48 -0
- package/esm/tools/generateES256DPoPProof.mjs.map +1 -0
- package/esm/tools/getServerDateNow.d.ts +5 -0
- package/esm/tools/getServerDateNow.mjs +7 -0
- package/esm/tools/getServerDateNow.mjs.map +1 -0
- package/esm/vendor/{backend → server}/evt.mjs +84 -140
- package/esm/vendor/{backend → server}/jose.mjs +5 -27
- package/esm/vendor/{backend → server}/tsafe.d.ts +1 -0
- package/esm/vendor/{backend → server}/tsafe.mjs +6 -0
- package/esm/vendor/{backend → server}/zod.mjs +196 -50
- package/package.json +6 -1
- package/react-spa/createOidcSpaApi.js +2 -1
- package/react-spa/createOidcSpaApi.js.map +1 -1
- package/react-spa/types.d.ts +2 -0
- package/server/createOidcSpaUtils.d.ts +5 -0
- package/server/createOidcSpaUtils.js +642 -0
- package/server/createOidcSpaUtils.js.map +1 -0
- package/server/index.d.ts +2 -0
- package/server/index.js +6 -0
- package/server/index.js.map +1 -0
- package/server/types.d.ts +79 -0
- package/server/types.js +3 -0
- package/server/types.js.map +1 -0
- package/server/utilsBuilder.d.ts +10 -0
- package/server/utilsBuilder.js +16 -0
- package/server/utilsBuilder.js.map +1 -0
- package/src/angular.ts +3 -0
- package/src/backend.ts +63 -364
- package/src/core/OidcMetadata.ts +4 -2
- package/src/core/createOidc.ts +54 -6
- package/src/core/dpop.ts +583 -0
- package/src/core/earlyInit.ts +3 -0
- package/src/core/oidcClientTsUserToTokens.ts +18 -4
- package/src/core/tokenExfiltrationDefense.ts +60 -5
- package/src/react-spa/createOidcSpaApi.ts +2 -1
- package/src/react-spa/types.tsx +3 -0
- package/src/server/createOidcSpaUtils.ts +848 -0
- package/src/server/index.ts +4 -0
- package/src/server/types.tsx +99 -0
- package/src/server/utilsBuilder.ts +41 -0
- package/src/tanstack-start/react/accessTokenValidation_rfc9068.ts +134 -124
- package/src/tanstack-start/react/createOidcSpaApi.ts +73 -69
- package/src/tanstack-start/react/index.ts +2 -2
- package/src/tanstack-start/react/types.tsx +44 -12
- package/src/tanstack-start/react/{apiBuilder.ts → utilsBuilder.ts} +14 -14
- package/src/tools/generateES256DPoPProof.ts +74 -0
- package/src/tools/getServerDateNow.ts +11 -0
- package/src/vendor/{backend → server}/tsafe.ts +1 -0
- package/tools/generateES256DPoPProof.d.ts +8 -0
- package/tools/generateES256DPoPProof.js +51 -0
- package/tools/generateES256DPoPProof.js.map +1 -0
- package/tools/getServerDateNow.d.ts +5 -0
- package/tools/getServerDateNow.js +10 -0
- package/tools/getServerDateNow.js.map +1 -0
- package/vendor/server/evt.js +3 -0
- package/vendor/server/jose.js +3 -0
- package/vendor/{backend → server}/tsafe.d.ts +1 -0
- package/vendor/server/tsafe.js +2 -0
- package/vendor/server/zod.js +3 -0
- package/esm/tanstack-start/react/apiBuilder.mjs.map +0 -1
- package/vendor/backend/evt.js +0 -3
- package/vendor/backend/jose.js +0 -3
- package/vendor/backend/tsafe.js +0 -2
- package/vendor/backend/zod.js +0 -3
- /package/esm/vendor/{backend → server}/evt.d.ts +0 -0
- /package/esm/vendor/{backend → server}/jose.d.ts +0 -0
- /package/esm/vendor/{backend → server}/zod.d.ts +0 -0
- /package/src/vendor/{backend → server}/evt.ts +0 -0
- /package/src/vendor/{backend → server}/jose.ts +0 -0
- /package/src/vendor/{backend → server}/zod.ts +0 -0
- /package/vendor/{backend → server}/evt.d.ts +0 -0
- /package/vendor/{backend → server}/jose.d.ts +0 -0
- /package/vendor/{backend → server}/zod.d.ts +0 -0
|
@@ -403,6 +403,9 @@ export namespace ParamsOfBootstrap {
|
|
|
403
403
|
* Default: { redirectTo: "current page" }
|
|
404
404
|
*/
|
|
405
405
|
autoLogoutParams?: Parameters<Oidc_core.LoggedIn<any>["logout"]>[0];
|
|
406
|
+
|
|
407
|
+
/** Default: false */
|
|
408
|
+
dpop?: boolean;
|
|
406
409
|
} & (AutoLogin extends true ? {} : {});
|
|
407
410
|
|
|
408
411
|
export type Mock<AutoLogin, DecodedIdToken, AccessTokenClaims> = {
|
|
@@ -424,7 +427,7 @@ export namespace ParamsOfBootstrap {
|
|
|
424
427
|
});
|
|
425
428
|
}
|
|
426
429
|
|
|
427
|
-
export type
|
|
430
|
+
export type OidcSpaUtils<AutoLogin, DecodedIdToken, AccessTokenClaims> = {
|
|
428
431
|
bootstrapOidc: (
|
|
429
432
|
params: GetterOrDirectValue<
|
|
430
433
|
{ process: { env: Record<string, string> } },
|
|
@@ -457,15 +460,44 @@ export type OidcSpaApi<AutoLogin, DecodedIdToken, AccessTokenClaims> = {
|
|
|
457
460
|
export type CreateValidateAndGetAccessTokenClaims<AccessTokenClaims> = (params: {
|
|
458
461
|
paramsOfBootstrap: ParamsOfBootstrap<boolean, Record<string, unknown>, AccessTokenClaims>;
|
|
459
462
|
}) => {
|
|
460
|
-
validateAndGetAccessTokenClaims:
|
|
461
|
-
| {
|
|
462
|
-
isValid: true;
|
|
463
|
-
accessTokenClaims: AccessTokenClaims;
|
|
464
|
-
}
|
|
465
|
-
| {
|
|
466
|
-
isValid: false;
|
|
467
|
-
errorMessage: string;
|
|
468
|
-
wwwAuthenticateHeaderErrorDescription: string;
|
|
469
|
-
}
|
|
470
|
-
>;
|
|
463
|
+
validateAndGetAccessTokenClaims: ValidateAndGetAccessTokenClaims<AccessTokenClaims>;
|
|
471
464
|
};
|
|
465
|
+
|
|
466
|
+
export type ValidateAndGetAccessTokenClaims<AccessTokenClaims> = (params: {
|
|
467
|
+
request: {
|
|
468
|
+
method: string;
|
|
469
|
+
url: string;
|
|
470
|
+
headers: Record<"Authorization" | "DPoP", string | null | undefined>;
|
|
471
|
+
};
|
|
472
|
+
}) => Promise<ValidateAndGetAccessTokenClaims.ReturnType<AccessTokenClaims>>;
|
|
473
|
+
|
|
474
|
+
export namespace ValidateAndGetAccessTokenClaims {
|
|
475
|
+
export type ReturnType<AccessTokenClaims> =
|
|
476
|
+
| ReturnType.Success<AccessTokenClaims>
|
|
477
|
+
| ReturnType.Errored;
|
|
478
|
+
|
|
479
|
+
export namespace ReturnType {
|
|
480
|
+
export type Success<AccessTokenClaims> = {
|
|
481
|
+
isSuccess: true;
|
|
482
|
+
accessTokenClaims: AccessTokenClaims;
|
|
483
|
+
accessToken: string;
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
export type Errored = Errored.AnonymousRequest | Errored.ValidationFailed;
|
|
487
|
+
export namespace Errored {
|
|
488
|
+
type Common = {
|
|
489
|
+
isSuccess: false;
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
export type AnonymousRequest = Common & {
|
|
493
|
+
isAnonymousRequest: true;
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
export type ValidationFailed = Common & {
|
|
497
|
+
isAnonymousRequest: false;
|
|
498
|
+
debugErrorMessage: string;
|
|
499
|
+
wwwAuthenticateResponseHeaderValue: string;
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OidcSpaUtils, CreateValidateAndGetAccessTokenClaims, ParamsOfBootstrap } from "./types";
|
|
2
|
+
import type { DecodedAccessToken_RFC9068 as AccessTokenClaims_RFC9068 } from "../../server";
|
|
2
3
|
import type { Oidc as Oidc_core } from "../../core";
|
|
3
4
|
import { assert, type Equals } from "../../tools/tsafe/assert";
|
|
4
5
|
import type { ZodSchemaLike } from "../../tools/ZodSchemaLike";
|
|
5
|
-
import type { DecodedAccessToken_RFC9068 as AccessTokenClaims_RFC9068 } from "../../backend";
|
|
6
6
|
import { createCreateValidateAndGetAccessTokenClaims_rfc9068 } from "./accessTokenValidation_rfc9068";
|
|
7
7
|
import { createOidcSpaApi } from "./createOidcSpaApi";
|
|
8
8
|
|
|
9
|
-
export type
|
|
9
|
+
export type OidcSpaUtilsBuilder<
|
|
10
10
|
AutoLogin extends boolean = false,
|
|
11
11
|
DecodedIdToken extends Record<string, unknown> = Oidc_core.Tokens.DecodedIdToken_OidcCoreSpec,
|
|
12
12
|
AccessTokenClaims extends Record<string, unknown> | undefined = undefined,
|
|
@@ -17,7 +17,7 @@ export type OidcSpaApiBuilder<
|
|
|
17
17
|
| "createUtils" = never
|
|
18
18
|
> = Omit<
|
|
19
19
|
{
|
|
20
|
-
withAutoLogin: () =>
|
|
20
|
+
withAutoLogin: () => OidcSpaUtilsBuilder<
|
|
21
21
|
true,
|
|
22
22
|
DecodedIdToken,
|
|
23
23
|
AccessTokenClaims,
|
|
@@ -29,7 +29,7 @@ export type OidcSpaApiBuilder<
|
|
|
29
29
|
DecodedIdToken
|
|
30
30
|
>;
|
|
31
31
|
decodedIdToken_mock?: NoInfer<DecodedIdToken>;
|
|
32
|
-
}) =>
|
|
32
|
+
}) => OidcSpaUtilsBuilder<
|
|
33
33
|
AutoLogin,
|
|
34
34
|
DecodedIdToken,
|
|
35
35
|
AccessTokenClaims,
|
|
@@ -45,7 +45,7 @@ export type OidcSpaApiBuilder<
|
|
|
45
45
|
paramsOfBootstrap: ParamsOfBootstrap.Real<boolean>;
|
|
46
46
|
process: { env: Record<string, string> };
|
|
47
47
|
}) => string;
|
|
48
|
-
}):
|
|
48
|
+
}): OidcSpaUtilsBuilder<
|
|
49
49
|
AutoLogin,
|
|
50
50
|
DecodedIdToken,
|
|
51
51
|
AccessTokenClaims,
|
|
@@ -54,19 +54,19 @@ export type OidcSpaApiBuilder<
|
|
|
54
54
|
<AccessTokenClaims extends Record<string, unknown>>(params: {
|
|
55
55
|
type: "custom";
|
|
56
56
|
createValidateAndGetAccessTokenClaims: CreateValidateAndGetAccessTokenClaims<AccessTokenClaims>;
|
|
57
|
-
}):
|
|
57
|
+
}): OidcSpaUtilsBuilder<
|
|
58
58
|
AutoLogin,
|
|
59
59
|
DecodedIdToken,
|
|
60
60
|
AccessTokenClaims,
|
|
61
61
|
ExcludedMethod | "withAccessTokenValidation"
|
|
62
62
|
>;
|
|
63
63
|
};
|
|
64
|
-
createUtils: () =>
|
|
64
|
+
createUtils: () => OidcSpaUtils<AutoLogin, DecodedIdToken, AccessTokenClaims>;
|
|
65
65
|
},
|
|
66
66
|
ExcludedMethod
|
|
67
67
|
>;
|
|
68
68
|
|
|
69
|
-
function
|
|
69
|
+
function createOidcSpaUtilsBuilder<
|
|
70
70
|
AutoLogin extends boolean = false,
|
|
71
71
|
DecodedIdToken extends Record<string, unknown> = Oidc_core.Tokens.DecodedIdToken_OidcCoreSpec,
|
|
72
72
|
AccessTokenClaims extends Record<string, unknown> | undefined = undefined
|
|
@@ -79,24 +79,24 @@ function createOidcSpaApiBuilder<
|
|
|
79
79
|
createValidateAndGetAccessTokenClaims:
|
|
80
80
|
| CreateValidateAndGetAccessTokenClaims<AccessTokenClaims>
|
|
81
81
|
| undefined;
|
|
82
|
-
}):
|
|
82
|
+
}): OidcSpaUtilsBuilder<AutoLogin, DecodedIdToken, AccessTokenClaims> {
|
|
83
83
|
return {
|
|
84
84
|
withAutoLogin: () =>
|
|
85
|
-
|
|
85
|
+
createOidcSpaUtilsBuilder({
|
|
86
86
|
autoLogin: true,
|
|
87
87
|
decodedIdTokenSchema: params.decodedIdTokenSchema,
|
|
88
88
|
decodedIdToken_mock: params.decodedIdToken_mock,
|
|
89
89
|
createValidateAndGetAccessTokenClaims: params.createValidateAndGetAccessTokenClaims
|
|
90
90
|
}),
|
|
91
91
|
withExpectedDecodedIdTokenShape: ({ decodedIdTokenSchema, decodedIdToken_mock }) =>
|
|
92
|
-
|
|
92
|
+
createOidcSpaUtilsBuilder({
|
|
93
93
|
autoLogin: params.autoLogin,
|
|
94
94
|
decodedIdTokenSchema,
|
|
95
95
|
decodedIdToken_mock: decodedIdToken_mock,
|
|
96
96
|
createValidateAndGetAccessTokenClaims: params.createValidateAndGetAccessTokenClaims
|
|
97
97
|
}),
|
|
98
98
|
withAccessTokenValidation: params_scope =>
|
|
99
|
-
|
|
99
|
+
createOidcSpaUtilsBuilder({
|
|
100
100
|
autoLogin: params.autoLogin,
|
|
101
101
|
decodedIdTokenSchema: params.decodedIdTokenSchema,
|
|
102
102
|
decodedIdToken_mock: params.decodedIdToken_mock,
|
|
@@ -137,7 +137,7 @@ function createOidcSpaApiBuilder<
|
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
export const
|
|
140
|
+
export const oidcSpaUtilsBuilder = createOidcSpaUtilsBuilder({
|
|
141
141
|
autoLogin: false,
|
|
142
142
|
createValidateAndGetAccessTokenClaims: undefined,
|
|
143
143
|
decodedIdToken_mock: undefined,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export async function generateES256DPoPProof(params: {
|
|
2
|
+
keyPair: CryptoKeyPair;
|
|
3
|
+
url: string;
|
|
4
|
+
accessToken: string;
|
|
5
|
+
httpMethod: string;
|
|
6
|
+
nonce: string | undefined;
|
|
7
|
+
getServerDateNow: () => number;
|
|
8
|
+
}): Promise<string> {
|
|
9
|
+
const { keyPair, url, accessToken, httpMethod, nonce, getServerDateNow } = params;
|
|
10
|
+
|
|
11
|
+
const payload: Record<string, string | number> = {
|
|
12
|
+
jti: window.crypto.randomUUID(),
|
|
13
|
+
htm: httpMethod,
|
|
14
|
+
htu: (() => {
|
|
15
|
+
const urlObj = new URL(url);
|
|
16
|
+
return `${urlObj.origin}${urlObj.pathname}`;
|
|
17
|
+
})(),
|
|
18
|
+
iat: Math.floor(getServerDateNow() / 1000)
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const hashedToken = await hash("SHA-256", accessToken);
|
|
22
|
+
payload.ath = encodeBase64Url(hashedToken);
|
|
23
|
+
|
|
24
|
+
if (nonce !== undefined) {
|
|
25
|
+
payload.nonce = nonce;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const publicJwk = await window.crypto.subtle.exportKey("jwk", keyPair.publicKey);
|
|
29
|
+
const header = {
|
|
30
|
+
alg: "ES256",
|
|
31
|
+
typ: "dpop+jwt",
|
|
32
|
+
jwk: {
|
|
33
|
+
crv: publicJwk.crv,
|
|
34
|
+
kty: publicJwk.kty,
|
|
35
|
+
x: publicJwk.x,
|
|
36
|
+
y: publicJwk.y
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return await generateSignedJwt(header, payload, keyPair.privateKey);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async function generateSignedJwt(
|
|
43
|
+
header: object,
|
|
44
|
+
payload: object,
|
|
45
|
+
privateKey: CryptoKey
|
|
46
|
+
): Promise<string> {
|
|
47
|
+
const encodedHeader = encodeBase64Url(new TextEncoder().encode(JSON.stringify(header)));
|
|
48
|
+
const encodedPayload = encodeBase64Url(new TextEncoder().encode(JSON.stringify(payload)));
|
|
49
|
+
const encodedToken = `${encodedHeader}.${encodedPayload}`;
|
|
50
|
+
|
|
51
|
+
const signature = await window.crypto.subtle.sign(
|
|
52
|
+
{
|
|
53
|
+
name: "ECDSA",
|
|
54
|
+
hash: { name: "SHA-256" }
|
|
55
|
+
},
|
|
56
|
+
privateKey,
|
|
57
|
+
new TextEncoder().encode(encodedToken)
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const encodedSignature = encodeBase64Url(new Uint8Array(signature));
|
|
61
|
+
return `${encodedToken}.${encodedSignature}`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const toBase64 = (val: ArrayBuffer): string =>
|
|
65
|
+
btoa([...new Uint8Array(val)].map(chr => String.fromCharCode(chr)).join(""));
|
|
66
|
+
|
|
67
|
+
const encodeBase64Url = (input: Uint8Array) =>
|
|
68
|
+
toBase64(input).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
69
|
+
|
|
70
|
+
const hash = async (alg: string, message: string): Promise<Uint8Array> => {
|
|
71
|
+
const msgUint8 = new TextEncoder().encode(message);
|
|
72
|
+
const hashBuffer = await window.crypto.subtle.digest(alg, msgUint8);
|
|
73
|
+
return new Uint8Array(hashBuffer);
|
|
74
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ParamsOfCreateGetServerDateNow = {
|
|
2
|
+
issuedAtTime_local: number;
|
|
3
|
+
issuedAtTime: number;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export function createGetServerDateNow(params: ParamsOfCreateGetServerDateNow) {
|
|
7
|
+
const { issuedAtTime_local, issuedAtTime } = params;
|
|
8
|
+
return function getServerDateNow() {
|
|
9
|
+
return Date.now() + (issuedAtTime - issuedAtTime_local);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateES256DPoPProof = generateES256DPoPProof;
|
|
4
|
+
async function generateES256DPoPProof(params) {
|
|
5
|
+
const { keyPair, url, accessToken, httpMethod, nonce, getServerDateNow } = params;
|
|
6
|
+
const payload = {
|
|
7
|
+
jti: window.crypto.randomUUID(),
|
|
8
|
+
htm: httpMethod,
|
|
9
|
+
htu: (() => {
|
|
10
|
+
const urlObj = new URL(url);
|
|
11
|
+
return `${urlObj.origin}${urlObj.pathname}`;
|
|
12
|
+
})(),
|
|
13
|
+
iat: Math.floor(getServerDateNow() / 1000)
|
|
14
|
+
};
|
|
15
|
+
const hashedToken = await hash("SHA-256", accessToken);
|
|
16
|
+
payload.ath = encodeBase64Url(hashedToken);
|
|
17
|
+
if (nonce !== undefined) {
|
|
18
|
+
payload.nonce = nonce;
|
|
19
|
+
}
|
|
20
|
+
const publicJwk = await window.crypto.subtle.exportKey("jwk", keyPair.publicKey);
|
|
21
|
+
const header = {
|
|
22
|
+
alg: "ES256",
|
|
23
|
+
typ: "dpop+jwt",
|
|
24
|
+
jwk: {
|
|
25
|
+
crv: publicJwk.crv,
|
|
26
|
+
kty: publicJwk.kty,
|
|
27
|
+
x: publicJwk.x,
|
|
28
|
+
y: publicJwk.y
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return await generateSignedJwt(header, payload, keyPair.privateKey);
|
|
32
|
+
}
|
|
33
|
+
async function generateSignedJwt(header, payload, privateKey) {
|
|
34
|
+
const encodedHeader = encodeBase64Url(new TextEncoder().encode(JSON.stringify(header)));
|
|
35
|
+
const encodedPayload = encodeBase64Url(new TextEncoder().encode(JSON.stringify(payload)));
|
|
36
|
+
const encodedToken = `${encodedHeader}.${encodedPayload}`;
|
|
37
|
+
const signature = await window.crypto.subtle.sign({
|
|
38
|
+
name: "ECDSA",
|
|
39
|
+
hash: { name: "SHA-256" }
|
|
40
|
+
}, privateKey, new TextEncoder().encode(encodedToken));
|
|
41
|
+
const encodedSignature = encodeBase64Url(new Uint8Array(signature));
|
|
42
|
+
return `${encodedToken}.${encodedSignature}`;
|
|
43
|
+
}
|
|
44
|
+
const toBase64 = (val) => btoa([...new Uint8Array(val)].map(chr => String.fromCharCode(chr)).join(""));
|
|
45
|
+
const encodeBase64Url = (input) => toBase64(input).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
46
|
+
const hash = async (alg, message) => {
|
|
47
|
+
const msgUint8 = new TextEncoder().encode(message);
|
|
48
|
+
const hashBuffer = await window.crypto.subtle.digest(alg, msgUint8);
|
|
49
|
+
return new Uint8Array(hashBuffer);
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=generateES256DPoPProof.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateES256DPoPProof.js","sourceRoot":"","sources":["../src/tools/generateES256DPoPProof.ts"],"names":[],"mappings":";;AAAA,wDAuCC;AAvCM,KAAK,UAAU,sBAAsB,CAAC,MAO5C;IACG,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC;IAElF,MAAM,OAAO,GAAoC;QAC7C,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;QAC/B,GAAG,EAAE,UAAU;QACf,GAAG,EAAE,CAAC,GAAG,EAAE;YACP,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;YAC5B,OAAO,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QAChD,CAAC,CAAC,EAAE;QACJ,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC;KAC7C,CAAC;IAEF,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IACvD,OAAO,CAAC,GAAG,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IAE3C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACjF,MAAM,MAAM,GAAG;QACX,GAAG,EAAE,OAAO;QACZ,GAAG,EAAE,UAAU;QACf,GAAG,EAAE;YACD,GAAG,EAAE,SAAS,CAAC,GAAG;YAClB,GAAG,EAAE,SAAS,CAAC,GAAG;YAClB,CAAC,EAAE,SAAS,CAAC,CAAC;YACd,CAAC,EAAE,SAAS,CAAC,CAAC;SACjB;KACJ,CAAC;IACF,OAAO,MAAM,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;AACxE,CAAC;AAED,KAAK,UAAU,iBAAiB,CAC5B,MAAc,EACd,OAAe,EACf,UAAqB;IAErB,MAAM,aAAa,GAAG,eAAe,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACxF,MAAM,cAAc,GAAG,eAAe,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1F,MAAM,YAAY,GAAG,GAAG,aAAa,IAAI,cAAc,EAAE,CAAC;IAE1D,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAC7C;QACI,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC5B,EACD,UAAU,EACV,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CACzC,CAAC;IAEF,MAAM,gBAAgB,GAAG,eAAe,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;IACpE,OAAO,GAAG,YAAY,IAAI,gBAAgB,EAAE,CAAC;AACjD,CAAC;AAED,MAAM,QAAQ,GAAG,CAAC,GAAgB,EAAU,EAAE,CAC1C,IAAI,CAAC,CAAC,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAEjF,MAAM,eAAe,GAAG,CAAC,KAAiB,EAAE,EAAE,CAC1C,QAAQ,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAE9E,MAAM,IAAI,GAAG,KAAK,EAAE,GAAW,EAAE,OAAe,EAAuB,EAAE;IACrE,MAAM,QAAQ,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACnD,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IACpE,OAAO,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createGetServerDateNow = createGetServerDateNow;
|
|
4
|
+
function createGetServerDateNow(params) {
|
|
5
|
+
const { issuedAtTime_local, issuedAtTime } = params;
|
|
6
|
+
return function getServerDateNow() {
|
|
7
|
+
return Date.now() + (issuedAtTime - issuedAtTime_local);
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=getServerDateNow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getServerDateNow.js","sourceRoot":"","sources":["../src/tools/getServerDateNow.ts"],"names":[],"mappings":";;AAKA,wDAKC;AALD,SAAgB,sBAAsB,CAAC,MAAsC;IACzE,MAAM,EAAE,kBAAkB,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;IACpD,OAAO,SAAS,gBAAgB;QAC5B,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,YAAY,GAAG,kBAAkB,CAAC,CAAC;IAC5D,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
+
(()=>{"use strict";var t={317:function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.Ctx=void 0;var i=r(819),a=r(949),u=r(720),c=r(703),l=r(87),s=r(522),f=function(){function t(){this.lazyEvtAttach=new c.LazyEvt,this.lazyEvtDetach=new c.LazyEvt,this.lazyEvtDoneOrAborted=new c.LazyEvt,this.handlers=new i.Polyfill,this.evtByHandler=new a.Polyfill}return Object.defineProperty(t.prototype,"evtDoneOrAborted",{get:function(){return this.lazyEvtDoneOrAborted.evt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"evtAttach",{get:function(){return this.lazyEvtAttach.evt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"evtDetach",{get:function(){return this.lazyEvtDetach.evt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completionStatus",{get:function(){return this.__completionStatus},enumerable:!1,configurable:!0}),t.prototype.onDoneOrAborted=function(t){this.__completionStatus=t,this.lazyEvtDoneOrAborted.post(t)},t.prototype.waitFor=function(t){var e=this;return this.evtDoneOrAborted.waitFor(t).then((function(t){if("ABORTED"===t.type)throw t.error;return t.result}),(function(t){throw e.abort(t),t}))},t.prototype.abort=function(t){return this.__done(t)},t.prototype.done=function(t){return this.__done(void 0,t)},t.prototype.__done=function(t,e){var r,i,a=[];try{for(var u=o(this.handlers.values()),c=u.next();!c.done;c=u.next()){var l=c.value,s=this.evtByHandler.get(l);l.detach()&&a.push({handler:l,evt:s})}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return this.onDoneOrAborted(n(n({},t?{type:"ABORTED",error:t}:{type:"DONE",result:e}),{handlers:a})),a},t.prototype.getHandlers=function(){var t=this;return Array.from(this.handlers.values()).map((function(e){return{handler:e,evt:t.evtByHandler.get(e)}}))},t.prototype.zz__addHandler=function(t,e){(0,u.assert)(t.ctx===this),(0,u.assert)((0,u.is)(t)),void 0===this.completionStatus?(this.handlers.add(t),this.evtByHandler.set(t,e),this.lazyEvtAttach.post({handler:t,evt:e})):t.detach()},t.prototype.zz__removeHandler=function(t){(0,u.assert)(t.ctx===this),(0,u.assert)((0,u.is)(t)),this.lazyEvtDetach.post({handler:t,evt:this.evtByHandler.get(t)}),this.handlers.delete(t)},t}();e.Ctx=f;try{(0,s.overwriteReadonlyProp)(e.Ctx,"name","Ctx")}catch(t){}l.importProxy.Ctx=e.Ctx},585:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.asNonPostable=void 0,e.asNonPostable=function(t){return t}},113:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.asPostable=void 0,e.asPostable=function(t){return t}},631:function(t,e,r){var n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.asyncPipe=void 0;var i=r(87);e.asyncPipe=function(t,e){var r=this,a="state"in t?i.importProxy.Evt.create(void 0):i.importProxy.Evt.create(),u=0;return t.attach((function(i){return n(r,void 0,void 0,(function(){var r,n,c;return o(this,(function(o){switch(o.label){case 0:return u++,r=u,null!==(n=e(i))&&"then"in n?[4,n]:[3,2];case 1:return c=o.sent(),"state"in t&&r!==u?[2]:[3,3];case 2:c=n,o.label=3;case 3:return c?(a.post(c[0]),[2]):[2]}}))}))})),a}},827:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.create=void 0;var n=r(87);e.create=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?new n.importProxy.Evt:new n.importProxy.StatefulEvt(t[0])}},768:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.factorize=void 0,e.factorize=function(t){return t}},591:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e},a=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(e,"__esModule",{value:!0}),e.from=void 0;var u=r(135),c=r(720),l=r(497),s=r(339),f=r(87),p=i(r(612)).EventTargetLike;function h(t,e,r,n){var o,i,a,l;if(a=e,!p.canBe(a)){if("then"in e){var d=new f.importProxy.Evt,v=(i=(o=function(){return null==t?void 0:t.evtDoneOrAborted.postCount})(),function(){return i!==o()});return e.then((function(t){v()||d.post(t)})),d}return(0,s.mergeImpl)(t,Array.from(e).map((function(e){return h(t,e,r,n)})))}if(p.HasEventTargetAddRemove.match(e))l={on:function(t,r,n){return e.addEventListener(r,t,n)},off:function(t,r,n){return e.removeEventListener(r,t,n)}};else if(p.NodeStyleEventEmitter.match(e))l={on:function(t,r){return e.addListener(r,t)},off:function(t,r){return e.removeListener(r,t)}};else if(p.JQueryStyleEventEmitter.match(e))l={on:function(t,r){return e.on(r,t)},off:function(t,r){return e.off(r,t)}};else if(p.RxJSSubject.match(e)){var y;l={on:function(t){return y=e.subscribe((function(e){return t(e)}))},off:function(){return y.unsubscribe()}}}else(0,u.id)(e),(0,c.assert)(!1);var b=new f.importProxy.Evt,_=function(t){return b.post(t)};return null==t||t.evtDoneOrAborted.attachOnce((function(){return l.off(_,r,n)})),l.on(_,r,n),b}function d(t,e,r){var n=f.importProxy.Evt.create(),o=new e((function(t){var e=a(t,1)[0];return n.post(e)}));return o.observe(r),null==t||t.evtDoneOrAborted.attachOnce((function(){return o.disconnect()})),n}e.from=function(t,e,r,n){return"evtDoneOrAborted"in t?((0,c.assert)((0,l.typeGuard)(e,!0)&&(0,l.typeGuard)(r,!0)&&(0,l.typeGuard)(n,!0)),"function"==typeof e?((0,c.assert)((0,l.typeGuard)(r,!0)&&(0,l.typeGuard)(n,!0)),d(t,e,r)):((0,c.assert)((0,l.typeGuard)(r,!0)),h(t,e,r,n))):((0,c.assert)((0,l.typeGuard)(t,!0)&&(0,l.typeGuard)(e,!0)&&(0,l.typeGuard)(r,!0)),"function"==typeof t?((0,c.assert)((0,l.typeGuard)(e,!0)&&(0,l.typeGuard)(r,!0)),d(void 0,t,e)):((0,c.assert)((0,l.typeGuard)(e,!0)),h(void 0,t,e,r)))}},882:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getCtxFactory=void 0;var n=r(949),o=r(87);e.getCtxFactory=function(){var t=new n.Polyfill;return function(e){var r=t.get(e);return void 0===r&&(r=new o.importProxy.Ctx,t.set(e,r)),r}}},465:function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&o(e,t,r);return i(e,t),e},u=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},c=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},l=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},f=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.Evt=e.onAddHandlerByEvt=void 0,r(557);var p=r(898),h=r(949),d=r(87),v=r(827),y=r(882),b=r(768),_=r(339),g=r(591),m=r(113),O=r(631),P=r(585),w=r(325),E=r(352),x=r(703),j=a(r(546)),C=r(522),S=r(497),M=r(233),A=r(515),T=r(460),k=r(786),H=r(209),D=a(r(517)),z=r(110),F=function(t){return t()},R=D.CtxLike,L=function(){function t(){this.lazyEvtAttach=new x.LazyEvt,this.lazyEvtDetach=new x.LazyEvt,this.__maxHandlers=void 0,this.postCount=0,this.traceId=null,this.handlers=[],this.handlerTriggers=new p.Polyfill,this.__currentChronologyMark=0,this.asyncHandlerCount=0}return t.setDefaultMaxHandlers=function(t){this.__defaultMaxHandlers=isFinite(t)?t:0},t.prototype.toStateful=function(t,e){var r=R.match(t),n=r?void 0:t,o=e||(r?t:void 0),i=new d.importProxy.StatefulEvt(n),a=function(t){return i.post(t)};return o?this.attach(o,a):this.attach(a),i},Object.defineProperty(t.prototype,"evtAttach",{get:function(){return this.lazyEvtAttach.evt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"evtDetach",{get:function(){return this.lazyEvtDetach.evt},enumerable:!1,configurable:!0}),t.prototype.setMaxHandlers=function(t){return this.__maxHandlers=isFinite(t)?t:0,this},t.prototype.enableTrace=function(t){var e=t.id,r=t.formatter,n=t.log;this.traceId=e,this.traceFormatter=r||function(t){try{return JSON.stringify(t,null,2)}catch(e){return"".concat(t)}},this.log=void 0===n?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return console.log.apply(console,s([],l(t),!1))}:!1===n?void 0:n},t.prototype.disableTrace=function(){return this.traceId=null,this},Object.defineProperty(t.prototype,"asyncHandlerChronologyMark",{get:function(){var t,e,r;return null!==(e=(r=null!==(t=this["~internal"])&&void 0!==t?t:this["~internal"]={}).asyncHandlerChronologyMark)&&void 0!==e?e:r.asyncHandlerChronologyMark=new h.Polyfill},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"asyncHandlerChronologyExceptionRange",{get:function(){var t,e,r;return null!==(e=(r=null!==(t=this["~internal"])&&void 0!==t?t:this["~internal"]={}).asyncHandlerChronologyExceptionRange)&&void 0!==e?e:r.asyncHandlerChronologyExceptionRange=new h.Polyfill},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"invocableOpByOp",{get:function(){var t,e,r;return null!==(e=(r=null!==(t=this["~internal"])&&void 0!==t?t:this["~internal"]={}).invocableOpByOp)&&void 0!==e?e:r.invocableOpByOp=new h.Polyfill},enumerable:!1,configurable:!0}),t.prototype.getInvocableOp=function(t){var e=this.invocableOpByOp.get(t);if(void 0===e)throw new Error(["Provided operator isn't the operator of any handler","currently attached to the Evt instance"].join(" "));return e},t.prototype.getChronologyMark=function(){return this.__currentChronologyMark++},t.prototype.detachHandler=function(t,e,r){var n=this.handlers.indexOf(t);return!(n<0||((0,S.typeGuard)(t,!!t.ctx)&&t.ctx.zz__removeHandler(t),this.handlers.splice(n,1),t.async&&this.asyncHandlerCount--,this.handlerTriggers.delete(t),void 0!==e[0]&&((0,T.safeClearTimeout)(e[0]),r(new H.DetachedEvtError)),this.lazyEvtDetach.post(t),0))},t.prototype.triggerHandler=function(t,e,r,n){var o=t.callback,i=t.once;void 0!==e[0]&&((0,T.safeClearTimeout)(e[0]),e[0]=void 0),i&&t.detach();var a=l(n,1)[0],u=null==o?void 0:o.call(this,a);return null==r||r(a),(0,k.isPromiseLike)(u)?u:void 0},t.prototype.addHandler=function(t,r){var o,i=this;this.invocableOpByOp.set(t.op,(0,z.convertOperatorToStatelessFλ)(t.op));var a=new M.Deferred,u=[void 0],c=n(n(n({},t),r),{detach:function(){return i.detachHandler(c,u,a.reject)},promise:a.pr});"number"==typeof c.timeout&&(u[0]=(0,T.safeSetTimeout)((function(){u[0]=void 0,c.detach(),a.reject(new H.TimeoutEvtError(c.timeout))}),c.timeout));var l=function(t){return i.triggerHandler(c,u,a.isPending?a.resolve:void 0,t)};if(this.handlerTriggers.set(c,l),c.async&&this.asyncHandlerChronologyMark.set(c,this.getChronologyMark()),c.prepend){var s=void 0;for(s=0;s<this.handlers.length&&this.handlers[s].extract;s++);this.handlers.splice(s,0,c)}else this.handlers.push(c);return c.async&&this.asyncHandlerCount++,this.checkForPotentialMemoryLeak(),(0,S.typeGuard)(c,!!c.ctx)&&c.ctx.zz__addHandler(c,this),null===(o=e.onAddHandlerByEvt.get(this))||void 0===o||o(c,l),this.handlerTriggers.has(c)&&this.lazyEvtAttach.post(c),c},t.prototype.checkForPotentialMemoryLeak=function(){var e=void 0!==this.__maxHandlers?this.__maxHandlers:t.__defaultMaxHandlers;if(0!==e&&this.handlers.length%(e+1)==0){var r=["MaxHandlersExceededWarning: Possible Evt memory leak detected.","".concat(this.handlers.length," handlers attached").concat(this.traceId?' to "'.concat(this.traceId,'"'):"",".\n"),"Use Evt.prototype.setMaxHandlers(n) to increase limit on a specific Evt.\n","Use Evt.setDefaultMaxHandlers(n) to change the default limit currently set to ".concat(t.__defaultMaxHandlers,".\n")].join(""),o=new p.Polyfill;this.getHandlers().map((function(t){var e=t.ctx,r=t.async,o=t.once,i=t.prepend,a=t.extract,u=t.op,c=t.callback;return n(n({hasCtx:!!e,once:o,prepend:i,extract:a,isWaitFor:r},u===w.matchAll?{}:{op:u.toString()}),c?{callback:c.toString()}:{})})).map((function(t){return"{\n"+Object.keys(t).map((function(e){return" ".concat(e,": ").concat(t[e])})).join(",\n")+"\n}"})).forEach((function(t){return o.set(t,(o.has(t)?o.get(t):0)+1)})),r+="\n"+Array.from(o.keys()).map((function(t){return"".concat(o.get(t)," handler").concat(1===o.get(t)?"":"s"," like:\n").concat(t)})).join("\n")+"\n",null===this.traceId&&(r+="\n"+["To validate the identify of the Evt instance that is triggering this warning you can call",'Evt.prototype.enableTrace({ "id": "My evt id", "log": false }) on the Evt that you suspect.\n'].join(" "));try{console.warn(r)}catch(t){}}},t.prototype.isHandledByOp=function(t,e){var r,n=!1;try{r=this.getInvocableOp(t)}catch(t){return!1}return null!==r(e,(function(){return n=!0}))||n},t.prototype.trace=function(t){var e,r=this;if(null!==this.traceId){var n="(".concat(this.traceId,") "),o=!!this.handlers.find((function(e){var n=e.extract,o=e.op;return n&&r.isHandledByOp(o,t)}));if(o)n+="extracted ";else{var i=this.handlers.filter((function(e){var n=e.extract,o=e.op;return!n&&r.isHandledByOp(o,t)})).length;n+="".concat(i," handler").concat(i>1?"s":"",", ")}null===(e=this.log)||void 0===e||e.call(this,n+this.traceFormatter(t))}},t.prototype.postSync=function(t){var e,r,n=[],o=function(t){return[t,Promise.all(n).then((function(){}))]};try{for(var i=f(s([],l(this.handlers),!1)),a=i.next();!a.done;a=i.next()){var u=a.value,c=u.async,p=u.op,h=u.extract;if(!c){var d=this.handlerTriggers.get(u),v=this.getInvocableOp(p)(t,F);if(null!==v&&d){var y=d(v);if(void 0!==y&&n.push(y),h)return o(!0)}}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return o(!1)},t.prototype.postAsyncFactory=function(){var t=this;return j.buildMethodCb((function(e,r,n){var o,i;if(0!==t.asyncHandlerCount){var a,u=[];Promise.resolve().then((function(){return a=t.getChronologyMark()}));var c=function(n){if(!n.async)return"continue";var o=t.getInvocableOp(n.op)(e,F);if(null===o)return"continue";var i=t.handlerTriggers.get(n);return i&&function(){var e=t.asyncHandlerChronologyMark.get(n);if(r>e)return!0;var o=t.asyncHandlerChronologyExceptionRange.get(n);return void 0!==o&&o.lowerMark<r&&r<o.upperMark&&e>o.upperMark}()?(u.push(new Promise((function(t){return n.promise.then((function(){return t()})).catch((function(){return t()}))}))),void i(o)):"continue"};try{for(var p=f(s([],l(t.handlers),!1)),h=p.next();!h.done;h=p.next())c(h.value)}catch(t){o={error:t}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}if(0!==u.length){var d=s([],l(t.handlers),!1);Promise.all(u).then((function(){var e,o;try{for(var i=f(t.handlers),u=i.next();!u.done;u=i.next()){var c=u.value;c.async&&(d.indexOf(c)>=0||t.asyncHandlerChronologyExceptionRange.set(c,{lowerMark:r,upperMark:a}))}}catch(t){e={error:t}}finally{try{u&&!u.done&&(o=i.return)&&o.call(i)}finally{if(e)throw e.error}}n()}))}else n()}else n()}))},t.prototype.isHandled=function(t){var e=this;return!!this.getHandlers().find((function(r){var n=r.op;return e.isHandledByOp(n,t)}))},t.prototype.getHandlers=function(){return s([],l(this.handlers),!1)},t.prototype.detach=function(t){var e,r,n=[];try{for(var o=f(this.getHandlers()),i=o.next();!i.done;i=o.next()){var a=i.value;void 0!==t&&a.ctx!==t||a.detach()&&n.push(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=new t;return this.addHandler(n(n({},(0,w.parsePropsFromArgs)(e,"pipe")),{callback:function(t){return o.post(t)}}),t.propsFormMethodNames.attach),o},t.prototype.waitFor=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return this.addHandler((0,w.parsePropsFromArgs)(e,"waitFor"),t.propsFormMethodNames.waitFor).promise},t.prototype[Symbol.asyncIterator]=function(){return this.iter()[Symbol.asyncIterator]()},t.prototype.iter=function(){for(var t,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=(0,w.parsePropsFromArgs)(r,"waitFor"),i=null!==(e=o.ctx)&&void 0!==e?e:(0,E.newCtx)(),a=this;return(t={ctx:i})[Symbol.asyncIterator]=function(){var t=i.evtDoneOrAborted.postCount,e=function(){var t=o.timeout;if(void 0!==t){var e=function(){var e=new H.TimeoutEvtError(t);i.abort(e)},r=setTimeout(e,t);return{timeout:t,setTimeoutCallback:e,timer:r}}}(),r=a.pipe(i,o.op).pipe((function(t,r){return void 0!==e&&r((function(){clearTimeout(e.timer),e.timer=setTimeout(e.setTimeoutCallback,e.timeout)})),[t]})),n=[];if(r.attach((function(t){return n.push([t])})),void 0!==e){var l=e.timer;i.evtDoneOrAborted.attachOnce((function(t){return"DONE"===t.type}),(function(){return clearTimeout(l)}))}return{next:function(){return u(this,void 0,void 0,(function(){var e,o,a;return c(this,(function(u){switch(u.label){case 0:return void 0!==(e=n.shift())?[3,2]:(o=new M.Deferred,t<i.evtDoneOrAborted.postCount?[2,{done:!0}]:(a=(0,E.newCtx)(),i.evtDoneOrAborted.attachOnce(a,(function(){return o.resolve(void 0)})),r.attachOnceExtract(a,(function(t){a.done(),o.resolve([t])})),[4,o.pr]));case 1:if(void 0===(e=u.sent()))return[2,{done:!0}];u.label=2;case 2:return[2,{done:!1,value:e[0]}]}}))}))},return:function(){return a.detach(i),{done:!0}},throw:function(t){return a.detach(i),Promise.reject(t)}}},t},t.prototype.$attach=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attach.apply(this,s([],l(t),!1))},t.prototype.attach=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attach")},t.prototype.$attachOnce=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOnce.apply(this,s([],l(t),!1))},t.prototype.attachOnce=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOnce")},t.prototype.$attachExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachExtract.apply(this,s([],l(t),!1))},t.prototype.attachExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachExtract")},t.prototype.$attachPrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachPrepend.apply(this,s([],l(t),!1))},t.prototype.attachPrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachPrepend")},t.prototype.$attachOncePrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOncePrepend.apply(this,s([],l(t),!1))},t.prototype.attachOncePrepend=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOncePrepend")},t.prototype.$attachOnceExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.attachOnceExtract.apply(this,s([],l(t),!1))},t.prototype.attachOnceExtract=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.__attachX(t,"attachOnceExtract")},t.prototype.__attachX=function(e,r){var n=(0,w.parsePropsFromArgs)(e,"attach*"),o=this.addHandler(n,t.propsFormMethodNames[r]);return void 0===n.timeout?this:o.promise},t.prototype.postAsyncOnceHandled=function(t){var e=this;if(this.isHandled(t))return this.post(t);var r=new M.Deferred;return this.evtAttach.attachOnce((function(r){var n=r.op;return e.isHandledByOp(n,t)}),(function(){return Promise.resolve().then((function(){return r.resolve(e.post(t))}))})),r.pr},t.prototype.postOrPostAndWait=function(t,e){var r=this;this.trace(t),(0,C.overwriteReadonlyProp)(this,"postCount",this.postCount+1);var n=this.getChronologyMark(),o=l(this.postSync(t),2),i=o[0],a=o[1],u=e?function(){return a}:function(){return r.postCount};if(i)return u();if(void 0===this.postAsync){if(0===this.asyncHandlerCount)return u();this.postAsync=this.postAsyncFactory()}return this.postAsync(t,n),u()},t.prototype.post=function(t){return this.postOrPostAndWait(t,!1)},t.prototype.postAndWait=function(t){return this.postOrPostAndWait(t,!0)},t.create=v.create,t.newCtx=E.newCtx,t.merge=_.merge,t.from=g.from,t.getCtx=(0,y.getCtxFactory)(),t.loosenType=A.loosenType,t.factorize=b.factorize,t.asPostable=m.asPostable,t.asyncPipe=O.asyncPipe,t.asNonPostable=P.asNonPostable,t.__defaultMaxHandlers=25,t.propsFormMethodNames={waitFor:{async:!0,extract:!1,once:!0,prepend:!1},attach:{async:!1,extract:!1,once:!1,prepend:!1},attachExtract:{async:!1,extract:!0,once:!1,prepend:!0},attachPrepend:{async:!1,extract:!1,once:!1,prepend:!0},attachOnce:{async:!1,extract:!1,once:!0,prepend:!1},attachOncePrepend:{async:!1,extract:!1,once:!0,prepend:!0},attachOnceExtract:{async:!1,extract:!0,once:!0,prepend:!0}},t}();e.onAddHandlerByEvt=new h.Polyfill,e.Evt=L;try{(0,C.overwriteReadonlyProp)(e.Evt,"name","Evt")}catch(t){}d.importProxy.Evt=e.Evt},515:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.loosenType=void 0,e.loosenType=function(t){return t}},339:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.merge=e.mergeImpl=void 0;var n=r(87);function o(t,e){var r=new n.importProxy.Evt,o=function(t){return r.post(t)};return e.forEach((function(e){void 0===t?e.attach(o):e.attach(t,o)})),r}e.mergeImpl=o,e.merge=function(t,e){return"length"in t?o(void 0,t):o(t,e)}},352:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.newCtx=void 0;var n=r(87);e.newCtx=function(){return new n.importProxy.Ctx}},325:function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.parsePropsFromArgs=e.matchAll=void 0;var a=r(135),u=r(897),c=r(497);function l(){return!0}e.matchAll=l;var s=function(t){return void 0!==t&&(0,c.typeGuard)(t,!0)&&("function"==typeof t||"function"==typeof t[0])},f={op:l,ctx:void 0,timeout:void 0,callback:void 0};e.parsePropsFromArgs=function t(e,r){switch(r){case"pipe":var c=function(t){return 0===t.length?{}:{op:1===t.length?t[0]:u.compose.apply(void 0,i([],o(t),!1))}};if(s(e[0]))return(0,a.id)(n(n({},f),c(e)));var l=o(e),p=l[0],h=l.slice(1);return(0,a.id)(n(n(n({},f),void 0!==p?{ctx:p}:{}),c(h)));case"waitFor":return t(i(i([],o(e.filter((function(t,r){return!(r===e.length-1&&void 0===t)}))),!1),[f.callback],!1),"attach*");case"attach*":switch(e.length){case 4:var d=o(e,4),v=d[0],y=d[1],b=d[2],_=d[3];return(0,a.id)(n(n({},f),{op:v,ctx:y,timeout:b,callback:_}));case 3:var g=o(e,3);if(v=g[0],y=g[1],b=g[2],"number"==typeof y){var m=y,O=b;return s(v)?(0,a.id)(n(n({},f),{timeout:m,callback:O,op:v})):(0,a.id)(n(n({},f),{timeout:m,callback:O,ctx:v}))}return(0,a.id)(n(n({},f),{op:v,ctx:y,callback:b}));case 2:var P=o(e,2);return v=P[0],y=P[1],"number"==typeof v?(0,a.id)(n(n({},f),{timeout:v,callback:y})):(O=y,s(v)?(0,a.id)(n(n({},f),{callback:O,op:v})):(0,a.id)(n(n({},f),{callback:O,ctx:v})));case 1:var w=o(e,1)[0];return(0,a.id)(n(n({},f),{callback:w}));case 0:return(0,a.id)(n({},f))}}}},703:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LazyEvt=void 0;var n=r(522),o=r(87),i=function(){function t(){this.initialPostCount=0}return Object.defineProperty(t.prototype,"evt",{get:function(){return void 0===this.__evt&&(this.__evt=new o.importProxy.Evt,(0,n.overwriteReadonlyProp)(this.__evt,"postCount",this.initialPostCount)),this.__evt},enumerable:!1,configurable:!0}),t.prototype.__post=function(t,e){return void 0===this.__evt?++this.initialPostCount:this.__evt[e?"postAndWait":"post"](t)},t.prototype.post=function(t){return this.__post(t,!1)},t.prototype.postAndWait=function(t){return this.__post(t,!0)},t}();e.LazyEvt=i},435:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LazyStatefulEvt=void 0;var n=r(522),o=r(87),i=function(){function t(t){this.initialPostCount=0,this.initialState=t}return Object.defineProperty(t.prototype,"evt",{get:function(){return void 0===this.__evt&&(this.__evt=new o.importProxy.StatefulEvt(this.initialState),this.initialState=null,(0,n.overwriteReadonlyProp)(this.__evt,"postCount",this.initialPostCount)),this.__evt},enumerable:!1,configurable:!0}),t.prototype.__post=function(t,e){return void 0===this.__evt?(this.initialState=t,++this.initialPostCount):this.__evt[e?"postAndWait":"post"](t)},t.prototype.post=function(t){return this.__post(t,!1)},t.prototype.postAndWait=function(t){return this.__post(t,!0)},t}();e.LazyStatefulEvt=i},533:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.StatefulEvt=void 0,r(648);var u=r(703),c=r(435),l=r(87),s=r(465),f=r(720),p=r(135),h=function(t){return t()},d=function(t){function e(e){var r=t.call(this)||this;return r.lazyEvtDiff=new u.LazyEvt,r.lazyEvtChangeDiff=new u.LazyEvt,r.__state=e,r.lazyEvtChange=new c.LazyStatefulEvt(r.__state),s.onAddHandlerByEvt.set(r,(function(t,e){if(!t.extract){var n=(0,p.id)(void 0),o=r.getInvocableOp(t.op)(r.__state,void 0!==r.setOpResultForPipe?function(t){return n=t}:h);void 0!==r.setOpResultForPipe&&(r.setOpResultForPipe(o),void 0!==n&&n()),o&&e(o)}})),r}return o(e,t),Object.defineProperty(e.prototype,"state",{get:function(){return this.__state},set:function(t){this.state!==t&&this.post(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"evtDiff",{get:function(){return this.lazyEvtDiff.evt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"evtChange",{get:function(){return this.lazyEvtChange.evt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"evtChangeDiff",{get:function(){return this.lazyEvtChangeDiff.evt},enumerable:!1,configurable:!0}),e.prototype.post=function(t){return this.__post(t,!1,!1)},e.prototype.postForceChange=function(t){return this.__post(t?t[0]:this.state,!0,!1)},e.prototype.postAndWait=function(t){return this.__post(t,!1,!0)},e.prototype.__post=function(e,r,n){var o=this.state;this.__state=e;var i={prevState:o,newState:this.state},a=n?"postAndWait":"post",u=[],c=this.lazyEvtDiff[a](i);if(n&&u.push(c),r||!Object.is(o,this.state)){var l=this.lazyEvtChange[a](this.state),s=this.lazyEvtChangeDiff[a](i);n&&u.push(l,s)}var f=t.prototype[a].call(this,e);return n?(u.push(f),Promise.all(u).then((function(){}))):f},e.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=void 0;this.setOpResultForPipe=function(t){return n=t};var o=t.prototype.pipe.apply(this,a([],i(e),!1));if((0,f.assert)(void 0!==n),this.setOpResultForPipe=void 0,!n)throw new Error(["Cannot pipe StatefulEvt because the operator does not match","it's current state. You would end up with evt.state === undefined","Use evt.toStateless([ctx]).pipe(op).toStatic(initialState)","to be sure the StatefulEvt does not have an undefined state"].join(" "));return o.toStateful(n[0])},e.prototype.toStateless=function(e){var r=s.onAddHandlerByEvt.get(this);s.onAddHandlerByEvt.delete(this);var n=e?t.prototype.pipe.call(this,e):t.prototype.pipe.call(this);return s.onAddHandlerByEvt.set(this,r),n},e}(s.Evt);e.StatefulEvt=d,l.importProxy.StatefulEvt=e.StatefulEvt},87:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.importProxy=void 0,e.importProxy={}},308:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.distinct=e.nonNullable=e.throttleTime=e.to=e.StatefulEvt=e.Evt=e.Ctx=void 0,o(r(946),e),o(r(869),e);var i=r(317);Object.defineProperty(e,"Ctx",{enumerable:!0,get:function(){return i.Ctx}});var a=r(465);Object.defineProperty(e,"Evt",{enumerable:!0,get:function(){return a.Evt}});var u=r(533);Object.defineProperty(e,"StatefulEvt",{enumerable:!0,get:function(){return u.StatefulEvt}});var c=r(293);Object.defineProperty(e,"to",{enumerable:!0,get:function(){return c.to}});var l=r(857);Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return l.throttleTime}});var s=r(976);Object.defineProperty(e,"nonNullable",{enumerable:!0,get:function(){return s.nonNullable}});var f=r(144);Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return f.distinct}})},612:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EventTargetLike=void 0;var n,o,i,a,u,c=r(497);n=e.EventTargetLike||(e.EventTargetLike={}),function(t){t.match=function(t){return(0,c.typeGuard)(t,!0)&&t instanceof Object&&"function"==typeof t.subscribe}}(o=n.RxJSSubject||(n.RxJSSubject={})),function(t){t.match=function(t){return(0,c.typeGuard)(t,!0)&&t instanceof Object&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}}(i=n.NodeStyleEventEmitter||(n.NodeStyleEventEmitter={})),function(t){t.match=function(t){return(0,c.typeGuard)(t,!0)&&t instanceof Object&&"function"==typeof t.on&&"function"==typeof t.off}}(a=n.JQueryStyleEventEmitter||(n.JQueryStyleEventEmitter={})),function(t){t.match=function(t){return(0,c.typeGuard)(t,!0)&&t instanceof Object&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}}(u=n.HasEventTargetAddRemove||(n.HasEventTargetAddRemove={})),n.canBe=function(t){try{return u.match(t)||i.match(t)||a.match(t)||o.match(t)}catch(t){return!1}}},209:function(t,e){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.DetachedEvtError=e.TimeoutEvtError=void 0;var o=function(t){function e(e){var r=this.constructor,n=t.call(this,"Evt timeout after ".concat(e,"ms"))||this;return n.timeout=e,Object.setPrototypeOf(n,r.prototype),n}return n(e,t),e}(Error);e.TimeoutEvtError=o;var i=function(t){function e(){var e=this.constructor,r=t.call(this,"Evt handler detached")||this;return Object.setPrototypeOf(r,e.prototype),r}return n(e,t),e}(Error);e.DetachedEvtError=i},608:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},667:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},946:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.dom=void 0,i(r(667),e),i(r(543),e),e.dom=a(r(23)),i(r(612),e),i(r(209),e),i(r(608),e)},517:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CtxLike=void 0;var n=r(497);(e.CtxLike||(e.CtxLike={})).match=function(t){return(0,n.typeGuard)(t,!0)&&t instanceof Object&&"function"==typeof t.done&&"function"==typeof t.abort&&"function"==typeof t.zz__addHandler&&"function"==typeof t.zz__removeHandler}},543:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(517),e)},23:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.__hack=void 0,e.__hack="NOT TYPE ONLY"},897:function(t,e,r){var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.compose=void 0;var i=r(110),a=r(135);e.compose=function t(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(1===e.length){var u=n(e,1)[0];return(0,i.convertOperatorToStatelessFλ)(u)}var c=n(e),l=c[0],s=c[1],f=c.slice(2),p=function(t,e){var r=(0,i.convertOperatorToStatelessFλ)(t),o=(0,i.convertOperatorToStatelessFλ)(e);return(0,a.id)((function(t,e){var i=r(t,e);if(!i)return null;var a=n(i,1)[0],u=o(a,e);return u?[u[0]]:u}))}(l,s);return 0===f.length?p:t.apply(void 0,o([p],n(f),!1))}},110:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e["convertOperatorToStatelessFλ"]=void 0,e["convertOperatorToStatelessFλ"]=function(t){return"function"!=typeof t?(r=(e=t)[1],function(t,n){var o=e[0](t,r,n);return null!==o&&n((function(){return r=o[0]})),o}):function(t){return function(e,r){var n=t(e,r);return n instanceof Object&&!("input"in n)&&1===n.length?n:n?[e]:null}}(t);var e,r}},869:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.compose=void 0;var n=r(897);Object.defineProperty(e,"compose",{enumerable:!0,get:function(){return n.compose}})},144:function(t,e,r){var n=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.distinct=void 0;var i=r(897);e.distinct=function(t,e){var r;return(0,i.compose)((function(r){var n,o;return[{data:r,selectedKey:null!==(n=null==t?void 0:t(r))&&void 0!==n?n:r,currentFlushCount:null!==(o=null==e?void 0:e.evtDoneOrAborted.postCount)&&void 0!==o?o:0}]}),[function(t,e){var r=t.data,i=t.selectedKey,a=t.currentFlushCount,u=e.alreadyPostedData,c=e.previousFlushCount;return[{boxedData:a===c&&u.has(i)?null:[r],alreadyPostedData:new Set(o(o([],n(a!==c?[]:Array.from(u)),!1),[i],!1)),previousFlushCount:a}]},{boxedData:null,alreadyPostedData:new Set,previousFlushCount:null!==(r=null==e?void 0:e.evtDoneOrAborted.postCount)&&void 0!==r?r:0}],(function(t){return t.boxedData}))}},976:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.nonNullable=void 0;var r=function(t){return null==t?null:[t]};e.nonNullable=function(){return r}},857:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.throttleTime=void 0;var n=r(897);e.throttleTime=function(t){return(0,n.compose)([function(e,r){var n=r.lastClick,o=Date.now();return o-n<t?null:[{data:e,lastClick:o}]},{lastClick:0,data:null}],(function(t){return[t.data]}))}},293:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.to=void 0;var r=new Map;e.to=function(t){var n;return null!==(n=r.get(t))&&void 0!==n?n:(r.set(t,(function(e){return e[0]!==t?null:[e[1]]})),(0,e.to)(t))}},233:function(t,e,r){var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.VoidDeferred=e.Deferred=void 0;var i=r(522),a=function(){var t,e,r=this;this.isPending=!0,this.pr=new Promise((function(n,o){t=function(t){(0,i.overwriteReadonlyProp)(r,"isPending",!1),n(t)},e=function(t){(0,i.overwriteReadonlyProp)(r,"isPending",!1),o(t)}})),this.resolve=t,this.reject=e};e.Deferred=a;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(a);e.VoidDeferred=u},460:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.safeClearTimeout=e.safeSetTimeout=void 0,e.safeSetTimeout=function(t,e){return setTimeout(t,e)},e.safeClearTimeout=function(t){return clearTimeout(t)}},557:(t,e)=>{e.__esModule=!0,Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),r=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<r;){var i=e[o];if(t.call(n,i,o,e))return i;o++}},configurable:!0,writable:!0})},898:(t,e)=>{e.__esModule=!0,e.Polyfill=e.LightMapImpl=void 0;var r=function(){function t(){this.record=[]}return t.prototype.has=function(t){return this.record.map((function(t){return t[0]})).indexOf(t)>=0},t.prototype.get=function(t){var e=this.record.filter((function(e){return e[0]===t}))[0];if(void 0!==e)return e[1]},t.prototype.set=function(t,e){var r=this.record.filter((function(e){return e[0]===t}))[0];return void 0===r?this.record.push([t,e]):r[1]=e,this},t.prototype.delete=function(t){var e=this.record.map((function(t){return t[0]})).indexOf(t);return!(e<0||(this.record.splice(e,1),0))},t.prototype.keys=function(){return this.record.map((function(t){return t[0]}))},t}();e.LightMapImpl=r,e.Polyfill="undefined"!=typeof Map?Map:r},648:(t,e)=>{e.__esModule=!0,Object.is||(Object.is=function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e})},819:(t,e,r)=>{e.__esModule=!0,e.Polyfill=e.LightSetImpl=void 0;var n=r(898),o=function(){function t(t){if(this.map=new n.Polyfill,void 0!==t)for(var e=0,r=t;e<r.length;e++){var o=r[e];this.add(o)}}return t.prototype.has=function(t){return this.map.has(t)},t.prototype.add=function(t){return this.map.set(t,!0),this},t.prototype.values=function(){return this.map.keys()},t.prototype.delete=function(t){return this.map.delete(t)},t}();e.LightSetImpl=o,e.Polyfill="undefined"!=typeof Set?Set:o},949:(t,e,r)=>{e.__esModule=!0,e.Polyfill=void 0;var n=r(898);e.Polyfill="undefined"!=typeof WeakMap?WeakMap:n.Polyfill},546:function(t,e,r){var n=this&&this.__spreadArrays||function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,u=i.length;a<u;a++,o++)n[o]=i[a];return n};e.__esModule=!0,e.buildMethodCb=e.buildCb=e.getPrComplete=e.isRunning=e.cancelAllQueuedCalls=e.getQueuedCallCount=e.buildMethod=e.build=e.createGroupRef=void 0;var o=r(949),i=function(){function t(){this.queuedCalls=[],this.isRunning=!1,this.prComplete=Promise.resolve()}return t.prototype.cancelAllQueuedCalls=function(){var t;return this.queuedCalls.splice(0,t=this.queuedCalls.length),t},t}(),a={},u=new o.Polyfill;function c(t,e){var r=u.get(t);r||(r=new o.Polyfill,u.set(t,r));var n=r.get(e);return n||(n=new i,r.set(e,n)),n}function l(){return new Array(0)}e.createGroupRef=l,e.build=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return p(!0,l(),t[0]);case 2:return p(!0,t[0],t[1])}},e.buildMethod=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return p(!1,l(),t[0]);case 2:return p(!1,t[0],t[1])}},e.getQueuedCallCount=function(t,e){var r=f(t,e);return r?r.queuedCalls.length:0},e.cancelAllQueuedCalls=function(t,e){var r=f(t,e);return r?r.cancelAllQueuedCalls():0},e.isRunning=function(t,e){var r=f(t,e);return!!r&&r.isRunning},e.getPrComplete=function(t,e){var r=f(t,e);return r?r.prComplete:Promise.resolve()};var s=new o.Polyfill;function f(t,e){void 0===e&&(e=a);var r=s.get(t);if(!r)throw Error("Not a run exclusiveFunction");var n=u.get(e);if(n)return n.get(r)}function p(t,e,r){var n,o=function(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(!t){if(!(this instanceof Object))throw new Error("Run exclusive, <this> should be an object");n=c(this,e)}return new Promise((function(t,e){var a;n.prComplete=new Promise((function(t){return a=function(){return t()}}));var u=function(r){a(),n.isRunning=!1,n.queuedCalls.length&&n.queuedCalls.shift()(),"data"in r?t(r.data):e(r.reason)};(function t(){for(var e=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];if(n.isRunning)n.queuedCalls.push((function(){return t.apply(e,o)}));else{n.isRunning=!0;try{r.apply(this,o).then((function(t){return u({data:t})})).catch((function(t){return u({reason:t})}))}catch(t){u({reason:t})}}}).apply(o,i)}))};return t&&(n=c(a,e)),s.set(o,e),o}function h(t,e,r){var o,i=function(){for(var i=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];if(!t){if(!(this instanceof Object))throw new Error("Run exclusive, <this> should be an object");o=c(this,e)}var l,s=void 0;a.length&&"function"==typeof a[a.length-1]&&(s=a.pop()),o.prComplete=new Promise((function(t){return l=function(){return t()}}));var f=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];l(),o.isRunning=!1,o.queuedCalls.length&&o.queuedCalls.shift()(),s&&s.apply(i,t)};f.hasCallback=!!s,function t(){for(var e=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(o.isRunning)o.queuedCalls.push((function(){return t.apply(e,i)}));else{o.isRunning=!0;try{r.apply(this,n(i,[f]))}catch(t){throw t.message+=" ( This exception should not have been thrown, miss use of run-exclusive buildCb )",t}}}.apply(this,a)};return t&&(o=c(a,e)),s.set(i,e),i}e.buildCb=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return h(!0,l(),t[0]);case 2:return h(!0,t[0],t[1])}},e.buildMethodCb=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];switch(t.length){case 1:return h(!1,l(),t[0]);case 2:return h(!1,t[0],t[1])}}},720:function(t,e){var r,n=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.AssertionError=void 0,e.assert=function t(e,r){if(0===arguments.length&&(e=!0),void 0===i){if(!e){var n=new o("function"==typeof r?r():r);throw Error.captureStackTrace&&Error.captureStackTrace(n,t),n}}else i=void 0},e.is=function(t){var e={};if(void 0!==i)throw i=void 0,new Error(a);return i=e,Promise.resolve().then((function(){if(i===e)throw new Error(a)})),null};var o=function(t){function e(e){var r=this.constructor,n=t.call(this,"Wrong assertion encountered"+(e?': "'.concat(e,'"'):""))||this;return n.originalMessage=e,Object.setPrototypeOf(n,r.prototype),n}return n(e,t),e}(Error);e.AssertionError=o;var i=void 0,a="Wrong usage of the `is` function refer to https://docs.tsafe.dev/is"},135:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.id=void 0,e.id=function(t){return t}},786:(t,e)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.isPromiseLike=function(t){return"object"===r(t)&&null!==t&&"then"in t&&"function"==typeof t.then}},522:function(t,e){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.overwriteReadonlyProp=function(t,e,n){try{t[e]=n}catch(t){}if(t[e]===n)return n;var o=void 0,i=Object.getOwnPropertyDescriptor(t,e)||{enumerable:!0,configurable:!0};if(i.get)throw new Error("Probably a wrong idea to overwrite ".concat(String(e)," getter"));try{Object.defineProperty(t,e,r(r({},i),{value:n}))}catch(t){o=t}if(t[e]!==n)throw o||new Error("Can't assign");return n}},497:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.typeGuard=function(t,e){return e}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}var n={};(()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=t.Evt=void 0;var e=r(308);Object.defineProperty(t,"Evt",{enumerable:!0,get:function(){return e.Evt}});var o=r(857);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return o.throttleTime}})})(),module.exports=n})();
|
|
3
|
+
exports.__oidcSpaBundle = true;
|