mashlib 1.7.20 → 1.7.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mashlib.js +199 -106
- package/dist/mashlib.js.map +1 -1
- package/dist/mashlib.min.js +12 -12
- package/dist/mashlib.min.js.map +1 -1
- package/package.json +3 -3
package/dist/mashlib.js
CHANGED
|
@@ -1730,9 +1730,6 @@ const issuerConfigKeyMap = {
|
|
|
1730
1730
|
toKey: "opTosUri",
|
|
1731
1731
|
convertToUrl: true,
|
|
1732
1732
|
},
|
|
1733
|
-
solid_oidc_supported: {
|
|
1734
|
-
toKey: "solidOidcSupported",
|
|
1735
|
-
},
|
|
1736
1733
|
};
|
|
1737
1734
|
function processConfig(config) {
|
|
1738
1735
|
const parsedConfig = {};
|
|
@@ -2401,16 +2398,13 @@ exports.generateDpopKeyPair = exports.createDpopHeader = void 0;
|
|
|
2401
2398
|
const jose_1 = __webpack_require__(/*! jose */ "./node_modules/jose/dist/browser/index.js");
|
|
2402
2399
|
const uuid_1 = __webpack_require__(/*! uuid */ "./node_modules/uuid/dist/esm-browser/index.js");
|
|
2403
2400
|
const constant_1 = __webpack_require__(/*! ../constant */ "./node_modules/@inrupt/solid-client-authn-core/dist/constant.js");
|
|
2404
|
-
function
|
|
2405
|
-
const
|
|
2406
|
-
|
|
2407
|
-
cleanedAudience.username = "";
|
|
2408
|
-
cleanedAudience.password = "";
|
|
2409
|
-
return cleanedAudience.toString();
|
|
2401
|
+
function normalizeHTU(audience) {
|
|
2402
|
+
const audienceUrl = new URL(audience);
|
|
2403
|
+
return new URL(audienceUrl.pathname, audienceUrl.origin).toString();
|
|
2410
2404
|
}
|
|
2411
2405
|
async function createDpopHeader(audience, method, dpopKey) {
|
|
2412
2406
|
return new jose_1.SignJWT({
|
|
2413
|
-
htu:
|
|
2407
|
+
htu: normalizeHTU(audience),
|
|
2414
2408
|
htm: method.toUpperCase(),
|
|
2415
2409
|
jti: (0, uuid_1.v4)(),
|
|
2416
2410
|
})
|
|
@@ -2853,8 +2847,7 @@ function determineClientType(options, issuerConfig) {
|
|
|
2853
2847
|
if (options.clientId !== undefined && !isValidUrl(options.clientId)) {
|
|
2854
2848
|
return "static";
|
|
2855
2849
|
}
|
|
2856
|
-
if (issuerConfig.
|
|
2857
|
-
"https://solidproject.org/TR/solid-oidc" &&
|
|
2850
|
+
if (issuerConfig.scopesSupported.includes("webid") &&
|
|
2858
2851
|
options.clientId !== undefined &&
|
|
2859
2852
|
isValidUrl(options.clientId)) {
|
|
2860
2853
|
return "solid-oidc";
|
|
@@ -24418,7 +24411,7 @@ NonTerminalState a s:Class;
|
|
|
24418
24411
|
/*!*************************************************!*\
|
|
24419
24412
|
!*** ./node_modules/jose/dist/browser/index.js ***!
|
|
24420
24413
|
\*************************************************/
|
|
24421
|
-
/*! exports provided: compactDecrypt, flattenedDecrypt, generalDecrypt, GeneralEncrypt, compactVerify, flattenedVerify, generalVerify, jwtVerify, jwtDecrypt, CompactEncrypt, FlattenedEncrypt, CompactSign, FlattenedSign, GeneralSign, SignJWT, EncryptJWT, calculateJwkThumbprint, EmbeddedJWK, createLocalJWKSet, createRemoteJWKSet, UnsecuredJWT, exportPKCS8, exportSPKI, exportJWK, importSPKI, importPKCS8, importX509, importJWK, decodeProtectedHeader, errors, generateKeyPair, generateSecret, base64url */
|
|
24414
|
+
/*! exports provided: compactDecrypt, flattenedDecrypt, generalDecrypt, GeneralEncrypt, compactVerify, flattenedVerify, generalVerify, jwtVerify, jwtDecrypt, CompactEncrypt, FlattenedEncrypt, CompactSign, FlattenedSign, GeneralSign, SignJWT, EncryptJWT, calculateJwkThumbprint, EmbeddedJWK, createLocalJWKSet, createRemoteJWKSet, UnsecuredJWT, exportPKCS8, exportSPKI, exportJWK, importSPKI, importPKCS8, importX509, importJWK, decodeProtectedHeader, decodeJwt, errors, generateKeyPair, generateSecret, base64url */
|
|
24422
24415
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
24423
24416
|
|
|
24424
24417
|
"use strict";
|
|
@@ -24505,16 +24498,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24505
24498
|
/* harmony import */ var _util_decode_protected_header_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./util/decode_protected_header.js */ "./node_modules/jose/dist/browser/util/decode_protected_header.js");
|
|
24506
24499
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "decodeProtectedHeader", function() { return _util_decode_protected_header_js__WEBPACK_IMPORTED_MODULE_23__["decodeProtectedHeader"]; });
|
|
24507
24500
|
|
|
24508
|
-
/* harmony import */ var
|
|
24509
|
-
/* harmony reexport (
|
|
24510
|
-
|
|
24511
|
-
/* harmony
|
|
24501
|
+
/* harmony import */ var _util_decode_jwt_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./util/decode_jwt.js */ "./node_modules/jose/dist/browser/util/decode_jwt.js");
|
|
24502
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "decodeJwt", function() { return _util_decode_jwt_js__WEBPACK_IMPORTED_MODULE_24__["decodeJwt"]; });
|
|
24503
|
+
|
|
24504
|
+
/* harmony import */ var _util_errors_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./util/errors.js */ "./node_modules/jose/dist/browser/util/errors.js");
|
|
24505
|
+
/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "errors", function() { return _util_errors_js__WEBPACK_IMPORTED_MODULE_25__; });
|
|
24506
|
+
/* harmony import */ var _key_generate_key_pair_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./key/generate_key_pair.js */ "./node_modules/jose/dist/browser/key/generate_key_pair.js");
|
|
24507
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generateKeyPair", function() { return _key_generate_key_pair_js__WEBPACK_IMPORTED_MODULE_26__["generateKeyPair"]; });
|
|
24512
24508
|
|
|
24513
|
-
/* harmony import */ var
|
|
24514
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generateSecret", function() { return
|
|
24509
|
+
/* harmony import */ var _key_generate_secret_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./key/generate_secret.js */ "./node_modules/jose/dist/browser/key/generate_secret.js");
|
|
24510
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generateSecret", function() { return _key_generate_secret_js__WEBPACK_IMPORTED_MODULE_27__["generateSecret"]; });
|
|
24511
|
+
|
|
24512
|
+
/* harmony import */ var _util_base64url_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./util/base64url.js */ "./node_modules/jose/dist/browser/util/base64url.js");
|
|
24513
|
+
/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "base64url", function() { return _util_base64url_js__WEBPACK_IMPORTED_MODULE_28__; });
|
|
24515
24514
|
|
|
24516
|
-
/* harmony import */ var _util_base64url_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./util/base64url.js */ "./node_modules/jose/dist/browser/util/base64url.js");
|
|
24517
|
-
/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, "base64url", function() { return _util_base64url_js__WEBPACK_IMPORTED_MODULE_27__; });
|
|
24518
24515
|
|
|
24519
24516
|
|
|
24520
24517
|
|
|
@@ -25298,6 +25295,11 @@ async function calculateJwkThumbprint(jwk, digestAlgorithm = 'sha256') {
|
|
|
25298
25295
|
if (!Object(_lib_is_object_js__WEBPACK_IMPORTED_MODULE_4__["default"])(jwk)) {
|
|
25299
25296
|
throw new TypeError('JWK must be an object');
|
|
25300
25297
|
}
|
|
25298
|
+
if (digestAlgorithm !== 'sha256' &&
|
|
25299
|
+
digestAlgorithm !== 'sha384' &&
|
|
25300
|
+
digestAlgorithm !== 'sha512') {
|
|
25301
|
+
throw new TypeError('digestAlgorithm must one of "sha256", "sha384", or "sha512"');
|
|
25302
|
+
}
|
|
25301
25303
|
let components;
|
|
25302
25304
|
switch (jwk.kty) {
|
|
25303
25305
|
case 'EC':
|
|
@@ -25385,17 +25387,14 @@ class LocalJWKSet {
|
|
|
25385
25387
|
this._jwks = clone(jwks);
|
|
25386
25388
|
}
|
|
25387
25389
|
async getKey(protectedHeader, token) {
|
|
25388
|
-
const
|
|
25389
|
-
...protectedHeader,
|
|
25390
|
-
...token.header,
|
|
25391
|
-
};
|
|
25390
|
+
const { alg, kid } = { ...protectedHeader, ...token.header };
|
|
25392
25391
|
const candidates = this._jwks.keys.filter((jwk) => {
|
|
25393
|
-
let candidate = jwk.kty === getKtyFromAlg(
|
|
25394
|
-
if (candidate && typeof
|
|
25395
|
-
candidate =
|
|
25392
|
+
let candidate = jwk.kty === getKtyFromAlg(alg);
|
|
25393
|
+
if (candidate && typeof kid === 'string') {
|
|
25394
|
+
candidate = kid === jwk.kid;
|
|
25396
25395
|
}
|
|
25397
25396
|
if (candidate && typeof jwk.alg === 'string') {
|
|
25398
|
-
candidate =
|
|
25397
|
+
candidate = alg === jwk.alg;
|
|
25399
25398
|
}
|
|
25400
25399
|
if (candidate && typeof jwk.use === 'string') {
|
|
25401
25400
|
candidate = jwk.use === 'sig';
|
|
@@ -25403,11 +25402,11 @@ class LocalJWKSet {
|
|
|
25403
25402
|
if (candidate && Array.isArray(jwk.key_ops)) {
|
|
25404
25403
|
candidate = jwk.key_ops.includes('verify');
|
|
25405
25404
|
}
|
|
25406
|
-
if (candidate &&
|
|
25405
|
+
if (candidate && alg === 'EdDSA') {
|
|
25407
25406
|
candidate = jwk.crv === 'Ed25519' || jwk.crv === 'Ed448';
|
|
25408
25407
|
}
|
|
25409
25408
|
if (candidate) {
|
|
25410
|
-
switch (
|
|
25409
|
+
switch (alg) {
|
|
25411
25410
|
case 'ES256':
|
|
25412
25411
|
candidate = jwk.crv === 'P-256';
|
|
25413
25412
|
break;
|
|
@@ -25420,7 +25419,6 @@ class LocalJWKSet {
|
|
|
25420
25419
|
case 'ES512':
|
|
25421
25420
|
candidate = jwk.crv === 'P-521';
|
|
25422
25421
|
break;
|
|
25423
|
-
default:
|
|
25424
25422
|
}
|
|
25425
25423
|
}
|
|
25426
25424
|
return candidate;
|
|
@@ -25433,14 +25431,14 @@ class LocalJWKSet {
|
|
|
25433
25431
|
throw new _util_errors_js__WEBPACK_IMPORTED_MODULE_1__["JWKSMultipleMatchingKeys"]();
|
|
25434
25432
|
}
|
|
25435
25433
|
const cached = this._cached.get(jwk) || this._cached.set(jwk, {}).get(jwk);
|
|
25436
|
-
if (cached[
|
|
25437
|
-
const keyObject = await Object(_key_import_js__WEBPACK_IMPORTED_MODULE_0__["importJWK"])({ ...jwk, ext: true },
|
|
25434
|
+
if (cached[alg] === undefined) {
|
|
25435
|
+
const keyObject = await Object(_key_import_js__WEBPACK_IMPORTED_MODULE_0__["importJWK"])({ ...jwk, ext: true }, alg);
|
|
25438
25436
|
if (keyObject instanceof Uint8Array || keyObject.type !== 'public') {
|
|
25439
25437
|
throw new _util_errors_js__WEBPACK_IMPORTED_MODULE_1__["JWKSInvalid"]('JSON Web Key Set members must be public keys');
|
|
25440
25438
|
}
|
|
25441
|
-
cached[
|
|
25439
|
+
cached[alg] = keyObject;
|
|
25442
25440
|
}
|
|
25443
|
-
return cached[
|
|
25441
|
+
return cached[alg];
|
|
25444
25442
|
}
|
|
25445
25443
|
}
|
|
25446
25444
|
function createLocalJWKSet(jwks) {
|
|
@@ -25461,12 +25459,14 @@ function createLocalJWKSet(jwks) {
|
|
|
25461
25459
|
__webpack_require__.r(__webpack_exports__);
|
|
25462
25460
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createRemoteJWKSet", function() { return createRemoteJWKSet; });
|
|
25463
25461
|
/* harmony import */ var _runtime_fetch_jwks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../runtime/fetch_jwks.js */ "./node_modules/jose/dist/browser/runtime/fetch_jwks.js");
|
|
25464
|
-
/* harmony import */ var
|
|
25465
|
-
/* harmony import */ var
|
|
25462
|
+
/* harmony import */ var _runtime_env_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../runtime/env.js */ "./node_modules/jose/dist/browser/runtime/env.js");
|
|
25463
|
+
/* harmony import */ var _util_errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util/errors.js */ "./node_modules/jose/dist/browser/util/errors.js");
|
|
25464
|
+
/* harmony import */ var _local_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./local.js */ "./node_modules/jose/dist/browser/jwks/local.js");
|
|
25465
|
+
|
|
25466
25466
|
|
|
25467
25467
|
|
|
25468
25468
|
|
|
25469
|
-
class RemoteJWKSet extends
|
|
25469
|
+
class RemoteJWKSet extends _local_js__WEBPACK_IMPORTED_MODULE_3__["LocalJWKSet"] {
|
|
25470
25470
|
constructor(url, options) {
|
|
25471
25471
|
super({ keys: [] });
|
|
25472
25472
|
this._jwks = undefined;
|
|
@@ -25494,7 +25494,7 @@ class RemoteJWKSet extends _local_js__WEBPACK_IMPORTED_MODULE_2__["LocalJWKSet"]
|
|
|
25494
25494
|
return await super.getKey(protectedHeader, token);
|
|
25495
25495
|
}
|
|
25496
25496
|
catch (err) {
|
|
25497
|
-
if (err instanceof
|
|
25497
|
+
if (err instanceof _util_errors_js__WEBPACK_IMPORTED_MODULE_2__["JWKSNoMatchingKey"]) {
|
|
25498
25498
|
if (this.coolingDown() === false) {
|
|
25499
25499
|
await this.reload();
|
|
25500
25500
|
return super.getKey(protectedHeader, token);
|
|
@@ -25504,11 +25504,24 @@ class RemoteJWKSet extends _local_js__WEBPACK_IMPORTED_MODULE_2__["LocalJWKSet"]
|
|
|
25504
25504
|
}
|
|
25505
25505
|
}
|
|
25506
25506
|
async reload() {
|
|
25507
|
+
if (this._pendingFetch && Object(_runtime_env_js__WEBPACK_IMPORTED_MODULE_1__["isCloudflareWorkers"])()) {
|
|
25508
|
+
return new Promise((resolve) => {
|
|
25509
|
+
const isDone = () => {
|
|
25510
|
+
if (this._pendingFetch === undefined) {
|
|
25511
|
+
resolve();
|
|
25512
|
+
}
|
|
25513
|
+
else {
|
|
25514
|
+
setTimeout(isDone, 5);
|
|
25515
|
+
}
|
|
25516
|
+
};
|
|
25517
|
+
isDone();
|
|
25518
|
+
});
|
|
25519
|
+
}
|
|
25507
25520
|
if (!this._pendingFetch) {
|
|
25508
25521
|
this._pendingFetch = Object(_runtime_fetch_jwks_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this._url, this._timeoutDuration, this._options)
|
|
25509
25522
|
.then((json) => {
|
|
25510
|
-
if (!Object(
|
|
25511
|
-
throw new
|
|
25523
|
+
if (!Object(_local_js__WEBPACK_IMPORTED_MODULE_3__["isJWKSLike"])(json)) {
|
|
25524
|
+
throw new _util_errors_js__WEBPACK_IMPORTED_MODULE_2__["JWKSInvalid"]('JSON Web Key Set malformed');
|
|
25512
25525
|
}
|
|
25513
25526
|
this._jwks = { keys: json.keys };
|
|
25514
25527
|
this._cooldownStarted = Date.now();
|
|
@@ -26532,6 +26545,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26532
26545
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uint32be", function() { return uint32be; });
|
|
26533
26546
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lengthAndInput", function() { return lengthAndInput; });
|
|
26534
26547
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatKdf", function() { return concatKdf; });
|
|
26548
|
+
/* harmony import */ var _runtime_digest_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../runtime/digest.js */ "./node_modules/jose/dist/browser/runtime/digest.js");
|
|
26549
|
+
|
|
26535
26550
|
const encoder = new TextEncoder();
|
|
26536
26551
|
const decoder = new TextDecoder();
|
|
26537
26552
|
const MAX_INT32 = 2 ** 32;
|
|
@@ -26570,7 +26585,7 @@ function uint32be(value) {
|
|
|
26570
26585
|
function lengthAndInput(input) {
|
|
26571
26586
|
return concat(uint32be(input.length), input);
|
|
26572
26587
|
}
|
|
26573
|
-
async function concatKdf(
|
|
26588
|
+
async function concatKdf(secret, bits, value) {
|
|
26574
26589
|
const iterations = Math.ceil((bits >> 3) / 32);
|
|
26575
26590
|
let res;
|
|
26576
26591
|
for (let iter = 1; iter <= iterations; iter++) {
|
|
@@ -26579,10 +26594,10 @@ async function concatKdf(digest, secret, bits, value) {
|
|
|
26579
26594
|
buf.set(secret, 4);
|
|
26580
26595
|
buf.set(value, 4 + secret.length);
|
|
26581
26596
|
if (!res) {
|
|
26582
|
-
res = await
|
|
26597
|
+
res = await Object(_runtime_digest_js__WEBPACK_IMPORTED_MODULE_0__["default"])('sha256', buf);
|
|
26583
26598
|
}
|
|
26584
26599
|
else {
|
|
26585
|
-
res = concat(res, await
|
|
26600
|
+
res = concat(res, await Object(_runtime_digest_js__WEBPACK_IMPORTED_MODULE_0__["default"])('sha256', buf));
|
|
26586
26601
|
}
|
|
26587
26602
|
}
|
|
26588
26603
|
res = res.slice(0, bits >> 3);
|
|
@@ -27991,10 +28006,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27991
28006
|
/* harmony import */ var _lib_buffer_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../lib/buffer_utils.js */ "./node_modules/jose/dist/browser/lib/buffer_utils.js");
|
|
27992
28007
|
/* harmony import */ var _webcrypto_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./webcrypto.js */ "./node_modules/jose/dist/browser/runtime/webcrypto.js");
|
|
27993
28008
|
/* harmony import */ var _lib_crypto_key_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../lib/crypto_key.js */ "./node_modules/jose/dist/browser/lib/crypto_key.js");
|
|
27994
|
-
/* harmony import */ var
|
|
27995
|
-
/* harmony import */ var
|
|
27996
|
-
/* harmony import */ var _is_key_like_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./is_key_like.js */ "./node_modules/jose/dist/browser/runtime/is_key_like.js");
|
|
27997
|
-
|
|
28009
|
+
/* harmony import */ var _lib_invalid_key_input_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../lib/invalid_key_input.js */ "./node_modules/jose/dist/browser/lib/invalid_key_input.js");
|
|
28010
|
+
/* harmony import */ var _is_key_like_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./is_key_like.js */ "./node_modules/jose/dist/browser/runtime/is_key_like.js");
|
|
27998
28011
|
|
|
27999
28012
|
|
|
28000
28013
|
|
|
@@ -28002,11 +28015,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28002
28015
|
|
|
28003
28016
|
async function deriveKey(publicKey, privateKey, algorithm, keyLength, apu = new Uint8Array(0), apv = new Uint8Array(0)) {
|
|
28004
28017
|
if (!Object(_webcrypto_js__WEBPACK_IMPORTED_MODULE_1__["isCryptoKey"])(publicKey)) {
|
|
28005
|
-
throw new TypeError(Object(
|
|
28018
|
+
throw new TypeError(Object(_lib_invalid_key_input_js__WEBPACK_IMPORTED_MODULE_3__["default"])(publicKey, ..._is_key_like_js__WEBPACK_IMPORTED_MODULE_4__["types"]));
|
|
28006
28019
|
}
|
|
28007
28020
|
Object(_lib_crypto_key_js__WEBPACK_IMPORTED_MODULE_2__["checkEncCryptoKey"])(publicKey, 'ECDH-ES');
|
|
28008
28021
|
if (!Object(_webcrypto_js__WEBPACK_IMPORTED_MODULE_1__["isCryptoKey"])(privateKey)) {
|
|
28009
|
-
throw new TypeError(Object(
|
|
28022
|
+
throw new TypeError(Object(_lib_invalid_key_input_js__WEBPACK_IMPORTED_MODULE_3__["default"])(privateKey, ..._is_key_like_js__WEBPACK_IMPORTED_MODULE_4__["types"]));
|
|
28010
28023
|
}
|
|
28011
28024
|
Object(_lib_crypto_key_js__WEBPACK_IMPORTED_MODULE_2__["checkEncCryptoKey"])(privateKey, 'ECDH-ES', 'deriveBits', 'deriveKey');
|
|
28012
28025
|
const value = Object(_lib_buffer_utils_js__WEBPACK_IMPORTED_MODULE_0__["concat"])(Object(_lib_buffer_utils_js__WEBPACK_IMPORTED_MODULE_0__["lengthAndInput"])(_lib_buffer_utils_js__WEBPACK_IMPORTED_MODULE_0__["encoder"].encode(algorithm)), Object(_lib_buffer_utils_js__WEBPACK_IMPORTED_MODULE_0__["lengthAndInput"])(apu), Object(_lib_buffer_utils_js__WEBPACK_IMPORTED_MODULE_0__["lengthAndInput"])(apv), Object(_lib_buffer_utils_js__WEBPACK_IMPORTED_MODULE_0__["uint32be"])(keyLength));
|
|
@@ -28017,17 +28030,17 @@ async function deriveKey(publicKey, privateKey, algorithm, keyLength, apu = new
|
|
|
28017
28030
|
name: 'ECDH',
|
|
28018
28031
|
public: publicKey,
|
|
28019
28032
|
}, privateKey, Math.ceil(parseInt(privateKey.algorithm.namedCurve.slice(-3), 10) / 8) << 3));
|
|
28020
|
-
return Object(_lib_buffer_utils_js__WEBPACK_IMPORTED_MODULE_0__["concatKdf"])(
|
|
28033
|
+
return Object(_lib_buffer_utils_js__WEBPACK_IMPORTED_MODULE_0__["concatKdf"])(sharedSecret, keyLength, value);
|
|
28021
28034
|
}
|
|
28022
28035
|
async function generateEpk(key) {
|
|
28023
28036
|
if (!Object(_webcrypto_js__WEBPACK_IMPORTED_MODULE_1__["isCryptoKey"])(key)) {
|
|
28024
|
-
throw new TypeError(Object(
|
|
28037
|
+
throw new TypeError(Object(_lib_invalid_key_input_js__WEBPACK_IMPORTED_MODULE_3__["default"])(key, ..._is_key_like_js__WEBPACK_IMPORTED_MODULE_4__["types"]));
|
|
28025
28038
|
}
|
|
28026
28039
|
return _webcrypto_js__WEBPACK_IMPORTED_MODULE_1__["default"].subtle.generateKey(key.algorithm, true, ['deriveBits']);
|
|
28027
28040
|
}
|
|
28028
28041
|
function ecdhAllowed(key) {
|
|
28029
28042
|
if (!Object(_webcrypto_js__WEBPACK_IMPORTED_MODULE_1__["isCryptoKey"])(key)) {
|
|
28030
|
-
throw new TypeError(Object(
|
|
28043
|
+
throw new TypeError(Object(_lib_invalid_key_input_js__WEBPACK_IMPORTED_MODULE_3__["default"])(key, ..._is_key_like_js__WEBPACK_IMPORTED_MODULE_4__["types"]));
|
|
28031
28044
|
}
|
|
28032
28045
|
return ['P-256', 'P-384', 'P-521'].includes(key.algorithm.namedCurve);
|
|
28033
28046
|
}
|
|
@@ -28986,6 +28999,56 @@ const encode = _runtime_base64url_js__WEBPACK_IMPORTED_MODULE_0__["encode"];
|
|
|
28986
28999
|
const decode = _runtime_base64url_js__WEBPACK_IMPORTED_MODULE_0__["decode"];
|
|
28987
29000
|
|
|
28988
29001
|
|
|
29002
|
+
/***/ }),
|
|
29003
|
+
|
|
29004
|
+
/***/ "./node_modules/jose/dist/browser/util/decode_jwt.js":
|
|
29005
|
+
/*!***********************************************************!*\
|
|
29006
|
+
!*** ./node_modules/jose/dist/browser/util/decode_jwt.js ***!
|
|
29007
|
+
\***********************************************************/
|
|
29008
|
+
/*! exports provided: decodeJwt */
|
|
29009
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
29010
|
+
|
|
29011
|
+
"use strict";
|
|
29012
|
+
__webpack_require__.r(__webpack_exports__);
|
|
29013
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeJwt", function() { return decodeJwt; });
|
|
29014
|
+
/* harmony import */ var _base64url_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base64url.js */ "./node_modules/jose/dist/browser/util/base64url.js");
|
|
29015
|
+
/* harmony import */ var _lib_buffer_utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../lib/buffer_utils.js */ "./node_modules/jose/dist/browser/lib/buffer_utils.js");
|
|
29016
|
+
/* harmony import */ var _lib_is_object_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../lib/is_object.js */ "./node_modules/jose/dist/browser/lib/is_object.js");
|
|
29017
|
+
/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./errors.js */ "./node_modules/jose/dist/browser/util/errors.js");
|
|
29018
|
+
|
|
29019
|
+
|
|
29020
|
+
|
|
29021
|
+
|
|
29022
|
+
function decodeJwt(jwt) {
|
|
29023
|
+
if (typeof jwt !== 'string')
|
|
29024
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__["JWTInvalid"]('JWTs must use Compact JWS serialization, JWT must be a string');
|
|
29025
|
+
const { 1: payload, length } = jwt.split('.');
|
|
29026
|
+
if (length === 5)
|
|
29027
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__["JWTInvalid"]('Only JWTs using Compact JWS serialization can be decoded');
|
|
29028
|
+
if (length !== 3)
|
|
29029
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__["JWTInvalid"]('Invalid JWT');
|
|
29030
|
+
if (!payload)
|
|
29031
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__["JWTInvalid"]('JWTs must contain a payload');
|
|
29032
|
+
let decoded;
|
|
29033
|
+
try {
|
|
29034
|
+
decoded = Object(_base64url_js__WEBPACK_IMPORTED_MODULE_0__["decode"])(payload);
|
|
29035
|
+
}
|
|
29036
|
+
catch (_a) {
|
|
29037
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__["JWTInvalid"]('Failed to parse the base64url encoded payload');
|
|
29038
|
+
}
|
|
29039
|
+
let result;
|
|
29040
|
+
try {
|
|
29041
|
+
result = JSON.parse(_lib_buffer_utils_js__WEBPACK_IMPORTED_MODULE_1__["decoder"].decode(decoded));
|
|
29042
|
+
}
|
|
29043
|
+
catch (_b) {
|
|
29044
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__["JWTInvalid"]('Failed to parse the decoded payload as JSON');
|
|
29045
|
+
}
|
|
29046
|
+
if (!Object(_lib_is_object_js__WEBPACK_IMPORTED_MODULE_2__["default"])(result))
|
|
29047
|
+
throw new _errors_js__WEBPACK_IMPORTED_MODULE_3__["JWTInvalid"]('Invalid JWT Claims Set');
|
|
29048
|
+
return result;
|
|
29049
|
+
}
|
|
29050
|
+
|
|
29051
|
+
|
|
28989
29052
|
/***/ }),
|
|
28990
29053
|
|
|
28991
29054
|
/***/ "./node_modules/jose/dist/browser/util/decode_protected_header.js":
|
|
@@ -41774,7 +41837,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41774
41837
|
* Copyright 2017 Google LLC
|
|
41775
41838
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41776
41839
|
*/
|
|
41777
|
-
var t;const i=globalThis.trustedTypes,s=i?i.createPolicy("lit-html",{createHTML:t=>t}):void 0,e=`lit$${(Math.random()+"").slice(9)}$`,o="?"+e,n=`<${o}>`,l=document,h=(t="")=>l.createComment(t),r=t=>null===t||"object"!=typeof t&&"function"!=typeof t,d=Array.isArray,u=t=>{var i;return d(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])},c=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,a=/>/g,f=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,_=/'/g,m=/"/g,g=/^(?:script|style|textarea|title)$/i,p=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),$=p(1),y=p(2),b=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),T=new WeakMap,x=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new N(i.insertBefore(h(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l},A=l.createTreeWalker(l,129,null,!1),C=(t,i)=>{const o=t.length-1,l=[];let h,r=2===i?"<svg>":"",d=c;for(let i=0;i<o;i++){const s=t[i];let o,u,p=-1,$=0;for(;$<s.length&&(d.lastIndex=$,u=d.exec(s),null!==u);)$=d.lastIndex,d===c?"!--"===u[1]?d=v:void 0!==u[1]?d=a:void 0!==u[2]?(g.test(u[2])&&(h=RegExp("</"+u[2],"g")),d=f):void 0!==u[3]&&(d=f):d===f?">"===u[0]?(d=null!=h?h:c,p=-1):void 0===u[1]?p=-2:(p=d.lastIndex-u[2].length,o=u[1],d=void 0===u[3]?f:'"'===u[3]?m:_):d===m||d===_?d=f:d===v||d===a?d=c:(d=f,h=void 0);const y=d===f&&t[i+1].startsWith("/>")?" ":"";r+=d===c?s+n:p>=0?(l.push(o),s.slice(0,p)+"$lit$"+s.slice(p)+e+y):s+e+(-2===p?(l.push(void 0),i):y)}const u=r+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==s?s.createHTML(u):u,l]};class E{constructor({strings:t,_$litType$:s},n){let l;this.parts=[];let r=0,d=0;const u=t.length-1,c=this.parts,[v,a]=C(t,s);if(this.el=E.createElement(v,n),A.currentNode=this.el.content,2===s){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(l=A.nextNode())&&c.length<u;){if(1===l.nodeType){if(l.hasAttributes()){const t=[];for(const i of l.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(e)){const s=a[d++];if(t.push(i),void 0!==s){const t=l.getAttribute(s.toLowerCase()+"$lit$").split(e),i=/([.?@])?(.*)/.exec(s);c.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?M:"?"===i[1]?H:"@"===i[1]?I:S})}else c.push({type:6,index:r})}for(const i of t)l.removeAttribute(i)}if(g.test(l.tagName)){const t=l.textContent.split(e),s=t.length-1;if(s>0){l.textContent=i?i.emptyScript:"";for(let i=0;i<s;i++)l.append(t[i],h()),A.nextNode(),c.push({type:2,index:++r});l.append(t[s],h())}}}else if(8===l.nodeType)if(l.data===o)c.push({type:2,index:r});else{let t=-1;for(;-1!==(t=l.data.indexOf(e,t+1));)c.push({type:7,index:r}),t+=e.length-1}r++}}static createElement(t,i){const s=l.createElement("template");return s.innerHTML=t,s}}function P(t,i,s=t,e){var o,n,l,h;if(i===b)return i;let d=void 0!==e?null===(o=s._$Cl)||void 0===o?void 0:o[e]:s._$Cu;const u=r(i)?void 0:i._$litDirective$;return(null==d?void 0:d.constructor)!==u&&(null===(n=null==d?void 0:d._$AO)||void 0===n||n.call(d,!1),void 0===u?d=void 0:(d=new u(t),d._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Cl)&&void 0!==l?l:h._$Cl=[])[e]=d:s._$Cu=d),void 0!==d&&(i=P(t,d._$AS(t,i.values),d,e)),i}class V{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:l).importNode(s,!0);A.currentNode=o;let n=A.nextNode(),h=0,r=0,d=e[0];for(;void 0!==d;){if(h===d.index){let i;2===d.type?i=new N(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new L(n,this,t)),this.v.push(i),d=e[++r]}h!==(null==d?void 0:d.index)&&(n=A.nextNode(),h++)}return o}m(t){let i=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class N{constructor(t,i,s,e){var o;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cg=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=P(this,t,i),r(t)?t===w||null==t||""===t?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==b&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.
|
|
41840
|
+
var t;const i=globalThis.trustedTypes,s=i?i.createPolicy("lit-html",{createHTML:t=>t}):void 0,e=`lit$${(Math.random()+"").slice(9)}$`,o="?"+e,n=`<${o}>`,l=document,h=(t="")=>l.createComment(t),r=t=>null===t||"object"!=typeof t&&"function"!=typeof t,d=Array.isArray,u=t=>{var i;return d(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])},c=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,a=/>/g,f=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,_=/'/g,m=/"/g,g=/^(?:script|style|textarea|title)$/i,p=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),$=p(1),y=p(2),b=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),T=new WeakMap,x=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new N(i.insertBefore(h(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l},A=l.createTreeWalker(l,129,null,!1),C=(t,i)=>{const o=t.length-1,l=[];let h,r=2===i?"<svg>":"",d=c;for(let i=0;i<o;i++){const s=t[i];let o,u,p=-1,$=0;for(;$<s.length&&(d.lastIndex=$,u=d.exec(s),null!==u);)$=d.lastIndex,d===c?"!--"===u[1]?d=v:void 0!==u[1]?d=a:void 0!==u[2]?(g.test(u[2])&&(h=RegExp("</"+u[2],"g")),d=f):void 0!==u[3]&&(d=f):d===f?">"===u[0]?(d=null!=h?h:c,p=-1):void 0===u[1]?p=-2:(p=d.lastIndex-u[2].length,o=u[1],d=void 0===u[3]?f:'"'===u[3]?m:_):d===m||d===_?d=f:d===v||d===a?d=c:(d=f,h=void 0);const y=d===f&&t[i+1].startsWith("/>")?" ":"";r+=d===c?s+n:p>=0?(l.push(o),s.slice(0,p)+"$lit$"+s.slice(p)+e+y):s+e+(-2===p?(l.push(void 0),i):y)}const u=r+(t[o]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==s?s.createHTML(u):u,l]};class E{constructor({strings:t,_$litType$:s},n){let l;this.parts=[];let r=0,d=0;const u=t.length-1,c=this.parts,[v,a]=C(t,s);if(this.el=E.createElement(v,n),A.currentNode=this.el.content,2===s){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(l=A.nextNode())&&c.length<u;){if(1===l.nodeType){if(l.hasAttributes()){const t=[];for(const i of l.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(e)){const s=a[d++];if(t.push(i),void 0!==s){const t=l.getAttribute(s.toLowerCase()+"$lit$").split(e),i=/([.?@])?(.*)/.exec(s);c.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?M:"?"===i[1]?H:"@"===i[1]?I:S})}else c.push({type:6,index:r})}for(const i of t)l.removeAttribute(i)}if(g.test(l.tagName)){const t=l.textContent.split(e),s=t.length-1;if(s>0){l.textContent=i?i.emptyScript:"";for(let i=0;i<s;i++)l.append(t[i],h()),A.nextNode(),c.push({type:2,index:++r});l.append(t[s],h())}}}else if(8===l.nodeType)if(l.data===o)c.push({type:2,index:r});else{let t=-1;for(;-1!==(t=l.data.indexOf(e,t+1));)c.push({type:7,index:r}),t+=e.length-1}r++}}static createElement(t,i){const s=l.createElement("template");return s.innerHTML=t,s}}function P(t,i,s=t,e){var o,n,l,h;if(i===b)return i;let d=void 0!==e?null===(o=s._$Cl)||void 0===o?void 0:o[e]:s._$Cu;const u=r(i)?void 0:i._$litDirective$;return(null==d?void 0:d.constructor)!==u&&(null===(n=null==d?void 0:d._$AO)||void 0===n||n.call(d,!1),void 0===u?d=void 0:(d=new u(t),d._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Cl)&&void 0!==l?l:h._$Cl=[])[e]=d:s._$Cu=d),void 0!==d&&(i=P(t,d._$AS(t,i.values),d,e)),i}class V{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:l).importNode(s,!0);A.currentNode=o;let n=A.nextNode(),h=0,r=0,d=e[0];for(;void 0!==d;){if(h===d.index){let i;2===d.type?i=new N(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new L(n,this,t)),this.v.push(i),d=e[++r]}h!==(null==d?void 0:d.index)&&(n=A.nextNode(),h++)}return o}m(t){let i=0;for(const s of this.v)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class N{constructor(t,i,s,e){var o;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cg=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=P(this,t,i),r(t)?t===w||null==t||""===t?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==b&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):u(t)?this.S(t):this.$(t)}A(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==w&&r(this._$AH)?this._$AA.nextSibling.data=t:this.k(l.createTextNode(t)),this._$AH=t}T(t){var i;const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=E.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.m(s);else{const t=new V(o,this),i=t.p(this.options);t.m(s),this.k(i),this._$AH=t}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new E(t)),i}S(t){d(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new N(this.A(h()),this.A(h()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class S{constructor(t,i,s,e,o){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=w}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=P(this,t,i,0),n=!r(t)||t!==this._$AH&&t!==b,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=P(this,e[s+l],i,l),h===b&&(h=this._$AH[l]),n||(n=!r(h)||h!==this._$AH[l]),h===w?t=w:t!==w&&(t+=(null!=h?h:"")+o[l+1]),this._$AH[l]=h}n&&!e&&this.C(t)}C(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends S{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===w?void 0:t}}const k=i?i.emptyScript:"";class H extends S{constructor(){super(...arguments),this.type=4}C(t){t&&t!==w?this.element.setAttribute(this.name,k):this.element.removeAttribute(this.name)}}class I extends S{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=P(this,t,i,0))&&void 0!==s?s:w)===b)return;const e=this._$AH,o=t===w&&e!==w||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==w&&(e===w||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class L{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){P(this,t)}}const R={P:"$lit$",L:e,V:o,I:1,N:C,R:V,D:u,j:P,H:N,O:S,F:H,B:I,W:M,Z:L},z=window.litHtmlPolyfillSupport;null==z||z(E,N),(null!==(t=globalThis.litHtmlVersions)&&void 0!==t?t:globalThis.litHtmlVersions=[]).push("2.2.0");
|
|
41778
41841
|
//# sourceMappingURL=lit-html.js.map
|
|
41779
41842
|
|
|
41780
41843
|
|
|
@@ -121992,10 +122055,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
121992
122055
|
});
|
|
121993
122056
|
exports["default"] = void 0;
|
|
121994
122057
|
var _default = {
|
|
121995
|
-
buildTime: '2022-02-
|
|
121996
|
-
commit: '
|
|
122058
|
+
buildTime: '2022-02-23T14:28:35Z',
|
|
122059
|
+
commit: '86ea668bacfb94213d209dd9962722bf0189ddbe',
|
|
121997
122060
|
npmInfo: {
|
|
121998
|
-
'solid-panes': '3.5.
|
|
122061
|
+
'solid-panes': '3.5.19',
|
|
121999
122062
|
npm: '6.14.13',
|
|
122000
122063
|
ares: '1.17.1',
|
|
122001
122064
|
brotli: '1.0.9',
|
|
@@ -122498,8 +122561,12 @@ var AccessController = /*#__PURE__*/function () {
|
|
|
122498
122561
|
} else {
|
|
122499
122562
|
// Linked controls
|
|
122500
122563
|
(0, _acl.makeACLGraphbyCombo)(newAClGraph, this.targetDoc, this.mainCombo.byCombo, this.targetACLDoc, true, true);
|
|
122501
|
-
}
|
|
122564
|
+
} // add authenticated fetcher
|
|
122565
|
+
|
|
122502
122566
|
|
|
122567
|
+
newAClGraph.fetcher = (0, _rdflib.fetcher)(newAClGraph, {
|
|
122568
|
+
fetch: this.store.fetcher._fetch
|
|
122569
|
+
});
|
|
122503
122570
|
var updater = newAClGraph.updater || new _rdflib.UpdateManager(newAClGraph); // save ACL resource
|
|
122504
122571
|
|
|
122505
122572
|
return new Promise(function (resolve, reject) {
|
|
@@ -122634,11 +122701,7 @@ var AccessGroups = /*#__PURE__*/function () {
|
|
|
122634
122701
|
(0, _defineProperty2["default"])(this, "rootElement", void 0);
|
|
122635
122702
|
(0, _defineProperty2["default"])(this, "_store", void 0);
|
|
122636
122703
|
this.defaults = options.defaults || false;
|
|
122637
|
-
|
|
122638
|
-
// store.updater = new UpdateManager(store)
|
|
122639
|
-
|
|
122640
|
-
this._store = store; // TODO hacky, find a better solution
|
|
122641
|
-
|
|
122704
|
+
this._store = store;
|
|
122642
122705
|
this.aclMap = (0, _acl.readACL)(doc, aclDoc, store, this.defaults);
|
|
122643
122706
|
this.byCombo = (0, _acl.ACLbyCombination)(this.aclMap);
|
|
122644
122707
|
this.addAgentButton = new _addAgentButtons.AddAgentButtons(this);
|
|
@@ -134440,6 +134503,8 @@ var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/ru
|
|
|
134440
134503
|
|
|
134441
134504
|
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/solid-ui/node_modules/@babel/runtime/helpers/defineProperty.js"));
|
|
134442
134505
|
|
|
134506
|
+
var debug = _interopRequireWildcard(__webpack_require__(/*! ./debug */ "./node_modules/solid-ui/lib/debug.js"));
|
|
134507
|
+
|
|
134443
134508
|
var _authn = __webpack_require__(/*! ./authn/authn */ "./node_modules/solid-ui/lib/authn/authn.js");
|
|
134444
134509
|
|
|
134445
134510
|
var _rdflib = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index.js");
|
|
@@ -134452,14 +134517,18 @@ var _utils = __webpack_require__(/*! ./utils */ "./node_modules/solid-ui/lib/uti
|
|
|
134452
134517
|
|
|
134453
134518
|
var _pad = __webpack_require__(/*! ./pad */ "./node_modules/solid-ui/lib/pad.js");
|
|
134454
134519
|
|
|
134455
|
-
var _debug = __webpack_require__(/*! ./debug */ "./node_modules/solid-ui/lib/debug.js");
|
|
134456
|
-
|
|
134457
134520
|
var _logic = __webpack_require__(/*! ./logic */ "./node_modules/solid-ui/lib/logic.js");
|
|
134458
134521
|
|
|
134459
134522
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
134460
134523
|
|
|
134461
134524
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
134462
134525
|
|
|
134526
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
134527
|
+
|
|
134528
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
134529
|
+
|
|
134530
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
134531
|
+
|
|
134463
134532
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
134464
134533
|
|
|
134465
134534
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -134486,7 +134555,7 @@ var ParticipationTableElement = /*#__PURE__*/function (_HTMLTableElement) {
|
|
|
134486
134555
|
return (0, _createClass2["default"])(ParticipationTableElement);
|
|
134487
134556
|
}( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(HTMLTableElement));
|
|
134488
134557
|
|
|
134489
|
-
var
|
|
134558
|
+
var store = _logic.solidLogicSingleton.store;
|
|
134490
134559
|
/** Manage participation in this session
|
|
134491
134560
|
*
|
|
134492
134561
|
* @param {Document} dom - the web page loaded into the browser
|
|
@@ -134501,7 +134570,7 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
|
|
|
134501
134570
|
table.setAttribute('style', 'margin: 0.8em;');
|
|
134502
134571
|
|
|
134503
134572
|
var newRowForParticpation = function newRowForParticpation(parp) {
|
|
134504
|
-
var person =
|
|
134573
|
+
var person = store.any(parp, ns.wf('participant'));
|
|
134505
134574
|
var tr;
|
|
134506
134575
|
|
|
134507
134576
|
if (!person) {
|
|
@@ -134511,7 +134580,7 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
|
|
|
134511
134580
|
return tr;
|
|
134512
134581
|
}
|
|
134513
134582
|
|
|
134514
|
-
var bg =
|
|
134583
|
+
var bg = store.anyValue(parp, ns.ui('backgroundColor')) || 'white';
|
|
134515
134584
|
var block = dom.createElement('div');
|
|
134516
134585
|
block.setAttribute('style', 'height: 1.5em; width: 1.5em; margin: 0.3em; border 0.01em solid #888; background-color: ' + bg);
|
|
134517
134586
|
tr = (0, _widgets.personTR)(dom, null, person, options);
|
|
@@ -134524,9 +134593,9 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
|
|
|
134524
134593
|
};
|
|
134525
134594
|
|
|
134526
134595
|
var syncTable = function syncTable() {
|
|
134527
|
-
var parps =
|
|
134528
|
-
(0,
|
|
134529
|
-
return [
|
|
134596
|
+
var parps = store.each(subject, ns.wf('participation')).map(function (parp) {
|
|
134597
|
+
(0, debug.log)('in participants');
|
|
134598
|
+
return [store.anyValue(parp, ns.cal('dtstart')) || '9999-12-31', parp];
|
|
134530
134599
|
});
|
|
134531
134600
|
parps.sort(); // List in order of joining
|
|
134532
134601
|
|
|
@@ -134554,36 +134623,57 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
|
|
|
134554
134623
|
function participationObject(subject, padDoc, me) {
|
|
134555
134624
|
return new Promise(function (resolve, reject) {
|
|
134556
134625
|
if (!me) {
|
|
134557
|
-
throw new Error('
|
|
134626
|
+
throw new Error('No user id');
|
|
134558
134627
|
}
|
|
134559
134628
|
|
|
134560
|
-
var parps =
|
|
134561
|
-
return
|
|
134629
|
+
var parps = store.each(subject, ns.wf('participation')).filter(function (pn) {
|
|
134630
|
+
return store.holds(pn, ns.wf('participant'), me);
|
|
134562
134631
|
});
|
|
134563
134632
|
|
|
134564
134633
|
if (parps.length > 1) {
|
|
134565
|
-
|
|
134634
|
+
// This can happen. https://github.com/solid/chat-pane/issues/71
|
|
134635
|
+
var candidates = [];
|
|
134636
|
+
|
|
134637
|
+
var _iterator = _createForOfIteratorHelper(parps),
|
|
134638
|
+
_step;
|
|
134639
|
+
|
|
134640
|
+
try {
|
|
134641
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
134642
|
+
var participation = _step.value;
|
|
134643
|
+
var date = store.anyValue(participation, ns.cal('dtstart'));
|
|
134644
|
+
|
|
134645
|
+
if (date) {
|
|
134646
|
+
candidates.push([date, participation]);
|
|
134647
|
+
}
|
|
134648
|
+
}
|
|
134649
|
+
} catch (err) {
|
|
134650
|
+
_iterator.e(err);
|
|
134651
|
+
} finally {
|
|
134652
|
+
_iterator.f();
|
|
134653
|
+
}
|
|
134654
|
+
|
|
134655
|
+
candidates.sort(); // Pick the earliest
|
|
134656
|
+
// @@ Possibly, for extra credit, delete the others, if we have write access
|
|
134657
|
+
|
|
134658
|
+
debug.warn('Multiple particpation objects, picking earliest, in ' + padDoc);
|
|
134659
|
+
resolve(candidates[0][1]); // throw new Error('Multiple records of your participation')
|
|
134566
134660
|
}
|
|
134567
134661
|
|
|
134568
134662
|
if (parps.length) {
|
|
134569
134663
|
// If I am not already recorded
|
|
134570
134664
|
resolve(parps[0]); // returns the particpation object
|
|
134571
134665
|
} else {
|
|
134572
|
-
var
|
|
134573
|
-
var ins = [(0, _rdflib.st)(subject, ns.wf('participation'), participation, padDoc), (0, _rdflib.st)(participation, ns.wf('participant'), me, padDoc), (0, _rdflib.st)(participation, ns.cal('dtstart'), new Date(), padDoc), (0, _rdflib.st)(participation, ns.ui('backgroundColor'), (0, _pad.lightColorHash)(me), padDoc)];
|
|
134574
|
-
|
|
134575
|
-
if (!kb.updater) {
|
|
134576
|
-
throw new Error('kb has no updater');
|
|
134577
|
-
}
|
|
134666
|
+
var _participation2 = (0, _widgets.newThing)(padDoc);
|
|
134578
134667
|
|
|
134579
|
-
|
|
134668
|
+
var ins = [(0, _rdflib.st)(subject, ns.wf('participation'), _participation2, padDoc), (0, _rdflib.st)(_participation2, ns.wf('participant'), me, padDoc), (0, _rdflib.st)(_participation2, ns.cal('dtstart'), new Date(), padDoc), (0, _rdflib.st)(_participation2, ns.ui('backgroundColor'), (0, _pad.lightColorHash)(me), padDoc)];
|
|
134669
|
+
store.updater.update([], ins, function (uri, ok, errorMessage) {
|
|
134580
134670
|
if (!ok) {
|
|
134581
134671
|
reject(new Error('Error recording your partipation: ' + errorMessage));
|
|
134582
134672
|
} else {
|
|
134583
|
-
resolve(
|
|
134673
|
+
resolve(_participation2);
|
|
134584
134674
|
}
|
|
134585
134675
|
});
|
|
134586
|
-
resolve(
|
|
134676
|
+
resolve(_participation2);
|
|
134587
134677
|
}
|
|
134588
134678
|
});
|
|
134589
134679
|
}
|
|
@@ -134600,8 +134690,8 @@ function recordParticipation(subject, padDoc, refreshable) {
|
|
|
134600
134690
|
var me = (0, _authn.currentUser)();
|
|
134601
134691
|
if (!me) return; // Not logged in
|
|
134602
134692
|
|
|
134603
|
-
var parps =
|
|
134604
|
-
return
|
|
134693
|
+
var parps = store.each(subject, ns.wf('participation')).filter(function (pn) {
|
|
134694
|
+
return store.holds(pn, ns.wf('participant'), me);
|
|
134605
134695
|
});
|
|
134606
134696
|
|
|
134607
134697
|
if (parps.length > 1) {
|
|
@@ -134612,14 +134702,14 @@ function recordParticipation(subject, padDoc, refreshable) {
|
|
|
134612
134702
|
// If I am not already recorded
|
|
134613
134703
|
return parps[0]; // returns the particpation object
|
|
134614
134704
|
} else {
|
|
134615
|
-
|
|
134616
|
-
|
|
134617
|
-
|
|
134618
|
-
if (!kb.updater) {
|
|
134619
|
-
throw new Error('kb has no updater');
|
|
134705
|
+
if (!store.updater.editable(padDoc)) {
|
|
134706
|
+
debug.log('Not recording participation, as no write acesss as ' + me + ' to ' + padDoc);
|
|
134707
|
+
return null;
|
|
134620
134708
|
}
|
|
134621
134709
|
|
|
134622
|
-
|
|
134710
|
+
var participation = (0, _widgets.newThing)(padDoc);
|
|
134711
|
+
var ins = [(0, _rdflib.st)(subject, ns.wf('participation'), participation, padDoc), (0, _rdflib.st)(participation, ns.wf('participant'), me, padDoc), (0, _rdflib.st)(participation, ns.cal('dtstart'), new Date(), padDoc), (0, _rdflib.st)(participation, ns.ui('backgroundColor'), (0, _pad.lightColorHash)(me), padDoc)];
|
|
134712
|
+
store.updater.update([], ins, function (uri, ok, errorMessage) {
|
|
134623
134713
|
if (!ok) {
|
|
134624
134714
|
throw new Error('Error recording your partipation: ' + errorMessage);
|
|
134625
134715
|
}
|
|
@@ -134649,8 +134739,10 @@ function manageParticipation(dom, container, padDoc, subject, me, options) {
|
|
|
134649
134739
|
container.appendChild(table);
|
|
134650
134740
|
renderPartipants(dom, table, padDoc, subject, me, options);
|
|
134651
134741
|
|
|
134742
|
+
var _participation;
|
|
134743
|
+
|
|
134652
134744
|
try {
|
|
134653
|
-
recordParticipation(subject, padDoc, table);
|
|
134745
|
+
_participation = recordParticipation(subject, padDoc, table);
|
|
134654
134746
|
} catch (e) {
|
|
134655
134747
|
container.appendChild((0, _widgets.errorMessageBlock)(dom, 'Error recording your partipation: ' + e)); // Clean up?
|
|
134656
134748
|
}
|
|
@@ -138120,25 +138212,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
138120
138212
|
});
|
|
138121
138213
|
exports["default"] = void 0;
|
|
138122
138214
|
var _default = {
|
|
138123
|
-
buildTime: '2022-
|
|
138124
|
-
commit: '
|
|
138215
|
+
buildTime: '2022-02-23T14:20:11Z',
|
|
138216
|
+
commit: '707601b18fc26917752ae0150bdc55058a34312e',
|
|
138125
138217
|
npmInfo: {
|
|
138126
|
-
'solid-ui': '2.4.
|
|
138127
|
-
npm: '6.14.
|
|
138128
|
-
ares: '1.
|
|
138218
|
+
'solid-ui': '2.4.18',
|
|
138219
|
+
npm: '6.14.13',
|
|
138220
|
+
ares: '1.17.1',
|
|
138129
138221
|
brotli: '1.0.9',
|
|
138130
138222
|
cldr: '39.0',
|
|
138131
138223
|
icu: '69.1',
|
|
138132
|
-
llhttp: '2.1.
|
|
138224
|
+
llhttp: '2.1.3',
|
|
138133
138225
|
modules: '83',
|
|
138134
138226
|
napi: '8',
|
|
138135
138227
|
nghttp2: '1.42.0',
|
|
138136
|
-
node: '14.
|
|
138137
|
-
openssl: '1.1.
|
|
138228
|
+
node: '14.17.3',
|
|
138229
|
+
openssl: '1.1.1k',
|
|
138138
138230
|
tz: '2021a',
|
|
138139
138231
|
unicode: '13.0',
|
|
138140
|
-
uv: '1.
|
|
138141
|
-
v8: '8.4.371.23-node.
|
|
138232
|
+
uv: '1.41.0',
|
|
138233
|
+
v8: '8.4.371.23-node.67',
|
|
138142
138234
|
zlib: '1.2.11'
|
|
138143
138235
|
}
|
|
138144
138236
|
};
|
|
@@ -140587,7 +140679,7 @@ _fieldFunction.field[ns.ui('Multiple').uri] = function (dom, container, already,
|
|
|
140587
140679
|
}
|
|
140588
140680
|
|
|
140589
140681
|
function itemDone(ok, message) {
|
|
140590
|
-
debug.log("Item done callback for item ".concat(object.
|
|
140682
|
+
debug.log("Item done callback for item ".concat(object.toString()));
|
|
140591
140683
|
|
|
140592
140684
|
if (!ok) {
|
|
140593
140685
|
// when does this happen? errors typically deal with upstream
|
|
@@ -143483,6 +143575,7 @@ var wikidataClasses = {
|
|
|
143483
143575
|
// Profession
|
|
143484
143576
|
// Organization: 'http://www.wikidata.org/entity/Q43229',
|
|
143485
143577
|
Project: 'http://www.wikidata.org/entity/Q170584',
|
|
143578
|
+
ResearchOrganization: 'http://www.wikidata.org/entity/Q31855',
|
|
143486
143579
|
SportsOrganization: 'http://www.wikidata.org/entity/Q4438121'
|
|
143487
143580
|
};
|
|
143488
143581
|
exports.wikidataClasses = wikidataClasses;
|
|
@@ -149088,7 +149181,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
149088
149181
|
"use strict";
|
|
149089
149182
|
__webpack_require__.r(__webpack_exports__);
|
|
149090
149183
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
149091
|
-
buildTime: '2022-02-
|
|
149184
|
+
buildTime: '2022-02-23T14:38:34Z',
|
|
149092
149185
|
commit: '9376b47580604186ad3e7a0e86746e548712a3e5',
|
|
149093
149186
|
npmInfo: {
|
|
149094
149187
|
mashlib: '1.7.20',
|