@fedify/fedify 1.0.2 → 1.0.4

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.
Files changed (26) hide show
  1. package/CHANGES.md +22 -0
  2. package/esm/federation/handler.js +1 -1
  3. package/esm/vocab/application.yaml +4 -1
  4. package/esm/vocab/group.yaml +4 -1
  5. package/esm/vocab/organization.yaml +4 -1
  6. package/esm/vocab/person.yaml +4 -1
  7. package/esm/vocab/service.yaml +4 -1
  8. package/esm/vocab/vocab.js +427 -160
  9. package/esm/webfinger/handler.js +1 -1
  10. package/package.json +1 -1
  11. package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/common.d.ts.map +1 -1
  12. package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/encoding.d.ts.map +1 -1
  13. package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/language.d.ts.map +1 -1
  14. package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/media_type.d.ts.map +1 -1
  15. package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/negotiation.d.ts.map +1 -1
  16. package/types/vocab/vocab.d.ts.map +1 -1
  17. /package/esm/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/common.js +0 -0
  18. /package/esm/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/encoding.js +0 -0
  19. /package/esm/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/language.js +0 -0
  20. /package/esm/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/media_type.js +0 -0
  21. /package/esm/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/negotiation.js +0 -0
  22. /package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/common.d.ts +0 -0
  23. /package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/encoding.d.ts +0 -0
  24. /package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/language.d.ts +0 -0
  25. /package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/media_type.d.ts +0 -0
  26. /package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/negotiation.d.ts +0 -0
@@ -3701,7 +3701,8 @@ export class Object {
3701
3701
  // deno-lint-ignore no-explicit-any
3702
3702
  (expanded[0] ?? {});
3703
3703
  }
3704
- if ("@type" in values) {
3704
+ if ("@type" in values &&
3705
+ !values["@type"].every((t) => t.startsWith("_:"))) {
3705
3706
  if (values["@type"].includes("http://joinmastodon.org/ns#Emoji")) {
3706
3707
  return await Emoji.fromJsonLd(json, options);
3707
3708
  }
@@ -3878,7 +3879,9 @@ export class Object {
3878
3879
  continue;
3879
3880
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
3880
3881
  globalThis.Object.keys(v).length === 1) {
3881
- _49BipA5dq9eoH8LX8xdsVumveTca_attachment.push(new URL(v["@id"]));
3882
+ _49BipA5dq9eoH8LX8xdsVumveTca_attachment.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
3883
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
3884
+ : new URL(v["@id"]));
3882
3885
  continue;
3883
3886
  }
3884
3887
  const decoded = typeof v === "object" && "@type" in v &&
@@ -3971,7 +3974,9 @@ export class Object {
3971
3974
  continue;
3972
3975
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
3973
3976
  globalThis.Object.keys(v).length === 1) {
3974
- _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py_attributedTo.push(new URL(v["@id"]));
3977
+ _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py_attributedTo.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
3978
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
3979
+ : new URL(v["@id"]));
3975
3980
  continue;
3976
3981
  }
3977
3982
  const decoded = typeof v === "object" && "@type" in v &&
@@ -4013,7 +4018,9 @@ export class Object {
4013
4018
  continue;
4014
4019
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4015
4020
  globalThis.Object.keys(v).length === 1) {
4016
- _3ocC3VVi88cEd5sPWL8djkZsvTN6_audience.push(new URL(v["@id"]));
4021
+ _3ocC3VVi88cEd5sPWL8djkZsvTN6_audience.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4022
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4023
+ : new URL(v["@id"]));
4017
4024
  continue;
4018
4025
  }
4019
4026
  _3ocC3VVi88cEd5sPWL8djkZsvTN6_audience.push(await _a.fromJsonLd(v, options));
@@ -4056,7 +4063,9 @@ export class Object {
4056
4063
  continue;
4057
4064
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4058
4065
  globalThis.Object.keys(v).length === 1) {
4059
- _3mhZzGXSpQ431mBSz2kvych22v4e_context.push(new URL(v["@id"]));
4066
+ _3mhZzGXSpQ431mBSz2kvych22v4e_context.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4067
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4068
+ : new URL(v["@id"]));
4060
4069
  continue;
4061
4070
  }
4062
4071
  const decoded = typeof v === "object" && "@type" in v &&
@@ -4183,7 +4192,9 @@ export class Object {
4183
4192
  continue;
4184
4193
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4185
4194
  globalThis.Object.keys(v).length === 1) {
4186
- _86xFhmgBapoMvYqjbjRuDPayTrS_generator.push(new URL(v["@id"]));
4195
+ _86xFhmgBapoMvYqjbjRuDPayTrS_generator.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4196
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4197
+ : new URL(v["@id"]));
4187
4198
  continue;
4188
4199
  }
4189
4200
  const decoded = typeof v === "object" && "@type" in v &&
@@ -4272,7 +4283,9 @@ export class Object {
4272
4283
  continue;
4273
4284
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4274
4285
  globalThis.Object.keys(v).length === 1) {
4275
- _33CjRLy5ujtsUrwRSCrsggvGdKuR_icon.push(new URL(v["@id"]));
4286
+ _33CjRLy5ujtsUrwRSCrsggvGdKuR_icon.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4287
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4288
+ : new URL(v["@id"]));
4276
4289
  continue;
4277
4290
  }
4278
4291
  _33CjRLy5ujtsUrwRSCrsggvGdKuR_icon.push(await Image.fromJsonLd(v, options));
@@ -4291,7 +4304,9 @@ export class Object {
4291
4304
  continue;
4292
4305
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4293
4306
  globalThis.Object.keys(v).length === 1) {
4294
- _3dXrUdkARxwyJLtJcYi1AJ92H41U_image.push(new URL(v["@id"]));
4307
+ _3dXrUdkARxwyJLtJcYi1AJ92H41U_image.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4308
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4309
+ : new URL(v["@id"]));
4295
4310
  continue;
4296
4311
  }
4297
4312
  _3dXrUdkARxwyJLtJcYi1AJ92H41U_image.push(await Image.fromJsonLd(v, options));
@@ -4310,7 +4325,9 @@ export class Object {
4310
4325
  continue;
4311
4326
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4312
4327
  globalThis.Object.keys(v).length === 1) {
4313
- _3fpbDrvZgf3Kq1a5V9aByFn8kx3s_inReplyTo.push(new URL(v["@id"]));
4328
+ _3fpbDrvZgf3Kq1a5V9aByFn8kx3s_inReplyTo.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4329
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4330
+ : new URL(v["@id"]));
4314
4331
  continue;
4315
4332
  }
4316
4333
  const decoded = typeof v === "object" && "@type" in v &&
@@ -4399,7 +4416,9 @@ export class Object {
4399
4416
  continue;
4400
4417
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4401
4418
  globalThis.Object.keys(v).length === 1) {
4402
- _31k5MUZJsnsPNg8dQQJieWaXTFnR_location.push(new URL(v["@id"]));
4419
+ _31k5MUZJsnsPNg8dQQJieWaXTFnR_location.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4420
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4421
+ : new URL(v["@id"]));
4403
4422
  continue;
4404
4423
  }
4405
4424
  const decoded = typeof v === "object" && "@type" in v &&
@@ -4488,7 +4507,9 @@ export class Object {
4488
4507
  continue;
4489
4508
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4490
4509
  globalThis.Object.keys(v).length === 1) {
4491
- _gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(new URL(v["@id"]));
4510
+ _gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4511
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4512
+ : new URL(v["@id"]));
4492
4513
  continue;
4493
4514
  }
4494
4515
  const decoded = typeof v === "object" && "@type" in v &&
@@ -4591,7 +4612,9 @@ export class Object {
4591
4612
  continue;
4592
4613
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4593
4614
  globalThis.Object.keys(v).length === 1) {
4594
- _7UpwM3JWcXhADcscukEehBorf6k_replies.push(new URL(v["@id"]));
4615
+ _7UpwM3JWcXhADcscukEehBorf6k_replies.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4616
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4617
+ : new URL(v["@id"]));
4595
4618
  continue;
4596
4619
  }
4597
4620
  _7UpwM3JWcXhADcscukEehBorf6k_replies.push(await Collection.fromJsonLd(v, options));
@@ -4648,7 +4671,9 @@ export class Object {
4648
4671
  continue;
4649
4672
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4650
4673
  globalThis.Object.keys(v).length === 1) {
4651
- _5chuqj6s95p5gg2sk1HntGfarRf_tag.push(new URL(v["@id"]));
4674
+ _5chuqj6s95p5gg2sk1HntGfarRf_tag.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4675
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4676
+ : new URL(v["@id"]));
4652
4677
  continue;
4653
4678
  }
4654
4679
  const decoded = typeof v === "object" && "@type" in v &&
@@ -4780,7 +4805,9 @@ export class Object {
4780
4805
  continue;
4781
4806
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4782
4807
  globalThis.Object.keys(v).length === 1) {
4783
- _3hFbw7DTpHhq3cvVhkY8njhcsXbd_to.push(new URL(v["@id"]));
4808
+ _3hFbw7DTpHhq3cvVhkY8njhcsXbd_to.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4809
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4810
+ : new URL(v["@id"]));
4784
4811
  continue;
4785
4812
  }
4786
4813
  _3hFbw7DTpHhq3cvVhkY8njhcsXbd_to.push(await _a.fromJsonLd(v, options));
@@ -4799,7 +4826,9 @@ export class Object {
4799
4826
  continue;
4800
4827
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4801
4828
  globalThis.Object.keys(v).length === 1) {
4802
- _aLZupjwL8XB7tzdLgCMXdjZ6qej_bto.push(new URL(v["@id"]));
4829
+ _aLZupjwL8XB7tzdLgCMXdjZ6qej_bto.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4830
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4831
+ : new URL(v["@id"]));
4803
4832
  continue;
4804
4833
  }
4805
4834
  _aLZupjwL8XB7tzdLgCMXdjZ6qej_bto.push(await _a.fromJsonLd(v, options));
@@ -4818,7 +4847,9 @@ export class Object {
4818
4847
  continue;
4819
4848
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4820
4849
  globalThis.Object.keys(v).length === 1) {
4821
- _42a1SvBs24QSLzKcfjCyNTjW5a1g_cc.push(new URL(v["@id"]));
4850
+ _42a1SvBs24QSLzKcfjCyNTjW5a1g_cc.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4851
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4852
+ : new URL(v["@id"]));
4822
4853
  continue;
4823
4854
  }
4824
4855
  _42a1SvBs24QSLzKcfjCyNTjW5a1g_cc.push(await _a.fromJsonLd(v, options));
@@ -4837,7 +4868,9 @@ export class Object {
4837
4868
  continue;
4838
4869
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4839
4870
  globalThis.Object.keys(v).length === 1) {
4840
- _3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc.push(new URL(v["@id"]));
4871
+ _3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4872
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4873
+ : new URL(v["@id"]));
4841
4874
  continue;
4842
4875
  }
4843
4876
  _3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc.push(await _a.fromJsonLd(v, options));
@@ -4912,7 +4945,9 @@ export class Object {
4912
4945
  continue;
4913
4946
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
4914
4947
  globalThis.Object.keys(v).length === 1) {
4915
- _42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.push(new URL(v["@id"]));
4948
+ _42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
4949
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
4950
+ : new URL(v["@id"]));
4916
4951
  continue;
4917
4952
  }
4918
4953
  _42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.push(await DataIntegrityProof.fromJsonLd(v, options));
@@ -5522,7 +5557,8 @@ export class Emoji extends Object {
5522
5557
  // deno-lint-ignore no-explicit-any
5523
5558
  (expanded[0] ?? {});
5524
5559
  }
5525
- if ("@type" in values) {
5560
+ if ("@type" in values &&
5561
+ !values["@type"].every((t) => t.startsWith("_:"))) {
5526
5562
  if (!values["@type"].includes("http://joinmastodon.org/ns#Emoji")) {
5527
5563
  throw new TypeError("Invalid type: " + values["@type"]);
5528
5564
  }
@@ -5786,7 +5822,8 @@ export class ChatMessage extends Object {
5786
5822
  // deno-lint-ignore no-explicit-any
5787
5823
  (expanded[0] ?? {});
5788
5824
  }
5789
- if ("@type" in values) {
5825
+ if ("@type" in values &&
5826
+ !values["@type"].every((t) => t.startsWith("_:"))) {
5790
5827
  if (!values["@type"].includes("http://litepub.social/ns#ChatMessage")) {
5791
5828
  throw new TypeError("Invalid type: " + values["@type"]);
5792
5829
  }
@@ -6113,7 +6150,8 @@ export class PropertyValue {
6113
6150
  // deno-lint-ignore no-explicit-any
6114
6151
  (expanded[0] ?? {});
6115
6152
  }
6116
- if ("@type" in values) {
6153
+ if ("@type" in values &&
6154
+ !values["@type"].every((t) => t.startsWith("_:"))) {
6117
6155
  if (!values["@type"].includes("http://schema.org#PropertyValue")) {
6118
6156
  throw new TypeError("Invalid type: " + values["@type"]);
6119
6157
  }
@@ -6623,7 +6661,8 @@ export class DataIntegrityProof {
6623
6661
  // deno-lint-ignore no-explicit-any
6624
6662
  (expanded[0] ?? {});
6625
6663
  }
6626
- if ("@type" in values) {
6664
+ if ("@type" in values &&
6665
+ !values["@type"].every((t) => t.startsWith("_:"))) {
6627
6666
  if (!values["@type"].includes("https://w3id.org/security#DataIntegrityProof")) {
6628
6667
  throw new TypeError("Invalid type: " + values["@type"]);
6629
6668
  }
@@ -6657,7 +6696,9 @@ export class DataIntegrityProof {
6657
6696
  continue;
6658
6697
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
6659
6698
  globalThis.Object.keys(v).length === 1) {
6660
- _2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod.push(new URL(v["@id"]));
6699
+ _2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
6700
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
6701
+ : new URL(v["@id"]));
6661
6702
  continue;
6662
6703
  }
6663
6704
  _2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod.push(await Multikey.fromJsonLd(v, options));
@@ -7155,7 +7196,8 @@ export class CryptographicKey {
7155
7196
  // deno-lint-ignore no-explicit-any
7156
7197
  (expanded[0] ?? {});
7157
7198
  }
7158
- if ("@type" in values) {
7199
+ if ("@type" in values &&
7200
+ !values["@type"].every((t) => t.startsWith("_:"))) {
7159
7201
  if (!values["@type"].includes("https://w3id.org/security#Key")) {
7160
7202
  throw new TypeError("Invalid type: " + values["@type"]);
7161
7203
  }
@@ -7173,7 +7215,9 @@ export class CryptographicKey {
7173
7215
  continue;
7174
7216
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
7175
7217
  globalThis.Object.keys(v).length === 1) {
7176
- _5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner.push(new URL(v["@id"]));
7218
+ _5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
7219
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
7220
+ : new URL(v["@id"]));
7177
7221
  continue;
7178
7222
  }
7179
7223
  const decoded = typeof v === "object" && "@type" in v &&
@@ -7646,7 +7690,8 @@ export class Multikey {
7646
7690
  // deno-lint-ignore no-explicit-any
7647
7691
  (expanded[0] ?? {});
7648
7692
  }
7649
- if ("@type" in values) {
7693
+ if ("@type" in values &&
7694
+ !values["@type"].every((t) => t.startsWith("_:"))) {
7650
7695
  if (!values["@type"].includes("https://w3id.org/security#Multikey")) {
7651
7696
  throw new TypeError("Invalid type: " + values["@type"]);
7652
7697
  }
@@ -7664,7 +7709,9 @@ export class Multikey {
7664
7709
  continue;
7665
7710
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
7666
7711
  globalThis.Object.keys(v).length === 1) {
7667
- _2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller.push(new URL(v["@id"]));
7712
+ _2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
7713
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
7714
+ : new URL(v["@id"]));
7668
7715
  continue;
7669
7716
  }
7670
7717
  const decoded = typeof v === "object" && "@type" in v &&
@@ -8847,7 +8894,8 @@ export class Activity extends Object {
8847
8894
  // deno-lint-ignore no-explicit-any
8848
8895
  (expanded[0] ?? {});
8849
8896
  }
8850
- if ("@type" in values) {
8897
+ if ("@type" in values &&
8898
+ !values["@type"].every((t) => t.startsWith("_:"))) {
8851
8899
  if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Accept")) {
8852
8900
  return await Accept.fromJsonLd(json, options);
8853
8901
  }
@@ -8960,7 +9008,9 @@ export class Activity extends Object {
8960
9008
  continue;
8961
9009
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
8962
9010
  globalThis.Object.keys(v).length === 1) {
8963
- _2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor.push(new URL(v["@id"]));
9011
+ _2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
9012
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
9013
+ : new URL(v["@id"]));
8964
9014
  continue;
8965
9015
  }
8966
9016
  const decoded = typeof v === "object" && "@type" in v &&
@@ -9002,7 +9052,9 @@ export class Activity extends Object {
9002
9052
  continue;
9003
9053
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
9004
9054
  globalThis.Object.keys(v).length === 1) {
9005
- _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(new URL(v["@id"]));
9055
+ _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
9056
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
9057
+ : new URL(v["@id"]));
9006
9058
  continue;
9007
9059
  }
9008
9060
  _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(await Object.fromJsonLd(v, options));
@@ -9021,7 +9073,9 @@ export class Activity extends Object {
9021
9073
  continue;
9022
9074
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
9023
9075
  globalThis.Object.keys(v).length === 1) {
9024
- _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target.push(new URL(v["@id"]));
9076
+ _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
9077
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
9078
+ : new URL(v["@id"]));
9025
9079
  continue;
9026
9080
  }
9027
9081
  _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target.push(await Object.fromJsonLd(v, options));
@@ -9040,7 +9094,9 @@ export class Activity extends Object {
9040
9094
  continue;
9041
9095
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
9042
9096
  globalThis.Object.keys(v).length === 1) {
9043
- _u4QGFbRFcYmPEKGbPv1hpBR9r5G_result.push(new URL(v["@id"]));
9097
+ _u4QGFbRFcYmPEKGbPv1hpBR9r5G_result.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
9098
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
9099
+ : new URL(v["@id"]));
9044
9100
  continue;
9045
9101
  }
9046
9102
  _u4QGFbRFcYmPEKGbPv1hpBR9r5G_result.push(await Object.fromJsonLd(v, options));
@@ -9059,7 +9115,9 @@ export class Activity extends Object {
9059
9115
  continue;
9060
9116
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
9061
9117
  globalThis.Object.keys(v).length === 1) {
9062
- _25zu2s3VxVujgEKqrDycjE284XQR_origin.push(new URL(v["@id"]));
9118
+ _25zu2s3VxVujgEKqrDycjE284XQR_origin.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
9119
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
9120
+ : new URL(v["@id"]));
9063
9121
  continue;
9064
9122
  }
9065
9123
  _25zu2s3VxVujgEKqrDycjE284XQR_origin.push(await Object.fromJsonLd(v, options));
@@ -9078,7 +9136,9 @@ export class Activity extends Object {
9078
9136
  continue;
9079
9137
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
9080
9138
  globalThis.Object.keys(v).length === 1) {
9081
- _3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument.push(new URL(v["@id"]));
9139
+ _3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
9140
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
9141
+ : new URL(v["@id"]));
9082
9142
  continue;
9083
9143
  }
9084
9144
  _3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument.push(await Object.fromJsonLd(v, options));
@@ -9333,7 +9393,8 @@ export class Accept extends Activity {
9333
9393
  // deno-lint-ignore no-explicit-any
9334
9394
  (expanded[0] ?? {});
9335
9395
  }
9336
- if ("@type" in values) {
9396
+ if ("@type" in values &&
9397
+ !values["@type"].every((t) => t.startsWith("_:"))) {
9337
9398
  if (values["@type"].includes("https://www.w3.org/ns/activitystreams#TentativeAccept")) {
9338
9399
  return await TentativeAccept.fromJsonLd(json, options);
9339
9400
  }
@@ -9497,7 +9558,8 @@ export class Add extends Activity {
9497
9558
  // deno-lint-ignore no-explicit-any
9498
9559
  (expanded[0] ?? {});
9499
9560
  }
9500
- if ("@type" in values) {
9561
+ if ("@type" in values &&
9562
+ !values["@type"].every((t) => t.startsWith("_:"))) {
9501
9563
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Add")) {
9502
9564
  throw new TypeError("Invalid type: " + values["@type"]);
9503
9565
  }
@@ -9669,7 +9731,8 @@ export class Announce extends Activity {
9669
9731
  // deno-lint-ignore no-explicit-any
9670
9732
  (expanded[0] ?? {});
9671
9733
  }
9672
- if ("@type" in values) {
9734
+ if ("@type" in values &&
9735
+ !values["@type"].every((t) => t.startsWith("_:"))) {
9673
9736
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Announce")) {
9674
9737
  throw new TypeError("Invalid type: " + values["@type"]);
9675
9738
  }
@@ -11505,6 +11568,7 @@ export class Application extends Object {
11505
11568
  "https://www.w3.org/ns/did/v1",
11506
11569
  "https://w3id.org/security/multikey/v1",
11507
11570
  {
11571
+ "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
11508
11572
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
11509
11573
  "toot": "http://joinmastodon.org/ns#",
11510
11574
  "featured": { "@id": "toot:featured", "@type": "@id" },
@@ -11749,6 +11813,7 @@ export class Application extends Object {
11749
11813
  "https://www.w3.org/ns/did/v1",
11750
11814
  "https://w3id.org/security/multikey/v1",
11751
11815
  {
11816
+ "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
11752
11817
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
11753
11818
  "toot": "http://joinmastodon.org/ns#",
11754
11819
  "featured": { "@id": "toot:featured", "@type": "@id" },
@@ -11818,7 +11883,8 @@ export class Application extends Object {
11818
11883
  // deno-lint-ignore no-explicit-any
11819
11884
  (expanded[0] ?? {});
11820
11885
  }
11821
- if ("@type" in values) {
11886
+ if ("@type" in values &&
11887
+ !values["@type"].every((t) => t.startsWith("_:"))) {
11822
11888
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Application")) {
11823
11889
  throw new TypeError("Invalid type: " + values["@type"]);
11824
11890
  }
@@ -11868,7 +11934,9 @@ export class Application extends Object {
11868
11934
  continue;
11869
11935
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
11870
11936
  globalThis.Object.keys(v).length === 1) {
11871
- _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(new URL(v["@id"]));
11937
+ _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
11938
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
11939
+ : new URL(v["@id"]));
11872
11940
  continue;
11873
11941
  }
11874
11942
  _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, options));
@@ -11887,7 +11955,9 @@ export class Application extends Object {
11887
11955
  continue;
11888
11956
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
11889
11957
  globalThis.Object.keys(v).length === 1) {
11890
- _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(new URL(v["@id"]));
11958
+ _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
11959
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
11960
+ : new URL(v["@id"]));
11891
11961
  continue;
11892
11962
  }
11893
11963
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, options));
@@ -11922,7 +11992,9 @@ export class Application extends Object {
11922
11992
  continue;
11923
11993
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
11924
11994
  globalThis.Object.keys(v).length === 1) {
11925
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(new URL(v["@id"]));
11995
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
11996
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
11997
+ : new URL(v["@id"]));
11926
11998
  continue;
11927
11999
  }
11928
12000
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
@@ -11941,7 +12013,9 @@ export class Application extends Object {
11941
12013
  continue;
11942
12014
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
11943
12015
  globalThis.Object.keys(v).length === 1) {
11944
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(new URL(v["@id"]));
12016
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
12017
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
12018
+ : new URL(v["@id"]));
11945
12019
  continue;
11946
12020
  }
11947
12021
  _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
@@ -11960,7 +12034,9 @@ export class Application extends Object {
11960
12034
  continue;
11961
12035
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
11962
12036
  globalThis.Object.keys(v).length === 1) {
11963
- _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(new URL(v["@id"]));
12037
+ _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
12038
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
12039
+ : new URL(v["@id"]));
11964
12040
  continue;
11965
12041
  }
11966
12042
  _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, options));
@@ -11979,7 +12055,9 @@ export class Application extends Object {
11979
12055
  continue;
11980
12056
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
11981
12057
  globalThis.Object.keys(v).length === 1) {
11982
- _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(new URL(v["@id"]));
12058
+ _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
12059
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
12060
+ : new URL(v["@id"]));
11983
12061
  continue;
11984
12062
  }
11985
12063
  _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, options));
@@ -11998,7 +12076,9 @@ export class Application extends Object {
11998
12076
  continue;
11999
12077
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
12000
12078
  globalThis.Object.keys(v).length === 1) {
12001
- _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(new URL(v["@id"]));
12079
+ _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
12080
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
12081
+ : new URL(v["@id"]));
12002
12082
  continue;
12003
12083
  }
12004
12084
  _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, options));
@@ -12017,7 +12097,9 @@ export class Application extends Object {
12017
12097
  continue;
12018
12098
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
12019
12099
  globalThis.Object.keys(v).length === 1) {
12020
- _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(new URL(v["@id"]));
12100
+ _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
12101
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
12102
+ : new URL(v["@id"]));
12021
12103
  continue;
12022
12104
  }
12023
12105
  _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, options));
@@ -12036,7 +12118,9 @@ export class Application extends Object {
12036
12118
  continue;
12037
12119
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
12038
12120
  globalThis.Object.keys(v).length === 1) {
12039
- _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(new URL(v["@id"]));
12121
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
12122
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
12123
+ : new URL(v["@id"]));
12040
12124
  continue;
12041
12125
  }
12042
12126
  _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, options));
@@ -12055,7 +12139,9 @@ export class Application extends Object {
12055
12139
  continue;
12056
12140
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
12057
12141
  globalThis.Object.keys(v).length === 1) {
12058
- _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(new URL(v["@id"]));
12142
+ _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
12143
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
12144
+ : new URL(v["@id"]));
12059
12145
  continue;
12060
12146
  }
12061
12147
  _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, options));
@@ -12144,7 +12230,9 @@ export class Application extends Object {
12144
12230
  continue;
12145
12231
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
12146
12232
  globalThis.Object.keys(v).length === 1) {
12147
- _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(new URL(v["@id"]));
12233
+ _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
12234
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
12235
+ : new URL(v["@id"]));
12148
12236
  continue;
12149
12237
  }
12150
12238
  const decoded = typeof v === "object" && "@type" in v &&
@@ -12590,7 +12678,8 @@ export class IntransitiveActivity extends Activity {
12590
12678
  // deno-lint-ignore no-explicit-any
12591
12679
  (expanded[0] ?? {});
12592
12680
  }
12593
- if ("@type" in values) {
12681
+ if ("@type" in values &&
12682
+ !values["@type"].every((t) => t.startsWith("_:"))) {
12594
12683
  if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Arrive")) {
12595
12684
  return await Arrive.fromJsonLd(json, options);
12596
12685
  }
@@ -12759,7 +12848,8 @@ export class Arrive extends IntransitiveActivity {
12759
12848
  // deno-lint-ignore no-explicit-any
12760
12849
  (expanded[0] ?? {});
12761
12850
  }
12762
- if ("@type" in values) {
12851
+ if ("@type" in values &&
12852
+ !values["@type"].every((t) => t.startsWith("_:"))) {
12763
12853
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Arrive")) {
12764
12854
  throw new TypeError("Invalid type: " + values["@type"]);
12765
12855
  }
@@ -13021,7 +13111,8 @@ export class Article extends Object {
13021
13111
  // deno-lint-ignore no-explicit-any
13022
13112
  (expanded[0] ?? {});
13023
13113
  }
13024
- if ("@type" in values) {
13114
+ if ("@type" in values &&
13115
+ !values["@type"].every((t) => t.startsWith("_:"))) {
13025
13116
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Article")) {
13026
13117
  throw new TypeError("Invalid type: " + values["@type"]);
13027
13118
  }
@@ -13341,7 +13432,8 @@ export class Document extends Object {
13341
13432
  // deno-lint-ignore no-explicit-any
13342
13433
  (expanded[0] ?? {});
13343
13434
  }
13344
- if ("@type" in values) {
13435
+ if ("@type" in values &&
13436
+ !values["@type"].every((t) => t.startsWith("_:"))) {
13345
13437
  if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Audio")) {
13346
13438
  return await Audio.fromJsonLd(json, options);
13347
13439
  }
@@ -13579,7 +13671,8 @@ export class Audio extends Document {
13579
13671
  // deno-lint-ignore no-explicit-any
13580
13672
  (expanded[0] ?? {});
13581
13673
  }
13582
- if ("@type" in values) {
13674
+ if ("@type" in values &&
13675
+ !values["@type"].every((t) => t.startsWith("_:"))) {
13583
13676
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Audio")) {
13584
13677
  throw new TypeError("Invalid type: " + values["@type"]);
13585
13678
  }
@@ -13738,7 +13831,8 @@ export class Ignore extends Activity {
13738
13831
  // deno-lint-ignore no-explicit-any
13739
13832
  (expanded[0] ?? {});
13740
13833
  }
13741
- if ("@type" in values) {
13834
+ if ("@type" in values &&
13835
+ !values["@type"].every((t) => t.startsWith("_:"))) {
13742
13836
  if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Block")) {
13743
13837
  return await Block.fromJsonLd(json, options);
13744
13838
  }
@@ -13902,7 +13996,8 @@ export class Block extends Ignore {
13902
13996
  // deno-lint-ignore no-explicit-any
13903
13997
  (expanded[0] ?? {});
13904
13998
  }
13905
- if ("@type" in values) {
13999
+ if ("@type" in values &&
14000
+ !values["@type"].every((t) => t.startsWith("_:"))) {
13906
14001
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Block")) {
13907
14002
  throw new TypeError("Invalid type: " + values["@type"]);
13908
14003
  }
@@ -14585,7 +14680,8 @@ export class Collection extends Object {
14585
14680
  // deno-lint-ignore no-explicit-any
14586
14681
  (expanded[0] ?? {});
14587
14682
  }
14588
- if ("@type" in values) {
14683
+ if ("@type" in values &&
14684
+ !values["@type"].every((t) => t.startsWith("_:"))) {
14589
14685
  if (values["@type"].includes("https://www.w3.org/ns/activitystreams#CollectionPage")) {
14590
14686
  return await CollectionPage.fromJsonLd(json, options);
14591
14687
  }
@@ -14634,7 +14730,9 @@ export class Collection extends Object {
14634
14730
  continue;
14635
14731
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
14636
14732
  globalThis.Object.keys(v).length === 1) {
14637
- _3UyUdxnyn6cDn53QKrh4MBiearma_current.push(new URL(v["@id"]));
14733
+ _3UyUdxnyn6cDn53QKrh4MBiearma_current.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
14734
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
14735
+ : new URL(v["@id"]));
14638
14736
  continue;
14639
14737
  }
14640
14738
  _3UyUdxnyn6cDn53QKrh4MBiearma_current.push(await CollectionPage.fromJsonLd(v, options));
@@ -14653,7 +14751,9 @@ export class Collection extends Object {
14653
14751
  continue;
14654
14752
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
14655
14753
  globalThis.Object.keys(v).length === 1) {
14656
- _J52RqweMe6hhv7RnLJMC8BExTE5_first.push(new URL(v["@id"]));
14754
+ _J52RqweMe6hhv7RnLJMC8BExTE5_first.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
14755
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
14756
+ : new URL(v["@id"]));
14657
14757
  continue;
14658
14758
  }
14659
14759
  _J52RqweMe6hhv7RnLJMC8BExTE5_first.push(await CollectionPage.fromJsonLd(v, options));
@@ -14672,7 +14772,9 @@ export class Collection extends Object {
14672
14772
  continue;
14673
14773
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
14674
14774
  globalThis.Object.keys(v).length === 1) {
14675
- _gyJJnyEFnuNVi1HFZKfAn3Hfn26_last.push(new URL(v["@id"]));
14775
+ _gyJJnyEFnuNVi1HFZKfAn3Hfn26_last.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
14776
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
14777
+ : new URL(v["@id"]));
14676
14778
  continue;
14677
14779
  }
14678
14780
  _gyJJnyEFnuNVi1HFZKfAn3Hfn26_last.push(await CollectionPage.fromJsonLd(v, options));
@@ -14691,7 +14793,9 @@ export class Collection extends Object {
14691
14793
  continue;
14692
14794
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
14693
14795
  globalThis.Object.keys(v).length === 1) {
14694
- _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(new URL(v["@id"]));
14796
+ _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
14797
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
14798
+ : new URL(v["@id"]));
14695
14799
  continue;
14696
14800
  }
14697
14801
  const decoded = typeof v === "object" && "@type" in v &&
@@ -15314,7 +15418,8 @@ export class CollectionPage extends Collection {
15314
15418
  // deno-lint-ignore no-explicit-any
15315
15419
  (expanded[0] ?? {});
15316
15420
  }
15317
- if ("@type" in values) {
15421
+ if ("@type" in values &&
15422
+ !values["@type"].every((t) => t.startsWith("_:"))) {
15318
15423
  if (values["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")) {
15319
15424
  return await OrderedCollectionPage.fromJsonLd(json, options);
15320
15425
  }
@@ -15343,7 +15448,9 @@ export class CollectionPage extends Collection {
15343
15448
  continue;
15344
15449
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
15345
15450
  globalThis.Object.keys(v).length === 1) {
15346
- _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf.push(new URL(v["@id"]));
15451
+ _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
15452
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
15453
+ : new URL(v["@id"]));
15347
15454
  continue;
15348
15455
  }
15349
15456
  _2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf.push(await Collection.fromJsonLd(v, options));
@@ -15362,7 +15469,9 @@ export class CollectionPage extends Collection {
15362
15469
  continue;
15363
15470
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
15364
15471
  globalThis.Object.keys(v).length === 1) {
15365
- _3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next.push(new URL(v["@id"]));
15472
+ _3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
15473
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
15474
+ : new URL(v["@id"]));
15366
15475
  continue;
15367
15476
  }
15368
15477
  _3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next.push(await _c.fromJsonLd(v, options));
@@ -15381,7 +15490,9 @@ export class CollectionPage extends Collection {
15381
15490
  continue;
15382
15491
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
15383
15492
  globalThis.Object.keys(v).length === 1) {
15384
- _3b8yG8tDNzQFFEnWhCc13G8eHooA_prev.push(new URL(v["@id"]));
15493
+ _3b8yG8tDNzQFFEnWhCc13G8eHooA_prev.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
15494
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
15495
+ : new URL(v["@id"]));
15385
15496
  continue;
15386
15497
  }
15387
15498
  _3b8yG8tDNzQFFEnWhCc13G8eHooA_prev.push(await _c.fromJsonLd(v, options));
@@ -15582,7 +15693,8 @@ export class Create extends Activity {
15582
15693
  // deno-lint-ignore no-explicit-any
15583
15694
  (expanded[0] ?? {});
15584
15695
  }
15585
- if ("@type" in values) {
15696
+ if ("@type" in values &&
15697
+ !values["@type"].every((t) => t.startsWith("_:"))) {
15586
15698
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Create")) {
15587
15699
  throw new TypeError("Invalid type: " + values["@type"]);
15588
15700
  }
@@ -15754,7 +15866,8 @@ export class Delete extends Activity {
15754
15866
  // deno-lint-ignore no-explicit-any
15755
15867
  (expanded[0] ?? {});
15756
15868
  }
15757
- if ("@type" in values) {
15869
+ if ("@type" in values &&
15870
+ !values["@type"].every((t) => t.startsWith("_:"))) {
15758
15871
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Delete")) {
15759
15872
  throw new TypeError("Invalid type: " + values["@type"]);
15760
15873
  }
@@ -15912,7 +16025,8 @@ export class Dislike extends Activity {
15912
16025
  // deno-lint-ignore no-explicit-any
15913
16026
  (expanded[0] ?? {});
15914
16027
  }
15915
- if ("@type" in values) {
16028
+ if ("@type" in values &&
16029
+ !values["@type"].every((t) => t.startsWith("_:"))) {
15916
16030
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Dislike")) {
15917
16031
  throw new TypeError("Invalid type: " + values["@type"]);
15918
16032
  }
@@ -16418,7 +16532,8 @@ export class Endpoints {
16418
16532
  // deno-lint-ignore no-explicit-any
16419
16533
  (expanded[0] ?? {});
16420
16534
  }
16421
- if ("@type" in values) {
16535
+ if ("@type" in values &&
16536
+ !values["@type"].every((t) => t.startsWith("_:"))) {
16422
16537
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Endpoints")) {
16423
16538
  throw new TypeError("Invalid type: " + values["@type"]);
16424
16539
  }
@@ -16751,7 +16866,8 @@ export class Event extends Object {
16751
16866
  // deno-lint-ignore no-explicit-any
16752
16867
  (expanded[0] ?? {});
16753
16868
  }
16754
- if ("@type" in values) {
16869
+ if ("@type" in values &&
16870
+ !values["@type"].every((t) => t.startsWith("_:"))) {
16755
16871
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Event")) {
16756
16872
  throw new TypeError("Invalid type: " + values["@type"]);
16757
16873
  }
@@ -16911,7 +17027,8 @@ export class Flag extends Activity {
16911
17027
  // deno-lint-ignore no-explicit-any
16912
17028
  (expanded[0] ?? {});
16913
17029
  }
16914
- if ("@type" in values) {
17030
+ if ("@type" in values &&
17031
+ !values["@type"].every((t) => t.startsWith("_:"))) {
16915
17032
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Flag")) {
16916
17033
  throw new TypeError("Invalid type: " + values["@type"]);
16917
17034
  }
@@ -17072,7 +17189,8 @@ export class Follow extends Activity {
17072
17189
  // deno-lint-ignore no-explicit-any
17073
17190
  (expanded[0] ?? {});
17074
17191
  }
17075
- if ("@type" in values) {
17192
+ if ("@type" in values &&
17193
+ !values["@type"].every((t) => t.startsWith("_:"))) {
17076
17194
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Follow")) {
17077
17195
  throw new TypeError("Invalid type: " + values["@type"]);
17078
17196
  }
@@ -18908,6 +19026,7 @@ export class Group extends Object {
18908
19026
  "https://www.w3.org/ns/did/v1",
18909
19027
  "https://w3id.org/security/multikey/v1",
18910
19028
  {
19029
+ "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
18911
19030
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
18912
19031
  "toot": "http://joinmastodon.org/ns#",
18913
19032
  "featured": { "@id": "toot:featured", "@type": "@id" },
@@ -19152,6 +19271,7 @@ export class Group extends Object {
19152
19271
  "https://www.w3.org/ns/did/v1",
19153
19272
  "https://w3id.org/security/multikey/v1",
19154
19273
  {
19274
+ "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
19155
19275
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
19156
19276
  "toot": "http://joinmastodon.org/ns#",
19157
19277
  "featured": { "@id": "toot:featured", "@type": "@id" },
@@ -19221,7 +19341,8 @@ export class Group extends Object {
19221
19341
  // deno-lint-ignore no-explicit-any
19222
19342
  (expanded[0] ?? {});
19223
19343
  }
19224
- if ("@type" in values) {
19344
+ if ("@type" in values &&
19345
+ !values["@type"].every((t) => t.startsWith("_:"))) {
19225
19346
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Group")) {
19226
19347
  throw new TypeError("Invalid type: " + values["@type"]);
19227
19348
  }
@@ -19271,7 +19392,9 @@ export class Group extends Object {
19271
19392
  continue;
19272
19393
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
19273
19394
  globalThis.Object.keys(v).length === 1) {
19274
- _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(new URL(v["@id"]));
19395
+ _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
19396
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
19397
+ : new URL(v["@id"]));
19275
19398
  continue;
19276
19399
  }
19277
19400
  _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, options));
@@ -19290,7 +19413,9 @@ export class Group extends Object {
19290
19413
  continue;
19291
19414
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
19292
19415
  globalThis.Object.keys(v).length === 1) {
19293
- _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(new URL(v["@id"]));
19416
+ _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
19417
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
19418
+ : new URL(v["@id"]));
19294
19419
  continue;
19295
19420
  }
19296
19421
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, options));
@@ -19325,7 +19450,9 @@ export class Group extends Object {
19325
19450
  continue;
19326
19451
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
19327
19452
  globalThis.Object.keys(v).length === 1) {
19328
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(new URL(v["@id"]));
19453
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
19454
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
19455
+ : new URL(v["@id"]));
19329
19456
  continue;
19330
19457
  }
19331
19458
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
@@ -19344,7 +19471,9 @@ export class Group extends Object {
19344
19471
  continue;
19345
19472
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
19346
19473
  globalThis.Object.keys(v).length === 1) {
19347
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(new URL(v["@id"]));
19474
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
19475
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
19476
+ : new URL(v["@id"]));
19348
19477
  continue;
19349
19478
  }
19350
19479
  _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
@@ -19363,7 +19492,9 @@ export class Group extends Object {
19363
19492
  continue;
19364
19493
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
19365
19494
  globalThis.Object.keys(v).length === 1) {
19366
- _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(new URL(v["@id"]));
19495
+ _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
19496
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
19497
+ : new URL(v["@id"]));
19367
19498
  continue;
19368
19499
  }
19369
19500
  _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, options));
@@ -19382,7 +19513,9 @@ export class Group extends Object {
19382
19513
  continue;
19383
19514
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
19384
19515
  globalThis.Object.keys(v).length === 1) {
19385
- _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(new URL(v["@id"]));
19516
+ _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
19517
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
19518
+ : new URL(v["@id"]));
19386
19519
  continue;
19387
19520
  }
19388
19521
  _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, options));
@@ -19401,7 +19534,9 @@ export class Group extends Object {
19401
19534
  continue;
19402
19535
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
19403
19536
  globalThis.Object.keys(v).length === 1) {
19404
- _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(new URL(v["@id"]));
19537
+ _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
19538
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
19539
+ : new URL(v["@id"]));
19405
19540
  continue;
19406
19541
  }
19407
19542
  _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, options));
@@ -19420,7 +19555,9 @@ export class Group extends Object {
19420
19555
  continue;
19421
19556
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
19422
19557
  globalThis.Object.keys(v).length === 1) {
19423
- _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(new URL(v["@id"]));
19558
+ _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
19559
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
19560
+ : new URL(v["@id"]));
19424
19561
  continue;
19425
19562
  }
19426
19563
  _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, options));
@@ -19439,7 +19576,9 @@ export class Group extends Object {
19439
19576
  continue;
19440
19577
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
19441
19578
  globalThis.Object.keys(v).length === 1) {
19442
- _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(new URL(v["@id"]));
19579
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
19580
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
19581
+ : new URL(v["@id"]));
19443
19582
  continue;
19444
19583
  }
19445
19584
  _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, options));
@@ -19458,7 +19597,9 @@ export class Group extends Object {
19458
19597
  continue;
19459
19598
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
19460
19599
  globalThis.Object.keys(v).length === 1) {
19461
- _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(new URL(v["@id"]));
19600
+ _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
19601
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
19602
+ : new URL(v["@id"]));
19462
19603
  continue;
19463
19604
  }
19464
19605
  _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, options));
@@ -19547,7 +19688,9 @@ export class Group extends Object {
19547
19688
  continue;
19548
19689
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
19549
19690
  globalThis.Object.keys(v).length === 1) {
19550
- _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(new URL(v["@id"]));
19691
+ _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
19692
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
19693
+ : new URL(v["@id"]));
19551
19694
  continue;
19552
19695
  }
19553
19696
  const decoded = typeof v === "object" && "@type" in v &&
@@ -20579,7 +20722,8 @@ export class Link {
20579
20722
  // deno-lint-ignore no-explicit-any
20580
20723
  (expanded[0] ?? {});
20581
20724
  }
20582
- if ("@type" in values) {
20725
+ if ("@type" in values &&
20726
+ !values["@type"].every((t) => t.startsWith("_:"))) {
20583
20727
  if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Hashtag")) {
20584
20728
  return await Hashtag.fromJsonLd(json, options);
20585
20729
  }
@@ -20711,7 +20855,9 @@ export class Link {
20711
20855
  continue;
20712
20856
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
20713
20857
  globalThis.Object.keys(v).length === 1) {
20714
- _gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(new URL(v["@id"]));
20858
+ _gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
20859
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
20860
+ : new URL(v["@id"]));
20715
20861
  continue;
20716
20862
  }
20717
20863
  const decoded = typeof v === "object" && "@type" in v &&
@@ -21050,7 +21196,8 @@ export class Hashtag extends Link {
21050
21196
  // deno-lint-ignore no-explicit-any
21051
21197
  (expanded[0] ?? {});
21052
21198
  }
21053
- if ("@type" in values) {
21199
+ if ("@type" in values &&
21200
+ !values["@type"].every((t) => t.startsWith("_:"))) {
21054
21201
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Hashtag")) {
21055
21202
  throw new TypeError("Invalid type: " + values["@type"]);
21056
21203
  }
@@ -21218,7 +21365,8 @@ export class Image extends Document {
21218
21365
  // deno-lint-ignore no-explicit-any
21219
21366
  (expanded[0] ?? {});
21220
21367
  }
21221
- if ("@type" in values) {
21368
+ if ("@type" in values &&
21369
+ !values["@type"].every((t) => t.startsWith("_:"))) {
21222
21370
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Image")) {
21223
21371
  throw new TypeError("Invalid type: " + values["@type"]);
21224
21372
  }
@@ -21378,7 +21526,8 @@ export class Offer extends Activity {
21378
21526
  // deno-lint-ignore no-explicit-any
21379
21527
  (expanded[0] ?? {});
21380
21528
  }
21381
- if ("@type" in values) {
21529
+ if ("@type" in values &&
21530
+ !values["@type"].every((t) => t.startsWith("_:"))) {
21382
21531
  if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Invite")) {
21383
21532
  return await Invite.fromJsonLd(json, options);
21384
21533
  }
@@ -21540,7 +21689,8 @@ export class Invite extends Offer {
21540
21689
  // deno-lint-ignore no-explicit-any
21541
21690
  (expanded[0] ?? {});
21542
21691
  }
21543
- if ("@type" in values) {
21692
+ if ("@type" in values &&
21693
+ !values["@type"].every((t) => t.startsWith("_:"))) {
21544
21694
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Invite")) {
21545
21695
  throw new TypeError("Invalid type: " + values["@type"]);
21546
21696
  }
@@ -21699,7 +21849,8 @@ export class Join extends Activity {
21699
21849
  // deno-lint-ignore no-explicit-any
21700
21850
  (expanded[0] ?? {});
21701
21851
  }
21702
- if ("@type" in values) {
21852
+ if ("@type" in values &&
21853
+ !values["@type"].every((t) => t.startsWith("_:"))) {
21703
21854
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Join")) {
21704
21855
  throw new TypeError("Invalid type: " + values["@type"]);
21705
21856
  }
@@ -21858,7 +22009,8 @@ export class Leave extends Activity {
21858
22009
  // deno-lint-ignore no-explicit-any
21859
22010
  (expanded[0] ?? {});
21860
22011
  }
21861
- if ("@type" in values) {
22012
+ if ("@type" in values &&
22013
+ !values["@type"].every((t) => t.startsWith("_:"))) {
21862
22014
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Leave")) {
21863
22015
  throw new TypeError("Invalid type: " + values["@type"]);
21864
22016
  }
@@ -22017,7 +22169,8 @@ export class Like extends Activity {
22017
22169
  // deno-lint-ignore no-explicit-any
22018
22170
  (expanded[0] ?? {});
22019
22171
  }
22020
- if ("@type" in values) {
22172
+ if ("@type" in values &&
22173
+ !values["@type"].every((t) => t.startsWith("_:"))) {
22021
22174
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Like")) {
22022
22175
  throw new TypeError("Invalid type: " + values["@type"]);
22023
22176
  }
@@ -22175,7 +22328,8 @@ export class Listen extends Activity {
22175
22328
  // deno-lint-ignore no-explicit-any
22176
22329
  (expanded[0] ?? {});
22177
22330
  }
22178
- if ("@type" in values) {
22331
+ if ("@type" in values &&
22332
+ !values["@type"].every((t) => t.startsWith("_:"))) {
22179
22333
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Listen")) {
22180
22334
  throw new TypeError("Invalid type: " + values["@type"]);
22181
22335
  }
@@ -22332,7 +22486,8 @@ export class Mention extends Link {
22332
22486
  // deno-lint-ignore no-explicit-any
22333
22487
  (expanded[0] ?? {});
22334
22488
  }
22335
- if ("@type" in values) {
22489
+ if ("@type" in values &&
22490
+ !values["@type"].every((t) => t.startsWith("_:"))) {
22336
22491
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Mention")) {
22337
22492
  throw new TypeError("Invalid type: " + values["@type"]);
22338
22493
  }
@@ -22492,7 +22647,8 @@ export class Move extends Activity {
22492
22647
  // deno-lint-ignore no-explicit-any
22493
22648
  (expanded[0] ?? {});
22494
22649
  }
22495
- if ("@type" in values) {
22650
+ if ("@type" in values &&
22651
+ !values["@type"].every((t) => t.startsWith("_:"))) {
22496
22652
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Move")) {
22497
22653
  throw new TypeError("Invalid type: " + values["@type"]);
22498
22654
  }
@@ -22755,7 +22911,8 @@ export class Note extends Object {
22755
22911
  // deno-lint-ignore no-explicit-any
22756
22912
  (expanded[0] ?? {});
22757
22913
  }
22758
- if ("@type" in values) {
22914
+ if ("@type" in values &&
22915
+ !values["@type"].every((t) => t.startsWith("_:"))) {
22759
22916
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Note")) {
22760
22917
  throw new TypeError("Invalid type: " + values["@type"]);
22761
22918
  }
@@ -23102,7 +23259,8 @@ export class OrderedCollection extends Collection {
23102
23259
  // deno-lint-ignore no-explicit-any
23103
23260
  (expanded[0] ?? {});
23104
23261
  }
23105
- if ("@type" in values) {
23262
+ if ("@type" in values &&
23263
+ !values["@type"].every((t) => t.startsWith("_:"))) {
23106
23264
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")) {
23107
23265
  throw new TypeError("Invalid type: " + values["@type"]);
23108
23266
  }
@@ -23128,7 +23286,9 @@ export class OrderedCollection extends Collection {
23128
23286
  continue;
23129
23287
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
23130
23288
  globalThis.Object.keys(v).length === 1) {
23131
- _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(new URL(v["@id"]));
23289
+ _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
23290
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
23291
+ : new URL(v["@id"]));
23132
23292
  continue;
23133
23293
  }
23134
23294
  const decoded = typeof v === "object" && "@type" in v &&
@@ -23572,7 +23732,8 @@ export class OrderedCollectionPage extends CollectionPage {
23572
23732
  // deno-lint-ignore no-explicit-any
23573
23733
  (expanded[0] ?? {});
23574
23734
  }
23575
- if ("@type" in values) {
23735
+ if ("@type" in values &&
23736
+ !values["@type"].every((t) => t.startsWith("_:"))) {
23576
23737
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")) {
23577
23738
  throw new TypeError("Invalid type: " + values["@type"]);
23578
23739
  }
@@ -23598,7 +23759,9 @@ export class OrderedCollectionPage extends CollectionPage {
23598
23759
  continue;
23599
23760
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
23600
23761
  globalThis.Object.keys(v).length === 1) {
23601
- _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(new URL(v["@id"]));
23762
+ _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
23763
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
23764
+ : new URL(v["@id"]));
23602
23765
  continue;
23603
23766
  }
23604
23767
  const decoded = typeof v === "object" && "@type" in v &&
@@ -25537,6 +25700,7 @@ export class Organization extends Object {
25537
25700
  "https://www.w3.org/ns/did/v1",
25538
25701
  "https://w3id.org/security/multikey/v1",
25539
25702
  {
25703
+ "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
25540
25704
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
25541
25705
  "toot": "http://joinmastodon.org/ns#",
25542
25706
  "featured": { "@id": "toot:featured", "@type": "@id" },
@@ -25781,6 +25945,7 @@ export class Organization extends Object {
25781
25945
  "https://www.w3.org/ns/did/v1",
25782
25946
  "https://w3id.org/security/multikey/v1",
25783
25947
  {
25948
+ "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
25784
25949
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
25785
25950
  "toot": "http://joinmastodon.org/ns#",
25786
25951
  "featured": { "@id": "toot:featured", "@type": "@id" },
@@ -25850,7 +26015,8 @@ export class Organization extends Object {
25850
26015
  // deno-lint-ignore no-explicit-any
25851
26016
  (expanded[0] ?? {});
25852
26017
  }
25853
- if ("@type" in values) {
26018
+ if ("@type" in values &&
26019
+ !values["@type"].every((t) => t.startsWith("_:"))) {
25854
26020
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Organization")) {
25855
26021
  throw new TypeError("Invalid type: " + values["@type"]);
25856
26022
  }
@@ -25900,7 +26066,9 @@ export class Organization extends Object {
25900
26066
  continue;
25901
26067
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
25902
26068
  globalThis.Object.keys(v).length === 1) {
25903
- _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(new URL(v["@id"]));
26069
+ _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
26070
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
26071
+ : new URL(v["@id"]));
25904
26072
  continue;
25905
26073
  }
25906
26074
  _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, options));
@@ -25919,7 +26087,9 @@ export class Organization extends Object {
25919
26087
  continue;
25920
26088
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
25921
26089
  globalThis.Object.keys(v).length === 1) {
25922
- _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(new URL(v["@id"]));
26090
+ _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
26091
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
26092
+ : new URL(v["@id"]));
25923
26093
  continue;
25924
26094
  }
25925
26095
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, options));
@@ -25954,7 +26124,9 @@ export class Organization extends Object {
25954
26124
  continue;
25955
26125
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
25956
26126
  globalThis.Object.keys(v).length === 1) {
25957
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(new URL(v["@id"]));
26127
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
26128
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
26129
+ : new URL(v["@id"]));
25958
26130
  continue;
25959
26131
  }
25960
26132
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
@@ -25973,7 +26145,9 @@ export class Organization extends Object {
25973
26145
  continue;
25974
26146
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
25975
26147
  globalThis.Object.keys(v).length === 1) {
25976
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(new URL(v["@id"]));
26148
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
26149
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
26150
+ : new URL(v["@id"]));
25977
26151
  continue;
25978
26152
  }
25979
26153
  _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
@@ -25992,7 +26166,9 @@ export class Organization extends Object {
25992
26166
  continue;
25993
26167
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
25994
26168
  globalThis.Object.keys(v).length === 1) {
25995
- _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(new URL(v["@id"]));
26169
+ _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
26170
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
26171
+ : new URL(v["@id"]));
25996
26172
  continue;
25997
26173
  }
25998
26174
  _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, options));
@@ -26011,7 +26187,9 @@ export class Organization extends Object {
26011
26187
  continue;
26012
26188
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
26013
26189
  globalThis.Object.keys(v).length === 1) {
26014
- _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(new URL(v["@id"]));
26190
+ _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
26191
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
26192
+ : new URL(v["@id"]));
26015
26193
  continue;
26016
26194
  }
26017
26195
  _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, options));
@@ -26030,7 +26208,9 @@ export class Organization extends Object {
26030
26208
  continue;
26031
26209
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
26032
26210
  globalThis.Object.keys(v).length === 1) {
26033
- _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(new URL(v["@id"]));
26211
+ _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
26212
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
26213
+ : new URL(v["@id"]));
26034
26214
  continue;
26035
26215
  }
26036
26216
  _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, options));
@@ -26049,7 +26229,9 @@ export class Organization extends Object {
26049
26229
  continue;
26050
26230
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
26051
26231
  globalThis.Object.keys(v).length === 1) {
26052
- _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(new URL(v["@id"]));
26232
+ _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
26233
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
26234
+ : new URL(v["@id"]));
26053
26235
  continue;
26054
26236
  }
26055
26237
  _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, options));
@@ -26068,7 +26250,9 @@ export class Organization extends Object {
26068
26250
  continue;
26069
26251
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
26070
26252
  globalThis.Object.keys(v).length === 1) {
26071
- _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(new URL(v["@id"]));
26253
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
26254
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
26255
+ : new URL(v["@id"]));
26072
26256
  continue;
26073
26257
  }
26074
26258
  _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, options));
@@ -26087,7 +26271,9 @@ export class Organization extends Object {
26087
26271
  continue;
26088
26272
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
26089
26273
  globalThis.Object.keys(v).length === 1) {
26090
- _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(new URL(v["@id"]));
26274
+ _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
26275
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
26276
+ : new URL(v["@id"]));
26091
26277
  continue;
26092
26278
  }
26093
26279
  _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, options));
@@ -26176,7 +26362,9 @@ export class Organization extends Object {
26176
26362
  continue;
26177
26363
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
26178
26364
  globalThis.Object.keys(v).length === 1) {
26179
- _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(new URL(v["@id"]));
26365
+ _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
26366
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
26367
+ : new URL(v["@id"]));
26180
26368
  continue;
26181
26369
  }
26182
26370
  const decoded = typeof v === "object" && "@type" in v &&
@@ -26634,7 +26822,8 @@ export class Page extends Document {
26634
26822
  // deno-lint-ignore no-explicit-any
26635
26823
  (expanded[0] ?? {});
26636
26824
  }
26637
- if ("@type" in values) {
26825
+ if ("@type" in values &&
26826
+ !values["@type"].every((t) => t.startsWith("_:"))) {
26638
26827
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Page")) {
26639
26828
  throw new TypeError("Invalid type: " + values["@type"]);
26640
26829
  }
@@ -28470,6 +28659,7 @@ export class Person extends Object {
28470
28659
  "https://www.w3.org/ns/did/v1",
28471
28660
  "https://w3id.org/security/multikey/v1",
28472
28661
  {
28662
+ "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
28473
28663
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
28474
28664
  "toot": "http://joinmastodon.org/ns#",
28475
28665
  "featured": { "@id": "toot:featured", "@type": "@id" },
@@ -28714,6 +28904,7 @@ export class Person extends Object {
28714
28904
  "https://www.w3.org/ns/did/v1",
28715
28905
  "https://w3id.org/security/multikey/v1",
28716
28906
  {
28907
+ "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
28717
28908
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
28718
28909
  "toot": "http://joinmastodon.org/ns#",
28719
28910
  "featured": { "@id": "toot:featured", "@type": "@id" },
@@ -28783,7 +28974,8 @@ export class Person extends Object {
28783
28974
  // deno-lint-ignore no-explicit-any
28784
28975
  (expanded[0] ?? {});
28785
28976
  }
28786
- if ("@type" in values) {
28977
+ if ("@type" in values &&
28978
+ !values["@type"].every((t) => t.startsWith("_:"))) {
28787
28979
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Person")) {
28788
28980
  throw new TypeError("Invalid type: " + values["@type"]);
28789
28981
  }
@@ -28833,7 +29025,9 @@ export class Person extends Object {
28833
29025
  continue;
28834
29026
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
28835
29027
  globalThis.Object.keys(v).length === 1) {
28836
- _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(new URL(v["@id"]));
29028
+ _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
29029
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
29030
+ : new URL(v["@id"]));
28837
29031
  continue;
28838
29032
  }
28839
29033
  _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, options));
@@ -28852,7 +29046,9 @@ export class Person extends Object {
28852
29046
  continue;
28853
29047
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
28854
29048
  globalThis.Object.keys(v).length === 1) {
28855
- _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(new URL(v["@id"]));
29049
+ _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
29050
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
29051
+ : new URL(v["@id"]));
28856
29052
  continue;
28857
29053
  }
28858
29054
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, options));
@@ -28887,7 +29083,9 @@ export class Person extends Object {
28887
29083
  continue;
28888
29084
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
28889
29085
  globalThis.Object.keys(v).length === 1) {
28890
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(new URL(v["@id"]));
29086
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
29087
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
29088
+ : new URL(v["@id"]));
28891
29089
  continue;
28892
29090
  }
28893
29091
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
@@ -28906,7 +29104,9 @@ export class Person extends Object {
28906
29104
  continue;
28907
29105
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
28908
29106
  globalThis.Object.keys(v).length === 1) {
28909
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(new URL(v["@id"]));
29107
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
29108
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
29109
+ : new URL(v["@id"]));
28910
29110
  continue;
28911
29111
  }
28912
29112
  _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
@@ -28925,7 +29125,9 @@ export class Person extends Object {
28925
29125
  continue;
28926
29126
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
28927
29127
  globalThis.Object.keys(v).length === 1) {
28928
- _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(new URL(v["@id"]));
29128
+ _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
29129
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
29130
+ : new URL(v["@id"]));
28929
29131
  continue;
28930
29132
  }
28931
29133
  _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, options));
@@ -28944,7 +29146,9 @@ export class Person extends Object {
28944
29146
  continue;
28945
29147
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
28946
29148
  globalThis.Object.keys(v).length === 1) {
28947
- _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(new URL(v["@id"]));
29149
+ _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
29150
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
29151
+ : new URL(v["@id"]));
28948
29152
  continue;
28949
29153
  }
28950
29154
  _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, options));
@@ -28963,7 +29167,9 @@ export class Person extends Object {
28963
29167
  continue;
28964
29168
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
28965
29169
  globalThis.Object.keys(v).length === 1) {
28966
- _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(new URL(v["@id"]));
29170
+ _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
29171
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
29172
+ : new URL(v["@id"]));
28967
29173
  continue;
28968
29174
  }
28969
29175
  _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, options));
@@ -28982,7 +29188,9 @@ export class Person extends Object {
28982
29188
  continue;
28983
29189
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
28984
29190
  globalThis.Object.keys(v).length === 1) {
28985
- _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(new URL(v["@id"]));
29191
+ _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
29192
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
29193
+ : new URL(v["@id"]));
28986
29194
  continue;
28987
29195
  }
28988
29196
  _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, options));
@@ -29001,7 +29209,9 @@ export class Person extends Object {
29001
29209
  continue;
29002
29210
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
29003
29211
  globalThis.Object.keys(v).length === 1) {
29004
- _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(new URL(v["@id"]));
29212
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
29213
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
29214
+ : new URL(v["@id"]));
29005
29215
  continue;
29006
29216
  }
29007
29217
  _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, options));
@@ -29020,7 +29230,9 @@ export class Person extends Object {
29020
29230
  continue;
29021
29231
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
29022
29232
  globalThis.Object.keys(v).length === 1) {
29023
- _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(new URL(v["@id"]));
29233
+ _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
29234
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
29235
+ : new URL(v["@id"]));
29024
29236
  continue;
29025
29237
  }
29026
29238
  _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, options));
@@ -29109,7 +29321,9 @@ export class Person extends Object {
29109
29321
  continue;
29110
29322
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
29111
29323
  globalThis.Object.keys(v).length === 1) {
29112
- _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(new URL(v["@id"]));
29324
+ _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
29325
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
29326
+ : new URL(v["@id"]));
29113
29327
  continue;
29114
29328
  }
29115
29329
  const decoded = typeof v === "object" && "@type" in v &&
@@ -29898,7 +30112,8 @@ export class Place extends Object {
29898
30112
  // deno-lint-ignore no-explicit-any
29899
30113
  (expanded[0] ?? {});
29900
30114
  }
29901
- if ("@type" in values) {
30115
+ if ("@type" in values &&
30116
+ !values["@type"].every((t) => t.startsWith("_:"))) {
29902
30117
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Place")) {
29903
30118
  throw new TypeError("Invalid type: " + values["@type"]);
29904
30119
  }
@@ -30348,7 +30563,8 @@ export class Profile extends Object {
30348
30563
  // deno-lint-ignore no-explicit-any
30349
30564
  (expanded[0] ?? {});
30350
30565
  }
30351
- if ("@type" in values) {
30566
+ if ("@type" in values &&
30567
+ !values["@type"].every((t) => t.startsWith("_:"))) {
30352
30568
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Profile")) {
30353
30569
  throw new TypeError("Invalid type: " + values["@type"]);
30354
30570
  }
@@ -30374,7 +30590,9 @@ export class Profile extends Object {
30374
30590
  continue;
30375
30591
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
30376
30592
  globalThis.Object.keys(v).length === 1) {
30377
- _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes.push(new URL(v["@id"]));
30593
+ _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
30594
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
30595
+ : new URL(v["@id"]));
30378
30596
  continue;
30379
30597
  }
30380
30598
  _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes.push(await Object.fromJsonLd(v, options));
@@ -30878,7 +31096,8 @@ export class Question extends IntransitiveActivity {
30878
31096
  // deno-lint-ignore no-explicit-any
30879
31097
  (expanded[0] ?? {});
30880
31098
  }
30881
- if ("@type" in values) {
31099
+ if ("@type" in values &&
31100
+ !values["@type"].every((t) => t.startsWith("_:"))) {
30882
31101
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Question")) {
30883
31102
  throw new TypeError("Invalid type: " + values["@type"]);
30884
31103
  }
@@ -30904,7 +31123,9 @@ export class Question extends IntransitiveActivity {
30904
31123
  continue;
30905
31124
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
30906
31125
  globalThis.Object.keys(v).length === 1) {
30907
- _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf.push(new URL(v["@id"]));
31126
+ _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
31127
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
31128
+ : new URL(v["@id"]));
30908
31129
  continue;
30909
31130
  }
30910
31131
  _2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf.push(await Object.fromJsonLd(v, options));
@@ -30923,7 +31144,9 @@ export class Question extends IntransitiveActivity {
30923
31144
  continue;
30924
31145
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
30925
31146
  globalThis.Object.keys(v).length === 1) {
30926
- _2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf.push(new URL(v["@id"]));
31147
+ _2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
31148
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
31149
+ : new URL(v["@id"]));
30927
31150
  continue;
30928
31151
  }
30929
31152
  _2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf.push(await Object.fromJsonLd(v, options));
@@ -31200,7 +31423,8 @@ export class Read extends Activity {
31200
31423
  // deno-lint-ignore no-explicit-any
31201
31424
  (expanded[0] ?? {});
31202
31425
  }
31203
- if ("@type" in values) {
31426
+ if ("@type" in values &&
31427
+ !values["@type"].every((t) => t.startsWith("_:"))) {
31204
31428
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Read")) {
31205
31429
  throw new TypeError("Invalid type: " + values["@type"]);
31206
31430
  }
@@ -31359,7 +31583,8 @@ export class Reject extends Activity {
31359
31583
  // deno-lint-ignore no-explicit-any
31360
31584
  (expanded[0] ?? {});
31361
31585
  }
31362
- if ("@type" in values) {
31586
+ if ("@type" in values &&
31587
+ !values["@type"].every((t) => t.startsWith("_:"))) {
31363
31588
  if (values["@type"].includes("https://www.w3.org/ns/activitystreams#TentativeReject")) {
31364
31589
  return await TentativeReject.fromJsonLd(json, options);
31365
31590
  }
@@ -31981,7 +32206,8 @@ export class Relationship extends Object {
31981
32206
  // deno-lint-ignore no-explicit-any
31982
32207
  (expanded[0] ?? {});
31983
32208
  }
31984
- if ("@type" in values) {
32209
+ if ("@type" in values &&
32210
+ !values["@type"].every((t) => t.startsWith("_:"))) {
31985
32211
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Relationship")) {
31986
32212
  throw new TypeError("Invalid type: " + values["@type"]);
31987
32213
  }
@@ -32007,7 +32233,9 @@ export class Relationship extends Object {
32007
32233
  continue;
32008
32234
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
32009
32235
  globalThis.Object.keys(v).length === 1) {
32010
- _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject.push(new URL(v["@id"]));
32236
+ _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
32237
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
32238
+ : new URL(v["@id"]));
32011
32239
  continue;
32012
32240
  }
32013
32241
  _2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject.push(await Object.fromJsonLd(v, options));
@@ -32026,7 +32254,9 @@ export class Relationship extends Object {
32026
32254
  continue;
32027
32255
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
32028
32256
  globalThis.Object.keys(v).length === 1) {
32029
- _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(new URL(v["@id"]));
32257
+ _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
32258
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
32259
+ : new URL(v["@id"]));
32030
32260
  continue;
32031
32261
  }
32032
32262
  _2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(await Object.fromJsonLd(v, options));
@@ -32045,7 +32275,9 @@ export class Relationship extends Object {
32045
32275
  continue;
32046
32276
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
32047
32277
  globalThis.Object.keys(v).length === 1) {
32048
- _4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship.push(new URL(v["@id"]));
32278
+ _4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
32279
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
32280
+ : new URL(v["@id"]));
32049
32281
  continue;
32050
32282
  }
32051
32283
  _4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship.push(await Object.fromJsonLd(v, options));
@@ -32243,7 +32475,8 @@ export class Remove extends Activity {
32243
32475
  // deno-lint-ignore no-explicit-any
32244
32476
  (expanded[0] ?? {});
32245
32477
  }
32246
- if ("@type" in values) {
32478
+ if ("@type" in values &&
32479
+ !values["@type"].every((t) => t.startsWith("_:"))) {
32247
32480
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Remove")) {
32248
32481
  throw new TypeError("Invalid type: " + values["@type"]);
32249
32482
  }
@@ -34079,6 +34312,7 @@ export class Service extends Object {
34079
34312
  "https://www.w3.org/ns/did/v1",
34080
34313
  "https://w3id.org/security/multikey/v1",
34081
34314
  {
34315
+ "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
34082
34316
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
34083
34317
  "toot": "http://joinmastodon.org/ns#",
34084
34318
  "featured": { "@id": "toot:featured", "@type": "@id" },
@@ -34323,6 +34557,7 @@ export class Service extends Object {
34323
34557
  "https://www.w3.org/ns/did/v1",
34324
34558
  "https://w3id.org/security/multikey/v1",
34325
34559
  {
34560
+ "alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
34326
34561
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
34327
34562
  "toot": "http://joinmastodon.org/ns#",
34328
34563
  "featured": { "@id": "toot:featured", "@type": "@id" },
@@ -34392,7 +34627,8 @@ export class Service extends Object {
34392
34627
  // deno-lint-ignore no-explicit-any
34393
34628
  (expanded[0] ?? {});
34394
34629
  }
34395
- if ("@type" in values) {
34630
+ if ("@type" in values &&
34631
+ !values["@type"].every((t) => t.startsWith("_:"))) {
34396
34632
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Service")) {
34397
34633
  throw new TypeError("Invalid type: " + values["@type"]);
34398
34634
  }
@@ -34442,7 +34678,9 @@ export class Service extends Object {
34442
34678
  continue;
34443
34679
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
34444
34680
  globalThis.Object.keys(v).length === 1) {
34445
- _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(new URL(v["@id"]));
34681
+ _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
34682
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
34683
+ : new URL(v["@id"]));
34446
34684
  continue;
34447
34685
  }
34448
34686
  _axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, options));
@@ -34461,7 +34699,9 @@ export class Service extends Object {
34461
34699
  continue;
34462
34700
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
34463
34701
  globalThis.Object.keys(v).length === 1) {
34464
- _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(new URL(v["@id"]));
34702
+ _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
34703
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
34704
+ : new URL(v["@id"]));
34465
34705
  continue;
34466
34706
  }
34467
34707
  _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, options));
@@ -34496,7 +34736,9 @@ export class Service extends Object {
34496
34736
  continue;
34497
34737
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
34498
34738
  globalThis.Object.keys(v).length === 1) {
34499
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(new URL(v["@id"]));
34739
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
34740
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
34741
+ : new URL(v["@id"]));
34500
34742
  continue;
34501
34743
  }
34502
34744
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
@@ -34515,7 +34757,9 @@ export class Service extends Object {
34515
34757
  continue;
34516
34758
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
34517
34759
  globalThis.Object.keys(v).length === 1) {
34518
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(new URL(v["@id"]));
34760
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
34761
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
34762
+ : new URL(v["@id"]));
34519
34763
  continue;
34520
34764
  }
34521
34765
  _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
@@ -34534,7 +34778,9 @@ export class Service extends Object {
34534
34778
  continue;
34535
34779
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
34536
34780
  globalThis.Object.keys(v).length === 1) {
34537
- _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(new URL(v["@id"]));
34781
+ _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
34782
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
34783
+ : new URL(v["@id"]));
34538
34784
  continue;
34539
34785
  }
34540
34786
  _3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, options));
@@ -34553,7 +34799,9 @@ export class Service extends Object {
34553
34799
  continue;
34554
34800
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
34555
34801
  globalThis.Object.keys(v).length === 1) {
34556
- _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(new URL(v["@id"]));
34802
+ _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
34803
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
34804
+ : new URL(v["@id"]));
34557
34805
  continue;
34558
34806
  }
34559
34807
  _BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, options));
@@ -34572,7 +34820,9 @@ export class Service extends Object {
34572
34820
  continue;
34573
34821
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
34574
34822
  globalThis.Object.keys(v).length === 1) {
34575
- _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(new URL(v["@id"]));
34823
+ _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
34824
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
34825
+ : new URL(v["@id"]));
34576
34826
  continue;
34577
34827
  }
34578
34828
  _3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, options));
@@ -34591,7 +34841,9 @@ export class Service extends Object {
34591
34841
  continue;
34592
34842
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
34593
34843
  globalThis.Object.keys(v).length === 1) {
34594
- _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(new URL(v["@id"]));
34844
+ _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
34845
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
34846
+ : new URL(v["@id"]));
34595
34847
  continue;
34596
34848
  }
34597
34849
  _4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, options));
@@ -34610,7 +34862,9 @@ export class Service extends Object {
34610
34862
  continue;
34611
34863
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
34612
34864
  globalThis.Object.keys(v).length === 1) {
34613
- _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(new URL(v["@id"]));
34865
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
34866
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
34867
+ : new URL(v["@id"]));
34614
34868
  continue;
34615
34869
  }
34616
34870
  _2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, options));
@@ -34629,7 +34883,9 @@ export class Service extends Object {
34629
34883
  continue;
34630
34884
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
34631
34885
  globalThis.Object.keys(v).length === 1) {
34632
- _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(new URL(v["@id"]));
34886
+ _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
34887
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
34888
+ : new URL(v["@id"]));
34633
34889
  continue;
34634
34890
  }
34635
34891
  _3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, options));
@@ -34718,7 +34974,9 @@ export class Service extends Object {
34718
34974
  continue;
34719
34975
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
34720
34976
  globalThis.Object.keys(v).length === 1) {
34721
- _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(new URL(v["@id"]));
34977
+ _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
34978
+ ? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
34979
+ : new URL(v["@id"]));
34722
34980
  continue;
34723
34981
  }
34724
34982
  const decoded = typeof v === "object" && "@type" in v &&
@@ -35313,7 +35571,8 @@ export class Source {
35313
35571
  // deno-lint-ignore no-explicit-any
35314
35572
  (expanded[0] ?? {});
35315
35573
  }
35316
- if ("@type" in values) {
35574
+ if ("@type" in values &&
35575
+ !values["@type"].every((t) => t.startsWith("_:"))) {
35317
35576
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Source")) {
35318
35577
  throw new TypeError("Invalid type: " + values["@type"]);
35319
35578
  }
@@ -35537,7 +35796,8 @@ export class TentativeAccept extends Accept {
35537
35796
  // deno-lint-ignore no-explicit-any
35538
35797
  (expanded[0] ?? {});
35539
35798
  }
35540
- if ("@type" in values) {
35799
+ if ("@type" in values &&
35800
+ !values["@type"].every((t) => t.startsWith("_:"))) {
35541
35801
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#TentativeAccept")) {
35542
35802
  throw new TypeError("Invalid type: " + values["@type"]);
35543
35803
  }
@@ -35696,7 +35956,8 @@ export class TentativeReject extends Reject {
35696
35956
  // deno-lint-ignore no-explicit-any
35697
35957
  (expanded[0] ?? {});
35698
35958
  }
35699
- if ("@type" in values) {
35959
+ if ("@type" in values &&
35960
+ !values["@type"].every((t) => t.startsWith("_:"))) {
35700
35961
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#TentativeReject")) {
35701
35962
  throw new TypeError("Invalid type: " + values["@type"]);
35702
35963
  }
@@ -35925,7 +36186,8 @@ export class Tombstone extends Object {
35925
36186
  // deno-lint-ignore no-explicit-any
35926
36187
  (expanded[0] ?? {});
35927
36188
  }
35928
- if ("@type" in values) {
36189
+ if ("@type" in values &&
36190
+ !values["@type"].every((t) => t.startsWith("_:"))) {
35929
36191
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Tombstone")) {
35930
36192
  throw new TypeError("Invalid type: " + values["@type"]);
35931
36193
  }
@@ -36112,7 +36374,8 @@ export class Travel extends IntransitiveActivity {
36112
36374
  // deno-lint-ignore no-explicit-any
36113
36375
  (expanded[0] ?? {});
36114
36376
  }
36115
- if ("@type" in values) {
36377
+ if ("@type" in values &&
36378
+ !values["@type"].every((t) => t.startsWith("_:"))) {
36116
36379
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Travel")) {
36117
36380
  throw new TypeError("Invalid type: " + values["@type"]);
36118
36381
  }
@@ -36276,7 +36539,8 @@ export class Undo extends Activity {
36276
36539
  // deno-lint-ignore no-explicit-any
36277
36540
  (expanded[0] ?? {});
36278
36541
  }
36279
- if ("@type" in values) {
36542
+ if ("@type" in values &&
36543
+ !values["@type"].every((t) => t.startsWith("_:"))) {
36280
36544
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Undo")) {
36281
36545
  throw new TypeError("Invalid type: " + values["@type"]);
36282
36546
  }
@@ -36461,7 +36725,8 @@ export class Update extends Activity {
36461
36725
  // deno-lint-ignore no-explicit-any
36462
36726
  (expanded[0] ?? {});
36463
36727
  }
36464
- if ("@type" in values) {
36728
+ if ("@type" in values &&
36729
+ !values["@type"].every((t) => t.startsWith("_:"))) {
36465
36730
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Update")) {
36466
36731
  throw new TypeError("Invalid type: " + values["@type"]);
36467
36732
  }
@@ -36635,7 +36900,8 @@ export class Video extends Document {
36635
36900
  // deno-lint-ignore no-explicit-any
36636
36901
  (expanded[0] ?? {});
36637
36902
  }
36638
- if ("@type" in values) {
36903
+ if ("@type" in values &&
36904
+ !values["@type"].every((t) => t.startsWith("_:"))) {
36639
36905
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Video")) {
36640
36906
  throw new TypeError("Invalid type: " + values["@type"]);
36641
36907
  }
@@ -36793,7 +37059,8 @@ export class View extends Activity {
36793
37059
  // deno-lint-ignore no-explicit-any
36794
37060
  (expanded[0] ?? {});
36795
37061
  }
36796
- if ("@type" in values) {
37062
+ if ("@type" in values &&
37063
+ !values["@type"].every((t) => t.startsWith("_:"))) {
36797
37064
  if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#View")) {
36798
37065
  throw new TypeError("Invalid type: " + values["@type"]);
36799
37066
  }