@fedify/vocab 2.4.0-dev.1618 → 2.4.0-dev.1655
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/deno.json +1 -1
- package/dist/mod.cjs +425 -15
- package/dist/mod.d.cts +109 -1
- package/dist/mod.d.ts +109 -1
- package/dist/mod.js +426 -16
- package/dist-tests/{actor-COnJgcOw.mjs → actor-D_oGj9t4.mjs} +2 -2
- package/dist-tests/actor.test.mjs +2 -2
- package/dist-tests/application.yaml +15 -0
- package/dist-tests/audio.yaml +2 -1
- package/dist-tests/document.yaml +14 -1
- package/dist-tests/group.yaml +15 -0
- package/dist-tests/image.yaml +2 -1
- package/dist-tests/link.yaml +14 -1
- package/dist-tests/lookup.test.mjs +2 -2
- package/dist-tests/organization.yaml +15 -0
- package/dist-tests/page.yaml +2 -1
- package/dist-tests/person.yaml +15 -0
- package/dist-tests/service.yaml +15 -0
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/video.yaml +2 -1
- package/dist-tests/{vocab-OU5GYbNg.mjs → vocab-Bjwctrxn.mjs} +426 -16
- package/dist-tests/vocab.test.mjs +152 -1
- package/package.json +4 -4
- package/src/__snapshots__/vocab.test.ts.snap +54 -15
- package/src/application.yaml +15 -0
- package/src/audio.yaml +2 -1
- package/src/document.yaml +14 -1
- package/src/group.yaml +15 -0
- package/src/image.yaml +2 -1
- package/src/link.yaml +14 -1
- package/src/organization.yaml +15 -0
- package/src/page.yaml +2 -1
- package/src/person.yaml +15 -0
- package/src/preprocessors.ts +3 -1
- package/src/service.yaml +15 -0
- package/src/video.yaml +2 -1
- package/src/vocab.test.ts +244 -0
package/dist/mod.js
CHANGED
|
@@ -4,13 +4,13 @@ import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
|
4
4
|
import { domainToASCII, domainToUnicode } from "node:url";
|
|
5
5
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
|
-
import { LanguageString, LanguageString as LanguageString$1, decodeMultibase, encodeMultibase, exportMultibaseKey, exportSpki, formatIri, getDocumentLoader, haveSameFe34Origin, haveSameIriOrigin, importMultibaseKey, importPem, isDecimal, parseDecimal, parseIri, parseJsonLdId } from "@fedify/vocab-runtime";
|
|
7
|
+
import { LanguageString, LanguageString as LanguageString$1, decodeMultibase, encodeMultibase, exportMultibaseKey, exportSpki, formatIri, getDocumentLoader, haveSameFe34Origin, haveSameIriOrigin, importMultibaseKey, importPem, isDecimal, isGatewayUrl, parseDecimal, parseGatewayUrl, parseIri, parseJsonLdId } from "@fedify/vocab-runtime";
|
|
8
8
|
import { compactJsonLdCache, isTrustedIriOrigin, normalizeJsonLdIris } from "@fedify/vocab-runtime/internal/jsonld-cache";
|
|
9
9
|
import { isTemporalDuration, isTemporalInstant } from "@fedify/vocab-runtime/temporal";
|
|
10
10
|
import { delay } from "es-toolkit";
|
|
11
11
|
//#region deno.json
|
|
12
12
|
var name = "@fedify/vocab";
|
|
13
|
-
var version = "2.4.0-dev.
|
|
13
|
+
var version = "2.4.0-dev.1655+b8f3c3d5";
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/type.ts
|
|
16
16
|
function getTypeId(object) {
|
|
@@ -25,7 +25,8 @@ function getTypeId(object) {
|
|
|
25
25
|
* When an `icon` or `image` property on a vocabulary object contains an
|
|
26
26
|
* explicit ActivityStreams `Link` rather than an `Image`, this preprocessor
|
|
27
27
|
* converts it into an `Image` by mapping `href` to `url`, copying
|
|
28
|
-
* `mediaType`, `name`, `width`,
|
|
28
|
+
* `mediaType`, `name`, `width`, `height`, and `digestMultibase`, and
|
|
29
|
+
* discarding the rest.
|
|
29
30
|
*
|
|
30
31
|
* If the value is not a Link, or the Link has no `href`, it returns
|
|
31
32
|
* `undefined` so the normal range decoder continues.
|
|
@@ -46,7 +47,8 @@ const normalizeLinkToImage = async (value, context) => {
|
|
|
46
47
|
mediaType: link.mediaType,
|
|
47
48
|
names: link.names != null && link.names.length > 0 ? link.names : void 0,
|
|
48
49
|
width: link.width,
|
|
49
|
-
height: link.height
|
|
50
|
+
height: link.height,
|
|
51
|
+
digestMultibase: link.digestMultibase
|
|
50
52
|
});
|
|
51
53
|
};
|
|
52
54
|
//#endregion
|
|
@@ -21970,6 +21972,7 @@ var Application = class Application extends Object$1 {
|
|
|
21970
21972
|
#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
|
|
21971
21973
|
#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
|
|
21972
21974
|
#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
|
|
21975
|
+
#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
21973
21976
|
#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
21974
21977
|
#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
|
|
21975
21978
|
#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
|
|
@@ -22038,6 +22041,13 @@ var Application = class Application extends Object$1 {
|
|
|
22038
22041
|
for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
22039
22042
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
22040
22043
|
}
|
|
22044
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
22045
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
22046
|
+
if ("gateways" in values && values.gateways != null) {
|
|
22047
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
|
|
22048
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
22049
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
22050
|
+
}
|
|
22041
22051
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
22042
22052
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
22043
22053
|
if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
|
|
@@ -22168,6 +22178,14 @@ var Application = class Application extends Object$1 {
|
|
|
22168
22178
|
for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
22169
22179
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
22170
22180
|
}
|
|
22181
|
+
clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
22182
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
22183
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
22184
|
+
if ("gateways" in values && values.gateways != null) {
|
|
22185
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
|
|
22186
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
22187
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
22188
|
+
}
|
|
22171
22189
|
clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
|
|
22172
22190
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
22173
22191
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
@@ -22641,6 +22659,24 @@ var Application = class Application extends Object$1 {
|
|
|
22641
22659
|
yield v;
|
|
22642
22660
|
}
|
|
22643
22661
|
}
|
|
22662
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
22663
|
+
* retrieved.
|
|
22664
|
+
*
|
|
22665
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
22666
|
+
*/
|
|
22667
|
+
get gateway() {
|
|
22668
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
22669
|
+
if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
|
|
22670
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
22671
|
+
}
|
|
22672
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
22673
|
+
* retrieved.
|
|
22674
|
+
*
|
|
22675
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
22676
|
+
*/
|
|
22677
|
+
get gateways() {
|
|
22678
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
22679
|
+
}
|
|
22644
22680
|
/** When `true`, conveys that for this actor, follow requests are not usually
|
|
22645
22681
|
* automatically approved, but instead are examined by a person who may accept
|
|
22646
22682
|
* or reject the request, at some time in the future. Setting of `false`
|
|
@@ -24510,6 +24546,12 @@ var Application = class Application extends Object$1 {
|
|
|
24510
24546
|
}
|
|
24511
24547
|
if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
24512
24548
|
compactItems = [];
|
|
24549
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
24550
|
+
const item = formatIri(v);
|
|
24551
|
+
compactItems.push(item);
|
|
24552
|
+
}
|
|
24553
|
+
if (compactItems.length > 0) result["gateways"] = compactItems;
|
|
24554
|
+
compactItems = [];
|
|
24513
24555
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
24514
24556
|
const item = v;
|
|
24515
24557
|
compactItems.push(item);
|
|
@@ -24725,6 +24767,7 @@ var Application = class Application extends Object$1 {
|
|
|
24725
24767
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
24726
24768
|
result["@context"] = [
|
|
24727
24769
|
"https://www.w3.org/ns/activitystreams",
|
|
24770
|
+
"https://w3id.org/fep/ef61",
|
|
24728
24771
|
"https://w3id.org/security/v1",
|
|
24729
24772
|
"https://w3id.org/security/data-integrity/v1",
|
|
24730
24773
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -24797,6 +24840,12 @@ var Application = class Application extends Object$1 {
|
|
|
24797
24840
|
}
|
|
24798
24841
|
if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
|
|
24799
24842
|
array = [];
|
|
24843
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
24844
|
+
const element = { "@id": formatIri(v) };
|
|
24845
|
+
array.push(element);
|
|
24846
|
+
}
|
|
24847
|
+
if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
|
|
24848
|
+
array = [];
|
|
24800
24849
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
24801
24850
|
const element = { "@value": v };
|
|
24802
24851
|
array.push(element);
|
|
@@ -24921,6 +24970,7 @@ var Application = class Application extends Object$1 {
|
|
|
24921
24970
|
if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
24922
24971
|
const docContext = options.context ?? [
|
|
24923
24972
|
"https://www.w3.org/ns/activitystreams",
|
|
24973
|
+
"https://w3id.org/fep/ef61",
|
|
24924
24974
|
"https://w3id.org/security/v1",
|
|
24925
24975
|
"https://w3id.org/security/data-integrity/v1",
|
|
24926
24976
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -25084,6 +25134,15 @@ var Application = class Application extends Object$1 {
|
|
|
25084
25134
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
|
|
25085
25135
|
}
|
|
25086
25136
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
25137
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
25138
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
|
|
25139
|
+
for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
|
|
25140
|
+
if (v == null) continue;
|
|
25141
|
+
const decoded = parseGatewayUrl(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
|
|
25142
|
+
if (typeof decoded === "undefined") continue;
|
|
25143
|
+
_hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
|
|
25144
|
+
}
|
|
25145
|
+
instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
25087
25146
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
25088
25147
|
let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
|
|
25089
25148
|
for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
|
|
@@ -25425,6 +25484,12 @@ var Application = class Application extends Object$1 {
|
|
|
25425
25484
|
} : v);
|
|
25426
25485
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
|
|
25427
25486
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
25487
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
|
|
25488
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
25489
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
25490
|
+
} : v);
|
|
25491
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
25492
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
25428
25493
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
|
|
25429
25494
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
25430
25495
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -26515,6 +26580,7 @@ var Document = class Document extends Object$1 {
|
|
|
26515
26580
|
}
|
|
26516
26581
|
#_2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width = [];
|
|
26517
26582
|
#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [];
|
|
26583
|
+
#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
|
|
26518
26584
|
/**
|
|
26519
26585
|
* Constructs a new instance of Document with the given values.
|
|
26520
26586
|
* @param values The values to initialize the instance with.
|
|
@@ -26526,6 +26592,8 @@ var Document = class Document extends Object$1 {
|
|
|
26526
26592
|
else throw new TypeError("The width must be of type number.");
|
|
26527
26593
|
if ("height" in values && values.height != null) if (typeof values.height === "number" && Number.isInteger(values.height) && values.height >= 0) this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [values.height];
|
|
26528
26594
|
else throw new TypeError("The height must be of type number.");
|
|
26595
|
+
if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
|
|
26596
|
+
else throw new TypeError("The digestMultibase must be of type string.");
|
|
26529
26597
|
}
|
|
26530
26598
|
/**
|
|
26531
26599
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -26548,6 +26616,9 @@ var Document = class Document extends Object$1 {
|
|
|
26548
26616
|
clone.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height;
|
|
26549
26617
|
if ("height" in values && values.height != null) if (typeof values.height === "number" && Number.isInteger(values.height) && values.height >= 0) clone.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [values.height];
|
|
26550
26618
|
else throw new TypeError("The height must be of type number.");
|
|
26619
|
+
clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
|
|
26620
|
+
if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
|
|
26621
|
+
else throw new TypeError("The digestMultibase must be of type string.");
|
|
26551
26622
|
return clone;
|
|
26552
26623
|
}
|
|
26553
26624
|
/** Specifies a hint as to the rendering width in
|
|
@@ -26566,6 +26637,16 @@ var Document = class Document extends Object$1 {
|
|
|
26566
26637
|
if (this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.length < 1) return null;
|
|
26567
26638
|
return this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height[0];
|
|
26568
26639
|
}
|
|
26640
|
+
/** The multibase-encoded integrity digest of an external resource represented
|
|
26641
|
+
* by this document.
|
|
26642
|
+
*
|
|
26643
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
26644
|
+
*/
|
|
26645
|
+
get digestMultibase() {
|
|
26646
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
26647
|
+
if (this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length < 1) return null;
|
|
26648
|
+
return this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
|
|
26649
|
+
}
|
|
26569
26650
|
/**
|
|
26570
26651
|
* Converts this object to a JSON-LD structure.
|
|
26571
26652
|
* @param options The options to use.
|
|
@@ -26601,11 +26682,18 @@ var Document = class Document extends Object$1 {
|
|
|
26601
26682
|
compactItems.push(item);
|
|
26602
26683
|
}
|
|
26603
26684
|
if (compactItems.length > 0) result["height"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
26685
|
+
compactItems = [];
|
|
26686
|
+
for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
|
|
26687
|
+
const item = v;
|
|
26688
|
+
compactItems.push(item);
|
|
26689
|
+
}
|
|
26690
|
+
if (compactItems.length > 0) result["digestMultibase"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
26604
26691
|
result["type"] = "Document";
|
|
26605
26692
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
26606
26693
|
result["@context"] = [
|
|
26607
26694
|
"https://www.w3.org/ns/activitystreams",
|
|
26608
|
-
"https://w3id.org/security/data-integrity/
|
|
26695
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
26696
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
26609
26697
|
"https://gotosocial.org/ns"
|
|
26610
26698
|
];
|
|
26611
26699
|
return result;
|
|
@@ -26634,12 +26722,19 @@ var Document = class Document extends Object$1 {
|
|
|
26634
26722
|
array.push(element);
|
|
26635
26723
|
}
|
|
26636
26724
|
if (array.length > 0) values["https://www.w3.org/ns/activitystreams#height"] = array;
|
|
26725
|
+
array = [];
|
|
26726
|
+
for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
|
|
26727
|
+
const element = { "@value": v };
|
|
26728
|
+
array.push(element);
|
|
26729
|
+
}
|
|
26730
|
+
if (array.length > 0) values["https://www.w3.org/ns/credentials/v2#digestMultibase"] = array;
|
|
26637
26731
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Document"];
|
|
26638
26732
|
if (this.id != null) values["@id"] = formatIri(this.id);
|
|
26639
26733
|
if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
26640
26734
|
const docContext = options.context ?? [
|
|
26641
26735
|
"https://www.w3.org/ns/activitystreams",
|
|
26642
|
-
"https://w3id.org/security/data-integrity/
|
|
26736
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
26737
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
26643
26738
|
"https://gotosocial.org/ns"
|
|
26644
26739
|
];
|
|
26645
26740
|
const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
@@ -26740,6 +26835,15 @@ var Document = class Document extends Object$1 {
|
|
|
26740
26835
|
_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.push(decoded);
|
|
26741
26836
|
}
|
|
26742
26837
|
instance.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height;
|
|
26838
|
+
const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
|
|
26839
|
+
let _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array = values["https://www.w3.org/ns/credentials/v2#digestMultibase"];
|
|
26840
|
+
for (const v of _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array == null ? [] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array.length === 1 && "@list" in _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0] ? _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0]["@list"] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array) {
|
|
26841
|
+
if (v == null) continue;
|
|
26842
|
+
const decoded = v["@value"];
|
|
26843
|
+
if (typeof decoded === "undefined") continue;
|
|
26844
|
+
_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.push(decoded);
|
|
26845
|
+
}
|
|
26846
|
+
instance.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
|
|
26743
26847
|
if (!("_fromSubclass" in options) || !options._fromSubclass) try {
|
|
26744
26848
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
26745
26849
|
const compactArray = Array.isArray(json) && json.length === 1;
|
|
@@ -26764,6 +26868,11 @@ var Document = class Document extends Object$1 {
|
|
|
26764
26868
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
26765
26869
|
} : v);
|
|
26766
26870
|
if (_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.length == 1) proxy.height = _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height[0];
|
|
26871
|
+
const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.map((v) => v instanceof URL ? {
|
|
26872
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
26873
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
26874
|
+
} : v);
|
|
26875
|
+
if (_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length == 1) proxy.digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
|
|
26767
26876
|
return proxy;
|
|
26768
26877
|
}
|
|
26769
26878
|
};
|
|
@@ -26833,7 +26942,8 @@ var Audio = class Audio extends Document {
|
|
|
26833
26942
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
26834
26943
|
result["@context"] = [
|
|
26835
26944
|
"https://www.w3.org/ns/activitystreams",
|
|
26836
|
-
"https://w3id.org/security/data-integrity/
|
|
26945
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
26946
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
26837
26947
|
"https://gotosocial.org/ns"
|
|
26838
26948
|
];
|
|
26839
26949
|
return result;
|
|
@@ -26848,7 +26958,8 @@ var Audio = class Audio extends Document {
|
|
|
26848
26958
|
if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
26849
26959
|
const docContext = options.context ?? [
|
|
26850
26960
|
"https://www.w3.org/ns/activitystreams",
|
|
26851
|
-
"https://w3id.org/security/data-integrity/
|
|
26961
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
26962
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
26852
26963
|
"https://gotosocial.org/ns"
|
|
26853
26964
|
];
|
|
26854
26965
|
const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
@@ -29599,6 +29710,7 @@ var Group = class Group extends Object$1 {
|
|
|
29599
29710
|
#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
|
|
29600
29711
|
#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
|
|
29601
29712
|
#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
|
|
29713
|
+
#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
29602
29714
|
#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
29603
29715
|
#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
|
|
29604
29716
|
#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
|
|
@@ -29667,6 +29779,13 @@ var Group = class Group extends Object$1 {
|
|
|
29667
29779
|
for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
29668
29780
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
29669
29781
|
}
|
|
29782
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
29783
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
29784
|
+
if ("gateways" in values && values.gateways != null) {
|
|
29785
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
|
|
29786
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
29787
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
29788
|
+
}
|
|
29670
29789
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
29671
29790
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
29672
29791
|
if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
|
|
@@ -29797,6 +29916,14 @@ var Group = class Group extends Object$1 {
|
|
|
29797
29916
|
for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
29798
29917
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
29799
29918
|
}
|
|
29919
|
+
clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
29920
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
29921
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
29922
|
+
if ("gateways" in values && values.gateways != null) {
|
|
29923
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
|
|
29924
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
29925
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
29926
|
+
}
|
|
29800
29927
|
clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
|
|
29801
29928
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
29802
29929
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
@@ -30270,6 +30397,24 @@ var Group = class Group extends Object$1 {
|
|
|
30270
30397
|
yield v;
|
|
30271
30398
|
}
|
|
30272
30399
|
}
|
|
30400
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
30401
|
+
* retrieved.
|
|
30402
|
+
*
|
|
30403
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
30404
|
+
*/
|
|
30405
|
+
get gateway() {
|
|
30406
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
30407
|
+
if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
|
|
30408
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
30409
|
+
}
|
|
30410
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
30411
|
+
* retrieved.
|
|
30412
|
+
*
|
|
30413
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
30414
|
+
*/
|
|
30415
|
+
get gateways() {
|
|
30416
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
30417
|
+
}
|
|
30273
30418
|
/** When `true`, conveys that for this actor, follow requests are not usually
|
|
30274
30419
|
* automatically approved, but instead are examined by a person who may accept
|
|
30275
30420
|
* or reject the request, at some time in the future. Setting of `false`
|
|
@@ -32139,6 +32284,12 @@ var Group = class Group extends Object$1 {
|
|
|
32139
32284
|
}
|
|
32140
32285
|
if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
32141
32286
|
compactItems = [];
|
|
32287
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
32288
|
+
const item = formatIri(v);
|
|
32289
|
+
compactItems.push(item);
|
|
32290
|
+
}
|
|
32291
|
+
if (compactItems.length > 0) result["gateways"] = compactItems;
|
|
32292
|
+
compactItems = [];
|
|
32142
32293
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
32143
32294
|
const item = v;
|
|
32144
32295
|
compactItems.push(item);
|
|
@@ -32354,6 +32505,7 @@ var Group = class Group extends Object$1 {
|
|
|
32354
32505
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
32355
32506
|
result["@context"] = [
|
|
32356
32507
|
"https://www.w3.org/ns/activitystreams",
|
|
32508
|
+
"https://w3id.org/fep/ef61",
|
|
32357
32509
|
"https://w3id.org/security/v1",
|
|
32358
32510
|
"https://w3id.org/security/data-integrity/v1",
|
|
32359
32511
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -32426,6 +32578,12 @@ var Group = class Group extends Object$1 {
|
|
|
32426
32578
|
}
|
|
32427
32579
|
if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
|
|
32428
32580
|
array = [];
|
|
32581
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
32582
|
+
const element = { "@id": formatIri(v) };
|
|
32583
|
+
array.push(element);
|
|
32584
|
+
}
|
|
32585
|
+
if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
|
|
32586
|
+
array = [];
|
|
32429
32587
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
32430
32588
|
const element = { "@value": v };
|
|
32431
32589
|
array.push(element);
|
|
@@ -32550,6 +32708,7 @@ var Group = class Group extends Object$1 {
|
|
|
32550
32708
|
if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
32551
32709
|
const docContext = options.context ?? [
|
|
32552
32710
|
"https://www.w3.org/ns/activitystreams",
|
|
32711
|
+
"https://w3id.org/fep/ef61",
|
|
32553
32712
|
"https://w3id.org/security/v1",
|
|
32554
32713
|
"https://w3id.org/security/data-integrity/v1",
|
|
32555
32714
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -32713,6 +32872,15 @@ var Group = class Group extends Object$1 {
|
|
|
32713
32872
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
|
|
32714
32873
|
}
|
|
32715
32874
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
32875
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
32876
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
|
|
32877
|
+
for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
|
|
32878
|
+
if (v == null) continue;
|
|
32879
|
+
const decoded = parseGatewayUrl(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
|
|
32880
|
+
if (typeof decoded === "undefined") continue;
|
|
32881
|
+
_hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
|
|
32882
|
+
}
|
|
32883
|
+
instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
32716
32884
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
32717
32885
|
let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
|
|
32718
32886
|
for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
|
|
@@ -33054,6 +33222,12 @@ var Group = class Group extends Object$1 {
|
|
|
33054
33222
|
} : v);
|
|
33055
33223
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
|
|
33056
33224
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
33225
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
|
|
33226
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
33227
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
33228
|
+
} : v);
|
|
33229
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
33230
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
33057
33231
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
|
|
33058
33232
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
33059
33233
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -33212,6 +33386,7 @@ var Link = class Link {
|
|
|
33212
33386
|
#_pVjLsybKQdmkjuU7MHjiVmNnuj7_href = [];
|
|
33213
33387
|
#_2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel = [];
|
|
33214
33388
|
#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = [];
|
|
33389
|
+
#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
|
|
33215
33390
|
#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [];
|
|
33216
33391
|
#_f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang = [];
|
|
33217
33392
|
#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [];
|
|
@@ -33243,6 +33418,8 @@ var Link = class Link {
|
|
|
33243
33418
|
}
|
|
33244
33419
|
if ("mediaType" in values && values.mediaType != null) if (typeof values.mediaType === "string") this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = [values.mediaType];
|
|
33245
33420
|
else throw new TypeError("The mediaType must be of type string.");
|
|
33421
|
+
if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
|
|
33422
|
+
else throw new TypeError("The digestMultibase must be of type string.");
|
|
33246
33423
|
if ("name" in values && values.name != null) if (typeof values.name === "string" || values.name instanceof LanguageString$1) this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [values.name];
|
|
33247
33424
|
else throw new TypeError("The name must be of type string | LanguageString.");
|
|
33248
33425
|
if ("names" in values && values.names != null) {
|
|
@@ -33290,6 +33467,9 @@ var Link = class Link {
|
|
|
33290
33467
|
clone.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType;
|
|
33291
33468
|
if ("mediaType" in values && values.mediaType != null) if (typeof values.mediaType === "string") clone.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = [values.mediaType];
|
|
33292
33469
|
else throw new TypeError("The mediaType must be of type string.");
|
|
33470
|
+
clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
|
|
33471
|
+
if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
|
|
33472
|
+
else throw new TypeError("The digestMultibase must be of type string.");
|
|
33293
33473
|
clone.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name;
|
|
33294
33474
|
if ("name" in values && values.name != null) if (typeof values.name === "string" || values.name instanceof LanguageString$1) clone.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [values.name];
|
|
33295
33475
|
else throw new TypeError("The name must be of type string | LanguageString.");
|
|
@@ -33353,6 +33533,15 @@ var Link = class Link {
|
|
|
33353
33533
|
if (this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.length < 1) return null;
|
|
33354
33534
|
return this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType[0];
|
|
33355
33535
|
}
|
|
33536
|
+
/** The multibase-encoded integrity digest of the linked resource.
|
|
33537
|
+
*
|
|
33538
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
33539
|
+
*/
|
|
33540
|
+
get digestMultibase() {
|
|
33541
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
33542
|
+
if (this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length < 1) return null;
|
|
33543
|
+
return this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
|
|
33544
|
+
}
|
|
33356
33545
|
/** A simple, human-readable, plain-text name for the object. HTML markup MUST
|
|
33357
33546
|
* NOT be included. The name MAY be expressed using multiple language-tagged
|
|
33358
33547
|
* values.
|
|
@@ -33565,6 +33754,12 @@ var Link = class Link {
|
|
|
33565
33754
|
}
|
|
33566
33755
|
if (compactItems.length > 0) result["mediaType"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
33567
33756
|
compactItems = [];
|
|
33757
|
+
for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
|
|
33758
|
+
const item = v;
|
|
33759
|
+
compactItems.push(item);
|
|
33760
|
+
}
|
|
33761
|
+
if (compactItems.length > 0) result["digestMultibase"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
33762
|
+
compactItems = [];
|
|
33568
33763
|
for (const v of this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name) {
|
|
33569
33764
|
const item = typeof v === "string" ? v : {
|
|
33570
33765
|
"@value": v.toString(),
|
|
@@ -33607,7 +33802,7 @@ var Link = class Link {
|
|
|
33607
33802
|
if (compactItems.length > 0) result["preview"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
33608
33803
|
result["type"] = "Link";
|
|
33609
33804
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
33610
|
-
result["@context"] = "https://www.w3.org/ns/activitystreams";
|
|
33805
|
+
result["@context"] = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/ef61"];
|
|
33611
33806
|
return result;
|
|
33612
33807
|
}
|
|
33613
33808
|
let array;
|
|
@@ -33631,6 +33826,12 @@ var Link = class Link {
|
|
|
33631
33826
|
}
|
|
33632
33827
|
if (array.length > 0) values["https://www.w3.org/ns/activitystreams#mediaType"] = array;
|
|
33633
33828
|
array = [];
|
|
33829
|
+
for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
|
|
33830
|
+
const element = { "@value": v };
|
|
33831
|
+
array.push(element);
|
|
33832
|
+
}
|
|
33833
|
+
if (array.length > 0) values["https://www.w3.org/ns/credentials/v2#digestMultibase"] = array;
|
|
33834
|
+
array = [];
|
|
33634
33835
|
for (const v of this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name) {
|
|
33635
33836
|
const element = typeof v === "string" ? { "@value": v } : {
|
|
33636
33837
|
"@value": v.toString(),
|
|
@@ -33672,7 +33873,7 @@ var Link = class Link {
|
|
|
33672
33873
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Link"];
|
|
33673
33874
|
if (this.id != null) values["@id"] = formatIri(this.id);
|
|
33674
33875
|
if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
33675
|
-
const docContext = options.context ?? "https://www.w3.org/ns/activitystreams";
|
|
33876
|
+
const docContext = options.context ?? ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/ef61"];
|
|
33676
33877
|
const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
33677
33878
|
if (docContext != null) {}
|
|
33678
33879
|
return compacted;
|
|
@@ -33771,6 +33972,15 @@ var Link = class Link {
|
|
|
33771
33972
|
_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.push(decoded);
|
|
33772
33973
|
}
|
|
33773
33974
|
instance.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType;
|
|
33975
|
+
const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
|
|
33976
|
+
let _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array = values["https://www.w3.org/ns/credentials/v2#digestMultibase"];
|
|
33977
|
+
for (const v of _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array == null ? [] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array.length === 1 && "@list" in _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0] ? _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0]["@list"] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array) {
|
|
33978
|
+
if (v == null) continue;
|
|
33979
|
+
const decoded = v["@value"];
|
|
33980
|
+
if (typeof decoded === "undefined") continue;
|
|
33981
|
+
_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.push(decoded);
|
|
33982
|
+
}
|
|
33983
|
+
instance.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
|
|
33774
33984
|
const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [];
|
|
33775
33985
|
let _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array = values["https://www.w3.org/ns/activitystreams#name"];
|
|
33776
33986
|
for (const v of _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array == null ? [] : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array.length === 1 && "@list" in _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array[0] ? _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array[0]["@list"] : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array) {
|
|
@@ -33935,6 +34145,11 @@ var Link = class Link {
|
|
|
33935
34145
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
33936
34146
|
} : v);
|
|
33937
34147
|
if (_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.length == 1) proxy.mediaType = _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType[0];
|
|
34148
|
+
const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.map((v) => v instanceof URL ? {
|
|
34149
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
34150
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
34151
|
+
} : v);
|
|
34152
|
+
if (_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length == 1) proxy.digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
|
|
33938
34153
|
const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.map((v) => v instanceof URL ? {
|
|
33939
34154
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
33940
34155
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -34197,7 +34412,8 @@ var Image = class Image extends Document {
|
|
|
34197
34412
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
34198
34413
|
result["@context"] = [
|
|
34199
34414
|
"https://www.w3.org/ns/activitystreams",
|
|
34200
|
-
"https://w3id.org/security/data-integrity/
|
|
34415
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
34416
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
34201
34417
|
"https://gotosocial.org/ns"
|
|
34202
34418
|
];
|
|
34203
34419
|
return result;
|
|
@@ -34212,7 +34428,8 @@ var Image = class Image extends Document {
|
|
|
34212
34428
|
if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
34213
34429
|
const docContext = options.context ?? [
|
|
34214
34430
|
"https://www.w3.org/ns/activitystreams",
|
|
34215
|
-
"https://w3id.org/security/data-integrity/
|
|
34431
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
34432
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
34216
34433
|
"https://gotosocial.org/ns"
|
|
34217
34434
|
];
|
|
34218
34435
|
const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
@@ -36823,6 +37040,7 @@ var Organization = class Organization extends Object$1 {
|
|
|
36823
37040
|
#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
|
|
36824
37041
|
#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
|
|
36825
37042
|
#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
|
|
37043
|
+
#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
36826
37044
|
#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
36827
37045
|
#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
|
|
36828
37046
|
#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
|
|
@@ -36891,6 +37109,13 @@ var Organization = class Organization extends Object$1 {
|
|
|
36891
37109
|
for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
36892
37110
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
36893
37111
|
}
|
|
37112
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
37113
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
37114
|
+
if ("gateways" in values && values.gateways != null) {
|
|
37115
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
|
|
37116
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
37117
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
37118
|
+
}
|
|
36894
37119
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
36895
37120
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
36896
37121
|
if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
|
|
@@ -37021,6 +37246,14 @@ var Organization = class Organization extends Object$1 {
|
|
|
37021
37246
|
for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
37022
37247
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
37023
37248
|
}
|
|
37249
|
+
clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
37250
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
37251
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
37252
|
+
if ("gateways" in values && values.gateways != null) {
|
|
37253
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
|
|
37254
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
37255
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
37256
|
+
}
|
|
37024
37257
|
clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
|
|
37025
37258
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
37026
37259
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
@@ -37494,6 +37727,24 @@ var Organization = class Organization extends Object$1 {
|
|
|
37494
37727
|
yield v;
|
|
37495
37728
|
}
|
|
37496
37729
|
}
|
|
37730
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
37731
|
+
* retrieved.
|
|
37732
|
+
*
|
|
37733
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
37734
|
+
*/
|
|
37735
|
+
get gateway() {
|
|
37736
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
37737
|
+
if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
|
|
37738
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
37739
|
+
}
|
|
37740
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
37741
|
+
* retrieved.
|
|
37742
|
+
*
|
|
37743
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
37744
|
+
*/
|
|
37745
|
+
get gateways() {
|
|
37746
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
37747
|
+
}
|
|
37497
37748
|
/** When `true`, conveys that for this actor, follow requests are not usually
|
|
37498
37749
|
* automatically approved, but instead are examined by a person who may accept
|
|
37499
37750
|
* or reject the request, at some time in the future. Setting of `false`
|
|
@@ -39363,6 +39614,12 @@ var Organization = class Organization extends Object$1 {
|
|
|
39363
39614
|
}
|
|
39364
39615
|
if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
39365
39616
|
compactItems = [];
|
|
39617
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
39618
|
+
const item = formatIri(v);
|
|
39619
|
+
compactItems.push(item);
|
|
39620
|
+
}
|
|
39621
|
+
if (compactItems.length > 0) result["gateways"] = compactItems;
|
|
39622
|
+
compactItems = [];
|
|
39366
39623
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
39367
39624
|
const item = v;
|
|
39368
39625
|
compactItems.push(item);
|
|
@@ -39578,6 +39835,7 @@ var Organization = class Organization extends Object$1 {
|
|
|
39578
39835
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
39579
39836
|
result["@context"] = [
|
|
39580
39837
|
"https://www.w3.org/ns/activitystreams",
|
|
39838
|
+
"https://w3id.org/fep/ef61",
|
|
39581
39839
|
"https://w3id.org/security/v1",
|
|
39582
39840
|
"https://w3id.org/security/data-integrity/v1",
|
|
39583
39841
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -39650,6 +39908,12 @@ var Organization = class Organization extends Object$1 {
|
|
|
39650
39908
|
}
|
|
39651
39909
|
if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
|
|
39652
39910
|
array = [];
|
|
39911
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
39912
|
+
const element = { "@id": formatIri(v) };
|
|
39913
|
+
array.push(element);
|
|
39914
|
+
}
|
|
39915
|
+
if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
|
|
39916
|
+
array = [];
|
|
39653
39917
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
39654
39918
|
const element = { "@value": v };
|
|
39655
39919
|
array.push(element);
|
|
@@ -39774,6 +40038,7 @@ var Organization = class Organization extends Object$1 {
|
|
|
39774
40038
|
if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
39775
40039
|
const docContext = options.context ?? [
|
|
39776
40040
|
"https://www.w3.org/ns/activitystreams",
|
|
40041
|
+
"https://w3id.org/fep/ef61",
|
|
39777
40042
|
"https://w3id.org/security/v1",
|
|
39778
40043
|
"https://w3id.org/security/data-integrity/v1",
|
|
39779
40044
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -39937,6 +40202,15 @@ var Organization = class Organization extends Object$1 {
|
|
|
39937
40202
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
|
|
39938
40203
|
}
|
|
39939
40204
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
40205
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
40206
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
|
|
40207
|
+
for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
|
|
40208
|
+
if (v == null) continue;
|
|
40209
|
+
const decoded = parseGatewayUrl(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
|
|
40210
|
+
if (typeof decoded === "undefined") continue;
|
|
40211
|
+
_hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
|
|
40212
|
+
}
|
|
40213
|
+
instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
39940
40214
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
39941
40215
|
let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
|
|
39942
40216
|
for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
|
|
@@ -40278,6 +40552,12 @@ var Organization = class Organization extends Object$1 {
|
|
|
40278
40552
|
} : v);
|
|
40279
40553
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
|
|
40280
40554
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
40555
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
|
|
40556
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
40557
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
40558
|
+
} : v);
|
|
40559
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
40560
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
40281
40561
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
|
|
40282
40562
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
40283
40563
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -40449,7 +40729,8 @@ var Page = class Page extends Document {
|
|
|
40449
40729
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
40450
40730
|
result["@context"] = [
|
|
40451
40731
|
"https://www.w3.org/ns/activitystreams",
|
|
40452
|
-
"https://w3id.org/security/data-integrity/
|
|
40732
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
40733
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
40453
40734
|
"https://gotosocial.org/ns"
|
|
40454
40735
|
];
|
|
40455
40736
|
return result;
|
|
@@ -40464,7 +40745,8 @@ var Page = class Page extends Document {
|
|
|
40464
40745
|
if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
40465
40746
|
const docContext = options.context ?? [
|
|
40466
40747
|
"https://www.w3.org/ns/activitystreams",
|
|
40467
|
-
"https://w3id.org/security/data-integrity/
|
|
40748
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
40749
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
40468
40750
|
"https://gotosocial.org/ns"
|
|
40469
40751
|
];
|
|
40470
40752
|
const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
@@ -40579,6 +40861,7 @@ var Person = class Person extends Object$1 {
|
|
|
40579
40861
|
#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
|
|
40580
40862
|
#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
|
|
40581
40863
|
#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
|
|
40864
|
+
#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
40582
40865
|
#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
40583
40866
|
#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
|
|
40584
40867
|
#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
|
|
@@ -40647,6 +40930,13 @@ var Person = class Person extends Object$1 {
|
|
|
40647
40930
|
for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
40648
40931
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
40649
40932
|
}
|
|
40933
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
40934
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
40935
|
+
if ("gateways" in values && values.gateways != null) {
|
|
40936
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
|
|
40937
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
40938
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
40939
|
+
}
|
|
40650
40940
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
40651
40941
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
40652
40942
|
if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
|
|
@@ -40777,6 +41067,14 @@ var Person = class Person extends Object$1 {
|
|
|
40777
41067
|
for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
40778
41068
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
40779
41069
|
}
|
|
41070
|
+
clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
41071
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
41072
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
41073
|
+
if ("gateways" in values && values.gateways != null) {
|
|
41074
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
|
|
41075
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
41076
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
41077
|
+
}
|
|
40780
41078
|
clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
|
|
40781
41079
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
40782
41080
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
@@ -41250,6 +41548,24 @@ var Person = class Person extends Object$1 {
|
|
|
41250
41548
|
yield v;
|
|
41251
41549
|
}
|
|
41252
41550
|
}
|
|
41551
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
41552
|
+
* retrieved.
|
|
41553
|
+
*
|
|
41554
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
41555
|
+
*/
|
|
41556
|
+
get gateway() {
|
|
41557
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
41558
|
+
if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
|
|
41559
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
41560
|
+
}
|
|
41561
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
41562
|
+
* retrieved.
|
|
41563
|
+
*
|
|
41564
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
41565
|
+
*/
|
|
41566
|
+
get gateways() {
|
|
41567
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
41568
|
+
}
|
|
41253
41569
|
/** When `true`, conveys that for this actor, follow requests are not usually
|
|
41254
41570
|
* automatically approved, but instead are examined by a person who may accept
|
|
41255
41571
|
* or reject the request, at some time in the future. Setting of `false`
|
|
@@ -43119,6 +43435,12 @@ var Person = class Person extends Object$1 {
|
|
|
43119
43435
|
}
|
|
43120
43436
|
if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
43121
43437
|
compactItems = [];
|
|
43438
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
43439
|
+
const item = formatIri(v);
|
|
43440
|
+
compactItems.push(item);
|
|
43441
|
+
}
|
|
43442
|
+
if (compactItems.length > 0) result["gateways"] = compactItems;
|
|
43443
|
+
compactItems = [];
|
|
43122
43444
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
43123
43445
|
const item = v;
|
|
43124
43446
|
compactItems.push(item);
|
|
@@ -43334,6 +43656,7 @@ var Person = class Person extends Object$1 {
|
|
|
43334
43656
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
43335
43657
|
result["@context"] = [
|
|
43336
43658
|
"https://www.w3.org/ns/activitystreams",
|
|
43659
|
+
"https://w3id.org/fep/ef61",
|
|
43337
43660
|
"https://w3id.org/security/v1",
|
|
43338
43661
|
"https://w3id.org/security/data-integrity/v1",
|
|
43339
43662
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -43406,6 +43729,12 @@ var Person = class Person extends Object$1 {
|
|
|
43406
43729
|
}
|
|
43407
43730
|
if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
|
|
43408
43731
|
array = [];
|
|
43732
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
43733
|
+
const element = { "@id": formatIri(v) };
|
|
43734
|
+
array.push(element);
|
|
43735
|
+
}
|
|
43736
|
+
if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
|
|
43737
|
+
array = [];
|
|
43409
43738
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
43410
43739
|
const element = { "@value": v };
|
|
43411
43740
|
array.push(element);
|
|
@@ -43530,6 +43859,7 @@ var Person = class Person extends Object$1 {
|
|
|
43530
43859
|
if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
43531
43860
|
const docContext = options.context ?? [
|
|
43532
43861
|
"https://www.w3.org/ns/activitystreams",
|
|
43862
|
+
"https://w3id.org/fep/ef61",
|
|
43533
43863
|
"https://w3id.org/security/v1",
|
|
43534
43864
|
"https://w3id.org/security/data-integrity/v1",
|
|
43535
43865
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -43693,6 +44023,15 @@ var Person = class Person extends Object$1 {
|
|
|
43693
44023
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
|
|
43694
44024
|
}
|
|
43695
44025
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
44026
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
44027
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
|
|
44028
|
+
for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
|
|
44029
|
+
if (v == null) continue;
|
|
44030
|
+
const decoded = parseGatewayUrl(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
|
|
44031
|
+
if (typeof decoded === "undefined") continue;
|
|
44032
|
+
_hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
|
|
44033
|
+
}
|
|
44034
|
+
instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
43696
44035
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
43697
44036
|
let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
|
|
43698
44037
|
for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
|
|
@@ -44034,6 +44373,12 @@ var Person = class Person extends Object$1 {
|
|
|
44034
44373
|
} : v);
|
|
44035
44374
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
|
|
44036
44375
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
44376
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
|
|
44377
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
44378
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
44379
|
+
} : v);
|
|
44380
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
44381
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
44037
44382
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
|
|
44038
44383
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
44039
44384
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -47268,6 +47613,7 @@ var Service = class Service extends Object$1 {
|
|
|
47268
47613
|
#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
|
|
47269
47614
|
#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
|
|
47270
47615
|
#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
|
|
47616
|
+
#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
47271
47617
|
#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
47272
47618
|
#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
|
|
47273
47619
|
#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
|
|
@@ -47336,6 +47682,13 @@ var Service = class Service extends Object$1 {
|
|
|
47336
47682
|
for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
47337
47683
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
47338
47684
|
}
|
|
47685
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
47686
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
47687
|
+
if ("gateways" in values && values.gateways != null) {
|
|
47688
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
|
|
47689
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
47690
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
47691
|
+
}
|
|
47339
47692
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
47340
47693
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
47341
47694
|
if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
|
|
@@ -47466,6 +47819,14 @@ var Service = class Service extends Object$1 {
|
|
|
47466
47819
|
for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
47467
47820
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
47468
47821
|
}
|
|
47822
|
+
clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
47823
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && isGatewayUrl(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
47824
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
47825
|
+
if ("gateways" in values && values.gateways != null) {
|
|
47826
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
|
|
47827
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && isGatewayUrl(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
47828
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
47829
|
+
}
|
|
47469
47830
|
clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
|
|
47470
47831
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
47471
47832
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
@@ -47939,6 +48300,24 @@ var Service = class Service extends Object$1 {
|
|
|
47939
48300
|
yield v;
|
|
47940
48301
|
}
|
|
47941
48302
|
}
|
|
48303
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
48304
|
+
* retrieved.
|
|
48305
|
+
*
|
|
48306
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
48307
|
+
*/
|
|
48308
|
+
get gateway() {
|
|
48309
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
48310
|
+
if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
|
|
48311
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
48312
|
+
}
|
|
48313
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
48314
|
+
* retrieved.
|
|
48315
|
+
*
|
|
48316
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
48317
|
+
*/
|
|
48318
|
+
get gateways() {
|
|
48319
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
48320
|
+
}
|
|
47942
48321
|
/** When `true`, conveys that for this actor, follow requests are not usually
|
|
47943
48322
|
* automatically approved, but instead are examined by a person who may accept
|
|
47944
48323
|
* or reject the request, at some time in the future. Setting of `false`
|
|
@@ -49808,6 +50187,12 @@ var Service = class Service extends Object$1 {
|
|
|
49808
50187
|
}
|
|
49809
50188
|
if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
49810
50189
|
compactItems = [];
|
|
50190
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
50191
|
+
const item = formatIri(v);
|
|
50192
|
+
compactItems.push(item);
|
|
50193
|
+
}
|
|
50194
|
+
if (compactItems.length > 0) result["gateways"] = compactItems;
|
|
50195
|
+
compactItems = [];
|
|
49811
50196
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
49812
50197
|
const item = v;
|
|
49813
50198
|
compactItems.push(item);
|
|
@@ -50023,6 +50408,7 @@ var Service = class Service extends Object$1 {
|
|
|
50023
50408
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
50024
50409
|
result["@context"] = [
|
|
50025
50410
|
"https://www.w3.org/ns/activitystreams",
|
|
50411
|
+
"https://w3id.org/fep/ef61",
|
|
50026
50412
|
"https://w3id.org/security/v1",
|
|
50027
50413
|
"https://w3id.org/security/data-integrity/v1",
|
|
50028
50414
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -50095,6 +50481,12 @@ var Service = class Service extends Object$1 {
|
|
|
50095
50481
|
}
|
|
50096
50482
|
if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
|
|
50097
50483
|
array = [];
|
|
50484
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
50485
|
+
const element = { "@id": formatIri(v) };
|
|
50486
|
+
array.push(element);
|
|
50487
|
+
}
|
|
50488
|
+
if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
|
|
50489
|
+
array = [];
|
|
50098
50490
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
50099
50491
|
const element = { "@value": v };
|
|
50100
50492
|
array.push(element);
|
|
@@ -50219,6 +50611,7 @@ var Service = class Service extends Object$1 {
|
|
|
50219
50611
|
if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
50220
50612
|
const docContext = options.context ?? [
|
|
50221
50613
|
"https://www.w3.org/ns/activitystreams",
|
|
50614
|
+
"https://w3id.org/fep/ef61",
|
|
50222
50615
|
"https://w3id.org/security/v1",
|
|
50223
50616
|
"https://w3id.org/security/data-integrity/v1",
|
|
50224
50617
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -50382,6 +50775,15 @@ var Service = class Service extends Object$1 {
|
|
|
50382
50775
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
|
|
50383
50776
|
}
|
|
50384
50777
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
50778
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
50779
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
|
|
50780
|
+
for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
|
|
50781
|
+
if (v == null) continue;
|
|
50782
|
+
const decoded = parseGatewayUrl(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
|
|
50783
|
+
if (typeof decoded === "undefined") continue;
|
|
50784
|
+
_hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
|
|
50785
|
+
}
|
|
50786
|
+
instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
50385
50787
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
50386
50788
|
let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
|
|
50387
50789
|
for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
|
|
@@ -50723,6 +51125,12 @@ var Service = class Service extends Object$1 {
|
|
|
50723
51125
|
} : v);
|
|
50724
51126
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
|
|
50725
51127
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
51128
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
|
|
51129
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
51130
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
51131
|
+
} : v);
|
|
51132
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
51133
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
50726
51134
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
|
|
50727
51135
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
50728
51136
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -52367,7 +52775,8 @@ var Video = class Video extends Document {
|
|
|
52367
52775
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
52368
52776
|
result["@context"] = [
|
|
52369
52777
|
"https://www.w3.org/ns/activitystreams",
|
|
52370
|
-
"https://w3id.org/security/data-integrity/
|
|
52778
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
52779
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
52371
52780
|
"https://gotosocial.org/ns"
|
|
52372
52781
|
];
|
|
52373
52782
|
return result;
|
|
@@ -52382,7 +52791,8 @@ var Video = class Video extends Document {
|
|
|
52382
52791
|
if (options.format === "expand") return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
52383
52792
|
const docContext = options.context ?? [
|
|
52384
52793
|
"https://www.w3.org/ns/activitystreams",
|
|
52385
|
-
"https://w3id.org/security/data-integrity/
|
|
52794
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
52795
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
52386
52796
|
"https://gotosocial.org/ns"
|
|
52387
52797
|
];
|
|
52388
52798
|
const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|