@pkcprotocol/pkc-js 0.0.117 → 0.0.118

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 (63) hide show
  1. package/dist/browser/errors.d.ts +2 -0
  2. package/dist/browser/errors.js +2 -0
  3. package/dist/browser/errors.js.map +1 -1
  4. package/dist/browser/generated-version.d.ts +1 -1
  5. package/dist/browser/generated-version.js +1 -1
  6. package/dist/browser/pkc-error.d.ts +1 -1
  7. package/dist/browser/runtime/node/community/challenges/index.d.ts +17 -3
  8. package/dist/browser/runtime/node/community/challenges/index.js +58 -16
  9. package/dist/browser/runtime/node/community/challenges/index.js.map +1 -1
  10. package/dist/browser/runtime/node/community/challenges/validate-challenge-settings.js +1 -1
  11. package/dist/browser/runtime/node/community/challenges/validate-challenge-settings.js.map +1 -1
  12. package/dist/browser/runtime/node/community/local-community/challenges.js +7 -1
  13. package/dist/browser/runtime/node/community/local-community/challenges.js.map +1 -1
  14. package/dist/browser/runtime/node/community/local-community/db-state.js +5 -2
  15. package/dist/browser/runtime/node/community/local-community/db-state.js.map +1 -1
  16. package/dist/browser/runtime/node/community/local-community/editing.js +5 -2
  17. package/dist/browser/runtime/node/community/local-community/editing.js.map +1 -1
  18. package/dist/browser/runtime/node/community/local-community/lifecycle.js +19 -4
  19. package/dist/browser/runtime/node/community/local-community/lifecycle.js.map +1 -1
  20. package/dist/browser/runtime/node/community/local-community/registry-sync.js +20 -5
  21. package/dist/browser/runtime/node/community/local-community/registry-sync.js.map +1 -1
  22. package/dist/browser/runtime/node/community/local-community.d.ts +1 -0
  23. package/dist/browser/runtime/node/community/local-community.js +3 -0
  24. package/dist/browser/runtime/node/community/local-community.js.map +1 -1
  25. package/dist/bundled/bundle-manifest.json +40 -40
  26. package/dist/bundled/challenges.js +1 -1
  27. package/dist/bundled/chunks/{helia-for-pkc-DuG274FA.js → helia-for-pkc-DMzV8Gsa.js} +2 -2
  28. package/dist/bundled/chunks/{local-community-XUj49rN_.js → local-community-DvEh9Nte.js} +37 -14
  29. package/dist/bundled/chunks/{local-community-BsALoql_.js → local-community-YoJAmva8.js} +1 -1
  30. package/dist/bundled/chunks/{node-DkNDHK6w.js → node-CH9-YjYa.js} +5 -5
  31. package/dist/bundled/chunks/{page-sort-scoring-Cd97obb3.js → page-sort-scoring-C1XYRQ1w.js} +1 -1
  32. package/dist/bundled/chunks/{rpc-local-community-7uUa4lxH.js → rpc-local-community-DqKbZLIy.js} +64 -20
  33. package/dist/bundled/chunks/{util-BMGkXifx.js → util-CpoO437x.js} +1 -1
  34. package/dist/bundled/chunks/{util-Bm9ef_d5.js → util-DEmcezee.js} +3 -1
  35. package/dist/bundled/chunks/{validate-package-factories-DHupf8eD.js → validate-package-factories-C9A4AtCN.js} +2 -2
  36. package/dist/bundled/index.js +1 -1
  37. package/dist/bundled/page-sorts.js +1 -1
  38. package/dist/bundled/rpc/src/index.js +4 -4
  39. package/dist/node/errors.d.ts +2 -0
  40. package/dist/node/errors.js +2 -0
  41. package/dist/node/errors.js.map +1 -1
  42. package/dist/node/generated-version.d.ts +1 -1
  43. package/dist/node/generated-version.js +1 -1
  44. package/dist/node/pkc-error.d.ts +1 -1
  45. package/dist/node/runtime/node/community/challenges/index.d.ts +17 -3
  46. package/dist/node/runtime/node/community/challenges/index.js +58 -16
  47. package/dist/node/runtime/node/community/challenges/index.js.map +1 -1
  48. package/dist/node/runtime/node/community/challenges/validate-challenge-settings.js +1 -1
  49. package/dist/node/runtime/node/community/challenges/validate-challenge-settings.js.map +1 -1
  50. package/dist/node/runtime/node/community/local-community/challenges.js +7 -1
  51. package/dist/node/runtime/node/community/local-community/challenges.js.map +1 -1
  52. package/dist/node/runtime/node/community/local-community/db-state.js +5 -2
  53. package/dist/node/runtime/node/community/local-community/db-state.js.map +1 -1
  54. package/dist/node/runtime/node/community/local-community/editing.js +5 -2
  55. package/dist/node/runtime/node/community/local-community/editing.js.map +1 -1
  56. package/dist/node/runtime/node/community/local-community/lifecycle.js +19 -4
  57. package/dist/node/runtime/node/community/local-community/lifecycle.js.map +1 -1
  58. package/dist/node/runtime/node/community/local-community/registry-sync.js +20 -5
  59. package/dist/node/runtime/node/community/local-community/registry-sync.js.map +1 -1
  60. package/dist/node/runtime/node/community/local-community.d.ts +1 -0
  61. package/dist/node/runtime/node/community/local-community.js +3 -0
  62. package/dist/node/runtime/node/community/local-community.js.map +1 -1
  63. package/package.json +1 -1
@@ -3,7 +3,7 @@
3
3
  "challenges.js": {
4
4
  "isEntry": true,
5
5
  "imports": [
6
- "chunks/validate-package-factories-DHupf8eD.js"
6
+ "chunks/validate-package-factories-C9A4AtCN.js"
7
7
  ],
8
8
  "dynamicImports": [],
9
9
  "inputs": [
@@ -16,7 +16,7 @@
16
16
  "node:module"
17
17
  ],
18
18
  "dynamicImports": [
19
- "chunks/node-DkNDHK6w.js"
19
+ "chunks/node-CH9-YjYa.js"
20
20
  ],
21
21
  "inputs": [
22
22
  "dist/node/runtime/node/compile-cache.js",
@@ -26,7 +26,7 @@
26
26
  "index.js": {
27
27
  "isEntry": true,
28
28
  "imports": [
29
- "chunks/node-DkNDHK6w.js"
29
+ "chunks/node-CH9-YjYa.js"
30
30
  ],
31
31
  "dynamicImports": [],
32
32
  "inputs": []
@@ -34,7 +34,7 @@
34
34
  "page-sorts.js": {
35
35
  "isEntry": true,
36
36
  "imports": [
37
- "chunks/validate-package-factories-DHupf8eD.js"
37
+ "chunks/validate-package-factories-C9A4AtCN.js"
38
38
  ],
39
39
  "dynamicImports": [],
40
40
  "inputs": [
@@ -44,10 +44,10 @@
44
44
  "rpc/src/index.js": {
45
45
  "isEntry": true,
46
46
  "imports": [
47
- "chunks/rpc-local-community-7uUa4lxH.js",
48
- "chunks/node-DkNDHK6w.js",
49
- "chunks/util-Bm9ef_d5.js",
50
- "chunks/local-community-XUj49rN_.js",
47
+ "chunks/rpc-local-community-DqKbZLIy.js",
48
+ "chunks/node-CH9-YjYa.js",
49
+ "chunks/util-DEmcezee.js",
50
+ "chunks/local-community-DvEh9Nte.js",
51
51
  "node:url",
52
52
  "path",
53
53
  "assert",
@@ -77,12 +77,12 @@
77
77
  "\u0000rolldown/runtime.js"
78
78
  ]
79
79
  },
80
- "chunks/helia-for-pkc-DuG274FA.js": {
80
+ "chunks/helia-for-pkc-DMzV8Gsa.js": {
81
81
  "isEntry": false,
82
82
  "imports": [
83
83
  "chunks/chunk-2rV9d50f.js",
84
- "chunks/util-Bm9ef_d5.js",
85
- "chunks/util-BMGkXifx.js",
84
+ "chunks/util-DEmcezee.js",
85
+ "chunks/util-CpoO437x.js",
86
86
  "chunks/src-DKntVmyX.js",
87
87
  "chunks/src-Cpx2Sts8.js",
88
88
  "node:url",
@@ -201,21 +201,13 @@
201
201
  "dist/node/helia/helia-for-pkc.js"
202
202
  ]
203
203
  },
204
- "chunks/local-community-BsALoql_.js": {
205
- "isEntry": false,
206
- "imports": [
207
- "chunks/local-community-XUj49rN_.js"
208
- ],
209
- "dynamicImports": [],
210
- "inputs": []
211
- },
212
- "chunks/local-community-XUj49rN_.js": {
204
+ "chunks/local-community-DvEh9Nte.js": {
213
205
  "isEntry": false,
214
206
  "imports": [
215
207
  "chunks/chunk-2rV9d50f.js",
216
- "chunks/rpc-local-community-7uUa4lxH.js",
217
- "chunks/util-Bm9ef_d5.js",
218
- "chunks/page-sort-scoring-Cd97obb3.js",
208
+ "chunks/rpc-local-community-DqKbZLIy.js",
209
+ "chunks/util-DEmcezee.js",
210
+ "chunks/page-sort-scoring-C1XYRQ1w.js",
219
211
  "node:crypto",
220
212
  "node:url",
221
213
  "node:path",
@@ -274,13 +266,21 @@
274
266
  "dist/node/runtime/node/community/local-community.js"
275
267
  ]
276
268
  },
277
- "chunks/node-DkNDHK6w.js": {
269
+ "chunks/local-community-YoJAmva8.js": {
270
+ "isEntry": false,
271
+ "imports": [
272
+ "chunks/local-community-DvEh9Nte.js"
273
+ ],
274
+ "dynamicImports": [],
275
+ "inputs": []
276
+ },
277
+ "chunks/node-CH9-YjYa.js": {
278
278
  "isEntry": false,
279
279
  "imports": [
280
280
  "chunks/chunk-2rV9d50f.js",
281
- "chunks/rpc-local-community-7uUa4lxH.js",
282
- "chunks/util-Bm9ef_d5.js",
283
- "chunks/util-BMGkXifx.js",
281
+ "chunks/rpc-local-community-DqKbZLIy.js",
282
+ "chunks/util-DEmcezee.js",
283
+ "chunks/util-CpoO437x.js",
284
284
  "path",
285
285
  "assert",
286
286
  "fs",
@@ -291,8 +291,8 @@
291
291
  "rpc-websockets"
292
292
  ],
293
293
  "dynamicImports": [
294
- "chunks/helia-for-pkc-DuG274FA.js",
295
- "chunks/local-community-XUj49rN_.js"
294
+ "chunks/helia-for-pkc-DMzV8Gsa.js",
295
+ "chunks/local-community-DvEh9Nte.js"
296
296
  ],
297
297
  "inputs": [
298
298
  "node_modules/zod/v4/locales/en.js",
@@ -339,22 +339,22 @@
339
339
  "dist/node/index.js"
340
340
  ]
341
341
  },
342
- "chunks/page-sort-scoring-Cd97obb3.js": {
342
+ "chunks/page-sort-scoring-C1XYRQ1w.js": {
343
343
  "isEntry": false,
344
344
  "imports": [
345
- "chunks/util-Bm9ef_d5.js"
345
+ "chunks/util-DEmcezee.js"
346
346
  ],
347
347
  "dynamicImports": [],
348
348
  "inputs": [
349
349
  "dist/node/pages/page-sort-scoring.js"
350
350
  ]
351
351
  },
352
- "chunks/rpc-local-community-7uUa4lxH.js": {
352
+ "chunks/rpc-local-community-DqKbZLIy.js": {
353
353
  "isEntry": false,
354
354
  "imports": [
355
355
  "chunks/chunk-2rV9d50f.js",
356
- "chunks/util-Bm9ef_d5.js",
357
- "chunks/page-sort-scoring-Cd97obb3.js",
356
+ "chunks/util-DEmcezee.js",
357
+ "chunks/page-sort-scoring-C1XYRQ1w.js",
358
358
  "chunks/src-CYIMjhjK.js",
359
359
  "node:crypto",
360
360
  "node:url",
@@ -1302,10 +1302,10 @@
1302
1302
  "node_modules/it-parallel-batch/dist/src/index.js"
1303
1303
  ]
1304
1304
  },
1305
- "chunks/util-BMGkXifx.js": {
1305
+ "chunks/util-CpoO437x.js": {
1306
1306
  "isEntry": false,
1307
1307
  "imports": [
1308
- "chunks/util-Bm9ef_d5.js",
1308
+ "chunks/util-DEmcezee.js",
1309
1309
  "ipns/selector",
1310
1310
  "ipns/validator",
1311
1311
  "ipns",
@@ -1316,7 +1316,7 @@
1316
1316
  "dist/node/helia/util.js"
1317
1317
  ]
1318
1318
  },
1319
- "chunks/util-Bm9ef_d5.js": {
1319
+ "chunks/util-DEmcezee.js": {
1320
1320
  "isEntry": false,
1321
1321
  "imports": [
1322
1322
  "chunks/chunk-2rV9d50f.js",
@@ -1410,11 +1410,11 @@
1410
1410
  "dist/node/util.js"
1411
1411
  ]
1412
1412
  },
1413
- "chunks/validate-package-factories-DHupf8eD.js": {
1413
+ "chunks/validate-package-factories-C9A4AtCN.js": {
1414
1414
  "isEntry": false,
1415
1415
  "imports": [
1416
- "chunks/util-Bm9ef_d5.js",
1417
- "chunks/page-sort-scoring-Cd97obb3.js"
1416
+ "chunks/util-DEmcezee.js",
1417
+ "chunks/page-sort-scoring-C1XYRQ1w.js"
1418
1418
  ],
1419
1419
  "dynamicImports": [],
1420
1420
  "inputs": [
@@ -1,2 +1,2 @@
1
- import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-DHupf8eD.js";
1
+ import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-C9A4AtCN.js";
2
2
  export { validateChallengeFileFactory };
@@ -1,6 +1,6 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { Ar as PKCError, Mr as logger_default, S as hideClassPrivateProps, n as binaryKeyToPubsubTopic, w as ipnsNameToIpnsOverPubsubTopic } from "./util-Bm9ef_d5.js";
3
- import { a as directFetchIpnsRecordFromProviders, c as readFreshCachedIpnsRecordFromPubsubLocalStore, i as connectToPubsubPeers, l as selectBitswapSessionSeedPeers, n as REACHABILITY_DOCS_URL, o as fetchBlockWithStalledSessionFailover, r as cacheIpnsRecordInPubsubLocalStore, s as getHeliaDebugContext, u as summarizeProviderReachability } from "./util-BMGkXifx.js";
2
+ import { Ar as PKCError, Mr as logger_default, S as hideClassPrivateProps, n as binaryKeyToPubsubTopic, w as ipnsNameToIpnsOverPubsubTopic } from "./util-DEmcezee.js";
3
+ import { a as directFetchIpnsRecordFromProviders, c as readFreshCachedIpnsRecordFromPubsubLocalStore, i as connectToPubsubPeers, l as selectBitswapSessionSeedPeers, n as REACHABILITY_DOCS_URL, o as fetchBlockWithStalledSessionFailover, r as cacheIpnsRecordInPubsubLocalStore, s as getHeliaDebugContext, u as summarizeProviderReachability } from "./util-CpoO437x.js";
4
4
  import { t as map } from "./src-Cpx2Sts8.js";
5
5
  import { t as parallelBatch } from "./src-DKntVmyX.js";
6
6
  import { fileURLToPath } from "node:url";
@@ -1,7 +1,7 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { $t as CommentModerationPubsubMessagePublicationSchema, A as isLinkOfAnimatedImage, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Bn as CommentUpdateTableRowSchema, Dn as VoteTablesRowSchema, Dt as pTimeout, F as isLinkValid, Gr as ZodError, Jn as CommentEditPubsubMessagePublicationSchema, Jt as CommunityEditPublicationPubsubReservedFields, K as removeNullUndefinedValues, Kt as version_default, Lt as DecryptedChallengeRequestPublicationSchema, M as isLinkOfImage, Mr as logger_default, Mt as ChallengeRequestMessageSchema, N as isLinkOfMedia, Ot as ChallengeAnswerMessageSchema, P as isLinkOfVideo, Pt as ChallengeVerificationMessageSchema, Q as retryKuboIpfsAddAndProvide, Qn as CommentEditsTableRowSchema, R as pubsubTopicToDhtKey, Rn as CommentUpdateSchema, Rt as DecryptedChallengeRequestSchema, S as hideClassPrivateProps, Sr as t$2, St as untrackStartedCommunity, Tn as VotePubsubReservedFields, Tt as require_sha256, U as removeBlocksFromKuboNode, Vn as CommentsTableRowSchema, W as removeMfsFilesSafely, X as retryKuboBlockPutPinAndProvidePubsubTopic, Xn as CommentEditReservedFields, Yn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, _ as getEquivalentCommunityAddresses, _r as r$1, a as calculateUnixFsDagSizeCidV0, c as contentContainsMarkdownVideos, ct as writeKuboFilesWithTimeout, d as derivePublicationFromChallengeRequest, dn as CommunityIpfsSchema, dr as n$2, en as CommentModerationReservedFields, f as doesDomainAddressHaveCapitalLetter, fn as CommunitySignedPropertyNames, fr as t$5, ft as findUpdatingCommunity, g as genToArray, h as findMalformedUnicodeString, hr as e, i as calculateStringSizeSameAsIpfsAddCidV0, it as timestamp, j as isLinkOfAudio, jn as CommentPubsubMessageReservedFields, jr as messages, lr as n$3, lt as findCommunityInRegistry, mr as e$1, nn as CommentModerationsTableRowSchema, nr as AuthorReservedFields, nt as statMfsPathSafely, o as contentContainsMarkdownAudio, ot as withSortedKeys, pr as t$6, r as calculateIpfsCidV0, s as contentContainsMarkdownImages, st as withSortedKeysDeep, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, ur as t$7, ut as findStartedCommunity, v as getErrorCodeFromMessage, vr as t$3, vt as syncCommunityRegistryEntry, w as ipnsNameToIpnsOverPubsubTopic, wn as VotePubsubMessagePublicationSchema, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, xr as t$4, xt as trackUpdatingCommunity, y as getIpnsRecordInLocalKuboNode, yt as trackStartedCommunity } from "./util-Bm9ef_d5.js";
3
- import { $n as calculateExpectedSignatureSize, $t as SignerWithPublicKeyAddress, A as iterateOverPageCidsToFindAllCids, An as verifyCommunityEdit, Ar as require_lodash_merge, C as TIMEFRAMES_TO_SECONDS, Cr as t$9, Dn as verifyCommentPubsubMessage, En as verifyCommentModeration, Fn as getAuthorNameFromWire, Gn as encode, H as pLimit, Hn as getCommunityPublicKeyFromWire, J as coerceSchemaRowBoolean, Jn as getPKCAddressFromPublicKey, Ln as crosspostChainDepthUpTo, Mn as buildRuntimeAuthor, Nn as cleanWireAuthor, On as verifyCommentUpdate, Qn as backupCommunityDb, Rn as effectiveMaxCrosspostDepth, Sn as verifyChallengeRequest, Tn as verifyCommentIpfs, Vn as getCommunityNameFromWire, Wn as decode, X as collectSchemaRowCoercions, Xn as getPublicKeyFromPrivateKey, Y as coerceSchemaRowJson, Yn as getPKCAddressFromPublicKeySync, Z as createSchemaRowParser, Zn as BackupAbortError, _ as TrackedInstanceRegistry, _n as signCommunity, _r as t$11, a as generatePagesReportingFailedSorts, an as encryptEd25519AesGcmPublicKeyBuffer, ar as deriveDbReplies, b as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, bn as verifyChallengeAnswer, br as n$5, c as resolvePageSortsOrThrow, cr as getThumbnailPropsOfLink, d as getCommunityChallengeFromCommunityChallengeSettings, dn as signChallengeVerification, dt as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, er as calculateInlineRepliesBudget, f as loadChallengeFileFromCommunityChallengeSettings, fn as signComment, fr as moveCommunityDbToDeletedDirectory, g as createAuthorIdentityMatcher, gn as signCommentUpdateForChallengeVerification, gr as t$10, h as authorNameResolveFailureReason, hn as signCommentUpdate, i as derivePublicPageSorts, ir as deriveDbPosts, jn as verifyVote, kn as verifyCommunity, kr as STORAGE_KEYS, ln as signChallengeMessage, lr as importSignerIntoKuboNode, lt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, m as authorIdentityMatcherForRequest, nr as deleteOldCommunityInWindows, o as loadPageSortsForStartedCommunity, on as _validateSignatureOfPKCRecord, or as getDefaultCommunityDbConfig, p as pkcJsChallenges, pn as signCommentEdit, pr as resolveDbPostsCidRefs, qn as getIpfsKeyFromPrivateKey, r as computePageSortsFingerprint, rn as decryptEd25519AesGcmPublicKeyBuffer, rr as deriveCommentIpfsFromCommentTableRow, s as lookupPageSortFactories, sn as cleanUpBeforePublishing, t as RpcLocalCommunity, u as getChallengeVerification, v as LRUCache, vr as r$2, wn as verifyCommentEdit, wr as stringify, wt as parseJsonWithPKCErrorIfFails, x as KeyvBetterSqlite3, xr as n$4, xt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, yr as t$8 } from "./rpc-local-community-7uUa4lxH.js";
4
- import { a as scorePageCommentsWithFile, i as partitionPageCommentsForSort, n as filterRepliesForPageSort, o as stripRepliesFromPageComment, r as orderPageCommentsByScore, t as createDescendantsLookup } from "./page-sort-scoring-Cd97obb3.js";
2
+ import { $t as CommentModerationPubsubMessagePublicationSchema, A as isLinkOfAnimatedImage, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Bn as CommentUpdateTableRowSchema, Dn as VoteTablesRowSchema, Dt as pTimeout, F as isLinkValid, Gr as ZodError, Jn as CommentEditPubsubMessagePublicationSchema, Jt as CommunityEditPublicationPubsubReservedFields, K as removeNullUndefinedValues, Kt as version_default, Lt as DecryptedChallengeRequestPublicationSchema, M as isLinkOfImage, Mr as logger_default, Mt as ChallengeRequestMessageSchema, N as isLinkOfMedia, Ot as ChallengeAnswerMessageSchema, P as isLinkOfVideo, Pt as ChallengeVerificationMessageSchema, Q as retryKuboIpfsAddAndProvide, Qn as CommentEditsTableRowSchema, R as pubsubTopicToDhtKey, Rn as CommentUpdateSchema, Rt as DecryptedChallengeRequestSchema, S as hideClassPrivateProps, Sr as t$2, St as untrackStartedCommunity, Tn as VotePubsubReservedFields, Tt as require_sha256, U as removeBlocksFromKuboNode, Vn as CommentsTableRowSchema, W as removeMfsFilesSafely, X as retryKuboBlockPutPinAndProvidePubsubTopic, Xn as CommentEditReservedFields, Yn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, _ as getEquivalentCommunityAddresses, _r as r$1, a as calculateUnixFsDagSizeCidV0, c as contentContainsMarkdownVideos, ct as writeKuboFilesWithTimeout, d as derivePublicationFromChallengeRequest, dn as CommunityIpfsSchema, dr as n$2, en as CommentModerationReservedFields, f as doesDomainAddressHaveCapitalLetter, fn as CommunitySignedPropertyNames, fr as t$5, ft as findUpdatingCommunity, g as genToArray, h as findMalformedUnicodeString, hr as e, i as calculateStringSizeSameAsIpfsAddCidV0, it as timestamp, j as isLinkOfAudio, jn as CommentPubsubMessageReservedFields, jr as messages, lr as n$3, lt as findCommunityInRegistry, mr as e$1, nn as CommentModerationsTableRowSchema, nr as AuthorReservedFields, nt as statMfsPathSafely, o as contentContainsMarkdownAudio, ot as withSortedKeys, pr as t$6, r as calculateIpfsCidV0, s as contentContainsMarkdownImages, st as withSortedKeysDeep, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, ur as t$7, ut as findStartedCommunity, v as getErrorCodeFromMessage, vr as t$3, vt as syncCommunityRegistryEntry, w as ipnsNameToIpnsOverPubsubTopic, wn as VotePubsubMessagePublicationSchema, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, xr as t$4, xt as trackUpdatingCommunity, y as getIpnsRecordInLocalKuboNode, yt as trackStartedCommunity } from "./util-DEmcezee.js";
3
+ import { $n as backupCommunityDb, An as verifyCommunity, Ar as STORAGE_KEYS, Cn as verifyChallengeRequest, Dn as verifyCommentModeration, En as verifyCommentIpfs, Gn as decode, Hn as getCommunityNameFromWire, In as getAuthorNameFromWire, Jn as getIpfsKeyFromPrivateKey, Kn as encode, Mn as verifyVote, Nn as buildRuntimeAuthor, On as verifyCommentPubsubMessage, Pn as cleanWireAuthor, Q as createSchemaRowParser, Qn as BackupAbortError, Rn as crosspostChainDepthUpTo, S as KeyvBetterSqlite3, Sr as n$4, St as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Tn as verifyCommentEdit, Tr as stringify, Tt as parseJsonWithPKCErrorIfFails, U as pLimit, Un as getCommunityPublicKeyFromWire, X as coerceSchemaRowJson, Xn as getPKCAddressFromPublicKeySync, Y as coerceSchemaRowBoolean, Yn as getPKCAddressFromPublicKey, Z as collectSchemaRowCoercions, Zn as getPublicKeyFromPrivateKey, _ as createAuthorIdentityMatcher, _n as signCommentUpdateForChallengeVerification, _r as t$10, a as generatePagesReportingFailedSorts, ar as deriveDbPosts, br as t$8, c as resolvePageSortsOrThrow, cn as cleanUpBeforePublishing, d as getChallengeVerification, en as SignerWithPublicKeyAddress, er as calculateExpectedSignatureSize, f as getCommunityChallengeFromCommunityChallengeSettings, fn as signChallengeVerification, ft as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, g as authorNameResolveFailureReason, gn as signCommentUpdate, h as authorIdentityMatcherForRequest, i as derivePublicPageSorts, in as decryptEd25519AesGcmPublicKeyBuffer, ir as deriveCommentIpfsFromCommentTableRow, j as iterateOverPageCidsToFindAllCids, jn as verifyCommunityEdit, jr as require_lodash_merge, kn as verifyCommentUpdate, lr as getThumbnailPropsOfLink, m as pkcJsChallenges, mn as signCommentEdit, mr as resolveDbPostsCidRefs, o as loadPageSortsForStartedCommunity, on as encryptEd25519AesGcmPublicKeyBuffer, or as deriveDbReplies, p as loadChallengeFileFromCommunityChallengeSettings, pn as signComment, pr as moveCommunityDbToDeletedDirectory, r as computePageSortsFingerprint, rr as deleteOldCommunityInWindows, s as lookupPageSortFactories, sn as _validateSignatureOfPKCRecord, sr as getDefaultCommunityDbConfig, t as RpcLocalCommunity, tr as calculateInlineRepliesBudget, u as deriveCommunityChallengesOrThrow, un as signChallengeMessage, ur as importSignerIntoKuboNode, ut as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, v as TrackedInstanceRegistry, vn as signCommunity, vr as t$11, w as TIMEFRAMES_TO_SECONDS, wr as t$9, x as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, xn as verifyChallengeAnswer, xr as n$5, y as LRUCache, yr as r$2, zn as effectiveMaxCrosspostDepth } from "./rpc-local-community-DqKbZLIy.js";
4
+ import { a as scorePageCommentsWithFile, i as partitionPageCommentsForSort, n as filterRepliesForPageSort, o as stripRepliesFromPageComment, r as orderPageCommentsByScore, t as createDescendantsLookup } from "./page-sort-scoring-C1XYRQ1w.js";
5
5
  import { randomFillSync, randomUUID } from "node:crypto";
6
6
  import { fileURLToPath, pathToFileURL } from "node:url";
7
7
  import path from "node:path";
@@ -1660,6 +1660,7 @@ async function collectChallengeSettingsValidationFailures({ challengeSettings, p
1660
1660
  challengeSettings: communityChallengeSettings,
1661
1661
  challengeFile: await loadChallengeFileFromCommunityChallengeSettings({
1662
1662
  communityChallengeSettings,
1663
+ challengeIndex,
1663
1664
  pkc
1664
1665
  }),
1665
1666
  challengeIndex
@@ -2493,8 +2494,9 @@ async function createNewLocalCommunityDb(community) {
2493
2494
  pkc: community._pkc,
2494
2495
  communityAddress: community.address
2495
2496
  });
2496
- community.challenges = await Promise.all(community.settings.challenges.map(async (cs) => (await getCommunityChallengeFromCommunityChallengeSettings({
2497
+ community.challenges = await Promise.all(community.settings.challenges.map(async (cs, challengeIndex) => (await getCommunityChallengeFromCommunityChallengeSettings({
2497
2498
  communityChallengeSettings: cs,
2499
+ challengeIndex,
2498
2500
  pkc: community._pkc
2499
2501
  })).communityChallenge));
2500
2502
  community._pageSorts = await resolvePageSortsOrThrow({
@@ -5904,6 +5906,7 @@ async function purgeDisapprovedCommentsOlderThan(community) {
5904
5906
  }
5905
5907
  //#endregion
5906
5908
  //#region dist/node/runtime/node/community/local-community/challenges.js
5909
+ const describeMisconfiguredChallenge = (e) => e instanceof PKCError && e.code === "ERR_CHALLENGE_NOT_REGISTERED" ? `challenge "${e.details.challengeName}" is not registered on this node` : e.message;
5907
5910
  function cleanUpChallengeAnswerPromise(community, challengeRequestIdString) {
5908
5911
  community._challengeAnswerPromises.delete(challengeRequestIdString);
5909
5912
  community._challengeAnswerResolveReject.delete(challengeRequestIdString);
@@ -6335,7 +6338,7 @@ async function runChallengeExchangeIfNeeded(community, parsed, log) {
6335
6338
  community.emit("error", e);
6336
6339
  challengeVerification = {
6337
6340
  challengeSuccess: false,
6338
- reason: `One of the community challenges is misconfigured: ${e.message}`
6341
+ reason: `One of the community challenges is misconfigured: ${describeMisconfiguredChallenge(e)}`
6339
6342
  };
6340
6343
  }
6341
6344
  return challengeVerification;
@@ -7354,14 +7357,26 @@ async function syncChallengesWithRegistry(community) {
7354
7357
  if (!Array.isArray(challengeSettings)) return;
7355
7358
  let challenges;
7356
7359
  try {
7357
- challenges = await Promise.all(challengeSettings.map(async (cs) => (await getCommunityChallengeFromCommunityChallengeSettings({
7358
- communityChallengeSettings: cs,
7359
- pkc: community._pkc
7360
- })).communityChallenge));
7360
+ challenges = await deriveCommunityChallengesOrThrow({
7361
+ challengeSettings,
7362
+ pkc: community._pkc,
7363
+ communityAddress: community.address
7364
+ });
7361
7365
  } catch (e) {
7362
7366
  log.error("Could not recompute community.challenges from the registry, keeping the previous ones", community.address, e);
7367
+ const reported = stringify(e.details?.failures?.map((f) => [
7368
+ f.challengeIndex,
7369
+ f.challengeName,
7370
+ f.path,
7371
+ f.error.code
7372
+ ]) ?? String(e));
7373
+ if (reported !== community._reportedChallengeLoadFailures) {
7374
+ community._reportedChallengeLoadFailures = reported;
7375
+ community.emit("error", e);
7376
+ }
7363
7377
  return;
7364
7378
  }
7379
+ community._reportedChallengeLoadFailures = void 0;
7365
7380
  if (stringify(challenges) === stringify(community.challenges ?? null)) return;
7366
7381
  log("community.challenges changed in the registry, republishing", community.address);
7367
7382
  community.challenges = challenges;
@@ -7821,6 +7836,11 @@ async function start(community) {
7821
7836
  anchorPublicKey: community.anchor.publicKey,
7822
7837
  minterAddress: community.signer.address
7823
7838
  });
7839
+ await deriveCommunityChallengesOrThrow({
7840
+ challengeSettings: community.settings?.challenges ?? [],
7841
+ pkc: community._pkc,
7842
+ communityAddress: community.address
7843
+ });
7824
7844
  community._setState("started");
7825
7845
  await community._updateStartedValue();
7826
7846
  await community._dbHandler.lockCommunityStart();
@@ -7832,6 +7852,11 @@ async function start(community) {
7832
7852
  await updateInstanceStateWithDbState(community);
7833
7853
  await community._loadExportsFromKeyv();
7834
7854
  await setChallengesToDefaultIfNotDefined(community, log);
7855
+ community.challenges = await deriveCommunityChallengesOrThrow({
7856
+ challengeSettings: community.settings.challenges,
7857
+ pkc: community._pkc,
7858
+ communityAddress: community.address
7859
+ });
7835
7860
  await importCommunitySignerIntoIpfsIfNeeded(community);
7836
7861
  await providePubsubTopicRoutingCidsIfNeeded(community, true);
7837
7862
  await reprovideAnchorRecordIfNeeded(community).catch((e) => log.error("Failed to re-provide the anchor record on start", e));
@@ -7840,10 +7865,6 @@ async function start(community) {
7840
7865
  await community._repinCommentsIPFSIfNeeded();
7841
7866
  await repinCommentUpdateIfNeeded(community);
7842
7867
  await community._listenToIncomingRequests();
7843
- community.challenges = await Promise.all(community.settings.challenges.map(async (cs) => (await getCommunityChallengeFromCommunityChallengeSettings({
7844
- communityChallengeSettings: cs,
7845
- pkc: community._pkc
7846
- })).communityChallenge));
7847
7868
  await emitChallengeSettingsValidationErrors(community, log);
7848
7869
  community._pageSorts = void 0;
7849
7870
  community._pageSortFactories = void 0;
@@ -8172,8 +8193,9 @@ async function parseChallengesToEdit(community, newChallengeSettings) {
8172
8193
  communityAddress: community.address
8173
8194
  });
8174
8195
  return {
8175
- challenges: await Promise.all(newChallengeSettings.map(async (cs) => (await getCommunityChallengeFromCommunityChallengeSettings({
8196
+ challenges: await Promise.all(newChallengeSettings.map(async (cs, challengeIndex) => (await getCommunityChallengeFromCommunityChallengeSettings({
8176
8197
  communityChallengeSettings: cs,
8198
+ challengeIndex,
8177
8199
  pkc: community._pkc
8178
8200
  })).communityChallenge)),
8179
8201
  _usingDefaultChallenge: isDefaultChallengeStructure(newChallengeSettings)
@@ -8534,6 +8556,7 @@ var LocalCommunity = class extends RpcLocalCommunity {
8534
8556
  this._combinedHashOfPendingCommentsCids = (0, import_sha256.sha256)("");
8535
8557
  this._pageSorts = void 0;
8536
8558
  this._pageSortFactories = void 0;
8559
+ this._reportedChallengeLoadFailures = void 0;
8537
8560
  this._publishLoopPromise = void 0;
8538
8561
  this._updateLoopPromise = void 0;
8539
8562
  this._firstUpdateAfterStart = true;
@@ -1,2 +1,2 @@
1
- import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-XUj49rN_.js";
1
+ import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-DvEh9Nte.js";
2
2
  export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
@@ -1,7 +1,7 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { $ as shortifyAddress, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Ct as untrackUpdatingComment, Dt as pTimeout, E as isIpfsCid, Er as FailedToFetchCommentUpdateFromGatewaysError, Et as TimeoutError, Fn as CommentUpdateForChallengeVerificationSchema, Fr as setErrorMap, H as rejectWhenCommunityStopsOrAborts, J as replaceXWithY, Jr as stringifyPrimitive, Kr as joinValues, Kt as version_default, Mr as logger_default, Mt as ChallengeRequestMessageSchema, O as isIpns, Ot as ChallengeAnswerMessageSchema, Pt as ChallengeVerificationMessageSchema, Rn as CommentUpdateSchema, S as hideClassPrivateProps, T as isAbortError, Tr as FailedToFetchCommentIpfsFromGatewaysError, Tt as require_sha256, V as rejectWhenAbortSignalFires, Y as resolveWhenPredicateIsTrue, Z as retryKuboIpfsAdd, _r as r, at as waitForUpdateInCommunityInstanceWithErrorAndTimeout, b as getPostUpdateTimestampRange, bt as trackUpdatingComment, dn as CommunityIpfsSchema, dr as n$1, dt as findUpdatingComment, et as shortifyCid, f as doesDomainAddressHaveCapitalLetter, ft as findUpdatingCommunity, gt as refreshTrackedCommentAliases, hr as e$1, ht as listUpdatingCommunities, it as timestamp, jr as messages, l as createAbortError, lr as n$2, mr as e, mt as listUpdatingComments, on as CommunityAnchorSchema, pr as t$1, pt as listStartedCommunities, q as removeUndefinedValuesRecursively, qr as parsedType, rt as throwIfAbortSignalAborted, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, u as deepMergeRuntimeFields, ut as findStartedCommunity, w as ipnsNameToIpnsOverPubsubTopic, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, yn as PubsubTopicSchema } from "./util-Bm9ef_d5.js";
3
- import { An as verifyCommunityEdit, At as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, B as InflightResourceTypes, Bn as getCommunityAddressFromRecord, Bt as RpcExportCommunityModLogsResultSchema, Cn as verifyChallengeVerification, Cr as t$4, Ct as parseDecryptedChallengeWithPKCErrorIfItFails, D as findCommentInPageInstance, Dn as verifyCommentPubsubMessage, Dr as NAME_RESOLVED_TRUE_TTL_MS, Dt as parseRpcCommentUpdateEventWithPKCErrorIfItFails, E as extractCommunityRuntimeFieldsFromParsedPages, En as verifyCommentModeration, Er as NAME_RESOLVED_FALSE_TTL_MS, Et as parseRpcCommentEventWithPKCErrorIfItFails, Ft as RpcCommentRepliesPageParamSchema, G as decodeRpcChallengePubsubMsg, Gt as RpcPublishAnchorRecordParamSchema, Hn as getCommunityPublicKeyFromWire, Ht as RpcExportCommunityResultSchema, I as stripNameResolvedFromCrosspost, In as normalizeCreatePublicationAuthor, It as RpcCommunityIdentifierParamSchema, Jt as RpcResolveAuthorNameResultSchema, K as decodeRpcChallengeRequestPubsubMsg, Kn as getBufferedPKCAddressFromPublicKey, Kt as RpcPublishChallengeAnswersParamSchema, L as PKCClientsManager, Lt as RpcCommunityPageParamSchema, M as applyNameResolvedCacheToCrosspost, Mn as buildRuntimeAuthor, Mr as require_undici, Mt as RpcAuthorNameParamSchema, N as cloneCrosspostForRuntime, Nn as cleanWireAuthor, Nt as RpcCancelExportParamSchema, O as findCommentInPageInstanceRecursively, On as verifyCommentUpdate, Or as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Ot as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, P as collectCrosspostAuthorsToResolve, Pn as getAuthorNameFromRuntime, Pt as RpcCidParamSchema, Q as parseCidStringSchemaWithPKCErrorIfItFails, Qt as require_lib$1, R as GenericStateClient, Rt as RpcEditCommunityParamSchema, S as RepliesPages, Sr as t$2, St as parseDecryptedChallengeVerification, Tn as verifyCommentIpfs, Tr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Tt as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, U as PKCTypedEmitter, Un as normalizeCommunityInputFromCommunity, Ut as RpcFetchCidParamSchema, Vn as getCommunityNameFromWire, Vt as RpcExportCommunityParamSchema, W as decodeRpcChallengeAnswerPubsubMsg, Wn as decode, Wt as RpcFetchCidResultSchema, Xt as RpcSuccessResultSchema, Yn as getPKCAddressFromPublicKeySync, Yt as RpcSubscriptionIdResultSchema, Zt as RpcUnsubscribeParamSchema, _ as TrackedInstanceRegistry, at as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, br as n$3, bt as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, cn as signChallengeAnswer, dr as monitorCommunitiesDirectory, en as createSigner, fn as signComment, ft as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, gr as t$5, hr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, ht as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, in as encryptEd25519AesGcm, it as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, j as parseRawPages, jn as verifyVote, jr as nativeFunctions$2, jt as RpcAnchorPublishPreparationResultSchema, k as findCommentInParsedPages, l as pkcJsPageSorts, mn as signCommentModeration, mr as setNativeFunctions$1, mt as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as decryptEd25519AesGcm, nt as parseCommentIpfsSchemaWithPKCErrorIfItFails, ot as parseCommentUpdateSchemaWithPKCErrorIfItFails, p as pkcJsChallenges, pn as signCommentEdit, pt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, q as decodeRpcChallengeVerificationPubsubMsg, qt as RpcPublishedAnchorRecordResultSchema, sn as cleanUpBeforePublishing, sr as getDefaultDataPath, st as parseCommunityAddressWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as createAnchorIpnsRecord$1, tr as createKuboRpcClient, tt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, un as signChallengeRequest, ur as listCommunitiesSync, ut as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, v as LRUCache, vn as signCommunityEdit, vt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, wn as verifyCommentEdit, wt as parseJsonWithPKCErrorIfFails, x as KeyvBetterSqlite3, xn as verifyChallengeMessage, xt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, y as RemoteCommunity, yn as signVote, yr as t$3, yt as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, z as InflightFetchManager, zn as buildRuntimeCommunityFields, zt as RpcExportCommunityModLogsParamSchema } from "./rpc-local-community-7uUa4lxH.js";
4
- import { s as getHeliaDebugContext } from "./util-BMGkXifx.js";
2
+ import { $ as shortifyAddress, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Ct as untrackUpdatingComment, Dt as pTimeout, E as isIpfsCid, Er as FailedToFetchCommentUpdateFromGatewaysError, Et as TimeoutError, Fn as CommentUpdateForChallengeVerificationSchema, Fr as setErrorMap, H as rejectWhenCommunityStopsOrAborts, J as replaceXWithY, Jr as stringifyPrimitive, Kr as joinValues, Kt as version_default, Mr as logger_default, Mt as ChallengeRequestMessageSchema, O as isIpns, Ot as ChallengeAnswerMessageSchema, Pt as ChallengeVerificationMessageSchema, Rn as CommentUpdateSchema, S as hideClassPrivateProps, T as isAbortError, Tr as FailedToFetchCommentIpfsFromGatewaysError, Tt as require_sha256, V as rejectWhenAbortSignalFires, Y as resolveWhenPredicateIsTrue, Z as retryKuboIpfsAdd, _r as r, at as waitForUpdateInCommunityInstanceWithErrorAndTimeout, b as getPostUpdateTimestampRange, bt as trackUpdatingComment, dn as CommunityIpfsSchema, dr as n$1, dt as findUpdatingComment, et as shortifyCid, f as doesDomainAddressHaveCapitalLetter, ft as findUpdatingCommunity, gt as refreshTrackedCommentAliases, hr as e$1, ht as listUpdatingCommunities, it as timestamp, jr as messages, l as createAbortError, lr as n$2, mr as e, mt as listUpdatingComments, on as CommunityAnchorSchema, pr as t$1, pt as listStartedCommunities, q as removeUndefinedValuesRecursively, qr as parsedType, rt as throwIfAbortSignalAborted, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, u as deepMergeRuntimeFields, ut as findStartedCommunity, w as ipnsNameToIpnsOverPubsubTopic, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, yn as PubsubTopicSchema } from "./util-DEmcezee.js";
3
+ import { $ as parseCidStringSchemaWithPKCErrorIfItFails, $t as require_lib$1, A as findCommentInParsedPages, B as InflightFetchManager, Bn as buildRuntimeCommunityFields, Bt as RpcExportCommunityModLogsParamSchema, C as RepliesPages, Cr as t$2, Ct as parseDecryptedChallengeVerification, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as verifyCommentModeration, Dr as NAME_RESOLVED_FALSE_TTL_MS, Dt as parseRpcCommentEventWithPKCErrorIfItFails, En as verifyCommentIpfs, Er as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Et as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, F as collectCrosspostAuthorsToResolve, Fn as getAuthorNameFromRuntime, Ft as RpcCidParamSchema, G as decodeRpcChallengeAnswerPubsubMsg, Gn as decode, Gt as RpcFetchCidResultSchema, Hn as getCommunityNameFromWire, Ht as RpcExportCommunityParamSchema, It as RpcCommentRepliesPageParamSchema, J as decodeRpcChallengeVerificationPubsubMsg, Jt as RpcPublishedAnchorRecordResultSchema, K as decodeRpcChallengePubsubMsg, Kt as RpcPublishAnchorRecordParamSchema, L as stripNameResolvedFromCrosspost, Ln as normalizeCreatePublicationAuthor, Lt as RpcCommunityIdentifierParamSchema, M as parseRawPages, Mn as verifyVote, Mr as nativeFunctions$2, Mt as RpcAnchorPublishPreparationResultSchema, N as applyNameResolvedCacheToCrosspost, Nn as buildRuntimeAuthor, Nr as require_undici, Nt as RpcAuthorNameParamSchema, O as findCommentInPageInstance, On as verifyCommentPubsubMessage, Or as NAME_RESOLVED_TRUE_TTL_MS, Ot as parseRpcCommentUpdateEventWithPKCErrorIfItFails, P as cloneCrosspostForRuntime, Pn as cleanWireAuthor, Pt as RpcCancelExportParamSchema, Qt as RpcUnsubscribeParamSchema, R as PKCClientsManager, Rt as RpcCommunityPageParamSchema, S as KeyvBetterSqlite3, Sn as verifyChallengeMessage, St as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Tn as verifyCommentEdit, Tt as parseJsonWithPKCErrorIfFails, Un as getCommunityPublicKeyFromWire, Ut as RpcExportCommunityResultSchema, V as InflightResourceTypes, Vn as getCommunityAddressFromRecord, Vt as RpcExportCommunityModLogsResultSchema, W as PKCTypedEmitter, Wn as normalizeCommunityInputFromCommunity, Wt as RpcFetchCidParamSchema, Xn as getPKCAddressFromPublicKeySync, Xt as RpcSubscriptionIdResultSchema, Yt as RpcResolveAuthorNameResultSchema, Zt as RpcSuccessResultSchema, _r as t$5, an as encryptEd25519AesGcm, at as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, b as RemoteCommunity, bn as signVote, br as t$3, bt as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, cn as cleanUpBeforePublishing, cr as getDefaultDataPath, ct as parseCommunityAddressWithPKCErrorIfItFails, dn as signChallengeRequest, dr as listCommunitiesSync, dt as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, fr as monitorCommunitiesDirectory, gr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, gt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, hn as signCommentModeration, hr as setNativeFunctions$1, ht as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, jn as verifyCommunityEdit, jt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as verifyCommentUpdate, kr as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, kt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, l as pkcJsPageSorts, ln as signChallengeAnswer, m as pkcJsChallenges, mn as signCommentEdit, mt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as createAnchorIpnsRecord$1, nr as createKuboRpcClient, nt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, ot as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, pn as signComment, pt as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, q as decodeRpcChallengeRequestPubsubMsg, qn as getBufferedPKCAddressFromPublicKey, qt as RpcPublishChallengeAnswersParamSchema, rn as decryptEd25519AesGcm, rt as parseCommentIpfsSchemaWithPKCErrorIfItFails, st as parseCommentUpdateSchemaWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as createSigner, v as TrackedInstanceRegistry, wn as verifyChallengeVerification, wr as t$4, wt as parseDecryptedChallengeWithPKCErrorIfItFails, xr as n$3, xt as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, y as LRUCache, yn as signCommunityEdit, yt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, z as GenericStateClient, zt as RpcEditCommunityParamSchema } from "./rpc-local-community-DqKbZLIy.js";
4
+ import { s as getHeliaDebugContext } from "./util-CpoO437x.js";
5
5
  import path from "path";
6
6
  import assert from "assert";
7
7
  import fs from "fs";
@@ -8370,7 +8370,7 @@ var PKC$1 = class extends PKCTypedEmitter {
8370
8370
  this.clients.libp2pJsClients = {};
8371
8371
  if (!this.libp2pJsClientsOptions) return;
8372
8372
  if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
8373
- const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-DuG274FA.js");
8373
+ const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-DMzV8Gsa.js");
8374
8374
  for (const clientOptions of this.libp2pJsClientsOptions) {
8375
8375
  const heliaNode = await createLibp2pJsClientOrUseExistingOne({
8376
8376
  ...clientOptions,
@@ -8649,7 +8649,7 @@ var PKC$1 = class extends PKCTypedEmitter {
8649
8649
  const log = logger_default("pkc-js:pkc:createLocalCommunity");
8650
8650
  log.trace("Received community options to create a local community instance:", options);
8651
8651
  if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
8652
- const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-BsALoql_.js");
8652
+ const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-YoJAmva8.js");
8653
8653
  const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
8654
8654
  const community = new LocalCommunity(this);
8655
8655
  if (isLocalCommunity) {
@@ -1,4 +1,4 @@
1
- import { _ as getEquivalentCommunityAddresses, vn as PageSortFileSchema } from "./util-Bm9ef_d5.js";
1
+ import { _ as getEquivalentCommunityAddresses, vn as PageSortFileSchema } from "./util-DEmcezee.js";
2
2
  //#region dist/node/pages/page-sort-scoring.js
3
3
  function validatePageSortFile(rawFile) {
4
4
  const validated = PageSortFileSchema.parse(rawFile);