@fedify/vocab 2.5.0-dev.2332 → 2.5.0-dev.2355
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 +851 -2
- package/dist/mod.d.cts +227 -0
- package/dist/mod.d.ts +227 -0
- package/dist/mod.js +851 -2
- package/dist-tests/{actor-DpNkhFU9.mjs → actor-BbIjMjNa.mjs} +2 -2
- package/dist-tests/actor.test.mjs +3 -3
- package/dist-tests/application.yaml +15 -0
- package/dist-tests/{esm-Cncdk-Cm.mjs → esm-rg6f9oLR.mjs} +1 -1
- package/dist-tests/gateway.test.mjs +3 -3
- package/dist-tests/group.yaml +15 -0
- package/dist-tests/license.test.mjs +538 -0
- package/dist-tests/link.yaml +25 -0
- package/dist-tests/{lookup-CIDHxy5l.mjs → lookup-DKLMyPMJ.mjs} +2 -2
- package/dist-tests/lookup.test.mjs +3 -3
- package/dist-tests/object.yaml +30 -0
- package/dist-tests/organization.yaml +15 -0
- package/dist-tests/person.yaml +15 -0
- package/dist-tests/portable-lookup.test.mjs +4 -4
- package/dist-tests/service.yaml +15 -0
- package/dist-tests/signed-representation.test.mjs +1 -1
- package/dist-tests/src-DVk5F9Ik.mjs +9 -0
- package/dist-tests/translation.test.mjs +3 -6
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/{vocab-EFWWufqL.mjs → vocab-Cg2PG-xH.mjs} +851 -2
- package/dist-tests/vocab.test.mjs +9 -3
- package/package.json +4 -4
- package/src/__snapshots__/vocab.test.ts.snap +480 -33
- package/src/application.yaml +15 -0
- package/src/group.yaml +15 -0
- package/src/license.test.ts +588 -0
- package/src/link.yaml +25 -0
- package/src/object.yaml +30 -0
- package/src/organization.yaml +15 -0
- package/src/person.yaml +15 -0
- package/src/service.yaml +15 -0
- package/src/vocab.test.ts +18 -6
- package/LICENSE +0 -20
package/dist/mod.js
CHANGED
|
@@ -12,7 +12,7 @@ import { isTemporalDuration, isTemporalInstant } from "@fedify/vocab-runtime/tem
|
|
|
12
12
|
import { delay } from "es-toolkit";
|
|
13
13
|
//#region deno.json
|
|
14
14
|
var name = "@fedify/vocab";
|
|
15
|
-
var version = "2.5.0-dev.
|
|
15
|
+
var version = "2.5.0-dev.2355+c92a1cb1";
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/type.ts
|
|
18
18
|
function getTypeId(object) {
|
|
@@ -82,10 +82,25 @@ function isValidLanguageTag(language) {
|
|
|
82
82
|
throw error;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
function getAbsoluteIriValue(value) {
|
|
86
|
+
if (value == null || typeof value !== "object") return void 0;
|
|
87
|
+
const node = value;
|
|
88
|
+
if (typeof node["@id"] === "string") return node["@id"].startsWith("_:") ? void 0 : node["@id"];
|
|
89
|
+
if (typeof node["@value"] !== "string") return void 0;
|
|
90
|
+
const type = node["@type"];
|
|
91
|
+
return type == null || type === "http://www.w3.org/2001/XMLSchema#string" || type === "http://www.w3.org/2001/XMLSchema#anyURI" ? node["@value"] : void 0;
|
|
92
|
+
}
|
|
93
|
+
function isAbsoluteIriValue(value) {
|
|
94
|
+
const iri = getAbsoluteIriValue(value);
|
|
95
|
+
return iri != null && canDecodeIri(iri);
|
|
96
|
+
}
|
|
85
97
|
const extraPropertyContexts = {
|
|
86
98
|
"https://schema.org/translator": "https://w3id.org/fep/22cd",
|
|
99
|
+
"https://w3id.org/fep/6757#preferredLicense": "https://w3id.org/fep/6757",
|
|
100
|
+
"http://purl.org/dc/terms/license": "https://w3id.org/fep/6757",
|
|
87
101
|
"https://w3id.org/fep/22cd#translations": "https://w3id.org/fep/22cd"
|
|
88
102
|
};
|
|
103
|
+
const extraContextUrls = ["https://w3id.org/fep/22cd", "https://w3id.org/fep/6757"];
|
|
89
104
|
function getExtraContexts(document) {
|
|
90
105
|
const contexts = /* @__PURE__ */ new Set();
|
|
91
106
|
const pending = [document];
|
|
@@ -98,7 +113,10 @@ function getExtraContexts(document) {
|
|
|
98
113
|
}
|
|
99
114
|
if ("@value" in value) continue;
|
|
100
115
|
for (const [key, child] of globalThis.Object.entries(value)) {
|
|
101
|
-
if (key === "@context")
|
|
116
|
+
if (key === "@context") {
|
|
117
|
+
for (const context of Array.isArray(child) ? child : [child]) if (typeof context === "string" && extraContextUrls.includes(context)) contexts.add(context);
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
102
120
|
if (globalThis.Object.hasOwn(extraPropertyContexts, key)) contexts.add(extraPropertyContexts[key]);
|
|
103
121
|
pending.push(child);
|
|
104
122
|
}
|
|
@@ -139,10 +157,12 @@ const PORTABLE_IRI_KEYS = /* @__PURE__ */ new Set([
|
|
|
139
157
|
"followingOf",
|
|
140
158
|
"generator",
|
|
141
159
|
"href",
|
|
160
|
+
"http://creativecommons.org/ns#license",
|
|
142
161
|
"http://fedibird.com/ns#emojiReactions",
|
|
143
162
|
"http://fedibird.com/ns#quoteUri",
|
|
144
163
|
"http://joinmastodon.org/ns#featured",
|
|
145
164
|
"http://joinmastodon.org/ns#featuredTags",
|
|
165
|
+
"http://purl.org/dc/terms/license",
|
|
146
166
|
"http://www.w3.org/ns/ldp#inbox",
|
|
147
167
|
"https://gotosocial.org/ns#announceAuthorization",
|
|
148
168
|
"https://gotosocial.org/ns#approvedBy",
|
|
@@ -154,6 +174,7 @@ const PORTABLE_IRI_KEYS = /* @__PURE__ */ new Set([
|
|
|
154
174
|
"https://gotosocial.org/ns#replyAuthorization",
|
|
155
175
|
"https://misskey-hub.net/ns#_misskey_quote",
|
|
156
176
|
"https://schema.org/isBasedOn",
|
|
177
|
+
"https://schema.org/license",
|
|
157
178
|
"https://schema.org/translationOfWork",
|
|
158
179
|
"https://schema.org/translator",
|
|
159
180
|
"https://w3id.org/fep/044f#quote",
|
|
@@ -166,6 +187,7 @@ const PORTABLE_IRI_KEYS = /* @__PURE__ */ new Set([
|
|
|
166
187
|
"https://w3id.org/fep/5711#outboxOf",
|
|
167
188
|
"https://w3id.org/fep/5711#repliesOf",
|
|
168
189
|
"https://w3id.org/fep/5711#sharesOf",
|
|
190
|
+
"https://w3id.org/fep/6757#preferredLicense",
|
|
169
191
|
"https://w3id.org/fep/7aa9#featureAuthorization",
|
|
170
192
|
"https://w3id.org/fep/7aa9#featuredCollections",
|
|
171
193
|
"https://w3id.org/fep/7aa9#featuredObject",
|
|
@@ -245,6 +267,7 @@ const PORTABLE_IRI_KEYS = /* @__PURE__ */ new Set([
|
|
|
245
267
|
"isBasedOn",
|
|
246
268
|
"items",
|
|
247
269
|
"last",
|
|
270
|
+
"license",
|
|
248
271
|
"likeAuthorization",
|
|
249
272
|
"liked",
|
|
250
273
|
"likedOf",
|
|
@@ -264,6 +287,7 @@ const PORTABLE_IRI_KEYS = /* @__PURE__ */ new Set([
|
|
|
264
287
|
"outboxOf",
|
|
265
288
|
"owner",
|
|
266
289
|
"partOf",
|
|
290
|
+
"preferredLicense",
|
|
267
291
|
"prev",
|
|
268
292
|
"preview",
|
|
269
293
|
"proof",
|
|
@@ -415,6 +439,7 @@ var Object$1 = class Object$1 {
|
|
|
415
439
|
#_446xEaDBs3Fz6MyzP3PSBaLupkbJ_announceAuthorization = [];
|
|
416
440
|
#_trust_446xEaDBs3Fz6MyzP3PSBaLupkbJ_announceAuthorization = /* @__PURE__ */ new Set();
|
|
417
441
|
#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations = [];
|
|
442
|
+
#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = [];
|
|
418
443
|
/**
|
|
419
444
|
* Constructs a new instance of Object with the given values.
|
|
420
445
|
* @param values The values to initialize the instance with.
|
|
@@ -656,6 +681,8 @@ var Object$1 = class Object$1 {
|
|
|
656
681
|
} else throw new TypeError("The announceAuthorization must be of type AnnounceAuthorization | URL.");
|
|
657
682
|
if ("translations" in values && values.translations != null) if (Array.isArray(values.translations) && values.translations.every((v) => v instanceof Translation)) this.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations = values.translations.slice();
|
|
658
683
|
else throw new TypeError("The translations must be an array of type Translation.");
|
|
684
|
+
if ("licenses" in values && values.licenses != null) if (Array.isArray(values.licenses) && values.licenses.every((v) => v instanceof URL)) this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = values.licenses.slice();
|
|
685
|
+
else throw new TypeError("The licenses must be an array of type URL.");
|
|
659
686
|
}
|
|
660
687
|
/**
|
|
661
688
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -984,6 +1011,9 @@ var Object$1 = class Object$1 {
|
|
|
984
1011
|
clone.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations = this.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations.slice();
|
|
985
1012
|
if ("translations" in values && values.translations != null) if (Array.isArray(values.translations) && values.translations.every((v) => v instanceof Translation)) clone.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations = values.translations.slice();
|
|
986
1013
|
else throw new TypeError("The translations must be an array of type Translation.");
|
|
1014
|
+
clone.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.slice();
|
|
1015
|
+
if ("licenses" in values && values.licenses != null) if (Array.isArray(values.licenses) && values.licenses.every((v) => v instanceof URL)) clone.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = values.licenses.slice();
|
|
1016
|
+
else throw new TypeError("The licenses must be an array of type URL.");
|
|
987
1017
|
return clone;
|
|
988
1018
|
}
|
|
989
1019
|
async #fetchAttachment(url, options = {}) {
|
|
@@ -7453,6 +7483,27 @@ var Object$1 = class Object$1 {
|
|
|
7453
7483
|
get translations() {
|
|
7454
7484
|
return this.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations;
|
|
7455
7485
|
}
|
|
7486
|
+
/** The copyright licenses for this object, as defined by
|
|
7487
|
+
* [FEP-6757](https://w3id.org/fep/6757). Each license is identified by its
|
|
7488
|
+
* URI, such as <https://creativecommons.org/licenses/by/4.0/>; license names
|
|
7489
|
+
* and SPDX short identifiers are not license URIs. Multiple values are
|
|
7490
|
+
* alternatives that a consumer may choose from; their order has no meaning.
|
|
7491
|
+
*
|
|
7492
|
+
* An empty list means the object carries no license metadata. Fedify does
|
|
7493
|
+
* not synthesize a default license for it; FEP-6757 suggests that consumers
|
|
7494
|
+
* treat such content as “all rights reserved,” but that is a consumer policy,
|
|
7495
|
+
* not a value of this property. A license on an actor, activity, or
|
|
7496
|
+
* collection covers that object itself, not the objects the actor authored,
|
|
7497
|
+
* the activity's object, or the collection's items. An actor's
|
|
7498
|
+
* `preferredLicense` is not a fallback for this property either.
|
|
7499
|
+
*
|
|
7500
|
+
* The `https://schema.org/license` and
|
|
7501
|
+
* `http://creativecommons.org/ns#license` properties are read as synonyms
|
|
7502
|
+
* when this property is absent, but only this property is written.
|
|
7503
|
+
*/
|
|
7504
|
+
get licenses() {
|
|
7505
|
+
return this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
7506
|
+
}
|
|
7456
7507
|
/**
|
|
7457
7508
|
* Converts this object to a JSON-LD structure.
|
|
7458
7509
|
* @param options The options to use.
|
|
@@ -7866,6 +7917,12 @@ var Object$1 = class Object$1 {
|
|
|
7866
7917
|
compactItems.push(item);
|
|
7867
7918
|
}
|
|
7868
7919
|
if (compactItems.length > 0) result["translations"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
7920
|
+
compactItems = [];
|
|
7921
|
+
for (const v of this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d) {
|
|
7922
|
+
const item = formatIri(v);
|
|
7923
|
+
compactItems.push(item);
|
|
7924
|
+
}
|
|
7925
|
+
if (compactItems.length > 0) result["license"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
7869
7926
|
result["type"] = "Object";
|
|
7870
7927
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
7871
7928
|
result["@context"] = [
|
|
@@ -8327,6 +8384,17 @@ var Object$1 = class Object$1 {
|
|
|
8327
8384
|
array.push(element);
|
|
8328
8385
|
}
|
|
8329
8386
|
if (array.length > 0) values["https://w3id.org/fep/22cd#translations"] = array;
|
|
8387
|
+
array = [];
|
|
8388
|
+
for (const v of this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d) {
|
|
8389
|
+
let element = { "@id": formatIri(v) };
|
|
8390
|
+
if (Array.isArray(element)) {
|
|
8391
|
+
if (element.length < 1) continue;
|
|
8392
|
+
if (element.length == 1) element = element[0];
|
|
8393
|
+
}
|
|
8394
|
+
if (typeof element === "undefined") continue;
|
|
8395
|
+
array.push(element);
|
|
8396
|
+
}
|
|
8397
|
+
if (array.length > 0) values["http://purl.org/dc/terms/license"] = array;
|
|
8330
8398
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Object"];
|
|
8331
8399
|
if (this.id != null) values["@id"] = formatIri(this.id);
|
|
8332
8400
|
if (options.format === "expand") return await jsonld.expand(values, {
|
|
@@ -8346,6 +8414,11 @@ var Object$1 = class Object$1 {
|
|
|
8346
8414
|
}
|
|
8347
8415
|
}
|
|
8348
8416
|
];
|
|
8417
|
+
if (options.context == null) {
|
|
8418
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
8419
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
8420
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
8421
|
+
}
|
|
8349
8422
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
8350
8423
|
if (options.context == null) {
|
|
8351
8424
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -8368,6 +8441,7 @@ var Object$1 = class Object$1 {
|
|
|
8368
8441
|
if (this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof != null && this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.length > 0) return false;
|
|
8369
8442
|
if (this.#_2MHQfh2N74MMmDLDqYWFo7TxYQK2_interactionPolicy != null && this.#_2MHQfh2N74MMmDLDqYWFo7TxYQK2_interactionPolicy.length > 0) return false;
|
|
8370
8443
|
if (this.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations != null && this.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations.length > 0) return false;
|
|
8444
|
+
if (this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d != null && this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 0) return false;
|
|
8371
8445
|
return true;
|
|
8372
8446
|
}
|
|
8373
8447
|
/**
|
|
@@ -9791,6 +9865,21 @@ var Object$1 = class Object$1 {
|
|
|
9791
9865
|
_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations.push(decoded);
|
|
9792
9866
|
}
|
|
9793
9867
|
instance.#_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations = _a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations;
|
|
9868
|
+
const _2rzkBRS4gNPrkJk9DohHAMUAxA2d = [];
|
|
9869
|
+
let _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["http://purl.org/dc/terms/license"];
|
|
9870
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null || _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length < 1) _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["https://schema.org/license"];
|
|
9871
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null || _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length < 1) _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["http://creativecommons.org/ns#license"];
|
|
9872
|
+
for (const v of _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null ? [] : _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length === 1 && "@list" in _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array[0] ? _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array[0]["@list"] : _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array) {
|
|
9873
|
+
if (v == null) continue;
|
|
9874
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
9875
|
+
if (typeof decoded === "undefined") {
|
|
9876
|
+
shouldCacheJsonLd = false;
|
|
9877
|
+
continue;
|
|
9878
|
+
}
|
|
9879
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
9880
|
+
_2rzkBRS4gNPrkJk9DohHAMUAxA2d.push(decoded);
|
|
9881
|
+
}
|
|
9882
|
+
instance.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = _2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
9794
9883
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
9795
9884
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
9796
9885
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -10016,6 +10105,11 @@ var Object$1 = class Object$1 {
|
|
|
10016
10105
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
10017
10106
|
} : v);
|
|
10018
10107
|
if (_a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations.length > 1 || !("translation" in proxy) && _a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations.length > 0) proxy.translations = _a1jKLXa1P1ZoKTfTM2CzmhHK3cP_translations;
|
|
10108
|
+
const _2rzkBRS4gNPrkJk9DohHAMUAxA2d = this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.map((v) => v instanceof URL ? {
|
|
10109
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
10110
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
10111
|
+
} : v);
|
|
10112
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 1 || !("license" in proxy) && _2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 0) proxy.licenses = _2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
10019
10113
|
return proxy;
|
|
10020
10114
|
}
|
|
10021
10115
|
};
|
|
@@ -10113,6 +10207,11 @@ var Emoji = class Emoji extends Object$1 {
|
|
|
10113
10207
|
"toot": "http://joinmastodon.org/ns#",
|
|
10114
10208
|
"Emoji": "toot:Emoji"
|
|
10115
10209
|
}];
|
|
10210
|
+
if (options.context == null) {
|
|
10211
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
10212
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
10213
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
10214
|
+
}
|
|
10116
10215
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
10117
10216
|
if (options.context == null) {
|
|
10118
10217
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -10938,6 +11037,11 @@ var ChatMessage = class ChatMessage extends Object$1 {
|
|
|
10938
11037
|
}
|
|
10939
11038
|
}
|
|
10940
11039
|
];
|
|
11040
|
+
if (options.context == null) {
|
|
11041
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
11042
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
11043
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
11044
|
+
}
|
|
10941
11045
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
10942
11046
|
if (options.context == null) {
|
|
10943
11047
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -13306,6 +13410,11 @@ var Activity = class Activity extends Object$1 {
|
|
|
13306
13410
|
"https://w3id.org/security/data-integrity/v1",
|
|
13307
13411
|
"https://gotosocial.org/ns"
|
|
13308
13412
|
];
|
|
13413
|
+
if (options.context == null) {
|
|
13414
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
13415
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
13416
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
13417
|
+
}
|
|
13309
13418
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
13310
13419
|
if (options.context == null) {
|
|
13311
13420
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -13714,6 +13823,11 @@ var EmojiReact = class EmojiReact extends Activity {
|
|
|
13714
13823
|
"Emoji": "toot:Emoji"
|
|
13715
13824
|
}
|
|
13716
13825
|
];
|
|
13826
|
+
if (options.context == null) {
|
|
13827
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
13828
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
13829
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
13830
|
+
}
|
|
13717
13831
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
13718
13832
|
if (options.context == null) {
|
|
13719
13833
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -14039,6 +14153,11 @@ var PropertyValue = class {
|
|
|
14039
14153
|
"PropertyValue": "schema:PropertyValue",
|
|
14040
14154
|
"value": "schema:value"
|
|
14041
14155
|
}];
|
|
14156
|
+
if (options.context == null) {
|
|
14157
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
14158
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
14159
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
14160
|
+
}
|
|
14042
14161
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
14043
14162
|
if (options.context == null) {
|
|
14044
14163
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -14391,6 +14510,11 @@ var Measure = class {
|
|
|
14391
14510
|
"hasUnit": "om2:hasUnit",
|
|
14392
14511
|
"hasNumericalValue": "om2:hasNumericalValue"
|
|
14393
14512
|
}];
|
|
14513
|
+
if (options.context == null) {
|
|
14514
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
14515
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
14516
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
14517
|
+
}
|
|
14394
14518
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
14395
14519
|
if (options.context == null) {
|
|
14396
14520
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -15156,6 +15280,11 @@ var AnnounceAuthorization = class AnnounceAuthorization extends Object$1 {
|
|
|
15156
15280
|
"https://w3id.org/security/data-integrity/v1",
|
|
15157
15281
|
"https://gotosocial.org/ns"
|
|
15158
15282
|
];
|
|
15283
|
+
if (options.context == null) {
|
|
15284
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
15285
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
15286
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
15287
|
+
}
|
|
15159
15288
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
15160
15289
|
if (options.context == null) {
|
|
15161
15290
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -15411,6 +15540,11 @@ var AnnounceRequest = class AnnounceRequest extends Activity {
|
|
|
15411
15540
|
"https://w3id.org/security/data-integrity/v1",
|
|
15412
15541
|
"https://gotosocial.org/ns"
|
|
15413
15542
|
];
|
|
15543
|
+
if (options.context == null) {
|
|
15544
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
15545
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
15546
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
15547
|
+
}
|
|
15414
15548
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
15415
15549
|
if (options.context == null) {
|
|
15416
15550
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -15789,6 +15923,11 @@ var InteractionPolicy = class {
|
|
|
15789
15923
|
keepFreeFloatingNodes: true
|
|
15790
15924
|
});
|
|
15791
15925
|
let docContext = options.context ?? ["https://gotosocial.org/ns", "https://w3id.org/fep/7aa9"];
|
|
15926
|
+
if (options.context == null) {
|
|
15927
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
15928
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
15929
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
15930
|
+
}
|
|
15792
15931
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
15793
15932
|
if (options.context == null) {
|
|
15794
15933
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -16233,6 +16372,11 @@ var InteractionRule = class {
|
|
|
16233
16372
|
keepFreeFloatingNodes: true
|
|
16234
16373
|
});
|
|
16235
16374
|
let docContext = options.context ?? "https://gotosocial.org/ns";
|
|
16375
|
+
if (options.context == null) {
|
|
16376
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
16377
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
16378
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
16379
|
+
}
|
|
16236
16380
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
16237
16381
|
if (options.context == null) {
|
|
16238
16382
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -16999,6 +17143,11 @@ var LikeAuthorization = class LikeAuthorization extends Object$1 {
|
|
|
16999
17143
|
"https://w3id.org/security/data-integrity/v1",
|
|
17000
17144
|
"https://gotosocial.org/ns"
|
|
17001
17145
|
];
|
|
17146
|
+
if (options.context == null) {
|
|
17147
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
17148
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
17149
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
17150
|
+
}
|
|
17002
17151
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
17003
17152
|
if (options.context == null) {
|
|
17004
17153
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -17253,6 +17402,11 @@ var LikeRequest = class LikeRequest extends Activity {
|
|
|
17253
17402
|
"https://w3id.org/security/data-integrity/v1",
|
|
17254
17403
|
"https://gotosocial.org/ns"
|
|
17255
17404
|
];
|
|
17405
|
+
if (options.context == null) {
|
|
17406
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
17407
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
17408
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
17409
|
+
}
|
|
17256
17410
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
17257
17411
|
if (options.context == null) {
|
|
17258
17412
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -17985,6 +18139,11 @@ var ReplyAuthorization = class ReplyAuthorization extends Object$1 {
|
|
|
17985
18139
|
"https://w3id.org/security/data-integrity/v1",
|
|
17986
18140
|
"https://gotosocial.org/ns"
|
|
17987
18141
|
];
|
|
18142
|
+
if (options.context == null) {
|
|
18143
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
18144
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
18145
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
18146
|
+
}
|
|
17988
18147
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
17989
18148
|
if (options.context == null) {
|
|
17990
18149
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -18239,6 +18398,11 @@ var ReplyRequest = class ReplyRequest extends Activity {
|
|
|
18239
18398
|
"https://w3id.org/security/data-integrity/v1",
|
|
18240
18399
|
"https://gotosocial.org/ns"
|
|
18241
18400
|
];
|
|
18401
|
+
if (options.context == null) {
|
|
18402
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
18403
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
18404
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
18405
|
+
}
|
|
18242
18406
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
18243
18407
|
if (options.context == null) {
|
|
18244
18408
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -18972,6 +19136,11 @@ var QuoteAuthorization = class QuoteAuthorization extends Object$1 {
|
|
|
18972
19136
|
"https://gotosocial.org/ns",
|
|
18973
19137
|
{ "QuoteAuthorization": "https://w3id.org/fep/044f#QuoteAuthorization" }
|
|
18974
19138
|
];
|
|
19139
|
+
if (options.context == null) {
|
|
19140
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
19141
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
19142
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
19143
|
+
}
|
|
18975
19144
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
18976
19145
|
if (options.context == null) {
|
|
18977
19146
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -19256,6 +19425,11 @@ var QuoteRequest = class QuoteRequest extends Activity {
|
|
|
19256
19425
|
}
|
|
19257
19426
|
}
|
|
19258
19427
|
];
|
|
19428
|
+
if (options.context == null) {
|
|
19429
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
19430
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
19431
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
19432
|
+
}
|
|
19259
19433
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
19260
19434
|
if (options.context == null) {
|
|
19261
19435
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -20109,6 +20283,11 @@ var Translation = class {
|
|
|
20109
20283
|
keepFreeFloatingNodes: true
|
|
20110
20284
|
});
|
|
20111
20285
|
let docContext = options.context ?? ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/22cd"];
|
|
20286
|
+
if (options.context == null) {
|
|
20287
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
20288
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
20289
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
20290
|
+
}
|
|
20112
20291
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
20113
20292
|
if (options.context == null) {
|
|
20114
20293
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -20972,6 +21151,11 @@ var FeatureAuthorization = class FeatureAuthorization extends Object$1 {
|
|
|
20972
21151
|
"https://gotosocial.org/ns",
|
|
20973
21152
|
"https://w3id.org/fep/7aa9"
|
|
20974
21153
|
];
|
|
21154
|
+
if (options.context == null) {
|
|
21155
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
21156
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
21157
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
21158
|
+
}
|
|
20975
21159
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
20976
21160
|
if (options.context == null) {
|
|
20977
21161
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -21224,6 +21408,11 @@ var FeatureRequest = class FeatureRequest extends Activity {
|
|
|
21224
21408
|
"https://gotosocial.org/ns",
|
|
21225
21409
|
"https://w3id.org/fep/7aa9"
|
|
21226
21410
|
];
|
|
21411
|
+
if (options.context == null) {
|
|
21412
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
21413
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
21414
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
21415
|
+
}
|
|
21227
21416
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
21228
21417
|
if (options.context == null) {
|
|
21229
21418
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -24645,6 +24834,11 @@ var Collection = class Collection extends Object$1 {
|
|
|
24645
24834
|
}
|
|
24646
24835
|
}
|
|
24647
24836
|
];
|
|
24837
|
+
if (options.context == null) {
|
|
24838
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
24839
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
24840
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
24841
|
+
}
|
|
24648
24842
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
24649
24843
|
if (options.context == null) {
|
|
24650
24844
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -25600,6 +25794,11 @@ var OrderedCollection = class OrderedCollection extends Collection {
|
|
|
25600
25794
|
}
|
|
25601
25795
|
}
|
|
25602
25796
|
];
|
|
25797
|
+
if (options.context == null) {
|
|
25798
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
25799
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
25800
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
25801
|
+
}
|
|
25603
25802
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
25604
25803
|
if (options.context == null) {
|
|
25605
25804
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -25996,6 +26195,11 @@ var FeaturedCollection = class FeaturedCollection extends OrderedCollection {
|
|
|
25996
26195
|
"Hashtag": "as:Hashtag"
|
|
25997
26196
|
}
|
|
25998
26197
|
];
|
|
26198
|
+
if (options.context == null) {
|
|
26199
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
26200
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
26201
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
26202
|
+
}
|
|
25999
26203
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
26000
26204
|
if (options.context == null) {
|
|
26001
26205
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -26765,6 +26969,11 @@ var FeaturedItem = class FeaturedItem extends Object$1 {
|
|
|
26765
26969
|
"https://gotosocial.org/ns",
|
|
26766
26970
|
"https://w3id.org/fep/7aa9"
|
|
26767
26971
|
];
|
|
26972
|
+
if (options.context == null) {
|
|
26973
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
26974
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
26975
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
26976
|
+
}
|
|
26768
26977
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
26769
26978
|
if (options.context == null) {
|
|
26770
26979
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -27100,6 +27309,11 @@ var DidService = class {
|
|
|
27100
27309
|
keepFreeFloatingNodes: true
|
|
27101
27310
|
});
|
|
27102
27311
|
let docContext = options.context ?? "https://www.w3.org/ns/did/v1";
|
|
27312
|
+
if (options.context == null) {
|
|
27313
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
27314
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
27315
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
27316
|
+
}
|
|
27103
27317
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
27104
27318
|
if (options.context == null) {
|
|
27105
27319
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -27303,6 +27517,11 @@ var Export = class Export extends DidService {
|
|
|
27303
27517
|
keepFreeFloatingNodes: true
|
|
27304
27518
|
});
|
|
27305
27519
|
let docContext = options.context ?? "https://www.w3.org/ns/did/v1";
|
|
27520
|
+
if (options.context == null) {
|
|
27521
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
27522
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
27523
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
27524
|
+
}
|
|
27306
27525
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
27307
27526
|
if (options.context == null) {
|
|
27308
27527
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -27880,6 +28099,11 @@ var DataIntegrityProof = class {
|
|
|
27880
28099
|
keepFreeFloatingNodes: true
|
|
27881
28100
|
});
|
|
27882
28101
|
let docContext = options.context ?? "https://w3id.org/security/data-integrity/v1";
|
|
28102
|
+
if (options.context == null) {
|
|
28103
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
28104
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
28105
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
28106
|
+
}
|
|
27883
28107
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
27884
28108
|
if (options.context == null) {
|
|
27885
28109
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -28573,6 +28797,11 @@ var CryptographicKey = class {
|
|
|
28573
28797
|
keepFreeFloatingNodes: true
|
|
28574
28798
|
});
|
|
28575
28799
|
let docContext = options.context ?? "https://w3id.org/security/v1";
|
|
28800
|
+
if (options.context == null) {
|
|
28801
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
28802
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
28803
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
28804
|
+
}
|
|
28576
28805
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
28577
28806
|
if (options.context == null) {
|
|
28578
28807
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -29233,6 +29462,11 @@ var Multikey = class {
|
|
|
29233
29462
|
keepFreeFloatingNodes: true
|
|
29234
29463
|
});
|
|
29235
29464
|
let docContext = options.context ?? "https://w3id.org/security/multikey/v1";
|
|
29465
|
+
if (options.context == null) {
|
|
29466
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
29467
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
29468
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
29469
|
+
}
|
|
29236
29470
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
29237
29471
|
if (options.context == null) {
|
|
29238
29472
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -29618,6 +29852,11 @@ var Agreement = class Agreement extends Object$1 {
|
|
|
29618
29852
|
"hasNumericalValue": "om2:hasNumericalValue"
|
|
29619
29853
|
}
|
|
29620
29854
|
];
|
|
29855
|
+
if (options.context == null) {
|
|
29856
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
29857
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
29858
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
29859
|
+
}
|
|
29621
29860
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
29622
29861
|
if (options.context == null) {
|
|
29623
29862
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -30001,6 +30240,11 @@ var Commitment = class {
|
|
|
30001
30240
|
"hasUnit": "om2:hasUnit",
|
|
30002
30241
|
"hasNumericalValue": "om2:hasNumericalValue"
|
|
30003
30242
|
}];
|
|
30243
|
+
if (options.context == null) {
|
|
30244
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
30245
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
30246
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
30247
|
+
}
|
|
30004
30248
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
30005
30249
|
if (options.context == null) {
|
|
30006
30250
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -30473,6 +30717,11 @@ var Intent = class {
|
|
|
30473
30717
|
"hasUnit": "om2:hasUnit",
|
|
30474
30718
|
"hasNumericalValue": "om2:hasNumericalValue"
|
|
30475
30719
|
}];
|
|
30720
|
+
if (options.context == null) {
|
|
30721
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
30722
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
30723
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
30724
|
+
}
|
|
30476
30725
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
30477
30726
|
if (options.context == null) {
|
|
30478
30727
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -30970,6 +31219,11 @@ var Proposal = class Proposal extends Object$1 {
|
|
|
30970
31219
|
"hasNumericalValue": "om2:hasNumericalValue"
|
|
30971
31220
|
}
|
|
30972
31221
|
];
|
|
31222
|
+
if (options.context == null) {
|
|
31223
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
31224
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
31225
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
31226
|
+
}
|
|
30973
31227
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
30974
31228
|
if (options.context == null) {
|
|
30975
31229
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -31243,6 +31497,11 @@ var Accept = class Accept extends Activity {
|
|
|
31243
31497
|
"https://w3id.org/security/data-integrity/v1",
|
|
31244
31498
|
"https://gotosocial.org/ns"
|
|
31245
31499
|
];
|
|
31500
|
+
if (options.context == null) {
|
|
31501
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
31502
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
31503
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
31504
|
+
}
|
|
31246
31505
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
31247
31506
|
if (options.context == null) {
|
|
31248
31507
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -31439,6 +31698,11 @@ var Add = class Add extends Activity {
|
|
|
31439
31698
|
"https://w3id.org/security/data-integrity/v1",
|
|
31440
31699
|
"https://gotosocial.org/ns"
|
|
31441
31700
|
];
|
|
31701
|
+
if (options.context == null) {
|
|
31702
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
31703
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
31704
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
31705
|
+
}
|
|
31442
31706
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
31443
31707
|
if (options.context == null) {
|
|
31444
31708
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -31662,6 +31926,11 @@ var Announce = class Announce extends Activity {
|
|
|
31662
31926
|
}
|
|
31663
31927
|
}
|
|
31664
31928
|
];
|
|
31929
|
+
if (options.context == null) {
|
|
31930
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
31931
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
31932
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
31933
|
+
}
|
|
31665
31934
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
31666
31935
|
if (options.context == null) {
|
|
31667
31936
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -31825,6 +32094,7 @@ var Application = class Application extends Object$1 {
|
|
|
31825
32094
|
#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = /* @__PURE__ */ new Set();
|
|
31826
32095
|
#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
|
|
31827
32096
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
|
32097
|
+
#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
31828
32098
|
/**
|
|
31829
32099
|
* Constructs a new instance of Application with the given values.
|
|
31830
32100
|
* @param values The values to initialize the instance with.
|
|
@@ -31946,6 +32216,8 @@ var Application = class Application extends Object$1 {
|
|
|
31946
32216
|
else throw new TypeError("The followedMessage must be of type string.");
|
|
31947
32217
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
31948
32218
|
else throw new TypeError("The cat must be of type boolean.");
|
|
32219
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
32220
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
31949
32221
|
}
|
|
31950
32222
|
/**
|
|
31951
32223
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -32127,6 +32399,9 @@ var Application = class Application extends Object$1 {
|
|
|
32127
32399
|
clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.slice();
|
|
32128
32400
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
32129
32401
|
else throw new TypeError("The cat must be of type boolean.");
|
|
32402
|
+
clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.slice();
|
|
32403
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
32404
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
32130
32405
|
return clone;
|
|
32131
32406
|
}
|
|
32132
32407
|
/** A short username which may be used to refer to the actor,
|
|
@@ -35861,6 +36136,18 @@ var Application = class Application extends Object$1 {
|
|
|
35861
36136
|
if (this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length < 1) return null;
|
|
35862
36137
|
return this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
35863
36138
|
}
|
|
36139
|
+
/** The URI of the license this actor prefers for the new objects it creates,
|
|
36140
|
+
* as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
36141
|
+
* as the default `license` of a new object and let the user choose another.
|
|
36142
|
+
*
|
|
36143
|
+
* This is not a fallback license: an object without its own `license` is not
|
|
36144
|
+
* licensed under its author's preferred license.
|
|
36145
|
+
*/
|
|
36146
|
+
get preferredLicense() {
|
|
36147
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
36148
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length < 1) return null;
|
|
36149
|
+
return this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
36150
|
+
}
|
|
35864
36151
|
/**
|
|
35865
36152
|
* Converts this object to a JSON-LD structure.
|
|
35866
36153
|
* @param options The options to use.
|
|
@@ -36132,6 +36419,12 @@ var Application = class Application extends Object$1 {
|
|
|
36132
36419
|
compactItems.push(item);
|
|
36133
36420
|
}
|
|
36134
36421
|
if (compactItems.length > 0) result["isCat"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
36422
|
+
compactItems = [];
|
|
36423
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
36424
|
+
const item = formatIri(v);
|
|
36425
|
+
compactItems.push(item);
|
|
36426
|
+
}
|
|
36427
|
+
if (compactItems.length > 0) result["preferredLicense"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
36135
36428
|
result["type"] = "Application";
|
|
36136
36429
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
36137
36430
|
result["@context"] = [
|
|
@@ -36454,6 +36747,17 @@ var Application = class Application extends Object$1 {
|
|
|
36454
36747
|
array.push(element);
|
|
36455
36748
|
}
|
|
36456
36749
|
if (array.length > 0) values["https://misskey-hub.net/ns#isCat"] = array;
|
|
36750
|
+
array = [];
|
|
36751
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
36752
|
+
let element = { "@id": formatIri(v) };
|
|
36753
|
+
if (Array.isArray(element)) {
|
|
36754
|
+
if (element.length < 1) continue;
|
|
36755
|
+
if (element.length == 1) element = element[0];
|
|
36756
|
+
}
|
|
36757
|
+
if (typeof element === "undefined") continue;
|
|
36758
|
+
array.push(element);
|
|
36759
|
+
}
|
|
36760
|
+
if (array.length > 0) values["https://w3id.org/fep/6757#preferredLicense"] = array;
|
|
36457
36761
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Application"];
|
|
36458
36762
|
if (this.id != null) values["@id"] = formatIri(this.id);
|
|
36459
36763
|
if (options.format === "expand") return await jsonld.expand(values, {
|
|
@@ -36505,6 +36809,11 @@ var Application = class Application extends Object$1 {
|
|
|
36505
36809
|
"isCat": "misskey:isCat"
|
|
36506
36810
|
}
|
|
36507
36811
|
];
|
|
36812
|
+
if (options.context == null) {
|
|
36813
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
36814
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
36815
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
36816
|
+
}
|
|
36508
36817
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
36509
36818
|
if (options.context == null) {
|
|
36510
36819
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -36523,6 +36832,7 @@ var Application = class Application extends Object$1 {
|
|
|
36523
36832
|
isCompactable() {
|
|
36524
36833
|
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null && this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0) return false;
|
|
36525
36834
|
if (this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service != null && this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.length > 0) return false;
|
|
36835
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense != null && this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length > 0) return false;
|
|
36526
36836
|
return super.isCompactable();
|
|
36527
36837
|
}
|
|
36528
36838
|
/**
|
|
@@ -37057,6 +37367,19 @@ var Application = class Application extends Object$1 {
|
|
|
37057
37367
|
_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
|
|
37058
37368
|
}
|
|
37059
37369
|
instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
|
|
37370
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
37371
|
+
let _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array = values["https://w3id.org/fep/6757#preferredLicense"];
|
|
37372
|
+
for (const v of _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array == null ? [] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array.length === 1 && "@list" in _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0] ? _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0]["@list"] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array) {
|
|
37373
|
+
if (v == null) continue;
|
|
37374
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
37375
|
+
if (typeof decoded === "undefined") {
|
|
37376
|
+
shouldCacheJsonLd = false;
|
|
37377
|
+
continue;
|
|
37378
|
+
}
|
|
37379
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
37380
|
+
_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.push(decoded);
|
|
37381
|
+
}
|
|
37382
|
+
instance.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense;
|
|
37060
37383
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
37061
37384
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
37062
37385
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -37198,6 +37521,11 @@ var Application = class Application extends Object$1 {
|
|
|
37198
37521
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
37199
37522
|
} : v);
|
|
37200
37523
|
if (_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length == 1) proxy.cat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
37524
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.map((v) => v instanceof URL ? {
|
|
37525
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
37526
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
37527
|
+
} : v);
|
|
37528
|
+
if (_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length == 1) proxy.preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
37201
37529
|
return proxy;
|
|
37202
37530
|
}
|
|
37203
37531
|
};
|
|
@@ -37285,6 +37613,11 @@ var IntransitiveActivity = class IntransitiveActivity extends Activity {
|
|
|
37285
37613
|
"https://w3id.org/security/data-integrity/v1",
|
|
37286
37614
|
"https://gotosocial.org/ns"
|
|
37287
37615
|
];
|
|
37616
|
+
if (options.context == null) {
|
|
37617
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
37618
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
37619
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
37620
|
+
}
|
|
37288
37621
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
37289
37622
|
if (options.context == null) {
|
|
37290
37623
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -37482,6 +37815,11 @@ var Arrive = class Arrive extends IntransitiveActivity {
|
|
|
37482
37815
|
"https://w3id.org/security/data-integrity/v1",
|
|
37483
37816
|
"https://gotosocial.org/ns"
|
|
37484
37817
|
];
|
|
37818
|
+
if (options.context == null) {
|
|
37819
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
37820
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
37821
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
37822
|
+
}
|
|
37485
37823
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
37486
37824
|
if (options.context == null) {
|
|
37487
37825
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -38305,6 +38643,11 @@ var Article = class Article extends Object$1 {
|
|
|
38305
38643
|
}
|
|
38306
38644
|
}
|
|
38307
38645
|
];
|
|
38646
|
+
if (options.context == null) {
|
|
38647
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
38648
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
38649
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
38650
|
+
}
|
|
38308
38651
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
38309
38652
|
if (options.context == null) {
|
|
38310
38653
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -38689,6 +39032,11 @@ var Document = class Document extends Object$1 {
|
|
|
38689
39032
|
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
38690
39033
|
"https://gotosocial.org/ns"
|
|
38691
39034
|
];
|
|
39035
|
+
if (options.context == null) {
|
|
39036
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
39037
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
39038
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
39039
|
+
}
|
|
38692
39040
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
38693
39041
|
if (options.context == null) {
|
|
38694
39042
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -38956,6 +39304,11 @@ var Audio = class Audio extends Document {
|
|
|
38956
39304
|
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
38957
39305
|
"https://gotosocial.org/ns"
|
|
38958
39306
|
];
|
|
39307
|
+
if (options.context == null) {
|
|
39308
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
39309
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
39310
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
39311
|
+
}
|
|
38959
39312
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
38960
39313
|
if (options.context == null) {
|
|
38961
39314
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -39149,6 +39502,11 @@ var Ignore = class Ignore extends Activity {
|
|
|
39149
39502
|
"https://w3id.org/security/data-integrity/v1",
|
|
39150
39503
|
"https://gotosocial.org/ns"
|
|
39151
39504
|
];
|
|
39505
|
+
if (options.context == null) {
|
|
39506
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
39507
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
39508
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
39509
|
+
}
|
|
39152
39510
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
39153
39511
|
if (options.context == null) {
|
|
39154
39512
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -39345,6 +39703,11 @@ var Block = class Block extends Ignore {
|
|
|
39345
39703
|
"https://w3id.org/security/data-integrity/v1",
|
|
39346
39704
|
"https://gotosocial.org/ns"
|
|
39347
39705
|
];
|
|
39706
|
+
if (options.context == null) {
|
|
39707
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
39708
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
39709
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
39710
|
+
}
|
|
39348
39711
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
39349
39712
|
if (options.context == null) {
|
|
39350
39713
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -40384,6 +40747,11 @@ var CollectionPage = class CollectionPage extends Collection {
|
|
|
40384
40747
|
}
|
|
40385
40748
|
}
|
|
40386
40749
|
];
|
|
40750
|
+
if (options.context == null) {
|
|
40751
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
40752
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
40753
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
40754
|
+
}
|
|
40387
40755
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
40388
40756
|
if (options.context == null) {
|
|
40389
40757
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -40686,6 +41054,11 @@ var Create = class Create extends Activity {
|
|
|
40686
41054
|
}
|
|
40687
41055
|
}
|
|
40688
41056
|
];
|
|
41057
|
+
if (options.context == null) {
|
|
41058
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
41059
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
41060
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
41061
|
+
}
|
|
40689
41062
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
40690
41063
|
if (options.context == null) {
|
|
40691
41064
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -40905,6 +41278,11 @@ var Delete = class Delete extends Activity {
|
|
|
40905
41278
|
}
|
|
40906
41279
|
}
|
|
40907
41280
|
];
|
|
41281
|
+
if (options.context == null) {
|
|
41282
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
41283
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
41284
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
41285
|
+
}
|
|
40908
41286
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
40909
41287
|
if (options.context == null) {
|
|
40910
41288
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -41101,6 +41479,11 @@ var Dislike = class Dislike extends Activity {
|
|
|
41101
41479
|
"Emoji": "toot:Emoji"
|
|
41102
41480
|
}
|
|
41103
41481
|
];
|
|
41482
|
+
if (options.context == null) {
|
|
41483
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
41484
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
41485
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
41486
|
+
}
|
|
41104
41487
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
41105
41488
|
if (options.context == null) {
|
|
41106
41489
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -41582,6 +41965,11 @@ var Endpoints = class {
|
|
|
41582
41965
|
keepFreeFloatingNodes: true
|
|
41583
41966
|
});
|
|
41584
41967
|
let docContext = options.context ?? "https://www.w3.org/ns/activitystreams";
|
|
41968
|
+
if (options.context == null) {
|
|
41969
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
41970
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
41971
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
41972
|
+
}
|
|
41585
41973
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
41586
41974
|
if (options.context == null) {
|
|
41587
41975
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -41910,6 +42298,11 @@ var Event = class Event extends Object$1 {
|
|
|
41910
42298
|
"https://w3id.org/security/data-integrity/v1",
|
|
41911
42299
|
"https://gotosocial.org/ns"
|
|
41912
42300
|
];
|
|
42301
|
+
if (options.context == null) {
|
|
42302
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
42303
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
42304
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
42305
|
+
}
|
|
41913
42306
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
41914
42307
|
if (options.context == null) {
|
|
41915
42308
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -42104,6 +42497,11 @@ var Flag = class Flag extends Activity {
|
|
|
42104
42497
|
"https://w3id.org/security/data-integrity/v1",
|
|
42105
42498
|
"https://gotosocial.org/ns"
|
|
42106
42499
|
];
|
|
42500
|
+
if (options.context == null) {
|
|
42501
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
42502
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
42503
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
42504
|
+
}
|
|
42107
42505
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
42108
42506
|
if (options.context == null) {
|
|
42109
42507
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -42302,6 +42700,11 @@ var Follow = class Follow extends Activity {
|
|
|
42302
42700
|
"https://w3id.org/security/multikey/v1",
|
|
42303
42701
|
"https://gotosocial.org/ns"
|
|
42304
42702
|
];
|
|
42703
|
+
if (options.context == null) {
|
|
42704
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
42705
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
42706
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
42707
|
+
}
|
|
42305
42708
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
42306
42709
|
if (options.context == null) {
|
|
42307
42710
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -42465,6 +42868,7 @@ var Group = class Group extends Object$1 {
|
|
|
42465
42868
|
#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = /* @__PURE__ */ new Set();
|
|
42466
42869
|
#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
|
|
42467
42870
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
|
42871
|
+
#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
42468
42872
|
/**
|
|
42469
42873
|
* Constructs a new instance of Group with the given values.
|
|
42470
42874
|
* @param values The values to initialize the instance with.
|
|
@@ -42586,6 +42990,8 @@ var Group = class Group extends Object$1 {
|
|
|
42586
42990
|
else throw new TypeError("The followedMessage must be of type string.");
|
|
42587
42991
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
42588
42992
|
else throw new TypeError("The cat must be of type boolean.");
|
|
42993
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
42994
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
42589
42995
|
}
|
|
42590
42996
|
/**
|
|
42591
42997
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -42767,6 +43173,9 @@ var Group = class Group extends Object$1 {
|
|
|
42767
43173
|
clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.slice();
|
|
42768
43174
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
42769
43175
|
else throw new TypeError("The cat must be of type boolean.");
|
|
43176
|
+
clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.slice();
|
|
43177
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
43178
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
42770
43179
|
return clone;
|
|
42771
43180
|
}
|
|
42772
43181
|
/** A short username which may be used to refer to the actor,
|
|
@@ -46501,6 +46910,18 @@ var Group = class Group extends Object$1 {
|
|
|
46501
46910
|
if (this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length < 1) return null;
|
|
46502
46911
|
return this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
46503
46912
|
}
|
|
46913
|
+
/** The URI of the license this actor prefers for the new objects it creates,
|
|
46914
|
+
* as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
46915
|
+
* as the default `license` of a new object and let the user choose another.
|
|
46916
|
+
*
|
|
46917
|
+
* This is not a fallback license: an object without its own `license` is not
|
|
46918
|
+
* licensed under its author's preferred license.
|
|
46919
|
+
*/
|
|
46920
|
+
get preferredLicense() {
|
|
46921
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
46922
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length < 1) return null;
|
|
46923
|
+
return this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
46924
|
+
}
|
|
46504
46925
|
/**
|
|
46505
46926
|
* Converts this object to a JSON-LD structure.
|
|
46506
46927
|
* @param options The options to use.
|
|
@@ -46772,6 +47193,12 @@ var Group = class Group extends Object$1 {
|
|
|
46772
47193
|
compactItems.push(item);
|
|
46773
47194
|
}
|
|
46774
47195
|
if (compactItems.length > 0) result["isCat"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
47196
|
+
compactItems = [];
|
|
47197
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
47198
|
+
const item = formatIri(v);
|
|
47199
|
+
compactItems.push(item);
|
|
47200
|
+
}
|
|
47201
|
+
if (compactItems.length > 0) result["preferredLicense"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
46775
47202
|
result["type"] = "Group";
|
|
46776
47203
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
46777
47204
|
result["@context"] = [
|
|
@@ -47094,6 +47521,17 @@ var Group = class Group extends Object$1 {
|
|
|
47094
47521
|
array.push(element);
|
|
47095
47522
|
}
|
|
47096
47523
|
if (array.length > 0) values["https://misskey-hub.net/ns#isCat"] = array;
|
|
47524
|
+
array = [];
|
|
47525
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
47526
|
+
let element = { "@id": formatIri(v) };
|
|
47527
|
+
if (Array.isArray(element)) {
|
|
47528
|
+
if (element.length < 1) continue;
|
|
47529
|
+
if (element.length == 1) element = element[0];
|
|
47530
|
+
}
|
|
47531
|
+
if (typeof element === "undefined") continue;
|
|
47532
|
+
array.push(element);
|
|
47533
|
+
}
|
|
47534
|
+
if (array.length > 0) values["https://w3id.org/fep/6757#preferredLicense"] = array;
|
|
47097
47535
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Group"];
|
|
47098
47536
|
if (this.id != null) values["@id"] = formatIri(this.id);
|
|
47099
47537
|
if (options.format === "expand") return await jsonld.expand(values, {
|
|
@@ -47145,6 +47583,11 @@ var Group = class Group extends Object$1 {
|
|
|
47145
47583
|
"isCat": "misskey:isCat"
|
|
47146
47584
|
}
|
|
47147
47585
|
];
|
|
47586
|
+
if (options.context == null) {
|
|
47587
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
47588
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
47589
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
47590
|
+
}
|
|
47148
47591
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
47149
47592
|
if (options.context == null) {
|
|
47150
47593
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -47163,6 +47606,7 @@ var Group = class Group extends Object$1 {
|
|
|
47163
47606
|
isCompactable() {
|
|
47164
47607
|
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null && this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0) return false;
|
|
47165
47608
|
if (this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service != null && this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.length > 0) return false;
|
|
47609
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense != null && this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length > 0) return false;
|
|
47166
47610
|
return super.isCompactable();
|
|
47167
47611
|
}
|
|
47168
47612
|
/**
|
|
@@ -47697,6 +48141,19 @@ var Group = class Group extends Object$1 {
|
|
|
47697
48141
|
_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
|
|
47698
48142
|
}
|
|
47699
48143
|
instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
|
|
48144
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
48145
|
+
let _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array = values["https://w3id.org/fep/6757#preferredLicense"];
|
|
48146
|
+
for (const v of _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array == null ? [] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array.length === 1 && "@list" in _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0] ? _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0]["@list"] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array) {
|
|
48147
|
+
if (v == null) continue;
|
|
48148
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
48149
|
+
if (typeof decoded === "undefined") {
|
|
48150
|
+
shouldCacheJsonLd = false;
|
|
48151
|
+
continue;
|
|
48152
|
+
}
|
|
48153
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
48154
|
+
_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.push(decoded);
|
|
48155
|
+
}
|
|
48156
|
+
instance.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense;
|
|
47700
48157
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
47701
48158
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
47702
48159
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -47838,6 +48295,11 @@ var Group = class Group extends Object$1 {
|
|
|
47838
48295
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
47839
48296
|
} : v);
|
|
47840
48297
|
if (_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length == 1) proxy.cat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
48298
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.map((v) => v instanceof URL ? {
|
|
48299
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
48300
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
48301
|
+
} : v);
|
|
48302
|
+
if (_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length == 1) proxy.preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
47841
48303
|
return proxy;
|
|
47842
48304
|
}
|
|
47843
48305
|
};
|
|
@@ -47917,6 +48379,7 @@ var Link = class Link {
|
|
|
47917
48379
|
#_2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width = [];
|
|
47918
48380
|
#_gCVTegXxWWCw6wWRxa1QF65zusg_preview = [];
|
|
47919
48381
|
#_trust_gCVTegXxWWCw6wWRxa1QF65zusg_preview = /* @__PURE__ */ new Set();
|
|
48382
|
+
#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = [];
|
|
47920
48383
|
/**
|
|
47921
48384
|
* Constructs a new instance of Link with the given values.
|
|
47922
48385
|
* @param values The values to initialize the instance with.
|
|
@@ -47962,6 +48425,8 @@ var Link = class Link {
|
|
|
47962
48425
|
this.#_gCVTegXxWWCw6wWRxa1QF65zusg_preview = values.previews.slice();
|
|
47963
48426
|
for (let i = 0; i < values.previews.length; i++) this.#_trust_gCVTegXxWWCw6wWRxa1QF65zusg_preview.add(i);
|
|
47964
48427
|
} else throw new TypeError("The previews must be an array of type Link | Object | URL.");
|
|
48428
|
+
if ("licenses" in values && values.licenses != null) if (Array.isArray(values.licenses) && values.licenses.every((v) => v instanceof URL)) this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = values.licenses.slice();
|
|
48429
|
+
else throw new TypeError("The licenses must be an array of type URL.");
|
|
47965
48430
|
}
|
|
47966
48431
|
/**
|
|
47967
48432
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -48028,6 +48493,9 @@ var Link = class Link {
|
|
|
48028
48493
|
clone.#_trust_gCVTegXxWWCw6wWRxa1QF65zusg_preview = /* @__PURE__ */ new Set();
|
|
48029
48494
|
for (let i = 0; i < values.previews.length; i++) clone.#_trust_gCVTegXxWWCw6wWRxa1QF65zusg_preview.add(i);
|
|
48030
48495
|
} else throw new TypeError("The previews must be an array of type Link | Object | URL.");
|
|
48496
|
+
clone.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.slice();
|
|
48497
|
+
if ("licenses" in values && values.licenses != null) if (Array.isArray(values.licenses) && values.licenses.every((v) => v instanceof URL)) clone.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = values.licenses.slice();
|
|
48498
|
+
else throw new TypeError("The licenses must be an array of type URL.");
|
|
48031
48499
|
return clone;
|
|
48032
48500
|
}
|
|
48033
48501
|
/** The target resource pointed to by a {@link Link}.
|
|
@@ -48356,6 +48824,22 @@ var Link = class Link {
|
|
|
48356
48824
|
yield v;
|
|
48357
48825
|
}
|
|
48358
48826
|
}
|
|
48827
|
+
/** The copyright licenses for the linked resource, as defined by
|
|
48828
|
+
* [FEP-6757](https://w3id.org/fep/6757). Each license is identified by its
|
|
48829
|
+
* URI, such as <https://creativecommons.org/publicdomain/mark/1.0/>; license
|
|
48830
|
+
* names and SPDX short identifiers are not license URIs. Multiple values are
|
|
48831
|
+
* alternatives that a consumer may choose from; their order has no meaning.
|
|
48832
|
+
*
|
|
48833
|
+
* An empty list means the link carries no license metadata. Fedify does not
|
|
48834
|
+
* synthesize a default license for it.
|
|
48835
|
+
*
|
|
48836
|
+
* The `https://schema.org/license` and
|
|
48837
|
+
* `http://creativecommons.org/ns#license` properties are read as synonyms
|
|
48838
|
+
* when this property is absent, but only this property is written.
|
|
48839
|
+
*/
|
|
48840
|
+
get licenses() {
|
|
48841
|
+
return this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
48842
|
+
}
|
|
48359
48843
|
/**
|
|
48360
48844
|
* Converts this object to a JSON-LD structure.
|
|
48361
48845
|
* @param options The options to use.
|
|
@@ -48441,6 +48925,12 @@ var Link = class Link {
|
|
|
48441
48925
|
compactItems.push(item);
|
|
48442
48926
|
}
|
|
48443
48927
|
if (compactItems.length > 0) result["preview"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
48928
|
+
compactItems = [];
|
|
48929
|
+
for (const v of this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d) {
|
|
48930
|
+
const item = formatIri(v);
|
|
48931
|
+
compactItems.push(item);
|
|
48932
|
+
}
|
|
48933
|
+
if (compactItems.length > 0) result["license"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
48444
48934
|
result["type"] = "Link";
|
|
48445
48935
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
48446
48936
|
result["@context"] = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/ef61"];
|
|
@@ -48556,6 +49046,17 @@ var Link = class Link {
|
|
|
48556
49046
|
array.push(element);
|
|
48557
49047
|
}
|
|
48558
49048
|
if (array.length > 0) values["https://www.w3.org/ns/activitystreams#preview"] = array;
|
|
49049
|
+
array = [];
|
|
49050
|
+
for (const v of this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d) {
|
|
49051
|
+
let element = { "@id": formatIri(v) };
|
|
49052
|
+
if (Array.isArray(element)) {
|
|
49053
|
+
if (element.length < 1) continue;
|
|
49054
|
+
if (element.length == 1) element = element[0];
|
|
49055
|
+
}
|
|
49056
|
+
if (typeof element === "undefined") continue;
|
|
49057
|
+
array.push(element);
|
|
49058
|
+
}
|
|
49059
|
+
if (array.length > 0) values["http://purl.org/dc/terms/license"] = array;
|
|
48559
49060
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Link"];
|
|
48560
49061
|
if (this.id != null) values["@id"] = formatIri(this.id);
|
|
48561
49062
|
if (options.format === "expand") return await jsonld.expand(values, {
|
|
@@ -48563,6 +49064,11 @@ var Link = class Link {
|
|
|
48563
49064
|
keepFreeFloatingNodes: true
|
|
48564
49065
|
});
|
|
48565
49066
|
let docContext = options.context ?? ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/ef61"];
|
|
49067
|
+
if (options.context == null) {
|
|
49068
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
49069
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
49070
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
49071
|
+
}
|
|
48566
49072
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
48567
49073
|
if (options.context == null) {
|
|
48568
49074
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -48577,6 +49083,7 @@ var Link = class Link {
|
|
|
48577
49083
|
}
|
|
48578
49084
|
isCompactable() {
|
|
48579
49085
|
if (this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name != null && this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.length > 0) return false;
|
|
49086
|
+
if (this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d != null && this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 0) return false;
|
|
48580
49087
|
return true;
|
|
48581
49088
|
}
|
|
48582
49089
|
/**
|
|
@@ -48852,6 +49359,21 @@ var Link = class Link {
|
|
|
48852
49359
|
_gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(decoded);
|
|
48853
49360
|
}
|
|
48854
49361
|
instance.#_gCVTegXxWWCw6wWRxa1QF65zusg_preview = _gCVTegXxWWCw6wWRxa1QF65zusg_preview;
|
|
49362
|
+
const _2rzkBRS4gNPrkJk9DohHAMUAxA2d = [];
|
|
49363
|
+
let _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["http://purl.org/dc/terms/license"];
|
|
49364
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null || _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length < 1) _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["https://schema.org/license"];
|
|
49365
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null || _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length < 1) _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array = values["http://creativecommons.org/ns#license"];
|
|
49366
|
+
for (const v of _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array == null ? [] : _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array.length === 1 && "@list" in _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array[0] ? _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array[0]["@list"] : _2rzkBRS4gNPrkJk9DohHAMUAxA2d__array) {
|
|
49367
|
+
if (v == null) continue;
|
|
49368
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
49369
|
+
if (typeof decoded === "undefined") {
|
|
49370
|
+
shouldCacheJsonLd = false;
|
|
49371
|
+
continue;
|
|
49372
|
+
}
|
|
49373
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
49374
|
+
_2rzkBRS4gNPrkJk9DohHAMUAxA2d.push(decoded);
|
|
49375
|
+
}
|
|
49376
|
+
instance.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d = _2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
48855
49377
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
48856
49378
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
48857
49379
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -48918,6 +49440,11 @@ var Link = class Link {
|
|
|
48918
49440
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
48919
49441
|
} : v);
|
|
48920
49442
|
if (_gCVTegXxWWCw6wWRxa1QF65zusg_preview.length > 1 || !("preview" in proxy) && _gCVTegXxWWCw6wWRxa1QF65zusg_preview.length > 0) proxy.previews = _gCVTegXxWWCw6wWRxa1QF65zusg_preview;
|
|
49443
|
+
const _2rzkBRS4gNPrkJk9DohHAMUAxA2d = this.#_2rzkBRS4gNPrkJk9DohHAMUAxA2d.map((v) => v instanceof URL ? {
|
|
49444
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
49445
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
49446
|
+
} : v);
|
|
49447
|
+
if (_2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 1 || !("license" in proxy) && _2rzkBRS4gNPrkJk9DohHAMUAxA2d.length > 0) proxy.licenses = _2rzkBRS4gNPrkJk9DohHAMUAxA2d;
|
|
48921
49448
|
return proxy;
|
|
48922
49449
|
}
|
|
48923
49450
|
};
|
|
@@ -49011,6 +49538,11 @@ var Hashtag = class Hashtag extends Link {
|
|
|
49011
49538
|
keepFreeFloatingNodes: true
|
|
49012
49539
|
});
|
|
49013
49540
|
let docContext = options.context ?? ["https://www.w3.org/ns/activitystreams", { "Hashtag": "as:Hashtag" }];
|
|
49541
|
+
if (options.context == null) {
|
|
49542
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
49543
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
49544
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
49545
|
+
}
|
|
49014
49546
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
49015
49547
|
if (options.context == null) {
|
|
49016
49548
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -49216,6 +49748,11 @@ var Image = class Image extends Document {
|
|
|
49216
49748
|
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
49217
49749
|
"https://gotosocial.org/ns"
|
|
49218
49750
|
];
|
|
49751
|
+
if (options.context == null) {
|
|
49752
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
49753
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
49754
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
49755
|
+
}
|
|
49219
49756
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
49220
49757
|
if (options.context == null) {
|
|
49221
49758
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -49410,6 +49947,11 @@ var Offer = class Offer extends Activity {
|
|
|
49410
49947
|
"https://w3id.org/security/data-integrity/v1",
|
|
49411
49948
|
"https://gotosocial.org/ns"
|
|
49412
49949
|
];
|
|
49950
|
+
if (options.context == null) {
|
|
49951
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
49952
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
49953
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
49954
|
+
}
|
|
49413
49955
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
49414
49956
|
if (options.context == null) {
|
|
49415
49957
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -49604,6 +50146,11 @@ var Invite = class Invite extends Offer {
|
|
|
49604
50146
|
"https://w3id.org/security/data-integrity/v1",
|
|
49605
50147
|
"https://gotosocial.org/ns"
|
|
49606
50148
|
];
|
|
50149
|
+
if (options.context == null) {
|
|
50150
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
50151
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
50152
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
50153
|
+
}
|
|
49607
50154
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
49608
50155
|
if (options.context == null) {
|
|
49609
50156
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -49797,6 +50344,11 @@ var Join = class Join extends Activity {
|
|
|
49797
50344
|
"https://w3id.org/security/data-integrity/v1",
|
|
49798
50345
|
"https://gotosocial.org/ns"
|
|
49799
50346
|
];
|
|
50347
|
+
if (options.context == null) {
|
|
50348
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
50349
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
50350
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
50351
|
+
}
|
|
49800
50352
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
49801
50353
|
if (options.context == null) {
|
|
49802
50354
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -49990,6 +50542,11 @@ var Leave = class Leave extends Activity {
|
|
|
49990
50542
|
"https://w3id.org/security/data-integrity/v1",
|
|
49991
50543
|
"https://gotosocial.org/ns"
|
|
49992
50544
|
];
|
|
50545
|
+
if (options.context == null) {
|
|
50546
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
50547
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
50548
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
50549
|
+
}
|
|
49993
50550
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
49994
50551
|
if (options.context == null) {
|
|
49995
50552
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -50187,6 +50744,11 @@ var Like = class Like extends Activity {
|
|
|
50187
50744
|
"Emoji": "toot:Emoji"
|
|
50188
50745
|
}
|
|
50189
50746
|
];
|
|
50747
|
+
if (options.context == null) {
|
|
50748
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
50749
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
50750
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
50751
|
+
}
|
|
50190
50752
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
50191
50753
|
if (options.context == null) {
|
|
50192
50754
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -50379,6 +50941,11 @@ var Listen = class Listen extends Activity {
|
|
|
50379
50941
|
"https://w3id.org/security/data-integrity/v1",
|
|
50380
50942
|
"https://gotosocial.org/ns"
|
|
50381
50943
|
];
|
|
50944
|
+
if (options.context == null) {
|
|
50945
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
50946
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
50947
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
50948
|
+
}
|
|
50382
50949
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
50383
50950
|
if (options.context == null) {
|
|
50384
50951
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -50577,6 +51144,11 @@ var Mention = class Mention extends Link {
|
|
|
50577
51144
|
keepFreeFloatingNodes: true
|
|
50578
51145
|
});
|
|
50579
51146
|
let docContext = options.context ?? "https://www.w3.org/ns/activitystreams";
|
|
51147
|
+
if (options.context == null) {
|
|
51148
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
51149
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
51150
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
51151
|
+
}
|
|
50580
51152
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
50581
51153
|
if (options.context == null) {
|
|
50582
51154
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -50768,6 +51340,11 @@ var Move = class Move extends Activity {
|
|
|
50768
51340
|
"https://w3id.org/security/data-integrity/v1",
|
|
50769
51341
|
"https://gotosocial.org/ns"
|
|
50770
51342
|
];
|
|
51343
|
+
if (options.context == null) {
|
|
51344
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
51345
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
51346
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
51347
|
+
}
|
|
50771
51348
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
50772
51349
|
if (options.context == null) {
|
|
50773
51350
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -51592,6 +52169,11 @@ var Note = class Note extends Object$1 {
|
|
|
51592
52169
|
}
|
|
51593
52170
|
}
|
|
51594
52171
|
];
|
|
52172
|
+
if (options.context == null) {
|
|
52173
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
52174
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
52175
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
52176
|
+
}
|
|
51595
52177
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
51596
52178
|
if (options.context == null) {
|
|
51597
52179
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -52243,6 +52825,11 @@ var OrderedCollectionPage = class OrderedCollectionPage extends CollectionPage {
|
|
|
52243
52825
|
}
|
|
52244
52826
|
}
|
|
52245
52827
|
];
|
|
52828
|
+
if (options.context == null) {
|
|
52829
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
52830
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
52831
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
52832
|
+
}
|
|
52246
52833
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
52247
52834
|
if (options.context == null) {
|
|
52248
52835
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -52528,6 +53115,7 @@ var Organization = class Organization extends Object$1 {
|
|
|
52528
53115
|
#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = /* @__PURE__ */ new Set();
|
|
52529
53116
|
#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
|
|
52530
53117
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
|
53118
|
+
#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
52531
53119
|
/**
|
|
52532
53120
|
* Constructs a new instance of Organization with the given values.
|
|
52533
53121
|
* @param values The values to initialize the instance with.
|
|
@@ -52649,6 +53237,8 @@ var Organization = class Organization extends Object$1 {
|
|
|
52649
53237
|
else throw new TypeError("The followedMessage must be of type string.");
|
|
52650
53238
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
52651
53239
|
else throw new TypeError("The cat must be of type boolean.");
|
|
53240
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
53241
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
52652
53242
|
}
|
|
52653
53243
|
/**
|
|
52654
53244
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -52830,6 +53420,9 @@ var Organization = class Organization extends Object$1 {
|
|
|
52830
53420
|
clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.slice();
|
|
52831
53421
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
52832
53422
|
else throw new TypeError("The cat must be of type boolean.");
|
|
53423
|
+
clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.slice();
|
|
53424
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
53425
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
52833
53426
|
return clone;
|
|
52834
53427
|
}
|
|
52835
53428
|
/** A short username which may be used to refer to the actor,
|
|
@@ -56564,6 +57157,18 @@ var Organization = class Organization extends Object$1 {
|
|
|
56564
57157
|
if (this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length < 1) return null;
|
|
56565
57158
|
return this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
56566
57159
|
}
|
|
57160
|
+
/** The URI of the license this actor prefers for the new objects it creates,
|
|
57161
|
+
* as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
57162
|
+
* as the default `license` of a new object and let the user choose another.
|
|
57163
|
+
*
|
|
57164
|
+
* This is not a fallback license: an object without its own `license` is not
|
|
57165
|
+
* licensed under its author's preferred license.
|
|
57166
|
+
*/
|
|
57167
|
+
get preferredLicense() {
|
|
57168
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
57169
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length < 1) return null;
|
|
57170
|
+
return this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
57171
|
+
}
|
|
56567
57172
|
/**
|
|
56568
57173
|
* Converts this object to a JSON-LD structure.
|
|
56569
57174
|
* @param options The options to use.
|
|
@@ -56835,6 +57440,12 @@ var Organization = class Organization extends Object$1 {
|
|
|
56835
57440
|
compactItems.push(item);
|
|
56836
57441
|
}
|
|
56837
57442
|
if (compactItems.length > 0) result["isCat"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
57443
|
+
compactItems = [];
|
|
57444
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
57445
|
+
const item = formatIri(v);
|
|
57446
|
+
compactItems.push(item);
|
|
57447
|
+
}
|
|
57448
|
+
if (compactItems.length > 0) result["preferredLicense"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
56838
57449
|
result["type"] = "Organization";
|
|
56839
57450
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
56840
57451
|
result["@context"] = [
|
|
@@ -57157,6 +57768,17 @@ var Organization = class Organization extends Object$1 {
|
|
|
57157
57768
|
array.push(element);
|
|
57158
57769
|
}
|
|
57159
57770
|
if (array.length > 0) values["https://misskey-hub.net/ns#isCat"] = array;
|
|
57771
|
+
array = [];
|
|
57772
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
57773
|
+
let element = { "@id": formatIri(v) };
|
|
57774
|
+
if (Array.isArray(element)) {
|
|
57775
|
+
if (element.length < 1) continue;
|
|
57776
|
+
if (element.length == 1) element = element[0];
|
|
57777
|
+
}
|
|
57778
|
+
if (typeof element === "undefined") continue;
|
|
57779
|
+
array.push(element);
|
|
57780
|
+
}
|
|
57781
|
+
if (array.length > 0) values["https://w3id.org/fep/6757#preferredLicense"] = array;
|
|
57160
57782
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Organization"];
|
|
57161
57783
|
if (this.id != null) values["@id"] = formatIri(this.id);
|
|
57162
57784
|
if (options.format === "expand") return await jsonld.expand(values, {
|
|
@@ -57208,6 +57830,11 @@ var Organization = class Organization extends Object$1 {
|
|
|
57208
57830
|
"isCat": "misskey:isCat"
|
|
57209
57831
|
}
|
|
57210
57832
|
];
|
|
57833
|
+
if (options.context == null) {
|
|
57834
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
57835
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
57836
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
57837
|
+
}
|
|
57211
57838
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
57212
57839
|
if (options.context == null) {
|
|
57213
57840
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -57226,6 +57853,7 @@ var Organization = class Organization extends Object$1 {
|
|
|
57226
57853
|
isCompactable() {
|
|
57227
57854
|
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null && this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0) return false;
|
|
57228
57855
|
if (this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service != null && this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.length > 0) return false;
|
|
57856
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense != null && this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length > 0) return false;
|
|
57229
57857
|
return super.isCompactable();
|
|
57230
57858
|
}
|
|
57231
57859
|
/**
|
|
@@ -57760,6 +58388,19 @@ var Organization = class Organization extends Object$1 {
|
|
|
57760
58388
|
_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
|
|
57761
58389
|
}
|
|
57762
58390
|
instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
|
|
58391
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
58392
|
+
let _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array = values["https://w3id.org/fep/6757#preferredLicense"];
|
|
58393
|
+
for (const v of _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array == null ? [] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array.length === 1 && "@list" in _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0] ? _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0]["@list"] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array) {
|
|
58394
|
+
if (v == null) continue;
|
|
58395
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
58396
|
+
if (typeof decoded === "undefined") {
|
|
58397
|
+
shouldCacheJsonLd = false;
|
|
58398
|
+
continue;
|
|
58399
|
+
}
|
|
58400
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
58401
|
+
_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.push(decoded);
|
|
58402
|
+
}
|
|
58403
|
+
instance.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense;
|
|
57763
58404
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
57764
58405
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
57765
58406
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -57901,6 +58542,11 @@ var Organization = class Organization extends Object$1 {
|
|
|
57901
58542
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
57902
58543
|
} : v);
|
|
57903
58544
|
if (_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length == 1) proxy.cat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
58545
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.map((v) => v instanceof URL ? {
|
|
58546
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
58547
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
58548
|
+
} : v);
|
|
58549
|
+
if (_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length == 1) proxy.preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
57904
58550
|
return proxy;
|
|
57905
58551
|
}
|
|
57906
58552
|
};
|
|
@@ -58002,6 +58648,11 @@ var Page = class Page extends Document {
|
|
|
58002
58648
|
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
58003
58649
|
"https://gotosocial.org/ns"
|
|
58004
58650
|
];
|
|
58651
|
+
if (options.context == null) {
|
|
58652
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
58653
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
58654
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
58655
|
+
}
|
|
58005
58656
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
58006
58657
|
if (options.context == null) {
|
|
58007
58658
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -58165,6 +58816,7 @@ var Person = class Person extends Object$1 {
|
|
|
58165
58816
|
#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = /* @__PURE__ */ new Set();
|
|
58166
58817
|
#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
|
|
58167
58818
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
|
58819
|
+
#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
58168
58820
|
/**
|
|
58169
58821
|
* Constructs a new instance of Person with the given values.
|
|
58170
58822
|
* @param values The values to initialize the instance with.
|
|
@@ -58286,6 +58938,8 @@ var Person = class Person extends Object$1 {
|
|
|
58286
58938
|
else throw new TypeError("The followedMessage must be of type string.");
|
|
58287
58939
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
58288
58940
|
else throw new TypeError("The cat must be of type boolean.");
|
|
58941
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
58942
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
58289
58943
|
}
|
|
58290
58944
|
/**
|
|
58291
58945
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -58467,6 +59121,9 @@ var Person = class Person extends Object$1 {
|
|
|
58467
59121
|
clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.slice();
|
|
58468
59122
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
58469
59123
|
else throw new TypeError("The cat must be of type boolean.");
|
|
59124
|
+
clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.slice();
|
|
59125
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
59126
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
58470
59127
|
return clone;
|
|
58471
59128
|
}
|
|
58472
59129
|
/** A short username which may be used to refer to the actor,
|
|
@@ -62201,6 +62858,18 @@ var Person = class Person extends Object$1 {
|
|
|
62201
62858
|
if (this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length < 1) return null;
|
|
62202
62859
|
return this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
62203
62860
|
}
|
|
62861
|
+
/** The URI of the license this actor prefers for the new objects it creates,
|
|
62862
|
+
* as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
62863
|
+
* as the default `license` of a new object and let the user choose another.
|
|
62864
|
+
*
|
|
62865
|
+
* This is not a fallback license: an object without its own `license` is not
|
|
62866
|
+
* licensed under its author's preferred license.
|
|
62867
|
+
*/
|
|
62868
|
+
get preferredLicense() {
|
|
62869
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
62870
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length < 1) return null;
|
|
62871
|
+
return this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
62872
|
+
}
|
|
62204
62873
|
/**
|
|
62205
62874
|
* Converts this object to a JSON-LD structure.
|
|
62206
62875
|
* @param options The options to use.
|
|
@@ -62472,6 +63141,12 @@ var Person = class Person extends Object$1 {
|
|
|
62472
63141
|
compactItems.push(item);
|
|
62473
63142
|
}
|
|
62474
63143
|
if (compactItems.length > 0) result["isCat"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
63144
|
+
compactItems = [];
|
|
63145
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
63146
|
+
const item = formatIri(v);
|
|
63147
|
+
compactItems.push(item);
|
|
63148
|
+
}
|
|
63149
|
+
if (compactItems.length > 0) result["preferredLicense"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
62475
63150
|
result["type"] = "Person";
|
|
62476
63151
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
62477
63152
|
result["@context"] = [
|
|
@@ -62794,6 +63469,17 @@ var Person = class Person extends Object$1 {
|
|
|
62794
63469
|
array.push(element);
|
|
62795
63470
|
}
|
|
62796
63471
|
if (array.length > 0) values["https://misskey-hub.net/ns#isCat"] = array;
|
|
63472
|
+
array = [];
|
|
63473
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
63474
|
+
let element = { "@id": formatIri(v) };
|
|
63475
|
+
if (Array.isArray(element)) {
|
|
63476
|
+
if (element.length < 1) continue;
|
|
63477
|
+
if (element.length == 1) element = element[0];
|
|
63478
|
+
}
|
|
63479
|
+
if (typeof element === "undefined") continue;
|
|
63480
|
+
array.push(element);
|
|
63481
|
+
}
|
|
63482
|
+
if (array.length > 0) values["https://w3id.org/fep/6757#preferredLicense"] = array;
|
|
62797
63483
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Person"];
|
|
62798
63484
|
if (this.id != null) values["@id"] = formatIri(this.id);
|
|
62799
63485
|
if (options.format === "expand") return await jsonld.expand(values, {
|
|
@@ -62845,6 +63531,11 @@ var Person = class Person extends Object$1 {
|
|
|
62845
63531
|
"isCat": "misskey:isCat"
|
|
62846
63532
|
}
|
|
62847
63533
|
];
|
|
63534
|
+
if (options.context == null) {
|
|
63535
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
63536
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
63537
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
63538
|
+
}
|
|
62848
63539
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
62849
63540
|
if (options.context == null) {
|
|
62850
63541
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -62863,6 +63554,7 @@ var Person = class Person extends Object$1 {
|
|
|
62863
63554
|
isCompactable() {
|
|
62864
63555
|
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null && this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0) return false;
|
|
62865
63556
|
if (this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service != null && this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.length > 0) return false;
|
|
63557
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense != null && this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length > 0) return false;
|
|
62866
63558
|
return super.isCompactable();
|
|
62867
63559
|
}
|
|
62868
63560
|
/**
|
|
@@ -63397,6 +64089,19 @@ var Person = class Person extends Object$1 {
|
|
|
63397
64089
|
_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
|
|
63398
64090
|
}
|
|
63399
64091
|
instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
|
|
64092
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
64093
|
+
let _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array = values["https://w3id.org/fep/6757#preferredLicense"];
|
|
64094
|
+
for (const v of _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array == null ? [] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array.length === 1 && "@list" in _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0] ? _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0]["@list"] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array) {
|
|
64095
|
+
if (v == null) continue;
|
|
64096
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
64097
|
+
if (typeof decoded === "undefined") {
|
|
64098
|
+
shouldCacheJsonLd = false;
|
|
64099
|
+
continue;
|
|
64100
|
+
}
|
|
64101
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
64102
|
+
_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.push(decoded);
|
|
64103
|
+
}
|
|
64104
|
+
instance.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense;
|
|
63400
64105
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
63401
64106
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
63402
64107
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -63538,6 +64243,11 @@ var Person = class Person extends Object$1 {
|
|
|
63538
64243
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
63539
64244
|
} : v);
|
|
63540
64245
|
if (_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length == 1) proxy.cat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
64246
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.map((v) => v instanceof URL ? {
|
|
64247
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
64248
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
64249
|
+
} : v);
|
|
64250
|
+
if (_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length == 1) proxy.preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
63541
64251
|
return proxy;
|
|
63542
64252
|
}
|
|
63543
64253
|
};
|
|
@@ -63844,6 +64554,11 @@ var Place = class Place extends Object$1 {
|
|
|
63844
64554
|
"https://w3id.org/security/data-integrity/v1",
|
|
63845
64555
|
"https://gotosocial.org/ns"
|
|
63846
64556
|
];
|
|
64557
|
+
if (options.context == null) {
|
|
64558
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
64559
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
64560
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
64561
|
+
}
|
|
63847
64562
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
63848
64563
|
if (options.context == null) {
|
|
63849
64564
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -64424,6 +65139,11 @@ var Profile = class Profile extends Object$1 {
|
|
|
64424
65139
|
"https://w3id.org/security/data-integrity/v1",
|
|
64425
65140
|
"https://gotosocial.org/ns"
|
|
64426
65141
|
];
|
|
65142
|
+
if (options.context == null) {
|
|
65143
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
65144
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
65145
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
65146
|
+
}
|
|
64427
65147
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
64428
65148
|
if (options.context == null) {
|
|
64429
65149
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -65783,6 +66503,11 @@ var Question = class Question extends IntransitiveActivity {
|
|
|
65783
66503
|
}
|
|
65784
66504
|
}
|
|
65785
66505
|
];
|
|
66506
|
+
if (options.context == null) {
|
|
66507
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
66508
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
66509
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
66510
|
+
}
|
|
65786
66511
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
65787
66512
|
if (options.context == null) {
|
|
65788
66513
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -66136,6 +66861,11 @@ var Read = class Read extends Activity {
|
|
|
66136
66861
|
"https://w3id.org/security/data-integrity/v1",
|
|
66137
66862
|
"https://gotosocial.org/ns"
|
|
66138
66863
|
];
|
|
66864
|
+
if (options.context == null) {
|
|
66865
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
66866
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
66867
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
66868
|
+
}
|
|
66139
66869
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
66140
66870
|
if (options.context == null) {
|
|
66141
66871
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -66329,6 +67059,11 @@ var Reject = class Reject extends Activity {
|
|
|
66329
67059
|
"https://w3id.org/security/data-integrity/v1",
|
|
66330
67060
|
"https://gotosocial.org/ns"
|
|
66331
67061
|
];
|
|
67062
|
+
if (options.context == null) {
|
|
67063
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
67064
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
67065
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
67066
|
+
}
|
|
66332
67067
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
66333
67068
|
if (options.context == null) {
|
|
66334
67069
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -67501,6 +68236,11 @@ var Relationship = class Relationship extends Object$1 {
|
|
|
67501
68236
|
"https://w3id.org/security/data-integrity/v1",
|
|
67502
68237
|
"https://gotosocial.org/ns"
|
|
67503
68238
|
];
|
|
68239
|
+
if (options.context == null) {
|
|
68240
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
68241
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
68242
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
68243
|
+
}
|
|
67504
68244
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
67505
68245
|
if (options.context == null) {
|
|
67506
68246
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -67775,6 +68515,11 @@ var Remove = class Remove extends Activity {
|
|
|
67775
68515
|
"https://w3id.org/security/data-integrity/v1",
|
|
67776
68516
|
"https://gotosocial.org/ns"
|
|
67777
68517
|
];
|
|
68518
|
+
if (options.context == null) {
|
|
68519
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
68520
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
68521
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
68522
|
+
}
|
|
67778
68523
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
67779
68524
|
if (options.context == null) {
|
|
67780
68525
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -67938,6 +68683,7 @@ var Service = class Service extends Object$1 {
|
|
|
67938
68683
|
#_trust_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = /* @__PURE__ */ new Set();
|
|
67939
68684
|
#_QuxorEK1txp7jGjq8BRQfTPvUwp__misskey_followedMessage = [];
|
|
67940
68685
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
|
68686
|
+
#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
67941
68687
|
/**
|
|
67942
68688
|
* Constructs a new instance of Service with the given values.
|
|
67943
68689
|
* @param values The values to initialize the instance with.
|
|
@@ -68059,6 +68805,8 @@ var Service = class Service extends Object$1 {
|
|
|
68059
68805
|
else throw new TypeError("The followedMessage must be of type string.");
|
|
68060
68806
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
68061
68807
|
else throw new TypeError("The cat must be of type boolean.");
|
|
68808
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
68809
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
68062
68810
|
}
|
|
68063
68811
|
/**
|
|
68064
68812
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -68240,6 +68988,9 @@ var Service = class Service extends Object$1 {
|
|
|
68240
68988
|
clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.slice();
|
|
68241
68989
|
if ("cat" in values && values.cat != null) if (typeof values.cat === "boolean") clone.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [values.cat];
|
|
68242
68990
|
else throw new TypeError("The cat must be of type boolean.");
|
|
68991
|
+
clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.slice();
|
|
68992
|
+
if ("preferredLicense" in values && values.preferredLicense != null) if (values.preferredLicense instanceof URL) clone.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [values.preferredLicense];
|
|
68993
|
+
else throw new TypeError("The preferredLicense must be of type URL.");
|
|
68243
68994
|
return clone;
|
|
68244
68995
|
}
|
|
68245
68996
|
/** A short username which may be used to refer to the actor,
|
|
@@ -71974,6 +72725,18 @@ var Service = class Service extends Object$1 {
|
|
|
71974
72725
|
if (this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length < 1) return null;
|
|
71975
72726
|
return this.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
71976
72727
|
}
|
|
72728
|
+
/** The URI of the license this actor prefers for the new objects it creates,
|
|
72729
|
+
* as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
72730
|
+
* as the default `license` of a new object and let the user choose another.
|
|
72731
|
+
*
|
|
72732
|
+
* This is not a fallback license: an object without its own `license` is not
|
|
72733
|
+
* licensed under its author's preferred license.
|
|
72734
|
+
*/
|
|
72735
|
+
get preferredLicense() {
|
|
72736
|
+
if (this._warning != null) getLogger(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
72737
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length < 1) return null;
|
|
72738
|
+
return this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
72739
|
+
}
|
|
71977
72740
|
/**
|
|
71978
72741
|
* Converts this object to a JSON-LD structure.
|
|
71979
72742
|
* @param options The options to use.
|
|
@@ -72245,6 +73008,12 @@ var Service = class Service extends Object$1 {
|
|
|
72245
73008
|
compactItems.push(item);
|
|
72246
73009
|
}
|
|
72247
73010
|
if (compactItems.length > 0) result["isCat"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
73011
|
+
compactItems = [];
|
|
73012
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
73013
|
+
const item = formatIri(v);
|
|
73014
|
+
compactItems.push(item);
|
|
73015
|
+
}
|
|
73016
|
+
if (compactItems.length > 0) result["preferredLicense"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
72248
73017
|
result["type"] = "Service";
|
|
72249
73018
|
if (this.id != null) result["id"] = formatIri(this.id);
|
|
72250
73019
|
result["@context"] = [
|
|
@@ -72567,6 +73336,17 @@ var Service = class Service extends Object$1 {
|
|
|
72567
73336
|
array.push(element);
|
|
72568
73337
|
}
|
|
72569
73338
|
if (array.length > 0) values["https://misskey-hub.net/ns#isCat"] = array;
|
|
73339
|
+
array = [];
|
|
73340
|
+
for (const v of this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense) {
|
|
73341
|
+
let element = { "@id": formatIri(v) };
|
|
73342
|
+
if (Array.isArray(element)) {
|
|
73343
|
+
if (element.length < 1) continue;
|
|
73344
|
+
if (element.length == 1) element = element[0];
|
|
73345
|
+
}
|
|
73346
|
+
if (typeof element === "undefined") continue;
|
|
73347
|
+
array.push(element);
|
|
73348
|
+
}
|
|
73349
|
+
if (array.length > 0) values["https://w3id.org/fep/6757#preferredLicense"] = array;
|
|
72570
73350
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Service"];
|
|
72571
73351
|
if (this.id != null) values["@id"] = formatIri(this.id);
|
|
72572
73352
|
if (options.format === "expand") return await jsonld.expand(values, {
|
|
@@ -72618,6 +73398,11 @@ var Service = class Service extends Object$1 {
|
|
|
72618
73398
|
"isCat": "misskey:isCat"
|
|
72619
73399
|
}
|
|
72620
73400
|
];
|
|
73401
|
+
if (options.context == null) {
|
|
73402
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
73403
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
73404
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
73405
|
+
}
|
|
72621
73406
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
72622
73407
|
if (options.context == null) {
|
|
72623
73408
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -72636,6 +73421,7 @@ var Service = class Service extends Object$1 {
|
|
|
72636
73421
|
isCompactable() {
|
|
72637
73422
|
if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null && this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0) return false;
|
|
72638
73423
|
if (this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service != null && this.#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.length > 0) return false;
|
|
73424
|
+
if (this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense != null && this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length > 0) return false;
|
|
72639
73425
|
return super.isCompactable();
|
|
72640
73426
|
}
|
|
72641
73427
|
/**
|
|
@@ -73170,6 +73956,19 @@ var Service = class Service extends Object$1 {
|
|
|
73170
73956
|
_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.push(decoded);
|
|
73171
73957
|
}
|
|
73172
73958
|
instance.#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat;
|
|
73959
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = [];
|
|
73960
|
+
let _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array = values["https://w3id.org/fep/6757#preferredLicense"];
|
|
73961
|
+
for (const v of _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array == null ? [] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array.length === 1 && "@list" in _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0] ? _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array[0]["@list"] : _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense__array) {
|
|
73962
|
+
if (v == null) continue;
|
|
73963
|
+
const decoded = isAbsoluteIriValue(v) ? decodeIri(getAbsoluteIriValue(v)) : void 0;
|
|
73964
|
+
if (typeof decoded === "undefined") {
|
|
73965
|
+
shouldCacheJsonLd = false;
|
|
73966
|
+
continue;
|
|
73967
|
+
}
|
|
73968
|
+
if (!this._shouldCacheDecodedJsonLd(decoded)) shouldCacheJsonLd = false;
|
|
73969
|
+
_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.push(decoded);
|
|
73970
|
+
}
|
|
73971
|
+
instance.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense;
|
|
73173
73972
|
instance._shouldCacheJsonLd = shouldCacheJsonLd;
|
|
73174
73973
|
if (shouldCacheJsonLd && (!("_fromSubclass" in options) || !options._fromSubclass)) try {
|
|
73175
73974
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
@@ -73311,6 +74110,11 @@ var Service = class Service extends Object$1 {
|
|
|
73311
74110
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
73312
74111
|
} : v);
|
|
73313
74112
|
if (_2xEU4QtkC53RAun67T81Egqt9vmL_isCat.length == 1) proxy.cat = _2xEU4QtkC53RAun67T81Egqt9vmL_isCat[0];
|
|
74113
|
+
const _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense = this.#_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.map((v) => v instanceof URL ? {
|
|
74114
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(inspectIri(v), options),
|
|
74115
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(inspectIri(v), options)
|
|
74116
|
+
} : v);
|
|
74117
|
+
if (_248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense.length == 1) proxy.preferredLicense = _248SCMQLVt8i7L4vUstp5SmQQFH6_preferredLicense[0];
|
|
73314
74118
|
return proxy;
|
|
73315
74119
|
}
|
|
73316
74120
|
};
|
|
@@ -73528,6 +74332,11 @@ var Source = class {
|
|
|
73528
74332
|
keepFreeFloatingNodes: true
|
|
73529
74333
|
});
|
|
73530
74334
|
let docContext = options.context ?? "https://www.w3.org/ns/activitystreams";
|
|
74335
|
+
if (options.context == null) {
|
|
74336
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
74337
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
74338
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
74339
|
+
}
|
|
73531
74340
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
73532
74341
|
if (options.context == null) {
|
|
73533
74342
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -73755,6 +74564,11 @@ var TentativeAccept = class TentativeAccept extends Accept {
|
|
|
73755
74564
|
"https://w3id.org/security/data-integrity/v1",
|
|
73756
74565
|
"https://gotosocial.org/ns"
|
|
73757
74566
|
];
|
|
74567
|
+
if (options.context == null) {
|
|
74568
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
74569
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
74570
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
74571
|
+
}
|
|
73758
74572
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
73759
74573
|
if (options.context == null) {
|
|
73760
74574
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -73948,6 +74762,11 @@ var TentativeReject = class TentativeReject extends Reject {
|
|
|
73948
74762
|
"https://w3id.org/security/data-integrity/v1",
|
|
73949
74763
|
"https://gotosocial.org/ns"
|
|
73950
74764
|
];
|
|
74765
|
+
if (options.context == null) {
|
|
74766
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
74767
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
74768
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
74769
|
+
}
|
|
73951
74770
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
73952
74771
|
if (options.context == null) {
|
|
73953
74772
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -74239,6 +75058,11 @@ var Tombstone = class Tombstone extends Object$1 {
|
|
|
74239
75058
|
"https://w3id.org/security/data-integrity/v1",
|
|
74240
75059
|
"https://gotosocial.org/ns"
|
|
74241
75060
|
];
|
|
75061
|
+
if (options.context == null) {
|
|
75062
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
75063
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
75064
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
75065
|
+
}
|
|
74242
75066
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
74243
75067
|
if (options.context == null) {
|
|
74244
75068
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -74478,6 +75302,11 @@ var Travel = class Travel extends IntransitiveActivity {
|
|
|
74478
75302
|
"https://w3id.org/security/data-integrity/v1",
|
|
74479
75303
|
"https://gotosocial.org/ns"
|
|
74480
75304
|
];
|
|
75305
|
+
if (options.context == null) {
|
|
75306
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
75307
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
75308
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
75309
|
+
}
|
|
74481
75310
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
74482
75311
|
if (options.context == null) {
|
|
74483
75312
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -74685,6 +75514,11 @@ var Undo = class Undo extends Activity {
|
|
|
74685
75514
|
"Emoji": "toot:Emoji"
|
|
74686
75515
|
}
|
|
74687
75516
|
];
|
|
75517
|
+
if (options.context == null) {
|
|
75518
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
75519
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
75520
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
75521
|
+
}
|
|
74688
75522
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
74689
75523
|
if (options.context == null) {
|
|
74690
75524
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -74940,6 +75774,11 @@ var Update = class Update extends Activity {
|
|
|
74940
75774
|
}
|
|
74941
75775
|
}
|
|
74942
75776
|
];
|
|
75777
|
+
if (options.context == null) {
|
|
75778
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
75779
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
75780
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
75781
|
+
}
|
|
74943
75782
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
74944
75783
|
if (options.context == null) {
|
|
74945
75784
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -75148,6 +75987,11 @@ var Video = class Video extends Document {
|
|
|
75148
75987
|
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
75149
75988
|
"https://gotosocial.org/ns"
|
|
75150
75989
|
];
|
|
75990
|
+
if (options.context == null) {
|
|
75991
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
75992
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
75993
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
75994
|
+
}
|
|
75151
75995
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
75152
75996
|
if (options.context == null) {
|
|
75153
75997
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
@@ -75340,6 +76184,11 @@ var View = class View extends Activity {
|
|
|
75340
76184
|
"https://w3id.org/security/data-integrity/v1",
|
|
75341
76185
|
"https://gotosocial.org/ns"
|
|
75342
76186
|
];
|
|
76187
|
+
if (options.context == null) {
|
|
76188
|
+
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|
|
76189
|
+
const additionalContexts = getExtraContexts(values).filter((context) => !currentContexts.includes(context));
|
|
76190
|
+
if (additionalContexts.length > 0) docContext = [...currentContexts, ...additionalContexts];
|
|
76191
|
+
}
|
|
75343
76192
|
let compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
75344
76193
|
if (options.context == null) {
|
|
75345
76194
|
const currentContexts = Array.isArray(docContext) ? docContext : [docContext];
|