@fedify/fedify 1.1.5 → 1.1.6

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.
@@ -10502,24 +10502,27 @@ export class Application extends Object {
10502
10502
  }
10503
10503
  }
10504
10504
  if ("inbox" in values && values.inbox != null) {
10505
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
10505
+ if (values.inbox instanceof OrderedCollection ||
10506
+ values.inbox instanceof OrderedCollectionPage ||
10507
+ values.inbox instanceof URL) {
10506
10508
  // @ts-ignore: type is checked above.
10507
10509
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
10508
10510
  }
10509
10511
  else {
10510
10512
  throw new TypeError("The inbox must be of type " +
10511
- "OrderedCollection | URL" + ".");
10513
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
10512
10514
  }
10513
10515
  }
10514
10516
  if ("outbox" in values && values.outbox != null) {
10515
10517
  if (values.outbox instanceof OrderedCollection ||
10518
+ values.outbox instanceof OrderedCollectionPage ||
10516
10519
  values.outbox instanceof URL) {
10517
10520
  // @ts-ignore: type is checked above.
10518
10521
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
10519
10522
  }
10520
10523
  else {
10521
10524
  throw new TypeError("The outbox must be of type " +
10522
- "OrderedCollection | URL" + ".");
10525
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
10523
10526
  }
10524
10527
  }
10525
10528
  if ("following" in values && values.following != null) {
@@ -10839,26 +10842,29 @@ export class Application extends Object {
10839
10842
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
10840
10843
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
10841
10844
  if ("inbox" in values && values.inbox != null) {
10842
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
10845
+ if (values.inbox instanceof OrderedCollection ||
10846
+ values.inbox instanceof OrderedCollectionPage ||
10847
+ values.inbox instanceof URL) {
10843
10848
  // @ts-ignore: type is checked above.
10844
10849
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
10845
10850
  }
10846
10851
  else {
10847
10852
  throw new TypeError("The inbox must be of type " +
10848
- "OrderedCollection | URL" + ".");
10853
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
10849
10854
  }
10850
10855
  }
10851
10856
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
10852
10857
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
10853
10858
  if ("outbox" in values && values.outbox != null) {
10854
10859
  if (values.outbox instanceof OrderedCollection ||
10860
+ values.outbox instanceof OrderedCollectionPage ||
10855
10861
  values.outbox instanceof URL) {
10856
10862
  // @ts-ignore: type is checked above.
10857
10863
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
10858
10864
  }
10859
10865
  else {
10860
10866
  throw new TypeError("The outbox must be of type " +
10861
- "OrderedCollection | URL" + ".");
10867
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
10862
10868
  }
10863
10869
  }
10864
10870
  clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
@@ -11311,8 +11317,18 @@ export class Application extends Object {
11311
11317
  if (!(e instanceof TypeError))
11312
11318
  throw e;
11313
11319
  }
11320
+ try {
11321
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
11322
+ }
11323
+ catch (e) {
11324
+ if (!(e instanceof TypeError))
11325
+ throw e;
11326
+ }
11314
11327
  throw new TypeError("Expected an object of any type of: " +
11315
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
11328
+ [
11329
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
11330
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
11331
+ ].join(", "));
11316
11332
  }
11317
11333
  /**
11318
11334
  * Similar to
@@ -11378,8 +11394,18 @@ export class Application extends Object {
11378
11394
  if (!(e instanceof TypeError))
11379
11395
  throw e;
11380
11396
  }
11397
+ try {
11398
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
11399
+ }
11400
+ catch (e) {
11401
+ if (!(e instanceof TypeError))
11402
+ throw e;
11403
+ }
11381
11404
  throw new TypeError("Expected an object of any type of: " +
11382
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
11405
+ [
11406
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
11407
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
11408
+ ].join(", "));
11383
11409
  }
11384
11410
  /**
11385
11411
  * Similar to
@@ -12199,11 +12225,19 @@ export class Application extends Object {
12199
12225
  }
12200
12226
  compactItems = [];
12201
12227
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
12202
- const item = v instanceof URL ? v.href : await v.toJsonLd({
12203
- ...options,
12204
- format: undefined,
12205
- context: undefined,
12206
- });
12228
+ const item = v instanceof URL
12229
+ ? v.href
12230
+ : v instanceof OrderedCollection
12231
+ ? await v.toJsonLd({
12232
+ ...options,
12233
+ format: undefined,
12234
+ context: undefined,
12235
+ })
12236
+ : await v.toJsonLd({
12237
+ ...options,
12238
+ format: undefined,
12239
+ context: undefined,
12240
+ });
12207
12241
  compactItems.push(item);
12208
12242
  }
12209
12243
  if (compactItems.length > 0) {
@@ -12213,11 +12247,19 @@ export class Application extends Object {
12213
12247
  }
12214
12248
  compactItems = [];
12215
12249
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
12216
- const item = v instanceof URL ? v.href : await v.toJsonLd({
12217
- ...options,
12218
- format: undefined,
12219
- context: undefined,
12220
- });
12250
+ const item = v instanceof URL
12251
+ ? v.href
12252
+ : v instanceof OrderedCollection
12253
+ ? await v.toJsonLd({
12254
+ ...options,
12255
+ format: undefined,
12256
+ context: undefined,
12257
+ })
12258
+ : await v.toJsonLd({
12259
+ ...options,
12260
+ format: undefined,
12261
+ context: undefined,
12262
+ });
12221
12263
  compactItems.push(item);
12222
12264
  }
12223
12265
  if (compactItems.length > 0) {
@@ -12552,7 +12594,9 @@ export class Application extends Object {
12552
12594
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
12553
12595
  const element = v instanceof URL
12554
12596
  ? { "@id": v.href }
12555
- : await v.toJsonLd(options);
12597
+ : v instanceof OrderedCollection
12598
+ ? await v.toJsonLd(options)
12599
+ : await v.toJsonLd(options);
12556
12600
  array.push(element);
12557
12601
  }
12558
12602
  if (array.length > 0) {
@@ -12563,7 +12607,9 @@ export class Application extends Object {
12563
12607
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
12564
12608
  const element = v instanceof URL
12565
12609
  ? { "@id": v.href }
12566
- : await v.toJsonLd(options);
12610
+ : v instanceof OrderedCollection
12611
+ ? await v.toJsonLd(options)
12612
+ : await v.toJsonLd(options);
12567
12613
  array.push(element);
12568
12614
  }
12569
12615
  if (array.length > 0) {
@@ -12941,7 +12987,18 @@ export class Application extends Object {
12941
12987
  : new URL(v["@id"]));
12942
12988
  continue;
12943
12989
  }
12944
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
12990
+ const decoded = typeof v === "object" && "@type" in v &&
12991
+ Array.isArray(v["@type"]) &&
12992
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
12993
+ ? await OrderedCollection.fromJsonLd(v, options)
12994
+ : typeof v === "object" && "@type" in v &&
12995
+ Array.isArray(v["@type"]) &&
12996
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
12997
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
12998
+ : undefined;
12999
+ if (typeof decoded === "undefined")
13000
+ continue;
13001
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
12945
13002
  }
12946
13003
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
12947
13004
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -12962,7 +13019,18 @@ export class Application extends Object {
12962
13019
  : new URL(v["@id"]));
12963
13020
  continue;
12964
13021
  }
12965
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
13022
+ const decoded = typeof v === "object" && "@type" in v &&
13023
+ Array.isArray(v["@type"]) &&
13024
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
13025
+ ? await OrderedCollection.fromJsonLd(v, options)
13026
+ : typeof v === "object" && "@type" in v &&
13027
+ Array.isArray(v["@type"]) &&
13028
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
13029
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
13030
+ : undefined;
13031
+ if (typeof decoded === "undefined")
13032
+ continue;
13033
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
12966
13034
  }
12967
13035
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
12968
13036
  _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -18406,24 +18474,27 @@ export class Group extends Object {
18406
18474
  }
18407
18475
  }
18408
18476
  if ("inbox" in values && values.inbox != null) {
18409
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
18477
+ if (values.inbox instanceof OrderedCollection ||
18478
+ values.inbox instanceof OrderedCollectionPage ||
18479
+ values.inbox instanceof URL) {
18410
18480
  // @ts-ignore: type is checked above.
18411
18481
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
18412
18482
  }
18413
18483
  else {
18414
18484
  throw new TypeError("The inbox must be of type " +
18415
- "OrderedCollection | URL" + ".");
18485
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
18416
18486
  }
18417
18487
  }
18418
18488
  if ("outbox" in values && values.outbox != null) {
18419
18489
  if (values.outbox instanceof OrderedCollection ||
18490
+ values.outbox instanceof OrderedCollectionPage ||
18420
18491
  values.outbox instanceof URL) {
18421
18492
  // @ts-ignore: type is checked above.
18422
18493
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
18423
18494
  }
18424
18495
  else {
18425
18496
  throw new TypeError("The outbox must be of type " +
18426
- "OrderedCollection | URL" + ".");
18497
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
18427
18498
  }
18428
18499
  }
18429
18500
  if ("following" in values && values.following != null) {
@@ -18743,26 +18814,29 @@ export class Group extends Object {
18743
18814
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
18744
18815
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
18745
18816
  if ("inbox" in values && values.inbox != null) {
18746
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
18817
+ if (values.inbox instanceof OrderedCollection ||
18818
+ values.inbox instanceof OrderedCollectionPage ||
18819
+ values.inbox instanceof URL) {
18747
18820
  // @ts-ignore: type is checked above.
18748
18821
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
18749
18822
  }
18750
18823
  else {
18751
18824
  throw new TypeError("The inbox must be of type " +
18752
- "OrderedCollection | URL" + ".");
18825
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
18753
18826
  }
18754
18827
  }
18755
18828
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
18756
18829
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
18757
18830
  if ("outbox" in values && values.outbox != null) {
18758
18831
  if (values.outbox instanceof OrderedCollection ||
18832
+ values.outbox instanceof OrderedCollectionPage ||
18759
18833
  values.outbox instanceof URL) {
18760
18834
  // @ts-ignore: type is checked above.
18761
18835
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
18762
18836
  }
18763
18837
  else {
18764
18838
  throw new TypeError("The outbox must be of type " +
18765
- "OrderedCollection | URL" + ".");
18839
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
18766
18840
  }
18767
18841
  }
18768
18842
  clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
@@ -19215,8 +19289,18 @@ export class Group extends Object {
19215
19289
  if (!(e instanceof TypeError))
19216
19290
  throw e;
19217
19291
  }
19292
+ try {
19293
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
19294
+ }
19295
+ catch (e) {
19296
+ if (!(e instanceof TypeError))
19297
+ throw e;
19298
+ }
19218
19299
  throw new TypeError("Expected an object of any type of: " +
19219
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
19300
+ [
19301
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
19302
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
19303
+ ].join(", "));
19220
19304
  }
19221
19305
  /**
19222
19306
  * Similar to
@@ -19282,8 +19366,18 @@ export class Group extends Object {
19282
19366
  if (!(e instanceof TypeError))
19283
19367
  throw e;
19284
19368
  }
19369
+ try {
19370
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
19371
+ }
19372
+ catch (e) {
19373
+ if (!(e instanceof TypeError))
19374
+ throw e;
19375
+ }
19285
19376
  throw new TypeError("Expected an object of any type of: " +
19286
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
19377
+ [
19378
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
19379
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
19380
+ ].join(", "));
19287
19381
  }
19288
19382
  /**
19289
19383
  * Similar to
@@ -20103,11 +20197,19 @@ export class Group extends Object {
20103
20197
  }
20104
20198
  compactItems = [];
20105
20199
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
20106
- const item = v instanceof URL ? v.href : await v.toJsonLd({
20107
- ...options,
20108
- format: undefined,
20109
- context: undefined,
20110
- });
20200
+ const item = v instanceof URL
20201
+ ? v.href
20202
+ : v instanceof OrderedCollection
20203
+ ? await v.toJsonLd({
20204
+ ...options,
20205
+ format: undefined,
20206
+ context: undefined,
20207
+ })
20208
+ : await v.toJsonLd({
20209
+ ...options,
20210
+ format: undefined,
20211
+ context: undefined,
20212
+ });
20111
20213
  compactItems.push(item);
20112
20214
  }
20113
20215
  if (compactItems.length > 0) {
@@ -20117,11 +20219,19 @@ export class Group extends Object {
20117
20219
  }
20118
20220
  compactItems = [];
20119
20221
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
20120
- const item = v instanceof URL ? v.href : await v.toJsonLd({
20121
- ...options,
20122
- format: undefined,
20123
- context: undefined,
20124
- });
20222
+ const item = v instanceof URL
20223
+ ? v.href
20224
+ : v instanceof OrderedCollection
20225
+ ? await v.toJsonLd({
20226
+ ...options,
20227
+ format: undefined,
20228
+ context: undefined,
20229
+ })
20230
+ : await v.toJsonLd({
20231
+ ...options,
20232
+ format: undefined,
20233
+ context: undefined,
20234
+ });
20125
20235
  compactItems.push(item);
20126
20236
  }
20127
20237
  if (compactItems.length > 0) {
@@ -20456,7 +20566,9 @@ export class Group extends Object {
20456
20566
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
20457
20567
  const element = v instanceof URL
20458
20568
  ? { "@id": v.href }
20459
- : await v.toJsonLd(options);
20569
+ : v instanceof OrderedCollection
20570
+ ? await v.toJsonLd(options)
20571
+ : await v.toJsonLd(options);
20460
20572
  array.push(element);
20461
20573
  }
20462
20574
  if (array.length > 0) {
@@ -20467,7 +20579,9 @@ export class Group extends Object {
20467
20579
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
20468
20580
  const element = v instanceof URL
20469
20581
  ? { "@id": v.href }
20470
- : await v.toJsonLd(options);
20582
+ : v instanceof OrderedCollection
20583
+ ? await v.toJsonLd(options)
20584
+ : await v.toJsonLd(options);
20471
20585
  array.push(element);
20472
20586
  }
20473
20587
  if (array.length > 0) {
@@ -20845,7 +20959,18 @@ export class Group extends Object {
20845
20959
  : new URL(v["@id"]));
20846
20960
  continue;
20847
20961
  }
20848
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
20962
+ const decoded = typeof v === "object" && "@type" in v &&
20963
+ Array.isArray(v["@type"]) &&
20964
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
20965
+ ? await OrderedCollection.fromJsonLd(v, options)
20966
+ : typeof v === "object" && "@type" in v &&
20967
+ Array.isArray(v["@type"]) &&
20968
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
20969
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
20970
+ : undefined;
20971
+ if (typeof decoded === "undefined")
20972
+ continue;
20973
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
20849
20974
  }
20850
20975
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
20851
20976
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -20866,7 +20991,18 @@ export class Group extends Object {
20866
20991
  : new URL(v["@id"]));
20867
20992
  continue;
20868
20993
  }
20869
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
20994
+ const decoded = typeof v === "object" && "@type" in v &&
20995
+ Array.isArray(v["@type"]) &&
20996
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
20997
+ ? await OrderedCollection.fromJsonLd(v, options)
20998
+ : typeof v === "object" && "@type" in v &&
20999
+ Array.isArray(v["@type"]) &&
21000
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
21001
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
21002
+ : undefined;
21003
+ if (typeof decoded === "undefined")
21004
+ continue;
21005
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
20870
21006
  }
20871
21007
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
20872
21008
  _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -25528,24 +25664,27 @@ export class Organization extends Object {
25528
25664
  }
25529
25665
  }
25530
25666
  if ("inbox" in values && values.inbox != null) {
25531
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
25667
+ if (values.inbox instanceof OrderedCollection ||
25668
+ values.inbox instanceof OrderedCollectionPage ||
25669
+ values.inbox instanceof URL) {
25532
25670
  // @ts-ignore: type is checked above.
25533
25671
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
25534
25672
  }
25535
25673
  else {
25536
25674
  throw new TypeError("The inbox must be of type " +
25537
- "OrderedCollection | URL" + ".");
25675
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
25538
25676
  }
25539
25677
  }
25540
25678
  if ("outbox" in values && values.outbox != null) {
25541
25679
  if (values.outbox instanceof OrderedCollection ||
25680
+ values.outbox instanceof OrderedCollectionPage ||
25542
25681
  values.outbox instanceof URL) {
25543
25682
  // @ts-ignore: type is checked above.
25544
25683
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
25545
25684
  }
25546
25685
  else {
25547
25686
  throw new TypeError("The outbox must be of type " +
25548
- "OrderedCollection | URL" + ".");
25687
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
25549
25688
  }
25550
25689
  }
25551
25690
  if ("following" in values && values.following != null) {
@@ -25865,26 +26004,29 @@ export class Organization extends Object {
25865
26004
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
25866
26005
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
25867
26006
  if ("inbox" in values && values.inbox != null) {
25868
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
26007
+ if (values.inbox instanceof OrderedCollection ||
26008
+ values.inbox instanceof OrderedCollectionPage ||
26009
+ values.inbox instanceof URL) {
25869
26010
  // @ts-ignore: type is checked above.
25870
26011
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
25871
26012
  }
25872
26013
  else {
25873
26014
  throw new TypeError("The inbox must be of type " +
25874
- "OrderedCollection | URL" + ".");
26015
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
25875
26016
  }
25876
26017
  }
25877
26018
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
25878
26019
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
25879
26020
  if ("outbox" in values && values.outbox != null) {
25880
26021
  if (values.outbox instanceof OrderedCollection ||
26022
+ values.outbox instanceof OrderedCollectionPage ||
25881
26023
  values.outbox instanceof URL) {
25882
26024
  // @ts-ignore: type is checked above.
25883
26025
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
25884
26026
  }
25885
26027
  else {
25886
26028
  throw new TypeError("The outbox must be of type " +
25887
- "OrderedCollection | URL" + ".");
26029
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
25888
26030
  }
25889
26031
  }
25890
26032
  clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
@@ -26337,8 +26479,18 @@ export class Organization extends Object {
26337
26479
  if (!(e instanceof TypeError))
26338
26480
  throw e;
26339
26481
  }
26482
+ try {
26483
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
26484
+ }
26485
+ catch (e) {
26486
+ if (!(e instanceof TypeError))
26487
+ throw e;
26488
+ }
26340
26489
  throw new TypeError("Expected an object of any type of: " +
26341
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
26490
+ [
26491
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
26492
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
26493
+ ].join(", "));
26342
26494
  }
26343
26495
  /**
26344
26496
  * Similar to
@@ -26404,8 +26556,18 @@ export class Organization extends Object {
26404
26556
  if (!(e instanceof TypeError))
26405
26557
  throw e;
26406
26558
  }
26559
+ try {
26560
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
26561
+ }
26562
+ catch (e) {
26563
+ if (!(e instanceof TypeError))
26564
+ throw e;
26565
+ }
26407
26566
  throw new TypeError("Expected an object of any type of: " +
26408
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
26567
+ [
26568
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
26569
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
26570
+ ].join(", "));
26409
26571
  }
26410
26572
  /**
26411
26573
  * Similar to
@@ -27225,11 +27387,19 @@ export class Organization extends Object {
27225
27387
  }
27226
27388
  compactItems = [];
27227
27389
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
27228
- const item = v instanceof URL ? v.href : await v.toJsonLd({
27229
- ...options,
27230
- format: undefined,
27231
- context: undefined,
27232
- });
27390
+ const item = v instanceof URL
27391
+ ? v.href
27392
+ : v instanceof OrderedCollection
27393
+ ? await v.toJsonLd({
27394
+ ...options,
27395
+ format: undefined,
27396
+ context: undefined,
27397
+ })
27398
+ : await v.toJsonLd({
27399
+ ...options,
27400
+ format: undefined,
27401
+ context: undefined,
27402
+ });
27233
27403
  compactItems.push(item);
27234
27404
  }
27235
27405
  if (compactItems.length > 0) {
@@ -27239,11 +27409,19 @@ export class Organization extends Object {
27239
27409
  }
27240
27410
  compactItems = [];
27241
27411
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
27242
- const item = v instanceof URL ? v.href : await v.toJsonLd({
27243
- ...options,
27244
- format: undefined,
27245
- context: undefined,
27246
- });
27412
+ const item = v instanceof URL
27413
+ ? v.href
27414
+ : v instanceof OrderedCollection
27415
+ ? await v.toJsonLd({
27416
+ ...options,
27417
+ format: undefined,
27418
+ context: undefined,
27419
+ })
27420
+ : await v.toJsonLd({
27421
+ ...options,
27422
+ format: undefined,
27423
+ context: undefined,
27424
+ });
27247
27425
  compactItems.push(item);
27248
27426
  }
27249
27427
  if (compactItems.length > 0) {
@@ -27578,7 +27756,9 @@ export class Organization extends Object {
27578
27756
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
27579
27757
  const element = v instanceof URL
27580
27758
  ? { "@id": v.href }
27581
- : await v.toJsonLd(options);
27759
+ : v instanceof OrderedCollection
27760
+ ? await v.toJsonLd(options)
27761
+ : await v.toJsonLd(options);
27582
27762
  array.push(element);
27583
27763
  }
27584
27764
  if (array.length > 0) {
@@ -27589,7 +27769,9 @@ export class Organization extends Object {
27589
27769
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
27590
27770
  const element = v instanceof URL
27591
27771
  ? { "@id": v.href }
27592
- : await v.toJsonLd(options);
27772
+ : v instanceof OrderedCollection
27773
+ ? await v.toJsonLd(options)
27774
+ : await v.toJsonLd(options);
27593
27775
  array.push(element);
27594
27776
  }
27595
27777
  if (array.length > 0) {
@@ -27967,7 +28149,18 @@ export class Organization extends Object {
27967
28149
  : new URL(v["@id"]));
27968
28150
  continue;
27969
28151
  }
27970
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
28152
+ const decoded = typeof v === "object" && "@type" in v &&
28153
+ Array.isArray(v["@type"]) &&
28154
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
28155
+ ? await OrderedCollection.fromJsonLd(v, options)
28156
+ : typeof v === "object" && "@type" in v &&
28157
+ Array.isArray(v["@type"]) &&
28158
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
28159
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
28160
+ : undefined;
28161
+ if (typeof decoded === "undefined")
28162
+ continue;
28163
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
27971
28164
  }
27972
28165
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
27973
28166
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -27988,7 +28181,18 @@ export class Organization extends Object {
27988
28181
  : new URL(v["@id"]));
27989
28182
  continue;
27990
28183
  }
27991
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
28184
+ const decoded = typeof v === "object" && "@type" in v &&
28185
+ Array.isArray(v["@type"]) &&
28186
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
28187
+ ? await OrderedCollection.fromJsonLd(v, options)
28188
+ : typeof v === "object" && "@type" in v &&
28189
+ Array.isArray(v["@type"]) &&
28190
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
28191
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
28192
+ : undefined;
28193
+ if (typeof decoded === "undefined")
28194
+ continue;
28195
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
27992
28196
  }
27993
28197
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
27994
28198
  _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -28931,24 +29135,27 @@ export class Person extends Object {
28931
29135
  }
28932
29136
  }
28933
29137
  if ("inbox" in values && values.inbox != null) {
28934
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
29138
+ if (values.inbox instanceof OrderedCollection ||
29139
+ values.inbox instanceof OrderedCollectionPage ||
29140
+ values.inbox instanceof URL) {
28935
29141
  // @ts-ignore: type is checked above.
28936
29142
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
28937
29143
  }
28938
29144
  else {
28939
29145
  throw new TypeError("The inbox must be of type " +
28940
- "OrderedCollection | URL" + ".");
29146
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
28941
29147
  }
28942
29148
  }
28943
29149
  if ("outbox" in values && values.outbox != null) {
28944
29150
  if (values.outbox instanceof OrderedCollection ||
29151
+ values.outbox instanceof OrderedCollectionPage ||
28945
29152
  values.outbox instanceof URL) {
28946
29153
  // @ts-ignore: type is checked above.
28947
29154
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
28948
29155
  }
28949
29156
  else {
28950
29157
  throw new TypeError("The outbox must be of type " +
28951
- "OrderedCollection | URL" + ".");
29158
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
28952
29159
  }
28953
29160
  }
28954
29161
  if ("following" in values && values.following != null) {
@@ -29268,26 +29475,29 @@ export class Person extends Object {
29268
29475
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
29269
29476
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
29270
29477
  if ("inbox" in values && values.inbox != null) {
29271
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
29478
+ if (values.inbox instanceof OrderedCollection ||
29479
+ values.inbox instanceof OrderedCollectionPage ||
29480
+ values.inbox instanceof URL) {
29272
29481
  // @ts-ignore: type is checked above.
29273
29482
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
29274
29483
  }
29275
29484
  else {
29276
29485
  throw new TypeError("The inbox must be of type " +
29277
- "OrderedCollection | URL" + ".");
29486
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
29278
29487
  }
29279
29488
  }
29280
29489
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
29281
29490
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
29282
29491
  if ("outbox" in values && values.outbox != null) {
29283
29492
  if (values.outbox instanceof OrderedCollection ||
29493
+ values.outbox instanceof OrderedCollectionPage ||
29284
29494
  values.outbox instanceof URL) {
29285
29495
  // @ts-ignore: type is checked above.
29286
29496
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
29287
29497
  }
29288
29498
  else {
29289
29499
  throw new TypeError("The outbox must be of type " +
29290
- "OrderedCollection | URL" + ".");
29500
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
29291
29501
  }
29292
29502
  }
29293
29503
  clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
@@ -29740,8 +29950,18 @@ export class Person extends Object {
29740
29950
  if (!(e instanceof TypeError))
29741
29951
  throw e;
29742
29952
  }
29953
+ try {
29954
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
29955
+ }
29956
+ catch (e) {
29957
+ if (!(e instanceof TypeError))
29958
+ throw e;
29959
+ }
29743
29960
  throw new TypeError("Expected an object of any type of: " +
29744
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
29961
+ [
29962
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
29963
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
29964
+ ].join(", "));
29745
29965
  }
29746
29966
  /**
29747
29967
  * Similar to
@@ -29807,8 +30027,18 @@ export class Person extends Object {
29807
30027
  if (!(e instanceof TypeError))
29808
30028
  throw e;
29809
30029
  }
30030
+ try {
30031
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
30032
+ }
30033
+ catch (e) {
30034
+ if (!(e instanceof TypeError))
30035
+ throw e;
30036
+ }
29810
30037
  throw new TypeError("Expected an object of any type of: " +
29811
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
30038
+ [
30039
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
30040
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
30041
+ ].join(", "));
29812
30042
  }
29813
30043
  /**
29814
30044
  * Similar to
@@ -30628,11 +30858,19 @@ export class Person extends Object {
30628
30858
  }
30629
30859
  compactItems = [];
30630
30860
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
30631
- const item = v instanceof URL ? v.href : await v.toJsonLd({
30632
- ...options,
30633
- format: undefined,
30634
- context: undefined,
30635
- });
30861
+ const item = v instanceof URL
30862
+ ? v.href
30863
+ : v instanceof OrderedCollection
30864
+ ? await v.toJsonLd({
30865
+ ...options,
30866
+ format: undefined,
30867
+ context: undefined,
30868
+ })
30869
+ : await v.toJsonLd({
30870
+ ...options,
30871
+ format: undefined,
30872
+ context: undefined,
30873
+ });
30636
30874
  compactItems.push(item);
30637
30875
  }
30638
30876
  if (compactItems.length > 0) {
@@ -30642,11 +30880,19 @@ export class Person extends Object {
30642
30880
  }
30643
30881
  compactItems = [];
30644
30882
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
30645
- const item = v instanceof URL ? v.href : await v.toJsonLd({
30646
- ...options,
30647
- format: undefined,
30648
- context: undefined,
30649
- });
30883
+ const item = v instanceof URL
30884
+ ? v.href
30885
+ : v instanceof OrderedCollection
30886
+ ? await v.toJsonLd({
30887
+ ...options,
30888
+ format: undefined,
30889
+ context: undefined,
30890
+ })
30891
+ : await v.toJsonLd({
30892
+ ...options,
30893
+ format: undefined,
30894
+ context: undefined,
30895
+ });
30650
30896
  compactItems.push(item);
30651
30897
  }
30652
30898
  if (compactItems.length > 0) {
@@ -30981,7 +31227,9 @@ export class Person extends Object {
30981
31227
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
30982
31228
  const element = v instanceof URL
30983
31229
  ? { "@id": v.href }
30984
- : await v.toJsonLd(options);
31230
+ : v instanceof OrderedCollection
31231
+ ? await v.toJsonLd(options)
31232
+ : await v.toJsonLd(options);
30985
31233
  array.push(element);
30986
31234
  }
30987
31235
  if (array.length > 0) {
@@ -30992,7 +31240,9 @@ export class Person extends Object {
30992
31240
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
30993
31241
  const element = v instanceof URL
30994
31242
  ? { "@id": v.href }
30995
- : await v.toJsonLd(options);
31243
+ : v instanceof OrderedCollection
31244
+ ? await v.toJsonLd(options)
31245
+ : await v.toJsonLd(options);
30996
31246
  array.push(element);
30997
31247
  }
30998
31248
  if (array.length > 0) {
@@ -31370,7 +31620,18 @@ export class Person extends Object {
31370
31620
  : new URL(v["@id"]));
31371
31621
  continue;
31372
31622
  }
31373
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
31623
+ const decoded = typeof v === "object" && "@type" in v &&
31624
+ Array.isArray(v["@type"]) &&
31625
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
31626
+ ? await OrderedCollection.fromJsonLd(v, options)
31627
+ : typeof v === "object" && "@type" in v &&
31628
+ Array.isArray(v["@type"]) &&
31629
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
31630
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
31631
+ : undefined;
31632
+ if (typeof decoded === "undefined")
31633
+ continue;
31634
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
31374
31635
  }
31375
31636
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
31376
31637
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -31391,7 +31652,18 @@ export class Person extends Object {
31391
31652
  : new URL(v["@id"]));
31392
31653
  continue;
31393
31654
  }
31394
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
31655
+ const decoded = typeof v === "object" && "@type" in v &&
31656
+ Array.isArray(v["@type"]) &&
31657
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
31658
+ ? await OrderedCollection.fromJsonLd(v, options)
31659
+ : typeof v === "object" && "@type" in v &&
31660
+ Array.isArray(v["@type"]) &&
31661
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
31662
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
31663
+ : undefined;
31664
+ if (typeof decoded === "undefined")
31665
+ continue;
31666
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
31395
31667
  }
31396
31668
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
31397
31669
  _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -35028,24 +35300,27 @@ export class Service extends Object {
35028
35300
  }
35029
35301
  }
35030
35302
  if ("inbox" in values && values.inbox != null) {
35031
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
35303
+ if (values.inbox instanceof OrderedCollection ||
35304
+ values.inbox instanceof OrderedCollectionPage ||
35305
+ values.inbox instanceof URL) {
35032
35306
  // @ts-ignore: type is checked above.
35033
35307
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
35034
35308
  }
35035
35309
  else {
35036
35310
  throw new TypeError("The inbox must be of type " +
35037
- "OrderedCollection | URL" + ".");
35311
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
35038
35312
  }
35039
35313
  }
35040
35314
  if ("outbox" in values && values.outbox != null) {
35041
35315
  if (values.outbox instanceof OrderedCollection ||
35316
+ values.outbox instanceof OrderedCollectionPage ||
35042
35317
  values.outbox instanceof URL) {
35043
35318
  // @ts-ignore: type is checked above.
35044
35319
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
35045
35320
  }
35046
35321
  else {
35047
35322
  throw new TypeError("The outbox must be of type " +
35048
- "OrderedCollection | URL" + ".");
35323
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
35049
35324
  }
35050
35325
  }
35051
35326
  if ("following" in values && values.following != null) {
@@ -35365,26 +35640,29 @@ export class Service extends Object {
35365
35640
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
35366
35641
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
35367
35642
  if ("inbox" in values && values.inbox != null) {
35368
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
35643
+ if (values.inbox instanceof OrderedCollection ||
35644
+ values.inbox instanceof OrderedCollectionPage ||
35645
+ values.inbox instanceof URL) {
35369
35646
  // @ts-ignore: type is checked above.
35370
35647
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
35371
35648
  }
35372
35649
  else {
35373
35650
  throw new TypeError("The inbox must be of type " +
35374
- "OrderedCollection | URL" + ".");
35651
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
35375
35652
  }
35376
35653
  }
35377
35654
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
35378
35655
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
35379
35656
  if ("outbox" in values && values.outbox != null) {
35380
35657
  if (values.outbox instanceof OrderedCollection ||
35658
+ values.outbox instanceof OrderedCollectionPage ||
35381
35659
  values.outbox instanceof URL) {
35382
35660
  // @ts-ignore: type is checked above.
35383
35661
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
35384
35662
  }
35385
35663
  else {
35386
35664
  throw new TypeError("The outbox must be of type " +
35387
- "OrderedCollection | URL" + ".");
35665
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
35388
35666
  }
35389
35667
  }
35390
35668
  clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
@@ -35837,8 +36115,18 @@ export class Service extends Object {
35837
36115
  if (!(e instanceof TypeError))
35838
36116
  throw e;
35839
36117
  }
36118
+ try {
36119
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
36120
+ }
36121
+ catch (e) {
36122
+ if (!(e instanceof TypeError))
36123
+ throw e;
36124
+ }
35840
36125
  throw new TypeError("Expected an object of any type of: " +
35841
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
36126
+ [
36127
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
36128
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
36129
+ ].join(", "));
35842
36130
  }
35843
36131
  /**
35844
36132
  * Similar to
@@ -35904,8 +36192,18 @@ export class Service extends Object {
35904
36192
  if (!(e instanceof TypeError))
35905
36193
  throw e;
35906
36194
  }
36195
+ try {
36196
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
36197
+ }
36198
+ catch (e) {
36199
+ if (!(e instanceof TypeError))
36200
+ throw e;
36201
+ }
35907
36202
  throw new TypeError("Expected an object of any type of: " +
35908
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
36203
+ [
36204
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
36205
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
36206
+ ].join(", "));
35909
36207
  }
35910
36208
  /**
35911
36209
  * Similar to
@@ -36725,11 +37023,19 @@ export class Service extends Object {
36725
37023
  }
36726
37024
  compactItems = [];
36727
37025
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
36728
- const item = v instanceof URL ? v.href : await v.toJsonLd({
36729
- ...options,
36730
- format: undefined,
36731
- context: undefined,
36732
- });
37026
+ const item = v instanceof URL
37027
+ ? v.href
37028
+ : v instanceof OrderedCollection
37029
+ ? await v.toJsonLd({
37030
+ ...options,
37031
+ format: undefined,
37032
+ context: undefined,
37033
+ })
37034
+ : await v.toJsonLd({
37035
+ ...options,
37036
+ format: undefined,
37037
+ context: undefined,
37038
+ });
36733
37039
  compactItems.push(item);
36734
37040
  }
36735
37041
  if (compactItems.length > 0) {
@@ -36739,11 +37045,19 @@ export class Service extends Object {
36739
37045
  }
36740
37046
  compactItems = [];
36741
37047
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
36742
- const item = v instanceof URL ? v.href : await v.toJsonLd({
36743
- ...options,
36744
- format: undefined,
36745
- context: undefined,
36746
- });
37048
+ const item = v instanceof URL
37049
+ ? v.href
37050
+ : v instanceof OrderedCollection
37051
+ ? await v.toJsonLd({
37052
+ ...options,
37053
+ format: undefined,
37054
+ context: undefined,
37055
+ })
37056
+ : await v.toJsonLd({
37057
+ ...options,
37058
+ format: undefined,
37059
+ context: undefined,
37060
+ });
36747
37061
  compactItems.push(item);
36748
37062
  }
36749
37063
  if (compactItems.length > 0) {
@@ -37078,7 +37392,9 @@ export class Service extends Object {
37078
37392
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
37079
37393
  const element = v instanceof URL
37080
37394
  ? { "@id": v.href }
37081
- : await v.toJsonLd(options);
37395
+ : v instanceof OrderedCollection
37396
+ ? await v.toJsonLd(options)
37397
+ : await v.toJsonLd(options);
37082
37398
  array.push(element);
37083
37399
  }
37084
37400
  if (array.length > 0) {
@@ -37089,7 +37405,9 @@ export class Service extends Object {
37089
37405
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
37090
37406
  const element = v instanceof URL
37091
37407
  ? { "@id": v.href }
37092
- : await v.toJsonLd(options);
37408
+ : v instanceof OrderedCollection
37409
+ ? await v.toJsonLd(options)
37410
+ : await v.toJsonLd(options);
37093
37411
  array.push(element);
37094
37412
  }
37095
37413
  if (array.length > 0) {
@@ -37467,7 +37785,18 @@ export class Service extends Object {
37467
37785
  : new URL(v["@id"]));
37468
37786
  continue;
37469
37787
  }
37470
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
37788
+ const decoded = typeof v === "object" && "@type" in v &&
37789
+ Array.isArray(v["@type"]) &&
37790
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
37791
+ ? await OrderedCollection.fromJsonLd(v, options)
37792
+ : typeof v === "object" && "@type" in v &&
37793
+ Array.isArray(v["@type"]) &&
37794
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
37795
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
37796
+ : undefined;
37797
+ if (typeof decoded === "undefined")
37798
+ continue;
37799
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
37471
37800
  }
37472
37801
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
37473
37802
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -37488,7 +37817,18 @@ export class Service extends Object {
37488
37817
  : new URL(v["@id"]));
37489
37818
  continue;
37490
37819
  }
37491
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
37820
+ const decoded = typeof v === "object" && "@type" in v &&
37821
+ Array.isArray(v["@type"]) &&
37822
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
37823
+ ? await OrderedCollection.fromJsonLd(v, options)
37824
+ : typeof v === "object" && "@type" in v &&
37825
+ Array.isArray(v["@type"]) &&
37826
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
37827
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
37828
+ : undefined;
37829
+ if (typeof decoded === "undefined")
37830
+ continue;
37831
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
37492
37832
  }
37493
37833
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
37494
37834
  _41QwhqJouoLg3h8dRPKat21brynC_outbox;