@fedify/vocab-tools 2.0.36-dev.2746 → 2.0.36-dev.2779

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.
@@ -45,6 +45,207 @@ function isValidLanguageTag(language: string): boolean {
45
45
  }
46
46
 
47
47
 
48
+
49
+ function hasJsonLdContext(value: unknown): boolean {
50
+ if (Array.isArray(value)) return value.some(hasJsonLdContext);
51
+ return value != null && typeof value === \\"object\\" &&
52
+ globalThis.Object.hasOwn(value, \\"@context\\");
53
+ }
54
+
55
+ function hasSupportedJsonLdScalars(value: unknown, idReferences: boolean): boolean {
56
+ if (Array.isArray(value)) {
57
+ return value.every(item => hasSupportedJsonLdScalars(item, idReferences));
58
+ }
59
+ return value === null || typeof value === \\"object\\" ||
60
+ (idReferences && typeof value === \\"string\\" && URL.canParse(value));
61
+ }
62
+
63
+ function equalJsonLdValues(left: unknown, right: unknown): boolean {
64
+ if (left === right) return true;
65
+ if (Array.isArray(left) || Array.isArray(right)) {
66
+ return Array.isArray(left) && Array.isArray(right) &&
67
+ left.length === right.length &&
68
+ left.every((item, index) => equalJsonLdValues(item, right[index]));
69
+ }
70
+ if (left === null || right === null || typeof left !== \\"object\\" ||
71
+ typeof right !== \\"object\\") return false;
72
+ const leftObject = left as Record<string, unknown>;
73
+ const rightObject = right as Record<string, unknown>;
74
+ const keys = globalThis.Object.keys(leftObject);
75
+ return keys.length === globalThis.Object.keys(rightObject).length &&
76
+ keys.every(key => globalThis.Object.hasOwn(rightObject, key) &&
77
+ equalJsonLdValues(leftObject[key], rightObject[key]));
78
+ }
79
+
80
+ async function isolateJsonLdSibling(
81
+ value: unknown,
82
+ term: string,
83
+ originalContext: unknown,
84
+ repairedContext: unknown,
85
+ parentType: unknown,
86
+ typeContext: unknown,
87
+ contextLoader: DocumentLoader | undefined,
88
+ ): Promise<{ value: unknown } | undefined> {
89
+ if (Array.isArray(value)) {
90
+ const result: unknown[] = [];
91
+ for (const item of value) {
92
+ const rewritten = await isolateJsonLdSibling(
93
+ item, term, originalContext, repairedContext, parentType, typeContext,
94
+ contextLoader,
95
+ );
96
+ if (rewritten === undefined) return undefined;
97
+ result.push(rewritten.value);
98
+ }
99
+ return { value: result };
100
+ }
101
+ if (value === null) return { value };
102
+ if (typeof value === \\"string\\") {
103
+ // These references were checked against the original term's @type:@id.
104
+ // Resolve compact IRIs and @base before removing their enclosing context.
105
+ const expanded = await jsonld.expand(
106
+ { \\"@context\\": originalContext, type: parentType, \\"@id\\": value },
107
+ { documentLoader: contextLoader, keepFreeFloatingNodes: true },
108
+ );
109
+ return { value: { \\"@context\\": { id: \\"@id\\" }, id: expanded[0][\\"@id\\"] } };
110
+ }
111
+ if (typeof value !== \\"object\\" ||
112
+ globalThis.Object.hasOwn(value, \\"@context\\")) return { value };
113
+
114
+ // Comparing equal-shaped wrappers also preserves list and graph semantics.
115
+ // Keep already independent expanded sources exactly as received: adding a
116
+ // context to a signed source can invalidate its JSON canonicalization proof.
117
+ const original = await jsonld.expand(
118
+ { \\"@context\\": originalContext, type: parentType, [term]: value },
119
+ { documentLoader: contextLoader },
120
+ );
121
+ const repaired = await jsonld.expand(
122
+ { \\"@context\\": repairedContext, type: parentType, [term]: value },
123
+ { documentLoader: contextLoader },
124
+ );
125
+ if (equalJsonLdValues(original, repaired)) return { value };
126
+ const restorationContexts = [originalContext];
127
+ if (typeContext !== undefined) {
128
+ restorationContexts.push([
129
+ ...(Array.isArray(originalContext) ? originalContext : [originalContext]),
130
+ ...(Array.isArray(typeContext) ? typeContext : [typeContext]),
131
+ ]);
132
+ }
133
+ for (const context of restorationContexts) {
134
+ const restored = { ...value, \\"@context\\": context };
135
+ const expanded = await jsonld.expand(
136
+ { \\"@context\\": repairedContext, type: parentType, [term]: restored },
137
+ { documentLoader: contextLoader },
138
+ );
139
+ if (equalJsonLdValues(original, expanded)) return { value: restored };
140
+ }
141
+ // If neither context preserves the inherited meaning, keep the whole term
142
+ // unchanged rather than committing only some of its sibling rewrites.
143
+ return undefined;
144
+ }
145
+
146
+ function copyJsonLdTermDefinition(mapping: Record<string, unknown>): Record<string, unknown> {
147
+ const definition: Record<string, unknown> = {};
148
+ for (const keyword of [
149
+ \\"@id\\", \\"@type\\", \\"@container\\", \\"@language\\", \\"@direction\\", \\"@index\\",
150
+ \\"@nest\\", \\"@prefix\\",
151
+ ]) {
152
+ if (!globalThis.Object.hasOwn(mapping, keyword)) continue;
153
+ const value = mapping[keyword];
154
+ definition[keyword] = Array.isArray(value)
155
+ ? value.length === 1 && keyword === \\"@container\\" ? value[0] : [...value]
156
+ : value;
157
+ }
158
+ // The processor stores the semantic @prefix flag under an internal name.
159
+ if (mapping._prefix === true) definition[\\"@prefix\\"] = true;
160
+ return definition;
161
+ }
162
+
163
+ async function isolateJsonLdContexts(
164
+ result: Record<string, unknown>,
165
+ terms: readonly string[],
166
+ contextLoader: DocumentLoader | undefined,
167
+ ): Promise<Record<string, unknown>> {
168
+ const candidates = terms.filter(term =>
169
+ globalThis.Object.hasOwn(result, term) && hasJsonLdContext(result[term])
170
+ );
171
+ if (candidates.length === 0) return result;
172
+
173
+ const originalContext = result[\\"@context\\"];
174
+ const contexts = Array.isArray(originalContext)
175
+ ? originalContext
176
+ : [originalContext];
177
+ let activeContext = await jsonld.processContext(
178
+ await jsonld.processContext({}, null),
179
+ originalContext,
180
+ { documentLoader: contextLoader },
181
+ );
182
+ const parentType = result.type;
183
+ const typeMapping = typeof parentType === \\"string\\" &&
184
+ jsonld.getContextValue(activeContext, \\"type\\", \\"@id\\") === \\"@type\\"
185
+ ? jsonld.getContextValue(activeContext, parentType) as
186
+ Record<string, unknown> | null
187
+ : null;
188
+ const typeContext = typeMapping?.[\\"@context\\"];
189
+ if (typeContext !== undefined) {
190
+ // A protected type definition cannot receive an augmented scoped context.
191
+ // Leave that existing boundary unchanged, just as for protected properties.
192
+ if (typeMapping!.protected === true) return result;
193
+ activeContext = await jsonld.processContext(
194
+ activeContext, typeContext, { documentLoader: contextLoader },
195
+ );
196
+ }
197
+
198
+ function repairContext(definitions: Record<string, unknown>): unknown[] {
199
+ if (typeContext === undefined) return [...contexts, definitions];
200
+ // Preserve an object scope's @propagate semantics: replacing it with an
201
+ // array would change how the published context algorithm handles the flag.
202
+ const scopedContext = typeContext !== null && typeof typeContext === \\"object\\" &&
203
+ !Array.isArray(typeContext)
204
+ ? { ...typeContext, ...definitions }
205
+ : [...(Array.isArray(typeContext) ? typeContext : [typeContext]), definitions];
206
+ return [...contexts, {
207
+ [parentType as string]: {
208
+ ...copyJsonLdTermDefinition(typeMapping!), \\"@context\\": scopedContext,
209
+ },
210
+ }];
211
+ }
212
+ let definitions: Record<string, unknown> = {};
213
+ let siblings: Record<string, unknown> = {};
214
+ for (const term of candidates) {
215
+ const mapping = jsonld.getContextValue(activeContext, term) as
216
+ Record<string, unknown> | null;
217
+ if (mapping == null || mapping.protected === true || mapping.reverse === true ||
218
+ globalThis.Object.hasOwn(mapping, \\"@context\\") ||
219
+ mapping[\\"@type\\"] === \\"@json\\" || typeof mapping[\\"@id\\"] !== \\"string\\" ||
220
+ mapping[\\"@id\\"].startsWith(\\"@\\")) continue;
221
+
222
+ // A scalar scoped reset does not override protected definitions in the
223
+ // published expansion algorithm. Check the entire property before making
224
+ // any changes; supported URL references receive their own local context.
225
+ if (!hasSupportedJsonLdScalars(result[term], mapping[\\"@type\\"] === \\"@id\\")) {
226
+ continue;
227
+ }
228
+ const definition = copyJsonLdTermDefinition(mapping);
229
+ definition[\\"@context\\"] = null;
230
+ if (typeContext !== null && typeof typeContext === \\"object\\" &&
231
+ !Array.isArray(typeContext) &&
232
+ (typeContext as Record<string, unknown>)[\\"@protected\\"] === true) {
233
+ definition[\\"@protected\\"] = false;
234
+ }
235
+ const proposedDefinitions = { ...definitions, [term]: definition };
236
+ const repairedContext = repairContext(proposedDefinitions);
237
+ const rewritten = await isolateJsonLdSibling(
238
+ result[term], term, originalContext, repairedContext, parentType, typeContext,
239
+ contextLoader,
240
+ );
241
+ if (rewritten === undefined) continue;
242
+ definitions = proposedDefinitions;
243
+ siblings = { ...siblings, [term]: rewritten.value };
244
+ }
245
+ return globalThis.Object.keys(definitions).length === 0
246
+ ? result
247
+ : { ...result, ...siblings, \\"@context\\": repairContext(definitions) };
248
+ }
48
249
  /** Describes an object of any kind. The Object type serves as the base type for
49
250
  * most of the other kinds of objects defined in the Activity Vocabulary,
50
251
  * including other Core types such as {@link Activity},
@@ -8173,6 +8374,10 @@ get urls(): ((URL | Link))[] {
8173
8374
  };
8174
8375
 
8175
8376
  if (options.format == null && this.isCompactable()) {
8377
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
8378
+ options._fromSuperclass === true;
8379
+ options = { ...options };
8380
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
8176
8381
  const result: Record<string, unknown> = {};
8177
8382
  // deno-lint-ignore no-unused-vars
8178
8383
  let compactItems: unknown[];
@@ -8837,7 +9042,11 @@ get urls(): ((URL | Link))[] {
8837
9042
  result[\\"type\\"] = \\"Object\\";
8838
9043
  if (this.id != null) result[\\"id\\"] = this.id.href;
8839
9044
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"sensitive\\":\\"as:sensitive\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
8840
- return result;
9045
+ return fromSuperclass ? result : await isolateJsonLdContexts(
9046
+ result,
9047
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
9048
+ options.contextLoader,
9049
+ );
8841
9050
  }
8842
9051
 
8843
9052
  // deno-lint-ignore no-unused-vars prefer-const
@@ -11887,11 +12096,17 @@ proofs?: (DataIntegrityProof | URL)[];}
11887
12096
  };
11888
12097
 
11889
12098
  if (options.format == null && this.isCompactable()) {
12099
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
12100
+ options._fromSuperclass === true;
12101
+ options = { ...options };
12102
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
11890
12103
 
11891
12104
  const result = await super.toJsonLd({
11892
12105
  ...options,
11893
12106
  format: undefined,
11894
12107
  context: undefined,
12108
+ // @ts-ignore: an internal option
12109
+ _fromSuperclass: true,
11895
12110
  }) as Record<string, unknown>;
11896
12111
 
11897
12112
  // deno-lint-ignore no-unused-vars
@@ -11900,7 +12115,11 @@ proofs?: (DataIntegrityProof | URL)[];}
11900
12115
  result[\\"type\\"] = \\"Emoji\\";
11901
12116
  if (this.id != null) result[\\"id\\"] = this.id.href;
11902
12117
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"Emoji\\":\\"toot:Emoji\\"}];
11903
- return result;
12118
+ return fromSuperclass ? result : await isolateJsonLdContexts(
12119
+ result,
12120
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
12121
+ options.contextLoader,
12122
+ );
11904
12123
  }
11905
12124
 
11906
12125
  // deno-lint-ignore no-unused-vars prefer-const
@@ -12286,11 +12505,17 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
12286
12505
  };
12287
12506
 
12288
12507
  if (options.format == null && this.isCompactable()) {
12508
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
12509
+ options._fromSuperclass === true;
12510
+ options = { ...options };
12511
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
12289
12512
 
12290
12513
  const result = await super.toJsonLd({
12291
12514
  ...options,
12292
12515
  format: undefined,
12293
12516
  context: undefined,
12517
+ // @ts-ignore: an internal option
12518
+ _fromSuperclass: true,
12294
12519
  }) as Record<string, unknown>;
12295
12520
 
12296
12521
  // deno-lint-ignore no-unused-vars
@@ -12325,7 +12550,11 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
12325
12550
  result[\\"type\\"] = \\"ChatMessage\\";
12326
12551
  if (this.id != null) result[\\"id\\"] = this.id.href;
12327
12552
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"Emoji\\":\\"toot:Emoji\\",\\"ChatMessage\\":\\"http://litepub.social/ns#ChatMessage\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
12328
- return result;
12553
+ return fromSuperclass ? result : await isolateJsonLdContexts(
12554
+ result,
12555
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
12556
+ options.contextLoader,
12557
+ );
12329
12558
  }
12330
12559
 
12331
12560
  // deno-lint-ignore no-unused-vars prefer-const
@@ -16709,6 +16938,10 @@ name?: string | LanguageString | null;value?: string | LanguageString | null;}
16709
16938
  };
16710
16939
 
16711
16940
  if (options.format == null && this.isCompactable()) {
16941
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
16942
+ options._fromSuperclass === true;
16943
+ options = { ...options };
16944
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
16712
16945
  const result: Record<string, unknown> = {};
16713
16946
  // deno-lint-ignore no-unused-vars
16714
16947
  let compactItems: unknown[];
@@ -16754,7 +16987,11 @@ name?: string | LanguageString | null;value?: string | LanguageString | null;}
16754
16987
  result[\\"type\\"] = \\"PropertyValue\\";
16755
16988
  if (this.id != null) result[\\"id\\"] = this.id.href;
16756
16989
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",{\\"schema\\":\\"http://schema.org#\\",\\"PropertyValue\\":\\"schema:PropertyValue\\",\\"value\\":\\"schema:value\\"}];
16757
- return result;
16990
+ return fromSuperclass ? result : await isolateJsonLdContexts(
16991
+ result,
16992
+ [],
16993
+ options.contextLoader,
16994
+ );
16758
16995
  }
16759
16996
 
16760
16997
  // deno-lint-ignore no-unused-vars prefer-const
@@ -19537,6 +19774,10 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi
19537
19774
  };
19538
19775
 
19539
19776
  if (options.format == null && this.isCompactable()) {
19777
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
19778
+ options._fromSuperclass === true;
19779
+ options = { ...options };
19780
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
19540
19781
  const result: Record<string, unknown> = {};
19541
19782
  // deno-lint-ignore no-unused-vars
19542
19783
  let compactItems: unknown[];
@@ -19596,7 +19837,11 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi
19596
19837
  result[\\"type\\"] = \\"CryptographicKey\\";
19597
19838
  if (this.id != null) result[\\"id\\"] = this.id.href;
19598
19839
  result[\\"@context\\"] = \\"https://w3id.org/security/v1\\";
19599
- return result;
19840
+ return fromSuperclass ? result : await isolateJsonLdContexts(
19841
+ result,
19842
+ [\\"owner\\"],
19843
+ options.contextLoader,
19844
+ );
19600
19845
  }
19601
19846
 
19602
19847
  // deno-lint-ignore no-unused-vars prefer-const
@@ -20462,6 +20707,10 @@ controller?: Application | Group | Organization | Person | Service | URL | null;
20462
20707
  };
20463
20708
 
20464
20709
  if (options.format == null && this.isCompactable()) {
20710
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
20711
+ options._fromSuperclass === true;
20712
+ options = { ...options };
20713
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
20465
20714
  const result: Record<string, unknown> = {};
20466
20715
  // deno-lint-ignore no-unused-vars
20467
20716
  let compactItems: unknown[];
@@ -20521,7 +20770,11 @@ controller?: Application | Group | Organization | Person | Service | URL | null;
20521
20770
  result[\\"type\\"] = \\"Multikey\\";
20522
20771
  if (this.id != null) result[\\"id\\"] = this.id.href;
20523
20772
  result[\\"@context\\"] = \\"https://w3id.org/security/multikey/v1\\";
20524
- return result;
20773
+ return fromSuperclass ? result : await isolateJsonLdContexts(
20774
+ result,
20775
+ [\\"controller\\"],
20776
+ options.contextLoader,
20777
+ );
20525
20778
  }
20526
20779
 
20527
20780
  // deno-lint-ignore no-unused-vars prefer-const
@@ -26565,11 +26818,17 @@ get preferredUsernames(): ((string | LanguageString))[] {
26565
26818
  };
26566
26819
 
26567
26820
  if (options.format == null && this.isCompactable()) {
26821
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
26822
+ options._fromSuperclass === true;
26823
+ options = { ...options };
26824
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
26568
26825
 
26569
26826
  const result = await super.toJsonLd({
26570
26827
  ...options,
26571
26828
  format: undefined,
26572
26829
  context: undefined,
26830
+ // @ts-ignore: an internal option
26831
+ _fromSuperclass: true,
26573
26832
  }) as Record<string, unknown>;
26574
26833
 
26575
26834
  // deno-lint-ignore no-unused-vars
@@ -27029,7 +27288,11 @@ get preferredUsernames(): ((string | LanguageString))[] {
27029
27288
  result[\\"type\\"] = \\"Application\\";
27030
27289
  if (this.id != null) result[\\"id\\"] = this.id.href;
27031
27290
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/v1\\",\\"https://w3id.org/security/data-integrity/v1\\",\\"https://www.w3.org/ns/did/v1\\",\\"https://w3id.org/security/multikey/v1\\",{\\"alsoKnownAs\\":{\\"@id\\":\\"as:alsoKnownAs\\",\\"@type\\":\\"@id\\"},\\"manuallyApprovesFollowers\\":\\"as:manuallyApprovesFollowers\\",\\"movedTo\\":{\\"@id\\":\\"as:movedTo\\",\\"@type\\":\\"@id\\"},\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"Emoji\\":\\"toot:Emoji\\",\\"featured\\":{\\"@id\\":\\"toot:featured\\",\\"@type\\":\\"@id\\"},\\"featuredTags\\":{\\"@id\\":\\"toot:featuredTags\\",\\"@type\\":\\"@id\\"},\\"discoverable\\":\\"toot:discoverable\\",\\"suspended\\":\\"toot:suspended\\",\\"memorial\\":\\"toot:memorial\\",\\"indexable\\":\\"toot:indexable\\",\\"schema\\":\\"http://schema.org#\\",\\"PropertyValue\\":\\"schema:PropertyValue\\",\\"value\\":\\"schema:value\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"_misskey_followedMessage\\":\\"misskey:_misskey_followedMessage\\",\\"isCat\\":\\"misskey:isCat\\"}];
27032
- return result;
27291
+ return fromSuperclass ? result : await isolateJsonLdContexts(
27292
+ result,
27293
+ [\\"publicKey\\",\\"assertionMethod\\",\\"inbox\\",\\"outbox\\",\\"following\\",\\"followers\\",\\"liked\\",\\"featured\\",\\"featuredTags\\",\\"streams\\",\\"endpoints\\",\\"movedTo\\",\\"alsoKnownAs\\",\\"service\\",\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
27294
+ options.contextLoader,
27295
+ );
27033
27296
  }
27034
27297
 
27035
27298
  // deno-lint-ignore no-unused-vars prefer-const
@@ -29720,11 +29983,17 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
29720
29983
  };
29721
29984
 
29722
29985
  if (options.format == null && this.isCompactable()) {
29986
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
29987
+ options._fromSuperclass === true;
29988
+ options = { ...options };
29989
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
29723
29990
 
29724
29991
  const result = await super.toJsonLd({
29725
29992
  ...options,
29726
29993
  format: undefined,
29727
29994
  context: undefined,
29995
+ // @ts-ignore: an internal option
29996
+ _fromSuperclass: true,
29728
29997
  }) as Record<string, unknown>;
29729
29998
 
29730
29999
  // deno-lint-ignore no-unused-vars
@@ -29759,7 +30028,11 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
29759
30028
  result[\\"type\\"] = \\"Article\\";
29760
30029
  if (this.id != null) result[\\"id\\"] = this.id.href;
29761
30030
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"sensitive\\":\\"as:sensitive\\",\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
29762
- return result;
30031
+ return fromSuperclass ? result : await isolateJsonLdContexts(
30032
+ result,
30033
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
30034
+ options.contextLoader,
30035
+ );
29763
30036
  }
29764
30037
 
29765
30038
  // deno-lint-ignore no-unused-vars prefer-const
@@ -30254,11 +30527,17 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
30254
30527
  };
30255
30528
 
30256
30529
  if (options.format == null && this.isCompactable()) {
30530
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
30531
+ options._fromSuperclass === true;
30532
+ options = { ...options };
30533
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
30257
30534
 
30258
30535
  const result = await super.toJsonLd({
30259
30536
  ...options,
30260
30537
  format: undefined,
30261
30538
  context: undefined,
30539
+ // @ts-ignore: an internal option
30540
+ _fromSuperclass: true,
30262
30541
  }) as Record<string, unknown>;
30263
30542
 
30264
30543
  // deno-lint-ignore no-unused-vars
@@ -30299,7 +30578,11 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
30299
30578
  result[\\"type\\"] = \\"Document\\";
30300
30579
  if (this.id != null) result[\\"id\\"] = this.id.href;
30301
30580
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\"];
30302
- return result;
30581
+ return fromSuperclass ? result : await isolateJsonLdContexts(
30582
+ result,
30583
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
30584
+ options.contextLoader,
30585
+ );
30303
30586
  }
30304
30587
 
30305
30588
  // deno-lint-ignore no-unused-vars prefer-const
@@ -30770,11 +31053,17 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
30770
31053
  };
30771
31054
 
30772
31055
  if (options.format == null && this.isCompactable()) {
31056
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
31057
+ options._fromSuperclass === true;
31058
+ options = { ...options };
31059
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
30773
31060
 
30774
31061
  const result = await super.toJsonLd({
30775
31062
  ...options,
30776
31063
  format: undefined,
30777
31064
  context: undefined,
31065
+ // @ts-ignore: an internal option
31066
+ _fromSuperclass: true,
30778
31067
  }) as Record<string, unknown>;
30779
31068
 
30780
31069
  // deno-lint-ignore no-unused-vars
@@ -30783,7 +31072,11 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
30783
31072
  result[\\"type\\"] = \\"Audio\\";
30784
31073
  if (this.id != null) result[\\"id\\"] = this.id.href;
30785
31074
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\"];
30786
- return result;
31075
+ return fromSuperclass ? result : await isolateJsonLdContexts(
31076
+ result,
31077
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
31078
+ options.contextLoader,
31079
+ );
30787
31080
  }
30788
31081
 
30789
31082
  // deno-lint-ignore no-unused-vars prefer-const
@@ -34914,11 +35207,17 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
34914
35207
  };
34915
35208
 
34916
35209
  if (options.format == null && this.isCompactable()) {
35210
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
35211
+ options._fromSuperclass === true;
35212
+ options = { ...options };
35213
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
34917
35214
 
34918
35215
  const result = await super.toJsonLd({
34919
35216
  ...options,
34920
35217
  format: undefined,
34921
35218
  context: undefined,
35219
+ // @ts-ignore: an internal option
35220
+ _fromSuperclass: true,
34922
35221
  }) as Record<string, unknown>;
34923
35222
 
34924
35223
  // deno-lint-ignore no-unused-vars
@@ -35187,7 +35486,11 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
35187
35486
  result[\\"type\\"] = \\"Collection\\";
35188
35487
  if (this.id != null) result[\\"id\\"] = this.id.href;
35189
35488
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"ChatMessage\\":\\"http://litepub.social/ns#ChatMessage\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":\\"toot:votersCount\\",\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
35190
- return result;
35489
+ return fromSuperclass ? result : await isolateJsonLdContexts(
35490
+ result,
35491
+ [\\"current\\",\\"first\\",\\"last\\",\\"items\\",\\"likesOf\\",\\"sharesOf\\",\\"repliesOf\\",\\"inboxOf\\",\\"outboxOf\\",\\"followersOf\\",\\"followingOf\\",\\"likedOf\\",\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
35492
+ options.contextLoader,
35493
+ );
35191
35494
  }
35192
35495
 
35193
35496
  // deno-lint-ignore no-unused-vars prefer-const
@@ -37256,11 +37559,17 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
37256
37559
  };
37257
37560
 
37258
37561
  if (options.format == null && this.isCompactable()) {
37562
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
37563
+ options._fromSuperclass === true;
37564
+ options = { ...options };
37565
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
37259
37566
 
37260
37567
  const result = await super.toJsonLd({
37261
37568
  ...options,
37262
37569
  format: undefined,
37263
37570
  context: undefined,
37571
+ // @ts-ignore: an internal option
37572
+ _fromSuperclass: true,
37264
37573
  }) as Record<string, unknown>;
37265
37574
 
37266
37575
  // deno-lint-ignore no-unused-vars
@@ -37329,7 +37638,11 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
37329
37638
  result[\\"type\\"] = \\"CollectionPage\\";
37330
37639
  if (this.id != null) result[\\"id\\"] = this.id.href;
37331
37640
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"ChatMessage\\":\\"http://litepub.social/ns#ChatMessage\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":\\"toot:votersCount\\",\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
37332
- return result;
37641
+ return fromSuperclass ? result : await isolateJsonLdContexts(
37642
+ result,
37643
+ [\\"partOf\\",\\"next\\",\\"prev\\",\\"current\\",\\"first\\",\\"last\\",\\"items\\",\\"likesOf\\",\\"sharesOf\\",\\"repliesOf\\",\\"inboxOf\\",\\"outboxOf\\",\\"followersOf\\",\\"followingOf\\",\\"likedOf\\",\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
37644
+ options.contextLoader,
37645
+ );
37333
37646
  }
37334
37647
 
37335
37648
  // deno-lint-ignore no-unused-vars prefer-const
@@ -39223,6 +39536,10 @@ proxyUrl?: URL | null;oauthAuthorizationEndpoint?: URL | null;oauthTokenEndpoint
39223
39536
  };
39224
39537
 
39225
39538
  if (options.format == null && this.isCompactable()) {
39539
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
39540
+ options._fromSuperclass === true;
39541
+ options = { ...options };
39542
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
39226
39543
  const result: Record<string, unknown> = {};
39227
39544
  // deno-lint-ignore no-unused-vars
39228
39545
  let compactItems: unknown[];
@@ -39326,7 +39643,11 @@ proxyUrl?: URL | null;oauthAuthorizationEndpoint?: URL | null;oauthTokenEndpoint
39326
39643
  result[\\"type\\"] = \\"as:Endpoints\\";
39327
39644
  if (this.id != null) result[\\"id\\"] = this.id.href;
39328
39645
  result[\\"@context\\"] = \\"https://www.w3.org/ns/activitystreams\\";
39329
- return result;
39646
+ return fromSuperclass ? result : await isolateJsonLdContexts(
39647
+ result,
39648
+ [],
39649
+ options.contextLoader,
39650
+ );
39330
39651
  }
39331
39652
 
39332
39653
  // deno-lint-ignore no-unused-vars prefer-const
@@ -40090,11 +40411,17 @@ proofs?: (DataIntegrityProof | URL)[];}
40090
40411
  };
40091
40412
 
40092
40413
  if (options.format == null && this.isCompactable()) {
40414
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
40415
+ options._fromSuperclass === true;
40416
+ options = { ...options };
40417
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
40093
40418
 
40094
40419
  const result = await super.toJsonLd({
40095
40420
  ...options,
40096
40421
  format: undefined,
40097
40422
  context: undefined,
40423
+ // @ts-ignore: an internal option
40424
+ _fromSuperclass: true,
40098
40425
  }) as Record<string, unknown>;
40099
40426
 
40100
40427
  // deno-lint-ignore no-unused-vars
@@ -40103,7 +40430,11 @@ proofs?: (DataIntegrityProof | URL)[];}
40103
40430
  result[\\"type\\"] = \\"Event\\";
40104
40431
  if (this.id != null) result[\\"id\\"] = this.id.href;
40105
40432
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\"];
40106
- return result;
40433
+ return fromSuperclass ? result : await isolateJsonLdContexts(
40434
+ result,
40435
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
40436
+ options.contextLoader,
40437
+ );
40107
40438
  }
40108
40439
 
40109
40440
  // deno-lint-ignore no-unused-vars prefer-const
@@ -45654,11 +45985,17 @@ get preferredUsernames(): ((string | LanguageString))[] {
45654
45985
  };
45655
45986
 
45656
45987
  if (options.format == null && this.isCompactable()) {
45988
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
45989
+ options._fromSuperclass === true;
45990
+ options = { ...options };
45991
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
45657
45992
 
45658
45993
  const result = await super.toJsonLd({
45659
45994
  ...options,
45660
45995
  format: undefined,
45661
45996
  context: undefined,
45997
+ // @ts-ignore: an internal option
45998
+ _fromSuperclass: true,
45662
45999
  }) as Record<string, unknown>;
45663
46000
 
45664
46001
  // deno-lint-ignore no-unused-vars
@@ -46118,7 +46455,11 @@ get preferredUsernames(): ((string | LanguageString))[] {
46118
46455
  result[\\"type\\"] = \\"Group\\";
46119
46456
  if (this.id != null) result[\\"id\\"] = this.id.href;
46120
46457
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/v1\\",\\"https://w3id.org/security/data-integrity/v1\\",\\"https://www.w3.org/ns/did/v1\\",\\"https://w3id.org/security/multikey/v1\\",{\\"alsoKnownAs\\":{\\"@id\\":\\"as:alsoKnownAs\\",\\"@type\\":\\"@id\\"},\\"manuallyApprovesFollowers\\":\\"as:manuallyApprovesFollowers\\",\\"movedTo\\":{\\"@id\\":\\"as:movedTo\\",\\"@type\\":\\"@id\\"},\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"Emoji\\":\\"toot:Emoji\\",\\"featured\\":{\\"@id\\":\\"toot:featured\\",\\"@type\\":\\"@id\\"},\\"featuredTags\\":{\\"@id\\":\\"toot:featuredTags\\",\\"@type\\":\\"@id\\"},\\"discoverable\\":\\"toot:discoverable\\",\\"suspended\\":\\"toot:suspended\\",\\"memorial\\":\\"toot:memorial\\",\\"indexable\\":\\"toot:indexable\\",\\"schema\\":\\"http://schema.org#\\",\\"PropertyValue\\":\\"schema:PropertyValue\\",\\"value\\":\\"schema:value\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"_misskey_followedMessage\\":\\"misskey:_misskey_followedMessage\\",\\"isCat\\":\\"misskey:isCat\\"}];
46121
- return result;
46458
+ return fromSuperclass ? result : await isolateJsonLdContexts(
46459
+ result,
46460
+ [\\"publicKey\\",\\"assertionMethod\\",\\"inbox\\",\\"outbox\\",\\"following\\",\\"followers\\",\\"liked\\",\\"featured\\",\\"featuredTags\\",\\"streams\\",\\"endpoints\\",\\"movedTo\\",\\"alsoKnownAs\\",\\"service\\",\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
46461
+ options.contextLoader,
46462
+ );
46122
46463
  }
46123
46464
 
46124
46465
  // deno-lint-ignore no-unused-vars prefer-const
@@ -48810,6 +49151,10 @@ get names(): ((string | LanguageString))[] {
48810
49151
  };
48811
49152
 
48812
49153
  if (options.format == null && this.isCompactable()) {
49154
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
49155
+ options._fromSuperclass === true;
49156
+ options = { ...options };
49157
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
48813
49158
  const result: Record<string, unknown> = {};
48814
49159
  // deno-lint-ignore no-unused-vars
48815
49160
  let compactItems: unknown[];
@@ -48956,7 +49301,11 @@ get names(): ((string | LanguageString))[] {
48956
49301
  result[\\"type\\"] = \\"Link\\";
48957
49302
  if (this.id != null) result[\\"id\\"] = this.id.href;
48958
49303
  result[\\"@context\\"] = \\"https://www.w3.org/ns/activitystreams\\";
48959
- return result;
49304
+ return fromSuperclass ? result : await isolateJsonLdContexts(
49305
+ result,
49306
+ [\\"preview\\"],
49307
+ options.contextLoader,
49308
+ );
48960
49309
  }
48961
49310
 
48962
49311
  // deno-lint-ignore no-unused-vars prefer-const
@@ -49810,11 +50159,17 @@ names?: ((string | LanguageString))[];language?: Intl.Locale | null;height?: num
49810
50159
  };
49811
50160
 
49812
50161
  if (options.format == null && this.isCompactable()) {
50162
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
50163
+ options._fromSuperclass === true;
50164
+ options = { ...options };
50165
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
49813
50166
 
49814
50167
  const result = await super.toJsonLd({
49815
50168
  ...options,
49816
50169
  format: undefined,
49817
50170
  context: undefined,
50171
+ // @ts-ignore: an internal option
50172
+ _fromSuperclass: true,
49818
50173
  }) as Record<string, unknown>;
49819
50174
 
49820
50175
  // deno-lint-ignore no-unused-vars
@@ -49823,7 +50178,11 @@ names?: ((string | LanguageString))[];language?: Intl.Locale | null;height?: num
49823
50178
  result[\\"type\\"] = \\"Hashtag\\";
49824
50179
  if (this.id != null) result[\\"id\\"] = this.id.href;
49825
50180
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",{\\"Hashtag\\":\\"as:Hashtag\\"}];
49826
- return result;
50181
+ return fromSuperclass ? result : await isolateJsonLdContexts(
50182
+ result,
50183
+ [\\"preview\\"],
50184
+ options.contextLoader,
50185
+ );
49827
50186
  }
49828
50187
 
49829
50188
  // deno-lint-ignore no-unused-vars prefer-const
@@ -50143,11 +50502,17 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
50143
50502
  };
50144
50503
 
50145
50504
  if (options.format == null && this.isCompactable()) {
50505
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
50506
+ options._fromSuperclass === true;
50507
+ options = { ...options };
50508
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
50146
50509
 
50147
50510
  const result = await super.toJsonLd({
50148
50511
  ...options,
50149
50512
  format: undefined,
50150
50513
  context: undefined,
50514
+ // @ts-ignore: an internal option
50515
+ _fromSuperclass: true,
50151
50516
  }) as Record<string, unknown>;
50152
50517
 
50153
50518
  // deno-lint-ignore no-unused-vars
@@ -50156,7 +50521,11 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
50156
50521
  result[\\"type\\"] = \\"Image\\";
50157
50522
  if (this.id != null) result[\\"id\\"] = this.id.href;
50158
50523
  result[\\"@context\\"] = \\"https://www.w3.org/ns/activitystreams\\";
50159
- return result;
50524
+ return fromSuperclass ? result : await isolateJsonLdContexts(
50525
+ result,
50526
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
50527
+ options.contextLoader,
50528
+ );
50160
50529
  }
50161
50530
 
50162
50531
  // deno-lint-ignore no-unused-vars prefer-const
@@ -52508,11 +52877,17 @@ names?: ((string | LanguageString))[];language?: Intl.Locale | null;height?: num
52508
52877
  };
52509
52878
 
52510
52879
  if (options.format == null && this.isCompactable()) {
52880
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
52881
+ options._fromSuperclass === true;
52882
+ options = { ...options };
52883
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
52511
52884
 
52512
52885
  const result = await super.toJsonLd({
52513
52886
  ...options,
52514
52887
  format: undefined,
52515
52888
  context: undefined,
52889
+ // @ts-ignore: an internal option
52890
+ _fromSuperclass: true,
52516
52891
  }) as Record<string, unknown>;
52517
52892
 
52518
52893
  // deno-lint-ignore no-unused-vars
@@ -52521,7 +52896,11 @@ names?: ((string | LanguageString))[];language?: Intl.Locale | null;height?: num
52521
52896
  result[\\"type\\"] = \\"Mention\\";
52522
52897
  if (this.id != null) result[\\"id\\"] = this.id.href;
52523
52898
  result[\\"@context\\"] = \\"https://www.w3.org/ns/activitystreams\\";
52524
- return result;
52899
+ return fromSuperclass ? result : await isolateJsonLdContexts(
52900
+ result,
52901
+ [\\"preview\\"],
52902
+ options.contextLoader,
52903
+ );
52525
52904
  }
52526
52905
 
52527
52906
  // deno-lint-ignore no-unused-vars prefer-const
@@ -53235,11 +53614,17 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
53235
53614
  };
53236
53615
 
53237
53616
  if (options.format == null && this.isCompactable()) {
53617
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
53618
+ options._fromSuperclass === true;
53619
+ options = { ...options };
53620
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
53238
53621
 
53239
53622
  const result = await super.toJsonLd({
53240
53623
  ...options,
53241
53624
  format: undefined,
53242
53625
  context: undefined,
53626
+ // @ts-ignore: an internal option
53627
+ _fromSuperclass: true,
53243
53628
  }) as Record<string, unknown>;
53244
53629
 
53245
53630
  // deno-lint-ignore no-unused-vars
@@ -53274,7 +53659,11 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
53274
53659
  result[\\"type\\"] = \\"Note\\";
53275
53660
  if (this.id != null) result[\\"id\\"] = this.id.href;
53276
53661
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"sensitive\\":\\"as:sensitive\\",\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
53277
- return result;
53662
+ return fromSuperclass ? result : await isolateJsonLdContexts(
53663
+ result,
53664
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
53665
+ options.contextLoader,
53666
+ );
53278
53667
  }
53279
53668
 
53280
53669
  // deno-lint-ignore no-unused-vars prefer-const
@@ -53965,11 +54354,17 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
53965
54354
  };
53966
54355
 
53967
54356
  if (options.format == null && this.isCompactable()) {
54357
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
54358
+ options._fromSuperclass === true;
54359
+ options = { ...options };
54360
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
53968
54361
 
53969
54362
  const result = await super.toJsonLd({
53970
54363
  ...options,
53971
54364
  format: undefined,
53972
54365
  context: undefined,
54366
+ // @ts-ignore: an internal option
54367
+ _fromSuperclass: true,
53973
54368
  }) as Record<string, unknown>;
53974
54369
  delete result[\\"items\\"];
53975
54370
  // deno-lint-ignore no-unused-vars
@@ -53999,7 +54394,11 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
53999
54394
  result[\\"type\\"] = \\"OrderedCollection\\";
54000
54395
  if (this.id != null) result[\\"id\\"] = this.id.href;
54001
54396
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"ChatMessage\\":\\"http://litepub.social/ns#ChatMessage\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":\\"toot:votersCount\\",\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
54002
- return result;
54397
+ return fromSuperclass ? result : await isolateJsonLdContexts(
54398
+ result,
54399
+ [\\"orderedItems\\",\\"current\\",\\"first\\",\\"last\\",\\"items\\",\\"likesOf\\",\\"sharesOf\\",\\"repliesOf\\",\\"inboxOf\\",\\"outboxOf\\",\\"followersOf\\",\\"followingOf\\",\\"likedOf\\",\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
54400
+ options.contextLoader,
54401
+ );
54003
54402
  }
54004
54403
 
54005
54404
  // deno-lint-ignore no-unused-vars prefer-const
@@ -54741,11 +55140,17 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
54741
55140
  };
54742
55141
 
54743
55142
  if (options.format == null && this.isCompactable()) {
55143
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
55144
+ options._fromSuperclass === true;
55145
+ options = { ...options };
55146
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
54744
55147
 
54745
55148
  const result = await super.toJsonLd({
54746
55149
  ...options,
54747
55150
  format: undefined,
54748
55151
  context: undefined,
55152
+ // @ts-ignore: an internal option
55153
+ _fromSuperclass: true,
54749
55154
  }) as Record<string, unknown>;
54750
55155
  delete result[\\"items\\"];
54751
55156
  // deno-lint-ignore no-unused-vars
@@ -54791,7 +55196,11 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
54791
55196
  result[\\"type\\"] = \\"OrderedCollectionPage\\";
54792
55197
  if (this.id != null) result[\\"id\\"] = this.id.href;
54793
55198
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\",{\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"fedibird\\":\\"http://fedibird.com/ns#\\",\\"ChatMessage\\":\\"http://litepub.social/ns#ChatMessage\\",\\"sensitive\\":\\"as:sensitive\\",\\"votersCount\\":\\"toot:votersCount\\",\\"Emoji\\":\\"toot:Emoji\\",\\"Hashtag\\":\\"as:Hashtag\\",\\"quoteUrl\\":\\"as:quoteUrl\\",\\"_misskey_quote\\":\\"misskey:_misskey_quote\\",\\"quoteUri\\":\\"fedibird:quoteUri\\",\\"emojiReactions\\":{\\"@id\\":\\"fedibird:emojiReactions\\",\\"@type\\":\\"@id\\"}}];
54794
- return result;
55199
+ return fromSuperclass ? result : await isolateJsonLdContexts(
55200
+ result,
55201
+ [\\"orderedItems\\",\\"partOf\\",\\"next\\",\\"prev\\",\\"current\\",\\"first\\",\\"last\\",\\"items\\",\\"likesOf\\",\\"sharesOf\\",\\"repliesOf\\",\\"inboxOf\\",\\"outboxOf\\",\\"followersOf\\",\\"followingOf\\",\\"likedOf\\",\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
55202
+ options.contextLoader,
55203
+ );
54795
55204
  }
54796
55205
 
54797
55206
  // deno-lint-ignore no-unused-vars prefer-const
@@ -59807,11 +60216,17 @@ get preferredUsernames(): ((string | LanguageString))[] {
59807
60216
  };
59808
60217
 
59809
60218
  if (options.format == null && this.isCompactable()) {
60219
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
60220
+ options._fromSuperclass === true;
60221
+ options = { ...options };
60222
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
59810
60223
 
59811
60224
  const result = await super.toJsonLd({
59812
60225
  ...options,
59813
60226
  format: undefined,
59814
60227
  context: undefined,
60228
+ // @ts-ignore: an internal option
60229
+ _fromSuperclass: true,
59815
60230
  }) as Record<string, unknown>;
59816
60231
 
59817
60232
  // deno-lint-ignore no-unused-vars
@@ -60271,7 +60686,11 @@ get preferredUsernames(): ((string | LanguageString))[] {
60271
60686
  result[\\"type\\"] = \\"Organization\\";
60272
60687
  if (this.id != null) result[\\"id\\"] = this.id.href;
60273
60688
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/v1\\",\\"https://w3id.org/security/data-integrity/v1\\",\\"https://www.w3.org/ns/did/v1\\",\\"https://w3id.org/security/multikey/v1\\",{\\"alsoKnownAs\\":{\\"@id\\":\\"as:alsoKnownAs\\",\\"@type\\":\\"@id\\"},\\"manuallyApprovesFollowers\\":\\"as:manuallyApprovesFollowers\\",\\"movedTo\\":{\\"@id\\":\\"as:movedTo\\",\\"@type\\":\\"@id\\"},\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"Emoji\\":\\"toot:Emoji\\",\\"featured\\":{\\"@id\\":\\"toot:featured\\",\\"@type\\":\\"@id\\"},\\"featuredTags\\":{\\"@id\\":\\"toot:featuredTags\\",\\"@type\\":\\"@id\\"},\\"discoverable\\":\\"toot:discoverable\\",\\"suspended\\":\\"toot:suspended\\",\\"memorial\\":\\"toot:memorial\\",\\"indexable\\":\\"toot:indexable\\",\\"schema\\":\\"http://schema.org#\\",\\"PropertyValue\\":\\"schema:PropertyValue\\",\\"value\\":\\"schema:value\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"_misskey_followedMessage\\":\\"misskey:_misskey_followedMessage\\",\\"isCat\\":\\"misskey:isCat\\"}];
60274
- return result;
60689
+ return fromSuperclass ? result : await isolateJsonLdContexts(
60690
+ result,
60691
+ [\\"publicKey\\",\\"assertionMethod\\",\\"inbox\\",\\"outbox\\",\\"following\\",\\"followers\\",\\"liked\\",\\"featured\\",\\"featuredTags\\",\\"streams\\",\\"endpoints\\",\\"movedTo\\",\\"alsoKnownAs\\",\\"service\\",\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
60692
+ options.contextLoader,
60693
+ );
60275
60694
  }
60276
60695
 
60277
60696
  // deno-lint-ignore no-unused-vars prefer-const
@@ -62216,11 +62635,17 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
62216
62635
  };
62217
62636
 
62218
62637
  if (options.format == null && this.isCompactable()) {
62638
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
62639
+ options._fromSuperclass === true;
62640
+ options = { ...options };
62641
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
62219
62642
 
62220
62643
  const result = await super.toJsonLd({
62221
62644
  ...options,
62222
62645
  format: undefined,
62223
62646
  context: undefined,
62647
+ // @ts-ignore: an internal option
62648
+ _fromSuperclass: true,
62224
62649
  }) as Record<string, unknown>;
62225
62650
 
62226
62651
  // deno-lint-ignore no-unused-vars
@@ -62229,7 +62654,11 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
62229
62654
  result[\\"type\\"] = \\"Page\\";
62230
62655
  if (this.id != null) result[\\"id\\"] = this.id.href;
62231
62656
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\"];
62232
- return result;
62657
+ return fromSuperclass ? result : await isolateJsonLdContexts(
62658
+ result,
62659
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
62660
+ options.contextLoader,
62661
+ );
62233
62662
  }
62234
62663
 
62235
62664
  // deno-lint-ignore no-unused-vars prefer-const
@@ -67095,11 +67524,17 @@ get preferredUsernames(): ((string | LanguageString))[] {
67095
67524
  };
67096
67525
 
67097
67526
  if (options.format == null && this.isCompactable()) {
67527
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
67528
+ options._fromSuperclass === true;
67529
+ options = { ...options };
67530
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
67098
67531
 
67099
67532
  const result = await super.toJsonLd({
67100
67533
  ...options,
67101
67534
  format: undefined,
67102
67535
  context: undefined,
67536
+ // @ts-ignore: an internal option
67537
+ _fromSuperclass: true,
67103
67538
  }) as Record<string, unknown>;
67104
67539
 
67105
67540
  // deno-lint-ignore no-unused-vars
@@ -67559,7 +67994,11 @@ get preferredUsernames(): ((string | LanguageString))[] {
67559
67994
  result[\\"type\\"] = \\"Person\\";
67560
67995
  if (this.id != null) result[\\"id\\"] = this.id.href;
67561
67996
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/v1\\",\\"https://w3id.org/security/data-integrity/v1\\",\\"https://www.w3.org/ns/did/v1\\",\\"https://w3id.org/security/multikey/v1\\",{\\"alsoKnownAs\\":{\\"@id\\":\\"as:alsoKnownAs\\",\\"@type\\":\\"@id\\"},\\"manuallyApprovesFollowers\\":\\"as:manuallyApprovesFollowers\\",\\"movedTo\\":{\\"@id\\":\\"as:movedTo\\",\\"@type\\":\\"@id\\"},\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"Emoji\\":\\"toot:Emoji\\",\\"featured\\":{\\"@id\\":\\"toot:featured\\",\\"@type\\":\\"@id\\"},\\"featuredTags\\":{\\"@id\\":\\"toot:featuredTags\\",\\"@type\\":\\"@id\\"},\\"discoverable\\":\\"toot:discoverable\\",\\"suspended\\":\\"toot:suspended\\",\\"memorial\\":\\"toot:memorial\\",\\"indexable\\":\\"toot:indexable\\",\\"schema\\":\\"http://schema.org#\\",\\"PropertyValue\\":\\"schema:PropertyValue\\",\\"value\\":\\"schema:value\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"_misskey_followedMessage\\":\\"misskey:_misskey_followedMessage\\",\\"isCat\\":\\"misskey:isCat\\"}];
67562
- return result;
67997
+ return fromSuperclass ? result : await isolateJsonLdContexts(
67998
+ result,
67999
+ [\\"publicKey\\",\\"assertionMethod\\",\\"inbox\\",\\"outbox\\",\\"following\\",\\"followers\\",\\"liked\\",\\"featured\\",\\"featuredTags\\",\\"streams\\",\\"endpoints\\",\\"movedTo\\",\\"alsoKnownAs\\",\\"service\\",\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
68000
+ options.contextLoader,
68001
+ );
67563
68002
  }
67564
68003
 
67565
68004
  // deno-lint-ignore no-unused-vars prefer-const
@@ -69759,11 +70198,17 @@ proofs?: (DataIntegrityProof | URL)[];accuracy?: number | null;altitude?: number
69759
70198
  };
69760
70199
 
69761
70200
  if (options.format == null && this.isCompactable()) {
70201
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
70202
+ options._fromSuperclass === true;
70203
+ options = { ...options };
70204
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
69762
70205
 
69763
70206
  const result = await super.toJsonLd({
69764
70207
  ...options,
69765
70208
  format: undefined,
69766
70209
  context: undefined,
70210
+ // @ts-ignore: an internal option
70211
+ _fromSuperclass: true,
69767
70212
  }) as Record<string, unknown>;
69768
70213
 
69769
70214
  // deno-lint-ignore no-unused-vars
@@ -69868,7 +70313,11 @@ proofs?: (DataIntegrityProof | URL)[];accuracy?: number | null;altitude?: number
69868
70313
  result[\\"type\\"] = \\"Place\\";
69869
70314
  if (this.id != null) result[\\"id\\"] = this.id.href;
69870
70315
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\"];
69871
- return result;
70316
+ return fromSuperclass ? result : await isolateJsonLdContexts(
70317
+ result,
70318
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
70319
+ options.contextLoader,
70320
+ );
69872
70321
  }
69873
70322
 
69874
70323
  // deno-lint-ignore no-unused-vars prefer-const
@@ -70850,11 +71299,17 @@ proofs?: (DataIntegrityProof | URL)[];describes?: Object | URL | null;}
70850
71299
  };
70851
71300
 
70852
71301
  if (options.format == null && this.isCompactable()) {
71302
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
71303
+ options._fromSuperclass === true;
71304
+ options = { ...options };
71305
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
70853
71306
 
70854
71307
  const result = await super.toJsonLd({
70855
71308
  ...options,
70856
71309
  format: undefined,
70857
71310
  context: undefined,
71311
+ // @ts-ignore: an internal option
71312
+ _fromSuperclass: true,
70858
71313
  }) as Record<string, unknown>;
70859
71314
 
70860
71315
  // deno-lint-ignore no-unused-vars
@@ -70883,7 +71338,11 @@ proofs?: (DataIntegrityProof | URL)[];describes?: Object | URL | null;}
70883
71338
  result[\\"type\\"] = \\"Profile\\";
70884
71339
  if (this.id != null) result[\\"id\\"] = this.id.href;
70885
71340
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\"];
70886
- return result;
71341
+ return fromSuperclass ? result : await isolateJsonLdContexts(
71342
+ result,
71343
+ [\\"describes\\",\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
71344
+ options.contextLoader,
71345
+ );
70887
71346
  }
70888
71347
 
70889
71348
  // deno-lint-ignore no-unused-vars prefer-const
@@ -74459,11 +74918,17 @@ relationships?: (Object | URL)[];}
74459
74918
  };
74460
74919
 
74461
74920
  if (options.format == null && this.isCompactable()) {
74921
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
74922
+ options._fromSuperclass === true;
74923
+ options = { ...options };
74924
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
74462
74925
 
74463
74926
  const result = await super.toJsonLd({
74464
74927
  ...options,
74465
74928
  format: undefined,
74466
74929
  context: undefined,
74930
+ // @ts-ignore: an internal option
74931
+ _fromSuperclass: true,
74467
74932
  }) as Record<string, unknown>;
74468
74933
 
74469
74934
  // deno-lint-ignore no-unused-vars
@@ -74532,7 +74997,11 @@ relationships?: (Object | URL)[];}
74532
74997
  result[\\"type\\"] = \\"Relationship\\";
74533
74998
  if (this.id != null) result[\\"id\\"] = this.id.href;
74534
74999
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\"];
74535
- return result;
75000
+ return fromSuperclass ? result : await isolateJsonLdContexts(
75001
+ result,
75002
+ [\\"subject\\",\\"object\\",\\"relationship\\",\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
75003
+ options.contextLoader,
75004
+ );
74536
75005
  }
74537
75006
 
74538
75007
  // deno-lint-ignore no-unused-vars prefer-const
@@ -79973,11 +80442,17 @@ get preferredUsernames(): ((string | LanguageString))[] {
79973
80442
  };
79974
80443
 
79975
80444
  if (options.format == null && this.isCompactable()) {
80445
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
80446
+ options._fromSuperclass === true;
80447
+ options = { ...options };
80448
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
79976
80449
 
79977
80450
  const result = await super.toJsonLd({
79978
80451
  ...options,
79979
80452
  format: undefined,
79980
80453
  context: undefined,
80454
+ // @ts-ignore: an internal option
80455
+ _fromSuperclass: true,
79981
80456
  }) as Record<string, unknown>;
79982
80457
 
79983
80458
  // deno-lint-ignore no-unused-vars
@@ -80437,7 +80912,11 @@ get preferredUsernames(): ((string | LanguageString))[] {
80437
80912
  result[\\"type\\"] = \\"Service\\";
80438
80913
  if (this.id != null) result[\\"id\\"] = this.id.href;
80439
80914
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/v1\\",\\"https://w3id.org/security/data-integrity/v1\\",\\"https://www.w3.org/ns/did/v1\\",\\"https://w3id.org/security/multikey/v1\\",{\\"alsoKnownAs\\":{\\"@id\\":\\"as:alsoKnownAs\\",\\"@type\\":\\"@id\\"},\\"manuallyApprovesFollowers\\":\\"as:manuallyApprovesFollowers\\",\\"movedTo\\":{\\"@id\\":\\"as:movedTo\\",\\"@type\\":\\"@id\\"},\\"toot\\":\\"http://joinmastodon.org/ns#\\",\\"Emoji\\":\\"toot:Emoji\\",\\"featured\\":{\\"@id\\":\\"toot:featured\\",\\"@type\\":\\"@id\\"},\\"featuredTags\\":{\\"@id\\":\\"toot:featuredTags\\",\\"@type\\":\\"@id\\"},\\"discoverable\\":\\"toot:discoverable\\",\\"suspended\\":\\"toot:suspended\\",\\"memorial\\":\\"toot:memorial\\",\\"indexable\\":\\"toot:indexable\\",\\"schema\\":\\"http://schema.org#\\",\\"PropertyValue\\":\\"schema:PropertyValue\\",\\"value\\":\\"schema:value\\",\\"misskey\\":\\"https://misskey-hub.net/ns#\\",\\"_misskey_followedMessage\\":\\"misskey:_misskey_followedMessage\\",\\"isCat\\":\\"misskey:isCat\\"}];
80440
- return result;
80915
+ return fromSuperclass ? result : await isolateJsonLdContexts(
80916
+ result,
80917
+ [\\"publicKey\\",\\"assertionMethod\\",\\"inbox\\",\\"outbox\\",\\"following\\",\\"followers\\",\\"liked\\",\\"featured\\",\\"featuredTags\\",\\"streams\\",\\"endpoints\\",\\"movedTo\\",\\"alsoKnownAs\\",\\"service\\",\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
80918
+ options.contextLoader,
80919
+ );
80441
80920
  }
80442
80921
 
80443
80922
  // deno-lint-ignore no-unused-vars prefer-const
@@ -82565,6 +83044,10 @@ get contents(): ((string | LanguageString))[] {
82565
83044
  };
82566
83045
 
82567
83046
  if (options.format == null && this.isCompactable()) {
83047
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
83048
+ options._fromSuperclass === true;
83049
+ options = { ...options };
83050
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
82568
83051
  const result: Record<string, unknown> = {};
82569
83052
  // deno-lint-ignore no-unused-vars
82570
83053
  let compactItems: unknown[];
@@ -82607,7 +83090,11 @@ get contents(): ((string | LanguageString))[] {
82607
83090
  result[\\"type\\"] = \\"as:Source\\";
82608
83091
  if (this.id != null) result[\\"id\\"] = this.id.href;
82609
83092
  result[\\"@context\\"] = \\"https://www.w3.org/ns/activitystreams\\";
82610
- return result;
83093
+ return fromSuperclass ? result : await isolateJsonLdContexts(
83094
+ result,
83095
+ [],
83096
+ options.contextLoader,
83097
+ );
82611
83098
  }
82612
83099
 
82613
83100
  // deno-lint-ignore no-unused-vars prefer-const
@@ -83795,11 +84282,17 @@ proofs?: (DataIntegrityProof | URL)[];deleted?: Temporal.Instant | null;}
83795
84282
  };
83796
84283
 
83797
84284
  if (options.format == null && this.isCompactable()) {
84285
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
84286
+ options._fromSuperclass === true;
84287
+ options = { ...options };
84288
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
83798
84289
 
83799
84290
  const result = await super.toJsonLd({
83800
84291
  ...options,
83801
84292
  format: undefined,
83802
84293
  context: undefined,
84294
+ // @ts-ignore: an internal option
84295
+ _fromSuperclass: true,
83803
84296
  }) as Record<string, unknown>;
83804
84297
 
83805
84298
  // deno-lint-ignore no-unused-vars
@@ -83824,7 +84317,11 @@ proofs?: (DataIntegrityProof | URL)[];deleted?: Temporal.Instant | null;}
83824
84317
  result[\\"type\\"] = \\"Tombstone\\";
83825
84318
  if (this.id != null) result[\\"id\\"] = this.id.href;
83826
84319
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\"];
83827
- return result;
84320
+ return fromSuperclass ? result : await isolateJsonLdContexts(
84321
+ result,
84322
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
84323
+ options.contextLoader,
84324
+ );
83828
84325
  }
83829
84326
 
83830
84327
  // deno-lint-ignore no-unused-vars prefer-const
@@ -85250,11 +85747,17 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
85250
85747
  };
85251
85748
 
85252
85749
  if (options.format == null && this.isCompactable()) {
85750
+ const fromSuperclass = \\"_fromSuperclass\\" in options &&
85751
+ options._fromSuperclass === true;
85752
+ options = { ...options };
85753
+ if (\\"_fromSuperclass\\" in options) delete options._fromSuperclass;
85253
85754
 
85254
85755
  const result = await super.toJsonLd({
85255
85756
  ...options,
85256
85757
  format: undefined,
85257
85758
  context: undefined,
85759
+ // @ts-ignore: an internal option
85760
+ _fromSuperclass: true,
85258
85761
  }) as Record<string, unknown>;
85259
85762
 
85260
85763
  // deno-lint-ignore no-unused-vars
@@ -85263,7 +85766,11 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
85263
85766
  result[\\"type\\"] = \\"Video\\";
85264
85767
  if (this.id != null) result[\\"id\\"] = this.id.href;
85265
85768
  result[\\"@context\\"] = [\\"https://www.w3.org/ns/activitystreams\\",\\"https://w3id.org/security/data-integrity/v1\\"];
85266
- return result;
85769
+ return fromSuperclass ? result : await isolateJsonLdContexts(
85770
+ result,
85771
+ [\\"attachment\\",\\"attributedTo\\",\\"audience\\",\\"context\\",\\"generator\\",\\"icon\\",\\"image\\",\\"inReplyTo\\",\\"location\\",\\"preview\\",\\"replies\\",\\"shares\\",\\"likes\\",\\"emojiReactions\\",\\"tag\\",\\"url\\",\\"to\\",\\"bto\\",\\"cc\\",\\"bcc\\",\\"source\\",\\"proof\\"],
85772
+ options.contextLoader,
85773
+ );
85267
85774
  }
85268
85775
 
85269
85776
  // deno-lint-ignore no-unused-vars prefer-const