@libp2p/interop 4.0.0 → 4.0.1
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/README.md +3 -4
- package/dist/index.min.js +569 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# @libp2p/interop <!-- omit in toc -->
|
|
2
2
|
|
|
3
3
|
[](http://libp2p.io/)
|
|
4
|
-
[](http://webchat.freenode.net/?channels=%23libp2p)
|
|
5
4
|
[](https://discuss.libp2p.io)
|
|
6
5
|
[](https://codecov.io/gh/libp2p/interop)
|
|
7
|
-
[](https://github.com/libp2p/interop/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)
|
|
8
7
|
|
|
9
8
|
> Interoperability Tests for libp2p
|
|
10
9
|
|
|
@@ -15,7 +14,7 @@
|
|
|
15
14
|
- [Running the tests](#running-the-tests)
|
|
16
15
|
- [Contribute](#contribute)
|
|
17
16
|
- [License](#license)
|
|
18
|
-
- [
|
|
17
|
+
- [Contribution](#contribution)
|
|
19
18
|
|
|
20
19
|
## Install
|
|
21
20
|
|
|
@@ -80,6 +79,6 @@ Licensed under either of
|
|
|
80
79
|
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
|
81
80
|
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
|
82
81
|
|
|
83
|
-
##
|
|
82
|
+
## Contribution
|
|
84
83
|
|
|
85
84
|
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
|
|
@@ -0,0 +1,569 @@
|
|
|
1
|
+
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.Libp2PInterop = factory()}(typeof self !== 'undefined' ? self : this, function () {
|
|
2
|
+
"use strict";var Libp2PInterop=(()=>{var Mi=Object.create;var yt=Object.defineProperty;var ji=Object.getOwnPropertyDescriptor;var Oi=Object.getOwnPropertyNames;var qi=Object.getPrototypeOf,Ni=Object.prototype.hasOwnProperty;var Se=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(n,e)=>(typeof require<"u"?require:n)[e]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var I=(r,n)=>()=>(n||r((n={exports:{}}).exports,n),n.exports),ae=(r,n)=>{for(var e in n)yt(r,e,{get:n[e],enumerable:!0})},kn=(r,n,e,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of Oi(n))!Ni.call(r,t)&&t!==e&&yt(r,t,{get:()=>n[t],enumerable:!(a=ji(n,t))||a.enumerable});return r};var ve=(r,n,e)=>(e=r!=null?Mi(qi(r)):{},kn(n||!r||!r.__esModule?yt(e,"default",{value:r,enumerable:!0}):e,r)),Ci=r=>kn(yt({},"__esModule",{value:!0}),r);var Ot=I((mu,_n)=>{function zn(){var r=[].slice.call(arguments);function n(e,a){Object.keys(a).forEach(function(t){~r.indexOf(t)||(e[t]=a[t])})}return function(){for(var a=[].slice.call(arguments),t=0,i={};t<a.length;t++)n(i,a[t]);return i}}_n.exports=qe;function qe(r,n,e){var a=zn("name","message","stack","constructor","toJSON"),t=a(n||{});this.message=r||"Unspecified AssertionError",this.showDiff=!1;for(var i in t)this[i]=t[i];if(e=e||qe,Error.captureStackTrace)Error.captureStackTrace(this,e);else try{throw new Error}catch(o){this.stack=o.stack}}qe.prototype=Object.create(Error.prototype);qe.prototype.name="AssertionError";qe.prototype.constructor=qe;qe.prototype.toJSON=function(r){var n=zn("constructor","toJSON","stack"),e=n({name:this.name},this);return r!==!1&&this.stack&&(e.stack=this.stack),e}});var $n=I((bu,Rn)=>{"use strict";function Fn(r,n){return typeof r>"u"||r===null?!1:n in Object(r)}function Un(r){var n=r.replace(/([^\\])\[/g,"$1.["),e=n.match(/(\\\.|[^.]+?)+/g);return e.map(function(t){if(t==="constructor"||t==="__proto__"||t==="prototype")return{};var i=/^\[(\d+)\]$/,o=i.exec(t),s=null;return o?s={i:parseFloat(o[1])}:s={p:t.replace(/\\([.[\]])/g,"$1")},s})}function Bn(r,n,e){var a=r,t=null;e=typeof e>"u"?n.length:e;for(var i=0;i<e;i++){var o=n[i];a&&(typeof o.p>"u"?a=a[o.i]:a=a[o.p],i===e-1&&(t=a))}return t}function Ii(r,n,e){for(var a=r,t=e.length,i=null,o=0;o<t;o++){var s=null,u=null;if(i=e[o],o===t-1)s=typeof i.p>"u"?i.i:i.p,a[s]=n;else if(typeof i.p<"u"&&a[i.p])a=a[i.p];else if(typeof i.i<"u"&&a[i.i])a=a[i.i];else{var d=e[o+1];s=typeof i.p>"u"?i.i:i.p,u=typeof d.p>"u"?[]:{},a[s]=u,a=a[s]}}}function Vn(r,n){var e=Un(n),a=e[e.length-1],t={parent:e.length>1?Bn(r,e,e.length-1):r,name:a.p||a.i,value:Bn(r,e)};return t.exists=Fn(t.parent,t.name),t}function Di(r,n){var e=Vn(r,n);return e.value}function ki(r,n,e){var a=Un(n);return Ii(r,e,a),r}Rn.exports={hasProperty:Fn,getPathInfo:Vn,getPathValue:Di,setPathValue:ki}});var le=I((gu,Ln)=>{Ln.exports=function(n,e,a){var t=n.__flags||(n.__flags=Object.create(null));if(arguments.length===3)t[e]=a;else return t[e]}});var Kn=I((wu,Wn)=>{var zi=le();Wn.exports=function(n,e){var a=zi(n,"negate"),t=e[0];return a?!t:t}});var Ye=I((qt,Nt)=>{(function(r,n){typeof qt=="object"&&typeof Nt<"u"?Nt.exports=n():typeof define=="function"&&define.amd?define(n):r.typeDetect=n()})(qt,function(){"use strict";var r=typeof Promise=="function",n=typeof self=="object"?self:globalThis,e=typeof Symbol<"u",a=typeof Map<"u",t=typeof Set<"u",i=typeof WeakMap<"u",o=typeof WeakSet<"u",s=typeof DataView<"u",u=e&&typeof Symbol.iterator<"u",d=e&&typeof Symbol.toStringTag<"u",g=t&&typeof Set.prototype.entries=="function",D=a&&typeof Map.prototype.entries=="function",V=g&&Object.getPrototypeOf(new Set().entries()),R=D&&Object.getPrototypeOf(new Map().entries()),M=u&&typeof Array.prototype[Symbol.iterator]=="function",x=M&&Object.getPrototypeOf([][Symbol.iterator]()),j=u&&typeof String.prototype[Symbol.iterator]=="function",k=j&&Object.getPrototypeOf(""[Symbol.iterator]()),U=8,G=-1;function Y(p){var A=typeof p;if(A!=="object")return A;if(p===null)return"null";if(p===n)return"global";if(Array.isArray(p)&&(d===!1||!(Symbol.toStringTag in p)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&p===window.location)return"Location";if(typeof window.document=="object"&&p===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&p===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&p===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&p instanceof window.HTMLElement){if(p.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(p.tagName==="TD")return"HTMLTableDataCellElement";if(p.tagName==="TH")return"HTMLTableHeaderCellElement"}}var q=d&&p[Symbol.toStringTag];if(typeof q=="string")return q;var z=Object.getPrototypeOf(p);return z===RegExp.prototype?"RegExp":z===Date.prototype?"Date":r&&z===Promise.prototype?"Promise":t&&z===Set.prototype?"Set":a&&z===Map.prototype?"Map":o&&z===WeakSet.prototype?"WeakSet":i&&z===WeakMap.prototype?"WeakMap":s&&z===DataView.prototype?"DataView":a&&z===R?"Map Iterator":t&&z===V?"Set Iterator":M&&z===x?"Array Iterator":j&&z===k?"String Iterator":z===null?"Object":Object.prototype.toString.call(p).slice(U,G)}return Y})});var Jn=I((vu,Gn)=>{var _i=Ot(),Ct=le(),Bi=Ye();Gn.exports=function(n,e){var a=Ct(n,"message"),t=Ct(n,"ssfi");a=a?a+": ":"",n=Ct(n,"object"),e=e.map(function(s){return s.toLowerCase()}),e.sort();var i=e.map(function(s,u){var d=~["a","e","i","o","u"].indexOf(s.charAt(0))?"an":"a",g=e.length>1&&u===e.length-1?"or ":"";return g+d+" "+s}).join(", "),o=Bi(n).toLowerCase();if(!e.some(function(s){return o===s}))throw new _i(a+"object tested must be "+i+", but "+o+" given",void 0,t)}});var It=I((xu,Qn)=>{Qn.exports=function(n,e){return e.length>4?e[4]:n._obj}});var Dt=I((Su,Zn)=>{"use strict";var Fi=Function.prototype.toString,Ui=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;function Vi(r){if(typeof r!="function")return null;var n="";if(typeof Function.prototype.name>"u"&&typeof r.name>"u"){var e=Fi.call(r).match(Ui);e&&(n=e[1])}else n=r.name;return n}Zn.exports=Vi});var Yn=I((mt,Xn)=>{(function(r,n){typeof mt=="object"&&typeof Xn<"u"?n(mt):typeof define=="function"&&define.amd?define(["exports"],n):(r=typeof globalThis<"u"?globalThis:r||self,n(r.loupe={}))})(mt,function(r){"use strict";function n(f){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?n=function(l){return typeof l}:n=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},n(f)}function e(f,l){return a(f)||t(f,l)||i(f,l)||s()}function a(f){if(Array.isArray(f))return f}function t(f,l){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(f)))){var b=[],E=!0,O=!1,_=void 0;try{for(var L=f[Symbol.iterator](),J;!(E=(J=L.next()).done)&&(b.push(J.value),!(l&&b.length===l));E=!0);}catch(ie){O=!0,_=ie}finally{try{!E&&L.return!=null&&L.return()}finally{if(O)throw _}}return b}}function i(f,l){if(f){if(typeof f=="string")return o(f,l);var b=Object.prototype.toString.call(f).slice(8,-1);if(b==="Object"&&f.constructor&&(b=f.constructor.name),b==="Map"||b==="Set")return Array.from(f);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return o(f,l)}}function o(f,l){(l==null||l>f.length)&&(l=f.length);for(var b=0,E=new Array(l);b<l;b++)E[b]=f[b];return E}function s(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var u={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},d={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},g="\u2026";function D(f,l){var b=u[d[l]]||u[l];return b?"\x1B[".concat(b[0],"m").concat(String(f),"\x1B[").concat(b[1],"m"):String(f)}function V(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=f.showHidden,b=l===void 0?!1:l,E=f.depth,O=E===void 0?2:E,_=f.colors,L=_===void 0?!1:_,J=f.customInspect,ie=J===void 0?!0:J,ne=f.showProxy,fe=ne===void 0?!1:ne,Oe=f.maxArrayLength,Mt=Oe===void 0?1/0:Oe,Ze=f.breakLength,Fe=Ze===void 0?1/0:Ze,Xe=f.seen,Pi=Xe===void 0?[]:Xe,In=f.truncate,Ei=In===void 0?1/0:In,Dn=f.stylize,Ti=Dn===void 0?String:Dn,jt={showHidden:Boolean(b),depth:Number(O),colors:Boolean(L),customInspect:Boolean(ie),showProxy:Boolean(fe),maxArrayLength:Number(Mt),breakLength:Number(Fe),truncate:Number(Ei),seen:Pi,stylize:Ti};return jt.colors&&(jt.stylize=D),jt}function R(f,l){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g;f=String(f);var E=b.length,O=f.length;return E>l&&O>E?b:O>l&&O>E?"".concat(f.slice(0,l-E)).concat(b):f}function M(f,l,b){var E=arguments.length>3&&arguments[3]!==void 0?arguments[3]:", ";b=b||l.inspect;var O=f.length;if(O===0)return"";for(var _=l.truncate,L="",J="",ie="",ne=0;ne<O;ne+=1){var fe=ne+1===f.length,Oe=ne+2===f.length;ie="".concat(g,"(").concat(f.length-ne,")");var Mt=f[ne];l.truncate=_-L.length-(fe?0:E.length);var Ze=J||b(Mt,l)+(fe?"":E),Fe=L.length+Ze.length,Xe=Fe+ie.length;if(fe&&Fe>_&&L.length+ie.length<=_||!fe&&!Oe&&Xe>_||(J=fe?"":b(f[ne+1],l)+(Oe?"":E),!fe&&Oe&&Xe>_&&Fe+J.length>_))break;if(L+=Ze,!fe&&!Oe&&Fe+J.length>=_){ie="".concat(g,"(").concat(f.length-ne-1,")");break}ie=""}return"".concat(L).concat(ie)}function x(f){return f.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?f:JSON.stringify(f).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function j(f,l){var b=e(f,2),E=b[0],O=b[1];return l.truncate-=2,typeof E=="string"?E=x(E):typeof E!="number"&&(E="[".concat(l.inspect(E,l),"]")),l.truncate-=E.length,O=l.inspect(O,l),"".concat(E,": ").concat(O)}function k(f,l){var b=Object.keys(f).slice(f.length);if(!f.length&&!b.length)return"[]";l.truncate-=4;var E=M(f,l);l.truncate-=E.length;var O="";return b.length&&(O=M(b.map(function(_){return[_,f[_]]}),l,j)),"[ ".concat(E).concat(O?", ".concat(O):""," ]")}var U=Function.prototype.toString,G=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;function Y(f){if(typeof f!="function")return null;var l="";if(typeof Function.prototype.name>"u"&&typeof f.name>"u"){var b=U.call(f).match(G);b&&(l=b[1])}else l=f.name;return l}var p=Y,A=function(l){return typeof Buffer=="function"&&l instanceof Buffer?"Buffer":l[Symbol.toStringTag]?l[Symbol.toStringTag]:p(l.constructor)};function q(f,l){var b=A(f);l.truncate-=b.length+4;var E=Object.keys(f).slice(f.length);if(!f.length&&!E.length)return"".concat(b,"[]");for(var O="",_=0;_<f.length;_++){var L="".concat(l.stylize(R(f[_],l.truncate),"number")).concat(_===f.length-1?"":", ");if(l.truncate-=L.length,f[_]!==f.length&&l.truncate<=3){O+="".concat(g,"(").concat(f.length-f[_]+1,")");break}O+=L}var J="";return E.length&&(J=M(E.map(function(ie){return[ie,f[ie]]}),l,j)),"".concat(b,"[ ").concat(O).concat(J?", ".concat(J):""," ]")}function z(f,l){var b=f.toJSON();if(b===null)return"Invalid Date";var E=b.split("T"),O=E[0];return l.stylize("".concat(O,"T").concat(R(E[1],l.truncate-O.length-1)),"date")}function H(f,l){var b=p(f);return b?l.stylize("[Function ".concat(R(b,l.truncate-11),"]"),"special"):l.stylize("[Function]","special")}function be(f,l){var b=e(f,2),E=b[0],O=b[1];return l.truncate-=4,E=l.inspect(E,l),l.truncate-=E.length,O=l.inspect(O,l),"".concat(E," => ").concat(O)}function re(f){var l=[];return f.forEach(function(b,E){l.push([E,b])}),l}function _e(f,l){var b=f.size-1;return b<=0?"Map{}":(l.truncate-=7,"Map{ ".concat(M(re(f),l,be)," }"))}var se=Number.isNaN||function(f){return f!==f};function me(f,l){return se(f)?l.stylize("NaN","number"):f===1/0?l.stylize("Infinity","number"):f===-1/0?l.stylize("-Infinity","number"):f===0?l.stylize(1/f===1/0?"+0":"-0","number"):l.stylize(R(f,l.truncate),"number")}function ce(f,l){var b=R(f.toString(),l.truncate-1);return b!==g&&(b+="n"),l.stylize(b,"bigint")}function je(f,l){var b=f.toString().split("/")[2],E=l.truncate-(2+b.length),O=f.source;return l.stylize("/".concat(R(O,E),"/").concat(b),"regexp")}function ft(f){var l=[];return f.forEach(function(b){l.push(b)}),l}function Et(f,l){return f.size===0?"Set{}":(l.truncate-=7,"Set{ ".concat(M(ft(f),l)," }"))}var c=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),h={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},m=16,w=4;function S(f){return h[f]||"\\u".concat("0000".concat(f.charCodeAt(0).toString(m)).slice(-w))}function P(f,l){return c.test(f)&&(f=f.replace(c,S)),l.stylize("'".concat(R(f,l.truncate-2),"'"),"string")}function v(f){return"description"in Symbol.prototype?f.description?"Symbol(".concat(f.description,")"):"Symbol()":f.toString()}var y=function(){return"Promise{\u2026}"};try{var T=process.binding("util"),N=T.getPromiseDetails,F=T.kPending,K=T.kRejected;Array.isArray(N(Promise.resolve()))&&(y=function(l,b){var E=N(l),O=e(E,2),_=O[0],L=O[1];return _===F?"Promise{<pending>}":"Promise".concat(_===K?"!":"","{").concat(b.inspect(L,b),"}")})}catch{}var B=y;function C(f,l){var b=Object.getOwnPropertyNames(f),E=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(f):[];if(b.length===0&&E.length===0)return"{}";if(l.truncate-=4,l.seen=l.seen||[],l.seen.indexOf(f)>=0)return"[Circular]";l.seen.push(f);var O=M(b.map(function(J){return[J,f[J]]}),l,j),_=M(E.map(function(J){return[J,f[J]]}),l,j);l.seen.pop();var L="";return O&&_&&(L=", "),"{ ".concat(O).concat(L).concat(_," }")}var $=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function ee(f,l){var b="";return $&&$ in f&&(b=f[$]),b=b||p(f.constructor),(!b||b==="_class")&&(b="<Anonymous Class>"),l.truncate-=b.length,"".concat(b).concat(C(f,l))}function oe(f,l){return f.length===0?"Arguments[]":(l.truncate-=13,"Arguments[ ".concat(M(f,l)," ]"))}var te=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description"];function we(f,l){var b=Object.getOwnPropertyNames(f).filter(function(L){return te.indexOf(L)===-1}),E=f.name;l.truncate-=E.length;var O="";typeof f.message=="string"?O=R(f.message,l.truncate):b.unshift("message"),O=O?": ".concat(O):"",l.truncate-=O.length+5;var _=M(b.map(function(L){return[L,f[L]]}),l,j);return"".concat(E).concat(O).concat(_?" { ".concat(_," }"):"")}function bi(f,l){var b=e(f,2),E=b[0],O=b[1];return l.truncate-=3,O?"".concat(l.stylize(E,"yellow"),"=").concat(l.stylize('"'.concat(O,'"'),"string")):"".concat(l.stylize(E,"yellow"))}function Tt(f,l){return M(f,l,On,`
|
|
4
|
+
`)}function On(f,l){var b=f.getAttributeNames(),E=f.tagName.toLowerCase(),O=l.stylize("<".concat(E),"special"),_=l.stylize(">","special"),L=l.stylize("</".concat(E,">"),"special");l.truncate-=E.length*2+5;var J="";b.length>0&&(J+=" ",J+=M(b.map(function(fe){return[fe,f.getAttribute(fe)]}),l,bi," ")),l.truncate-=J.length;var ie=l.truncate,ne=Tt(f.children,l);return ne&&ne.length>ie&&(ne="".concat(g,"(").concat(f.children.length,")")),"".concat(O).concat(J).concat(_).concat(ne).concat(L)}var gi=typeof Symbol=="function"&&typeof Symbol.for=="function",lt=gi?Symbol.for("chai/inspect"):"@@chai/inspect",Be=!1;try{var qn=Se("util");Be=qn.inspect?qn.inspect.custom:!1}catch{Be=!1}function Nn(){this.key="chai/loupe__"+Math.random()+Date.now()}Nn.prototype={get:function(l){return l[this.key]},has:function(l){return this.key in l},set:function(l,b){Object.isExtensible(l)&&Object.defineProperty(l,this.key,{value:b,configurable:!0})}};var ht=new(typeof WeakMap=="function"?WeakMap:Nn),dt={},Cn={undefined:function(l,b){return b.stylize("undefined","undefined")},null:function(l,b){return b.stylize(null,"null")},boolean:function(l,b){return b.stylize(l,"boolean")},Boolean:function(l,b){return b.stylize(l,"boolean")},number:me,Number:me,bigint:ce,BigInt:ce,string:P,String:P,function:H,Function:H,symbol:v,Symbol:v,Array:k,Date:z,Map:_e,Set:Et,RegExp:je,Promise:B,WeakSet:function(l,b){return b.stylize("WeakSet{\u2026}","special")},WeakMap:function(l,b){return b.stylize("WeakMap{\u2026}","special")},Arguments:oe,Int8Array:q,Uint8Array:q,Uint8ClampedArray:q,Int16Array:q,Uint16Array:q,Int32Array:q,Uint32Array:q,Float32Array:q,Float64Array:q,Generator:function(){return""},DataView:function(){return""},ArrayBuffer:function(){return""},Error:we,HTMLCollection:Tt,NodeList:Tt},wi=function(l,b,E){return lt in l&&typeof l[lt]=="function"?l[lt](b):Be&&Be in l&&typeof l[Be]=="function"?l[Be](b.depth,b):"inspect"in l&&typeof l.inspect=="function"?l.inspect(b.depth,b):"constructor"in l&&ht.has(l.constructor)?ht.get(l.constructor)(l,b):dt[E]?dt[E](l,b):""},vi=Object.prototype.toString;function pt(f,l){l=V(l),l.inspect=pt;var b=l,E=b.customInspect,O=f===null?"null":n(f);if(O==="object"&&(O=vi.call(f).slice(8,-1)),Cn[O])return Cn[O](f,l);if(E&&f){var _=wi(f,l,O);if(_)return typeof _=="string"?_:pt(_,l)}var L=f?Object.getPrototypeOf(f):!1;return L===Object.prototype||L===null?C(f,l):f&&typeof HTMLElement=="function"&&f instanceof HTMLElement?On(f,l):"constructor"in f?f.constructor!==Object?ee(f,l):C(f,l):f===Object(f)?C(f,l):l.stylize(String(f),O)}function xi(f,l){return ht.has(f)?!1:(ht.set(f,l),!0)}function Si(f,l){return f in dt?!1:(dt[f]=l,!0)}var Ai=lt;r.custom=Ai,r.default=pt,r.inspect=pt,r.registerConstructor=xi,r.registerStringTag=Si,Object.defineProperty(r,"__esModule",{value:!0})})});var Ne=I((Au,Hn)=>{Hn.exports={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"]}});var bt=I((Eu,tr)=>{var Pu=Dt(),Ri=Yn(),er=Ne();tr.exports=$i;function $i(r,n,e,a){var t={colors:a,depth:typeof e>"u"?2:e,showHidden:n,truncate:er.truncateThreshold?er.truncateThreshold:1/0};return Ri.inspect(r,t)}});var kt=I((Tu,rr)=>{var Li=bt(),nr=Ne();rr.exports=function(n){var e=Li(n),a=Object.prototype.toString.call(n);if(nr.truncateThreshold&&e.length>=nr.truncateThreshold){if(a==="[object Function]")return!n.name||n.name===""?"[Function]":"[Function: "+n.name+"]";if(a==="[object Array]")return"[ Array("+n.length+") ]";if(a==="[object Object]"){var t=Object.keys(n),i=t.length>2?t.splice(0,2).join(", ")+", ...":t.join(", ");return"{ Object ("+i+") }"}else return e}else return e}});var ir=I((Mu,or)=>{var zt=le(),Wi=It(),_t=kt();or.exports=function(n,e){var a=zt(n,"negate"),t=zt(n,"object"),i=e[3],o=Wi(n,e),s=a?e[2]:e[1],u=zt(n,"message");return typeof s=="function"&&(s=s()),s=s||"",s=s.replace(/#\{this\}/g,function(){return _t(t)}).replace(/#\{act\}/g,function(){return _t(o)}).replace(/#\{exp\}/g,function(){return _t(i)}),u?u+": "+s:s}});var Ae=I((ju,sr)=>{sr.exports=function(n,e,a){var t=n.__flags||(n.__flags=Object.create(null));e.__flags||(e.__flags=Object.create(null)),a=arguments.length===3?a:!0;for(var i in t)(a||i!=="object"&&i!=="ssfi"&&i!=="lockSsfi"&&i!="message")&&(e.__flags[i]=t[i])}});var gr=I((Ou,Ut)=>{"use strict";var ar=Ye();function yr(){this._key="chai/deep-eql__"+Math.random()+Date.now()}yr.prototype={get:function(n){return n[this._key]},set:function(n,e){Object.isExtensible(n)&&Object.defineProperty(n,this._key,{value:e,configurable:!0})}};var Ft=typeof WeakMap=="function"?WeakMap:yr;function ur(r,n,e){if(!e||Ue(r)||Ue(n))return null;var a=e.get(r);if(a){var t=a.get(n);if(typeof t=="boolean")return t}return null}function gt(r,n,e,a){if(!(!e||Ue(r)||Ue(n))){var t=e.get(r);t?t.set(n,a):(t=new Ft,t.set(n,a),e.set(r,t))}}Ut.exports=wt;Ut.exports.MemoizeMap=Ft;function wt(r,n,e){if(e&&e.comparator)return cr(r,n,e);var a=mr(r,n);return a!==null?a:cr(r,n,e)}function mr(r,n){return r===n?r!==0||1/r===1/n:r!==r&&n!==n?!0:Ue(r)||Ue(n)?!1:null}function cr(r,n,e){e=e||{},e.memoize=e.memoize===!1?!1:e.memoize||new Ft;var a=e&&e.comparator,t=ur(r,n,e.memoize);if(t!==null)return t;var i=ur(n,r,e.memoize);if(i!==null)return i;if(a){var o=a(r,n);if(o===!1||o===!0)return gt(r,n,e.memoize,o),o;var s=mr(r,n);if(s!==null)return s}var u=ar(r);if(u!==ar(n))return gt(r,n,e.memoize,!1),!1;gt(r,n,e.memoize,!0);var d=Ki(r,n,u,e);return gt(r,n,e.memoize,d),d}function Ki(r,n,e,a){switch(e){case"String":case"Number":case"Boolean":case"Date":return wt(r.valueOf(),n.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return r===n;case"Error":return br(r,n,["name","message","code"],a);case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return Ce(r,n,a);case"RegExp":return Gi(r,n);case"Generator":return Ji(r,n,a);case"DataView":return Ce(new Uint8Array(r.buffer),new Uint8Array(n.buffer),a);case"ArrayBuffer":return Ce(new Uint8Array(r),new Uint8Array(n),a);case"Set":return fr(r,n,a);case"Map":return fr(r,n,a);case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.Instant":case"Temporal.ZonedDateTime":case"Temporal.PlainYearMonth":case"Temporal.PlainMonthDay":return r.equals(n);case"Temporal.Duration":return r.total("nanoseconds")===n.total("nanoseconds");case"Temporal.TimeZone":case"Temporal.Calendar":return r.toString()===n.toString();default:return Zi(r,n,a)}}function Gi(r,n){return r.toString()===n.toString()}function fr(r,n,e){if(r.size!==n.size)return!1;if(r.size===0)return!0;var a=[],t=[];return r.forEach(function(o,s){a.push([o,s])}),n.forEach(function(o,s){t.push([o,s])}),Ce(a.sort(),t.sort(),e)}function Ce(r,n,e){var a=r.length;if(a!==n.length)return!1;if(a===0)return!0;for(var t=-1;++t<a;)if(wt(r[t],n[t],e)===!1)return!1;return!0}function Ji(r,n,e){return Ce(Bt(r),Bt(n),e)}function Qi(r){return typeof Symbol<"u"&&typeof r=="object"&&typeof Symbol.iterator<"u"&&typeof r[Symbol.iterator]=="function"}function lr(r){if(Qi(r))try{return Bt(r[Symbol.iterator]())}catch{return[]}return[]}function Bt(r){for(var n=r.next(),e=[n.value];n.done===!1;)n=r.next(),e.push(n.value);return e}function hr(r){var n=[];for(var e in r)n.push(e);return n}function dr(r){for(var n=[],e=Object.getOwnPropertySymbols(r),a=0;a<e.length;a+=1){var t=e[a];Object.getOwnPropertyDescriptor(r,t).enumerable&&n.push(t)}return n}function br(r,n,e,a){var t=e.length;if(t===0)return!0;for(var i=0;i<t;i+=1)if(wt(r[e[i]],n[e[i]],a)===!1)return!1;return!0}function Zi(r,n,e){var a=hr(r),t=hr(n),i=dr(r),o=dr(n);if(a=a.concat(i),t=t.concat(o),a.length&&a.length===t.length)return Ce(pr(a).sort(),pr(t).sort())===!1?!1:br(r,n,a,e);var s=lr(r),u=lr(n);return s.length&&s.length===u.length?(s.sort(),u.sort(),Ce(s,u,e)):a.length===0&&s.length===0&&t.length===0&&u.length===0}function Ue(r){return r===null||typeof r!="object"}function pr(r){return r.map(function(e){return typeof e=="symbol"?e.toString():e})}});var He=I((qu,wr)=>{var Xi=Ne();wr.exports=function(){return Xi.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}});var Sr=I((Nu,xr)=>{var Yi=Pe(),vr=le(),Hi=He(),es=Ae();xr.exports=function(n,e,a){a=a===void 0?function(){}:a,Object.defineProperty(n,e,{get:function t(){!Hi()&&!vr(this,"lockSsfi")&&vr(this,"ssfi",t);var i=a.call(this);if(i!==void 0)return i;var o=new Yi.Assertion;return es(this,o),o},configurable:!0})}});var et=I((Cu,Ar)=>{var ts=Object.getOwnPropertyDescriptor(function(){},"length");Ar.exports=function(n,e,a){return ts.configurable&&Object.defineProperty(n,"length",{get:function(){throw Error(a?"Invalid Chai property: "+e+'.length. Due to a compatibility issue, "length" cannot directly follow "'+e+'". Use "'+e+'.lengthOf" instead.':"Invalid Chai property: "+e+'.length. See docs for proper usage of "'+e+'".')}}),n}});var Er=I((Iu,Pr)=>{Pr.exports=function(n){var e=Object.getOwnPropertyNames(n);function a(i){e.indexOf(i)===-1&&e.push(i)}for(var t=Object.getPrototypeOf(n);t!==null;)Object.getOwnPropertyNames(t).forEach(a),t=Object.getPrototypeOf(t);return e}});var tt=I((Du,jr)=>{var ns=Ne(),Tr=le(),rs=Er(),os=He();var Mr=["__flags","__methods","_obj","assert"];jr.exports=function(n,e){return os()?new Proxy(n,{get:function a(t,i){if(typeof i=="string"&&ns.proxyExcludedKeys.indexOf(i)===-1&&!Reflect.has(t,i)){if(e)throw Error("Invalid Chai property: "+e+"."+i+'. See docs for proper usage of "'+e+'".');var o=null,s=4;throw rs(t).forEach(function(u){if(!Object.prototype.hasOwnProperty(u)&&Mr.indexOf(u)===-1){var d=is(i,u,s);d<s&&(o=u,s=d)}}),Error(o!==null?"Invalid Chai property: "+i+'. Did you mean "'+o+'"?':"Invalid Chai property: "+i)}return Mr.indexOf(i)===-1&&!Tr(t,"lockSsfi")&&Tr(t,"ssfi",a),Reflect.get(t,i)}}):n};function is(r,n,e){if(Math.abs(r.length-n.length)>=e)return e;for(var a=[],t=0;t<=r.length;t++)a[t]=Array(n.length+1).fill(0),a[t][0]=t;for(var i=0;i<n.length;i++)a[0][i]=i;for(var t=1;t<=r.length;t++)for(var o=r.charCodeAt(t-1),i=1;i<=n.length;i++){if(Math.abs(t-i)>=e){a[t][i]=e;continue}a[t][i]=Math.min(a[t-1][i]+1,a[t][i-1]+1,a[t-1][i-1]+(o===n.charCodeAt(i-1)?0:1))}return a[r.length][n.length]}});var Nr=I((ku,qr)=>{var ss=et(),as=Pe(),Or=le(),us=tt(),cs=Ae();qr.exports=function(n,e,a){var t=function(){Or(this,"lockSsfi")||Or(this,"ssfi",t);var i=a.apply(this,arguments);if(i!==void 0)return i;var o=new as.Assertion;return cs(this,o),o};ss(t,e,!1),n[e]=us(t,e)}});var Ir=I((zu,Cr)=>{var fs=Pe(),nt=le(),ls=He(),hs=Ae();Cr.exports=function(n,e,a){var t=Object.getOwnPropertyDescriptor(n,e),i=function(){};t&&typeof t.get=="function"&&(i=t.get),Object.defineProperty(n,e,{get:function o(){!ls()&&!nt(this,"lockSsfi")&&nt(this,"ssfi",o);var s=nt(this,"lockSsfi");nt(this,"lockSsfi",!0);var u=a(i).call(this);if(nt(this,"lockSsfi",s),u!==void 0)return u;var d=new fs.Assertion;return hs(this,d),d},configurable:!0})}});var kr=I((_u,Dr)=>{var ds=et(),ps=Pe(),rt=le(),ys=tt(),ms=Ae();Dr.exports=function(n,e,a){var t=n[e],i=function(){throw new Error(e+" is not a function")};t&&typeof t=="function"&&(i=t);var o=function(){rt(this,"lockSsfi")||rt(this,"ssfi",o);var s=rt(this,"lockSsfi");rt(this,"lockSsfi",!0);var u=a(i).apply(this,arguments);if(rt(this,"lockSsfi",s),u!==void 0)return u;var d=new ps.Assertion;return ms(this,d),d};ds(o,e,!1),n[e]=ys(o,e)}});var Ur=I((Bu,Fr)=>{var bs=et(),gs=Pe(),zr=le(),ws=tt(),_r=Ae();var vs=typeof Object.setPrototypeOf=="function",Br=function(){},xs=Object.getOwnPropertyNames(Br).filter(function(r){var n=Object.getOwnPropertyDescriptor(Br,r);return typeof n!="object"?!0:!n.configurable}),Ss=Function.prototype.call,As=Function.prototype.apply;Fr.exports=function(n,e,a,t){typeof t!="function"&&(t=function(){});var i={method:a,chainingBehavior:t};n.__methods||(n.__methods={}),n.__methods[e]=i,Object.defineProperty(n,e,{get:function(){i.chainingBehavior.call(this);var s=function(){zr(this,"lockSsfi")||zr(this,"ssfi",s);var g=i.method.apply(this,arguments);if(g!==void 0)return g;var D=new gs.Assertion;return _r(this,D),D};if(bs(s,e,!0),vs){var u=Object.create(this);u.call=Ss,u.apply=As,Object.setPrototypeOf(s,u)}else{var d=Object.getOwnPropertyNames(n);d.forEach(function(g){if(xs.indexOf(g)===-1){var D=Object.getOwnPropertyDescriptor(n,g);Object.defineProperty(s,g,D)}})}return _r(this,s),ws(s)},configurable:!0})}});var Lr=I((Fu,$r)=>{var Vr=Pe(),Rr=Ae();$r.exports=function(n,e,a,t){var i=n.__methods[e],o=i.chainingBehavior;i.chainingBehavior=function(){var d=t(o).call(this);if(d!==void 0)return d;var g=new Vr.Assertion;return Rr(this,g),g};var s=i.method;i.method=function(){var d=a(s).apply(this,arguments);if(d!==void 0)return d;var g=new Vr.Assertion;return Rr(this,g),g}}});var Gr=I((Uu,Kr)=>{var Wr=bt();Kr.exports=function(n,e){return Wr(n)<Wr(e)?-1:1}});var Vt=I((Vu,Jr)=>{Jr.exports=function(n){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})}});var Zr=I((Ru,Qr)=>{var Ps=Vt();Qr.exports=function(n){return Object.keys(n).concat(Ps(n))}});var $t=I(($u,Xr)=>{"use strict";function Es(r,n){return n instanceof Error&&r===n}function Ts(r,n){return n instanceof Error?r.constructor===n.constructor||r instanceof n.constructor:n.prototype instanceof Error||n===Error?r.constructor===n||r instanceof n:!1}function Ms(r,n){var e=typeof r=="string"?r:r.message;return n instanceof RegExp?n.test(e):typeof n=="string"?e.indexOf(n)!==-1:!1}var js=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\(\/]+)/;function Rt(r){var n="";if(typeof r.name>"u"){var e=String(r).match(js);e&&(n=e[1])}else n=r.name;return n}function Os(r){var n=r;return r instanceof Error?n=Rt(r.constructor):typeof r=="function"&&(n=Rt(r).trim()||Rt(new r)),n}function qs(r){var n="";return r&&r.message?n=r.message:typeof r=="string"&&(n=r),n}Xr.exports={compatibleInstance:Es,compatibleConstructor:Ts,compatibleMessage:Ms,getMessage:qs,getConstructorName:Os}});var Hr=I((Lu,Yr)=>{function Ns(r){return r!==r}Yr.exports=Number.isNaN||Ns});var no=I((Wu,to)=>{var Cs=Ye(),eo=le();function Is(r){var n=Cs(r),e=["Array","Object","function"];return e.indexOf(n)!==-1}to.exports=function(n,e){var a=eo(n,"operator"),t=eo(n,"negate"),i=e[3],o=t?e[2]:e[1];if(a)return a;if(typeof o=="function"&&(o=o()),o=o||"",!!o&&!/\shave\s/.test(o)){var s=Is(i);return/\snot\s/.test(o)?s?"notDeepStrictEqual":"notStrictEqual":s?"deepStrictEqual":"strictEqual"}}});var oo=I(W=>{var ro=$n();W.test=Kn();W.type=Ye();W.expectTypes=Jn();W.getMessage=ir();W.getActual=It();W.inspect=bt();W.objDisplay=kt();W.flag=le();W.transferFlags=Ae();W.eql=gr();W.getPathInfo=ro.getPathInfo;W.hasProperty=ro.hasProperty;W.getName=Dt();W.addProperty=Sr();W.addMethod=Nr();W.overwriteProperty=Ir();W.overwriteMethod=kr();W.addChainableMethod=Ur();W.overwriteChainableMethod=Lr();W.compareByInspect=Gr();W.getOwnEnumerablePropertySymbols=Vt();W.getOwnEnumerableProperties=Zr();W.checkError=$t();W.proxify=tt();W.addLengthGuard=et();W.isProxyEnabled=He();W.isNaN=Hr();W.getOperator=no()});var so=I((Gu,io)=>{var Ve=Ne();io.exports=function(r,n){var e=r.AssertionError,a=n.flag;r.Assertion=t;function t(i,o,s,u){return a(this,"ssfi",s||t),a(this,"lockSsfi",u),a(this,"object",i),a(this,"message",o),n.proxify(this)}Object.defineProperty(t,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Ve.includeStack},set:function(i){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Ve.includeStack=i}}),Object.defineProperty(t,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Ve.showDiff},set:function(i){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Ve.showDiff=i}}),t.addProperty=function(i,o){n.addProperty(this.prototype,i,o)},t.addMethod=function(i,o){n.addMethod(this.prototype,i,o)},t.addChainableMethod=function(i,o,s){n.addChainableMethod(this.prototype,i,o,s)},t.overwriteProperty=function(i,o){n.overwriteProperty(this.prototype,i,o)},t.overwriteMethod=function(i,o){n.overwriteMethod(this.prototype,i,o)},t.overwriteChainableMethod=function(i,o,s){n.overwriteChainableMethod(this.prototype,i,o,s)},t.prototype.assert=function(i,o,s,u,d,g){var D=n.test(this,arguments);if(g!==!1&&(g=!0),u===void 0&&d===void 0&&(g=!1),Ve.showDiff!==!0&&(g=!1),!D){o=n.getMessage(this,arguments);var V=n.getActual(this,arguments),R={actual:V,expected:u,showDiff:g},M=n.getOperator(this,arguments);throw M&&(R.operator=M),new e(o,R,Ve.includeStack?this.assert:a(this,"ssfi"))}};Object.defineProperty(t.prototype,"_obj",{get:function(){return a(this,"object")},set:function(i){a(this,"object",i)}})}});var uo=I((Ju,ao)=>{ao.exports=function(r,n){var e=r.Assertion,a=r.AssertionError,t=n.flag;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(c){e.addProperty(c)}),e.addProperty("not",function(){t(this,"negate",!0)}),e.addProperty("deep",function(){t(this,"deep",!0)}),e.addProperty("nested",function(){t(this,"nested",!0)}),e.addProperty("own",function(){t(this,"own",!0)}),e.addProperty("ordered",function(){t(this,"ordered",!0)}),e.addProperty("any",function(){t(this,"any",!0),t(this,"all",!1)}),e.addProperty("all",function(){t(this,"all",!0),t(this,"any",!1)});function i(c,h){h&&t(this,"message",h),c=c.toLowerCase();var m=t(this,"object"),w=~["a","e","i","o","u"].indexOf(c.charAt(0))?"an ":"a ";this.assert(c===n.type(m).toLowerCase(),"expected #{this} to be "+w+c,"expected #{this} not to be "+w+c)}e.addChainableMethod("an",i),e.addChainableMethod("a",i);function o(c,h){return n.isNaN(c)&&n.isNaN(h)||c===h}function s(){t(this,"contains",!0)}function u(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=n.type(m).toLowerCase(),S=t(this,"message"),P=t(this,"negate"),v=t(this,"ssfi"),y=t(this,"deep"),T=y?"deep ":"";S=S?S+": ":"";var N=!1;switch(w){case"string":N=m.indexOf(c)!==-1;break;case"weakset":if(y)throw new a(S+"unable to use .deep.include with WeakSet",void 0,v);N=m.has(c);break;case"map":var F=y?n.eql:o;m.forEach(function($){N=N||F($,c)});break;case"set":y?m.forEach(function($){N=N||n.eql($,c)}):N=m.has(c);break;case"array":y?N=m.some(function($){return n.eql($,c)}):N=m.indexOf(c)!==-1;break;default:if(c!==Object(c))throw new a(S+"the given combination of arguments ("+w+" and "+n.type(c).toLowerCase()+") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a "+n.type(c).toLowerCase(),void 0,v);var K=Object.keys(c),B=null,C=0;if(K.forEach(function($){var ee=new e(m);if(n.transferFlags(this,ee,!0),t(ee,"lockSsfi",!0),!P||K.length===1){ee.property($,c[$]);return}try{ee.property($,c[$])}catch(oe){if(!n.checkError.compatibleConstructor(oe,a))throw oe;B===null&&(B=oe),C++}},this),P&&K.length>1&&C===K.length)throw B;return}this.assert(N,"expected #{this} to "+T+"include "+n.inspect(c),"expected #{this} to not "+T+"include "+n.inspect(c))}e.addChainableMethod("include",u,s),e.addChainableMethod("contain",u,s),e.addChainableMethod("contains",u,s),e.addChainableMethod("includes",u,s),e.addProperty("ok",function(){this.assert(t(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")}),e.addProperty("true",function(){this.assert(t(this,"object")===!0,"expected #{this} to be true","expected #{this} to be false",!t(this,"negate"))}),e.addProperty("false",function(){this.assert(t(this,"object")===!1,"expected #{this} to be false","expected #{this} to be true",!!t(this,"negate"))}),e.addProperty("null",function(){this.assert(t(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null")}),e.addProperty("undefined",function(){this.assert(t(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined")}),e.addProperty("NaN",function(){this.assert(n.isNaN(t(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")});function d(){var c=t(this,"object");this.assert(c!=null,"expected #{this} to exist","expected #{this} to not exist")}e.addProperty("exist",d),e.addProperty("exists",d),e.addProperty("empty",function(){var c=t(this,"object"),h=t(this,"ssfi"),m=t(this,"message"),w;switch(m=m?m+": ":"",n.type(c).toLowerCase()){case"array":case"string":w=c.length;break;case"map":case"set":w=c.size;break;case"weakmap":case"weakset":throw new a(m+".empty was passed a weak collection",void 0,h);case"function":var S=m+".empty was passed a function "+n.getName(c);throw new a(S.trim(),void 0,h);default:if(c!==Object(c))throw new a(m+".empty was passed non-string primitive "+n.inspect(c),void 0,h);w=Object.keys(c).length}this.assert(w===0,"expected #{this} to be empty","expected #{this} not to be empty")});function g(){var c=t(this,"object"),h=n.type(c);this.assert(h==="Arguments","expected #{this} to be arguments but got "+h,"expected #{this} to not be arguments")}e.addProperty("arguments",g),e.addProperty("Arguments",g);function D(c,h){h&&t(this,"message",h);var m=t(this,"object");if(t(this,"deep")){var w=t(this,"lockSsfi");t(this,"lockSsfi",!0),this.eql(c),t(this,"lockSsfi",w)}else this.assert(c===m,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",c,this._obj,!0)}e.addMethod("equal",D),e.addMethod("equals",D),e.addMethod("eq",D);function V(c,h){h&&t(this,"message",h),this.assert(n.eql(c,t(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",c,this._obj,!0)}e.addMethod("eql",V),e.addMethod("eqls",V);function R(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=t(this,"doLength"),S=t(this,"message"),P=S?S+": ":"",v=t(this,"ssfi"),y=n.type(m).toLowerCase(),T=n.type(c).toLowerCase(),N,F=!0;if(w&&y!=="map"&&y!=="set"&&new e(m,S,v,!0).to.have.property("length"),!w&&y==="date"&&T!=="date")N=P+"the argument to above must be a date";else if(T!=="number"&&(w||y==="number"))N=P+"the argument to above must be a number";else if(!w&&y!=="date"&&y!=="number"){var K=y==="string"?"'"+m+"'":m;N=P+"expected "+K+" to be a number or a date"}else F=!1;if(F)throw new a(N,void 0,v);if(w){var B="length",C;y==="map"||y==="set"?(B="size",C=m.size):C=m.length,this.assert(C>c,"expected #{this} to have a "+B+" above #{exp} but got #{act}","expected #{this} to not have a "+B+" above #{exp}",c,C)}else this.assert(m>c,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",c)}e.addMethod("above",R),e.addMethod("gt",R),e.addMethod("greaterThan",R);function M(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=t(this,"doLength"),S=t(this,"message"),P=S?S+": ":"",v=t(this,"ssfi"),y=n.type(m).toLowerCase(),T=n.type(c).toLowerCase(),N,F=!0;if(w&&y!=="map"&&y!=="set"&&new e(m,S,v,!0).to.have.property("length"),!w&&y==="date"&&T!=="date")N=P+"the argument to least must be a date";else if(T!=="number"&&(w||y==="number"))N=P+"the argument to least must be a number";else if(!w&&y!=="date"&&y!=="number"){var K=y==="string"?"'"+m+"'":m;N=P+"expected "+K+" to be a number or a date"}else F=!1;if(F)throw new a(N,void 0,v);if(w){var B="length",C;y==="map"||y==="set"?(B="size",C=m.size):C=m.length,this.assert(C>=c,"expected #{this} to have a "+B+" at least #{exp} but got #{act}","expected #{this} to have a "+B+" below #{exp}",c,C)}else this.assert(m>=c,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",c)}e.addMethod("least",M),e.addMethod("gte",M),e.addMethod("greaterThanOrEqual",M);function x(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=t(this,"doLength"),S=t(this,"message"),P=S?S+": ":"",v=t(this,"ssfi"),y=n.type(m).toLowerCase(),T=n.type(c).toLowerCase(),N,F=!0;if(w&&y!=="map"&&y!=="set"&&new e(m,S,v,!0).to.have.property("length"),!w&&y==="date"&&T!=="date")N=P+"the argument to below must be a date";else if(T!=="number"&&(w||y==="number"))N=P+"the argument to below must be a number";else if(!w&&y!=="date"&&y!=="number"){var K=y==="string"?"'"+m+"'":m;N=P+"expected "+K+" to be a number or a date"}else F=!1;if(F)throw new a(N,void 0,v);if(w){var B="length",C;y==="map"||y==="set"?(B="size",C=m.size):C=m.length,this.assert(C<c,"expected #{this} to have a "+B+" below #{exp} but got #{act}","expected #{this} to not have a "+B+" below #{exp}",c,C)}else this.assert(m<c,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",c)}e.addMethod("below",x),e.addMethod("lt",x),e.addMethod("lessThan",x);function j(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=t(this,"doLength"),S=t(this,"message"),P=S?S+": ":"",v=t(this,"ssfi"),y=n.type(m).toLowerCase(),T=n.type(c).toLowerCase(),N,F=!0;if(w&&y!=="map"&&y!=="set"&&new e(m,S,v,!0).to.have.property("length"),!w&&y==="date"&&T!=="date")N=P+"the argument to most must be a date";else if(T!=="number"&&(w||y==="number"))N=P+"the argument to most must be a number";else if(!w&&y!=="date"&&y!=="number"){var K=y==="string"?"'"+m+"'":m;N=P+"expected "+K+" to be a number or a date"}else F=!1;if(F)throw new a(N,void 0,v);if(w){var B="length",C;y==="map"||y==="set"?(B="size",C=m.size):C=m.length,this.assert(C<=c,"expected #{this} to have a "+B+" at most #{exp} but got #{act}","expected #{this} to have a "+B+" above #{exp}",c,C)}else this.assert(m<=c,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",c)}e.addMethod("most",j),e.addMethod("lte",j),e.addMethod("lessThanOrEqual",j),e.addMethod("within",function(c,h,m){m&&t(this,"message",m);var w=t(this,"object"),S=t(this,"doLength"),P=t(this,"message"),v=P?P+": ":"",y=t(this,"ssfi"),T=n.type(w).toLowerCase(),N=n.type(c).toLowerCase(),F=n.type(h).toLowerCase(),K,B=!0,C=N==="date"&&F==="date"?c.toISOString()+".."+h.toISOString():c+".."+h;if(S&&T!=="map"&&T!=="set"&&new e(w,P,y,!0).to.have.property("length"),!S&&T==="date"&&(N!=="date"||F!=="date"))K=v+"the arguments to within must be dates";else if((N!=="number"||F!=="number")&&(S||T==="number"))K=v+"the arguments to within must be numbers";else if(!S&&T!=="date"&&T!=="number"){var $=T==="string"?"'"+w+"'":w;K=v+"expected "+$+" to be a number or a date"}else B=!1;if(B)throw new a(K,void 0,y);if(S){var ee="length",oe;T==="map"||T==="set"?(ee="size",oe=w.size):oe=w.length,this.assert(oe>=c&&oe<=h,"expected #{this} to have a "+ee+" within "+C,"expected #{this} to not have a "+ee+" within "+C)}else this.assert(w>=c&&w<=h,"expected #{this} to be within "+C,"expected #{this} to not be within "+C)});function k(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=t(this,"ssfi"),S=t(this,"message");try{var P=m instanceof c}catch(y){throw y instanceof TypeError?(S=S?S+": ":"",new a(S+"The instanceof assertion needs a constructor but "+n.type(c)+" was given.",void 0,w)):y}var v=n.getName(c);v===null&&(v="an unnamed constructor"),this.assert(P,"expected #{this} to be an instance of "+v,"expected #{this} to not be an instance of "+v)}e.addMethod("instanceof",k),e.addMethod("instanceOf",k);function U(c,h,m){m&&t(this,"message",m);var w=t(this,"nested"),S=t(this,"own"),P=t(this,"message"),v=t(this,"object"),y=t(this,"ssfi"),T=typeof c;if(P=P?P+": ":"",w){if(T!=="string")throw new a(P+"the argument to property must be a string when using nested syntax",void 0,y)}else if(T!=="string"&&T!=="number"&&T!=="symbol")throw new a(P+"the argument to property must be a string, number, or symbol",void 0,y);if(w&&S)throw new a(P+'The "nested" and "own" flags cannot be combined.',void 0,y);if(v==null)throw new a(P+"Target cannot be null or undefined.",void 0,y);var N=t(this,"deep"),F=t(this,"negate"),K=w?n.getPathInfo(v,c):null,B=w?K.value:v[c],C="";N&&(C+="deep "),S&&(C+="own "),w&&(C+="nested "),C+="property ";var $;S?$=Object.prototype.hasOwnProperty.call(v,c):w?$=K.exists:$=n.hasProperty(v,c),(!F||arguments.length===1)&&this.assert($,"expected #{this} to have "+C+n.inspect(c),"expected #{this} to not have "+C+n.inspect(c)),arguments.length>1&&this.assert($&&(N?n.eql(h,B):h===B),"expected #{this} to have "+C+n.inspect(c)+" of #{exp}, but got #{act}","expected #{this} to not have "+C+n.inspect(c)+" of #{act}",h,B),t(this,"object",B)}e.addMethod("property",U);function G(c,h,m){t(this,"own",!0),U.apply(this,arguments)}e.addMethod("ownProperty",G),e.addMethod("haveOwnProperty",G);function Y(c,h,m){typeof h=="string"&&(m=h,h=null),m&&t(this,"message",m);var w=t(this,"object"),S=Object.getOwnPropertyDescriptor(Object(w),c);S&&h?this.assert(n.eql(h,S),"expected the own property descriptor for "+n.inspect(c)+" on #{this} to match "+n.inspect(h)+", got "+n.inspect(S),"expected the own property descriptor for "+n.inspect(c)+" on #{this} to not match "+n.inspect(h),h,S,!0):this.assert(S,"expected #{this} to have an own property descriptor for "+n.inspect(c),"expected #{this} to not have an own property descriptor for "+n.inspect(c)),t(this,"object",S)}e.addMethod("ownPropertyDescriptor",Y),e.addMethod("haveOwnPropertyDescriptor",Y);function p(){t(this,"doLength",!0)}function A(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=n.type(m).toLowerCase(),S=t(this,"message"),P=t(this,"ssfi"),v="length",y;switch(w){case"map":case"set":v="size",y=m.size;break;default:new e(m,S,P,!0).to.have.property("length"),y=m.length}this.assert(y==c,"expected #{this} to have a "+v+" of #{exp} but got #{act}","expected #{this} to not have a "+v+" of #{act}",c,y)}e.addChainableMethod("length",A,p),e.addChainableMethod("lengthOf",A,p);function q(c,h){h&&t(this,"message",h);var m=t(this,"object");this.assert(c.exec(m),"expected #{this} to match "+c,"expected #{this} not to match "+c)}e.addMethod("match",q),e.addMethod("matches",q),e.addMethod("string",function(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=t(this,"message"),S=t(this,"ssfi");new e(m,w,S,!0).is.a("string"),this.assert(~m.indexOf(c),"expected #{this} to contain "+n.inspect(c),"expected #{this} to not contain "+n.inspect(c))});function z(c){var h=t(this,"object"),m=n.type(h),w=n.type(c),S=t(this,"ssfi"),P=t(this,"deep"),v,y="",T,N=!0,F=t(this,"message");F=F?F+": ":"";var K=F+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(m==="Map"||m==="Set")y=P?"deeply ":"",T=[],h.forEach(function(te,we){T.push(we)}),w!=="Array"&&(c=Array.prototype.slice.call(arguments));else{switch(T=n.getOwnEnumerableProperties(h),w){case"Array":if(arguments.length>1)throw new a(K,void 0,S);break;case"Object":if(arguments.length>1)throw new a(K,void 0,S);c=Object.keys(c);break;default:c=Array.prototype.slice.call(arguments)}c=c.map(function(te){return typeof te=="symbol"?te:String(te)})}if(!c.length)throw new a(F+"keys required",void 0,S);var B=c.length,C=t(this,"any"),$=t(this,"all"),ee=c;if(!C&&!$&&($=!0),C&&(N=ee.some(function(te){return T.some(function(we){return P?n.eql(te,we):te===we})})),$&&(N=ee.every(function(te){return T.some(function(we){return P?n.eql(te,we):te===we})}),t(this,"contains")||(N=N&&c.length==T.length)),B>1){c=c.map(function(te){return n.inspect(te)});var oe=c.pop();$&&(v=c.join(", ")+", and "+oe),C&&(v=c.join(", ")+", or "+oe)}else v=n.inspect(c[0]);v=(B>1?"keys ":"key ")+v,v=(t(this,"contains")?"contain ":"have ")+v,this.assert(N,"expected #{this} to "+y+v,"expected #{this} to not "+y+v,ee.slice(0).sort(n.compareByInspect),T.sort(n.compareByInspect),!0)}e.addMethod("keys",z),e.addMethod("key",z);function H(c,h,m){m&&t(this,"message",m);var w=t(this,"object"),S=t(this,"ssfi"),P=t(this,"message"),v=t(this,"negate")||!1;new e(w,P,S,!0).is.a("function"),(c instanceof RegExp||typeof c=="string")&&(h=c,c=null);var y;try{w()}catch(te){y=te}var T=c===void 0&&h===void 0,N=Boolean(c&&h),F=!1,K=!1;if(T||!T&&!v){var B="an error";c instanceof Error?B="#{exp}":c&&(B=n.checkError.getConstructorName(c)),this.assert(y,"expected #{this} to throw "+B,"expected #{this} to not throw an error but #{act} was thrown",c&&c.toString(),y instanceof Error?y.toString():typeof y=="string"?y:y&&n.checkError.getConstructorName(y))}if(c&&y){if(c instanceof Error){var C=n.checkError.compatibleInstance(y,c);C===v&&(N&&v?F=!0:this.assert(v,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(y&&!v?" but #{act} was thrown":""),c.toString(),y.toString()))}var $=n.checkError.compatibleConstructor(y,c);$===v&&(N&&v?F=!0:this.assert(v,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(y?" but #{act} was thrown":""),c instanceof Error?c.toString():c&&n.checkError.getConstructorName(c),y instanceof Error?y.toString():y&&n.checkError.getConstructorName(y)))}if(y&&h!==void 0&&h!==null){var ee="including";h instanceof RegExp&&(ee="matching");var oe=n.checkError.compatibleMessage(y,h);oe===v&&(N&&v?K=!0:this.assert(v,"expected #{this} to throw error "+ee+" #{exp} but got #{act}","expected #{this} to throw error not "+ee+" #{exp}",h,n.checkError.getMessage(y)))}F&&K&&this.assert(v,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(y?" but #{act} was thrown":""),c instanceof Error?c.toString():c&&n.checkError.getConstructorName(c),y instanceof Error?y.toString():y&&n.checkError.getConstructorName(y)),t(this,"object",y)}e.addMethod("throw",H),e.addMethod("throws",H),e.addMethod("Throw",H);function be(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=t(this,"itself"),S=typeof m=="function"&&!w?m.prototype[c]:m[c];this.assert(typeof S=="function","expected #{this} to respond to "+n.inspect(c),"expected #{this} to not respond to "+n.inspect(c))}e.addMethod("respondTo",be),e.addMethod("respondsTo",be),e.addProperty("itself",function(){t(this,"itself",!0)});function re(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=c(m);this.assert(w,"expected #{this} to satisfy "+n.objDisplay(c),"expected #{this} to not satisfy"+n.objDisplay(c),!t(this,"negate"),w)}e.addMethod("satisfy",re),e.addMethod("satisfies",re);function _e(c,h,m){m&&t(this,"message",m);var w=t(this,"object"),S=t(this,"message"),P=t(this,"ssfi");if(new e(w,S,P,!0).is.a("number"),typeof c!="number"||typeof h!="number"){S=S?S+": ":"";var v=h===void 0?", and a delta is required":"";throw new a(S+"the arguments to closeTo or approximately must be numbers"+v,void 0,P)}this.assert(Math.abs(w-c)<=h,"expected #{this} to be close to "+c+" +/- "+h,"expected #{this} not to be close to "+c+" +/- "+h)}e.addMethod("closeTo",_e),e.addMethod("approximately",_e);function se(c,h,m,w,S){if(!w){if(c.length!==h.length)return!1;h=h.slice()}return c.every(function(P,v){if(S)return m?m(P,h[v]):P===h[v];if(!m){var y=h.indexOf(P);return y===-1?!1:(w||h.splice(y,1),!0)}return h.some(function(T,N){return m(P,T)?(w||h.splice(N,1),!0):!1})})}e.addMethod("members",function(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=t(this,"message"),S=t(this,"ssfi");new e(m,w,S,!0).to.be.an("array"),new e(c,w,S,!0).to.be.an("array");var P=t(this,"contains"),v=t(this,"ordered"),y,T,N;P?(y=v?"an ordered superset":"a superset",T="expected #{this} to be "+y+" of #{exp}",N="expected #{this} to not be "+y+" of #{exp}"):(y=v?"ordered members":"members",T="expected #{this} to have the same "+y+" as #{exp}",N="expected #{this} to not have the same "+y+" as #{exp}");var F=t(this,"deep")?n.eql:void 0;this.assert(se(c,m,F,P,v),T,N,c,m,!0)});function me(c,h){h&&t(this,"message",h);var m=t(this,"object"),w=t(this,"message"),S=t(this,"ssfi"),P=t(this,"contains"),v=t(this,"deep");new e(c,w,S,!0).to.be.an("array"),P?this.assert(c.some(function(y){return m.indexOf(y)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",c,m):v?this.assert(c.some(function(y){return n.eql(m,y)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",c,m):this.assert(c.indexOf(m)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",c,m)}e.addMethod("oneOf",me);function ce(c,h,m){m&&t(this,"message",m);var w=t(this,"object"),S=t(this,"message"),P=t(this,"ssfi");new e(w,S,P,!0).is.a("function");var v;h?(new e(c,S,P,!0).to.have.property(h),v=c[h]):(new e(c,S,P,!0).is.a("function"),v=c()),w();var y=h==null?c():c[h],T=h==null?v:"."+h;t(this,"deltaMsgObj",T),t(this,"initialDeltaValue",v),t(this,"finalDeltaValue",y),t(this,"deltaBehavior","change"),t(this,"realDelta",y!==v),this.assert(v!==y,"expected "+T+" to change","expected "+T+" to not change")}e.addMethod("change",ce),e.addMethod("changes",ce);function je(c,h,m){m&&t(this,"message",m);var w=t(this,"object"),S=t(this,"message"),P=t(this,"ssfi");new e(w,S,P,!0).is.a("function");var v;h?(new e(c,S,P,!0).to.have.property(h),v=c[h]):(new e(c,S,P,!0).is.a("function"),v=c()),new e(v,S,P,!0).is.a("number"),w();var y=h==null?c():c[h],T=h==null?v:"."+h;t(this,"deltaMsgObj",T),t(this,"initialDeltaValue",v),t(this,"finalDeltaValue",y),t(this,"deltaBehavior","increase"),t(this,"realDelta",y-v),this.assert(y-v>0,"expected "+T+" to increase","expected "+T+" to not increase")}e.addMethod("increase",je),e.addMethod("increases",je);function ft(c,h,m){m&&t(this,"message",m);var w=t(this,"object"),S=t(this,"message"),P=t(this,"ssfi");new e(w,S,P,!0).is.a("function");var v;h?(new e(c,S,P,!0).to.have.property(h),v=c[h]):(new e(c,S,P,!0).is.a("function"),v=c()),new e(v,S,P,!0).is.a("number"),w();var y=h==null?c():c[h],T=h==null?v:"."+h;t(this,"deltaMsgObj",T),t(this,"initialDeltaValue",v),t(this,"finalDeltaValue",y),t(this,"deltaBehavior","decrease"),t(this,"realDelta",v-y),this.assert(y-v<0,"expected "+T+" to decrease","expected "+T+" to not decrease")}e.addMethod("decrease",ft),e.addMethod("decreases",ft);function Et(c,h){h&&t(this,"message",h);var m=t(this,"deltaMsgObj"),w=t(this,"initialDeltaValue"),S=t(this,"finalDeltaValue"),P=t(this,"deltaBehavior"),v=t(this,"realDelta"),y;P==="change"?y=Math.abs(S-w)===Math.abs(c):y=v===Math.abs(c),this.assert(y,"expected "+m+" to "+P+" by "+c,"expected "+m+" to not "+P+" by "+c)}e.addMethod("by",Et),e.addProperty("extensible",function(){var c=t(this,"object"),h=c===Object(c)&&Object.isExtensible(c);this.assert(h,"expected #{this} to be extensible","expected #{this} to not be extensible")}),e.addProperty("sealed",function(){var c=t(this,"object"),h=c===Object(c)?Object.isSealed(c):!0;this.assert(h,"expected #{this} to be sealed","expected #{this} to not be sealed")}),e.addProperty("frozen",function(){var c=t(this,"object"),h=c===Object(c)?Object.isFrozen(c):!0;this.assert(h,"expected #{this} to be frozen","expected #{this} to not be frozen")}),e.addProperty("finite",function(c){var h=t(this,"object");this.assert(typeof h=="number"&&isFinite(h),"expected #{this} to be a finite number","expected #{this} to not be a finite number")})}});var fo=I((Qu,co)=>{co.exports=function(r,n){r.expect=function(e,a){return new r.Assertion(e,a)},r.expect.fail=function(e,a,t,i){throw arguments.length<2&&(t=e,e=void 0),t=t||"expect.fail()",new r.AssertionError(t,{actual:e,expected:a,operator:i},r.expect.fail)}}});var ho=I((Zu,lo)=>{lo.exports=function(r,n){var e=r.Assertion;function a(){function t(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol=="function"&&this instanceof Symbol||typeof BigInt=="function"&&this instanceof BigInt?new e(this.valueOf(),null,t):new e(this,null,t)}function i(s){Object.defineProperty(this,"should",{value:s,enumerable:!0,configurable:!0,writable:!0})}Object.defineProperty(Object.prototype,"should",{set:i,get:t,configurable:!0});var o={};return o.fail=function(s,u,d,g){throw arguments.length<2&&(d=s,s=void 0),d=d||"should.fail()",new r.AssertionError(d,{actual:s,expected:u,operator:g},o.fail)},o.equal=function(s,u,d){new e(s,d).to.equal(u)},o.Throw=function(s,u,d,g){new e(s,g).to.Throw(u,d)},o.exist=function(s,u){new e(s,u).to.exist},o.not={},o.not.equal=function(s,u,d){new e(s,d).to.not.equal(u)},o.not.Throw=function(s,u,d,g){new e(s,g).to.not.Throw(u,d)},o.not.exist=function(s,u){new e(s,u).to.not.exist},o.throw=o.Throw,o.not.throw=o.not.Throw,o}r.should=a,r.Should=a}});var yo=I((Xu,po)=>{po.exports=function(r,n){var e=r.Assertion,a=n.flag;var t=r.assert=function(i,o){var s=new e(null,null,r.assert,!0);s.assert(i,o,"[ negation message unavailable ]")};t.fail=function(i,o,s,u){throw arguments.length<2&&(s=i,i=void 0),s=s||"assert.fail()",new r.AssertionError(s,{actual:i,expected:o,operator:u},t.fail)},t.isOk=function(i,o){new e(i,o,t.isOk,!0).is.ok},t.isNotOk=function(i,o){new e(i,o,t.isNotOk,!0).is.not.ok},t.equal=function(i,o,s){var u=new e(i,s,t.equal,!0);u.assert(o==a(u,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",o,i,!0)},t.notEqual=function(i,o,s){var u=new e(i,s,t.notEqual,!0);u.assert(o!=a(u,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",o,i,!0)},t.strictEqual=function(i,o,s){new e(i,s,t.strictEqual,!0).to.equal(o)},t.notStrictEqual=function(i,o,s){new e(i,s,t.notStrictEqual,!0).to.not.equal(o)},t.deepEqual=t.deepStrictEqual=function(i,o,s){new e(i,s,t.deepEqual,!0).to.eql(o)},t.notDeepEqual=function(i,o,s){new e(i,s,t.notDeepEqual,!0).to.not.eql(o)},t.isAbove=function(i,o,s){new e(i,s,t.isAbove,!0).to.be.above(o)},t.isAtLeast=function(i,o,s){new e(i,s,t.isAtLeast,!0).to.be.least(o)},t.isBelow=function(i,o,s){new e(i,s,t.isBelow,!0).to.be.below(o)},t.isAtMost=function(i,o,s){new e(i,s,t.isAtMost,!0).to.be.most(o)},t.isTrue=function(i,o){new e(i,o,t.isTrue,!0).is.true},t.isNotTrue=function(i,o){new e(i,o,t.isNotTrue,!0).to.not.equal(!0)},t.isFalse=function(i,o){new e(i,o,t.isFalse,!0).is.false},t.isNotFalse=function(i,o){new e(i,o,t.isNotFalse,!0).to.not.equal(!1)},t.isNull=function(i,o){new e(i,o,t.isNull,!0).to.equal(null)},t.isNotNull=function(i,o){new e(i,o,t.isNotNull,!0).to.not.equal(null)},t.isNaN=function(i,o){new e(i,o,t.isNaN,!0).to.be.NaN},t.isNotNaN=function(i,o){new e(i,o,t.isNotNaN,!0).not.to.be.NaN},t.exists=function(i,o){new e(i,o,t.exists,!0).to.exist},t.notExists=function(i,o){new e(i,o,t.notExists,!0).to.not.exist},t.isUndefined=function(i,o){new e(i,o,t.isUndefined,!0).to.equal(void 0)},t.isDefined=function(i,o){new e(i,o,t.isDefined,!0).to.not.equal(void 0)},t.isFunction=function(i,o){new e(i,o,t.isFunction,!0).to.be.a("function")},t.isNotFunction=function(i,o){new e(i,o,t.isNotFunction,!0).to.not.be.a("function")},t.isObject=function(i,o){new e(i,o,t.isObject,!0).to.be.a("object")},t.isNotObject=function(i,o){new e(i,o,t.isNotObject,!0).to.not.be.a("object")},t.isArray=function(i,o){new e(i,o,t.isArray,!0).to.be.an("array")},t.isNotArray=function(i,o){new e(i,o,t.isNotArray,!0).to.not.be.an("array")},t.isString=function(i,o){new e(i,o,t.isString,!0).to.be.a("string")},t.isNotString=function(i,o){new e(i,o,t.isNotString,!0).to.not.be.a("string")},t.isNumber=function(i,o){new e(i,o,t.isNumber,!0).to.be.a("number")},t.isNotNumber=function(i,o){new e(i,o,t.isNotNumber,!0).to.not.be.a("number")},t.isFinite=function(i,o){new e(i,o,t.isFinite,!0).to.be.finite},t.isBoolean=function(i,o){new e(i,o,t.isBoolean,!0).to.be.a("boolean")},t.isNotBoolean=function(i,o){new e(i,o,t.isNotBoolean,!0).to.not.be.a("boolean")},t.typeOf=function(i,o,s){new e(i,s,t.typeOf,!0).to.be.a(o)},t.notTypeOf=function(i,o,s){new e(i,s,t.notTypeOf,!0).to.not.be.a(o)},t.instanceOf=function(i,o,s){new e(i,s,t.instanceOf,!0).to.be.instanceOf(o)},t.notInstanceOf=function(i,o,s){new e(i,s,t.notInstanceOf,!0).to.not.be.instanceOf(o)},t.include=function(i,o,s){new e(i,s,t.include,!0).include(o)},t.notInclude=function(i,o,s){new e(i,s,t.notInclude,!0).not.include(o)},t.deepInclude=function(i,o,s){new e(i,s,t.deepInclude,!0).deep.include(o)},t.notDeepInclude=function(i,o,s){new e(i,s,t.notDeepInclude,!0).not.deep.include(o)},t.nestedInclude=function(i,o,s){new e(i,s,t.nestedInclude,!0).nested.include(o)},t.notNestedInclude=function(i,o,s){new e(i,s,t.notNestedInclude,!0).not.nested.include(o)},t.deepNestedInclude=function(i,o,s){new e(i,s,t.deepNestedInclude,!0).deep.nested.include(o)},t.notDeepNestedInclude=function(i,o,s){new e(i,s,t.notDeepNestedInclude,!0).not.deep.nested.include(o)},t.ownInclude=function(i,o,s){new e(i,s,t.ownInclude,!0).own.include(o)},t.notOwnInclude=function(i,o,s){new e(i,s,t.notOwnInclude,!0).not.own.include(o)},t.deepOwnInclude=function(i,o,s){new e(i,s,t.deepOwnInclude,!0).deep.own.include(o)},t.notDeepOwnInclude=function(i,o,s){new e(i,s,t.notDeepOwnInclude,!0).not.deep.own.include(o)},t.match=function(i,o,s){new e(i,s,t.match,!0).to.match(o)},t.notMatch=function(i,o,s){new e(i,s,t.notMatch,!0).to.not.match(o)},t.property=function(i,o,s){new e(i,s,t.property,!0).to.have.property(o)},t.notProperty=function(i,o,s){new e(i,s,t.notProperty,!0).to.not.have.property(o)},t.propertyVal=function(i,o,s,u){new e(i,u,t.propertyVal,!0).to.have.property(o,s)},t.notPropertyVal=function(i,o,s,u){new e(i,u,t.notPropertyVal,!0).to.not.have.property(o,s)},t.deepPropertyVal=function(i,o,s,u){new e(i,u,t.deepPropertyVal,!0).to.have.deep.property(o,s)},t.notDeepPropertyVal=function(i,o,s,u){new e(i,u,t.notDeepPropertyVal,!0).to.not.have.deep.property(o,s)},t.ownProperty=function(i,o,s){new e(i,s,t.ownProperty,!0).to.have.own.property(o)},t.notOwnProperty=function(i,o,s){new e(i,s,t.notOwnProperty,!0).to.not.have.own.property(o)},t.ownPropertyVal=function(i,o,s,u){new e(i,u,t.ownPropertyVal,!0).to.have.own.property(o,s)},t.notOwnPropertyVal=function(i,o,s,u){new e(i,u,t.notOwnPropertyVal,!0).to.not.have.own.property(o,s)},t.deepOwnPropertyVal=function(i,o,s,u){new e(i,u,t.deepOwnPropertyVal,!0).to.have.deep.own.property(o,s)},t.notDeepOwnPropertyVal=function(i,o,s,u){new e(i,u,t.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(o,s)},t.nestedProperty=function(i,o,s){new e(i,s,t.nestedProperty,!0).to.have.nested.property(o)},t.notNestedProperty=function(i,o,s){new e(i,s,t.notNestedProperty,!0).to.not.have.nested.property(o)},t.nestedPropertyVal=function(i,o,s,u){new e(i,u,t.nestedPropertyVal,!0).to.have.nested.property(o,s)},t.notNestedPropertyVal=function(i,o,s,u){new e(i,u,t.notNestedPropertyVal,!0).to.not.have.nested.property(o,s)},t.deepNestedPropertyVal=function(i,o,s,u){new e(i,u,t.deepNestedPropertyVal,!0).to.have.deep.nested.property(o,s)},t.notDeepNestedPropertyVal=function(i,o,s,u){new e(i,u,t.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(o,s)},t.lengthOf=function(i,o,s){new e(i,s,t.lengthOf,!0).to.have.lengthOf(o)},t.hasAnyKeys=function(i,o,s){new e(i,s,t.hasAnyKeys,!0).to.have.any.keys(o)},t.hasAllKeys=function(i,o,s){new e(i,s,t.hasAllKeys,!0).to.have.all.keys(o)},t.containsAllKeys=function(i,o,s){new e(i,s,t.containsAllKeys,!0).to.contain.all.keys(o)},t.doesNotHaveAnyKeys=function(i,o,s){new e(i,s,t.doesNotHaveAnyKeys,!0).to.not.have.any.keys(o)},t.doesNotHaveAllKeys=function(i,o,s){new e(i,s,t.doesNotHaveAllKeys,!0).to.not.have.all.keys(o)},t.hasAnyDeepKeys=function(i,o,s){new e(i,s,t.hasAnyDeepKeys,!0).to.have.any.deep.keys(o)},t.hasAllDeepKeys=function(i,o,s){new e(i,s,t.hasAllDeepKeys,!0).to.have.all.deep.keys(o)},t.containsAllDeepKeys=function(i,o,s){new e(i,s,t.containsAllDeepKeys,!0).to.contain.all.deep.keys(o)},t.doesNotHaveAnyDeepKeys=function(i,o,s){new e(i,s,t.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(o)},t.doesNotHaveAllDeepKeys=function(i,o,s){new e(i,s,t.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(o)},t.throws=function(i,o,s,u){(typeof o=="string"||o instanceof RegExp)&&(s=o,o=null);var d=new e(i,u,t.throws,!0).to.throw(o,s);return a(d,"object")},t.doesNotThrow=function(i,o,s,u){(typeof o=="string"||o instanceof RegExp)&&(s=o,o=null),new e(i,u,t.doesNotThrow,!0).to.not.throw(o,s)},t.operator=function(i,o,s,u){var d;switch(o){case"==":d=i==s;break;case"===":d=i===s;break;case">":d=i>s;break;case">=":d=i>=s;break;case"<":d=i<s;break;case"<=":d=i<=s;break;case"!=":d=i!=s;break;case"!==":d=i!==s;break;default:throw u=u&&u+": ",new r.AssertionError(u+'Invalid operator "'+o+'"',void 0,t.operator)}var g=new e(d,u,t.operator,!0);g.assert(a(g,"object")===!0,"expected "+n.inspect(i)+" to be "+o+" "+n.inspect(s),"expected "+n.inspect(i)+" to not be "+o+" "+n.inspect(s))},t.closeTo=function(i,o,s,u){new e(i,u,t.closeTo,!0).to.be.closeTo(o,s)},t.approximately=function(i,o,s,u){new e(i,u,t.approximately,!0).to.be.approximately(o,s)},t.sameMembers=function(i,o,s){new e(i,s,t.sameMembers,!0).to.have.same.members(o)},t.notSameMembers=function(i,o,s){new e(i,s,t.notSameMembers,!0).to.not.have.same.members(o)},t.sameDeepMembers=function(i,o,s){new e(i,s,t.sameDeepMembers,!0).to.have.same.deep.members(o)},t.notSameDeepMembers=function(i,o,s){new e(i,s,t.notSameDeepMembers,!0).to.not.have.same.deep.members(o)},t.sameOrderedMembers=function(i,o,s){new e(i,s,t.sameOrderedMembers,!0).to.have.same.ordered.members(o)},t.notSameOrderedMembers=function(i,o,s){new e(i,s,t.notSameOrderedMembers,!0).to.not.have.same.ordered.members(o)},t.sameDeepOrderedMembers=function(i,o,s){new e(i,s,t.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(o)},t.notSameDeepOrderedMembers=function(i,o,s){new e(i,s,t.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(o)},t.includeMembers=function(i,o,s){new e(i,s,t.includeMembers,!0).to.include.members(o)},t.notIncludeMembers=function(i,o,s){new e(i,s,t.notIncludeMembers,!0).to.not.include.members(o)},t.includeDeepMembers=function(i,o,s){new e(i,s,t.includeDeepMembers,!0).to.include.deep.members(o)},t.notIncludeDeepMembers=function(i,o,s){new e(i,s,t.notIncludeDeepMembers,!0).to.not.include.deep.members(o)},t.includeOrderedMembers=function(i,o,s){new e(i,s,t.includeOrderedMembers,!0).to.include.ordered.members(o)},t.notIncludeOrderedMembers=function(i,o,s){new e(i,s,t.notIncludeOrderedMembers,!0).to.not.include.ordered.members(o)},t.includeDeepOrderedMembers=function(i,o,s){new e(i,s,t.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(o)},t.notIncludeDeepOrderedMembers=function(i,o,s){new e(i,s,t.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(o)},t.oneOf=function(i,o,s){new e(i,s,t.oneOf,!0).to.be.oneOf(o)},t.changes=function(i,o,s,u){arguments.length===3&&typeof o=="function"&&(u=s,s=null),new e(i,u,t.changes,!0).to.change(o,s)},t.changesBy=function(i,o,s,u,d){if(arguments.length===4&&typeof o=="function"){var g=u;u=s,d=g}else arguments.length===3&&(u=s,s=null);new e(i,d,t.changesBy,!0).to.change(o,s).by(u)},t.doesNotChange=function(i,o,s,u){return arguments.length===3&&typeof o=="function"&&(u=s,s=null),new e(i,u,t.doesNotChange,!0).to.not.change(o,s)},t.changesButNotBy=function(i,o,s,u,d){if(arguments.length===4&&typeof o=="function"){var g=u;u=s,d=g}else arguments.length===3&&(u=s,s=null);new e(i,d,t.changesButNotBy,!0).to.change(o,s).but.not.by(u)},t.increases=function(i,o,s,u){return arguments.length===3&&typeof o=="function"&&(u=s,s=null),new e(i,u,t.increases,!0).to.increase(o,s)},t.increasesBy=function(i,o,s,u,d){if(arguments.length===4&&typeof o=="function"){var g=u;u=s,d=g}else arguments.length===3&&(u=s,s=null);new e(i,d,t.increasesBy,!0).to.increase(o,s).by(u)},t.doesNotIncrease=function(i,o,s,u){return arguments.length===3&&typeof o=="function"&&(u=s,s=null),new e(i,u,t.doesNotIncrease,!0).to.not.increase(o,s)},t.increasesButNotBy=function(i,o,s,u,d){if(arguments.length===4&&typeof o=="function"){var g=u;u=s,d=g}else arguments.length===3&&(u=s,s=null);new e(i,d,t.increasesButNotBy,!0).to.increase(o,s).but.not.by(u)},t.decreases=function(i,o,s,u){return arguments.length===3&&typeof o=="function"&&(u=s,s=null),new e(i,u,t.decreases,!0).to.decrease(o,s)},t.decreasesBy=function(i,o,s,u,d){if(arguments.length===4&&typeof o=="function"){var g=u;u=s,d=g}else arguments.length===3&&(u=s,s=null);new e(i,d,t.decreasesBy,!0).to.decrease(o,s).by(u)},t.doesNotDecrease=function(i,o,s,u){return arguments.length===3&&typeof o=="function"&&(u=s,s=null),new e(i,u,t.doesNotDecrease,!0).to.not.decrease(o,s)},t.doesNotDecreaseBy=function(i,o,s,u,d){if(arguments.length===4&&typeof o=="function"){var g=u;u=s,d=g}else arguments.length===3&&(u=s,s=null);return new e(i,d,t.doesNotDecreaseBy,!0).to.not.decrease(o,s).by(u)},t.decreasesButNotBy=function(i,o,s,u,d){if(arguments.length===4&&typeof o=="function"){var g=u;u=s,d=g}else arguments.length===3&&(u=s,s=null);new e(i,d,t.decreasesButNotBy,!0).to.decrease(o,s).but.not.by(u)};t.ifError=function(i){if(i)throw i},t.isExtensible=function(i,o){new e(i,o,t.isExtensible,!0).to.be.extensible},t.isNotExtensible=function(i,o){new e(i,o,t.isNotExtensible,!0).to.not.be.extensible},t.isSealed=function(i,o){new e(i,o,t.isSealed,!0).to.be.sealed},t.isNotSealed=function(i,o){new e(i,o,t.isNotSealed,!0).to.not.be.sealed},t.isFrozen=function(i,o){new e(i,o,t.isFrozen,!0).to.be.frozen},t.isNotFrozen=function(i,o){new e(i,o,t.isNotFrozen,!0).to.not.be.frozen},t.isEmpty=function(i,o){new e(i,o,t.isEmpty,!0).to.be.empty},t.isNotEmpty=function(i,o){new e(i,o,t.isNotEmpty,!0).to.not.be.empty};(function i(o,s){return t[s]=t[o],i})("isOk","ok")("isNotOk","notOk")("throws","throw")("throws","Throw")("isExtensible","extensible")("isNotExtensible","notExtensible")("isSealed","sealed")("isNotSealed","notSealed")("isFrozen","frozen")("isNotFrozen","notFrozen")("isEmpty","empty")("isNotEmpty","notEmpty")}});var Pe=I(ue=>{var mo=[];ue.version="4.3.3";ue.AssertionError=Ot();var bo=oo();ue.use=function(r){return~mo.indexOf(r)||(r(ue,bo),mo.push(r)),ue};ue.util=bo;var Ds=Ne();ue.config=Ds;var ks=so();ue.use(ks);var zs=uo();ue.use(zs);var _s=fo();ue.use(_s);var Bs=ho();ue.use(Bs);var Fs=yo();ue.use(Fs)});var wo=I((Hu,go)=>{go.exports=Pe()});var vo=I((lc,xe)=>{"use strict";var Ie=$t();xe.exports=(r,n)=>{let e=r.Assertion,a=r.assert,t=n.proxify;n.checkError&&(Ie=n.checkError);function i(p){return typeof p.catch!="function"&&typeof p.always=="function"&&typeof p.done=="function"&&typeof p.fail=="function"&&typeof p.pipe=="function"&&typeof p.progress=="function"&&typeof p.state=="function"}function o(p){if(typeof p._obj.then!="function")throw new TypeError(n.inspect(p._obj)+" is not a thenable.");if(i(p._obj))throw new TypeError("Chai as Promised is incompatible with thenables of jQuery<3.0.0, sorry! Please upgrade jQuery or use another Promises/A+ compatible library (see http://promisesaplus.com/).")}function s(p){return t===void 0?p:t(p)}function u(p,A){n.addMethod(e.prototype,p,function(){return o(this),A.apply(this,arguments)})}function d(p,A){n.addProperty(e.prototype,p,function(){return o(this),s(A.apply(this,arguments))})}function g(p,A){p.then(()=>A(),A)}function D(p,A,q){p.assert(!0,null,A,q.expected,q.actual)}function V(p,A,q){p.assert(!1,A,null,q.expected,q.actual)}function R(p){return typeof p.then=="function"?p:p._obj}function M(p){return p instanceof Error?p.toString():Ie.getConstructorName(p)}let x=Object.getOwnPropertyNames(e.prototype),j={};for(let p of x)j[p]=Object.getOwnPropertyDescriptor(e.prototype,p);d("fulfilled",function(){let p=R(this).then(A=>(D(this,"expected promise not to be fulfilled but it was fulfilled with #{act}",{actual:A}),A),A=>(V(this,"expected promise to be fulfilled but it was rejected with #{act}",{actual:M(A)}),A));return xe.exports.transferPromiseness(this,p),this}),d("rejected",function(){let p=R(this).then(A=>(V(this,"expected promise to be rejected but it was fulfilled with #{act}",{actual:A}),A),A=>(D(this,"expected promise not to be rejected but it was rejected with #{act}",{actual:M(A)}),A));return xe.exports.transferPromiseness(this,p),this}),u("rejectedWith",function(p,A,q){let z=null,H=n.flag(this,"negate")||!1;if(p===void 0&&A===void 0&&q===void 0)return this.rejected;q!==void 0&&n.flag(this,"message",q),p instanceof RegExp||typeof p=="string"?(A=p,p=null):p&&p instanceof Error?z=p.toString():typeof p=="function"?z=Ie.getConstructorName(p):p=null;let be=Boolean(p&&A),re="including";A instanceof RegExp&&(re="matching");let _e=R(this).then(se=>{let me=null,ce=null;return p?(me="expected promise to be rejected with #{exp} but it was fulfilled with #{act}",ce=z):A&&(me=`expected promise to be rejected with an error ${re} #{exp} but it was fulfilled with #{act}`,ce=A),V(this,me,{expected:ce,actual:se}),se},se=>{let me=p&&(p instanceof Error?Ie.compatibleInstance(se,p):Ie.compatibleConstructor(se,p)),ce=A&&Ie.compatibleMessage(se,A),je=M(se);return H&&be?me&&ce&&this.assert(!0,null,"expected promise not to be rejected with #{exp} but it was rejected with #{act}",z,je):(p&&this.assert(me,"expected promise to be rejected with #{exp} but it was rejected with #{act}","expected promise not to be rejected with #{exp} but it was rejected with #{act}",z,je),A&&this.assert(ce,`expected promise to be rejected with an error ${re} #{exp} but got #{act}`,`expected promise not to be rejected with an error ${re} #{exp}`,A,Ie.getMessage(se))),se});return xe.exports.transferPromiseness(this,_e),this}),d("eventually",function(){return n.flag(this,"eventually",!0),this}),u("notify",function(p){return g(R(this),p),this}),u("become",function(p,A){return this.eventually.deep.equal(p,A)}),x.filter(p=>p!=="assert"&&typeof j[p].value=="function").forEach(p=>{e.overwriteMethod(p,A=>function(){return G(A,this,arguments)})}),x.filter(p=>p!=="_obj"&&typeof j[p].get=="function").forEach(p=>{e.prototype.__methods.hasOwnProperty(p)?e.overwriteChainableMethod(p,q=>function(){return G(q,this,arguments)},q=>function(){return G(q,this)}):e.overwriteProperty(p,q=>function(){return s(G(q,this))})});function G(p,A,q){if(!n.flag(A,"eventually"))return p.apply(A,q),A;let z=R(A).then(H=>(A._obj=H,n.flag(A,"eventually",!1),q&&xe.exports.transformAsserterArgs(q))).then(H=>(p.apply(A,H),A._obj));return xe.exports.transferPromiseness(A,z),A}let Y=Object.getOwnPropertyNames(a).filter(p=>typeof a[p]=="function");a.isFulfilled=(p,A)=>new e(p,A).to.be.fulfilled,a.isRejected=(p,A,q,z)=>new e(p,z).to.be.rejectedWith(A,q,z),a.becomes=(p,A,q)=>a.eventually.deepEqual(p,A,q),a.doesNotBecome=(p,A,q)=>a.eventually.notDeepEqual(p,A,q),a.eventually={},Y.forEach(p=>{a.eventually[p]=function(A){let q=Array.prototype.slice.call(arguments,1),z,H=arguments[a[p].length-1];typeof H=="string"&&(z=re=>{throw new r.AssertionError(`${H}
|
|
5
|
+
|
|
6
|
+
Original reason: ${n.inspect(re)}`)});let be=A.then(re=>a[p].apply(a,[re].concat(q)),z);return be.notify=re=>{g(be,re)},be}})};xe.exports.transferPromiseness=(r,n)=>{r.then=n.then.bind(n)};xe.exports.transformAsserterArgs=r=>r});var So=I((hc,xo)=>{"use strict";function Us(r,n){let e="__deferred__",a=n.flag,t=r.Assertion;function i(x,j){let k=a(x,e)||[];k.push(j),a(x,e,k)}function o(x){let j=a(x,e)||[],k=x,U;for(a(x,e,void 0);U=j.shift();){let G=U.call(k);G!==void 0&&(k=G)}return k}function s(x,j){let k=a(x,e);k&&k.length>0&&k.splice(-1,0,function(){a(this,"message",j)})}function u(x,j){j&&t.addChainableMethod(x,function(U){return U&&s(this,U),o(this)},function(){return i(this,j),this})}function d(x){let j={assertCalled:!1,assert:function(){this.assertCalled=!0}};try{x.call(j)}catch{j.assertCalled=!0}return j.assertCalled}let g=Object.getOwnPropertyNames(t.prototype).map(function(x){let j=Object.getOwnPropertyDescriptor(t.prototype,x);return j.name=x,j});g.filter(function(x){return x.name!=="assert"&&x.name!=="constructor"&&typeof x.value=="function"}).forEach(function(x){t.overwriteMethod(x.name,function(j){return function(){let k=o(this);return j.apply(k,arguments)}})}),g.filter(function(x){return Object.prototype.hasOwnProperty.call(t.prototype.__methods,x.name)}).forEach(function(x){t.overwriteChainableMethod(x.name,function(j){return function(){let k=o(this);return j.apply(k,arguments)}},function(j){return function(){return i(this,j),this}})});let D=g.filter(function(x){return x.name!=="_obj"&&typeof x.get=="function"&&!Object.prototype.hasOwnProperty.call(t.prototype.__methods,x.name)});D.filter(function(x){return!d(x.get)}).forEach(function(x){t.overwriteProperty(x.name,function(j){return function(){return i(this,j),this}})}),D.filter(function(x){return d(x.get)}).forEach(function(x){u(x.name,x.get)}),t.addMethod("ensure",function(){return o(this)});let V=n.addProperty;n.addProperty=function(x,j,k){V.apply(n,arguments),u(j,k)};let R=n.addMethod;n.addMethod=function(x,j){R.apply(n,arguments),t.overwriteMethod(j,function(k){return function(){let U=o(this);return k.apply(U,arguments)}})};let M=n.addChainableMethod;n.addChainableMethod=function(x,j){let k=!0;Object.prototype.hasOwnProperty.call(t.prototype,j)&&(k=!1),M.apply(n,arguments),k&&t.overwriteChainableMethod(j,function(U){return function(){let G=o(this);return U.apply(G,arguments)}},function(U){return function(){return i(this,U),this}})}}xo.exports=Us});var Ao=I((Lt,Wt)=>{(function(){(function(r){return typeof Se=="function"&&typeof Lt=="object"&&typeof Wt=="object"?Wt.exports=r:typeof define=="function"&&define.amd?define(function(){return r}):chai.use(r)})(function(r,n){var e=r.Assertion,a=e.prototype;e.addMethod("containSubset",function(i){var o=n.flag(this,"object"),s=r.config.showDiff;a.assert.call(this,t(i,o),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",i,o,s)}),r.assert.containSubset=function(i,o,s){new r.Assertion(i,s).to.be.containSubset(o)};function t(i,o){if(i===o)return!0;if(typeof o!=typeof i)return!1;if(typeof i!="object"||i===null)return i===o;if(i&&!o)return!1;if(Array.isArray(i)){if(typeof o.length!="number")return!1;var s=Array.prototype.slice.call(o);return i.every(function(u){return s.some(function(d){return t(u,d)})})}return i instanceof Date?o instanceof Date?i.getTime()===o.getTime():!1:Object.keys(i).every(function(u){var d=i[u],g=o[u];return typeof d=="object"&&d!==null&&g!==null?t(d,g):typeof d=="function"?d(g):g===d})}})}).call(Lt)});var To=I((pc,Eo)=>{"use strict";function Po(r,n){if(Uint8Array&&Uint8Array.prototype.every)return r.every(n);for(let e=0;e<r.length;e++)if(!n(r[e],e,r))return!1;return!0}Eo.exports=function(r){let n=r.Assertion;n.addMethod("equalBytes",function(e){if(typeof e=="string"){if(e.length%2!==0||!/^[0-9a-f]*$/i.test(e))throw new TypeError("Invalid hex string: "+e)}else if(e.length===void 0)throw new TypeError("equalBytes consumes string, array, or array-like object; got none of those");let a=this._obj;new n(a).to.be.a("uint8array");let t;typeof e=="string"?t=e.length===a.length*2&&Po(a,function(i,o){return i===parseInt(e.substring(2*o,2*o+2),16)}):t=e.length===a.length&&Po(a,function(i,o){return e[o]===i}),this.assert(t,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e)}),r.assert.equalBytes=function(e,a,t){return new n(e,t,r.assert.equalBytes,!0).to.equalBytes(a)}}});var jo=I((Mo,Kt)=>{(function(r){typeof Se=="function"&&typeof Mo=="object"&&typeof Kt=="object"?Kt.exports=r:typeof define=="function"&&define.amd?define(function(){return r}):chai.use(r)})(function(r,n){r.string=r.string||{};function e(o){return typeof o=="string"}r.string.startsWith=function(o,s){return!e(o)||!e(s)?!1:o.indexOf(s)===0},r.string.endsWith=function(o,s){return!e(o)||!e(s)?!1:o.indexOf(s,o.length-s.length)!==-1},r.string.equalIgnoreCase=function(o,s){return!e(o)||!e(s)?!1:o.toLowerCase()===s.toLowerCase()},r.string.equalIgnoreSpaces=function(o,s){return!e(o)||!e(s)?!1:o.replace(/\s/g,"")===s.replace(/\s/g,"")},r.string.containIgnoreSpaces=function(o,s){return!e(o)||!e(s)?!1:o.replace(/\s/g,"").indexOf(s.replace(/\s/g,""))>-1},r.string.containIgnoreCase=function(o,s){return!e(o)||!e(s)?!1:o.toLowerCase().indexOf(s.toLowerCase())>-1},r.string.singleLine=function(o){return e(o)?o.trim().indexOf(`
|
|
7
|
+
`)===-1:!1},r.string.reverseOf=function(o,s){return!e(o)||!e(s)?!1:o.split("").reverse().join("")===s},r.string.palindrome=function(o){if(!e(o))return!1;for(var s=o.length,u=0;u<Math.floor(s/2);u++)if(o[u]!==o[s-1-u])return!1;return!0},r.string.entriesCount=function(o,s,u){var d=0;if(e(o)&&e(s))for(var g=0,D=o.length;g<D;){var V=o.indexOf(s,g);if(V===-1)break;d++,g=V+1}return d===u},r.string.indexOf=function(o,s,u){var d=!e(o)||!e(s)?-1:o.indexOf(s);return d===u};var a=function(o){var s=this._obj;return this.assert(r.string.startsWith(s,o),"expected "+this._obj+" to start with "+o,"expected "+this._obj+" not to start with "+o)};r.Assertion.addChainableMethod("startsWith",a),r.Assertion.addChainableMethod("startWith",a);var t=function(o){var s=this._obj;return this.assert(r.string.endsWith(s,o),"expected "+this._obj+" to end with "+o,"expected "+this._obj+" not to end with "+o)};r.Assertion.addChainableMethod("endsWith",t),r.Assertion.addChainableMethod("endWith",t),r.Assertion.addChainableMethod("equalIgnoreCase",function(o){var s=this._obj;return this.assert(r.string.equalIgnoreCase(s,o),"expected "+this._obj+" to equal "+o+" ignoring case","expected "+this._obj+" not to equal "+o+" ignoring case")}),r.Assertion.addChainableMethod("equalIgnoreSpaces",function(o){var s=this._obj;return this.assert(r.string.equalIgnoreSpaces(s,o),"expected "+this._obj+" to equal "+o+" ignoring spaces","expected "+this._obj+" not to equal "+o+" ignoring spaces")}),r.Assertion.addChainableMethod("containIgnoreSpaces",function(o){var s=this._obj;return this.assert(r.string.containIgnoreSpaces(s,o),"expected "+this._obj+" to contain "+o+" ignoring spaces","expected "+this._obj+" not to contain "+o+" ignoring spaces")}),r.Assertion.addChainableMethod("containIgnoreCase",function(o){var s=this._obj;return this.assert(r.string.containIgnoreCase(s,o),"expected "+this._obj+" to contain "+o+" ignoring case","expected "+this._obj+" not to contain "+o+" ignoring case")}),r.Assertion.addChainableMethod("singleLine",function(){var o=this._obj;return this.assert(r.string.singleLine(o),"expected "+this._obj+" to be a single line","expected "+this._obj+" not to be a single line")}),r.Assertion.addChainableMethod("reverseOf",function(o){var s=this._obj;return this.assert(r.string.reverseOf(s,o),"expected "+this._obj+" to be the reverse of "+o,"expected "+this._obj+" not to be the reverse of "+o)}),r.Assertion.addChainableMethod("palindrome",function(){var o=this._obj;return this.assert(r.string.palindrome(o),"expected "+this._obj+" to be a palindrome","expected "+this._obj+" not to be a palindrome")}),r.Assertion.addChainableMethod("entriesCount",function(o,s){var u=this._obj;return this.assert(r.string.entriesCount(u,o,s),"expected "+this._obj+" to have "+o+" "+s+" time(s)","expected "+this._obj+" to not have "+o+" "+s+" time(s)")}),r.Assertion.addChainableMethod("indexOf",function(o,s){var u=this._obj;return this.assert(r.string.indexOf(u,o,s),"expected "+this._obj+" to have "+o+" on index "+s,"expected "+this._obj+" to not have "+o+" on index "+s)});var i=r.assert;i.startsWith=function(o,s,u){new r.Assertion(o,u).to.startsWith(s)},i.notStartsWith=function(o,s,u){new r.Assertion(o,u).to.not.startsWith(s)},i.endsWith=function(o,s,u){new r.Assertion(o,u).to.endsWith(s)},i.notEndsWith=function(o,s,u){new r.Assertion(o,u).to.not.endsWith(s)},i.equalIgnoreCase=function(o,s,u){new r.Assertion(o,u).to.be.equalIgnoreCase(s)},i.notEqualIgnoreCase=function(o,s,u){new r.Assertion(o,u).to.not.be.equalIgnoreCase(s)},i.equalIgnoreSpaces=function(o,s,u){new r.Assertion(o,u).to.be.equalIgnoreSpaces(s)},i.notEqualIgnoreSpaces=function(o,s,u){new r.Assertion(o,u).to.not.be.equalIgnoreSpaces(s)},i.containIgnoreSpaces=function(o,s,u){new r.Assertion(o,u).to.be.containIgnoreSpaces(s)},i.notContainIgnoreSpaces=function(o,s,u){new r.Assertion(o,u).to.not.be.containIgnoreSpaces(s)},i.containIgnoreCase=function(o,s,u){new r.Assertion(o,u).to.be.containIgnoreCase(s)},i.notContainIgnoreCase=function(o,s,u){new r.Assertion(o,u).to.not.be.containIgnoreCase(s)},i.singleLine=function(o,s,u){new r.Assertion(o,u).to.be.singleLine()},i.notSingleLine=function(o,s,u){new r.Assertion(o,u).to.not.be.singleLine()},i.reverseOf=function(o,s,u){new r.Assertion(o,u).to.be.reverseOf(s)},i.notReverseOf=function(o,s,u){new r.Assertion(o,u).to.not.be.reverseOf(s)},i.palindrome=function(o,s,u){new r.Assertion(o,u).to.be.palindrome()},i.notPalindrome=function(o,s,u){new r.Assertion(o,u).to.not.be.palindrome()},i.entriesCount=function(o,s,u,d){new r.Assertion(o,d).to.have.entriesCount(s,u)},i.indexOf=function(o,s,u,d){new r.Assertion(o,d).to.have.indexOf(s,u)}})});var si=I((Mf,ii)=>{function ye(r,n){typeof n=="boolean"&&(n={forever:n}),this._originalTimeouts=JSON.parse(JSON.stringify(r)),this._timeouts=r,this._options=n||{},this._maxRetryTime=n&&n.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}ii.exports=ye;ye.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};ye.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};ye.prototype.retry=function(r){if(this._timeout&&clearTimeout(this._timeout),!r)return!1;var n=new Date().getTime();if(r&&n-this._operationStart>=this._maxRetryTime)return this._errors.push(r),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(r);var e=this._timeouts.shift();if(e===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),e=this._cachedTimeouts.slice(-1);else return!1;var a=this;return this._timer=setTimeout(function(){a._attempts++,a._operationTimeoutCb&&(a._timeout=setTimeout(function(){a._operationTimeoutCb(a._attempts)},a._operationTimeout),a._options.unref&&a._timeout.unref()),a._fn(a._attempts)},e),this._options.unref&&this._timer.unref(),!0};ye.prototype.attempt=function(r,n){this._fn=r,n&&(n.timeout&&(this._operationTimeout=n.timeout),n.cb&&(this._operationTimeoutCb=n.cb));var e=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){e._operationTimeoutCb()},e._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};ye.prototype.try=function(r){console.log("Using RetryOperation.try() is deprecated"),this.attempt(r)};ye.prototype.start=function(r){console.log("Using RetryOperation.start() is deprecated"),this.attempt(r)};ye.prototype.start=ye.prototype.try;ye.prototype.errors=function(){return this._errors};ye.prototype.attempts=function(){return this._attempts};ye.prototype.mainError=function(){if(this._errors.length===0)return null;for(var r={},n=null,e=0,a=0;a<this._errors.length;a++){var t=this._errors[a],i=t.message,o=(r[i]||0)+1;r[i]=o,o>=e&&(n=t,e=o)}return n}});var ai=I(ke=>{var tu=si();ke.operation=function(r){var n=ke.timeouts(r);return new tu(n,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})};ke.timeouts=function(r){if(r instanceof Array)return[].concat(r);var n={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var e in r)n[e]=r[e];if(n.minTimeout>n.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var a=[],t=0;t<n.retries;t++)a.push(this.createTimeout(t,n));return r&&r.forever&&!a.length&&a.push(this.createTimeout(t,n)),a.sort(function(i,o){return i-o}),a};ke.createTimeout=function(r,n){var e=n.randomize?Math.random()+1:1,a=Math.round(e*Math.max(n.minTimeout,1)*Math.pow(n.factor,r));return a=Math.min(a,n.maxTimeout),a};ke.wrap=function(r,n,e){if(n instanceof Array&&(e=n,n=null),!e){e=[];for(var a in r)typeof r[a]=="function"&&e.push(a)}for(var t=0;t<e.length;t++){var i=e[t],o=r[i];r[i]=function(u){var d=ke.operation(n),g=Array.prototype.slice.call(arguments,1),D=g.pop();g.push(function(V){d.retry(V)||(V&&(arguments[0]=d.mainError()),D.apply(this,arguments))}),d.attempt(function(){u.apply(r,g)})}.bind(r,o),r[i].options=n}}});var ci=I((Of,ui)=>{ui.exports=ai()});var pu={};ae(pu,{connectInteropTests:()=>Jt,dhtInteropTests:()=>xn,interopTests:()=>du,pubsubInteropTests:()=>Sn,streamInteropTests:()=>jn});var he=ve(wo(),1),ec=he.default.expect,tc=he.default.version,nc=he.default.Assertion,rc=he.default.AssertionError,oc=he.default.util,ic=he.default.config,sc=he.default.use,ac=he.default.should,uc=he.default.assert,cc=he.default.core,Ee=he.default;var Oo=ve(vo(),1),qo=ve(So(),1),No=ve(Ao(),1),Co=ve(To(),1),Io=ve(jo(),1);Ee.use(Oo.default);Ee.use(qo.default);Ee.use(No.default);Ee.use(Co.default);Ee.use(Io.default);var Q=Ee.expect,bc=Ee.assert;var Te=ve(Se("path"),1),Do=Se("url"),$s={},Re=Te.default.dirname((0,Do.fileURLToPath)($s.url)),Vs={ed25519:Te.default.join(Re,"go.ed25519.key"),rsa:Te.default.join(Re,"go.rsa.key"),secp256k1:Te.default.join(Re,"go.secp256k1.key")},Rs={ed25519:Te.default.join(Re,"js.ed25519.key"),rsa:Te.default.join(Re,"js.rsa.key"),secp256k1:Te.default.join(Re,"js.secp256k1.key")},Gt={go:Vs,js:Rs};function Jt(r){let n=["ed25519","rsa","secp256k1"],e=["js","go"];for(let a of n)for(let t of e)for(let i of e)Ls(`noise/${a}`,r,{type:t,noise:!0,key:Gt.go[a]},{type:i,noise:!0,key:Gt.js[a]})}function Ls(r,n,e,a){describe(`connect using ${r}`,()=>{let t;before(async function(){this.timeout(20*1e3),t=await Promise.all([n.spawn(e),n.spawn(a)])}),after(async function(){t!=null&&await Promise.all(t.map(async i=>await i.stop()))}),it(`${e.type} peer to ${a.type} peer`,async function(){this.timeout(10*1e3);let i=await t[0].client.identify(),o=await t[1].client.identify(),s=await t[0].client.listPeers();Q(s).to.have.lengthOf(0);let u=await t[1].client.listPeers();Q(u).to.have.lengthOf(0),await t[0].client.connect(o.peerId,o.addrs),await new Promise(D=>setTimeout(D,1e3));let d=await t[0].client.listPeers();Q(d).to.have.lengthOf(1),Q(d[0].toString()).to.equal(o.peerId.toString());let g=await t[1].client.listPeers();Q(g).to.have.lengthOf(1),Q(g[0].toString()).to.equal(i.peerId.toString())})})}var Ht={};ae(Ht,{identity:()=>Zs});function Ws(r,n){if(r.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),a=0;a<e.length;a++)e[a]=255;for(var t=0;t<r.length;t++){var i=r.charAt(t),o=i.charCodeAt(0);if(e[o]!==255)throw new TypeError(i+" is ambiguous");e[o]=t}var s=r.length,u=r.charAt(0),d=Math.log(s)/Math.log(256),g=Math.log(256)/Math.log(s);function D(M){if(M instanceof Uint8Array||(ArrayBuffer.isView(M)?M=new Uint8Array(M.buffer,M.byteOffset,M.byteLength):Array.isArray(M)&&(M=Uint8Array.from(M))),!(M instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(M.length===0)return"";for(var x=0,j=0,k=0,U=M.length;k!==U&&M[k]===0;)k++,x++;for(var G=(U-k)*g+1>>>0,Y=new Uint8Array(G);k!==U;){for(var p=M[k],A=0,q=G-1;(p!==0||A<j)&&q!==-1;q--,A++)p+=256*Y[q]>>>0,Y[q]=p%s>>>0,p=p/s>>>0;if(p!==0)throw new Error("Non-zero carry");j=A,k++}for(var z=G-j;z!==G&&Y[z]===0;)z++;for(var H=u.repeat(x);z<G;++z)H+=r.charAt(Y[z]);return H}function V(M){if(typeof M!="string")throw new TypeError("Expected String");if(M.length===0)return new Uint8Array;var x=0;if(M[x]!==" "){for(var j=0,k=0;M[x]===u;)j++,x++;for(var U=(M.length-x)*d+1>>>0,G=new Uint8Array(U);M[x];){var Y=e[M.charCodeAt(x)];if(Y===255)return;for(var p=0,A=U-1;(Y!==0||p<k)&&A!==-1;A--,p++)Y+=s*G[A]>>>0,G[A]=Y%256>>>0,Y=Y/256>>>0;if(Y!==0)throw new Error("Non-zero carry");k=p,x++}if(M[x]!==" "){for(var q=U-k;q!==U&&G[q]===0;)q++;for(var z=new Uint8Array(j+(U-q)),H=j;q!==U;)z[H++]=G[q++];return z}}}function R(M){var x=V(M);if(x)return x;throw new Error(`Non-${n} character`)}return{encode:D,decodeUnsafe:V,decode:R}}var Ks=Ws,Gs=Ks,ko=Gs;var Pc=new Uint8Array(0);var zo=(r,n)=>{if(r===n)return!0;if(r.byteLength!==n.byteLength)return!1;for(let e=0;e<r.byteLength;e++)if(r[e]!==n[e])return!1;return!0},de=r=>{if(r instanceof Uint8Array&&r.constructor.name==="Uint8Array")return r;if(r instanceof ArrayBuffer)return new Uint8Array(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength);throw new Error("Unknown type, must be binary type")};var _o=r=>new TextEncoder().encode(r),Bo=r=>new TextDecoder().decode(r);var Qt=class{constructor(n,e,a){this.name=n,this.prefix=e,this.baseEncode=a}encode(n){if(n instanceof Uint8Array)return`${this.prefix}${this.baseEncode(n)}`;throw Error("Unknown type, must be binary type")}},Zt=class{constructor(n,e,a){if(this.name=n,this.prefix=e,e.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=e.codePointAt(0),this.baseDecode=a}decode(n){if(typeof n=="string"){if(n.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(n)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(n.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(n){return Uo(this,n)}},Xt=class{constructor(n){this.decoders=n}or(n){return Uo(this,n)}decode(n){let e=n[0],a=this.decoders[e];if(a)return a.decode(n);throw RangeError(`Unable to decode multibase string ${JSON.stringify(n)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},Uo=(r,n)=>new Xt({...r.decoders||{[r.prefix]:r},...n.decoders||{[n.prefix]:n}}),Yt=class{constructor(n,e,a,t){this.name=n,this.prefix=e,this.baseEncode=a,this.baseDecode=t,this.encoder=new Qt(n,e,a),this.decoder=new Zt(n,e,t)}encode(n){return this.encoder.encode(n)}decode(n){return this.decoder.decode(n)}},$e=({name:r,prefix:n,encode:e,decode:a})=>new Yt(r,n,e,a),Me=({prefix:r,name:n,alphabet:e})=>{let{encode:a,decode:t}=ko(e,n);return $e({prefix:r,name:n,encode:a,decode:i=>de(t(i))})},Js=(r,n,e,a)=>{let t={};for(let g=0;g<n.length;++g)t[n[g]]=g;let i=r.length;for(;r[i-1]==="=";)--i;let o=new Uint8Array(i*e/8|0),s=0,u=0,d=0;for(let g=0;g<i;++g){let D=t[r[g]];if(D===void 0)throw new SyntaxError(`Non-${a} character`);u=u<<e|D,s+=e,s>=8&&(s-=8,o[d++]=255&u>>s)}if(s>=e||255&u<<8-s)throw new SyntaxError("Unexpected end of data");return o},Qs=(r,n,e)=>{let a=n[n.length-1]==="=",t=(1<<e)-1,i="",o=0,s=0;for(let u=0;u<r.length;++u)for(s=s<<8|r[u],o+=8;o>e;)o-=e,i+=n[t&s>>o];if(o&&(i+=n[t&s<<e-o]),a)for(;i.length*e&7;)i+="=";return i},Z=({name:r,prefix:n,bitsPerChar:e,alphabet:a})=>$e({prefix:n,name:r,encode(t){return Qs(t,a,e)},decode(t){return Js(t,a,e,r)}});var Zs=$e({prefix:"\0",name:"identity",encode:r=>Bo(r),decode:r=>_o(r)});var en={};ae(en,{base2:()=>Xs});var Xs=Z({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var tn={};ae(tn,{base8:()=>Ys});var Ys=Z({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var nn={};ae(nn,{base10:()=>Hs});var Hs=Me({prefix:"9",name:"base10",alphabet:"0123456789"});var rn={};ae(rn,{base16:()=>ea,base16upper:()=>ta});var ea=Z({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),ta=Z({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var on={};ae(on,{base32:()=>Le,base32hex:()=>ia,base32hexpad:()=>aa,base32hexpadupper:()=>ua,base32hexupper:()=>sa,base32pad:()=>ra,base32padupper:()=>oa,base32upper:()=>na,base32z:()=>ca});var Le=Z({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),na=Z({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),ra=Z({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),oa=Z({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ia=Z({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),sa=Z({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),aa=Z({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),ua=Z({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),ca=Z({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var sn={};ae(sn,{base36:()=>fa,base36upper:()=>la});var fa=Me({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),la=Me({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var an={};ae(an,{base58btc:()=>ge,base58flickr:()=>ha});var ge=Me({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),ha=Me({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var un={};ae(un,{base64:()=>da,base64pad:()=>pa,base64url:()=>ya,base64urlpad:()=>ma});var da=Z({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),pa=Z({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),ya=Z({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ma=Z({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var cn={};ae(cn,{base256emoji:()=>xa});var Vo=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}"),ba=Vo.reduce((r,n,e)=>(r[e]=n,r),[]),ga=Vo.reduce((r,n,e)=>(r[n.codePointAt(0)]=e,r),[]);function wa(r){return r.reduce((n,e)=>(n+=ba[e],n),"")}function va(r){let n=[];for(let e of r){let a=ga[e.codePointAt(0)];if(a===void 0)throw new Error(`Non-base256emoji character: ${e}`);n.push(a)}return new Uint8Array(n)}var xa=$e({prefix:"\u{1F680}",name:"base256emoji",encode:wa,decode:va});var pn={};ae(pn,{sha256:()=>Ua,sha512:()=>Va});var dn=ve(Se("crypto"),1);var Sa=Lo,Ro=128,Aa=127,Pa=~Aa,Ea=Math.pow(2,31);function Lo(r,n,e){n=n||[],e=e||0;for(var a=e;r>=Ea;)n[e++]=r&255|Ro,r/=128;for(;r&Pa;)n[e++]=r&255|Ro,r>>>=7;return n[e]=r|0,Lo.bytes=e-a+1,n}var Ta=fn,Ma=128,$o=127;function fn(r,a){var e=0,a=a||0,t=0,i=a,o,s=r.length;do{if(i>=s)throw fn.bytes=0,new RangeError("Could not decode varint");o=r[i++],e+=t<28?(o&$o)<<t:(o&$o)*Math.pow(2,t),t+=7}while(o>=Ma);return fn.bytes=i-a,e}var ja=Math.pow(2,7),Oa=Math.pow(2,14),qa=Math.pow(2,21),Na=Math.pow(2,28),Ca=Math.pow(2,35),Ia=Math.pow(2,42),Da=Math.pow(2,49),ka=Math.pow(2,56),za=Math.pow(2,63),_a=function(r){return r<ja?1:r<Oa?2:r<qa?3:r<Na?4:r<Ca?5:r<Ia?6:r<Da?7:r<ka?8:r<za?9:10},Ba={encode:Sa,decode:Ta,encodingLength:_a},Fa=Ba,ot=Fa;var st=(r,n=0)=>[ot.decode(r,n),ot.decode.bytes],We=(r,n,e=0)=>(ot.encode(r,n,e),n),Ke=r=>ot.encodingLength(r);var De=(r,n)=>{let e=n.byteLength,a=Ke(r),t=a+Ke(e),i=new Uint8Array(t+e);return We(r,i,0),We(e,i,a),i.set(n,t),new Ge(r,e,n,i)},Wo=r=>{let n=de(r),[e,a]=st(n),[t,i]=st(n.subarray(a)),o=n.subarray(a+i);if(o.byteLength!==t)throw new Error("Incorrect length");return new Ge(e,t,o,n)},Ko=(r,n)=>{if(r===n)return!0;{let e=n;return r.code===e.code&&r.size===e.size&&e.bytes instanceof Uint8Array&&zo(r.bytes,e.bytes)}},Ge=class{constructor(n,e,a,t){this.code=n,this.size=e,this.digest=a,this.bytes=t}};var hn=({name:r,code:n,encode:e})=>new ln(r,n,e),ln=class{constructor(n,e,a){this.name=n,this.code=e,this.encode=a}digest(n){if(n instanceof Uint8Array){let e=this.encode(n);return e instanceof Uint8Array?De(this.code,e):e.then(a=>De(this.code,a))}else throw Error("Unknown type, must be binary type")}};var Ua=hn({name:"sha2-256",code:18,encode:r=>de(dn.default.createHash("sha256").update(r).digest())}),Va=hn({name:"sha2-512",code:19,encode:r=>de(dn.default.createHash("sha512").update(r).digest())});var yn={};ae(yn,{identity:()=>La});var Jo=0,Ra="identity",Qo=de,$a=r=>De(Jo,Qo(r)),La={code:Jo,name:Ra,encode:Qo,digest:$a};var Kc=new TextEncoder,Gc=new TextDecoder;var Zo=(r,n)=>{let{bytes:e,version:a}=r;switch(a){case 0:return Ja(e,mn(r),n||ge.encoder);default:return Qa(e,mn(r),n||Le.encoder)}};var Xo=new WeakMap,mn=r=>{let n=Xo.get(r);if(n==null){let e=new Map;return Xo.set(r,e),e}return n},X=class{constructor(n,e,a,t){this.code=e,this.version=n,this.multihash=a,this.bytes=t,this["/"]=t}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:n,multihash:e}=this;if(n!==ut)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==Za)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return X.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:n,digest:e}=this.multihash,a=De(n,e);return X.createV1(this.code,a)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(n){return X.equals(this,n)}static equals(n,e){let a=e;return a&&n.code===a.code&&n.version===a.version&&Ko(n.multihash,a.multihash)}toString(n){return Zo(this,n)}toJSON(){return{"/":Zo(this)}}link(){return this}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(n){if(n==null)return null;let e=n;if(e instanceof X)return e;if(e["/"]!=null&&e["/"]===e.bytes||e.asCID===e){let{version:a,code:t,multihash:i,bytes:o}=e;return new X(a,t,i,o||Yo(a,t,i.bytes))}else if(e[Xa]===!0){let{version:a,multihash:t,code:i}=e,o=Wo(t);return X.create(a,i,o)}else return null}static create(n,e,a){if(typeof e!="number")throw new Error("String codecs are no longer supported");if(!(a.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(n){case 0:{if(e!==ut)throw new Error(`Version 0 CID must use dag-pb (code: ${ut}) block encoding`);return new X(n,e,a,a.bytes)}case 1:{let t=Yo(n,e,a.bytes);return new X(n,e,a,t)}default:throw new Error("Invalid version")}}static createV0(n){return X.create(0,ut,n)}static createV1(n,e){return X.create(1,n,e)}static decode(n){let[e,a]=X.decodeFirst(n);if(a.length)throw new Error("Incorrect length");return e}static decodeFirst(n){let e=X.inspectBytes(n),a=e.size-e.multihashSize,t=de(n.subarray(a,a+e.multihashSize));if(t.byteLength!==e.multihashSize)throw new Error("Incorrect length");let i=t.subarray(e.multihashSize-e.digestSize),o=new Ge(e.multihashCode,e.digestSize,i,t);return[e.version===0?X.createV0(o):X.createV1(e.codec,o),n.subarray(e.size)]}static inspectBytes(n){let e=0,a=()=>{let[D,V]=st(n.subarray(e));return e+=V,D},t=a(),i=ut;if(t===18?(t=0,e=0):i=a(),t!==0&&t!==1)throw new RangeError(`Invalid CID version ${t}`);let o=e,s=a(),u=a(),d=e+u,g=d-o;return{version:t,codec:i,multihashCode:s,digestSize:u,multihashSize:g,size:d}}static parse(n,e){let[a,t]=Ga(n,e),i=X.decode(t);return mn(i).set(a,n),i}},Ga=(r,n)=>{switch(r[0]){case"Q":{let e=n||ge;return[ge.prefix,e.decode(`${ge.prefix}${r}`)]}case ge.prefix:{let e=n||ge;return[ge.prefix,e.decode(r)]}case Le.prefix:{let e=n||Le;return[Le.prefix,e.decode(r)]}default:{if(n==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[r[0],n.decode(r)]}}},Ja=(r,n,e)=>{let{prefix:a}=e;if(a!==ge.prefix)throw Error(`Cannot string encode V0 in ${e.name} encoding`);let t=n.get(a);if(t==null){let i=e.encode(r).slice(1);return n.set(a,i),i}else return t},Qa=(r,n,e)=>{let{prefix:a}=e,t=n.get(a);if(t==null){let i=e.encode(r);return n.set(a,i),i}else return t},ut=112,Za=18,Yo=(r,n,e)=>{let a=Ke(r),t=a+Ke(n),i=new Uint8Array(t+e.byteLength);return We(r,i,0),We(n,i,a),i.set(e,t),i},Xa=Symbol.for("@ipld/js-cid/CID");var bn={...Ht,...en,...tn,...nn,...rn,...on,...sn,...an,...un,...cn},rf={...pn,...yn};function Je(r){return globalThis.Buffer!=null?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):r}function xt(r=0){return globalThis.Buffer?.allocUnsafe!=null?Je(globalThis.Buffer.allocUnsafe(r)):new Uint8Array(r)}function ei(r,n,e,a){return{name:r,prefix:n,encoder:{name:r,prefix:n,encode:e},decoder:{decode:a}}}var Ho=ei("utf8","u",r=>"u"+new TextDecoder("utf8").decode(r),r=>new TextEncoder().encode(r.substring(1))),gn=ei("ascii","a",r=>{let n="a";for(let e=0;e<r.length;e++)n+=String.fromCharCode(r[e]);return n},r=>{r=r.substring(1);let n=xt(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n}),Ya={utf8:Ho,"utf-8":Ho,hex:bn.base16,latin1:gn,ascii:gn,binary:gn,...bn},ti=Ya;function pe(r,n="utf8"){let e=ti[n];if(e==null)throw new Error(`Unsupported encoding "${n}"`);return(n==="utf8"||n==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Je(globalThis.Buffer.from(r,"utf-8")):e.decoder.decode(`${e.prefix}${r}`)}function ni(r,n){n==null&&(n=r.reduce((t,i)=>t+i.length,0));let e=xt(n),a=0;for(let t of r)e.set(t,a),a+=t.length;return Je(e)}var St={key:ni([pe("/pk/"),pe("muft89xjpybos8eas1vaq2xrbsx2vkll7is4ocy7pia5fsjlt3c2","base36")]),value:pe("080012a60230820122300d06092a864886f70d01010105000382010f003082010a0282010100c2588f998971dac9e3eef76a311bf9159505aff69ea3b664c55a36aa28ee08de1127228a4d431bb9c0840240c75f6e98a0843a78d945491a3ea5e1f7cee2bc71383510db5290702383975b7bffae9fb40c84cc1220fb4a7db862fffb0de42f8fd8fb33a17deb20f30e2d0f194791fe69355a392f77df35f101e08a2fc95b2c018768938814fcb52482f899f5e90a1905e8abbcdbb1647ad80a5b0417e1ce8320d64197a6ba3848926375c63adebabdf6eb82109bcadfee13b62bf922bbb6f74c1a26c9bc6122d1436787e0e6de3c152b1959701092abef84599f73eaedb2fcef9f87293e1bbe8e0fef3f1a7fd2e8b94c7e633f88473644a63cb948e4d25c54490203010001","hex")};function ri(r){let n=["js","go"];for(let e of n)for(let a of n)Ha(r,{type:e,dht:!0},{type:a,dht:!0})}function Ha(r,n,e){describe("dht.contentFetching",()=>{let a;before(async function(){this.timeout(20*1e3),a=await Promise.all([r.spawn(n),r.spawn(e)]);let t=await a[0].client.identify();await a[1].client.connect(t.peerId,t.addrs),await new Promise(i=>setTimeout(i,1e3))}),after(async function(){a!=null&&await Promise.all(a.map(async t=>await t.stop()))}),it(`${n.type} peer to ${e.type} peer`,async function(){this.timeout(10*1e3),await a[0].client.dht.put(St.key,St.value);let t=await a[1].client.dht.get(St.key);Q(t).to.equalBytes(St.value)})})}async function ct(r){let n=[];for await(let e of r)n.push(e);return n}function oi(r){let n=["js","go"];for(let e of n)for(let a of n)e==="go"&&a==="go"||eu(r,{type:e,dht:!0},{type:a,dht:!0})}function eu(r,n,e){describe("dht.contentRouting",()=>{let a,t;before(async function(){this.timeout(20*1e3),a=await Promise.all([r.spawn(n),r.spawn(e),r.spawn(e)]),t=await Promise.all(a.map(async i=>await i.client.identify())),await a[0].client.connect(t[1].peerId,t[1].addrs),await a[0].client.connect(t[2].peerId,t[2].addrs),await new Promise(i=>setTimeout(i,1e3))}),after(async function(){a!=null&&await Promise.all(a.map(async i=>await i.stop()))}),it(`${n.type} peer to ${e.type} peer`,async function(){let i=X.parse("QmVzw6MPsF96TyXBSRs1ptLoVMWRv5FCYJZZGJSVB2Hp39");await a[0].client.dht.provide(i);let o=await ct(a[1].client.dht.findProviders(i,1));Q(o).to.exist(),Q(o.length).to.be.greaterThan(0)})})}var li=ve(ci(),1),nu=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed"]),wn=class extends Error{constructor(n){super(),n instanceof Error?(this.originalError=n,{message:n}=n):(this.originalError=new Error(n),this.originalError.stack=this.stack),this.name="AbortError",this.message=n}},ru=(r,n,e)=>{let a=e.retries-(n-1);return r.attemptNumber=n,r.retriesLeft=a,r},ou=r=>nu.has(r),fi=r=>globalThis.DOMException===void 0?new Error(r):new DOMException(r);async function vn(r,n){return new Promise((e,a)=>{n={onFailedAttempt(){},retries:10,...n};let t=li.default.operation(n);t.attempt(async i=>{try{e(await r(i))}catch(o){if(!(o instanceof Error)){a(new TypeError(`Non-error was thrown: "${o}". You should only throw errors.`));return}if(o instanceof wn)t.stop(),a(o.originalError);else if(o instanceof TypeError&&!ou(o.message))t.stop(),a(o);else{ru(o,i,n);try{await n.onFailedAttempt(o)}catch(s){a(s);return}t.retry(o)||a(t.mainError())}}}),n.signal&&!n.signal.aborted&&n.signal.addEventListener("abort",()=>{t.stop();let i=n.signal.reason===void 0?fi("The operation was aborted."):n.signal.reason;a(i instanceof Error?i:fi(i))},{once:!0})})}function hi(r){let n=["js","go"];for(let e of n)for(let a of n)iu(r,{type:e,dht:!0},{type:a,dht:!0})}function iu(r,n,e){describe("dht.peerRouting",()=>{let a;before(async function(){this.timeout(20*1e3),a=await Promise.all([r.spawn(n),r.spawn(e),r.spawn(e)])}),after(async function(){a!=null&&await Promise.all(a.map(async t=>await t.stop()))}),it(`${n.type} peer to ${e.type} peer`,async function(){let t=await a[1].client.identify(),i=await a[2].client.identify();await a[0].client.connect(t.peerId,t.addrs),await a[0].client.connect(i.peerId,i.addrs);let o=await vn(async()=>await a[1].client.dht.findPeer(i.peerId),{retries:10});Q(i.addrs.map(s=>s.toString())).to.include.deep.members(o.multiaddrs.map(s=>s.toString()))})})}async function xn(r){await ri(r),await oi(r),await hi(r)}async function ze(r){for await(let n of r)return n}function di(r){let n=["js","go"];for(let e of n)for(let a of n)su(r,{type:e,pubsub:!0,pubsubRouter:"floodsub"},{type:a,pubsub:!0,pubsubRouter:"floodsub"})}function su(r,n,e){describe("pubsub.floodSub",()=>{let a;before(async function(){this.timeout(20*1e3),a=await Promise.all([r.spawn(n),r.spawn(e)]);let t=await a[1].client.identify();await a[0].client.connect(t.peerId,t.addrs)}),after(async function(){a!=null&&await Promise.all(a.map(async t=>await t.stop()))}),it(`${n.type} peer to ${e.type} peer`,async function(){let t="test-topic",i=pe("test-data"),o=a[1].client.pubsub.subscribe(t),s=async()=>{let d=await ze(o);Q(d).to.exist(),Q(d).to.have.property("data").that.equalBytes(i)},u=async()=>{await new Promise(d=>setTimeout(d,800)),await a[0].client.pubsub.publish(t,i)};return await Promise.all([s(),u()])})})}function pi(r){let n=["js","go"];for(let e of n)for(let a of n)au(r,{type:e,pubsub:!0,pubsubRouter:"gossipsub"},{type:a,pubsub:!0,pubsubRouter:"gossipsub"})}function au(r,n,e){describe("pubsub.gossipsub",()=>{let a;before(async function(){this.timeout(20*1e3),a=await Promise.all([r.spawn(n),r.spawn(e)]);let t=await a[1].client.identify();await a[0].client.connect(t.peerId,t.addrs)}),after(async function(){a!=null&&await Promise.all(a.map(async t=>await t.stop()))}),it(`${n.type} peer to ${e.type} peer`,async function(){let t="test-topic",i=pe("test-data"),o=a[1].client.pubsub.subscribe(t),s=async()=>{let d=await ze(o);Q(d).to.exist(),Q(d).to.have.property("data").that.equalBytes(i)},u=async()=>{await new Promise(d=>setTimeout(d,800)),await a[0].client.pubsub.publish(t,i)};return await Promise.all([s(),u()])})})}function yi(r){let n=["js","go"];for(let e of n)for(let a of n)uu(r,{type:e,pubsub:!0,pubsubRouter:"floodsub"},{type:a,pubsub:!0,pubsubRouter:"gossipsub"})}function uu(r,n,e){describe("pubsub.hybrid",()=>{let a;before(async function(){this.timeout(20*1e3),a=await Promise.all([r.spawn(n),r.spawn(e)]);let t=await a[1].client.identify();await a[0].client.connect(t.peerId,t.addrs)}),after(async function(){a!=null&&await Promise.all(a.map(async t=>await t.stop()))}),it(`${n.type} peer to ${e.type} peer`,async function(){let t="test-topic",i=pe("test-data"),o=a[1].client.pubsub.subscribe(t),s=async()=>{let d=await ze(o);Q(d).to.exist(),Q(d).to.have.property("data").that.equalBytes(i)},u=async()=>{await new Promise(d=>setTimeout(d,800)),await a[0].client.pubsub.publish(t,i)};return await Promise.all([s(),u()])})})}async function Sn(r){await di(r),await pi(r),await yi(r)}var At=class{constructor(n){if(!(n>0)||n-1&n)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(n),this.mask=n-1,this.top=0,this.btm=0,this.next=null}push(n){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=n,this.top=this.top+1&this.mask,!0)}shift(){let n=this.buffer[this.btm];if(n!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,n}isEmpty(){return this.buffer[this.btm]===void 0}},Qe=class{constructor(n={}){this.hwm=n.splitLimit??16,this.head=new At(this.hwm),this.tail=this.head,this.size=0}calculateSize(n){return n?.byteLength!=null?n.byteLength:1}push(n){if(n?.value!=null&&(this.size+=this.calculateSize(n.value)),!this.head.push(n)){let e=this.head;this.head=e.next=new At(2*this.head.buffer.length),this.head.push(n)}}shift(){let n=this.tail.shift();if(n===void 0&&this.tail.next!=null){let e=this.tail.next;this.tail.next=null,this.tail=e,n=this.tail.shift()}return n?.value!=null&&(this.size-=this.calculateSize(n.value)),n}isEmpty(){return this.head.isEmpty()}};function Pt(r={}){return cu(e=>{let a=e.shift();if(a==null)return{done:!0};if(a.error!=null)throw a.error;return{done:a.done===!0,value:a.value}},r)}function cu(r,n){n=n??{};let e=n.onEnd,a=new Qe,t,i,o,s=async()=>a.isEmpty()?o?{done:!0}:await new Promise((x,j)=>{i=k=>{i=null,a.push(k);try{x(r(a))}catch(U){j(U)}return t}}):r(a),u=x=>i!=null?i(x):(a.push(x),t),d=x=>(a=new Qe,i!=null?i({error:x}):(a.push({error:x}),t)),g=x=>{if(o)return t;if(n?.objectMode!==!0&&x?.byteLength==null)throw new Error("objectMode was not true but tried to push non-Uint8Array value");return u({done:!1,value:x})},D=x=>o?t:(o=!0,x!=null?d(x):u({done:!0})),V=()=>(a=new Qe,D(),{done:!0}),R=x=>(D(x),{done:!0});if(t={[Symbol.asyncIterator](){return this},next:s,return:V,throw:R,push:g,end:D,get readableLength(){return a.size}},e==null)return t;let M=t;return t={[Symbol.asyncIterator](){return this},next(){return M.next()},throw(x){return M.throw(x),e!=null&&(e(x),e=void 0),{done:!0}},return(){return M.return(),e!=null&&(e(),e=void 0),{done:!0}},push:g,end(x){return M.end(x),e!=null&&(e(x),e=void 0),t},get readableLength(){return M.readableLength}},t}async function*An(...r){let n=Pt({objectMode:!0});Promise.resolve().then(async()=>{try{await Promise.all(r.map(async e=>{for await(let a of e)n.push(a)})),n.end()}catch(e){n.end(e)}}),yield*n}var fu=(...r)=>{let n;for(;r.length>0;)n=r.shift()(n);return n},mi=r=>r!=null&&(typeof r[Symbol.asyncIterator]=="function"||typeof r[Symbol.iterator]=="function"||typeof r.next=="function"),Pn=r=>r!=null&&typeof r.sink=="function"&&mi(r.source),lu=r=>n=>{let e=r.sink(n);if(e.then!=null){let a=Pt({objectMode:!0});return e.then(()=>{a.end()},i=>{a.end(i)}),An(a,async function*(){yield*r.source,a.end()}())}return r.source};function En(r,...n){if(Pn(r)){let a=r;r=()=>a.source}else if(mi(r)){let a=r;r=()=>a}let e=[r,...n];if(e.length>1&&Pn(e[e.length-1])&&(e[e.length-1]=e[e.length-1].sink),e.length>2)for(let a=1;a<e.length-1;a++)Pn(e[a])&&(e[a]=lu(e[a]));return fu(...e)}function Tn(){let r={};return r.promise=new Promise((n,e)=>{r.resolve=n,r.reject=e}),r}function Mn(r,n){let e=["js","go"];for(let a of e)for(let t of e)hu(r,n,{type:a,muxer:n},{type:t,muxer:n})}function hu(r,n,e,a){describe(`echo streams - ${n}`,()=>{let t;before(async function(){this.timeout(20*1e3),t=await Promise.all([r.spawn(e),r.spawn(a)]);let i=await t[0].client.identify();await t[1].client.connect(i.peerId,i.addrs),await new Promise(o=>setTimeout(o,1e3))}),after(async function(){t!=null&&await Promise.all(t.map(async i=>await i.stop()))}),it(`${e.type} sender to ${a.type} listener`,async function(){this.timeout(10*1e3);let i=await t[1].client.identify(),o="/echo/1.0.0",s=[pe("hello world")];await t[1].client.registerStreamHandler(o,async D=>{await En(D,async function*(V){for await(let R of V)yield R.subarray()},D)});let u=await t[0].client.openStream(i.peerId,o),d=Tn(),g=await En(s,async function*(D){yield*D,await d.promise},u,async function*(D){for await(let V of D)yield V.subarray(),d.resolve()},async D=>await ct(D));Q(g).to.deep.equal(s)})})}async function jn(r){await Mn(r,"mplex"),await Mn(r,"yamux")}async function du(r){await Jt(r),await xn(r),await Sn(r),await jn(r)}return Ci(pu);})();
|
|
8
|
+
/*! Bundled license information:
|
|
9
|
+
|
|
10
|
+
assertion-error/index.js:
|
|
11
|
+
(*!
|
|
12
|
+
* assertion-error
|
|
13
|
+
* Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
|
|
14
|
+
* MIT Licensed
|
|
15
|
+
*)
|
|
16
|
+
(*!
|
|
17
|
+
* Return a function that will copy properties from
|
|
18
|
+
* one object to another excluding any originally
|
|
19
|
+
* listed. Returned function will create a new `{}`.
|
|
20
|
+
*
|
|
21
|
+
* @param {String} excluded properties ...
|
|
22
|
+
* @return {Function}
|
|
23
|
+
*)
|
|
24
|
+
(*!
|
|
25
|
+
* Primary Exports
|
|
26
|
+
*)
|
|
27
|
+
(*!
|
|
28
|
+
* Inherit from Error.prototype
|
|
29
|
+
*)
|
|
30
|
+
(*!
|
|
31
|
+
* Statically set name
|
|
32
|
+
*)
|
|
33
|
+
(*!
|
|
34
|
+
* Ensure correct constructor
|
|
35
|
+
*)
|
|
36
|
+
|
|
37
|
+
chai/lib/chai/utils/flag.js:
|
|
38
|
+
(*!
|
|
39
|
+
* Chai - flag utility
|
|
40
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
41
|
+
* MIT Licensed
|
|
42
|
+
*)
|
|
43
|
+
|
|
44
|
+
chai/lib/chai/utils/test.js:
|
|
45
|
+
(*!
|
|
46
|
+
* Chai - test utility
|
|
47
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
48
|
+
* MIT Licensed
|
|
49
|
+
*)
|
|
50
|
+
(*!
|
|
51
|
+
* Module dependencies
|
|
52
|
+
*)
|
|
53
|
+
|
|
54
|
+
chai/lib/chai/utils/expectTypes.js:
|
|
55
|
+
(*!
|
|
56
|
+
* Chai - expectTypes utility
|
|
57
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
58
|
+
* MIT Licensed
|
|
59
|
+
*)
|
|
60
|
+
|
|
61
|
+
chai/lib/chai/utils/getActual.js:
|
|
62
|
+
(*!
|
|
63
|
+
* Chai - getActual utility
|
|
64
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
65
|
+
* MIT Licensed
|
|
66
|
+
*)
|
|
67
|
+
|
|
68
|
+
chai/lib/chai/utils/objDisplay.js:
|
|
69
|
+
(*!
|
|
70
|
+
* Chai - flag utility
|
|
71
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
72
|
+
* MIT Licensed
|
|
73
|
+
*)
|
|
74
|
+
(*!
|
|
75
|
+
* Module dependencies
|
|
76
|
+
*)
|
|
77
|
+
|
|
78
|
+
chai/lib/chai/utils/getMessage.js:
|
|
79
|
+
(*!
|
|
80
|
+
* Chai - message composition utility
|
|
81
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
82
|
+
* MIT Licensed
|
|
83
|
+
*)
|
|
84
|
+
(*!
|
|
85
|
+
* Module dependencies
|
|
86
|
+
*)
|
|
87
|
+
|
|
88
|
+
chai/lib/chai/utils/transferFlags.js:
|
|
89
|
+
(*!
|
|
90
|
+
* Chai - transferFlags utility
|
|
91
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
92
|
+
* MIT Licensed
|
|
93
|
+
*)
|
|
94
|
+
|
|
95
|
+
deep-eql/index.js:
|
|
96
|
+
(*!
|
|
97
|
+
* deep-eql
|
|
98
|
+
* Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
|
|
99
|
+
* MIT Licensed
|
|
100
|
+
*)
|
|
101
|
+
(*!
|
|
102
|
+
* Check to see if the MemoizeMap has recorded a result of the two operands
|
|
103
|
+
*
|
|
104
|
+
* @param {Mixed} leftHandOperand
|
|
105
|
+
* @param {Mixed} rightHandOperand
|
|
106
|
+
* @param {MemoizeMap} memoizeMap
|
|
107
|
+
* @returns {Boolean|null} result
|
|
108
|
+
*)
|
|
109
|
+
(*!
|
|
110
|
+
* Set the result of the equality into the MemoizeMap
|
|
111
|
+
*
|
|
112
|
+
* @param {Mixed} leftHandOperand
|
|
113
|
+
* @param {Mixed} rightHandOperand
|
|
114
|
+
* @param {MemoizeMap} memoizeMap
|
|
115
|
+
* @param {Boolean} result
|
|
116
|
+
*)
|
|
117
|
+
(*!
|
|
118
|
+
* Primary Export
|
|
119
|
+
*)
|
|
120
|
+
(*!
|
|
121
|
+
* The main logic of the `deepEqual` function.
|
|
122
|
+
*
|
|
123
|
+
* @param {Mixed} leftHandOperand
|
|
124
|
+
* @param {Mixed} rightHandOperand
|
|
125
|
+
* @param {Object} [options] (optional) Additional options
|
|
126
|
+
* @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
|
|
127
|
+
* @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
|
|
128
|
+
complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
|
|
129
|
+
references to blow the stack.
|
|
130
|
+
* @return {Boolean} equal match
|
|
131
|
+
*)
|
|
132
|
+
(*!
|
|
133
|
+
* Compare two Regular Expressions for equality.
|
|
134
|
+
*
|
|
135
|
+
* @param {RegExp} leftHandOperand
|
|
136
|
+
* @param {RegExp} rightHandOperand
|
|
137
|
+
* @return {Boolean} result
|
|
138
|
+
*)
|
|
139
|
+
(*!
|
|
140
|
+
* Compare two Sets/Maps for equality. Faster than other equality functions.
|
|
141
|
+
*
|
|
142
|
+
* @param {Set} leftHandOperand
|
|
143
|
+
* @param {Set} rightHandOperand
|
|
144
|
+
* @param {Object} [options] (Optional)
|
|
145
|
+
* @return {Boolean} result
|
|
146
|
+
*)
|
|
147
|
+
(*!
|
|
148
|
+
* Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
|
|
149
|
+
*
|
|
150
|
+
* @param {Iterable} leftHandOperand
|
|
151
|
+
* @param {Iterable} rightHandOperand
|
|
152
|
+
* @param {Object} [options] (Optional)
|
|
153
|
+
* @return {Boolean} result
|
|
154
|
+
*)
|
|
155
|
+
(*!
|
|
156
|
+
* Simple equality for generator objects such as those returned by generator functions.
|
|
157
|
+
*
|
|
158
|
+
* @param {Iterable} leftHandOperand
|
|
159
|
+
* @param {Iterable} rightHandOperand
|
|
160
|
+
* @param {Object} [options] (Optional)
|
|
161
|
+
* @return {Boolean} result
|
|
162
|
+
*)
|
|
163
|
+
(*!
|
|
164
|
+
* Determine if the given object has an @@iterator function.
|
|
165
|
+
*
|
|
166
|
+
* @param {Object} target
|
|
167
|
+
* @return {Boolean} `true` if the object has an @@iterator function.
|
|
168
|
+
*)
|
|
169
|
+
(*!
|
|
170
|
+
* Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
|
|
171
|
+
* This will consume the iterator - which could have side effects depending on the @@iterator implementation.
|
|
172
|
+
*
|
|
173
|
+
* @param {Object} target
|
|
174
|
+
* @returns {Array} an array of entries from the @@iterator function
|
|
175
|
+
*)
|
|
176
|
+
(*!
|
|
177
|
+
* Gets all entries from a Generator. This will consume the generator - which could have side effects.
|
|
178
|
+
*
|
|
179
|
+
* @param {Generator} target
|
|
180
|
+
* @returns {Array} an array of entries from the Generator.
|
|
181
|
+
*)
|
|
182
|
+
(*!
|
|
183
|
+
* Gets all own and inherited enumerable keys from a target.
|
|
184
|
+
*
|
|
185
|
+
* @param {Object} target
|
|
186
|
+
* @returns {Array} an array of own and inherited enumerable keys from the target.
|
|
187
|
+
*)
|
|
188
|
+
(*!
|
|
189
|
+
* Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
|
|
190
|
+
* each key. If any value of the given key is not equal, the function will return false (early).
|
|
191
|
+
*
|
|
192
|
+
* @param {Mixed} leftHandOperand
|
|
193
|
+
* @param {Mixed} rightHandOperand
|
|
194
|
+
* @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
|
|
195
|
+
* @param {Object} [options] (Optional)
|
|
196
|
+
* @return {Boolean} result
|
|
197
|
+
*)
|
|
198
|
+
(*!
|
|
199
|
+
* Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
|
|
200
|
+
* for each enumerable key in the object.
|
|
201
|
+
*
|
|
202
|
+
* @param {Mixed} leftHandOperand
|
|
203
|
+
* @param {Mixed} rightHandOperand
|
|
204
|
+
* @param {Object} [options] (Optional)
|
|
205
|
+
* @return {Boolean} result
|
|
206
|
+
*)
|
|
207
|
+
(*!
|
|
208
|
+
* Returns true if the argument is a primitive.
|
|
209
|
+
*
|
|
210
|
+
* This intentionally returns true for all objects that can be compared by reference,
|
|
211
|
+
* including functions and symbols.
|
|
212
|
+
*
|
|
213
|
+
* @param {Mixed} value
|
|
214
|
+
* @return {Boolean} result
|
|
215
|
+
*)
|
|
216
|
+
|
|
217
|
+
chai/lib/chai/utils/isProxyEnabled.js:
|
|
218
|
+
(*!
|
|
219
|
+
* Chai - isProxyEnabled helper
|
|
220
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
221
|
+
* MIT Licensed
|
|
222
|
+
*)
|
|
223
|
+
|
|
224
|
+
chai/lib/chai/utils/addProperty.js:
|
|
225
|
+
(*!
|
|
226
|
+
* Chai - addProperty utility
|
|
227
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
228
|
+
* MIT Licensed
|
|
229
|
+
*)
|
|
230
|
+
|
|
231
|
+
chai/lib/chai/utils/addLengthGuard.js:
|
|
232
|
+
(*!
|
|
233
|
+
* Chai - addLengthGuard utility
|
|
234
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
235
|
+
* MIT Licensed
|
|
236
|
+
*)
|
|
237
|
+
|
|
238
|
+
chai/lib/chai/utils/getProperties.js:
|
|
239
|
+
(*!
|
|
240
|
+
* Chai - getProperties utility
|
|
241
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
242
|
+
* MIT Licensed
|
|
243
|
+
*)
|
|
244
|
+
|
|
245
|
+
chai/lib/chai/utils/proxify.js:
|
|
246
|
+
(*!
|
|
247
|
+
* Chai - proxify utility
|
|
248
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
249
|
+
* MIT Licensed
|
|
250
|
+
*)
|
|
251
|
+
|
|
252
|
+
chai/lib/chai/utils/addMethod.js:
|
|
253
|
+
(*!
|
|
254
|
+
* Chai - addMethod utility
|
|
255
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
256
|
+
* MIT Licensed
|
|
257
|
+
*)
|
|
258
|
+
|
|
259
|
+
chai/lib/chai/utils/overwriteProperty.js:
|
|
260
|
+
(*!
|
|
261
|
+
* Chai - overwriteProperty utility
|
|
262
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
263
|
+
* MIT Licensed
|
|
264
|
+
*)
|
|
265
|
+
|
|
266
|
+
chai/lib/chai/utils/overwriteMethod.js:
|
|
267
|
+
(*!
|
|
268
|
+
* Chai - overwriteMethod utility
|
|
269
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
270
|
+
* MIT Licensed
|
|
271
|
+
*)
|
|
272
|
+
|
|
273
|
+
chai/lib/chai/utils/addChainableMethod.js:
|
|
274
|
+
(*!
|
|
275
|
+
* Chai - addChainingMethod utility
|
|
276
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
277
|
+
* MIT Licensed
|
|
278
|
+
*)
|
|
279
|
+
(*!
|
|
280
|
+
* Module dependencies
|
|
281
|
+
*)
|
|
282
|
+
(*!
|
|
283
|
+
* Module variables
|
|
284
|
+
*)
|
|
285
|
+
|
|
286
|
+
chai/lib/chai/utils/overwriteChainableMethod.js:
|
|
287
|
+
(*!
|
|
288
|
+
* Chai - overwriteChainableMethod utility
|
|
289
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
290
|
+
* MIT Licensed
|
|
291
|
+
*)
|
|
292
|
+
|
|
293
|
+
chai/lib/chai/utils/compareByInspect.js:
|
|
294
|
+
(*!
|
|
295
|
+
* Chai - compareByInspect utility
|
|
296
|
+
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
297
|
+
* MIT Licensed
|
|
298
|
+
*)
|
|
299
|
+
(*!
|
|
300
|
+
* Module dependencies
|
|
301
|
+
*)
|
|
302
|
+
|
|
303
|
+
chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js:
|
|
304
|
+
(*!
|
|
305
|
+
* Chai - getOwnEnumerablePropertySymbols utility
|
|
306
|
+
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
307
|
+
* MIT Licensed
|
|
308
|
+
*)
|
|
309
|
+
|
|
310
|
+
chai/lib/chai/utils/getOwnEnumerableProperties.js:
|
|
311
|
+
(*!
|
|
312
|
+
* Chai - getOwnEnumerableProperties utility
|
|
313
|
+
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
314
|
+
* MIT Licensed
|
|
315
|
+
*)
|
|
316
|
+
(*!
|
|
317
|
+
* Module dependencies
|
|
318
|
+
*)
|
|
319
|
+
|
|
320
|
+
chai/lib/chai/utils/isNaN.js:
|
|
321
|
+
(*!
|
|
322
|
+
* Chai - isNaN utility
|
|
323
|
+
* Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
|
324
|
+
* MIT Licensed
|
|
325
|
+
*)
|
|
326
|
+
|
|
327
|
+
chai/lib/chai/utils/index.js:
|
|
328
|
+
(*!
|
|
329
|
+
* chai
|
|
330
|
+
* Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
|
|
331
|
+
* MIT Licensed
|
|
332
|
+
*)
|
|
333
|
+
(*!
|
|
334
|
+
* Dependencies that are used for multiple exports are required here only once
|
|
335
|
+
*)
|
|
336
|
+
(*!
|
|
337
|
+
* test utility
|
|
338
|
+
*)
|
|
339
|
+
(*!
|
|
340
|
+
* type utility
|
|
341
|
+
*)
|
|
342
|
+
(*!
|
|
343
|
+
* expectTypes utility
|
|
344
|
+
*)
|
|
345
|
+
(*!
|
|
346
|
+
* message utility
|
|
347
|
+
*)
|
|
348
|
+
(*!
|
|
349
|
+
* actual utility
|
|
350
|
+
*)
|
|
351
|
+
(*!
|
|
352
|
+
* Inspect util
|
|
353
|
+
*)
|
|
354
|
+
(*!
|
|
355
|
+
* Object Display util
|
|
356
|
+
*)
|
|
357
|
+
(*!
|
|
358
|
+
* Flag utility
|
|
359
|
+
*)
|
|
360
|
+
(*!
|
|
361
|
+
* Flag transferring utility
|
|
362
|
+
*)
|
|
363
|
+
(*!
|
|
364
|
+
* Deep equal utility
|
|
365
|
+
*)
|
|
366
|
+
(*!
|
|
367
|
+
* Deep path info
|
|
368
|
+
*)
|
|
369
|
+
(*!
|
|
370
|
+
* Check if a property exists
|
|
371
|
+
*)
|
|
372
|
+
(*!
|
|
373
|
+
* Function name
|
|
374
|
+
*)
|
|
375
|
+
(*!
|
|
376
|
+
* add Property
|
|
377
|
+
*)
|
|
378
|
+
(*!
|
|
379
|
+
* add Method
|
|
380
|
+
*)
|
|
381
|
+
(*!
|
|
382
|
+
* overwrite Property
|
|
383
|
+
*)
|
|
384
|
+
(*!
|
|
385
|
+
* overwrite Method
|
|
386
|
+
*)
|
|
387
|
+
(*!
|
|
388
|
+
* Add a chainable method
|
|
389
|
+
*)
|
|
390
|
+
(*!
|
|
391
|
+
* Overwrite chainable method
|
|
392
|
+
*)
|
|
393
|
+
(*!
|
|
394
|
+
* Compare by inspect method
|
|
395
|
+
*)
|
|
396
|
+
(*!
|
|
397
|
+
* Get own enumerable property symbols method
|
|
398
|
+
*)
|
|
399
|
+
(*!
|
|
400
|
+
* Get own enumerable properties method
|
|
401
|
+
*)
|
|
402
|
+
(*!
|
|
403
|
+
* Checks error against a given set of criteria
|
|
404
|
+
*)
|
|
405
|
+
(*!
|
|
406
|
+
* Proxify util
|
|
407
|
+
*)
|
|
408
|
+
(*!
|
|
409
|
+
* addLengthGuard util
|
|
410
|
+
*)
|
|
411
|
+
(*!
|
|
412
|
+
* isProxyEnabled helper
|
|
413
|
+
*)
|
|
414
|
+
(*!
|
|
415
|
+
* isNaN method
|
|
416
|
+
*)
|
|
417
|
+
(*!
|
|
418
|
+
* getOperator method
|
|
419
|
+
*)
|
|
420
|
+
|
|
421
|
+
chai/lib/chai/assertion.js:
|
|
422
|
+
(*!
|
|
423
|
+
* chai
|
|
424
|
+
* http://chaijs.com
|
|
425
|
+
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
426
|
+
* MIT Licensed
|
|
427
|
+
*)
|
|
428
|
+
(*!
|
|
429
|
+
* Module dependencies.
|
|
430
|
+
*)
|
|
431
|
+
(*!
|
|
432
|
+
* Module export.
|
|
433
|
+
*)
|
|
434
|
+
(*!
|
|
435
|
+
* Assertion Constructor
|
|
436
|
+
*
|
|
437
|
+
* Creates object for chaining.
|
|
438
|
+
*
|
|
439
|
+
* `Assertion` objects contain metadata in the form of flags. Three flags can
|
|
440
|
+
* be assigned during instantiation by passing arguments to this constructor:
|
|
441
|
+
*
|
|
442
|
+
* - `object`: This flag contains the target of the assertion. For example, in
|
|
443
|
+
* the assertion `expect(numKittens).to.equal(7);`, the `object` flag will
|
|
444
|
+
* contain `numKittens` so that the `equal` assertion can reference it when
|
|
445
|
+
* needed.
|
|
446
|
+
*
|
|
447
|
+
* - `message`: This flag contains an optional custom error message to be
|
|
448
|
+
* prepended to the error message that's generated by the assertion when it
|
|
449
|
+
* fails.
|
|
450
|
+
*
|
|
451
|
+
* - `ssfi`: This flag stands for "start stack function indicator". It
|
|
452
|
+
* contains a function reference that serves as the starting point for
|
|
453
|
+
* removing frames from the stack trace of the error that's created by the
|
|
454
|
+
* assertion when it fails. The goal is to provide a cleaner stack trace to
|
|
455
|
+
* end users by removing Chai's internal functions. Note that it only works
|
|
456
|
+
* in environments that support `Error.captureStackTrace`, and only when
|
|
457
|
+
* `Chai.config.includeStack` hasn't been set to `false`.
|
|
458
|
+
*
|
|
459
|
+
* - `lockSsfi`: This flag controls whether or not the given `ssfi` flag
|
|
460
|
+
* should retain its current value, even as assertions are chained off of
|
|
461
|
+
* this object. This is usually set to `true` when creating a new assertion
|
|
462
|
+
* from within another assertion. It's also temporarily set to `true` before
|
|
463
|
+
* an overwritten assertion gets called by the overwriting assertion.
|
|
464
|
+
*
|
|
465
|
+
* @param {Mixed} obj target of the assertion
|
|
466
|
+
* @param {String} msg (optional) custom error message
|
|
467
|
+
* @param {Function} ssfi (optional) starting point for removing stack frames
|
|
468
|
+
* @param {Boolean} lockSsfi (optional) whether or not the ssfi flag is locked
|
|
469
|
+
* @api private
|
|
470
|
+
*)
|
|
471
|
+
(*!
|
|
472
|
+
* ### ._obj
|
|
473
|
+
*
|
|
474
|
+
* Quick reference to stored `actual` value for plugin developers.
|
|
475
|
+
*
|
|
476
|
+
* @api private
|
|
477
|
+
*)
|
|
478
|
+
|
|
479
|
+
chai/lib/chai/core/assertions.js:
|
|
480
|
+
(*!
|
|
481
|
+
* chai
|
|
482
|
+
* http://chaijs.com
|
|
483
|
+
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
484
|
+
* MIT Licensed
|
|
485
|
+
*)
|
|
486
|
+
|
|
487
|
+
chai/lib/chai/interface/expect.js:
|
|
488
|
+
(*!
|
|
489
|
+
* chai
|
|
490
|
+
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
491
|
+
* MIT Licensed
|
|
492
|
+
*)
|
|
493
|
+
|
|
494
|
+
chai/lib/chai/interface/should.js:
|
|
495
|
+
(*!
|
|
496
|
+
* chai
|
|
497
|
+
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
498
|
+
* MIT Licensed
|
|
499
|
+
*)
|
|
500
|
+
|
|
501
|
+
chai/lib/chai/interface/assert.js:
|
|
502
|
+
(*!
|
|
503
|
+
* chai
|
|
504
|
+
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
505
|
+
* MIT Licensed
|
|
506
|
+
*)
|
|
507
|
+
(*!
|
|
508
|
+
* Chai dependencies.
|
|
509
|
+
*)
|
|
510
|
+
(*!
|
|
511
|
+
* Module export.
|
|
512
|
+
*)
|
|
513
|
+
(*!
|
|
514
|
+
* ### .ifError(object)
|
|
515
|
+
*
|
|
516
|
+
* Asserts if value is not a false value, and throws if it is a true value.
|
|
517
|
+
* This is added to allow for chai to be a drop-in replacement for Node's
|
|
518
|
+
* assert class.
|
|
519
|
+
*
|
|
520
|
+
* var err = new Error('I am a custom error');
|
|
521
|
+
* assert.ifError(err); // Rethrows err!
|
|
522
|
+
*
|
|
523
|
+
* @name ifError
|
|
524
|
+
* @param {Object} object
|
|
525
|
+
* @namespace Assert
|
|
526
|
+
* @api public
|
|
527
|
+
*)
|
|
528
|
+
(*!
|
|
529
|
+
* Aliases.
|
|
530
|
+
*)
|
|
531
|
+
|
|
532
|
+
chai/lib/chai.js:
|
|
533
|
+
(*!
|
|
534
|
+
* chai
|
|
535
|
+
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
536
|
+
* MIT Licensed
|
|
537
|
+
*)
|
|
538
|
+
(*!
|
|
539
|
+
* Chai version
|
|
540
|
+
*)
|
|
541
|
+
(*!
|
|
542
|
+
* Assertion Error
|
|
543
|
+
*)
|
|
544
|
+
(*!
|
|
545
|
+
* Utils for plugins (not exported)
|
|
546
|
+
*)
|
|
547
|
+
(*!
|
|
548
|
+
* Utility Functions
|
|
549
|
+
*)
|
|
550
|
+
(*!
|
|
551
|
+
* Configuration
|
|
552
|
+
*)
|
|
553
|
+
(*!
|
|
554
|
+
* Primary `Assertion` prototype
|
|
555
|
+
*)
|
|
556
|
+
(*!
|
|
557
|
+
* Core Assertions
|
|
558
|
+
*)
|
|
559
|
+
(*!
|
|
560
|
+
* Expect interface
|
|
561
|
+
*)
|
|
562
|
+
(*!
|
|
563
|
+
* Should interface
|
|
564
|
+
*)
|
|
565
|
+
(*!
|
|
566
|
+
* Assert interface
|
|
567
|
+
*)
|
|
568
|
+
*/
|
|
569
|
+
return Libp2PInterop}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/interop",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Interoperability Tests for libp2p",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/interop#readme",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"types": "./dist/src/index.d.ts",
|
|
23
23
|
"files": [
|
|
24
24
|
"src",
|
|
25
|
-
"dist
|
|
25
|
+
"dist",
|
|
26
26
|
"!dist/test",
|
|
27
27
|
"!**/*.tsbuildinfo"
|
|
28
28
|
],
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"@libp2p/logger": "^2.0.0",
|
|
138
138
|
"@libp2p/peer-id": "^2.0.0",
|
|
139
139
|
"@multiformats/multiaddr": "^11.0.0",
|
|
140
|
-
"it-all": "^
|
|
140
|
+
"it-all": "^2.0.0",
|
|
141
141
|
"it-first": "^2.0.0",
|
|
142
142
|
"it-pipe": "^2.0.4",
|
|
143
143
|
"multiformats": "^11.0.0",
|