@libp2p/daemon 6.0.16 → 6.0.17-2151144c3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +4 -3
- package/dist/typedoc-urls.json +0 -6
package/dist/index.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#! /usr/bin/env node
|
|
2
2
|
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.Libp2PDaemon = factory()}(typeof self !== 'undefined' ? self : this, function () {
|
|
3
|
-
"use strict";var Libp2PDaemon=(()=>{var ho=Object.create;var Ye=Object.defineProperty;var po=Object.getOwnPropertyDescriptor;var mo=Object.getOwnPropertyNames;var go=Object.getPrototypeOf,Fo=Object.prototype.hasOwnProperty;var J=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var _n=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Ct=(n,t)=>{for(var e in t)Ye(n,e,{get:t[e],enumerable:!0})},Qr=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of mo(t))!Fo.call(n,i)&&i!==e&&Ye(n,i,{get:()=>t[i],enumerable:!(r=po(t,i))||r.enumerable});return n};var me=(n,t,e)=>(e=n!=null?ho(go(n)):{},Qr(t||!n||!n.__esModule?Ye(e,"default",{value:n,enumerable:!0}):e,n)),Co=n=>Qr(Ye({},"__esModule",{value:!0}),n);var Yi=_n((Uf,Gi)=>{Gi.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Es=_n((FD,Cs)=>{"use strict";Cs.exports=function(t){if(t===void 0&&(t=2),t>=Error.stackTraceLimit)throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+t+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");var e=Error.prepareStackTrace;Error.prepareStackTrace=function(i,s){return s};var r=new Error().stack;if(Error.prepareStackTrace=e,r!==null&&typeof r=="object")return r[t]?r[t].getFileName():void 0}});var co=_n((_h,ao)=>{var Yr=class{constructor(t,e){this.ctx=e||{},this.yargs=t,this.parse=this.parse.bind(this),this.command=this.yargs.command,this.commandDir=this.yargs.commandDir}parse(t){let e=this.yargs,r;return new Promise((i,s)=>{let o=Object.assign({},this.ctx,{resolve:i,reject:s});e.parse(t,o,function(a,f,g){return r=f,a?f.reject(a):f.resolve(g)})}).then(i=>Promise.resolve(i)).then(i=>i&&i.argv?i:{data:i,argv:r}).catch(i=>Promise.resolve(i).then(s=>s&&s.argv?Promise.reject(s):Promise.reject({error:s,argv:r})))}};ao.exports=Yr});var vc={};Ct(vc,{createLibp2pServer:()=>Do,default:()=>Jr});function Zr(n,t){if(n===t)return!0;if(n.byteLength!==t.byteLength)return!1;for(let e=0;e<n.byteLength;e++)if(n[e]!==t[e])return!1;return!0}var Xr=J("node:buffer");function ge(n){return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}function Sn(n=0){return ge(Xr.Buffer.allocUnsafe(n))}var Eo=Math.pow(2,7),bo=Math.pow(2,14),xo=Math.pow(2,21),Pn=Math.pow(2,28),In=Math.pow(2,35),vn=Math.pow(2,42),jn=Math.pow(2,49),tt=128,pt=127;function Fe(n){if(n<Eo)return 1;if(n<bo)return 2;if(n<xo)return 3;if(n<Pn)return 4;if(n<In)return 5;if(n<vn)return 6;if(n<jn)return 7;if(Number.MAX_SAFE_INTEGER!=null&&n>Number.MAX_SAFE_INTEGER)throw new RangeError("Could not encode varint");return 8}function Mn(n,t,e=0){switch(Fe(n)){case 8:t[e++]=n&255|tt,n/=128;case 7:t[e++]=n&255|tt,n/=128;case 6:t[e++]=n&255|tt,n/=128;case 5:t[e++]=n&255|tt,n/=128;case 4:t[e++]=n&255|tt,n>>>=7;case 3:t[e++]=n&255|tt,n>>>=7;case 2:t[e++]=n&255|tt,n>>>=7;case 1:{t[e++]=n&255,n>>>=7;break}default:throw new Error("unreachable")}return t}function wo(n,t){let e=n[t],r=0;if(r+=e&pt,e<tt||(e=n[t+1],r+=(e&pt)<<7,e<tt)||(e=n[t+2],r+=(e&pt)<<14,e<tt)||(e=n[t+3],r+=(e&pt)<<21,e<tt)||(e=n[t+4],r+=(e&pt)*Pn,e<tt)||(e=n[t+5],r+=(e&pt)*In,e<tt)||(e=n[t+6],r+=(e&pt)*vn,e<tt)||(e=n[t+7],r+=(e&pt)*jn,e<tt))return r;throw new RangeError("Could not decode varint")}function yo(n,t){let e=n.get(t),r=0;if(r+=e&pt,e<tt||(e=n.get(t+1),r+=(e&pt)<<7,e<tt)||(e=n.get(t+2),r+=(e&pt)<<14,e<tt)||(e=n.get(t+3),r+=(e&pt)<<21,e<tt)||(e=n.get(t+4),r+=(e&pt)*Pn,e<tt)||(e=n.get(t+5),r+=(e&pt)*In,e<tt)||(e=n.get(t+6),r+=(e&pt)*vn,e<tt)||(e=n.get(t+7),r+=(e&pt)*jn,e<tt))return r;throw new RangeError("Could not decode varint")}function Tn(n,t=0){return n instanceof Uint8Array?wo(n,t):yo(n,t)}var kr=J("node:buffer");function ve(n,t){return ge(kr.Buffer.concat(n,t))}var bi=J("node:buffer");var zn={};Ct(zn,{base10:()=>vo});var Wc=new Uint8Array(0);function ti(n,t){if(n===t)return!0;if(n.byteLength!==t.byteLength)return!1;for(let e=0;e<n.byteLength;e++)if(n[e]!==t[e])return!1;return!0}function At(n){if(n instanceof Uint8Array&&n.constructor.name==="Uint8Array")return n;if(n instanceof ArrayBuffer)return new Uint8Array(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error("Unknown type, must be binary type")}function ei(n){return new TextEncoder().encode(n)}function ni(n){return new TextDecoder().decode(n)}function Oo(n,t){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<n.length;i++){var s=n.charAt(i),o=s.charCodeAt(0);if(e[o]!==255)throw new TypeError(s+" is ambiguous");e[o]=i}var a=n.length,f=n.charAt(0),g=Math.log(a)/Math.log(256),p=Math.log(256)/Math.log(a);function l(C){if(C instanceof Uint8Array||(ArrayBuffer.isView(C)?C=new Uint8Array(C.buffer,C.byteOffset,C.byteLength):Array.isArray(C)&&(C=Uint8Array.from(C))),!(C instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(C.length===0)return"";for(var b=0,d=0,v=0,z=C.length;v!==z&&C[v]===0;)v++,b++;for(var L=(z-v)*p+1>>>0,U=new Uint8Array(L);v!==z;){for(var R=C[v],W=0,H=L-1;(R!==0||W<d)&&H!==-1;H--,W++)R+=256*U[H]>>>0,U[H]=R%a>>>0,R=R/a>>>0;if(R!==0)throw new Error("Non-zero carry");d=W,v++}for(var K=L-d;K!==L&&U[K]===0;)K++;for(var dt=f.repeat(b);K<L;++K)dt+=n.charAt(U[K]);return dt}function m(C){if(typeof C!="string")throw new TypeError("Expected String");if(C.length===0)return new Uint8Array;var b=0;if(C[b]!==" "){for(var d=0,v=0;C[b]===f;)d++,b++;for(var z=(C.length-b)*g+1>>>0,L=new Uint8Array(z);C[b];){var U=e[C.charCodeAt(b)];if(U===255)return;for(var R=0,W=z-1;(U!==0||R<v)&&W!==-1;W--,R++)U+=a*L[W]>>>0,L[W]=U%256>>>0,U=U/256>>>0;if(U!==0)throw new Error("Non-zero carry");v=R,b++}if(C[b]!==" "){for(var H=z-v;H!==z&&L[H]===0;)H++;for(var K=new Uint8Array(d+(z-H)),dt=d;H!==z;)K[dt++]=L[H++];return K}}}function E(C){var b=m(C);if(b)return b;throw new Error(`Non-${t} character`)}return{encode:l,decodeUnsafe:m,decode:E}}var Bo=Oo,_o=Bo,ii=_o;var $n=class{name;prefix;baseEncode;constructor(t,e,r){this.name=t,this.prefix=e,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}},Nn=class{name;prefix;baseDecode;prefixCodePoint;constructor(t,e,r){this.name=t,this.prefix=e;let i=e.codePointAt(0);if(i===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=i,this.baseDecode=r}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return si(this,t)}},Ln=class{decoders;constructor(t){this.decoders=t}or(t){return si(this,t)}decode(t){let e=t[0],r=this.decoders[e];if(r!=null)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};function si(n,t){return new Ln({...n.decoders??{[n.prefix]:n},...t.decoders??{[t.prefix]:t}})}var Un=class{name;prefix;baseEncode;baseDecode;encoder;decoder;constructor(t,e,r,i){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=i,this.encoder=new $n(t,e,r),this.decoder=new Nn(t,e,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}};function Ce({name:n,prefix:t,encode:e,decode:r}){return new Un(n,t,e,r)}function Vt({name:n,prefix:t,alphabet:e}){let{encode:r,decode:i}=ii(e,n);return Ce({prefix:t,name:n,encode:r,decode:s=>At(i(s))})}function So(n,t,e,r){let i=n.length;for(;n[i-1]==="=";)--i;let s=new Uint8Array(i*e/8|0),o=0,a=0,f=0;for(let g=0;g<i;++g){let p=t[n[g]];if(p===void 0)throw new SyntaxError(`Non-${r} character`);a=a<<e|p,o+=e,o>=8&&(o-=8,s[f++]=255&a>>o)}if(o>=e||(255&a<<8-o)!==0)throw new SyntaxError("Unexpected end of data");return s}function Po(n,t,e){let r=t[t.length-1]==="=",i=(1<<e)-1,s="",o=0,a=0;for(let f=0;f<n.length;++f)for(a=a<<8|n[f],o+=8;o>e;)o-=e,s+=t[i&a>>o];if(o!==0&&(s+=t[i&a<<e-o]),r)for(;(s.length*e&7)!==0;)s+="=";return s}function Io(n){let t={};for(let e=0;e<n.length;++e)t[n[e]]=e;return t}function rt({name:n,prefix:t,bitsPerChar:e,alphabet:r}){let i=Io(r);return Ce({prefix:t,name:n,encode(s){return Po(s,r,e)},decode(s){return So(s,i,e,n)}})}var vo=Vt({prefix:"9",name:"base10",alphabet:"0123456789"});var Rn={};Ct(Rn,{base16:()=>jo,base16upper:()=>Mo});var jo=rt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Mo=rt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Wn={};Ct(Wn,{base2:()=>To});var To=rt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Vn={};Ct(Vn,{base256emoji:()=>zo});var oi=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),$o=oi.reduce((n,t,e)=>(n[e]=t,n),[]),No=oi.reduce((n,t,e)=>{let r=t.codePointAt(0);if(r==null)throw new Error(`Invalid character: ${t}`);return n[r]=e,n},[]);function Lo(n){return n.reduce((t,e)=>(t+=$o[e],t),"")}function Uo(n){let t=[];for(let e of n){let r=e.codePointAt(0);if(r==null)throw new Error(`Invalid character: ${e}`);let i=No[r];if(i==null)throw new Error(`Non-base256emoji character: ${e}`);t.push(i)}return new Uint8Array(t)}var zo=Ce({prefix:"\u{1F680}",name:"base256emoji",encode:Lo,decode:Uo});var Hn={};Ct(Hn,{base32:()=>Ht,base32hex:()=>Ho,base32hexpad:()=>Go,base32hexpadupper:()=>Yo,base32hexupper:()=>qo,base32pad:()=>Wo,base32padupper:()=>Vo,base32upper:()=>Ro,base32z:()=>Ko});var Ht=rt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Ro=rt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Wo=rt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Vo=rt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Ho=rt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),qo=rt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Go=rt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Yo=rt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Ko=rt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var qn={};Ct(qn,{base36:()=>je,base36upper:()=>Jo});var je=Vt({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Jo=Vt({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Gn={};Ct(Gn,{base58btc:()=>Mt,base58flickr:()=>Qo});var Mt=Vt({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Qo=Vt({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Kn={};Ct(Kn,{base64:()=>Zo,base64pad:()=>Xo,base64url:()=>Yn,base64urlpad:()=>ko});var Zo=rt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Xo=rt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Yn=rt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ko=rt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Jn={};Ct(Jn,{base8:()=>tu});var tu=rt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Qn={};Ct(Qn,{identity:()=>eu});var eu=Ce({prefix:"\0",name:"identity",encode:n=>ni(n),decode:n=>ei(n)});var il=new TextEncoder,sl=new TextDecoder;var Xn={};Ct(Xn,{identity:()=>yu});var iu=ci,ui=128,su=127,ou=~su,uu=Math.pow(2,31);function ci(n,t,e){t=t||[],e=e||0;for(var r=e;n>=uu;)t[e++]=n&255|ui,n/=128;for(;n&ou;)t[e++]=n&255|ui,n>>>=7;return t[e]=n|0,ci.bytes=e-r+1,t}var au=Zn,cu=128,ai=127;function Zn(n,r){var e=0,r=r||0,i=0,s=r,o,a=n.length;do{if(s>=a)throw Zn.bytes=0,new RangeError("Could not decode varint");o=n[s++],e+=i<28?(o&ai)<<i:(o&ai)*Math.pow(2,i),i+=7}while(o>=cu);return Zn.bytes=s-r,e}var lu=Math.pow(2,7),fu=Math.pow(2,14),Du=Math.pow(2,21),hu=Math.pow(2,28),du=Math.pow(2,35),pu=Math.pow(2,42),mu=Math.pow(2,49),gu=Math.pow(2,56),Fu=Math.pow(2,63),Cu=function(n){return n<lu?1:n<fu?2:n<Du?3:n<hu?4:n<du?5:n<pu?6:n<mu?7:n<gu?8:n<Fu?9:10},Eu={encode:iu,decode:au,encodingLength:Cu},bu=Eu,Me=bu;function Te(n,t=0){return[Me.decode(n,t),Me.decode.bytes]}function Ee(n,t,e=0){return Me.encode(n,t,e),t}function be(n){return Me.encodingLength(n)}function we(n,t){let e=t.byteLength,r=be(n),i=r+be(e),s=new Uint8Array(i+e);return Ee(n,s,0),Ee(e,s,r),s.set(t,i),new xe(n,e,t,s)}function li(n){let t=At(n),[e,r]=Te(t),[i,s]=Te(t.subarray(r)),o=t.subarray(r+s);if(o.byteLength!==i)throw new Error("Incorrect length");return new xe(e,i,o,t)}function fi(n,t){if(n===t)return!0;{let e=t;return n.code===e.code&&n.size===e.size&&e.bytes instanceof Uint8Array&&ti(n.bytes,e.bytes)}}var xe=class{code;size;digest;bytes;constructor(t,e,r,i){this.code=t,this.size=e,this.digest=r,this.bytes=i}};var Di=0,xu="identity",hi=At;function wu(n,t){if(t?.truncate!=null&&t.truncate!==n.byteLength){if(t.truncate<0||t.truncate>n.byteLength)throw new Error(`Invalid truncate option, must be less than or equal to ${n.byteLength}`);n=n.subarray(0,t.truncate)}return we(Di,hi(n))}var yu={code:Di,name:xu,encode:hi,digest:wu};var nr={};Ct(nr,{sha256:()=>Ou,sha512:()=>Bu});var er=me(J("crypto"),1);var Au=20;function tr({name:n,code:t,encode:e,minDigestLength:r,maxDigestLength:i}){return new kn(n,t,e,r,i)}var kn=class{name;code;encode;minDigestLength;maxDigestLength;constructor(t,e,r,i,s){this.name=t,this.code=e,this.encode=r,this.minDigestLength=i??Au,this.maxDigestLength=s}digest(t,e){if(e?.truncate!=null){if(e.truncate<this.minDigestLength)throw new Error(`Invalid truncate option, must be greater than or equal to ${this.minDigestLength}`);if(this.maxDigestLength!=null&&e.truncate>this.maxDigestLength)throw new Error(`Invalid truncate option, must be less than or equal to ${this.maxDigestLength}`)}if(t instanceof Uint8Array){let r=this.encode(t);return r instanceof Uint8Array?di(r,this.code,e?.truncate):r.then(i=>di(i,this.code,e?.truncate))}else throw Error("Unknown type, must be binary type")}};function di(n,t,e){if(e!=null&&e!==n.byteLength){if(e>n.byteLength)throw new Error(`Invalid truncate option, must be less than or equal to ${n.byteLength}`);n=n.subarray(0,e)}return we(t,n)}var Ou=tr({name:"sha2-256",code:18,encode:n=>At(er.default.createHash("sha256").update(n).digest())}),Bu=tr({name:"sha2-512",code:19,encode:n=>At(er.default.createHash("sha512").update(n).digest())});function mi(n,t){let{bytes:e,version:r}=n;switch(r){case 0:return Su(e,rr(n),t??Mt.encoder);default:return Pu(e,rr(n),t??Ht.encoder)}}var gi=new WeakMap;function rr(n){let t=gi.get(n);if(t==null){let e=new Map;return gi.set(n,e),e}return t}var ye=class n{code;version;multihash;bytes;"/";constructor(t,e,r,i){this.code=e,this.version=t,this.multihash=r,this.bytes=i,this["/"]=i}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{let{code:t,multihash:e}=this;if(t!==Ne)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==Iu)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return n.createV0(e)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{let{code:t,digest:e}=this.multihash,r=we(t,e);return n.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(t){return n.equals(this,t)}static equals(t,e){let r=e;return r!=null&&t.code===r.code&&t.version===r.version&&fi(t.multihash,r.multihash)}toString(t){return mi(this,t)}toJSON(){return{"/":mi(this)}}link(){return this}[Symbol.toStringTag]="CID";[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(t){if(t==null)return null;let e=t;if(e instanceof n)return e;if(e["/"]!=null&&e["/"]===e.bytes||e.asCID===e){let{version:r,code:i,multihash:s,bytes:o}=e;return new n(r,i,s,o??Fi(r,i,s.bytes))}else if(e[vu]===!0){let{version:r,multihash:i,code:s}=e,o=li(i);return n.create(r,s,o)}else return null}static create(t,e,r){if(typeof e!="number")throw new Error("String codecs are no longer supported");if(!(r.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(t){case 0:{if(e!==Ne)throw new Error(`Version 0 CID must use dag-pb (code: ${Ne}) block encoding`);return new n(t,e,r,r.bytes)}case 1:{let i=Fi(t,e,r.bytes);return new n(t,e,r,i)}default:throw new Error("Invalid version")}}static createV0(t){return n.create(0,Ne,t)}static createV1(t,e){return n.create(1,t,e)}static decode(t){let[e,r]=n.decodeFirst(t);if(r.length!==0)throw new Error("Incorrect length");return e}static decodeFirst(t){let e=n.inspectBytes(t),r=e.size-e.multihashSize,i=At(t.subarray(r,r+e.multihashSize));if(i.byteLength!==e.multihashSize)throw new Error("Incorrect length");let s=i.subarray(e.multihashSize-e.digestSize),o=new xe(e.multihashCode,e.digestSize,s,i);return[e.version===0?n.createV0(o):n.createV1(e.codec,o),t.subarray(e.size)]}static inspectBytes(t){let e=0,r=()=>{let[l,m]=Te(t.subarray(e));return e+=m,l},i=r(),s=Ne;if(i===18?(i=0,e=0):s=r(),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);let o=e,a=r(),f=r(),g=e+f,p=g-o;return{version:i,codec:s,multihashCode:a,digestSize:f,multihashSize:p,size:g}}static parse(t,e){let[r,i]=_u(t,e),s=n.decode(i);if(s.version===0&&t[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return rr(s).set(r,t),s}};function _u(n,t){switch(n[0]){case"Q":{let e=t??Mt;return[Mt.prefix,e.decode(`${Mt.prefix}${n}`)]}case Mt.prefix:{let e=t??Mt;return[Mt.prefix,e.decode(n)]}case Ht.prefix:{let e=t??Ht;return[Ht.prefix,e.decode(n)]}case je.prefix:{let e=t??je;return[je.prefix,e.decode(n)]}default:{if(t==null)throw Error("To parse non base32, base36 or base58btc encoded CID multibase decoder must be provided");return[n[0],t.decode(n)]}}}function Su(n,t,e){let{prefix:r}=e;if(r!==Mt.prefix)throw Error(`Cannot string encode V0 in ${e.name} encoding`);let i=t.get(r);if(i==null){let s=e.encode(n).slice(1);return t.set(r,s),s}else return i}function Pu(n,t,e){let{prefix:r}=e,i=t.get(r);if(i==null){let s=e.encode(n);return t.set(r,s),s}else return i}var Ne=112,Iu=18;function Fi(n,t,e){let r=be(n),i=r+be(t),s=new Uint8Array(i+e.byteLength);return Ee(n,s,0),Ee(t,s,r),s.set(e,i),s}var vu=Symbol.for("@ipld/js-cid/CID");var Le={...Qn,...Wn,...Jn,...zn,...Rn,...Hn,...qn,...Gn,...Kn,...Vn},_l={...nr,...Xn};function Ei(n,t,e,r){return{name:n,prefix:t,encoder:{name:n,prefix:t,encode:e},decoder:{decode:r}}}var Ci=Ei("utf8","u",n=>"u"+new TextDecoder("utf8").decode(n),n=>new TextEncoder().encode(n.substring(1))),ir=Ei("ascii","a",n=>{let t="a";for(let e=0;e<n.length;e++)t+=String.fromCharCode(n[e]);return t},n=>{n=n.substring(1);let t=Sn(n.length);for(let e=0;e<n.length;e++)t[e]=n.charCodeAt(e);return t}),ju={utf8:Ci,"utf-8":Ci,hex:Le.base16,latin1:ir,ascii:ir,binary:ir,...Le},Je=ju;function Ue(n,t="utf8"){let e=Je[t];if(e==null)throw new Error(`Unsupported encoding "${t}"`);return t==="utf8"||t==="utf-8"?ge(bi.Buffer.from(n,"utf-8")):e.decoder.decode(`${e.prefix}${n}`)}var xi=J("node:buffer");function kt(n,t="utf8"){let e=Je[t];if(e==null)throw new Error(`Unsupported encoding "${t}"`);return t==="utf8"||t==="utf-8"?xi.Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString("utf8"):e.encoder.encode(n).substring(1)}var ht=class extends Error{static name="InvalidMultiaddrError";name="InvalidMultiaddrError"},Ut=class extends Error{static name="ValidationError";name="ValidationError"},Qe=class extends Error{static name="InvalidParametersError";name="InvalidParametersError"},Ze=class extends Error{static name="UnknownProtocolError";name="UnknownProtocolError"};var zt=J("node:net");function or(n){return t=>kt(t,n)}function ur(n){return t=>Ue(t,n)}function Ae(n){return new DataView(n.buffer).getUint16(n.byteOffset).toString()}function te(n){let t=new ArrayBuffer(2);return new DataView(t).setUint16(0,typeof n=="string"?parseInt(n):n),new Uint8Array(t)}function wi(n){let t=n.split(":");if(t.length!==2)throw new Error(`failed to parse onion addr: ["'${t.join('", "')}'"]' does not contain a port number`);if(t[0].length!==16)throw new Error(`failed to parse onion addr: ${t[0]} not a Tor onion address.`);let e=Ue(t[0],"base32"),r=parseInt(t[1],10);if(r<1||r>65536)throw new Error("Port number is not in range(1, 65536)");let i=te(r);return ve([e,i],e.length+i.length)}function yi(n){let t=n.split(":");if(t.length!==2)throw new Error(`failed to parse onion addr: ["'${t.join('", "')}'"]' does not contain a port number`);if(t[0].length!==56)throw new Error(`failed to parse onion addr: ${t[0]} not a Tor onion3 address.`);let e=Ht.decode(`b${t[0]}`),r=parseInt(t[1],10);if(r<1||r>65536)throw new Error("Port number is not in range(1, 65536)");let i=te(r);return ve([e,i],e.length+i.length)}function ar(n){let t=n.subarray(0,n.length-2),e=n.subarray(n.length-2),r=kt(t,"base32"),i=Ae(e);return`${r}:${i}`}var cr=function(n){n=n.toString().trim();let t=new Uint8Array(4);return n.split(/\./g).forEach((e,r)=>{let i=parseInt(e,10);if(isNaN(i)||i<0||i>255)throw new ht("Invalid byte value in IP address");t[r]=i}),t},Ai=function(n){let t=0;n=n.toString().trim();let e=n.split(":",8),r;for(r=0;r<e.length;r++){let s=(0,zt.isIPv4)(e[r]),o;s&&(o=cr(e[r]),e[r]=kt(o.subarray(0,2),"base16")),o!=null&&++r<8&&e.splice(r,0,kt(o.subarray(2,4),"base16"))}if(e[0]==="")for(;e.length<8;)e.unshift("0");else if(e[e.length-1]==="")for(;e.length<8;)e.push("0");else if(e.length<8){for(r=0;r<e.length&&e[r]!=="";r++);let s=[r,1];for(r=9-e.length;r>0;r--)s.push("0");e.splice.apply(e,s)}let i=new Uint8Array(t+16);for(r=0;r<e.length;r++){e[r]===""&&(e[r]="0");let s=parseInt(e[r],16);if(isNaN(s)||s<0||s>65535)throw new ht("Invalid byte value in IP address");i[t++]=s>>8&255,i[t++]=s&255}return i},Oi=function(n){if(n.byteLength!==4)throw new ht("IPv4 address was incorrect length");let t=[];for(let e=0;e<n.byteLength;e++)t.push(n[e]);return t.join(".")},Bi=function(n){if(n.byteLength!==16)throw new ht("IPv6 address was incorrect length");let t=[];for(let r=0;r<n.byteLength;r+=2){let i=n[r],s=n[r+1],o=`${i.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`;t.push(o)}let e=t.join(":");try{let r=new URL(`http://[${e}]`);return r.hostname.substring(1,r.hostname.length-1)}catch{throw new ht(`Invalid IPv6 address "${e}"`)}};function _i(n){try{let t=new URL(`http://[${n}]`);return t.hostname.substring(1,t.hostname.length-1)}catch{throw new ht(`Invalid IPv6 address "${n}"`)}}var sr=Object.values(Le).map(n=>n.decoder),Mu=(function(){let n=sr[0].or(sr[1]);return sr.slice(2).forEach(t=>n=n.or(t)),n})();function Si(n){return Mu.decode(n)}function Pi(n){return t=>n.encoder.encode(t)}function Tu(n){if(parseInt(n).toString()!==n)throw new Ut("Value must be an integer")}function $u(n){if(n<0)throw new Ut("Value must be a positive integer, or zero")}function Nu(n){return t=>{if(t>n)throw new Ut(`Value must be smaller than or equal to ${n}`)}}function Lu(...n){return t=>{for(let e of n)e(t)}}var ze=Lu(Tu,$u,Nu(65535));var ft=-1,lr=class{protocolsByCode=new Map;protocolsByName=new Map;getProtocol(t){let e;if(typeof t=="string"?e=this.protocolsByName.get(t):e=this.protocolsByCode.get(t),e==null)throw new Ze(`Protocol ${t} was unknown`);return e}addProtocol(t){this.protocolsByCode.set(t.code,t),this.protocolsByName.set(t.name,t),t.aliases?.forEach(e=>{this.protocolsByName.set(e,t)})}removeProtocol(t){let e=this.protocolsByCode.get(t);e!=null&&(this.protocolsByCode.delete(e.code),this.protocolsByName.delete(e.name),e.aliases?.forEach(r=>{this.protocolsByName.delete(r)}))}},Rt=new lr,Aa=[{code:4,name:"ip4",size:32,valueToBytes:cr,bytesToValue:Oi,validate:n=>{if(!(0,zt.isIPv4)(n))throw new Ut(`Invalid IPv4 address "${n}"`)}},{code:6,name:"tcp",size:16,valueToBytes:te,bytesToValue:Ae,validate:ze},{code:273,name:"udp",size:16,valueToBytes:te,bytesToValue:Ae,validate:ze},{code:33,name:"dccp",size:16,valueToBytes:te,bytesToValue:Ae,validate:ze},{code:41,name:"ip6",size:128,valueToBytes:Ai,bytesToValue:Bi,stringToValue:_i,validate:n=>{if(!(0,zt.isIPv6)(n))throw new Ut(`Invalid IPv6 address "${n}"`)}},{code:42,name:"ip6zone",size:ft},{code:43,name:"ipcidr",size:8,bytesToValue:or("base10"),valueToBytes:ur("base10")},{code:53,name:"dns",size:ft},{code:54,name:"dns4",size:ft},{code:55,name:"dns6",size:ft},{code:56,name:"dnsaddr",size:ft},{code:132,name:"sctp",size:16,valueToBytes:te,bytesToValue:Ae,validate:ze},{code:301,name:"udt"},{code:302,name:"utp"},{code:400,name:"unix",size:ft,stringToValue:n=>decodeURIComponent(n),valueToString:n=>encodeURIComponent(n)},{code:421,name:"p2p",aliases:["ipfs"],size:ft,bytesToValue:or("base58btc"),valueToBytes:n=>n.startsWith("Q")||n.startsWith("1")?ur("base58btc")(n):ye.parse(n).multihash.bytes},{code:444,name:"onion",size:96,bytesToValue:ar,valueToBytes:wi},{code:445,name:"onion3",size:296,bytesToValue:ar,valueToBytes:yi},{code:446,name:"garlic64",size:ft},{code:447,name:"garlic32",size:ft},{code:448,name:"tls"},{code:449,name:"sni",size:ft},{code:454,name:"noise"},{code:460,name:"quic"},{code:461,name:"quic-v1"},{code:465,name:"webtransport"},{code:466,name:"certhash",size:ft,bytesToValue:Pi(Yn),valueToBytes:Si},{code:480,name:"http"},{code:481,name:"http-path",size:ft,stringToValue:n=>`/${decodeURIComponent(n)}`,valueToString:n=>encodeURIComponent(n.substring(1))},{code:443,name:"https"},{code:477,name:"ws"},{code:478,name:"wss"},{code:479,name:"p2p-websocket-star"},{code:277,name:"p2p-stardust"},{code:275,name:"p2p-webrtc-star"},{code:276,name:"p2p-webrtc-direct"},{code:280,name:"webrtc-direct"},{code:281,name:"webrtc"},{code:290,name:"p2p-circuit"},{code:777,name:"memory",size:ft}];Aa.forEach(n=>{Rt.addProtocol(n)});function Ii(n){let t=[],e=0;for(;e<n.length;){let r=Tn(n,e),i=Rt.getProtocol(r),s=Fe(r),o=Oa(i,n,e+s),a=0;o>0&&i.size===ft&&(a=Fe(o));let f=s+a+o,g={code:r,name:i.name,bytes:n.subarray(e,e+f)};if(o>0){let p=e+s+a,l=n.subarray(p,p+o);g.value=i.bytesToValue?.(l)??kt(l)}t.push(g),e+=f}return t}function vi(n){let t=0,e=[];for(let r of n){if(r.bytes==null){let i=Rt.getProtocol(r.code),s=Fe(r.code),o,a=0,f=0;r.value!=null&&(o=i.valueToBytes?.(r.value)??Ue(r.value),a=o.byteLength,i.size===ft&&(f=Fe(a)));let g=new Uint8Array(s+f+a),p=0;Mn(r.code,g,p),p+=s,o!=null&&(i.size===ft&&(Mn(a,g,p),p+=f),g.set(o,p)),r.bytes=g}e.push(r.bytes),t+=r.bytes.byteLength}return ve(e,t)}function ji(n){if(n.charAt(0)!=="/")throw new ht('String multiaddr must start with "/"');let t=[],e="protocol",r="",i="";for(let s=1;s<n.length;s++){let o=n.charAt(s);o!=="/"&&(e==="protocol"?i+=n.charAt(s):r+=n.charAt(s));let a=s===n.length-1;if(o==="/"||a){let f=Rt.getProtocol(i);if(e==="protocol"){if(f.size==null||f.size===0){t.push({code:f.code,name:f.name}),r="",i="",e="protocol";continue}else if(a)throw new ht(`Component ${i} was missing value`);e="value"}else if(e==="value"){let g={code:f.code,name:f.name};if(f.size!=null&&f.size!==0){if(r==="")throw new ht(`Component ${i} was missing value`);g.value=f.stringToValue?.(r)??r}t.push(g),r="",i="",e="protocol"}}}if(i!==""&&r!=="")throw new ht("Incomplete multiaddr");return t}function Mi(n){return`/${n.flatMap(t=>{if(t.value==null)return t.name;let e=Rt.getProtocol(t.code);if(e==null)throw new ht(`Unknown protocol code ${t.code}`);return[t.name,e.valueToString?.(t.value)??t.value]}).join("/")}`}function Oa(n,t,e){return n.size==null||n.size===0?0:n.size>0?n.size/8:Tn(t,e)}var Ba=Symbol.for("nodejs.util.inspect.custom"),fr=Symbol.for("@multiformats/multiaddr");function _a(n){if(n==null&&(n="/"),Ti(n))return n.getComponents();if(n instanceof Uint8Array)return Ii(n);if(typeof n=="string")return n=n.replace(/\/(\/)+/,"/").replace(/(\/)+$/,""),n===""&&(n="/"),ji(n);if(Array.isArray(n))return n;throw new ht("Must be a string, Uint8Array, Component[], or another Multiaddr")}var Xe=class n{[fr]=!0;#t;#e;#n;constructor(t="/",e={}){this.#t=_a(t),e.validate!==!1&&Sa(this)}get bytes(){return this.#n==null&&(this.#n=vi(this.#t)),this.#n}toString(){return this.#e==null&&(this.#e=Mi(this.#t)),this.#e}toJSON(){return this.toString()}getComponents(){return[...this.#t.map(t=>({...t}))]}encapsulate(t){let e=new n(t);return new n([...this.#t,...e.getComponents()],{validate:!1})}decapsulate(t){let e=t.toString(),r=this.toString(),i=r.lastIndexOf(e);if(i<0)throw new Qe(`Address ${this.toString()} does not contain subaddress: ${e}`);return new n(r.slice(0,i),{validate:!1})}decapsulateCode(t){let e;for(let r=this.#t.length-1;r>-1;r--)if(this.#t[r].code===t){e=r;break}return new n(this.#t.slice(0,e),{validate:!1})}equals(t){return Zr(this.bytes,t.bytes)}[Ba](){return`Multiaddr(${this.toString()})`}};function Sa(n){n.getComponents().forEach(t=>{let e=Rt.getProtocol(t.code);t.value!=null&&e.validate?.(t.value)})}function Ti(n){return!!n?.[fr]}function $i(n){return new Xe(n)}var Ni=J("module"),hr=me(J("path"),1),Dr=me(J("process"),1),Li=J("url");function Pa(n){let t=hr.default.extname(n);return t?n.slice(0,-t.length):n}function dr(n){if(!n)return!1;if("main"in n)return!!n.main;if(!Dr.default.argv[1])return!1;let e=(0,Ni.createRequire)(n.url).resolve(Dr.default.argv[1]),r=(0,Li.fileURLToPath)(n.url);return hr.default.extname(e)?r===e:Pa(r)===e}var Dn=J("assert");var Ia={right:$a,center:Na},va=0,ke=1,ja=2,tn=3,pr=class{constructor(t){var e;this.width=t.width,this.wrap=(e=t.wrap)!==null&&e!==void 0?e:!0,this.rows=[]}span(...t){let e=this.div(...t);e.span=!0}resetOutput(){this.rows=[]}div(...t){if(t.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]=="string")return this.applyLayoutDSL(t[0]);let e=t.map(r=>typeof r=="string"?this.colFromString(r):r);return this.rows.push(e),e}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]=="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){let e=t.split(`
|
|
3
|
+
"use strict";var Libp2PDaemon=(()=>{var ho=Object.create;var Ye=Object.defineProperty;var po=Object.getOwnPropertyDescriptor;var mo=Object.getOwnPropertyNames;var go=Object.getPrototypeOf,Fo=Object.prototype.hasOwnProperty;var J=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var _n=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Ct=(n,t)=>{for(var e in t)Ye(n,e,{get:t[e],enumerable:!0})},Qr=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of mo(t))!Fo.call(n,i)&&i!==e&&Ye(n,i,{get:()=>t[i],enumerable:!(r=po(t,i))||r.enumerable});return n};var me=(n,t,e)=>(e=n!=null?ho(go(n)):{},Qr(t||!n||!n.__esModule?Ye(e,"default",{value:n,enumerable:!0}):e,n)),Co=n=>Qr(Ye({},"__esModule",{value:!0}),n);var Yi=_n((Uf,Gi)=>{Gi.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Es=_n((FD,Cs)=>{"use strict";Cs.exports=function(t){if(t===void 0&&(t=2),t>=Error.stackTraceLimit)throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+t+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");var e=Error.prepareStackTrace;Error.prepareStackTrace=function(i,s){return s};var r=new Error().stack;if(Error.prepareStackTrace=e,r!==null&&typeof r=="object")return r[t]?r[t].getFileName():void 0}});var co=_n((_h,ao)=>{var Yr=class{constructor(t,e){this.ctx=e||{},this.yargs=t,this.parse=this.parse.bind(this),this.command=this.yargs.command,this.commandDir=this.yargs.commandDir}parse(t){let e=this.yargs,r;return new Promise((i,s)=>{let o=Object.assign({},this.ctx,{resolve:i,reject:s});e.parse(t,o,function(a,f,g){return r=f,a?f.reject(a):f.resolve(g)})}).then(i=>Promise.resolve(i)).then(i=>i&&i.argv?i:{data:i,argv:r}).catch(i=>Promise.resolve(i).then(s=>s&&s.argv?Promise.reject(s):Promise.reject({error:s,argv:r})))}};ao.exports=Yr});var vc={};Ct(vc,{createLibp2pServer:()=>Do,default:()=>Jr});function Zr(n,t){if(n===t)return!0;if(n.byteLength!==t.byteLength)return!1;for(let e=0;e<n.byteLength;e++)if(n[e]!==t[e])return!1;return!0}var Xr=J("node:buffer");function ge(n){return new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}function Sn(n=0){return ge(Xr.Buffer.allocUnsafe(n))}var Eo=Math.pow(2,7),bo=Math.pow(2,14),xo=Math.pow(2,21),Pn=Math.pow(2,28),In=Math.pow(2,35),vn=Math.pow(2,42),jn=Math.pow(2,49),tt=128,pt=127;function Fe(n){if(n<Eo)return 1;if(n<bo)return 2;if(n<xo)return 3;if(n<Pn)return 4;if(n<In)return 5;if(n<vn)return 6;if(n<jn)return 7;if(Number.MAX_SAFE_INTEGER!=null&&n>Number.MAX_SAFE_INTEGER)throw new RangeError("Could not encode varint");return 8}function Mn(n,t,e=0){switch(Fe(n)){case 8:t[e++]=n&255|tt,n/=128;case 7:t[e++]=n&255|tt,n/=128;case 6:t[e++]=n&255|tt,n/=128;case 5:t[e++]=n&255|tt,n/=128;case 4:t[e++]=n&255|tt,n>>>=7;case 3:t[e++]=n&255|tt,n>>>=7;case 2:t[e++]=n&255|tt,n>>>=7;case 1:{t[e++]=n&255,n>>>=7;break}default:throw new Error("unreachable")}return t}function wo(n,t){let e=n[t],r=0;if(r+=e&pt,e<tt||(e=n[t+1],r+=(e&pt)<<7,e<tt)||(e=n[t+2],r+=(e&pt)<<14,e<tt)||(e=n[t+3],r+=(e&pt)<<21,e<tt)||(e=n[t+4],r+=(e&pt)*Pn,e<tt)||(e=n[t+5],r+=(e&pt)*In,e<tt)||(e=n[t+6],r+=(e&pt)*vn,e<tt)||(e=n[t+7],r+=(e&pt)*jn,e<tt))return r;throw new RangeError("Could not decode varint")}function yo(n,t){let e=n.get(t),r=0;if(r+=e&pt,e<tt||(e=n.get(t+1),r+=(e&pt)<<7,e<tt)||(e=n.get(t+2),r+=(e&pt)<<14,e<tt)||(e=n.get(t+3),r+=(e&pt)<<21,e<tt)||(e=n.get(t+4),r+=(e&pt)*Pn,e<tt)||(e=n.get(t+5),r+=(e&pt)*In,e<tt)||(e=n.get(t+6),r+=(e&pt)*vn,e<tt)||(e=n.get(t+7),r+=(e&pt)*jn,e<tt))return r;throw new RangeError("Could not decode varint")}function Tn(n,t=0){return n instanceof Uint8Array?wo(n,t):yo(n,t)}var kr=J("node:buffer");function ve(n,t){return ge(kr.Buffer.concat(n,t))}var bi=J("node:buffer");var zn={};Ct(zn,{base10:()=>vo});var Wc=new Uint8Array(0);function ti(n,t){if(n===t)return!0;if(n.byteLength!==t.byteLength)return!1;for(let e=0;e<n.byteLength;e++)if(n[e]!==t[e])return!1;return!0}function At(n){if(n instanceof Uint8Array&&n.constructor.name==="Uint8Array")return n;if(n instanceof ArrayBuffer)return new Uint8Array(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error("Unknown type, must be binary type")}function ei(n){return new TextEncoder().encode(n)}function ni(n){return new TextDecoder().decode(n)}function Oo(n,t){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<n.length;i++){var s=n.charAt(i),o=s.charCodeAt(0);if(e[o]!==255)throw new TypeError(s+" is ambiguous");e[o]=i}var a=n.length,f=n.charAt(0),g=Math.log(a)/Math.log(256),p=Math.log(256)/Math.log(a);function l(C){if(C instanceof Uint8Array||(ArrayBuffer.isView(C)?C=new Uint8Array(C.buffer,C.byteOffset,C.byteLength):Array.isArray(C)&&(C=Uint8Array.from(C))),!(C instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(C.length===0)return"";for(var b=0,d=0,v=0,z=C.length;v!==z&&C[v]===0;)v++,b++;for(var L=(z-v)*p+1>>>0,U=new Uint8Array(L);v!==z;){for(var R=C[v],W=0,H=L-1;(R!==0||W<d)&&H!==-1;H--,W++)R+=256*U[H]>>>0,U[H]=R%a>>>0,R=R/a>>>0;if(R!==0)throw new Error("Non-zero carry");d=W,v++}for(var K=L-d;K!==L&&U[K]===0;)K++;for(var dt=f.repeat(b);K<L;++K)dt+=n.charAt(U[K]);return dt}function m(C){if(typeof C!="string")throw new TypeError("Expected String");if(C.length===0)return new Uint8Array;var b=0;if(C[b]!==" "){for(var d=0,v=0;C[b]===f;)d++,b++;for(var z=(C.length-b)*g+1>>>0,L=new Uint8Array(z);C[b];){var U=e[C.charCodeAt(b)];if(U===255)return;for(var R=0,W=z-1;(U!==0||R<v)&&W!==-1;W--,R++)U+=a*L[W]>>>0,L[W]=U%256>>>0,U=U/256>>>0;if(U!==0)throw new Error("Non-zero carry");v=R,b++}if(C[b]!==" "){for(var H=z-v;H!==z&&L[H]===0;)H++;for(var K=new Uint8Array(d+(z-H)),dt=d;H!==z;)K[dt++]=L[H++];return K}}}function E(C){var b=m(C);if(b)return b;throw new Error(`Non-${t} character`)}return{encode:l,decodeUnsafe:m,decode:E}}var Bo=Oo,_o=Bo,ii=_o;var $n=class{name;prefix;baseEncode;constructor(t,e,r){this.name=t,this.prefix=e,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}},Nn=class{name;prefix;baseDecode;prefixCodePoint;constructor(t,e,r){this.name=t,this.prefix=e;let i=e.codePointAt(0);if(i===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=i,this.baseDecode=r}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return si(this,t)}},Ln=class{decoders;constructor(t){this.decoders=t}or(t){return si(this,t)}decode(t){let e=t[0],r=this.decoders[e];if(r!=null)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};function si(n,t){return new Ln({...n.decoders??{[n.prefix]:n},...t.decoders??{[t.prefix]:t}})}var Un=class{name;prefix;baseEncode;baseDecode;encoder;decoder;constructor(t,e,r,i){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=i,this.encoder=new $n(t,e,r),this.decoder=new Nn(t,e,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}};function Ce({name:n,prefix:t,encode:e,decode:r}){return new Un(n,t,e,r)}function Vt({name:n,prefix:t,alphabet:e}){let{encode:r,decode:i}=ii(e,n);return Ce({prefix:t,name:n,encode:r,decode:s=>At(i(s))})}function So(n,t,e,r){let i=n.length;for(;n[i-1]==="=";)--i;let s=new Uint8Array(i*e/8|0),o=0,a=0,f=0;for(let g=0;g<i;++g){let p=t[n[g]];if(p===void 0)throw new SyntaxError(`Non-${r} character`);a=a<<e|p,o+=e,o>=8&&(o-=8,s[f++]=255&a>>o)}if(o>=e||(255&a<<8-o)!==0)throw new SyntaxError("Unexpected end of data");return s}function Po(n,t,e){let r=t[t.length-1]==="=",i=(1<<e)-1,s="",o=0,a=0;for(let f=0;f<n.length;++f)for(a=a<<8|n[f],o+=8;o>e;)o-=e,s+=t[i&a>>o];if(o!==0&&(s+=t[i&a<<e-o]),r)for(;(s.length*e&7)!==0;)s+="=";return s}function Io(n){let t={};for(let e=0;e<n.length;++e)t[n[e]]=e;return t}function rt({name:n,prefix:t,bitsPerChar:e,alphabet:r}){let i=Io(r);return Ce({prefix:t,name:n,encode(s){return Po(s,r,e)},decode(s){return So(s,i,e,n)}})}var vo=Vt({prefix:"9",name:"base10",alphabet:"0123456789"});var Rn={};Ct(Rn,{base16:()=>jo,base16upper:()=>Mo});var jo=rt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Mo=rt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Wn={};Ct(Wn,{base2:()=>To});var To=rt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Vn={};Ct(Vn,{base256emoji:()=>zo});var oi=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),$o=oi.reduce((n,t,e)=>(n[e]=t,n),[]),No=oi.reduce((n,t,e)=>{let r=t.codePointAt(0);if(r==null)throw new Error(`Invalid character: ${t}`);return n[r]=e,n},[]);function Lo(n){return n.reduce((t,e)=>(t+=$o[e],t),"")}function Uo(n){let t=[];for(let e of n){let r=e.codePointAt(0);if(r==null)throw new Error(`Invalid character: ${e}`);let i=No[r];if(i==null)throw new Error(`Non-base256emoji character: ${e}`);t.push(i)}return new Uint8Array(t)}var zo=Ce({prefix:"\u{1F680}",name:"base256emoji",encode:Lo,decode:Uo});var Hn={};Ct(Hn,{base32:()=>Ht,base32hex:()=>Ho,base32hexpad:()=>Go,base32hexpadupper:()=>Yo,base32hexupper:()=>qo,base32pad:()=>Wo,base32padupper:()=>Vo,base32upper:()=>Ro,base32z:()=>Ko});var Ht=rt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Ro=rt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Wo=rt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Vo=rt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Ho=rt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),qo=rt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Go=rt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Yo=rt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Ko=rt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var qn={};Ct(qn,{base36:()=>je,base36upper:()=>Jo});var je=Vt({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Jo=Vt({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Gn={};Ct(Gn,{base58btc:()=>Mt,base58flickr:()=>Qo});var Mt=Vt({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Qo=Vt({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Kn={};Ct(Kn,{base64:()=>Zo,base64pad:()=>Xo,base64url:()=>Yn,base64urlpad:()=>ko});var Zo=rt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Xo=rt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Yn=rt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ko=rt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Jn={};Ct(Jn,{base8:()=>tu});var tu=rt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var Qn={};Ct(Qn,{identity:()=>eu});var eu=Ce({prefix:"\0",name:"identity",encode:n=>ni(n),decode:n=>ei(n)});var il=new TextEncoder,sl=new TextDecoder;var Xn={};Ct(Xn,{identity:()=>yu});var iu=ci,ui=128,su=127,ou=~su,uu=Math.pow(2,31);function ci(n,t,e){t=t||[],e=e||0;for(var r=e;n>=uu;)t[e++]=n&255|ui,n/=128;for(;n&ou;)t[e++]=n&255|ui,n>>>=7;return t[e]=n|0,ci.bytes=e-r+1,t}var au=Zn,cu=128,ai=127;function Zn(n,r){var e=0,r=r||0,i=0,s=r,o,a=n.length;do{if(s>=a)throw Zn.bytes=0,new RangeError("Could not decode varint");o=n[s++],e+=i<28?(o&ai)<<i:(o&ai)*Math.pow(2,i),i+=7}while(o>=cu);return Zn.bytes=s-r,e}var lu=Math.pow(2,7),fu=Math.pow(2,14),Du=Math.pow(2,21),hu=Math.pow(2,28),du=Math.pow(2,35),pu=Math.pow(2,42),mu=Math.pow(2,49),gu=Math.pow(2,56),Fu=Math.pow(2,63),Cu=function(n){return n<lu?1:n<fu?2:n<Du?3:n<hu?4:n<du?5:n<pu?6:n<mu?7:n<gu?8:n<Fu?9:10},Eu={encode:iu,decode:au,encodingLength:Cu},bu=Eu,Me=bu;function Te(n,t=0){return[Me.decode(n,t),Me.decode.bytes]}function Ee(n,t,e=0){return Me.encode(n,t,e),t}function be(n){return Me.encodingLength(n)}function we(n,t){let e=t.byteLength,r=be(n),i=r+be(e),s=new Uint8Array(i+e);return Ee(n,s,0),Ee(e,s,r),s.set(t,i),new xe(n,e,t,s)}function li(n){let t=At(n),[e,r]=Te(t),[i,s]=Te(t.subarray(r)),o=t.subarray(r+s);if(o.byteLength!==i)throw new Error("Incorrect length");return new xe(e,i,o,t)}function fi(n,t){if(n===t)return!0;{let e=t;return n.code===e.code&&n.size===e.size&&e.bytes instanceof Uint8Array&&ti(n.bytes,e.bytes)}}var xe=class{code;size;digest;bytes;constructor(t,e,r,i){this.code=t,this.size=e,this.digest=r,this.bytes=i}};var Di=0,xu="identity",hi=At;function wu(n,t){if(t?.truncate!=null&&t.truncate!==n.byteLength){if(t.truncate<0||t.truncate>n.byteLength)throw new Error(`Invalid truncate option, must be less than or equal to ${n.byteLength}`);n=n.subarray(0,t.truncate)}return we(Di,hi(n))}var yu={code:Di,name:xu,encode:hi,digest:wu};var nr={};Ct(nr,{sha256:()=>Ou,sha512:()=>Bu});var er=me(J("crypto"),1);var Au=20;function tr({name:n,code:t,encode:e,minDigestLength:r,maxDigestLength:i}){return new kn(n,t,e,r,i)}var kn=class{name;code;encode;minDigestLength;maxDigestLength;constructor(t,e,r,i,s){this.name=t,this.code=e,this.encode=r,this.minDigestLength=i??Au,this.maxDigestLength=s}digest(t,e){if(e?.truncate!=null){if(e.truncate<this.minDigestLength)throw new Error(`Invalid truncate option, must be greater than or equal to ${this.minDigestLength}`);if(this.maxDigestLength!=null&&e.truncate>this.maxDigestLength)throw new Error(`Invalid truncate option, must be less than or equal to ${this.maxDigestLength}`)}if(t instanceof Uint8Array){let r=this.encode(t);return r instanceof Uint8Array?di(r,this.code,e?.truncate):r.then(i=>di(i,this.code,e?.truncate))}else throw Error("Unknown type, must be binary type")}};function di(n,t,e){if(e!=null&&e!==n.byteLength){if(e>n.byteLength)throw new Error(`Invalid truncate option, must be less than or equal to ${n.byteLength}`);n=n.subarray(0,e)}return we(t,n)}var Ou=tr({name:"sha2-256",code:18,encode:n=>At(er.default.createHash("sha256").update(n).digest())}),Bu=tr({name:"sha2-512",code:19,encode:n=>At(er.default.createHash("sha512").update(n).digest())});function mi(n,t){let{bytes:e,version:r}=n;return r===0?Su(e,rr(n),t??Mt.encoder):Pu(e,rr(n),t??Ht.encoder)}var gi=new WeakMap;function rr(n){let t=gi.get(n);if(t==null){let e=new Map;return gi.set(n,e),e}return t}var ye=class n{code;version;multihash;bytes;"/";constructor(t,e,r,i){this.code=e,this.version=t,this.multihash=r,this.bytes=i,this["/"]=i}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{let{code:t,multihash:e}=this;if(t!==Ne)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==Iu)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return n.createV0(e)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{let{code:t,digest:e}=this.multihash,r=we(t,e);return n.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(t){return n.equals(this,t)}static equals(t,e){let r=e;return r!=null&&t.code===r.code&&t.version===r.version&&fi(t.multihash,r.multihash)}toString(t){return mi(this,t)}toJSON(){return{"/":mi(this)}}link(){return this}[Symbol.toStringTag]="CID";[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(t){if(t==null)return null;let e=t;if(e instanceof n)return e;if(e["/"]!=null&&e["/"]===e.bytes||e.asCID===e){let{version:r,code:i,multihash:s,bytes:o}=e;return new n(r,i,s,o??Fi(r,i,s.bytes))}else if(e[vu]===!0){let{version:r,multihash:i,code:s}=e,o=li(i);return n.create(r,s,o)}else return null}static create(t,e,r){if(typeof e!="number")throw new Error("String codecs are no longer supported");if(!(r.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(t){case 0:{if(e!==Ne)throw new Error(`Version 0 CID must use dag-pb (code: ${Ne}) block encoding`);return new n(t,e,r,r.bytes)}case 1:{let i=Fi(t,e,r.bytes);return new n(t,e,r,i)}default:throw new Error("Invalid version")}}static createV0(t){return n.create(0,Ne,t)}static createV1(t,e){return n.create(1,t,e)}static decode(t){let[e,r]=n.decodeFirst(t);if(r.length!==0)throw new Error("Incorrect length");return e}static decodeFirst(t){let e=n.inspectBytes(t),r=e.size-e.multihashSize,i=At(t.subarray(r,r+e.multihashSize));if(i.byteLength!==e.multihashSize)throw new Error("Incorrect length");let s=i.subarray(e.multihashSize-e.digestSize),o=new xe(e.multihashCode,e.digestSize,s,i);return[e.version===0?n.createV0(o):n.createV1(e.codec,o),t.subarray(e.size)]}static inspectBytes(t){let e=0,r=()=>{let[l,m]=Te(t.subarray(e));return e+=m,l},i=r(),s=Ne;if(i===18?(i=0,e=0):s=r(),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);let o=e,a=r(),f=r(),g=e+f,p=g-o;return{version:i,codec:s,multihashCode:a,digestSize:f,multihashSize:p,size:g}}static parse(t,e){let[r,i]=_u(t,e),s=n.decode(i);if(s.version===0&&t[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return rr(s).set(r,t),s}};function _u(n,t){switch(n[0]){case"Q":{let e=t??Mt;return[Mt.prefix,e.decode(`${Mt.prefix}${n}`)]}case Mt.prefix:{let e=t??Mt;return[Mt.prefix,e.decode(n)]}case Ht.prefix:{let e=t??Ht;return[Ht.prefix,e.decode(n)]}case je.prefix:{let e=t??je;return[je.prefix,e.decode(n)]}default:{if(t==null)throw Error("To parse non base32, base36 or base58btc encoded CID multibase decoder must be provided");return[n[0],t.decode(n)]}}}function Su(n,t,e){let{prefix:r}=e;if(r!==Mt.prefix)throw Error(`Cannot string encode V0 in ${e.name} encoding`);let i=t.get(r);if(i==null){let s=e.encode(n).slice(1);return t.set(r,s),s}else return i}function Pu(n,t,e){let{prefix:r}=e,i=t.get(r);if(i==null){let s=e.encode(n);return t.set(r,s),s}else return i}var Ne=112,Iu=18;function Fi(n,t,e){let r=be(n),i=r+be(t),s=new Uint8Array(i+e.byteLength);return Ee(n,s,0),Ee(t,s,r),s.set(e,i),s}var vu=Symbol.for("@ipld/js-cid/CID");var Le={...Qn,...Wn,...Jn,...zn,...Rn,...Hn,...qn,...Gn,...Kn,...Vn},_l={...nr,...Xn};function Ei(n,t,e,r){return{name:n,prefix:t,encoder:{name:n,prefix:t,encode:e},decoder:{decode:r}}}var Ci=Ei("utf8","u",n=>"u"+new TextDecoder("utf8").decode(n),n=>new TextEncoder().encode(n.substring(1))),ir=Ei("ascii","a",n=>{let t="a";for(let e=0;e<n.length;e++)t+=String.fromCharCode(n[e]);return t},n=>{n=n.substring(1);let t=Sn(n.length);for(let e=0;e<n.length;e++)t[e]=n.charCodeAt(e);return t}),ju={utf8:Ci,"utf-8":Ci,hex:Le.base16,latin1:ir,ascii:ir,binary:ir,...Le},Je=ju;function Ue(n,t="utf8"){let e=Je[t];if(e==null)throw new Error(`Unsupported encoding "${t}"`);return t==="utf8"||t==="utf-8"?ge(bi.Buffer.from(n,"utf-8")):e.decoder.decode(`${e.prefix}${n}`)}var xi=J("node:buffer");function kt(n,t="utf8"){let e=Je[t];if(e==null)throw new Error(`Unsupported encoding "${t}"`);return t==="utf8"||t==="utf-8"?xi.Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString("utf8"):e.encoder.encode(n).substring(1)}var ht=class extends Error{static name="InvalidMultiaddrError";name="InvalidMultiaddrError"},Ut=class extends Error{static name="ValidationError";name="ValidationError"},Qe=class extends Error{static name="InvalidParametersError";name="InvalidParametersError"},Ze=class extends Error{static name="UnknownProtocolError";name="UnknownProtocolError"};var zt=J("node:net");function or(n){return t=>kt(t,n)}function ur(n){return t=>Ue(t,n)}function Ae(n){return new DataView(n.buffer).getUint16(n.byteOffset).toString()}function te(n){let t=new ArrayBuffer(2);return new DataView(t).setUint16(0,typeof n=="string"?parseInt(n):n),new Uint8Array(t)}function wi(n){let t=n.split(":");if(t.length!==2)throw new Error(`failed to parse onion addr: ["'${t.join('", "')}'"]' does not contain a port number`);if(t[0].length!==16)throw new Error(`failed to parse onion addr: ${t[0]} not a Tor onion address.`);let e=Ue(t[0],"base32"),r=parseInt(t[1],10);if(r<1||r>65536)throw new Error("Port number is not in range(1, 65536)");let i=te(r);return ve([e,i],e.length+i.length)}function yi(n){let t=n.split(":");if(t.length!==2)throw new Error(`failed to parse onion addr: ["'${t.join('", "')}'"]' does not contain a port number`);if(t[0].length!==56)throw new Error(`failed to parse onion addr: ${t[0]} not a Tor onion3 address.`);let e=Ht.decode(`b${t[0]}`),r=parseInt(t[1],10);if(r<1||r>65536)throw new Error("Port number is not in range(1, 65536)");let i=te(r);return ve([e,i],e.length+i.length)}function ar(n){let t=n.subarray(0,n.length-2),e=n.subarray(n.length-2),r=kt(t,"base32"),i=Ae(e);return`${r}:${i}`}var cr=function(n){n=n.toString().trim();let t=new Uint8Array(4);return n.split(/\./g).forEach((e,r)=>{let i=parseInt(e,10);if(isNaN(i)||i<0||i>255)throw new ht("Invalid byte value in IP address");t[r]=i}),t},Ai=function(n){let t=0;n=n.toString().trim();let e=n.split(":",8),r;for(r=0;r<e.length;r++){let s=(0,zt.isIPv4)(e[r]),o;s&&(o=cr(e[r]),e[r]=kt(o.subarray(0,2),"base16")),o!=null&&++r<8&&e.splice(r,0,kt(o.subarray(2,4),"base16"))}if(e[0]==="")for(;e.length<8;)e.unshift("0");else if(e[e.length-1]==="")for(;e.length<8;)e.push("0");else if(e.length<8){for(r=0;r<e.length&&e[r]!=="";r++);let s=[r,1];for(r=9-e.length;r>0;r--)s.push("0");e.splice.apply(e,s)}let i=new Uint8Array(t+16);for(r=0;r<e.length;r++){e[r]===""&&(e[r]="0");let s=parseInt(e[r],16);if(isNaN(s)||s<0||s>65535)throw new ht("Invalid byte value in IP address");i[t++]=s>>8&255,i[t++]=s&255}return i},Oi=function(n){if(n.byteLength!==4)throw new ht("IPv4 address was incorrect length");let t=[];for(let e=0;e<n.byteLength;e++)t.push(n[e]);return t.join(".")},Bi=function(n){if(n.byteLength!==16)throw new ht("IPv6 address was incorrect length");let t=[];for(let r=0;r<n.byteLength;r+=2){let i=n[r],s=n[r+1],o=`${i.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}`;t.push(o)}let e=t.join(":");try{let r=new URL(`http://[${e}]`);return r.hostname.substring(1,r.hostname.length-1)}catch{throw new ht(`Invalid IPv6 address "${e}"`)}};function _i(n){try{let t=new URL(`http://[${n}]`);return t.hostname.substring(1,t.hostname.length-1)}catch{throw new ht(`Invalid IPv6 address "${n}"`)}}var sr=Object.values(Le).map(n=>n.decoder),Mu=(function(){let n=sr[0].or(sr[1]);return sr.slice(2).forEach(t=>n=n.or(t)),n})();function Si(n){return Mu.decode(n)}function Pi(n){return t=>n.encoder.encode(t)}function Tu(n){if(parseInt(n).toString()!==n)throw new Ut("Value must be an integer")}function $u(n){if(n<0)throw new Ut("Value must be a positive integer, or zero")}function Nu(n){return t=>{if(t>n)throw new Ut(`Value must be smaller than or equal to ${n}`)}}function Lu(...n){return t=>{for(let e of n)e(t)}}var ze=Lu(Tu,$u,Nu(65535));var ft=-1,lr=class{protocolsByCode=new Map;protocolsByName=new Map;getProtocol(t){let e;if(typeof t=="string"?e=this.protocolsByName.get(t):e=this.protocolsByCode.get(t),e==null)throw new Ze(`Protocol ${t} was unknown`);return e}addProtocol(t){this.protocolsByCode.set(t.code,t),this.protocolsByName.set(t.name,t),t.aliases?.forEach(e=>{this.protocolsByName.set(e,t)})}removeProtocol(t){let e=this.protocolsByCode.get(t);e!=null&&(this.protocolsByCode.delete(e.code),this.protocolsByName.delete(e.name),e.aliases?.forEach(r=>{this.protocolsByName.delete(r)}))}},Rt=new lr,Aa=[{code:4,name:"ip4",size:32,valueToBytes:cr,bytesToValue:Oi,validate:n=>{if(!(0,zt.isIPv4)(n))throw new Ut(`Invalid IPv4 address "${n}"`)}},{code:6,name:"tcp",size:16,valueToBytes:te,bytesToValue:Ae,validate:ze},{code:273,name:"udp",size:16,valueToBytes:te,bytesToValue:Ae,validate:ze},{code:33,name:"dccp",size:16,valueToBytes:te,bytesToValue:Ae,validate:ze},{code:41,name:"ip6",size:128,valueToBytes:Ai,bytesToValue:Bi,stringToValue:_i,validate:n=>{if(!(0,zt.isIPv6)(n))throw new Ut(`Invalid IPv6 address "${n}"`)}},{code:42,name:"ip6zone",size:ft},{code:43,name:"ipcidr",size:8,bytesToValue:or("base10"),valueToBytes:ur("base10")},{code:53,name:"dns",size:ft},{code:54,name:"dns4",size:ft},{code:55,name:"dns6",size:ft},{code:56,name:"dnsaddr",size:ft},{code:132,name:"sctp",size:16,valueToBytes:te,bytesToValue:Ae,validate:ze},{code:301,name:"udt"},{code:302,name:"utp"},{code:400,name:"unix",size:ft,stringToValue:n=>decodeURIComponent(n),valueToString:n=>encodeURIComponent(n)},{code:421,name:"p2p",aliases:["ipfs"],size:ft,bytesToValue:or("base58btc"),valueToBytes:n=>n.startsWith("Q")||n.startsWith("1")?ur("base58btc")(n):ye.parse(n).multihash.bytes},{code:444,name:"onion",size:96,bytesToValue:ar,valueToBytes:wi},{code:445,name:"onion3",size:296,bytesToValue:ar,valueToBytes:yi},{code:446,name:"garlic64",size:ft},{code:447,name:"garlic32",size:ft},{code:448,name:"tls"},{code:449,name:"sni",size:ft},{code:454,name:"noise"},{code:460,name:"quic"},{code:461,name:"quic-v1"},{code:465,name:"webtransport"},{code:466,name:"certhash",size:ft,bytesToValue:Pi(Yn),valueToBytes:Si},{code:480,name:"http"},{code:481,name:"http-path",size:ft,stringToValue:n=>`/${decodeURIComponent(n)}`,valueToString:n=>encodeURIComponent(n.substring(1))},{code:443,name:"https"},{code:477,name:"ws"},{code:478,name:"wss"},{code:479,name:"p2p-websocket-star"},{code:277,name:"p2p-stardust"},{code:275,name:"p2p-webrtc-star"},{code:276,name:"p2p-webrtc-direct"},{code:280,name:"webrtc-direct"},{code:281,name:"webrtc"},{code:290,name:"p2p-circuit"},{code:777,name:"memory",size:ft}];Aa.forEach(n=>{Rt.addProtocol(n)});function Ii(n){let t=[],e=0;for(;e<n.length;){let r=Tn(n,e),i=Rt.getProtocol(r),s=Fe(r),o=Oa(i,n,e+s),a=0;o>0&&i.size===ft&&(a=Fe(o));let f=s+a+o,g={code:r,name:i.name,bytes:n.subarray(e,e+f)};if(o>0){let p=e+s+a,l=n.subarray(p,p+o);g.value=i.bytesToValue?.(l)??kt(l)}t.push(g),e+=f}return t}function vi(n){let t=0,e=[];for(let r of n){if(r.bytes==null){let i=Rt.getProtocol(r.code),s=Fe(r.code),o,a=0,f=0;r.value!=null&&(o=i.valueToBytes?.(r.value)??Ue(r.value),a=o.byteLength,i.size===ft&&(f=Fe(a)));let g=new Uint8Array(s+f+a),p=0;Mn(r.code,g,p),p+=s,o!=null&&(i.size===ft&&(Mn(a,g,p),p+=f),g.set(o,p)),r.bytes=g}e.push(r.bytes),t+=r.bytes.byteLength}return ve(e,t)}function ji(n){if(n.charAt(0)!=="/")throw new ht('String multiaddr must start with "/"');let t=[],e="protocol",r="",i="";for(let s=1;s<n.length;s++){let o=n.charAt(s);o!=="/"&&(e==="protocol"?i+=n.charAt(s):r+=n.charAt(s));let a=s===n.length-1;if(o==="/"||a){let f=Rt.getProtocol(i);if(e==="protocol"){if(f.size==null||f.size===0){t.push({code:f.code,name:f.name}),r="",i="",e="protocol";continue}else if(a)throw new ht(`Component ${i} was missing value`);e="value"}else if(e==="value"){let g={code:f.code,name:f.name};if(f.size!=null&&f.size!==0){if(r==="")throw new ht(`Component ${i} was missing value`);g.value=f.stringToValue?.(r)??r}t.push(g),r="",i="",e="protocol"}}}if(i!==""&&r!=="")throw new ht("Incomplete multiaddr");return t}function Mi(n){return`/${n.flatMap(t=>{if(t.value==null)return t.name;let e=Rt.getProtocol(t.code);if(e==null)throw new ht(`Unknown protocol code ${t.code}`);return[t.name,e.valueToString?.(t.value)??t.value]}).join("/")}`}function Oa(n,t,e){return n.size==null||n.size===0?0:n.size>0?n.size/8:Tn(t,e)}var Ba=Symbol.for("nodejs.util.inspect.custom"),fr=Symbol.for("@multiformats/multiaddr");function _a(n){if(n==null&&(n="/"),Ti(n))return n.getComponents();if(n instanceof Uint8Array)return Ii(n);if(typeof n=="string")return n=n.replace(/\/(\/)+/,"/").replace(/(\/)+$/,""),n===""&&(n="/"),ji(n);if(Array.isArray(n))return n;throw new ht("Must be a string, Uint8Array, Component[], or another Multiaddr")}var Xe=class n{[fr]=!0;#t;#e;#n;constructor(t="/",e={}){this.#t=_a(t),e.validate!==!1&&Sa(this)}get bytes(){return this.#n==null&&(this.#n=vi(this.#t)),this.#n}toString(){return this.#e==null&&(this.#e=Mi(this.#t)),this.#e}toJSON(){return this.toString()}getComponents(){return[...this.#t.map(t=>({...t}))]}encapsulate(t){let e=new n(t);return new n([...this.#t,...e.getComponents()],{validate:!1})}decapsulate(t){let e=t.toString(),r=this.toString(),i=r.lastIndexOf(e);if(i<0)throw new Qe(`Address ${this.toString()} does not contain subaddress: ${e}`);return new n(r.slice(0,i),{validate:!1})}decapsulateCode(t){let e;for(let r=this.#t.length-1;r>-1;r--)if(this.#t[r].code===t){e=r;break}return new n(this.#t.slice(0,e),{validate:!1})}equals(t){return Zr(this.bytes,t.bytes)}[Ba](){return`Multiaddr(${this.toString()})`}};function Sa(n){n.getComponents().forEach(t=>{let e=Rt.getProtocol(t.code);t.value!=null&&e.validate?.(t.value)})}function Ti(n){return!!n?.[fr]}function $i(n){return new Xe(n)}var Ni=J("module"),hr=me(J("path"),1),Dr=me(J("process"),1),Li=J("url");function Pa(n){let t=hr.default.extname(n);return t?n.slice(0,-t.length):n}function dr(n){if(!n)return!1;if("main"in n)return!!n.main;if(!Dr.default.argv[1])return!1;let e=(0,Ni.createRequire)(n.url).resolve(Dr.default.argv[1]),r=(0,Li.fileURLToPath)(n.url);return hr.default.extname(e)?r===e:Pa(r)===e}var Dn=J("assert");var Ia={right:$a,center:Na},va=0,ke=1,ja=2,tn=3,pr=class{constructor(t){var e;this.width=t.width,this.wrap=(e=t.wrap)!==null&&e!==void 0?e:!0,this.rows=[]}span(...t){let e=this.div(...t);e.span=!0}resetOutput(){this.rows=[]}div(...t){if(t.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]=="string")return this.applyLayoutDSL(t[0]);let e=t.map(r=>typeof r=="string"?this.colFromString(r):r);return this.rows.push(e),e}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]=="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){let e=t.split(`
|
|
4
4
|
`).map(i=>i.split(" ")),r=0;return e.forEach(i=>{i.length>1&&Et.stringWidth(i[0])>r&&(r=Math.min(Math.floor(this.width*.5),Et.stringWidth(i[0])))}),e.forEach(i=>{this.div(...i.map((s,o)=>({text:s.trim(),padding:this.measurePadding(s),width:o===0&&i.length>1?r:void 0})))}),this.rows[this.rows.length-1]}colFromString(t){return{text:t,padding:this.measurePadding(t)}}measurePadding(t){let e=Et.stripAnsi(t);return[0,e.match(/\s*$/)[0].length,0,e.match(/^\s*/)[0].length]}toString(){let t=[];return this.rows.forEach(e=>{this.rowToString(e,t)}),t.filter(e=>!e.hidden).map(e=>e.text).join(`
|
|
5
5
|
`)}rowToString(t,e){return this.rasterize(t).forEach((r,i)=>{let s="";r.forEach((o,a)=>{let{width:f}=t[a],g=this.negatePadding(t[a]),p=o;if(g>Et.stringWidth(o)&&(p+=" ".repeat(g-Et.stringWidth(o))),t[a].align&&t[a].align!=="left"&&this.wrap){let m=Ia[t[a].align];p=m(p,g),Et.stringWidth(p)<g&&(p+=" ".repeat((f||0)-Et.stringWidth(p)-1))}let l=t[a].padding||[0,0,0,0];l[tn]&&(s+=" ".repeat(l[tn])),s+=Ui(t[a],p,"| "),s+=p,s+=Ui(t[a],p," |"),l[ke]&&(s+=" ".repeat(l[ke])),i===0&&e.length>0&&(s=this.renderInline(s,e[e.length-1]))}),e.push({text:s.replace(/ +$/,""),span:t.span})}),e}renderInline(t,e){let r=t.match(/^ */),i=r?r[0].length:0,s=e.text,o=Et.stringWidth(s.trimRight());return e.span?this.wrap?i<o?t:(e.hidden=!0,s.trimRight()+" ".repeat(i-o)+t.trimLeft()):(e.hidden=!0,s+t):t}rasterize(t){let e=[],r=this.columnWidths(t),i;return t.forEach((s,o)=>{s.width=r[o],this.wrap?i=Et.wrap(s.text,this.negatePadding(s),{hard:!0}).split(`
|
|
6
6
|
`):i=s.text.split(`
|